// /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 # 1 "src/circle.c++" # 1 "/home/schultz/c/khaos//" # 1 "" # 1 "" # 1 "src/circle.c++" # 1 "src/circle" 1 # 11 "src/circle" # 1 "/home/schultz/c/schultz/schultz" 1 # 10 "/home/schultz/c/schultz/schultz" # 1 "/usr/include/stdio.h" 1 3 4 # 28 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 # 322 "/usr/include/features.h" 3 4 # 1 "/usr/include/sys/cdefs.h" 1 3 4 # 324 "/usr/include/sys/cdefs.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 325 "/usr/include/sys/cdefs.h" 2 3 4 # 323 "/usr/include/features.h" 2 3 4 # 345 "/usr/include/features.h" 3 4 # 1 "/usr/include/gnu/stubs.h" 1 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 5 "/usr/include/gnu/stubs.h" 2 3 4 # 1 "/usr/include/gnu/stubs-32.h" 1 3 4 # 8 "/usr/include/gnu/stubs.h" 2 3 4 # 346 "/usr/include/features.h" 2 3 4 # 29 "/usr/include/stdio.h" 2 3 4 extern "C" { # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 214 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 typedef unsigned int size_t; # 35 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/bits/types.h" 1 3 4 # 28 "/usr/include/bits/types.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 29 "/usr/include/bits/types.h" 2 3 4 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 32 "/usr/include/bits/types.h" 2 3 4 typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long; typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; __extension__ typedef signed long long int __int64_t; __extension__ typedef unsigned long long int __uint64_t; __extension__ typedef long long int __quad_t; __extension__ typedef unsigned long long int __u_quad_t; # 134 "/usr/include/bits/types.h" 3 4 # 1 "/usr/include/bits/typesizes.h" 1 3 4 # 135 "/usr/include/bits/types.h" 2 3 4 __extension__ typedef __u_quad_t __dev_t; __extension__ typedef unsigned int __uid_t; __extension__ typedef unsigned int __gid_t; __extension__ typedef unsigned long int __ino_t; __extension__ typedef __u_quad_t __ino64_t; __extension__ typedef unsigned int __mode_t; __extension__ typedef unsigned int __nlink_t; __extension__ typedef long int __off_t; __extension__ typedef __quad_t __off64_t; __extension__ typedef int __pid_t; __extension__ typedef struct { int __val[2]; } __fsid_t; __extension__ typedef long int __clock_t; __extension__ typedef unsigned long int __rlim_t; __extension__ typedef __u_quad_t __rlim64_t; __extension__ typedef unsigned int __id_t; __extension__ typedef long int __time_t; __extension__ typedef unsigned int __useconds_t; __extension__ typedef long int __suseconds_t; __extension__ typedef int __daddr_t; __extension__ typedef long int __swblk_t; __extension__ typedef int __key_t; __extension__ typedef int __clockid_t; __extension__ typedef void * __timer_t; __extension__ typedef long int __blksize_t; __extension__ typedef long int __blkcnt_t; __extension__ typedef __quad_t __blkcnt64_t; __extension__ typedef unsigned long int __fsblkcnt_t; __extension__ typedef __u_quad_t __fsblkcnt64_t; __extension__ typedef unsigned long int __fsfilcnt_t; __extension__ typedef __u_quad_t __fsfilcnt64_t; __extension__ typedef int __ssize_t; typedef __off64_t __loff_t; typedef __quad_t *__qaddr_t; typedef char *__caddr_t; __extension__ typedef int __intptr_t; __extension__ typedef unsigned int __socklen_t; # 37 "/usr/include/stdio.h" 2 3 4 # 45 "/usr/include/stdio.h" 3 4 struct _IO_FILE; typedef struct _IO_FILE FILE; # 65 "/usr/include/stdio.h" 3 4 typedef struct _IO_FILE __FILE; # 75 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/libio.h" 1 3 4 # 32 "/usr/include/libio.h" 3 4 # 1 "/usr/include/_G_config.h" 1 3 4 # 14 "/usr/include/_G_config.h" 3 4 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 355 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 typedef unsigned int wint_t; # 15 "/usr/include/_G_config.h" 2 3 4 # 24 "/usr/include/_G_config.h" 3 4 # 1 "/usr/include/wchar.h" 1 3 4 # 48 "/usr/include/wchar.h" 3 4 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 49 "/usr/include/wchar.h" 2 3 4 # 1 "/usr/include/bits/wchar.h" 1 3 4 # 51 "/usr/include/wchar.h" 2 3 4 # 76 "/usr/include/wchar.h" 3 4 typedef struct { int __count; union { wint_t __wch; char __wchb[4]; } __value; } __mbstate_t; # 25 "/usr/include/_G_config.h" 2 3 4 typedef struct { __off_t __pos; __mbstate_t __state; } _G_fpos_t; typedef struct { __off64_t __pos; __mbstate_t __state; } _G_fpos64_t; # 44 "/usr/include/_G_config.h" 3 4 # 1 "/usr/include/gconv.h" 1 3 4 # 28 "/usr/include/gconv.h" 3 4 # 1 "/usr/include/wchar.h" 1 3 4 # 48 "/usr/include/wchar.h" 3 4 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 49 "/usr/include/wchar.h" 2 3 4 # 29 "/usr/include/gconv.h" 2 3 4 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 32 "/usr/include/gconv.h" 2 3 4 enum { __GCONV_OK = 0, __GCONV_NOCONV, __GCONV_NODB, __GCONV_NOMEM, __GCONV_EMPTY_INPUT, __GCONV_FULL_OUTPUT, __GCONV_ILLEGAL_INPUT, __GCONV_INCOMPLETE_INPUT, __GCONV_ILLEGAL_DESCRIPTOR, __GCONV_INTERNAL_ERROR }; enum { __GCONV_IS_LAST = 0x0001, __GCONV_IGNORE_ERRORS = 0x0002 }; struct __gconv_step; struct __gconv_step_data; struct __gconv_loaded_object; struct __gconv_trans_data; typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *, __const unsigned char **, __const unsigned char *, unsigned char **, size_t *, int, int); typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char); typedef int (*__gconv_init_fct) (struct __gconv_step *); typedef void (*__gconv_end_fct) (struct __gconv_step *); typedef int (*__gconv_trans_fct) (struct __gconv_step *, struct __gconv_step_data *, void *, __const unsigned char *, __const unsigned char **, __const unsigned char *, unsigned char **, size_t *); typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *, __const unsigned char *, unsigned char *, unsigned char *); typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***, size_t *); typedef int (*__gconv_trans_init_fct) (void **, const char *); typedef void (*__gconv_trans_end_fct) (void *); struct __gconv_trans_data { __gconv_trans_fct __trans_fct; __gconv_trans_context_fct __trans_context_fct; __gconv_trans_end_fct __trans_end_fct; void *__data; struct __gconv_trans_data *__next; }; struct __gconv_step { struct __gconv_loaded_object *__shlib_handle; __const char *__modname; int __counter; char *__from_name; char *__to_name; __gconv_fct __fct; __gconv_btowc_fct __btowc_fct; __gconv_init_fct __init_fct; __gconv_end_fct __end_fct; int __min_needed_from; int __max_needed_from; int __min_needed_to; int __max_needed_to; int __stateful; void *__data; }; struct __gconv_step_data { unsigned char *__outbuf; unsigned char *__outbufend; int __flags; int __invocation_counter; int __internal_use; __mbstate_t *__statep; __mbstate_t __state; struct __gconv_trans_data *__trans; }; typedef struct __gconv_info { size_t __nsteps; struct __gconv_step *__steps; __extension__ struct __gconv_step_data __data []; } *__gconv_t; # 45 "/usr/include/_G_config.h" 2 3 4 typedef union { struct __gconv_info __cd; struct { struct __gconv_info __cd; struct __gconv_step_data __data; } __combined; } _G_iconv_t; typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); # 33 "/usr/include/libio.h" 2 3 4 # 53 "/usr/include/libio.h" 3 4 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stdarg.h" 1 3 4 # 43 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stdarg.h" 3 4 typedef __builtin_va_list __gnuc_va_list; # 54 "/usr/include/libio.h" 2 3 4 # 167 "/usr/include/libio.h" 3 4 struct _IO_jump_t; struct _IO_FILE; # 177 "/usr/include/libio.h" 3 4 typedef void _IO_lock_t; struct _IO_marker { struct _IO_marker *_next; struct _IO_FILE *_sbuf; int _pos; # 200 "/usr/include/libio.h" 3 4 }; enum __codecvt_result { __codecvt_ok, __codecvt_partial, __codecvt_error, __codecvt_noconv }; # 268 "/usr/include/libio.h" 3 4 struct _IO_FILE { int _flags; char* _IO_read_ptr; char* _IO_read_end; char* _IO_read_base; char* _IO_write_base; char* _IO_write_ptr; char* _IO_write_end; char* _IO_buf_base; char* _IO_buf_end; char *_IO_save_base; char *_IO_backup_base; char *_IO_save_end; struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _flags2; __off_t _old_offset; unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; _IO_lock_t *_lock; # 316 "/usr/include/libio.h" 3 4 __off64_t _offset; # 325 "/usr/include/libio.h" 3 4 void *__pad1; void *__pad2; void *__pad3; void *__pad4; size_t __pad5; int _mode; char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; }; struct _IO_FILE_plus; extern struct _IO_FILE_plus _IO_2_1_stdin_; extern struct _IO_FILE_plus _IO_2_1_stdout_; extern struct _IO_FILE_plus _IO_2_1_stderr_; # 361 "/usr/include/libio.h" 3 4 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, size_t __n); typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); typedef int __io_close_fn (void *__cookie); typedef __io_read_fn cookie_read_function_t; typedef __io_write_fn cookie_write_function_t; typedef __io_seek_fn cookie_seek_function_t; typedef __io_close_fn cookie_close_function_t; typedef struct { __io_read_fn *read; __io_write_fn *write; __io_seek_fn *seek; __io_close_fn *close; } _IO_cookie_io_functions_t; typedef _IO_cookie_io_functions_t cookie_io_functions_t; struct _IO_cookie_file; extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, void *__cookie, _IO_cookie_io_functions_t __fns); extern "C" { extern int __underflow (_IO_FILE *); extern int __uflow (_IO_FILE *); extern int __overflow (_IO_FILE *, int); extern wint_t __wunderflow (_IO_FILE *); extern wint_t __wuflow (_IO_FILE *); extern wint_t __woverflow (_IO_FILE *, wint_t); # 451 "/usr/include/libio.h" 3 4 extern int _IO_getc (_IO_FILE *__fp); extern int _IO_putc (int __c, _IO_FILE *__fp); extern int _IO_feof (_IO_FILE *__fp) throw (); extern int _IO_ferror (_IO_FILE *__fp) throw (); extern int _IO_peekc_locked (_IO_FILE *__fp); extern void _IO_flockfile (_IO_FILE *) throw (); extern void _IO_funlockfile (_IO_FILE *) throw (); extern int _IO_ftrylockfile (_IO_FILE *) throw (); # 481 "/usr/include/libio.h" 3 4 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, __gnuc_va_list, int *__restrict); extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, __gnuc_va_list); extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); extern void _IO_free_backup_area (_IO_FILE *) throw (); # 543 "/usr/include/libio.h" 3 4 } # 76 "/usr/include/stdio.h" 2 3 4 typedef __gnuc_va_list va_list; # 89 "/usr/include/stdio.h" 3 4 typedef _G_fpos_t fpos_t; typedef _G_fpos64_t fpos64_t; # 141 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 # 142 "/usr/include/stdio.h" 2 3 4 extern struct _IO_FILE *stdin; extern struct _IO_FILE *stdout; extern struct _IO_FILE *stderr; extern int remove (__const char *__filename) throw (); extern int rename (__const char *__old, __const char *__new) throw (); extern int renameat (int __oldfd, __const char *__old, int __newfd, __const char *__new) throw (); extern FILE *tmpfile (void) ; # 182 "/usr/include/stdio.h" 3 4 extern FILE *tmpfile64 (void) ; extern char *tmpnam (char *__s) throw () ; extern char *tmpnam_r (char *__s) throw () ; # 204 "/usr/include/stdio.h" 3 4 extern char *tempnam (__const char *__dir, __const char *__pfx) throw () __attribute__ ((__malloc__)) ; extern int fclose (FILE *__stream); extern int fflush (FILE *__stream); # 229 "/usr/include/stdio.h" 3 4 extern int fflush_unlocked (FILE *__stream); # 239 "/usr/include/stdio.h" 3 4 extern int fcloseall (void); extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes) ; extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) ; # 272 "/usr/include/stdio.h" 3 4 extern FILE *fopen64 (__const char *__restrict __filename, __const char *__restrict __modes) ; extern FILE *freopen64 (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) ; extern FILE *fdopen (int __fd, __const char *__modes) throw () ; extern FILE *fopencookie (void *__restrict __magic_cookie, __const char *__restrict __modes, _IO_cookie_io_functions_t __io_funcs) throw () ; extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) throw () ; extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () ; extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) throw (); extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) throw (); extern void setlinebuf (FILE *__stream) throw (); extern int fprintf (FILE *__restrict __stream, __const char *__restrict __format, ...); extern int printf (__const char *__restrict __format, ...); extern int sprintf (char *__restrict __s, __const char *__restrict __format, ...) throw (); extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg); extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); extern int vsprintf (char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) throw (); extern int snprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 3, 0))); extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 2, 0))) ; extern int __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))) ; extern int asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))) ; extern int vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 2, 0))); extern int dprintf (int __fd, __const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); extern int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) ; extern int scanf (__const char *__restrict __format, ...) ; extern int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) throw (); extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 2, 0))) ; extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))) ; extern int vsscanf (__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__scanf__, 2, 0))); extern int fgetc (FILE *__stream); extern int getc (FILE *__stream); extern int getchar (void); # 464 "/usr/include/stdio.h" 3 4 extern int getc_unlocked (FILE *__stream); extern int getchar_unlocked (void); # 475 "/usr/include/stdio.h" 3 4 extern int fgetc_unlocked (FILE *__stream); extern int fputc (int __c, FILE *__stream); extern int putc (int __c, FILE *__stream); extern int putchar (int __c); # 508 "/usr/include/stdio.h" 3 4 extern int fputc_unlocked (int __c, FILE *__stream); extern int putc_unlocked (int __c, FILE *__stream); extern int putchar_unlocked (int __c); extern int getw (FILE *__stream); extern int putw (int __w, FILE *__stream); extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) ; extern char *gets (char *__s) ; # 554 "/usr/include/stdio.h" 3 4 extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) ; # 570 "/usr/include/stdio.h" 3 4 extern __ssize_t __getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) ; extern __ssize_t getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) ; extern __ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) ; extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); extern int puts (__const char *__s); extern int ungetc (int __c, FILE *__stream); extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern size_t fwrite (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s) ; # 631 "/usr/include/stdio.h" 3 4 extern int fputs_unlocked (__const char *__restrict __s, FILE *__restrict __stream); # 642 "/usr/include/stdio.h" 3 4 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern int fseek (FILE *__stream, long int __off, int __whence); extern long int ftell (FILE *__stream) ; extern void rewind (FILE *__stream); # 678 "/usr/include/stdio.h" 3 4 extern int fseeko (FILE *__stream, __off_t __off, int __whence); extern __off_t ftello (FILE *__stream) ; # 697 "/usr/include/stdio.h" 3 4 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); extern int fsetpos (FILE *__stream, __const fpos_t *__pos); # 720 "/usr/include/stdio.h" 3 4 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); extern __off64_t ftello64 (FILE *__stream) ; extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); extern void clearerr (FILE *__stream) throw (); extern int feof (FILE *__stream) throw () ; extern int ferror (FILE *__stream) throw () ; extern void clearerr_unlocked (FILE *__stream) throw (); extern int feof_unlocked (FILE *__stream) throw () ; extern int ferror_unlocked (FILE *__stream) throw () ; extern void perror (__const char *__s); # 1 "/usr/include/bits/sys_errlist.h" 1 3 4 # 27 "/usr/include/bits/sys_errlist.h" 3 4 extern int sys_nerr; extern __const char *__const sys_errlist[]; extern int _sys_nerr; extern __const char *__const _sys_errlist[]; # 759 "/usr/include/stdio.h" 2 3 4 extern int fileno (FILE *__stream) throw () ; extern int fileno_unlocked (FILE *__stream) throw () ; # 778 "/usr/include/stdio.h" 3 4 extern FILE *popen (__const char *__command, __const char *__modes) ; extern int pclose (FILE *__stream); extern char *ctermid (char *__s) throw (); extern char *cuserid (char *__s); struct obstack; extern int obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __format, __gnuc_va_list __args) throw () __attribute__ ((__format__ (__printf__, 2, 0))); extern void flockfile (FILE *__stream) throw (); extern int ftrylockfile (FILE *__stream) throw () ; extern void funlockfile (FILE *__stream) throw (); # 839 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/stdio.h" 1 3 4 # 33 "/usr/include/bits/stdio.h" 3 4 inline int vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) { return vfprintf (stdout, __fmt, __arg); } inline int getchar (void) { return _IO_getc (stdin); } inline int fgetc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } inline int getc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } inline int getchar_unlocked (void) { return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); } inline int putchar (int __c) { return _IO_putc (__c, stdout); } inline int fputc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } inline int putc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } inline int putchar_unlocked (int __c) { return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); } inline __ssize_t getline (char **__lineptr, size_t *__n, FILE *__stream) { return __getdelim (__lineptr, __n, '\n', __stream); } inline int feof_unlocked (FILE *__stream) throw () { return (((__stream)->_flags & 0x10) != 0); } inline int ferror_unlocked (FILE *__stream) throw () { return (((__stream)->_flags & 0x20) != 0); } # 840 "/usr/include/stdio.h" 2 3 4 # 848 "/usr/include/stdio.h" 3 4 } # 11 "/home/schultz/c/schultz/schultz" 2 # 1 "/usr/include/memory.h" 1 3 4 # 30 "/usr/include/memory.h" 3 4 # 1 "/usr/include/string.h" 1 3 4 # 28 "/usr/include/string.h" 3 4 extern "C" { # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 34 "/usr/include/string.h" 2 3 4 extern void *memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memmove (void *__dest, __const void *__src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memchr (__const void *__s, int __c, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern void *rawmemchr (__const void *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern void *memrchr (__const void *__s, int __c, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strcat (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strncat (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern int strcmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcoll (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strxfrm (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (2))); # 1 "/usr/include/xlocale.h" 1 3 4 # 28 "/usr/include/xlocale.h" 3 4 typedef struct __locale_struct { struct locale_data *__locales[13]; const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; const char *__names[13]; } *__locale_t; # 119 "/usr/include/string.h" 2 3 4 extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); extern char *strdup (__const char *__s) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); extern char *strndup (__const char *__string, size_t __n) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); # 165 "/usr/include/string.h" 3 4 extern char *strchr (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strrchr (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strchrnul (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strcspn (__const char *__s, __const char *__reject) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strspn (__const char *__s, __const char *__accept) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strpbrk (__const char *__s, __const char *__accept) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strstr (__const char *__haystack, __const char *__needle) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strtok (char *__restrict __s, __const char *__restrict __delim) throw () __attribute__ ((__nonnull__ (2))); extern char *__strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw () __attribute__ ((__nonnull__ (2, 3))); extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw () __attribute__ ((__nonnull__ (2, 3))); extern char *strcasestr (__const char *__haystack, __const char *__needle) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memmem (__const void *__haystack, size_t __haystacklen, __const void *__needle, size_t __needlelen) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); extern void *__mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern size_t strlen (__const char *__s) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strnlen (__const char *__string, size_t __maxlen) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strerror (int __errnum) throw (); # 281 "/usr/include/string.h" 3 4 extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))); extern char *strerror_l (int __errnum, __locale_t __l) throw (); extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern void bcopy (__const void *__src, void *__dest, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *index (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *rindex (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern int ffs (int __i) throw () __attribute__ ((__const__)); extern int ffsl (long int __l) throw () __attribute__ ((__const__)); __extension__ extern int ffsll (long long int __ll) throw () __attribute__ ((__const__)); extern int strcasecmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcasecmp_l (__const char *__s1, __const char *__s2, __locale_t __loc) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern int strncasecmp_l (__const char *__s1, __const char *__s2, size_t __n, __locale_t __loc) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); extern char *strsep (char **__restrict __stringp, __const char *__restrict __delim) throw () __attribute__ ((__nonnull__ (1, 2))); extern int strverscmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strsignal (int __sig) throw (); extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *__stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern char *basename (__const char *__filename) throw () __attribute__ ((__nonnull__ (1))); # 432 "/usr/include/string.h" 3 4 } # 31 "/usr/include/memory.h" 2 3 4 # 12 "/home/schultz/c/schultz/schultz" 2 # 1 "/usr/include/stdlib.h" 1 3 4 # 33 "/usr/include/stdlib.h" 3 4 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 34 "/usr/include/stdlib.h" 2 3 4 extern "C" { # 1 "/usr/include/bits/waitflags.h" 1 3 4 # 43 "/usr/include/stdlib.h" 2 3 4 # 1 "/usr/include/bits/waitstatus.h" 1 3 4 # 65 "/usr/include/bits/waitstatus.h" 3 4 # 1 "/usr/include/endian.h" 1 3 4 # 37 "/usr/include/endian.h" 3 4 # 1 "/usr/include/bits/endian.h" 1 3 4 # 38 "/usr/include/endian.h" 2 3 4 # 66 "/usr/include/bits/waitstatus.h" 2 3 4 union wait { int w_status; struct { unsigned int __w_termsig:7; unsigned int __w_coredump:1; unsigned int __w_retcode:8; unsigned int:16; } __wait_terminated; struct { unsigned int __w_stopval:8; unsigned int __w_stopsig:8; unsigned int:16; } __wait_stopped; }; # 44 "/usr/include/stdlib.h" 2 3 4 # 96 "/usr/include/stdlib.h" 3 4 typedef struct { int quot; int rem; } div_t; typedef struct { long int quot; long int rem; } ldiv_t; __extension__ typedef struct { long long int quot; long long int rem; } lldiv_t; # 140 "/usr/include/stdlib.h" 3 4 extern size_t __ctype_get_mb_cur_max (void) throw () ; extern double atof (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern int atoi (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern long int atol (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int atoll (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern double strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ; extern float strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ; extern long double strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ; extern long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; extern unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern unsigned long long int strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern unsigned long long int strtoull (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; # 240 "/usr/include/stdlib.h" 3 4 extern long int strtol_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; extern unsigned long int strtoul_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; __extension__ extern long long int strtoll_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; __extension__ extern unsigned long long int strtoull_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; extern double strtod_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))) ; extern float strtof_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))) ; extern long double strtold_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))) ; extern double __strtod_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern float __strtof_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern long double __strtold_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern long int __strtol_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern unsigned long int __strtoul_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int __strtoll_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern unsigned long long int __strtoull_internal (__const char * __restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern __inline double strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw () { return __strtod_internal (__nptr, __endptr, 0); } extern __inline long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtol_internal (__nptr, __endptr, __base, 0); } extern __inline unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoul_internal (__nptr, __endptr, __base, 0); } extern __inline float strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw () { return __strtof_internal (__nptr, __endptr, 0); } extern __inline long double strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw () { return __strtold_internal (__nptr, __endptr, 0); } __extension__ extern __inline long long int strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoll_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline unsigned long long int strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoull_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoll_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline unsigned long long int strtoull (__const char * __restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoull_internal (__nptr, __endptr, __base, 0); } extern __inline double atof (__const char *__nptr) throw () { return strtod (__nptr, (char **) __null); } extern __inline int atoi (__const char *__nptr) throw () { return (int) strtol (__nptr, (char **) __null, 10); } extern __inline long int atol (__const char *__nptr) throw () { return strtol (__nptr, (char **) __null, 10); } __extension__ extern __inline long long int atoll (__const char *__nptr) throw () { return strtoll (__nptr, (char **) __null, 10); } # 429 "/usr/include/stdlib.h" 3 4 extern char *l64a (long int __n) throw () ; extern long int a64l (__const char *__s) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; # 1 "/usr/include/sys/types.h" 1 3 4 # 29 "/usr/include/sys/types.h" 3 4 extern "C" { typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; typedef __loff_t loff_t; typedef __ino_t ino_t; typedef __ino64_t ino64_t; typedef __dev_t dev_t; typedef __gid_t gid_t; typedef __mode_t mode_t; typedef __nlink_t nlink_t; typedef __uid_t uid_t; typedef __off_t off_t; typedef __off64_t off64_t; typedef __pid_t pid_t; typedef __id_t id_t; typedef __ssize_t ssize_t; typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; typedef __key_t key_t; # 133 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/time.h" 1 3 4 # 59 "/usr/include/time.h" 3 4 typedef __clock_t clock_t; # 75 "/usr/include/time.h" 3 4 typedef __time_t time_t; # 93 "/usr/include/time.h" 3 4 typedef __clockid_t clockid_t; # 105 "/usr/include/time.h" 3 4 typedef __timer_t timer_t; # 134 "/usr/include/sys/types.h" 2 3 4 typedef __useconds_t useconds_t; typedef __suseconds_t suseconds_t; # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 148 "/usr/include/sys/types.h" 2 3 4 typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; # 195 "/usr/include/sys/types.h" 3 4 typedef int int8_t __attribute__ ((__mode__ (__QI__))); typedef int int16_t __attribute__ ((__mode__ (__HI__))); typedef int int32_t __attribute__ ((__mode__ (__SI__))); typedef int int64_t __attribute__ ((__mode__ (__DI__))); typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); typedef int register_t __attribute__ ((__mode__ (__word__))); # 220 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/sys/select.h" 1 3 4 # 31 "/usr/include/sys/select.h" 3 4 # 1 "/usr/include/bits/select.h" 1 3 4 # 32 "/usr/include/sys/select.h" 2 3 4 # 1 "/usr/include/bits/sigset.h" 1 3 4 # 24 "/usr/include/bits/sigset.h" 3 4 typedef int __sig_atomic_t; typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; # 35 "/usr/include/sys/select.h" 2 3 4 typedef __sigset_t sigset_t; # 1 "/usr/include/time.h" 1 3 4 # 121 "/usr/include/time.h" 3 4 struct timespec { __time_t tv_sec; long int tv_nsec; }; # 45 "/usr/include/sys/select.h" 2 3 4 # 1 "/usr/include/bits/time.h" 1 3 4 # 69 "/usr/include/bits/time.h" 3 4 struct timeval { __time_t tv_sec; __suseconds_t tv_usec; }; # 47 "/usr/include/sys/select.h" 2 3 4 # 55 "/usr/include/sys/select.h" 3 4 typedef long int __fd_mask; # 67 "/usr/include/sys/select.h" 3 4 typedef struct { __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))]; } fd_set; typedef __fd_mask fd_mask; # 99 "/usr/include/sys/select.h" 3 4 extern "C" { # 109 "/usr/include/sys/select.h" 3 4 extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); # 121 "/usr/include/sys/select.h" 3 4 extern int pselect (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); } # 221 "/usr/include/sys/types.h" 2 3 4 # 1 "/usr/include/sys/sysmacros.h" 1 3 4 # 30 "/usr/include/sys/sysmacros.h" 3 4 __extension__ extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) throw (); __extension__ extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) throw (); __extension__ extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw (); __extension__ extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) throw () { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) throw () { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } __extension__ extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () { return ((__minor & 0xff) | ((__major & 0xfff) << 8) | (((unsigned long long int) (__minor & ~0xff)) << 12) | (((unsigned long long int) (__major & ~0xfff)) << 32)); } # 224 "/usr/include/sys/types.h" 2 3 4 typedef __blksize_t blksize_t; typedef __blkcnt_t blkcnt_t; typedef __fsblkcnt_t fsblkcnt_t; typedef __fsfilcnt_t fsfilcnt_t; # 262 "/usr/include/sys/types.h" 3 4 typedef __blkcnt64_t blkcnt64_t; typedef __fsblkcnt64_t fsblkcnt64_t; typedef __fsfilcnt64_t fsfilcnt64_t; # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 # 36 "/usr/include/bits/pthreadtypes.h" 3 4 typedef unsigned long int pthread_t; typedef union { char __size[36]; long int __align; } pthread_attr_t; typedef struct __pthread_internal_slist { struct __pthread_internal_slist *__next; } __pthread_slist_t; typedef union { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; int __kind; unsigned int __nusers; __extension__ union { int __spins; __pthread_slist_t __list; }; } __data; char __size[24]; long int __align; } pthread_mutex_t; typedef union { char __size[4]; long int __align; } pthread_mutexattr_t; typedef union { struct { int __lock; unsigned int __futex; __extension__ unsigned long long int __total_seq; __extension__ unsigned long long int __wakeup_seq; __extension__ unsigned long long int __woken_seq; void *__mutex; unsigned int __nwaiters; unsigned int __broadcast_seq; } __data; char __size[48]; __extension__ long long int __align; } pthread_cond_t; typedef union { char __size[4]; long int __align; } pthread_condattr_t; typedef unsigned int pthread_key_t; typedef int pthread_once_t; typedef union { struct { int __lock; unsigned int __nr_readers; unsigned int __readers_wakeup; unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; unsigned int __flags; int __writer; } __data; char __size[32]; long int __align; } pthread_rwlock_t; typedef union { char __size[8]; long int __align; } pthread_rwlockattr_t; typedef volatile int pthread_spinlock_t; typedef union { char __size[20]; long int __align; } pthread_barrier_t; typedef union { char __size[4]; int __align; } pthread_barrierattr_t; # 271 "/usr/include/sys/types.h" 2 3 4 } # 439 "/usr/include/stdlib.h" 2 3 4 extern long int random (void) throw (); extern void srandom (unsigned int __seed) throw (); extern char *initstate (unsigned int __seed, char *__statebuf, size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); struct random_data { int32_t *fptr; int32_t *rptr; int32_t *state; int rand_type; int rand_deg; int rand_sep; int32_t *end_ptr; }; extern int random_r (struct random_data *__restrict __buf, int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int srandom_r (unsigned int __seed, struct random_data *__buf) throw () __attribute__ ((__nonnull__ (2))); extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) throw () __attribute__ ((__nonnull__ (2, 4))); extern int setstate_r (char *__restrict __statebuf, struct random_data *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); extern int rand (void) throw (); extern void srand (unsigned int __seed) throw (); extern int rand_r (unsigned int *__seed) throw (); extern double drand48 (void) throw (); extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern long int lrand48 (void) throw (); extern long int nrand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern long int mrand48 (void) throw (); extern long int jrand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern void srand48 (long int __seedval) throw (); extern unsigned short int *seed48 (unsigned short int __seed16v[3]) throw () __attribute__ ((__nonnull__ (1))); extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); struct drand48_data { unsigned short int __x[3]; unsigned short int __old_x[3]; unsigned short int __c; unsigned short int __init; unsigned long long int __a; }; extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int srand48_r (long int __seedval, struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (2))); extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ; extern void *calloc (size_t __nmemb, size_t __size) throw () __attribute__ ((__malloc__)) ; extern void *realloc (void *__ptr, size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern void free (void *__ptr) throw (); extern void cfree (void *__ptr) throw (); # 1 "/usr/include/alloca.h" 1 3 4 # 25 "/usr/include/alloca.h" 3 4 # 1 "/usr/lib/gcc/i486-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 26 "/usr/include/alloca.h" 2 3 4 extern "C" { extern void *alloca (size_t __size) throw (); } # 613 "/usr/include/stdlib.h" 2 3 4 extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ; extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) throw () __attribute__ ((__nonnull__ (1))) ; extern void abort (void) throw () __attribute__ ((__noreturn__)); extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) throw () __attribute__ ((__nonnull__ (1))); extern void exit (int __status) throw () __attribute__ ((__noreturn__)); extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; extern char *__secure_getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); extern int setenv (__const char *__name, __const char *__value, int __replace) throw () __attribute__ ((__nonnull__ (2))); extern int unsetenv (__const char *__name) throw (); extern int clearenv (void) throw (); # 698 "/usr/include/stdlib.h" 3 4 extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; # 709 "/usr/include/stdlib.h" 3 4 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ; # 719 "/usr/include/stdlib.h" 3 4 extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ; # 729 "/usr/include/stdlib.h" 3 4 extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; extern int system (__const char *__command) ; extern char *canonicalize_file_name (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; # 755 "/usr/include/stdlib.h" 3 4 extern char *realpath (__const char *__restrict __name, char *__restrict __resolved) throw () ; typedef int (*__compar_fn_t) (__const void *, __const void *); typedef __compar_fn_t comparison_fn_t; extern void *bsearch (__const void *__key, __const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 2, 5))) ; extern void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); extern int abs (int __x) throw () __attribute__ ((__const__)) ; extern long int labs (long int __x) throw () __attribute__ ((__const__)) ; __extension__ extern long long int llabs (long long int __x) throw () __attribute__ ((__const__)) ; extern div_t div (int __numer, int __denom) throw () __attribute__ ((__const__)) ; extern ldiv_t ldiv (long int __numer, long int __denom) throw () __attribute__ ((__const__)) ; __extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) throw () __attribute__ ((__const__)) ; # 820 "/usr/include/stdlib.h" 3 4 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *gcvt (double __value, int __ndigit, char *__buf) throw () __attribute__ ((__nonnull__ (3))) ; extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *qgcvt (long double __value, int __ndigit, char *__buf) throw () __attribute__ ((__nonnull__ (3))) ; extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int mblen (__const char *__s, size_t __n) throw () ; extern int mbtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n) throw () ; extern int wctomb (char *__s, wchar_t __wchar) throw () ; extern size_t mbstowcs (wchar_t *__restrict __pwcs, __const char *__restrict __s, size_t __n) throw (); extern size_t wcstombs (char *__restrict __s, __const wchar_t *__restrict __pwcs, size_t __n) throw (); extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) ; # 908 "/usr/include/stdlib.h" 3 4 extern int getsubopt (char **__restrict __optionp, char *__const *__restrict __tokens, char **__restrict __valuep) throw () __attribute__ ((__nonnull__ (1, 2, 3))) ; extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); extern int posix_openpt (int __oflag) ; extern int grantpt (int __fd) throw (); extern int unlockpt (int __fd) throw (); extern char *ptsname (int __fd) throw () ; extern int ptsname_r (int __fd, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))); extern int getpt (void); extern int getloadavg (double __loadavg[], int __nelem) throw () __attribute__ ((__nonnull__ (1))); # 976 "/usr/include/stdlib.h" 3 4 } # 13 "/home/schultz/c/schultz/schultz" 2 namespace schultz { # 1 "/home/schultz/c/schultz/language/keywords" 1 # 17 "/home/schultz/c/schultz/schultz" 2 # 1 "/home/schultz/c/schultz/language/types" 1 # 14 "/home/schultz/c/schultz/language/types" typedef unsigned int nat; # 28 "/home/schultz/c/schultz/language/types" typedef float flop; # 21 "/home/schultz/c/schultz/schultz" 2 # 1 "/home/schultz/c/schultz/language/assert" 1 namespace __schultz { # 18 "/home/schultz/c/schultz/language/assert" inline void assertion_failure(char* file, nat line) { fprintf(stderr, "[ERROR] assertion failure at file \"%s\", line %u\n", file, line); exit(1); } inline void requirement_failure(char* file, nat line) { fprintf(stderr, "[ERROR] requirement not met at file \"%s\", line %u\n", file, line); exit(1); } } # 22 "/home/schultz/c/schultz/schultz" 2 # 1 "/home/schultz/c/schultz/language/meta" 1 # 19 "/home/schultz/c/schultz/language/meta" template struct bool_type {}; typedef bool_type false_type; typedef bool_type true_type; # 31 "/home/schultz/c/schultz/language/meta" template struct nat_type {}; # 41 "/home/schultz/c/schultz/language/meta" template struct type_equality { enum {value = false}; }; template struct type_equality { enum {value = true}; }; namespace __schultz { # 58 "/home/schultz/c/schultz/language/meta" template const T& fetch_constness(const T& x) {return x;} template T& fetch_constness(T& x) {return x;} }; # 115 "/home/schultz/c/schultz/language/meta" template struct default_type_traits { enum { trivial = false, trivial_constructor = false, trivial_copy = false, trivial_destructor = false, fast_increment = false, fast_decrement = false, fast_random_increment = false, iterator = false, structure = true, special_swap = false }; }; # 142 "/home/schultz/c/schultz/language/meta" template struct type_traits { enum { trivial = T::type_traits::trivial || ( T::type_traits::trivial_constructor && T::type_traits::trivial_copy && T::type_traits::trivial_destructor ), trivial_constructor = T::type_traits::trivial || T::type_traits::trivial_constructor, trivial_copy = T::type_traits::trivial || T::type_traits::trivial_copy, trivial_destructor = T::type_traits::trivial || T::type_traits::trivial_destructor, fast_increment = T::type_traits::fast_increment || T::type_traits::fast_random_increment, fast_decrement = T::type_traits::fast_decrement || T::type_traits::fast_random_increment, fast_random_increment = T::type_traits::fast_random_increment, iterator = T::type_traits::iterator, structure = T::type_traits::structure, special_swap = T::type_traits::special_swap }; }; # 178 "/home/schultz/c/schultz/language/meta" template struct builtin_type_traits : public default_type_traits { enum { trivial = true, trivial_constructor = true, trivial_copy = true, trivial_destructor = true, fast_increment = true, fast_decrement = true, fast_random_increment = true, iterator = false, structure = false, special_swap = false }; }; template<> struct type_traits : public builtin_type_traits {}; template<> struct type_traits : public builtin_type_traits {}; template<> struct type_traits : public builtin_type_traits {}; template<> struct type_traits : public builtin_type_traits {}; template<> struct type_traits : public builtin_type_traits {}; template<> struct type_traits : public builtin_type_traits {}; template<> struct type_traits : public builtin_type_traits {}; template<> struct type_traits : public builtin_type_traits {}; template<> struct type_traits : public builtin_type_traits {}; template<> struct type_traits : public builtin_type_traits {}; template<> struct type_traits : public builtin_type_traits {}; template struct type_traits : public builtin_type_traits { enum {iterator = true}; }; template struct type_traits : public builtin_type_traits { enum {iterator = true}; }; # 245 "/home/schultz/c/schultz/language/meta" template struct default_iterator_traits { enum { constant = true, persistent = false, bidirectional = false, random_access = false }; typedef void value_type; }; # 267 "/home/schultz/c/schultz/language/meta" template struct iterator_traits { enum { constant = I::iterator_traits::constant, persistent = I::iterator_traits::persistent, bidirectional = I::iterator_traits::bidirectional || I::iterator_traits::random_access, random_access = I::iterator_traits::random_access }; typedef typename I::iterator_traits::value_type value_type; }; template struct iterator_traits : public default_iterator_traits { enum { constant = false, persistent = true, bidirectional = true, random_access = true }; typedef T value_type; }; template struct iterator_traits : public default_iterator_traits { enum { constant = true, persistent = true, bidirectional = true, random_access = true }; typedef T value_type; }; # 309 "/home/schultz/c/schultz/language/meta" template struct iterator_type_traits : public default_type_traits { enum { trivial = true, fast_increment = true, fast_decrement = iterator_traits::bidirectional, fast_random_increment = iterator_traits::random_access, iterator = true }; }; # 23 "/home/schultz/c/schultz/schultz" 2 # 1 "/home/schultz/c/schultz/language/function" 1 # 14 "/home/schultz/c/schultz/language/function" template struct unary_function { typedef F return_type; typedef X argument_type; }; template struct binary_function { typedef F return_type; typedef X argument_type; typedef X first_argument_type; typedef Y second_argument_type; }; # 43 "/home/schultz/c/schultz/language/function" template struct opposite_function : public binary_function { const F& f; explicit inline opposite_function(const F& g) : f(g) {} inline typename F::return_type operator ()(typename F::second_argument_type y, typename F::first_argument_type x) const {return f(x, y);} }; template inline opposite_function make_opposite_function(const F& f) { return opposite_function(f); } template struct addressf : public unary_function { inline T* operator ()(T& a) const {return &a;} }; # 84 "/home/schultz/c/schultz/language/function" template struct equalf : public binary_function { inline bool operator ()(const T& x, const T& y) const { return x == y; } }; template struct indirect_equalf : public binary_function { inline bool operator ()(I x, I y) const { return *x == *y; } }; template struct lessf : public binary_function { inline bool operator ()(const T& x, const T& y) const { return x < y; } }; template struct indirect_lessf : public binary_function { inline bool operator ()(I x, I y) const { return *x < *y; } }; template struct greaterf : public binary_function { inline bool operator ()(const T& x, const T& y) const { return x > y; } }; template struct indirect_greaterf : public binary_function { inline bool operator ()(I x, I y) const { return *x > *y; } }; # 131 "/home/schultz/c/schultz/language/function" template struct sumf : public binary_function { inline typeof(((T)(*((T*)(0)))) + ((T)(*((T*)(0))))) operator ()(const T& x, const T& y) const { return x+y; } }; template struct addf : public binary_function { inline T& operator ()(T& a, const T& b) const {return a+= b;} }; template struct sizef : public unary_function { inline typeof(((T)(*((T*)(0)))).size()) operator ()(const T& A) const {return A.size();} }; # 24 "/home/schultz/c/schultz/schultz" 2 # 1 "/home/schultz/c/schultz/language/base" 1 # 14 "/home/schultz/c/schultz/language/base" template inline typeof(((T)(*((T*)(0)))) * ((T)(*((T*)(0))))) square(const T& x) { return x*x; } template inline T abs(const T& x) { return x < 0 ? -x : x; } # 47 "/home/schultz/c/schultz/language/base" namespace __schultz { template struct swap_meta { template static inline void swap(T& a, T& b) { T c = a; a = b; b = c; } }; template<> struct swap_meta { template static inline void swap(T& a, T& b) { T::swap(a, b); } }; } template inline void swap(T& a, T& b) { __schultz::swap_meta::special_swap>::swap(a, b); } template J swap(I a, I b, J c) { for (; a != b; ++a, ++c) swap(*a, *c); return c; } # 91 "/home/schultz/c/schultz/language/base" namespace __schultz { template struct advance_meta { template static I& advance(I& i, nat n) { for (nat __repeat = n; __repeat != 0; --__repeat) ++i; return i; } }; template<> struct advance_meta { template static inline I& advance(I& i, nat n) { return i+= n; } }; } template inline I& advance(I& i, nat n) { return __schultz::advance_meta::random_access>::advance(i, n); } # 127 "/home/schultz/c/schultz/language/base" namespace __schultz { template struct step_back_meta { template static I& step_back(I& i, nat n) { for (nat __repeat = n; __repeat != 0; --__repeat) --i; return i; } }; template<> struct step_back_meta { template static inline I& step_back(I& i, nat n) { return i-= n; } }; } template inline I& step_back(I& i, nat n) { return __schultz::step_back_meta::random_access>::step_back(i, n); } # 164 "/home/schultz/c/schultz/language/base" namespace __schultz { template struct distance_meta { template static nat distance(I a, I b) { nat n = 0; for (; a != b; ++a, ++n); return n; } }; template<> struct distance_meta { template static inline nat distance(I a, I b) { ; return b-a; } }; } template inline nat distance(I a, I b) { return __schultz::distance_meta::random_access>::distance(a, b); } # 200 "/home/schultz/c/schultz/language/base" namespace __schultz { template struct reverse_meta { template static void reverse(I a, I b) { while (a != b) { --b; if (a == b) break; swap(*a, *b); ++a; } } }; template<> struct reverse_meta { template static void reverse(I a, I b) { ; if (a != b) for (--b; a < b; ++a, --b) swap(*a, *b); } }; } template inline void reverse(I a, I b) { __schultz::reverse_meta::random_access>::reverse(a, b); } # 243 "/home/schultz/c/schultz/language/base" template inline const T& min(const T& x, const T& y, O o) { return o(x, y) ? x : y; } template inline const T& min(const T& x, const T& y) { return min(x, y, lessf()); } template inline T& min(T& x, T& y, O o) { return o(x, y) ? x : y; } template inline T& min(T& x, T& y) { return min(x, y, lessf()); } template inline const T& max(const T& x, const T& y, O o) { return o(y, x) ? x : y; } template inline const T& max(const T& x, const T& y) { return max(x, y, lessf()); } template inline T& max(T& x, T& y, O o) { return o(y, x) ? x : y; } template inline T& max(T& x, T& y) { return max(x, y, lessf()); } # 282 "/home/schultz/c/schultz/language/base" template I find(I a, I b, const T& x, E e) { for (; a != b; ++a) if (e(*a, x)) return a; return a; } template inline I find(I a, I b, const T& x) { return find(a, b, x, equalf::value_type>()); } # 311 "/home/schultz/c/schultz/language/base" template inline bool equal(I a, I b, J c, E e) { for (; a != b; ++a, ++c) if (!e(*a, *c)) return false; return true; } template inline bool equal(I a, I b, J c) { return equal(a, b, c, equalf::value_type>()); } template inline bool equal(I a, I b, J c, J d, E e) { return (b-a == d-c) && equal(a, b, c, e); } template inline bool equal(I a, I b, J c, J d) { return equal(a, b, c, d, equalf::value_type>()); } # 350 "/home/schultz/c/schultz/language/base" template bool lex_less(I a, I b, J c, O o) { typedef typename iterator_traits< I >::value_type T; for (; a != b; ++a, ++c) { const T& x = *a; const T& y = *c; if (o(x, y)) return true; else if (o(y, x)) return false; } return false; } template inline bool lex_less(I a, I b, J c) { return lex_less(a, b, c, lessf::value_type>()); } template<> inline bool lex_less(const unsigned char* a, const unsigned char* b, const unsigned char* c, lessf) { ; return memcmp(a, c, b-a) < 0; } template<> inline bool lex_less(const char* a, const char* b, const char* c, lessf) { ; return memcmp(a, c, b-a) < 0; } template<> inline bool lex_less(const unsigned char* a, const unsigned char* b, const unsigned char* c, greaterf) { ; return memcmp(a, c, b-a) > 0; } template<> inline bool lex_less(const char* a, const char* b, const char* c, greaterf) { ; return memcmp(a, c, b-a) > 0; } template bool lex_less(I a, I b, J c, J d, O o) { typedef typename iterator_traits< I >::value_type T; for (; a != b && c != d; ++a, ++c) { const T& x = *a; const T& y = *c; if (o(x, y)) return true; else if (o(y, x)) return false; } return c != d; } template inline bool lex_less(I a, I b, J c, J d) { return lex_less(a, b, c, d, lessf::value_type>()); } template<> inline bool lex_less(const unsigned char* a, const unsigned char* b, const unsigned char* c, const unsigned char* d, lessf) { ; nat m = b-a, n = d-c; int r = memcmp(a, c, min(m, n)); return r < 0 || (r == 0 && m < n); } template<> inline bool lex_less(const char* a, const char* b, const char* c, const char* d, lessf) { ; nat m = b-a, n = d-c; int r = memcmp(a, c, min(m, n)); return r < 0 || (r == 0 && m < n); } template<> inline bool lex_less(const unsigned char* a, const unsigned char* b, const unsigned char* c, const unsigned char* d, greaterf) { ; nat m = b-a, n = d-c; int r = memcmp(a, c, min(m, n)); return r > 0 || (r == 0 && m < n); } template<> inline bool lex_less(const char* a, const char* b, const char* c, const char* d, greaterf) { ; nat m = b-a, n = d-c; int r = memcmp(a, c, min(m, n)); return r > 0 || (r == 0 && m < n); } # 437 "/home/schultz/c/schultz/language/base" template I minimum(I a, I b, O o) { ; I m = a; while (++a != b) if (o(*a, *m)) m = a; return m; } template inline I minimum(I a, I b) { return minimum(a, b, lessf::value_type>()); } template I maximum(I a, I b, O o) { ; I m = a; while (++a != b) if (o(*m, *a)) m = a; return m; } template inline I maximum(I a, I b) { return maximum(a, b, lessf::value_type>()); } # 467 "/home/schultz/c/schultz/language/base" template bool is_sorted(I a, I b, O o) { if (a == b) return true; else for (;;) { I i = a; ++a; if (a == b) return true; else if (o(*a, *i)) return false; } ; } template inline bool is_sorted(I a, I b) { return is_sorted(a, b, lessf::value_type>()); } # 492 "/home/schultz/c/schultz/language/base" template typename iterator_traits< I >::value_type foldl(I a, I b, F f, const typename iterator_traits< I >::value_type& e) { typename iterator_traits< I >::value_type r = e; for (; a != b; ++a) f(r, *a); return r; } # 507 "/home/schultz/c/schultz/language/base" namespace __schultz { template struct sum_meta { template struct return_type { typedef typeof(((T)(*((T*)(0)))) + ((T)(*((T*)(0))))) value; }; template static inline typeof(((T)(*((T*)(0)))) + ((T)(*((T*)(0))))) sum(const T& a, const T& b) { return a+b; } }; template<> struct sum_meta { template struct return_type { typedef typename iterator_traits< I >::value_type value; }; template static inline typename iterator_traits< I >::value_type sum(I a, I b) { typename iterator_traits< I >::value_type s = 0; for (; a != b; ++a) s+= *a; return s; } }; } template inline typename __schultz::sum_meta::iterator>::template return_type::value sum(const T& a, const T& b) { return __schultz::sum_meta::iterator>::sum(a, b); } # 548 "/home/schultz/c/schultz/language/base" template void map(I a, I b, F f) { for (; a != b; ++a) f(*a); } template J map(I a, I b, J c, F f) { for (; a != b; ++a, ++c) *c = f(*a); return c; } # 25 "/home/schultz/c/schultz/schultz" 2 # 1 "/home/schultz/c/schultz/language/pair" 1 namespace __schultz { template struct pair_base { T first; U second; # 33 "/home/schultz/c/schultz/language/pair" static inline void swap(pair_base& p, pair_base& q) { schultz::swap(p.first, q.first); schultz::swap(p.second, q.second); } # 45 "/home/schultz/c/schultz/language/pair" inline bool operator ==(const pair_base& p) const { return first == p.first && second == p.second; } inline bool operator !=(const pair_base& p) const { return !((*this) == p); } # 62 "/home/schultz/c/schultz/language/pair" inline bool operator <(const pair_base& p) const { return first < p.first || (first == p.first && second < p.second); } inline bool operator >(const pair_base& p) const { return p < (*this); } inline bool operator <=(const pair_base& p) const { return !(p < (*this)); } inline bool operator >=(const pair_base& p) const { return !((*this) < p); } # 87 "/home/schultz/c/schultz/language/pair" inline pair_base() {} inline pair_base(const T& f, const U& s) : first(f), second(s) {} # 104 "/home/schultz/c/schultz/language/pair" struct type_traits : public default_type_traits< pair_base > { enum { trivial = schultz::type_traits::trivial && schultz::type_traits::trivial, trivial_constructor = schultz::type_traits::trivial_constructor && schultz::type_traits::trivial_constructor, trivial_copy = schultz::type_traits::trivial_copy && schultz::type_traits::trivial_copy, trivial_destructor = schultz::type_traits::trivial_destructor && schultz::type_traits::trivial_destructor, special_swap = schultz::type_traits::special_swap || schultz::type_traits::special_swap }; }; }; } # 132 "/home/schultz/c/schultz/language/pair" template struct pair : public __schultz::pair_base { inline pair() {} inline pair(const T& f, const U& s) : __schultz::pair_base::pair_base(f, s) {} }; template struct pair : public __schultz::pair_base { using __schultz::pair_base::first; using __schultz::pair_base::second; # 156 "/home/schultz/c/schultz/language/pair" inline const T& operator [](nat i) const { ; return i == 0 ? first : second; } inline T& operator [](nat i) { ; return i == 0 ? first : second; } inline pair() {} inline pair(const T& f, const T& s) : __schultz::pair_base::pair_base(f, s) {} }; template inline pair make_pair(const T& f, const U& s) { return pair(f, s); } # 26 "/home/schultz/c/schultz/schultz" 2 # 1 "/home/schultz/c/schultz/language/range" 1 # 14 "/home/schultz/c/schultz/language/range" template struct range { private: I _a, _b; public: # 34 "/home/schultz/c/schultz/language/range" inline nat size() const {return _b-_a;} # 43 "/home/schultz/c/schultz/language/range" static inline void swap(range& r, range& s) { schultz::swap(r._a, s._a); schultz::swap(r._b, s._b); } # 59 "/home/schultz/c/schultz/language/range" inline bool operator ==(const range& r) const { return _a == r._a && _b == r._b; } inline bool operator !=(const range& r) const { return !((*this) == r); } # 83 "/home/schultz/c/schultz/language/range" typedef I const_iterator; typedef I iterator; inline I begin() const {return _a;} inline I end() const {return _b;} # 95 "/home/schultz/c/schultz/language/range" inline range() {} inline range(I a, I b) : _a(a), _b(b) {} # 108 "/home/schultz/c/schultz/language/range" struct type_traits : public default_type_traits< range > { enum { trivial = true, special_swap = schultz::type_traits::special_swap }; }; }; template inline range make_range(I a, I b) { return range(a, b); } # 27 "/home/schultz/c/schultz/schultz" 2 # 1 "/home/schultz/c/schultz/language/mrange" 1 # 25 "/home/schultz/c/schultz/language/mrange" template struct mrange { private: I _a, _b; public: inline nat size() const {return _b-_a;} static inline void swap(mrange& M, mrange& N) { schultz::swap(M._a, N._a); schultz::swap(M._b, N._b); } # 69 "/home/schultz/c/schultz/language/mrange" inline bool operator ==(const mrange& M) const { return _a == M._a && _b == M._b; } inline bool operator !=(const mrange& M) const { return !((*this) == M); } # 106 "/home/schultz/c/schultz/language/mrange" struct const_iterator { I i; typename F::return_type operator *() const { return F()(*i); } typename F::return_type operator [](nat idx) const { return F()(*(i+idx)); } static inline void swap(const_iterator& i, const_iterator& j) { schultz::swap(i.i, j.i); } inline bool operator ==(const_iterator it) const {return i == it.i;} inline bool operator !=(const_iterator it) const {return i != it.i;} inline bool operator <(const_iterator it) const {return i < it.i;} inline bool operator >(const_iterator it) const {return i > it.i;} inline bool operator <=(const_iterator it) const {return i <= it.i;} inline bool operator >=(const_iterator it) const {return i >= it.i;} inline const_iterator& operator ++() { ++i; return (*this); } inline const_iterator operator ++(int) { const_iterator r = i; ++(*this); return r; } inline const_iterator& operator --() { --i; return (*this); } inline const_iterator operator --(int) { const_iterator r = i; --(*this); return r; } inline const_iterator& operator +=(nat n) { i+= n; return (*this); } inline const_iterator operator +(nat n) const {return const_iterator(i+n);} inline const_iterator& operator -=(nat n) { i-= n; return (*this); } inline const_iterator operator -(nat n) const {return const_iterator(i-n);} inline nat operator -(const_iterator it) {return i-it.i;} inline const_iterator() {} explicit inline const_iterator(I it) : i(it) {} struct iterator_traits : public default_iterator_traits { enum { constant = true, persistent = false, bidirectional = schultz::iterator_traits::bidirectional, random_access = schultz::iterator_traits::random_access }; typedef typename F::return_type value_type; }; struct type_traits : public iterator_type_traits { enum { special_swap = schultz::type_traits::special_swap }; }; }; typedef const_iterator iterator; # 198 "/home/schultz/c/schultz/language/mrange" inline const_iterator begin() const {return const_iterator(_a);} inline const_iterator end() const {return const_iterator(_b);} # 208 "/home/schultz/c/schultz/language/mrange" inline mrange() {} inline mrange(I a, I b) : _a(a), _b(b) {} # 218 "/home/schultz/c/schultz/language/mrange" struct type_traits : public default_type_traits< mrange > { enum { trivial = true, special_swap = schultz::type_traits::special_swap }; }; }; # 28 "/home/schultz/c/schultz/schultz" 2 # 1 "/home/schultz/c/schultz/language/interval" 1 namespace __schultz { template struct interval_base { # 24 "/home/schultz/c/schultz/language/interval" T left, right; # 33 "/home/schultz/c/schultz/language/interval" inline typeof(((T)(*((T*)(0)))) - ((T)(*((T*)(0))))) size() const { return right-left; } static inline void swap(interval_base& I, interval_base& J) { schultz::swap(I.left, J.left); schultz::swap(I.right, J.right); } # 57 "/home/schultz/c/schultz/language/interval" inline bool operator ==(const interval_base& I) const { return left == I.left && right == I.right; } inline bool operator !=(const interval_base& I) const { return !((*this) == I); } # 78 "/home/schultz/c/schultz/language/interval" inline bool contains(const T& x) const { return left <= x && x < right; } inline bool contains(const interval_base& I) const { return left <= I.left && I.right <= right; } # 93 "/home/schultz/c/schultz/language/interval" inline interval_base() {} inline interval_base(const T& l, const T& r) : left(l), right(r) {} # 107 "/home/schultz/c/schultz/language/interval" struct type_traits : public default_type_traits< interval_base > { enum { trivial = schultz::type_traits::trivial, trivial_constructor = schultz::type_traits::trivial_constructor, trivial_copy = schultz::type_traits::trivial_copy, trivial_destructor = schultz::type_traits::trivial_destructor, special_swap = schultz::type_traits::special_swap }; }; }; } # 181 "/home/schultz/c/schultz/language/interval" template::trivial> struct interval : public __schultz::interval_base { using __schultz::interval_base::left; using __schultz::interval_base::right; using __schultz::interval_base::size; # 202 "/home/schultz/c/schultz/language/interval" struct const_iterator { const interval* I; nat i; inline T operator *() const { ; return I->left + i; } inline T operator [](nat k) const { ; return I->left + i + k; } inline bool operator ==(const_iterator it) const {return i == it.i;} inline bool operator !=(const_iterator it) const {return i != it.i;} inline bool operator <(const_iterator it) const {return i < it.i;} inline bool operator >(const_iterator it) const {return i > it.i;} inline bool operator <=(const_iterator it) const {return i <= it.i;} inline bool operator >=(const_iterator it) const {return i >= it.i;} inline const_iterator& operator ++() {++i; return (*this);} inline const_iterator operator ++(int) { const_iterator r = (*this); ++i; return r; } inline const_iterator& operator --() { ; --i; return (*this); } inline const_iterator operator --(int) { ; const_iterator r = (*this); --i; return r; } inline const_iterator& operator +=(nat x) {i+= x; return (*this);} inline const_iterator operator +(nat x) const { return const_iterator(I, i+x); } inline const_iterator& operator -=(nat x) { ; i-= x; return (*this); } inline const_iterator operator -(nat x) const { ; return const_iterator(I, i-x); } inline nat operator -(const_iterator it) const { ; return i - it.i; } inline const_iterator() {} inline const_iterator(const interval* p, nat idx) : I(p), i(idx) {} struct iterator_traits : public default_iterator_traits { enum { constant = true, persistent = false, bidirectional = true, random_access = true }; typedef T value_type; }; struct type_traits : public iterator_type_traits {}; }; typedef const_iterator iterator; # 295 "/home/schultz/c/schultz/language/interval" inline const_iterator begin() const {return const_iterator(this, 0);} inline const_iterator end() const {return const_iterator(this, size());} inline interval() {} inline interval(const T& l, const T& r) : __schultz::interval_base::interval_base(l, r) {} }; template struct interval : public __schultz::interval_base { using __schultz::interval_base::left; using __schultz::interval_base::right; # 322 "/home/schultz/c/schultz/language/interval" struct const_iterator { T e; inline const T& operator *() const {return e;} inline const T* operator ->() const {return &e;} inline T operator [](nat i) const {return e+i;} inline bool operator ==(const_iterator i) const {return e == i.e;} inline bool operator !=(const_iterator i) const {return e != i.e;} inline bool operator <(const_iterator i) const {return e < i.e;} inline bool operator >(const_iterator i) const {return e > i.e;} inline bool operator <=(const_iterator i) const {return e <= i.e;} inline bool operator >=(const_iterator i) const {return e >= i.e;} inline const_iterator& operator ++() {++e; return (*this);} inline const_iterator operator ++(int) { const_iterator r = (*this); ++e; return r; } inline const_iterator& operator --() {--e; return (*this);} inline const_iterator operator --(int) { const_iterator r = (*this); --e; return r; } inline const_iterator& operator +=(nat i) {e+= i; return (*this);} inline const_iterator operator +(nat i) const {return const_iterator(e+i);} inline const_iterator& operator -=(nat i) {e-= i; return (*this);} inline const_iterator operator -(nat i) const {return const_iterator(e-i);} inline nat operator -(const_iterator i) const { ; return e - i.e; } inline const_iterator() {} explicit inline const_iterator(T x) : e(x) {} struct iterator_traits : public default_iterator_traits { enum { constant = true, persistent = false, bidirectional = schultz::type_traits::fast_decrement, random_access = schultz::type_traits::fast_random_increment }; typedef T value_type; }; struct type_traits : public iterator_type_traits {}; }; typedef const_iterator iterator; # 393 "/home/schultz/c/schultz/language/interval" inline const_iterator begin() const {return const_iterator(left);} inline const_iterator end() const {return const_iterator(right);} inline interval() {} inline interval(const T& l, const T& r) : __schultz::interval_base::interval_base(l, r) {} }; # 409 "/home/schultz/c/schultz/language/interval" typedef interval _; # 423 "/home/schultz/c/schultz/language/interval" template inline interval make_interval(const T& l, const T& r, bool_type) { return interval(l, r); } template inline interval make_interval(const T& l, const T& r) { return interval(l, r); } # 29 "/home/schultz/c/schultz/schultz" 2 # 1 "/home/schultz/c/schultz/language/memory" 1 # 25 "/home/schultz/c/schultz/language/memory" } template inline void* operator new(size_t, T* p) {return p;} namespace schultz { # 51 "/home/schultz/c/schultz/language/memory" namespace __schultz { template struct copy_meta { template static J copy(I a, I b, J c) { for (; a != b; ++a, ++c) *c = *a; return c; } }; template<> struct copy_meta { template static J copy(I a, I b, J c) { for (nat n = b-a; n != 0; --n, ++a, ++c) *c = *a; return c; } }; template<> struct copy_meta { template static inline T* copy(const T* a, const T* b, T* c) { ; nat n = b-a; memcpy(c, a, n*sizeof(T)); return c+n; } }; } template inline J copy(I a, I b, J c) { typedef typename iterator_traits< I >::value_type T; enum {fast = ((type_equality< I, T* >::value) || (type_equality< I, const T* >::value)) && (type_equality< J, T* >::value)}; return __schultz::copy_meta::random_access, fast && type_traits::trivial_copy>::copy(a, b, c); } # 115 "/home/schultz/c/schultz/language/memory" namespace __schultz { template struct shift_left_meta { template static I shift_left(I a, I b, nat n) { I c = a; step_back(c, n); for (; a != b; ++a, ++c) swap(*c, *a); return c; } }; template<> struct shift_left_meta { template static I shift_left(I a, I b, nat n) { I c = a; step_back(c, n); for (; a != b; ++a, ++c) *c = *a; return c; } }; template<> struct shift_left_meta { template static inline T* shift_left(T* a, T* b, nat n) { ; memcpy(a-n, a, (b-a)*sizeof(T)); return b-n; } }; } template inline I shift_left(I a, I b, nat n) { typedef typename iterator_traits< I >::value_type T; return __schultz::shift_left_meta::special_swap, (type_equality< I, T* >::value) && type_traits::trivial_copy>::shift_left(a, b, n); } # 179 "/home/schultz/c/schultz/language/memory" namespace __schultz { template struct shift_right_meta { template static I shift_right(I a, I b, nat n) { I c = b; advance(c, n); while (b != a) { --b; --c; swap(*b, *c); } return c; } }; template<> struct shift_right_meta { template static I shift_right(I a, I b, nat n) { I c = b; advance(c, n); while (b != a) { --b; --c; *c = *b; } return c; } }; template<> struct shift_right_meta { template static inline T* shift_right(T* a, T* b, nat n) { ; memmove(a+n, a, (b-a)*sizeof(T)); return a+n; } }; } template inline I shift_right(I a, I b, nat n) { typedef typename iterator_traits< I >::value_type T; return __schultz::shift_right_meta::special_swap, (type_equality< I, T* >::value) && type_traits::trivial_copy>::shift_right(a, b, n); } # 234 "/home/schultz/c/schultz/language/memory" namespace __schultz { template struct fill_meta { template static void fill(I a, I b, const T& x) { for (; a != b; ++a) *a = x; } }; template<> struct fill_meta { template static inline void fill(T* a, T* b, const T& x) { ; memset(a, *(const unsigned char*)(&x), b-a); } }; } template inline void fill(I a, I b, const T& x) { enum {fast = (type_equality< I, T* >::value) && sizeof(T) == 1}; __schultz::fill_meta::trivial_copy>::fill(a, b, x); } # 300 "/home/schultz/c/schultz/language/memory" struct system_allocation { static void* allocate(nat n) { if (n == 0) return 0; else { void* p = malloc(n); if (!(p)) {schultz::__schultz::requirement_failure("/home/schultz/c/schultz/language/memory", 306);}; return p; } } static inline void deallocate(void* p, void* q) { ; if (p != q) free(p); } enum {reallocation = true}; static void* reallocate(void* p, void* q, nat n) { ; if (p == q) return allocate(n); else if (n == 0) { deallocate(p, q); return 0; } else { void* a = realloc(p, n); if (!(a)) {schultz::__schultz::requirement_failure("/home/schultz/c/schultz/language/memory", 328);}; return a; } } }; typedef system_allocation default_allocation; # 367 "/home/schultz/c/schultz/language/memory" namespace __schultz { template struct construct_meta { template static inline void construct(T& x) { new(&x) T; } }; template<> struct construct_meta { template static inline void construct(T& x) {} }; } template inline void construct(T& x) { __schultz::construct_meta::trivial_constructor>::construct(x); } namespace __schultz { template struct construct_meta1 { template static void construct(I a, I b) { typedef typename iterator_traits< I >::value_type T; for (; a != b; ++a) new(&*a) T; } }; template<> struct construct_meta1 { template static inline void construct(I a, I b) {} }; } template inline void construct(I a, I b) { typedef typename iterator_traits< I >::value_type T; __schultz::construct_meta1::trivial_constructor>::construct(a, b); } namespace __schultz { template struct construct_meta2 { template static J construct(I a, I b, J c) { typedef typename iterator_traits< I >::value_type T; for (; a != b; ++a, ++c) new(&*c) T(*a); return c; } }; template<> struct construct_meta2 { template static inline J construct(I a, I b, J c) { return copy(a, b, c); } }; } template inline J construct(I a, I b, J c) { typedef typename iterator_traits< I >::value_type T; return __schultz::construct_meta2::trivial_copy>::construct(a, b, c); } # 438 "/home/schultz/c/schultz/language/memory" namespace __schultz { template struct copy_construct_meta { template static inline void copy_construct(T& x, const T& y) { new(&x) T(y); } }; template<> struct copy_construct_meta { template static inline void copy_construct(T& x, const T& y) { x = y; } }; } template inline void copy_construct(T& x, const T& y) { __schultz::copy_construct_meta::trivial_copy>::copy_construct(x, y); } namespace __schultz { template struct copy_construct_meta1 { template static void copy_construct(I a, I b, const T& x) { for (; a != b; ++a) new(&*a) T(x); } }; template<> struct copy_construct_meta1 { template static inline void copy_construct(I a, I b, const T& x) { fill(a, b, x); } }; } template inline void copy_construct(I a, I b, const T& x) { __schultz::copy_construct_meta1::trivial_copy>::copy_construct(a, b, x); } # 491 "/home/schultz/c/schultz/language/memory" namespace __schultz { template struct destruct_meta { template static inline void destruct(T& x) { x.~T(); } }; template<> struct destruct_meta { template static inline void destruct(T& x) {} }; } template inline void destruct(T& x) { __schultz::destruct_meta::trivial_destructor>::destruct(x); } namespace __schultz { template struct destruct_meta1 { template static void destruct(I a, I b) { typedef typename iterator_traits< I >::value_type T; for (; a != b; ++a) a->~T(); } }; template<> struct destruct_meta1 { template static inline void destruct(I a, I b) {} }; } template inline void destruct(I a, I b) { typedef typename iterator_traits< I >::value_type T; __schultz::destruct_meta1::trivial_destructor>::destruct(a, b); } namespace __schultz { # 549 "/home/schultz/c/schultz/language/memory" template inline T* allocate(nat n) { T* p = (T*)A::allocate(n*sizeof(T)); construct(p, p+n); return p; } template inline T* allocate(nat n, const T& x) { T* p = (T*)A::allocate(n*sizeof(T)); copy_construct(p, p+n, x); return p; } template inline T* allocate_1() { T* p = (T*)A::allocate(sizeof(T)); construct(*p); return p; } template inline T* allocate_1(const T& x) { T* p = (T*)A::allocate(sizeof(T)); copy_construct(*p, x); return p; } template inline T* allocate_copy(I a, I b) { T* p = (T*)A::allocate((b-a)*sizeof(T)); construct(a, b, p); return p; } template inline T* allocate_copy(I a, I b, nat n) { ; T* p = (T*)A::allocate(n*sizeof(T)); construct(a, b, p); return p; } # 591 "/home/schultz/c/schultz/language/memory" template inline void deallocate(T* p, T* q) { ; destruct(p, q); A::deallocate(p, q); } template inline void deallocate_1(T* p) { ; destruct(*p); A::deallocate(p, p+1); } # 615 "/home/schultz/c/schultz/language/memory" template struct reallocate_meta { template static T* reallocate(T* p, T* q, nat n, A) { ; T* a = (T*)A::allocate(n*sizeof(T)); nat m = q-p; if (m < n) { construct(a+m, a+n); memcpy(a, p, m*sizeof(T)); } else { destruct(p+n, q); memcpy(a, p, n*sizeof(T)); } A::deallocate(p, q); return a; } }; template<> struct reallocate_meta { template static T* reallocate(T* p, T* q, nat n, A) { ; nat m = q-p; if (m < n) { p = (T*)A::reallocate(p, q, n*sizeof(T)); construct(p+m, p+n); return p; } else { destruct(p+n, p+m); return (T*)A::reallocate(p, q, n*sizeof(T)); } } }; template inline T* reallocate(T* p, T* q, nat n) { return reallocate_meta::reallocate(p, q, n, A()); } } # 682 "/home/schultz/c/schultz/language/memory" template struct allocation { static inline T* allocate(nat n) {return __schultz::allocate(n);} static inline T* allocate(nat n, const T& x) {return __schultz::allocate(n, x);} static inline T* allocate_1() {return __schultz::allocate_1();} static inline T* allocate_1(const T& x) {return __schultz::allocate_1(x);} template static inline T* allocate_copy(I a, I b) { return __schultz::allocate_copy(a, b); } template static inline T* allocate_copy(I a, I b, nat n) { return __schultz::allocate_copy(a, b, n); } static inline void deallocate(T* p, T* q) {__schultz::deallocate(p, q);} static inline void deallocate_1(T* p) {__schultz::deallocate_1(p);} static inline T* reallocate(T* p, T* q, nat n) {return __schultz::reallocate(p, q, n);} }; # 30 "/home/schultz/c/schultz/schultz" 2 } # 12 "src/circle" 2 # 1 "/home/schultz/c/schultz/structure/vector2" 1 # 11 "/home/schultz/c/schultz/structure/vector2" namespace schultz { template struct vector2 { T x, y; # 30 "/home/schultz/c/schultz/structure/vector2" inline const T& operator [](nat i) const { ; return i == 0 ? x : y; } inline T& operator [](nat i) { ; return i == 0 ? x : y; } # 46 "/home/schultz/c/schultz/structure/vector2" static inline void swap(vector2& v, vector2& u) { schultz::swap(v.x, u.x); schultz::swap(v.y, u.y); } # 58 "/home/schultz/c/schultz/structure/vector2" inline bool operator ==(const vector2& v) const { return x == v.x && y == v.y; } inline bool operator !=(const vector2& v) const { return !((*this) == v); } # 80 "/home/schultz/c/schultz/structure/vector2" inline vector2& operator +=(const vector2& v) { x+= v.x; y+= v.y; return (*this); } inline vector2 operator +(const vector2& v) const { return vector2(x+v.x, y+v.y); } inline vector2 operator -() const { return vector2(-x, -y); } inline vector2& operator -=(const vector2& v) { x-= v.x; y-= v.y; return (*this); } inline vector2 operator -(const vector2& v) const { return vector2(x-v.x, y-v.y); } inline vector2& operator *=(const T& a) { x*= a; y*= a; return (*this); } inline vector2 operator *(const T& a) const { return vector2(x*a, y*a); } inline vector2& operator /=(const T& a) { x/= a; y/= a; return (*this); } inline vector2 operator /(const T& a) const { return vector2(x/a, y/a); } 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& v) const { return x*v.x + y*v.y; } inline vector2() {} inline vector2(const T& a, const T& b) : x(a), y(b) {} struct type_traits : public default_type_traits< vector2 > { enum { trivial = schultz::type_traits::trivial, trivial_constructor = schultz::type_traits::trivial_constructor, trivial_copy = schultz::type_traits::trivial_copy, trivial_destructor = schultz::type_traits::trivial_destructor, special_swap = schultz::type_traits::special_swap }; }; }; template inline vector2 operator *(const T& a, const vector2& v) { return vector2(a*v.x, a*v.y); } template inline vector2 make_vector2(const T& x, const T& y) { return vector2(x, y); } } # 13 "src/circle" 2 # 1 "/home/schultz/c/schultz/structure/avl_tree" 1 # 11 "/home/schultz/c/schultz/structure/avl_tree" namespace schultz { # 27 "/home/schultz/c/schultz/structure/avl_tree" template, typename ALLOC = default_allocation> struct avl_tree { private: # 44 "/home/schultz/c/schultz/structure/avl_tree" struct node { T elem; node *left, *right, *father; int balance; static void swap(node& m, node& n) { schultz::swap(m.elem, n.elem); schultz::swap(m.left, n.left); schultz::swap(m.right, n.right); schultz::swap(m.father, n.father); schultz::swap(m.balance, n.balance); } struct type_traits : public default_type_traits { enum { trivial = schultz::type_traits::trivial, trivial_constructor = schultz::type_traits::trivial_constructor, trivial_copy = schultz::type_traits::trivial_copy, trivial_destructor = schultz::type_traits::trivial_destructor, special_swap = schultz::type_traits::special_swap }; }; }; typedef allocation _alloc; # 91 "/home/schultz/c/schultz/structure/avl_tree" node* _root; # 101 "/home/schultz/c/schultz/structure/avl_tree" template static pair _assemble_aux(I a, I b) { if (a != b) { I m = a+(b-a)/2; node* n = (node*)ALLOC::allocate(sizeof(node)); copy_construct(n->elem, *m); const pair &p = _assemble_aux(a, m); const pair &q = _assemble_aux(++m, b); n->left = p.first; n->right = q.first; if (n->left) n->left->father = n; if (n->right) n->right->father = n; n->balance = q.second - p.second; return make_pair(n, max(p.second, q.second)+1); } else return pair(0, 0); } template inline void _assemble(I a, I b) { ; _root = _assemble_aux(a, b).first; if (_root) _root->father = 0; } # 134 "/home/schultz/c/schultz/structure/avl_tree" static void _clear_aux(node* n) { ; if (n->left) _clear_aux(n->left); if (n->right) _clear_aux(n->right); _alloc::deallocate_1(n); } static node* _copy_aux(node* n) { if (n) { node* m = (node*)ALLOC::allocate(sizeof(node)); copy_construct(m->elem, n->elem); m->left = _copy_aux(n->left); m->right = _copy_aux(n->right); if (m->left) m->left->father = m; if (m->right) m->right->father = m; m->balance = n->balance; return m; } else return 0; } # 167 "/home/schultz/c/schultz/structure/avl_tree" static const node* _leftmost(const node* n) { ; while (n->left) n = n->left; return n; } static node* _leftmost(node* n) { ; while (n->left) n = n->left; return n; } static const node* _rightmost(const node* n) { ; while (n->right) n = n->right; return n; } static node* _rightmost(node* n) { ; while (n->right) n = n->right; return n; } # 209 "/home/schultz/c/schultz/structure/avl_tree" void _rotate_LL(node* b) { ; node* a = b->left; if (b->father) (b->father->left == b ? b->father->left : b->father->right) = a; else _root = a; a->father = b->father; b->left = a->right; if (a->right) a->right->father = b; b->father = a; a->right = b; if (a->balance == -1) { a->balance = 0; b->balance = 0; } else { ; a->balance = 1; b->balance = -1; } } void _rotate_LR(node* c) { ; node* a = c->left; node* b = a->right; if (c->father) (c->father->left == c ? c->father->left : c->father->right) = b; else _root = b; b->father = c->father; a->father = b; a->right = b->left; if (b->left) b->left->father = a; b->left = a; c->left = b->right; if (b->right) b->right->father = c; b->right = c; c->father = b; a->balance = b->balance == 1 ? -1 : 0; c->balance = b->balance == -1 ? 1 : 0; b->balance = 0; } void _rotate_RR(node* a) { ; node* b = a->right; if (a->father) (a->father->left == a ? a->father->left : a->father->right) = b; else _root = b; b->father = a->father; a->right = b->left; if (b->left) b->left->father = a; a->father = b; b->left = a; if (b->balance == 1) { b->balance = 0; a->balance = 0; } else { ; b->balance = -1; a->balance = 1; } } void _rotate_RL(node* a) { ; node* c = a->right; node* b = c->left; if (a->father) (a->father->left == a ? a->father->left : a->father->right) = b; else _root = b; b->father = a->father; c->father = b; c->left = b->right; if (b->right) b->right->father = c; b->right = c; a->right = b->left; if (b->left) b->left->father = a; b->left = a; a->father = b; a->balance = b->balance == 1 ? -1 : 0; c->balance = b->balance == -1 ? 1 : 0; b->balance = 0; } # 303 "/home/schultz/c/schultz/structure/avl_tree" void _grow_retrace(node* p) { ; while (p->father) { if (p->father->left == p) --p->father->balance; else ++p->father->balance; p = p->father; if (p->balance == 0) break; else if (p->balance == -2) { ; if (p->left->balance != 1) _rotate_LL(p); else _rotate_LR(p); break; } else if (p->balance == 2) { ; if (p->right->balance != -1) _rotate_RR(p); else _rotate_RL(p); break; } ; } } void _shrink_retrace(node* p) { ; while (p->balance != -1 && p->balance != 1) { if (p->balance == -2) { int b = p->left->balance; if (b == 1) { _rotate_LR(p); p = p->father; ; } else { _rotate_LL(p); if (b == 0) break; p = p->father; ; } } else if (p->balance == 2) { int b = p->right->balance; if (b == -1) { _rotate_RL(p); p = p->father; ; } else { _rotate_RR(p); if (b == 0) break; p = p->father; ; } } if (p->father) { if (p->father->left == p) ++p->father->balance; else --p->father->balance; p = p->father; } else break; } } public: inline bool empty() const {return _root == 0;} inline void clear() { if (_root) { _clear_aux(_root); _root = 0; } } # 397 "/home/schultz/c/schultz/structure/avl_tree" template inline void copy(I a, I b) { clear(); _assemble(a, b); } inline avl_tree& operator =(const avl_tree& A) { if (this != &A) { clear(); _root = _copy_aux(A._root); if (_root) _root->father = 0; } return (*this); } static inline void swap(avl_tree& A, avl_tree& B) { schultz::swap(A._root, B._root); } # 439 "/home/schultz/c/schultz/structure/avl_tree" struct const_iterator { const node* n; inline const T& operator *() const { ; return n->elem; } inline const T* operator ->() const { ; return &n->elem; } inline const T& operator [](nat i) const { return *((*this)+i); } inline bool operator ==(const_iterator i) const { return n == i.n; } inline bool operator !=(const_iterator i) const { return !((*this) == i); } const_iterator& operator ++() { ; if (n->right) { n = n->right; while (n->left) n = n->left; } else { while (n->father && n->father->right == n) n = n->father; n = n->father; } return (*this); } inline const_iterator operator ++(int) { const_iterator i = (*this); ++(*this); return i; } const_iterator& operator --() { ; if (n->left) { n = n->left; while (n->right) n = n->right; } else { while (n->father && n->father->left == n) n = n->father; n = n->father; } return (*this); } inline const_iterator operator --(int) { const_iterator i = (*this); --(*this); return i; } inline const_iterator& operator +=(nat n) { return advance((*this), n); } inline const_iterator operator +(nat n) { const_iterator i = (*this); return i+= n; } inline const_iterator& operator -=(nat n) { return step_back((*this), n); } inline const_iterator operator -(nat n) { const_iterator i = (*this); return i-= n; } inline nat operator -(const_iterator i) { return distance(i, (*this)); } inline const_iterator() {} explicit inline const_iterator(const node* p) : n(p) {} struct iterator_traits : public default_iterator_traits { enum { constant = true, persistent = true, bidirectional = true, random_access = false }; typedef T value_type; }; struct type_traits : public iterator_type_traits {}; }; struct iterator { node* n; inline T& operator *() const { ; return n->elem; } inline T* operator ->() const { ; return &n->elem; } inline T& operator [](nat i) const { return *((*this)+i); } inline bool operator ==(iterator i) const { return n == i.n; } inline bool operator !=(iterator i) const { return !((*this) == i); } iterator& operator ++() { ; if (n->right) { n = n->right; while (n->left) n = n->left; } else { while (n->father && n->father->right == n) n = n->father; n = n->father; } return (*this); } inline iterator operator ++(int) { iterator i = (*this); ++(*this); return i; } iterator& operator --() { ; if (n->left) { n = n->left; while (n->right) n = n->right; } else { while (n->father && n->father->left == n) n = n->father; n = n->father; } return (*this); } inline iterator operator --(int) { iterator i = (*this); --(*this); return i; } inline iterator& operator +=(nat n) { return advance((*this), n); } inline iterator operator +(nat n) { iterator i = (*this); return i+= n; } inline iterator& operator -=(nat n) { return step_back((*this), n); } inline iterator operator -(nat n) { iterator i = (*this); return i-= n; } inline nat operator -(iterator i) { return distance(i, (*this)); } inline iterator() {} explicit inline iterator(node* p) : n(p) {} struct iterator_traits : public default_iterator_traits { enum { constant = false, persistent = true, bidirectional = true, random_access = false }; typedef T value_type; }; struct type_traits : public iterator_type_traits {}; }; # 643 "/home/schultz/c/schultz/structure/avl_tree" inline const_iterator begin() const {return const_iterator(_root ? _leftmost(_root) : 0);} inline const_iterator end() const {return const_iterator(0);} inline iterator begin() {return iterator(_root ? _leftmost(_root) : 0);} inline iterator end() {return iterator(0);} # 661 "/home/schultz/c/schultz/structure/avl_tree" const_iterator find(const T& x) const { node* p = _root; while (p) { if (O()(x, p->elem)) p = p->left; else if (O()(p->elem, x)) p = p->right; else return const_iterator(p); } return end(); } iterator find(const T& x) { node* p = _root; while (p) { if (O()(x, p->elem)) p = p->left; else if (O()(p->elem, x)) p = p->right; else return iterator(p); } return end(); } inline bool contains(const T& x) const { return find(x) != end(); } # 692 "/home/schultz/c/schultz/structure/avl_tree" iterator insert(const T& x) { node* q = 0; node* p = _root; while (p) { q = p; if (O()(x, p->elem)) p = p->left; else p = p->right; } p = (node*)ALLOC::allocate(sizeof(node)); copy_construct(p->elem, x); p->father = q; p->left = p->right = 0; p->balance = 0; if (q) { if (O()(x, q->elem)) q->left = p; else q->right = p; } else _root = p; _grow_retrace(p); return iterator(p); } void remove(iterator iter) { node* a = iter.n; ; node* f = a->father; if (a->left == 0 || a->right == 0) { node* b = a->left == 0 ? a->right : a->left; if (f) { if (f->left == a) { ++f->balance; f->left = b; } else { --f->balance; f->right = b; } } else _root = b; if (b) b->father = f; _alloc::deallocate_1(a); if (f) _shrink_retrace(f); } else { ; node* p = _rightmost(a->left); node* pf = p->father; ; if (pf->left == p) { ++pf->balance; pf->left = p->left; } else { --pf->balance; pf->right = p->left; } if (p->left) p->left->father = pf; if (f) (f->left == a ? f->left : f->right) = p; else _root = p; p->father = f; p->right = a->right; p->left = a->left; if (p->left) p->left->father = p; if (p->right) p->right->father = p; p->balance = a->balance; _alloc::deallocate_1(a); _shrink_retrace(pf == a ? p : pf); } } # 782 "/home/schultz/c/schultz/structure/avl_tree" inline avl_tree() : _root(0) {} inline avl_tree(const avl_tree& A) { _root = _copy_aux(A._root); if (_root) _root->father = 0; } template inline avl_tree(I a, I b) : _root(0) { _assemble(a, b); } inline ~avl_tree() {clear();} # 806 "/home/schultz/c/schultz/structure/avl_tree" struct type_traits : public default_type_traits< avl_tree > { enum { trivial = false, special_swap = true }; }; }; }; # 15 "src/circle" 2 using namespace schultz; namespace khaos { # 52 "src/circle" struct circle { vector2 centre; flop radius; vector2 velocity; flop mass; void* next; flop proj; nat kind; bool exists; flop time; struct { nat left, right, bottom, top; } voxels; struct projcmpf : public binary_function { inline bool operator ()(const circle* C, const circle* D) const { return C->proj < D->proj; } }; avl_tree::iterator iter; inline void copy_projbase(circle& C) { centre = C.centre; radius = C.radius; velocity = C.velocity; time = C.time; } struct type_traits : public default_type_traits { enum {trivial = true}; }; }; inline void move(circle& C, flop dt) { ; C.centre+= dt*C.velocity; } # 137 "src/circle" extern flop proj(const circle&, const circle&); extern flop proj(const circle&, vector2); extern void coll(circle&, circle&); } # 1 "/home/schultz/c/schultz/language/undef_keywords" 1 # 152 "src/circle" 2 # 2 "src/circle.c++" 2 # 1 "/usr/include/math.h" 1 3 4 # 30 "/usr/include/math.h" 3 4 extern "C" { # 1 "/usr/include/bits/huge_val.h" 1 3 4 # 35 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/huge_valf.h" 1 3 4 # 37 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/huge_vall.h" 1 3 4 # 38 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/inf.h" 1 3 4 # 41 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/nan.h" 1 3 4 # 44 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/mathdef.h" 1 3 4 # 36 "/usr/include/bits/mathdef.h" 3 4 typedef long double float_t; typedef long double double_t; # 48 "/usr/include/math.h" 2 3 4 # 71 "/usr/include/math.h" 3 4 # 1 "/usr/include/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/bits/mathcalls.h" 3 4 extern double acos (double __x) throw (); extern double __acos (double __x) throw (); extern double asin (double __x) throw (); extern double __asin (double __x) throw (); extern double atan (double __x) throw (); extern double __atan (double __x) throw (); extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw (); extern double cos (double __x) throw (); extern double __cos (double __x) throw (); extern double sin (double __x) throw (); extern double __sin (double __x) throw (); extern double tan (double __x) throw (); extern double __tan (double __x) throw (); extern double cosh (double __x) throw (); extern double __cosh (double __x) throw (); extern double sinh (double __x) throw (); extern double __sinh (double __x) throw (); extern double tanh (double __x) throw (); extern double __tanh (double __x) throw (); extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw (); extern double acosh (double __x) throw (); extern double __acosh (double __x) throw (); extern double asinh (double __x) throw (); extern double __asinh (double __x) throw (); extern double atanh (double __x) throw (); extern double __atanh (double __x) throw (); extern double exp (double __x) throw (); extern double __exp (double __x) throw (); extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw (); extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw (); extern double log (double __x) throw (); extern double __log (double __x) throw (); extern double log10 (double __x) throw (); extern double __log10 (double __x) throw (); extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw (); extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw (); extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw (); extern double log1p (double __x) throw (); extern double __log1p (double __x) throw (); extern double logb (double __x) throw (); extern double __logb (double __x) throw (); extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw (); extern double log2 (double __x) throw (); extern double __log2 (double __x) throw (); extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw (); extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw (); extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw (); extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw (); extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__)); extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__)); extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__)); extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw (); extern int __isinf (double __value) throw () __attribute__ ((__const__)); extern int __finite (double __value) throw () __attribute__ ((__const__)); extern int isinf (double __value) throw () __attribute__ ((__const__)); extern int finite (double __value) throw () __attribute__ ((__const__)); extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw (); extern double significand (double __x) throw (); extern double __significand (double __x) throw (); extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern int __isnan (double __value) throw () __attribute__ ((__const__)); extern int isnan (double __value) throw () __attribute__ ((__const__)); extern double j0 (double) throw (); extern double __j0 (double) throw (); extern double j1 (double) throw (); extern double __j1 (double) throw (); extern double jn (int, double) throw (); extern double __jn (int, double) throw (); extern double y0 (double) throw (); extern double __y0 (double) throw (); extern double y1 (double) throw (); extern double __y1 (double) throw (); extern double yn (int, double) throw (); extern double __yn (int, double) throw (); extern double erf (double) throw (); extern double __erf (double) throw (); extern double erfc (double) throw (); extern double __erfc (double) throw (); extern double lgamma (double) throw (); extern double __lgamma (double) throw (); extern double tgamma (double) throw (); extern double __tgamma (double) throw (); extern double gamma (double) throw (); extern double __gamma (double) throw (); extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw (); extern double rint (double __x) throw (); extern double __rint (double __x) throw (); extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw (); extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw (); extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw (); extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw (); extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw (); extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__)); extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__)); extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw (); extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw (); extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw (); extern long int lround (double __x) throw (); extern long int __lround (double __x) throw (); extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw (); extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw (); extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw (); extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw (); extern int __fpclassify (double __value) throw () __attribute__ ((__const__)); extern int __signbit (double __value) throw () __attribute__ ((__const__)); extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw (); extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); # 72 "/usr/include/math.h" 2 3 4 # 94 "/usr/include/math.h" 3 4 # 1 "/usr/include/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/bits/mathcalls.h" 3 4 extern float acosf (float __x) throw (); extern float __acosf (float __x) throw (); extern float asinf (float __x) throw (); extern float __asinf (float __x) throw (); extern float atanf (float __x) throw (); extern float __atanf (float __x) throw (); extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw (); extern float cosf (float __x) throw (); extern float __cosf (float __x) throw (); extern float sinf (float __x) throw (); extern float __sinf (float __x) throw (); extern float tanf (float __x) throw (); extern float __tanf (float __x) throw (); extern float coshf (float __x) throw (); extern float __coshf (float __x) throw (); extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw (); extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw (); extern void sincosf (float __x, float *__sinx, float *__cosx) throw (); extern void __sincosf (float __x, float *__sinx, float *__cosx) throw (); extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw (); extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw (); extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw (); extern float expf (float __x) throw (); extern float __expf (float __x) throw (); extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw (); extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw (); extern float logf (float __x) throw (); extern float __logf (float __x) throw (); extern float log10f (float __x) throw (); extern float __log10f (float __x) throw (); extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw (); extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw (); extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw (); extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw (); extern float logbf (float __x) throw (); extern float __logbf (float __x) throw (); extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw (); extern float log2f (float __x) throw (); extern float __log2f (float __x) throw (); extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw (); extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw (); extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw (); extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw (); extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__)); extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__)); extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__)); extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw (); extern int __isinff (float __value) throw () __attribute__ ((__const__)); extern int __finitef (float __value) throw () __attribute__ ((__const__)); extern int isinff (float __value) throw () __attribute__ ((__const__)); extern int finitef (float __value) throw () __attribute__ ((__const__)); extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw (); extern float significandf (float __x) throw (); extern float __significandf (float __x) throw (); extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern int __isnanf (float __value) throw () __attribute__ ((__const__)); extern int isnanf (float __value) throw () __attribute__ ((__const__)); extern float j0f (float) throw (); extern float __j0f (float) throw (); extern float j1f (float) throw (); extern float __j1f (float) throw (); extern float jnf (int, float) throw (); extern float __jnf (int, float) throw (); extern float y0f (float) throw (); extern float __y0f (float) throw (); extern float y1f (float) throw (); extern float __y1f (float) throw (); extern float ynf (int, float) throw (); extern float __ynf (int, float) throw (); extern float erff (float) throw (); extern float __erff (float) throw (); extern float erfcf (float) throw (); extern float __erfcf (float) throw (); extern float lgammaf (float) throw (); extern float __lgammaf (float) throw (); extern float tgammaf (float) throw (); extern float __tgammaf (float) throw (); extern float gammaf (float) throw (); extern float __gammaf (float) throw (); extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw (); extern float rintf (float __x) throw (); extern float __rintf (float __x) throw (); extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw (); extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw (); extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw (); extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw (); extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw (); extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__)); extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__)); extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw (); extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw (); extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw (); extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw (); extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw (); extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw (); extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw (); extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw (); extern int __fpclassifyf (float __value) throw () __attribute__ ((__const__)); extern int __signbitf (float __value) throw () __attribute__ ((__const__)); extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw (); extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); # 95 "/usr/include/math.h" 2 3 4 # 141 "/usr/include/math.h" 3 4 # 1 "/usr/include/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/bits/mathcalls.h" 3 4 extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw (); extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw (); extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw (); extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw (); extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw (); extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw (); extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw (); extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw (); extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw (); extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw (); 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 (); extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw (); extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw (); extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw (); extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw (); extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw (); extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw (); extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw (); extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw (); extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw (); extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw (); extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw (); extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw (); extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw (); extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw (); extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw (); extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw (); extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw (); extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw (); extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw (); extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__)); extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__)); extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw (); extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); extern int __finitel (long double __value) throw () __attribute__ ((__const__)); extern int isinfl (long double __value) throw () __attribute__ ((__const__)); extern int finitel (long double __value) throw () __attribute__ ((__const__)); extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw (); extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw (); 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__)); extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); extern int isnanl (long double __value) throw () __attribute__ ((__const__)); extern long double j0l (long double) throw (); extern long double __j0l (long double) throw (); extern long double j1l (long double) throw (); extern long double __j1l (long double) throw (); extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw (); extern long double y0l (long double) throw (); extern long double __y0l (long double) throw (); extern long double y1l (long double) throw (); extern long double __y1l (long double) throw (); extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw (); extern long double erfl (long double) throw (); extern long double __erfl (long double) throw (); extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw (); extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw (); extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw (); extern long double gammal (long double) throw (); extern long double __gammal (long double) throw (); extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw (); extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw (); 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__)); 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__)); extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw (); extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw (); extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw (); extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw (); extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw (); extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__)); extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__)); 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 (); extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw (); extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw (); extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw (); extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw (); extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw (); extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw (); extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw (); extern int __fpclassifyl (long double __value) throw () __attribute__ ((__const__)); extern int __signbitl (long double __value) throw () __attribute__ ((__const__)); 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 (); extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); # 142 "/usr/include/math.h" 2 3 4 # 157 "/usr/include/math.h" 3 4 extern int signgam; # 198 "/usr/include/math.h" 3 4 enum { FP_NAN, FP_INFINITE, FP_ZERO, FP_SUBNORMAL, FP_NORMAL }; # 284 "/usr/include/math.h" 3 4 typedef enum { _IEEE_ = -1, _SVID_, _XOPEN_, _POSIX_, _ISOC_ } _LIB_VERSION_TYPE; extern _LIB_VERSION_TYPE _LIB_VERSION; # 307 "/usr/include/math.h" 3 4 struct __exception { int type; char *name; double arg1; double arg2; double retval; }; extern int matherr (struct __exception *__exc) throw (); # 409 "/usr/include/math.h" 3 4 # 1 "/usr/include/bits/mathinline.h" 1 3 4 # 127 "/usr/include/bits/mathinline.h" 3 4 __inline int __signbitf (float __x) throw () { __extension__ union { float __f; int __i; } __u = { __f: __x }; return __u.__i < 0; } __inline int __signbit (double __x) throw () { __extension__ union { double __d; int __i[2]; } __u = { __d: __x }; return __u.__i[1] < 0; } __inline int __signbitl (long double __x) throw () { __extension__ union { long double __l; int __i[3]; } __u = { __l: __x }; return (__u.__i[2] & 0x8000) != 0; } # 291 "/usr/include/bits/mathinline.h" 3 4 __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); } # 433 "/usr/include/bits/mathinline.h" 3 4 __inline long double __atan2l (long double __y, long double __x) throw () { return __builtin_atan2l (__y, __x); } # 473 "/usr/include/bits/mathinline.h" 3 4 __inline double fabs (double __x) throw () { return __builtin_fabs (__x); } __inline float fabsf (float __x) throw () { return __builtin_fabsf (__x); } __inline long double fabsl (long double __x) throw () { return __builtin_fabsl (__x); } __inline long double __fabsl (long double __x) throw () { return __builtin_fabsl (__x); } # 506 "/usr/include/bits/mathinline.h" 3 4 __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; } # 530 "/usr/include/bits/mathinline.h" 3 4 __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; } # 548 "/usr/include/bits/mathinline.h" 3 4 __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; } # 667 "/usr/include/bits/mathinline.h" 3 4 __inline long int lrintf (float __x) throw () { long int __lrintres; __asm__ __volatile__ ("fistpl %0" : "=m" (__lrintres) : "t" (__x) : "st"); return __lrintres; } __inline long int lrint (double __x) throw () { long int __lrintres; __asm__ __volatile__ ("fistpl %0" : "=m" (__lrintres) : "t" (__x) : "st"); return __lrintres; } __inline long int lrintl (long double __x) throw () { long int __lrintres; __asm__ __volatile__ ("fistpl %0" : "=m" (__lrintres) : "t" (__x) : "st"); return __lrintres; } # 690 "/usr/include/bits/mathinline.h" 3 4 __inline long long int llrintf (float __x) throw () { long long int __llrintres; __asm__ __volatile__ ("fistpll %0" : "=m" (__llrintres) : "t" (__x) : "st"); return __llrintres; } __inline long long int llrint (double __x) throw () { long long int __llrintres; __asm__ __volatile__ ("fistpll %0" : "=m" (__llrintres) : "t" (__x) : "st"); return __llrintres; } __inline long long int llrintl (long double __x) throw () { long long int __llrintres; __asm__ __volatile__ ("fistpll %0" : "=m" (__llrintres) : "t" (__x) : "st"); return __llrintres; } # 727 "/usr/include/bits/mathinline.h" 3 4 __inline int __finite (double __x) throw () { return (__extension__ (((((union { double __d; int __i[2]; }) {__d: __x}).__i[1] | 0x800fffffu) + 1) >> 31)); } # 410 "/usr/include/math.h" 2 3 4 # 465 "/usr/include/math.h" 3 4 } # 4 "src/circle.c++" 2 # 1 "/home/schultz/c/schultz/language/keywords" 1 # 6 "src/circle.c++" 2 namespace khaos { flop proj(const circle& C, const circle& D) { vector2 dc = D.centre - C.centre; vector2 dv = D.velocity - C.velocity; flop c = square(dv); if (c != 0) { flop a = square(dc) - square(C.radius + D.radius); flop b = flop(2)*dc*dv; flop d = square(b) - 4*a*c; if (d > 0) { d = sqrt(d); flop t0 = (-b-d)/(2*c), t1 = (-b+d)/(2*c); if ((t0 >= 0 && t1 >= 0) && (t0 > 0 || t1 > 0)) { flop t = min(t0, t1); ; return t; } } } return (__builtin_inff()); } flop proj(const circle& C, vector2 P) { vector2 dc = P - C.centre; flop c = square(C.velocity); if (c != 0) { flop a = square(dc) - square(C.radius); flop b = -flop(2)*dc*C.velocity; flop d = square(b)-4*a*c; if (d > 0) { d = sqrt(d); flop t0 = (-b-d)/(2*c), t1 = (-b+d)/(2*c); if ((t0 >= 0 && t1 >= 0) && (t0 > 0 || t1 > 0)) { flop t = min(t0, t1); ; return t; } } } return (__builtin_inff()); } void coll(circle& C, circle& D) { vector2 dc = D.centre - C.centre; vector2 dv = D.velocity - C.velocity; flop w = flop(2)*dc*dv/(square(dc)*(C.mass + D.mass)); C.velocity+= dc * D.mass * w; D.velocity-= dc * C.mass * w; } }