fci_mirror_cmd (struct fci_msg_t * msg, uint16_t * fci_ret, struct fpp_mirror_cmd_t * reply_buf, uint32_t * reply_len)
{
  struct pfe_ct_route_actions_args_t m_args;
  pfe_ct_route_actions_t m_actions;
  uint32_t addr;
  struct pfe_mirror_t * mirror;
  errno_t ret;
  const char * str;
  struct fpp_mirror_cmd_t * mirror_cmd;
  struct fci_t * fci_context;
  uint16_t * fci_ret.0_1;
  long unsigned int _2;
  uint16_t * fci_ret.1_3;
  struct fpp_mirror_cmd_t * reply_buf.2_4;
  short unsigned int _5;
  int _6;
  char[16] * _7;
  struct pfe_mirror_t * _8;
  struct pfe_mirror_t * mirror.3_9;
  uint16_t * fci_ret.4_10;
  char[16] * _11;
  struct pfe_mirror_t * _12;
  struct pfe_mirror_t * mirror.5_13;
  uint16_t * fci_ret.6_14;
  struct pfe_mirror_t * mirror.7_15;
  char[16] * _16;
  struct pfe_mirror_t * _17;
  struct pfe_mirror_t * mirror.8_18;
  uint16_t * fci_ret.9_19;
  uint16_t * fci_ret.10_20;
  short unsigned int _21;
  struct fci_t * fci_context.11_22;
  uint16_t * fci_ret.12_23;
  short unsigned int _24;
  <unnamed type> _25;
  long unsigned int _26;
  long unsigned int _27;
  <unnamed type> _28;
  long unsigned int _29;
  long unsigned int _30;
  long unsigned int _31;
  long unsigned int _32;
  <unnamed type> _33;
  long unsigned int _34;
  long unsigned int _35;
  long unsigned int _36;
  long unsigned int _37;
  <unnamed type> _38;
  long unsigned int _39;
  long unsigned int _40;
  long unsigned int _41;
  <unnamed type> _42;
  <unnamed type> _43;
  struct pfe_mirror_t * mirror.13_44;
  uint16_t * fci_ret.14_45;
  <unnamed type> _46;
  long unsigned int _47;
  long unsigned int _48;
  short unsigned int _49;
  long unsigned int m_actions.15_50;
  long unsigned int _51;
  long unsigned int m_actions.16_52;
  long unsigned int _53;
  long unsigned int _54;
  long unsigned int _55;
  long unsigned int m_actions.17_56;
  long unsigned int _57;
  long unsigned int _58;
  long unsigned int _59;
  long unsigned int m_actions.18_60;
  long unsigned int _61;
  long unsigned int _62;
  struct pfe_mirror_t * mirror.19_63;
  uint16_t * fci_ret.20_64;
  char[16] * _65;
  struct pfe_mirror_t * _66;
  struct pfe_mirror_t * mirror.21_67;
  uint16_t * fci_ret.22_68;
  struct pfe_mirror_t * mirror.23_69;
  uint16_t * fci_ret.24_70;
  const char * str.25_71;
  struct pfe_mirror_t * mirror.26_72;
  struct pfe_mirror_t * _73;
  struct pfe_mirror_t * mirror.27_74;
  uint16_t * fci_ret.28_75;
  struct fci_t * fci_context.29_76;
  struct pfe_mirror_t * mirror.30_77;
  uint16_t * fci_ret.31_78;
  short unsigned int _79;
  uint16_t * fci_ret.32_80;
  errno_t _151;

  <bb 2> :
  # DEBUG BEGIN_STMT
  fci_context = &__context;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_92 = 0;
  # DEBUG ret => ret_92
  # DEBUG BEGIN_STMT
  mirror = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  fci_ret.0_1 = fci_ret;
  *fci_ret.0_1 = 0;
  # DEBUG BEGIN_STMT
  _2 = *reply_len_95(D);
  if (_2 <= 55)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  fci_ret.1_3 = fci_ret;
  *fci_ret.1_3 = 65535;
  # DEBUG BEGIN_STMT
  ret_150 = 22;
  # DEBUG ret => ret_150
  goto <bb 33>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  *reply_len_95(D) = 0;
  # DEBUG BEGIN_STMT
  reply_buf.2_4 = reply_buf;
  memset (reply_buf.2_4, 0, 56);
  # DEBUG BEGIN_STMT
  mirror_cmd_99 = &msg_98(D)->msg_cmd.payload;
  # DEBUG mirror_cmd => mirror_cmd_99
  # DEBUG BEGIN_STMT
  _5 = mirror_cmd_99->action;
  _6 = (int) _5;
  switch (_6) <default: <L35> [INV], case 0: <L2> [INV], case 1: <L23> [INV], case 4: <L6> [INV], case 6: <L30> [INV], case 7: <L32> [INV]>

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  _7 = &mirror_cmd_99->name;
  _8 = pfe_mirror_get_first (1, _7);
  mirror = _8;
  # DEBUG BEGIN_STMT
  mirror.3_9 = mirror;
  if (mirror.3_9 != 0B)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  fci_ret.4_10 = fci_ret;
  *fci_ret.4_10 = 61745;
  # DEBUG BEGIN_STMT
  ret_126 = 0;
  # DEBUG ret => ret_126
  # DEBUG BEGIN_STMT
  goto <bb 33>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _11 = &mirror_cmd_99->name;
  _12 = pfe_mirror_create (_11);
  mirror = _12;
  # DEBUG BEGIN_STMT
  mirror.5_13 = mirror;
  if (mirror.5_13 == 0B)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  fci_ret.6_14 = fci_ret;
  *fci_ret.6_14 = 65535;
  # DEBUG BEGIN_STMT
  ret_124 = 115;
  # DEBUG ret => ret_124
  # DEBUG BEGIN_STMT
  goto <bb 33>; [INV]

  <bb 9> :
<L6>:
  # DEBUG BEGIN_STMT
  mirror.7_15 = mirror;
  if (mirror.7_15 == 0B)
    goto <bb 10>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _16 = &mirror_cmd_99->name;
  _17 = pfe_mirror_get_first (1, _16);
  mirror = _17;
  # DEBUG BEGIN_STMT
  mirror.8_18 = mirror;
  if (mirror.8_18 == 0B)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  fci_ret.9_19 = fci_ret;
  *fci_ret.9_19 = 61746;
  # DEBUG BEGIN_STMT
  ret_130 = 22;
  # DEBUG ret => ret_130
  # DEBUG BEGIN_STMT
  goto <bb 33>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  ret_132 = fci_mirror_cmd_update_egress_port (&fci_context, &mirror, &fci_ret, mirror_cmd_99);
  # DEBUG ret => ret_132
  # DEBUG BEGIN_STMT
  fci_ret.10_20 = fci_ret;
  _21 = *fci_ret.10_20;
  if (_21 != 0)
    goto <bb 33>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  fci_context.11_22 = fci_context;
  ret_134 = fci_mirror_cmd_update_set_filter (fci_context.11_22, &mirror, &fci_ret, mirror_cmd_99);
  # DEBUG ret => ret_134
  # DEBUG BEGIN_STMT
  fci_ret.12_23 = fci_ret;
  _24 = *fci_ret.12_23;
  if (_24 != 0)
    goto <bb 33>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  _25 = mirror_cmd_99->m_actions;
  _26 = (long unsigned int) _25;
  _27 = _26 >> 24;
  _28 = mirror_cmd_99->m_actions;
  _29 = (long unsigned int) _28;
  _30 = _29 >> 8;
  _31 = _30 & 65280;
  _32 = _27 | _31;
  _33 = mirror_cmd_99->m_actions;
  _34 = (long unsigned int) _33;
  _35 = _34 << 8;
  _36 = _35 & 16711680;
  _37 = _32 | _36;
  _38 = mirror_cmd_99->m_actions;
  _39 = (long unsigned int) _38;
  _40 = _39 << 24;
  _41 = _37 | _40;
  _42 = (<unnamed type>) _41;
  mirror_cmd_99->m_actions = _42;
  # DEBUG BEGIN_STMT
  _43 = mirror_cmd_99->m_actions;
  if (_43 == 0)
    goto <bb 15>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  mirror.13_44 = mirror;
  ret_145 = pfe_mirror_set_actions (mirror.13_44, 0, 0B);
  # DEBUG ret => ret_145
  # DEBUG BEGIN_STMT
  if (ret_145 != 0)
    goto <bb 16>; [INV]
  else
    goto <bb 33>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  fci_ret.14_45 = fci_ret;
  *fci_ret.14_45 = 65535;
  # DEBUG BEGIN_STMT
  goto <bb 33>; [INV]

  <bb 17> :
  # DEBUG BEGIN_STMT
  memset (&m_args, 0, 60);
  # DEBUG BEGIN_STMT
  m_actions_137 = 0;
  # DEBUG m_actions => m_actions_137
  # DEBUG BEGIN_STMT
  _46 = mirror_cmd_99->m_actions;
  _47 = (long unsigned int) _46;
  _48 = _47 & 2;
  if (_48 != 0)
    goto <bb 18>; [INV]
  else
    goto <bb 19>; [INV]

  <bb 18> :
  # DEBUG BEGIN_STMT
  _49 = mirror_cmd_99->m_args.vlan;
  m_args.vlan = _49;
  # DEBUG BEGIN_STMT
  m_actions_139 = m_actions_137 | 2;
  # DEBUG m_actions => m_actions_139

  <bb 19> :
  # m_actions_83 = PHI <m_actions_137(17), m_actions_139(18)>
  # DEBUG m_actions => m_actions_83
  # DEBUG BEGIN_STMT
  m_actions.15_50 = (long unsigned int) m_actions_83;
  _51 = m_actions.15_50 >> 24;
  m_actions.16_52 = (long unsigned int) m_actions_83;
  _53 = m_actions.16_52 >> 8;
  _54 = _53 & 65280;
  _55 = _51 | _54;
  m_actions.17_56 = (long unsigned int) m_actions_83;
  _57 = m_actions.17_56 << 8;
  _58 = _57 & 16711680;
  _59 = _55 | _58;
  m_actions.18_60 = (long unsigned int) m_actions_83;
  _61 = m_actions.18_60 << 24;
  _62 = _59 | _61;
  m_actions_140 = (pfe_ct_route_actions_t) _62;
  # DEBUG m_actions => m_actions_140
  # DEBUG BEGIN_STMT
  mirror.19_63 = mirror;
  ret_142 = pfe_mirror_set_actions (mirror.19_63, m_actions_140, &m_args);
  # DEBUG ret => ret_142
  # DEBUG BEGIN_STMT
  if (ret_142 != 0)
    goto <bb 20>; [INV]
  else
    goto <bb 33>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  fci_ret.20_64 = fci_ret;
  *fci_ret.20_64 = 65535;
  # DEBUG BEGIN_STMT
  goto <bb 33>; [INV]

  <bb 21> :
<L23>:
  # DEBUG BEGIN_STMT
  _65 = &mirror_cmd_99->name;
  _66 = pfe_mirror_get_first (1, _65);
  mirror = _66;
  # DEBUG BEGIN_STMT
  mirror.21_67 = mirror;
  if (mirror.21_67 == 0B)
    goto <bb 22>; [INV]
  else
    goto <bb 23>; [INV]

  <bb 22> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  fci_ret.22_68 = fci_ret;
  *fci_ret.22_68 = 61746;
  # DEBUG BEGIN_STMT
  ret_118 = 0;
  # DEBUG ret => ret_118
  # DEBUG BEGIN_STMT
  goto <bb 33>; [INV]

  <bb 23> :
  # DEBUG BEGIN_STMT
  mirror.23_69 = mirror;
  addr_111 = pfe_mirror_get_filter (mirror.23_69);
  # DEBUG addr => addr_111
  # DEBUG BEGIN_STMT
  if (addr_111 != 0)
    goto <bb 24>; [INV]
  else
    goto <bb 27>; [INV]

  <bb 24> :
  # DEBUG BEGIN_STMT
  ret_113 = fci_fp_db_get_table_from_addr (addr_111, &str);
  # DEBUG ret => ret_113
  # DEBUG BEGIN_STMT
  if (ret_113 != 0)
    goto <bb 25>; [INV]
  else
    goto <bb 26>; [INV]

  <bb 25> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  fci_ret.24_70 = fci_ret;
  *fci_ret.24_70 = 65535;
  # DEBUG BEGIN_STMT
  goto <bb 33>; [INV]

  <bb 26> :
  # DEBUG BEGIN_STMT
  str.25_71 = str;
  fci_fp_db_pop_table_from_hw (str.25_71);

  <bb 27> :
  # ret_81 = PHI <ret_92(23), ret_113(26)>
  # DEBUG ret => ret_81
  # DEBUG BEGIN_STMT
  mirror.26_72 = mirror;
  pfe_mirror_destroy (mirror.26_72);
  # DEBUG BEGIN_STMT
  goto <bb 33>; [INV]

  <bb 28> :
<L30>:
  # DEBUG BEGIN_STMT
  _73 = pfe_mirror_get_first (0, 0B);
  mirror = _73;
  # DEBUG BEGIN_STMT
  mirror.27_74 = mirror;
  if (mirror.27_74 == 0B)
    goto <bb 29>; [INV]
  else
    goto <bb 30>; [INV]

  <bb 29> :
  # DEBUG BEGIN_STMT
  fci_ret.28_75 = fci_ret;
  *fci_ret.28_75 = 61746;
  # DEBUG BEGIN_STMT
  ret_103 = 0;
  # DEBUG ret => ret_103
  # DEBUG BEGIN_STMT
  goto <bb 33>; [INV]

  <bb 30> :
<L32>:
  # DEBUG BEGIN_STMT
  fci_context.29_76 = fci_context;
  mirror.30_77 = mirror;
  ret_105 = fci_mirror_cmd_query_cont_get_mirror (fci_context.29_76, mirror.30_77, &fci_ret, &reply_buf);
  # DEBUG ret => ret_105
  # DEBUG BEGIN_STMT
  fci_ret.31_78 = fci_ret;
  _79 = *fci_ret.31_78;
  if (_79 != 0)
    goto <bb 33>; [INV]
  else
    goto <bb 31>; [INV]

  <bb 31> :
  # DEBUG BEGIN_STMT
  *reply_len_95(D) = 56;
  # DEBUG BEGIN_STMT
  ret_107 = 0;
  # DEBUG ret => ret_107
  # DEBUG BEGIN_STMT
  goto <bb 33>; [INV]

  <bb 32> :
<L35>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  fci_ret.32_80 = fci_ret;
  *fci_ret.32_80 = 4;
  # DEBUG BEGIN_STMT
  ret_148 = 0;
  # DEBUG ret => ret_148
  # DEBUG BEGIN_STMT

  <bb 33> :
  # ret_82 = PHI <ret_150(3), ret_126(6), ret_124(8), ret_130(11), ret_132(12), ret_134(13), ret_145(16), ret_142(20), ret_142(19), ret_118(22), ret_113(25), ret_81(27), ret_103(29), ret_105(30), ret_107(31), ret_148(32), ret_145(15)>
  # DEBUG ret => ret_82
  # DEBUG BEGIN_STMT
  _151 = ret_82;
  fci_context ={v} {CLOBBER};
  str ={v} {CLOBBER};
  mirror ={v} {CLOBBER};
  m_args ={v} {CLOBBER};
  return _151;

}


fci_mirror_cmd_query_cont_get_mirror (struct fci_t * fci_context, struct pfe_mirror_t * mirror, uint16_t * * fci_ret, struct fpp_mirror_cmd_t * * reply_buf)
{
  struct pfe_mirror_t * tmp_mirror;
  struct pfe_phy_if_t * phy_if;
  struct pfe_if_db_entry_t * entry;
  struct pfe_ct_route_actions_args_t m_args;
  pfe_ct_route_actions_t m_actions;
  pfe_ct_phy_if_id_t egress_id;
  uint32_t addr;
  const char * str;
  errno_t ret;
  uint16_t * _1;
  uint16_t * _2;
  uint16_t * _3;
  short unsigned int _4;
  const char * _5;
  struct fpp_mirror_cmd_t * _6;
  char[16] * _7;
  const char * str.38_8;
  uint32_t * _9;
  uint16_t * _10;
  struct pfe_if_db_t * _11;
  long unsigned int _12;
  unsigned int _13;
  void * _14;
  struct pfe_if_db_entry_t * entry.39_15;
  struct pfe_if_db_entry_t * entry.40_16;
  struct pfe_if_db_entry_t * entry.41_17;
  long unsigned int _18;
  uint16_t * _19;
  char_t * _20;
  struct fpp_mirror_cmd_t * _21;
  char[16] * _22;
  const char * str.42_23;
  struct fpp_mirror_cmd_t * _24;
  long unsigned int _25;
  struct fpp_mirror_cmd_t * _26;
  char[16] * _27;
  struct fpp_mirror_cmd_t * _28;
  char[16] * _29;
  const char * str.43_30;
  struct fpp_mirror_cmd_t * _31;
  struct fpp_mirror_cmd_t * _32;
  <unnamed type> m_actions.44_33;
  long unsigned int m_actions.45_34;
  long unsigned int _35;
  <unnamed type> m_actions.46_36;
  long unsigned int m_actions.47_37;
  long unsigned int _38;
  long unsigned int _39;
  long unsigned int _40;
  <unnamed type> m_actions.48_41;
  long unsigned int m_actions.49_42;
  long unsigned int _43;
  long unsigned int _44;
  long unsigned int _45;
  <unnamed type> m_actions.50_46;
  long unsigned int m_actions.51_47;
  long unsigned int _48;
  long unsigned int _49;
  <unnamed type> _50;
  <unnamed type> m_actions.52_51;
  long unsigned int m_actions.53_52;
  long unsigned int _53;
  struct fpp_mirror_cmd_t * _54;
  <unnamed type> _55;
  struct fpp_mirror_cmd_t * _56;
  int _57;
  struct fpp_mirror_cmd_t * _58;
  short unsigned int _59;
  struct fpp_mirror_cmd_t * _60;
  <unnamed type> _61;
  long unsigned int _62;
  long unsigned int _63;
  struct fpp_mirror_cmd_t * _64;
  <unnamed type> _65;
  long unsigned int _66;
  long unsigned int _67;
  long unsigned int _68;
  long unsigned int _69;
  struct fpp_mirror_cmd_t * _70;
  <unnamed type> _71;
  long unsigned int _72;
  long unsigned int _73;
  long unsigned int _74;
  long unsigned int _75;
  struct fpp_mirror_cmd_t * _76;
  <unnamed type> _77;
  long unsigned int _78;
  long unsigned int _79;
  long unsigned int _80;
  struct fpp_mirror_cmd_t * _81;
  <unnamed type> _82;
  errno_t _139;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ret_92 = 0;
  # DEBUG ret => ret_92
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  entry = 0B;
  # DEBUG BEGIN_STMT
  phy_if_95 = 0B;
  # DEBUG phy_if => phy_if_95
  # DEBUG BEGIN_STMT
  tmp_mirror_97 = mirror_96(D);
  # DEBUG tmp_mirror => tmp_mirror_97
  # DEBUG BEGIN_STMT
  _1 = *fci_ret_98(D);
  *_1 = 0;
  # DEBUG BEGIN_STMT
  if (mirror_96(D) == 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  tmp_mirror_101 = pfe_mirror_get_next ();
  # DEBUG tmp_mirror => tmp_mirror_101
  # DEBUG BEGIN_STMT
  if (tmp_mirror_101 == 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _2 = *fci_ret_98(D);
  *_2 = 61746;
  # DEBUG BEGIN_STMT
  ret_103 = 0;
  # DEBUG ret => ret_103

  <bb 5> :
  # ret_83 = PHI <ret_92(2), ret_92(3), ret_103(4)>
  # tmp_mirror_87 = PHI <tmp_mirror_97(2), tmp_mirror_101(3), tmp_mirror_101(4)>
  # DEBUG tmp_mirror => tmp_mirror_87
  # DEBUG ret => ret_83
  # DEBUG BEGIN_STMT
  _3 = *fci_ret_98(D);
  _4 = *_3;
  if (_4 == 0)
    goto <bb 6>; [INV]
  else
    goto <bb 19>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _5 = pfe_mirror_get_name (tmp_mirror_87);
  str = _5;
  # DEBUG BEGIN_STMT
  _6 = *reply_buf_106(D);
  _7 = &_6->name;
  str.38_8 = str;
  strncpy (_7, str.38_8, 15);
  # DEBUG BEGIN_STMT
  egress_id_109 = pfe_mirror_get_egress_port (tmp_mirror_87);
  # DEBUG egress_id => egress_id_109
  # DEBUG BEGIN_STMT
  _9 = &fci_context_110(D)->if_session_id;
  ret_112 = pfe_if_db_lock (_9);
  # DEBUG ret => ret_112
  # DEBUG BEGIN_STMT
  if (ret_112 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _10 = *fci_ret_98(D);
  *_10 = 61712;
  # DEBUG BEGIN_STMT
  ret_138 = 0;
  # DEBUG ret => ret_138
  goto <bb 19>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _11 = fci_context_110(D)->phy_if_db;
  _12 = fci_context_110(D)->if_session_id;
  _13 = (unsigned int) egress_id_109;
  _14 = (void *) _13;
  pfe_if_db_get_single (_11, _12, 1, _14, &entry);
  # DEBUG BEGIN_STMT
  entry.39_15 = entry;
  if (entry.39_15 != 0B)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  entry.40_16 = entry;
  phy_if_114 = pfe_if_db_entry_get_phy_if (entry.40_16);
  # DEBUG phy_if => phy_if_114

  <bb 10> :
  # phy_if_86 = PHI <phy_if_95(8), phy_if_114(9)>
  # DEBUG phy_if => phy_if_86
  # DEBUG BEGIN_STMT
  entry.41_17 = entry;
  if (entry.41_17 == 0B)
    goto <bb 12>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 11> :
  if (phy_if_86 == 0B)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  _18 = fci_context_110(D)->if_session_id;
  pfe_if_db_unlock (_18);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _19 = *fci_ret_98(D);
  *_19 = 65535;
  # DEBUG BEGIN_STMT
  ret_136 = 2;
  # DEBUG ret => ret_136
  goto <bb 19>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  _20 = pfe_phy_if_get_name (phy_if_86);
  str = _20;
  # DEBUG BEGIN_STMT
  _21 = *reply_buf_106(D);
  _22 = &_21->egress_phy_if;
  str.42_23 = str;
  strncpy (_22, str.42_23, 15);
  # DEBUG BEGIN_STMT
  _24 = *reply_buf_106(D);
  _24->egress_phy_if[15] = 0;
  # DEBUG BEGIN_STMT
  _25 = fci_context_110(D)->if_session_id;
  pfe_if_db_unlock (_25);
  # DEBUG BEGIN_STMT
  _26 = *reply_buf_106(D);
  _27 = &_26->filter_table_name;
  memset (_27, 0, 16);
  # DEBUG BEGIN_STMT
  addr_121 = pfe_mirror_get_filter (tmp_mirror_87);
  # DEBUG addr => addr_121
  # DEBUG BEGIN_STMT
  if (addr_121 != 0)
    goto <bb 14>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  ret_123 = fci_fp_db_get_table_from_addr (addr_121, &str);
  # DEBUG ret => ret_123
  # DEBUG BEGIN_STMT
  if (ret_123 == 0)
    goto <bb 15>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  _28 = *reply_buf_106(D);
  _29 = &_28->filter_table_name;
  str.43_30 = str;
  strncpy (_29, str.43_30, 15);
  # DEBUG BEGIN_STMT
  _31 = *reply_buf_106(D);
  _31->filter_table_name[15] = 0;

  <bb 16> :
  # ret_84 = PHI <ret_112(13), ret_123(14), ret_123(15)>
  # DEBUG ret => ret_84
  # DEBUG BEGIN_STMT
  memset (&m_args, 0, 60);
  # DEBUG BEGIN_STMT
  m_actions = 0;
  # DEBUG BEGIN_STMT
  _32 = *reply_buf_106(D);
  _32->m_actions = 0;
  # DEBUG BEGIN_STMT
  pfe_mirror_get_actions (tmp_mirror_87, &m_actions, &m_args);
  # DEBUG BEGIN_STMT
  m_actions.44_33 = m_actions;
  m_actions.45_34 = (long unsigned int) m_actions.44_33;
  _35 = m_actions.45_34 >> 24;
  m_actions.46_36 = m_actions;
  m_actions.47_37 = (long unsigned int) m_actions.46_36;
  _38 = m_actions.47_37 >> 8;
  _39 = _38 & 65280;
  _40 = _35 | _39;
  m_actions.48_41 = m_actions;
  m_actions.49_42 = (long unsigned int) m_actions.48_41;
  _43 = m_actions.49_42 << 8;
  _44 = _43 & 16711680;
  _45 = _40 | _44;
  m_actions.50_46 = m_actions;
  m_actions.51_47 = (long unsigned int) m_actions.50_46;
  _48 = m_actions.51_47 << 24;
  _49 = _45 | _48;
  _50 = (<unnamed type>) _49;
  m_actions = _50;
  # DEBUG BEGIN_STMT
  m_actions.52_51 = m_actions;
  m_actions.53_52 = (long unsigned int) m_actions.52_51;
  _53 = m_actions.53_52 & 2;
  if (_53 != 0)
    goto <bb 17>; [INV]
  else
    goto <bb 18>; [INV]

  <bb 17> :
  # DEBUG BEGIN_STMT
  _54 = *reply_buf_106(D);
  _55 = _54->m_actions;
  _56 = *reply_buf_106(D);
  _57 = _55 | 2;
  _56->m_actions = _57;
  # DEBUG BEGIN_STMT
  _58 = *reply_buf_106(D);
  _59 = m_args.vlan;
  _58->m_args.vlan = _59;

  <bb 18> :
  # DEBUG BEGIN_STMT
  _60 = *reply_buf_106(D);
  _61 = _60->m_actions;
  _62 = (long unsigned int) _61;
  _63 = _62 >> 24;
  _64 = *reply_buf_106(D);
  _65 = _64->m_actions;
  _66 = (long unsigned int) _65;
  _67 = _66 >> 8;
  _68 = _67 & 65280;
  _69 = _63 | _68;
  _70 = *reply_buf_106(D);
  _71 = _70->m_actions;
  _72 = (long unsigned int) _71;
  _73 = _72 << 8;
  _74 = _73 & 16711680;
  _75 = _69 | _74;
  _76 = *reply_buf_106(D);
  _77 = _76->m_actions;
  _78 = (long unsigned int) _77;
  _79 = _78 << 24;
  _80 = _75 | _79;
  _81 = *reply_buf_106(D);
  _82 = (<unnamed type>) _80;
  _81->m_actions = _82;

  <bb 19> :
  # ret_85 = PHI <ret_83(5), ret_138(7), ret_136(12), ret_84(18)>
  # DEBUG ret => ret_85
  # DEBUG BEGIN_STMT
  _139 = ret_85;
  str ={v} {CLOBBER};
  m_actions ={v} {CLOBBER};
  m_args ={v} {CLOBBER};
  entry ={v} {CLOBBER};
  return _139;

}


fci_mirror_cmd_update_set_filter (struct fci_t * fci_context, struct pfe_mirror_t * * mirror, uint16_t * * fci_ret, struct fpp_mirror_cmd_t * mirror_cmd)
{
  const char * str;
  uint32_t addr;
  errno_t ret;
  char _1;
  struct pfe_mirror_t * _2;
  uint16_t * _3;
  const char * str.36_4;
  struct pfe_mirror_t * _5;
  uint16_t * _6;
  char[16] * _7;
  struct fci_fp_table_t * _8;
  uint16_t * _9;
  struct pfe_mirror_t * _10;
  uint16_t * _11;
  const char * str.37_12;
  char[16] * _13;
  struct pfe_class_t * _14;
  char[16] * _15;
  char[16] * _16;
  struct pfe_mirror_t * _17;
  uint16_t * _18;
  uint16_t * _19;
  errno_t _62;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ret_26 = 0;
  # DEBUG ret => ret_26
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = mirror_cmd_28(D)->filter_table_name[0];
  if (_1 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = *mirror_30(D);
  addr_53 = pfe_mirror_get_filter (_2);
  # DEBUG addr => addr_53
  # DEBUG BEGIN_STMT
  if (addr_53 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  ret_55 = fci_fp_db_get_table_from_addr (addr_53, &str);
  # DEBUG ret => ret_55
  # DEBUG BEGIN_STMT
  if (ret_55 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = *fci_ret_36(D);
  *_3 = 65535;
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  str.36_4 = str;
  fci_fp_db_pop_table_from_hw (str.36_4);

  <bb 7> :
  # ret_20 = PHI <ret_26(3), ret_55(5), ret_55(6)>
  # DEBUG ret => ret_20
  # DEBUG BEGIN_STMT
  if (ret_20 == 0)
    goto <bb 8>; [INV]
  else
    goto <bb 21>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _5 = *mirror_30(D);
  ret_59 = pfe_mirror_set_filter (_5, 0);
  # DEBUG ret => ret_59
  # DEBUG BEGIN_STMT
  if (ret_59 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 21>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = *fci_ret_36(D);
  *_6 = 65535;
  # DEBUG BEGIN_STMT
  ret_61 = 0;
  # DEBUG ret => ret_61
  goto <bb 21>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _7 = &mirror_cmd_28(D)->filter_table_name;
  _8 = fci_fp_db_get_first (1, _7);
  if (_8 == 0B)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _9 = *fci_ret_36(D);
  *_9 = 3;
  # DEBUG BEGIN_STMT
  ret_51 = 0;
  # DEBUG ret => ret_51
  goto <bb 21>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  _10 = *mirror_30(D);
  addr_32 = pfe_mirror_get_filter (_10);
  # DEBUG addr => addr_32
  # DEBUG BEGIN_STMT
  if (addr_32 != 0)
    goto <bb 13>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  ret_34 = fci_fp_db_get_table_from_addr (addr_32, &str);
  # DEBUG ret => ret_34
  # DEBUG BEGIN_STMT
  if (ret_34 != 0)
    goto <bb 14>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _11 = *fci_ret_36(D);
  *_11 = 65535;
  goto <bb 16>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  str.37_12 = str;
  fci_fp_db_pop_table_from_hw (str.37_12);

  <bb 16> :
  # ret_21 = PHI <ret_26(12), ret_34(14), ret_34(15)>
  # DEBUG ret => ret_21
  # DEBUG BEGIN_STMT
  if (ret_21 == 0)
    goto <bb 17>; [INV]
  else
    goto <bb 21>; [INV]

  <bb 17> :
  # DEBUG BEGIN_STMT
  _13 = &mirror_cmd_28(D)->filter_table_name;
  addr_39 = fci_fp_db_get_table_dmem_addr (_13);
  # DEBUG addr => addr_39
  # DEBUG BEGIN_STMT
  if (addr_39 == 0)
    goto <bb 18>; [INV]
  else
    goto <bb 20>; [INV]

  <bb 18> :
  # DEBUG BEGIN_STMT
  _14 = fci_context_42(D)->class;
  _15 = &mirror_cmd_28(D)->filter_table_name;
  ret_44 = fci_fp_db_push_table_to_hw (_14, _15);
  # DEBUG ret => ret_44
  # DEBUG BEGIN_STMT
  _16 = &mirror_cmd_28(D)->filter_table_name;
  addr_46 = fci_fp_db_get_table_dmem_addr (_16);
  # DEBUG addr => addr_46
  # DEBUG BEGIN_STMT
  _17 = *mirror_30(D);
  ret_48 = pfe_mirror_set_filter (_17, addr_46);
  # DEBUG ret => ret_48
  # DEBUG BEGIN_STMT
  if (ret_48 != 0)
    goto <bb 19>; [INV]
  else
    goto <bb 21>; [INV]

  <bb 19> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _18 = *fci_ret_36(D);
  *_18 = 65535;
  goto <bb 21>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _19 = *fci_ret_36(D);
  *_19 = 3;
  # DEBUG BEGIN_STMT
  ret_41 = 0;
  # DEBUG ret => ret_41

  <bb 21> :
  # ret_22 = PHI <ret_59(8), ret_51(11), ret_21(16), ret_48(19), ret_41(20), ret_20(7), ret_61(9), ret_48(18)>
  # DEBUG ret => ret_22
  # DEBUG BEGIN_STMT
  _62 = ret_22;
  str ={v} {CLOBBER};
  return _62;

}


fci_mirror_cmd_update_egress_port (struct fci_t * * fci_context, struct pfe_mirror_t * * mirror, uint16_t * * fci_ret, struct fpp_mirror_cmd_t * mirror_cmd)
{
  struct pfe_if_db_entry_t * entry;
  struct pfe_phy_if_t * phy_if;
  pfe_ct_phy_if_id_t egress_id;
  errno_t ret;
  struct fci_t * _1;
  uint32_t * _2;
  uint16_t * _3;
  struct fci_t * _4;
  struct pfe_if_db_t * _5;
  struct fci_t * _6;
  long unsigned int _7;
  char[16] * _8;
  struct pfe_if_db_entry_t * entry.33_9;
  struct pfe_if_db_entry_t * entry.34_10;
  struct pfe_if_db_entry_t * entry.35_11;
  struct fci_t * _12;
  long unsigned int _13;
  uint16_t * _14;
  struct pfe_mirror_t * _15;
  struct fci_t * _16;
  long unsigned int _17;
  uint16_t * _18;
  struct fci_t * _19;
  long unsigned int _20;
  errno_t _46;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  phy_if_24 = 0B;
  # DEBUG phy_if => phy_if_24
  # DEBUG BEGIN_STMT
  entry = 0B;
  # DEBUG BEGIN_STMT
  _1 = *fci_context_27(D);
  _2 = &_1->if_session_id;
  ret_29 = pfe_if_db_lock (_2);
  # DEBUG ret => ret_29
  # DEBUG BEGIN_STMT
  if (ret_29 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _3 = *fci_ret_39(D);
  *_3 = 61712;
  # DEBUG BEGIN_STMT
  ret_45 = 0;
  # DEBUG ret => ret_45
  goto <bb 12>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _4 = *fci_context_27(D);
  _5 = _4->phy_if_db;
  _6 = *fci_context_27(D);
  _7 = _6->if_session_id;
  _8 = &mirror_cmd_30(D)->egress_phy_if;
  pfe_if_db_get_first (_5, _7, 3, _8, &entry);
  # DEBUG BEGIN_STMT
  entry.33_9 = entry;
  if (entry.33_9 != 0B)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  entry.34_10 = entry;
  phy_if_32 = pfe_if_db_entry_get_phy_if (entry.34_10);
  # DEBUG phy_if => phy_if_32

  <bb 6> :
  # phy_if_22 = PHI <phy_if_24(4), phy_if_32(5)>
  # DEBUG phy_if => phy_if_22
  # DEBUG BEGIN_STMT
  entry.35_11 = entry;
  if (entry.35_11 == 0B)
    goto <bb 8>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 7> :
  if (phy_if_22 == 0B)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _12 = *fci_context_27(D);
  _13 = _12->if_session_id;
  pfe_if_db_unlock (_13);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _14 = *fci_ret_39(D);
  *_14 = 61700;
  # DEBUG BEGIN_STMT
  ret_43 = 0;
  # DEBUG ret => ret_43
  goto <bb 12>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  egress_id_33 = pfe_phy_if_get_id (phy_if_22);
  # DEBUG egress_id => egress_id_33
  # DEBUG BEGIN_STMT
  _15 = *mirror_34(D);
  ret_36 = pfe_mirror_set_egress_port (_15, egress_id_33);
  # DEBUG ret => ret_36
  # DEBUG BEGIN_STMT
  if (ret_36 != 0)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _16 = *fci_context_27(D);
  _17 = _16->if_session_id;
  pfe_if_db_unlock (_17);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _18 = *fci_ret_39(D);
  *_18 = 65535;
  goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _19 = *fci_context_27(D);
  _20 = _19->if_session_id;
  pfe_if_db_unlock (_20);

  <bb 12> :
  # ret_21 = PHI <ret_45(3), ret_43(8), ret_36(10), ret_36(11)>
  # DEBUG ret => ret_21
  # DEBUG BEGIN_STMT
  _46 = ret_21;
  entry ={v} {CLOBBER};
  return _46;

}


