pfe_mac_db_criterion_eval.part.0 (const struct pfe_mac_db_list_entry_t * entry, pfe_mac_type_t type, pfe_drv_id_t owner)
{
  bool_t ret;
  pfe_mac_db_crit_t crit;
  <unnamed type> _2;
  const uint8_t[6] * _4;

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

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _2 = entry_1(D)->owner;
  if (_2 == owner_3(D))
    goto <bb 3>; [34.00%]
  else
    goto <bb 4>; [66.00%]

  <bb 3> [local count: 365072220]:
  # DEBUG BEGIN_STMT
  _4 = &entry_1(D)->addr;
  ret_6 = pfe_emac_check_crit_by_type (_4, type_5(D));
  # DEBUG ret => ret_6

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

}


pfe_emac_check_crit_by_type.part.0 (const uint8_t * addr)
{
  bool_t ret;
  pfe_mac_type_t type;
  unsigned char _2;

  <bb 5> [local count: 1073741824]:
  # DEBUG D#4 s=> type
  # DEBUG type => D#4

  <bb 2> [local count: 1073741824]:
  _2 = pfe_emac_is_multi (addr_1(D));
  if (_2 == 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:

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

}


oal_mutex_unlock.isra.0 (const oal_mutex_t ISRA.3)
{
  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.3_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.1)
{
  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.1_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_mac_db_get_next_addr (struct pfe_mac_db_t * db, uint8_t * addr)
{
  struct LLIST_t * item;
  const struct pfe_mac_db_list_entry_t * entry;
  errno_t ret;
  int _1;
  <unnamed type> _2;
  <unnamed type> _3;
  <unnamed type> _4;
  unsigned char _5;
  struct LLIST_t * _6;
  struct LLIST_Struct * _7;
  struct LLIST_t * _8;
  struct LLIST_t * _9;
  const uint8_t[6] * _10;
  struct LLIST_Struct * _11;
  short unsigned int _28;
  short unsigned int _29;

  <bb 2> [local count: 98121214]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG entry => 0B
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#17 => &db_17(D)->lock
  _28 = MEM[(const oal_mutex_t *)db_17(D) + 12B];
  # DEBUG D#1 => D#17
  oal_mutex_lock.isra.0 (_28);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  item_20 = db_17(D)->iterator;
  # DEBUG item => item_20
  # DEBUG BEGIN_STMT
  goto <bb 6>; [100.00%]

  <bb 3> [local count: 1014686024]:
  # DEBUG BEGIN_STMT
  _1 = item_20 - 6B;
  entry_21 = (const struct pfe_mac_db_list_entry_t *) _1;
  # DEBUG entry => entry_21
  # DEBUG BEGIN_STMT
  if (item_20 != 6B)
    goto <bb 4>; [70.00%]
  else
    goto <bb 5>; [30.00%]

  <bb 4> [local count: 710280217]:
  # DEBUG BEGIN_STMT
  _2 = db_17(D)->crit.crit;
  _3 = db_17(D)->crit.type;
  _4 = db_17(D)->crit.owner;
  _5 = pfe_mac_db_criterion_eval (entry_21, _2, _3, _4);
  if (_5 == 1)
    goto <bb 7>; [5.50%]
  else
    goto <bb 5>; [94.50%]

  <bb 5> [local count: 975620612]:
  # DEBUG BEGIN_STMT
  _7 = _8->prNext;
  db_17(D)->iterator = _7;

  <bb 6> [local count: 1073741824]:
  # entry_13 = PHI <0B(2), entry_21(5)>
  # DEBUG entry => entry_13
  # DEBUG BEGIN_STMT
  _8 = db_17(D)->iterator;
  _9 = &db_17(D)->mac_list;
  if (_8 != _9)
    goto <bb 3>; [94.50%]
  else
    goto <bb 7>; [5.50%]

  <bb 7> [local count: 98121212]:
  # entry_14 = PHI <entry_21(4), entry_13(6)>
  # _6 = PHI <_9(4), _9(6)>
  # DEBUG entry => entry_14
  # DEBUG BEGIN_STMT
  if (entry_14 != 0B)
    goto <bb 8>; [68.09%]
  else
    goto <bb 9>; [31.91%]

  <bb 8> [local count: 66810733]:
  # DEBUG BEGIN_STMT
  _10 = &entry_14->addr;
  memcpy (addr_24(D), _10, 6);
  # DEBUG BEGIN_STMT
  _11 = item_20->prNext;
  db_17(D)->iterator = _11;
  goto <bb 10>; [100.00%]

  <bb 9> [local count: 31310479]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 2
  # DEBUG BEGIN_STMT
  db_17(D)->iterator = _6;

  <bb 10> [local count: 98121212]:
  # ret_12 = PHI <0(8), 2(9)>
  # DEBUG ret => ret_12
  # DEBUG BEGIN_STMT
  # DEBUG D#18 => &db_17(D)->lock
  _29 = MEM[(const oal_mutex_t *)db_17(D) + 12B];
  # DEBUG D#2 => D#18
  oal_mutex_unlock.isra.0 (_29);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  return ret_12;

}


pfe_mac_db_get_first_addr (struct pfe_mac_db_t * db, pfe_mac_db_crit_t crit, pfe_mac_type_t type, pfe_drv_id_t owner, uint8_t * addr)
{
  struct LLIST_t * item;
  const struct pfe_mac_db_list_entry_t * entry;
  errno_t ret;
  struct LLIST_Struct * _1;
  struct LLIST_t * _2;
  int _3;
  unsigned char _4;
  const uint8_t[6] * _5;
  struct LLIST_Struct * _6;
  short unsigned int _32;
  short unsigned int _33;

  <bb 2> [local count: 140173163]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG entry => 0B
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#15 => &db_16(D)->lock
  _32 = MEM[(const oal_mutex_t *)db_16(D) + 12B];
  # DEBUG D#1 => D#15
  oal_mutex_lock.isra.0 (_32);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = db_16(D)->mac_list.prNext;
  _2 = &db_16(D)->mac_list;
  if (_1 == _2)
    goto <bb 7>; [30.00%]
  else
    goto <bb 10>; [70.00%]

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

  <bb 3> [local count: 1014686024]:
  # DEBUG BEGIN_STMT
  _3 = item_11 - 6B;
  entry_19 = (const struct pfe_mac_db_list_entry_t *) _3;
  # DEBUG entry => entry_19
  # DEBUG BEGIN_STMT
  if (item_11 != 6B)
    goto <bb 4>; [70.00%]
  else
    goto <bb 5>; [30.00%]

  <bb 4> [local count: 710280217]:
  # DEBUG BEGIN_STMT
  _4 = pfe_mac_db_criterion_eval (entry_19, crit_20(D), type_21(D), owner_22(D));
  if (_4 == 1)
    goto <bb 7>; [5.50%]
  else
    goto <bb 5>; [94.50%]

  <bb 5> [local count: 975620611]:
  # DEBUG BEGIN_STMT
  item_23 = item_11->prNext;
  # DEBUG item => item_23

  <bb 6> [local count: 1073741824]:
  # entry_9 = PHI <entry_19(5), 0B(10)>
  # item_11 = PHI <item_23(5), _1(10)>
  # DEBUG item => item_11
  # DEBUG entry => entry_9
  # DEBUG BEGIN_STMT
  if (_2 != item_11)
    goto <bb 3>; [94.50%]
  else
    goto <bb 7>; [5.50%]

  <bb 7> [local count: 140173161]:
  # ret_7 = PHI <2(2), 0(4), 0(6)>
  # entry_10 = PHI <0B(2), entry_19(4), entry_9(6)>
  # item_12 = PHI <item_24(D)(2), item_11(4), item_11(6)>
  # DEBUG item => item_12
  # DEBUG entry => entry_10
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  if (entry_10 != 0B)
    goto <bb 8>; [68.09%]
  else
    goto <bb 9>; [31.91%]

  <bb 8> [local count: 95443905]:
  # DEBUG BEGIN_STMT
  _5 = &entry_10->addr;
  memcpy (addr_25(D), _5, 6);
  # DEBUG BEGIN_STMT
  _6 = item_12->prNext;
  db_16(D)->iterator = _6;
  # DEBUG BEGIN_STMT
  db_16(D)->crit.crit = crit_20(D);
  # DEBUG BEGIN_STMT
  db_16(D)->crit.owner = owner_22(D);
  # DEBUG BEGIN_STMT
  db_16(D)->crit.type = type_21(D);

  <bb 9> [local count: 140173161]:
  # ret_8 = PHI <ret_7(8), 2(7)>
  # DEBUG ret => ret_8
  # DEBUG BEGIN_STMT
  # DEBUG D#16 => &db_16(D)->lock
  _33 = MEM[(const oal_mutex_t *)db_16(D) + 12B];
  # DEBUG D#2 => D#16
  oal_mutex_unlock.isra.0 (_33);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  return ret_8;

}


pfe_mac_db_flush (struct pfe_mac_db_t * db, pfe_mac_db_crit_t crit, pfe_mac_type_t type, pfe_drv_id_t owner)
{
  struct pfe_mac_db_list_entry_t * entry;
  struct LLIST_t * aux;
  struct LLIST_t * item;
  int _1;
  unsigned char _2;
  struct LLIST_Struct * _3;
  struct LLIST_Struct * _4;
  struct LLIST_Struct * _5;
  struct LLIST_t * _6;
  short unsigned int _27;
  short unsigned int _28;

  <bb 2> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#13 => &db_11(D)->lock
  _27 = MEM[(const oal_mutex_t *)db_11(D) + 12B];
  # DEBUG D#1 => D#13
  oal_mutex_lock.isra.0 (_27);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  item_14 = db_11(D)->mac_list.prNext;
  # DEBUG item => item_14
  aux_15 = item_14->prNext;
  # DEBUG aux => aux_15
  goto <bb 7>; [100.00%]

  <bb 3> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  _1 = item_7 - 6B;
  entry_17 = (struct pfe_mac_db_list_entry_t *) _1;
  # DEBUG entry => entry_17
  # DEBUG BEGIN_STMT
  if (item_7 != 6B)
    goto <bb 4>; [70.00%]
  else
    goto <bb 6>; [30.00%]

  <bb 4> [local count: 668941156]:
  # DEBUG BEGIN_STMT
  _2 = pfe_mac_db_criterion_eval (entry_17, crit_18(D), type_19(D), owner_20(D));
  if (_2 == 1)
    goto <bb 5>; [20.24%]
  else
    goto <bb 6>; [79.76%]

  <bb 5> [local count: 135393690]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = entry_17->iterator.prPrev;
  _4 = entry_17->iterator.prNext;
  _3->prNext = _4;
  # DEBUG BEGIN_STMT
  _5 = entry_17->iterator.prNext;
  _5->prPrev = _3;
  # DEBUG BEGIN_STMT
  entry_17->iterator.prPrev = 0B;
  # DEBUG BEGIN_STMT
  entry_17->iterator.prNext = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  oal_mm_free (entry_17);
  # DEBUG BEGIN_STMT
  # DEBUG entry => 0B

  <bb 6> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  # DEBUG item => aux_8
  aux_26 = aux_8->prNext;
  # DEBUG aux => aux_26

  <bb 7> [local count: 1073741824]:
  # item_7 = PHI <item_14(2), aux_8(6)>
  # aux_8 = PHI <aux_15(2), aux_26(6)>
  # DEBUG aux => aux_8
  # DEBUG item => item_7
  # DEBUG BEGIN_STMT
  _6 = &db_11(D)->mac_list;
  if (_6 != item_7)
    goto <bb 3>; [89.00%]
  else
    goto <bb 8>; [11.00%]

  <bb 8> [local count: 118111601]:
  # DEBUG BEGIN_STMT
  # DEBUG D#14 => &db_11(D)->lock
  _28 = MEM[(const oal_mutex_t *)db_11(D) + 12B];
  # DEBUG D#2 => D#14
  oal_mutex_unlock.isra.0 (_28);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  return 0;

}


pfe_mac_db_del_addr (struct pfe_mac_db_t * db, const uint8_t * addr, pfe_drv_id_t owner)
{
  struct pfe_mac_db_list_entry_t * entry;
  errno_t ret;
  struct LLIST_t * _1;
  struct LLIST_t * _2;
  struct LLIST_Struct * _3;
  struct LLIST_Struct * _4;
  struct LLIST_Struct * _5;
  struct LLIST_Struct * _6;
  short unsigned int _23;
  short unsigned int _24;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#11 => &db_10(D)->lock
  _23 = MEM[(const oal_mutex_t *)db_10(D) + 12B];
  # DEBUG D#1 => D#11
  oal_mutex_lock.isra.0 (_23);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  entry_15 = pfe_mac_db_find_by_addr (db_10(D), addr_13(D), owner_14(D));
  # DEBUG entry => entry_15
  # DEBUG BEGIN_STMT
  if (entry_15 == 0B)
    goto <bb 6>; [18.75%]
  else
    goto <bb 3>; [81.25%]

  <bb 3> [local count: 872415233]:
  # DEBUG BEGIN_STMT
  _1 = &entry_15->iterator;
  _2 = db_10(D)->iterator;
  if (_1 == _2)
    goto <bb 4>; [30.00%]
  else
    goto <bb 5>; [70.00%]

  <bb 4> [local count: 261724570]:
  # DEBUG BEGIN_STMT
  _3 = _2->prNext;
  db_10(D)->iterator = _3;

  <bb 5> [local count: 872415233]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = entry_15->iterator.prPrev;
  _5 = entry_15->iterator.prNext;
  _4->prNext = _5;
  # DEBUG BEGIN_STMT
  _6 = entry_15->iterator.prNext;
  _6->prPrev = _4;
  # DEBUG BEGIN_STMT
  entry_15->iterator.prPrev = 0B;
  # DEBUG BEGIN_STMT
  entry_15->iterator.prNext = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  oal_mm_free (entry_15);
  # DEBUG BEGIN_STMT
  # DEBUG entry => 0B
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 6> [local count: 1073741824]:
  # ret_7 = PHI <2(2), 0(5)>
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  # DEBUG D#12 => &db_10(D)->lock
  _24 = MEM[(const oal_mutex_t *)db_10(D) + 12B];
  # DEBUG D#2 => D#12
  oal_mutex_unlock.isra.0 (_24);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  return ret_7;

}


pfe_mac_db_add_addr (struct pfe_mac_db_t * db, const uint8_t * addr, pfe_drv_id_t owner)
{
  struct pfe_mac_db_list_entry_t * entry;
  errno_t ret;
  uint8_t[6] * _1;
  struct LLIST_Struct * _2;
  struct LLIST_t * _3;
  struct LLIST_t * _4;
  struct LLIST_t * _5;
  short unsigned int _24;
  short unsigned int _25;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#9 => &db_8(D)->lock
  _24 = MEM[(const oal_mutex_t *)db_8(D) + 12B];
  # DEBUG D#1 => D#9
  oal_mutex_lock.isra.0 (_24);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  entry_13 = pfe_mac_db_find_by_addr (db_8(D), addr_11(D), owner_12(D));
  # DEBUG entry => entry_13
  # DEBUG BEGIN_STMT
  if (entry_13 == 0B)
    goto <bb 3>; [28.16%]
  else
    goto <bb 6>; [71.84%]

  <bb 3> [local count: 302365698]:
  # DEBUG BEGIN_STMT
  entry_15 = oal_mm_malloc (15);
  # DEBUG entry => entry_15
  # DEBUG BEGIN_STMT
  if (entry_15 == 0B)
    goto <bb 6>; [31.91%]
  else
    goto <bb 4>; [68.09%]

  <bb 4> [local count: 205880803]:
  # DEBUG BEGIN_STMT
  _1 = &entry_15->addr;
  memcpy (_1, addr_11(D), 6);
  # DEBUG BEGIN_STMT
  entry_15->owner = owner_12(D);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = db_8(D)->mac_list.prPrev;
  entry_15->iterator.prPrev = _2;
  # DEBUG BEGIN_STMT
  _3 = &db_8(D)->mac_list;
  entry_15->iterator.prNext = _3;
  # DEBUG BEGIN_STMT
  _4 = &entry_15->iterator;
  _2->prNext = _4;
  # DEBUG BEGIN_STMT
  db_8(D)->mac_list.prPrev = _4;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = db_8(D)->iterator;
  if (_3 == _5)
    goto <bb 5>; [30.00%]
  else
    goto <bb 6>; [70.00%]

  <bb 5> [local count: 61764241]:
  # DEBUG BEGIN_STMT
  db_8(D)->iterator = _4;

  <bb 6> [local count: 1073741824]:
  # ret_6 = PHI <0(5), 116(2), 11(3), 0(4)>
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  # DEBUG D#10 => &db_8(D)->lock
  _25 = MEM[(const oal_mutex_t *)db_8(D) + 12B];
  # DEBUG D#2 => D#10
  oal_mutex_unlock.isra.0 (_25);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  return ret_6;

}


pfe_mac_db_find_by_addr (const struct pfe_mac_db_t * db, const uint8_t * addr, pfe_drv_id_t owner)
{
  bool_t found;
  struct LLIST_t * item;
  struct pfe_mac_db_list_entry_t * entry;
  int _1;
  <unnamed type> _2;
  uint8_t[6] * _3;
  int _4;
  const struct LLIST_t * _5;

  <bb 2> [local count: 78030430]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG found => 0
  # DEBUG BEGIN_STMT
  item_13 = db_12(D)->mac_list.prNext;
  # DEBUG item => item_13
  goto <bb 6>; [100.00%]

  <bb 3> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _1 = item_9 - 6B;
  entry_15 = (struct pfe_mac_db_list_entry_t *) _1;
  # DEBUG entry => entry_15
  # DEBUG BEGIN_STMT
  _2 = entry_15->owner;
  if (_2 == owner_16(D))
    goto <bb 4>; [34.00%]
  else
    goto <bb 5>; [66.00%]

  <bb 4> [local count: 344993248]:
  _3 = &entry_15->addr;
  _4 = memcmp (addr_17(D), _3, 6);
  if (_4 == 0)
    goto <bb 7>; [5.50%]
  else
    goto <bb 5>; [94.50%]

  <bb 5> [local count: 995711397]:
  # DEBUG BEGIN_STMT
  item_18 = item_9->prNext;
  # DEBUG item => item_18

  <bb 6> [local count: 1073741824]:
  # entry_6 = PHI <entry_14(D)(2), entry_15(5)>
  # item_9 = PHI <item_13(2), item_18(5)>
  # DEBUG item => item_9
  # DEBUG entry => entry_6
  # DEBUG BEGIN_STMT
  _5 = &db_12(D)->mac_list;
  if (_5 != item_9)
    goto <bb 3>; [94.50%]
  else
    goto <bb 7>; [5.50%]

  <bb 7> [local count: 78030429]:
  # entry_7 = PHI <entry_15(4), entry_6(6)>
  # found_10 = PHI <1(4), 0(6)>
  # DEBUG found => found_10
  # DEBUG entry => entry_7
  # DEBUG BEGIN_STMT
  if (found_10 == 0)
    goto <bb 8>; [29.00%]
  else
    goto <bb 9>; [71.00%]

  <bb 8> [local count: 22628824]:
  # DEBUG BEGIN_STMT
  # DEBUG entry => 0B

  <bb 9> [local count: 78030429]:
  # entry_8 = PHI <entry_7(7), 0B(8)>
  # DEBUG entry => entry_8
  # DEBUG BEGIN_STMT
  return entry_8;

}


pfe_mac_db_destroy (struct pfe_mac_db_t * db)
{
  struct pfe_mac_db_list_entry_t * entry;
  struct LLIST_t * aux;
  struct LLIST_t * item;
  int _1;
  struct LLIST_Struct * _2;
  struct LLIST_Struct * _3;
  struct LLIST_Struct * _4;
  struct LLIST_t * _5;
  oal_mutex_t * _6;
  short unsigned int _26;
  short unsigned int _27;

  <bb 2> [local count: 220893212]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (db_12(D) != 0B)
    goto <bb 3>; [53.47%]
  else
    goto <bb 9>; [46.53%]

  <bb 3> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG D#7 => &db_12(D)->lock
  _26 = MEM[(const oal_mutex_t *)db_12(D) + 12B];
  # DEBUG D#1 => D#7
  oal_mutex_lock.isra.0 (_26);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  item_15 = db_12(D)->mac_list.prNext;
  # DEBUG item => item_15
  aux_16 = item_15->prNext;
  # DEBUG aux => aux_16
  goto <bb 7>; [100.00%]

  <bb 4> [local count: 955630226]:
  # DEBUG BEGIN_STMT
  _1 = item_7 - 6B;
  entry_19 = (struct pfe_mac_db_list_entry_t *) _1;
  # DEBUG entry => entry_19
  # DEBUG BEGIN_STMT
  if (item_7 != 6B)
    goto <bb 5>; [53.47%]
  else
    goto <bb 6>; [46.53%]

  <bb 5> [local count: 510975481]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = entry_19->iterator.prPrev;
  _3 = entry_19->iterator.prNext;
  _2->prNext = _3;
  # DEBUG BEGIN_STMT
  _4 = entry_19->iterator.prNext;
  _4->prPrev = _2;
  # DEBUG BEGIN_STMT
  entry_19->iterator.prPrev = 0B;
  # DEBUG BEGIN_STMT
  entry_19->iterator.prNext = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  oal_mm_free (entry_19);
  # DEBUG BEGIN_STMT
  # DEBUG entry => 0B

  <bb 6> [local count: 955630226]:
  # DEBUG BEGIN_STMT
  # DEBUG item => aux_8
  aux_25 = aux_8->prNext;
  # DEBUG aux => aux_25

  <bb 7> [local count: 1073741824]:
  # item_7 = PHI <item_15(3), aux_8(6)>
  # aux_8 = PHI <aux_16(3), aux_25(6)>
  # DEBUG aux => aux_8
  # DEBUG item => item_7
  # DEBUG BEGIN_STMT
  _5 = &db_12(D)->mac_list;
  if (_5 != item_7)
    goto <bb 4>; [89.00%]
  else
    goto <bb 8>; [11.00%]

  <bb 8> [local count: 118111601]:
  # DEBUG BEGIN_STMT
  # DEBUG D#8 => &db_12(D)->lock
  _27 = MEM[(const oal_mutex_t *)db_12(D) + 12B];
  # DEBUG D#2 => D#8
  oal_mutex_unlock.isra.0 (_27);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = &db_12(D)->lock;
  # DEBUG mutex => _6
  # DEBUG INLINE_ENTRY oal_mutex_destroy
  # DEBUG BEGIN_STMT
  oal_mutex_destroy_internal (_6);
  # DEBUG mutex => NULL
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  oal_mm_free (db_12(D));

  <bb 9> [local count: 220893212]:
  # DEBUG BEGIN_STMT
  return 0;

}


pfe_mac_db_create ()
{
  struct pfe_mac_db_t * db;
  struct LLIST_t * _1;
  struct pfe_mac_db_t * _2;
  oal_mutex_t * _3;
  int _15;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  db_8 = oal_mm_malloc (20);
  # DEBUG db => db_8
  # DEBUG BEGIN_STMT
  if (db_8 != 0B)
    goto <bb 3>; [53.47%]
  else
    goto <bb 5>; [46.53%]

  <bb 3> [local count: 574129754]:
  # DEBUG BEGIN_STMT
  _2 = db_8 + 12;
  memset (_2, 0, 8);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &db_8->mac_list;
  db_8->mac_list.prNext = _1;
  # DEBUG BEGIN_STMT
  db_8->mac_list.prPrev = _1;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  db_8->iterator = _1;
  # DEBUG BEGIN_STMT
  db_8->crit.crit = 4;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = &db_8->lock;
  # DEBUG mutex => _3
  # DEBUG INLINE_ENTRY oal_mutex_init
  # DEBUG BEGIN_STMT
  _15 = oal_mutex_init_internal (_3);
  # DEBUG mutex => NULL
  if (_15 != 0)
    goto <bb 4>; [16.75%]
  else
    goto <bb 5>; [83.25%]

  <bb 4> [local count: 96166734]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  oal_mm_free (db_8);
  # DEBUG BEGIN_STMT
  # DEBUG db => 0B

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

}


pfe_mac_db_criterion_eval (const struct pfe_mac_db_list_entry_t * entry, pfe_mac_db_crit_t crit, pfe_mac_type_t type, pfe_drv_id_t owner)
{
  bool_t ret;
  <unnamed type> _1;
  const uint8_t[6] * _2;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  if (crit_5(D) == 1)
    goto <bb 3>; [34.00%]
  else
    goto <bb 5>; [66.00%]

  <bb 3> [local count: 365072220]:
  # DEBUG BEGIN_STMT
  _1 = entry_7(D)->owner;
  if (_1 == owner_8(D))
    goto <bb 4>; [34.00%]
  else
    goto <bb 11>; [66.00%]

  <bb 4> [local count: 124124555]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 1
  goto <bb 11>; [100.00%]

  <bb 5> [local count: 708669604]:
  # DEBUG BEGIN_STMT
  if (crit_5(D) == 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 6> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  _2 = &entry_7(D)->addr;
  ret_10 = pfe_emac_check_crit_by_type (_2, type_9(D));
  # DEBUG ret => ret_10
  goto <bb 11>; [100.00%]

  <bb 7> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  if (crit_5(D) == 2)
    goto <bb 8>; [34.00%]
  else
    goto <bb 9>; [66.00%]

  <bb 8> [local count: 120473834]:
  # DEBUG D#5 => crit_5(D)
  ret_4 = pfe_mac_db_criterion_eval.part.0 (entry_7(D), type_9(D), owner_8(D));
  goto <bb 11>; [100.00%]

  <bb 9> [local count: 233860969]:
  # DEBUG BEGIN_STMT
  if (crit_5(D) == 3)
    goto <bb 10>; [34.00%]
  else
    goto <bb 11>; [66.00%]

  <bb 10> [local count: 79512729]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 1

  <bb 11> [local count: 1073741824]:
  # ret_3 = PHI <1(4), ret_10(6), ret_4(8), 0(9), 1(10), 0(3)>
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  return ret_3;

}


pfe_emac_check_crit_by_type (const uint8_t * addr, pfe_mac_type_t type)
{
  bool_t ret;
  unsigned char _1;
  unsigned char _2;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  if (type_5(D) == 3)
    goto <bb 9>; [34.00%]
  else
    goto <bb 3>; [66.00%]

  <bb 3> [local count: 708669604]:
  if (type_5(D) == 1)
    goto <bb 4>; [34.00%]
  else
    goto <bb 5>; [66.00%]

  <bb 4> [local count: 240947665]:
  _1 = pfe_emac_is_multi (addr_7(D));
  if (_1 == 1)
    goto <bb 9>; [34.00%]
  else
    goto <bb 5>; [66.00%]

  <bb 5> [local count: 626747398]:
  if (type_5(D) == 2)
    goto <bb 6>; [34.00%]
  else
    goto <bb 7>; [66.00%]

  <bb 6> [local count: 213094115]:
  _2 = pfe_emac_is_broad (addr_7(D));
  if (_2 == 1)
    goto <bb 9>; [34.00%]
  else
    goto <bb 7>; [66.00%]

  <bb 7> [local count: 554295399]:
  if (type_5(D) == 0)
    goto <bb 8>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 8> [local count: 277147700]:
  # DEBUG D#3 => type_5(D)
  ret_4 = pfe_emac_check_crit_by_type.part.0 (addr_7(D));

  <bb 9> [local count: 1073741824]:
  # ret_3 = PHI <0(7), 1(6), 1(4), 1(2), ret_4(8)>
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  return ret_3;

}


pfe_emac_is_multi (const uint8_t * addr)
{
  unsigned char _1;
  unsigned char _2;
  bool_t _3;
  unsigned char _6;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = pfe_emac_is_broad (addr_5(D));
  if (_1 == 0)
    goto <bb 3>; [66.00%]
  else
    goto <bb 4>; [34.00%]

  <bb 3> [local count: 708669605]:
  _2 = *addr_5(D);
  _6 = _2 & 1;
  if (_6 != 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 4> [local count: 719407023]:
  # DEBUG BEGIN_STMT

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

}


pfe_emac_is_broad (const uint8_t * addr)
{
  unsigned char _1;
  unsigned char _2;
  unsigned char _3;
  unsigned char _4;
  unsigned char _5;
  unsigned char _6;
  unsigned char _7;
  unsigned char _8;
  unsigned char _9;
  unsigned char _10;
  unsigned char _11;
  bool_t _12;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = *addr_14(D);
  _2 = MEM[(const uint8_t *)addr_14(D) + 1B];
  _3 = _1 & _2;
  _4 = MEM[(const uint8_t *)addr_14(D) + 2B];
  _5 = _3 & _4;
  _6 = MEM[(const uint8_t *)addr_14(D) + 3B];
  _7 = _5 & _6;
  _8 = MEM[(const uint8_t *)addr_14(D) + 4B];
  _9 = _7 & _8;
  _10 = MEM[(const uint8_t *)addr_14(D) + 5B];
  _11 = _9 & _10;
  if (_11 == 255)
    goto <bb 4>; [34.00%]
  else
    goto <bb 3>; [66.00%]

  <bb 3> [local count: 708669605]:
  # DEBUG BEGIN_STMT

  <bb 4> [local count: 1073741824]:
  # _12 = PHI <1(2), 0(3)>
  return _12;

}


