monoeg_g_error_new (void * domain, gint code, const char * format)
{
  gchar * * D.4952;
  int D.4953;
  gchar * D.4956;
  struct GError * D.4957;
  struct  args[1];
  struct GError * err;

  try
    {
      err = monoeg_malloc (24);
      err->domain = domain;
      err->code = code;
      __builtin_va_start (&args, 0);
      D.4952 = &err->message;
      D.4953 = vasprintf (D.4952, format, &args);
      if (D.4953 == -1) goto <D.4954>; else goto <D.4955>;
      <D.4954>:
      D.4956 = monoeg_g_strdup_printf ("internal: invalid format string %s", format);
      err->message = D.4956;
      <D.4955>:
      __builtin_va_end (&args);
      D.4957 = err;
      return D.4957;
    }
  finally
    {
      args = {CLOBBER};
    }
}


vasprintf (char * * restrict __ptr, const char * restrict __fmt, struct  * __ap)
{
  int D.4960;

  D.4960 = __vasprintf_chk (__ptr, 1, __fmt, __ap);
  return D.4960;
}


monoeg_g_clear_error (struct GError * * error)
{
  struct GError * D.4964;

  if (error != 0B) goto <D.4962>; else goto <D.4963>;
  <D.4962>:
  D.4964 = *error;
  if (D.4964 != 0B) goto <D.4965>; else goto <D.4966>;
  <D.4965>:
  D.4964 = *error;
  monoeg_g_error_free (D.4964);
  *error = 0B;
  <D.4966>:
  <D.4963>:
}


monoeg_g_error_free (struct GError * error)
{
  gchar * D.4969;

  if (error == 0B) goto <D.4967>; else goto <D.4968>;
  <D.4967>:
  monoeg_g_log (0B, 8, "%s:%d: assertion \'%s\' failed", "gerror.c", 76, "error != NULL");
  return;
  <D.4968>:
  D.4969 = error->message;
  free (D.4969);
  monoeg_g_free (error);
}


monoeg_g_set_error (struct GError * * err, void * domain, gint code, const gchar * format)
{
  struct GError * D.4973;
  struct  args[1];

  try
    {
      if (err != 0B) goto <D.4971>; else goto <D.4972>;
      <D.4971>:
      __builtin_va_start (&args, 0);
      D.4973 = monoeg_g_error_vnew (domain, code, format, &args);
      *err = D.4973;
      __builtin_va_end (&args);
      <D.4972>:
    }
  finally
    {
      args = {CLOBBER};
    }
}


monoeg_g_error_vnew (void * domain, gint code, const char * format, struct  * ap)
{
  gchar * * D.4974;
  int D.4975;
  gchar * D.4978;
  struct GError * D.4979;
  struct GError * err;

  err = monoeg_malloc (24);
  err->domain = domain;
  err->code = code;
  D.4974 = &err->message;
  D.4975 = vasprintf (D.4974, format, ap);
  if (D.4975 == -1) goto <D.4976>; else goto <D.4977>;
  <D.4976>:
  D.4978 = monoeg_g_strdup_printf ("internal: invalid format string %s", format);
  err->message = D.4978;
  <D.4977>:
  D.4979 = err;
  return D.4979;
}


monoeg_g_propagate_error (struct GError * * dest, struct GError * src)
{
  if (dest == 0B) goto <D.4981>; else goto <D.4982>;
  <D.4981>:
  if (src != 0B) goto <D.4983>; else goto <D.4984>;
  <D.4983>:
  monoeg_g_error_free (src);
  <D.4984>:
  goto <D.4985>;
  <D.4982>:
  *dest = src;
  <D.4985>:
}


