mono_portability_helpers_init ()
{
  int __mono_io_portability_helpers.0;
  unsigned int i.1;
  unsigned int D.16452;
  gchar * * D.16453;
  gchar * D.16454;
  int D.16455;
  int __mono_io_portability_helpers.2;
  int D.16460;
  int __mono_io_portability_helpers.3;
  int D.16465;
  int __mono_io_portability_helpers.4;
  const gchar * env;

  __mono_io_portability_helpers.0 = __mono_io_portability_helpers;
  if (__mono_io_portability_helpers.0 != 1) goto <D.16445>; else goto <D.16446>;
  <D.16445>:
  return;
  <D.16446>:
  __mono_io_portability_helpers = 0;
  env = monoeg_g_getenv ("MONO_IOMAP");
  if (env != 0B) goto <D.16447>; else goto <D.16448>;
  <D.16447>:
  {
    gchar * * options;
    int i;

    options = monoeg_g_strsplit (env, ":", 0);
    if (options == 0B) goto <D.16449>; else goto <D.16450>;
    <D.16449>:
    return;
    <D.16450>:
    i = 0;
    goto <D.16360>;
    <D.16359>:
    i.1 = (unsigned int) i;
    D.16452 = i.1 * 4;
    D.16453 = options + D.16452;
    D.16454 = *D.16453;
    D.16455 = strncasecmp (D.16454, "drive", 5);
    if (D.16455 == 0) goto <D.16456>; else goto <D.16457>;
    <D.16456>:
    __mono_io_portability_helpers.0 = __mono_io_portability_helpers;
    __mono_io_portability_helpers.2 = __mono_io_portability_helpers.0 | 2;
    __mono_io_portability_helpers = __mono_io_portability_helpers.2;
    goto <D.16459>;
    <D.16457>:
    i.1 = (unsigned int) i;
    D.16452 = i.1 * 4;
    D.16453 = options + D.16452;
    D.16454 = *D.16453;
    D.16460 = strncasecmp (D.16454, "case", 4);
    if (D.16460 == 0) goto <D.16461>; else goto <D.16462>;
    <D.16461>:
    __mono_io_portability_helpers.0 = __mono_io_portability_helpers;
    __mono_io_portability_helpers.3 = __mono_io_portability_helpers.0 | 4;
    __mono_io_portability_helpers = __mono_io_portability_helpers.3;
    goto <D.16464>;
    <D.16462>:
    i.1 = (unsigned int) i;
    D.16452 = i.1 * 4;
    D.16453 = options + D.16452;
    D.16454 = *D.16453;
    D.16465 = strncasecmp (D.16454, "all", 3);
    if (D.16465 == 0) goto <D.16466>; else goto <D.16467>;
    <D.16466>:
    __mono_io_portability_helpers.0 = __mono_io_portability_helpers;
    __mono_io_portability_helpers.4 = __mono_io_portability_helpers.0 | 6;
    __mono_io_portability_helpers = __mono_io_portability_helpers.4;
    <D.16467>:
    <D.16464>:
    <D.16459>:
    i = i + 1;
    <D.16360>:
    i.1 = (unsigned int) i;
    D.16452 = i.1 * 4;
    D.16453 = options + D.16452;
    D.16454 = *D.16453;
    if (D.16454 != 0B) goto <D.16359>; else goto <D.16361>;
    <D.16361>:
  }
  <D.16448>:
}


mono_portability_find_file (const gchar * pathname, gboolean last_exists)
{
  char D.16473;
  gchar * D.16474;
  struct GString * report.5;
  struct GString * report;
  gchar * ret;

  try
    {
      report = 0B;
      if (pathname == 0B) goto <D.16470>; else goto <D.16472>;
      <D.16472>:
      D.16473 = *pathname;
      if (D.16473 == 0) goto <D.16470>; else goto <D.16471>;
      <D.16470>:
      D.16474 = 0B;
      return D.16474;
      <D.16471>:
      ret = mono_portability_find_file_internal (&report, pathname, last_exists);
      report.5 = report;
      if (report.5 != 0B) goto <D.16476>; else goto <D.16477>;
      <D.16476>:
      report.5 = report;
      monoeg_g_string_free (report.5, 1);
      <D.16477>:
      D.16474 = ret;
      return D.16474;
    }
  finally
    {
      report = {CLOBBER};
    }
}


mono_portability_find_file_internal (struct GString * * report, const gchar * pathname, gboolean last_exists)
{
  <unnamed type> D.16480;
  unsigned int D.16481;
  _Bool D.16482;
  gchar * D.16485;
  int D.16490;
  int __mono_io_portability_helpers.6;
  int D.16494;
  const short unsigned int * * D.16497;
  const short unsigned int * D.16498;
  char D.16499;
  unsigned int D.16500;
  unsigned int D.16501;
  const short unsigned int * D.16502;
  short unsigned int D.16503;
  int D.16504;
  int D.16505;
  gchar * D.16508;
  char D.16509;
  unsigned int D.16512;
  const void * D.16513;
  int D.16514;
  unsigned int D.16515;
  sizetype len.7;
  sizetype D.16517;
  gchar * D.16518;
  sizetype D.16523;
  gchar * D.16524;
  char D.16525;
  int D.16530;
  int D.16537;
  unsigned int num_components.8;
  unsigned int D.16543;
  gchar * * D.16544;
  gchar * D.16545;
  int D.16548;
  unsigned int D.16549;
  unsigned int D.16550;
  int D.16415;
  int iftmp.9;
  int D.16414;
  const char[1] * D.16556;
  unsigned char D.16557;
  int D.16558;
  unsigned char D.16559;
  int D.16560;
  const unsigned char * D.16565;
  unsigned char D.16566;
  int D.16567;
  const unsigned char * D.16568;
  unsigned char D.16569;
  int D.16570;
  const unsigned char * D.16575;
  unsigned char D.16576;
  int D.16577;
  const unsigned char * D.16578;
  unsigned char D.16579;
  int D.16580;
  const unsigned char * D.16585;
  unsigned char D.16586;
  int D.16587;
  const unsigned char * D.16588;
  unsigned char D.16589;
  int D.16590;
  gchar * D.16592;
  unsigned char D.16593;
  int component.10;
  unsigned int component.11;
  unsigned int D.16600;
  gchar * * D.16601;
  gchar * D.16602;
  int component.12;
  unsigned int component.13;
  unsigned int D.16612;
  gchar * * D.16613;
  int D.16426;
  int iftmp.14;
  int D.16425;
  unsigned char D.16620;
  int D.16621;
  const unsigned char * D.16626;
  unsigned char D.16627;
  int D.16628;
  const unsigned char * D.16633;
  unsigned char D.16634;
  int D.16635;
  const unsigned char * D.16640;
  unsigned char D.16641;
  int D.16642;
  int component.15;
  unsigned int component.16;
  unsigned int D.16648;
  gchar * * D.16649;
  gchar * D.16650;
  int component.17;
  unsigned int component.18;
  unsigned int D.16658;
  gchar * * D.16659;
  int component.19;
  unsigned int component.20;
  unsigned int D.16663;
  gchar * * D.16664;
  gchar * D.16665;
  _Bool D.16666;
  long int D.16667;
  long int D.16668;
  int D.16674;
  unsigned int component.21;
  unsigned int D.16677;
  gchar * * D.16678;
  gchar * D.16679;
  gchar * * D.16682;
  int D.16691;
  int D.16442;
  gchar * new_pathname;
  gchar * * components;
  gchar * * new_components;
  int num_components;
  int component;
  struct DIR * scanning;
  size_t len;
  gboolean drive_stripped;
  gboolean do_report;

  num_components = 0;
  component = 0;
  scanning = 0B;
  drive_stripped = 0;
  D.16480 = mono_profiler_get_events ();
  D.16481 = D.16480 & 262144;
  D.16482 = D.16481 != 0;
  do_report = (gboolean) D.16482;
  if (0 != 0) goto <D.16483>; else goto <D.16484>;
  <D.16483>:
  D.16485 = 0B;
  return D.16485;
  <D.16484>:
  if (do_report != 0) goto <D.16486>; else goto <D.16487>;
  <D.16486>:
  append_report (report, " - Requested file path: \'%s\'\n", pathname);
  <D.16487>:
  new_pathname = monoeg_strdup (pathname);
  if (last_exists != 0) goto <D.16488>; else goto <D.16489>;
  <D.16488>:
  D.16490 = access (new_pathname, 0);
  if (D.16490 == 0) goto <D.16491>; else goto <D.16492>;
  <D.16491>:
  D.16485 = new_pathname;
  return D.16485;
  <D.16492>:
  <D.16489>:
  monoeg_g_strdelimit (new_pathname, "\\", 47);
  __mono_io_portability_helpers.6 = __mono_io_portability_helpers;
  D.16494 = __mono_io_portability_helpers.6 & 2;
  if (D.16494 != 0) goto <D.16495>; else goto <D.16496>;
  <D.16495>:
  D.16497 = __ctype_b_loc ();
  D.16498 = *D.16497;
  D.16499 = *new_pathname;
  D.16500 = (unsigned int) D.16499;
  D.16501 = D.16500 * 2;
  D.16502 = D.16498 + D.16501;
  D.16503 = *D.16502;
  D.16504 = (int) D.16503;
  D.16505 = D.16504 & 1024;
  if (D.16505 != 0) goto <D.16506>; else goto <D.16507>;
  <D.16506>:
  D.16508 = new_pathname + 1;
  D.16509 = *D.16508;
  if (D.16509 == 58) goto <D.16510>; else goto <D.16511>;
  <D.16510>:
  {
    int len;

    D.16512 = strlen (new_pathname);
    len = (int) D.16512;
    D.16513 = new_pathname + 2;
    D.16514 = len + -2;
    D.16515 = (unsigned int) D.16514;
    memmove (new_pathname, D.16513, D.16515);
    len.7 = (sizetype) len;
    D.16517 = len.7 + 4294967294;
    D.16518 = new_pathname + D.16517;
    *D.16518 = 0;
    if (do_report != 0) goto <D.16519>; else goto <D.16520>;
    <D.16519>:
    append_report (report, " - Stripped drive letter.\n");
    drive_stripped = 1;
    <D.16520>:
  }
  <D.16511>:
  <D.16507>:
  <D.16496>:
  len = strlen (new_pathname);
  if (len > 1) goto <D.16521>; else goto <D.16522>;
  <D.16521>:
  D.16523 = len + 4294967295;
  D.16524 = new_pathname + D.16523;
  D.16525 = *D.16524;
  if (D.16525 == 47) goto <D.16526>; else goto <D.16527>;
  <D.16526>:
  D.16523 = len + 4294967295;
  D.16524 = new_pathname + D.16523;
  *D.16524 = 0;
  <D.16527>:
  <D.16522>:
  if (last_exists != 0) goto <D.16528>; else goto <D.16529>;
  <D.16528>:
  D.16530 = access (new_pathname, 0);
  if (D.16530 == 0) goto <D.16531>; else goto <D.16532>;
  <D.16531>:
  if (do_report != 0) goto <D.16533>; else goto <D.16534>;
  <D.16533>:
  if (drive_stripped != 0) goto <D.16535>; else goto <D.16536>;
  <D.16535>:
  do_mono_profiler_iomap (report, pathname, new_pathname);
  <D.16536>:
  <D.16534>:
  D.16485 = new_pathname;
  return D.16485;
  <D.16532>:
  <D.16529>:
  __mono_io_portability_helpers.6 = __mono_io_portability_helpers;
  D.16537 = __mono_io_portability_helpers.6 & 4;
  if (D.16537 == 0) goto <D.16538>; else goto <D.16539>;
  <D.16538>:
  monoeg_g_free (new_pathname);
  D.16485 = 0B;
  return D.16485;
  <D.16539>:
  components = monoeg_g_strsplit (new_pathname, "/", 0);
  if (components == 0B) goto <D.16540>; else goto <D.16541>;
  <D.16540>:
  monoeg_g_free (new_pathname);
  D.16485 = 0B;
  return D.16485;
  <D.16541>:
  goto <D.16405>;
  <D.16404>:
  num_components = num_components + 1;
  <D.16405>:
  num_components.8 = (unsigned int) num_components;
  D.16543 = num_components.8 * 4;
  D.16544 = components + D.16543;
  D.16545 = *D.16544;
  if (D.16545 != 0B) goto <D.16404>; else goto <D.16406>;
  <D.16406>:
  monoeg_g_free (new_pathname);
  if (num_components == 0) goto <D.16546>; else goto <D.16547>;
  <D.16546>:
  D.16485 = 0B;
  return D.16485;
  <D.16547>:
  D.16548 = num_components + 1;
  D.16549 = (unsigned int) D.16548;
  D.16550 = D.16549 * 4;
  new_components = monoeg_malloc0 (D.16550);
  if (num_components > 1) goto <D.16551>; else goto <D.16552>;
  <D.16551>:
  {
    size_t __s1_len;
    size_t __s2_len;

    __s2_len = 0;
    if (__s2_len <= 3) goto <D.16554>; else goto <D.16555>;
    <D.16554>:
    {
      const unsigned char * __s2;
      int __result;

      __s2 = *components;
      D.16556 = "";
      D.16557 = MEM[(const unsigned char *)D.16556];
      D.16558 = (int) D.16557;
      D.16559 = *__s2;
      D.16560 = (int) D.16559;
      __result = D.16558 - D.16560;
      {
        if (__s2_len != 0) goto <D.16561>; else goto <D.16562>;
        <D.16561>:
        if (__result == 0) goto <D.16563>; else goto <D.16564>;
        <D.16563>:
        D.16565 = &MEM[(void *)"" + 1B];
        D.16566 = *D.16565;
        D.16567 = (int) D.16566;
        D.16568 = __s2 + 1;
        D.16569 = *D.16568;
        D.16570 = (int) D.16569;
        __result = D.16567 - D.16570;
        if (__s2_len > 1) goto <D.16571>; else goto <D.16572>;
        <D.16571>:
        if (__result == 0) goto <D.16573>; else goto <D.16574>;
        <D.16573>:
        D.16575 = &MEM[(void *)"" + 2B];
        D.16576 = *D.16575;
        D.16577 = (int) D.16576;
        D.16578 = __s2 + 2;
        D.16579 = *D.16578;
        D.16580 = (int) D.16579;
        __result = D.16577 - D.16580;
        if (__s2_len > 2) goto <D.16581>; else goto <D.16582>;
        <D.16581>:
        if (__result == 0) goto <D.16583>; else goto <D.16584>;
        <D.16583>:
        D.16585 = &MEM[(void *)"" + 3B];
        D.16586 = *D.16585;
        D.16587 = (int) D.16586;
        D.16588 = __s2 + 3;
        D.16589 = *D.16588;
        D.16590 = (int) D.16589;
        __result = D.16587 - D.16590;
        <D.16584>:
        <D.16582>:
        <D.16574>:
        <D.16572>:
        <D.16564>:
        <D.16562>:
      }
      D.16414 = __result;
    }
    iftmp.9 = -D.16414;
    goto <D.16591>;
    <D.16555>:
    D.16592 = *components;
    D.16593 = MEM[(const unsigned char * {ref-all})D.16592];
    iftmp.9 = (int) D.16593;
    <D.16591>:
    D.16415 = iftmp.9;
  }
  if (D.16415 == 0) goto <D.16594>; else goto <D.16595>;
  <D.16594>:
  scanning = opendir ("/");
  if (scanning == 0B) goto <D.16596>; else goto <D.16597>;
  <D.16596>:
  monoeg_g_strfreev (new_components);
  monoeg_g_strfreev (components);
  D.16485 = 0B;
  return D.16485;
  <D.16597>:
  component.10 = component;
  component = component.10 + 1;
  component.11 = (unsigned int) component.10;
  D.16600 = component.11 * 4;
  D.16601 = new_components + D.16600;
  D.16602 = monoeg_strdup ("");
  *D.16601 = D.16602;
  goto <D.16603>;
  <D.16595>:
  {
    struct DIR * current;
    gchar * entry;

    current = opendir (".");
    if (current == 0B) goto <D.16604>; else goto <D.16605>;
    <D.16604>:
    monoeg_g_strfreev (new_components);
    monoeg_g_strfreev (components);
    D.16485 = 0B;
    return D.16485;
    <D.16605>:
    D.16592 = *components;
    entry = find_in_dir (current, D.16592);
    if (entry == 0B) goto <D.16606>; else goto <D.16607>;
    <D.16606>:
    monoeg_g_strfreev (new_components);
    monoeg_g_strfreev (components);
    D.16485 = 0B;
    return D.16485;
    <D.16607>:
    scanning = opendir (entry);
    if (scanning == 0B) goto <D.16608>; else goto <D.16609>;
    <D.16608>:
    monoeg_g_free (entry);
    monoeg_g_strfreev (new_components);
    monoeg_g_strfreev (components);
    D.16485 = 0B;
    return D.16485;
    <D.16609>:
    component.12 = component;
    component = component.12 + 1;
    component.13 = (unsigned int) component.12;
    D.16612 = component.13 * 4;
    D.16613 = new_components + D.16612;
    *D.16613 = entry;
  }
  <D.16603>:
  goto <D.16614>;
  <D.16552>:
  if (last_exists != 0) goto <D.16615>; else goto <D.16616>;
  <D.16615>:
  {
    size_t __s1_len;
    size_t __s2_len;

    __s2_len = 0;
    if (__s2_len <= 3) goto <D.16618>; else goto <D.16619>;
    <D.16618>:
    {
      const unsigned char * __s2;
      int __result;

      __s2 = *components;
      D.16556 = "";
      D.16557 = MEM[(const unsigned char *)D.16556];
      D.16558 = (int) D.16557;
      D.16620 = *__s2;
      D.16621 = (int) D.16620;
      __result = D.16558 - D.16621;
      {
        if (__s2_len != 0) goto <D.16622>; else goto <D.16623>;
        <D.16622>:
        if (__result == 0) goto <D.16624>; else goto <D.16625>;
        <D.16624>:
        D.16565 = &MEM[(void *)"" + 1B];
        D.16566 = *D.16565;
        D.16567 = (int) D.16566;
        D.16626 = __s2 + 1;
        D.16627 = *D.16626;
        D.16628 = (int) D.16627;
        __result = D.16567 - D.16628;
        if (__s2_len > 1) goto <D.16629>; else goto <D.16630>;
        <D.16629>:
        if (__result == 0) goto <D.16631>; else goto <D.16632>;
        <D.16631>:
        D.16575 = &MEM[(void *)"" + 2B];
        D.16576 = *D.16575;
        D.16577 = (int) D.16576;
        D.16633 = __s2 + 2;
        D.16634 = *D.16633;
        D.16635 = (int) D.16634;
        __result = D.16577 - D.16635;
        if (__s2_len > 2) goto <D.16636>; else goto <D.16637>;
        <D.16636>:
        if (__result == 0) goto <D.16638>; else goto <D.16639>;
        <D.16638>:
        D.16585 = &MEM[(void *)"" + 3B];
        D.16586 = *D.16585;
        D.16587 = (int) D.16586;
        D.16640 = __s2 + 3;
        D.16641 = *D.16640;
        D.16642 = (int) D.16641;
        __result = D.16587 - D.16642;
        <D.16639>:
        <D.16637>:
        <D.16632>:
        <D.16630>:
        <D.16625>:
        <D.16623>:
      }
      D.16425 = __result;
    }
    iftmp.14 = -D.16425;
    goto <D.16643>;
    <D.16619>:
    D.16592 = *components;
    D.16593 = MEM[(const unsigned char * {ref-all})D.16592];
    iftmp.14 = (int) D.16593;
    <D.16643>:
    D.16426 = iftmp.14;
  }
  if (D.16426 == 0) goto <D.16644>; else goto <D.16645>;
  <D.16644>:
  component.15 = component;
  component = component.15 + 1;
  component.16 = (unsigned int) component.15;
  D.16648 = component.16 * 4;
  D.16649 = new_components + D.16648;
  D.16650 = monoeg_strdup ("");
  *D.16649 = D.16650;
  goto <D.16651>;
  <D.16645>:
  {
    struct DIR * current;
    gchar * entry;

    current = opendir (".");
    if (current == 0B) goto <D.16652>; else goto <D.16653>;
    <D.16652>:
    monoeg_g_strfreev (new_components);
    monoeg_g_strfreev (components);
    D.16485 = 0B;
    return D.16485;
    <D.16653>:
    D.16592 = *components;
    entry = find_in_dir (current, D.16592);
    if (entry == 0B) goto <D.16654>; else goto <D.16655>;
    <D.16654>:
    monoeg_g_strfreev (new_components);
    monoeg_g_strfreev (components);
    D.16485 = 0B;
    return D.16485;
    <D.16655>:
    component.17 = component;
    component = component.17 + 1;
    component.18 = (unsigned int) component.17;
    D.16658 = component.18 * 4;
    D.16659 = new_components + D.16658;
    *D.16659 = entry;
  }
  <D.16651>:
  goto <D.16660>;
  <D.16616>:
  component.19 = component;
  component = component.19 + 1;
  component.20 = (unsigned int) component.19;
  D.16663 = component.20 * 4;
  D.16664 = new_components + D.16663;
  D.16592 = *components;
  D.16665 = monoeg_strdup (D.16592);
  *D.16664 = D.16665;
  <D.16660>:
  <D.16614>:
  D.16666 = component != 1;
  D.16667 = (long int) D.16666;
  D.16668 = __builtin_expect (D.16667, 0);
  if (D.16668 != 0) goto <D.16669>; else goto <D.16670>;
  <D.16669>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-io-portability.c", 343, "component == 1");
  <D.16670>:
  goto <D.16432>;
  <D.16431>:
  {
    gchar * entry;
    gchar * path_so_far;

    if (last_exists == 0) goto <D.16673>; else goto <D.16671>;
    <D.16673>:
    D.16674 = num_components + -1;
    if (D.16674 == component) goto <D.16675>; else goto <D.16671>;
    <D.16675>:
    component.21 = (unsigned int) component;
    D.16677 = component.21 * 4;
    D.16678 = components + D.16677;
    D.16679 = *D.16678;
    entry = monoeg_strdup (D.16679);
    closedir (scanning);
    goto <D.16672>;
    <D.16671>:
    component.21 = (unsigned int) component;
    D.16677 = component.21 * 4;
    D.16678 = components + D.16677;
    D.16679 = *D.16678;
    entry = find_in_dir (scanning, D.16679);
    if (entry == 0B) goto <D.16680>; else goto <D.16681>;
    <D.16680>:
    monoeg_g_strfreev (new_components);
    monoeg_g_strfreev (components);
    D.16485 = 0B;
    return D.16485;
    <D.16681>:
    <D.16672>:
    component.21 = (unsigned int) component;
    D.16677 = component.21 * 4;
    D.16682 = new_components + D.16677;
    *D.16682 = entry;
    D.16674 = num_components + -1;
    if (D.16674 > component) goto <D.16683>; else goto <D.16684>;
    <D.16683>:
    path_so_far = monoeg_g_strjoinv ("/", new_components);
    scanning = opendir (path_so_far);
    monoeg_g_free (path_so_far);
    if (scanning == 0B) goto <D.16685>; else goto <D.16686>;
    <D.16685>:
    monoeg_g_strfreev (new_components);
    monoeg_g_strfreev (components);
    D.16485 = 0B;
    return D.16485;
    <D.16686>:
    <D.16684>:
  }
  component = component + 1;
  <D.16432>:
  if (component < num_components) goto <D.16431>; else goto <D.16433>;
  <D.16433>:
  monoeg_g_strfreev (components);
  new_pathname = monoeg_g_strjoinv ("/", new_components);
  monoeg_g_strfreev (new_components);
  if (last_exists != 0) goto <D.16690>; else goto <D.16687>;
  <D.16690>:
  D.16691 = access (new_pathname, 0);
  if (D.16691 == 0) goto <D.16688>; else goto <D.16687>;
  <D.16687>:
  if (last_exists == 0) goto <D.16688>; else goto <D.16689>;
  <D.16688>:
  if (do_report != 0) goto <D.16692>; else goto <D.16693>;
  <D.16692>:
  {
    size_t __s1_len;
    size_t __s2_len;

    D.16442 = __builtin_strcmp (pathname, new_pathname);
  }
  if (D.16442 != 0) goto <D.16694>; else goto <D.16695>;
  <D.16694>:
  do_mono_profiler_iomap (report, pathname, new_pathname);
  <D.16695>:
  <D.16693>:
  D.16485 = new_pathname;
  return D.16485;
  <D.16689>:
  monoeg_g_free (new_pathname);
  D.16485 = 0B;
  return D.16485;
}


memmove (void * __dest, const void * __src, size_t __len)
{
  void * D.16697;
  unsigned int D.16698;

  D.16698 = __builtin_object_size (__dest, 0);
  D.16697 = __builtin___memmove_chk (__dest, __src, __len, D.16698);
  return D.16697;
}


append_report (struct GString * * report, const gchar * format)
{
  struct GString * D.16700;
  struct GString * D.16703;
  void * ap.22;
  void * ap;

  try
    {
      D.16700 = *report;
      if (D.16700 == 0B) goto <D.16701>; else goto <D.16702>;
      <D.16701>:
      D.16703 = monoeg_g_string_new ("");
      *report = D.16703;
      <D.16702>:
      __builtin_va_start (&ap, 0);
      D.16700 = *report;
      ap.22 = ap;
      monoeg_g_string_append_vprintf (D.16700, format, ap.22);
      __builtin_va_end (&ap);
    }
  finally
    {
      ap = {CLOBBER};
    }
}


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

  if (str != 0B) goto <D.16705>; else goto <D.16706>;
  <D.16705>:
  D.16707 = __strdup (str);
  return D.16707;
  <D.16706>:
  D.16707 = 0B;
  return D.16707;
}


find_in_dir (struct DIR * current, const gchar * name)
{
  char[256] * D.16709;
  int D.16710;
  gchar * D.16713;
  struct dirent * entry;

  goto <D.16369>;
  <D.16368>:
  D.16709 = &entry->d_name;
  D.16710 = monoeg_ascii_strcasecmp (name, D.16709);
  if (D.16710 == 0) goto <D.16711>; else goto <D.16712>;
  <D.16711>:
  {
    char * ret;

    D.16709 = &entry->d_name;
    ret = monoeg_strdup (D.16709);
    closedir (current);
    D.16713 = ret;
    return D.16713;
  }
  <D.16712>:
  <D.16369>:
  entry = readdir (current);
  if (entry != 0B) goto <D.16368>; else goto <D.16370>;
  <D.16370>:
  closedir (current);
  D.16713 = 0B;
  return D.16713;
}


do_mono_profiler_iomap (struct GString * * report, const char * pathname, const char * new_pathname)
{
  struct GString * iftmp.23;
  unsigned int D.16721;
  char * rep;
  struct GString * tmp;

  rep = 0B;
  if (report != 0B) goto <D.16716>; else goto <D.16717>;
  <D.16716>:
  iftmp.23 = *report;
  goto <D.16718>;
  <D.16717>:
  iftmp.23 = 0B;
  <D.16718>:
  tmp = iftmp.23;
  if (tmp != 0B) goto <D.16719>; else goto <D.16720>;
  <D.16719>:
  D.16721 = tmp->len;
  if (D.16721 != 0) goto <D.16722>; else goto <D.16723>;
  <D.16722>:
  rep = monoeg_g_string_free (tmp, 0);
  goto <D.16724>;
  <D.16723>:
  monoeg_g_string_free (tmp, 1);
  <D.16724>:
  *report = 0B;
  <D.16720>:
  mono_profiler_iomap (rep, pathname, new_pathname);
  monoeg_g_free (rep);
}


