Variable pfe_phy_if_stats/23 is used by single function
Variable pfe_phy_if_mutex/22 is used by single function
Variable crit_remap_table/21 is used by single function
Variable SchM_Exit_Eth_43_PFE_ETH_EXCLUSIVE_AREA_ID/2 is used by single function
Variable SchM_Enter_Eth_43_PFE_ETH_EXCLUSIVE_AREA_ID/1 is used by single function
pfe_phy_if_destroy.part.0 (struct pfe_phy_if_t * iface)
{
  errno_t ret;
  short unsigned int _2;
  char_t * _3;
  oal_mutex_t * _4;

  <bb 6> [local count: 1073741824]:

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#5 => &iface_1(D)->lock
  _2 = MEM[(const oal_mutex_t *)iface_1(D) + 80B];
  # DEBUG D#2 => D#5
  oal_mutex_unlock.isra.0 (_2);
  # DEBUG BEGIN_STMT
  _3 = iface_1(D)->name;
  if (_3 != 0B)
    goto <bb 3>; [53.47%]
  else
    goto <bb 4>; [46.53%]

  <bb 3> [local count: 574129754]:
  # DEBUG BEGIN_STMT
  oal_mm_free (_3);
  # DEBUG BEGIN_STMT
  iface_1(D)->name = 0B;

  <bb 4> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _4 = &iface_1(D)->lock;
  oal_mutex_destroy (_4);
  # DEBUG BEGIN_STMT
  oal_mm_free (iface_1(D));

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

}


pfe_phy_if_disable_nolock.part.0 (struct pfe_phy_if_t * iface)
{
  errno_t ret;
  pfe_ct_if_flags_t tmp;
  void * _2;
  <unnamed type> _3;
  struct pfe_hif_chnl_t * _4;

  <bb 8> [local count: 1073741823]:

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  iface_1(D)->is_enabled = 0;
  # DEBUG BEGIN_STMT
  _2 = iface_1(D)->port.instance;
  if (_2 == 0B)
    goto <bb 7>; [30.00%]
  else
    goto <bb 3>; [70.00%]

  <bb 3> [local count: 751619277]:
  # DEBUG BEGIN_STMT
  _3 = iface_1(D)->type;
  if (_3 == 1)
    goto <bb 4>; [20.24%]
  else
    goto <bb 5>; [79.76%]

  <bb 4> [local count: 152127742]:
  # DEBUG BEGIN_STMT
  pfe_emac_disable (_2);
  goto <bb 7>; [100.00%]

  <bb 5> [local count: 599491536]:
  # DEBUG BEGIN_STMT
  if (_3 == 2)
    goto <bb 6>; [0.00%]
  else
    goto <bb 7>; [100.00%]

  <bb 6> [count: 0]:
  # DEBUG BEGIN_STMT
  pfe_hif_chnl_rx_disable (_2);
  # DEBUG BEGIN_STMT
  _4 = iface_1(D)->port.hif_ch;
  pfe_hif_chnl_tx_disable (_4);

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

}


pfe_phy_if_get_flag_nolock.isra.0 (const pfe_ct_if_flags_t ISRA.44, pfe_ct_if_flags_t flag)
{
  pfe_ct_if_flags_t ret_flag;
  <unnamed type> _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int flag.31_14;
  long unsigned int _15;

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

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = ISRA.44_18(D);
  _3 = (long unsigned int) _2;
  _4 = _3 >> 24;
  _5 = _3 >> 8;
  _6 = _5 & 65280;
  _7 = _4 | _6;
  _8 = _3 << 8;
  _9 = _8 & 16711680;
  _10 = _7 | _9;
  _11 = _3 << 24;
  _12 = _10 | _11;
  flag.31_14 = (long unsigned int) flag_13(D);
  _15 = _12 & flag.31_14;
  ret_flag_16 = (pfe_ct_if_flags_t) _15;
  # DEBUG ret_flag => ret_flag_16
  # DEBUG BEGIN_STMT
  return ret_flag_16;

}


oal_mutex_unlock.isra.0 (const oal_mutex_t ISRA.41)
{
  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.41_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.39)
{
  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.39_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_phy_if_get_stat_value (struct pfe_phy_if_t * iface, uint32_t stat_id)
{
  uint32_t ret;
  void * _1;
  <unnamed type> _2;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  _1 = iface_6(D)->port.instance;
  if (_1 == 0B)
    goto <bb 5>; [30.00%]
  else
    goto <bb 3>; [70.00%]

  <bb 3> [local count: 751619277]:
  # DEBUG BEGIN_STMT
  _2 = iface_6(D)->type;
  if (_2 == 1)
    goto <bb 4>; [32.03%]
  else
    goto <bb 5>; [67.97%]

  <bb 4> [local count: 240743654]:
  # DEBUG BEGIN_STMT
  ret_9 = pfe_emac_get_stat_value (_1, stat_id_7(D));
  # DEBUG ret => ret_9
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

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

}


__attribute__((pure))
pfe_phy_if_get_name (const struct pfe_phy_if_t * iface)
{
  char_t * str;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  str_3 = iface_2(D)->name;
  # DEBUG str => str_3
  # DEBUG BEGIN_STMT
  return str_3;

}


__attribute__((pure))
pfe_phy_if_get_id (const struct pfe_phy_if_t * iface)
{
  pfe_ct_phy_if_id_t ret;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_3 = iface_2(D)->id;
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  return ret_3;

}


pfe_phy_if_get_rx_mirror (const struct pfe_phy_if_t * iface, uint32_t sel)
{
  struct pfe_mirror_t * ptr;
  uint32_t address;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  const void * address.37_10;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (sel_13(D) > 1)
    goto <bb 4>; [54.41%]
  else
    goto <bb 3>; [45.59%]

  <bb 3> [local count: 489518898]:
  # DEBUG BEGIN_STMT
  _1 = iface_15(D)->phy_if_class.rx_mirrors[sel_13(D)];
  _2 = _1 >> 24;
  _3 = _1 >> 8;
  _4 = _3 & 65280;
  _5 = _2 | _4;
  _6 = _1 << 8;
  _7 = _6 & 16711680;
  _8 = _5 | _7;
  _9 = _1 << 24;
  address_16 = _8 | _9;
  # DEBUG address => address_16
  # DEBUG BEGIN_STMT
  address.37_10 = (const void *) address_16;
  ptr_18 = pfe_mirror_get_first (2, address.37_10);
  # DEBUG ptr => ptr_18

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

}


pfe_phy_if_get_tx_mirror (const struct pfe_phy_if_t * iface, uint32_t sel)
{
  struct pfe_mirror_t * ptr;
  uint32_t address;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  const void * address.36_10;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (sel_13(D) > 1)
    goto <bb 4>; [54.41%]
  else
    goto <bb 3>; [45.59%]

  <bb 3> [local count: 489518898]:
  # DEBUG BEGIN_STMT
  _1 = iface_15(D)->phy_if_class.tx_mirrors[sel_13(D)];
  _2 = _1 >> 24;
  _3 = _1 >> 8;
  _4 = _3 & 65280;
  _5 = _2 | _4;
  _6 = _1 << 8;
  _7 = _6 & 16711680;
  _8 = _5 | _7;
  _9 = _1 << 24;
  address_16 = _8 | _9;
  # DEBUG address => address_16
  # DEBUG BEGIN_STMT
  address.36_10 = (const void *) address_16;
  ptr_18 = pfe_mirror_get_first (2, address.36_10);
  # DEBUG ptr => ptr_18

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

}


pfe_phy_if_set_tx_mirror (struct pfe_phy_if_t * iface, uint32_t sel, const struct pfe_mirror_t * mirror)
{
  uint32_t address;
  uint32_t tmp;
  errno_t ret;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  struct pfe_ct_phy_if_t * _10;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG address => 0
  # DEBUG BEGIN_STMT
  if (sel_15(D) > 1)
    goto <bb 7>; [43.66%]
  else
    goto <bb 3>; [56.34%]

  <bb 3> [local count: 604946144]:
  # DEBUG BEGIN_STMT
  if (mirror_16(D) != 0B)
    goto <bb 4>; [53.47%]
  else
    goto <bb 5>; [46.53%]

  <bb 4> [local count: 323464703]:
  # DEBUG BEGIN_STMT
  address_19 = pfe_mirror_get_address (mirror_16(D));
  # DEBUG address => address_19

  <bb 5> [local count: 604946144]:
  # address_12 = PHI <0(3), address_19(4)>
  # DEBUG address => address_12
  # DEBUG BEGIN_STMT
  tmp_21 = iface_20(D)->phy_if_class.tx_mirrors[sel_15(D)];
  # DEBUG tmp => tmp_21
  # DEBUG BEGIN_STMT
  _1 = address_12 >> 24;
  _2 = address_12 >> 8;
  _3 = _2 & 65280;
  _4 = _1 | _3;
  _5 = address_12 << 8;
  _6 = _5 & 16711680;
  _7 = _4 | _6;
  _8 = address_12 << 24;
  _9 = _7 | _8;
  iface_20(D)->phy_if_class.tx_mirrors[sel_15(D)] = _9;
  # DEBUG BEGIN_STMT
  _10 = &iface_20(D)->phy_if_class;
  ret_24 = pfe_phy_if_write_to_class_nostats (iface_20(D), _10);
  # DEBUG ret => ret_24
  # DEBUG BEGIN_STMT
  if (ret_24 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 6> [local count: 302473072]:
  # DEBUG BEGIN_STMT
  iface_20(D)->phy_if_class.tx_mirrors[sel_15(D)] = tmp_21;

  <bb 7> [local count: 1073741824]:
  # ret_11 = PHI <22(2), ret_24(5), ret_24(6)>
  # DEBUG ret => ret_11
  # DEBUG BEGIN_STMT
  return ret_11;

}


pfe_phy_if_set_rx_mirror (struct pfe_phy_if_t * iface, uint32_t sel, const struct pfe_mirror_t * mirror)
{
  uint32_t address;
  uint32_t tmp;
  errno_t ret;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  struct pfe_ct_phy_if_t * _10;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG address => 0
  # DEBUG BEGIN_STMT
  if (sel_15(D) > 1)
    goto <bb 7>; [43.66%]
  else
    goto <bb 3>; [56.34%]

  <bb 3> [local count: 604946144]:
  # DEBUG BEGIN_STMT
  if (mirror_16(D) != 0B)
    goto <bb 4>; [53.47%]
  else
    goto <bb 5>; [46.53%]

  <bb 4> [local count: 323464703]:
  # DEBUG BEGIN_STMT
  address_19 = pfe_mirror_get_address (mirror_16(D));
  # DEBUG address => address_19

  <bb 5> [local count: 604946144]:
  # address_12 = PHI <0(3), address_19(4)>
  # DEBUG address => address_12
  # DEBUG BEGIN_STMT
  tmp_21 = iface_20(D)->phy_if_class.rx_mirrors[sel_15(D)];
  # DEBUG tmp => tmp_21
  # DEBUG BEGIN_STMT
  _1 = address_12 >> 24;
  _2 = address_12 >> 8;
  _3 = _2 & 65280;
  _4 = _1 | _3;
  _5 = address_12 << 8;
  _6 = _5 & 16711680;
  _7 = _4 | _6;
  _8 = address_12 << 24;
  _9 = _7 | _8;
  iface_20(D)->phy_if_class.rx_mirrors[sel_15(D)] = _9;
  # DEBUG BEGIN_STMT
  _10 = &iface_20(D)->phy_if_class;
  ret_24 = pfe_phy_if_write_to_class_nostats (iface_20(D), _10);
  # DEBUG ret => ret_24
  # DEBUG BEGIN_STMT
  if (ret_24 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 6> [local count: 302473072]:
  # DEBUG BEGIN_STMT
  iface_20(D)->phy_if_class.rx_mirrors[sel_15(D)] = tmp_21;

  <bb 7> [local count: 1073741824]:
  # ret_11 = PHI <22(2), ret_24(5), ret_24(6)>
  # DEBUG ret => ret_11
  # DEBUG BEGIN_STMT
  return ret_11;

}


pfe_phy_if_get_stats (struct pfe_phy_if_t * iface, struct pfe_ct_phy_if_stats_t * stat)
{
  errno_t ret;
  uint32_t i;
  struct pfe_class_t * _1;
  unsigned int _2;
  unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  long unsigned int _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;
  long unsigned int _26;
  long unsigned int _27;
  long unsigned int _28;
  long unsigned int _29;
  long unsigned int _30;
  long unsigned int _31;
  long unsigned int _32;
  long unsigned int _33;
  long unsigned int _34;
  long unsigned int _35;
  long unsigned int _36;
  long unsigned int _37;
  long unsigned int _38;
  long unsigned int _39;
  long unsigned int _40;
  long unsigned int _41;
  long unsigned int _42;
  long unsigned int _43;
  long unsigned int _44;
  long unsigned int _45;
  long unsigned int _46;
  long unsigned int _47;
  long unsigned int _48;
  long unsigned int _49;
  long unsigned int _50;
  long unsigned int _51;
  struct pfe_class_t * _52;
  long unsigned int _53;
  long unsigned int _54;
  long unsigned int _55;
  long unsigned int _56;
  long unsigned int _57;
  long unsigned int _58;
  long unsigned int _59;
  long unsigned int _60;
  long unsigned int _61;
  long unsigned int _62;
  long unsigned int _63;
  long unsigned int _64;
  long unsigned int _65;
  long unsigned int _66;
  long unsigned int _67;
  long unsigned int _68;
  long unsigned int _69;
  long unsigned int _70;
  long unsigned int _71;
  long unsigned int _72;
  long unsigned int _73;
  long unsigned int _74;
  long unsigned int _75;
  long unsigned int _76;
  long unsigned int _77;
  long unsigned int _78;
  long unsigned int _79;
  long unsigned int _80;
  long unsigned int _81;
  long unsigned int _82;
  long unsigned int _83;
  long unsigned int _84;
  long unsigned int _85;
  long unsigned int _86;
  long unsigned int _87;
  long unsigned int _88;
  long unsigned int _89;
  long unsigned int _90;
  long unsigned int _91;
  long unsigned int _92;
  long unsigned int _93;

  <bb 2> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG offset => 0
  # DEBUG BEGIN_STMT
  memset (stat_97(D), 0, 16);
  # DEBUG BEGIN_STMT
  # DEBUG offset => 40
  # DEBUG BEGIN_STMT
  _1 = iface_99(D)->class;
  _2 = iface_99(D)->dmem_base;
  _3 = _2 + 40;
  ret_101 = pfe_class_gather_read_dmem (_1, &pfe_phy_if_stats, _3, 128, 16);
  # DEBUG ret => ret_101
  # DEBUG BEGIN_STMT
  # DEBUG i => 0
  goto <bb 4>; [100.00%]

  <bb 3> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  _4 = stat_97(D)->discarded;
  _5 = pfe_phy_if_stats[i_94].discarded;
  _6 = _5 >> 24;
  _7 = _5 >> 8;
  _8 = _7 & 65280;
  _9 = _6 | _8;
  _10 = _5 << 8;
  _11 = _10 & 16711680;
  _12 = _9 | _11;
  _13 = _5 << 24;
  _14 = _12 | _13;
  _15 = _4 + _14;
  stat_97(D)->discarded = _15;
  # DEBUG BEGIN_STMT
  _16 = stat_97(D)->egress;
  _17 = pfe_phy_if_stats[i_94].egress;
  _18 = _17 >> 24;
  _19 = _17 >> 8;
  _20 = _19 & 65280;
  _21 = _18 | _20;
  _22 = _17 << 8;
  _23 = _22 & 16711680;
  _24 = _21 | _23;
  _25 = _17 << 24;
  _26 = _24 | _25;
  _27 = _16 + _26;
  stat_97(D)->egress = _27;
  # DEBUG BEGIN_STMT
  _28 = stat_97(D)->ingress;
  _29 = pfe_phy_if_stats[i_94].ingress;
  _30 = _29 >> 24;
  _31 = _29 >> 8;
  _32 = _31 & 65280;
  _33 = _30 | _32;
  _34 = _29 << 8;
  _35 = _34 & 16711680;
  _36 = _33 | _35;
  _37 = _29 << 24;
  _38 = _36 | _37;
  _39 = _28 + _38;
  stat_97(D)->ingress = _39;
  # DEBUG BEGIN_STMT
  _40 = stat_97(D)->malformed;
  _41 = pfe_phy_if_stats[i_94].malformed;
  _42 = _41 >> 24;
  _43 = _41 >> 8;
  _44 = _43 & 65280;
  _45 = _42 | _44;
  _46 = _41 << 8;
  _47 = _46 & 16711680;
  _48 = _45 | _47;
  _49 = _41 << 24;
  _50 = _48 | _49;
  _51 = _40 + _50;
  stat_97(D)->malformed = _51;
  # DEBUG BEGIN_STMT
  i_111 = i_94 + 1;
  # DEBUG i => i_111

  <bb 4> [local count: 1073741824]:
  # i_94 = PHI <0(2), i_111(3)>
  # DEBUG i => i_94
  # DEBUG BEGIN_STMT
  _52 = iface_99(D)->class;
  _53 = pfe_class_get_num_of_pes (_52);
  if (_53 > i_94)
    goto <bb 3>; [89.00%]
  else
    goto <bb 5>; [11.00%]

  <bb 5> [local count: 118111601]:
  # DEBUG BEGIN_STMT
  _54 = stat_97(D)->discarded;
  _55 = _54 >> 24;
  _56 = _54 >> 8;
  _57 = _56 & 65280;
  _58 = _55 | _57;
  _59 = _54 << 8;
  _60 = _59 & 16711680;
  _61 = _58 | _60;
  _62 = _54 << 24;
  _63 = _61 | _62;
  stat_97(D)->discarded = _63;
  # DEBUG BEGIN_STMT
  _64 = stat_97(D)->egress;
  _65 = _64 >> 24;
  _66 = _64 >> 8;
  _67 = _66 & 65280;
  _68 = _65 | _67;
  _69 = _64 << 8;
  _70 = _69 & 16711680;
  _71 = _68 | _70;
  _72 = _64 << 24;
  _73 = _71 | _72;
  stat_97(D)->egress = _73;
  # DEBUG BEGIN_STMT
  _74 = stat_97(D)->ingress;
  _75 = _74 >> 24;
  _76 = _74 >> 8;
  _77 = _76 & 65280;
  _78 = _75 | _77;
  _79 = _74 << 8;
  _80 = _79 & 16711680;
  _81 = _78 | _80;
  _82 = _74 << 24;
  _83 = _81 | _82;
  stat_97(D)->ingress = _83;
  # DEBUG BEGIN_STMT
  _84 = stat_97(D)->malformed;
  _85 = _84 >> 24;
  _86 = _84 >> 8;
  _87 = _86 & 65280;
  _88 = _85 | _87;
  _89 = _84 << 8;
  _90 = _89 & 16711680;
  _91 = _88 | _90;
  _92 = _84 << 24;
  _93 = _91 | _92;
  stat_97(D)->malformed = _93;
  # DEBUG BEGIN_STMT
  return ret_101;

}


pfe_phy_if_get_ftable (struct pfe_phy_if_t * iface)
{
  uint32_t addr;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_11(D)->phy_if_class.filter;
  _2 = _1 >> 24;
  _3 = _1 >> 8;
  _4 = _3 & 65280;
  _5 = _2 | _4;
  _6 = _1 << 8;
  _7 = _6 & 16711680;
  _8 = _5 | _7;
  _9 = _1 << 24;
  addr_12 = _8 | _9;
  # DEBUG addr => addr_12
  # DEBUG BEGIN_STMT
  return addr_12;

}


pfe_phy_if_set_ftable (struct pfe_phy_if_t * iface, uint32_t table)
{
  addr_t tmp;
  errno_t ret;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  struct pfe_ct_phy_if_t * _10;
  short unsigned int _23;
  short unsigned int _24;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#62 => &iface_13(D)->lock
  _23 = MEM[(const oal_mutex_t *)iface_13(D) + 80B];
  # DEBUG D#1 => D#62
  oal_mutex_lock.isra.0 (_23);
  # DEBUG BEGIN_STMT
  tmp_16 = iface_13(D)->phy_if_class.filter;
  # DEBUG tmp => tmp_16
  # DEBUG BEGIN_STMT
  _1 = table_17(D) >> 24;
  _2 = table_17(D) >> 8;
  _3 = _2 & 65280;
  _4 = _1 | _3;
  _5 = table_17(D) << 8;
  _6 = _5 & 16711680;
  _7 = _4 | _6;
  _8 = table_17(D) << 24;
  _9 = _7 | _8;
  iface_13(D)->phy_if_class.filter = _9;
  # DEBUG BEGIN_STMT
  _10 = &iface_13(D)->phy_if_class;
  ret_20 = pfe_phy_if_write_to_class_nostats (iface_13(D), _10);
  # DEBUG ret => ret_20
  # DEBUG BEGIN_STMT
  if (ret_20 != 0)
    goto <bb 3>; [35.00%]
  else
    goto <bb 4>; [65.00%]

  <bb 3> [local count: 375809639]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  iface_13(D)->phy_if_class.filter = tmp_16;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22

  <bb 4> [local count: 1073741824]:
  # ret_11 = PHI <ret_20(2), 22(3)>
  # DEBUG ret => ret_11
  # DEBUG BEGIN_STMT
  # DEBUG D#63 => &iface_13(D)->lock
  _24 = MEM[(const oal_mutex_t *)iface_13(D) + 80B];
  # DEBUG D#2 => D#63
  oal_mutex_unlock.isra.0 (_24);
  # DEBUG BEGIN_STMT
  return ret_11;

}


pfe_phy_if_get_spd (const struct pfe_phy_if_t * iface)
{
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  uint32_t _12;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = iface_11(D)->phy_if_class.ipsec_spd;
  _2 = _1 >> 24;
  _3 = _1 >> 8;
  _4 = _3 & 65280;
  _5 = _2 | _4;
  _6 = _1 << 8;
  _7 = _6 & 16711680;
  _8 = _5 | _7;
  _9 = _1 << 24;
  _12 = _8 | _9;
  return _12;

}


pfe_phy_if_set_spd (struct pfe_phy_if_t * iface, uint32_t spd_addr)
{
  errno_t ret;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  struct pfe_ct_phy_if_t * _10;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = spd_addr_11(D) >> 24;
  _2 = spd_addr_11(D) >> 8;
  _3 = _2 & 65280;
  _4 = _1 | _3;
  _5 = spd_addr_11(D) << 8;
  _6 = _5 & 16711680;
  _7 = _4 | _6;
  _8 = spd_addr_11(D) << 24;
  _9 = _7 | _8;
  iface_13(D)->phy_if_class.ipsec_spd = _9;
  # DEBUG BEGIN_STMT
  _10 = &iface_13(D)->phy_if_class;
  ret_16 = pfe_phy_if_write_to_class_nostats (iface_13(D), _10);
  # DEBUG ret => ret_16
  # DEBUG BEGIN_STMT
  return ret_16;

}


pfe_phy_if_flush_mac_addrs (struct pfe_phy_if_t * iface, pfe_mac_db_crit_t crit, pfe_mac_type_t type, pfe_drv_id_t owner)
{
  errno_t ret;
  void * _1;
  <unnamed type> _2;
  int _3;
  <unnamed type> _4;
  struct pfe_mac_db_t * _5;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_9(D)->port.instance;
  if (_1 == 0B)
    goto <bb 8>; [30.00%]
  else
    goto <bb 3>; [70.00%]

  <bb 3> [local count: 751619277]:
  # DEBUG BEGIN_STMT
  _2 = iface_9(D)->type;
  if (_2 == 1)
    goto <bb 4>; [20.24%]
  else
    goto <bb 6>; [79.76%]

  <bb 4> [local count: 152127742]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = (int) crit_10(D);
  _4 = crit_remap_table[_3];
  ret_14 = pfe_emac_flush_mac_addrs (_1, _4, type_11(D), owner_12(D));
  # DEBUG ret => ret_14
  # DEBUG BEGIN_STMT
  if (ret_14 != 0)
    goto <bb 8>; [52.23%]
  else
    goto <bb 5>; [47.77%]

  <bb 5> [local count: 72671422]:
  # DEBUG BEGIN_STMT
  _5 = iface_9(D)->mac_db;
  ret_16 = pfe_mac_db_flush (_5, crit_10(D), type_11(D), owner_12(D));
  # DEBUG ret => ret_16
  # DEBUG BEGIN_STMT
  goto <bb 8>; [100.00%]

  <bb 6> [local count: 599491536]:
  # DEBUG BEGIN_STMT
  if (_2 == 2)
    goto <bb 8>; [48.89%]
  else
    goto <bb 7>; [51.11%]

  <bb 7> [local count: 306400124]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22

  <bb 8> [local count: 1073741824]:
  # ret_6 = PHI <0(2), 0(6), ret_16(5), 114(4), 22(7)>
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  return ret_6;

}


pfe_phy_if_get_mac_addr_next (struct pfe_phy_if_t * iface, uint8_t * addr)
{
  errno_t ret;
  void * _1;
  <unnamed type> _2;
  struct pfe_mac_db_t * _3;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  _1 = iface_7(D)->port.instance;
  if (_1 == 0B)
    goto <bb 7>; [18.75%]
  else
    goto <bb 3>; [81.25%]

  <bb 3> [local count: 872415233]:
  # DEBUG BEGIN_STMT
  _2 = iface_7(D)->type;
  if (_2 == 1)
    goto <bb 4>; [20.24%]
  else
    goto <bb 5>; [79.76%]

  <bb 4> [local count: 176576843]:
  # DEBUG BEGIN_STMT
  _3 = iface_7(D)->mac_db;
  ret_10 = pfe_mac_db_get_next_addr (_3, addr_8(D));
  # DEBUG ret => ret_10
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  goto <bb 7>; [100.00%]

  <bb 5> [local count: 695838390]:
  # DEBUG BEGIN_STMT
  if (_2 == 2)
    goto <bb 7>; [34.00%]
  else
    goto <bb 6>; [66.00%]

  <bb 6> [local count: 459253337]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22

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

}


pfe_phy_if_get_mac_addr_first (struct pfe_phy_if_t * iface, uint8_t * addr, pfe_mac_db_crit_t crit, pfe_mac_type_t type, pfe_drv_id_t owner)
{
  errno_t ret;
  void * _1;
  <unnamed type> _2;
  struct pfe_mac_db_t * _3;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  _1 = iface_7(D)->port.instance;
  if (_1 == 0B)
    goto <bb 7>; [18.75%]
  else
    goto <bb 3>; [81.25%]

  <bb 3> [local count: 872415233]:
  # DEBUG BEGIN_STMT
  _2 = iface_7(D)->type;
  if (_2 == 1)
    goto <bb 4>; [20.24%]
  else
    goto <bb 5>; [79.76%]

  <bb 4> [local count: 176576843]:
  # DEBUG BEGIN_STMT
  _3 = iface_7(D)->mac_db;
  ret_13 = pfe_mac_db_get_first_addr (_3, crit_8(D), type_9(D), owner_10(D), addr_11(D));
  # DEBUG ret => ret_13
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  goto <bb 7>; [100.00%]

  <bb 5> [local count: 695838390]:
  # DEBUG BEGIN_STMT
  if (_2 == 2)
    goto <bb 7>; [34.00%]
  else
    goto <bb 6>; [66.00%]

  <bb 6> [local count: 459253337]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22

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

}


pfe_phy_if_get_mac_db (const struct pfe_phy_if_t * iface)
{
  struct pfe_mac_db_t * ptr;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ptr_3 = iface_2(D)->mac_db;
  # DEBUG ptr => ptr_3
  # DEBUG BEGIN_STMT
  return ptr_3;

}


pfe_phy_if_del_mac_addr (struct pfe_phy_if_t * iface, const uint8_t * addr, pfe_drv_id_t owner)
{
  errno_t ret;
  void * _1;
  <unnamed type> _2;
  struct pfe_mac_db_t * _3;
  struct pfe_emac_t * _4;
  struct pfe_mac_db_t * _5;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  _1 = iface_9(D)->port.instance;
  if (_1 == 0B)
    goto <bb 7>; [30.00%]
  else
    goto <bb 3>; [70.00%]

  <bb 3> [local count: 751619277]:
  # DEBUG BEGIN_STMT
  _2 = iface_9(D)->type;
  if (_2 == 1)
    goto <bb 4>; [32.03%]
  else
    goto <bb 7>; [67.97%]

  <bb 4> [local count: 240743654]:
  # DEBUG BEGIN_STMT
  _3 = iface_9(D)->mac_db;
  ret_13 = pfe_mac_db_del_addr (_3, addr_10(D), owner_11(D));
  # DEBUG ret => ret_13
  # DEBUG BEGIN_STMT
  if (ret_13 != 0)
    goto <bb 7>; [67.00%]
  else
    goto <bb 5>; [33.00%]

  <bb 5> [local count: 79445406]:
  # DEBUG BEGIN_STMT
  _4 = iface_9(D)->port.emac;
  ret_15 = pfe_emac_del_addr (_4, addr_10(D), owner_11(D));
  # DEBUG ret => ret_15
  # DEBUG BEGIN_STMT
  if (ret_15 != 0)
    goto <bb 6>; [20.96%]
  else
    goto <bb 7>; [79.04%]

  <bb 6> [local count: 16651757]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = iface_9(D)->mac_db;
  pfe_mac_db_add_addr (_5, addr_10(D), owner_11(D));
  # DEBUG ret => NULL
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 2

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

}


pfe_phy_if_add_mac_addr (struct pfe_phy_if_t * iface, const uint8_t * addr, pfe_drv_id_t owner)
{
  errno_t ret;
  void * _1;
  <unnamed type> _2;
  struct pfe_mac_db_t * _3;
  struct pfe_emac_t * _4;
  struct pfe_mac_db_t * _5;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  _1 = iface_9(D)->port.instance;
  if (_1 == 0B)
    goto <bb 7>; [30.00%]
  else
    goto <bb 3>; [70.00%]

  <bb 3> [local count: 751619277]:
  # DEBUG BEGIN_STMT
  _2 = iface_9(D)->type;
  if (_2 == 1)
    goto <bb 4>; [32.03%]
  else
    goto <bb 7>; [67.97%]

  <bb 4> [local count: 240743654]:
  # DEBUG BEGIN_STMT
  _3 = iface_9(D)->mac_db;
  ret_13 = pfe_mac_db_add_addr (_3, addr_10(D), owner_11(D));
  # DEBUG ret => ret_13
  # DEBUG BEGIN_STMT
  if (ret_13 == 0)
    goto <bb 5>; [33.00%]
  else
    goto <bb 7>; [67.00%]

  <bb 5> [local count: 79445406]:
  # DEBUG BEGIN_STMT
  _4 = iface_9(D)->port.emac;
  ret_15 = pfe_emac_add_addr (_4, addr_10(D), owner_11(D));
  # DEBUG ret => ret_15
  # DEBUG BEGIN_STMT
  if (ret_15 != 0)
    goto <bb 6>; [20.96%]
  else
    goto <bb 7>; [79.04%]

  <bb 6> [local count: 16651757]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = iface_9(D)->mac_db;
  pfe_mac_db_del_addr (_5, addr_10(D), owner_11(D));
  # DEBUG ret => NULL
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 114

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

}


pfe_phy_if_set_rx_flow_control (struct pfe_phy_if_t * iface, bool_t rx_ena)
{
  void * _1;
  <unnamed type> _2;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  _1 = iface_5(D)->port.instance;
  if (_1 == 0B)
    goto <bb 7>; [30.00%]
  else
    goto <bb 3>; [70.00%]

  <bb 3> [local count: 751619278]:
  # DEBUG BEGIN_STMT
  _2 = iface_5(D)->type;
  if (_2 == 1)
    goto <bb 4>; [34.00%]
  else
    goto <bb 7>; [66.00%]

  <bb 4> [local count: 255550554]:
  # DEBUG BEGIN_STMT
  if (rx_ena_6(D) == 1)
    goto <bb 5>; [34.00%]
  else
    goto <bb 6>; [66.00%]

  <bb 5> [local count: 86887188]:
  # DEBUG BEGIN_STMT
  pfe_emac_enable_rx_flow_control (_1);
  goto <bb 7>; [100.00%]

  <bb 6> [local count: 168663366]:
  # DEBUG BEGIN_STMT
  pfe_emac_disable_rx_flow_control (_1);

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

}


pfe_phy_if_set_tx_flow_control (struct pfe_phy_if_t * iface, bool_t tx_ena)
{
  void * _1;
  <unnamed type> _2;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  _1 = iface_5(D)->port.instance;
  if (_1 == 0B)
    goto <bb 7>; [30.00%]
  else
    goto <bb 3>; [70.00%]

  <bb 3> [local count: 751619278]:
  # DEBUG BEGIN_STMT
  _2 = iface_5(D)->type;
  if (_2 == 1)
    goto <bb 4>; [34.00%]
  else
    goto <bb 7>; [66.00%]

  <bb 4> [local count: 255550554]:
  # DEBUG BEGIN_STMT
  if (tx_ena_6(D) == 1)
    goto <bb 5>; [34.00%]
  else
    goto <bb 6>; [66.00%]

  <bb 5> [local count: 86887188]:
  # DEBUG BEGIN_STMT
  pfe_emac_enable_tx_flow_control (_1);
  goto <bb 7>; [100.00%]

  <bb 6> [local count: 168663366]:
  # DEBUG BEGIN_STMT
  pfe_emac_disable_tx_flow_control (_1);

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

}


pfe_phy_if_get_flow_control (struct pfe_phy_if_t * iface, bool_t * tx_ena, bool_t * rx_ena)
{
  void * _1;
  <unnamed type> _2;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  _1 = iface_5(D)->port.instance;
  if (_1 == 0B)
    goto <bb 5>; [30.00%]
  else
    goto <bb 3>; [70.00%]

  <bb 3> [local count: 751619277]:
  # DEBUG BEGIN_STMT
  _2 = iface_5(D)->type;
  if (_2 == 1)
    goto <bb 4>; [20.24%]
  else
    goto <bb 5>; [79.76%]

  <bb 4> [local count: 152127742]:
  # DEBUG BEGIN_STMT
  pfe_emac_get_flow_control (_1, tx_ena_6(D), rx_ena_7(D));

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

}


pfe_phy_if_allmulti_disable (struct pfe_phy_if_t * iface)
{
  errno_t ret;
  void * _1;
  <unnamed type> _2;
  short unsigned int _10;
  short unsigned int _11;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG D#60 => &iface_5(D)->lock
  _10 = MEM[(const oal_mutex_t *)iface_5(D) + 80B];
  # DEBUG D#1 => D#60
  oal_mutex_lock.isra.0 (_10);
  # DEBUG BEGIN_STMT
  _1 = iface_5(D)->port.instance;
  if (_1 == 0B)
    goto <bb 7>; [30.00%]
  else
    goto <bb 3>; [70.00%]

  <bb 3> [local count: 751619277]:
  # DEBUG BEGIN_STMT
  _2 = iface_5(D)->type;
  if (_2 == 1)
    goto <bb 4>; [20.24%]
  else
    goto <bb 5>; [79.76%]

  <bb 4> [local count: 152127742]:
  # DEBUG BEGIN_STMT
  pfe_emac_disable_allmulti_mode (_1);
  goto <bb 7>; [100.00%]

  <bb 5> [local count: 599491536]:
  # DEBUG BEGIN_STMT
  if (_2 == 2)
    goto <bb 7>; [48.89%]
  else
    goto <bb 6>; [51.11%]

  <bb 6> [local count: 306400124]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22

  <bb 7> [local count: 1073741824]:
  # ret_3 = PHI <0(2), 0(4), 0(5), 22(6)>
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  # DEBUG D#61 => &iface_5(D)->lock
  _11 = MEM[(const oal_mutex_t *)iface_5(D) + 80B];
  # DEBUG D#2 => D#61
  oal_mutex_unlock.isra.0 (_11);
  # DEBUG BEGIN_STMT
  return ret_3;

}


pfe_phy_if_allmulti_enable (struct pfe_phy_if_t * iface)
{
  errno_t ret;
  void * _1;
  <unnamed type> _2;
  short unsigned int _10;
  short unsigned int _11;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG D#58 => &iface_5(D)->lock
  _10 = MEM[(const oal_mutex_t *)iface_5(D) + 80B];
  # DEBUG D#1 => D#58
  oal_mutex_lock.isra.0 (_10);
  # DEBUG BEGIN_STMT
  _1 = iface_5(D)->port.instance;
  if (_1 == 0B)
    goto <bb 7>; [30.00%]
  else
    goto <bb 3>; [70.00%]

  <bb 3> [local count: 751619277]:
  # DEBUG BEGIN_STMT
  _2 = iface_5(D)->type;
  if (_2 == 1)
    goto <bb 4>; [20.24%]
  else
    goto <bb 5>; [79.76%]

  <bb 4> [local count: 152127742]:
  # DEBUG BEGIN_STMT
  pfe_emac_enable_allmulti_mode (_1);
  goto <bb 7>; [100.00%]

  <bb 5> [local count: 599491536]:
  # DEBUG BEGIN_STMT
  if (_2 == 2)
    goto <bb 7>; [48.89%]
  else
    goto <bb 6>; [51.11%]

  <bb 6> [local count: 306400124]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22

  <bb 7> [local count: 1073741824]:
  # ret_3 = PHI <0(2), 0(4), 0(5), 22(6)>
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  # DEBUG D#59 => &iface_5(D)->lock
  _11 = MEM[(const oal_mutex_t *)iface_5(D) + 80B];
  # DEBUG D#2 => D#59
  oal_mutex_unlock.isra.0 (_11);
  # DEBUG BEGIN_STMT
  return ret_3;

}


pfe_phy_if_loadbalance_disable (struct pfe_phy_if_t * iface)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  <unnamed type> _1;
  int _2;
  struct pfe_ct_phy_if_t * _3;
  short unsigned int _16;
  short unsigned int _17;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_8(D)->type;
  if (_1 != 2)
    goto <bb 6>; [67.97%]
  else
    goto <bb 3>; [32.03%]

  <bb 3> [local count: 343919506]:
  # DEBUG BEGIN_STMT
  # DEBUG D#56 => &iface_8(D)->lock
  _16 = MEM[(const oal_mutex_t *)iface_8(D) + 80B];
  # DEBUG D#1 => D#56
  oal_mutex_lock.isra.0 (_16);
  # DEBUG BEGIN_STMT
  tmp_10 = iface_8(D)->phy_if_class.flags;
  # DEBUG tmp => tmp_10
  # DEBUG BEGIN_STMT
  _2 = tmp_10 & -1073741825;
  iface_8(D)->phy_if_class.flags = _2;
  # DEBUG BEGIN_STMT
  _3 = &iface_8(D)->phy_if_class;
  ret_13 = pfe_phy_if_write_to_class_nostats (iface_8(D), _3);
  # DEBUG ret => ret_13
  # DEBUG BEGIN_STMT
  if (ret_13 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 4> [local count: 171959753]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  iface_8(D)->phy_if_class.flags = tmp_10;

  <bb 5> [local count: 343919506]:
  # DEBUG BEGIN_STMT
  # DEBUG D#57 => &iface_8(D)->lock
  _17 = MEM[(const oal_mutex_t *)iface_8(D) + 80B];
  # DEBUG D#2 => D#57
  oal_mutex_unlock.isra.0 (_17);

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

}


pfe_phy_if_loadbalance_enable (struct pfe_phy_if_t * iface)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  <unnamed type> _1;
  long unsigned int _2;
  long unsigned int _3;
  <unnamed type> _4;
  struct pfe_ct_phy_if_t * _5;
  short unsigned int _18;
  short unsigned int _19;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_10(D)->type;
  if (_1 != 2)
    goto <bb 6>; [67.97%]
  else
    goto <bb 3>; [32.03%]

  <bb 3> [local count: 343919506]:
  # DEBUG BEGIN_STMT
  # DEBUG D#54 => &iface_10(D)->lock
  _18 = MEM[(const oal_mutex_t *)iface_10(D) + 80B];
  # DEBUG D#1 => D#54
  oal_mutex_lock.isra.0 (_18);
  # DEBUG BEGIN_STMT
  tmp_12 = iface_10(D)->phy_if_class.flags;
  # DEBUG tmp => tmp_12
  # DEBUG BEGIN_STMT
  _2 = (long unsigned int) tmp_12;
  _3 = _2 | 1073741824;
  _4 = (<unnamed type>) _3;
  iface_10(D)->phy_if_class.flags = _4;
  # DEBUG BEGIN_STMT
  _5 = &iface_10(D)->phy_if_class;
  ret_15 = pfe_phy_if_write_to_class_nostats (iface_10(D), _5);
  # DEBUG ret => ret_15
  # DEBUG BEGIN_STMT
  if (ret_15 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 4> [local count: 171959753]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  iface_10(D)->phy_if_class.flags = tmp_12;

  <bb 5> [local count: 343919506]:
  # DEBUG BEGIN_STMT
  # DEBUG D#55 => &iface_10(D)->lock
  _19 = MEM[(const oal_mutex_t *)iface_10(D) + 80B];
  # DEBUG D#2 => D#55
  oal_mutex_unlock.isra.0 (_19);

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

}


pfe_phy_if_promisc_disable (struct pfe_phy_if_t * iface)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  long unsigned int tmp.35_1;
  long unsigned int _2;
  <unnamed type> _3;
  struct pfe_ct_phy_if_t * _4;
  void * _5;
  <unnamed type> _6;
  short unsigned int _19;
  short unsigned int _20;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#52 => &iface_9(D)->lock
  _19 = MEM[(const oal_mutex_t *)iface_9(D) + 80B];
  # DEBUG D#1 => D#52
  oal_mutex_lock.isra.0 (_19);
  # DEBUG BEGIN_STMT
  tmp_12 = iface_9(D)->phy_if_class.flags;
  # DEBUG tmp => tmp_12
  # DEBUG BEGIN_STMT
  tmp.35_1 = (long unsigned int) tmp_12;
  _2 = tmp.35_1 & 4261412863;
  _3 = (<unnamed type>) _2;
  iface_9(D)->phy_if_class.flags = _3;
  # DEBUG BEGIN_STMT
  _4 = &iface_9(D)->phy_if_class;
  ret_15 = pfe_phy_if_write_to_class_nostats (iface_9(D), _4);
  # DEBUG ret => ret_15
  # DEBUG BEGIN_STMT
  if (ret_15 != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870911]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  iface_9(D)->phy_if_class.flags = tmp_12;
  goto <bb 9>; [100.00%]

  <bb 4> [local count: 536870911]:
  # DEBUG BEGIN_STMT
  _5 = iface_9(D)->port.instance;
  if (_5 == 0B)
    goto <bb 9>; [30.00%]
  else
    goto <bb 5>; [70.00%]

  <bb 5> [local count: 375809638]:
  # DEBUG BEGIN_STMT
  _6 = iface_9(D)->type;
  if (_6 == 1)
    goto <bb 6>; [20.24%]
  else
    goto <bb 7>; [79.76%]

  <bb 6> [local count: 76063871]:
  # DEBUG BEGIN_STMT
  pfe_emac_disable_promisc_mode (_5);
  goto <bb 9>; [100.00%]

  <bb 7> [local count: 299745768]:
  # DEBUG BEGIN_STMT
  if (_6 == 2)
    goto <bb 9>; [48.89%]
  else
    goto <bb 8>; [51.11%]

  <bb 8> [local count: 153200062]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22

  <bb 9> [local count: 1073741824]:
  # ret_7 = PHI <ret_15(3), 0(4), 0(6), 0(7), 22(8)>
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  # DEBUG D#53 => &iface_9(D)->lock
  _20 = MEM[(const oal_mutex_t *)iface_9(D) + 80B];
  # DEBUG D#2 => D#53
  oal_mutex_unlock.isra.0 (_20);
  # DEBUG BEGIN_STMT
  return ret_7;

}


pfe_phy_if_promisc_enable (struct pfe_phy_if_t * iface)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  long unsigned int tmp.34_1;
  long unsigned int _2;
  <unnamed type> _3;
  struct pfe_ct_phy_if_t * _4;
  void * _5;
  <unnamed type> _6;
  short unsigned int _19;
  short unsigned int _20;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#50 => &iface_9(D)->lock
  _19 = MEM[(const oal_mutex_t *)iface_9(D) + 80B];
  # DEBUG D#1 => D#50
  oal_mutex_lock.isra.0 (_19);
  # DEBUG BEGIN_STMT
  tmp_12 = iface_9(D)->phy_if_class.flags;
  # DEBUG tmp => tmp_12
  # DEBUG BEGIN_STMT
  tmp.34_1 = (long unsigned int) tmp_12;
  _2 = tmp.34_1 | 33554432;
  _3 = (<unnamed type>) _2;
  iface_9(D)->phy_if_class.flags = _3;
  # DEBUG BEGIN_STMT
  _4 = &iface_9(D)->phy_if_class;
  ret_15 = pfe_phy_if_write_to_class_nostats (iface_9(D), _4);
  # DEBUG ret => ret_15
  # DEBUG BEGIN_STMT
  if (ret_15 != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870911]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  iface_9(D)->phy_if_class.flags = tmp_12;
  goto <bb 9>; [100.00%]

  <bb 4> [local count: 536870911]:
  # DEBUG BEGIN_STMT
  _5 = iface_9(D)->port.instance;
  if (_5 == 0B)
    goto <bb 9>; [30.00%]
  else
    goto <bb 5>; [70.00%]

  <bb 5> [local count: 375809638]:
  # DEBUG BEGIN_STMT
  _6 = iface_9(D)->type;
  if (_6 == 1)
    goto <bb 6>; [20.24%]
  else
    goto <bb 7>; [79.76%]

  <bb 6> [local count: 76063871]:
  # DEBUG BEGIN_STMT
  pfe_emac_enable_promisc_mode (_5);
  goto <bb 9>; [100.00%]

  <bb 7> [local count: 299745768]:
  # DEBUG BEGIN_STMT
  if (_6 == 2)
    goto <bb 9>; [48.89%]
  else
    goto <bb 8>; [51.11%]

  <bb 8> [local count: 153200062]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22

  <bb 9> [local count: 1073741824]:
  # ret_7 = PHI <ret_15(3), 0(4), 0(6), 0(7), 22(8)>
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  # DEBUG D#51 => &iface_9(D)->lock
  _20 = MEM[(const oal_mutex_t *)iface_9(D) + 80B];
  # DEBUG D#2 => D#51
  oal_mutex_unlock.isra.0 (_20);
  # DEBUG BEGIN_STMT
  return ret_7;

}


pfe_phy_if_loopback_disable (struct pfe_phy_if_t * iface)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  unsigned char _1;
  long unsigned int tmp.33_2;
  long unsigned int _3;
  <unnamed type> _4;
  struct pfe_ct_phy_if_t * _5;
  void * _6;
  <unnamed type> _7;
  short unsigned int _23;
  short unsigned int _24;
  short unsigned int _25;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#47 => &iface_12(D)->lock
  _23 = MEM[(const oal_mutex_t *)iface_12(D) + 80B];
  # DEBUG D#1 => D#47
  oal_mutex_lock.isra.0 (_23);
  # DEBUG BEGIN_STMT
  _1 = pfe_phy_if_has_loopback_log_if_nolock (iface_12(D));
  if (_1 == 1)
    goto <bb 3>; [34.00%]
  else
    goto <bb 4>; [66.00%]

  <bb 3> [local count: 365072220]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#49 => &iface_12(D)->lock
  _24 = MEM[(const oal_mutex_t *)iface_12(D) + 80B];
  # DEBUG D#2 => D#49
  oal_mutex_unlock.isra.0 (_24);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  goto <bb 12>; [100.00%]

  <bb 4> [local count: 708669605]:
  # DEBUG BEGIN_STMT
  tmp_15 = iface_12(D)->phy_if_class.flags;
  # DEBUG tmp => tmp_15
  # DEBUG BEGIN_STMT
  tmp.33_2 = (long unsigned int) tmp_15;
  _3 = tmp.33_2 & 4294705151;
  _4 = (<unnamed type>) _3;
  iface_12(D)->phy_if_class.flags = _4;
  # DEBUG BEGIN_STMT
  _5 = &iface_12(D)->phy_if_class;
  ret_18 = pfe_phy_if_write_to_class_nostats (iface_12(D), _5);
  # DEBUG ret => ret_18
  # DEBUG BEGIN_STMT
  if (ret_18 != 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 5> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  iface_12(D)->phy_if_class.flags = tmp_15;
  goto <bb 11>; [100.00%]

  <bb 6> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  _6 = iface_12(D)->port.instance;
  if (_6 == 0B)
    goto <bb 11>; [30.00%]
  else
    goto <bb 7>; [70.00%]

  <bb 7> [local count: 248034361]:
  # DEBUG BEGIN_STMT
  _7 = iface_12(D)->type;
  if (_7 == 1)
    goto <bb 8>; [20.24%]
  else
    goto <bb 9>; [79.76%]

  <bb 8> [local count: 50202155]:
  # DEBUG BEGIN_STMT
  pfe_emac_disable_loopback (_6);
  goto <bb 11>; [100.00%]

  <bb 9> [local count: 197832207]:
  # DEBUG BEGIN_STMT
  if (_7 == 2)
    goto <bb 11>; [34.00%]
  else
    goto <bb 10>; [66.00%]

  <bb 10> [local count: 130569256]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22

  <bb 11> [local count: 708669604]:
  # ret_8 = PHI <ret_18(5), 0(6), 0(8), 0(9), 22(10)>
  # DEBUG ret => ret_8
  # DEBUG BEGIN_STMT
  # DEBUG D#48 => &iface_12(D)->lock
  _25 = MEM[(const oal_mutex_t *)iface_12(D) + 80B];
  # DEBUG D#2 => D#48
  oal_mutex_unlock.isra.0 (_25);

  <bb 12> [local count: 1073741824]:
  # ret_9 = PHI <0(3), ret_8(11)>
  # DEBUG ret => ret_9
  # DEBUG BEGIN_STMT
  return ret_9;

}


pfe_phy_if_loopback_enable (struct pfe_phy_if_t * iface)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  long unsigned int tmp.32_1;
  long unsigned int _2;
  <unnamed type> _3;
  struct pfe_ct_phy_if_t * _4;
  void * _5;
  <unnamed type> _6;
  short unsigned int _19;
  short unsigned int _20;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#45 => &iface_9(D)->lock
  _19 = MEM[(const oal_mutex_t *)iface_9(D) + 80B];
  # DEBUG D#1 => D#45
  oal_mutex_lock.isra.0 (_19);
  # DEBUG BEGIN_STMT
  tmp_12 = iface_9(D)->phy_if_class.flags;
  # DEBUG tmp => tmp_12
  # DEBUG BEGIN_STMT
  tmp.32_1 = (long unsigned int) tmp_12;
  _2 = tmp.32_1 | 262144;
  _3 = (<unnamed type>) _2;
  iface_9(D)->phy_if_class.flags = _3;
  # DEBUG BEGIN_STMT
  _4 = &iface_9(D)->phy_if_class;
  ret_15 = pfe_phy_if_write_to_class_nostats (iface_9(D), _4);
  # DEBUG ret => ret_15
  # DEBUG BEGIN_STMT
  if (ret_15 != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870911]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  iface_9(D)->phy_if_class.flags = tmp_12;
  goto <bb 9>; [100.00%]

  <bb 4> [local count: 536870911]:
  # DEBUG BEGIN_STMT
  _5 = iface_9(D)->port.instance;
  if (_5 == 0B)
    goto <bb 9>; [30.00%]
  else
    goto <bb 5>; [70.00%]

  <bb 5> [local count: 375809638]:
  # DEBUG BEGIN_STMT
  _6 = iface_9(D)->type;
  if (_6 == 1)
    goto <bb 6>; [20.24%]
  else
    goto <bb 7>; [79.76%]

  <bb 6> [local count: 76063871]:
  # DEBUG BEGIN_STMT
  pfe_emac_enable_loopback (_5);
  goto <bb 9>; [100.00%]

  <bb 7> [local count: 299745768]:
  # DEBUG BEGIN_STMT
  if (_6 == 2)
    goto <bb 9>; [48.89%]
  else
    goto <bb 8>; [51.11%]

  <bb 8> [local count: 153200062]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22

  <bb 9> [local count: 1073741824]:
  # ret_7 = PHI <ret_15(3), 0(4), 0(6), 0(7), 22(8)>
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  # DEBUG D#46 => &iface_9(D)->lock
  _20 = MEM[(const oal_mutex_t *)iface_9(D) + 80B];
  # DEBUG D#2 => D#46
  oal_mutex_unlock.isra.0 (_20);
  # DEBUG BEGIN_STMT
  return ret_7;

}


pfe_phy_if_is_promisc (struct pfe_phy_if_t * iface)
{
  bool_t ret;
  <unnamed type> _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  _Bool _13;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_15(D)->phy_if_class.flags;
  _2 = (long unsigned int) _1;
  _3 = _2 >> 24;
  _4 = _2 >> 8;
  _5 = _4 & 65280;
  _6 = _3 | _5;
  _7 = _2 << 8;
  _8 = _7 & 16711680;
  _9 = _6 | _8;
  _10 = _2 << 24;
  _11 = _9 | _10;
  _12 = _11 & 2;
  _13 = _12 != 0;
  ret_16 = (bool_t) _13;
  # DEBUG ret => ret_16
  # DEBUG BEGIN_STMT
  return ret_16;

}


pfe_phy_if_get_flag (struct pfe_phy_if_t * iface, pfe_ct_if_flags_t flag)
{
  pfe_ct_if_flags_t ret;
  <unnamed type> _5;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = MEM[(<unnamed type> *)iface_2(D) + 24B];
  # DEBUG D#3 => iface_2(D)
  ret_4 = pfe_phy_if_get_flag_nolock.isra.0 (_5, flag_3(D));
  # DEBUG ret => ret_4
  # DEBUG BEGIN_STMT
  return ret_4;

}


pfe_phy_if_clear_flag (struct pfe_phy_if_t * iface, pfe_ct_if_flags_t flag)
{
  errno_t ret;
  short unsigned int _8;
  short unsigned int _9;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#43 => &iface_1(D)->lock
  _8 = MEM[(const oal_mutex_t *)iface_1(D) + 80B];
  # DEBUG D#1 => D#43
  oal_mutex_lock.isra.0 (_8);
  # DEBUG BEGIN_STMT
  ret_6 = pfe_phy_if_clear_flag_nolock (iface_1(D), flag_4(D));
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  # DEBUG D#44 => &iface_1(D)->lock
  _9 = MEM[(const oal_mutex_t *)iface_1(D) + 80B];
  # DEBUG D#2 => D#44
  oal_mutex_unlock.isra.0 (_9);
  # DEBUG BEGIN_STMT
  return ret_6;

}


pfe_phy_if_set_flag (struct pfe_phy_if_t * iface, pfe_ct_if_flags_t flag)
{
  errno_t ret;
  short unsigned int _8;
  short unsigned int _9;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#41 => &iface_1(D)->lock
  _8 = MEM[(const oal_mutex_t *)iface_1(D) + 80B];
  # DEBUG D#1 => D#41
  oal_mutex_lock.isra.0 (_8);
  # DEBUG BEGIN_STMT
  ret_6 = pfe_phy_if_set_flag_nolock (iface_1(D), flag_4(D));
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  # DEBUG D#42 => &iface_1(D)->lock
  _9 = MEM[(const oal_mutex_t *)iface_1(D) + 80B];
  # DEBUG D#2 => D#42
  oal_mutex_unlock.isra.0 (_9);
  # DEBUG BEGIN_STMT
  return ret_6;

}


pfe_phy_if_clear_flag_nolock (struct pfe_phy_if_t * iface, pfe_ct_if_flags_t flag)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  unsigned char _1;
  long unsigned int _2;
  long unsigned int flag.27_3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  <unnamed type> _15;
  struct pfe_ct_phy_if_t * _16;
  const char * iftmp.25_18;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (flag_21(D) != 128)
    goto <bb 3>; [79.76%]
  else
    goto <bb 4>; [20.24%]

  <bb 3> [local count: 856416480]:
  if (flag_21(D) == 256)
    goto <bb 4>; [34.00%]
  else
    goto <bb 5>; [66.00%]

  <bb 4> [local count: 508506948]:
  # iftmp.25_18 = PHI <"ptp_conf_check"(3), "vlan_conf_check"(2)>
  # DEBUG feat_name => iftmp.25_18
  # DEBUG BEGIN_STMT
  _1 = pfe_feature_mgr_is_available (iftmp.25_18);
  if (_1 == 0)
    goto <bb 7>; [35.00%]
  else
    goto <bb 5>; [65.00%]

  <bb 5> [local count: 895764393]:
  # DEBUG feat_name => NULL
  # DEBUG BEGIN_STMT
  tmp_25 = iface_24(D)->phy_if_class.flags;
  # DEBUG tmp => tmp_25
  # DEBUG BEGIN_STMT
  _2 = (long unsigned int) tmp_25;
  flag.27_3 = (long unsigned int) flag_21(D);
  _4 = ~flag.27_3;
  _5 = _4 >> 24;
  _6 = _4 >> 8;
  _7 = _6 & 65280;
  _8 = _5 | _7;
  _9 = _4 << 8;
  _10 = _9 & 16711680;
  _11 = _8 | _10;
  _12 = _4 << 24;
  _13 = _11 | _12;
  _14 = _2 & _13;
  _15 = (<unnamed type>) _14;
  iface_24(D)->phy_if_class.flags = _15;
  # DEBUG BEGIN_STMT
  _16 = &iface_24(D)->phy_if_class;
  ret_28 = pfe_phy_if_write_to_class_nostats (iface_24(D), _16);
  # DEBUG ret => ret_28
  # DEBUG BEGIN_STMT
  if (ret_28 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 6> [local count: 447882196]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  iface_24(D)->phy_if_class.flags = tmp_25;

  <bb 7> [local count: 1073741824]:
  # ret_17 = PHI <115(4), ret_28(5), ret_28(6)>
  # DEBUG ret => ret_17
  # DEBUG BEGIN_STMT
  return ret_17;

}


pfe_phy_if_set_flag_nolock (struct pfe_phy_if_t * iface, pfe_ct_if_flags_t flag)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  unsigned char _1;
  long unsigned int _2;
  long unsigned int flag.21_3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  <unnamed type> _14;
  struct pfe_ct_phy_if_t * _15;
  const char * iftmp.19_17;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (flag_20(D) != 128)
    goto <bb 3>; [79.76%]
  else
    goto <bb 4>; [20.24%]

  <bb 3> [local count: 856416480]:
  if (flag_20(D) == 256)
    goto <bb 4>; [34.00%]
  else
    goto <bb 5>; [66.00%]

  <bb 4> [local count: 508506948]:
  # iftmp.19_17 = PHI <"ptp_conf_check"(3), "vlan_conf_check"(2)>
  # DEBUG feat_name => iftmp.19_17
  # DEBUG BEGIN_STMT
  _1 = pfe_feature_mgr_is_available (iftmp.19_17);
  if (_1 == 0)
    goto <bb 7>; [35.00%]
  else
    goto <bb 5>; [65.00%]

  <bb 5> [local count: 895764393]:
  # DEBUG feat_name => NULL
  # DEBUG BEGIN_STMT
  tmp_24 = iface_23(D)->phy_if_class.flags;
  # DEBUG tmp => tmp_24
  # DEBUG BEGIN_STMT
  _2 = (long unsigned int) tmp_24;
  flag.21_3 = (long unsigned int) flag_20(D);
  _4 = flag.21_3 >> 24;
  _5 = flag.21_3 >> 8;
  _6 = _5 & 65280;
  _7 = _4 | _6;
  _8 = flag.21_3 << 8;
  _9 = _8 & 16711680;
  _10 = _7 | _9;
  _11 = flag.21_3 << 24;
  _12 = _10 | _11;
  _13 = _2 | _12;
  _14 = (<unnamed type>) _13;
  iface_23(D)->phy_if_class.flags = _14;
  # DEBUG BEGIN_STMT
  _15 = &iface_23(D)->phy_if_class;
  ret_27 = pfe_phy_if_write_to_class_nostats (iface_23(D), _15);
  # DEBUG ret => ret_27
  # DEBUG BEGIN_STMT
  if (ret_27 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 6> [local count: 447882196]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  iface_23(D)->phy_if_class.flags = tmp_24;

  <bb 7> [local count: 1073741824]:
  # ret_16 = PHI <115(4), ret_27(5), ret_27(6)>
  # DEBUG ret => ret_16
  # DEBUG BEGIN_STMT
  return ret_16;

}


pfe_phy_if_get_mgmt_interface (struct pfe_phy_if_t * iface)
{
  pfe_ct_phy_if_id_t mgmt_interface;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG mgmt_interface => 10
  # DEBUG BEGIN_STMT
  mgmt_interface_3 = iface_2(D)->phy_if_class.mgmt_interface;
  # DEBUG mgmt_interface => mgmt_interface_3
  # DEBUG BEGIN_STMT
  return mgmt_interface_3;

}


pfe_phy_if_set_mgmt_interface (struct pfe_phy_if_t * iface, pfe_ct_phy_if_id_t mgmt_interface)
{
  errno_t ret;
  struct pfe_ct_phy_if_t * _1;
  int _2;
  short unsigned int _11;
  short unsigned int _12;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#39 => &iface_4(D)->lock
  _11 = MEM[(const oal_mutex_t *)iface_4(D) + 80B];
  # DEBUG D#1 => D#39
  oal_mutex_lock.isra.0 (_11);
  # DEBUG BEGIN_STMT
  iface_4(D)->phy_if_class.mgmt_interface = mgmt_interface_7(D);
  # DEBUG BEGIN_STMT
  _1 = &iface_4(D)->phy_if_class;
  _2 = pfe_phy_if_write_to_class_nostats (iface_4(D), _1);
  if (_2 != 0)
    goto <bb 4>; [35.00%]
  else
    goto <bb 3>; [65.00%]

  <bb 3> [local count: 697932186]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 4> [local count: 1073741824]:
  # ret_3 = PHI <22(2), 0(3)>
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  # DEBUG D#40 => &iface_4(D)->lock
  _12 = MEM[(const oal_mutex_t *)iface_4(D) + 80B];
  # DEBUG D#2 => D#40
  oal_mutex_unlock.isra.0 (_12);
  # DEBUG BEGIN_STMT
  return ret_3;

}


pfe_phy_if_disable (struct pfe_phy_if_t * iface)
{
  errno_t ret;
  short unsigned int _7;
  short unsigned int _8;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#33 => &iface_1(D)->lock
  _7 = MEM[(const oal_mutex_t *)iface_1(D) + 80B];
  # DEBUG D#1 => D#33
  oal_mutex_lock.isra.0 (_7);
  # DEBUG BEGIN_STMT
  ret_5 = pfe_phy_if_disable_nolock (iface_1(D));
  # DEBUG ret => ret_5
  # DEBUG BEGIN_STMT
  # DEBUG D#34 => &iface_1(D)->lock
  _8 = MEM[(const oal_mutex_t *)iface_1(D) + 80B];
  # DEBUG D#2 => D#34
  oal_mutex_unlock.isra.0 (_8);
  # DEBUG BEGIN_STMT
  return ret_5;

}


pfe_phy_if_disable_nolock (struct pfe_phy_if_t * iface)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  unsigned char _1;
  long unsigned int tmp.18_2;
  long unsigned int _3;
  <unnamed type> _4;
  struct pfe_ct_phy_if_t * _5;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pfe_phy_if_has_enabled_log_if_nolock (iface_11(D));
  if (_1 == 1)
    goto <bb 6>; [51.12%]
  else
    goto <bb 3>; [48.88%]

  <bb 3> [local count: 524845004]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  tmp_12 = iface_11(D)->phy_if_class.flags;
  # DEBUG tmp => tmp_12
  # DEBUG BEGIN_STMT
  tmp.18_2 = (long unsigned int) tmp_12;
  _3 = tmp.18_2 & 4278190079;
  _4 = (<unnamed type>) _3;
  iface_11(D)->phy_if_class.flags = _4;
  # DEBUG BEGIN_STMT
  _5 = &iface_11(D)->phy_if_class;
  ret_15 = pfe_phy_if_write_to_class_nostats (iface_11(D), _5);
  # DEBUG ret => ret_15
  # DEBUG BEGIN_STMT
  if (ret_15 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 4> [local count: 262422502]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  iface_11(D)->phy_if_class.flags = tmp_12;
  goto <bb 6>; [100.00%]

  <bb 5> [local count: 262422502]:
  ret_7 = pfe_phy_if_disable_nolock.part.0 (iface_11(D));

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

}


pfe_phy_if_enable (struct pfe_phy_if_t * iface)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  long unsigned int _1;
  long unsigned int _2;
  <unnamed type> _3;
  struct pfe_ct_phy_if_t * _4;
  int _5;
  short unsigned int _26;
  short unsigned int _27;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#31 => &iface_8(D)->lock
  _26 = MEM[(const oal_mutex_t *)iface_8(D) + 80B];
  # DEBUG D#1 => D#31
  oal_mutex_lock.isra.0 (_26);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  tmp_11 = iface_8(D)->phy_if_class.flags;
  # DEBUG tmp => tmp_11
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) tmp_11;
  _2 = _1 | 16777216;
  _3 = (<unnamed type>) _2;
  iface_8(D)->phy_if_class.flags = _3;
  # DEBUG BEGIN_STMT
  _4 = &iface_8(D)->phy_if_class;
  ret_14 = pfe_phy_if_write_to_class_nostats (iface_8(D), _4);
  # DEBUG ret => ret_14
  # DEBUG BEGIN_STMT
  if (ret_14 != 0)
    goto <bb 3>; [67.00%]
  else
    goto <bb 4>; [33.00%]

  <bb 3> [local count: 719407023]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  iface_8(D)->phy_if_class.flags = tmp_11;
  goto <bb 8>; [100.00%]

  <bb 4> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  iface_8(D)->is_enabled = 1;
  # DEBUG BEGIN_STMT
  ret_17 = pfe_phy_if_enable_hw_block (iface_8(D));
  # DEBUG ret => ret_17
  # DEBUG BEGIN_STMT
  if (ret_17 != 0)
    goto <bb 5>; [33.00%]
  else
    goto <bb 8>; [67.00%]

  <bb 5> [local count: 116930485]:
  # DEBUG BEGIN_STMT
  tmp_18 = iface_8(D)->phy_if_class.flags;
  # DEBUG tmp => tmp_18
  # DEBUG BEGIN_STMT
  _5 = tmp_18 & -16777217;
  iface_8(D)->phy_if_class.flags = _5;
  # DEBUG BEGIN_STMT
  ret_21 = pfe_phy_if_write_to_class_nostats (iface_8(D), _4);
  # DEBUG ret => ret_21
  # DEBUG BEGIN_STMT
  if (ret_21 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 6> [local count: 58465242]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  iface_8(D)->phy_if_class.flags = tmp_18;
  goto <bb 8>; [100.00%]

  <bb 7> [local count: 58465242]:
  # DEBUG BEGIN_STMT
  iface_8(D)->is_enabled = 0;

  <bb 8> [local count: 1073741824]:
  # ret_6 = PHI <ret_14(3), ret_17(4), ret_21(6), 0(7)>
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  # DEBUG D#32 => &iface_8(D)->lock
  _27 = MEM[(const oal_mutex_t *)iface_8(D) + 80B];
  # DEBUG D#2 => D#32
  oal_mutex_unlock.isra.0 (_27);
  # DEBUG BEGIN_STMT
  return ret_6;

}


pfe_phy_if_enable_hw_block (const struct pfe_phy_if_t * iface)
{
  errno_t ret;
  void * _1;
  <unnamed type> _2;
  struct pfe_hif_chnl_t * _3;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  _1 = iface_7(D)->port.instance;
  if (_1 == 0B)
    goto <bb 8>; [30.00%]
  else
    goto <bb 3>; [70.00%]

  <bb 3> [local count: 751619277]:
  # DEBUG BEGIN_STMT
  _2 = iface_7(D)->type;
  if (_2 == 1)
    goto <bb 4>; [20.24%]
  else
    goto <bb 5>; [79.76%]

  <bb 4> [local count: 152127742]:
  # DEBUG BEGIN_STMT
  pfe_emac_enable (_1);
  goto <bb 8>; [100.00%]

  <bb 5> [local count: 599491536]:
  # DEBUG BEGIN_STMT
  if (_2 == 2)
    goto <bb 6>; [0.00%]
  else
    goto <bb 8>; [100.00%]

  <bb 6> [count: 0]:
  # DEBUG BEGIN_STMT
  ret_9 = pfe_hif_chnl_rx_enable (_1);
  # DEBUG ret => ret_9
  # DEBUG BEGIN_STMT
  if (ret_9 != 0)
    goto <bb 8>; [0.00%]
  else
    goto <bb 7>; [0.00%]

  <bb 7> [count: 0]:
  # DEBUG BEGIN_STMT
  _3 = iface_7(D)->port.hif_ch;
  ret_11 = pfe_hif_chnl_tx_enable (_3);
  # DEBUG ret => ret_11
  # DEBUG BEGIN_STMT

  <bb 8> [local count: 1073741824]:
  # ret_4 = PHI <0(2), 0(4), ret_11(7), 22(5), ret_9(6)>
  # DEBUG ret => ret_4
  # DEBUG BEGIN_STMT
  return ret_4;

}


pfe_phy_if_is_enabled (struct pfe_phy_if_t * iface)
{
  bool_t ret;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_3 = iface_2(D)->is_enabled;
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  return ret_3;

}


pfe_phy_if_bind_util (struct pfe_phy_if_t * iface)
{
  errno_t ret;
  <unnamed type> _1;
  short unsigned int _10;
  short unsigned int _11;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG D#29 => &iface_4(D)->lock
  _10 = MEM[(const oal_mutex_t *)iface_4(D) + 80B];
  # DEBUG D#1 => D#29
  oal_mutex_lock.isra.0 (_10);
  # DEBUG BEGIN_STMT
  _1 = iface_4(D)->type;
  if (_1 == 0)
    goto <bb 3>; [65.00%]
  else
    goto <bb 4>; [35.00%]

  <bb 3> [local count: 697932186]:
  # DEBUG BEGIN_STMT
  iface_4(D)->type = 3;
  # DEBUG BEGIN_STMT
  iface_4(D)->port.instance = 0B;

  <bb 4> [local count: 1073741824]:
  # ret_2 = PHI <0(3), 115(2)>
  # DEBUG ret => ret_2
  # DEBUG BEGIN_STMT
  # DEBUG D#30 => &iface_4(D)->lock
  _11 = MEM[(const oal_mutex_t *)iface_4(D) + 80B];
  # DEBUG D#2 => D#30
  oal_mutex_unlock.isra.0 (_11);
  # DEBUG BEGIN_STMT
  return ret_2;

}


pfe_phy_if_get_hif (const struct pfe_phy_if_t * iface)
{
  struct pfe_hif_chnl_t * ptr;
  <unnamed type> _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_4(D)->type;
  if (_1 == 2)
    goto <bb 3>; [55.78%]
  else
    goto <bb 4>; [44.22%]

  <bb 3> [local count: 598933190]:
  # DEBUG BEGIN_STMT
  ptr_5 = iface_4(D)->port.hif_ch;
  # DEBUG ptr => ptr_5

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

}


pfe_phy_if_bind_hif (struct pfe_phy_if_t * iface, struct pfe_hif_chnl_t * hif)
{
  errno_t ret;
  <unnamed type> _1;
  short unsigned int _11;
  short unsigned int _12;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#27 => &iface_4(D)->lock
  _11 = MEM[(const oal_mutex_t *)iface_4(D) + 80B];
  # DEBUG D#1 => D#27
  oal_mutex_lock.isra.0 (_11);
  # DEBUG BEGIN_STMT
  _1 = iface_4(D)->type;
  if (_1 == 0)
    goto <bb 3>; [65.00%]
  else
    goto <bb 4>; [35.00%]

  <bb 3> [local count: 697932186]:
  # DEBUG BEGIN_STMT
  iface_4(D)->type = 2;
  # DEBUG BEGIN_STMT
  iface_4(D)->port.hif_ch = hif_8(D);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 4> [local count: 1073741824]:
  # ret_2 = PHI <0(3), 115(2)>
  # DEBUG ret => ret_2
  # DEBUG BEGIN_STMT
  # DEBUG D#28 => &iface_4(D)->lock
  _12 = MEM[(const oal_mutex_t *)iface_4(D) + 80B];
  # DEBUG D#2 => D#28
  oal_mutex_unlock.isra.0 (_12);
  # DEBUG BEGIN_STMT
  return ret_2;

}


pfe_phy_if_get_emac (const struct pfe_phy_if_t * iface)
{
  struct pfe_emac_t * ptr;
  <unnamed type> _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_4(D)->type;
  if (_1 == 1)
    goto <bb 3>; [55.78%]
  else
    goto <bb 4>; [44.22%]

  <bb 3> [local count: 598933190]:
  # DEBUG BEGIN_STMT
  ptr_5 = iface_4(D)->port.emac;
  # DEBUG ptr => ptr_5

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

}


pfe_phy_if_bind_emac (struct pfe_phy_if_t * iface, struct pfe_emac_t * emac)
{
  errno_t ret;
  <unnamed type> _1;
  unsigned char _2;
  short unsigned int _18;
  short unsigned int _19;
  short unsigned int _20;
  short unsigned int _21;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG D#35 => &iface_5(D)->lock
  _18 = MEM[(const oal_mutex_t *)iface_5(D) + 80B];
  # DEBUG D#1 => D#35
  oal_mutex_lock.isra.0 (_18);
  # DEBUG BEGIN_STMT
  _1 = iface_5(D)->type;
  if (_1 == 0)
    goto <bb 3>; [79.04%]
  else
    goto <bb 6>; [20.96%]

  <bb 3> [local count: 848685538]:
  # DEBUG BEGIN_STMT
  iface_5(D)->type = 1;
  # DEBUG BEGIN_STMT
  iface_5(D)->port.emac = emac_10(D);
  # DEBUG BEGIN_STMT
  _2 = iface_5(D)->is_enabled;
  if (_2 == 1)
    goto <bb 4>; [34.00%]
  else
    goto <bb 5>; [66.00%]

  <bb 4> [local count: 288553083]:
  # DEBUG BEGIN_STMT
  # DEBUG D#38 => &iface_5(D)->lock
  _19 = MEM[(const oal_mutex_t *)iface_5(D) + 80B];
  # DEBUG D#2 => D#38
  oal_mutex_unlock.isra.0 (_19);
  # DEBUG BEGIN_STMT
  ret_17 = pfe_phy_if_enable (iface_5(D));
  # DEBUG ret => ret_17
  goto <bb 7>; [100.00%]

  <bb 5> [local count: 560132456]:
  # DEBUG BEGIN_STMT
  # DEBUG D#37 => &iface_5(D)->lock
  _20 = MEM[(const oal_mutex_t *)iface_5(D) + 80B];
  # DEBUG D#2 => D#37
  oal_mutex_unlock.isra.0 (_20);
  # DEBUG BEGIN_STMT
  ret_14 = pfe_phy_if_disable (iface_5(D));
  # DEBUG ret => ret_14
  goto <bb 7>; [100.00%]

  <bb 6> [local count: 225056286]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#36 => &iface_5(D)->lock
  _21 = MEM[(const oal_mutex_t *)iface_5(D) + 80B];
  # DEBUG D#2 => D#36
  oal_mutex_unlock.isra.0 (_21);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 115

  <bb 7> [local count: 1073741824]:
  # ret_3 = PHI <ret_14(5), 115(6), ret_17(4)>
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  return ret_3;

}


pfe_phy_if_set_op_mode (struct pfe_phy_if_t * iface, pfe_ct_if_op_mode_t mode)
{
  errno_t ret;
  struct pfe_ct_class_mmap_t mmap;
  struct pfe_class_t * _1;
  struct pfe_ct_phy_if_t * _2;
  short unsigned int _17;
  short unsigned int _18;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_7(D)->class;
  ret_9 = pfe_class_get_mmap (_1, 0, &mmap);
  # DEBUG ret => ret_9
  # DEBUG BEGIN_STMT
  if (ret_9 != 0)
    goto <bb 6>; [52.23%]
  else
    goto <bb 3>; [47.77%]

  <bb 3> [local count: 512926469]:
  # DEBUG BEGIN_STMT
  # DEBUG D#25 => &iface_7(D)->lock
  _17 = MEM[(const oal_mutex_t *)iface_7(D) + 80B];
  # DEBUG D#1 => D#25
  oal_mutex_lock.isra.0 (_17);
  # DEBUG BEGIN_STMT
  iface_7(D)->phy_if_class.mode = mode_11(D);
  # DEBUG BEGIN_STMT
  _2 = &iface_7(D)->phy_if_class;
  ret_14 = pfe_phy_if_write_to_class_nostats (iface_7(D), _2);
  # DEBUG ret => ret_14
  # DEBUG BEGIN_STMT
  if (ret_14 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 4> [local count: 256463235]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22

  <bb 5> [local count: 512926469]:
  # ret_3 = PHI <ret_14(3), 22(4)>
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  # DEBUG D#26 => &iface_7(D)->lock
  _18 = MEM[(const oal_mutex_t *)iface_7(D) + 80B];
  # DEBUG D#2 => D#26
  oal_mutex_unlock.isra.0 (_18);

  <bb 6> [local count: 1073741824]:
  # ret_4 = PHI <22(2), ret_3(5)>
  # DEBUG ret => ret_4
  # DEBUG BEGIN_STMT
  mmap ={v} {CLOBBER};
  return ret_4;

}


pfe_phy_if_get_op_mode (struct pfe_phy_if_t * iface)
{
  pfe_ct_if_op_mode_t ret;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_3 = iface_2(D)->phy_if_class.mode;
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  return ret_3;

}


pfe_phy_if_get_block_state (struct pfe_phy_if_t * iface, pfe_ct_block_state_t * block_state)
{
  <unnamed type> _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  _1 = iface_3(D)->block_state;
  *block_state_4(D) = _1;
  # DEBUG BEGIN_STMT
  return 0;

}


pfe_phy_if_set_block_state (struct pfe_phy_if_t * iface, pfe_ct_block_state_t block_state)
{
  pfe_ct_block_state_t tmp;
  errno_t ret;
  struct pfe_ct_phy_if_t * _1;
  short unsigned int _16;
  short unsigned int _17;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#23 => &iface_4(D)->lock
  _16 = MEM[(const oal_mutex_t *)iface_4(D) + 80B];
  # DEBUG D#1 => D#23
  oal_mutex_lock.isra.0 (_16);
  # DEBUG BEGIN_STMT
  tmp_7 = iface_4(D)->block_state;
  # DEBUG tmp => tmp_7
  # DEBUG BEGIN_STMT
  iface_4(D)->block_state = block_state_8(D);
  # DEBUG BEGIN_STMT
  iface_4(D)->phy_if_class.block_state = block_state_8(D);
  # DEBUG BEGIN_STMT
  _1 = &iface_4(D)->phy_if_class;
  ret_12 = pfe_phy_if_write_to_class_nostats (iface_4(D), _1);
  # DEBUG ret => ret_12
  # DEBUG BEGIN_STMT
  if (ret_12 != 0)
    goto <bb 3>; [35.00%]
  else
    goto <bb 4>; [65.00%]

  <bb 3> [local count: 375809639]:
  # DEBUG BEGIN_STMT
  iface_4(D)->block_state = tmp_7;
  # DEBUG BEGIN_STMT
  iface_4(D)->phy_if_class.block_state = tmp_7;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22

  <bb 4> [local count: 1073741824]:
  # ret_2 = PHI <ret_12(2), 22(3)>
  # DEBUG ret => ret_2
  # DEBUG BEGIN_STMT
  # DEBUG D#24 => &iface_4(D)->lock
  _17 = MEM[(const oal_mutex_t *)iface_4(D) + 80B];
  # DEBUG D#2 => D#24
  oal_mutex_unlock.isra.0 (_17);
  # DEBUG BEGIN_STMT
  return ret_2;

}


pfe_phy_if_del_log_if (struct pfe_phy_if_t * iface, const struct pfe_log_if_t * log_if)
{
  errno_t ret;
  addr_t next_dmem_ptr;
  addr_t log_if_dmem_base;
  bool_t found;
  struct LLIST_t * curItem;
  struct pfe_phy_if_list_entry_t * entry;
  int _1;
  struct pfe_log_if_t * _2;
  struct LLIST_t * _3;
  struct pfe_log_if_t * _4;
  int _5;
  unsigned int next_dmem_ptr.7_6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  struct pfe_log_if_t * _16;
  unsigned int next_dmem_ptr.12_17;
  int _18;
  unsigned int next_dmem_ptr.13_19;
  struct pfe_log_if_t * _20;
  unsigned int log_if_dmem_base.14_21;
  long unsigned int _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;
  long unsigned int _26;
  long unsigned int _27;
  long unsigned int _28;
  long unsigned int _29;
  long unsigned int _30;
  struct pfe_ct_phy_if_t * _31;
  int _32;
  struct LLIST_Struct * _33;
  struct LLIST_Struct * _34;
  struct LLIST_Struct * _35;
  errno_t _41;
  short unsigned int _79;
  short unsigned int _80;
  short unsigned int _81;
  short unsigned int _82;
  short unsigned int _83;
  short unsigned int _84;

  <bb 2> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  # DEBUG entry => 0B
  # DEBUG BEGIN_STMT
  # DEBUG prev_entry => 0B
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG found => 0
  # DEBUG BEGIN_STMT
  log_if_dmem_base = 0;
  next_dmem_ptr = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#17 => &iface_47(D)->lock
  _79 = MEM[(const oal_mutex_t *)iface_47(D) + 80B];
  # DEBUG D#1 => D#17
  oal_mutex_lock.isra.0 (_79);
  # DEBUG BEGIN_STMT
  curItem_49 = iface_47(D)->log_ifs.prNext;
  # DEBUG curItem => curItem_49
  goto <bb 5>; [100.00%]

  <bb 3> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _1 = curItem_39 - 4B;
  entry_50 = (struct pfe_phy_if_list_entry_t *) _1;
  # DEBUG entry => entry_50
  # DEBUG BEGIN_STMT
  _2 = entry_50->log_if;
  if (_2 == log_if_51(D))
    goto <bb 6>; [5.50%]
  else
    goto <bb 4>; [94.50%]

  <bb 4> [local count: 958878293]:
  # DEBUG BEGIN_STMT
  # DEBUG prev_entry => entry_50
  # DEBUG BEGIN_STMT
  curItem_52 = curItem_39->prNext;
  # DEBUG curItem => curItem_52

  <bb 5> [local count: 1073741824]:
  # entry_36 = PHI <0B(2), entry_50(4)>
  # curItem_39 = PHI <curItem_49(2), curItem_52(4)>
  # DEBUG curItem => curItem_39
  # DEBUG prev_entry => entry_36
  # DEBUG entry => entry_36
  # DEBUG BEGIN_STMT
  _3 = &iface_47(D)->log_ifs;
  if (_3 != curItem_39)
    goto <bb 3>; [94.50%]
  else
    goto <bb 6>; [5.50%]

  <bb 6> [local count: 114863532]:
  # entry_37 = PHI <entry_50(3), entry_36(5)>
  # found_40 = PHI <1(3), 0(5)>
  # entry_38 = PHI <entry_36(3), entry_36(5)>
  # DEBUG found => found_40
  # DEBUG entry => entry_37
  # DEBUG BEGIN_STMT
  if (found_40 == 0)
    goto <bb 7>; [21.72%]
  else
    goto <bb 8>; [78.28%]

  <bb 7> [local count: 24948359]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#22 => &iface_47(D)->lock
  _80 = MEM[(const oal_mutex_t *)iface_47(D) + 80B];
  # DEBUG D#2 => D#22
  oal_mutex_unlock.isra.0 (_80);
  # DEBUG BEGIN_STMT
  goto <bb 21>; [100.00%]

  <bb 8> [local count: 89915173]:
  # DEBUG BEGIN_STMT
  next_dmem_ptr = 0;
  # DEBUG BEGIN_STMT
  _4 = entry_37->log_if;
  _5 = pfe_log_if_get_next_dmem_ptr (_4, &next_dmem_ptr);
  if (_5 != 0)
    goto <bb 9>; [12.02%]
  else
    goto <bb 10>; [87.98%]

  <bb 9> [local count: 10807804]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#21 => &iface_47(D)->lock
  _81 = MEM[(const oal_mutex_t *)iface_47(D) + 80B];
  # DEBUG D#2 => D#21
  oal_mutex_unlock.isra.0 (_81);
  # DEBUG BEGIN_STMT
  goto <bb 21>; [100.00%]

  <bb 10> [local count: 79107369]:
  # DEBUG BEGIN_STMT
  if (entry_38 == 0B)
    goto <bb 11>; [46.53%]
  else
    goto <bb 14>; [53.47%]

  <bb 11> [local count: 36808659]:
  # DEBUG BEGIN_STMT
  next_dmem_ptr.7_6 = next_dmem_ptr;
  if (next_dmem_ptr.7_6 == 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 12> [local count: 18404329]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  iface_47(D)->phy_if_class.def_log_if = 0;
  # DEBUG BEGIN_STMT
  iface_47(D)->phy_if_class.log_ifs = 0;
  goto <bb 18>; [100.00%]

  <bb 13> [local count: 18404329]:
  # DEBUG BEGIN_STMT
  _7 = next_dmem_ptr.7_6 >> 24;
  _8 = next_dmem_ptr.7_6 >> 8;
  _9 = _8 & 65280;
  _10 = _7 | _9;
  _11 = next_dmem_ptr.7_6 << 8;
  _12 = _11 & 16711680;
  _13 = _10 | _12;
  _14 = next_dmem_ptr.7_6 << 24;
  _15 = _13 | _14;
  iface_47(D)->phy_if_class.log_ifs = _15;
  goto <bb 18>; [100.00%]

  <bb 14> [local count: 42298710]:
  # DEBUG BEGIN_STMT
  _16 = MEM[(const struct pfe_phy_if_list_entry_t *)entry_38].log_if;
  next_dmem_ptr.12_17 = next_dmem_ptr;
  _18 = pfe_log_if_set_next_dmem_ptr (_16, next_dmem_ptr.12_17);
  if (_18 != 0)
    goto <bb 15>; [12.02%]
  else
    goto <bb 16>; [87.98%]

  <bb 15> [local count: 5084305]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#18 => &iface_47(D)->lock
  _82 = MEM[(const oal_mutex_t *)iface_47(D) + 80B];
  # DEBUG D#2 => D#18
  oal_mutex_unlock.isra.0 (_82);
  # DEBUG BEGIN_STMT
  goto <bb 21>; [100.00%]

  <bb 16> [local count: 37214405]:
  # DEBUG BEGIN_STMT
  next_dmem_ptr.13_19 = next_dmem_ptr;
  if (next_dmem_ptr.13_19 == 0)
    goto <bb 17>; [33.00%]
  else
    goto <bb 18>; [67.00%]

  <bb 17> [local count: 12280754]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  log_if_dmem_base = 0;
  # DEBUG BEGIN_STMT
  _20 = MEM[(const struct pfe_phy_if_list_entry_t *)entry_38].log_if;
  pfe_log_if_get_dmem_base (_20, &log_if_dmem_base);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  log_if_dmem_base.14_21 = log_if_dmem_base;
  _22 = log_if_dmem_base.14_21 >> 24;
  _23 = log_if_dmem_base.14_21 >> 8;
  _24 = _23 & 65280;
  _25 = _22 | _24;
  _26 = log_if_dmem_base.14_21 << 8;
  _27 = _26 & 16711680;
  _28 = _25 | _27;
  _29 = log_if_dmem_base.14_21 << 24;
  _30 = _28 | _29;
  iface_47(D)->phy_if_class.def_log_if = _30;

  <bb 18> [local count: 74023064]:
  # DEBUG BEGIN_STMT
  _31 = &iface_47(D)->phy_if_class;
  _32 = pfe_phy_if_write_to_class_nostats (iface_47(D), _31);
  if (_32 != 0)
    goto <bb 19>; [21.72%]
  else
    goto <bb 20>; [78.28%]

  <bb 19> [local count: 16077809]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#20 => &iface_47(D)->lock
  _83 = MEM[(const oal_mutex_t *)iface_47(D) + 80B];
  # DEBUG D#2 => D#20
  oal_mutex_unlock.isra.0 (_83);
  # DEBUG BEGIN_STMT
  goto <bb 21>; [100.00%]

  <bb 20> [local count: 57945254]:
  # DEBUG BEGIN_STMT
  log_if_dmem_base = 0;
  # DEBUG BEGIN_STMT
  pfe_log_if_get_dmem_base (log_if_51(D), &log_if_dmem_base);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _33 = entry_37->iterator.prPrev;
  _34 = entry_37->iterator.prNext;
  _33->prNext = _34;
  # DEBUG BEGIN_STMT
  _35 = entry_37->iterator.prNext;
  _35->prPrev = _33;
  # DEBUG BEGIN_STMT
  entry_37->iterator.prPrev = 0B;
  # DEBUG BEGIN_STMT
  entry_37->iterator.prNext = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  oal_mm_free (entry_37);
  # DEBUG BEGIN_STMT
  # DEBUG entry => 0B
  # DEBUG BEGIN_STMT
  ret_72 = pfe_phy_if_disable_nolock (iface_47(D));
  # DEBUG ret => ret_72
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#19 => &iface_47(D)->lock
  _84 = MEM[(const oal_mutex_t *)iface_47(D) + 80B];
  # DEBUG D#2 => D#19
  oal_mutex_unlock.isra.0 (_84);
  # DEBUG BEGIN_STMT

  <bb 21> [local count: 114863532]:
  # _41 = PHI <2(7), 114(9), 114(15), 114(19), ret_72(20)>
  log_if_dmem_base ={v} {CLOBBER};
  next_dmem_ptr ={v} {CLOBBER};
  return _41;

}


pfe_phy_if_has_log_if (struct pfe_phy_if_t * iface, const struct pfe_log_if_t * log_if)
{
  bool_t match;
  short unsigned int _7;
  short unsigned int _8;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#15 => &iface_1(D)->lock
  _7 = MEM[(const oal_mutex_t *)iface_1(D) + 80B];
  # DEBUG D#1 => D#15
  oal_mutex_lock.isra.0 (_7);
  # DEBUG BEGIN_STMT
  match_5 = pfe_phy_if_has_log_if_nolock (iface_1(D), log_if_4(D));
  # DEBUG match => match_5
  # DEBUG BEGIN_STMT
  # DEBUG D#16 => &iface_1(D)->lock
  _8 = MEM[(const oal_mutex_t *)iface_1(D) + 80B];
  # DEBUG D#2 => D#16
  oal_mutex_unlock.isra.0 (_8);
  # DEBUG BEGIN_STMT
  return match_5;

}


pfe_phy_if_has_loopback_log_if_nolock (const struct pfe_phy_if_t * iface)
{
  bool_t ret;
  const struct pfe_phy_if_list_entry_t * entry;
  struct LLIST_t * curItem;
  int _1;
  struct pfe_log_if_t * _2;
  unsigned char _3;
  unsigned char _4;
  const struct LLIST_t * _5;

  <bb 2> [local count: 78030430]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  curItem_10 = iface_9(D)->log_ifs.prNext;
  # DEBUG curItem => curItem_10
  goto <bb 6>; [100.00%]

  <bb 3> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _1 = curItem_6 - 4B;
  entry_11 = (const struct pfe_phy_if_list_entry_t *) _1;
  # DEBUG entry => entry_11
  # DEBUG BEGIN_STMT
  _2 = entry_11->log_if;
  _3 = pfe_log_if_is_enabled (_2);
  if (_3 == 1)
    goto <bb 4>; [34.00%]
  else
    goto <bb 5>; [66.00%]

  <bb 4> [local count: 344993248]:
  _4 = pfe_log_if_is_loopback (_2);
  if (_4 == 1)
    goto <bb 7>; [5.50%]
  else
    goto <bb 5>; [94.50%]

  <bb 5> [local count: 995711397]:
  # DEBUG BEGIN_STMT
  curItem_12 = curItem_6->prNext;
  # DEBUG curItem => curItem_12

  <bb 6> [local count: 1073741824]:
  # curItem_6 = PHI <curItem_10(2), curItem_12(5)>
  # DEBUG curItem => curItem_6
  # DEBUG BEGIN_STMT
  _5 = &iface_9(D)->log_ifs;
  if (_5 != curItem_6)
    goto <bb 3>; [94.50%]
  else
    goto <bb 7>; [5.50%]

  <bb 7> [local count: 78030429]:
  # ret_7 = PHI <1(4), 0(6)>
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  return ret_7;

}


pfe_phy_if_has_enabled_log_if_nolock (const struct pfe_phy_if_t * iface)
{
  bool_t ret;
  const struct pfe_phy_if_list_entry_t * entry;
  struct LLIST_t * curItem;
  int _1;
  struct pfe_log_if_t * _2;
  unsigned char _3;
  const struct LLIST_t * _4;

  <bb 2> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  curItem_9 = iface_8(D)->log_ifs.prNext;
  # DEBUG curItem => curItem_9
  goto <bb 5>; [100.00%]

  <bb 3> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _1 = curItem_5 - 4B;
  entry_10 = (const struct pfe_phy_if_list_entry_t *) _1;
  # DEBUG entry => entry_10
  # DEBUG BEGIN_STMT
  _2 = entry_10->log_if;
  _3 = pfe_log_if_is_enabled (_2);
  if (_3 == 1)
    goto <bb 6>; [5.50%]
  else
    goto <bb 4>; [94.50%]

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

  <bb 5> [local count: 1073741824]:
  # curItem_5 = PHI <curItem_9(2), curItem_11(4)>
  # DEBUG curItem => curItem_5
  # DEBUG BEGIN_STMT
  _4 = &iface_8(D)->log_ifs;
  if (_4 != curItem_5)
    goto <bb 3>; [94.50%]
  else
    goto <bb 6>; [5.50%]

  <bb 6> [local count: 114863532]:
  # ret_6 = PHI <1(3), 0(5)>
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  return ret_6;

}


pfe_phy_if_has_log_if_nolock (const struct pfe_phy_if_t * iface, const struct pfe_log_if_t * log_if)
{
  bool_t ret;
  const struct pfe_phy_if_list_entry_t * entry;
  struct LLIST_t * curItem;
  int _1;
  struct pfe_log_if_t * _2;
  const struct LLIST_t * _3;

  <bb 2> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  curItem_8 = iface_7(D)->log_ifs.prNext;
  # DEBUG curItem => curItem_8
  goto <bb 5>; [100.00%]

  <bb 3> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _1 = curItem_4 - 4B;
  entry_9 = (const struct pfe_phy_if_list_entry_t *) _1;
  # DEBUG entry => entry_9
  # DEBUG BEGIN_STMT
  _2 = entry_9->log_if;
  if (_2 == log_if_10(D))
    goto <bb 6>; [5.50%]
  else
    goto <bb 4>; [94.50%]

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

  <bb 5> [local count: 1073741824]:
  # curItem_4 = PHI <curItem_8(2), curItem_11(4)>
  # DEBUG curItem => curItem_4
  # DEBUG BEGIN_STMT
  _3 = &iface_7(D)->log_ifs;
  if (_3 != curItem_4)
    goto <bb 3>; [94.50%]
  else
    goto <bb 6>; [5.50%]

  <bb 6> [local count: 114863532]:
  # ret_5 = PHI <1(3), 0(5)>
  # DEBUG ret => ret_5
  # DEBUG BEGIN_STMT
  return ret_5;

}


pfe_phy_if_add_log_if (struct pfe_phy_if_t * iface, struct pfe_log_if_t * log_if)
{
  addr_t log_if_dmem_base;
  const struct pfe_phy_if_list_entry_t * tmp_entry;
  struct pfe_phy_if_list_entry_t * entry;
  struct LLIST_Struct * _1;
  struct LLIST_t * _2;
  int _3;
  unsigned int log_if_dmem_base.0_4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  unsigned char _14;
  int _15;
  struct pfe_log_if_t * _16;
  int _17;
  unsigned int log_if_dmem_base.4_18;
  int _19;
  int _20;
  unsigned int log_if_dmem_base.5_21;
  long unsigned int _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;
  long unsigned int _26;
  struct pfe_ct_phy_if_t * _27;
  int _28;
  struct LLIST_Struct * _29;
  struct LLIST_t * _30;
  errno_t _31;
  short unsigned int _65;
  short unsigned int _66;
  short unsigned int _67;
  short unsigned int _68;
  short unsigned int _69;
  short unsigned int _70;
  short unsigned int _71;
  short unsigned int _72;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  log_if_dmem_base = 0;
  # DEBUG BEGIN_STMT
  entry_37 = oal_mm_malloc (12);
  # DEBUG entry => entry_37
  # DEBUG BEGIN_STMT
  if (entry_37 == 0B)
    goto <bb 18>; [19.44%]
  else
    goto <bb 3>; [80.56%]

  <bb 3> [local count: 865006414]:
  # DEBUG BEGIN_STMT
  entry_37->log_if = log_if_38(D);
  # DEBUG BEGIN_STMT
  # DEBUG D#7 => &iface_40(D)->lock
  _65 = MEM[(const oal_mutex_t *)iface_40(D) + 80B];
  # DEBUG D#1 => D#7
  oal_mutex_lock.isra.0 (_65);
  # DEBUG BEGIN_STMT
  _1 = iface_40(D)->log_ifs.prNext;
  _2 = &iface_40(D)->log_ifs;
  if (_1 == _2)
    goto <bb 4>; [30.00%]
  else
    goto <bb 7>; [70.00%]

  <bb 4> [local count: 259501924]:
  # DEBUG BEGIN_STMT
  _3 = pfe_log_if_get_dmem_base (log_if_38(D), &log_if_dmem_base);
  if (_3 != 0)
    goto <bb 5>; [12.02%]
  else
    goto <bb 6>; [87.98%]

  <bb 5> [local count: 31192131]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#14 => &iface_40(D)->lock
  _66 = MEM[(const oal_mutex_t *)iface_40(D) + 80B];
  # DEBUG D#2 => D#14
  oal_mutex_unlock.isra.0 (_66);
  # DEBUG BEGIN_STMT
  goto <bb 18>; [100.00%]

  <bb 6> [local count: 228309793]:
  # DEBUG BEGIN_STMT
  log_if_dmem_base.0_4 = log_if_dmem_base;
  _5 = log_if_dmem_base.0_4 >> 24;
  _6 = log_if_dmem_base.0_4 >> 8;
  _7 = _6 & 65280;
  _8 = _5 | _7;
  _9 = log_if_dmem_base.0_4 << 8;
  _10 = _9 & 16711680;
  _11 = _8 | _10;
  _12 = log_if_dmem_base.0_4 << 24;
  _13 = _11 | _12;
  iface_40(D)->phy_if_class.def_log_if = _13;
  goto <bb 13>; [100.00%]

  <bb 7> [local count: 605504490]:
  # DEBUG BEGIN_STMT
  _14 = pfe_phy_if_has_log_if_nolock (iface_40(D), log_if_38(D));
  if (_14 == 1)
    goto <bb 8>; [12.50%]
  else
    goto <bb 9>; [87.50%]

  <bb 8> [local count: 75688061]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#10 => &iface_40(D)->lock
  _67 = MEM[(const oal_mutex_t *)iface_40(D) + 80B];
  # DEBUG D#2 => D#10
  oal_mutex_unlock.isra.0 (_67);
  # DEBUG BEGIN_STMT
  oal_mm_free (entry_37);
  # DEBUG BEGIN_STMT
  # DEBUG entry => 0B
  # DEBUG BEGIN_STMT
  goto <bb 18>; [100.00%]

  <bb 9> [local count: 529816428]:
  # DEBUG BEGIN_STMT
  _15 = _1 - 4B;
  tmp_entry_42 = (const struct pfe_phy_if_list_entry_t *) _15;
  # DEBUG tmp_entry => tmp_entry_42
  # DEBUG BEGIN_STMT
  log_if_dmem_base = 0;
  # DEBUG BEGIN_STMT
  _16 = tmp_entry_42->log_if;
  _17 = pfe_log_if_get_dmem_base (_16, &log_if_dmem_base);
  if (_17 != 0)
    goto <bb 10>; [21.72%]
  else
    goto <bb 11>; [78.28%]

  <bb 10> [local count: 115076128]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#9 => &iface_40(D)->lock
  _68 = MEM[(const oal_mutex_t *)iface_40(D) + 80B];
  # DEBUG D#2 => D#9
  oal_mutex_unlock.isra.0 (_68);
  # DEBUG BEGIN_STMT
  goto <bb 18>; [100.00%]

  <bb 11> [local count: 414740300]:
  # DEBUG BEGIN_STMT
  log_if_dmem_base.4_18 = log_if_dmem_base;
  _19 = pfe_log_if_set_next_dmem_ptr (log_if_38(D), log_if_dmem_base.4_18);
  if (_19 != 0)
    goto <bb 12>; [12.02%]
  else
    goto <bb 13>; [87.98%]

  <bb 12> [local count: 49851784]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#8 => &iface_40(D)->lock
  _69 = MEM[(const oal_mutex_t *)iface_40(D) + 80B];
  # DEBUG D#2 => D#8
  oal_mutex_unlock.isra.0 (_69);
  # DEBUG BEGIN_STMT
  goto <bb 18>; [100.00%]

  <bb 13> [local count: 593198310]:
  # DEBUG BEGIN_STMT
  log_if_dmem_base = 0;
  # DEBUG BEGIN_STMT
  _20 = pfe_log_if_get_dmem_base (log_if_38(D), &log_if_dmem_base);
  if (_20 != 0)
    goto <bb 14>; [21.72%]
  else
    goto <bb 15>; [78.28%]

  <bb 14> [local count: 128842673]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#13 => &iface_40(D)->lock
  _70 = MEM[(const oal_mutex_t *)iface_40(D) + 80B];
  # DEBUG D#2 => D#13
  oal_mutex_unlock.isra.0 (_70);
  # DEBUG BEGIN_STMT
  goto <bb 18>; [100.00%]

  <bb 15> [local count: 464355636]:
  # DEBUG BEGIN_STMT
  log_if_dmem_base.5_21 = log_if_dmem_base;
  _22 = log_if_dmem_base.5_21 << 8;
  _23 = _22 & 4128768;
  _24 = log_if_dmem_base.5_21 << 24;
  _25 = _23 | _24;
  _26 = _25 | 32;
  iface_40(D)->phy_if_class.log_ifs = _26;
  # DEBUG BEGIN_STMT
  _27 = &iface_40(D)->phy_if_class;
  _28 = pfe_phy_if_write_to_class_nostats (iface_40(D), _27);
  if (_28 != 0)
    goto <bb 16>; [21.72%]
  else
    goto <bb 17>; [78.28%]

  <bb 16> [local count: 100858044]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#12 => &iface_40(D)->lock
  _71 = MEM[(const oal_mutex_t *)iface_40(D) + 80B];
  # DEBUG D#2 => D#12
  oal_mutex_unlock.isra.0 (_71);
  # DEBUG BEGIN_STMT
  goto <bb 18>; [100.00%]

  <bb 17> [local count: 363497592]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _29 = iface_40(D)->log_ifs.prNext;
  entry_37->iterator.prNext = _29;
  # DEBUG BEGIN_STMT
  entry_37->iterator.prPrev = _2;
  # DEBUG BEGIN_STMT
  _30 = &entry_37->iterator;
  _29->prPrev = _30;
  # DEBUG BEGIN_STMT
  iface_40(D)->log_ifs.prNext = _30;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#11 => &iface_40(D)->lock
  _72 = MEM[(const oal_mutex_t *)iface_40(D) + 80B];
  # DEBUG D#2 => D#11
  oal_mutex_unlock.isra.0 (_72);
  # DEBUG BEGIN_STMT

  <bb 18> [local count: 1073741824]:
  # _31 = PHI <11(2), 114(5), 116(8), 114(10), 114(12), 114(14), 114(16), 0(17)>
  log_if_dmem_base ={v} {CLOBBER};
  return _31;

}


__attribute__((pure))
pfe_phy_if_get_class (const struct pfe_phy_if_t * iface)
{
  struct pfe_class_t * class;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  class_3 = iface_2(D)->class;
  # DEBUG class => class_3
  # DEBUG BEGIN_STMT
  return class_3;

}


pfe_phy_if_destroy (struct pfe_phy_if_t * iface)
{
  struct LLIST_Struct * _1;
  struct LLIST_t * _2;
  struct pfe_mac_db_t * _3;
  short unsigned int _12;
  short unsigned int _13;

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

  <bb 3> [local count: 574129754]:
  # DEBUG BEGIN_STMT
  # DEBUG D#4 => &iface_6(D)->lock
  _12 = MEM[(const oal_mutex_t *)iface_6(D) + 80B];
  # DEBUG D#1 => D#4
  oal_mutex_lock.isra.0 (_12);
  # DEBUG BEGIN_STMT
  _1 = iface_6(D)->log_ifs.prNext;
  _2 = &iface_6(D)->log_ifs;
  if (_1 != _2)
    goto <bb 4>; [53.47%]
  else
    goto <bb 5>; [46.53%]

  <bb 4> [local count: 306987179]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#6 => &iface_6(D)->lock
  _13 = MEM[(const oal_mutex_t *)iface_6(D) + 80B];
  # DEBUG D#2 => D#6
  oal_mutex_unlock.isra.0 (_13);
  goto <bb 8>; [100.00%]

  <bb 5> [local count: 267142574]:
  # DEBUG BEGIN_STMT
  _3 = iface_6(D)->mac_db;
  if (_3 != 0B)
    goto <bb 6>; [53.47%]
  else
    goto <bb 7>; [46.53%]

  <bb 6> [local count: 142841134]:
  # DEBUG BEGIN_STMT
  pfe_mac_db_destroy (_3);
  # DEBUG ret => NULL
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 7> [local count: 267142574]:
  pfe_phy_if_destroy.part.0 (iface_6(D));

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

}


pfe_phy_if_create (struct pfe_class_t * class, pfe_ct_phy_if_id_t id, const char_t * name)
{
  struct pfe_ct_class_mmap_t pfe_pe_mmap;
  struct pfe_phy_if_t * iface;
  uint32_t i;
  int _1;
  short unsigned int _2;
  oal_mutex_t * _3;
  struct LLIST_t * _4;
  struct pfe_mac_db_t * _5;
  int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  long unsigned int _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;
  long unsigned int _26;
  long unsigned int _27;
  long unsigned int _28;
  long unsigned int _29;
  unsigned int _30;
  long unsigned int _31;
  unsigned int _32;
  unsigned int _33;
  void * _34;
  struct pfe_ct_phy_if_t * _35;
  int _36;
  struct pfe_phy_if_t * _38;

  <bb 2> [local count: 612855139]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_pe_mmap = {};
  # DEBUG BEGIN_STMT
  iface_45 = oal_mm_malloc (92);
  # DEBUG iface => iface_45
  # DEBUG BEGIN_STMT
  if (iface_45 == 0B)
    goto <bb 18>; [15.47%]
  else
    goto <bb 3>; [84.53%]

  <bb 3> [local count: 518046449]:
  # DEBUG BEGIN_STMT
  memset (iface_45, 0, 92);
  # DEBUG BEGIN_STMT
  _1 = (int) id_47(D);
  _2 = pfe_phy_if_mutex[_1];
  iface_45->lock = _2;
  # DEBUG BEGIN_STMT
  _3 = &iface_45->lock;
  oal_mutex_init (_3);
  # DEBUG BEGIN_STMT
  iface_45->type = 0;
  # DEBUG BEGIN_STMT
  iface_45->id = id_47(D);
  # DEBUG BEGIN_STMT
  iface_45->class = class_52(D);
  # DEBUG BEGIN_STMT
  iface_45->is_enabled = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = &iface_45->log_ifs;
  iface_45->log_ifs.prNext = _4;
  # DEBUG BEGIN_STMT
  iface_45->log_ifs.prPrev = _4;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = pfe_mac_db_create ();
  iface_45->mac_db = _5;
  # DEBUG BEGIN_STMT
  if (_5 == 0B)
    goto <bb 4>; [8.27%]
  else
    goto <bb 5>; [91.73%]

  <bb 4> [local count: 42842441]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_phy_if_destroy (iface_45);
  # DEBUG BEGIN_STMT
  goto <bb 18>; [100.00%]

  <bb 5> [local count: 475204007]:
  # DEBUG BEGIN_STMT
  _6 = pfe_class_get_mmap (class_52(D), 0, &pfe_pe_mmap);
  if (_6 != 0)
    goto <bb 6>; [9.39%]
  else
    goto <bb 7>; [90.61%]

  <bb 6> [local count: 44621656]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_phy_if_destroy (iface_45);
  # DEBUG BEGIN_STMT
  goto <bb 18>; [100.00%]

  <bb 7> [local count: 430582351]:
  # DEBUG BEGIN_STMT
  _7 = pfe_pe_mmap.dmem_phy_if_size;
  _8 = _7 >> 24;
  _9 = _7 >> 8;
  _10 = _9 & 65280;
  _11 = _8 | _10;
  _12 = _7 << 8;
  _13 = _12 & 16711680;
  _14 = _11 | _13;
  _15 = _7 << 24;
  _16 = _14 | _15;
  _17 = (long unsigned int) id_47(D);
  _18 = _17 + 1;
  _19 = _18 * 56;
  if (_16 < _19)
    goto <bb 8>; [9.39%]
  else
    goto <bb 9>; [90.61%]

  <bb 8> [local count: 40431683]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_phy_if_destroy (iface_45);
  # DEBUG BEGIN_STMT
  goto <bb 18>; [100.00%]

  <bb 9> [local count: 390150668]:
  # DEBUG BEGIN_STMT
  _20 = pfe_pe_mmap.dmem_phy_if_base;
  _21 = _20 >> 24;
  _22 = _20 >> 8;
  _23 = _22 & 65280;
  _24 = _21 | _23;
  _25 = _20 << 8;
  _26 = _25 & 16711680;
  _27 = _24 | _26;
  _28 = _20 << 24;
  _29 = _27 | _28;
  _30 = _17 * 56;
  _31 = _29 + _30;
  iface_45->dmem_base = _31;
  # DEBUG BEGIN_STMT
  if (name_61(D) == 0B)
    goto <bb 10>; [46.53%]
  else
    goto <bb 11>; [53.47%]

  <bb 10> [local count: 181537106]:
  # DEBUG BEGIN_STMT
  iface_45->name = 0B;
  goto <bb 13>; [100.00%]

  <bb 11> [local count: 208613562]:
  # DEBUG BEGIN_STMT
  _32 = strlen (name_61(D));
  _33 = _32 + 1;
  _34 = oal_mm_malloc (_33);
  iface_45->name = _34;
  # DEBUG BEGIN_STMT
  if (_34 == 0B)
    goto <bb 18>; [15.47%]
  else
    goto <bb 12>; [84.53%]

  <bb 12> [local count: 176341044]:
  # DEBUG BEGIN_STMT
  strcpy (_34, name_61(D));

  <bb 13> [local count: 357878150]:
  # DEBUG BEGIN_STMT
  iface_45->phy_if_class.id = id_47(D);
  # DEBUG BEGIN_STMT
  iface_45->phy_if_class.block_state = 0;
  # DEBUG BEGIN_STMT
  iface_45->phy_if_class.mgmt_interface = 10;
  # DEBUG BEGIN_STMT
  # DEBUG i => 0
  goto <bb 15>; [100.00%]

  <bb 14> [local count: 715863674]:
  # DEBUG BEGIN_STMT
  iface_45->phy_if_class.rx_mirrors[i_37] = 0;
  # DEBUG BEGIN_STMT
  iface_45->phy_if_class.tx_mirrors[i_37] = 0;
  # DEBUG BEGIN_STMT
  i_78 = i_37 + 1;
  # DEBUG i => i_78

  <bb 15> [local count: 1073741824]:
  # i_37 = PHI <0(13), i_78(14)>
  # DEBUG i => i_37
  # DEBUG BEGIN_STMT
  if (i_37 != 2)
    goto <bb 14>; [66.67%]
  else
    goto <bb 16>; [33.33%]

  <bb 16> [local count: 357878150]:
  # DEBUG BEGIN_STMT
  iface_45->phy_if_class.flags = 67633152;
  # DEBUG BEGIN_STMT
  iface_45->phy_if_class.phy_stats.ingress = 0;
  # DEBUG BEGIN_STMT
  iface_45->phy_if_class.phy_stats.egress = 0;
  # DEBUG BEGIN_STMT
  iface_45->phy_if_class.phy_stats.discarded = 0;
  # DEBUG BEGIN_STMT
  iface_45->phy_if_class.phy_stats.malformed = 0;
  # DEBUG BEGIN_STMT
  _35 = &iface_45->phy_if_class;
  _36 = pfe_phy_if_write_to_class (iface_45, _35);
  if (_36 != 0)
    goto <bb 17>; [16.75%]
  else
    goto <bb 18>; [83.25%]

  <bb 17> [local count: 59944590]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  oal_mm_free (iface_45);
  # DEBUG BEGIN_STMT
  # DEBUG iface => 0B

  <bb 18> [local count: 612855139]:
  # _38 = PHI <0B(2), 0B(4), 0B(6), 0B(8), 0B(11), 0B(17), iface_45(16)>
  # DEBUG iface => NULL
  pfe_pe_mmap ={v} {CLOBBER};
  return _38;

}


pfe_phy_if_write_to_class_nostats (const struct pfe_phy_if_t * iface, const struct pfe_ct_phy_if_t * class_if)
{
  errno_t ret;
  struct pfe_class_t * _1;
  unsigned int _2;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_4(D)->class;
  _2 = iface_4(D)->dmem_base;
  ret_7 = pfe_class_write_dmem (_1, -1, _2, class_if_5(D), 40);
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  return ret_7;

}


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;

}


