コード例 #1
0
ファイル: base64.c プロジェクト: pippijn/cyclone-boot
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: ;
  }
}
コード例 #2
0
ファイル: nullable.c プロジェクト: pippijn/cyclone-boot
void Cyc_set_nullable() {
  struct _fat_ptr _T0;
  int _T1;
  unsigned int _T2;
  char * _T3;
  unsigned int _T4;
  unsigned int _T5;
  struct _fat_ptr _T6;
  int _T7;
  struct _fat_ptr _T8;
  int _T9;
  short * _TA;
  unsigned int _TB;
  unsigned int _TC;
  struct _fat_ptr _TD;
  int _TE;
  short * _TF;
  unsigned int _T10;
  unsigned int _T11;
  struct _fat_ptr _T12;
  int _T13;
  struct Cyc_shorts_tag * * _T14;
  unsigned int _T15;
  unsigned int _T16;
  struct _fat_ptr _T17;
  int _T18;
  struct _fat_ptr _T19;
  int _T1A;
  int _T1B;
  struct Cyc_shorts_tag * _T1C;
  unsigned int _T1D;
  unsigned int _T1E;
  unsigned int _T1F;
  struct _fat_ptr _T20;
  unsigned char * _T21;
  short * _T22;
  short _T23;
  int _T24;
  struct _fat_ptr _T25;
  unsigned char * _T26;
  short * _T27;
  short _T28;
  int _T29;
  struct _fat_ptr _T2A;
  struct _fat_ptr * _T2B;
  struct _fat_ptr _T2C;
  unsigned char * _T2D;
  short * _T2E;
  short _T2F;
  short _T30;
  int _T31;
  unsigned char * _T32;
  short * _T33;
  short _T34;
  struct _fat_ptr _T35;
  int _T36;
  unsigned char * _T37;
  char * _T38;
  char _T39;
  int _T3A;
  struct _fat_ptr _T3B;
  int _T3C;
  unsigned char * _T3D;
  char * _T3E;
  unsigned int _T3F;
  unsigned char * _T40;
  char * _T41;
  struct _fat_ptr * _T42;
  struct _fat_ptr _T43;
  unsigned char * _T44;
  short * _T45;
  int _T46;
  struct _fat_ptr * _T47;
  struct _fat_ptr _T48;
  unsigned char * _T49;
  short * _T4A;
  short _T4B;
  struct _fat_ptr * _T4C;
  struct _fat_ptr _T4D;
  unsigned char * _T4E;
  short * _T4F;
  short _T50;
  char _T51;
  int _T52;
  struct _fat_ptr * _T53;
  struct _fat_ptr _T54;
  unsigned char * _T55;
  short * _T56;
  short _T57;
  struct _fat_ptr _T58;
  int _T59;
  unsigned char * _T5A;
  short * _T5B;
  struct _fat_ptr _T5C;
  unsigned char * _T5D;
  struct Cyc_shorts_tag * _T5E;
  struct _fat_ptr _T5F;
  int _T60;
  unsigned char * _T61;
  struct Cyc_shorts_tag * * _T62;
  struct _fat_ptr _T63;
  unsigned char * _T64;
  struct Cyc_shorts_tag * _T65;
  int _T66;
  struct _fat_ptr _T67;
  unsigned char * _T68;
  struct Cyc_shorts_tag * * _T69;
  int _T6A;
  struct _fat_ptr _T6B;
  unsigned char * _T6C;
  struct _fat_ptr * _T6D;
  struct _fat_ptr * _T6E;
  struct _fat_ptr _T6F;
  unsigned char * _T70;
  short * _T71;
  short _T72;
  struct _fat_ptr _T73;
  unsigned char * _T74;
  short * _T75;
  struct _fat_ptr _T76;
  unsigned char * _T77;
  short * _T78;
  struct _fat_ptr _T79;
  struct _fat_ptr * _T7A;
  struct _fat_ptr _T7B;
  unsigned char * _T7C;
  short * _T7D;
  short _T7E;
  int _T7F;
  unsigned char * _T80;
  struct Cyc_shorts_tag * * _T81;
  struct Cyc_shorts_tag * _T82;
  struct _fat_ptr _T83;
  unsigned char * _T84;
  unsigned int _T85;
  struct _fat_ptr _T86;
  unsigned char * _T87;
  struct Cyc_shorts_tag * _T88;
  short _T89;
  struct _fat_ptr _T8A;
  unsigned char * _T8B;
  struct Cyc_shorts_tag * _T8C;
  struct Cyc_shorts_tag * _T8D;
  struct _fat_ptr _T8E;
  int _T8F;
  unsigned char * _T90;
  short * _T91;
  short _T92;
  int _T93;
  struct _fat_ptr _T94;
  int _T95;
  unsigned char * _T96;
  short * _T97;
  short _T98;
  struct _fat_ptr _T99;
  int _T9A;
  unsigned char * _T9B;
  char * _T9C;
  char _T9D;
  int _T9E;
  struct _fat_ptr _T9F;
  int _TA0;
  unsigned char * _TA1;
  char * _TA2;
  unsigned int _TA3;
  unsigned char * _TA4;
  char * _TA5;
  struct _fat_ptr * _TA6;
  struct _fat_ptr _TA7;
  unsigned char * _TA8;
  short * _TA9;
  int _TAA;
  struct _fat_ptr _TAB;
  int _TAC;
  struct _fat_ptr r;
  struct _fat_ptr s1;
  struct _fat_ptr s2;
  register int ruleno;
  register int symbol;
  struct _fat_ptr p;
  struct _fat_ptr squeue;
  struct _fat_ptr rcount;
  struct _fat_ptr rsets;
  struct _fat_ptr relts;
  char any_tokens;
  struct _fat_ptr r1;
  _T1 = Cyc_nvars;
  _T2 = (unsigned int)_T1;
  { unsigned int _TAD = _T2 + 1U;
    _T4 = _check_times(_TAD,sizeof(char));
    { char * _TAE = _cycalloc_atomic(_T4);
      { unsigned int _TAF = _TAD;
	unsigned int i;
	i = 0;
	_TL3: if (i < _TAF) { goto _TL1;
	}else { goto _TL2;
	}
	_TL1: _T5 = i;
	_TAE[_T5] = '\000';
	i = i + 1;
	goto _TL3;
	_TL2: _TAE[_TAF] = 0;
      }_T3 = (char *)_TAE;
    }_T0 = _tag_fat(_T3,sizeof(char),_TAD);
  }{ struct _fat_ptr temp_string = _T0;
    _T6 = temp_string;
    _T7 = - Cyc_ntokens;
    Cyc_nullable = _fat_ptr_plus(_T6,sizeof(char),_T7);
    _T9 = Cyc_nvars;
    { unsigned int _TAD = (unsigned int)_T9;
      _TB = _check_times(_TAD,sizeof(short));
      { short * _TAE = _cycalloc_atomic(_TB);
	{ unsigned int _TAF = _TAD;
	  unsigned int _new2_cyclone;
	  _new2_cyclone = 0;
	  _TL7: if (_new2_cyclone < _TAF) { goto _TL5;
	  }else { goto _TL6;
	  }
	  _TL5: _TC = _new2_cyclone;
	  _TAE[_TC] = 0;
	  _new2_cyclone = _new2_cyclone + 1;
	  goto _TL7;
	  _TL6: ;
	}_TA = (short *)_TAE;
      }_T8 = _tag_fat(_TA,sizeof(short),_TAD);
    }squeue = _T8;
    s2 = squeue;
    s1 = s2;
    _TE = Cyc_nrules + 1;
    { unsigned int _TAD = (unsigned int)_TE;
      _T10 = _check_times(_TAD,sizeof(short));
      { short * _TAE = _cycalloc_atomic(_T10);
	{ unsigned int _TAF = _TAD;
	  unsigned int _new2_cyclone;
	  _new2_cyclone = 0;
	  _TLB: if (_new2_cyclone < _TAF) { goto _TL9;
	  }else { goto _TLA;
	  }
	  _TL9: _T11 = _new2_cyclone;
	  _TAE[_T11] = 0;
	  _new2_cyclone = _new2_cyclone + 1;
	  goto _TLB;
	  _TLA: ;
	}_TF = (short *)_TAE;
      }_TD = _tag_fat(_TF,sizeof(short),_TAD);
    }rcount = _TD;
    _T13 = Cyc_nvars;
    { unsigned int _TAD = (unsigned int)_T13;
      _T15 = _check_times(_TAD,sizeof(struct Cyc_shorts_tag *));
      { struct Cyc_shorts_tag * * _TAE = _cycalloc(_T15);
	{ unsigned int _TAF = _TAD;
	  unsigned int _new2p_cyclone;
	  _new2p_cyclone = 0;
	  _TLF: if (_new2p_cyclone < _TAF) { goto _TLD;
	  }else { goto _TLE;
	  }
	  _TLD: _T16 = _new2p_cyclone;
	  _TAE[_T16] = 0;
	  _new2p_cyclone = _new2p_cyclone + 1;
	  goto _TLF;
	  _TLE: ;
	}_T14 = (struct Cyc_shorts_tag * *)_TAE;
      }_T12 = _tag_fat(_T14,sizeof(struct Cyc_shorts_tag *),_TAD);
    }_T17 = _T12;
    _T18 = - Cyc_ntokens;
    rsets = _fat_ptr_plus(_T17,sizeof(struct Cyc_shorts_tag *),_T18);
    _T1A = Cyc_nitems + Cyc_nvars;
    _T1B = _T1A + 1;
    { unsigned int _TAD = (unsigned int)_T1B;
      _T1D = _check_times(_TAD,sizeof(struct Cyc_shorts_tag));
      { struct Cyc_shorts_tag * _TAE = _cycalloc(_T1D);
	{ unsigned int _TAF = _TAD;
	  unsigned int _temp_;
	  _temp_ = 0;
	  _TL13: if (_temp_ < _TAF) { goto _TL11;
	  }else { goto _TL12;
	  }
	  _TL11: _T1E = _temp_;
	  (_TAE[_T1E]).next = 0;
	  _T1F = _temp_;
	  (_TAE[_T1F]).value = 0;
	  _temp_ = _temp_ + 1;
	  goto _TL13;
	  _TL12: ;
	}_T1C = (struct Cyc_shorts_tag *)_TAE;
      }_T19 = _tag_fat(_T1C,sizeof(struct Cyc_shorts_tag),_TAD);
    }relts = _T19;
    p = relts;
    r = Cyc_ritem;
    _TL14: _T20 = r;
    _T21 = _check_fat_subscript(_T20,sizeof(short),0U);
    _T22 = (short *)_T21;
    _T23 = *_T22;
    _T24 = (int)_T23;
    if (_T24) { goto _TL15;
    }else { goto _TL16;
    }
    _TL15: _T25 = r;
    _T26 = _T25.curr;
    _T27 = (short *)_T26;
    _T28 = *_T27;
    _T29 = (int)_T28;
    if (_T29 >= 0) { goto _TL17;
    }
    _T2A = Cyc_rlhs;
    _T2B = &r;
    _T2C = _fat_ptr_inplace_plus_post(_T2B,sizeof(short),1);
    _T2D = _T2C.curr;
    _T2E = (short *)_T2D;
    _T2F = *_T2E;
    _T30 = - _T2F;
    _T31 = (int)_T30;
    _T32 = _check_fat_subscript(_T2A,sizeof(short),_T31);
    _T33 = (short *)_T32;
    _T34 = *_T33;
    symbol = (int)_T34;
    if (symbol < 0) { goto _TL19;
    }
    _T35 = Cyc_nullable;
    _T36 = symbol;
    _T37 = _check_fat_subscript(_T35,sizeof(char),_T36);
    _T38 = (char *)_T37;
    _T39 = *_T38;
    _T3A = (int)_T39;
    if (_T3A) { goto _TL19;
    }else { goto _TL1B;
    }
    _TL1B: _T3B = Cyc_nullable;
    _T3C = symbol;
    { struct _fat_ptr _TAD = _fat_ptr_plus(_T3B,sizeof(char),_T3C);
      _T3D = _TAD.curr;
      _T3E = (char *)_T3D;
      { char _TAE = *_T3E;
	char _TAF = '\001';
	_T3F = _get_fat_size(_TAD,sizeof(char));
	if (_T3F != 1U) { goto _TL1C;
	}
	if (_TAE != 0) { goto _TL1C;
	}
	if (_TAF == 0) { goto _TL1C;
	}
	_throw_arraybounds();
	goto _TL1D;
	_TL1C: _TL1D: _T40 = _TAD.curr;
	_T41 = (char *)_T40;
	*_T41 = _TAF;
      }
    }_T42 = &s2;
    _T43 = _fat_ptr_inplace_plus_post(_T42,sizeof(short),1);
    _T44 = _check_fat_subscript(_T43,sizeof(short),0U);
    _T45 = (short *)_T44;
    _T46 = symbol;
    *_T45 = (short)_T46;
    goto _TL1A;
    _TL19: _TL1A: goto _TL18;
    _TL17: r1 = r;
    any_tokens = '\000';
    _T47 = &r;
    _T48 = _fat_ptr_inplace_plus_post(_T47,sizeof(short),1);
    _T49 = _T48.curr;
    _T4A = (short *)_T49;
    _T4B = *_T4A;
    symbol = (int)_T4B;
    _TL21: if (symbol > 0) { goto _TL1F;
    }else { goto _TL20;
    }
    _TL1F: if (symbol >= Cyc_ntokens) { goto _TL22;
    }
    any_tokens = '\001';
    goto _TL23;
    _TL22: _TL23: _T4C = &r;
    _T4D = _fat_ptr_inplace_plus_post(_T4C,sizeof(short),1);
    _T4E = _check_fat_subscript(_T4D,sizeof(short),0U);
    _T4F = (short *)_T4E;
    _T50 = *_T4F;
    symbol = (int)_T50;
    goto _TL21;
    _TL20: _T51 = any_tokens;
    _T52 = (int)_T51;
    if (_T52) { goto _TL24;
    }else { goto _TL26;
    }
    _TL26: ruleno = - symbol;
    r = r1;
    _T53 = &r;
    _T54 = _fat_ptr_inplace_plus_post(_T53,sizeof(short),1);
    _T55 = _T54.curr;
    _T56 = (short *)_T55;
    _T57 = *_T56;
    symbol = (int)_T57;
    _TL2A: if (symbol > 0) { goto _TL28;
    }else { goto _TL29;
    }
    _TL28: _T58 = rcount;
    _T59 = ruleno;
    _T5A = _check_fat_subscript(_T58,sizeof(short),_T59);
    _T5B = (short *)_T5A;
    *_T5B = *_T5B + 1;
    _T5C = p;
    _T5D = _check_fat_subscript(_T5C,sizeof(struct Cyc_shorts_tag),0U);
    _T5E = (struct Cyc_shorts_tag *)_T5D;
    _T5F = rsets;
    _T60 = symbol;
    _T61 = _check_fat_subscript(_T5F,sizeof(struct Cyc_shorts_tag *),_T60);
    _T62 = (struct Cyc_shorts_tag * *)_T61;
    _T5E->next = *_T62;
    _T63 = p;
    _T64 = _T63.curr;
    _T65 = (struct Cyc_shorts_tag *)_T64;
    _T66 = ruleno;
    _T65->value = (short)_T66;
    _T67 = rsets;
    _T68 = _T67.curr;
    _T69 = (struct Cyc_shorts_tag * *)_T68;
    _T6A = symbol;
    _T6B = p;
    _T6C = _untag_fat_ptr(_T6B,sizeof(struct Cyc_shorts_tag),1U);
    _T69[_T6A] = (struct Cyc_shorts_tag *)_T6C;
    _T6D = &p;
    _fat_ptr_inplace_plus(_T6D,sizeof(struct Cyc_shorts_tag),1);
    _T6E = &r;
    _T6F = _fat_ptr_inplace_plus_post(_T6E,sizeof(short),1);
    _T70 = _check_fat_subscript(_T6F,sizeof(short),0U);
    _T71 = (short *)_T70;
    _T72 = *_T71;
    symbol = (int)_T72;
    goto _TL2A;
    _TL29: goto _TL25;
    _TL24: _TL25: _TL18: goto _TL14;
    _TL16: _TL2B: _T73 = s1;
    _T74 = _T73.curr;
    _T75 = (short *)_T74;
    _T76 = s2;
    _T77 = _T76.curr;
    _T78 = (short *)_T77;
    if (_T75 < _T78) { goto _TL2C;
    }else { goto _TL2D;
    }
    _TL2C: _T79 = rsets;
    _T7A = &s1;
    _T7B = _fat_ptr_inplace_plus_post(_T7A,sizeof(short),1);
    _T7C = _check_fat_subscript(_T7B,sizeof(short),0U);
    _T7D = (short *)_T7C;
    _T7E = *_T7D;
    _T7F = (int)_T7E;
    _T80 = _check_fat_subscript(_T79,sizeof(struct Cyc_shorts_tag *),_T7F);
    _T81 = (struct Cyc_shorts_tag * *)_T80;
    _T82 = *_T81;
    p = _tag_fat(_T82,sizeof(struct Cyc_shorts_tag),1U);
    _TL2E: _T83 = p;
    _T84 = _T83.curr;
    _T85 = (unsigned int)_T84;
    if (_T85) { goto _TL2F;
    }else { goto _TL30;
    }
    _TL2F: _T86 = p;
    _T87 = _check_fat_subscript(_T86,sizeof(struct Cyc_shorts_tag),0U);
    _T88 = (struct Cyc_shorts_tag *)_T87;
    _T89 = _T88->value;
    ruleno = (int)_T89;
    _T8A = p;
    _T8B = _T8A.curr;
    _T8C = (struct Cyc_shorts_tag *)_T8B;
    _T8D = _T8C->next;
    p = _tag_fat(_T8D,sizeof(struct Cyc_shorts_tag),1U);
    _T8E = rcount;
    _T8F = ruleno;
    _T90 = _check_fat_subscript(_T8E,sizeof(short),_T8F);
    _T91 = (short *)_T90;
    *_T91 = *_T91 + -1;
    _T92 = *_T91;
    _T93 = (int)_T92;
    if (_T93 != 0) { goto _TL31;
    }
    _T94 = Cyc_rlhs;
    _T95 = ruleno;
    _T96 = _check_fat_subscript(_T94,sizeof(short),_T95);
    _T97 = (short *)_T96;
    _T98 = *_T97;
    symbol = (int)_T98;
    if (symbol < 0) { goto _TL33;
    }
    _T99 = Cyc_nullable;
    _T9A = symbol;
    _T9B = _check_fat_subscript(_T99,sizeof(char),_T9A);
    _T9C = (char *)_T9B;
    _T9D = *_T9C;
    _T9E = (int)_T9D;
    if (_T9E) { goto _TL33;
    }else { goto _TL35;
    }
    _TL35: _T9F = Cyc_nullable;
    _TA0 = symbol;
    { struct _fat_ptr _TAD = _fat_ptr_plus(_T9F,sizeof(char),_TA0);
      _TA1 = _TAD.curr;
      _TA2 = (char *)_TA1;
      { char _TAE = *_TA2;
	char _TAF = '\001';
	_TA3 = _get_fat_size(_TAD,sizeof(char));
	if (_TA3 != 1U) { goto _TL36;
	}
	if (_TAE != 0) { goto _TL36;
	}
	if (_TAF == 0) { goto _TL36;
	}
	_throw_arraybounds();
	goto _TL37;
	_TL36: _TL37: _TA4 = _TAD.curr;
	_TA5 = (char *)_TA4;
	*_TA5 = _TAF;
      }
    }_TA6 = &s2;
    _TA7 = _fat_ptr_inplace_plus_post(_TA6,sizeof(short),1);
    _TA8 = _check_fat_subscript(_TA7,sizeof(short),0U);
    _TA9 = (short *)_TA8;
    _TAA = symbol;
    *_TA9 = (short)_TAA;
    goto _TL34;
    _TL33: _TL34: goto _TL32;
    _TL31: _TL32: goto _TL2E;
    _TL30: goto _TL2B;
    _TL2D: squeue = _tag_fat(0,0,0);
    rcount = _tag_fat(0,0,0);
    _TAB = rsets;
    _TAC = Cyc_ntokens;
    rsets = _fat_ptr_plus(_TAB,sizeof(struct Cyc_shorts_tag *),_TAC);
    rsets = _tag_fat(0,0,0);
    relts = _tag_fat(0,0,0);
  }
}
コード例 #3
0
ファイル: xp.c プロジェクト: FauxFaux/cyclone
int Cyc_XP_fromstr(int n,struct _fat_ptr z,const char*str,int base){const char*_T0;unsigned _T1;int(*_T2)(struct _fat_ptr,struct _fat_ptr,unsigned);void*(*_T3)(struct _fat_ptr,struct _fat_ptr,unsigned);struct _fat_ptr _T4;struct _fat_ptr _T5;int(*_T6)(struct _fat_ptr,struct _fat_ptr,unsigned);void*(*_T7)(struct _fat_ptr,struct _fat_ptr,unsigned);struct _fat_ptr _T8;struct _fat_ptr _T9;const char*_TA;char _TB;int _TC;const char*_TD;char _TE;int _TF;int _T10;const char*_T11;int _T12;const char*_T13;char _T14;int _T15;const char*_T16;char _T17;int _T18;int _T19;char*_T1A;const char*_T1B;char _T1C;int _T1D;int _T1E;char*_T1F;char*_T20;char _T21;int _T22;int _T23;const char*_T24;char _T25;int _T26;const char*_T27;char _T28;int _T29;int _T2A;char*_T2B;const char*_T2C;char _T2D;int _T2E;int _T2F;char*_T30;char*_T31;char _T32;int _T33;int _T34;int _T35;int _T36;struct _fat_ptr _T37;struct _fat_ptr _T38;char*_T39;const char*_T3A;char _T3B;int _T3C;int _T3D;char*_T3E;char*_T3F;char _T40;int _T41;const char*_T42;int _T43;int _T44;
# 249
const char*p=str;_T0=p;_T1=(unsigned)_T0;
if(!_T1)goto _TL97;goto _TL98;_TL97: _T3=Cyc___assert_fail;{int(*_T45)(struct _fat_ptr,struct _fat_ptr,unsigned)=(int(*)(struct _fat_ptr,struct _fat_ptr,unsigned))_T3;_T2=_T45;}_T4=_tag_fat("p",sizeof(char),2U);_T5=_tag_fat("xp.cyc",sizeof(char),7U);_T2(_T4,_T5,250U);_TL98:
 if(base < 2)goto _TL99;if(base > 36)goto _TL99;goto _TL9A;_TL99: _T7=Cyc___assert_fail;{int(*_T45)(struct _fat_ptr,struct _fat_ptr,unsigned)=(int(*)(struct _fat_ptr,struct _fat_ptr,unsigned))_T7;_T6=_T45;}_T8=_tag_fat("base >= 2 && base <= 36",sizeof(char),24U);_T9=_tag_fat("xp.cyc",sizeof(char),7U);_T6(_T8,_T9,251U);_TL9A:
 _TL9B: _TA=_check_null(p);_TB=*_TA;_TC=(int)_TB;if(_TC)goto _TL9E;else{goto _TL9D;}_TL9E: _TD=p;_TE=*_TD;_TF=(int)_TE;_T10=isspace(_TF);if(_T10)goto _TL9C;else{goto _TL9D;}
_TL9C:{const char**_T45=& p;_T11=*_T45;_T12=*_T11;if(_T12==0)goto _TL9F;*_T45=*_T45 + 1;goto _TLA0;_TL9F: _throw_arraybounds();_TLA0:;}goto _TL9B;_TL9D: _T13=p;_T14=*_T13;_T15=(int)_T14;
if(!_T15)goto _TLA1;_T16=p;_T17=*_T16;_T18=(int)_T17;_T19=isalnum(_T18);if(!_T19)goto _TLA1;_T1A=Cyc_map;_T1B=p;_T1C=*_T1B;_T1D=(int)_T1C;_T1E=_T1D - 48;_T1F=_check_known_subscript_notnull(_T1A,75U,sizeof(char),_T1E);_T20=(char*)_T1F;_T21=*_T20;_T22=(int)_T21;_T23=base;if(_T22 >= _T23)goto _TLA1;{
int carry;
_TLA6: _T24=_check_null(p);_T25=*_T24;_T26=(int)_T25;if(_T26)goto _TLA8;else{goto _TLA5;}_TLA8: _T27=p;_T28=*_T27;_T29=(int)_T28;_T2A=isalnum(_T29);if(_T2A)goto _TLA7;else{goto _TLA5;}_TLA7: _T2B=Cyc_map;_T2C=p;_T2D=*_T2C;_T2E=(int)_T2D;_T2F=_T2E - 48;_T30=_check_known_subscript_notnull(_T2B,75U,sizeof(char),_T2F);_T31=(char*)_T30;_T32=*_T31;_T33=(int)_T32;_T34=base;if(_T33 < _T34)goto _TLA4;else{goto _TLA5;}
_TLA4: carry=Cyc_XP_product(n,z,z,base);_T35=carry;
if(!_T35)goto _TLA9;goto _TLA5;_TLA9: _T36=n;_T37=z;_T38=z;_T39=Cyc_map;_T3A=p;_T3B=*_T3A;_T3C=(int)_T3B;_T3D=_T3C - 48;_T3E=_check_known_subscript_notnull(_T39,75U,sizeof(char),_T3D);_T3F=(char*)_T3E;_T40=*_T3F;_T41=(int)_T40;
# 260
Cyc_XP_sum(_T36,_T37,_T38,_T41);{const char**_T45=& p;_T42=*_T45;_T43=*_T42;if(_T43==0)goto _TLAB;*_T45=*_T45 + 1;goto _TLAC;_TLAB: _throw_arraybounds();_TLAC:;}goto _TLA6;_TLA5: _T44=carry;
# 262
return _T44;}
# 264
_TLA1: return 0;}
コード例 #4
0
ファイル: xp.c プロジェクト: FauxFaux/cyclone
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;}
コード例 #5
0
ファイル: filename.c プロジェクト: pippijn/cyclone-boot
struct _fat_ptr Cyc_Filename_gnuify(struct _fat_ptr filename) {
  int _T0;
  struct _fat_ptr _T1;
  unsigned int _T2;
  struct _fat_ptr _T3;
  unsigned char * _T4;
  const char * _T5;
  const char * _T6;
  char _T7;
  int _T8;
  long _T9;
  struct _fat_ptr _TA;
  unsigned int _TB;
  unsigned int _TC;
  struct _fat_ptr _TD;
  int _TE;
  unsigned int _TF;
  char * _T10;
  unsigned int _T11;
  unsigned int _T12;
  struct _fat_ptr _T13;
  unsigned char * _T14;
  char * _T15;
  char _T16;
  struct _fat_ptr _T17;
  unsigned char * _T18;
  char * _T19;
  unsigned int _T1A;
  unsigned char * _T1B;
  char * _T1C;
  unsigned int _T1D;
  unsigned char * _T1E;
  char * _T1F;
  struct _fat_ptr _T20;
  unsigned char * _T21;
  char * _T22;
  struct _fat_ptr _T23;
  unsigned char * _T24;
  const char * _T25;
  const char * _T26;
  unsigned int _T27;
  unsigned char * _T28;
  char * _T29;
  struct _fat_ptr _T2A;
  unsigned int _T2B;
  struct _fat_ptr _T2C;
  int _T2D;
  unsigned int _T2E;
  char * _T2F;
  unsigned int _T30;
  unsigned int _T31;
  struct _fat_ptr _T32;
  int _T33;
  int _T34;
  unsigned char * _T35;
  const char * _T36;
  struct _fat_ptr _T37;
  int _T38;
  int _T39;
  unsigned char * _T3A;
  char * _T3B;
  char _T3C;
  char _T3D;
  int _T3E;
  unsigned int _T3F;
  unsigned char * _T40;
  char * _T41;
  struct _fat_ptr _T42;
  _T1 = filename;
  _T2 = _get_fat_size(_T1,sizeof(char));
  if (_T2 <= 1U) { goto _TL18;
  }
  _T3 = filename;
  _T4 = _T3.curr;
  _T5 = (const char *)_T4;
  _T6 = _check_null(_T5);
  _T7 = _T6[1];
  _T8 = (int)_T7;
  _T0 = _T8 == 58;
  goto _TL19;
  _TL18: _T0 = 0;
  _TL19: { long has_drive_name = _T0;
    int i;
    int j;
    struct _fat_ptr ans;
    int ans_sz;
    _T9 = has_drive_name;
    if (! _T9) { goto _TL1A;
    }
    _TA = filename;
    _TB = _get_fat_size(_TA,sizeof(char));
    _TC = _TB + 1U;
    ans_sz = (int)_TC;
    _TE = ans_sz;
    _TF = (unsigned int)_TE;
    { unsigned int _T43 = _TF + 1U;
      _T11 = _check_times(_T43,sizeof(char));
      { char * _T44 = _cycalloc_atomic(_T11);
	{ unsigned int _T45 = _T43;
	  unsigned int k;
	  k = 0;
	  _TL1F: if (k < _T45) { goto _TL1D;
	  }else { goto _TL1E;
	  }
	  _TL1D: _T12 = k;
	  _T44[_T12] = '\000';
	  k = k + 1;
	  goto _TL1F;
	  _TL1E: _T44[_T45] = 0;
	}_T10 = (char *)_T44;
      }_TD = _tag_fat(_T10,sizeof(char),_T43);
    }ans = _TD;
    _T13 = ans;
    { struct _fat_ptr _T43 = _fat_ptr_plus(_T13,sizeof(char),0);
      _T14 = _T43.curr;
      _T15 = (char *)_T14;
      { char _T44 = *_T15;
	_T17 = ans;
	{ struct _fat_ptr _T45 = _fat_ptr_plus(_T17,sizeof(char),1);
	  _T18 = _check_fat_subscript(_T45,sizeof(char),0U);
	  _T19 = (char *)_T18;
	  { char _T46 = *_T19;
	    char _T47 = '/';
	    _T1A = _get_fat_size(_T45,sizeof(char));
	    if (_T1A != 1U) { goto _TL20;
	    }
	    if (_T46 != 0) { goto _TL20;
	    }
	    if (_T47 == 0) { goto _TL20;
	    }
	    _throw_arraybounds();
	    goto _TL21;
	    _TL20: _TL21: _T1B = _T45.curr;
	    _T1C = (char *)_T1B;
	    *_T1C = _T47;
	    _T16 = *_T1C;
	  }
	}{ char _T45 = _T16;
	  _T1D = _get_fat_size(_T43,sizeof(char));
	  if (_T1D != 1U) { goto _TL22;
	  }
	  if (_T44 != 0) { goto _TL22;
	  }
	  if (_T45 == 0) { goto _TL22;
	  }
	  _throw_arraybounds();
	  goto _TL23;
	  _TL22: _TL23: _T1E = _T43.curr;
	  _T1F = (char *)_T1E;
	  *_T1F = _T45;
	}
      }
    }_T20 = ans;
    { struct _fat_ptr _T43 = _fat_ptr_plus(_T20,sizeof(char),2);
      _T21 = _check_fat_subscript(_T43,sizeof(char),0U);
      _T22 = (char *)_T21;
      { char _T44 = *_T22;
	_T23 = filename;
	_T24 = _T23.curr;
	_T25 = (const char *)_T24;
	_T26 = _check_null(_T25);
	{ char _T45 = _T26[0];
	  _T27 = _get_fat_size(_T43,sizeof(char));
	  if (_T27 != 1U) { goto _TL24;
	  }
	  if (_T44 != 0) { goto _TL24;
	  }
	  if (_T45 == 0) { goto _TL24;
	  }
	  _throw_arraybounds();
	  goto _TL25;
	  _TL24: _TL25: _T28 = _T43.curr;
	  _T29 = (char *)_T28;
	  *_T29 = _T45;
	}
      }
    }i = 3;
    j = 2;
    goto _TL1B;
    _TL1A: _T2A = filename;
    _T2B = _get_fat_size(_T2A,sizeof(char));
    ans_sz = (int)_T2B;
    _T2D = ans_sz;
    _T2E = (unsigned int)_T2D;
    { unsigned int _T43 = _T2E + 1U;
      _T30 = _check_times(_T43,sizeof(char));
      { char * _T44 = _cycalloc_atomic(_T30);
	{ unsigned int _T45 = _T43;
	  unsigned int k;
	  k = 0;
	  _TL29: if (k < _T45) { goto _TL27;
	  }else { goto _TL28;
	  }
	  _TL27: _T31 = k;
	  _T44[_T31] = '\000';
	  k = k + 1;
	  goto _TL29;
	  _TL28: _T44[_T45] = 0;
	}_T2F = (char *)_T44;
      }_T2C = _tag_fat(_T2F,sizeof(char),_T43);
    }ans = _T2C;
    i = 0;
    j = 0;
    _TL1B: _TL2A: if (i < ans_sz) { goto _TL2B;
    }else { goto _TL2C;
    }
    _TL2B: _T32 = filename;
    _T33 = j;
    j = _T33 + 1;
    _T34 = _T33;
    _T35 = _check_fat_subscript(_T32,sizeof(char),_T34);
    _T36 = (const char *)_T35;
    { char c = *_T36;
      _T37 = ans;
      _T38 = i;
      i = _T38 + 1;
      _T39 = _T38;
      { struct _fat_ptr _T43 = _fat_ptr_plus(_T37,sizeof(char),_T39);
	_T3A = _check_fat_subscript(_T43,sizeof(char),0U);
	_T3B = (char *)_T3A;
	{ char _T44 = *_T3B;
	  _T3D = c;
	  _T3E = (int)_T3D;
	  if (_T3E != 92) { goto _TL2D;
	  }
	  _T3C = '/';
	  goto _TL2E;
	  _TL2D: _T3C = c;
	  _TL2E: { char _T45 = _T3C;
	    _T3F = _get_fat_size(_T43,sizeof(char));
	    if (_T3F != 1U) { goto _TL2F;
	    }
	    if (_T44 != 0) { goto _TL2F;
	    }
	    if (_T45 == 0) { goto _TL2F;
	    }
	    _throw_arraybounds();
	    goto _TL30;
	    _TL2F: _TL30: _T40 = _T43.curr;
	    _T41 = (char *)_T40;
	    *_T41 = _T45;
	  }
	}
      }
    }goto _TL2A;
    _TL2C: _T42 = ans;
    return _T42;
  }
}