
Marking local functions: fci_qos_flow_entry_convert_from_gpi fci_qos_flow_entry_convert_to_gpi fci_qos_flow_entry_validate_and_fixup_masks fci_qos_flow_entry_validate_dip_sport_dport fci_validate_cmd_params fci_qos_get_gpi fci_qos_scheduler_cmd_query_get_sch fci_qos_scheduler_cmd_update_cfg_scheduler fci_qos_scheduler_cmd_update_set_mode fci_get_phy_if_by_name


Marking externally visible functions: fci_qos_policer_shp_cmd fci_qos_policer_wred_cmd fci_qos_policer_flow_cmd fci_qos_policer_cmd fci_qos_shaper_cmd fci_qos_scheduler_cmd fci_qos_queue_cmd


Marking externally visible variables:


Reclaiming functions:
Reclaiming variables:
Clearing address taken flags:
Symbol table:

pfe_gpi_shp_get_limits/106 (pfe_gpi_shp_get_limits) @0d810000
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_shp_cmd/41 
  Calls: 
pfe_gpi_shp_get_idle_slope/105 (pfe_gpi_shp_get_idle_slope) @0d802540
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_shp_cmd/41 
  Calls: 
pfe_gpi_shp_get_mode/104 (pfe_gpi_shp_get_mode) @0d802ee0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_shp_cmd/41 
  Calls: 
pfe_gpi_shp_get_type/103 (pfe_gpi_shp_get_type) @0d802e00
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_shp_cmd/41 
  Calls: 
pfe_gpi_shp_is_enabled/102 (pfe_gpi_shp_is_enabled) @0d802d20
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_shp_cmd/41 
  Calls: 
pfe_gpi_shp_set_limits/101 (pfe_gpi_shp_set_limits) @0d802c40
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_shp_cmd/41 
  Calls: 
pfe_gpi_shp_set_idle_slope/100 (pfe_gpi_shp_set_idle_slope) @0d802b60
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_shp_cmd/41 
  Calls: 
pfe_gpi_shp_set_mode/99 (pfe_gpi_shp_set_mode) @0d802a80
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_shp_cmd/41 
  Calls: 
pfe_gpi_shp_set_type/98 (pfe_gpi_shp_set_type) @0d8029a0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_shp_cmd/41 
  Calls: 
pfe_gpi_shp_disable/97 (pfe_gpi_shp_disable) @0d8028c0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_shp_cmd/41 
  Calls: 
pfe_gpi_shp_enable/96 (pfe_gpi_shp_enable) @0d8027e0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_shp_cmd/41 
  Calls: 
pfe_gpi_wred_get_prob/95 (pfe_gpi_wred_get_prob) @0d802460
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_wred_cmd/40 
  Calls: 
pfe_gpi_wred_get_thr/94 (pfe_gpi_wred_get_thr) @0d802380
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_wred_cmd/40 
  Calls: 
pfe_gpi_wred_is_enabled/93 (pfe_gpi_wred_is_enabled) @0d8022a0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_wred_cmd/40 
  Calls: 
pfe_gpi_wred_set_prob/92 (pfe_gpi_wred_set_prob) @0d8021c0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_wred_cmd/40 
  Calls: 
pfe_gpi_wred_set_thr/91 (pfe_gpi_wred_set_thr) @0d8020e0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_wred_cmd/40 
  Calls: 
pfe_gpi_wred_disable/90 (pfe_gpi_wred_disable) @0d802000
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_wred_cmd/40 
  Calls: 
pfe_gpi_wred_enable/89 (pfe_gpi_wred_enable) @0d7e2e00
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_wred_cmd/40 
  Calls: 
pfe_gpi_qos_get_next_flow/88 (pfe_gpi_qos_get_next_flow) @0d7e2700
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_flow_cmd/39 
  Calls: 
pfe_gpi_qos_get_first_flow/87 (pfe_gpi_qos_get_first_flow) @0d7e2620
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_flow_cmd/39 
  Calls: 
pfe_gpi_qos_rem_flow/86 (pfe_gpi_qos_rem_flow) @0d7e2540
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_flow_cmd/39 
  Calls: 
pfe_gpi_qos_add_flow/85 (pfe_gpi_qos_add_flow) @0d7e2460
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_flow_cmd/39 
  Calls: 
pfe_emac_get_gpi/84 (pfe_emac_get_gpi) @0d7e20e0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_get_gpi/32 
  Calls: 
pfe_phy_if_get_emac/83 (pfe_phy_if_get_emac) @0d7e2000
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_get_gpi/32 
  Calls: 
pfe_gpi_qos_is_enabled/82 (pfe_gpi_qos_is_enabled) @0d7cbee0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_cmd/34 
  Calls: 
pfe_gpi_qos_disable/81 (pfe_gpi_qos_disable) @0d7cbe00
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_cmd/34 
  Calls: 
pfe_gpi_qos_enable/80 (pfe_gpi_qos_enable) @0d7cbd20
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_cmd/34 
  Calls: 
pfe_tmu_shp_get_position/79 (pfe_tmu_shp_get_position) @0d7cbb60
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_shaper_cmd/31 
  Calls: 
pfe_tmu_shp_get_idle_slope/78 (pfe_tmu_shp_get_idle_slope) @0d7cba80
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_shaper_cmd/31 
  Calls: 
pfe_tmu_shp_get_limits/77 (pfe_tmu_shp_get_limits) @0d7cb9a0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_shaper_cmd/31 
  Calls: 
pfe_tmu_shp_get_rate_mode/76 (pfe_tmu_shp_get_rate_mode) @0d7cb8c0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_shaper_cmd/31 
  Calls: 
pfe_tmu_shp_set_idle_slope/75 (pfe_tmu_shp_set_idle_slope) @0d7cb7e0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_shaper_cmd/31 
  Calls: 
pfe_tmu_shp_set_limits/74 (pfe_tmu_shp_set_limits) @0d7cb700
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_shaper_cmd/31 
  Calls: 
pfe_tmu_shp_set_rate_mode/73 (pfe_tmu_shp_set_rate_mode) @0d7cb620
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_shaper_cmd/31 fci_qos_shaper_cmd/31 
  Calls: 
pfe_tmu_shp_enable/72 (pfe_tmu_shp_enable) @0d7cb540
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_shaper_cmd/31 
  Calls: 
pfe_tmu_shp_disable/71 (pfe_tmu_shp_disable) @0d7cb460
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_shaper_cmd/31 
  Calls: 
pfe_tmu_shp_set_position/70 (pfe_tmu_shp_set_position) @0d7cb380
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_shaper_cmd/31 fci_qos_shaper_cmd/31 
  Calls: 
pfe_tmu_check_shaper/69 (pfe_tmu_check_shaper) @0d7cb2a0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_shaper_cmd/31 fci_qos_shaper_cmd/31 
  Calls: 
pfe_tmu_sch_get_input_weight/68 (pfe_tmu_sch_get_input_weight) @0d78fc40
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_scheduler_cmd_query_get_sch/29 fci_qos_scheduler_cmd_query_get_sch/29 
  Calls: 
pfe_tmu_sch_get_bound_sch_output/67 (pfe_tmu_sch_get_bound_sch_output) @0d78f700
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_scheduler_cmd_query_get_sch/29 
  Calls: 
pfe_tmu_sch_get_bound_queue/66 (pfe_tmu_sch_get_bound_queue) @0d78fee0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_scheduler_cmd_query_get_sch/29 
  Calls: 
pfe_tmu_sch_get_algo/65 (pfe_tmu_sch_get_algo) @0d78fe00
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_scheduler_cmd_query_get_sch/29 
  Calls: 
pfe_tmu_sch_get_rate_mode/64 (pfe_tmu_sch_get_rate_mode) @0d78fd20
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_scheduler_cmd_query_get_sch/29 
  Calls: 
pfe_tmu_sch_set_input_weight/63 (pfe_tmu_sch_set_input_weight) @0d78fb60
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_scheduler_cmd_update_cfg_scheduler/28 
  Calls: 
pfe_tmu_sch_bind_sch_output/62 (pfe_tmu_sch_bind_sch_output) @0d78fa80
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_scheduler_cmd_update_cfg_scheduler/28 
  Calls: 
pfe_tmu_sch_bind_queue/61 (pfe_tmu_sch_bind_queue) @0d78f9a0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_scheduler_cmd_update_cfg_scheduler/28 fci_qos_scheduler_cmd_update_cfg_scheduler/28 
  Calls: 
pfe_tmu_sch_get_input_cnt/60 (pfe_tmu_sch_get_input_cnt) @0d78f8c0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_scheduler_cmd_query_get_sch/29 fci_qos_scheduler_cmd_update_cfg_scheduler/28 
  Calls: 
pfe_tmu_sch_set_algo/59 (pfe_tmu_sch_set_algo) @0d78f620
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_scheduler_cmd_update_set_mode/27 
  Calls: 
pfe_tmu_sch_set_rate_mode/58 (pfe_tmu_sch_set_rate_mode) @0d78f540
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_scheduler_cmd_update_set_mode/27 fci_qos_scheduler_cmd_update_set_mode/27 
  Calls: 
pfe_tmu_check_scheduler/57 (pfe_tmu_check_scheduler) @0d78f380
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_scheduler_cmd/30 fci_qos_scheduler_cmd/30 
  Calls: 
pfe_if_db_unlock/56 (pfe_if_db_unlock) @0d78f0e0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_get_phy_if_by_name/25 
  Calls: 
pfe_if_db_entry_get_phy_if/55 (pfe_if_db_entry_get_phy_if) @0d78f000
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_get_phy_if_by_name/25 
  Calls: 
pfe_if_db_get_first/54 (pfe_if_db_get_first) @0d75f700
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_get_phy_if_by_name/25 
  Calls: 
pfe_if_db_lock/53 (pfe_if_db_lock) @0d75f620
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_get_phy_if_by_name/25 
  Calls: 
pfe_tmu_queue_get_wred_prob/52 (pfe_tmu_queue_get_wred_prob) @0d75f000
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_queue_cmd/26 
  Calls: 
pfe_tmu_queue_get_wred_zones/51 (pfe_tmu_queue_get_wred_zones) @0d75fee0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_queue_cmd/26 
  Calls: 
pfe_tmu_queue_get_mode/50 (pfe_tmu_queue_get_mode) @0d75fe00
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_queue_cmd/26 
  Calls: 
strncpy/49 (strncpy) @0d75fd20
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_shp_cmd/41 fci_qos_policer_wred_cmd/40 fci_qos_policer_flow_cmd/39 fci_qos_policer_flow_cmd/39 fci_qos_policer_cmd/34 fci_qos_shaper_cmd/31 fci_qos_scheduler_cmd/30 fci_qos_queue_cmd/26 
  Calls: 
pfe_tmu_check_queue/48 (pfe_tmu_check_queue) @0d75fc40
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_queue_cmd/26 
  Calls: 
pfe_tmu_queue_set_wred_prob/47 (pfe_tmu_queue_set_wred_prob) @0d75fb60
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_queue_cmd/26 
  Calls: 
pfe_tmu_queue_set_mode/46 (pfe_tmu_queue_set_mode) @0d75fa80
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_queue_cmd/26 fci_qos_queue_cmd/26 
  Calls: 
pfe_tmu_queue_get_cnt/45 (pfe_tmu_queue_get_cnt) @0d75f9a0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_queue_cmd/26 fci_qos_queue_cmd/26 
  Calls: 
pfe_phy_if_get_id/44 (pfe_phy_if_get_id) @0d75f8c0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_shaper_cmd/31 fci_qos_shaper_cmd/31 fci_qos_shaper_cmd/31 fci_qos_shaper_cmd/31 fci_qos_shaper_cmd/31 fci_qos_shaper_cmd/31 fci_qos_shaper_cmd/31 fci_qos_shaper_cmd/31 fci_qos_shaper_cmd/31 fci_qos_shaper_cmd/31 fci_qos_shaper_cmd/31 fci_qos_shaper_cmd/31 fci_qos_shaper_cmd/31 fci_qos_shaper_cmd/31 fci_qos_shaper_cmd/31 fci_qos_scheduler_cmd_query_get_sch/29 fci_qos_scheduler_cmd_query_get_sch/29 fci_qos_scheduler_cmd_query_get_sch/29 fci_qos_scheduler_cmd_query_get_sch/29 fci_qos_scheduler_cmd_query_get_sch/29 fci_qos_scheduler_cmd_query_get_sch/29 fci_qos_scheduler_cmd_query_get_sch/29 fci_qos_scheduler_cmd_update_cfg_scheduler/28 fci_qos_scheduler_cmd_update_cfg_scheduler/28 fci_qos_scheduler_cmd_update_cfg_scheduler/28 fci_qos_scheduler_cmd_update_cfg_scheduler/28 fci_qos_scheduler_cmd_update_cfg_scheduler/28 fci_qos_scheduler_cmd_update_set_mode/27 fci_qos_scheduler_cmd_update_set_mode/27 fci_qos_scheduler_cmd_update_set_mode/27 fci_qos_scheduler_cmd/30 fci_qos_scheduler_cmd/30 fci_qos_scheduler_cmd/30 fci_qos_queue_cmd/26 fci_qos_queue_cmd/26 fci_qos_queue_cmd/26 fci_qos_queue_cmd/26 fci_qos_queue_cmd/26 fci_qos_queue_cmd/26 fci_qos_queue_cmd/26 fci_qos_queue_cmd/26 fci_qos_queue_cmd/26 fci_qos_queue_cmd/26 
  Calls: 
memset/43 (memset) @0d75f7e0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: fci_qos_policer_shp_cmd/41 fci_qos_policer_wred_cmd/40 fci_qos_policer_flow_cmd/39 fci_qos_policer_flow_cmd/39 fci_qos_policer_cmd/34 fci_qos_shaper_cmd/31 fci_qos_scheduler_cmd/30 fci_qos_queue_cmd/26 
  Calls: 
__context/42 (__context) @0d78c0d8
  Type: variable
  Body removed by symtab_remove_unreachable_nodes
  Visibility: external public
  References: 
  Referring: fci_qos_queue_cmd/26 (addr)fci_get_phy_if_by_name/25 (addr)fci_qos_scheduler_cmd/30 (addr)fci_qos_shaper_cmd/31 (addr)
  Availability: not_available
  Varpool flags:
fci_qos_policer_shp_cmd/41 (fci_qos_policer_shp_cmd) @0d75f1c0
  Type: function definition analyzed
  Visibility: externally_visible public
  References: 
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: pfe_gpi_shp_get_limits/106 pfe_gpi_shp_get_idle_slope/105 pfe_gpi_shp_get_mode/104 pfe_gpi_shp_get_type/103 pfe_gpi_shp_is_enabled/102 strncpy/49 pfe_gpi_shp_set_limits/101 pfe_gpi_shp_set_idle_slope/100 pfe_gpi_shp_set_mode/99 pfe_gpi_shp_set_type/98 pfe_gpi_shp_disable/97 pfe_gpi_shp_enable/96 fci_qos_get_gpi/32 fci_get_phy_if_by_name/25 memset/43 fci_validate_cmd_params/33 
fci_qos_policer_wred_cmd/40 (fci_qos_policer_wred_cmd) @0d739d20
  Type: function definition analyzed
  Visibility: externally_visible public
  References: 
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: pfe_gpi_wred_get_prob/95 pfe_gpi_wred_get_thr/94 pfe_gpi_wred_is_enabled/93 strncpy/49 pfe_gpi_wred_set_prob/92 pfe_gpi_wred_set_thr/91 pfe_gpi_wred_disable/90 pfe_gpi_wred_enable/89 fci_qos_get_gpi/32 fci_get_phy_if_by_name/25 memset/43 fci_validate_cmd_params/33 
fci_qos_policer_flow_cmd/39 (fci_qos_policer_flow_cmd) @0d7392a0
  Type: function definition analyzed
  Visibility: externally_visible public
  References: 
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: fci_qos_flow_entry_convert_from_gpi/38 pfe_gpi_qos_get_next_flow/88 strncpy/49 fci_qos_flow_entry_convert_from_gpi/38 pfe_gpi_qos_get_first_flow/87 strncpy/49 pfe_gpi_qos_rem_flow/86 pfe_gpi_qos_add_flow/85 fci_qos_flow_entry_validate_and_fixup_masks/36 fci_qos_flow_entry_convert_to_gpi/37 fci_qos_get_gpi/32 fci_get_phy_if_by_name/25 memset/43 fci_validate_cmd_params/33 memset/43 
fci_qos_flow_entry_convert_from_gpi/38 (fci_qos_flow_entry_convert_from_gpi) @0d739ee0
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: fci_qos_policer_flow_cmd/39 fci_qos_policer_flow_cmd/39 
  Calls: 
fci_qos_flow_entry_convert_to_gpi/37 (fci_qos_flow_entry_convert_to_gpi) @0d739c40
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: fci_qos_policer_flow_cmd/39 
  Calls: 
fci_qos_flow_entry_validate_and_fixup_masks/36 (fci_qos_flow_entry_validate_and_fixup_masks) @0d7399a0
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: fci_qos_policer_flow_cmd/39 
  Calls: fci_qos_flow_entry_validate_dip_sport_dport/35 
fci_qos_flow_entry_validate_dip_sport_dport/35 (fci_qos_flow_entry_validate_dip_sport_dport) @0d739700
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: fci_qos_flow_entry_validate_and_fixup_masks/36 
  Calls: 
fci_qos_policer_cmd/34 (fci_qos_policer_cmd) @0d739460
  Type: function definition analyzed
  Visibility: externally_visible public
  References: 
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: pfe_gpi_qos_is_enabled/82 strncpy/49 pfe_gpi_qos_disable/81 pfe_gpi_qos_enable/80 fci_qos_get_gpi/32 fci_get_phy_if_by_name/25 memset/43 fci_validate_cmd_params/33 
fci_validate_cmd_params/33 (fci_validate_cmd_params) @0d7391c0
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: fci_qos_policer_shp_cmd/41 fci_qos_policer_wred_cmd/40 fci_qos_policer_flow_cmd/39 fci_qos_policer_cmd/34 
  Calls: 
fci_qos_get_gpi/32 (fci_qos_get_gpi) @0777cee0
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: fci_qos_policer_shp_cmd/41 fci_qos_policer_wred_cmd/40 fci_qos_policer_flow_cmd/39 fci_qos_policer_cmd/34 
  Calls: pfe_emac_get_gpi/84 pfe_phy_if_get_emac/83 
fci_qos_shaper_cmd/31 (fci_qos_shaper_cmd) @0777c9a0
  Type: function definition analyzed
  Visibility: externally_visible public
  References: __context/42 (addr)
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: pfe_tmu_shp_get_position/79 pfe_phy_if_get_id/44 pfe_tmu_shp_get_idle_slope/78 pfe_phy_if_get_id/44 pfe_tmu_shp_get_limits/77 pfe_phy_if_get_id/44 pfe_tmu_shp_get_rate_mode/76 pfe_phy_if_get_id/44 strncpy/49 pfe_tmu_check_shaper/69 pfe_phy_if_get_id/44 fci_get_phy_if_by_name/25 pfe_tmu_shp_set_idle_slope/75 pfe_phy_if_get_id/44 pfe_tmu_shp_set_position/70 pfe_phy_if_get_id/44 pfe_tmu_shp_set_limits/74 pfe_phy_if_get_id/44 pfe_tmu_shp_set_rate_mode/73 pfe_phy_if_get_id/44 pfe_tmu_shp_set_rate_mode/73 pfe_phy_if_get_id/44 pfe_tmu_shp_enable/72 pfe_phy_if_get_id/44 pfe_tmu_shp_disable/71 pfe_phy_if_get_id/44 pfe_tmu_shp_set_position/70 pfe_phy_if_get_id/44 pfe_tmu_check_shaper/69 pfe_phy_if_get_id/44 pfe_phy_if_get_id/44 fci_get_phy_if_by_name/25 memset/43 
fci_qos_scheduler_cmd/30 (fci_qos_scheduler_cmd) @0777c460
  Type: function definition analyzed
  Visibility: externally_visible public
  References: __context/42 (addr)
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: fci_qos_scheduler_cmd_query_get_sch/29 strncpy/49 pfe_tmu_check_scheduler/57 pfe_phy_if_get_id/44 fci_get_phy_if_by_name/25 fci_qos_scheduler_cmd_update_cfg_scheduler/28 fci_qos_scheduler_cmd_update_set_mode/27 pfe_phy_if_get_id/44 pfe_tmu_check_scheduler/57 pfe_phy_if_get_id/44 fci_get_phy_if_by_name/25 memset/43 
fci_qos_scheduler_cmd_query_get_sch/29 (fci_qos_scheduler_cmd_query_get_sch) @0777ce00
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: fci_qos_scheduler_cmd/30 
  Calls: pfe_tmu_sch_get_input_weight/68 pfe_phy_if_get_id/44 pfe_tmu_sch_get_input_weight/68 pfe_phy_if_get_id/44 pfe_tmu_sch_get_bound_sch_output/67 pfe_phy_if_get_id/44 pfe_tmu_sch_get_bound_queue/66 pfe_phy_if_get_id/44 pfe_tmu_sch_get_input_cnt/60 pfe_phy_if_get_id/44 pfe_tmu_sch_get_algo/65 pfe_phy_if_get_id/44 pfe_tmu_sch_get_rate_mode/64 pfe_phy_if_get_id/44 
fci_qos_scheduler_cmd_update_cfg_scheduler/28 (fci_qos_scheduler_cmd_update_cfg_scheduler) @0777cb60
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: fci_qos_scheduler_cmd/30 
  Calls: pfe_tmu_sch_set_input_weight/63 pfe_phy_if_get_id/44 pfe_tmu_sch_bind_sch_output/62 pfe_phy_if_get_id/44 pfe_tmu_sch_bind_queue/61 pfe_phy_if_get_id/44 pfe_tmu_sch_bind_queue/61 pfe_phy_if_get_id/44 pfe_tmu_sch_get_input_cnt/60 pfe_phy_if_get_id/44 
fci_qos_scheduler_cmd_update_set_mode/27 (fci_qos_scheduler_cmd_update_set_mode) @0777c8c0
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: sch_algos/24 (read)
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: fci_qos_scheduler_cmd/30 
  Calls: pfe_tmu_sch_set_algo/59 pfe_phy_if_get_id/44 pfe_tmu_sch_set_rate_mode/58 pfe_phy_if_get_id/44 pfe_tmu_sch_set_rate_mode/58 pfe_phy_if_get_id/44 
fci_qos_queue_cmd/26 (fci_qos_queue_cmd) @0777c620
  Type: function definition analyzed
  Visibility: externally_visible public
  References: __context/42 (addr)fci_qmode_to_qmode/23 (read)
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: pfe_tmu_queue_get_wred_prob/52 pfe_phy_if_get_id/44 pfe_tmu_queue_get_wred_zones/51 pfe_phy_if_get_id/44 pfe_tmu_queue_get_mode/50 pfe_phy_if_get_id/44 strncpy/49 pfe_tmu_check_queue/48 pfe_phy_if_get_id/44 fci_get_phy_if_by_name/25 pfe_tmu_queue_set_wred_prob/47 pfe_phy_if_get_id/44 pfe_tmu_queue_get_cnt/45 pfe_phy_if_get_id/44 pfe_tmu_queue_set_mode/46 pfe_phy_if_get_id/44 pfe_tmu_queue_set_mode/46 pfe_phy_if_get_id/44 pfe_tmu_queue_get_cnt/45 pfe_phy_if_get_id/44 pfe_phy_if_get_id/44 fci_get_phy_if_by_name/25 memset/43 
fci_get_phy_if_by_name/25 (fci_get_phy_if_by_name) @0777c380
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: __context/42 (addr)
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: fci_qos_policer_shp_cmd/41 fci_qos_policer_wred_cmd/40 fci_qos_policer_flow_cmd/39 fci_qos_policer_cmd/34 fci_qos_shaper_cmd/31 fci_qos_shaper_cmd/31 fci_qos_scheduler_cmd/30 fci_qos_scheduler_cmd/30 fci_qos_queue_cmd/26 fci_qos_queue_cmd/26 
  Calls: pfe_if_db_unlock/56 pfe_if_db_entry_get_phy_if/55 pfe_if_db_get_first/54 pfe_if_db_lock/53 
sch_algos/24 (sch_algos) @077743f0
  Type: variable definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: fci_qos_scheduler_cmd_update_set_mode/27 (read)
  Availability: available
  Varpool flags: initialized read-only const-value-known
fci_qmode_to_qmode/23 (fci_qmode_to_qmode) @07774360
  Type: variable definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: fci_qos_queue_cmd/26 (read)
  Availability: available
  Varpool flags: initialized read-only const-value-known
fci_qos_policer_shp_cmd (struct fci_msg_t * msg, uint16_t * fci_ret, struct fpp_qos_policer_shp_cmd_t * reply_buf, uint32_t * reply_len)
{
  errno_t ret;
  struct pfe_gpi_t * gpi;
  struct pfe_phy_if_t * phy_if;
  uint32_t shp_isl;
  int32_t shp_min_credit;
  int32_t shp_max_credit;
  fpp_iqos_shp_rate_mode_t shp_mode;
  fpp_iqos_shp_type_t shp_type;
  uint8_t shp_id;
  struct fpp_qos_policer_shp_cmd_t * shp_cmd;
  errno_t D.13425;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  shp_max_credit = 0;
  # DEBUG BEGIN_STMT
  shp_min_credit = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  MEM[(void *)&shp_type] = 0;
  # DEBUG BEGIN_STMT
  MEM[(void *)&shp_mode] = 0;
  # DEBUG BEGIN_STMT
  ret = fci_validate_cmd_params (msg, fci_ret, reply_buf, reply_len, 36);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 33>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  *reply_len = 0;
  # DEBUG BEGIN_STMT
  memset (reply_buf, 0, 36);
  # DEBUG BEGIN_STMT
  shp_cmd = &msg->msg_cmd.payload;
  # DEBUG BEGIN_STMT
  _1 = &shp_cmd->if_name;
  phy_if = fci_get_phy_if_by_name (_1);
  # DEBUG BEGIN_STMT
  if (phy_if == 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 2;
  goto <bb 33>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  gpi = fci_qos_get_gpi (phy_if);
  # DEBUG BEGIN_STMT
  if (gpi == 0B)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 2;
  goto <bb 33>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  shp_id = shp_cmd->id;
  # DEBUG BEGIN_STMT
  if (shp_id > 1)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 22;
  goto <bb 33>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  # DEBUG BEGIN_STMT
  _2 = shp_cmd->action;
  _3 = (int) _2;
  switch (_3) <default: <L32> [INV], case 4: <L7> [INV], case 6: <L23> [INV]>

  <bb 10> :
<L7>:
  # DEBUG BEGIN_STMT
  _4 = shp_cmd->enable;
  if (_4 != 0)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  ret = pfe_gpi_shp_enable (gpi, shp_id);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 14>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  ret = pfe_gpi_shp_disable (gpi, shp_id);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 13>; [INV]
  else
    goto <bb 33>; [INV]

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

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

  <bb 15> :
  # DEBUG BEGIN_STMT
  _5 = shp_cmd->type;
  shp_type = _5;
  # DEBUG BEGIN_STMT
  _6 = shp_cmd->mode;
  shp_mode = _6;
  # DEBUG BEGIN_STMT
  _7 = shp_cmd->isl;
  _8 = _7 >> 24;
  _9 = shp_cmd->isl;
  _10 = _9 >> 8;
  _11 = _10 & 65280;
  _12 = _8 | _11;
  _13 = shp_cmd->isl;
  _14 = _13 << 8;
  _15 = _14 & 16711680;
  _16 = _12 | _15;
  _17 = shp_cmd->isl;
  _18 = _17 << 24;
  _19 = _16 | _18;
  shp_isl = _19;
  # DEBUG BEGIN_STMT
  _20 = shp_cmd->max_credit;
  _21 = (long unsigned int) _20;
  _22 = _21 >> 24;
  _23 = shp_cmd->max_credit;
  _24 = (long unsigned int) _23;
  _25 = _24 >> 8;
  _26 = _25 & 65280;
  _27 = _22 | _26;
  _28 = shp_cmd->max_credit;
  _29 = (long unsigned int) _28;
  _30 = _29 << 8;
  _31 = _30 & 16711680;
  _32 = _27 | _31;
  _33 = shp_cmd->max_credit;
  _34 = (long unsigned int) _33;
  _35 = _34 << 24;
  _36 = _32 | _35;
  _37 = (long int) _36;
  shp_max_credit = _37;
  # DEBUG BEGIN_STMT
  _38 = shp_cmd->min_credit;
  _39 = (long unsigned int) _38;
  _40 = _39 >> 24;
  _41 = shp_cmd->min_credit;
  _42 = (long unsigned int) _41;
  _43 = _42 >> 8;
  _44 = _43 & 65280;
  _45 = _40 | _44;
  _46 = shp_cmd->min_credit;
  _47 = (long unsigned int) _46;
  _48 = _47 << 8;
  _49 = _48 & 16711680;
  _50 = _45 | _49;
  _51 = shp_cmd->min_credit;
  _52 = (long unsigned int) _51;
  _53 = _52 << 24;
  _54 = _50 | _53;
  _55 = (long int) _54;
  shp_min_credit = _55;
  # DEBUG BEGIN_STMT
  shp_type.35_56 = shp_type;
  ret = pfe_gpi_shp_set_type (gpi, shp_id, shp_type.35_56);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 16>; [INV]
  else
    goto <bb 17>; [INV]

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

  <bb 17> :
  # DEBUG BEGIN_STMT
  shp_mode.36_57 = shp_mode;
  ret = pfe_gpi_shp_set_mode (gpi, shp_id, shp_mode.36_57);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 18>; [INV]
  else
    goto <bb 19>; [INV]

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

  <bb 19> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  shp_isl.37_58 = shp_isl;
  ret = pfe_gpi_shp_set_idle_slope (gpi, shp_id, shp_isl.37_58);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 20>; [INV]
  else
    goto <bb 21>; [INV]

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

  <bb 21> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  shp_max_credit.38_59 = shp_max_credit;
  shp_min_credit.39_60 = shp_min_credit;
  ret = pfe_gpi_shp_set_limits (gpi, shp_id, shp_max_credit.38_59, shp_min_credit.39_60);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 22>; [INV]
  else
    goto <bb 33>; [INV]

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

  <bb 23> :
<L23>:
  # DEBUG BEGIN_STMT
  _61 = shp_cmd->action;
  reply_buf->action = _61;
  # DEBUG BEGIN_STMT
  _62 = &reply_buf->if_name;
  _63 = &shp_cmd->if_name;
  strncpy (_62, _63, 16);
  # DEBUG BEGIN_STMT
  reply_buf->if_name[15] = 0;
  # DEBUG BEGIN_STMT
  reply_buf->id = shp_id;
  # DEBUG BEGIN_STMT
  _64 = pfe_gpi_shp_is_enabled (gpi, shp_id);
  reply_buf->enable = _64;
  # DEBUG BEGIN_STMT
  ret = pfe_gpi_shp_get_type (gpi, shp_id, &shp_type);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 24>; [INV]
  else
    goto <bb 25>; [INV]

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

  <bb 25> :
  # DEBUG BEGIN_STMT
  ret = pfe_gpi_shp_get_mode (gpi, shp_id, &shp_mode);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 26>; [INV]
  else
    goto <bb 27>; [INV]

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

  <bb 27> :
  # DEBUG BEGIN_STMT
  ret = pfe_gpi_shp_get_idle_slope (gpi, shp_id, &shp_isl);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 28>; [INV]
  else
    goto <bb 29>; [INV]

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

  <bb 29> :
  # DEBUG BEGIN_STMT
  ret = pfe_gpi_shp_get_limits (gpi, shp_id, &shp_max_credit, &shp_min_credit);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 30>; [INV]
  else
    goto <bb 31>; [INV]

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

  <bb 31> :
  # DEBUG BEGIN_STMT
  shp_type.40_65 = shp_type;
  reply_buf->type = shp_type.40_65;
  # DEBUG BEGIN_STMT
  shp_mode.41_66 = shp_mode;
  reply_buf->mode = shp_mode.41_66;
  # DEBUG BEGIN_STMT
  shp_isl.42_67 = shp_isl;
  _68 = shp_isl.42_67 >> 24;
  shp_isl.43_69 = shp_isl;
  _70 = shp_isl.43_69 >> 8;
  _71 = _70 & 65280;
  _72 = _68 | _71;
  shp_isl.44_73 = shp_isl;
  _74 = shp_isl.44_73 << 8;
  _75 = _74 & 16711680;
  _76 = _72 | _75;
  shp_isl.45_77 = shp_isl;
  _78 = shp_isl.45_77 << 24;
  _79 = _76 | _78;
  reply_buf->isl = _79;
  # DEBUG BEGIN_STMT
  shp_max_credit.46_80 = shp_max_credit;
  shp_max_credit.47_81 = (long unsigned int) shp_max_credit.46_80;
  _82 = shp_max_credit.47_81 >> 24;
  shp_max_credit.48_83 = shp_max_credit;
  shp_max_credit.49_84 = (long unsigned int) shp_max_credit.48_83;
  _85 = shp_max_credit.49_84 >> 8;
  _86 = _85 & 65280;
  _87 = _82 | _86;
  shp_max_credit.50_88 = shp_max_credit;
  shp_max_credit.51_89 = (long unsigned int) shp_max_credit.50_88;
  _90 = shp_max_credit.51_89 << 8;
  _91 = _90 & 16711680;
  _92 = _87 | _91;
  shp_max_credit.52_93 = shp_max_credit;
  shp_max_credit.53_94 = (long unsigned int) shp_max_credit.52_93;
  _95 = shp_max_credit.53_94 << 24;
  _96 = _92 | _95;
  _97 = (long int) _96;
  reply_buf->max_credit = _97;
  # DEBUG BEGIN_STMT
  shp_min_credit.54_98 = shp_min_credit;
  shp_min_credit.55_99 = (long unsigned int) shp_min_credit.54_98;
  _100 = shp_min_credit.55_99 >> 24;
  shp_min_credit.56_101 = shp_min_credit;
  shp_min_credit.57_102 = (long unsigned int) shp_min_credit.56_101;
  _103 = shp_min_credit.57_102 >> 8;
  _104 = _103 & 65280;
  _105 = _100 | _104;
  shp_min_credit.58_106 = shp_min_credit;
  shp_min_credit.59_107 = (long unsigned int) shp_min_credit.58_106;
  _108 = shp_min_credit.59_107 << 8;
  _109 = _108 & 16711680;
  _110 = _105 | _109;
  shp_min_credit.60_111 = shp_min_credit;
  shp_min_credit.61_112 = (long unsigned int) shp_min_credit.60_111;
  _113 = shp_min_credit.61_112 << 24;
  _114 = _110 | _113;
  _115 = (long int) _114;
  reply_buf->min_credit = _115;
  # DEBUG BEGIN_STMT
  *reply_len = 36;
  # DEBUG BEGIN_STMT
  goto <bb 33>; [INV]

  <bb 32> :
<L32>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 4;
  # DEBUG BEGIN_STMT

  <bb 33> :
  # DEBUG BEGIN_STMT
  D.13425 = ret;
  shp_type = {CLOBBER};
  shp_mode = {CLOBBER};
  shp_max_credit = {CLOBBER};
  shp_min_credit = {CLOBBER};
  shp_isl = {CLOBBER};
  return D.13425;

}


fci_qos_policer_wred_cmd (struct fci_msg_t * msg, uint16_t * fci_ret, struct fpp_qos_policer_wred_cmd_t * reply_buf, uint32_t * reply_len)
{
  uint32_t i;
  errno_t ret;
  struct pfe_gpi_t * gpi;
  struct pfe_phy_if_t * phy_if;
  uint16_t wred_thr;
  fpp_iqos_queue_t queue;
  struct fpp_qos_policer_wred_cmd_t * wred_cmd;
  errno_t D.13388;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = fci_validate_cmd_params (msg, fci_ret, reply_buf, reply_len, 32);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 41>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  *reply_len = 0;
  # DEBUG BEGIN_STMT
  memset (reply_buf, 0, 32);
  # DEBUG BEGIN_STMT
  wred_cmd = &msg->msg_cmd.payload;
  # DEBUG BEGIN_STMT
  _1 = &wred_cmd->if_name;
  phy_if = fci_get_phy_if_by_name (_1);
  # DEBUG BEGIN_STMT
  if (phy_if == 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 2;
  goto <bb 41>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  gpi = fci_qos_get_gpi (phy_if);
  # DEBUG BEGIN_STMT
  if (gpi == 0B)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 2;
  goto <bb 41>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  queue = wred_cmd->queue;
  # DEBUG BEGIN_STMT
  if (queue > 2)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 22;
  goto <bb 41>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  # DEBUG BEGIN_STMT
  _2 = wred_cmd->action;
  _3 = (int) _2;
  switch (_3) <default: <L44> [INV], case 4: <L7> [INV], case 6: <L33> [INV]>

  <bb 10> :
<L7>:
  # DEBUG BEGIN_STMT
  _4 = wred_cmd->enable;
  if (_4 != 0)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  ret = pfe_gpi_wred_enable (gpi, queue);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 14>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  ret = pfe_gpi_wred_disable (gpi, queue);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 13>; [INV]
  else
    goto <bb 41>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  *fci_ret = 65535;
  goto <bb 41>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  *fci_ret = 65535;
  # DEBUG BEGIN_STMT
  goto <bb 41>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  i = 0;
  goto <bb 19>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  _5 = wred_cmd->thr[i];
  _6 = _5 r>> 8;
  wred_thr = _6;
  # DEBUG BEGIN_STMT
  wred_thr.32_7 = wred_thr;
  if (wred_thr.32_7 == 65535)
    goto <bb 18>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 17> :
  # DEBUG BEGIN_STMT
  _8 = (<unnamed type>) i;
  wred_thr.33_9 = wred_thr;
  ret = pfe_gpi_wred_set_thr (gpi, queue, _8, wred_thr.33_9);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 20>; [INV]
  else
    goto <bb 18>; [INV]

  <bb 18> :
  # DEBUG BEGIN_STMT
  i = i + 1;

  <bb 19> :
  # DEBUG BEGIN_STMT
  if (i <= 2)
    goto <bb 16>; [INV]
  else
    goto <bb 20>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 21>; [INV]
  else
    goto <bb 22>; [INV]

  <bb 21> :
  # DEBUG BEGIN_STMT
  *fci_ret = 65535;
  # DEBUG BEGIN_STMT
  goto <bb 41>; [INV]

  <bb 22> :
  # DEBUG BEGIN_STMT
  i = 0;
  goto <bb 26>; [INV]

  <bb 23> :
  # DEBUG BEGIN_STMT
  _10 = wred_cmd->zprob[i];
  if (_10 == 255)
    goto <bb 25>; [INV]
  else
    goto <bb 24>; [INV]

  <bb 24> :
  # DEBUG BEGIN_STMT
  _11 = (<unnamed type>) i;
  _12 = wred_cmd->zprob[i];
  ret = pfe_gpi_wred_set_prob (gpi, queue, _11, _12);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 27>; [INV]
  else
    goto <bb 25>; [INV]

  <bb 25> :
  # DEBUG BEGIN_STMT
  i = i + 1;

  <bb 26> :
  # DEBUG BEGIN_STMT
  if (i <= 3)
    goto <bb 23>; [INV]
  else
    goto <bb 27>; [INV]

  <bb 27> :
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 28>; [INV]
  else
    goto <bb 41>; [INV]

  <bb 28> :
  # DEBUG BEGIN_STMT
  *fci_ret = 65535;
  # DEBUG BEGIN_STMT
  goto <bb 41>; [INV]

  <bb 29> :
<L33>:
  # DEBUG BEGIN_STMT
  _13 = wred_cmd->action;
  reply_buf->action = _13;
  # DEBUG BEGIN_STMT
  _14 = &reply_buf->if_name;
  _15 = &wred_cmd->if_name;
  strncpy (_14, _15, 16);
  # DEBUG BEGIN_STMT
  reply_buf->if_name[15] = 0;
  # DEBUG BEGIN_STMT
  reply_buf->queue = queue;
  # DEBUG BEGIN_STMT
  _16 = pfe_gpi_wred_is_enabled (gpi, queue);
  reply_buf->enable = _16;
  # DEBUG BEGIN_STMT
  i = 0;
  goto <bb 33>; [INV]

  <bb 30> :
  # DEBUG BEGIN_STMT
  _17 = (<unnamed type>) i;
  ret = pfe_gpi_wred_get_thr (gpi, queue, _17, &wred_thr);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 31>; [INV]
  else
    goto <bb 32>; [INV]

  <bb 31> :
  # DEBUG BEGIN_STMT
  *fci_ret = 65535;
  # DEBUG BEGIN_STMT
  goto <bb 34>; [INV]

  <bb 32> :
  # DEBUG BEGIN_STMT
  wred_thr.34_18 = wred_thr;
  _19 = wred_thr.34_18 r>> 8;
  reply_buf->thr[i] = _19;
  # DEBUG BEGIN_STMT
  i = i + 1;

  <bb 33> :
  # DEBUG BEGIN_STMT
  if (i <= 2)
    goto <bb 30>; [INV]
  else
    goto <bb 34>; [INV]

  <bb 34> :
  # DEBUG BEGIN_STMT
  i = 0;
  goto <bb 38>; [INV]

  <bb 35> :
  # DEBUG BEGIN_STMT
  _20 = (<unnamed type>) i;
  _21 = &reply_buf->zprob[i];
  ret = pfe_gpi_wred_get_prob (gpi, queue, _20, _21);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 36>; [INV]
  else
    goto <bb 37>; [INV]

  <bb 36> :
  # DEBUG BEGIN_STMT
  *fci_ret = 65535;
  # DEBUG BEGIN_STMT
  goto <bb 39>; [INV]

  <bb 37> :
  # DEBUG BEGIN_STMT
  i = i + 1;

  <bb 38> :
  # DEBUG BEGIN_STMT
  if (i <= 3)
    goto <bb 35>; [INV]
  else
    goto <bb 39>; [INV]

  <bb 39> :
  # DEBUG BEGIN_STMT
  *reply_len = 32;
  # DEBUG BEGIN_STMT
  goto <bb 41>; [INV]

  <bb 40> :
<L44>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 4;
  # DEBUG BEGIN_STMT

  <bb 41> :
  # DEBUG BEGIN_STMT
  D.13388 = ret;
  wred_thr = {CLOBBER};
  return D.13388;

}


fci_qos_policer_flow_cmd (struct fci_msg_t * msg, uint16_t * fci_ret, struct fpp_qos_policer_flow_cmd_t * reply_buf, uint32_t * reply_len)
{
  errno_t ret;
  struct pfe_gpi_t * gpi;
  struct pfe_phy_if_t * phy_if;
  struct pfe_iqos_flow_spec_t gpi_flow;
  struct fpp_qos_policer_flow_cmd_t * flow_cmd;
  errno_t D.13302;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  phy_if = 0B;
  # DEBUG BEGIN_STMT
  gpi = 0B;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  memset (&gpi_flow, 0, 36);
  # DEBUG BEGIN_STMT
  ret = fci_validate_cmd_params (msg, fci_ret, reply_buf, reply_len, 56);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 27>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  *reply_len = 0;
  # DEBUG BEGIN_STMT
  memset (reply_buf, 0, 56);
  # DEBUG BEGIN_STMT
  flow_cmd = &msg->msg_cmd.payload;
  # DEBUG BEGIN_STMT
  _1 = &flow_cmd->if_name;
  phy_if = fci_get_phy_if_by_name (_1);
  # DEBUG BEGIN_STMT
  if (phy_if == 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 2;
  goto <bb 27>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  gpi = fci_qos_get_gpi (phy_if);
  # DEBUG BEGIN_STMT
  if (gpi == 0B)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 2;
  goto <bb 27>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  # DEBUG BEGIN_STMT
  _2 = flow_cmd->action;
  _3 = (int) _2;
  switch (_3) <default: <L25> [INV], case 0: <L5> [INV], case 1: <L14> [INV], case 6: <L19> [INV], case 7: <L22> [INV]>

  <bb 8> :
<L5>:
  # DEBUG BEGIN_STMT
  _4 = &flow_cmd->flow;
  fci_qos_flow_entry_convert_to_gpi (_4, &gpi_flow);
  # DEBUG BEGIN_STMT
  ret = fci_qos_flow_entry_validate_and_fixup_masks (&gpi_flow);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  goto <bb 27>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _5 = flow_cmd->id;
  _6 = _5 + 192;
  if (_6 <= 190)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  goto <bb 27>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  _7 = flow_cmd->id;
  ret = pfe_gpi_qos_add_flow (gpi, _7, &gpi_flow);
  # DEBUG BEGIN_STMT
  if (ret == 75)
    goto <bb 13>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  *fci_ret = 62529;
  # DEBUG BEGIN_STMT
  goto <bb 27>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 15>; [INV]
  else
    goto <bb 27>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  *fci_ret = 65535;
  # DEBUG BEGIN_STMT
  goto <bb 27>; [INV]

  <bb 16> :
<L14>:
  # DEBUG BEGIN_STMT
  _8 = flow_cmd->id;
  if (_8 > 63)
    goto <bb 17>; [INV]
  else
    goto <bb 18>; [INV]

  <bb 17> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  goto <bb 27>; [INV]

  <bb 18> :
  # DEBUG BEGIN_STMT
  _9 = flow_cmd->id;
  ret = pfe_gpi_qos_rem_flow (gpi, _9);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 19>; [INV]
  else
    goto <bb 27>; [INV]

  <bb 19> :
  # DEBUG BEGIN_STMT
  *fci_ret = 65535;
  goto <bb 27>; [INV]

  <bb 20> :
<L19>:
  # DEBUG BEGIN_STMT
  _10 = flow_cmd->action;
  reply_buf->action = _10;
  # DEBUG BEGIN_STMT
  _11 = &reply_buf->if_name;
  _12 = &flow_cmd->if_name;
  strncpy (_11, _12, 16);
  # DEBUG BEGIN_STMT
  reply_buf->if_name[15] = 0;
  # DEBUG BEGIN_STMT
  _13 = &reply_buf->id;
  ret = pfe_gpi_qos_get_first_flow (gpi, _13, &gpi_flow);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 21>; [INV]
  else
    goto <bb 22>; [INV]

  <bb 21> :
  # DEBUG BEGIN_STMT
  *fci_ret = 62530;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 27>; [INV]

  <bb 22> :
  # DEBUG BEGIN_STMT
  _14 = &reply_buf->flow;
  fci_qos_flow_entry_convert_from_gpi (&gpi_flow, _14);
  # DEBUG BEGIN_STMT
  *reply_len = 56;
  # DEBUG BEGIN_STMT
  goto <bb 27>; [INV]

  <bb 23> :
<L22>:
  # DEBUG BEGIN_STMT
  _15 = flow_cmd->action;
  reply_buf->action = _15;
  # DEBUG BEGIN_STMT
  _16 = &reply_buf->if_name;
  _17 = &flow_cmd->if_name;
  strncpy (_16, _17, 16);
  # DEBUG BEGIN_STMT
  reply_buf->if_name[15] = 0;
  # DEBUG BEGIN_STMT
  _18 = &reply_buf->id;
  ret = pfe_gpi_qos_get_next_flow (gpi, _18, &gpi_flow);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 24>; [INV]
  else
    goto <bb 25>; [INV]

  <bb 24> :
  # DEBUG BEGIN_STMT
  *fci_ret = 62530;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 27>; [INV]

  <bb 25> :
  # DEBUG BEGIN_STMT
  _19 = &reply_buf->flow;
  fci_qos_flow_entry_convert_from_gpi (&gpi_flow, _19);
  # DEBUG BEGIN_STMT
  *reply_len = 56;
  # DEBUG BEGIN_STMT
  goto <bb 27>; [INV]

  <bb 26> :
<L25>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 4;
  # DEBUG BEGIN_STMT

  <bb 27> :
  # DEBUG BEGIN_STMT
  D.13302 = ret;
  gpi_flow = {CLOBBER};
  return D.13302;

}


fci_qos_flow_entry_convert_from_gpi (const struct pfe_iqos_flow_spec_t * gpi_flow, struct fpp_iqos_flow_spec_t * flow)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = gpi_flow->type_mask;
  _2 = _1 r>> 8;
  flow->type_mask = _2;
  # DEBUG BEGIN_STMT
  _3 = gpi_flow->arg_type_mask;
  _4 = _3 r>> 8;
  flow->arg_type_mask = _4;
  # DEBUG BEGIN_STMT
  _5 = gpi_flow->action;
  flow->action = _5;
  # DEBUG BEGIN_STMT
  _6 = gpi_flow->args.vlan;
  _7 = _6 r>> 8;
  flow->args.vlan = _7;
  # DEBUG BEGIN_STMT
  _8 = gpi_flow->args.vlan_m;
  _9 = _8 r>> 8;
  flow->args.vlan_m = _9;
  # DEBUG BEGIN_STMT
  _10 = gpi_flow->args.sport_max;
  _11 = _10 r>> 8;
  flow->args.sport_max = _11;
  # DEBUG BEGIN_STMT
  _12 = gpi_flow->args.sport_min;
  _13 = _12 r>> 8;
  flow->args.sport_min = _13;
  # DEBUG BEGIN_STMT
  _14 = gpi_flow->args.dport_max;
  _15 = _14 r>> 8;
  flow->args.dport_max = _15;
  # DEBUG BEGIN_STMT
  _16 = gpi_flow->args.dport_min;
  _17 = _16 r>> 8;
  flow->args.dport_min = _17;
  # DEBUG BEGIN_STMT
  _18 = gpi_flow->args.sip;
  _19 = _18 >> 24;
  _20 = gpi_flow->args.sip;
  _21 = _20 >> 8;
  _22 = _21 & 65280;
  _23 = _19 | _22;
  _24 = gpi_flow->args.sip;
  _25 = _24 << 8;
  _26 = _25 & 16711680;
  _27 = _23 | _26;
  _28 = gpi_flow->args.sip;
  _29 = _28 << 24;
  _30 = _27 | _29;
  flow->args.sip = _30;
  # DEBUG BEGIN_STMT
  _31 = gpi_flow->args.dip;
  _32 = _31 >> 24;
  _33 = gpi_flow->args.dip;
  _34 = _33 >> 8;
  _35 = _34 & 65280;
  _36 = _32 | _35;
  _37 = gpi_flow->args.dip;
  _38 = _37 << 8;
  _39 = _38 & 16711680;
  _40 = _36 | _39;
  _41 = gpi_flow->args.dip;
  _42 = _41 << 24;
  _43 = _40 | _42;
  flow->args.dip = _43;
  # DEBUG BEGIN_STMT
  _44 = gpi_flow->args.tos;
  flow->args.tos = _44;
  # DEBUG BEGIN_STMT
  _45 = gpi_flow->args.tos_m;
  flow->args.tos_m = _45;
  # DEBUG BEGIN_STMT
  _46 = gpi_flow->args.l4proto;
  flow->args.l4proto = _46;
  # DEBUG BEGIN_STMT
  _47 = gpi_flow->args.l4proto_m;
  flow->args.l4proto_m = _47;
  # DEBUG BEGIN_STMT
  _48 = gpi_flow->args.sip_m;
  flow->args.sip_m = _48;
  # DEBUG BEGIN_STMT
  _49 = gpi_flow->args.dip_m;
  flow->args.dip_m = _49;
  return;

}


fci_qos_flow_entry_convert_to_gpi (const struct fpp_iqos_flow_spec_t * flow, struct pfe_iqos_flow_spec_t * gpi_flow)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = flow->type_mask;
  _2 = _1 r>> 8;
  gpi_flow->type_mask = _2;
  # DEBUG BEGIN_STMT
  _3 = flow->arg_type_mask;
  _4 = _3 r>> 8;
  gpi_flow->arg_type_mask = _4;
  # DEBUG BEGIN_STMT
  _5 = flow->action;
  gpi_flow->action = _5;
  # DEBUG BEGIN_STMT
  _6 = flow->args.vlan;
  _7 = _6 r>> 8;
  gpi_flow->args.vlan = _7;
  # DEBUG BEGIN_STMT
  _8 = flow->args.vlan_m;
  _9 = _8 r>> 8;
  gpi_flow->args.vlan_m = _9;
  # DEBUG BEGIN_STMT
  _10 = flow->args.sport_max;
  _11 = _10 r>> 8;
  gpi_flow->args.sport_max = _11;
  # DEBUG BEGIN_STMT
  _12 = flow->args.sport_min;
  _13 = _12 r>> 8;
  gpi_flow->args.sport_min = _13;
  # DEBUG BEGIN_STMT
  _14 = flow->args.dport_max;
  _15 = _14 r>> 8;
  gpi_flow->args.dport_max = _15;
  # DEBUG BEGIN_STMT
  _16 = flow->args.dport_min;
  _17 = _16 r>> 8;
  gpi_flow->args.dport_min = _17;
  # DEBUG BEGIN_STMT
  _18 = flow->args.sip;
  _19 = _18 >> 24;
  _20 = flow->args.sip;
  _21 = _20 >> 8;
  _22 = _21 & 65280;
  _23 = _19 | _22;
  _24 = flow->args.sip;
  _25 = _24 << 8;
  _26 = _25 & 16711680;
  _27 = _23 | _26;
  _28 = flow->args.sip;
  _29 = _28 << 24;
  _30 = _27 | _29;
  gpi_flow->args.sip = _30;
  # DEBUG BEGIN_STMT
  _31 = flow->args.dip;
  _32 = _31 >> 24;
  _33 = flow->args.dip;
  _34 = _33 >> 8;
  _35 = _34 & 65280;
  _36 = _32 | _35;
  _37 = flow->args.dip;
  _38 = _37 << 8;
  _39 = _38 & 16711680;
  _40 = _36 | _39;
  _41 = flow->args.dip;
  _42 = _41 << 24;
  _43 = _40 | _42;
  gpi_flow->args.dip = _43;
  # DEBUG BEGIN_STMT
  _44 = flow->args.tos;
  gpi_flow->args.tos = _44;
  # DEBUG BEGIN_STMT
  _45 = flow->args.tos_m;
  gpi_flow->args.tos_m = _45;
  # DEBUG BEGIN_STMT
  _46 = flow->args.l4proto;
  gpi_flow->args.l4proto = _46;
  # DEBUG BEGIN_STMT
  _47 = flow->args.l4proto_m;
  gpi_flow->args.l4proto_m = _47;
  # DEBUG BEGIN_STMT
  _48 = flow->args.sip_m;
  gpi_flow->args.sip_m = _48;
  # DEBUG BEGIN_STMT
  _49 = flow->args.dip_m;
  gpi_flow->args.dip_m = _49;
  return;

}


fci_qos_flow_entry_validate_and_fixup_masks (struct pfe_iqos_flow_spec_t * flow)
{
  errno_t ret;
  struct pfe_iqos_flow_args_t * args;
  errno_t D.13334;

  <bb 2> :
  # DEBUG BEGIN_STMT
  args = &flow->args;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  _1 = flow->type_mask;
  if (_1 > 511)
    goto <bb 5>; [INV]
  else
    goto <bb 3>; [INV]

  <bb 3> :
  _2 = flow->arg_type_mask;
  if (_2 > 127)
    goto <bb 5>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 4> :
  _3 = flow->action;
  if (_3 > 2)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

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

  <bb 6> :
  # DEBUG BEGIN_STMT
  _4 = flow->arg_type_mask;
  _5 = (unsigned int) _4;
  _6 = _5 & 1;
  if (_6 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _7 = args->vlan;
  if (_7 > 4095)
    goto <bb 9>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 8> :
  _8 = args->vlan_m;
  if (_8 > 4095)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  ret = 22;
  goto <bb 12>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _9 = args->vlan_m;
  if (_9 == 0)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  args->vlan_m = 4095;

  <bb 12> :
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 13>; [INV]
  else
    goto <bb 22>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  _10 = flow->arg_type_mask;
  _11 = (unsigned int) _10;
  _12 = _11 & 2;
  if (_12 != 0)
    goto <bb 14>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  _13 = args->tos_m;
  if (_13 == 0)
    goto <bb 15>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  args->tos_m = 255;

  <bb 16> :
  # DEBUG BEGIN_STMT
  _14 = flow->arg_type_mask;
  _15 = (unsigned int) _14;
  _16 = _15 & 4;
  if (_16 != 0)
    goto <bb 17>; [INV]
  else
    goto <bb 19>; [INV]

  <bb 17> :
  # DEBUG BEGIN_STMT
  _17 = args->l4proto_m;
  if (_17 == 0)
    goto <bb 18>; [INV]
  else
    goto <bb 19>; [INV]

  <bb 18> :
  # DEBUG BEGIN_STMT
  args->l4proto_m = 255;

  <bb 19> :
  # DEBUG BEGIN_STMT
  _18 = flow->arg_type_mask;
  _19 = (unsigned int) _18;
  _20 = _19 & 8;
  if (_20 != 0)
    goto <bb 20>; [INV]
  else
    goto <bb 22>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  _21 = args->sip_m;
  if (_21 > 63)
    goto <bb 21>; [INV]
  else
    goto <bb 22>; [INV]

  <bb 21> :
  # DEBUG BEGIN_STMT
  ret = 22;

  <bb 22> :
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 23>; [INV]
  else
    goto <bb 24>; [INV]

  <bb 23> :
  # DEBUG BEGIN_STMT
  ret = fci_qos_flow_entry_validate_dip_sport_dport (flow);

  <bb 24> :
  # DEBUG BEGIN_STMT
  D.13334 = ret;
  return D.13334;

}


fci_qos_flow_entry_validate_dip_sport_dport (struct pfe_iqos_flow_spec_t * flow)
{
  errno_t ret;
  struct pfe_iqos_flow_args_t * args;
  errno_t D.13352;

  <bb 2> :
  # DEBUG BEGIN_STMT
  args = &flow->args;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  _1 = flow->arg_type_mask;
  _2 = (unsigned int) _1;
  _3 = _2 & 16;
  if (_3 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _4 = args->dip_m;
  if (_4 > 63)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  ret = 22;

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

  <bb 6> :
  # DEBUG BEGIN_STMT
  _5 = flow->arg_type_mask;
  _6 = (unsigned int) _5;
  _7 = _6 & 32;
  if (_7 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _8 = args->sport_min;
  _9 = args->sport_max;
  if (_8 > _9)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  ret = 22;

  <bb 9> :
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 10>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _10 = flow->arg_type_mask;
  _11 = (unsigned int) _10;
  _12 = _11 & 64;
  if (_12 != 0)
    goto <bb 11>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _13 = args->dport_min;
  _14 = args->dport_max;
  if (_13 > _14)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  ret = 22;

  <bb 13> :
  # DEBUG BEGIN_STMT
  D.13352 = ret;
  return D.13352;

}


fci_qos_policer_cmd (struct fci_msg_t * msg, uint16_t * fci_ret, struct fpp_qos_policer_cmd_t * reply_buf, uint32_t * reply_len)
{
  errno_t ret;
  struct pfe_gpi_t * gpi;
  struct pfe_phy_if_t * phy_if;
  struct fpp_qos_policer_cmd_t * pol_cmd;
  errno_t D.13268;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  phy_if = 0B;
  # DEBUG BEGIN_STMT
  gpi = 0B;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  ret = fci_validate_cmd_params (msg, fci_ret, reply_buf, reply_len, 20);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  *reply_len = 0;
  # DEBUG BEGIN_STMT
  memset (reply_buf, 0, 20);
  # DEBUG BEGIN_STMT
  pol_cmd = &msg->msg_cmd.payload;
  # DEBUG BEGIN_STMT
  _1 = &pol_cmd->if_name;
  phy_if = fci_get_phy_if_by_name (_1);
  # DEBUG BEGIN_STMT
  if (phy_if == 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 2;
  goto <bb 15>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  gpi = fci_qos_get_gpi (phy_if);
  # DEBUG BEGIN_STMT
  if (gpi == 0B)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 2;
  goto <bb 15>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  # DEBUG BEGIN_STMT
  _2 = pol_cmd->action;
  _3 = (int) _2;
  switch (_3) <default: <L12> [INV], case 4: <L5> [INV], case 6: <L11> [INV]>

  <bb 8> :
<L5>:
  # DEBUG BEGIN_STMT
  _4 = pol_cmd->enable;
  if (_4 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  ret = pfe_gpi_qos_enable (gpi);
  goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  ret = pfe_gpi_qos_disable (gpi);

  <bb 11> :
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 12>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  *fci_ret = 65535;
  goto <bb 15>; [INV]

  <bb 13> :
<L11>:
  # DEBUG BEGIN_STMT
  _5 = pol_cmd->action;
  reply_buf->action = _5;
  # DEBUG BEGIN_STMT
  _6 = &reply_buf->if_name;
  _7 = &pol_cmd->if_name;
  strncpy (_6, _7, 16);
  # DEBUG BEGIN_STMT
  reply_buf->if_name[15] = 0;
  # DEBUG BEGIN_STMT
  _8 = pfe_gpi_qos_is_enabled (gpi);
  reply_buf->enable = _8;
  # DEBUG BEGIN_STMT
  *reply_len = 20;
  # DEBUG BEGIN_STMT
  goto <bb 15>; [INV]

  <bb 14> :
<L12>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 4;
  # DEBUG BEGIN_STMT

  <bb 15> :
  # DEBUG BEGIN_STMT
  D.13268 = ret;
  return D.13268;

}


fci_validate_cmd_params (const struct fci_msg_t * msg, uint16_t * fci_ret, void * reply_buf, uint32_t * reply_len, uint32_t cmd_len)
{
  errno_t ret;
  errno_t D.13272;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = *reply_len;
  if (cmd_len > _1)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = 22;

  <bb 4> :
  # DEBUG BEGIN_STMT
  D.13272 = ret;
  return D.13272;

}


fci_qos_get_gpi (const struct pfe_phy_if_t * phy_if)
{
  struct pfe_gpi_t * gpi;
  const struct pfe_emac_t * emac;
  struct pfe_gpi_t * D.13276;

  <bb 2> :
  # DEBUG BEGIN_STMT
  emac = pfe_phy_if_get_emac (phy_if);
  # DEBUG BEGIN_STMT
  gpi = 0B;
  # DEBUG BEGIN_STMT
  if (emac != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  gpi = pfe_emac_get_gpi (emac);

  <bb 4> :
  # DEBUG BEGIN_STMT
  D.13276 = gpi;
  return D.13276;

}


fci_qos_shaper_cmd (struct fci_msg_t * msg, uint16_t * fci_ret, struct fpp_qos_shaper_cmd_t * reply_buf, uint32_t * reply_len)
{
  uint32_t isl;
  const struct fci_t * fci;
  struct pfe_phy_if_t * phy_if;
  errno_t ret;
  struct fpp_qos_shaper_cmd_t * shp;
  errno_t D.13253;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  phy_if = 0B;
  # DEBUG BEGIN_STMT
  fci = &__context;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = *reply_len;
  if (_1 <= 35)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  *reply_len = 0;
  # DEBUG BEGIN_STMT
  memset (reply_buf, 0, 36);
  # DEBUG BEGIN_STMT
  shp = &msg->msg_cmd.payload;
  # DEBUG BEGIN_STMT
  _2 = shp->action;
  _3 = (int) _2;
  switch (_3) <default: <L46> [INV], case 4: <L2> [INV], case 6: <L34> [INV]>

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  # DEBUG BEGIN_STMT
  _4 = &shp->if_name;
  phy_if = fci_get_phy_if_by_name (_4);
  # DEBUG BEGIN_STMT
  if (phy_if == 0B)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  *fci_ret = 61700;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 44>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _5 = pfe_phy_if_get_id (phy_if);
  if (_5 == 5)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  *fci_ret = 61719;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 44>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = fci->tmu;
  _7 = pfe_phy_if_get_id (phy_if);
  _8 = shp->id;
  ret = pfe_tmu_check_shaper (_6, _7, _8);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  *fci_ret = 62497;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 44>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _9 = shp->mode;
  if (_9 == 0)
    goto <bb 12>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  _10 = shp->position;
  if (_10 == 255)
    goto <bb 13>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _11 = fci->tmu;
  _12 = pfe_phy_if_get_id (phy_if);
  _13 = shp->id;
  ret = pfe_tmu_shp_set_position (_11, _12, _13, 255);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 14>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 65535;
  # DEBUG BEGIN_STMT
  goto <bb 44>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _14 = fci->tmu;
  _15 = pfe_phy_if_get_id (phy_if);
  _16 = shp->id;
  ret = pfe_tmu_shp_disable (_14, _15, _16);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 16>; [INV]
  else
    goto <bb 44>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 65535;
  # DEBUG BEGIN_STMT
  goto <bb 44>; [INV]

  <bb 17> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _17 = fci->tmu;
  _18 = pfe_phy_if_get_id (phy_if);
  _19 = shp->id;
  ret = pfe_tmu_shp_enable (_17, _18, _19);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 18>; [INV]
  else
    goto <bb 19>; [INV]

  <bb 18> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 65535;
  # DEBUG BEGIN_STMT
  goto <bb 44>; [INV]

  <bb 19> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _20 = shp->mode;
  if (_20 == 1)
    goto <bb 20>; [INV]
  else
    goto <bb 21>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  _21 = fci->tmu;
  _22 = pfe_phy_if_get_id (phy_if);
  _23 = shp->id;
  ret = pfe_tmu_shp_set_rate_mode (_21, _22, _23, 0);
  goto <bb 24>; [INV]

  <bb 21> :
  # DEBUG BEGIN_STMT
  _24 = shp->mode;
  if (_24 == 2)
    goto <bb 22>; [INV]
  else
    goto <bb 23>; [INV]

  <bb 22> :
  # DEBUG BEGIN_STMT
  _25 = fci->tmu;
  _26 = pfe_phy_if_get_id (phy_if);
  _27 = shp->id;
  ret = pfe_tmu_shp_set_rate_mode (_25, _26, _27, 1);
  goto <bb 24>; [INV]

  <bb 23> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 44>; [INV]

  <bb 24> :
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 25>; [INV]
  else
    goto <bb 26>; [INV]

  <bb 25> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 65535;
  # DEBUG BEGIN_STMT
  goto <bb 44>; [INV]

  <bb 26> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _28 = fci->tmu;
  _29 = pfe_phy_if_get_id (phy_if);
  _30 = shp->id;
  _31 = shp->max_credit;
  _32 = (long unsigned int) _31;
  _33 = _32 >> 24;
  _34 = shp->max_credit;
  _35 = (long unsigned int) _34;
  _36 = _35 >> 8;
  _37 = _36 & 65280;
  _38 = _33 | _37;
  _39 = shp->max_credit;
  _40 = (long unsigned int) _39;
  _41 = _40 << 8;
  _42 = _41 & 16711680;
  _43 = _38 | _42;
  _44 = shp->max_credit;
  _45 = (long unsigned int) _44;
  _46 = _45 << 24;
  _47 = _43 | _46;
  _48 = (long int) _47;
  _49 = shp->min_credit;
  _50 = (long unsigned int) _49;
  _51 = _50 >> 24;
  _52 = shp->min_credit;
  _53 = (long unsigned int) _52;
  _54 = _53 >> 8;
  _55 = _54 & 65280;
  _56 = _51 | _55;
  _57 = shp->min_credit;
  _58 = (long unsigned int) _57;
  _59 = _58 << 8;
  _60 = _59 & 16711680;
  _61 = _56 | _60;
  _62 = shp->min_credit;
  _63 = (long unsigned int) _62;
  _64 = _63 << 24;
  _65 = _61 | _64;
  _66 = (long int) _65;
  ret = pfe_tmu_shp_set_limits (_28, _29, _30, _48, _66);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 27>; [INV]
  else
    goto <bb 28>; [INV]

  <bb 27> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 44>; [INV]

  <bb 28> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _67 = fci->tmu;
  _68 = pfe_phy_if_get_id (phy_if);
  _69 = shp->id;
  _70 = shp->position;
  ret = pfe_tmu_shp_set_position (_67, _68, _69, _70);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 29>; [INV]
  else
    goto <bb 30>; [INV]

  <bb 29> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 44>; [INV]

  <bb 30> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _71 = fci->tmu;
  _72 = pfe_phy_if_get_id (phy_if);
  _73 = shp->id;
  _74 = shp->isl;
  _75 = _74 >> 24;
  _76 = shp->isl;
  _77 = _76 >> 8;
  _78 = _77 & 65280;
  _79 = _75 | _78;
  _80 = shp->isl;
  _81 = _80 << 8;
  _82 = _81 & 16711680;
  _83 = _79 | _82;
  _84 = shp->isl;
  _85 = _84 << 24;
  _86 = _83 | _85;
  ret = pfe_tmu_shp_set_idle_slope (_71, _72, _73, _86);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 31>; [INV]
  else
    goto <bb 44>; [INV]

  <bb 31> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 44>; [INV]

  <bb 32> :
<L34>:
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  # DEBUG BEGIN_STMT
  _87 = &shp->if_name;
  phy_if = fci_get_phy_if_by_name (_87);
  # DEBUG BEGIN_STMT
  if (phy_if == 0B)
    goto <bb 33>; [INV]
  else
    goto <bb 34>; [INV]

  <bb 33> :
  # DEBUG BEGIN_STMT
  *fci_ret = 61700;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 44>; [INV]

  <bb 34> :
  # DEBUG BEGIN_STMT
  _88 = fci->tmu;
  _89 = pfe_phy_if_get_id (phy_if);
  _90 = shp->id;
  ret = pfe_tmu_check_shaper (_88, _89, _90);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 35>; [INV]
  else
    goto <bb 36>; [INV]

  <bb 35> :
  # DEBUG BEGIN_STMT
  *fci_ret = 62497;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 44>; [INV]

  <bb 36> :
  # DEBUG BEGIN_STMT
  _91 = shp->action;
  reply_buf->action = _91;
  # DEBUG BEGIN_STMT
  _92 = shp->id;
  reply_buf->id = _92;
  # DEBUG BEGIN_STMT
  _93 = &reply_buf->if_name;
  _94 = &shp->if_name;
  strncpy (_93, _94, 16);
  # DEBUG BEGIN_STMT
  reply_buf->if_name[15] = 0;
  # DEBUG BEGIN_STMT
  _95 = fci->tmu;
  _96 = pfe_phy_if_get_id (phy_if);
  _97 = shp->id;
  _98 = pfe_tmu_shp_get_rate_mode (_95, _96, _97);
  _99 = (int) _98;
  switch (_99) <default: <L41> [INV], case 0: <L39> [INV], case 1: <L40> [INV]>

  <bb 37> :
<L39>:
  # DEBUG BEGIN_STMT
  reply_buf->mode = 1;
  # DEBUG BEGIN_STMT
  goto <bb 40>; [INV]

  <bb 38> :
<L40>:
  # DEBUG BEGIN_STMT
  reply_buf->mode = 2;
  # DEBUG BEGIN_STMT
  goto <bb 40>; [INV]

  <bb 39> :
<L41>:
  # DEBUG BEGIN_STMT
  reply_buf->mode = 0;
  # DEBUG BEGIN_STMT

  <bb 40> :
  # DEBUG BEGIN_STMT
  _100 = fci->tmu;
  _101 = pfe_phy_if_get_id (phy_if);
  _102 = shp->id;
  _103 = &reply_buf->max_credit;
  _104 = &reply_buf->min_credit;
  ret = pfe_tmu_shp_get_limits (_100, _101, _102, _103, _104);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 42>; [INV]
  else
    goto <bb 41>; [INV]

  <bb 41> :
  # DEBUG BEGIN_STMT
  _105 = reply_buf->max_credit;
  _106 = (long unsigned int) _105;
  _107 = _106 >> 24;
  _108 = reply_buf->max_credit;
  _109 = (long unsigned int) _108;
  _110 = _109 >> 8;
  _111 = _110 & 65280;
  _112 = _107 | _111;
  _113 = reply_buf->max_credit;
  _114 = (long unsigned int) _113;
  _115 = _114 << 8;
  _116 = _115 & 16711680;
  _117 = _112 | _116;
  _118 = reply_buf->max_credit;
  _119 = (long unsigned int) _118;
  _120 = _119 << 24;
  _121 = _117 | _120;
  _122 = (long int) _121;
  reply_buf->max_credit = _122;
  # DEBUG BEGIN_STMT
  _123 = reply_buf->min_credit;
  _124 = (long unsigned int) _123;
  _125 = _124 >> 24;
  _126 = reply_buf->min_credit;
  _127 = (long unsigned int) _126;
  _128 = _127 >> 8;
  _129 = _128 & 65280;
  _130 = _125 | _129;
  _131 = reply_buf->min_credit;
  _132 = (long unsigned int) _131;
  _133 = _132 << 8;
  _134 = _133 & 16711680;
  _135 = _130 | _134;
  _136 = reply_buf->min_credit;
  _137 = (long unsigned int) _136;
  _138 = _137 << 24;
  _139 = _135 | _138;
  _140 = (long int) _139;
  reply_buf->min_credit = _140;

  <bb 42> :
  # DEBUG BEGIN_STMT
  _141 = fci->tmu;
  _142 = pfe_phy_if_get_id (phy_if);
  _143 = shp->id;
  isl = pfe_tmu_shp_get_idle_slope (_141, _142, _143);
  # DEBUG BEGIN_STMT
  _144 = isl >> 24;
  _145 = isl >> 8;
  _146 = _145 & 65280;
  _147 = _144 | _146;
  _148 = isl << 8;
  _149 = _148 & 16711680;
  _150 = _147 | _149;
  _151 = isl << 24;
  _152 = _150 | _151;
  reply_buf->isl = _152;
  # DEBUG BEGIN_STMT
  _153 = fci->tmu;
  _154 = pfe_phy_if_get_id (phy_if);
  _155 = shp->id;
  _156 = pfe_tmu_shp_get_position (_153, _154, _155);
  reply_buf->position = _156;
  # DEBUG BEGIN_STMT
  *reply_len = 36;
  # DEBUG BEGIN_STMT
  goto <bb 44>; [INV]

  <bb 43> :
<L46>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 4;
  # DEBUG BEGIN_STMT

  <bb 44> :
  # DEBUG BEGIN_STMT
  D.13253 = ret;
  return D.13253;

}


fci_qos_scheduler_cmd (struct fci_msg_t * msg, uint16_t * fci_ret, struct fpp_qos_scheduler_cmd_t * reply_buf, uint32_t * reply_len)
{
  const struct fci_t * fci;
  struct pfe_phy_if_t * phy_if;
  errno_t ret;
  struct fpp_qos_scheduler_cmd_t * sch;
  errno_t D.13156;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  phy_if = 0B;
  # DEBUG BEGIN_STMT
  fci = &__context;
  # DEBUG BEGIN_STMT
  _1 = *reply_len;
  if (_1 <= 187)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  *reply_len = 0;
  # DEBUG BEGIN_STMT
  reply_buf.6_2 = reply_buf;
  memset (reply_buf.6_2, 0, 188);
  # DEBUG BEGIN_STMT
  _3 = &msg->msg_cmd.payload;
  sch = _3;
  # DEBUG BEGIN_STMT
  sch.7_4 = sch;
  _5 = sch.7_4->action;
  _6 = (int) _5;
  switch (_6) <default: <L18> [INV], case 4: <L2> [INV], case 6: <L13> [INV]>

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  fci_ret.8_7 = fci_ret;
  *fci_ret.8_7 = 0;
  # DEBUG BEGIN_STMT
  sch.9_8 = sch;
  _9 = &sch.9_8->if_name;
  phy_if = fci_get_phy_if_by_name (_9);
  # DEBUG BEGIN_STMT
  if (phy_if == 0B)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  fci_ret.10_10 = fci_ret;
  *fci_ret.10_10 = 61700;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 20>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _11 = fci->tmu;
  _12 = pfe_phy_if_get_id (phy_if);
  sch.11_13 = sch;
  _14 = sch.11_13->id;
  ret = pfe_tmu_check_scheduler (_11, _12, _14);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  fci_ret.12_15 = fci_ret;
  *fci_ret.12_15 = 62481;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 20>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _16 = pfe_phy_if_get_id (phy_if);
  if (_16 == 5)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  fci_ret.13_17 = fci_ret;
  *fci_ret.13_17 = 61719;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 20>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  fci_ret.14_18 = fci_ret;
  _19 = *fci_ret.14_18;
  if (_19 == 0)
    goto <bb 12>; [INV]
  else
    goto <bb 20>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  ret = fci_qos_scheduler_cmd_update_set_mode (fci, &sch, &fci_ret, phy_if);
  # DEBUG BEGIN_STMT
  fci_ret.15_20 = fci_ret;
  _21 = *fci_ret.15_20;
  if (_21 == 0)
    goto <bb 13>; [INV]
  else
    goto <bb 20>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  ret = fci_qos_scheduler_cmd_update_cfg_scheduler (fci, &sch, &fci_ret, phy_if);
  goto <bb 20>; [INV]

  <bb 14> :
<L13>:
  # DEBUG BEGIN_STMT
  fci_ret.16_22 = fci_ret;
  *fci_ret.16_22 = 0;
  # DEBUG BEGIN_STMT
  sch.17_23 = sch;
  _24 = &sch.17_23->if_name;
  phy_if = fci_get_phy_if_by_name (_24);
  # DEBUG BEGIN_STMT
  if (phy_if == 0B)
    goto <bb 15>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  fci_ret.18_25 = fci_ret;
  *fci_ret.18_25 = 61700;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 20>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  _26 = fci->tmu;
  _27 = pfe_phy_if_get_id (phy_if);
  sch.19_28 = sch;
  _29 = sch.19_28->id;
  ret = pfe_tmu_check_scheduler (_26, _27, _29);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 17>; [INV]
  else
    goto <bb 18>; [INV]

  <bb 17> :
  # DEBUG BEGIN_STMT
  fci_ret.20_30 = fci_ret;
  *fci_ret.20_30 = 62481;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 20>; [INV]

  <bb 18> :
  # DEBUG BEGIN_STMT
  sch.21_31 = sch;
  reply_buf.22_32 = reply_buf;
  _33 = sch.21_31->action;
  reply_buf.22_32->action = _33;
  # DEBUG BEGIN_STMT
  sch.23_34 = sch;
  reply_buf.24_35 = reply_buf;
  _36 = sch.23_34->id;
  reply_buf.24_35->id = _36;
  # DEBUG BEGIN_STMT
  reply_buf.25_37 = reply_buf;
  _38 = &reply_buf.25_37->if_name;
  sch.26_39 = sch;
  _40 = &sch.26_39->if_name;
  strncpy (_38, _40, 16);
  # DEBUG BEGIN_STMT
  reply_buf.27_41 = reply_buf;
  reply_buf.27_41->if_name[15] = 0;
  # DEBUG BEGIN_STMT
  sch.28_42 = sch;
  ret = fci_qos_scheduler_cmd_query_get_sch (fci, sch.28_42, &fci_ret, &reply_buf, phy_if);
  # DEBUG BEGIN_STMT
  *reply_len = 188;
  # DEBUG BEGIN_STMT
  goto <bb 20>; [INV]

  <bb 19> :
<L18>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  fci_ret.29_43 = fci_ret;
  *fci_ret.29_43 = 4;
  # DEBUG BEGIN_STMT

  <bb 20> :
  # DEBUG BEGIN_STMT
  D.13156 = ret;
  sch = {CLOBBER};
  return D.13156;

}


fci_qos_scheduler_cmd_query_get_sch (const struct fci_t * fci, struct fpp_qos_scheduler_cmd_t * sch, uint16_t * * fci_ret, struct fpp_qos_scheduler_cmd_t * * reply_buf, struct pfe_phy_if_t * phy_if)
{
  uint8_t queue;
  uint8_t cnt;
  uint8_t ii;
  uint32_t weight;
  errno_t ret;
  errno_t D.13210;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = fci->tmu;
  _2 = pfe_phy_if_get_id (phy_if);
  _3 = sch->id;
  _4 = pfe_tmu_sch_get_rate_mode (_1, _2, _3);
  _5 = (int) _4;
  switch (_5) <default: <L2> [INV], case 0: <L0> [INV], case 1: <L1> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  _6 = *reply_buf;
  _6->mode = 1;
  # DEBUG BEGIN_STMT
  goto <bb 6>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  _7 = *reply_buf;
  _7->mode = 2;
  # DEBUG BEGIN_STMT
  goto <bb 6>; [INV]

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _8 = *fci_ret;
  *_8 = 65535;
  # DEBUG BEGIN_STMT
  ret = 22;
  # DEBUG BEGIN_STMT

  <bb 6> :
  # DEBUG BEGIN_STMT
  _9 = fci->tmu;
  _10 = pfe_phy_if_get_id (phy_if);
  _11 = sch->id;
  _12 = *reply_buf;
  _13 = pfe_tmu_sch_get_algo (_9, _10, _11);
  _12->algo = _13;
  # DEBUG BEGIN_STMT
  _14 = *reply_buf;
  _15 = _14->algo;
  if (_15 == 4)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _16 = *fci_ret;
  *_16 = 65535;
  # DEBUG BEGIN_STMT
  ret = 22;
  goto <bb 17>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _17 = fci->tmu;
  _18 = pfe_phy_if_get_id (phy_if);
  _19 = sch->id;
  cnt = pfe_tmu_sch_get_input_cnt (_17, _18, _19);
  # DEBUG BEGIN_STMT
  _20 = *reply_buf;
  _20->input_en = 0;
  # DEBUG BEGIN_STMT
  ii = 0;
  goto <bb 15>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _21 = fci->tmu;
  _22 = pfe_phy_if_get_id (phy_if);
  _23 = sch->id;
  queue = pfe_tmu_sch_get_bound_queue (_21, _22, _23, ii);
  # DEBUG BEGIN_STMT
  if (queue == 255)
    goto <bb 10>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _24 = fci->tmu;
  _25 = pfe_phy_if_get_id (phy_if);
  _26 = sch->id;
  _27 = pfe_tmu_sch_get_bound_sch_output (_24, _25, _26, ii);
  if (_27 == 255)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _28 = *reply_buf;
  _29 = (int) ii;
  _28->input_src[_29] = 255;
  goto <bb 14>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  _30 = fci->tmu;
  _31 = pfe_phy_if_get_id (phy_if);
  _32 = sch->id;
  weight = pfe_tmu_sch_get_input_weight (_30, _31, _32, ii);
  # DEBUG BEGIN_STMT
  _33 = weight >> 24;
  _34 = weight >> 8;
  _35 = _34 & 65280;
  _36 = _33 | _35;
  _37 = weight << 8;
  _38 = _37 & 16711680;
  _39 = _36 | _38;
  _40 = weight << 24;
  _41 = *reply_buf;
  _42 = (int) ii;
  _43 = _39 | _40;
  _41->input_w[_42] = _43;
  # DEBUG BEGIN_STMT
  _44 = *reply_buf;
  _45 = (int) ii;
  _44->input_src[_45] = 8;
  # DEBUG BEGIN_STMT
  _46 = *reply_buf;
  _47 = _46->input_en;
  _48 = (int) ii;
  _49 = 1 << _48;
  _50 = *reply_buf;
  _51 = _47 | _49;
  _50->input_en = _51;
  goto <bb 14>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  _52 = fci->tmu;
  _53 = pfe_phy_if_get_id (phy_if);
  _54 = sch->id;
  weight = pfe_tmu_sch_get_input_weight (_52, _53, _54, ii);
  # DEBUG BEGIN_STMT
  _55 = weight >> 24;
  _56 = weight >> 8;
  _57 = _56 & 65280;
  _58 = _55 | _57;
  _59 = weight << 8;
  _60 = _59 & 16711680;
  _61 = _58 | _60;
  _62 = weight << 24;
  _63 = *reply_buf;
  _64 = (int) ii;
  _65 = _61 | _62;
  _63->input_w[_64] = _65;
  # DEBUG BEGIN_STMT
  _66 = *reply_buf;
  _67 = (int) ii;
  _66->input_src[_67] = queue;
  # DEBUG BEGIN_STMT
  _68 = *reply_buf;
  _69 = _68->input_en;
  _70 = (int) ii;
  _71 = 1 << _70;
  _72 = *reply_buf;
  _73 = _69 | _71;
  _72->input_en = _73;

  <bb 14> :
  # DEBUG BEGIN_STMT
  ii.31_74 = ii;
  ii = ii.31_74 + 1;

  <bb 15> :
  # DEBUG BEGIN_STMT
  if (ii < cnt)
    goto <bb 9>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  _75 = *reply_buf;
  _76 = _75->input_en;
  _77 = _76 >> 24;
  _78 = *reply_buf;
  _79 = _78->input_en;
  _80 = _79 >> 8;
  _81 = _80 & 65280;
  _82 = _77 | _81;
  _83 = *reply_buf;
  _84 = _83->input_en;
  _85 = _84 << 8;
  _86 = _85 & 16711680;
  _87 = _82 | _86;
  _88 = *reply_buf;
  _89 = _88->input_en;
  _90 = _89 << 24;
  _91 = *reply_buf;
  _92 = _87 | _90;
  _91->input_en = _92;
  # DEBUG BEGIN_STMT
  ret = 0;

  <bb 17> :
  # DEBUG BEGIN_STMT
  D.13210 = ret;
  return D.13210;

}


fci_qos_scheduler_cmd_update_cfg_scheduler (const struct fci_t * fci, struct fpp_qos_scheduler_cmd_t * * sch, uint16_t * * fci_ret, struct pfe_phy_if_t * phy_if)
{
  bool_t is_break;
  uint8_t ii;
  uint8_t cnt;
  errno_t ret;
  errno_t D.13199;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  cnt = 0;
  # DEBUG BEGIN_STMT
  ii = 0;
  # DEBUG BEGIN_STMT
  is_break = 0;
  # DEBUG BEGIN_STMT
  _1 = fci->tmu;
  _2 = pfe_phy_if_get_id (phy_if);
  _3 = *sch;
  _4 = _3->id;
  cnt = pfe_tmu_sch_get_input_cnt (_1, _2, _4);
  # DEBUG BEGIN_STMT
  _5 = *sch;
  _6 = _5->input_en;
  _7 = _6 >> 24;
  _8 = *sch;
  _9 = _8->input_en;
  _10 = _9 >> 8;
  _11 = _10 & 65280;
  _12 = _7 | _11;
  _13 = *sch;
  _14 = _13->input_en;
  _15 = _14 << 8;
  _16 = _15 & 16711680;
  _17 = _12 | _16;
  _18 = *sch;
  _19 = _18->input_en;
  _20 = _19 << 24;
  _21 = *sch;
  _22 = _17 | _20;
  _21->input_en = _22;
  # DEBUG BEGIN_STMT
  ii = 0;
  goto <bb 19>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _23 = *sch;
  _24 = _23->input_en;
  _25 = (int) ii;
  _26 = _24 >> _25;
  _27 = _26 & 1;
  if (_27 == 0)
    goto <bb 5>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 4> :
  _28 = *sch;
  _29 = (int) ii;
  _30 = _28->input_src[_29];
  if (_30 == 255)
    goto <bb 5>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _31 = fci->tmu;
  _32 = pfe_phy_if_get_id (phy_if);
  _33 = *sch;
  _34 = _33->id;
  ret = pfe_tmu_sch_bind_queue (_31, _32, _34, ii, 255);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _35 = *fci_ret;
  *_35 = 65535;
  # DEBUG BEGIN_STMT
  is_break = 1;
  goto <bb 17>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _36 = *sch;
  _37 = (int) ii;
  _38 = _36->input_src[_37];
  if (_38 <= 7)
    goto <bb 8>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _39 = fci->tmu;
  _40 = pfe_phy_if_get_id (phy_if);
  _41 = *sch;
  _42 = _41->id;
  _43 = *sch;
  _44 = (int) ii;
  _45 = _43->input_src[_44];
  ret = pfe_tmu_sch_bind_queue (_39, _40, _42, ii, _45);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _46 = *fci_ret;
  *_46 = 3;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  is_break = 1;
  goto <bb 14>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _47 = *sch;
  _48 = (int) ii;
  _49 = _47->input_src[_48];
  if (_49 == 8)
    goto <bb 11>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _50 = fci->tmu;
  _51 = pfe_phy_if_get_id (phy_if);
  _52 = *sch;
  _53 = _52->id;
  _54 = _53 + 255;
  _55 = *sch;
  _56 = _55->id;
  ret = pfe_tmu_sch_bind_sch_output (_50, _51, _54, _56, ii);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 12>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _57 = *fci_ret;
  *_57 = 3;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  is_break = 1;
  goto <bb 14>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _58 = *fci_ret;
  *_58 = 3;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  is_break = 1;

  <bb 14> :
  # DEBUG BEGIN_STMT
  if (is_break == 0)
    goto <bb 15>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _59 = fci->tmu;
  _60 = pfe_phy_if_get_id (phy_if);
  _61 = *sch;
  _62 = _61->id;
  _63 = *sch;
  _64 = (int) ii;
  _65 = _63->input_w[_64];
  _66 = _65 >> 24;
  _67 = *sch;
  _68 = (int) ii;
  _69 = _67->input_w[_68];
  _70 = _69 >> 8;
  _71 = _70 & 65280;
  _72 = _66 | _71;
  _73 = *sch;
  _74 = (int) ii;
  _75 = _73->input_w[_74];
  _76 = _75 << 8;
  _77 = _76 & 16711680;
  _78 = _72 | _77;
  _79 = *sch;
  _80 = (int) ii;
  _81 = _79->input_w[_80];
  _82 = _81 << 24;
  _83 = _78 | _82;
  ret = pfe_tmu_sch_set_input_weight (_59, _60, _62, ii, _83);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 16>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _84 = *fci_ret;
  *_84 = 3;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  is_break = 1;

  <bb 17> :
  # DEBUG BEGIN_STMT
  if (is_break == 1)
    goto <bb 20>; [INV]
  else
    goto <bb 18>; [INV]

  <bb 18> :
  # DEBUG BEGIN_STMT
  ii.30_85 = ii;
  ii = ii.30_85 + 1;

  <bb 19> :
  # DEBUG BEGIN_STMT
  if (ii < cnt)
    goto <bb 3>; [INV]
  else
    goto <bb 20>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  D.13199 = ret;
  return D.13199;

}


fci_qos_scheduler_cmd_update_set_mode (const struct fci_t * fci, struct fpp_qos_scheduler_cmd_t * * sch, uint16_t * * fci_ret, struct pfe_phy_if_t * phy_if)
{
  errno_t ret;
  errno_t D.13176;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = *sch;
  _2 = _1->mode;
  if (_2 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = *sch;
  _3->input_en = 0;
  # DEBUG BEGIN_STMT
  ret = 0;
  goto <bb 9>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _4 = *sch;
  _5 = _4->mode;
  if (_5 == 1)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = fci->tmu;
  _7 = pfe_phy_if_get_id (phy_if);
  _8 = *sch;
  _9 = _8->id;
  ret = pfe_tmu_sch_set_rate_mode (_6, _7, _9, 0);
  goto <bb 9>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _10 = *sch;
  _11 = _10->mode;
  if (_11 == 2)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _12 = fci->tmu;
  _13 = pfe_phy_if_get_id (phy_if);
  _14 = *sch;
  _15 = _14->id;
  ret = pfe_tmu_sch_set_rate_mode (_12, _13, _15, 1);
  goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = 22;

  <bb 9> :
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _16 = *fci_ret;
  *_16 = 3;
  # DEBUG BEGIN_STMT
  ret = 0;
  goto <bb 15>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _17 = *sch;
  _18 = _17->algo;
  if (_18 > 3)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _19 = *fci_ret;
  *_19 = 3;
  # DEBUG BEGIN_STMT
  ret = 0;
  goto <bb 15>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _20 = fci->tmu;
  _21 = pfe_phy_if_get_id (phy_if);
  _22 = *sch;
  _23 = _22->id;
  _24 = *sch;
  _25 = _24->algo;
  _26 = (int) _25;
  _27 = sch_algos[_26];
  ret = pfe_tmu_sch_set_algo (_20, _21, _23, _27);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 14>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _28 = *fci_ret;
  *_28 = 65535;

  <bb 15> :
  # DEBUG BEGIN_STMT
  D.13176 = ret;
  return D.13176;

}


fci_qos_queue_cmd (struct fci_msg_t * msg, uint16_t * fci_ret, struct fpp_qos_queue_cmd_t * reply_buf, uint32_t * reply_len)
{
  uint8_t ii;
  uint8_t cnt;
  const struct fci_t * fci;
  struct pfe_phy_if_t * phy_if;
  errno_t ret;
  struct fpp_qos_queue_cmd_t * q;
  errno_t D.13125;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  phy_if = 0B;
  # DEBUG BEGIN_STMT
  fci = &__context;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = *reply_len;
  if (_1 <= 59)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  *reply_len = 0;
  # DEBUG BEGIN_STMT
  memset (reply_buf, 0, 60);
  # DEBUG BEGIN_STMT
  q = &msg->msg_cmd.payload;
  # DEBUG BEGIN_STMT
  _2 = q->action;
  _3 = (int) _2;
  switch (_3) <default: <L49> [INV], case 4: <L2> [INV], case 6: <L28> [INV]>

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  # DEBUG BEGIN_STMT
  _4 = &q->if_name;
  phy_if = fci_get_phy_if_by_name (_4);
  # DEBUG BEGIN_STMT
  if (phy_if == 0B)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  *fci_ret = 61700;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 47>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _5 = pfe_phy_if_get_id (phy_if);
  if (_5 == 5)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  *fci_ret = 61719;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 47>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = fci->tmu;
  _7 = pfe_phy_if_get_id (phy_if);
  cnt = pfe_tmu_queue_get_cnt (_6, _7);
  # DEBUG BEGIN_STMT
  _8 = q->id;
  if (cnt < _8)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 62465;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 47>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _9 = q->mode;
  if (_9 > 3)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 47>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  _10 = q->mode;
  if (_10 == 0)
    goto <bb 14>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  _11 = fci->tmu;
  _12 = pfe_phy_if_get_id (phy_if);
  _13 = q->id;
  ret = pfe_tmu_queue_set_mode (_11, _12, _13, 0, 0, 0);
  goto <bb 16>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  _14 = fci->tmu;
  _15 = pfe_phy_if_get_id (phy_if);
  _16 = q->id;
  _17 = q->mode;
  _18 = (int) _17;
  _19 = fci_qmode_to_qmode[_18];
  _20 = q->min;
  _21 = _20 >> 24;
  _22 = q->min;
  _23 = _22 >> 8;
  _24 = _23 & 65280;
  _25 = _21 | _24;
  _26 = q->min;
  _27 = _26 << 8;
  _28 = _27 & 16711680;
  _29 = _25 | _28;
  _30 = q->min;
  _31 = _30 << 24;
  _32 = _29 | _31;
  _33 = q->max;
  _34 = _33 >> 24;
  _35 = q->max;
  _36 = _35 >> 8;
  _37 = _36 & 65280;
  _38 = _34 | _37;
  _39 = q->max;
  _40 = _39 << 8;
  _41 = _40 & 16711680;
  _42 = _38 | _41;
  _43 = q->max;
  _44 = _43 << 24;
  _45 = _42 | _44;
  ret = pfe_tmu_queue_set_mode (_14, _15, _16, _19, _32, _45);

  <bb 16> :
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 17>; [INV]
  else
    goto <bb 20>; [INV]

  <bb 17> :
  # DEBUG BEGIN_STMT
  if (ret == 113)
    goto <bb 18>; [INV]
  else
    goto <bb 19>; [INV]

  <bb 18> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 62466;
  # DEBUG BEGIN_STMT
  ret = 0;
  goto <bb 47>; [INV]

  <bb 19> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 0;
  goto <bb 47>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  _46 = q->mode;
  if (_46 == 3)
    goto <bb 21>; [INV]
  else
    goto <bb 47>; [INV]

  <bb 21> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _47 = fci->tmu;
  _48 = pfe_phy_if_get_id (phy_if);
  cnt = pfe_tmu_queue_get_cnt (_47, _48);
  # DEBUG BEGIN_STMT
  if (cnt > 32)
    goto <bb 22>; [INV]
  else
    goto <bb 23>; [INV]

  <bb 22> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 65535;
  # DEBUG BEGIN_STMT
  ret = 22;
  # DEBUG BEGIN_STMT
  goto <bb 47>; [INV]

  <bb 23> :
  # DEBUG BEGIN_STMT
  ii = 0;
  goto <bb 27>; [INV]

  <bb 24> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _49 = fci->tmu;
  _50 = pfe_phy_if_get_id (phy_if);
  _51 = q->id;
  _52 = (int) ii;
  _53 = q->zprob[_52];
  ret = pfe_tmu_queue_set_wred_prob (_49, _50, _51, ii, _53);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 25>; [INV]
  else
    goto <bb 26>; [INV]

  <bb 25> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 3;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 47>; [INV]

  <bb 26> :
  # DEBUG BEGIN_STMT
  ii.0_54 = ii;
  ii = ii.0_54 + 1;

  <bb 27> :
  # DEBUG BEGIN_STMT
  if (ii < cnt)
    goto <bb 24>; [INV]
  else
    goto <bb 47>; [INV]

  <bb 28> :
<L28>:
  # DEBUG BEGIN_STMT
  *fci_ret = 0;
  # DEBUG BEGIN_STMT
  _55 = &q->if_name;
  phy_if = fci_get_phy_if_by_name (_55);
  # DEBUG BEGIN_STMT
  if (phy_if == 0B)
    goto <bb 29>; [INV]
  else
    goto <bb 30>; [INV]

  <bb 29> :
  # DEBUG BEGIN_STMT
  *fci_ret = 61700;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 47>; [INV]

  <bb 30> :
  # DEBUG BEGIN_STMT
  _56 = fci->tmu;
  _57 = pfe_phy_if_get_id (phy_if);
  _58 = q->id;
  ret = pfe_tmu_check_queue (_56, _57, _58);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 31>; [INV]
  else
    goto <bb 32>; [INV]

  <bb 31> :
  # DEBUG BEGIN_STMT
  *fci_ret = 62465;
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  goto <bb 47>; [INV]

  <bb 32> :
  # DEBUG BEGIN_STMT
  _59 = q->action;
  reply_buf->action = _59;
  # DEBUG BEGIN_STMT
  _60 = q->id;
  reply_buf->id = _60;
  # DEBUG BEGIN_STMT
  _61 = &reply_buf->if_name;
  _62 = &q->if_name;
  strncpy (_61, _62, 16);
  # DEBUG BEGIN_STMT
  reply_buf->if_name[15] = 0;
  # DEBUG BEGIN_STMT
  _63 = fci->tmu;
  _64 = pfe_phy_if_get_id (phy_if);
  _65 = q->id;
  _66 = &reply_buf->min;
  _67 = &reply_buf->max;
  _68 = pfe_tmu_queue_get_mode (_63, _64, _65, _66, _67);
  _69 = (int) _68;
  switch (_69) <default: <L47> [INV], case 0: <L33> [INV], case 1: <L38> [INV], case 2: <L37> [INV]>

  <bb 33> :
<L33>:
  # DEBUG BEGIN_STMT
  _70 = reply_buf->max;
  if (_70 == 0)
    goto <bb 34>; [INV]
  else
    goto <bb 35>; [INV]

  <bb 34> :
  # DEBUG BEGIN_STMT
  reply_buf->mode = 0;
  # DEBUG BEGIN_STMT
  reply_buf->max = 0;
  # DEBUG BEGIN_STMT
  reply_buf->min = 0;
  goto <bb 45>; [INV]

  <bb 35> :
  # DEBUG BEGIN_STMT
  reply_buf->mode = 2;
  # DEBUG BEGIN_STMT
  _71 = reply_buf->max;
  _72 = _71 >> 24;
  _73 = reply_buf->max;
  _74 = _73 >> 8;
  _75 = _74 & 65280;
  _76 = _72 | _75;
  _77 = reply_buf->max;
  _78 = _77 << 8;
  _79 = _78 & 16711680;
  _80 = _76 | _79;
  _81 = reply_buf->max;
  _82 = _81 << 24;
  _83 = _80 | _82;
  reply_buf->max = _83;
  # DEBUG BEGIN_STMT
  reply_buf->min = 0;
  goto <bb 45>; [INV]

  <bb 36> :
<L37>:
  # DEBUG BEGIN_STMT
  reply_buf->mode = 1;
  # DEBUG BEGIN_STMT
  _84 = reply_buf->max;
  _85 = _84 >> 24;
  _86 = reply_buf->max;
  _87 = _86 >> 8;
  _88 = _87 & 65280;
  _89 = _85 | _88;
  _90 = reply_buf->max;
  _91 = _90 << 8;
  _92 = _91 & 16711680;
  _93 = _89 | _92;
  _94 = reply_buf->max;
  _95 = _94 << 24;
  _96 = _93 | _95;
  reply_buf->max = _96;
  # DEBUG BEGIN_STMT
  _97 = reply_buf->min;
  _98 = _97 >> 24;
  _99 = reply_buf->min;
  _100 = _99 >> 8;
  _101 = _100 & 65280;
  _102 = _98 | _101;
  _103 = reply_buf->min;
  _104 = _103 << 8;
  _105 = _104 & 16711680;
  _106 = _102 | _105;
  _107 = reply_buf->min;
  _108 = _107 << 24;
  _109 = _106 | _108;
  reply_buf->max = _109;
  # DEBUG BEGIN_STMT
  goto <bb 45>; [INV]

  <bb 37> :
<L38>:
  # DEBUG BEGIN_STMT
  reply_buf->mode = 3;
  # DEBUG BEGIN_STMT
  _110 = reply_buf->max;
  _111 = _110 >> 24;
  _112 = reply_buf->max;
  _113 = _112 >> 8;
  _114 = _113 & 65280;
  _115 = _111 | _114;
  _116 = reply_buf->max;
  _117 = _116 << 8;
  _118 = _117 & 16711680;
  _119 = _115 | _118;
  _120 = reply_buf->max;
  _121 = _120 << 24;
  _122 = _119 | _121;
  reply_buf->max = _122;
  # DEBUG BEGIN_STMT
  _123 = reply_buf->min;
  _124 = _123 >> 24;
  _125 = reply_buf->min;
  _126 = _125 >> 8;
  _127 = _126 & 65280;
  _128 = _124 | _127;
  _129 = reply_buf->min;
  _130 = _129 << 8;
  _131 = _130 & 16711680;
  _132 = _128 | _131;
  _133 = reply_buf->min;
  _134 = _133 << 24;
  _135 = _132 | _134;
  reply_buf->min = _135;
  # DEBUG BEGIN_STMT
  _136 = fci->tmu;
  _137 = pfe_phy_if_get_id (phy_if);
  _138 = q->id;
  cnt = pfe_tmu_queue_get_wred_zones (_136, _137, _138);
  # DEBUG BEGIN_STMT
  ii = 0;
  goto <bb 43>; [INV]

  <bb 38> :
  # DEBUG BEGIN_STMT
  if (ii < cnt)
    goto <bb 39>; [INV]
  else
    goto <bb 41>; [INV]

  <bb 39> :
  # DEBUG BEGIN_STMT
  _139 = fci->tmu;
  _140 = pfe_phy_if_get_id (phy_if);
  _141 = q->id;
  _142 = (int) ii;
  _143 = &reply_buf->zprob[_142];
  ret = pfe_tmu_queue_get_wred_prob (_139, _140, _141, ii, _143);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 40>; [INV]
  else
    goto <bb 42>; [INV]

  <bb 40> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 65535;
  # DEBUG BEGIN_STMT
  goto <bb 45>; [INV]

  <bb 41> :
  # DEBUG BEGIN_STMT
  _144 = (int) ii;
  reply_buf->zprob[_144] = 255;

  <bb 42> :
  # DEBUG BEGIN_STMT
  ii.1_145 = ii;
  ii = ii.1_145 + 1;

  <bb 43> :
  # DEBUG BEGIN_STMT
  if (ii <= 31)
    goto <bb 38>; [INV]
  else
    goto <bb 45>; [INV]

  <bb 44> :
<L47>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 65535;
  # DEBUG BEGIN_STMT

  <bb 45> :
  # DEBUG BEGIN_STMT
  *reply_len = 60;
  # DEBUG BEGIN_STMT
  goto <bb 47>; [INV]

  <bb 46> :
<L49>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *fci_ret = 4;
  # DEBUG BEGIN_STMT

  <bb 47> :
  # DEBUG BEGIN_STMT
  D.13125 = ret;
  return D.13125;

}


fci_get_phy_if_by_name (char_t * name)
{
  uint32_t sid;
  errno_t ret;
  struct pfe_phy_if_t * phy_if;
  struct pfe_if_db_entry_t * entry;
  struct fci_t * fci;
  struct pfe_phy_if_t * D.13136;

  <bb 2> :
  # DEBUG BEGIN_STMT
  fci = &__context;
  # DEBUG BEGIN_STMT
  entry = 0B;
  # DEBUG BEGIN_STMT
  phy_if = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = pfe_if_db_lock (&sid);
  # DEBUG BEGIN_STMT
  if (ret != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 3>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = fci->phy_if_db;
  sid.2_2 = sid;
  ret = pfe_if_db_get_first (_1, sid.2_2, 3, name, &entry);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  entry.3_3 = entry;
  if (entry.3_3 != 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  entry.4_4 = entry;
  phy_if = pfe_if_db_entry_get_phy_if (entry.4_4);

  <bb 5> :
  # DEBUG BEGIN_STMT
  sid.5_5 = sid;
  ret = pfe_if_db_unlock (sid.5_5);
  # DEBUG BEGIN_STMT

  <bb 6> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  D.13136 = phy_if;
  entry = {CLOBBER};
  sid = {CLOBBER};
  return D.13136;

}


