monoeg_g_string_new_len (const gchar * init, gssize len)
{
  long unsigned int iftmp.0;
  long unsigned int D.5519;
  long unsigned int D.5520;
  long unsigned int D.5521;
  long unsigned int D.5522;
  void * D.5523;
  char * D.5526;
  char * D.5527;
  struct GString * D.5528;
  struct GString * ret;

  ret = monoeg_malloc (24);
  if (init == 0B) goto <D.5512>; else goto <D.5513>;
  <D.5512>:
  ret->len = 0;
  goto <D.5514>;
  <D.5513>:
  if (len < 0) goto <D.5516>; else goto <D.5517>;
  <D.5516>:
  iftmp.0 = strlen (init);
  goto <D.5518>;
  <D.5517>:
  iftmp.0 = (long unsigned int) len;
  <D.5518>:
  ret->len = iftmp.0;
  <D.5514>:
  D.5519 = ret->len;
  D.5520 = D.5519 + 1;
  D.5521 = MAX_EXPR <D.5520, 16>;
  ret->allocated_len = D.5521;
  D.5522 = ret->allocated_len;
  D.5523 = monoeg_malloc (D.5522);
  ret->str = D.5523;
  if (init != 0B) goto <D.5524>; else goto <D.5525>;
  <D.5524>:
  D.5526 = ret->str;
  D.5519 = ret->len;
  memcpy (D.5526, init, D.5519);
  <D.5525>:
  D.5526 = ret->str;
  D.5519 = ret->len;
  D.5527 = D.5526 + D.5519;
  *D.5527 = 0;
  D.5528 = ret;
  return D.5528;
}


memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.5530;
  long unsigned int D.5531;

  D.5531 = __builtin_object_size (__dest, 0);
  D.5530 = __builtin___memcpy_chk (__dest, __src, __len, D.5531);
  return D.5530;
}


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

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


monoeg_g_string_sized_new (gsize default_size)
{
  void * D.5535;
  char * D.5536;
  struct GString * D.5537;
  struct GString * ret;

  ret = monoeg_malloc (24);
  D.5535 = monoeg_malloc (default_size);
  ret->str = D.5535;
  D.5536 = ret->str;
  *D.5536 = 0;
  ret->len = 0;
  ret->allocated_len = default_size;
  D.5537 = ret;
  return D.5537;
}


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

  if (string == 0B) goto <D.5539>; else goto <D.5540>;
  <D.5539>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 81, "string != NULL");
  D.5541 = 0B;
  return D.5541;
  <D.5540>:
  data = string->str;
  monoeg_g_free (string);
  if (free_segment == 0) goto <D.5542>; else goto <D.5543>;
  <D.5542>:
  D.5541 = data;
  return D.5541;
  <D.5543>:
  monoeg_g_free (data);
  D.5541 = 0B;
  return D.5541;
}


monoeg_g_string_append_len (struct GString * string, const gchar * val, gssize len)
{
  struct GString * D.5547;
  long unsigned int D.5552;
  long unsigned int D.5553;
  long unsigned int len.1;
  long unsigned int D.5555;
  long unsigned int D.5556;
  long unsigned int D.5559;
  long unsigned int D.5560;
  long unsigned int D.5561;
  char * D.5562;
  void * D.5563;
  char * D.5564;
  long unsigned int len.2;

  if (string == 0B) goto <D.5545>; else goto <D.5546>;
  <D.5545>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 97, "string != NULL");
  D.5547 = 0B;
  return D.5547;
  <D.5546>:
  if (val == 0B) goto <D.5548>; else goto <D.5549>;
  <D.5548>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 98, "val != NULL");
  D.5547 = string;
  return D.5547;
  <D.5549>:
  if (len < 0) goto <D.5550>; else goto <D.5551>;
  <D.5550>:
  D.5552 = strlen (val);
  len = (gssize) D.5552;
  <D.5551>:
  D.5553 = string->len;
  len.1 = (long unsigned int) len;
  D.5555 = D.5553 + len.1;
  D.5556 = string->allocated_len;
  if (D.5555 >= D.5556) goto <D.5557>; else goto <D.5558>;
  <D.5557>:
  D.5556 = string->allocated_len;
  len.1 = (long unsigned int) len;
  D.5559 = D.5556 + len.1;
  D.5560 = D.5559 + 16;
  D.5561 = D.5560 * 2;
  string->allocated_len = D.5561;
  D.5562 = string->str;
  D.5556 = string->allocated_len;
  D.5563 = monoeg_realloc (D.5562, D.5556);
  string->str = D.5563;
  <D.5558>:
  D.5562 = string->str;
  D.5553 = string->len;
  D.5564 = D.5562 + D.5553;
  len.2 = (long unsigned int) len;
  memcpy (D.5564, val, len.2);
  D.5553 = string->len;
  len.1 = (long unsigned int) len;
  D.5555 = D.5553 + len.1;
  string->len = D.5555;
  D.5562 = string->str;
  D.5553 = string->len;
  D.5564 = D.5562 + D.5553;
  *D.5564 = 0;
  D.5547 = string;
  return D.5547;
}


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

  if (string == 0B) goto <D.5567>; else goto <D.5568>;
  <D.5567>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 115, "string != NULL");
  D.5569 = 0B;
  return D.5569;
  <D.5568>:
  if (val == 0B) goto <D.5570>; else goto <D.5571>;
  <D.5570>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 116, "val != NULL");
  D.5569 = string;
  return D.5569;
  <D.5571>:
  D.5569 = monoeg_g_string_append_len (string, val, -1);
  return D.5569;
}


monoeg_g_string_append_c (struct GString * string, gchar c)
{
  struct GString * D.5575;
  long unsigned int D.5576;
  long unsigned int D.5577;
  long unsigned int D.5578;
  long unsigned int D.5581;
  long unsigned int D.5582;
  char * D.5583;
  void * D.5584;
  char * D.5585;
  sizetype D.5586;
  char * D.5587;

  if (string == 0B) goto <D.5573>; else goto <D.5574>;
  <D.5573>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 124, "string != NULL");
  D.5575 = 0B;
  return D.5575;
  <D.5574>:
  D.5576 = string->len;
  D.5577 = D.5576 + 1;
  D.5578 = string->allocated_len;
  if (D.5577 >= D.5578) goto <D.5579>; else goto <D.5580>;
  <D.5579>:
  D.5578 = string->allocated_len;
  D.5581 = D.5578 + 17;
  D.5582 = D.5581 * 2;
  string->allocated_len = D.5582;
  D.5583 = string->str;
  D.5578 = string->allocated_len;
  D.5584 = monoeg_realloc (D.5583, D.5578);
  string->str = D.5584;
  <D.5580>:
  D.5583 = string->str;
  D.5576 = string->len;
  D.5585 = D.5583 + D.5576;
  *D.5585 = c;
  D.5583 = string->str;
  D.5576 = string->len;
  D.5586 = D.5576 + 1;
  D.5587 = D.5583 + D.5586;
  *D.5587 = 0;
  D.5576 = string->len;
  D.5577 = D.5576 + 1;
  string->len = D.5577;
  D.5575 = string;
  return D.5575;
}


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

  try
    {
      if (string == 0B) goto <D.5589>; else goto <D.5590>;
      <D.5589>:
      monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 141, "string != NULL");
      D.5591 = 0B;
      return D.5591;
      <D.5590>:
      len = monoeg_g_unichar_to_utf8 (c, &utf8);
      if (len <= 0) goto <D.5592>; else goto <D.5593>;
      <D.5592>:
      D.5591 = string;
      return D.5591;
      <D.5593>:
      D.5594 = (long int) len;
      D.5591 = monoeg_g_string_append_len (string, &utf8, D.5594);
      return D.5591;
    }
  finally
    {
      utf8 = {CLOBBER};
    }
}


monoeg_g_string_prepend (struct GString * string, const gchar * val)
{
  struct GString * D.5599;
  long unsigned int D.5602;
  long unsigned int D.5603;
  long unsigned int len.3;
  long unsigned int D.5605;
  long unsigned int D.5606;
  long unsigned int D.5609;
  long unsigned int D.5610;
  long unsigned int D.5611;
  char * D.5612;
  void * D.5613;
  sizetype len.4;
  void * D.5615;
  long unsigned int D.5616;
  long unsigned int len.5;
  gssize len;

  if (string == 0B) goto <D.5597>; else goto <D.5598>;
  <D.5597>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 154, "string != NULL");
  D.5599 = string;
  return D.5599;
  <D.5598>:
  if (val == 0B) goto <D.5600>; else goto <D.5601>;
  <D.5600>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 155, "val != NULL");
  D.5599 = string;
  return D.5599;
  <D.5601>:
  D.5602 = strlen (val);
  len = (gssize) D.5602;
  D.5603 = string->len;
  len.3 = (long unsigned int) len;
  D.5605 = D.5603 + len.3;
  D.5606 = string->allocated_len;
  if (D.5605 >= D.5606) goto <D.5607>; else goto <D.5608>;
  <D.5607>:
  D.5606 = string->allocated_len;
  len.3 = (long unsigned int) len;
  D.5609 = D.5606 + len.3;
  D.5610 = D.5609 + 16;
  D.5611 = D.5610 * 2;
  string->allocated_len = D.5611;
  D.5612 = string->str;
  D.5606 = string->allocated_len;
  D.5613 = monoeg_realloc (D.5612, D.5606);
  string->str = D.5613;
  <D.5608>:
  D.5612 = string->str;
  len.4 = (sizetype) len;
  D.5615 = D.5612 + len.4;
  D.5612 = string->str;
  D.5603 = string->len;
  D.5616 = D.5603 + 1;
  memmove (D.5615, D.5612, D.5616);
  D.5612 = string->str;
  len.5 = (long unsigned int) len;
  memcpy (D.5612, val, len.5);
  D.5599 = string;
  return D.5599;
}


memmove (void * __dest, const void * __src, size_t __len)
{
  void * D.5619;
  long unsigned int D.5620;

  D.5620 = __builtin_object_size (__dest, 0);
  D.5619 = __builtin___memmove_chk (__dest, __src, __len, D.5620);
  return D.5619;
}


monoeg_g_string_insert (struct GString * string, gssize pos, const gchar * val)
{
  struct GString * D.5624;
  long unsigned int pos.6;
  long unsigned int D.5628;
  long unsigned int D.5631;
  long unsigned int len.7;
  long unsigned int D.5633;
  long unsigned int D.5634;
  long unsigned int D.5637;
  long unsigned int D.5638;
  long unsigned int D.5639;
  char * D.5640;
  void * D.5641;
  sizetype pos.8;
  sizetype len.9;
  sizetype D.5644;
  char * D.5645;
  const void * D.5646;
  long unsigned int D.5647;
  long unsigned int D.5648;
  long unsigned int D.5649;
  char * D.5650;
  long unsigned int len.10;
  gssize len;

  if (string == 0B) goto <D.5622>; else goto <D.5623>;
  <D.5622>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 171, "string != NULL");
  D.5624 = string;
  return D.5624;
  <D.5623>:
  if (val == 0B) goto <D.5625>; else goto <D.5626>;
  <D.5625>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 172, "val != NULL");
  D.5624 = string;
  return D.5624;
  <D.5626>:
  pos.6 = (long unsigned int) pos;
  D.5628 = string->len;
  if (pos.6 > D.5628) goto <D.5629>; else goto <D.5630>;
  <D.5629>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 173, "pos <= string->len");
  D.5624 = string;
  return D.5624;
  <D.5630>:
  D.5631 = strlen (val);
  len = (gssize) D.5631;
  D.5628 = string->len;
  len.7 = (long unsigned int) len;
  D.5633 = D.5628 + len.7;
  D.5634 = string->allocated_len;
  if (D.5633 >= D.5634) goto <D.5635>; else goto <D.5636>;
  <D.5635>:
  D.5634 = string->allocated_len;
  len.7 = (long unsigned int) len;
  D.5637 = D.5634 + len.7;
  D.5638 = D.5637 + 16;
  D.5639 = D.5638 * 2;
  string->allocated_len = D.5639;
  D.5640 = string->str;
  D.5634 = string->allocated_len;
  D.5641 = monoeg_realloc (D.5640, D.5634);
  string->str = D.5641;
  <D.5636>:
  D.5640 = string->str;
  pos.8 = (sizetype) pos;
  len.9 = (sizetype) len;
  D.5644 = pos.8 + len.9;
  D.5645 = D.5640 + D.5644;
  D.5640 = string->str;
  pos.8 = (sizetype) pos;
  D.5646 = D.5640 + pos.8;
  D.5628 = string->len;
  pos.6 = (long unsigned int) pos;
  D.5647 = D.5628 - pos.6;
  len.7 = (long unsigned int) len;
  D.5648 = D.5647 - len.7;
  D.5649 = D.5648 + 1;
  memmove (D.5645, D.5646, D.5649);
  D.5640 = string->str;
  pos.8 = (sizetype) pos;
  D.5650 = D.5640 + pos.8;
  len.10 = (long unsigned int) len;
  memcpy (D.5650, val, len.10);
  D.5624 = string;
  return D.5624;
}


monoeg_g_string_append_printf (struct GString * string, const gchar * format)
{
  char * args.11;
  char * ret;
  char * args;

  try
    {
      if (string == 0B) goto <D.5653>; else goto <D.5654>;
      <D.5653>:
      monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 190, "string != NULL");
      return;
      <D.5654>:
      if (format == 0B) goto <D.5655>; else goto <D.5656>;
      <D.5655>:
      monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 191, "format != NULL");
      return;
      <D.5656>:
      __builtin_va_start (&args, 0);
      args.11 = args;
      ret = monoeg_g_strdup_vprintf (format, args.11);
      __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, char * args)
{
  char * ret;

  if (string == 0B) goto <D.5661>; else goto <D.5662>;
  <D.5661>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 206, "string != NULL");
  return;
  <D.5662>:
  if (format == 0B) goto <D.5663>; else goto <D.5664>;
  <D.5663>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 207, "format != NULL");
  return;
  <D.5664>:
  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.5670;
  char * args.12;
  gchar * D.5672;
  long unsigned int D.5673;
  long unsigned int D.5674;
  long unsigned int D.5675;
  char * args;

  try
    {
      if (string == 0B) goto <D.5666>; else goto <D.5667>;
      <D.5666>:
      monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 219, "string != NULL");
      return;
      <D.5667>:
      if (format == 0B) goto <D.5668>; else goto <D.5669>;
      <D.5668>:
      monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 220, "format != NULL");
      return;
      <D.5669>:
      D.5670 = string->str;
      monoeg_g_free (D.5670);
      __builtin_va_start (&args, 0);
      args.12 = args;
      D.5672 = monoeg_g_strdup_vprintf (format, args.12);
      string->str = D.5672;
      __builtin_va_end (&args);
      D.5670 = string->str;
      D.5673 = strlen (D.5670);
      string->len = D.5673;
      D.5674 = string->len;
      D.5675 = D.5674 + 1;
      string->allocated_len = D.5675;
    }
  finally
    {
      args = {CLOBBER};
    }
}


monoeg_g_string_truncate (struct GString * string, gsize len)
{
  struct GString * D.5681;
  long unsigned int D.5682;
  char * D.5685;
  char * D.5686;

  if (string == 0B) goto <D.5679>; else goto <D.5680>;
  <D.5679>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 235, "string != NULL");
  D.5681 = string;
  return D.5681;
  <D.5680>:
  D.5682 = string->len;
  if (D.5682 <= len) goto <D.5683>; else goto <D.5684>;
  <D.5683>:
  D.5681 = string;
  return D.5681;
  <D.5684>:
  string->len = len;
  D.5685 = string->str;
  D.5686 = D.5685 + len;
  *D.5686 = 0;
  D.5681 = string;
  return D.5681;
}


monoeg_g_string_set_size (struct GString * string, gsize len)
{
  struct GString * D.5690;
  long unsigned int D.5691;
  long unsigned int D.5692;
  long unsigned int D.5693;
  long unsigned int D.5696;
  long unsigned int D.5697;
  long unsigned int D.5698;
  char * D.5699;
  void * D.5700;
  char * D.5701;

  if (string == 0B) goto <D.5688>; else goto <D.5689>;
  <D.5688>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 249, "string != NULL");
  D.5690 = string;
  return D.5690;
  <D.5689>:
  D.5691 = string->len;
  D.5692 = D.5691 + len;
  D.5693 = string->allocated_len;
  if (D.5692 >= D.5693) goto <D.5694>; else goto <D.5695>;
  <D.5694>:
  D.5693 = string->allocated_len;
  D.5696 = D.5693 + len;
  D.5697 = D.5696 + 16;
  D.5698 = D.5697 * 2;
  string->allocated_len = D.5698;
  D.5699 = string->str;
  D.5693 = string->allocated_len;
  D.5700 = monoeg_realloc (D.5699, D.5693);
  string->str = D.5700;
  <D.5695>:
  string->len = len;
  D.5699 = string->str;
  D.5701 = D.5699 + len;
  *D.5701 = 0;
  D.5690 = string;
  return D.5690;
}


monoeg_g_string_erase (struct GString * string, gssize pos, gssize len)
{
  struct GString * D.5705;
  long unsigned int pos.13;
  long unsigned int D.5707;
  long int D.5714;
  long unsigned int D.5715;
  char * D.5716;
  sizetype pos.14;
  char * D.5718;
  void * D.5719;
  sizetype len.15;
  sizetype D.5721;
  char * D.5722;
  long unsigned int D.5723;
  long unsigned int D.5724;
  long unsigned int len.16;
  long unsigned int D.5726;

  if (string == 0B) goto <D.5703>; else goto <D.5704>;
  <D.5703>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gstring.c", 261, "string != NULL");
  D.5705 = string;
  return D.5705;
  <D.5704>:
  pos.13 = (long unsigned int) pos;
  D.5707 = string->len;
  if (pos.13 >= D.5707) goto <D.5708>; else goto <D.5709>;
  <D.5708>:
  D.5705 = string;
  return D.5705;
  <D.5709>:
  if (len == -1) goto <D.5710>; else goto <D.5713>;
  <D.5713>:
  D.5714 = pos + len;
  D.5715 = (long unsigned int) D.5714;
  D.5707 = string->len;
  if (D.5715 >= D.5707) goto <D.5710>; else goto <D.5711>;
  <D.5710>:
  D.5716 = string->str;
  pos.14 = (sizetype) pos;
  D.5718 = D.5716 + pos.14;
  *D.5718 = 0;
  goto <D.5712>;
  <D.5711>:
  D.5716 = string->str;
  pos.14 = (sizetype) pos;
  D.5719 = D.5716 + pos.14;
  D.5716 = string->str;
  pos.14 = (sizetype) pos;
  len.15 = (sizetype) len;
  D.5721 = pos.14 + len.15;
  D.5722 = D.5716 + D.5721;
  D.5707 = string->len;
  D.5714 = pos + len;
  D.5715 = (long unsigned int) D.5714;
  D.5723 = D.5707 - D.5715;
  D.5724 = D.5723 + 1;
  memmove (D.5719, D.5722, D.5724);
  D.5707 = string->len;
  len.16 = (long unsigned int) len;
  D.5726 = D.5707 - len.16;
  string->len = D.5726;
  <D.5712>:
  D.5705 = string;
  return D.5705;
}


