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

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

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

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

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

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

}


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

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

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

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

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

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

}


fci_owner_clear_floating_lock ()
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG fci_context => &__context
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  fci_owner_context.lock_owner_if = 10;
  # DEBUG BEGIN_STMT
  return 0;

}


fci_owner_unlock_cmd (pfe_ct_phy_if_id_t sender, uint16_t * fci_ret)
{
  <unnamed type> _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG fci_context => &__context
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = fci_owner_context.lock_owner_if;
  if (_1 == sender_4(D))
    goto <bb 3>; [34.00%]
  else
    goto <bb 4>; [66.00%]

  <bb 3> [local count: 365072220]:
  # DEBUG BEGIN_STMT
  fci_owner_context.lock_owner_if = 10;
  # DEBUG BEGIN_STMT
  *fci_ret_5(D) = 0;
  goto <bb 5>; [100.00%]

  <bb 4> [local count: 708669605]:
  # DEBUG BEGIN_STMT
  *fci_ret_5(D) = 62724;

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

}


fci_owner_get_floating_lock (pfe_ct_phy_if_id_t sender, uint16_t * fci_ret, bool_t * floating_lock)
{
  pfe_fci_owner_hif_id_t ret_val;
  errno_t ret;
  <unnamed type> _1;
  <unnamed type> _2;
  unsigned char _3;
  int _8;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG fci_context => &__context
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = fci_owner_context.lock_owner_if;
  if (_1 != 10)
    goto <bb 3>; [66.00%]
  else
    goto <bb 4>; [34.00%]

  <bb 3> [local count: 708669604]:
  # DEBUG BEGIN_STMT
  *fci_ret_10(D) = 62724;
  goto <bb 9>; [100.00%]

  <bb 4> [local count: 365072220]:
  # DEBUG BEGIN_STMT
  # DEBUG phy => sender_7(D)
  # DEBUG INLINE_ENTRY pfe_fci_owner_hif_from_phy_id
  # DEBUG BEGIN_STMT
  # DEBUG ret_val => 0
  # DEBUG BEGIN_STMT
  if (sender_7(D) <= 10)
    goto <bb 5>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 5> [local count: 182536110]:
  # DEBUG BEGIN_STMT
  _8 = (int) sender_7(D);
  ret_val_16 = pfe_fci_owner_hif_ids[_8];
  # DEBUG ret_val => ret_val_16
  # DEBUG BEGIN_STMT
  # DEBUG phy => NULL
  # DEBUG ret_val => NULL
  # DEBUG chnl_bit_mask => ret_val_16
  # DEBUG BEGIN_STMT
  if (ret_val_16 == 0)
    goto <bb 9>; [35.00%]
  else
    goto <bb 6>; [65.00%]

  <bb 6> [local count: 118648471]:
  # DEBUG BEGIN_STMT
  _2 = fci_owner_context.hif_fci_owner_chnls_mask;
  _3 = _2 & ret_val_16;
  if (_3 == 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 59324236]:
  # DEBUG BEGIN_STMT
  *fci_ret_10(D) = 62722;
  goto <bb 9>; [100.00%]

  <bb 8> [local count: 59324236]:
  # DEBUG BEGIN_STMT
  fci_owner_context.lock_owner_if = sender_7(D);
  # DEBUG BEGIN_STMT
  *fci_ret_10(D) = 0;
  # DEBUG BEGIN_STMT
  *floating_lock_12(D) = 1;

  <bb 9> [local count: 1073741824]:
  # ret_4 = PHI <0(3), 22(5), 0(7), 0(8), 22(4)>
  # DEBUG phy => NULL
  # DEBUG ret_val => NULL
  # DEBUG chnl_bit_mask => NULL
  # DEBUG ret => ret_4
  # DEBUG BEGIN_STMT
  return ret_4;

}


fci_owner_lock_cmd (pfe_ct_phy_if_id_t sender, uint16_t * fci_ret)
{
  pfe_fci_owner_hif_id_t ret_val;
  errno_t ret;
  <unnamed type> _1;
  <unnamed type> _2;
  unsigned char _3;
  int _8;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG fci_context => &__context
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = fci_owner_context.lock_owner_if;
  if (_1 == sender_7(D))
    goto <bb 3>; [34.00%]
  else
    goto <bb 4>; [66.00%]

  <bb 3> [local count: 365072220]:
  # DEBUG BEGIN_STMT
  *fci_ret_9(D) = 0;
  goto <bb 11>; [100.00%]

  <bb 4> [local count: 708669605]:
  # DEBUG BEGIN_STMT
  # DEBUG phy => sender_7(D)
  # DEBUG INLINE_ENTRY pfe_fci_owner_hif_from_phy_id
  # DEBUG BEGIN_STMT
  # DEBUG ret_val => 0
  # DEBUG BEGIN_STMT
  if (sender_7(D) <= 10)
    goto <bb 5>; [50.00%]
  else
    goto <bb 11>; [50.00%]

  <bb 5> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  _8 = (int) sender_7(D);
  ret_val_15 = pfe_fci_owner_hif_ids[_8];
  # DEBUG ret_val => ret_val_15
  # DEBUG BEGIN_STMT
  # DEBUG phy => NULL
  # DEBUG ret_val => NULL
  # DEBUG chnl_bit_mask => ret_val_15
  # DEBUG BEGIN_STMT
  if (ret_val_15 == 0)
    goto <bb 11>; [35.00%]
  else
    goto <bb 6>; [65.00%]

  <bb 6> [local count: 230317621]:
  # DEBUG BEGIN_STMT
  _2 = fci_owner_context.hif_fci_owner_chnls_mask;
  _3 = _2 & ret_val_15;
  if (_3 == 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 115158811]:
  # DEBUG BEGIN_STMT
  *fci_ret_9(D) = 62722;
  goto <bb 11>; [100.00%]

  <bb 8> [local count: 115158811]:
  # DEBUG BEGIN_STMT
  if (_1 == 10)
    goto <bb 9>; [34.00%]
  else
    goto <bb 10>; [66.00%]

  <bb 9> [local count: 39153996]:
  # DEBUG BEGIN_STMT
  fci_owner_context.lock_owner_if = sender_7(D);
  # DEBUG BEGIN_STMT
  *fci_ret_9(D) = 0;
  goto <bb 11>; [100.00%]

  <bb 10> [local count: 76004815]:
  # DEBUG BEGIN_STMT
  *fci_ret_9(D) = 62723;

  <bb 11> [local count: 1073741824]:
  # ret_4 = PHI <0(3), 22(5), 0(7), 0(9), 0(10), 22(4)>
  # DEBUG phy => NULL
  # DEBUG ret_val => NULL
  # DEBUG chnl_bit_mask => NULL
  # DEBUG ret => ret_4
  # DEBUG BEGIN_STMT
  return ret_4;

}


fci_owner_mutex_unlock ()
{
  errno_t ret;
  short unsigned int _4;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG fci_context => &__context
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = MEM[(const oal_mutex_t *)&fci_owner_context + 2B];
  # DEBUG D#2 => &fci_owner_context.fci_owner_mutex
  ret_3 = oal_mutex_unlock.isra.0 (_4);
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  return ret_3;

}


fci_owner_mutex_lock ()
{
  errno_t ret;
  short unsigned int _4;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG fci_context => &__context
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = MEM[(const oal_mutex_t *)&fci_owner_context + 2B];
  # DEBUG D#1 => &fci_owner_context.fci_owner_mutex
  ret_3 = oal_mutex_lock.isra.0 (_4);
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  return ret_3;

}


fci_sender_get_phy_if_id (uint32_t sender, pfe_ct_phy_if_id_t * phy_if_id)
{
  errno_t ret;
  <unnamed type> _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  switch (sender_4(D)) <default: <L8> [35.00%], case 4: <L0> [65.00%], case 6 ... 9: <L0> [65.00%]>

  <bb 3> [local count: 697932186]:
<L0>:
  # DEBUG BEGIN_STMT
  _1 = (<unnamed type>) sender_4(D);
  *phy_if_id_6(D) = _1;
  # DEBUG BEGIN_STMT

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

}


fci_owner_authorize (pfe_ct_phy_if_id_t sender, bool_t * auth_ret)
{
  <unnamed type> _1;
  _Bool _2;
  unsigned char _3;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG fci_context => &__context
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = fci_owner_context.lock_owner_if;
  _2 = _1 == sender_5(D);
  _3 = (unsigned char) _2;
  *auth_ret_6(D) = _3;
  # DEBUG BEGIN_STMT
  return 0;

}


fci_owner_session_cmd (pfe_ct_phy_if_id_t sender, uint32_t code, uint16_t * fci_ret)
{
  errno_t ret;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  *fci_ret_4(D) = 0;
  # DEBUG BEGIN_STMT
  switch (code_6(D)) <default: <L6> [33.33%], case 62720: <L0> [33.33%], case 62721: <L3> [33.33%]>

  <bb 3> [local count: 357878150]:
<L0>:
  # DEBUG BEGIN_STMT
  ret_12 = fci_owner_lock_cmd (sender_7(D), fci_ret_4(D));
  # DEBUG ret => ret_12
  # DEBUG BEGIN_STMT
  if (ret_12 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 4> [local count: 178939075]:
  # DEBUG BEGIN_STMT
  *fci_ret_4(D) = 65535;
  goto <bb 8>; [100.00%]

  <bb 5> [local count: 357878150]:
<L3>:
  # DEBUG BEGIN_STMT
  ret_9 = fci_owner_unlock_cmd (sender_7(D), fci_ret_4(D));
  # DEBUG ret => ret_9
  # DEBUG BEGIN_STMT
  if (ret_9 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 6> [local count: 178939075]:
  # DEBUG BEGIN_STMT
  *fci_ret_4(D) = 65535;
  goto <bb 8>; [100.00%]

  <bb 7> [local count: 357878150]:
<L6>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret_4(D) = 4;
  # DEBUG BEGIN_STMT

  <bb 8> [local count: 1073634451]:
  # ret_1 = PHI <ret_12(4), ret_9(6), 0(7), ret_12(3), ret_9(5)>
  # DEBUG ret => ret_1
  # DEBUG BEGIN_STMT
  return ret_1;

}


fci_owner_fini ()
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  oal_mutex_destroy (&fci_owner_context.fci_owner_mutex);
  return;

}


fci_owner_init (struct fci_init_info_t * info)
{
  <unnamed type> _1;
  pfe_fci_owner_hif_id_t iftmp.0_2;
  int _8;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = info_4(D)->hif_fci_owner_chnls_mask;
  if (_1 != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:

  <bb 4> [local count: 1073741824]:
  # iftmp.0_2 = PHI <_1(3), 31(2)>
  fci_owner_context.hif_fci_owner_chnls_mask = iftmp.0_2;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  fci_owner_context.lock_owner_if = 10;
  # DEBUG BEGIN_STMT
  fci_owner_context.fci_owner_mutex = 188;
  # DEBUG BEGIN_STMT
  # DEBUG mutex => &fci_owner_context.fci_owner_mutex
  # DEBUG INLINE_ENTRY oal_mutex_init
  # DEBUG BEGIN_STMT
  _8 = oal_mutex_init_internal (&fci_owner_context.fci_owner_mutex);
  # DEBUG mutex => NULL
  # DEBUG ret => _8
  # DEBUG BEGIN_STMT
  return _8;

}


oal_mutex_destroy (oal_mutex_t * mutex)
{
  errno_t _4;

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

}


