pfe_pe_fw_load_cycles.isra.0 (const struct fw_load_ops_t * const ISRA.25, uint8_t pe_num)
{
  uint8_t ret;
  const struct fw_load_ops_t * _2;
  unsigned char _3;

  <bb 6> [local count: 1073741823]:
  # DEBUG pe s=> pe

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 1
  # DEBUG BEGIN_STMT
  _2 = ISRA.25_8(D);
  if (_2 != 0B)
    goto <bb 3>; [70.00%]
  else
    goto <bb 5>; [30.00%]

  <bb 3> [local count: 751619277]:
  # DEBUG BEGIN_STMT
  _3 = _2->pe_loaded_cnt;
  if (_3 <= pe_num_4(D))
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 4> [local count: 375809638]:
  # DEBUG BEGIN_STMT
  ret_5 = pe_num_4(D) / _3;
  # DEBUG ret => ret_5

  <bb 5> [local count: 1073741824]:
  # ret_6 = PHI <1(2), 1(3), ret_5(4)>
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  return ret_6;

}


oal_mutex_unlock.isra.0 (const oal_mutex_t ISRA.23)
{
  errno_t retval;
  short unsigned int _2;
  int _3;
  unsigned char _4;
  void (*<T4e5>) (void) _5;

  <bb 6> [local count: 1073741824]:
  # DEBUG mutex s=> mutex

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG retval => 22
  # DEBUG BEGIN_STMT
  _2 = ISRA.23_10(D);
  if (_2 <= 255)
    goto <bb 3>; [65.00%]
  else
    goto <bb 5>; [35.00%]

  <bb 3> [local count: 697932186]:
  # DEBUG BEGIN_STMT
  _3 = (int) _2;
  _4 = mutex_alloc[_3];
  if (_4 != 0)
    goto <bb 4>; [65.00%]
  else
    goto <bb 5>; [35.00%]

  <bb 4> [local count: 453655921]:
  # DEBUG BEGIN_STMT
  _5 = SchM_Exit_Eth_43_PFE_ETH_EXCLUSIVE_AREA_ID[_3];
  _5 ();
  # DEBUG BEGIN_STMT
  # DEBUG retval => 0

  <bb 5> [local count: 1073741824]:
  # retval_6 = PHI <22(2), 22(3), 0(4)>
  # DEBUG retval => retval_6
  # DEBUG BEGIN_STMT
  return retval_6;

}


oal_mutex_lock.isra.0 (const oal_mutex_t ISRA.21)
{
  errno_t retval;
  short unsigned int _2;
  int _3;
  unsigned char _4;
  void (*<T4e5>) (void) _5;

  <bb 6> [local count: 1073741824]:
  # DEBUG mutex s=> mutex

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG retval => 22
  # DEBUG BEGIN_STMT
  _2 = ISRA.21_10(D);
  if (_2 <= 255)
    goto <bb 3>; [65.00%]
  else
    goto <bb 5>; [35.00%]

  <bb 3> [local count: 697932186]:
  # DEBUG BEGIN_STMT
  _3 = (int) _2;
  _4 = mutex_alloc[_3];
  if (_4 != 0)
    goto <bb 4>; [65.00%]
  else
    goto <bb 5>; [35.00%]

  <bb 4> [local count: 453655921]:
  # DEBUG BEGIN_STMT
  _5 = SchM_Enter_Eth_43_PFE_ETH_EXCLUSIVE_AREA_ID[_3];
  _5 ();
  # DEBUG BEGIN_STMT
  # DEBUG retval => 0

  <bb 5> [local count: 1073741824]:
  # retval_6 = PHI <22(2), 22(3), 0(4)>
  # DEBUG retval => retval_6
  # DEBUG BEGIN_STMT
  return retval_6;

}


pfe_pe_put_data_nolock (struct pfe_pe_t * pe, struct pfe_ct_buffer_t * buf)
{
  union pfe_ct_pe_mmap_t mmap_data;
  errno_t ret;
  uint8_t flags;
  int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  unsigned char flags.19_13;
  unsigned char _14;
  unsigned char _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  long unsigned int _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  flags = 0;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 2
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_get_mmap (pe_30(D), &mmap_data);
  if (_1 != 0)
    goto <bb 6>; [35.00%]
  else
    goto <bb 3>; [65.00%]

  <bb 3> [local count: 697932186]:
  # DEBUG BEGIN_STMT
  # DEBUG class_mmap_data => &mmap_data.class_pe
  # DEBUG BEGIN_STMT
  _2 = MEM[(const struct pfe_ct_class_mmap_t *)&mmap_data].get_buffer;
  if (_2 != 0)
    goto <bb 4>; [47.77%]
  else
    goto <bb 6>; [52.23%]

  <bb 4> [local count: 333402205]:
  # DEBUG BEGIN_STMT
  _3 = _2 >> 24;
  _4 = _2 >> 8;
  _5 = _4 & 65280;
  _6 = _3 | _5;
  _7 = _2 << 8;
  _8 = _7 & 16711680;
  _9 = _6 | _8;
  _10 = _2 << 24;
  _11 = _9 | _10;
  _12 = _11 + 65;
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe_30(D), &flags, _12, 1);
  # DEBUG BEGIN_STMT
  flags.19_13 = flags;
  if (flags.19_13 == 0)
    goto <bb 5>; [47.77%]
  else
    goto <bb 6>; [52.23%]

  <bb 5> [local count: 159266233]:
  # DEBUG BEGIN_STMT
  _14 = buf_33(D)->flags;
  _15 = _14 | 1;
  buf_33(D)->flags = _15;
  # DEBUG BEGIN_STMT
  _16 = MEM[(const struct pfe_ct_class_mmap_t *)&mmap_data].get_buffer;
  _17 = _16 >> 24;
  _18 = _16 >> 8;
  _19 = _18 & 65280;
  _20 = _17 | _19;
  _21 = _16 << 8;
  _22 = _21 & 16711680;
  _23 = _20 | _22;
  _24 = _16 << 24;
  _25 = _23 | _24;
  pfe_pe_memcpy_from_host_to_dmem_32_nolock (pe_30(D), _25, buf_33(D), 66);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 6> [local count: 1073741824]:
  # ret_26 = PHI <2(2), 2(3), 0(5), 118(4)>
  # DEBUG ret => ret_26
  # DEBUG BEGIN_STMT
  flags ={v} {CLOBBER};
  mmap_data ={v} {CLOBBER};
  return ret_26;

}


pfe_pe_get_data_nolock (struct pfe_pe_t * pe, struct pfe_ct_buffer_t * buf)
{
  union pfe_ct_pe_mmap_t mmap_data;
  errno_t ret;
  uint8_t flags;
  int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  unsigned char flags.18_13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  long unsigned int _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;
  long unsigned int _26;
  long unsigned int _27;
  long unsigned int _28;
  long unsigned int _29;
  long unsigned int _30;
  long unsigned int _31;
  long unsigned int _32;
  long unsigned int _33;
  long unsigned int _34;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  flags = 0;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 2
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_get_mmap (pe_39(D), &mmap_data);
  if (_1 != 0)
    goto <bb 6>; [35.00%]
  else
    goto <bb 3>; [65.00%]

  <bb 3> [local count: 697932186]:
  # DEBUG BEGIN_STMT
  # DEBUG class_mmap_data => &mmap_data.class_pe
  # DEBUG BEGIN_STMT
  _2 = MEM[(const struct pfe_ct_class_mmap_t *)&mmap_data].put_buffer;
  if (_2 != 0)
    goto <bb 4>; [47.77%]
  else
    goto <bb 6>; [52.23%]

  <bb 4> [local count: 333402205]:
  # DEBUG BEGIN_STMT
  _3 = _2 >> 24;
  _4 = _2 >> 8;
  _5 = _4 & 65280;
  _6 = _3 | _5;
  _7 = _2 << 8;
  _8 = _7 & 16711680;
  _9 = _6 | _8;
  _10 = _2 << 24;
  _11 = _9 | _10;
  _12 = _11 + 65;
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe_39(D), &flags, _12, 1);
  # DEBUG BEGIN_STMT
  flags.18_13 = flags;
  if (flags.18_13 != 0)
    goto <bb 5>; [47.77%]
  else
    goto <bb 6>; [52.23%]

  <bb 5> [local count: 159266233]:
  # DEBUG BEGIN_STMT
  _14 = MEM[(const struct pfe_ct_class_mmap_t *)&mmap_data].put_buffer;
  _15 = _14 >> 24;
  _16 = _14 >> 8;
  _17 = _16 & 65280;
  _18 = _15 | _17;
  _19 = _14 << 8;
  _20 = _19 & 16711680;
  _21 = _18 | _20;
  _22 = _14 << 24;
  _23 = _21 | _22;
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe_39(D), buf_42(D), _23, 66);
  # DEBUG BEGIN_STMT
  flags = 0;
  # DEBUG BEGIN_STMT
  _24 = MEM[(const struct pfe_ct_class_mmap_t *)&mmap_data].put_buffer;
  _25 = _24 >> 24;
  _26 = _24 >> 8;
  _27 = _26 & 65280;
  _28 = _25 | _27;
  _29 = _24 << 8;
  _30 = _29 & 16711680;
  _31 = _28 | _30;
  _32 = _24 << 24;
  _33 = _31 | _32;
  _34 = _33 + 65;
  pfe_pe_memcpy_from_host_to_dmem_32_nolock (pe_39(D), _34, &flags, 1);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 6> [local count: 1073741824]:
  # ret_35 = PHI <2(2), 2(3), 0(5), 118(4)>
  # DEBUG ret => ret_35
  # DEBUG BEGIN_STMT
  flags ={v} {CLOBBER};
  mmap_data ={v} {CLOBBER};
  return ret_35;

}


pfe_pe_get_fw_state (struct pfe_pe_t * pe)
{
  struct pfe_ct_pe_sw_state_monitor_t state_monitor;
  int _1;
  pfe_ct_pe_sw_state_t _10;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  state_monitor = {};
  # DEBUG BEGIN_STMT
  pfe_pe_lock (pe_5(D));
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_get_state_monitor_nolock (pe_5(D), &state_monitor);
  if (_1 != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  state_monitor.state = 0;

  <bb 4> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  pfe_pe_unlock (pe_5(D));
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _10 = state_monitor.state;
  state_monitor ={v} {CLOBBER};
  return _10;

}


pfe_pe_get_class_algo_stats_nolock (struct pfe_pe_t * pe, uint32_t addr, struct pfe_ct_class_algo_stats_t * stats)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe_2(D), stats_3(D), addr_4(D), 16);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  return 0;

}


pfe_pe_get_classify_stats_nolock (struct pfe_pe_t * pe, uint32_t addr, struct pfe_ct_classify_stats_t * stats)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe_2(D), stats_3(D), addr_4(D), 184);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  return 0;

}


pfe_pe_check_stalled_nolock (struct pfe_pe_t * pe)
{
  static const char * states[11] = {"UNINIT", "INIT", "FRAMEWAIT", "FRAMEPARSE", "FRAMECLASSIFY", "FRAMEDISCARD", "FRAMEMODIFY", "FRAMESEND", "STOPPED", "EXCEPTION", "FAIL_STOP"};
  bool_t ret;
  struct pfe_ct_pe_sw_state_monitor_t state_monitor;
  int _1;
  <unnamed type> _2;
  <unnamed type> _3;
  <unnamed type> _4;
  int _5;
  <unnamed type> _6;
  unsigned char _7;
  int _8;
  const char * _9;
  unsigned char _10;
  <unnamed type> _11;
  long unsigned int _12;
  long unsigned int _13;
  <unnamed type> _14;
  int _15;
  <unnamed type> _16;
  unsigned char _17;
  int _18;
  int _19;
  const char * _20;
  long unsigned int _21;
  <unnamed type> _22;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_get_state_monitor_nolock (pe_30(D), &state_monitor);
  if (_1 != 0)
    goto <bb 11>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  _2 = state_monitor.state;
  if (_2 == 9)
    goto <bb 4>; [34.00%]
  else
    goto <bb 6>; [66.00%]

  <bb 4> [local count: 182536110]:
  _3 = pe_30(D)->prev_state;
  if (_3 != 9)
    goto <bb 5>; [48.88%]
  else
    goto <bb 6>; [51.12%]

  <bb 5> [local count: 89223651]:
  # DEBUG BEGIN_STMT
  _4 = pe_30(D)->type;
  _5 = (int) _4;
  _6 = hm_types[_5];
  _7 = pe_30(D)->id;
  _8 = (int) _7;
  _9 = states[9];
  pfe_hm_report (_6, 2, 181, "Core %d raised exception in state %s", _8, _9);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 1

  <bb 6> [local count: 536870913]:
  # ret_23 = PHI <0(3), 0(4), 1(5)>
  # DEBUG ret => ret_23
  # DEBUG BEGIN_STMT
  _10 = pe_30(D)->stalled;
  if (_10 == 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 7> [local count: 268435456]:
  _11 = state_monitor.state;
  if (_11 != 0)
    goto <bb 8>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 8> [local count: 134217728]:
  _12 = state_monitor.counter;
  _13 = pe_30(D)->counter;
  if (_12 == _13)
    goto <bb 9>; [20.24%]
  else
    goto <bb 10>; [79.76%]

  <bb 9> [local count: 27165668]:
  # DEBUG BEGIN_STMT
  _14 = pe_30(D)->type;
  _15 = (int) _14;
  _16 = hm_types[_15];
  _17 = pe_30(D)->id;
  _18 = (int) _17;
  _19 = (int) _11;
  _20 = states[_19];
  pfe_hm_report (_16, 2, 180, "Core %d stalled in state %s", _18, _20);
  # DEBUG BEGIN_STMT
  pe_30(D)->stalled = 1;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 1

  <bb 10> [local count: 536870913]:
  # ret_24 = PHI <ret_23(6), ret_23(7), ret_23(8), 1(9)>
  # DEBUG ret => ret_24
  # DEBUG BEGIN_STMT
  _21 = state_monitor.counter;
  pe_30(D)->counter = _21;
  # DEBUG BEGIN_STMT
  _22 = state_monitor.state;
  pe_30(D)->prev_state = _22;

  <bb 11> [local count: 1073741824]:
  # ret_25 = PHI <0(2), ret_24(10)>
  # DEBUG ret => ret_25
  # DEBUG BEGIN_STMT
  state_monitor ={v} {CLOBBER};
  return ret_25;

}


pfe_pe_get_pe_stats_nolock (struct pfe_pe_t * pe, uint32_t addr, struct pfe_ct_pe_stats_t * stats)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe_2(D), stats_3(D), addr_4(D), 52);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  return 0;

}


pfe_pe_check_mmap (const struct pfe_pe_t * pe)
{
  errno_t ret;
  union pfe_ct_pe_mmap_t pfe_pe_mmap;
  int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_get_mmap (pe_4(D), &pfe_pe_mmap);
  if (_1 != 0)
    goto <bb 4>; [35.00%]
  else
    goto <bb 3>; [65.00%]

  <bb 3> [local count: 697932186]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 4> [local count: 1073741824]:
  # ret_2 = PHI <2(2), 0(3)>
  # DEBUG ret => ret_2
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_pe_mmap ={v} {CLOBBER};
  return ret_2;

}


pfe_pe_get_fw_messages_nolock (struct pfe_pe_t * pe)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  return 0;

}


pfe_pe_get_fw_feature_entry (struct pfe_pe_t * pe, uint32_t id, struct pfe_ct_feature_desc_t * * entry)
{
  union pfe_ct_pe_mmap_t pfe_pe_mmap;
  uint32_t entry_ptr;
  void * _1;
  long unsigned int _2;
  int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  long unsigned int _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;
  void * _26;
  long unsigned int _27;
  long unsigned int _28;
  long unsigned int _29;
  long unsigned int _30;
  long unsigned int _31;
  uint32_t * _32;
  long unsigned int _33;
  long unsigned int _34;
  long unsigned int _35;
  long unsigned int _36;
  long unsigned int _37;
  long unsigned int _38;
  long unsigned int _39;
  long unsigned int _40;
  long unsigned int _41;
  long unsigned int _42;
  struct pfe_ct_feature_desc_t * _43;
  errno_t _44;
  errno_t _45;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pe_50(D)->fw_feature_section;
  if (_1 == 0B)
    goto <bb 11>; [10.63%]
  else
    goto <bb 3>; [89.37%]

  <bb 3> [local count: 959603067]:
  # DEBUG BEGIN_STMT
  _2 = pe_50(D)->fw_features_base;
  if (_2 == 4294967295)
    goto <bb 4>; [20.24%]
  else
    goto <bb 9>; [79.76%]

  <bb 4> [local count: 194223661]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = pfe_pe_get_mmap (pe_50(D), &pfe_pe_mmap);
  if (_3 != 0)
    goto <bb 8>; [34.00%]
  else
    goto <bb 5>; [66.00%]

  <bb 5> [local count: 128187616]:
  # DEBUG BEGIN_STMT
  _4 = pfe_pe_mmap.common.version.features;
  _5 = _4 >> 24;
  _6 = _4 >> 8;
  _7 = _6 & 65280;
  _8 = _5 | _7;
  _9 = _4 << 8;
  _10 = _9 & 16711680;
  _11 = _8 | _10;
  _12 = _4 << 24;
  _13 = _11 | _12;
  pe_50(D)->fw_features_base = _13;
  # DEBUG BEGIN_STMT
  _14 = pe_50(D)->fw_feature_section_size;
  if (_13 > _14)
    goto <bb 6>; [34.00%]
  else
    goto <bb 7>; [66.00%]

  <bb 6> [local count: 43583789]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pe_50(D)->fw_features_base = 4294967295;
  # DEBUG BEGIN_STMT
  goto <bb 8>; [100.00%]

  <bb 7> [local count: 84603827]:
  # DEBUG BEGIN_STMT
  _15 = pfe_pe_mmap.common.version.features_count;
  _16 = _15 >> 24;
  _17 = _15 >> 8;
  _18 = _17 & 65280;
  _19 = _16 | _18;
  _20 = _15 << 8;
  _21 = _20 & 16711680;
  _22 = _19 | _21;
  _23 = _15 << 24;
  _24 = _22 | _23;
  pe_50(D)->fw_features_size = _24;
  pfe_pe_mmap ={v} {CLOBBER};
  goto <bb 9>; [100.00%]

  <bb 8> [local count: 109619834]:
  # _44 = PHI <2(4), 5(6)>
  pfe_pe_mmap ={v} {CLOBBER};
  goto <bb 11>; [100.00%]

  <bb 9> [local count: 849983233]:
  # DEBUG BEGIN_STMT
  _25 = pe_50(D)->fw_features_size;
  if (_25 > id_57(D))
    goto <bb 10>; [48.89%]
  else
    goto <bb 11>; [51.11%]

  <bb 10> [local count: 415556802]:
  # DEBUG BEGIN_STMT
  _26 = pe_50(D)->fw_feature_section;
  _27 = (long unsigned int) _26;
  _28 = pe_50(D)->fw_features_base;
  _29 = id_57(D) * 4;
  _30 = _28 + _29;
  _31 = _27 + _30;
  _32 = (uint32_t *) _31;
  _33 = *_32;
  _34 = _33 >> 24;
  _35 = _33 >> 8;
  _36 = _35 & 65280;
  _37 = _34 | _36;
  _38 = _33 << 8;
  _39 = _38 & 16711680;
  _40 = _37 | _39;
  _41 = _33 << 24;
  entry_ptr_58 = _40 | _41;
  # DEBUG entry_ptr => entry_ptr_58
  # DEBUG BEGIN_STMT
  _42 = _27 + entry_ptr_58;
  _43 = (struct pfe_ct_feature_desc_t *) _42;
  *entry_59(D) = _43;
  # DEBUG BEGIN_STMT

  <bb 11> [local count: 1073741824]:
  # _45 = PHI <2(2), _44(8), 0(10), 2(9)>
  return _45;

}


pfe_pe_get_fw_feature_str_base (const struct pfe_pe_t * pe)
{
  char * str;
  long unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG str => 0B
  # DEBUG BEGIN_STMT
  _1 = pe_4(D)->fw_features_base;
  if (_1 != 4294967295)
    goto <bb 3>; [82.62%]
  else
    goto <bb 4>; [17.38%]

  <bb 3> [local count: 887125496]:
  # DEBUG BEGIN_STMT
  str_5 = pe_4(D)->fw_feature_section;
  # DEBUG str => str_5

  <bb 4> [local count: 1073741824]:
  # str_2 = PHI <0B(2), str_5(3)>
  # DEBUG str => str_2
  # DEBUG BEGIN_STMT
  return str_2;

}


pfe_pe_destroy (struct pfe_pe_t * pe, uint32_t pe_num)
{
  uint32_t pe_idx;
  long unsigned int _1;
  struct pfe_pe_t * _2;
  oal_mutex_t * _3;

  <bb 2> [local count: 337461715]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (pe_7(D) != 0B)
    goto <bb 3>; [70.00%]
  else
    goto <bb 6>; [30.00%]

  <bb 3> [local count: 236223200]:
  if (pe_num_9(D) != 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 7> [local count: 118111600]:
  goto <bb 5>; [100.00%]

  <bb 4> [local count: 955630225]:
  # DEBUG BEGIN_STMT
  _1 = pe_idx_4 * 112;
  _2 = pe_7(D) + _1;
  _2->mmap_data = 0B;
  # DEBUG BEGIN_STMT
  _2->fw_msg_section = 0B;
  # DEBUG BEGIN_STMT
  _2->fw_msg_section_size = 0;
  # DEBUG BEGIN_STMT
  _2->fw_feature_section = 0B;
  # DEBUG BEGIN_STMT
  _2->fw_feature_section_size = 0;
  # DEBUG BEGIN_STMT
  _3 = &_2->lock_mutex;
  oal_mutex_destroy (_3);
  # DEBUG BEGIN_STMT
  pe_idx_16 = pe_idx_4 + 1;
  # DEBUG pe_idx => pe_idx_16

  <bb 5> [local count: 1073741824]:
  # pe_idx_4 = PHI <pe_idx_16(4), 0(7)>
  # DEBUG pe_idx => pe_idx_4
  # DEBUG BEGIN_STMT
  if (pe_idx_4 < pe_num_9(D))
    goto <bb 4>; [89.00%]
  else
    goto <bb 6>; [11.00%]

  <bb 6> [local count: 337461716]:
  return;

}


pfe_pe_get_mmap (const struct pfe_pe_t * pe, union pfe_ct_pe_mmap_t * mmap)
{
  errno_t ret;
  union pfe_ct_pe_mmap_t * _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pe_5(D)->mmap_data;
  if (_1 != 0B)
    goto <bb 3>; [68.09%]
  else
    goto <bb 4>; [31.91%]

  <bb 3> [local count: 731110809]:
  # DEBUG BEGIN_STMT
  memcpy (mmap_6(D), _1, 188);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 4> [local count: 1073741824]:
  # ret_2 = PHI <0(3), 2(2)>
  # DEBUG ret => ret_2
  # DEBUG BEGIN_STMT
  return ret_2;

}


pfe_pe_load_firmware (struct pfe_pe_t * pe, uint32_t pe_num, const void * elf)
{
  static const char_t mmap_version_str[33] = "92367c0e25f21f49217a9b08168ad2c8";
  void * messages_mem;
  void * features_mem;
  uint32_t messages_size;
  uint32_t features_size;
  const struct Elf32_Shdr * shdr;
  uint32_t mask_sectIdx;
  uint32_t section_idx;
  errno_t ret;
  uint32_t pe_idx;
  uint32_t ii;
  long unsigned int _1;
  struct pfe_pe_t * _2;
  unsigned char _3;
  long unsigned int _4;
  struct pfe_pe_t * _5;
  const struct fw_load_ops_t * _6;
  void (*<T984>) (struct pfe_pe_tag *, pfe_pe_mem_t, uint32_t, addr_t, uint32_t) _7;
  unsigned int _8;
  const struct fw_load_ops_t * _9;
  void (*<T984>) (struct pfe_pe_tag *, pfe_pe_mem_t, uint32_t, addr_t, uint32_t) _10;
  unsigned int _11;
  unsigned char _12;
  long unsigned int _13;
  unsigned char _14;
  long unsigned int section_idx.8_15;
  struct Elf32_Shdr * _16;
  long unsigned int _17;
  const void * _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  long unsigned int _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;
  long unsigned int _26;
  long unsigned int _27;
  long unsigned int _28;
  long unsigned int _29;
  long unsigned int _30;
  const void * _31;
  long unsigned int _32;
  long unsigned int _33;
  long unsigned int _34;
  long unsigned int _35;
  long unsigned int _36;
  long unsigned int _37;
  long unsigned int _38;
  long unsigned int _39;
  long unsigned int _40;
  int _41;
  unsigned char _42;
  long unsigned int section_idx.14_43;
  struct Elf32_Shdr * _44;
  long unsigned int _45;
  const void * _46;
  long unsigned int _47;
  long unsigned int _48;
  long unsigned int _49;
  long unsigned int _50;
  long unsigned int _51;
  long unsigned int _52;
  long unsigned int _53;
  long unsigned int _54;
  long unsigned int _55;
  long unsigned int _56;
  long unsigned int _57;
  long unsigned int _58;
  long unsigned int _59;
  long unsigned int _60;
  long unsigned int _61;
  long unsigned int _62;
  long unsigned int _63;
  long unsigned int _64;
  long unsigned int _65;
  unsigned char _66;
  long unsigned int section_idx.15_67;
  struct Elf32_Shdr * _68;
  long unsigned int _69;
  const void * _70;
  long unsigned int _71;
  long unsigned int _72;
  long unsigned int _73;
  long unsigned int _74;
  long unsigned int _75;
  long unsigned int _76;
  long unsigned int _77;
  long unsigned int _78;
  long unsigned int _79;
  long unsigned int _80;
  long unsigned int _81;
  long unsigned int _82;
  long unsigned int _83;
  long unsigned int _84;
  long unsigned int _85;
  long unsigned int _86;
  long unsigned int _87;
  long unsigned int _88;
  long unsigned int _89;
  long unsigned int _90;
  long unsigned int _91;
  unsigned char _92;
  long unsigned int _93;
  struct pfe_pe_t * _94;
  errno_t _102;
  unsigned int _117;
  const struct fw_load_ops_t * _149;

  <bb 2> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  section_idx = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG elf_file => elf_110(D)
  # DEBUG BEGIN_STMT
  # DEBUG shdr => 0B
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG features_size => 0
  # DEBUG messages_size => 0
  # DEBUG BEGIN_STMT
  # DEBUG features_mem => 0B
  # DEBUG messages_mem => 0B
  # DEBUG BEGIN_STMT
  # DEBUG pe_idx => 0
  goto <bb 4>; [100.00%]

  <bb 3> [local count: 929350397]:
  # DEBUG BEGIN_STMT
  _1 = pe_idx_96 * 112;
  _2 = pe_112(D) + _1;
  pfe_pe_lock (_2);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pe_idx_148 = pe_idx_96 + 1;
  # DEBUG pe_idx => pe_idx_148

  <bb 4> [local count: 1044213930]:
  # pe_idx_96 = PHI <0(2), pe_idx_148(3)>
  # DEBUG pe_idx => pe_idx_96
  # DEBUG BEGIN_STMT
  if (pe_idx_96 < pe_num_111(D))
    goto <bb 3>; [89.00%]
  else
    goto <bb 5>; [11.00%]

  <bb 5> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  _3 = (unsigned char) pe_num_111(D);
  pfe_pe_fw_install_ops (pe_112(D), _3);
  # DEBUG ret => NULL
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG pe_idx => 0
  goto <bb 8>; [100.00%]

  <bb 6> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _4 = pe_idx_97 * 112;
  _5 = pe_112(D) + _4;
  _6 = _5->fw_load_ops;
  if (_6 == 0B)
    goto <bb 21>; [5.50%]
  else
    goto <bb 7>; [94.50%]

  <bb 7> [local count: 958878294]:
  # DEBUG BEGIN_STMT
  _7 = _6->pe_memset;
  _8 = _5->dmem_size;
  _7 (_5, 0, 0, 0, _8);
  # DEBUG BEGIN_STMT
  _9 = _5->fw_load_ops;
  _10 = _9->pe_memset;
  _11 = _5->imem_size;
  _10 (_5, 1, 0, 0, _11);
  # DEBUG BEGIN_STMT
  pe_idx_145 = pe_idx_97 + 1;
  # DEBUG pe_idx => pe_idx_145

  <bb 8> [local count: 1073741824]:
  # pe_idx_97 = PHI <0(5), pe_idx_145(7)>
  # DEBUG pe_idx => pe_idx_97
  # DEBUG BEGIN_STMT
  _149 = MEM[(const struct fw_load_ops_t * *)pe_112(D) + 60B];
  # DEBUG D#3 => pe_112(D)
  _12 = pfe_pe_fw_load_cycles.isra.0 (_149, _3);
  _13 = (long unsigned int) _12;
  if (_13 > pe_idx_97)
    goto <bb 6>; [94.50%]
  else
    goto <bb 9>; [5.50%]

  <bb 9> [local count: 59055800]:
  # DEBUG BEGIN_STMT
  _14 = ELF_SectFindName (elf_110(D), ".pfe_pe_mmap", &section_idx, 0B, 0B);
  if (_14 == 1)
    goto <bb 10>; [34.00%]
  else
    goto <bb 12>; [66.00%]

  <bb 10> [local count: 20078972]:
  # DEBUG BEGIN_STMT
  section_idx.8_15 = section_idx;
  mask_sectIdx_115 = section_idx.8_15 & 2147483647;
  # DEBUG mask_sectIdx => mask_sectIdx_115
  # DEBUG BEGIN_STMT
  _16 = MEM[(const struct ELF_File_t *)elf_110(D)].arSectHead32;
  _17 = mask_sectIdx_115 * 40;
  shdr_116 = _16 + _17;
  # DEBUG shdr => shdr_116
  # DEBUG BEGIN_STMT
  _18 = MEM[(const struct ELF_File_t *)elf_110(D)].pvData;
  _19 = (long unsigned int) _18;
  _20 = shdr_116->sh_offset;
  _21 = _20 >> 24;
  _22 = _20 << 24;
  _23 = _21 | _22;
  _24 = _20 >> 8;
  _25 = _24 & 65280;
  _26 = _23 | _25;
  _27 = _20 << 8;
  _28 = _27 & 16711680;
  _29 = _26 | _28;
  _30 = _19 + _29;
  _31 = (const void *) _30;
  _117 = MEM[(char * {ref-all})_31];
  # DEBUG mmap_size => _117
  # DEBUG BEGIN_STMT
  _32 = _117 >> 24;
  _33 = _117 >> 8;
  _34 = _33 & 65280;
  _35 = _32 | _34;
  _36 = _117 << 8;
  _37 = _36 & 16711680;
  _38 = _35 | _37;
  _39 = _117 << 24;
  _40 = _38 | _39;
  # DEBUG mmap_size => _40
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  memcpy (&tmp_mmap, _31, _40);
  # DEBUG BEGIN_STMT
  _41 = strcmp (&mmap_version_str, &tmp_mmap.common.version.cthdr);
  if (_41 != 0)
    goto <bb 11>; [12.02%]
  else
    goto <bb 12>; [87.98%]

  <bb 11> [local count: 2413492]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22
  # DEBUG BEGIN_STMT
  # DEBUG D#4 => &tmp_mmap
  # DEBUG INLINE_ENTRY NULL
  # DEBUG fw_mmap => D#4
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_pe_free_mem (pe_112(D), pe_num_111(D));
  # DEBUG BEGIN_STMT
  goto <bb 21>; [100.00%]

  <bb 12> [local count: 56642308]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _42 = ELF_SectFindName (elf_110(D), ".messages", &section_idx, 0B, 0B);
  if (_42 == 1)
    goto <bb 13>; [34.00%]
  else
    goto <bb 14>; [66.00%]

  <bb 13> [local count: 19258385]:
  # DEBUG BEGIN_STMT
  section_idx.14_43 = section_idx;
  mask_sectIdx_121 = section_idx.14_43 & 2147483647;
  # DEBUG mask_sectIdx => mask_sectIdx_121
  # DEBUG BEGIN_STMT
  _44 = MEM[(const struct ELF_File_t *)elf_110(D)].arSectHead32;
  _45 = mask_sectIdx_121 * 40;
  shdr_122 = _44 + _45;
  # DEBUG shdr => shdr_122
  # DEBUG BEGIN_STMT
  _46 = MEM[(const struct ELF_File_t *)elf_110(D)].pvData;
  _47 = shdr_122->sh_offset;
  _48 = _47 >> 24;
  _49 = _47 << 24;
  _50 = _48 | _49;
  _51 = _47 >> 8;
  _52 = _51 & 65280;
  _53 = _50 | _52;
  _54 = _47 << 8;
  _55 = _54 & 16711680;
  _56 = _53 | _55;
  messages_mem_123 = _46 + _56;
  # DEBUG messages_mem => messages_mem_123
  # DEBUG BEGIN_STMT
  _57 = shdr_122->sh_size;
  _58 = _57 >> 24;
  _59 = _57 << 24;
  _60 = _58 | _59;
  _61 = _57 >> 8;
  _62 = _61 & 65280;
  _63 = _60 | _62;
  _64 = _57 << 8;
  _65 = _64 & 16711680;
  messages_size_124 = _63 | _65;
  # DEBUG messages_size => messages_size_124

  <bb 14> [local count: 56642308]:
  # messages_size_99 = PHI <0(12), messages_size_124(13)>
  # messages_mem_101 = PHI <0B(12), messages_mem_123(13)>
  # DEBUG messages_mem => messages_mem_101
  # DEBUG messages_size => messages_size_99
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _66 = ELF_SectFindName (elf_110(D), ".features", &section_idx, 0B, 0B);
  if (_66 == 1)
    goto <bb 15>; [34.00%]
  else
    goto <bb 16>; [66.00%]

  <bb 15> [local count: 19258385]:
  # DEBUG BEGIN_STMT
  section_idx.15_67 = section_idx;
  mask_sectIdx_126 = section_idx.15_67 & 2147483647;
  # DEBUG mask_sectIdx => mask_sectIdx_126
  # DEBUG BEGIN_STMT
  _68 = MEM[(const struct ELF_File_t *)elf_110(D)].arSectHead32;
  _69 = mask_sectIdx_126 * 40;
  shdr_127 = _68 + _69;
  # DEBUG shdr => shdr_127
  # DEBUG BEGIN_STMT
  _70 = MEM[(const struct ELF_File_t *)elf_110(D)].pvData;
  _71 = (long unsigned int) _70;
  _72 = shdr_127->sh_offset;
  _73 = _72 >> 24;
  _74 = _72 << 24;
  _75 = _73 | _74;
  _76 = _72 >> 8;
  _77 = _76 & 65280;
  _78 = _75 | _77;
  _79 = _72 << 8;
  _80 = _79 & 16711680;
  _81 = _78 | _80;
  _82 = _71 + _81;
  features_mem_128 = (void *) _82;
  # DEBUG features_mem => features_mem_128
  # DEBUG BEGIN_STMT
  _83 = shdr_127->sh_size;
  _84 = _83 >> 24;
  _85 = _83 << 24;
  _86 = _84 | _85;
  _87 = _83 >> 8;
  _88 = _87 & 65280;
  _89 = _86 | _88;
  _90 = _83 << 8;
  _91 = _90 & 16711680;
  features_size_129 = _89 | _91;
  # DEBUG features_size => features_size_129

  <bb 16> [local count: 56642308]:
  # features_size_98 = PHI <0(14), features_size_129(15)>
  # features_mem_100 = PHI <0B(14), features_mem_128(15)>
  # DEBUG features_mem => features_mem_100
  # DEBUG features_size => features_size_98
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _92 = MEM[(const struct ELF_File_t *)elf_110(D)].Header.e_ident[5];
  if (_92 == 1)
    goto <bb 17>; [12.50%]
  else
    goto <bb 18>; [87.50%]

  <bb 17> [local count: 7080288]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22
  # DEBUG BEGIN_STMT
  pfe_pe_free_mem (pe_112(D), pe_num_111(D));
  # DEBUG BEGIN_STMT
  goto <bb 21>; [100.00%]

  <bb 18> [local count: 49562019]:
  # DEBUG BEGIN_STMT
  ret_131 = pfe_pe_upload_sections (pe_112(D), pe_num_111(D), elf_110(D));
  # DEBUG ret => ret_131
  # DEBUG BEGIN_STMT
  if (ret_131 == 0)
    goto <bb 22>; [50.00%]
  else
    goto <bb 21>; [50.00%]

  <bb 22> [local count: 24781010]:
  goto <bb 20>; [100.00%]

  <bb 19> [local count: 200500898]:
  # DEBUG BEGIN_STMT
  _93 = ii_95 * 112;
  _94 = pe_112(D) + _93;
  pfe_pe_unlock (_94);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _94->mmap_data = &tmp_mmap;
  # DEBUG BEGIN_STMT
  _94->fw_msg_section_size = messages_size_99;
  # DEBUG BEGIN_STMT
  _94->fw_msg_section = messages_mem_101;
  # DEBUG BEGIN_STMT
  _94->fw_feature_section_size = features_size_98;
  # DEBUG BEGIN_STMT
  _94->fw_feature_section = features_mem_100;
  # DEBUG BEGIN_STMT
  _94->fw_features_base = 4294967295;
  # DEBUG BEGIN_STMT
  _94->last_message_write_index = 0;
  # DEBUG BEGIN_STMT
  _94->message_record_addr = 0;
  # DEBUG BEGIN_STMT
  ii_141 = ii_95 + 1;
  # DEBUG ii => ii_141

  <bb 20> [local count: 225281908]:
  # ii_95 = PHI <ii_141(19), 0(22)>
  # DEBUG ii => ii_95
  # DEBUG BEGIN_STMT
  if (ii_95 < pe_num_111(D))
    goto <bb 19>; [89.00%]
  else
    goto <bb 21>; [11.00%]

  <bb 21> [local count: 114863532]:
  # _102 = PHI <19(6), 22(11), 22(17), ret_131(20), ret_131(18)>
  section_idx ={v} {CLOBBER};
  # DEBUG D#7 => {CLOBBER}
  # DEBUG mmap_size => D#7
  return _102;

}


pfe_pe_mem_default_init (struct pfe_pe_t * pe, uint32_t pe_num)
{
  errno_t ret;
  uint32_t pe_idx;
  long unsigned int _1;
  struct pfe_pe_t * _2;
  unsigned char _3;
  long unsigned int _4;
  struct pfe_pe_t * _5;
  const struct fw_load_ops_t * _6;
  void (*<T984>) (struct pfe_pe_tag *, pfe_pe_mem_t, uint32_t, addr_t, uint32_t) _7;
  unsigned int _8;
  const struct fw_load_ops_t * _9;
  void (*<T984>) (struct pfe_pe_tag *, pfe_pe_mem_t, uint32_t, addr_t, uint32_t) _10;
  unsigned int _11;
  unsigned char _13;
  long unsigned int _14;
  long unsigned int _15;
  struct pfe_pe_t * _16;
  const struct fw_load_ops_t * _37;

  <bb 2> [local count: 118111599]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG pe_idx => 0
  goto <bb 4>; [100.00%]

  <bb 3> [local count: 955630214]:
  # DEBUG BEGIN_STMT
  _1 = pe_idx_17 * 112;
  _2 = pe_27(D) + _1;
  pfe_pe_lock (_2);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pe_idx_36 = pe_idx_17 + 1;
  # DEBUG pe_idx => pe_idx_36

  <bb 4> [local count: 1073741815]:
  # pe_idx_17 = PHI <0(2), pe_idx_36(3)>
  # DEBUG pe_idx => pe_idx_17
  # DEBUG BEGIN_STMT
  if (pe_idx_17 < pe_num_26(D))
    goto <bb 3>; [89.00%]
  else
    goto <bb 5>; [11.00%]

  <bb 5> [local count: 118111599]:
  # DEBUG BEGIN_STMT
  _3 = (unsigned char) pe_num_26(D);
  ret_29 = pfe_pe_fw_install_ops (pe_27(D), _3);
  # DEBUG ret => ret_29
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG pe_idx => 0
  goto <bb 9>; [100.00%]

  <bb 6> [local count: 955630217]:
  # DEBUG BEGIN_STMT
  _4 = pe_idx_18 * 112;
  _5 = pe_27(D) + _4;
  _6 = _5->fw_load_ops;
  if (_6 == 0B)
    goto <bb 7>; [30.00%]
  else
    goto <bb 8>; [70.00%]

  <bb 7> [local count: 286689065]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 19

  <bb 8> [local count: 955630217]:
  # ret_20 = PHI <ret_21(6), 19(7)>
  # DEBUG ret => ret_20
  # DEBUG BEGIN_STMT
  _7 = _6->pe_memset;
  _8 = _5->dmem_size;
  _7 (_5, 0, 0, 0, _8);
  # DEBUG BEGIN_STMT
  _9 = _5->fw_load_ops;
  _10 = _9->pe_memset;
  _11 = _5->imem_size;
  _10 (_5, 1, 0, 0, _11);
  # DEBUG BEGIN_STMT
  pe_idx_34 = pe_idx_18 + 1;
  # DEBUG pe_idx => pe_idx_34

  <bb 9> [local count: 1073741818]:
  # pe_idx_18 = PHI <0(5), pe_idx_34(8)>
  # ret_21 = PHI <ret_29(5), ret_20(8)>
  # DEBUG ret => ret_21
  # DEBUG pe_idx => pe_idx_18
  # DEBUG BEGIN_STMT
  _37 = MEM[(const struct fw_load_ops_t * *)pe_27(D) + 60B];
  # DEBUG D#3 => pe_27(D)
  _13 = pfe_pe_fw_load_cycles.isra.0 (_37, _3);
  _14 = (long unsigned int) _13;
  if (_14 > pe_idx_18)
    goto <bb 6>; [89.00%]
  else
    goto <bb 10>; [11.00%]

  <bb 10> [local count: 118111600]:
  # ret_12 = PHI <ret_21(9)>
  goto <bb 12>; [100.00%]

  <bb 11> [local count: 955630224]:
  # DEBUG BEGIN_STMT
  _15 = pe_idx_19 * 112;
  _16 = pe_27(D) + _15;
  pfe_pe_unlock (_16);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pe_idx_31 = pe_idx_19 + 1;
  # DEBUG pe_idx => pe_idx_31

  <bb 12> [local count: 1073741824]:
  # pe_idx_19 = PHI <pe_idx_31(11), 0(10)>
  # DEBUG pe_idx => pe_idx_19
  # DEBUG BEGIN_STMT
  if (pe_idx_19 < pe_num_26(D))
    goto <bb 11>; [89.00%]
  else
    goto <bb 13>; [11.00%]

  <bb 13> [local count: 118111601]:
  # DEBUG BEGIN_STMT
  return ret_12;

}


pfe_pe_set_iaccess (struct pfe_pe_t * pe, uint32_t wdata_reg, uint32_t rdata_reg, uint32_t addr_reg)
{
  unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = pe_6(D)->cbus_base_va;
  _2 = _1 + addr_reg_7(D);
  pe_6(D)->mem_access_addr = _2;
  # DEBUG BEGIN_STMT
  _3 = _1 + rdata_reg_9(D);
  pe_6(D)->mem_access_rdata = _3;
  # DEBUG BEGIN_STMT
  _4 = _1 + wdata_reg_11(D);
  pe_6(D)->mem_access_wdata = _4;
  return;

}


pfe_pe_set_lmem (struct pfe_pe_t * pe, addr_t elf_base, addr_t len)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  pe_2(D)->lmem_base_addr_pa = elf_base_3(D);
  # DEBUG BEGIN_STMT
  pe_2(D)->lmem_size = len_5(D);
  return;

}


pfe_pe_set_imem (struct pfe_pe_t * pe, addr_t elf_base, addr_t len)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  pe_2(D)->imem_elf_base_va = elf_base_3(D);
  # DEBUG BEGIN_STMT
  pe_2(D)->imem_size = len_5(D);
  return;

}


pfe_pe_set_dmem (struct pfe_pe_t * pe, addr_t elf_base, addr_t len)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  pe_2(D)->dmem_elf_base_va = elf_base_3(D);
  # DEBUG BEGIN_STMT
  pe_2(D)->dmem_size = len_5(D);
  return;

}


pfe_pe_create (addr_t cbus_base_va, pfe_ct_pe_type_t type, uint8_t id, struct pfe_pe_t * pe)
{
  struct pfe_pe_t * tmp_pe;
  unsigned char _1;
  oal_mutex_t * _2;
  int _15;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG tmp_pe => pe_5(D)
  # DEBUG BEGIN_STMT
  _1 = type_6(D) + 255;
  if (_1 <= 2)
    goto <bb 3>; [33.00%]
  else
    goto <bb 5>; [67.00%]

  <bb 3> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  memset (pe_5(D), 0, 112);
  # DEBUG BEGIN_STMT
  pe_5(D)->type = type_6(D);
  # DEBUG BEGIN_STMT
  pe_5(D)->cbus_base_va = cbus_base_va_10(D);
  # DEBUG BEGIN_STMT
  pe_5(D)->id = id_12(D);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pe_5(D)->lock_mutex = 5;
  # DEBUG BEGIN_STMT
  _2 = &pe_5(D)->lock_mutex;
  # DEBUG mutex => _2
  # DEBUG INLINE_ENTRY oal_mutex_init
  # DEBUG BEGIN_STMT
  _15 = oal_mutex_init_internal (_2);
  # DEBUG mutex => NULL
  if (_15 != 0)
    goto <bb 4>; [29.00%]
  else
    goto <bb 5>; [71.00%]

  <bb 4> [local count: 102757093]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG tmp_pe => 0B

  <bb 5> [local count: 1073741824]:
  # tmp_pe_3 = PHI <pe_5(D)(2), pe_5(D)(3), 0B(4)>
  # DEBUG tmp_pe => tmp_pe_3
  # DEBUG BEGIN_STMT
  return tmp_pe_3;

}


pfe_pe_get_elf_sect_load_addr (const struct ELF_File_t * elf_file, const struct Elf32_Shdr * shdr)
{
  uint_t ii;
  const struct Elf32_Phdr * phdr;
  addr_t load_addr;
  addr_t virt_addr;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  struct Elf32_Phdr * _12;
  unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  long unsigned int _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;
  long unsigned int _26;
  long unsigned int _27;
  long unsigned int _28;
  long unsigned int _29;
  long unsigned int _30;
  long unsigned int _31;
  long unsigned int _32;
  long unsigned int _33;
  long unsigned int _34;
  long unsigned int _35;
  long unsigned int _36;
  long unsigned int _37;
  long unsigned int _38;
  long unsigned int _39;
  long unsigned int _40;
  long unsigned int _41;
  long unsigned int _42;
  long unsigned int _43;
  long unsigned int _44;
  long unsigned int _45;
  long unsigned int _46;
  long unsigned int _47;
  long unsigned int _48;
  long unsigned int _49;
  long unsigned int _50;
  long unsigned int _51;
  long unsigned int _52;
  long unsigned int _53;
  long unsigned int _54;
  long unsigned int _55;
  short unsigned int _56;
  unsigned int _57;
  unsigned int _63;

  <bb 2> [local count: 86959666]:
  # DEBUG BEGIN_STMT
  _1 = shdr_61(D)->sh_addr;
  _2 = _1 >> 24;
  _4 = _1 << 24;
  _5 = _2 | _4;
  _7 = _1 >> 8;
  _8 = _7 & 65280;
  _9 = _5 | _8;
  _10 = _1 << 8;
  _11 = _10 & 16711680;
  virt_addr_62 = _9 | _11;
  # DEBUG virt_addr => virt_addr_62
  # DEBUG BEGIN_STMT
  # DEBUG load_addr => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG stt => 0
  # DEBUG BEGIN_STMT
  # DEBUG ii => 0
  goto <bb 7>; [100.00%]

  <bb 3> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _12 = elf_file_64(D)->arProgHead32;
  _13 = ii_59 * 32;
  phdr_65 = _12 + _13;
  # DEBUG phdr => phdr_65
  # DEBUG BEGIN_STMT
  _14 = phdr_65->p_vaddr;
  _15 = _14 >> 24;
  _16 = _14 << 24;
  _17 = _15 | _16;
  _18 = _14 >> 8;
  _19 = _18 & 65280;
  _20 = _17 | _19;
  _21 = _14 << 8;
  _22 = _21 & 16711680;
  _23 = _20 | _22;
  if (_23 <= virt_addr_62)
    goto <bb 4>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 4> [local count: 507343012]:
  _24 = phdr_65->p_memsz;
  _25 = _24 >> 24;
  _26 = _24 << 24;
  _27 = _25 | _26;
  _28 = _24 >> 8;
  _29 = _28 & 65280;
  _30 = _27 | _29;
  _31 = _24 << 8;
  _32 = _31 & 16711680;
  _33 = _30 | _32;
  _34 = _23 + _33;
  _35 = shdr_61(D)->sh_size;
  _36 = _35 >> 24;
  _37 = _35 << 24;
  _38 = _36 | _37;
  _39 = _35 >> 8;
  _40 = _39 & 65280;
  _41 = _38 | _40;
  _42 = _35 << 8;
  _43 = _42 & 16711680;
  _44 = _41 | _43;
  _45 = _34 - _44;
  if (_45 >= virt_addr_62)
    goto <bb 5>; [5.50%]
  else
    goto <bb 6>; [94.50%]

  <bb 5> [local count: 27903866]:
  # _3 = PHI <_23(4)>
  # phdr_6 = PHI <phdr_65(4)>
  # DEBUG BEGIN_STMT
  _46 = phdr_6->p_paddr;
  _47 = _46 >> 24;
  _48 = _46 << 24;
  _49 = _47 | _48;
  _50 = _46 >> 8;
  _51 = _50 & 65280;
  _52 = _49 | _51;
  _53 = _46 << 8;
  _54 = _53 & 16711680;
  _55 = _52 | _54;
  # DEBUG offset => _3 - _55
  # DEBUG BEGIN_STMT
  _63 = _55 - _3;
  load_addr_66 = virt_addr_62 + _63;
  # DEBUG load_addr => load_addr_66
  # DEBUG BEGIN_STMT
  # DEBUG stt => 1
  # DEBUG BEGIN_STMT
  goto <bb 8>; [100.00%]

  <bb 6> [local count: 986782159]:
  # DEBUG BEGIN_STMT
  ii_67 = ii_59 + 1;
  # DEBUG ii => ii_67

  <bb 7> [local count: 1073741824]:
  # ii_59 = PHI <0(2), ii_67(6)>
  # DEBUG ii => ii_59
  # DEBUG BEGIN_STMT
  _56 = elf_file_64(D)->Header.r32.e_phnum;
  _57 = (unsigned int) _56;
  if (_57 > ii_59)
    goto <bb 3>; [94.50%]
  else
    goto <bb 8>; [5.50%]

  <bb 8> [local count: 86959666]:
  # load_addr_58 = PHI <0(7), load_addr_66(5)>
  # DEBUG load_addr => load_addr_58
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  return load_addr_58;

}


pfe_pe_load_elf_section (struct pfe_pe_t * pe, const void * sdata, addr_t load_addr, addr_t size, uint32_t type)
{
  errno_t ret_val;
  unsigned char _1;
  unsigned char _2;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_is_dmem (pe_6(D), load_addr_7(D), size_8(D));
  if (_1 != 0)
    goto <bb 3>; [33.00%]
  else
    goto <bb 4>; [67.00%]

  <bb 3> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  ret_val_14 = pfe_pe_load_dmem_section_nolock (pe_6(D), sdata_9(D), load_addr_7(D), size_8(D), type_10(D));
  # DEBUG ret_val => ret_val_14
  goto <bb 6>; [100.00%]

  <bb 4> [local count: 719407022]:
  # DEBUG BEGIN_STMT
  _2 = pfe_pe_is_imem (pe_6(D), load_addr_7(D), size_8(D));
  if (_2 != 0)
    goto <bb 5>; [47.77%]
  else
    goto <bb 6>; [52.23%]

  <bb 5> [local count: 343660734]:
  # DEBUG BEGIN_STMT
  ret_val_12 = pfe_pe_load_imem_section_nolock (pe_6(D), sdata_9(D), load_addr_7(D), size_8(D), type_10(D));
  # DEBUG ret_val => ret_val_12

  <bb 6> [local count: 1073741824]:
  # ret_val_3 = PHI <ret_val_14(3), ret_val_12(5), 22(4)>
  # DEBUG ret_val => ret_val_3
  # DEBUG BEGIN_STMT
  return ret_val_3;

}


pfe_pe_is_imem (const struct pfe_pe_t * pe, addr_t addr, uint32_t size)
{
  bool_t ret;
  addr_t reg_end;
  unsigned int _1;
  unsigned int _2;
  long unsigned int _3;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pe_6(D)->imem_elf_base_va;
  _2 = pe_6(D)->imem_size;
  reg_end_7 = _1 + _2;
  # DEBUG reg_end => reg_end_7
  # DEBUG BEGIN_STMT
  if (_1 <= addr_8(D))
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  _3 = addr_8(D) + size_9(D);
  if (_3 < reg_end_7)
    goto <bb 5>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 4> [local count: 805306369]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 5> [local count: 1073741824]:
  # ret_4 = PHI <1(3), 0(4)>
  # DEBUG ret => ret_4
  # DEBUG BEGIN_STMT
  return ret_4;

}


pfe_pe_is_dmem (const struct pfe_pe_t * pe, addr_t addr, uint32_t size)
{
  bool_t ret;
  addr_t reg_end;
  unsigned int _1;
  unsigned int _2;
  long unsigned int _3;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pe_6(D)->dmem_elf_base_va;
  _2 = pe_6(D)->dmem_size;
  reg_end_7 = _1 + _2;
  # DEBUG reg_end => reg_end_7
  # DEBUG BEGIN_STMT
  if (_1 <= addr_8(D))
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  _3 = addr_8(D) + size_9(D);
  if (_3 < reg_end_7)
    goto <bb 5>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 4> [local count: 805306369]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 5> [local count: 1073741824]:
  # ret_4 = PHI <1(3), 0(4)>
  # DEBUG ret => ret_4
  # DEBUG BEGIN_STMT
  return ret_4;

}


pfe_pe_load_imem_section_nolock (struct pfe_pe_t * pe, const void * data, addr_t addr, addr_t size, uint32_t type)
{
  errno_t ret;
  unsigned int data.17_1;
  unsigned int _2;
  unsigned int _3;
  unsigned int _4;
  const struct fw_load_ops_t * _5;
  void (*<T988>) (struct pfe_pe_tag *, pfe_pe_mem_t, addr_t, const void *, uint32_t) _6;
  unsigned int _7;
  unsigned int _8;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  data.17_1 = (unsigned int) data_11(D);
  _2 = data.17_1 & 3;
  _3 = addr_12(D) & 1;
  if (_2 != _3)
    goto <bb 8>; [51.11%]
  else
    goto <bb 3>; [48.89%]

  <bb 3> [local count: 524952378]:
  # DEBUG BEGIN_STMT
  if (_3 != 0)
    goto <bb 8>; [35.00%]
  else
    goto <bb 4>; [65.00%]

  <bb 4> [local count: 341219046]:
  # DEBUG BEGIN_STMT
  _4 = size_13(D) & 1;
  if (_4 != 0)
    goto <bb 8>; [35.00%]
  else
    goto <bb 5>; [65.00%]

  <bb 5> [local count: 221792380]:
  # DEBUG BEGIN_STMT
  switch (type_14(D)) <default: <L8> [33.33%], case 1: <L7> [33.33%], case 1879048234: <L14> [33.33%]>

  <bb 6> [local count: 73923400]:
<L7>:
  # DEBUG BEGIN_STMT
  _5 = pe_16(D)->fw_load_ops;
  _6 = _5->pe_memcpy;
  _7 = pe_16(D)->imem_elf_base_va;
  _8 = addr_12(D) - _7;
  _6 (pe_16(D), 1, _8, data_11(D), size_13(D));
  # DEBUG BEGIN_STMT
  goto <bb 8>; [100.00%]

  <bb 7> [local count: 73923400]:
<L8>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22
  # DEBUG BEGIN_STMT

  <bb 8> [local count: 1073719645]:
  # ret_9 = PHI <117(2), 117(3), 117(4), 0(5), 0(6), 22(7)>
<L14>:
  # DEBUG ret => ret_9
  # DEBUG BEGIN_STMT
  return ret_9;

}


pfe_pe_load_dmem_section_nolock (struct pfe_pe_t * pe, const void * sdata, addr_t addr, addr_t size, uint32_t type)
{
  errno_t ret;
  unsigned int sdata.16_1;
  unsigned int _2;
  unsigned int _3;
  unsigned int _4;
  const struct fw_load_ops_t * _5;
  void (*<T988>) (struct pfe_pe_tag *, pfe_pe_mem_t, addr_t, const void *, uint32_t) _6;
  unsigned int _7;
  unsigned int _8;
  const struct fw_load_ops_t * _9;
  void (*<T984>) (struct pfe_pe_tag *, pfe_pe_mem_t, uint32_t, addr_t, uint32_t) _10;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  sdata.16_1 = (unsigned int) sdata_13(D);
  _2 = sdata.16_1 ^ addr_14(D);
  _3 = _2 & 3;
  if (_3 != 0)
    goto <bb 8>; [35.00%]
  else
    goto <bb 3>; [65.00%]

  <bb 3> [local count: 697932186]:
  # DEBUG BEGIN_STMT
  _4 = addr_14(D) & 3;
  if (_4 != 0)
    goto <bb 8>; [35.00%]
  else
    goto <bb 4>; [65.00%]

  <bb 4> [local count: 453655921]:
  # DEBUG BEGIN_STMT
  switch (type_15(D)) <default: <L7> [25.00%], case 1: <L5> [25.00%], case 8: <L6> [25.00%], case 1879048234: <L12> [25.00%]>

  <bb 5> [local count: 113413980]:
<L5>:
  # DEBUG BEGIN_STMT
  _5 = pe_17(D)->fw_load_ops;
  _6 = _5->pe_memcpy;
  _7 = pe_17(D)->dmem_elf_base_va;
  _8 = addr_14(D) - _7;
  _6 (pe_17(D), 0, _8, sdata_13(D), size_18(D));
  # DEBUG BEGIN_STMT
  goto <bb 8>; [100.00%]

  <bb 6> [local count: 113413980]:
<L6>:
  # DEBUG BEGIN_STMT
  _9 = pe_17(D)->fw_load_ops;
  _10 = _9->pe_memset;
  _10 (pe_17(D), 0, 0, addr_14(D), size_18(D));
  # DEBUG BEGIN_STMT
  goto <bb 8>; [100.00%]

  <bb 7> [local count: 113413980]:
<L7>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22
  # DEBUG BEGIN_STMT

  <bb 8> [local count: 1073741824]:
  # ret_11 = PHI <22(2), 22(3), 0(4), 0(5), 0(6), 22(7)>
<L12>:
  # DEBUG ret => ret_11
  # DEBUG BEGIN_STMT
  return ret_11;

}


pfe_pe_gather_memcpy_from_dmem_to_host_32 (struct pfe_pe_t * pe, int32_t pe_count, void * dst_ptr, addr_t src_addr, uint32_t buffer_len, uint32_t read_len)
{
  errno_t ret_unlock;
  errno_t ret;
  uint8_t mem_lock_error;
  int32_t ii;
  unsigned int ii.2_1;
  unsigned int _2;
  struct pfe_pe_t * _3;
  long unsigned int ii.4_5;
  long unsigned int _6;
  long unsigned int _7;
  unsigned int _9;
  struct pfe_pe_t * _10;
  long unsigned int _12;
  void * _13;
  unsigned int ii.7_14;
  unsigned int _15;
  struct pfe_pe_t * _16;

  <bb 2> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG ii => 0
  # DEBUG BEGIN_STMT
  # DEBUG mem_lock_error => 0
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG ret_unlock => 0
  # DEBUG BEGIN_STMT
  # DEBUG ii => 0
  goto <bb 6>; [100.00%]

  <bb 3> [local count: 955630222]:
  # DEBUG BEGIN_STMT
  ii.2_1 = (unsigned int) ii_17;
  _2 = ii.2_1 * 112;
  _3 = pe_34(D) + _2;
  ret_44 = pfe_pe_mem_lock (_3);
  # DEBUG ret => ret_44
  # DEBUG BEGIN_STMT
  if (ret_44 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 4> [local count: 477815111]:
  # DEBUG BEGIN_STMT
  mem_lock_error_45 = mem_lock_error_21 + 1;
  # DEBUG mem_lock_error => mem_lock_error_45

  <bb 5> [local count: 955630222]:
  # mem_lock_error_20 = PHI <mem_lock_error_21(3), mem_lock_error_45(4)>
  # DEBUG mem_lock_error => mem_lock_error_20
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ii_46 = ii_17 + 1;
  # DEBUG ii => ii_46

  <bb 6> [local count: 1073741824]:
  # ii_17 = PHI <0(2), ii_46(5)>
  # mem_lock_error_21 = PHI <0(2), mem_lock_error_20(5)>
  # ret_22 = PHI <0(2), ret_44(5)>
  # DEBUG ret => ret_22
  # DEBUG mem_lock_error => mem_lock_error_21
  # DEBUG ii => ii_17
  # DEBUG BEGIN_STMT
  if (ii_17 < pe_count_31(D))
    goto <bb 3>; [89.00%]
  else
    goto <bb 7>; [11.00%]

  <bb 7> [local count: 118111600]:
  # mem_lock_error_8 = PHI <mem_lock_error_21(6)>
  # ret_11 = PHI <ret_22(6)>
  # DEBUG BEGIN_STMT
  if (mem_lock_error_8 == 0)
    goto <bb 18>; [50.00%]
  else
    goto <bb 15>; [50.00%]

  <bb 18> [local count: 59055800]:
  goto <bb 10>; [100.00%]

  <bb 8> [local count: 521689469]:
  # DEBUG BEGIN_STMT
  ii.4_5 = (long unsigned int) ii_18;
  _6 = ii.4_5 + 1;
  _7 = _6 * read_len_32(D);
  if (_7 <= buffer_len_33(D))
    goto <bb 9>; [94.50%]
  else
    goto <bb 15>; [5.50%]

  <bb 15> [local count: 118111600]:
  # ii_28 = PHI <0(8), 0(10), 0(7)>
  # ret_23 = PHI <11(8), ret_11(10), ret_11(7)>
  goto <bb 17>; [100.00%]

  <bb 9> [local count: 492996549]:
  # DEBUG BEGIN_STMT
  _9 = ii.4_5 * 112;
  _10 = pe_34(D) + _9;
  _12 = ii.4_5 * read_len_32(D);
  _13 = dst_ptr_35(D) + _12;
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (_10, _13, src_addr_36(D), read_len_32(D));
  # DEBUG BEGIN_STMT
  ii_38 = ii_18 + 1;
  # DEBUG ii => ii_38

  <bb 10> [local count: 552052349]:
  # ii_18 = PHI <ii_38(9), 0(18)>
  # DEBUG ii => ii_18
  # DEBUG BEGIN_STMT
  if (ii_18 < pe_count_31(D))
    goto <bb 8>; [94.50%]
  else
    goto <bb 15>; [5.50%]

  <bb 12> [local count: 955630224]:
  # DEBUG BEGIN_STMT
  ii.7_14 = (unsigned int) ii_19;
  _15 = ii.7_14 * 112;
  _16 = pe_34(D) + _15;
  ret_unlock_41 = pfe_pe_mem_unlock (_16);
  # DEBUG ret_unlock => ret_unlock_41
  # DEBUG BEGIN_STMT
  if (ret_unlock_41 != 0)
    goto <bb 13>; [50.00%]
  else
    goto <bb 14>; [50.00%]

  <bb 13> [local count: 477815112]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => ret_unlock_41

  <bb 14> [local count: 955630224]:
  # ret_24 = PHI <ret_25(12), ret_unlock_41(13)>
  # DEBUG ret => ret_24
  # DEBUG BEGIN_STMT
  ii_42 = ii_19 + 1;
  # DEBUG ii => ii_42

  <bb 17> [local count: 1073741824]:
  # ii_19 = PHI <ii_28(15), ii_42(14)>
  # ret_25 = PHI <ret_23(15), ret_24(14)>
  # DEBUG ret => ret_25
  # DEBUG ii => ii_19
  # DEBUG BEGIN_STMT
  if (ii_19 < pe_count_31(D))
    goto <bb 12>; [89.00%]
  else
    goto <bb 16>; [11.00%]

  <bb 16> [local count: 118111601]:
  # ret_39 = PHI <ret_25(17)>
  # DEBUG BEGIN_STMT
  return ret_39;

}


pfe_pe_memcpy_from_dmem_to_host_32 (struct pfe_pe_t * pe, void * dst_ptr, addr_t src_addr, uint32_t len)
{
  errno_t ret;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_5 = pfe_pe_mem_lock (pe_3(D));
  # DEBUG ret => ret_5
  # DEBUG BEGIN_STMT
  if (ret_5 != 0)
    goto <bb 4>; [67.00%]
  else
    goto <bb 3>; [33.00%]

  <bb 3> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe_3(D), dst_ptr_6(D), src_addr_7(D), len_8(D));
  # DEBUG BEGIN_STMT
  pfe_pe_mem_unlock (pe_3(D));

  <bb 4> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  return;

}


pfe_pe_memcpy_from_dmem_to_host_32_nolock (struct pfe_pe_t * pe, void * dst_ptr, addr_t src_addr, uint32_t len)
{
  uint32_t len_temp;
  addr_t src_temp;
  uint8_t * dst_byteptr;
  uint32_t offset;
  uint32_t val;
  unsigned int _1;
  unsigned char _3;
  long unsigned int _4;
  long unsigned int _5;
  unsigned char _7;
  long unsigned int _8;
  long unsigned int iftmp.0_28;

  <bb 2> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG dst_byteptr => dst_ptr_15(D)
  # DEBUG BEGIN_STMT
  # DEBUG src_temp => src_addr_17(D)
  # DEBUG BEGIN_STMT
  # DEBUG len_temp => len_18(D)
  # DEBUG BEGIN_STMT
  _1 = src_addr_17(D) & 3;
  if (_1 != 0)
    goto <bb 3>; [33.00%]
  else
    goto <bb 8>; [67.00%]

  <bb 3> [local count: 38976828]:
  # DEBUG BEGIN_STMT
  offset_20 = 4 - _1;
  # DEBUG offset => offset_20
  # DEBUG BEGIN_STMT
  offset_21 = MIN_EXPR <len_18(D), offset_20>;
  # DEBUG offset => offset_21
  # DEBUG BEGIN_STMT
  _3 = (unsigned char) offset_21;
  _4 = pfe_pe_mem_read (pe_22(D), 0, src_addr_17(D), _3);
  val = _4;
  # DEBUG BEGIN_STMT
  memcpy (dst_ptr_15(D), &val, offset_21);
  # DEBUG BEGIN_STMT
  dst_byteptr_26 = dst_ptr_15(D) + offset_21;
  # DEBUG dst_byteptr => dst_byteptr_26
  # DEBUG BEGIN_STMT
  src_temp_27 = src_addr_17(D) + offset_21;
  # DEBUG src_temp => src_temp_27
  # DEBUG BEGIN_STMT
  if (len_18(D) >= offset_21)
    goto <bb 4>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 4> [local count: 19488414]:
  iftmp.0_28 = len_18(D) - offset_21;

  <bb 8> [local count: 118111600]:
  # dst_byteptr_12 = PHI <dst_ptr_15(D)(2), dst_byteptr_26(4), dst_byteptr_26(3)>
  # src_temp_41 = PHI <src_addr_17(D)(2), src_temp_27(4), src_temp_27(3)>
  # len_temp_40 = PHI <len_18(D)(2), iftmp.0_28(4), 0(3)>
  goto <bb 12>; [100.00%]

  <bb 6> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  _5 = pfe_pe_mem_read (pe_22(D), 0, src_temp_10, 4);
  val = _5;
  # DEBUG BEGIN_STMT
  MEM[(uint32_t *)dst_byteptr_9] = _5;
  # DEBUG BEGIN_STMT
  len_temp_36 = len_temp_11 + 4294967292;
  # DEBUG len_temp => len_temp_36
  # DEBUG BEGIN_STMT
  src_temp_37 = src_temp_10 + 4;
  # DEBUG src_temp => src_temp_37
  # DEBUG BEGIN_STMT
  dst_byteptr_38 = dst_byteptr_9 + 4;
  # DEBUG dst_byteptr => dst_byteptr_38

  <bb 12> [local count: 1073741824]:
  # dst_byteptr_9 = PHI <dst_byteptr_12(8), dst_byteptr_38(6)>
  # src_temp_10 = PHI <src_temp_41(8), src_temp_37(6)>
  # len_temp_11 = PHI <len_temp_40(8), len_temp_36(6)>
  # DEBUG len_temp => len_temp_11
  # DEBUG src_temp => src_temp_10
  # DEBUG dst_byteptr => dst_byteptr_9
  # DEBUG BEGIN_STMT
  if (len_temp_11 > 3)
    goto <bb 6>; [89.00%]
  else
    goto <bb 9>; [11.00%]

  <bb 9> [local count: 118111601]:
  # dst_byteptr_2 = PHI <dst_byteptr_9(12)>
  # src_temp_6 = PHI <src_temp_10(12)>
  # len_temp_16 = PHI <len_temp_11(12)>
  # DEBUG BEGIN_STMT
  if (len_temp_16 != 0)
    goto <bb 10>; [33.00%]
  else
    goto <bb 11>; [67.00%]

  <bb 10> [local count: 38976828]:
  # DEBUG BEGIN_STMT
  _7 = (unsigned char) len_temp_16;
  _8 = pfe_pe_mem_read (pe_22(D), 0, src_temp_6, _7);
  val = _8;
  # DEBUG BEGIN_STMT
  memcpy (dst_byteptr_2, &val, len_temp_16);

  <bb 11> [local count: 118111601]:
  val ={v} {CLOBBER};
  return;

}


pfe_pe_memcpy_from_host_to_dmem_32 (struct pfe_pe_t * pe, addr_t dst_addr, const void * src_ptr, uint32_t len)
{
  errno_t ret;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_5 = pfe_pe_mem_lock (pe_3(D));
  # DEBUG ret => ret_5
  # DEBUG BEGIN_STMT
  if (ret_5 != 0)
    goto <bb 4>; [67.00%]
  else
    goto <bb 3>; [33.00%]

  <bb 3> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_host_to_dmem_32_nolock (pe_3(D), dst_addr_6(D), src_ptr_7(D), len_8(D));
  # DEBUG BEGIN_STMT
  pfe_pe_mem_unlock (pe_3(D));

  <bb 4> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  return;

}


pfe_pe_memcpy_from_host_to_dmem_32_nolock (struct pfe_pe_t * pe, addr_t dst_addr, const void * src_ptr, uint32_t len)
{
  uint32_t len_temp;
  addr_t dst_temp;
  const uint8_t * src_byteptr;
  uint32_t offset;
  uint32_t val;
  unsigned char _2;
  unsigned char _3;
  unsigned int _4;
  unsigned char _5;

  <bb 2> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG src_byteptr => src_ptr_15(D)
  # DEBUG BEGIN_STMT
  # DEBUG dst_temp => dst_addr_17(D)
  # DEBUG BEGIN_STMT
  # DEBUG len_temp => len_19(D)
  # DEBUG BEGIN_STMT
  goto <bb 4>; [100.00%]

  <bb 3> [local count: 958878293]:
  # DEBUG BEGIN_STMT
  offset_21 = 4 - _4;
  # DEBUG offset => offset_21
  # DEBUG BEGIN_STMT
  _2 = *src_byteptr_6;
  val_22 = (uint32_t) _2;
  # DEBUG val => val_22
  # DEBUG BEGIN_STMT
  _3 = (unsigned char) offset_21;
  pfe_pe_mem_write (pe_23(D), 0, val_22, dst_temp_8, 1, _3);
  # DEBUG BEGIN_STMT
  dst_temp_25 = dst_temp_8 + 1;
  # DEBUG dst_temp => dst_temp_25
  # DEBUG BEGIN_STMT
  src_byteptr_26 = src_byteptr_6 + 1;
  # DEBUG src_byteptr => src_byteptr_26
  # DEBUG BEGIN_STMT
  len_temp_27 = len_temp_10 + 4294967295;
  # DEBUG len_temp => len_temp_27

  <bb 4> [local count: 1073741824]:
  # src_byteptr_6 = PHI <src_ptr_15(D)(2), src_byteptr_26(3)>
  # dst_temp_8 = PHI <dst_addr_17(D)(2), dst_temp_25(3)>
  # len_temp_10 = PHI <len_19(D)(2), len_temp_27(3)>
  # DEBUG len_temp => len_temp_10
  # DEBUG dst_temp => dst_temp_8
  # DEBUG src_byteptr => src_byteptr_6
  # DEBUG BEGIN_STMT
  _4 = dst_temp_8 & 3;
  if (_4 != 0)
    goto <bb 6>; [94.50%]
  else
    goto <bb 5>; [5.50%]

  <bb 5> [local count: 114863532]:
  # src_byteptr_16 = PHI <src_byteptr_6(4), src_byteptr_6(6)>
  # dst_temp_36 = PHI <dst_temp_8(4), dst_temp_8(6)>
  # len_temp_1 = PHI <len_temp_10(4), len_temp_10(6)>
  goto <bb 8>; [100.00%]

  <bb 6> [local count: 1014686025]:
  if (len_temp_10 != 0)
    goto <bb 3>; [94.50%]
  else
    goto <bb 5>; [5.50%]

  <bb 7> [local count: 929350398]:
  # DEBUG BEGIN_STMT
  val_30 = MEM[(uint32_t *)src_byteptr_7];
  # DEBUG val => val_30
  # DEBUG BEGIN_STMT
  pfe_pe_mem_write (pe_23(D), 0, val_30, dst_temp_9, 4, 0);
  # DEBUG BEGIN_STMT
  len_temp_32 = len_temp_11 + 4294967292;
  # DEBUG len_temp => len_temp_32
  # DEBUG BEGIN_STMT
  src_byteptr_33 = src_byteptr_7 + 4;
  # DEBUG src_byteptr => src_byteptr_33
  # DEBUG BEGIN_STMT
  dst_temp_34 = dst_temp_9 + 4;
  # DEBUG dst_temp => dst_temp_34

  <bb 8> [local count: 1044213930]:
  # src_byteptr_7 = PHI <src_byteptr_16(5), src_byteptr_33(7)>
  # dst_temp_9 = PHI <dst_temp_36(5), dst_temp_34(7)>
  # len_temp_11 = PHI <len_temp_1(5), len_temp_32(7)>
  # DEBUG len_temp => len_temp_11
  # DEBUG dst_temp => dst_temp_9
  # DEBUG src_byteptr => src_byteptr_7
  # DEBUG BEGIN_STMT
  if (len_temp_11 > 3)
    goto <bb 7>; [89.00%]
  else
    goto <bb 9>; [11.00%]

  <bb 9> [local count: 114863532]:
  # src_byteptr_35 = PHI <src_byteptr_7(8)>
  # dst_temp_37 = PHI <dst_temp_9(8)>
  # len_temp_18 = PHI <len_temp_11(8)>
  # DEBUG BEGIN_STMT
  if (len_temp_18 != 0)
    goto <bb 10>; [33.00%]
  else
    goto <bb 11>; [67.00%]

  <bb 10> [local count: 37904966]:
  # DEBUG BEGIN_STMT
  val_28 = pfe_pe_get_u32_from_byteptr (src_byteptr_35, len_temp_18);
  # DEBUG val => val_28
  # DEBUG BEGIN_STMT
  _5 = (unsigned char) len_temp_18;
  pfe_pe_mem_write (pe_23(D), 0, val_28, dst_temp_37, _5, 0);

  <bb 11> [local count: 114863532]:
  return;

}


pfe_pe_get_u32_from_byteptr (const uint8_t * src_byteptr, uint32_t len)
{
  uint32_t val;
  unsigned char _1;
  short unsigned int _2;
  short unsigned int _3;
  unsigned char _4;
  long unsigned int _5;
  long unsigned int _6;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  switch (len_8(D)) <default: <L3> [25.00%], case 1: <L0> [25.00%], case 2: <L1> [25.00%], case 3: <L2> [25.00%]>

  <bb 3> [local count: 268435456]:
<L0>:
  # DEBUG BEGIN_STMT
  _1 = *src_byteptr_10(D);
  val_14 = (uint32_t) _1;
  # DEBUG val => val_14
  # DEBUG BEGIN_STMT
  goto <bb 7>; [100.00%]

  <bb 4> [local count: 268435456]:
<L1>:
  # DEBUG BEGIN_STMT
  _2 = MEM[(uint16_t *)src_byteptr_10(D)];
  val_13 = (uint32_t) _2;
  # DEBUG val => val_13
  # DEBUG BEGIN_STMT
  goto <bb 7>; [100.00%]

  <bb 5> [local count: 268435456]:
<L2>:
  # DEBUG BEGIN_STMT
  _3 = MEM[(uint16_t *)src_byteptr_10(D)];
  val_11 = (uint32_t) _3;
  # DEBUG val => val_11
  # DEBUG BEGIN_STMT
  _4 = MEM[(const uint8_t *)src_byteptr_10(D) + 2B];
  _5 = (long unsigned int) _4;
  _6 = _5 << 16;
  val_12 = _6 + val_11;
  # DEBUG val => val_12
  # DEBUG BEGIN_STMT
  goto <bb 7>; [100.00%]

  <bb 6> [local count: 268435456]:
<L3>:
  # DEBUG BEGIN_STMT
  val_15 = MEM[(uint32_t *)src_byteptr_10(D)];
  # DEBUG val => val_15
  # DEBUG BEGIN_STMT

  <bb 7> [local count: 1073741824]:
  # val_7 = PHI <val_14(3), val_13(4), val_12(5), val_15(6)>
  # DEBUG val => val_7
  # DEBUG BEGIN_STMT
  return val_7;

}


pfe_pe_fw_memset_single (struct pfe_pe_t * pe, pfe_pe_mem_t mem, uint32_t val, addr_t addr, uint32_t size)
{
  uint32_t memsel;
  uint32_t addr_temp;
  uint32_t mem_addr;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  unsigned int _9;
  volatile uint32_t * _10;
  long unsigned int _11;
  unsigned char _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  unsigned int _17;
  volatile uint32_t * _18;
  long unsigned int _19;

  <bb 2> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (mem_24(D) == 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 59055800]:
  # DEBUG BEGIN_STMT
  # DEBUG memsel => 131072

  <bb 4> [local count: 118111600]:
  # memsel_22 = PHI <262144(2), 131072(3)>
  # DEBUG memsel => memsel_22
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = val_27(D) >> 24;
  _2 = val_27(D) >> 8;
  _3 = _2 & 65280;
  _4 = _1 | _3;
  _5 = val_27(D) << 8;
  _6 = _5 & 16711680;
  _7 = _4 | _6;
  _8 = val_27(D) << 24;
  _9 = pe_26(D)->mem_access_wdata;
  _10 = (volatile uint32_t *) _9;
  _11 = _7 | _8;
  *_10 ={v} _11;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _12 = pe_26(D)->id;
  _13 = (long unsigned int) _12;
  _14 = _13 << 20;
  _15 = _14 & 15728640;
  _16 = _15 | memsel_22;
  addr_temp_29 = _16 | 2399141888;
  # DEBUG addr_temp => addr_temp_29
  # DEBUG BEGIN_STMT
  # DEBUG mem_addr => addr_30(D)
  goto <bb 6>; [100.00%]

  <bb 5> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  addr_temp_32 = addr_temp_21 & 4294311936;
  # DEBUG addr_temp => addr_temp_32
  # DEBUG BEGIN_STMT
  addr_temp_33 = mem_addr_20 | addr_temp_32;
  # DEBUG addr_temp => addr_temp_33
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _17 = pe_26(D)->mem_access_addr;
  _18 = (volatile uint32_t *) _17;
  *_18 ={v} addr_temp_33;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  mem_addr_35 = mem_addr_20 + 4;
  # DEBUG mem_addr => mem_addr_35

  <bb 6> [local count: 1073741824]:
  # mem_addr_20 = PHI <addr_30(D)(4), mem_addr_35(5)>
  # addr_temp_21 = PHI <addr_temp_29(4), addr_temp_33(5)>
  # DEBUG addr_temp => addr_temp_21
  # DEBUG mem_addr => mem_addr_20
  # DEBUG BEGIN_STMT
  _19 = addr_30(D) + size_31(D);
  if (_19 > mem_addr_20)
    goto <bb 5>; [89.00%]
  else
    goto <bb 7>; [11.00%]

  <bb 7> [local count: 118111601]:
  return;

}


pfe_pe_fw_memcpy_single (struct pfe_pe_t * pe, pfe_pe_mem_t mem, addr_t dst_addr, const void * src_ptr, uint32_t len)
{
  uint32_t memsel;
  uint32_t * data;
  uint32_t addr_temp;
  uint32_t mem_addr;
  unsigned char _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  unsigned int _15;
  volatile uint32_t * _16;
  long unsigned int _17;
  unsigned int _18;
  volatile uint32_t * _19;
  long unsigned int _20;

  <bb 2> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG data => src_ptr_26(D)
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (mem_27(D) == 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 59055800]:
  # DEBUG BEGIN_STMT
  # DEBUG memsel => 131072

  <bb 4> [local count: 118111600]:
  # memsel_24 = PHI <262144(2), 131072(3)>
  # DEBUG memsel => memsel_24
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pe_29(D)->id;
  _2 = (long unsigned int) _1;
  _3 = _2 << 20;
  _4 = _3 & 15728640;
  _5 = _4 | memsel_24;
  addr_temp_30 = _5 | 2399141888;
  # DEBUG addr_temp => addr_temp_30
  # DEBUG BEGIN_STMT
  # DEBUG mem_addr => dst_addr_31(D)
  goto <bb 6>; [100.00%]

  <bb 5> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = *data_23;
  _7 = _6 >> 24;
  _8 = _6 >> 8;
  _9 = _8 & 65280;
  _10 = _7 | _9;
  _11 = _6 << 8;
  _12 = _11 & 16711680;
  _13 = _10 | _12;
  _14 = _6 << 24;
  _15 = pe_29(D)->mem_access_wdata;
  _16 = (volatile uint32_t *) _15;
  _17 = _13 | _14;
  *_16 ={v} _17;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  data_34 = data_23 + 4;
  # DEBUG data => data_34
  # DEBUG BEGIN_STMT
  addr_temp_35 = addr_temp_22 & 4294311936;
  # DEBUG addr_temp => addr_temp_35
  # DEBUG BEGIN_STMT
  addr_temp_36 = mem_addr_21 | addr_temp_35;
  # DEBUG addr_temp => addr_temp_36
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _18 = pe_29(D)->mem_access_addr;
  _19 = (volatile uint32_t *) _18;
  *_19 ={v} addr_temp_36;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  mem_addr_38 = mem_addr_21 + 4;
  # DEBUG mem_addr => mem_addr_38

  <bb 6> [local count: 1073741824]:
  # mem_addr_21 = PHI <dst_addr_31(D)(4), mem_addr_38(5)>
  # addr_temp_22 = PHI <addr_temp_30(4), addr_temp_36(5)>
  # data_23 = PHI <src_ptr_26(D)(4), data_34(5)>
  # DEBUG data => data_23
  # DEBUG addr_temp => addr_temp_22
  # DEBUG mem_addr => mem_addr_21
  # DEBUG BEGIN_STMT
  _20 = dst_addr_31(D) + len_32(D);
  if (_20 > mem_addr_21)
    goto <bb 5>; [89.00%]
  else
    goto <bb 7>; [11.00%]

  <bb 7> [local count: 118111601]:
  return;

}


pfe_pe_fw_memset_bulk (struct pfe_pe_t * pe, pfe_pe_mem_t mem, uint32_t val, addr_t addr, uint32_t size)
{
  uint32_t memsel;
  uint32_t addr_temp;
  uint32_t mem_addr;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  unsigned int _9;
  volatile uint32_t * _10;
  long unsigned int _11;
  unsigned int _12;
  volatile uint32_t * _13;
  long unsigned int _14;
  long unsigned int _20;
  long unsigned int _21;

  <bb 2> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (mem_19(D) == 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 59055800]:
  # DEBUG BEGIN_STMT
  # DEBUG memsel => 131072

  <bb 4> [local count: 118111600]:
  # memsel_17 = PHI <262144(2), 131072(3)>
  # DEBUG memsel => memsel_17
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = val_24(D) >> 24;
  _2 = val_24(D) >> 8;
  _3 = _2 & 65280;
  _4 = _1 | _3;
  _5 = val_24(D) << 8;
  _6 = _5 & 16711680;
  _7 = _4 | _6;
  _8 = val_24(D) << 24;
  _9 = pe_23(D)->mem_access_wdata;
  _10 = (volatile uint32_t *) _9;
  _11 = _7 | _8;
  *_10 ={v} _11;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_26 = memsel_17 | 2399141888;
  # DEBUG addr_temp => addr_temp_26
  # DEBUG BEGIN_STMT
  # DEBUG mem_addr => addr_27(D)
  goto <bb 6>; [100.00%]

  <bb 5> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  addr_temp_29 = addr_temp_16 & 4278583296;
  # DEBUG addr_temp => addr_temp_29
  # DEBUG BEGIN_STMT
  addr_temp_30 = mem_addr_15 | addr_temp_29;
  # DEBUG addr_temp => addr_temp_30
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _12 = pe_23(D)->mem_access_addr;
  _13 = (volatile uint32_t *) _12;
  *_13 ={v} addr_temp_30;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_32 = addr_temp_30 | 1048576;
  # DEBUG addr_temp => addr_temp_32
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_13 ={v} addr_temp_32;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_34 = addr_temp_30 | 3145728;
  # DEBUG addr_temp => addr_temp_34
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_13 ={v} addr_temp_34;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _20 = addr_temp_30 & 4293918719;
  addr_temp_36 = _20 | 2097152;
  # DEBUG addr_temp => addr_temp_36
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_13 ={v} addr_temp_36;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_38 = _20 | 6291456;
  # DEBUG addr_temp => addr_temp_38
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_13 ={v} addr_temp_38;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_40 = _20 | 7340032;
  # DEBUG addr_temp => addr_temp_40
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_13 ={v} addr_temp_40;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _21 = addr_temp_30 & 4291821567;
  addr_temp_42 = _21 | 5242880;
  # DEBUG addr_temp => addr_temp_42
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_13 ={v} addr_temp_42;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_44 = _21 | 4194304;
  # DEBUG addr_temp => addr_temp_44
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_13 ={v} addr_temp_44;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  mem_addr_46 = mem_addr_15 + 4;
  # DEBUG mem_addr => mem_addr_46

  <bb 6> [local count: 1073741824]:
  # mem_addr_15 = PHI <addr_27(D)(4), mem_addr_46(5)>
  # addr_temp_16 = PHI <addr_temp_26(4), addr_temp_44(5)>
  # DEBUG addr_temp => addr_temp_16
  # DEBUG mem_addr => mem_addr_15
  # DEBUG BEGIN_STMT
  _14 = addr_27(D) + size_28(D);
  if (_14 > mem_addr_15)
    goto <bb 5>; [89.00%]
  else
    goto <bb 7>; [11.00%]

  <bb 7> [local count: 118111601]:
  return;

}


pfe_pe_fw_memcpy_bulk (struct pfe_pe_t * pe, pfe_pe_mem_t mem, addr_t dst_addr, const void * src_ptr, uint32_t len)
{
  uint32_t memsel;
  uint32_t * data;
  uint32_t addr_temp;
  uint32_t mem_addr;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  unsigned int _10;
  volatile uint32_t * _11;
  long unsigned int _12;
  unsigned int _13;
  volatile uint32_t * _14;
  long unsigned int _15;
  long unsigned int _22;
  long unsigned int _24;

  <bb 2> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG data => src_ptr_21(D)
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (mem_23(D) == 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 59055800]:
  # DEBUG BEGIN_STMT
  # DEBUG memsel => 131072

  <bb 4> [local count: 118111600]:
  # memsel_19 = PHI <262144(2), 131072(3)>
  # DEBUG memsel => memsel_19
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_27 = memsel_19 | 2399141888;
  # DEBUG addr_temp => addr_temp_27
  # DEBUG BEGIN_STMT
  # DEBUG mem_addr => dst_addr_28(D)
  goto <bb 6>; [100.00%]

  <bb 5> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = *data_18;
  _2 = _1 >> 24;
  _3 = _1 >> 8;
  _4 = _3 & 65280;
  _5 = _2 | _4;
  _6 = _1 << 8;
  _7 = _6 & 16711680;
  _8 = _5 | _7;
  _9 = _1 << 24;
  _10 = pe_26(D)->mem_access_wdata;
  _11 = (volatile uint32_t *) _10;
  _12 = _8 | _9;
  *_11 ={v} _12;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  data_31 = data_18 + 4;
  # DEBUG data => data_31
  # DEBUG BEGIN_STMT
  addr_temp_32 = addr_temp_17 & 4278583296;
  # DEBUG addr_temp => addr_temp_32
  # DEBUG BEGIN_STMT
  addr_temp_33 = mem_addr_16 | addr_temp_32;
  # DEBUG addr_temp => addr_temp_33
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _13 = pe_26(D)->mem_access_addr;
  _14 = (volatile uint32_t *) _13;
  *_14 ={v} addr_temp_33;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_35 = addr_temp_33 | 1048576;
  # DEBUG addr_temp => addr_temp_35
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_14 ={v} addr_temp_35;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_37 = addr_temp_33 | 3145728;
  # DEBUG addr_temp => addr_temp_37
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_14 ={v} addr_temp_37;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _22 = addr_temp_33 & 4293918719;
  addr_temp_39 = _22 | 2097152;
  # DEBUG addr_temp => addr_temp_39
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_14 ={v} addr_temp_39;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_41 = _22 | 6291456;
  # DEBUG addr_temp => addr_temp_41
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_14 ={v} addr_temp_41;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_43 = _22 | 7340032;
  # DEBUG addr_temp => addr_temp_43
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_14 ={v} addr_temp_43;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _24 = addr_temp_33 & 4291821567;
  addr_temp_45 = _24 | 5242880;
  # DEBUG addr_temp => addr_temp_45
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_14 ={v} addr_temp_45;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_47 = _24 | 4194304;
  # DEBUG addr_temp => addr_temp_47
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_14 ={v} addr_temp_47;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  mem_addr_49 = mem_addr_16 + 4;
  # DEBUG mem_addr => mem_addr_49

  <bb 6> [local count: 1073741824]:
  # mem_addr_16 = PHI <dst_addr_28(D)(4), mem_addr_49(5)>
  # addr_temp_17 = PHI <addr_temp_27(4), addr_temp_47(5)>
  # data_18 = PHI <src_ptr_21(D)(4), data_31(5)>
  # DEBUG data => data_18
  # DEBUG addr_temp => addr_temp_17
  # DEBUG mem_addr => mem_addr_16
  # DEBUG BEGIN_STMT
  _15 = dst_addr_28(D) + len_29(D);
  if (_15 > mem_addr_16)
    goto <bb 5>; [89.00%]
  else
    goto <bb 7>; [11.00%]

  <bb 7> [local count: 118111601]:
  return;

}


pfe_pe_fw_install_ops (struct pfe_pe_t * pe, uint8_t pe_num)
{
  const struct fw_load_ops_t * pe_loader;
  uint8_t best_pe_loader_cnt;
  uint32_t pe_idx;
  uint32_t idx;
  errno_t ret;
  unsigned char _1;
  <unnamed type> _2;
  unsigned char _3;
  long unsigned int _4;
  struct pfe_pe_t * _5;
  long unsigned int _6;
  long unsigned int _7;
  struct pfe_pe_t * _8;
  long unsigned int _9;

  <bb 2> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG idx => 0
  # DEBUG pe_idx => 0
  # DEBUG BEGIN_STMT
  # DEBUG best_pe_loader_cnt => 0
  # DEBUG BEGIN_STMT
  # DEBUG pe_loader => 0B
  # DEBUG BEGIN_STMT
  # DEBUG idx => 0
  goto <bb 17>; [100.00%]

  <bb 3> [local count: 236258637]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22
  # DEBUG BEGIN_STMT
  _1 = fw_load_ops[idx_13].pe_loaded_cnt;
  if (_1 == pe_num_25(D))
    goto <bb 5>; [34.00%]
  else
    goto <bb 4>; [66.00%]

  <bb 4> [local count: 155930701]:
  if (_1 == 1)
    goto <bb 5>; [34.00%]
  else
    goto <bb 16>; [66.00%]

  <bb 5> [local count: 133344375]:
  if (_1 > best_pe_loader_cnt_17)
    goto <bb 6>; [50.00%]
  else
    goto <bb 16>; [50.00%]

  <bb 6> [local count: 66672187]:
  _2 = pe_27(D)->type;
  if (_2 == 3)
    goto <bb 7>; [34.00%]
  else
    goto <bb 8>; [66.00%]

  <bb 7> [local count: 22668544]:
  _3 = fw_load_ops[idx_13].can_load_util;
  if (_3 == 1)
    goto <bb 9>; [34.00%]
  else
    goto <bb 8>; [66.00%]

  <bb 8> [local count: 58964883]:
  if (_2 != 3)
    goto <bb 9>; [66.00%]
  else
    goto <bb 16>; [34.00%]

  <bb 9> [local count: 46624127]:
  # DEBUG BEGIN_STMT
  if (_1 > 1)
    goto <bb 24>; [34.74%]
  else
    goto <bb 15>; [65.26%]

  <bb 24> [local count: 16197222]:
  goto <bb 12>; [100.00%]

  <bb 10> [local count: 143083661]:
  # DEBUG BEGIN_STMT
  _4 = pe_idx_14 * 112;
  _5 = pe_27(D) + _4;
  ret_31 = pfe_pe_fw_ops_valid (pe_27(D), _5);
  # DEBUG ret => ret_31
  # DEBUG BEGIN_STMT
  if (ret_31 != 0)
    goto <bb 13>; [5.50%]
  else
    goto <bb 11>; [94.50%]

  <bb 11> [local count: 135214059]:
  # DEBUG BEGIN_STMT
  pe_idx_32 = pe_idx_14 + 1;
  # DEBUG pe_idx => pe_idx_32

  <bb 12> [local count: 151411281]:
  # ret_10 = PHI <0(11), 22(24)>
  # pe_idx_14 = PHI <pe_idx_32(11), 1(24)>
  # DEBUG pe_idx => pe_idx_14
  # DEBUG ret => ret_10
  # DEBUG BEGIN_STMT
  _6 = (long unsigned int) pe_num_25(D);
  if (_6 > pe_idx_14)
    goto <bb 10>; [94.50%]
  else
    goto <bb 13>; [5.50%]

  <bb 13> [local count: 16197222]:
  # ret_11 = PHI <ret_31(10), ret_10(12)>
  # DEBUG ret => ret_11
  # DEBUG BEGIN_STMT
  if (ret_11 == 0)
    goto <bb 14>; [50.00%]
  else
    goto <bb 16>; [50.00%]

  <bb 14> [local count: 8098611]:
  # DEBUG BEGIN_STMT
  # DEBUG best_pe_loader_cnt => _1
  # DEBUG BEGIN_STMT
  pe_loader_33 = &fw_load_ops[idx_13];
  # DEBUG pe_loader => pe_loader_33
  goto <bb 16>; [100.00%]

  <bb 15> [local count: 30426906]:
  # DEBUG BEGIN_STMT
  # DEBUG best_pe_loader_cnt => _1
  # DEBUG BEGIN_STMT
  pe_loader_30 = &fw_load_ops[idx_13];
  # DEBUG pe_loader => pe_loader_30

  <bb 16> [local count: 236258637]:
  # best_pe_loader_cnt_16 = PHI <best_pe_loader_cnt_17(4), best_pe_loader_cnt_17(5), best_pe_loader_cnt_17(8), _1(14), _1(15), best_pe_loader_cnt_17(13)>
  # pe_loader_18 = PHI <pe_loader_19(4), pe_loader_19(5), pe_loader_19(8), pe_loader_33(14), pe_loader_30(15), pe_loader_19(13)>
  # DEBUG pe_loader => pe_loader_18
  # DEBUG best_pe_loader_cnt => best_pe_loader_cnt_16
  # DEBUG BEGIN_STMT
  idx_34 = idx_13 + 1;
  # DEBUG idx => idx_34

  <bb 17> [local count: 354370237]:
  # idx_13 = PHI <0(2), idx_34(16)>
  # best_pe_loader_cnt_17 = PHI <0(2), best_pe_loader_cnt_16(16)>
  # pe_loader_19 = PHI <0B(2), pe_loader_18(16)>
  # DEBUG pe_loader => pe_loader_19
  # DEBUG best_pe_loader_cnt => best_pe_loader_cnt_17
  # DEBUG idx => idx_13
  # DEBUG BEGIN_STMT
  if (idx_13 != 2)
    goto <bb 3>; [66.67%]
  else
    goto <bb 18>; [33.33%]

  <bb 18> [local count: 118111600]:
  # pe_loader_26 = PHI <pe_loader_19(17)>
  goto <bb 20>; [100.00%]

  <bb 19> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  _7 = pe_idx_15 * 112;
  _8 = pe_27(D) + _7;
  _8->fw_load_ops = pe_loader_26;
  # DEBUG BEGIN_STMT
  pe_idx_29 = pe_idx_15 + 1;
  # DEBUG pe_idx => pe_idx_29

  <bb 20> [local count: 1073741824]:
  # pe_idx_15 = PHI <pe_idx_29(19), 0(18)>
  # DEBUG ret => NULL
  # DEBUG pe_idx => pe_idx_15
  # DEBUG BEGIN_STMT
  _9 = (long unsigned int) pe_num_25(D);
  if (_9 > pe_idx_15)
    goto <bb 19>; [89.00%]
  else
    goto <bb 21>; [11.00%]

  <bb 21> [local count: 118111601]:
  # DEBUG BEGIN_STMT
  if (pe_loader_26 != 0B)
    goto <bb 22>; [81.25%]
  else
    goto <bb 23>; [18.75%]

  <bb 22> [local count: 95965675]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 23> [local count: 118111601]:
  # ret_12 = PHI <19(21), 0(22)>
  # DEBUG ret => ret_12
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  return ret_12;

}


pfe_pe_fw_ops_valid (struct pfe_pe_t * pe1, const struct pfe_pe_t * pe2)
{
  errno_t ret;
  <unnamed type> _1;
  <unnamed type> _2;
  unsigned int _3;
  unsigned int _4;
  unsigned int _5;
  unsigned int _6;
  unsigned int _7;
  unsigned int _8;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22
  # DEBUG BEGIN_STMT
  _1 = pe1_11(D)->type;
  _2 = pe2_12(D)->type;
  if (_1 == _2)
    goto <bb 3>; [48.89%]
  else
    goto <bb 7>; [51.11%]

  <bb 3> [local count: 524952378]:
  _3 = pe1_11(D)->mem_access_addr;
  _4 = pe2_12(D)->mem_access_addr;
  if (_3 == _4)
    goto <bb 4>; [48.89%]
  else
    goto <bb 7>; [51.11%]

  <bb 4> [local count: 256649217]:
  _5 = pe1_11(D)->mem_access_rdata;
  _6 = pe2_12(D)->mem_access_rdata;
  if (_5 == _6)
    goto <bb 5>; [48.89%]
  else
    goto <bb 7>; [51.11%]

  <bb 5> [local count: 125475802]:
  _7 = pe1_11(D)->mem_access_wdata;
  _8 = pe2_12(D)->mem_access_wdata;
  if (_7 == _8)
    goto <bb 6>; [48.89%]
  else
    goto <bb 7>; [51.11%]

  <bb 6> [local count: 61345120]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 7> [local count: 1073741824]:
  # ret_9 = PHI <22(2), 22(3), 22(4), 22(5), 0(6)>
  # DEBUG ret => ret_9
  # DEBUG BEGIN_STMT
  return ret_9;

}


pfe_pe_mem_unlock (struct pfe_pe_t * pe)
{
  struct pfe_ct_pe_misc_control_t misc_ctrl;
  uint32_t misc_dmem;
  errno_t ret;
  union pfe_ct_pe_mmap_t * _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  misc_ctrl = {};
  # DEBUG BEGIN_STMT
  _1 = pe_15(D)->mmap_data;
  if (_1 == 0B)
    goto <bb 5>; [18.75%]
  else
    goto <bb 3>; [81.25%]

  <bb 3> [local count: 872415233]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  _2 = _1->common.pe_misc_control;
  _3 = _2 >> 24;
  _4 = _2 >> 8;
  _5 = _4 & 65280;
  _6 = _3 | _5;
  _7 = _2 << 8;
  _8 = _7 & 16711680;
  _9 = _6 | _8;
  _10 = _2 << 24;
  misc_dmem_16 = _9 | _10;
  # DEBUG misc_dmem => misc_dmem_16
  # DEBUG BEGIN_STMT
  if (misc_dmem_16 == 0)
    goto <bb 5>; [52.23%]
  else
    goto <bb 4>; [47.77%]

  <bb 4> [local count: 416752756]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_host_to_dmem_32_nolock (pe_15(D), misc_dmem_16, &misc_ctrl, 4);
  # DEBUG BEGIN_STMT
  pfe_pe_unlock (pe_15(D));

  <bb 5> [local count: 1073741824]:
  # ret_11 = PHI <114(2), 22(3), 0(4)>
  # DEBUG ret => ret_11
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  misc_ctrl ={v} {CLOBBER};
  return ret_11;

}


pfe_pe_mem_lock (struct pfe_pe_t * pe)
{
  uint32_t misc_dmem;
  errno_t ret;
  union pfe_ct_pe_mmap_t * _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pe_14(D)->mmap_data;
  if (_1 == 0B)
    goto <bb 5>; [18.75%]
  else
    goto <bb 3>; [81.25%]

  <bb 3> [local count: 872415233]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  _2 = _1->common.pe_misc_control;
  _3 = _2 >> 24;
  _4 = _2 >> 8;
  _5 = _4 & 65280;
  _6 = _3 | _5;
  _7 = _2 << 8;
  _8 = _7 & 16711680;
  _9 = _6 | _8;
  _10 = _2 << 24;
  misc_dmem_15 = _9 | _10;
  # DEBUG misc_dmem => misc_dmem_15
  # DEBUG BEGIN_STMT
  if (misc_dmem_15 == 0)
    goto <bb 5>; [52.23%]
  else
    goto <bb 4>; [47.77%]

  <bb 4> [local count: 416752756]:
  # DEBUG BEGIN_STMT
  ret_17 = pfe_pe_mem_process_lock (pe_14(D), misc_dmem_15);
  # DEBUG ret => ret_17

  <bb 5> [local count: 1073741824]:
  # ret_11 = PHI <114(2), 22(3), ret_17(4)>
  # DEBUG ret => ret_11
  # DEBUG BEGIN_STMT
  return ret_11;

}


pfe_pe_mem_process_lock (struct pfe_pe_t * pe, uint32_t misc_dmem)
{
  uint32_t timeout;
  struct pfe_ct_pe_misc_control_t misc_ctrl;
  errno_t ret;
  int _1;
  unsigned char _2;
  unsigned char _3;
  unsigned char _4;

  <bb 2> [local count: 974481959]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  misc_ctrl = {};
  # DEBUG BEGIN_STMT
  # DEBUG timeout => 10
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_lock (pe_11(D));
  if (_1 != 0)
    goto <bb 9>; [52.23%]
  else
    goto <bb 3>; [47.77%]

  <bb 3> [local count: 465510031]:
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe_11(D), &misc_ctrl, misc_dmem_13(D), 4);
  # DEBUG BEGIN_STMT
  _2 = misc_ctrl.graceful_stop_request;
  if (_2 != 0)
    goto <bb 4>; [35.00%]
  else
    goto <bb 5>; [65.00%]

  <bb 4> [local count: 162928511]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_pe_unlock (pe_11(D));
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 115
  goto <bb 9>; [100.00%]

  <bb 5> [local count: 302581521]:
  # DEBUG BEGIN_STMT
  misc_ctrl.graceful_stop_request = 255;
  # DEBUG BEGIN_STMT
  misc_ctrl.graceful_stop_confirmation = 0;
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_host_to_dmem_32_nolock (pe_11(D), misc_dmem_13(D), &misc_ctrl, 4);
  # DEBUG BEGIN_STMT
  _3 = pfe_pe_is_active_nolock (pe_11(D));
  if (_3 == 0)
    goto <bb 9>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 10> [local count: 151290760]:

  <bb 6> [local count: 1073741824]:
  # timeout_6 = PHI <10(10), timeout_20(11)>
  # DEBUG ret => NULL
  # DEBUG timeout => timeout_6
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (timeout_6 == 0)
    goto <bb 7>; [9.09%]
  else
    goto <bb 8>; [90.91%]

  <bb 7> [local count: 97603132]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  misc_ctrl.graceful_stop_request = 0;
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_host_to_dmem_32_nolock (pe_11(D), misc_dmem_13(D), &misc_ctrl, 4);
  # DEBUG BEGIN_STMT
  pfe_pe_unlock (pe_11(D));
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 62
  # DEBUG BEGIN_STMT
  goto <bb 9>; [100.00%]

  <bb 8> [local count: 976138692]:
  # DEBUG BEGIN_STMT
  oal_time_usleep (10);
  # DEBUG BEGIN_STMT
  timeout_20 = timeout_6 + 4294967295;
  # DEBUG timeout => timeout_20
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe_11(D), &misc_ctrl, misc_dmem_13(D), 4);
  # DEBUG BEGIN_STMT
  _4 = misc_ctrl.graceful_stop_confirmation;
  if (_4 == 0)
    goto <bb 11>; [94.50%]
  else
    goto <bb 9>; [5.50%]

  <bb 11> [local count: 922451064]:
  goto <bb 6>; [100.00%]

  <bb 9> [local count: 974481959]:
  # ret_5 = PHI <115(2), 115(4), 0(5), 62(7), 0(8)>
  # DEBUG ret => ret_5
  # DEBUG BEGIN_STMT
  misc_ctrl ={v} {CLOBBER};
  return ret_5;

}


pfe_pe_unlock (struct pfe_pe_t * pe)
{
  errno_t _5;
  short unsigned int _6;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  pe_2(D)->miflock = 0;
  # DEBUG BEGIN_STMT
  # DEBUG D#6 => &pe_2(D)->lock_mutex
  _6 = MEM[(const oal_mutex_t *)pe_2(D) + 100B];
  # DEBUG D#2 => D#6
  _5 = oal_mutex_unlock.isra.0 (_6);
  return _5;

}


pfe_pe_lock (struct pfe_pe_t * pe)
{
  errno_t ret;
  _Bool _1;
  long int _2;
  long int _3;
  short unsigned int _10;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG D#5 => &pe_5(D)->lock_mutex
  _10 = MEM[(const oal_mutex_t *)pe_5(D) + 100B];
  # DEBUG D#1 => D#5
  ret_8 = oal_mutex_lock.isra.0 (_10);
  # DEBUG ret => ret_8
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = ret_8 == 0;
  _2 = (long int) _1;
  _3 = __builtin_expect (_2, 1);
  if (_3 != 0)
    goto <bb 3>; [90.00%]
  else
    goto <bb 4>; [10.00%]

  <bb 3> [local count: 966367642]:
  # DEBUG BEGIN_STMT
  pe_5(D)->miflock = 1;

  <bb 4> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  return ret_8;

}


pfe_pe_is_active_nolock (struct pfe_pe_t * pe)
{
  bool_t ret;
  struct pfe_ct_pe_sw_state_monitor_t state_monitor;
  int _1;
  <unnamed type> _2;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  state_monitor = {};
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_get_state_monitor_nolock (pe_6(D), &state_monitor);
  if (_1 == 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  _2 = state_monitor.state;
  if (_2 != 8)
    goto <bb 4>; [66.00%]
  else
    goto <bb 6>; [34.00%]

  <bb 4> [local count: 354334802]:
  if (_2 != 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 5> [local count: 177167401]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 1

  <bb 6> [local count: 1073741824]:
  # ret_3 = PHI <0(2), 0(3), 0(4), 1(5)>
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  state_monitor ={v} {CLOBBER};
  return ret_3;

}


pfe_pe_get_state_monitor_nolock (struct pfe_pe_t * pe, struct pfe_ct_pe_sw_state_monitor_t * state_monitor)
{
  errno_t ret;
  union pfe_ct_pe_mmap_t * _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pe_15(D)->mmap_data;
  if (_1 == 0B)
    goto <bb 4>; [31.91%]
  else
    goto <bb 3>; [68.09%]

  <bb 3> [local count: 731110809]:
  # DEBUG BEGIN_STMT
  _2 = _1->common.state_monitor;
  _3 = _2 >> 24;
  _4 = _2 >> 8;
  _5 = _4 & 65280;
  _6 = _3 | _5;
  _7 = _2 << 8;
  _8 = _7 & 16711680;
  _9 = _6 | _8;
  _10 = _2 << 24;
  _11 = _9 | _10;
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe_15(D), state_monitor_16(D), _11, 8);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 4> [local count: 1073741824]:
  # ret_12 = PHI <5(2), 0(3)>
  # DEBUG ret => ret_12
  # DEBUG BEGIN_STMT
  return ret_12;

}


pfe_pe_free_mem (struct pfe_pe_t * pe, uint32_t pe_num)
{
  uint32_t ii;
  long unsigned int _1;
  struct pfe_pe_t * _2;

  <bb 2> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ii => 0
  goto <bb 4>; [100.00%]

  <bb 3> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  _1 = ii_3 * 112;
  _2 = pe_7(D) + _1;
  pfe_pe_unlock (_2);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2->mmap_data = 0B;
  # DEBUG BEGIN_STMT
  _2->fw_msg_section = 0B;
  # DEBUG BEGIN_STMT
  _2->fw_msg_section_size = 0;
  # DEBUG BEGIN_STMT
  _2->fw_feature_section = 0B;
  # DEBUG BEGIN_STMT
  _2->fw_feature_section_size = 0;
  # DEBUG BEGIN_STMT
  ii_14 = ii_3 + 1;
  # DEBUG ii => ii_14

  <bb 4> [local count: 1073741824]:
  # ii_3 = PHI <0(2), ii_14(3)>
  # DEBUG ii => ii_3
  # DEBUG BEGIN_STMT
  if (ii_3 < pe_num_6(D))
    goto <bb 3>; [89.00%]
  else
    goto <bb 5>; [11.00%]

  <bb 5> [local count: 118111601]:
  return;

}


pfe_pe_upload_sections (struct pfe_pe_t * pe, uint32_t pe_num, const struct ELF_File_t * elf_file)
{
  errno_t ret;
  const void * buf;
  addr_t load_addr;
  uint32_t pe_idx;
  uint32_t ii;
  struct Elf32_Shdr * _1;
  long unsigned int _2;
  struct Elf32_Shdr * _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  const void * _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  long unsigned int _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;
  long unsigned int _26;
  long unsigned int _27;
  long unsigned int _28;
  long unsigned int _29;
  long unsigned int _30;
  struct pfe_pe_t * _31;
  struct Elf32_Shdr * _32;
  struct Elf32_Shdr * _33;
  long unsigned int _34;
  long unsigned int _35;
  long unsigned int _36;
  long unsigned int _37;
  long unsigned int _38;
  long unsigned int _39;
  long unsigned int _40;
  long unsigned int _41;
  long unsigned int _42;
  long unsigned int _43;
  long unsigned int _44;
  long unsigned int _45;
  long unsigned int _46;
  long unsigned int _47;
  long unsigned int _48;
  long unsigned int _49;
  long unsigned int _50;
  long unsigned int _51;
  long unsigned int _52;
  long unsigned int _53;
  unsigned char _54;
  unsigned char _55;
  long unsigned int _56;
  short unsigned int _57;
  long unsigned int _58;
  errno_t _65;
  const struct fw_load_ops_t * _83;

  <bb 2> [local count: 25343637]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG ii => 0
  goto <bb 14>; [100.00%]

  <bb 3> [local count: 441582405]:
  # DEBUG BEGIN_STMT
  _1 = elf_file_72(D)->arSectHead32;
  _2 = ii_59 * 40;
  _3 = _1 + _2;
  _4 = _3->sh_flags;
  _5 = _4 >> 24;
  _8 = _4 << 24;
  _9 = _5 | _8;
  _10 = _4 >> 8;
  _11 = _10 & 65280;
  _12 = _9 | _11;
  _13 = _4 << 8;
  _14 = _13 & 16711680;
  _15 = _12 | _14;
  _16 = _15 & 7;
  if (_16 == 0)
    goto <bb 4>; [73.00%]
  else
    goto <bb 5>; [27.00%]

  <bb 4> [local count: 322355155]:
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 13>; [100.00%]

  <bb 5> [local count: 119227249]:
  # DEBUG BEGIN_STMT
  _17 = elf_file_72(D)->pvData;
  _18 = (long unsigned int) _17;
  _19 = _3->sh_offset;
  _20 = _19 >> 24;
  _21 = _19 << 24;
  _22 = _20 | _21;
  _23 = _19 >> 8;
  _24 = _23 & 65280;
  _25 = _22 | _24;
  _26 = _19 << 8;
  _27 = _26 & 16711680;
  _28 = _25 | _27;
  _29 = _18 + _28;
  buf_73 = (const void *) _29;
  # DEBUG buf => buf_73
  # DEBUG BEGIN_STMT
  load_addr_74 = pfe_pe_get_elf_sect_load_addr (elf_file_72(D), _3);
  # DEBUG load_addr => load_addr_74
  # DEBUG BEGIN_STMT
  if (load_addr_74 == 0)
    goto <bb 6>; [3.66%]
  else
    goto <bb 16>; [96.34%]

  <bb 16> [local count: 114863532]:
  goto <bb 10>; [100.00%]

  <bb 6> [local count: 4363717]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22
  # DEBUG BEGIN_STMT
  pfe_pe_free_mem (pe_76(D), pe_num_75(D));
  # DEBUG BEGIN_STMT
  goto <bb 15>; [100.00%]

  <bb 7> [local count: 1014686024]:
  # DEBUG BEGIN_STMT
  _30 = pe_idx_60 * 112;
  _31 = pe_76(D) + _30;
  _32 = elf_file_72(D)->arSectHead32;
  _33 = _32 + _2;
  _34 = _33->sh_size;
  _35 = _34 >> 24;
  _36 = _34 << 24;
  _37 = _35 | _36;
  _38 = _34 >> 8;
  _39 = _38 & 65280;
  _40 = _37 | _39;
  _41 = _34 << 8;
  _42 = _41 & 16711680;
  _43 = _40 | _42;
  _44 = _33->sh_type;
  _45 = _44 >> 24;
  _46 = _44 << 24;
  _47 = _45 | _46;
  _48 = _44 >> 8;
  _49 = _48 & 65280;
  _50 = _47 | _49;
  _51 = _44 << 8;
  _52 = _51 & 16711680;
  _53 = _50 | _52;
  ret_78 = pfe_pe_load_elf_section (_31, buf_73, load_addr_74, _43, _53);
  # DEBUG ret => ret_78
  # DEBUG BEGIN_STMT
  if (ret_78 != 0)
    goto <bb 8>; [5.50%]
  else
    goto <bb 9>; [94.50%]

  <bb 8> [local count: 55807731]:
  # ret_7 = PHI <ret_78(7)>
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_pe_free_mem (pe_76(D), pe_num_75(D));
  # DEBUG BEGIN_STMT
  goto <bb 11>; [100.00%]

  <bb 9> [local count: 958878293]:
  # DEBUG BEGIN_STMT
  pe_idx_79 = pe_idx_60 + 1;
  # DEBUG pe_idx => pe_idx_79

  <bb 10> [local count: 1073741824]:
  # pe_idx_60 = PHI <pe_idx_79(9), 0(16)>
  # ret_61 = PHI <0(9), ret_64(16)>
  # DEBUG ret => ret_61
  # DEBUG pe_idx => pe_idx_60
  # DEBUG BEGIN_STMT
  _54 = (unsigned char) pe_num_75(D);
  _83 = MEM[(const struct fw_load_ops_t * *)pe_76(D) + 60B];
  # DEBUG D#3 => pe_76(D)
  _55 = pfe_pe_fw_load_cycles.isra.0 (_83, _54);
  _56 = (long unsigned int) _55;
  if (_56 > pe_idx_60)
    goto <bb 7>; [94.50%]
  else
    goto <bb 11>; [5.50%]

  <bb 11> [local count: 114863532]:
  # ret_62 = PHI <ret_7(8), ret_61(10)>
  # DEBUG ret => ret_62
  # DEBUG BEGIN_STMT
  if (ret_62 != 0)
    goto <bb 12>; [3.66%]
  else
    goto <bb 13>; [96.34%]

  <bb 12> [local count: 4204005]:
  # ret_6 = PHI <ret_62(11)>
  # DEBUG BEGIN_STMT
  goto <bb 15>; [100.00%]

  <bb 13> [local count: 433014682]:
  # ret_63 = PHI <ret_64(4), ret_62(11)>
  # DEBUG ret => ret_63
  # DEBUG BEGIN_STMT
  ii_82 = ii_59 + 1;
  # DEBUG ii => ii_82

  <bb 14> [local count: 458358320]:
  # ii_59 = PHI <0(2), ii_82(13)>
  # ret_64 = PHI <0(2), ret_63(13)>
  # DEBUG ret => ret_64
  # DEBUG ii => ii_59
  # DEBUG BEGIN_STMT
  _57 = elf_file_72(D)->Header.r32.e_shnum;
  _58 = (long unsigned int) _57;
  if (_58 > ii_59)
    goto <bb 3>; [96.34%]
  else
    goto <bb 15>; [3.66%]

  <bb 15> [local count: 25343637]:
  # _65 = PHI <ret_6(12), ret_64(14), 22(6)>
  # DEBUG ret => NULL
  return _65;

}


oal_mutex_destroy (oal_mutex_t * mutex)
{
  errno_t _4;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _4 = oal_mutex_destroy_internal (mutex_2(D));
  return _4;

}


