mono_unicode_from_external (const gchar * in, gsize * bytes)
{
  gunichar2 * D.7328;
  int D.7223;
  int iftmp.0;
  int D.7222;
  unsigned int i.1;
  unsigned int D.7335;
  gchar * * D.7336;
  const char[15] * D.7337;
  unsigned char D.7338;
  int D.7339;
  unsigned char D.7340;
  int D.7341;
  _Bool D.7342;
  _Bool D.7343;
  _Bool D.7344;
  const unsigned char * D.7347;
  unsigned char D.7348;
  int D.7349;
  const unsigned char * D.7350;
  unsigned char D.7351;
  int D.7352;
  _Bool D.7353;
  _Bool D.7354;
  const unsigned char * D.7357;
  unsigned char D.7358;
  int D.7359;
  const unsigned char * D.7360;
  unsigned char D.7361;
  int D.7362;
  _Bool D.7363;
  _Bool D.7364;
  const unsigned char * D.7367;
  unsigned char D.7368;
  int D.7369;
  const unsigned char * D.7370;
  unsigned char D.7371;
  int D.7372;
  gchar * D.7374;
  long int lbytes.2;
  unsigned int lbytes.3;
  unsigned int D.7382;
  int D.7383;
  unsigned int D.7388;
  unsigned int D.7389;
  int D.7390;
  gchar * res;
  gchar * * encodings;
  const gchar * encoding_list;
  int i;
  glong lbytes;

  try
    {
      res = 0B;
      if (in == 0B) goto <D.7326>; else goto <D.7327>;
      <D.7326>:
      D.7328 = 0B;
      return D.7328;
      <D.7327>:
      encoding_list = monoeg_g_getenv ("MONO_EXTERNAL_ENCODINGS");
      if (encoding_list == 0B) goto <D.7329>; else goto <D.7330>;
      <D.7329>:
      encoding_list = "";
      <D.7330>:
      encodings = monoeg_g_strsplit (encoding_list, ":", 0);
      i = 0;
      goto <D.7227>;
      <D.7226>:
      {
        size_t __s1_len;
        size_t __s2_len;

        __s2_len = 14;
        if (__s2_len <= 3) goto <D.7332>; else goto <D.7333>;
        <D.7332>:
        {
          const unsigned char * __s2;
          int __result;

          i.1 = (unsigned int) i;
          D.7335 = i.1 * 4;
          D.7336 = encodings + D.7335;
          __s2 = *D.7336;
          D.7337 = "default_locale";
          D.7338 = MEM[(const unsigned char *)D.7337];
          D.7339 = (int) D.7338;
          D.7340 = *__s2;
          D.7341 = (int) D.7340;
          __result = D.7339 - D.7341;
          {
            D.7342 = __s2_len != 0;
            D.7343 = __result == 0;
            D.7344 = D.7342 & D.7343;
            if (D.7344 != 0) goto <D.7345>; else goto <D.7346>;
            <D.7345>:
            D.7347 = &MEM[(void *)"default_locale" + 1B];
            D.7348 = *D.7347;
            D.7349 = (int) D.7348;
            D.7350 = __s2 + 1;
            D.7351 = *D.7350;
            D.7352 = (int) D.7351;
            __result = D.7349 - D.7352;
            D.7353 = __s2_len > 1;
            D.7343 = __result == 0;
            D.7354 = D.7353 & D.7343;
            if (D.7354 != 0) goto <D.7355>; else goto <D.7356>;
            <D.7355>:
            D.7357 = &MEM[(void *)"default_locale" + 2B];
            D.7358 = *D.7357;
            D.7359 = (int) D.7358;
            D.7360 = __s2 + 2;
            D.7361 = *D.7360;
            D.7362 = (int) D.7361;
            __result = D.7359 - D.7362;
            D.7363 = __s2_len > 2;
            D.7343 = __result == 0;
            D.7364 = D.7363 & D.7343;
            if (D.7364 != 0) goto <D.7365>; else goto <D.7366>;
            <D.7365>:
            D.7367 = &MEM[(void *)"default_locale" + 3B];
            D.7368 = *D.7367;
            D.7369 = (int) D.7368;
            D.7370 = __s2 + 3;
            D.7371 = *D.7370;
            D.7372 = (int) D.7371;
            __result = D.7369 - D.7372;
            <D.7366>:
            <D.7356>:
            <D.7346>:
          }
          D.7222 = __result;
        }
        iftmp.0 = -D.7222;
        goto <D.7373>;
        <D.7333>:
        i.1 = (unsigned int) i;
        D.7335 = i.1 * 4;
        D.7336 = encodings + D.7335;
        D.7374 = *D.7336;
        iftmp.0 = __builtin_strcmp (D.7374, "default_locale");
        <D.7373>:
        D.7223 = iftmp.0;
      }
      if (D.7223 == 0) goto <D.7375>; else goto <D.7376>;
      <D.7375>:
      {
        gchar * utf8;

        utf8 = monoeg_g_locale_to_utf8 (in, -1, 0B, 0B, 0B);
        if (utf8 != 0B) goto <D.7377>; else goto <D.7378>;
        <D.7377>:
        res = monoeg_g_utf8_to_utf16 (utf8, -1, 0B, &lbytes, 0B);
        lbytes.2 = lbytes;
        lbytes.3 = (unsigned int) lbytes.2;
        *bytes = lbytes.3;
        <D.7378>:
        monoeg_g_free (utf8);
      }
      goto <D.7381>;
      <D.7376>:
      D.7382 = strlen (in);
      D.7383 = (int) D.7382;
      i.1 = (unsigned int) i;
      D.7335 = i.1 * 4;
      D.7336 = encodings + D.7335;
      D.7374 = *D.7336;
      res = monoeg_g_convert (in, D.7383, "UTF8", D.7374, 0B, bytes, 0B);
      if (res != 0B) goto <D.7384>; else goto <D.7385>;
      <D.7384>:
      {
        gchar * ptr;

        ptr = res;
        res = monoeg_g_utf8_to_utf16 (res, -1, 0B, &lbytes, 0B);
        lbytes.2 = lbytes;
        lbytes.3 = (unsigned int) lbytes.2;
        *bytes = lbytes.3;
        monoeg_g_free (ptr);
      }
      <D.7385>:
      <D.7381>:
      if (res != 0B) goto <D.7386>; else goto <D.7387>;
      <D.7386>:
      monoeg_g_strfreev (encodings);
      D.7388 = *bytes;
      D.7389 = D.7388 * 2;
      *bytes = D.7389;
      D.7328 = res;
      return D.7328;
      <D.7387>:
      i = i + 1;
      <D.7227>:
      i.1 = (unsigned int) i;
      D.7335 = i.1 * 4;
      D.7336 = encodings + D.7335;
      D.7374 = *D.7336;
      if (D.7374 != 0B) goto <D.7226>; else goto <D.7228>;
      <D.7228>:
      monoeg_g_strfreev (encodings);
      D.7390 = monoeg_g_utf8_validate (in, -1, 0B);
      if (D.7390 != 0) goto <D.7391>; else goto <D.7392>;
      <D.7391>:
      {
        gunichar2 * unires;

        unires = monoeg_g_utf8_to_utf16 (in, -1, 0B, bytes, 0B);
        D.7388 = *bytes;
        D.7389 = D.7388 * 2;
        *bytes = D.7389;
        D.7328 = unires;
        return D.7328;
      }
      <D.7392>:
      D.7328 = 0B;
      return D.7328;
    }
  finally
    {
      lbytes = {CLOBBER};
    }
}


mono_utf8_from_external (const gchar * in)
{
  gchar * D.7397;
  int D.7245;
  int iftmp.4;
  int D.7244;
  unsigned int i.5;
  unsigned int D.7404;
  gchar * * D.7405;
  const char[15] * D.7406;
  unsigned char D.7407;
  int D.7408;
  unsigned char D.7409;
  int D.7410;
  _Bool D.7411;
  _Bool D.7412;
  _Bool D.7413;
  const unsigned char * D.7416;
  unsigned char D.7417;
  int D.7418;
  const unsigned char * D.7419;
  unsigned char D.7420;
  int D.7421;
  _Bool D.7422;
  _Bool D.7423;
  const unsigned char * D.7426;
  unsigned char D.7427;
  int D.7428;
  const unsigned char * D.7429;
  unsigned char D.7430;
  int D.7431;
  _Bool D.7432;
  _Bool D.7433;
  const unsigned char * D.7436;
  unsigned char D.7437;
  int D.7438;
  const unsigned char * D.7439;
  unsigned char D.7440;
  int D.7441;
  gchar * D.7443;
  int D.7448;
  int D.7454;
  gchar * res;
  gchar * * encodings;
  const gchar * encoding_list;
  int i;

  res = 0B;
  if (in == 0B) goto <D.7395>; else goto <D.7396>;
  <D.7395>:
  D.7397 = 0B;
  return D.7397;
  <D.7396>:
  encoding_list = monoeg_g_getenv ("MONO_EXTERNAL_ENCODINGS");
  if (encoding_list == 0B) goto <D.7398>; else goto <D.7399>;
  <D.7398>:
  encoding_list = "";
  <D.7399>:
  encodings = monoeg_g_strsplit (encoding_list, ":", 0);
  i = 0;
  goto <D.7247>;
  <D.7246>:
  {
    size_t __s1_len;
    size_t __s2_len;

    __s2_len = 14;
    if (__s2_len <= 3) goto <D.7401>; else goto <D.7402>;
    <D.7401>:
    {
      const unsigned char * __s2;
      int __result;

      i.5 = (unsigned int) i;
      D.7404 = i.5 * 4;
      D.7405 = encodings + D.7404;
      __s2 = *D.7405;
      D.7406 = "default_locale";
      D.7407 = MEM[(const unsigned char *)D.7406];
      D.7408 = (int) D.7407;
      D.7409 = *__s2;
      D.7410 = (int) D.7409;
      __result = D.7408 - D.7410;
      {
        D.7411 = __s2_len != 0;
        D.7412 = __result == 0;
        D.7413 = D.7411 & D.7412;
        if (D.7413 != 0) goto <D.7414>; else goto <D.7415>;
        <D.7414>:
        D.7416 = &MEM[(void *)"default_locale" + 1B];
        D.7417 = *D.7416;
        D.7418 = (int) D.7417;
        D.7419 = __s2 + 1;
        D.7420 = *D.7419;
        D.7421 = (int) D.7420;
        __result = D.7418 - D.7421;
        D.7422 = __s2_len > 1;
        D.7412 = __result == 0;
        D.7423 = D.7422 & D.7412;
        if (D.7423 != 0) goto <D.7424>; else goto <D.7425>;
        <D.7424>:
        D.7426 = &MEM[(void *)"default_locale" + 2B];
        D.7427 = *D.7426;
        D.7428 = (int) D.7427;
        D.7429 = __s2 + 2;
        D.7430 = *D.7429;
        D.7431 = (int) D.7430;
        __result = D.7428 - D.7431;
        D.7432 = __s2_len > 2;
        D.7412 = __result == 0;
        D.7433 = D.7432 & D.7412;
        if (D.7433 != 0) goto <D.7434>; else goto <D.7435>;
        <D.7434>:
        D.7436 = &MEM[(void *)"default_locale" + 3B];
        D.7437 = *D.7436;
        D.7438 = (int) D.7437;
        D.7439 = __s2 + 3;
        D.7440 = *D.7439;
        D.7441 = (int) D.7440;
        __result = D.7438 - D.7441;
        <D.7435>:
        <D.7425>:
        <D.7415>:
      }
      D.7244 = __result;
    }
    iftmp.4 = -D.7244;
    goto <D.7442>;
    <D.7402>:
    i.5 = (unsigned int) i;
    D.7404 = i.5 * 4;
    D.7405 = encodings + D.7404;
    D.7443 = *D.7405;
    iftmp.4 = __builtin_strcmp (D.7443, "default_locale");
    <D.7442>:
    D.7245 = iftmp.4;
  }
  if (D.7245 == 0) goto <D.7444>; else goto <D.7445>;
  <D.7444>:
  res = monoeg_g_locale_to_utf8 (in, -1, 0B, 0B, 0B);
  if (res != 0B) goto <D.7446>; else goto <D.7447>;
  <D.7446>:
  D.7448 = monoeg_g_utf8_validate (res, -1, 0B);
  if (D.7448 == 0) goto <D.7449>; else goto <D.7450>;
  <D.7449>:
  monoeg_g_free (res);
  res = 0B;
  <D.7450>:
  <D.7447>:
  goto <D.7451>;
  <D.7445>:
  i.5 = (unsigned int) i;
  D.7404 = i.5 * 4;
  D.7405 = encodings + D.7404;
  D.7443 = *D.7405;
  res = monoeg_g_convert (in, -1, "UTF8", D.7443, 0B, 0B, 0B);
  <D.7451>:
  if (res != 0B) goto <D.7452>; else goto <D.7453>;
  <D.7452>:
  monoeg_g_strfreev (encodings);
  D.7397 = res;
  return D.7397;
  <D.7453>:
  i = i + 1;
  <D.7247>:
  i.5 = (unsigned int) i;
  D.7404 = i.5 * 4;
  D.7405 = encodings + D.7404;
  D.7443 = *D.7405;
  if (D.7443 != 0B) goto <D.7246>; else goto <D.7248>;
  <D.7248>:
  monoeg_g_strfreev (encodings);
  D.7454 = monoeg_g_utf8_validate (in, -1, 0B);
  if (D.7454 != 0) goto <D.7455>; else goto <D.7456>;
  <D.7455>:
  D.7397 = monoeg_strdup (in);
  return D.7397;
  <D.7456>:
  D.7397 = 0B;
  return D.7397;
}


monoeg_strdup (const gchar * str)
{
  gchar * D.7460;

  if (str != 0B) goto <D.7458>; else goto <D.7459>;
  <D.7458>:
  D.7460 = __strdup (str);
  return D.7460;
  <D.7459>:
  D.7460 = 0B;
  return D.7460;
}


mono_unicode_to_external (const gunichar2 * uni)
{
  _Bool D.7462;
  long int D.7463;
  long int D.7464;
  gchar * D.7469;
  int D.7265;
  int iftmp.6;
  int D.7264;
  unsigned int i.7;
  unsigned int D.7474;
  gchar * * D.7475;
  const char[15] * D.7476;
  unsigned char D.7477;
  int D.7478;
  unsigned char D.7479;
  int D.7480;
  _Bool D.7481;
  _Bool D.7482;
  _Bool D.7483;
  const unsigned char * D.7486;
  unsigned char D.7487;
  int D.7488;
  const unsigned char * D.7489;
  unsigned char D.7490;
  int D.7491;
  _Bool D.7492;
  _Bool D.7493;
  const unsigned char * D.7496;
  unsigned char D.7497;
  int D.7498;
  const unsigned char * D.7499;
  unsigned char D.7500;
  int D.7501;
  _Bool D.7502;
  _Bool D.7503;
  const unsigned char * D.7506;
  unsigned char D.7507;
  int D.7508;
  const unsigned char * D.7509;
  unsigned char D.7510;
  int D.7511;
  gchar * D.7513;
  gchar * utf8;
  const gchar * encoding_list;

  utf8 = monoeg_g_utf16_to_utf8 (uni, -1, 0B, 0B, 0B);
  D.7462 = utf8 == 0B;
  D.7463 = (long int) D.7462;
  D.7464 = __builtin_expect (D.7463, 0);
  if (D.7464 != 0) goto <D.7465>; else goto <D.7466>;
  <D.7465>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "strenc.c", 183, "utf8!=NULL");
  <D.7466>:
  encoding_list = monoeg_g_getenv ("MONO_EXTERNAL_ENCODINGS");
  if (encoding_list == 0B) goto <D.7467>; else goto <D.7468>;
  <D.7467>:
  D.7469 = utf8;
  return D.7469;
  <D.7468>:
  {
    gchar * res;
    gchar * * encodings;
    int i;

    encodings = monoeg_g_strsplit (encoding_list, ":", 0);
    i = 0;
    goto <D.7267>;
    <D.7266>:
    {
      size_t __s1_len;
      size_t __s2_len;

      __s2_len = 14;
      if (__s2_len <= 3) goto <D.7471>; else goto <D.7472>;
      <D.7471>:
      {
        const unsigned char * __s2;
        int __result;

        i.7 = (unsigned int) i;
        D.7474 = i.7 * 4;
        D.7475 = encodings + D.7474;
        __s2 = *D.7475;
        D.7476 = "default_locale";
        D.7477 = MEM[(const unsigned char *)D.7476];
        D.7478 = (int) D.7477;
        D.7479 = *__s2;
        D.7480 = (int) D.7479;
        __result = D.7478 - D.7480;
        {
          D.7481 = __s2_len != 0;
          D.7482 = __result == 0;
          D.7483 = D.7481 & D.7482;
          if (D.7483 != 0) goto <D.7484>; else goto <D.7485>;
          <D.7484>:
          D.7486 = &MEM[(void *)"default_locale" + 1B];
          D.7487 = *D.7486;
          D.7488 = (int) D.7487;
          D.7489 = __s2 + 1;
          D.7490 = *D.7489;
          D.7491 = (int) D.7490;
          __result = D.7488 - D.7491;
          D.7492 = __s2_len > 1;
          D.7482 = __result == 0;
          D.7493 = D.7492 & D.7482;
          if (D.7493 != 0) goto <D.7494>; else goto <D.7495>;
          <D.7494>:
          D.7496 = &MEM[(void *)"default_locale" + 2B];
          D.7497 = *D.7496;
          D.7498 = (int) D.7497;
          D.7499 = __s2 + 2;
          D.7500 = *D.7499;
          D.7501 = (int) D.7500;
          __result = D.7498 - D.7501;
          D.7502 = __s2_len > 2;
          D.7482 = __result == 0;
          D.7503 = D.7502 & D.7482;
          if (D.7503 != 0) goto <D.7504>; else goto <D.7505>;
          <D.7504>:
          D.7506 = &MEM[(void *)"default_locale" + 3B];
          D.7507 = *D.7506;
          D.7508 = (int) D.7507;
          D.7509 = __s2 + 3;
          D.7510 = *D.7509;
          D.7511 = (int) D.7510;
          __result = D.7508 - D.7511;
          <D.7505>:
          <D.7495>:
          <D.7485>:
        }
        D.7264 = __result;
      }
      iftmp.6 = -D.7264;
      goto <D.7512>;
      <D.7472>:
      i.7 = (unsigned int) i;
      D.7474 = i.7 * 4;
      D.7475 = encodings + D.7474;
      D.7513 = *D.7475;
      iftmp.6 = __builtin_strcmp (D.7513, "default_locale");
      <D.7512>:
      D.7265 = iftmp.6;
    }
    if (D.7265 == 0) goto <D.7514>; else goto <D.7515>;
    <D.7514>:
    res = monoeg_g_locale_from_utf8 (utf8, -1, 0B, 0B, 0B);
    goto <D.7516>;
    <D.7515>:
    i.7 = (unsigned int) i;
    D.7474 = i.7 * 4;
    D.7475 = encodings + D.7474;
    D.7513 = *D.7475;
    res = monoeg_g_convert (utf8, -1, D.7513, "UTF8", 0B, 0B, 0B);
    <D.7516>:
    if (res != 0B) goto <D.7517>; else goto <D.7518>;
    <D.7517>:
    monoeg_g_free (utf8);
    monoeg_g_strfreev (encodings);
    D.7469 = res;
    return D.7469;
    <D.7518>:
    i = i + 1;
    <D.7267>:
    i.7 = (unsigned int) i;
    D.7474 = i.7 * 4;
    D.7475 = encodings + D.7474;
    D.7513 = *D.7475;
    if (D.7513 != 0B) goto <D.7266>; else goto <D.7268>;
    <D.7268>:
    monoeg_g_strfreev (encodings);
  }
  D.7469 = utf8;
  return D.7469;
}


mono_utf8_validate_and_len (const gchar * source, glong * oLength, const gchar * * oEnd)
{
  unsigned char D.7520;
  int D.7521;
  char D.7522;
  int D.7523;
  int D.7524;
  signed char a.8;
  unsigned char D.7529;
  guchar * D.7532;
  unsigned char D.7533;
  guchar * D.7538;
  unsigned char D.7539;
  _Bool D.7540;
  _Bool D.7541;
  _Bool D.7542;
  unsigned char D.7544;
  guchar * D.7558;
  unsigned char D.7559;
  unsigned char D.7560;
  unsigned char D.7565;
  unsigned char D.7574;
  _Bool D.7579;
  _Bool D.7580;
  _Bool D.7581;
  long int D.7586;
  long int D.7587;
  _Bool D.7588;
  _Bool D.7589;
  _Bool D.7590;
  gboolean D.7593;
  gboolean retVal;
  gboolean lastRet;
  guchar * ptr;
  guchar * srcPtr;
  guint length;
  guchar a;

  retVal = 1;
  lastRet = 1;
  ptr = source;
  *oLength = 0;
  goto <D.7293>;
  <D.7292>:
  D.7520 = *ptr;
  D.7521 = (int) D.7520;
  D.7522 = trailingBytesForUTF8[D.7521];
  D.7523 = (int) D.7522;
  D.7524 = D.7523 + 1;
  length = (guint) D.7524;
  srcPtr = ptr + length;
  switch (length) <default: <D.7280>, case 1: <D.7291>, case 2: <D.7283>, case 3: <D.7282>, case 4: <D.7281>>
  <D.7280>:
  retVal = 0;
  <D.7281>:
  srcPtr = srcPtr + 4294967295;
  a = *srcPtr;
  a.8 = (signed char) a;
  if (a.8 >= 0) goto <D.7525>; else goto <D.7528>;
  <D.7528>:
  if (a > 191) goto <D.7525>; else goto <D.7526>;
  <D.7525>:
  retVal = 0;
  <D.7526>:
  D.7529 = a + 66;
  if (D.7529 <= 1) goto <D.7530>; else goto <D.7531>;
  <D.7530>:
  D.7532 = srcPtr + 4294967295;
  D.7533 = *D.7532;
  if (D.7533 == 191) goto <D.7534>; else goto <D.7535>;
  <D.7534>:
  D.7538 = srcPtr + 4294967294;
  D.7539 = *D.7538;
  D.7540 = D.7539 == 143;
  D.7541 = D.7539 == 159;
  D.7542 = D.7540 | D.7541;
  if (D.7542 != 0) goto <D.7536>; else goto <D.7543>;
  <D.7543>:
  D.7538 = srcPtr + 4294967294;
  D.7544 = *D.7538;
  if (D.7544 == 175) goto <D.7536>; else goto <D.7545>;
  <D.7545>:
  D.7538 = srcPtr + 4294967294;
  D.7544 = *D.7538;
  if (D.7544 == 191) goto <D.7536>; else goto <D.7537>;
  <D.7536>:
  retVal = 0;
  <D.7537>:
  <D.7535>:
  <D.7531>:
  <D.7282>:
  srcPtr = srcPtr + 4294967295;
  a = *srcPtr;
  a.8 = (signed char) a;
  if (a.8 >= 0) goto <D.7546>; else goto <D.7548>;
  <D.7548>:
  if (a > 191) goto <D.7546>; else goto <D.7547>;
  <D.7546>:
  retVal = 0;
  <D.7547>:
  <D.7283>:
  srcPtr = srcPtr + 4294967295;
  a = *srcPtr;
  a.8 = (signed char) a;
  if (a.8 >= 0) goto <D.7549>; else goto <D.7551>;
  <D.7551>:
  if (a > 191) goto <D.7549>; else goto <D.7550>;
  <D.7549>:
  retVal = 0;
  <D.7550>:
  D.7520 = *ptr;
  D.7521 = (int) D.7520;
  switch (D.7521) <default: <D.7290>, case 224: <D.7284>, case 237: <D.7286>, case 239: <D.7287>, case 240: <D.7288>, case 244: <D.7289>>
  <D.7284>:
  if (a <= 159) goto <D.7552>; else goto <D.7553>;
  <D.7552>:
  retVal = 0;
  <D.7553>:
  goto <D.7285>;
  <D.7286>:
  if (a > 159) goto <D.7554>; else goto <D.7555>;
  <D.7554>:
  retVal = 0;
  <D.7555>:
  goto <D.7285>;
  <D.7287>:
  if (a == 183) goto <D.7556>; else goto <D.7557>;
  <D.7556>:
  D.7558 = srcPtr + 1;
  D.7559 = *D.7558;
  D.7560 = D.7559 + 112;
  if (D.7560 <= 31) goto <D.7561>; else goto <D.7562>;
  <D.7561>:
  retVal = 0;
  <D.7562>:
  <D.7557>:
  if (a == 191) goto <D.7563>; else goto <D.7564>;
  <D.7563>:
  D.7558 = srcPtr + 1;
  D.7559 = *D.7558;
  D.7565 = D.7559 + 66;
  if (D.7565 <= 1) goto <D.7566>; else goto <D.7567>;
  <D.7566>:
  retVal = 0;
  <D.7567>:
  <D.7564>:
  goto <D.7285>;
  <D.7288>:
  if (a <= 143) goto <D.7568>; else goto <D.7569>;
  <D.7568>:
  retVal = 0;
  <D.7569>:
  goto <D.7285>;
  <D.7289>:
  if (a > 143) goto <D.7570>; else goto <D.7571>;
  <D.7570>:
  retVal = 0;
  <D.7571>:
  goto <D.7285>;
  <D.7290>:
  a.8 = (signed char) a;
  if (a.8 >= 0) goto <D.7572>; else goto <D.7573>;
  <D.7572>:
  retVal = 0;
  <D.7573>:
  <D.7285>:
  <D.7291>:
  D.7520 = *ptr;
  D.7574 = D.7520 + 128;
  if (D.7574 <= 65) goto <D.7575>; else goto <D.7576>;
  <D.7575>:
  retVal = 0;
  <D.7576>:
  D.7520 = *ptr;
  if (D.7520 > 244) goto <D.7577>; else goto <D.7578>;
  <D.7577>:
  retVal = 0;
  <D.7578>:
  D.7579 = retVal == 0;
  D.7580 = lastRet != 0;
  D.7581 = D.7579 & D.7580;
  if (D.7581 != 0) goto <D.7582>; else goto <D.7583>;
  <D.7582>:
  if (oEnd != 0B) goto <D.7584>; else goto <D.7585>;
  <D.7584>:
  *oEnd = ptr;
  <D.7585>:
  lastRet = 0;
  <D.7583>:
  ptr = ptr + length;
  D.7586 = *oLength;
  D.7587 = D.7586 + 1;
  *oLength = D.7587;
  <D.7293>:
  D.7520 = *ptr;
  if (D.7520 != 0) goto <D.7292>; else goto <D.7294>;
  <D.7294>:
  D.7588 = retVal != 0;
  D.7589 = oEnd != 0B;
  D.7590 = D.7588 & D.7589;
  if (D.7590 != 0) goto <D.7591>; else goto <D.7592>;
  <D.7591>:
  *oEnd = ptr;
  <D.7592>:
  D.7593 = retVal;
  return D.7593;
}


mono_utf8_validate_and_len_with_bounds (const gchar * source, glong max_bytes, glong * oLength, const gchar * * oEnd)
{
  sizetype max_bytes.9;
  gboolean D.7600;
  unsigned char D.7601;
  int D.7602;
  char D.7603;
  int D.7604;
  int D.7605;
  signed char a.10;
  unsigned char D.7612;
  guchar * D.7615;
  unsigned char D.7616;
  guchar * D.7621;
  unsigned char D.7622;
  _Bool D.7623;
  _Bool D.7624;
  _Bool D.7625;
  unsigned char D.7627;
  guchar * D.7641;
  unsigned char D.7642;
  unsigned char D.7643;
  unsigned char D.7648;
  unsigned char D.7657;
  _Bool D.7662;
  _Bool D.7663;
  _Bool D.7664;
  long int D.7669;
  long int D.7670;
  _Bool D.7671;
  _Bool D.7672;
  _Bool D.7673;
  gboolean retVal;
  gboolean lastRet;
  guchar * ptr;
  guchar * end;
  guchar * srcPtr;
  guint length;
  guchar a;

  retVal = 1;
  lastRet = 1;
  ptr = source;
  max_bytes.9 = (sizetype) max_bytes;
  end = ptr + max_bytes.9;
  *oLength = 0;
  if (max_bytes <= 0) goto <D.7596>; else goto <D.7597>;
  <D.7596>:
  if (oEnd != 0B) goto <D.7598>; else goto <D.7599>;
  <D.7598>:
  *oEnd = ptr;
  <D.7599>:
  D.7600 = 0;
  return D.7600;
  <D.7597>:
  goto <D.7322>;
  <D.7321>:
  D.7601 = *ptr;
  D.7602 = (int) D.7601;
  D.7603 = trailingBytesForUTF8[D.7602];
  D.7604 = (int) D.7603;
  D.7605 = D.7604 + 1;
  length = (guint) D.7605;
  srcPtr = ptr + length;
  if (srcPtr >= end) goto <D.7606>; else goto <D.7607>;
  <D.7606>:
  retVal = 0;
  goto <D.7308>;
  <D.7607>:
  switch (length) <default: <D.7309>, case 1: <D.7320>, case 2: <D.7312>, case 3: <D.7311>, case 4: <D.7310>>
  <D.7309>:
  retVal = 0;
  <D.7310>:
  srcPtr = srcPtr + 4294967295;
  a = *srcPtr;
  a.10 = (signed char) a;
  if (a.10 >= 0) goto <D.7608>; else goto <D.7611>;
  <D.7611>:
  if (a > 191) goto <D.7608>; else goto <D.7609>;
  <D.7608>:
  retVal = 0;
  <D.7609>:
  D.7612 = a + 66;
  if (D.7612 <= 1) goto <D.7613>; else goto <D.7614>;
  <D.7613>:
  D.7615 = srcPtr + 4294967295;
  D.7616 = *D.7615;
  if (D.7616 == 191) goto <D.7617>; else goto <D.7618>;
  <D.7617>:
  D.7621 = srcPtr + 4294967294;
  D.7622 = *D.7621;
  D.7623 = D.7622 == 143;
  D.7624 = D.7622 == 159;
  D.7625 = D.7623 | D.7624;
  if (D.7625 != 0) goto <D.7619>; else goto <D.7626>;
  <D.7626>:
  D.7621 = srcPtr + 4294967294;
  D.7627 = *D.7621;
  if (D.7627 == 175) goto <D.7619>; else goto <D.7628>;
  <D.7628>:
  D.7621 = srcPtr + 4294967294;
  D.7627 = *D.7621;
  if (D.7627 == 191) goto <D.7619>; else goto <D.7620>;
  <D.7619>:
  retVal = 0;
  <D.7620>:
  <D.7618>:
  <D.7614>:
  <D.7311>:
  srcPtr = srcPtr + 4294967295;
  a = *srcPtr;
  a.10 = (signed char) a;
  if (a.10 >= 0) goto <D.7629>; else goto <D.7631>;
  <D.7631>:
  if (a > 191) goto <D.7629>; else goto <D.7630>;
  <D.7629>:
  retVal = 0;
  <D.7630>:
  <D.7312>:
  srcPtr = srcPtr + 4294967295;
  a = *srcPtr;
  a.10 = (signed char) a;
  if (a.10 >= 0) goto <D.7632>; else goto <D.7634>;
  <D.7634>:
  if (a > 191) goto <D.7632>; else goto <D.7633>;
  <D.7632>:
  retVal = 0;
  <D.7633>:
  D.7601 = *ptr;
  D.7602 = (int) D.7601;
  switch (D.7602) <default: <D.7319>, case 224: <D.7313>, case 237: <D.7315>, case 239: <D.7316>, case 240: <D.7317>, case 244: <D.7318>>
  <D.7313>:
  if (a <= 159) goto <D.7635>; else goto <D.7636>;
  <D.7635>:
  retVal = 0;
  <D.7636>:
  goto <D.7314>;
  <D.7315>:
  if (a > 159) goto <D.7637>; else goto <D.7638>;
  <D.7637>:
  retVal = 0;
  <D.7638>:
  goto <D.7314>;
  <D.7316>:
  if (a == 183) goto <D.7639>; else goto <D.7640>;
  <D.7639>:
  D.7641 = srcPtr + 1;
  D.7642 = *D.7641;
  D.7643 = D.7642 + 112;
  if (D.7643 <= 31) goto <D.7644>; else goto <D.7645>;
  <D.7644>:
  retVal = 0;
  <D.7645>:
  <D.7640>:
  if (a == 191) goto <D.7646>; else goto <D.7647>;
  <D.7646>:
  D.7641 = srcPtr + 1;
  D.7642 = *D.7641;
  D.7648 = D.7642 + 66;
  if (D.7648 <= 1) goto <D.7649>; else goto <D.7650>;
  <D.7649>:
  retVal = 0;
  <D.7650>:
  <D.7647>:
  goto <D.7314>;
  <D.7317>:
  if (a <= 143) goto <D.7651>; else goto <D.7652>;
  <D.7651>:
  retVal = 0;
  <D.7652>:
  goto <D.7314>;
  <D.7318>:
  if (a > 143) goto <D.7653>; else goto <D.7654>;
  <D.7653>:
  retVal = 0;
  <D.7654>:
  goto <D.7314>;
  <D.7319>:
  a.10 = (signed char) a;
  if (a.10 >= 0) goto <D.7655>; else goto <D.7656>;
  <D.7655>:
  retVal = 0;
  <D.7656>:
  <D.7314>:
  <D.7320>:
  D.7601 = *ptr;
  D.7657 = D.7601 + 128;
  if (D.7657 <= 65) goto <D.7658>; else goto <D.7659>;
  <D.7658>:
  retVal = 0;
  <D.7659>:
  D.7601 = *ptr;
  if (D.7601 > 244) goto <D.7660>; else goto <D.7661>;
  <D.7660>:
  retVal = 0;
  <D.7661>:
  D.7662 = retVal == 0;
  D.7663 = lastRet != 0;
  D.7664 = D.7662 & D.7663;
  if (D.7664 != 0) goto <D.7665>; else goto <D.7666>;
  <D.7665>:
  if (oEnd != 0B) goto <D.7667>; else goto <D.7668>;
  <D.7667>:
  *oEnd = ptr;
  <D.7668>:
  lastRet = 0;
  <D.7666>:
  ptr = ptr + length;
  D.7669 = *oLength;
  D.7670 = D.7669 + 1;
  *oLength = D.7670;
  <D.7322>:
  D.7601 = *ptr;
  if (D.7601 != 0) goto <D.7321>; else goto <D.7308>;
  <D.7308>:
  D.7671 = retVal != 0;
  D.7672 = oEnd != 0B;
  D.7673 = D.7671 & D.7672;
  if (D.7673 != 0) goto <D.7674>; else goto <D.7675>;
  <D.7674>:
  *oEnd = ptr;
  <D.7675>:
  D.7600 = retVal;
  return D.7600;
}


