1 // /usr/libexec/gcc/i486-pc-linux-gnu/4.1.2/cc1plus -quiet -I/home/schultz/c/schultz/ -Isrc/ -D_GNU_SOURCE -D ALGO=3 -D INFINITY=1E10 -D EPSILON=1E-4 -D VOXEL_DENSITY=8 -D ENABLE_INFO -D ENABLE_JOKES -D TIMER_PERIOD=0.0166666 -D CIRCLE_DATA="circle.data" -D VIDEO_CONF="video.conf" -D RENDER_STYLE=0 -D RENDER_SIDES=8 -D WALLS src/circle.c++ -quiet -dumpbase circle.c++ -march=pentium-m -auxbase-strip bin/circle.o -g -O2 -W -fomit-frame-pointer -fno-default-inline -finline-functions -o - -frandom-seed=0
3 # 1 "/home/schultz/c/khaos//"
9 # 1 "/home/schultz/c/schultz/schultz" 1
10 # 10 "/home/schultz/c/schultz/schultz"
11 # 1 "/usr/include/stdio.h" 1 3 4
12 # 28 "/usr/include/stdio.h" 3 4
13 # 1 "/usr/include/features.h" 1 3 4
14 # 322 "/usr/include/features.h" 3 4
15 # 1 "/usr/include/sys/cdefs.h" 1 3 4
16 # 324 "/usr/include/sys/cdefs.h" 3 4
17 # 1 "/usr/include/bits/wordsize.h" 1 3 4
18 # 325 "/usr/include/sys/cdefs.h" 2 3 4
19 # 323 "/usr/include/features.h" 2 3 4
20 # 345 "/usr/include/features.h" 3 4
21 # 1 "/usr/include/gnu/stubs.h" 1 3 4
25 # 1 "/usr/include/bits/wordsize.h" 1 3 4
26 # 5 "/usr/include/gnu/stubs.h" 2 3 4
29 # 1 "/usr/include/gnu/stubs-32.h" 1 3 4
30 # 8 "/usr/include/gnu/stubs.h" 2 3 4
31 # 346 "/usr/include/features.h" 2 3 4
32 # 29 "/usr/include/stdio.h" 2 3 4
38 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
39 # 214 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 3 4
40 typedef unsigned int size_t;
41 # 35 "/usr/include/stdio.h" 2 3 4
43 # 1 "/usr/include/bits/types.h" 1 3 4
44 # 28 "/usr/include/bits/types.h" 3 4
45 # 1 "/usr/include/bits/wordsize.h" 1 3 4
46 # 29 "/usr/include/bits/types.h" 2 3 4
49 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
50 # 32 "/usr/include/bits/types.h" 2 3 4
53 typedef unsigned char __u_char;
54 typedef unsigned short int __u_short;
55 typedef unsigned int __u_int;
56 typedef unsigned long int __u_long;
59 typedef signed char __int8_t;
60 typedef unsigned char __uint8_t;
61 typedef signed short int __int16_t;
62 typedef unsigned short int __uint16_t;
63 typedef signed int __int32_t;
64 typedef unsigned int __uint32_t;
69 __extension__ typedef signed long long int __int64_t;
70 __extension__ typedef unsigned long long int __uint64_t;
78 __extension__ typedef long long int __quad_t;
79 __extension__ typedef unsigned long long int __u_quad_t;
80 # 134 "/usr/include/bits/types.h" 3 4
81 # 1 "/usr/include/bits/typesizes.h" 1 3 4
82 # 135 "/usr/include/bits/types.h" 2 3 4
85 __extension__ typedef __u_quad_t __dev_t;
86 __extension__ typedef unsigned int __uid_t;
87 __extension__ typedef unsigned int __gid_t;
88 __extension__ typedef unsigned long int __ino_t;
89 __extension__ typedef __u_quad_t __ino64_t;
90 __extension__ typedef unsigned int __mode_t;
91 __extension__ typedef unsigned int __nlink_t;
92 __extension__ typedef long int __off_t;
93 __extension__ typedef __quad_t __off64_t;
94 __extension__ typedef int __pid_t;
95 __extension__ typedef struct { int __val[2]; } __fsid_t;
96 __extension__ typedef long int __clock_t;
97 __extension__ typedef unsigned long int __rlim_t;
98 __extension__ typedef __u_quad_t __rlim64_t;
99 __extension__ typedef unsigned int __id_t;
100 __extension__ typedef long int __time_t;
101 __extension__ typedef unsigned int __useconds_t;
102 __extension__ typedef long int __suseconds_t;
104 __extension__ typedef int __daddr_t;
105 __extension__ typedef long int __swblk_t;
106 __extension__ typedef int __key_t;
109 __extension__ typedef int __clockid_t;
112 __extension__ typedef void * __timer_t;
115 __extension__ typedef long int __blksize_t;
120 __extension__ typedef long int __blkcnt_t;
121 __extension__ typedef __quad_t __blkcnt64_t;
124 __extension__ typedef unsigned long int __fsblkcnt_t;
125 __extension__ typedef __u_quad_t __fsblkcnt64_t;
128 __extension__ typedef unsigned long int __fsfilcnt_t;
129 __extension__ typedef __u_quad_t __fsfilcnt64_t;
131 __extension__ typedef int __ssize_t;
135 typedef __off64_t __loff_t;
136 typedef __quad_t *__qaddr_t;
137 typedef char *__caddr_t;
140 __extension__ typedef int __intptr_t;
143 __extension__ typedef unsigned int __socklen_t;
144 # 37 "/usr/include/stdio.h" 2 3 4
145 # 45 "/usr/include/stdio.h" 3 4
150 typedef struct _IO_FILE FILE;
156 # 65 "/usr/include/stdio.h" 3 4
157 typedef struct _IO_FILE __FILE;
158 # 75 "/usr/include/stdio.h" 3 4
159 # 1 "/usr/include/libio.h" 1 3 4
160 # 32 "/usr/include/libio.h" 3 4
161 # 1 "/usr/include/_G_config.h" 1 3 4
162 # 14 "/usr/include/_G_config.h" 3 4
163 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
164 # 355 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 3 4
165 typedef unsigned int wint_t;
166 # 15 "/usr/include/_G_config.h" 2 3 4
167 # 24 "/usr/include/_G_config.h" 3 4
168 # 1 "/usr/include/wchar.h" 1 3 4
169 # 48 "/usr/include/wchar.h" 3 4
170 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
171 # 49 "/usr/include/wchar.h" 2 3 4
173 # 1 "/usr/include/bits/wchar.h" 1 3 4
174 # 51 "/usr/include/wchar.h" 2 3 4
175 # 76 "/usr/include/wchar.h" 3 4
185 # 25 "/usr/include/_G_config.h" 2 3 4
197 # 44 "/usr/include/_G_config.h" 3 4
198 # 1 "/usr/include/gconv.h" 1 3 4
199 # 28 "/usr/include/gconv.h" 3 4
200 # 1 "/usr/include/wchar.h" 1 3 4
201 # 48 "/usr/include/wchar.h" 3 4
202 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
203 # 49 "/usr/include/wchar.h" 2 3 4
204 # 29 "/usr/include/gconv.h" 2 3 4
207 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
208 # 32 "/usr/include/gconv.h" 2 3 4
223 __GCONV_ILLEGAL_INPUT,
224 __GCONV_INCOMPLETE_INPUT,
226 __GCONV_ILLEGAL_DESCRIPTOR,
227 __GCONV_INTERNAL_ERROR
234 __GCONV_IS_LAST = 0x0001,
235 __GCONV_IGNORE_ERRORS = 0x0002
241 struct __gconv_step_data;
242 struct __gconv_loaded_object;
243 struct __gconv_trans_data;
247 typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
248 __const unsigned char **, __const unsigned char *,
249 unsigned char **, size_t *, int, int);
252 typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char);
255 typedef int (*__gconv_init_fct) (struct __gconv_step *);
256 typedef void (*__gconv_end_fct) (struct __gconv_step *);
260 typedef int (*__gconv_trans_fct) (struct __gconv_step *,
261 struct __gconv_step_data *, void *,
262 __const unsigned char *,
263 __const unsigned char **,
264 __const unsigned char *, unsigned char **,
268 typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
269 __const unsigned char *,
270 unsigned char *, unsigned char *);
273 typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
277 typedef int (*__gconv_trans_init_fct) (void **, const char *);
278 typedef void (*__gconv_trans_end_fct) (void *);
280 struct __gconv_trans_data
283 __gconv_trans_fct __trans_fct;
284 __gconv_trans_context_fct __trans_context_fct;
285 __gconv_trans_end_fct __trans_end_fct;
287 struct __gconv_trans_data *__next;
294 struct __gconv_loaded_object *__shlib_handle;
295 __const char *__modname;
303 __gconv_btowc_fct __btowc_fct;
304 __gconv_init_fct __init_fct;
305 __gconv_end_fct __end_fct;
309 int __min_needed_from;
310 int __max_needed_from;
322 struct __gconv_step_data
324 unsigned char *__outbuf;
325 unsigned char *__outbufend;
333 int __invocation_counter;
339 __mbstate_t *__statep;
344 struct __gconv_trans_data *__trans;
349 typedef struct __gconv_info
352 struct __gconv_step *__steps;
353 __extension__ struct __gconv_step_data __data [];
355 # 45 "/usr/include/_G_config.h" 2 3 4
358 struct __gconv_info __cd;
361 struct __gconv_info __cd;
362 struct __gconv_step_data __data;
366 typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
367 typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
368 typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
369 typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
370 # 33 "/usr/include/libio.h" 2 3 4
371 # 53 "/usr/include/libio.h" 3 4
372 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stdarg.h" 1 3 4
373 # 43 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stdarg.h" 3 4
374 typedef __builtin_va_list __gnuc_va_list;
375 # 54 "/usr/include/libio.h" 2 3 4
376 # 167 "/usr/include/libio.h" 3 4
377 struct _IO_jump_t; struct _IO_FILE;
378 # 177 "/usr/include/libio.h" 3 4
379 typedef void _IO_lock_t;
386 struct _IO_marker *_next;
387 struct _IO_FILE *_sbuf;
392 # 200 "/usr/include/libio.h" 3 4
396 enum __codecvt_result
403 # 268 "/usr/include/libio.h" 3 4
413 char* _IO_write_base;
420 char *_IO_backup_base;
423 struct _IO_marker *_markers;
425 struct _IO_FILE *_chain;
437 unsigned short _cur_column;
438 signed char _vtable_offset;
444 # 316 "/usr/include/libio.h" 3 4
446 # 325 "/usr/include/libio.h" 3 4
455 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
463 struct _IO_FILE_plus;
465 extern struct _IO_FILE_plus _IO_2_1_stdin_;
466 extern struct _IO_FILE_plus _IO_2_1_stdout_;
467 extern struct _IO_FILE_plus _IO_2_1_stderr_;
468 # 361 "/usr/include/libio.h" 3 4
469 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
477 typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
486 typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
489 typedef int __io_close_fn (void *__cookie);
494 typedef __io_read_fn cookie_read_function_t;
495 typedef __io_write_fn cookie_write_function_t;
496 typedef __io_seek_fn cookie_seek_function_t;
497 typedef __io_close_fn cookie_close_function_t;
503 __io_write_fn *write;
505 __io_close_fn *close;
506 } _IO_cookie_io_functions_t;
507 typedef _IO_cookie_io_functions_t cookie_io_functions_t;
509 struct _IO_cookie_file;
512 extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
513 void *__cookie, _IO_cookie_io_functions_t __fns);
521 extern int __underflow (_IO_FILE *);
522 extern int __uflow (_IO_FILE *);
523 extern int __overflow (_IO_FILE *, int);
524 extern wint_t __wunderflow (_IO_FILE *);
525 extern wint_t __wuflow (_IO_FILE *);
526 extern wint_t __woverflow (_IO_FILE *, wint_t);
527 # 451 "/usr/include/libio.h" 3 4
528 extern int _IO_getc (_IO_FILE *__fp);
529 extern int _IO_putc (int __c, _IO_FILE *__fp);
530 extern int _IO_feof (_IO_FILE *__fp) throw ();
531 extern int _IO_ferror (_IO_FILE *__fp) throw ();
533 extern int _IO_peekc_locked (_IO_FILE *__fp);
539 extern void _IO_flockfile (_IO_FILE *) throw ();
540 extern void _IO_funlockfile (_IO_FILE *) throw ();
541 extern int _IO_ftrylockfile (_IO_FILE *) throw ();
542 # 481 "/usr/include/libio.h" 3 4
543 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
544 __gnuc_va_list, int *__restrict);
545 extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
547 extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
548 extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
550 extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
551 extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
553 extern void _IO_free_backup_area (_IO_FILE *) throw ();
554 # 543 "/usr/include/libio.h" 3 4
556 # 76 "/usr/include/stdio.h" 2 3 4
561 typedef __gnuc_va_list va_list;
562 # 89 "/usr/include/stdio.h" 3 4
565 typedef _G_fpos_t fpos_t;
571 typedef _G_fpos64_t fpos64_t;
572 # 141 "/usr/include/stdio.h" 3 4
573 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4
574 # 142 "/usr/include/stdio.h" 2 3 4
578 extern struct _IO_FILE *stdin;
579 extern struct _IO_FILE *stdout;
580 extern struct _IO_FILE *stderr;
588 extern int remove (__const char *__filename) throw ();
590 extern int rename (__const char *__old, __const char *__new) throw ();
595 extern int renameat (int __oldfd, __const char *__old, int __newfd,
596 __const char *__new) throw ();
605 extern FILE *tmpfile (void) ;
606 # 182 "/usr/include/stdio.h" 3 4
607 extern FILE *tmpfile64 (void) ;
611 extern char *tmpnam (char *__s) throw () ;
617 extern char *tmpnam_r (char *__s) throw () ;
618 # 204 "/usr/include/stdio.h" 3 4
619 extern char *tempnam (__const char *__dir, __const char *__pfx)
620 throw () __attribute__ ((__malloc__)) ;
629 extern int fclose (FILE *__stream);
634 extern int fflush (FILE *__stream);
636 # 229 "/usr/include/stdio.h" 3 4
637 extern int fflush_unlocked (FILE *__stream);
638 # 239 "/usr/include/stdio.h" 3 4
639 extern int fcloseall (void);
649 extern FILE *fopen (__const char *__restrict __filename,
650 __const char *__restrict __modes) ;
655 extern FILE *freopen (__const char *__restrict __filename,
656 __const char *__restrict __modes,
657 FILE *__restrict __stream) ;
658 # 272 "/usr/include/stdio.h" 3 4
661 extern FILE *fopen64 (__const char *__restrict __filename,
662 __const char *__restrict __modes) ;
663 extern FILE *freopen64 (__const char *__restrict __filename,
664 __const char *__restrict __modes,
665 FILE *__restrict __stream) ;
670 extern FILE *fdopen (int __fd, __const char *__modes) throw () ;
676 extern FILE *fopencookie (void *__restrict __magic_cookie,
677 __const char *__restrict __modes,
678 _IO_cookie_io_functions_t __io_funcs) throw () ;
681 extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
687 extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () ;
694 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw ();
698 extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
699 int __modes, size_t __n) throw ();
705 extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
706 size_t __size) throw ();
709 extern void setlinebuf (FILE *__stream) throw ();
718 extern int fprintf (FILE *__restrict __stream,
719 __const char *__restrict __format, ...);
724 extern int printf (__const char *__restrict __format, ...);
726 extern int sprintf (char *__restrict __s,
727 __const char *__restrict __format, ...) throw ();
733 extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
734 __gnuc_va_list __arg);
739 extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
741 extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
742 __gnuc_va_list __arg) throw ();
748 extern int snprintf (char *__restrict __s, size_t __maxlen,
749 __const char *__restrict __format, ...)
750 throw () __attribute__ ((__format__ (__printf__, 3, 4)));
752 extern int vsnprintf (char *__restrict __s, size_t __maxlen,
753 __const char *__restrict __format, __gnuc_va_list __arg)
754 throw () __attribute__ ((__format__ (__printf__, 3, 0)));
761 extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
762 __gnuc_va_list __arg)
763 throw () __attribute__ ((__format__ (__printf__, 2, 0))) ;
764 extern int __asprintf (char **__restrict __ptr,
765 __const char *__restrict __fmt, ...)
766 throw () __attribute__ ((__format__ (__printf__, 2, 3))) ;
767 extern int asprintf (char **__restrict __ptr,
768 __const char *__restrict __fmt, ...)
769 throw () __attribute__ ((__format__ (__printf__, 2, 3))) ;
777 extern int vdprintf (int __fd, __const char *__restrict __fmt,
778 __gnuc_va_list __arg)
779 __attribute__ ((__format__ (__printf__, 2, 0)));
780 extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
781 __attribute__ ((__format__ (__printf__, 2, 3)));
790 extern int fscanf (FILE *__restrict __stream,
791 __const char *__restrict __format, ...) ;
796 extern int scanf (__const char *__restrict __format, ...) ;
798 extern int sscanf (__const char *__restrict __s,
799 __const char *__restrict __format, ...) throw ();
808 extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
809 __gnuc_va_list __arg)
810 __attribute__ ((__format__ (__scanf__, 2, 0))) ;
816 extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
817 __attribute__ ((__format__ (__scanf__, 1, 0))) ;
820 extern int vsscanf (__const char *__restrict __s,
821 __const char *__restrict __format, __gnuc_va_list __arg)
822 throw () __attribute__ ((__format__ (__scanf__, 2, 0)));
832 extern int fgetc (FILE *__stream);
833 extern int getc (FILE *__stream);
839 extern int getchar (void);
841 # 464 "/usr/include/stdio.h" 3 4
842 extern int getc_unlocked (FILE *__stream);
843 extern int getchar_unlocked (void);
844 # 475 "/usr/include/stdio.h" 3 4
845 extern int fgetc_unlocked (FILE *__stream);
857 extern int fputc (int __c, FILE *__stream);
858 extern int putc (int __c, FILE *__stream);
864 extern int putchar (int __c);
866 # 508 "/usr/include/stdio.h" 3 4
867 extern int fputc_unlocked (int __c, FILE *__stream);
875 extern int putc_unlocked (int __c, FILE *__stream);
876 extern int putchar_unlocked (int __c);
883 extern int getw (FILE *__stream);
886 extern int putw (int __w, FILE *__stream);
895 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
903 extern char *gets (char *__s) ;
905 # 554 "/usr/include/stdio.h" 3 4
906 extern char *fgets_unlocked (char *__restrict __s, int __n,
907 FILE *__restrict __stream) ;
908 # 570 "/usr/include/stdio.h" 3 4
909 extern __ssize_t __getdelim (char **__restrict __lineptr,
910 size_t *__restrict __n, int __delimiter,
911 FILE *__restrict __stream) ;
912 extern __ssize_t getdelim (char **__restrict __lineptr,
913 size_t *__restrict __n, int __delimiter,
914 FILE *__restrict __stream) ;
922 extern __ssize_t getline (char **__restrict __lineptr,
923 size_t *__restrict __n,
924 FILE *__restrict __stream) ;
933 extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
939 extern int puts (__const char *__s);
946 extern int ungetc (int __c, FILE *__stream);
953 extern size_t fread (void *__restrict __ptr, size_t __size,
954 size_t __n, FILE *__restrict __stream) ;
959 extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
960 size_t __n, FILE *__restrict __s) ;
962 # 631 "/usr/include/stdio.h" 3 4
963 extern int fputs_unlocked (__const char *__restrict __s,
964 FILE *__restrict __stream);
965 # 642 "/usr/include/stdio.h" 3 4
966 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
967 size_t __n, FILE *__restrict __stream) ;
968 extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
969 size_t __n, FILE *__restrict __stream) ;
978 extern int fseek (FILE *__stream, long int __off, int __whence);
983 extern long int ftell (FILE *__stream) ;
988 extern void rewind (FILE *__stream);
990 # 678 "/usr/include/stdio.h" 3 4
991 extern int fseeko (FILE *__stream, __off_t __off, int __whence);
996 extern __off_t ftello (FILE *__stream) ;
997 # 697 "/usr/include/stdio.h" 3 4
1004 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
1009 extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
1010 # 720 "/usr/include/stdio.h" 3 4
1014 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
1015 extern __off64_t ftello64 (FILE *__stream) ;
1016 extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
1017 extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);
1022 extern void clearerr (FILE *__stream) throw ();
1024 extern int feof (FILE *__stream) throw () ;
1026 extern int ferror (FILE *__stream) throw () ;
1031 extern void clearerr_unlocked (FILE *__stream) throw ();
1032 extern int feof_unlocked (FILE *__stream) throw () ;
1033 extern int ferror_unlocked (FILE *__stream) throw () ;
1042 extern void perror (__const char *__s);
1049 # 1 "/usr/include/bits/sys_errlist.h" 1 3 4
1050 # 27 "/usr/include/bits/sys_errlist.h" 3 4
1051 extern int sys_nerr;
1052 extern __const char *__const sys_errlist[];
1055 extern int _sys_nerr;
1056 extern __const char *__const _sys_errlist[];
1057 # 759 "/usr/include/stdio.h" 2 3 4
1062 extern int fileno (FILE *__stream) throw () ;
1067 extern int fileno_unlocked (FILE *__stream) throw () ;
1068 # 778 "/usr/include/stdio.h" 3 4
1069 extern FILE *popen (__const char *__command, __const char *__modes) ;
1075 extern int pclose (FILE *__stream);
1081 extern char *ctermid (char *__s) throw ();
1087 extern char *cuserid (char *__s);
1095 extern int obstack_printf (struct obstack *__restrict __obstack,
1096 __const char *__restrict __format, ...)
1097 throw () __attribute__ ((__format__ (__printf__, 2, 3)));
1098 extern int obstack_vprintf (struct obstack *__restrict __obstack,
1099 __const char *__restrict __format,
1100 __gnuc_va_list __args)
1101 throw () __attribute__ ((__format__ (__printf__, 2, 0)));
1109 extern void flockfile (FILE *__stream) throw ();
1113 extern int ftrylockfile (FILE *__stream) throw () ;
1116 extern void funlockfile (FILE *__stream) throw ();
1117 # 839 "/usr/include/stdio.h" 3 4
1118 # 1 "/usr/include/bits/stdio.h" 1 3 4
1119 # 33 "/usr/include/bits/stdio.h" 3 4
1121 vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg)
1123 return vfprintf (stdout, __fmt, __arg);
1130 return _IO_getc (stdin);
1137 fgetc_unlocked (FILE *__fp)
1139 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
1147 getc_unlocked (FILE *__fp)
1149 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
1154 getchar_unlocked (void)
1156 return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
1165 return _IO_putc (__c, stdout);
1172 fputc_unlocked (int __c, FILE *__stream)
1174 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
1182 putc_unlocked (int __c, FILE *__stream)
1184 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
1189 putchar_unlocked (int __c)
1191 return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
1199 getline (char **__lineptr, size_t *__n, FILE *__stream)
1201 return __getdelim (__lineptr, __n, '\n', __stream);
1209 feof_unlocked (FILE *__stream) throw ()
1211 return (((__stream)->_flags & 0x10) != 0);
1216 ferror_unlocked (FILE *__stream) throw ()
1218 return (((__stream)->_flags & 0x20) != 0);
1220 # 840 "/usr/include/stdio.h" 2 3 4
1221 # 848 "/usr/include/stdio.h" 3 4
1223 # 11 "/home/schultz/c/schultz/schultz" 2
1224 # 1 "/usr/include/memory.h" 1 3 4
1225 # 30 "/usr/include/memory.h" 3 4
1226 # 1 "/usr/include/string.h" 1 3 4
1227 # 28 "/usr/include/string.h" 3 4
1233 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
1234 # 34 "/usr/include/string.h" 2 3 4
1239 extern void *memcpy (void *__restrict __dest,
1240 __const void *__restrict __src, size_t __n)
1241 throw () __attribute__ ((__nonnull__ (1, 2)));
1244 extern void *memmove (void *__dest, __const void *__src, size_t __n)
1245 throw () __attribute__ ((__nonnull__ (1, 2)));
1252 extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
1253 int __c, size_t __n)
1254 throw () __attribute__ ((__nonnull__ (1, 2)));
1260 extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
1263 extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
1264 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1267 extern void *memchr (__const void *__s, int __c, size_t __n)
1268 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1274 extern void *rawmemchr (__const void *__s, int __c)
1275 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1278 extern void *memrchr (__const void *__s, int __c, size_t __n)
1279 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1285 extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
1286 throw () __attribute__ ((__nonnull__ (1, 2)));
1288 extern char *strncpy (char *__restrict __dest,
1289 __const char *__restrict __src, size_t __n)
1290 throw () __attribute__ ((__nonnull__ (1, 2)));
1293 extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
1294 throw () __attribute__ ((__nonnull__ (1, 2)));
1296 extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
1297 size_t __n) throw () __attribute__ ((__nonnull__ (1, 2)));
1300 extern int strcmp (__const char *__s1, __const char *__s2)
1301 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1303 extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
1304 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1307 extern int strcoll (__const char *__s1, __const char *__s2)
1308 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1310 extern size_t strxfrm (char *__restrict __dest,
1311 __const char *__restrict __src, size_t __n)
1312 throw () __attribute__ ((__nonnull__ (2)));
1319 # 1 "/usr/include/xlocale.h" 1 3 4
1320 # 28 "/usr/include/xlocale.h" 3 4
1321 typedef struct __locale_struct
1324 struct locale_data *__locales[13];
1327 const unsigned short int *__ctype_b;
1328 const int *__ctype_tolower;
1329 const int *__ctype_toupper;
1332 const char *__names[13];
1334 # 119 "/usr/include/string.h" 2 3 4
1337 extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
1338 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
1340 extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
1341 __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4)));
1346 extern char *strdup (__const char *__s)
1347 throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
1354 extern char *strndup (__const char *__string, size_t __n)
1355 throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
1356 # 165 "/usr/include/string.h" 3 4
1359 extern char *strchr (__const char *__s, int __c)
1360 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1362 extern char *strrchr (__const char *__s, int __c)
1363 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1369 extern char *strchrnul (__const char *__s, int __c)
1370 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1376 extern size_t strcspn (__const char *__s, __const char *__reject)
1377 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1380 extern size_t strspn (__const char *__s, __const char *__accept)
1381 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1383 extern char *strpbrk (__const char *__s, __const char *__accept)
1384 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1386 extern char *strstr (__const char *__haystack, __const char *__needle)
1387 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1391 extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
1392 throw () __attribute__ ((__nonnull__ (2)));
1397 extern char *__strtok_r (char *__restrict __s,
1398 __const char *__restrict __delim,
1399 char **__restrict __save_ptr)
1400 throw () __attribute__ ((__nonnull__ (2, 3)));
1402 extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
1403 char **__restrict __save_ptr)
1404 throw () __attribute__ ((__nonnull__ (2, 3)));
1409 extern char *strcasestr (__const char *__haystack, __const char *__needle)
1410 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1417 extern void *memmem (__const void *__haystack, size_t __haystacklen,
1418 __const void *__needle, size_t __needlelen)
1419 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));
1423 extern void *__mempcpy (void *__restrict __dest,
1424 __const void *__restrict __src, size_t __n)
1425 throw () __attribute__ ((__nonnull__ (1, 2)));
1426 extern void *mempcpy (void *__restrict __dest,
1427 __const void *__restrict __src, size_t __n)
1428 throw () __attribute__ ((__nonnull__ (1, 2)));
1434 extern size_t strlen (__const char *__s)
1435 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1441 extern size_t strnlen (__const char *__string, size_t __maxlen)
1442 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1448 extern char *strerror (int __errnum) throw ();
1450 # 281 "/usr/include/string.h" 3 4
1451 extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
1452 throw () __attribute__ ((__nonnull__ (2)));
1458 extern char *strerror_l (int __errnum, __locale_t __l) throw ();
1464 extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
1468 extern void bcopy (__const void *__src, void *__dest, size_t __n)
1469 throw () __attribute__ ((__nonnull__ (1, 2)));
1472 extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
1475 extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
1476 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1479 extern char *index (__const char *__s, int __c)
1480 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1483 extern char *rindex (__const char *__s, int __c)
1484 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1488 extern int ffs (int __i) throw () __attribute__ ((__const__));
1493 extern int ffsl (long int __l) throw () __attribute__ ((__const__));
1495 __extension__ extern int ffsll (long long int __ll)
1496 throw () __attribute__ ((__const__));
1501 extern int strcasecmp (__const char *__s1, __const char *__s2)
1502 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1505 extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
1506 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1512 extern int strcasecmp_l (__const char *__s1, __const char *__s2,
1514 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
1516 extern int strncasecmp_l (__const char *__s1, __const char *__s2,
1517 size_t __n, __locale_t __loc)
1518 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
1524 extern char *strsep (char **__restrict __stringp,
1525 __const char *__restrict __delim)
1526 throw () __attribute__ ((__nonnull__ (1, 2)));
1531 extern int strverscmp (__const char *__s1, __const char *__s2)
1532 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1535 extern char *strsignal (int __sig) throw ();
1538 extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
1539 throw () __attribute__ ((__nonnull__ (1, 2)));
1540 extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
1541 throw () __attribute__ ((__nonnull__ (1, 2)));
1545 extern char *__stpncpy (char *__restrict __dest,
1546 __const char *__restrict __src, size_t __n)
1547 throw () __attribute__ ((__nonnull__ (1, 2)));
1548 extern char *stpncpy (char *__restrict __dest,
1549 __const char *__restrict __src, size_t __n)
1550 throw () __attribute__ ((__nonnull__ (1, 2)));
1553 extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1)));
1556 extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
1563 extern char *basename (__const char *__filename) throw () __attribute__ ((__nonnull__ (1)));
1564 # 432 "/usr/include/string.h" 3 4
1566 # 31 "/usr/include/memory.h" 2 3 4
1567 # 12 "/home/schultz/c/schultz/schultz" 2
1568 # 1 "/usr/include/stdlib.h" 1 3 4
1569 # 33 "/usr/include/stdlib.h" 3 4
1570 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
1571 # 34 "/usr/include/stdlib.h" 2 3 4
1580 # 1 "/usr/include/bits/waitflags.h" 1 3 4
1581 # 43 "/usr/include/stdlib.h" 2 3 4
1582 # 1 "/usr/include/bits/waitstatus.h" 1 3 4
1583 # 65 "/usr/include/bits/waitstatus.h" 3 4
1584 # 1 "/usr/include/endian.h" 1 3 4
1585 # 37 "/usr/include/endian.h" 3 4
1586 # 1 "/usr/include/bits/endian.h" 1 3 4
1587 # 38 "/usr/include/endian.h" 2 3 4
1588 # 66 "/usr/include/bits/waitstatus.h" 2 3 4
1596 unsigned int __w_termsig:7;
1597 unsigned int __w_coredump:1;
1598 unsigned int __w_retcode:8;
1607 } __wait_terminated;
1611 unsigned int __w_stopval:8;
1612 unsigned int __w_stopsig:8;
1622 # 44 "/usr/include/stdlib.h" 2 3 4
1623 # 96 "/usr/include/stdlib.h" 3 4
1646 __extension__ typedef struct
1653 # 140 "/usr/include/stdlib.h" 3 4
1654 extern size_t __ctype_get_mb_cur_max (void) throw () ;
1659 extern double atof (__const char *__nptr)
1660 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
1662 extern int atoi (__const char *__nptr)
1663 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
1665 extern long int atol (__const char *__nptr)
1666 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
1672 __extension__ extern long long int atoll (__const char *__nptr)
1673 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
1679 extern double strtod (__const char *__restrict __nptr,
1680 char **__restrict __endptr)
1681 throw () __attribute__ ((__nonnull__ (1))) ;
1687 extern float strtof (__const char *__restrict __nptr,
1688 char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ;
1690 extern long double strtold (__const char *__restrict __nptr,
1691 char **__restrict __endptr)
1692 throw () __attribute__ ((__nonnull__ (1))) ;
1698 extern long int strtol (__const char *__restrict __nptr,
1699 char **__restrict __endptr, int __base)
1700 throw () __attribute__ ((__nonnull__ (1))) ;
1702 extern unsigned long int strtoul (__const char *__restrict __nptr,
1703 char **__restrict __endptr, int __base)
1704 throw () __attribute__ ((__nonnull__ (1))) ;
1710 extern long long int strtoq (__const char *__restrict __nptr,
1711 char **__restrict __endptr, int __base)
1712 throw () __attribute__ ((__nonnull__ (1))) ;
1715 extern unsigned long long int strtouq (__const char *__restrict __nptr,
1716 char **__restrict __endptr, int __base)
1717 throw () __attribute__ ((__nonnull__ (1))) ;
1724 extern long long int strtoll (__const char *__restrict __nptr,
1725 char **__restrict __endptr, int __base)
1726 throw () __attribute__ ((__nonnull__ (1))) ;
1729 extern unsigned long long int strtoull (__const char *__restrict __nptr,
1730 char **__restrict __endptr, int __base)
1731 throw () __attribute__ ((__nonnull__ (1))) ;
1733 # 240 "/usr/include/stdlib.h" 3 4
1734 extern long int strtol_l (__const char *__restrict __nptr,
1735 char **__restrict __endptr, int __base,
1736 __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ;
1738 extern unsigned long int strtoul_l (__const char *__restrict __nptr,
1739 char **__restrict __endptr,
1740 int __base, __locale_t __loc)
1741 throw () __attribute__ ((__nonnull__ (1, 4))) ;
1744 extern long long int strtoll_l (__const char *__restrict __nptr,
1745 char **__restrict __endptr, int __base,
1747 throw () __attribute__ ((__nonnull__ (1, 4))) ;
1750 extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
1751 char **__restrict __endptr,
1752 int __base, __locale_t __loc)
1753 throw () __attribute__ ((__nonnull__ (1, 4))) ;
1755 extern double strtod_l (__const char *__restrict __nptr,
1756 char **__restrict __endptr, __locale_t __loc)
1757 throw () __attribute__ ((__nonnull__ (1, 3))) ;
1759 extern float strtof_l (__const char *__restrict __nptr,
1760 char **__restrict __endptr, __locale_t __loc)
1761 throw () __attribute__ ((__nonnull__ (1, 3))) ;
1763 extern long double strtold_l (__const char *__restrict __nptr,
1764 char **__restrict __endptr,
1766 throw () __attribute__ ((__nonnull__ (1, 3))) ;
1773 extern double __strtod_internal (__const char *__restrict __nptr,
1774 char **__restrict __endptr, int __group)
1775 throw () __attribute__ ((__nonnull__ (1))) ;
1776 extern float __strtof_internal (__const char *__restrict __nptr,
1777 char **__restrict __endptr, int __group)
1778 throw () __attribute__ ((__nonnull__ (1))) ;
1779 extern long double __strtold_internal (__const char *__restrict __nptr,
1780 char **__restrict __endptr,
1782 throw () __attribute__ ((__nonnull__ (1))) ;
1784 extern long int __strtol_internal (__const char *__restrict __nptr,
1785 char **__restrict __endptr,
1786 int __base, int __group)
1787 throw () __attribute__ ((__nonnull__ (1))) ;
1791 extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
1792 char **__restrict __endptr,
1793 int __base, int __group)
1794 throw () __attribute__ ((__nonnull__ (1))) ;
1800 extern long long int __strtoll_internal (__const char *__restrict __nptr,
1801 char **__restrict __endptr,
1802 int __base, int __group)
1803 throw () __attribute__ ((__nonnull__ (1))) ;
1808 extern unsigned long long int __strtoull_internal (__const char *
1810 char **__restrict __endptr,
1811 int __base, int __group)
1812 throw () __attribute__ ((__nonnull__ (1))) ;
1821 extern __inline double
1822 strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw ()
1824 return __strtod_internal (__nptr, __endptr, 0);
1826 extern __inline long int
1827 strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
1830 return __strtol_internal (__nptr, __endptr, __base, 0);
1832 extern __inline unsigned long int
1833 strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
1836 return __strtoul_internal (__nptr, __endptr, __base, 0);
1842 extern __inline float
1843 strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw ()
1845 return __strtof_internal (__nptr, __endptr, 0);
1848 extern __inline long double
1849 strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw ()
1851 return __strtold_internal (__nptr, __endptr, 0);
1858 __extension__ extern __inline long long int
1859 strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
1862 return __strtoll_internal (__nptr, __endptr, __base, 0);
1864 __extension__ extern __inline unsigned long long int
1865 strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
1868 return __strtoull_internal (__nptr, __endptr, __base, 0);
1874 __extension__ extern __inline long long int
1875 strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ()
1878 return __strtoll_internal (__nptr, __endptr, __base, 0);
1880 __extension__ extern __inline unsigned long long int
1881 strtoull (__const char * __restrict __nptr, char **__restrict __endptr, int __base) throw ()
1884 return __strtoull_internal (__nptr, __endptr, __base, 0);
1890 extern __inline double
1891 atof (__const char *__nptr) throw ()
1893 return strtod (__nptr, (char **) __null);
1896 atoi (__const char *__nptr) throw ()
1898 return (int) strtol (__nptr, (char **) __null, 10);
1900 extern __inline long int
1901 atol (__const char *__nptr) throw ()
1903 return strtol (__nptr, (char **) __null, 10);
1909 __extension__ extern __inline long long int
1910 atoll (__const char *__nptr) throw ()
1912 return strtoll (__nptr, (char **) __null, 10);
1915 # 429 "/usr/include/stdlib.h" 3 4
1916 extern char *l64a (long int __n) throw () ;
1919 extern long int a64l (__const char *__s)
1920 throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
1925 # 1 "/usr/include/sys/types.h" 1 3 4
1926 # 29 "/usr/include/sys/types.h" 3 4
1933 typedef __u_char u_char;
1934 typedef __u_short u_short;
1935 typedef __u_int u_int;
1936 typedef __u_long u_long;
1937 typedef __quad_t quad_t;
1938 typedef __u_quad_t u_quad_t;
1939 typedef __fsid_t fsid_t;
1944 typedef __loff_t loff_t;
1948 typedef __ino_t ino_t;
1955 typedef __ino64_t ino64_t;
1960 typedef __dev_t dev_t;
1965 typedef __gid_t gid_t;
1970 typedef __mode_t mode_t;
1975 typedef __nlink_t nlink_t;
1980 typedef __uid_t uid_t;
1986 typedef __off_t off_t;
1993 typedef __off64_t off64_t;
1998 typedef __pid_t pid_t;
2003 typedef __id_t id_t;
2008 typedef __ssize_t ssize_t;
2014 typedef __daddr_t daddr_t;
2015 typedef __caddr_t caddr_t;
2021 typedef __key_t key_t;
2022 # 133 "/usr/include/sys/types.h" 3 4
2023 # 1 "/usr/include/time.h" 1 3 4
2024 # 59 "/usr/include/time.h" 3 4
2027 typedef __clock_t clock_t;
2031 # 75 "/usr/include/time.h" 3 4
2034 typedef __time_t time_t;
2038 # 93 "/usr/include/time.h" 3 4
2039 typedef __clockid_t clockid_t;
2040 # 105 "/usr/include/time.h" 3 4
2041 typedef __timer_t timer_t;
2042 # 134 "/usr/include/sys/types.h" 2 3 4
2046 typedef __useconds_t useconds_t;
2050 typedef __suseconds_t suseconds_t;
2056 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
2057 # 148 "/usr/include/sys/types.h" 2 3 4
2061 typedef unsigned long int ulong;
2062 typedef unsigned short int ushort;
2063 typedef unsigned int uint;
2064 # 195 "/usr/include/sys/types.h" 3 4
2065 typedef int int8_t __attribute__ ((__mode__ (__QI__)));
2066 typedef int int16_t __attribute__ ((__mode__ (__HI__)));
2067 typedef int int32_t __attribute__ ((__mode__ (__SI__)));
2068 typedef int int64_t __attribute__ ((__mode__ (__DI__)));
2071 typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
2072 typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
2073 typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
2074 typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
2076 typedef int register_t __attribute__ ((__mode__ (__word__)));
2077 # 220 "/usr/include/sys/types.h" 3 4
2078 # 1 "/usr/include/sys/select.h" 1 3 4
2079 # 31 "/usr/include/sys/select.h" 3 4
2080 # 1 "/usr/include/bits/select.h" 1 3 4
2081 # 32 "/usr/include/sys/select.h" 2 3 4
2084 # 1 "/usr/include/bits/sigset.h" 1 3 4
2085 # 24 "/usr/include/bits/sigset.h" 3 4
2086 typedef int __sig_atomic_t;
2093 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
2095 # 35 "/usr/include/sys/select.h" 2 3 4
2099 typedef __sigset_t sigset_t;
2105 # 1 "/usr/include/time.h" 1 3 4
2106 # 121 "/usr/include/time.h" 3 4
2112 # 45 "/usr/include/sys/select.h" 2 3 4
2114 # 1 "/usr/include/bits/time.h" 1 3 4
2115 # 69 "/usr/include/bits/time.h" 3 4
2119 __suseconds_t tv_usec;
2121 # 47 "/usr/include/sys/select.h" 2 3 4
2122 # 55 "/usr/include/sys/select.h" 3 4
2123 typedef long int __fd_mask;
2124 # 67 "/usr/include/sys/select.h" 3 4
2130 __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))];
2143 typedef __fd_mask fd_mask;
2144 # 99 "/usr/include/sys/select.h" 3 4
2146 # 109 "/usr/include/sys/select.h" 3 4
2147 extern int select (int __nfds, fd_set *__restrict __readfds,
2148 fd_set *__restrict __writefds,
2149 fd_set *__restrict __exceptfds,
2150 struct timeval *__restrict __timeout);
2151 # 121 "/usr/include/sys/select.h" 3 4
2152 extern int pselect (int __nfds, fd_set *__restrict __readfds,
2153 fd_set *__restrict __writefds,
2154 fd_set *__restrict __exceptfds,
2155 const struct timespec *__restrict __timeout,
2156 const __sigset_t *__restrict __sigmask);
2160 # 221 "/usr/include/sys/types.h" 2 3 4
2163 # 1 "/usr/include/sys/sysmacros.h" 1 3 4
2164 # 30 "/usr/include/sys/sysmacros.h" 3 4
2166 extern __inline unsigned int gnu_dev_major (unsigned long long int __dev)
2169 extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev)
2172 extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
2173 unsigned int __minor)
2177 __extension__ extern __inline unsigned int
2178 gnu_dev_major (unsigned long long int __dev) throw ()
2180 return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
2183 __extension__ extern __inline unsigned int
2184 gnu_dev_minor (unsigned long long int __dev) throw ()
2186 return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
2189 __extension__ extern __inline unsigned long long int
2190 gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw ()
2192 return ((__minor & 0xff) | ((__major & 0xfff) << 8)
2193 | (((unsigned long long int) (__minor & ~0xff)) << 12)
2194 | (((unsigned long long int) (__major & ~0xfff)) << 32));
2196 # 224 "/usr/include/sys/types.h" 2 3 4
2201 typedef __blksize_t blksize_t;
2208 typedef __blkcnt_t blkcnt_t;
2212 typedef __fsblkcnt_t fsblkcnt_t;
2216 typedef __fsfilcnt_t fsfilcnt_t;
2217 # 262 "/usr/include/sys/types.h" 3 4
2218 typedef __blkcnt64_t blkcnt64_t;
2219 typedef __fsblkcnt64_t fsblkcnt64_t;
2220 typedef __fsfilcnt64_t fsfilcnt64_t;
2226 # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
2227 # 36 "/usr/include/bits/pthreadtypes.h" 3 4
2228 typedef unsigned long int pthread_t;
2238 typedef struct __pthread_internal_slist
2240 struct __pthread_internal_slist *__next;
2241 } __pthread_slist_t;
2248 struct __pthread_mutex_s
2251 unsigned int __count;
2256 unsigned int __nusers;
2260 __pthread_slist_t __list;
2271 } pthread_mutexattr_t;
2281 unsigned int __futex;
2282 __extension__ unsigned long long int __total_seq;
2283 __extension__ unsigned long long int __wakeup_seq;
2284 __extension__ unsigned long long int __woken_seq;
2286 unsigned int __nwaiters;
2287 unsigned int __broadcast_seq;
2290 __extension__ long long int __align;
2297 } pthread_condattr_t;
2301 typedef unsigned int pthread_key_t;
2305 typedef int pthread_once_t;
2316 unsigned int __nr_readers;
2317 unsigned int __readers_wakeup;
2318 unsigned int __writer_wakeup;
2319 unsigned int __nr_readers_queued;
2320 unsigned int __nr_writers_queued;
2323 unsigned int __flags;
2334 } pthread_rwlockattr_t;
2340 typedef volatile int pthread_spinlock_t;
2349 } pthread_barrier_t;
2355 } pthread_barrierattr_t;
2356 # 271 "/usr/include/sys/types.h" 2 3 4
2360 # 439 "/usr/include/stdlib.h" 2 3 4
2367 extern long int random (void) throw ();
2370 extern void srandom (unsigned int __seed) throw ();
2376 extern char *initstate (unsigned int __seed, char *__statebuf,
2377 size_t __statelen) throw () __attribute__ ((__nonnull__ (2)));
2381 extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1)));
2400 extern int random_r (struct random_data *__restrict __buf,
2401 int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
2403 extern int srandom_r (unsigned int __seed, struct random_data *__buf)
2404 throw () __attribute__ ((__nonnull__ (2)));
2406 extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
2408 struct random_data *__restrict __buf)
2409 throw () __attribute__ ((__nonnull__ (2, 4)));
2411 extern int setstate_r (char *__restrict __statebuf,
2412 struct random_data *__restrict __buf)
2413 throw () __attribute__ ((__nonnull__ (1, 2)));
2420 extern int rand (void) throw ();
2422 extern void srand (unsigned int __seed) throw ();
2427 extern int rand_r (unsigned int *__seed) throw ();
2435 extern double drand48 (void) throw ();
2436 extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1)));
2439 extern long int lrand48 (void) throw ();
2440 extern long int nrand48 (unsigned short int __xsubi[3])
2441 throw () __attribute__ ((__nonnull__ (1)));
2444 extern long int mrand48 (void) throw ();
2445 extern long int jrand48 (unsigned short int __xsubi[3])
2446 throw () __attribute__ ((__nonnull__ (1)));
2449 extern void srand48 (long int __seedval) throw ();
2450 extern unsigned short int *seed48 (unsigned short int __seed16v[3])
2451 throw () __attribute__ ((__nonnull__ (1)));
2452 extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1)));
2460 unsigned short int __x[3];
2461 unsigned short int __old_x[3];
2462 unsigned short int __c;
2463 unsigned short int __init;
2464 unsigned long long int __a;
2468 extern int drand48_r (struct drand48_data *__restrict __buffer,
2469 double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
2470 extern int erand48_r (unsigned short int __xsubi[3],
2471 struct drand48_data *__restrict __buffer,
2472 double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
2475 extern int lrand48_r (struct drand48_data *__restrict __buffer,
2476 long int *__restrict __result)
2477 throw () __attribute__ ((__nonnull__ (1, 2)));
2478 extern int nrand48_r (unsigned short int __xsubi[3],
2479 struct drand48_data *__restrict __buffer,
2480 long int *__restrict __result)
2481 throw () __attribute__ ((__nonnull__ (1, 2)));
2484 extern int mrand48_r (struct drand48_data *__restrict __buffer,
2485 long int *__restrict __result)
2486 throw () __attribute__ ((__nonnull__ (1, 2)));
2487 extern int jrand48_r (unsigned short int __xsubi[3],
2488 struct drand48_data *__restrict __buffer,
2489 long int *__restrict __result)
2490 throw () __attribute__ ((__nonnull__ (1, 2)));
2493 extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
2494 throw () __attribute__ ((__nonnull__ (2)));
2496 extern int seed48_r (unsigned short int __seed16v[3],
2497 struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2)));
2499 extern int lcong48_r (unsigned short int __param[7],
2500 struct drand48_data *__buffer)
2501 throw () __attribute__ ((__nonnull__ (1, 2)));
2511 extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
2513 extern void *calloc (size_t __nmemb, size_t __size)
2514 throw () __attribute__ ((__malloc__)) ;
2522 extern void *realloc (void *__ptr, size_t __size)
2523 throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
2525 extern void free (void *__ptr) throw ();
2530 extern void cfree (void *__ptr) throw ();
2534 # 1 "/usr/include/alloca.h" 1 3 4
2535 # 25 "/usr/include/alloca.h" 3 4
2536 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4
2537 # 26 "/usr/include/alloca.h" 2 3 4
2545 extern void *alloca (size_t __size) throw ();
2552 # 613 "/usr/include/stdlib.h" 2 3 4
2557 extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
2562 extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
2563 throw () __attribute__ ((__nonnull__ (1))) ;
2568 extern void abort (void) throw () __attribute__ ((__noreturn__));
2572 extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1)));
2578 extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
2579 throw () __attribute__ ((__nonnull__ (1)));
2586 extern void exit (int __status) throw () __attribute__ ((__noreturn__));
2593 extern void _Exit (int __status) throw () __attribute__ ((__noreturn__));
2600 extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ;
2605 extern char *__secure_getenv (__const char *__name)
2606 throw () __attribute__ ((__nonnull__ (1))) ;
2612 extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1)));
2618 extern int setenv (__const char *__name, __const char *__value, int __replace)
2619 throw () __attribute__ ((__nonnull__ (2)));
2622 extern int unsetenv (__const char *__name) throw ();
2629 extern int clearenv (void) throw ();
2630 # 698 "/usr/include/stdlib.h" 3 4
2631 extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
2632 # 709 "/usr/include/stdlib.h" 3 4
2633 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
2634 # 719 "/usr/include/stdlib.h" 3 4
2635 extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ;
2636 # 729 "/usr/include/stdlib.h" 3 4
2637 extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
2646 extern int system (__const char *__command) ;
2653 extern char *canonicalize_file_name (__const char *__name)
2654 throw () __attribute__ ((__nonnull__ (1))) ;
2655 # 755 "/usr/include/stdlib.h" 3 4
2656 extern char *realpath (__const char *__restrict __name,
2657 char *__restrict __resolved) throw () ;
2664 typedef int (*__compar_fn_t) (__const void *, __const void *);
2667 typedef __compar_fn_t comparison_fn_t;
2674 extern void *bsearch (__const void *__key, __const void *__base,
2675 size_t __nmemb, size_t __size, __compar_fn_t __compar)
2676 __attribute__ ((__nonnull__ (1, 2, 5))) ;
2680 extern void qsort (void *__base, size_t __nmemb, size_t __size,
2681 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
2685 extern int abs (int __x) throw () __attribute__ ((__const__)) ;
2686 extern long int labs (long int __x) throw () __attribute__ ((__const__)) ;
2690 __extension__ extern long long int llabs (long long int __x)
2691 throw () __attribute__ ((__const__)) ;
2699 extern div_t div (int __numer, int __denom)
2700 throw () __attribute__ ((__const__)) ;
2701 extern ldiv_t ldiv (long int __numer, long int __denom)
2702 throw () __attribute__ ((__const__)) ;
2707 __extension__ extern lldiv_t lldiv (long long int __numer,
2708 long long int __denom)
2709 throw () __attribute__ ((__const__)) ;
2711 # 820 "/usr/include/stdlib.h" 3 4
2712 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
2713 int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
2718 extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
2719 int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
2724 extern char *gcvt (double __value, int __ndigit, char *__buf)
2725 throw () __attribute__ ((__nonnull__ (3))) ;
2730 extern char *qecvt (long double __value, int __ndigit,
2731 int *__restrict __decpt, int *__restrict __sign)
2732 throw () __attribute__ ((__nonnull__ (3, 4))) ;
2733 extern char *qfcvt (long double __value, int __ndigit,
2734 int *__restrict __decpt, int *__restrict __sign)
2735 throw () __attribute__ ((__nonnull__ (3, 4))) ;
2736 extern char *qgcvt (long double __value, int __ndigit, char *__buf)
2737 throw () __attribute__ ((__nonnull__ (3))) ;
2742 extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
2743 int *__restrict __sign, char *__restrict __buf,
2744 size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
2745 extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
2746 int *__restrict __sign, char *__restrict __buf,
2747 size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
2749 extern int qecvt_r (long double __value, int __ndigit,
2750 int *__restrict __decpt, int *__restrict __sign,
2751 char *__restrict __buf, size_t __len)
2752 throw () __attribute__ ((__nonnull__ (3, 4, 5)));
2753 extern int qfcvt_r (long double __value, int __ndigit,
2754 int *__restrict __decpt, int *__restrict __sign,
2755 char *__restrict __buf, size_t __len)
2756 throw () __attribute__ ((__nonnull__ (3, 4, 5)));
2764 extern int mblen (__const char *__s, size_t __n) throw () ;
2767 extern int mbtowc (wchar_t *__restrict __pwc,
2768 __const char *__restrict __s, size_t __n) throw () ;
2771 extern int wctomb (char *__s, wchar_t __wchar) throw () ;
2775 extern size_t mbstowcs (wchar_t *__restrict __pwcs,
2776 __const char *__restrict __s, size_t __n) throw ();
2778 extern size_t wcstombs (char *__restrict __s,
2779 __const wchar_t *__restrict __pwcs, size_t __n)
2789 extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) ;
2790 # 908 "/usr/include/stdlib.h" 3 4
2791 extern int getsubopt (char **__restrict __optionp,
2792 char *__const *__restrict __tokens,
2793 char **__restrict __valuep)
2794 throw () __attribute__ ((__nonnull__ (1, 2, 3))) ;
2800 extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1)));
2808 extern int posix_openpt (int __oflag) ;
2816 extern int grantpt (int __fd) throw ();
2820 extern int unlockpt (int __fd) throw ();
2825 extern char *ptsname (int __fd) throw () ;
2832 extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
2833 throw () __attribute__ ((__nonnull__ (2)));
2836 extern int getpt (void);
2843 extern int getloadavg (double __loadavg[], int __nelem)
2844 throw () __attribute__ ((__nonnull__ (1)));
2845 # 976 "/usr/include/stdlib.h" 3 4
2847 # 13 "/home/schultz/c/schultz/schultz" 2
2851 # 1 "/home/schultz/c/schultz/language/keywords" 1
2852 # 17 "/home/schultz/c/schultz/schultz" 2
2856 # 1 "/home/schultz/c/schultz/language/types" 1
2857 # 14 "/home/schultz/c/schultz/language/types"
2858 typedef unsigned int nat;
2859 # 28 "/home/schultz/c/schultz/language/types"
2861 # 21 "/home/schultz/c/schultz/schultz" 2
2862 # 1 "/home/schultz/c/schultz/language/assert" 1
2870 namespace __schultz {
2871 # 18 "/home/schultz/c/schultz/language/assert"
2872 inline void assertion_failure(char* file, nat line) {
2873 fprintf(stderr, "[ERROR] assertion failure at file \"%s\", line %u\n", file, line);
2883 inline void requirement_failure(char* file, nat line) {
2884 fprintf(stderr, "[ERROR] requirement not met at file \"%s\", line %u\n", file, line);
2888 # 22 "/home/schultz/c/schultz/schultz" 2
2889 # 1 "/home/schultz/c/schultz/language/meta" 1
2890 # 19 "/home/schultz/c/schultz/language/meta"
2891 template<bool> struct bool_type {};
2893 typedef bool_type<false> false_type;
2894 typedef bool_type<true> true_type;
2895 # 31 "/home/schultz/c/schultz/language/meta"
2896 template<nat> struct nat_type {};
2897 # 41 "/home/schultz/c/schultz/language/meta"
2898 template<typename T, typename U> struct type_equality {
2899 enum {value = false};
2901 template<typename T> struct type_equality<T, T> {
2902 enum {value = true};
2905 namespace __schultz {
2906 # 58 "/home/schultz/c/schultz/language/meta"
2907 template<typename T> const T& fetch_constness(const T& x) {return x;}
2908 template<typename T> T& fetch_constness(T& x) {return x;}
2910 # 115 "/home/schultz/c/schultz/language/meta"
2911 template<typename T> struct default_type_traits {
2914 trivial_constructor = false,
2915 trivial_copy = false,
2916 trivial_destructor = false,
2918 fast_increment = false,
2919 fast_decrement = false,
2920 fast_random_increment = false,
2926 special_swap = false
2929 # 142 "/home/schultz/c/schultz/language/meta"
2930 template<typename T> struct type_traits {
2932 trivial = T::type_traits::trivial || (
2933 T::type_traits::trivial_constructor &&
2934 T::type_traits::trivial_copy &&
2935 T::type_traits::trivial_destructor
2937 trivial_constructor = T::type_traits::trivial || T::type_traits::trivial_constructor,
2938 trivial_copy = T::type_traits::trivial || T::type_traits::trivial_copy,
2939 trivial_destructor = T::type_traits::trivial || T::type_traits::trivial_destructor,
2941 fast_increment = T::type_traits::fast_increment || T::type_traits::fast_random_increment,
2942 fast_decrement = T::type_traits::fast_decrement || T::type_traits::fast_random_increment,
2943 fast_random_increment = T::type_traits::fast_random_increment,
2945 iterator = T::type_traits::iterator,
2947 structure = T::type_traits::structure,
2949 special_swap = T::type_traits::special_swap
2952 # 178 "/home/schultz/c/schultz/language/meta"
2953 template<typename T> struct builtin_type_traits : public default_type_traits<T> {
2956 trivial_constructor = true,
2957 trivial_copy = true,
2958 trivial_destructor = true,
2960 fast_increment = true,
2961 fast_decrement = true,
2962 fast_random_increment = true,
2968 special_swap = false
2972 template<> struct type_traits<bool> : public builtin_type_traits<bool> {};
2973 template<> struct type_traits<nat> : public builtin_type_traits<nat> {};
2974 template<> struct type_traits<int> : public builtin_type_traits<int> {};
2975 template<> struct type_traits<unsigned char> : public builtin_type_traits<unsigned char> {};
2976 template<> struct type_traits<char> : public builtin_type_traits<char> {};
2977 template<> struct type_traits<unsigned short> : public builtin_type_traits<unsigned short> {};
2978 template<> struct type_traits<short> : public builtin_type_traits<short> {};
2979 template<> struct type_traits<unsigned long long int> : public builtin_type_traits<unsigned long long int> {};
2980 template<> struct type_traits<long long int> : public builtin_type_traits<long long int> {};
2981 template<> struct type_traits<float> : public builtin_type_traits<float> {};
2982 template<> struct type_traits<double> : public builtin_type_traits<double> {};
2983 template<typename T> struct type_traits<T*> : public builtin_type_traits<T*> {
2984 enum {iterator = true};
2986 template<typename T> struct type_traits<const T*> : public builtin_type_traits<const T*> {
2987 enum {iterator = true};
2989 # 245 "/home/schultz/c/schultz/language/meta"
2990 template<typename I> struct default_iterator_traits {
2994 bidirectional = false,
2995 random_access = false
2998 typedef void value_type;
3000 # 267 "/home/schultz/c/schultz/language/meta"
3001 template<typename I> struct iterator_traits {
3003 constant = I::iterator_traits::constant,
3004 persistent = I::iterator_traits::persistent,
3005 bidirectional = I::iterator_traits::bidirectional || I::iterator_traits::random_access,
3006 random_access = I::iterator_traits::random_access
3009 typedef typename I::iterator_traits::value_type value_type;
3013 template<typename T> struct iterator_traits<T*> : public default_iterator_traits<T*> {
3017 bidirectional = true,
3018 random_access = true
3021 typedef T value_type;
3023 template<typename T> struct iterator_traits<const T*> : public default_iterator_traits<const T*> {
3027 bidirectional = true,
3028 random_access = true
3031 typedef T value_type;
3033 # 309 "/home/schultz/c/schultz/language/meta"
3034 template<typename I> struct iterator_type_traits : public default_type_traits<I> {
3038 fast_increment = true,
3039 fast_decrement = iterator_traits<I>::bidirectional,
3040 fast_random_increment = iterator_traits<I>::random_access,
3045 # 23 "/home/schultz/c/schultz/schultz" 2
3046 # 1 "/home/schultz/c/schultz/language/function" 1
3047 # 14 "/home/schultz/c/schultz/language/function"
3048 template<typename F, typename X> struct unary_function {
3049 typedef F return_type;
3050 typedef X argument_type;
3059 template<typename F, typename X, typename Y = X> struct binary_function {
3060 typedef F return_type;
3061 typedef X argument_type;
3062 typedef X first_argument_type;
3063 typedef Y second_argument_type;
3065 # 43 "/home/schultz/c/schultz/language/function"
3066 template<typename F> struct opposite_function : public binary_function<typename F::return_type, typename F::second_argument_type, typename F::first_argument_type> {
3071 explicit inline opposite_function(const F& g) : f(g) {}
3074 inline typename F::return_type operator ()(typename F::second_argument_type y, typename F::first_argument_type x) const {return f(x, y);}
3078 template<typename F> inline opposite_function<F> make_opposite_function(const F& f) {
3079 return opposite_function<F>(f);
3088 template<typename T> struct addressf : public unary_function<T*, T&> {
3089 inline T* operator ()(T& a) const {return &a;}
3091 # 84 "/home/schultz/c/schultz/language/function"
3092 template<typename T> struct equalf : public binary_function<bool, const T&> {
3093 inline bool operator ()(const T& x, const T& y) const {
3097 template<typename I> struct indirect_equalf : public binary_function<bool, I> {
3098 inline bool operator ()(I x, I y) const {
3104 template<typename T> struct lessf : public binary_function<bool, const T&> {
3105 inline bool operator ()(const T& x, const T& y) const {
3109 template<typename I> struct indirect_lessf : public binary_function<bool, I> {
3110 inline bool operator ()(I x, I y) const {
3116 template<typename T> struct greaterf : public binary_function<bool, const T&> {
3117 inline bool operator ()(const T& x, const T& y) const {
3121 template<typename I> struct indirect_greaterf : public binary_function<bool, I> {
3122 inline bool operator ()(I x, I y) const {
3126 # 131 "/home/schultz/c/schultz/language/function"
3127 template<typename T> struct sumf : public binary_function<typeof(((T)(*((T*)(0)))) + ((T)(*((T*)(0))))), const T&, const T&> {
3128 inline typeof(((T)(*((T*)(0)))) + ((T)(*((T*)(0))))) operator ()(const T& x, const T& y) const {
3134 template<typename T> struct addf : public binary_function<T&, T&, const T&> {
3135 inline T& operator ()(T& a, const T& b) const {return a+= b;}
3139 template<typename T> struct sizef : public unary_function<typeof(((T)(*((T*)(0)))).size()), const T&> {
3140 inline typeof(((T)(*((T*)(0)))).size()) operator ()(const T& A) const {return A.size();}
3142 # 24 "/home/schultz/c/schultz/schultz" 2
3143 # 1 "/home/schultz/c/schultz/language/base" 1
3144 # 14 "/home/schultz/c/schultz/language/base"
3145 template<typename T> inline typeof(((T)(*((T*)(0)))) * ((T)(*((T*)(0))))) square(const T& x) {
3155 template<typename T> inline T abs(const T& x) {
3156 return x < 0 ? -x : x;
3158 # 47 "/home/schultz/c/schultz/language/base"
3159 namespace __schultz {
3161 template<bool> struct swap_meta {
3162 template<typename T> static inline void swap(T& a, T& b) {
3170 template<> struct swap_meta<true> {
3171 template<typename T> static inline void swap(T& a, T& b) {
3178 template<typename T> inline void swap(T& a, T& b) {
3179 __schultz::swap_meta<type_traits<T>::special_swap>::swap(a, b);
3183 template<typename I, typename J> J swap(I a, I b, J c) {
3184 for (; a != b; ++a, ++c) swap(*a, *c);
3187 # 91 "/home/schultz/c/schultz/language/base"
3188 namespace __schultz {
3190 template<bool> struct advance_meta {
3191 template<typename I> static I& advance(I& i, nat n) {
3192 for (nat __repeat = n; __repeat != 0; --__repeat) ++i;
3198 template<> struct advance_meta<true> {
3199 template<typename I> static inline I& advance(I& i, nat n) {
3206 template<typename I> inline I& advance(I& i, nat n) {
3207 return __schultz::advance_meta<iterator_traits<I>::random_access>::advance(i, n);
3209 # 127 "/home/schultz/c/schultz/language/base"
3210 namespace __schultz {
3212 template<bool> struct step_back_meta {
3213 template<typename I> static I& step_back(I& i, nat n) {
3214 for (nat __repeat = n; __repeat != 0; --__repeat) --i;
3220 template<> struct step_back_meta<true> {
3221 template<typename I> static inline I& step_back(I& i, nat n) {
3228 template<typename I> inline I& step_back(I& i, nat n) {
3229 return __schultz::step_back_meta<iterator_traits<I>::random_access>::step_back(i, n);
3231 # 164 "/home/schultz/c/schultz/language/base"
3232 namespace __schultz {
3234 template<bool> struct distance_meta {
3235 template<typename I> static nat distance(I a, I b) {
3237 for (; a != b; ++a, ++n);
3243 template<> struct distance_meta<true> {
3244 template<typename I> static inline nat distance(I a, I b) {
3252 template<typename I> inline nat distance(I a, I b) {
3253 return __schultz::distance_meta<iterator_traits<I>::random_access>::distance(a, b);
3255 # 200 "/home/schultz/c/schultz/language/base"
3256 namespace __schultz {
3258 template<bool> struct reverse_meta {
3259 template<typename I> static void reverse(I a, I b) {
3270 template<> struct reverse_meta<true> {
3271 template<typename I> static void reverse(I a, I b) {
3273 if (a != b) for (--b; a < b; ++a, --b) swap(*a, *b);
3279 template<typename I> inline void reverse(I a, I b) {
3280 __schultz::reverse_meta<iterator_traits<I>::random_access>::reverse(a, b);
3282 # 243 "/home/schultz/c/schultz/language/base"
3283 template<typename T, typename O> inline const T& min(const T& x, const T& y, O o) {
3284 return o(x, y) ? x : y;
3286 template<typename T> inline const T& min(const T& x, const T& y) {
3287 return min(x, y, lessf<T>());
3289 template<typename T, typename O> inline T& min(T& x, T& y, O o) {
3290 return o(x, y) ? x : y;
3292 template<typename T> inline T& min(T& x, T& y) {
3293 return min(x, y, lessf<T>());
3297 template<typename T, typename O> inline const T& max(const T& x, const T& y, O o) {
3298 return o(y, x) ? x : y;
3300 template<typename T> inline const T& max(const T& x, const T& y) {
3301 return max(x, y, lessf<T>());
3303 template<typename T, typename O> inline T& max(T& x, T& y, O o) {
3304 return o(y, x) ? x : y;
3306 template<typename T> inline T& max(T& x, T& y) {
3307 return max(x, y, lessf<T>());
3309 # 282 "/home/schultz/c/schultz/language/base"
3310 template<typename I, typename T, typename E> I find(I a, I b, const T& x, E e) {
3311 for (; a != b; ++a) if (e(*a, x)) return a;
3314 template<typename I, typename T> inline I find(I a, I b, const T& x) {
3315 return find(a, b, x, equalf<typename iterator_traits< I >::value_type>());
3317 # 311 "/home/schultz/c/schultz/language/base"
3318 template<typename I, typename J, typename E> inline bool equal(I a, I b, J c, E e) {
3319 for (; a != b; ++a, ++c) if (!e(*a, *c)) return false;
3322 template<typename I, typename J> inline bool equal(I a, I b, J c) {
3323 return equal(a, b, c, equalf<typename iterator_traits< I >::value_type>());
3327 template<typename I, typename J, typename E> inline bool equal(I a, I b, J c, J d, E e) {
3328 return (b-a == d-c) && equal(a, b, c, e);
3330 template<typename I, typename J> inline bool equal(I a, I b, J c, J d) {
3331 return equal(a, b, c, d, equalf<typename iterator_traits< I >::value_type>());
3333 # 350 "/home/schultz/c/schultz/language/base"
3334 template<typename I, typename J, typename O> bool lex_less(I a, I b, J c, O o) {
3335 typedef typename iterator_traits< I >::value_type T;
3336 for (; a != b; ++a, ++c) {
3339 if (o(x, y)) return true;
3340 else if (o(y, x)) return false;
3344 template<typename I, typename J> inline bool lex_less(I a, I b, J c) {
3345 return lex_less(a, b, c, lessf<typename iterator_traits< I >::value_type>());
3349 template<> inline bool lex_less(const unsigned char* a, const unsigned char* b, const unsigned char* c, lessf<unsigned char>) {
3351 return memcmp(a, c, b-a) < 0;
3353 template<> inline bool lex_less(const char* a, const char* b, const char* c, lessf<char>) {
3355 return memcmp(a, c, b-a) < 0;
3357 template<> inline bool lex_less(const unsigned char* a, const unsigned char* b, const unsigned char* c, greaterf<unsigned char>) {
3359 return memcmp(a, c, b-a) > 0;
3361 template<> inline bool lex_less(const char* a, const char* b, const char* c, greaterf<char>) {
3363 return memcmp(a, c, b-a) > 0;
3367 template<typename I, typename J, typename O> bool lex_less(I a, I b, J c, J d, O o) {
3368 typedef typename iterator_traits< I >::value_type T;
3369 for (; a != b && c != d; ++a, ++c) {
3372 if (o(x, y)) return true;
3373 else if (o(y, x)) return false;
3377 template<typename I, typename J> inline bool lex_less(I a, I b, J c, J d) {
3378 return lex_less(a, b, c, d, lessf<typename iterator_traits< I >::value_type>());
3382 template<> inline bool lex_less(const unsigned char* a, const unsigned char* b, const unsigned char* c, const unsigned char* d, lessf<unsigned char>) {
3384 nat m = b-a, n = d-c;
3385 int r = memcmp(a, c, min(m, n));
3386 return r < 0 || (r == 0 && m < n);
3388 template<> inline bool lex_less(const char* a, const char* b, const char* c, const char* d, lessf<char>) {
3390 nat m = b-a, n = d-c;
3391 int r = memcmp(a, c, min(m, n));
3392 return r < 0 || (r == 0 && m < n);
3394 template<> inline bool lex_less(const unsigned char* a, const unsigned char* b, const unsigned char* c, const unsigned char* d, greaterf<unsigned char>) {
3396 nat m = b-a, n = d-c;
3397 int r = memcmp(a, c, min(m, n));
3398 return r > 0 || (r == 0 && m < n);
3400 template<> inline bool lex_less(const char* a, const char* b, const char* c, const char* d, greaterf<char>) {
3402 nat m = b-a, n = d-c;
3403 int r = memcmp(a, c, min(m, n));
3404 return r > 0 || (r == 0 && m < n);
3406 # 437 "/home/schultz/c/schultz/language/base"
3407 template<typename I, typename O> I minimum(I a, I b, O o) {
3410 while (++a != b) if (o(*a, *m)) m = a;
3413 template<typename I> inline I minimum(I a, I b) {
3414 return minimum(a, b, lessf<typename iterator_traits< I >::value_type>());
3418 template<typename I, typename O> I maximum(I a, I b, O o) {
3421 while (++a != b) if (o(*m, *a)) m = a;
3424 template<typename I> inline I maximum(I a, I b) {
3425 return maximum(a, b, lessf<typename iterator_traits< I >::value_type>());
3427 # 467 "/home/schultz/c/schultz/language/base"
3428 template<typename I, typename O> bool is_sorted(I a, I b, O o) {
3429 if (a == b) return true;
3433 if (a == b) return true;
3434 else if (o(*a, *i)) return false;
3438 template<typename I> inline bool is_sorted(I a, I b) {
3439 return is_sorted(a, b, lessf<typename iterator_traits< I >::value_type>());
3441 # 492 "/home/schultz/c/schultz/language/base"
3442 template<typename I, typename F> typename iterator_traits< I >::value_type foldl(I a, I b, F f, const typename iterator_traits< I >::value_type& e) {
3443 typename iterator_traits< I >::value_type r = e;
3444 for (; a != b; ++a) f(r, *a);
3447 # 507 "/home/schultz/c/schultz/language/base"
3448 namespace __schultz {
3450 template<bool> struct sum_meta {
3451 template<typename T> struct return_type {
3452 typedef typeof(((T)(*((T*)(0)))) + ((T)(*((T*)(0))))) value;
3454 template<typename T> static inline typeof(((T)(*((T*)(0)))) + ((T)(*((T*)(0))))) sum(const T& a, const T& b) {
3460 template<> struct sum_meta<true> {
3461 template<typename I> struct return_type {
3462 typedef typename iterator_traits< I >::value_type value;
3464 template<typename I> static inline typename iterator_traits< I >::value_type sum(I a, I b) {
3465 typename iterator_traits< I >::value_type s = 0;
3466 for (; a != b; ++a) s+= *a;
3472 template<typename T> inline typename __schultz::sum_meta<type_traits<T>::iterator>::template return_type<T>::value sum(const T& a, const T& b) {
3473 return __schultz::sum_meta<type_traits<T>::iterator>::sum(a, b);
3475 # 548 "/home/schultz/c/schultz/language/base"
3476 template<typename I, typename F> void map(I a, I b, F f) {
3477 for (; a != b; ++a) f(*a);
3481 template<typename I, typename J, typename F> J map(I a, I b, J c, F f) {
3482 for (; a != b; ++a, ++c) *c = f(*a);
3485 # 25 "/home/schultz/c/schultz/schultz" 2
3486 # 1 "/home/schultz/c/schultz/language/pair" 1
3494 namespace __schultz {
3501 template<typename T, typename U> struct pair_base {
3511 # 33 "/home/schultz/c/schultz/language/pair"
3512 static inline void swap(pair_base<T, U>& p, pair_base<T, U>& q) {
3513 schultz::swap(p.first, q.first);
3514 schultz::swap(p.second, q.second);
3516 # 45 "/home/schultz/c/schultz/language/pair"
3517 inline bool operator ==(const pair_base<T, U>& p) const {
3518 return first == p.first && second == p.second;
3520 inline bool operator !=(const pair_base<T, U>& p) const {
3521 return !((*this) == p);
3523 # 62 "/home/schultz/c/schultz/language/pair"
3524 inline bool operator <(const pair_base<T, U>& p) const {
3525 return first < p.first || (first == p.first && second < p.second);
3527 inline bool operator >(const pair_base<T, U>& p) const {
3530 inline bool operator <=(const pair_base<T, U>& p) const {
3531 return !(p < (*this));
3533 inline bool operator >=(const pair_base<T, U>& p) const {
3534 return !((*this) < p);
3536 # 87 "/home/schultz/c/schultz/language/pair"
3537 inline pair_base() {}
3538 inline pair_base(const T& f, const U& s) : first(f), second(s) {}
3539 # 104 "/home/schultz/c/schultz/language/pair"
3540 struct type_traits : public default_type_traits< pair_base<T, U> > {
3542 trivial = schultz::type_traits<T>::trivial && schultz::type_traits<U>::trivial,
3543 trivial_constructor = schultz::type_traits<T>::trivial_constructor && schultz::type_traits<U>::trivial_constructor,
3544 trivial_copy = schultz::type_traits<T>::trivial_copy && schultz::type_traits<U>::trivial_copy,
3545 trivial_destructor = schultz::type_traits<T>::trivial_destructor && schultz::type_traits<U>::trivial_destructor,
3547 special_swap = schultz::type_traits<T>::special_swap || schultz::type_traits<U>::special_swap
3552 # 132 "/home/schultz/c/schultz/language/pair"
3553 template<typename T, typename U = T> struct pair : public __schultz::pair_base<T, U> {
3556 inline pair(const T& f, const U& s) : __schultz::pair_base<T, U>::pair_base(f, s) {}
3560 template<typename T> struct pair<T, T> : public __schultz::pair_base<T, T> {
3562 using __schultz::pair_base<T, T>::first;
3563 using __schultz::pair_base<T, T>::second;
3564 # 156 "/home/schultz/c/schultz/language/pair"
3565 inline const T& operator [](nat i) const {
3567 return i == 0 ? first : second;
3569 inline T& operator [](nat i) {
3571 return i == 0 ? first : second;
3576 inline pair(const T& f, const T& s) : __schultz::pair_base<T, T>::pair_base(f, s) {}
3585 template<typename T, typename U> inline pair<T, U> make_pair(const T& f, const U& s) {
3586 return pair<T, U>(f, s);
3588 # 26 "/home/schultz/c/schultz/schultz" 2
3589 # 1 "/home/schultz/c/schultz/language/range" 1
3590 # 14 "/home/schultz/c/schultz/language/range"
3591 template<typename I> struct range {
3603 # 34 "/home/schultz/c/schultz/language/range"
3604 inline nat size() const {return _b-_a;}
3605 # 43 "/home/schultz/c/schultz/language/range"
3606 static inline void swap(range<I>& r, range<I>& s) {
3607 schultz::swap(r._a, s._a);
3608 schultz::swap(r._b, s._b);
3610 # 59 "/home/schultz/c/schultz/language/range"
3611 inline bool operator ==(const range<I>& r) const {
3612 return _a == r._a && _b == r._b;
3614 inline bool operator !=(const range<I>& r) const {
3615 return !((*this) == r);
3617 # 83 "/home/schultz/c/schultz/language/range"
3618 typedef I const_iterator;
3620 inline I begin() const {return _a;}
3621 inline I end() const {return _b;}
3622 # 95 "/home/schultz/c/schultz/language/range"
3624 inline range(I a, I b) : _a(a), _b(b) {}
3625 # 108 "/home/schultz/c/schultz/language/range"
3626 struct type_traits : public default_type_traits< range<I> > {
3630 special_swap = schultz::type_traits<I>::special_swap
3641 template<typename I> inline range<I> make_range(I a, I b) {
3642 return range<I>(a, b);
3644 # 27 "/home/schultz/c/schultz/schultz" 2
3645 # 1 "/home/schultz/c/schultz/language/mrange" 1
3646 # 25 "/home/schultz/c/schultz/language/mrange"
3647 template<typename I, typename F> struct mrange {
3666 inline nat size() const {return _b-_a;}
3674 static inline void swap(mrange<I, F>& M, mrange<I, F>& N) {
3675 schultz::swap(M._a, N._a);
3676 schultz::swap(M._b, N._b);
3678 # 69 "/home/schultz/c/schultz/language/mrange"
3679 inline bool operator ==(const mrange<I, F>& M) const {
3680 return _a == M._a && _b == M._b;
3682 inline bool operator !=(const mrange<I, F>& M) const {
3683 return !((*this) == M);
3685 # 106 "/home/schultz/c/schultz/language/mrange"
3686 struct const_iterator {
3691 typename F::return_type operator *() const {
3694 typename F::return_type operator [](nat idx) const {
3695 return F()(*(i+idx));
3699 static inline void swap(const_iterator& i, const_iterator& j) {
3700 schultz::swap(i.i, j.i);
3704 inline bool operator ==(const_iterator it) const {return i == it.i;}
3705 inline bool operator !=(const_iterator it) const {return i != it.i;}
3708 inline bool operator <(const_iterator it) const {return i < it.i;}
3709 inline bool operator >(const_iterator it) const {return i > it.i;}
3710 inline bool operator <=(const_iterator it) const {return i <= it.i;}
3711 inline bool operator >=(const_iterator it) const {return i >= it.i;}
3714 inline const_iterator& operator ++() {
3718 inline const_iterator operator ++(int) {
3719 const_iterator r = i;
3723 inline const_iterator& operator --() {
3727 inline const_iterator operator --(int) {
3728 const_iterator r = i;
3732 inline const_iterator& operator +=(nat n) {
3736 inline const_iterator operator +(nat n) const {return const_iterator(i+n);}
3737 inline const_iterator& operator -=(nat n) {
3741 inline const_iterator operator -(nat n) const {return const_iterator(i-n);}
3742 inline nat operator -(const_iterator it) {return i-it.i;}
3745 inline const_iterator() {}
3746 explicit inline const_iterator(I it) : i(it) {}
3749 struct iterator_traits : public default_iterator_traits<const_iterator> {
3753 bidirectional = schultz::iterator_traits<I>::bidirectional,
3754 random_access = schultz::iterator_traits<I>::random_access
3757 typedef typename F::return_type value_type;
3761 struct type_traits : public iterator_type_traits<const_iterator> {
3763 special_swap = schultz::type_traits<I>::special_swap
3769 typedef const_iterator iterator;
3770 # 198 "/home/schultz/c/schultz/language/mrange"
3771 inline const_iterator begin() const {return const_iterator(_a);}
3772 inline const_iterator end() const {return const_iterator(_b);}
3773 # 208 "/home/schultz/c/schultz/language/mrange"
3775 inline mrange(I a, I b) : _a(a), _b(b) {}
3776 # 218 "/home/schultz/c/schultz/language/mrange"
3777 struct type_traits : public default_type_traits< mrange<I, F> > {
3781 special_swap = schultz::type_traits<I>::special_swap
3785 # 28 "/home/schultz/c/schultz/schultz" 2
3786 # 1 "/home/schultz/c/schultz/language/interval" 1
3794 namespace __schultz {
3801 template<typename T> struct interval_base {
3802 # 24 "/home/schultz/c/schultz/language/interval"
3804 # 33 "/home/schultz/c/schultz/language/interval"
3805 inline typeof(((T)(*((T*)(0)))) - ((T)(*((T*)(0))))) size() const {
3815 static inline void swap(interval_base<T>& I, interval_base<T>& J) {
3816 schultz::swap(I.left, J.left);
3817 schultz::swap(I.right, J.right);
3819 # 57 "/home/schultz/c/schultz/language/interval"
3820 inline bool operator ==(const interval_base<T>& I) const {
3821 return left == I.left && right == I.right;
3823 inline bool operator !=(const interval_base<T>& I) const {
3824 return !((*this) == I);
3826 # 78 "/home/schultz/c/schultz/language/interval"
3827 inline bool contains(const T& x) const {
3828 return left <= x && x < right;
3830 inline bool contains(const interval_base<T>& I) const {
3831 return left <= I.left && I.right <= right;
3833 # 93 "/home/schultz/c/schultz/language/interval"
3834 inline interval_base() {}
3835 inline interval_base(const T& l, const T& r) : left(l), right(r) {}
3836 # 107 "/home/schultz/c/schultz/language/interval"
3837 struct type_traits : public default_type_traits< interval_base<T> > {
3839 trivial = schultz::type_traits<T>::trivial,
3840 trivial_constructor = schultz::type_traits<T>::trivial_constructor,
3841 trivial_copy = schultz::type_traits<T>::trivial_copy,
3842 trivial_destructor = schultz::type_traits<T>::trivial_destructor,
3844 special_swap = schultz::type_traits<T>::special_swap
3849 # 181 "/home/schultz/c/schultz/language/interval"
3850 template<typename T, bool B = type_traits<T>::trivial> struct interval : public __schultz::interval_base<T> {
3852 using __schultz::interval_base<T>::left;
3853 using __schultz::interval_base<T>::right;
3856 using __schultz::interval_base<T>::size;
3857 # 202 "/home/schultz/c/schultz/language/interval"
3858 struct const_iterator {
3860 const interval<T, B>* I;
3866 inline T operator *() const {
3870 inline T operator [](nat k) const {
3872 return I->left + i + k;
3876 inline bool operator ==(const_iterator it) const {return i == it.i;}
3877 inline bool operator !=(const_iterator it) const {return i != it.i;}
3880 inline bool operator <(const_iterator it) const {return i < it.i;}
3881 inline bool operator >(const_iterator it) const {return i > it.i;}
3882 inline bool operator <=(const_iterator it) const {return i <= it.i;}
3883 inline bool operator >=(const_iterator it) const {return i >= it.i;}
3886 inline const_iterator& operator ++() {++i; return (*this);}
3887 inline const_iterator operator ++(int) {
3888 const_iterator r = (*this);
3892 inline const_iterator& operator --() {
3897 inline const_iterator operator --(int) {
3899 const_iterator r = (*this);
3903 inline const_iterator& operator +=(nat x) {i+= x; return (*this);}
3904 inline const_iterator operator +(nat x) const {
3905 return const_iterator(I, i+x);
3907 inline const_iterator& operator -=(nat x) {
3912 inline const_iterator operator -(nat x) const {
3914 return const_iterator(I, i-x);
3916 inline nat operator -(const_iterator it) const {
3922 inline const_iterator() {}
3923 inline const_iterator(const interval<T, B>* p, nat idx) : I(p), i(idx) {}
3926 struct iterator_traits : public default_iterator_traits<const_iterator> {
3930 bidirectional = true,
3931 random_access = true
3934 typedef T value_type;
3938 struct type_traits : public iterator_type_traits<const_iterator> {};
3942 typedef const_iterator iterator;
3943 # 295 "/home/schultz/c/schultz/language/interval"
3944 inline const_iterator begin() const {return const_iterator(this, 0);}
3945 inline const_iterator end() const {return const_iterator(this, size());}
3948 inline interval() {}
3949 inline interval(const T& l, const T& r) : __schultz::interval_base<T>::interval_base(l, r) {}
3953 template<typename T> struct interval<T, true> : public __schultz::interval_base<T> {
3955 using __schultz::interval_base<T>::left;
3956 using __schultz::interval_base<T>::right;
3957 # 322 "/home/schultz/c/schultz/language/interval"
3958 struct const_iterator {
3963 inline const T& operator *() const {return e;}
3964 inline const T* operator ->() const {return &e;}
3965 inline T operator [](nat i) const {return e+i;}
3968 inline bool operator ==(const_iterator i) const {return e == i.e;}
3969 inline bool operator !=(const_iterator i) const {return e != i.e;}
3972 inline bool operator <(const_iterator i) const {return e < i.e;}
3973 inline bool operator >(const_iterator i) const {return e > i.e;}
3974 inline bool operator <=(const_iterator i) const {return e <= i.e;}
3975 inline bool operator >=(const_iterator i) const {return e >= i.e;}
3978 inline const_iterator& operator ++() {++e; return (*this);}
3979 inline const_iterator operator ++(int) {
3980 const_iterator r = (*this);
3984 inline const_iterator& operator --() {--e; return (*this);}
3985 inline const_iterator operator --(int) {
3986 const_iterator r = (*this);
3990 inline const_iterator& operator +=(nat i) {e+= i; return (*this);}
3991 inline const_iterator operator +(nat i) const {return const_iterator(e+i);}
3992 inline const_iterator& operator -=(nat i) {e-= i; return (*this);}
3993 inline const_iterator operator -(nat i) const {return const_iterator(e-i);}
3994 inline nat operator -(const_iterator i) const {
4000 inline const_iterator() {}
4001 explicit inline const_iterator(T x) : e(x) {}
4004 struct iterator_traits : public default_iterator_traits<const_iterator> {
4008 bidirectional = schultz::type_traits<T>::fast_decrement,
4009 random_access = schultz::type_traits<T>::fast_random_increment
4012 typedef T value_type;
4016 struct type_traits : public iterator_type_traits<const_iterator> {};
4020 typedef const_iterator iterator;
4021 # 393 "/home/schultz/c/schultz/language/interval"
4022 inline const_iterator begin() const {return const_iterator(left);}
4023 inline const_iterator end() const {return const_iterator(right);}
4026 inline interval() {}
4027 inline interval(const T& l, const T& r) : __schultz::interval_base<T>::interval_base(l, r) {}
4029 # 409 "/home/schultz/c/schultz/language/interval"
4030 typedef interval<nat> _;
4031 # 423 "/home/schultz/c/schultz/language/interval"
4032 template<typename T, bool B> inline interval<T, B> make_interval(const T& l, const T& r, bool_type<B>) {
4033 return interval<T, B>(l, r);
4035 template<typename T> inline interval<T> make_interval(const T& l, const T& r) {
4036 return interval<T>(l, r);
4038 # 29 "/home/schultz/c/schultz/schultz" 2
4039 # 1 "/home/schultz/c/schultz/language/memory" 1
4040 # 25 "/home/schultz/c/schultz/language/memory"
4042 template<typename T> inline void* operator new(size_t, T* p) {return p;}
4044 # 51 "/home/schultz/c/schultz/language/memory"
4045 namespace __schultz {
4047 template<bool, bool> struct copy_meta {
4048 template<typename I, typename J> static J copy(I a, I b, J c) {
4049 for (; a != b; ++a, ++c) *c = *a;
4055 template<> struct copy_meta<true, false> {
4056 template<typename I, typename J> static J copy(I a, I b, J c) {
4057 for (nat n = b-a; n != 0; --n, ++a, ++c) *c = *a;
4063 template<> struct copy_meta<true, true> {
4064 template<typename T> static inline T* copy(const T* a, const T* b, T* c) {
4067 memcpy(c, a, n*sizeof(T));
4074 template<typename I, typename J> inline J copy(I a, I b, J c) {
4075 typedef typename iterator_traits< I >::value_type T;
4076 enum {fast = ((type_equality< I, T* >::value) || (type_equality< I, const T* >::value)) && (type_equality< J, T* >::value)};
4077 return __schultz::copy_meta<iterator_traits<I>::random_access, fast && type_traits<T>::trivial_copy>::copy(a, b, c);
4079 # 115 "/home/schultz/c/schultz/language/memory"
4080 namespace __schultz {
4082 template<bool, bool> struct shift_left_meta {
4083 template<typename I> static I shift_left(I a, I b, nat n) {
4086 for (; a != b; ++a, ++c) swap(*c, *a);
4092 template<> struct shift_left_meta<true, false> {
4093 template<typename I> static I shift_left(I a, I b, nat n) {
4096 for (; a != b; ++a, ++c) *c = *a;
4102 template<> struct shift_left_meta<true, true> {
4103 template<typename T> static inline T* shift_left(T* a, T* b, nat n) {
4105 memcpy(a-n, a, (b-a)*sizeof(T));
4112 template<typename I> inline I shift_left(I a, I b, nat n) {
4113 typedef typename iterator_traits< I >::value_type T;
4114 return __schultz::shift_left_meta<!type_traits<T>::special_swap, (type_equality< I, T* >::value) && type_traits<T>::trivial_copy>::shift_left(a, b, n);
4116 # 179 "/home/schultz/c/schultz/language/memory"
4117 namespace __schultz {
4119 template<bool, bool> struct shift_right_meta {
4120 template<typename I> static I shift_right(I a, I b, nat n) {
4133 template<> struct shift_right_meta<true, false> {
4134 template<typename I> static I shift_right(I a, I b, nat n) {
4147 template<> struct shift_right_meta<true, true> {
4148 template<typename T> static inline T* shift_right(T* a, T* b, nat n) {
4150 memmove(a+n, a, (b-a)*sizeof(T));
4157 template<typename I> inline I shift_right(I a, I b, nat n) {
4158 typedef typename iterator_traits< I >::value_type T;
4159 return __schultz::shift_right_meta<!type_traits<T>::special_swap, (type_equality< I, T* >::value) && type_traits<T>::trivial_copy>::shift_right(a, b, n);
4161 # 234 "/home/schultz/c/schultz/language/memory"
4162 namespace __schultz {
4164 template<bool> struct fill_meta {
4165 template<typename I, typename T> static void fill(I a, I b, const T& x) {
4166 for (; a != b; ++a) *a = x;
4171 template<> struct fill_meta<true> {
4172 template<typename T> static inline void fill(T* a, T* b, const T& x) {
4174 memset(a, *(const unsigned char*)(&x), b-a);
4180 template<typename I, typename T> inline void fill(I a, I b, const T& x) {
4181 enum {fast = (type_equality< I, T* >::value) && sizeof(T) == 1};
4182 __schultz::fill_meta<fast && type_traits<T>::trivial_copy>::fill(a, b, x);
4184 # 300 "/home/schultz/c/schultz/language/memory"
4185 struct system_allocation {
4187 static void* allocate(nat n) {
4188 if (n == 0) return 0;
4190 void* p = malloc(n);
4191 if (!(p)) {schultz::__schultz::requirement_failure("/home/schultz/c/schultz/language/memory", 306);};
4197 static inline void deallocate(void* p, void* q) {
4199 if (p != q) free(p);
4203 enum {reallocation = true};
4204 static void* reallocate(void* p, void* q, nat n) {
4206 if (p == q) return allocate(n);
4212 void* a = realloc(p, n);
4213 if (!(a)) {schultz::__schultz::requirement_failure("/home/schultz/c/schultz/language/memory", 328);};
4220 typedef system_allocation default_allocation;
4221 # 367 "/home/schultz/c/schultz/language/memory"
4222 namespace __schultz {
4223 template<bool> struct construct_meta {
4224 template<typename T> static inline void construct(T& x) {
4229 template<> struct construct_meta<true> {
4230 template<typename T> static inline void construct(T& x) {}
4233 template<typename T> inline void construct(T& x) {
4234 __schultz::construct_meta<type_traits<T>::trivial_constructor>::construct(x);
4238 namespace __schultz {
4239 template<bool> struct construct_meta1 {
4240 template<typename I> static void construct(I a, I b) {
4241 typedef typename iterator_traits< I >::value_type T;
4242 for (; a != b; ++a) new(&*a) T;
4246 template<> struct construct_meta1<true> {
4247 template<typename I> static inline void construct(I a, I b) {}
4250 template<typename I> inline void construct(I a, I b) {
4251 typedef typename iterator_traits< I >::value_type T;
4252 __schultz::construct_meta1<type_traits<T>::trivial_constructor>::construct(a, b);
4256 namespace __schultz {
4257 template<bool> struct construct_meta2 {
4258 template<typename I, typename J> static J construct(I a, I b, J c) {
4259 typedef typename iterator_traits< I >::value_type T;
4260 for (; a != b; ++a, ++c) new(&*c) T(*a);
4265 template<> struct construct_meta2<true> {
4266 template<typename I, typename J> static inline J construct(I a, I b, J c) {
4267 return copy(a, b, c);
4271 template<typename I, typename J> inline J construct(I a, I b, J c) {
4272 typedef typename iterator_traits< I >::value_type T;
4273 return __schultz::construct_meta2<type_traits<T>::trivial_copy>::construct(a, b, c);
4275 # 438 "/home/schultz/c/schultz/language/memory"
4276 namespace __schultz {
4277 template<bool> struct copy_construct_meta {
4278 template<typename T> static inline void copy_construct(T& x, const T& y) {
4283 template<> struct copy_construct_meta<true> {
4284 template<typename T> static inline void copy_construct(T& x, const T& y) {
4289 template<typename T> inline void copy_construct(T& x, const T& y) {
4290 __schultz::copy_construct_meta<type_traits<T>::trivial_copy>::copy_construct(x, y);
4294 namespace __schultz {
4295 template<bool> struct copy_construct_meta1 {
4296 template<typename I, typename T> static void copy_construct(I a, I b, const T& x) {
4297 for (; a != b; ++a) new(&*a) T(x);
4301 template<> struct copy_construct_meta1<true> {
4302 template<typename I, typename T> static inline void copy_construct(I a, I b, const T& x) {
4307 template<typename I, typename T> inline void copy_construct(I a, I b, const T& x) {
4308 __schultz::copy_construct_meta1<type_traits<T>::trivial_copy>::copy_construct(a, b, x);
4310 # 491 "/home/schultz/c/schultz/language/memory"
4311 namespace __schultz {
4312 template<bool> struct destruct_meta {
4313 template<typename T> static inline void destruct(T& x) {
4318 template<> struct destruct_meta<true> {
4319 template<typename T> static inline void destruct(T& x) {}
4322 template<typename T> inline void destruct(T& x) {
4323 __schultz::destruct_meta<type_traits<T>::trivial_destructor>::destruct(x);
4327 namespace __schultz {
4328 template<bool> struct destruct_meta1 {
4329 template<typename I> static void destruct(I a, I b) {
4330 typedef typename iterator_traits< I >::value_type T;
4331 for (; a != b; ++a) a->~T();
4335 template<> struct destruct_meta1<true> {
4336 template<typename I> static inline void destruct(I a, I b) {}
4339 template<typename I> inline void destruct(I a, I b) {
4340 typedef typename iterator_traits< I >::value_type T;
4341 __schultz::destruct_meta1<type_traits<T>::trivial_destructor>::destruct(a, b);
4344 namespace __schultz {
4345 # 549 "/home/schultz/c/schultz/language/memory"
4346 template<typename T, typename A> inline T* allocate(nat n) {
4347 T* p = (T*)A::allocate(n*sizeof(T));
4351 template<typename T, typename A> inline T* allocate(nat n, const T& x) {
4352 T* p = (T*)A::allocate(n*sizeof(T));
4353 copy_construct(p, p+n, x);
4356 template<typename T, typename A> inline T* allocate_1() {
4357 T* p = (T*)A::allocate(sizeof(T));
4361 template<typename T, typename A> inline T* allocate_1(const T& x) {
4362 T* p = (T*)A::allocate(sizeof(T));
4363 copy_construct(*p, x);
4366 template<typename T, typename A, typename I> inline T* allocate_copy(I a, I b) {
4367 T* p = (T*)A::allocate((b-a)*sizeof(T));
4371 template<typename T, typename A, typename I> inline T* allocate_copy(I a, I b, nat n) {
4373 T* p = (T*)A::allocate(n*sizeof(T));
4377 # 591 "/home/schultz/c/schultz/language/memory"
4378 template<typename T, typename A> inline void deallocate(T* p, T* q) {
4381 A::deallocate(p, q);
4383 template<typename T, typename A> inline void deallocate_1(T* p) {
4386 A::deallocate(p, p+1);
4388 # 615 "/home/schultz/c/schultz/language/memory"
4389 template<bool> struct reallocate_meta {
4391 template<typename T, typename A> static T* reallocate(T* p, T* q, nat n, A) {
4393 T* a = (T*)A::allocate(n*sizeof(T));
4396 construct(a+m, a+n);
4397 memcpy(a, p, m*sizeof(T));
4401 memcpy(a, p, n*sizeof(T));
4403 A::deallocate(p, q);
4407 template<> struct reallocate_meta<true> {
4408 template<typename T, typename A> static T* reallocate(T* p, T* q, nat n, A) {
4412 p = (T*)A::reallocate(p, q, n*sizeof(T));
4413 construct(p+m, p+n);
4418 return (T*)A::reallocate(p, q, n*sizeof(T));
4422 template<typename T, typename A> inline T* reallocate(T* p, T* q, nat n) {
4423 return reallocate_meta<A::reallocation>::reallocate(p, q, n, A());
4426 # 682 "/home/schultz/c/schultz/language/memory"
4427 template<typename T, typename A = default_allocation> struct allocation {
4429 static inline T* allocate(nat n) {return __schultz::allocate<T, A>(n);}
4430 static inline T* allocate(nat n, const T& x) {return __schultz::allocate<T, A>(n, x);}
4431 static inline T* allocate_1() {return __schultz::allocate_1<T, A>();}
4432 static inline T* allocate_1(const T& x) {return __schultz::allocate_1<T, A>(x);}
4433 template<typename I> static inline T* allocate_copy(I a, I b) {
4434 return __schultz::allocate_copy<T, A>(a, b);
4436 template<typename I> static inline T* allocate_copy(I a, I b, nat n) {
4437 return __schultz::allocate_copy<T, A>(a, b, n);
4441 static inline void deallocate(T* p, T* q) {__schultz::deallocate<T, A>(p, q);}
4442 static inline void deallocate_1(T* p) {__schultz::deallocate_1<T, A>(p);}
4445 static inline T* reallocate(T* p, T* q, nat n) {return __schultz::reallocate<T, A>(p, q, n);}
4447 # 30 "/home/schultz/c/schultz/schultz" 2
4450 # 1 "/home/schultz/c/schultz/structure/vector2" 1
4451 # 11 "/home/schultz/c/schultz/structure/vector2"
4453 template<typename T> struct vector2 {
4462 # 30 "/home/schultz/c/schultz/structure/vector2"
4463 inline const T& operator [](nat i) const {
4465 return i == 0 ? x : y;
4467 inline T& operator [](nat i) {
4469 return i == 0 ? x : y;
4471 # 46 "/home/schultz/c/schultz/structure/vector2"
4472 static inline void swap(vector2<T>& v, vector2<T>& u) {
4473 schultz::swap(v.x, u.x);
4474 schultz::swap(v.y, u.y);
4476 # 58 "/home/schultz/c/schultz/structure/vector2"
4477 inline bool operator ==(const vector2<T>& v) const {
4478 return x == v.x && y == v.y;
4480 inline bool operator !=(const vector2<T>& v) const {
4481 return !((*this) == v);
4483 # 80 "/home/schultz/c/schultz/structure/vector2"
4484 inline vector2<T>& operator +=(const vector2<T>& v) {
4489 inline vector2<T> operator +(const vector2<T>& v) const {
4490 return vector2<T>(x+v.x, y+v.y);
4494 inline vector2<T> operator -() const {
4495 return vector2<T>(-x, -y);
4499 inline vector2<T>& operator -=(const vector2<T>& v) {
4504 inline vector2<T> operator -(const vector2<T>& v) const {
4505 return vector2<T>(x-v.x, y-v.y);
4509 inline vector2<T>& operator *=(const T& a) {
4514 inline vector2<T> operator *(const T& a) const {
4515 return vector2<T>(x*a, y*a);
4517 inline vector2<T>& operator /=(const T& a) {
4522 inline vector2<T> operator /(const T& a) const {
4523 return vector2<T>(x/a, y/a);
4527 inline typeof(((typeof(((T)(*((T*)(0)))) * ((T)(*((T*)(0))))))(*((typeof(((T)(*((T*)(0)))) * ((T)(*((T*)(0)))))*)(0)))) + ((typeof(((T)(*((T*)(0)))) * ((T)(*((T*)(0))))))(*((typeof(((T)(*((T*)(0)))) * ((T)(*((T*)(0)))))*)(0))))) operator *(const vector2<T>& v) const {
4528 return x*v.x + y*v.y;
4538 inline vector2(const T& a, const T& b) : x(a), y(b) {}
4546 struct type_traits : public default_type_traits< vector2<T> > {
4548 trivial = schultz::type_traits<T>::trivial,
4549 trivial_constructor = schultz::type_traits<T>::trivial_constructor,
4550 trivial_copy = schultz::type_traits<T>::trivial_copy,
4551 trivial_destructor = schultz::type_traits<T>::trivial_destructor,
4553 special_swap = schultz::type_traits<T>::special_swap
4564 template<typename T> inline vector2<T> operator *(const T& a, const vector2<T>& v) {
4565 return vector2<T>(a*v.x, a*v.y);
4574 template<typename T> inline vector2<T> make_vector2(const T& x, const T& y) {
4575 return vector2<T>(x, y);
4580 # 1 "/home/schultz/c/schultz/structure/avl_tree" 1
4581 # 11 "/home/schultz/c/schultz/structure/avl_tree"
4583 # 27 "/home/schultz/c/schultz/structure/avl_tree"
4584 template<typename T, typename O = lessf<T>, typename ALLOC = default_allocation> struct avl_tree {
4586 # 44 "/home/schultz/c/schultz/structure/avl_tree"
4592 node *left, *right, *father;
4598 static void swap(node& m, node& n) {
4599 schultz::swap(m.elem, n.elem);
4600 schultz::swap(m.left, n.left);
4601 schultz::swap(m.right, n.right);
4602 schultz::swap(m.father, n.father);
4603 schultz::swap(m.balance, n.balance);
4607 struct type_traits : public default_type_traits<node> {
4609 trivial = schultz::type_traits<T>::trivial,
4610 trivial_constructor = schultz::type_traits<T>::trivial_constructor,
4611 trivial_copy = schultz::type_traits<T>::trivial_copy,
4612 trivial_destructor = schultz::type_traits<T>::trivial_destructor,
4614 special_swap = schultz::type_traits<T>::special_swap
4625 typedef allocation<node, ALLOC> _alloc;
4626 # 91 "/home/schultz/c/schultz/structure/avl_tree"
4628 # 101 "/home/schultz/c/schultz/structure/avl_tree"
4629 template<typename I> static pair<node*, nat> _assemble_aux(I a, I b) {
4632 node* n = (node*)ALLOC::allocate(sizeof(node));
4633 copy_construct(n->elem, *m);
4634 const pair<node*, nat> &p = _assemble_aux(a, m);
4635 const pair<node*, nat> &q = _assemble_aux(++m, b);
4638 if (n->left) n->left->father = n;
4639 if (n->right) n->right->father = n;
4640 n->balance = q.second - p.second;
4641 return make_pair(n, max(p.second, q.second)+1);
4643 else return pair<node*, nat>(0, 0);
4645 template<typename I> inline void _assemble(I a, I b) {
4647 _root = _assemble_aux(a, b).first;
4648 if (_root) _root->father = 0;
4650 # 134 "/home/schultz/c/schultz/structure/avl_tree"
4651 static void _clear_aux(node* n) {
4653 if (n->left) _clear_aux(n->left);
4654 if (n->right) _clear_aux(n->right);
4655 _alloc::deallocate_1(n);
4659 static node* _copy_aux(node* n) {
4661 node* m = (node*)ALLOC::allocate(sizeof(node));
4662 copy_construct(m->elem, n->elem);
4663 m->left = _copy_aux(n->left);
4664 m->right = _copy_aux(n->right);
4665 if (m->left) m->left->father = m;
4666 if (m->right) m->right->father = m;
4667 m->balance = n->balance;
4672 # 167 "/home/schultz/c/schultz/structure/avl_tree"
4673 static const node* _leftmost(const node* n) {
4675 while (n->left) n = n->left;
4678 static node* _leftmost(node* n) {
4680 while (n->left) n = n->left;
4685 static const node* _rightmost(const node* n) {
4687 while (n->right) n = n->right;
4690 static node* _rightmost(node* n) {
4692 while (n->right) n = n->right;
4695 # 209 "/home/schultz/c/schultz/structure/avl_tree"
4696 void _rotate_LL(node* b) {
4699 if (b->father) (b->father->left == b ? b->father->left : b->father->right) = a;
4701 a->father = b->father;
4703 if (a->right) a->right->father = b;
4706 if (a->balance == -1) {
4718 void _rotate_LR(node* c) {
4722 if (c->father) (c->father->left == c ? c->father->left : c->father->right) = b;
4724 b->father = c->father;
4727 if (b->left) b->left->father = a;
4730 if (b->right) b->right->father = c;
4733 a->balance = b->balance == 1 ? -1 : 0;
4734 c->balance = b->balance == -1 ? 1 : 0;
4739 void _rotate_RR(node* a) {
4742 if (a->father) (a->father->left == a ? a->father->left : a->father->right) = b;
4744 b->father = a->father;
4746 if (b->left) b->left->father = a;
4749 if (b->balance == 1) {
4761 void _rotate_RL(node* a) {
4765 if (a->father) (a->father->left == a ? a->father->left : a->father->right) = b;
4767 b->father = a->father;
4770 if (b->right) b->right->father = c;
4773 if (b->left) b->left->father = a;
4776 a->balance = b->balance == 1 ? -1 : 0;
4777 c->balance = b->balance == -1 ? 1 : 0;
4780 # 303 "/home/schultz/c/schultz/structure/avl_tree"
4781 void _grow_retrace(node* p) {
4784 if (p->father->left == p) --p->father->balance;
4785 else ++p->father->balance;
4788 if (p->balance == 0) break;
4789 else if (p->balance == -2) {
4791 if (p->left->balance != 1) _rotate_LL(p);
4795 else if (p->balance == 2) {
4797 if (p->right->balance != -1) _rotate_RR(p);
4806 void _shrink_retrace(node* p) {
4808 while (p->balance != -1 && p->balance != 1) {
4809 if (p->balance == -2) {
4810 int b = p->left->balance;
4823 else if (p->balance == 2) {
4824 int b = p->right->balance;
4839 if (p->father->left == p) ++p->father->balance;
4840 else --p->father->balance;
4853 inline bool empty() const {return _root == 0;}
4861 inline void clear() {
4867 # 397 "/home/schultz/c/schultz/structure/avl_tree"
4868 template<typename I> inline void copy(I a, I b) {
4879 inline avl_tree<T, ALLOC>& operator =(const avl_tree<T, ALLOC>& A) {
4882 _root = _copy_aux(A._root);
4883 if (_root) _root->father = 0;
4894 static inline void swap(avl_tree<T, ALLOC>& A, avl_tree<T, ALLOC>& B) {
4895 schultz::swap(A._root, B._root);
4897 # 439 "/home/schultz/c/schultz/structure/avl_tree"
4898 struct const_iterator {
4903 inline const T& operator *() const {
4907 inline const T* operator ->() const {
4911 inline const T& operator [](nat i) const {
4912 return *((*this)+i);
4916 inline bool operator ==(const_iterator i) const {
4919 inline bool operator !=(const_iterator i) const {
4920 return !((*this) == i);
4924 const_iterator& operator ++() {
4928 while (n->left) n = n->left;
4931 while (n->father && n->father->right == n) n = n->father;
4936 inline const_iterator operator ++(int) {
4937 const_iterator i = (*this);
4941 const_iterator& operator --() {
4945 while (n->right) n = n->right;
4948 while (n->father && n->father->left == n) n = n->father;
4953 inline const_iterator operator --(int) {
4954 const_iterator i = (*this);
4958 inline const_iterator& operator +=(nat n) {
4959 return advance((*this), n);
4961 inline const_iterator operator +(nat n) {
4962 const_iterator i = (*this);
4965 inline const_iterator& operator -=(nat n) {
4966 return step_back((*this), n);
4968 inline const_iterator operator -(nat n) {
4969 const_iterator i = (*this);
4972 inline nat operator -(const_iterator i) {
4973 return distance(i, (*this));
4977 inline const_iterator() {}
4978 explicit inline const_iterator(const node* p) : n(p) {}
4981 struct iterator_traits : public default_iterator_traits<const_iterator> {
4985 bidirectional = true,
4986 random_access = false
4989 typedef T value_type;
4993 struct type_traits : public iterator_type_traits<const_iterator> {};
5002 inline T& operator *() const {
5006 inline T* operator ->() const {
5010 inline T& operator [](nat i) const {
5011 return *((*this)+i);
5015 inline bool operator ==(iterator i) const {
5018 inline bool operator !=(iterator i) const {
5019 return !((*this) == i);
5023 iterator& operator ++() {
5027 while (n->left) n = n->left;
5030 while (n->father && n->father->right == n) n = n->father;
5035 inline iterator operator ++(int) {
5036 iterator i = (*this);
5040 iterator& operator --() {
5044 while (n->right) n = n->right;
5047 while (n->father && n->father->left == n) n = n->father;
5052 inline iterator operator --(int) {
5053 iterator i = (*this);
5057 inline iterator& operator +=(nat n) {
5058 return advance((*this), n);
5060 inline iterator operator +(nat n) {
5061 iterator i = (*this);
5064 inline iterator& operator -=(nat n) {
5065 return step_back((*this), n);
5067 inline iterator operator -(nat n) {
5068 iterator i = (*this);
5071 inline nat operator -(iterator i) {
5072 return distance(i, (*this));
5076 inline iterator() {}
5077 explicit inline iterator(node* p) : n(p) {}
5080 struct iterator_traits : public default_iterator_traits<iterator> {
5084 bidirectional = true,
5085 random_access = false
5088 typedef T value_type;
5092 struct type_traits : public iterator_type_traits<iterator> {};
5094 # 643 "/home/schultz/c/schultz/structure/avl_tree"
5095 inline const_iterator begin() const {return const_iterator(_root ? _leftmost(_root) : 0);}
5096 inline const_iterator end() const {return const_iterator(0);}
5097 inline iterator begin() {return iterator(_root ? _leftmost(_root) : 0);}
5098 inline iterator end() {return iterator(0);}
5099 # 661 "/home/schultz/c/schultz/structure/avl_tree"
5100 const_iterator find(const T& x) const {
5103 if (O()(x, p->elem)) p = p->left;
5104 else if (O()(p->elem, x)) p = p->right;
5105 else return const_iterator(p);
5109 iterator find(const T& x) {
5112 if (O()(x, p->elem)) p = p->left;
5113 else if (O()(p->elem, x)) p = p->right;
5114 else return iterator(p);
5120 inline bool contains(const T& x) const {
5121 return find(x) != end();
5123 # 692 "/home/schultz/c/schultz/structure/avl_tree"
5124 iterator insert(const T& x) {
5129 if (O()(x, p->elem)) p = p->left;
5132 p = (node*)ALLOC::allocate(sizeof(node));
5133 copy_construct(p->elem, x);
5135 p->left = p->right = 0;
5138 if (O()(x, q->elem)) q->left = p;
5152 void remove(iterator iter) {
5155 node* f = a->father;
5156 if (a->left == 0 || a->right == 0) {
5157 node* b = a->left == 0 ? a->right : a->left;
5169 if (b) b->father = f;
5170 _alloc::deallocate_1(a);
5171 if (f) _shrink_retrace(f);
5175 node* p = _rightmost(a->left);
5176 node* pf = p->father;
5178 if (pf->left == p) {
5184 pf->right = p->left;
5186 if (p->left) p->left->father = pf;
5188 if (f) (f->left == a ? f->left : f->right) = p;
5191 p->right = a->right;
5193 if (p->left) p->left->father = p;
5194 if (p->right) p->right->father = p;
5195 p->balance = a->balance;
5196 _alloc::deallocate_1(a);
5198 _shrink_retrace(pf == a ? p : pf);
5201 # 782 "/home/schultz/c/schultz/structure/avl_tree"
5202 inline avl_tree() : _root(0) {}
5203 inline avl_tree(const avl_tree<T, ALLOC>& A) {
5204 _root = _copy_aux(A._root);
5205 if (_root) _root->father = 0;
5207 template<typename I> inline avl_tree(I a, I b) : _root(0) {
5217 inline ~avl_tree() {clear();}
5218 # 806 "/home/schultz/c/schultz/structure/avl_tree"
5219 struct type_traits : public default_type_traits< avl_tree<T> > {
5229 using namespace schultz;
5235 vector2<flop> centre;
5241 vector2<flop> velocity;
5268 nat left, right, bottom, top;
5272 struct projcmpf : public binary_function<bool, const circle*, const circle*> {
5273 inline bool operator ()(const circle* C, const circle* D) const {
5274 return C->proj < D->proj;
5279 avl_tree<circle*, projcmpf>::iterator iter;
5283 inline void copy_projbase(circle& C) {
5286 velocity = C.velocity;
5293 struct type_traits : public default_type_traits<circle> {
5294 enum {trivial = true};
5304 inline void move(circle& C, flop dt) {
5306 C.centre+= dt*C.velocity;
5309 extern flop proj(const circle&, const circle&);
5312 extern flop proj(const circle&, vector2<flop>);
5320 extern void coll(circle&, circle&);
5323 # 1 "/home/schultz/c/schultz/language/undef_keywords" 1
5324 # 152 "src/circle" 2
5325 # 2 "src/circle.c++" 2
5327 # 1 "/usr/include/math.h" 1 3 4
5328 # 30 "/usr/include/math.h" 3 4
5333 # 1 "/usr/include/bits/huge_val.h" 1 3 4
5334 # 35 "/usr/include/math.h" 2 3 4
5336 # 1 "/usr/include/bits/huge_valf.h" 1 3 4
5337 # 37 "/usr/include/math.h" 2 3 4
5338 # 1 "/usr/include/bits/huge_vall.h" 1 3 4
5339 # 38 "/usr/include/math.h" 2 3 4
5342 # 1 "/usr/include/bits/inf.h" 1 3 4
5343 # 41 "/usr/include/math.h" 2 3 4
5346 # 1 "/usr/include/bits/nan.h" 1 3 4
5347 # 44 "/usr/include/math.h" 2 3 4
5351 # 1 "/usr/include/bits/mathdef.h" 1 3 4
5352 # 36 "/usr/include/bits/mathdef.h" 3 4
5353 typedef long double float_t;
5355 typedef long double double_t;
5356 # 48 "/usr/include/math.h" 2 3 4
5357 # 71 "/usr/include/math.h" 3 4
5358 # 1 "/usr/include/bits/mathcalls.h" 1 3 4
5359 # 53 "/usr/include/bits/mathcalls.h" 3 4
5362 extern double acos (double __x) throw (); extern double __acos (double __x) throw ();
5364 extern double asin (double __x) throw (); extern double __asin (double __x) throw ();
5366 extern double atan (double __x) throw (); extern double __atan (double __x) throw ();
5368 extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw ();
5371 extern double cos (double __x) throw (); extern double __cos (double __x) throw ();
5373 extern double sin (double __x) throw (); extern double __sin (double __x) throw ();
5375 extern double tan (double __x) throw (); extern double __tan (double __x) throw ();
5380 extern double cosh (double __x) throw (); extern double __cosh (double __x) throw ();
5382 extern double sinh (double __x) throw (); extern double __sinh (double __x) throw ();
5384 extern double tanh (double __x) throw (); extern double __tanh (double __x) throw ();
5389 extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw ();
5396 extern double acosh (double __x) throw (); extern double __acosh (double __x) throw ();
5398 extern double asinh (double __x) throw (); extern double __asinh (double __x) throw ();
5400 extern double atanh (double __x) throw (); extern double __atanh (double __x) throw ();
5408 extern double exp (double __x) throw (); extern double __exp (double __x) throw ();
5411 extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw ();
5414 extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw ();
5417 extern double log (double __x) throw (); extern double __log (double __x) throw ();
5420 extern double log10 (double __x) throw (); extern double __log10 (double __x) throw ();
5423 extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw ();
5428 extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw ();
5430 extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw ();
5436 extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw ();
5439 extern double log1p (double __x) throw (); extern double __log1p (double __x) throw ();
5442 extern double logb (double __x) throw (); extern double __logb (double __x) throw ();
5449 extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw ();
5452 extern double log2 (double __x) throw (); extern double __log2 (double __x) throw ();
5461 extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw ();
5464 extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw ();
5470 extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw ();
5477 extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw ();
5486 extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__));
5489 extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__));
5492 extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__));
5495 extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw ();
5500 extern int __isinf (double __value) throw () __attribute__ ((__const__));
5503 extern int __finite (double __value) throw () __attribute__ ((__const__));
5509 extern int isinf (double __value) throw () __attribute__ ((__const__));
5512 extern int finite (double __value) throw () __attribute__ ((__const__));
5515 extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw ();
5519 extern double significand (double __x) throw (); extern double __significand (double __x) throw ();
5525 extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__));
5532 extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__));
5538 extern int __isnan (double __value) throw () __attribute__ ((__const__));
5542 extern int isnan (double __value) throw () __attribute__ ((__const__));
5545 extern double j0 (double) throw (); extern double __j0 (double) throw ();
5546 extern double j1 (double) throw (); extern double __j1 (double) throw ();
5547 extern double jn (int, double) throw (); extern double __jn (int, double) throw ();
5548 extern double y0 (double) throw (); extern double __y0 (double) throw ();
5549 extern double y1 (double) throw (); extern double __y1 (double) throw ();
5550 extern double yn (int, double) throw (); extern double __yn (int, double) throw ();
5557 extern double erf (double) throw (); extern double __erf (double) throw ();
5558 extern double erfc (double) throw (); extern double __erfc (double) throw ();
5559 extern double lgamma (double) throw (); extern double __lgamma (double) throw ();
5566 extern double tgamma (double) throw (); extern double __tgamma (double) throw ();
5572 extern double gamma (double) throw (); extern double __gamma (double) throw ();
5579 extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw ();
5587 extern double rint (double __x) throw (); extern double __rint (double __x) throw ();
5590 extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__));
5592 extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__));
5596 extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw ();
5600 extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw ();
5604 extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw ();
5609 extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw ();
5613 extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw ();
5617 extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__));
5621 extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__));
5626 extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw ();
5633 extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw ();
5634 extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw ();
5638 extern long int lround (double __x) throw (); extern long int __lround (double __x) throw ();
5639 extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw ();
5643 extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw ();
5646 extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw ();
5649 extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw ();
5653 extern int __fpclassify (double __value) throw ()
5654 __attribute__ ((__const__));
5657 extern int __signbit (double __value) throw ()
5658 __attribute__ ((__const__));
5662 extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw ();
5671 extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw ();
5672 # 72 "/usr/include/math.h" 2 3 4
5673 # 94 "/usr/include/math.h" 3 4
5674 # 1 "/usr/include/bits/mathcalls.h" 1 3 4
5675 # 53 "/usr/include/bits/mathcalls.h" 3 4
5678 extern float acosf (float __x) throw (); extern float __acosf (float __x) throw ();
5680 extern float asinf (float __x) throw (); extern float __asinf (float __x) throw ();
5682 extern float atanf (float __x) throw (); extern float __atanf (float __x) throw ();
5684 extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw ();
5687 extern float cosf (float __x) throw (); extern float __cosf (float __x) throw ();
5689 extern float sinf (float __x) throw (); extern float __sinf (float __x) throw ();
5691 extern float tanf (float __x) throw (); extern float __tanf (float __x) throw ();
5696 extern float coshf (float __x) throw (); extern float __coshf (float __x) throw ();
5698 extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw ();
5700 extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw ();
5705 extern void sincosf (float __x, float *__sinx, float *__cosx) throw (); extern void __sincosf (float __x, float *__sinx, float *__cosx) throw ();
5712 extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw ();
5714 extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw ();
5716 extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw ();
5724 extern float expf (float __x) throw (); extern float __expf (float __x) throw ();
5727 extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw ();
5730 extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw ();
5733 extern float logf (float __x) throw (); extern float __logf (float __x) throw ();
5736 extern float log10f (float __x) throw (); extern float __log10f (float __x) throw ();
5739 extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw ();
5744 extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw ();
5746 extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw ();
5752 extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw ();
5755 extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw ();
5758 extern float logbf (float __x) throw (); extern float __logbf (float __x) throw ();
5765 extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw ();
5768 extern float log2f (float __x) throw (); extern float __log2f (float __x) throw ();
5777 extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw ();
5780 extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw ();
5786 extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw ();
5793 extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw ();
5802 extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__));
5805 extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__));
5808 extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__));
5811 extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw ();
5816 extern int __isinff (float __value) throw () __attribute__ ((__const__));
5819 extern int __finitef (float __value) throw () __attribute__ ((__const__));
5825 extern int isinff (float __value) throw () __attribute__ ((__const__));
5828 extern int finitef (float __value) throw () __attribute__ ((__const__));
5831 extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw ();
5835 extern float significandf (float __x) throw (); extern float __significandf (float __x) throw ();
5841 extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__));
5848 extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__));
5854 extern int __isnanf (float __value) throw () __attribute__ ((__const__));
5858 extern int isnanf (float __value) throw () __attribute__ ((__const__));
5861 extern float j0f (float) throw (); extern float __j0f (float) throw ();
5862 extern float j1f (float) throw (); extern float __j1f (float) throw ();
5863 extern float jnf (int, float) throw (); extern float __jnf (int, float) throw ();
5864 extern float y0f (float) throw (); extern float __y0f (float) throw ();
5865 extern float y1f (float) throw (); extern float __y1f (float) throw ();
5866 extern float ynf (int, float) throw (); extern float __ynf (int, float) throw ();
5873 extern float erff (float) throw (); extern float __erff (float) throw ();
5874 extern float erfcf (float) throw (); extern float __erfcf (float) throw ();
5875 extern float lgammaf (float) throw (); extern float __lgammaf (float) throw ();
5882 extern float tgammaf (float) throw (); extern float __tgammaf (float) throw ();
5888 extern float gammaf (float) throw (); extern float __gammaf (float) throw ();
5895 extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw ();
5903 extern float rintf (float __x) throw (); extern float __rintf (float __x) throw ();
5906 extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__));
5908 extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__));
5912 extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw ();
5916 extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw ();
5920 extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw ();
5925 extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw ();
5929 extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw ();
5933 extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__));
5937 extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__));
5942 extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw ();
5949 extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw ();
5950 extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw ();
5954 extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw ();
5955 extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw ();
5959 extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw ();
5962 extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw ();
5965 extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw ();
5969 extern int __fpclassifyf (float __value) throw ()
5970 __attribute__ ((__const__));
5973 extern int __signbitf (float __value) throw ()
5974 __attribute__ ((__const__));
5978 extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw ();
5987 extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw ();
5988 # 95 "/usr/include/math.h" 2 3 4
5989 # 141 "/usr/include/math.h" 3 4
5990 # 1 "/usr/include/bits/mathcalls.h" 1 3 4
5991 # 53 "/usr/include/bits/mathcalls.h" 3 4
5994 extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw ();
5996 extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw ();
5998 extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw ();
6000 extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw ();
6003 extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw ();
6005 extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw ();
6007 extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw ();
6012 extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw ();
6014 extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw ();
6016 extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw ();
6021 extern void sincosl (long double __x, long double *__sinx, long double *__cosx) throw (); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) throw ();
6028 extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw ();
6030 extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw ();
6032 extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw ();
6040 extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw ();
6043 extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw ();
6046 extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw ();
6049 extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw ();
6052 extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw ();
6055 extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw ();
6060 extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw ();
6062 extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw ();
6068 extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw ();
6071 extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw ();
6074 extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw ();
6081 extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw ();
6084 extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw ();
6093 extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw ();
6096 extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw ();
6102 extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw ();
6109 extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw ();
6118 extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__));
6121 extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__));
6124 extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__));
6127 extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw ();
6132 extern int __isinfl (long double __value) throw () __attribute__ ((__const__));
6135 extern int __finitel (long double __value) throw () __attribute__ ((__const__));
6141 extern int isinfl (long double __value) throw () __attribute__ ((__const__));
6144 extern int finitel (long double __value) throw () __attribute__ ((__const__));
6147 extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw ();
6151 extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw ();
6157 extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__));
6164 extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__));
6170 extern int __isnanl (long double __value) throw () __attribute__ ((__const__));
6174 extern int isnanl (long double __value) throw () __attribute__ ((__const__));
6177 extern long double j0l (long double) throw (); extern long double __j0l (long double) throw ();
6178 extern long double j1l (long double) throw (); extern long double __j1l (long double) throw ();
6179 extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw ();
6180 extern long double y0l (long double) throw (); extern long double __y0l (long double) throw ();
6181 extern long double y1l (long double) throw (); extern long double __y1l (long double) throw ();
6182 extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw ();
6189 extern long double erfl (long double) throw (); extern long double __erfl (long double) throw ();
6190 extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw ();
6191 extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw ();
6198 extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw ();
6204 extern long double gammal (long double) throw (); extern long double __gammal (long double) throw ();
6211 extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw ();
6219 extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw ();
6222 extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__));
6224 extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__));
6228 extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw ();
6232 extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw ();
6236 extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw ();
6241 extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw ();
6245 extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw ();
6249 extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__));
6253 extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__));
6258 extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw ();
6265 extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw ();
6266 extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw ();
6270 extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw ();
6271 extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw ();
6275 extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw ();
6278 extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw ();
6281 extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw ();
6285 extern int __fpclassifyl (long double __value) throw ()
6286 __attribute__ ((__const__));
6289 extern int __signbitl (long double __value) throw ()
6290 __attribute__ ((__const__));
6294 extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw ();
6303 extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw ();
6304 # 142 "/usr/include/math.h" 2 3 4
6305 # 157 "/usr/include/math.h" 3 4
6307 # 198 "/usr/include/math.h" 3 4
6321 # 284 "/usr/include/math.h" 3 4
6329 } _LIB_VERSION_TYPE;
6334 extern _LIB_VERSION_TYPE _LIB_VERSION;
6335 # 307 "/usr/include/math.h" 3 4
6349 extern int matherr (struct __exception *__exc) throw ();
6350 # 409 "/usr/include/math.h" 3 4
6351 # 1 "/usr/include/bits/mathinline.h" 1 3 4
6352 # 127 "/usr/include/bits/mathinline.h" 3 4
6354 __signbitf (float __x) throw ()
6356 __extension__ union { float __f; int __i; } __u = { __f: __x };
6360 __signbit (double __x) throw ()
6362 __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
6363 return __u.__i[1] < 0;
6366 __signbitl (long double __x) throw ()
6368 __extension__ union { long double __l; int __i[3]; } __u = { __l: __x };
6369 return (__u.__i[2] & 0x8000) != 0;
6371 # 291 "/usr/include/bits/mathinline.h" 3 4
6372 __inline double __sgn (double) throw (); __inline double __sgn (double __x) throw () { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); } __inline float __sgnf (float) throw (); __inline float __sgnf (float __x) throw () { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); } __inline long double __sgnl (long double) throw (); __inline long double __sgnl (long double __x) throw () { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); }
6373 # 433 "/usr/include/bits/mathinline.h" 3 4
6374 __inline long double __atan2l (long double __y, long double __x) throw () { return __builtin_atan2l (__y, __x); }
6375 # 473 "/usr/include/bits/mathinline.h" 3 4
6376 __inline double fabs (double __x) throw () { return __builtin_fabs (__x); }
6378 __inline float fabsf (float __x) throw () { return __builtin_fabsf (__x); }
6379 __inline long double fabsl (long double __x) throw () { return __builtin_fabsl (__x); }
6381 __inline long double __fabsl (long double __x) throw () { return __builtin_fabsl (__x); }
6382 # 506 "/usr/include/bits/mathinline.h" 3 4
6383 __inline long double __sgn1l (long double) throw (); __inline long double __sgn1l (long double __x) throw () { __extension__ union { long double __xld; unsigned int __xi[3]; } __n = { __xld: __x }; __n.__xi[2] = (__n.__xi[2] & 0x8000) | 0x3fff; __n.__xi[1] = 0x80000000; __n.__xi[0] = 0; return __n.__xld; }
6384 # 530 "/usr/include/bits/mathinline.h" 3 4
6385 __inline double floor (double __x) throw () { register long double __value; register int __ignore; unsigned short int __cw; unsigned short int __cwtmp; __asm __volatile ("fnstcw %3\n\t" "movzwl %3, %1\n\t" "andl $0xf3ff, %1\n\t" "orl $0x0400, %1\n\t" "movw %w1, %2\n\t" "fldcw %2\n\t" "frndint\n\t" "fldcw %3" : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), "=m" (__cw) : "0" (__x)); return __value; } __inline float floorf (float __x) throw () { register long double __value; register int __ignore; unsigned short int __cw; unsigned short int __cwtmp; __asm __volatile ("fnstcw %3\n\t" "movzwl %3, %1\n\t" "andl $0xf3ff, %1\n\t" "orl $0x0400, %1\n\t" "movw %w1, %2\n\t" "fldcw %2\n\t" "frndint\n\t" "fldcw %3" : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), "=m" (__cw) : "0" (__x)); return __value; } __inline long double floorl (long double __x) throw () { register long double __value; register int __ignore; unsigned short int __cw; unsigned short int __cwtmp; __asm __volatile ("fnstcw %3\n\t" "movzwl %3, %1\n\t" "andl $0xf3ff, %1\n\t" "orl $0x0400, %1\n\t" "movw %w1, %2\n\t" "fldcw %2\n\t" "frndint\n\t" "fldcw %3" : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), "=m" (__cw) : "0" (__x)); return __value; }
6386 # 548 "/usr/include/bits/mathinline.h" 3 4
6387 __inline double ceil (double __x) throw () { register long double __value; register int __ignore; unsigned short int __cw; unsigned short int __cwtmp; __asm __volatile ("fnstcw %3\n\t" "movzwl %3, %1\n\t" "andl $0xf3ff, %1\n\t" "orl $0x0800, %1\n\t" "movw %w1, %2\n\t" "fldcw %2\n\t" "frndint\n\t" "fldcw %3" : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), "=m" (__cw) : "0" (__x)); return __value; } __inline float ceilf (float __x) throw () { register long double __value; register int __ignore; unsigned short int __cw; unsigned short int __cwtmp; __asm __volatile ("fnstcw %3\n\t" "movzwl %3, %1\n\t" "andl $0xf3ff, %1\n\t" "orl $0x0800, %1\n\t" "movw %w1, %2\n\t" "fldcw %2\n\t" "frndint\n\t" "fldcw %3" : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), "=m" (__cw) : "0" (__x)); return __value; } __inline long double ceill (long double __x) throw () { register long double __value; register int __ignore; unsigned short int __cw; unsigned short int __cwtmp; __asm __volatile ("fnstcw %3\n\t" "movzwl %3, %1\n\t" "andl $0xf3ff, %1\n\t" "orl $0x0800, %1\n\t" "movw %w1, %2\n\t" "fldcw %2\n\t" "frndint\n\t" "fldcw %3" : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), "=m" (__cw) : "0" (__x)); return __value; }
6388 # 667 "/usr/include/bits/mathinline.h" 3 4
6390 lrintf (float __x) throw ()
6392 long int __lrintres; __asm__ __volatile__ ("fistpl %0" : "=m" (__lrintres) : "t" (__x) : "st"); return __lrintres;
6395 lrint (double __x) throw ()
6397 long int __lrintres; __asm__ __volatile__ ("fistpl %0" : "=m" (__lrintres) : "t" (__x) : "st"); return __lrintres;
6400 lrintl (long double __x) throw ()
6402 long int __lrintres; __asm__ __volatile__ ("fistpl %0" : "=m" (__lrintres) : "t" (__x) : "st"); return __lrintres;
6404 # 690 "/usr/include/bits/mathinline.h" 3 4
6405 __inline long long int
6406 llrintf (float __x) throw ()
6408 long long int __llrintres; __asm__ __volatile__ ("fistpll %0" : "=m" (__llrintres) : "t" (__x) : "st"); return __llrintres;
6410 __inline long long int
6411 llrint (double __x) throw ()
6413 long long int __llrintres; __asm__ __volatile__ ("fistpll %0" : "=m" (__llrintres) : "t" (__x) : "st"); return __llrintres;
6415 __inline long long int
6416 llrintl (long double __x) throw ()
6418 long long int __llrintres; __asm__ __volatile__ ("fistpll %0" : "=m" (__llrintres) : "t" (__x) : "st"); return __llrintres;
6420 # 727 "/usr/include/bits/mathinline.h" 3 4
6422 __finite (double __x) throw ()
6424 return (__extension__
6425 (((((union { double __d; int __i[2]; }) {__d: __x}).__i[1]
6426 | 0x800fffffu) + 1) >> 31));
6428 # 410 "/usr/include/math.h" 2 3 4
6429 # 465 "/usr/include/math.h" 3 4
6431 # 4 "src/circle.c++" 2
6433 # 1 "/home/schultz/c/schultz/language/keywords" 1
6434 # 6 "src/circle.c++" 2
6442 flop proj(const circle& C, const circle& D) {
6443 vector2<flop> dc = D.centre - C.centre;
6444 vector2<flop> dv = D.velocity - C.velocity;
6445 flop c = square(dv);
6447 flop a = square(dc) - square(C.radius + D.radius);
6448 flop b = flop(2)*dc*dv;
6449 flop d = square(b) - 4*a*c;
6452 flop t0 = (-b-d)/(2*c), t1 = (-b+d)/(2*c);
6453 if ((t0 >= 0 && t1 >= 0) && (t0 > 0 || t1 > 0)) {
6454 flop t = min(t0, t1);
6460 return (__builtin_inff());
6464 flop proj(const circle& C, vector2<flop> P) {
6465 vector2<flop> dc = P - C.centre;
6466 flop c = square(C.velocity);
6468 flop a = square(dc) - square(C.radius);
6469 flop b = -flop(2)*dc*C.velocity;
6470 flop d = square(b)-4*a*c;
6473 flop t0 = (-b-d)/(2*c), t1 = (-b+d)/(2*c);
6474 if ((t0 >= 0 && t1 >= 0) && (t0 > 0 || t1 > 0)) {
6475 flop t = min(t0, t1);
6481 return (__builtin_inff());
6488 void coll(circle& C, circle& D) {
6489 vector2<flop> dc = D.centre - C.centre;
6490 vector2<flop> dv = D.velocity - C.velocity;
6491 flop w = flop(2)*dc*dv/(square(dc)*(C.mass + D.mass));
6493 C.velocity+= dc * D.mass * w;
6494 D.velocity-= dc * C.mass * w;