monoeg_g_ptr_array_new ()
{
  struct GPtrArray * D.4998;

  D.4998 = monoeg_g_ptr_array_sized_new (0);
  return D.4998;
}


monoeg_g_ptr_array_sized_new (guint reserved_size)
{
  struct GPtrArray * D.5002;
  struct GPtrArrayPriv * array;

  array = monoeg_malloc0 (16);
  array->pdata = 0B;
  array->len = 0;
  array->size = 0;
  if (reserved_size != 0) goto <D.5000>; else goto <D.5001>;
  <D.5000>:
  monoeg_ptr_array_grow (array, reserved_size);
  <D.5001>:
  D.5002 = array;
  return D.5002;
}


monoeg_ptr_array_grow (struct GPtrArrayPriv * array, guint length)
{
  unsigned int D.5004;
  unsigned int D.5007;
  unsigned int D.5010;
  unsigned int D.5011;
  long unsigned int D.5012;
  long unsigned int D.5013;
  void * * D.5014;
  void * D.5015;
  guint new_length;

  D.5004 = array->len;
  new_length = D.5004 + length;
  if (array == 0B) goto <D.5005>; else goto <D.5006>;
  <D.5005>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 45, "array != NULL");
  return;
  <D.5006>:
  D.5007 = array->size;
  if (D.5007 >= new_length) goto <D.5008>; else goto <D.5009>;
  <D.5008>:
  return;
  <D.5009>:
  array->size = 1;
  goto <D.4931>;
  <D.4930>:
  D.5007 = array->size;
  D.5010 = D.5007 << 1;
  array->size = D.5010;
  <D.4931>:
  D.5007 = array->size;
  if (D.5007 < new_length) goto <D.4930>; else goto <D.4932>;
  <D.4932>:
  D.5007 = array->size;
  D.5011 = MAX_EXPR <D.5007, 16>;
  array->size = D.5011;
  D.5007 = array->size;
  D.5012 = (long unsigned int) D.5007;
  D.5013 = D.5012 * 8;
  D.5014 = array->pdata;
  D.5015 = monoeg_realloc (D.5014, D.5013);
  array->pdata = D.5015;
}


monoeg_g_ptr_array_free (struct GPtrArray * array, gboolean free_seg)
{
  void * * D.5019;
  void * * D.5022;
  void * * data;

  data = 0B;
  if (array == 0B) goto <D.5017>; else goto <D.5018>;
  <D.5017>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 88, "array != NULL");
  D.5019 = 0B;
  return D.5019;
  <D.5018>:
  if (free_seg != 0) goto <D.5020>; else goto <D.5021>;
  <D.5020>:
  D.5022 = array->pdata;
  monoeg_g_free (D.5022);
  goto <D.5023>;
  <D.5021>:
  data = array->pdata;
  <D.5023>:
  monoeg_g_free (array);
  D.5019 = data;
  return D.5019;
}


monoeg_g_ptr_array_set_size (struct GPtrArray * array, gint length)
{
  long unsigned int D.5027;
  unsigned int D.5028;
  long unsigned int D.5029;
  unsigned int length.0;
  unsigned int D.5033;
  long unsigned int D.5034;
  long unsigned int D.5035;
  void * * D.5036;
  long unsigned int D.5037;
  void * D.5038;

  if (array == 0B) goto <D.5025>; else goto <D.5026>;
  <D.5025>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 104, "array != NULL");
  return;
  <D.5026>:
  D.5027 = (long unsigned int) length;
  D.5028 = array->len;
  D.5029 = (long unsigned int) D.5028;
  if (D.5027 > D.5029) goto <D.5030>; else goto <D.5031>;
  <D.5030>:
  length.0 = (unsigned int) length;
  monoeg_ptr_array_grow (array, length.0);
  length.0 = (unsigned int) length;
  D.5028 = array->len;
  D.5033 = length.0 - D.5028;
  D.5034 = (long unsigned int) D.5033;
  D.5035 = D.5034 * 8;
  D.5036 = array->pdata;
  D.5028 = array->len;
  D.5029 = (long unsigned int) D.5028;
  D.5037 = D.5029 * 8;
  D.5038 = D.5036 + D.5037;
  memset (D.5038, 0, D.5035);
  <D.5031>:
  length.0 = (unsigned int) length;
  array->len = length.0;
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.5042;
  int D.5047;
  void * D.5049;
  long unsigned int D.5050;

  D.5042 = __builtin_constant_p (__len);
  if (D.5042 != 0) goto <D.5043>; else goto <D.5044>;
  <D.5043>:
  if (__len == 0) goto <D.5045>; else goto <D.5046>;
  <D.5045>:
  D.5047 = __builtin_constant_p (__ch);
  if (D.5047 == 0) goto <D.5040>; else goto <D.5048>;
  <D.5048>:
  if (__ch != 0) goto <D.5040>; else goto <D.5041>;
  <D.5040>:
  __warn_memset_zero_len ();
  D.5049 = __dest;
  return D.5049;
  <D.5041>:
  <D.5046>:
  <D.5044>:
  D.5050 = __builtin_object_size (__dest, 0);
  D.5049 = __builtin___memset_chk (__dest, __ch, __len, D.5050);
  return D.5049;
}


monoeg_g_ptr_array_add (struct GPtrArray * array, void * data)
{
  void * * D.5054;
  unsigned int D.5055;
  unsigned int D.5056;
  unsigned int D.5057;
  long unsigned int D.5058;
  long unsigned int D.5059;
  void * * D.5060;

  if (array == 0B) goto <D.5052>; else goto <D.5053>;
  <D.5052>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 118, "array != NULL");
  return;
  <D.5053>:
  monoeg_ptr_array_grow (array, 1);
  D.5054 = array->pdata;
  D.5055 = array->len;
  D.5056 = D.5055;
  D.5057 = D.5056 + 1;
  array->len = D.5057;
  D.5058 = (long unsigned int) D.5056;
  D.5059 = D.5058 * 8;
  D.5060 = D.5054 + D.5059;
  *D.5060 = data;
}


monoeg_g_ptr_array_remove_index (struct GPtrArray * array, guint index)
{
  void * D.5064;
  void * * D.5067;
  long unsigned int D.5068;
  long unsigned int D.5069;
  void * * D.5070;
  unsigned int D.5071;
  unsigned int D.5072;
  unsigned int D.5075;
  unsigned int D.5076;
  long unsigned int D.5077;
  long unsigned int D.5078;
  sizetype D.5079;
  sizetype D.5080;
  sizetype D.5081;
  void * * D.5082;
  void * D.5083;
  long unsigned int D.5084;
  long unsigned int D.5085;
  void * * D.5086;
  void * removed_node;

  if (array == 0B) goto <D.5062>; else goto <D.5063>;
  <D.5062>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 128, "array != NULL");
  D.5064 = 0B;
  return D.5064;
  <D.5063>:
  if (0 != 0) goto <D.5065>; else goto <D.5066>;
  <D.5065>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 129, "index >= 0 || index < array->len");
  D.5064 = 0B;
  return D.5064;
  <D.5066>:
  D.5067 = array->pdata;
  D.5068 = (long unsigned int) index;
  D.5069 = D.5068 * 8;
  D.5070 = D.5067 + D.5069;
  removed_node = *D.5070;
  D.5071 = array->len;
  D.5072 = D.5071 + 4294967295;
  if (D.5072 != index) goto <D.5073>; else goto <D.5074>;
  <D.5073>:
  D.5071 = array->len;
  D.5075 = D.5071 - index;
  D.5076 = D.5075 + 4294967295;
  D.5077 = (long unsigned int) D.5076;
  D.5078 = D.5077 * 8;
  D.5067 = array->pdata;
  D.5079 = (sizetype) index;
  D.5080 = D.5079 + 1;
  D.5081 = D.5080 * 8;
  D.5082 = D.5067 + D.5081;
  D.5067 = array->pdata;
  D.5068 = (long unsigned int) index;
  D.5069 = D.5068 * 8;
  D.5083 = D.5067 + D.5069;
  memmove (D.5083, D.5082, D.5078);
  <D.5074>:
  D.5071 = array->len;
  D.5072 = D.5071 + 4294967295;
  array->len = D.5072;
  D.5067 = array->pdata;
  D.5071 = array->len;
  D.5084 = (long unsigned int) D.5071;
  D.5085 = D.5084 * 8;
  D.5086 = D.5067 + D.5085;
  *D.5086 = 0B;
  D.5064 = removed_node;
  return D.5064;
}


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

  D.5089 = __builtin_object_size (__dest, 0);
  D.5088 = __builtin___memmove_chk (__dest, __src, __len, D.5089);
  return D.5088;
}


monoeg_g_ptr_array_remove_index_fast (struct GPtrArray * array, guint index)
{
  void * D.5093;
  void * * D.5096;
  long unsigned int D.5097;
  long unsigned int D.5098;
  void * * D.5099;
  unsigned int D.5100;
  unsigned int D.5101;
  long unsigned int D.5104;
  long unsigned int D.5105;
  sizetype D.5106;
  void * * D.5107;
  void * D.5108;
  void * * D.5109;
  void * removed_node;

  if (array == 0B) goto <D.5091>; else goto <D.5092>;
  <D.5091>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 149, "array != NULL");
  D.5093 = 0B;
  return D.5093;
  <D.5092>:
  if (0 != 0) goto <D.5094>; else goto <D.5095>;
  <D.5094>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 150, "index >= 0 || index < array->len");
  D.5093 = 0B;
  return D.5093;
  <D.5095>:
  D.5096 = array->pdata;
  D.5097 = (long unsigned int) index;
  D.5098 = D.5097 * 8;
  D.5099 = D.5096 + D.5098;
  removed_node = *D.5099;
  D.5100 = array->len;
  D.5101 = D.5100 + 4294967295;
  if (D.5101 != index) goto <D.5102>; else goto <D.5103>;
  <D.5102>:
  D.5096 = array->pdata;
  D.5100 = array->len;
  D.5104 = (long unsigned int) D.5100;
  D.5105 = D.5104 * 8;
  D.5106 = D.5105 + 18446744073709551608;
  D.5107 = D.5096 + D.5106;
  D.5096 = array->pdata;
  D.5097 = (long unsigned int) index;
  D.5098 = D.5097 * 8;
  D.5108 = D.5096 + D.5098;
  memmove (D.5108, D.5107, 8);
  <D.5103>:
  D.5100 = array->len;
  D.5101 = D.5100 + 4294967295;
  array->len = D.5101;
  D.5096 = array->pdata;
  D.5100 = array->len;
  D.5104 = (long unsigned int) D.5100;
  D.5105 = D.5104 * 8;
  D.5109 = D.5096 + D.5105;
  *D.5109 = 0B;
  D.5093 = removed_node;
  return D.5093;
}


monoeg_g_ptr_array_remove (struct GPtrArray * array, void * data)
{
  gboolean D.5113;
  void * * D.5114;
  long unsigned int D.5115;
  long unsigned int D.5116;
  void * * D.5117;
  void * D.5118;
  unsigned int D.5121;
  guint i;

  if (array == 0B) goto <D.5111>; else goto <D.5112>;
  <D.5111>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 170, "array != NULL");
  D.5113 = 0;
  return D.5113;
  <D.5112>:
  i = 0;
  goto <D.4969>;
  <D.4968>:
  D.5114 = array->pdata;
  D.5115 = (long unsigned int) i;
  D.5116 = D.5115 * 8;
  D.5117 = D.5114 + D.5116;
  D.5118 = *D.5117;
  if (D.5118 == data) goto <D.5119>; else goto <D.5120>;
  <D.5119>:
  monoeg_g_ptr_array_remove_index (array, i);
  D.5113 = 1;
  return D.5113;
  <D.5120>:
  i = i + 1;
  <D.4969>:
  D.5121 = array->len;
  if (D.5121 > i) goto <D.4968>; else goto <D.4970>;
  <D.4970>:
  D.5113 = 0;
  return D.5113;
}


monoeg_g_ptr_array_remove_fast (struct GPtrArray * array, void * data)
{
  gboolean D.5125;
  void * * D.5126;
  long unsigned int D.5127;
  long unsigned int D.5128;
  void * * D.5129;
  void * D.5130;
  unsigned int D.5133;
  unsigned int D.5134;
  long unsigned int D.5137;
  long unsigned int D.5138;
  void * * D.5139;
  void * D.5140;
  guint i;

  if (array == 0B) goto <D.5123>; else goto <D.5124>;
  <D.5123>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 187, "array != NULL");
  D.5125 = 0;
  return D.5125;
  <D.5124>:
  i = 0;
  goto <D.4977>;
  <D.4976>:
  D.5126 = array->pdata;
  D.5127 = (long unsigned int) i;
  D.5128 = D.5127 * 8;
  D.5129 = D.5126 + D.5128;
  D.5130 = *D.5129;
  if (D.5130 == data) goto <D.5131>; else goto <D.5132>;
  <D.5131>:
  D.5133 = array->len;
  D.5134 = D.5133 + 4294967295;
  array->len = D.5134;
  D.5133 = array->len;
  if (D.5133 != 0) goto <D.5135>; else goto <D.5136>;
  <D.5135>:
  D.5126 = array->pdata;
  D.5127 = (long unsigned int) i;
  D.5128 = D.5127 * 8;
  D.5129 = D.5126 + D.5128;
  D.5126 = array->pdata;
  D.5133 = array->len;
  D.5137 = (long unsigned int) D.5133;
  D.5138 = D.5137 * 8;
  D.5139 = D.5126 + D.5138;
  D.5140 = *D.5139;
  *D.5129 = D.5140;
  goto <D.5141>;
  <D.5136>:
  D.5126 = array->pdata;
  D.5127 = (long unsigned int) i;
  D.5128 = D.5127 * 8;
  D.5129 = D.5126 + D.5128;
  *D.5129 = 0B;
  <D.5141>:
  D.5125 = 1;
  return D.5125;
  <D.5132>:
  i = i + 1;
  <D.4977>:
  D.5133 = array->len;
  if (D.5133 > i) goto <D.4976>; else goto <D.4978>;
  <D.4978>:
  D.5125 = 0;
  return D.5125;
}


monoeg_g_ptr_array_foreach (struct GPtrArray * array, void (*GFunc) (void *, void *) func, void * user_data)
{
  void * * D.5143;
  long unsigned int D.5144;
  long unsigned int D.5145;
  void * * D.5146;
  void * D.5147;
  unsigned int D.5148;
  guint i;

  i = 0;
  goto <D.4986>;
  <D.4985>:
  D.5143 = array->pdata;
  D.5144 = (long unsigned int) i;
  D.5145 = D.5144 * 8;
  D.5146 = D.5143 + D.5145;
  D.5147 = *D.5146;
  func (D.5147, user_data);
  i = i + 1;
  <D.4986>:
  D.5148 = array->len;
  if (D.5148 > i) goto <D.4985>; else goto <D.4987>;
  <D.4987>:
}


monoeg_g_ptr_array_sort (struct GPtrArray * array, gint (*GCompareFunc) (const void *, const void *) compare)
{
  unsigned int D.5151;
  long unsigned int D.5152;
  void * * D.5153;

  if (array == 0B) goto <D.5149>; else goto <D.5150>;
  <D.5149>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 216, "array != NULL");
  return;
  <D.5150>:
  D.5151 = array->len;
  D.5152 = (long unsigned int) D.5151;
  D.5153 = array->pdata;
  qsort (D.5153, D.5152, 8, compare);
}


monoeg_g_ptr_array_sort_with_data (struct GPtrArray * array, gint (*GCompareDataFunc) (const void *, const void *, void *) compare, void * user_data)
{
  unsigned int D.5157;
  long unsigned int D.5158;
  void * * D.5159;

  if (array == 0B) goto <D.5155>; else goto <D.5156>;
  <D.5155>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 223, "array != NULL");
  return;
  <D.5156>:
  D.5157 = array->len;
  D.5158 = (long unsigned int) D.5157;
  D.5159 = array->pdata;
  monoeg_g_qsort_with_data (D.5159, D.5158, 8, compare, user_data);
}


