pfe_log_if_get_stats (const struct pfe_log_if_t * iface, struct pfe_ct_class_algo_stats_t * stat)
{
  addr_t offset;
  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;
  long unsigned int _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;
  struct pfe_class_t * _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;
  long unsigned int _94;
  long unsigned int _95;
  long unsigned int _96;
  long unsigned int _97;
  long unsigned int _98;
  long unsigned int _99;
  long unsigned int _100;
  long unsigned int _101;
  long unsigned int _102;
  long unsigned int _103;
  long unsigned int _104;
  long unsigned int _105;
  long unsigned int _106;
  long unsigned int _107;
  long unsigned int _108;
  long unsigned int _109;
  long unsigned int _110;
  long unsigned int _111;
  long unsigned int _112;
  long unsigned int _113;
  long unsigned int _114;
  long unsigned int _115;
  long unsigned int _116;
  long unsigned int _117;
  errno_t _134;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  offset_120 = 0;
  # DEBUG offset => offset_120
  # DEBUG BEGIN_STMT
  memset (stat_122(D), 0, 16);
  # DEBUG BEGIN_STMT
  offset_124 = 88;
  # DEBUG offset => offset_124
  # DEBUG BEGIN_STMT
  _1 = iface_125(D)->class;
  _2 = iface_125(D)->dmem_base;
  _3 = offset_124 + _2;
  ret_127 = pfe_class_gather_read_dmem (_1, &pfe_class_algo_stats, _3, 128, 16);
  # DEBUG ret => ret_127
  # DEBUG BEGIN_STMT
  i_128 = 0;
  # DEBUG i => i_128
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _4 = stat_122(D)->accepted;
  _5 = pfe_class_algo_stats[i_118].accepted;
  _6 = _5 >> 24;
  _7 = pfe_class_algo_stats[i_118].accepted;
  _8 = _7 >> 8;
  _9 = _8 & 65280;
  _10 = _6 | _9;
  _11 = pfe_class_algo_stats[i_118].accepted;
  _12 = _11 << 8;
  _13 = _12 & 16711680;
  _14 = _10 | _13;
  _15 = pfe_class_algo_stats[i_118].accepted;
  _16 = _15 << 24;
  _17 = _14 | _16;
  _18 = _4 + _17;
  stat_122(D)->accepted = _18;
  # DEBUG BEGIN_STMT
  _19 = stat_122(D)->discarded;
  _20 = pfe_class_algo_stats[i_118].discarded;
  _21 = _20 >> 24;
  _22 = pfe_class_algo_stats[i_118].discarded;
  _23 = _22 >> 8;
  _24 = _23 & 65280;
  _25 = _21 | _24;
  _26 = pfe_class_algo_stats[i_118].discarded;
  _27 = _26 << 8;
  _28 = _27 & 16711680;
  _29 = _25 | _28;
  _30 = pfe_class_algo_stats[i_118].discarded;
  _31 = _30 << 24;
  _32 = _29 | _31;
  _33 = _19 + _32;
  stat_122(D)->discarded = _33;
  # DEBUG BEGIN_STMT
  _34 = stat_122(D)->processed;
  _35 = pfe_class_algo_stats[i_118].processed;
  _36 = _35 >> 24;
  _37 = pfe_class_algo_stats[i_118].processed;
  _38 = _37 >> 8;
  _39 = _38 & 65280;
  _40 = _36 | _39;
  _41 = pfe_class_algo_stats[i_118].processed;
  _42 = _41 << 8;
  _43 = _42 & 16711680;
  _44 = _40 | _43;
  _45 = pfe_class_algo_stats[i_118].processed;
  _46 = _45 << 24;
  _47 = _44 | _46;
  _48 = _34 + _47;
  stat_122(D)->processed = _48;
  # DEBUG BEGIN_STMT
  _49 = stat_122(D)->rejected;
  _50 = pfe_class_algo_stats[i_118].rejected;
  _51 = _50 >> 24;
  _52 = pfe_class_algo_stats[i_118].rejected;
  _53 = _52 >> 8;
  _54 = _53 & 65280;
  _55 = _51 | _54;
  _56 = pfe_class_algo_stats[i_118].rejected;
  _57 = _56 << 8;
  _58 = _57 & 16711680;
  _59 = _55 | _58;
  _60 = pfe_class_algo_stats[i_118].rejected;
  _61 = _60 << 24;
  _62 = _59 | _61;
  _63 = _49 + _62;
  stat_122(D)->rejected = _63;
  # DEBUG BEGIN_STMT
  i_139 = i_118 + 1;
  # DEBUG i => i_139

  <bb 4> :
  # i_118 = PHI <i_128(2), i_139(3)>
  # DEBUG i => i_118
  # DEBUG BEGIN_STMT
  _64 = iface_125(D)->class;
  _65 = pfe_class_get_num_of_pes (_64);
  if (i_118 < _65)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _66 = stat_122(D)->accepted;
  _67 = _66 >> 24;
  _68 = stat_122(D)->accepted;
  _69 = _68 >> 8;
  _70 = _69 & 65280;
  _71 = _67 | _70;
  _72 = stat_122(D)->accepted;
  _73 = _72 << 8;
  _74 = _73 & 16711680;
  _75 = _71 | _74;
  _76 = stat_122(D)->accepted;
  _77 = _76 << 24;
  _78 = _75 | _77;
  stat_122(D)->accepted = _78;
  # DEBUG BEGIN_STMT
  _79 = stat_122(D)->discarded;
  _80 = _79 >> 24;
  _81 = stat_122(D)->discarded;
  _82 = _81 >> 8;
  _83 = _82 & 65280;
  _84 = _80 | _83;
  _85 = stat_122(D)->discarded;
  _86 = _85 << 8;
  _87 = _86 & 16711680;
  _88 = _84 | _87;
  _89 = stat_122(D)->discarded;
  _90 = _89 << 24;
  _91 = _88 | _90;
  stat_122(D)->discarded = _91;
  # DEBUG BEGIN_STMT
  _92 = stat_122(D)->processed;
  _93 = _92 >> 24;
  _94 = stat_122(D)->processed;
  _95 = _94 >> 8;
  _96 = _95 & 65280;
  _97 = _93 | _96;
  _98 = stat_122(D)->processed;
  _99 = _98 << 8;
  _100 = _99 & 16711680;
  _101 = _97 | _100;
  _102 = stat_122(D)->processed;
  _103 = _102 << 24;
  _104 = _101 | _103;
  stat_122(D)->processed = _104;
  # DEBUG BEGIN_STMT
  _105 = stat_122(D)->rejected;
  _106 = _105 >> 24;
  _107 = stat_122(D)->rejected;
  _108 = _107 >> 8;
  _109 = _108 & 65280;
  _110 = _106 | _109;
  _111 = stat_122(D)->rejected;
  _112 = _111 << 8;
  _113 = _112 & 16711680;
  _114 = _110 | _113;
  _115 = stat_122(D)->rejected;
  _116 = _115 << 24;
  _117 = _114 | _116;
  stat_122(D)->rejected = _117;
  # DEBUG BEGIN_STMT
  _134 = ret_127;
  return _134;

}


__attribute__((pure))
pfe_log_if_get_name (const struct pfe_log_if_t * iface)
{
  const char_t * str;
  const char_t * _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (iface_2(D) == 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  str_5 = "(unknown)";
  # DEBUG str => str_5
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  str_4 = iface_2(D)->name;
  # DEBUG str => str_4

  <bb 5> :
  # str_1 = PHI <str_5(3), str_4(4)>
  # DEBUG str => str_1
  # DEBUG BEGIN_STMT
  _6 = str_1;
  return _6;

}


__attribute__((pure))
pfe_log_if_is_discard (struct pfe_log_if_t * iface)
{
  bool_t ret;
  <unnamed type> _1;
  long unsigned int _2;
  long unsigned int _3;
  <unnamed type> _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  <unnamed type> _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  <unnamed type> _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  _Bool _19;
  bool_t _23;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_21(D)->log_if_class.flags;
  _2 = (long unsigned int) _1;
  _3 = _2 >> 24;
  _4 = iface_21(D)->log_if_class.flags;
  _5 = (long unsigned int) _4;
  _6 = _5 >> 8;
  _7 = _6 & 65280;
  _8 = _3 | _7;
  _9 = iface_21(D)->log_if_class.flags;
  _10 = (long unsigned int) _9;
  _11 = _10 << 8;
  _12 = _11 & 16711680;
  _13 = _8 | _12;
  _14 = iface_21(D)->log_if_class.flags;
  _15 = (long unsigned int) _14;
  _16 = _15 << 24;
  _17 = _13 | _16;
  _18 = _17 & 16;
  _19 = _18 != 0;
  ret_22 = (bool_t) _19;
  # DEBUG ret => ret_22
  # DEBUG BEGIN_STMT
  _23 = ret_22;
  return _23;

}


pfe_log_if_discard_disable (struct pfe_log_if_t * iface)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  oal_mutex_t * _1;
  int _2;
  long unsigned int tmp.27_3;
  long unsigned int _4;
  <unnamed type> _5;
  struct pfe_ct_log_if_t * _6;
  oal_mutex_t * _7;
  int _8;
  errno_t _19;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &iface_10(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  tmp_13 = iface_10(D)->log_if_class.flags;
  # DEBUG tmp => tmp_13
  # DEBUG BEGIN_STMT
  tmp.27_3 = (long unsigned int) tmp_13;
  _4 = tmp.27_3 & 4026531839;
  _5 = (<unnamed type>) _4;
  iface_10(D)->log_if_class.flags = _5;
  # DEBUG BEGIN_STMT
  _6 = &iface_10(D)->log_if_class;
  ret_16 = pfe_log_if_write_to_class_nostats (iface_10(D), _6);
  # DEBUG ret => ret_16
  # DEBUG BEGIN_STMT
  if (ret_16 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  iface_10(D)->log_if_class.flags = tmp_13;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _7 = &iface_10(D)->lock;
  _8 = oal_mutex_unlock (_7);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _19 = ret_16;
  return _19;

}


pfe_log_if_discard_enable (struct pfe_log_if_t * iface)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  oal_mutex_t * _1;
  int _2;
  long unsigned int tmp.26_3;
  long unsigned int _4;
  <unnamed type> _5;
  struct pfe_ct_log_if_t * _6;
  oal_mutex_t * _7;
  int _8;
  errno_t _19;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &iface_10(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  tmp_13 = iface_10(D)->log_if_class.flags;
  # DEBUG tmp => tmp_13
  # DEBUG BEGIN_STMT
  tmp.26_3 = (long unsigned int) tmp_13;
  _4 = tmp.26_3 | 268435456;
  _5 = (<unnamed type>) _4;
  iface_10(D)->log_if_class.flags = _5;
  # DEBUG BEGIN_STMT
  _6 = &iface_10(D)->log_if_class;
  ret_16 = pfe_log_if_write_to_class_nostats (iface_10(D), _6);
  # DEBUG ret => ret_16
  # DEBUG BEGIN_STMT
  if (ret_16 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  iface_10(D)->log_if_class.flags = tmp_13;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _7 = &iface_10(D)->lock;
  _8 = oal_mutex_unlock (_7);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _19 = ret_16;
  return _19;

}


pfe_log_if_allmulti_disable (const struct pfe_log_if_t * iface)
{
  errno_t ret;
  struct pfe_phy_if_t * _1;
  errno_t _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_3(D)->parent;
  ret_5 = pfe_phy_if_allmulti_disable (_1);
  # DEBUG ret => ret_5
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = ret_5;
  return _6;

}


pfe_log_if_allmulti_enable (const struct pfe_log_if_t * iface)
{
  errno_t ret;
  struct pfe_phy_if_t * _1;
  errno_t _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_3(D)->parent;
  ret_5 = pfe_phy_if_allmulti_enable (_1);
  # DEBUG ret => ret_5
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = ret_5;
  return _6;

}


__attribute__((pure))
pfe_log_if_is_promisc (struct pfe_log_if_t * iface)
{
  bool_t ret;
  <unnamed type> _1;
  long unsigned int _2;
  long unsigned int _3;
  <unnamed type> _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  <unnamed type> _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  <unnamed type> _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  _Bool _19;
  bool_t _23;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_21(D)->log_if_class.flags;
  _2 = (long unsigned int) _1;
  _3 = _2 >> 24;
  _4 = iface_21(D)->log_if_class.flags;
  _5 = (long unsigned int) _4;
  _6 = _5 >> 8;
  _7 = _6 & 65280;
  _8 = _3 | _7;
  _9 = iface_21(D)->log_if_class.flags;
  _10 = (long unsigned int) _9;
  _11 = _10 << 8;
  _12 = _11 & 16711680;
  _13 = _8 | _12;
  _14 = iface_21(D)->log_if_class.flags;
  _15 = (long unsigned int) _14;
  _16 = _15 << 24;
  _17 = _13 | _16;
  _18 = _17 & 2;
  _19 = _18 != 0;
  ret_22 = (bool_t) _19;
  # DEBUG ret => ret_22
  # DEBUG BEGIN_STMT
  _23 = ret_22;
  return _23;

}


pfe_log_if_promisc_disable (struct pfe_log_if_t * iface)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  oal_mutex_t * _1;
  int _2;
  long unsigned int tmp.25_3;
  long unsigned int _4;
  <unnamed type> _5;
  struct pfe_ct_log_if_t * _6;
  oal_mutex_t * _7;
  int _8;
  errno_t _19;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &iface_10(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  tmp_13 = iface_10(D)->log_if_class.flags;
  # DEBUG tmp => tmp_13
  # DEBUG BEGIN_STMT
  tmp.25_3 = (long unsigned int) tmp_13;
  _4 = tmp.25_3 & 4261412863;
  _5 = (<unnamed type>) _4;
  iface_10(D)->log_if_class.flags = _5;
  # DEBUG BEGIN_STMT
  _6 = &iface_10(D)->log_if_class;
  ret_16 = pfe_log_if_write_to_class_nostats (iface_10(D), _6);
  # DEBUG ret => ret_16
  # DEBUG BEGIN_STMT
  if (ret_16 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  iface_10(D)->log_if_class.flags = tmp_13;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _7 = &iface_10(D)->lock;
  _8 = oal_mutex_unlock (_7);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _19 = ret_16;
  return _19;

}


pfe_log_if_promisc_enable (struct pfe_log_if_t * iface)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  oal_mutex_t * _1;
  int _2;
  <unnamed type> _3;
  long unsigned int _4;
  long unsigned int _5;
  <unnamed type> _6;
  struct pfe_ct_log_if_t * _7;
  oal_mutex_t * _8;
  int _9;
  errno_t _20;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &iface_11(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  tmp_14 = iface_11(D)->log_if_class.flags;
  # DEBUG tmp => tmp_14
  # DEBUG BEGIN_STMT
  _3 = iface_11(D)->log_if_class.flags;
  _4 = (long unsigned int) _3;
  _5 = _4 | 33554432;
  _6 = (<unnamed type>) _5;
  iface_11(D)->log_if_class.flags = _6;
  # DEBUG BEGIN_STMT
  _7 = &iface_11(D)->log_if_class;
  ret_17 = pfe_log_if_write_to_class_nostats (iface_11(D), _7);
  # DEBUG ret => ret_17
  # DEBUG BEGIN_STMT
  if (ret_17 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  iface_11(D)->log_if_class.flags = tmp_14;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _8 = &iface_11(D)->lock;
  _9 = oal_mutex_unlock (_8);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _20 = ret_17;
  return _20;

}


__attribute__((pure))
pfe_log_if_is_loopback (struct pfe_log_if_t * iface)
{
  bool_t ret;
  <unnamed type> _1;
  long unsigned int _2;
  long unsigned int _3;
  _Bool _4;
  bool_t _8;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_6(D)->log_if_class.flags;
  _2 = (long unsigned int) _1;
  _3 = _2 & 1024;
  _4 = _3 != 0;
  ret_7 = (bool_t) _4;
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  _8 = ret_7;
  return _8;

}


pfe_log_if_loopback_disable (struct pfe_log_if_t * iface)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  oal_mutex_t * _1;
  int _2;
  long unsigned int tmp.24_3;
  long unsigned int _4;
  <unnamed type> _5;
  struct pfe_ct_log_if_t * _6;
  oal_mutex_t * _7;
  int _8;
  struct pfe_phy_if_t * _9;
  oal_mutex_t * _10;
  int _11;
  <unnamed type> _12;
  int _13;
  struct pfe_ct_log_if_t * _14;
  oal_mutex_t * _15;
  int _16;
  errno_t _36;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &iface_20(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  tmp_23 = iface_20(D)->log_if_class.flags;
  # DEBUG tmp => tmp_23
  # DEBUG BEGIN_STMT
  tmp.24_3 = (long unsigned int) tmp_23;
  _4 = tmp.24_3 & 4294966271;
  _5 = (<unnamed type>) _4;
  iface_20(D)->log_if_class.flags = _5;
  # DEBUG BEGIN_STMT
  _6 = &iface_20(D)->log_if_class;
  ret_26 = pfe_log_if_write_to_class_nostats (iface_20(D), _6);
  # DEBUG ret => ret_26
  # DEBUG BEGIN_STMT
  if (ret_26 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  iface_20(D)->log_if_class.flags = tmp_23;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _7 = &iface_20(D)->lock;
  _8 = oal_mutex_unlock (_7);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (ret_26 == 0)
    goto <bb 5>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _9 = iface_20(D)->parent;
  ret_30 = pfe_phy_if_loopback_disable (_9);
  # DEBUG ret => ret_30
  # DEBUG BEGIN_STMT
  if (ret_30 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _10 = &iface_20(D)->lock;
  _11 = oal_mutex_lock (_10);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _12 = iface_20(D)->log_if_class.flags;
  _13 = _12 | 1024;
  iface_20(D)->log_if_class.flags = _13;
  # DEBUG BEGIN_STMT
  _14 = &iface_20(D)->log_if_class;
  ret_34 = pfe_log_if_write_to_class_nostats (iface_20(D), _14);
  # DEBUG ret => ret_34
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _15 = &iface_20(D)->lock;
  _16 = oal_mutex_unlock (_15);

  <bb 7> :
  # ret_17 = PHI <ret_26(4), ret_30(5), ret_34(6)>
  # DEBUG ret => ret_17
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _36 = ret_17;
  return _36;

}


pfe_log_if_loopback_enable (struct pfe_log_if_t * iface)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  oal_mutex_t * _1;
  int _2;
  long unsigned int tmp.23_3;
  long unsigned int _4;
  <unnamed type> _5;
  struct pfe_ct_log_if_t * _6;
  oal_mutex_t * _7;
  int _8;
  struct pfe_phy_if_t * _9;
  oal_mutex_t * _10;
  int _11;
  <unnamed type> _12;
  int _13;
  struct pfe_ct_log_if_t * _14;
  oal_mutex_t * _15;
  int _16;
  errno_t _36;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &iface_20(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  tmp_23 = iface_20(D)->log_if_class.flags;
  # DEBUG tmp => tmp_23
  # DEBUG BEGIN_STMT
  tmp.23_3 = (long unsigned int) tmp_23;
  _4 = tmp.23_3 | 1024;
  _5 = (<unnamed type>) _4;
  iface_20(D)->log_if_class.flags = _5;
  # DEBUG BEGIN_STMT
  _6 = &iface_20(D)->log_if_class;
  ret_26 = pfe_log_if_write_to_class_nostats (iface_20(D), _6);
  # DEBUG ret => ret_26
  # DEBUG BEGIN_STMT
  if (ret_26 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  iface_20(D)->log_if_class.flags = tmp_23;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _7 = &iface_20(D)->lock;
  _8 = oal_mutex_unlock (_7);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (ret_26 == 0)
    goto <bb 5>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _9 = iface_20(D)->parent;
  ret_30 = pfe_phy_if_loopback_enable (_9);
  # DEBUG ret => ret_30
  # DEBUG BEGIN_STMT
  if (ret_30 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _10 = &iface_20(D)->lock;
  _11 = oal_mutex_lock (_10);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _12 = iface_20(D)->log_if_class.flags;
  _13 = _12 & -1025;
  iface_20(D)->log_if_class.flags = _13;
  # DEBUG BEGIN_STMT
  _14 = &iface_20(D)->log_if_class;
  ret_34 = pfe_log_if_write_to_class_nostats (iface_20(D), _14);
  # DEBUG ret => ret_34
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _15 = &iface_20(D)->lock;
  _16 = oal_mutex_unlock (_15);

  <bb 7> :
  # ret_17 = PHI <ret_26(4), ret_30(5), ret_34(6)>
  # DEBUG ret => ret_17
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _36 = ret_17;
  return _36;

}


__attribute__((pure))
pfe_log_if_is_enabled (struct pfe_log_if_t * iface)
{
  bool_t ret;
  <unnamed type> _1;
  long unsigned int _2;
  long unsigned int _3;
  <unnamed type> _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  <unnamed type> _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  <unnamed type> _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  _Bool _19;
  bool_t _23;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_21(D)->log_if_class.flags;
  _2 = (long unsigned int) _1;
  _3 = _2 >> 24;
  _4 = iface_21(D)->log_if_class.flags;
  _5 = (long unsigned int) _4;
  _6 = _5 >> 8;
  _7 = _6 & 65280;
  _8 = _3 | _7;
  _9 = iface_21(D)->log_if_class.flags;
  _10 = (long unsigned int) _9;
  _11 = _10 << 8;
  _12 = _11 & 16711680;
  _13 = _8 | _12;
  _14 = iface_21(D)->log_if_class.flags;
  _15 = (long unsigned int) _14;
  _16 = _15 << 24;
  _17 = _13 | _16;
  _18 = _17 & 1;
  _19 = _18 != 0;
  ret_22 = (bool_t) _19;
  # DEBUG ret => ret_22
  # DEBUG BEGIN_STMT
  _23 = ret_22;
  return _23;

}


pfe_log_if_disable (struct pfe_log_if_t * iface)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  oal_mutex_t * _1;
  int _2;
  long unsigned int tmp.21_3;
  long unsigned int _4;
  <unnamed type> _5;
  struct pfe_ct_log_if_t * _6;
  oal_mutex_t * _7;
  int _8;
  struct pfe_phy_if_t * _9;
  oal_mutex_t * _10;
  int _11;
  long unsigned int tmp.22_12;
  long unsigned int _13;
  <unnamed type> _14;
  struct pfe_ct_log_if_t * _15;
  oal_mutex_t * _16;
  int _17;
  errno_t _38;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &iface_21(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  tmp_24 = iface_21(D)->log_if_class.flags;
  # DEBUG tmp => tmp_24
  # DEBUG BEGIN_STMT
  tmp.21_3 = (long unsigned int) tmp_24;
  _4 = tmp.21_3 & 4278190079;
  _5 = (<unnamed type>) _4;
  iface_21(D)->log_if_class.flags = _5;
  # DEBUG BEGIN_STMT
  _6 = &iface_21(D)->log_if_class;
  ret_27 = pfe_log_if_write_to_class_nostats (iface_21(D), _6);
  # DEBUG ret => ret_27
  # DEBUG BEGIN_STMT
  if (ret_27 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  iface_21(D)->log_if_class.flags = tmp_24;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _7 = &iface_21(D)->lock;
  _8 = oal_mutex_unlock (_7);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (ret_27 == 0)
    goto <bb 5>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _9 = iface_21(D)->parent;
  ret_31 = pfe_phy_if_disable (_9);
  # DEBUG ret => ret_31
  # DEBUG BEGIN_STMT
  if (ret_31 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _10 = &iface_21(D)->lock;
  _11 = oal_mutex_lock (_10);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  tmp_33 = iface_21(D)->log_if_class.flags;
  # DEBUG tmp => tmp_33
  # DEBUG BEGIN_STMT
  tmp.22_12 = (long unsigned int) tmp_33;
  _13 = tmp.22_12 | 16777216;
  _14 = (<unnamed type>) _13;
  iface_21(D)->log_if_class.flags = _14;
  # DEBUG BEGIN_STMT
  _15 = &iface_21(D)->log_if_class;
  ret_36 = pfe_log_if_write_to_class_nostats (iface_21(D), _15);
  # DEBUG ret => ret_36
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _16 = &iface_21(D)->lock;
  _17 = oal_mutex_unlock (_16);

  <bb 7> :
  # ret_18 = PHI <ret_27(4), ret_31(5), ret_36(6)>
  # DEBUG ret => ret_18
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _38 = ret_18;
  return _38;

}


pfe_log_if_enable (struct pfe_log_if_t * iface)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  oal_mutex_t * _1;
  int _2;
  long unsigned int tmp.19_3;
  long unsigned int _4;
  <unnamed type> _5;
  struct pfe_ct_log_if_t * _6;
  oal_mutex_t * _7;
  int _8;
  struct pfe_phy_if_t * _9;
  oal_mutex_t * _10;
  int _11;
  long unsigned int tmp.20_12;
  long unsigned int _13;
  <unnamed type> _14;
  struct pfe_ct_log_if_t * _15;
  oal_mutex_t * _16;
  int _17;
  errno_t _38;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &iface_21(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  tmp_24 = iface_21(D)->log_if_class.flags;
  # DEBUG tmp => tmp_24
  # DEBUG BEGIN_STMT
  tmp.19_3 = (long unsigned int) tmp_24;
  _4 = tmp.19_3 | 16777216;
  _5 = (<unnamed type>) _4;
  iface_21(D)->log_if_class.flags = _5;
  # DEBUG BEGIN_STMT
  _6 = &iface_21(D)->log_if_class;
  ret_27 = pfe_log_if_write_to_class_nostats (iface_21(D), _6);
  # DEBUG ret => ret_27
  # DEBUG BEGIN_STMT
  if (ret_27 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  iface_21(D)->log_if_class.flags = tmp_24;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _7 = &iface_21(D)->lock;
  _8 = oal_mutex_unlock (_7);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (ret_27 == 0)
    goto <bb 5>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _9 = iface_21(D)->parent;
  ret_31 = pfe_phy_if_enable (_9);
  # DEBUG ret => ret_31
  # DEBUG BEGIN_STMT
  if (ret_31 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _10 = &iface_21(D)->lock;
  _11 = oal_mutex_lock (_10);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  tmp_33 = iface_21(D)->log_if_class.flags;
  # DEBUG tmp => tmp_33
  # DEBUG BEGIN_STMT
  tmp.20_12 = (long unsigned int) tmp_33;
  _13 = tmp.20_12 & 4278190079;
  _14 = (<unnamed type>) _13;
  iface_21(D)->log_if_class.flags = _14;
  # DEBUG BEGIN_STMT
  _15 = &iface_21(D)->log_if_class;
  ret_36 = pfe_log_if_write_to_class_nostats (iface_21(D), _15);
  # DEBUG ret => ret_36
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _16 = &iface_21(D)->lock;
  _17 = oal_mutex_unlock (_16);

  <bb 7> :
  # ret_18 = PHI <ret_27(4), ret_31(5), ret_36(6)>
  # DEBUG ret => ret_18
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _38 = ret_18;
  return _38;

}


pfe_log_if_del_egress_if (struct pfe_log_if_t * iface, const struct pfe_phy_if_t * phy_if)
{
  pfe_ct_phy_if_id_t phy_if_id;
  uint32_t tmp;
  errno_t ret;
  oal_mutex_t * _1;
  int _2;
  oal_mutex_t * _3;
  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;
  int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  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;
  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;
  int _36;
  long unsigned int _37;
  long unsigned int _38;
  long unsigned int _39;
  long unsigned int _40;
  long unsigned int _41;
  struct pfe_ct_log_if_t * _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;
  oal_mutex_t * _52;
  int _53;
  errno_t _70;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &iface_57(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  phy_if_id_61 = pfe_phy_if_get_id (phy_if_60(D));
  # DEBUG phy_if_id => phy_if_id_61
  # DEBUG BEGIN_STMT
  if (phy_if_id_61 > 9)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = &iface_57(D)->lock;
  _4 = oal_mutex_unlock (_3);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_69 = 22;
  # DEBUG ret => ret_69
  goto <bb 7>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _5 = iface_57(D)->log_if_class.e_phy_ifs;
  _6 = _5 >> 24;
  _7 = iface_57(D)->log_if_class.e_phy_ifs;
  _8 = _7 >> 8;
  _9 = _8 & 65280;
  _10 = _6 | _9;
  _11 = iface_57(D)->log_if_class.e_phy_ifs;
  _12 = _11 << 8;
  _13 = _12 & 16711680;
  _14 = _10 | _13;
  _15 = iface_57(D)->log_if_class.e_phy_ifs;
  _16 = _15 << 24;
  tmp_62 = _14 | _16;
  # DEBUG tmp => tmp_62
  # DEBUG BEGIN_STMT
  _17 = (int) phy_if_id_61;
  _18 = 1 << _17;
  _19 = ~_18;
  _20 = tmp_62 & _19;
  _21 = _20 >> 24;
  _22 = (int) phy_if_id_61;
  _23 = 1 << _22;
  _24 = ~_23;
  _25 = tmp_62 & _24;
  _26 = _25 >> 8;
  _27 = _26 & 65280;
  _28 = _21 | _27;
  _29 = (int) phy_if_id_61;
  _30 = 1 << _29;
  _31 = ~_30;
  _32 = tmp_62 & _31;
  _33 = _32 << 8;
  _34 = _33 & 16711680;
  _35 = _28 | _34;
  _36 = (int) phy_if_id_61;
  _37 = 1 << _36;
  _38 = ~_37;
  _39 = tmp_62 & _38;
  _40 = _39 << 24;
  _41 = _35 | _40;
  iface_57(D)->log_if_class.e_phy_ifs = _41;
  # DEBUG BEGIN_STMT
  _42 = &iface_57(D)->log_if_class;
  ret_65 = pfe_log_if_write_to_class_nostats (iface_57(D), _42);
  # DEBUG ret => ret_65
  # DEBUG BEGIN_STMT
  if (ret_65 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _43 = tmp_62 >> 24;
  _44 = tmp_62 >> 8;
  _45 = _44 & 65280;
  _46 = _43 | _45;
  _47 = tmp_62 << 8;
  _48 = _47 & 16711680;
  _49 = _46 | _48;
  _50 = tmp_62 << 24;
  _51 = _49 | _50;
  iface_57(D)->log_if_class.e_phy_ifs = _51;

  <bb 6> :
  # DEBUG BEGIN_STMT
  _52 = &iface_57(D)->lock;
  _53 = oal_mutex_unlock (_52);

  <bb 7> :
  # ret_54 = PHI <ret_69(3), ret_65(6)>
  # DEBUG ret => ret_54
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _70 = ret_54;
  return _70;

}


pfe_log_if_add_egress_if (struct pfe_log_if_t * iface, const struct pfe_phy_if_t * phy_if)
{
  pfe_ct_phy_if_id_t phy_if_id;
  uint32_t tmp;
  errno_t ret;
  oal_mutex_t * _1;
  int _2;
  oal_mutex_t * _3;
  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;
  int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  int _21;
  long unsigned int _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;
  long unsigned int _26;
  int _27;
  long unsigned int _28;
  long unsigned int _29;
  long unsigned int _30;
  long unsigned int _31;
  long unsigned int _32;
  int _33;
  long unsigned int _34;
  long unsigned int _35;
  long unsigned int _36;
  long unsigned int _37;
  struct pfe_ct_log_if_t * _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;
  oal_mutex_t * _48;
  int _49;
  errno_t _66;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &iface_53(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  phy_if_id_57 = pfe_phy_if_get_id (phy_if_56(D));
  # DEBUG phy_if_id => phy_if_id_57
  # DEBUG BEGIN_STMT
  if (phy_if_id_57 > 9)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = &iface_53(D)->lock;
  _4 = oal_mutex_unlock (_3);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_65 = 22;
  # DEBUG ret => ret_65
  goto <bb 7>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _5 = iface_53(D)->log_if_class.e_phy_ifs;
  _6 = _5 >> 24;
  _7 = iface_53(D)->log_if_class.e_phy_ifs;
  _8 = _7 >> 8;
  _9 = _8 & 65280;
  _10 = _6 | _9;
  _11 = iface_53(D)->log_if_class.e_phy_ifs;
  _12 = _11 << 8;
  _13 = _12 & 16711680;
  _14 = _10 | _13;
  _15 = iface_53(D)->log_if_class.e_phy_ifs;
  _16 = _15 << 24;
  tmp_58 = _14 | _16;
  # DEBUG tmp => tmp_58
  # DEBUG BEGIN_STMT
  _17 = (int) phy_if_id_57;
  _18 = 1 << _17;
  _19 = tmp_58 | _18;
  _20 = _19 >> 24;
  _21 = (int) phy_if_id_57;
  _22 = 1 << _21;
  _23 = tmp_58 | _22;
  _24 = _23 >> 8;
  _25 = _24 & 65280;
  _26 = _20 | _25;
  _27 = (int) phy_if_id_57;
  _28 = 1 << _27;
  _29 = tmp_58 | _28;
  _30 = _29 << 8;
  _31 = _30 & 16711680;
  _32 = _26 | _31;
  _33 = (int) phy_if_id_57;
  _34 = 1 << _33;
  _35 = tmp_58 | _34;
  _36 = _35 << 24;
  _37 = _32 | _36;
  iface_53(D)->log_if_class.e_phy_ifs = _37;
  # DEBUG BEGIN_STMT
  _38 = &iface_53(D)->log_if_class;
  ret_61 = pfe_log_if_write_to_class_nostats (iface_53(D), _38);
  # DEBUG ret => ret_61
  # DEBUG BEGIN_STMT
  if (ret_61 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _39 = tmp_58 >> 24;
  _40 = tmp_58 >> 8;
  _41 = _40 & 65280;
  _42 = _39 | _41;
  _43 = tmp_58 << 8;
  _44 = _43 & 16711680;
  _45 = _42 | _44;
  _46 = tmp_58 << 24;
  _47 = _45 | _46;
  iface_53(D)->log_if_class.e_phy_ifs = _47;

  <bb 6> :
  # DEBUG BEGIN_STMT
  _48 = &iface_53(D)->lock;
  _49 = oal_mutex_unlock (_48);

  <bb 7> :
  # ret_50 = PHI <ret_65(3), ret_61(6)>
  # DEBUG ret => ret_50
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _66 = ret_50;
  return _66;

}


pfe_log_if_set_egress_ifs (struct pfe_log_if_t * iface, uint32_t egress)
{
  errno_t ret;
  uint32_t tmp;
  oal_mutex_t * _1;
  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;
  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;
  struct pfe_ct_log_if_t * _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;
  oal_mutex_t * _34;
  int _35;
  errno_t _47;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &iface_37(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = iface_37(D)->log_if_class.e_phy_ifs;
  _4 = _3 >> 24;
  _5 = iface_37(D)->log_if_class.e_phy_ifs;
  _6 = _5 >> 8;
  _7 = _6 & 65280;
  _8 = _4 | _7;
  _9 = iface_37(D)->log_if_class.e_phy_ifs;
  _10 = _9 << 8;
  _11 = _10 & 16711680;
  _12 = _8 | _11;
  _13 = iface_37(D)->log_if_class.e_phy_ifs;
  _14 = _13 << 24;
  tmp_40 = _12 | _14;
  # DEBUG tmp => tmp_40
  # DEBUG BEGIN_STMT
  _15 = egress_41(D) >> 24;
  _16 = egress_41(D) >> 8;
  _17 = _16 & 65280;
  _18 = _15 | _17;
  _19 = egress_41(D) << 8;
  _20 = _19 & 16711680;
  _21 = _18 | _20;
  _22 = egress_41(D) << 24;
  _23 = _21 | _22;
  iface_37(D)->log_if_class.e_phy_ifs = _23;
  # DEBUG BEGIN_STMT
  _24 = &iface_37(D)->log_if_class;
  ret_44 = pfe_log_if_write_to_class_nostats (iface_37(D), _24);
  # DEBUG ret => ret_44
  # DEBUG BEGIN_STMT
  if (ret_44 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _25 = tmp_40 >> 24;
  _26 = tmp_40 >> 8;
  _27 = _26 & 65280;
  _28 = _25 | _27;
  _29 = tmp_40 << 8;
  _30 = _29 & 16711680;
  _31 = _28 | _30;
  _32 = tmp_40 << 24;
  _33 = _31 | _32;
  iface_37(D)->log_if_class.e_phy_ifs = _33;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _34 = &iface_37(D)->lock;
  _35 = oal_mutex_unlock (_34);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _47 = ret_44;
  return _47;

}


pfe_log_if_get_egress_ifs (struct pfe_log_if_t * iface, uint32_t * egress)
{
  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;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  errno_t _19;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_15(D)->log_if_class.e_phy_ifs;
  _2 = _1 >> 24;
  _3 = iface_15(D)->log_if_class.e_phy_ifs;
  _4 = _3 >> 8;
  _5 = _4 & 65280;
  _6 = _2 | _5;
  _7 = iface_15(D)->log_if_class.e_phy_ifs;
  _8 = _7 << 8;
  _9 = _8 & 16711680;
  _10 = _6 | _9;
  _11 = iface_15(D)->log_if_class.e_phy_ifs;
  _12 = _11 << 24;
  _13 = _10 | _12;
  *egress_16(D) = _13;
  # DEBUG BEGIN_STMT
  ret_18 = 0;
  # DEBUG ret => ret_18
  # DEBUG BEGIN_STMT
  _19 = ret_18;
  return _19;

}


pfe_log_if_flush_mac_addrs (struct pfe_log_if_t * iface, pfe_mac_db_crit_t crit, pfe_mac_type_t type, pfe_drv_id_t owner)
{
  errno_t ret;
  oal_mutex_t * _1;
  int _2;
  struct pfe_phy_if_t * _3;
  int _4;
  struct pfe_mac_db_t * _5;
  oal_mutex_t * _6;
  int _7;
  errno_t _21;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &iface_10(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = iface_10(D)->parent;
  _4 = pfe_phy_if_flush_mac_addrs (_3, crit_13(D), type_14(D), owner_15(D));
  if (_4 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_19 = 114;
  # DEBUG ret => ret_19
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _5 = iface_10(D)->mac_db;
  ret_18 = pfe_mac_db_flush (_5, crit_13(D), type_14(D), owner_15(D));
  # DEBUG ret => ret_18
  # DEBUG BEGIN_STMT

  <bb 5> :
  # ret_8 = PHI <ret_19(3), ret_18(4)>
  # DEBUG ret => ret_8
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = &iface_10(D)->lock;
  _7 = oal_mutex_unlock (_6);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _21 = ret_8;
  return _21;

}


pfe_log_if_get_mac_addr (struct pfe_log_if_t * iface, uint8_t * addr)
{
  errno_t ret;
  struct pfe_mac_db_t * _1;
  errno_t _7;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_3(D)->mac_db;
  ret_6 = pfe_mac_db_get_first_addr (_1, 3, 3, 6, addr_4(D));
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _7 = ret_6;
  return _7;

}


pfe_log_if_get_mac_db (const struct pfe_log_if_t * iface)
{
  struct pfe_mac_db_t * ptr;
  struct pfe_mac_db_t * _4;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ptr_3 = iface_2(D)->mac_db;
  # DEBUG ptr => ptr_3
  # DEBUG BEGIN_STMT
  _4 = ptr_3;
  return _4;

}


pfe_log_if_del_mac_addr (struct pfe_log_if_t * iface, const uint8_t * addr, pfe_drv_id_t owner)
{
  errno_t ret;
  oal_mutex_t * _1;
  int _2;
  struct pfe_mac_db_t * _3;
  struct pfe_phy_if_t * _4;
  struct pfe_mac_db_t * _5;
  oal_mutex_t * _6;
  int _7;
  errno_t _22;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &iface_10(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = iface_10(D)->mac_db;
  ret_16 = pfe_mac_db_del_addr (_3, addr_13(D), owner_14(D));
  # DEBUG ret => ret_16
  # DEBUG BEGIN_STMT
  if (ret_16 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 3>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _4 = iface_10(D)->parent;
  ret_18 = pfe_phy_if_del_mac_addr (_4, addr_13(D), owner_14(D));
  # DEBUG ret => ret_18
  # DEBUG BEGIN_STMT
  if (ret_18 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = iface_10(D)->mac_db;
  ret_20 = pfe_mac_db_add_addr (_5, addr_13(D), owner_14(D));
  # DEBUG ret => ret_20
  # DEBUG BEGIN_STMT

  <bb 5> :
  # ret_8 = PHI <ret_16(2), ret_18(3), ret_20(4)>
  # DEBUG ret => ret_8
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = &iface_10(D)->lock;
  _7 = oal_mutex_unlock (_6);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _22 = ret_8;
  return _22;

}


pfe_log_if_add_mac_addr (struct pfe_log_if_t * iface, const uint8_t * addr, pfe_drv_id_t owner)
{
  errno_t ret;
  oal_mutex_t * _1;
  int _2;
  struct pfe_mac_db_t * _3;
  struct pfe_phy_if_t * _4;
  int _5;
  struct pfe_mac_db_t * _6;
  oal_mutex_t * _7;
  int _8;
  errno_t _23;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &iface_11(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = iface_11(D)->mac_db;
  ret_17 = pfe_mac_db_add_addr (_3, addr_14(D), owner_15(D));
  # DEBUG ret => ret_17
  # DEBUG BEGIN_STMT
  if (ret_17 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _4 = iface_11(D)->parent;
  _5 = pfe_phy_if_add_mac_addr (_4, addr_14(D), owner_15(D));
  if (_5 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = iface_11(D)->mac_db;
  ret_20 = pfe_mac_db_del_addr (_6, addr_14(D), owner_15(D));
  # DEBUG ret => ret_20
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_21 = 114;
  # DEBUG ret => ret_21

  <bb 5> :
  # ret_9 = PHI <ret_17(2), ret_17(3), ret_21(4)>
  # DEBUG ret => ret_9
  # DEBUG BEGIN_STMT
  _7 = &iface_11(D)->lock;
  _8 = oal_mutex_unlock (_7);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _23 = ret_9;
  return _23;

}


pfe_log_if_get_match_rules (struct pfe_log_if_t * iface, pfe_ct_if_m_rules_t * rules, struct pfe_ct_if_m_args_t * args)
{
  errno_t ret;
  <unnamed type> _1;
  long unsigned int _2;
  long unsigned int _3;
  <unnamed type> _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  <unnamed type> _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  <unnamed type> _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  <unnamed type> _18;
  struct pfe_ct_if_m_args_t * _19;
  errno_t _28;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_22(D)->log_if_class.m_rules;
  _2 = (long unsigned int) _1;
  _3 = _2 >> 24;
  _4 = iface_22(D)->log_if_class.m_rules;
  _5 = (long unsigned int) _4;
  _6 = _5 >> 8;
  _7 = _6 & 65280;
  _8 = _3 | _7;
  _9 = iface_22(D)->log_if_class.m_rules;
  _10 = (long unsigned int) _9;
  _11 = _10 << 8;
  _12 = _11 & 16711680;
  _13 = _8 | _12;
  _14 = iface_22(D)->log_if_class.m_rules;
  _15 = (long unsigned int) _14;
  _16 = _15 << 24;
  _17 = _13 | _16;
  _18 = (<unnamed type>) _17;
  *rules_23(D) = _18;
  # DEBUG BEGIN_STMT
  if (args_25(D) != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _19 = &iface_22(D)->log_if_class.m_args;
  memcpy (args_25(D), _19, 68);

  <bb 4> :
  # DEBUG BEGIN_STMT
  ret_27 = 0;
  # DEBUG ret => ret_27
  # DEBUG BEGIN_STMT
  _28 = ret_27;
  return _28;

}


pfe_log_if_del_match_rule (struct pfe_log_if_t * iface, pfe_ct_if_m_rules_t rule)
{
  pfe_ct_if_m_rules_t tmp;
  errno_t ret;
  oal_mutex_t * _1;
  int _2;
  <unnamed type> _3;
  long unsigned int rule.15_4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int rule.16_7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int rule.17_12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int rule.18_17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  int _21;
  int _22;
  struct pfe_ct_log_if_t * _23;
  oal_mutex_t * _24;
  int _25;
  errno_t _37;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &iface_27(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  tmp_30 = iface_27(D)->log_if_class.m_rules;
  # DEBUG tmp => tmp_30
  # DEBUG BEGIN_STMT
  _3 = iface_27(D)->log_if_class.m_rules;
  rule.15_4 = (long unsigned int) rule_31(D);
  _5 = ~rule.15_4;
  _6 = _5 >> 24;
  rule.16_7 = (long unsigned int) rule_31(D);
  _8 = ~rule.16_7;
  _9 = _8 >> 8;
  _10 = _9 & 65280;
  _11 = _6 | _10;
  rule.17_12 = (long unsigned int) rule_31(D);
  _13 = ~rule.17_12;
  _14 = _13 << 8;
  _15 = _14 & 16711680;
  _16 = _11 | _15;
  rule.18_17 = (long unsigned int) rule_31(D);
  _18 = ~rule.18_17;
  _19 = _18 << 24;
  _20 = _16 | _19;
  _21 = (int) _20;
  _22 = _3 & _21;
  iface_27(D)->log_if_class.m_rules = _22;
  # DEBUG BEGIN_STMT
  _23 = &iface_27(D)->log_if_class;
  ret_34 = pfe_log_if_write_to_class_nostats (iface_27(D), _23);
  # DEBUG ret => ret_34
  # DEBUG BEGIN_STMT
  if (ret_34 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  iface_27(D)->log_if_class.m_rules = tmp_30;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _24 = &iface_27(D)->lock;
  _25 = oal_mutex_unlock (_24);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _37 = ret_34;
  return _37;

}


pfe_log_if_add_match_rule (struct pfe_log_if_t * iface, pfe_ct_if_m_rules_t rule, const void * arg, uint32_t arg_len)
{
  pfe_ct_if_m_rules_t tmp;
  errno_t ret;
  long unsigned int rule.9_1;
  long unsigned int _2;
  long unsigned int rule.10_3;
  long unsigned int _4;
  oal_mutex_t * _5;
  int _6;
  <unnamed type> _7;
  long unsigned int rule.11_8;
  long unsigned int _9;
  long unsigned int rule.12_10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int rule.13_14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int rule.14_18;
  long unsigned int _19;
  long unsigned int _20;
  int _21;
  int _22;
  struct pfe_ct_log_if_t * _23;
  oal_mutex_t * _24;
  int _25;
  errno_t _46;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (rule_30(D) == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  ret_45 = 22;
  # DEBUG ret => ret_45
  goto <bb 10>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  rule.9_1 = (long unsigned int) rule_30(D);
  _2 = rule.9_1 + 4294967295;
  rule.10_3 = (long unsigned int) rule_30(D);
  _4 = _2 & rule.10_3;
  if (_4 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  ret_44 = 22;
  # DEBUG ret => ret_44
  goto <bb 10>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _5 = &iface_31(D)->lock;
  _6 = oal_mutex_lock (_5);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_37 = pfe_log_if_add_match_rule_validate_arg (iface_31(D), rule_30(D), arg_34(D), arg_len_35(D));
  # DEBUG ret => ret_37
  # DEBUG BEGIN_STMT
  if (ret_37 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  tmp_38 = iface_31(D)->log_if_class.m_rules;
  # DEBUG tmp => tmp_38
  # DEBUG BEGIN_STMT
  _7 = iface_31(D)->log_if_class.m_rules;
  rule.11_8 = (long unsigned int) rule_30(D);
  _9 = rule.11_8 >> 24;
  rule.12_10 = (long unsigned int) rule_30(D);
  _11 = rule.12_10 >> 8;
  _12 = _11 & 65280;
  _13 = _9 | _12;
  rule.13_14 = (long unsigned int) rule_30(D);
  _15 = rule.13_14 << 8;
  _16 = _15 & 16711680;
  _17 = _13 | _16;
  rule.14_18 = (long unsigned int) rule_30(D);
  _19 = rule.14_18 << 24;
  _20 = _17 | _19;
  _21 = (int) _20;
  _22 = _7 | _21;
  iface_31(D)->log_if_class.m_rules = _22;
  # DEBUG BEGIN_STMT
  _23 = &iface_31(D)->log_if_class;
  ret_41 = pfe_log_if_write_to_class_nostats (iface_31(D), _23);
  # DEBUG ret => ret_41
  # DEBUG BEGIN_STMT
  if (ret_41 != 0)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  iface_31(D)->log_if_class.m_rules = tmp_38;

  <bb 9> :
  # ret_26 = PHI <ret_37(6), ret_41(7), ret_41(8)>
  # DEBUG ret => ret_26
  # DEBUG BEGIN_STMT
  _24 = &iface_31(D)->lock;
  _25 = oal_mutex_unlock (_24);

  <bb 10> :
  # ret_27 = PHI <ret_45(3), ret_44(5), ret_26(9)>
  # DEBUG ret => ret_27
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _46 = ret_27;
  return _46;

}


pfe_log_if_add_match_rule_validate_arg (struct pfe_log_if_t * iface, pfe_ct_if_m_rules_t rule, const void * arg, uint32_t arg_len)
{
  errno_t ret;
  errno_t _17;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_9 = pfe_log_if_match_rule1 (iface_4(D), rule_5(D), arg_6(D), arg_len_7(D));
  # DEBUG ret => ret_9
  # DEBUG BEGIN_STMT
  if (ret_9 == 22)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  ret_11 = pfe_log_if_match_rule2 (iface_4(D), rule_5(D), arg_6(D), arg_len_7(D));
  # DEBUG ret => ret_11
  # DEBUG BEGIN_STMT
  if (ret_11 == 22)
    goto <bb 4>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  ret_13 = pfe_log_if_match_rule3 (iface_4(D), rule_5(D), arg_6(D), arg_len_7(D));
  # DEBUG ret => ret_13
  # DEBUG BEGIN_STMT
  if (ret_13 == 22)
    goto <bb 5>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  ret_15 = pfe_log_if_match_rule4 (iface_4(D), rule_5(D), arg_6(D), arg_len_7(D));
  # DEBUG ret => ret_15
  # DEBUG BEGIN_STMT
  if (ret_15 == 22)
    goto <bb 6>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  if (arg_len_7(D) != 0)
    goto <bb 8>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  ret_16 = 0;
  # DEBUG ret => ret_16

  <bb 8> :
  # ret_1 = PHI <ret_9(2), ret_11(3), ret_13(4), ret_15(5), ret_15(6), ret_16(7)>
  # DEBUG ret => ret_1
  # DEBUG BEGIN_STMT
  _17 = ret_1;
  return _17;

}


pfe_log_if_set_match_rules (struct pfe_log_if_t * iface, pfe_ct_if_m_rules_t rules, const struct pfe_ct_if_m_args_t * args)
{
  pfe_ct_if_m_rules_t tmp;
  errno_t ret;
  oal_mutex_t * _1;
  int _2;
  struct pfe_ct_if_m_args_t * _3;
  long unsigned int rules.5_4;
  long unsigned int _5;
  long unsigned int rules.6_6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int rules.7_10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int rules.8_14;
  long unsigned int _15;
  long unsigned int _16;
  <unnamed type> _17;
  struct pfe_ct_log_if_t * _18;
  oal_mutex_t * _19;
  int _20;
  errno_t _37;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (args_24(D) == 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  ret_36 = 22;
  # DEBUG ret => ret_36
  goto <bb 7>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _1 = &iface_25(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = &iface_25(D)->log_if_class.m_args;
  memcpy (_3, args_24(D), 68);
  # DEBUG BEGIN_STMT
  tmp_29 = iface_25(D)->log_if_class.m_rules;
  # DEBUG tmp => tmp_29
  # DEBUG BEGIN_STMT
  rules.5_4 = (long unsigned int) rules_30(D);
  _5 = rules.5_4 >> 24;
  rules.6_6 = (long unsigned int) rules_30(D);
  _7 = rules.6_6 >> 8;
  _8 = _7 & 65280;
  _9 = _5 | _8;
  rules.7_10 = (long unsigned int) rules_30(D);
  _11 = rules.7_10 << 8;
  _12 = _11 & 16711680;
  _13 = _9 | _12;
  rules.8_14 = (long unsigned int) rules_30(D);
  _15 = rules.8_14 << 24;
  _16 = _13 | _15;
  _17 = (<unnamed type>) _16;
  iface_25(D)->log_if_class.m_rules = _17;
  # DEBUG BEGIN_STMT
  _18 = &iface_25(D)->log_if_class;
  ret_33 = pfe_log_if_write_to_class_nostats (iface_25(D), _18);
  # DEBUG ret => ret_33
  # DEBUG BEGIN_STMT
  if (ret_33 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  iface_25(D)->log_if_class.m_rules = tmp_29;

  <bb 6> :
  # DEBUG BEGIN_STMT
  _19 = &iface_25(D)->lock;
  _20 = oal_mutex_unlock (_19);

  <bb 7> :
  # ret_21 = PHI <ret_36(3), ret_33(6)>
  # DEBUG ret => ret_21
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _37 = ret_21;
  return _37;

}


pfe_log_if_set_match_and (struct pfe_log_if_t * iface)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  oal_mutex_t * _1;
  int _2;
  <unnamed type> _3;
  long unsigned int _4;
  long unsigned int _5;
  <unnamed type> _6;
  struct pfe_ct_log_if_t * _7;
  oal_mutex_t * _8;
  int _9;
  errno_t _20;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &iface_11(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  tmp_14 = iface_11(D)->log_if_class.flags;
  # DEBUG tmp => tmp_14
  # DEBUG BEGIN_STMT
  _3 = iface_11(D)->log_if_class.flags;
  _4 = (long unsigned int) _3;
  _5 = _4 & 4160749567;
  _6 = (<unnamed type>) _5;
  iface_11(D)->log_if_class.flags = _6;
  # DEBUG BEGIN_STMT
  _7 = &iface_11(D)->log_if_class;
  ret_17 = pfe_log_if_write_to_class_nostats (iface_11(D), _7);
  # DEBUG ret => ret_17
  # DEBUG BEGIN_STMT
  if (ret_17 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  iface_11(D)->log_if_class.flags = tmp_14;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _8 = &iface_11(D)->lock;
  _9 = oal_mutex_unlock (_8);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _20 = ret_17;
  return _20;

}


pfe_log_if_set_match_or (struct pfe_log_if_t * iface)
{
  pfe_ct_if_flags_t tmp;
  errno_t ret;
  oal_mutex_t * _1;
  int _2;
  <unnamed type> _3;
  long unsigned int _4;
  long unsigned int _5;
  <unnamed type> _6;
  struct pfe_ct_log_if_t * _7;
  oal_mutex_t * _8;
  int _9;
  errno_t _20;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &iface_11(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  tmp_14 = iface_11(D)->log_if_class.flags;
  # DEBUG tmp => tmp_14
  # DEBUG BEGIN_STMT
  _3 = iface_11(D)->log_if_class.flags;
  _4 = (long unsigned int) _3;
  _5 = _4 | 134217728;
  _6 = (<unnamed type>) _5;
  iface_11(D)->log_if_class.flags = _6;
  # DEBUG BEGIN_STMT
  _7 = &iface_11(D)->log_if_class;
  ret_17 = pfe_log_if_write_to_class_nostats (iface_11(D), _7);
  # DEBUG ret => ret_17
  # DEBUG BEGIN_STMT
  if (ret_17 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  iface_11(D)->log_if_class.flags = tmp_14;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _8 = &iface_11(D)->lock;
  _9 = oal_mutex_unlock (_8);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _20 = ret_17;
  return _20;

}


pfe_log_if_is_match_or (struct pfe_log_if_t * iface)
{
  bool_t ret;
  <unnamed type> _1;
  long unsigned int _2;
  long unsigned int _3;
  <unnamed type> _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  <unnamed type> _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  <unnamed type> _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  _Bool _19;
  bool_t _23;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_21(D)->log_if_class.flags;
  _2 = (long unsigned int) _1;
  _3 = _2 >> 24;
  _4 = iface_21(D)->log_if_class.flags;
  _5 = (long unsigned int) _4;
  _6 = _5 >> 8;
  _7 = _6 & 65280;
  _8 = _3 | _7;
  _9 = iface_21(D)->log_if_class.flags;
  _10 = (long unsigned int) _9;
  _11 = _10 << 8;
  _12 = _11 & 16711680;
  _13 = _8 | _12;
  _14 = iface_21(D)->log_if_class.flags;
  _15 = (long unsigned int) _14;
  _16 = _15 << 24;
  _17 = _13 | _16;
  _18 = _17 & 8;
  _19 = _18 != 0;
  ret_22 = (bool_t) _19;
  # DEBUG ret => ret_22
  # DEBUG BEGIN_STMT
  _23 = ret_22;
  return _23;

}


pfe_log_if_destroy (struct pfe_log_if_t * iface)
{
  errno_t ret;
  struct pfe_mac_db_t * _1;
  struct pfe_phy_if_t * _2;
  char_t * _3;
  char_t * _4;
  struct blalloc_t * pfe_log_if_id_pool.4_5;
  unsigned char _6;
  unsigned int _7;
  struct pfe_ct_log_if_t * _8;
  struct pfe_ct_log_if_t * _9;
  int _10;
  unsigned int _11;
  struct pfe_class_t * _12;
  unsigned int _13;
  oal_mutex_t * _14;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (iface_18(D) != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = iface_18(D)->mac_db;
  ret_21 = pfe_mac_db_destroy (_1);
  # DEBUG ret => ret_21
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = iface_18(D)->parent;
  ret_23 = pfe_phy_if_del_log_if (_2, iface_18(D));
  # DEBUG ret => ret_23
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = iface_18(D)->name;
  if (_3 != 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _4 = iface_18(D)->name;
  oal_mm_free (_4);
  # DEBUG BEGIN_STMT
  iface_18(D)->name = 0B;

  <bb 5> :
  # DEBUG BEGIN_STMT
  pfe_log_if_id_pool.4_5 = pfe_log_if_id_pool;
  _6 = iface_18(D)->log_if_class.id;
  _7 = (unsigned int) _6;
  blalloc_free_offs (pfe_log_if_id_pool.4_5, _7);
  # DEBUG BEGIN_STMT
  _8 = &iface_18(D)->log_if_class;
  memset (_8, 0, 104);
  # DEBUG BEGIN_STMT
  _9 = &iface_18(D)->log_if_class;
  _10 = pfe_log_if_write_to_class_nostats (iface_18(D), _9);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _11 = iface_18(D)->dmem_base;
  if (_11 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _12 = iface_18(D)->class;
  _13 = iface_18(D)->dmem_base;
  pfe_class_dmem_heap_free (_12, _13);

  <bb 7> :
  # DEBUG BEGIN_STMT
  _14 = &iface_18(D)->lock;
  oal_mutex_destroy (_14);
  # DEBUG BEGIN_STMT
  oal_mm_free (iface_18(D));

  <bb 8> :
  return;

}


pfe_log_if_get_dmem_base (const struct pfe_log_if_t * iface, addr_t * dmem_base)
{
  errno_t ret;
  unsigned int _1;
  errno_t _7;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_3(D)->dmem_base;
  *dmem_base_4(D) = _1;
  # DEBUG BEGIN_STMT
  ret_6 = 0;
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  _7 = ret_6;
  return _7;

}


pfe_log_if_get_next_dmem_ptr (struct pfe_log_if_t * iface, addr_t * next_dmem_ptr)
{
  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;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  errno_t _19;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = iface_15(D)->log_if_class.next;
  _2 = _1 >> 24;
  _3 = iface_15(D)->log_if_class.next;
  _4 = _3 >> 8;
  _5 = _4 & 65280;
  _6 = _2 | _5;
  _7 = iface_15(D)->log_if_class.next;
  _8 = _7 << 8;
  _9 = _8 & 16711680;
  _10 = _6 | _9;
  _11 = iface_15(D)->log_if_class.next;
  _12 = _11 << 24;
  _13 = _10 | _12;
  *next_dmem_ptr_16(D) = _13;
  # DEBUG BEGIN_STMT
  ret_18 = 0;
  # DEBUG ret => ret_18
  # DEBUG BEGIN_STMT
  _19 = ret_18;
  return _19;

}


pfe_log_if_set_next_dmem_ptr (struct pfe_log_if_t * iface, addr_t next_dmem_ptr)
{
  errno_t ret;
  oal_mutex_t * _1;
  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;
  struct pfe_ct_log_if_t * _12;
  int _13;
  oal_mutex_t * _14;
  int _15;
  errno_t _26;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_17 = 0;
  # DEBUG ret => ret_17
  # DEBUG BEGIN_STMT
  _1 = &iface_18(D)->lock;
  _2 = oal_mutex_lock (_1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = next_dmem_ptr_21(D) >> 24;
  _4 = next_dmem_ptr_21(D) >> 8;
  _5 = _4 & 65280;
  _6 = _3 | _5;
  _7 = next_dmem_ptr_21(D) << 8;
  _8 = _7 & 16711680;
  _9 = _6 | _8;
  _10 = next_dmem_ptr_21(D) << 24;
  _11 = _9 | _10;
  iface_18(D)->log_if_class.next = _11;
  # DEBUG BEGIN_STMT
  _12 = &iface_18(D)->log_if_class;
  _13 = pfe_log_if_write_to_class_nostats (iface_18(D), _12);
  if (_13 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_24 = 114;
  # DEBUG ret => ret_24

  <bb 4> :
  # ret_16 = PHI <ret_17(2), ret_24(3)>
  # DEBUG ret => ret_16
  # DEBUG BEGIN_STMT
  _14 = &iface_18(D)->lock;
  _15 = oal_mutex_unlock (_14);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _26 = ret_16;
  return _26;

}


__attribute__((pure))
pfe_log_if_get_parent (const struct pfe_log_if_t * iface)
{
  struct pfe_phy_if_t * ptr;
  struct pfe_phy_if_t * _4;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ptr_3 = iface_2(D)->parent;
  # DEBUG ptr => ptr_3
  # DEBUG BEGIN_STMT
  _4 = ptr_3;
  return _4;

}


__attribute__((pure))
pfe_log_if_get_id (const struct pfe_log_if_t * iface)
{
  uint8_t ret;
  uint8_t _4;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_3 = iface_2(D)->log_if_class.id;
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  _4 = ret_3;
  return _4;

}


pfe_log_if_create (struct pfe_phy_if_t * parent, const char_t * name)
{
  addr_t id;
  struct pfe_log_if_t * iface;
  struct blalloc_t * pfe_log_if_id_pool.0_1;
  struct blalloc_t * _2;
  struct blalloc_t * pfe_log_if_id_pool.1_3;
  struct blalloc_t * pfe_log_if_id_pool.2_4;
  int _5;
  struct pfe_class_t * _6;
  struct pfe_mac_db_t * _7;
  struct pfe_mac_db_t * _8;
  oal_mutex_t * _9;
  int _10;
  struct pfe_mac_db_t * _11;
  unsigned int _12;
  unsigned int _13;
  void * _14;
  char_t * _15;
  struct pfe_mac_db_t * _16;
  oal_mutex_t * _17;
  char_t * _18;
  struct pfe_class_t * _19;
  unsigned int _20;
  unsigned int _21;
  struct pfe_mac_db_t * _22;
  char_t * _23;
  oal_mutex_t * _24;
  struct pfe_ct_log_if_t * _25;
  unsigned int id.3_26;
  unsigned char _27;
  struct pfe_ct_log_if_t * _28;
  int _29;
  int _30;
  struct pfe_class_t * _31;
  unsigned int _32;
  struct pfe_mac_db_t * _33;
  char_t * _34;
  oal_mutex_t * _35;
  int _36;
  struct pfe_class_t * _37;
  unsigned int _38;
  struct pfe_mac_db_t * _39;
  char_t * _40;
  oal_mutex_t * _41;
  struct pfe_log_if_t * _42;
  struct pfe_log_if_t * _48;
  struct pfe_log_if_t * _76;
  struct pfe_log_if_t * _82;
  struct pfe_log_if_t * _89;
  struct pfe_log_if_t * _94;
  struct pfe_log_if_t * _98;
  struct pfe_log_if_t * _101;
  struct pfe_log_if_t * _103;
  struct pfe_log_if_t * _104;
  struct pfe_log_if_t * _105;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_log_if_id_pool.0_1 = pfe_log_if_id_pool;
  if (pfe_log_if_id_pool.0_1 == 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = blalloc_create (256, 0);
  pfe_log_if_id_pool = _2;
  # DEBUG BEGIN_STMT
  pfe_log_if_id_pool.1_3 = pfe_log_if_id_pool;
  if (pfe_log_if_id_pool.1_3 == 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _48 = 0B;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 22>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_log_if_id_pool.2_4 = pfe_log_if_id_pool;
  _5 = blalloc_alloc_offs (pfe_log_if_id_pool.2_4, 1, 0, &id);
  if (_5 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _105 = 0B;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 22>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  iface_51 = oal_mm_malloc (128);
  # DEBUG iface => iface_51
  # DEBUG BEGIN_STMT
  if (iface_51 == 0B)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _104 = 0B;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 22>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  memset (iface_51, 0, 128);
  # DEBUG BEGIN_STMT
  iface_51->parent = parent_53(D);
  # DEBUG BEGIN_STMT
  _6 = pfe_phy_if_get_class (parent_53(D));
  iface_51->class = _6;
  # DEBUG BEGIN_STMT
  _7 = pfe_mac_db_create ();
  iface_51->mac_db = _7;
  # DEBUG BEGIN_STMT
  _8 = iface_51->mac_db;
  if (_8 == 0B)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  oal_mm_free (iface_51);
  # DEBUG BEGIN_STMT
  _103 = 0B;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 22>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  iface_51->lock = 1;
  # DEBUG BEGIN_STMT
  _9 = &iface_51->lock;
  _10 = oal_mutex_init (_9);
  if (_10 != 0)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _11 = iface_51->mac_db;
  pfe_mac_db_destroy (_11);
  # DEBUG BEGIN_STMT
  oal_mm_free (iface_51);
  # DEBUG BEGIN_STMT
  _101 = 0B;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 22>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  _12 = strlen (name_60(D));
  _13 = _12 + 1;
  _14 = oal_mm_malloc (_13);
  iface_51->name = _14;
  # DEBUG BEGIN_STMT
  _15 = iface_51->name;
  if (_15 == 0B)
    goto <bb 14>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _16 = iface_51->mac_db;
  pfe_mac_db_destroy (_16);
  # DEBUG BEGIN_STMT
  _17 = &iface_51->lock;
  oal_mutex_destroy (_17);
  # DEBUG BEGIN_STMT
  oal_mm_free (iface_51);
  # DEBUG BEGIN_STMT
  _98 = 0B;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 22>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  _18 = iface_51->name;
  strcpy (_18, name_60(D));
  # DEBUG BEGIN_STMT
  _19 = iface_51->class;
  _20 = pfe_class_dmem_heap_alloc (_19, 104);
  iface_51->dmem_base = _20;
  # DEBUG BEGIN_STMT
  _21 = iface_51->dmem_base;
  if (_21 == 0)
    goto <bb 16>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _22 = iface_51->mac_db;
  pfe_mac_db_destroy (_22);
  # DEBUG BEGIN_STMT
  _23 = iface_51->name;
  oal_mm_free (_23);
  # DEBUG BEGIN_STMT
  _24 = &iface_51->lock;
  oal_mutex_destroy (_24);
  # DEBUG BEGIN_STMT
  oal_mm_free (iface_51);
  # DEBUG BEGIN_STMT
  _94 = 0B;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 22>; [INV]

  <bb 17> :
  # DEBUG BEGIN_STMT
  _25 = &iface_51->log_if_class;
  memset (_25, 0, 104);
  # DEBUG BEGIN_STMT
  iface_51->log_if_class.next = 0;
  # DEBUG BEGIN_STMT
  id.3_26 = id;
  _27 = (unsigned char) id.3_26;
  iface_51->log_if_class.id = _27;
  # DEBUG BEGIN_STMT
  iface_51->log_if_class.m_rules = 0;
  # DEBUG BEGIN_STMT
  iface_51->log_if_class.class_stats.accepted = 0;
  # DEBUG BEGIN_STMT
  iface_51->log_if_class.class_stats.rejected = 0;
  # DEBUG BEGIN_STMT
  iface_51->log_if_class.class_stats.discarded = 0;
  # DEBUG BEGIN_STMT
  iface_51->log_if_class.class_stats.processed = 0;
  # DEBUG BEGIN_STMT
  _28 = &iface_51->log_if_class;
  _29 = pfe_log_if_write_to_class (iface_51, _28);
  if (_29 != 0)
    goto <bb 18>; [INV]
  else
    goto <bb 19>; [INV]

  <bb 18> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _30 = pfe_phy_if_del_log_if (parent_53(D), iface_51);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _31 = iface_51->class;
  _32 = iface_51->dmem_base;
  pfe_class_dmem_heap_free (_31, _32);
  # DEBUG BEGIN_STMT
  _33 = iface_51->mac_db;
  pfe_mac_db_destroy (_33);
  # DEBUG BEGIN_STMT
  _34 = iface_51->name;
  oal_mm_free (_34);
  # DEBUG BEGIN_STMT
  _35 = &iface_51->lock;
  oal_mutex_destroy (_35);
  # DEBUG BEGIN_STMT
  oal_mm_free (iface_51);
  # DEBUG BEGIN_STMT
  _89 = 0B;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 22>; [INV]

  <bb 19> :
  # DEBUG BEGIN_STMT
  _36 = pfe_phy_if_add_log_if (parent_53(D), iface_51);
  if (_36 != 0)
    goto <bb 20>; [INV]
  else
    goto <bb 21>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _37 = iface_51->class;
  _38 = iface_51->dmem_base;
  pfe_class_dmem_heap_free (_37, _38);
  # DEBUG BEGIN_STMT
  _39 = iface_51->mac_db;
  pfe_mac_db_destroy (_39);
  # DEBUG BEGIN_STMT
  _40 = iface_51->name;
  oal_mm_free (_40);
  # DEBUG BEGIN_STMT
  _41 = &iface_51->lock;
  oal_mutex_destroy (_41);
  # DEBUG BEGIN_STMT
  oal_mm_free (iface_51);
  # DEBUG BEGIN_STMT
  _82 = 0B;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 22>; [INV]

  <bb 21> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _76 = iface_51;

  <bb 22> :
  # _42 = PHI <_48(4), _105(6), _104(8), _103(10), _101(12), _98(14), _94(16), _89(18), _82(20), _76(21)>
  id ={v} {CLOBBER};
  return _42;

}


pfe_log_if_write_to_class (const struct pfe_log_if_t * iface, const struct pfe_ct_log_if_t * class_if)
{
  errno_t ret;
  struct pfe_class_t * _1;
  unsigned int _2;
  errno_t _8;

  <bb 2> :
  # 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), 104);
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  _8 = ret_7;
  return _8;

}


pfe_log_if_write_to_class_nostats (const struct pfe_log_if_t * iface, const struct pfe_ct_log_if_t * class_if)
{
  errno_t ret;
  struct pfe_class_t * _1;
  unsigned int _2;
  errno_t _8;

  <bb 2> :
  # 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), 88);
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  _8 = ret_7;
  return _8;

}


pfe_log_if_match_rule2 (struct pfe_log_if_t * iface, pfe_ct_if_m_rules_t rule, const void * arg, uint32_t arg_len)
{
  errno_t ret;
  uint32_t[4] * _1;
  uint32_t[4] * _2;
  uint32_t * _3;
  uint32_t * _4;
  unsigned int _13;
  unsigned int _16;
  errno_t _23;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ret_7 = 22;
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  switch (rule_8(D)) <default: <L16> [INV], case 4194304: <L0> [INV], case 8388608: <L3> [INV], case 16777216: <L6> [INV], case 33554432: <L9> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  if (arg_len_10(D) == 16)
    goto <bb 4>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _1 = &iface_11(D)->log_if_class.m_args.ipv.v6.sip;
  memcpy (_1, arg_12(D), 16);
  # DEBUG BEGIN_STMT
  ret_22 = 0;
  # DEBUG ret => ret_22
  goto <bb 11>; [INV]

  <bb 5> :
<L3>:
  # DEBUG BEGIN_STMT
  if (arg_len_10(D) == 16)
    goto <bb 6>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _2 = &iface_11(D)->log_if_class.m_args.ipv.v6.dip;
  memcpy (_2, arg_12(D), 16);
  # DEBUG BEGIN_STMT
  ret_20 = 0;
  # DEBUG ret => ret_20
  goto <bb 11>; [INV]

  <bb 7> :
<L6>:
  # DEBUG BEGIN_STMT
  if (arg_len_10(D) == 4)
    goto <bb 8>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _3 = &iface_11(D)->log_if_class.m_args.ipv.v4.sip;
  _16 = MEM[(char * {ref-all})arg_12(D)];
  MEM[(char * {ref-all})_3] = _16;
  # DEBUG BEGIN_STMT
  ret_18 = 0;
  # DEBUG ret => ret_18
  goto <bb 11>; [INV]

  <bb 9> :
<L9>:
  # DEBUG BEGIN_STMT
  if (arg_len_10(D) == 4)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _4 = &iface_11(D)->log_if_class.m_args.ipv.v4.dip;
  _13 = MEM[(char * {ref-all})arg_12(D)];
  MEM[(char * {ref-all})_4] = _13;
  # DEBUG BEGIN_STMT
  ret_15 = 0;
  # DEBUG ret => ret_15

  <bb 11> :
  # ret_5 = PHI <ret_22(4), ret_20(6), ret_18(8), ret_15(10), ret_7(2), ret_7(3), ret_7(5), ret_7(7), ret_7(9)>
<L16>:
  # DEBUG ret => ret_5
  # DEBUG BEGIN_STMT
  _23 = ret_5;
  return _23;

}


pfe_log_if_match_rule4 (struct pfe_log_if_t * iface, pfe_ct_if_m_rules_t rule, const void * arg, uint32_t arg_len)
{
  errno_t ret;
  uint8_t[6] * _1;
  uint8_t[6] * _2;
  long unsigned int _3;
  errno_t _18;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ret_6 = 22;
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  switch (rule_7(D)) <default: <L13> [INV], case -2147483648: <L6> [INV], case 536870912: <L0> [INV], case 1073741824: <L3> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  if (arg_len_9(D) == 6)
    goto <bb 4>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _1 = &iface_10(D)->log_if_class.m_args.smac;
  memcpy (_1, arg_11(D), 6);
  # DEBUG BEGIN_STMT
  ret_15 = 0;
  # DEBUG ret => ret_15
  goto <bb 9>; [INV]

  <bb 5> :
<L3>:
  # DEBUG BEGIN_STMT
  if (arg_len_9(D) == 6)
    goto <bb 6>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _2 = &iface_10(D)->log_if_class.m_args.dmac;
  memcpy (_2, arg_11(D), 6);
  # DEBUG BEGIN_STMT
  ret_13 = 0;
  # DEBUG ret => ret_13
  goto <bb 9>; [INV]

  <bb 7> :
<L6>:
  # DEBUG BEGIN_STMT
  if (arg_len_9(D) == 4)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _3 = MEM[(uint32_t *)arg_11(D)];
  iface_10(D)->log_if_class.m_args.hif_cookie = _3;
  # DEBUG BEGIN_STMT
  ret_17 = 0;
  # DEBUG ret => ret_17

  <bb 9> :
  # ret_4 = PHI <ret_15(4), ret_13(6), ret_17(8), ret_6(2), ret_6(3), ret_6(5), ret_6(7)>
<L13>:
  # DEBUG ret => ret_4
  # DEBUG BEGIN_STMT
  _18 = ret_4;
  return _18;

}


pfe_log_if_match_rule3 (struct pfe_log_if_t * iface, pfe_ct_if_m_rules_t rule, const void * arg, uint32_t arg_len)
{
  errno_t ret;
  short unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  errno_t _18;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ret_6 = 22;
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  switch (rule_7(D)) <default: <L13> [INV], case 67108864: <L0> [INV], case 134217728: <L3> [INV], case 268435456: <L6> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  if (arg_len_9(D) == 2)
    goto <bb 4>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _1 = MEM[(uint16_t *)arg_10(D)];
  iface_11(D)->log_if_class.m_args.ethtype = _1;
  # DEBUG BEGIN_STMT
  ret_17 = 0;
  # DEBUG ret => ret_17
  goto <bb 9>; [INV]

  <bb 5> :
<L3>:
  # DEBUG BEGIN_STMT
  if (arg_len_9(D) == 4)
    goto <bb 6>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _2 = MEM[(uint32_t *)arg_10(D)];
  iface_11(D)->log_if_class.m_args.fp0_table = _2;
  # DEBUG BEGIN_STMT
  ret_15 = 0;
  # DEBUG ret => ret_15
  goto <bb 9>; [INV]

  <bb 7> :
<L6>:
  # DEBUG BEGIN_STMT
  if (arg_len_9(D) == 4)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _3 = MEM[(uint32_t *)arg_10(D)];
  iface_11(D)->log_if_class.m_args.fp1_table = _3;
  # DEBUG BEGIN_STMT
  ret_13 = 0;
  # DEBUG ret => ret_13

  <bb 9> :
  # ret_4 = PHI <ret_17(4), ret_15(6), ret_13(8), ret_6(2), ret_6(3), ret_6(5), ret_6(7)>
<L13>:
  # DEBUG ret => ret_4
  # DEBUG BEGIN_STMT
  _18 = ret_4;
  return _18;

}


pfe_log_if_match_rule1 (struct pfe_log_if_t * iface, pfe_ct_if_m_rules_t rule, const void * arg, uint32_t arg_len)
{
  errno_t ret;
  short unsigned int _1;
  unsigned char _2;
  short unsigned int _3;
  short unsigned int _4;
  errno_t _21;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ret_7 = 22;
  # DEBUG ret => ret_7
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  switch (rule_8(D)) <default: <L16> [INV], case 32768: <L0> [INV], case 65536: <L3> [INV], case 1048576: <L6> [INV], case 2097152: <L9> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  if (arg_len_10(D) == 2)
    goto <bb 4>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _1 = MEM[(uint16_t *)arg_11(D)];
  iface_12(D)->log_if_class.m_args.vlan = _1;
  # DEBUG BEGIN_STMT
  ret_20 = 0;
  # DEBUG ret => ret_20
  goto <bb 11>; [INV]

  <bb 5> :
<L3>:
  # DEBUG BEGIN_STMT
  if (arg_len_10(D) == 1)
    goto <bb 6>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _2 = MEM[(uint8_t *)arg_11(D)];
  iface_12(D)->log_if_class.m_args.proto = _2;
  # DEBUG BEGIN_STMT
  ret_18 = 0;
  # DEBUG ret => ret_18
  goto <bb 11>; [INV]

  <bb 7> :
<L6>:
  # DEBUG BEGIN_STMT
  if (arg_len_10(D) == 2)
    goto <bb 8>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _3 = MEM[(uint16_t *)arg_11(D)];
  iface_12(D)->log_if_class.m_args.sport = _3;
  # DEBUG BEGIN_STMT
  ret_16 = 0;
  # DEBUG ret => ret_16
  goto <bb 11>; [INV]

  <bb 9> :
<L9>:
  # DEBUG BEGIN_STMT
  if (arg_len_10(D) == 2)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _4 = MEM[(uint16_t *)arg_11(D)];
  iface_12(D)->log_if_class.m_args.dport = _4;
  # DEBUG BEGIN_STMT
  ret_14 = 0;
  # DEBUG ret => ret_14

  <bb 11> :
  # ret_5 = PHI <ret_20(4), ret_18(6), ret_16(8), ret_14(10), ret_7(2), ret_7(3), ret_7(5), ret_7(7), ret_7(9)>
<L16>:
  # DEBUG ret => ret_5
  # DEBUG BEGIN_STMT
  _21 = ret_5;
  return _21;

}


oal_mutex_unlock (const oal_mutex_t * mutex)
{
  errno_t retval;
  short unsigned int _1;
  short unsigned int _2;
  int _3;
  unsigned char _4;
  short unsigned int _5;
  int _6;
  void (*<T4e5>) (void) _7;
  errno_t _15;

  <bb 2> :
  # DEBUG BEGIN_STMT
  retval_10 = 22;
  # DEBUG retval => retval_10
  # DEBUG BEGIN_STMT
  _1 = *mutex_12(D);
  if (_1 <= 255)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = *mutex_12(D);
  _3 = (int) _2;
  _4 = mutex_alloc[_3];
  if (_4 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _5 = *mutex_12(D);
  _6 = (int) _5;
  _7 = SchM_Exit_Eth_43_PFE_ETH_EXCLUSIVE_AREA_ID[_6];
  _7 ();
  # DEBUG BEGIN_STMT
  retval_14 = 0;
  # DEBUG retval => retval_14

  <bb 5> :
  # retval_8 = PHI <retval_10(2), retval_10(3), retval_14(4)>
  # DEBUG retval => retval_8
  # DEBUG BEGIN_STMT
  _15 = retval_8;
  return _15;

}


oal_mutex_lock (const oal_mutex_t * mutex)
{
  errno_t retval;
  short unsigned int _1;
  short unsigned int _2;
  int _3;
  unsigned char _4;
  short unsigned int _5;
  int _6;
  void (*<T4e5>) (void) _7;
  errno_t _15;

  <bb 2> :
  # DEBUG BEGIN_STMT
  retval_10 = 22;
  # DEBUG retval => retval_10
  # DEBUG BEGIN_STMT
  _1 = *mutex_12(D);
  if (_1 <= 255)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = *mutex_12(D);
  _3 = (int) _2;
  _4 = mutex_alloc[_3];
  if (_4 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _5 = *mutex_12(D);
  _6 = (int) _5;
  _7 = SchM_Enter_Eth_43_PFE_ETH_EXCLUSIVE_AREA_ID[_6];
  _7 ();
  # DEBUG BEGIN_STMT
  retval_14 = 0;
  # DEBUG retval => retval_14

  <bb 5> :
  # retval_8 = PHI <retval_10(2), retval_10(3), retval_14(4)>
  # DEBUG retval => retval_8
  # DEBUG BEGIN_STMT
  _15 = retval_8;
  return _15;

}


oal_mutex_destroy (oal_mutex_t * mutex)
{
  errno_t _4;

  <bb 2> :
  # 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> :
  # DEBUG BEGIN_STMT
  _4 = oal_mutex_init_internal (mutex_2(D));
  return _4;

}


