process_wait (void * handle, guint32 timeout, gboolean alertable)
{
  long unsigned int D.11377;
  guint32 D.11380;
  signed int handle.0;
  _Bool D.11382;
  long int D.11383;
  long int D.11384;
  struct _WapiHandle_process * process_handle.1;
  int D.11390;
  int D.11395;
  int D.11396;
  _Bool D.11399;
  unsigned int D.11404;
  unsigned int D.11405;
  union MonoSemType * D.11406;
  int * D.11410;
  int D.11411;
  int D.11419;
  unsigned int D.11423;
  unsigned int D.11428;
  int D.11431;
  _Bool D.11434;
  long int D.11435;
  long int D.11436;
  int iftmp.2;
  union 
{
  int __in;
  int __i;
} D.11367;
  int D.11443;
  unsigned char D.11444;
  unsigned char D.11445;
  unsigned char D.11446;
  signed char D.11447;
  signed char D.11448;
  union 
{
  int __in;
  int __i;
} D.11371;
  int D.11451;
  int D.11452;
  int D.11453;
  unsigned int D.11454;
  union 
{
  int __in;
  int __i;
} D.11375;
  int D.11456;
  int D.11457;
  int D.11458;
  unsigned int D.11459;
  struct WapiFileTime * D.11460;
  long int D.11461;
  struct _WapiHandle_process * process_handle;
  gboolean ok;
  pid_t pid;
  pid_t ret;
  int status;
  guint32 start;
  guint32 now;
  struct MonoProcess * mp;
  gboolean spin;
  void * current_thread;
  static const char __func__[13] = "process_wait";
  typedef union 
{
  int __in;
  int __i;
} unionunion 
{
  int __in;
  int __i;
};

  try
    {
      D.11377 = pthread_self ();
      current_thread = _wapi_thread_handle_from_id (D.11377);
      if (current_thread == 0B) goto <D.11378>; else goto <D.11379>;
      <D.11378>:
      SetLastError (6);
      D.11380 = 4294967295;
      return D.11380;
      <D.11379>:
      handle.0 = (signed int) handle;
      D.11382 = handle.0 < 0;
      D.11383 = (long int) D.11382;
      D.11384 = __builtin_expect (D.11383, 0);
      if (D.11384 != 0) goto <D.11385>; else goto <D.11386>;
      <D.11385>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "processes.c", 2912, "(GPOINTER_TO_UINT (handle) & _WAPI_PROCESS_UNHANDLED) != _WAPI_PROCESS_UNHANDLED");
      <D.11386>:
      ok = _wapi_lookup_handle (handle, 9, &process_handle);
      if (ok == 0) goto <D.11387>; else goto <D.11388>;
      <D.11387>:
      monoeg_g_log (0B, 16, "%s: error looking up process handle %p", &__func__, handle);
      D.11380 = 4294967295;
      return D.11380;
      <D.11388>:
      process_handle.1 = process_handle;
      D.11390 = process_handle.1->exited;
      if (D.11390 != 0) goto <D.11391>; else goto <D.11392>;
      <D.11391>:
      D.11380 = 0;
      return D.11380;
      <D.11392>:
      process_handle.1 = process_handle;
      pid = process_handle.1->id;
      process_handle.1 = process_handle;
      mp = process_handle.1->mono_process;
      if (mp != 0B) goto <D.11393>; else goto <D.11394>;
      <D.11393>:
      process_handle.1 = process_handle;
      D.11395 = process_handle.1->self;
      D.11396 = _wapi_getpid ();
      if (D.11395 != D.11396) goto <D.11397>; else goto <D.11398>;
      <D.11397>:
      mp = 0B;
      <D.11398>:
      <D.11394>:
      start = mono_msec_ticks ();
      now = start;
      D.11399 = mp == 0B;
      spin = (gboolean) D.11399;
      <D.11363>:
      if (mp != 0B) goto <D.11400>; else goto <D.11401>;
      <D.11400>:
      if (timeout != 4294967295) goto <D.11402>; else goto <D.11403>;
      <D.11402>:
      D.11404 = start - now;
      D.11405 = D.11404 + timeout;
      D.11406 = &mp->exit_sem;
      ret = mono_sem_timedwait (D.11406, D.11405, alertable);
      goto <D.11407>;
      <D.11403>:
      D.11406 = &mp->exit_sem;
      ret = mono_sem_wait (D.11406, alertable);
      <D.11407>:
      if (ret == -1) goto <D.11408>; else goto <D.11409>;
      <D.11408>:
      D.11410 = __errno_location ();
      D.11411 = *D.11410;
      if (D.11411 != 4) goto <D.11412>; else goto <D.11413>;
      <D.11412>:
      D.11410 = __errno_location ();
      D.11411 = *D.11410;
      if (D.11411 != 110) goto <D.11414>; else goto <D.11415>;
      <D.11414>:
      <D.11415>:
      <D.11413>:
      <D.11409>:
      if (ret == 0) goto <D.11416>; else goto <D.11417>;
      <D.11416>:
      D.11406 = &mp->exit_sem;
      mono_sem_post (D.11406);
      goto <D.11362>;
      <D.11417>:
      goto <D.11418>;
      <D.11401>:
      D.11419 = is_pid_valid (pid);
      if (D.11419 == 0) goto <D.11362>; else goto <D.11420>;
      <D.11420>:
      <D.11418>:
      if (timeout == 0) goto <D.11421>; else goto <D.11422>;
      <D.11421>:
      D.11380 = 258;
      return D.11380;
      <D.11422>:
      now = mono_msec_ticks ();
      D.11423 = now - start;
      if (D.11423 >= timeout) goto <D.11424>; else goto <D.11425>;
      <D.11424>:
      D.11380 = 258;
      return D.11380;
      <D.11425>:
      if (spin != 0) goto <D.11426>; else goto <D.11427>;
      <D.11426>:
      D.11404 = start - now;
      D.11405 = D.11404 + timeout;
      D.11428 = MIN_EXPR <D.11405, 100>;
      _wapi_handle_spin (D.11428);
      <D.11427>:
      if (alertable != 0) goto <D.11429>; else goto <D.11430>;
      <D.11429>:
      D.11431 = _wapi_thread_apc_pending (current_thread);
      if (D.11431 != 0) goto <D.11432>; else goto <D.11433>;
      <D.11432>:
      D.11380 = 192;
      return D.11380;
      <D.11433>:
      <D.11430>:
      goto <D.11363>;
      <D.11362>:
      ret = _wapi_handle_lock_shared_handles ();
      D.11434 = ret != 0;
      D.11435 = (long int) D.11434;
      D.11436 = __builtin_expect (D.11435, 0);
      if (D.11436 != 0) goto <D.11437>; else goto <D.11438>;
      <D.11437>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "processes.c", 3006, "ret == 0");
      <D.11438>:
      if (mp != 0B) goto <D.11440>; else goto <D.11441>;
      <D.11440>:
      iftmp.2 = mp->status;
      goto <D.11442>;
      <D.11441>:
      iftmp.2 = 0;
      <D.11442>:
      status = iftmp.2;
      D.11367.__in = status;
      D.11443 = D.11367.__i;
      D.11444 = (unsigned char) D.11443;
      D.11445 = D.11444 & 127;
      D.11446 = D.11445 + 1;
      D.11447 = (signed char) D.11446;
      D.11448 = D.11447 >> 1;
      if (D.11448 > 0) goto <D.11449>; else goto <D.11450>;
      <D.11449>:
      {
        typedef union 
      {
        int __in;
        int __i;
      } unionunion 
      {
        int __in;
        int __i;
      };

        process_handle.1 = process_handle;
        D.11371.__in = status;
        D.11451 = D.11371.__i;
        D.11452 = D.11451 & 127;
        D.11453 = D.11452 + 128;
        D.11454 = (unsigned int) D.11453;
        process_handle.1->exitstatus = D.11454;
      }
      goto <D.11455>;
      <D.11450>:
      {
        typedef union 
      {
        int __in;
        int __i;
      } unionunion 
      {
        int __in;
        int __i;
      };

        process_handle.1 = process_handle;
        D.11375.__in = status;
        D.11456 = D.11375.__i;
        D.11457 = D.11456 & 65280;
        D.11458 = D.11457 >> 8;
        D.11459 = (unsigned int) D.11458;
        process_handle.1->exitstatus = D.11459;
      }
      <D.11455>:
      process_handle.1 = process_handle;
      D.11460 = &process_handle.1->exit_time;
      D.11461 = time (0B);
      _wapi_time_t_to_filetime (D.11461, D.11460);
      process_handle.1 = process_handle;
      process_handle.1->exited = 1;
      _wapi_shared_handle_set_signal_state (handle, 1);
      _wapi_handle_unlock_shared_handles ();
      D.11380 = 0;
      return D.11380;
    }
  finally
    {
      process_handle = {CLOBBER};
    }
}


is_pid_valid (pid_t pid)
{
  int D.11464;
  gboolean D.11467;
  gboolean result;
  gchar * dir;

  result = 0;
  dir = monoeg_g_strdup_printf ("/proc/%d", pid);
  D.11464 = access (dir, 0);
  if (D.11464 == 0) goto <D.11465>; else goto <D.11466>;
  <D.11465>:
  result = 1;
  <D.11466>:
  monoeg_g_free (dir);
  D.11467 = result;
  return D.11467;
}


_wapi_handle_spin (guint32 ms)
{
  _Bool D.11469;
  long int D.11470;
  long int D.11471;
  unsigned int D.11474;
  long int D.11475;
  struct timespec sleepytime;

  try
    {
      D.11469 = ms > 999;
      D.11470 = (long int) D.11469;
      D.11471 = __builtin_expect (D.11470, 0);
      if (D.11471 != 0) goto <D.11472>; else goto <D.11473>;
      <D.11472>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "../../mono/io-layer/handles-private.h", 326, "ms < 1000");
      <D.11473>:
      sleepytime.tv_sec = 0;
      D.11474 = ms * 1000000;
      D.11475 = (long int) D.11474;
      sleepytime.tv_nsec = D.11475;
      nanosleep (&sleepytime, 0B);
    }
  finally
    {
      sleepytime = {CLOBBER};
    }
}


_wapi_handle_lock_shared_handles ()
{
  int D.11476;

  D.11476 = _wapi_shm_sem_lock (3);
  return D.11476;
}


_wapi_shared_handle_set_signal_state (void * handle, gboolean state)
{
  int iftmp.3;
  <unnamed type> D.11483;
  <unnamed type> D.11485;
  <unnamed type> D.11487;
  <unnamed type> D.11489;
  _Bool D.11491;
  long int D.11492;
  long int D.11493;
  unsigned int D.11496;
  struct _WapiHandleUnshared * D.11497;
  unsigned int D.11498;
  unsigned int D.11499;
  struct _WapiHandleSharedLayout * _wapi_shared_layout.4;
  unsigned int D.11501;
  guint32 idx;
  struct _WapiHandleUnshared * handle_data;
  struct _WapiHandle_shared_ref * ref;
  struct _WapiHandleShared * shared_data;

  idx = (guint32) handle;
  if (idx > 4194303) goto <D.11478>; else goto <D.11479>;
  <D.11478>:
  return;
  <D.11479>:
  D.11483 = _wapi_handle_type (handle);
  if (D.11483 != 9) goto <D.11484>; else goto <D.11481>;
  <D.11484>:
  D.11485 = _wapi_handle_type (handle);
  if (D.11485 != 11) goto <D.11486>; else goto <D.11481>;
  <D.11486>:
  D.11487 = _wapi_handle_type (handle);
  if (D.11487 != 12) goto <D.11488>; else goto <D.11481>;
  <D.11488>:
  D.11489 = _wapi_handle_type (handle);
  if (D.11489 != 13) goto <D.11490>; else goto <D.11481>;
  <D.11490>:
  iftmp.3 = 1;
  goto <D.11482>;
  <D.11481>:
  iftmp.3 = 0;
  <D.11482>:
  D.11491 = iftmp.3 != 0;
  D.11492 = (long int) D.11491;
  D.11493 = __builtin_expect (D.11492, 0);
  if (D.11493 != 0) goto <D.11494>; else goto <D.11495>;
  <D.11494>:
  monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "../../mono/io-layer/handles-private.h", 201, "_WAPI_SHARED_HANDLE(_wapi_handle_type (handle))");
  <D.11495>:
  D.11496 = idx / 256;
  D.11497 = _wapi_private_handles[D.11496];
  D.11498 = idx & 255;
  D.11499 = D.11498 * 136;
  handle_data = D.11497 + D.11499;
  ref = &handle_data->u.shared;
  _wapi_shared_layout.4 = _wapi_shared_layout;
  D.11501 = ref->offset;
  shared_data = &_wapi_shared_layout.4->handles[D.11501];
  shared_data->signalled = state;
}


_wapi_handle_type (void * handle)
{
  unsigned int D.11506;
  struct _WapiHandleUnshared * D.11507;
  WapiHandleType D.11508;
  unsigned int D.11509;
  unsigned int D.11510;
  struct _WapiHandleUnshared * D.11511;
  guint32 idx;

  idx = (guint32) handle;
  if (idx > 4194303) goto <D.11503>; else goto <D.11505>;
  <D.11505>:
  D.11506 = idx / 256;
  D.11507 = _wapi_private_handles[D.11506];
  if (D.11507 == 0B) goto <D.11503>; else goto <D.11504>;
  <D.11503>:
  D.11508 = 0;
  return D.11508;
  <D.11504>:
  D.11506 = idx / 256;
  D.11507 = _wapi_private_handles[D.11506];
  D.11509 = idx & 255;
  D.11510 = D.11509 * 136;
  D.11511 = D.11507 + D.11510;
  D.11508 = D.11511->type;
  return D.11508;
}


_wapi_handle_unlock_shared_handles ()
{
  int D.11513;

  D.11513 = _wapi_shm_sem_unlock (3);
  return D.11513;
}


process_close (void * handle, void * data)
{
  struct MonoProcess * D.11515;
  int D.11518;
  int D.11519;
  gint32 * D.11522;
  struct _WapiHandle_process * process_handle;

  process_handle = data;
  D.11515 = process_handle->mono_process;
  if (D.11515 != 0B) goto <D.11516>; else goto <D.11517>;
  <D.11516>:
  D.11518 = process_handle->self;
  D.11519 = _wapi_getpid ();
  if (D.11518 == D.11519) goto <D.11520>; else goto <D.11521>;
  <D.11520>:
  D.11515 = process_handle->mono_process;
  D.11522 = &D.11515->handle_count;
  InterlockedDecrement (D.11522);
  <D.11521>:
  <D.11517>:
  mono_processes_cleanup ();
}


InterlockedDecrement (volatile gint32 * val)
{
  gint32 D.11523;
  unsigned int D.11524;

  D.11524 = __sync_sub_and_fetch_4 (val, 1);
  D.11523 = (gint32) D.11524;
  return D.11523;
}


mono_processes_cleanup ()
{
  int D.11526;
  int D.11529;
  void * D.11532;
  int D.11540;
  unsigned int spin.5;
  struct MonoProcess * mono_processes.6;
  struct MonoProcess * mono_processes.7;
  int mono_processes_read_lock.8;
  union MonoSemType * D.11561;
  struct MonoProcess * mp;
  struct MonoProcess * prev;
  struct MonoProcess * candidate;
  void * unref_handle;
  int spin;

  prev = 0B;
  candidate = 0B;
  D.11526 = InterlockedCompareExchange (&mono_processes_cleaning_up, 1, 0);
  if (D.11526 != 0) goto <D.11527>; else goto <D.11528>;
  <D.11527>:
  return;
  <D.11528>:
  mp = mono_processes;
  goto <D.11316>;
  <D.11317>:
  D.11529 = mp->pid;
  if (D.11529 == 0) goto <D.11530>; else goto <D.11531>;
  <D.11530>:
  D.11532 = mp->handle;
  if (D.11532 != 0B) goto <D.11533>; else goto <D.11534>;
  <D.11533>:
  pthread_mutex_lock (&mono_processes_mutex);
  unref_handle = mp->handle;
  mp->handle = 0B;
  pthread_mutex_unlock (&mono_processes_mutex);
  if (unref_handle != 0B) goto <D.11535>; else goto <D.11536>;
  <D.11535>:
  _wapi_handle_unref (unref_handle);
  <D.11536>:
  // predicted unlikely by continue predictor.
  goto <D.11316>;
  <D.11534>:
  <D.11531>:
  mp = mp->next;
  <D.11316>:
  if (mp != 0B) goto <D.11317>; else goto <D.11318>;
  <D.11318>:
  mp = mono_processes;
  spin = 0;
  goto <D.11320>;
  <D.11321>:
  D.11540 = mp->handle_count;
  if (D.11540 == 0) goto <D.11541>; else goto <D.11537>;
  <D.11541>:
  D.11529 = mp->pid;
  if (D.11529 == 0) goto <D.11538>; else goto <D.11537>;
  <D.11537>:
  if (candidate != 0B) goto <D.11538>; else goto <D.11539>;
  <D.11538>:
  if (spin > 0) goto <D.11542>; else goto <D.11543>;
  <D.11542>:
  spin.5 = (unsigned int) spin;
  _wapi_handle_spin (spin.5);
  spin = spin << 1;
  <D.11543>:
  pthread_mutex_lock (&mono_processes_mutex);
  if (candidate == 0B) goto <D.11545>; else goto <D.11546>;
  <D.11545>:
  mono_processes.6 = mono_processes;
  if (mp == mono_processes.6) goto <D.11548>; else goto <D.11549>;
  <D.11548>:
  mono_processes.7 = mp->next;
  mono_processes = mono_processes.7;
  goto <D.11551>;
  <D.11549>:
  mono_processes.7 = mp->next;
  prev->next = mono_processes.7;
  <D.11551>:
  candidate = mp;
  <D.11546>:
  mono_memory_barrier ();
  mono_processes_read_lock.8 = mono_processes_read_lock;
  if (mono_processes_read_lock.8 != 0) goto <D.11553>; else goto <D.11554>;
  <D.11553>:
  if (spin == 0) goto <D.11555>; else goto <D.11556>;
  <D.11555>:
  spin = 1;
  goto <D.11557>;
  <D.11556>:
  if (spin > 7) goto <D.11558>; else goto <D.11559>;
  <D.11558>:
  pthread_mutex_unlock (&mono_processes_mutex);
  goto <D.11319>;
  <D.11559>:
  <D.11557>:
  goto <D.11560>;
  <D.11554>:
  mp = candidate->next;
  D.11561 = &candidate->exit_sem;
  sem_destroy (D.11561);
  monoeg_g_free (candidate);
  candidate = 0B;
  <D.11560>:
  pthread_mutex_unlock (&mono_processes_mutex);
  // predicted unlikely by continue predictor.
  goto <D.11320>;
  <D.11539>:
  spin = 0;
  prev = mp;
  mp = mp->next;
  <D.11320>:
  if (mp != 0B) goto <D.11321>; else goto <D.11319>;
  <D.11319>:
  InterlockedDecrement (&mono_processes_cleaning_up);
}


InterlockedCompareExchange (volatile gint32 * dest, gint32 exch, gint32 comp)
{
  gint32 D.11563;
  unsigned int exch.9;
  unsigned int comp.10;
  unsigned int D.11566;

  exch.9 = (unsigned int) exch;
  comp.10 = (unsigned int) comp;
  D.11566 = __sync_val_compare_and_swap_4 (dest, comp.10, exch.9);
  D.11563 = (gint32) D.11566;
  return D.11563;
}


mono_memory_barrier ()
{
  __sync_synchronize ();
}


ShellExecuteEx (struct WapiShellExecuteInfo * sei)
{
  gboolean D.11570;
  const gunichar2 * D.11571;
  const gunichar2 * D.11574;
  const gunichar2 * iftmp.11;
  const gunichar2 * utf16_quote.12;
  const gunichar2 * D.11582;
  unsigned int D.11585;
  gunichar2 * handler_utf16.13;
  gchar * handler.14;
  char * handler.15;
  gchar * handler.16;
  gchar * handler.17;
  gchar * handler.18;
  gunichar2 * handler_utf16.19;
  const gunichar2 * iftmp.20;
  const gunichar2 * utf16_space.21;
  unsigned int D.11614;
  void * D.11617;
  <unnamed type> D.11618;
  unsigned int D.11619;
  gboolean ret;
  struct WapiProcessInformation process_info;
  gunichar2 * args;

  try
    {
      if (sei == 0B) goto <D.11568>; else goto <D.11569>;
      <D.11568>:
      SetLastError (87);
      D.11570 = 0;
      return D.11570;
      <D.11569>:
      D.11571 = sei->lpFile;
      if (D.11571 == 0B) goto <D.11572>; else goto <D.11573>;
      <D.11572>:
      D.11570 = 1;
      return D.11570;
      <D.11573>:
      D.11574 = sei->lpParameters;
      D.11574 = sei->lpParameters;
      if (D.11574 != 0B) goto <D.11576>; else goto <D.11577>;
      <D.11576>:
      iftmp.11 = utf16_space;
      goto <D.11578>;
      <D.11577>:
      iftmp.11 = 0B;
      <D.11578>:
      utf16_quote.12 = utf16_quote;
      D.11571 = sei->lpFile;
      utf16_quote.12 = utf16_quote;
      args = utf16_concat (utf16_quote.12, D.11571, utf16_quote.12, iftmp.11, D.11574, 0B);
      if (args == 0B) goto <D.11580>; else goto <D.11581>;
      <D.11580>:
      SetLastError (13);
      D.11570 = 0;
      return D.11570;
      <D.11581>:
      D.11582 = sei->lpDirectory;
      ret = CreateProcess (0B, args, 0B, 0B, 1, 1024, 0B, D.11582, 0B, &process_info);
      monoeg_g_free (args);
      if (ret == 0) goto <D.11583>; else goto <D.11584>;
      <D.11583>:
      D.11585 = GetLastError ();
      if (D.11585 == 14) goto <D.11586>; else goto <D.11587>;
      <D.11586>:
      D.11570 = ret;
      return D.11570;
      <D.11587>:
      <D.11584>:
      if (ret == 0) goto <D.11588>; else goto <D.11589>;
      <D.11588>:
      {
        static char * handler;
        static gunichar2 * handler_utf16;

        handler_utf16.13 = handler_utf16;
        if (handler_utf16.13 == 4294967295B) goto <D.11591>; else goto <D.11592>;
        <D.11591>:
        D.11570 = 0;
        return D.11570;
        <D.11592>:
        handler.14 = monoeg_g_find_program_in_path ("xdg-open");
        handler = handler.14;
        handler.15 = handler;
        if (handler.15 == 0B) goto <D.11595>; else goto <D.11596>;
        <D.11595>:
        handler.16 = monoeg_g_find_program_in_path ("gnome-open");
        handler = handler.16;
        handler.15 = handler;
        if (handler.15 == 0B) goto <D.11598>; else goto <D.11599>;
        <D.11598>:
        handler.17 = monoeg_g_find_program_in_path ("kfmclient");
        handler = handler.17;
        handler.15 = handler;
        if (handler.15 == 0B) goto <D.11601>; else goto <D.11602>;
        <D.11601>:
        handler_utf16 = 4294967295B;
        D.11570 = 0;
        return D.11570;
        <D.11602>:
        {
          char * old;

          old = handler;
          handler.18 = monoeg_g_strconcat (old, " exec", 0B);
          handler = handler.18;
          monoeg_g_free (old);
        }
        <D.11599>:
        <D.11596>:
        handler.15 = handler;
        handler_utf16.19 = monoeg_g_utf8_to_utf16 (handler.15, -1, 0B, 0B, 0B);
        handler_utf16 = handler_utf16.19;
        handler.15 = handler;
        monoeg_g_free (handler.15);
        D.11574 = sei->lpParameters;
        D.11574 = sei->lpParameters;
        if (D.11574 != 0B) goto <D.11606>; else goto <D.11607>;
        <D.11606>:
        iftmp.20 = utf16_space;
        goto <D.11608>;
        <D.11607>:
        iftmp.20 = 0B;
        <D.11608>:
        utf16_quote.12 = utf16_quote;
        D.11571 = sei->lpFile;
        utf16_quote.12 = utf16_quote;
        utf16_space.21 = utf16_space;
        handler_utf16.13 = handler_utf16;
        args = utf16_concat (handler_utf16.13, utf16_space.21, utf16_quote.12, D.11571, utf16_quote.12, iftmp.20, D.11574, 0B);
        if (args == 0B) goto <D.11610>; else goto <D.11611>;
        <D.11610>:
        SetLastError (13);
        D.11570 = 0;
        return D.11570;
        <D.11611>:
        D.11582 = sei->lpDirectory;
        ret = CreateProcess (0B, args, 0B, 0B, 1, 1024, 0B, D.11582, 0B, &process_info);
        monoeg_g_free (args);
        if (ret == 0) goto <D.11612>; else goto <D.11613>;
        <D.11612>:
        D.11614 = GetLastError ();
        if (D.11614 != 14) goto <D.11615>; else goto <D.11616>;
        <D.11615>:
        SetLastError (13);
        <D.11616>:
        D.11570 = 0;
        return D.11570;
        <D.11613>:
        D.11617 = process_info.hProcess;
        CloseHandle (D.11617);
        process_info.hProcess = 0B;
      }
      <D.11589>:
      D.11618 = sei->fMask;
      D.11619 = D.11618 & 64;
      if (D.11619 != 0) goto <D.11620>; else goto <D.11621>;
      <D.11620>:
      D.11617 = process_info.hProcess;
      sei->hProcess = D.11617;
      goto <D.11622>;
      <D.11621>:
      D.11617 = process_info.hProcess;
      CloseHandle (D.11617);
      <D.11622>:
      D.11570 = ret;
      return D.11570;
    }
  finally
    {
      process_info = {CLOBBER};
    }
}


utf16_concat (const gunichar2 * first)
{
  int D.11625;
  char * args.22;
  char * args.23;
  int D.11628;
  char * args.24;
  char * args.25;
  int D.11631;
  unsigned int D.11632;
  unsigned int D.11633;
  gunichar2 * D.11636;
  unsigned int total.26;
  unsigned int D.11638;
  gunichar2 * D.11639;
  int i.27;
  unsigned int i.28;
  unsigned int D.11642;
  gunichar2 * D.11643;
  short unsigned int D.11644;
  char * args.29;
  char * args.30;
  int i.31;
  unsigned int i.32;
  unsigned int D.11649;
  gunichar2 * D.11650;
  short unsigned int D.11651;
  char * args.33;
  char * args.34;
  char * args;
  int total;
  int i;
  const gunichar2 * s;
  gunichar2 * ret;

  try
    {
      total = 0;
      __builtin_va_start (&args, 0);
      D.11625 = len16 (first);
      total = D.11625 + total;
      args.22 = args;
      args.23 = args.22 + 4;
      args = args.23;
      s = MEM[(gunichar2 * *)args.22];
      goto <D.10800>;
      <D.10799>:
      D.11628 = len16 (s);
      total = D.11628 + total;
      args.24 = args;
      args.25 = args.24 + 4;
      args = args.25;
      s = MEM[(gunichar2 * *)args.24];
      <D.10800>:
      if (s != 0B) goto <D.10799>; else goto <D.10801>;
      <D.10801>:
      __builtin_va_end (&args);
      D.11631 = total + 1;
      D.11632 = (unsigned int) D.11631;
      D.11633 = D.11632 * 2;
      ret = monoeg_malloc (D.11633);
      if (ret == 0B) goto <D.11634>; else goto <D.11635>;
      <D.11634>:
      D.11636 = 0B;
      return D.11636;
      <D.11635>:
      total.26 = (unsigned int) total;
      D.11638 = total.26 * 2;
      D.11639 = ret + D.11638;
      *D.11639 = 0;
      i = 0;
      s = first;
      goto <D.10803>;
      <D.10802>:
      i.27 = i;
      i = i.27 + 1;
      i.28 = (unsigned int) i.27;
      D.11642 = i.28 * 2;
      D.11643 = ret + D.11642;
      D.11644 = *s;
      *D.11643 = D.11644;
      s = s + 2;
      <D.10803>:
      D.11644 = *s;
      if (D.11644 != 0) goto <D.10802>; else goto <D.10804>;
      <D.10804>:
      __builtin_va_start (&args, 0);
      args.29 = args;
      args.30 = args.29 + 4;
      args = args.30;
      s = MEM[(gunichar2 * *)args.29];
      goto <D.10810>;
      <D.10809>:
      {
        const gunichar2 * p;

        p = s;
        goto <D.10807>;
        <D.10806>:
        i.31 = i;
        i = i.31 + 1;
        i.32 = (unsigned int) i.31;
        D.11649 = i.32 * 2;
        D.11650 = ret + D.11649;
        D.11651 = *p;
        *D.11650 = D.11651;
        p = p + 2;
        <D.10807>:
        D.11651 = *p;
        if (D.11651 != 0) goto <D.10806>; else goto <D.10808>;
        <D.10808>:
      }
      args.33 = args;
      args.34 = args.33 + 4;
      args = args.34;
      s = MEM[(gunichar2 * *)args.33];
      <D.10810>:
      if (s != 0B) goto <D.10809>; else goto <D.10811>;
      <D.10811>:
      __builtin_va_end (&args);
      D.11636 = ret;
      return D.11636;
    }
  finally
    {
      args = {CLOBBER};
    }
}


len16 (const gunichar2 * str)
{
  const gunichar2 * str.35;
  short unsigned int D.11657;
  int D.11658;
  int len;

  len = 0;
  goto <D.10789>;
  <D.10788>:
  len = len + 1;
  <D.10789>:
  str.35 = str;
  str = str.35 + 2;
  D.11657 = *str.35;
  if (D.11657 != 0) goto <D.10788>; else goto <D.10790>;
  <D.10790>:
  D.11658 = len;
  return D.11658;
}


CreateProcessWithLogonW (const gunichar2 * username, const gunichar2 * domain, const gunichar2 * password, const guint32 logonFlags, const gunichar2 * appname, const gunichar2 * cmdline, guint32 create_flags, void * env, const gunichar2 * cwd, struct WapiStartupInfo * startup, struct WapiProcessInformation * process_info)
{
  gboolean D.11660;

  D.11660 = CreateProcess (appname, cmdline, 0B, 0B, 0, create_flags, env, cwd, startup, process_info);
  return D.11660;
}


CreateProcess (const gunichar2 * appname, const gunichar2 * cmdline, struct WapiSecurityAttributes * process_attrs, struct WapiSecurityAttributes * thread_attrs, gboolean inherit_handles, guint32 create_flags, void * new_environ, const gunichar2 * cwd, struct WapiStartupInfo * startup, struct WapiProcessInformation * process_info)
{
  const short unsigned int * * D.11676;
  const short unsigned int * D.11677;
  char D.11678;
  unsigned int D.11679;
  unsigned int D.11680;
  const short unsigned int * D.11681;
  short unsigned int D.11682;
  int D.11683;
  int D.11684;
  gchar * D.11687;
  char D.11688;
  unsigned int D.11691;
  unsigned int D.11692;
  const void * D.11693;
  unsigned int D.11694;
  sizetype D.11695;
  gchar * D.11696;
  char D.11697;
  int D.11700;
  int D.11704;
  char D.11708;
  _Bool D.11709;
  _Bool D.11710;
  _Bool D.11711;
  gchar * D.11714;
  char D.11715;
  sizetype D.11719;
  gchar * D.11720;
  char D.11721;
  unsigned int D.11723;
  unsigned int D.11724;
  const short unsigned int * D.11725;
  short unsigned int D.11726;
  int D.11727;
  int D.11728;
  unsigned int D.11729;
  const gchar * D.11730;
  unsigned int D.11733;
  unsigned int D.11734;
  const short unsigned int * D.11735;
  short unsigned int D.11736;
  int D.11737;
  int D.11738;
  char D.11743;
  char D.11748;
  unsigned int D.11749;
  unsigned int D.11750;
  const short unsigned int * D.11751;
  short unsigned int D.11752;
  int D.11753;
  int D.11754;
  gchar * D.11757;
  char D.11758;
  unsigned int D.11761;
  unsigned int D.11762;
  const void * D.11763;
  unsigned int D.11764;
  sizetype D.11765;
  gchar * D.11766;
  int D.11769;
  int D.11773;
  int D.11778;
  const gunichar2 * utf16_space.36;
  char D.11792;
  struct GError * gerr.37;
  gchar * D.11797;
  <unnamed type> D.11801;
  unsigned int D.11802;
  void * D.11804;
  void * D.11805;
  void * D.11806;
  void * D.11807;
  void * D.11808;
  void * D.11809;
  short unsigned int D.11814;
  unsigned int D.11815;
  unsigned int D.11816;
  unsigned int D.11817;
  gchar * * D.11818;
  gchar * D.11819;
  char * * environ.38;
  unsigned int D.11822;
  char * * D.11823;
  char * D.11824;
  gchar * D.11825;
  unsigned int handle.39;
  unsigned int D.11829;
  struct _WapiHandleUnshared * D.11830;
  unsigned int D.11831;
  unsigned int D.11832;
  unsigned int D.11833;
  gchar * D.11834;
  int D.11835;
  int D.11838;
  _Bool D.11839;
  long int D.11840;
  long int D.11841;
  int D.11848;
  int D.11853;
  int D.11854;
  int i.40;
  int D.11858;
  gchar * * argv.41;
  gchar * D.11862;
  struct _WapiHandle_process * process_handle_data.42;
  union MonoSemType * D.11866;
  int D.11867;
  int * D.11870;
  int D.11871;
  char * D.11872;
  int D.11874;
  struct MonoProcess * mono_processes.43;
  unsigned int pid.44;
  gboolean D.11897;
  gchar * cmd;
  gchar * prog;
  gchar * full_prog;
  gchar * args;
  gchar * args_after_prog;
  gchar * dir;
  gchar * * env_strings;
  gchar * * argv;
  guint32 i;
  guint32 env_count;
  gboolean ret;
  void * handle;
  struct _WapiHandle_process process_handle;
  struct _WapiHandle_process * process_handle_data;
  struct GError * gerr;
  int in_fd;
  int out_fd;
  int err_fd;
  pid_t pid;
  int thr_ret;
  int startup_pipe[2];
  int dummy;
  struct MonoProcess * mono_process;
  gboolean fork_failed;
  void free_strings = <<< error >>>;
  static const char __func__[14] = "CreateProcess";
  void cleanup = <<< error >>>;

  try
    {
      cmd = 0B;
      prog = 0B;
      full_prog = 0B;
      args = 0B;
      args_after_prog = 0B;
      dir = 0B;
      env_strings = 0B;
      argv = 0B;
      env_count = 0;
      ret = 0;
      process_handle = {};
      gerr = 0B;
      startup_pipe[0] = -1;
      startup_pipe[1] = -1;
      fork_failed = 0;
      mono_once (&process_ops_once, process_ops_init);
      mono_once (&process_sig_chld_once, process_add_sigchld_handler);
      if (appname != 0B) goto <D.11662>; else goto <D.11663>;
      <D.11662>:
      cmd = mono_unicode_to_external (appname);
      if (cmd == 0B) goto <D.11664>; else goto <D.11665>;
      <D.11664>:
      SetLastError (3);
      goto free_strings;
      <D.11665>:
      switchDirectorySeparators (cmd);
      <D.11663>:
      if (cmdline != 0B) goto <D.11666>; else goto <D.11667>;
      <D.11666>:
      args = mono_unicode_to_external (cmdline);
      if (args == 0B) goto <D.11668>; else goto <D.11669>;
      <D.11668>:
      SetLastError (3);
      goto free_strings;
      <D.11669>:
      <D.11667>:
      if (cwd != 0B) goto <D.11670>; else goto <D.11671>;
      <D.11670>:
      dir = mono_unicode_to_external (cwd);
      if (dir == 0B) goto <D.11672>; else goto <D.11673>;
      <D.11672>:
      SetLastError (3);
      goto free_strings;
      <D.11673>:
      switchDirectorySeparators (dir);
      <D.11671>:
      if (cmd != 0B) goto <D.11674>; else goto <D.11675>;
      <D.11674>:
      {
        gchar * unquoted;

        D.11676 = __ctype_b_loc ();
        D.11677 = *D.11676;
        D.11678 = *cmd;
        D.11679 = (unsigned int) D.11678;
        D.11680 = D.11679 * 2;
        D.11681 = D.11677 + D.11680;
        D.11682 = *D.11681;
        D.11683 = (int) D.11682;
        D.11684 = D.11683 & 1024;
        if (D.11684 != 0) goto <D.11685>; else goto <D.11686>;
        <D.11685>:
        D.11687 = cmd + 1;
        D.11688 = *D.11687;
        if (D.11688 == 58) goto <D.11689>; else goto <D.11690>;
        <D.11689>:
        D.11691 = strlen (cmd);
        D.11692 = D.11691 + 4294967294;
        D.11693 = cmd + 2;
        memmove (cmd, D.11693, D.11692);
        D.11694 = strlen (cmd);
        D.11695 = D.11694 + 4294967294;
        D.11696 = cmd + D.11695;
        *D.11696 = 0;
        <D.11690>:
        <D.11686>:
        unquoted = monoeg_g_shell_unquote (cmd, 0B);
        D.11697 = *unquoted;
        if (D.11697 == 47) goto <D.11698>; else goto <D.11699>;
        <D.11698>:
        prog = monoeg_strdup (unquoted);
        D.11700 = is_executable (prog);
        if (D.11700 == 0) goto <D.11701>; else goto <D.11702>;
        <D.11701>:
        monoeg_g_free (unquoted);
        SetLastError (2);
        goto free_strings;
        <D.11702>:
        goto <D.11703>;
        <D.11699>:
        {
          char * curdir;

          curdir = monoeg_g_get_current_dir ();
          prog = monoeg_g_strdup_printf ("%s/%s", curdir, unquoted);
          monoeg_g_free (curdir);
          D.11704 = is_executable (prog);
          if (D.11704 == 0) goto <D.11705>; else goto <D.11706>;
          <D.11705>:
          monoeg_g_free (unquoted);
          SetLastError (2);
          goto free_strings;
          <D.11706>:
        }
        <D.11703>:
        monoeg_g_free (unquoted);
        args_after_prog = args;
      }
      goto <D.11707>;
      <D.11675>:
      {
        gchar * token;
        char quote;

        token = 0B;
        args = monoeg_g_strchug (args);
        args_after_prog = args;
        D.11708 = *args;
        D.11709 = D.11708 == 34;
        D.11710 = D.11708 == 39;
        D.11711 = D.11709 | D.11710;
        if (D.11711 != 0) goto <D.11712>; else goto <D.11713>;
        <D.11712>:
        quote = *args;
        i = 1;
        goto <D.10907>;
        <D.10906>:
        i = i + 1;
        <D.10907>:
        D.11714 = args + i;
        D.11715 = *D.11714;
        if (D.11715 != 0) goto <D.11716>; else goto <D.10908>;
        <D.11716>:
        D.11714 = args + i;
        D.11715 = *D.11714;
        if (D.11715 != quote) goto <D.10906>; else goto <D.10908>;
        <D.10908>:
        D.11719 = i + 1;
        D.11720 = args + D.11719;
        D.11721 = *D.11720;
        if (D.11721 == 0) goto <D.11717>; else goto <D.11722>;
        <D.11722>:
        D.11676 = __ctype_b_loc ();
        D.11677 = *D.11676;
        D.11719 = i + 1;
        D.11720 = args + D.11719;
        D.11721 = *D.11720;
        D.11723 = (unsigned int) D.11721;
        D.11724 = D.11723 * 2;
        D.11725 = D.11677 + D.11724;
        D.11726 = *D.11725;
        D.11727 = (int) D.11726;
        D.11728 = D.11727 & 8192;
        if (D.11728 != 0) goto <D.11717>; else goto <D.11718>;
        <D.11717>:
        D.11729 = i + 4294967295;
        D.11730 = args + 1;
        token = monoeg_g_strndup (D.11730, D.11729);
        D.11719 = i + 1;
        D.11720 = args + D.11719;
        args_after_prog = monoeg_g_strchug (D.11720);
        <D.11718>:
        <D.11713>:
        if (token == 0B) goto <D.11731>; else goto <D.11732>;
        <D.11731>:
        i = 0;
        goto <D.10911>;
        <D.10910>:
        D.11676 = __ctype_b_loc ();
        D.11677 = *D.11676;
        D.11714 = args + i;
        D.11715 = *D.11714;
        D.11733 = (unsigned int) D.11715;
        D.11734 = D.11733 * 2;
        D.11735 = D.11677 + D.11734;
        D.11736 = *D.11735;
        D.11737 = (int) D.11736;
        D.11738 = D.11737 & 8192;
        if (D.11738 != 0) goto <D.11739>; else goto <D.11740>;
        <D.11739>:
        token = monoeg_g_strndup (args, i);
        D.11719 = i + 1;
        args_after_prog = args + D.11719;
        goto <D.10909>;
        <D.11740>:
        i = i + 1;
        <D.10911>:
        D.11714 = args + i;
        D.11715 = *D.11714;
        if (D.11715 != 0) goto <D.10910>; else goto <D.10909>;
        <D.10909>:
        <D.11732>:
        if (token == 0B) goto <D.11741>; else goto <D.11742>;
        <D.11741>:
        D.11743 = *args;
        if (D.11743 != 0) goto <D.11744>; else goto <D.11745>;
        <D.11744>:
        token = monoeg_strdup (args);
        args_after_prog = 0B;
        <D.11745>:
        <D.11742>:
        if (token == 0B) goto <D.11746>; else goto <D.11747>;
        <D.11746>:
        SetLastError (3);
        goto free_strings;
        <D.11747>:
        switchDirectorySeparators (token);
        D.11676 = __ctype_b_loc ();
        D.11677 = *D.11676;
        D.11748 = *token;
        D.11749 = (unsigned int) D.11748;
        D.11750 = D.11749 * 2;
        D.11751 = D.11677 + D.11750;
        D.11752 = *D.11751;
        D.11753 = (int) D.11752;
        D.11754 = D.11753 & 1024;
        if (D.11754 != 0) goto <D.11755>; else goto <D.11756>;
        <D.11755>:
        D.11757 = token + 1;
        D.11758 = *D.11757;
        if (D.11758 == 58) goto <D.11759>; else goto <D.11760>;
        <D.11759>:
        D.11761 = strlen (token);
        D.11762 = D.11761 + 4294967294;
        D.11763 = token + 2;
        memmove (token, D.11763, D.11762);
        D.11764 = strlen (token);
        D.11765 = D.11764 + 4294967294;
        D.11766 = token + D.11765;
        *D.11766 = 0;
        <D.11760>:
        <D.11756>:
        D.11748 = *token;
        if (D.11748 == 47) goto <D.11767>; else goto <D.11768>;
        <D.11767>:
        prog = monoeg_strdup (token);
        D.11769 = is_executable (prog);
        if (D.11769 == 0) goto <D.11770>; else goto <D.11771>;
        <D.11770>:
        monoeg_g_free (token);
        SetLastError (2);
        goto free_strings;
        <D.11771>:
        goto <D.11772>;
        <D.11768>:
        {
          char * curdir;

          curdir = monoeg_g_get_current_dir ();
          prog = monoeg_g_strdup_printf ("%s/%s", curdir, token);
          monoeg_g_free (curdir);
          D.11773 = is_executable (prog);
          if (D.11773 == 0) goto <D.11774>; else goto <D.11775>;
          <D.11774>:
          monoeg_g_free (prog);
          prog = monoeg_g_find_program_in_path (token);
          if (prog == 0B) goto <D.11776>; else goto <D.11777>;
          <D.11776>:
          monoeg_g_free (token);
          SetLastError (2);
          goto free_strings;
          <D.11777>:
          <D.11775>:
        }
        <D.11772>:
        monoeg_g_free (token);
      }
      <D.11707>:
      D.11778 = is_managed_binary (prog);
      if (D.11778 != 0) goto <D.11779>; else goto <D.11780>;
      <D.11779>:
      {
        gunichar2 * newapp;
        gunichar2 * newcmd;
        gsize bytes_ignored;

        try
          {
            newapp = mono_unicode_from_external ("mono", &bytes_ignored);
            if (newapp != 0B) goto <D.11781>; else goto <D.11782>;
            <D.11781>:
            if (appname != 0B) goto <D.11783>; else goto <D.11784>;
            <D.11783>:
            utf16_space.36 = utf16_space;
            utf16_space.36 = utf16_space;
            newcmd = utf16_concat (newapp, utf16_space.36, appname, utf16_space.36, cmdline, 0B);
            goto <D.11786>;
            <D.11784>:
            utf16_space.36 = utf16_space;
            newcmd = utf16_concat (newapp, utf16_space.36, cmdline, 0B);
            <D.11786>:
            monoeg_g_free (newapp);
            if (newcmd != 0B) goto <D.11787>; else goto <D.11788>;
            <D.11787>:
            ret = CreateProcess (0B, newcmd, process_attrs, thread_attrs, inherit_handles, create_flags, new_environ, cwd, startup, process_info);
            monoeg_g_free (newcmd);
            goto free_strings;
            <D.11788>:
            <D.11782>:
          }
        finally
          {
            bytes_ignored = {CLOBBER};
          }
      }
      <D.11780>:
      if (args_after_prog != 0B) goto <D.11791>; else goto <D.11789>;
      <D.11791>:
      D.11792 = *args_after_prog;
      if (D.11792 != 0) goto <D.11793>; else goto <D.11789>;
      <D.11793>:
      {
        gchar * qprog;

        qprog = monoeg_g_shell_quote (prog);
        full_prog = monoeg_g_strconcat (qprog, " ", args_after_prog, 0B);
        monoeg_g_free (qprog);
      }
      goto <D.11790>;
      <D.11789>:
      full_prog = monoeg_g_shell_quote (prog);
      <D.11790>:
      ret = monoeg_g_shell_parse_argv (full_prog, 0B, &argv, &gerr);
      if (ret == 0) goto <D.11794>; else goto <D.11795>;
      <D.11794>:
      gerr.37 = gerr;
      D.11797 = gerr.37->message;
      monoeg_g_log (0B, 32, "CreateProcess: %s\n", D.11797);
      gerr.37 = gerr;
      monoeg_g_error_free (gerr.37);
      gerr = 0B;
      goto free_strings;
      <D.11795>:
      if (startup != 0B) goto <D.11800>; else goto <D.11798>;
      <D.11800>:
      D.11801 = startup->dwFlags;
      D.11802 = D.11801 & 256;
      if (D.11802 != 0) goto <D.11803>; else goto <D.11798>;
      <D.11803>:
      D.11804 = startup->hStdInput;
      in_fd = (int) D.11804;
      D.11805 = startup->hStdOutput;
      out_fd = (int) D.11805;
      D.11806 = startup->hStdError;
      err_fd = (int) D.11806;
      goto <D.11799>;
      <D.11798>:
      D.11807 = GetStdHandle (-10);
      in_fd = (int) D.11807;
      D.11808 = GetStdHandle (-11);
      out_fd = (int) D.11808;
      D.11809 = GetStdHandle (-12);
      err_fd = (int) D.11809;
      <D.11799>:
      monoeg_g_strlcpy (&process_handle.proc_name, prog, 255);
      process_set_defaults (&process_handle);
      handle = _wapi_handle_new (9, &process_handle);
      if (handle == 4294967295B) goto <D.11810>; else goto <D.11811>;
      <D.11810>:
      monoeg_g_log (0B, 16, "%s: error creating process handle", &__func__);
      ret = 0;
      SetLastError (14);
      goto free_strings;
      <D.11811>:
      if (new_environ != 0B) goto <D.11812>; else goto <D.11813>;
      <D.11812>:
      {
        gunichar2 * new_environp;

        new_environp = new_environ;
        goto <D.10923>;
        <D.10922>:
        env_count = env_count + 1;
        goto <D.10920>;
        <D.10919>:
        new_environp = new_environp + 2;
        <D.10920>:
        D.11814 = *new_environp;
        if (D.11814 != 0) goto <D.10919>; else goto <D.10921>;
        <D.10921>:
        new_environp = new_environp + 2;
        <D.10923>:
        D.11814 = *new_environp;
        if (D.11814 != 0) goto <D.10922>; else goto <D.10924>;
        <D.10924>:
        D.11815 = env_count + 2;
        D.11816 = D.11815 * 4;
        env_strings = monoeg_malloc0 (D.11816);
        env_count = 0;
        new_environp = new_environ;
        goto <D.10929>;
        <D.10928>:
        D.11817 = env_count * 4;
        D.11818 = env_strings + D.11817;
        D.11819 = mono_unicode_to_external (new_environp);
        *D.11818 = D.11819;
        env_count = env_count + 1;
        goto <D.10926>;
        <D.10925>:
        new_environp = new_environp + 2;
        <D.10926>:
        D.11814 = *new_environp;
        if (D.11814 != 0) goto <D.10925>; else goto <D.10927>;
        <D.10927>:
        new_environp = new_environp + 2;
        <D.10929>:
        D.11814 = *new_environp;
        if (D.11814 != 0) goto <D.10928>; else goto <D.10930>;
        <D.10930>:
      }
      goto <D.11820>;
      <D.11813>:
      i = 0;
      goto <D.10932>;
      <D.10931>:
      env_count = env_count + 1;
      i = i + 1;
      <D.10932>:
      environ.38 = environ;
      D.11822 = i * 4;
      D.11823 = environ.38 + D.11822;
      D.11824 = *D.11823;
      if (D.11824 != 0B) goto <D.10931>; else goto <D.10933>;
      <D.10933>:
      D.11815 = env_count + 2;
      D.11816 = D.11815 * 4;
      env_strings = monoeg_malloc0 (D.11816);
      env_count = 0;
      i = 0;
      goto <D.10935>;
      <D.10934>:
      D.11817 = env_count * 4;
      D.11818 = env_strings + D.11817;
      environ.38 = environ;
      D.11822 = i * 4;
      D.11823 = environ.38 + D.11822;
      D.11824 = *D.11823;
      D.11825 = monoeg_strdup (D.11824);
      *D.11818 = D.11825;
      env_count = env_count + 1;
      i = i + 1;
      <D.10935>:
      environ.38 = environ;
      D.11822 = i * 4;
      D.11823 = environ.38 + D.11822;
      D.11824 = *D.11823;
      if (D.11824 != 0B) goto <D.10934>; else goto <D.10936>;
      <D.10936>:
      <D.11820>:
      if (env_strings != 0B) goto <D.11826>; else goto <D.11827>;
      <D.11826>:
      {
        struct _WapiHandleUnshared * handle_data;
        struct _WapiHandle_shared_ref * ref;

        handle.39 = (unsigned int) handle;
        D.11829 = handle.39 / 256;
        D.11830 = _wapi_private_handles[D.11829];
        handle.39 = (unsigned int) handle;
        D.11831 = handle.39 & 255;
        D.11832 = D.11831 * 136;
        handle_data = D.11830 + D.11832;
        ref = &handle_data->u.shared;
        D.11817 = env_count * 4;
        D.11818 = env_strings + D.11817;
        D.11833 = ref->offset;
        D.11834 = monoeg_g_strdup_printf ("_WAPI_PROCESS_HANDLE_OFFSET=%d", D.11833);
        *D.11818 = D.11834;
      }
      <D.11827>:
      D.11835 = pipe (&startup_pipe);
      if (D.11835 == -1) goto <D.11836>; else goto <D.11837>;
      <D.11836>:
      startup_pipe[1] = -1;
      D.11838 = startup_pipe[1];
      startup_pipe[0] = D.11838;
      <D.11837>:
      thr_ret = _wapi_handle_lock_shared_handles ();
      D.11839 = thr_ret != 0;
      D.11840 = (long int) D.11839;
      D.11841 = __builtin_expect (D.11840, 0);
      if (D.11841 != 0) goto <D.11842>; else goto <D.11843>;
      <D.11842>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "processes.c", 965, "thr_ret == 0");
      <D.11843>:
      pid = fork ();
      if (pid == -1) goto <D.11844>; else goto <D.11845>;
      <D.11844>:
      SetLastError (14);
      ret = 0;
      fork_failed = 1;
      goto cleanup;
      <D.11845>:
      if (pid == 0) goto <D.11846>; else goto <D.11847>;
      <D.11846>:
      D.11848 = startup_pipe[0];
      if (D.11848 != -1) goto <D.11849>; else goto <D.11850>;
      <D.11849>:
      {
        ssize_t _i;

        D.11848 = startup_pipe[0];
        _i = read (D.11848, &dummy, 1);
        D.11848 = startup_pipe[0];
        close (D.11848);
        D.11838 = startup_pipe[1];
        close (D.11838);
      }
      <D.11850>:
      dup2 (in_fd, 0);
      dup2 (out_fd, 1);
      dup2 (err_fd, 2);
      if (inherit_handles != 1) goto <D.11851>; else goto <D.11852>;
      <D.11851>:
      <D.11852>:
      D.11853 = getdtablesize ();
      D.11854 = D.11853 + -1;
      i = (guint32) D.11854;
      goto <D.10942>;
      <D.10941>:
      i.40 = (int) i;
      close (i.40);
      i = i + 4294967295;
      <D.10942>:
      if (i > 2) goto <D.10941>; else goto <D.10943>;
      <D.10943>:
      if (dir != 0B) goto <D.11856>; else goto <D.11857>;
      <D.11856>:
      D.11858 = chdir (dir);
      if (D.11858 == -1) goto <D.11859>; else goto <D.11860>;
      <D.11859>:
      _exit (-1);
      <D.11860>:
      <D.11857>:
      argv.41 = argv;
      argv.41 = argv;
      D.11862 = *argv.41;
      execve (D.11862, argv.41, env_strings);
      _exit (-1);
      <D.11847>:
      ret = _wapi_lookup_handle (handle, 9, &process_handle_data);
      if (ret == 0) goto <D.11863>; else goto <D.11864>;
      <D.11863>:
      monoeg_g_log (0B, 16, "%s: error looking up process handle %p", &__func__, handle);
      _wapi_handle_unref (handle);
      goto cleanup;
      <D.11864>:
      process_handle_data.42 = process_handle_data;
      process_handle_data.42->id = pid;
      mono_process = monoeg_malloc0 (36);
      mono_process->pid = pid;
      mono_process->handle_count = 1;
      D.11866 = &mono_process->exit_sem;
      D.11867 = sem_init (D.11866, 0, 0);
      if (D.11867 != 0) goto <D.11868>; else goto <D.11869>;
      <D.11868>:
      D.11870 = __errno_location ();
      D.11871 = *D.11870;
      D.11872 = strerror (D.11871);
      monoeg_g_log (0B, 16, "%s: could not create exit semaphore for process.", D.11872);
      monoeg_g_free (mono_process);
      goto <D.11873>;
      <D.11869>:
      _wapi_handle_ref (handle);
      mono_process->handle = handle;
      process_handle_data.42 = process_handle_data;
      D.11874 = _wapi_getpid ();
      process_handle_data.42->self = D.11874;
      process_handle_data.42 = process_handle_data;
      process_handle_data.42->mono_process = mono_process;
      pthread_mutex_lock (&mono_processes_mutex);
      mono_processes.43 = mono_processes;
      mono_process->next = mono_processes.43;
      mono_processes = mono_process;
      pthread_mutex_unlock (&mono_processes_mutex);
      <D.11873>:
      if (process_info != 0B) goto <D.11876>; else goto <D.11877>;
      <D.11876>:
      process_info->hProcess = handle;
      pid.44 = (unsigned int) pid;
      process_info->dwProcessId = pid.44;
      process_info->hThread = 4294967295B;
      process_info->dwThreadId = 0;
      <D.11877>:
      cleanup:
      _wapi_handle_unlock_shared_handles ();
      if (fork_failed != 0) goto <D.11879>; else goto <D.11880>;
      <D.11879>:
      _wapi_handle_unref (handle);
      <D.11880>:
      D.11838 = startup_pipe[1];
      if (D.11838 != -1) goto <D.11881>; else goto <D.11882>;
      <D.11881>:
      {
        ssize_t _i;

        D.11838 = startup_pipe[1];
        _i = write (D.11838, &startup_pipe, 1);
        D.11848 = startup_pipe[0];
        close (D.11848);
        D.11838 = startup_pipe[1];
        close (D.11838);
      }
      <D.11882>:
      free_strings:
      if (cmd != 0B) goto <D.11883>; else goto <D.11884>;
      <D.11883>:
      monoeg_g_free (cmd);
      <D.11884>:
      if (full_prog != 0B) goto <D.11885>; else goto <D.11886>;
      <D.11885>:
      monoeg_g_free (full_prog);
      <D.11886>:
      if (prog != 0B) goto <D.11887>; else goto <D.11888>;
      <D.11887>:
      monoeg_g_free (prog);
      <D.11888>:
      if (args != 0B) goto <D.11889>; else goto <D.11890>;
      <D.11889>:
      monoeg_g_free (args);
      <D.11890>:
      if (dir != 0B) goto <D.11891>; else goto <D.11892>;
      <D.11891>:
      monoeg_g_free (dir);
      <D.11892>:
      if (env_strings != 0B) goto <D.11893>; else goto <D.11894>;
      <D.11893>:
      monoeg_g_strfreev (env_strings);
      <D.11894>:
      argv.41 = argv;
      if (argv.41 != 0B) goto <D.11895>; else goto <D.11896>;
      <D.11895>:
      argv.41 = argv;
      monoeg_g_strfreev (argv.41);
      <D.11896>:
      mono_processes_cleanup ();
      D.11897 = ret;
      return D.11897;
    }
  finally
    {
      argv = {CLOBBER};
      process_handle = {CLOBBER};
      process_handle_data = {CLOBBER};
      gerr = {CLOBBER};
      startup_pipe = {CLOBBER};
      dummy = {CLOBBER};
    }
}


process_add_sigchld_handler ()
{
  int D.11902;
  _Bool D.11903;
  long int D.11904;
  long int D.11905;
  struct sigaction sa;

  try
    {
      sa.__sigaction_handler.sa_sigaction = mono_sigchld_signal_handler;
      sigemptyset (&sa.sa_mask);
      sa.sa_flags = 5;
      D.11902 = sigaction (17, &sa, &previous_chld_sa);
      D.11903 = D.11902 == -1;
      D.11904 = (long int) D.11903;
      D.11905 = __builtin_expect (D.11904, 0);
      if (D.11905 != 0) goto <D.11906>; else goto <D.11907>;
      <D.11906>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "processes.c", 2887, "sigaction (SIGCHLD, &sa, &previous_chld_sa) != -1");
      <D.11907>:
    }
  finally
    {
      sa = {CLOBBER};
    }
}


mono_sigchld_signal_handler (int _dummy, struct siginfo_t * info, void * context)
{
  int * D.11909;
  int D.11910;
  int D.11912;
  int status.45;
  union MonoSemType * D.11916;
  int status;
  int pid;
  struct MonoProcess * p;

  try
    {
      InterlockedIncrement (&mono_processes_read_lock);
      <D.11341>:
      <D.11335>:
      pid = waitpid (-1, &status, 1);
      if (pid == -1) goto <D.11908>; else goto <D.11336>;
      <D.11908>:
      D.11909 = __errno_location ();
      D.11910 = *D.11909;
      if (D.11910 == 4) goto <D.11335>; else goto <D.11336>;
      <D.11336>:
      if (pid <= 0) goto <D.11337>; else goto <D.11911>;
      <D.11911>:
      p = mono_processes;
      goto <D.11340>;
      <D.11339>:
      D.11912 = p->pid;
      if (D.11912 == pid) goto <D.11913>; else goto <D.11914>;
      <D.11913>:
      p->pid = 0;
      status.45 = status;
      p->status = status.45;
      D.11916 = &p->exit_sem;
      mono_sem_post (D.11916);
      goto <D.11338>;
      <D.11914>:
      p = p->next;
      <D.11340>:
      if (p != 0B) goto <D.11339>; else goto <D.11338>;
      <D.11338>:
      goto <D.11341>;
      <D.11337>:
      InterlockedDecrement (&mono_processes_read_lock);
    }
  finally
    {
      status = {CLOBBER};
    }
}


InterlockedIncrement (volatile gint32 * val)
{
  gint32 D.11917;
  unsigned int D.11918;

  D.11918 = __sync_add_and_fetch_4 (val, 1);
  D.11917 = (gint32) D.11918;
  return D.11917;
}


process_ops_init ()
{
  _wapi_handle_register_capabilities (9, 9);
}


switchDirectorySeparators (gchar * path)
{
  gchar * D.11920;
  char D.11921;
  unsigned int D.11924;
  sizetype D.11927;
  gchar * D.11928;
  char D.11929;
  size_t i;
  size_t pathLength;

  pathLength = strlen (path);
  i = 0;
  goto <D.10863>;
  <D.10862>:
  D.11920 = path + i;
  D.11921 = *D.11920;
  if (D.11921 == 92) goto <D.11922>; else goto <D.11923>;
  <D.11922>:
  D.11924 = pathLength + 4294967295;
  if (D.11924 > i) goto <D.11925>; else goto <D.11926>;
  <D.11925>:
  D.11927 = i + 1;
  D.11928 = path + D.11927;
  D.11929 = *D.11928;
  if (D.11929 != 39) goto <D.11930>; else goto <D.11931>;
  <D.11930>:
  D.11920 = path + i;
  *D.11920 = 47;
  <D.11931>:
  <D.11926>:
  <D.11923>:
  i = i + 1;
  <D.10863>:
  if (i < pathLength) goto <D.10862>; else goto <D.10864>;
  <D.10864>:
}


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

  D.11933 = __builtin_object_size (__dest, 0);
  D.11932 = __builtin___memmove_chk (__dest, __src, __len, D.11933);
  return D.11932;
}


is_executable (const char * prog)
{
  int D.11935;
  gboolean D.11938;
  int D.11939;
  unsigned int D.11942;
  unsigned int D.11943;
  struct stat buf;

  try
    {
      D.11935 = access (prog, 1);
      if (D.11935 != 0) goto <D.11936>; else goto <D.11937>;
      <D.11936>:
      D.11938 = 0;
      return D.11938;
      <D.11937>:
      D.11939 = stat (prog, &buf);
      if (D.11939 != 0) goto <D.11940>; else goto <D.11941>;
      <D.11940>:
      D.11938 = 0;
      return D.11938;
      <D.11941>:
      D.11942 = buf.st_mode;
      D.11943 = D.11942 & 61440;
      if (D.11943 == 32768) goto <D.11944>; else goto <D.11945>;
      <D.11944>:
      D.11938 = 1;
      return D.11938;
      <D.11945>:
      D.11938 = 0;
      return D.11938;
    }
  finally
    {
      buf = {CLOBBER};
    }
}


stat (const char * __path, struct stat * __statbuf)
{
  int D.11948;

  D.11948 = __xstat (3, __path, __statbuf);
  return D.11948;
}


is_managed_binary (const gchar * filename)
{
  int * D.11950;
  gboolean D.11953;
  unsigned char D.11956;
  unsigned char D.11958;
  int D.11962;
  int D.11963;
  int D.11964;
  int D.11965;
  unsigned char D.11966;
  int D.11967;
  int D.11968;
  int D.11969;
  unsigned char D.11970;
  int D.11971;
  int D.11972;
  int D.11973;
  long long int D.11974;
  long long int D.11982;
  long long int D.11986;
  unsigned char * D.11988;
  unsigned char * D.11989;
  _Bool D.11990;
  _Bool D.11991;
  _Bool D.11992;
  int original_errno;
  int file;
  off_t new_offset;
  unsigned char buffer[8];
  off_t file_size;
  off_t optional_header_offset;
  off_t pe_header_offset;
  gboolean managed;
  int num_read;
  guint32 first_word;
  guint32 second_word;
  void leave = <<< error >>>;

  try
    {
      D.11950 = __errno_location ();
      original_errno = *D.11950;
      file = open (filename, 32768);
      managed = 0;
      if (file < 0) goto <D.11951>; else goto <D.11952>;
      <D.11951>:
      D.11950 = __errno_location ();
      *D.11950 = original_errno;
      D.11953 = 0;
      return D.11953;
      <D.11952>:
      file_size = lseek (file, 0, 2);
      lseek (file, 0, 0);
      if (file_size <= 63) goto leave; else goto <D.11954>;
      <D.11954>:
      num_read = read (file, &buffer, 2);
      if (num_read != 2) goto leave; else goto <D.11955>;
      <D.11955>:
      D.11956 = buffer[0];
      if (D.11956 != 77) goto leave; else goto <D.11957>;
      <D.11957>:
      D.11958 = buffer[1];
      if (D.11958 != 90) goto leave; else goto <D.11959>;
      <D.11959>:
      new_offset = lseek (file, 60, 0);
      if (new_offset != 60) goto leave; else goto <D.11960>;
      <D.11960>:
      num_read = read (file, &buffer, 4);
      if (num_read != 4) goto leave; else goto <D.11961>;
      <D.11961>:
      D.11956 = buffer[0];
      D.11962 = (int) D.11956;
      D.11958 = buffer[1];
      D.11963 = (int) D.11958;
      D.11964 = D.11963 << 8;
      D.11965 = D.11962 | D.11964;
      D.11966 = buffer[2];
      D.11967 = (int) D.11966;
      D.11968 = D.11967 << 16;
      D.11969 = D.11965 | D.11968;
      D.11970 = buffer[3];
      D.11971 = (int) D.11970;
      D.11972 = D.11971 << 24;
      D.11973 = D.11969 | D.11972;
      pe_header_offset = (off_t) D.11973;
      D.11974 = pe_header_offset + 23;
      if (D.11974 >= file_size) goto leave; else goto <D.11975>;
      <D.11975>:
      new_offset = lseek (file, pe_header_offset, 0);
      if (new_offset != pe_header_offset) goto leave; else goto <D.11976>;
      <D.11976>:
      num_read = read (file, &buffer, 4);
      if (num_read != 4) goto leave; else goto <D.11977>;
      <D.11977>:
      D.11956 = buffer[0];
      if (D.11956 != 80) goto leave; else goto <D.11978>;
      <D.11978>:
      D.11958 = buffer[1];
      if (D.11958 != 69) goto leave; else goto <D.11979>;
      <D.11979>:
      D.11966 = buffer[2];
      if (D.11966 != 0) goto leave; else goto <D.11980>;
      <D.11980>:
      D.11970 = buffer[3];
      if (D.11970 != 0) goto leave; else goto <D.11981>;
      <D.11981>:
      D.11982 = pe_header_offset + 20;
      new_offset = lseek (file, D.11982, 0);
      D.11982 = pe_header_offset + 20;
      if (D.11982 != new_offset) goto leave; else goto <D.11983>;
      <D.11983>:
      num_read = read (file, &buffer, 2);
      if (num_read != 2) goto leave; else goto <D.11984>;
      <D.11984>:
      D.11956 = buffer[0];
      D.11962 = (int) D.11956;
      D.11958 = buffer[1];
      D.11963 = (int) D.11958;
      D.11964 = D.11963 << 8;
      D.11965 = D.11962 | D.11964;
      if (D.11965 <= 215) goto leave; else goto <D.11985>;
      <D.11985>:
      optional_header_offset = pe_header_offset + 24;
      D.11986 = optional_header_offset + 208;
      new_offset = lseek (file, D.11986, 0);
      D.11986 = optional_header_offset + 208;
      if (D.11986 != new_offset) goto leave; else goto <D.11987>;
      <D.11987>:
      num_read = read (file, &buffer, 8);
      D.11988 = &buffer[0];
      first_word = MEM[(guint32 *)D.11988];
      D.11989 = &buffer[4];
      second_word = MEM[(guint32 *)D.11989];
      D.11990 = num_read != 8;
      D.11991 = first_word == 0;
      D.11992 = D.11990 | D.11991;
      if (D.11992 != 0) goto leave; else goto <D.11993>;
      <D.11993>:
      if (second_word == 0) goto leave; else goto <D.11994>;
      <D.11994>:
      managed = 1;
      leave:
      close (file);
      D.11950 = __errno_location ();
      *D.11950 = original_errno;
      D.11953 = managed;
      return D.11953;
    }
  finally
    {
      buffer = {CLOBBER};
    }
}


open (const char * __path, int __oflag)
{
  int D.11997;
  int D.12000;
  int D.12005;
  int D.12007;
  int D.12008;
  int D.12011;
  int D.12012;

  D.11997 = __builtin_va_arg_pack_len ();
  if (D.11997 > 1) goto <D.11998>; else goto <D.11999>;
  <D.11998>:
  __open_too_many_args ();
  <D.11999>:
  D.12000 = __builtin_constant_p (__oflag);
  if (D.12000 != 0) goto <D.12001>; else goto <D.12002>;
  <D.12001>:
  D.12005 = __oflag & 64;
  if (D.12005 != 0) goto <D.12003>; else goto <D.12006>;
  <D.12006>:
  D.12007 = __oflag & 4259840;
  if (D.12007 == 4259840) goto <D.12003>; else goto <D.12004>;
  <D.12003>:
  D.12008 = __builtin_va_arg_pack_len ();
  if (D.12008 <= 0) goto <D.12009>; else goto <D.12010>;
  <D.12009>:
  __open_missing_mode ();
  D.12011 = __open_2 (__path, __oflag);
  return D.12011;
  <D.12010>:
  <D.12004>:
  D.12011 = __open_alias (__path, __oflag, __builtin_va_arg_pack ());
  return D.12011;
  <D.12002>:
  D.12012 = __builtin_va_arg_pack_len ();
  if (D.12012 <= 0) goto <D.12013>; else goto <D.12014>;
  <D.12013>:
  D.12011 = __open_2 (__path, __oflag);
  return D.12011;
  <D.12014>:
  D.12011 = __open_alias (__path, __oflag, __builtin_va_arg_pack ());
  return D.12011;
}


process_set_defaults (struct _WapiHandle_process * process_handle)
{
  struct WapiFileTime * D.12016;
  long int D.12017;

  process_handle->min_working_set = 204800;
  process_handle->max_working_set = 1413120;
  D.12016 = &process_handle->create_time;
  D.12017 = time (0B);
  _wapi_time_t_to_filetime (D.12017, D.12016);
}


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

  if (str != 0B) goto <D.12018>; else goto <D.12019>;
  <D.12018>:
  D.12020 = __strdup (str);
  return D.12020;
  <D.12019>:
  D.12020 = 0B;
  return D.12020;
}


read (int __fd, void * __buf, size_t __nbytes)
{
  unsigned int D.12022;
  int D.12025;
  ssize_t D.12028;
  unsigned int D.12029;
  unsigned int D.12030;
  unsigned int D.12033;

  D.12022 = __builtin_object_size (__buf, 0);
  if (D.12022 != 4294967295) goto <D.12023>; else goto <D.12024>;
  <D.12023>:
  D.12025 = __builtin_constant_p (__nbytes);
  if (D.12025 == 0) goto <D.12026>; else goto <D.12027>;
  <D.12026>:
  D.12029 = __builtin_object_size (__buf, 0);
  D.12028 = __read_chk (__fd, __buf, __nbytes, D.12029);
  return D.12028;
  <D.12027>:
  D.12030 = __builtin_object_size (__buf, 0);
  if (D.12030 < __nbytes) goto <D.12031>; else goto <D.12032>;
  <D.12031>:
  D.12033 = __builtin_object_size (__buf, 0);
  D.12028 = __read_chk_warn (__fd, __buf, __nbytes, D.12033);
  return D.12028;
  <D.12032>:
  <D.12024>:
  D.12028 = __read_alias (__fd, __buf, __nbytes);
  return D.12028;
}


_wapi_process_duplicate ()
{
  void * current_process.46;
  void * D.12036;

  mono_once (&process_current_once, process_set_current);
  current_process.46 = current_process;
  _wapi_handle_ref (current_process.46);
  D.12036 = current_process;
  return D.12036;
}


process_set_current ()
{
  int D.12040;
  unsigned int D.12041;
  void * current_process.47;
  void * current_process.48;
  struct _WapiHandle_process * process_handlep.49;
  int D.12047;
  int D.10971;
  int iftmp.50;
  int D.10970;
  const char[5] * D.12053;
  unsigned char D.12054;
  int D.12055;
  unsigned char D.12056;
  int D.12057;
  _Bool D.12058;
  _Bool D.12059;
  _Bool D.12060;
  const unsigned char * D.12063;
  unsigned char D.12064;
  int D.12065;
  const unsigned char * D.12066;
  unsigned char D.12067;
  int D.12068;
  _Bool D.12069;
  _Bool D.12070;
  const unsigned char * D.12073;
  unsigned char D.12074;
  int D.12075;
  const unsigned char * D.12076;
  unsigned char D.12077;
  int D.12078;
  _Bool D.12079;
  _Bool D.12080;
  const unsigned char * D.12083;
  unsigned char D.12084;
  int D.12085;
  const unsigned char * D.12086;
  unsigned char D.12087;
  int D.12088;
  void * current_process.51;
  pid_t pid;
  const char * handle_env;
  struct _WapiHandle_process process_handle;
  static const char __func__[20] = "process_set_current";

  try
    {
      pid = _wapi_getpid ();
      process_handle = {};
      mono_once (&process_ops_once, process_ops_init);
      handle_env = monoeg_g_getenv ("_WAPI_PROCESS_HANDLE_OFFSET");
      monoeg_g_unsetenv ("_WAPI_PROCESS_HANDLE_OFFSET");
      if (handle_env != 0B) goto <D.12038>; else goto <D.12039>;
      <D.12038>:
      {
        struct _WapiHandle_process * process_handlep;
        gchar * procname;
        gboolean ok;

        try
          {
            procname = 0B;
            D.12040 = atoi (handle_env);
            D.12041 = (unsigned int) D.12040;
            current_process.47 = _wapi_handle_new_from_offset (9, D.12041, 1);
            current_process = current_process.47;
            current_process.48 = current_process;
            ok = _wapi_lookup_handle (current_process.48, 9, &process_handlep);
            if (ok != 0) goto <D.12044>; else goto <D.12045>;
            <D.12044>:
            process_handlep.49 = process_handlep;
            D.12047 = process_handlep.49->id;
            if (D.12047 == pid) goto <D.12048>; else goto <D.12049>;
            <D.12048>:
            process_handlep.49 = process_handlep;
            procname = &process_handlep.49->proc_name;
            {
              size_t __s1_len;
              size_t __s2_len;

              __s2_len = 4;
              if (__s2_len <= 3) goto <D.12051>; else goto <D.12052>;
              <D.12051>:
              {
                const unsigned char * __s2;
                int __result;

                __s2 = procname;
                D.12053 = "mono";
                D.12054 = MEM[(const unsigned char *)D.12053];
                D.12055 = (int) D.12054;
                D.12056 = *__s2;
                D.12057 = (int) D.12056;
                __result = D.12055 - D.12057;
                {
                  D.12058 = __s2_len != 0;
                  D.12059 = __result == 0;
                  D.12060 = D.12058 & D.12059;
                  if (D.12060 != 0) goto <D.12061>; else goto <D.12062>;
                  <D.12061>:
                  D.12063 = &MEM[(void *)"mono" + 1B];
                  D.12064 = *D.12063;
                  D.12065 = (int) D.12064;
                  D.12066 = __s2 + 1;
                  D.12067 = *D.12066;
                  D.12068 = (int) D.12067;
                  __result = D.12065 - D.12068;
                  D.12069 = __s2_len > 1;
                  D.12059 = __result == 0;
                  D.12070 = D.12069 & D.12059;
                  if (D.12070 != 0) goto <D.12071>; else goto <D.12072>;
                  <D.12071>:
                  D.12073 = &MEM[(void *)"mono" + 2B];
                  D.12074 = *D.12073;
                  D.12075 = (int) D.12074;
                  D.12076 = __s2 + 2;
                  D.12077 = *D.12076;
                  D.12078 = (int) D.12077;
                  __result = D.12075 - D.12078;
                  D.12079 = __s2_len > 2;
                  D.12059 = __result == 0;
                  D.12080 = D.12079 & D.12059;
                  if (D.12080 != 0) goto <D.12081>; else goto <D.12082>;
                  <D.12081>:
                  D.12083 = &MEM[(void *)"mono" + 3B];
                  D.12084 = *D.12083;
                  D.12085 = (int) D.12084;
                  D.12086 = __s2 + 3;
                  D.12087 = *D.12086;
                  D.12088 = (int) D.12087;
                  __result = D.12085 - D.12088;
                  <D.12082>:
                  <D.12072>:
                  <D.12062>:
                }
                D.10970 = __result;
              }
              iftmp.50 = -D.10970;
              goto <D.12089>;
              <D.12052>:
              iftmp.50 = __builtin_strcmp (procname, "mono");
              <D.12089>:
              D.10971 = iftmp.50;
            }
            if (D.10971 == 0) goto <D.12090>; else goto <D.12091>;
            <D.12090>:
            process_handlep.49 = process_handlep;
            process_set_name (process_handlep.49);
            goto <D.12092>;
            <D.12091>:
            <D.12092>:
            return;
            <D.12049>:
            current_process.48 = current_process;
            _wapi_handle_unref (current_process.48);
            <D.12045>:
          }
        finally
          {
            process_handlep = {CLOBBER};
          }
      }
      <D.12039>:
      process_handle.id = pid;
      process_set_defaults (&process_handle);
      process_set_name (&process_handle);
      current_process.51 = _wapi_handle_new (9, &process_handle);
      current_process = current_process.51;
      current_process.48 = current_process;
      if (current_process.48 == 4294967295B) goto <D.12094>; else goto <D.12095>;
      <D.12094>:
      monoeg_g_log (0B, 16, "%s: error creating process handle", &__func__);
      return;
      <D.12095>:
    }
  finally
    {
      process_handle = {CLOBBER};
    }
}


atoi (const char * __nptr)
{
  int D.12101;

  D.12101 = strtol (__nptr, 0B, 10);
  return D.12101;
}


process_set_name (struct _WapiHandle_process * process_handle)
{
  const gchar * D.12107;
  gchar[256] * D.12108;
  gchar * progname;
  gchar * utf8_progname;
  gchar * slash;

  progname = monoeg_g_get_prgname ();
  utf8_progname = mono_utf8_from_external (progname);
  if (utf8_progname != 0B) goto <D.12103>; else goto <D.12104>;
  <D.12103>:
  slash = strrchr (utf8_progname, 47);
  if (slash != 0B) goto <D.12105>; else goto <D.12106>;
  <D.12105>:
  D.12107 = slash + 1;
  D.12108 = &process_handle->proc_name;
  monoeg_g_strlcpy (D.12108, D.12107, 255);
  goto <D.12109>;
  <D.12106>:
  D.12108 = &process_handle->proc_name;
  monoeg_g_strlcpy (D.12108, utf8_progname, 255);
  <D.12109>:
  monoeg_g_free (utf8_progname);
  <D.12104>:
}


GetCurrentProcess ()
{
  void * D.12110;

  mono_once (&process_current_once, process_set_current);
  D.12110 = 4294967295B;
  return D.12110;
}


GetProcessId (void * handle)
{
  signed int handle.52;
  guint32 D.12115;
  unsigned int handle.53;
  struct _WapiHandle_process * process_handle.54;
  int D.12120;
  struct _WapiHandle_process * process_handle;
  gboolean ok;

  try
    {
      handle.52 = (signed int) handle;
      if (handle.52 < 0) goto <D.12113>; else goto <D.12114>;
      <D.12113>:
      handle.53 = (unsigned int) handle;
      D.12115 = handle.53 & 2147483647;
      return D.12115;
      <D.12114>:
      ok = _wapi_lookup_handle (handle, 9, &process_handle);
      if (ok == 0) goto <D.12117>; else goto <D.12118>;
      <D.12117>:
      SetLastError (6);
      D.12115 = 0;
      return D.12115;
      <D.12118>:
      process_handle.54 = process_handle;
      D.12120 = process_handle.54->id;
      D.12115 = (guint32) D.12120;
      return D.12115;
    }
  finally
    {
      process_handle = {CLOBBER};
    }
}


GetCurrentProcessId ()
{
  guint32 D.12123;
  void * current_process.55;

  mono_once (&process_current_once, process_set_current);
  current_process.55 = current_process;
  D.12123 = GetProcessId (current_process.55);
  return D.12123;
}


EnumProcesses (guint32 * pids, guint32 len, guint32 * needed)
{
  gboolean D.12128;
  const short unsigned int * * D.12129;
  const short unsigned int * D.12130;
  char D.12131;
  unsigned int D.12132;
  unsigned int D.12133;
  const short unsigned int * D.12134;
  short unsigned int D.12135;
  int D.12136;
  int D.12137;
  char[256] * D.12140;
  char * endptr.56;
  char D.12142;
  unsigned int i.57;
  unsigned int D.12146;
  guint32 * D.12147;
  unsigned int pid.58;
  unsigned int D.12150;
  guint32 fit;
  guint32 i;
  struct DIR * dir;
  struct dirent * entry;

  mono_once (&process_current_once, process_set_current);
  dir = opendir ("/proc");
  if (dir == 0B) goto <D.12126>; else goto <D.12127>;
  <D.12126>:
  D.12128 = 0;
  return D.12128;
  <D.12127>:
  i = 0;
  fit = len / 4;
  goto <D.11002>;
  <D.11003>:
  {
    pid_t pid;
    char * endptr;

    try
      {
        D.12129 = __ctype_b_loc ();
        D.12130 = *D.12129;
        D.12131 = entry->d_name[0];
        D.12132 = (unsigned int) D.12131;
        D.12133 = D.12132 * 2;
        D.12134 = D.12130 + D.12133;
        D.12135 = *D.12134;
        D.12136 = (int) D.12135;
        D.12137 = D.12136 & 2048;
        if (D.12137 == 0) goto <D.12138>; else goto <D.12139>;
        <D.12138>:
        // predicted unlikely by continue predictor.
        goto <D.11002>;
        <D.12139>:
        D.12140 = &entry->d_name;
        pid = strtol (D.12140, &endptr, 10);
        endptr.56 = endptr;
        D.12142 = *endptr.56;
        if (D.12142 == 0) goto <D.12143>; else goto <D.12144>;
        <D.12143>:
        i.57 = i;
        i = i.57 + 1;
        D.12146 = i.57 * 4;
        D.12147 = pids + D.12146;
        pid.58 = (unsigned int) pid;
        *D.12147 = pid.58;
        <D.12144>:
      }
    finally
      {
        endptr = {CLOBBER};
      }
  }
  <D.11002>:
  if (i < fit) goto <D.12149>; else goto <D.11004>;
  <D.12149>:
  entry = readdir (dir);
  if (entry != 0B) goto <D.11003>; else goto <D.11004>;
  <D.11004>:
  closedir (dir);
  D.12150 = i * 4;
  *needed = D.12150;
  D.12128 = 1;
  return D.12128;
}


CloseProcess (void * handle)
{
  signed int handle.59;
  gboolean D.12157;

  handle.59 = (signed int) handle;
  if (handle.59 < 0) goto <D.12155>; else goto <D.12156>;
  <D.12155>:
  D.12157 = 1;
  return D.12157;
  <D.12156>:
  D.12157 = CloseHandle (handle);
  return D.12157;
}


OpenProcess (guint32 req_access, gboolean inherit, guint32 pid)
{
  void * pid.60;
  int pid.61;
  int D.12163;
  void * D.12166;
  unsigned int D.12167;
  void * handle;

  handle = 0B;
  mono_once (&process_current_once, process_set_current);
  pid.60 = (void *) pid;
  handle = _wapi_search_handle (9, process_open_compare, pid.60, 0B, 1);
  if (handle == 0B) goto <D.12160>; else goto <D.12161>;
  <D.12160>:
  pid.61 = (int) pid;
  D.12163 = is_pid_valid (pid.61);
  if (D.12163 != 0) goto <D.12164>; else goto <D.12165>;
  <D.12164>:
  D.12167 = pid + 2147483648;
  D.12166 = (void *) D.12167;
  return D.12166;
  <D.12165>:
  SetLastError (127);
  D.12166 = 0B;
  return D.12166;
  <D.12161>:
  D.12166 = handle;
  return D.12166;
}


process_open_compare (void * handle, void * user_data)
{
  gboolean D.12171;
  int D.12174;
  pid_t wanted_pid;
  pid_t checking_pid;

  checking_pid = signal_process_if_gone (handle);
  if (checking_pid == 0) goto <D.12169>; else goto <D.12170>;
  <D.12169>:
  D.12171 = 0;
  return D.12171;
  <D.12170>:
  wanted_pid = (pid_t) user_data;
  if (checking_pid == wanted_pid) goto <D.12173>; else goto <D.12172>;
  <D.12173>:
  D.12174 = _wapi_handle_issignalled (handle);
  if (D.12174 == 0) goto <D.12175>; else goto <D.12172>;
  <D.12175>:
  D.12171 = 1;
  return D.12171;
  <D.12172>:
  D.12171 = 0;
  return D.12171;
}


signal_process_if_gone (void * handle)
{
  signed int handle.62;
  _Bool D.12178;
  long int D.12179;
  long int D.12180;
  pid_t D.12185;
  struct _WapiHandle_process * process_handle.63;
  int D.12187;
  int D.12188;
  int * D.12191;
  int D.12192;
  _Bool D.12193;
  _Bool D.12194;
  _Bool D.12195;
  struct _WapiHandle_process * process_handle;
  gboolean ok;

  try
    {
      handle.62 = (signed int) handle;
      D.12178 = handle.62 < 0;
      D.12179 = (long int) D.12178;
      D.12180 = __builtin_expect (D.12179, 0);
      if (D.12180 != 0) goto <D.12181>; else goto <D.12182>;
      <D.12181>:
      monoeg_assertion_message ("* Assertion at %s:%d, condition `%s\' not met\n", "processes.c", 1271, "(GPOINTER_TO_UINT (handle) & _WAPI_PROCESS_UNHANDLED) != _WAPI_PROCESS_UNHANDLED");
      <D.12182>:
      ok = _wapi_lookup_handle (handle, 9, &process_handle);
      if (ok == 0) goto <D.12183>; else goto <D.12184>;
      <D.12183>:
      D.12185 = 0;
      return D.12185;
      <D.12184>:
      process_handle.63 = process_handle;
      D.12187 = process_handle.63->id;
      D.12188 = kill (D.12187, 0);
      if (D.12188 == -1) goto <D.12189>; else goto <D.12190>;
      <D.12189>:
      D.12191 = __errno_location ();
      D.12192 = *D.12191;
      D.12193 = D.12192 == 3;
      D.12194 = D.12192 == 1;
      D.12195 = D.12193 | D.12194;
      if (D.12195 != 0) goto <D.12196>; else goto <D.12197>;
      <D.12196>:
      _wapi_shared_handle_set_signal_state (handle, 1);
      <D.12197>:
      <D.12190>:
      process_handle.63 = process_handle;
      D.12185 = process_handle.63->id;
      return D.12185;
    }
  finally
    {
      process_handle = {CLOBBER};
    }
}


_wapi_handle_issignalled (void * handle)
{
  gboolean D.12202;
  <unnamed type> D.12205;
  <unnamed type> D.12207;
  <unnamed type> D.12209;
  <unnamed type> D.12211;
  struct _WapiHandleSharedLayout * _wapi_shared_layout.64;
  unsigned int handle.65;
  unsigned int D.12214;
  struct _WapiHandleUnshared * D.12215;
  unsigned int D.12216;
  unsigned int D.12217;
  struct _WapiHandleUnshared * D.12218;
  unsigned int D.12219;
  unsigned int D.12220;
  struct _WapiHandleUnshared * D.12221;
  unsigned int D.12222;
  unsigned int D.12223;
  struct _WapiHandleUnshared * D.12224;
  guint32 idx;

  idx = (guint32) handle;
  if (idx > 4194303) goto <D.12200>; else goto <D.12201>;
  <D.12200>:
  D.12202 = 0;
  return D.12202;
  <D.12201>:
  D.12205 = _wapi_handle_type (handle);
  if (D.12205 == 9) goto <D.12203>; else goto <D.12206>;
  <D.12206>:
  D.12207 = _wapi_handle_type (handle);
  if (D.12207 == 11) goto <D.12203>; else goto <D.12208>;
  <D.12208>:
  D.12209 = _wapi_handle_type (handle);
  if (D.12209 == 12) goto <D.12203>; else goto <D.12210>;
  <D.12210>:
  D.12211 = _wapi_handle_type (handle);
  if (D.12211 == 13) goto <D.12203>; else goto <D.12204>;
  <D.12203>:
  _wapi_shared_layout.64 = _wapi_shared_layout;
  handle.65 = (unsigned int) handle;
  D.12214 = handle.65 / 256;
  D.12215 = _wapi_private_handles[D.12214];
  handle.65 = (unsigned int) handle;
  D.12216 = handle.65 & 255;
  D.12217 = D.12216 * 136;
  D.12218 = D.12215 + D.12217;
  D.12219 = D.12218->u.shared.offset;
  D.12202 = _wapi_shared_layout.64->handles[D.12219].signalled;
  return D.12202;
  <D.12204>:
  D.12220 = idx / 256;
  D.12221 = _wapi_private_handles[D.12220];
  D.12222 = idx & 255;
  D.12223 = D.12222 * 136;
  D.12224 = D.12221 + D.12223;
  D.12202 = D.12224->signalled;
  return D.12202;
}


GetExitCodeProcess (void * process, guint32 * code)
{
  gboolean D.12228;
  unsigned int process.66;
  signed int process.67;
  int pid.68;
  int D.12234;
  int D.12239;
  struct _WapiHandle_process * process_handle.69;
  unsigned int D.12243;
  struct _WapiHandle_process * process_handle;
  gboolean ok;
  guint32 pid;

  try
    {
      pid = 4294967295;
      mono_once (&process_current_once, process_set_current);
      if (code == 0B) goto <D.12226>; else goto <D.12227>;
      <D.12226>:
      D.12228 = 0;
      return D.12228;
      <D.12227>:
      process.66 = (unsigned int) process;
      pid = process.66 + 2147483648;
      process.67 = (signed int) process;
      if (process.67 < 0) goto <D.12231>; else goto <D.12232>;
      <D.12231>:
      pid.68 = (int) pid;
      D.12234 = is_pid_valid (pid.68);
      if (D.12234 != 0) goto <D.12235>; else goto <D.12236>;
      <D.12235>:
      *code = 259;
      D.12228 = 1;
      return D.12228;
      <D.12236>:
      D.12228 = 0;
      return D.12228;
      <D.12232>:
      ok = _wapi_lookup_handle (process, 9, &process_handle);
      if (ok == 0) goto <D.12237>; else goto <D.12238>;
      <D.12237>:
      D.12228 = 0;
      return D.12228;
      <D.12238>:
      process_wait (process, 0, 1);
      D.12239 = _wapi_handle_issignalled (process);
      if (D.12239 == 1) goto <D.12240>; else goto <D.12241>;
      <D.12240>:
      process_handle.69 = process_handle;
      D.12243 = process_handle.69->exitstatus;
      *code = D.12243;
      goto <D.12244>;
      <D.12241>:
      *code = 259;
      <D.12244>:
      D.12228 = 1;
      return D.12228;
    }
  finally
    {
      process_handle = {CLOBBER};
    }
}


GetProcessTimes (void * process, struct WapiFileTime * create_time, struct WapiFileTime * exit_time, struct WapiFileTime * kernel_time, struct WapiFileTime * user_time)
{
  _Bool D.12249;
  _Bool D.12250;
  _Bool D.12251;
  _Bool D.12253;
  _Bool D.12254;
  _Bool D.12255;
  gboolean D.12256;
  signed int process.70;
  struct _WapiHandle_process * process_handle.71;
  int D.12263;
  int D.12266;
  int D.12267;
  int D.12270;
  long int D.12273;
  long int D.12274;
  long int D.12275;
  long int D.12276;
  long int D.12277;
  long int D.12278;
  long int D.12279;
  long int D.12280;
  long int D.12281;
  long int D.12282;
  struct _WapiHandle_process * process_handle;
  gboolean ok;
  gboolean ku_times_set;

  try
    {
      ku_times_set = 0;
      mono_once (&process_current_once, process_set_current);
      D.12249 = create_time == 0B;
      D.12250 = exit_time == 0B;
      D.12251 = D.12249 | D.12250;
      if (D.12251 != 0) goto <D.12247>; else goto <D.12252>;
      <D.12252>:
      D.12253 = kernel_time == 0B;
      D.12254 = user_time == 0B;
      D.12255 = D.12253 | D.12254;
      if (D.12255 != 0) goto <D.12247>; else goto <D.12248>;
      <D.12247>:
      D.12256 = 0;
      return D.12256;
      <D.12248>:
      process.70 = (signed int) process;
      if (process.70 < 0) goto <D.12258>; else goto <D.12259>;
      <D.12258>:
      D.12256 = 0;
      return D.12256;
      <D.12259>:
      ok = _wapi_lookup_handle (process, 9, &process_handle);
      if (ok == 0) goto <D.12260>; else goto <D.12261>;
      <D.12260>:
      D.12256 = 0;
      return D.12256;
      <D.12261>:
      process_handle.71 = process_handle;
      *create_time = process_handle.71->create_time;
      D.12263 = _wapi_handle_issignalled (process);
      if (D.12263 == 1) goto <D.12264>; else goto <D.12265>;
      <D.12264>:
      process_handle.71 = process_handle;
      *exit_time = process_handle.71->exit_time;
      <D.12265>:
      process_handle.71 = process_handle;
      D.12266 = process_handle.71->id;
      D.12267 = getpid ();
      if (D.12266 == D.12267) goto <D.12268>; else goto <D.12269>;
      <D.12268>:
      {
        struct rusage time_data;

        try
          {
            D.12270 = getrusage (0, &time_data);
            if (D.12270 == 0) goto <D.12271>; else goto <D.12272>;
            <D.12271>:
            {
              gint64 tick_val;
              gint64 * tick_val_ptr;

              ku_times_set = 1;
              D.12273 = time_data.ru_utime.tv_sec;
              D.12274 = D.12273 * 10000000;
              D.12275 = time_data.ru_utime.tv_usec;
              D.12276 = D.12275 * 10;
              D.12277 = D.12274 + D.12276;
              tick_val = (gint64) D.12277;
              tick_val_ptr = user_time;
              *tick_val_ptr = tick_val;
              D.12278 = time_data.ru_stime.tv_sec;
              D.12279 = D.12278 * 10000000;
              D.12280 = time_data.ru_stime.tv_usec;
              D.12281 = D.12280 * 10;
              D.12282 = D.12279 + D.12281;
              tick_val = (gint64) D.12282;
              tick_val_ptr = kernel_time;
              *tick_val_ptr = tick_val;
            }
            <D.12272>:
          }
        finally
          {
            time_data = {CLOBBER};
          }
      }
      <D.12269>:
      if (ku_times_set == 0) goto <D.12283>; else goto <D.12284>;
      <D.12283>:
      memset (kernel_time, 0, 8);
      memset (user_time, 0, 8);
      <D.12284>:
      D.12256 = 1;
      return D.12256;
    }
  finally
    {
      process_handle = {CLOBBER};
    }
}


memset (void * __dest, int __ch, size_t __len)
{
  int D.12289;
  int D.12294;
  void * D.12296;
  unsigned int D.12297;

  D.12289 = __builtin_constant_p (__len);
  if (D.12289 != 0) goto <D.12290>; else goto <D.12291>;
  <D.12290>:
  if (__len == 0) goto <D.12292>; else goto <D.12293>;
  <D.12292>:
  D.12294 = __builtin_constant_p (__ch);
  if (D.12294 == 0) goto <D.12287>; else goto <D.12295>;
  <D.12295>:
  if (__ch != 0) goto <D.12287>; else goto <D.12288>;
  <D.12287>:
  __warn_memset_zero_len ();
  D.12296 = __dest;
  return D.12296;
  <D.12288>:
  <D.12293>:
  <D.12291>:
  D.12297 = __builtin_object_size (__dest, 0);
  D.12296 = __builtin___memset_chk (__dest, __ch, __len, D.12297);
  return D.12296;
}


EnumProcessModules (void * process, void * * modules, guint32 size, guint32 * needed)
{
  gboolean D.12301;
  signed int process.72;
  int process.73;
  struct _WapiHandle_process * process_handle.74;
  unsigned int D.12313;
  unsigned int D.12314;
  unsigned int i.75;
  void * D.12316;
  unsigned int i.76;
  unsigned int D.12320;
  void * * D.12321;
  void * D.12322;
  gchar * D.12324;
  int D.12325;
  sizetype i.77;
  sizetype D.12330;
  sizetype D.12331;
  void * * D.12332;
  unsigned int i.78;
  unsigned int D.12334;
  void * D.12336;
  struct _WapiHandle_process * process_handle;
  gboolean ok;
  struct FILE * fp;
  struct GSList * mods;
  struct WapiProcModule * module;
  guint32 count;
  guint32 avail;
  int i;
  pid_t pid;
  gchar * proc_name;

  try
    {
      mods = 0B;
      avail = size / 4;
      proc_name = 0B;
      if (size <= 3) goto <D.12299>; else goto <D.12300>;
      <D.12299>:
      D.12301 = 0;
      return D.12301;
      <D.12300>:
      process.72 = (signed int) process;
      if (process.72 < 0) goto <D.12303>; else goto <D.12304>;
      <D.12303>:
      process.73 = (int) process;
      pid = process.73 & 2147483647;
      goto <D.12306>;
      <D.12304>:
      ok = _wapi_lookup_handle (process, 9, &process_handle);
      if (ok == 0) goto <D.12307>; else goto <D.12308>;
      <D.12307>:
      D.12301 = 0;
      return D.12301;
      <D.12308>:
      process_handle.74 = process_handle;
      pid = process_handle.74->id;
      process_handle.74 = process_handle;
      proc_name = &process_handle.74->proc_name;
      <D.12306>:
      fp = open_process_map (pid, "r");
      if (fp == 0B) goto <D.12310>; else goto <D.12311>;
      <D.12310>:
      *modules = 0B;
      *needed = 4;
      goto <D.12312>;
      <D.12311>:
      mods = load_modules (fp);
      fclose (fp);
      count = monoeg_g_slist_length (mods);
      D.12313 = count + 1;
      D.12314 = D.12313 * 4;
      *needed = D.12314;
      *modules = 0B;
      i = 0;
      goto <D.11178>;
      <D.11177>:
      i.75 = (unsigned int) i;
      module = monoeg_g_slist_nth_data (mods, i.75);
      D.12316 = *modules;
      if (D.12316 != 0B) goto <D.12317>; else goto <D.12318>;
      <D.12317>:
      i.76 = (unsigned int) i;
      D.12320 = i.76 * 4;
      D.12321 = modules + D.12320;
      D.12322 = module->address_start;
      *D.12321 = D.12322;
      goto <D.12323>;
      <D.12318>:
      D.12324 = module->filename;
      D.12325 = match_procname_to_modulename (proc_name, D.12324);
      if (D.12325 != 0) goto <D.12326>; else goto <D.12327>;
      <D.12326>:
      D.12322 = module->address_start;
      *modules = D.12322;
      goto <D.12328>;
      <D.12327>:
      i.77 = (sizetype) i;
      D.12330 = i.77 + 1;
      D.12331 = D.12330 * 4;
      D.12332 = modules + D.12331;
      D.12322 = module->address_start;
      *D.12332 = D.12322;
      <D.12328>:
      <D.12323>:
      i = i + 1;
      <D.11178>:
      i.78 = (unsigned int) i;
      D.12334 = avail + 4294967295;
      if (i.78 < D.12334) goto <D.12335>; else goto <D.11179>;
      <D.12335>:
      i.78 = (unsigned int) i;
      if (i.78 < count) goto <D.11177>; else goto <D.11179>;
      <D.11179>:
      i = 0;
      goto <D.11181>;
      <D.11180>:
      i.75 = (unsigned int) i;
      D.12336 = monoeg_g_slist_nth_data (mods, i.75);
      free_procmodule (D.12336);
      i = i + 1;
      <D.11181>:
      i.78 = (unsigned int) i;
      if (i.78 < count) goto <D.11180>; else goto <D.11182>;
      <D.11182>:
      monoeg_g_slist_free (mods);
      <D.12312>:
      D.12301 = 1;
      return D.12301;
    }
  finally
    {
      process_handle = {CLOBBER};
    }
}


open_process_map (int pid, const char * mode)
{
  const gchar * D.12339;
  struct FILE * D.12341;
  struct FILE * fp;
  const gchar * proc_path[3];
  int i;
  gchar * filename;

  try
    {
      fp = 0B;
      proc_path[0] = "/proc/%d/maps";
      proc_path[1] = "/proc/%d/map";
      proc_path[2] = 0B;
      i = 0;
      goto <D.11159>;
      <D.11158>:
      D.12339 = proc_path[i];
      filename = monoeg_g_strdup_printf (D.12339, pid);
      fp = fopen (filename, mode);
      monoeg_g_free (filename);
      i = i + 1;
      <D.11159>:
      if (fp == 0B) goto <D.12340>; else goto <D.11160>;
      <D.12340>:
      D.12339 = proc_path[i];
      if (D.12339 != 0B) goto <D.11158>; else goto <D.11160>;
      <D.11160>:
      D.12341 = fp;
      return D.12341;
    }
  finally
    {
      proc_path = {CLOBBER};
    }
}


load_modules (struct FILE * fp)
{
  const short unsigned int * * D.12344;
  const short unsigned int * D.12345;
  char D.12346;
  unsigned int D.12347;
  unsigned int D.12348;
  const short unsigned int * D.12349;
  short unsigned int D.12350;
  int D.12351;
  int D.12352;
  char D.12353;
  unsigned int D.12354;
  unsigned int D.12355;
  const short unsigned int * D.12356;
  short unsigned int D.12357;
  int D.12358;
  int D.12359;
  long unsigned int D.12362;
  char D.12365;
  unsigned int D.12366;
  unsigned int D.12367;
  const short unsigned int * D.12368;
  short unsigned int D.12369;
  int D.12370;
  int D.12371;
  long unsigned int D.12374;
  char D.12377;
  _Bool D.12378;
  _Bool D.12379;
  _Bool D.12380;
  char D.12383;
  unsigned int D.12384;
  unsigned int D.12385;
  const short unsigned int * D.12386;
  short unsigned int D.12387;
  int D.12388;
  int D.12389;
  long unsigned int D.12392;
  char D.12395;
  unsigned int D.12396;
  unsigned int D.12397;
  const short unsigned int * D.12398;
  short unsigned int D.12399;
  int D.12400;
  int D.12401;
  char D.12406;
  unsigned int D.12407;
  unsigned int D.12408;
  const short unsigned int * D.12409;
  short unsigned int D.12410;
  int D.12411;
  int D.12412;
  char D.12417;
  unsigned int D.12418;
  unsigned int D.12419;
  const short unsigned int * D.12420;
  short unsigned int D.12421;
  int D.12422;
  int D.12423;
  long int D.12426;
  _Bool D.12429;
  _Bool D.12430;
  _Bool D.12431;
  gchar * D.12434;
  gchar * D.12435;
  gchar * D.12436;
  gchar * D.12437;
  struct GSList * D.12438;
  char * D.12442;
  struct GSList * D.12443;
  struct GSList * ret;
  struct WapiProcModule * mod;
  gchar buf[4097];
  gchar * p;
  gchar * endp;
  gchar * start_start;
  gchar * end_start;
  gchar * prot_start;
  gchar * offset_start;
  gchar * maj_dev_start;
  gchar * min_dev_start;
  gchar * inode_start;
  gchar prot_buf[5];
  void * address_start;
  void * address_end;
  void * address_offset;
  guint32 maj_dev;
  guint32 min_dev;
  ino_t inode;
  dev_t device;

  try
    {
      ret = 0B;
      goto <D.11084>;
      <D.11103>:
      p = &buf;
      goto <D.11082>;
      <D.11081>:
      p = p + 1;
      <D.11082>:
      D.12344 = __ctype_b_loc ();
      D.12345 = *D.12344;
      D.12346 = *p;
      D.12347 = (unsigned int) D.12346;
      D.12348 = D.12347 * 2;
      D.12349 = D.12345 + D.12348;
      D.12350 = *D.12349;
      D.12351 = (int) D.12350;
      D.12352 = D.12351 & 8192;
      if (D.12352 != 0) goto <D.11081>; else goto <D.11083>;
      <D.11083>:
      start_start = p;
      D.12344 = __ctype_b_loc ();
      D.12345 = *D.12344;
      D.12353 = *start_start;
      D.12354 = (unsigned int) D.12353;
      D.12355 = D.12354 * 2;
      D.12356 = D.12345 + D.12355;
      D.12357 = *D.12356;
      D.12358 = (int) D.12357;
      D.12359 = D.12358 & 4096;
      if (D.12359 == 0) goto <D.12360>; else goto <D.12361>;
      <D.12360>:
      // predicted unlikely by continue predictor.
      goto <D.11084>;
      <D.12361>:
      D.12362 = strtoul (start_start, &endp, 16);
      address_start = (void *) D.12362;
      p = endp;
      D.12346 = *p;
      if (D.12346 != 45) goto <D.12363>; else goto <D.12364>;
      <D.12363>:
      // predicted unlikely by continue predictor.
      goto <D.11084>;
      <D.12364>:
      p = p + 1;
      end_start = p;
      D.12344 = __ctype_b_loc ();
      D.12345 = *D.12344;
      D.12365 = *end_start;
      D.12366 = (unsigned int) D.12365;
      D.12367 = D.12366 * 2;
      D.12368 = D.12345 + D.12367;
      D.12369 = *D.12368;
      D.12370 = (int) D.12369;
      D.12371 = D.12370 & 4096;
      if (D.12371 == 0) goto <D.12372>; else goto <D.12373>;
      <D.12372>:
      // predicted unlikely by continue predictor.
      goto <D.11084>;
      <D.12373>:
      D.12374 = strtoul (end_start, &endp, 16);
      address_end = (void *) D.12374;
      p = endp;
      D.12344 = __ctype_b_loc ();
      D.12345 = *D.12344;
      D.12346 = *p;
      D.12347 = (unsigned int) D.12346;
      D.12348 = D.12347 * 2;
      D.12349 = D.12345 + D.12348;
      D.12350 = *D.12349;
      D.12351 = (int) D.12350;
      D.12352 = D.12351 & 8192;
      if (D.12352 == 0) goto <D.12375>; else goto <D.12376>;
      <D.12375>:
      // predicted unlikely by continue predictor.
      goto <D.11084>;
      <D.12376>:
      goto <D.11086>;
      <D.11085>:
      p = p + 1;
      <D.11086>:
      D.12344 = __ctype_b_loc ();
      D.12345 = *D.12344;
      D.12346 = *p;
      D.12347 = (unsigned int) D.12346;
      D.12348 = D.12347 * 2;
      D.12349 = D.12345 + D.12348;
      D.12350 = *D.12349;
      D.12351 = (int) D.12350;
      D.12352 = D.12351 & 8192;
      if (D.12352 != 0) goto <D.11085>; else goto <D.11087>;
      <D.11087>:
      prot_start = p;
      D.12377 = *prot_start;
      D.12378 = D.12377 != 114;
      D.12379 = D.12377 != 45;
      D.12380 = D.12378 & D.12379;
      if (D.12380 != 0) goto <D.12381>; else goto <D.12382>;
      <D.12381>:
      // predicted unlikely by continue predictor.
      goto <D.11084>;
      <D.12382>:
      memcpy (&prot_buf, prot_start, 4);
      prot_buf[4] = 0;
      goto <D.11089>;
      <D.11088>:
      p = p + 1;
      <D.11089>:
      D.12344 = __ctype_b_loc ();
      D.12345 = *D.12344;
      D.12346 = *p;
      D.12347 = (unsigned int) D.12346;
      D.12348 = D.12347 * 2;
      D.12349 = D.12345 + D.12348;
      D.12350 = *D.12349;
      D.12351 = (int) D.12350;
      D.12352 = D.12351 & 8192;
      if (D.12352 == 0) goto <D.11088>; else goto <D.11090>;
      <D.11090>:
      goto <D.11092>;
      <D.11091>:
      p = p + 1;
      <D.11092>:
      D.12344 = __ctype_b_loc ();
      D.12345 = *D.12344;
      D.12346 = *p;
      D.12347 = (unsigned int) D.12346;
      D.12348 = D.12347 * 2;
      D.12349 = D.12345 + D.12348;
      D.12350 = *D.12349;
      D.12351 = (int) D.12350;
      D.12352 = D.12351 & 8192;
      if (D.12352 != 0) goto <D.11091>; else goto <D.11093>;
      <D.11093>:
      offset_start = p;
      D.12344 = __ctype_b_loc ();
      D.12345 = *D.12344;
      D.12383 = *offset_start;
      D.12384 = (unsigned int) D.12383;
      D.12385 = D.12384 * 2;
      D.12386 = D.12345 + D.12385;
      D.12387 = *D.12386;
      D.12388 = (int) D.12387;
      D.12389 = D.12388 & 4096;
      if (D.12389 == 0) goto <D.12390>; else goto <D.12391>;
      <D.12390>:
      // predicted unlikely by continue predictor.
      goto <D.11084>;
      <D.12391>:
      D.12392 = strtoul (offset_start, &endp, 16);
      address_offset = (void *) D.12392;
      p = endp;
      D.12344 = __ctype_b_loc ();
      D.12345 = *D.12344;
      D.12346 = *p;
      D.12347 = (unsigned int) D.12346;
      D.12348 = D.12347 * 2;
      D.12349 = D.12345 + D.12348;
      D.12350 = *D.12349;
      D.12351 = (int) D.12350;
      D.12352 = D.12351 & 8192;
      if (D.12352 == 0) goto <D.12393>; else goto <D.12394>;
      <D.12393>:
      // predicted unlikely by continue predictor.
      goto <D.11084>;
      <D.12394>:
      goto <D.11095>;
      <D.11094>:
      p = p + 1;
      <D.11095>:
      D.12344 = __ctype_b_loc ();
      D.12345 = *D.12344;
      D.12346 = *p;
      D.12347 = (unsigned int) D.12346;
      D.12348 = D.12347 * 2;
      D.12349 = D.12345 + D.12348;
      D.12350 = *D.12349;
      D.12351 = (int) D.12350;
      D.12352 = D.12351 & 8192;
      if (D.12352 != 0) goto <D.11094>; else goto <D.11096>;
      <D.11096>:
      maj_dev_start = p;
      D.12344 = __ctype_b_loc ();
      D.12345 = *D.12344;
      D.12395 = *maj_dev_start;
      D.12396 = (unsigned int) D.12395;
      D.12397 = D.12396 * 2;
      D.12398 = D.12345 + D.12397;
      D.12399 = *D.12398;
      D.12400 = (int) D.12399;
      D.12401 = D.12400 & 4096;
      if (D.12401 == 0) goto <D.12402>; else goto <D.12403>;
      <D.12402>:
      // predicted unlikely by continue predictor.
      goto <D.11084>;
      <D.12403>:
      maj_dev = strtoul (maj_dev_start, &endp, 16);
      p = endp;
      D.12346 = *p;
      if (D.12346 != 58) goto <D.12404>; else goto <D.12405>;
      <D.12404>:
      // predicted unlikely by continue predictor.
      goto <D.11084>;
      <D.12405>:
      p = p + 1;
      min_dev_start = p;
      D.12344 = __ctype_b_loc ();
      D.12345 = *D.12344;
      D.12406 = *min_dev_start;
      D.12407 = (unsigned int) D.12406;
      D.12408 = D.12407 * 2;
      D.12409 = D.12345 + D.12408;
      D.12410 = *D.12409;
      D.12411 = (int) D.12410;
      D.12412 = D.12411 & 4096;
      if (D.12412 == 0) goto <D.12413>; else goto <D.12414>;
      <D.12413>:
      // predicted unlikely by continue predictor.
      goto <D.11084>;
      <D.12414>:
      min_dev = strtoul (min_dev_start, &endp, 16);
      p = endp;
      D.12344 = __ctype_b_loc ();
      D.12345 = *D.12344;
      D.12346 = *p;
      D.12347 = (unsigned int) D.12346;
      D.12348 = D.12347 * 2;
      D.12349 = D.12345 + D.12348;
      D.12350 = *D.12349;
      D.12351 = (int) D.12350;
      D.12352 = D.12351 & 8192;
      if (D.12352 == 0) goto <D.12415>; else goto <D.12416>;
      <D.12415>:
      // predicted unlikely by continue predictor.
      goto <D.11084>;
      <D.12416>:
      goto <D.11098>;
      <D.11097>:
      p = p + 1;
      <D.11098>:
      D.12344 = __ctype_b_loc ();
      D.12345 = *D.12344;
      D.12346 = *p;
      D.12347 = (unsigned int) D.12346;
      D.12348 = D.12347 * 2;
      D.12349 = D.12345 + D.12348;
      D.12350 = *D.12349;
      D.12351 = (int) D.12350;
      D.12352 = D.12351 & 8192;
      if (D.12352 != 0) goto <D.11097>; else goto <D.11099>;
      <D.11099>:
      inode_start = p;
      D.12344 = __ctype_b_loc ();
      D.12345 = *D.12344;
      D.12417 = *inode_start;
      D.12418 = (unsigned int) D.12417;
      D.12419 = D.12418 * 2;
      D.12420 = D.12345 + D.12419;
      D.12421 = *D.12420;
      D.12422 = (int) D.12421;
      D.12423 = D.12422 & 4096;
      if (D.12423 == 0) goto <D.12424>; else goto <D.12425>;
      <D.12424>:
      // predicted unlikely by continue predictor.
      goto <D.11084>;
      <D.12425>:
      D.12426 = strtol (inode_start, &endp, 10);
      inode = (ino_t) D.12426;
      p = endp;
      D.12344 = __ctype_b_loc ();
      D.12345 = *D.12344;
      D.12346 = *p;
      D.12347 = (unsigned int) D.12346;
      D.12348 = D.12347 * 2;
      D.12349 = D.12345 + D.12348;
      D.12350 = *D.12349;
      D.12351 = (int) D.12350;
      D.12352 = D.12351 & 8192;
      if (D.12352 == 0) goto <D.12427>; else goto <D.12428>;
      <D.12427>:
      // predicted unlikely by continue predictor.
      goto <D.11084>;
      <D.12428>:
      device = gnu_dev_makedev (maj_dev, min_dev);
      D.12429 = device == 0;
      D.12430 = inode == 0;
      D.12431 = D.12429 & D.12430;
      if (D.12431 != 0) goto <D.12432>; else goto <D.12433>;
      <D.12432>:
      // predicted unlikely by continue predictor.
      goto <D.11084>;
      <D.12433>:
      goto <D.11101>;
      <D.11100>:
      p = p + 1;
      <D.11101>:
      D.12344 = __ctype_b_loc ();
      D.12345 = *D.12344;
      D.12346 = *p;
      D.12347 = (unsigned int) D.12346;
      D.12348 = D.12347 * 2;
      D.12349 = D.12345 + D.12348;
      D.12350 = *D.12349;
      D.12351 = (int) D.12350;
      D.12352 = D.12351 & 8192;
      if (D.12352 != 0) goto <D.11100>; else goto <D.11102>;
      <D.11102>:
      mod = monoeg_malloc0 (36);
      mod->address_start = address_start;
      mod->address_end = address_end;
      D.12434 = monoeg_strdup (&prot_buf);
      mod->perms = D.12434;
      mod->address_offset = address_offset;
      mod->device = device;
      mod->inode = inode;
      D.12435 = monoeg_g_strchomp (p);
      D.12436 = monoeg_g_strchug (D.12435);
      D.12437 = monoeg_strdup (D.12436);
      mod->filename = D.12437;
      D.12438 = monoeg_g_slist_find_custom (ret, mod, find_procmodule);
      if (D.12438 == 0B) goto <D.12439>; else goto <D.12440>;
      <D.12439>:
      ret = monoeg_g_slist_prepend (ret, mod);
      goto <D.12441>;
      <D.12440>:
      free_procmodule (mod);
      <D.12441>:
      <D.11084>:
      D.12442 = fgets (&buf, 4097, fp);
      if (D.12442 != 0B) goto <D.11103>; else goto <D.11104>;
      <D.11104>:
      ret = monoeg_g_slist_reverse (ret);
      D.12443 = ret;
      return D.12443;
    }
  finally
    {
      buf = {CLOBBER};
      endp = {CLOBBER};
      prot_buf = {CLOBBER};
    }
}


find_procmodule (const void * a, const void * b)
{
  long long unsigned int D.12447;
  long long unsigned int D.12448;
  long long unsigned int D.12450;
  long long unsigned int D.12451;
  gint D.12453;
  struct WapiProcModule * want;
  struct WapiProcModule * compare;

  want = a;
  compare = b;
  D.12447 = want->device;
  D.12448 = compare->device;
  if (D.12447 == D.12448) goto <D.12449>; else goto <D.12446>;
  <D.12449>:
  D.12450 = want->inode;
  D.12451 = compare->inode;
  if (D.12450 == D.12451) goto <D.12452>; else goto <D.12446>;
  <D.12452>:
  D.12453 = 0;
  return D.12453;
  <D.12446>:
  D.12453 = 1;
  return D.12453;
}


memcpy (void * restrict __dest, const void * restrict __src, size_t __len)
{
  void * D.12455;
  unsigned int D.12456;

  D.12456 = __builtin_object_size (__dest, 0);
  D.12455 = __builtin___memcpy_chk (__dest, __src, __len, D.12456);
  return D.12455;
}


gnu_dev_makedev (unsigned int __major, unsigned int __minor)
{
  long long unsigned int D.12458;
  unsigned int D.12459;
  unsigned int D.12460;
  unsigned int D.12461;
  unsigned int D.12462;
  long long unsigned int D.12463;
  long long unsigned int D.12464;
  long long unsigned int D.12465;
  long long unsigned int D.12466;
  long long unsigned int D.12467;
  long long unsigned int D.12468;
  long long unsigned int D.12469;
  long long unsigned int D.12470;

  D.12459 = __minor & 255;
  D.12460 = __major & 4095;
  D.12461 = D.12460 << 8;
  D.12462 = D.12459 | D.12461;
  D.12463 = (long long unsigned int) D.12462;
  D.12464 = (long long unsigned int) __minor;
  D.12465 = D.12464 & 4294967040;
  D.12466 = D.12465 << 12;
  D.12467 = D.12463 | D.12466;
  D.12468 = (long long unsigned int) __major;
  D.12469 = D.12468 & 4294963200;
  D.12470 = D.12469 << 32;
  D.12458 = D.12467 | D.12470;
  return D.12458;
}


fgets (char * restrict __s, int __n, struct FILE * restrict __stream)
{
  unsigned int D.12472;
  int D.12477;
  char * D.12479;
  unsigned int D.12480;
  unsigned int __n.79;
  unsigned int D.12482;
  unsigned int D.12485;

  D.12472 = __builtin_object_size (__s, 1);
  if (D.12472 != 4294967295) goto <D.12473>; else goto <D.12474>;
  <D.12473>:
  D.12477 = __builtin_constant_p (__n);
  if (D.12477 == 0) goto <D.12475>; else goto <D.12478>;
  <D.12478>:
  if (__n <= 0) goto <D.12475>; else goto <D.12476>;
  <D.12475>:
  D.12480 = __builtin_object_size (__s, 1);
  D.12479 = __fgets_chk (__s, D.12480, __n, __stream);
  return D.12479;
  <D.12476>:
  __n.79 = (unsigned int) __n;
  D.12482 = __builtin_object_size (__s, 1);
  if (__n.79 > D.12482) goto <D.12483>; else goto <D.12484>;
  <D.12483>:
  D.12485 = __builtin_object_size (__s, 1);
  D.12479 = __fgets_chk_warn (__s, D.12485, __n, __stream);
  return D.12479;
  <D.12484>:
  <D.12474>:
  D.12479 = __fgets_alias (__s, __n, __stream);
  return D.12479;
}


match_procname_to_modulename (gchar * procname, gchar * modulename)
{
  _Bool D.12487;
  _Bool D.12488;
  _Bool D.12489;
  gboolean D.12492;
  int D.11122;
  int D.11131;
  const char * D.12499;
  int D.11140;
  const char * D.12508;
  int D.11149;
  char * lastsep;
  char * lastsep2;
  char * pname;
  char * mname;
  gboolean result;

  lastsep = 0B;
  lastsep2 = 0B;
  pname = 0B;
  mname = 0B;
  result = 0;
  D.12487 = procname == 0B;
  D.12488 = modulename == 0B;
  D.12489 = D.12487 | D.12488;
  if (D.12489 != 0) goto <D.12490>; else goto <D.12491>;
  <D.12490>:
  D.12492 = 0;
  return D.12492;
  <D.12491>:
  pname = mono_path_resolve_symlinks (procname);
  mname = mono_path_resolve_symlinks (modulename);
  {
    size_t __s1_len;
    size_t __s2_len;

    D.11122 = __builtin_strcmp (pname, mname);
  }
  if (D.11122 == 0) goto <D.12493>; else goto <D.12494>;
  <D.12493>:
  result = 1;
  <D.12494>:
  if (result == 0) goto <D.12495>; else goto <D.12496>;
  <D.12495>:
  lastsep = strrchr (mname, 47);
  if (lastsep != 0B) goto <D.12497>; else goto <D.12498>;
  <D.12497>:
  {
    size_t __s1_len;
    size_t __s2_len;

    D.12499 = lastsep + 1;
    D.11131 = __builtin_strcmp (D.12499, pname);
  }
  if (D.11131 == 0) goto <D.12500>; else goto <D.12501>;
  <D.12500>:
  result = 1;
  <D.12501>:
  <D.12498>:
  if (result == 0) goto <D.12502>; else goto <D.12503>;
  <D.12502>:
  lastsep2 = strrchr (pname, 47);
  if (lastsep2 != 0B) goto <D.12504>; else goto <D.12505>;
  <D.12504>:
  if (lastsep != 0B) goto <D.12506>; else goto <D.12507>;
  <D.12506>:
  {
    size_t __s1_len;
    size_t __s2_len;

    D.12508 = lastsep2 + 1;
    D.12499 = lastsep + 1;
    D.11140 = __builtin_strcmp (D.12499, D.12508);
  }
  if (D.11140 == 0) goto <D.12509>; else goto <D.12510>;
  <D.12509>:
  result = 1;
  <D.12510>:
  goto <D.12511>;
  <D.12507>:
  {
    size_t __s1_len;
    size_t __s2_len;

    D.12508 = lastsep2 + 1;
    D.11149 = __builtin_strcmp (mname, D.12508);
  }
  if (D.11149 == 0) goto <D.12512>; else goto <D.12513>;
  <D.12512>:
  result = 1;
  <D.12513>:
  <D.12511>:
  <D.12505>:
  <D.12503>:
  <D.12496>:
  monoeg_g_free (pname);
  monoeg_g_free (mname);
  D.12492 = result;
  return D.12492;
}


free_procmodule (struct WapiProcModule * mod)
{
  gchar * D.12515;
  gchar * D.12518;

  D.12515 = mod->perms;
  if (D.12515 != 0B) goto <D.12516>; else goto <D.12517>;
  <D.12516>:
  D.12515 = mod->perms;
  monoeg_g_free (D.12515);
  <D.12517>:
  D.12518 = mod->filename;
  if (D.12518 != 0B) goto <D.12519>; else goto <D.12520>;
  <D.12519>:
  D.12518 = mod->filename;
  monoeg_g_free (D.12518);
  <D.12520>:
  monoeg_g_free (mod);
}


GetModuleBaseName (void * process, void * module, gunichar2 * basename, guint32 size)
{
  guint32 D.12521;

  D.12521 = get_module_name (process, module, basename, size, 1);
  return D.12521;
}


get_module_name (void * process, void * module, gunichar2 * basename, guint32 size, gboolean base)
{
  _Bool D.12523;
  _Bool D.12524;
  _Bool D.12525;
  guint32 D.12528;
  signed int process.80;
  int process.81;
  struct _WapiHandle_process * process_handle.82;
  gchar[256] * D.12537;
  int * D.12542;
  int D.12543;
  _Bool D.12545;
  _Bool D.12546;
  _Bool D.12547;
  unsigned int i.83;
  gchar * D.12557;
  int D.12558;
  void * D.12560;
  unsigned int i.84;
  unsigned int bytes.85;
  unsigned int D.12572;
  unsigned int bytes.86;
  struct _WapiHandle_process * process_handle;
  gboolean ok;
  pid_t pid;
  gunichar2 * procname;
  gchar * procname_ext;
  glong len;
  gsize bytes;
  struct FILE * fp;
  struct GSList * mods;
  struct WapiProcModule * found_module;
  guint32 count;
  int i;
  gchar * proc_name;

  try
    {
      procname_ext = 0B;
      mods = 0B;
      proc_name = 0B;
      mono_once (&process_current_once, process_set_current);
      size = size * 2;
      D.12523 = basename == 0B;
      D.12524 = size == 0;
      D.12525 = D.12523 | D.12524;
      if (D.12525 != 0) goto <D.12526>; else goto <D.12527>;
      <D.12526>:
      D.12528 = 0;
      return D.12528;
      <D.12527>:
      process.80 = (signed int) process;
      if (process.80 < 0) goto <D.12530>; else goto <D.12531>;
      <D.12530>:
      process.81 = (int) process;
      pid = process.81 & 2147483647;
      proc_name = get_process_name_from_proc (pid);
      goto <D.12533>;
      <D.12531>:
      ok = _wapi_lookup_handle (process, 9, &process_handle);
      if (ok == 0) goto <D.12534>; else goto <D.12535>;
      <D.12534>:
      D.12528 = 0;
      return D.12528;
      <D.12535>:
      process_handle.82 = process_handle;
      pid = process_handle.82->id;
      process_handle.82 = process_handle;
      D.12537 = &process_handle.82->proc_name;
      proc_name = monoeg_strdup (D.12537);
      <D.12533>:
      fp = open_process_map (pid, "r");
      if (fp == 0B) goto <D.12538>; else goto <D.12539>;
      <D.12538>:
      D.12542 = __errno_location ();
      D.12543 = *D.12542;
      if (D.12543 == 13) goto <D.12544>; else goto <D.12540>;
      <D.12544>:
      D.12545 = module == 0B;
      D.12546 = base == 1;
      D.12547 = D.12545 & D.12546;
      if (D.12547 != 0) goto <D.12548>; else goto <D.12540>;
      <D.12548>:
      procname_ext = get_process_name_from_proc (pid);
      goto <D.12541>;
      <D.12540>:
      monoeg_g_free (proc_name);
      D.12528 = 0;
      return D.12528;
      <D.12541>:
      goto <D.12549>;
      <D.12539>:
      mods = load_modules (fp);
      fclose (fp);
      count = monoeg_g_slist_length (mods);
      i = 0;
      goto <D.11213>;
      <D.11212>:
      i.83 = (unsigned int) i;
      found_module = monoeg_g_slist_nth_data (mods, i.83);
      if (procname_ext == 0B) goto <D.12554>; else goto <D.12555>;
      <D.12554>:
      if (module == 0B) goto <D.12556>; else goto <D.12551>;
      <D.12556>:
      D.12557 = found_module->filename;
      D.12558 = match_procname_to_modulename (proc_name, D.12557);
      if (D.12558 != 0) goto <D.12552>; else goto <D.12551>;
      <D.12551>:
      if (module != 0B) goto <D.12559>; else goto <D.12553>;
      <D.12559>:
      D.12560 = found_module->address_start;
      if (D.12560 == module) goto <D.12552>; else goto <D.12553>;
      <D.12552>:
      if (base != 0) goto <D.12561>; else goto <D.12562>;
      <D.12561>:
      D.12557 = found_module->filename;
      procname_ext = monoeg_g_path_get_basename (D.12557);
      goto <D.12563>;
      <D.12562>:
      D.12557 = found_module->filename;
      procname_ext = monoeg_strdup (D.12557);
      <D.12563>:
      <D.12553>:
      <D.12555>:
      free_procmodule (found_module);
      i = i + 1;
      <D.11213>:
      i.84 = (unsigned int) i;
      if (i.84 < count) goto <D.11212>; else goto <D.11214>;
      <D.11214>:
      if (procname_ext == 0B) goto <D.12565>; else goto <D.12566>;
      <D.12565>:
      procname_ext = get_process_name_from_proc (pid);
      <D.12566>:
      monoeg_g_slist_free (mods);
      monoeg_g_free (proc_name);
      <D.12549>:
      if (procname_ext != 0B) goto <D.12567>; else goto <D.12568>;
      <D.12567>:
      procname = mono_unicode_from_external (procname_ext, &bytes);
      if (procname == 0B) goto <D.12569>; else goto <D.12570>;
      <D.12569>:
      monoeg_g_free (procname_ext);
      D.12528 = 0;
      return D.12528;
      <D.12570>:
      bytes.85 = bytes;
      D.12572 = bytes.85 / 2;
      len = (glong) D.12572;
      bytes.85 = bytes;
      bytes.86 = bytes.85 + 2;
      bytes = bytes.86;
      bytes.85 = bytes;
      if (size < bytes.85) goto <D.12574>; else goto <D.12575>;
      <D.12574>:
      memcpy (basename, procname, size);
      goto <D.12576>;
      <D.12575>:
      bytes.85 = bytes;
      memcpy (basename, procname, bytes.85);
      <D.12576>:
      monoeg_g_free (procname);
      monoeg_g_free (procname_ext);
      D.12528 = (guint32) len;
      return D.12528;
      <D.12568>:
      D.12528 = 0;
      return D.12528;
    }
  finally
    {
      process_handle = {CLOBBER};
      bytes = {CLOBBER};
    }
}


get_process_name_from_proc (pid_t pid)
{
  int D.12579;
  gchar * D.12584;
  char * D.12587;
  char * D.12594;
  const char * D.12599;
  int end.87;
  int start.88;
  int D.12604;
  int D.12605;
  unsigned int D.12606;
  const gchar * D.12607;
  struct FILE * fp;
  gchar * filename;
  gchar buf[256];
  gchar * ret;

  try
    {
      filename = 0B;
      ret = 0B;
      memset (&buf, 0, 256);
      filename = monoeg_g_strdup_printf ("/proc/%d/exe", pid);
      D.12579 = readlink (filename, &buf, 255);
      if (D.12579 > 0) goto <D.12580>; else goto <D.12581>;
      <D.12580>:
      ret = monoeg_strdup (&buf);
      <D.12581>:
      monoeg_g_free (filename);
      if (ret != 0B) goto <D.12582>; else goto <D.12583>;
      <D.12582>:
      D.12584 = ret;
      return D.12584;
      <D.12583>:
      filename = monoeg_g_strdup_printf ("/proc/%d/cmdline", pid);
      fp = fopen (filename, "r");
      if (fp != 0B) goto <D.12585>; else goto <D.12586>;
      <D.12585>:
      D.12587 = fgets (&buf, 256, fp);
      if (D.12587 != 0B) goto <D.12588>; else goto <D.12589>;
      <D.12588>:
      ret = monoeg_strdup (&buf);
      <D.12589>:
      fclose (fp);
      <D.12586>:
      monoeg_g_free (filename);
      if (ret != 0B) goto <D.12590>; else goto <D.12591>;
      <D.12590>:
      D.12584 = ret;
      return D.12584;
      <D.12591>:
      filename = monoeg_g_strdup_printf ("/proc/%d/stat", pid);
      fp = fopen (filename, "r");
      if (fp != 0B) goto <D.12592>; else goto <D.12593>;
      <D.12592>:
      D.12594 = fgets (&buf, 256, fp);
      if (D.12594 != 0B) goto <D.12595>; else goto <D.12596>;
      <D.12595>:
      {
        gchar * start;
        gchar * end;

        start = __builtin_strchr (&buf, 40);
        if (start != 0B) goto <D.12597>; else goto <D.12598>;
        <D.12597>:
        D.12599 = start + 1;
        end = __builtin_strchr (D.12599, 41);
        if (end != 0B) goto <D.12600>; else goto <D.12601>;
        <D.12600>:
        end.87 = (int) end;
        start.88 = (int) start;
        D.12604 = end.87 - start.88;
        D.12605 = D.12604 + -1;
        D.12606 = (unsigned int) D.12605;
        D.12607 = start + 1;
        ret = monoeg_g_strndup (D.12607, D.12606);
        <D.12601>:
        <D.12598>:
      }
      <D.12596>:
      fclose (fp);
      <D.12593>:
      monoeg_g_free (filename);
      D.12584 = ret;
      return D.12584;
    }
  finally
    {
      buf = {CLOBBER};
    }
}


readlink (const char * restrict __path, char * restrict __buf, size_t __len)
{
  unsigned int D.12610;
  int D.12613;
  ssize_t D.12616;
  unsigned int D.12617;
  unsigned int D.12618;
  unsigned int D.12621;

  D.12610 = __builtin_object_size (__buf, 1);
  if (D.12610 != 4294967295) goto <D.12611>; else goto <D.12612>;
  <D.12611>:
  D.12613 = __builtin_constant_p (__len);
  if (D.12613 == 0) goto <D.12614>; else goto <D.12615>;
  <D.12614>:
  D.12617 = __builtin_object_size (__buf, 1);
  D.12616 = __readlink_chk (__path, __buf, __len, D.12617);
  return D.12616;
  <D.12615>:
  D.12618 = __builtin_object_size (__buf, 1);
  if (D.12618 < __len) goto <D.12619>; else goto <D.12620>;
  <D.12619>:
  D.12621 = __builtin_object_size (__buf, 1);
  D.12616 = __readlink_chk_warn (__path, __buf, __len, D.12621);
  return D.12616;
  <D.12620>:
  <D.12612>:
  D.12616 = __readlink_alias (__path, __buf, __len);
  return D.12616;
}


GetModuleFileNameEx (void * process, void * module, gunichar2 * filename, guint32 size)
{
  guint32 D.12623;

  D.12623 = get_module_name (process, module, filename, size, 0);
  return D.12623;
}


GetModuleInformation (void * process, void * module, struct WapiModuleInfo * modinfo, guint32 size)
{
  _Bool D.12625;
  _Bool D.12626;
  _Bool D.12627;
  gboolean D.12630;
  signed int process.89;
  int process.90;
  struct _WapiHandle_process * process_handle.91;
  gchar[256] * D.12639;
  unsigned int i.92;
  gchar * D.12649;
  int D.12650;
  void * D.12652;
  void * D.12653;
  unsigned int D.12654;
  unsigned int D.12655;
  unsigned int D.12656;
  void * D.12657;
  unsigned int i.93;
  struct _WapiHandle_process * process_handle;
  gboolean ok;
  pid_t pid;
  struct FILE * fp;
  struct GSList * mods;
  struct WapiProcModule * found_module;
  guint32 count;
  int i;
  gboolean ret;
  gchar * proc_name;

  try
    {
      mods = 0B;
      ret = 0;
      proc_name = 0B;
      mono_once (&process_current_once, process_set_current);
      D.12625 = modinfo == 0B;
      D.12626 = size <= 11;
      D.12627 = D.12625 | D.12626;
      if (D.12627 != 0) goto <D.12628>; else goto <D.12629>;
      <D.12628>:
      D.12630 = 0;
      return D.12630;
      <D.12629>:
      process.89 = (signed int) process;
      if (process.89 < 0) goto <D.12632>; else goto <D.12633>;
      <D.12632>:
      process.90 = (int) process;
      pid = process.90 & 2147483647;
      proc_name = get_process_name_from_proc (pid);
      goto <D.12635>;
      <D.12633>:
      ok = _wapi_lookup_handle (process, 9, &process_handle);
      if (ok == 0) goto <D.12636>; else goto <D.12637>;
      <D.12636>:
      D.12630 = 0;
      return D.12630;
      <D.12637>:
      process_handle.91 = process_handle;
      pid = process_handle.91->id;
      process_handle.91 = process_handle;
      D.12639 = &process_handle.91->proc_name;
      proc_name = monoeg_strdup (D.12639);
      <D.12635>:
      fp = open_process_map (pid, "r");
      if (fp == 0B) goto <D.12640>; else goto <D.12641>;
      <D.12640>:
      monoeg_g_free (proc_name);
      D.12630 = 0;
      return D.12630;
      <D.12641>:
      mods = load_modules (fp);
      fclose (fp);
      count = monoeg_g_slist_length (mods);
      i = 0;
      goto <D.11244>;
      <D.11243>:
      i.92 = (unsigned int) i;
      found_module = monoeg_g_slist_nth_data (mods, i.92);
      if (ret == 0) goto <D.12646>; else goto <D.12647>;
      <D.12646>:
      if (module == 0B) goto <D.12648>; else goto <D.12643>;
      <D.12648>:
      D.12649 = found_module->filename;
      D.12650 = match_procname_to_modulename (proc_name, D.12649);
      if (D.12650 != 0) goto <D.12644>; else goto <D.12643>;
      <D.12643>:
      if (module != 0B) goto <D.12651>; else goto <D.12645>;
      <D.12651>:
      D.12652 = found_module->address_start;
      if (D.12652 == module) goto <D.12644>; else goto <D.12645>;
      <D.12644>:
      D.12652 = found_module->address_start;
      modinfo->lpBaseOfDll = D.12652;
      D.12653 = found_module->address_end;
      D.12654 = (unsigned int) D.12653;
      D.12652 = found_module->address_start;
      D.12655 = (unsigned int) D.12652;
      D.12656 = D.12654 - D.12655;
      modinfo->SizeOfImage = D.12656;
      D.12657 = found_module->address_offset;
      modinfo->EntryPoint = D.12657;
      ret = 1;
      <D.12645>:
      <D.12647>:
      free_procmodule (found_module);
      i = i + 1;
      <D.11244>:
      i.93 = (unsigned int) i;
      if (i.93 < count) goto <D.11243>; else goto <D.11245>;
      <D.11245>:
      monoeg_g_slist_free (mods);
      monoeg_g_free (proc_name);
      D.12630 = ret;
      return D.12630;
    }
  finally
    {
      process_handle = {CLOBBER};
    }
}


GetProcessWorkingSetSize (void * process, size_t * min, size_t * max)
{
  _Bool D.12661;
  _Bool D.12662;
  _Bool D.12663;
  gboolean D.12666;
  signed int process.94;
  struct _WapiHandle_process * process_handle.95;
  unsigned int D.12673;
  unsigned int D.12674;
  struct _WapiHandle_process * process_handle;
  gboolean ok;

  try
    {
      mono_once (&process_current_once, process_set_current);
      D.12661 = min == 0B;
      D.12662 = max == 0B;
      D.12663 = D.12661 | D.12662;
      if (D.12663 != 0) goto <D.12664>; else goto <D.12665>;
      <D.12664>:
      D.12666 = 0;
      return D.12666;
      <D.12665>:
      process.94 = (signed int) process;
      if (process.94 < 0) goto <D.12668>; else goto <D.12669>;
      <D.12668>:
      D.12666 = 0;
      return D.12666;
      <D.12669>:
      ok = _wapi_lookup_handle (process, 9, &process_handle);
      if (ok == 0) goto <D.12670>; else goto <D.12671>;
      <D.12670>:
      D.12666 = 0;
      return D.12666;
      <D.12671>:
      process_handle.95 = process_handle;
      D.12673 = process_handle.95->min_working_set;
      *min = D.12673;
      process_handle.95 = process_handle;
      D.12674 = process_handle.95->max_working_set;
      *max = D.12674;
      D.12666 = 1;
      return D.12666;
    }
  finally
    {
      process_handle = {CLOBBER};
    }
}


SetProcessWorkingSetSize (void * process, size_t min, size_t max)
{
  signed int process.96;
  gboolean D.12680;
  struct _WapiHandle_process * process_handle.97;
  struct _WapiHandle_process * process_handle;
  gboolean ok;

  try
    {
      mono_once (&process_current_once, process_set_current);
      process.96 = (signed int) process;
      if (process.96 < 0) goto <D.12678>; else goto <D.12679>;
      <D.12678>:
      D.12680 = 0;
      return D.12680;
      <D.12679>:
      ok = _wapi_lookup_handle (process, 9, &process_handle);
      if (ok == 0) goto <D.12681>; else goto <D.12682>;
      <D.12681>:
      D.12680 = 0;
      return D.12680;
      <D.12682>:
      process_handle.97 = process_handle;
      process_handle.97->min_working_set = min;
      process_handle.97 = process_handle;
      process_handle.97->max_working_set = max;
      D.12680 = 1;
      return D.12680;
    }
  finally
    {
      process_handle = {CLOBBER};
    }
}


TerminateProcess (void * process, gint32 exitCode)
{
  signed int process.98;
  int process.99;
  gboolean D.12693;
  struct _WapiHandle_process * process_handle.100;
  int iftmp.101;
  int * D.12701;
  int D.12702;
  _Bool D.12703;
  struct _WapiHandle_process * process_handle;
  gboolean ok;
  int signo;
  int ret;
  pid_t pid;

  try
    {
      process.98 = (signed int) process;
      if (process.98 < 0) goto <D.12687>; else goto <D.12688>;
      <D.12687>:
      process.99 = (int) process;
      pid = process.99 & 2147483647;
      goto <D.12690>;
      <D.12688>:
      ok = _wapi_lookup_handle (process, 9, &process_handle);
      if (ok == 0) goto <D.12691>; else goto <D.12692>;
      <D.12691>:
      SetLastError (6);
      D.12693 = 0;
      return D.12693;
      <D.12692>:
      process_handle.100 = process_handle;
      pid = process_handle.100->id;
      <D.12690>:
      if (exitCode == -1) goto <D.12696>; else goto <D.12697>;
      <D.12696>:
      iftmp.101 = 9;
      goto <D.12698>;
      <D.12697>:
      iftmp.101 = 15;
      <D.12698>:
      signo = iftmp.101;
      ret = kill (pid, signo);
      if (ret == -1) goto <D.12699>; else goto <D.12700>;
      <D.12699>:
      D.12701 = __errno_location ();
      D.12702 = *D.12701;
      switch (D.12702) <default: <D.11273>, case 1: <D.11271>, case 3: <D.11272>, case 22: <D.11269>>
      <D.11269>:
      SetLastError (87);
      goto <D.11270>;
      <D.11271>:
      SetLastError (5);
      goto <D.11270>;
      <D.11272>:
      SetLastError (127);
      goto <D.11270>;
      <D.11273>:
      SetLastError (31);
      <D.11270>:
      <D.12700>:
      D.12703 = ret == 0;
      D.12693 = (gboolean) D.12703;
      return D.12693;
    }
  finally
    {
      process_handle = {CLOBBER};
    }
}


GetPriorityClass (void * process)
{
  signed int process.102;
  int process.103;
  guint32 D.12713;
  struct _WapiHandle_process * process_handle.104;
  int * D.12715;
  unsigned int pid.105;
  int D.12719;
  struct _WapiHandle_process * process_handle;
  gboolean ok;
  int ret;
  pid_t pid;

  try
    {
      process.102 = (signed int) process;
      if (process.102 < 0) goto <D.12707>; else goto <D.12708>;
      <D.12707>:
      process.103 = (int) process;
      pid = process.103 & 2147483647;
      goto <D.12710>;
      <D.12708>:
      ok = _wapi_lookup_handle (process, 9, &process_handle);
      if (ok == 0) goto <D.12711>; else goto <D.12712>;
      <D.12711>:
      SetLastError (6);
      D.12713 = 0;
      return D.12713;
      <D.12712>:
      process_handle.104 = process_handle;
      pid = process_handle.104->id;
      <D.12710>:
      D.12715 = __errno_location ();
      *D.12715 = 0;
      pid.105 = (unsigned int) pid;
      ret = getpriority (0, pid.105);
      if (ret == -1) goto <D.12717>; else goto <D.12718>;
      <D.12717>:
      D.12715 = __errno_location ();
      D.12719 = *D.12715;
      if (D.12719 != 0) goto <D.12720>; else goto <D.12721>;
      <D.12720>:
      D.12715 = __errno_location ();
      D.12719 = *D.12715;
      switch (D.12719) <default: <D.11285>, case 1: <D.11281>, case 3: <D.11284>, case 13: <D.11282>>
      <D.11281>:
      <D.11282>:
      SetLastError (5);
      goto <D.11283>;
      <D.11284>:
      SetLastError (127);
      goto <D.11283>;
      <D.11285>:
      SetLastError (31);
      <D.11283>:
      D.12713 = 0;
      return D.12713;
      <D.12721>:
      <D.12718>:
      if (ret == 0) goto <D.12722>; else goto <D.12723>;
      <D.12722>:
      D.12713 = 32;
      return D.12713;
      <D.12723>:
      if (ret < -15) goto <D.12724>; else goto <D.12725>;
      <D.12724>:
      D.12713 = 256;
      return D.12713;
      <D.12725>:
      if (ret < -10) goto <D.12726>; else goto <D.12727>;
      <D.12726>:
      D.12713 = 128;
      return D.12713;
      <D.12727>:
      if (ret < 0) goto <D.12728>; else goto <D.12729>;
      <D.12728>:
      D.12713 = 32768;
      return D.12713;
      <D.12729>:
      if (ret > 10) goto <D.12730>; else goto <D.12731>;
      <D.12730>:
      D.12713 = 64;
      return D.12713;
      <D.12731>:
      if (ret > 0) goto <D.12732>; else goto <D.12733>;
      <D.12732>:
      D.12713 = 16384;
      return D.12713;
      <D.12733>:
      D.12713 = 32;
      return D.12713;
    }
  finally
    {
      process_handle = {CLOBBER};
    }
}


SetPriorityClass (void * process, guint32 priority_class)
{
  signed int process.106;
  int process.107;
  gboolean D.12743;
  struct _WapiHandle_process * process_handle.108;
  unsigned int pid.109;
  int * D.12748;
  int D.12749;
  _Bool D.12750;
  struct _WapiHandle_process * process_handle;
  gboolean ok;
  int ret;
  int prio;
  pid_t pid;

  try
    {
      process.106 = (signed int) process;
      if (process.106 < 0) goto <D.12737>; else goto <D.12738>;
      <D.12737>:
      process.107 = (int) process;
      pid = process.107 & 2147483647;
      goto <D.12740>;
      <D.12738>:
      ok = _wapi_lookup_handle (process, 9, &process_handle);
      if (ok == 0) goto <D.12741>; else goto <D.12742>;
      <D.12741>:
      SetLastError (6);
      D.12743 = 0;
      return D.12743;
      <D.12742>:
      process_handle.108 = process_handle;
      pid = process_handle.108->id;
      <D.12740>:
      switch (priority_class) <default: <D.11302>, case 32: <D.11298>, case 64: <D.11295>, case 128: <D.11300>, case 256: <D.11301>, case 16384: <D.11297>, case 32768: <D.11299>>
      <D.11295>:
      prio = 19;
      goto <D.11296>;
      <D.11297>:
      prio = 10;
      goto <D.11296>;
      <D.11298>:
      prio = 0;
      goto <D.11296>;
      <D.11299>:
      prio = -5;
      goto <D.11296>;
      <D.11300>:
      prio = -11;
      goto <D.11296>;
      <D.11301>:
      prio = -20;
      goto <D.11296>;
      <D.11302>:
      SetLastError (87);
      D.12743 = 0;
      return D.12743;
      <D.11296>:
      pid.109 = (unsigned int) pid;
      ret = setpriority (0, pid.109, prio);
      if (ret == -1) goto <D.12746>; else goto <D.12747>;
      <D.12746>:
      D.12748 = __errno_location ();
      D.12749 = *D.12748;
      switch (D.12749) <default: <D.11307>, case 1: <D.11303>, case 3: <D.11306>, case 13: <D.11304>>
      <D.11303>:
      <D.11304>:
      SetLastError (5);
      goto <D.11305>;
      <D.11306>:
      SetLastError (127);
      goto <D.11305>;
      <D.11307>:
      SetLastError (31);
      <D.11305>:
      <D.12747>:
      D.12750 = ret == 0;
      D.12743 = (gboolean) D.12750;
      return D.12743;
    }
  finally
    {
      process_handle = {CLOBBER};
    }
}


