pfe_if_db_match_criterion.isra.0.part.0 (const pfe_if_db_type_t * ISRA.22, const union crit_arg_t * arg, const struct pfe_if_db_entry_t * entry)
{
  bool_t match;
  const struct pfe_if_db_t * db;
  pfe_if_db_get_criterion_t crit;
  <unnamed type> _2;
  char_t * _4;
  struct pfe_log_if_t * _6;
  const char_t * _7;
  int _8;
  _Bool _9;
  char_t * _11;
  struct pfe_phy_if_t * _12;
  char_t * _13;
  int _14;
  _Bool _15;

  <bb 6> [local count: 1073741824]:
  # DEBUG D#5 s=> crit
  # DEBUG crit => D#5

  <bb 2> [local count: 1073741824]:
<L0>:
  # DEBUG BEGIN_STMT
  _2 = *ISRA.22_1(D);
  if (_2 == 1)
    goto <bb 3>; [34.00%]
  else
    goto <bb 4>; [66.00%]

  <bb 3> [local count: 365072220]:
  # DEBUG BEGIN_STMT
  _4 = arg_3(D)->name;
  _6 = entry_5(D)->info.log_if;
  _7 = pfe_log_if_get_name (_6);
  _8 = strcmp (_4, _7);
  _9 = _8 == 0;
  match_10 = (bool_t) _9;
  # DEBUG match => match_10
  goto <bb 5>; [100.00%]

  <bb 4> [local count: 708669605]:
  # DEBUG BEGIN_STMT
  _11 = arg_3(D)->name;
  _12 = entry_5(D)->info.phy_if;
  _13 = pfe_phy_if_get_name (_12);
  _14 = strcmp (_11, _13);
  _15 = _14 == 0;
  match_16 = (bool_t) _15;
  # DEBUG match => match_16

  <bb 5> [local count: 1073741824]:
  # match_17 = PHI <match_10(3), match_16(4)>
<L1>:
  # DEBUG match => match_17
  # DEBUG BEGIN_STMT
  return match_17;

}


pfe_if_db_match_criterion.isra.0 (const pfe_if_db_type_t * ISRA.22, pfe_if_db_get_criterion_t crit, const union crit_arg_t * arg, const struct pfe_if_db_entry_t * entry)
{
  bool_t match;
  <unnamed type> _3;
  unsigned char _5;
  struct pfe_log_if_t * _7;
  unsigned char _8;
  _Bool _9;
  unsigned char _11;
  struct pfe_phy_if_t * _12;
  <unnamed type> _13;
  _Bool _14;
  void * _16;
  void * _17;
  _Bool _18;
  <unnamed type> _20;
  <unnamed type> _21;
  _Bool _22;

  <bb 2> [local count: 1073527120]:
  # DEBUG db s=> db
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  switch (crit_1(D)) <default: <L4> [16.67%], case 0: <L5> [16.67%], case 1: <L0> [16.67%], case 2: <L1> [16.67%], case 3: <L2> [16.67%], case 4: <L3> [16.67%]>

  <bb 3> [local count: 178956971]:
<L0>:
  # DEBUG BEGIN_STMT
  _3 = *ISRA.22_26(D);
  if (_3 == 1)
    goto <bb 4>; [34.00%]
  else
    goto <bb 5>; [66.00%]

  <bb 4> [local count: 60845370]:
  # DEBUG BEGIN_STMT
  _5 = arg_4(D)->if_id;
  _7 = entry_6(D)->info.log_if;
  _8 = pfe_log_if_get_id (_7);
  _9 = _5 == _8;
  match_10 = (bool_t) _9;
  # DEBUG match => match_10
  goto <bb 10>; [100.00%]

  <bb 5> [local count: 118111601]:
  # DEBUG BEGIN_STMT
  _11 = arg_4(D)->if_id;
  _12 = entry_6(D)->info.phy_if;
  _13 = pfe_phy_if_get_id (_12);
  _14 = _11 == _13;
  match_15 = (bool_t) _14;
  # DEBUG match => match_15
  goto <bb 10>; [100.00%]

  <bb 6> [local count: 178956971]:
<L1>:
  # DEBUG BEGIN_STMT
  _16 = arg_4(D)->iface;
  _17 = entry_6(D)->info.iface;
  _18 = _16 == _17;
  match_19 = (bool_t) _18;
  # DEBUG match => match_19
  # DEBUG BEGIN_STMT
  goto <bb 10>; [100.00%]

  <bb 7> [local count: 178921184]:
<L2>:
  # DEBUG D#4 => crit_1(D)
  match_27 = pfe_if_db_match_criterion.isra.0.part.0 (ISRA.22_26(D), arg_4(D), entry_6(D));
  goto <bb 10>; [100.00%]

  <bb 8> [local count: 178956971]:
<L3>:
  # DEBUG BEGIN_STMT
  _20 = arg_4(D)->owner;
  _21 = entry_6(D)->owner;
  _22 = _20 == _21;
  match_23 = (bool_t) _22;
  # DEBUG match => match_23
  # DEBUG BEGIN_STMT
  goto <bb 10>; [100.00%]

  <bb 9> [local count: 178956971]:
<L4>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG match => 0
  # DEBUG BEGIN_STMT

  <bb 10> [local count: 1073741824]:
  # match_24 = PHI <1(2), match_10(4), match_15(5), match_19(6), match_27(7), 0(9), match_23(8)>
<L5>:
  # DEBUG match => match_24
  # DEBUG BEGIN_STMT
  return match_24;

}


oal_mutex_unlock.isra.0 (const oal_mutex_t ISRA.17)
{
  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.17_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.15)
{
  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.15_10(D);
  if (_2 <= 255)
    goto <bb 3>; [65.00%]
  else
    goto <bb 5>; [35.00%]

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

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

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

}


pfe_if_db_unlock (uint32_t session_id)
{
  errno_t ret;
  unsigned char _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  short unsigned int _13;
  short unsigned int _14;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 120
  # DEBUG BEGIN_STMT
  _13 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#1 => &if_db_context.mutex
  oal_mutex_lock.isra.0 (_13);
  # DEBUG BEGIN_STMT
  _1 = if_db_context.is_locked;
  if (_1 == 1)
    goto <bb 3>; [48.89%]
  else
    goto <bb 5>; [51.11%]

  <bb 3> [local count: 524952378]:
  _2 = if_db_context.session_id;
  if (_2 == session_id_9(D))
    goto <bb 4>; [48.89%]
  else
    goto <bb 5>; [51.11%]

  <bb 4> [local count: 256649217]:
  # DEBUG BEGIN_STMT
  _3 = ~_2;
  _4 = _3 << 4;
  if_db_context.session_id = _4;
  # DEBUG BEGIN_STMT
  if_db_context.is_locked = 0;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 5> [local count: 1073741824]:
  # ret_5 = PHI <120(2), 120(3), 0(4)>
  # DEBUG ret => ret_5
  # DEBUG BEGIN_STMT
  _14 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#2 => &if_db_context.mutex
  oal_mutex_unlock.isra.0 (_14);
  # DEBUG BEGIN_STMT
  return ret_5;

}


pfe_if_db_lock_owned (uint32_t owner_id)
{
  errno_t ret;
  unsigned char _1;
  short unsigned int _10;
  short unsigned int _11;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 120
  # DEBUG BEGIN_STMT
  _10 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#1 => &if_db_context.mutex
  oal_mutex_lock.isra.0 (_10);
  # DEBUG BEGIN_STMT
  _1 = if_db_context.is_locked;
  if (_1 == 0)
    goto <bb 3>; [65.00%]
  else
    goto <bb 5>; [35.00%]

  <bb 3> [local count: 697932186]:
  if (owner_id_6(D) <= 15)
    goto <bb 4>; [65.00%]
  else
    goto <bb 5>; [35.00%]

  <bb 4> [local count: 453655921]:
  # DEBUG BEGIN_STMT
  if_db_context.session_id = owner_id_6(D);
  # DEBUG BEGIN_STMT
  if_db_context.is_locked = 1;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 5> [local count: 1073741824]:
  # ret_2 = PHI <120(2), 120(3), 0(4)>
  # DEBUG ret => ret_2
  # DEBUG BEGIN_STMT
  _11 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#2 => &if_db_context.mutex
  oal_mutex_unlock.isra.0 (_11);
  # DEBUG BEGIN_STMT
  return ret_2;

}


pfe_if_db_lock (uint32_t * session_id)
{
  errno_t ret;
  unsigned char _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  short unsigned int _15;
  short unsigned int _16;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _15 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#1 => &if_db_context.mutex
  oal_mutex_lock.isra.0 (_15);
  # DEBUG BEGIN_STMT
  _1 = if_db_context.is_locked;
  if (_1 == 0)
    goto <bb 3>; [65.00%]
  else
    goto <bb 4>; [35.00%]

  <bb 3> [local count: 697932186]:
  # DEBUG BEGIN_STMT
  _2 = if_db_context.seed;
  _3 = _2 + 1;
  if_db_context.seed = _3;
  # DEBUG BEGIN_STMT
  _4 = _3 << 4;
  if_db_context.session_id = _4;
  # DEBUG BEGIN_STMT
  *session_id_11(D) = _4;
  # DEBUG BEGIN_STMT
  if_db_context.is_locked = 1;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 4> [local count: 1073741824]:
  # ret_5 = PHI <0(3), 120(2)>
  # DEBUG ret => ret_5
  # DEBUG BEGIN_STMT
  _16 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#2 => &if_db_context.mutex
  oal_mutex_unlock.isra.0 (_16);
  # DEBUG BEGIN_STMT
  return ret_5;

}


pfe_log_if_db_drop_all (const struct pfe_if_db_t * db, uint32_t session_id)
{
  errno_t ret;
  const struct pfe_if_db_entry_t * entry;
  struct LLIST_t * aux;
  struct LLIST_t * curItem;
  int _1;
  int _2;
  struct LLIST_Struct * _3;
  struct LLIST_Struct * _4;
  struct LLIST_Struct * _5;
  const struct LLIST_t * _6;
  short unsigned int _26;
  short unsigned int _27;

  <bb 2> [local count: 181710154]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _26 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#1 => &if_db_context.mutex
  oal_mutex_lock.isra.0 (_26);
  # DEBUG BEGIN_STMT
  _1 = pfe_if_db_check_precondition (&if_db_context, session_id_14(D));
  if (_1 != 0)
    goto <bb 6>; [35.00%]
  else
    goto <bb 3>; [65.00%]

  <bb 3> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  curItem_16 = db_15(D)->theList.prNext;
  # DEBUG curItem => curItem_16
  aux_17 = curItem_16->prNext;
  # DEBUG aux => aux_17
  goto <bb 5>; [100.00%]

  <bb 4> [local count: 955630224]:
  # DEBUG BEGIN_STMT
  _2 = curItem_7 - 8B;
  entry_18 = (const struct pfe_if_db_entry_t *) _2;
  # DEBUG entry => entry_18
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = curItem_7->prPrev;
  _4 = curItem_7->prNext;
  _3->prNext = _4;
  # DEBUG BEGIN_STMT
  _5 = curItem_7->prNext;
  _5->prPrev = _3;
  # DEBUG BEGIN_STMT
  curItem_7->prPrev = 0B;
  # DEBUG BEGIN_STMT
  curItem_7->prNext = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  oal_mm_free (entry_18);
  # DEBUG BEGIN_STMT
  # DEBUG curItem => aux_8
  aux_24 = aux_8->prNext;
  # DEBUG aux => aux_24

  <bb 5> [local count: 1073741824]:
  # curItem_7 = PHI <curItem_16(3), aux_8(4)>
  # aux_8 = PHI <aux_17(3), aux_24(4)>
  # DEBUG aux => aux_8
  # DEBUG curItem => curItem_7
  # DEBUG BEGIN_STMT
  _6 = &db_15(D)->theList;
  if (_6 != curItem_7)
    goto <bb 4>; [89.00%]
  else
    goto <bb 6>; [11.00%]

  <bb 6> [local count: 181710155]:
  # ret_9 = PHI <115(2), 0(5)>
  # DEBUG ret => ret_9
  # DEBUG BEGIN_STMT
  _27 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#2 => &if_db_context.mutex
  oal_mutex_unlock.isra.0 (_27);
  # DEBUG BEGIN_STMT
  return ret_9;

}


pfe_if_db_get_next (struct pfe_if_db_t * db, uint32_t session_id, struct pfe_if_db_entry_t * * db_entry)
{
  errno_t ret;
  struct pfe_if_db_entry_t * entry;
  int _1;
  struct LLIST_Struct * _2;
  struct LLIST_t * _3;
  struct LLIST_t * _4;
  int _5;
  struct LLIST_Struct * _6;
  <unnamed type> _7;
  union crit_arg_t * _8;
  unsigned char _9;
  struct LLIST_t * _10;
  short unsigned int _27;
  short unsigned int _28;

  <bb 2> [local count: 308072886]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _27 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#1 => &if_db_context.mutex
  oal_mutex_lock.isra.0 (_27);
  # DEBUG BEGIN_STMT
  _1 = pfe_if_db_check_precondition (&if_db_context, session_id_20(D));
  if (_1 != 0)
    goto <bb 10>; [35.00%]
  else
    goto <bb 3>; [65.00%]

  <bb 3> [local count: 200247376]:
  # DEBUG BEGIN_STMT
  # DEBUG entry => 0B
  # DEBUG BEGIN_STMT
  _2 = db_21(D)->theList.prNext;
  _3 = &db_21(D)->theList;
  if (_2 != _3)
    goto <bb 4>; [70.00%]
  else
    goto <bb 9>; [30.00%]

  <bb 4> [local count: 140173163]:
  # DEBUG BEGIN_STMT
  _4 = db_21(D)->cur_item;
  if (_3 == _4)
    goto <bb 9>; [30.00%]
  else
    goto <bb 11>; [70.00%]

  <bb 11> [local count: 98121214]:
  goto <bb 8>; [100.00%]

  <bb 5> [local count: 1014686024]:
  # DEBUG BEGIN_STMT
  _5 = _10 - 8B;
  entry_22 = (struct pfe_if_db_entry_t *) _5;
  # DEBUG entry => entry_22
  # DEBUG BEGIN_STMT
  _6 = _10->prNext;
  db_21(D)->cur_item = _6;
  # DEBUG BEGIN_STMT
  if (_10 != 8B)
    goto <bb 6>; [70.00%]
  else
    goto <bb 7>; [30.00%]

  <bb 6> [local count: 710280217]:
  # DEBUG BEGIN_STMT
  _7 = db_21(D)->cur_crit;
  _8 = &db_21(D)->cur_crit_arg;
  # DEBUG D#3 => db_21(D)
  _9 = pfe_if_db_match_criterion.isra.0 (db_21(D), _7, _8, entry_22);
  if (_9 == 1)
    goto <bb 9>; [5.50%]
  else
    goto <bb 7>; [94.50%]

  <bb 7> [local count: 975620612]:
  # entry_11 = PHI <entry_22(5), 0B(6)>

  <bb 8> [local count: 1073741824]:
  # entry_12 = PHI <entry_11(7), 0B(11)>
  # DEBUG entry => entry_12
  # DEBUG BEGIN_STMT
  _10 = db_21(D)->cur_item;
  if (_3 != _10)
    goto <bb 5>; [94.50%]
  else
    goto <bb 9>; [5.50%]

  <bb 9> [local count: 200247374]:
  # entry_13 = PHI <0B(3), 0B(4), entry_22(6), entry_12(8)>
  # DEBUG entry => entry_13
  # DEBUG BEGIN_STMT
  *db_entry_24(D) = entry_13;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 10> [local count: 308072885]:
  # ret_14 = PHI <115(2), 0(9)>
  # DEBUG ret => ret_14
  # DEBUG BEGIN_STMT
  _28 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#2 => &if_db_context.mutex
  oal_mutex_unlock.isra.0 (_28);
  # DEBUG BEGIN_STMT
  return ret_14;

}


pfe_if_db_get_single (const struct pfe_if_db_t * db, uint32_t session_id, pfe_if_db_get_criterion_t crit, void * arg, struct pfe_if_db_entry_t * * db_entry)
{
  errno_t ret;
  union crit_arg_t argument;
  int arg.12_1;
  unsigned char _2;
  int arg.13_3;
  <unnamed type> _4;
  int _5;
  struct pfe_if_db_entry_t * _6;
  short unsigned int _24;
  short unsigned int _25;

  <bb 2> [local count: 1073527122]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  switch (crit_10(D)) <default: <L18> [16.67%], case 0: <L19> [16.67%], case 1: <L1> [16.67%], case 2: <L2> [16.67%], case 3: <L3> [16.67%], case 4: <L4> [16.67%]>

  <bb 3> [local count: 178956971]:
<L1>:
  # DEBUG BEGIN_STMT
  arg.12_1 = (int) arg_12(D);
  _2 = (unsigned char) arg.12_1;
  argument.if_id = _2;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  goto <bb 7>; [100.00%]

  <bb 4> [local count: 178956971]:
<L2>:
  # DEBUG BEGIN_STMT
  argument.iface = arg_12(D);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  goto <bb 7>; [100.00%]

  <bb 5> [local count: 178956971]:
<L3>:
  # DEBUG BEGIN_STMT
  argument.name = arg_12(D);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  goto <bb 7>; [100.00%]

  <bb 6> [local count: 178956971]:
<L4>:
  # DEBUG BEGIN_STMT
  arg.13_3 = (int) arg_12(D);
  _4 = (<unnamed type>) arg.13_3;
  argument.owner = _4;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT

  <bb 7> [local count: 894784856]:
<L19>:
  # DEBUG ret => NULL
  # DEBUG BEGIN_STMT
  _24 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#1 => &if_db_context.mutex
  oal_mutex_lock.isra.0 (_24);
  # DEBUG BEGIN_STMT
  _5 = pfe_if_db_check_precondition (&if_db_context, session_id_18(D));
  if (_5 != 0)
    goto <bb 9>; [67.00%]
  else
    goto <bb 8>; [33.00%]

  <bb 8> [local count: 295279002]:
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = pfe_if_db_get_single_entry (db_19(D), crit_10(D), argument);
  *db_entry_20(D) = _6;

  <bb 9> [local count: 894784855]:
  # ret_26 = PHI <115(7), 0(8)>
  # DEBUG ret => NULL
  # DEBUG BEGIN_STMT
  _25 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#2 => &if_db_context.mutex
  oal_mutex_unlock.isra.0 (_25);

  <bb 10> [local count: 1073741824]:
  # ret_7 = PHI <115(2), ret_26(9)>
<L18>:
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  argument ={v} {CLOBBER};
  return ret_7;

}


pfe_if_db_get_first (struct pfe_if_db_t * db, uint32_t session_id, pfe_if_db_get_criterion_t crit, void * arg, struct pfe_if_db_entry_t * * db_entry)
{
  errno_t ret;
  int _1;
  int arg.10_2;
  unsigned char _3;
  int arg.11_4;
  <unnamed type> _5;
  struct pfe_if_db_entry_t * _6;
  short unsigned int _24;
  short unsigned int _25;

  <bb 2> [local count: 1073602255]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  _24 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#1 => &if_db_context.mutex
  oal_mutex_lock.isra.0 (_24);
  # DEBUG BEGIN_STMT
  _1 = pfe_if_db_check_precondition (&if_db_context, session_id_11(D));
  if (_1 != 0)
    goto <bb 9>; [35.00%]
  else
    goto <bb 3>; [65.00%]

  <bb 3> [local count: 697841466]:
  # DEBUG BEGIN_STMT
  db_12(D)->cur_crit = crit_13(D);
  # DEBUG BEGIN_STMT
  switch (crit_13(D)) <default: <L16> [16.67%], case 0: <L17> [16.67%], case 1: <L3> [16.67%], case 2: <L4> [16.67%], case 3: <L5> [16.67%], case 4: <L6> [16.67%]>

  <bb 4> [local count: 116330172]:
<L3>:
  # DEBUG BEGIN_STMT
  arg.10_2 = (int) arg_15(D);
  _3 = (unsigned char) arg.10_2;
  db_12(D)->cur_crit_arg.if_id = _3;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  goto <bb 8>; [100.00%]

  <bb 5> [local count: 116330172]:
<L4>:
  # DEBUG BEGIN_STMT
  db_12(D)->cur_crit_arg.iface = arg_15(D);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  goto <bb 8>; [100.00%]

  <bb 6> [local count: 116330172]:
<L5>:
  # DEBUG BEGIN_STMT
  db_12(D)->cur_crit_arg.name = arg_15(D);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  goto <bb 8>; [100.00%]

  <bb 7> [local count: 116330172]:
<L6>:
  # DEBUG BEGIN_STMT
  arg.11_4 = (int) arg_15(D);
  _5 = (<unnamed type>) arg.11_4;
  db_12(D)->cur_crit_arg.owner = _5;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT

  <bb 8> [local count: 581650862]:
<L17>:
  # DEBUG ret => NULL
  # DEBUG BEGIN_STMT
  _6 = pfe_if_db_get_first_entry (db_12(D));
  *db_entry_21(D) = _6;

  <bb 9> [local count: 1073741824]:
  # ret_7 = PHI <115(2), 115(3), 0(8)>
<L16>:
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  _25 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#2 => &if_db_context.mutex
  oal_mutex_unlock.isra.0 (_25);
  # DEBUG BEGIN_STMT
  return ret_7;

}


pfe_if_db_remove (struct pfe_if_db_t * db, uint32_t session_id, struct pfe_if_db_entry_t * entry)
{
  errno_t ret;
  int _1;
  struct LLIST_t * _2;
  struct LLIST_t * _3;
  struct LLIST_Struct * _4;
  struct LLIST_Struct * _5;
  struct LLIST_Struct * _6;
  struct LLIST_Struct * _7;
  short unsigned int _23;
  short unsigned int _24;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _23 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#1 => &if_db_context.mutex
  oal_mutex_lock.isra.0 (_23);
  # DEBUG BEGIN_STMT
  _1 = pfe_if_db_check_precondition (&if_db_context, session_id_13(D));
  if (_1 != 0)
    goto <bb 6>; [35.00%]
  else
    goto <bb 3>; [65.00%]

  <bb 3> [local count: 697932186]:
  # DEBUG BEGIN_STMT
  _2 = &entry_14(D)->list_member;
  _3 = db_15(D)->cur_item;
  if (_2 == _3)
    goto <bb 4>; [30.00%]
  else
    goto <bb 5>; [70.00%]

  <bb 4> [local count: 209379656]:
  # DEBUG BEGIN_STMT
  _4 = _3->prNext;
  db_15(D)->cur_item = _4;

  <bb 5> [local count: 697932186]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = entry_14(D)->list_member.prPrev;
  _6 = entry_14(D)->list_member.prNext;
  _5->prNext = _6;
  # DEBUG BEGIN_STMT
  _7 = entry_14(D)->list_member.prNext;
  _7->prPrev = _5;
  # DEBUG BEGIN_STMT
  entry_14(D)->list_member.prPrev = 0B;
  # DEBUG BEGIN_STMT
  entry_14(D)->list_member.prNext = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  oal_mm_free (entry_14(D));
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 6> [local count: 1073741824]:
  # ret_8 = PHI <115(2), 0(5)>
  # DEBUG ret => ret_8
  # DEBUG BEGIN_STMT
  _24 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#2 => &if_db_context.mutex
  oal_mutex_unlock.isra.0 (_24);
  # DEBUG BEGIN_STMT
  return ret_8;

}


pfe_if_db_add (struct pfe_if_db_t * db, uint32_t session_id, void * iface, pfe_ct_phy_if_id_t owner)
{
  errno_t ret;
  struct pfe_if_db_entry_t * new_entry;
  int _1;
  struct pfe_if_db_entry_t * new_entry.0_2;
  void * _3;
  struct pfe_if_db_entry_t * new_entry.3_4;
  struct LLIST_Struct * _5;
  struct LLIST_t * _6;
  struct LLIST_t * _7;
  short unsigned int _32;
  short unsigned int _33;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  new_entry = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_18 = pfe_if_db_get_first (db_14(D), session_id_15(D), 2, iface_16(D), &new_entry);
  # DEBUG ret => ret_18
  # DEBUG BEGIN_STMT
  _32 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#1 => &if_db_context.mutex
  oal_mutex_lock.isra.0 (_32);
  # DEBUG BEGIN_STMT
  _1 = pfe_if_db_check_precondition (&if_db_context, session_id_15(D));
  if (_1 != 0)
    goto <bb 9>; [35.00%]
  else
    goto <bb 3>; [65.00%]

  <bb 3> [local count: 697932186]:
  # DEBUG BEGIN_STMT
  new_entry.0_2 = new_entry;
  if (new_entry.0_2 == 0B)
    goto <bb 4>; [30.00%]
  else
    goto <bb 7>; [70.00%]

  <bb 4> [local count: 209379656]:
  if (ret_18 == 0)
    goto <bb 5>; [33.00%]
  else
    goto <bb 7>; [67.00%]

  <bb 5> [local count: 69095286]:
  # DEBUG BEGIN_STMT
  _3 = oal_mm_malloc (16);
  new_entry = _3;
  # DEBUG BEGIN_STMT
  if (_3 == 0B)
    goto <bb 7>; [46.53%]
  else
    goto <bb 6>; [53.47%]

  <bb 6> [local count: 36945250]:
  # DEBUG BEGIN_STMT
  memset (_3, 0, 16);

  <bb 7> [local count: 697932186]:
  # ret_8 = PHI <0(6), 115(4), 11(5), 115(3)>
  # DEBUG ret => ret_8
  # DEBUG BEGIN_STMT
  new_entry.3_4 = new_entry;
  if (new_entry.3_4 != 0B)
    goto <bb 8>; [70.00%]
  else
    goto <bb 9>; [30.00%]

  <bb 8> [local count: 488552529]:
  # DEBUG BEGIN_STMT
  new_entry.3_4->info.iface = iface_16(D);
  # DEBUG BEGIN_STMT
  new_entry.3_4->owner = owner_24(D);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = db_14(D)->theList.prPrev;
  new_entry.3_4->list_member.prPrev = _5;
  # DEBUG BEGIN_STMT
  _6 = &db_14(D)->theList;
  new_entry.3_4->list_member.prNext = _6;
  # DEBUG BEGIN_STMT
  _7 = &new_entry.3_4->list_member;
  _5->prNext = _7;
  # DEBUG BEGIN_STMT
  db_14(D)->theList.prPrev = _7;

  <bb 9> [local count: 1073741824]:
  # ret_9 = PHI <115(2), ret_8(7), ret_8(8)>
  # DEBUG ret => ret_9
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _33 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#2 => &if_db_context.mutex
  oal_mutex_unlock.isra.0 (_33);
  # DEBUG BEGIN_STMT
  new_entry ={v} {CLOBBER};
  return ret_9;

}


__attribute__((pure))
pfe_if_db_entry_get_log_if (const struct pfe_if_db_entry_t * entry)
{
  struct pfe_log_if_t * log_if_entry;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (entry_2(D) != 0B)
    goto <bb 3>; [85.10%]
  else
    goto <bb 4>; [14.90%]

  <bb 3> [local count: 913754293]:
  # DEBUG BEGIN_STMT
  log_if_entry_4 = entry_2(D)->info.log_if;
  # DEBUG log_if_entry => log_if_entry_4

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

}


__attribute__((pure))
pfe_if_db_entry_get_phy_if (const struct pfe_if_db_entry_t * entry)
{
  struct pfe_phy_if_t * phy_if_entry;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (entry_2(D) != 0B)
    goto <bb 3>; [85.10%]
  else
    goto <bb 4>; [14.90%]

  <bb 3> [local count: 913754293]:
  # DEBUG BEGIN_STMT
  phy_if_entry_4 = entry_2(D)->info.phy_if;
  # DEBUG phy_if_entry => phy_if_entry_4

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

}


pfe_if_db_destroy (const struct pfe_if_db_t * db)
{
  unsigned char _1;
  unsigned char _2;
  unsigned char _3;
  short unsigned int _12;
  short unsigned int _13;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = if_db_context.ref_cnt;
  if (_1 != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  _2 = _1 + 255;
  if_db_context.ref_cnt = _2;

  <bb 4> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _3 = if_db_context.ref_cnt;
  if (_3 == 0)
    goto <bb 5>; [33.00%]
  else
    goto <bb 6>; [67.00%]

  <bb 5> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  _12 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#1 => &if_db_context.mutex
  oal_mutex_lock.isra.0 (_12);
  # DEBUG BEGIN_STMT
  if_db_context.is_locked = 1;
  # DEBUG BEGIN_STMT
  _13 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#2 => &if_db_context.mutex
  oal_mutex_unlock.isra.0 (_13);
  # DEBUG BEGIN_STMT
  oal_mutex_destroy (&if_db_context.mutex);

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

}


pfe_if_db_create (pfe_if_db_type_t type)
{
  struct pfe_if_db_t * db;
  _Bool _1;
  long int _2;
  long int _3;
  int _4;
  struct LLIST_t * _5;
  unsigned char _6;
  unsigned char _7;
  unsigned char _8;
  short unsigned int _28;
  short unsigned int _29;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = type_12(D) > 1;
  _2 = (long int) _1;
  _3 = __builtin_expect (_2, 0);
  if (_3 != 0)
    goto <bb 6>; [10.00%]
  else
    goto <bb 3>; [90.00%]

  <bb 3> [local count: 966367642]:
  # DEBUG BEGIN_STMT
  _4 = (int) type_12(D);
  db_13 = &xxx_if_db_instance[_4];
  # DEBUG db => db_13
  # DEBUG BEGIN_STMT
  memset (db_13, 0, 24);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = &MEM[(struct pfe_if_db_t *)&xxx_if_db_instance][_4].theList;
  MEM[(struct pfe_if_db_t *)&xxx_if_db_instance][_4].theList.prNext = _5;
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_if_db_t *)&xxx_if_db_instance][_4].theList.prPrev = _5;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_if_db_t *)&xxx_if_db_instance][_4].cur_item = _5;
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_if_db_t *)&xxx_if_db_instance][_4].type = type_12(D);
  # DEBUG BEGIN_STMT
  _6 = if_db_context.ref_cnt;
  if (_6 == 0)
    goto <bb 4>; [33.00%]
  else
    goto <bb 5>; [67.00%]

  <bb 4> [local count: 318901322]:
  # DEBUG BEGIN_STMT
  if_db_context.mutex = 170;
  # DEBUG BEGIN_STMT
  oal_mutex_init (&if_db_context.mutex);
  # DEBUG BEGIN_STMT
  _28 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#1 => &if_db_context.mutex
  oal_mutex_lock.isra.0 (_28);
  # DEBUG BEGIN_STMT
  if_db_context.is_locked = 0;
  # DEBUG BEGIN_STMT
  if_db_context.session_id = 0;
  # DEBUG BEGIN_STMT
  if_db_context.seed = 123;
  # DEBUG BEGIN_STMT
  _29 = MEM[(const oal_mutex_t *)&if_db_context + 8B];
  # DEBUG D#2 => &if_db_context.mutex
  oal_mutex_unlock.isra.0 (_29);

  <bb 5> [local count: 966367642]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _7 = if_db_context.ref_cnt;
  _8 = _7 + 1;
  if_db_context.ref_cnt = _8;

  <bb 6> [local count: 1073741824]:
  # db_9 = PHI <0B(2), db_13(5)>
  # DEBUG db => db_9
  # DEBUG BEGIN_STMT
  return db_9;

}


pfe_if_db_get_single_entry (const struct pfe_if_db_t * db, pfe_if_db_get_criterion_t crit, union crit_arg_t argument)
{
  struct LLIST_t * curItem;
  bool_t match;
  struct pfe_if_db_entry_t * entry;
  struct LLIST_Struct * _1;
  const struct LLIST_t * _2;
  int _3;
  unsigned char _4;

  <bb 2> [local count: 115301074]:
  # DEBUG BEGIN_STMT
  # DEBUG entry => 0B
  # DEBUG BEGIN_STMT
  # DEBUG match => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = db_12(D)->theList.prNext;
  _2 = &db_12(D)->theList;
  if (_1 != _2)
    goto <bb 6>; [85.10%]
  else
    goto <bb 9>; [14.90%]

  <bb 3> [local count: 1014686024]:
  # DEBUG BEGIN_STMT
  _3 = curItem_9 - 8B;
  entry_13 = (struct pfe_if_db_entry_t *) _3;
  # DEBUG entry => entry_13
  # DEBUG BEGIN_STMT
  if (curItem_9 != 8B)
    goto <bb 4>; [70.00%]
  else
    goto <bb 5>; [30.00%]

  <bb 4> [local count: 710280216]:
  # DEBUG BEGIN_STMT
  # DEBUG D#3 => db_12(D)
  _4 = pfe_if_db_match_criterion.isra.0 (db_12(D), crit_14(D), &argument, entry_13);
  if (_4 == 1)
    goto <bb 7>; [5.50%]
  else
    goto <bb 5>; [94.50%]

  <bb 5> [local count: 975620611]:
  # DEBUG BEGIN_STMT
  curItem_15 = curItem_9->prNext;
  # DEBUG curItem => curItem_15

  <bb 6> [local count: 1073741824]:
  # entry_5 = PHI <entry_13(5), 0B(2)>
  # curItem_9 = PHI <curItem_15(5), _1(2)>
  # DEBUG curItem => curItem_9
  # DEBUG entry => entry_5
  # DEBUG BEGIN_STMT
  if (_2 != curItem_9)
    goto <bb 3>; [94.50%]
  else
    goto <bb 7>; [5.50%]

  <bb 7> [local count: 98121212]:
  # entry_6 = PHI <entry_5(6), entry_13(4)>
  # match_8 = PHI <0(6), 1(4)>
  # DEBUG match => match_8
  # DEBUG entry => entry_6
  # DEBUG BEGIN_STMT
  if (match_8 == 0)
    goto <bb 8>; [29.00%]
  else
    goto <bb 9>; [71.00%]

  <bb 8> [local count: 28455152]:

  <bb 9> [local count: 115301072]:
  # entry_7 = PHI <entry_6(7), 0B(2), 0B(8)>
  # DEBUG match => NULL
  # DEBUG entry => entry_7
  # DEBUG BEGIN_STMT
  return entry_7;

}


pfe_if_db_get_first_entry (struct pfe_if_db_t * db)
{
  struct pfe_if_db_entry_t * entry;
  struct LLIST_t * curItem;
  bool_t match;
  struct LLIST_Struct * _1;
  struct LLIST_t * _2;
  int _3;
  struct LLIST_Struct * _4;
  <unnamed type> _5;
  union crit_arg_t * _6;
  unsigned char _7;

  <bb 2> [local count: 115301074]:
  # DEBUG BEGIN_STMT
  # DEBUG match => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG entry => 0B
  # DEBUG BEGIN_STMT
  _1 = db_16(D)->theList.prNext;
  _2 = &db_16(D)->theList;
  if (_1 != _2)
    goto <bb 10>; [85.10%]
  else
    goto <bb 9>; [14.90%]

  <bb 10> [local count: 98121214]:
  goto <bb 6>; [100.00%]

  <bb 3> [local count: 1014686024]:
  # DEBUG BEGIN_STMT
  _3 = curItem_9 - 8B;
  entry_17 = (struct pfe_if_db_entry_t *) _3;
  # DEBUG entry => entry_17
  # DEBUG BEGIN_STMT
  _4 = curItem_9->prNext;
  db_16(D)->cur_item = _4;
  # DEBUG BEGIN_STMT
  if (curItem_9 != 8B)
    goto <bb 4>; [70.00%]
  else
    goto <bb 5>; [30.00%]

  <bb 4> [local count: 710280216]:
  # DEBUG BEGIN_STMT
  _5 = db_16(D)->cur_crit;
  _6 = &db_16(D)->cur_crit_arg;
  # DEBUG D#3 => db_16(D)
  _7 = pfe_if_db_match_criterion.isra.0 (db_16(D), _5, _6, entry_17);
  if (_7 == 1)
    goto <bb 7>; [5.50%]
  else
    goto <bb 5>; [94.50%]

  <bb 5> [local count: 975620611]:
  # DEBUG BEGIN_STMT
  curItem_19 = curItem_9->prNext;
  # DEBUG curItem => curItem_19

  <bb 6> [local count: 1073741824]:
  # curItem_9 = PHI <curItem_19(5), _1(10)>
  # entry_10 = PHI <entry_17(5), 0B(10)>
  # DEBUG entry => entry_10
  # DEBUG curItem => curItem_9
  # DEBUG BEGIN_STMT
  if (_2 != curItem_9)
    goto <bb 3>; [94.50%]
  else
    goto <bb 7>; [5.50%]

  <bb 7> [local count: 98121212]:
  # match_8 = PHI <0(6), 1(4)>
  # entry_11 = PHI <entry_10(6), entry_17(4)>
  # DEBUG entry => entry_11
  # DEBUG match => match_8
  # DEBUG BEGIN_STMT
  if (match_8 == 0)
    goto <bb 8>; [29.00%]
  else
    goto <bb 9>; [71.00%]

  <bb 8> [local count: 28455152]:

  <bb 9> [local count: 115301072]:
  # entry_12 = PHI <entry_11(7), 0B(2), 0B(8)>
  # DEBUG match => NULL
  # DEBUG entry => entry_12
  # DEBUG BEGIN_STMT
  return entry_12;

}


pfe_if_db_check_precondition (const struct if_db_context_t * pr_if_db_context, uint32_t session_id)
{
  errno_t ret;
  unsigned char _1;
  long unsigned int _2;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pr_if_db_context_5(D)->is_locked;
  if (_1 == 0)
    goto <bb 5>; [35.00%]
  else
    goto <bb 3>; [65.00%]

  <bb 3> [local count: 697932186]:
  # DEBUG BEGIN_STMT
  _2 = pr_if_db_context_5(D)->session_id;
  if (_2 != session_id_6(D))
    goto <bb 5>; [51.11%]
  else
    goto <bb 4>; [48.89%]

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

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

}


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;

}


oal_mutex_init (oal_mutex_t * mutex)
{
  errno_t _4;

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

}


