pfe_pe_put_data_nolock (struct pfe_pe_t * pe, struct pfe_ct_buffer_t * buf)
{
  const struct pfe_ct_class_mmap_t * class_mmap_data;
  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;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  unsigned char flags.19_17;
  unsigned char _18;
  unsigned char _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;
  errno_t _47;

  <bb 2> :
  # DEBUG BEGIN_STMT
  flags = 0;
  # DEBUG BEGIN_STMT
  ret_37 = 2;
  # DEBUG ret => ret_37
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_get_mmap (pe_38(D), &mmap_data);
  if (_1 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 3>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  class_mmap_data_40 = &mmap_data.class_pe;
  # DEBUG class_mmap_data => class_mmap_data_40
  # DEBUG BEGIN_STMT
  _2 = class_mmap_data_40->get_buffer;
  if (_2 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _3 = class_mmap_data_40->get_buffer;
  _4 = _3 >> 24;
  _5 = class_mmap_data_40->get_buffer;
  _6 = _5 >> 8;
  _7 = _6 & 65280;
  _8 = _4 | _7;
  _9 = class_mmap_data_40->get_buffer;
  _10 = _9 << 8;
  _11 = _10 & 16711680;
  _12 = _8 | _11;
  _13 = class_mmap_data_40->get_buffer;
  _14 = _13 << 24;
  _15 = _12 | _14;
  _16 = _15 + 65;
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe_38(D), &flags, _16, 1);
  # DEBUG BEGIN_STMT
  flags.19_17 = flags;
  if (flags.19_17 == 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _18 = buf_43(D)->flags;
  _19 = _18 | 1;
  buf_43(D)->flags = _19;
  # DEBUG BEGIN_STMT
  _20 = class_mmap_data_40->get_buffer;
  _21 = _20 >> 24;
  _22 = class_mmap_data_40->get_buffer;
  _23 = _22 >> 8;
  _24 = _23 & 65280;
  _25 = _21 | _24;
  _26 = class_mmap_data_40->get_buffer;
  _27 = _26 << 8;
  _28 = _27 & 16711680;
  _29 = _25 | _28;
  _30 = class_mmap_data_40->get_buffer;
  _31 = _30 << 24;
  _32 = _29 | _31;
  pfe_pe_memcpy_from_host_to_dmem_32_nolock (pe_38(D), _32, buf_43(D), 66);
  # DEBUG BEGIN_STMT
  ret_46 = 0;
  # DEBUG ret => ret_46
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  ret_42 = 118;
  # DEBUG ret => ret_42

  <bb 7> :
  # ret_33 = PHI <ret_37(2), ret_37(3), ret_46(5), ret_42(6)>
  # DEBUG ret => ret_33
  # DEBUG BEGIN_STMT
  _47 = ret_33;
  flags ={v} {CLOBBER};
  mmap_data ={v} {CLOBBER};
  return _47;

}


pfe_pe_get_data_nolock (struct pfe_pe_t * pe, struct pfe_ct_buffer_t * buf)
{
  const struct pfe_ct_class_mmap_t * class_mmap_data;
  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;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  unsigned char flags.18_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;
  errno_t _60;

  <bb 2> :
  # DEBUG BEGIN_STMT
  flags = 0;
  # DEBUG BEGIN_STMT
  ret_49 = 2;
  # DEBUG ret => ret_49
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_get_mmap (pe_50(D), &mmap_data);
  if (_1 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 3>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  class_mmap_data_52 = &mmap_data.class_pe;
  # DEBUG class_mmap_data => class_mmap_data_52
  # DEBUG BEGIN_STMT
  _2 = class_mmap_data_52->put_buffer;
  if (_2 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _3 = class_mmap_data_52->put_buffer;
  _4 = _3 >> 24;
  _5 = class_mmap_data_52->put_buffer;
  _6 = _5 >> 8;
  _7 = _6 & 65280;
  _8 = _4 | _7;
  _9 = class_mmap_data_52->put_buffer;
  _10 = _9 << 8;
  _11 = _10 & 16711680;
  _12 = _8 | _11;
  _13 = class_mmap_data_52->put_buffer;
  _14 = _13 << 24;
  _15 = _12 | _14;
  _16 = _15 + 65;
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe_50(D), &flags, _16, 1);
  # DEBUG BEGIN_STMT
  flags.18_17 = flags;
  if (flags.18_17 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _18 = class_mmap_data_52->put_buffer;
  _19 = _18 >> 24;
  _20 = class_mmap_data_52->put_buffer;
  _21 = _20 >> 8;
  _22 = _21 & 65280;
  _23 = _19 | _22;
  _24 = class_mmap_data_52->put_buffer;
  _25 = _24 << 8;
  _26 = _25 & 16711680;
  _27 = _23 | _26;
  _28 = class_mmap_data_52->put_buffer;
  _29 = _28 << 24;
  _30 = _27 | _29;
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe_50(D), buf_55(D), _30, 66);
  # DEBUG BEGIN_STMT
  flags = 0;
  # DEBUG BEGIN_STMT
  _31 = class_mmap_data_52->put_buffer;
  _32 = _31 >> 24;
  _33 = class_mmap_data_52->put_buffer;
  _34 = _33 >> 8;
  _35 = _34 & 65280;
  _36 = _32 | _35;
  _37 = class_mmap_data_52->put_buffer;
  _38 = _37 << 8;
  _39 = _38 & 16711680;
  _40 = _36 | _39;
  _41 = class_mmap_data_52->put_buffer;
  _42 = _41 << 24;
  _43 = _40 | _42;
  _44 = _43 + 65;
  pfe_pe_memcpy_from_host_to_dmem_32_nolock (pe_50(D), _44, &flags, 1);
  # DEBUG BEGIN_STMT
  ret_59 = 0;
  # DEBUG ret => ret_59
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  ret_54 = 118;
  # DEBUG ret => ret_54

  <bb 7> :
  # ret_45 = PHI <ret_49(2), ret_49(3), ret_59(5), ret_54(6)>
  # DEBUG ret => ret_45
  # DEBUG BEGIN_STMT
  _60 = ret_45;
  flags ={v} {CLOBBER};
  mmap_data ={v} {CLOBBER};
  return _60;

}


pfe_pe_get_fw_state (struct pfe_pe_t * pe)
{
  struct pfe_ct_pe_sw_state_monitor_t state_monitor;
  int _1;
  int _2;
  int _3;
  pfe_ct_pe_sw_state_t _12;

  <bb 2> :
  # DEBUG BEGIN_STMT
  state_monitor = {};
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_lock (pe_7(D));
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = pfe_pe_get_state_monitor_nolock (pe_7(D), &state_monitor);
  if (_2 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  state_monitor.state = 0;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _3 = pfe_pe_unlock (pe_7(D));
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _12 = state_monitor.state;
  state_monitor ={v} {CLOBBER};
  return _12;

}


pfe_pe_get_class_algo_stats_nolock (struct pfe_pe_t * pe, uint32_t addr, struct pfe_ct_class_algo_stats_t * stats)
{
  errno_t ret;
  errno_t _7;

  <bb 2> :
  # 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
  ret_6 = 0;
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  _7 = ret_6;
  return _7;

}


pfe_pe_get_classify_stats_nolock (struct pfe_pe_t * pe, uint32_t addr, struct pfe_ct_classify_stats_t * stats)
{
  errno_t ret;
  errno_t _7;

  <bb 2> :
  # 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
  ret_6 = 0;
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  _7 = ret_6;
  return _7;

}


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;
  <unnamed type> _5;
  int _6;
  <unnamed type> _7;
  unsigned char _8;
  int _9;
  <unnamed type> _10;
  int _11;
  const char * _12;
  unsigned char _13;
  <unnamed type> _14;
  long unsigned int _15;
  long unsigned int _16;
  <unnamed type> _17;
  int _18;
  <unnamed type> _19;
  unsigned char _20;
  int _21;
  <unnamed type> _22;
  int _23;
  const char * _24;
  long unsigned int _25;
  <unnamed type> _26;
  bool_t _45;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_33 = 0;
  # DEBUG ret => ret_33
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_get_state_monitor_nolock (pe_35(D), &state_monitor);
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  ret_44 = 0;
  # DEBUG ret => ret_44
  goto <bb 12>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _2 = state_monitor.state;
  if (_2 == 9)
    goto <bb 5>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 5> :
  _3 = state_monitor.state;
  _4 = pe_35(D)->prev_state;
  if (_3 != _4)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _5 = pe_35(D)->type;
  _6 = (int) _5;
  _7 = hm_types[_6];
  _8 = pe_35(D)->id;
  _9 = (int) _8;
  _10 = state_monitor.state;
  _11 = (int) _10;
  _12 = states[_11];
  pfe_hm_report (_7, 2, 181, "Core %d raised exception in state %s", _9, _12);
  # DEBUG BEGIN_STMT
  ret_38 = 1;
  # DEBUG ret => ret_38

  <bb 7> :
  # ret_27 = PHI <ret_33(4), ret_33(5), ret_38(6)>
  # DEBUG ret => ret_27
  # DEBUG BEGIN_STMT
  _13 = pe_35(D)->stalled;
  if (_13 == 0)
    goto <bb 8>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 8> :
  _14 = state_monitor.state;
  if (_14 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 9> :
  _15 = state_monitor.counter;
  _16 = pe_35(D)->counter;
  if (_15 == _16)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _17 = pe_35(D)->type;
  _18 = (int) _17;
  _19 = hm_types[_18];
  _20 = pe_35(D)->id;
  _21 = (int) _20;
  _22 = state_monitor.state;
  _23 = (int) _22;
  _24 = states[_23];
  pfe_hm_report (_19, 2, 180, "Core %d stalled in state %s", _21, _24);
  # DEBUG BEGIN_STMT
  pe_35(D)->stalled = 1;
  # DEBUG BEGIN_STMT
  ret_41 = 1;
  # DEBUG ret => ret_41

  <bb 11> :
  # ret_28 = PHI <ret_27(7), ret_27(8), ret_27(9), ret_41(10)>
  # DEBUG ret => ret_28
  # DEBUG BEGIN_STMT
  _25 = state_monitor.counter;
  pe_35(D)->counter = _25;
  # DEBUG BEGIN_STMT
  _26 = state_monitor.state;
  pe_35(D)->prev_state = _26;

  <bb 12> :
  # ret_29 = PHI <ret_44(3), ret_28(11)>
  # DEBUG ret => ret_29
  # DEBUG BEGIN_STMT
  _45 = ret_29;
  state_monitor ={v} {CLOBBER};
  return _45;

}


pfe_pe_get_pe_stats_nolock (struct pfe_pe_t * pe, uint32_t addr, struct pfe_ct_pe_stats_t * stats)
{
  errno_t ret;
  errno_t _7;

  <bb 2> :
  # 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
  ret_6 = 0;
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  _7 = ret_6;
  return _7;

}


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

  <bb 2> :
  # 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 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_7 = 2;
  # DEBUG ret => ret_7
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  ret_6 = 0;
  # DEBUG ret => ret_6

  <bb 5> :
  # ret_2 = PHI <ret_7(3), ret_6(4)>
  # DEBUG ret => ret_2
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _8 = ret_2;
  pfe_pe_mmap ={v} {CLOBBER};
  return _8;

}


pfe_pe_get_fw_messages_nolock (struct pfe_pe_t * pe)
{
  errno_t _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = 0;
  return _1;

}


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;
  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;
  void * _33;
  long unsigned int _34;
  long unsigned int _35;
  long unsigned int _36;
  long unsigned int _37;
  long unsigned int _38;
  uint32_t * _39;
  long unsigned int _40;
  long unsigned int _41;
  void * _42;
  long unsigned int _43;
  long unsigned int _44;
  long unsigned int _45;
  long unsigned int _46;
  long unsigned int _47;
  uint32_t * _48;
  long unsigned int _49;
  long unsigned int _50;
  long unsigned int _51;
  long unsigned int _52;
  void * _53;
  long unsigned int _54;
  long unsigned int _55;
  long unsigned int _56;
  long unsigned int _57;
  long unsigned int _58;
  uint32_t * _59;
  long unsigned int _60;
  long unsigned int _61;
  long unsigned int _62;
  long unsigned int _63;
  void * _64;
  long unsigned int _65;
  long unsigned int _66;
  long unsigned int _67;
  long unsigned int _68;
  long unsigned int _69;
  uint32_t * _70;
  long unsigned int _71;
  long unsigned int _72;
  void * _73;
  long unsigned int _74;
  long unsigned int _75;
  struct pfe_ct_feature_desc_t * _76;
  errno_t _77;
  errno_t _78;
  errno_t _89;
  errno_t _90;
  errno_t _93;
  errno_t _97;
  errno_t _98;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pe_83(D)->fw_feature_section;
  if (_1 == 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _98 = 2;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 14>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _2 = pe_83(D)->fw_features_base;
  if (_2 == 4294967295)
    goto <bb 5>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = pfe_pe_get_mmap (pe_83(D), &pfe_pe_mmap);
  if (_3 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _90 = 2;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 10>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _4 = pfe_pe_mmap.common.version.features;
  _5 = _4 >> 24;
  _6 = pfe_pe_mmap.common.version.features;
  _7 = _6 >> 8;
  _8 = _7 & 65280;
  _9 = _5 | _8;
  _10 = pfe_pe_mmap.common.version.features;
  _11 = _10 << 8;
  _12 = _11 & 16711680;
  _13 = _9 | _12;
  _14 = pfe_pe_mmap.common.version.features;
  _15 = _14 << 24;
  _16 = _13 | _15;
  pe_83(D)->fw_features_base = _16;
  # DEBUG BEGIN_STMT
  _17 = pe_83(D)->fw_features_base;
  _18 = pe_83(D)->fw_feature_section_size;
  if (_17 > _18)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pe_83(D)->fw_features_base = 4294967295;
  # DEBUG BEGIN_STMT
  _89 = 5;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _19 = pfe_pe_mmap.common.version.features_count;
  _20 = _19 >> 24;
  _21 = pfe_pe_mmap.common.version.features_count;
  _22 = _21 >> 8;
  _23 = _22 & 65280;
  _24 = _20 | _23;
  _25 = pfe_pe_mmap.common.version.features_count;
  _26 = _25 << 8;
  _27 = _26 & 16711680;
  _28 = _24 | _27;
  _29 = pfe_pe_mmap.common.version.features_count;
  _30 = _29 << 24;
  _31 = _28 | _30;
  pe_83(D)->fw_features_size = _31;
  pfe_pe_mmap ={v} {CLOBBER};
  goto <bb 11>; [INV]

  <bb 10> :
  # _77 = PHI <_90(6), _89(8)>
  pfe_pe_mmap ={v} {CLOBBER};
  goto <bb 14>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _32 = pe_83(D)->fw_features_size;
  if (id_92(D) < _32)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  _33 = pe_83(D)->fw_feature_section;
  _34 = (long unsigned int) _33;
  _35 = pe_83(D)->fw_features_base;
  _36 = id_92(D) * 4;
  _37 = _35 + _36;
  _38 = _34 + _37;
  _39 = (uint32_t *) _38;
  _40 = *_39;
  _41 = _40 >> 24;
  _42 = pe_83(D)->fw_feature_section;
  _43 = (long unsigned int) _42;
  _44 = pe_83(D)->fw_features_base;
  _45 = id_92(D) * 4;
  _46 = _44 + _45;
  _47 = _43 + _46;
  _48 = (uint32_t *) _47;
  _49 = *_48;
  _50 = _49 >> 8;
  _51 = _50 & 65280;
  _52 = _41 | _51;
  _53 = pe_83(D)->fw_feature_section;
  _54 = (long unsigned int) _53;
  _55 = pe_83(D)->fw_features_base;
  _56 = id_92(D) * 4;
  _57 = _55 + _56;
  _58 = _54 + _57;
  _59 = (uint32_t *) _58;
  _60 = *_59;
  _61 = _60 << 8;
  _62 = _61 & 16711680;
  _63 = _52 | _62;
  _64 = pe_83(D)->fw_feature_section;
  _65 = (long unsigned int) _64;
  _66 = pe_83(D)->fw_features_base;
  _67 = id_92(D) * 4;
  _68 = _66 + _67;
  _69 = _65 + _68;
  _70 = (uint32_t *) _69;
  _71 = *_70;
  _72 = _71 << 24;
  entry_ptr_94 = _63 | _72;
  # DEBUG entry_ptr => entry_ptr_94
  # DEBUG BEGIN_STMT
  _73 = pe_83(D)->fw_feature_section;
  _74 = (long unsigned int) _73;
  _75 = entry_ptr_94 + _74;
  _76 = (struct pfe_ct_feature_desc_t *) _75;
  *entry_95(D) = _76;
  # DEBUG BEGIN_STMT
  _97 = 0;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 14>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  _93 = 2;

  <bb 14> :
  # _78 = PHI <_98(3), _77(10), _97(12), _93(13)>
  return _78;

}


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

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  str_3 = 0B;
  # DEBUG str => str_3
  # DEBUG BEGIN_STMT
  _1 = pe_5(D)->fw_features_base;
  if (_1 != 4294967295)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  str_6 = pe_5(D)->fw_feature_section;
  # DEBUG str => str_6

  <bb 4> :
  # str_2 = PHI <str_3(2), str_6(3)>
  # DEBUG str => str_2
  # DEBUG BEGIN_STMT
  _7 = str_2;
  return _7;

}


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;
  long unsigned int _3;
  struct pfe_pe_t * _4;
  long unsigned int _5;
  struct pfe_pe_t * _6;
  long unsigned int _7;
  struct pfe_pe_t * _8;
  long unsigned int _9;
  struct pfe_pe_t * _10;
  long unsigned int _11;
  struct pfe_pe_t * _12;
  oal_mutex_t * _13;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (pe_17(D) != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 3> :
  if (pe_num_19(D) != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  pe_idx_20 = 0;
  # DEBUG pe_idx => pe_idx_20
  goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _1 = pe_idx_14 * 112;
  _2 = pe_17(D) + _1;
  _2->mmap_data = 0B;
  # DEBUG BEGIN_STMT
  _3 = pe_idx_14 * 112;
  _4 = pe_17(D) + _3;
  _4->fw_msg_section = 0B;
  # DEBUG BEGIN_STMT
  _5 = pe_idx_14 * 112;
  _6 = pe_17(D) + _5;
  _6->fw_msg_section_size = 0;
  # DEBUG BEGIN_STMT
  _7 = pe_idx_14 * 112;
  _8 = pe_17(D) + _7;
  _8->fw_feature_section = 0B;
  # DEBUG BEGIN_STMT
  _9 = pe_idx_14 * 112;
  _10 = pe_17(D) + _9;
  _10->fw_feature_section_size = 0;
  # DEBUG BEGIN_STMT
  _11 = pe_idx_14 * 112;
  _12 = pe_17(D) + _11;
  _13 = &_12->lock_mutex;
  oal_mutex_destroy (_13);
  # DEBUG BEGIN_STMT
  pe_idx_27 = pe_idx_14 + 1;
  # DEBUG pe_idx => pe_idx_27

  <bb 6> :
  # pe_idx_14 = PHI <pe_idx_20(4), pe_idx_27(5)>
  # DEBUG pe_idx => pe_idx_14
  # DEBUG BEGIN_STMT
  if (pe_idx_14 < pe_num_19(D))
    goto <bb 5>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 7> :
  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;
  union pfe_ct_pe_mmap_t * _2;
  errno_t _11;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pe_6(D)->mmap_data;
  if (_1 != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = pe_6(D)->mmap_data;
  memcpy (mmap_8(D), _2, 188);
  # DEBUG BEGIN_STMT
  ret_10 = 0;
  # DEBUG ret => ret_10
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  ret_7 = 2;
  # DEBUG ret => ret_7

  <bb 5> :
  # ret_3 = PHI <ret_10(3), ret_7(4)>
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  _11 = ret_3;
  return _11;

}


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;
  uint32_t mmap_size;
  const struct Elf32_Shdr * shdr;
  const struct ELF_File_t * elf_file;
  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;
  int _3;
  unsigned char _4;
  long unsigned int _5;
  struct pfe_pe_t * _6;
  const struct fw_load_ops_t * _7;
  long unsigned int _8;
  struct pfe_pe_t * _9;
  const struct fw_load_ops_t * _10;
  void (*<T984>) (struct pfe_pe_tag *, pfe_pe_mem_t, uint32_t, addr_t, uint32_t) _11;
  long unsigned int _12;
  struct pfe_pe_t * _13;
  long unsigned int _14;
  struct pfe_pe_t * _15;
  unsigned int _16;
  long unsigned int _17;
  struct pfe_pe_t * _18;
  const struct fw_load_ops_t * _19;
  void (*<T984>) (struct pfe_pe_tag *, pfe_pe_mem_t, uint32_t, addr_t, uint32_t) _20;
  long unsigned int _21;
  struct pfe_pe_t * _22;
  long unsigned int _23;
  struct pfe_pe_t * _24;
  unsigned int _25;
  unsigned char _26;
  unsigned char _27;
  long unsigned int _28;
  unsigned char _29;
  long unsigned int section_idx.8_30;
  struct Elf32_Shdr * _31;
  long unsigned int _32;
  const void * _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;
  const void * _49;
  long unsigned int mmap_size.9_50;
  long unsigned int _51;
  long unsigned int mmap_size.10_52;
  long unsigned int _53;
  long unsigned int _54;
  long unsigned int _55;
  long unsigned int mmap_size.11_56;
  long unsigned int _57;
  long unsigned int _58;
  long unsigned int _59;
  long unsigned int mmap_size.12_60;
  long unsigned int _61;
  long unsigned int _62;
  const void * _63;
  long unsigned int _64;
  long unsigned int _65;
  long unsigned int _66;
  long unsigned int _67;
  long unsigned int _68;
  long unsigned int _69;
  long unsigned int _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;
  const void * _79;
  long unsigned int mmap_size.13_80;
  int _81;
  unsigned char _82;
  long unsigned int section_idx.14_83;
  struct Elf32_Shdr * _84;
  long unsigned int _85;
  const void * _86;
  long unsigned int _87;
  long unsigned int _88;
  long unsigned int _89;
  long unsigned int _90;
  long unsigned int _91;
  long unsigned int _92;
  long unsigned int _93;
  long unsigned int _94;
  long unsigned int _95;
  long unsigned int _96;
  long unsigned int _97;
  long unsigned int _98;
  long unsigned int _99;
  long unsigned int _100;
  long unsigned int _101;
  long unsigned int _102;
  long unsigned int _103;
  long unsigned int _104;
  long unsigned int _105;
  long unsigned int _106;
  long unsigned int _107;
  long unsigned int _108;
  long unsigned int _109;
  long unsigned int _110;
  long unsigned int _111;
  unsigned char _112;
  long unsigned int section_idx.15_113;
  struct Elf32_Shdr * _114;
  long unsigned int _115;
  const void * _116;
  long unsigned int _117;
  long unsigned int _118;
  long unsigned int _119;
  long unsigned int _120;
  long unsigned int _121;
  long unsigned int _122;
  long unsigned int _123;
  long unsigned int _124;
  long unsigned int _125;
  long unsigned int _126;
  long unsigned int _127;
  long unsigned int _128;
  long unsigned int _129;
  long unsigned int _130;
  long unsigned int _131;
  long unsigned int _132;
  long unsigned int _133;
  long unsigned int _134;
  long unsigned int _135;
  long unsigned int _136;
  long unsigned int _137;
  long unsigned int _138;
  long unsigned int _139;
  long unsigned int _140;
  long unsigned int _141;
  long unsigned int _142;
  long unsigned int _143;
  unsigned char _144;
  long unsigned int _145;
  struct pfe_pe_t * _146;
  int _147;
  long unsigned int _148;
  struct pfe_pe_t * _149;
  long unsigned int _150;
  struct pfe_pe_t * _151;
  long unsigned int _152;
  struct pfe_pe_t * _153;
  long unsigned int _154;
  struct pfe_pe_t * _155;
  long unsigned int _156;
  struct pfe_pe_t * _157;
  long unsigned int _158;
  struct pfe_pe_t * _159;
  long unsigned int _160;
  struct pfe_pe_t * _161;
  long unsigned int _162;
  struct pfe_pe_t * _163;
  errno_t _171;
  unsigned int _198;
  errno_t _205;
  errno_t _229;
  errno_t _232;
  errno_t _236;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_178 = 0;
  # DEBUG ret => ret_178
  # DEBUG BEGIN_STMT
  section_idx = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  elf_file_182 = elf_181(D);
  # DEBUG elf_file => elf_file_182
  # DEBUG BEGIN_STMT
  shdr_183 = 0B;
  # DEBUG shdr => shdr_183
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  features_size_184 = 0;
  # DEBUG features_size => features_size_184
  messages_size_185 = 0;
  # DEBUG messages_size => messages_size_185
  # DEBUG BEGIN_STMT
  features_mem_186 = 0B;
  # DEBUG features_mem => features_mem_186
  messages_mem_187 = 0B;
  # DEBUG messages_mem => messages_mem_187
  # DEBUG BEGIN_STMT
  pe_idx_188 = 0;
  # DEBUG pe_idx => pe_idx_188
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = pe_idx_165 * 112;
  _2 = pe_190(D) + _1;
  _3 = pfe_pe_lock (_2);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pe_idx_240 = pe_idx_165 + 1;
  # DEBUG pe_idx => pe_idx_240

  <bb 4> :
  # pe_idx_165 = PHI <pe_idx_188(2), pe_idx_240(3)>
  # DEBUG pe_idx => pe_idx_165
  # DEBUG BEGIN_STMT
  if (pe_idx_165 < pe_num_189(D))
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _4 = (unsigned char) pe_num_189(D);
  ret_192 = pfe_pe_fw_install_ops (pe_190(D), _4);
  # DEBUG ret => ret_192
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pe_idx_193 = 0;
  # DEBUG pe_idx => pe_idx_193
  goto <bb 9>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _5 = pe_idx_166 * 112;
  _6 = pe_190(D) + _5;
  _7 = _6->fw_load_ops;
  if (_7 == 0B)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _236 = 19;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 24>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _8 = pe_idx_166 * 112;
  _9 = pe_190(D) + _8;
  _10 = _9->fw_load_ops;
  _11 = _10->pe_memset;
  _12 = pe_idx_166 * 112;
  _13 = pe_190(D) + _12;
  _14 = pe_idx_166 * 112;
  _15 = pe_190(D) + _14;
  _16 = _15->dmem_size;
  _11 (_13, 0, 0, 0, _16);
  # DEBUG BEGIN_STMT
  _17 = pe_idx_166 * 112;
  _18 = pe_190(D) + _17;
  _19 = _18->fw_load_ops;
  _20 = _19->pe_memset;
  _21 = pe_idx_166 * 112;
  _22 = pe_190(D) + _21;
  _23 = pe_idx_166 * 112;
  _24 = pe_190(D) + _23;
  _25 = _24->imem_size;
  _20 (_22, 1, 0, 0, _25);
  # DEBUG BEGIN_STMT
  pe_idx_235 = pe_idx_166 + 1;
  # DEBUG pe_idx => pe_idx_235

  <bb 9> :
  # pe_idx_166 = PHI <pe_idx_193(5), pe_idx_235(8)>
  # DEBUG pe_idx => pe_idx_166
  # DEBUG BEGIN_STMT
  _26 = (unsigned char) pe_num_189(D);
  _27 = pfe_pe_fw_load_cycles (pe_190(D), _26);
  _28 = (long unsigned int) _27;
  if (pe_idx_166 < _28)
    goto <bb 6>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _29 = ELF_SectFindName (elf_file_182, ".pfe_pe_mmap", &section_idx, 0B, 0B);
  if (_29 == 1)
    goto <bb 11>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  section_idx.8_30 = section_idx;
  mask_sectIdx_196 = section_idx.8_30 & 2147483647;
  # DEBUG mask_sectIdx => mask_sectIdx_196
  # DEBUG BEGIN_STMT
  _31 = elf_file_182->arSectHead32;
  _32 = mask_sectIdx_196 * 40;
  shdr_197 = _31 + _32;
  # DEBUG shdr => shdr_197
  # DEBUG BEGIN_STMT
  _33 = elf_file_182->pvData;
  _34 = (long unsigned int) _33;
  _35 = shdr_197->sh_offset;
  _36 = _35 >> 24;
  _37 = shdr_197->sh_offset;
  _38 = _37 << 24;
  _39 = _36 | _38;
  _40 = shdr_197->sh_offset;
  _41 = _40 >> 8;
  _42 = _41 & 65280;
  _43 = _39 | _42;
  _44 = shdr_197->sh_offset;
  _45 = _44 << 8;
  _46 = _45 & 16711680;
  _47 = _43 | _46;
  _48 = _34 + _47;
  _49 = (const void *) _48;
  _198 = MEM[(char * {ref-all})_49];
  MEM[(char * {ref-all})&mmap_size] = _198;
  # DEBUG BEGIN_STMT
  mmap_size.9_50 = mmap_size;
  _51 = mmap_size.9_50 >> 24;
  mmap_size.10_52 = mmap_size;
  _53 = mmap_size.10_52 >> 8;
  _54 = _53 & 65280;
  _55 = _51 | _54;
  mmap_size.11_56 = mmap_size;
  _57 = mmap_size.11_56 << 8;
  _58 = _57 & 16711680;
  _59 = _55 | _58;
  mmap_size.12_60 = mmap_size;
  _61 = mmap_size.12_60 << 24;
  _62 = _59 | _61;
  mmap_size = _62;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _63 = elf_file_182->pvData;
  _64 = (long unsigned int) _63;
  _65 = shdr_197->sh_offset;
  _66 = _65 >> 24;
  _67 = shdr_197->sh_offset;
  _68 = _67 << 24;
  _69 = _66 | _68;
  _70 = shdr_197->sh_offset;
  _71 = _70 >> 8;
  _72 = _71 & 65280;
  _73 = _69 | _72;
  _74 = shdr_197->sh_offset;
  _75 = _74 << 8;
  _76 = _75 & 16711680;
  _77 = _73 | _76;
  _78 = _64 + _77;
  _79 = (const void *) _78;
  mmap_size.13_80 = mmap_size;
  memcpy (&tmp_mmap, _79, mmap_size.13_80);
  # DEBUG BEGIN_STMT
  _81 = strcmp (&mmap_version_str, &tmp_mmap.common.version.cthdr);
  if (_81 != 0)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  ret_202 = 22;
  # DEBUG ret => ret_202
  # DEBUG BEGIN_STMT
  print_fw_issue (&tmp_mmap);
  # DEBUG BEGIN_STMT
  pfe_pe_free_mem (pe_190(D), pe_num_189(D));
  # DEBUG BEGIN_STMT
  _205 = ret_202;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 24>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _82 = ELF_SectFindName (elf_file_182, ".messages", &section_idx, 0B, 0B);
  if (_82 == 1)
    goto <bb 14>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  section_idx.14_83 = section_idx;
  mask_sectIdx_207 = section_idx.14_83 & 2147483647;
  # DEBUG mask_sectIdx => mask_sectIdx_207
  # DEBUG BEGIN_STMT
  _84 = elf_file_182->arSectHead32;
  _85 = mask_sectIdx_207 * 40;
  shdr_208 = _84 + _85;
  # DEBUG shdr => shdr_208
  # DEBUG BEGIN_STMT
  _86 = elf_file_182->pvData;
  _87 = shdr_208->sh_offset;
  _88 = _87 >> 24;
  _89 = shdr_208->sh_offset;
  _90 = _89 << 24;
  _91 = _88 | _90;
  _92 = shdr_208->sh_offset;
  _93 = _92 >> 8;
  _94 = _93 & 65280;
  _95 = _91 | _94;
  _96 = shdr_208->sh_offset;
  _97 = _96 << 8;
  _98 = _97 & 16711680;
  _99 = _95 | _98;
  messages_mem_209 = _86 + _99;
  # DEBUG messages_mem => messages_mem_209
  # DEBUG BEGIN_STMT
  _100 = shdr_208->sh_size;
  _101 = _100 >> 24;
  _102 = shdr_208->sh_size;
  _103 = _102 << 24;
  _104 = _101 | _103;
  _105 = shdr_208->sh_size;
  _106 = _105 >> 8;
  _107 = _106 & 65280;
  _108 = _104 | _107;
  _109 = shdr_208->sh_size;
  _110 = _109 << 8;
  _111 = _110 & 16711680;
  messages_size_210 = _108 | _111;
  # DEBUG messages_size => messages_size_210

  <bb 15> :
  # messages_size_168 = PHI <messages_size_185(13), messages_size_210(14)>
  # messages_mem_170 = PHI <messages_mem_187(13), messages_mem_209(14)>
  # DEBUG messages_mem => messages_mem_170
  # DEBUG messages_size => messages_size_168
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _112 = ELF_SectFindName (elf_file_182, ".features", &section_idx, 0B, 0B);
  if (_112 == 1)
    goto <bb 16>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  section_idx.15_113 = section_idx;
  mask_sectIdx_212 = section_idx.15_113 & 2147483647;
  # DEBUG mask_sectIdx => mask_sectIdx_212
  # DEBUG BEGIN_STMT
  _114 = elf_file_182->arSectHead32;
  _115 = mask_sectIdx_212 * 40;
  shdr_213 = _114 + _115;
  # DEBUG shdr => shdr_213
  # DEBUG BEGIN_STMT
  _116 = elf_file_182->pvData;
  _117 = (long unsigned int) _116;
  _118 = shdr_213->sh_offset;
  _119 = _118 >> 24;
  _120 = shdr_213->sh_offset;
  _121 = _120 << 24;
  _122 = _119 | _121;
  _123 = shdr_213->sh_offset;
  _124 = _123 >> 8;
  _125 = _124 & 65280;
  _126 = _122 | _125;
  _127 = shdr_213->sh_offset;
  _128 = _127 << 8;
  _129 = _128 & 16711680;
  _130 = _126 | _129;
  _131 = _117 + _130;
  features_mem_214 = (void *) _131;
  # DEBUG features_mem => features_mem_214
  # DEBUG BEGIN_STMT
  _132 = shdr_213->sh_size;
  _133 = _132 >> 24;
  _134 = shdr_213->sh_size;
  _135 = _134 << 24;
  _136 = _133 | _135;
  _137 = shdr_213->sh_size;
  _138 = _137 >> 8;
  _139 = _138 & 65280;
  _140 = _136 | _139;
  _141 = shdr_213->sh_size;
  _142 = _141 << 8;
  _143 = _142 & 16711680;
  features_size_215 = _140 | _143;
  # DEBUG features_size => features_size_215

  <bb 17> :
  # features_size_167 = PHI <features_size_184(15), features_size_215(16)>
  # features_mem_169 = PHI <features_mem_186(15), features_mem_214(16)>
  # DEBUG features_mem => features_mem_169
  # DEBUG features_size => features_size_167
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _144 = elf_file_182->Header.e_ident[5];
  if (_144 == 1)
    goto <bb 18>; [INV]
  else
    goto <bb 19>; [INV]

  <bb 18> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_230 = 22;
  # DEBUG ret => ret_230
  # DEBUG BEGIN_STMT
  pfe_pe_free_mem (pe_190(D), pe_num_189(D));
  # DEBUG BEGIN_STMT
  _232 = ret_230;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 24>; [INV]

  <bb 19> :
  # DEBUG BEGIN_STMT
  ret_217 = pfe_pe_upload_sections (pe_190(D), pe_num_189(D), elf_file_182);
  # DEBUG ret => ret_217
  # DEBUG BEGIN_STMT
  if (ret_217 == 0)
    goto <bb 20>; [INV]
  else
    goto <bb 23>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  ii_218 = 0;
  # DEBUG ii => ii_218
  goto <bb 22>; [INV]

  <bb 21> :
  # DEBUG BEGIN_STMT
  _145 = ii_164 * 112;
  _146 = pe_190(D) + _145;
  _147 = pfe_pe_unlock (_146);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _148 = ii_164 * 112;
  _149 = pe_190(D) + _148;
  _149->mmap_data = &tmp_mmap;
  # DEBUG BEGIN_STMT
  _150 = ii_164 * 112;
  _151 = pe_190(D) + _150;
  _151->fw_msg_section_size = messages_size_168;
  # DEBUG BEGIN_STMT
  _152 = ii_164 * 112;
  _153 = pe_190(D) + _152;
  _153->fw_msg_section = messages_mem_170;
  # DEBUG BEGIN_STMT
  _154 = ii_164 * 112;
  _155 = pe_190(D) + _154;
  _155->fw_feature_section_size = features_size_167;
  # DEBUG BEGIN_STMT
  _156 = ii_164 * 112;
  _157 = pe_190(D) + _156;
  _157->fw_feature_section = features_mem_169;
  # DEBUG BEGIN_STMT
  _158 = ii_164 * 112;
  _159 = pe_190(D) + _158;
  _159->fw_features_base = 4294967295;
  # DEBUG BEGIN_STMT
  _160 = ii_164 * 112;
  _161 = pe_190(D) + _160;
  _161->last_message_write_index = 0;
  # DEBUG BEGIN_STMT
  _162 = ii_164 * 112;
  _163 = pe_190(D) + _162;
  _163->message_record_addr = 0;
  # DEBUG BEGIN_STMT
  ii_228 = ii_164 + 1;
  # DEBUG ii => ii_228

  <bb 22> :
  # ii_164 = PHI <ii_218(20), ii_228(21)>
  # DEBUG ii => ii_164
  # DEBUG BEGIN_STMT
  if (ii_164 < pe_num_189(D))
    goto <bb 21>; [INV]
  else
    goto <bb 23>; [INV]

  <bb 23> :
  # DEBUG BEGIN_STMT
  _229 = ret_217;

  <bb 24> :
  # _171 = PHI <_236(7), _205(12), _232(18), _229(23)>
  section_idx ={v} {CLOBBER};
  mmap_size ={v} {CLOBBER};
  return _171;

}


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;
  int _3;
  unsigned char _4;
  long unsigned int _5;
  struct pfe_pe_t * _6;
  const struct fw_load_ops_t * _7;
  long unsigned int _8;
  struct pfe_pe_t * _9;
  const struct fw_load_ops_t * _10;
  void (*<T984>) (struct pfe_pe_tag *, pfe_pe_mem_t, uint32_t, addr_t, uint32_t) _11;
  long unsigned int _12;
  struct pfe_pe_t * _13;
  long unsigned int _14;
  struct pfe_pe_t * _15;
  unsigned int _16;
  long unsigned int _17;
  struct pfe_pe_t * _18;
  const struct fw_load_ops_t * _19;
  void (*<T984>) (struct pfe_pe_tag *, pfe_pe_mem_t, uint32_t, addr_t, uint32_t) _20;
  long unsigned int _21;
  struct pfe_pe_t * _22;
  long unsigned int _23;
  struct pfe_pe_t * _24;
  unsigned int _25;
  unsigned char _26;
  unsigned char _27;
  long unsigned int _28;
  long unsigned int _29;
  struct pfe_pe_t * _30;
  int _31;
  errno_t _50;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_40 = 0;
  # DEBUG ret => ret_40
  # DEBUG BEGIN_STMT
  pe_idx_41 = 0;
  # DEBUG pe_idx => pe_idx_41
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = pe_idx_32 * 112;
  _2 = pe_44(D) + _1;
  _3 = pfe_pe_lock (_2);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pe_idx_58 = pe_idx_32 + 1;
  # DEBUG pe_idx => pe_idx_58

  <bb 4> :
  # pe_idx_32 = PHI <pe_idx_41(2), pe_idx_58(3)>
  # DEBUG pe_idx => pe_idx_32
  # DEBUG BEGIN_STMT
  if (pe_idx_32 < pe_num_43(D))
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _4 = (unsigned char) pe_num_43(D);
  ret_46 = pfe_pe_fw_install_ops (pe_44(D), _4);
  # DEBUG ret => ret_46
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pe_idx_47 = 0;
  # DEBUG pe_idx => pe_idx_47
  goto <bb 9>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _5 = pe_idx_33 * 112;
  _6 = pe_44(D) + _5;
  _7 = _6->fw_load_ops;
  if (_7 == 0B)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  ret_53 = 19;
  # DEBUG ret => ret_53

  <bb 8> :
  # ret_35 = PHI <ret_36(6), ret_53(7)>
  # DEBUG ret => ret_35
  # DEBUG BEGIN_STMT
  _8 = pe_idx_33 * 112;
  _9 = pe_44(D) + _8;
  _10 = _9->fw_load_ops;
  _11 = _10->pe_memset;
  _12 = pe_idx_33 * 112;
  _13 = pe_44(D) + _12;
  _14 = pe_idx_33 * 112;
  _15 = pe_44(D) + _14;
  _16 = _15->dmem_size;
  _11 (_13, 0, 0, 0, _16);
  # DEBUG BEGIN_STMT
  _17 = pe_idx_33 * 112;
  _18 = pe_44(D) + _17;
  _19 = _18->fw_load_ops;
  _20 = _19->pe_memset;
  _21 = pe_idx_33 * 112;
  _22 = pe_44(D) + _21;
  _23 = pe_idx_33 * 112;
  _24 = pe_44(D) + _23;
  _25 = _24->imem_size;
  _20 (_22, 1, 0, 0, _25);
  # DEBUG BEGIN_STMT
  pe_idx_56 = pe_idx_33 + 1;
  # DEBUG pe_idx => pe_idx_56

  <bb 9> :
  # pe_idx_33 = PHI <pe_idx_47(5), pe_idx_56(8)>
  # ret_36 = PHI <ret_46(5), ret_35(8)>
  # DEBUG ret => ret_36
  # DEBUG pe_idx => pe_idx_33
  # DEBUG BEGIN_STMT
  _26 = (unsigned char) pe_num_43(D);
  _27 = pfe_pe_fw_load_cycles (pe_44(D), _26);
  _28 = (long unsigned int) _27;
  if (pe_idx_33 < _28)
    goto <bb 6>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  pe_idx_49 = 0;
  # DEBUG pe_idx => pe_idx_49
  goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _29 = pe_idx_34 * 112;
  _30 = pe_44(D) + _29;
  _31 = pfe_pe_unlock (_30);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pe_idx_52 = pe_idx_34 + 1;
  # DEBUG pe_idx => pe_idx_52

  <bb 12> :
  # pe_idx_34 = PHI <pe_idx_49(10), pe_idx_52(11)>
  # DEBUG pe_idx => pe_idx_34
  # DEBUG BEGIN_STMT
  if (pe_idx_34 < pe_num_43(D))
    goto <bb 11>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  _50 = ret_36;
  return _50;

}


print_fw_issue (const union pfe_ct_pe_mmap_t * fw_mmap)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  return;

}


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;
  unsigned int _3;
  long unsigned int _4;
  unsigned int _5;
  long unsigned int _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = pe_8(D)->cbus_base_va;
  _2 = addr_reg_9(D) + _1;
  pe_8(D)->mem_access_addr = _2;
  # DEBUG BEGIN_STMT
  _3 = pe_8(D)->cbus_base_va;
  _4 = rdata_reg_11(D) + _3;
  pe_8(D)->mem_access_rdata = _4;
  # DEBUG BEGIN_STMT
  _5 = pe_8(D)->cbus_base_va;
  _6 = wdata_reg_13(D) + _5;
  pe_8(D)->mem_access_wdata = _6;
  return;

}


pfe_pe_set_lmem (struct pfe_pe_t * pe, addr_t elf_base, addr_t len)
{
  <bb 2> :
  # 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> :
  # 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> :
  # 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 _3;
  struct pfe_pe_t * _21;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_pe_7 = pe_6(D);
  # DEBUG tmp_pe => tmp_pe_7
  # DEBUG BEGIN_STMT
  _1 = type_8(D) + 255;
  if (_1 <= 2)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  memset (tmp_pe_7, 0, 112);
  # DEBUG BEGIN_STMT
  tmp_pe_7->type = type_8(D);
  # DEBUG BEGIN_STMT
  tmp_pe_7->cbus_base_va = cbus_base_va_12(D);
  # DEBUG BEGIN_STMT
  tmp_pe_7->id = id_14(D);
  # DEBUG BEGIN_STMT
  tmp_pe_7->fw_msg_section = 0B;
  # DEBUG BEGIN_STMT
  tmp_pe_7->mmap_data = 0B;
  # DEBUG BEGIN_STMT
  tmp_pe_7->lock_mutex = 5;
  # DEBUG BEGIN_STMT
  _2 = &tmp_pe_7->lock_mutex;
  _3 = oal_mutex_init (_2);
  if (_3 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  tmp_pe_20 = 0B;
  # DEBUG tmp_pe => tmp_pe_20

  <bb 5> :
  # tmp_pe_4 = PHI <tmp_pe_7(2), tmp_pe_7(3), tmp_pe_20(4)>
  # DEBUG tmp_pe => tmp_pe_4
  # DEBUG BEGIN_STMT
  _21 = tmp_pe_4;
  return _21;

}


pfe_pe_get_elf_sect_load_addr (const struct ELF_File_t * elf_file, const struct Elf32_Shdr * shdr)
{
  bool_t stt;
  uint_t ii;
  const struct Elf32_Phdr * phdr;
  addr_t offset;
  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 _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;
  struct Elf32_Phdr * _13;
  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;
  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;
  long unsigned int _66;
  long unsigned int _67;
  long unsigned int _68;
  long unsigned int _69;
  long unsigned int _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;
  long unsigned int _92;
  long unsigned int _93;
  long unsigned int _94;
  short unsigned int _95;
  unsigned int _96;
  addr_t _111;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = shdr_100(D)->sh_addr;
  _2 = _1 >> 24;
  _3 = shdr_100(D)->sh_addr;
  _4 = _3 << 24;
  _5 = _2 | _4;
  _6 = shdr_100(D)->sh_addr;
  _7 = _6 >> 8;
  _8 = _7 & 65280;
  _9 = _5 | _8;
  _10 = shdr_100(D)->sh_addr;
  _11 = _10 << 8;
  _12 = _11 & 16711680;
  virt_addr_101 = _9 | _12;
  # DEBUG virt_addr => virt_addr_101
  # DEBUG BEGIN_STMT
  load_addr_102 = 0;
  # DEBUG load_addr => load_addr_102
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  stt_103 = 0;
  # DEBUG stt => stt_103
  # DEBUG BEGIN_STMT
  ii_104 = 0;
  # DEBUG ii => ii_104
  goto <bb 7>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _13 = elf_file_105(D)->arProgHead32;
  _14 = ii_98 * 32;
  phdr_106 = _13 + _14;
  # DEBUG phdr => phdr_106
  # DEBUG BEGIN_STMT
  _15 = phdr_106->p_vaddr;
  _16 = _15 >> 24;
  _17 = phdr_106->p_vaddr;
  _18 = _17 << 24;
  _19 = _16 | _18;
  _20 = phdr_106->p_vaddr;
  _21 = _20 >> 8;
  _22 = _21 & 65280;
  _23 = _19 | _22;
  _24 = phdr_106->p_vaddr;
  _25 = _24 << 8;
  _26 = _25 & 16711680;
  _27 = _23 | _26;
  if (virt_addr_101 >= _27)
    goto <bb 4>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 4> :
  _28 = phdr_106->p_vaddr;
  _29 = _28 >> 24;
  _30 = phdr_106->p_vaddr;
  _31 = _30 << 24;
  _32 = _29 | _31;
  _33 = phdr_106->p_vaddr;
  _34 = _33 >> 8;
  _35 = _34 & 65280;
  _36 = _32 | _35;
  _37 = phdr_106->p_vaddr;
  _38 = _37 << 8;
  _39 = _38 & 16711680;
  _40 = _36 | _39;
  _41 = phdr_106->p_memsz;
  _42 = _41 >> 24;
  _43 = phdr_106->p_memsz;
  _44 = _43 << 24;
  _45 = _42 | _44;
  _46 = phdr_106->p_memsz;
  _47 = _46 >> 8;
  _48 = _47 & 65280;
  _49 = _45 | _48;
  _50 = phdr_106->p_memsz;
  _51 = _50 << 8;
  _52 = _51 & 16711680;
  _53 = _49 | _52;
  _54 = _40 + _53;
  _55 = shdr_100(D)->sh_size;
  _56 = _55 >> 24;
  _57 = shdr_100(D)->sh_size;
  _58 = _57 << 24;
  _59 = _56 | _58;
  _60 = shdr_100(D)->sh_size;
  _61 = _60 >> 8;
  _62 = _61 & 65280;
  _63 = _59 | _62;
  _64 = shdr_100(D)->sh_size;
  _65 = _64 << 8;
  _66 = _65 & 16711680;
  _67 = _63 | _66;
  _68 = _54 - _67;
  if (virt_addr_101 <= _68)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _69 = phdr_106->p_vaddr;
  _70 = _69 >> 24;
  _71 = phdr_106->p_vaddr;
  _72 = _71 << 24;
  _73 = _70 | _72;
  _74 = phdr_106->p_vaddr;
  _75 = _74 >> 8;
  _76 = _75 & 65280;
  _77 = _73 | _76;
  _78 = phdr_106->p_vaddr;
  _79 = _78 << 8;
  _80 = _79 & 16711680;
  _81 = _77 | _80;
  _82 = phdr_106->p_paddr;
  _83 = _82 >> 24;
  _84 = phdr_106->p_paddr;
  _85 = _84 << 24;
  _86 = _83 | _85;
  _87 = phdr_106->p_paddr;
  _88 = _87 >> 8;
  _89 = _88 & 65280;
  _90 = _86 | _89;
  _91 = phdr_106->p_paddr;
  _92 = _91 << 8;
  _93 = _92 & 16711680;
  _94 = _90 | _93;
  offset_107 = _81 - _94;
  # DEBUG offset => offset_107
  # DEBUG BEGIN_STMT
  load_addr_108 = virt_addr_101 - offset_107;
  # DEBUG load_addr => load_addr_108
  # DEBUG BEGIN_STMT
  stt_109 = 1;
  # DEBUG stt => stt_109
  # DEBUG BEGIN_STMT
  goto <bb 8>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  ii_110 = ii_98 + 1;
  # DEBUG ii => ii_110

  <bb 7> :
  # ii_98 = PHI <ii_104(2), ii_110(6)>
  # DEBUG ii => ii_98
  # DEBUG BEGIN_STMT
  _95 = elf_file_105(D)->Header.r32.e_phnum;
  _96 = (unsigned int) _95;
  if (ii_98 < _96)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 8> :
  # load_addr_97 = PHI <load_addr_102(7), load_addr_108(5)>
  # DEBUG load_addr => load_addr_97
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _111 = load_addr_97;
  return _111;

}


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;
  errno_t _18;

  <bb 2> :
  # 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>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  ret_val_17 = pfe_pe_load_dmem_section_nolock (pe_6(D), sdata_12(D), load_addr_7(D), size_8(D), type_13(D));
  # DEBUG ret_val => ret_val_17
  goto <bb 7>; [INV]

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  ret_val_15 = pfe_pe_load_imem_section_nolock (pe_6(D), sdata_12(D), load_addr_7(D), size_8(D), type_13(D));
  # DEBUG ret_val => ret_val_15
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_val_11 = 22;
  # DEBUG ret_val => ret_val_11

  <bb 7> :
  # ret_val_3 = PHI <ret_val_17(3), ret_val_15(5), ret_val_11(6)>
  # DEBUG ret_val => ret_val_3
  # DEBUG BEGIN_STMT
  _18 = ret_val_3;
  return _18;

}


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;
  unsigned int _3;
  long unsigned int _4;
  bool_t _13;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pe_7(D)->imem_elf_base_va;
  _2 = pe_7(D)->imem_size;
  reg_end_8 = _1 + _2;
  # DEBUG reg_end => reg_end_8
  # DEBUG BEGIN_STMT
  _3 = pe_7(D)->imem_elf_base_va;
  if (addr_9(D) >= _3)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  _4 = addr_9(D) + size_10(D);
  if (reg_end_8 > _4)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  ret_11 = 1;
  # DEBUG ret => ret_11
  goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  ret_12 = 0;
  # DEBUG ret => ret_12

  <bb 6> :
  # ret_5 = PHI <ret_11(4), ret_12(5)>
  # DEBUG ret => ret_5
  # DEBUG BEGIN_STMT
  _13 = ret_5;
  return _13;

}


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;
  unsigned int _3;
  long unsigned int _4;
  bool_t _13;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pe_7(D)->dmem_elf_base_va;
  _2 = pe_7(D)->dmem_size;
  reg_end_8 = _1 + _2;
  # DEBUG reg_end => reg_end_8
  # DEBUG BEGIN_STMT
  _3 = pe_7(D)->dmem_elf_base_va;
  if (addr_9(D) >= _3)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  _4 = addr_9(D) + size_10(D);
  if (reg_end_8 > _4)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  ret_11 = 1;
  # DEBUG ret => ret_11
  goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  ret_12 = 0;
  # DEBUG ret => ret_12

  <bb 6> :
  # ret_5 = PHI <ret_11(4), ret_12(5)>
  # DEBUG ret => ret_5
  # DEBUG BEGIN_STMT
  _13 = ret_5;
  return _13;

}


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;
  unsigned int _5;
  const struct fw_load_ops_t * _6;
  void (*<T988>) (struct pfe_pe_tag *, pfe_pe_mem_t, addr_t, const void *, uint32_t) _7;
  unsigned int _8;
  unsigned int _9;
  errno_t _24;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_12 = 0;
  # DEBUG ret => ret_12
  # DEBUG BEGIN_STMT
  data.17_1 = (unsigned int) data_13(D);
  _2 = data.17_1 & 3;
  _3 = addr_14(D) & 1;
  if (_2 != _3)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_23 = 117;
  # DEBUG ret => ret_23
  goto <bb 11>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _4 = addr_14(D) & 1;
  if (_4 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_22 = 117;
  # DEBUG ret => ret_22
  goto <bb 11>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _5 = size_15(D) & 1;
  if (_5 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_21 = 117;
  # DEBUG ret => ret_21
  goto <bb 11>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  switch (type_16(D)) <default: <L8> [INV], case 1: <L7> [INV], case 1879048234: <L14> [INV]>

  <bb 9> :
<L7>:
  # DEBUG BEGIN_STMT
  _6 = pe_18(D)->fw_load_ops;
  _7 = _6->pe_memcpy;
  _8 = pe_18(D)->imem_elf_base_va;
  _9 = addr_14(D) - _8;
  _7 (pe_18(D), 1, _9, data_13(D), size_15(D));
  # DEBUG BEGIN_STMT
  goto <bb 11>; [INV]

  <bb 10> :
<L8>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_20 = 22;
  # DEBUG ret => ret_20
  # DEBUG BEGIN_STMT

  <bb 11> :
  # ret_10 = PHI <ret_23(3), ret_22(5), ret_21(7), ret_12(8), ret_12(9), ret_20(10)>
<L14>:
  # DEBUG ret => ret_10
  # DEBUG BEGIN_STMT
  _24 = ret_10;
  return _24;

}


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;
  errno_t _25;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ret_13 = 0;
  # DEBUG ret => ret_13
  # DEBUG BEGIN_STMT
  sdata.16_1 = (unsigned int) sdata_14(D);
  _2 = addr_15(D) ^ sdata.16_1;
  _3 = _2 & 3;
  if (_3 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_24 = 22;
  # DEBUG ret => ret_24
  goto <bb 10>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _4 = addr_15(D) & 3;
  if (_4 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_23 = 22;
  # DEBUG ret => ret_23
  goto <bb 10>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  switch (type_16(D)) <default: <L7> [INV], case 1: <L5> [INV], case 8: <L6> [INV], case 1879048234: <L12> [INV]>

  <bb 7> :
<L5>:
  # DEBUG BEGIN_STMT
  _5 = pe_18(D)->fw_load_ops;
  _6 = _5->pe_memcpy;
  _7 = pe_18(D)->dmem_elf_base_va;
  _8 = addr_15(D) - _7;
  _6 (pe_18(D), 0, _8, sdata_14(D), size_19(D));
  # DEBUG BEGIN_STMT
  goto <bb 10>; [INV]

  <bb 8> :
<L6>:
  # DEBUG BEGIN_STMT
  _9 = pe_18(D)->fw_load_ops;
  _10 = _9->pe_memset;
  _10 (pe_18(D), 0, 0, addr_15(D), size_19(D));
  # DEBUG BEGIN_STMT
  goto <bb 10>; [INV]

  <bb 9> :
<L7>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_22 = 22;
  # DEBUG ret => ret_22
  # DEBUG BEGIN_STMT

  <bb 10> :
  # ret_11 = PHI <ret_24(3), ret_23(5), ret_13(6), ret_13(7), ret_13(8), ret_22(9)>
<L12>:
  # DEBUG ret => ret_11
  # DEBUG BEGIN_STMT
  _25 = ret_11;
  return _25;

}


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;
  unsigned char mem_lock_error.3_4;
  long unsigned int ii.4_5;
  long unsigned int _6;
  long unsigned int _7;
  unsigned int ii.5_8;
  unsigned int _9;
  struct pfe_pe_t * _10;
  long unsigned int ii.6_11;
  long unsigned int _12;
  void * _13;
  unsigned int ii.7_14;
  unsigned int _15;
  struct pfe_pe_t * _16;
  errno_t _47;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ii_30 = 0;
  # DEBUG ii => ii_30
  # DEBUG BEGIN_STMT
  mem_lock_error_31 = 0;
  # DEBUG mem_lock_error => mem_lock_error_31
  # DEBUG BEGIN_STMT
  ret_32 = 0;
  # DEBUG ret => ret_32
  # DEBUG BEGIN_STMT
  ret_unlock_33 = 0;
  # DEBUG ret_unlock => ret_unlock_33
  # DEBUG BEGIN_STMT
  ii_34 = 0;
  # DEBUG ii => ii_34
  goto <bb 6>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  ii.2_1 = (unsigned int) ii_17;
  _2 = ii.2_1 * 112;
  _3 = pe_41(D) + _2;
  ret_53 = pfe_pe_mem_lock (_3);
  # DEBUG ret => ret_53
  # DEBUG BEGIN_STMT
  if (ret_53 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  mem_lock_error.3_4 = mem_lock_error_21;
  mem_lock_error_54 = mem_lock_error.3_4 + 1;
  # DEBUG mem_lock_error => mem_lock_error_54

  <bb 5> :
  # mem_lock_error_20 = PHI <mem_lock_error_21(3), mem_lock_error_54(4)>
  # DEBUG mem_lock_error => mem_lock_error_20
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ii_55 = ii_17 + 1;
  # DEBUG ii => ii_55

  <bb 6> :
  # ii_17 = PHI <ii_34(2), ii_55(5)>
  # mem_lock_error_21 = PHI <mem_lock_error_31(2), mem_lock_error_20(5)>
  # ret_22 = PHI <ret_32(2), ret_53(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_36(D))
    goto <bb 3>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  if (mem_lock_error_21 == 0)
    goto <bb 8>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  ii_37 = 0;
  # DEBUG ii => ii_37
  goto <bb 12>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  ii.4_5 = (long unsigned int) ii_18;
  _6 = ii.4_5 + 1;
  _7 = read_len_38(D) * _6;
  if (buffer_len_39(D) >= _7)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  ii.5_8 = (unsigned int) ii_18;
  _9 = ii.5_8 * 112;
  _10 = pe_41(D) + _9;
  ii.6_11 = (long unsigned int) ii_18;
  _12 = read_len_38(D) * ii.6_11;
  _13 = dst_ptr_42(D) + _12;
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (_10, _13, src_addr_43(D), read_len_38(D));
  # DEBUG BEGIN_STMT
  ii_45 = ii_18 + 1;
  # DEBUG ii => ii_45
  goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  ret_40 = 11;
  # DEBUG ret => ret_40
  # DEBUG BEGIN_STMT
  goto <bb 13>; [INV]

  <bb 12> :
  # ii_18 = PHI <ii_37(8), ii_45(10)>
  # DEBUG ii => ii_18
  # DEBUG BEGIN_STMT
  if (ii_18 < pe_count_36(D))
    goto <bb 9>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 13> :
  # ret_23 = PHI <ret_22(7), ret_40(11), ret_22(12)>
  # DEBUG ret => ret_23
  # DEBUG BEGIN_STMT
  ii_46 = 0;
  # DEBUG ii => ii_46
  goto <bb 17>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  ii.7_14 = (unsigned int) ii_19;
  _15 = ii.7_14 * 112;
  _16 = pe_41(D) + _15;
  ret_unlock_49 = pfe_pe_mem_unlock (_16);
  # DEBUG ret_unlock => ret_unlock_49
  # DEBUG BEGIN_STMT
  if (ret_unlock_49 != 0)
    goto <bb 15>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_50 = ret_unlock_49;
  # DEBUG ret => ret_50

  <bb 16> :
  # ret_24 = PHI <ret_25(14), ret_50(15)>
  # DEBUG ret => ret_24
  # DEBUG BEGIN_STMT
  ii_51 = ii_19 + 1;
  # DEBUG ii => ii_51

  <bb 17> :
  # ii_19 = PHI <ii_46(13), ii_51(16)>
  # ret_25 = PHI <ret_23(13), ret_24(16)>
  # DEBUG ret => ret_25
  # DEBUG ii => ii_19
  # DEBUG BEGIN_STMT
  if (ii_19 < pe_count_36(D))
    goto <bb 14>; [INV]
  else
    goto <bb 18>; [INV]

  <bb 18> :
  # DEBUG BEGIN_STMT
  _47 = ret_25;
  return _47;

}


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;
  int _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_6 = pfe_pe_mem_lock (pe_4(D));
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  if (ret_6 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 3>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe_4(D), dst_ptr_7(D), src_addr_8(D), len_9(D));
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_mem_unlock (pe_4(D));

  <bb 4> :
  # 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 int _2;
  unsigned char _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int val.1_6;
  unsigned char _7;
  long unsigned int _8;
  long unsigned int iftmp.0_12;
  long unsigned int iftmp.0_30;
  long unsigned int iftmp.0_31;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  dst_byteptr_16 = dst_ptr_15(D);
  # DEBUG dst_byteptr => dst_byteptr_16
  # DEBUG BEGIN_STMT
  src_temp_18 = src_addr_17(D);
  # DEBUG src_temp => src_temp_18
  # DEBUG BEGIN_STMT
  len_temp_20 = len_19(D);
  # DEBUG len_temp => len_temp_20
  # DEBUG BEGIN_STMT
  _1 = src_temp_18 & 3;
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = src_temp_18 & 3;
  offset_22 = 4 - _2;
  # DEBUG offset => offset_22
  # DEBUG BEGIN_STMT
  offset_23 = MIN_EXPR <offset_22, len_19(D)>;
  # DEBUG offset => offset_23
  # DEBUG BEGIN_STMT
  _3 = (unsigned char) offset_23;
  _4 = pfe_pe_mem_read (pe_24(D), 0, src_temp_18, _3);
  val = _4;
  # DEBUG BEGIN_STMT
  memcpy (dst_byteptr_16, &val, offset_23);
  # DEBUG BEGIN_STMT
  dst_byteptr_28 = dst_byteptr_16 + offset_23;
  # DEBUG dst_byteptr => dst_byteptr_28
  # DEBUG BEGIN_STMT
  src_temp_29 = src_addr_17(D) + offset_23;
  # DEBUG src_temp => src_temp_29
  # DEBUG BEGIN_STMT
  if (len_19(D) >= offset_23)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  iftmp.0_31 = len_19(D) - offset_23;
  goto <bb 6>; [INV]

  <bb 5> :
  iftmp.0_30 = 0;

  <bb 6> :
  # iftmp.0_12 = PHI <iftmp.0_31(4), iftmp.0_30(5)>
  len_temp_32 = iftmp.0_12;
  # DEBUG len_temp => len_temp_32
  goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _5 = pfe_pe_mem_read (pe_24(D), 0, src_temp_10, 4);
  val = _5;
  # DEBUG BEGIN_STMT
  val.1_6 = val;
  MEM[(uint32_t *)dst_byteptr_9] = val.1_6;
  # DEBUG BEGIN_STMT
  len_temp_40 = len_temp_11 + 4294967292;
  # DEBUG len_temp => len_temp_40
  # DEBUG BEGIN_STMT
  src_temp_41 = src_temp_10 + 4;
  # DEBUG src_temp => src_temp_41
  # DEBUG BEGIN_STMT
  dst_byteptr_42 = dst_byteptr_9 + 4;
  # DEBUG dst_byteptr => dst_byteptr_42

  <bb 8> :
  # dst_byteptr_9 = PHI <dst_byteptr_28(6), dst_byteptr_42(7), dst_byteptr_16(2)>
  # src_temp_10 = PHI <src_temp_29(6), src_temp_41(7), src_temp_18(2)>
  # len_temp_11 = PHI <len_temp_32(6), len_temp_40(7), len_temp_20(2)>
  # 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 7>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  if (len_temp_11 != 0)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _7 = (unsigned char) len_temp_11;
  _8 = pfe_pe_mem_read (pe_24(D), 0, src_temp_10, _7);
  val = _8;
  # DEBUG BEGIN_STMT
  memcpy (dst_byteptr_9, &val, len_temp_11);

  <bb 11> :
  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;
  int _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_6 = pfe_pe_mem_lock (pe_4(D));
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  if (ret_6 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 3>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_host_to_dmem_32_nolock (pe_4(D), dst_addr_7(D), src_ptr_8(D), len_9(D));
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_mem_unlock (pe_4(D));

  <bb 4> :
  # 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 int _1;
  unsigned char _2;
  unsigned char _3;
  unsigned int _4;
  unsigned char _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  src_byteptr_16 = src_ptr_15(D);
  # DEBUG src_byteptr => src_byteptr_16
  # DEBUG BEGIN_STMT
  dst_temp_18 = dst_addr_17(D);
  # DEBUG dst_temp => dst_temp_18
  # DEBUG BEGIN_STMT
  len_temp_20 = len_19(D);
  # DEBUG len_temp => len_temp_20
  # DEBUG BEGIN_STMT
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = dst_temp_8 & 3;
  offset_22 = 4 - _1;
  # DEBUG offset => offset_22
  # DEBUG BEGIN_STMT
  _2 = *src_byteptr_6;
  val_23 = (uint32_t) _2;
  # DEBUG val => val_23
  # DEBUG BEGIN_STMT
  _3 = (unsigned char) offset_22;
  pfe_pe_mem_write (pe_24(D), 0, val_23, dst_temp_8, 1, _3);
  # DEBUG BEGIN_STMT
  dst_temp_26 = dst_temp_8 + 1;
  # DEBUG dst_temp => dst_temp_26
  # DEBUG BEGIN_STMT
  src_byteptr_27 = src_byteptr_6 + 1;
  # DEBUG src_byteptr => src_byteptr_27
  # DEBUG BEGIN_STMT
  len_temp_28 = len_temp_10 + 4294967295;
  # DEBUG len_temp => len_temp_28

  <bb 4> :
  # src_byteptr_6 = PHI <src_byteptr_16(2), src_byteptr_27(3)>
  # dst_temp_8 = PHI <dst_temp_18(2), dst_temp_26(3)>
  # len_temp_10 = PHI <len_temp_20(2), len_temp_28(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 5>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 5> :
  if (len_temp_10 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  val_32 = MEM[(uint32_t *)src_byteptr_7];
  # DEBUG val => val_32
  # DEBUG BEGIN_STMT
  pfe_pe_mem_write (pe_24(D), 0, val_32, dst_temp_9, 4, 0);
  # DEBUG BEGIN_STMT
  len_temp_34 = len_temp_11 + 4294967292;
  # DEBUG len_temp => len_temp_34
  # DEBUG BEGIN_STMT
  src_byteptr_35 = src_byteptr_7 + 4;
  # DEBUG src_byteptr => src_byteptr_35
  # DEBUG BEGIN_STMT
  dst_temp_36 = dst_temp_9 + 4;
  # DEBUG dst_temp => dst_temp_36

  <bb 7> :
  # src_byteptr_7 = PHI <src_byteptr_6(5), src_byteptr_35(6), src_byteptr_6(4)>
  # dst_temp_9 = PHI <dst_temp_8(5), dst_temp_36(6), dst_temp_8(4)>
  # len_temp_11 = PHI <len_temp_10(5), len_temp_34(6), len_temp_10(4)>
  # 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 6>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  if (len_temp_11 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  val_30 = pfe_pe_get_u32_from_byteptr (src_byteptr_7, len_temp_11);
  # DEBUG val => val_30
  # DEBUG BEGIN_STMT
  _5 = (unsigned char) len_temp_11;
  pfe_pe_mem_write (pe_24(D), 0, val_30, dst_temp_9, _5, 0);

  <bb 10> :
  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;
  const uint8_t * _4;
  unsigned char _5;
  long unsigned int _6;
  long unsigned int _7;
  uint32_t _17;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  switch (len_9(D)) <default: <L3> [INV], case 1: <L0> [INV], case 2: <L1> [INV], case 3: <L2> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  _1 = *src_byteptr_11(D);
  val_15 = (uint32_t) _1;
  # DEBUG val => val_15
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  _2 = MEM[(uint16_t *)src_byteptr_11(D)];
  val_14 = (uint32_t) _2;
  # DEBUG val => val_14
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  _3 = MEM[(uint16_t *)src_byteptr_11(D)];
  val_12 = (uint32_t) _3;
  # DEBUG val => val_12
  # DEBUG BEGIN_STMT
  _4 = src_byteptr_11(D) + 2;
  _5 = *_4;
  _6 = (long unsigned int) _5;
  _7 = _6 << 16;
  val_13 = val_12 + _7;
  # DEBUG val => val_13
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 6> :
<L3>:
  # DEBUG BEGIN_STMT
  val_16 = MEM[(uint32_t *)src_byteptr_11(D)];
  # DEBUG val => val_16
  # DEBUG BEGIN_STMT

  <bb 7> :
  # val_8 = PHI <val_15(3), val_14(4), val_13(5), val_16(6)>
  # DEBUG val => val_8
  # DEBUG BEGIN_STMT
  _17 = val_8;
  return _17;

}


pfe_pe_mem_write (struct pfe_pe_t * pe, pfe_pe_mem_t mem, uint32_t val, addr_t addr, uint8_t size, uint8_t offset)
{
  addr_t addr_temp;
  uint8_t size_temp;
  uint32_t val_temp;
  uint8_t offset_temp;
  uint32_t memsel;
  uint8_t bytesel;
  _Bool _1;
  long int _2;
  long int _3;
  unsigned int _4;
  unsigned int _5;
  int _6;
  int _7;
  int _8;
  unsigned int _9;
  int _10;
  long unsigned int _11;
  unsigned char _12;
  unsigned char _13;
  int _14;
  unsigned int _15;
  unsigned int _16;
  int _17;
  long unsigned int _18;
  long unsigned int _19;
  unsigned char _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;
  unsigned char _29;
  _Bool _30;
  long int _31;
  long 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;
  unsigned int _41;
  volatile uint32_t * _42;
  long unsigned int _43;
  unsigned int _44;
  volatile uint32_t * _45;

  <bb 2> :
  # DEBUG BEGIN_STMT
  bytesel_49 = 0;
  # DEBUG bytesel => bytesel_49
  # DEBUG BEGIN_STMT
  memsel_50 = 0;
  # DEBUG memsel => memsel_50
  # DEBUG BEGIN_STMT
  offset_temp_52 = offset_51(D);
  # DEBUG offset_temp => offset_temp_52
  # DEBUG BEGIN_STMT
  val_temp_54 = val_53(D);
  # DEBUG val_temp => val_temp_54
  # DEBUG BEGIN_STMT
  size_temp_56 = size_55(D);
  # DEBUG size_temp => size_temp_56
  # DEBUG BEGIN_STMT
  addr_temp_58 = addr_57(D);
  # DEBUG addr_temp => addr_temp_58
  # DEBUG BEGIN_STMT
  _1 = offset_temp_52 != 0;
  _2 = (long int) _1;
  _3 = __builtin_expect (_2, 0);
  if (_3 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _4 = addr_temp_58 & 3;
  _5 = _4 * 8;
  val_temp_60 = val_53(D) << _5;
  # DEBUG val_temp => val_temp_60
  # DEBUG BEGIN_STMT
  _6 = (int) offset_temp_52;
  _7 = (int) size_temp_56;
  _8 = _6 - _7;
  _9 = 1 << _8;
  bytesel_61 = (uint8_t) _9;
  # DEBUG bytesel => bytesel_61
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _10 = (int) size_temp_56;
  _11 = 1 << _10;
  _12 = (unsigned char) _11;
  _13 = _12 + 255;
  _14 = (int) _13;
  _15 = (unsigned int) size_temp_56;
  _16 = 4 - _15;
  _17 = _14 << _16;
  bytesel_59 = (uint8_t) _17;
  # DEBUG bytesel => bytesel_59

  <bb 5> :
  # bytesel_46 = PHI <bytesel_61(3), bytesel_59(4)>
  # val_temp_48 = PHI <val_temp_60(3), val_temp_54(4)>
  # DEBUG val_temp => val_temp_48
  # DEBUG bytesel => bytesel_46
  # DEBUG BEGIN_STMT
  if (mem_62(D) == 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  memsel_64 = 262144;
  # DEBUG memsel => memsel_64
  goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  memsel_63 = 131072;
  # DEBUG memsel => memsel_63

  <bb 8> :
  # memsel_47 = PHI <memsel_64(6), memsel_63(7)>
  # DEBUG memsel => memsel_47
  # DEBUG BEGIN_STMT
  _18 = addr_temp_58 & 1048575;
  _19 = memsel_47 | _18;
  _20 = pe_66(D)->id;
  _21 = (long unsigned int) _20;
  _22 = _21 << 20;
  _23 = _22 & 15728640;
  _24 = _19 | _23;
  _25 = (long unsigned int) bytesel_46;
  _26 = _25 << 24;
  _27 = _26 & 251658240;
  _28 = _24 | _27;
  addr_temp_67 = _28 | 2147483648;
  # DEBUG addr_temp => addr_temp_67
  # DEBUG BEGIN_STMT
  _29 = pe_66(D)->miflock;
  _30 = _29 == 0;
  _31 = (long int) _30;
  _32 = __builtin_expect (_31, 0);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _33 = val_temp_48 >> 24;
  _34 = val_temp_48 >> 8;
  _35 = _34 & 65280;
  _36 = _33 | _35;
  _37 = val_temp_48 << 8;
  _38 = _37 & 16711680;
  _39 = _36 | _38;
  _40 = val_temp_48 << 24;
  _41 = pe_66(D)->mem_access_wdata;
  _42 = (volatile uint32_t *) _41;
  _43 = _39 | _40;
  *_42 ={v} _43;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _44 = pe_66(D)->mem_access_addr;
  _45 = (volatile uint32_t *) _44;
  *_45 ={v} addr_temp_67;
  # DEBUG BEGIN_STMT
  return;

}


pfe_pe_mem_read (struct pfe_pe_t * pe, pfe_pe_mem_t mem, addr_t addr, uint8_t size)
{
  addr_t adrr_temp;
  uint8_t size_temp;
  uint8_t offset;
  uint32_t memsel;
  uint32_t mask;
  uint32_t val;
  unsigned int _1;
  _Bool _2;
  long int _3;
  long int _4;
  unsigned int _5;
  unsigned int _6;
  unsigned int _7;
  unsigned char _8;
  unsigned char _9;
  unsigned char _10;
  unsigned char _11;
  unsigned char _12;
  unsigned int _13;
  long unsigned int _14;
  unsigned int _15;
  unsigned int _16;
  unsigned int _17;
  unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  unsigned char _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;
  unsigned char _26;
  _Bool _27;
  long int _28;
  long int _29;
  unsigned int _30;
  volatile uint32_t * _31;
  unsigned int _32;
  volatile uint32_t * _33;
  long unsigned int _34;
  long unsigned int _35;
  long unsigned int _36;
  unsigned int _37;
  volatile uint32_t * _38;
  long unsigned int _39;
  long unsigned int _40;
  long unsigned int _41;
  long unsigned int _42;
  unsigned int _43;
  volatile uint32_t * _44;
  long unsigned int _45;
  long unsigned int _46;
  long unsigned int _47;
  long unsigned int _48;
  unsigned int _49;
  volatile uint32_t * _50;
  long unsigned int _51;
  long unsigned int _52;
  unsigned int _53;
  _Bool _54;
  long int _55;
  long int _56;
  unsigned int _57;
  unsigned int _58;
  long unsigned int _77;
  uint32_t _88;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  size_temp_65 = size_64(D);
  # DEBUG size_temp => size_temp_65
  # DEBUG BEGIN_STMT
  adrr_temp_67 = addr_66(D);
  # DEBUG adrr_temp => adrr_temp_67
  # DEBUG BEGIN_STMT
  _1 = addr_66(D) & 3;
  _2 = _1 != 0;
  _3 = (long int) _2;
  _4 = __builtin_expect (_3, 0);
  if (_4 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  _5 = (unsigned int) size_temp_65;
  _6 = addr_66(D) & 3;
  _7 = 4 - _6;
  if (_5 > _7)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _8 = (unsigned char) addr_66(D);
  _9 = _8 & 3;
  _10 = 4 - _9;
  val_72 = pfe_pe_mem_read (pe_69(D), mem_70(D), addr_66(D), _10);
  # DEBUG val => val_72
  # DEBUG BEGIN_STMT
  _11 = (unsigned char) addr_66(D);
  _12 = _11 & 3;
  offset_73 = 4 - _12;
  # DEBUG offset => offset_73
  # DEBUG BEGIN_STMT
  size_temp_74 = size_64(D) - offset_73;
  # DEBUG size_temp => size_temp_74
  # DEBUG BEGIN_STMT
  _13 = (unsigned int) offset_73;
  adrr_temp_75 = addr_66(D) + _13;
  # DEBUG adrr_temp => adrr_temp_75
  # DEBUG BEGIN_STMT
  _14 = pfe_pe_mem_read (pe_69(D), mem_70(D), adrr_temp_75, size_temp_74);
  _15 = (unsigned int) offset_73;
  _16 = _15 * 8;
  _77 = _14 << _16;
  val_78 = _77 | val_72;
  # DEBUG val => val_78
  goto <bb 14>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  if (size_temp_65 != 4)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _17 = (unsigned int) size_temp_65;
  _18 = _17 * 8;
  _19 = 1 << _18;
  mask_80 = _19 + 4294967295;
  # DEBUG mask => mask_80
  goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  mask_79 = 4294967295;
  # DEBUG mask => mask_79

  <bb 8> :
  # mask_61 = PHI <mask_80(6), mask_79(7)>
  # DEBUG mask => mask_61
  # DEBUG BEGIN_STMT
  if (mem_70(D) == 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  memsel_82 = 262144;
  # DEBUG memsel => memsel_82
  goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  memsel_81 = 131072;
  # DEBUG memsel => memsel_81

  <bb 11> :
  # memsel_62 = PHI <memsel_82(9), memsel_81(10)>
  # DEBUG memsel => memsel_62
  # DEBUG BEGIN_STMT
  _20 = adrr_temp_67 & 1048575;
  _21 = memsel_62 | _20;
  _22 = pe_69(D)->id;
  _23 = (long unsigned int) _22;
  _24 = _23 << 20;
  _25 = _24 & 15728640;
  adrr_temp_83 = _21 | _25;
  # DEBUG adrr_temp => adrr_temp_83
  # DEBUG BEGIN_STMT
  _26 = pe_69(D)->miflock;
  _27 = _26 == 0;
  _28 = (long int) _27;
  _29 = __builtin_expect (_28, 0);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _30 = pe_69(D)->mem_access_addr;
  _31 = (volatile uint32_t *) _30;
  *_31 ={v} adrr_temp_83;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _32 = pe_69(D)->mem_access_rdata;
  _33 = (volatile uint32_t *) _32;
  _34 ={v} *_33;
  _35 = _34 >> 24;
  _36 = _35 & 255;
  _37 = pe_69(D)->mem_access_rdata;
  _38 = (volatile uint32_t *) _37;
  _39 ={v} *_38;
  _40 = _39 >> 8;
  _41 = _40 & 65280;
  _42 = _36 | _41;
  _43 = pe_69(D)->mem_access_rdata;
  _44 = (volatile uint32_t *) _43;
  _45 ={v} *_44;
  _46 = _45 << 8;
  _47 = _46 & 16711680;
  _48 = _42 | _47;
  _49 = pe_69(D)->mem_access_rdata;
  _50 = (volatile uint32_t *) _49;
  _51 ={v} *_50;
  _52 = _51 << 24;
  val_85 = _48 | _52;
  # DEBUG val => val_85
  # DEBUG BEGIN_STMT
  _53 = adrr_temp_83 & 3;
  _54 = _53 != 0;
  _55 = (long int) _54;
  _56 = __builtin_expect (_55, 0);
  if (_56 != 0)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  _57 = adrr_temp_83 & 3;
  _58 = _57 * 8;
  val_86 = val_85 >> _58;
  # DEBUG val => val_86

  <bb 13> :
  # val_59 = PHI <val_85(11), val_86(12)>
  # DEBUG val => val_59
  # DEBUG BEGIN_STMT
  val_87 = val_59 & mask_61;
  # DEBUG val => val_87

  <bb 14> :
  # val_60 = PHI <val_78(4), val_87(13)>
  # DEBUG val => val_60
  # DEBUG BEGIN_STMT
  _88 = val_60;
  return _88;

}


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;
  unsigned char _1;
  _Bool _2;
  long int _3;
  long 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 int _13;
  volatile uint32_t * _14;
  long unsigned int _15;
  unsigned char _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  unsigned int _21;
  volatile uint32_t * _22;
  long unsigned int _23;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (mem_28(D) == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  memsel_30 = 262144;
  # DEBUG memsel => memsel_30
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  memsel_29 = 131072;
  # DEBUG memsel => memsel_29

  <bb 5> :
  # memsel_26 = PHI <memsel_30(3), memsel_29(4)>
  # DEBUG memsel => memsel_26
  # DEBUG BEGIN_STMT
  _1 = pe_32(D)->miflock;
  _2 = _1 == 0;
  _3 = (long int) _2;
  _4 = __builtin_expect (_3, 0);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = val_33(D) >> 24;
  _6 = val_33(D) >> 8;
  _7 = _6 & 65280;
  _8 = _5 | _7;
  _9 = val_33(D) << 8;
  _10 = _9 & 16711680;
  _11 = _8 | _10;
  _12 = val_33(D) << 24;
  _13 = pe_32(D)->mem_access_wdata;
  _14 = (volatile uint32_t *) _13;
  _15 = _11 | _12;
  *_14 ={v} _15;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _16 = pe_32(D)->id;
  _17 = (long unsigned int) _16;
  _18 = _17 << 20;
  _19 = _18 & 15728640;
  _20 = memsel_26 | _19;
  addr_temp_35 = _20 | 2399141888;
  # DEBUG addr_temp => addr_temp_35
  # DEBUG BEGIN_STMT
  mem_addr_37 = addr_36(D);
  # DEBUG mem_addr => mem_addr_37
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  addr_temp_39 = addr_temp_25 & 4294311936;
  # DEBUG addr_temp => addr_temp_39
  # DEBUG BEGIN_STMT
  addr_temp_40 = addr_temp_39 | mem_addr_24;
  # DEBUG addr_temp => addr_temp_40
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _21 = pe_32(D)->mem_access_addr;
  _22 = (volatile uint32_t *) _21;
  *_22 ={v} addr_temp_40;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  mem_addr_42 = mem_addr_24 + 4;
  # DEBUG mem_addr => mem_addr_42

  <bb 7> :
  # mem_addr_24 = PHI <mem_addr_37(5), mem_addr_42(6)>
  # addr_temp_25 = PHI <addr_temp_35(5), addr_temp_40(6)>
  # DEBUG addr_temp => addr_temp_25
  # DEBUG mem_addr => mem_addr_24
  # DEBUG BEGIN_STMT
  _23 = addr_36(D) + size_38(D);
  if (mem_addr_24 < _23)
    goto <bb 6>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 8> :
  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;
  _Bool _2;
  long int _3;
  long int _4;
  unsigned char _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;
  unsigned int _22;
  volatile uint32_t * _23;
  long unsigned int _24;
  unsigned int _25;
  volatile uint32_t * _26;
  long unsigned int _27;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  data_34 = src_ptr_33(D);
  # DEBUG data => data_34
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (mem_35(D) == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  memsel_37 = 262144;
  # DEBUG memsel => memsel_37
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  memsel_36 = 131072;
  # DEBUG memsel => memsel_36

  <bb 5> :
  # memsel_31 = PHI <memsel_37(3), memsel_36(4)>
  # DEBUG memsel => memsel_31
  # DEBUG BEGIN_STMT
  _1 = pe_39(D)->miflock;
  _2 = _1 == 0;
  _3 = (long int) _2;
  _4 = __builtin_expect (_3, 0);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = pe_39(D)->id;
  _6 = (long unsigned int) _5;
  _7 = _6 << 20;
  _8 = _7 & 15728640;
  _9 = memsel_31 | _8;
  addr_temp_40 = _9 | 2399141888;
  # DEBUG addr_temp => addr_temp_40
  # DEBUG BEGIN_STMT
  mem_addr_42 = dst_addr_41(D);
  # DEBUG mem_addr => mem_addr_42
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _10 = *data_30;
  _11 = _10 >> 24;
  _12 = *data_30;
  _13 = _12 >> 8;
  _14 = _13 & 65280;
  _15 = _11 | _14;
  _16 = *data_30;
  _17 = _16 << 8;
  _18 = _17 & 16711680;
  _19 = _15 | _18;
  _20 = *data_30;
  _21 = _20 << 24;
  _22 = pe_39(D)->mem_access_wdata;
  _23 = (volatile uint32_t *) _22;
  _24 = _19 | _21;
  *_23 ={v} _24;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  data_45 = data_30 + 4;
  # DEBUG data => data_45
  # DEBUG BEGIN_STMT
  addr_temp_46 = addr_temp_29 & 4294311936;
  # DEBUG addr_temp => addr_temp_46
  # DEBUG BEGIN_STMT
  addr_temp_47 = addr_temp_46 | mem_addr_28;
  # DEBUG addr_temp => addr_temp_47
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _25 = pe_39(D)->mem_access_addr;
  _26 = (volatile uint32_t *) _25;
  *_26 ={v} addr_temp_47;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  mem_addr_49 = mem_addr_28 + 4;
  # DEBUG mem_addr => mem_addr_49

  <bb 7> :
  # mem_addr_28 = PHI <mem_addr_42(5), mem_addr_49(6)>
  # addr_temp_29 = PHI <addr_temp_40(5), addr_temp_47(6)>
  # data_30 = PHI <data_34(5), data_45(6)>
  # DEBUG data => data_30
  # DEBUG addr_temp => addr_temp_29
  # DEBUG mem_addr => mem_addr_28
  # DEBUG BEGIN_STMT
  _27 = dst_addr_41(D) + len_43(D);
  if (mem_addr_28 < _27)
    goto <bb 6>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 8> :
  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;
  unsigned char _1;
  _Bool _2;
  long int _3;
  long 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 int _13;
  volatile uint32_t * _14;
  long unsigned int _15;
  unsigned int _16;
  volatile uint32_t * _17;
  unsigned int _18;
  volatile uint32_t * _19;
  unsigned int _20;
  volatile uint32_t * _21;
  unsigned int _22;
  volatile uint32_t * _23;
  unsigned int _24;
  volatile uint32_t * _25;
  unsigned int _26;
  volatile uint32_t * _27;
  unsigned int _28;
  volatile uint32_t * _29;
  unsigned int _30;
  volatile uint32_t * _31;
  long unsigned int _32;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (mem_37(D) == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  memsel_39 = 262144;
  # DEBUG memsel => memsel_39
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  memsel_38 = 131072;
  # DEBUG memsel => memsel_38

  <bb 5> :
  # memsel_35 = PHI <memsel_39(3), memsel_38(4)>
  # DEBUG memsel => memsel_35
  # DEBUG BEGIN_STMT
  _1 = pe_41(D)->miflock;
  _2 = _1 == 0;
  _3 = (long int) _2;
  _4 = __builtin_expect (_3, 0);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = val_42(D) >> 24;
  _6 = val_42(D) >> 8;
  _7 = _6 & 65280;
  _8 = _5 | _7;
  _9 = val_42(D) << 8;
  _10 = _9 & 16711680;
  _11 = _8 | _10;
  _12 = val_42(D) << 24;
  _13 = pe_41(D)->mem_access_wdata;
  _14 = (volatile uint32_t *) _13;
  _15 = _11 | _12;
  *_14 ={v} _15;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_44 = memsel_35 | 2399141888;
  # DEBUG addr_temp => addr_temp_44
  # DEBUG BEGIN_STMT
  mem_addr_46 = addr_45(D);
  # DEBUG mem_addr => mem_addr_46
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  addr_temp_48 = addr_temp_34 & 4278583296;
  # DEBUG addr_temp => addr_temp_48
  # DEBUG BEGIN_STMT
  addr_temp_49 = addr_temp_48 | mem_addr_33;
  # DEBUG addr_temp => addr_temp_49
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _16 = pe_41(D)->mem_access_addr;
  _17 = (volatile uint32_t *) _16;
  *_17 ={v} addr_temp_49;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_51 = addr_temp_49 | 1048576;
  # DEBUG addr_temp => addr_temp_51
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _18 = pe_41(D)->mem_access_addr;
  _19 = (volatile uint32_t *) _18;
  *_19 ={v} addr_temp_51;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_53 = addr_temp_51 | 2097152;
  # DEBUG addr_temp => addr_temp_53
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _20 = pe_41(D)->mem_access_addr;
  _21 = (volatile uint32_t *) _20;
  *_21 ={v} addr_temp_53;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_55 = addr_temp_53 & 4293918719;
  # DEBUG addr_temp => addr_temp_55
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _22 = pe_41(D)->mem_access_addr;
  _23 = (volatile uint32_t *) _22;
  *_23 ={v} addr_temp_55;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_57 = addr_temp_55 | 4194304;
  # DEBUG addr_temp => addr_temp_57
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _24 = pe_41(D)->mem_access_addr;
  _25 = (volatile uint32_t *) _24;
  *_25 ={v} addr_temp_57;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_59 = addr_temp_57 | 1048576;
  # DEBUG addr_temp => addr_temp_59
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _26 = pe_41(D)->mem_access_addr;
  _27 = (volatile uint32_t *) _26;
  *_27 ={v} addr_temp_59;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_61 = addr_temp_59 & 4292870143;
  # DEBUG addr_temp => addr_temp_61
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _28 = pe_41(D)->mem_access_addr;
  _29 = (volatile uint32_t *) _28;
  *_29 ={v} addr_temp_61;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_63 = addr_temp_61 & 4293918719;
  # DEBUG addr_temp => addr_temp_63
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _30 = pe_41(D)->mem_access_addr;
  _31 = (volatile uint32_t *) _30;
  *_31 ={v} addr_temp_63;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  mem_addr_65 = mem_addr_33 + 4;
  # DEBUG mem_addr => mem_addr_65

  <bb 7> :
  # mem_addr_33 = PHI <mem_addr_46(5), mem_addr_65(6)>
  # addr_temp_34 = PHI <addr_temp_44(5), addr_temp_63(6)>
  # DEBUG addr_temp => addr_temp_34
  # DEBUG mem_addr => mem_addr_33
  # DEBUG BEGIN_STMT
  _32 = addr_45(D) + size_47(D);
  if (mem_addr_33 < _32)
    goto <bb 6>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 8> :
  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;
  unsigned char _1;
  _Bool _2;
  long int _3;
  long 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;
  unsigned int _17;
  volatile uint32_t * _18;
  long unsigned int _19;
  unsigned int _20;
  volatile uint32_t * _21;
  unsigned int _22;
  volatile uint32_t * _23;
  unsigned int _24;
  volatile uint32_t * _25;
  unsigned int _26;
  volatile uint32_t * _27;
  unsigned int _28;
  volatile uint32_t * _29;
  unsigned int _30;
  volatile uint32_t * _31;
  unsigned int _32;
  volatile uint32_t * _33;
  unsigned int _34;
  volatile uint32_t * _35;
  long unsigned int _36;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  data_43 = src_ptr_42(D);
  # DEBUG data => data_43
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (mem_44(D) == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  memsel_46 = 262144;
  # DEBUG memsel => memsel_46
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  memsel_45 = 131072;
  # DEBUG memsel => memsel_45

  <bb 5> :
  # memsel_40 = PHI <memsel_46(3), memsel_45(4)>
  # DEBUG memsel => memsel_40
  # DEBUG BEGIN_STMT
  _1 = pe_48(D)->miflock;
  _2 = _1 == 0;
  _3 = (long int) _2;
  _4 = __builtin_expect (_3, 0);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_49 = memsel_40 | 2399141888;
  # DEBUG addr_temp => addr_temp_49
  # DEBUG BEGIN_STMT
  mem_addr_51 = dst_addr_50(D);
  # DEBUG mem_addr => mem_addr_51
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = *data_39;
  _6 = _5 >> 24;
  _7 = *data_39;
  _8 = _7 >> 8;
  _9 = _8 & 65280;
  _10 = _6 | _9;
  _11 = *data_39;
  _12 = _11 << 8;
  _13 = _12 & 16711680;
  _14 = _10 | _13;
  _15 = *data_39;
  _16 = _15 << 24;
  _17 = pe_48(D)->mem_access_wdata;
  _18 = (volatile uint32_t *) _17;
  _19 = _14 | _16;
  *_18 ={v} _19;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  data_54 = data_39 + 4;
  # DEBUG data => data_54
  # DEBUG BEGIN_STMT
  addr_temp_55 = addr_temp_38 & 4278583296;
  # DEBUG addr_temp => addr_temp_55
  # DEBUG BEGIN_STMT
  addr_temp_56 = addr_temp_55 | mem_addr_37;
  # DEBUG addr_temp => addr_temp_56
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _20 = pe_48(D)->mem_access_addr;
  _21 = (volatile uint32_t *) _20;
  *_21 ={v} addr_temp_56;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_58 = addr_temp_56 | 1048576;
  # DEBUG addr_temp => addr_temp_58
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _22 = pe_48(D)->mem_access_addr;
  _23 = (volatile uint32_t *) _22;
  *_23 ={v} addr_temp_58;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_60 = addr_temp_58 | 2097152;
  # DEBUG addr_temp => addr_temp_60
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _24 = pe_48(D)->mem_access_addr;
  _25 = (volatile uint32_t *) _24;
  *_25 ={v} addr_temp_60;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_62 = addr_temp_60 & 4293918719;
  # DEBUG addr_temp => addr_temp_62
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _26 = pe_48(D)->mem_access_addr;
  _27 = (volatile uint32_t *) _26;
  *_27 ={v} addr_temp_62;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_64 = addr_temp_62 | 4194304;
  # DEBUG addr_temp => addr_temp_64
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _28 = pe_48(D)->mem_access_addr;
  _29 = (volatile uint32_t *) _28;
  *_29 ={v} addr_temp_64;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_66 = addr_temp_64 | 1048576;
  # DEBUG addr_temp => addr_temp_66
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _30 = pe_48(D)->mem_access_addr;
  _31 = (volatile uint32_t *) _30;
  *_31 ={v} addr_temp_66;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_68 = addr_temp_66 & 4292870143;
  # DEBUG addr_temp => addr_temp_68
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _32 = pe_48(D)->mem_access_addr;
  _33 = (volatile uint32_t *) _32;
  *_33 ={v} addr_temp_68;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp_70 = addr_temp_68 & 4293918719;
  # DEBUG addr_temp => addr_temp_70
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _34 = pe_48(D)->mem_access_addr;
  _35 = (volatile uint32_t *) _34;
  *_35 ={v} addr_temp_70;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  mem_addr_72 = mem_addr_37 + 4;
  # DEBUG mem_addr => mem_addr_72

  <bb 7> :
  # mem_addr_37 = PHI <mem_addr_51(5), mem_addr_72(6)>
  # addr_temp_38 = PHI <addr_temp_49(5), addr_temp_70(6)>
  # data_39 = PHI <data_43(5), data_54(6)>
  # DEBUG data => data_39
  # DEBUG addr_temp => addr_temp_38
  # DEBUG mem_addr => mem_addr_37
  # DEBUG BEGIN_STMT
  _36 = dst_addr_50(D) + len_52(D);
  if (mem_addr_37 < _36)
    goto <bb 6>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 8> :
  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;
  unsigned char _2;
  unsigned char _3;
  <unnamed type> _4;
  unsigned char _5;
  <unnamed type> _6;
  unsigned char _7;
  long unsigned int _8;
  struct pfe_pe_t * _9;
  long unsigned int _10;
  long unsigned int _11;
  struct pfe_pe_t * _12;
  long unsigned int _13;
  errno_t _39;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  idx_29 = 0;
  # DEBUG idx => idx_29
  pe_idx_30 = 0;
  # DEBUG pe_idx => pe_idx_30
  # DEBUG BEGIN_STMT
  best_pe_loader_cnt_31 = 0;
  # DEBUG best_pe_loader_cnt => best_pe_loader_cnt_31
  # DEBUG BEGIN_STMT
  pe_loader_32 = 0B;
  # DEBUG pe_loader => pe_loader_32
  # DEBUG BEGIN_STMT
  idx_33 = 0;
  # DEBUG idx => idx_33
  goto <bb 18>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  ret_43 = 22;
  # DEBUG ret => ret_43
  # DEBUG BEGIN_STMT
  _1 = fw_load_ops[idx_17].pe_loaded_cnt;
  if (pe_num_37(D) == _1)
    goto <bb 5>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 4> :
  _2 = fw_load_ops[idx_17].pe_loaded_cnt;
  if (_2 == 1)
    goto <bb 5>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 5> :
  _3 = fw_load_ops[idx_17].pe_loaded_cnt;
  if (best_pe_loader_cnt_21 < _3)
    goto <bb 6>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 6> :
  _4 = pe_40(D)->type;
  if (_4 == 3)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  _5 = fw_load_ops[idx_17].can_load_util;
  if (_5 == 1)
    goto <bb 9>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 8> :
  _6 = pe_40(D)->type;
  if (_6 != 3)
    goto <bb 9>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _7 = fw_load_ops[idx_17].pe_loaded_cnt;
  if (_7 > 1)
    goto <bb 10>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  pe_idx_46 = 1;
  # DEBUG pe_idx => pe_idx_46
  goto <bb 13>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _8 = pe_idx_18 * 112;
  _9 = pe_40(D) + _8;
  ret_48 = pfe_pe_fw_ops_valid (pe_40(D), _9);
  # DEBUG ret => ret_48
  # DEBUG BEGIN_STMT
  if (ret_48 != 0)
    goto <bb 14>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  pe_idx_49 = pe_idx_18 + 1;
  # DEBUG pe_idx => pe_idx_49

  <bb 13> :
  # ret_14 = PHI <ret_43(10), ret_48(12)>
  # pe_idx_18 = PHI <pe_idx_46(10), pe_idx_49(12)>
  # DEBUG pe_idx => pe_idx_18
  # DEBUG ret => ret_14
  # DEBUG BEGIN_STMT
  _10 = (long unsigned int) pe_num_37(D);
  if (pe_idx_18 < _10)
    goto <bb 11>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 14> :
  # ret_15 = PHI <ret_48(11), ret_14(13)>
  # DEBUG ret => ret_15
  # DEBUG BEGIN_STMT
  if (ret_15 == 0)
    goto <bb 15>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  best_pe_loader_cnt_50 = fw_load_ops[idx_17].pe_loaded_cnt;
  # DEBUG best_pe_loader_cnt => best_pe_loader_cnt_50
  # DEBUG BEGIN_STMT
  pe_loader_51 = &fw_load_ops[idx_17];
  # DEBUG pe_loader => pe_loader_51
  goto <bb 17>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  best_pe_loader_cnt_44 = fw_load_ops[idx_17].pe_loaded_cnt;
  # DEBUG best_pe_loader_cnt => best_pe_loader_cnt_44
  # DEBUG BEGIN_STMT
  pe_loader_45 = &fw_load_ops[idx_17];
  # DEBUG pe_loader => pe_loader_45

  <bb 17> :
  # best_pe_loader_cnt_20 = PHI <best_pe_loader_cnt_21(4), best_pe_loader_cnt_21(5), best_pe_loader_cnt_21(8), best_pe_loader_cnt_50(15), best_pe_loader_cnt_44(16), best_pe_loader_cnt_21(14)>
  # pe_loader_22 = PHI <pe_loader_23(4), pe_loader_23(5), pe_loader_23(8), pe_loader_51(15), pe_loader_45(16), pe_loader_23(14)>
  # DEBUG pe_loader => pe_loader_22
  # DEBUG best_pe_loader_cnt => best_pe_loader_cnt_20
  # DEBUG BEGIN_STMT
  idx_52 = idx_17 + 1;
  # DEBUG idx => idx_52

  <bb 18> :
  # idx_17 = PHI <idx_33(2), idx_52(17)>
  # best_pe_loader_cnt_21 = PHI <best_pe_loader_cnt_31(2), best_pe_loader_cnt_20(17)>
  # pe_loader_23 = PHI <pe_loader_32(2), pe_loader_22(17)>
  # DEBUG pe_loader => pe_loader_23
  # DEBUG best_pe_loader_cnt => best_pe_loader_cnt_21
  # DEBUG idx => idx_17
  # DEBUG BEGIN_STMT
  if (idx_17 <= 1)
    goto <bb 3>; [INV]
  else
    goto <bb 19>; [INV]

  <bb 19> :
  # DEBUG BEGIN_STMT
  ret_35 = 19;
  # DEBUG ret => ret_35
  # DEBUG BEGIN_STMT
  pe_idx_36 = 0;
  # DEBUG pe_idx => pe_idx_36
  goto <bb 21>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  _11 = pe_idx_19 * 112;
  _12 = pe_40(D) + _11;
  _12->fw_load_ops = pe_loader_23;
  # DEBUG BEGIN_STMT
  pe_idx_42 = pe_idx_19 + 1;
  # DEBUG pe_idx => pe_idx_42

  <bb 21> :
  # pe_idx_19 = PHI <pe_idx_36(19), pe_idx_42(20)>
  # DEBUG pe_idx => pe_idx_19
  # DEBUG BEGIN_STMT
  _13 = (long unsigned int) pe_num_37(D);
  if (pe_idx_19 < _13)
    goto <bb 20>; [INV]
  else
    goto <bb 22>; [INV]

  <bb 22> :
  # DEBUG BEGIN_STMT
  if (pe_loader_23 != 0B)
    goto <bb 23>; [INV]
  else
    goto <bb 24>; [INV]

  <bb 23> :
  # DEBUG BEGIN_STMT
  ret_38 = 0;
  # DEBUG ret => ret_38

  <bb 24> :
  # ret_16 = PHI <ret_35(22), ret_38(23)>
  # DEBUG ret => ret_16
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _39 = ret_16;
  return _39;

}


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;
  errno_t _15;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ret_10 = 22;
  # DEBUG ret => ret_10
  # DEBUG BEGIN_STMT
  _1 = pe1_12(D)->type;
  _2 = pe2_13(D)->type;
  if (_1 == _2)
    goto <bb 3>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 3> :
  _3 = pe1_12(D)->mem_access_addr;
  _4 = pe2_13(D)->mem_access_addr;
  if (_3 == _4)
    goto <bb 4>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 4> :
  _5 = pe1_12(D)->mem_access_rdata;
  _6 = pe2_13(D)->mem_access_rdata;
  if (_5 == _6)
    goto <bb 5>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 5> :
  _7 = pe1_12(D)->mem_access_wdata;
  _8 = pe2_13(D)->mem_access_wdata;
  if (_7 == _8)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  ret_14 = 0;
  # DEBUG ret => ret_14

  <bb 7> :
  # ret_9 = PHI <ret_10(2), ret_10(3), ret_10(4), ret_10(5), ret_14(6)>
  # DEBUG ret => ret_9
  # DEBUG BEGIN_STMT
  _15 = ret_9;
  return _15;

}


pfe_pe_fw_load_cycles (const struct pfe_pe_t * pe, uint8_t pe_num)
{
  uint8_t ret;
  const struct fw_load_ops_t * _1;
  const struct fw_load_ops_t * _2;
  unsigned char _3;
  const struct fw_load_ops_t * _4;
  unsigned char _5;
  uint8_t _12;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ret_7 = 1;
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  _1 = pe_9(D)->fw_load_ops;
  if (_1 != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = pe_9(D)->fw_load_ops;
  _3 = _2->pe_loaded_cnt;
  if (pe_num_10(D) >= _3)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _4 = pe_9(D)->fw_load_ops;
  _5 = _4->pe_loaded_cnt;
  ret_11 = pe_num_10(D) / _5;
  # DEBUG ret => ret_11

  <bb 5> :
  # ret_6 = PHI <ret_7(2), ret_7(3), ret_11(4)>
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  _12 = ret_6;
  return _12;

}


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;
  union pfe_ct_pe_mmap_t * _2;
  long unsigned int _3;
  long unsigned int _4;
  union pfe_ct_pe_mmap_t * _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  union pfe_ct_pe_mmap_t * _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  union pfe_ct_pe_mmap_t * _15;
  long unsigned int _16;
  long unsigned int _17;
  int _18;
  errno_t _31;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  misc_ctrl = {};
  # DEBUG BEGIN_STMT
  _1 = pe_23(D)->mmap_data;
  if (_1 == 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  ret_30 = 114;
  # DEBUG ret => ret_30
  goto <bb 7>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  ret_24 = 0;
  # DEBUG ret => ret_24
  # DEBUG BEGIN_STMT
  _2 = pe_23(D)->mmap_data;
  _3 = _2->common.pe_misc_control;
  _4 = _3 >> 24;
  _5 = pe_23(D)->mmap_data;
  _6 = _5->common.pe_misc_control;
  _7 = _6 >> 8;
  _8 = _7 & 65280;
  _9 = _4 | _8;
  _10 = pe_23(D)->mmap_data;
  _11 = _10->common.pe_misc_control;
  _12 = _11 << 8;
  _13 = _12 & 16711680;
  _14 = _9 | _13;
  _15 = pe_23(D)->mmap_data;
  _16 = _15->common.pe_misc_control;
  _17 = _16 << 24;
  misc_dmem_25 = _14 | _17;
  # DEBUG misc_dmem => misc_dmem_25
  # DEBUG BEGIN_STMT
  if (misc_dmem_25 == 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  ret_29 = 22;
  # DEBUG ret => ret_29
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  misc_ctrl.graceful_stop_request = 0;
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_host_to_dmem_32_nolock (pe_23(D), misc_dmem_25, &misc_ctrl, 4);
  # DEBUG BEGIN_STMT
  _18 = pfe_pe_unlock (pe_23(D));

  <bb 7> :
  # ret_19 = PHI <ret_30(3), ret_29(5), ret_24(6)>
  # DEBUG ret => ret_19
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _31 = ret_19;
  misc_ctrl ={v} {CLOBBER};
  return _31;

}


pfe_pe_mem_lock (struct pfe_pe_t * pe)
{
  uint32_t misc_dmem;
  errno_t ret;
  union pfe_ct_pe_mmap_t * _1;
  union pfe_ct_pe_mmap_t * _2;
  long unsigned int _3;
  long unsigned int _4;
  union pfe_ct_pe_mmap_t * _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  union pfe_ct_pe_mmap_t * _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  union pfe_ct_pe_mmap_t * _15;
  long unsigned int _16;
  long unsigned int _17;
  errno_t _28;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pe_21(D)->mmap_data;
  if (_1 == 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  ret_27 = 114;
  # DEBUG ret => ret_27
  goto <bb 7>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  ret_22 = 0;
  # DEBUG ret => ret_22
  # DEBUG BEGIN_STMT
  _2 = pe_21(D)->mmap_data;
  _3 = _2->common.pe_misc_control;
  _4 = _3 >> 24;
  _5 = pe_21(D)->mmap_data;
  _6 = _5->common.pe_misc_control;
  _7 = _6 >> 8;
  _8 = _7 & 65280;
  _9 = _4 | _8;
  _10 = pe_21(D)->mmap_data;
  _11 = _10->common.pe_misc_control;
  _12 = _11 << 8;
  _13 = _12 & 16711680;
  _14 = _9 | _13;
  _15 = pe_21(D)->mmap_data;
  _16 = _15->common.pe_misc_control;
  _17 = _16 << 24;
  misc_dmem_23 = _14 | _17;
  # DEBUG misc_dmem => misc_dmem_23
  # DEBUG BEGIN_STMT
  if (misc_dmem_23 == 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  ret_26 = 22;
  # DEBUG ret => ret_26
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  ret_25 = pfe_pe_mem_process_lock (pe_21(D), misc_dmem_23);
  # DEBUG ret => ret_25

  <bb 7> :
  # ret_18 = PHI <ret_27(3), ret_26(5), ret_25(6)>
  # DEBUG ret => ret_18
  # DEBUG BEGIN_STMT
  _28 = ret_18;
  return _28;

}


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;
  int _4;
  unsigned char _5;
  int _6;
  unsigned char _7;
  errno_t _35;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  misc_ctrl = {};
  # DEBUG BEGIN_STMT
  timeout_14 = 10;
  # DEBUG timeout => timeout_14
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_lock (pe_15(D));
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_34 = 115;
  # DEBUG ret => ret_34
  goto <bb 12>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe_15(D), &misc_ctrl, misc_dmem_17(D), 4);
  # DEBUG BEGIN_STMT
  _2 = misc_ctrl.graceful_stop_request;
  if (_2 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _3 = misc_ctrl.graceful_stop_confirmation;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = pfe_pe_unlock (pe_15(D));
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_33 = 115;
  # DEBUG ret => ret_33
  goto <bb 12>; [INV]

  <bb 6> :
  # 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_15(D), misc_dmem_17(D), &misc_ctrl, 4);
  # DEBUG BEGIN_STMT
  _5 = pfe_pe_is_active_nolock (pe_15(D));
  if (_5 == 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  ret_31 = 0;
  # DEBUG ret => ret_31
  goto <bb 12>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  ret_23 = 0;
  # DEBUG ret => ret_23

  <bb 9> :
  # timeout_9 = PHI <timeout_14(8), timeout_25(11)>
  # DEBUG timeout => timeout_9
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (timeout_9 == 0)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # 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_15(D), misc_dmem_17(D), &misc_ctrl, 4);
  # DEBUG BEGIN_STMT
  _6 = pfe_pe_unlock (pe_15(D));
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_30 = 62;
  # DEBUG ret => ret_30
  # DEBUG BEGIN_STMT
  goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  oal_time_usleep (10);
  # DEBUG BEGIN_STMT
  timeout_25 = timeout_9 + 4294967295;
  # DEBUG timeout => timeout_25
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe_15(D), &misc_ctrl, misc_dmem_17(D), 4);
  # DEBUG BEGIN_STMT
  _7 = misc_ctrl.graceful_stop_confirmation;
  if (_7 == 0)
    goto <bb 9>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 12> :
  # ret_8 = PHI <ret_34(3), ret_33(5), ret_31(7), ret_30(10), ret_23(11)>
  # DEBUG ret => ret_8
  # DEBUG BEGIN_STMT
  _35 = ret_8;
  misc_ctrl ={v} {CLOBBER};
  return _35;

}


pfe_pe_unlock (struct pfe_pe_t * pe)
{
  oal_mutex_t * _1;
  errno_t _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pe_3(D)->miflock = 0;
  # DEBUG BEGIN_STMT
  _1 = &pe_3(D)->lock_mutex;
  _6 = oal_mutex_unlock (_1);
  return _6;

}


pfe_pe_lock (struct pfe_pe_t * pe)
{
  errno_t ret;
  oal_mutex_t * _1;
  unsigned char _2;
  _Bool _3;
  long int _4;
  long int _5;
  _Bool _6;
  long int _7;
  long int _8;
  errno_t _15;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = &pe_10(D)->lock_mutex;
  ret_13 = oal_mutex_lock (_1);
  # DEBUG ret => ret_13
  # DEBUG BEGIN_STMT
  _2 = pe_10(D)->miflock;
  _3 = _2 != 0;
  _4 = (long int) _3;
  _5 = __builtin_expect (_4, 0);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = ret_13 == 0;
  _7 = (long int) _6;
  _8 = __builtin_expect (_7, 1);
  if (_8 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  pe_10(D)->miflock = 1;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _15 = ret_13;
  return _15;

}


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;
  <unnamed type> _3;
  bool_t _11;

  <bb 2> :
  # DEBUG BEGIN_STMT
  state_monitor = {};
  # DEBUG BEGIN_STMT
  ret_7 = 0;
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_get_state_monitor_nolock (pe_8(D), &state_monitor);
  if (_1 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = state_monitor.state;
  if (_2 != 8)
    goto <bb 4>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 4> :
  _3 = state_monitor.state;
  if (_3 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  ret_10 = 1;
  # DEBUG ret => ret_10

  <bb 6> :
  # ret_4 = PHI <ret_7(2), ret_7(3), ret_7(4), ret_10(5)>
  # DEBUG ret => ret_4
  # DEBUG BEGIN_STMT
  _11 = ret_4;
  state_monitor ={v} {CLOBBER};
  return _11;

}


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;
  union pfe_ct_pe_mmap_t * _2;
  long unsigned int _3;
  long unsigned int _4;
  union pfe_ct_pe_mmap_t * _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  union pfe_ct_pe_mmap_t * _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  union pfe_ct_pe_mmap_t * _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  errno_t _27;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pe_22(D)->mmap_data;
  if (_1 == 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_26 = 5;
  # DEBUG ret => ret_26
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _2 = pe_22(D)->mmap_data;
  _3 = _2->common.state_monitor;
  _4 = _3 >> 24;
  _5 = pe_22(D)->mmap_data;
  _6 = _5->common.state_monitor;
  _7 = _6 >> 8;
  _8 = _7 & 65280;
  _9 = _4 | _8;
  _10 = pe_22(D)->mmap_data;
  _11 = _10->common.state_monitor;
  _12 = _11 << 8;
  _13 = _12 & 16711680;
  _14 = _9 | _13;
  _15 = pe_22(D)->mmap_data;
  _16 = _15->common.state_monitor;
  _17 = _16 << 24;
  _18 = _14 | _17;
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe_22(D), state_monitor_23(D), _18, 8);
  # DEBUG BEGIN_STMT
  ret_25 = 0;
  # DEBUG ret => ret_25

  <bb 5> :
  # ret_19 = PHI <ret_26(3), ret_25(4)>
  # DEBUG ret => ret_19
  # DEBUG BEGIN_STMT
  _27 = ret_19;
  return _27;

}


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;
  int _3;
  long unsigned int _4;
  struct pfe_pe_t * _5;
  long unsigned int _6;
  struct pfe_pe_t * _7;
  long unsigned int _8;
  struct pfe_pe_t * _9;
  long unsigned int _10;
  struct pfe_pe_t * _11;
  long unsigned int _12;
  struct pfe_pe_t * _13;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ii_16 = 0;
  # DEBUG ii => ii_16
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = ii_14 * 112;
  _2 = pe_19(D) + _1;
  _3 = pfe_pe_unlock (_2);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = ii_14 * 112;
  _5 = pe_19(D) + _4;
  _5->mmap_data = 0B;
  # DEBUG BEGIN_STMT
  _6 = ii_14 * 112;
  _7 = pe_19(D) + _6;
  _7->fw_msg_section = 0B;
  # DEBUG BEGIN_STMT
  _8 = ii_14 * 112;
  _9 = pe_19(D) + _8;
  _9->fw_msg_section_size = 0;
  # DEBUG BEGIN_STMT
  _10 = ii_14 * 112;
  _11 = pe_19(D) + _10;
  _11->fw_feature_section = 0B;
  # DEBUG BEGIN_STMT
  _12 = ii_14 * 112;
  _13 = pe_19(D) + _12;
  _13->fw_feature_section_size = 0;
  # DEBUG BEGIN_STMT
  ii_26 = ii_14 + 1;
  # DEBUG ii => ii_26

  <bb 4> :
  # ii_14 = PHI <ii_16(2), ii_26(3)>
  # DEBUG ii => ii_14
  # DEBUG BEGIN_STMT
  if (ii_14 < pe_num_18(D))
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  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;
  struct Elf32_Shdr * _6;
  long unsigned int _7;
  struct Elf32_Shdr * _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  struct Elf32_Shdr * _12;
  long unsigned int _13;
  struct Elf32_Shdr * _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  struct Elf32_Shdr * _19;
  long unsigned int _20;
  struct Elf32_Shdr * _21;
  long unsigned int _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;
  long unsigned int _26;
  const void * _27;
  long unsigned int _28;
  struct Elf32_Shdr * _29;
  long unsigned int _30;
  struct Elf32_Shdr * _31;
  long unsigned int _32;
  long unsigned int _33;
  struct Elf32_Shdr * _34;
  long unsigned int _35;
  struct Elf32_Shdr * _36;
  long unsigned int _37;
  long unsigned int _38;
  long unsigned int _39;
  struct Elf32_Shdr * _40;
  long unsigned int _41;
  struct Elf32_Shdr * _42;
  long unsigned int _43;
  long unsigned int _44;
  long unsigned int _45;
  long unsigned int _46;
  struct Elf32_Shdr * _47;
  long unsigned int _48;
  struct Elf32_Shdr * _49;
  long unsigned int _50;
  long unsigned int _51;
  long unsigned int _52;
  long unsigned int _53;
  long unsigned int _54;
  struct Elf32_Shdr * _55;
  long unsigned int _56;
  struct Elf32_Shdr * _57;
  long unsigned int _58;
  struct pfe_pe_t * _59;
  struct Elf32_Shdr * _60;
  long unsigned int _61;
  struct Elf32_Shdr * _62;
  long unsigned int _63;
  long unsigned int _64;
  struct Elf32_Shdr * _65;
  long unsigned int _66;
  struct Elf32_Shdr * _67;
  long unsigned int _68;
  long unsigned int _69;
  long unsigned int _70;
  struct Elf32_Shdr * _71;
  long unsigned int _72;
  struct Elf32_Shdr * _73;
  long unsigned int _74;
  long unsigned int _75;
  long unsigned int _76;
  long unsigned int _77;
  struct Elf32_Shdr * _78;
  long unsigned int _79;
  struct Elf32_Shdr * _80;
  long unsigned int _81;
  long unsigned int _82;
  long unsigned int _83;
  long unsigned int _84;
  struct Elf32_Shdr * _85;
  long unsigned int _86;
  struct Elf32_Shdr * _87;
  long unsigned int _88;
  long unsigned int _89;
  struct Elf32_Shdr * _90;
  long unsigned int _91;
  struct Elf32_Shdr * _92;
  long unsigned int _93;
  long unsigned int _94;
  long unsigned int _95;
  struct Elf32_Shdr * _96;
  long unsigned int _97;
  struct Elf32_Shdr * _98;
  long unsigned int _99;
  long unsigned int _100;
  long unsigned int _101;
  long unsigned int _102;
  struct Elf32_Shdr * _103;
  long unsigned int _104;
  struct Elf32_Shdr * _105;
  long unsigned int _106;
  long unsigned int _107;
  long unsigned int _108;
  long unsigned int _109;
  unsigned char _110;
  unsigned char _111;
  long unsigned int _112;
  short unsigned int _113;
  long unsigned int _114;
  errno_t _122;
  errno_t _144;
  errno_t _148;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_129 = 0;
  # DEBUG ret => ret_129
  # DEBUG BEGIN_STMT
  ii_130 = 0;
  # DEBUG ii => ii_130
  goto <bb 15>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = elf_file_132(D)->arSectHead32;
  _2 = ii_115 * 40;
  _3 = _1 + _2;
  _4 = _3->sh_flags;
  _5 = _4 >> 24;
  _6 = elf_file_132(D)->arSectHead32;
  _7 = ii_115 * 40;
  _8 = _6 + _7;
  _9 = _8->sh_flags;
  _10 = _9 << 24;
  _11 = _5 | _10;
  _12 = elf_file_132(D)->arSectHead32;
  _13 = ii_115 * 40;
  _14 = _12 + _13;
  _15 = _14->sh_flags;
  _16 = _15 >> 8;
  _17 = _16 & 65280;
  _18 = _11 | _17;
  _19 = elf_file_132(D)->arSectHead32;
  _20 = ii_115 * 40;
  _21 = _19 + _20;
  _22 = _21->sh_flags;
  _23 = _22 << 8;
  _24 = _23 & 16711680;
  _25 = _18 | _24;
  _26 = _25 & 7;
  if (_26 == 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 14>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _27 = elf_file_132(D)->pvData;
  _28 = (long unsigned int) _27;
  _29 = elf_file_132(D)->arSectHead32;
  _30 = ii_115 * 40;
  _31 = _29 + _30;
  _32 = _31->sh_offset;
  _33 = _32 >> 24;
  _34 = elf_file_132(D)->arSectHead32;
  _35 = ii_115 * 40;
  _36 = _34 + _35;
  _37 = _36->sh_offset;
  _38 = _37 << 24;
  _39 = _33 | _38;
  _40 = elf_file_132(D)->arSectHead32;
  _41 = ii_115 * 40;
  _42 = _40 + _41;
  _43 = _42->sh_offset;
  _44 = _43 >> 8;
  _45 = _44 & 65280;
  _46 = _39 | _45;
  _47 = elf_file_132(D)->arSectHead32;
  _48 = ii_115 * 40;
  _49 = _47 + _48;
  _50 = _49->sh_offset;
  _51 = _50 << 8;
  _52 = _51 & 16711680;
  _53 = _46 | _52;
  _54 = _28 + _53;
  buf_133 = (const void *) _54;
  # DEBUG buf => buf_133
  # DEBUG BEGIN_STMT
  _55 = elf_file_132(D)->arSectHead32;
  _56 = ii_115 * 40;
  _57 = _55 + _56;
  load_addr_135 = pfe_pe_get_elf_sect_load_addr (elf_file_132(D), _57);
  # DEBUG load_addr => load_addr_135
  # DEBUG BEGIN_STMT
  if (load_addr_135 == 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  ret_145 = 22;
  # DEBUG ret => ret_145
  # DEBUG BEGIN_STMT
  pfe_pe_free_mem (pe_138(D), pe_num_137(D));
  # DEBUG BEGIN_STMT
  goto <bb 16>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  pe_idx_136 = 0;
  # DEBUG pe_idx => pe_idx_136
  goto <bb 11>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _58 = pe_idx_116 * 112;
  _59 = pe_138(D) + _58;
  _60 = elf_file_132(D)->arSectHead32;
  _61 = ii_115 * 40;
  _62 = _60 + _61;
  _63 = _62->sh_size;
  _64 = _63 >> 24;
  _65 = elf_file_132(D)->arSectHead32;
  _66 = ii_115 * 40;
  _67 = _65 + _66;
  _68 = _67->sh_size;
  _69 = _68 << 24;
  _70 = _64 | _69;
  _71 = elf_file_132(D)->arSectHead32;
  _72 = ii_115 * 40;
  _73 = _71 + _72;
  _74 = _73->sh_size;
  _75 = _74 >> 8;
  _76 = _75 & 65280;
  _77 = _70 | _76;
  _78 = elf_file_132(D)->arSectHead32;
  _79 = ii_115 * 40;
  _80 = _78 + _79;
  _81 = _80->sh_size;
  _82 = _81 << 8;
  _83 = _82 & 16711680;
  _84 = _77 | _83;
  _85 = elf_file_132(D)->arSectHead32;
  _86 = ii_115 * 40;
  _87 = _85 + _86;
  _88 = _87->sh_type;
  _89 = _88 >> 24;
  _90 = elf_file_132(D)->arSectHead32;
  _91 = ii_115 * 40;
  _92 = _90 + _91;
  _93 = _92->sh_type;
  _94 = _93 << 24;
  _95 = _89 | _94;
  _96 = elf_file_132(D)->arSectHead32;
  _97 = ii_115 * 40;
  _98 = _96 + _97;
  _99 = _98->sh_type;
  _100 = _99 >> 8;
  _101 = _100 & 65280;
  _102 = _95 | _101;
  _103 = elf_file_132(D)->arSectHead32;
  _104 = ii_115 * 40;
  _105 = _103 + _104;
  _106 = _105->sh_type;
  _107 = _106 << 8;
  _108 = _107 & 16711680;
  _109 = _102 | _108;
  ret_141 = pfe_pe_load_elf_section (_59, buf_133, load_addr_135, _84, _109);
  # DEBUG ret => ret_141
  # DEBUG BEGIN_STMT
  if (ret_141 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_pe_free_mem (pe_138(D), pe_num_137(D));
  # DEBUG BEGIN_STMT
  goto <bb 12>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  pe_idx_142 = pe_idx_116 + 1;
  # DEBUG pe_idx => pe_idx_142

  <bb 11> :
  # pe_idx_116 = PHI <pe_idx_136(7), pe_idx_142(10)>
  # ret_117 = PHI <ret_120(7), ret_141(10)>
  # DEBUG ret => ret_117
  # DEBUG pe_idx => pe_idx_116
  # DEBUG BEGIN_STMT
  _110 = (unsigned char) pe_num_137(D);
  _111 = pfe_pe_fw_load_cycles (pe_138(D), _110);
  _112 = (long unsigned int) _111;
  if (pe_idx_116 < _112)
    goto <bb 8>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 12> :
  # ret_118 = PHI <ret_141(9), ret_117(11)>
  # DEBUG ret => ret_118
  # DEBUG BEGIN_STMT
  if (ret_118 != 0)
    goto <bb 13>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  _144 = ret_118;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 17>; [INV]

  <bb 14> :
  # ret_119 = PHI <ret_120(4), ret_118(12)>
  # DEBUG ret => ret_119
  # DEBUG BEGIN_STMT
  ii_147 = ii_115 + 1;
  # DEBUG ii => ii_147

  <bb 15> :
  # ii_115 = PHI <ii_130(2), ii_147(14)>
  # ret_120 = PHI <ret_129(2), ret_119(14)>
  # DEBUG ret => ret_120
  # DEBUG ii => ii_115
  # DEBUG BEGIN_STMT
  _113 = elf_file_132(D)->Header.r32.e_shnum;
  _114 = (long unsigned int) _113;
  if (ii_115 < _114)
    goto <bb 3>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 16> :
  # ret_121 = PHI <ret_145(6), ret_120(15)>
  # DEBUG ret => ret_121
  # DEBUG BEGIN_STMT
  _148 = ret_121;

  <bb 17> :
  # _122 = PHI <_144(13), _148(16)>
  return _122;

}


oal_mutex_unlock (const oal_mutex_t * mutex)
{
  errno_t retval;
  short unsigned int _1;
  short unsigned int _2;
  int _3;
  unsigned char _4;
  short unsigned int _5;
  int _6;
  void (*<T4e5>) (void) _7;
  errno_t _15;

  <bb 2> :
  # DEBUG BEGIN_STMT
  retval_10 = 22;
  # DEBUG retval => retval_10
  # DEBUG BEGIN_STMT
  _1 = *mutex_12(D);
  if (_1 <= 255)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = *mutex_12(D);
  _3 = (int) _2;
  _4 = mutex_alloc[_3];
  if (_4 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _5 = *mutex_12(D);
  _6 = (int) _5;
  _7 = SchM_Exit_Eth_43_PFE_ETH_EXCLUSIVE_AREA_ID[_6];
  _7 ();
  # DEBUG BEGIN_STMT
  retval_14 = 0;
  # DEBUG retval => retval_14

  <bb 5> :
  # retval_8 = PHI <retval_10(2), retval_10(3), retval_14(4)>
  # DEBUG retval => retval_8
  # DEBUG BEGIN_STMT
  _15 = retval_8;
  return _15;

}


oal_mutex_lock (const oal_mutex_t * mutex)
{
  errno_t retval;
  short unsigned int _1;
  short unsigned int _2;
  int _3;
  unsigned char _4;
  short unsigned int _5;
  int _6;
  void (*<T4e5>) (void) _7;
  errno_t _15;

  <bb 2> :
  # DEBUG BEGIN_STMT
  retval_10 = 22;
  # DEBUG retval => retval_10
  # DEBUG BEGIN_STMT
  _1 = *mutex_12(D);
  if (_1 <= 255)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = *mutex_12(D);
  _3 = (int) _2;
  _4 = mutex_alloc[_3];
  if (_4 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _5 = *mutex_12(D);
  _6 = (int) _5;
  _7 = SchM_Enter_Eth_43_PFE_ETH_EXCLUSIVE_AREA_ID[_6];
  _7 ();
  # DEBUG BEGIN_STMT
  retval_14 = 0;
  # DEBUG retval => retval_14

  <bb 5> :
  # retval_8 = PHI <retval_10(2), retval_10(3), retval_14(4)>
  # DEBUG retval => retval_8
  # DEBUG BEGIN_STMT
  _15 = retval_8;
  return _15;

}


oal_mutex_destroy (oal_mutex_t * mutex)
{
  errno_t _4;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _4 = oal_mutex_destroy_internal (mutex_2(D));
  return _4;

}


oal_mutex_init (oal_mutex_t * mutex)
{
  errno_t _4;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _4 = oal_mutex_init_internal (mutex_2(D));
  return _4;

}


