monoeg_g_string_new_len (const gchar * init, gssize len)
{
  long unsigned int iftmp.0;
  long unsigned int D.5108;
  long unsigned int D.5109;
  long unsigned int D.5110;
  long unsigned int D.5111;
  void * D.5112;
  char * D.5115;
  char * D.5116;
  struct GString * D.5117;
  struct GString * ret;

  ret = monoeg_malloc (24);
  if (init == 0B) goto <D.5101>; else goto <D.5102>;
  <D.5101>:
  ret->len = 0;
  goto <D.5103>;
  <D.5102>:
  if (len < 0) goto <D.5105>; else goto <D.5106>;
  <D.5105>:
  iftmp.0 = strlen (init);
  goto <D.5107>;
  <D.5106>:
  iftmp.0 = (long unsigned int) len;
  <D.5107>:
  ret->len = iftmp.0;
  <D.5103>:
  D.5108 = ret->len;
  D.5109 = D.5108 + 1;
  D.5110 = MAX_EXPR <D.5109, 16>;
  ret->allocated_len = D.5110;
  D.5111 = ret->allocated_len;
  D.5112 = monoeg_malloc (D.5111);
  ret->str = D.5112;
  if (init != 0B) goto <D.5113>; else goto <D.5114>;
  <D.5113>:
  D.5115 = ret->str;
  D.5108 = ret->len;
  memcpy (D.5115, init, D.5108);
  <D.5114>:
  D.5115 = ret->str;
  D.5108 = ret->len;
  D.5116 = D.5115 + D.5108;
  *D.5116 = 0;
  D.5117 = ret;
  return D.5117;
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__, __nothrow__, __leaf__))
memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.5119;
  long unsigned int D.5120;

  D.5120 = __builtin_object_size (__dest, 0);
  D.5119 = __builtin___memcpy_chk (__dest, __src, __len, D.5120);
  return D.5119;
}


monoeg_g_string_new (const gchar * init)
{
  struct GString * D.5122;

  D.5122 = monoeg_g_string_new_len (init, -1);
  return D.5122;
}


monoeg_g_string_sized_new (gsize default_size)
{
  void * D.5124;
  char * D.5125;
  struct GString * D.5126;
  struct GString * ret;

  ret = monoeg_malloc (24);
  D.5124 = monoeg_malloc (default_size);
  ret->str = D.5124;
  D.5125 = ret->str;
  *D.5125 = 0;
  ret->len = 0;
  ret->allocated_len = default_size;
  D.5126 = ret;
  return D.5126;
}


monoeg_g_string_free (struct GString * string, gboolean free_segment)
{
  gchar * D.5130;
  gchar * data;

  if (string == 0B) goto <D.5128>; else goto <D.5129>;
  <D.5128>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 81, "string != NULL");
  D.5130 = 0B;
  return D.5130;
  <D.5129>:
  data = string->str;
  monoeg_g_free (string);
  if (free_segment == 0) goto <D.5131>; else goto <D.5132>;
  <D.5131>:
  D.5130 = data;
  return D.5130;
  <D.5132>:
  monoeg_g_free (data);
  D.5130 = 0B;
  return D.5130;
}


monoeg_g_string_append_len (struct GString * string, const gchar * val, gssize len)
{
  struct GString * D.5136;
  long unsigned int D.5141;
  long unsigned int D.5142;
  long unsigned int len.1;
  long unsigned int D.5144;
  long unsigned int D.5145;
  long unsigned int D.5148;
  long unsigned int D.5149;
  long unsigned int D.5150;
  char * D.5151;
  void * D.5152;
  char * D.5153;
  long unsigned int len.2;

  if (string == 0B) goto <D.5134>; else goto <D.5135>;
  <D.5134>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 97, "string != NULL");
  D.5136 = 0B;
  return D.5136;
  <D.5135>:
  if (val == 0B) goto <D.5137>; else goto <D.5138>;
  <D.5137>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 98, "val != NULL");
  D.5136 = string;
  return D.5136;
  <D.5138>:
  if (len < 0) goto <D.5139>; else goto <D.5140>;
  <D.5139>:
  D.5141 = strlen (val);
  len = (gssize) D.5141;
  <D.5140>:
  D.5142 = string->len;
  len.1 = (long unsigned int) len;
  D.5144 = D.5142 + len.1;
  D.5145 = string->allocated_len;
  if (D.5144 >= D.5145) goto <D.5146>; else goto <D.5147>;
  <D.5146>:
  D.5145 = string->allocated_len;
  len.1 = (long unsigned int) len;
  D.5148 = D.5145 + len.1;
  D.5149 = D.5148 + 16;
  D.5150 = D.5149 * 2;
  string->allocated_len = D.5150;
  D.5151 = string->str;
  D.5145 = string->allocated_len;
  D.5152 = monoeg_realloc (D.5151, D.5145);
  string->str = D.5152;
  <D.5147>:
  D.5151 = string->str;
  D.5142 = string->len;
  D.5153 = D.5151 + D.5142;
  len.2 = (long unsigned int) len;
  memcpy (D.5153, val, len.2);
  D.5142 = string->len;
  len.1 = (long unsigned int) len;
  D.5144 = D.5142 + len.1;
  string->len = D.5144;
  D.5151 = string->str;
  D.5142 = string->len;
  D.5153 = D.5151 + D.5142;
  *D.5153 = 0;
  D.5136 = string;
  return D.5136;
}


monoeg_g_string_append (struct GString * string, const gchar * val)
{
  struct GString * D.5158;

  if (string == 0B) goto <D.5156>; else goto <D.5157>;
  <D.5156>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 115, "string != NULL");
  D.5158 = 0B;
  return D.5158;
  <D.5157>:
  if (val == 0B) goto <D.5159>; else goto <D.5160>;
  <D.5159>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 116, "val != NULL");
  D.5158 = string;
  return D.5158;
  <D.5160>:
  D.5158 = monoeg_g_string_append_len (string, val, -1);
  return D.5158;
}


monoeg_g_string_append_c (struct GString * string, gchar c)
{
  struct GString * D.5164;
  long unsigned int D.5165;
  long unsigned int D.5166;
  long unsigned int D.5167;
  long unsigned int D.5170;
  long unsigned int D.5171;
  char * D.5172;
  void * D.5173;
  char * D.5174;
  sizetype D.5175;
  char * D.5176;

  if (string == 0B) goto <D.5162>; else goto <D.5163>;
  <D.5162>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 124, "string != NULL");
  D.5164 = 0B;
  return D.5164;
  <D.5163>:
  D.5165 = string->len;
  D.5166 = D.5165 + 1;
  D.5167 = string->allocated_len;
  if (D.5166 >= D.5167) goto <D.5168>; else goto <D.5169>;
  <D.5168>:
  D.5167 = string->allocated_len;
  D.5170 = D.5167 + 17;
  D.5171 = D.5170 * 2;
  string->allocated_len = D.5171;
  D.5172 = string->str;
  D.5167 = string->allocated_len;
  D.5173 = monoeg_realloc (D.5172, D.5167);
  string->str = D.5173;
  <D.5169>:
  D.5172 = string->str;
  D.5165 = string->len;
  D.5174 = D.5172 + D.5165;
  *D.5174 = c;
  D.5172 = string->str;
  D.5165 = string->len;
  D.5175 = D.5165 + 1;
  D.5176 = D.5172 + D.5175;
  *D.5176 = 0;
  D.5165 = string->len;
  D.5166 = D.5165 + 1;
  string->len = D.5166;
  D.5164 = string;
  return D.5164;
}


monoeg_g_string_append_unichar (struct GString * string, gunichar c)
{
  struct GString * D.5180;
  long int D.5183;
  gchar utf8[6];
  gint len;

  try
    {
      if (string == 0B) goto <D.5178>; else goto <D.5179>;
      <D.5178>:
      monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 141, "string != NULL");
      D.5180 = 0B;
      return D.5180;
      <D.5179>:
      len = monoeg_g_unichar_to_utf8 (c, &utf8);
      if (len <= 0) goto <D.5181>; else goto <D.5182>;
      <D.5181>:
      D.5180 = string;
      return D.5180;
      <D.5182>:
      D.5183 = (long int) len;
      D.5180 = monoeg_g_string_append_len (string, &utf8, D.5183);
      return D.5180;
    }
  finally
    {
      utf8 = {CLOBBER};
    }
}


monoeg_g_string_prepend (struct GString * string, const gchar * val)
{
  struct GString * D.5188;
  long unsigned int D.5191;
  long unsigned int D.5192;
  long unsigned int len.3;
  long unsigned int D.5194;
  long unsigned int D.5195;
  long unsigned int D.5198;
  long unsigned int D.5199;
  long unsigned int D.5200;
  char * D.5201;
  void * D.5202;
  sizetype len.4;
  char * D.5204;
  long unsigned int D.5205;
  long unsigned int len.5;
  gssize len;

  if (string == 0B) goto <D.5186>; else goto <D.5187>;
  <D.5186>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 154, "string != NULL");
  D.5188 = string;
  return D.5188;
  <D.5187>:
  if (val == 0B) goto <D.5189>; else goto <D.5190>;
  <D.5189>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 155, "val != NULL");
  D.5188 = string;
  return D.5188;
  <D.5190>:
  D.5191 = strlen (val);
  len = (gssize) D.5191;
  D.5192 = string->len;
  len.3 = (long unsigned int) len;
  D.5194 = D.5192 + len.3;
  D.5195 = string->allocated_len;
  if (D.5194 >= D.5195) goto <D.5196>; else goto <D.5197>;
  <D.5196>:
  D.5195 = string->allocated_len;
  len.3 = (long unsigned int) len;
  D.5198 = D.5195 + len.3;
  D.5199 = D.5198 + 16;
  D.5200 = D.5199 * 2;
  string->allocated_len = D.5200;
  D.5201 = string->str;
  D.5195 = string->allocated_len;
  D.5202 = monoeg_realloc (D.5201, D.5195);
  string->str = D.5202;
  <D.5197>:
  D.5201 = string->str;
  len.4 = (sizetype) len;
  D.5204 = D.5201 + len.4;
  D.5201 = string->str;
  D.5192 = string->len;
  D.5205 = D.5192 + 1;
  memmove (D.5204, D.5201, D.5205);
  D.5201 = string->str;
  len.5 = (long unsigned int) len;
  memcpy (D.5201, val, len.5);
  D.5188 = string;
  return D.5188;
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__, __nothrow__, __leaf__))
memmove (void * __dest, const void * __src, size_t __len)
{
  void * D.5208;
  long unsigned int D.5209;

  D.5209 = __builtin_object_size (__dest, 0);
  D.5208 = __builtin___memmove_chk (__dest, __src, __len, D.5209);
  return D.5208;
}


monoeg_g_string_insert (struct GString * string, gssize pos, const gchar * val)
{
  struct GString * D.5213;
  long unsigned int D.5216;
  long unsigned int pos.6;
  long unsigned int D.5220;
  long unsigned int len.7;
  long unsigned int D.5222;
  long unsigned int D.5223;
  long unsigned int D.5226;
  long unsigned int D.5227;
  long unsigned int D.5228;
  char * D.5229;
  void * D.5230;
  sizetype pos.8;
  sizetype len.9;
  sizetype D.5233;
  char * D.5234;
  char * D.5235;
  long unsigned int D.5236;
  long unsigned int D.5237;
  long unsigned int D.5238;
  long unsigned int len.10;
  gssize len;

  if (string == 0B) goto <D.5211>; else goto <D.5212>;
  <D.5211>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 171, "string != NULL");
  D.5213 = string;
  return D.5213;
  <D.5212>:
  if (val == 0B) goto <D.5214>; else goto <D.5215>;
  <D.5214>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 172, "val != NULL");
  D.5213 = string;
  return D.5213;
  <D.5215>:
  D.5216 = string->len;
  pos.6 = (long unsigned int) pos;
  if (D.5216 < pos.6) goto <D.5218>; else goto <D.5219>;
  <D.5218>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 173, "pos <= string->len");
  D.5213 = string;
  return D.5213;
  <D.5219>:
  D.5220 = strlen (val);
  len = (gssize) D.5220;
  D.5216 = string->len;
  len.7 = (long unsigned int) len;
  D.5222 = D.5216 + len.7;
  D.5223 = string->allocated_len;
  if (D.5222 >= D.5223) goto <D.5224>; else goto <D.5225>;
  <D.5224>:
  D.5223 = string->allocated_len;
  len.7 = (long unsigned int) len;
  D.5226 = D.5223 + len.7;
  D.5227 = D.5226 + 16;
  D.5228 = D.5227 * 2;
  string->allocated_len = D.5228;
  D.5229 = string->str;
  D.5223 = string->allocated_len;
  D.5230 = monoeg_realloc (D.5229, D.5223);
  string->str = D.5230;
  <D.5225>:
  D.5229 = string->str;
  pos.8 = (sizetype) pos;
  len.9 = (sizetype) len;
  D.5233 = pos.8 + len.9;
  D.5234 = D.5229 + D.5233;
  D.5229 = string->str;
  pos.8 = (sizetype) pos;
  D.5235 = D.5229 + pos.8;
  D.5216 = string->len;
  pos.6 = (long unsigned int) pos;
  D.5236 = D.5216 - pos.6;
  len.7 = (long unsigned int) len;
  D.5237 = D.5236 - len.7;
  D.5238 = D.5237 + 1;
  memmove (D.5234, D.5235, D.5238);
  D.5229 = string->str;
  pos.8 = (sizetype) pos;
  D.5235 = D.5229 + pos.8;
  len.10 = (long unsigned int) len;
  memcpy (D.5235, val, len.10);
  D.5213 = string;
  return D.5213;
}


monoeg_g_string_append_printf (struct GString * string, const gchar * format)
{
  char * ret;
  struct  args[1];

  try
    {
      if (string == 0B) goto <D.5241>; else goto <D.5242>;
      <D.5241>:
      monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 190, "string != NULL");
      return;
      <D.5242>:
      if (format == 0B) goto <D.5243>; else goto <D.5244>;
      <D.5243>:
      monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 191, "format != NULL");
      return;
      <D.5244>:
      __builtin_va_start (&args, 0);
      ret = monoeg_g_strdup_vprintf (format, &args);
      __builtin_va_end (&args);
      monoeg_g_string_append (string, ret);
      monoeg_g_free (ret);
    }
  finally
    {
      args = {CLOBBER};
    }
}


monoeg_g_string_append_vprintf (struct GString * string, const gchar * format, struct  * args)
{
  char * ret;

  if (string == 0B) goto <D.5248>; else goto <D.5249>;
  <D.5248>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 206, "string != NULL");
  return;
  <D.5249>:
  if (format == 0B) goto <D.5250>; else goto <D.5251>;
  <D.5250>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 207, "format != NULL");
  return;
  <D.5251>:
  ret = monoeg_g_strdup_vprintf (format, args);
  monoeg_g_string_append (string, ret);
  monoeg_g_free (ret);
}


monoeg_g_string_printf (struct GString * string, const gchar * format)
{
  char * D.5257;
  gchar * D.5258;
  long unsigned int D.5259;
  long unsigned int D.5260;
  long unsigned int D.5261;
  struct  args[1];

  try
    {
      if (string == 0B) goto <D.5253>; else goto <D.5254>;
      <D.5253>:
      monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 219, "string != NULL");
      return;
      <D.5254>:
      if (format == 0B) goto <D.5255>; else goto <D.5256>;
      <D.5255>:
      monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 220, "format != NULL");
      return;
      <D.5256>:
      D.5257 = string->str;
      monoeg_g_free (D.5257);
      __builtin_va_start (&args, 0);
      D.5258 = monoeg_g_strdup_vprintf (format, &args);
      string->str = D.5258;
      __builtin_va_end (&args);
      D.5257 = string->str;
      D.5259 = strlen (D.5257);
      string->len = D.5259;
      D.5260 = string->len;
      D.5261 = D.5260 + 1;
      string->allocated_len = D.5261;
    }
  finally
    {
      args = {CLOBBER};
    }
}


monoeg_g_string_truncate (struct GString * string, gsize len)
{
  struct GString * D.5267;
  long unsigned int D.5268;
  char * D.5271;
  char * D.5272;

  if (string == 0B) goto <D.5265>; else goto <D.5266>;
  <D.5265>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 235, "string != NULL");
  D.5267 = string;
  return D.5267;
  <D.5266>:
  D.5268 = string->len;
  if (D.5268 <= len) goto <D.5269>; else goto <D.5270>;
  <D.5269>:
  D.5267 = string;
  return D.5267;
  <D.5270>:
  string->len = len;
  D.5271 = string->str;
  D.5272 = D.5271 + len;
  *D.5272 = 0;
  D.5267 = string;
  return D.5267;
}


monoeg_g_string_set_size (struct GString * string, gsize len)
{
  struct GString * D.5276;
  long unsigned int D.5277;
  long unsigned int D.5278;
  long unsigned int D.5279;
  long unsigned int D.5282;
  long unsigned int D.5283;
  long unsigned int D.5284;
  char * D.5285;
  void * D.5286;
  char * D.5287;

  if (string == 0B) goto <D.5274>; else goto <D.5275>;
  <D.5274>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 249, "string != NULL");
  D.5276 = string;
  return D.5276;
  <D.5275>:
  D.5277 = string->len;
  D.5278 = D.5277 + len;
  D.5279 = string->allocated_len;
  if (D.5278 >= D.5279) goto <D.5280>; else goto <D.5281>;
  <D.5280>:
  D.5279 = string->allocated_len;
  D.5282 = D.5279 + len;
  D.5283 = D.5282 + 16;
  D.5284 = D.5283 * 2;
  string->allocated_len = D.5284;
  D.5285 = string->str;
  D.5279 = string->allocated_len;
  D.5286 = monoeg_realloc (D.5285, D.5279);
  string->str = D.5286;
  <D.5281>:
  string->len = len;
  D.5285 = string->str;
  D.5287 = D.5285 + len;
  *D.5287 = 0;
  D.5276 = string;
  return D.5276;
}


monoeg_g_string_erase (struct GString * string, gssize pos, gssize len)
{
  struct GString * D.5291;
  long unsigned int D.5292;
  long unsigned int pos.11;
  long int D.5300;
  long unsigned int D.5301;
  char * D.5302;
  sizetype pos.12;
  char * D.5304;
  sizetype len.13;
  sizetype D.5306;
  char * D.5307;
  long unsigned int D.5308;
  long unsigned int D.5309;
  long unsigned int len.14;
  long unsigned int D.5311;

  if (string == 0B) goto <D.5289>; else goto <D.5290>;
  <D.5289>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 261, "string != NULL");
  D.5291 = string;
  return D.5291;
  <D.5290>:
  D.5292 = string->len;
  pos.11 = (long unsigned int) pos;
  if (D.5292 <= pos.11) goto <D.5294>; else goto <D.5295>;
  <D.5294>:
  D.5291 = string;
  return D.5291;
  <D.5295>:
  if (len == -1) goto <D.5296>; else goto <D.5299>;
  <D.5299>:
  D.5300 = pos + len;
  D.5301 = (long unsigned int) D.5300;
  D.5292 = string->len;
  if (D.5301 >= D.5292) goto <D.5296>; else goto <D.5297>;
  <D.5296>:
  D.5302 = string->str;
  pos.12 = (sizetype) pos;
  D.5304 = D.5302 + pos.12;
  *D.5304 = 0;
  goto <D.5298>;
  <D.5297>:
  D.5302 = string->str;
  pos.12 = (sizetype) pos;
  D.5304 = D.5302 + pos.12;
  D.5302 = string->str;
  pos.12 = (sizetype) pos;
  len.13 = (sizetype) len;
  D.5306 = pos.12 + len.13;
  D.5307 = D.5302 + D.5306;
  D.5292 = string->len;
  D.5300 = pos + len;
  D.5301 = (long unsigned int) D.5300;
  D.5308 = D.5292 - D.5301;
  D.5309 = D.5308 + 1;
  memmove (D.5304, D.5307, D.5309);
  D.5292 = string->len;
  len.14 = (long unsigned int) len;
  D.5311 = D.5292 - len.14;
  string->len = D.5311;
  <D.5298>:
  D.5291 = string;
  return D.5291;
}


