__attribute__((visibility ("hidden")))
mono_process_list (int * size)
{
  void * * D.6407;
  long int D.6408;
  char * nend.0;
  char D.6414;
  long unsigned int D.6420;
  long unsigned int D.6421;
  int i.1;
  long unsigned int D.6423;
  long unsigned int D.6424;
  void * * D.6425;
  long int D.6426;
  void * D.6427;
  const char * name;
  void * * buf;
  int count;
  int i;
  struct GDir * dir;

  buf = 0B;
  count = 0;
  i = 0;
  dir = monoeg_g_dir_open ("/proc/", 0, 0B);
  if (dir == 0B) goto <D.6403>; else goto <D.6404>;
  <D.6403>:
  if (size != 0B) goto <D.6405>; else goto <D.6406>;
  <D.6405>:
  *size = 0;
  <D.6406>:
  D.6407 = 0B;
  return D.6407;
  <D.6404>:
  goto <D.6255>;
  <D.6256>:
  {
    int pid;
    char * nend;

    try
      {
        D.6408 = strtol (name, &nend, 10);
        pid = (int) D.6408;
        if (pid <= 0) goto <D.6409>; else goto <D.6411>;
        <D.6411>:
        nend.0 = nend;
        if (nend.0 == name) goto <D.6409>; else goto <D.6413>;
        <D.6413>:
        nend.0 = nend;
        D.6414 = *nend.0;
        if (D.6414 != 0) goto <D.6409>; else goto <D.6410>;
        <D.6409>:
        // predicted unlikely by continue predictor.
        goto <D.6255>;
        <D.6410>:
        if (i >= count) goto <D.6415>; else goto <D.6416>;
        <D.6415>:
        if (count == 0) goto <D.6417>; else goto <D.6418>;
        <D.6417>:
        count = 16;
        goto <D.6419>;
        <D.6418>:
        count = count * 2;
        <D.6419>:
        D.6420 = (long unsigned int) count;
        D.6421 = D.6420 * 8;
        buf = monoeg_realloc (buf, D.6421);
        <D.6416>:
        i.1 = i;
        i = i.1 + 1;
        D.6423 = (long unsigned int) i.1;
        D.6424 = D.6423 * 8;
        D.6425 = buf + D.6424;
        D.6426 = (long int) pid;
        D.6427 = (void *) D.6426;
        *D.6425 = D.6427;
      }
    finally
      {
        nend = {CLOBBER};
      }
  }
  <D.6255>:
  name = monoeg_g_dir_read_name (dir);
  if (name != 0B) goto <D.6256>; else goto <D.6257>;
  <D.6257>:
  monoeg_g_dir_close (dir);
  if (size != 0B) goto <D.6428>; else goto <D.6429>;
  <D.6428>:
  *size = i;
  <D.6429>:
  D.6407 = buf;
  return D.6407;
}


__attribute__((visibility ("hidden")))
mono_process_get_name (void * pid, char * buf, int len)
{
  long int pid.2;
  int D.6434;
  char * D.6437;
  int D.6438;
  long unsigned int D.6439;
  long unsigned int D.6440;
  sizetype D.6441;
  char * D.6442;
  char fname[128];
  struct FILE * file;
  char * p;
  int r;

  try
    {
      pid.2 = (long int) pid;
      D.6434 = (int) pid.2;
      sprintf (&fname, "/proc/%d/cmdline", D.6434);
      *buf = 0;
      file = fopen (&fname, "r");
      if (file == 0B) goto <D.6435>; else goto <D.6436>;
      <D.6435>:
      D.6437 = buf;
      return D.6437;
      <D.6436>:
      D.6438 = len + -1;
      D.6439 = (long unsigned int) D.6438;
      D.6440 = fread (buf, 1, D.6439, file);
      r = (int) D.6440;
      fclose (file);
      D.6441 = (sizetype) r;
      D.6442 = buf + D.6441;
      *D.6442 = 0;
      p = strrchr (buf, 47);
      if (p != 0B) goto <D.6443>; else goto <D.6444>;
      <D.6443>:
      D.6437 = p + 1;
      return D.6437;
      <D.6444>:
      if (r == 0) goto <D.6445>; else goto <D.6446>;
      <D.6445>:
      pid.2 = (long int) pid;
      D.6434 = (int) pid.2;
      D.6437 = get_pid_status_item_buf (D.6434, "Name", buf, len, 0B);
      return D.6437;
      <D.6446>:
      D.6437 = buf;
      return D.6437;
    }
  finally
    {
      fname = {CLOBBER};
    }
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__, __leaf__, __nothrow__))
sprintf (char * restrict __s, const char * restrict __fmt)
{
  int D.6449;
  long unsigned int D.6450;

  D.6450 = __builtin_object_size (__s, 1);
  D.6449 = __builtin___sprintf_chk (__s, 1, D.6450, __fmt, __builtin_va_arg_pack ());
  return D.6449;
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__))
fread (void * restrict __ptr, size_t __size, size_t __n, struct FILE * restrict __stream)
{
  long unsigned int D.6452;
  int D.6457;
  int D.6459;
  long unsigned int D.6461;
  size_t D.6462;
  long unsigned int D.6463;
  long unsigned int D.6464;
  long unsigned int D.6465;
  long unsigned int D.6468;

  D.6452 = __builtin_object_size (__ptr, 0);
  if (D.6452 != 18446744073709551615) goto <D.6453>; else goto <D.6454>;
  <D.6453>:
  D.6457 = __builtin_constant_p (__size);
  if (D.6457 == 0) goto <D.6455>; else goto <D.6458>;
  <D.6458>:
  D.6459 = __builtin_constant_p (__n);
  if (D.6459 == 0) goto <D.6455>; else goto <D.6460>;
  <D.6460>:
  D.6461 = __size | __n;
  if (D.6461 > 4294967295) goto <D.6455>; else goto <D.6456>;
  <D.6455>:
  D.6463 = __builtin_object_size (__ptr, 0);
  D.6462 = __fread_chk (__ptr, D.6463, __size, __n, __stream);
  return D.6462;
  <D.6456>:
  D.6464 = __size * __n;
  D.6465 = __builtin_object_size (__ptr, 0);
  if (D.6464 > D.6465) goto <D.6466>; else goto <D.6467>;
  <D.6466>:
  D.6468 = __builtin_object_size (__ptr, 0);
  D.6462 = __fread_chk_warn (__ptr, D.6468, __size, __n, __stream);
  return D.6462;
  <D.6467>:
  <D.6454>:
  D.6462 = __fread_alias (__ptr, __size, __n, __stream);
  return D.6462;
}


__attribute__((__unused__))
get_pid_status_item_buf (int pid, const char * item, char * rbuf, int blen, MonoProcessError * error)
{
  long unsigned int D.6470;
  char * D.6475;
  char D.6476;
  char D.6477;
  long unsigned int D.6480;
  int D.6481;
  sizetype D.6484;
  const short unsigned int * * D.6485;
  const short unsigned int * D.6486;
  char D.6487;
  long unsigned int D.6488;
  long unsigned int D.6489;
  const short unsigned int * D.6490;
  short unsigned int D.6491;
  int D.6492;
  int D.6493;
  char * s.3;
  char D.6495;
  long unsigned int D.6498;
  int D.6499;
  long unsigned int D.6500;
  sizetype iftmp.4;
  sizetype D.6505;
  char * D.6506;
  char buf[256];
  char * s;
  struct FILE * f;
  int len;

  try
    {
      D.6470 = __strlen_g (item);
      len = (int) D.6470;
      monoeg_g_snprintf (&buf, 256, "/proc/%d/status", pid);
      f = fopen (&buf, "r");
      if (f == 0B) goto <D.6471>; else goto <D.6472>;
      <D.6471>:
      if (error != 0B) goto <D.6473>; else goto <D.6474>;
      <D.6473>:
      *error = 1;
      <D.6474>:
      D.6475 = 0B;
      return D.6475;
      <D.6472>:
      goto <D.6269>;
      <D.6276>:
      D.6476 = *item;
      D.6477 = buf[0];
      if (D.6476 != D.6477) goto <D.6478>; else goto <D.6479>;
      <D.6478>:
      // predicted unlikely by continue predictor.
      goto <D.6269>;
      <D.6479>:
      D.6480 = (long unsigned int) len;
      D.6481 = strncmp (&buf, item, D.6480);
      if (D.6481 != 0) goto <D.6482>; else goto <D.6483>;
      <D.6482>:
      // predicted unlikely by continue predictor.
      goto <D.6269>;
      <D.6483>:
      D.6484 = (sizetype) len;
      s = &buf + D.6484;
      goto <D.6271>;
      <D.6270>:
      s = s + 1;
      <D.6271>:
      D.6485 = __ctype_b_loc ();
      D.6486 = *D.6485;
      D.6487 = *s;
      D.6488 = (long unsigned int) D.6487;
      D.6489 = D.6488 * 2;
      D.6490 = D.6486 + D.6489;
      D.6491 = *D.6490;
      D.6492 = (int) D.6491;
      D.6493 = D.6492 & 32;
      if (D.6493 != 0) goto <D.6270>; else goto <D.6272>;
      <D.6272>:
      s.3 = s;
      s = s.3 + 1;
      D.6495 = *s.3;
      if (D.6495 != 58) goto <D.6496>; else goto <D.6497>;
      <D.6496>:
      // predicted unlikely by continue predictor.
      goto <D.6269>;
      <D.6497>:
      goto <D.6274>;
      <D.6273>:
      s = s + 1;
      <D.6274>:
      D.6485 = __ctype_b_loc ();
      D.6486 = *D.6485;
      D.6487 = *s;
      D.6488 = (long unsigned int) D.6487;
      D.6489 = D.6488 * 2;
      D.6490 = D.6486 + D.6489;
      D.6491 = *D.6490;
      D.6492 = (int) D.6491;
      D.6493 = D.6492 & 32;
      if (D.6493 != 0) goto <D.6273>; else goto <D.6275>;
      <D.6275>:
      fclose (f);
      D.6498 = __strlen_g (s);
      len = (int) D.6498;
      D.6499 = MIN_EXPR <blen, len>;
      D.6500 = (long unsigned int) D.6499;
      strncpy (rbuf, s, D.6500);
      if (len < blen) goto <D.6502>; else goto <D.6503>;
      <D.6502>:
      D.6484 = (sizetype) len;
      iftmp.4 = D.6484 + 18446744073709551615;
      goto <D.6504>;
      <D.6503>:
      D.6505 = (sizetype) blen;
      iftmp.4 = D.6505 + 18446744073709551615;
      <D.6504>:
      D.6506 = rbuf + iftmp.4;
      *D.6506 = 0;
      if (error != 0B) goto <D.6507>; else goto <D.6508>;
      <D.6507>:
      *error = 0;
      <D.6508>:
      D.6475 = rbuf;
      return D.6475;
      <D.6269>:
      s = fgets (&buf, blen, f);
      if (s != 0B) goto <D.6276>; else goto <D.6277>;
      <D.6277>:
      fclose (f);
      if (error != 0B) goto <D.6509>; else goto <D.6510>;
      <D.6509>:
      *error = 2;
      <D.6510>:
      D.6475 = 0B;
      return D.6475;
    }
  finally
    {
      buf = {CLOBBER};
    }
}


__attribute__((__gnu_inline__))
__strlen_g (const char * __str)
{
  size_t D.6513;
  long int __ptr.5;
  long int __str.6;
  long int D.6516;
  char * __ptr;
  char * __tmp;

  __ptr = 0B;
  __tmp = __str;
  __asm__ __volatile__("   la    0,0
0: srst  %0,%1
   jo    0b
" : "=&a" __ptr, "=&a" __tmp : "0" __ptr, "1" __tmp : "0", "memory", "cc");
  __ptr.5 = (long int) __ptr;
  __str.6 = (long int) __str;
  D.6516 = __ptr.5 - __str.6;
  D.6513 = (size_t) D.6516;
  return D.6513;
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__, __nothrow__, __leaf__))
strncpy (char * restrict __dest, const char * restrict __src, size_t __len)
{
  char * D.6518;
  long unsigned int D.6519;

  D.6519 = __builtin_object_size (__dest, 1);
  D.6518 = __builtin___strncpy_chk (__dest, __src, __len, D.6519);
  return D.6518;
}


__attribute__((__artificial__, __gnu_inline__, __always_inline__))
fgets (char * restrict __s, int __n, struct FILE * restrict __stream)
{
  long unsigned int D.6521;
  int D.6526;
  char * D.6528;
  long unsigned int D.6529;
  long unsigned int D.6530;
  long unsigned int D.6531;
  long unsigned int D.6534;

  D.6521 = __builtin_object_size (__s, 1);
  if (D.6521 != 18446744073709551615) goto <D.6522>; else goto <D.6523>;
  <D.6522>:
  D.6526 = __builtin_constant_p (__n);
  if (D.6526 == 0) goto <D.6524>; else goto <D.6527>;
  <D.6527>:
  if (__n <= 0) goto <D.6524>; else goto <D.6525>;
  <D.6524>:
  D.6529 = __builtin_object_size (__s, 1);
  D.6528 = __fgets_chk (__s, D.6529, __n, __stream);
  return D.6528;
  <D.6525>:
  D.6530 = (long unsigned int) __n;
  D.6531 = __builtin_object_size (__s, 1);
  if (D.6530 > D.6531) goto <D.6532>; else goto <D.6533>;
  <D.6532>:
  D.6534 = __builtin_object_size (__s, 1);
  D.6528 = __fgets_chk_warn (__s, D.6534, __n, __stream);
  return D.6528;
  <D.6533>:
  <D.6523>:
  D.6528 = __fgets_alias (__s, __n, __stream);
  return D.6528;
}


__attribute__((visibility ("hidden")))
mono_process_get_data_with_error (void * pid, MonoProcessData data, MonoProcessError * error)
{
  long int pid.7;
  gint64 D.6539;
  long int D.6544;
  int D.6545;
  long int D.6546;
  gint64 val;
  int rpid;

  pid.7 = (long int) pid;
  rpid = (int) pid.7;
  if (error != 0B) goto <D.6537>; else goto <D.6538>;
  <D.6537>:
  *error = 2;
  <D.6538>:
  switch (data) <default: <D.6547>, case 0: <D.6344>, case 1: <D.6345>, case 2: <D.6346>, case 3: <D.6347>, case 4: <D.6348>, case 5: <D.6349>, case 6: <D.6350>, case 7: <D.6351>, case 8: <D.6352>, case 9: <D.6353>, case 10: <D.6354>, case 11: <D.6355>, case 12: <D.6356>>
  <D.6344>:
  D.6539 = get_pid_status_item (rpid, "Threads", error, 1);
  return D.6539;
  <D.6345>:
  D.6539 = get_process_stat_time (rpid, 10, 0, error);
  return D.6539;
  <D.6346>:
  D.6539 = get_process_stat_time (rpid, 11, 0, error);
  return D.6539;
  <D.6347>:
  D.6539 = get_process_stat_time (rpid, 10, 1, error);
  return D.6539;
  <D.6348>:
  D.6539 = get_pid_status_item (rpid, "VmRSS", error, 1024);
  return D.6539;
  <D.6349>:
  val = get_pid_status_item (rpid, "VmHWM", error, 1024);
  if (val == 0) goto <D.6540>; else goto <D.6541>;
  <D.6540>:
  val = get_pid_status_item (rpid, "VmRSS", error, 1024);
  <D.6541>:
  D.6539 = val;
  return D.6539;
  <D.6350>:
  D.6539 = get_pid_status_item (rpid, "VmData", error, 1024);
  return D.6539;
  <D.6351>:
  D.6539 = get_pid_status_item (rpid, "VmSize", error, 1024);
  return D.6539;
  <D.6352>:
  val = get_pid_status_item (rpid, "VmPeak", error, 1024);
  if (val == 0) goto <D.6542>; else goto <D.6543>;
  <D.6542>:
  val = get_pid_status_item (rpid, "VmSize", error, 1024);
  <D.6543>:
  D.6539 = val;
  return D.6539;
  <D.6353>:
  D.6539 = get_process_stat_item (rpid, 6, 1, error);
  return D.6539;
  <D.6354>:
  D.6544 = get_process_stat_item (rpid, 18, 0, error);
  D.6545 = get_user_hz ();
  D.6546 = (long int) D.6545;
  D.6539 = D.6544 / D.6546;
  return D.6539;
  <D.6355>:
  D.6539 = get_process_stat_time (rpid, 0, 0, error);
  return D.6539;
  <D.6356>:
  D.6539 = 0;
  return D.6539;
  <D.6547>:
  D.6539 = 0;
  return D.6539;
}


get_pid_status_item (int pid, const char * item, MonoProcessError * error, int multiplier)
{
  gint64 D.6551;
  long int D.6552;
  long int D.6553;
  char buf[64];
  char * s;

  try
    {
      s = get_pid_status_item_buf (pid, item, &buf, 64, error);
      if (s != 0B) goto <D.6549>; else goto <D.6550>;
      <D.6549>:
      D.6552 = atol (s);
      D.6553 = (long int) multiplier;
      D.6551 = D.6552 * D.6553;
      return D.6551;
      <D.6550>:
      D.6551 = 0;
      return D.6551;
    }
  finally
    {
      buf = {CLOBBER};
    }
}


__attribute__((__gnu_inline__, __pure__, __leaf__, __nothrow__))
atol (const char * __nptr)
{
  long int D.6556;

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


get_process_stat_item (int pid, int pos, int sum, MonoProcessError * error)
{
  gint64 D.6562;
  long unsigned int D.6563;
  const short unsigned int * * D.6572;
  const short unsigned int * D.6573;
  char D.6574;
  long unsigned int D.6575;
  long unsigned int D.6576;
  const short unsigned int * D.6577;
  short unsigned int D.6578;
  int D.6579;
  int D.6580;
  long unsigned int D.6599;
  long unsigned int D.6606;
  long unsigned int value.8;
  long unsigned int D.6608;
  char buf[512];
  char * s;
  char * end;
  struct FILE * f;
  int len;
  int i;
  gint64 value;

  try
    {
      monoeg_g_snprintf (&buf, 512, "/proc/%d/stat", pid);
      f = fopen (&buf, "r");
      if (f == 0B) goto <D.6558>; else goto <D.6559>;
      <D.6558>:
      if (error != 0B) goto <D.6560>; else goto <D.6561>;
      <D.6560>:
      *error = 1;
      <D.6561>:
      D.6562 = 0;
      return D.6562;
      <D.6559>:
      D.6563 = fread (&buf, 1, 512, f);
      len = (int) D.6563;
      fclose (f);
      if (len <= 0) goto <D.6564>; else goto <D.6565>;
      <D.6564>:
      if (error != 0B) goto <D.6566>; else goto <D.6567>;
      <D.6566>:
      *error = 2;
      <D.6567>:
      D.6562 = 0;
      return D.6562;
      <D.6565>:
      s = __builtin_strchr (&buf, 41);
      if (s == 0B) goto <D.6568>; else goto <D.6569>;
      <D.6568>:
      if (error != 0B) goto <D.6570>; else goto <D.6571>;
      <D.6570>:
      *error = 2;
      <D.6571>:
      D.6562 = 0;
      return D.6562;
      <D.6569>:
      s = s + 1;
      goto <D.6301>;
      <D.6300>:
      s = s + 1;
      <D.6301>:
      D.6572 = __ctype_b_loc ();
      D.6573 = *D.6572;
      D.6574 = *s;
      D.6575 = (long unsigned int) D.6574;
      D.6576 = D.6575 * 2;
      D.6577 = D.6573 + D.6576;
      D.6578 = *D.6577;
      D.6579 = (int) D.6578;
      D.6580 = D.6579 & 32;
      if (D.6580 != 0) goto <D.6300>; else goto <D.6302>;
      <D.6302>:
      D.6574 = *s;
      if (D.6574 == 0) goto <D.6581>; else goto <D.6582>;
      <D.6581>:
      if (error != 0B) goto <D.6583>; else goto <D.6584>;
      <D.6583>:
      *error = 2;
      <D.6584>:
      D.6562 = 0;
      return D.6562;
      <D.6582>:
      goto <D.6304>;
      <D.6303>:
      s = s + 1;
      <D.6304>:
      D.6574 = *s;
      if (D.6574 != 0) goto <D.6585>; else goto <D.6305>;
      <D.6585>:
      D.6572 = __ctype_b_loc ();
      D.6573 = *D.6572;
      D.6574 = *s;
      D.6575 = (long unsigned int) D.6574;
      D.6576 = D.6575 * 2;
      D.6577 = D.6573 + D.6576;
      D.6578 = *D.6577;
      D.6579 = (int) D.6578;
      D.6580 = D.6579 & 32;
      if (D.6580 == 0) goto <D.6303>; else goto <D.6305>;
      <D.6305>:
      D.6574 = *s;
      if (D.6574 == 0) goto <D.6586>; else goto <D.6587>;
      <D.6586>:
      if (error != 0B) goto <D.6588>; else goto <D.6589>;
      <D.6588>:
      *error = 2;
      <D.6589>:
      D.6562 = 0;
      return D.6562;
      <D.6587>:
      i = 0;
      goto <D.6313>;
      <D.6312>:
      goto <D.6307>;
      <D.6306>:
      s = s + 1;
      <D.6307>:
      D.6572 = __ctype_b_loc ();
      D.6573 = *D.6572;
      D.6574 = *s;
      D.6575 = (long unsigned int) D.6574;
      D.6576 = D.6575 * 2;
      D.6577 = D.6573 + D.6576;
      D.6578 = *D.6577;
      D.6579 = (int) D.6578;
      D.6580 = D.6579 & 32;
      if (D.6580 != 0) goto <D.6306>; else goto <D.6308>;
      <D.6308>:
      D.6574 = *s;
      if (D.6574 == 0) goto <D.6590>; else goto <D.6591>;
      <D.6590>:
      if (error != 0B) goto <D.6592>; else goto <D.6593>;
      <D.6592>:
      *error = 2;
      <D.6593>:
      D.6562 = 0;
      return D.6562;
      <D.6591>:
      goto <D.6310>;
      <D.6309>:
      s = s + 1;
      <D.6310>:
      D.6574 = *s;
      if (D.6574 != 0) goto <D.6594>; else goto <D.6311>;
      <D.6594>:
      D.6572 = __ctype_b_loc ();
      D.6573 = *D.6572;
      D.6574 = *s;
      D.6575 = (long unsigned int) D.6574;
      D.6576 = D.6575 * 2;
      D.6577 = D.6573 + D.6576;
      D.6578 = *D.6577;
      D.6579 = (int) D.6578;
      D.6580 = D.6579 & 32;
      if (D.6580 == 0) goto <D.6309>; else goto <D.6311>;
      <D.6311>:
      D.6574 = *s;
      if (D.6574 == 0) goto <D.6595>; else goto <D.6596>;
      <D.6595>:
      if (error != 0B) goto <D.6597>; else goto <D.6598>;
      <D.6597>:
      *error = 2;
      <D.6598>:
      D.6562 = 0;
      return D.6562;
      <D.6596>:
      i = i + 1;
      <D.6313>:
      if (i < pos) goto <D.6312>; else goto <D.6314>;
      <D.6314>:
      D.6599 = strtoul (s, &end, 0);
      value = (gint64) D.6599;
      if (sum != 0) goto <D.6600>; else goto <D.6601>;
      <D.6600>:
      goto <D.6316>;
      <D.6315>:
      s = s + 1;
      <D.6316>:
      D.6572 = __ctype_b_loc ();
      D.6573 = *D.6572;
      D.6574 = *s;
      D.6575 = (long unsigned int) D.6574;
      D.6576 = D.6575 * 2;
      D.6577 = D.6573 + D.6576;
      D.6578 = *D.6577;
      D.6579 = (int) D.6578;
      D.6580 = D.6579 & 32;
      if (D.6580 != 0) goto <D.6315>; else goto <D.6317>;
      <D.6317>:
      D.6574 = *s;
      if (D.6574 == 0) goto <D.6602>; else goto <D.6603>;
      <D.6602>:
      if (error != 0B) goto <D.6604>; else goto <D.6605>;
      <D.6604>:
      *error = 2;
      <D.6605>:
      D.6562 = 0;
      return D.6562;
      <D.6603>:
      D.6606 = strtoul (s, &end, 0);
      value.8 = (long unsigned int) value;
      D.6608 = D.6606 + value.8;
      value = (gint64) D.6608;
      <D.6601>:
      if (error != 0B) goto <D.6609>; else goto <D.6610>;
      <D.6609>:
      *error = 0;
      <D.6610>:
      D.6562 = value;
      return D.6562;
    }
  finally
    {
      buf = {CLOBBER};
      end = {CLOBBER};
    }
}


get_user_hz ()
{
  int user_hz.9;
  long int D.6616;
  int user_hz.10;
  int D.6620;
  static int user_hz = 0;

  user_hz.9 = user_hz;
  if (user_hz.9 == 0) goto <D.6614>; else goto <D.6615>;
  <D.6614>:
  D.6616 = sysconf (2);
  user_hz.10 = (int) D.6616;
  user_hz = user_hz.10;
  user_hz.9 = user_hz;
  if (user_hz.9 == 0) goto <D.6618>; else goto <D.6619>;
  <D.6618>:
  user_hz = 100;
  <D.6619>:
  <D.6615>:
  D.6620 = user_hz;
  return D.6620;
}


get_process_stat_time (int pid, int pos, int sum, MonoProcessError * error)
{
  gint64 D.6622;
  long int D.6623;
  int D.6624;
  long int D.6625;
  gint64 val;

  val = get_process_stat_item (pid, pos, sum, error);
  D.6623 = val * 10000000;
  D.6624 = get_user_hz ();
  D.6625 = (long int) D.6624;
  D.6622 = D.6623 / D.6625;
  return D.6622;
}


__attribute__((visibility ("hidden")))
mono_process_get_data (void * pid, MonoProcessData data)
{
  gint64 D.6627;
  MonoProcessError error;

  try
    {
      D.6627 = mono_process_get_data_with_error (pid, data, &error);
      return D.6627;
    }
  finally
    {
      error = {CLOBBER};
    }
}


__attribute__((visibility ("hidden")))
mono_cpu_count ()
{
  long int D.6630;
  int D.6633;
  int count;

  count = 0;
  D.6630 = sysconf (84);
  count = (int) D.6630;
  if (count > 0) goto <D.6631>; else goto <D.6632>;
  <D.6631>:
  D.6633 = count;
  return D.6633;
  <D.6632>:
  D.6633 = 1;
  return D.6633;
}


__attribute__((visibility ("hidden")))
mono_cpu_get_data (int cpu_id, MonoCpuData data, MonoProcessError * error)
{
  gint64 D.6637;
  gint64 value;

  try
    {
      value = 0;
      if (error != 0B) goto <D.6635>; else goto <D.6636>;
      <D.6635>:
      *error = 0;
      <D.6636>:
      switch (data) <default: <D.6638>, case 0: <D.6395>, case 1: <D.6397>, case 2: <D.6398>, case 3: <D.6399>, case 4: <D.6400>, case 5: <D.6401>>
      <D.6395>:
      get_cpu_times (cpu_id, &value, 0B, 0B, 0B, 0B);
      goto <D.6396>;
      <D.6397>:
      get_cpu_times (cpu_id, 0B, &value, 0B, 0B, 0B);
      goto <D.6396>;
      <D.6398>:
      get_cpu_times (cpu_id, 0B, 0B, &value, 0B, 0B);
      goto <D.6396>;
      <D.6399>:
      get_cpu_times (cpu_id, 0B, 0B, 0B, &value, 0B);
      goto <D.6396>;
      <D.6400>:
      get_cpu_times (cpu_id, 0B, 0B, 0B, 0B, &value);
      goto <D.6396>;
      <D.6401>:
      D.6637 = 0;
      return D.6637;
      <D.6638>:
      <D.6396>:
      D.6637 = value;
      return D.6637;
    }
  finally
    {
      value = {CLOBBER};
    }
}


get_cpu_times (int cpu_id, gint64 * user, gint64 * systemt, gint64 * irq, gint64 * sirq, gint64 * idle)
{
  int D.6645;
  long unsigned int D.6649;
  int D.6652;
  int D.6655;
  const short unsigned int * * D.6657;
  const short unsigned int * D.6658;
  char * D.6659;
  char D.6660;
  long unsigned int D.6661;
  long unsigned int D.6662;
  const short unsigned int * D.6663;
  short unsigned int D.6664;
  int D.6665;
  int D.6666;
  char * data.11;
  long unsigned int D.6672;
  int D.6675;
  int D.6678;
  long int D.6680;
  long int D.6681;
  char * data.12;
  char * data.13;
  long unsigned int D.6689;
  long unsigned int D.6690;
  long unsigned int D.6691;
  long unsigned int D.6692;
  long int D.6693;
  long unsigned int D.6696;
  long unsigned int D.6697;
  long int D.6698;
  long unsigned int D.6701;
  long unsigned int D.6702;
  long int D.6703;
  long unsigned int D.6706;
  long unsigned int D.6707;
  long int D.6708;
  long unsigned int D.6711;
  long unsigned int D.6712;
  long int D.6713;
  char buf[256];
  char * s;
  int hz;
  guint64 user_ticks;
  guint64 nice_ticks;
  guint64 system_ticks;
  guint64 idle_ticks;
  guint64 iowait_ticks;
  guint64 irq_ticks;
  guint64 sirq_ticks;
  struct FILE * f;

  try
    {
      hz = get_user_hz ();
      user_ticks = 0;
      nice_ticks = 0;
      system_ticks = 0;
      idle_ticks = 0;
      irq_ticks = 0;
      sirq_ticks = 0;
      f = fopen ("/proc/stat", "r");
      if (f == 0B) goto <D.6641>; else goto <D.6642>;
      <D.6641>:
      return;
      <D.6642>:
      if (cpu_id < 0) goto <D.6643>; else goto <D.6644>;
      <D.6643>:
      D.6645 = mono_cpu_count ();
      hz = D.6645 * hz;
      <D.6644>:
      goto <D.6386>;
      <D.6388>:
      {
        char * data;

        try
          {
            data = 0B;
            if (cpu_id < 0) goto <D.6648>; else goto <D.6646>;
            <D.6648>:
            D.6649 = __strlen_g ("cpu");
            if (D.6649 <= 2) goto <D.6650>; else goto <D.6651>;
            <D.6650>:
            D.6652 = strcmp (s, "cpu");
            if (D.6652 == 0) goto <D.6653>; else goto <D.6646>;
            <D.6653>:
            goto <D.6654>;
            <D.6651>:
            D.6655 = strncmp (s, "cpu", 3);
            if (D.6655 == 0) goto <D.6656>; else goto <D.6646>;
            <D.6656>:
            <D.6654>:
            D.6657 = __ctype_b_loc ();
            D.6658 = *D.6657;
            D.6659 = s + 3;
            D.6660 = *D.6659;
            D.6661 = (long unsigned int) D.6660;
            D.6662 = D.6661 * 2;
            D.6663 = D.6658 + D.6662;
            D.6664 = *D.6663;
            D.6665 = (int) D.6664;
            D.6666 = D.6665 & 32;
            if (D.6666 != 0) goto <D.6667>; else goto <D.6646>;
            <D.6667>:
            data.11 = s + 4;
            data = data.11;
            goto <D.6647>;
            <D.6646>:
            if (cpu_id >= 0) goto <D.6671>; else goto <D.6669>;
            <D.6671>:
            D.6672 = __strlen_g ("cpu");
            if (D.6672 <= 2) goto <D.6673>; else goto <D.6674>;
            <D.6673>:
            D.6675 = strcmp (s, "cpu");
            if (D.6675 == 0) goto <D.6676>; else goto <D.6669>;
            <D.6676>:
            goto <D.6677>;
            <D.6674>:
            D.6678 = strncmp (s, "cpu", 3);
            if (D.6678 == 0) goto <D.6679>; else goto <D.6669>;
            <D.6679>:
            <D.6677>:
            D.6659 = s + 3;
            D.6680 = strtol (D.6659, &data, 10);
            D.6681 = (long int) cpu_id;
            if (D.6680 == D.6681) goto <D.6682>; else goto <D.6669>;
            <D.6682>:
            D.6659 = s + 3;
            data.12 = data;
            if (D.6659 == data.12) goto <D.6684>; else goto <D.6685>;
            <D.6684>:
            // predicted unlikely by continue predictor.
            goto <D.6386>;
            <D.6685>:
            data.12 = data;
            data.13 = data.12 + 1;
            data = data.13;
            goto <D.6670>;
            <D.6669>:
            // predicted unlikely by continue predictor.
            goto <D.6386>;
            <D.6670>:
            <D.6647>:
            data.12 = data;
            user_ticks = strtoull (data.12, &data, 10);
            data.12 = data;
            nice_ticks = strtoull (data.12, &data, 10);
            data.12 = data;
            system_ticks = strtoull (data.12, &data, 10);
            data.12 = data;
            idle_ticks = strtoull (data.12, &data, 10);
            data.12 = data;
            iowait_ticks = strtoull (data.12, &data, 10);
            data.12 = data;
            irq_ticks = strtoull (data.12, &data, 10);
            data.12 = data;
            sirq_ticks = strtoull (data.12, &data, 10);
            goto <D.6387>;
          }
        finally
          {
            data = {CLOBBER};
          }
      }
      <D.6386>:
      s = fgets (&buf, 256, f);
      if (s != 0B) goto <D.6388>; else goto <D.6387>;
      <D.6387>:
      fclose (f);
      if (user != 0B) goto <D.6687>; else goto <D.6688>;
      <D.6687>:
      D.6689 = user_ticks + nice_ticks;
      D.6690 = D.6689 * 10000000;
      D.6691 = (long unsigned int) hz;
      D.6692 = D.6690 / D.6691;
      D.6693 = (long int) D.6692;
      *user = D.6693;
      <D.6688>:
      if (systemt != 0B) goto <D.6694>; else goto <D.6695>;
      <D.6694>:
      D.6696 = system_ticks * 10000000;
      D.6691 = (long unsigned int) hz;
      D.6697 = D.6696 / D.6691;
      D.6698 = (long int) D.6697;
      *systemt = D.6698;
      <D.6695>:
      if (irq != 0B) goto <D.6699>; else goto <D.6700>;
      <D.6699>:
      D.6701 = irq_ticks * 10000000;
      D.6691 = (long unsigned int) hz;
      D.6702 = D.6701 / D.6691;
      D.6703 = (long int) D.6702;
      *irq = D.6703;
      <D.6700>:
      if (sirq != 0B) goto <D.6704>; else goto <D.6705>;
      <D.6704>:
      D.6706 = sirq_ticks * 10000000;
      D.6691 = (long unsigned int) hz;
      D.6707 = D.6706 / D.6691;
      D.6708 = (long int) D.6707;
      *sirq = D.6708;
      <D.6705>:
      if (idle != 0B) goto <D.6709>; else goto <D.6710>;
      <D.6709>:
      D.6711 = idle_ticks * 10000000;
      D.6691 = (long unsigned int) hz;
      D.6712 = D.6711 / D.6691;
      D.6713 = (long int) D.6712;
      *idle = D.6713;
      <D.6710>:
    }
  finally
    {
      buf = {CLOBBER};
    }
}


__attribute__((__gnu_inline__, nothrow, leaf, pure))
strcmp (const char * __s1, const char * __s2)
{
  int iftmp.14;
  int iftmp.15;
  int D.6727;
  char * __p1;
  char * __p2;
  int __ret;

  __p1 = __s1;
  __p2 = __s2;
  __asm__ __volatile__("   slr   0,0
0: clst  %1,%2
   jo    0b
   ipm   %0
   srl   %0,28" : "=d" __ret, "=&a" __p1, "=&a" __p2 : "1" __p1, "2" __p2 : "0", "memory", "cc");
  if (__ret != 0) goto <D.6720>; else goto <D.6721>;
  <D.6720>:
  if (__ret == 1) goto <D.6723>; else goto <D.6724>;
  <D.6723>:
  iftmp.15 = -1;
  goto <D.6725>;
  <D.6724>:
  iftmp.15 = 1;
  <D.6725>:
  iftmp.14 = iftmp.15;
  goto <D.6726>;
  <D.6721>:
  iftmp.14 = 0;
  <D.6726>:
  __ret = iftmp.14;
  D.6727 = __ret;
  return D.6727;
}


