void Cyc_XP_lshift(int n,struct _fat_ptr z,int m,struct _fat_ptr x,int s,int fill){int _T0;int _T1;int _T2;int _T3;int _T4;int _T5;int _T6;int _T7;int _T8;struct _fat_ptr _T9;int _TA;unsigned char*_TB;unsigned char*_TC;struct _fat_ptr _TD;int _TE;unsigned char*_TF;unsigned char*_T10;struct _fat_ptr _T11;int _T12;unsigned char*_T13;unsigned char*_T14;struct _fat_ptr _T15;int _T16;unsigned char*_T17;unsigned char*_T18;int _T19;int _T1A;struct _fat_ptr _T1B;struct _fat_ptr _T1C;int _T1D;struct _fat_ptr _T1E;unsigned char*_T1F;unsigned char*_T20;int _T21;int _T22;int _T23;_T1=fill; if(!_T1)goto _TL68;_T0=255;goto _TL69;_TL68: _T0=0;_TL69: fill=_T0;{ # 192 int i;int j=n - 1; if(n <= m)goto _TL6A; i=m - 1;goto _TL6B; # 196 _TL6A: _T2=n;_T3=s / 8;_T4=_T2 - _T3;i=_T4 - 1;_TL6B: _TL6F: _T5=j;_T6=m;_T7=s / 8;_T8=_T6 + _T7;if(_T5 >= _T8)goto _TL6D;else{goto _TL6E;} _TL6D: _T9=z;_TA=j;_TB=_check_fat_subscript(_T9,sizeof(unsigned char),_TA);_TC=(unsigned char*)_TB;*_TC='\000'; # 197 j=j + -1;goto _TL6F;_TL6E: # 199 _TL73: if(i >= 0)goto _TL71;else{goto _TL72;} _TL71: _TD=z;_TE=j;_TF=_check_fat_subscript(_TD,sizeof(unsigned char),_TE);_T10=(unsigned char*)_TF;_T11=x;_T12=i;_T13=_check_fat_subscript(_T11,sizeof(unsigned char),_T12);_T14=(unsigned char*)_T13;*_T10=*_T14; # 199 i=i + -1;j=j + -1;goto _TL73;_TL72: # 201 _TL77: if(j >= 0)goto _TL75;else{goto _TL76;} _TL75: _T15=z;_T16=j;_T17=_check_fat_subscript(_T15,sizeof(unsigned char),_T16);_T18=(unsigned char*)_T17;_T19=fill;*_T18=(unsigned char)_T19; # 201 j=j + -1;goto _TL77;_TL76:;} # 204 s=s % 8; if(s <= 0)goto _TL78;_T1A=n;_T1B=z;_T1C=z;_T1D=1 << s; # 207 Cyc_XP_product(_T1A,_T1B,_T1C,_T1D);_T1E=z;_T1F=_check_fat_subscript(_T1E,sizeof(unsigned char),0);_T20=(unsigned char*)_T1F;_T21=fill;_T22=8 - s;_T23=_T21 >> _T22; *_T20=*_T20 | _T23;goto _TL79;_TL78: _TL79:;}
unsigned long Cyc_XP_fromint(int n,struct _fat_ptr z,unsigned long u){ int i=0; do{ *((unsigned char*)_check_fat_subscript(z,sizeof(unsigned char),i ++))=(unsigned char)(u % (unsigned long)(1 << 8));}while( (u /=(unsigned long)(1 << 8))> (unsigned long)0 && i < n); for(0;i < n;++ i){ *((unsigned char*)_check_fat_subscript(z,sizeof(unsigned char),i))='\000';} return u;}
void Cyc_Array_imp_rev(struct _fat_ptr x) { struct _fat_ptr _T0; unsigned int _T1; unsigned int _T2; struct _fat_ptr _T3; int _T4; unsigned char * _T5; void * * _T6; struct _fat_ptr _T7; unsigned char * _T8; void * * _T9; int _TA; struct _fat_ptr _TB; int _TC; unsigned char * _TD; void * * _TE; struct _fat_ptr _TF; unsigned char * _T10; void * * _T11; int _T12; void * temp; int i = 0; _T0 = x; _T1 = _get_fat_size(_T0,sizeof(void *)); _T2 = _T1 - 1U; { int j = (int)_T2; _TLA5: if (i < j) { goto _TLA6; }else { goto _TLA7; } _TLA6: _T3 = x; _T4 = i; _T5 = _check_fat_subscript(_T3,sizeof(void *),_T4); _T6 = (void * *)_T5; temp = *_T6; _T7 = x; _T8 = _T7.curr; _T9 = (void * *)_T8; _TA = i; _TB = x; _TC = j; _TD = _check_fat_subscript(_TB,sizeof(void *),_TC); _TE = (void * *)_TD; _T9[_TA] = *_TE; _TF = x; _T10 = _TF.curr; _T11 = (void * *)_T10; _T12 = j; _T11[_T12] = temp; i = i + 1; j = j + -1; goto _TLA5; _TLA7: ; } }
unsigned long Cyc_XP_fromint(int n,struct _fat_ptr z,unsigned long u){struct _fat_ptr _T0;int _T1;int _T2;unsigned char*_T3;unsigned char*_T4;unsigned long _T5;unsigned long _T6;struct _fat_ptr _T7;int _T8;unsigned char*_T9;unsigned char*_TA;unsigned long _TB; int i=0; # 20 _TL0: _T0=z;_T1=i;i=_T1 + 1;_T2=_T1;_T3=_check_fat_subscript(_T0,sizeof(unsigned char),_T2);_T4=(unsigned char*)_T3;_T5=u % 256U;*_T4=(unsigned char)_T5; u=u / 256U;_T6=u; # 19 if(_T6 > 0U)goto _TL2;else{goto _TL1;}_TL2: if(i < n)goto _TL0;else{goto _TL1;}_TL1: # 22 _TL6: if(i < n)goto _TL4;else{goto _TL5;} _TL4: _T7=z;_T8=i;_T9=_check_fat_subscript(_T7,sizeof(unsigned char),_T8);_TA=(unsigned char*)_T9;*_TA='\000'; # 22 i=i + 1;goto _TL6;_TL5: _TB=u; # 24 return _TB;}
void Cyc_Xarray_set(struct Cyc_Xarray_Xarray * xarr,int i,void * a) { int _T0; struct Cyc_Xarray_Xarray * _T1; int _T2; struct Cyc_Core_Invalid_argument_exn_struct * _T3; void * _T4; struct Cyc_Xarray_Xarray * _T5; struct _fat_ptr _T6; int _T7; unsigned char * _T8; void * * _T9; if (i < 0) { goto _TL6; }else { goto _TL7; } _TL7: _T0 = i; _T1 = xarr; _T2 = _T1->num_elmts; if (_T0 >= _T2) { goto _TL6; }else { goto _TL4; } _TL6: { struct Cyc_Core_Invalid_argument_exn_struct * _TA = _cycalloc(sizeof(struct Cyc_Core_Invalid_argument_exn_struct)); _TA->tag = Cyc_Core_Invalid_argument; _TA->f1 = _tag_fat("Xarray::set: bad index",sizeof(char),23U); _T3 = (struct Cyc_Core_Invalid_argument_exn_struct *)_TA; }_T4 = (void *)_T3; _throw(_T4); goto _TL5; _TL4: _TL5: _T5 = xarr; _T6 = _T5->elmts; _T7 = i; _T8 = _check_fat_subscript(_T6,sizeof(void *),_T7); _T9 = (void * *)_T8; *_T9 = a; }
void Cyc_Xarray_iter(void (* f)(void *),struct Cyc_Xarray_Xarray * xarr) { int _T0; struct Cyc_Xarray_Xarray * _T1; int _T2; struct Cyc_Xarray_Xarray * _T3; struct _fat_ptr _T4; int _T5; unsigned char * _T6; void * * _T7; void * _T8; int i = 0; _TL47: _T0 = i; _T1 = xarr; _T2 = _T1->num_elmts; if (_T0 < _T2) { goto _TL45; }else { goto _TL46; } _TL45: _T3 = xarr; _T4 = _T3->elmts; _T5 = i; _T6 = _check_fat_subscript(_T4,sizeof(void *),_T5); _T7 = (void * *)_T6; _T8 = *_T7; f(_T8); i = i + 1; goto _TL47; _TL46: ; }
void Cyc_Xarray_iter_c(void (* f)(void *,void *),void * env,struct Cyc_Xarray_Xarray * xarr) { int _T0; struct Cyc_Xarray_Xarray * _T1; int _T2; void * _T3; struct Cyc_Xarray_Xarray * _T4; struct _fat_ptr _T5; int _T6; unsigned char * _T7; void * * _T8; void * _T9; int i = 0; _TL4B: _T0 = i; _T1 = xarr; _T2 = _T1->num_elmts; if (_T0 < _T2) { goto _TL49; }else { goto _TL4A; } _TL49: _T3 = env; _T4 = xarr; _T5 = _T4->elmts; _T6 = i; _T7 = _check_fat_subscript(_T5,sizeof(void *),_T6); _T8 = (void * *)_T7; _T9 = *_T8; f(_T3,_T9); i = i + 1; goto _TL4B; _TL4A: ; }
unsigned long Cyc_XP_toint(int n,struct _fat_ptr x){unsigned _T0;int _T1;unsigned long _T2;struct _fat_ptr _T3;int _T4;unsigned char*_T5;unsigned char*_T6;unsigned char _T7;unsigned long _T8;unsigned long _T9; unsigned long u=0U;_T0=sizeof(u);{ int i=(int)_T0; if(i <= n)goto _TL7; i=n;goto _TL8;_TL7: _TL8: _TL9: i=i + -1;_T1=i;if(_T1 >= 0)goto _TLA;else{goto _TLB;} _TLA: _T2=256U * u;_T3=x;_T4=i;_T5=_check_fat_subscript(_T3,sizeof(unsigned char),_T4);_T6=(unsigned char*)_T5;_T7=*_T6;_T8=(unsigned long)_T7;u=_T2 + _T8;goto _TL9;_TLB: _T9=u; return _T9;}}
unsigned long Cyc_XP_toint(int n,struct _fat_ptr x){ unsigned long u=0U; int i=(int)sizeof(u); if(i > n) i=n; # 29 while(-- i >= 0){ # 32 u=(unsigned long)(1 << 8)* u + (unsigned long)*((unsigned char*)_check_fat_subscript(x,sizeof(unsigned char),i));} return u;}
int Cyc_XP_add(int n,struct _fat_ptr z,struct _fat_ptr x,struct _fat_ptr y,int carry){struct _fat_ptr _T0;int _T1;unsigned char*_T2;unsigned char*_T3;unsigned char _T4;int _T5;struct _fat_ptr _T6;int _T7;unsigned char*_T8;unsigned char*_T9;unsigned char _TA;int _TB;int _TC;struct _fat_ptr _TD;int _TE;unsigned char*_TF;unsigned char*_T10;int _T11;int _T12;int _T13;int _T14;int _T15; int i; i=0;_TL13: if(i < n)goto _TL11;else{goto _TL12;} _TL11: _T0=x;_T1=i;_T2=_check_fat_subscript(_T0,sizeof(unsigned char),_T1);_T3=(unsigned char*)_T2;_T4=*_T3;_T5=(int)_T4;_T6=y;_T7=i;_T8=_check_fat_subscript(_T6,sizeof(unsigned char),_T7);_T9=(unsigned char*)_T8;_TA=*_T9;_TB=(int)_TA;_TC=_T5 + _TB;carry=carry + _TC;_TD=z;_TE=i;_TF=_check_fat_subscript(_TD,sizeof(unsigned char),_TE);_T10=(unsigned char*)_TF;_T11=carry;_T12=1 << 8;_T13=_T11 % _T12; *_T10=(unsigned char)_T13;_T14=1 << 8; carry=carry / _T14; # 42 i=i + 1;goto _TL13;_TL12: _T15=carry; # 47 return _T15;}
void Cyc_XP_rshift(int n,struct _fat_ptr z,int m,struct _fat_ptr x,int s,int fill){int _T0;int _T1;struct _fat_ptr _T2;int _T3;unsigned char*_T4;unsigned char*_T5;struct _fat_ptr _T6;int _T7;unsigned char*_T8;unsigned char*_T9;struct _fat_ptr _TA;int _TB;unsigned char*_TC;unsigned char*_TD;int _TE;int _TF;struct _fat_ptr _T10;struct _fat_ptr _T11;int _T12;struct _fat_ptr _T13;int _T14;unsigned char*_T15;unsigned char*_T16;int _T17;int _T18;int _T19;_T1=fill; if(!_T1)goto _TL7A;_T0=255;goto _TL7B;_TL7A: _T0=0;_TL7B: fill=_T0;{ # 214 int i;int j=0; i=s / 8;_TL7F: if(i < m)goto _TL80;else{goto _TL7E;}_TL80: if(j < n)goto _TL7D;else{goto _TL7E;} _TL7D: _T2=z;_T3=j;_T4=_check_fat_subscript(_T2,sizeof(unsigned char),_T3);_T5=(unsigned char*)_T4;_T6=x;_T7=i;_T8=_check_fat_subscript(_T6,sizeof(unsigned char),_T7);_T9=(unsigned char*)_T8;*_T5=*_T9; # 215 i=i + 1;j=j + 1;goto _TL7F;_TL7E: # 217 _TL84: if(j < n)goto _TL82;else{goto _TL83;} _TL82: _TA=z;_TB=j;_TC=_check_fat_subscript(_TA,sizeof(unsigned char),_TB);_TD=(unsigned char*)_TC;_TE=fill;*_TD=(unsigned char)_TE; # 217 j=j + 1;goto _TL84;_TL83:;} # 220 s=s % 8; if(s <= 0)goto _TL85;_TF=n;_T10=z;_T11=z;_T12=1 << s; # 223 Cyc_XP_quotient(_TF,_T10,_T11,_T12);_T13=z;_T14=n - 1;_T15=_check_fat_subscript(_T13,sizeof(unsigned char),_T14);_T16=(unsigned char*)_T15;_T17=fill;_T18=8 - s;_T19=_T17 << _T18; *_T16=*_T16 | _T19;goto _TL86;_TL85: _TL86:;}
int Cyc_XP_neg(int n,struct _fat_ptr z,struct _fat_ptr x,int carry){struct _fat_ptr _T0;int _T1;unsigned char*_T2;unsigned char*_T3;unsigned char _T4;unsigned char _T5;int _T6;struct _fat_ptr _T7;int _T8;unsigned char*_T9;unsigned char*_TA;int _TB;int _TC;int _TD;int _TE;int _TF; int i; i=0;_TL23: if(i < n)goto _TL21;else{goto _TL22;} _TL21: _T0=x;_T1=i;_T2=_check_fat_subscript(_T0,sizeof(unsigned char),_T1);_T3=(unsigned char*)_T2;_T4=*_T3;_T5=~ _T4;_T6=(int)_T5;carry=carry + _T6;_T7=z;_T8=i;_T9=_check_fat_subscript(_T7,sizeof(unsigned char),_T8);_TA=(unsigned char*)_T9;_TB=carry;_TC=1 << 8;_TD=_TB % _TC; *_TA=(unsigned char)_TD;_TE=1 << 8; carry=carry / _TE; # 78 i=i + 1;goto _TL23;_TL22: _TF=carry; # 83 return _TF;}
int Cyc_XP_sub(int n,struct _fat_ptr z,struct _fat_ptr x,struct _fat_ptr y,int borrow){struct _fat_ptr _T0;int _T1;unsigned char*_T2;unsigned char*_T3;unsigned char _T4;int _T5;int _T6;int _T7;int _T8;int _T9;struct _fat_ptr _TA;int _TB;unsigned char*_TC;unsigned char*_TD;unsigned char _TE;int _TF;struct _fat_ptr _T10;int _T11;unsigned char*_T12;unsigned char*_T13;int _T14;int _T15;int _T16;int _T17;int _T18;int _T19;int _T1A; int i; i=0;_TL17: if(i < n)goto _TL15;else{goto _TL16;} _TL15: _T0=x;_T1=i;_T2=_check_fat_subscript(_T0,sizeof(unsigned char),_T1);_T3=(unsigned char*)_T2;_T4=*_T3;_T5=(int)_T4;_T6=1 << 8;_T7=_T5 + _T6;_T8=borrow;_T9=_T7 - _T8;_TA=y;_TB=i;_TC=_check_fat_subscript(_TA,sizeof(unsigned char),_TB);_TD=(unsigned char*)_TC;_TE=*_TD;_TF=(int)_TE;{int d=_T9 - _TF;_T10=z;_T11=i;_T12=_check_fat_subscript(_T10,sizeof(unsigned char),_T11);_T13=(unsigned char*)_T12;_T14=d;_T15=1 << 8;_T16=_T14 % _T15; *_T13=(unsigned char)_T16;_T17=d;_T18=1 << 8;_T19=_T17 / _T18; borrow=1 - _T19;} # 51 i=i + 1;goto _TL17;_TL16: _T1A=borrow; # 56 return _T1A;}
int Cyc_XP_diff(int n,struct _fat_ptr z,struct _fat_ptr x,int y){struct _fat_ptr _T0;int _T1;unsigned char*_T2;unsigned char*_T3;unsigned char _T4;int _T5;int _T6;int _T7;int _T8;struct _fat_ptr _T9;int _TA;unsigned char*_TB;unsigned char*_TC;int _TD;int _TE;int _TF;int _T10;int _T11;int _T12;int _T13; int i; i=0;_TL1F: if(i < n)goto _TL1D;else{goto _TL1E;} _TL1D: _T0=x;_T1=i;_T2=_check_fat_subscript(_T0,sizeof(unsigned char),_T1);_T3=(unsigned char*)_T2;_T4=*_T3;_T5=(int)_T4;_T6=1 << 8;_T7=_T5 + _T6;_T8=y;{int d=_T7 - _T8;_T9=z;_TA=i;_TB=_check_fat_subscript(_T9,sizeof(unsigned char),_TA);_TC=(unsigned char*)_TB;_TD=d;_TE=1 << 8;_TF=_TD % _TE; *_TC=(unsigned char)_TF;_T10=d;_T11=1 << 8;_T12=_T10 / _T11; y=1 - _T12;} # 69 i=i + 1;goto _TL1F;_TL1E: _T13=y; # 74 return _T13;}
int Cyc_XP_sum(int n,struct _fat_ptr z,struct _fat_ptr x,int y){struct _fat_ptr _T0;int _T1;unsigned char*_T2;unsigned char*_T3;unsigned char _T4;int _T5;struct _fat_ptr _T6;int _T7;unsigned char*_T8;unsigned char*_T9;int _TA;int _TB;int _TC;int _TD;int _TE; int i; i=0;_TL1B: if(i < n)goto _TL19;else{goto _TL1A;} _TL19: _T0=x;_T1=i;_T2=_check_fat_subscript(_T0,sizeof(unsigned char),_T1);_T3=(unsigned char*)_T2;_T4=*_T3;_T5=(int)_T4;y=y + _T5;_T6=z;_T7=i;_T8=_check_fat_subscript(_T6,sizeof(unsigned char),_T7);_T9=(unsigned char*)_T8;_TA=y;_TB=1 << 8;_TC=_TA % _TB; *_T9=(unsigned char)_TC;_TD=1 << 8; y=y / _TD; # 60 i=i + 1;goto _TL1B;_TL1A: _TE=y; # 65 return _TE;}
int Cyc_XP_quotient(int n,struct _fat_ptr z,struct _fat_ptr x,int y){unsigned _T0;struct _fat_ptr _T1;int _T2;unsigned char*_T3;unsigned char*_T4;unsigned char _T5;unsigned _T6;struct _fat_ptr _T7;int _T8;unsigned char*_T9;unsigned char*_TA;unsigned _TB;int _TC;unsigned _TD;unsigned _TE;int _TF;unsigned _T10;unsigned _T11;int _T12; int i; unsigned carry=0U; i=n - 1;_TL63: if(i >= 0)goto _TL61;else{goto _TL62;} _TL61: _T0=carry * 256U;_T1=x;_T2=i;_T3=_check_fat_subscript(_T1,sizeof(unsigned char),_T2);_T4=(unsigned char*)_T3;_T5=*_T4;_T6=(unsigned)_T5;carry=_T0 + _T6;_T7=z;_T8=i;_T9=_check_fat_subscript(_T7,sizeof(unsigned char),_T8);_TA=(unsigned char*)_T9;_TB=carry;_TC=y;_TD=(unsigned)_TC;_TE=_TB / _TD; *_TA=(unsigned char)_TE;_TF=y;_T10=(unsigned)_TF; carry=carry % _T10; # 176 i=i + -1;goto _TL63;_TL62: _T11=carry;_T12=(int)_T11; # 181 return _T12;}
int Cyc_XP_product(int n,struct _fat_ptr z,struct _fat_ptr x,int y){struct _fat_ptr _T0;int _T1;unsigned char*_T2;unsigned char*_T3;unsigned char _T4;int _T5;int _T6;int _T7;unsigned _T8;struct _fat_ptr _T9;int _TA;unsigned char*_TB;unsigned char*_TC;unsigned _TD;unsigned _TE;int _TF; int i; unsigned carry=0U; i=0;_TL33: if(i < n)goto _TL31;else{goto _TL32;} _TL31: _T0=x;_T1=i;_T2=_check_fat_subscript(_T0,sizeof(unsigned char),_T1);_T3=(unsigned char*)_T2;_T4=*_T3;_T5=(int)_T4;_T6=y;_T7=_T5 * _T6;_T8=(unsigned)_T7;carry=carry + _T8;_T9=z;_TA=i;_TB=_check_fat_subscript(_T9,sizeof(unsigned char),_TA);_TC=(unsigned char*)_TB;_TD=carry % 256U; *_TC=(unsigned char)_TD; carry=carry / 256U; # 106 i=i + 1;goto _TL33;_TL32: _TE=carry;_TF=(int)_TE; # 111 return _TF;}
struct Cyc_APQ_T*Cyc_APQ_fromstr(struct _fat_ptr str,int base){void*_T0;struct _fat_ptr _T1;unsigned char*_T2;const char*_T3;char _T4;int _T5;struct _fat_ptr _T6;unsigned char*_T7;const char*_T8;char _T9;int _TA;struct _fat_ptr*_TB;struct Cyc_APQ_T*_TC;struct _fat_ptr _TD;unsigned char*_TE;const char*_TF;int _T10;struct _fat_ptr _T11;unsigned char*_T12;const char*_T13;char _T14;int _T15;struct _fat_ptr _T16;struct _fat_ptr _T17;unsigned char*_T18;const char*_T19;int _T1A;int _T1B;struct Cyc_APQ_T*_T1C;struct Cyc_Invalid_argument_exn_struct*_T1D;void*_T1E;struct Cyc_APQ_T*_T1F;struct Cyc_APQ_T*_T20;_T0=_cycalloc(sizeof(struct Cyc_APQ_T));{ struct Cyc_APQ_T*q=(struct Cyc_APQ_T*)_T0; struct _fat_ptr s=str; _TL6: _T1=s;_T2=_check_fat_subscript(_T1,sizeof(char),0U);_T3=(const char*)_T2;_T4=*_T3;_T5=(int)_T4;if(_T5)goto _TL9;else{goto _TL8;}_TL9: _T6=s;_T7=_T6.curr;_T8=(const char*)_T7;_T9=*_T8;_TA=(int)_T9;if(_TA!=47)goto _TL7;else{goto _TL8;}_TL7: _TB=& s;_fat_ptr_inplace_plus(_TB,sizeof(char),1);goto _TL6;_TL8: _TC=q;_TD=str;_TE=_untag_fat_ptr_check_bound(_TD,sizeof(char),1U);_TF=(const char*)_TE;_T10=base; _TC->n=Cyc_AP_fromstr(_TF,_T10);_T11=s;_T12=_T11.curr;_T13=(const char*)_T12;_T14=*_T13;_T15=(int)_T14; if(!_T15)goto _TLA;_T16=s;_T17= _fat_ptr_plus(_T16,sizeof(char),1);_T18=_untag_fat_ptr_check_bound(_T17,sizeof(char),1U);_T19=(const char*)_T18;_T1A=base;{struct Cyc_AP_T*d=Cyc_AP_fromstr(_T19,_T1A);_T1B= Cyc_AP_cmp(d,Cyc_AP_zero);if(!_T1B)goto _TLC;_T1C=q; _T1C->d=d;goto _TLD; _TLC:{struct Cyc_Invalid_argument_exn_struct*_T21=_cycalloc(sizeof(struct Cyc_Invalid_argument_exn_struct));_T21->tag=Cyc_Invalid_argument;_T21->f1=_tag_fat("APQ_fromstr: malformed string",sizeof(char),30U);_T1D=(struct Cyc_Invalid_argument_exn_struct*)_T21;}_T1E=(void*)_T1D;_throw(_T1E);_TLD:;}goto _TLB; # 54 _TLA: _T1F=q;_T1F->d=Cyc_AP_one;_TLB: _T20= Cyc_reduce(q);return _T20;}}
struct _fat_ptr Cyc_XP_tostr(struct _fat_ptr str,int size,int base,int n,struct _fat_ptr x){struct _fat_ptr _T0;unsigned char*_T1;unsigned _T2;int(*_T3)(struct _fat_ptr,struct _fat_ptr,unsigned);void*(*_T4)(struct _fat_ptr,struct _fat_ptr,unsigned);struct _fat_ptr _T5;struct _fat_ptr _T6;int(*_T7)(struct _fat_ptr,struct _fat_ptr,unsigned);void*(*_T8)(struct _fat_ptr,struct _fat_ptr,unsigned);struct _fat_ptr _T9;struct _fat_ptr _TA;int(*_TB)(struct _fat_ptr,struct _fat_ptr,unsigned);void*(*_TC)(struct _fat_ptr,struct _fat_ptr,unsigned);struct _fat_ptr _TD;struct _fat_ptr _TE;struct _fat_ptr _TF;int _T10;int _T11;unsigned char*_T12;char*_T13;struct _fat_ptr _T14;int _T15;unsigned char*_T16;const char*_T17;unsigned _T18;unsigned char*_T19;char*_T1A;struct _fat_ptr _T1B;int _T1C;unsigned char*_T1D;unsigned char*_T1E;unsigned char _T1F;int _T20;struct _fat_ptr _T21;unsigned char*_T22;unsigned char*_T23;unsigned char _T24;int _T25;int(*_T26)(struct _fat_ptr,struct _fat_ptr,unsigned);void*(*_T27)(struct _fat_ptr,struct _fat_ptr,unsigned);struct _fat_ptr _T28;struct _fat_ptr _T29;struct _fat_ptr _T2A;int _T2B;unsigned char*_T2C;char*_T2D;unsigned _T2E;unsigned char*_T2F;char*_T30;int _T31;int _T32;struct _fat_ptr _T33;int _T34;unsigned char*_T35;char*_T36;struct _fat_ptr _T37;int _T38;unsigned char*_T39;char*_T3A;struct _fat_ptr _T3B;int _T3C;unsigned char*_T3D;char*_T3E;unsigned _T3F;unsigned char*_T40;char*_T41;struct _fat_ptr _T42;int _T43;unsigned char*_T44;char*_T45;unsigned _T46;unsigned char*_T47;char*_T48;struct _fat_ptr _T49; # 269 int i=0;_T0=str;_T1=_T0.curr;_T2=(unsigned)_T1; if(!_T2)goto _TLAD;goto _TLAE;_TLAD: _T4=Cyc___assert_fail;{int(*_T4A)(struct _fat_ptr,struct _fat_ptr,unsigned)=(int(*)(struct _fat_ptr,struct _fat_ptr,unsigned))_T4;_T3=_T4A;}_T5=_tag_fat("str",sizeof(char),4U);_T6=_tag_fat("xp.cyc",sizeof(char),7U);_T3(_T5,_T6,270U);_TLAE: if(base < 2)goto _TLAF;if(base > 36)goto _TLAF;goto _TLB0;_TLAF: _T8=Cyc___assert_fail;{int(*_T4A)(struct _fat_ptr,struct _fat_ptr,unsigned)=(int(*)(struct _fat_ptr,struct _fat_ptr,unsigned))_T8;_T7=_T4A;}_T9=_tag_fat("base >= 2 && base <= 36",sizeof(char),24U);_TA=_tag_fat("xp.cyc",sizeof(char),7U);_T7(_T9,_TA,271U);_TLB0: # 273 _TLB1:{int r=Cyc_XP_quotient(n,x,x,base); if(i >= size)goto _TLB3;goto _TLB4;_TLB3: _TC=Cyc___assert_fail;{int(*_T4A)(struct _fat_ptr,struct _fat_ptr,unsigned)=(int(*)(struct _fat_ptr,struct _fat_ptr,unsigned))_TC;_TB=_T4A;}_TD=_tag_fat("i < size",sizeof(char),9U);_TE=_tag_fat("xp.cyc",sizeof(char),7U);_TB(_TD,_TE,274U);_TLB4: _TF=str;_T10=i; i=_T10 + 1;_T11=_T10;{struct _fat_ptr _T4A=_fat_ptr_plus(_TF,sizeof(char),_T11);_T12=_check_fat_subscript(_T4A,sizeof(char),0U);_T13=(char*)_T12;{char _T4B=*_T13;_T14=Cyc_digits;_T15=r;_T16=_check_fat_subscript(_T14,sizeof(char),_T15);_T17=(const char*)_T16;{char _T4C=*_T17;_T18=_get_fat_size(_T4A,sizeof(char));if(_T18!=1U)goto _TLB5;if(_T4B!=0)goto _TLB5;if(_T4C==0)goto _TLB5;_throw_arraybounds();goto _TLB6;_TLB5: _TLB6: _T19=_T4A.curr;_T1A=(char*)_T19;*_T1A=_T4C;}}} _TLB7: if(n > 1)goto _TLBA;else{goto _TLB9;}_TLBA: _T1B=x;_T1C=n - 1;_T1D=_check_fat_subscript(_T1B,sizeof(unsigned char),_T1C);_T1E=(unsigned char*)_T1D;_T1F=*_T1E;_T20=(int)_T1F;if(_T20==0)goto _TLB8;else{goto _TLB9;} _TLB8: n=n + -1;goto _TLB7;_TLB9:;} # 272 if(n > 1)goto _TLB1;else{goto _TLBB;}_TLBB: _T21=x;_T22=_check_fat_subscript(_T21,sizeof(unsigned char),0);_T23=(unsigned char*)_T22;_T24=*_T23;_T25=(int)_T24;if(_T25!=0)goto _TLB1;else{goto _TLB2;}_TLB2: # 279 if(i >= size)goto _TLBC;goto _TLBD;_TLBC: _T27=Cyc___assert_fail;{int(*_T4A)(struct _fat_ptr,struct _fat_ptr,unsigned)=(int(*)(struct _fat_ptr,struct _fat_ptr,unsigned))_T27;_T26=_T4A;}_T28=_tag_fat("i < size",sizeof(char),9U);_T29=_tag_fat("xp.cyc",sizeof(char),7U);_T26(_T28,_T29,279U);_TLBD: _T2A=str;_T2B=i;{struct _fat_ptr _T4A=_fat_ptr_plus(_T2A,sizeof(char),_T2B);_T2C=_check_fat_subscript(_T4A,sizeof(char),0U);_T2D=(char*)_T2C;{char _T4B=*_T2D;char _T4C='\000';_T2E=_get_fat_size(_T4A,sizeof(char));if(_T2E!=1U)goto _TLBE;if(_T4B!=0)goto _TLBE;if(_T4C==0)goto _TLBE;_throw_arraybounds();goto _TLBF;_TLBE: _TLBF: _T2F=_T4A.curr;_T30=(char*)_T2F;*_T30=_T4C;}}{ # 282 int j; j=0;_TLC3: _T31=j;i=i + -1;_T32=i;if(_T31 < _T32)goto _TLC1;else{goto _TLC2;} _TLC1: _T33=str;_T34=j;_T35=_check_fat_subscript(_T33,sizeof(char),_T34);_T36=(char*)_T35;{char c=*_T36;_T37=str;_T38=j;{struct _fat_ptr _T4A=_fat_ptr_plus(_T37,sizeof(char),_T38);_T39=_T4A.curr;_T3A=(char*)_T39;{char _T4B=*_T3A;_T3B=str;_T3C=i;_T3D=_check_fat_subscript(_T3B,sizeof(char),_T3C);_T3E=(char*)_T3D;{char _T4C=*_T3E;_T3F=_get_fat_size(_T4A,sizeof(char));if(_T3F!=1U)goto _TLC4;if(_T4B!=0)goto _TLC4;if(_T4C==0)goto _TLC4;_throw_arraybounds();goto _TLC5;_TLC4: _TLC5: _T40=_T4A.curr;_T41=(char*)_T40;*_T41=_T4C;}}}_T42=str;_T43=i;{struct _fat_ptr _T4A=_fat_ptr_plus(_T42,sizeof(char),_T43);_T44=_T4A.curr;_T45=(char*)_T44;{char _T4B=*_T45;char _T4C=c;_T46=_get_fat_size(_T4A,sizeof(char));if(_T46!=1U)goto _TLC6;if(_T4B!=0)goto _TLC6;if(_T4C==0)goto _TLC6;_throw_arraybounds();goto _TLC7;_TLC6: _TLC7: _T47=_T4A.curr;_T48=(char*)_T47;*_T48=_T4C;}}} # 283 j=j + 1;goto _TLC3;_TLC2:;}_T49=str; # 289 return _T49;}
int Cyc_XP_mul(struct _fat_ptr z,int n,struct _fat_ptr x,int m,struct _fat_ptr y){struct _fat_ptr _T0;int _T1;unsigned char*_T2;unsigned char*_T3;unsigned char _T4;int _T5;struct _fat_ptr _T6;int _T7;unsigned char*_T8;unsigned char*_T9;unsigned char _TA;int _TB;int _TC;struct _fat_ptr _TD;int _TE;unsigned char*_TF;unsigned char*_T10;unsigned char _T11;int _T12;int _T13;unsigned _T14;struct _fat_ptr _T15;unsigned char*_T16;unsigned char*_T17;int _T18;unsigned _T19;int _T1A;int _T1B;int _T1C;int _T1D;struct _fat_ptr _T1E;int _T1F;unsigned char*_T20;unsigned char*_T21;unsigned char _T22;unsigned _T23;struct _fat_ptr _T24;unsigned char*_T25;unsigned char*_T26;int _T27;unsigned _T28;unsigned _T29;int _T2A; int i;int j;int carryout=0; i=0;_TL27: if(i < n)goto _TL25;else{goto _TL26;} _TL25:{unsigned carry=0U; j=0;_TL2B: if(j < m)goto _TL29;else{goto _TL2A;} _TL29: _T0=x;_T1=i;_T2=_check_fat_subscript(_T0,sizeof(unsigned char),_T1);_T3=(unsigned char*)_T2;_T4=*_T3;_T5=(int)_T4;_T6=y;_T7=j;_T8=_check_fat_subscript(_T6,sizeof(unsigned char),_T7);_T9=(unsigned char*)_T8;_TA=*_T9;_TB=(int)_TA;_TC=_T5 * _TB;_TD=z;_TE=i + j;_TF=_check_fat_subscript(_TD,sizeof(unsigned char),_TE);_T10=(unsigned char*)_TF;_T11=*_T10;_T12=(int)_T11;_T13=_TC + _T12;_T14=(unsigned)_T13;carry=carry + _T14;_T15=z;_T16=_T15.curr;_T17=(unsigned char*)_T16;_T18=i + j;_T19=carry % 256U; _T17[_T18]=(unsigned char)_T19; carry=carry / 256U; # 89 j=j + 1;goto _TL2B;_TL2A: # 94 _TL2F: _T1A=j;_T1B=n + m;_T1C=i;_T1D=_T1B - _T1C;if(_T1A < _T1D)goto _TL2D;else{goto _TL2E;} _TL2D: _T1E=z;_T1F=i + j;_T20=_check_fat_subscript(_T1E,sizeof(unsigned char),_T1F);_T21=(unsigned char*)_T20;_T22=*_T21;_T23=(unsigned)_T22;carry=carry + _T23;_T24=z;_T25=_T24.curr;_T26=(unsigned char*)_T25;_T27=i + j;_T28=carry % 256U; _T26[_T27]=(unsigned char)_T28; carry=carry / 256U; # 94 j=j + 1;goto _TL2F;_TL2E: _T29=carry; # 99 carryout=carryout | _T29;} # 87 i=i + 1;goto _TL27;_TL26: _T2A=carryout; # 101 return _T2A;}
static int Cyc_Compact_try_pack(struct Cyc_List_List * nondef,struct Cyc_List_List * rem, int b) { int _T0; struct Cyc_List_List * _T1; void * _T2; struct _tuple3 * _T3; struct _fat_ptr _T4; int _T5; unsigned char * _T6; int * _T7; int _T8; int _T9; int _TA; struct Cyc_List_List * _TB; int _TC; int _TD; struct Cyc_List_List * _TE; int _TF; int _T10; if (rem != 0) { goto _TL1F; } _T0 = b; return _T0; _TL1F: _T1 = rem; { struct Cyc_List_List _T11 = *_T1; _T2 = _T11.hd; _T3 = (struct _tuple3 *)_T2; { struct _tuple3 _T12 = *_T3; _T10 = _T12.f0; _TF = _T12.f1; }_TE = _T11.tl; }{ int pos = _T10; int v = _TF; struct Cyc_List_List * rem2 = _TE; _T4 = Cyc_Compact_check; _T5 = b + pos; _T6 = _check_fat_subscript(_T4,sizeof(int),_T5); _T7 = (int *)_T6; _T8 = *_T7; _T9 = - 1; if (_T8 != _T9) { goto _TL21; } _TA = Cyc_Compact_try_pack(nondef,rem2,b); return _TA; _TL21: _TB = nondef; _TC = b + 1; _TD = Cyc_Compact_pack_from(_TB,_TC); return _TD; }; }
struct _fat_ptr Cyc_Array_rev_copy(struct _fat_ptr x) { struct _fat_ptr _T0; unsigned int _T1; struct _fat_ptr _T2; int _T3; void * * _T4; unsigned int _T5; unsigned int _T6; struct _fat_ptr _T7; int _T8; unsigned int _T9; unsigned int _TA; unsigned int _TB; int _TC; unsigned char * _TD; void * * _TE; _T0 = x; _T1 = _get_fat_size(_T0,sizeof(void *)); { int sx = (int)_T1; int n = sx - 1; _T3 = sx; { unsigned int _TF = (unsigned int)_T3; _T5 = _check_times(_TF,sizeof(void *)); { void * * _T10 = _cycalloc(_T5); { unsigned int _T11 = _TF; unsigned int i; i = 0; _TLA4: if (i < _T11) { goto _TLA2; }else { goto _TLA3; } _TLA2: _T6 = i; _T7 = x; _T8 = n; _T9 = (unsigned int)_T8; _TA = i; _TB = _T9 - _TA; _TC = (int)_TB; _TD = _check_fat_subscript(_T7,sizeof(void *),_TC); _TE = (void * *)_TD; _T10[_T6] = *_TE; i = i + 1; goto _TLA4; _TLA3: ; }_T4 = (void * *)_T10; }_T2 = _tag_fat(_T4,sizeof(void *),_TF); }return _T2; } }
void * Cyc_Xarray_get(struct Cyc_Xarray_Xarray * xarr,int i) { int _T0; struct Cyc_Xarray_Xarray * _T1; int _T2; struct Cyc_Core_Invalid_argument_exn_struct * _T3; void * _T4; struct Cyc_Xarray_Xarray * _T5; struct _fat_ptr _T6; int _T7; unsigned char * _T8; void * * _T9; void * _TA; if (i < 0) { goto _TL2; }else { goto _TL3; } _TL3: _T0 = i; _T1 = xarr; _T2 = _T1->num_elmts; if (_T0 >= _T2) { goto _TL2; }else { goto _TL0; } _TL2: { struct Cyc_Core_Invalid_argument_exn_struct * _TB = _cycalloc(sizeof(struct Cyc_Core_Invalid_argument_exn_struct)); _TB->tag = Cyc_Core_Invalid_argument; _TB->f1 = _tag_fat("Xarray::get: bad index",sizeof(char),23U); _T3 = (struct Cyc_Core_Invalid_argument_exn_struct *)_TB; }_T4 = (void *)_T3; _throw(_T4); goto _TL1; _TL0: _TL1: _T5 = xarr; _T6 = _T5->elmts; _T7 = i; _T8 = _check_fat_subscript(_T6,sizeof(void *),_T7); _T9 = (void * *)_T8; _TA = *_T9; return _TA; }
void Cyc_getargs(int argc,struct _fat_ptr argv) { int _T0; struct _fat_ptr _T1; struct _fat_ptr _T2; struct Cyc_option * _T3; struct _fat_ptr _T4; int _T5; int _T6; int _T7; int _T8; struct Cyc_String_pa_PrintArg_struct _T9; struct _fat_ptr _TA; struct _fat_ptr _TB; struct Cyc_String_pa_PrintArg_struct _TC; struct Cyc___cycFILE * _TD; struct _fat_ptr _TE; struct _fat_ptr _TF; int _T10; int _T11; struct Cyc_String_pa_PrintArg_struct _T12; struct Cyc_String_pa_PrintArg_struct _T13; struct _fat_ptr _T14; int _T15; unsigned char * _T16; struct _fat_ptr * _T17; struct Cyc___cycFILE * _T18; struct _fat_ptr _T19; struct _fat_ptr _T1A; struct _fat_ptr _T1B; int _T1C; unsigned char * _T1D; struct _fat_ptr * _T1E; register int c; Cyc_verboseflag = 0; Cyc_definesflag = 0; Cyc_debugflag = 0; Cyc_noparserflag = 0; Cyc_rawtoknumflag = 0; Cyc_toknumflag = 0; Cyc_fixed_outfiles = 0; _TL0: _T0 = argc; _T1 = argv; _T2 = _tag_fat("yvdhrltknVo:b:p:",sizeof(char),17U); _T3 = Cyc_longopts; _T4 = _tag_fat(_T3,sizeof(struct Cyc_option),16U); c = Cyc_getopt_long(_T0,_T1,_T2,_T4,0); _T5 = c; _T6 = - 1; if (_T5 != _T6) { goto _TL1; }else { goto _TL2; } _TL1: _T7 = c; _T8 = (int)_T7; switch (_T8) { case 0: goto _LL0; case 121: Cyc_fixed_outfiles = 1; goto _LL0; case 104: Cyc_usage(Cyc_stdout); exit(0); goto _LL0; case 86: { struct Cyc_String_pa_PrintArg_struct _T1F; _T1F.tag = 0; _T1F.f1 = Cyc_version_string; _T9 = _T1F; }{ struct Cyc_String_pa_PrintArg_struct _T1F = _T9; void * _T20[1]; _T20[0] = &_T1F; _TA = _tag_fat("%s",sizeof(char),3U); _TB = _tag_fat(_T20,sizeof(void *),1); Cyc_printf(_TA,_TB); }exit(0); goto _LL0; case 118: Cyc_verboseflag = 1; goto _LL0; case 100: Cyc_definesflag = 1; goto _LL0; case 108: Cyc_nolinesflag = 1; goto _LL0; case 107: Cyc_toknumflag = 1; goto _LL0; case 114: Cyc_rawtoknumflag = 1; goto _LL0; case 110: Cyc_noparserflag = 1; goto _LL0; case 116: Cyc_debugflag = 1; goto _LL0; case 111: Cyc_spec_outfile = Cyc_optarg; goto _LL0; case 98: Cyc_spec_file_prefix = Cyc_optarg; goto _LL0; case 112: Cyc_spec_name_prefix = Cyc_optarg; goto _LL0; default: Cyc_usage(Cyc_stderr); exit(1); goto _LL0; } _LL0: goto _TL0; _TL2: if (Cyc_optind != argc) { goto _TL4; } { struct Cyc_String_pa_PrintArg_struct _T1F; _T1F.tag = 0; _T1F.f1 = Cyc_program_name; _TC = _T1F; }{ struct Cyc_String_pa_PrintArg_struct _T1F = _TC; void * _T20[1]; _T20[0] = &_T1F; _TD = Cyc_stderr; _TE = _tag_fat("%s: no grammar file given\n",sizeof(char),27U); _TF = _tag_fat(_T20,sizeof(void *),1); Cyc_fprintf(_TD,_TE,_TF); }exit(1); goto _TL5; _TL4: _TL5: _T10 = Cyc_optind; _T11 = argc - 1; if (_T10 >= _T11) { goto _TL6; } { struct Cyc_String_pa_PrintArg_struct _T1F; _T1F.tag = 0; _T1F.f1 = Cyc_program_name; _T12 = _T1F; }{ struct Cyc_String_pa_PrintArg_struct _T1F = _T12; { struct Cyc_String_pa_PrintArg_struct _T20; _T20.tag = 0; _T14 = argv; _T15 = Cyc_optind; _T16 = _check_fat_subscript(_T14,sizeof(struct _fat_ptr),_T15); _T17 = (struct _fat_ptr *)_T16; _T20.f1 = *_T17; _T13 = _T20; }{ struct Cyc_String_pa_PrintArg_struct _T20 = _T13; void * _T21[2]; _T21[0] = &_T1F; _T21[1] = &_T20; _T18 = Cyc_stderr; _T19 = _tag_fat("%s: extra arguments ignored after '%s'\n",sizeof(char), 40U); _T1A = _tag_fat(_T21,sizeof(void *),2); Cyc_fprintf(_T18,_T19,_T1A); } }goto _TL7; _TL6: _TL7: _T1B = argv; _T1C = Cyc_optind; _T1D = _check_fat_subscript(_T1B,sizeof(struct _fat_ptr),_T1C); _T1E = (struct _fat_ptr *)_T1D; Cyc_infile = *_T1E; }
int Cyc_XP_add(int n,struct _fat_ptr z,struct _fat_ptr x,struct _fat_ptr y,int carry){ int i; for(i=0;i < n;++ i){ ({int _tmp48=({int _tmp47=(int)*((unsigned char*)_check_fat_subscript(x,sizeof(unsigned char),i));_tmp47 + (int)*((unsigned char*)_check_fat_subscript(y,sizeof(unsigned char),i));});carry +=_tmp48;});
int Cyc_XP_length(int n,struct _fat_ptr x){ while(n > 1 &&(int)*((unsigned char*)_check_fat_subscript(x,sizeof(unsigned char),n - 1))== 0){ -- n;} return n;}
void Cyc_save_shifts() { void * _T0; struct Cyc_shifts_tag * _T1; struct Cyc_core_tag * _T2; struct Cyc_shifts_tag * _T3; int _T4; struct Cyc_shifts_tag * _T5; struct Cyc_shifts_tag * _T6; struct _fat_ptr _T7; int _T8; short * _T9; unsigned int _TA; unsigned int _TB; struct Cyc_shifts_tag * _TC; struct _fat_ptr _TD; int _TE; struct _fat_ptr _TF; unsigned char * _T10; short * _T11; struct _fat_ptr _T12; unsigned char * _T13; short * _T14; struct _fat_ptr * _T15; struct _fat_ptr _T16; unsigned char * _T17; short * _T18; struct _fat_ptr * _T19; struct _fat_ptr _T1A; unsigned char * _T1B; short * _T1C; struct Cyc_shifts_tag * _T1D; unsigned int _T1E; struct Cyc_shifts_tag * _T1F; struct Cyc_shifts_tag * p; struct _fat_ptr sp1; struct _fat_ptr sp2; struct _fat_ptr send; _T0 = _cycalloc(sizeof(struct Cyc_shifts_tag)); p = (struct Cyc_shifts_tag *)_T0; _T1 = p; _T2 = _check_null(Cyc_this_state); _T1->number = _T2->number; _T3 = p; _T4 = Cyc_nshifts; _T3->nshifts = (short)_T4; _T5 = p; _T5->next = 0; _T6 = p; _T8 = Cyc_nshifts; { unsigned int _T20 = (unsigned int)_T8; _TA = _check_times(_T20,sizeof(short)); { short * _T21 = _cycalloc_atomic(_TA); { unsigned int _T22 = _T20; unsigned int _new2_cyclone; _new2_cyclone = 0; _TL63: if (_new2_cyclone < _T22) { goto _TL61; }else { goto _TL62; } _TL61: _TB = _new2_cyclone; _T21[_TB] = 0; _new2_cyclone = _new2_cyclone + 1; goto _TL63; _TL62: ; }_T9 = (short *)_T21; }_T7 = _tag_fat(_T9,sizeof(short),_T20); }_T6->shifts = _T7; sp1 = Cyc_shiftset; _TC = p; sp2 = _TC->shifts; _TD = Cyc_shiftset; _TE = Cyc_nshifts; send = _fat_ptr_plus(_TD,sizeof(short),_TE); _TL64: _TF = sp1; _T10 = _TF.curr; _T11 = (short *)_T10; _T12 = send; _T13 = _T12.curr; _T14 = (short *)_T13; if (_T11 < _T14) { goto _TL65; }else { goto _TL66; } _TL65: _T15 = &sp2; _T16 = _fat_ptr_inplace_plus_post(_T15,sizeof(short),1); _T17 = _check_fat_subscript(_T16,sizeof(short),0U); _T18 = (short *)_T17; _T19 = &sp1; _T1A = _fat_ptr_inplace_plus_post(_T19,sizeof(short),1); _T1B = _check_fat_subscript(_T1A,sizeof(short),0U); _T1C = (short *)_T1B; *_T18 = *_T1C; goto _TL64; _TL66: _T1D = Cyc_last_shift; _T1E = (unsigned int)_T1D; if (! _T1E) { goto _TL67; } _T1F = Cyc_last_shift; _T1F->next = p; Cyc_last_shift = p; goto _TL68; _TL67: Cyc_first_shift = p; Cyc_last_shift = p; _TL68: ; }
struct Cyc_core_tag * Cyc_new_state(int symbol) { struct _fat_ptr _T0; struct _fat_ptr _T1; int _T2; unsigned char * _T3; struct _fat_ptr * _T4; struct _fat_ptr _T5; int _T6; unsigned char * _T7; struct _fat_ptr * _T8; struct _fat_ptr _T9; unsigned char * _TA; struct _fat_ptr _TB; unsigned char * _TC; int _TD; void * _TE; struct Cyc_core_tag * _TF; struct Cyc_core_tag * _T10; struct Cyc_core_tag * _T11; int _T12; struct Cyc_core_tag * _T13; int _T14; struct Cyc_core_tag * _T15; int _T16; struct Cyc_core_tag * _T17; struct _fat_ptr _T18; int _T19; short * _T1A; unsigned int _T1B; unsigned int _T1C; struct Cyc_core_tag * _T1D; struct _fat_ptr _T1E; unsigned char * _T1F; short * _T20; struct _fat_ptr _T21; unsigned char * _T22; short * _T23; struct _fat_ptr * _T24; struct _fat_ptr _T25; unsigned char * _T26; short * _T27; struct _fat_ptr * _T28; struct _fat_ptr _T29; unsigned char * _T2A; short * _T2B; struct Cyc_core_tag * _T2C; struct Cyc_core_tag * _T2D; int n; struct Cyc_core_tag * p; struct _fat_ptr isp1; struct _fat_ptr isp2; struct _fat_ptr iend; if (Cyc_nstates < 32767) { goto _TL57; } _T0 = _tag_fat("states",sizeof(char),7U); Cyc_toomany(_T0); goto _TL58; _TL57: _TL58: _T1 = Cyc_kernel_base; _T2 = symbol; _T3 = _check_fat_subscript(_T1,sizeof(struct _fat_ptr),_T2); _T4 = (struct _fat_ptr *)_T3; isp1 = *_T4; _T5 = Cyc_kernel_end; _T6 = symbol; _T7 = _check_fat_subscript(_T5,sizeof(struct _fat_ptr),_T6); _T8 = (struct _fat_ptr *)_T7; iend = *_T8; _T9 = iend; _TA = _T9.curr; _TB = isp1; _TC = _TB.curr; _TD = _TA - _TC; n = _TD / sizeof(short); _TE = _cycalloc(sizeof(struct Cyc_core_tag)); p = (struct Cyc_core_tag *)_TE; _TF = p; _TF->next = 0; _T10 = p; _T10->link = 0; _T11 = p; _T12 = symbol; _T11->accessing_symbol = (short)_T12; _T13 = p; _T14 = Cyc_nstates; _T13->number = (short)_T14; _T15 = p; _T16 = n; _T15->nitems = (short)_T16; _T17 = p; _T19 = n; { unsigned int _T2E = (unsigned int)_T19; _T1B = _check_times(_T2E,sizeof(short)); { short * _T2F = _cycalloc_atomic(_T1B); { unsigned int _T30 = _T2E; unsigned int _temp_; _temp_ = 0; _TL5C: if (_temp_ < _T30) { goto _TL5A; }else { goto _TL5B; } _TL5A: _T1C = _temp_; _T2F[_T1C] = 0; _temp_ = _temp_ + 1; goto _TL5C; _TL5B: ; }_T1A = (short *)_T2F; }_T18 = _tag_fat(_T1A,sizeof(short),_T2E); }_T17->items = _T18; _T1D = p; isp2 = _T1D->items; _TL5D: _T1E = isp1; _T1F = _T1E.curr; _T20 = (short *)_T1F; _T21 = iend; _T22 = _T21.curr; _T23 = (short *)_T22; if (_T20 < _T23) { goto _TL5E; }else { goto _TL5F; } _TL5E: _T24 = &isp2; _T25 = _fat_ptr_inplace_plus_post(_T24,sizeof(short),1); _T26 = _check_fat_subscript(_T25,sizeof(short),0U); _T27 = (short *)_T26; _T28 = &isp1; _T29 = _fat_ptr_inplace_plus_post(_T28,sizeof(short),1); _T2A = _check_fat_subscript(_T29,sizeof(short),0U); _T2B = (short *)_T2A; *_T27 = *_T2B; goto _TL5D; _TL5F: _T2C = _check_null(Cyc_last_state); _T2C->next = p; Cyc_last_state = p; Cyc_nstates = Cyc_nstates + 1; _T2D = p; return _T2D; }
void Cyc_allocate_itemsets() { struct _fat_ptr _T0; int _T1; short * _T2; unsigned int _T3; unsigned int _T4; struct _fat_ptr * _T5; struct _fat_ptr _T6; unsigned char * _T7; short * _T8; short _T9; int _TA; struct _fat_ptr _TB; int _TC; unsigned char * _TD; short * _TE; struct _fat_ptr * _TF; struct _fat_ptr _T10; unsigned char * _T11; short * _T12; short _T13; struct _fat_ptr _T14; int _T15; struct _fat_ptr * _T16; unsigned int _T17; unsigned int _T18; struct _fat_ptr _T19; struct _fat_ptr _T1A; int _T1B; short * _T1C; unsigned int _T1D; unsigned int _T1E; struct _fat_ptr _T1F; int _T20; unsigned char * _T21; struct _fat_ptr * _T22; struct _fat_ptr _T23; int _T24; struct _fat_ptr _T25; int _T26; unsigned char * _T27; short * _T28; short _T29; int _T2A; struct _fat_ptr _T2B; int _T2C; struct _fat_ptr * _T2D; unsigned int _T2E; unsigned int _T2F; struct _fat_ptr _T30; struct _fat_ptr itemp; int symbol; int i; int count; struct _fat_ptr symbol_count; count = 0; _T1 = Cyc_nsyms; { unsigned int _T31 = (unsigned int)_T1; _T3 = _check_times(_T31,sizeof(short)); { short * _T32 = _cycalloc_atomic(_T3); { unsigned int _T33 = _T31; unsigned int _new2_cyclone; _new2_cyclone = 0; _TL3: if (_new2_cyclone < _T33) { goto _TL1; }else { goto _TL2; } _TL1: _T4 = _new2_cyclone; _T32[_T4] = 0; _new2_cyclone = _new2_cyclone + 1; goto _TL3; _TL2: ; }_T2 = (short *)_T32; }_T0 = _tag_fat(_T2,sizeof(short),_T31); }symbol_count = _T0; itemp = Cyc_ritem; _T5 = &itemp; _T6 = _fat_ptr_inplace_plus_post(_T5,sizeof(short),1); _T7 = _check_fat_subscript(_T6,sizeof(short),0U); _T8 = (short *)_T7; _T9 = *_T8; symbol = (int)_T9; _TL4: _TA = symbol; if (_TA) { goto _TL5; }else { goto _TL6; } _TL5: if (symbol <= 0) { goto _TL7; } count = count + 1; _TB = symbol_count; _TC = symbol; _TD = _check_fat_subscript(_TB,sizeof(short),_TC); _TE = (short *)_TD; *_TE = *_TE + 1; goto _TL8; _TL7: _TL8: _TF = &itemp; _T10 = _fat_ptr_inplace_plus_post(_TF,sizeof(short),1); _T11 = _check_fat_subscript(_T10,sizeof(short),0U); _T12 = (short *)_T11; _T13 = *_T12; symbol = (int)_T13; goto _TL4; _TL6: _T15 = Cyc_nsyms; { unsigned int _T31 = (unsigned int)_T15; _T17 = _check_times(_T31,sizeof(struct _fat_ptr)); { struct _fat_ptr * _T32 = _cycalloc(_T17); { unsigned int _T33 = _T31; unsigned int _new2p_cyclone; _new2p_cyclone = 0; _TLC: if (_new2p_cyclone < _T33) { goto _TLA; }else { goto _TLB; } _TLA: _T18 = _new2p_cyclone; _T19 = _tag_fat(0,0,0); _T32[_T18] = _T19; _new2p_cyclone = _new2p_cyclone + 1; goto _TLC; _TLB: ; }_T16 = (struct _fat_ptr *)_T32; }_T14 = _tag_fat(_T16,sizeof(struct _fat_ptr),_T31); }Cyc_kernel_base = _T14; _T1B = count; { unsigned int _T31 = (unsigned int)_T1B; _T1D = _check_times(_T31,sizeof(short)); { short * _T32 = _cycalloc_atomic(_T1D); { unsigned int _T33 = _T31; unsigned int _new2_cyclone; _new2_cyclone = 0; _TL10: if (_new2_cyclone < _T33) { goto _TLE; }else { goto _TLF; } _TLE: _T1E = _new2_cyclone; _T32[_T1E] = 0; _new2_cyclone = _new2_cyclone + 1; goto _TL10; _TLF: ; }_T1C = (short *)_T32; }_T1A = _tag_fat(_T1C,sizeof(short),_T31); }Cyc_kernel_items = _T1A; count = 0; i = 0; _TL14: if (i < Cyc_nsyms) { goto _TL12; }else { goto _TL13; } _TL12: _T1F = Cyc_kernel_base; _T20 = i; _T21 = _check_fat_subscript(_T1F,sizeof(struct _fat_ptr),_T20); _T22 = (struct _fat_ptr *)_T21; _T23 = Cyc_kernel_items; _T24 = count; *_T22 = _fat_ptr_plus(_T23,sizeof(short),_T24); _T25 = symbol_count; _T26 = i; _T27 = _check_fat_subscript(_T25,sizeof(short),_T26); _T28 = (short *)_T27; _T29 = *_T28; _T2A = (int)_T29; count = count + _T2A; i = i + 1; goto _TL14; _TL13: Cyc_shift_symbol = symbol_count; _T2C = Cyc_nsyms; { unsigned int _T31 = (unsigned int)_T2C; _T2E = _check_times(_T31,sizeof(struct _fat_ptr)); { struct _fat_ptr * _T32 = _cycalloc(_T2E); { unsigned int _T33 = _T31; unsigned int _new2p_cyclone; _new2p_cyclone = 0; _TL18: if (_new2p_cyclone < _T33) { goto _TL16; }else { goto _TL17; } _TL16: _T2F = _new2p_cyclone; _T30 = _tag_fat(0,0,0); _T32[_T2F] = _T30; _new2p_cyclone = _new2p_cyclone + 1; goto _TL18; _TL17: ; }_T2D = (struct _fat_ptr *)_T32; }_T2B = _tag_fat(_T2D,sizeof(struct _fat_ptr),_T31); }Cyc_kernel_end = _T2B; }
int Cyc_get_state(int symbol) { struct _fat_ptr _T0; int _T1; unsigned char * _T2; struct _fat_ptr * _T3; struct _fat_ptr _T4; int _T5; unsigned char * _T6; struct _fat_ptr * _T7; struct _fat_ptr _T8; unsigned char * _T9; struct _fat_ptr _TA; unsigned char * _TB; int _TC; struct _fat_ptr _TD; unsigned char * _TE; short * _TF; struct _fat_ptr _T10; unsigned char * _T11; short * _T12; struct _fat_ptr * _T13; struct _fat_ptr _T14; unsigned char * _T15; short * _T16; short _T17; int _T18; struct _fat_ptr _T19; int _T1A; unsigned char * _T1B; struct Cyc_core_tag * * _T1C; struct Cyc_core_tag * _T1D; unsigned int _T1E; int _T1F; struct Cyc_core_tag * _T20; short _T21; int _T22; int _T23; struct _fat_ptr _T24; int _T25; unsigned char * _T26; struct _fat_ptr * _T27; struct Cyc_core_tag * _T28; int _T29; struct _fat_ptr _T2A; unsigned char * _T2B; short * _T2C; struct _fat_ptr _T2D; unsigned char * _T2E; short * _T2F; struct _fat_ptr * _T30; struct _fat_ptr _T31; unsigned char * _T32; short * _T33; short _T34; int _T35; struct _fat_ptr * _T36; struct _fat_ptr _T37; unsigned char * _T38; short * _T39; short _T3A; int _T3B; int _T3C; struct Cyc_core_tag * _T3D; struct Cyc_core_tag * _T3E; unsigned int _T3F; struct Cyc_core_tag * _T40; struct Cyc_core_tag * _T41; struct _fat_ptr _T42; int _T43; unsigned char * _T44; struct Cyc_core_tag * * _T45; struct Cyc_core_tag * _T46; short _T47; int _T48; int key; struct _fat_ptr isp1; struct _fat_ptr isp2; struct _fat_ptr iend; struct Cyc_core_tag * sp; int found; int n; _T0 = Cyc_kernel_base; _T1 = symbol; _T2 = _check_fat_subscript(_T0,sizeof(struct _fat_ptr),_T1); _T3 = (struct _fat_ptr *)_T2; isp1 = *_T3; _T4 = Cyc_kernel_end; _T5 = symbol; _T6 = _check_fat_subscript(_T4,sizeof(struct _fat_ptr),_T5); _T7 = (struct _fat_ptr *)_T6; iend = *_T7; _T8 = iend; _T9 = _T8.curr; _TA = isp1; _TB = _TA.curr; _TC = _T9 - _TB; n = _TC / sizeof(short); key = 0; _TL42: _TD = isp1; _TE = _TD.curr; _TF = (short *)_TE; _T10 = iend; _T11 = _T10.curr; _T12 = (short *)_T11; if (_TF < _T12) { goto _TL43; }else { goto _TL44; } _TL43: _T13 = &isp1; _T14 = _fat_ptr_inplace_plus_post(_T13,sizeof(short),1); _T15 = _check_fat_subscript(_T14,sizeof(short),0U); _T16 = (short *)_T15; _T17 = *_T16; _T18 = (int)_T17; key = key + _T18; goto _TL42; _TL44: key = key % 1009; _T19 = Cyc_state_table; _T1A = key; _T1B = _check_fat_subscript(_T19,sizeof(struct Cyc_core_tag *),_T1A); _T1C = (struct Cyc_core_tag * *)_T1B; sp = *_T1C; _T1D = sp; _T1E = (unsigned int)_T1D; if (! _T1E) { goto _TL45; } found = 0; _TL47: _T1F = found; if (_T1F) { goto _TL49; }else { goto _TL48; } _TL48: _T20 = _check_null(sp); _T21 = _T20->nitems; _T22 = (int)_T21; _T23 = n; if (_T22 != _T23) { goto _TL4A; } found = 1; _T24 = Cyc_kernel_base; _T25 = symbol; _T26 = _check_fat_subscript(_T24,sizeof(struct _fat_ptr),_T25); _T27 = (struct _fat_ptr *)_T26; isp1 = *_T27; _T28 = sp; isp2 = _T28->items; _TL4C: _T29 = found; if (_T29) { goto _TL4F; }else { goto _TL4E; } _TL4F: _T2A = isp1; _T2B = _T2A.curr; _T2C = (short *)_T2B; _T2D = iend; _T2E = _T2D.curr; _T2F = (short *)_T2E; if (_T2C < _T2F) { goto _TL4D; }else { goto _TL4E; } _TL4D: _T30 = &isp1; _T31 = _fat_ptr_inplace_plus_post(_T30,sizeof(short),1); _T32 = _check_fat_subscript(_T31,sizeof(short),0U); _T33 = (short *)_T32; _T34 = *_T33; _T35 = (int)_T34; _T36 = &isp2; _T37 = _fat_ptr_inplace_plus_post(_T36,sizeof(short),1); _T38 = _check_fat_subscript(_T37,sizeof(short),0U); _T39 = (short *)_T38; _T3A = *_T39; _T3B = (int)_T3A; if (_T35 == _T3B) { goto _TL50; } found = 0; goto _TL51; _TL50: _TL51: goto _TL4C; _TL4E: goto _TL4B; _TL4A: _TL4B: _T3C = found; if (_T3C) { goto _TL52; }else { goto _TL54; } _TL54: _T3D = sp; _T3E = _T3D->link; _T3F = (unsigned int)_T3E; if (! _T3F) { goto _TL55; } _T40 = sp; sp = _T40->link; goto _TL56; _TL55: _T41 = sp; _T41->link = Cyc_new_state(symbol); sp = _T41->link; found = 1; _TL56: goto _TL53; _TL52: _TL53: goto _TL47; _TL49: goto _TL46; _TL45: _T42 = Cyc_state_table; _T43 = key; _T44 = _check_fat_subscript(_T42,sizeof(struct Cyc_core_tag *),_T43); _T45 = (struct Cyc_core_tag * *)_T44; sp = Cyc_new_state(symbol); *_T45 = sp; _TL46: _T46 = _check_null(sp); _T47 = _T46->number; _T48 = (int)_T47; return _T48; }