pfe_spd_get_rule (const struct pfe_phy_if_t * phy_if, uint16_t position, struct pfe_ct_spd_entry_t * entry)
{
  pfe_ct_phy_if_id_t phy_if_id;
  uint32_t entry_count;
  errno_t ret;
  int _1;
  struct pfe_ct_ipsec_spd_t * _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;
  unsigned int _13;
  struct pfe_ct_spd_entry_t * _14;
  sizetype _24;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  phy_if_id_19 = pfe_phy_if_get_id (phy_if_18(D));
  # DEBUG phy_if_id => phy_if_id_19
  # DEBUG BEGIN_STMT
  _1 = (int) phy_if_id_19;
  _2 = pfe_spds[_1];
  if (_2 == 0B)
    goto <bb 5>; [18.75%]
  else
    goto <bb 3>; [81.25%]

  <bb 3> [local count: 872415233]:
  # DEBUG BEGIN_STMT
  _3 = _2->entry_count;
  _4 = _3 >> 24;
  _5 = _3 >> 8;
  _6 = _5 & 65280;
  _7 = _4 | _6;
  _8 = _3 << 8;
  _9 = _8 & 16711680;
  _10 = _7 | _9;
  _11 = _3 << 24;
  entry_count_20 = _10 | _11;
  # DEBUG entry_count => entry_count_20
  # DEBUG BEGIN_STMT
  _12 = (long unsigned int) position_21(D);
  if (_12 >= entry_count_20)
    goto <bb 5>; [52.23%]
  else
    goto <bb 4>; [47.77%]

  <bb 4> [local count: 416752756]:
  # DEBUG BEGIN_STMT
  # DEBUG entries => _2 + 12
  # DEBUG BEGIN_STMT
  _13 = _12 * 56;
  _24 = _13 + 12;
  _14 = _2 + _24;
  memcpy (entry_22(D), _14, 56);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

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

}


pfe_spd_remove_rule (struct pfe_phy_if_t * phy_if, uint16_t position)
{
  struct pfe_ct_ipsec_spd_t * spd;
  uint32_t old_addr;
  uint32_t entry_count;
  errno_t ret;
  struct pfe_ct_spd_entry_t * old_entries;
  struct pfe_ct_spd_entry_t * entries;
  pfe_ct_phy_if_id_t phy_if_id;
  int _1;
  struct pfe_ct_ipsec_spd_t * _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_class_t * class_ptr.10_12;
  long unsigned int _13;
  long unsigned int _14;
  struct pfe_ct_ipsec_spd_t * _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;
  <unnamed type> _25;
  long unsigned int _26;
  long unsigned int _27;
  long unsigned int _28;
  struct pfe_ct_spd_entry_t * _29;
  sizetype _30;
  sizetype _31;
  struct pfe_ct_spd_entry_t * _32;
  long unsigned int _33;
  long unsigned int _34;
  struct pfe_ct_ipsec_spd_t * _35;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  phy_if_id_41 = pfe_phy_if_get_id (phy_if_40(D));
  # DEBUG phy_if_id => phy_if_id_41
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (int) phy_if_id_41;
  _2 = pfe_spds[_1];
  if (_2 == 0B)
    goto <bb 12>; [18.75%]
  else
    goto <bb 3>; [81.25%]

  <bb 3> [local count: 872415233]:
  # DEBUG BEGIN_STMT
  _3 = _2->entry_count;
  _4 = _3 >> 24;
  _5 = _3 >> 8;
  _6 = _5 & 65280;
  _7 = _4 | _6;
  _8 = _3 << 8;
  _9 = _8 & 16711680;
  _10 = _7 | _9;
  _11 = _3 << 24;
  entry_count_42 = _10 | _11;
  # DEBUG entry_count => entry_count_42
  # DEBUG BEGIN_STMT
  if (entry_count_42 <= 1)
    goto <bb 4>; [41.00%]
  else
    goto <bb 5>; [59.00%]

  <bb 4> [local count: 357690245]:
  # DEBUG BEGIN_STMT
  oal_mm_free (_2);
  # DEBUG BEGIN_STMT
  pfe_spds[_1] = 0B;
  # DEBUG BEGIN_STMT
  old_addr_63 = pfe_phy_if_get_spd (phy_if_40(D));
  # DEBUG old_addr => old_addr_63
  # DEBUG BEGIN_STMT
  pfe_phy_if_set_spd (phy_if_40(D), 0);
  # DEBUG BEGIN_STMT
  class_ptr.10_12 = class_ptr;
  pfe_class_dmem_heap_free (class_ptr.10_12, old_addr_63);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  goto <bb 12>; [100.00%]

  <bb 5> [local count: 514724987]:
  # DEBUG BEGIN_STMT
  entry_count_43 = entry_count_42 + 4294967295;
  # DEBUG entry_count => entry_count_43
  # DEBUG BEGIN_STMT
  _13 = entry_count_43 * 56;
  _14 = _13 + 12;
  spd_45 = oal_mm_malloc (_14);
  # DEBUG spd => spd_45
  # DEBUG BEGIN_STMT
  _15 = pfe_spds[_1];
  old_entries_46 = _15 + 12;
  # DEBUG old_entries => old_entries_46
  # DEBUG BEGIN_STMT
  if (spd_45 != 0B)
    goto <bb 6>; [81.25%]
  else
    goto <bb 12>; [18.75%]

  <bb 6> [local count: 418214052]:
  # DEBUG BEGIN_STMT
  entries_47 = spd_45 + 12;
  # DEBUG entries => entries_47
  # DEBUG BEGIN_STMT
  _16 = entry_count_43 >> 24;
  _17 = entry_count_43 >> 8;
  _18 = _17 & 65280;
  _19 = _16 | _18;
  _20 = entry_count_43 << 8;
  _21 = _20 & 16711680;
  _22 = _19 | _21;
  _23 = entry_count_43 << 24;
  _24 = _22 | _23;
  spd_45->entry_count = _24;
  # DEBUG BEGIN_STMT
  _25 = _15->no_ip_action;
  spd_45->no_ip_action = _25;
  # DEBUG BEGIN_STMT
  _26 = _15->entries;
  spd_45->entries = _26;
  # DEBUG BEGIN_STMT
  _27 = (long unsigned int) position_51(D);
  if (_27 >= entry_count_43)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 209107026]:
  # DEBUG BEGIN_STMT
  memcpy (entries_47, old_entries_46, _13);
  goto <bb 9>; [100.00%]

  <bb 8> [local count: 209107026]:
  # DEBUG BEGIN_STMT
  _28 = _27 * 56;
  memcpy (entries_47, old_entries_46, _28);
  # DEBUG BEGIN_STMT
  _29 = entries_47 + _28;
  _30 = _27 + 1;
  _31 = _30 * 56;
  _32 = old_entries_46 + _31;
  _33 = entry_count_43 - _27;
  _34 = _33 * 56;
  memcpy (_29, _32, _34);

  <bb 9> [local count: 418214052]:
  # DEBUG BEGIN_STMT
  ret_56 = pfe_spd_update_phyif (phy_if_40(D), spd_45, _14);
  # DEBUG ret => ret_56
  # DEBUG BEGIN_STMT
  if (ret_56 == 0)
    goto <bb 10>; [50.00%]
  else
    goto <bb 11>; [50.00%]

  <bb 10> [local count: 209107026]:
  # DEBUG BEGIN_STMT
  _35 = pfe_spds[_1];
  oal_mm_free (_35);
  # DEBUG BEGIN_STMT
  pfe_spds[_1] = spd_45;
  goto <bb 12>; [100.00%]

  <bb 11> [local count: 209107026]:
  # DEBUG BEGIN_STMT
  oal_mm_free (spd_45);

  <bb 12> [local count: 1073741824]:
  # ret_36 = PHI <22(2), 0(4), ret_56(11), 11(5), 0(10)>
  # DEBUG ret => ret_36
  # DEBUG BEGIN_STMT
  return ret_36;

}


pfe_spd_add_rule (struct pfe_phy_if_t * phy_if, uint16_t position, struct pfe_ct_spd_entry_t * entry)
{
  addr_t dmem_addr;
  uint32_t old_count;
  uint32_t new_count;
  errno_t ret;
  struct pfe_ct_spd_entry_t * old_entries;
  struct pfe_ct_spd_entry_t * entries;
  struct pfe_ct_ipsec_spd_t * spd;
  pfe_ct_phy_if_id_t phy_if_id;
  int _1;
  struct pfe_ct_ipsec_spd_t * _2;
  struct pfe_class_t * class_ptr.5_3;
  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;
  struct pfe_class_t * class_ptr.6_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;
  struct pfe_ct_ipsec_spd_t * _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;
  <unnamed type> _36;
  long unsigned int _37;
  long unsigned int _38;
  long unsigned int _39;
  struct pfe_ct_spd_entry_t * _40;
  struct pfe_ct_spd_entry_t * _41;
  long unsigned int _42;
  long unsigned int _43;
  sizetype _44;
  sizetype _45;
  struct pfe_ct_spd_entry_t * _46;
  struct pfe_ct_spd_entry_t * _47;
  long unsigned int _48;
  long unsigned int _49;
  struct pfe_ct_spd_entry_t * _50;
  struct pfe_ct_ipsec_spd_t * _51;

  <bb 2> [local count: 1073741823]:
  # 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
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (int) phy_if_id_57;
  _2 = pfe_spds[_1];
  if (_2 == 0B)
    goto <bb 3>; [30.00%]
  else
    goto <bb 7>; [70.00%]

  <bb 3> [local count: 322122547]:
  # DEBUG BEGIN_STMT
  # DEBUG new_count => 1
  # DEBUG BEGIN_STMT
  spd_82 = oal_mm_malloc (68);
  # DEBUG spd => spd_82
  # DEBUG BEGIN_STMT
  if (spd_82 != 0B)
    goto <bb 4>; [68.09%]
  else
    goto <bb 16>; [31.91%]

  <bb 4> [local count: 219333242]:
  # DEBUG BEGIN_STMT
  entries_83 = spd_82 + 12;
  # DEBUG entries => entries_83
  # DEBUG BEGIN_STMT
  spd_82->entry_count = 16777216;
  # DEBUG BEGIN_STMT
  spd_82->no_ip_action = 2;
  # DEBUG BEGIN_STMT
  memcpy (entries_83, entry_70(D), 56);
  # DEBUG BEGIN_STMT
  pfe_spds[_1] = spd_82;
  # DEBUG BEGIN_STMT
  class_ptr.5_3 = class_ptr;
  dmem_addr_89 = pfe_class_dmem_heap_alloc (class_ptr.5_3, 68);
  # DEBUG dmem_addr => dmem_addr_89
  # DEBUG BEGIN_STMT
  if (dmem_addr_89 != 0)
    goto <bb 5>; [65.00%]
  else
    goto <bb 6>; [35.00%]

  <bb 5> [local count: 142566607]:
  # DEBUG BEGIN_STMT
  _4 = dmem_addr_89 + 12;
  _5 = _4 >> 24;
  _6 = _4 >> 8;
  _7 = _6 & 65280;
  _8 = _5 | _7;
  _9 = _4 << 8;
  _10 = _9 & 16711680;
  _11 = _8 | _10;
  _12 = _4 << 24;
  _13 = _11 | _12;
  spd_82->entries = _13;
  # DEBUG BEGIN_STMT
  class_ptr.6_14 = class_ptr;
  pfe_class_write_dmem (class_ptr.6_14, -1, dmem_addr_89, spd_82, 68);
  # DEBUG BEGIN_STMT
  pfe_phy_if_set_spd (phy_if_56(D), dmem_addr_89);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  goto <bb 16>; [100.00%]

  <bb 6> [local count: 76766635]:
  # DEBUG BEGIN_STMT
  oal_mm_free (spd_82);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 11
  goto <bb 16>; [100.00%]

  <bb 7> [local count: 751619277]:
  # DEBUG BEGIN_STMT
  _15 = _2->entry_count;
  _16 = _15 >> 24;
  _17 = _15 >> 8;
  _18 = _17 & 65280;
  _19 = _16 | _18;
  _20 = _15 << 8;
  _21 = _20 & 16711680;
  _22 = _19 | _21;
  _23 = _15 << 24;
  old_count_58 = _22 | _23;
  # DEBUG old_count => old_count_58
  # DEBUG BEGIN_STMT
  new_count_59 = old_count_58 + 1;
  # DEBUG new_count => new_count_59
  # DEBUG BEGIN_STMT
  _24 = new_count_59 * 56;
  _25 = _24 + 12;
  spd_61 = oal_mm_malloc (_25);
  # DEBUG spd => spd_61
  # DEBUG BEGIN_STMT
  _26 = pfe_spds[_1];
  old_entries_62 = _26 + 12;
  # DEBUG old_entries => old_entries_62
  # DEBUG BEGIN_STMT
  if (spd_61 != 0B)
    goto <bb 8>; [81.25%]
  else
    goto <bb 16>; [18.75%]

  <bb 8> [local count: 610690662]:
  # DEBUG BEGIN_STMT
  entries_63 = spd_61 + 12;
  # DEBUG entries => entries_63
  # DEBUG BEGIN_STMT
  _27 = new_count_59 >> 24;
  _28 = new_count_59 >> 8;
  _29 = _28 & 65280;
  _30 = _27 | _29;
  _31 = new_count_59 << 8;
  _32 = _31 & 16711680;
  _33 = _30 | _32;
  _34 = new_count_59 << 24;
  _35 = _33 | _34;
  spd_61->entry_count = _35;
  # DEBUG BEGIN_STMT
  _36 = _26->no_ip_action;
  spd_61->no_ip_action = _36;
  # DEBUG BEGIN_STMT
  _37 = _26->entries;
  spd_61->entries = _37;
  # DEBUG BEGIN_STMT
  _38 = (long unsigned int) position_67(D);
  if (_38 >= old_count_58)
    goto <bb 9>; [33.00%]
  else
    goto <bb 10>; [67.00%]

  <bb 9> [local count: 201527918]:
  # DEBUG BEGIN_STMT
  _39 = old_count_58 * 56;
  memcpy (entries_63, old_entries_62, _39);
  # DEBUG BEGIN_STMT
  _40 = entries_63 + _39;
  memcpy (_40, entry_70(D), 56);
  goto <bb 13>; [100.00%]

  <bb 10> [local count: 409162743]:
  # DEBUG BEGIN_STMT
  if (position_67(D) == 0)
    goto <bb 11>; [50.00%]
  else
    goto <bb 12>; [50.00%]

  <bb 11> [local count: 204581371]:
  # DEBUG BEGIN_STMT
  _41 = &MEM[(void *)spd_61 + 68B];
  _42 = old_count_58 * 56;
  memcpy (_41, old_entries_62, _42);
  # DEBUG BEGIN_STMT
  memcpy (entries_63, entry_70(D), 56);
  goto <bb 13>; [100.00%]

  <bb 12> [local count: 204581371]:
  # DEBUG BEGIN_STMT
  _43 = _38 * 56;
  memcpy (entries_63, old_entries_62, _43);
  # DEBUG BEGIN_STMT
  _44 = _38 + 1;
  _45 = _44 * 56;
  _46 = entries_63 + _45;
  _47 = old_entries_62 + _43;
  _48 = old_count_58 - _38;
  _49 = _48 * 56;
  memcpy (_46, _47, _49);
  # DEBUG BEGIN_STMT
  _50 = entries_63 + _43;
  memcpy (_50, entry_70(D), 56);

  <bb 13> [local count: 610690662]:
  # DEBUG BEGIN_STMT
  ret_77 = pfe_spd_update_phyif (phy_if_56(D), spd_61, _25);
  # DEBUG ret => ret_77
  # DEBUG BEGIN_STMT
  if (ret_77 == 0)
    goto <bb 14>; [50.00%]
  else
    goto <bb 15>; [50.00%]

  <bb 14> [local count: 305345331]:
  # DEBUG BEGIN_STMT
  _51 = pfe_spds[_1];
  oal_mm_free (_51);
  # DEBUG BEGIN_STMT
  pfe_spds[_1] = spd_61;
  goto <bb 16>; [100.00%]

  <bb 15> [local count: 305345331]:
  # DEBUG BEGIN_STMT
  oal_mm_free (spd_61);

  <bb 16> [local count: 1073741824]:
  # ret_52 = PHI <11(3), ret_77(15), 11(7), 11(6), 0(5), 0(14)>
  # DEBUG ret => ret_52
  # DEBUG BEGIN_STMT
  return ret_52;

}


pfe_spd_destroy (struct pfe_if_db_t * phy_if_db)
{
  struct pfe_if_db_entry_t * if_db_entry;
  struct pfe_phy_if_t * phy_if;
  errno_t ret;
  uint32_t session_id;
  uint32_t idx;
  struct pfe_ct_ipsec_spd_t * _1;
  long unsigned int session_id.0_2;
  void * idx.1_3;
  struct pfe_if_db_entry_t * if_db_entry.2_4;
  struct pfe_ct_ipsec_spd_t * _5;
  long unsigned int session_id.3_6;

  <bb 2> [local count: 107374182]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  session_id = 0;
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG phy_if => 0B
  # DEBUG BEGIN_STMT
  if_db_entry = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG idx => 0
  goto <bb 10>; [100.00%]

  <bb 3> [local count: 966367641]:
  # DEBUG BEGIN_STMT
  _1 = pfe_spds[idx_7];
  if (_1 == 0B)
    goto <bb 4>; [30.00%]
  else
    goto <bb 5>; [70.00%]

  <bb 4> [local count: 289910292]:
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 9>; [100.00%]

  <bb 5> [local count: 676457349]:
  # DEBUG BEGIN_STMT
  # DEBUG phy_if => 0B
  # DEBUG BEGIN_STMT
  if_db_entry = 0B;
  # DEBUG BEGIN_STMT
  pfe_if_db_lock (&session_id);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  session_id.0_2 = session_id;
  idx.1_3 = (void *) idx_7;
  ret_21 = pfe_if_db_get_first (phy_if_db_19(D), session_id.0_2, 1, idx.1_3, &if_db_entry);
  # DEBUG ret => ret_21
  # DEBUG BEGIN_STMT
  if (ret_21 == 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 6> [local count: 338228674]:
  # DEBUG BEGIN_STMT
  if_db_entry.2_4 = if_db_entry;
  phy_if_22 = pfe_if_db_entry_get_phy_if (if_db_entry.2_4);
  # DEBUG phy_if => phy_if_22
  # DEBUG BEGIN_STMT
  if (phy_if_22 != 0B)
    goto <bb 7>; [53.47%]
  else
    goto <bb 8>; [46.53%]

  <bb 7> [local count: 180850872]:
  # DEBUG BEGIN_STMT
  pfe_spd_destroy_phyif (phy_if_22);

  <bb 8> [local count: 676457349]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = pfe_spds[idx_7];
  oal_mm_free (_5);
  # DEBUG BEGIN_STMT
  pfe_spds[idx_7] = 0B;
  # DEBUG BEGIN_STMT
  session_id.3_6 = session_id;
  pfe_if_db_unlock (session_id.3_6);

  <bb 9> [local count: 966367641]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  idx_27 = idx_7 + 1;
  # DEBUG idx => idx_27

  <bb 10> [local count: 1073741824]:
  # idx_7 = PHI <0(2), idx_27(9)>
  # DEBUG idx => idx_7
  # DEBUG BEGIN_STMT
  if (idx_7 != 9)
    goto <bb 3>; [90.00%]
  else
    goto <bb 11>; [10.00%]

  <bb 11> [local count: 107374182]:
  # DEBUG BEGIN_STMT
  class_ptr = 0B;
  session_id ={v} {CLOBBER};
  if_db_entry ={v} {CLOBBER};
  return;

}


pfe_spd_init (struct pfe_class_t * class)
{
  uint32_t idx;

  <bb 2> [local count: 107374182]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  class_ptr = class_4(D);
  # DEBUG BEGIN_STMT
  # DEBUG idx => 0
  goto <bb 4>; [100.00%]

  <bb 3> [local count: 966367641]:
  # DEBUG BEGIN_STMT
  pfe_spds[idx_1] = 0B;
  # DEBUG BEGIN_STMT
  idx_7 = idx_1 + 1;
  # DEBUG idx => idx_7

  <bb 4> [local count: 1073741824]:
  # idx_1 = PHI <0(2), idx_7(3)>
  # DEBUG idx => idx_1
  # DEBUG BEGIN_STMT
  if (idx_1 != 9)
    goto <bb 3>; [90.00%]
  else
    goto <bb 5>; [10.00%]

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

}


pfe_spd_destroy_phyif (struct pfe_phy_if_t * phy_if)
{
  uint32_t baddr;
  struct pfe_class_t * class_ptr.4_1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  baddr_5 = pfe_phy_if_get_spd (phy_if_3(D));
  # DEBUG baddr => baddr_5
  # DEBUG BEGIN_STMT
  class_ptr.4_1 = class_ptr;
  pfe_class_dmem_heap_free (class_ptr.4_1, baddr_5);
  # DEBUG BEGIN_STMT
  pfe_phy_if_set_spd (phy_if_3(D), 0);
  # DEBUG BEGIN_STMT
  return;

}


pfe_spd_update_phyif (struct pfe_phy_if_t * phy_if, struct pfe_ct_ipsec_spd_t * spd, const uint32_t size)
{
  uint32_t old_addr;
  addr_t dmem_addr;
  errno_t ret;
  struct pfe_class_t * class_ptr.7_1;
  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;
  struct pfe_class_t * class_ptr.8_12;
  struct pfe_class_t * class_ptr.9_13;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  class_ptr.7_1 = class_ptr;
  dmem_addr_19 = pfe_class_dmem_heap_alloc (class_ptr.7_1, size_17(D));
  # DEBUG dmem_addr => dmem_addr_19
  # DEBUG BEGIN_STMT
  if (dmem_addr_19 == 0)
    goto <bb 4>; [52.23%]
  else
    goto <bb 3>; [47.77%]

  <bb 3> [local count: 512926469]:
  # DEBUG BEGIN_STMT
  _2 = dmem_addr_19 + 12;
  _3 = _2 >> 24;
  _4 = _2 >> 8;
  _5 = _4 & 65280;
  _6 = _3 | _5;
  _7 = _2 << 8;
  _8 = _7 & 16711680;
  _9 = _6 | _8;
  _10 = _2 << 24;
  _11 = _9 | _10;
  spd_20(D)->entries = _11;
  # DEBUG BEGIN_STMT
  class_ptr.8_12 = class_ptr;
  pfe_class_write_dmem (class_ptr.8_12, -1, dmem_addr_19, spd_20(D), size_17(D));
  # DEBUG BEGIN_STMT
  old_addr_25 = pfe_phy_if_get_spd (phy_if_23(D));
  # DEBUG old_addr => old_addr_25
  # DEBUG BEGIN_STMT
  pfe_phy_if_set_spd (phy_if_23(D), dmem_addr_19);
  # DEBUG BEGIN_STMT
  class_ptr.9_13 = class_ptr;
  pfe_class_dmem_heap_free (class_ptr.9_13, old_addr_25);
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

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

}


