monoeg_g_iconv_open (const char * to_charset, const char * from_charset)
{
  _Bool D.4988;
  _Bool D.4989;
  _Bool D.4990;
  char D.4992;
  char D.4994;
  int * D.4995;
  struct _GIConv * D.4996;
  const char * D.4997;
  int D.4998;
  int D.5001;
  _Bool D.5004;
  _Bool D.5005;
  _Bool D.5006;
  void * icd;
  int (*Decoder) (char *, size_t, gunichar *) decoder;
  int (*Encoder) (gunichar, char *, size_t) encoder;
  struct _GIConv * cd;
  guint i;

  icd = 4294967295B;
  decoder = 0B;
  encoder = 0B;
  D.4988 = to_charset == 0B;
  D.4989 = from_charset == 0B;
  D.4990 = D.4988 | D.4989;
  if (D.4990 != 0) goto <D.4986>; else goto <D.4991>;
  <D.4991>:
  D.4992 = *to_charset;
  if (D.4992 == 0) goto <D.4986>; else goto <D.4993>;
  <D.4993>:
  D.4994 = *from_charset;
  if (D.4994 == 0) goto <D.4986>; else goto <D.4987>;
  <D.4986>:
  D.4995 = __errno_location ();
  *D.4995 = 22;
  D.4996 = 4294967295B;
  return D.4996;
  <D.4987>:
  i = 0;
  goto <D.4662>;
  <D.4661>:
  D.4997 = charsets[i].name;
  D.4998 = monoeg_ascii_strcasecmp (D.4997, from_charset);
  if (D.4998 == 0) goto <D.4999>; else goto <D.5000>;
  <D.4999>:
  decoder = charsets[i].decoder;
  <D.5000>:
  D.4997 = charsets[i].name;
  D.5001 = monoeg_ascii_strcasecmp (D.4997, to_charset);
  if (D.5001 == 0) goto <D.5002>; else goto <D.5003>;
  <D.5002>:
  encoder = charsets[i].encoder;
  <D.5003>:
  i = i + 1;
  <D.4662>:
  if (i <= 14) goto <D.4661>; else goto <D.4663>;
  <D.4663>:
  D.5004 = encoder == 0B;
  D.5005 = decoder == 0B;
  D.5006 = D.5004 | D.5005;
  if (D.5006 != 0) goto <D.5007>; else goto <D.5008>;
  <D.5007>:
  icd = iconv_open (to_charset, from_charset);
  if (icd == 4294967295B) goto <D.5009>; else goto <D.5010>;
  <D.5009>:
  D.4996 = 4294967295B;
  return D.4996;
  <D.5010>:
  <D.5008>:
  cd = monoeg_malloc (16);
  cd->decode = decoder;
  cd->encode = encoder;
  cd->c = 4294967295;
  cd->cd = icd;
  D.4996 = cd;
  return D.4996;
}


encode_utf8 (gunichar c, char * outbuf, size_t outleft)
{
  unsigned char D.5014;
  int D.5015;
  unsigned int n.0;
  int * D.5031;
  sizetype i.1;
  unsigned char * D.5033;
  unsigned char D.5034;
  unsigned char D.5035;
  unsigned char D.5036;
  unsigned char D.5037;
  unsigned char * outptr;
  int base;
  int n;
  int i;

  outptr = outbuf;
  if (c <= 127) goto <D.5012>; else goto <D.5013>;
  <D.5012>:
  D.5014 = (unsigned char) c;
  *outptr = D.5014;
  D.5015 = 1;
  return D.5015;
  <D.5013>:
  if (c <= 2047) goto <D.5016>; else goto <D.5017>;
  <D.5016>:
  base = 192;
  n = 2;
  goto <D.5018>;
  <D.5017>:
  if (c <= 65535) goto <D.5019>; else goto <D.5020>;
  <D.5019>:
  base = 224;
  n = 3;
  goto <D.5021>;
  <D.5020>:
  if (c <= 2097151) goto <D.5022>; else goto <D.5023>;
  <D.5022>:
  base = 240;
  n = 4;
  goto <D.5024>;
  <D.5023>:
  if (c <= 67108863) goto <D.5025>; else goto <D.5026>;
  <D.5025>:
  base = 248;
  n = 5;
  goto <D.5027>;
  <D.5026>:
  base = 252;
  n = 6;
  <D.5027>:
  <D.5024>:
  <D.5021>:
  <D.5018>:
  n.0 = (unsigned int) n;
  if (n.0 > outleft) goto <D.5029>; else goto <D.5030>;
  <D.5029>:
  D.5031 = __errno_location ();
  *D.5031 = 7;
  D.5015 = -1;
  return D.5015;
  <D.5030>:
  i = n + -1;
  goto <D.4768>;
  <D.4767>:
  i.1 = (sizetype) i;
  D.5033 = outptr + i.1;
  D.5014 = (unsigned char) c;
  D.5034 = D.5014 & 63;
  D.5035 = D.5034 | 128;
  *D.5033 = D.5035;
  c = c >> 6;
  i = i + -1;
  <D.4768>:
  if (i > 0) goto <D.4767>; else goto <D.4769>;
  <D.4769>:
  D.5014 = (unsigned char) c;
  D.5036 = (unsigned char) base;
  D.5037 = D.5014 | D.5036;
  *outptr = D.5037;
  D.5015 = n;
  return D.5015;
}


decode_utf8 (char * inbuf, size_t inleft, gunichar * outchar)
{
  unsigned char D.5039;
  int D.5042;
  int * D.5045;
  unsigned int n.2;
  unsigned int D.5064;
  unsigned char D.5065;
  unsigned int D.5066;
  unsigned char * inptr;
  gunichar u;
  int n;
  int i;

  inptr = inbuf;
  D.5039 = *inptr;
  u = (gunichar) D.5039;
  if (u <= 127) goto <D.5040>; else goto <D.5041>;
  <D.5040>:
  *outchar = u;
  D.5042 = 1;
  return D.5042;
  <D.5041>:
  if (u <= 193) goto <D.5043>; else goto <D.5044>;
  <D.5043>:
  D.5045 = __errno_location ();
  *D.5045 = 84;
  D.5042 = -1;
  return D.5042;
  <D.5044>:
  if (u <= 223) goto <D.5046>; else goto <D.5047>;
  <D.5046>:
  u = u & 31;
  n = 2;
  goto <D.5048>;
  <D.5047>:
  if (u <= 239) goto <D.5049>; else goto <D.5050>;
  <D.5049>:
  u = u & 15;
  n = 3;
  goto <D.5051>;
  <D.5050>:
  if (u <= 247) goto <D.5052>; else goto <D.5053>;
  <D.5052>:
  u = u & 7;
  n = 4;
  goto <D.5054>;
  <D.5053>:
  if (u <= 251) goto <D.5055>; else goto <D.5056>;
  <D.5055>:
  u = u & 3;
  n = 5;
  goto <D.5057>;
  <D.5056>:
  if (u <= 253) goto <D.5058>; else goto <D.5059>;
  <D.5058>:
  u = u & 1;
  n = 6;
  goto <D.5060>;
  <D.5059>:
  D.5045 = __errno_location ();
  *D.5045 = 84;
  D.5042 = -1;
  return D.5042;
  <D.5060>:
  <D.5057>:
  <D.5054>:
  <D.5051>:
  <D.5048>:
  n.2 = (unsigned int) n;
  if (n.2 > inleft) goto <D.5062>; else goto <D.5063>;
  <D.5062>:
  D.5045 = __errno_location ();
  *D.5045 = 22;
  D.5042 = -1;
  return D.5042;
  <D.5063>:
  i = 1;
  goto <D.4756>;
  <D.4755>:
  D.5064 = u << 6;
  inptr = inptr + 1;
  D.5039 = *inptr;
  D.5065 = D.5039 ^ 128;
  D.5066 = (unsigned int) D.5065;
  u = D.5064 | D.5066;
  i = i + 1;
  <D.4756>:
  if (i < n) goto <D.4755>; else goto <D.4757>;
  <D.4757>:
  *outchar = u;
  D.5042 = n;
  return D.5042;
}


encode_utf16le (gunichar c, char * outbuf, size_t outleft)
{
  int * D.5072;
  int D.5073;
  unsigned char D.5074;
  unsigned char * D.5075;
  unsigned int D.5076;
  unsigned char D.5077;
  unsigned int D.5080;
  short unsigned int D.5081;
  unsigned char D.5082;
  short unsigned int D.5083;
  unsigned char D.5084;
  short unsigned int D.5085;
  short unsigned int D.5086;
  unsigned char * D.5087;
  unsigned char * D.5088;
  unsigned char * outptr;
  gunichar2 ch;
  gunichar c2;

  outptr = outbuf;
  if (c <= 65535) goto <D.5068>; else goto <D.5069>;
  <D.5068>:
  if (outleft <= 1) goto <D.5070>; else goto <D.5071>;
  <D.5070>:
  D.5072 = __errno_location ();
  *D.5072 = 7;
  D.5073 = -1;
  return D.5073;
  <D.5071>:
  D.5074 = (unsigned char) c;
  *outptr = D.5074;
  D.5075 = outptr + 1;
  D.5076 = c >> 8;
  D.5077 = (unsigned char) D.5076;
  *D.5075 = D.5077;
  D.5073 = 2;
  return D.5073;
  <D.5069>:
  if (outleft <= 3) goto <D.5078>; else goto <D.5079>;
  <D.5078>:
  D.5072 = __errno_location ();
  *D.5072 = 7;
  D.5073 = -1;
  return D.5073;
  <D.5079>:
  c2 = c + 4294901760;
  D.5080 = c2 >> 10;
  D.5081 = (short unsigned int) D.5080;
  ch = D.5081 + 55296;
  D.5082 = (unsigned char) ch;
  *outptr = D.5082;
  D.5075 = outptr + 1;
  D.5083 = ch >> 8;
  D.5084 = (unsigned char) D.5083;
  *D.5075 = D.5084;
  D.5085 = (short unsigned int) c2;
  D.5086 = D.5085 & 1023;
  ch = D.5086 + 56320;
  D.5087 = outptr + 2;
  D.5082 = (unsigned char) ch;
  *D.5087 = D.5082;
  D.5088 = outptr + 3;
  D.5083 = ch >> 8;
  D.5084 = (unsigned char) D.5083;
  *D.5088 = D.5084;
  D.5073 = 4;
  return D.5073;
}


decode_utf16le (char * inbuf, size_t inleft, gunichar * outchar)
{
  int * D.5092;
  int D.5093;
  unsigned char * D.5094;
  unsigned char D.5095;
  int D.5096;
  int D.5097;
  unsigned char D.5098;
  int D.5099;
  int D.5100;
  unsigned char * D.5107;
  unsigned char D.5108;
  int D.5109;
  int D.5110;
  signed short D.5111;
  unsigned char * D.5112;
  unsigned char D.5113;
  signed short D.5114;
  signed short D.5115;
  short unsigned int D.5116;
  unsigned int D.5119;
  unsigned int D.5120;
  unsigned int D.5121;
  unsigned int D.5122;
  unsigned char * inptr;
  gunichar2 c;
  gunichar u;

  inptr = inbuf;
  if (inleft <= 1) goto <D.5090>; else goto <D.5091>;
  <D.5090>:
  D.5092 = __errno_location ();
  *D.5092 = 22;
  D.5093 = -1;
  return D.5093;
  <D.5091>:
  D.5094 = inptr + 1;
  D.5095 = *D.5094;
  D.5096 = (int) D.5095;
  D.5097 = D.5096 << 8;
  D.5098 = *inptr;
  D.5099 = (int) D.5098;
  D.5100 = D.5097 | D.5099;
  u = (gunichar) D.5100;
  if (u <= 55295) goto <D.5101>; else goto <D.5102>;
  <D.5101>:
  *outchar = u;
  D.5093 = 2;
  return D.5093;
  <D.5102>:
  if (u <= 56319) goto <D.5103>; else goto <D.5104>;
  <D.5103>:
  if (inleft <= 3) goto <D.5105>; else goto <D.5106>;
  <D.5105>:
  D.5092 = __errno_location ();
  *D.5092 = 22;
  D.5093 = -2;
  return D.5093;
  <D.5106>:
  D.5107 = inptr + 3;
  D.5108 = *D.5107;
  D.5109 = (int) D.5108;
  D.5110 = D.5109 << 8;
  D.5111 = (signed short) D.5110;
  D.5112 = inptr + 2;
  D.5113 = *D.5112;
  D.5114 = (signed short) D.5113;
  D.5115 = D.5111 | D.5114;
  c = (gunichar2) D.5115;
  D.5116 = c + 9216;
  if (D.5116 > 1023) goto <D.5117>; else goto <D.5118>;
  <D.5117>:
  D.5092 = __errno_location ();
  *D.5092 = 84;
  D.5093 = -2;
  return D.5093;
  <D.5118>:
  D.5119 = u + 4294912000;
  D.5120 = D.5119 << 10;
  D.5121 = (unsigned int) c;
  D.5122 = D.5120 + D.5121;
  u = D.5122 + 9216;
  *outchar = u;
  D.5093 = 4;
  return D.5093;
  <D.5104>:
  if (u <= 57343) goto <D.5123>; else goto <D.5124>;
  <D.5123>:
  D.5092 = __errno_location ();
  *D.5092 = 84;
  D.5093 = -1;
  return D.5093;
  <D.5124>:
  *outchar = u;
  D.5093 = 2;
  return D.5093;
}


encode_utf16be (gunichar c, char * outbuf, size_t outleft)
{
  int * D.5130;
  int D.5131;
  unsigned int D.5132;
  unsigned char D.5133;
  unsigned char * D.5134;
  unsigned char D.5135;
  unsigned int D.5138;
  short unsigned int D.5139;
  short unsigned int D.5140;
  unsigned char D.5141;
  unsigned char D.5142;
  short unsigned int D.5143;
  short unsigned int D.5144;
  unsigned char * D.5145;
  unsigned char * D.5146;
  unsigned char * outptr;
  gunichar2 ch;
  gunichar c2;

  outptr = outbuf;
  if (c <= 65535) goto <D.5126>; else goto <D.5127>;
  <D.5126>:
  if (outleft <= 1) goto <D.5128>; else goto <D.5129>;
  <D.5128>:
  D.5130 = __errno_location ();
  *D.5130 = 7;
  D.5131 = -1;
  return D.5131;
  <D.5129>:
  D.5132 = c >> 8;
  D.5133 = (unsigned char) D.5132;
  *outptr = D.5133;
  D.5134 = outptr + 1;
  D.5135 = (unsigned char) c;
  *D.5134 = D.5135;
  D.5131 = 2;
  return D.5131;
  <D.5127>:
  if (outleft <= 3) goto <D.5136>; else goto <D.5137>;
  <D.5136>:
  D.5130 = __errno_location ();
  *D.5130 = 7;
  D.5131 = -1;
  return D.5131;
  <D.5137>:
  c2 = c + 4294901760;
  D.5138 = c2 >> 10;
  D.5139 = (short unsigned int) D.5138;
  ch = D.5139 + 55296;
  D.5140 = ch >> 8;
  D.5141 = (unsigned char) D.5140;
  *outptr = D.5141;
  D.5134 = outptr + 1;
  D.5142 = (unsigned char) ch;
  *D.5134 = D.5142;
  D.5143 = (short unsigned int) c2;
  D.5144 = D.5143 & 1023;
  ch = D.5144 + 56320;
  D.5145 = outptr + 2;
  D.5140 = ch >> 8;
  D.5141 = (unsigned char) D.5140;
  *D.5145 = D.5141;
  D.5146 = outptr + 3;
  D.5142 = (unsigned char) ch;
  *D.5146 = D.5142;
  D.5131 = 4;
  return D.5131;
}


decode_utf16be (char * inbuf, size_t inleft, gunichar * outchar)
{
  int * D.5150;
  int D.5151;
  unsigned char D.5152;
  int D.5153;
  int D.5154;
  unsigned char * D.5155;
  unsigned char D.5156;
  int D.5157;
  int D.5158;
  unsigned char * D.5165;
  unsigned char D.5166;
  int D.5167;
  int D.5168;
  signed short D.5169;
  unsigned char * D.5170;
  unsigned char D.5171;
  signed short D.5172;
  signed short D.5173;
  short unsigned int D.5174;
  unsigned int D.5177;
  unsigned int D.5178;
  unsigned int D.5179;
  unsigned int D.5180;
  unsigned char * inptr;
  gunichar2 c;
  gunichar u;

  inptr = inbuf;
  if (inleft <= 1) goto <D.5148>; else goto <D.5149>;
  <D.5148>:
  D.5150 = __errno_location ();
  *D.5150 = 22;
  D.5151 = -1;
  return D.5151;
  <D.5149>:
  D.5152 = *inptr;
  D.5153 = (int) D.5152;
  D.5154 = D.5153 << 8;
  D.5155 = inptr + 1;
  D.5156 = *D.5155;
  D.5157 = (int) D.5156;
  D.5158 = D.5154 | D.5157;
  u = (gunichar) D.5158;
  if (u <= 55295) goto <D.5159>; else goto <D.5160>;
  <D.5159>:
  *outchar = u;
  D.5151 = 2;
  return D.5151;
  <D.5160>:
  if (u <= 56319) goto <D.5161>; else goto <D.5162>;
  <D.5161>:
  if (inleft <= 3) goto <D.5163>; else goto <D.5164>;
  <D.5163>:
  D.5150 = __errno_location ();
  *D.5150 = 22;
  D.5151 = -2;
  return D.5151;
  <D.5164>:
  D.5165 = inptr + 2;
  D.5166 = *D.5165;
  D.5167 = (int) D.5166;
  D.5168 = D.5167 << 8;
  D.5169 = (signed short) D.5168;
  D.5170 = inptr + 3;
  D.5171 = *D.5170;
  D.5172 = (signed short) D.5171;
  D.5173 = D.5169 | D.5172;
  c = (gunichar2) D.5173;
  D.5174 = c + 9216;
  if (D.5174 > 1023) goto <D.5175>; else goto <D.5176>;
  <D.5175>:
  D.5150 = __errno_location ();
  *D.5150 = 84;
  D.5151 = -2;
  return D.5151;
  <D.5176>:
  D.5177 = u + 4294912000;
  D.5178 = D.5177 << 10;
  D.5179 = (unsigned int) c;
  D.5180 = D.5178 + D.5179;
  u = D.5180 + 9216;
  *outchar = u;
  D.5151 = 4;
  return D.5151;
  <D.5162>:
  if (u <= 57343) goto <D.5181>; else goto <D.5182>;
  <D.5181>:
  D.5150 = __errno_location ();
  *D.5150 = 84;
  D.5151 = -1;
  return D.5151;
  <D.5182>:
  *outchar = u;
  D.5151 = 2;
  return D.5151;
}


encode_utf32le (gunichar c, char * outbuf, size_t outleft)
{
  int * D.5186;
  int D.5187;
  unsigned char D.5188;
  unsigned char * D.5189;
  unsigned int D.5190;
  unsigned char D.5191;
  unsigned char * D.5192;
  unsigned int D.5193;
  unsigned char D.5194;
  unsigned char * D.5195;
  unsigned int D.5196;
  unsigned char D.5197;
  unsigned char * outptr;

  outptr = outbuf;
  if (outleft <= 3) goto <D.5184>; else goto <D.5185>;
  <D.5184>:
  D.5186 = __errno_location ();
  *D.5186 = 7;
  D.5187 = -1;
  return D.5187;
  <D.5185>:
  D.5188 = (unsigned char) c;
  *outptr = D.5188;
  D.5189 = outptr + 1;
  D.5190 = c >> 8;
  D.5191 = (unsigned char) D.5190;
  *D.5189 = D.5191;
  D.5192 = outptr + 2;
  D.5193 = c >> 16;
  D.5194 = (unsigned char) D.5193;
  *D.5192 = D.5194;
  D.5195 = outptr + 3;
  D.5196 = c >> 24;
  D.5197 = (unsigned char) D.5196;
  *D.5195 = D.5197;
  D.5187 = 4;
  return D.5187;
}


decode_utf32le (char * inbuf, size_t inleft, gunichar * outchar)
{
  int * D.5201;
  int D.5202;
  unsigned char * D.5203;
  unsigned char D.5204;
  int D.5205;
  int D.5206;
  unsigned char * D.5207;
  unsigned char D.5208;
  int D.5209;
  int D.5210;
  int D.5211;
  unsigned char * D.5212;
  unsigned char D.5213;
  int D.5214;
  int D.5215;
  int D.5216;
  unsigned char D.5217;
  int D.5218;
  int D.5219;
  unsigned int D.5220;
  unsigned char * inptr;
  gunichar c;

  inptr = inbuf;
  if (inleft <= 3) goto <D.5199>; else goto <D.5200>;
  <D.5199>:
  D.5201 = __errno_location ();
  *D.5201 = 22;
  D.5202 = -1;
  return D.5202;
  <D.5200>:
  D.5203 = inptr + 3;
  D.5204 = *D.5203;
  D.5205 = (int) D.5204;
  D.5206 = D.5205 << 24;
  D.5207 = inptr + 2;
  D.5208 = *D.5207;
  D.5209 = (int) D.5208;
  D.5210 = D.5209 << 16;
  D.5211 = D.5206 | D.5210;
  D.5212 = inptr + 1;
  D.5213 = *D.5212;
  D.5214 = (int) D.5213;
  D.5215 = D.5214 << 8;
  D.5216 = D.5211 | D.5215;
  D.5217 = *inptr;
  D.5218 = (int) D.5217;
  D.5219 = D.5216 | D.5218;
  c = (gunichar) D.5219;
  D.5220 = c + 4294912000;
  if (D.5220 <= 2047) goto <D.5221>; else goto <D.5222>;
  <D.5221>:
  D.5201 = __errno_location ();
  *D.5201 = 84;
  D.5202 = -1;
  return D.5202;
  <D.5222>:
  if (c > 1114111) goto <D.5223>; else goto <D.5224>;
  <D.5223>:
  D.5201 = __errno_location ();
  *D.5201 = 84;
  D.5202 = -1;
  return D.5202;
  <D.5224>:
  *outchar = c;
  D.5202 = 4;
  return D.5202;
}


encode_utf32be (gunichar c, char * outbuf, size_t outleft)
{
  int * D.5228;
  int D.5229;
  unsigned int D.5230;
  unsigned char D.5231;
  unsigned char * D.5232;
  unsigned int D.5233;
  unsigned char D.5234;
  unsigned char * D.5235;
  unsigned int D.5236;
  unsigned char D.5237;
  unsigned char * D.5238;
  unsigned char D.5239;
  unsigned char * outptr;

  outptr = outbuf;
  if (outleft <= 3) goto <D.5226>; else goto <D.5227>;
  <D.5226>:
  D.5228 = __errno_location ();
  *D.5228 = 7;
  D.5229 = -1;
  return D.5229;
  <D.5227>:
  D.5230 = c >> 24;
  D.5231 = (unsigned char) D.5230;
  *outptr = D.5231;
  D.5232 = outptr + 1;
  D.5233 = c >> 16;
  D.5234 = (unsigned char) D.5233;
  *D.5232 = D.5234;
  D.5235 = outptr + 2;
  D.5236 = c >> 8;
  D.5237 = (unsigned char) D.5236;
  *D.5235 = D.5237;
  D.5238 = outptr + 3;
  D.5239 = (unsigned char) c;
  *D.5238 = D.5239;
  D.5229 = 4;
  return D.5229;
}


decode_utf32be (char * inbuf, size_t inleft, gunichar * outchar)
{
  int * D.5243;
  int D.5244;
  unsigned char D.5245;
  int D.5246;
  int D.5247;
  unsigned char * D.5248;
  unsigned char D.5249;
  int D.5250;
  int D.5251;
  int D.5252;
  unsigned char * D.5253;
  unsigned char D.5254;
  int D.5255;
  int D.5256;
  int D.5257;
  unsigned char * D.5258;
  unsigned char D.5259;
  int D.5260;
  int D.5261;
  unsigned int D.5262;
  unsigned char * inptr;
  gunichar c;

  inptr = inbuf;
  if (inleft <= 3) goto <D.5241>; else goto <D.5242>;
  <D.5241>:
  D.5243 = __errno_location ();
  *D.5243 = 22;
  D.5244 = -1;
  return D.5244;
  <D.5242>:
  D.5245 = *inptr;
  D.5246 = (int) D.5245;
  D.5247 = D.5246 << 24;
  D.5248 = inptr + 1;
  D.5249 = *D.5248;
  D.5250 = (int) D.5249;
  D.5251 = D.5250 << 16;
  D.5252 = D.5247 | D.5251;
  D.5253 = inptr + 2;
  D.5254 = *D.5253;
  D.5255 = (int) D.5254;
  D.5256 = D.5255 << 8;
  D.5257 = D.5252 | D.5256;
  D.5258 = inptr + 3;
  D.5259 = *D.5258;
  D.5260 = (int) D.5259;
  D.5261 = D.5257 | D.5260;
  c = (gunichar) D.5261;
  D.5262 = c + 4294912000;
  if (D.5262 <= 2047) goto <D.5263>; else goto <D.5264>;
  <D.5263>:
  D.5243 = __errno_location ();
  *D.5243 = 84;
  D.5244 = -1;
  return D.5244;
  <D.5264>:
  if (c > 1114111) goto <D.5265>; else goto <D.5266>;
  <D.5265>:
  D.5243 = __errno_location ();
  *D.5243 = 84;
  D.5244 = -1;
  return D.5244;
  <D.5266>:
  *outchar = c;
  D.5244 = 4;
  return D.5244;
}


encode_latin1 (gunichar c, char * outbuf, size_t outleft)
{
  int * D.5270;
  int D.5271;
  char D.5274;

  if (outleft == 0) goto <D.5268>; else goto <D.5269>;
  <D.5268>:
  D.5270 = __errno_location ();
  *D.5270 = 7;
  D.5271 = -1;
  return D.5271;
  <D.5269>:
  if (c > 255) goto <D.5272>; else goto <D.5273>;
  <D.5272>:
  D.5270 = __errno_location ();
  *D.5270 = 84;
  D.5271 = -1;
  return D.5271;
  <D.5273>:
  D.5274 = (char) c;
  *outbuf = D.5274;
  D.5271 = 1;
  return D.5271;
}


decode_latin1 (char * inbuf, size_t inleft, gunichar * outchar)
{
  char D.5276;
  unsigned char D.5277;
  unsigned int D.5278;
  int D.5279;

  D.5276 = *inbuf;
  D.5277 = (unsigned char) D.5276;
  D.5278 = (unsigned int) D.5277;
  *outchar = D.5278;
  D.5279 = 1;
  return D.5279;
}


monoeg_g_iconv_close (struct _GIConv * cd)
{
  void * D.5281;
  int D.5284;

  D.5281 = cd->cd;
  if (D.5281 != 4294967295B) goto <D.5282>; else goto <D.5283>;
  <D.5282>:
  D.5281 = cd->cd;
  iconv_close (D.5281);
  <D.5283>:
  monoeg_g_free (cd);
  D.5284 = 0;
  return D.5284;
}


monoeg_g_iconv (struct _GIConv * cd, gchar * * inbytes, gsize * inbytesleft, gchar * * outbytes, gsize * outbytesleft)
{
  void * D.5286;
  unsigned int n_inleft.3;
  unsigned int n_outleft.4;
  gsize D.5297;
  _Bool D.5298;
  _Bool D.5299;
  _Bool D.5300;
  gsize iftmp.5;
  char * iftmp.6;
  unsigned int c.7;
  unsigned int c.8;
  int (*<Tdbd>) (char *, size_t, gunichar *) D.5314;
  unsigned int rc.9;
  sizetype rc.10;
  int (*<Tdc2>) (gunichar, char *, size_t) D.5318;
  gsize iftmp.11;
  gsize inleft;
  gsize outleft;
  char * inptr;
  char * outptr;
  gunichar c;
  int rc;
  void encode = <<< error >>>;

  try
    {
      rc = 0;
      D.5286 = cd->cd;
      if (D.5286 != 4294967295B) goto <D.5287>; else goto <D.5288>;
      <D.5287>:
      {
        size_t * outleftptr;
        size_t * inleftptr;
        size_t n_outleft;
        size_t n_inleft;

        try
          {
            if (inbytesleft != 0B) goto <D.5289>; else goto <D.5290>;
            <D.5289>:
            n_inleft.3 = *inbytesleft;
            n_inleft = n_inleft.3;
            inleftptr = &n_inleft;
            goto <D.5292>;
            <D.5290>:
            inleftptr = 0B;
            <D.5292>:
            if (outbytesleft != 0B) goto <D.5293>; else goto <D.5294>;
            <D.5293>:
            n_outleft.4 = *outbytesleft;
            n_outleft = n_outleft.4;
            outleftptr = &n_outleft;
            goto <D.5296>;
            <D.5294>:
            outleftptr = 0B;
            <D.5296>:
            D.5286 = cd->cd;
            D.5297 = iconv (D.5286, inbytes, inleftptr, outbytes, outleftptr);
            return D.5297;
          }
        finally
          {
            n_outleft = {CLOBBER};
            n_inleft = {CLOBBER};
          }
      }
      <D.5288>:
      D.5298 = outbytes == 0B;
      D.5299 = outbytesleft == 0B;
      D.5300 = D.5298 | D.5299;
      if (D.5300 != 0) goto <D.5301>; else goto <D.5302>;
      <D.5301>:
      cd->c = 4294967295;
      D.5297 = 0;
      return D.5297;
      <D.5302>:
      if (inbytesleft != 0B) goto <D.5304>; else goto <D.5305>;
      <D.5304>:
      iftmp.5 = *inbytesleft;
      goto <D.5306>;
      <D.5305>:
      iftmp.5 = 0;
      <D.5306>:
      inleft = iftmp.5;
      if (inbytes != 0B) goto <D.5308>; else goto <D.5309>;
      <D.5308>:
      iftmp.6 = *inbytes;
      goto <D.5310>;
      <D.5309>:
      iftmp.6 = 0B;
      <D.5310>:
      inptr = iftmp.6;
      outleft = *outbytesleft;
      outptr = *outbytes;
      c.7 = cd->c;
      c = c.7;
      c.8 = c;
      if (c.8 != 4294967295) goto encode; else goto <D.5313>;
      <D.5313>:
      goto <D.4687>;
      <D.4686>:
      D.5314 = cd->decode;
      rc = D.5314 (inptr, inleft, &c);
      if (rc < 0) goto <D.4685>; else goto <D.5315>;
      <D.5315>:
      rc.9 = (unsigned int) rc;
      inleft = inleft - rc.9;
      rc.10 = (sizetype) rc;
      inptr = inptr + rc.10;
      encode:
      D.5318 = cd->encode;
      c.8 = c;
      rc = D.5318 (c.8, outptr, outleft);
      if (rc < 0) goto <D.4685>; else goto <D.5319>;
      <D.5319>:
      c = 4294967295;
      rc.9 = (unsigned int) rc;
      outleft = outleft - rc.9;
      rc.10 = (sizetype) rc;
      outptr = outptr + rc.10;
      <D.4687>:
      if (inleft != 0) goto <D.4686>; else goto <D.4685>;
      <D.4685>:
      if (inbytesleft != 0B) goto <D.5320>; else goto <D.5321>;
      <D.5320>:
      *inbytesleft = inleft;
      <D.5321>:
      if (inbytes != 0B) goto <D.5322>; else goto <D.5323>;
      <D.5322>:
      *inbytes = inptr;
      <D.5323>:
      *outbytesleft = outleft;
      *outbytes = outptr;
      c.8 = c;
      cd->c = c.8;
      if (rc < 0) goto <D.5325>; else goto <D.5326>;
      <D.5325>:
      iftmp.11 = 4294967295;
      goto <D.5327>;
      <D.5326>:
      iftmp.11 = 0;
      <D.5327>:
      D.5297 = iftmp.11;
      return D.5297;
    }
  finally
    {
      c = {CLOBBER};
    }
}


monoeg_g_convert_error_quark ()
{
  void * D.5331;

  D.5331 = error_quark;
  return D.5331;
}


monoeg_g_convert (const gchar * str, gssize len, const gchar * to_charset, const gchar * from_charset, gsize * bytes_read, gsize * bytes_written, struct GError * * err)
{
  gchar * D.5335;
  void * D.5342;
  size_t iftmp.12;
  unsigned int inleft.13;
  unsigned int D.5352;
  int * D.5358;
  int D.5359;
  unsigned int D.5360;
  char * outbuf.14;
  int outbuf.15;
  int result.16;
  int D.5364;
  unsigned int outleft.17;
  unsigned int outleft.18;
  char * outbuf.19;
  const gchar * D.5371;
  void * D.5372;
  char * inbuf.20;
  int inbuf.21;
  int str.22;
  int D.5378;
  unsigned int D.5379;
  const gchar * D.5382;
  void * D.5383;
  unsigned int D.5392;
  gsize outsize;
  gsize outused;
  gsize outleft;
  gsize inleft;
  gsize grow;
  gsize rc;
  char * result;
  char * outbuf;
  char * inbuf;
  gboolean flush;
  gboolean done;
  struct _GIConv * cd;

  try
    {
      flush = 0;
      done = 0;
      if (str == 0B) goto <D.5333>; else goto <D.5334>;
      <D.5333>:
      monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "giconv.c", 669, "str != NULL");
      D.5335 = 0B;
      return D.5335;
      <D.5334>:
      if (to_charset == 0B) goto <D.5336>; else goto <D.5337>;
      <D.5336>:
      monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "giconv.c", 670, "to_charset != NULL");
      D.5335 = 0B;
      return D.5335;
      <D.5337>:
      if (from_charset == 0B) goto <D.5338>; else goto <D.5339>;
      <D.5338>:
      monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "giconv.c", 671, "from_charset != NULL");
      D.5335 = 0B;
      return D.5335;
      <D.5339>:
      cd = monoeg_g_iconv_open (to_charset, from_charset);
      if (cd == 4294967295B) goto <D.5340>; else goto <D.5341>;
      <D.5340>:
      D.5342 = monoeg_g_convert_error_quark ();
      monoeg_g_set_error (err, D.5342, 0, "Conversion from %s to %s not supported.", from_charset, to_charset);
      if (bytes_written != 0B) goto <D.5343>; else goto <D.5344>;
      <D.5343>:
      *bytes_written = 0;
      <D.5344>:
      if (bytes_read != 0B) goto <D.5345>; else goto <D.5346>;
      <D.5345>:
      *bytes_read = 0;
      <D.5346>:
      D.5335 = 0B;
      return D.5335;
      <D.5341>:
      if (len < 0) goto <D.5348>; else goto <D.5349>;
      <D.5348>:
      iftmp.12 = strlen (str);
      goto <D.5350>;
      <D.5349>:
      iftmp.12 = (size_t) len;
      <D.5350>:
      inleft = iftmp.12;
      inbuf = str;
      inleft.13 = inleft;
      outsize = MAX_EXPR <inleft.13, 8>;
      outleft = outsize;
      D.5352 = outsize + 4;
      result = monoeg_malloc (D.5352);
      outbuf = result;
      <D.4811>:
      if (flush == 0) goto <D.5353>; else goto <D.5354>;
      <D.5353>:
      rc = monoeg_g_iconv (cd, &inbuf, &inleft, &outbuf, &outleft);
      goto <D.5355>;
      <D.5354>:
      rc = monoeg_g_iconv (cd, 0B, 0B, &outbuf, &outleft);
      <D.5355>:
      if (rc == 4294967295) goto <D.5356>; else goto <D.5357>;
      <D.5356>:
      D.5358 = __errno_location ();
      D.5359 = *D.5358;
      switch (D.5359) <default: <D.4809>, case 7: <D.4805>, case 22: <D.4807>, case 84: <D.4808>>
      <D.4805>:
      inleft.13 = inleft;
      D.5360 = MAX_EXPR <inleft.13, 8>;
      grow = D.5360 << 1;
      outbuf.14 = outbuf;
      outbuf.15 = (int) outbuf.14;
      result.16 = (int) result;
      D.5364 = outbuf.15 - result.16;
      outused = (gsize) D.5364;
      outsize = outsize + grow;
      outleft.17 = outleft;
      outleft.18 = outleft.17 + grow;
      outleft = outleft.18;
      D.5352 = outsize + 4;
      result = monoeg_realloc (result, D.5352);
      outbuf.19 = result + outused;
      outbuf = outbuf.19;
      goto <D.4806>;
      <D.4807>:
      if (flush != 0) goto <D.5368>; else goto <D.5369>;
      <D.5368>:
      done = 1;
      goto <D.5370>;
      <D.5369>:
      flush = 1;
      <D.5370>:
      goto <D.4806>;
      <D.4808>:
      D.5358 = __errno_location ();
      D.5359 = *D.5358;
      D.5371 = monoeg_g_strerror (D.5359);
      D.5372 = monoeg_g_convert_error_quark ();
      monoeg_g_set_error (err, D.5372, 1, "%s", D.5371);
      if (bytes_read != 0B) goto <D.5373>; else goto <D.5374>;
      <D.5373>:
      inbuf.20 = inbuf;
      inbuf.21 = (int) inbuf.20;
      str.22 = (int) str;
      D.5378 = inbuf.21 - str.22;
      D.5379 = (unsigned int) D.5378;
      *bytes_read = D.5379;
      <D.5374>:
      if (bytes_written != 0B) goto <D.5380>; else goto <D.5381>;
      <D.5380>:
      *bytes_written = 0;
      <D.5381>:
      monoeg_g_iconv_close (cd);
      monoeg_g_free (result);
      D.5335 = 0B;
      return D.5335;
      <D.4809>:
      D.5358 = __errno_location ();
      D.5359 = *D.5358;
      D.5382 = monoeg_g_strerror (D.5359);
      D.5383 = monoeg_g_convert_error_quark ();
      monoeg_g_set_error (err, D.5383, 2, "%s", D.5382);
      if (bytes_written != 0B) goto <D.5384>; else goto <D.5385>;
      <D.5384>:
      *bytes_written = 0;
      <D.5385>:
      if (bytes_read != 0B) goto <D.5386>; else goto <D.5387>;
      <D.5386>:
      *bytes_read = 0;
      <D.5387>:
      monoeg_g_iconv_close (cd);
      monoeg_g_free (result);
      D.5335 = 0B;
      return D.5335;
      <D.4806>:
      goto <D.5388>;
      <D.5357>:
      if (flush != 0) goto <D.4810>; else goto <D.5389>;
      <D.5389>:
      flush = 1;
      <D.5388>:
      if (done == 0) goto <D.4811>; else goto <D.4810>;
      <D.4810>:
      monoeg_g_iconv_close (cd);
      outbuf.14 = outbuf;
      memset (outbuf.14, 0, 4);
      if (bytes_written != 0B) goto <D.5390>; else goto <D.5391>;
      <D.5390>:
      outbuf.14 = outbuf;
      outbuf.15 = (int) outbuf.14;
      result.16 = (int) result;
      D.5364 = outbuf.15 - result.16;
      D.5392 = (unsigned int) D.5364;
      *bytes_written = D.5392;
      <D.5391>:
      if (bytes_read != 0B) goto <D.5393>; else goto <D.5394>;
      <D.5393>:
      inbuf.20 = inbuf;
      inbuf.21 = (int) inbuf.20;
      str.22 = (int) str;
      D.5378 = inbuf.21 - str.22;
      D.5379 = (unsigned int) D.5378;
      *bytes_read = D.5379;
      <D.5394>:
      D.5335 = result;
      return D.5335;
    }
  finally
    {
      outleft = {CLOBBER};
      inleft = {CLOBBER};
      outbuf = {CLOBBER};
      inbuf = {CLOBBER};
    }
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.5399;
  int D.5404;
  void * D.5406;
  unsigned int D.5407;

  D.5399 = __builtin_constant_p (__len);
  if (D.5399 != 0) goto <D.5400>; else goto <D.5401>;
  <D.5400>:
  if (__len == 0) goto <D.5402>; else goto <D.5403>;
  <D.5402>:
  D.5404 = __builtin_constant_p (__ch);
  if (D.5404 == 0) goto <D.5397>; else goto <D.5405>;
  <D.5405>:
  if (__ch != 0) goto <D.5397>; else goto <D.5398>;
  <D.5397>:
  __warn_memset_zero_len ();
  D.5406 = __dest;
  return D.5406;
  <D.5398>:
  <D.5403>:
  <D.5401>:
  D.5407 = __builtin_object_size (__dest, 0);
  D.5406 = __builtin___memset_chk (__dest, __ch, __len, D.5407);
  return D.5406;
}


monoeg_g_unichar_to_utf8 (gunichar c, gchar * outbuf)
{
  signed int c.23;
  gint D.5428;
  sizetype i.24;
  gchar * D.5432;
  unsigned char D.5433;
  unsigned char D.5434;
  unsigned char D.5435;
  char D.5436;
  unsigned char D.5437;
  unsigned char D.5438;
  char D.5439;
  int base;
  int n;
  int i;

  if (c <= 127) goto <D.5409>; else goto <D.5410>;
  <D.5409>:
  base = 0;
  n = 1;
  goto <D.5411>;
  <D.5410>:
  if (c <= 2047) goto <D.5412>; else goto <D.5413>;
  <D.5412>:
  base = 192;
  n = 2;
  goto <D.5414>;
  <D.5413>:
  if (c <= 65535) goto <D.5415>; else goto <D.5416>;
  <D.5415>:
  base = 224;
  n = 3;
  goto <D.5417>;
  <D.5416>:
  if (c <= 2097151) goto <D.5418>; else goto <D.5419>;
  <D.5418>:
  base = 240;
  n = 4;
  goto <D.5420>;
  <D.5419>:
  if (c <= 67108863) goto <D.5421>; else goto <D.5422>;
  <D.5421>:
  base = 248;
  n = 5;
  goto <D.5423>;
  <D.5422>:
  c.23 = (signed int) c;
  if (c.23 >= 0) goto <D.5425>; else goto <D.5426>;
  <D.5425>:
  base = 252;
  n = 6;
  goto <D.5427>;
  <D.5426>:
  D.5428 = -1;
  return D.5428;
  <D.5427>:
  <D.5423>:
  <D.5420>:
  <D.5417>:
  <D.5414>:
  <D.5411>:
  if (outbuf != 0B) goto <D.5429>; else goto <D.5430>;
  <D.5429>:
  i = n + -1;
  goto <D.4820>;
  <D.4819>:
  i.24 = (sizetype) i;
  D.5432 = outbuf + i.24;
  D.5433 = (unsigned char) c;
  D.5434 = D.5433 & 63;
  D.5435 = D.5434 | 128;
  D.5436 = (char) D.5435;
  *D.5432 = D.5436;
  c = c >> 6;
  i = i + -1;
  <D.4820>:
  if (i > 0) goto <D.4819>; else goto <D.4821>;
  <D.4821>:
  D.5433 = (unsigned char) c;
  D.5437 = (unsigned char) base;
  D.5438 = D.5433 | D.5437;
  D.5439 = (char) D.5438;
  *outbuf = D.5439;
  <D.5430>:
  D.5428 = n;
  return D.5428;
}


monoeg_g_utf8_to_ucs4_fast (const gchar * str, glong len, glong * items_written)
{
  gunichar * D.5443;
  long int D.5446;
  long unsigned int D.5447;
  long unsigned int D.5448;
  gunichar * outptr.25;
  unsigned int D.5450;
  char D.5451;
  unsigned char D.5452;
  int D.5453;
  unsigned char D.5454;
  sizetype D.5455;
  gunichar * outbuf;
  gunichar * outptr;
  char * inptr;
  glong n;
  glong i;

  if (str == 0B) goto <D.5441>; else goto <D.5442>;
  <D.5441>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "giconv.c", 896, "str != NULL");
  D.5443 = 0B;
  return D.5443;
  <D.5442>:
  n = monoeg_g_utf8_strlen (str, len);
  if (items_written != 0B) goto <D.5444>; else goto <D.5445>;
  <D.5444>:
  *items_written = n;
  <D.5445>:
  D.5446 = n + 1;
  D.5447 = (long unsigned int) D.5446;
  D.5448 = D.5447 * 4;
  outbuf = monoeg_malloc (D.5448);
  outptr = outbuf;
  inptr = str;
  i = 0;
  goto <D.4838>;
  <D.4837>:
  outptr.25 = outptr;
  outptr = outptr.25 + 4;
  D.5450 = monoeg_g_utf8_get_char (inptr);
  *outptr.25 = D.5450;
  D.5451 = *inptr;
  D.5452 = (unsigned char) D.5451;
  D.5453 = (int) D.5452;
  D.5454 = g_utf8_jump_table[D.5453];
  D.5455 = (sizetype) D.5454;
  inptr = inptr + D.5455;
  i = i + 1;
  <D.4838>:
  if (i < n) goto <D.4837>; else goto <D.4839>;
  <D.4839>:
  *outptr = 0;
  D.5443 = outbuf;
  return D.5443;
}


monoeg_g_utf8_to_utf16 (const gchar * str, glong len, glong * items_read, glong * items_written, struct GError * * err)
{
  gunichar2 * D.5457;

  D.5457 = eg_utf8_to_utf16_general (str, len, items_read, items_written, 0, err);
  return D.5457;
}


eg_utf8_to_utf16_general (const gchar * str, glong len, glong * items_read, glong * items_written, gboolean include_nuls, struct GError * * err)
{
  gunichar2 * D.5461;
  void * D.5466;
  unsigned int D.5467;
  unsigned int c.26;
  int * D.5475;
  unsigned int u.27;
  unsigned int n.28;
  sizetype n.29;
  int inptr.30;
  int str.31;
  int D.5483;
  long int outlen.32;
  unsigned int D.5487;
  unsigned int D.5488;
  int D.5493;
  unsigned int D.5494;
  unsigned int D.5495;
  int D.5496;
  void * D.5499;
  void * D.5504;
  gunichar2 * outbuf;
  gunichar2 * outptr;
  size_t outlen;
  size_t inleft;
  char * inptr;
  gunichar c;
  int u;
  int n;
  void error = <<< error >>>;

  try
    {
      outlen = 0;
      if (str == 0B) goto <D.5459>; else goto <D.5460>;
      <D.5459>:
      monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "giconv.c", 926, "str != NULL");
      D.5461 = 0B;
      return D.5461;
      <D.5460>:
      if (len < 0) goto <D.5462>; else goto <D.5463>;
      <D.5462>:
      if (include_nuls != 0) goto <D.5464>; else goto <D.5465>;
      <D.5464>:
      D.5466 = monoeg_g_convert_error_quark ();
      monoeg_g_set_error (err, D.5466, 2, "Conversions with embedded nulls must pass the string length");
      D.5461 = 0B;
      return D.5461;
      <D.5465>:
      D.5467 = strlen (str);
      len = (glong) D.5467;
      <D.5463>:
      inptr = str;
      inleft = (size_t) len;
      goto <D.4859>;
      <D.4858>:
      n = decode_utf8 (inptr, inleft, &c);
      if (n < 0) goto error; else goto <D.5468>;
      <D.5468>:
      c.26 = c;
      if (c.26 == 0) goto <D.5470>; else goto <D.5471>;
      <D.5470>:
      if (include_nuls == 0) goto <D.4857>; else goto <D.5472>;
      <D.5472>:
      <D.5471>:
      c.26 = c;
      u = monoeg_unichar_to_utf16 (c.26, 0B);
      if (u < 0) goto <D.5473>; else goto <D.5474>;
      <D.5473>:
      D.5475 = __errno_location ();
      *D.5475 = 84;
      goto error;
      <D.5474>:
      u.27 = (unsigned int) u;
      outlen = outlen + u.27;
      n.28 = (unsigned int) n;
      inleft = inleft - n.28;
      n.29 = (sizetype) n;
      inptr = inptr + n.29;
      <D.4859>:
      if (inleft != 0) goto <D.4858>; else goto <D.4857>;
      <D.4857>:
      if (items_read != 0B) goto <D.5479>; else goto <D.5480>;
      <D.5479>:
      inptr.30 = (int) inptr;
      str.31 = (int) str;
      D.5483 = inptr.30 - str.31;
      *items_read = D.5483;
      <D.5480>:
      if (items_written != 0B) goto <D.5484>; else goto <D.5485>;
      <D.5484>:
      outlen.32 = (long int) outlen;
      *items_written = outlen.32;
      <D.5485>:
      D.5487 = outlen + 1;
      D.5488 = D.5487 * 2;
      outbuf = monoeg_malloc (D.5488);
      outptr = outbuf;
      inptr = str;
      inleft = (size_t) len;
      goto <D.4862>;
      <D.4861>:
      n = decode_utf8 (inptr, inleft, &c);
      if (n < 0) goto <D.4860>; else goto <D.5489>;
      <D.5489>:
      c.26 = c;
      if (c.26 == 0) goto <D.5490>; else goto <D.5491>;
      <D.5490>:
      if (include_nuls == 0) goto <D.4860>; else goto <D.5492>;
      <D.5492>:
      <D.5491>:
      c.26 = c;
      D.5493 = monoeg_unichar_to_utf16 (c.26, outptr);
      D.5494 = (unsigned int) D.5493;
      D.5495 = D.5494 * 2;
      outptr = outptr + D.5495;
      n.28 = (unsigned int) n;
      inleft = inleft - n.28;
      n.29 = (sizetype) n;
      inptr = inptr + n.29;
      <D.4862>:
      if (inleft != 0) goto <D.4861>; else goto <D.4860>;
      <D.4860>:
      *outptr = 0;
      D.5461 = outbuf;
      return D.5461;
      error:
      D.5475 = __errno_location ();
      D.5496 = *D.5475;
      if (D.5496 == 84) goto <D.5497>; else goto <D.5498>;
      <D.5497>:
      D.5499 = monoeg_g_convert_error_quark ();
      monoeg_g_set_error (err, D.5499, 1, "Illegal byte sequence encounted in the input.");
      goto <D.5500>;
      <D.5498>:
      if (items_read != 0B) goto <D.5501>; else goto <D.5502>;
      <D.5501>:
      goto <D.5503>;
      <D.5502>:
      D.5504 = monoeg_g_convert_error_quark ();
      monoeg_g_set_error (err, D.5504, 3, "Partial byte sequence encountered in the input.");
      <D.5503>:
      <D.5500>:
      if (items_read != 0B) goto <D.5505>; else goto <D.5506>;
      <D.5505>:
      inptr.30 = (int) inptr;
      str.31 = (int) str;
      D.5483 = inptr.30 - str.31;
      *items_read = D.5483;
      <D.5506>:
      if (items_written != 0B) goto <D.5507>; else goto <D.5508>;
      <D.5507>:
      *items_written = 0;
      <D.5508>:
      D.5461 = 0B;
      return D.5461;
    }
  finally
    {
      c = {CLOBBER};
    }
}


monoeg_unichar_to_utf16 (gunichar c, gunichar2 * outbuf)
{
  short unsigned int D.5515;
  int D.5516;
  unsigned int D.5527;
  short unsigned int D.5528;
  short unsigned int D.5529;
  gunichar2 * D.5530;
  short unsigned int D.5531;
  short unsigned int D.5532;
  short unsigned int D.5533;
  gunichar c2;

  if (c <= 55295) goto <D.5511>; else goto <D.5512>;
  <D.5511>:
  if (outbuf != 0B) goto <D.5513>; else goto <D.5514>;
  <D.5513>:
  D.5515 = (short unsigned int) c;
  *outbuf = D.5515;
  <D.5514>:
  D.5516 = 1;
  return D.5516;
  <D.5512>:
  if (c <= 57343) goto <D.5517>; else goto <D.5518>;
  <D.5517>:
  D.5516 = -1;
  return D.5516;
  <D.5518>:
  if (c <= 65535) goto <D.5519>; else goto <D.5520>;
  <D.5519>:
  if (outbuf != 0B) goto <D.5521>; else goto <D.5522>;
  <D.5521>:
  D.5515 = (short unsigned int) c;
  *outbuf = D.5515;
  <D.5522>:
  D.5516 = 1;
  return D.5516;
  <D.5520>:
  if (c <= 1114111) goto <D.5523>; else goto <D.5524>;
  <D.5523>:
  if (outbuf != 0B) goto <D.5525>; else goto <D.5526>;
  <D.5525>:
  c2 = c + 4294901760;
  D.5527 = c2 >> 10;
  D.5528 = (short unsigned int) D.5527;
  D.5529 = D.5528 + 55296;
  *outbuf = D.5529;
  D.5530 = outbuf + 2;
  D.5531 = (short unsigned int) c2;
  D.5532 = D.5531 & 1023;
  D.5533 = D.5532 + 56320;
  *D.5530 = D.5533;
  <D.5526>:
  D.5516 = 2;
  return D.5516;
  <D.5524>:
  D.5516 = -1;
  return D.5516;
}


eg_utf8_to_utf16_with_nuls (const gchar * str, glong len, glong * items_read, glong * items_written, struct GError * * err)
{
  gunichar2 * D.5535;

  D.5535 = eg_utf8_to_utf16_general (str, len, items_read, items_written, 1, err);
  return D.5535;
}


monoeg_utf8_to_ucs4 (const gchar * str, glong len, glong * items_read, glong * items_written, struct GError * * err)
{
  gunichar * D.5539;
  unsigned int D.5542;
  int * D.5545;
  int D.5546;
  void * D.5549;
  void * D.5552;
  int inptr.33;
  int str.34;
  int D.5557;
  unsigned int c.35;
  unsigned int n.36;
  sizetype n.37;
  unsigned int D.5566;
  long int D.5567;
  unsigned int D.5570;
  gunichar * outptr.38;
  gunichar * outbuf;
  gunichar * outptr;
  size_t outlen;
  size_t inleft;
  char * inptr;
  gunichar c;
  int n;

  try
    {
      outlen = 0;
      if (str == 0B) goto <D.5537>; else goto <D.5538>;
      <D.5537>:
      monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "giconv.c", 1025, "str != NULL");
      D.5539 = 0B;
      return D.5539;
      <D.5538>:
      if (len < 0) goto <D.5540>; else goto <D.5541>;
      <D.5540>:
      D.5542 = strlen (str);
      len = (glong) D.5542;
      <D.5541>:
      inptr = str;
      inleft = (size_t) len;
      goto <D.4893>;
      <D.4892>:
      n = decode_utf8 (inptr, inleft, &c);
      if (n < 0) goto <D.5543>; else goto <D.5544>;
      <D.5543>:
      D.5545 = __errno_location ();
      D.5546 = *D.5545;
      if (D.5546 == 84) goto <D.5547>; else goto <D.5548>;
      <D.5547>:
      D.5549 = monoeg_g_convert_error_quark ();
      monoeg_g_set_error (err, D.5549, 1, "Illegal byte sequence encounted in the input.");
      goto <D.5550>;
      <D.5548>:
      if (items_read != 0B) goto <D.4891>; else goto <D.5551>;
      <D.5551>:
      D.5552 = monoeg_g_convert_error_quark ();
      monoeg_g_set_error (err, D.5552, 3, "Partial byte sequence encountered in the input.");
      <D.5550>:
      if (items_read != 0B) goto <D.5553>; else goto <D.5554>;
      <D.5553>:
      inptr.33 = (int) inptr;
      str.34 = (int) str;
      D.5557 = inptr.33 - str.34;
      *items_read = D.5557;
      <D.5554>:
      if (items_written != 0B) goto <D.5558>; else goto <D.5559>;
      <D.5558>:
      *items_written = 0;
      <D.5559>:
      D.5539 = 0B;
      return D.5539;
      <D.5544>:
      c.35 = c;
      if (c.35 == 0) goto <D.4891>; else goto <D.5561>;
      <D.5561>:
      outlen = outlen + 4;
      n.36 = (unsigned int) n;
      inleft = inleft - n.36;
      n.37 = (sizetype) n;
      inptr = inptr + n.37;
      <D.4893>:
      if (inleft != 0) goto <D.4892>; else goto <D.4891>;
      <D.4891>:
      if (items_written != 0B) goto <D.5564>; else goto <D.5565>;
      <D.5564>:
      D.5566 = outlen / 4;
      D.5567 = (long int) D.5566;
      *items_written = D.5567;
      <D.5565>:
      if (items_read != 0B) goto <D.5568>; else goto <D.5569>;
      <D.5568>:
      inptr.33 = (int) inptr;
      str.34 = (int) str;
      D.5557 = inptr.33 - str.34;
      *items_read = D.5557;
      <D.5569>:
      D.5570 = outlen + 4;
      outbuf = monoeg_malloc (D.5570);
      outptr = outbuf;
      inptr = str;
      inleft = (size_t) len;
      goto <D.4896>;
      <D.4895>:
      n = decode_utf8 (inptr, inleft, &c);
      if (n < 0) goto <D.4894>; else goto <D.5571>;
      <D.5571>:
      c.35 = c;
      if (c.35 == 0) goto <D.4894>; else goto <D.5572>;
      <D.5572>:
      outptr.38 = outptr;
      outptr = outptr.38 + 4;
      c.35 = c;
      *outptr.38 = c.35;
      n.36 = (unsigned int) n;
      inleft = inleft - n.36;
      n.37 = (sizetype) n;
      inptr = inptr + n.37;
      <D.4896>:
      if (inleft != 0) goto <D.4895>; else goto <D.4894>;
      <D.4894>:
      *outptr = 0;
      D.5539 = outbuf;
      return D.5539;
    }
  finally
    {
      c = {CLOBBER};
    }
}


monoeg_g_utf16_to_utf8 (const gunichar2 * str, glong len, glong * items_read, glong * items_written, struct GError * * err)
{
  gchar * D.5578;
  unsigned int len.39;
  unsigned int D.5582;
  const gunichar2 * D.5583;
  short unsigned int D.5584;
  long int D.5585;
  _Bool D.5588;
  _Bool D.5589;
  _Bool D.5590;
  int * D.5593;
  int D.5594;
  void * D.5597;
  void * D.5600;
  int inptr.40;
  int str.41;
  int D.5605;
  int D.5606;
  unsigned int c.42;
  int D.5611;
  unsigned int D.5612;
  unsigned int n.43;
  sizetype n.44;
  long int outlen.45;
  unsigned int D.5620;
  int D.5623;
  sizetype D.5624;
  char * inptr;
  char * outbuf;
  char * outptr;
  size_t outlen;
  size_t inleft;
  gunichar c;
  int n;

  try
    {
      outlen = 0;
      if (str == 0B) goto <D.5576>; else goto <D.5577>;
      <D.5576>:
      monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "giconv.c", 1096, "str != NULL");
      D.5578 = 0B;
      return D.5578;
      <D.5577>:
      if (len < 0) goto <D.5579>; else goto <D.5580>;
      <D.5579>:
      len = 0;
      goto <D.4912>;
      <D.4911>:
      len = len + 1;
      <D.4912>:
      len.39 = (unsigned int) len;
      D.5582 = len.39 * 2;
      D.5583 = str + D.5582;
      D.5584 = *D.5583;
      if (D.5584 != 0) goto <D.4911>; else goto <D.4913>;
      <D.4913>:
      <D.5580>:
      inptr = str;
      D.5585 = len * 2;
      inleft = (size_t) D.5585;
      goto <D.4916>;
      <D.4915>:
      n = decode_utf16le (inptr, inleft, &c);
      if (n < 0) goto <D.5586>; else goto <D.5587>;
      <D.5586>:
      D.5588 = n == -2;
      D.5589 = inleft > 2;
      D.5590 = D.5588 & D.5589;
      if (D.5590 != 0) goto <D.5591>; else goto <D.5592>;
      <D.5591>:
      inleft = inleft + 4294967294;
      inptr = inptr + 2;
      <D.5592>:
      D.5593 = __errno_location ();
      D.5594 = *D.5593;
      if (D.5594 == 84) goto <D.5595>; else goto <D.5596>;
      <D.5595>:
      D.5597 = monoeg_g_convert_error_quark ();
      monoeg_g_set_error (err, D.5597, 1, "Illegal byte sequence encounted in the input.");
      goto <D.5598>;
      <D.5596>:
      if (items_read != 0B) goto <D.4914>; else goto <D.5599>;
      <D.5599>:
      D.5600 = monoeg_g_convert_error_quark ();
      monoeg_g_set_error (err, D.5600, 3, "Partial byte sequence encountered in the input.");
      <D.5598>:
      if (items_read != 0B) goto <D.5601>; else goto <D.5602>;
      <D.5601>:
      inptr.40 = (int) inptr;
      str.41 = (int) str;
      D.5605 = inptr.40 - str.41;
      D.5606 = D.5605 / 2;
      *items_read = D.5606;
      <D.5602>:
      if (items_written != 0B) goto <D.5607>; else goto <D.5608>;
      <D.5607>:
      *items_written = 0;
      <D.5608>:
      D.5578 = 0B;
      return D.5578;
      <D.5587>:
      c.42 = c;
      if (c.42 == 0) goto <D.4914>; else goto <D.5610>;
      <D.5610>:
      c.42 = c;
      D.5611 = monoeg_g_unichar_to_utf8 (c.42, 0B);
      D.5612 = (unsigned int) D.5611;
      outlen = D.5612 + outlen;
      n.43 = (unsigned int) n;
      inleft = inleft - n.43;
      n.44 = (sizetype) n;
      inptr = inptr + n.44;
      <D.4916>:
      if (inleft != 0) goto <D.4915>; else goto <D.4914>;
      <D.4914>:
      if (items_read != 0B) goto <D.5615>; else goto <D.5616>;
      <D.5615>:
      inptr.40 = (int) inptr;
      str.41 = (int) str;
      D.5605 = inptr.40 - str.41;
      D.5606 = D.5605 / 2;
      *items_read = D.5606;
      <D.5616>:
      if (items_written != 0B) goto <D.5617>; else goto <D.5618>;
      <D.5617>:
      outlen.45 = (long int) outlen;
      *items_written = outlen.45;
      <D.5618>:
      D.5620 = outlen + 1;
      outbuf = monoeg_malloc (D.5620);
      outptr = outbuf;
      inptr = str;
      D.5585 = len * 2;
      inleft = (size_t) D.5585;
      goto <D.4919>;
      <D.4918>:
      n = decode_utf16le (inptr, inleft, &c);
      if (n < 0) goto <D.4917>; else goto <D.5621>;
      <D.5621>:
      c.42 = c;
      if (c.42 == 0) goto <D.4917>; else goto <D.5622>;
      <D.5622>:
      c.42 = c;
      D.5623 = monoeg_g_unichar_to_utf8 (c.42, outptr);
      D.5624 = (sizetype) D.5623;
      outptr = outptr + D.5624;
      n.43 = (unsigned int) n;
      inleft = inleft - n.43;
      n.44 = (sizetype) n;
      inptr = inptr + n.44;
      <D.4919>:
      if (inleft != 0) goto <D.4918>; else goto <D.4917>;
      <D.4917>:
      *outptr = 0;
      D.5578 = outbuf;
      return D.5578;
    }
  finally
    {
      c = {CLOBBER};
    }
}


monoeg_g_utf16_to_ucs4 (const gunichar2 * str, glong len, glong * items_read, glong * items_written, struct GError * * err)
{
  gunichar * D.5629;
  unsigned int len.46;
  unsigned int D.5633;
  const gunichar2 * D.5634;
  short unsigned int D.5635;
  long int D.5636;
  _Bool D.5639;
  _Bool D.5640;
  _Bool D.5641;
  int * D.5644;
  int D.5645;
  void * D.5648;
  void * D.5651;
  int inptr.47;
  int str.48;
  int D.5656;
  int D.5657;
  unsigned int c.49;
  unsigned int n.50;
  sizetype n.51;
  unsigned int D.5668;
  long int D.5669;
  unsigned int D.5670;
  gunichar * outptr.52;
  gunichar * outbuf;
  gunichar * outptr;
  size_t outlen;
  size_t inleft;
  char * inptr;
  gunichar c;
  int n;

  try
    {
      outlen = 0;
      if (str == 0B) goto <D.5627>; else goto <D.5628>;
      <D.5627>:
      monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "giconv.c", 1177, "str != NULL");
      D.5629 = 0B;
      return D.5629;
      <D.5628>:
      if (len < 0) goto <D.5630>; else goto <D.5631>;
      <D.5630>:
      len = 0;
      goto <D.4935>;
      <D.4934>:
      len = len + 1;
      <D.4935>:
      len.46 = (unsigned int) len;
      D.5633 = len.46 * 2;
      D.5634 = str + D.5633;
      D.5635 = *D.5634;
      if (D.5635 != 0) goto <D.4934>; else goto <D.4936>;
      <D.4936>:
      <D.5631>:
      inptr = str;
      D.5636 = len * 2;
      inleft = (size_t) D.5636;
      goto <D.4939>;
      <D.4938>:
      n = decode_utf16le (inptr, inleft, &c);
      if (n < 0) goto <D.5637>; else goto <D.5638>;
      <D.5637>:
      D.5639 = n == -2;
      D.5640 = inleft > 2;
      D.5641 = D.5639 & D.5640;
      if (D.5641 != 0) goto <D.5642>; else goto <D.5643>;
      <D.5642>:
      inleft = inleft + 4294967294;
      inptr = inptr + 2;
      <D.5643>:
      D.5644 = __errno_location ();
      D.5645 = *D.5644;
      if (D.5645 == 84) goto <D.5646>; else goto <D.5647>;
      <D.5646>:
      D.5648 = monoeg_g_convert_error_quark ();
      monoeg_g_set_error (err, D.5648, 1, "Illegal byte sequence encounted in the input.");
      goto <D.5649>;
      <D.5647>:
      if (items_read != 0B) goto <D.4937>; else goto <D.5650>;
      <D.5650>:
      D.5651 = monoeg_g_convert_error_quark ();
      monoeg_g_set_error (err, D.5651, 3, "Partial byte sequence encountered in the input.");
      <D.5649>:
      if (items_read != 0B) goto <D.5652>; else goto <D.5653>;
      <D.5652>:
      inptr.47 = (int) inptr;
      str.48 = (int) str;
      D.5656 = inptr.47 - str.48;
      D.5657 = D.5656 / 2;
      *items_read = D.5657;
      <D.5653>:
      if (items_written != 0B) goto <D.5658>; else goto <D.5659>;
      <D.5658>:
      *items_written = 0;
      <D.5659>:
      D.5629 = 0B;
      return D.5629;
      <D.5638>:
      c.49 = c;
      if (c.49 == 0) goto <D.4937>; else goto <D.5661>;
      <D.5661>:
      outlen = outlen + 4;
      n.50 = (unsigned int) n;
      inleft = inleft - n.50;
      n.51 = (sizetype) n;
      inptr = inptr + n.51;
      <D.4939>:
      if (inleft != 0) goto <D.4938>; else goto <D.4937>;
      <D.4937>:
      if (items_read != 0B) goto <D.5664>; else goto <D.5665>;
      <D.5664>:
      inptr.47 = (int) inptr;
      str.48 = (int) str;
      D.5656 = inptr.47 - str.48;
      D.5657 = D.5656 / 2;
      *items_read = D.5657;
      <D.5665>:
      if (items_written != 0B) goto <D.5666>; else goto <D.5667>;
      <D.5666>:
      D.5668 = outlen / 4;
      D.5669 = (long int) D.5668;
      *items_written = D.5669;
      <D.5667>:
      D.5670 = outlen + 4;
      outbuf = monoeg_malloc (D.5670);
      outptr = outbuf;
      inptr = str;
      D.5636 = len * 2;
      inleft = (size_t) D.5636;
      goto <D.4942>;
      <D.4941>:
      n = decode_utf16le (inptr, inleft, &c);
      if (n < 0) goto <D.4940>; else goto <D.5671>;
      <D.5671>:
      c.49 = c;
      if (c.49 == 0) goto <D.4940>; else goto <D.5672>;
      <D.5672>:
      outptr.52 = outptr;
      outptr = outptr.52 + 4;
      c.49 = c;
      *outptr.52 = c.49;
      n.50 = (unsigned int) n;
      inleft = inleft - n.50;
      n.51 = (sizetype) n;
      inptr = inptr + n.51;
      <D.4942>:
      if (inleft != 0) goto <D.4941>; else goto <D.4940>;
      <D.4940>:
      *outptr = 0;
      D.5629 = outbuf;
      return D.5629;
    }
  finally
    {
      c = {CLOBBER};
    }
}


monoeg_g_ucs4_to_utf8 (const gunichar * str, glong len, glong * items_read, glong * items_written, struct GError * * err)
{
  gchar * D.5678;
  unsigned int i.53;
  unsigned int D.5682;
  const gunichar * D.5683;
  unsigned int D.5684;
  void * D.5687;
  unsigned int n.54;
  void * D.5696;
  unsigned int D.5702;
  int D.5703;
  sizetype D.5704;
  long int outlen.55;
  char * outbuf;
  char * outptr;
  size_t outlen;
  glong i;
  int n;

  outlen = 0;
  if (str == 0B) goto <D.5676>; else goto <D.5677>;
  <D.5676>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "giconv.c", 1256, "str != NULL");
  D.5678 = 0B;
  return D.5678;
  <D.5677>:
  if (len < 0) goto <D.5679>; else goto <D.5680>;
  <D.5679>:
  i = 0;
  goto <D.4956>;
  <D.4955>:
  i.53 = (unsigned int) i;
  D.5682 = i.53 * 4;
  D.5683 = str + D.5682;
  D.5684 = *D.5683;
  n = monoeg_g_unichar_to_utf8 (D.5684, 0B);
  if (n < 0) goto <D.5685>; else goto <D.5686>;
  <D.5685>:
  D.5687 = monoeg_g_convert_error_quark ();
  monoeg_g_set_error (err, D.5687, 1, "Illegal byte sequence encounted in the input.");
  if (items_written != 0B) goto <D.5688>; else goto <D.5689>;
  <D.5688>:
  *items_written = 0;
  <D.5689>:
  if (items_read != 0B) goto <D.5690>; else goto <D.5691>;
  <D.5690>:
  *items_read = i;
  <D.5691>:
  D.5678 = 0B;
  return D.5678;
  <D.5686>:
  n.54 = (unsigned int) n;
  outlen = outlen + n.54;
  i = i + 1;
  <D.4956>:
  i.53 = (unsigned int) i;
  D.5682 = i.53 * 4;
  D.5683 = str + D.5682;
  D.5684 = *D.5683;
  if (D.5684 != 0) goto <D.4955>; else goto <D.4957>;
  <D.4957>:
  goto <D.5693>;
  <D.5680>:
  i = 0;
  goto <D.4959>;
  <D.4958>:
  i.53 = (unsigned int) i;
  D.5682 = i.53 * 4;
  D.5683 = str + D.5682;
  D.5684 = *D.5683;
  n = monoeg_g_unichar_to_utf8 (D.5684, 0B);
  if (n < 0) goto <D.5694>; else goto <D.5695>;
  <D.5694>:
  D.5696 = monoeg_g_convert_error_quark ();
  monoeg_g_set_error (err, D.5696, 1, "Illegal byte sequence encounted in the input.");
  if (items_written != 0B) goto <D.5697>; else goto <D.5698>;
  <D.5697>:
  *items_written = 0;
  <D.5698>:
  if (items_read != 0B) goto <D.5699>; else goto <D.5700>;
  <D.5699>:
  *items_read = i;
  <D.5700>:
  D.5678 = 0B;
  return D.5678;
  <D.5695>:
  n.54 = (unsigned int) n;
  outlen = outlen + n.54;
  i = i + 1;
  <D.4959>:
  if (i < len) goto <D.5701>; else goto <D.4960>;
  <D.5701>:
  i.53 = (unsigned int) i;
  D.5682 = i.53 * 4;
  D.5683 = str + D.5682;
  D.5684 = *D.5683;
  if (D.5684 != 0) goto <D.4958>; else goto <D.4960>;
  <D.4960>:
  <D.5693>:
  len = i;
  D.5702 = outlen + 1;
  outbuf = monoeg_malloc (D.5702);
  outptr = outbuf;
  i = 0;
  goto <D.4962>;
  <D.4961>:
  i.53 = (unsigned int) i;
  D.5682 = i.53 * 4;
  D.5683 = str + D.5682;
  D.5684 = *D.5683;
  D.5703 = monoeg_g_unichar_to_utf8 (D.5684, outptr);
  D.5704 = (sizetype) D.5703;
  outptr = outptr + D.5704;
  i = i + 1;
  <D.4962>:
  if (i < len) goto <D.4961>; else goto <D.4963>;
  <D.4963>:
  *outptr = 0;
  if (items_written != 0B) goto <D.5705>; else goto <D.5706>;
  <D.5705>:
  outlen.55 = (long int) outlen;
  *items_written = outlen.55;
  <D.5706>:
  if (items_read != 0B) goto <D.5708>; else goto <D.5709>;
  <D.5708>:
  *items_read = i;
  <D.5709>:
  D.5678 = outbuf;
  return D.5678;
}


monoeg_g_ucs4_to_utf16 (const gunichar * str, glong len, glong * items_read, glong * items_written, struct GError * * err)
{
  gunichar2 * D.5713;
  unsigned int i.56;
  unsigned int D.5717;
  const gunichar * D.5718;
  unsigned int D.5719;
  void * D.5722;
  unsigned int n.57;
  void * D.5731;
  unsigned int D.5737;
  unsigned int D.5738;
  int D.5739;
  unsigned int D.5740;
  unsigned int D.5741;
  long int outlen.58;
  gunichar2 * outbuf;
  gunichar2 * outptr;
  size_t outlen;
  glong i;
  int n;

  outlen = 0;
  if (str == 0B) goto <D.5711>; else goto <D.5712>;
  <D.5711>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "giconv.c", 1318, "str != NULL");
  D.5713 = 0B;
  return D.5713;
  <D.5712>:
  if (len < 0) goto <D.5714>; else goto <D.5715>;
  <D.5714>:
  i = 0;
  goto <D.4977>;
  <D.4976>:
  i.56 = (unsigned int) i;
  D.5717 = i.56 * 4;
  D.5718 = str + D.5717;
  D.5719 = *D.5718;
  n = monoeg_unichar_to_utf16 (D.5719, 0B);
  if (n < 0) goto <D.5720>; else goto <D.5721>;
  <D.5720>:
  D.5722 = monoeg_g_convert_error_quark ();
  monoeg_g_set_error (err, D.5722, 1, "Illegal byte sequence encounted in the input.");
  if (items_written != 0B) goto <D.5723>; else goto <D.5724>;
  <D.5723>:
  *items_written = 0;
  <D.5724>:
  if (items_read != 0B) goto <D.5725>; else goto <D.5726>;
  <D.5725>:
  *items_read = i;
  <D.5726>:
  D.5713 = 0B;
  return D.5713;
  <D.5721>:
  n.57 = (unsigned int) n;
  outlen = outlen + n.57;
  i = i + 1;
  <D.4977>:
  i.56 = (unsigned int) i;
  D.5717 = i.56 * 4;
  D.5718 = str + D.5717;
  D.5719 = *D.5718;
  if (D.5719 != 0) goto <D.4976>; else goto <D.4978>;
  <D.4978>:
  goto <D.5728>;
  <D.5715>:
  i = 0;
  goto <D.4980>;
  <D.4979>:
  i.56 = (unsigned int) i;
  D.5717 = i.56 * 4;
  D.5718 = str + D.5717;
  D.5719 = *D.5718;
  n = monoeg_unichar_to_utf16 (D.5719, 0B);
  if (n < 0) goto <D.5729>; else goto <D.5730>;
  <D.5729>:
  D.5731 = monoeg_g_convert_error_quark ();
  monoeg_g_set_error (err, D.5731, 1, "Illegal byte sequence encounted in the input.");
  if (items_written != 0B) goto <D.5732>; else goto <D.5733>;
  <D.5732>:
  *items_written = 0;
  <D.5733>:
  if (items_read != 0B) goto <D.5734>; else goto <D.5735>;
  <D.5734>:
  *items_read = i;
  <D.5735>:
  D.5713 = 0B;
  return D.5713;
  <D.5730>:
  n.57 = (unsigned int) n;
  outlen = outlen + n.57;
  i = i + 1;
  <D.4980>:
  if (i < len) goto <D.5736>; else goto <D.4981>;
  <D.5736>:
  i.56 = (unsigned int) i;
  D.5717 = i.56 * 4;
  D.5718 = str + D.5717;
  D.5719 = *D.5718;
  if (D.5719 != 0) goto <D.4979>; else goto <D.4981>;
  <D.4981>:
  <D.5728>:
  len = i;
  D.5737 = outlen + 1;
  D.5738 = D.5737 * 2;
  outbuf = monoeg_malloc (D.5738);
  outptr = outbuf;
  i = 0;
  goto <D.4983>;
  <D.4982>:
  i.56 = (unsigned int) i;
  D.5717 = i.56 * 4;
  D.5718 = str + D.5717;
  D.5719 = *D.5718;
  D.5739 = monoeg_unichar_to_utf16 (D.5719, outptr);
  D.5740 = (unsigned int) D.5739;
  D.5741 = D.5740 * 2;
  outptr = outptr + D.5741;
  i = i + 1;
  <D.4983>:
  if (i < len) goto <D.4982>; else goto <D.4984>;
  <D.4984>:
  *outptr = 0;
  if (items_written != 0B) goto <D.5742>; else goto <D.5743>;
  <D.5742>:
  outlen.58 = (long int) outlen;
  *items_written = outlen.58;
  <D.5743>:
  if (items_read != 0B) goto <D.5745>; else goto <D.5746>;
  <D.5745>:
  *items_read = i;
  <D.5746>:
  D.5713 = outbuf;
  return D.5713;
}


