static struct _tuple0 * Cyc_Lineno_parse_linedef(struct _fat_ptr line) { struct _handler_cons * _T0; int _T1; int _T2; unsigned int _T3; struct _fat_ptr _T4; unsigned int _T5; struct _fat_ptr _T6; unsigned char * _T7; char * _T8; char * _T9; int _TA; char _TB; int _TC; struct _fat_ptr _TD; unsigned char * _TE; char * _TF; int _T10; char _T11; int _T12; int _T13; unsigned int _T14; struct _fat_ptr _T15; unsigned int _T16; struct _fat_ptr _T17; unsigned char * _T18; char * _T19; char * _T1A; int _T1B; char _T1C; int _T1D; struct _fat_ptr _T1E; unsigned char * _T1F; char * _T20; int _T21; char _T22; int _T23; int _T24; unsigned int _T25; struct _fat_ptr _T26; unsigned int _T27; int _T28; struct Cyc_IntPtr_sa_ScanfArg_struct _T29; struct _fat_ptr _T2A; int _T2B; int _T2C; unsigned long _T2D; struct _fat_ptr _T2E; struct _fat_ptr _T2F; struct _fat_ptr _T30; int _T31; unsigned int _T32; struct _fat_ptr _T33; unsigned int _T34; struct _fat_ptr _T35; unsigned char * _T36; char * _T37; char * _T38; int _T39; char _T3A; int _T3B; int _T3C; unsigned int _T3D; struct _fat_ptr _T3E; unsigned int _T3F; struct _fat_ptr _T40; unsigned char * _T41; char * _T42; char * _T43; int _T44; char _T45; int _T46; int _T47; unsigned int _T48; struct _fat_ptr _T49; unsigned int _T4A; int _T4B; unsigned int _T4C; struct _fat_ptr _T4D; unsigned int _T4E; struct _fat_ptr _T4F; int _T50; int _T51; unsigned long _T52; void * _T53; struct _handler_cons _T54; _T0 = &_T54; _push_handler(_T0); { int _T55 = 0; _T1 = setjmp(_T54.handler); if (! _T1) { goto _TL1B; } _T55 = 1; goto _TL1C; _TL1B: _TL1C: if (_T55) { goto _TL1D; }else { goto _TL1F; } _TL1F: { int i = 0; _TL20: _T2 = i; _T3 = (unsigned int)_T2; _T4 = line; _T5 = _get_fat_size(_T4,sizeof(char)); if (_T3 < _T5) { goto _TL23; }else { goto _TL22; } _TL23: _T6 = line; _T7 = _T6.curr; _T8 = (char *)_T7; _T9 = _check_null(_T8); _TA = i; _TB = _T9[_TA]; _TC = (int)_TB; if (_TC < 48) { goto _TL21; }else { goto _TL24; } _TL24: _TD = line; _TE = _TD.curr; _TF = (char *)_TE; _T10 = i; _T11 = _TF[_T10]; _T12 = (int)_T11; if (_T12 > 57) { goto _TL21; }else { goto _TL22; } _TL21: i = i + 1; goto _TL20; _TL22: { int j = i; _TL25: _T13 = j; _T14 = (unsigned int)_T13; _T15 = line; _T16 = _get_fat_size(_T15,sizeof(char)); if (_T14 < _T16) { goto _TL29; }else { goto _TL27; } _TL29: _T17 = line; _T18 = _T17.curr; _T19 = (char *)_T18; _T1A = _check_null(_T19); _T1B = j; _T1C = _T1A[_T1B]; _T1D = (int)_T1C; if (_T1D >= 48) { goto _TL28; }else { goto _TL27; } _TL28: _T1E = line; _T1F = _T1E.curr; _T20 = (char *)_T1F; _T21 = j; _T22 = _T20[_T21]; _T23 = (int)_T22; if (_T23 <= 57) { goto _TL26; }else { goto _TL27; } _TL26: j = j + 1; goto _TL25; _TL27: _T24 = i; _T25 = (unsigned int)_T24; _T26 = line; _T27 = _get_fat_size(_T26,sizeof(char)); if (_T25 != _T27) { goto _TL2A; } { struct _tuple0 * _T56 = 0; _npop_handler(0); return _T56; }_TL2A: { int number = 0; { struct Cyc_IntPtr_sa_ScanfArg_struct _T56; _T56.tag = 2; _T56.f1 = &number; _T29 = _T56; }{ struct Cyc_IntPtr_sa_ScanfArg_struct _T56 = _T29; void * _T57[1]; _T57[0] = &_T56; _T2A = line; _T2B = i; _T2C = j - i; _T2D = (unsigned long)_T2C; _T2E = Cyc_substring(_T2A,_T2B,_T2D); _T2F = _tag_fat("%d",sizeof(char),3U); _T30 = _tag_fat(_T57,sizeof(void *),1); _T28 = Cyc_sscanf(_T2E,_T2F,_T30); }if (_T28 == 1) { goto _TL2C; } { struct _tuple0 * _T56 = 0; _npop_handler(0); return _T56; }_TL2C: _TL2E: _T31 = j; _T32 = (unsigned int)_T31; _T33 = line; _T34 = _get_fat_size(_T33,sizeof(char)); if (_T32 < _T34) { goto _TL31; }else { goto _TL30; } _TL31: _T35 = line; _T36 = _T35.curr; _T37 = (char *)_T36; _T38 = _check_null(_T37); _T39 = j; _T3A = _T38[_T39]; _T3B = (int)_T3A; if (_T3B != 34) { goto _TL2F; }else { goto _TL30; } _TL2F: j = j + 1; goto _TL2E; _TL30: j = j + 1; { int k = j; _TL32: _T3C = k; _T3D = (unsigned int)_T3C; _T3E = line; _T3F = _get_fat_size(_T3E,sizeof(char)); if (_T3D < _T3F) { goto _TL35; }else { goto _TL34; } _TL35: _T40 = line; _T41 = _T40.curr; _T42 = (char *)_T41; _T43 = _check_null(_T42); _T44 = k; _T45 = _T43[_T44]; _T46 = (int)_T45; if (_T46 != 34) { goto _TL33; }else { goto _TL34; } _TL33: k = k + 1; goto _TL32; _TL34: _T47 = j; _T48 = (unsigned int)_T47; _T49 = line; _T4A = _get_fat_size(_T49,sizeof(char)); if (_T48 == _T4A) { goto _TL38; }else { goto _TL39; } _TL39: _T4B = k; _T4C = (unsigned int)_T4B; _T4D = line; _T4E = _get_fat_size(_T4D,sizeof(char)); if (_T4C == _T4E) { goto _TL38; }else { goto _TL36; } _TL38: { struct _tuple0 * _T56 = 0; _npop_handler(0); return _T56; }_TL36: _T4F = line; _T50 = j; _T51 = k - j; _T52 = (unsigned long)_T51; { struct _fat_ptr fname = Cyc_substring(_T4F,_T50,_T52); struct _tuple0 * _T56; _T56 = _cycalloc(sizeof(struct _tuple0)); _T56->f0 = fname; _T56->f1 = number; _npop_handler(0); return _T56; } } } } }_pop_handler(); goto _TL1E; _TL1D: _T53 = Cyc_Core_get_exn_thrown(); { void * _T56 = (void *)_T53; return 0; ; }_TL1E: ; } }
int Cyc_Base64_encode(struct _fat_ptr src,struct _fat_ptr dest,unsigned int src_len) { struct _handler_cons * _T0; int _T1; struct _fat_ptr _T2; unsigned int _T3; unsigned int _T4; int _T5; unsigned char * _T6; const char * _T7; int _T8; struct _fat_ptr _T9; unsigned int _TA; int _TB; unsigned char * _TC; const char * _TD; char _TE; int _TF; struct _fat_ptr _T10; unsigned int _T11; int _T12; unsigned char * _T13; const char * _T14; char _T15; char _T16; int _T17; int _T18; int _T19; int _T1A; int _T1B; int _T1C; struct _fat_ptr _T1D; unsigned int _T1E; unsigned int _T1F; int _T20; unsigned char * _T21; char * _T22; char * _T23; int _T24; char * _T25; char * _T26; unsigned int _T27; unsigned char * _T28; char * _T29; struct _fat_ptr _T2A; unsigned int _T2B; unsigned int _T2C; int _T2D; unsigned char * _T2E; char * _T2F; char * _T30; int _T31; char * _T32; char * _T33; unsigned int _T34; unsigned char * _T35; char * _T36; struct _fat_ptr _T37; unsigned int _T38; unsigned int _T39; int _T3A; unsigned char * _T3B; char * _T3C; char * _T3D; int _T3E; char * _T3F; char * _T40; unsigned int _T41; unsigned char * _T42; char * _T43; struct _fat_ptr _T44; unsigned int _T45; unsigned int _T46; int _T47; unsigned char * _T48; char * _T49; char * _T4A; int _T4B; char * _T4C; char * _T4D; unsigned int _T4E; unsigned char * _T4F; char * _T50; unsigned int _T51; int _T52; struct _fat_ptr _T53; unsigned int _T54; int _T55; unsigned char * _T56; char * _T57; unsigned int _T58; unsigned char * _T59; char * _T5A; void * _T5B; struct _handler_cons _T5C; _T0 = &_T5C; _push_handler(_T0); { int _T5D = 0; _T1 = setjmp(_T5C.handler); if (! _T1) { goto _TL2; } _T5D = 1; goto _TL3; _TL2: _TL3: if (_T5D) { goto _TL4; }else { goto _TL6; } _TL6: { unsigned int i = 0U; unsigned int j = 0U; _TL7: if (i < src_len) { goto _TL8; }else { goto _TL9; } _TL8: _T2 = src; _T3 = i; i = _T3 + 1; _T4 = _T3; _T5 = (int)_T4; _T6 = _check_fat_subscript(_T2,sizeof(char),_T5); _T7 = (const char *)_T6; { char b1 = *_T7; if (i >= src_len) { goto _TLA; } _T9 = src; _TA = i; _TB = (int)_TA; _TC = _check_fat_subscript(_T9,sizeof(char),_TB); _TD = (const char *)_TC; _TE = *_TD; _T8 = (int)_TE; goto _TLB; _TLA: _T8 = 0; _TLB: { int b2 = _T8; i = i + 1; if (i >= src_len) { goto _TLC; } _T10 = src; _T11 = i; _T12 = (int)_T11; _T13 = _check_fat_subscript(_T10,sizeof(char),_T12); _T14 = (const char *)_T13; _T15 = *_T14; _TF = (int)_T15; goto _TLD; _TLC: _TF = 0; _TLD: { int b3 = _TF; i = i + 1; _T16 = b1 << 16; _T17 = (int)_T16; _T18 = b2 << 8; _T19 = _T17 | _T18; _T1A = b3; { int r = _T19 | _T1A; int a = r >> 18; _T1B = r >> 12; { int b = _T1B & 63; _T1C = r >> 6; { int c = _T1C & 63; int d = r & 63; _T1D = dest; _T1E = j; j = _T1E + 1; _T1F = _T1E; _T20 = (int)_T1F; { struct _fat_ptr _T5E = _fat_ptr_plus(_T1D,sizeof(char), _T20); _T21 = _check_fat_subscript(_T5E,sizeof(char),0U); _T22 = (char *)_T21; { char _T5F = *_T22; _T23 = Cyc_Base64_encode_map; _T24 = a; _T25 = _check_known_subscript_notnull(_T23,65U,sizeof(char), _T24); _T26 = (char *)_T25; { char _T60 = *_T26; _T27 = _get_fat_size(_T5E,sizeof(char)); if (_T27 != 1U) { goto _TLE; } if (_T5F != 0) { goto _TLE; } if (_T60 == 0) { goto _TLE; } _throw_arraybounds(); goto _TLF; _TLE: _TLF: _T28 = _T5E.curr; _T29 = (char *)_T28; *_T29 = _T60; } } }_T2A = dest; _T2B = j; j = _T2B + 1; _T2C = _T2B; _T2D = (int)_T2C; { struct _fat_ptr _T5E = _fat_ptr_plus(_T2A,sizeof(char), _T2D); _T2E = _check_fat_subscript(_T5E,sizeof(char),0U); _T2F = (char *)_T2E; { char _T5F = *_T2F; _T30 = Cyc_Base64_encode_map; _T31 = b; _T32 = _check_known_subscript_notnull(_T30,65U,sizeof(char), _T31); _T33 = (char *)_T32; { char _T60 = *_T33; _T34 = _get_fat_size(_T5E,sizeof(char)); if (_T34 != 1U) { goto _TL10; } if (_T5F != 0) { goto _TL10; } if (_T60 == 0) { goto _TL10; } _throw_arraybounds(); goto _TL11; _TL10: _TL11: _T35 = _T5E.curr; _T36 = (char *)_T35; *_T36 = _T60; } } }_T37 = dest; _T38 = j; j = _T38 + 1; _T39 = _T38; _T3A = (int)_T39; { struct _fat_ptr _T5E = _fat_ptr_plus(_T37,sizeof(char), _T3A); _T3B = _check_fat_subscript(_T5E,sizeof(char),0U); _T3C = (char *)_T3B; { char _T5F = *_T3C; _T3D = Cyc_Base64_encode_map; _T3E = c; _T3F = _check_known_subscript_notnull(_T3D,65U,sizeof(char), _T3E); _T40 = (char *)_T3F; { char _T60 = *_T40; _T41 = _get_fat_size(_T5E,sizeof(char)); if (_T41 != 1U) { goto _TL12; } if (_T5F != 0) { goto _TL12; } if (_T60 == 0) { goto _TL12; } _throw_arraybounds(); goto _TL13; _TL12: _TL13: _T42 = _T5E.curr; _T43 = (char *)_T42; *_T43 = _T60; } } }_T44 = dest; _T45 = j; j = _T45 + 1; _T46 = _T45; _T47 = (int)_T46; { struct _fat_ptr _T5E = _fat_ptr_plus(_T44,sizeof(char), _T47); _T48 = _check_fat_subscript(_T5E,sizeof(char),0U); _T49 = (char *)_T48; { char _T5F = *_T49; _T4A = Cyc_Base64_encode_map; _T4B = d; _T4C = _check_known_subscript_notnull(_T4A,65U,sizeof(char), _T4B); _T4D = (char *)_T4C; { char _T60 = *_T4D; _T4E = _get_fat_size(_T5E,sizeof(char)); if (_T4E != 1U) { goto _TL14; } if (_T5F != 0) { goto _TL14; } if (_T60 == 0) { goto _TL14; } _throw_arraybounds(); goto _TL15; _TL14: _TL15: _T4F = _T5E.curr; _T50 = (char *)_T4F; *_T50 = _T60; } } } } } } } } }goto _TL7; _TL9: { unsigned int k = i - src_len; _TL19: _T51 = k; _T52 = (int)_T51; if (_T52) { goto _TL17; }else { goto _TL18; } _TL17: _T53 = dest; _T54 = j - k; _T55 = (int)_T54; { struct _fat_ptr _T5E = _fat_ptr_plus(_T53,sizeof(char),_T55); _T56 = _check_fat_subscript(_T5E,sizeof(char),0U); _T57 = (char *)_T56; { char _T5F = *_T57; char _T60 = '='; _T58 = _get_fat_size(_T5E,sizeof(char)); if (_T58 != 1U) { goto _TL1A; } if (_T5F != 0) { goto _TL1A; } if (_T60 == 0) { goto _TL1A; } _throw_arraybounds(); goto _TL1B; _TL1A: _TL1B: _T59 = _T5E.curr; _T5A = (char *)_T59; *_T5A = _T60; } }k = k + -1; goto _TL19; _TL18: ; }{ int _T5E = 0; _npop_handler(0); return _T5E; } }_pop_handler(); goto _TL5; _TL4: _T5B = Cyc_Core_get_exn_thrown(); { void * _T5E = (void *)_T5B; return 1; ; }_TL5: ; } }
void _pop_handler() { /* if (_top_frame() == NULL || _top_frame()->tag != 0) { */ /* errquit("internal error: _pop_handler"); */ /* } */ _npop_handler(0); }
void * Cyc_Queue_take_match(struct _RegionHandle * r,struct Cyc_Queue_Queue * q, long (* f)(void *,void *),void * env) { long _T0; long _T1; long _T2; long _T3; void * _T4; long _T5; long _T6; struct _RegionHandle * _T7; struct Cyc_Queue_Queue * _T8; void * _T9; struct _RegionHandle _TA = _new_region(0U,"g"); struct _RegionHandle * g = &_TA; _push_region(g); { struct Cyc_Queue_Queue * saveq = Cyc_Queue_rcreate(g); void * x = 0; long ok = 0; _T0 = Cyc_Queue_is_empty(q); if (! _T0) { goto _TL18; } { void * _TB = 0; _npop_handler(0); return _TB; }_TL18: _TL1A: x = Cyc_Queue_ptr_take(q); _T1 = f(env,x); if (! _T1) { goto _TL1C; } ok = 1; goto _TL1D; _TL1C: _TL1D: Cyc_Queue_rpush(g,saveq,x); _T2 = ok; if (! _T2) { goto _TL1E; } goto _TL1B; _TL1E: _T3 = Cyc_Queue_is_empty(q); if (_T3) { goto _TL1B; }else { goto _TL1A; } _TL1B: _T5 = ok; if (! _T5) { goto _TL20; } _T4 = Cyc_Queue_ptr_take(saveq); goto _TL21; _TL20: _T4 = 0; _TL21: x = _T4; _TL22: _T6 = Cyc_Queue_is_empty(saveq); if (_T6) { goto _TL24; }else { goto _TL23; } _TL23: _T7 = r; _T8 = q; _T9 = Cyc_Queue_ptr_take(saveq); Cyc_Queue_rpush(_T7,_T8,_T9); goto _TL22; _TL24: { void * _TB = x; _npop_handler(0); return _TB; } }_pop_region(); }
static int Cyc_Compact_most_frequent_elt(struct _fat_ptr v) { struct Cyc_Hashtable_Table * (* _T0)(int,int (*)(int,int),int (*)(int)); struct Cyc_Hashtable_Table * (* _T1)(int,int (*)(void *,void *),int (*)(void *)); int (* _T2)(int,int); int (* _T3)(int); void * (* _T4)(void *); int _T5; unsigned int _T6; struct _fat_ptr _T7; unsigned int _T8; struct _fat_ptr _T9; unsigned char * _TA; int * _TB; int * _TC; int _TD; struct _handler_cons * _TE; int _TF; int * (* _T10)(struct Cyc_Hashtable_Table *,int); void * (* _T11)(struct Cyc_Hashtable_Table *,void *); void * _T12; struct Cyc_Core_Not_found_exn_struct * _T13; char * _T14; char * _T15; int * _T16; struct _RegionHandle * _T17; void (* _T18)(struct Cyc_Hashtable_Table *,int,int *); void (* _T19)(struct Cyc_Hashtable_Table *,void *,void *); int * _T1A; int _T1B; int * _T1C; struct _RegionHandle _T1D = _new_region(0U,"rgn"); struct _RegionHandle * rgn = &_T1D; _push_region(rgn); _T1 = Cyc_Hashtable_create; { struct Cyc_Hashtable_Table * (* _T1E)(int,int (*)(int,int),int (*)(int)) = (struct Cyc_Hashtable_Table * (*)(int, int (*)(int, int), int (*)(int)))_T1; _T0 = _T1E; }_T2 = Cyc_Core_intcmp; _T4 = Cyc_Core_identity; { int (* _T1E)(int) = (int (*)(int))_T4; _T3 = _T1E; }{ struct Cyc_Hashtable_Table * frequencies = _T0(17,_T2,_T3); int max_freq = 0; int most_freq = 0; { int i = 0; _TL3: _T5 = i; _T6 = (unsigned int)_T5; _T7 = v; _T8 = _get_fat_size(_T7,sizeof(int)); if (_T6 < _T8) { goto _TL1; }else { goto _TL2; } _TL1: _T9 = v; _TA = _T9.curr; _TB = (int *)_TA; _TC = _check_null(_TB); _TD = i; { int e = _TC[_TD]; int * r; { struct _handler_cons _T1E; _TE = &_T1E; _push_handler(_TE); { int _T1F = 0; _TF = setjmp(_T1E.handler); if (! _TF) { goto _TL4; } _T1F = 1; goto _TL5; _TL4: _TL5: if (_T1F) { goto _TL6; }else { goto _TL8; } _TL8: _T11 = Cyc_Hashtable_lookup; { int * (* _T20)(struct Cyc_Hashtable_Table *,int) = (int * (*)(struct Cyc_Hashtable_Table *, int))_T11; _T10 = _T20; }r = _T10(frequencies,e); _pop_handler(); goto _TL7; _TL6: _T12 = Cyc_Core_get_exn_thrown(); { void * _T20 = (void *)_T12; void * _T21; _T13 = (struct Cyc_Core_Not_found_exn_struct *)_T20; _T14 = _T13->tag; _T15 = Cyc_Core_Not_found; if (_T14 != _T15) { goto _TL9; } _T17 = rgn; { int * _T22 = _region_malloc(_T17,0U,sizeof(int)); *_T22 = 0; _T16 = (int *)_T22; }r = _T16; _T19 = Cyc_Hashtable_insert; { void (* _T22)(struct Cyc_Hashtable_Table *,int,int *) = (void (*)(struct Cyc_Hashtable_Table *, int, int *))_T19; _T18 = _T22; }_T18(frequencies,e,r); goto _LL0; _TL9: _T21 = _T20; { void * exn = _T21; _rethrow(exn); }_LL0: ; }_TL7: ; } }_T1A = r; _T1B = *_T1A; { int f = _T1B + 1; _T1C = r; *_T1C = f; if (f <= max_freq) { goto _TLB; } max_freq = f; most_freq = e; goto _TLC; _TLB: _TLC: ; } }i = i + 1; goto _TL3; _TL2: ; }{ int _T1E = most_freq; _npop_handler(0); return _T1E; } }_pop_region(); }