fci_spd_cmd (struct fci_msg_t * msg, uint16_t * fci_ret, struct fpp_spd_cmd_t * reply_buf, uint32_t * reply_len)
{
  struct pfe_ct_spd_entry_t spd_entry;
  struct pfe_phy_if_t * phy_if;
  struct pfe_if_db_entry_t * pfe_if_db_entry;
  struct fpp_spd_cmd_t * spd_cmd;
  errno_t ret;
  long unsigned int _1;
  unsigned char _2;
  struct fpp_spd_cmd_t * reply_buf.0_3;
  struct pfe_if_db_t * _4;
  long unsigned int _5;
  char[16] * _6;
  long unsigned int _7;
  int _8;
  struct pfe_if_db_entry_t * pfe_if_db_entry.1_9;
  short unsigned int _10;
  short unsigned int _11;
  short unsigned int _12;
  short unsigned int search_position.3_13;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG fci_context => &__context
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_if_db_entry = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG phy_if => 0B
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = *reply_len_19(D);
  if (_1 <= 67)
    goto <bb 24>; [52.23%]
  else
    goto <bb 3>; [47.77%]

  <bb 3> [local count: 512926469]:
  # DEBUG BEGIN_STMT
  *reply_len_19(D) = 0;
  # DEBUG BEGIN_STMT
  memset (&spd_entry, 0, 56);
  # DEBUG BEGIN_STMT
  _2 = pfe_feature_mgr_is_available ("IPsec");
  if (_2 == 0)
    goto <bb 4>; [67.00%]
  else
    goto <bb 5>; [33.00%]

  <bb 4> [local count: 343660734]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret_35(D) = 62034;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  goto <bb 24>; [100.00%]

  <bb 5> [local count: 169265735]:
  # DEBUG BEGIN_STMT
  reply_buf.0_3 = reply_buf;
  memset (reply_buf.0_3, 0, 68);
  # DEBUG BEGIN_STMT
  spd_cmd_25 = &msg_24(D)->msg_cmd.payload;
  # DEBUG spd_cmd => spd_cmd_25
  # DEBUG BEGIN_STMT
  ret_27 = pfe_if_db_lock (&MEM[(void *)&__context + 20B]);
  # DEBUG ret => ret_27
  # DEBUG BEGIN_STMT
  if (ret_27 != 0)
    goto <bb 6>; [67.00%]
  else
    goto <bb 7>; [33.00%]

  <bb 6> [local count: 113408042]:
  # DEBUG BEGIN_STMT
  *fci_ret_35(D) = 61712;
  # DEBUG BEGIN_STMT
  goto <bb 24>; [100.00%]

  <bb 7> [local count: 55857692]:
  # DEBUG BEGIN_STMT
  _4 = __context.phy_if_db;
  _5 = __context.if_session_id;
  _6 = &MEM[(struct fpp_spd_cmd_t *)msg_24(D) + 16B].name;
  ret_29 = pfe_if_db_get_first (_4, _5, 3, _6, &pfe_if_db_entry);
  # DEBUG ret => ret_29
  # DEBUG BEGIN_STMT
  _7 = __context.if_session_id;
  _8 = pfe_if_db_unlock (_7);
  if (_8 != 0)
    goto <bb 8>; [35.00%]
  else
    goto <bb 9>; [65.00%]

  <bb 8> [local count: 19550192]:
  # DEBUG BEGIN_STMT
  *fci_ret_35(D) = 61713;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 2
  goto <bb 24>; [100.00%]

  <bb 9> [local count: 36307500]:
  # DEBUG BEGIN_STMT
  if (ret_29 != 0)
    goto <bb 11>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 10> [local count: 18153750]:
  pfe_if_db_entry.1_9 = pfe_if_db_entry;
  if (pfe_if_db_entry.1_9 == 0B)
    goto <bb 11>; [30.00%]
  else
    goto <bb 12>; [70.00%]

  <bb 11> [local count: 23599875]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret_35(D) = 61700;
  goto <bb 24>; [100.00%]

  <bb 12> [local count: 12707625]:
  # DEBUG BEGIN_STMT
  phy_if_31 = pfe_if_db_entry_get_phy_if (pfe_if_db_entry.1_9);
  # DEBUG phy_if => phy_if_31
  # DEBUG BEGIN_STMT
  if (phy_if_31 == 0B)
    goto <bb 13>; [18.75%]
  else
    goto <bb 14>; [81.25%]

  <bb 13> [local count: 2382680]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret_35(D) = 61700;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 2
  goto <bb 24>; [100.00%]

  <bb 14> [local count: 10324945]:
  # DEBUG BEGIN_STMT
  _10 = MEM[(struct fpp_spd_cmd_t *)msg_24(D) + 16B].action;
  switch (_10) <default: <L23> [20.00%], case 0: <L13> [20.00%], case 1: <L14> [20.00%], case 6: <L18> [20.00%], case 7: <L19> [20.00%]>

  <bb 15> [local count: 2064989]:
<L13>:
  # DEBUG BEGIN_STMT
  ret_44 = fci_spd_cmd_register (phy_if_31, fci_ret_35(D), &spd_entry, spd_cmd_25);
  # DEBUG ret => ret_44
  # DEBUG BEGIN_STMT
  goto <bb 24>; [100.00%]

  <bb 16> [local count: 2064989]:
<L14>:
  # DEBUG BEGIN_STMT
  _11 = MEM[(struct fpp_spd_cmd_t *)msg_24(D) + 16B].position;
  _12 = _11 r>> 8;
  ret_40 = pfe_spd_acc_remove_rule (phy_if_31, _12);
  # DEBUG ret => ret_40
  # DEBUG BEGIN_STMT
  if (ret_40 != 0)
    goto <bb 17>; [50.00%]
  else
    goto <bb 18>; [50.00%]

  <bb 17> [local count: 1032495]:
  # DEBUG BEGIN_STMT
  *fci_ret_35(D) = 65535;
  goto <bb 24>; [100.00%]

  <bb 18> [local count: 1032495]:
  # DEBUG BEGIN_STMT
  *fci_ret_35(D) = 0;
  goto <bb 24>; [100.00%]

  <bb 19> [local count: 2064989]:
<L18>:
  # DEBUG BEGIN_STMT
  search_position = 0;

  <bb 20> [local count: 4129978]:
<L19>:
  # DEBUG BEGIN_STMT
  search_position.3_13 = search_position;
  ret_34 = pfe_spd_acc_get_rule (phy_if_31, search_position.3_13, &spd_entry);
  # DEBUG ret => ret_34
  # DEBUG BEGIN_STMT
  if (ret_34 == 0)
    goto <bb 21>; [33.00%]
  else
    goto <bb 22>; [67.00%]

  <bb 21> [local count: 1362893]:
  # DEBUG BEGIN_STMT
  ret_38 = fci_spd_cmd_query_cont_construct_reply (fci_ret_35(D), &reply_buf, reply_len_19(D), spd_entry, spd_cmd_25);
  # DEBUG ret => ret_38
  goto <bb 24>; [100.00%]

  <bb 22> [local count: 2767085]:
  # DEBUG BEGIN_STMT
  *fci_ret_35(D) = 61700;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  goto <bb 24>; [100.00%]

  <bb 23> [local count: 2064989]:
<L23>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret_35(D) = 4;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22
  # DEBUG BEGIN_STMT

  <bb 24> [local count: 1073741824]:
  # ret_14 = PHI <22(2), 0(4), ret_27(6), 2(8), ret_29(11), 2(13), ret_44(15), 0(18), 0(22), 22(23), ret_40(17), ret_38(21)>
  # DEBUG ret => ret_14
  # DEBUG BEGIN_STMT
  pfe_if_db_entry ={v} {CLOBBER};
  spd_entry ={v} {CLOBBER};
  return ret_14;

}


fci_spd_cmd_register (struct pfe_phy_if_t * phy_if, uint16_t * fci_ret, struct pfe_ct_spd_entry_t * spd_entry, const struct fpp_spd_cmd_t * spd_cmd)
{
  errno_t ret;
  <unnamed type> _1;
  <unnamed type> _2;
  <unnamed type> _3;
  uint32_t[4] * _4;
  const uint32_t * _5;
  uint32_t[4] * _6;
  const uint32_t * _7;
  long unsigned int _8;
  long unsigned int _9;
  <unnamed type> _10;
  <unnamed type> _11;
  <unnamed type> _12;
  <unnamed type> _13;
  <unnamed type> _14;
  unsigned char _15;
  short unsigned int _16;
  short unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  <unnamed type> _20;
  short unsigned int _21;
  short unsigned int _22;
  <unnamed type> _49;
  <unnamed type> _50;
  <unnamed type> _51;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = spd_cmd_28(D)->flags;
  _49 = _1 & 2;
  if (_49 != 0)
    goto <bb 3>; [33.00%]
  else
    goto <bb 4>; [67.00%]

  <bb 3> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  _2 = spd_entry_29(D)->flags;
  _3 = _2 | 2;
  spd_entry_29(D)->flags = _3;
  # DEBUG BEGIN_STMT
  _4 = &spd_entry_29(D)->ipv.v6.sip;
  _5 = &spd_cmd_28(D)->saddr[0];
  memcpy (_4, _5, 16);
  # DEBUG BEGIN_STMT
  _6 = &spd_entry_29(D)->ipv.v6.dip;
  _7 = &spd_cmd_28(D)->daddr[0];
  memcpy (_6, _7, 16);
  goto <bb 5>; [100.00%]

  <bb 4> [local count: 719407023]:
  # DEBUG BEGIN_STMT
  _8 = spd_cmd_28(D)->saddr[0];
  spd_entry_29(D)->ipv.v4.sip = _8;
  # DEBUG BEGIN_STMT
  _9 = spd_cmd_28(D)->daddr[0];
  spd_entry_29(D)->ipv.v4.dip = _9;

  <bb 5> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _10 = spd_cmd_28(D)->flags;
  _50 = _10 & 4;
  if (_50 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 6> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  _11 = spd_entry_29(D)->flags;
  _12 = _11 | 4;
  spd_entry_29(D)->flags = _12;

  <bb 7> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _51 = _10 & 8;
  if (_51 != 0)
    goto <bb 8>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 8> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  _13 = spd_entry_29(D)->flags;
  _14 = _13 | 8;
  spd_entry_29(D)->flags = _14;

  <bb 9> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _15 = spd_cmd_28(D)->protocol;
  spd_entry_29(D)->proto = _15;
  # DEBUG BEGIN_STMT
  _16 = spd_cmd_28(D)->sport;
  spd_entry_29(D)->sport = _16;
  # DEBUG BEGIN_STMT
  _17 = spd_cmd_28(D)->dport;
  spd_entry_29(D)->dport = _17;
  # DEBUG BEGIN_STMT
  _18 = spd_cmd_28(D)->sa_id;
  spd_entry_29(D)->sad_entry = _18;
  # DEBUG BEGIN_STMT
  _19 = spd_cmd_28(D)->spi;
  spd_entry_29(D)->spi = _19;
  # DEBUG BEGIN_STMT
  _20 = spd_cmd_28(D)->spd_action;
  spd_entry_29(D)->action = _20;
  # DEBUG BEGIN_STMT
  _21 = spd_cmd_28(D)->position;
  _22 = _21 r>> 8;
  ret_45 = pfe_spd_acc_add_rule (phy_if_43(D), _22, spd_entry_29(D));
  # DEBUG ret => ret_45
  # DEBUG BEGIN_STMT
  if (ret_45 != 0)
    goto <bb 10>; [50.00%]
  else
    goto <bb 11>; [50.00%]

  <bb 10> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  *fci_ret_46(D) = 65535;
  goto <bb 12>; [100.00%]

  <bb 11> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  *fci_ret_46(D) = 0;

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

}


fci_spd_cmd_query_cont_construct_reply (uint16_t * fci_ret, struct fpp_spd_cmd_t * * reply_buf, uint32_t * reply_len, const struct pfe_ct_spd_entry_t spd_entry, const struct fpp_spd_cmd_t * spd_cmd)
{
  struct fpp_spd_cmd_t * _1;
  struct fpp_spd_cmd_t * _2;
  char[16] * _3;
  const char[16] * _4;
  <unnamed type> _5;
  struct fpp_spd_cmd_t * _6;
  <unnamed type> _7;
  <unnamed type> _8;
  uint32_t * _9;
  struct fpp_spd_cmd_t * _10;
  uint32_t * _11;
  struct fpp_spd_cmd_t * _12;
  long unsigned int _13;
  long unsigned int _14;
  struct fpp_spd_cmd_t * _15;
  <unnamed type> _16;
  <unnamed type> _17;
  struct fpp_spd_cmd_t * _18;
  <unnamed type> _19;
  <unnamed type> _20;
  struct fpp_spd_cmd_t * _21;
  unsigned char _22;
  short unsigned int _23;
  short unsigned int _24;
  long unsigned int _25;
  long unsigned int _26;
  <unnamed type> _27;
  short unsigned int search_position.4_28;
  short unsigned int _29;
  <unnamed type> _30;
  short unsigned int _31;
  <unnamed type> _59;
  <unnamed type> _60;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = *reply_buf_36(D);
  memset (_1, 0, 68);
  # DEBUG BEGIN_STMT
  _2 = *reply_buf_36(D);
  _3 = &_2->name;
  _4 = &spd_cmd_38(D)->name;
  strcpy (_3, _4);
  # DEBUG BEGIN_STMT
  _5 = spd_entry.flags;
  _30 = _5 & 2;
  if (_30 != 0)
    goto <bb 3>; [33.00%]
  else
    goto <bb 4>; [67.00%]

  <bb 3> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  _6 = *reply_buf_36(D);
  _7 = _6->flags;
  _8 = _7 | 2;
  _6->flags = _8;
  # DEBUG BEGIN_STMT
  _9 = &_6->saddr[0];
  memcpy (_9, &spd_entry.ipv.v6.sip[0], 16);
  # DEBUG BEGIN_STMT
  _10 = *reply_buf_36(D);
  _11 = &_10->daddr[0];
  memcpy (_11, &spd_entry.ipv.v6.dip[0], 16);
  goto <bb 5>; [100.00%]

  <bb 4> [local count: 719407023]:
  # DEBUG BEGIN_STMT
  _12 = *reply_buf_36(D);
  _13 = spd_entry.ipv.v4.sip;
  _12->saddr[0] = _13;
  # DEBUG BEGIN_STMT
  _14 = spd_entry.ipv.v4.dip;
  _12->daddr[0] = _14;

  <bb 5> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _59 = _5 & 4;
  if (_59 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 6> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  _15 = *reply_buf_36(D);
  _16 = _15->flags;
  _17 = _16 | 4;
  _15->flags = _17;

  <bb 7> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _60 = _5 & 8;
  if (_60 != 0)
    goto <bb 8>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 8> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  _18 = *reply_buf_36(D);
  _19 = _18->flags;
  _20 = _19 | 8;
  _18->flags = _20;

  <bb 9> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _21 = *reply_buf_36(D);
  _22 = spd_entry.proto;
  _21->protocol = _22;
  # DEBUG BEGIN_STMT
  _23 = spd_entry.sport;
  _21->sport = _23;
  # DEBUG BEGIN_STMT
  _24 = spd_entry.dport;
  _21->dport = _24;
  # DEBUG BEGIN_STMT
  _25 = spd_entry.sad_entry;
  _21->sa_id = _25;
  # DEBUG BEGIN_STMT
  _26 = spd_entry.spi;
  _21->spi = _26;
  # DEBUG BEGIN_STMT
  _27 = spd_entry.action;
  _21->spd_action = _27;
  # DEBUG BEGIN_STMT
  search_position.4_28 = search_position;
  _29 = search_position.4_28 r>> 8;
  _21->position = _29;
  # DEBUG BEGIN_STMT
  _31 = search_position.4_28 + 1;
  search_position = _31;
  # DEBUG BEGIN_STMT
  *fci_ret_55(D) = 0;
  # DEBUG BEGIN_STMT
  *reply_len_57(D) = 68;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  return 0;

}


