pfe_hif_drv_exit.part.0 (struct pfe_hif_drv_t * hif_drv)
{
  uint32_t ii;
  errno_t D.12532;
  errno_t D.12531;
  struct oal_job_t * _2;
  struct pfe_hif_chnl_t * _3;
  struct pfe_hif_chnl_t * _4;
  struct pfe_hif_chnl_t * _5;
  oal_mutex_t * _6;
  oal_mutex_t * _7;

  <bb 4> [local count: 1073741824]:

  <bb 2> [local count: 1073741824]:
  # DEBUG ii => NULL
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_hif_drv_stop (hif_drv_1(D));
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = &hif_drv_1(D)->tx_job;
  oal_job_destroy (_2);
  # DEBUG BEGIN_STMT
  pfe_hif_drv_destroy_data_channel (hif_drv_1(D));
  # DEBUG BEGIN_STMT
  _3 = hif_drv_1(D)->channel;
  pfe_hif_chnl_set_event_cbk (_3, 1, 0B, 0B);
  # DEBUG BEGIN_STMT
  _4 = hif_drv_1(D)->channel;
  pfe_hif_chnl_set_event_cbk (_4, 2, 0B, 0B);
  # DEBUG BEGIN_STMT
  _5 = hif_drv_1(D)->channel;
  pfe_hif_chnl_set_event_cbk (_5, 4, 0B, 0B);
  # DEBUG BEGIN_STMT
  _6 = &hif_drv_1(D)->tx_lock;
  # DEBUG mutex => _6
  # DEBUG INLINE_ENTRY oal_mutex_destroy
  # DEBUG BEGIN_STMT
  oal_mutex_destroy_internal (_6);
  # DEBUG mutex => NULL
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _7 = &hif_drv_1(D)->cl_api_lock;
  # DEBUG mutex => _7
  # DEBUG INLINE_ENTRY oal_mutex_destroy
  # DEBUG BEGIN_STMT
  oal_mutex_destroy_internal (_7);
  # DEBUG mutex => NULL
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  hif_drv_1(D)->initialized ={v} 0;

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

}


pfe_hif_drv_client_unregister.part.0 (struct pfe_hif_drv_client_t * client)
{
  bool_t enabled;
  struct pfe_hif_drv_t * _2;
  short unsigned int _3;
  struct pfe_hif_drv_t * _4;
  unsigned char _5;
  unsigned char _6;
  int iftmp.18_7;
  struct pfe_hif_drv_t * _9;
  short unsigned int _10;
  struct pfe_hif_ptp_ts_db_t * _11;
  struct pfe_hif_drv_t * _12;

  <bb 11> [local count: 1073741824]:

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _2 = client_1(D)->hif_drv;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#23 => &_2->cl_api_lock
  _3 = MEM[(const oal_mutex_t *)_2 + 3264B];
  # DEBUG D#1 => D#23
  oal_mutex_lock.isra.0 (_3);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = client_1(D)->hif_drv;
  _5 = _4->tx_enabled;
  if (_5 != 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 536870913]:
  _6 = _4->rx_enabled;
  if (_6 != 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 4> [local count: 268435456]:

  <bb 5> [local count: 1073741824]:
  # iftmp.18_7 = PHI <1(2), 1(3), 0(4)>
  enabled_8 = (bool_t) iftmp.18_7;
  # DEBUG enabled => enabled_8
  # DEBUG BEGIN_STMT
  if (enabled_8 != 0)
    goto <bb 6>; [33.00%]
  else
    goto <bb 7>; [67.00%]

  <bb 6> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  pfe_hif_drv_stop (_4);

  <bb 7> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  client_1(D)->active = 0;
  # DEBUG BEGIN_STMT
  _9 = client_1(D)->hif_drv;
  # DEBUG D#24 => &_9->cl_api_lock
  _10 = MEM[(const oal_mutex_t *)_9 + 3264B];
  # DEBUG D#2 => D#24
  oal_mutex_unlock.isra.0 (_10);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  hif_client_free_rx_queues (client_1(D));
  # DEBUG BEGIN_STMT
  hif_client_free_tx_queues (client_1(D));
  # DEBUG BEGIN_STMT
  _11 = &client_1(D)->ptpdb;
  pfe_hif_ptp_ts_db_fini (_11);
  # DEBUG BEGIN_STMT
  if (enabled_8 != 0)
    goto <bb 8>; [33.00%]
  else
    goto <bb 9>; [67.00%]

  <bb 8> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  _12 = client_1(D)->hif_drv;
  pfe_hif_drv_start (_12);

  <bb 9> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  memset (client_1(D), 0, 256);

  <bb 10> [local count: 1073741824]:
  return;

}


pfe_hif_drv_start.part.0 (struct pfe_hif_drv_t * hif_drv)
{
  struct pfe_hif_chnl_t * _2;
  int _3;
  short unsigned int _4;
  struct pfe_hif_chnl_t * _5;
  int _6;
  short unsigned int _7;
  struct pfe_hif_chnl_t * _8;
  struct pfe_hif_chnl_t * _9;
  int _10;

  <bb 8> [count: 0]:

  <bb 2> [count: 0]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = hif_drv_1(D)->channel;
  _3 = pfe_hif_chnl_rx_enable (_2);
  if (_3 != 0)
    goto <bb 4>; [0.00%]
  else
    goto <bb 3>; [0.00%]

  <bb 3> [count: 0]:
  # DEBUG BEGIN_STMT
  hif_drv_1(D)->rx_enabled = 1;

  <bb 4> [count: 0]:
  # DEBUG BEGIN_STMT
  # DEBUG D#21 => &hif_drv_1(D)->tx_lock
  _4 = MEM[(const oal_mutex_t *)hif_drv_1(D) + 64B];
  # DEBUG D#1 => D#21
  oal_mutex_lock.isra.0 (_4);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = hif_drv_1(D)->channel;
  _6 = pfe_hif_chnl_tx_enable (_5);
  if (_6 != 0)
    goto <bb 6>; [0.00%]
  else
    goto <bb 5>; [0.00%]

  <bb 5> [count: 0]:
  # DEBUG BEGIN_STMT
  hif_drv_1(D)->tx_enabled = 1;

  <bb 6> [count: 0]:
  # DEBUG BEGIN_STMT
  # DEBUG D#22 => &hif_drv_1(D)->tx_lock
  _7 = MEM[(const oal_mutex_t *)hif_drv_1(D) + 64B];
  # DEBUG D#2 => D#22
  oal_mutex_unlock.isra.0 (_7);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _8 = hif_drv_1(D)->channel;
  pfe_hif_chnl_rx_irq_unmask (_8);
  # DEBUG BEGIN_STMT
  _9 = hif_drv_1(D)->channel;
  pfe_hif_chnl_tx_irq_unmask (_9);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 7> [count: 0]:
  # _10 = PHI <0(6)>
  return _10;

}


pfe_hif_drv_tx_job.part.0 (void * arg)
{
  struct pfe_hif_drv_t * hif_drv;
  long unsigned int _2;
  short unsigned int _3;
  struct pfe_hif_chnl_t * _4;
  struct pfe_hif_chnl_t * _5;

  <bb 6> [local count: 118111600]:

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = pfe_hif_drv_process_tx (arg_1(D), 128);
  if (_2 > 127)
    goto <bb 3>; [89.00%]
  else
    goto <bb 4>; [11.00%]

  <bb 3> [local count: 955630223]:
  goto <bb 2>; [100.00%]

  <bb 4> [local count: 118111601]:
  # DEBUG BEGIN_STMT
  # DEBUG D#9 => &MEM[(struct pfe_hif_drv_t *)arg_1(D)].tx_lock
  _3 = MEM[(const oal_mutex_t *)arg_1(D) + 64B];
  # DEBUG D#2 => D#9
  oal_mutex_unlock.isra.0 (_3);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = MEM[(struct pfe_hif_drv_t *)arg_1(D)].channel;
  pfe_hif_chnl_tx_irq_unmask (_4);
  # DEBUG BEGIN_STMT
  _5 = MEM[(struct pfe_hif_drv_t *)arg_1(D)].channel;
  pfe_hif_chnl_tx_dma_start (_5);

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

}


pfe_hif_drv_rx_job.part.0 (void * arg)
{
  struct pfe_hif_drv_t * hif_drv;
  long unsigned int _2;
  struct pfe_hif_chnl_t * _3;
  struct pfe_hif_chnl_t * _4;

  <bb 6> [local count: 118111600]:

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = pfe_hif_drv_process_rx (arg_1(D), 64);
  if (_2 > 63)
    goto <bb 3>; [89.00%]
  else
    goto <bb 4>; [11.00%]

  <bb 3> [local count: 955630223]:
  goto <bb 2>; [100.00%]

  <bb 4> [local count: 118111601]:
  # DEBUG BEGIN_STMT
  _3 = MEM[(struct pfe_hif_drv_t *)arg_1(D)].channel;
  pfe_hif_chnl_rx_irq_unmask (_3);
  # DEBUG BEGIN_STMT
  _4 = MEM[(struct pfe_hif_drv_t *)arg_1(D)].channel;
  pfe_hif_chnl_rx_dma_start (_4);

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

}


oal_mutex_unlock.isra.0 (const oal_mutex_t ISRA.37)
{
  errno_t retval;
  short unsigned int _2;
  int _3;
  unsigned char _4;
  void (*<T4e5>) (void) _5;

  <bb 6> [local count: 1073741824]:
  # DEBUG mutex s=> mutex

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG retval => 22
  # DEBUG BEGIN_STMT
  _2 = ISRA.37_10(D);
  if (_2 <= 255)
    goto <bb 3>; [65.00%]
  else
    goto <bb 5>; [35.00%]

  <bb 3> [local count: 697932186]:
  # DEBUG BEGIN_STMT
  _3 = (int) _2;
  _4 = mutex_alloc[_3];
  if (_4 != 0)
    goto <bb 4>; [65.00%]
  else
    goto <bb 5>; [35.00%]

  <bb 4> [local count: 453655921]:
  # DEBUG BEGIN_STMT
  _5 = SchM_Exit_Eth_43_PFE_ETH_EXCLUSIVE_AREA_ID[_3];
  _5 ();
  # DEBUG BEGIN_STMT
  # DEBUG retval => 0

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

}


oal_mutex_lock.isra.0 (const oal_mutex_t ISRA.35)
{
  errno_t retval;
  short unsigned int _2;
  int _3;
  unsigned char _4;
  void (*<T4e5>) (void) _5;

  <bb 6> [local count: 1073741824]:
  # DEBUG mutex s=> mutex

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG retval => 22
  # DEBUG BEGIN_STMT
  _2 = ISRA.35_10(D);
  if (_2 <= 255)
    goto <bb 3>; [65.00%]
  else
    goto <bb 5>; [35.00%]

  <bb 3> [local count: 697932186]:
  # DEBUG BEGIN_STMT
  _3 = (int) _2;
  _4 = mutex_alloc[_3];
  if (_4 != 0)
    goto <bb 4>; [65.00%]
  else
    goto <bb 5>; [35.00%]

  <bb 4> [local count: 453655921]:
  # DEBUG BEGIN_STMT
  _5 = SchM_Enter_Eth_43_PFE_ETH_EXCLUSIVE_AREA_ID[_3];
  _5 ();
  # DEBUG BEGIN_STMT
  # DEBUG retval => 0

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

}


pfe_hif_drv_show_ring_status (struct pfe_hif_drv_t * hif_drv, bool_t rx, bool_t tx)
{
  uint32_t qid;
  uint32_t ii;
  unsigned char _1;
  struct fifo_t * _2;
  _Bool _3;
  long int _4;
  long int _5;
  struct fifo_t * _6;
  long unsigned int _7;
  long unsigned int _8;
  unsigned char _9;
  struct fifo_t * _10;
  _Bool _11;
  long int _12;
  long int _13;
  struct fifo_t * _14;
  long unsigned int _15;
  long unsigned int _16;

  <bb 2> [local count: 694774117]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#32 => &hif_drv_29(D)->clients[0]
  # DEBUG cl => D#32
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = MEM[(struct pfe_hif_drv_client_t *)hif_drv_29(D) + 128B].active;
  if (_1 != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 3> [local count: 347387058]:
  if (rx_31(D) == 1)
    goto <bb 21>; [34.00%]
  else
    goto <bb 10>; [66.00%]

  <bb 21> [local count: 118111600]:
  goto <bb 9>; [100.00%]

  <bb 4> [local count: 955630220]:
  # DEBUG BEGIN_STMT
  # DEBUG D#34 => &MEM[(struct pfe_hif_drv_client_t *)hif_drv_29(D) + 128B].rx_q[qid_19]
  # DEBUG rx_q => D#34
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = MEM[(struct client_rx_queue *)hif_drv_29(D) + 128B].rx_q[qid_19].rx_fifo;
  _3 = _2 == 0B;
  _4 = (long int) _3;
  _5 = __builtin_expect (_4, 1);
  if (_5 != 0)
    goto <bb 5>; [90.00%]
  else
    goto <bb 22>; [10.00%]

  <bb 22> [local count: 95563022]:
  goto <bb 7>; [100.00%]

  <bb 5> [local count: 860067198]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 8>; [100.00%]

  <bb 6> [local count: 773191728]:
  # DEBUG BEGIN_STMT
  _6 = MEM[(struct client_rx_queue *)hif_drv_29(D) + 128B].rx_q[qid_19].rx_fifo;
  fifo_peek (_6, ii_17);
  # DEBUG pkt => NULL
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ii_33 = ii_17 + 1;
  # DEBUG ii => ii_33

  <bb 7> [local count: 868754750]:
  # ii_17 = PHI <ii_33(6), 0(22)>
  # DEBUG ii => ii_17
  # DEBUG BEGIN_STMT
  _7 = MEM[(struct client_rx_queue *)hif_drv_29(D) + 128B].rx_q[qid_19].size;
  if (_7 > ii_17)
    goto <bb 6>; [89.00%]
  else
    goto <bb 8>; [11.00%]

  <bb 8> [local count: 955630220]:
  # DEBUG BEGIN_STMT
  qid_34 = qid_19 + 1;
  # DEBUG qid => qid_34

  <bb 9> [local count: 1073741821]:
  # qid_19 = PHI <qid_34(8), 0(21)>
  # DEBUG qid => qid_19
  # DEBUG BEGIN_STMT
  _8 = MEM[(struct pfe_hif_drv_client_t *)hif_drv_29(D) + 128B].rx_qn;
  if (_8 > qid_19)
    goto <bb 4>; [89.00%]
  else
    goto <bb 10>; [11.00%]

  <bb 10> [local count: 694774118]:
  # DEBUG BEGIN_STMT
  _9 = MEM[(struct pfe_hif_drv_client_t *)hif_drv_29(D) + 128B].active;
  if (_9 != 0)
    goto <bb 11>; [50.00%]
  else
    goto <bb 18>; [50.00%]

  <bb 11> [local count: 347387059]:
  if (tx_35(D) == 1)
    goto <bb 19>; [34.00%]
  else
    goto <bb 18>; [66.00%]

  <bb 19> [local count: 118111600]:
  goto <bb 17>; [100.00%]

  <bb 12> [local count: 955630224]:
  # DEBUG BEGIN_STMT
  # DEBUG D#33 => &MEM[(struct pfe_hif_drv_client_t *)hif_drv_29(D) + 128B].tx_q[qid_20]
  # DEBUG tx_q => D#33
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _10 = MEM[(struct client_tx_queue *)hif_drv_29(D) + 128B].tx_q[qid_20].tx_conf_fifo;
  _11 = _10 == 0B;
  _12 = (long int) _11;
  _13 = __builtin_expect (_12, 1);
  if (_13 != 0)
    goto <bb 13>; [90.00%]
  else
    goto <bb 20>; [10.00%]

  <bb 20> [local count: 95563022]:
  goto <bb 15>; [100.00%]

  <bb 13> [local count: 860067202]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 16>; [100.00%]

  <bb 14> [local count: 773191730]:
  # DEBUG BEGIN_STMT
  _14 = MEM[(struct client_tx_queue *)hif_drv_29(D) + 128B].tx_q[qid_20].tx_conf_fifo;
  fifo_peek (_14, ii_18);
  # DEBUG pkt => NULL
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ii_37 = ii_18 + 1;
  # DEBUG ii => ii_37

  <bb 15> [local count: 868754754]:
  # ii_18 = PHI <ii_37(14), 0(20)>
  # DEBUG ii => ii_18
  # DEBUG BEGIN_STMT
  _15 = MEM[(struct client_tx_queue *)hif_drv_29(D) + 128B].tx_q[qid_20].size;
  if (_15 > ii_18)
    goto <bb 14>; [89.00%]
  else
    goto <bb 16>; [11.00%]

  <bb 16> [local count: 955630226]:
  # DEBUG BEGIN_STMT
  qid_38 = qid_20 + 1;
  # DEBUG qid => qid_38

  <bb 17> [local count: 1073741824]:
  # qid_20 = PHI <qid_38(16), 0(19)>
  # DEBUG qid => qid_20
  # DEBUG BEGIN_STMT
  _16 = MEM[(struct pfe_hif_drv_client_t *)hif_drv_29(D) + 128B].rx_qn;
  if (_16 > qid_20)
    goto <bb 12>; [89.00%]
  else
    goto <bb 18>; [11.00%]

  <bb 18> [local count: 694774120]:
  return;

}


pfe_hif_drv_get_chnl (const struct pfe_hif_drv_t * hif_drv)
{
  struct pfe_hif_chnl_t * entry;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG entry => 0B
  # DEBUG BEGIN_STMT
  entry_3 = hif_drv_2(D)->channel;
  # DEBUG entry => entry_3
  # DEBUG BEGIN_STMT
  return entry_3;

}


pfe_hif_drv_destroy (struct pfe_hif_drv_t * hif_drv)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  if (hif_drv_2(D) == 0B)
    goto <bb 4>; [30.95%]
  else
    goto <bb 3>; [69.05%]

  <bb 3> [local count: 741418730]:
  # DEBUG BEGIN_STMT
  pfe_hif_drv_exit (hif_drv_2(D));
  # DEBUG BEGIN_STMT
  oal_mm_free (hif_drv_2(D));

  <bb 4> [local count: 1073741824]:
  return;

}


pfe_hif_drv_exit (struct pfe_hif_drv_t * hif_drv)
{
  unsigned char _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 ={v} hif_drv_4(D)->initialized;
  if (_1 == 0)
    goto <bb 4>; [51.12%]
  else
    goto <bb 3>; [48.88%]

  <bb 3> [local count: 524845000]:
  pfe_hif_drv_exit.part.0 (hif_drv_4(D));

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

}


pfe_hif_drv_stop (struct pfe_hif_drv_t * hif_drv)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  pfe_hif_drv_stop_rx (hif_drv_2(D));
  # DEBUG BEGIN_STMT
  pfe_hif_drv_stop_tx (hif_drv_2(D));
  return;

}


pfe_hif_drv_stop_rx (struct pfe_hif_drv_t * hif_drv)
{
  uint32_t hif_stop_timeout;
  unsigned char _1;
  struct pfe_hif_chnl_t * _2;
  struct pfe_hif_chnl_t * _3;
  unsigned char _4;
  struct pfe_hif_chnl_t * _5;
  struct pfe_hif_chnl_t * _6;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = hif_drv_12(D)->rx_enabled;
  if (_1 == 1)
    goto <bb 3>; [0.00%]
  else
    goto <bb 7>; [100.00%]

  <bb 3> [count: 0]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = hif_drv_12(D)->channel;
  pfe_hif_chnl_rx_disable (_2);
  # DEBUG BEGIN_STMT
  # DEBUG hif_stop_timeout => 10

  <bb 4> [count: 0]:
  # hif_stop_timeout_7 = PHI <10(3), hif_stop_timeout_16(8)>
  # DEBUG hif_stop_timeout => hif_stop_timeout_7
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = hif_drv_12(D)->channel;
  _4 = pfe_hif_chnl_is_rx_dma_active (_3);
  if (_4 != 0)
    goto <bb 5>; [0.00%]
  else
    goto <bb 6>; [0.00%]

  <bb 5> [count: 0]:
  # DEBUG BEGIN_STMT
  oal_time_usleep (250);
  # DEBUG BEGIN_STMT
  hif_stop_timeout_16 = hif_stop_timeout_7 + 4294967295;
  # DEBUG hif_stop_timeout => hif_stop_timeout_16
  if (hif_stop_timeout_7 != 0)
    goto <bb 8>; [0.00%]
  else
    goto <bb 6>; [0.00%]

  <bb 8> [count: 0]:
  goto <bb 4>; [0.00%]

  <bb 6> [count: 0]:
  # DEBUG BEGIN_STMT
  _5 = hif_drv_12(D)->channel;
  pfe_hif_chnl_is_rx_dma_active (_5);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  hif_drv_12(D)->rx_enabled = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = hif_drv_12(D)->channel;
  pfe_hif_chnl_rx_irq_mask (_6);

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

}


pfe_hif_drv_stop_tx (struct pfe_hif_drv_t * hif_drv)
{
  uint32_t hif_stop_timeout;
  unsigned char _1;
  struct pfe_hif_chnl_t * _2;
  struct pfe_hif_chnl_t * _3;
  unsigned char _4;
  struct pfe_hif_chnl_t * _5;
  struct oal_job_t * _6;
  struct pfe_hif_chnl_t * _7;
  short unsigned int _25;
  short unsigned int _26;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = hif_drv_13(D)->tx_enabled;
  if (_1 == 1)
    goto <bb 3>; [0.04%]
  else
    goto <bb 7>; [99.96%]

  <bb 3> [local count: 429497]:
  # DEBUG BEGIN_STMT
  # DEBUG D#14 => &hif_drv_13(D)->tx_lock
  _25 = MEM[(const oal_mutex_t *)hif_drv_13(D) + 64B];
  # DEBUG D#1 => D#14
  oal_mutex_lock.isra.0 (_25);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = hif_drv_13(D)->channel;
  pfe_hif_chnl_tx_disable (_2);
  # DEBUG BEGIN_STMT
  # DEBUG hif_stop_timeout => 10

  <bb 4> [local count: 3048227]:
  # hif_stop_timeout_8 = PHI <10(3), hif_stop_timeout_18(8)>
  # DEBUG hif_stop_timeout => hif_stop_timeout_8
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = hif_drv_13(D)->channel;
  _4 = pfe_hif_chnl_is_tx_dma_active (_3);
  if (_4 != 0)
    goto <bb 5>; [94.50%]
  else
    goto <bb 6>; [5.50%]

  <bb 5> [local count: 2880575]:
  # DEBUG BEGIN_STMT
  oal_time_usleep (250);
  # DEBUG BEGIN_STMT
  hif_stop_timeout_18 = hif_stop_timeout_8 + 4294967295;
  # DEBUG hif_stop_timeout => hif_stop_timeout_18
  if (hif_stop_timeout_8 != 0)
    goto <bb 8>; [90.91%]
  else
    goto <bb 6>; [9.09%]

  <bb 8> [local count: 2618730]:
  goto <bb 4>; [100.00%]

  <bb 6> [local count: 429497]:
  # DEBUG BEGIN_STMT
  _5 = hif_drv_13(D)->channel;
  pfe_hif_chnl_is_tx_dma_active (_5);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  hif_drv_13(D)->tx_enabled = 0;
  # DEBUG BEGIN_STMT
  # DEBUG D#15 => &hif_drv_13(D)->tx_lock
  _26 = MEM[(const oal_mutex_t *)hif_drv_13(D) + 64B];
  # DEBUG D#2 => D#15
  oal_mutex_unlock.isra.0 (_26);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = &hif_drv_13(D)->tx_job;
  oal_job_run (_6);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  oal_job_drain (_6);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _7 = hif_drv_13(D)->channel;
  pfe_hif_chnl_tx_irq_mask (_7);
  # DEBUG BEGIN_STMT

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

}


pfe_hif_drv_start (struct pfe_hif_drv_t * hif_drv)
{
  unsigned char _1;
  int _2;
  errno_t _5;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 ={v} hif_drv_7(D)->initialized;
  if (_1 == 0)
    goto <bb 4>; [100.00%]
  else
    goto <bb 3>; [0.00%]

  <bb 3> [count: 0]:
  _2 = pfe_hif_drv_start.part.0 (hif_drv_7(D));

  <bb 4> [local count: 1073741824]:
  # _5 = PHI <19(2), _2(3)>
  return _5;

}


pfe_hif_drv_init (struct pfe_hif_drv_t * hif_drv)
{
  errno_t ret;
  unsigned char _1;
  int _2;
  oal_mutex_t * _3;
  oal_mutex_t * _4;
  struct pfe_hif_chnl_t * _5;
  struct pfe_hif_chnl_t * _6;
  struct pfe_hif_chnl_t * _7;
  struct oal_job_t * _8;
  struct oal_job_t * _9;
  struct pfe_hif_chnl_t * _10;
  struct pfe_hif_chnl_t * _11;
  struct pfe_hif_chnl_t * _12;
  errno_t _18;
  int _45;
  int _46;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 ={v} hif_drv_26(D)->initialized;
  if (_1 != 0)
    goto <bb 23>; [100.00%]
  else
    goto <bb 3>; [0.00%]

  <bb 3> [count: 0]:
  # DEBUG BEGIN_STMT
  hif_drv_26(D)->started = 0;
  # DEBUG BEGIN_STMT
  _2 = pfe_hif_drv_create_data_channel (hif_drv_26(D));
  if (_2 != 0)
    goto <bb 4>; [0.00%]
  else
    goto <bb 5>; [0.00%]

  <bb 4> [count: 0]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 11
  # DEBUG BEGIN_STMT
  // predicted unlikely by goto predictor.
  goto <bb 23>; [0.00%]

  <bb 5> [count: 0]:
  # DEBUG BEGIN_STMT
  hif_drv_26(D)->tx_lock = 180;
  # DEBUG BEGIN_STMT
  _3 = &hif_drv_26(D)->tx_lock;
  # DEBUG mutex => _3
  # DEBUG INLINE_ENTRY oal_mutex_init
  # DEBUG BEGIN_STMT
  _45 = oal_mutex_init_internal (_3);
  # DEBUG mutex => NULL
  # DEBUG ret => _45
  # DEBUG BEGIN_STMT
  if (_45 != 0)
    goto <bb 6>; [0.00%]
  else
    goto <bb 7>; [0.00%]

  <bb 6> [count: 0]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  // predicted unlikely by goto predictor.
  goto <bb 22>; [0.00%]

  <bb 7> [count: 0]:
  # DEBUG BEGIN_STMT
  hif_drv_26(D)->cl_api_lock = 181;
  # DEBUG BEGIN_STMT
  _4 = &hif_drv_26(D)->cl_api_lock;
  # DEBUG mutex => _4
  # DEBUG INLINE_ENTRY oal_mutex_init
  # DEBUG BEGIN_STMT
  _46 = oal_mutex_init_internal (_4);
  # DEBUG mutex => NULL
  # DEBUG ret => _46
  # DEBUG BEGIN_STMT
  if (_46 != 0)
    goto <bb 8>; [0.00%]
  else
    goto <bb 9>; [0.00%]

  <bb 8> [count: 0]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  // predicted unlikely by goto predictor.
  goto <bb 21>; [0.00%]

  <bb 9> [count: 0]:
  # DEBUG BEGIN_STMT
  _5 = hif_drv_26(D)->channel;
  ret_32 = pfe_hif_chnl_set_event_cbk (_5, 1, pfe_hif_drv_rx_job, hif_drv_26(D));
  # DEBUG ret => ret_32
  # DEBUG BEGIN_STMT
  if (ret_32 != 0)
    goto <bb 10>; [0.00%]
  else
    goto <bb 11>; [0.00%]

  <bb 10> [count: 0]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  // predicted unlikely by goto predictor.
  goto <bb 20>; [0.00%]

  <bb 11> [count: 0]:
  # DEBUG BEGIN_STMT
  _6 = hif_drv_26(D)->channel;
  ret_34 = pfe_hif_chnl_set_event_cbk (_6, 2, pfe_hif_drv_chnl_tx_isr, hif_drv_26(D));
  # DEBUG ret => ret_34
  # DEBUG BEGIN_STMT
  if (ret_34 != 0)
    goto <bb 12>; [0.00%]
  else
    goto <bb 13>; [0.00%]

  <bb 12> [count: 0]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  // predicted unlikely by goto predictor.
  goto <bb 19>; [0.00%]

  <bb 13> [count: 0]:
  # DEBUG BEGIN_STMT
  _7 = hif_drv_26(D)->channel;
  ret_36 = pfe_hif_chnl_set_event_cbk (_7, 4, pfe_hif_drv_chnl_rx_oob_handler, hif_drv_26(D));
  # DEBUG ret => ret_36
  # DEBUG BEGIN_STMT
  if (ret_36 != 0)
    goto <bb 14>; [0.00%]
  else
    goto <bb 15>; [0.00%]

  <bb 14> [count: 0]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  // predicted unlikely by goto predictor.
  goto <bb 18>; [0.00%]

  <bb 15> [count: 0]:
  # DEBUG BEGIN_STMT
  _8 = &hif_drv_26(D)->tx_job;
  _9 = oal_job_create (pfe_hif_drv_tx_job, hif_drv_26(D), "HIF TX JOB", 1, _8);
  if (_9 == 0B)
    goto <bb 16>; [0.00%]
  else
    goto <bb 17>; [0.00%]

  <bb 16> [count: 0]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 117
  # DEBUG BEGIN_STMT
  // predicted unlikely by goto predictor.
  # DEBUG err9 => NULL
  # DEBUG BEGIN_STMT
  _10 = hif_drv_26(D)->channel;
  pfe_hif_chnl_set_event_cbk (_10, 4, 0B, 0B);
  goto <bb 18>; [0.00%]

  <bb 17> [count: 0]:
  # DEBUG BEGIN_STMT
  hif_drv_26(D)->rx_enabled = 0;
  # DEBUG BEGIN_STMT
  hif_drv_26(D)->tx_enabled = 0;
  # DEBUG BEGIN_STMT
  hif_drv_26(D)->initialized ={v} 1;
  # DEBUG BEGIN_STMT
  goto <bb 23>; [0.00%]

  <bb 18> [count: 0]:
  # ret_13 = PHI <ret_36(14), 117(16)>
err7:
  # DEBUG ret => ret_13
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _11 = hif_drv_26(D)->channel;
  pfe_hif_chnl_set_event_cbk (_11, 2, 0B, 0B);

  <bb 19> [count: 0]:
  # ret_14 = PHI <ret_34(12), ret_13(18)>
err6:
  # DEBUG ret => ret_14
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _12 = hif_drv_26(D)->channel;
  pfe_hif_chnl_set_event_cbk (_12, 1, 0B, 0B);

  <bb 20> [count: 0]:
  # ret_15 = PHI <ret_32(10), ret_14(19)>
err5:
  # DEBUG ret => ret_15
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG mutex => _4
  # DEBUG INLINE_ENTRY oal_mutex_destroy
  # DEBUG BEGIN_STMT
  oal_mutex_destroy_internal (_4);
  # DEBUG mutex => NULL

  <bb 21> [count: 0]:
  # ret_16 = PHI <_46(8), ret_15(20)>
err4:
  # DEBUG ret => ret_16
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG mutex => _3
  # DEBUG INLINE_ENTRY oal_mutex_destroy
  # DEBUG BEGIN_STMT
  oal_mutex_destroy_internal (_3);
  # DEBUG mutex => NULL

  <bb 22> [count: 0]:
  # ret_17 = PHI <_45(6), ret_16(21)>
err3:
  # DEBUG ret => ret_17
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_hif_drv_destroy_data_channel (hif_drv_26(D));

  <bb 23> [local count: 1073741824]:
  # _18 = PHI <121(2), 0(17), ret_17(22), 11(4)>
  # DEBUG ret => NULL
  return _18;

}


pfe_hif_drv_create (struct pfe_hif_chnl_t * channel)
{
  struct pfe_hif_drv_t * hif_drv;
  long unsigned int _1;
  struct pfe_hif_drv_t * _2;

  <bb 2> [count: 0]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pfe_hif_chnl_get_meta_size (channel_5(D));
  if (_1 <= 31)
    goto <bb 5>; [0.00%]
  else
    goto <bb 3>; [0.00%]

  <bb 3> [count: 0]:
  # DEBUG BEGIN_STMT
  hif_drv_8 = oal_mm_malloc (3328);
  # DEBUG hif_drv => hif_drv_8
  # DEBUG BEGIN_STMT
  if (hif_drv_8 == 0B)
    goto <bb 5>; [0.00%]
  else
    goto <bb 4>; [0.00%]

  <bb 4> [count: 0]:
  # DEBUG BEGIN_STMT
  memset (hif_drv_8, 0, 3328);
  # DEBUG BEGIN_STMT
  hif_drv_8->channel = channel_5(D);
  # DEBUG BEGIN_STMT

  <bb 5> [count: 0]:
  # _2 = PHI <0B(2), 0B(3), hif_drv_8(4)>
  return _2;

}


pfe_hif_drv_client_get_ts (struct pfe_hif_drv_client_t * const client, bool_t rx, uint8_t type, uint16_t port, uint16_t seq_id, uint32_t * const ts_sec, uint32_t * const ts_nsec)
{
  struct pfe_hif_ptp_ts_db_t * _1;
  errno_t _11;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = &client_2(D)->ptpdb;
  _11 = pfe_hif_ptp_ts_db_pop (_1, type_4(D), port_5(D), seq_id_6(D), ts_sec_7(D), ts_nsec_8(D), rx_9(D));
  return _11;

}


pfe_hif_drv_client_xmit_pkt (struct pfe_hif_drv_client_t * client, uint32_t queue, void * data_pa, void * data_va, uint32_t len, void * ref_ptr)
{
  struct hif_drv_sg_list_t sg_list;
  errno_t _16;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  sg_list.size = 1;
  # DEBUG BEGIN_STMT
  sg_list.flags.common = 0;
  # DEBUG BEGIN_STMT
  sg_list.flags.specific.tx_flags = 0;
  # DEBUG BEGIN_STMT
  sg_list.items[0].data_pa = data_pa_5(D);
  # DEBUG BEGIN_STMT
  sg_list.items[0].data_va = data_va_7(D);
  # DEBUG BEGIN_STMT
  sg_list.items[0].len = len_9(D);
  # DEBUG BEGIN_STMT
  sg_list.dst_phy = 10;
  # DEBUG BEGIN_STMT
  _16 = pfe_hif_drv_client_xmit_sg_pkt (client_12(D), queue_13(D), &sg_list, ref_ptr_14(D));
  sg_list ={v} {CLOBBER};
  return _16;

}


pfe_hif_drv_client_xmit_sg_pkt (struct pfe_hif_drv_client_t * client, uint32_t queue, const struct hif_drv_sg_list_t * const sg_list, void * ref_ptr)
{
  uint16_t refnum;
  struct oal_util_ptp_header_t * ptph;
  const struct trTxMeta * tx_meta;
  struct Eth_PFE_LLD_trTxTsRef * tx_ts_ref_mcal;
  struct pfe_ct_hif_tx_hdr_t * tx_hdr;
  struct pfe_hif_drv_t * hif_drv;
  struct pfe_hif_tx_meta_t * tx_metadata;
  uint32_t ii;
  errno_t err;
  unsigned char _1;
  _Bool _2;
  long int _3;
  long int _4;
  struct pfe_hif_chnl_t * _5;
  long unsigned int _6;
  short unsigned int _7;
  unsigned char _8;
  _Bool _9;
  long int _10;
  long int _11;
  struct pfe_hif_tx_meta_t * _12;
  long unsigned int _13;
  long unsigned int _14;
  unsigned char _15;
  <unnamed type> _16;
  <unnamed type> _17;
  <unnamed type> _18;
  <unnamed type> _19;
  long unsigned int _20;
  <unnamed type> _21;
  int _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;
  long unsigned int _26;
  long unsigned int _27;
  long unsigned int _28;
  long unsigned int _29;
  long unsigned int _30;
  long unsigned int _31;
  long unsigned int _32;
  <unnamed type> _33;
  int _34;
  long unsigned int _35;
  long unsigned int _36;
  long unsigned int _37;
  long unsigned int _38;
  long unsigned int _39;
  long unsigned int _40;
  long unsigned int _41;
  long unsigned int _42;
  long unsigned int _43;
  long unsigned int _44;
  <unnamed type> _45;
  unsigned char _46;
  short unsigned int _47;
  long unsigned int _48;
  unsigned char _49;
  void * _50;
  unsigned int _51;
  unsigned int _52;
  uint8_t * _53;
  long unsigned int _54;
  int _55;
  struct oal_util_ptp_header_t * ptph.22_56;
  unsigned char _57;
  unsigned char _58;
  unsigned char _59;
  long unsigned int _60;
  short unsigned int _61;
  short unsigned int _62;
  <unnamed type> _63;
  <unnamed type> _64;
  unsigned char _65;
  short unsigned int _66;
  long unsigned int _67;
  struct oal_util_ptp_header_t * ptph.25_68;
  <unnamed-unsigned:4> _69;
  unsigned char _70;
  short unsigned int _71;
  short unsigned int _72;
  short unsigned int _73;
  short unsigned int _74;
  struct pfe_hif_ptp_ts_db_t * _75;
  <unnamed type> _76;
  unsigned char _77;
  void * _78;
  struct pfe_hif_drv_t * _79;
  struct pfe_hif_chnl_t * _80;
  void * _81;
  void * _82;
  long unsigned int _83;
  long unsigned int _84;
  _Bool _85;
  unsigned char _86;
  _Bool _87;
  long int _88;
  long int _89;
  long unsigned int _90;
  long unsigned int _91;
  long unsigned int _92;
  long unsigned int _93;
  errno_t _95;
  short unsigned int _147;
  short unsigned int _148;
  short unsigned int _149;
  short unsigned int _150;
  short unsigned int _151;

  <bb 2> [local count: 198178275]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  hif_drv_104 = client_103(D)->hif_drv;
  # DEBUG hif_drv => hif_drv_104
  # DEBUG BEGIN_STMT
  # DEBUG D#16 => &hif_drv_104->tx_lock
  _147 = MEM[(const oal_mutex_t *)hif_drv_104 + 64B];
  # DEBUG D#1 => D#16
  oal_mutex_lock.isra.0 (_147);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = hif_drv_104->tx_enabled;
  _2 = _1 == 0;
  _3 = (long int) _2;
  _4 = __builtin_expect (_3, 0);
  if (_4 != 0)
    goto <bb 3>; [10.00%]
  else
    goto <bb 4>; [90.00%]

  <bb 3> [local count: 19817827]:
  # DEBUG BEGIN_STMT
  # DEBUG D#20 => &hif_drv_104->tx_lock
  _148 = MEM[(const oal_mutex_t *)hif_drv_104 + 64B];
  # DEBUG D#2 => D#20
  oal_mutex_unlock.isra.0 (_148);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  goto <bb 26>; [100.00%]

  <bb 4> [local count: 178360447]:
  # DEBUG BEGIN_STMT
  _5 = hif_drv_104->channel;
  _6 = sg_list_106(D)->size;
  _7 = (short unsigned int) _6;
  _8 = pfe_hif_chnl_can_accept_tx_num (_5, _7);
  _9 = _8 == 0;
  _10 = (long int) _9;
  _11 = __builtin_expect (_10, 0);
  if (_11 != 0)
    goto <bb 5>; [10.00%]
  else
    goto <bb 6>; [90.00%]

  <bb 5> [local count: 17836045]:
  # DEBUG BEGIN_STMT
  pfe_hif_chnl_tx_dma_start (_5);
  # DEBUG BEGIN_STMT
  # DEBUG D#19 => &hif_drv_104->tx_lock
  _149 = MEM[(const oal_mutex_t *)hif_drv_104 + 64B];
  # DEBUG D#2 => D#19
  oal_mutex_unlock.isra.0 (_149);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  goto <bb 26>; [100.00%]

  <bb 6> [local count: 160524402]:
  # DEBUG BEGIN_STMT
  _12 = hif_drv_104->tx_meta;
  _13 = hif_drv_104->tx_meta_wr_idx;
  _14 = _13 * 32;
  tx_metadata_107 = _12 + _14;
  # DEBUG tx_metadata => tx_metadata_107
  # DEBUG BEGIN_STMT
  tx_metadata_107->client = client_103(D);
  # DEBUG BEGIN_STMT
  _15 = (unsigned char) queue_109(D);
  tx_metadata_107->q_no = _15;
  # DEBUG BEGIN_STMT
  tx_hdr_111 = tx_metadata_107->hif_tx_header;
  # DEBUG tx_hdr => tx_hdr_111
  # DEBUG BEGIN_STMT
  tx_hdr_111->queue = _15;
  # DEBUG BEGIN_STMT
  _16 = sg_list_106(D)->flags.specific.tx_flags;
  # DEBUG BEGIN_STMT
  _17 = _16 | 8;
  # DEBUG BEGIN_STMT
  _18 = _17 | 16;
  # DEBUG BEGIN_STMT
  _19 = _18 | 32;
  tx_hdr_111->flags = _19;
  # DEBUG BEGIN_STMT
  _20 = client_103(D)->id_mask;
  if (_20 == 1024)
    goto <bb 7>; [34.00%]
  else
    goto <bb 8>; [66.00%]

  <bb 7> [local count: 54578297]:
  # DEBUG BEGIN_STMT
  _21 = sg_list_106(D)->dst_phy;
  _22 = (int) _21;
  _23 = 1 << _22;
  _24 = _23 >> 24;
  _25 = _23 >> 8;
  _26 = _25 & 65280;
  _27 = _24 | _26;
  _28 = _23 << 8;
  _29 = _28 & 16711680;
  _30 = _27 | _29;
  _31 = _23 << 24;
  _32 = _30 | _31;
  tx_hdr_111->e_phy_ifs = _32;
  # DEBUG BEGIN_STMT
  tx_hdr_111->flags = 192;
  goto <bb 11>; [100.00%]

  <bb 8> [local count: 105946105]:
  # DEBUG BEGIN_STMT
  if (_20 == 2048)
    goto <bb 9>; [34.00%]
  else
    goto <bb 10>; [66.00%]

  <bb 9> [local count: 36021676]:
  # DEBUG BEGIN_STMT
  tx_hdr_111->e_phy_ifs = 0;
  goto <bb 11>; [100.00%]

  <bb 10> [local count: 69924430]:
  # DEBUG BEGIN_STMT
  _33 = client_103(D)->phy_if_id;
  _34 = (int) _33;
  _35 = 1 << _34;
  _36 = _35 >> 24;
  _37 = _35 >> 8;
  _38 = _37 & 65280;
  _39 = _36 | _38;
  _40 = _35 << 8;
  _41 = _40 & 16711680;
  _42 = _39 | _41;
  _43 = _35 << 24;
  _44 = _42 | _43;
  tx_hdr_111->e_phy_ifs = _44;
  # DEBUG BEGIN_STMT
  _45 = _19 | 64;
  tx_hdr_111->flags = _45;

  <bb 11> [local count: 160524402]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ref_ptr_mcal => ref_ptr_119(D)
  # DEBUG BEGIN_STMT
  _46 = MEM[(const struct Eth_PFE_LLD_trTxRefData *)ref_ptr_119(D)].u8CtrlIdx;
  _47 = MEM[(const struct Eth_PFE_LLD_trTxRefData *)ref_ptr_119(D)].u16BufIdx;
  _48 = (long unsigned int) _47;
  tx_meta_121 = Eth_PFE_LLD_GetTxBufMeta (_46, _48);
  # DEBUG tx_meta => tx_meta_121
  # DEBUG BEGIN_STMT
  _49 = tx_meta_121->bDoTS;
  if (_49 == 1)
    goto <bb 12>; [20.24%]
  else
    goto <bb 19>; [79.76%]

  <bb 12> [local count: 32490139]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _50 = sg_list_106(D)->items[0].data_va;
  _51 = (unsigned int) _50;
  _52 = _51 + 16;
  _53 = (uint8_t *) _52;
  _54 = sg_list_106(D)->items[0].len;
  _55 = oal_util_parse_ptp (_53, _54, &ptph);
  if (_55 == 0)
    goto <bb 13>; [50.00%]
  else
    goto <bb 18>; [50.00%]

  <bb 13> [local count: 16245069]:
  # DEBUG BEGIN_STMT
  ptph.22_56 = ptph;
  _57 = VIEW_CONVERT_EXPR<unsigned char>(ptph.22_56->byte1);
  _58 = _57 & 14;
  if (_58 == 0)
    goto <bb 16>; [33.00%]
  else
    goto <bb 14>; [67.00%]

  <bb 14> [local count: 10884197]:
  _59 = _57 & 15;
  if (_59 == 2)
    goto <bb 16>; [34.00%]
  else
    goto <bb 15>; [66.00%]

  <bb 15> [local count: 7183570]:
  if (_59 == 3)
    goto <bb 16>; [34.00%]
  else
    goto <bb 18>; [66.00%]

  <bb 16> [local count: 11503913]:
  # DEBUG BEGIN_STMT
  _60 = oal_util_get_unique_seqnum32 ();
  _61 = (short unsigned int) _60;
  refnum_124 = _61 & 4095;
  # DEBUG refnum => refnum_124
  # DEBUG BEGIN_STMT
  _62 = refnum_124 r>> 8;
  tx_hdr_111->refnum = _62;
  # DEBUG BEGIN_STMT
  _63 = tx_hdr_111->flags;
  _64 = _63 | 4;
  tx_hdr_111->flags = _64;
  # DEBUG BEGIN_STMT
  _65 = MEM[(const struct Eth_PFE_LLD_trTxRefData *)ref_ptr_119(D)].u8CtrlIdx;
  _66 = MEM[(const struct Eth_PFE_LLD_trTxRefData *)ref_ptr_119(D)].u16BufIdx;
  _67 = (long unsigned int) _66;
  tx_ts_ref_mcal_128 = Eth_PFE_LLD_GetTxBufTsRef (_65, _67);
  # DEBUG tx_ts_ref_mcal => tx_ts_ref_mcal_128
  # DEBUG BEGIN_STMT
  ptph.25_68 = ptph;
  _69 = ptph.25_68->byte1.messageType;
  _70 = (unsigned char) _69;
  tx_ts_ref_mcal_128->u8MessageType = _70;
  # DEBUG BEGIN_STMT
  _71 = ptph.25_68->sourcePortID;
  _72 = _71 r>> 8;
  tx_ts_ref_mcal_128->u16SourcePortID = _72;
  # DEBUG BEGIN_STMT
  _73 = ptph.25_68->sequenceID;
  _74 = _73 r>> 8;
  tx_ts_ref_mcal_128->u16SequenceID = _74;
  # DEBUG BEGIN_STMT
  _75 = &client_103(D)->ptpdb;
  err_133 = pfe_hif_ptp_ts_db_push_msg (_75, 0, refnum_124, _70, _72, _74);
  # DEBUG err => err_133
  # DEBUG BEGIN_STMT
  if (err_133 != 0)
    goto <bb 17>; [50.00%]
  else
    goto <bb 18>; [50.00%]

  <bb 17> [local count: 5751957]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _76 = tx_hdr_111->flags;
  _77 = _76 & 251;
  tx_hdr_111->flags = _77;

  <bb 18> [local count: 32490139]:
  # DEBUG BEGIN_STMT
  ptph ={v} {CLOBBER};

  <bb 19> [local count: 160524402]:
  # DEBUG BEGIN_STMT
  _78 = sg_list_106(D)->items[0].data_va;
  memcpy (_78, tx_hdr_111, 16);
  # DEBUG BEGIN_STMT
  tx_metadata_107->ref_ptr = ref_ptr_119(D);
  # DEBUG BEGIN_STMT
  # DEBUG ii => 0
  goto <bb 22>; [100.00%]

  <bb 20> [local count: 1014686024]:
  # DEBUG BEGIN_STMT
  _79 = client_103(D)->hif_drv;
  _80 = _79->channel;
  _81 = sg_list_106(D)->items[ii_94].data_pa;
  _82 = sg_list_106(D)->items[ii_94].data_va;
  _83 = sg_list_106(D)->items[ii_94].len;
  _84 = ii_94 + 1;
  _85 = _84 >= _90;
  _86 = (unsigned char) _85;
  err_142 = pfe_hif_chnl_tx (_80, _81, _82, _83, _86);
  # DEBUG err => err_142
  # DEBUG BEGIN_STMT
  _87 = err_142 != 0;
  _88 = (long int) _87;
  _89 = __builtin_expect (_88, 0);
  if (_89 != 0)
    goto <bb 21>; [10.00%]
  else
    goto <bb 22>; [90.00%]

  <bb 21> [local count: 101468602]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  // predicted unlikely by goto predictor.
  # DEBUG unlock_and_fail => NULL
  # DEBUG BEGIN_STMT
  # DEBUG D#18 => &hif_drv_104->tx_lock
  _150 = MEM[(const oal_mutex_t *)hif_drv_104 + 64B];
  # DEBUG D#2 => D#18
  oal_mutex_unlock.isra.0 (_150);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  goto <bb 26>; [100.00%]

  <bb 22> [local count: 1073741824]:
  # ii_94 = PHI <0(19), _84(20)>
  # DEBUG ii => ii_94
  # DEBUG BEGIN_STMT
  _90 = sg_list_106(D)->size;
  if (_90 > ii_94)
    goto <bb 20>; [94.50%]
  else
    goto <bb 23>; [5.50%]

  <bb 23> [local count: 59055800]:
  # DEBUG BEGIN_STMT
  _91 = hif_drv_104->tx_meta_wr_idx;
  _92 = _91 + 1;
  hif_drv_104->tx_meta_wr_idx = _92;
  # DEBUG BEGIN_STMT
  _93 = hif_drv_104->tx_meta_number;
  if (_92 >= _93)
    goto <bb 24>; [50.00%]
  else
    goto <bb 25>; [50.00%]

  <bb 24> [local count: 29527900]:
  # DEBUG BEGIN_STMT
  hif_drv_104->tx_meta_wr_idx = 0;

  <bb 25> [local count: 59055800]:
  # DEBUG BEGIN_STMT
  # DEBUG D#17 => &hif_drv_104->tx_lock
  _151 = MEM[(const oal_mutex_t *)hif_drv_104 + 64B];
  # DEBUG D#2 => D#17
  oal_mutex_unlock.isra.0 (_151);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 26> [local count: 198178275]:
  # _95 = PHI <115(3), 113(5), 0(25), 121(21)>
  return _95;

}


pfe_hif_drv_client_set_inject_if (struct pfe_hif_drv_client_t * client, pfe_ct_phy_if_id_t phy_if_id)
{
  errno_t _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  if (phy_if_id_3(D) > 9)
    goto <bb 4>; [21.72%]
  else
    goto <bb 3>; [78.28%]

  <bb 3> [local count: 840525101]:
  # DEBUG BEGIN_STMT
  client_5(D)->phy_if_id = phy_if_id_3(D);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 4> [local count: 1073741824]:
  # _1 = PHI <22(2), 0(3)>
  return _1;

}


pfe_hif_drv_process_tx (struct pfe_hif_drv_t * hif_drv, uint32_t budget)
{
  uint32_t ii;
  uint32_t qq;
  errno_t ret;
  uint32_t tx_clients;
  uint32_t processed_count;
  struct pfe_hif_drv_client_t * client;
  struct pfe_hif_tx_meta_t * tx_metadata;
  struct pfe_hif_chnl_t * _1;
  int _2;
  struct pfe_hif_tx_meta_t * _3;
  long unsigned int _4;
  long unsigned int _5;
  _Bool _6;
  long int _7;
  long int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  unsigned char _13;
  int _14;
  struct fifo_t * _15;
  void * _16;
  _Bool _17;
  long int _18;
  long int _19;
  long unsigned int _20;
  long unsigned int _21;
  long unsigned int _22;
  unsigned char _23;
  int _24;
  struct pfe_ct_hif_tx_hdr_t * _25;
  <unnamed type> _26;
  long unsigned int _27;
  long unsigned int _28;
  long unsigned int _29;
  long unsigned int _30;
  unsigned char _31;
  errno_t (*<T9af>) (struct pfe_hif_drv_client_t *, void *, uint32_t, uint32_t) _32;
  void * _33;
  <unnamed type> _52;

  <bb 2> [local count: 54607571]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG processed_count => 0
  # DEBUG dropped_count => 0
  # DEBUG BEGIN_STMT
  # DEBUG tx_clients => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#7 => hif_drv_54(D)->tx_meta
  # DEBUG D#6 => hif_drv_54(D)->tx_meta_rd_idx
  # DEBUG D#5 => D#6 * 32
  # DEBUG tx_metadata => D#7 + D#5

  <bb 3> [local count: 510470401]:
  # processed_count_34 = PHI <0(2), processed_count_69(25)>
  # tx_clients_36 = PHI <0(2), tx_clients_38(25)>
  # DEBUG tx_clients => tx_clients_36
  # DEBUG dropped_count => NULL
  # DEBUG processed_count => processed_count_34
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = hif_drv_54(D)->channel;
  _2 = pfe_hif_chnl_get_tx_conf (_1);
  if (_2 != 0)
    goto <bb 15>; [5.50%]
  else
    goto <bb 4>; [94.50%]

  <bb 4> [local count: 482394529]:
  # DEBUG BEGIN_STMT
  _3 = hif_drv_54(D)->tx_meta;
  _4 = hif_drv_54(D)->tx_meta_rd_idx;
  _5 = _4 * 32;
  tx_metadata_56 = _3 + _5;
  # DEBUG tx_metadata => tx_metadata_56
  # DEBUG BEGIN_STMT
  client_57 = tx_metadata_56->client;
  # DEBUG client => client_57
  # DEBUG BEGIN_STMT
  _6 = client_57 == 0B;
  _7 = (long int) _6;
  _8 = __builtin_expect (_7, 0);
  if (_8 != 0)
    goto <bb 5>; [10.00%]
  else
    goto <bb 8>; [90.00%]

  <bb 5> [local count: 48239453]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _9 = hif_drv_54(D)->counters[3];
  _10 = _9 + 1;
  hif_drv_54(D)->counters[3] = _10;
  # DEBUG BEGIN_STMT
  # DEBUG dropped_count => NULL
  # DEBUG BEGIN_STMT
  _11 = _4 + 1;
  hif_drv_54(D)->tx_meta_rd_idx = _11;
  # DEBUG BEGIN_STMT
  _12 = hif_drv_54(D)->tx_meta_number;
  if (_11 >= _12)
    goto <bb 6>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 6> [local count: 24119726]:
  # DEBUG BEGIN_STMT
  hif_drv_54(D)->tx_meta_rd_idx = 0;

  <bb 7> [local count: 48239453]:
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 14>; [100.00%]

  <bb 8> [local count: 434155076]:
  # DEBUG BEGIN_STMT
  _13 = tx_metadata_56->q_no;
  _14 = (int) _13;
  _15 = client_57->tx_q[_14].tx_conf_fifo;
  _16 = tx_metadata_56->ref_ptr;
  ret_59 = fifo_put (_15, _16);
  # DEBUG ret => ret_59
  # DEBUG BEGIN_STMT
  _17 = ret_59 != 0;
  _18 = (long int) _17;
  _19 = __builtin_expect (_18, 0);
  if (_19 != 0)
    goto <bb 9>; [10.00%]
  else
    goto <bb 10>; [90.00%]

  <bb 9> [local count: 43415508]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _20 = hif_drv_54(D)->counters[3];
  _21 = _20 + 1;
  hif_drv_54(D)->counters[3] = _21;
  goto <bb 12>; [100.00%]

  <bb 10> [local count: 390739569]:
  # DEBUG BEGIN_STMT
  _22 = client_57->id_mask;
  tx_clients_60 = _22 | tx_clients_36;
  # DEBUG tx_clients => tx_clients_60
  # DEBUG BEGIN_STMT
  _23 = tx_metadata_56->q_no;
  _24 = (int) _23;
  client_57->tx_q[_24].has_new_data = 1;
  # DEBUG BEGIN_STMT
  _25 = tx_metadata_56->hif_tx_header;
  _26 = _25->flags;
  _52 = _26 & 4;
  if (_52 != 0)
    goto <bb 11>; [50.00%]
  else
    goto <bb 12>; [50.00%]

  <bb 11> [local count: 195369784]:
  # DEBUG BEGIN_STMT
  client_57->tx_q[_24].has_new_ets_data = 1;

  <bb 12> [local count: 434155077]:
  # tx_clients_37 = PHI <tx_clients_36(9), tx_clients_60(10), tx_clients_60(11)>
  # DEBUG tx_clients => tx_clients_37
  # DEBUG BEGIN_STMT
  _27 = hif_drv_54(D)->tx_meta_rd_idx;
  _28 = _27 + 1;
  hif_drv_54(D)->tx_meta_rd_idx = _28;
  # DEBUG BEGIN_STMT
  _29 = hif_drv_54(D)->tx_meta_number;
  if (_28 >= _29)
    goto <bb 13>; [50.00%]
  else
    goto <bb 14>; [50.00%]

  <bb 13> [local count: 217077538]:
  # DEBUG BEGIN_STMT
  hif_drv_54(D)->tx_meta_rd_idx = 0;

  <bb 14> [local count: 482394530]:
  # tx_clients_38 = PHI <tx_clients_36(7), tx_clients_37(12), tx_clients_37(13)>
  # DEBUG tx_clients => tx_clients_38
  # DEBUG dropped_count => NULL
  # DEBUG BEGIN_STMT
  processed_count_69 = processed_count_34 + 1;
  # DEBUG processed_count => processed_count_69
  if (processed_count_69 < budget_70(D))
    goto <bb 25>; [94.50%]
  else
    goto <bb 15>; [5.50%]

  <bb 25> [local count: 455862831]:
  goto <bb 3>; [100.00%]

  <bb 15> [local count: 54607571]:
  # processed_count_35 = PHI <processed_count_34(3), processed_count_69(14)>
  # tx_clients_39 = PHI <tx_clients_36(3), tx_clients_38(14)>
  # DEBUG tx_clients => tx_clients_39
  # DEBUG dropped_count => NULL
  # DEBUG processed_count => processed_count_35
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ii => 0
  # DEBUG BEGIN_STMT
  goto <bb 23>; [100.00%]

  <bb 16> [local count: 441824882]:
  # DEBUG BEGIN_STMT
  _30 = tx_clients_40 & 1;
  if (_30 != 0)
    goto <bb 17>; [27.00%]
  else
    goto <bb 22>; [73.00%]

  <bb 17> [local count: 119292718]:
  # DEBUG BEGIN_STMT
  client_71 = &hif_drv_54(D)->clients[ii_42];
  # DEBUG client => client_71
  # DEBUG BEGIN_STMT
  # DEBUG qq => 0
  goto <bb 21>; [100.00%]

  <bb 18> [local count: 954449108]:
  # DEBUG BEGIN_STMT
  _31 = MEM[(struct pfe_hif_drv_client_t *)hif_drv_54(D)].clients[ii_42].tx_q[qq_41].has_new_data;
  if (_31 == 1)
    goto <bb 19>; [34.00%]
  else
    goto <bb 20>; [66.00%]

  <bb 19> [local count: 324512697]:
  # DEBUG BEGIN_STMT
  _32 = MEM[(struct pfe_hif_drv_client_t *)hif_drv_54(D)].clients[ii_42].event_handler;
  _33 = MEM[(struct pfe_hif_drv_client_t *)hif_drv_54(D)].clients[ii_42].priv;
  _32 (client_71, _33, 2, qq_41);
  # DEBUG BEGIN_STMT
  MEM[(struct pfe_hif_drv_client_t *)hif_drv_54(D)].clients[ii_42].tx_q[qq_41].has_new_data = 0;

  <bb 20> [local count: 954449110]:
  # DEBUG BEGIN_STMT
  qq_74 = qq_41 + 1;
  # DEBUG qq => qq_74

  <bb 21> [local count: 1073741824]:
  # qq_41 = PHI <0(17), qq_74(20)>
  # DEBUG qq => qq_41
  # DEBUG BEGIN_STMT
  if (qq_41 != 8)
    goto <bb 18>; [88.89%]
  else
    goto <bb 22>; [11.11%]

  <bb 22> [local count: 441824880]:
  # DEBUG BEGIN_STMT
  ii_75 = ii_42 + 1;
  # DEBUG ii => ii_75
  # DEBUG BEGIN_STMT
  tx_clients_76 = tx_clients_40 >> 1;
  # DEBUG tx_clients => tx_clients_76

  <bb 23> [local count: 496432451]:
  # tx_clients_40 = PHI <tx_clients_39(15), tx_clients_76(22)>
  # ii_42 = PHI <0(15), ii_75(22)>
  # DEBUG ii => ii_42
  # DEBUG tx_clients => tx_clients_40
  # DEBUG BEGIN_STMT
  if (tx_clients_40 != 0)
    goto <bb 16>; [89.00%]
  else
    goto <bb 24>; [11.00%]

  <bb 24> [local count: 54607570]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  return processed_count_35;

}


pfe_hif_drv_client_receive_tx_conf (const struct pfe_hif_drv_client_t * client, uint32_t queue)
{
  struct fifo_t * _1;
  void * _6;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = client_3(D)->tx_q[queue_4(D)].tx_conf_fifo;
  _6 = fifo_get (_1);
  return _6;

}


pfe_hif_pkt_free (const struct pfe_hif_pkt_t * pkt)
{
  struct pfe_hif_drv_client_t * _1;
  struct pfe_hif_drv_t * _2;
  struct pfe_hif_chnl_t * _3;
  unsigned int _4;
  const void * _5;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pkt_7(D)->client;
  _2 = _1->hif_drv;
  _3 = _2->channel;
  _4 = pkt_7(D)->data;
  _5 = (const void *) _4;
  pfe_hif_chnl_release_buf (_3, _5);
  # DEBUG ret => NULL
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  return;

}


pfe_hif_drv_client_has_rx_pkt (const struct pfe_hif_drv_client_t * client, uint32_t queue)
{
  bool_t ret;
  errno_t err;
  uint32_t fill_level;
  struct fifo_t * _1;
  _Bool _2;
  long int _3;
  long int _4;
  long unsigned int fill_level.21_5;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 1
  # DEBUG BEGIN_STMT
  _1 = client_9(D)->rx_q[queue_10(D)].rx_fifo;
  err_12 = fifo_get_fill_level (_1, &fill_level);
  # DEBUG err => err_12
  # DEBUG BEGIN_STMT
  _2 = err_12 != 0;
  _3 = (long int) _2;
  _4 = __builtin_expect (_3, 0);
  if (_4 != 0)
    goto <bb 3>; [10.00%]
  else
    goto <bb 4>; [90.00%]

  <bb 3> [local count: 107374182]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  fill_level = 0;

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

  <bb 5> [local count: 536870911]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0

  <bb 6> [local count: 1073741823]:
  # ret_6 = PHI <1(4), 0(5)>
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  fill_level ={v} {CLOBBER};
  return ret_6;

}


pfe_hif_drv_client_receive_pkt (struct pfe_hif_drv_client_t * client, uint32_t queue)
{
  struct fifo_t * _1;
  struct pfe_hif_pkt_t * _6;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = client_3(D)->rx_q[queue_4(D)].rx_fifo;
  _6 = fifo_get (_1);
  return _6;

}


pfe_hif_drv_client_unregister (struct pfe_hif_drv_client_t * client)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG enabled => 0
  # DEBUG BEGIN_STMT
  if (client_3(D) != 0B)
    goto <bb 3>; [53.47%]
  else
    goto <bb 4>; [46.53%]

  <bb 3> [local count: 574129752]:
  pfe_hif_drv_client_unregister.part.0 (client_3(D));

  <bb 4> [local count: 1073741824]:
  return;

}


pfe_hif_drv_client_get_priv (const struct pfe_hif_drv_client_t * client)
{
  void * ret;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0B
  # DEBUG BEGIN_STMT
  ret_3 = client_2(D)->priv;
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  return ret_3;

}


pfe_hif_drv_client_get_drv (const struct pfe_hif_drv_client_t * client)
{
  struct pfe_hif_drv_t * ret;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0B
  # DEBUG BEGIN_STMT
  ret_3 = client_2(D)->hif_drv;
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  return ret_3;

}


pfe_hif_drv_client_register_ll (struct pfe_hif_drv_t * hif_drv, struct pfe_hif_drv_client_t * client, pfe_ct_phy_if_id_t phy_if_id, uint32_t txq_num, uint32_t rxq_num, struct fifo_t * txq_fifo, struct fifo_t * rxq_fifo, bool_t promisc, errno_t (*pfe_hif_drv_client_event_handler) (struct pfe_hif_drv_client_t *, void *, uint32_t, uint32_t) handler, void * priv)
{
  uint32_t rxq_num_temp;
  uint32_t txq_num_temp;
  errno_t err;
  unsigned char _2;
  int _4;
  long unsigned int _5;
  _Bool _6;
  long int _7;
  long int _8;
  _Bool _9;
  long int _10;
  long int _11;
  struct pfe_hif_ptp_ts_db_t * _12;
  int _13;
  struct pfe_hif_drv_client_t * _14;
  short unsigned int _54;
  short unsigned int _55;
  short unsigned int _56;
  short unsigned int _57;
  short unsigned int _58;
  short unsigned int _59;
  short unsigned int _60;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG txq_num_temp => txq_num_16(D)
  # DEBUG BEGIN_STMT
  # DEBUG rxq_num_temp => rxq_num_17(D)
  # DEBUG BEGIN_STMT
  # DEBUG D#25 => &hif_drv_18(D)->cl_api_lock
  _54 = MEM[(const oal_mutex_t *)hif_drv_18(D) + 3264B];
  # DEBUG D#1 => D#25
  oal_mutex_lock.isra.0 (_54);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = client_21(D)->active;
  if (_2 != 0)
    goto <bb 3>; [17.38%]
  else
    goto <bb 4>; [82.62%]

  <bb 3> [local count: 186616329]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#31 => &hif_drv_18(D)->cl_api_lock
  _55 = MEM[(const oal_mutex_t *)hif_drv_18(D) + 3264B];
  # DEBUG D#2 => D#31
  oal_mutex_unlock.isra.0 (_55);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_hif_drv_client_unregister (client_21(D));
  # DEBUG BEGIN_STMT
  goto <bb 13>; [100.00%]

  <bb 4> [local count: 887125494]:
  # DEBUG BEGIN_STMT
  rxq_num_temp_3 = MIN_EXPR <8, rxq_num_17(D)>;
  # DEBUG rxq_num_temp => rxq_num_temp_3
  # DEBUG BEGIN_STMT
  txq_num_temp_1 = MIN_EXPR <8, txq_num_16(D)>;
  # DEBUG txq_num_temp => txq_num_temp_1
  # DEBUG BEGIN_STMT
  memset (client_21(D), 0, 256);
  # DEBUG BEGIN_STMT
  if (phy_if_id_23(D) > 31)
    goto <bb 5>; [17.38%]
  else
    goto <bb 6>; [82.62%]

  <bb 5> [local count: 154182411]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#30 => &hif_drv_18(D)->cl_api_lock
  _56 = MEM[(const oal_mutex_t *)hif_drv_18(D) + 3264B];
  # DEBUG D#2 => D#30
  oal_mutex_unlock.isra.0 (_56);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_hif_drv_client_unregister (client_21(D));
  # DEBUG BEGIN_STMT
  goto <bb 13>; [100.00%]

  <bb 6> [local count: 732943084]:
  # DEBUG BEGIN_STMT
  _4 = (int) phy_if_id_23(D);
  _5 = 1 << _4;
  client_21(D)->id_mask = _5;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  client_21(D)->promisc = promisc_25(D);
  # DEBUG BEGIN_STMT
  client_21(D)->hif_drv = hif_drv_18(D);
  # DEBUG BEGIN_STMT
  client_21(D)->phy_if_id = phy_if_id_23(D);
  # DEBUG BEGIN_STMT
  client_21(D)->rx_qn = rxq_num_temp_3;
  # DEBUG BEGIN_STMT
  client_21(D)->tx_qn = txq_num_temp_1;
  # DEBUG BEGIN_STMT
  client_21(D)->event_handler = handler_31(D);
  # DEBUG BEGIN_STMT
  client_21(D)->priv = priv_33(D);
  # DEBUG BEGIN_STMT
  err_37 = hif_client_create_rx_queues (client_21(D), rxq_fifo_35(D));
  # DEBUG err => err_37
  # DEBUG BEGIN_STMT
  _6 = err_37 != 0;
  _7 = (long int) _6;
  _8 = __builtin_expect (_7, 0);
  if (_8 != 0)
    goto <bb 7>; [10.00%]
  else
    goto <bb 8>; [90.00%]

  <bb 7> [local count: 73294308]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#29 => &hif_drv_18(D)->cl_api_lock
  _57 = MEM[(const oal_mutex_t *)hif_drv_18(D) + 3264B];
  # DEBUG D#2 => D#29
  oal_mutex_unlock.isra.0 (_57);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_hif_drv_client_unregister (client_21(D));
  # DEBUG BEGIN_STMT
  goto <bb 13>; [100.00%]

  <bb 8> [local count: 659648776]:
  # DEBUG BEGIN_STMT
  err_40 = hif_client_create_tx_queues (client_21(D), txq_fifo_38(D));
  # DEBUG err => err_40
  # DEBUG BEGIN_STMT
  _9 = err_40 != 0;
  _10 = (long int) _9;
  _11 = __builtin_expect (_10, 0);
  if (_11 != 0)
    goto <bb 9>; [10.00%]
  else
    goto <bb 10>; [90.00%]

  <bb 9> [local count: 65964878]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#28 => &hif_drv_18(D)->cl_api_lock
  _58 = MEM[(const oal_mutex_t *)hif_drv_18(D) + 3264B];
  # DEBUG D#2 => D#28
  oal_mutex_unlock.isra.0 (_58);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_hif_drv_client_unregister (client_21(D));
  # DEBUG BEGIN_STMT
  goto <bb 13>; [100.00%]

  <bb 10> [local count: 593683898]:
  # DEBUG BEGIN_STMT
  _12 = &client_21(D)->ptpdb;
  _13 = pfe_hif_ptp_ts_db_init (_12);
  if (_13 != 0)
    goto <bb 11>; [17.38%]
  else
    goto <bb 12>; [82.62%]

  <bb 11> [local count: 103182261]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#27 => &hif_drv_18(D)->cl_api_lock
  _59 = MEM[(const oal_mutex_t *)hif_drv_18(D) + 3264B];
  # DEBUG D#2 => D#27
  oal_mutex_unlock.isra.0 (_59);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_hif_drv_client_unregister (client_21(D));
  # DEBUG BEGIN_STMT
  goto <bb 13>; [100.00%]

  <bb 12> [local count: 490501636]:
  # DEBUG BEGIN_STMT
  client_21(D)->active = 1;
  # DEBUG BEGIN_STMT
  # DEBUG D#26 => &hif_drv_18(D)->cl_api_lock
  _60 = MEM[(const oal_mutex_t *)hif_drv_18(D) + 3264B];
  # DEBUG D#2 => D#26
  oal_mutex_unlock.isra.0 (_60);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 13> [local count: 1073741824]:
  # _14 = PHI <0B(3), 0B(5), 0B(7), 0B(9), 0B(11), client_21(D)(12)>
  return _14;

}


pfe_hif_drv_client_register (struct pfe_hif_drv_t * hif_drv, pfe_ct_phy_if_id_t phy_if_id, uint32_t txq_num, uint32_t rxq_num, struct fifo_t * txq_fifo, struct fifo_t * rxq_fifo, bool_t promisc, errno_t (*pfe_hif_drv_client_event_handler) (struct pfe_hif_drv_client_t *, void *, uint32_t, uint32_t) handler, void * priv)
{
  struct pfe_hif_drv_client_t * client;
  int _1;
  struct pfe_hif_drv_client_t * _2;
  struct pfe_hif_drv_client_t * _3;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (phy_if_id_5(D) > 11)
    goto <bb 5>; [17.38%]
  else
    goto <bb 3>; [82.62%]

  <bb 3> [local count: 887125496]:
  # DEBUG BEGIN_STMT
  if (handler_6(D) == 0B)
    goto <bb 5>; [15.47%]
  else
    goto <bb 4>; [84.53%]

  <bb 4> [local count: 749887182]:
  # DEBUG BEGIN_STMT
  _1 = (int) phy_if_id_5(D);
  _2 = &hif_drv_7(D)->clients[_1];
  client_16 = pfe_hif_drv_client_register_ll (hif_drv_7(D), _2, phy_if_id_5(D), txq_num_9(D), rxq_num_10(D), txq_fifo_11(D), rxq_fifo_12(D), promisc_13(D), handler_6(D), priv_14(D));
  # DEBUG client => client_16
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 5> [local count: 1073741824]:
  # _3 = PHI <0B(2), 0B(3), client_16(4)>
  return _3;

}


pfe_hif_drv_aux_client_register (struct pfe_hif_drv_t * hif_drv, uint32_t txq_num, uint32_t rxq_num, struct fifo_t * txq_fifo, struct fifo_t * rxq_fifo, errno_t (*pfe_hif_drv_client_event_handler) (struct pfe_hif_drv_client_t *, void *, uint32_t, uint32_t) handler, void * priv)
{
  struct pfe_hif_drv_client_t * client;
  struct pfe_hif_drv_client_t * _1;
  struct pfe_hif_drv_client_t * _2;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (handler_4(D) == 0B)
    goto <bb 4>; [15.47%]
  else
    goto <bb 3>; [84.53%]

  <bb 3> [local count: 907633965]:
  # DEBUG BEGIN_STMT
  _1 = &hif_drv_5(D)->clients[11];
  client_13 = pfe_hif_drv_client_register_ll (hif_drv_5(D), _1, 11, txq_num_7(D), rxq_num_8(D), txq_fifo_9(D), rxq_fifo_10(D), 1, handler_4(D), priv_11(D));
  # DEBUG client => client_13
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 4> [local count: 1073741824]:
  # _2 = PHI <0B(2), client_13(3)>
  return _2;

}


pfe_hif_drv_ihc_client_register (struct pfe_hif_drv_t * hif_drv, errno_t (*pfe_hif_drv_client_event_handler) (struct pfe_hif_drv_client_t *, void *, uint32_t, uint32_t) handler, void * priv)
{
  struct fifo_t * tx_conf_fifo;
  struct fifo_t * rx_fifo;
  struct pfe_hif_drv_client_t * client;
  struct pfe_hif_drv_client_t * _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (handler_3(D) == 0B)
    goto <bb 6>; [100.00%]
  else
    goto <bb 3>; [0.00%]

  <bb 3> [count: 0]:
  # DEBUG BEGIN_STMT
  client_5 = &hif_drv_4(D)->clients[10];
  # DEBUG client => client_5
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  rx_fifo_8 = fifo_create (8, &ihc_client_fifos.tx_conf_fifo, &ihc_client_fifos.tx_conf_fifo_data);
  # DEBUG rx_fifo => rx_fifo_8
  # DEBUG BEGIN_STMT
  if (rx_fifo_8 == 0B)
    goto <bb 6>; [0.00%]
  else
    goto <bb 4>; [0.00%]

  <bb 4> [count: 0]:
  # DEBUG BEGIN_STMT
  tx_conf_fifo_10 = fifo_create (8, &ihc_client_fifos.rx_fifo, &ihc_client_fifos.rx_fifo_data);
  # DEBUG tx_conf_fifo => tx_conf_fifo_10
  # DEBUG BEGIN_STMT
  if (tx_conf_fifo_10 == 0B)
    goto <bb 6>; [0.00%]
  else
    goto <bb 5>; [0.00%]

  <bb 5> [count: 0]:
  # DEBUG BEGIN_STMT
  client_13 = pfe_hif_drv_client_register_ll (hif_drv_4(D), client_5, 10, 1, 1, tx_conf_fifo_10, rx_fifo_8, 1, handler_3(D), priv_11(D));
  # DEBUG client => client_13
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 6> [local count: 1073741824]:
  # _1 = PHI <0B(2), 0B(3), 0B(4), client_13(5)>
  return _1;

}


hif_client_create_tx_queues (struct pfe_hif_drv_client_t * client, struct fifo_t * fifo)
{
  struct fifo_t * tmp_fifo;
  uint32_t ii;
  struct client_tx_queue[8] * _1;
  long unsigned int _2;
  long unsigned int _3;

  <bb 2> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG tmp_fifo => fifo_7(D)
  # DEBUG BEGIN_STMT
  # DEBUG ret => 22
  # DEBUG BEGIN_STMT
  _1 = &client_8(D)->tx_q;
  memset (_1, 0, 80);
  # DEBUG BEGIN_STMT
  # DEBUG ii => 0
  goto <bb 4>; [100.00%]

  <bb 3> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  # DEBUG D#11 => &client_8(D)->tx_q[ii_4]
  # DEBUG queue => D#11
  # DEBUG BEGIN_STMT
  MEM[(struct client_tx_queue *)client_8(D)].tx_q[ii_4].tx_conf_fifo = tmp_fifo_5;
  # DEBUG BEGIN_STMT
  _2 = tmp_fifo_5->depth;
  MEM[(struct client_tx_queue *)client_8(D)].tx_q[ii_4].size = _2;
  # DEBUG BEGIN_STMT
  tmp_fifo_13 = tmp_fifo_5 + 64;
  # DEBUG tmp_fifo => tmp_fifo_13
  # DEBUG BEGIN_STMT
  ii_14 = ii_4 + 1;
  # DEBUG ii => ii_14

  <bb 4> [local count: 1073741824]:
  # ii_4 = PHI <0(2), ii_14(3)>
  # tmp_fifo_5 = PHI <fifo_7(D)(2), tmp_fifo_13(3)>
  # DEBUG tmp_fifo => tmp_fifo_5
  # DEBUG ii => ii_4
  # DEBUG BEGIN_STMT
  _3 = client_8(D)->tx_qn;
  if (_3 > ii_4)
    goto <bb 3>; [89.00%]
  else
    goto <bb 5>; [11.00%]

  <bb 5> [local count: 118111601]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  return 0;

}


hif_client_create_rx_queues (struct pfe_hif_drv_client_t * client, struct fifo_t * fifo)
{
  struct fifo_t * tmp_fifo;
  uint32_t ii;
  struct client_rx_queue[8] * _1;
  long unsigned int _2;
  long unsigned int _3;

  <bb 2> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG tmp_fifo => fifo_7(D)
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = &client_8(D)->rx_q;
  memset (_1, 0, 72);
  # DEBUG BEGIN_STMT
  # DEBUG ii => 0
  goto <bb 4>; [100.00%]

  <bb 3> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  # DEBUG D#10 => &client_8(D)->rx_q[ii_4]
  # DEBUG queue => D#10
  # DEBUG BEGIN_STMT
  MEM[(struct client_rx_queue *)client_8(D)].rx_q[ii_4].rx_fifo = tmp_fifo_5;
  # DEBUG BEGIN_STMT
  _2 = tmp_fifo_5->depth;
  MEM[(struct client_rx_queue *)client_8(D)].rx_q[ii_4].size = _2;
  # DEBUG BEGIN_STMT
  tmp_fifo_13 = tmp_fifo_5 + 64;
  # DEBUG tmp_fifo => tmp_fifo_13
  # DEBUG BEGIN_STMT
  ii_14 = ii_4 + 1;
  # DEBUG ii => ii_14

  <bb 4> [local count: 1073741824]:
  # ii_4 = PHI <0(2), ii_14(3)>
  # tmp_fifo_5 = PHI <fifo_7(D)(2), tmp_fifo_13(3)>
  # DEBUG tmp_fifo => tmp_fifo_5
  # DEBUG ii => ii_4
  # DEBUG BEGIN_STMT
  _3 = client_8(D)->rx_qn;
  if (_3 > ii_4)
    goto <bb 3>; [89.00%]
  else
    goto <bb 5>; [11.00%]

  <bb 5> [local count: 118111601]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  return 0;

}


hif_client_free_tx_queues (struct pfe_hif_drv_client_t * client)
{
  uint32_t fill_level;
  uint32_t ii;
  struct fifo_t * _1;
  _Bool _2;
  long int _3;
  long int _4;
  struct fifo_t * _5;
  long unsigned int _6;

  <bb 2> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ii => 0
  goto <bb 6>; [100.00%]

  <bb 3> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  # DEBUG D#13 => &client_11(D)->tx_q[ii_7]
  # DEBUG queue => D#13
  # DEBUG BEGIN_STMT
  _1 = MEM[(struct client_tx_queue *)client_11(D)].tx_q[ii_7].tx_conf_fifo;
  _2 = _1 != 0B;
  _3 = (long int) _2;
  _4 = __builtin_expect (_3, 1);
  if (_4 != 0)
    goto <bb 4>; [90.00%]
  else
    goto <bb 5>; [10.00%]

  <bb 4> [local count: 860067201]:
  # DEBUG BEGIN_STMT
  fifo_get_fill_level (_1, &fill_level);
  # DEBUG err => NULL
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = MEM[(struct client_tx_queue *)client_11(D)].tx_q[ii_7].tx_conf_fifo;
  fifo_destroy (_5);
  # DEBUG BEGIN_STMT
  MEM[(struct client_tx_queue *)client_11(D)].tx_q[ii_7].tx_conf_fifo = 0B;

  <bb 5> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  ii_16 = ii_7 + 1;
  # DEBUG ii => ii_16

  <bb 6> [local count: 1073741824]:
  # ii_7 = PHI <0(2), ii_16(5)>
  # DEBUG ii => ii_7
  # DEBUG BEGIN_STMT
  _6 = client_11(D)->tx_qn;
  if (_6 > ii_7)
    goto <bb 3>; [89.00%]
  else
    goto <bb 7>; [11.00%]

  <bb 7> [local count: 118111601]:
  fill_level ={v} {CLOBBER};
  return;

}


hif_client_free_rx_queues (struct pfe_hif_drv_client_t * client)
{
  uint32_t fill_level;
  uint32_t ii;
  struct fifo_t * _1;
  _Bool _2;
  long int _3;
  long int _4;
  struct fifo_t * _5;
  long unsigned int _6;

  <bb 2> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ii => 0
  goto <bb 6>; [100.00%]

  <bb 3> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  # DEBUG D#12 => &client_11(D)->rx_q[ii_7]
  # DEBUG queue => D#12
  # DEBUG BEGIN_STMT
  _1 = MEM[(struct client_rx_queue *)client_11(D)].rx_q[ii_7].rx_fifo;
  _2 = _1 != 0B;
  _3 = (long int) _2;
  _4 = __builtin_expect (_3, 1);
  if (_4 != 0)
    goto <bb 4>; [90.00%]
  else
    goto <bb 5>; [10.00%]

  <bb 4> [local count: 860067201]:
  # DEBUG BEGIN_STMT
  fifo_get_fill_level (_1, &fill_level);
  # DEBUG err => NULL
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = MEM[(struct client_rx_queue *)client_11(D)].rx_q[ii_7].rx_fifo;
  fifo_destroy (_5);
  # DEBUG BEGIN_STMT
  MEM[(struct client_rx_queue *)client_11(D)].rx_q[ii_7].rx_fifo = 0B;

  <bb 5> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  ii_16 = ii_7 + 1;
  # DEBUG ii => ii_16

  <bb 6> [local count: 1073741824]:
  # ii_7 = PHI <0(2), ii_16(5)>
  # DEBUG ii => ii_7
  # DEBUG BEGIN_STMT
  _6 = client_11(D)->rx_qn;
  if (_6 > ii_7)
    goto <bb 3>; [89.00%]
  else
    goto <bb 7>; [11.00%]

  <bb 7> [local count: 118111601]:
  fill_level ={v} {CLOBBER};
  return;

}


pfe_hif_drv_process_rx (struct pfe_hif_drv_t * hif_drv, uint32_t budget)
{
  uint16_t ref;
  struct oal_util_ptp_header_t * ptph;
  uint32_t qq;
  const struct pfe_ct_ets_report_t * etsr;
  uint32_t ii;
  uint32_t rx_clients;
  errno_t ret;
  struct pfe_hif_rx_meta_t * rx_metadata;
  struct pfe_hif_drv_client_t * client;
  bool_t lifm;
  void * meta_va;
  void * current_buffer_va;
  uint32_t flags;
  uint32_t rx_processed;
  uint32_t rx_len;
  struct pfe_ct_hif_rx_hdr_t * hif_hdr_ptr;
  struct pfe_hif_chnl_t * _1;
  int _2;
  unsigned char _3;
  <unnamed type> _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _18;
  long unsigned int _19;
  <unnamed type> _20;
  <unnamed type> _21;
  long unsigned int _22;
  int _23;
  unsigned char _24;
  unsigned char _25;
  unsigned char _26;
  long unsigned int _27;
  unsigned char lifm.0_28;
  unsigned char _29;
  _Bool _30;
  long int _31;
  long int _32;
  struct pfe_hif_chnl_t * _33;
  <unnamed type> _34;
  long unsigned int _35;
  long unsigned int _36;
  unsigned int current_buffer_va.3_37;
  unsigned int _38;
  struct pfe_hif_ptp_ts_db_t * _39;
  short unsigned int _40;
  short unsigned int _41;
  short unsigned int _42;
  long unsigned int _43;
  long unsigned int _44;
  int _45;
  errno_t (*<T9af>) (struct pfe_hif_drv_client_t *, void *, uint32_t, uint32_t) _46;
  unsigned char _47;
  errno_t (*<T9af>) (struct pfe_hif_drv_client_t *, void *, uint32_t, uint32_t) _48;
  void * _49;
  struct pfe_hif_chnl_t * _50;
  void * current_buffer_va.4_51;
  long unsigned int _52;
  long unsigned int _53;
  long unsigned int _54;
  long unsigned int _55;
  long unsigned int _56;
  void * current_buffer_va.5_57;
  unsigned int current_buffer_va.6_58;
  unsigned int _59;
  uint8_t * _60;
  long unsigned int rx_len.7_61;
  long unsigned int _62;
  int _63;
  struct oal_util_ptp_header_t * ptph.8_64;
  unsigned char _65;
  unsigned char _66;
  unsigned char _67;
  struct pfe_hif_ptp_ts_db_t * _68;
  <unnamed-unsigned:4> _69;
  unsigned char _70;
  short unsigned int _71;
  short unsigned int _72;
  short unsigned int _73;
  short unsigned int _74;
  long unsigned int _75;
  long unsigned int _76;
  void * current_buffer_va.14_77;
  unsigned int current_buffer_va.15_78;
  long unsigned int rx_len.16_79;
  short unsigned int _80;
  <unnamed type> _81;
  <unnamed type> _82;
  unsigned char _83;
  <unnamed type> _84;
  int _85;
  struct fifo_t * _86;
  _Bool _87;
  long int _88;
  long int _89;
  struct pfe_hif_chnl_t * _90;
  void * current_buffer_va.17_91;
  long unsigned int _92;
  long unsigned int _93;
  long unsigned int _94;
  long unsigned int _95;
  errno_t (*<T9af>) (struct pfe_hif_drv_client_t *, void *, uint32_t, uint32_t) _96;
  void * _97;

  <bb 2> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG rx_processed => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG rx_clients => 0
  # DEBUG BEGIN_STMT
  goto <bb 41>; [100.00%]

  <bb 3> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _1 = hif_drv_121(D)->channel;
  _2 = pfe_hif_chnl_rx_va (_1, &current_buffer_va, &rx_len, &lifm, &meta_va);
  if (_2 != 0)
    goto <bb 42>; [5.50%]
  else
    goto <bb 4>; [94.50%]

  <bb 4> [local count: 958878293]:
  # DEBUG BEGIN_STMT
  rx_processed_123 = rx_processed_98 + 1;
  # DEBUG rx_processed => rx_processed_123
  # DEBUG BEGIN_STMT
  hif_hdr_ptr_124 = current_buffer_va;
  # DEBUG hif_hdr_ptr => hif_hdr_ptr_124
  # DEBUG BEGIN_STMT
  _3 = hif_drv_121(D)->started;
  if (_3 == 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 15>; [50.00%]

  <bb 5> [local count: 479439146]:
  # DEBUG BEGIN_STMT
  _4 = hif_hdr_ptr_124->flags;
  _5 = (long unsigned int) _4;
  _6 = _5 >> 24;
  _9 = _5 >> 8;
  _10 = _9 & 65280;
  _11 = _6 | _10;
  _14 = _5 << 8;
  _15 = _14 & 16711680;
  _16 = _11 | _15;
  _18 = _5 << 24;
  _19 = _16 | _18;
  _20 = (<unnamed type>) _19;
  hif_hdr_ptr_124->flags = _20;
  # DEBUG BEGIN_STMT
  _21 = hif_hdr_ptr_124->i_phy_if;
  hif_drv_121(D)->i_phy_if = _21;
  # DEBUG BEGIN_STMT
  _22 = _19 & 256;
  if (_22 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 6> [local count: 239719573]:
  # DEBUG BEGIN_STMT
  client_129 = &hif_drv_121(D)->clients[10];
  # DEBUG client => client_129
  goto <bb 8>; [100.00%]

  <bb 7> [local count: 239719573]:
  # DEBUG BEGIN_STMT
  _23 = (int) _21;
  client_128 = &hif_drv_121(D)->clients[_23];
  # DEBUG client => client_128

  <bb 8> [local count: 479439146]:
  # client_101 = PHI <client_129(6), client_128(7)>
  # DEBUG client => client_101
  # DEBUG BEGIN_STMT
  _24 = client_101->active;
  if (_24 == 0)
    goto <bb 9>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 9> [local count: 239719573]:
  # DEBUG BEGIN_STMT
  client_131 = &hif_drv_121(D)->clients[11];
  # DEBUG client => client_131
  goto <bb 14>; [100.00%]

  <bb 10> [local count: 239719573]:
  # DEBUG BEGIN_STMT
  _25 = client_101->promisc;
  if (_25 == 1)
    goto <bb 14>; [34.00%]
  else
    goto <bb 11>; [66.00%]

  <bb 11> [local count: 158214918]:
  # DEBUG BEGIN_STMT
  _26 = hif_drv_121(D)->clients[11].active;
  if (_26 == 1)
    goto <bb 12>; [34.00%]
  else
    goto <bb 14>; [66.00%]

  <bb 12> [local count: 53793072]:
  # DEBUG BEGIN_STMT
  _27 = _19 & 544;
  if (_27 != 0)
    goto <bb 14>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 13> [local count: 26896536]:
  # DEBUG BEGIN_STMT
  client_130 = &hif_drv_121(D)->clients[11];
  # DEBUG client => client_130

  <bb 14> [local count: 479439146]:
  # client_102 = PHI <client_131(9), client_101(10), client_101(11), client_130(13), client_101(12)>
  # DEBUG client => client_102
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  hif_drv_121(D)->started = 1;
  # DEBUG BEGIN_STMT
  # DEBUG flags => 1
  # DEBUG BEGIN_STMT
  hif_drv_121(D)->cur_client = client_102;
  goto <bb 16>; [100.00%]

  <bb 15> [local count: 479439146]:
  # DEBUG BEGIN_STMT
  client_125 = hif_drv_121(D)->cur_client;
  # DEBUG client => client_125
  # DEBUG BEGIN_STMT
  # DEBUG flags => 0

  <bb 16> [local count: 958878292]:
  # flags_99 = PHI <1(14), 0(15)>
  # client_103 = PHI <client_102(14), client_125(15)>
  # DEBUG client => client_103
  # DEBUG flags => flags_99
  # DEBUG BEGIN_STMT
  lifm.0_28 = lifm;
  if (lifm.0_28 != 0)
    goto <bb 17>; [50.00%]
  else
    goto <bb 18>; [50.00%]

  <bb 17> [local count: 479439146]:
  # DEBUG BEGIN_STMT
  flags_134 = flags_99 | 2;
  # DEBUG flags => flags_134
  # DEBUG BEGIN_STMT
  hif_drv_121(D)->started = 0;

  <bb 18> [local count: 958878292]:
  # flags_100 = PHI <flags_99(16), flags_134(17)>
  # DEBUG flags => flags_100
  # DEBUG BEGIN_STMT
  _29 = client_103->active;
  _30 = _29 == 0;
  _31 = (long int) _30;
  _32 = __builtin_expect (_31, 0);
  if (_32 != 0)
    goto <bb 19>; [10.00%]
  else
    goto <bb 20>; [90.00%]

  <bb 19> [local count: 95887829]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _33 = hif_drv_121(D)->channel;
  pfe_hif_chnl_release_buf (_33, hif_hdr_ptr_124);
  # DEBUG ret => NULL
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 40>; [100.00%]

  <bb 20> [local count: 862990463]:
  # DEBUG BEGIN_STMT
  _34 = hif_hdr_ptr_124->flags;
  _35 = (long unsigned int) _34;
  _36 = _35 & 512;
  if (_36 != 0)
    goto <bb 21>; [19.52%]
  else
    goto <bb 28>; [80.48%]

  <bb 21> [local count: 168455738]:
  # DEBUG BEGIN_STMT
  current_buffer_va.3_37 = (unsigned int) hif_hdr_ptr_124;
  _38 = current_buffer_va.3_37 + 16;
  etsr_156 = (const struct pfe_ct_ets_report_t *) _38;
  # DEBUG etsr => etsr_156
  # DEBUG BEGIN_STMT
  _39 = &client_103->ptpdb;
  _40 = etsr_156->ref_num;
  _41 = _40 r>> 8;
  _42 = _41 & 4095;
  _43 = etsr_156->ts_sec;
  _44 = etsr_156->ts_nsec;
  _45 = pfe_hif_ptp_ts_db_push_ts (_39, _42, _43, _44);
  if (_45 != 0)
    goto <bb 27>; [50.00%]
  else
    goto <bb 22>; [50.00%]

  <bb 22> [local count: 84227869]:
  # DEBUG BEGIN_STMT
  _46 = client_103->event_handler;
  if (_46 != 0B)
    goto <bb 48>; [46.32%]
  else
    goto <bb 27>; [53.68%]

  <bb 48> [local count: 39014349]:
  goto <bb 26>; [100.00%]

  <bb 23> [local count: 312149904]:
  # DEBUG BEGIN_STMT
  _47 = client_103->tx_q[qq_106].has_new_ets_data;
  if (_47 == 1)
    goto <bb 24>; [34.00%]
  else
    goto <bb 25>; [66.00%]

  <bb 24> [local count: 106130968]:
  # DEBUG BEGIN_STMT
  _48 = client_103->event_handler;
  _49 = client_103->priv;
  _48 (client_103, _49, 4, qq_106);
  # DEBUG BEGIN_STMT
  client_103->tx_q[qq_106].has_new_ets_data = 0;

  <bb 25> [local count: 312149905]:
  # DEBUG BEGIN_STMT
  qq_160 = qq_106 + 1;
  # DEBUG qq => qq_160

  <bb 26> [local count: 351164253]:
  # qq_106 = PHI <qq_160(25), 0(48)>
  # DEBUG qq => qq_106
  # DEBUG BEGIN_STMT
  if (qq_106 != 8)
    goto <bb 23>; [88.89%]
  else
    goto <bb 27>; [11.11%]

  <bb 27> [local count: 168455738]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _50 = hif_drv_121(D)->channel;
  current_buffer_va.4_51 = current_buffer_va;
  pfe_hif_chnl_release_buf (_50, current_buffer_va.4_51);
  # DEBUG ret => NULL
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _52 = hif_drv_121(D)->counters[2];
  _53 = _52 + 1;
  hif_drv_121(D)->counters[2] = _53;
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 40>; [100.00%]

  <bb 28> [local count: 694534724]:
  # DEBUG BEGIN_STMT
  _54 = _35 & 128;
  if (_54 != 0)
    goto <bb 29>; [50.00%]
  else
    goto <bb 37>; [50.00%]

  <bb 29> [local count: 347267362]:
  # DEBUG BEGIN_STMT
  _55 = _35 & 32;
  if (_55 != 0)
    goto <bb 30>; [33.00%]
  else
    goto <bb 37>; [67.00%]

  <bb 30> [local count: 114598229]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _56 = oal_util_get_unique_seqnum32 ();
  ref_137 = (uint16_t) _56;
  # DEBUG ref => ref_137
  # DEBUG BEGIN_STMT
  current_buffer_va.5_57 = current_buffer_va;
  current_buffer_va.6_58 = (unsigned int) current_buffer_va.5_57;
  _59 = current_buffer_va.6_58 + 16;
  _60 = (uint8_t *) _59;
  rx_len.7_61 = rx_len;
  _62 = rx_len.7_61 + 4294967280;
  _63 = oal_util_parse_ptp (_60, _62, &ptph);
  if (_63 == 0)
    goto <bb 31>; [50.00%]
  else
    goto <bb 36>; [50.00%]

  <bb 31> [local count: 57299115]:
  # DEBUG BEGIN_STMT
  ptph.8_64 = ptph;
  _65 = VIEW_CONVERT_EXPR<unsigned char>(ptph.8_64->byte1);
  _66 = _65 & 14;
  if (_66 == 0)
    goto <bb 34>; [33.00%]
  else
    goto <bb 32>; [67.00%]

  <bb 32> [local count: 38390407]:
  _67 = _65 & 15;
  if (_67 == 2)
    goto <bb 34>; [34.00%]
  else
    goto <bb 33>; [66.00%]

  <bb 33> [local count: 25337669]:
  if (_67 == 3)
    goto <bb 34>; [34.00%]
  else
    goto <bb 36>; [66.00%]

  <bb 34> [local count: 40576253]:
  # DEBUG BEGIN_STMT
  _68 = &client_103->ptpdb;
  _69 = ptph.8_64->byte1.messageType;
  _70 = (unsigned char) _69;
  _71 = ptph.8_64->sourcePortID;
  _72 = _71 r>> 8;
  _73 = ptph.8_64->sequenceID;
  _74 = _73 r>> 8;
  ret_140 = pfe_hif_ptp_ts_db_push_msg (_68, 1, ref_137, _70, _72, _74);
  # DEBUG ret => ret_140
  # DEBUG BEGIN_STMT
  if (ret_140 != 0)
    goto <bb 36>; [67.00%]
  else
    goto <bb 35>; [33.00%]

  <bb 35> [local count: 13390164]:
  # DEBUG BEGIN_STMT
  _75 = hif_hdr_ptr_124->rx_timestamp_s;
  _76 = hif_hdr_ptr_124->rx_timestamp_ns;
  pfe_hif_ptp_ts_db_push_ts (_68, ref_137, _75, _76);
  # DEBUG ret => NULL
  # DEBUG BEGIN_STMT

  <bb 36> [local count: 114598229]:
  # DEBUG BEGIN_STMT
  ptph ={v} {CLOBBER};

  <bb 37> [local count: 694534725]:
  # DEBUG BEGIN_STMT
  rx_metadata_143 = meta_va;
  # DEBUG rx_metadata => rx_metadata_143
  # DEBUG BEGIN_STMT
  rx_metadata_143->client = client_103;
  # DEBUG BEGIN_STMT
  current_buffer_va.14_77 = current_buffer_va;
  current_buffer_va.15_78 = (unsigned int) current_buffer_va.14_77;
  rx_metadata_143->data = current_buffer_va.15_78;
  # DEBUG BEGIN_STMT
  rx_len.16_79 = rx_len;
  _80 = (short unsigned int) rx_len.16_79;
  rx_metadata_143->len = _80;
  # DEBUG BEGIN_STMT
  _81 = (<unnamed type>) flags_100;
  rx_metadata_143->flags.common = _81;
  # DEBUG BEGIN_STMT
  _82 = hif_hdr_ptr_124->flags;
  rx_metadata_143->flags.specific.rx_flags = _82;
  # DEBUG BEGIN_STMT
  _83 = hif_drv_121(D)->qno;
  rx_metadata_143->q_no = _83;
  # DEBUG BEGIN_STMT
  _84 = hif_drv_121(D)->i_phy_if;
  rx_metadata_143->i_phy_if = _84;
  # DEBUG BEGIN_STMT
  _85 = (int) _83;
  _86 = client_103->rx_q[_85].rx_fifo;
  ret_152 = fifo_put (_86, rx_metadata_143);
  # DEBUG ret => ret_152
  # DEBUG BEGIN_STMT
  _87 = ret_152 != 0;
  _88 = (long int) _87;
  _89 = __builtin_expect (_88, 0);
  if (_89 != 0)
    goto <bb 38>; [10.00%]
  else
    goto <bb 39>; [90.00%]

  <bb 38> [local count: 69453473]:
  # DEBUG BEGIN_STMT
  _90 = hif_drv_121(D)->channel;
  current_buffer_va.17_91 = current_buffer_va;
  pfe_hif_chnl_release_buf (_90, current_buffer_va.17_91);
  # DEBUG ret => NULL
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _92 = hif_drv_121(D)->counters[0];
  _93 = _92 + 1;
  hif_drv_121(D)->counters[0] = _93;
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 40>; [100.00%]

  <bb 39> [local count: 625081252]:
  # DEBUG BEGIN_STMT
  _94 = client_103->id_mask;
  rx_clients_153 = _94 | rx_clients_104;
  # DEBUG rx_clients => rx_clients_153

  <bb 40> [local count: 958878293]:
  # rx_processed_12 = PHI <rx_processed_123(19), rx_processed_123(27), rx_processed_123(39), rx_processed_123(38)>
  # rx_clients_8 = PHI <rx_clients_104(19), rx_clients_104(27), rx_clients_153(39), rx_clients_104(38)>

  <bb 41> [local count: 1073741824]:
  # rx_processed_98 = PHI <rx_processed_12(40), 0(2)>
  # rx_clients_104 = PHI <rx_clients_8(40), 0(2)>
  # DEBUG rx_clients => rx_clients_104
  # DEBUG rx_processed => rx_processed_98
  # DEBUG BEGIN_STMT
  if (rx_processed_98 < budget_120(D))
    goto <bb 3>; [94.50%]
  else
    goto <bb 42>; [5.50%]

  <bb 42> [local count: 114863532]:
  # rx_processed_13 = PHI <rx_processed_98(3), rx_processed_98(41)>
  # rx_clients_17 = PHI <rx_clients_104(3), rx_clients_104(41)>
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ii => 0
  # DEBUG BEGIN_STMT
  goto <bb 46>; [100.00%]

  <bb 43> [local count: 929350398]:
  # DEBUG BEGIN_STMT
  _95 = rx_clients_105 & 1;
  if (_95 != 0)
    goto <bb 44>; [50.00%]
  else
    goto <bb 45>; [50.00%]

  <bb 44> [local count: 464675199]:
  # DEBUG BEGIN_STMT
  client_168 = &hif_drv_121(D)->clients[ii_107];
  # DEBUG client => client_168
  # DEBUG BEGIN_STMT
  _96 = MEM[(struct pfe_hif_drv_client_t *)hif_drv_121(D)].clients[ii_107].event_handler;
  _97 = MEM[(struct pfe_hif_drv_client_t *)hif_drv_121(D)].clients[ii_107].priv;
  _96 (client_168, _97, 1, 0);

  <bb 45> [local count: 929350398]:
  # DEBUG BEGIN_STMT
  ii_170 = ii_107 + 1;
  # DEBUG ii => ii_170
  # DEBUG BEGIN_STMT
  rx_clients_171 = rx_clients_105 >> 1;
  # DEBUG rx_clients => rx_clients_171

  <bb 46> [local count: 1044213930]:
  # rx_clients_105 = PHI <rx_clients_17(42), rx_clients_171(45)>
  # ii_107 = PHI <0(42), ii_170(45)>
  # DEBUG ii => ii_107
  # DEBUG rx_clients => rx_clients_105
  # DEBUG BEGIN_STMT
  if (rx_clients_105 != 0)
    goto <bb 43>; [89.00%]
  else
    goto <bb 47>; [11.00%]

  <bb 47> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  rx_len ={v} {CLOBBER};
  current_buffer_va ={v} {CLOBBER};
  meta_va ={v} {CLOBBER};
  lifm ={v} {CLOBBER};
  return rx_processed_13;

}


pfe_hif_drv_destroy_data_channel (struct pfe_hif_drv_t * hif_drv)
{
  struct pfe_hif_chnl_t * _1;
  struct pfe_hif_chnl_t * _2;
  struct pfe_hif_tx_meta_t * _3;
  struct pfe_ct_hif_tx_hdr_t * _4;
  struct pfe_hif_tx_meta_t * _5;
  struct pfe_hif_tx_meta_t * _6;

  <bb 2> [count: 0]:
  # DEBUG BEGIN_STMT
  _1 = hif_drv_10(D)->channel;
  pfe_hif_chnl_rx_disable (_1);
  # DEBUG BEGIN_STMT
  _2 = hif_drv_10(D)->channel;
  pfe_hif_chnl_tx_disable (_2);
  # DEBUG BEGIN_STMT
  _3 = hif_drv_10(D)->tx_meta;
  if (_3 != 0B)
    goto <bb 3>; [0.00%]
  else
    goto <bb 6>; [0.00%]

  <bb 3> [count: 0]:
  # DEBUG BEGIN_STMT
  _4 = _3->hif_tx_header;
  if (_4 != 0B)
    goto <bb 4>; [0.00%]
  else
    goto <bb 5>; [0.00%]

  <bb 4> [count: 0]:
  # DEBUG BEGIN_STMT
  oal_mm_free_contig (_4);
  # DEBUG BEGIN_STMT
  _5 = hif_drv_10(D)->tx_meta;
  _5->hif_tx_header = 0B;

  <bb 5> [count: 0]:
  # DEBUG BEGIN_STMT
  _6 = hif_drv_10(D)->tx_meta;
  oal_mm_free (_6);
  # DEBUG BEGIN_STMT
  hif_drv_10(D)->tx_meta = 0B;

  <bb 6> [count: 0]:
  return;

}


pfe_hif_drv_create_data_channel (struct pfe_hif_drv_t * hif_drv)
{
  addr_t pa;
  addr_t va;
  uint32_t ii;
  size_t tx_meta_size;
  struct pfe_hif_chnl_t * _1;
  long unsigned int _2;
  struct pfe_hif_chnl_t * _3;
  long unsigned int _4;
  long unsigned int _5;
  void * _6;
  struct pfe_hif_chnl_t * _7;
  long unsigned int _8;
  long unsigned int _9;
  void * _10;
  void * _11;
  long unsigned int _12;
  long unsigned int _13;
  struct pfe_hif_tx_meta_t * _14;
  long unsigned int _15;
  struct pfe_hif_tx_meta_t * _16;
  struct pfe_ct_hif_tx_hdr_t * _17;
  long unsigned int _18;
  void * _19;
  long unsigned int _20;
  unsigned char _21;
  struct pfe_hif_chnl_t * _22;
  long unsigned int _23;
  errno_t _25;

  <bb 2> [count: 0]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = hif_drv_30(D)->channel;
  _2 = pfe_hif_chnl_get_meta_size (_1);
  if (_2 <= 31)
    goto <bb 3>; [0.00%]
  else
    goto <bb 4>; [0.00%]

  <bb 3> [count: 0]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 11
  # DEBUG BEGIN_STMT
  pfe_hif_drv_destroy_data_channel (hif_drv_30(D));
  # DEBUG BEGIN_STMT
  goto <bb 14>; [0.00%]

  <bb 4> [count: 0]:
  # DEBUG BEGIN_STMT
  _3 = hif_drv_30(D)->channel;
  _4 = pfe_hif_chnl_get_tx_fifo_depth (_3);
  hif_drv_30(D)->tx_meta_number = _4;
  # DEBUG BEGIN_STMT
  _5 = pfe_hif_chnl_get_tx_fifo_depth (_3);
  tx_meta_size_33 = _5 * 32;
  # DEBUG tx_meta_size => tx_meta_size_33
  # DEBUG BEGIN_STMT
  _6 = oal_mm_malloc (tx_meta_size_33);
  hif_drv_30(D)->tx_meta = _6;
  # DEBUG BEGIN_STMT
  if (_6 == 0B)
    goto <bb 5>; [0.00%]
  else
    goto <bb 6>; [0.00%]

  <bb 5> [count: 0]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 11
  # DEBUG BEGIN_STMT
  pfe_hif_drv_destroy_data_channel (hif_drv_30(D));
  # DEBUG BEGIN_STMT
  goto <bb 14>; [0.00%]

  <bb 6> [count: 0]:
  # DEBUG BEGIN_STMT
  if (tx_meta_size_33 != 0)
    goto <bb 7>; [0.00%]
  else
    goto <bb 8>; [0.00%]

  <bb 7> [count: 0]:
  # DEBUG BEGIN_STMT
  memset (_6, 0, tx_meta_size_33);

  <bb 8> [count: 0]:
  # DEBUG BEGIN_STMT
  hif_drv_30(D)->tx_meta_rd_idx = 0;
  # DEBUG BEGIN_STMT
  hif_drv_30(D)->tx_meta_wr_idx = 0;
  # DEBUG BEGIN_STMT
  # DEBUG ii => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _7 = hif_drv_30(D)->channel;
  _8 = pfe_hif_chnl_get_tx_fifo_depth (_7);
  _9 = _8 * 16;
  _10 = oal_mm_malloc_contig_named_aligned_nocache ("bd_mem", _9, 8);
  va_40 = (addr_t) _10;
  # DEBUG va => va_40
  # DEBUG BEGIN_STMT
  if (_10 == 0B)
    goto <bb 9>; [0.00%]
  else
    goto <bb 10>; [0.00%]

  <bb 9> [count: 0]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 11
  # DEBUG BEGIN_STMT
  pfe_hif_drv_destroy_data_channel (hif_drv_30(D));
  # DEBUG BEGIN_STMT
  goto <bb 14>; [0.00%]

  <bb 10> [count: 0]:
  # DEBUG BEGIN_STMT
  _11 = oal_mm_virt_to_phys_contig (_10);
  pa_42 = (addr_t) _11;
  # DEBUG pa => pa_42
  # DEBUG BEGIN_STMT
  if (_11 == 0B)
    goto <bb 11>; [0.00%]
  else
    goto <bb 13>; [0.00%]

  <bb 11> [count: 0]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ret => 5
  # DEBUG BEGIN_STMT
  pfe_hif_drv_destroy_data_channel (hif_drv_30(D));
  # DEBUG BEGIN_STMT
  goto <bb 14>; [0.00%]

  <bb 12> [count: 0]:
  # DEBUG BEGIN_STMT
  _12 = ii_24 * 16;
  _13 = _12 + va_40;
  _14 = hif_drv_30(D)->tx_meta;
  _15 = ii_24 * 32;
  _16 = _14 + _15;
  _17 = (struct pfe_ct_hif_tx_hdr_t *) _13;
  _16->hif_tx_header = _17;
  # DEBUG BEGIN_STMT
  _18 = _12 + pa_42;
  _19 = (void *) _18;
  _16->hif_tx_header_pa = _19;
  # DEBUG BEGIN_STMT
  _20 = pfe_hif_chnl_get_id (_22);
  _21 = (unsigned char) _20;
  _17->chid = _21;
  # DEBUG BEGIN_STMT
  ii_46 = ii_24 + 1;
  # DEBUG ii => ii_46

  <bb 13> [count: 0]:
  # ii_24 = PHI <ii_46(12), 0(10)>
  # DEBUG ii => ii_24
  # DEBUG BEGIN_STMT
  _22 = hif_drv_30(D)->channel;
  _23 = pfe_hif_chnl_get_tx_fifo_depth (_22);
  if (_23 > ii_24)
    goto <bb 12>; [0.00%]
  else
    goto <bb 14>; [0.00%]

  <bb 14> [count: 0]:
  # _25 = PHI <11(3), 11(5), 11(9), 5(11), 0(13)>
  return _25;

}


pfe_hif_drv_chnl_rx_oob_handler (void * arg)
{
  uint32_t ii;
  struct pfe_hif_drv_client_t * client;
  unsigned char _1;
  errno_t (*<T9af>) (struct pfe_hif_drv_client_t *, void *, uint32_t, uint32_t) _2;
  void * _3;
  short unsigned int _14;
  short unsigned int _15;

  <bb 2> [local count: 82570746]:
  # DEBUG BEGIN_STMT
  # DEBUG hif_drv => arg_7(D)
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG D#3 => &MEM[(struct pfe_hif_drv_t *)arg_7(D)].cl_api_lock
  _14 = MEM[(const oal_mutex_t *)arg_7(D) + 3264B];
  # DEBUG D#1 => D#3
  oal_mutex_lock.isra.0 (_14);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG ii => 0
  goto <bb 6>; [100.00%]

  <bb 3> [local count: 991171078]:
  # DEBUG BEGIN_STMT
  _1 = MEM[(struct pfe_hif_drv_t *)arg_7(D)].clients[ii_4].active;
  if (_1 == 1)
    goto <bb 4>; [34.00%]
  else
    goto <bb 5>; [66.00%]

  <bb 4> [local count: 336998167]:
  # DEBUG BEGIN_STMT
  client_11 = &MEM[(struct pfe_hif_drv_t *)arg_7(D)].clients[ii_4];
  # DEBUG client => client_11
  # DEBUG BEGIN_STMT
  _2 = MEM[(struct pfe_hif_drv_client_t *)arg_7(D)].clients[ii_4].event_handler;
  _3 = MEM[(struct pfe_hif_drv_client_t *)arg_7(D)].clients[ii_4].priv;
  _2 (client_11, _3, 3, 4294967295);

  <bb 5> [local count: 991171078]:
  # DEBUG BEGIN_STMT
  ii_13 = ii_4 + 1;
  # DEBUG ii => ii_13

  <bb 6> [local count: 1073741824]:
  # ii_4 = PHI <0(2), ii_13(5)>
  # DEBUG ii => ii_4
  # DEBUG BEGIN_STMT
  if (ii_4 != 12)
    goto <bb 3>; [92.31%]
  else
    goto <bb 7>; [7.69%]

  <bb 7> [local count: 82570746]:
  # DEBUG BEGIN_STMT
  # DEBUG D#4 => &MEM[(struct pfe_hif_drv_t *)arg_7(D)].cl_api_lock
  _15 = MEM[(const oal_mutex_t *)arg_7(D) + 3264B];
  # DEBUG D#2 => D#4
  oal_mutex_unlock.isra.0 (_15);
  # DEBUG BEGIN_STMT
  return;

}


pfe_hif_drv_client_ptp_ts_db_tick_iteration (struct pfe_hif_drv_client_t * client)
{
  struct pfe_hif_ptp_ts_db_t * _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  if (client_3(D) != 0B)
    goto <bb 3>; [53.47%]
  else
    goto <bb 4>; [46.53%]

  <bb 3> [local count: 574129754]:
  # DEBUG BEGIN_STMT
  _1 = &client_3(D)->ptpdb;
  pfe_hif_ptp_ts_db_tick_iteration (_1);

  <bb 4> [local count: 1073741824]:
  return;

}


pfe_hif_drv_client_tx_done (const struct pfe_hif_drv_client_t * client)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  return;

}


pfe_hif_drv_tx_job (void * arg)
{
  unsigned char _1;
  _Bool _2;
  long int _3;
  long int _4;
  short unsigned int _10;

  <bb 2> [local count: 131235111]:
  # DEBUG BEGIN_STMT
  # DEBUG hif_drv => arg_7(D)
  # DEBUG BEGIN_STMT
  _1 = MEM[(struct pfe_hif_drv_t *)arg_7(D)].tx_enabled;
  _2 = _1 == 1;
  _3 = (long int) _2;
  _4 = __builtin_expect (_3, 1);
  if (_4 != 0)
    goto <bb 3>; [90.00%]
  else
    goto <bb 4>; [10.00%]

  <bb 3> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG D#8 => &MEM[(struct pfe_hif_drv_t *)arg_7(D)].tx_lock
  _10 = MEM[(const oal_mutex_t *)arg_7(D) + 64B];
  # DEBUG D#1 => D#8
  oal_mutex_lock.isra.0 (_10);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_hif_drv_tx_job.part.0 (arg_7(D));

  <bb 4> [local count: 131235112]:
  return;

}


pfe_hif_drv_chnl_tx_isr (void * arg)
{
  struct oal_job_t * _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG hif_drv => arg_2(D)
  # DEBUG BEGIN_STMT
  _1 = &MEM[(struct pfe_hif_drv_t *)arg_2(D)].tx_job;
  oal_job_run (_1);
  # DEBUG BEGIN_STMT
  return;

}


pfe_hif_drv_rx_job (void * arg)
{
  unsigned char _1;
  _Bool _2;
  long int _3;
  long int _4;

  <bb 2> [local count: 131235111]:
  # DEBUG BEGIN_STMT
  # DEBUG hif_drv => arg_6(D)
  # DEBUG BEGIN_STMT
  _1 = MEM[(struct pfe_hif_drv_t *)arg_6(D)].rx_enabled;
  _2 = _1 == 1;
  _3 = (long int) _2;
  _4 = __builtin_expect (_3, 1);
  if (_4 != 0)
    goto <bb 3>; [90.00%]
  else
    goto <bb 4>; [10.00%]

  <bb 3> [local count: 118111600]:
  pfe_hif_drv_rx_job.part.0 (arg_6(D));

  <bb 4> [local count: 131235112]:
  return;

}


pfe_hif_drv_client_rx_done (const struct pfe_hif_drv_client_t * client)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  return;

}


fifo_get (struct fifo_t * const fifo)
{
  void * ret;
  long unsigned int _1;
  long unsigned int _2;
  _Bool _3;
  long int _4;
  long int _5;
  void * * _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  void * * _10;
  long unsigned int _11;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0B
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = fifo_15(D)->write;
  _2 = fifo_15(D)->read;
  # DEBUG fill_level => _1 - _2
  # DEBUG BEGIN_STMT
  _3 = _1 != _2;
  _4 = (long int) _3;
  _5 = __builtin_expect (_4, 1);
  if (_5 != 0)
    goto <bb 3>; [90.00%]
  else
    goto <bb 4>; [10.00%]

  <bb 3> [local count: 966367642]:
  # DEBUG BEGIN_STMT
  _6 = fifo_15(D)->data;
  _7 = fifo_15(D)->depth_mask;
  _8 = _2 & _7;
  _9 = _8 * 4;
  _10 = _6 + _9;
  ret_16 = *_10;
  # DEBUG ret => ret_16
  # DEBUG BEGIN_STMT
  _11 = _2 + 1;
  fifo_15(D)->read = _11;

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

}


fifo_put (struct fifo_t * const fifo, void * const ptr)
{
  errno_t err;
  uint32_t fill_level;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  _Bool _4;
  long int _5;
  long int _6;
  void * * _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  void * * _11;
  long unsigned int _12;
  long unsigned int _13;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = fifo_17(D)->write;
  _2 = fifo_17(D)->read;
  fill_level_18 = _1 - _2;
  # DEBUG fill_level => fill_level_18
  # DEBUG BEGIN_STMT
  _3 = fifo_17(D)->depth;
  _4 = _3 > fill_level_18;
  _5 = (long int) _4;
  _6 = __builtin_expect (_5, 1);
  if (_6 != 0)
    goto <bb 3>; [90.00%]
  else
    goto <bb 4>; [10.00%]

  <bb 3> [local count: 966367642]:
  # DEBUG BEGIN_STMT
  _7 = fifo_17(D)->data;
  _8 = fifo_17(D)->depth_mask;
  _9 = _1 & _8;
  _10 = _9 * 4;
  _11 = _7 + _10;
  *_11 = ptr_19(D);
  # DEBUG BEGIN_STMT
  __asm__ __volatile__(" dmb" :  :  : "memory");
  # DEBUG BEGIN_STMT
  _12 = fifo_17(D)->write;
  _13 = _12 + 1;
  fifo_17(D)->write = _13;
  # DEBUG BEGIN_STMT
  # DEBUG err => 0

  <bb 4> [local count: 1073741824]:
  # err_14 = PHI <0(3), 75(2)>
  # DEBUG err => err_14
  # DEBUG BEGIN_STMT
  return err_14;

}


