mono_portability_helpers_init ()
{
  int __mono_io_portability_helpers.0;
  unsigned int i.1;
  unsigned int D.16486;
  gchar * * D.16487;
  gchar * D.16488;
  int D.16489;
  int __mono_io_portability_helpers.2;
  int D.16494;
  int __mono_io_portability_helpers.3;
  int D.16499;
  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.16479>; else goto <D.16480>;
  <D.16479>:
  return;
  <D.16480>:
  __mono_io_portability_helpers = 0;
  env = monoeg_g_getenv ("MONO_IOMAP");
  if (env != 0B) goto <D.16481>; else goto <D.16482>;
  <D.16481>:
  {
    gchar * * options;
    int i;

    options = monoeg_g_strsplit (env, ":", 0);
    if (options == 0B) goto <D.16483>; else goto <D.16484>;
    <D.16483>:
    return;
    <D.16484>:
    i = 0;
    goto <D.16394>;
    <D.16393>:
    i.1 = (unsigned int) i;
    D.16486 = i.1 * 4;
    D.16487 = options + D.16486;
    D.16488 = *D.16487;
    D.16489 = strncasecmp (D.16488, "drive", 5);
    if (D.16489 == 0) goto <D.16490>; else goto <D.16491>;
    <D.16490>:
    __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.16493>;
    <D.16491>:
    i.1 = (unsigned int) i;
    D.16486 = i.1 * 4;
    D.16487 = options + D.16486;
    D.16488 = *D.16487;
    D.16494 = strncasecmp (D.16488, "case", 4);
    if (D.16494 == 0) goto <D.16495>; else goto <D.16496>;
    <D.16495>:
    __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.16498>;
    <D.16496>:
    i.1 = (unsigned int) i;
    D.16486 = i.1 * 4;
    D.16487 = options + D.16486;
    D.16488 = *D.16487;
    D.16499 = strncasecmp (D.16488, "all", 3);
    if (D.16499 == 0) goto <D.16500>; else goto <D.16501>;
    <D.16500>:
    __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.16501>:
    <D.16498>:
    <D.16493>:
    i = i + 1;
    <D.16394>:
    i.1 = (unsigned int) i;
    D.16486 = i.1 * 4;
    D.16487 = options + D.16486;
    D.16488 = *D.16487;
    if (D.16488 != 0B) goto <D.16393>; else goto <D.16395>;
    <D.16395>:
  }
  <D.16482>:
}


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

  try
    {
      report = 0B;
      if (pathname == 0B) goto <D.16504>; else goto <D.16506>;
      <D.16506>:
      D.16507 = *pathname;
      if (D.16507 == 0) goto <D.16504>; else goto <D.16505>;
      <D.16504>:
      D.16508 = 0B;
      return D.16508;
      <D.16505>:
      ret = mono_portability_find_file_internal (&report, pathname, last_exists);
      report.5 = report;
      if (report.5 != 0B) goto <D.16510>; else goto <D.16511>;
      <D.16510>:
      report.5 = report;
      monoeg_g_string_free (report.5, 1);
      <D.16511>:
      D.16508 = ret;
      return D.16508;
    }
  finally
    {
      report = {CLOBBER};
    }
}


mono_portability_find_file_internal (struct GString * * report, const gchar * pathname, gboolean last_exists)
{
  <unnamed type> D.16514;
  unsigned int D.16515;
  _Bool D.16516;
  gchar * D.16519;
  int D.16524;
  int __mono_io_portability_helpers.6;
  int D.16528;
  const short unsigned int * * D.16531;
  const short unsigned int * D.16532;
  char D.16533;
  unsigned int D.16534;
  unsigned int D.16535;
  const short unsigned int * D.16536;
  short unsigned int D.16537;
  int D.16538;
  int D.16539;
  gchar * D.16542;
  char D.16543;
  unsigned int D.16546;
  int D.16547;
  unsigned int D.16548;
  const void * D.16549;
  sizetype len.7;
  sizetype D.16551;
  gchar * D.16552;
  sizetype D.16557;
  gchar * D.16558;
  char D.16559;
  int D.16564;
  _Bool D.16567;
  _Bool D.16568;
  _Bool D.16569;
  int D.16572;
  unsigned int num_components.8;
  unsigned int D.16578;
  gchar * * D.16579;
  gchar * D.16580;
  int D.16583;
  unsigned int D.16584;
  unsigned int D.16585;
  int D.16449;
  int iftmp.9;
  int D.16448;
  const char[1] * D.16591;
  unsigned char D.16592;
  int D.16593;
  unsigned char D.16594;
  int D.16595;
  _Bool D.16596;
  _Bool D.16597;
  _Bool D.16598;
  const unsigned char * D.16601;
  unsigned char D.16602;
  int D.16603;
  const unsigned char * D.16604;
  unsigned char D.16605;
  int D.16606;
  _Bool D.16607;
  _Bool D.16608;
  const unsigned char * D.16611;
  unsigned char D.16612;
  int D.16613;
  const unsigned char * D.16614;
  unsigned char D.16615;
  int D.16616;
  _Bool D.16617;
  _Bool D.16618;
  const unsigned char * D.16621;
  unsigned char D.16622;
  int D.16623;
  const unsigned char * D.16624;
  unsigned char D.16625;
  int D.16626;
  gchar * D.16628;
  unsigned char D.16629;
  int component.10;
  unsigned int component.11;
  unsigned int D.16636;
  gchar * * D.16637;
  gchar * D.16638;
  int component.12;
  unsigned int component.13;
  unsigned int D.16648;
  gchar * * D.16649;
  int D.16460;
  int iftmp.14;
  int D.16459;
  unsigned char D.16656;
  int D.16657;
  _Bool D.16658;
  _Bool D.16659;
  _Bool D.16660;
  const unsigned char * D.16663;
  unsigned char D.16664;
  int D.16665;
  _Bool D.16666;
  _Bool D.16667;
  const unsigned char * D.16670;
  unsigned char D.16671;
  int D.16672;
  _Bool D.16673;
  _Bool D.16674;
  const unsigned char * D.16677;
  unsigned char D.16678;
  int D.16679;
  int component.15;
  unsigned int component.16;
  unsigned int D.16685;
  gchar * * D.16686;
  gchar * D.16687;
  int component.17;
  unsigned int component.18;
  unsigned int D.16695;
  gchar * * D.16696;
  int component.19;
  unsigned int component.20;
  unsigned int D.16700;
  gchar * * D.16701;
  gchar * D.16702;
  _Bool D.16703;
  long int D.16704;
  long int D.16705;
  int D.16711;
  unsigned int component.21;
  unsigned int D.16714;
  gchar * * D.16715;
  gchar * D.16716;
  gchar * * D.16719;
  int D.16728;
  int D.16476;
  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.16514 = mono_profiler_get_events ();
  D.16515 = D.16514 & 262144;
  D.16516 = D.16515 != 0;
  do_report = (gboolean) D.16516;
  if (0 != 0) goto <D.16517>; else goto <D.16518>;
  <D.16517>:
  D.16519 = 0B;
  return D.16519;
  <D.16518>:
  if (do_report != 0) goto <D.16520>; else goto <D.16521>;
  <D.16520>:
  append_report (report, " - Requested file path: \'%s\'\n", pathname);
  <D.16521>:
  new_pathname = monoeg_strdup (pathname);
  if (last_exists != 0) goto <D.16522>; else goto <D.16523>;
  <D.16522>:
  D.16524 = access (new_pathname, 0);
  if (D.16524 == 0) goto <D.16525>; else goto <D.16526>;
  <D.16525>:
  D.16519 = new_pathname;
  return D.16519;
  <D.16526>:
  <D.16523>:
  monoeg_g_strdelimit (new_pathname, "\\", 47);
  __mono_io_portability_helpers.6 = __mono_io_portability_helpers;
  D.16528 = __mono_io_portability_helpers.6 & 2;
  if (D.16528 != 0) goto <D.16529>; else goto <D.16530>;
  <D.16529>:
  D.16531 = __ctype_b_loc ();
  D.16532 = *D.16531;
  D.16533 = *new_pathname;
  D.16534 = (unsigned int) D.16533;
  D.16535 = D.16534 * 2;
  D.16536 = D.16532 + D.16535;
  D.16537 = *D.16536;
  D.16538 = (int) D.16537;
  D.16539 = D.16538 & 1024;
  if (D.16539 != 0) goto <D.16540>; else goto <D.16541>;
  <D.16540>:
  D.16542 = new_pathname + 1;
  D.16543 = *D.16542;
  if (D.16543 == 58) goto <D.16544>; else goto <D.16545>;
  <D.16544>:
  {
    int len;

    D.16546 = strlen (new_pathname);
    len = (int) D.16546;
    D.16547 = len + -2;
    D.16548 = (unsigned int) D.16547;
    D.16549 = new_pathname + 2;
    memmove (new_pathname, D.16549, D.16548);
    len.7 = (sizetype) len;
    D.16551 = len.7 + 4294967294;
    D.16552 = new_pathname + D.16551;
    *D.16552 = 0;
    if (do_report != 0) goto <D.16553>; else goto <D.16554>;
    <D.16553>:
    append_report (report, " - Stripped drive letter.\n");
    drive_stripped = 1;
    <D.16554>:
  }
  <D.16545>:
  <D.16541>:
  <D.16530>:
  len = strlen (new_pathname);
  if (len > 1) goto <D.16555>; else goto <D.16556>;
  <D.16555>:
  D.16557 = len + 4294967295;
  D.16558 = new_pathname + D.16557;
  D.16559 = *D.16558;
  if (D.16559 == 47) goto <D.16560>; else goto <D.16561>;
  <D.16560>:
  D.16557 = len + 4294967295;
  D.16558 = new_pathname + D.16557;
  *D.16558 = 0;
  <D.16561>:
  <D.16556>:
  if (last_exists != 0) goto <D.16562>; else goto <D.16563>;
  <D.16562>:
  D.16564 = access (new_pathname, 0);
  if (D.16564 == 0) goto <D.16565>; else goto <D.16566>;
  <D.16565>:
  D.16567 = do_report != 0;
  D.16568 = drive_stripped != 0;
  D.16569 = D.16567 & D.16568;
  if (D.16569 != 0) goto <D.16570>; else goto <D.16571>;
  <D.16570>:
  do_mono_profiler_iomap (report, pathname, new_pathname);
  <D.16571>:
  D.16519 = new_pathname;
  return D.16519;
  <D.16566>:
  <D.16563>:
  __mono_io_portability_helpers.6 = __mono_io_portability_helpers;
  D.16572 = __mono_io_portability_helpers.6 & 4;
  if (D.16572 == 0) goto <D.16573>; else goto <D.16574>;
  <D.16573>:
  monoeg_g_free (new_pathname);
  D.16519 = 0B;
  return D.16519;
  <D.16574>:
  components = monoeg_g_strsplit (new_pathname, "/", 0);
  if (components == 0B) goto <D.16575>; else goto <D.16576>;
  <D.16575>:
  monoeg_g_free (new_pathname);
  D.16519 = 0B;
  return D.16519;
  <D.16576>:
  goto <D.16439>;
  <D.16438>:
  num_components = num_components + 1;
  <D.16439>:
  num_components.8 = (unsigned int) num_components;
  D.16578 = num_components.8 * 4;
  D.16579 = components + D.16578;
  D.16580 = *D.16579;
  if (D.16580 != 0B) goto <D.16438>; else goto <D.16440>;
  <D.16440>:
  monoeg_g_free (new_pathname);
  if (num_components == 0) goto <D.16581>; else goto <D.16582>;
  <D.16581>:
  D.16519 = 0B;
  return D.16519;
  <D.16582>:
  D.16583 = num_components + 1;
  D.16584 = (unsigned int) D.16583;
  D.16585 = D.16584 * 4;
  new_components = monoeg_malloc0 (D.16585);
  if (num_components > 1) goto <D.16586>; else goto <D.16587>;
  <D.16586>:
  {
    size_t __s1_len;
    size_t __s2_len;

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

      __s2 = *components;
      D.16591 = "";
      D.16592 = MEM[(const unsigned char *)D.16591];
      D.16593 = (int) D.16592;
      D.16594 = *__s2;
      D.16595 = (int) D.16594;
      __result = D.16593 - D.16595;
      {
        D.16596 = __s2_len != 0;
        D.16597 = __result == 0;
        D.16598 = D.16596 & D.16597;
        if (D.16598 != 0) goto <D.16599>; else goto <D.16600>;
        <D.16599>:
        D.16601 = &MEM[(void *)"" + 1B];
        D.16602 = *D.16601;
        D.16603 = (int) D.16602;
        D.16604 = __s2 + 1;
        D.16605 = *D.16604;
        D.16606 = (int) D.16605;
        __result = D.16603 - D.16606;
        D.16607 = __s2_len > 1;
        D.16597 = __result == 0;
        D.16608 = D.16607 & D.16597;
        if (D.16608 != 0) goto <D.16609>; else goto <D.16610>;
        <D.16609>:
        D.16611 = &MEM[(void *)"" + 2B];
        D.16612 = *D.16611;
        D.16613 = (int) D.16612;
        D.16614 = __s2 + 2;
        D.16615 = *D.16614;
        D.16616 = (int) D.16615;
        __result = D.16613 - D.16616;
        D.16617 = __s2_len > 2;
        D.16597 = __result == 0;
        D.16618 = D.16617 & D.16597;
        if (D.16618 != 0) goto <D.16619>; else goto <D.16620>;
        <D.16619>:
        D.16621 = &MEM[(void *)"" + 3B];
        D.16622 = *D.16621;
        D.16623 = (int) D.16622;
        D.16624 = __s2 + 3;
        D.16625 = *D.16624;
        D.16626 = (int) D.16625;
        __result = D.16623 - D.16626;
        <D.16620>:
        <D.16610>:
        <D.16600>:
      }
      D.16448 = __result;
    }
    iftmp.9 = -D.16448;
    goto <D.16627>;
    <D.16590>:
    D.16628 = *components;
    D.16629 = MEM[(const unsigned char * {ref-all})D.16628];
    iftmp.9 = (int) D.16629;
    <D.16627>:
    D.16449 = iftmp.9;
  }
  if (D.16449 == 0) goto <D.16630>; else goto <D.16631>;
  <D.16630>:
  scanning = opendir ("/");
  if (scanning == 0B) goto <D.16632>; else goto <D.16633>;
  <D.16632>:
  monoeg_g_strfreev (new_components);
  monoeg_g_strfreev (components);
  D.16519 = 0B;
  return D.16519;
  <D.16633>:
  component.10 = component;
  component = component.10 + 1;
  component.11 = (unsigned int) component.10;
  D.16636 = component.11 * 4;
  D.16637 = new_components + D.16636;
  D.16638 = monoeg_strdup ("");
  *D.16637 = D.16638;
  goto <D.16639>;
  <D.16631>:
  {
    struct DIR * current;
    gchar * entry;

    current = opendir (".");
    if (current == 0B) goto <D.16640>; else goto <D.16641>;
    <D.16640>:
    monoeg_g_strfreev (new_components);
    monoeg_g_strfreev (components);
    D.16519 = 0B;
    return D.16519;
    <D.16641>:
    D.16628 = *components;
    entry = find_in_dir (current, D.16628);
    if (entry == 0B) goto <D.16642>; else goto <D.16643>;
    <D.16642>:
    monoeg_g_strfreev (new_components);
    monoeg_g_strfreev (components);
    D.16519 = 0B;
    return D.16519;
    <D.16643>:
    scanning = opendir (entry);
    if (scanning == 0B) goto <D.16644>; else goto <D.16645>;
    <D.16644>:
    monoeg_g_free (entry);
    monoeg_g_strfreev (new_components);
    monoeg_g_strfreev (components);
    D.16519 = 0B;
    return D.16519;
    <D.16645>:
    component.12 = component;
    component = component.12 + 1;
    component.13 = (unsigned int) component.12;
    D.16648 = component.13 * 4;
    D.16649 = new_components + D.16648;
    *D.16649 = entry;
  }
  <D.16639>:
  goto <D.16650>;
  <D.16587>:
  if (last_exists != 0) goto <D.16651>; else goto <D.16652>;
  <D.16651>:
  {
    size_t __s1_len;
    size_t __s2_len;

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

      __s2 = *components;
      D.16591 = "";
      D.16592 = MEM[(const unsigned char *)D.16591];
      D.16593 = (int) D.16592;
      D.16656 = *__s2;
      D.16657 = (int) D.16656;
      __result = D.16593 - D.16657;
      {
        D.16658 = __s2_len != 0;
        D.16659 = __result == 0;
        D.16660 = D.16658 & D.16659;
        if (D.16660 != 0) goto <D.16661>; else goto <D.16662>;
        <D.16661>:
        D.16601 = &MEM[(void *)"" + 1B];
        D.16602 = *D.16601;
        D.16603 = (int) D.16602;
        D.16663 = __s2 + 1;
        D.16664 = *D.16663;
        D.16665 = (int) D.16664;
        __result = D.16603 - D.16665;
        D.16666 = __s2_len > 1;
        D.16659 = __result == 0;
        D.16667 = D.16666 & D.16659;
        if (D.16667 != 0) goto <D.16668>; else goto <D.16669>;
        <D.16668>:
        D.16611 = &MEM[(void *)"" + 2B];
        D.16612 = *D.16611;
        D.16613 = (int) D.16612;
        D.16670 = __s2 + 2;
        D.16671 = *D.16670;
        D.16672 = (int) D.16671;
        __result = D.16613 - D.16672;
        D.16673 = __s2_len > 2;
        D.16659 = __result == 0;
        D.16674 = D.16673 & D.16659;
        if (D.16674 != 0) goto <D.16675>; else goto <D.16676>;
        <D.16675>:
        D.16621 = &MEM[(void *)"" + 3B];
        D.16622 = *D.16621;
        D.16623 = (int) D.16622;
        D.16677 = __s2 + 3;
        D.16678 = *D.16677;
        D.16679 = (int) D.16678;
        __result = D.16623 - D.16679;
        <D.16676>:
        <D.16669>:
        <D.16662>:
      }
      D.16459 = __result;
    }
    iftmp.14 = -D.16459;
    goto <D.16680>;
    <D.16655>:
    D.16628 = *components;
    D.16629 = MEM[(const unsigned char * {ref-all})D.16628];
    iftmp.14 = (int) D.16629;
    <D.16680>:
    D.16460 = iftmp.14;
  }
  if (D.16460 == 0) goto <D.16681>; else goto <D.16682>;
  <D.16681>:
  component.15 = component;
  component = component.15 + 1;
  component.16 = (unsigned int) component.15;
  D.16685 = component.16 * 4;
  D.16686 = new_components + D.16685;
  D.16687 = monoeg_strdup ("");
  *D.16686 = D.16687;
  goto <D.16688>;
  <D.16682>:
  {
    struct DIR * current;
    gchar * entry;

    current = opendir (".");
    if (current == 0B) goto <D.16689>; else goto <D.16690>;
    <D.16689>:
    monoeg_g_strfreev (new_components);
    monoeg_g_strfreev (components);
    D.16519 = 0B;
    return D.16519;
    <D.16690>:
    D.16628 = *components;
    entry = find_in_dir (current, D.16628);
    if (entry == 0B) goto <D.16691>; else goto <D.16692>;
    <D.16691>:
    monoeg_g_strfreev (new_components);
    monoeg_g_strfreev (components);
    D.16519 = 0B;
    return D.16519;
    <D.16692>:
    component.17 = component;
    component = component.17 + 1;
    component.18 = (unsigned int) component.17;
    D.16695 = component.18 * 4;
    D.16696 = new_components + D.16695;
    *D.16696 = entry;
  }
  <D.16688>:
  goto <D.16697>;
  <D.16652>:
  component.19 = component;
  component = component.19 + 1;
  component.20 = (unsigned int) component.19;
  D.16700 = component.20 * 4;
  D.16701 = new_components + D.16700;
  D.16628 = *components;
  D.16702 = monoeg_strdup (D.16628);
  *D.16701 = D.16702;
  <D.16697>:
  <D.16650>:
  D.16703 = component != 1;
  D.16704 = (long int) D.16703;
  D.16705 = __builtin_expect (D.16704, 0);
  if (D.16705 != 0) goto <D.16706>; else goto <D.16707>;
  <D.16706>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "mono-io-portability.c", 343, "component == 1");
  <D.16707>:
  goto <D.16466>;
  <D.16465>:
  {
    gchar * entry;
    gchar * path_so_far;

    if (last_exists == 0) goto <D.16710>; else goto <D.16708>;
    <D.16710>:
    D.16711 = num_components + -1;
    if (D.16711 == component) goto <D.16712>; else goto <D.16708>;
    <D.16712>:
    component.21 = (unsigned int) component;
    D.16714 = component.21 * 4;
    D.16715 = components + D.16714;
    D.16716 = *D.16715;
    entry = monoeg_strdup (D.16716);
    closedir (scanning);
    goto <D.16709>;
    <D.16708>:
    component.21 = (unsigned int) component;
    D.16714 = component.21 * 4;
    D.16715 = components + D.16714;
    D.16716 = *D.16715;
    entry = find_in_dir (scanning, D.16716);
    if (entry == 0B) goto <D.16717>; else goto <D.16718>;
    <D.16717>:
    monoeg_g_strfreev (new_components);
    monoeg_g_strfreev (components);
    D.16519 = 0B;
    return D.16519;
    <D.16718>:
    <D.16709>:
    component.21 = (unsigned int) component;
    D.16714 = component.21 * 4;
    D.16719 = new_components + D.16714;
    *D.16719 = entry;
    D.16711 = num_components + -1;
    if (D.16711 > component) goto <D.16720>; else goto <D.16721>;
    <D.16720>:
    path_so_far = monoeg_g_strjoinv ("/", new_components);
    scanning = opendir (path_so_far);
    monoeg_g_free (path_so_far);
    if (scanning == 0B) goto <D.16722>; else goto <D.16723>;
    <D.16722>:
    monoeg_g_strfreev (new_components);
    monoeg_g_strfreev (components);
    D.16519 = 0B;
    return D.16519;
    <D.16723>:
    <D.16721>:
  }
  component = component + 1;
  <D.16466>:
  if (component < num_components) goto <D.16465>; else goto <D.16467>;
  <D.16467>:
  monoeg_g_strfreev (components);
  new_pathname = monoeg_g_strjoinv ("/", new_components);
  monoeg_g_strfreev (new_components);
  if (last_exists != 0) goto <D.16727>; else goto <D.16724>;
  <D.16727>:
  D.16728 = access (new_pathname, 0);
  if (D.16728 == 0) goto <D.16725>; else goto <D.16724>;
  <D.16724>:
  if (last_exists == 0) goto <D.16725>; else goto <D.16726>;
  <D.16725>:
  if (do_report != 0) goto <D.16729>; else goto <D.16730>;
  <D.16729>:
  {
    size_t __s1_len;
    size_t __s2_len;

    D.16476 = __builtin_strcmp (pathname, new_pathname);
  }
  if (D.16476 != 0) goto <D.16731>; else goto <D.16732>;
  <D.16731>:
  do_mono_profiler_iomap (report, pathname, new_pathname);
  <D.16732>:
  <D.16730>:
  D.16519 = new_pathname;
  return D.16519;
  <D.16726>:
  monoeg_g_free (new_pathname);
  D.16519 = 0B;
  return D.16519;
}


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

  D.16735 = __builtin_object_size (__dest, 0);
  D.16734 = __builtin___memmove_chk (__dest, __src, __len, D.16735);
  return D.16734;
}


append_report (struct GString * * report, const gchar * format)
{
  struct GString * D.16737;
  struct GString * D.16740;
  char * ap.22;
  char * ap;

  try
    {
      D.16737 = *report;
      if (D.16737 == 0B) goto <D.16738>; else goto <D.16739>;
      <D.16738>:
      D.16740 = monoeg_g_string_new ("");
      *report = D.16740;
      <D.16739>:
      __builtin_va_start (&ap, 0);
      ap.22 = ap;
      D.16737 = *report;
      monoeg_g_string_append_vprintf (D.16737, format, ap.22);
      __builtin_va_end (&ap);
    }
  finally
    {
      ap = {CLOBBER};
    }
}


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

  if (str != 0B) goto <D.16742>; else goto <D.16743>;
  <D.16742>:
  D.16744 = __strdup (str);
  return D.16744;
  <D.16743>:
  D.16744 = 0B;
  return D.16744;
}


find_in_dir (struct DIR * current, const gchar * name)
{
  char[256] * D.16746;
  int D.16747;
  gchar * D.16750;
  struct dirent * entry;

  goto <D.16403>;
  <D.16402>:
  D.16746 = &entry->d_name;
  D.16747 = monoeg_ascii_strcasecmp (name, D.16746);
  if (D.16747 == 0) goto <D.16748>; else goto <D.16749>;
  <D.16748>:
  {
    char * ret;

    D.16746 = &entry->d_name;
    ret = monoeg_strdup (D.16746);
    closedir (current);
    D.16750 = ret;
    return D.16750;
  }
  <D.16749>:
  <D.16403>:
  entry = readdir (current);
  if (entry != 0B) goto <D.16402>; else goto <D.16404>;
  <D.16404>:
  closedir (current);
  D.16750 = 0B;
  return D.16750;
}


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

  rep = 0B;
  if (report != 0B) goto <D.16753>; else goto <D.16754>;
  <D.16753>:
  iftmp.23 = *report;
  goto <D.16755>;
  <D.16754>:
  iftmp.23 = 0B;
  <D.16755>:
  tmp = iftmp.23;
  if (tmp != 0B) goto <D.16756>; else goto <D.16757>;
  <D.16756>:
  D.16758 = tmp->len;
  if (D.16758 != 0) goto <D.16759>; else goto <D.16760>;
  <D.16759>:
  rep = monoeg_g_string_free (tmp, 0);
  goto <D.16761>;
  <D.16760>:
  monoeg_g_string_free (tmp, 1);
  <D.16761>:
  *report = 0B;
  <D.16757>:
  mono_profiler_iomap (rep, pathname, new_pathname);
  monoeg_g_free (rep);
}


