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;
  errno_t D.13102;

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

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  _3 = class_mmap_data->get_buffer;
  _4 = _3 >> 24;
  _5 = class_mmap_data->get_buffer;
  _6 = _5 >> 8;
  _7 = _6 & 65280;
  _8 = _4 | _7;
  _9 = class_mmap_data->get_buffer;
  _10 = _9 << 8;
  _11 = _10 & 16711680;
  _12 = _8 | _11;
  _13 = class_mmap_data->get_buffer;
  _14 = _13 << 24;
  _15 = _12 | _14;
  _16 = _15 + 65;
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe, &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->flags;
  _19 = _18 | 1;
  buf->flags = _19;
  # DEBUG BEGIN_STMT
  _20 = class_mmap_data->get_buffer;
  _21 = _20 >> 24;
  _22 = class_mmap_data->get_buffer;
  _23 = _22 >> 8;
  _24 = _23 & 65280;
  _25 = _21 | _24;
  _26 = class_mmap_data->get_buffer;
  _27 = _26 << 8;
  _28 = _27 & 16711680;
  _29 = _25 | _28;
  _30 = class_mmap_data->get_buffer;
  _31 = _30 << 24;
  _32 = _29 | _31;
  pfe_pe_memcpy_from_host_to_dmem_32_nolock (pe, _32, buf, 66);
  # DEBUG BEGIN_STMT
  ret = 0;
  goto <bb 7>; [INV]

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

  <bb 7> :
  # DEBUG BEGIN_STMT
  D.13102 = ret;
  flags = {CLOBBER};
  mmap_data = {CLOBBER};
  return D.13102;

}


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;
  errno_t D.13091;

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

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  _3 = class_mmap_data->put_buffer;
  _4 = _3 >> 24;
  _5 = class_mmap_data->put_buffer;
  _6 = _5 >> 8;
  _7 = _6 & 65280;
  _8 = _4 | _7;
  _9 = class_mmap_data->put_buffer;
  _10 = _9 << 8;
  _11 = _10 & 16711680;
  _12 = _8 | _11;
  _13 = class_mmap_data->put_buffer;
  _14 = _13 << 24;
  _15 = _12 | _14;
  _16 = _15 + 65;
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe, &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->put_buffer;
  _19 = _18 >> 24;
  _20 = class_mmap_data->put_buffer;
  _21 = _20 >> 8;
  _22 = _21 & 65280;
  _23 = _19 | _22;
  _24 = class_mmap_data->put_buffer;
  _25 = _24 << 8;
  _26 = _25 & 16711680;
  _27 = _23 | _26;
  _28 = class_mmap_data->put_buffer;
  _29 = _28 << 24;
  _30 = _27 | _29;
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe, buf, _30, 66);
  # DEBUG BEGIN_STMT
  flags = 0;
  # DEBUG BEGIN_STMT
  _31 = class_mmap_data->put_buffer;
  _32 = _31 >> 24;
  _33 = class_mmap_data->put_buffer;
  _34 = _33 >> 8;
  _35 = _34 & 65280;
  _36 = _32 | _35;
  _37 = class_mmap_data->put_buffer;
  _38 = _37 << 8;
  _39 = _38 & 16711680;
  _40 = _36 | _39;
  _41 = class_mmap_data->put_buffer;
  _42 = _41 << 24;
  _43 = _40 | _42;
  _44 = _43 + 65;
  pfe_pe_memcpy_from_host_to_dmem_32_nolock (pe, _44, &flags, 1);
  # DEBUG BEGIN_STMT
  ret = 0;
  goto <bb 7>; [INV]

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

  <bb 7> :
  # DEBUG BEGIN_STMT
  D.13091 = ret;
  flags = {CLOBBER};
  mmap_data = {CLOBBER};
  return D.13091;

}


pfe_pe_get_fw_state (struct pfe_pe_t * pe)
{
  struct pfe_ct_pe_sw_state_monitor_t state_monitor;
  pfe_ct_pe_sw_state_t D.13080;

  <bb 2> :
  # DEBUG BEGIN_STMT
  state_monitor = {};
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_lock (pe);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = pfe_pe_get_state_monitor_nolock (pe, &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);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  D.13080 = state_monitor.state;
  state_monitor = {CLOBBER};
  return D.13080;

}


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 D.13072;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe, stats, addr, 16);
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  D.13072 = ret;
  return D.13072;

}


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 D.13070;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe, stats, addr, 184);
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  D.13070 = ret;
  return D.13070;

}


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;
  bool_t D.13067;

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

  <bb 3> :
  # DEBUG BEGIN_STMT
  ret = 0;
  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->prev_state;
  if (_3 != _4)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _5 = pe->type;
  _6 = (int) _5;
  _7 = hm_types[_6];
  _8 = pe->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 = 1;

  <bb 7> :
  # DEBUG BEGIN_STMT
  _13 = pe->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->counter;
  if (_15 == _16)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _17 = pe->type;
  _18 = (int) _17;
  _19 = hm_types[_18];
  _20 = pe->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->stalled = 1;
  # DEBUG BEGIN_STMT
  ret = 1;

  <bb 11> :
  # DEBUG BEGIN_STMT
  _25 = state_monitor.counter;
  pe->counter = _25;
  # DEBUG BEGIN_STMT
  _26 = state_monitor.state;
  pe->prev_state = _26;

  <bb 12> :
  # DEBUG BEGIN_STMT
  D.13067 = ret;
  state_monitor = {CLOBBER};
  return D.13067;

}


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 D.13052;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe, stats, addr, 52);
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  D.13052 = ret;
  return D.13052;

}


pfe_pe_check_mmap (const struct pfe_pe_t * pe)
{
  errno_t ret;
  union pfe_ct_pe_mmap_t pfe_pe_mmap;
  errno_t D.13049;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_get_mmap (pe, &pfe_pe_mmap);
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

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

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  D.13049 = ret;
  pfe_pe_mmap = {CLOBBER};
  return D.13049;

}


pfe_pe_get_fw_messages_nolock (struct pfe_pe_t * pe)
{
  errno_t D.13044;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  D.13044 = 0;
  return D.13044;

}


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;
  errno_t D.13032;

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

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  _2 = pe->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, &pfe_pe_mmap);
  if (_3 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  D.13032 = 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->fw_features_base = _16;
  # DEBUG BEGIN_STMT
  _17 = pe->fw_features_base;
  _18 = pe->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->fw_features_base = 4294967295;
  # DEBUG BEGIN_STMT
  D.13032 = 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->fw_features_size = _31;
  pfe_pe_mmap = {CLOBBER};
  goto <bb 11>; [INV]

  <bb 10> :
  pfe_pe_mmap = {CLOBBER};
  goto <bb 14>; [INV]

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

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

  <bb 13> :
  # DEBUG BEGIN_STMT
  D.13032 = 2;

  <bb 14> :
  return D.13032;

}


pfe_pe_get_fw_feature_str_base (const struct pfe_pe_t * pe)
{
  char * str;
  char * D.13028;

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

  <bb 3> :
  # DEBUG BEGIN_STMT
  str = pe->fw_feature_section;

  <bb 4> :
  # DEBUG BEGIN_STMT
  D.13028 = str;
  return D.13028;

}


pfe_pe_destroy (struct pfe_pe_t * pe, uint32_t pe_num)
{
  uint32_t pe_idx;

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

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

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

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

  <bb 6> :
  # DEBUG BEGIN_STMT
  if (pe_idx < pe_num)
    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;
  errno_t D.13018;

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

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

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  D.13018 = ret;
  return D.13018;

}


pfe_pe_load_firmware (struct pfe_pe_t * pe, uint32_t pe_num, const void * elf)
{
  unsigned int D.12952;
  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;
  errno_t D.12933;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  section_idx = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  elf_file = elf;
  # DEBUG BEGIN_STMT
  shdr = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  features_size = 0;
  messages_size = 0;
  # DEBUG BEGIN_STMT
  features_mem = 0B;
  messages_mem = 0B;
  # DEBUG BEGIN_STMT
  pe_idx = 0;
  goto <bb 4>; [INV]

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (pe_idx < pe_num)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _4 = (unsigned char) pe_num;
  ret = pfe_pe_fw_install_ops (pe, _4);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pe_idx = 0;
  goto <bb 9>; [INV]

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

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

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

  <bb 9> :
  # DEBUG BEGIN_STMT
  _26 = (unsigned char) pe_num;
  _27 = pfe_pe_fw_load_cycles (pe, _26);
  _28 = (long unsigned int) _27;
  if (pe_idx < _28)
    goto <bb 6>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _29 = ELF_SectFindName (elf_file, ".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 = section_idx.8_30 & 2147483647;
  # DEBUG BEGIN_STMT
  _31 = elf_file->arSectHead32;
  _32 = mask_sectIdx * 40;
  shdr = _31 + _32;
  # DEBUG BEGIN_STMT
  _33 = elf_file->pvData;
  _34 = (long unsigned int) _33;
  _35 = shdr->sh_offset;
  _36 = _35 >> 24;
  _37 = shdr->sh_offset;
  _38 = _37 << 24;
  _39 = _36 | _38;
  _40 = shdr->sh_offset;
  _41 = _40 >> 8;
  _42 = _41 & 65280;
  _43 = _39 | _42;
  _44 = shdr->sh_offset;
  _45 = _44 << 8;
  _46 = _45 & 16711680;
  _47 = _43 | _46;
  _48 = _34 + _47;
  _49 = (const void *) _48;
  D.12952 = MEM[(char * {ref-all})_49];
  MEM[(char * {ref-all})&mmap_size] = D.12952;
  # 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->pvData;
  _64 = (long unsigned int) _63;
  _65 = shdr->sh_offset;
  _66 = _65 >> 24;
  _67 = shdr->sh_offset;
  _68 = _67 << 24;
  _69 = _66 | _68;
  _70 = shdr->sh_offset;
  _71 = _70 >> 8;
  _72 = _71 & 65280;
  _73 = _69 | _72;
  _74 = shdr->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 = 22;
  # DEBUG BEGIN_STMT
  print_fw_issue (&tmp_mmap);
  # DEBUG BEGIN_STMT
  pfe_pe_free_mem (pe, pe_num);
  # DEBUG BEGIN_STMT
  D.12933 = ret;
  // 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, ".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 = section_idx.14_83 & 2147483647;
  # DEBUG BEGIN_STMT
  _84 = elf_file->arSectHead32;
  _85 = mask_sectIdx * 40;
  shdr = _84 + _85;
  # DEBUG BEGIN_STMT
  _86 = elf_file->pvData;
  _87 = shdr->sh_offset;
  _88 = _87 >> 24;
  _89 = shdr->sh_offset;
  _90 = _89 << 24;
  _91 = _88 | _90;
  _92 = shdr->sh_offset;
  _93 = _92 >> 8;
  _94 = _93 & 65280;
  _95 = _91 | _94;
  _96 = shdr->sh_offset;
  _97 = _96 << 8;
  _98 = _97 & 16711680;
  _99 = _95 | _98;
  messages_mem = _86 + _99;
  # DEBUG BEGIN_STMT
  _100 = shdr->sh_size;
  _101 = _100 >> 24;
  _102 = shdr->sh_size;
  _103 = _102 << 24;
  _104 = _101 | _103;
  _105 = shdr->sh_size;
  _106 = _105 >> 8;
  _107 = _106 & 65280;
  _108 = _104 | _107;
  _109 = shdr->sh_size;
  _110 = _109 << 8;
  _111 = _110 & 16711680;
  messages_size = _108 | _111;

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

  <bb 17> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _144 = elf_file->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 = 22;
  # DEBUG BEGIN_STMT
  pfe_pe_free_mem (pe, pe_num);
  # DEBUG BEGIN_STMT
  D.12933 = ret;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 24>; [INV]

  <bb 19> :
  # DEBUG BEGIN_STMT
  ret = pfe_pe_upload_sections (pe, pe_num, elf_file);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 20>; [INV]
  else
    goto <bb 23>; [INV]

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

  <bb 21> :
  # DEBUG BEGIN_STMT
  _145 = ii * 112;
  _146 = pe + _145;
  _147 = pfe_pe_unlock (_146);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _148 = ii * 112;
  _149 = pe + _148;
  _149->mmap_data = &tmp_mmap;
  # DEBUG BEGIN_STMT
  _150 = ii * 112;
  _151 = pe + _150;
  _151->fw_msg_section_size = messages_size;
  # DEBUG BEGIN_STMT
  _152 = ii * 112;
  _153 = pe + _152;
  _153->fw_msg_section = messages_mem;
  # DEBUG BEGIN_STMT
  _154 = ii * 112;
  _155 = pe + _154;
  _155->fw_feature_section_size = features_size;
  # DEBUG BEGIN_STMT
  _156 = ii * 112;
  _157 = pe + _156;
  _157->fw_feature_section = features_mem;
  # DEBUG BEGIN_STMT
  _158 = ii * 112;
  _159 = pe + _158;
  _159->fw_features_base = 4294967295;
  # DEBUG BEGIN_STMT
  _160 = ii * 112;
  _161 = pe + _160;
  _161->last_message_write_index = 0;
  # DEBUG BEGIN_STMT
  _162 = ii * 112;
  _163 = pe + _162;
  _163->message_record_addr = 0;
  # DEBUG BEGIN_STMT
  ii = ii + 1;

  <bb 22> :
  # DEBUG BEGIN_STMT
  if (ii < pe_num)
    goto <bb 21>; [INV]
  else
    goto <bb 23>; [INV]

  <bb 23> :
  # DEBUG BEGIN_STMT
  D.12933 = ret;

  <bb 24> :
  section_idx = {CLOBBER};
  mmap_size = {CLOBBER};
  return D.12933;

}


pfe_pe_mem_default_init (struct pfe_pe_t * pe, uint32_t pe_num)
{
  errno_t ret;
  uint32_t pe_idx;
  errno_t D.12870;

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

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (pe_idx < pe_num)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _4 = (unsigned char) pe_num;
  ret = pfe_pe_fw_install_ops (pe, _4);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pe_idx = 0;
  goto <bb 9>; [INV]

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

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

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

  <bb 9> :
  # DEBUG BEGIN_STMT
  _26 = (unsigned char) pe_num;
  _27 = pfe_pe_fw_load_cycles (pe, _26);
  _28 = (long unsigned int) _27;
  if (pe_idx < _28)
    goto <bb 6>; [INV]
  else
    goto <bb 10>; [INV]

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

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

  <bb 12> :
  # DEBUG BEGIN_STMT
  if (pe_idx < pe_num)
    goto <bb 11>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  D.12870 = ret;
  return D.12870;

}


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)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = pe->cbus_base_va;
  _2 = addr_reg + _1;
  pe->mem_access_addr = _2;
  # DEBUG BEGIN_STMT
  _3 = pe->cbus_base_va;
  _4 = rdata_reg + _3;
  pe->mem_access_rdata = _4;
  # DEBUG BEGIN_STMT
  _5 = pe->cbus_base_va;
  _6 = wdata_reg + _5;
  pe->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->lmem_base_addr_pa = elf_base;
  # DEBUG BEGIN_STMT
  pe->lmem_size = len;
  return;

}


pfe_pe_set_imem (struct pfe_pe_t * pe, addr_t elf_base, addr_t len)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  pe->imem_elf_base_va = elf_base;
  # DEBUG BEGIN_STMT
  pe->imem_size = len;
  return;

}


pfe_pe_set_dmem (struct pfe_pe_t * pe, addr_t elf_base, addr_t len)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  pe->dmem_elf_base_va = elf_base;
  # DEBUG BEGIN_STMT
  pe->dmem_size = len;
  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;
  struct pfe_pe_t * D.12858;

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

  <bb 3> :
  # DEBUG BEGIN_STMT
  memset (tmp_pe, 0, 112);
  # DEBUG BEGIN_STMT
  tmp_pe->type = type;
  # DEBUG BEGIN_STMT
  tmp_pe->cbus_base_va = cbus_base_va;
  # DEBUG BEGIN_STMT
  tmp_pe->id = id;
  # DEBUG BEGIN_STMT
  tmp_pe->fw_msg_section = 0B;
  # DEBUG BEGIN_STMT
  tmp_pe->mmap_data = 0B;
  # DEBUG BEGIN_STMT
  tmp_pe->lock_mutex = 5;
  # DEBUG BEGIN_STMT
  _2 = &tmp_pe->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 = 0B;

  <bb 5> :
  # DEBUG BEGIN_STMT
  D.12858 = tmp_pe;
  return D.12858;

}


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;
  addr_t D.12972;

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

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

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

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

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

  <bb 7> :
  # DEBUG BEGIN_STMT
  _95 = elf_file->Header.r32.e_phnum;
  _96 = (unsigned int) _95;
  if (ii < _96)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  D.12972 = load_addr;
  return D.12972;

}


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;
  errno_t D.12980;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_is_dmem (pe, load_addr, size);
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  ret_val = pfe_pe_load_dmem_section_nolock (pe, sdata, load_addr, size, type);
  goto <bb 7>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _2 = pfe_pe_is_imem (pe, load_addr, size);
  if (_2 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  ret_val = pfe_pe_load_imem_section_nolock (pe, sdata, load_addr, size, type);
  goto <bb 7>; [INV]

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

  <bb 7> :
  # DEBUG BEGIN_STMT
  D.12980 = ret_val;
  return D.12980;

}


pfe_pe_is_imem (const struct pfe_pe_t * pe, addr_t addr, uint32_t size)
{
  bool_t ret;
  addr_t reg_end;
  bool_t D.13001;

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

  <bb 3> :
  _4 = addr + size;
  if (reg_end > _4)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

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

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

  <bb 6> :
  # DEBUG BEGIN_STMT
  D.13001 = ret;
  return D.13001;

}


pfe_pe_is_dmem (const struct pfe_pe_t * pe, addr_t addr, uint32_t size)
{
  bool_t ret;
  addr_t reg_end;
  bool_t D.12986;

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

  <bb 3> :
  _4 = addr + size;
  if (reg_end > _4)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

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

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

  <bb 6> :
  # DEBUG BEGIN_STMT
  D.12986 = ret;
  return D.12986;

}


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;
  errno_t D.13012;

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

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

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

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

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

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

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

  <bb 9> :
<L7>:
  # DEBUG BEGIN_STMT
  _6 = pe->fw_load_ops;
  _7 = _6->pe_memcpy;
  _8 = pe->imem_elf_base_va;
  _9 = addr - _8;
  _7 (pe, 1, _9, data, size);
  # DEBUG BEGIN_STMT
  goto <bb 11>; [INV]

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

  <bb 11> :
<L14>:
  # DEBUG BEGIN_STMT
  D.13012 = ret;
  return D.13012;

}


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;
  errno_t D.12994;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  sdata.16_1 = (unsigned int) sdata;
  _2 = addr ^ 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 = 22;
  goto <bb 10>; [INV]

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

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

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

  <bb 7> :
<L5>:
  # DEBUG BEGIN_STMT
  _5 = pe->fw_load_ops;
  _6 = _5->pe_memcpy;
  _7 = pe->dmem_elf_base_va;
  _8 = addr - _7;
  _6 (pe, 0, _8, sdata, size);
  # DEBUG BEGIN_STMT
  goto <bb 10>; [INV]

  <bb 8> :
<L6>:
  # DEBUG BEGIN_STMT
  _9 = pe->fw_load_ops;
  _10 = _9->pe_memset;
  _10 (pe, 0, 0, addr, size);
  # DEBUG BEGIN_STMT
  goto <bb 10>; [INV]

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

  <bb 10> :
<L12>:
  # DEBUG BEGIN_STMT
  D.12994 = ret;
  return D.12994;

}


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;
  errno_t D.12852;

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

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

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ii = ii + 1;

  <bb 6> :
  # DEBUG BEGIN_STMT
  if (ii < pe_count)
    goto <bb 3>; [INV]
  else
    goto <bb 7>; [INV]

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

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

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

  <bb 10> :
  # DEBUG BEGIN_STMT
  ii.5_8 = (unsigned int) ii;
  _9 = ii.5_8 * 112;
  _10 = pe + _9;
  ii.6_11 = (long unsigned int) ii;
  _12 = read_len * ii.6_11;
  _13 = dst_ptr + _12;
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (_10, _13, src_addr, read_len);
  # DEBUG BEGIN_STMT
  ii = ii + 1;
  goto <bb 12>; [INV]

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

  <bb 12> :
  # DEBUG BEGIN_STMT
  if (ii < pe_count)
    goto <bb 9>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  ii = 0;
  goto <bb 17>; [INV]

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

  <bb 15> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = ret_unlock;

  <bb 16> :
  # DEBUG BEGIN_STMT
  ii = ii + 1;

  <bb 17> :
  # DEBUG BEGIN_STMT
  if (ii < pe_count)
    goto <bb 14>; [INV]
  else
    goto <bb 18>; [INV]

  <bb 18> :
  # DEBUG BEGIN_STMT
  D.12852 = ret;
  return D.12852;

}


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

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = pfe_pe_mem_lock (pe);
  # DEBUG BEGIN_STMT
  if (ret != 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, dst_ptr, src_addr, len);
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_mem_unlock (pe);

  <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;
  long unsigned int iftmp.0;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  dst_byteptr = dst_ptr;
  # DEBUG BEGIN_STMT
  src_temp = src_addr;
  # DEBUG BEGIN_STMT
  len_temp = len;
  # DEBUG BEGIN_STMT
  _1 = src_temp & 3;
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = src_temp & 3;
  offset = 4 - _2;
  # DEBUG BEGIN_STMT
  offset = MIN_EXPR <offset, len>;
  # DEBUG BEGIN_STMT
  _3 = (unsigned char) offset;
  _4 = pfe_pe_mem_read (pe, 0, src_temp, _3);
  val = _4;
  # DEBUG BEGIN_STMT
  memcpy (dst_byteptr, &val, offset);
  # DEBUG BEGIN_STMT
  dst_byteptr = dst_byteptr + offset;
  # DEBUG BEGIN_STMT
  src_temp = src_addr + offset;
  # DEBUG BEGIN_STMT
  if (len >= offset)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  iftmp.0 = len - offset;
  goto <bb 6>; [INV]

  <bb 5> :
  iftmp.0 = 0;

  <bb 6> :
  len_temp = iftmp.0;
  goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _5 = pfe_pe_mem_read (pe, 0, src_temp, 4);
  val = _5;
  # DEBUG BEGIN_STMT
  val.1_6 = val;
  MEM[(uint32_t *)dst_byteptr] = val.1_6;
  # DEBUG BEGIN_STMT
  len_temp = len_temp + 4294967292;
  # DEBUG BEGIN_STMT
  src_temp = src_temp + 4;
  # DEBUG BEGIN_STMT
  dst_byteptr = dst_byteptr + 4;

  <bb 8> :
  # DEBUG BEGIN_STMT
  if (len_temp > 3)
    goto <bb 7>; [INV]
  else
    goto <bb 9>; [INV]

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

  <bb 10> :
  # DEBUG BEGIN_STMT
  _7 = (unsigned char) len_temp;
  _8 = pfe_pe_mem_read (pe, 0, src_temp, _7);
  val = _8;
  # DEBUG BEGIN_STMT
  memcpy (dst_byteptr, &val, len_temp);

  <bb 11> :
  val = {CLOBBER};
  return;

}


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

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = pfe_pe_mem_lock (pe);
  # DEBUG BEGIN_STMT
  if (ret != 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, dst_addr, src_ptr, len);
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_mem_unlock (pe);

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

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  src_byteptr = src_ptr;
  # DEBUG BEGIN_STMT
  dst_temp = dst_addr;
  # DEBUG BEGIN_STMT
  len_temp = len;
  # DEBUG BEGIN_STMT
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = dst_temp & 3;
  offset = 4 - _1;
  # DEBUG BEGIN_STMT
  _2 = *src_byteptr;
  val = (uint32_t) _2;
  # DEBUG BEGIN_STMT
  _3 = (unsigned char) offset;
  pfe_pe_mem_write (pe, 0, val, dst_temp, 1, _3);
  # DEBUG BEGIN_STMT
  dst_temp = dst_temp + 1;
  # DEBUG BEGIN_STMT
  src_byteptr = src_byteptr + 1;
  # DEBUG BEGIN_STMT
  len_temp = len_temp + 4294967295;

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

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

  <bb 6> :
  # DEBUG BEGIN_STMT
  val = MEM[(uint32_t *)src_byteptr];
  # DEBUG BEGIN_STMT
  pfe_pe_mem_write (pe, 0, val, dst_temp, 4, 0);
  # DEBUG BEGIN_STMT
  len_temp = len_temp + 4294967292;
  # DEBUG BEGIN_STMT
  src_byteptr = src_byteptr + 4;
  # DEBUG BEGIN_STMT
  dst_temp = dst_temp + 4;

  <bb 7> :
  # DEBUG BEGIN_STMT
  if (len_temp > 3)
    goto <bb 6>; [INV]
  else
    goto <bb 8>; [INV]

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

  <bb 9> :
  # DEBUG BEGIN_STMT
  val = pfe_pe_get_u32_from_byteptr (src_byteptr, len_temp);
  # DEBUG BEGIN_STMT
  _5 = (unsigned char) len_temp;
  pfe_pe_mem_write (pe, 0, val, dst_temp, _5, 0);

  <bb 10> :
  return;

}


pfe_pe_get_u32_from_byteptr (const uint8_t * src_byteptr, uint32_t len)
{
  uint32_t val;
  uint32_t D.12787;

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

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

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

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

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

  <bb 7> :
  # DEBUG BEGIN_STMT
  D.12787 = val;
  return D.12787;

}


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;

  <bb 2> :
  # DEBUG BEGIN_STMT
  bytesel = 0;
  # DEBUG BEGIN_STMT
  memsel = 0;
  # DEBUG BEGIN_STMT
  offset_temp = offset;
  # DEBUG BEGIN_STMT
  val_temp = val;
  # DEBUG BEGIN_STMT
  size_temp = size;
  # DEBUG BEGIN_STMT
  addr_temp = addr;
  # DEBUG BEGIN_STMT
  _1 = offset_temp != 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 & 3;
  _5 = _4 * 8;
  val_temp = val << _5;
  # DEBUG BEGIN_STMT
  _6 = (int) offset_temp;
  _7 = (int) size_temp;
  _8 = _6 - _7;
  _9 = 1 << _8;
  bytesel = (uint8_t) _9;
  goto <bb 5>; [INV]

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

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

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

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

  <bb 8> :
  # DEBUG BEGIN_STMT
  _18 = addr_temp & 1048575;
  _19 = memsel | _18;
  _20 = pe->id;
  _21 = (long unsigned int) _20;
  _22 = _21 << 20;
  _23 = _22 & 15728640;
  _24 = _19 | _23;
  _25 = (long unsigned int) bytesel;
  _26 = _25 << 24;
  _27 = _26 & 251658240;
  _28 = _24 | _27;
  addr_temp = _28 | 2147483648;
  # DEBUG BEGIN_STMT
  _29 = pe->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 >> 24;
  _34 = val_temp >> 8;
  _35 = _34 & 65280;
  _36 = _33 | _35;
  _37 = val_temp << 8;
  _38 = _37 & 16711680;
  _39 = _36 | _38;
  _40 = val_temp << 24;
  _41 = pe->mem_access_wdata;
  _42 = (volatile uint32_t *) _41;
  _43 = _39 | _40;
  *_42 = _43;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _44 = pe->mem_access_addr;
  _45 = (volatile uint32_t *) _44;
  *_45 = addr_temp;
  # 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;
  uint32_t D.12836;
  long unsigned int D.12825;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  size_temp = size;
  # DEBUG BEGIN_STMT
  adrr_temp = addr;
  # DEBUG BEGIN_STMT
  _1 = addr & 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;
  _6 = addr & 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;
  _9 = _8 & 3;
  _10 = 4 - _9;
  val = pfe_pe_mem_read (pe, mem, addr, _10);
  # DEBUG BEGIN_STMT
  _11 = (unsigned char) addr;
  _12 = _11 & 3;
  offset = 4 - _12;
  # DEBUG BEGIN_STMT
  size_temp = size - offset;
  # DEBUG BEGIN_STMT
  _13 = (unsigned int) offset;
  adrr_temp = addr + _13;
  # DEBUG BEGIN_STMT
  _14 = pfe_pe_mem_read (pe, mem, adrr_temp, size_temp);
  _15 = (unsigned int) offset;
  _16 = _15 * 8;
  D.12825 = _14 << _16;
  val = D.12825 | val;
  goto <bb 14>; [INV]

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

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

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

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

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

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

  <bb 11> :
  # DEBUG BEGIN_STMT
  _20 = adrr_temp & 1048575;
  _21 = memsel | _20;
  _22 = pe->id;
  _23 = (long unsigned int) _22;
  _24 = _23 << 20;
  _25 = _24 & 15728640;
  adrr_temp = _21 | _25;
  # DEBUG BEGIN_STMT
  _26 = pe->miflock;
  _27 = _26 == 0;
  _28 = (long int) _27;
  _29 = __builtin_expect (_28, 0);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _30 = pe->mem_access_addr;
  _31 = (volatile uint32_t *) _30;
  *_31 = adrr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _32 = pe->mem_access_rdata;
  _33 = (volatile uint32_t *) _32;
  _34 = *_33;
  _35 = _34 >> 24;
  _36 = _35 & 255;
  _37 = pe->mem_access_rdata;
  _38 = (volatile uint32_t *) _37;
  _39 = *_38;
  _40 = _39 >> 8;
  _41 = _40 & 65280;
  _42 = _36 | _41;
  _43 = pe->mem_access_rdata;
  _44 = (volatile uint32_t *) _43;
  _45 = *_44;
  _46 = _45 << 8;
  _47 = _46 & 16711680;
  _48 = _42 | _47;
  _49 = pe->mem_access_rdata;
  _50 = (volatile uint32_t *) _49;
  _51 = *_50;
  _52 = _51 << 24;
  val = _48 | _52;
  # DEBUG BEGIN_STMT
  _53 = adrr_temp & 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 & 3;
  _58 = _57 * 8;
  val = val >> _58;

  <bb 13> :
  # DEBUG BEGIN_STMT
  val = val & mask;

  <bb 14> :
  # DEBUG BEGIN_STMT
  D.12836 = val;
  return D.12836;

}


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;

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

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

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  _1 = pe->miflock;
  _2 = _1 == 0;
  _3 = (long int) _2;
  _4 = __builtin_expect (_3, 0);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = val >> 24;
  _6 = val >> 8;
  _7 = _6 & 65280;
  _8 = _5 | _7;
  _9 = val << 8;
  _10 = _9 & 16711680;
  _11 = _8 | _10;
  _12 = val << 24;
  _13 = pe->mem_access_wdata;
  _14 = (volatile uint32_t *) _13;
  _15 = _11 | _12;
  *_14 = _15;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _16 = pe->id;
  _17 = (long unsigned int) _16;
  _18 = _17 << 20;
  _19 = _18 & 15728640;
  _20 = memsel | _19;
  addr_temp = _20 | 2399141888;
  # DEBUG BEGIN_STMT
  mem_addr = addr;
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp & 4294311936;
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp | mem_addr;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _21 = pe->mem_access_addr;
  _22 = (volatile uint32_t *) _21;
  *_22 = addr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  mem_addr = mem_addr + 4;

  <bb 7> :
  # DEBUG BEGIN_STMT
  _23 = addr + size;
  if (mem_addr < _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;

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

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

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  _1 = pe->miflock;
  _2 = _1 == 0;
  _3 = (long int) _2;
  _4 = __builtin_expect (_3, 0);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = pe->id;
  _6 = (long unsigned int) _5;
  _7 = _6 << 20;
  _8 = _7 & 15728640;
  _9 = memsel | _8;
  addr_temp = _9 | 2399141888;
  # DEBUG BEGIN_STMT
  mem_addr = dst_addr;
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _10 = *data;
  _11 = _10 >> 24;
  _12 = *data;
  _13 = _12 >> 8;
  _14 = _13 & 65280;
  _15 = _11 | _14;
  _16 = *data;
  _17 = _16 << 8;
  _18 = _17 & 16711680;
  _19 = _15 | _18;
  _20 = *data;
  _21 = _20 << 24;
  _22 = pe->mem_access_wdata;
  _23 = (volatile uint32_t *) _22;
  _24 = _19 | _21;
  *_23 = _24;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  data = data + 4;
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp & 4294311936;
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp | mem_addr;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _25 = pe->mem_access_addr;
  _26 = (volatile uint32_t *) _25;
  *_26 = addr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  mem_addr = mem_addr + 4;

  <bb 7> :
  # DEBUG BEGIN_STMT
  _27 = dst_addr + len;
  if (mem_addr < _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;

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

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

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  _1 = pe->miflock;
  _2 = _1 == 0;
  _3 = (long int) _2;
  _4 = __builtin_expect (_3, 0);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = val >> 24;
  _6 = val >> 8;
  _7 = _6 & 65280;
  _8 = _5 | _7;
  _9 = val << 8;
  _10 = _9 & 16711680;
  _11 = _8 | _10;
  _12 = val << 24;
  _13 = pe->mem_access_wdata;
  _14 = (volatile uint32_t *) _13;
  _15 = _11 | _12;
  *_14 = _15;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp = memsel | 2399141888;
  # DEBUG BEGIN_STMT
  mem_addr = addr;
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp & 4278583296;
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp | mem_addr;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _16 = pe->mem_access_addr;
  _17 = (volatile uint32_t *) _16;
  *_17 = addr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp | 1048576;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _18 = pe->mem_access_addr;
  _19 = (volatile uint32_t *) _18;
  *_19 = addr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp | 2097152;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _20 = pe->mem_access_addr;
  _21 = (volatile uint32_t *) _20;
  *_21 = addr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp & 4293918719;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _22 = pe->mem_access_addr;
  _23 = (volatile uint32_t *) _22;
  *_23 = addr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp | 4194304;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _24 = pe->mem_access_addr;
  _25 = (volatile uint32_t *) _24;
  *_25 = addr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp | 1048576;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _26 = pe->mem_access_addr;
  _27 = (volatile uint32_t *) _26;
  *_27 = addr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp & 4292870143;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _28 = pe->mem_access_addr;
  _29 = (volatile uint32_t *) _28;
  *_29 = addr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp & 4293918719;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _30 = pe->mem_access_addr;
  _31 = (volatile uint32_t *) _30;
  *_31 = addr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  mem_addr = mem_addr + 4;

  <bb 7> :
  # DEBUG BEGIN_STMT
  _32 = addr + size;
  if (mem_addr < _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;

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

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

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  _1 = pe->miflock;
  _2 = _1 == 0;
  _3 = (long int) _2;
  _4 = __builtin_expect (_3, 0);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp = memsel | 2399141888;
  # DEBUG BEGIN_STMT
  mem_addr = dst_addr;
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = *data;
  _6 = _5 >> 24;
  _7 = *data;
  _8 = _7 >> 8;
  _9 = _8 & 65280;
  _10 = _6 | _9;
  _11 = *data;
  _12 = _11 << 8;
  _13 = _12 & 16711680;
  _14 = _10 | _13;
  _15 = *data;
  _16 = _15 << 24;
  _17 = pe->mem_access_wdata;
  _18 = (volatile uint32_t *) _17;
  _19 = _14 | _16;
  *_18 = _19;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  data = data + 4;
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp & 4278583296;
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp | mem_addr;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _20 = pe->mem_access_addr;
  _21 = (volatile uint32_t *) _20;
  *_21 = addr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp | 1048576;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _22 = pe->mem_access_addr;
  _23 = (volatile uint32_t *) _22;
  *_23 = addr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp | 2097152;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _24 = pe->mem_access_addr;
  _25 = (volatile uint32_t *) _24;
  *_25 = addr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp & 4293918719;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _26 = pe->mem_access_addr;
  _27 = (volatile uint32_t *) _26;
  *_27 = addr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp | 4194304;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _28 = pe->mem_access_addr;
  _29 = (volatile uint32_t *) _28;
  *_29 = addr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp | 1048576;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _30 = pe->mem_access_addr;
  _31 = (volatile uint32_t *) _30;
  *_31 = addr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp & 4292870143;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _32 = pe->mem_access_addr;
  _33 = (volatile uint32_t *) _32;
  *_33 = addr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  addr_temp = addr_temp & 4293918719;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _34 = pe->mem_access_addr;
  _35 = (volatile uint32_t *) _34;
  *_35 = addr_temp;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  mem_addr = mem_addr + 4;

  <bb 7> :
  # DEBUG BEGIN_STMT
  _36 = dst_addr + len;
  if (mem_addr < _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;
  errno_t D.12889;

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

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

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

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

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

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

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

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

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

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

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

  <bb 13> :
  # DEBUG BEGIN_STMT
  _10 = (long unsigned int) pe_num;
  if (pe_idx < _10)
    goto <bb 11>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 15>; [INV]
  else
    goto <bb 17>; [INV]

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

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

  <bb 17> :
  # DEBUG BEGIN_STMT
  idx = idx + 1;

  <bb 18> :
  # DEBUG BEGIN_STMT
  if (idx <= 1)
    goto <bb 3>; [INV]
  else
    goto <bb 19>; [INV]

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

  <bb 20> :
  # DEBUG BEGIN_STMT
  _11 = pe_idx * 112;
  _12 = pe + _11;
  _12->fw_load_ops = pe_loader;
  # DEBUG BEGIN_STMT
  pe_idx = pe_idx + 1;

  <bb 21> :
  # DEBUG BEGIN_STMT
  _13 = (long unsigned int) pe_num;
  if (pe_idx < _13)
    goto <bb 20>; [INV]
  else
    goto <bb 22>; [INV]

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

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

  <bb 24> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  D.12889 = ret;
  return D.12889;

}


pfe_pe_fw_ops_valid (struct pfe_pe_t * pe1, const struct pfe_pe_t * pe2)
{
  errno_t ret;
  errno_t D.12919;

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

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

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

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

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

  <bb 7> :
  # DEBUG BEGIN_STMT
  D.12919 = ret;
  return D.12919;

}


pfe_pe_fw_load_cycles (const struct pfe_pe_t * pe, uint8_t pe_num)
{
  uint8_t ret;
  uint8_t D.12925;

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

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  _4 = pe->fw_load_ops;
  _5 = _4->pe_loaded_cnt;
  ret = pe_num / _5;

  <bb 5> :
  # DEBUG BEGIN_STMT
  D.12925 = ret;
  return D.12925;

}


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;
  errno_t D.12805;

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

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

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  ret = 22;
  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, misc_dmem, &misc_ctrl, 4);
  # DEBUG BEGIN_STMT
  _18 = pfe_pe_unlock (pe);

  <bb 7> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  D.12805 = ret;
  misc_ctrl = {CLOBBER};
  return D.12805;

}


pfe_pe_mem_lock (struct pfe_pe_t * pe)
{
  uint32_t misc_dmem;
  errno_t ret;
  errno_t D.12747;

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

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

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

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

  <bb 6> :
  # DEBUG BEGIN_STMT
  ret = pfe_pe_mem_process_lock (pe, misc_dmem);

  <bb 7> :
  # DEBUG BEGIN_STMT
  D.12747 = ret;
  return D.12747;

}


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;
  errno_t D.12767;

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

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  pfe_pe_memcpy_from_dmem_to_host_32_nolock (pe, &misc_ctrl, misc_dmem, 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);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = 115;
  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, misc_dmem, &misc_ctrl, 4);
  # DEBUG BEGIN_STMT
  _5 = pfe_pe_is_active_nolock (pe);
  if (_5 == 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

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

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

  <bb 9> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (timeout == 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, misc_dmem, &misc_ctrl, 4);
  # DEBUG BEGIN_STMT
  _6 = pfe_pe_unlock (pe);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = 62;
  # DEBUG BEGIN_STMT
  goto <bb 12>; [INV]

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

  <bb 12> :
  # DEBUG BEGIN_STMT
  D.12767 = ret;
  misc_ctrl = {CLOBBER};
  return D.12767;

}


pfe_pe_unlock (struct pfe_pe_t * pe)
{
  errno_t D.12733;

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

}


pfe_pe_lock (struct pfe_pe_t * pe)
{
  errno_t ret;
  errno_t D.12725;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = &pe->lock_mutex;
  ret = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  _2 = pe->miflock;
  _3 = _2 != 0;
  _4 = (long int) _3;
  _5 = __builtin_expect (_4, 0);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = ret == 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->miflock = 1;

  <bb 4> :
  # DEBUG BEGIN_STMT
  D.12725 = ret;
  return D.12725;

}


pfe_pe_is_active_nolock (struct pfe_pe_t * pe)
{
  bool_t ret;
  struct pfe_ct_pe_sw_state_monitor_t state_monitor;
  bool_t D.12776;

  <bb 2> :
  # DEBUG BEGIN_STMT
  state_monitor = {};
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  _1 = pfe_pe_get_state_monitor_nolock (pe, &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 = 1;

  <bb 6> :
  # DEBUG BEGIN_STMT
  D.12776 = ret;
  state_monitor = {CLOBBER};
  return D.12776;

}


pfe_pe_get_state_monitor_nolock (struct pfe_pe_t * pe, struct pfe_ct_pe_sw_state_monitor_t * state_monitor)
{
  errno_t ret;
  errno_t D.12782;

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

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

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  D.12782 = ret;
  return D.12782;

}


pfe_pe_free_mem (struct pfe_pe_t * pe, uint32_t pe_num)
{
  uint32_t ii;

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

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (ii < pe_num)
    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;
  errno_t D.12964;

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

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = elf_file->arSectHead32;
  _2 = ii * 40;
  _3 = _1 + _2;
  _4 = _3->sh_flags;
  _5 = _4 >> 24;
  _6 = elf_file->arSectHead32;
  _7 = ii * 40;
  _8 = _6 + _7;
  _9 = _8->sh_flags;
  _10 = _9 << 24;
  _11 = _5 | _10;
  _12 = elf_file->arSectHead32;
  _13 = ii * 40;
  _14 = _12 + _13;
  _15 = _14->sh_flags;
  _16 = _15 >> 8;
  _17 = _16 & 65280;
  _18 = _11 | _17;
  _19 = elf_file->arSectHead32;
  _20 = ii * 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->pvData;
  _28 = (long unsigned int) _27;
  _29 = elf_file->arSectHead32;
  _30 = ii * 40;
  _31 = _29 + _30;
  _32 = _31->sh_offset;
  _33 = _32 >> 24;
  _34 = elf_file->arSectHead32;
  _35 = ii * 40;
  _36 = _34 + _35;
  _37 = _36->sh_offset;
  _38 = _37 << 24;
  _39 = _33 | _38;
  _40 = elf_file->arSectHead32;
  _41 = ii * 40;
  _42 = _40 + _41;
  _43 = _42->sh_offset;
  _44 = _43 >> 8;
  _45 = _44 & 65280;
  _46 = _39 | _45;
  _47 = elf_file->arSectHead32;
  _48 = ii * 40;
  _49 = _47 + _48;
  _50 = _49->sh_offset;
  _51 = _50 << 8;
  _52 = _51 & 16711680;
  _53 = _46 | _52;
  _54 = _28 + _53;
  buf = (const void *) _54;
  # DEBUG BEGIN_STMT
  _55 = elf_file->arSectHead32;
  _56 = ii * 40;
  _57 = _55 + _56;
  load_addr = pfe_pe_get_elf_sect_load_addr (elf_file, _57);
  # DEBUG BEGIN_STMT
  if (load_addr == 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  ret = 22;
  # DEBUG BEGIN_STMT
  pfe_pe_free_mem (pe, pe_num);
  # DEBUG BEGIN_STMT
  goto <bb 16>; [INV]

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

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

  <bb 9> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_pe_free_mem (pe, pe_num);
  # DEBUG BEGIN_STMT
  goto <bb 12>; [INV]

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

  <bb 11> :
  # DEBUG BEGIN_STMT
  _110 = (unsigned char) pe_num;
  _111 = pfe_pe_fw_load_cycles (pe, _110);
  _112 = (long unsigned int) _111;
  if (pe_idx < _112)
    goto <bb 8>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 13>; [INV]
  else
    goto <bb 14>; [INV]

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

  <bb 14> :
  # DEBUG BEGIN_STMT
  ii = ii + 1;

  <bb 15> :
  # DEBUG BEGIN_STMT
  _113 = elf_file->Header.r32.e_shnum;
  _114 = (long unsigned int) _113;
  if (ii < _114)
    goto <bb 3>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  D.12964 = ret;

  <bb 17> :
  return D.12964;

}


oal_mutex_unlock (const oal_mutex_t * mutex)
{
  errno_t retval;
  errno_t D.12739;

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

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = *mutex;
  _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;
  _6 = (int) _5;
  _7 = SchM_Exit_Eth_43_PFE_ETH_EXCLUSIVE_AREA_ID[_6];
  _7 ();
  # DEBUG BEGIN_STMT
  retval = 0;

  <bb 5> :
  # DEBUG BEGIN_STMT
  D.12739 = retval;
  return D.12739;

}


oal_mutex_lock (const oal_mutex_t * mutex)
{
  errno_t retval;
  errno_t D.12731;

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

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = *mutex;
  _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;
  _6 = (int) _5;
  _7 = SchM_Enter_Eth_43_PFE_ETH_EXCLUSIVE_AREA_ID[_6];
  _7 ();
  # DEBUG BEGIN_STMT
  retval = 0;

  <bb 5> :
  # DEBUG BEGIN_STMT
  D.12731 = retval;
  return D.12731;

}


oal_mutex_destroy (oal_mutex_t * mutex)
{
  errno_t D.13024;

  <bb 2> :
  # DEBUG BEGIN_STMT
  D.13024 = oal_mutex_destroy_internal (mutex);
  return D.13024;

}


oal_mutex_init (oal_mutex_t * mutex)
{
  errno_t D.12860;

  <bb 2> :
  # DEBUG BEGIN_STMT
  D.12860 = oal_mutex_init_internal (mutex);
  return D.12860;

}


