pfe_emac_addr_db_del_entry.isra.0 (struct pfe_mac_addr_db_entry_t * entry)
{
  struct LLIST_Struct * _2;
  struct LLIST_Struct * _3;
  struct LLIST_Struct * _4;

  <bb 3> [local count: 1073741824]:
  # DEBUG emac s=> emac

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = entry_1(D)->iterator.prPrev;
  _3 = entry_1(D)->iterator.prNext;
  _2->prNext = _3;
  # DEBUG BEGIN_STMT
  _4 = entry_1(D)->iterator.prNext;
  _4->prPrev = _2;
  # DEBUG BEGIN_STMT
  entry_1(D)->iterator.prPrev = 0B;
  # DEBUG BEGIN_STMT
  entry_1(D)->iterator.prNext = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  return 0;

}


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.8)
{
  errno_t retval;
  short unsigned int _2;
  int _3;
  unsigned char _4;
  void (*<T689>) (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.8_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.6)
{
  errno_t retval;
  short unsigned int _2;
  int _3;
  unsigned char _4;
  void (*<T689>) (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.6_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_emac_irq_unmask (struct pfe_emac_t * emac)
{
  <bb 2> [local count: 1073741824]:
  pfe_emac_irq_mask (emac_1(D)); [tail call]
  return;

}


pfe_emac_irq_mask (struct pfe_emac_t * emac)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  return;

}


pfe_emac_isr (struct pfe_emac_t * emac)
{
  errno_t ret;
  unsigned int _1;
  unsigned int _2;
  short unsigned int _9;
  short unsigned int _10;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG D#46 => &emac_3(D)->mutex
  _9 = MEM[(const oal_mutex_t *)emac_3(D) + 24B];
  # DEBUG D#1 => D#46
  oal_mutex_lock.isra.0 (_9);
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  _2 = emac_3(D)->cbus_base_va;
  ret_7 = pfe_emac_cfg_isr (_1, _2);
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  # DEBUG D#47 => &emac_3(D)->mutex
  _10 = MEM[(const oal_mutex_t *)emac_3(D) + 24B];
  # DEBUG D#2 => D#47
  oal_mutex_unlock.isra.0 (_10);
  # DEBUG BEGIN_STMT
  return ret_7;

}


pfe_emac_get_stat_value (const struct pfe_emac_t * emac, uint32_t stat_id)
{
  uint32_t stat_value;
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  stat_value_6 = pfe_emac_cfg_get_stat_value (_1, stat_id_4(D));
  # DEBUG stat_value => stat_value_6
  # DEBUG BEGIN_STMT
  return stat_value_6;

}


pfe_emac_get_tx_cnt (const struct pfe_emac_t * emac)
{
  uint32_t tx_cnt;
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  tx_cnt_5 = pfe_emac_cfg_get_tx_cnt (_1);
  # DEBUG tx_cnt => tx_cnt_5
  # DEBUG BEGIN_STMT
  return tx_cnt_5;

}


pfe_emac_get_rx_cnt (const struct pfe_emac_t * emac)
{
  uint32_t rx_cnt;
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  rx_cnt_5 = pfe_emac_cfg_get_rx_cnt (_1);
  # DEBUG rx_cnt => rx_cnt_5
  # DEBUG BEGIN_STMT
  return rx_cnt_5;

}


pfe_emac_mdio_write45 (struct pfe_emac_t * emac, uint8_t pa, uint8_t dev, uint16_t ra, uint16_t val, uint32_t key)
{
  errno_t ret;
  unsigned char _1;
  long unsigned int _2;
  unsigned int _3;
  unsigned int _4;
  short unsigned int _20;
  short unsigned int _21;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#44 => &emac_7(D)->mutex
  _20 = MEM[(const oal_mutex_t *)emac_7(D) + 24B];
  # DEBUG D#1 => D#44
  oal_mutex_lock.isra.0 (_20);
  # DEBUG BEGIN_STMT
  _1 = emac_7(D)->mdio_locked;
  if (_1 == 1)
    goto <bb 3>; [51.12%]
  else
    goto <bb 5>; [48.88%]

  <bb 3> [local count: 548896821]:
  # DEBUG BEGIN_STMT
  _2 = emac_7(D)->mdio_key;
  if (_2 == key_16(D))
    goto <bb 4>; [32.03%]
  else
    goto <bb 6>; [67.97%]

  <bb 4> [local count: 175811651]:
  # DEBUG BEGIN_STMT
  _3 = emac_7(D)->emac_base_va;
  ret_18 = pfe_emac_cfg_mdio_write45 (_3, pa_10(D), dev_11(D), ra_12(D), val_13(D));
  # DEBUG ret => ret_18
  goto <bb 6>; [100.00%]

  <bb 5> [local count: 524845004]:
  # DEBUG BEGIN_STMT
  _4 = emac_7(D)->emac_base_va;
  ret_15 = pfe_emac_cfg_mdio_write45 (_4, pa_10(D), dev_11(D), ra_12(D), val_13(D));
  # DEBUG ret => ret_15

  <bb 6> [local count: 1073741824]:
  # ret_5 = PHI <115(3), ret_15(5), ret_18(4)>
  # DEBUG ret => ret_5
  # DEBUG BEGIN_STMT
  # DEBUG D#45 => &emac_7(D)->mutex
  _21 = MEM[(const oal_mutex_t *)emac_7(D) + 24B];
  # DEBUG D#2 => D#45
  oal_mutex_unlock.isra.0 (_21);
  # DEBUG BEGIN_STMT
  return ret_5;

}


pfe_emac_mdio_read45 (struct pfe_emac_t * emac, uint8_t pa, uint8_t dev, uint16_t ra, uint16_t * val, uint32_t key)
{
  errno_t ret;
  unsigned char _1;
  long unsigned int _2;
  unsigned int _3;
  unsigned int _4;
  short unsigned int _20;
  short unsigned int _21;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#42 => &emac_7(D)->mutex
  _20 = MEM[(const oal_mutex_t *)emac_7(D) + 24B];
  # DEBUG D#1 => D#42
  oal_mutex_lock.isra.0 (_20);
  # DEBUG BEGIN_STMT
  _1 = emac_7(D)->mdio_locked;
  if (_1 == 1)
    goto <bb 3>; [51.12%]
  else
    goto <bb 5>; [48.88%]

  <bb 3> [local count: 548896821]:
  # DEBUG BEGIN_STMT
  _2 = emac_7(D)->mdio_key;
  if (_2 == key_16(D))
    goto <bb 4>; [32.03%]
  else
    goto <bb 6>; [67.97%]

  <bb 4> [local count: 175811651]:
  # DEBUG BEGIN_STMT
  _3 = emac_7(D)->emac_base_va;
  ret_18 = pfe_emac_cfg_mdio_read45 (_3, pa_10(D), dev_11(D), ra_12(D), val_13(D));
  # DEBUG ret => ret_18
  goto <bb 6>; [100.00%]

  <bb 5> [local count: 524845004]:
  # DEBUG BEGIN_STMT
  _4 = emac_7(D)->emac_base_va;
  ret_15 = pfe_emac_cfg_mdio_read45 (_4, pa_10(D), dev_11(D), ra_12(D), val_13(D));
  # DEBUG ret => ret_15

  <bb 6> [local count: 1073741824]:
  # ret_5 = PHI <115(3), ret_15(5), ret_18(4)>
  # DEBUG ret => ret_5
  # DEBUG BEGIN_STMT
  # DEBUG D#43 => &emac_7(D)->mutex
  _21 = MEM[(const oal_mutex_t *)emac_7(D) + 24B];
  # DEBUG D#2 => D#43
  oal_mutex_unlock.isra.0 (_21);
  # DEBUG BEGIN_STMT
  return ret_5;

}


pfe_emac_mdio_write22 (struct pfe_emac_t * emac, uint8_t pa, uint8_t ra, uint16_t val, uint32_t key)
{
  errno_t ret;
  unsigned char _1;
  long unsigned int _2;
  unsigned int _3;
  unsigned int _4;
  short unsigned int _19;
  short unsigned int _20;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#40 => &emac_7(D)->mutex
  _19 = MEM[(const oal_mutex_t *)emac_7(D) + 24B];
  # DEBUG D#1 => D#40
  oal_mutex_lock.isra.0 (_19);
  # DEBUG BEGIN_STMT
  _1 = emac_7(D)->mdio_locked;
  if (_1 == 1)
    goto <bb 3>; [51.12%]
  else
    goto <bb 5>; [48.88%]

  <bb 3> [local count: 548896821]:
  # DEBUG BEGIN_STMT
  _2 = emac_7(D)->mdio_key;
  if (_2 == key_15(D))
    goto <bb 4>; [32.03%]
  else
    goto <bb 6>; [67.97%]

  <bb 4> [local count: 175811651]:
  # DEBUG BEGIN_STMT
  _3 = emac_7(D)->emac_base_va;
  ret_17 = pfe_emac_cfg_mdio_write22 (_3, pa_10(D), ra_11(D), val_12(D));
  # DEBUG ret => ret_17
  goto <bb 6>; [100.00%]

  <bb 5> [local count: 524845004]:
  # DEBUG BEGIN_STMT
  _4 = emac_7(D)->emac_base_va;
  ret_14 = pfe_emac_cfg_mdio_write22 (_4, pa_10(D), ra_11(D), val_12(D));
  # DEBUG ret => ret_14

  <bb 6> [local count: 1073741824]:
  # ret_5 = PHI <115(3), ret_14(5), ret_17(4)>
  # DEBUG ret => ret_5
  # DEBUG BEGIN_STMT
  # DEBUG D#41 => &emac_7(D)->mutex
  _20 = MEM[(const oal_mutex_t *)emac_7(D) + 24B];
  # DEBUG D#2 => D#41
  oal_mutex_unlock.isra.0 (_20);
  # DEBUG BEGIN_STMT
  return ret_5;

}


pfe_emac_mdio_read22 (struct pfe_emac_t * emac, uint8_t pa, uint8_t ra, uint16_t * val, uint32_t key)
{
  errno_t ret;
  unsigned char _1;
  long unsigned int _2;
  unsigned int _3;
  unsigned int _4;
  short unsigned int _19;
  short unsigned int _20;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#38 => &emac_7(D)->mutex
  _19 = MEM[(const oal_mutex_t *)emac_7(D) + 24B];
  # DEBUG D#1 => D#38
  oal_mutex_lock.isra.0 (_19);
  # DEBUG BEGIN_STMT
  _1 = emac_7(D)->mdio_locked;
  if (_1 == 1)
    goto <bb 3>; [51.12%]
  else
    goto <bb 5>; [48.88%]

  <bb 3> [local count: 548896821]:
  # DEBUG BEGIN_STMT
  _2 = emac_7(D)->mdio_key;
  if (_2 == key_15(D))
    goto <bb 4>; [32.03%]
  else
    goto <bb 6>; [67.97%]

  <bb 4> [local count: 175811651]:
  # DEBUG BEGIN_STMT
  _3 = emac_7(D)->emac_base_va;
  ret_17 = pfe_emac_cfg_mdio_read22 (_3, pa_10(D), ra_11(D), val_12(D));
  # DEBUG ret => ret_17
  goto <bb 6>; [100.00%]

  <bb 5> [local count: 524845004]:
  # DEBUG BEGIN_STMT
  _4 = emac_7(D)->emac_base_va;
  ret_14 = pfe_emac_cfg_mdio_read22 (_4, pa_10(D), ra_11(D), val_12(D));
  # DEBUG ret => ret_14

  <bb 6> [local count: 1073741824]:
  # ret_5 = PHI <115(3), ret_14(5), ret_17(4)>
  # DEBUG ret => ret_5
  # DEBUG BEGIN_STMT
  # DEBUG D#39 => &emac_7(D)->mutex
  _20 = MEM[(const oal_mutex_t *)emac_7(D) + 24B];
  # DEBUG D#2 => D#39
  oal_mutex_unlock.isra.0 (_20);
  # DEBUG BEGIN_STMT
  return ret_5;

}


pfe_emac_mdio_unlock (struct pfe_emac_t * emac, uint32_t key)
{
  errno_t ret;
  unsigned char _1;
  long unsigned int _2;
  short unsigned int _11;
  short unsigned int _12;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#36 => &emac_5(D)->mutex
  _11 = MEM[(const oal_mutex_t *)emac_5(D) + 24B];
  # DEBUG D#1 => D#36
  oal_mutex_lock.isra.0 (_11);
  # DEBUG BEGIN_STMT
  _1 = emac_5(D)->mdio_locked;
  if (_1 == 1)
    goto <bb 3>; [48.89%]
  else
    goto <bb 5>; [51.11%]

  <bb 3> [local count: 524952378]:
  # DEBUG BEGIN_STMT
  _2 = emac_5(D)->mdio_key;
  if (_2 == key_8(D))
    goto <bb 4>; [48.89%]
  else
    goto <bb 5>; [51.11%]

  <bb 4> [local count: 256649217]:
  # DEBUG BEGIN_STMT
  emac_5(D)->mdio_locked = 0;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 5> [local count: 1073741824]:
  # ret_3 = PHI <115(3), 120(2), 0(4)>
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  # DEBUG D#37 => &emac_5(D)->mutex
  _12 = MEM[(const oal_mutex_t *)emac_5(D) + 24B];
  # DEBUG D#2 => D#37
  oal_mutex_unlock.isra.0 (_12);
  # DEBUG BEGIN_STMT
  return ret_3;

}


pfe_emac_mdio_lock (struct pfe_emac_t * emac, uint32_t * key)
{
  errno_t ret;
  unsigned char _1;
  long unsigned int key_seed.3_2;
  long unsigned int _3;
  short unsigned int _15;
  short unsigned int _16;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#34 => &emac_6(D)->mutex
  _15 = MEM[(const oal_mutex_t *)emac_6(D) + 24B];
  # DEBUG D#1 => D#34
  oal_mutex_lock.isra.0 (_15);
  # DEBUG BEGIN_STMT
  _1 = emac_6(D)->mdio_locked;
  if (_1 == 1)
    goto <bb 4>; [21.72%]
  else
    goto <bb 3>; [78.28%]

  <bb 3> [local count: 840525101]:
  # DEBUG BEGIN_STMT
  emac_6(D)->mdio_locked = 1;
  # DEBUG BEGIN_STMT
  key_seed.3_2 = key_seed;
  emac_6(D)->mdio_key = key_seed.3_2;
  # DEBUG BEGIN_STMT
  _3 = key_seed.3_2 + 1;
  key_seed = _3;
  # DEBUG BEGIN_STMT
  *key_12(D) = key_seed.3_2;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 4> [local count: 1073741824]:
  # ret_4 = PHI <115(2), 0(3)>
  # DEBUG ret => ret_4
  # DEBUG BEGIN_STMT
  # DEBUG D#35 => &emac_6(D)->mutex
  _16 = MEM[(const oal_mutex_t *)emac_6(D) + 24B];
  # DEBUG D#2 => D#35
  oal_mutex_unlock.isra.0 (_16);
  # DEBUG BEGIN_STMT
  return ret_4;

}


pfe_emac_destroy (struct pfe_emac_t * emac)
{
  const struct pfe_mac_addr_db_entry_t * entry;
  struct LLIST_t * tmp_item;
  struct LLIST_t * curItem;
  uint8_t zero_addr[6];
  int _1;
  const uint8_t[6] * _2;
  <unnamed type> _3;
  struct LLIST_t * _4;
  unsigned int _5;
  oal_mutex_t * _6;
  oal_mutex_t * _7;
  short unsigned int _28;
  short unsigned int _29;

  <bb 2> [local count: 220893212]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  memset (&zero_addr, 0, 6);
  # DEBUG BEGIN_STMT
  if (emac_14(D) != 0B)
    goto <bb 3>; [53.47%]
  else
    goto <bb 7>; [46.53%]

  <bb 3> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG D#32 => &emac_14(D)->mutex
  _28 = MEM[(const oal_mutex_t *)emac_14(D) + 24B];
  # DEBUG D#1 => D#32
  oal_mutex_lock.isra.0 (_28);
  # DEBUG BEGIN_STMT
  curItem_16 = emac_14(D)->mac_addr_list.prNext;
  # DEBUG curItem => curItem_16
  tmp_item_17 = curItem_16->prNext;
  # DEBUG tmp_item => tmp_item_17
  goto <bb 5>; [100.00%]

  <bb 4> [local count: 955630226]:
  # DEBUG BEGIN_STMT
  _1 = curItem_8 - 14B;
  entry_24 = (const struct pfe_mac_addr_db_entry_t *) _1;
  # DEBUG entry => entry_24
  # DEBUG BEGIN_STMT
  _2 = &entry_24->addr;
  _3 = entry_24->owner;
  pfe_emac_del_addr_nolock (emac_14(D), _2, _3);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG curItem => tmp_item_9
  tmp_item_26 = tmp_item_9->prNext;
  # DEBUG tmp_item => tmp_item_26

  <bb 5> [local count: 1073741824]:
  # curItem_8 = PHI <curItem_16(3), tmp_item_9(4)>
  # tmp_item_9 = PHI <tmp_item_17(3), tmp_item_26(4)>
  # DEBUG tmp_item => tmp_item_9
  # DEBUG curItem => curItem_8
  # DEBUG BEGIN_STMT
  _4 = &emac_14(D)->mac_addr_list;
  if (_4 != curItem_8)
    goto <bb 4>; [89.00%]
  else
    goto <bb 6>; [11.00%]

  <bb 6> [local count: 118111601]:
  # DEBUG BEGIN_STMT
  pfe_emac_disable (emac_14(D));
  # DEBUG BEGIN_STMT
  _5 = emac_14(D)->emac_base_va;
  pfe_emac_cfg_disable_ts (_5);
  # DEBUG BEGIN_STMT
  pfe_emac_addr_db_drop_all (emac_14(D));
  # DEBUG BEGIN_STMT
  # DEBUG D#33 => &emac_14(D)->mutex
  _29 = MEM[(const oal_mutex_t *)emac_14(D) + 24B];
  # DEBUG D#2 => D#33
  oal_mutex_unlock.isra.0 (_29);
  # DEBUG BEGIN_STMT
  _6 = &emac_14(D)->mutex;
  oal_mutex_destroy (_6);
  # DEBUG BEGIN_STMT
  _7 = &emac_14(D)->ts_mutex;
  oal_mutex_destroy (_7);

  <bb 7> [local count: 220893212]:
  zero_addr ={v} {CLOBBER};
  return;

}


pfe_emac_get_addr (struct pfe_emac_t * emac, uint8_t * addr)
{
  errno_t ret;
  const struct pfe_mac_addr_db_entry_t * entry;
  const uint8_t[6] * _1;
  short unsigned int _11;
  short unsigned int _12;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG D#30 => &emac_3(D)->mutex
  _11 = MEM[(const oal_mutex_t *)emac_3(D) + 24B];
  # DEBUG D#1 => D#30
  oal_mutex_lock.isra.0 (_11);
  # DEBUG BEGIN_STMT
  entry_6 = pfe_emac_addr_db_find_by_slot (emac_3(D), 0);
  # DEBUG entry => entry_6
  # DEBUG BEGIN_STMT
  if (entry_6 == 0B)
    goto <bb 3>; [46.53%]
  else
    goto <bb 4>; [53.47%]

  <bb 3> [local count: 499612071]:
  # DEBUG BEGIN_STMT
  entry_7 = pfe_emac_addr_db_get_first (emac_3(D));
  # DEBUG entry => entry_7
  # DEBUG BEGIN_STMT
  if (entry_7 == 0B)
    goto <bb 5>; [18.75%]
  else
    goto <bb 4>; [81.25%]

  <bb 4> [local count: 980064562]:
  # entry_13 = PHI <entry_7(3), entry_6(2)>
  # DEBUG ret => NULL
  # DEBUG entry => NULL
  # DEBUG BEGIN_STMT
  _1 = &entry_13->addr;
  memcpy (addr_8(D), _1, 6);

  <bb 5> [local count: 1073741824]:
  # ret_14 = PHI <2(3), 0(4)>
  # DEBUG ret => NULL
  # DEBUG entry => NULL
  # DEBUG BEGIN_STMT
  # DEBUG D#31 => &emac_3(D)->mutex
  _12 = MEM[(const oal_mutex_t *)emac_3(D) + 24B];
  # DEBUG D#2 => D#31
  oal_mutex_unlock.isra.0 (_12);
  # DEBUG BEGIN_STMT
  return ret_14;

}


pfe_emac_add_addr (struct pfe_emac_t * emac, const uint8_t * addr, pfe_drv_id_t owner)
{
  const struct pfe_mac_addr_db_entry_t * entry;
  errno_t ret;
  uint32_t slot;
  unsigned char _1;
  unsigned int _2;
  unsigned int _3;
  unsigned int _4;
  unsigned char _5;
  unsigned int _6;
  long unsigned int _7;
  unsigned int _8;
  unsigned char _9;
  unsigned int _10;
  unsigned char _11;
  unsigned char _12;
  unsigned int _13;
  unsigned char _14;
  short unsigned int _35;
  short unsigned int _36;

  <bb 2> [local count: 387606990]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#28 => &emac_19(D)->mutex
  _35 = MEM[(const oal_mutex_t *)emac_19(D) + 24B];
  # DEBUG D#1 => D#28
  oal_mutex_lock.isra.0 (_35);
  # DEBUG BEGIN_STMT
  entry_24 = pfe_emac_addr_db_find_by_addr (emac_19(D), addr_22(D), owner_23(D));
  # DEBUG entry => entry_24
  # DEBUG BEGIN_STMT
  if (entry_24 != 0B)
    goto <bb 12>; [55.68%]
  else
    goto <bb 13>; [44.32%]

  <bb 13> [local count: 171787418]:
  goto <bb 5>; [100.00%]

  <bb 3> [local count: 954449108]:
  # DEBUG BEGIN_STMT
  _1 = emac_19(D)->mac_addr_slots;
  _2 = (unsigned int) _1;
  _3 = _2 >> slot_16;
  _4 = _3 & 1;
  if (_4 == 0)
    goto <bb 6>; [5.50%]
  else
    goto <bb 4>; [94.50%]

  <bb 4> [local count: 901954407]:
  # DEBUG BEGIN_STMT
  slot_25 = slot_16 + 1;
  # DEBUG slot => slot_25

  <bb 5> [local count: 1073741824]:
  # slot_16 = PHI <slot_25(4), 0(13)>
  # DEBUG slot => slot_16
  # DEBUG BEGIN_STMT
  if (slot_16 != 8)
    goto <bb 3>; [88.89%]
  else
    goto <bb 6>; [11.11%]

  <bb 6> [local count: 171787418]:
  # slot_15 = PHI <slot_16(3), slot_16(5)>
  # DEBUG BEGIN_STMT
  if (slot_15 == 8)
    goto <bb 7>; [51.12%]
  else
    goto <bb 10>; [48.88%]

  <bb 7> [local count: 87817728]:
  # DEBUG BEGIN_STMT
  _5 = pfe_emac_is_broad (addr_22(D));
  if (_5 != 0)
    goto <bb 12>; [52.23%]
  else
    goto <bb 8>; [47.77%]

  <bb 8> [local count: 41950529]:
  # DEBUG BEGIN_STMT
  _6 = emac_19(D)->emac_base_va;
  _7 = pfe_emac_cfg_get_hash (_6, addr_22(D));
  # DEBUG hash => (int32_t) _7
  # DEBUG BEGIN_STMT
  ret_32 = pfe_emac_addr_db_add (emac_19(D), addr_22(D), 1, _7, owner_23(D));
  # DEBUG ret => ret_32
  # DEBUG BEGIN_STMT
  if (ret_32 == 0)
    goto <bb 9>; [33.00%]
  else
    goto <bb 12>; [67.00%]

  <bb 9> [local count: 13843674]:
  # DEBUG BEGIN_STMT
  _8 = emac_19(D)->emac_base_va;
  pfe_emac_cfg_set_hash_group (_8, _7, 1);
  goto <bb 12>; [100.00%]

  <bb 10> [local count: 83969690]:
  # DEBUG BEGIN_STMT
  ret_27 = pfe_emac_addr_db_add (emac_19(D), addr_22(D), 0, slot_15, owner_23(D));
  # DEBUG ret => ret_27
  # DEBUG BEGIN_STMT
  if (ret_27 == 0)
    goto <bb 11>; [33.00%]
  else
    goto <bb 12>; [67.00%]

  <bb 11> [local count: 27709998]:
  # DEBUG BEGIN_STMT
  _9 = emac_19(D)->mac_addr_slots;
  _10 = 1 << slot_15;
  _11 = (unsigned char) _10;
  _12 = _9 | _11;
  emac_19(D)->mac_addr_slots = _12;
  # DEBUG BEGIN_STMT
  _13 = emac_19(D)->emac_base_va;
  _14 = (unsigned char) slot_15;
  pfe_emac_cfg_write_addr_slot (_13, addr_22(D), _14);

  <bb 12> [local count: 387606990]:
  # ret_17 = PHI <116(2), ret_32(8), ret_27(10), 0(11), 22(7), 0(9)>
  # DEBUG ret => ret_17
  # DEBUG BEGIN_STMT
  # DEBUG D#29 => &emac_19(D)->mutex
  _36 = MEM[(const oal_mutex_t *)emac_19(D) + 24B];
  # DEBUG D#2 => D#29
  oal_mutex_unlock.isra.0 (_36);
  # DEBUG BEGIN_STMT
  return ret_17;

}


pfe_emac_del_addr_nolock (struct pfe_emac_t * emac, const uint8_t * addr, pfe_drv_id_t owner)
{
  unsigned char local_entry$addr_slot_idx;
  unsigned char local_entry$in_hash_grp;
  long unsigned int local_entry$hash;
  uint8_t zero_addr[6];
  errno_t ret;
  struct pfe_mac_addr_db_entry_t * entry;
  struct pfe_mac_addr_db_entry_t * _1;
  unsigned int _2;
  unsigned int _3;
  unsigned char _4;
  int _5;
  unsigned int _6;
  unsigned char _7;
  unsigned char _8;
  unsigned char _9;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  entry_17 = pfe_emac_addr_db_find_by_addr (emac_13(D), addr_14(D), owner_15(D));
  # DEBUG entry => entry_17
  # DEBUG BEGIN_STMT
  if (entry_17 == 0B)
    goto <bb 8>; [31.91%]
  else
    goto <bb 3>; [68.09%]

  <bb 3> [local count: 731110809]:
  # DEBUG BEGIN_STMT
  local_entry$hash_21 = MEM[(struct pfe_mac_addr_db_entry_t *)entry_17 + 8B];
  # DEBUG local_entry$hash => local_entry$hash_21
  local_entry$in_hash_grp_28 = MEM[(struct pfe_mac_addr_db_entry_t *)entry_17 + 12B];
  # DEBUG local_entry$in_hash_grp => local_entry$in_hash_grp_28
  local_entry$addr_slot_idx_29 = MEM[(struct pfe_mac_addr_db_entry_t *)entry_17 + 13B];
  # DEBUG local_entry$addr_slot_idx => local_entry$addr_slot_idx_29
  # DEBUG BEGIN_STMT
  # DEBUG D#5 => emac_13(D)
  ret_19 = pfe_emac_addr_db_del_entry.isra.0 (entry_17);
  # DEBUG ret => ret_19
  # DEBUG BEGIN_STMT
  if (ret_19 == 0)
    goto <bb 4>; [33.00%]
  else
    goto <bb 8>; [67.00%]

  <bb 4> [local count: 241266567]:
  # DEBUG BEGIN_STMT
  oal_mm_free (entry_17);
  # DEBUG BEGIN_STMT
  # DEBUG entry => 0B
  # DEBUG BEGIN_STMT
  if (local_entry$in_hash_grp_28 == 1)
    goto <bb 5>; [34.00%]
  else
    goto <bb 7>; [66.00%]

  <bb 5> [local count: 82030633]:
  # DEBUG BEGIN_STMT
  _1 = pfe_emac_addr_db_find_by_hash (emac_13(D), local_entry$hash_21);
  if (_1 != 0B)
    goto <bb 8>; [82.57%]
  else
    goto <bb 6>; [17.43%]

  <bb 6> [local count: 14297939]:
  # DEBUG BEGIN_STMT
  _2 = emac_13(D)->emac_base_va;
  pfe_emac_cfg_set_hash_group (_2, local_entry$hash_21, 0);
  goto <bb 8>; [100.00%]

  <bb 7> [local count: 159235934]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  memset (&zero_addr, 0, 6);
  # DEBUG BEGIN_STMT
  _3 = emac_13(D)->emac_base_va;
  pfe_emac_cfg_write_addr_slot (_3, &zero_addr, local_entry$addr_slot_idx_29);
  # DEBUG BEGIN_STMT
  _4 = emac_13(D)->mac_addr_slots;
  _5 = (int) local_entry$addr_slot_idx_29;
  _6 = 1 << _5;
  _7 = (unsigned char) _6;
  _8 = ~_7;
  _9 = _4 & _8;
  emac_13(D)->mac_addr_slots = _9;
  zero_addr ={v} {CLOBBER};

  <bb 8> [local count: 1073741824]:
  # ret_10 = PHI <2(2), ret_19(3), 0(6), 0(7), 0(5)>
  # DEBUG ret => ret_10
  # DEBUG BEGIN_STMT
  # DEBUG D#6 => {CLOBBER}
  # DEBUG local_entry$hash => D#6
  # DEBUG D#7 => {CLOBBER}
  # DEBUG local_entry$in_hash_grp => D#7
  # DEBUG D#8 => {CLOBBER}
  # DEBUG local_entry$addr_slot_idx => D#8
  return ret_10;

}


pfe_emac_del_addr (struct pfe_emac_t * emac, const uint8_t * addr, pfe_drv_id_t owner)
{
  errno_t ret;
  short unsigned int _9;
  short unsigned int _10;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#26 => &emac_1(D)->mutex
  _9 = MEM[(const oal_mutex_t *)emac_1(D) + 24B];
  # DEBUG D#1 => D#26
  oal_mutex_lock.isra.0 (_9);
  # DEBUG BEGIN_STMT
  ret_7 = pfe_emac_del_addr_nolock (emac_1(D), addr_4(D), owner_5(D));
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  # DEBUG D#27 => &emac_1(D)->mutex
  _10 = MEM[(const oal_mutex_t *)emac_1(D) + 24B];
  # DEBUG D#2 => D#27
  oal_mutex_unlock.isra.0 (_10);
  # DEBUG BEGIN_STMT
  return ret_7;

}


pfe_emac_flush_mac_addrs (struct pfe_emac_t * emac, pfe_emac_crit_t crit, pfe_mac_type_t type, pfe_drv_id_t owner)
{
  errno_t ret;
  struct LLIST_t * tmp_item;
  struct LLIST_t * item;
  const struct pfe_mac_addr_db_entry_t * entry;
  int _1;
  <unnamed type> _2;
  unsigned char _3;
  const uint8_t[6] * _4;
  struct LLIST_t * _5;
  short unsigned int _27;
  short unsigned int _28;

  <bb 2> [local count: 61744126]:
  # DEBUG BEGIN_STMT
  # DEBUG entry => 0B
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#24 => &emac_14(D)->mutex
  _27 = MEM[(const oal_mutex_t *)emac_14(D) + 24B];
  # DEBUG D#1 => D#24
  oal_mutex_lock.isra.0 (_27);
  # DEBUG BEGIN_STMT
  item_17 = emac_14(D)->mac_addr_list.prNext;
  # DEBUG item => item_17
  tmp_item_18 = item_17->prNext;
  # DEBUG tmp_item => tmp_item_18
  goto <bb 8>; [100.00%]

  <bb 3> [local count: 1014686026]:
  # DEBUG BEGIN_STMT
  _1 = item_6 - 14B;
  entry_19 = (const struct pfe_mac_addr_db_entry_t *) _1;
  # DEBUG entry => entry_19
  # DEBUG BEGIN_STMT
  if (item_6 != 14B)
    goto <bb 4>; [70.00%]
  else
    goto <bb 7>; [30.00%]

  <bb 4> [local count: 710280218]:
  _2 = entry_19->owner;
  if (_2 == owner_20(D))
    goto <bb 5>; [34.00%]
  else
    goto <bb 7>; [66.00%]

  <bb 5> [local count: 241495274]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = pfe_emac_flush_criterion_eval (entry_19, crit_21(D), type_22(D), owner_20(D));
  if (_3 == 1)
    goto <bb 6>; [20.24%]
  else
    goto <bb 7>; [79.76%]

  <bb 6> [local count: 48878643]:
  # DEBUG BEGIN_STMT
  _4 = &entry_19->addr;
  ret_24 = pfe_emac_del_addr_nolock (emac_14(D), _4, _2);
  # DEBUG ret => ret_24
  # DEBUG BEGIN_STMT
  if (ret_24 != 0)
    goto <bb 9>; [5.50%]
  else
    goto <bb 7>; [94.50%]

  <bb 7> [local count: 1011997701]:
  # ret_8 = PHI <ret_9(3), ret_9(4), ret_24(6), ret_9(5)>
  # DEBUG ret => ret_8
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG item => tmp_item_7
  tmp_item_25 = tmp_item_7->prNext;
  # DEBUG tmp_item => tmp_item_25

  <bb 8> [local count: 1073741824]:
  # item_6 = PHI <item_17(2), tmp_item_7(7)>
  # tmp_item_7 = PHI <tmp_item_18(2), tmp_item_25(7)>
  # ret_9 = PHI <0(2), ret_8(7)>
  # DEBUG ret => ret_9
  # DEBUG tmp_item => tmp_item_7
  # DEBUG item => item_6
  # DEBUG BEGIN_STMT
  _5 = &emac_14(D)->mac_addr_list;
  if (_5 != item_6)
    goto <bb 3>; [94.50%]
  else
    goto <bb 9>; [5.50%]

  <bb 9> [local count: 61744126]:
  # ret_10 = PHI <ret_24(6), ret_9(8)>
  # DEBUG ret => ret_10
  # DEBUG BEGIN_STMT
  # DEBUG D#25 => &emac_14(D)->mutex
  _28 = MEM[(const oal_mutex_t *)emac_14(D) + 24B];
  # DEBUG D#2 => D#25
  oal_mutex_unlock.isra.0 (_28);
  # DEBUG BEGIN_STMT
  return ret_10;

}


pfe_emac_set_link_duplex (const struct pfe_emac_t * emac, pfe_emac_duplex_t duplex)
{
  errno_t ret;
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  ret_6 = pfe_emac_cfg_set_duplex (_1, duplex_4(D));
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  return ret_6;

}


pfe_emac_set_link_speed (const struct pfe_emac_t * emac, pfe_emac_speed_t link_speed)
{
  errno_t ret;
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  ret_6 = pfe_emac_cfg_set_speed (_1, link_speed_4(D));
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  return ret_6;

}


pfe_emac_get_link_status (const struct pfe_emac_t * emac, pfe_emac_link_speed_t * link_speed, pfe_emac_duplex_t * duplex, bool_t * link)
{
  errno_t ret;
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  ret_8 = pfe_emac_cfg_get_link_status (_1, link_speed_4(D), duplex_5(D), link_6(D));
  # DEBUG ret => ret_8
  # DEBUG BEGIN_STMT
  return ret_8;

}


pfe_emac_get_link_config (const struct pfe_emac_t * emac, pfe_emac_speed_t * speed, pfe_emac_duplex_t * duplex)
{
  errno_t ret;
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  ret_7 = pfe_emac_cfg_get_link_config (_1, speed_4(D), duplex_5(D));
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  return ret_7;

}


pfe_emac_get_mii_mode (const struct pfe_emac_t * emac)
{
  pfe_emac_mii_mode_t mii_mode;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  mii_mode_3 = emac_2(D)->mode;
  # DEBUG mii_mode => mii_mode_3
  # DEBUG BEGIN_STMT
  return mii_mode_3;

}


pfe_emac_set_max_frame_length (const struct pfe_emac_t * emac, uint32_t len)
{
  errno_t ret;
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  ret_6 = pfe_emac_cfg_set_max_frame_length (_1, len_4(D));
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  return ret_6;

}


pfe_emac_disable_rx_flow_control (const struct pfe_emac_t * emac)
{
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  pfe_emac_cfg_set_rx_flow_control (_1, 0);
  return;

}


pfe_emac_enable_rx_flow_control (const struct pfe_emac_t * emac)
{
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  pfe_emac_cfg_set_rx_flow_control (_1, 1);
  return;

}


pfe_emac_disable_tx_flow_control (const struct pfe_emac_t * emac)
{
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  pfe_emac_cfg_set_tx_flow_control (_1, 0);
  return;

}


pfe_emac_enable_tx_flow_control (const struct pfe_emac_t * emac)
{
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  pfe_emac_cfg_set_tx_flow_control (_1, 1);
  return;

}


pfe_emac_get_flow_control (const struct pfe_emac_t * emac, bool_t * tx_enable, bool_t * rx_enable)
{
  unsigned int _1;
  unsigned int _2;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = emac_4(D)->emac_base_va;
  pfe_emac_cfg_get_tx_flow_control (_1, tx_enable_5(D));
  # DEBUG BEGIN_STMT
  _2 = emac_4(D)->emac_base_va;
  pfe_emac_cfg_get_rx_flow_control (_2, rx_enable_7(D));
  return;

}


pfe_emac_disable_broadcast (const struct pfe_emac_t * emac)
{
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  pfe_emac_cfg_set_broadcast (_1, 0);
  return;

}


pfe_emac_enable_broadcast (const struct pfe_emac_t * emac)
{
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  pfe_emac_cfg_set_broadcast (_1, 1);
  return;

}


pfe_emac_disable_allmulti_mode (const struct pfe_emac_t * emac)
{
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  pfe_emac_cfg_set_allmulti_mode (_1, 0);
  return;

}


pfe_emac_enable_allmulti_mode (const struct pfe_emac_t * emac)
{
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  pfe_emac_cfg_set_allmulti_mode (_1, 1);
  return;

}


pfe_emac_disable_promisc_mode (const struct pfe_emac_t * emac)
{
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  pfe_emac_cfg_set_promisc_mode (_1, 0);
  return;

}


pfe_emac_enable_promisc_mode (const struct pfe_emac_t * emac)
{
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  pfe_emac_cfg_set_promisc_mode (_1, 1);
  return;

}


pfe_emac_disable_loopback (const struct pfe_emac_t * emac)
{
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  pfe_emac_cfg_set_loopback (_1, 0);
  return;

}


pfe_emac_enable_loopback (const struct pfe_emac_t * emac)
{
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  pfe_emac_cfg_set_loopback (_1, 1);
  return;

}


pfe_emac_set_ts_time (struct pfe_emac_t * emac, uint32_t sec, uint32_t nsec, uint16_t sec_hi)
{
  errno_t ret;
  unsigned int _1;
  short unsigned int _11;
  short unsigned int _12;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#19 => &emac_2(D)->ts_mutex
  _11 = MEM[(const oal_mutex_t *)emac_2(D) + 32B];
  # DEBUG D#1 => D#19
  oal_mutex_lock.isra.0 (_11);
  # DEBUG BEGIN_STMT
  _1 = emac_2(D)->emac_base_va;
  ret_9 = pfe_emac_cfg_set_ts_time (_1, sec_5(D), nsec_6(D), sec_hi_7(D));
  # DEBUG ret => ret_9
  # DEBUG BEGIN_STMT
  # DEBUG D#20 => &emac_2(D)->ts_mutex
  _12 = MEM[(const oal_mutex_t *)emac_2(D) + 32B];
  # DEBUG D#2 => D#20
  oal_mutex_unlock.isra.0 (_12);
  # DEBUG BEGIN_STMT
  return ret_9;

}


pfe_emac_adjust_ts_time (struct pfe_emac_t * emac, uint32_t sec, uint32_t nsec, bool_t sgn)
{
  errno_t ret;
  unsigned int _1;
  short unsigned int _11;
  short unsigned int _12;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#17 => &emac_2(D)->ts_mutex
  _11 = MEM[(const oal_mutex_t *)emac_2(D) + 32B];
  # DEBUG D#1 => D#17
  oal_mutex_lock.isra.0 (_11);
  # DEBUG BEGIN_STMT
  _1 = emac_2(D)->emac_base_va;
  ret_9 = pfe_emac_cfg_adjust_ts_time (_1, sec_5(D), nsec_6(D), sgn_7(D));
  # DEBUG ret => ret_9
  # DEBUG BEGIN_STMT
  # DEBUG D#18 => &emac_2(D)->ts_mutex
  _12 = MEM[(const oal_mutex_t *)emac_2(D) + 32B];
  # DEBUG D#2 => D#18
  oal_mutex_unlock.isra.0 (_12);
  # DEBUG BEGIN_STMT
  return ret_9;

}


pfe_emac_get_ts_time (struct pfe_emac_t * emac, uint32_t * sec, uint32_t * nsec, uint16_t * sec_hi)
{
  errno_t ret;
  unsigned int _1;
  short unsigned int _12;
  short unsigned int _13;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (sec_4(D) == 0B)
    goto <bb 6>; [18.75%]
  else
    goto <bb 3>; [81.25%]

  <bb 3> [local count: 872415233]:
  if (nsec_5(D) == 0B)
    goto <bb 6>; [18.75%]
  else
    goto <bb 4>; [81.25%]

  <bb 4> [local count: 708837377]:
  if (sec_hi_6(D) == 0B)
    goto <bb 6>; [31.91%]
  else
    goto <bb 5>; [68.09%]

  <bb 5> [local count: 482647369]:
  # DEBUG BEGIN_STMT
  # DEBUG D#15 => &emac_7(D)->ts_mutex
  _12 = MEM[(const oal_mutex_t *)emac_7(D) + 32B];
  # DEBUG D#1 => D#15
  oal_mutex_lock.isra.0 (_12);
  # DEBUG BEGIN_STMT
  _1 = emac_7(D)->emac_base_va;
  pfe_emac_cfg_get_ts_time (_1, sec_4(D), nsec_5(D), sec_hi_6(D));
  # DEBUG BEGIN_STMT
  # DEBUG D#16 => &emac_7(D)->ts_mutex
  _13 = MEM[(const oal_mutex_t *)emac_7(D) + 32B];
  # DEBUG D#2 => D#16
  oal_mutex_unlock.isra.0 (_13);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

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

}


pfe_emac_get_ts_freq_adjustment (struct pfe_emac_t * emac, uint32_t * ppb, bool_t * sgn)
{
  errno_t ret;
  long unsigned int _1;
  unsigned char _2;
  short unsigned int _13;
  short unsigned int _14;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (ppb_5(D) == 0B)
    goto <bb 5>; [18.75%]
  else
    goto <bb 3>; [81.25%]

  <bb 3> [local count: 872415233]:
  if (sgn_6(D) == 0B)
    goto <bb 5>; [31.91%]
  else
    goto <bb 4>; [68.09%]

  <bb 4> [local count: 594027532]:
  # DEBUG BEGIN_STMT
  # DEBUG D#13 => &emac_7(D)->ts_mutex
  _13 = MEM[(const oal_mutex_t *)emac_7(D) + 32B];
  # DEBUG D#1 => D#13
  oal_mutex_lock.isra.0 (_13);
  # DEBUG BEGIN_STMT
  _1 = emac_7(D)->adj_ppb;
  *ppb_5(D) = _1;
  # DEBUG BEGIN_STMT
  _2 = emac_7(D)->adj_sign;
  *sgn_6(D) = _2;
  # DEBUG BEGIN_STMT
  # DEBUG D#14 => &emac_7(D)->ts_mutex
  _14 = MEM[(const oal_mutex_t *)emac_7(D) + 32B];
  # DEBUG D#2 => D#14
  oal_mutex_unlock.isra.0 (_14);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

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

}


pfe_emac_set_ts_freq_adjustment (struct pfe_emac_t * emac, uint32_t ppb, bool_t sgn)
{
  errno_t ret;
  unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  short unsigned int _14;
  short unsigned int _15;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#11 => &emac_4(D)->ts_mutex
  _14 = MEM[(const oal_mutex_t *)emac_4(D) + 32B];
  # DEBUG D#1 => D#11
  oal_mutex_lock.isra.0 (_14);
  # DEBUG BEGIN_STMT
  emac_4(D)->adj_ppb = ppb_7(D);
  # DEBUG BEGIN_STMT
  emac_4(D)->adj_sign = sgn_9(D);
  # DEBUG BEGIN_STMT
  _1 = emac_4(D)->emac_base_va;
  _2 = emac_4(D)->i_clk_hz;
  _3 = emac_4(D)->o_clk_hz;
  ret_12 = pfe_emac_cfg_adjust_ts_freq (_1, _2, _3, ppb_7(D), sgn_9(D));
  # DEBUG ret => ret_12
  # DEBUG BEGIN_STMT
  # DEBUG D#12 => &emac_4(D)->ts_mutex
  _15 = MEM[(const oal_mutex_t *)emac_4(D) + 32B];
  # DEBUG D#2 => D#12
  oal_mutex_unlock.isra.0 (_15);
  # DEBUG BEGIN_STMT
  return ret_12;

}


pfe_emac_enable_ts (struct pfe_emac_t * emac, uint32_t i_clk_hz, uint32_t o_clk_hz)
{
  bool_t eclk;
  errno_t ret;
  unsigned int _1;
  int iftmp.0_3;
  short unsigned int _16;
  short unsigned int _17;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (i_clk_hz_5(D) == 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 536870913]:
  if (o_clk_hz_6(D) == 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 4> [local count: 268435456]:

  <bb 5> [local count: 1073741824]:
  # iftmp.0_3 = PHI <1(3), 0(4), 1(2)>
  eclk_7 = (bool_t) iftmp.0_3;
  # DEBUG eclk => eclk_7
  # DEBUG BEGIN_STMT
  if (eclk_7 == 0)
    goto <bb 6>; [67.00%]
  else
    goto <bb 7>; [33.00%]

  <bb 6> [local count: 719407023]:
  if (i_clk_hz_5(D) <= o_clk_hz_6(D))
    goto <bb 8>; [35.00%]
  else
    goto <bb 7>; [65.00%]

  <bb 7> [local count: 821949367]:
  # DEBUG BEGIN_STMT
  emac_9(D)->i_clk_hz = i_clk_hz_5(D);
  # DEBUG BEGIN_STMT
  emac_9(D)->o_clk_hz = o_clk_hz_6(D);
  # DEBUG BEGIN_STMT
  # DEBUG D#9 => &emac_9(D)->ts_mutex
  _16 = MEM[(const oal_mutex_t *)emac_9(D) + 32B];
  # DEBUG D#1 => D#9
  oal_mutex_lock.isra.0 (_16);
  # DEBUG BEGIN_STMT
  _1 = emac_9(D)->emac_base_va;
  ret_14 = pfe_emac_cfg_enable_ts (_1, eclk_7, i_clk_hz_5(D), o_clk_hz_6(D));
  # DEBUG ret => ret_14
  # DEBUG BEGIN_STMT
  # DEBUG D#10 => &emac_9(D)->ts_mutex
  _17 = MEM[(const oal_mutex_t *)emac_9(D) + 32B];
  # DEBUG D#2 => D#10
  oal_mutex_unlock.isra.0 (_17);

  <bb 8> [local count: 1073741824]:
  # ret_2 = PHI <22(6), ret_14(7)>
  # DEBUG ret => ret_2
  # DEBUG BEGIN_STMT
  return ret_2;

}


pfe_emac_disable (const struct pfe_emac_t * emac)
{
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  pfe_emac_cfg_set_enable (_1, 0);
  return;

}


pfe_emac_enable (const struct pfe_emac_t * emac)
{
  unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = emac_3(D)->emac_base_va;
  pfe_emac_cfg_set_enable (_1, 1);
  return;

}


pfe_emac_get_gpi (const struct pfe_emac_t * emac)
{
  struct pfe_gpi_t * _3;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _3 = emac_2(D)->gpi;
  return _3;

}


pfe_emac_bind_gpi (struct pfe_emac_t * emac, struct pfe_gpi_t * gpi)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  emac_2(D)->gpi = gpi_3(D);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  return 0;

}


pfe_emac_get_index (const struct pfe_emac_t * emac)
{
  uint8_t emac_idx;
  unsigned int _1;
  unsigned int _2;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = emac_4(D)->emac_base_va;
  _2 = emac_4(D)->cbus_base_va;
  emac_idx_6 = pfe_emac_cfg_get_index (_1, _2);
  # DEBUG emac_idx => emac_idx_6
  # DEBUG BEGIN_STMT
  return emac_idx_6;

}


pfe_emac_create (addr_t cbus_base_va, addr_t emac_base, pfe_emac_mii_mode_t mode, pfe_emac_speed_t speed, pfe_emac_duplex_t duplex, uint32_t emac_index)
{
  struct pfe_emac_t * emac;
  _Bool _1;
  long int _2;
  long int _3;
  unsigned int _4;
  oal_mutex_t * _5;
  oal_mutex_t * _6;
  unsigned int _7;
  int _8;
  short unsigned int _47;
  short unsigned int _48;
  short unsigned int _49;
  struct LLIST_t * _50;

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

  <bb 3> [local count: 966367642]:
  # DEBUG BEGIN_STMT
  emac_13 = &emac_instance[emac_index_12(D)];
  # DEBUG emac => emac_13
  # DEBUG BEGIN_STMT
  memset (emac_13, 0, 56);
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].cbus_base_va = cbus_base_va_16(D);
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].emac_base_offset = emac_base_18(D);
  # DEBUG BEGIN_STMT
  _4 = cbus_base_va_16(D) + emac_base_18(D);
  MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].emac_base_va = _4;
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].mode = 0;
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].speed = 0;
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].duplex = 0;
  # DEBUG BEGIN_STMT
  if (emac_base_18(D) == 655360)
    goto <bb 4>; [34.00%]
  else
    goto <bb 5>; [66.00%]

  <bb 4> [local count: 328564998]:
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].mutex = 161;
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].ts_mutex = 164;
  goto <bb 8>; [100.00%]

  <bb 5> [local count: 637802644]:
  # DEBUG BEGIN_STMT
  if (emac_base_18(D) == 671744)
    goto <bb 6>; [34.00%]
  else
    goto <bb 7>; [66.00%]

  <bb 6> [local count: 216852899]:
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].mutex = 162;
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].ts_mutex = 165;
  goto <bb 8>; [100.00%]

  <bb 7> [local count: 420949745]:
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].mutex = 163;
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].ts_mutex = 166;

  <bb 8> [local count: 966367643]:
  # DEBUG BEGIN_STMT
  _5 = &MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].mutex;
  oal_mutex_init (_5);
  # DEBUG BEGIN_STMT
  _6 = &MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].ts_mutex;
  oal_mutex_init (_6);
  # DEBUG BEGIN_STMT
  # DEBUG D#21 => &MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].mutex
  _47 = MEM[(const oal_mutex_t *)&emac_instance][emac_index_12(D)].mutex;
  # DEBUG D#1 => D#21
  oal_mutex_lock.isra.0 (_47);
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].mac_addr_slots = 0;
  # DEBUG BEGIN_STMT
  # DEBUG emac => emac_13
  # DEBUG INLINE_ENTRY pfe_emac_addr_db_init
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _50 = &MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].mac_addr_list;
  MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].mac_addr_list.prNext = _50;
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].mac_addr_list.prPrev = _50;
  # DEBUG BEGIN_STMT
  # DEBUG emac => NULL
  # DEBUG BEGIN_STMT
  pfe_emac_disable (emac_13);
  # DEBUG BEGIN_STMT
  _7 = MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].emac_base_va;
  _8 = pfe_emac_cfg_init (_7, mode_35(D), speed_36(D), duplex_37(D));
  if (_8 != 0)
    goto <bb 9>; [29.00%]
  else
    goto <bb 10>; [71.00%]

  <bb 9> [local count: 280246616]:
  # DEBUG BEGIN_STMT
  # DEBUG D#23 => &MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].mutex
  _48 = MEM[(const oal_mutex_t *)&emac_instance][emac_index_12(D)].mutex;
  # DEBUG D#2 => D#23
  oal_mutex_unlock.isra.0 (_48);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG emac => 0B
  goto <bb 11>; [100.00%]

  <bb 10> [local count: 686121026]:
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].mode = mode_35(D);
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].speed = speed_36(D);
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].duplex = duplex_37(D);
  # DEBUG BEGIN_STMT
  pfe_emac_disable_loopback (emac_13);
  # DEBUG BEGIN_STMT
  pfe_emac_disable_promisc_mode (emac_13);
  # DEBUG BEGIN_STMT
  pfe_emac_disable_broadcast (emac_13);
  # DEBUG BEGIN_STMT
  # DEBUG D#22 => &MEM[(struct pfe_emac_t *)&emac_instance][emac_index_12(D)].mutex
  _49 = MEM[(const oal_mutex_t *)&emac_instance][emac_index_12(D)].mutex;
  # DEBUG D#2 => D#22
  oal_mutex_unlock.isra.0 (_49);

  <bb 11> [local count: 1073741824]:
  # emac_9 = PHI <0B(2), 0B(9), emac_13(10)>
  # DEBUG emac => emac_9
  # DEBUG BEGIN_STMT
  return emac_9;

}


pfe_emac_addr_db_find_by_hash (const struct pfe_emac_t * emac, uint32_t hash)
{
  bool_t match;
  struct LLIST_t * curItem;
  struct pfe_mac_addr_db_entry_t * entry;
  int _1;
  long unsigned int _2;
  const struct LLIST_t * _3;

  <bb 2> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  # DEBUG entry => 0B
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG match => 0
  # DEBUG BEGIN_STMT
  curItem_11 = emac_10(D)->mac_addr_list.prNext;
  # DEBUG curItem => curItem_11
  goto <bb 5>; [100.00%]

  <bb 3> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _1 = curItem_7 - 14B;
  entry_12 = (struct pfe_mac_addr_db_entry_t *) _1;
  # DEBUG entry => entry_12
  # DEBUG BEGIN_STMT
  _2 = entry_12->hash;
  if (_2 == hash_13(D))
    goto <bb 6>; [5.50%]
  else
    goto <bb 4>; [94.50%]

  <bb 4> [local count: 958878293]:
  # DEBUG BEGIN_STMT
  curItem_14 = curItem_7->prNext;
  # DEBUG curItem => curItem_14

  <bb 5> [local count: 1073741824]:
  # entry_4 = PHI <0B(2), entry_12(4)>
  # curItem_7 = PHI <curItem_11(2), curItem_14(4)>
  # DEBUG curItem => curItem_7
  # DEBUG entry => entry_4
  # DEBUG BEGIN_STMT
  _3 = &emac_10(D)->mac_addr_list;
  if (_3 != curItem_7)
    goto <bb 3>; [94.50%]
  else
    goto <bb 6>; [5.50%]

  <bb 6> [local count: 114863532]:
  # entry_5 = PHI <entry_12(3), entry_4(5)>
  # match_8 = PHI <1(3), 0(5)>
  # DEBUG match => match_8
  # DEBUG entry => entry_5
  # DEBUG BEGIN_STMT
  if (match_8 == 0)
    goto <bb 7>; [29.00%]
  else
    goto <bb 8>; [71.00%]

  <bb 7> [local count: 33310424]:
  # DEBUG BEGIN_STMT
  # DEBUG entry => 0B

  <bb 8> [local count: 114863532]:
  # entry_6 = PHI <entry_5(6), 0B(7)>
  # DEBUG entry => entry_6
  # DEBUG BEGIN_STMT
  return entry_6;

}


pfe_emac_addr_db_get_first (const struct pfe_emac_t * emac)
{
  struct pfe_mac_addr_db_entry_t * db_entry;
  struct LLIST_Struct * _1;
  const struct LLIST_t * _2;
  int _3;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = emac_6(D)->mac_addr_list.prNext;
  _2 = &emac_6(D)->mac_addr_list;
  if (_1 == _2)
    goto <bb 4>; [14.90%]
  else
    goto <bb 3>; [85.10%]

  <bb 3> [local count: 913754293]:
  # DEBUG BEGIN_STMT
  _3 = _1 - 14B;
  db_entry_7 = (struct pfe_mac_addr_db_entry_t *) _3;
  # DEBUG db_entry => db_entry_7

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

}


pfe_emac_addr_db_find_by_addr (const struct pfe_emac_t * emac, const uint8_t * addr, pfe_drv_id_t owner)
{
  bool_t match;
  struct LLIST_t * curItem;
  struct pfe_mac_addr_db_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 entry => 0B
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG match => 0
  # DEBUG BEGIN_STMT
  curItem_13 = emac_12(D)->mac_addr_list.prNext;
  # DEBUG curItem => curItem_13
  goto <bb 6>; [100.00%]

  <bb 3> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _1 = curItem_9 - 14B;
  entry_14 = (struct pfe_mac_addr_db_entry_t *) _1;
  # DEBUG entry => entry_14
  # DEBUG BEGIN_STMT
  _2 = entry_14->owner;
  if (_2 == owner_15(D))
    goto <bb 4>; [34.00%]
  else
    goto <bb 5>; [66.00%]

  <bb 4> [local count: 344993248]:
  _3 = &entry_14->addr;
  _4 = memcmp (addr_16(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
  curItem_17 = curItem_9->prNext;
  # DEBUG curItem => curItem_17

  <bb 6> [local count: 1073741824]:
  # entry_6 = PHI <0B(2), entry_14(5)>
  # curItem_9 = PHI <curItem_13(2), curItem_17(5)>
  # DEBUG curItem => curItem_9
  # DEBUG entry => entry_6
  # DEBUG BEGIN_STMT
  _5 = &emac_12(D)->mac_addr_list;
  if (_5 != curItem_9)
    goto <bb 3>; [94.50%]
  else
    goto <bb 7>; [5.50%]

  <bb 7> [local count: 78030429]:
  # entry_7 = PHI <entry_14(4), entry_6(6)>
  # match_10 = PHI <1(4), 0(6)>
  # DEBUG match => match_10
  # DEBUG entry => entry_7
  # DEBUG BEGIN_STMT
  if (match_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_emac_addr_db_drop_all (const struct pfe_emac_t * emac)
{
  struct LLIST_t * tmp_item;
  struct LLIST_t * curItem;
  struct pfe_mac_addr_db_entry_t * entry;
  int _1;
  struct LLIST_Struct * _2;
  struct LLIST_Struct * _3;
  struct LLIST_Struct * _4;
  const struct LLIST_t * _5;

  <bb 2> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  curItem_11 = emac_10(D)->mac_addr_list.prNext;
  # DEBUG curItem => curItem_11
  tmp_item_12 = curItem_11->prNext;
  # DEBUG tmp_item => tmp_item_12
  goto <bb 4>; [100.00%]

  <bb 3> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  _1 = curItem_6 - 14B;
  entry_13 = (struct pfe_mac_addr_db_entry_t *) _1;
  # DEBUG entry => entry_13
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = entry_13->iterator.prPrev;
  _3 = entry_13->iterator.prNext;
  _2->prNext = _3;
  # DEBUG BEGIN_STMT
  _4 = entry_13->iterator.prNext;
  _4->prPrev = _2;
  # DEBUG BEGIN_STMT
  entry_13->iterator.prPrev = 0B;
  # DEBUG BEGIN_STMT
  entry_13->iterator.prNext = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  oal_mm_free (entry_13);
  # DEBUG BEGIN_STMT
  # DEBUG curItem => tmp_item_7
  tmp_item_19 = tmp_item_7->prNext;
  # DEBUG tmp_item => tmp_item_19

  <bb 4> [local count: 1073741824]:
  # curItem_6 = PHI <curItem_11(2), tmp_item_7(3)>
  # tmp_item_7 = PHI <tmp_item_12(2), tmp_item_19(3)>
  # DEBUG tmp_item => tmp_item_7
  # DEBUG curItem => curItem_6
  # DEBUG BEGIN_STMT
  _5 = &emac_10(D)->mac_addr_list;
  if (_5 != curItem_6)
    goto <bb 3>; [89.00%]
  else
    goto <bb 5>; [11.00%]

  <bb 5> [local count: 118111601]:
  return;

}


pfe_emac_addr_db_add (struct pfe_emac_t * emac, const uint8_t * addr, bool_t in_hash_grp, uint32_t data, pfe_drv_id_t owner)
{
  errno_t ret;
  struct pfe_mac_addr_db_entry_t * entry;
  unsigned char _1;
  uint8_t[6] * _2;
  struct LLIST_Struct * _3;
  struct LLIST_t * _4;
  struct LLIST_t * _5;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  entry_11 = oal_mm_malloc (24);
  # DEBUG entry => entry_11
  # DEBUG BEGIN_STMT
  if (entry_11 == 0B)
    goto <bb 7>; [18.75%]
  else
    goto <bb 3>; [81.25%]

  <bb 3> [local count: 872415233]:
  # DEBUG BEGIN_STMT
  if (in_hash_grp_12(D) != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 4> [local count: 436207616]:
  # DEBUG BEGIN_STMT
  entry_11->hash = data_13(D);
  # DEBUG BEGIN_STMT
  entry_11->in_hash_grp = 1;
  goto <bb 6>; [100.00%]

  <bb 5> [local count: 436207616]:
  # DEBUG BEGIN_STMT
  _1 = (unsigned char) data_13(D);
  entry_11->addr_slot_idx = _1;
  # DEBUG BEGIN_STMT
  entry_11->in_hash_grp = 0;

  <bb 6> [local count: 872415233]:
  # DEBUG BEGIN_STMT
  entry_11->owner = owner_18(D);
  # DEBUG BEGIN_STMT
  _2 = &entry_11->addr;
  memcpy (_2, addr_20(D), 6);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = emac_22(D)->mac_addr_list.prPrev;
  entry_11->iterator.prPrev = _3;
  # DEBUG BEGIN_STMT
  _4 = &emac_22(D)->mac_addr_list;
  entry_11->iterator.prNext = _4;
  # DEBUG BEGIN_STMT
  _5 = &entry_11->iterator;
  _3->prNext = _5;
  # DEBUG BEGIN_STMT
  emac_22(D)->mac_addr_list.prPrev = _5;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 7> [local count: 1073741824]:
  # ret_6 = PHI <11(2), 0(6)>
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  return ret_6;

}


pfe_emac_flush_criterion_eval (const struct pfe_mac_addr_db_entry_t * entry, pfe_emac_crit_t crit, pfe_mac_type_t type, pfe_drv_id_t owner)
{
  bool_t ret;
  <unnamed type> _1;
  const uint8_t[6] * _2;
  <unnamed type> _3;
  const uint8_t[6] * _4;

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

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

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

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

  <bb 6> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  _2 = &entry_8(D)->addr;
  ret_12 = pfe_emac_check_crit_by_type (_2, type_10(D));
  # DEBUG ret => ret_12
  goto <bb 12>; [100.00%]

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

  <bb 8> [local count: 120473832]:
  # DEBUG BEGIN_STMT
  _3 = entry_8(D)->owner;
  if (_3 == owner_9(D))
    goto <bb 9>; [34.00%]
  else
    goto <bb 12>; [66.00%]

  <bb 9> [local count: 40961103]:
  # DEBUG BEGIN_STMT
  _4 = &entry_8(D)->addr;
  ret_11 = pfe_emac_check_crit_by_type (_4, type_10(D));
  # DEBUG ret => ret_11
  goto <bb 12>; [100.00%]

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

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

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

}


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;

}


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;

}


