monoeg_g_ptr_array_new ()
{
  struct GPtrArray * D.5101;

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


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

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


monoeg_ptr_array_grow (struct GPtrArrayPriv * array, guint length)
{
  unsigned int D.5107;
  unsigned int D.5110;
  unsigned int D.5113;
  unsigned int D.5114;
  void * * D.5115;
  long unsigned int D.5116;
  long unsigned int D.5117;
  void * D.5118;
  guint new_length;

  D.5107 = array->len;
  new_length = D.5107 + length;
  if (array == 0B) goto <D.5108>; else goto <D.5109>;
  <D.5108>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 45, "array != NULL");
  return;
  <D.5109>:
  D.5110 = array->size;
  if (D.5110 >= new_length) goto <D.5111>; else goto <D.5112>;
  <D.5111>:
  return;
  <D.5112>:
  array->size = 1;
  goto <D.5034>;
  <D.5033>:
  D.5110 = array->size;
  D.5113 = D.5110 << 1;
  array->size = D.5113;
  <D.5034>:
  D.5110 = array->size;
  if (D.5110 < new_length) goto <D.5033>; else goto <D.5035>;
  <D.5035>:
  D.5110 = array->size;
  D.5114 = MAX_EXPR <D.5110, 16>;
  array->size = D.5114;
  D.5115 = array->pdata;
  D.5110 = array->size;
  D.5116 = (long unsigned int) D.5110;
  D.5117 = D.5116 * 8;
  D.5118 = monoeg_realloc (D.5115, D.5117);
  array->pdata = D.5118;
}


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

  data = 0B;
  if (array == 0B) goto <D.5120>; else goto <D.5121>;
  <D.5120>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 88, "array != NULL");
  D.5122 = 0B;
  return D.5122;
  <D.5121>:
  if (free_seg != 0) goto <D.5123>; else goto <D.5124>;
  <D.5123>:
  D.5125 = array->pdata;
  monoeg_g_free (D.5125);
  goto <D.5126>;
  <D.5124>:
  data = array->pdata;
  <D.5126>:
  monoeg_g_free (array);
  D.5122 = data;
  return D.5122;
}


monoeg_g_ptr_array_set_size (struct GPtrArray * array, gint length)
{
  long unsigned int D.5130;
  unsigned int D.5131;
  long unsigned int D.5132;
  unsigned int length.0;
  void * * D.5136;
  long unsigned int D.5137;
  void * * D.5138;
  unsigned int D.5139;
  long unsigned int D.5140;
  long unsigned int D.5141;

  if (array == 0B) goto <D.5128>; else goto <D.5129>;
  <D.5128>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 104, "array != NULL");
  return;
  <D.5129>:
  D.5130 = (long unsigned int) length;
  D.5131 = array->len;
  D.5132 = (long unsigned int) D.5131;
  if (D.5130 > D.5132) goto <D.5133>; else goto <D.5134>;
  <D.5133>:
  length.0 = (unsigned int) length;
  monoeg_ptr_array_grow (array, length.0);
  D.5136 = array->pdata;
  D.5131 = array->len;
  D.5132 = (long unsigned int) D.5131;
  D.5137 = D.5132 * 8;
  D.5138 = D.5136 + D.5137;
  length.0 = (unsigned int) length;
  D.5131 = array->len;
  D.5139 = length.0 - D.5131;
  D.5140 = (long unsigned int) D.5139;
  D.5141 = D.5140 * 8;
  memset (D.5138, 0, D.5141);
  <D.5134>:
  length.0 = (unsigned int) length;
  array->len = length.0;
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__, __nothrow__, __leaf__))
memset (void * __dest, int __ch, size_t __len)
{
  void * D.5143;
  long unsigned int D.5144;

  D.5144 = __builtin_object_size (__dest, 0);
  D.5143 = __builtin___memset_chk (__dest, __ch, __len, D.5144);
  return D.5143;
}


monoeg_g_ptr_array_add (struct GPtrArray * array, void * data)
{
  void * * D.5148;
  unsigned int D.5149;
  unsigned int D.5150;
  unsigned int D.5151;
  long unsigned int D.5152;
  long unsigned int D.5153;
  void * * D.5154;

  if (array == 0B) goto <D.5146>; else goto <D.5147>;
  <D.5146>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 118, "array != NULL");
  return;
  <D.5147>:
  monoeg_ptr_array_grow (array, 1);
  D.5148 = array->pdata;
  D.5149 = array->len;
  D.5150 = D.5149;
  D.5151 = D.5150 + 1;
  array->len = D.5151;
  D.5152 = (long unsigned int) D.5150;
  D.5153 = D.5152 * 8;
  D.5154 = D.5148 + D.5153;
  *D.5154 = data;
}


monoeg_g_ptr_array_remove_index (struct GPtrArray * array, guint index)
{
  void * D.5158;
  void * * D.5161;
  long unsigned int D.5162;
  long unsigned int D.5163;
  void * * D.5164;
  unsigned int D.5165;
  unsigned int D.5166;
  sizetype D.5169;
  sizetype D.5170;
  sizetype D.5171;
  void * * D.5172;
  unsigned int D.5173;
  unsigned int D.5174;
  long unsigned int D.5175;
  long unsigned int D.5176;
  long unsigned int D.5177;
  long unsigned int D.5178;
  void * * D.5179;
  void * removed_node;

  if (array == 0B) goto <D.5156>; else goto <D.5157>;
  <D.5156>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 128, "array != NULL");
  D.5158 = 0B;
  return D.5158;
  <D.5157>:
  if (0 != 0) goto <D.5159>; else goto <D.5160>;
  <D.5159>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 129, "index >= 0 || index < array->len");
  D.5158 = 0B;
  return D.5158;
  <D.5160>:
  D.5161 = array->pdata;
  D.5162 = (long unsigned int) index;
  D.5163 = D.5162 * 8;
  D.5164 = D.5161 + D.5163;
  removed_node = *D.5164;
  D.5165 = array->len;
  D.5166 = D.5165 + 4294967295;
  if (D.5166 != index) goto <D.5167>; else goto <D.5168>;
  <D.5167>:
  D.5161 = array->pdata;
  D.5162 = (long unsigned int) index;
  D.5163 = D.5162 * 8;
  D.5164 = D.5161 + D.5163;
  D.5161 = array->pdata;
  D.5169 = (sizetype) index;
  D.5170 = D.5169 + 1;
  D.5171 = D.5170 * 8;
  D.5172 = D.5161 + D.5171;
  D.5165 = array->len;
  D.5173 = D.5165 - index;
  D.5174 = D.5173 + 4294967295;
  D.5175 = (long unsigned int) D.5174;
  D.5176 = D.5175 * 8;
  memmove (D.5164, D.5172, D.5176);
  <D.5168>:
  D.5165 = array->len;
  D.5166 = D.5165 + 4294967295;
  array->len = D.5166;
  D.5161 = array->pdata;
  D.5165 = array->len;
  D.5177 = (long unsigned int) D.5165;
  D.5178 = D.5177 * 8;
  D.5179 = D.5161 + D.5178;
  *D.5179 = 0B;
  D.5158 = removed_node;
  return D.5158;
}


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

  D.5182 = __builtin_object_size (__dest, 0);
  D.5181 = __builtin___memmove_chk (__dest, __src, __len, D.5182);
  return D.5181;
}


monoeg_g_ptr_array_remove_index_fast (struct GPtrArray * array, guint index)
{
  void * D.5186;
  void * * D.5189;
  long unsigned int D.5190;
  long unsigned int D.5191;
  void * * D.5192;
  unsigned int D.5193;
  unsigned int D.5194;
  long unsigned int D.5197;
  long unsigned int D.5198;
  sizetype D.5199;
  void * * D.5200;
  void * * D.5201;
  void * removed_node;

  if (array == 0B) goto <D.5184>; else goto <D.5185>;
  <D.5184>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 149, "array != NULL");
  D.5186 = 0B;
  return D.5186;
  <D.5185>:
  if (0 != 0) goto <D.5187>; else goto <D.5188>;
  <D.5187>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 150, "index >= 0 || index < array->len");
  D.5186 = 0B;
  return D.5186;
  <D.5188>:
  D.5189 = array->pdata;
  D.5190 = (long unsigned int) index;
  D.5191 = D.5190 * 8;
  D.5192 = D.5189 + D.5191;
  removed_node = *D.5192;
  D.5193 = array->len;
  D.5194 = D.5193 + 4294967295;
  if (D.5194 != index) goto <D.5195>; else goto <D.5196>;
  <D.5195>:
  D.5189 = array->pdata;
  D.5190 = (long unsigned int) index;
  D.5191 = D.5190 * 8;
  D.5192 = D.5189 + D.5191;
  D.5189 = array->pdata;
  D.5193 = array->len;
  D.5197 = (long unsigned int) D.5193;
  D.5198 = D.5197 * 8;
  D.5199 = D.5198 + 18446744073709551608;
  D.5200 = D.5189 + D.5199;
  memmove (D.5192, D.5200, 8);
  <D.5196>:
  D.5193 = array->len;
  D.5194 = D.5193 + 4294967295;
  array->len = D.5194;
  D.5189 = array->pdata;
  D.5193 = array->len;
  D.5197 = (long unsigned int) D.5193;
  D.5198 = D.5197 * 8;
  D.5201 = D.5189 + D.5198;
  *D.5201 = 0B;
  D.5186 = removed_node;
  return D.5186;
}


monoeg_g_ptr_array_remove (struct GPtrArray * array, void * data)
{
  gboolean D.5205;
  void * * D.5206;
  long unsigned int D.5207;
  long unsigned int D.5208;
  void * * D.5209;
  void * D.5210;
  unsigned int D.5213;
  guint i;

  if (array == 0B) goto <D.5203>; else goto <D.5204>;
  <D.5203>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 170, "array != NULL");
  D.5205 = 0;
  return D.5205;
  <D.5204>:
  i = 0;
  goto <D.5072>;
  <D.5071>:
  D.5206 = array->pdata;
  D.5207 = (long unsigned int) i;
  D.5208 = D.5207 * 8;
  D.5209 = D.5206 + D.5208;
  D.5210 = *D.5209;
  if (D.5210 == data) goto <D.5211>; else goto <D.5212>;
  <D.5211>:
  monoeg_g_ptr_array_remove_index (array, i);
  D.5205 = 1;
  return D.5205;
  <D.5212>:
  i = i + 1;
  <D.5072>:
  D.5213 = array->len;
  if (D.5213 > i) goto <D.5071>; else goto <D.5073>;
  <D.5073>:
  D.5205 = 0;
  return D.5205;
}


monoeg_g_ptr_array_remove_fast (struct GPtrArray * array, void * data)
{
  gboolean D.5217;
  void * * D.5218;
  long unsigned int D.5219;
  long unsigned int D.5220;
  void * * D.5221;
  void * D.5222;
  unsigned int D.5225;
  unsigned int D.5226;
  long unsigned int D.5229;
  long unsigned int D.5230;
  void * * D.5231;
  void * D.5232;
  guint i;

  if (array == 0B) goto <D.5215>; else goto <D.5216>;
  <D.5215>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gptrarray.c", 187, "array != NULL");
  D.5217 = 0;
  return D.5217;
  <D.5216>:
  i = 0;
  goto <D.5080>;
  <D.5079>:
  D.5218 = array->pdata;
  D.5219 = (long unsigned int) i;
  D.5220 = D.5219 * 8;
  D.5221 = D.5218 + D.5220;
  D.5222 = *D.5221;
  if (D.5222 == data) goto <D.5223>; else goto <D.5224>;
  <D.5223>:
  D.5225 = array->len;
  D.5226 = D.5225 + 4294967295;
  array->len = D.5226;
  D.5225 = array->len;
  if (D.5225 != 0) goto <D.5227>; else goto <D.5228>;
  <D.5227>:
  D.5218 = array->pdata;
  D.5219 = (long unsigned int) i;
  D.5220 = D.5219 * 8;
  D.5221 = D.5218 + D.5220;
  D.5218 = array->pdata;
  D.5225 = array->len;
  D.5229 = (long unsigned int) D.5225;
  D.5230 = D.5229 * 8;
  D.5231 = D.5218 + D.5230;
  D.5232 = *D.5231;
  *D.5221 = D.5232;
  goto <D.5233>;
  <D.5228>:
  D.5218 = array->pdata;
  D.5219 = (long unsigned int) i;
  D.5220 = D.5219 * 8;
  D.5221 = D.5218 + D.5220;
  *D.5221 = 0B;
  <D.5233>:
  D.5217 = 1;
  return D.5217;
  <D.5224>:
  i = i + 1;
  <D.5080>:
  D.5225 = array->len;
  if (D.5225 > i) goto <D.5079>; else goto <D.5081>;
  <D.5081>:
  D.5217 = 0;
  return D.5217;
}


monoeg_g_ptr_array_foreach (struct GPtrArray * array, void (*GFunc) (void *, void *) func, void * user_data)
{
  void * * D.5235;
  long unsigned int D.5236;
  long unsigned int D.5237;
  void * * D.5238;
  void * D.5239;
  unsigned int D.5240;
  guint i;

  i = 0;
  goto <D.5089>;
  <D.5088>:
  D.5235 = array->pdata;
  D.5236 = (long unsigned int) i;
  D.5237 = D.5236 * 8;
  D.5238 = D.5235 + D.5237;
  D.5239 = *D.5238;
  func (D.5239, user_data);
  i = i + 1;
  <D.5089>:
  D.5240 = array->len;
  if (D.5240 > i) goto <D.5088>; else goto <D.5090>;
  <D.5090>:
}


monoeg_g_ptr_array_sort (struct GPtrArray * array, gint (*GCompareFunc) (const void *, const void *) compare)
{
  void * * D.5243;
  unsigned int D.5244;
  long unsigned int D.5245;

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


monoeg_g_ptr_array_sort_with_data (struct GPtrArray * array, gint (*GCompareDataFunc) (const void *, const void *, void *) compare, void * user_data)
{
  void * * D.5249;
  unsigned int D.5250;
  long unsigned int D.5251;

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


