utils_init (int fast_time)
{
  long long unsigned int D.9076;
  long long unsigned int time_inc.0;
  uint64_t (*<Tfef>) (void) time_func.1;
  long long unsigned int D.9083;
  long long unsigned int D.9084;
  int timer_overhead.2;
  int i;
  uint64_t time_start;
  uint64_t time_end;

  if (fast_time > 1) goto <D.9071>; else goto <D.9072>;
  <D.9071>:
  time_func = null_time;
  goto <D.9073>;
  <D.9072>:
  if (fast_time != 0) goto <D.9074>; else goto <D.9075>;
  <D.9074>:
  {
    uint64_t timea;
    uint64_t timeb;

    clock_time ();
    timea = clock_time ();
    timeb = clock_time ();
    D.9076 = timeb - timea;
    time_inc.0 = D.9076 / 8;
    time_inc = time_inc.0;
    if (0 != 0) goto <D.9078>; else goto <D.9079>;
    <D.9078>:
    time_func = fast_current_time;
    goto <D.9080>;
    <D.9079>:
    time_func = fast_current_time;
    <D.9080>:
  }
  goto <D.9081>;
  <D.9075>:
  time_func = clock_time;
  <D.9081>:
  <D.9073>:
  time_func.1 = time_func;
  time_start = time_func.1 ();
  i = 0;
  goto <D.5099>;
  <D.5098>:
  time_func.1 = time_func;
  time_func.1 ();
  i = i + 1;
  <D.5099>:
  if (i <= 255) goto <D.5098>; else goto <D.5100>;
  <D.5100>:
  time_func.1 = time_func;
  time_end = time_func.1 ();
  D.9083 = time_end - time_start;
  D.9084 = D.9083 / 256;
  timer_overhead.2 = (int) D.9084;
  timer_overhead = timer_overhead.2;
}


fast_current_time ()
{
  unsigned int D.9090;
  unsigned int D.9091;
  unsigned int D.9092;
  unsigned int D.9093;
  long long unsigned int D.9096;
  long long unsigned int time_inc.3;
  long long unsigned int D.9098;
  uint64_t D.9099;
  long long unsigned int D.9100;
  struct TlsData * tls;

  tls = &tls_data;
  D.9090 = tls->timer_count;
  D.9091 = D.9090;
  D.9092 = D.9091 + 1;
  tls->timer_count = D.9092;
  D.9093 = D.9091 & 7;
  if (D.9093 != 0) goto <D.9094>; else goto <D.9095>;
  <D.9094>:
  D.9096 = tls->last_time;
  time_inc.3 = time_inc;
  D.9098 = D.9096 + time_inc.3;
  tls->last_time = D.9098;
  D.9099 = tls->last_time;
  return D.9099;
  <D.9095>:
  D.9100 = clock_time ();
  tls->last_time = D.9100;
  D.9099 = tls->last_time;
  return D.9099;
}


null_time ()
{
  uint64_t D.9103;
  long long unsigned int timer.4;
  long long unsigned int timer.5;
  long long unsigned int timer.6;
  static uint64_t timer = 0;

  timer.4 = timer;
  timer.5 = timer.4;
  timer.6 = timer.5 + 1;
  timer = timer.6;
  D.9103 = timer.5;
  return D.9103;
}


clock_time ()
{
  uint64_t D.9108;
  long int D.9109;
  long long unsigned int D.9110;
  long long unsigned int D.9111;
  long int D.9112;
  long long unsigned int D.9113;
  struct timespec tspec;

  try
    {
      clock_gettime (1, &tspec);
      D.9109 = tspec.tv_sec;
      D.9110 = (long long unsigned int) D.9109;
      D.9111 = D.9110 * 1000000000;
      D.9112 = tspec.tv_nsec;
      D.9113 = (long long unsigned int) D.9112;
      D.9108 = D.9111 + D.9113;
      return D.9108;
    }
  finally
    {
      tspec = {CLOBBER};
    }
}


get_timer_overhead ()
{
  int D.9116;

  D.9116 = timer_overhead;
  return D.9116;
}


current_time ()
{
  uint64_t D.9118;
  uint64_t (*<Tfef>) (void) time_func.7;

  time_func.7 = time_func;
  D.9118 = time_func.7 ();
  return D.9118;
}


alloc_buffer (int size)
{
  unsigned int size.8;
  void * D.9125;
  void * ptr;

  size.8 = (unsigned int) size;
  ptr = mmap (0B, size.8, 3, 2050, -1, 0);
  if (ptr == 4294967295B) goto <D.9123>; else goto <D.9124>;
  <D.9123>:
  D.9125 = 0B;
  return D.9125;
  <D.9124>:
  D.9125 = ptr;
  return D.9125;
}


free_buffer (void * buf, int size)
{
  unsigned int size.9;

  size.9 = (unsigned int) size;
  munmap (buf, size.9);
}


take_lock ()
{
  pthread_mutex_lock (&log_lock);
}


release_lock ()
{
  pthread_mutex_unlock (&log_lock);
}


encode_uleb128 (uint64_t value, uint8_t * buf, uint8_t * * endbuf)
{
  unsigned char D.9128;
  uint8_t * p.10;
  uint8_t * p;

  p = buf;
  <D.5128>:
  {
    uint8_t b;

    D.9128 = (unsigned char) value;
    b = D.9128 & 127;
    value = value >> 7;
    if (value != 0) goto <D.9129>; else goto <D.9130>;
    <D.9129>:
    b = b | 128;
    <D.9130>:
    p.10 = p;
    p = p.10 + 1;
    *p.10 = b;
  }
  if (value != 0) goto <D.5128>; else goto <D.5129>;
  <D.5129>:
  *endbuf = p;
}


encode_sleb128 (intptr_t value, uint8_t * buf, uint8_t * * endbuf)
{
  _Bool D.9132;
  unsigned char D.9133;
  unsigned int D.9136;
  int D.9137;
  int D.9138;
  int D.9139;
  int D.9145;
  int D.9146;
  uint8_t * p.11;
  int more;
  int negative;
  unsigned int size;
  uint8_t byte;
  uint8_t * p;

  more = 1;
  D.9132 = value < 0;
  negative = (int) D.9132;
  size = 32;
  p = buf;
  goto <D.5141>;
  <D.5140>:
  D.9133 = (unsigned char) value;
  byte = D.9133 & 127;
  value = value >> 7;
  if (negative != 0) goto <D.9134>; else goto <D.9135>;
  <D.9134>:
  D.9136 = size + 4294967289;
  D.9137 = (int) D.9136;
  D.9138 = 1 << D.9137;
  D.9139 = -D.9138;
  value = D.9139 | value;
  <D.9135>:
  if (value == 0) goto <D.9144>; else goto <D.9140>;
  <D.9144>:
  D.9145 = (int) byte;
  D.9146 = D.9145 & 64;
  if (D.9146 == 0) goto <D.9141>; else goto <D.9140>;
  <D.9140>:
  if (value == -1) goto <D.9147>; else goto <D.9142>;
  <D.9147>:
  D.9145 = (int) byte;
  D.9146 = D.9145 & 64;
  if (D.9146 != 0) goto <D.9141>; else goto <D.9142>;
  <D.9141>:
  more = 0;
  goto <D.9143>;
  <D.9142>:
  byte = byte | 128;
  <D.9143>:
  p.11 = p;
  p = p.11 + 1;
  *p.11 = byte;
  <D.5141>:
  if (more != 0) goto <D.5140>; else goto <D.5142>;
  <D.5142>:
  *endbuf = p;
}


decode_uleb128 (uint8_t * buf, uint8_t * * endbuf)
{
  uint8_t * buf.12;
  long long unsigned int D.9150;
  long long unsigned int D.9151;
  long long unsigned int D.9152;
  signed char b.13;
  uint64_t D.9155;
  uint64_t res;
  int shift;

  res = 0;
  shift = 0;
  <D.5151>:
  {
    uint8_t b;

    buf.12 = buf;
    buf = buf.12 + 1;
    b = *buf.12;
    D.9150 = (long long unsigned int) b;
    D.9151 = D.9150 & 127;
    D.9152 = D.9151 << shift;
    res = D.9152 | res;
    b.13 = (signed char) b;
    if (b.13 >= 0) goto <D.5150>; else goto <D.9154>;
    <D.9154>:
    shift = shift + 7;
  }
  goto <D.5151>;
  <D.5150>:
  *endbuf = buf;
  D.9155 = res;
  return D.9155;
}


decode_sleb128 (uint8_t * buf, uint8_t * * endbuf)
{
  int D.9157;
  int D.9158;
  int D.9159;
  signed char b.14;
  unsigned int shift.15;
  int D.9166;
  int D.9169;
  int D.9170;
  intptr_t D.9171;
  uint8_t * p;
  intptr_t res;
  int shift;

  p = buf;
  res = 0;
  shift = 0;
  <D.5161>:
  {
    uint8_t b;

    b = *p;
    p = p + 1;
    D.9157 = (int) b;
    D.9158 = D.9157 & 127;
    D.9159 = D.9158 << shift;
    res = D.9159 | res;
    shift = shift + 7;
    b.14 = (signed char) b;
    if (b.14 >= 0) goto <D.9161>; else goto <D.9162>;
    <D.9161>:
    shift.15 = (unsigned int) shift;
    if (shift.15 <= 31) goto <D.9164>; else goto <D.9165>;
    <D.9164>:
    D.9157 = (int) b;
    D.9166 = D.9157 & 64;
    if (D.9166 != 0) goto <D.9167>; else goto <D.9168>;
    <D.9167>:
    D.9169 = 1 << shift;
    D.9170 = -D.9169;
    res = D.9170 | res;
    <D.9168>:
    <D.9165>:
    goto <D.5160>;
    <D.9162>:
  }
  goto <D.5161>;
  <D.5160>:
  *endbuf = p;
  D.9171 = res;
  return D.9171;
}


thread_id ()
{
  uintptr_t D.9173;

  D.9173 = pthread_self ();
  return D.9173;
}


process_id ()
{
  uintptr_t D.9175;
  int D.9176;

  D.9176 = getpid ();
  D.9175 = (uintptr_t) D.9176;
  return D.9175;
}


main (int argc, char * * argv)
{
  struct _IO_FILE * stdout.16;
  int D.8891;
  int iftmp.17;
  int D.8887;
  unsigned int i.18;
  unsigned int D.9183;
  char * * D.9184;
  const char[8] * D.9185;
  unsigned char D.9186;
  int D.9187;
  unsigned char D.9188;
  int D.9189;
  const unsigned char * D.9194;
  unsigned char D.9195;
  int D.9196;
  const unsigned char * D.9197;
  unsigned char D.9198;
  int D.9199;
  const unsigned char * D.9204;
  unsigned char D.9205;
  int D.9206;
  const unsigned char * D.9207;
  unsigned char D.9208;
  int D.9209;
  const unsigned char * D.9214;
  unsigned char D.9215;
  int D.9216;
  const unsigned char * D.9217;
  unsigned char D.9218;
  int D.9219;
  char * D.9221;
  int debug.19;
  int debug.20;
  int D.8900;
  int iftmp.21;
  int D.8896;
  const char[7] * D.9230;
  unsigned char D.9231;
  int D.9232;
  unsigned char D.9233;
  int D.9234;
  const unsigned char * D.9239;
  unsigned char D.9240;
  int D.9241;
  const unsigned char * D.9242;
  unsigned char D.9243;
  int D.9244;
  const unsigned char * D.9249;
  unsigned char D.9250;
  int D.9251;
  const unsigned char * D.9252;
  unsigned char D.9253;
  int D.9254;
  const unsigned char * D.9259;
  unsigned char D.9260;
  int D.9261;
  const unsigned char * D.9262;
  unsigned char D.9263;
  int D.9264;
  int D.9268;
  int D.9269;
  int D.8919;
  int iftmp.22;
  int D.8918;
  const char[6] * D.9275;
  unsigned char D.9276;
  int D.9277;
  unsigned char D.9278;
  int D.9279;
  const unsigned char * D.9284;
  unsigned char D.9285;
  int D.9286;
  const unsigned char * D.9287;
  unsigned char D.9288;
  int D.9289;
  const unsigned char * D.9294;
  unsigned char D.9295;
  int D.9296;
  const unsigned char * D.9297;
  unsigned char D.9298;
  int D.9299;
  const unsigned char * D.9304;
  unsigned char D.9305;
  int D.9306;
  const unsigned char * D.9307;
  unsigned char D.9308;
  int D.9309;
  int D.8928;
  int iftmp.23;
  int D.8927;
  const char[6] * D.9317;
  unsigned char D.9318;
  int D.9319;
  unsigned char D.9320;
  int D.9321;
  const unsigned char * D.9326;
  unsigned char D.9327;
  int D.9328;
  const unsigned char * D.9329;
  unsigned char D.9330;
  int D.9331;
  const unsigned char * D.9336;
  unsigned char D.9337;
  int D.9338;
  const unsigned char * D.9339;
  unsigned char D.9340;
  int D.9341;
  const unsigned char * D.9346;
  unsigned char D.9347;
  int D.9348;
  const unsigned char * D.9349;
  unsigned char D.9350;
  int D.9351;
  int D.9357;
  int D.8947;
  int iftmp.24;
  int D.8946;
  const char[6] * D.9363;
  unsigned char D.9364;
  int D.9365;
  unsigned char D.9366;
  int D.9367;
  const unsigned char * D.9372;
  unsigned char D.9373;
  int D.9374;
  const unsigned char * D.9375;
  unsigned char D.9376;
  int D.9377;
  const unsigned char * D.9382;
  unsigned char D.9383;
  int D.9384;
  const unsigned char * D.9385;
  unsigned char D.9386;
  int D.9387;
  const unsigned char * D.9392;
  unsigned char D.9393;
  int D.9394;
  const unsigned char * D.9395;
  unsigned char D.9396;
  int D.9397;
  int D.8956;
  int iftmp.25;
  int D.8955;
  const char[5] * D.9405;
  unsigned char D.9406;
  int D.9407;
  unsigned char D.9408;
  int D.9409;
  const unsigned char * D.9414;
  unsigned char D.9415;
  int D.9416;
  const unsigned char * D.9417;
  unsigned char D.9418;
  int D.9419;
  const unsigned char * D.9424;
  unsigned char D.9425;
  int D.9426;
  const unsigned char * D.9427;
  unsigned char D.9428;
  int D.9429;
  const unsigned char * D.9434;
  unsigned char D.9435;
  int D.9436;
  const unsigned char * D.9437;
  unsigned char D.9438;
  int D.9439;
  int D.8965;
  int iftmp.26;
  int D.8964;
  const char[6] * D.9447;
  unsigned char D.9448;
  int D.9449;
  unsigned char D.9450;
  int D.9451;
  const unsigned char * D.9456;
  unsigned char D.9457;
  int D.9458;
  const unsigned char * D.9459;
  unsigned char D.9460;
  int D.9461;
  const unsigned char * D.9466;
  unsigned char D.9467;
  int D.9468;
  const unsigned char * D.9469;
  unsigned char D.9470;
  int D.9471;
  const unsigned char * D.9476;
  unsigned char D.9477;
  int D.9478;
  const unsigned char * D.9479;
  unsigned char D.9480;
  int D.9481;
  int D.9487;
  int D.9490;
  int D.9494;
  struct FILE * outfile.27;
  struct FILE * outfile.28;
  int D.9502;
  long unsigned int D.9505;
  int trace_max.29;
  int D.9508;
  int D.9511;
  int D.9515;
  char D.9518;
  int D.9522;
  long unsigned int thread_filter.30;
  int D.9527;
  const char * D.9530;
  char * top.31;
  double D.9536;
  long long unsigned int time_from.32;
  double D.9538;
  long long unsigned int time_to.33;
  int D.9054;
  int iftmp.34;
  int D.9050;
  const char[10] * D.9544;
  unsigned char D.9545;
  int D.9546;
  unsigned char D.9547;
  int D.9548;
  const unsigned char * D.9553;
  unsigned char D.9554;
  int D.9555;
  const unsigned char * D.9556;
  unsigned char D.9557;
  int D.9558;
  const unsigned char * D.9563;
  unsigned char D.9564;
  int D.9565;
  const unsigned char * D.9566;
  unsigned char D.9567;
  int D.9568;
  const unsigned char * D.9573;
  unsigned char D.9574;
  int D.9575;
  const unsigned char * D.9576;
  unsigned char D.9577;
  int D.9578;
  int verbose.35;
  int verbose.36;
  int D.9063;
  int iftmp.37;
  int D.9059;
  const char[9] * D.9588;
  unsigned char D.9589;
  int D.9590;
  unsigned char D.9591;
  int D.9592;
  const unsigned char * D.9597;
  unsigned char D.9598;
  int D.9599;
  const unsigned char * D.9600;
  unsigned char D.9601;
  int D.9602;
  const unsigned char * D.9607;
  unsigned char D.9608;
  int D.9609;
  const unsigned char * D.9610;
  unsigned char D.9611;
  int D.9612;
  const unsigned char * D.9617;
  unsigned char D.9618;
  int D.9619;
  const unsigned char * D.9620;
  unsigned char D.9621;
  int D.9622;
  int D.9629;
  int num_tracked_objects.38;
  const char * reports.39;
  struct ProfContext * ctx;
  int i;

  stdout.16 = stdout;
  outfile = stdout.16;
  i = 1;
  goto <D.9066>;
  <D.9065>:
  {
    size_t __s1_len;
    size_t __s2_len;

    __s1_len = 7;
    if (__s1_len <= 3) goto <D.9180>; else goto <D.9181>;
    <D.9180>:
    {
      const unsigned char * __s2;
      int __result;

      i.18 = (unsigned int) i;
      D.9183 = i.18 * 4;
      D.9184 = argv + D.9183;
      __s2 = *D.9184;
      D.9185 = "--debug";
      D.9186 = MEM[(const unsigned char *)D.9185];
      D.9187 = (int) D.9186;
      D.9188 = *__s2;
      D.9189 = (int) D.9188;
      __result = D.9187 - D.9189;
      {
        if (__s1_len != 0) goto <D.9190>; else goto <D.9191>;
        <D.9190>:
        if (__result == 0) goto <D.9192>; else goto <D.9193>;
        <D.9192>:
        D.9194 = &MEM[(void *)"--debug" + 1B];
        D.9195 = *D.9194;
        D.9196 = (int) D.9195;
        D.9197 = __s2 + 1;
        D.9198 = *D.9197;
        D.9199 = (int) D.9198;
        __result = D.9196 - D.9199;
        if (__s1_len > 1) goto <D.9200>; else goto <D.9201>;
        <D.9200>:
        if (__result == 0) goto <D.9202>; else goto <D.9203>;
        <D.9202>:
        D.9204 = &MEM[(void *)"--debug" + 2B];
        D.9205 = *D.9204;
        D.9206 = (int) D.9205;
        D.9207 = __s2 + 2;
        D.9208 = *D.9207;
        D.9209 = (int) D.9208;
        __result = D.9206 - D.9209;
        if (__s1_len > 2) goto <D.9210>; else goto <D.9211>;
        <D.9210>:
        if (__result == 0) goto <D.9212>; else goto <D.9213>;
        <D.9212>:
        D.9214 = &MEM[(void *)"--debug" + 3B];
        D.9215 = *D.9214;
        D.9216 = (int) D.9215;
        D.9217 = __s2 + 3;
        D.9218 = *D.9217;
        D.9219 = (int) D.9218;
        __result = D.9216 - D.9219;
        <D.9213>:
        <D.9211>:
        <D.9203>:
        <D.9201>:
        <D.9193>:
        <D.9191>:
      }
      D.8887 = __result;
    }
    iftmp.17 = D.8887;
    goto <D.9220>;
    <D.9181>:
    i.18 = (unsigned int) i;
    D.9183 = i.18 * 4;
    D.9184 = argv + D.9183;
    D.9221 = *D.9184;
    iftmp.17 = __builtin_strcmp ("--debug", D.9221);
    <D.9220>:
    D.8891 = iftmp.17;
  }
  if (D.8891 == 0) goto <D.9222>; else goto <D.9223>;
  <D.9222>:
  debug.19 = debug;
  debug.20 = debug.19 + 1;
  debug = debug.20;
  goto <D.9226>;
  <D.9223>:
  {
    size_t __s1_len;
    size_t __s2_len;

    __s1_len = 6;
    if (__s1_len <= 3) goto <D.9228>; else goto <D.9229>;
    <D.9228>:
    {
      const unsigned char * __s2;
      int __result;

      i.18 = (unsigned int) i;
      D.9183 = i.18 * 4;
      D.9184 = argv + D.9183;
      __s2 = *D.9184;
      D.9230 = "--help";
      D.9231 = MEM[(const unsigned char *)D.9230];
      D.9232 = (int) D.9231;
      D.9233 = *__s2;
      D.9234 = (int) D.9233;
      __result = D.9232 - D.9234;
      {
        if (__s1_len != 0) goto <D.9235>; else goto <D.9236>;
        <D.9235>:
        if (__result == 0) goto <D.9237>; else goto <D.9238>;
        <D.9237>:
        D.9239 = &MEM[(void *)"--help" + 1B];
        D.9240 = *D.9239;
        D.9241 = (int) D.9240;
        D.9242 = __s2 + 1;
        D.9243 = *D.9242;
        D.9244 = (int) D.9243;
        __result = D.9241 - D.9244;
        if (__s1_len > 1) goto <D.9245>; else goto <D.9246>;
        <D.9245>:
        if (__result == 0) goto <D.9247>; else goto <D.9248>;
        <D.9247>:
        D.9249 = &MEM[(void *)"--help" + 2B];
        D.9250 = *D.9249;
        D.9251 = (int) D.9250;
        D.9252 = __s2 + 2;
        D.9253 = *D.9252;
        D.9254 = (int) D.9253;
        __result = D.9251 - D.9254;
        if (__s1_len > 2) goto <D.9255>; else goto <D.9256>;
        <D.9255>:
        if (__result == 0) goto <D.9257>; else goto <D.9258>;
        <D.9257>:
        D.9259 = &MEM[(void *)"--help" + 3B];
        D.9260 = *D.9259;
        D.9261 = (int) D.9260;
        D.9262 = __s2 + 3;
        D.9263 = *D.9262;
        D.9264 = (int) D.9263;
        __result = D.9261 - D.9264;
        <D.9258>:
        <D.9256>:
        <D.9248>:
        <D.9246>:
        <D.9238>:
        <D.9236>:
      }
      D.8896 = __result;
    }
    iftmp.21 = D.8896;
    goto <D.9265>;
    <D.9229>:
    i.18 = (unsigned int) i;
    D.9183 = i.18 * 4;
    D.9184 = argv + D.9183;
    D.9221 = *D.9184;
    iftmp.21 = __builtin_strcmp ("--help", D.9221);
    <D.9265>:
    D.8900 = iftmp.21;
  }
  if (D.8900 == 0) goto <D.9266>; else goto <D.9267>;
  <D.9266>:
  usage ();
  D.9268 = 0;
  return D.9268;
  <D.9267>:
  i.18 = (unsigned int) i;
  D.9183 = i.18 * 4;
  D.9184 = argv + D.9183;
  D.9221 = *D.9184;
  D.9269 = strncmp ("--alloc-sort=", D.9221, 13);
  if (D.9269 == 0) goto <D.9270>; else goto <D.9271>;
  <D.9270>:
  {
    const char * val;

    i.18 = (unsigned int) i;
    D.9183 = i.18 * 4;
    D.9184 = argv + D.9183;
    D.9221 = *D.9184;
    val = D.9221 + 13;
    {
      size_t __s1_len;
      size_t __s2_len;

      __s2_len = 5;
      if (__s2_len <= 3) goto <D.9273>; else goto <D.9274>;
      <D.9273>:
      {
        const unsigned char * __s2;
        int __result;

        __s2 = val;
        D.9275 = "bytes";
        D.9276 = MEM[(const unsigned char *)D.9275];
        D.9277 = (int) D.9276;
        D.9278 = *__s2;
        D.9279 = (int) D.9278;
        __result = D.9277 - D.9279;
        {
          if (__s2_len != 0) goto <D.9280>; else goto <D.9281>;
          <D.9280>:
          if (__result == 0) goto <D.9282>; else goto <D.9283>;
          <D.9282>:
          D.9284 = &MEM[(void *)"bytes" + 1B];
          D.9285 = *D.9284;
          D.9286 = (int) D.9285;
          D.9287 = __s2 + 1;
          D.9288 = *D.9287;
          D.9289 = (int) D.9288;
          __result = D.9286 - D.9289;
          if (__s2_len > 1) goto <D.9290>; else goto <D.9291>;
          <D.9290>:
          if (__result == 0) goto <D.9292>; else goto <D.9293>;
          <D.9292>:
          D.9294 = &MEM[(void *)"bytes" + 2B];
          D.9295 = *D.9294;
          D.9296 = (int) D.9295;
          D.9297 = __s2 + 2;
          D.9298 = *D.9297;
          D.9299 = (int) D.9298;
          __result = D.9296 - D.9299;
          if (__s2_len > 2) goto <D.9300>; else goto <D.9301>;
          <D.9300>:
          if (__result == 0) goto <D.9302>; else goto <D.9303>;
          <D.9302>:
          D.9304 = &MEM[(void *)"bytes" + 3B];
          D.9305 = *D.9304;
          D.9306 = (int) D.9305;
          D.9307 = __s2 + 3;
          D.9308 = *D.9307;
          D.9309 = (int) D.9308;
          __result = D.9306 - D.9309;
          <D.9303>:
          <D.9301>:
          <D.9293>:
          <D.9291>:
          <D.9283>:
          <D.9281>:
        }
        D.8918 = __result;
      }
      iftmp.22 = -D.8918;
      goto <D.9310>;
      <D.9274>:
      iftmp.22 = __builtin_strcmp (val, "bytes");
      <D.9310>:
      D.8919 = iftmp.22;
    }
    if (D.8919 == 0) goto <D.9311>; else goto <D.9312>;
    <D.9311>:
    alloc_sort_mode = 0;
    goto <D.9313>;
    <D.9312>:
    {
      size_t __s1_len;
      size_t __s2_len;

      __s2_len = 5;
      if (__s2_len <= 3) goto <D.9315>; else goto <D.9316>;
      <D.9315>:
      {
        const unsigned char * __s2;
        int __result;

        __s2 = val;
        D.9317 = "count";
        D.9318 = MEM[(const unsigned char *)D.9317];
        D.9319 = (int) D.9318;
        D.9320 = *__s2;
        D.9321 = (int) D.9320;
        __result = D.9319 - D.9321;
        {
          if (__s2_len != 0) goto <D.9322>; else goto <D.9323>;
          <D.9322>:
          if (__result == 0) goto <D.9324>; else goto <D.9325>;
          <D.9324>:
          D.9326 = &MEM[(void *)"count" + 1B];
          D.9327 = *D.9326;
          D.9328 = (int) D.9327;
          D.9329 = __s2 + 1;
          D.9330 = *D.9329;
          D.9331 = (int) D.9330;
          __result = D.9328 - D.9331;
          if (__s2_len > 1) goto <D.9332>; else goto <D.9333>;
          <D.9332>:
          if (__result == 0) goto <D.9334>; else goto <D.9335>;
          <D.9334>:
          D.9336 = &MEM[(void *)"count" + 2B];
          D.9337 = *D.9336;
          D.9338 = (int) D.9337;
          D.9339 = __s2 + 2;
          D.9340 = *D.9339;
          D.9341 = (int) D.9340;
          __result = D.9338 - D.9341;
          if (__s2_len > 2) goto <D.9342>; else goto <D.9343>;
          <D.9342>:
          if (__result == 0) goto <D.9344>; else goto <D.9345>;
          <D.9344>:
          D.9346 = &MEM[(void *)"count" + 3B];
          D.9347 = *D.9346;
          D.9348 = (int) D.9347;
          D.9349 = __s2 + 3;
          D.9350 = *D.9349;
          D.9351 = (int) D.9350;
          __result = D.9348 - D.9351;
          <D.9345>:
          <D.9343>:
          <D.9335>:
          <D.9333>:
          <D.9325>:
          <D.9323>:
        }
        D.8927 = __result;
      }
      iftmp.23 = -D.8927;
      goto <D.9352>;
      <D.9316>:
      iftmp.23 = __builtin_strcmp (val, "count");
      <D.9352>:
      D.8928 = iftmp.23;
    }
    if (D.8928 == 0) goto <D.9353>; else goto <D.9354>;
    <D.9353>:
    alloc_sort_mode = 1;
    goto <D.9355>;
    <D.9354>:
    usage ();
    D.9268 = 1;
    return D.9268;
    <D.9355>:
    <D.9313>:
  }
  goto <D.9356>;
  <D.9271>:
  i.18 = (unsigned int) i;
  D.9183 = i.18 * 4;
  D.9184 = argv + D.9183;
  D.9221 = *D.9184;
  D.9357 = strncmp ("--method-sort=", D.9221, 14);
  if (D.9357 == 0) goto <D.9358>; else goto <D.9359>;
  <D.9358>:
  {
    const char * val;

    i.18 = (unsigned int) i;
    D.9183 = i.18 * 4;
    D.9184 = argv + D.9183;
    D.9221 = *D.9184;
    val = D.9221 + 14;
    {
      size_t __s1_len;
      size_t __s2_len;

      __s2_len = 5;
      if (__s2_len <= 3) goto <D.9361>; else goto <D.9362>;
      <D.9361>:
      {
        const unsigned char * __s2;
        int __result;

        __s2 = val;
        D.9363 = "total";
        D.9364 = MEM[(const unsigned char *)D.9363];
        D.9365 = (int) D.9364;
        D.9366 = *__s2;
        D.9367 = (int) D.9366;
        __result = D.9365 - D.9367;
        {
          if (__s2_len != 0) goto <D.9368>; else goto <D.9369>;
          <D.9368>:
          if (__result == 0) goto <D.9370>; else goto <D.9371>;
          <D.9370>:
          D.9372 = &MEM[(void *)"total" + 1B];
          D.9373 = *D.9372;
          D.9374 = (int) D.9373;
          D.9375 = __s2 + 1;
          D.9376 = *D.9375;
          D.9377 = (int) D.9376;
          __result = D.9374 - D.9377;
          if (__s2_len > 1) goto <D.9378>; else goto <D.9379>;
          <D.9378>:
          if (__result == 0) goto <D.9380>; else goto <D.9381>;
          <D.9380>:
          D.9382 = &MEM[(void *)"total" + 2B];
          D.9383 = *D.9382;
          D.9384 = (int) D.9383;
          D.9385 = __s2 + 2;
          D.9386 = *D.9385;
          D.9387 = (int) D.9386;
          __result = D.9384 - D.9387;
          if (__s2_len > 2) goto <D.9388>; else goto <D.9389>;
          <D.9388>:
          if (__result == 0) goto <D.9390>; else goto <D.9391>;
          <D.9390>:
          D.9392 = &MEM[(void *)"total" + 3B];
          D.9393 = *D.9392;
          D.9394 = (int) D.9393;
          D.9395 = __s2 + 3;
          D.9396 = *D.9395;
          D.9397 = (int) D.9396;
          __result = D.9394 - D.9397;
          <D.9391>:
          <D.9389>:
          <D.9381>:
          <D.9379>:
          <D.9371>:
          <D.9369>:
        }
        D.8946 = __result;
      }
      iftmp.24 = -D.8946;
      goto <D.9398>;
      <D.9362>:
      iftmp.24 = __builtin_strcmp (val, "total");
      <D.9398>:
      D.8947 = iftmp.24;
    }
    if (D.8947 == 0) goto <D.9399>; else goto <D.9400>;
    <D.9399>:
    method_sort_mode = 0;
    goto <D.9401>;
    <D.9400>:
    {
      size_t __s1_len;
      size_t __s2_len;

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

        __s2 = val;
        D.9405 = "self";
        D.9406 = MEM[(const unsigned char *)D.9405];
        D.9407 = (int) D.9406;
        D.9408 = *__s2;
        D.9409 = (int) D.9408;
        __result = D.9407 - D.9409;
        {
          if (__s2_len != 0) goto <D.9410>; else goto <D.9411>;
          <D.9410>:
          if (__result == 0) goto <D.9412>; else goto <D.9413>;
          <D.9412>:
          D.9414 = &MEM[(void *)"self" + 1B];
          D.9415 = *D.9414;
          D.9416 = (int) D.9415;
          D.9417 = __s2 + 1;
          D.9418 = *D.9417;
          D.9419 = (int) D.9418;
          __result = D.9416 - D.9419;
          if (__s2_len > 1) goto <D.9420>; else goto <D.9421>;
          <D.9420>:
          if (__result == 0) goto <D.9422>; else goto <D.9423>;
          <D.9422>:
          D.9424 = &MEM[(void *)"self" + 2B];
          D.9425 = *D.9424;
          D.9426 = (int) D.9425;
          D.9427 = __s2 + 2;
          D.9428 = *D.9427;
          D.9429 = (int) D.9428;
          __result = D.9426 - D.9429;
          if (__s2_len > 2) goto <D.9430>; else goto <D.9431>;
          <D.9430>:
          if (__result == 0) goto <D.9432>; else goto <D.9433>;
          <D.9432>:
          D.9434 = &MEM[(void *)"self" + 3B];
          D.9435 = *D.9434;
          D.9436 = (int) D.9435;
          D.9437 = __s2 + 3;
          D.9438 = *D.9437;
          D.9439 = (int) D.9438;
          __result = D.9436 - D.9439;
          <D.9433>:
          <D.9431>:
          <D.9423>:
          <D.9421>:
          <D.9413>:
          <D.9411>:
        }
        D.8955 = __result;
      }
      iftmp.25 = -D.8955;
      goto <D.9440>;
      <D.9404>:
      iftmp.25 = __builtin_strcmp (val, "self");
      <D.9440>:
      D.8956 = iftmp.25;
    }
    if (D.8956 == 0) goto <D.9441>; else goto <D.9442>;
    <D.9441>:
    method_sort_mode = 1;
    goto <D.9443>;
    <D.9442>:
    {
      size_t __s1_len;
      size_t __s2_len;

      __s2_len = 5;
      if (__s2_len <= 3) goto <D.9445>; else goto <D.9446>;
      <D.9445>:
      {
        const unsigned char * __s2;
        int __result;

        __s2 = val;
        D.9447 = "calls";
        D.9448 = MEM[(const unsigned char *)D.9447];
        D.9449 = (int) D.9448;
        D.9450 = *__s2;
        D.9451 = (int) D.9450;
        __result = D.9449 - D.9451;
        {
          if (__s2_len != 0) goto <D.9452>; else goto <D.9453>;
          <D.9452>:
          if (__result == 0) goto <D.9454>; else goto <D.9455>;
          <D.9454>:
          D.9456 = &MEM[(void *)"calls" + 1B];
          D.9457 = *D.9456;
          D.9458 = (int) D.9457;
          D.9459 = __s2 + 1;
          D.9460 = *D.9459;
          D.9461 = (int) D.9460;
          __result = D.9458 - D.9461;
          if (__s2_len > 1) goto <D.9462>; else goto <D.9463>;
          <D.9462>:
          if (__result == 0) goto <D.9464>; else goto <D.9465>;
          <D.9464>:
          D.9466 = &MEM[(void *)"calls" + 2B];
          D.9467 = *D.9466;
          D.9468 = (int) D.9467;
          D.9469 = __s2 + 2;
          D.9470 = *D.9469;
          D.9471 = (int) D.9470;
          __result = D.9468 - D.9471;
          if (__s2_len > 2) goto <D.9472>; else goto <D.9473>;
          <D.9472>:
          if (__result == 0) goto <D.9474>; else goto <D.9475>;
          <D.9474>:
          D.9476 = &MEM[(void *)"calls" + 3B];
          D.9477 = *D.9476;
          D.9478 = (int) D.9477;
          D.9479 = __s2 + 3;
          D.9480 = *D.9479;
          D.9481 = (int) D.9480;
          __result = D.9478 - D.9481;
          <D.9475>:
          <D.9473>:
          <D.9465>:
          <D.9463>:
          <D.9455>:
          <D.9453>:
        }
        D.8964 = __result;
      }
      iftmp.26 = -D.8964;
      goto <D.9482>;
      <D.9446>:
      iftmp.26 = __builtin_strcmp (val, "calls");
      <D.9482>:
      D.8965 = iftmp.26;
    }
    if (D.8965 == 0) goto <D.9483>; else goto <D.9484>;
    <D.9483>:
    method_sort_mode = 2;
    goto <D.9485>;
    <D.9484>:
    usage ();
    D.9268 = 1;
    return D.9268;
    <D.9485>:
    <D.9443>:
    <D.9401>:
  }
  goto <D.9486>;
  <D.9359>:
  i.18 = (unsigned int) i;
  D.9183 = i.18 * 4;
  D.9184 = argv + D.9183;
  D.9221 = *D.9184;
  D.9487 = strncmp ("--reports=", D.9221, 10);
  if (D.9487 == 0) goto <D.9488>; else goto <D.9489>;
  <D.9488>:
  {
    const char * val;

    i.18 = (unsigned int) i;
    D.9183 = i.18 * 4;
    D.9184 = argv + D.9183;
    D.9221 = *D.9184;
    val = D.9221 + 10;
    D.9490 = print_reports (0B, val, 1);
    if (D.9490 == 0) goto <D.9491>; else goto <D.9492>;
    <D.9491>:
    usage ();
    D.9268 = 1;
    return D.9268;
    <D.9492>:
    reports = val;
  }
  goto <D.9493>;
  <D.9489>:
  i.18 = (unsigned int) i;
  D.9183 = i.18 * 4;
  D.9184 = argv + D.9183;
  D.9221 = *D.9184;
  D.9494 = strncmp ("--out=", D.9221, 6);
  if (D.9494 == 0) goto <D.9495>; else goto <D.9496>;
  <D.9495>:
  {
    const char * val;

    i.18 = (unsigned int) i;
    D.9183 = i.18 * 4;
    D.9184 = argv + D.9183;
    D.9221 = *D.9184;
    val = D.9221 + 6;
    outfile.27 = fopen (val, "w");
    outfile = outfile.27;
    outfile.28 = outfile;
    if (outfile.28 == 0B) goto <D.9499>; else goto <D.9500>;
    <D.9499>:
    printf ("Cannot open output file: %s\n", val);
    D.9268 = 1;
    return D.9268;
    <D.9500>:
  }
  goto <D.9501>;
  <D.9496>:
  i.18 = (unsigned int) i;
  D.9183 = i.18 * 4;
  D.9184 = argv + D.9183;
  D.9221 = *D.9184;
  D.9502 = strncmp ("--maxframes=", D.9221, 12);
  if (D.9502 == 0) goto <D.9503>; else goto <D.9504>;
  <D.9503>:
  {
    const char * val;
    char * vale;

    try
      {
        i.18 = (unsigned int) i;
        D.9183 = i.18 * 4;
        D.9184 = argv + D.9183;
        D.9221 = *D.9184;
        val = D.9221 + 12;
        D.9505 = strtoul (val, &vale, 10);
        trace_max.29 = (int) D.9505;
        trace_max = trace_max.29;
      }
    finally
      {
        vale = {CLOBBER};
      }
  }
  goto <D.9507>;
  <D.9504>:
  i.18 = (unsigned int) i;
  D.9183 = i.18 * 4;
  D.9184 = argv + D.9183;
  D.9221 = *D.9184;
  D.9508 = strncmp ("--find=", D.9221, 7);
  if (D.9508 == 0) goto <D.9509>; else goto <D.9510>;
  <D.9509>:
  {
    const char * val;

    i.18 = (unsigned int) i;
    D.9183 = i.18 * 4;
    D.9184 = argv + D.9183;
    D.9221 = *D.9184;
    val = D.9221 + 7;
    D.9511 = add_find_spec (val);
    if (D.9511 == 0) goto <D.9512>; else goto <D.9513>;
    <D.9512>:
    usage ();
    D.9268 = 1;
    return D.9268;
    <D.9513>:
  }
  goto <D.9514>;
  <D.9510>:
  i.18 = (unsigned int) i;
  D.9183 = i.18 * 4;
  D.9184 = argv + D.9183;
  D.9221 = *D.9184;
  D.9515 = strncmp ("--track=", D.9221, 8);
  if (D.9515 == 0) goto <D.9516>; else goto <D.9517>;
  <D.9516>:
  {
    const char * val;
    char * vale;

    try
      {
        i.18 = (unsigned int) i;
        D.9183 = i.18 * 4;
        D.9184 = argv + D.9183;
        D.9221 = *D.9184;
        val = D.9221 + 8;
        goto <D.9019>;
        <D.9020>:
        {
          uintptr_t tracked_obj;

          D.9518 = *val;
          if (D.9518 == 44) goto <D.9519>; else goto <D.9520>;
          <D.9519>:
          val = val + 1;
          // predicted unlikely by continue predictor.
          goto <D.9019>;
          <D.9520>:
          tracked_obj = strtoul (val, &vale, 0);
          found_object (tracked_obj);
          val = vale;
        }
        <D.9019>:
        D.9518 = *val;
        if (D.9518 != 0) goto <D.9020>; else goto <D.9021>;
        <D.9021>:
      }
    finally
      {
        vale = {CLOBBER};
      }
  }
  goto <D.9521>;
  <D.9517>:
  i.18 = (unsigned int) i;
  D.9183 = i.18 * 4;
  D.9184 = argv + D.9183;
  D.9221 = *D.9184;
  D.9522 = strncmp ("--thread=", D.9221, 9);
  if (D.9522 == 0) goto <D.9523>; else goto <D.9524>;
  <D.9523>:
  {
    const char * val;
    char * vale;

    try
      {
        i.18 = (unsigned int) i;
        D.9183 = i.18 * 4;
        D.9184 = argv + D.9183;
        D.9221 = *D.9184;
        val = D.9221 + 9;
        thread_filter.30 = strtoul (val, &vale, 0);
        thread_filter = thread_filter.30;
      }
    finally
      {
        vale = {CLOBBER};
      }
  }
  goto <D.9526>;
  <D.9524>:
  i.18 = (unsigned int) i;
  D.9183 = i.18 * 4;
  D.9184 = argv + D.9183;
  D.9221 = *D.9184;
  D.9527 = strncmp ("--time=", D.9221, 7);
  if (D.9527 == 0) goto <D.9528>; else goto <D.9529>;
  <D.9528>:
  {
    char * val;
    double from_secs;
    double to_secs;
    char * top;

    i.18 = (unsigned int) i;
    D.9183 = i.18 * 4;
    D.9184 = argv + D.9183;
    D.9221 = *D.9184;
    D.9530 = D.9221 + 7;
    val = pstrdup (D.9530);
    top = __builtin_strchr (val, 45);
    if (top == 0B) goto <D.9531>; else goto <D.9532>;
    <D.9531>:
    usage ();
    D.9268 = 1;
    return D.9268;
    <D.9532>:
    top.31 = top;
    top = top.31 + 1;
    *top.31 = 0;
    from_secs = atof (val);
    to_secs = atof (top);
    free (val);
    if (from_secs > to_secs) goto <D.9534>; else goto <D.9535>;
    <D.9534>:
    usage ();
    D.9268 = 1;
    return D.9268;
    <D.9535>:
    D.9536 = from_secs * 1.0e+9;
    time_from.32 = (long long unsigned int) D.9536;
    time_from = time_from.32;
    D.9538 = to_secs * 1.0e+9;
    time_to.33 = (long long unsigned int) D.9538;
    time_to = time_to.33;
  }
  goto <D.9540>;
  <D.9529>:
  {
    size_t __s1_len;
    size_t __s2_len;

    __s1_len = 9;
    if (__s1_len <= 3) goto <D.9542>; else goto <D.9543>;
    <D.9542>:
    {
      const unsigned char * __s2;
      int __result;

      i.18 = (unsigned int) i;
      D.9183 = i.18 * 4;
      D.9184 = argv + D.9183;
      __s2 = *D.9184;
      D.9544 = "--verbose";
      D.9545 = MEM[(const unsigned char *)D.9544];
      D.9546 = (int) D.9545;
      D.9547 = *__s2;
      D.9548 = (int) D.9547;
      __result = D.9546 - D.9548;
      {
        if (__s1_len != 0) goto <D.9549>; else goto <D.9550>;
        <D.9549>:
        if (__result == 0) goto <D.9551>; else goto <D.9552>;
        <D.9551>:
        D.9553 = &MEM[(void *)"--verbose" + 1B];
        D.9554 = *D.9553;
        D.9555 = (int) D.9554;
        D.9556 = __s2 + 1;
        D.9557 = *D.9556;
        D.9558 = (int) D.9557;
        __result = D.9555 - D.9558;
        if (__s1_len > 1) goto <D.9559>; else goto <D.9560>;
        <D.9559>:
        if (__result == 0) goto <D.9561>; else goto <D.9562>;
        <D.9561>:
        D.9563 = &MEM[(void *)"--verbose" + 2B];
        D.9564 = *D.9563;
        D.9565 = (int) D.9564;
        D.9566 = __s2 + 2;
        D.9567 = *D.9566;
        D.9568 = (int) D.9567;
        __result = D.9565 - D.9568;
        if (__s1_len > 2) goto <D.9569>; else goto <D.9570>;
        <D.9569>:
        if (__result == 0) goto <D.9571>; else goto <D.9572>;
        <D.9571>:
        D.9573 = &MEM[(void *)"--verbose" + 3B];
        D.9574 = *D.9573;
        D.9575 = (int) D.9574;
        D.9576 = __s2 + 3;
        D.9577 = *D.9576;
        D.9578 = (int) D.9577;
        __result = D.9575 - D.9578;
        <D.9572>:
        <D.9570>:
        <D.9562>:
        <D.9560>:
        <D.9552>:
        <D.9550>:
      }
      D.9050 = __result;
    }
    iftmp.34 = D.9050;
    goto <D.9579>;
    <D.9543>:
    i.18 = (unsigned int) i;
    D.9183 = i.18 * 4;
    D.9184 = argv + D.9183;
    D.9221 = *D.9184;
    iftmp.34 = __builtin_strcmp ("--verbose", D.9221);
    <D.9579>:
    D.9054 = iftmp.34;
  }
  if (D.9054 == 0) goto <D.9580>; else goto <D.9581>;
  <D.9580>:
  verbose.35 = verbose;
  verbose.36 = verbose.35 + 1;
  verbose = verbose.36;
  goto <D.9584>;
  <D.9581>:
  {
    size_t __s1_len;
    size_t __s2_len;

    __s1_len = 8;
    if (__s1_len <= 3) goto <D.9586>; else goto <D.9587>;
    <D.9586>:
    {
      const unsigned char * __s2;
      int __result;

      i.18 = (unsigned int) i;
      D.9183 = i.18 * 4;
      D.9184 = argv + D.9183;
      __s2 = *D.9184;
      D.9588 = "--traces";
      D.9589 = MEM[(const unsigned char *)D.9588];
      D.9590 = (int) D.9589;
      D.9591 = *__s2;
      D.9592 = (int) D.9591;
      __result = D.9590 - D.9592;
      {
        if (__s1_len != 0) goto <D.9593>; else goto <D.9594>;
        <D.9593>:
        if (__result == 0) goto <D.9595>; else goto <D.9596>;
        <D.9595>:
        D.9597 = &MEM[(void *)"--traces" + 1B];
        D.9598 = *D.9597;
        D.9599 = (int) D.9598;
        D.9600 = __s2 + 1;
        D.9601 = *D.9600;
        D.9602 = (int) D.9601;
        __result = D.9599 - D.9602;
        if (__s1_len > 1) goto <D.9603>; else goto <D.9604>;
        <D.9603>:
        if (__result == 0) goto <D.9605>; else goto <D.9606>;
        <D.9605>:
        D.9607 = &MEM[(void *)"--traces" + 2B];
        D.9608 = *D.9607;
        D.9609 = (int) D.9608;
        D.9610 = __s2 + 2;
        D.9611 = *D.9610;
        D.9612 = (int) D.9611;
        __result = D.9609 - D.9612;
        if (__s1_len > 2) goto <D.9613>; else goto <D.9614>;
        <D.9613>:
        if (__result == 0) goto <D.9615>; else goto <D.9616>;
        <D.9615>:
        D.9617 = &MEM[(void *)"--traces" + 3B];
        D.9618 = *D.9617;
        D.9619 = (int) D.9618;
        D.9620 = __s2 + 3;
        D.9621 = *D.9620;
        D.9622 = (int) D.9621;
        __result = D.9619 - D.9622;
        <D.9616>:
        <D.9614>:
        <D.9606>:
        <D.9604>:
        <D.9596>:
        <D.9594>:
      }
      D.9059 = __result;
    }
    iftmp.37 = D.9059;
    goto <D.9623>;
    <D.9587>:
    i.18 = (unsigned int) i;
    D.9183 = i.18 * 4;
    D.9184 = argv + D.9183;
    D.9221 = *D.9184;
    iftmp.37 = __builtin_strcmp ("--traces", D.9221);
    <D.9623>:
    D.9063 = iftmp.37;
  }
  if (D.9063 == 0) goto <D.9624>; else goto <D.9064>;
  <D.9624>:
  show_traces = 1;
  collect_traces = 1;
  <D.9584>:
  <D.9540>:
  <D.9526>:
  <D.9521>:
  <D.9514>:
  <D.9507>:
  <D.9501>:
  <D.9493>:
  <D.9486>:
  <D.9356>:
  <D.9226>:
  i = i + 1;
  <D.9066>:
  if (i < argc) goto <D.9065>; else goto <D.9064>;
  <D.9064>:
  if (i >= argc) goto <D.9625>; else goto <D.9626>;
  <D.9625>:
  usage ();
  D.9268 = 2;
  return D.9268;
  <D.9626>:
  i.18 = (unsigned int) i;
  D.9183 = i.18 * 4;
  D.9184 = argv + D.9183;
  D.9221 = *D.9184;
  ctx = load_file (D.9221);
  if (ctx == 0B) goto <D.9627>; else goto <D.9628>;
  <D.9627>:
  printf ("Not a log profiler data file (or unsupported version).\n");
  D.9268 = 1;
  return D.9268;
  <D.9628>:
  goto <D.9068>;
  <D.9067>:
  <D.9068>:
  D.9629 = decode_buffer (ctx);
  if (D.9629 != 0) goto <D.9067>; else goto <D.9069>;
  <D.9069>:
  flush_context (ctx);
  num_tracked_objects.38 = num_tracked_objects;
  if (num_tracked_objects.38 != 0) goto <D.9631>; else goto <D.9632>;
  <D.9631>:
  D.9268 = 0;
  return D.9268;
  <D.9632>:
  reports.39 = reports;
  print_reports (ctx, reports.39, 0);
  D.9268 = 0;
  return D.9268;
}


add_find_spec (const char * p)
{
  char D.9644;
  const char * D.9646;
  char D.9647;
  const char * find_name.41;
  long unsigned int D.9650;
  long long unsigned int find_size.40;
  int D.9652;

  D.9644 = *p;
  if (D.9644 == 83) goto <D.9645>; else goto <D.9643>;
  <D.9645>:
  D.9646 = p + 1;
  D.9647 = *D.9646;
  if (D.9647 == 58) goto <D.9648>; else goto <D.9643>;
  <D.9648>:
  {
    char * vale;

    try
      {
        find_name.41 = p + 2;
        D.9650 = strtoul (find_name.41, &vale, 10);
        find_size.40 = (long long unsigned int) D.9650;
        find_size = find_size.40;
        D.9652 = 1;
        return D.9652;
      }
    finally
      {
        vale = {CLOBBER};
      }
  }
  <D.9643>:
  D.9644 = *p;
  if (D.9644 == 84) goto <D.9653>; else goto <D.9654>;
  <D.9653>:
  D.9646 = p + 1;
  D.9647 = *D.9646;
  if (D.9647 == 58) goto <D.9655>; else goto <D.9656>;
  <D.9655>:
  find_name.41 = p + 2;
  find_name = find_name.41;
  D.9652 = 1;
  return D.9652;
  <D.9656>:
  <D.9654>:
  D.9652 = 0;
  return D.9652;
}


found_object (uintptr_t obj)
{
  int num_tracked_objects.42;
  int num_tracked_objects.43;
  uintptr_t * tracked_objects.44;
  unsigned int num_tracked_objects.45;
  unsigned int D.9663;
  void * tracked_objects.46;
  sizetype num_tracked_objects.47;
  sizetype D.9666;
  sizetype D.9667;
  uintptr_t * D.9668;

  num_tracked_objects.42 = num_tracked_objects;
  num_tracked_objects.43 = num_tracked_objects.42 + 1;
  num_tracked_objects = num_tracked_objects.43;
  tracked_objects.44 = tracked_objects;
  num_tracked_objects.42 = num_tracked_objects;
  num_tracked_objects.45 = (unsigned int) num_tracked_objects.42;
  D.9663 = num_tracked_objects.45 * 4;
  tracked_objects.46 = realloc (tracked_objects.44, D.9663);
  tracked_objects = tracked_objects.46;
  tracked_objects.44 = tracked_objects;
  num_tracked_objects.42 = num_tracked_objects;
  num_tracked_objects.47 = (sizetype) num_tracked_objects.42;
  D.9666 = num_tracked_objects.47 + 1073741823;
  D.9667 = D.9666 * 4;
  D.9668 = tracked_objects.44 + D.9667;
  *D.9668 = obj;
}


pstrdup (const char * s)
{
  unsigned int D.9669;
  unsigned int D.9670;
  unsigned int len.48;
  char * D.9672;
  int len;
  char * p;

  D.9669 = strlen (s);
  D.9670 = D.9669 + 1;
  len = (int) D.9670;
  len.48 = (unsigned int) len;
  p = malloc (len.48);
  len.48 = (unsigned int) len;
  memcpy (p, s, len.48);
  D.9672 = p;
  return D.9672;
}


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

  D.9675 = __builtin_object_size (__dest, 0);
  D.9674 = __builtin___memcpy_chk (__dest, __src, __len, D.9675);
  return D.9674;
}


atof (const char * __nptr)
{
  double D.9677;

  D.9677 = strtod (__nptr, 0B);
  return D.9677;
}


usage ()
{
  const char * reports.49;

  printf ("Mono log profiler report version %d.%d\n", 0, 4);
  printf ("Usage: mprof-report [OPTIONS] FILENAME\n");
  printf ("FILENAME can be \'-\' to read from standard input.\n");
  printf ("Options:\n");
  printf ("\t--help               display this help\n");
  printf ("\t--out=FILE           write to FILE instead of stdout\n");
  printf ("\t--traces             collect and show backtraces\n");
  printf ("\t--maxframes=NUM      limit backtraces to NUM entries\n");
  printf ("\t--reports=R1[,R2...] print the specified reports. Defaults are:\n");
  reports.49 = reports;
  printf ("\t                     %s\n", reports.49);
  printf ("\t--method-sort=MODE   sort methods according to MODE: total, self, calls\n");
  printf ("\t--alloc-sort=MODE    sort allocations according to MODE: bytes, count\n");
  printf ("\t--track=OB1[,OB2...] track what happens to objects OBJ1, O2 etc.\n");
  printf ("\t--find=FINDSPEC      find and track objects matching FINFSPEC, where FINDSPEC is:\n");
  printf ("\t                     S:minimum_size or T:partial_name\n");
  printf ("\t--thread=THREADID    consider just the data for thread THREADID\n");
  printf ("\t--time=FROM-TO       consider data FROM seconds from startup up to TO seconds\n");
  printf ("\t--verbose            increase verbosity level\n");
  printf ("\t--debug              display decoding debug info for mprof-report devs\n");
}


load_file (char * name)
{
  int D.8602;
  int iftmp.50;
  int D.8601;
  const char[2] * D.9683;
  unsigned char D.9684;
  int D.9685;
  unsigned char D.9686;
  int D.9687;
  const unsigned char * D.9692;
  unsigned char D.9693;
  int D.9694;
  const unsigned char * D.9695;
  unsigned char D.9696;
  int D.9697;
  const unsigned char * D.9702;
  unsigned char D.9703;
  int D.9704;
  const unsigned char * D.9705;
  unsigned char D.9706;
  int D.9707;
  const unsigned char * D.9712;
  unsigned char D.9713;
  int D.9714;
  const unsigned char * D.9715;
  unsigned char D.9716;
  int D.9717;
  struct _IO_FILE * stdin.51;
  struct FILE * D.9723;
  struct FILE * D.9724;
  int D.9727;
  struct ProfContext * D.9730;
  int D.9733;
  unsigned char * D.9735;
  unsigned char D.9736;
  unsigned char * D.9737;
  unsigned char D.9738;
  int D.9739;
  unsigned char * D.9740;
  unsigned char D.9741;
  int D.9742;
  int D.9743;
  unsigned char * D.9744;
  unsigned char D.9745;
  unsigned char * D.9748;
  int D.9749;
  unsigned char * D.9752;
  long long int D.9753;
  long long unsigned int D.9754;
  unsigned char * D.9755;
  int D.9756;
  unsigned char * D.9757;
  int D.9758;
  unsigned char * D.9759;
  int D.9760;
  unsigned char * p;
  struct ProfContext * ctx;

  ctx = calloc (56, 1);
  {
    size_t __s1_len;
    size_t __s2_len;

    __s2_len = 1;
    if (__s2_len <= 3) goto <D.9681>; else goto <D.9682>;
    <D.9681>:
    {
      const unsigned char * __s2;
      int __result;

      __s2 = name;
      D.9683 = "-";
      D.9684 = MEM[(const unsigned char *)D.9683];
      D.9685 = (int) D.9684;
      D.9686 = *__s2;
      D.9687 = (int) D.9686;
      __result = D.9685 - D.9687;
      {
        if (__s2_len != 0) goto <D.9688>; else goto <D.9689>;
        <D.9688>:
        if (__result == 0) goto <D.9690>; else goto <D.9691>;
        <D.9690>:
        D.9692 = &MEM[(void *)"-" + 1B];
        D.9693 = *D.9692;
        D.9694 = (int) D.9693;
        D.9695 = __s2 + 1;
        D.9696 = *D.9695;
        D.9697 = (int) D.9696;
        __result = D.9694 - D.9697;
        if (__s2_len > 1) goto <D.9698>; else goto <D.9699>;
        <D.9698>:
        if (__result == 0) goto <D.9700>; else goto <D.9701>;
        <D.9700>:
        D.9702 = &MEM[(void *)"-" + 2B];
        D.9703 = *D.9702;
        D.9704 = (int) D.9703;
        D.9705 = __s2 + 2;
        D.9706 = *D.9705;
        D.9707 = (int) D.9706;
        __result = D.9704 - D.9707;
        if (__s2_len > 2) goto <D.9708>; else goto <D.9709>;
        <D.9708>:
        if (__result == 0) goto <D.9710>; else goto <D.9711>;
        <D.9710>:
        D.9712 = &MEM[(void *)"-" + 3B];
        D.9713 = *D.9712;
        D.9714 = (int) D.9713;
        D.9715 = __s2 + 3;
        D.9716 = *D.9715;
        D.9717 = (int) D.9716;
        __result = D.9714 - D.9717;
        <D.9711>:
        <D.9709>:
        <D.9701>:
        <D.9699>:
        <D.9691>:
        <D.9689>:
      }
      D.8601 = __result;
    }
    iftmp.50 = -D.8601;
    goto <D.9718>;
    <D.9682>:
    iftmp.50 = __builtin_strcmp (name, "-");
    <D.9718>:
    D.8602 = iftmp.50;
  }
  if (D.8602 == 0) goto <D.9719>; else goto <D.9720>;
  <D.9719>:
  stdin.51 = stdin;
  ctx->file = stdin.51;
  goto <D.9722>;
  <D.9720>:
  D.9723 = fopen (name, "rb");
  ctx->file = D.9723;
  <D.9722>:
  D.9724 = ctx->file;
  if (D.9724 == 0B) goto <D.9725>; else goto <D.9726>;
  <D.9725>:
  printf ("Cannot open file: %s\n", name);
  exit (1);
  <D.9726>:
  D.9727 = load_data (ctx, 32);
  if (D.9727 == 0) goto <D.9728>; else goto <D.9729>;
  <D.9728>:
  D.9730 = 0B;
  return D.9730;
  <D.9729>:
  p = ctx->buf;
  D.9733 = read_int32 (p);
  if (D.9733 != 1297111553) goto <D.9731>; else goto <D.9734>;
  <D.9734>:
  D.9735 = p + 6;
  D.9736 = *D.9735;
  if (D.9736 > 4) goto <D.9731>; else goto <D.9732>;
  <D.9731>:
  D.9730 = 0B;
  return D.9730;
  <D.9732>:
  D.9737 = p + 4;
  D.9738 = *D.9737;
  D.9739 = (int) D.9738;
  ctx->version_major = D.9739;
  D.9740 = p + 5;
  D.9741 = *D.9740;
  D.9742 = (int) D.9741;
  ctx->version_minor = D.9742;
  D.9735 = p + 6;
  D.9736 = *D.9735;
  D.9743 = (int) D.9736;
  ctx->data_version = D.9743;
  D.9744 = p + 7;
  D.9745 = *D.9744;
  if (D.9745 > 4) goto <D.9746>; else goto <D.9747>;
  <D.9746>:
  D.9730 = 0B;
  return D.9730;
  <D.9747>:
  D.9748 = p + 20;
  D.9749 = read_int32 (D.9748);
  if (D.9749 != 0) goto <D.9750>; else goto <D.9751>;
  <D.9750>:
  D.9730 = 0B;
  return D.9730;
  <D.9751>:
  D.9752 = p + 8;
  D.9753 = read_int64 (D.9752);
  D.9754 = (long long unsigned int) D.9753;
  ctx->startup_time = D.9754;
  D.9755 = p + 16;
  D.9756 = read_int32 (D.9755);
  ctx->timer_overhead = D.9756;
  D.9757 = p + 24;
  D.9758 = read_int32 (D.9757);
  ctx->pid = D.9758;
  D.9759 = p + 28;
  D.9760 = read_int16 (D.9759);
  ctx->port = D.9760;
  D.9730 = ctx;
  return D.9730;
}


load_data (struct ProfContext * ctx, int size)
{
  unsigned char * D.9770;
  unsigned int size.52;
  struct FILE * D.9772;
  unsigned int D.9773;
  int D.9776;
  _Bool D.9777;

  ensure_buffer (ctx, size);
  {
    int r;

    D.9770 = ctx->buf;
    size.52 = (unsigned int) size;
    D.9772 = ctx->file;
    D.9773 = fread (D.9770, size.52, 1, D.9772);
    r = (int) D.9773;
    if (r == 0) goto <D.9774>; else goto <D.9775>;
    <D.9774>:
    D.9777 = size == 0;
    D.9776 = (int) D.9777;
    return D.9776;
    <D.9775>:
    D.9776 = r;
    return D.9776;
  }
}


ensure_buffer (struct ProfContext * ctx, int size)
{
  int D.9780;
  unsigned char * D.9783;
  unsigned int size.53;
  void * D.9785;

  D.9780 = ctx->size;
  if (D.9780 < size) goto <D.9781>; else goto <D.9782>;
  <D.9781>:
  D.9783 = ctx->buf;
  size.53 = (unsigned int) size;
  D.9785 = realloc (D.9783, size.53);
  ctx->buf = D.9785;
  ctx->size = size;
  <D.9782>:
}


fread (void * restrict __ptr, size_t __size, size_t __n, struct FILE * restrict __stream)
{
  unsigned int D.9786;
  int D.9791;
  int D.9793;
  unsigned int D.9795;
  size_t D.9796;
  unsigned int D.9797;
  unsigned int D.9798;
  unsigned int D.9799;
  unsigned int D.9802;

  D.9786 = __builtin_object_size (__ptr, 0);
  if (D.9786 != 4294967295) goto <D.9787>; else goto <D.9788>;
  <D.9787>:
  D.9791 = __builtin_constant_p (__size);
  if (D.9791 == 0) goto <D.9789>; else goto <D.9792>;
  <D.9792>:
  D.9793 = __builtin_constant_p (__n);
  if (D.9793 == 0) goto <D.9789>; else goto <D.9794>;
  <D.9794>:
  D.9795 = __size | __n;
  if (D.9795 > 65535) goto <D.9789>; else goto <D.9790>;
  <D.9789>:
  D.9797 = __builtin_object_size (__ptr, 0);
  D.9796 = __fread_chk (__ptr, D.9797, __size, __n, __stream);
  return D.9796;
  <D.9790>:
  D.9798 = __size * __n;
  D.9799 = __builtin_object_size (__ptr, 0);
  if (D.9798 > D.9799) goto <D.9800>; else goto <D.9801>;
  <D.9800>:
  D.9802 = __builtin_object_size (__ptr, 0);
  D.9796 = __fread_chk_warn (__ptr, D.9802, __size, __n, __stream);
  return D.9796;
  <D.9801>:
  <D.9788>:
  D.9796 = __fread_alias (__ptr, __size, __n, __stream);
  return D.9796;
}


read_int64 (unsigned char * p)
{
  unsigned char * p.54;
  unsigned char D.9808;
  unsigned char * p.55;
  unsigned char D.9810;
  int D.9811;
  int D.9812;
  long long unsigned int D.9813;
  unsigned char * p.56;
  unsigned char D.9815;
  int D.9816;
  int D.9817;
  long long unsigned int D.9818;
  unsigned char * p.57;
  unsigned char D.9820;
  long long unsigned int D.9821;
  long long unsigned int D.9822;
  unsigned char * p.58;
  unsigned char D.9824;
  long long unsigned int D.9825;
  long long unsigned int D.9826;
  unsigned char * p.59;
  unsigned char D.9828;
  long long unsigned int D.9829;
  long long unsigned int D.9830;
  unsigned char * p.60;
  unsigned char D.9832;
  long long unsigned int D.9833;
  long long unsigned int D.9834;
  unsigned char * p.61;
  unsigned char D.9836;
  long long unsigned int D.9837;
  long long unsigned int D.9838;
  int64_t D.9839;
  uint64_t value;

  p.54 = p;
  p = p.54 + 1;
  D.9808 = *p.54;
  value = (uint64_t) D.9808;
  p.55 = p;
  p = p.55 + 1;
  D.9810 = *p.55;
  D.9811 = (int) D.9810;
  D.9812 = D.9811 << 8;
  D.9813 = (long long unsigned int) D.9812;
  value = D.9813 | value;
  p.56 = p;
  p = p.56 + 1;
  D.9815 = *p.56;
  D.9816 = (int) D.9815;
  D.9817 = D.9816 << 16;
  D.9818 = (long long unsigned int) D.9817;
  value = D.9818 | value;
  p.57 = p;
  p = p.57 + 1;
  D.9820 = *p.57;
  D.9821 = (long long unsigned int) D.9820;
  D.9822 = D.9821 << 24;
  value = D.9822 | value;
  p.58 = p;
  p = p.58 + 1;
  D.9824 = *p.58;
  D.9825 = (long long unsigned int) D.9824;
  D.9826 = D.9825 << 32;
  value = D.9826 | value;
  p.59 = p;
  p = p.59 + 1;
  D.9828 = *p.59;
  D.9829 = (long long unsigned int) D.9828;
  D.9830 = D.9829 << 40;
  value = D.9830 | value;
  p.60 = p;
  p = p.60 + 1;
  D.9832 = *p.60;
  D.9833 = (long long unsigned int) D.9832;
  D.9834 = D.9833 << 48;
  value = D.9834 | value;
  p.61 = p;
  p = p.61 + 1;
  D.9836 = *p.61;
  D.9837 = (long long unsigned int) D.9836;
  D.9838 = D.9837 << 54;
  value = D.9838 | value;
  D.9839 = (int64_t) value;
  return D.9839;
}


read_int32 (unsigned char * p)
{
  unsigned char * p.62;
  unsigned char D.9842;
  unsigned char * p.63;
  unsigned char D.9844;
  int D.9845;
  int D.9846;
  unsigned char * p.64;
  unsigned char D.9848;
  int D.9849;
  int D.9850;
  unsigned char * p.65;
  unsigned char D.9852;
  unsigned int D.9853;
  unsigned int D.9854;
  unsigned int value.66;
  unsigned int D.9856;
  int32_t D.9857;
  int32_t value;

  p.62 = p;
  p = p.62 + 1;
  D.9842 = *p.62;
  value = (int32_t) D.9842;
  p.63 = p;
  p = p.63 + 1;
  D.9844 = *p.63;
  D.9845 = (int) D.9844;
  D.9846 = D.9845 << 8;
  value = D.9846 | value;
  p.64 = p;
  p = p.64 + 1;
  D.9848 = *p.64;
  D.9849 = (int) D.9848;
  D.9850 = D.9849 << 16;
  value = D.9850 | value;
  p.65 = p;
  p = p.65 + 1;
  D.9852 = *p.65;
  D.9853 = (unsigned int) D.9852;
  D.9854 = D.9853 << 24;
  value.66 = (unsigned int) value;
  D.9856 = D.9854 | value.66;
  value = (int32_t) D.9856;
  D.9857 = value;
  return D.9857;
}


read_int16 (unsigned char * p)
{
  unsigned char * p.67;
  unsigned char D.9860;
  unsigned char * p.68;
  unsigned char D.9862;
  int D.9863;
  int D.9864;
  int32_t D.9865;
  int32_t value;

  p.67 = p;
  p = p.67 + 1;
  D.9860 = *p.67;
  value = (int32_t) D.9860;
  p.68 = p;
  p = p.68 + 1;
  D.9862 = *p.68;
  D.9863 = (int) D.9862;
  D.9864 = D.9863 << 8;
  value = D.9864 | value;
  D.9865 = value;
  return D.9865;
}


printf (const char * restrict __fmt)
{
  int D.9867;

  D.9867 = __printf_chk (1, __fmt, __builtin_va_arg_pack ());
  return D.9867;
}


decode_buffer (struct ProfContext * ctx)
{
  struct FILE * D.9870;
  long int D.9871;
  int D.9872;
  int D.9875;
  unsigned char * p.69;
  unsigned char * p.70;
  int D.9878;
  struct FILE * outfile.71;
  int D.9882;
  sizetype i.72;
  unsigned char * D.9884;
  unsigned char D.9885;
  int D.9886;
  const char * iftmp.73;
  unsigned int i.74;
  unsigned int D.9889;
  unsigned char * D.9893;
  unsigned char * D.9894;
  long long int D.9895;
  unsigned char * D.9896;
  long long int D.9897;
  unsigned char * D.9898;
  long long int D.9899;
  unsigned char * D.9900;
  long long int D.9901;
  unsigned char * D.9902;
  long long int D.9903;
  int debug.75;
  int D.9907;
  long long unsigned int startup_time.76;
  long long unsigned int time_from.77;
  long long unsigned int time_from.78;
  long long unsigned int time_to.79;
  long long unsigned int time_to.80;
  char * D.9919;
  char * D.9922;
  struct MethodDesc * * D.9923;
  unsigned int i.81;
  unsigned int D.9925;
  struct MethodDesc * * D.9926;
  struct MethodDesc * D.9927;
  int D.9928;
  int D.9929;
  int D.9930;
  sizetype len.82;
  unsigned char D.9932;
  int D.9933;
  int D.9934;
  uint8_t * D.9935;
  int gc_resizes.83;
  int gc_resizes.84;
  long long unsigned int max_heap_size.85;
  long long unsigned int D.9948;
  int D.9951;
  const char * D.9952;
  int D.9953;
  int D.9958;
  int D.9959;
  long long unsigned int D.9963;
  long long unsigned int D.9964;
  long long unsigned int D.9965;
  long long unsigned int D.9966;
  long long unsigned int D.9972;
  int D.9973;
  long long unsigned int D.9974;
  long long unsigned int gc_object_moves.86;
  long long unsigned int gc_object_moves.87;
  int num_tracked_objects.88;
  int D.9980;
  int D.9981;
  unsigned int D.9982;
  int D.9983;
  int D.9984;
  unsigned int D.9985;
  void * D.9988;
  void * D.9989;
  long long unsigned int D.9993;
  long long unsigned int D.9994;
  long long unsigned int D.9997;
  long long unsigned int D.9998;
  long long unsigned int D.9999;
  long long unsigned int D.10000;
  struct TraceDesc * D.10001;
  long long unsigned int D.10002;
  int D.10007;
  int D.10008;
  unsigned int D.10009;
  const char * D.10012;
  void * D.10013;
  long long unsigned int D.10017;
  long long unsigned int D.10018;
  long long unsigned int D.10021;
  long long unsigned int D.10022;
  long long unsigned int D.10023;
  long long unsigned int D.10024;
  const char * D.10027;
  unsigned char * p.89;
  unsigned char * p.90;
  unsigned char D.10030;
  int D.10037;
  void * D.10038;
  int D.10039;
  void * D.10040;
  unsigned char * p.91;
  int D.10058;
  char * D.10059;
  int D.10062;
  int D.10065;
  int D.10066;
  void * D.10067;
  struct ClassDesc * D.10068;
  char * D.10069;
  unsigned int thread_filter.92;
  unsigned int D.10079;
  int D.10081;
  int D.10082;
  long long unsigned int D.10083;
  long long unsigned int D.10084;
  int num_bt.93;
  struct TraceDesc * D.10088;
  long long unsigned int find_size.94;
  const char * find_name.95;
  char * D.10099;
  char * D.10100;
  unsigned int D.10101;
  char * D.10106;
  int D.10113;
  unsigned int D.10114;
  unsigned int method_base.96;
  unsigned int D.10116;
  long long unsigned int D.10119;
  void * method_base.97;
  int D.10123;
  void * D.10124;
  struct TraceDesc * D.10131;
  const char * iftmp.98;
  const char * iftmp.99;
  char * D.10143;
  long long unsigned int D.10146;
  int D.10147;
  struct HeapShot * D.10150;
  int collect_traces.100;
  int D.10154;
  int D.10155;
  unsigned int D.10156;
  uintptr_t iftmp.101;
  int D.10161;
  long long unsigned int D.10164;
  unsigned int D.10165;
  unsigned int ref_offset.102;
  unsigned int i.103;
  unsigned int D.10171;
  int D.10172;
  int D.10173;
  unsigned int D.10174;
  void * D.10181;
  char * D.10182;
  long long unsigned int D.10186;
  long long unsigned int D.10187;
  long long unsigned int D.10188;
  long long unsigned int D.10189;
  int D.10192;
  int D.10193;
  void * D.10194;
  const char * D.10195;
  unsigned int D.10198;
  unsigned int i.104;
  unsigned int D.10210;
  uintptr_t * D.10212;
  uintptr_t * D.10213;
  int * D.10214;
  struct HeapShot * D.10220;
  unsigned char D.10221;
  int D.10222;
  int iftmp.105;
  int D.10230;
  int D.10231;
  unsigned int D.10232;
  long long unsigned int monitor_contention.106;
  long long unsigned int monitor_contention.107;
  unsigned int D.10237;
  unsigned int D.10238;
  int num_bt.108;
  struct TraceDesc * D.10246;
  long long unsigned int monitor_failed.109;
  long long unsigned int monitor_failed.110;
  struct MonitorDesc * D.10257;
  long long unsigned int D.10260;
  long long unsigned int D.10263;
  long long unsigned int D.10266;
  long long unsigned int D.10267;
  long long unsigned int monitor_acquired.111;
  long long unsigned int monitor_acquired.112;
  long long unsigned int D.10281;
  const char * D.10284;
  void * D.10285;
  int has_bt.113;
  int iftmp.114;
  long long unsigned int D.10296;
  long long unsigned int D.10297;
  int D.10298;
  unsigned int D.10299;
  unsigned int D.10300;
  long long unsigned int D.10303;
  long long unsigned int D.10304;
  const char * D.10307;
  struct MethodDesc * D.10308;
  char * D.10309;
  long long unsigned int throw_count.115;
  long long unsigned int throw_count.116;
  int has_bt.117;
  int D.10329;
  int D.10330;
  void * D.10331;
  long long unsigned int D.10334;
  long long unsigned int D.10335;
  int D.10336;
  int D.10337;
  void * ip.118;
  int D.10344;
  int D.10345;
  long long unsigned int D.10346;
  void * addr.119;
  int D.10353;
  long long unsigned int D.10354;
  void * addr.120;
  int p.121;
  int p.122;
  int D.10361;
  unsigned char * p;
  unsigned char * end;
  intptr_t thread_id;
  intptr_t ptr_base;
  intptr_t obj_base;
  intptr_t method_base;
  uint64_t time_base;
  uint64_t file_offset;
  int len;
  int i;
  struct ThreadContext * thread;

  try
    {
      D.9870 = ctx->file;
      D.9871 = ftell (D.9870);
      file_offset = (uint64_t) D.9871;
      D.9872 = load_data (ctx, 48);
      if (D.9872 == 0) goto <D.9873>; else goto <D.9874>;
      <D.9873>:
      D.9875 = 0;
      return D.9875;
      <D.9874>:
      p.69 = ctx->buf;
      p = p.69;
      p.70 = p;
      D.9878 = read_int32 (p.70);
      if (D.9878 != 1297107969) goto <D.9879>; else goto <D.9880>;
      <D.9879>:
      outfile.71 = outfile;
      p.70 = p;
      D.9882 = read_int32 (p.70);
      fprintf (outfile.71, "Incorrect buffer id: 0x%x\n", D.9882);
      i = 0;
      goto <D.8442>;
      <D.8441>:
      outfile.71 = outfile;
      p.70 = p;
      i.72 = (sizetype) i;
      D.9884 = p.70 + i.72;
      D.9885 = *D.9884;
      D.9886 = (int) D.9885;
      i.74 = (unsigned int) i;
      D.9889 = i.74 & 7;
      if (D.9889 != 0) goto <D.9890>; else goto <D.9891>;
      <D.9890>:
      iftmp.73 = " ";
      goto <D.9892>;
      <D.9891>:
      iftmp.73 = "\n";
      <D.9892>:
      fprintf (outfile.71, "0x%x%s", D.9886, iftmp.73);
      i = i + 1;
      <D.8442>:
      if (i <= 47) goto <D.8441>; else goto <D.8443>;
      <D.8443>:
      D.9875 = 0;
      return D.9875;
      <D.9880>:
      p.70 = p;
      D.9893 = p.70 + 4;
      len = read_int32 (D.9893);
      p.70 = p;
      D.9894 = p.70 + 8;
      D.9895 = read_int64 (D.9894);
      time_base = (uint64_t) D.9895;
      p.70 = p;
      D.9896 = p.70 + 16;
      D.9897 = read_int64 (D.9896);
      ptr_base = (intptr_t) D.9897;
      p.70 = p;
      D.9898 = p.70 + 24;
      D.9899 = read_int64 (D.9898);
      obj_base = (intptr_t) D.9899;
      p.70 = p;
      D.9900 = p.70 + 32;
      D.9901 = read_int64 (D.9900);
      thread_id = (intptr_t) D.9901;
      p.70 = p;
      D.9902 = p.70 + 40;
      D.9903 = read_int64 (D.9902);
      method_base = (intptr_t) D.9903;
      debug.75 = debug;
      if (debug.75 != 0) goto <D.9905>; else goto <D.9906>;
      <D.9905>:
      outfile.71 = outfile;
      fprintf (outfile.71, "buf: thread:%x, len: %d, time: %llu, file offset: %llu\n", thread_id, len, time_base, file_offset);
      <D.9906>:
      thread = load_thread (ctx, thread_id);
      D.9907 = load_data (ctx, len);
      if (D.9907 == 0) goto <D.9908>; else goto <D.9909>;
      <D.9908>:
      D.9875 = 0;
      return D.9875;
      <D.9909>:
      startup_time.76 = startup_time;
      if (startup_time.76 == 0) goto <D.9911>; else goto <D.9912>;
      <D.9911>:
      startup_time = time_base;
      time_from.77 = time_from;
      if (time_from.77 != 0) goto <D.9914>; else goto <D.9915>;
      <D.9914>:
      time_from.77 = time_from;
      startup_time.76 = startup_time;
      time_from.78 = time_from.77 + startup_time.76;
      time_from = time_from.78;
      time_to.79 = time_to;
      startup_time.76 = startup_time;
      time_to.80 = time_to.79 + startup_time.76;
      time_to = time_to.80;
      <D.9915>:
      D.9919 = thread->name;
      if (D.9919 == 0B) goto <D.9920>; else goto <D.9921>;
      <D.9920>:
      D.9922 = pstrdup ("Main");
      thread->name = D.9922;
      <D.9921>:
      <D.9912>:
      i = 0;
      goto <D.8445>;
      <D.8444>:
      D.9923 = thread->stack;
      i.81 = (unsigned int) i;
      D.9925 = i.81 * 4;
      D.9926 = D.9923 + D.9925;
      D.9927 = *D.9926;
      D.9928 = D.9927->recurse_count;
      D.9929 = D.9928 + 1;
      D.9927->recurse_count = D.9929;
      i = i + 1;
      <D.8445>:
      D.9930 = thread->stack_id;
      if (D.9930 > i) goto <D.8444>; else goto <D.8446>;
      <D.8446>:
      p.69 = ctx->buf;
      p = p.69;
      p.70 = p;
      len.82 = (sizetype) len;
      end = p.70 + len.82;
      goto <D.8584>;
      <D.8583>:
      p.70 = p;
      D.9932 = *p.70;
      D.9933 = (int) D.9932;
      D.9934 = D.9933 & 15;
      switch (D.9934) <default: <D.8582>, case 0: <D.8485>, case 1: <D.8447>, case 2: <D.8466>, case 3: <D.8496>, case 4: <D.8547>, case 5: <D.8535>, case 6: <D.8506>, case 7: <D.8558>>
      <D.8447>:
      {
        int subtype;
        uint64_t tdiff;

        p.70 = p;
        D.9932 = *p.70;
        D.9933 = (int) D.9932;
        subtype = D.9933 & 240;
        p.70 = p;
        D.9935 = p.70 + 1;
        tdiff = decode_uleb128 (D.9935, &p);
        time_base = time_base + tdiff;
        if (subtype == 32) goto <D.9936>; else goto <D.9937>;
        <D.9936>:
        {
          uint64_t new_size;

          p.70 = p;
          new_size = decode_uleb128 (p.70, &p);
          debug.75 = debug;
          if (debug.75 != 0) goto <D.9938>; else goto <D.9939>;
          <D.9938>:
          outfile.71 = outfile;
          fprintf (outfile.71, "gc heap resized to %llu\n", new_size);
          <D.9939>:
          gc_resizes.83 = gc_resizes;
          gc_resizes.84 = gc_resizes.83 + 1;
          gc_resizes = gc_resizes.84;
          max_heap_size.85 = max_heap_size;
          if (new_size > max_heap_size.85) goto <D.9943>; else goto <D.9944>;
          <D.9943>:
          max_heap_size = new_size;
          <D.9944>:
        }
        goto <D.9945>;
        <D.9937>:
        if (subtype == 16) goto <D.9946>; else goto <D.9947>;
        <D.9946>:
        {
          uint64_t ev;
          int gen;

          p.70 = p;
          ev = decode_uleb128 (p.70, &p);
          p.70 = p;
          D.9948 = decode_uleb128 (p.70, &p);
          gen = (int) D.9948;
          debug.75 = debug;
          if (debug.75 != 0) goto <D.9949>; else goto <D.9950>;
          <D.9949>:
          outfile.71 = outfile;
          D.9951 = (int) ev;
          D.9952 = gc_event_name (D.9951);
          D.9953 = thread->thread_id;
          fprintf (outfile.71, "gc event for gen%d: %s at %llu (thread: 0x%x)\n", gen, D.9952, time_base, D.9953);
          <D.9950>:
          if (gen > 2) goto <D.9954>; else goto <D.9955>;
          <D.9954>:
          outfile.71 = outfile;
          fprintf (outfile.71, "incorrect gc gen: %d\n", gen);
          goto <D.8453>;
          <D.9955>:
          if (ev == 0) goto <D.9956>; else goto <D.9957>;
          <D.9956>:
          thread->gc_start_times[gen] = time_base;
          D.9958 = gc_info[gen].count;
          D.9959 = D.9958 + 1;
          gc_info[gen].count = D.9959;
          goto <D.9960>;
          <D.9957>:
          if (ev == 5) goto <D.9961>; else goto <D.9962>;
          <D.9961>:
          D.9963 = thread->gc_start_times[gen];
          tdiff = time_base - D.9963;
          D.9964 = gc_info[gen].total_time;
          D.9965 = D.9964 + tdiff;
          gc_info[gen].total_time = D.9965;
          D.9966 = gc_info[gen].max_time;
          if (D.9966 < tdiff) goto <D.9967>; else goto <D.9968>;
          <D.9967>:
          gc_info[gen].max_time = tdiff;
          <D.9968>:
          <D.9962>:
          <D.9960>:
        }
        goto <D.9969>;
        <D.9947>:
        if (subtype == 48) goto <D.9970>; else goto <D.9971>;
        <D.9970>:
        {
          int j;
          int num;

          p.70 = p;
          D.9972 = decode_uleb128 (p.70, &p);
          num = (int) D.9972;
          D.9973 = num / 2;
          D.9974 = (long long unsigned int) D.9973;
          gc_object_moves.86 = gc_object_moves;
          gc_object_moves.87 = D.9974 + gc_object_moves.86;
          gc_object_moves = gc_object_moves.87;
          j = 0;
          goto <D.8459>;
          <D.8458>:
          {
            intptr_t obj1diff;
            intptr_t obj2diff;

            p.70 = p;
            obj1diff = decode_sleb128 (p.70, &p);
            p.70 = p;
            obj2diff = decode_sleb128 (p.70, &p);
            num_tracked_objects.88 = num_tracked_objects;
            if (num_tracked_objects.88 != 0) goto <D.9978>; else goto <D.9979>;
            <D.9978>:
            D.9980 = obj_base + obj1diff;
            D.9981 = D.9980 << 3;
            D.9982 = (unsigned int) D.9981;
            D.9983 = obj_base + obj2diff;
            D.9984 = D.9983 << 3;
            D.9985 = (unsigned int) D.9984;
            track_move (D.9982, D.9985);
            <D.9979>:
            debug.75 = debug;
            if (debug.75 != 0) goto <D.9986>; else goto <D.9987>;
            <D.9986>:
            outfile.71 = outfile;
            D.9980 = obj_base + obj1diff;
            D.9981 = D.9980 << 3;
            D.9988 = (void *) D.9981;
            D.9983 = obj_base + obj2diff;
            D.9984 = D.9983 << 3;
            D.9989 = (void *) D.9984;
            fprintf (outfile.71, "moved obj %p to %p\n", D.9988, D.9989);
            <D.9987>:
          }
          j = j + 2;
          <D.8459>:
          if (j < num) goto <D.8458>; else goto <D.8460>;
          <D.8460>:
        }
        goto <D.9990>;
        <D.9971>:
        if (subtype == 64) goto <D.9991>; else goto <D.9992>;
        <D.9991>:
        {
          int htype;
          uint32_t handle;
          intptr_t objdiff;

          p.70 = p;
          D.9993 = decode_uleb128 (p.70, &p);
          htype = (int) D.9993;
          p.70 = p;
          D.9994 = decode_uleb128 (p.70, &p);
          handle = (uint32_t) D.9994;
          p.70 = p;
          objdiff = decode_sleb128 (p.70, &p);
          if (htype > 3) goto <D.9995>; else goto <D.9996>;
          <D.9995>:
          D.9875 = 0;
          return D.9875;
          <D.9996>:
          D.9997 = handle_info[htype].created;
          D.9998 = D.9997 + 1;
          handle_info[htype].created = D.9998;
          D.9999 = handle_info[htype].live;
          D.10000 = D.9999 + 1;
          handle_info[htype].live = D.10000;
          D.10001 = &handle_info[htype].traces;
          add_trace_thread (thread, D.10001, 1);
          D.9999 = handle_info[htype].live;
          D.10002 = handle_info[htype].max_live;
          if (D.9999 > D.10002) goto <D.10003>; else goto <D.10004>;
          <D.10003>:
          D.9999 = handle_info[htype].live;
          handle_info[htype].max_live = D.9999;
          <D.10004>:
          num_tracked_objects.88 = num_tracked_objects;
          if (num_tracked_objects.88 != 0) goto <D.10005>; else goto <D.10006>;
          <D.10005>:
          D.10007 = obj_base + objdiff;
          D.10008 = D.10007 << 3;
          D.10009 = (unsigned int) D.10008;
          track_handle (D.10009, htype, handle);
          <D.10006>:
          debug.75 = debug;
          if (debug.75 != 0) goto <D.10010>; else goto <D.10011>;
          <D.10010>:
          outfile.71 = outfile;
          D.10012 = get_handle_name (htype);
          D.10007 = obj_base + objdiff;
          D.10008 = D.10007 << 3;
          D.10013 = (void *) D.10008;
          fprintf (outfile.71, "handle (%s) %u created for object %p\n", D.10012, handle, D.10013);
          <D.10011>:
        }
        goto <D.10014>;
        <D.9992>:
        if (subtype == 80) goto <D.10015>; else goto <D.10016>;
        <D.10015>:
        {
          int htype;
          uint32_t handle;

          p.70 = p;
          D.10017 = decode_uleb128 (p.70, &p);
          htype = (int) D.10017;
          p.70 = p;
          D.10018 = decode_uleb128 (p.70, &p);
          handle = (uint32_t) D.10018;
          if (htype > 3) goto <D.10019>; else goto <D.10020>;
          <D.10019>:
          D.9875 = 0;
          return D.9875;
          <D.10020>:
          D.10021 = handle_info[htype].destroyed;
          D.10022 = D.10021 + 1;
          handle_info[htype].destroyed = D.10022;
          D.10023 = handle_info[htype].live;
          D.10024 = D.10023 + 18446744073709551615;
          handle_info[htype].live = D.10024;
          debug.75 = debug;
          if (debug.75 != 0) goto <D.10025>; else goto <D.10026>;
          <D.10025>:
          outfile.71 = outfile;
          D.10027 = get_handle_name (htype);
          fprintf (outfile.71, "handle (%s) %u destroyed\n", D.10027, handle);
          <D.10026>:
        }
        <D.10016>:
        <D.10014>:
        <D.9990>:
        <D.9969>:
        <D.9945>:
        goto <D.8453>;
      }
      <D.8466>:
      {
        int error;
        uint64_t tdiff;
        int mtype;
        intptr_t ptrdiff;

        p.70 = p;
        D.9932 = *p.70;
        D.9933 = (int) D.9932;
        error = D.9933 & 128;
        p.70 = p;
        D.9935 = p.70 + 1;
        tdiff = decode_uleb128 (D.9935, &p);
        p.70 = p;
        p.89 = p.70;
        p.90 = p.89 + 1;
        p = p.90;
        D.10030 = *p.89;
        mtype = (int) D.10030;
        p.70 = p;
        ptrdiff = decode_sleb128 (p.70, &p);
        time_base = time_base + tdiff;
        if (mtype == 1) goto <D.10031>; else goto <D.10032>;
        <D.10031>:
        {
          intptr_t imptrdiff;
          uint64_t flags;

          p.70 = p;
          imptrdiff = decode_sleb128 (p.70, &p);
          p.70 = p;
          flags = decode_uleb128 (p.70, &p);
          if (flags != 0) goto <D.10033>; else goto <D.10034>;
          <D.10033>:
          outfile.71 = outfile;
          fprintf (outfile.71, "non-zero flags in class\n");
          D.9875 = 0;
          return D.9875;
          <D.10034>:
          debug.75 = debug;
          if (debug.75 != 0) goto <D.10035>; else goto <D.10036>;
          <D.10035>:
          outfile.71 = outfile;
          D.10037 = ptr_base + ptrdiff;
          D.10038 = (void *) D.10037;
          p.70 = p;
          D.10039 = ptr_base + imptrdiff;
          D.10040 = (void *) D.10039;
          fprintf (outfile.71, "loaded class %p (%s in %p) at %llu\n", D.10038, p.70, D.10040, time_base);
          <D.10036>:
          if (error == 0) goto <D.10041>; else goto <D.10042>;
          <D.10041>:
          D.10037 = ptr_base + ptrdiff;
          p.70 = p;
          add_class (D.10037, p.70);
          <D.10042>:
          goto <D.8474>;
          <D.8473>:
          p.70 = p;
          p.91 = p.70 + 1;
          p = p.91;
          <D.8474>:
          p.70 = p;
          D.9932 = *p.70;
          if (D.9932 != 0) goto <D.8473>; else goto <D.8475>;
          <D.8475>:
          p.70 = p;
          p.91 = p.70 + 1;
          p = p.91;
        }
        goto <D.10044>;
        <D.10032>:
        if (mtype == 2) goto <D.10045>; else goto <D.10046>;
        <D.10045>:
        {
          uint64_t flags;

          p.70 = p;
          flags = decode_uleb128 (p.70, &p);
          if (flags != 0) goto <D.10047>; else goto <D.10048>;
          <D.10047>:
          outfile.71 = outfile;
          fprintf (outfile.71, "non-zero flags in image\n");
          D.9875 = 0;
          return D.9875;
          <D.10048>:
          debug.75 = debug;
          if (debug.75 != 0) goto <D.10049>; else goto <D.10050>;
          <D.10049>:
          outfile.71 = outfile;
          D.10037 = ptr_base + ptrdiff;
          D.10038 = (void *) D.10037;
          p.70 = p;
          fprintf (outfile.71, "loaded image %p (%s) at %llu\n", D.10038, p.70, time_base);
          <D.10050>:
          if (error == 0) goto <D.10051>; else goto <D.10052>;
          <D.10051>:
          D.10037 = ptr_base + ptrdiff;
          p.70 = p;
          add_image (D.10037, p.70);
          <D.10052>:
          goto <D.8478>;
          <D.8477>:
          p.70 = p;
          p.91 = p.70 + 1;
          p = p.91;
          <D.8478>:
          p.70 = p;
          D.9932 = *p.70;
          if (D.9932 != 0) goto <D.8477>; else goto <D.8479>;
          <D.8479>:
          p.70 = p;
          p.91 = p.70 + 1;
          p = p.91;
        }
        goto <D.10053>;
        <D.10046>:
        if (mtype == 5) goto <D.10054>; else goto <D.10055>;
        <D.10054>:
        {
          struct ThreadContext * nt;
          uint64_t flags;

          p.70 = p;
          flags = decode_uleb128 (p.70, &p);
          if (flags != 0) goto <D.10056>; else goto <D.10057>;
          <D.10056>:
          outfile.71 = outfile;
          fprintf (outfile.71, "non-zero flags in thread\n");
          D.9875 = 0;
          return D.9875;
          <D.10057>:
          D.10058 = ptr_base * ptrdiff;
          nt = get_thread (ctx, D.10058);
          p.70 = p;
          D.10059 = pstrdup (p.70);
          nt->name = D.10059;
          debug.75 = debug;
          if (debug.75 != 0) goto <D.10060>; else goto <D.10061>;
          <D.10060>:
          outfile.71 = outfile;
          D.10037 = ptr_base + ptrdiff;
          D.10038 = (void *) D.10037;
          p.70 = p;
          fprintf (outfile.71, "thread %p named: %s\n", D.10038, p.70);
          <D.10061>:
          goto <D.8483>;
          <D.8482>:
          p.70 = p;
          p.91 = p.70 + 1;
          p = p.91;
          <D.8483>:
          p.70 = p;
          D.9932 = *p.70;
          if (D.9932 != 0) goto <D.8482>; else goto <D.8484>;
          <D.8484>:
          p.70 = p;
          p.91 = p.70 + 1;
          p = p.91;
        }
        <D.10055>:
        <D.10053>:
        <D.10044>:
        goto <D.8453>;
      }
      <D.8485>:
      {
        int has_bt;
        uint64_t tdiff;
        intptr_t ptrdiff;
        intptr_t objdiff;
        uint64_t len;
        int num_bt;
        struct MethodDesc * sframes[8];
        struct MethodDesc * * frames;
        struct ClassDesc * cd;

        try
          {
            p.70 = p;
            D.9932 = *p.70;
            D.9933 = (int) D.9932;
            has_bt = D.9933 & 16;
            p.70 = p;
            D.9935 = p.70 + 1;
            tdiff = decode_uleb128 (D.9935, &p);
            p.70 = p;
            ptrdiff = decode_sleb128 (p.70, &p);
            p.70 = p;
            objdiff = decode_sleb128 (p.70, &p);
            num_bt = 0;
            frames = &sframes;
            D.10062 = ptr_base + ptrdiff;
            cd = lookup_class (D.10062);
            p.70 = p;
            len = decode_uleb128 (p.70, &p);
            time_base = time_base + tdiff;
            debug.75 = debug;
            if (debug.75 != 0) goto <D.10063>; else goto <D.10064>;
            <D.10063>:
            outfile.71 = outfile;
            D.10065 = obj_base + objdiff;
            D.10066 = D.10065 << 3;
            D.10067 = (void *) D.10066;
            D.10062 = ptr_base + ptrdiff;
            D.10068 = lookup_class (D.10062);
            D.10069 = D.10068->name;
            fprintf (outfile.71, "alloced object %p, size %llu (%s) at %llu\n", D.10067, len, D.10069, time_base);
            <D.10064>:
            if (has_bt != 0) goto <D.10070>; else goto <D.10071>;
            <D.10070>:
            num_bt = 8;
            p.70 = p;
            frames = decode_bt (&sframes, &num_bt, p.70, &p, ptr_base);
            if (frames == 0B) goto <D.10072>; else goto <D.10073>;
            <D.10072>:
            outfile.71 = outfile;
            fprintf (outfile.71, "Cannot load backtrace\n");
            D.9875 = 0;
            return D.9875;
            <D.10073>:
            <D.10071>:
            thread_filter.92 = thread_filter;
            if (thread_filter.92 != 0) goto <D.10078>; else goto <D.10074>;
            <D.10078>:
            D.9953 = thread->thread_id;
            D.10079 = (unsigned int) D.9953;
            thread_filter.92 = thread_filter;
            if (D.10079 == thread_filter.92) goto <D.10075>; else goto <D.10074>;
            <D.10074>:
            time_from.77 = time_from;
            if (time_base >= time_from.77) goto <D.10080>; else goto <D.10076>;
            <D.10080>:
            time_to.79 = time_to;
            if (time_base < time_to.79) goto <D.10075>; else goto <D.10076>;
            <D.10075>:
            {
              struct BackTrace * bt;

              D.10081 = cd->allocs;
              D.10082 = D.10081 + 1;
              cd->allocs = D.10082;
              D.10083 = cd->alloc_size;
              D.10084 = D.10083 + len;
              cd->alloc_size = D.10084;
              if (has_bt != 0) goto <D.10085>; else goto <D.10086>;
              <D.10085>:
              num_bt.93 = num_bt;
              D.10088 = &cd->traces;
              bt = add_trace_methods (frames, num_bt.93, D.10088, len);
              goto <D.10089>;
              <D.10086>:
              D.10088 = &cd->traces;
              bt = add_trace_thread (thread, D.10088, len);
              <D.10089>:
              find_size.94 = find_size;
              if (find_size.94 != 0) goto <D.10093>; else goto <D.10090>;
              <D.10093>:
              find_size.94 = find_size;
              if (len >= find_size.94) goto <D.10094>; else goto <D.10090>;
              <D.10094>:
              find_name.95 = find_name;
              if (find_name.95 == 0B) goto <D.10095>; else goto <D.10098>;
              <D.10098>:
              D.10099 = cd->name;
              find_name.95 = find_name;
              D.10100 = strstr (D.10099, find_name.95);
              if (D.10100 != 0B) goto <D.10095>; else goto <D.10096>;
              <D.10095>:
              D.10065 = obj_base + objdiff;
              D.10066 = D.10065 << 3;
              D.10101 = (unsigned int) D.10066;
              found_object (D.10101);
              <D.10096>:
              goto <D.10091>;
              <D.10090>:
              find_size.94 = find_size;
              if (find_size.94 == 0) goto <D.10102>; else goto <D.10103>;
              <D.10102>:
              find_name.95 = find_name;
              if (find_name.95 != 0B) goto <D.10104>; else goto <D.10105>;
              <D.10104>:
              D.10099 = cd->name;
              find_name.95 = find_name;
              D.10106 = strstr (D.10099, find_name.95);
              if (D.10106 != 0B) goto <D.10107>; else goto <D.10108>;
              <D.10107>:
              D.10065 = obj_base + objdiff;
              D.10066 = D.10065 << 3;
              D.10101 = (unsigned int) D.10066;
              found_object (D.10101);
              <D.10108>:
              <D.10105>:
              <D.10103>:
              <D.10091>:
              num_tracked_objects.88 = num_tracked_objects;
              if (num_tracked_objects.88 != 0) goto <D.10109>; else goto <D.10110>;
              <D.10109>:
              D.10065 = obj_base + objdiff;
              D.10066 = D.10065 << 3;
              D.10101 = (unsigned int) D.10066;
              tracked_creation (D.10101, cd, len, bt, time_base);
              <D.10110>:
            }
            <D.10076>:
            if (&sframes != frames) goto <D.10111>; else goto <D.10112>;
            <D.10111>:
            free (frames);
            <D.10112>:
            goto <D.8453>;
          }
        finally
          {
            num_bt = {CLOBBER};
            sframes = {CLOBBER};
          }
      }
      <D.8496>:
      {
        int subtype;
        uint64_t tdiff;
        int64_t ptrdiff;

        p.70 = p;
        D.9932 = *p.70;
        D.9933 = (int) D.9932;
        subtype = D.9933 & 240;
        p.70 = p;
        D.9935 = p.70 + 1;
        tdiff = decode_uleb128 (D.9935, &p);
        p.70 = p;
        D.10113 = decode_sleb128 (p.70, &p);
        ptrdiff = (int64_t) D.10113;
        time_base = time_base + tdiff;
        D.10114 = (unsigned int) ptrdiff;
        method_base.96 = (unsigned int) method_base;
        D.10116 = D.10114 + method_base.96;
        method_base = (intptr_t) D.10116;
        if (subtype == 64) goto <D.10117>; else goto <D.10118>;
        <D.10117>:
        {
          intptr_t codediff;
          int codelen;

          p.70 = p;
          codediff = decode_sleb128 (p.70, &p);
          p.70 = p;
          D.10119 = decode_uleb128 (p.70, &p);
          codelen = (int) D.10119;
          debug.75 = debug;
          if (debug.75 != 0) goto <D.10120>; else goto <D.10121>;
          <D.10120>:
          outfile.71 = outfile;
          method_base.97 = (void *) method_base;
          p.70 = p;
          D.10123 = ptr_base + codediff;
          D.10124 = (void *) D.10123;
          fprintf (outfile.71, "jitted method %p (%s), size: %d, code: %p\n", method_base.97, p.70, codelen, D.10124);
          <D.10121>:
          p.70 = p;
          D.10123 = ptr_base + codediff;
          add_method (method_base, p.70, D.10123, codelen);
          goto <D.8503>;
          <D.8502>:
          p.70 = p;
          p.91 = p.70 + 1;
          p = p.91;
          <D.8503>:
          p.70 = p;
          D.9932 = *p.70;
          if (D.9932 != 0) goto <D.8502>; else goto <D.8504>;
          <D.8504>:
          p.70 = p;
          p.91 = p.70 + 1;
          p = p.91;
        }
        goto <D.10125>;
        <D.10118>:
        {
          struct MethodDesc * method;

          thread_filter.92 = thread_filter;
          if (thread_filter.92 != 0) goto <D.10126>; else goto <D.10127>;
          <D.10126>:
          D.9953 = thread->thread_id;
          D.10079 = (unsigned int) D.9953;
          thread_filter.92 = thread_filter;
          if (D.10079 != thread_filter.92) goto <D.8453>; else goto <D.10128>;
          <D.10128>:
          <D.10127>:
          method = lookup_method (method_base);
          if (subtype == 32) goto <D.10129>; else goto <D.10130>;
          <D.10129>:
          D.10131 = &method->traces;
          add_trace_thread (thread, D.10131, 1);
          push_method (thread, method, time_base);
          goto <D.10132>;
          <D.10130>:
          pop_method (thread, method, time_base);
          <D.10132>:
          debug.75 = debug;
          if (debug.75 != 0) goto <D.10133>; else goto <D.10134>;
          <D.10133>:
          outfile.71 = outfile;
          if (subtype != 32) goto <D.10136>; else goto <D.10137>;
          <D.10136>:
          if (subtype == 48) goto <D.10139>; else goto <D.10140>;
          <D.10139>:
          iftmp.99 = "exleave";
          goto <D.10141>;
          <D.10140>:
          iftmp.99 = "leave";
          <D.10141>:
          iftmp.98 = iftmp.99;
          goto <D.10142>;
          <D.10137>:
          iftmp.98 = "enter";
          <D.10142>:
          D.10143 = method->name;
          fprintf (outfile.71, "%s method %s\n", iftmp.98, D.10143);
          <D.10134>:
        }
        <D.10125>:
        goto <D.8453>;
      }
      <D.8506>:
      {
        int subtype;

        p.70 = p;
        D.9932 = *p.70;
        D.9933 = (int) D.9932;
        subtype = D.9933 & 240;
        if (subtype == 32) goto <D.10144>; else goto <D.10145>;
        <D.10144>:
        {
          struct HeapObjectDesc * ho;
          int i;
          intptr_t objdiff;
          intptr_t ptrdiff;
          uint64_t size;
          uintptr_t num;
          uintptr_t ref_offset;
          uintptr_t last_obj_offset;
          struct ClassDesc * cd;

          try
            {
              p.70 = p;
              D.9935 = p.70 + 1;
              objdiff = decode_sleb128 (D.9935, &p);
              p.70 = p;
              ptrdiff = decode_sleb128 (p.70, &p);
              p.70 = p;
              size = decode_uleb128 (p.70, &p);
              p.70 = p;
              D.10146 = decode_uleb128 (p.70, &p);
              num = (uintptr_t) D.10146;
              last_obj_offset = 0;
              D.10147 = ptr_base + ptrdiff;
              cd = lookup_class (D.10147);
              if (size != 0) goto <D.10148>; else goto <D.10149>;
              <D.10148>:
              {
                struct HeapClassDesc * hcd;

                D.10150 = thread->current_heap_shot;
                hcd = add_heap_shot_class (D.10150, cd, size);
                collect_traces.100 = collect_traces;
                if (collect_traces.100 != 0) goto <D.10152>; else goto <D.10153>;
                <D.10152>:
                D.10154 = obj_base + objdiff;
                D.10155 = D.10154 << 3;
                D.10156 = (unsigned int) D.10155;
                ho = alloc_heap_obj (D.10156, hcd, num);
                D.10150 = thread->current_heap_shot;
                add_heap_shot_obj (D.10150, ho);
                ref_offset = 0;
                <D.10153>:
              }
              goto <D.10157>;
              <D.10149>:
              collect_traces.100 = collect_traces;
              if (collect_traces.100 != 0) goto <D.10158>; else goto <D.10159>;
              <D.10158>:
              D.10150 = thread->current_heap_shot;
              D.10154 = obj_base + objdiff;
              D.10155 = D.10154 << 3;
              D.10156 = (unsigned int) D.10155;
              ho = heap_shot_obj_add_refs (D.10150, D.10156, num, &ref_offset);
              <D.10159>:
              <D.10157>:
              i = 0;
              goto <D.8521>;
              <D.8520>:
              {
                uintptr_t offset;
                intptr_t obj1diff;

                D.10161 = ctx->data_version;
                if (D.10161 > 1) goto <D.10162>; else goto <D.10163>;
                <D.10162>:
                p.70 = p;
                D.10164 = decode_uleb128 (p.70, &p);
                D.10165 = (unsigned int) D.10164;
                iftmp.101 = D.10165 + last_obj_offset;
                goto <D.10166>;
                <D.10163>:
                iftmp.101 = 4294967295;
                <D.10166>:
                offset = iftmp.101;
                p.70 = p;
                obj1diff = decode_sleb128 (p.70, &p);
                last_obj_offset = offset;
                collect_traces.100 = collect_traces;
                if (collect_traces.100 != 0) goto <D.10167>; else goto <D.10168>;
                <D.10167>:
                ref_offset.102 = ref_offset;
                i.103 = (unsigned int) i;
                D.10171 = ref_offset.102 + i.103;
                D.10172 = obj_base + obj1diff;
                D.10173 = D.10172 << 3;
                D.10174 = (unsigned int) D.10173;
                ho->refs[D.10171] = D.10174;
                <D.10168>:
                num_tracked_objects.88 = num_tracked_objects;
                if (num_tracked_objects.88 != 0) goto <D.10175>; else goto <D.10176>;
                <D.10175>:
                D.10172 = obj_base + obj1diff;
                D.10173 = D.10172 << 3;
                D.10174 = (unsigned int) D.10173;
                D.10154 = obj_base + objdiff;
                D.10155 = D.10154 << 3;
                D.10156 = (unsigned int) D.10155;
                track_obj_reference (D.10174, D.10156, cd);
                <D.10176>:
              }
              i = i + 1;
              <D.8521>:
              i.103 = (unsigned int) i;
              if (i.103 < num) goto <D.8520>; else goto <D.8522>;
              <D.8522>:
              debug.75 = debug;
              if (debug.75 != 0) goto <D.10177>; else goto <D.10178>;
              <D.10177>:
              if (size != 0) goto <D.10179>; else goto <D.10180>;
              <D.10179>:
              outfile.71 = outfile;
              D.10154 = obj_base + objdiff;
              D.10155 = D.10154 << 3;
              D.10181 = (void *) D.10155;
              D.10182 = cd->name;
              fprintf (outfile.71, "traced object %p, size %llu (%s), refs: %d\n", D.10181, size, D.10182, num);
              <D.10180>:
              <D.10178>:
            }
          finally
            {
              ref_offset = {CLOBBER};
            }
        }
        goto <D.10183>;
        <D.10145>:
        if (subtype == 48) goto <D.10184>; else goto <D.10185>;
        <D.10184>:
        {
          uintptr_t num;
          uintptr_t gc_num;
          int i;

          p.70 = p;
          D.9935 = p.70 + 1;
          D.10186 = decode_uleb128 (D.9935, &p);
          num = (uintptr_t) D.10186;
          p.70 = p;
          D.10187 = decode_uleb128 (p.70, &p);
          gc_num = (uintptr_t) D.10187;
          i = 0;
          goto <D.8530>;
          <D.8529>:
          {
            intptr_t objdiff;
            int root_type;
            uintptr_t extra_info;

            p.70 = p;
            objdiff = decode_sleb128 (p.70, &p);
            p.70 = p;
            D.10188 = decode_uleb128 (p.70, &p);
            root_type = (int) D.10188;
            p.70 = p;
            D.10189 = decode_uleb128 (p.70, &p);
            extra_info = (uintptr_t) D.10189;
            debug.75 = debug;
            if (debug.75 != 0) goto <D.10190>; else goto <D.10191>;
            <D.10190>:
            outfile.71 = outfile;
            D.10192 = obj_base + objdiff;
            D.10193 = D.10192 << 3;
            D.10194 = (void *) D.10193;
            D.10195 = get_root_name (root_type);
            fprintf (outfile.71, "object %p is a %s root\n", D.10194, D.10195);
            <D.10191>:
            collect_traces.100 = collect_traces;
            if (collect_traces.100 != 0) goto <D.10196>; else goto <D.10197>;
            <D.10196>:
            D.10192 = obj_base + objdiff;
            D.10193 = D.10192 << 3;
            D.10198 = (unsigned int) D.10193;
            thread_add_root (thread, D.10198, root_type, extra_info);
            <D.10197>:
          }
          i = i + 1;
          <D.8530>:
          i.104 = (unsigned int) i;
          if (i.104 < num) goto <D.8529>; else goto <D.8531>;
          <D.8531>:
        }
        goto <D.10200>;
        <D.10185>:
        if (subtype == 16) goto <D.10201>; else goto <D.10202>;
        <D.10201>:
        {
          uint64_t tdiff;

          p.70 = p;
          D.9935 = p.70 + 1;
          tdiff = decode_uleb128 (D.9935, &p);
          time_base = time_base + tdiff;
          debug.75 = debug;
          if (debug.75 != 0) goto <D.10203>; else goto <D.10204>;
          <D.10203>:
          outfile.71 = outfile;
          fprintf (outfile.71, "heap shot end\n");
          <D.10204>:
          collect_traces.100 = collect_traces;
          if (collect_traces.100 != 0) goto <D.10205>; else goto <D.10206>;
          <D.10205>:
          {
            struct HeapShot * hs;

            hs = thread->current_heap_shot;
            if (hs != 0B) goto <D.10209>; else goto <D.10207>;
            <D.10209>:
            D.10210 = thread->num_roots;
            if (D.10210 != 0) goto <D.10211>; else goto <D.10207>;
            <D.10211>:
            D.10210 = thread->num_roots;
            hs->num_roots = D.10210;
            D.10212 = thread->roots;
            hs->roots = D.10212;
            D.10213 = thread->roots_extra;
            hs->roots_extra = D.10213;
            D.10214 = thread->roots_types;
            hs->roots_types = D.10214;
            goto <D.10208>;
            <D.10207>:
            D.10212 = thread->roots;
            free (D.10212);
            D.10213 = thread->roots_extra;
            free (D.10213);
            D.10214 = thread->roots_types;
            free (D.10214);
            <D.10208>:
            thread->num_roots = 0;
            thread->size_roots = 0;
            thread->roots = 0B;
            thread->roots_extra = 0B;
            thread->roots_types = 0B;
            heap_shot_resolve_reverse_refs (hs);
            heap_shot_mark_objects (hs);
            heap_shot_free_objects (hs);
          }
          <D.10206>:
          thread->current_heap_shot = 0B;
        }
        goto <D.10215>;
        <D.10202>:
        if (subtype == 0) goto <D.10216>; else goto <D.10217>;
        <D.10216>:
        {
          uint64_t tdiff;

          p.70 = p;
          D.9935 = p.70 + 1;
          tdiff = decode_uleb128 (D.9935, &p);
          time_base = time_base + tdiff;
          debug.75 = debug;
          if (debug.75 != 0) goto <D.10218>; else goto <D.10219>;
          <D.10218>:
          outfile.71 = outfile;
          fprintf (outfile.71, "heap shot start\n");
          <D.10219>:
          D.10220 = new_heap_shot (time_base);
          thread->current_heap_shot = D.10220;
        }
        <D.10217>:
        <D.10215>:
        <D.10200>:
        <D.10183>:
        goto <D.8453>;
      }
      <D.8535>:
      {
        int event;
        int has_bt;
        uint64_t tdiff;
        intptr_t objdiff;
        struct MethodDesc * sframes[8];
        struct MethodDesc * * frames;
        int record;
        int num_bt;

        try
          {
            p.70 = p;
            D.9932 = *p.70;
            D.10221 = D.9932 >> 4;
            D.10222 = (int) D.10221;
            event = D.10222 & 3;
            p.70 = p;
            D.9932 = *p.70;
            D.9933 = (int) D.9932;
            has_bt = D.9933 & 128;
            p.70 = p;
            D.9935 = p.70 + 1;
            tdiff = decode_uleb128 (D.9935, &p);
            p.70 = p;
            objdiff = decode_sleb128 (p.70, &p);
            frames = &sframes;
            num_bt = 0;
            time_base = time_base + tdiff;
            thread_filter.92 = thread_filter;
            if (thread_filter.92 == 0) goto <D.10224>; else goto <D.10227>;
            <D.10227>:
            D.9953 = thread->thread_id;
            D.10079 = (unsigned int) D.9953;
            thread_filter.92 = thread_filter;
            if (D.10079 == thread_filter.92) goto <D.10224>; else goto <D.10225>;
            <D.10224>:
            iftmp.105 = 1;
            goto <D.10226>;
            <D.10225>:
            iftmp.105 = 0;
            <D.10226>:
            record = iftmp.105;
            if (event == 1) goto <D.10228>; else goto <D.10229>;
            <D.10228>:
            {
              struct MonitorDesc * mdesc;

              D.10230 = obj_base + objdiff;
              D.10231 = D.10230 << 3;
              D.10232 = (unsigned int) D.10231;
              mdesc = lookup_monitor (D.10232);
              if (record != 0) goto <D.10233>; else goto <D.10234>;
              <D.10233>:
              monitor_contention.106 = monitor_contention;
              monitor_contention.107 = monitor_contention.106 + 1;
              monitor_contention = monitor_contention.107;
              D.10237 = mdesc->contentions;
              D.10238 = D.10237 + 1;
              mdesc->contentions = D.10238;
              thread->monitor = mdesc;
              thread->contention_start = time_base;
              <D.10234>:
              if (has_bt != 0) goto <D.10239>; else goto <D.10240>;
              <D.10239>:
              num_bt = 8;
              p.70 = p;
              frames = decode_bt (&sframes, &num_bt, p.70, &p, ptr_base);
              if (frames == 0B) goto <D.10241>; else goto <D.10242>;
              <D.10241>:
              outfile.71 = outfile;
              fprintf (outfile.71, "Cannot load backtrace\n");
              D.9875 = 0;
              return D.9875;
              <D.10242>:
              if (record != 0) goto <D.10243>; else goto <D.10244>;
              <D.10243>:
              num_bt.108 = num_bt;
              D.10246 = &mdesc->traces;
              add_trace_methods (frames, num_bt.108, D.10246, 1);
              <D.10244>:
              goto <D.10247>;
              <D.10240>:
              if (record != 0) goto <D.10248>; else goto <D.10249>;
              <D.10248>:
              D.10246 = &mdesc->traces;
              add_trace_thread (thread, D.10246, 1);
              <D.10249>:
              <D.10247>:
            }
            goto <D.10250>;
            <D.10229>:
            if (event == 3) goto <D.10251>; else goto <D.10252>;
            <D.10251>:
            if (record != 0) goto <D.10253>; else goto <D.10254>;
            <D.10253>:
            monitor_failed.109 = monitor_failed;
            monitor_failed.110 = monitor_failed.109 + 1;
            monitor_failed = monitor_failed.110;
            D.10257 = thread->monitor;
            if (D.10257 != 0B) goto <D.10258>; else goto <D.10259>;
            <D.10258>:
            D.10260 = thread->contention_start;
            if (D.10260 != 0) goto <D.10261>; else goto <D.10262>;
            <D.10261>:
            {
              uint64_t wait_time;

              D.10260 = thread->contention_start;
              wait_time = time_base - D.10260;
              D.10257 = thread->monitor;
              D.10263 = D.10257->max_wait_time;
              if (D.10263 < wait_time) goto <D.10264>; else goto <D.10265>;
              <D.10264>:
              D.10257 = thread->monitor;
              D.10257->max_wait_time = wait_time;
              <D.10265>:
              D.10257 = thread->monitor;
              D.10257 = thread->monitor;
              D.10266 = D.10257->wait_time;
              D.10267 = D.10266 + wait_time;
              D.10257->wait_time = D.10267;
              thread->monitor = 0B;
              thread->contention_start = 0;
            }
            <D.10262>:
            <D.10259>:
            <D.10254>:
            goto <D.10268>;
            <D.10252>:
            if (event == 2) goto <D.10269>; else goto <D.10270>;
            <D.10269>:
            if (record != 0) goto <D.10271>; else goto <D.10272>;
            <D.10271>:
            monitor_acquired.111 = monitor_acquired;
            monitor_acquired.112 = monitor_acquired.111 + 1;
            monitor_acquired = monitor_acquired.112;
            D.10257 = thread->monitor;
            if (D.10257 != 0B) goto <D.10275>; else goto <D.10276>;
            <D.10275>:
            D.10260 = thread->contention_start;
            if (D.10260 != 0) goto <D.10277>; else goto <D.10278>;
            <D.10277>:
            {
              uint64_t wait_time;

              D.10260 = thread->contention_start;
              wait_time = time_base - D.10260;
              D.10257 = thread->monitor;
              D.10263 = D.10257->max_wait_time;
              if (D.10263 < wait_time) goto <D.10279>; else goto <D.10280>;
              <D.10279>:
              D.10257 = thread->monitor;
              D.10257->max_wait_time = wait_time;
              <D.10280>:
              D.10257 = thread->monitor;
              D.10257 = thread->monitor;
              D.10266 = D.10257->wait_time;
              D.10281 = D.10266 + wait_time;
              D.10257->wait_time = D.10281;
              thread->monitor = 0B;
              thread->contention_start = 0;
            }
            <D.10278>:
            <D.10276>:
            <D.10272>:
            <D.10270>:
            <D.10268>:
            <D.10250>:
            debug.75 = debug;
            if (debug.75 != 0) goto <D.10282>; else goto <D.10283>;
            <D.10282>:
            outfile.71 = outfile;
            D.10284 = monitor_ev_name (event);
            D.10230 = obj_base + objdiff;
            D.10231 = D.10230 << 3;
            D.10285 = (void *) D.10231;
            fprintf (outfile.71, "monitor %s for object %p\n", D.10284, D.10285);
            <D.10283>:
            if (&sframes != frames) goto <D.10286>; else goto <D.10287>;
            <D.10286>:
            free (frames);
            <D.10287>:
            goto <D.8453>;
          }
        finally
          {
            sframes = {CLOBBER};
            num_bt = {CLOBBER};
          }
      }
      <D.8547>:
      {
        int subtype;
        int has_bt;
        uint64_t tdiff;
        struct MethodDesc * sframes[8];
        struct MethodDesc * * frames;
        int record;

        try
          {
            p.70 = p;
            D.9932 = *p.70;
            D.9933 = (int) D.9932;
            subtype = D.9933 & 112;
            p.70 = p;
            D.9932 = *p.70;
            D.9933 = (int) D.9932;
            has_bt.113 = D.9933 & 128;
            has_bt = has_bt.113;
            p.70 = p;
            D.9935 = p.70 + 1;
            tdiff = decode_uleb128 (D.9935, &p);
            frames = &sframes;
            time_base = time_base + tdiff;
            thread_filter.92 = thread_filter;
            if (thread_filter.92 == 0) goto <D.10290>; else goto <D.10293>;
            <D.10293>:
            D.9953 = thread->thread_id;
            D.10079 = (unsigned int) D.9953;
            thread_filter.92 = thread_filter;
            if (D.10079 == thread_filter.92) goto <D.10290>; else goto <D.10291>;
            <D.10290>:
            iftmp.114 = 1;
            goto <D.10292>;
            <D.10291>:
            iftmp.114 = 0;
            <D.10292>:
            record = iftmp.114;
            if (subtype == 16) goto <D.10294>; else goto <D.10295>;
            <D.10294>:
            {
              int clause_type;
              int clause_num;
              int64_t ptrdiff;

              p.70 = p;
              D.10296 = decode_uleb128 (p.70, &p);
              clause_type = (int) D.10296;
              p.70 = p;
              D.10297 = decode_uleb128 (p.70, &p);
              clause_num = (int) D.10297;
              p.70 = p;
              D.10298 = decode_sleb128 (p.70, &p);
              ptrdiff = (int64_t) D.10298;
              D.10299 = (unsigned int) ptrdiff;
              method_base.96 = (unsigned int) method_base;
              D.10300 = D.10299 + method_base.96;
              method_base = (intptr_t) D.10300;
              if (record != 0) goto <D.10301>; else goto <D.10302>;
              <D.10301>:
              D.10303 = clause_summary[clause_type];
              D.10304 = D.10303 + 1;
              clause_summary[clause_type] = D.10304;
              <D.10302>:
              debug.75 = debug;
              if (debug.75 != 0) goto <D.10305>; else goto <D.10306>;
              <D.10305>:
              outfile.71 = outfile;
              D.10307 = clause_name (clause_type);
              D.10308 = lookup_method (method_base);
              D.10309 = D.10308->name;
              fprintf (outfile.71, "clause %s (%d) in method %s\n", D.10307, clause_num, D.10309);
              <D.10306>:
            }
            goto <D.10310>;
            <D.10295>:
            {
              intptr_t objdiff;

              p.70 = p;
              objdiff = decode_sleb128 (p.70, &p);
              if (record != 0) goto <D.10311>; else goto <D.10312>;
              <D.10311>:
              throw_count.115 = throw_count;
              throw_count.116 = throw_count.115 + 1;
              throw_count = throw_count.116;
              <D.10312>:
              has_bt.117 = has_bt;
              if (has_bt.117 != 0) goto <D.10316>; else goto <D.10317>;
              <D.10316>:
              has_bt = 8;
              p.70 = p;
              frames = decode_bt (&sframes, &has_bt, p.70, &p, ptr_base);
              if (frames == 0B) goto <D.10318>; else goto <D.10319>;
              <D.10318>:
              outfile.71 = outfile;
              fprintf (outfile.71, "Cannot load backtrace\n");
              D.9875 = 0;
              return D.9875;
              <D.10319>:
              if (record != 0) goto <D.10320>; else goto <D.10321>;
              <D.10320>:
              has_bt.117 = has_bt;
              add_trace_methods (frames, has_bt.117, &exc_traces, 1);
              <D.10321>:
              goto <D.10322>;
              <D.10317>:
              if (record != 0) goto <D.10323>; else goto <D.10324>;
              <D.10323>:
              add_trace_thread (thread, &exc_traces, 1);
              <D.10324>:
              <D.10322>:
              if (&sframes != frames) goto <D.10325>; else goto <D.10326>;
              <D.10325>:
              free (frames);
              <D.10326>:
              debug.75 = debug;
              if (debug.75 != 0) goto <D.10327>; else goto <D.10328>;
              <D.10327>:
              outfile.71 = outfile;
              D.10329 = obj_base + objdiff;
              D.10330 = D.10329 << 3;
              D.10331 = (void *) D.10330;
              fprintf (outfile.71, "throw %p\n", D.10331);
              <D.10328>:
            }
            <D.10310>:
            goto <D.8453>;
          }
        finally
          {
            has_bt = {CLOBBER};
            sframes = {CLOBBER};
          }
      }
      <D.8558>:
      {
        int subtype;

        p.70 = p;
        D.9932 = *p.70;
        D.9933 = (int) D.9932;
        subtype = D.9933 & 240;
        if (subtype == 0) goto <D.10332>; else goto <D.10333>;
        <D.10332>:
        {
          int i;
          int sample_type;
          uint64_t tstamp;
          int count;

          p.70 = p;
          D.9935 = p.70 + 1;
          D.10334 = decode_uleb128 (D.9935, &p);
          sample_type = (int) D.10334;
          p.70 = p;
          tstamp = decode_uleb128 (p.70, &p);
          p.70 = p;
          D.10335 = decode_uleb128 (p.70, &p);
          count = (int) D.10335;
          i = 0;
          goto <D.8566>;
          <D.8565>:
          {
            uintptr_t ip;

            p.70 = p;
            D.10336 = decode_sleb128 (p.70, &p);
            D.10337 = D.10336 + ptr_base;
            ip = (uintptr_t) D.10337;
            add_stat_sample (sample_type, ip);
            debug.75 = debug;
            if (debug.75 != 0) goto <D.10338>; else goto <D.10339>;
            <D.10338>:
            outfile.71 = outfile;
            ip.118 = (void *) ip;
            fprintf (outfile.71, "sample hit, type: %d at %p\n", sample_type, ip.118);
            <D.10339>:
          }
          i = i + 1;
          <D.8566>:
          if (i < count) goto <D.8565>; else goto <D.8567>;
          <D.8567>:
        }
        goto <D.10341>;
        <D.10333>:
        if (subtype == 16) goto <D.10342>; else goto <D.10343>;
        <D.10342>:
        {
          uintptr_t addr;
          uintptr_t size;
          char * name;

          p.70 = p;
          D.9935 = p.70 + 1;
          D.10344 = decode_sleb128 (D.9935, &p);
          D.10345 = D.10344 + ptr_base;
          addr = (uintptr_t) D.10345;
          p.70 = p;
          D.10346 = decode_uleb128 (p.70, &p);
          size = (uintptr_t) D.10346;
          p.70 = p;
          name = pstrdup (p.70);
          add_unmanaged_symbol (addr, name, size);
          debug.75 = debug;
          if (debug.75 != 0) goto <D.10347>; else goto <D.10348>;
          <D.10347>:
          outfile.71 = outfile;
          addr.119 = (void *) addr;
          fprintf (outfile.71, "unmanaged symbol %s at %p\n", name, addr.119);
          <D.10348>:
          goto <D.8572>;
          <D.8571>:
          p.70 = p;
          p.91 = p.70 + 1;
          p = p.91;
          <D.8572>:
          p.70 = p;
          D.9932 = *p.70;
          if (D.9932 != 0) goto <D.8571>; else goto <D.8573>;
          <D.8573>:
          p.70 = p;
          p.91 = p.70 + 1;
          p = p.91;
        }
        goto <D.10350>;
        <D.10343>:
        if (subtype == 32) goto <D.10351>; else goto <D.10352>;
        <D.10351>:
        {
          uint64_t tdiff;
          uintptr_t addr;
          uint64_t offset;
          uintptr_t size;
          char * name;

          p.70 = p;
          D.9935 = p.70 + 1;
          tdiff = decode_uleb128 (D.9935, &p);
          p.70 = p;
          D.10353 = decode_sleb128 (p.70, &p);
          addr = (uintptr_t) D.10353;
          p.70 = p;
          offset = decode_uleb128 (p.70, &p);
          p.70 = p;
          D.10354 = decode_uleb128 (p.70, &p);
          size = (uintptr_t) D.10354;
          time_base = time_base + tdiff;
          p.70 = p;
          name = pstrdup (p.70);
          add_unmanaged_binary (addr, name, size);
          debug.75 = debug;
          if (debug.75 != 0) goto <D.10355>; else goto <D.10356>;
          <D.10355>:
          outfile.71 = outfile;
          addr.120 = (void *) addr;
          fprintf (outfile.71, "unmanaged binary %s at %p\n", name, addr.120);
          <D.10356>:
          goto <D.8580>;
          <D.8579>:
          p.70 = p;
          p.91 = p.70 + 1;
          p = p.91;
          <D.8580>:
          p.70 = p;
          D.9932 = *p.70;
          if (D.9932 != 0) goto <D.8579>; else goto <D.8581>;
          <D.8581>:
          p.70 = p;
          p.91 = p.70 + 1;
          p = p.91;
        }
        goto <D.10358>;
        <D.10352>:
        D.9875 = 0;
        return D.9875;
        <D.10358>:
        <D.10350>:
        <D.10341>:
        goto <D.8453>;
      }
      <D.8582>:
      outfile.71 = outfile;
      p.70 = p;
      D.9932 = *p.70;
      D.9933 = (int) D.9932;
      p.70 = p;
      p.121 = (int) p.70;
      p.69 = ctx->buf;
      p.122 = (int) p.69;
      D.10361 = p.121 - p.122;
      fprintf (outfile.71, "unhandled profiler event: 0x%x at file offset: %llu + %d (len: %d\n)\n", D.9933, file_offset, D.10361, len);
      exit (1);
      <D.8453>:
      <D.8584>:
      p.70 = p;
      if (p.70 < end) goto <D.8583>; else goto <D.8585>;
      <D.8585>:
      thread->last_time = time_base;
      i = 0;
      goto <D.8587>;
      <D.8586>:
      D.9923 = thread->stack;
      i.81 = (unsigned int) i;
      D.9925 = i.81 * 4;
      D.9926 = D.9923 + D.9925;
      D.9927 = *D.9926;
      D.9927->recurse_count = 0;
      i = i + 1;
      <D.8587>:
      D.9930 = thread->stack_id;
      if (D.9930 > i) goto <D.8586>; else goto <D.8588>;
      <D.8588>:
      D.9875 = 1;
      return D.9875;
    }
  finally
    {
      p = {CLOBBER};
    }
}


load_thread (struct ProfContext * ctx, intptr_t thread_id)
{
  struct ThreadContext * D.10470;
  struct ThreadContext * thread;

  thread = get_thread (ctx, thread_id);
  ctx->current = thread;
  D.10470 = thread;
  return D.10470;
}


gc_event_name (int ev)
{
  const char * D.10473;

  switch (ev) <default: <D.8312>, case 0: <D.8302>, case 1: <D.8303>, case 2: <D.8304>, case 3: <D.8305>, case 4: <D.8306>, case 5: <D.8307>, case 6: <D.8308>, case 7: <D.8309>, case 8: <D.8310>, case 9: <D.8311>>
  <D.8302>:
  D.10473 = "start";
  return D.10473;
  <D.8303>:
  D.10473 = "mark start";
  return D.10473;
  <D.8304>:
  D.10473 = "mark end";
  return D.10473;
  <D.8305>:
  D.10473 = "reclaim start";
  return D.10473;
  <D.8306>:
  D.10473 = "reclaim end";
  return D.10473;
  <D.8307>:
  D.10473 = "end";
  return D.10473;
  <D.8308>:
  D.10473 = "pre stop";
  return D.10473;
  <D.8309>:
  D.10473 = "post stop";
  return D.10473;
  <D.8310>:
  D.10473 = "pre start";
  return D.10473;
  <D.8311>:
  D.10473 = "post start";
  return D.10473;
  <D.8312>:
  D.10473 = "unknown";
  return D.10473;
}


track_move (uintptr_t src, uintptr_t dst)
{
  uintptr_t * tracked_objects.123;
  unsigned int i.124;
  unsigned int D.10477;
  uintptr_t * D.10478;
  unsigned int D.10479;
  struct FILE * outfile.125;
  void * src.126;
  void * dst.127;
  int num_tracked_objects.128;
  int i;

  i = 0;
  goto <D.8413>;
  <D.8412>:
  tracked_objects.123 = tracked_objects;
  i.124 = (unsigned int) i;
  D.10477 = i.124 * 4;
  D.10478 = tracked_objects.123 + D.10477;
  D.10479 = *D.10478;
  if (D.10479 == src) goto <D.10480>; else goto <D.10481>;
  <D.10480>:
  outfile.125 = outfile;
  src.126 = (void *) src;
  dst.127 = (void *) dst;
  fprintf (outfile.125, "Object %p moved to %p\n", src.126, dst.127);
  goto <D.10485>;
  <D.10481>:
  tracked_objects.123 = tracked_objects;
  i.124 = (unsigned int) i;
  D.10477 = i.124 * 4;
  D.10478 = tracked_objects.123 + D.10477;
  D.10479 = *D.10478;
  if (D.10479 == dst) goto <D.10486>; else goto <D.10487>;
  <D.10486>:
  outfile.125 = outfile;
  dst.127 = (void *) dst;
  src.126 = (void *) src;
  fprintf (outfile.125, "Object %p moved from %p\n", dst.127, src.126);
  <D.10487>:
  <D.10485>:
  i = i + 1;
  <D.8413>:
  num_tracked_objects.128 = num_tracked_objects;
  if (i < num_tracked_objects.128) goto <D.8412>; else goto <D.8414>;
  <D.8414>:
}


track_handle (uintptr_t obj, int htype, uint32_t handle)
{
  uintptr_t * tracked_objects.129;
  unsigned int i.130;
  unsigned int D.10491;
  uintptr_t * D.10492;
  unsigned int D.10493;
  struct FILE * outfile.131;
  void * obj.132;
  int num_tracked_objects.133;
  int i;

  i = 0;
  goto <D.8405>;
  <D.8404>:
  tracked_objects.129 = tracked_objects;
  i.130 = (unsigned int) i;
  D.10491 = i.130 * 4;
  D.10492 = tracked_objects.129 + D.10491;
  D.10493 = *D.10492;
  if (D.10493 == obj) goto <D.10494>; else goto <D.10495>;
  <D.10494>:
  outfile.131 = outfile;
  obj.132 = (void *) obj;
  fprintf (outfile.131, "Object %p referenced from handle %u\n", obj.132, handle);
  <D.10495>:
  i = i + 1;
  <D.8405>:
  num_tracked_objects.133 = num_tracked_objects;
  if (i < num_tracked_objects.133) goto <D.8404>; else goto <D.8406>;
  <D.8406>:
}


get_handle_name (int htype)
{
  const char * D.10499;

  switch (htype) <default: <D.8357>, case 0: <D.8353>, case 1: <D.8354>, case 2: <D.8355>, case 3: <D.8356>>
  <D.8353>:
  D.10499 = "weak";
  return D.10499;
  <D.8354>:
  D.10499 = "weaktrack";
  return D.10499;
  <D.8355>:
  D.10499 = "normal";
  return D.10499;
  <D.8356>:
  D.10499 = "pinned";
  return D.10499;
  <D.8357>:
  D.10499 = "unknown";
  return D.10499;
}


add_class (intptr_t klass, const char * name)
{
  int D.10501;
  int D.10502;
  int D.10504;
  char * D.10507;
  char * D.10508;
  struct ClassDesc * D.10509;
  char * D.10510;
  struct ClassDesc * D.10511;
  int num_classes.134;
  int num_classes.135;
  int slot;
  struct ClassDesc * cd;

  D.10501 = klass >> 2;
  D.10502 = D.10501 & 65535;
  slot = D.10502 % 9371;
  cd = class_hash[slot];
  goto <D.7735>;
  <D.7734>:
  cd = cd->next;
  <D.7735>:
  if (cd != 0B) goto <D.10503>; else goto <D.7736>;
  <D.10503>:
  D.10504 = cd->klass;
  if (D.10504 != klass) goto <D.7734>; else goto <D.7736>;
  <D.7736>:
  if (cd != 0B) goto <D.10505>; else goto <D.10506>;
  <D.10505>:
  D.10507 = cd->name;
  free (D.10507);
  D.10508 = pstrdup (name);
  cd->name = D.10508;
  D.10509 = cd;
  return D.10509;
  <D.10506>:
  cd = calloc (40, 1);
  cd->klass = klass;
  D.10510 = pstrdup (name);
  cd->name = D.10510;
  D.10511 = class_hash[slot];
  cd->next = D.10511;
  cd->allocs = 0;
  cd->alloc_size = 0;
  cd->traces.count = 0;
  cd->traces.size = 0;
  cd->traces.traces = 0B;
  class_hash[slot] = cd;
  num_classes.134 = num_classes;
  num_classes.135 = num_classes.134 + 1;
  num_classes = num_classes.135;
  D.10509 = cd;
  return D.10509;
}


add_image (intptr_t image, char * name)
{
  int D.10517;
  int D.10518;
  char * D.10519;
  struct ImageDesc * D.10520;
  int num_images.136;
  int num_images.137;
  int slot;
  struct ImageDesc * cd;

  D.10517 = image >> 2;
  D.10518 = D.10517 & 65535;
  slot = D.10518 % 31;
  cd = malloc (12);
  cd->image = image;
  D.10519 = pstrdup (name);
  cd->filename = D.10519;
  D.10520 = image_hash[slot];
  cd->next = D.10520;
  image_hash[slot] = cd;
  num_images.136 = num_images;
  num_images.137 = num_images.136 + 1;
  num_images = num_images.137;
}


get_thread (struct ProfContext * ctx, intptr_t thread_id)
{
  struct ThreadContext * D.10524;
  int D.10527;
  struct ThreadContext * D.10530;
  int D.10531;
  struct ThreadContext * D.10534;
  int D.10535;
  unsigned int D.10536;
  unsigned int D.10537;
  void * D.10538;
  unsigned int D.10539;
  void * D.10540;
  void * D.10541;
  struct ThreadContext * thread;

  D.10524 = ctx->current;
  if (D.10524 != 0B) goto <D.10525>; else goto <D.10526>;
  <D.10525>:
  D.10524 = ctx->current;
  D.10527 = D.10524->thread_id;
  if (D.10527 == thread_id) goto <D.10528>; else goto <D.10529>;
  <D.10528>:
  D.10530 = ctx->current;
  return D.10530;
  <D.10529>:
  <D.10526>:
  thread = ctx->threads;
  goto <D.8205>;
  <D.8204>:
  D.10531 = thread->thread_id;
  if (D.10531 == thread_id) goto <D.10532>; else goto <D.10533>;
  <D.10532>:
  D.10530 = thread;
  return D.10530;
  <D.10533>:
  thread = thread->next;
  <D.8205>:
  if (thread != 0B) goto <D.8204>; else goto <D.8206>;
  <D.8206>:
  thread = calloc (104, 1);
  D.10534 = ctx->threads;
  thread->next = D.10534;
  ctx->threads = thread;
  thread->thread_id = thread_id;
  thread->last_time = 0;
  thread->stack_id = 0;
  thread->stack_size = 32;
  D.10535 = thread->stack_size;
  D.10536 = (unsigned int) D.10535;
  D.10537 = D.10536 * 4;
  D.10538 = malloc (D.10537);
  thread->stack = D.10538;
  D.10535 = thread->stack_size;
  D.10536 = (unsigned int) D.10535;
  D.10539 = D.10536 * 8;
  D.10540 = malloc (D.10539);
  thread->time_stack = D.10540;
  D.10535 = thread->stack_size;
  D.10536 = (unsigned int) D.10535;
  D.10539 = D.10536 * 8;
  D.10541 = malloc (D.10539);
  thread->callee_time_stack = D.10541;
  D.10530 = thread;
  return D.10530;
}


tracked_creation (uintptr_t obj, struct ClassDesc * cd, uint64_t size, struct BackTrace * bt, uint64_t timestamp)
{
  uintptr_t * tracked_objects.138;
  unsigned int i.139;
  unsigned int D.10545;
  uintptr_t * D.10546;
  unsigned int D.10547;
  struct FILE * outfile.140;
  void * obj.141;
  char * D.10552;
  long long unsigned int startup_time.142;
  long long unsigned int D.10554;
  double D.10555;
  double D.10556;
  int D.10559;
  struct MethodDesc * D.10562;
  char * D.10563;
  int num_tracked_objects.143;
  int i;

  i = 0;
  goto <D.8396>;
  <D.8395>:
  tracked_objects.138 = tracked_objects;
  i.139 = (unsigned int) i;
  D.10545 = i.139 * 4;
  D.10546 = tracked_objects.138 + D.10545;
  D.10547 = *D.10546;
  if (D.10547 != obj) goto <D.10548>; else goto <D.10549>;
  <D.10548>:
  // predicted unlikely by continue predictor.
  goto <D.8390>;
  <D.10549>:
  outfile.140 = outfile;
  obj.141 = (void *) obj;
  D.10552 = cd->name;
  startup_time.142 = startup_time;
  D.10554 = timestamp - startup_time.142;
  D.10555 = (double) D.10554;
  D.10556 = D.10555 / 1.0e+9;
  fprintf (outfile.140, "Object %p created (%s, %llu bytes) at %.3f secs.\n", obj.141, D.10552, size, D.10556);
  if (bt != 0B) goto <D.10557>; else goto <D.10558>;
  <D.10557>:
  D.10559 = bt->count;
  if (D.10559 != 0) goto <D.10560>; else goto <D.10561>;
  <D.10560>:
  {
    int k;

    k = 0;
    goto <D.8393>;
    <D.8392>:
    outfile.140 = outfile;
    D.10562 = bt->methods[k];
    D.10563 = D.10562->name;
    fprintf (outfile.140, "\t%s\n", D.10563);
    k = k + 1;
    <D.8393>:
    D.10559 = bt->count;
    if (D.10559 > k) goto <D.8392>; else goto <D.8394>;
    <D.8394>:
  }
  <D.10561>:
  <D.10558>:
  <D.8390>:
  i = i + 1;
  <D.8396>:
  num_tracked_objects.143 = num_tracked_objects;
  if (i < num_tracked_objects.143) goto <D.8395>; else goto <D.8397>;
  <D.8397>:
}


add_method (intptr_t method, const char * name, intptr_t code, int len)
{
  int D.10565;
  int D.10566;
  int D.10568;
  char * D.10571;
  char * D.10572;
  struct MethodDesc * D.10573;
  char * D.10574;
  struct MethodDesc * D.10575;
  int num_methods.144;
  int num_methods.145;
  int slot;
  struct MethodDesc * cd;

  D.10565 = method >> 2;
  D.10566 = D.10565 & 65535;
  slot = D.10566 % 9371;
  cd = method_hash[slot];
  goto <D.7771>;
  <D.7770>:
  cd = cd->next;
  <D.7771>:
  if (cd != 0B) goto <D.10567>; else goto <D.7772>;
  <D.10567>:
  D.10568 = cd->method;
  if (D.10568 != method) goto <D.7770>; else goto <D.7772>;
  <D.7772>:
  if (cd != 0B) goto <D.10569>; else goto <D.10570>;
  <D.10569>:
  cd->code = code;
  cd->len = len;
  D.10571 = cd->name;
  free (D.10571);
  D.10572 = pstrdup (name);
  cd->name = D.10572;
  D.10573 = cd;
  return D.10573;
  <D.10570>:
  cd = calloc (80, 1);
  cd->method = method;
  D.10574 = pstrdup (name);
  cd->name = D.10574;
  cd->code = code;
  cd->len = len;
  cd->calls = 0;
  cd->total_time = 0;
  cd->traces.count = 0;
  cd->traces.size = 0;
  cd->traces.traces = 0B;
  D.10575 = method_hash[slot];
  cd->next = D.10575;
  method_hash[slot] = cd;
  num_methods.144 = num_methods;
  num_methods.145 = num_methods.144 + 1;
  num_methods = num_methods.145;
  D.10573 = cd;
  return D.10573;
}


push_method (struct ThreadContext * thread, struct MethodDesc * method, uint64_t timestamp)
{
  uint64_t * D.10581;
  int D.10582;
  unsigned int D.10583;
  unsigned int D.10584;
  uint64_t * D.10585;
  uint64_t * D.10586;
  uint64_t * D.10587;
  struct MethodDesc * * D.10588;
  int D.10589;
  int D.10590;
  unsigned int D.10591;
  unsigned int D.10592;
  struct MethodDesc * * D.10593;
  int D.10594;
  int D.10595;

  ensure_thread_stack (thread);
  D.10581 = thread->time_stack;
  D.10582 = thread->stack_id;
  D.10583 = (unsigned int) D.10582;
  D.10584 = D.10583 * 8;
  D.10585 = D.10581 + D.10584;
  *D.10585 = timestamp;
  D.10586 = thread->callee_time_stack;
  D.10582 = thread->stack_id;
  D.10583 = (unsigned int) D.10582;
  D.10584 = D.10583 * 8;
  D.10587 = D.10586 + D.10584;
  *D.10587 = 0;
  D.10588 = thread->stack;
  D.10582 = thread->stack_id;
  D.10589 = D.10582;
  D.10590 = D.10589 + 1;
  thread->stack_id = D.10590;
  D.10591 = (unsigned int) D.10589;
  D.10592 = D.10591 * 4;
  D.10593 = D.10588 + D.10592;
  *D.10593 = method;
  D.10594 = method->recurse_count;
  D.10595 = D.10594 + 1;
  method->recurse_count = D.10595;
}


ensure_thread_stack (struct ThreadContext * thread)
{
  int D.10596;
  int D.10597;
  int D.10600;
  struct MethodDesc * * D.10601;
  unsigned int D.10602;
  unsigned int D.10603;
  void * D.10604;
  uint64_t * D.10605;
  unsigned int D.10606;
  void * D.10607;
  uint64_t * D.10608;
  void * D.10609;

  D.10596 = thread->stack_id;
  D.10597 = thread->stack_size;
  if (D.10596 == D.10597) goto <D.10598>; else goto <D.10599>;
  <D.10598>:
  D.10597 = thread->stack_size;
  D.10600 = D.10597 * 2;
  thread->stack_size = D.10600;
  D.10601 = thread->stack;
  D.10597 = thread->stack_size;
  D.10602 = (unsigned int) D.10597;
  D.10603 = D.10602 * 4;
  D.10604 = realloc (D.10601, D.10603);
  thread->stack = D.10604;
  D.10605 = thread->time_stack;
  D.10597 = thread->stack_size;
  D.10602 = (unsigned int) D.10597;
  D.10606 = D.10602 * 8;
  D.10607 = realloc (D.10605, D.10606);
  thread->time_stack = D.10607;
  D.10608 = thread->callee_time_stack;
  D.10597 = thread->stack_size;
  D.10602 = (unsigned int) D.10597;
  D.10606 = D.10602 * 8;
  D.10609 = realloc (D.10608, D.10606);
  thread->callee_time_stack = D.10609;
  <D.10599>:
}


pop_method (struct ThreadContext * thread, struct MethodDesc * method, uint64_t timestamp)
{
  int D.10610;
  int D.10611;
  int D.10614;
  struct MethodDesc * * D.10616;
  sizetype D.10617;
  sizetype D.10618;
  sizetype D.10619;
  struct MethodDesc * * D.10620;
  struct MethodDesc * D.10621;
  int D.10623;
  long long unsigned int D.10624;
  long long unsigned int D.10625;
  uint64_t * D.10626;
  unsigned int D.10627;
  unsigned int D.10628;
  uint64_t * D.10629;
  long long unsigned int D.10630;
  struct FILE * outfile.146;
  char * D.10634;
  uint64_t * D.10635;
  uint64_t * D.10636;
  long long unsigned int D.10637;
  long long unsigned int D.10640;
  long long unsigned int D.10641;
  long long unsigned int D.10642;
  long long unsigned int D.10643;
  long long unsigned int D.10644;
  sizetype D.10647;
  sizetype D.10648;
  uint64_t * D.10649;
  long long unsigned int D.10650;
  long long unsigned int D.10651;

  D.10610 = method->recurse_count;
  D.10611 = D.10610 + -1;
  method->recurse_count = D.10611;
  D.10614 = thread->stack_id;
  if (D.10614 > 0) goto <D.10615>; else goto <D.10612>;
  <D.10615>:
  D.10616 = thread->stack;
  D.10614 = thread->stack_id;
  D.10617 = (sizetype) D.10614;
  D.10618 = D.10617 + 1073741823;
  D.10619 = D.10618 * 4;
  D.10620 = D.10616 + D.10619;
  D.10621 = *D.10620;
  if (D.10621 == method) goto <D.10622>; else goto <D.10612>;
  <D.10622>:
  {
    uint64_t tdiff;

    D.10614 = thread->stack_id;
    D.10623 = D.10614 + -1;
    thread->stack_id = D.10623;
    D.10624 = method->calls;
    D.10625 = D.10624 + 1;
    method->calls = D.10625;
    D.10626 = thread->time_stack;
    D.10614 = thread->stack_id;
    D.10627 = (unsigned int) D.10614;
    D.10628 = D.10627 * 8;
    D.10629 = D.10626 + D.10628;
    D.10630 = *D.10629;
    if (D.10630 > timestamp) goto <D.10631>; else goto <D.10632>;
    <D.10631>:
    outfile.146 = outfile;
    D.10634 = method->name;
    fprintf (outfile.146, "time went backwards for %s\n", D.10634);
    <D.10632>:
    D.10626 = thread->time_stack;
    D.10614 = thread->stack_id;
    D.10627 = (unsigned int) D.10614;
    D.10628 = D.10627 * 8;
    D.10629 = D.10626 + D.10628;
    D.10630 = *D.10629;
    tdiff = timestamp - D.10630;
    D.10635 = thread->callee_time_stack;
    D.10614 = thread->stack_id;
    D.10627 = (unsigned int) D.10614;
    D.10628 = D.10627 * 8;
    D.10636 = D.10635 + D.10628;
    D.10637 = *D.10636;
    if (D.10637 > tdiff) goto <D.10638>; else goto <D.10639>;
    <D.10638>:
    outfile.146 = outfile;
    D.10634 = method->name;
    fprintf (outfile.146, "callee time bigger for %s\n", D.10634);
    <D.10639>:
    D.10640 = method->self_time;
    D.10635 = thread->callee_time_stack;
    D.10614 = thread->stack_id;
    D.10627 = (unsigned int) D.10614;
    D.10628 = D.10627 * 8;
    D.10636 = D.10635 + D.10628;
    D.10637 = *D.10636;
    D.10641 = tdiff - D.10637;
    D.10642 = D.10640 + D.10641;
    method->self_time = D.10642;
    D.10643 = method->callee_time;
    D.10635 = thread->callee_time_stack;
    D.10614 = thread->stack_id;
    D.10627 = (unsigned int) D.10614;
    D.10628 = D.10627 * 8;
    D.10636 = D.10635 + D.10628;
    D.10637 = *D.10636;
    D.10644 = D.10643 + D.10637;
    method->callee_time = D.10644;
    D.10614 = thread->stack_id;
    if (D.10614 != 0) goto <D.10645>; else goto <D.10646>;
    <D.10645>:
    D.10635 = thread->callee_time_stack;
    D.10614 = thread->stack_id;
    D.10617 = (sizetype) D.10614;
    D.10647 = D.10617 + 536870911;
    D.10648 = D.10647 * 8;
    D.10649 = D.10635 + D.10648;
    D.10635 = thread->callee_time_stack;
    D.10614 = thread->stack_id;
    D.10617 = (sizetype) D.10614;
    D.10647 = D.10617 + 536870911;
    D.10648 = D.10647 * 8;
    D.10649 = D.10635 + D.10648;
    D.10650 = *D.10649;
    D.10651 = D.10650 + tdiff;
    *D.10649 = D.10651;
    <D.10646>:
  }
  goto <D.10613>;
  <D.10612>:
  outfile.146 = outfile;
  D.10614 = thread->stack_id;
  D.10634 = method->name;
  fprintf (outfile.146, "unmatched leave at stack pos: %d for method %s\n", D.10614, D.10634);
  <D.10613>:
}


lookup_class (intptr_t klass)
{
  int D.10652;
  int D.10653;
  int D.10655;
  void * klass.147;
  struct ClassDesc * D.10659;
  int slot;
  struct ClassDesc * cd;

  D.10652 = klass >> 2;
  D.10653 = D.10652 & 65535;
  slot = D.10653 % 9371;
  cd = class_hash[slot];
  goto <D.7743>;
  <D.7742>:
  cd = cd->next;
  <D.7743>:
  if (cd != 0B) goto <D.10654>; else goto <D.7744>;
  <D.10654>:
  D.10655 = cd->klass;
  if (D.10655 != klass) goto <D.7742>; else goto <D.7744>;
  <D.7744>:
  if (cd == 0B) goto <D.10656>; else goto <D.10657>;
  <D.10656>:
  {
    char buf[128];

    try
      {
        klass.147 = (void *) klass;
        snprintf (&buf, 128, "unresolved class %p", klass.147);
        D.10659 = add_class (klass, &buf);
        return D.10659;
      }
    finally
      {
        buf = {CLOBBER};
      }
  }
  <D.10657>:
  D.10659 = cd;
  return D.10659;
}


snprintf (char * restrict __s, size_t __n, const char * restrict __fmt)
{
  int D.10664;
  unsigned int D.10665;

  D.10665 = __builtin_object_size (__s, 1);
  D.10664 = __builtin___snprintf_chk (__s, __n, 1, D.10665, __fmt, __builtin_va_arg_pack ());
  return D.10664;
}


add_heap_shot_class (struct HeapShot * hs, struct ClassDesc * klass, uint64_t size)
{
  int D.10667;
  int D.10668;
  int D.10669;
  int D.10672;
  unsigned int D.10675;
  unsigned int D.10676;
  struct HeapClassDesc * * D.10677;
  unsigned int i.148;
  unsigned int D.10679;
  struct HeapClassDesc * * D.10680;
  struct HeapClassDesc * res.149;
  unsigned int D.10684;
  struct ClassDesc * D.10685;
  long long int D.10686;
  long long unsigned int D.10687;
  long long int D.10688;
  long long unsigned int D.10689;
  int D.10692;
  int D.10693;
  struct HeapClassDesc * D.10694;
  struct HeapClassDesc * res;
  int i;

  try
    {
      D.10667 = hs->class_count;
      D.10668 = D.10667 * 2;
      D.10669 = hs->hash_size;
      if (D.10668 >= D.10669) goto <D.10670>; else goto <D.10671>;
      <D.10670>:
      {
        struct HeapClassDesc * * n;
        int old_size;

        old_size = hs->hash_size;
        D.10669 = hs->hash_size;
        D.10672 = D.10669 * 2;
        hs->hash_size = D.10672;
        D.10669 = hs->hash_size;
        if (D.10669 == 0) goto <D.10673>; else goto <D.10674>;
        <D.10673>:
        hs->hash_size = 4;
        <D.10674>:
        D.10669 = hs->hash_size;
        D.10675 = (unsigned int) D.10669;
        D.10676 = D.10675 * 4;
        n = calloc (D.10676, 1);
        i = 0;
        goto <D.8012>;
        <D.8011>:
        D.10677 = hs->class_hash;
        i.148 = (unsigned int) i;
        D.10679 = i.148 * 4;
        D.10680 = D.10677 + D.10679;
        res.149 = *D.10680;
        res = res.149;
        D.10677 = hs->class_hash;
        i.148 = (unsigned int) i;
        D.10679 = i.148 * 4;
        D.10680 = D.10677 + D.10679;
        res.149 = *D.10680;
        if (res.149 != 0B) goto <D.10682>; else goto <D.10683>;
        <D.10682>:
        D.10669 = hs->hash_size;
        D.10684 = (unsigned int) D.10669;
        D.10677 = hs->class_hash;
        i.148 = (unsigned int) i;
        D.10679 = i.148 * 4;
        D.10680 = D.10677 + D.10679;
        res.149 = *D.10680;
        D.10685 = res.149->klass;
        D.10677 = hs->class_hash;
        i.148 = (unsigned int) i;
        D.10679 = i.148 * 4;
        D.10680 = D.10677 + D.10679;
        res.149 = *D.10680;
        D.10686 = res.149->total_size;
        D.10687 = (long long unsigned int) D.10686;
        D.10677 = hs->class_hash;
        i.148 = (unsigned int) i;
        D.10679 = i.148 * 4;
        D.10680 = D.10677 + D.10679;
        res.149 = *D.10680;
        D.10688 = res.149->count;
        D.10689 = (long long unsigned int) D.10688;
        add_heap_hashed (n, &res, D.10684, D.10685, D.10687, D.10689);
        <D.10683>:
        i = i + 1;
        <D.8012>:
        if (i < old_size) goto <D.8011>; else goto <D.8013>;
        <D.8013>:
        D.10677 = hs->class_hash;
        if (D.10677 != 0B) goto <D.10690>; else goto <D.10691>;
        <D.10690>:
        D.10677 = hs->class_hash;
        free (D.10677);
        <D.10691>:
        hs->class_hash = n;
      }
      <D.10671>:
      res = 0B;
      D.10677 = hs->class_hash;
      D.10669 = hs->hash_size;
      D.10684 = (unsigned int) D.10669;
      D.10692 = add_heap_hashed (D.10677, &res, D.10684, klass, size, 1);
      D.10667 = hs->class_count;
      D.10693 = D.10667 + D.10692;
      hs->class_count = D.10693;
      D.10694 = res;
      return D.10694;
    }
  finally
    {
      res = {CLOBBER};
    }
}


add_heap_hashed (struct HeapClassDesc * * hash, struct HeapClassDesc * * retv, uintptr_t hsize, struct ClassDesc * klass, uint64_t size, uint64_t count)
{
  int D.10699;
  unsigned int D.10700;
  unsigned int D.10701;
  unsigned int D.10703;
  struct HeapClassDesc * * D.10704;
  struct HeapClassDesc * D.10705;
  struct ClassDesc * D.10707;
  long long int D.10709;
  long long unsigned int D.10710;
  long long unsigned int D.10711;
  long long int D.10712;
  long long int D.10713;
  long long unsigned int D.10714;
  long long unsigned int D.10715;
  long long int D.10716;
  int D.10717;
  struct HeapClassDesc * D.10720;
  void * D.10723;
  uintptr_t i;
  uintptr_t start_pos;

  D.10699 = klass->klass;
  D.10700 = (unsigned int) D.10699;
  D.10701 = D.10700 >> 2;
  start_pos = D.10701 % hsize;
  i = start_pos;
  <D.8000>:
  D.10703 = i * 4;
  D.10704 = hash + D.10703;
  D.10705 = *D.10704;
  if (D.10705 != 0B) goto <D.10706>; else goto <D.10702>;
  <D.10706>:
  D.10703 = i * 4;
  D.10704 = hash + D.10703;
  D.10705 = *D.10704;
  D.10707 = D.10705->klass;
  if (D.10707 == klass) goto <D.10708>; else goto <D.10702>;
  <D.10708>:
  D.10703 = i * 4;
  D.10704 = hash + D.10703;
  D.10705 = *D.10704;
  D.10703 = i * 4;
  D.10704 = hash + D.10703;
  D.10705 = *D.10704;
  D.10709 = D.10705->total_size;
  D.10710 = (long long unsigned int) D.10709;
  D.10711 = D.10710 + size;
  D.10712 = (long long int) D.10711;
  D.10705->total_size = D.10712;
  D.10703 = i * 4;
  D.10704 = hash + D.10703;
  D.10705 = *D.10704;
  D.10703 = i * 4;
  D.10704 = hash + D.10703;
  D.10705 = *D.10704;
  D.10713 = D.10705->count;
  D.10714 = (long long unsigned int) D.10713;
  D.10715 = D.10714 + count;
  D.10716 = (long long int) D.10715;
  D.10705->count = D.10716;
  D.10703 = i * 4;
  D.10704 = hash + D.10703;
  D.10705 = *D.10704;
  *retv = D.10705;
  D.10717 = 0;
  return D.10717;
  <D.10702>:
  D.10703 = i * 4;
  D.10704 = hash + D.10703;
  D.10705 = *D.10704;
  if (D.10705 == 0B) goto <D.10718>; else goto <D.10719>;
  <D.10718>:
  D.10720 = *retv;
  if (D.10720 != 0B) goto <D.10721>; else goto <D.10722>;
  <D.10721>:
  D.10703 = i * 4;
  D.10704 = hash + D.10703;
  D.10720 = *retv;
  *D.10704 = D.10720;
  D.10717 = 1;
  return D.10717;
  <D.10722>:
  D.10703 = i * 4;
  D.10704 = hash + D.10703;
  D.10723 = calloc (48, 1);
  *D.10704 = D.10723;
  D.10703 = i * 4;
  D.10704 = hash + D.10703;
  D.10705 = *D.10704;
  D.10705->klass = klass;
  D.10703 = i * 4;
  D.10704 = hash + D.10703;
  D.10705 = *D.10704;
  D.10703 = i * 4;
  D.10704 = hash + D.10703;
  D.10705 = *D.10704;
  D.10709 = D.10705->total_size;
  D.10710 = (long long unsigned int) D.10709;
  D.10711 = D.10710 + size;
  D.10712 = (long long int) D.10711;
  D.10705->total_size = D.10712;
  D.10703 = i * 4;
  D.10704 = hash + D.10703;
  D.10705 = *D.10704;
  D.10703 = i * 4;
  D.10704 = hash + D.10703;
  D.10705 = *D.10704;
  D.10713 = D.10705->count;
  D.10714 = (long long unsigned int) D.10713;
  D.10715 = D.10714 + count;
  D.10716 = (long long int) D.10715;
  D.10705->count = D.10716;
  D.10703 = i * 4;
  D.10704 = hash + D.10703;
  D.10705 = *D.10704;
  *retv = D.10705;
  D.10717 = 1;
  return D.10717;
  <D.10719>:
  i = i + 1;
  if (i == hsize) goto <D.10724>; else goto <D.10725>;
  <D.10724>:
  i = 0;
  <D.10725>:
  if (i != start_pos) goto <D.8000>; else goto <D.8001>;
  <D.8001>:
  printf ("failed heap class store\n");
  D.10717 = 0;
  return D.10717;
}


alloc_heap_obj (uintptr_t objaddr, struct HeapClassDesc * hklass, uintptr_t num_refs)
{
  unsigned int D.10727;
  unsigned int D.10728;
  struct HeapObjectDesc * D.10729;
  struct HeapObjectDesc * ho;

  D.10727 = num_refs + 3;
  D.10728 = D.10727 * 4;
  ho = calloc (D.10728, 1);
  ho->objaddr = objaddr;
  ho->hklass = hklass;
  ho->num_refs = num_refs;
  D.10729 = ho;
  return D.10729;
}


add_heap_shot_obj (struct HeapShot * hs, struct HeapObjectDesc * obj)
{
  unsigned int D.10731;
  unsigned int D.10732;
  unsigned int D.10733;
  unsigned int D.10736;
  unsigned int D.10739;
  struct HeapObjectDesc * * D.10740;
  unsigned int D.10741;
  struct HeapObjectDesc * * D.10742;
  struct HeapObjectDesc * D.10743;
  unsigned int D.10748;
  unsigned int D.10749;
  uintptr_t i;

  D.10731 = hs->objects_count;
  D.10732 = D.10731 * 2;
  D.10733 = hs->objects_hash_size;
  if (D.10732 >= D.10733) goto <D.10734>; else goto <D.10735>;
  <D.10734>:
  {
    struct HeapObjectDesc * * n;
    uintptr_t old_size;

    old_size = hs->objects_hash_size;
    D.10733 = hs->objects_hash_size;
    D.10736 = D.10733 * 2;
    hs->objects_hash_size = D.10736;
    D.10733 = hs->objects_hash_size;
    if (D.10733 == 0) goto <D.10737>; else goto <D.10738>;
    <D.10737>:
    hs->objects_hash_size = 4;
    <D.10738>:
    D.10733 = hs->objects_hash_size;
    D.10739 = D.10733 * 4;
    n = calloc (D.10739, 1);
    i = 0;
    goto <D.8055>;
    <D.8054>:
    D.10740 = hs->objects_hash;
    D.10741 = i * 4;
    D.10742 = D.10740 + D.10741;
    D.10743 = *D.10742;
    if (D.10743 != 0B) goto <D.10744>; else goto <D.10745>;
    <D.10744>:
    D.10733 = hs->objects_hash_size;
    D.10740 = hs->objects_hash;
    D.10741 = i * 4;
    D.10742 = D.10740 + D.10741;
    D.10743 = *D.10742;
    add_heap_hashed_obj (n, D.10733, D.10743);
    <D.10745>:
    i = i + 1;
    <D.8055>:
    if (i < old_size) goto <D.8054>; else goto <D.8056>;
    <D.8056>:
    D.10740 = hs->objects_hash;
    if (D.10740 != 0B) goto <D.10746>; else goto <D.10747>;
    <D.10746>:
    D.10740 = hs->objects_hash;
    free (D.10740);
    <D.10747>:
    hs->objects_hash = n;
  }
  <D.10735>:
  D.10740 = hs->objects_hash;
  D.10733 = hs->objects_hash_size;
  D.10748 = add_heap_hashed_obj (D.10740, D.10733, obj);
  D.10731 = hs->objects_count;
  D.10749 = D.10731 + D.10748;
  hs->objects_count = D.10749;
}


add_heap_hashed_obj (struct HeapObjectDesc * * hash, uintptr_t hsize, struct HeapObjectDesc * obj)
{
  unsigned int D.10751;
  unsigned int D.10752;
  unsigned int D.10754;
  struct HeapObjectDesc * * D.10755;
  struct HeapObjectDesc * D.10756;
  unsigned int D.10758;
  uintptr_t D.10760;
  uintptr_t i;
  uintptr_t start_pos;

  D.10751 = obj->objaddr;
  D.10752 = D.10751 >> 3;
  start_pos = D.10752 % hsize;
  i = start_pos;
  <D.8045>:
  D.10754 = i * 4;
  D.10755 = hash + D.10754;
  D.10756 = *D.10755;
  if (D.10756 != 0B) goto <D.10757>; else goto <D.10753>;
  <D.10757>:
  D.10754 = i * 4;
  D.10755 = hash + D.10754;
  D.10756 = *D.10755;
  D.10758 = D.10756->objaddr;
  D.10751 = obj->objaddr;
  if (D.10758 == D.10751) goto <D.10759>; else goto <D.10753>;
  <D.10759>:
  printf ("duplicate object!\n");
  D.10760 = 0;
  return D.10760;
  <D.10753>:
  D.10754 = i * 4;
  D.10755 = hash + D.10754;
  D.10756 = *D.10755;
  if (D.10756 == 0B) goto <D.10761>; else goto <D.10762>;
  <D.10761>:
  D.10754 = i * 4;
  D.10755 = hash + D.10754;
  *D.10755 = obj;
  D.10760 = 1;
  return D.10760;
  <D.10762>:
  i = i + 1;
  if (i == hsize) goto <D.10763>; else goto <D.10764>;
  <D.10763>:
  i = 0;
  <D.10764>:
  if (i != start_pos) goto <D.8045>; else goto <D.8046>;
  <D.8046>:
  printf ("failed heap obj store\n");
  D.10760 = 0;
  return D.10760;
}


heap_shot_obj_add_refs (struct HeapShot * hs, uintptr_t objaddr, uintptr_t num, uintptr_t * ref_offset)
{
  unsigned int D.10768;
  struct HeapObjectDesc * * D.10769;
  struct HeapObjectDesc * D.10770;
  struct HeapClassDesc * D.10771;
  unsigned int D.10772;
  unsigned int D.10773;
  uintptr_t[0:] * D.10774;
  uintptr_t[0:] * D.10775;
  unsigned int D.10776;
  struct HeapObjectDesc * D.10777;
  struct HeapObjectDesc * * hash;
  uintptr_t i;

  hash = hs->objects_hash;
  i = heap_shot_find_obj_slot (hs, objaddr);
  if (1 != 0) goto <D.10766>; else goto <D.10767>;
  <D.10766>:
  {
    struct HeapObjectDesc * ho;

    D.10768 = i * 4;
    D.10769 = hash + D.10768;
    D.10770 = *D.10769;
    D.10771 = D.10770->hklass;
    D.10768 = i * 4;
    D.10769 = hash + D.10768;
    D.10770 = *D.10769;
    D.10772 = D.10770->num_refs;
    D.10773 = D.10772 + num;
    ho = alloc_heap_obj (objaddr, D.10771, D.10773);
    D.10768 = i * 4;
    D.10769 = hash + D.10768;
    D.10770 = *D.10769;
    D.10772 = D.10770->num_refs;
    *ref_offset = D.10772;
    D.10774 = &ho->refs;
    D.10768 = i * 4;
    D.10769 = hash + D.10768;
    D.10770 = *D.10769;
    D.10775 = &D.10770->refs;
    D.10768 = i * 4;
    D.10769 = hash + D.10768;
    D.10770 = *D.10769;
    D.10772 = D.10770->num_refs;
    D.10776 = D.10772 * 4;
    memcpy (D.10774, D.10775, D.10776);
    D.10768 = i * 4;
    D.10769 = hash + D.10768;
    D.10770 = *D.10769;
    free (D.10770);
    D.10768 = i * 4;
    D.10769 = hash + D.10768;
    *D.10769 = ho;
    D.10777 = ho;
    return D.10777;
  }
  <D.10767>:
  printf ("failed heap obj update\n");
  D.10777 = 0B;
  return D.10777;
}


heap_shot_find_obj_slot (struct HeapShot * hs, uintptr_t objaddr)
{
  unsigned int D.10781;
  unsigned int D.10782;
  unsigned int D.10784;
  struct HeapObjectDesc * * D.10785;
  struct HeapObjectDesc * D.10786;
  unsigned int D.10788;
  uintptr_t D.10790;
  uintptr_t i;
  uintptr_t start_pos;
  struct HeapObjectDesc * * hash;

  hash = hs->objects_hash;
  D.10781 = objaddr >> 3;
  D.10782 = hs->objects_hash_size;
  start_pos = D.10781 % D.10782;
  i = start_pos;
  <D.8028>:
  D.10784 = i * 4;
  D.10785 = hash + D.10784;
  D.10786 = *D.10785;
  if (D.10786 != 0B) goto <D.10787>; else goto <D.10783>;
  <D.10787>:
  D.10784 = i * 4;
  D.10785 = hash + D.10784;
  D.10786 = *D.10785;
  D.10788 = D.10786->objaddr;
  if (D.10788 == objaddr) goto <D.10789>; else goto <D.10783>;
  <D.10789>:
  D.10790 = i;
  return D.10790;
  <D.10783>:
  D.10784 = i * 4;
  D.10785 = hash + D.10784;
  D.10786 = *D.10785;
  if (D.10786 == 0B) goto <D.8027>; else goto <D.10791>;
  <D.10791>:
  i = i + 1;
  D.10782 = hs->objects_hash_size;
  if (i == D.10782) goto <D.10792>; else goto <D.10793>;
  <D.10792>:
  i = 0;
  <D.10793>:
  if (i != start_pos) goto <D.8028>; else goto <D.8027>;
  <D.8027>:
  D.10790 = 4294967295;
  return D.10790;
}


track_obj_reference (uintptr_t obj, uintptr_t parent, struct ClassDesc * cd)
{
  uintptr_t * tracked_objects.150;
  unsigned int i.151;
  unsigned int D.10797;
  uintptr_t * D.10798;
  unsigned int D.10799;
  struct FILE * outfile.152;
  void * obj.153;
  void * parent.154;
  char * D.10805;
  int num_tracked_objects.155;
  int i;

  i = 0;
  goto <D.8422>;
  <D.8421>:
  tracked_objects.150 = tracked_objects;
  i.151 = (unsigned int) i;
  D.10797 = i.151 * 4;
  D.10798 = tracked_objects.150 + D.10797;
  D.10799 = *D.10798;
  if (D.10799 == obj) goto <D.10800>; else goto <D.10801>;
  <D.10800>:
  outfile.152 = outfile;
  obj.153 = (void *) obj;
  parent.154 = (void *) parent;
  D.10805 = cd->name;
  fprintf (outfile.152, "Object %p referenced from %p (%s).\n", obj.153, parent.154, D.10805);
  <D.10801>:
  i = i + 1;
  <D.8422>:
  num_tracked_objects.155 = num_tracked_objects;
  if (i < num_tracked_objects.155) goto <D.8421>; else goto <D.8423>;
  <D.8423>:
}


get_root_name (int rtype)
{
  int D.10807;
  const char * D.10808;

  D.10807 = rtype & 255;
  switch (D.10807) <default: <D.8366>, case 0: <D.8361>, case 1: <D.8362>, case 2: <D.8363>, case 3: <D.8364>, case 4: <D.8365>>
  <D.8361>:
  D.10808 = "stack";
  return D.10808;
  <D.8362>:
  D.10808 = "finalizer";
  return D.10808;
  <D.8363>:
  D.10808 = "handle";
  return D.10808;
  <D.8364>:
  D.10808 = "other";
  return D.10808;
  <D.8365>:
  D.10808 = "misc";
  return D.10808;
  <D.8366>:
  D.10808 = "unknown";
  return D.10808;
}


thread_add_root (struct ThreadContext * ctx, uintptr_t obj, int root_type, uintptr_t extra_info)
{
  unsigned int D.10810;
  unsigned int D.10811;
  unsigned int D.10814;
  uintptr_t * D.10817;
  unsigned int new_size.156;
  unsigned int D.10819;
  void * D.10820;
  uintptr_t * D.10821;
  void * D.10822;
  int * D.10823;
  void * D.10824;
  unsigned int new_size.157;
  unsigned int D.10826;
  int * D.10827;
  uintptr_t * D.10828;
  unsigned int D.10829;
  unsigned int D.10830;
  unsigned int D.10831;
  uintptr_t * D.10832;

  D.10810 = ctx->num_roots;
  D.10811 = ctx->size_roots;
  if (D.10810 == D.10811) goto <D.10812>; else goto <D.10813>;
  <D.10812>:
  {
    int new_size;

    D.10811 = ctx->size_roots;
    D.10814 = D.10811 * 2;
    new_size = (int) D.10814;
    if (new_size == 0) goto <D.10815>; else goto <D.10816>;
    <D.10815>:
    new_size = 4;
    <D.10816>:
    D.10817 = ctx->roots;
    new_size.156 = (unsigned int) new_size;
    D.10819 = new_size.156 * 4;
    D.10820 = realloc (D.10817, D.10819);
    ctx->roots = D.10820;
    D.10821 = ctx->roots_extra;
    new_size.156 = (unsigned int) new_size;
    D.10819 = new_size.156 * 4;
    D.10822 = realloc (D.10821, D.10819);
    ctx->roots_extra = D.10822;
    D.10823 = ctx->roots_types;
    new_size.156 = (unsigned int) new_size;
    D.10819 = new_size.156 * 4;
    D.10824 = realloc (D.10823, D.10819);
    ctx->roots_types = D.10824;
    new_size.157 = (unsigned int) new_size;
    ctx->size_roots = new_size.157;
  }
  <D.10813>:
  D.10823 = ctx->roots_types;
  D.10810 = ctx->num_roots;
  D.10826 = D.10810 * 4;
  D.10827 = D.10823 + D.10826;
  *D.10827 = root_type;
  D.10821 = ctx->roots_extra;
  D.10810 = ctx->num_roots;
  D.10826 = D.10810 * 4;
  D.10828 = D.10821 + D.10826;
  *D.10828 = extra_info;
  D.10817 = ctx->roots;
  D.10810 = ctx->num_roots;
  D.10829 = D.10810;
  D.10830 = D.10829 + 1;
  ctx->num_roots = D.10830;
  D.10831 = D.10829 * 4;
  D.10832 = D.10817 + D.10831;
  *D.10832 = obj;
}


heap_shot_resolve_reverse_refs (struct HeapShot * hs)
{
  struct HeapObjectDesc * * D.10833;
  unsigned int D.10834;
  struct HeapObjectDesc * * D.10835;
  unsigned int D.10838;
  struct HeapClassDesc * D.10839;
  unsigned int D.10840;
  struct HeapObjectDesc * * D.10841;
  struct HeapObjectDesc * D.10842;
  struct HeapClassDesc * D.10843;
  unsigned int D.10844;
  unsigned int D.10845;
  uintptr_t i;

  i = 0;
  goto <D.8069>;
  <D.8068>:
  {
    uintptr_t r;
    struct HeapObjectDesc * ho;

    D.10833 = hs->objects_hash;
    D.10834 = i * 4;
    D.10835 = D.10833 + D.10834;
    ho = *D.10835;
    if (ho == 0B) goto <D.10836>; else goto <D.10837>;
    <D.10836>:
    // predicted unlikely by continue predictor.
    goto <D.8063>;
    <D.10837>:
    r = 0;
    goto <D.8066>;
    <D.8065>:
    {
      uintptr_t oi;

      D.10838 = ho->refs[r];
      oi = heap_shot_find_obj_slot (hs, D.10838);
      D.10839 = ho->hklass;
      D.10833 = hs->objects_hash;
      D.10840 = oi * 4;
      D.10841 = D.10833 + D.10840;
      D.10842 = *D.10841;
      D.10843 = D.10842->hklass;
      add_heap_class_rev (D.10839, D.10843);
    }
    r = r + 1;
    <D.8066>:
    D.10844 = ho->num_refs;
    if (D.10844 > r) goto <D.8065>; else goto <D.8067>;
    <D.8067>:
  }
  <D.8063>:
  i = i + 1;
  <D.8069>:
  D.10845 = hs->objects_hash_size;
  if (D.10845 > i) goto <D.8068>; else goto <D.8070>;
  <D.8070>:
}


add_heap_class_rev (struct HeapClassDesc * from, struct HeapClassDesc * to)
{
  int D.10847;
  int D.10848;
  int D.10849;
  int D.10852;
  unsigned int D.10855;
  unsigned int D.10856;
  struct HeapClassRevRef * D.10857;
  unsigned int D.10858;
  struct HeapClassRevRef * D.10859;
  struct HeapClassDesc * D.10860;
  unsigned int D.10863;
  long long unsigned int D.10864;
  int D.10867;
  int D.10868;
  uintptr_t i;

  D.10847 = to->rev_count;
  D.10848 = D.10847 * 2;
  D.10849 = to->rev_hash_size;
  if (D.10848 >= D.10849) goto <D.10850>; else goto <D.10851>;
  <D.10850>:
  {
    struct HeapClassRevRef * n;
    uintptr_t old_size;

    D.10849 = to->rev_hash_size;
    old_size = (uintptr_t) D.10849;
    D.10849 = to->rev_hash_size;
    D.10852 = D.10849 * 2;
    to->rev_hash_size = D.10852;
    D.10849 = to->rev_hash_size;
    if (D.10849 == 0) goto <D.10853>; else goto <D.10854>;
    <D.10853>:
    to->rev_hash_size = 4;
    <D.10854>:
    D.10849 = to->rev_hash_size;
    D.10855 = (unsigned int) D.10849;
    D.10856 = D.10855 * 16;
    n = calloc (D.10856, 1);
    i = 0;
    goto <D.7952>;
    <D.7951>:
    D.10857 = to->rev_hash;
    D.10858 = i * 16;
    D.10859 = D.10857 + D.10858;
    D.10860 = D.10859->klass;
    if (D.10860 != 0B) goto <D.10861>; else goto <D.10862>;
    <D.10861>:
    D.10849 = to->rev_hash_size;
    D.10863 = (unsigned int) D.10849;
    D.10857 = to->rev_hash;
    D.10858 = i * 16;
    D.10859 = D.10857 + D.10858;
    D.10860 = D.10859->klass;
    D.10857 = to->rev_hash;
    D.10858 = i * 16;
    D.10859 = D.10857 + D.10858;
    D.10864 = D.10859->count;
    add_rev_class_hashed (n, D.10863, D.10860, D.10864);
    <D.10862>:
    i = i + 1;
    <D.7952>:
    if (i < old_size) goto <D.7951>; else goto <D.7953>;
    <D.7953>:
    D.10857 = to->rev_hash;
    if (D.10857 != 0B) goto <D.10865>; else goto <D.10866>;
    <D.10865>:
    D.10857 = to->rev_hash;
    free (D.10857);
    <D.10866>:
    to->rev_hash = n;
  }
  <D.10851>:
  D.10857 = to->rev_hash;
  D.10849 = to->rev_hash_size;
  D.10863 = (unsigned int) D.10849;
  D.10867 = add_rev_class_hashed (D.10857, D.10863, from, 1);
  D.10847 = to->rev_count;
  D.10868 = D.10847 + D.10867;
  to->rev_count = D.10868;
}


add_rev_class_hashed (struct HeapClassRevRef * rev_hash, uintptr_t size, struct HeapClassDesc * hklass, uint64_t value)
{
  struct ClassDesc * D.10870;
  int D.10871;
  int D.10872;
  unsigned int D.10873;
  unsigned int D.10876;
  struct HeapClassRevRef * D.10877;
  struct HeapClassDesc * D.10878;
  long long unsigned int D.10881;
  long long unsigned int D.10882;
  int D.10883;
  struct ClassDesc * D.10888;
  uintptr_t i;
  uintptr_t start_pos;
  static const char __PRETTY_FUNCTION__[21] = "add_rev_class_hashed";

  D.10870 = hklass->klass;
  D.10871 = D.10870->klass;
  D.10872 = D.10871 >> 2;
  D.10873 = (unsigned int) D.10872;
  start_pos = D.10873 % size;
  if (start_pos >= size) goto <D.10874>; else goto <D.10875>;
  <D.10874>:
  __assert_fail ("start_pos < size", "decode.c", 573, &__PRETTY_FUNCTION__);
  <D.10875>:
  i = start_pos;
  <D.7942>:
  D.10876 = i * 16;
  D.10877 = rev_hash + D.10876;
  D.10878 = D.10877->klass;
  if (D.10878 == hklass) goto <D.10879>; else goto <D.10880>;
  <D.10879>:
  D.10876 = i * 16;
  D.10877 = rev_hash + D.10876;
  D.10876 = i * 16;
  D.10877 = rev_hash + D.10876;
  D.10881 = D.10877->count;
  D.10882 = D.10881 + value;
  D.10877->count = D.10882;
  D.10883 = 0;
  return D.10883;
  <D.10880>:
  D.10876 = i * 16;
  D.10877 = rev_hash + D.10876;
  D.10878 = D.10877->klass;
  if (D.10878 == 0B) goto <D.10884>; else goto <D.10885>;
  <D.10884>:
  D.10876 = i * 16;
  D.10877 = rev_hash + D.10876;
  D.10877->klass = hklass;
  D.10876 = i * 16;
  D.10877 = rev_hash + D.10876;
  D.10876 = i * 16;
  D.10877 = rev_hash + D.10876;
  D.10881 = D.10877->count;
  D.10882 = D.10881 + value;
  D.10877->count = D.10882;
  start_pos = 0;
  i = 0;
  goto <D.7940>;
  <D.7939>:
  D.10876 = i * 16;
  D.10877 = rev_hash + D.10876;
  D.10878 = D.10877->klass;
  if (D.10878 != 0B) goto <D.10886>; else goto <D.10887>;
  <D.10886>:
  D.10876 = i * 16;
  D.10877 = rev_hash + D.10876;
  D.10878 = D.10877->klass;
  D.10888 = D.10878->klass;
  D.10870 = hklass->klass;
  if (D.10888 == D.10870) goto <D.10889>; else goto <D.10890>;
  <D.10889>:
  start_pos = start_pos + 1;
  <D.10890>:
  <D.10887>:
  i = i + 1;
  <D.7940>:
  if (i < size) goto <D.7939>; else goto <D.7941>;
  <D.7941>:
  if (start_pos != 1) goto <D.10891>; else goto <D.10892>;
  <D.10891>:
  __assert_fail ("start_pos == 1", "decode.c", 586, &__PRETTY_FUNCTION__);
  <D.10892>:
  D.10883 = 1;
  return D.10883;
  <D.10885>:
  i = i + 1;
  if (i == size) goto <D.10893>; else goto <D.10894>;
  <D.10893>:
  i = 0;
  <D.10894>:
  if (i != start_pos) goto <D.7942>; else goto <D.7943>;
  <D.7943>:
  printf ("failed revref store\n");
  D.10883 = 0;
  return D.10883;
}


heap_shot_mark_objects (struct HeapShot * hs)
{
  uintptr_t * D.10896;
  unsigned int D.10897;
  uintptr_t * D.10898;
  unsigned int D.10899;
  struct HeapObjectDesc * * D.10902;
  unsigned int D.10903;
  struct HeapObjectDesc * * D.10904;
  int * D.10905;
  int * D.10906;
  int D.10907;
  int D.10908;
  unsigned int D.10911;
  unsigned int D.10912;
  unsigned int D.10913;
  unsigned int D.10914;
  unsigned int D.10915;
  int debug.158;
  unsigned int D.10919;
  struct FILE * outfile.159;
  void * D.10925;
  uintptr_t * D.10926;
  uintptr_t * D.10927;
  unsigned int D.10928;
  int D.10929;
  struct ClassDesc * D.10930;
  char * D.10931;
  unsigned char * D.10932;
  unsigned char D.10933;
  unsigned char iftmp.160;
  unsigned int D.10937;
  unsigned char * D.10941;
  unsigned char D.10942;
  struct HeapObjectDesc * * D.10945;
  unsigned int D.10946;
  void * D.10949;
  unsigned char iftmp.161;
  unsigned int D.10953;
  struct HeapObjectDesc * D.10957;
  struct HeapClassDesc * D.10962;
  struct ClassDesc * D.10963;
  char * D.10964;
  unsigned int D.10965;
  uintptr_t i;
  uintptr_t oi;
  uintptr_t r;
  unsigned char * marks;
  struct HeapObjectDesc * obj;
  struct HeapObjectDesc * ref;
  int marked_some;
  uintptr_t num_marked;
  uintptr_t num_unmarked;

  num_marked = 0;
  i = 0;
  goto <D.8086>;
  <D.8085>:
  {
    struct HeapClassDesc * cd;

    D.10896 = hs->roots;
    D.10897 = i * 4;
    D.10898 = D.10896 + D.10897;
    D.10899 = *D.10898;
    oi = heap_shot_find_obj_slot (hs, D.10899);
    if (oi == 4294967295) goto <D.10900>; else goto <D.10901>;
    <D.10900>:
    // predicted unlikely by continue predictor.
    goto <D.8084>;
    <D.10901>:
    D.10902 = hs->objects_hash;
    D.10903 = oi * 4;
    D.10904 = D.10902 + D.10903;
    obj = *D.10904;
    cd = obj->hklass;
    D.10905 = hs->roots_types;
    D.10897 = i * 4;
    D.10906 = D.10905 + D.10897;
    D.10907 = *D.10906;
    D.10908 = D.10907 & 256;
    if (D.10908 != 0) goto <D.10909>; else goto <D.10910>;
    <D.10909>:
    D.10911 = cd->pinned_references;
    D.10912 = D.10911 + 1;
    cd->pinned_references = D.10912;
    <D.10910>:
    D.10913 = cd->root_references;
    D.10914 = D.10913 + 1;
    cd->root_references = D.10914;
  }
  <D.8084>:
  i = i + 1;
  <D.8086>:
  D.10915 = hs->num_roots;
  if (D.10915 > i) goto <D.8085>; else goto <D.8087>;
  <D.8087>:
  debug.158 = debug;
  if (debug.158 == 0) goto <D.10917>; else goto <D.10918>;
  <D.10917>:
  return;
  <D.10918>:
  D.10919 = hs->objects_hash_size;
  marks = calloc (D.10919, 1);
  if (marks == 0B) goto <D.10920>; else goto <D.10921>;
  <D.10920>:
  return;
  <D.10921>:
  i = 0;
  goto <D.8090>;
  <D.8089>:
  D.10896 = hs->roots;
  D.10897 = i * 4;
  D.10898 = D.10896 + D.10897;
  D.10899 = *D.10898;
  oi = heap_shot_find_obj_slot (hs, D.10899);
  if (oi == 4294967295) goto <D.10922>; else goto <D.10923>;
  <D.10922>:
  outfile.159 = outfile;
  D.10905 = hs->roots_types;
  D.10897 = i * 4;
  D.10906 = D.10905 + D.10897;
  D.10907 = *D.10906;
  D.10896 = hs->roots;
  D.10897 = i * 4;
  D.10898 = D.10896 + D.10897;
  D.10899 = *D.10898;
  D.10925 = (void *) D.10899;
  D.10926 = hs->roots_extra;
  D.10897 = i * 4;
  D.10927 = D.10926 + D.10897;
  D.10928 = *D.10927;
  D.10929 = (int) D.10928;
  D.10930 = lookup_class (D.10929);
  D.10931 = D.10930->name;
  fprintf (outfile.159, "root type 0x%x for obj %p (%s) not found in heap\n", D.10907, D.10925, D.10931);
  // predicted unlikely by continue predictor.
  goto <D.8088>;
  <D.10923>:
  D.10902 = hs->objects_hash;
  D.10903 = oi * 4;
  D.10904 = D.10902 + D.10903;
  obj = *D.10904;
  D.10932 = marks + oi;
  D.10933 = *D.10932;
  if (D.10933 == 0) goto <D.10934>; else goto <D.10935>;
  <D.10934>:
  D.10932 = marks + oi;
  D.10937 = obj->num_refs;
  if (D.10937 != 0) goto <D.10938>; else goto <D.10939>;
  <D.10938>:
  iftmp.160 = 1;
  goto <D.10940>;
  <D.10939>:
  iftmp.160 = 2;
  <D.10940>:
  *D.10932 = iftmp.160;
  num_marked = num_marked + 1;
  <D.10935>:
  <D.8088>:
  i = i + 1;
  <D.8090>:
  D.10915 = hs->num_roots;
  if (D.10915 > i) goto <D.8089>; else goto <D.8091>;
  <D.8091>:
  marked_some = 1;
  goto <D.8101>;
  <D.8100>:
  marked_some = 0;
  i = 0;
  goto <D.8098>;
  <D.8097>:
  D.10941 = marks + i;
  D.10942 = *D.10941;
  if (D.10942 != 1) goto <D.10943>; else goto <D.10944>;
  <D.10943>:
  // predicted unlikely by continue predictor.
  goto <D.8092>;
  <D.10944>:
  D.10941 = marks + i;
  *D.10941 = 2;
  D.10902 = hs->objects_hash;
  D.10897 = i * 4;
  D.10945 = D.10902 + D.10897;
  obj = *D.10945;
  r = 0;
  goto <D.8095>;
  <D.8094>:
  D.10946 = obj->refs[r];
  oi = heap_shot_find_obj_slot (hs, D.10946);
  if (oi == 4294967295) goto <D.10947>; else goto <D.10948>;
  <D.10947>:
  outfile.159 = outfile;
  D.10946 = obj->refs[r];
  D.10949 = (void *) D.10946;
  fprintf (outfile.159, "referenced obj %p not found in heap\n", D.10949);
  // predicted unlikely by continue predictor.
  goto <D.8093>;
  <D.10948>:
  D.10902 = hs->objects_hash;
  D.10903 = oi * 4;
  D.10904 = D.10902 + D.10903;
  ref = *D.10904;
  D.10932 = marks + oi;
  D.10933 = *D.10932;
  if (D.10933 == 0) goto <D.10950>; else goto <D.10951>;
  <D.10950>:
  D.10932 = marks + oi;
  D.10953 = ref->num_refs;
  if (D.10953 != 0) goto <D.10954>; else goto <D.10955>;
  <D.10954>:
  iftmp.161 = 1;
  goto <D.10956>;
  <D.10955>:
  iftmp.161 = 2;
  <D.10956>:
  *D.10932 = iftmp.161;
  <D.10951>:
  <D.8093>:
  r = r + 1;
  <D.8095>:
  D.10937 = obj->num_refs;
  if (D.10937 > r) goto <D.8094>; else goto <D.8096>;
  <D.8096>:
  marked_some = marked_some + 1;
  <D.8092>:
  i = i + 1;
  <D.8098>:
  D.10919 = hs->objects_hash_size;
  if (D.10919 > i) goto <D.8097>; else goto <D.8099>;
  <D.8099>:
  <D.8101>:
  if (marked_some != 0) goto <D.8100>; else goto <D.8102>;
  <D.8102>:
  num_unmarked = 0;
  i = 0;
  goto <D.8104>;
  <D.8103>:
  D.10902 = hs->objects_hash;
  D.10897 = i * 4;
  D.10945 = D.10902 + D.10897;
  D.10957 = *D.10945;
  if (D.10957 != 0B) goto <D.10958>; else goto <D.10959>;
  <D.10958>:
  D.10941 = marks + i;
  D.10942 = *D.10941;
  if (D.10942 == 0) goto <D.10960>; else goto <D.10961>;
  <D.10960>:
  num_unmarked = num_unmarked + 1;
  outfile.159 = outfile;
  D.10902 = hs->objects_hash;
  D.10897 = i * 4;
  D.10945 = D.10902 + D.10897;
  D.10957 = *D.10945;
  D.10902 = hs->objects_hash;
  D.10897 = i * 4;
  D.10945 = D.10902 + D.10897;
  D.10957 = *D.10945;
  D.10962 = D.10957->hklass;
  D.10963 = D.10962->klass;
  D.10964 = D.10963->name;
  fprintf (outfile.159, "object %p (%s) unmarked\n", D.10957, D.10964);
  <D.10961>:
  <D.10959>:
  i = i + 1;
  <D.8104>:
  D.10919 = hs->objects_hash_size;
  if (D.10919 > i) goto <D.8103>; else goto <D.8105>;
  <D.8105>:
  outfile.159 = outfile;
  D.10965 = hs->objects_count;
  fprintf (outfile.159, "Total unmarked: %d/%d\n", num_unmarked, D.10965);
  free (marks);
}


heap_shot_free_objects (struct HeapShot * hs)
{
  struct HeapObjectDesc * * D.10971;
  unsigned int D.10972;
  struct HeapObjectDesc * * D.10973;
  unsigned int D.10976;
  uintptr_t i;

  i = 0;
  goto <D.8112>;
  <D.8111>:
  {
    struct HeapObjectDesc * ho;

    D.10971 = hs->objects_hash;
    D.10972 = i * 4;
    D.10973 = D.10971 + D.10972;
    ho = *D.10973;
    if (ho != 0B) goto <D.10974>; else goto <D.10975>;
    <D.10974>:
    free (ho);
    <D.10975>:
  }
  i = i + 1;
  <D.8112>:
  D.10976 = hs->objects_hash_size;
  if (D.10976 > i) goto <D.8111>; else goto <D.8113>;
  <D.8113>:
  D.10971 = hs->objects_hash;
  if (D.10971 != 0B) goto <D.10977>; else goto <D.10978>;
  <D.10977>:
  D.10971 = hs->objects_hash;
  free (D.10971);
  <D.10978>:
  hs->objects_hash = 0B;
  hs->objects_hash_size = 0;
  hs->objects_count = 0;
}


new_heap_shot (uint64_t timestamp)
{
  int D.10979;
  unsigned int D.10980;
  void * D.10981;
  int num_heap_shots.162;
  int num_heap_shots.163;
  struct HeapShot * heap_shots.164;
  struct HeapShot * D.10985;
  struct HeapShot * hs;

  hs = calloc (64, 1);
  hs->hash_size = 4;
  D.10979 = hs->hash_size;
  D.10980 = (unsigned int) D.10979;
  D.10981 = calloc (4, D.10980);
  hs->class_hash = D.10981;
  hs->timestamp = timestamp;
  num_heap_shots.162 = num_heap_shots;
  num_heap_shots.163 = num_heap_shots.162 + 1;
  num_heap_shots = num_heap_shots.163;
  heap_shots.164 = heap_shots;
  hs->next = heap_shots.164;
  heap_shots = hs;
  D.10985 = hs;
  return D.10985;
}


lookup_monitor (uintptr_t objid)
{
  unsigned int D.10987;
  unsigned int D.10988;
  unsigned int D.10989;
  unsigned int D.10991;
  struct MonitorDesc * D.10994;
  int num_monitors.165;
  int num_monitors.166;
  struct MonitorDesc * D.10997;
  int slot;
  struct MonitorDesc * cd;

  D.10987 = objid >> 3;
  D.10988 = D.10987 & 65535;
  D.10989 = D.10988 % 31;
  slot = (int) D.10989;
  cd = monitor_hash[slot];
  goto <D.8341>;
  <D.8340>:
  cd = cd->next;
  <D.8341>:
  if (cd != 0B) goto <D.10990>; else goto <D.8342>;
  <D.10990>:
  D.10991 = cd->objid;
  if (D.10991 != objid) goto <D.8340>; else goto <D.8342>;
  <D.8342>:
  if (cd == 0B) goto <D.10992>; else goto <D.10993>;
  <D.10992>:
  cd = calloc (48, 1);
  cd->objid = objid;
  D.10994 = monitor_hash[slot];
  cd->next = D.10994;
  monitor_hash[slot] = cd;
  num_monitors.165 = num_monitors;
  num_monitors.166 = num_monitors.165 + 1;
  num_monitors = num_monitors.166;
  <D.10993>:
  D.10997 = cd;
  return D.10997;
}


monitor_ev_name (int ev)
{
  const char * D.10999;

  switch (ev) <default: <D.8349>, case 1: <D.8346>, case 2: <D.8347>, case 3: <D.8348>>
  <D.8346>:
  D.10999 = "contended";
  return D.10999;
  <D.8347>:
  D.10999 = "acquired";
  return D.10999;
  <D.8348>:
  D.10999 = "not taken";
  return D.10999;
  <D.8349>:
  D.10999 = "invalid";
  return D.10999;
}


clause_name (int type)
{
  const char * D.11001;

  switch (type) <default: <D.8323>, case 0: <D.8319>, case 1: <D.8320>, case 2: <D.8321>, case 4: <D.8322>>
  <D.8319>:
  D.11001 = "catch";
  return D.11001;
  <D.8320>:
  D.11001 = "filter";
  return D.11001;
  <D.8321>:
  D.11001 = "finally";
  return D.11001;
  <D.8322>:
  D.11001 = "fault";
  return D.11001;
  <D.8323>:
  D.11001 = "invalid";
  return D.11001;
}


lookup_method (intptr_t method)
{
  int D.11003;
  int D.11004;
  int D.11006;
  void * method.167;
  struct MethodDesc * D.11010;
  int slot;
  struct MethodDesc * cd;

  D.11003 = method >> 2;
  D.11004 = D.11003 & 65535;
  slot = D.11004 % 9371;
  cd = method_hash[slot];
  goto <D.7779>;
  <D.7778>:
  cd = cd->next;
  <D.7779>:
  if (cd != 0B) goto <D.11005>; else goto <D.7780>;
  <D.11005>:
  D.11006 = cd->method;
  if (D.11006 != method) goto <D.7778>; else goto <D.7780>;
  <D.7780>:
  if (cd == 0B) goto <D.11007>; else goto <D.11008>;
  <D.11007>:
  {
    char buf[128];

    try
      {
        method.167 = (void *) method;
        snprintf (&buf, 128, "unknown method %p", method.167);
        D.11010 = add_method (method, &buf, 0, 0);
        return D.11010;
      }
    finally
      {
        buf = {CLOBBER};
      }
  }
  <D.11008>:
  D.11010 = cd;
  return D.11010;
}


decode_bt (struct MethodDesc * * sframes, int * size, unsigned char * p, unsigned char * * endp, intptr_t ptr_base)
{
  unsigned char * p.168;
  long long unsigned int D.11016;
  long long unsigned int D.11017;
  struct MethodDesc * * D.11020;
  int D.11021;
  unsigned int count.169;
  unsigned int D.11025;
  unsigned int i.170;
  unsigned int D.11028;
  struct MethodDesc * * D.11029;
  int D.11030;
  struct MethodDesc * D.11031;
  struct MethodDesc * * frames;
  int i;
  int flags;
  int count;

  p.168 = p;
  D.11016 = decode_uleb128 (p.168, &p);
  flags = (int) D.11016;
  p.168 = p;
  D.11017 = decode_uleb128 (p.168, &p);
  count = (int) D.11017;
  if (flags != 0) goto <D.11018>; else goto <D.11019>;
  <D.11018>:
  D.11020 = 0B;
  return D.11020;
  <D.11019>:
  D.11021 = *size;
  if (D.11021 < count) goto <D.11022>; else goto <D.11023>;
  <D.11022>:
  count.169 = (unsigned int) count;
  D.11025 = count.169 * 4;
  frames = malloc (D.11025);
  goto <D.11026>;
  <D.11023>:
  frames = sframes;
  <D.11026>:
  i = 0;
  goto <D.8380>;
  <D.8379>:
  {
    intptr_t ptrdiff;

    p.168 = p;
    ptrdiff = decode_sleb128 (p.168, &p);
    i.170 = (unsigned int) i;
    D.11028 = i.170 * 4;
    D.11029 = frames + D.11028;
    D.11030 = ptr_base + ptrdiff;
    D.11031 = lookup_method (D.11030);
    *D.11029 = D.11031;
  }
  i = i + 1;
  <D.8380>:
  if (i < count) goto <D.8379>; else goto <D.8381>;
  <D.8381>:
  *size = count;
  p.168 = p;
  *endp = p.168;
  D.11020 = frames;
  return D.11020;
}


add_trace_methods (struct MethodDesc * * methods, int count, struct TraceDesc * trace, uint64_t value)
{
  int collect_traces.171;
  struct BackTrace * D.11040;
  int trace_max.172;
  struct BackTrace * bt;

  collect_traces.171 = collect_traces;
  if (collect_traces.171 == 0) goto <D.11038>; else goto <D.11039>;
  <D.11038>:
  D.11040 = 0B;
  return D.11040;
  <D.11039>:
  trace_max.172 = trace_max;
  if (count > trace_max.172) goto <D.11042>; else goto <D.11043>;
  <D.11042>:
  count = trace_max;
  <D.11043>:
  bt = add_backtrace (count, methods);
  add_trace_bt (bt, trace, value);
  D.11040 = bt;
  return D.11040;
}


add_backtrace (int count, struct MethodDesc * * methods)
{
  int D.11046;
  unsigned int D.11047;
  unsigned int hash.173;
  int D.11051;
  struct BackTrace * D.11054;
  unsigned int count.174;
  unsigned int D.11056;
  unsigned int D.11057;
  struct BackTrace * D.11058;
  int next_backtrace.175;
  int num_backtraces.176;
  int num_backtraces.177;
  struct BackTrace * * backtraces.178;
  unsigned int num_backtraces.179;
  unsigned int D.11068;
  void * backtraces.180;
  int next_backtrace.181;
  int next_backtrace.182;
  int D.11072;
  unsigned int D.11073;
  unsigned int D.11074;
  struct BackTrace * * D.11075;
  unsigned int slot.183;
  unsigned int D.11077;
  struct MethodDesc * * D.11078;
  struct MethodDesc * D.11079;
  int hash;
  int slot;
  struct BackTrace * bt;

  hash = hash_backtrace (count, methods);
  D.11046 = hash & 65535;
  slot = D.11046 % 9371;
  bt = backtrace_hash[slot];
  goto <D.8149>;
  <D.8148>:
  D.11047 = bt->hash;
  hash.173 = (unsigned int) hash;
  if (D.11047 == hash.173) goto <D.11049>; else goto <D.11050>;
  <D.11049>:
  D.11051 = compare_backtrace (bt, count, methods);
  if (D.11051 != 0) goto <D.11052>; else goto <D.11053>;
  <D.11052>:
  D.11054 = bt;
  return D.11054;
  <D.11053>:
  <D.11050>:
  bt = bt->next;
  <D.8149>:
  if (bt != 0B) goto <D.8148>; else goto <D.8150>;
  <D.8150>:
  count.174 = (unsigned int) count;
  D.11056 = count.174 + 4;
  D.11057 = D.11056 * 4;
  bt = malloc (D.11057);
  D.11058 = backtrace_hash[slot];
  bt->next = D.11058;
  backtrace_hash[slot] = bt;
  next_backtrace.175 = next_backtrace;
  num_backtraces.176 = num_backtraces;
  if (next_backtrace.175 == num_backtraces.176) goto <D.11061>; else goto <D.11062>;
  <D.11061>:
  num_backtraces.176 = num_backtraces;
  num_backtraces.177 = num_backtraces.176 * 2;
  num_backtraces = num_backtraces.177;
  num_backtraces.176 = num_backtraces;
  if (num_backtraces.176 == 0) goto <D.11064>; else goto <D.11065>;
  <D.11064>:
  num_backtraces = 16;
  <D.11065>:
  backtraces.178 = backtraces;
  num_backtraces.176 = num_backtraces;
  num_backtraces.179 = (unsigned int) num_backtraces.176;
  D.11068 = num_backtraces.179 * 4;
  backtraces.180 = realloc (backtraces.178, D.11068);
  backtraces = backtraces.180;
  <D.11062>:
  next_backtrace.175 = next_backtrace;
  next_backtrace.181 = next_backtrace.175;
  next_backtrace.182 = next_backtrace.181 + 1;
  next_backtrace = next_backtrace.182;
  bt->id = next_backtrace.181;
  backtraces.178 = backtraces;
  D.11072 = bt->id;
  D.11073 = (unsigned int) D.11072;
  D.11074 = D.11073 * 4;
  D.11075 = backtraces.178 + D.11074;
  *D.11075 = bt;
  bt->count = count;
  hash.173 = (unsigned int) hash;
  bt->hash = hash.173;
  slot = 0;
  goto <D.8152>;
  <D.8151>:
  slot.183 = (unsigned int) slot;
  D.11077 = slot.183 * 4;
  D.11078 = methods + D.11077;
  D.11079 = *D.11078;
  bt->methods[slot] = D.11079;
  slot = slot + 1;
  <D.8152>:
  if (slot < count) goto <D.8151>; else goto <D.8153>;
  <D.8153>:
  D.11054 = bt;
  return D.11054;
}


hash_backtrace (int count, struct MethodDesc * * methods)
{
  int D.11083;
  int D.11084;
  unsigned int i.184;
  unsigned int D.11086;
  struct MethodDesc * * D.11087;
  struct MethodDesc * D.11088;
  int D.11089;
  int D.11090;
  int hash;
  int i;

  hash = count;
  i = 0;
  goto <D.8130>;
  <D.8129>:
  D.11083 = hash << 5;
  D.11084 = D.11083 - hash;
  i.184 = (unsigned int) i;
  D.11086 = i.184 * 4;
  D.11087 = methods + D.11086;
  D.11088 = *D.11087;
  D.11089 = D.11088->method;
  hash = D.11084 + D.11089;
  i = i + 1;
  <D.8130>:
  if (i < count) goto <D.8129>; else goto <D.8131>;
  <D.8131>:
  D.11090 = hash;
  return D.11090;
}


compare_backtrace (struct BackTrace * bt, int count, struct MethodDesc * * methods)
{
  int D.11092;
  int D.11095;
  unsigned int i.185;
  unsigned int D.11097;
  struct MethodDesc * * D.11098;
  struct MethodDesc * D.11099;
  struct MethodDesc * D.11100;
  int i;

  D.11092 = bt->count;
  if (D.11092 != count) goto <D.11093>; else goto <D.11094>;
  <D.11093>:
  D.11095 = 0;
  return D.11095;
  <D.11094>:
  i = 0;
  goto <D.8139>;
  <D.8138>:
  i.185 = (unsigned int) i;
  D.11097 = i.185 * 4;
  D.11098 = methods + D.11097;
  D.11099 = *D.11098;
  D.11100 = bt->methods[i];
  if (D.11099 != D.11100) goto <D.11101>; else goto <D.11102>;
  <D.11101>:
  D.11095 = 0;
  return D.11095;
  <D.11102>:
  i = i + 1;
  <D.8139>:
  if (i < count) goto <D.8138>; else goto <D.8140>;
  <D.8140>:
  D.11095 = 1;
  return D.11095;
}


add_trace_bt (struct BackTrace * bt, struct TraceDesc * trace, uint64_t value)
{
  int collect_traces.186;
  int D.11107;
  int D.11108;
  int D.11109;
  int D.11112;
  unsigned int D.11115;
  unsigned int D.11116;
  struct CallContext * D.11117;
  unsigned int i.187;
  unsigned int D.11119;
  struct CallContext * D.11120;
  struct BackTrace * D.11121;
  long long unsigned int D.11124;
  int D.11127;
  int D.11128;
  int i;

  collect_traces.186 = collect_traces;
  if (collect_traces.186 == 0) goto <D.11105>; else goto <D.11106>;
  <D.11105>:
  return;
  <D.11106>:
  D.11107 = trace->count;
  D.11108 = D.11107 * 2;
  D.11109 = trace->size;
  if (D.11108 >= D.11109) goto <D.11110>; else goto <D.11111>;
  <D.11110>:
  {
    struct CallContext * n;
    int old_size;

    old_size = trace->size;
    D.11109 = trace->size;
    D.11112 = D.11109 * 2;
    trace->size = D.11112;
    D.11109 = trace->size;
    if (D.11109 == 0) goto <D.11113>; else goto <D.11114>;
    <D.11113>:
    trace->size = 4;
    <D.11114>:
    D.11109 = trace->size;
    D.11115 = (unsigned int) D.11109;
    D.11116 = D.11115 * 16;
    n = calloc (D.11116, 1);
    i = 0;
    goto <D.8234>;
    <D.8233>:
    D.11117 = trace->traces;
    i.187 = (unsigned int) i;
    D.11119 = i.187 * 16;
    D.11120 = D.11117 + D.11119;
    D.11121 = D.11120->bt;
    if (D.11121 != 0B) goto <D.11122>; else goto <D.11123>;
    <D.11122>:
    D.11109 = trace->size;
    D.11117 = trace->traces;
    i.187 = (unsigned int) i;
    D.11119 = i.187 * 16;
    D.11120 = D.11117 + D.11119;
    D.11121 = D.11120->bt;
    D.11117 = trace->traces;
    i.187 = (unsigned int) i;
    D.11119 = i.187 * 16;
    D.11120 = D.11117 + D.11119;
    D.11124 = D.11120->count;
    add_trace_hashed (n, D.11109, D.11121, D.11124);
    <D.11123>:
    i = i + 1;
    <D.8234>:
    if (i < old_size) goto <D.8233>; else goto <D.8235>;
    <D.8235>:
    D.11117 = trace->traces;
    if (D.11117 != 0B) goto <D.11125>; else goto <D.11126>;
    <D.11125>:
    D.11117 = trace->traces;
    free (D.11117);
    <D.11126>:
    trace->traces = n;
  }
  <D.11111>:
  D.11117 = trace->traces;
  D.11109 = trace->size;
  D.11127 = add_trace_hashed (D.11117, D.11109, bt, value);
  D.11107 = trace->count;
  D.11128 = D.11107 + D.11127;
  trace->count = D.11128;
}


add_trace_hashed (struct CallContext * traces, int size, struct BackTrace * bt, uint64_t value)
{
  unsigned int D.11131;
  unsigned int size.188;
  unsigned int i.189;
  unsigned int D.11134;
  struct CallContext * D.11135;
  struct BackTrace * D.11136;
  long long unsigned int D.11139;
  long long unsigned int D.11140;
  int D.11141;
  int i;
  unsigned int start_pos;

  D.11131 = bt->hash;
  size.188 = (unsigned int) size;
  start_pos = D.11131 % size.188;
  i = (int) start_pos;
  <D.8223>:
  i.189 = (unsigned int) i;
  D.11134 = i.189 * 16;
  D.11135 = traces + D.11134;
  D.11136 = D.11135->bt;
  if (D.11136 == bt) goto <D.11137>; else goto <D.11138>;
  <D.11137>:
  i.189 = (unsigned int) i;
  D.11134 = i.189 * 16;
  D.11135 = traces + D.11134;
  i.189 = (unsigned int) i;
  D.11134 = i.189 * 16;
  D.11135 = traces + D.11134;
  D.11139 = D.11135->count;
  D.11140 = D.11139 + value;
  D.11135->count = D.11140;
  D.11141 = 0;
  return D.11141;
  <D.11138>:
  i.189 = (unsigned int) i;
  D.11134 = i.189 * 16;
  D.11135 = traces + D.11134;
  D.11136 = D.11135->bt;
  if (D.11136 == 0B) goto <D.11142>; else goto <D.11143>;
  <D.11142>:
  i.189 = (unsigned int) i;
  D.11134 = i.189 * 16;
  D.11135 = traces + D.11134;
  D.11135->bt = bt;
  i.189 = (unsigned int) i;
  D.11134 = i.189 * 16;
  D.11135 = traces + D.11134;
  i.189 = (unsigned int) i;
  D.11134 = i.189 * 16;
  D.11135 = traces + D.11134;
  D.11139 = D.11135->count;
  D.11140 = D.11139 + value;
  D.11135->count = D.11140;
  D.11141 = 1;
  return D.11141;
  <D.11143>:
  i = i + 1;
  if (i == size) goto <D.11144>; else goto <D.11145>;
  <D.11144>:
  i = 0;
  <D.11145>:
  i.189 = (unsigned int) i;
  if (i.189 != start_pos) goto <D.8223>; else goto <D.8224>;
  <D.8224>:
  printf ("failed trace store\n");
  D.11141 = 0;
  return D.11141;
}


add_trace_thread (struct ThreadContext * thread, struct TraceDesc * trace, uint64_t value)
{
  int collect_traces.190;
  struct BackTrace * D.11150;
  int trace_max.191;
  struct MethodDesc * * D.11154;
  int D.11155;
  sizetype D.11156;
  sizetype count.192;
  sizetype D.11158;
  sizetype D.11159;
  struct MethodDesc * * D.11160;
  struct BackTrace * bt;
  int count;

  count = thread->stack_id;
  collect_traces.190 = collect_traces;
  if (collect_traces.190 == 0) goto <D.11148>; else goto <D.11149>;
  <D.11148>:
  D.11150 = 0B;
  return D.11150;
  <D.11149>:
  trace_max.191 = trace_max;
  if (count > trace_max.191) goto <D.11152>; else goto <D.11153>;
  <D.11152>:
  count = trace_max;
  <D.11153>:
  D.11154 = thread->stack;
  D.11155 = thread->stack_id;
  D.11156 = (sizetype) D.11155;
  count.192 = (sizetype) count;
  D.11158 = D.11156 - count.192;
  D.11159 = D.11158 * 4;
  D.11160 = D.11154 + D.11159;
  bt = add_backtrace (count, D.11160);
  add_trace_bt (bt, trace, value);
  D.11150 = bt;
  return D.11150;
}


add_stat_sample (int type, uintptr_t ip)
{
  int num_stat_samples.193;
  int size_stat_samples.194;
  int size_stat_samples.195;
  uintptr_t * stat_samples.196;
  unsigned int size_stat_samples.197;
  unsigned int D.11172;
  void * stat_samples.198;
  int * stat_sample_desc.199;
  void * stat_sample_desc.200;
  unsigned int num_stat_samples.201;
  unsigned int D.11177;
  uintptr_t * D.11178;
  int num_stat_samples.202;
  int num_stat_samples.203;
  unsigned int num_stat_samples.204;
  unsigned int D.11182;
  int * D.11183;

  num_stat_samples.193 = num_stat_samples;
  size_stat_samples.194 = size_stat_samples;
  if (num_stat_samples.193 == size_stat_samples.194) goto <D.11165>; else goto <D.11166>;
  <D.11165>:
  size_stat_samples.194 = size_stat_samples;
  size_stat_samples.195 = size_stat_samples.194 * 2;
  size_stat_samples = size_stat_samples.195;
  size_stat_samples.194 = size_stat_samples;
  if (size_stat_samples.194 == 0) goto <D.11168>; else goto <D.11169>;
  <D.11168>:
  size_stat_samples = 32;
  <D.11169>:
  stat_samples.196 = stat_samples;
  size_stat_samples.194 = size_stat_samples;
  size_stat_samples.197 = (unsigned int) size_stat_samples.194;
  D.11172 = size_stat_samples.197 * 4;
  stat_samples.198 = realloc (stat_samples.196, D.11172);
  stat_samples = stat_samples.198;
  stat_sample_desc.199 = stat_sample_desc;
  size_stat_samples.194 = size_stat_samples;
  size_stat_samples.197 = (unsigned int) size_stat_samples.194;
  D.11172 = size_stat_samples.197 * 4;
  stat_sample_desc.200 = realloc (stat_sample_desc.199, D.11172);
  stat_sample_desc = stat_sample_desc.200;
  <D.11166>:
  stat_samples.196 = stat_samples;
  num_stat_samples.193 = num_stat_samples;
  num_stat_samples.201 = (unsigned int) num_stat_samples.193;
  D.11177 = num_stat_samples.201 * 4;
  D.11178 = stat_samples.196 + D.11177;
  *D.11178 = ip;
  stat_sample_desc.199 = stat_sample_desc;
  num_stat_samples.193 = num_stat_samples;
  num_stat_samples.202 = num_stat_samples.193;
  num_stat_samples.203 = num_stat_samples.202 + 1;
  num_stat_samples = num_stat_samples.203;
  num_stat_samples.204 = (unsigned int) num_stat_samples.202;
  D.11182 = num_stat_samples.204 * 4;
  D.11183 = stat_sample_desc.199 + D.11182;
  *D.11183 = type;
}


add_unmanaged_symbol (uintptr_t addr, char * name, uintptr_t size)
{
  int usymbols_num.205;
  int usymbols_size.206;
  struct UnmanagedSymbol * * usymbols.207;
  unsigned int new_size.208;
  unsigned int D.11192;
  void * usymbols.209;
  int usymbols_num.210;
  int usymbols_num.211;
  unsigned int usymbols_num.212;
  unsigned int D.11197;
  struct UnmanagedSymbol * * D.11198;
  struct UnmanagedSymbol * sym;

  usymbols_num.205 = usymbols_num;
  usymbols_size.206 = usymbols_size;
  if (usymbols_num.205 == usymbols_size.206) goto <D.11186>; else goto <D.11187>;
  <D.11186>:
  {
    int new_size;

    usymbols_size.206 = usymbols_size;
    new_size = usymbols_size.206 * 2;
    if (new_size == 0) goto <D.11188>; else goto <D.11189>;
    <D.11188>:
    new_size = 16;
    <D.11189>:
    usymbols.207 = usymbols;
    new_size.208 = (unsigned int) new_size;
    D.11192 = new_size.208 * 4;
    usymbols.209 = realloc (usymbols.207, D.11192);
    usymbols = usymbols.209;
    usymbols_size = new_size;
  }
  <D.11187>:
  sym = calloc (24, 1);
  sym->addr = addr;
  sym->name = name;
  sym->size = size;
  usymbols.207 = usymbols;
  usymbols_num.205 = usymbols_num;
  usymbols_num.210 = usymbols_num.205;
  usymbols_num.211 = usymbols_num.210 + 1;
  usymbols_num = usymbols_num.211;
  usymbols_num.212 = (unsigned int) usymbols_num.210;
  D.11197 = usymbols_num.212 * 4;
  D.11198 = usymbols.207 + D.11197;
  *D.11198 = sym;
}


add_unmanaged_binary (uintptr_t addr, char * name, uintptr_t size)
{
  int ubinaries_num.213;
  int ubinaries_size.214;
  struct UnmanagedSymbol * * ubinaries.215;
  unsigned int new_size.216;
  unsigned int D.11207;
  void * ubinaries.217;
  int ubinaries_num.218;
  int ubinaries_num.219;
  unsigned int ubinaries_num.220;
  unsigned int D.11212;
  struct UnmanagedSymbol * * D.11213;
  struct UnmanagedSymbol * sym;

  ubinaries_num.213 = ubinaries_num;
  ubinaries_size.214 = ubinaries_size;
  if (ubinaries_num.213 == ubinaries_size.214) goto <D.11201>; else goto <D.11202>;
  <D.11201>:
  {
    int new_size;

    ubinaries_size.214 = ubinaries_size;
    new_size = ubinaries_size.214 * 2;
    if (new_size == 0) goto <D.11203>; else goto <D.11204>;
    <D.11203>:
    new_size = 16;
    <D.11204>:
    ubinaries.215 = ubinaries;
    new_size.216 = (unsigned int) new_size;
    D.11207 = new_size.216 * 4;
    ubinaries.217 = realloc (ubinaries.215, D.11207);
    ubinaries = ubinaries.217;
    ubinaries_size = new_size;
  }
  <D.11202>:
  sym = calloc (24, 1);
  sym->addr = addr;
  sym->name = name;
  sym->size = size;
  sym->is_binary = 1;
  ubinaries.215 = ubinaries;
  ubinaries_num.213 = ubinaries_num;
  ubinaries_num.218 = ubinaries_num.213;
  ubinaries_num.219 = ubinaries_num.218 + 1;
  ubinaries_num = ubinaries_num.219;
  ubinaries_num.220 = (unsigned int) ubinaries_num.218;
  D.11212 = ubinaries_num.220 * 4;
  D.11213 = ubinaries.215 + D.11212;
  *D.11213 = sym;
}


fprintf (struct FILE * restrict __stream, const char * restrict __fmt)
{
  int D.11214;

  D.11214 = __fprintf_chk (__stream, 1, __fmt, __builtin_va_arg_pack ());
  return D.11214;
}


flush_context (struct ProfContext * ctx)
{
  int debug.221;
  struct FILE * outfile.222;
  int D.11221;
  void * D.11222;
  int D.11223;
  struct MethodDesc * * D.11224;
  sizetype D.11225;
  sizetype D.11226;
  sizetype D.11227;
  struct MethodDesc * * D.11228;
  struct MethodDesc * D.11229;
  long long unsigned int D.11230;
  struct ThreadContext * thread;

  thread = ctx->threads;
  goto <D.8842>;
  <D.8841>:
  goto <D.8839>;
  <D.8838>:
  debug.221 = debug;
  if (debug.221 != 0) goto <D.11218>; else goto <D.11219>;
  <D.11218>:
  outfile.222 = outfile;
  D.11221 = thread->thread_id;
  D.11222 = (void *) D.11221;
  D.11223 = thread->stack_id;
  fprintf (outfile.222, "thread %p has %d items on stack\n", D.11222, D.11223);
  <D.11219>:
  D.11224 = thread->stack;
  D.11223 = thread->stack_id;
  D.11225 = (sizetype) D.11223;
  D.11226 = D.11225 + 1073741823;
  D.11227 = D.11226 * 4;
  D.11228 = D.11224 + D.11227;
  D.11229 = *D.11228;
  D.11230 = thread->last_time;
  pop_method (thread, D.11229, D.11230);
  <D.8839>:
  D.11223 = thread->stack_id;
  if (D.11223 != 0) goto <D.8838>; else goto <D.8840>;
  <D.8840>:
  thread = thread->next;
  <D.8842>:
  if (thread != 0B) goto <D.8841>; else goto <D.8843>;
  <D.8843>:
}


print_reports (struct ProfContext * ctx, const char * reps, int parse_only)
{
  int D.11275;
  char D.11276;
  const char * opt;
  const char * p;

  p = reps;
  goto <D.8868>;
  <D.8867>:
  opt = match_option (p, "header");
  if (opt != p) goto <D.11231>; else goto <D.11232>;
  <D.11231>:
  if (parse_only == 0) goto <D.11233>; else goto <D.11234>;
  <D.11233>:
  dump_header (ctx);
  <D.11234>:
  // predicted unlikely by continue predictor.
  goto <D.8866>;
  <D.11232>:
  opt = match_option (p, "thread");
  if (opt != p) goto <D.11235>; else goto <D.11236>;
  <D.11235>:
  if (parse_only == 0) goto <D.11237>; else goto <D.11238>;
  <D.11237>:
  dump_threads (ctx);
  <D.11238>:
  // predicted unlikely by continue predictor.
  goto <D.8866>;
  <D.11236>:
  opt = match_option (p, "gc");
  if (opt != p) goto <D.11239>; else goto <D.11240>;
  <D.11239>:
  if (parse_only == 0) goto <D.11241>; else goto <D.11242>;
  <D.11241>:
  dump_gcs ();
  <D.11242>:
  // predicted unlikely by continue predictor.
  goto <D.8866>;
  <D.11240>:
  opt = match_option (p, "jit");
  if (opt != p) goto <D.11243>; else goto <D.11244>;
  <D.11243>:
  if (parse_only == 0) goto <D.11245>; else goto <D.11246>;
  <D.11245>:
  dump_jit ();
  <D.11246>:
  // predicted unlikely by continue predictor.
  goto <D.8866>;
  <D.11244>:
  opt = match_option (p, "alloc");
  if (opt != p) goto <D.11247>; else goto <D.11248>;
  <D.11247>:
  if (parse_only == 0) goto <D.11249>; else goto <D.11250>;
  <D.11249>:
  dump_allocations ();
  <D.11250>:
  // predicted unlikely by continue predictor.
  goto <D.8866>;
  <D.11248>:
  opt = match_option (p, "call");
  if (opt != p) goto <D.11251>; else goto <D.11252>;
  <D.11251>:
  if (parse_only == 0) goto <D.11253>; else goto <D.11254>;
  <D.11253>:
  dump_methods ();
  <D.11254>:
  // predicted unlikely by continue predictor.
  goto <D.8866>;
  <D.11252>:
  opt = match_option (p, "metadata");
  if (opt != p) goto <D.11255>; else goto <D.11256>;
  <D.11255>:
  if (parse_only == 0) goto <D.11257>; else goto <D.11258>;
  <D.11257>:
  dump_metadata ();
  <D.11258>:
  // predicted unlikely by continue predictor.
  goto <D.8866>;
  <D.11256>:
  opt = match_option (p, "exception");
  if (opt != p) goto <D.11259>; else goto <D.11260>;
  <D.11259>:
  if (parse_only == 0) goto <D.11261>; else goto <D.11262>;
  <D.11261>:
  dump_exceptions ();
  <D.11262>:
  // predicted unlikely by continue predictor.
  goto <D.8866>;
  <D.11260>:
  opt = match_option (p, "monitor");
  if (opt != p) goto <D.11263>; else goto <D.11264>;
  <D.11263>:
  if (parse_only == 0) goto <D.11265>; else goto <D.11266>;
  <D.11265>:
  dump_monitors ();
  <D.11266>:
  // predicted unlikely by continue predictor.
  goto <D.8866>;
  <D.11264>:
  opt = match_option (p, "heapshot");
  if (opt != p) goto <D.11267>; else goto <D.11268>;
  <D.11267>:
  if (parse_only == 0) goto <D.11269>; else goto <D.11270>;
  <D.11269>:
  dump_heap_shots ();
  <D.11270>:
  // predicted unlikely by continue predictor.
  goto <D.8866>;
  <D.11268>:
  opt = match_option (p, "sample");
  if (opt != p) goto <D.11271>; else goto <D.11272>;
  <D.11271>:
  if (parse_only == 0) goto <D.11273>; else goto <D.11274>;
  <D.11273>:
  dump_samples ();
  <D.11274>:
  // predicted unlikely by continue predictor.
  goto <D.8866>;
  <D.11272>:
  D.11275 = 0;
  return D.11275;
  <D.8866>:
  p = opt;
  <D.8868>:
  D.11276 = *p;
  if (D.11276 != 0) goto <D.8867>; else goto <D.8869>;
  <D.8869>:
  D.11275 = 1;
  return D.11275;
}


dump_header (struct ProfContext * ctx)
{
  long long unsigned int D.11289;
  long long unsigned int D.11290;
  long int st.223;
  struct FILE * outfile.224;
  int D.11293;
  int D.11294;
  int D.11295;
  int D.11296;
  int D.11297;
  int D.11300;
  time_t st;
  char * t;

  try
    {
      D.11289 = ctx->startup_time;
      D.11290 = D.11289 / 1000;
      st.223 = (long int) D.11290;
      st = st.223;
      t = ctime (&st);
      outfile.224 = outfile;
      fprintf (outfile.224, "\nMono log profiler data\n");
      outfile.224 = outfile;
      D.11293 = ctx->version_major;
      D.11294 = ctx->version_minor;
      fprintf (outfile.224, "\tProfiler version: %d.%d\n", D.11293, D.11294);
      outfile.224 = outfile;
      D.11295 = ctx->data_version;
      fprintf (outfile.224, "\tData version: %d\n", D.11295);
      outfile.224 = outfile;
      D.11296 = ctx->timer_overhead;
      fprintf (outfile.224, "\tMean timer overhead: %d nanoseconds\n", D.11296);
      outfile.224 = outfile;
      fprintf (outfile.224, "\tProgram startup: %s", t);
      D.11297 = ctx->pid;
      if (D.11297 != 0) goto <D.11298>; else goto <D.11299>;
      <D.11298>:
      outfile.224 = outfile;
      D.11297 = ctx->pid;
      fprintf (outfile.224, "\tProgram ID: %d\n", D.11297);
      <D.11299>:
      D.11300 = ctx->port;
      if (D.11300 != 0) goto <D.11301>; else goto <D.11302>;
      <D.11301>:
      outfile.224 = outfile;
      D.11300 = ctx->port;
      fprintf (outfile.224, "\tServer listening on: %d\n", D.11300);
      <D.11302>:
    }
  finally
    {
      st = {CLOBBER};
    }
}


dump_threads (struct ProfContext * ctx)
{
  struct FILE * outfile.225;
  int D.11306;
  void * D.11307;
  const char * iftmp.226;
  char * D.11309;
  struct ThreadContext * thread;

  outfile.225 = outfile;
  fprintf (outfile.225, "\nThread summary\n");
  thread = ctx->threads;
  goto <D.8639>;
  <D.8638>:
  outfile.225 = outfile;
  D.11306 = thread->thread_id;
  D.11307 = (void *) D.11306;
  D.11309 = thread->name;
  if (D.11309 != 0B) goto <D.11310>; else goto <D.11311>;
  <D.11310>:
  iftmp.226 = thread->name;
  goto <D.11312>;
  <D.11311>:
  iftmp.226 = "";
  <D.11312>:
  fprintf (outfile.225, "\tThread: %p, name: \"%s\"\n", D.11307, iftmp.226);
  thread = thread->next;
  <D.8639>:
  if (thread != 0B) goto <D.8638>; else goto <D.8640>;
  <D.8640>:
}


dump_gcs ()
{
  struct FILE * outfile.227;
  int gc_resizes.228;
  long long unsigned int max_heap_size.229;
  long long unsigned int gc_object_moves.230;
  int D.11317;
  long long unsigned int D.11320;
  long long unsigned int D.11321;
  long long unsigned int D.11322;
  long long unsigned int D.11323;
  long long unsigned int D.11324;
  long long unsigned int D.11325;
  long long unsigned int D.11326;
  long long unsigned int D.11327;
  const char * D.11330;
  long long unsigned int D.11331;
  long long unsigned int D.11332;
  struct TraceDesc * D.11333;
  int i;

  outfile.227 = outfile;
  fprintf (outfile.227, "\nGC summary\n");
  outfile.227 = outfile;
  gc_resizes.228 = gc_resizes;
  fprintf (outfile.227, "\tGC resizes: %d\n", gc_resizes.228);
  outfile.227 = outfile;
  max_heap_size.229 = max_heap_size;
  fprintf (outfile.227, "\tMax heap size: %llu\n", max_heap_size.229);
  outfile.227 = outfile;
  gc_object_moves.230 = gc_object_moves;
  fprintf (outfile.227, "\tObject moves: %llu\n", gc_object_moves.230);
  i = 0;
  goto <D.8678>;
  <D.8677>:
  D.11317 = gc_info[i].count;
  if (D.11317 == 0) goto <D.11318>; else goto <D.11319>;
  <D.11318>:
  // predicted unlikely by continue predictor.
  goto <D.8676>;
  <D.11319>:
  outfile.227 = outfile;
  D.11317 = gc_info[i].count;
  D.11320 = gc_info[i].max_time;
  D.11321 = D.11320 / 1000;
  D.11322 = gc_info[i].total_time;
  D.11323 = D.11322 / 1000;
  D.11322 = gc_info[i].total_time;
  D.11317 = gc_info[i].count;
  D.11324 = (long long unsigned int) D.11317;
  D.11325 = D.11322 / D.11324;
  D.11326 = D.11325 / 1000;
  fprintf (outfile.227, "\tGen%d collections: %d, max time: %lluus, total time: %lluus, average: %lluus\n", i, D.11317, D.11321, D.11323, D.11326);
  <D.8676>:
  i = i + 1;
  <D.8678>:
  if (i <= 2) goto <D.8677>; else goto <D.8679>;
  <D.8679>:
  i = 0;
  goto <D.8682>;
  <D.8681>:
  D.11327 = handle_info[i].max_live;
  if (D.11327 == 0) goto <D.11328>; else goto <D.11329>;
  <D.11328>:
  // predicted unlikely by continue predictor.
  goto <D.8680>;
  <D.11329>:
  outfile.227 = outfile;
  D.11330 = get_handle_name (i);
  D.11331 = handle_info[i].created;
  D.11332 = handle_info[i].destroyed;
  D.11327 = handle_info[i].max_live;
  fprintf (outfile.227, "\tGC handles %s: created: %llu, destroyed: %llu, max: %llu\n", D.11330, D.11331, D.11332, D.11327);
  D.11333 = &handle_info[i].traces;
  dump_traces (D.11333, "created");
  <D.8680>:
  i = i + 1;
  <D.8682>:
  if (i <= 2) goto <D.8681>; else goto <D.8683>;
  <D.8683>:
}


dump_traces (struct TraceDesc * traces, const char * desc)
{
  int show_traces.231;
  int D.11338;
  struct CallContext * D.11341;
  unsigned int j.232;
  unsigned int D.11343;
  struct CallContext * D.11344;
  int D.11345;
  struct FILE * outfile.233;
  long long unsigned int D.11349;
  struct MethodDesc * D.11350;
  char * D.11351;
  int j;

  show_traces.231 = show_traces;
  if (show_traces.231 == 0) goto <D.11336>; else goto <D.11337>;
  <D.11336>:
  return;
  <D.11337>:
  D.11338 = traces->count;
  if (D.11338 == 0) goto <D.11339>; else goto <D.11340>;
  <D.11339>:
  return;
  <D.11340>:
  sort_context_array (traces);
  j = 0;
  goto <D.8632>;
  <D.8631>:
  {
    int k;
    struct BackTrace * bt;

    D.11341 = traces->traces;
    j.232 = (unsigned int) j;
    D.11343 = j.232 * 16;
    D.11344 = D.11341 + D.11343;
    bt = D.11344->bt;
    D.11345 = bt->count;
    if (D.11345 == 0) goto <D.11346>; else goto <D.11347>;
    <D.11346>:
    // predicted unlikely by continue predictor.
    goto <D.8627>;
    <D.11347>:
    outfile.233 = outfile;
    D.11341 = traces->traces;
    j.232 = (unsigned int) j;
    D.11343 = j.232 * 16;
    D.11344 = D.11341 + D.11343;
    D.11349 = D.11344->count;
    fprintf (outfile.233, "\t%llu %s from:\n", D.11349, desc);
    k = 0;
    goto <D.8629>;
    <D.8628>:
    outfile.233 = outfile;
    D.11350 = bt->methods[k];
    D.11351 = D.11350->name;
    fprintf (outfile.233, "\t\t%s\n", D.11351);
    k = k + 1;
    <D.8629>:
    D.11345 = bt->count;
    if (D.11345 > k) goto <D.8628>; else goto <D.8630>;
    <D.8630>:
  }
  <D.8627>:
  j = j + 1;
  <D.8632>:
  D.11338 = traces->count;
  if (D.11338 > j) goto <D.8631>; else goto <D.8633>;
  <D.8633>:
}


sort_context_array (struct TraceDesc * traces)
{
  struct CallContext * D.11353;
  unsigned int i.234;
  unsigned int D.11355;
  struct CallContext * D.11356;
  struct BackTrace * D.11357;
  unsigned int j.235;
  unsigned int D.11361;
  struct CallContext * D.11362;
  long long unsigned int D.11363;
  int D.11364;
  int D.11365;
  unsigned int D.11366;
  int i;
  int j;

  i = 0;
  j = 0;
  goto <D.8269>;
  <D.8268>:
  D.11353 = traces->traces;
  i.234 = (unsigned int) i;
  D.11355 = i.234 * 16;
  D.11356 = D.11353 + D.11355;
  D.11357 = D.11356->bt;
  if (D.11357 != 0B) goto <D.11358>; else goto <D.11359>;
  <D.11358>:
  D.11353 = traces->traces;
  j.235 = (unsigned int) j;
  D.11361 = j.235 * 16;
  D.11362 = D.11353 + D.11361;
  D.11353 = traces->traces;
  i.234 = (unsigned int) i;
  D.11355 = i.234 * 16;
  D.11356 = D.11353 + D.11355;
  D.11357 = D.11356->bt;
  D.11362->bt = D.11357;
  D.11353 = traces->traces;
  j.235 = (unsigned int) j;
  D.11361 = j.235 * 16;
  D.11362 = D.11353 + D.11361;
  D.11353 = traces->traces;
  i.234 = (unsigned int) i;
  D.11355 = i.234 * 16;
  D.11356 = D.11353 + D.11355;
  D.11363 = D.11356->count;
  D.11362->count = D.11363;
  j = j + 1;
  <D.11359>:
  i = i + 1;
  <D.8269>:
  D.11364 = traces->size;
  if (D.11364 > i) goto <D.8268>; else goto <D.8270>;
  <D.8270>:
  D.11353 = traces->traces;
  D.11365 = traces->count;
  D.11366 = (unsigned int) D.11365;
  qsort (D.11353, D.11366, 16, compare_callc);
}


compare_callc (const void * a, const void * b)
{
  long long unsigned int D.11367;
  long long unsigned int D.11368;
  int D.11371;
  const struct CallContext * A;
  const struct CallContext * B;

  A = a;
  B = b;
  D.11367 = B->count;
  D.11368 = A->count;
  if (D.11367 == D.11368) goto <D.11369>; else goto <D.11370>;
  <D.11369>:
  D.11371 = 0;
  return D.11371;
  <D.11370>:
  D.11367 = B->count;
  D.11368 = A->count;
  if (D.11367 < D.11368) goto <D.11372>; else goto <D.11373>;
  <D.11372>:
  D.11371 = -1;
  return D.11371;
  <D.11373>:
  D.11371 = 1;
  return D.11371;
}


dump_jit ()
{
  struct FILE * outfile.236;
  int D.11376;
  int D.11379;
  int i;
  int code_size;
  int compiled_methods;
  struct MethodDesc * m;

  code_size = 0;
  compiled_methods = 0;
  outfile.236 = outfile;
  fprintf (outfile.236, "\nJIT summary\n");
  i = 0;
  goto <D.8696>;
  <D.8695>:
  m = method_hash[i];
  m = method_hash[i];
  goto <D.8693>;
  <D.8692>:
  D.11376 = m->code;
  if (D.11376 == 0) goto <D.11377>; else goto <D.11378>;
  <D.11377>:
  // predicted unlikely by continue predictor.
  goto <D.8691>;
  <D.11378>:
  compiled_methods = compiled_methods + 1;
  D.11379 = m->len;
  code_size = D.11379 + code_size;
  <D.8691>:
  m = m->next;
  <D.8693>:
  if (m != 0B) goto <D.8692>; else goto <D.8694>;
  <D.8694>:
  i = i + 1;
  <D.8696>:
  if (i <= 9370) goto <D.8695>; else goto <D.8697>;
  <D.8697>:
  outfile.236 = outfile;
  fprintf (outfile.236, "\tCompiled methods: %d\n", compiled_methods);
  outfile.236 = outfile;
  fprintf (outfile.236, "\tGenerated code size: %d\n", code_size);
}


dump_allocations ()
{
  int num_classes.237;
  unsigned int num_classes.238;
  unsigned int D.11382;
  int c.239;
  unsigned int c.240;
  unsigned int D.11385;
  struct ClassDesc * * D.11386;
  unsigned int num_classes.241;
  unsigned int i.242;
  unsigned int D.11389;
  struct ClassDesc * * D.11390;
  int D.11391;
  long long unsigned int D.11394;
  int header_done.243;
  struct FILE * outfile.244;
  long long unsigned int D.11399;
  long long unsigned int D.11400;
  char * D.11401;
  struct TraceDesc * D.11402;
  int i;
  int c;
  intptr_t allocs;
  uint64_t size;
  int header_done;
  struct ClassDesc * * classes;
  struct ClassDesc * cd;

  allocs = 0;
  size = 0;
  header_done = 0;
  num_classes.237 = num_classes;
  num_classes.238 = (unsigned int) num_classes.237;
  D.11382 = num_classes.238 * 4;
  classes = malloc (D.11382);
  c = 0;
  i = 0;
  goto <D.8712>;
  <D.8711>:
  cd = class_hash[i];
  goto <D.8709>;
  <D.8708>:
  c.239 = c;
  c = c.239 + 1;
  c.240 = (unsigned int) c.239;
  D.11385 = c.240 * 4;
  D.11386 = classes + D.11385;
  *D.11386 = cd;
  cd = cd->next;
  <D.8709>:
  if (cd != 0B) goto <D.8708>; else goto <D.8710>;
  <D.8710>:
  i = i + 1;
  <D.8712>:
  if (i <= 9370) goto <D.8711>; else goto <D.8713>;
  <D.8713>:
  num_classes.237 = num_classes;
  num_classes.241 = (unsigned int) num_classes.237;
  qsort (classes, num_classes.241, 4, compare_class);
  i = 0;
  goto <D.8716>;
  <D.8715>:
  i.242 = (unsigned int) i;
  D.11389 = i.242 * 4;
  D.11390 = classes + D.11389;
  cd = *D.11390;
  D.11391 = cd->allocs;
  if (D.11391 == 0) goto <D.11392>; else goto <D.11393>;
  <D.11392>:
  // predicted unlikely by continue predictor.
  goto <D.8714>;
  <D.11393>:
  D.11391 = cd->allocs;
  allocs = D.11391 + allocs;
  D.11394 = cd->alloc_size;
  size = D.11394 + size;
  header_done.243 = header_done;
  header_done = header_done.243 + 1;
  if (header_done.243 == 0) goto <D.11396>; else goto <D.11397>;
  <D.11396>:
  outfile.244 = outfile;
  fprintf (outfile.244, "\nAllocation summary\n");
  outfile.244 = outfile;
  fprintf (outfile.244, "%10s %10s %8s Type name\n", "Bytes", "Count", "Average");
  <D.11397>:
  outfile.244 = outfile;
  D.11394 = cd->alloc_size;
  D.11391 = cd->allocs;
  D.11394 = cd->alloc_size;
  D.11391 = cd->allocs;
  D.11399 = (long long unsigned int) D.11391;
  D.11400 = D.11394 / D.11399;
  D.11401 = cd->name;
  fprintf (outfile.244, "%10llu %10d %8llu %s\n", D.11394, D.11391, D.11400, D.11401);
  D.11402 = &cd->traces;
  dump_traces (D.11402, "bytes");
  <D.8714>:
  i = i + 1;
  <D.8716>:
  num_classes.237 = num_classes;
  if (i < num_classes.237) goto <D.8715>; else goto <D.8717>;
  <D.8717>:
  if (allocs != 0) goto <D.11403>; else goto <D.11404>;
  <D.11403>:
  outfile.244 = outfile;
  fprintf (outfile.244, "Total memory allocated: %llu bytes in %d objects\n", size, allocs);
  <D.11404>:
}


compare_class (const void * a, const void * b)
{
  int alloc_sort_mode.245;
  struct ClassDesc * D.11408;
  struct ClassDesc * D.11409;
  int D.11411;
  int D.11412;
  int D.11415;
  struct ClassDesc * const * A;
  struct ClassDesc * const * B;
  uint64_t vala;
  uint64_t valb;

  A = a;
  B = b;
  alloc_sort_mode.245 = alloc_sort_mode;
  if (alloc_sort_mode.245 == 0) goto <D.11406>; else goto <D.11407>;
  <D.11406>:
  D.11408 = *A;
  vala = D.11408->alloc_size;
  D.11409 = *B;
  valb = D.11409->alloc_size;
  goto <D.11410>;
  <D.11407>:
  D.11408 = *A;
  D.11411 = D.11408->allocs;
  vala = (uint64_t) D.11411;
  D.11409 = *B;
  D.11412 = D.11409->allocs;
  valb = (uint64_t) D.11412;
  <D.11410>:
  if (valb == vala) goto <D.11413>; else goto <D.11414>;
  <D.11413>:
  D.11415 = 0;
  return D.11415;
  <D.11414>:
  if (valb < vala) goto <D.11416>; else goto <D.11417>;
  <D.11416>:
  D.11415 = -1;
  return D.11415;
  <D.11417>:
  D.11415 = 1;
  return D.11415;
}


dump_methods ()
{
  int num_methods.246;
  unsigned int num_methods.247;
  unsigned int D.11421;
  long long unsigned int D.11422;
  long long unsigned int D.11423;
  long long unsigned int D.11424;
  int c.248;
  unsigned int c.249;
  unsigned int D.11427;
  struct MethodDesc * * D.11428;
  unsigned int num_methods.250;
  unsigned int i.251;
  unsigned int D.11431;
  struct MethodDesc * * D.11432;
  long long unsigned int D.11433;
  long long unsigned int D.11436;
  long long unsigned int D.11437;
  int verbose.252;
  int header_done.253;
  struct FILE * outfile.254;
  char * D.11447;
  struct TraceDesc * D.11448;
  int i;
  int c;
  uint64_t calls;
  int header_done;
  struct MethodDesc * * methods;
  struct MethodDesc * cd;

  calls = 0;
  header_done = 0;
  num_methods.246 = num_methods;
  num_methods.247 = (unsigned int) num_methods.246;
  D.11421 = num_methods.247 * 4;
  methods = malloc (D.11421);
  c = 0;
  i = 0;
  goto <D.8755>;
  <D.8754>:
  cd = method_hash[i];
  goto <D.8752>;
  <D.8751>:
  D.11422 = cd->self_time;
  D.11423 = cd->callee_time;
  D.11424 = D.11422 + D.11423;
  cd->total_time = D.11424;
  c.248 = c;
  c = c.248 + 1;
  c.249 = (unsigned int) c.248;
  D.11427 = c.249 * 4;
  D.11428 = methods + D.11427;
  *D.11428 = cd;
  cd = cd->next;
  <D.8752>:
  if (cd != 0B) goto <D.8751>; else goto <D.8753>;
  <D.8753>:
  i = i + 1;
  <D.8755>:
  if (i <= 9370) goto <D.8754>; else goto <D.8756>;
  <D.8756>:
  num_methods.246 = num_methods;
  num_methods.250 = (unsigned int) num_methods.246;
  qsort (methods, num_methods.250, 4, compare_method);
  i = 0;
  goto <D.8761>;
  <D.8760>:
  {
    uint64_t msecs;
    uint64_t smsecs;

    i.251 = (unsigned int) i;
    D.11431 = i.251 * 4;
    D.11432 = methods + D.11431;
    cd = *D.11432;
    D.11433 = cd->calls;
    if (D.11433 == 0) goto <D.11434>; else goto <D.11435>;
    <D.11434>:
    // predicted unlikely by continue predictor.
    goto <D.8759>;
    <D.11435>:
    D.11433 = cd->calls;
    calls = D.11433 + calls;
    D.11436 = cd->total_time;
    msecs = D.11436 / 1000000;
    D.11436 = cd->total_time;
    D.11423 = cd->callee_time;
    D.11437 = D.11436 - D.11423;
    smsecs = D.11437 / 1000000;
    if (msecs == 0) goto <D.11438>; else goto <D.11439>;
    <D.11438>:
    verbose.252 = verbose;
    if (verbose.252 == 0) goto <D.11441>; else goto <D.11442>;
    <D.11441>:
    // predicted unlikely by continue predictor.
    goto <D.8759>;
    <D.11442>:
    <D.11439>:
    header_done.253 = header_done;
    header_done = header_done.253 + 1;
    if (header_done.253 == 0) goto <D.11444>; else goto <D.11445>;
    <D.11444>:
    outfile.254 = outfile;
    fprintf (outfile.254, "\nMethod call summary\n");
    outfile.254 = outfile;
    fprintf (outfile.254, "%8s %8s %10s Method name\n", "Total(ms)", "Self(ms)", "Calls");
    <D.11445>:
    outfile.254 = outfile;
    D.11433 = cd->calls;
    D.11447 = cd->name;
    fprintf (outfile.254, "%8llu %8llu %10llu %s\n", msecs, smsecs, D.11433, D.11447);
    D.11448 = &cd->traces;
    dump_traces (D.11448, "calls");
  }
  <D.8759>:
  i = i + 1;
  <D.8761>:
  num_methods.246 = num_methods;
  if (i < num_methods.246) goto <D.8760>; else goto <D.8762>;
  <D.8762>:
  if (calls != 0) goto <D.11449>; else goto <D.11450>;
  <D.11449>:
  outfile.254 = outfile;
  fprintf (outfile.254, "Total calls: %llu\n", calls);
  <D.11450>:
}


compare_method (const void * a, const void * b)
{
  int method_sort_mode.255;
  struct MethodDesc * D.11454;
  struct MethodDesc * D.11455;
  int D.11462;
  struct MethodDesc * const * A;
  struct MethodDesc * const * B;
  uint64_t vala;
  uint64_t valb;

  A = a;
  B = b;
  method_sort_mode.255 = method_sort_mode;
  if (method_sort_mode.255 == 1) goto <D.11452>; else goto <D.11453>;
  <D.11452>:
  D.11454 = *A;
  vala = D.11454->self_time;
  D.11455 = *B;
  valb = D.11455->self_time;
  goto <D.11456>;
  <D.11453>:
  method_sort_mode.255 = method_sort_mode;
  if (method_sort_mode.255 == 2) goto <D.11457>; else goto <D.11458>;
  <D.11457>:
  D.11454 = *A;
  vala = D.11454->calls;
  D.11455 = *B;
  valb = D.11455->calls;
  goto <D.11459>;
  <D.11458>:
  D.11454 = *A;
  vala = D.11454->total_time;
  D.11455 = *B;
  valb = D.11455->total_time;
  <D.11459>:
  <D.11456>:
  if (vala == valb) goto <D.11460>; else goto <D.11461>;
  <D.11460>:
  D.11462 = 0;
  return D.11462;
  <D.11461>:
  if (valb < vala) goto <D.11463>; else goto <D.11464>;
  <D.11463>:
  D.11462 = -1;
  return D.11462;
  <D.11464>:
  D.11462 = 1;
  return D.11462;
}


dump_metadata ()
{
  struct FILE * outfile.256;
  int num_images.257;
  int verbose.258;
  char * D.11471;

  outfile.256 = outfile;
  fprintf (outfile.256, "\nMetadata summary\n");
  outfile.256 = outfile;
  num_images.257 = num_images;
  fprintf (outfile.256, "\tLoaded images: %d\n", num_images.257);
  verbose.258 = verbose;
  if (verbose.258 != 0) goto <D.11469>; else goto <D.11470>;
  <D.11469>:
  {
    struct ImageDesc * image;
    int i;

    i = 0;
    goto <D.8740>;
    <D.8739>:
    image = image_hash[i];
    goto <D.8737>;
    <D.8736>:
    outfile.256 = outfile;
    D.11471 = image->filename;
    fprintf (outfile.256, "\t\t%s\n", D.11471);
    image = image->next;
    <D.8737>:
    if (image != 0B) goto <D.8736>; else goto <D.8738>;
    <D.8738>:
    i = i + 1;
    <D.8740>:
    if (i <= 30) goto <D.8739>; else goto <D.8741>;
    <D.8741>:
  }
  <D.11470>:
}


dump_exceptions ()
{
  struct FILE * outfile.259;
  long long unsigned int throw_count.260;
  long long unsigned int D.11474;
  const char * D.11477;
  int i;

  outfile.259 = outfile;
  fprintf (outfile.259, "\nException summary\n");
  outfile.259 = outfile;
  throw_count.260 = throw_count;
  fprintf (outfile.259, "\tThrows: %llu\n", throw_count.260);
  dump_traces (&exc_traces, "throws");
  i = 0;
  goto <D.8647>;
  <D.8646>:
  D.11474 = clause_summary[i];
  if (D.11474 == 0) goto <D.11475>; else goto <D.11476>;
  <D.11475>:
  // predicted unlikely by continue predictor.
  goto <D.8645>;
  <D.11476>:
  outfile.259 = outfile;
  D.11477 = clause_name (i);
  D.11474 = clause_summary[i];
  fprintf (outfile.259, "\tExecuted %s clauses: %llu\n", D.11477, D.11474);
  <D.8645>:
  i = i + 1;
  <D.8647>:
  if (i <= 4) goto <D.8646>; else goto <D.8648>;
  <D.8648>:
}


dump_monitors ()
{
  int num_monitors.261;
  unsigned int num_monitors.262;
  unsigned int D.11483;
  int j.263;
  unsigned int j.264;
  unsigned int D.11486;
  struct MonitorDesc * * D.11487;
  unsigned int num_monitors.265;
  struct FILE * outfile.266;
  unsigned int i.267;
  unsigned int D.11491;
  struct MonitorDesc * * D.11492;
  unsigned int D.11493;
  void * D.11494;
  unsigned int D.11495;
  int D.11496;
  long long unsigned int D.11497;
  double D.11498;
  double D.11499;
  long long unsigned int D.11500;
  double D.11501;
  double D.11502;
  double D.11503;
  double D.11504;
  struct TraceDesc * D.11505;
  long long unsigned int monitor_contention.268;
  long long unsigned int monitor_acquired.269;
  long long unsigned int monitor_failed.270;
  struct MonitorDesc * * monitors;
  int i;
  int j;

  num_monitors.261 = num_monitors;
  if (num_monitors.261 == 0) goto <D.11480>; else goto <D.11481>;
  <D.11480>:
  return;
  <D.11481>:
  num_monitors.261 = num_monitors;
  num_monitors.262 = (unsigned int) num_monitors.261;
  D.11483 = num_monitors.262 * 4;
  monitors = malloc (D.11483);
  i = 0;
  j = 0;
  goto <D.8666>;
  <D.8665>:
  {
    struct MonitorDesc * mdesc;

    mdesc = monitor_hash[i];
    goto <D.8663>;
    <D.8662>:
    j.263 = j;
    j = j.263 + 1;
    j.264 = (unsigned int) j.263;
    D.11486 = j.264 * 4;
    D.11487 = monitors + D.11486;
    *D.11487 = mdesc;
    mdesc = mdesc->next;
    <D.8663>:
    if (mdesc != 0B) goto <D.8662>; else goto <D.8664>;
    <D.8664>:
  }
  i = i + 1;
  <D.8666>:
  if (i <= 30) goto <D.8665>; else goto <D.8667>;
  <D.8667>:
  num_monitors.261 = num_monitors;
  num_monitors.265 = (unsigned int) num_monitors.261;
  qsort (monitors, num_monitors.265, 4, compare_monitor);
  outfile.266 = outfile;
  fprintf (outfile.266, "\nMonitor lock summary\n");
  i = 0;
  goto <D.8670>;
  <D.8669>:
  {
    struct MonitorDesc * mdesc;

    i.267 = (unsigned int) i;
    D.11491 = i.267 * 4;
    D.11492 = monitors + D.11491;
    mdesc = *D.11492;
    outfile.266 = outfile;
    D.11493 = mdesc->objid;
    D.11494 = (void *) D.11493;
    D.11495 = mdesc->contentions;
    D.11496 = (int) D.11495;
    fprintf (outfile.266, "\tLock object %p: %d contentions\n", D.11494, D.11496);
    outfile.266 = outfile;
    D.11497 = mdesc->wait_time;
    D.11498 = (double) D.11497;
    D.11499 = D.11498 / 1.0e+9;
    D.11500 = mdesc->max_wait_time;
    D.11501 = (double) D.11500;
    D.11502 = D.11501 / 1.0e+9;
    D.11497 = mdesc->wait_time;
    D.11498 = (double) D.11497;
    D.11499 = D.11498 / 1.0e+9;
    D.11495 = mdesc->contentions;
    D.11503 = (double) D.11495;
    D.11504 = D.11499 / D.11503;
    fprintf (outfile.266, "\t\t%.6f secs total wait time, %.6f max, %.6f average\n", D.11499, D.11502, D.11504);
    D.11505 = &mdesc->traces;
    dump_traces (D.11505, "contentions");
  }
  i = i + 1;
  <D.8670>:
  num_monitors.261 = num_monitors;
  if (i < num_monitors.261) goto <D.8669>; else goto <D.8671>;
  <D.8671>:
  outfile.266 = outfile;
  monitor_contention.268 = monitor_contention;
  fprintf (outfile.266, "\tLock contentions: %llu\n", monitor_contention.268);
  outfile.266 = outfile;
  monitor_acquired.269 = monitor_acquired;
  fprintf (outfile.266, "\tLock acquired: %llu\n", monitor_acquired.269);
  outfile.266 = outfile;
  monitor_failed.270 = monitor_failed;
  fprintf (outfile.266, "\tLock failures: %llu\n", monitor_failed.270);
}


compare_monitor (const void * a, const void * b)
{
  struct MonitorDesc * D.11510;
  long long unsigned int D.11511;
  struct MonitorDesc * D.11512;
  long long unsigned int D.11513;
  int D.11516;
  struct MonitorDesc * const * A;
  struct MonitorDesc * const * B;

  A = a;
  B = b;
  D.11510 = *B;
  D.11511 = D.11510->wait_time;
  D.11512 = *A;
  D.11513 = D.11512->wait_time;
  if (D.11511 == D.11513) goto <D.11514>; else goto <D.11515>;
  <D.11514>:
  D.11516 = 0;
  return D.11516;
  <D.11515>:
  D.11510 = *B;
  D.11511 = D.11510->wait_time;
  D.11512 = *A;
  D.11513 = D.11512->wait_time;
  if (D.11511 < D.11513) goto <D.11517>; else goto <D.11518>;
  <D.11517>:
  D.11516 = -1;
  return D.11516;
  <D.11518>:
  D.11516 = 1;
  return D.11516;
}


dump_heap_shots ()
{
  struct HeapShot * heap_shots.271;
  int num_heap_shots.272;
  unsigned int num_heap_shots.273;
  unsigned int D.11525;
  struct FILE * outfile.274;
  int i.275;
  unsigned int i.276;
  unsigned int D.11529;
  struct HeapShot * * D.11530;
  unsigned int num_heap_shots.277;
  unsigned int i.278;
  unsigned int D.11533;
  struct HeapShot * * D.11534;
  struct HeapShot * * hs_sorted;
  struct HeapShot * hs;
  struct HeapShot * last_hs;
  int i;

  last_hs = 0B;
  heap_shots.271 = heap_shots;
  if (heap_shots.271 == 0B) goto <D.11521>; else goto <D.11522>;
  <D.11521>:
  return;
  <D.11522>:
  num_heap_shots.272 = num_heap_shots;
  num_heap_shots.273 = (unsigned int) num_heap_shots.272;
  D.11525 = num_heap_shots.273 * 4;
  hs_sorted = malloc (D.11525);
  outfile.274 = outfile;
  fprintf (outfile.274, "\nHeap shot summary\n");
  i = 0;
  hs = heap_shots;
  goto <D.8829>;
  <D.8828>:
  i.275 = i;
  i = i.275 + 1;
  i.276 = (unsigned int) i.275;
  D.11529 = i.276 * 4;
  D.11530 = hs_sorted + D.11529;
  *D.11530 = hs;
  hs = hs->next;
  <D.8829>:
  if (hs != 0B) goto <D.8828>; else goto <D.8830>;
  <D.8830>:
  num_heap_shots.272 = num_heap_shots;
  num_heap_shots.277 = (unsigned int) num_heap_shots.272;
  qsort (hs_sorted, num_heap_shots.277, 4, compare_heap_shots);
  i = 0;
  goto <D.8832>;
  <D.8831>:
  i.278 = (unsigned int) i;
  D.11533 = i.278 * 4;
  D.11534 = hs_sorted + D.11533;
  hs = *D.11534;
  heap_shot_summary (hs, i, last_hs);
  last_hs = hs;
  i = i + 1;
  <D.8832>:
  num_heap_shots.272 = num_heap_shots;
  if (i < num_heap_shots.272) goto <D.8831>; else goto <D.8833>;
  <D.8833>:
}


compare_heap_shots (const void * a, const void * b)
{
  struct HeapShot * D.11536;
  long long unsigned int D.11537;
  struct HeapShot * D.11538;
  long long unsigned int D.11539;
  int D.11542;
  struct HeapShot * const * A;
  struct HeapShot * const * B;

  A = a;
  B = b;
  D.11536 = *B;
  D.11537 = D.11536->timestamp;
  D.11538 = *A;
  D.11539 = D.11538->timestamp;
  if (D.11537 == D.11539) goto <D.11540>; else goto <D.11541>;
  <D.11540>:
  D.11542 = 0;
  return D.11542;
  <D.11541>:
  D.11536 = *B;
  D.11537 = D.11536->timestamp;
  D.11538 = *A;
  D.11539 = D.11538->timestamp;
  if (D.11537 > D.11539) goto <D.11543>; else goto <D.11544>;
  <D.11543>:
  D.11542 = -1;
  return D.11542;
  <D.11544>:
  D.11542 = 1;
  return D.11542;
}


heap_shot_summary (struct HeapShot * hs, int hs_num, struct HeapShot * last_hs)
{
  int D.11546;
  unsigned int D.11547;
  unsigned int D.11548;
  struct HeapClassDesc * * D.11549;
  unsigned int i.279;
  unsigned int D.11551;
  struct HeapClassDesc * * D.11552;
  long long int D.11555;
  long long unsigned int D.11556;
  long long int D.11557;
  long long unsigned int D.11558;
  int ccount.280;
  unsigned int ccount.281;
  unsigned int D.11561;
  struct HeapClassDesc * * D.11562;
  int D.11563;
  unsigned int ccount.282;
  struct FILE * outfile.283;
  long long unsigned int D.11566;
  long long unsigned int startup_time.284;
  long long unsigned int D.11568;
  double D.11569;
  double D.11570;
  unsigned int D.11571;
  int verbose.285;
  struct HeapClassDesc * * D.11577;
  struct ClassDesc * D.11580;
  long long int D.11581;
  char * D.11582;
  long long int D.11585;
  long long int D.11586;
  int collect_traces.286;
  int D.11591;
  unsigned int D.11592;
  unsigned int D.11593;
  struct HeapClassRevRef * D.11594;
  unsigned int j.287;
  unsigned int D.11596;
  struct HeapClassRevRef * D.11597;
  struct HeapClassDesc * D.11598;
  int k.288;
  unsigned int k.289;
  unsigned int D.11603;
  struct HeapClassRevRef * D.11604;
  int D.11605;
  unsigned int D.11608;
  unsigned int D.11609;
  unsigned int D.11612;
  uint64_t size;
  uint64_t count;
  int ccount;
  int i;
  struct HeapClassDesc * cd;
  struct HeapClassDesc * * sorted;
  static const char __PRETTY_FUNCTION__[18] = "heap_shot_summary";

  size = 0;
  count = 0;
  ccount = 0;
  D.11546 = hs->class_count;
  D.11547 = (unsigned int) D.11546;
  D.11548 = D.11547 * 4;
  sorted = malloc (D.11548);
  i = 0;
  goto <D.8799>;
  <D.8798>:
  D.11549 = hs->class_hash;
  i.279 = (unsigned int) i;
  D.11551 = i.279 * 4;
  D.11552 = D.11549 + D.11551;
  cd = *D.11552;
  if (cd == 0B) goto <D.11553>; else goto <D.11554>;
  <D.11553>:
  // predicted unlikely by continue predictor.
  goto <D.8797>;
  <D.11554>:
  D.11555 = cd->count;
  D.11556 = (long long unsigned int) D.11555;
  count = D.11556 + count;
  D.11557 = cd->total_size;
  D.11558 = (long long unsigned int) D.11557;
  size = D.11558 + size;
  ccount.280 = ccount;
  ccount = ccount.280 + 1;
  ccount.281 = (unsigned int) ccount.280;
  D.11561 = ccount.281 * 4;
  D.11562 = sorted + D.11561;
  *D.11562 = cd;
  <D.8797>:
  i = i + 1;
  <D.8799>:
  D.11563 = hs->hash_size;
  if (D.11563 > i) goto <D.8798>; else goto <D.8800>;
  <D.8800>:
  hs->sorted = sorted;
  ccount.282 = (unsigned int) ccount;
  qsort (sorted, ccount.282, 4, compare_heap_class);
  outfile.283 = outfile;
  D.11566 = hs->timestamp;
  startup_time.284 = startup_time;
  D.11568 = D.11566 - startup_time.284;
  D.11569 = (double) D.11568;
  D.11570 = D.11569 / 1.0e+9;
  D.11571 = hs->num_roots;
  fprintf (outfile.283, "\n\tHeap shot %d at %.3f secs: size: %llu, object count: %llu, class count: %d, roots: %d\n", hs_num, D.11570, size, count, ccount, D.11571);
  verbose.285 = verbose;
  if (verbose.285 == 0) goto <D.11573>; else goto <D.11574>;
  <D.11573>:
  if (ccount > 30) goto <D.11575>; else goto <D.11576>;
  <D.11575>:
  ccount = 30;
  <D.11576>:
  <D.11574>:
  outfile.283 = outfile;
  fprintf (outfile.283, "\t%10s %10s %8s Class name\n", "Bytes", "Count", "Average");
  i = 0;
  goto <D.8813>;
  <D.8812>:
  {
    struct HeapClassRevRef * rev_sorted;
    int j;
    int k;
    struct HeapClassDesc * ocd;

    ocd = 0B;
    i.279 = (unsigned int) i;
    D.11551 = i.279 * 4;
    D.11577 = sorted + D.11551;
    cd = *D.11577;
    if (last_hs != 0B) goto <D.11578>; else goto <D.11579>;
    <D.11578>:
    D.11580 = cd->klass;
    ocd = heap_class_lookup (last_hs, D.11580);
    <D.11579>:
    outfile.283 = outfile;
    D.11557 = cd->total_size;
    D.11555 = cd->count;
    D.11557 = cd->total_size;
    D.11555 = cd->count;
    D.11581 = D.11557 / D.11555;
    D.11580 = cd->klass;
    D.11582 = D.11580->name;
    fprintf (outfile.283, "\t%10llu %10llu %8llu %s", D.11557, D.11555, D.11581, D.11582);
    if (ocd != 0B) goto <D.11583>; else goto <D.11584>;
    <D.11583>:
    {
      int64_t bdiff;
      int64_t cdiff;

      D.11557 = cd->total_size;
      D.11585 = ocd->total_size;
      bdiff = D.11557 - D.11585;
      D.11555 = cd->count;
      D.11586 = ocd->count;
      cdiff = D.11555 - D.11586;
      outfile.283 = outfile;
      fprintf (outfile.283, " (bytes: %+lld, count: %+lld)\n", bdiff, cdiff);
    }
    goto <D.11587>;
    <D.11584>:
    outfile.283 = outfile;
    fprintf (outfile.283, "\n");
    <D.11587>:
    collect_traces.286 = collect_traces;
    if (collect_traces.286 == 0) goto <D.11589>; else goto <D.11590>;
    <D.11589>:
    // predicted unlikely by continue predictor.
    goto <D.8807>;
    <D.11590>:
    D.11591 = cd->rev_count;
    D.11592 = (unsigned int) D.11591;
    D.11593 = D.11592 * 16;
    rev_sorted = malloc (D.11593);
    k = 0;
    j = 0;
    goto <D.8809>;
    <D.8808>:
    D.11594 = cd->rev_hash;
    j.287 = (unsigned int) j;
    D.11596 = j.287 * 16;
    D.11597 = D.11594 + D.11596;
    D.11598 = D.11597->klass;
    if (D.11598 != 0B) goto <D.11599>; else goto <D.11600>;
    <D.11599>:
    k.288 = k;
    k = k.288 + 1;
    k.289 = (unsigned int) k.288;
    D.11603 = k.289 * 16;
    D.11604 = rev_sorted + D.11603;
    D.11594 = cd->rev_hash;
    j.287 = (unsigned int) j;
    D.11596 = j.287 * 16;
    D.11597 = D.11594 + D.11596;
    *D.11604 = *D.11597;
    <D.11600>:
    j = j + 1;
    <D.8809>:
    D.11605 = cd->rev_hash_size;
    if (D.11605 > j) goto <D.8808>; else goto <D.8810>;
    <D.8810>:
    D.11591 = cd->rev_count;
    if (D.11591 != k) goto <D.11606>; else goto <D.11607>;
    <D.11606>:
    __assert_fail ("cd->rev_count == k", "decode.c", 2416, &__PRETTY_FUNCTION__);
    <D.11607>:
    D.11591 = cd->rev_count;
    D.11608 = (unsigned int) D.11591;
    qsort (rev_sorted, D.11608, 16, compare_rev_class);
    D.11609 = cd->root_references;
    if (D.11609 != 0) goto <D.11610>; else goto <D.11611>;
    <D.11610>:
    outfile.283 = outfile;
    D.11609 = cd->root_references;
    D.11612 = cd->pinned_references;
    fprintf (outfile.283, "\t\t%d root references (%d pinning)\n", D.11609, D.11612);
    <D.11611>:
    D.11591 = cd->rev_count;
    dump_rev_claases (rev_sorted, D.11591);
    free (rev_sorted);
  }
  <D.8807>:
  i = i + 1;
  <D.8813>:
  if (i < ccount) goto <D.8812>; else goto <D.8814>;
  <D.8814>:
  free (sorted);
}


compare_rev_class (const void * a, const void * b)
{
  long long unsigned int D.11614;
  long long unsigned int D.11615;
  int D.11618;
  const struct HeapClassRevRef * A;
  const struct HeapClassRevRef * B;

  A = a;
  B = b;
  D.11614 = B->count;
  D.11615 = A->count;
  if (D.11614 == D.11615) goto <D.11616>; else goto <D.11617>;
  <D.11616>:
  D.11618 = 0;
  return D.11618;
  <D.11617>:
  D.11614 = B->count;
  D.11615 = A->count;
  if (D.11614 < D.11615) goto <D.11619>; else goto <D.11620>;
  <D.11619>:
  D.11618 = -1;
  return D.11618;
  <D.11620>:
  D.11618 = 1;
  return D.11618;
}


compare_heap_class (const void * a, const void * b)
{
  int alloc_sort_mode.290;
  struct HeapClassDesc * D.11625;
  long long int D.11626;
  struct HeapClassDesc * D.11627;
  long long int D.11628;
  long long int D.11630;
  long long int D.11631;
  int D.11634;
  struct HeapClassDesc * const * A;
  struct HeapClassDesc * const * B;
  uint64_t vala;
  uint64_t valb;

  A = a;
  B = b;
  alloc_sort_mode.290 = alloc_sort_mode;
  if (alloc_sort_mode.290 == 0) goto <D.11623>; else goto <D.11624>;
  <D.11623>:
  D.11625 = *A;
  D.11626 = D.11625->total_size;
  vala = (uint64_t) D.11626;
  D.11627 = *B;
  D.11628 = D.11627->total_size;
  valb = (uint64_t) D.11628;
  goto <D.11629>;
  <D.11624>:
  D.11625 = *A;
  D.11630 = D.11625->count;
  vala = (uint64_t) D.11630;
  D.11627 = *B;
  D.11631 = D.11627->count;
  valb = (uint64_t) D.11631;
  <D.11629>:
  if (valb == vala) goto <D.11632>; else goto <D.11633>;
  <D.11632>:
  D.11634 = 0;
  return D.11634;
  <D.11633>:
  if (valb < vala) goto <D.11635>; else goto <D.11636>;
  <D.11635>:
  D.11634 = -1;
  return D.11634;
  <D.11636>:
  D.11634 = 1;
  return D.11634;
}


heap_class_lookup (struct HeapShot * hs, struct ClassDesc * klass)
{
  int D.11638;
  unsigned int D.11639;
  unsigned int D.11640;
  int D.11641;
  unsigned int D.11642;
  struct HeapClassDesc * * D.11643;
  unsigned int i.291;
  unsigned int D.11645;
  struct HeapClassDesc * * D.11646;
  struct HeapClassDesc * D.11649;
  struct ClassDesc * D.11650;
  int i;
  unsigned int start_pos;

  D.11638 = klass->klass;
  D.11639 = (unsigned int) D.11638;
  D.11640 = D.11639 >> 2;
  D.11641 = hs->hash_size;
  D.11642 = (unsigned int) D.11641;
  start_pos = D.11640 % D.11642;
  i = (int) start_pos;
  <D.7988>:
  {
    struct HeapClassDesc * cd;

    D.11643 = hs->class_hash;
    i.291 = (unsigned int) i;
    D.11645 = i.291 * 4;
    D.11646 = D.11643 + D.11645;
    cd = *D.11646;
    if (cd == 0B) goto <D.11647>; else goto <D.11648>;
    <D.11647>:
    D.11649 = 0B;
    return D.11649;
    <D.11648>:
    D.11650 = cd->klass;
    if (D.11650 == klass) goto <D.11651>; else goto <D.11652>;
    <D.11651>:
    D.11649 = cd;
    return D.11649;
    <D.11652>:
    i = i + 1;
    D.11641 = hs->hash_size;
    if (i == D.11641) goto <D.11653>; else goto <D.11654>;
    <D.11653>:
    i = 0;
    <D.11654>:
  }
  i.291 = (unsigned int) i;
  if (i.291 != start_pos) goto <D.7988>; else goto <D.7989>;
  <D.7989>:
  D.11649 = 0B;
  return D.11649;
}


dump_rev_claases (struct HeapClassRevRef * revs, int count)
{
  int show_traces.292;
  unsigned int j.293;
  unsigned int D.11662;
  struct HeapClassRevRef * D.11663;
  struct FILE * outfile.294;
  long long unsigned int D.11665;
  struct ClassDesc * D.11666;
  char * D.11667;
  int j;

  show_traces.292 = show_traces;
  if (show_traces.292 == 0) goto <D.11657>; else goto <D.11658>;
  <D.11657>:
  return;
  <D.11658>:
  if (count == 0) goto <D.11659>; else goto <D.11660>;
  <D.11659>:
  return;
  <D.11660>:
  j = 0;
  goto <D.8784>;
  <D.8783>:
  {
    struct HeapClassDesc * cd;

    j.293 = (unsigned int) j;
    D.11662 = j.293 * 16;
    D.11663 = revs + D.11662;
    cd = D.11663->klass;
    outfile.294 = outfile;
    j.293 = (unsigned int) j;
    D.11662 = j.293 * 16;
    D.11663 = revs + D.11662;
    D.11665 = D.11663->count;
    D.11666 = cd->klass;
    D.11667 = D.11666->name;
    fprintf (outfile.294, "\t\t%llu references from: %s\n", D.11665, D.11667);
  }
  j = j + 1;
  <D.8784>:
  if (j < count) goto <D.8783>; else goto <D.8785>;
  <D.8785>:
}


match_option (const char * p, const char * opt)
{
  unsigned int D.11669;
  unsigned int len.295;
  int D.11671;
  sizetype len.296;
  const char * D.11675;
  char D.11676;
  const char * D.11679;
  int len;

  D.11669 = strlen (opt);
  len = (int) D.11669;
  len.295 = (unsigned int) len;
  D.11671 = strncmp (p, opt, len.295);
  if (D.11671 == 0) goto <D.11672>; else goto <D.11673>;
  <D.11672>:
  len.296 = (sizetype) len;
  D.11675 = p + len.296;
  D.11676 = *D.11675;
  if (D.11676 == 44) goto <D.11677>; else goto <D.11678>;
  <D.11677>:
  len = len + 1;
  <D.11678>:
  len.296 = (sizetype) len;
  D.11679 = p + len.296;
  return D.11679;
  <D.11673>:
  D.11679 = p;
  return D.11679;
}


dump_samples ()
{
  int num_stat_samples.297;
  struct UnmanagedSymbol * * usymbols.298;
  int usymbols_num.299;
  unsigned int usymbols_num.300;
  uintptr_t * stat_samples.301;
  unsigned int i.302;
  unsigned int D.11689;
  uintptr_t * D.11690;
  unsigned int D.11691;
  int D.11694;
  unsigned int msize.303;
  unsigned int D.11702;
  int count.304;
  unsigned int count.305;
  unsigned int D.11705;
  struct MethodDesc * * D.11706;
  int D.11707;
  unsigned int D.11713;
  unsigned int usize.306;
  unsigned int D.11721;
  int ucount.307;
  unsigned int ucount.308;
  unsigned int D.11724;
  struct UnmanagedSymbol * * D.11725;
  unsigned int D.11726;
  unsigned int count.309;
  unsigned int ucount.310;
  struct FILE * outfile.311;
  int * stat_sample_desc.312;
  int D.11731;
  const char * D.11732;
  double D.11733;
  double D.11734;
  double D.11735;
  double D.11736;
  int D.11737;
  double D.11738;
  double D.11739;
  double D.11740;
  double D.11741;
  double D.11742;
  double D.11743;
  struct MethodDesc * * D.11746;
  unsigned int u.313;
  unsigned int D.11750;
  struct UnmanagedSymbol * * D.11751;
  unsigned int D.11752;
  int D.11753;
  unsigned int D.11754;
  int D.11757;
  int D.11759;
  double D.11761;
  double D.11762;
  double D.11763;
  char * D.11764;
  unsigned int D.11767;
  int D.11768;
  int i;
  int u;
  int count;
  int msize;
  int unmanaged_hits;
  int unresolved_hits;
  struct MethodDesc * * cachedm;
  int ucount;
  int usize;
  struct UnmanagedSymbol * * cachedus;

  count = 0;
  msize = 0;
  unmanaged_hits = 0;
  unresolved_hits = 0;
  cachedm = 0B;
  ucount = 0;
  usize = 0;
  cachedus = 0B;
  num_stat_samples.297 = num_stat_samples;
  if (num_stat_samples.297 == 0) goto <D.11682>; else goto <D.11683>;
  <D.11682>:
  return;
  <D.11683>:
  usymbols.298 = usymbols;
  usymbols_num.299 = usymbols_num;
  usymbols_num.300 = (unsigned int) usymbols_num.299;
  qsort (usymbols.298, usymbols_num.300, 4, compare_usymbol_addr);
  i = 0;
  goto <D.7908>;
  <D.7907>:
  {
    struct MethodDesc * m;

    stat_samples.301 = stat_samples;
    i.302 = (unsigned int) i;
    D.11689 = i.302 * 4;
    D.11690 = stat_samples.301 + D.11689;
    D.11691 = *D.11690;
    m = lookup_method_by_ip (D.11691);
    if (m != 0B) goto <D.11692>; else goto <D.11693>;
    <D.11692>:
    D.11694 = m->sample_hits;
    if (D.11694 == 0) goto <D.11695>; else goto <D.11696>;
    <D.11695>:
    if (count == msize) goto <D.11697>; else goto <D.11698>;
    <D.11697>:
    msize = msize * 2;
    if (msize == 0) goto <D.11699>; else goto <D.11700>;
    <D.11699>:
    msize = 4;
    <D.11700>:
    msize.303 = (unsigned int) msize;
    D.11702 = msize.303 * 4;
    cachedm = realloc (cachedm, D.11702);
    <D.11698>:
    count.304 = count;
    count = count.304 + 1;
    count.305 = (unsigned int) count.304;
    D.11705 = count.305 * 4;
    D.11706 = cachedm + D.11705;
    *D.11706 = m;
    <D.11696>:
    D.11694 = m->sample_hits;
    D.11707 = D.11694 + 1;
    m->sample_hits = D.11707;
    goto <D.11708>;
    <D.11693>:
    {
      struct UnmanagedSymbol * usym;

      stat_samples.301 = stat_samples;
      i.302 = (unsigned int) i;
      D.11689 = i.302 * 4;
      D.11690 = stat_samples.301 + D.11689;
      D.11691 = *D.11690;
      usym = lookup_unmanaged_symbol (D.11691);
      if (usym == 0B) goto <D.11709>; else goto <D.11710>;
      <D.11709>:
      unresolved_hits = unresolved_hits + 1;
      stat_samples.301 = stat_samples;
      i.302 = (unsigned int) i;
      D.11689 = i.302 * 4;
      D.11690 = stat_samples.301 + D.11689;
      D.11691 = *D.11690;
      usym = lookup_unmanaged_binary (D.11691);
      <D.11710>:
      if (usym != 0B) goto <D.11711>; else goto <D.11712>;
      <D.11711>:
      D.11713 = usym->sample_hits;
      if (D.11713 == 0) goto <D.11714>; else goto <D.11715>;
      <D.11714>:
      if (ucount == usize) goto <D.11716>; else goto <D.11717>;
      <D.11716>:
      usize = usize * 2;
      if (usize == 0) goto <D.11718>; else goto <D.11719>;
      <D.11718>:
      usize = 4;
      <D.11719>:
      usize.306 = (unsigned int) usize;
      D.11721 = usize.306 * 4;
      cachedus = realloc (cachedus, D.11721);
      <D.11717>:
      ucount.307 = ucount;
      ucount = ucount.307 + 1;
      ucount.308 = (unsigned int) ucount.307;
      D.11724 = ucount.308 * 4;
      D.11725 = cachedus + D.11724;
      *D.11725 = usym;
      <D.11715>:
      D.11713 = usym->sample_hits;
      D.11726 = D.11713 + 1;
      usym->sample_hits = D.11726;
      <D.11712>:
      unmanaged_hits = unmanaged_hits + 1;
    }
    <D.11708>:
  }
  i = i + 1;
  <D.7908>:
  num_stat_samples.297 = num_stat_samples;
  if (i < num_stat_samples.297) goto <D.7907>; else goto <D.7909>;
  <D.7909>:
  count.309 = (unsigned int) count;
  qsort (cachedm, count.309, 4, compare_method_samples);
  ucount.310 = (unsigned int) ucount;
  qsort (cachedus, ucount.310, 4, compare_usymbol_samples);
  set_usym_parent (cachedus, ucount);
  outfile.311 = outfile;
  fprintf (outfile.311, "\nStatistical samples summary\n");
  outfile.311 = outfile;
  stat_sample_desc.312 = stat_sample_desc;
  D.11731 = *stat_sample_desc.312;
  D.11732 = sample_type_name (D.11731);
  fprintf (outfile.311, "\tSample type: %s\n", D.11732);
  outfile.311 = outfile;
  D.11733 = (double) unmanaged_hits;
  D.11734 = D.11733 * 1.0e+2;
  num_stat_samples.297 = num_stat_samples;
  D.11735 = (double) num_stat_samples.297;
  D.11736 = D.11734 / D.11735;
  fprintf (outfile.311, "\tUnmanaged hits:  %6d (%4.1f%%)\n", unmanaged_hits, D.11736);
  outfile.311 = outfile;
  num_stat_samples.297 = num_stat_samples;
  D.11737 = num_stat_samples.297 - unmanaged_hits;
  num_stat_samples.297 = num_stat_samples;
  D.11737 = num_stat_samples.297 - unmanaged_hits;
  D.11738 = (double) D.11737;
  D.11739 = D.11738 * 1.0e+2;
  num_stat_samples.297 = num_stat_samples;
  D.11735 = (double) num_stat_samples.297;
  D.11740 = D.11739 / D.11735;
  fprintf (outfile.311, "\tManaged hits:    %6d (%4.1f%%)\n", D.11737, D.11740);
  outfile.311 = outfile;
  D.11741 = (double) unresolved_hits;
  D.11742 = D.11741 * 1.0e+2;
  num_stat_samples.297 = num_stat_samples;
  D.11735 = (double) num_stat_samples.297;
  D.11743 = D.11742 / D.11735;
  fprintf (outfile.311, "\tUnresolved hits: %6d (%4.1f%%)\n", unresolved_hits, D.11743);
  outfile.311 = outfile;
  fprintf (outfile.311, "\t%6s %6s %s\n", "Hits", "%", "Method name");
  i = 0;
  u = 0;
  goto <D.7913>;
  <D.7915>:
  if (i < count) goto <D.11744>; else goto <D.11745>;
  <D.11744>:
  {
    struct MethodDesc * m;

    i.302 = (unsigned int) i;
    D.11689 = i.302 * 4;
    D.11746 = cachedm + D.11689;
    m = *D.11746;
    if (u < ucount) goto <D.11747>; else goto <D.11748>;
    <D.11747>:
    {
      struct UnmanagedSymbol * um;

      u.313 = (unsigned int) u;
      D.11750 = u.313 * 4;
      D.11751 = cachedus + D.11750;
      um = *D.11751;
      D.11752 = um->sample_hits;
      D.11753 = m->sample_hits;
      D.11754 = (unsigned int) D.11753;
      if (D.11752 > D.11754) goto <D.11755>; else goto <D.11756>;
      <D.11755>:
      D.11752 = um->sample_hits;
      D.11757 = sym_percent (D.11752);
      if (D.11757 == 0) goto <D.7912>; else goto <D.11758>;
      <D.11758>:
      print_usym (um);
      u = u + 1;
      // predicted unlikely by continue predictor.
      goto <D.7913>;
      <D.11756>:
    }
    <D.11748>:
    D.11753 = m->sample_hits;
    D.11754 = (unsigned int) D.11753;
    D.11759 = sym_percent (D.11754);
    if (D.11759 == 0) goto <D.7912>; else goto <D.11760>;
    <D.11760>:
    outfile.311 = outfile;
    D.11753 = m->sample_hits;
    D.11753 = m->sample_hits;
    D.11761 = (double) D.11753;
    D.11762 = D.11761 * 1.0e+2;
    num_stat_samples.297 = num_stat_samples;
    D.11735 = (double) num_stat_samples.297;
    D.11763 = D.11762 / D.11735;
    D.11764 = m->name;
    fprintf (outfile.311, "\t%6d %6.2f %s\n", D.11753, D.11763, D.11764);
    i = i + 1;
    // predicted unlikely by continue predictor.
    goto <D.7913>;
  }
  <D.11745>:
  if (u < ucount) goto <D.11765>; else goto <D.11766>;
  <D.11765>:
  {
    struct UnmanagedSymbol * um;

    u.313 = (unsigned int) u;
    D.11750 = u.313 * 4;
    D.11751 = cachedus + D.11750;
    um = *D.11751;
    D.11767 = um->sample_hits;
    D.11768 = sym_percent (D.11767);
    if (D.11768 == 0) goto <D.7912>; else goto <D.11769>;
    <D.11769>:
    print_usym (um);
    u = u + 1;
    // predicted unlikely by continue predictor.
    goto <D.7913>;
  }
  <D.11766>:
  <D.7913>:
  if (i < count) goto <D.7915>; else goto <D.11770>;
  <D.11770>:
  if (u < ucount) goto <D.7915>; else goto <D.7912>;
  <D.7912>:
}


compare_usymbol_samples (const void * a, const void * b)
{
  struct UnmanagedSymbol * D.11779;
  unsigned int D.11780;
  struct UnmanagedSymbol * D.11781;
  unsigned int D.11782;
  int D.11785;
  struct UnmanagedSymbol * const * A;
  struct UnmanagedSymbol * const * B;

  A = a;
  B = b;
  D.11779 = *B;
  D.11780 = D.11779->sample_hits;
  D.11781 = *A;
  D.11782 = D.11781->sample_hits;
  if (D.11780 == D.11782) goto <D.11783>; else goto <D.11784>;
  <D.11783>:
  D.11785 = 0;
  return D.11785;
  <D.11784>:
  D.11779 = *B;
  D.11780 = D.11779->sample_hits;
  D.11781 = *A;
  D.11782 = D.11781->sample_hits;
  if (D.11780 < D.11782) goto <D.11786>; else goto <D.11787>;
  <D.11786>:
  D.11785 = -1;
  return D.11785;
  <D.11787>:
  D.11785 = 1;
  return D.11785;
}


compare_method_samples (const void * a, const void * b)
{
  struct MethodDesc * D.11789;
  int D.11790;
  struct MethodDesc * D.11791;
  int D.11792;
  int D.11795;
  struct MethodDesc * const * A;
  struct MethodDesc * const * B;

  A = a;
  B = b;
  D.11789 = *A;
  D.11790 = D.11789->sample_hits;
  D.11791 = *B;
  D.11792 = D.11791->sample_hits;
  if (D.11790 == D.11792) goto <D.11793>; else goto <D.11794>;
  <D.11793>:
  D.11795 = 0;
  return D.11795;
  <D.11794>:
  D.11791 = *B;
  D.11792 = D.11791->sample_hits;
  D.11789 = *A;
  D.11790 = D.11789->sample_hits;
  if (D.11792 < D.11790) goto <D.11796>; else goto <D.11797>;
  <D.11796>:
  D.11795 = -1;
  return D.11795;
  <D.11797>:
  D.11795 = 1;
  return D.11795;
}


compare_usymbol_addr (const void * a, const void * b)
{
  struct UnmanagedSymbol * D.11799;
  unsigned int D.11800;
  struct UnmanagedSymbol * D.11801;
  unsigned int D.11802;
  int D.11805;
  struct UnmanagedSymbol * const * A;
  struct UnmanagedSymbol * const * B;

  A = a;
  B = b;
  D.11799 = *B;
  D.11800 = D.11799->addr;
  D.11801 = *A;
  D.11802 = D.11801->addr;
  if (D.11800 == D.11802) goto <D.11803>; else goto <D.11804>;
  <D.11803>:
  D.11805 = 0;
  return D.11805;
  <D.11804>:
  D.11799 = *B;
  D.11800 = D.11799->addr;
  D.11801 = *A;
  D.11802 = D.11801->addr;
  if (D.11800 > D.11802) goto <D.11806>; else goto <D.11807>;
  <D.11806>:
  D.11805 = -1;
  return D.11805;
  <D.11807>:
  D.11805 = 1;
  return D.11805;
}


lookup_method_by_ip (uintptr_t ip)
{
  int D.11809;
  unsigned int D.11810;
  unsigned int D.11813;
  int D.11814;
  unsigned int D.11815;
  unsigned int D.11816;
  struct MethodDesc * D.11819;
  int i;
  struct MethodDesc * m;

  i = 0;
  goto <D.7799>;
  <D.7798>:
  m = method_hash[i];
  goto <D.7796>;
  <D.7795>:
  D.11809 = m->code;
  D.11810 = (unsigned int) D.11809;
  if (D.11810 <= ip) goto <D.11811>; else goto <D.11812>;
  <D.11811>:
  D.11809 = m->code;
  D.11813 = (unsigned int) D.11809;
  D.11814 = m->len;
  D.11815 = (unsigned int) D.11814;
  D.11816 = D.11813 + D.11815;
  if (D.11816 > ip) goto <D.11817>; else goto <D.11818>;
  <D.11817>:
  D.11819 = m;
  return D.11819;
  <D.11818>:
  <D.11812>:
  m = m->next;
  <D.7796>:
  if (m != 0B) goto <D.7795>; else goto <D.7797>;
  <D.7797>:
  i = i + 1;
  <D.7799>:
  if (i <= 9370) goto <D.7798>; else goto <D.7800>;
  <D.7800>:
  D.11819 = 0B;
  return D.11819;
}


lookup_unmanaged_symbol (uintptr_t addr)
{
  int usymbols_num.314;
  int D.11822;
  struct UnmanagedSymbol * * usymbols.315;
  unsigned int m.316;
  unsigned int D.11825;
  struct UnmanagedSymbol * * D.11826;
  unsigned int D.11827;
  struct UnmanagedSymbol * D.11830;
  unsigned int last_best.317;
  unsigned int D.11839;
  struct UnmanagedSymbol * * D.11840;
  struct UnmanagedSymbol * D.11841;
  unsigned int D.11842;
  unsigned int D.11843;
  int r;
  int l;
  struct UnmanagedSymbol * sym;
  int last_best;

  usymbols_num.314 = usymbols_num;
  r = usymbols_num.314 + -1;
  l = 0;
  last_best = -1;
  goto <D.7846>;
  <D.7845>:
  {
    int m;

    D.11822 = l + r;
    m = D.11822 / 2;
    usymbols.315 = usymbols;
    m.316 = (unsigned int) m;
    D.11825 = m.316 * 4;
    D.11826 = usymbols.315 + D.11825;
    sym = *D.11826;
    D.11827 = sym->addr;
    if (D.11827 == addr) goto <D.11828>; else goto <D.11829>;
    <D.11828>:
    D.11830 = sym;
    return D.11830;
    <D.11829>:
    D.11827 = sym->addr;
    if (D.11827 > addr) goto <D.11831>; else goto <D.11832>;
    <D.11831>:
    r = m + -1;
    goto <D.11833>;
    <D.11832>:
    D.11827 = sym->addr;
    if (D.11827 < addr) goto <D.11834>; else goto <D.11835>;
    <D.11834>:
    l = m + 1;
    last_best = m;
    <D.11835>:
    <D.11833>:
  }
  <D.7846>:
  if (r >= l) goto <D.7845>; else goto <D.7847>;
  <D.7847>:
  if (last_best >= 0) goto <D.11836>; else goto <D.11837>;
  <D.11836>:
  usymbols.315 = usymbols;
  last_best.317 = (unsigned int) last_best;
  D.11839 = last_best.317 * 4;
  D.11840 = usymbols.315 + D.11839;
  D.11841 = *D.11840;
  D.11842 = D.11841->addr;
  D.11843 = addr - D.11842;
  if (D.11843 <= 4095) goto <D.11844>; else goto <D.11845>;
  <D.11844>:
  usymbols.315 = usymbols;
  last_best.317 = (unsigned int) last_best;
  D.11839 = last_best.317 * 4;
  D.11840 = usymbols.315 + D.11839;
  D.11830 = *D.11840;
  return D.11830;
  <D.11845>:
  <D.11837>:
  D.11830 = 0B;
  return D.11830;
}


lookup_unmanaged_binary (uintptr_t addr)
{
  struct UnmanagedSymbol * * ubinaries.318;
  unsigned int i.319;
  unsigned int D.11849;
  struct UnmanagedSymbol * * D.11850;
  unsigned int D.11851;
  unsigned int D.11854;
  unsigned int D.11855;
  struct UnmanagedSymbol * D.11858;
  int ubinaries_num.320;
  int i;

  i = 0;
  goto <D.7864>;
  <D.7863>:
  {
    struct UnmanagedSymbol * ubin;

    ubinaries.318 = ubinaries;
    i.319 = (unsigned int) i;
    D.11849 = i.319 * 4;
    D.11850 = ubinaries.318 + D.11849;
    ubin = *D.11850;
    D.11851 = ubin->addr;
    if (D.11851 <= addr) goto <D.11852>; else goto <D.11853>;
    <D.11852>:
    D.11851 = ubin->addr;
    D.11854 = ubin->size;
    D.11855 = D.11851 + D.11854;
    if (D.11855 > addr) goto <D.11856>; else goto <D.11857>;
    <D.11856>:
    D.11858 = ubin;
    return D.11858;
    <D.11857>:
    <D.11853>:
  }
  i = i + 1;
  <D.7864>:
  ubinaries_num.320 = ubinaries_num;
  if (i < ubinaries_num.320) goto <D.7863>; else goto <D.7865>;
  <D.7865>:
  D.11858 = 0B;
  return D.11858;
}


set_usym_parent (struct UnmanagedSymbol * * cachedus, int count)
{
  unsigned int i.321;
  unsigned int D.11862;
  struct UnmanagedSymbol * * D.11863;
  struct UnmanagedSymbol * D.11864;
  unsigned int D.11865;
  int i;

  i = 0;
  goto <D.7883>;
  <D.7882>:
  {
    struct UnmanagedSymbol * ubin;

    i.321 = (unsigned int) i;
    D.11862 = i.321 * 4;
    D.11863 = cachedus + D.11862;
    D.11864 = *D.11863;
    D.11865 = D.11864->addr;
    ubin = lookup_unmanaged_binary (D.11865);
    i.321 = (unsigned int) i;
    D.11862 = i.321 * 4;
    D.11863 = cachedus + D.11862;
    D.11864 = *D.11863;
    if (D.11864 == ubin) goto <D.11866>; else goto <D.11867>;
    <D.11866>:
    // predicted unlikely by continue predictor.
    goto <D.7881>;
    <D.11867>:
    i.321 = (unsigned int) i;
    D.11862 = i.321 * 4;
    D.11863 = cachedus + D.11862;
    D.11864 = *D.11863;
    D.11864->parent = ubin;
  }
  <D.7881>:
  i = i + 1;
  <D.7883>:
  if (i < count) goto <D.7882>; else goto <D.7884>;
  <D.7884>:
}


sample_type_name (int type)
{
  const char * D.11869;

  switch (type) <default: <D.11870>, case 1: <D.7869>, case 2: <D.7870>, case 3: <D.7871>, case 4: <D.7872>, case 5: <D.7873>, case 6: <D.7874>>
  <D.7869>:
  D.11869 = "cycles";
  return D.11869;
  <D.7870>:
  D.11869 = "instructions retired";
  return D.11869;
  <D.7871>:
  D.11869 = "cache misses";
  return D.11869;
  <D.7872>:
  D.11869 = "cache references";
  return D.11869;
  <D.7873>:
  D.11869 = "executed branches";
  return D.11869;
  <D.7874>:
  D.11869 = "unpredicted branches";
  return D.11869;
  <D.11870>:
  D.11869 = "unknown";
  return D.11869;
}


sym_percent (uintptr_t sample_hits)
{
  int verbose.322;
  int D.11875;
  double D.11876;
  double D.11877;
  int num_stat_samples.323;
  double D.11879;
  _Bool D.11880;
  double pc;

  verbose.322 = verbose;
  if (verbose.322 != 0) goto <D.11873>; else goto <D.11874>;
  <D.11873>:
  D.11875 = 1;
  return D.11875;
  <D.11874>:
  D.11876 = (double) sample_hits;
  D.11877 = D.11876 * 1.0e+2;
  num_stat_samples.323 = num_stat_samples;
  D.11879 = (double) num_stat_samples.323;
  pc = D.11877 / D.11879;
  D.11880 = pc >= 1.000000000000000055511151231257827021181583404541015625e-1;
  D.11875 = (int) D.11880;
  return D.11875;
}


print_usym (struct UnmanagedSymbol * um)
{
  struct UnmanagedSymbol * D.11882;
  struct FILE * outfile.324;
  unsigned int D.11886;
  double D.11887;
  double D.11888;
  int num_stat_samples.325;
  double D.11890;
  double D.11891;
  char * D.11892;
  char * D.11893;

  D.11882 = um->parent;
  if (D.11882 != 0B) goto <D.11883>; else goto <D.11884>;
  <D.11883>:
  outfile.324 = outfile;
  D.11886 = um->sample_hits;
  D.11886 = um->sample_hits;
  D.11887 = (double) D.11886;
  D.11888 = D.11887 * 1.0e+2;
  num_stat_samples.325 = num_stat_samples;
  D.11890 = (double) num_stat_samples.325;
  D.11891 = D.11888 / D.11890;
  D.11892 = um->name;
  D.11882 = um->parent;
  D.11893 = D.11882->name;
  fprintf (outfile.324, "\t%6d %6.2f %-36s in %s\n", D.11886, D.11891, D.11892, D.11893);
  goto <D.11894>;
  <D.11884>:
  outfile.324 = outfile;
  D.11886 = um->sample_hits;
  D.11886 = um->sample_hits;
  D.11887 = (double) D.11886;
  D.11888 = D.11887 * 1.0e+2;
  num_stat_samples.325 = num_stat_samples;
  D.11890 = (double) num_stat_samples.325;
  D.11891 = D.11888 / D.11890;
  D.11892 = um->name;
  fprintf (outfile.324, "\t%6d %6.2f %s\n", D.11886, D.11891, D.11892);
  <D.11894>:
}


