pfe_emac_cfg_isr (addr_t base_va, addr_t cbus_base)
{
  uint32_t dpp_fsm_status;
  uint32_t mtl_ecc_status;
  static const pfe_hm_evt_t dpp_fsm_events[25] = {36, 0, 0, 38, 0, 37, 0, 0, 40, 41, 0, 42, 43, 0, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, 39};
  static const pfe_hm_evt_t mtl_ecc_events[7] = {30, 32, 31, 0, 33, 35, 34};
  uint8_t instance_id;
  unsigned int _1;
  volatile uint32_t * _2;
  unsigned int _3;
  volatile uint32_t * _4;
  unsigned int _5;
  volatile uint32_t * _6;
  unsigned int _7;
  volatile uint32_t * _8;
  errno_t _20;

  <bb 2> :
  # DEBUG BEGIN_STMT
  instance_id_13 = pfe_emac_cfg_get_index (base_va_10(D), cbus_base_11(D));
  # DEBUG instance_id => instance_id_13
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = base_va_10(D) + 3276;
  _2 = (volatile uint32_t *) _1;
  mtl_ecc_status_14 ={v} *_2;
  # DEBUG mtl_ecc_status => mtl_ecc_status_14
  # DEBUG BEGIN_STMT
  _3 = base_va_10(D) + 320;
  _4 = (volatile uint32_t *) _3;
  dpp_fsm_status_15 ={v} *_4;
  # DEBUG dpp_fsm_status => dpp_fsm_status_15
  # DEBUG BEGIN_STMT
  pfe_emac_cfg_report_hm_event (instance_id_13, &mtl_ecc_events, 7, mtl_ecc_status_14);
  # DEBUG BEGIN_STMT
  pfe_emac_cfg_report_hm_event (instance_id_13, &dpp_fsm_events, 25, dpp_fsm_status_15);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = base_va_10(D) + 3276;
  _6 = (volatile uint32_t *) _5;
  *_6 ={v} mtl_ecc_status_14;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _7 = base_va_10(D) + 320;
  _8 = (volatile uint32_t *) _7;
  *_8 ={v} dpp_fsm_status_15;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _20 = 0;
  return _20;

}


pfe_emac_cfg_report_hm_event (uint8_t id, const pfe_hm_evt_t * events, uint8_t events_len, uint32_t flags)
{
  pfe_hm_src_t src;
  uint32_t isr_flags;
  uint8_t index;
  static const pfe_hm_src_t hm_src[3] = {2, 3, 4};
  int _1;
  long unsigned int _2;
  sizetype _3;
  const pfe_hm_evt_t * _4;
  <unnamed type> _5;
  sizetype _6;
  const pfe_hm_evt_t * _7;
  <unnamed type> _8;
  sizetype _9;
  const pfe_hm_evt_t * _10;
  <unnamed type> _11;
  sizetype _12;
  const pfe_hm_evt_t * _13;
  <unnamed type> _14;
  sizetype _15;
  const pfe_hm_evt_t * _16;
  <unnamed type> _17;
  unsigned char index.33_18;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  index_24 = 0;
  # DEBUG index => index_24
  # DEBUG BEGIN_STMT
  isr_flags_26 = flags_25(D);
  # DEBUG isr_flags => isr_flags_26
  # DEBUG BEGIN_STMT
  src_27 = 2;
  # DEBUG src => src_27
  # DEBUG BEGIN_STMT
  if (id_28(D) <= 2)
    goto <bb 3>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = (int) id_28(D);
  src_30 = hm_src[_1];
  # DEBUG src => src_30
  goto <bb 11>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _2 = isr_flags_20 & 1;
  if (_2 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 5> :
  _3 = (sizetype) index_19;
  _4 = events_32(D) + _3;
  _5 = *_4;
  if (_5 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _6 = (sizetype) index_19;
  _7 = events_32(D) + _6;
  _8 = *_7;
  if (_8 == 33)
    goto <bb 8>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 7> :
  _9 = (sizetype) index_19;
  _10 = events_32(D) + _9;
  _11 = *_10;
  if (_11 == 30)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _12 = (sizetype) index_19;
  _13 = events_32(D) + _12;
  _14 = *_13;
  pfe_hm_report (src_21, 1, _14, "");
  goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _15 = (sizetype) index_19;
  _16 = events_32(D) + _15;
  _17 = *_16;
  pfe_hm_report (src_21, 2, _17, "");

  <bb 10> :
  # DEBUG BEGIN_STMT
  index.33_18 = index_19;
  index_35 = index.33_18 + 1;
  # DEBUG index => index_35
  # DEBUG BEGIN_STMT
  isr_flags_36 = isr_flags_20 >> 1;
  # DEBUG isr_flags => isr_flags_36

  <bb 11> :
  # index_19 = PHI <index_24(3), index_35(10), index_24(2)>
  # isr_flags_20 = PHI <isr_flags_26(3), isr_flags_36(10), isr_flags_26(2)>
  # src_21 = PHI <src_30(3), src_21(10), src_27(2)>
  # DEBUG src => src_21
  # DEBUG isr_flags => isr_flags_20
  # DEBUG index => index_19
  # DEBUG BEGIN_STMT
  if (isr_flags_20 != 0)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 12> :
  if (index_19 < events_len_31(D))
    goto <bb 4>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 13> :
  return;

}


pfe_emac_cfg_get_stat_value (addr_t base_va, uint32_t stat_id)
{
  uint32_t stat_value;
  long unsigned int _1;
  volatile uint32_t * _2;
  uint32_t _7;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = base_va_3(D) + stat_id_4(D);
  _2 = (volatile uint32_t *) _1;
  stat_value_6 ={v} *_2;
  # DEBUG stat_value => stat_value_6
  # DEBUG BEGIN_STMT
  _7 = stat_value_6;
  return _7;

}


pfe_emac_cfg_get_rx_cnt (addr_t base_va)
{
  unsigned int _1;
  volatile uint32_t * _2;
  uint32_t _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = base_va_3(D) + 1920;
  _2 = (volatile uint32_t *) _1;
  _5 ={v} *_2;
  return _5;

}


pfe_emac_cfg_get_tx_cnt (addr_t base_va)
{
  unsigned int _1;
  volatile uint32_t * _2;
  uint32_t _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = base_va_3(D) + 1816;
  _2 = (volatile uint32_t *) _1;
  _5 ={v} *_2;
  return _5;

}


pfe_emac_cfg_mdio_write45 (addr_t base_va, uint8_t pa, uint8_t dev, uint16_t ra, uint16_t val)
{
  errno_t ret;
  uint32_t timeout;
  uint32_t reg;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  unsigned int _4;
  volatile uint32_t * _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  unsigned int _13;
  volatile uint32_t * _14;
  long unsigned int timeout.32_15;
  unsigned int _16;
  volatile uint32_t * _17;
  long unsigned int _18;
  long unsigned int _19;
  errno_t _38;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  timeout_23 = 500;
  # DEBUG timeout => timeout_23
  # DEBUG BEGIN_STMT
  ret_24 = 0;
  # DEBUG ret => ret_24
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) val_25(D);
  _2 = (long unsigned int) ra_26(D);
  _3 = _2 << 16;
  reg_27 = _1 | _3;
  # DEBUG reg => reg_27
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = base_va_28(D) + 516;
  _5 = (volatile uint32_t *) _4;
  *_5 ={v} reg_27;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = (long unsigned int) dev_31(D);
  _7 = _6 << 16;
  _8 = _7 & 2031616;
  _9 = (long unsigned int) pa_32(D);
  _10 = _9 << 21;
  _11 = _10 & 65011712;
  _12 = _8 | _11;
  reg_33 = _12 | 1543;
  # DEBUG reg => reg_33
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _13 = base_va_28(D) + 512;
  _14 = (volatile uint32_t *) _13;
  *_14 ={v} reg_33;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  goto <bb 6>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  timeout.32_15 = timeout_20;
  timeout_35 = timeout.32_15 + 4294967295;
  # DEBUG timeout => timeout_35
  if (timeout.32_15 == 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  ret_37 = 62;
  # DEBUG ret => ret_37
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  oal_time_usleep (10);

  <bb 6> :
  # timeout_20 = PHI <timeout_23(2), timeout_35(5)>
  # DEBUG timeout => timeout_20
  # DEBUG BEGIN_STMT
  _16 = base_va_28(D) + 512;
  _17 = (volatile uint32_t *) _16;
  _18 ={v} *_17;
  _19 = _18 & 1;
  if (_19 == 1)
    goto <bb 3>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 7> :
  # ret_21 = PHI <ret_37(4), ret_24(6)>
  # DEBUG ret => ret_21
  # DEBUG BEGIN_STMT
  _38 = ret_21;
  return _38;

}


pfe_emac_cfg_mdio_write22 (addr_t base_va, uint8_t pa, uint8_t ra, uint16_t val)
{
  errno_t ret;
  uint32_t timeout;
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  unsigned int _10;
  volatile uint32_t * _11;
  long unsigned int timeout.31_12;
  unsigned int _13;
  volatile uint32_t * _14;
  long unsigned int _15;
  long unsigned int _16;
  errno_t _34;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  timeout_20 = 500;
  # DEBUG timeout => timeout_20
  # DEBUG BEGIN_STMT
  ret_21 = 0;
  # DEBUG ret => ret_21
  # DEBUG BEGIN_STMT
  reg_23 = (uint32_t) val_22(D);
  # DEBUG reg => reg_23
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = base_va_24(D) + 516;
  _2 = (volatile uint32_t *) _1;
  *_2 ={v} reg_23;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = (long unsigned int) ra_27(D);
  _4 = _3 << 16;
  _5 = _4 & 2031616;
  _6 = (long unsigned int) pa_28(D);
  _7 = _6 << 21;
  _8 = _7 & 65011712;
  _9 = _5 | _8;
  reg_29 = _9 | 1541;
  # DEBUG reg => reg_29
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _10 = base_va_24(D) + 512;
  _11 = (volatile uint32_t *) _10;
  *_11 ={v} reg_29;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  goto <bb 6>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  timeout.31_12 = timeout_17;
  timeout_31 = timeout.31_12 + 4294967295;
  # DEBUG timeout => timeout_31
  if (timeout.31_12 == 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  ret_33 = 62;
  # DEBUG ret => ret_33
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  oal_time_usleep (10);

  <bb 6> :
  # timeout_17 = PHI <timeout_20(2), timeout_31(5)>
  # DEBUG timeout => timeout_17
  # DEBUG BEGIN_STMT
  _13 = base_va_24(D) + 512;
  _14 = (volatile uint32_t *) _13;
  _15 ={v} *_14;
  _16 = _15 & 1;
  if (_16 == 1)
    goto <bb 3>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 7> :
  # ret_18 = PHI <ret_33(4), ret_21(6)>
  # DEBUG ret => ret_18
  # DEBUG BEGIN_STMT
  _34 = ret_18;
  return _34;

}


pfe_emac_cfg_mdio_read45 (addr_t base_va, uint8_t pa, uint8_t dev, uint16_t ra, uint16_t * val)
{
  errno_t ret;
  uint32_t timeout;
  uint32_t reg;
  long unsigned int _1;
  unsigned int _2;
  volatile uint32_t * _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  unsigned int _11;
  volatile uint32_t * _12;
  long unsigned int timeout.30_13;
  unsigned int _14;
  volatile uint32_t * _15;
  long unsigned int _16;
  long unsigned int _17;
  unsigned int _18;
  volatile uint32_t * _19;
  short unsigned int _20;
  errno_t _42;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  timeout_25 = 500;
  # DEBUG timeout => timeout_25
  # DEBUG BEGIN_STMT
  ret_26 = 0;
  # DEBUG ret => ret_26
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) ra_27(D);
  reg_28 = _1 << 16;
  # DEBUG reg => reg_28
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = base_va_29(D) + 516;
  _3 = (volatile uint32_t *) _2;
  *_3 ={v} reg_28;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = (long unsigned int) dev_32(D);
  _5 = _4 << 16;
  _6 = _5 & 2031616;
  _7 = (long unsigned int) pa_33(D);
  _8 = _7 << 21;
  _9 = _8 & 65011712;
  _10 = _6 | _9;
  reg_34 = _10 | 1551;
  # DEBUG reg => reg_34
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _11 = base_va_29(D) + 512;
  _12 = (volatile uint32_t *) _11;
  *_12 ={v} reg_34;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  goto <bb 6>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  timeout.30_13 = timeout_21;
  timeout_36 = timeout.30_13 + 4294967295;
  # DEBUG timeout => timeout_36
  if (timeout.30_13 == 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  ret_38 = 62;
  # DEBUG ret => ret_38
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  oal_time_usleep (10);

  <bb 6> :
  # timeout_21 = PHI <timeout_25(2), timeout_36(5)>
  # DEBUG timeout => timeout_21
  # DEBUG BEGIN_STMT
  _14 = base_va_29(D) + 512;
  _15 = (volatile uint32_t *) _14;
  _16 ={v} *_15;
  _17 = _16 & 1;
  if (_17 == 1)
    goto <bb 3>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 7> :
  # ret_22 = PHI <ret_38(4), ret_26(6)>
  # DEBUG ret => ret_22
  # DEBUG BEGIN_STMT
  if (ret_22 == 0)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _18 = base_va_29(D) + 516;
  _19 = (volatile uint32_t *) _18;
  reg_39 ={v} *_19;
  # DEBUG reg => reg_39
  # DEBUG BEGIN_STMT
  _20 = (short unsigned int) reg_39;
  *val_40(D) = _20;

  <bb 9> :
  # DEBUG BEGIN_STMT
  _42 = ret_22;
  return _42;

}


pfe_emac_cfg_mdio_read22 (addr_t base_va, uint8_t pa, uint8_t ra, uint16_t * val)
{
  errno_t ret;
  uint32_t timeout;
  uint32_t reg;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  unsigned int _8;
  volatile uint32_t * _9;
  unsigned int _10;
  volatile uint32_t * _11;
  long unsigned int _12;
  unsigned int _13;
  volatile uint32_t * _14;
  short unsigned int _15;
  errno_t _36;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  timeout_21 = 500;
  # DEBUG timeout => timeout_21
  # DEBUG BEGIN_STMT
  ret_22 = 0;
  # DEBUG ret => ret_22
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) ra_23(D);
  _2 = _1 << 16;
  _3 = _2 & 2031616;
  _4 = (long unsigned int) pa_24(D);
  _5 = _4 << 21;
  _6 = _5 & 65011712;
  _7 = _3 | _6;
  reg_25 = _7 | 1549;
  # DEBUG reg => reg_25
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _8 = base_va_26(D) + 512;
  _9 = (volatile uint32_t *) _8;
  *_9 ={v} reg_25;

  <bb 3> :
  # timeout_16 = PHI <timeout_21(2), timeout_30(5)>
  # DEBUG timeout => timeout_16
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _10 = base_va_26(D) + 512;
  _11 = (volatile uint32_t *) _10;
  reg_29 ={v} *_11;
  # DEBUG reg => reg_29
  # DEBUG BEGIN_STMT
  if (timeout_16 == 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  ret_32 = 62;
  # DEBUG ret => ret_32
  # DEBUG BEGIN_STMT
  goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  timeout_30 = timeout_16 + 4294967295;
  # DEBUG timeout => timeout_30
  # DEBUG BEGIN_STMT
  oal_time_usleep (10);
  # DEBUG BEGIN_STMT
  _12 = reg_29 & 1;
  if (_12 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 6> :
  # ret_17 = PHI <ret_32(4), ret_22(5)>
  # DEBUG ret => ret_17
  # DEBUG BEGIN_STMT
  if (ret_17 == 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _13 = base_va_26(D) + 516;
  _14 = (volatile uint32_t *) _13;
  reg_33 ={v} *_14;
  # DEBUG reg => reg_33
  # DEBUG BEGIN_STMT
  _15 = (short unsigned int) reg_33;
  *val_34(D) = _15;

  <bb 8> :
  # DEBUG BEGIN_STMT
  _36 = ret_17;
  return _36;

}


pfe_emac_cfg_set_rx_flow_control (addr_t base_va, bool_t en)
{
  int32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _3;
  long unsigned int reg.28_4;
  long unsigned int _5;
  unsigned int _6;
  volatile uint32_t * _7;
  long unsigned int reg.29_8;
  long unsigned int iftmp.27_9;
  long unsigned int iftmp.27_15;
  long unsigned int iftmp.27_16;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = base_va_10(D) + 144;
  _2 = (volatile uint32_t *) _1;
  _3 ={v} *_2;
  reg_12 = (int32_t) _3;
  # DEBUG reg => reg_12
  # DEBUG BEGIN_STMT
  reg_13 = reg_12 & -2;
  # DEBUG reg => reg_13
  # DEBUG BEGIN_STMT
  if (en_14(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.27_16 = 1;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.27_15 = 0;

  <bb 5> :
  # iftmp.27_9 = PHI <iftmp.27_16(3), iftmp.27_15(4)>
  reg.28_4 = (long unsigned int) reg_13;
  _5 = iftmp.27_9 | reg.28_4;
  reg_17 = (int32_t) _5;
  # DEBUG reg => reg_17
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = base_va_10(D) + 144;
  _7 = (volatile uint32_t *) _6;
  reg.29_8 = (long unsigned int) reg_17;
  *_7 ={v} reg.29_8;
  # DEBUG BEGIN_STMT
  return;

}


pfe_emac_cfg_set_tx_flow_control (addr_t base_va, bool_t en)
{
  uint32_t ii;
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _3;
  unsigned int _4;
  volatile uint32_t * _5;
  long unsigned int iftmp.26_7;
  long unsigned int iftmp.26_18;
  long unsigned int iftmp.26_19;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ii_10 = 0;
  # DEBUG ii => ii_10

  <bb 3> :
  # ii_6 = PHI <ii_10(2), ii_15(4)>
  # DEBUG ii => ii_6
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = base_va_12(D) + 112;
  _2 = (volatile uint32_t *) _1;
  reg_13 ={v} *_2;
  # DEBUG reg => reg_13
  # DEBUG BEGIN_STMT
  oal_time_usleep (100);
  # DEBUG BEGIN_STMT
  ii_15 = ii_6 + 1;
  # DEBUG ii => ii_15
  # DEBUG BEGIN_STMT
  _3 = reg_13 & 1;
  if (_3 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  if (ii_15 <= 9)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  if (ii_15 > 9)
    goto <bb 10>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  reg_16 = reg_13 & 4294967293;
  # DEBUG reg => reg_16
  # DEBUG BEGIN_STMT
  if (en_17(D) != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  iftmp.26_19 = 2;
  goto <bb 9>; [INV]

  <bb 8> :
  iftmp.26_18 = 0;

  <bb 9> :
  # iftmp.26_7 = PHI <iftmp.26_19(7), iftmp.26_18(8)>
  reg_20 = iftmp.26_7 | reg_16;
  # DEBUG reg => reg_20
  # DEBUG BEGIN_STMT
  reg_21 = reg_20 | 4026531840;
  # DEBUG reg => reg_21
  # DEBUG BEGIN_STMT
  reg_22 = reg_21;
  # DEBUG reg => reg_22
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = base_va_12(D) + 112;
  _5 = (volatile uint32_t *) _4;
  *_5 ={v} reg_22;

  <bb 10> :
  # DEBUG BEGIN_STMT
  return;

}


pfe_emac_cfg_get_rx_flow_control (addr_t base_va, bool_t * en)
{
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _3;
  _Bool _4;
  unsigned char _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = base_va_6(D) + 144;
  _2 = (volatile uint32_t *) _1;
  reg_8 ={v} *_2;
  # DEBUG reg => reg_8
  # DEBUG BEGIN_STMT
  _3 = reg_8 & 1;
  _4 = _3 != 0;
  _5 = (unsigned char) _4;
  *en_9(D) = _5;
  return;

}


pfe_emac_cfg_get_tx_flow_control (addr_t base_va, bool_t * en)
{
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _3;
  _Bool _4;
  unsigned char _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = base_va_6(D) + 112;
  _2 = (volatile uint32_t *) _1;
  reg_8 ={v} *_2;
  # DEBUG reg => reg_8
  # DEBUG BEGIN_STMT
  _3 = reg_8 & 2;
  _4 = _3 != 0;
  _5 = (unsigned char) _4;
  *en_9(D) = _5;
  return;

}


pfe_emac_cfg_set_enable (addr_t base_va, bool_t en)
{
  uint32_t reg;
  volatile uint32_t * base_va.22_1;
  long unsigned int _2;
  volatile uint32_t * base_va.25_3;
  long unsigned int iftmp.23_4;
  long unsigned int iftmp.24_5;
  long unsigned int iftmp.23_11;
  long unsigned int iftmp.23_12;
  long unsigned int iftmp.24_13;
  long unsigned int iftmp.24_14;

  <bb 2> :
  # DEBUG BEGIN_STMT
  base_va.22_1 = (volatile uint32_t *) base_va_6(D);
  reg_8 ={v} *base_va.22_1;
  # DEBUG reg => reg_8
  # DEBUG BEGIN_STMT
  reg_9 = reg_8 & 4294967292;
  # DEBUG reg => reg_9
  # DEBUG BEGIN_STMT
  if (en_10(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.23_12 = 2;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.23_11 = 0;

  <bb 5> :
  # iftmp.23_4 = PHI <iftmp.23_12(3), iftmp.23_11(4)>
  if (en_10(D) != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  iftmp.24_14 = 1;
  goto <bb 8>; [INV]

  <bb 7> :
  iftmp.24_13 = 0;

  <bb 8> :
  # iftmp.24_5 = PHI <iftmp.24_14(6), iftmp.24_13(7)>
  _2 = iftmp.23_4 | iftmp.24_5;
  reg_15 = reg_9 | _2;
  # DEBUG reg => reg_15
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  base_va.25_3 = (volatile uint32_t *) base_va_6(D);
  *base_va.25_3 ={v} reg_15;
  # DEBUG BEGIN_STMT
  return;

}


pfe_emac_cfg_set_broadcast (addr_t base_va, bool_t en)
{
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _3;
  unsigned int _4;
  volatile uint32_t * _5;
  long unsigned int iftmp.21_6;
  long unsigned int iftmp.21_11;
  long unsigned int iftmp.21_12;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = base_va_7(D) + 8;
  _2 = (volatile uint32_t *) _1;
  _3 ={v} *_2;
  reg_9 = _3 & 4294967263;
  # DEBUG reg => reg_9
  # DEBUG BEGIN_STMT
  if (en_10(D) == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.21_12 = 32;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.21_11 = 0;

  <bb 5> :
  # iftmp.21_6 = PHI <iftmp.21_12(3), iftmp.21_11(4)>
  reg_13 = iftmp.21_6 | reg_9;
  # DEBUG reg => reg_13
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = base_va_7(D) + 8;
  _5 = (volatile uint32_t *) _4;
  *_5 ={v} reg_13;
  # DEBUG BEGIN_STMT
  return;

}


pfe_emac_cfg_set_allmulti_mode (addr_t base_va, bool_t en)
{
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _3;
  unsigned int _4;
  volatile uint32_t * _5;
  long unsigned int iftmp.20_6;
  long unsigned int iftmp.20_11;
  long unsigned int iftmp.20_12;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = base_va_7(D) + 8;
  _2 = (volatile uint32_t *) _1;
  _3 ={v} *_2;
  reg_9 = _3 & 4294967279;
  # DEBUG reg => reg_9
  # DEBUG BEGIN_STMT
  if (en_10(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.20_12 = 16;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.20_11 = 0;

  <bb 5> :
  # iftmp.20_6 = PHI <iftmp.20_12(3), iftmp.20_11(4)>
  reg_13 = iftmp.20_6 | reg_9;
  # DEBUG reg => reg_13
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = base_va_7(D) + 8;
  _5 = (volatile uint32_t *) _4;
  *_5 ={v} reg_13;
  # DEBUG BEGIN_STMT
  return;

}


pfe_emac_cfg_set_promisc_mode (addr_t base_va, bool_t en)
{
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _3;
  unsigned int _4;
  volatile uint32_t * _5;
  long unsigned int iftmp.19_6;
  long unsigned int iftmp.19_11;
  long unsigned int iftmp.19_12;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = base_va_7(D) + 8;
  _2 = (volatile uint32_t *) _1;
  _3 ={v} *_2;
  reg_9 = _3 & 4294967294;
  # DEBUG reg => reg_9
  # DEBUG BEGIN_STMT
  if (en_10(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.19_12 = 1;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.19_11 = 0;

  <bb 5> :
  # iftmp.19_6 = PHI <iftmp.19_12(3), iftmp.19_11(4)>
  reg_13 = iftmp.19_6 | reg_9;
  # DEBUG reg => reg_13
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = base_va_7(D) + 8;
  _5 = (volatile uint32_t *) _4;
  *_5 ={v} reg_13;
  # DEBUG BEGIN_STMT
  return;

}


pfe_emac_cfg_set_loopback (addr_t base_va, bool_t en)
{
  uint32_t reg;
  volatile uint32_t * base_va.16_1;
  long unsigned int _2;
  volatile uint32_t * base_va.18_3;
  long unsigned int iftmp.17_4;
  long unsigned int iftmp.17_9;
  long unsigned int iftmp.17_10;

  <bb 2> :
  # DEBUG BEGIN_STMT
  base_va.16_1 = (volatile uint32_t *) base_va_5(D);
  _2 ={v} *base_va.16_1;
  reg_7 = _2 & 4294963199;
  # DEBUG reg => reg_7
  # DEBUG BEGIN_STMT
  if (en_8(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.17_10 = 4096;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.17_9 = 0;

  <bb 5> :
  # iftmp.17_4 = PHI <iftmp.17_10(3), iftmp.17_9(4)>
  reg_11 = iftmp.17_4 | reg_7;
  # DEBUG reg => reg_11
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  base_va.18_3 = (volatile uint32_t *) base_va_5(D);
  *base_va.18_3 ={v} reg_11;
  # DEBUG BEGIN_STMT
  return;

}


pfe_emac_cfg_set_hash_group (addr_t base_va, uint32_t hash, bool_t en)
{
  uint8_t pos;
  uint8_t hash_table_idx;
  uint32_t val;
  uint32_t old_reg;
  uint32_t reg;
  unsigned char _1;
  unsigned int _2;
  unsigned int _3;
  unsigned char _4;
  unsigned char _5;
  unsigned int _6;
  unsigned int _7;
  unsigned int _8;
  unsigned int _9;
  volatile uint32_t * _10;
  int _11;
  long unsigned int _12;
  int _13;
  long unsigned int _14;
  long unsigned int _15;
  unsigned int _16;
  unsigned int _17;
  unsigned int _18;
  unsigned int _19;
  volatile uint32_t * _20;
  unsigned int _21;
  unsigned int _22;
  unsigned int _23;
  unsigned int _24;
  volatile uint32_t * _25;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  val_29 = hash_28(D) >> 26;
  # DEBUG val => val_29
  # DEBUG BEGIN_STMT
  _1 = (unsigned char) val_29;
  _2 = (unsigned int) _1;
  _3 = _2 >> 5;
  _4 = (unsigned char) _3;
  hash_table_idx_30 = _4 & 1;
  # DEBUG hash_table_idx => hash_table_idx_30
  # DEBUG BEGIN_STMT
  _5 = (unsigned char) val_29;
  pos_31 = _5 & 31;
  # DEBUG pos => pos_31
  # DEBUG BEGIN_STMT
  _6 = (unsigned int) hash_table_idx_30;
  _7 = _6 + 4;
  _8 = _7 * 4;
  _9 = base_va_32(D) + _8;
  _10 = (volatile uint32_t *) _9;
  reg_34 ={v} *_10;
  # DEBUG reg => reg_34
  # DEBUG BEGIN_STMT
  old_reg_35 = reg_34;
  # DEBUG old_reg => old_reg_35
  # DEBUG BEGIN_STMT
  if (en_36(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _11 = (int) pos_31;
  _12 = 1 << _11;
  reg_38 = reg_34 | _12;
  # DEBUG reg => reg_38
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _13 = (int) pos_31;
  _14 = 1 << _13;
  _15 = ~_14;
  reg_37 = reg_34 & _15;
  # DEBUG reg => reg_37

  <bb 5> :
  # reg_26 = PHI <reg_38(3), reg_37(4)>
  # DEBUG reg => reg_26
  # DEBUG BEGIN_STMT
  if (reg_26 != old_reg_35)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _16 = (unsigned int) hash_table_idx_30;
  _17 = _16 + 4;
  _18 = _17 * 4;
  _19 = base_va_32(D) + _18;
  _20 = (volatile uint32_t *) _19;
  *_20 ={v} reg_26;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  oal_time_udelay (10);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _21 = (unsigned int) hash_table_idx_30;
  _22 = _21 + 4;
  _23 = _22 * 4;
  _24 = base_va_32(D) + _23;
  _25 = (volatile uint32_t *) _24;
  *_25 ={v} reg_26;

  <bb 7> :
  # DEBUG BEGIN_STMT
  return;

}


pfe_emac_cfg_get_hash (addr_t base_va, const uint8_t * addr)
{
  uint32_t _4;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = crc32_reversed (addr_2(D), 6);
  return _4;

}


pfe_emac_cfg_write_addr_slot (addr_t base_va, const uint8_t * addr, uint8_t slot)
{
  uint32_t top;
  uint32_t bottom;
  const uint8_t * _1;
  unsigned char _2;
  long unsigned int _3;
  long unsigned int _4;
  const uint8_t * _5;
  unsigned char _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  const uint8_t * _10;
  unsigned char _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  unsigned char _15;
  long unsigned int _16;
  const uint8_t * _17;
  unsigned char _18;
  long unsigned int _19;
  long unsigned int _20;
  const uint8_t * _21;
  unsigned char _22;
  long unsigned int _23;
  unsigned int _24;
  unsigned int _25;
  unsigned int _26;
  unsigned int _27;
  volatile uint32_t * _28;
  unsigned int _29;
  unsigned int _30;
  unsigned int _31;
  unsigned int _32;
  volatile uint32_t * _33;
  unsigned int _34;
  unsigned int _35;
  unsigned int _36;
  unsigned int _37;
  volatile uint32_t * _38;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = addr_40(D) + 3;
  _2 = *_1;
  _3 = (long unsigned int) _2;
  _4 = _3 << 24;
  _5 = addr_40(D) + 2;
  _6 = *_5;
  _7 = (long unsigned int) _6;
  _8 = _7 << 16;
  _9 = _4 | _8;
  _10 = addr_40(D) + 1;
  _11 = *_10;
  _12 = (long unsigned int) _11;
  _13 = _12 << 8;
  _14 = _9 | _13;
  _15 = *addr_40(D);
  _16 = (long unsigned int) _15;
  bottom_42 = _14 | _16;
  # DEBUG bottom => bottom_42
  # DEBUG BEGIN_STMT
  _17 = addr_40(D) + 5;
  _18 = *_17;
  _19 = (long unsigned int) _18;
  _20 = _19 << 8;
  _21 = addr_40(D) + 4;
  _22 = *_21;
  _23 = (long unsigned int) _22;
  top_43 = _20 | _23;
  # DEBUG top => top_43
  # DEBUG BEGIN_STMT
  if (top_43 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 3>; [INV]

  <bb 3> :
  if (bottom_42 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  top_44 = top_43 | 2147483648;
  # DEBUG top => top_44

  <bb 5> :
  # top_39 = PHI <top_43(3), top_44(4)>
  # DEBUG top => top_39
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _24 = (unsigned int) slot_45(D);
  _25 = _24 + 96;
  _26 = _25 * 8;
  _27 = base_va_46(D) + _26;
  _28 = (volatile uint32_t *) _27;
  *_28 ={v} top_39;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _29 = (unsigned int) slot_45(D);
  _30 = _29 * 8;
  _31 = base_va_46(D) + _30;
  _32 = _31 + 772;
  _33 = (volatile uint32_t *) _32;
  *_33 ={v} bottom_42;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  oal_time_udelay (10);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _34 = (unsigned int) slot_45(D);
  _35 = _34 * 8;
  _36 = base_va_46(D) + _35;
  _37 = _36 + 772;
  _38 = (volatile uint32_t *) _37;
  *_38 ={v} bottom_42;
  # DEBUG BEGIN_STMT
  return;

}


pfe_emac_cfg_set_max_frame_length (addr_t base_va, uint32_t len)
{
  errno_t ret;
  bool_t edvlp;
  bool_t gpslce;
  bool_t s2kp;
  bool_t je;
  uint32_t maxlen;
  uint32_t reg;
  volatile uint32_t * base_va.14_1;
  long unsigned int _2;
  _Bool _3;
  long unsigned int _4;
  _Bool _5;
  long unsigned int _6;
  _Bool _7;
  unsigned int _8;
  volatile uint32_t * _9;
  long unsigned int _10;
  _Bool _11;
  unsigned int _12;
  volatile uint32_t * _13;
  unsigned int _14;
  volatile uint32_t * _15;
  errno_t _47;

  <bb 2> :
  # DEBUG BEGIN_STMT
  maxlen_24 = 0;
  # DEBUG maxlen => maxlen_24
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  base_va.14_1 = (volatile uint32_t *) base_va_25(D);
  reg_27 ={v} *base_va.14_1;
  # DEBUG reg => reg_27
  # DEBUG BEGIN_STMT
  _2 = reg_27 & 65536;
  _3 = _2 != 0;
  je_28 = (bool_t) _3;
  # DEBUG je => je_28
  # DEBUG BEGIN_STMT
  _4 = reg_27 & 4194304;
  _5 = _4 != 0;
  s2kp_29 = (bool_t) _5;
  # DEBUG s2kp => s2kp_29
  # DEBUG BEGIN_STMT
  _6 = reg_27 & 8388608;
  _7 = _6 != 0;
  gpslce_30 = (bool_t) _7;
  # DEBUG gpslce => gpslce_30
  # DEBUG BEGIN_STMT
  _8 = base_va_25(D) + 80;
  _9 = (volatile uint32_t *) _8;
  reg_31 ={v} *_9;
  # DEBUG reg => reg_31
  # DEBUG BEGIN_STMT
  _10 = reg_31 & 67108864;
  _11 = _10 != 0;
  edvlp_32 = (bool_t) _11;
  # DEBUG edvlp => edvlp_32
  # DEBUG BEGIN_STMT
  if (je_28 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  if (edvlp_32 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  maxlen_33 = 9026;
  # DEBUG maxlen => maxlen_33

  <bb 5> :
  # maxlen_16 = PHI <maxlen_24(2), maxlen_24(3), maxlen_33(4)>
  # DEBUG maxlen => maxlen_16
  # DEBUG BEGIN_STMT
  if (je_28 == 0)
    goto <bb 6>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 6> :
  if (s2kp_29 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  maxlen_34 = 2000;
  # DEBUG maxlen => maxlen_34

  <bb 8> :
  # maxlen_17 = PHI <maxlen_16(5), maxlen_16(6), maxlen_34(7)>
  # DEBUG maxlen => maxlen_17
  # DEBUG BEGIN_STMT
  if (je_28 == 0)
    goto <bb 9>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 9> :
  if (s2kp_29 == 0)
    goto <bb 10>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 10> :
  if (gpslce_30 != 0)
    goto <bb 11>; [INV]
  else
    goto <bb 13>; [INV]

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

  <bb 12> :
  # DEBUG BEGIN_STMT
  _12 = base_va_25(D) + 4;
  _13 = (volatile uint32_t *) _12;
  reg_35 ={v} *_13;
  # DEBUG reg => reg_35
  # DEBUG BEGIN_STMT
  maxlen_36 = reg_35 & 16383;
  # DEBUG maxlen => maxlen_36
  # DEBUG BEGIN_STMT
  maxlen_37 = maxlen_36 + 8;
  # DEBUG maxlen => maxlen_37

  <bb 13> :
  # maxlen_18 = PHI <maxlen_17(8), maxlen_17(9), maxlen_17(10), maxlen_17(11), maxlen_37(12)>
  # DEBUG maxlen => maxlen_18
  # DEBUG BEGIN_STMT
  if (je_28 == 0)
    goto <bb 14>; [INV]
  else
    goto <bb 18>; [INV]

  <bb 14> :
  if (s2kp_29 == 0)
    goto <bb 15>; [INV]
  else
    goto <bb 18>; [INV]

  <bb 15> :
  if (gpslce_30 == 0)
    goto <bb 16>; [INV]
  else
    goto <bb 18>; [INV]

  <bb 16> :
  if (edvlp_32 != 0)
    goto <bb 17>; [INV]
  else
    goto <bb 18>; [INV]

  <bb 17> :
  # DEBUG BEGIN_STMT
  maxlen_38 = 1526;
  # DEBUG maxlen => maxlen_38

  <bb 18> :
  # maxlen_19 = PHI <maxlen_18(13), maxlen_18(14), maxlen_18(15), maxlen_18(16), maxlen_38(17)>
  # DEBUG maxlen => maxlen_19
  # DEBUG BEGIN_STMT
  if (je_28 != 0)
    goto <bb 19>; [INV]
  else
    goto <bb 21>; [INV]

  <bb 19> :
  if (edvlp_32 == 0)
    goto <bb 20>; [INV]
  else
    goto <bb 21>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  maxlen_39 = 9022;
  # DEBUG maxlen => maxlen_39

  <bb 21> :
  # maxlen_20 = PHI <maxlen_19(18), maxlen_19(19), maxlen_39(20)>
  # DEBUG maxlen => maxlen_20
  # DEBUG BEGIN_STMT
  if (je_28 == 0)
    goto <bb 22>; [INV]
  else
    goto <bb 26>; [INV]

  <bb 22> :
  if (s2kp_29 == 0)
    goto <bb 23>; [INV]
  else
    goto <bb 26>; [INV]

  <bb 23> :
  if (gpslce_30 != 0)
    goto <bb 24>; [INV]
  else
    goto <bb 26>; [INV]

  <bb 24> :
  if (edvlp_32 == 0)
    goto <bb 25>; [INV]
  else
    goto <bb 26>; [INV]

  <bb 25> :
  # DEBUG BEGIN_STMT
  _14 = base_va_25(D) + 4;
  _15 = (volatile uint32_t *) _14;
  reg_40 ={v} *_15;
  # DEBUG reg => reg_40
  # DEBUG BEGIN_STMT
  maxlen_41 = reg_40 & 16383;
  # DEBUG maxlen => maxlen_41
  # DEBUG BEGIN_STMT
  maxlen_42 = maxlen_41 + 4;
  # DEBUG maxlen => maxlen_42

  <bb 26> :
  # maxlen_21 = PHI <maxlen_20(21), maxlen_20(22), maxlen_20(23), maxlen_20(24), maxlen_42(25)>
  # DEBUG maxlen => maxlen_21
  # DEBUG BEGIN_STMT
  if (je_28 == 0)
    goto <bb 27>; [INV]
  else
    goto <bb 31>; [INV]

  <bb 27> :
  if (s2kp_29 == 0)
    goto <bb 28>; [INV]
  else
    goto <bb 31>; [INV]

  <bb 28> :
  if (gpslce_30 == 0)
    goto <bb 29>; [INV]
  else
    goto <bb 31>; [INV]

  <bb 29> :
  if (edvlp_32 == 0)
    goto <bb 30>; [INV]
  else
    goto <bb 31>; [INV]

  <bb 30> :
  # DEBUG BEGIN_STMT
  maxlen_43 = 1522;
  # DEBUG maxlen => maxlen_43

  <bb 31> :
  # maxlen_22 = PHI <maxlen_21(26), maxlen_21(27), maxlen_21(28), maxlen_21(29), maxlen_43(30)>
  # DEBUG maxlen => maxlen_22
  # DEBUG BEGIN_STMT
  if (len_44(D) > maxlen_22)
    goto <bb 32>; [INV]
  else
    goto <bb 33>; [INV]

  <bb 32> :
  # DEBUG BEGIN_STMT
  ret_46 = 22;
  # DEBUG ret => ret_46
  goto <bb 34>; [INV]

  <bb 33> :
  # DEBUG BEGIN_STMT
  ret_45 = 0;
  # DEBUG ret => ret_45

  <bb 34> :
  # ret_23 = PHI <ret_46(32), ret_45(33)>
  # DEBUG ret => ret_23
  # DEBUG BEGIN_STMT
  _47 = ret_23;
  return _47;

}


pfe_emac_cfg_get_link_status (addr_t base_va, pfe_emac_link_speed_t * link_speed, pfe_emac_duplex_t * duplex, bool_t * link)
{
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  _Bool _9;
  unsigned char _10;
  pfe_emac_duplex_t iftmp.13_11;
  pfe_emac_duplex_t iftmp.13_21;
  pfe_emac_duplex_t iftmp.13_22;
  errno_t _27;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = base_va_13(D) + 248;
  _2 = (volatile uint32_t *) _1;
  reg_15 ={v} *_2;
  # DEBUG reg => reg_15
  # DEBUG BEGIN_STMT
  _3 = reg_15 >> 17;
  _4 = _3 & 3;
  switch (_4) <default: <L3> [INV], case 1: <L0> [INV], case 2: <L1> [INV], case 3: <L2> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  *link_speed_16(D) = 2;
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  *link_speed_16(D) = 3;
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  *link_speed_16(D) = 0;
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 6> :
<L3>:
  # DEBUG BEGIN_STMT
  *link_speed_16(D) = 1;
  # DEBUG BEGIN_STMT

  <bb 7> :
  # DEBUG BEGIN_STMT
  _5 = reg_15 >> 16;
  _6 = _5 & 1;
  if (_6 != 0)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  iftmp.13_22 = 2;
  goto <bb 10>; [INV]

  <bb 9> :
  iftmp.13_21 = 1;

  <bb 10> :
  # iftmp.13_11 = PHI <iftmp.13_22(8), iftmp.13_21(9)>
  *duplex_23(D) = iftmp.13_11;
  # DEBUG BEGIN_STMT
  _7 = reg_15 >> 19;
  _8 = _7 & 1;
  _9 = _8 != 0;
  _10 = (unsigned char) _9;
  *link_25(D) = _10;
  # DEBUG BEGIN_STMT
  _27 = 0;
  return _27;

}


pfe_emac_cfg_get_link_config (addr_t base_va, pfe_emac_speed_t * speed, pfe_emac_duplex_t * duplex)
{
  uint32_t reg;
  volatile uint32_t * base_va.11_1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  pfe_emac_duplex_t iftmp.12_6;
  pfe_emac_duplex_t iftmp.12_16;
  pfe_emac_duplex_t iftmp.12_17;
  errno_t _20;

  <bb 2> :
  # DEBUG BEGIN_STMT
  base_va.11_1 = (volatile uint32_t *) base_va_8(D);
  reg_10 ={v} *base_va.11_1;
  # DEBUG reg => reg_10
  # DEBUG BEGIN_STMT
  _2 = reg_10 >> 14;
  _3 = _2 & 3;
  switch (_3) <default: <L3> [INV], case 1: <L0> [INV], case 2: <L1> [INV], case 3: <L2> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  *speed_11(D) = 4;
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  *speed_11(D) = 1;
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  *speed_11(D) = 2;
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 6> :
<L3>:
  # DEBUG BEGIN_STMT
  *speed_11(D) = 3;
  # DEBUG BEGIN_STMT

  <bb 7> :
  # DEBUG BEGIN_STMT
  _4 = reg_10 >> 13;
  _5 = _4 & 1;
  if (_5 != 0)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  iftmp.12_17 = 2;
  goto <bb 10>; [INV]

  <bb 9> :
  iftmp.12_16 = 1;

  <bb 10> :
  # iftmp.12_6 = PHI <iftmp.12_17(8), iftmp.12_16(9)>
  *duplex_18(D) = iftmp.12_6;
  # DEBUG BEGIN_STMT
  _20 = 0;
  return _20;

}


pfe_emac_cfg_set_speed (addr_t base_va, pfe_emac_speed_t speed)
{
  errno_t ret;
  uint32_t reg;
  volatile uint32_t * base_va.9_1;
  long unsigned int _2;
  int _3;
  volatile uint32_t * base_va.10_4;
  errno_t _23;

  <bb 2> :
  # DEBUG BEGIN_STMT
  base_va.9_1 = (volatile uint32_t *) base_va_8(D);
  _2 ={v} *base_va.9_1;
  reg_10 = _2 & 4294918143;
  # DEBUG reg => reg_10
  # DEBUG BEGIN_STMT
  ret_11 = 0;
  # DEBUG ret => ret_11
  # DEBUG BEGIN_STMT
  _3 = (int) speed_12(D);
  switch (_3) <default: <L4> [INV], case 1: <L0> [INV], case 2: <L1> [INV], case 3: <L2> [INV], case 4: <L3> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  reg_19 = reg_10 | 32768;
  # DEBUG reg => reg_19
  # DEBUG BEGIN_STMT
  reg_20 = reg_19;
  # DEBUG reg => reg_20
  # DEBUG BEGIN_STMT
  goto <bb 8>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  reg_17 = reg_10 | 32768;
  # DEBUG reg => reg_17
  # DEBUG BEGIN_STMT
  reg_18 = reg_17 | 16384;
  # DEBUG reg => reg_18
  # DEBUG BEGIN_STMT
  goto <bb 8>; [INV]

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  reg_15 = reg_10;
  # DEBUG reg => reg_15
  # DEBUG BEGIN_STMT
  reg_16 = reg_15;
  # DEBUG reg => reg_16
  # DEBUG BEGIN_STMT
  goto <bb 8>; [INV]

  <bb 6> :
<L3>:
  # DEBUG BEGIN_STMT
  reg_13 = reg_10;
  # DEBUG reg => reg_13
  # DEBUG BEGIN_STMT
  reg_14 = reg_13 | 16384;
  # DEBUG reg => reg_14
  # DEBUG BEGIN_STMT
  goto <bb 8>; [INV]

  <bb 7> :
<L4>:
  # DEBUG BEGIN_STMT
  ret_21 = 22;
  # DEBUG ret => ret_21
  # DEBUG BEGIN_STMT

  <bb 8> :
  # reg_5 = PHI <reg_20(3), reg_18(4), reg_16(5), reg_14(6), reg_10(7)>
  # ret_6 = PHI <ret_11(3), ret_11(4), ret_11(5), ret_11(6), ret_21(7)>
  # DEBUG ret => ret_6
  # DEBUG reg => reg_5
  # DEBUG BEGIN_STMT
  if (ret_6 == 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  base_va.10_4 = (volatile uint32_t *) base_va_8(D);
  *base_va.10_4 ={v} reg_5;

  <bb 10> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _23 = ret_6;
  return _23;

}


pfe_emac_cfg_set_mii_mode (addr_t base_va, pfe_emac_mii_mode_t mode)
{
  errno_t _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = 0;
  return _1;

}


pfe_emac_cfg_set_duplex (addr_t base_va, pfe_emac_duplex_t duplex)
{
  errno_t ret;
  uint32_t reg;
  volatile uint32_t * base_va.7_1;
  long unsigned int _2;
  int _3;
  volatile uint32_t * base_va.8_4;
  errno_t _17;

  <bb 2> :
  # DEBUG BEGIN_STMT
  base_va.7_1 = (volatile uint32_t *) base_va_8(D);
  _2 ={v} *base_va.7_1;
  reg_10 = _2 & 4294959103;
  # DEBUG reg => reg_10
  # DEBUG BEGIN_STMT
  ret_11 = 0;
  # DEBUG ret => ret_11
  # DEBUG BEGIN_STMT
  _3 = (int) duplex_12(D);
  switch (_3) <default: <L2> [INV], case 1: <L0> [INV], case 2: <L1> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  reg_14 = reg_10;
  # DEBUG reg => reg_14
  # DEBUG BEGIN_STMT
  goto <bb 6>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  reg_13 = reg_10 | 8192;
  # DEBUG reg => reg_13
  # DEBUG BEGIN_STMT
  goto <bb 6>; [INV]

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  ret_15 = 22;
  # DEBUG ret => ret_15
  # DEBUG BEGIN_STMT

  <bb 6> :
  # reg_5 = PHI <reg_14(3), reg_13(4), reg_10(5)>
  # ret_6 = PHI <ret_11(3), ret_11(4), ret_15(5)>
  # DEBUG ret => ret_6
  # DEBUG reg => reg_5
  # DEBUG BEGIN_STMT
  if (ret_6 == 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  base_va.8_4 = (volatile uint32_t *) base_va_8(D);
  *base_va.8_4 ={v} reg_5;

  <bb 8> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _17 = ret_6;
  return _17;

}


pfe_emac_cfg_tx_disable (addr_t base_va)
{
  unsigned int _1;
  volatile uint32_t * _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = base_va_3(D) + 2816;
  _2 = (volatile uint32_t *) _1;
  *_2 ={v} 0;
  # DEBUG BEGIN_STMT
  return;

}


pfe_emac_cfg_adjust_ts_time (addr_t base_va, uint32_t sec, uint32_t nsec, bool_t sgn)
{
  errno_t ret;
  int32_t sec_temp;
  uint32_t nsec_temp;
  uint32_t ii;
  uint32_t regval;
  signed int nsec_temp.4_1;
  unsigned int _2;
  volatile uint32_t * _3;
  long unsigned int _4;
  long unsigned int _5;
  unsigned int _6;
  volatile uint32_t * _7;
  long unsigned int sec_temp.5_8;
  unsigned int _9;
  volatile uint32_t * _10;
  long unsigned int _11;
  unsigned int _12;
  volatile uint32_t * _13;
  unsigned int _14;
  volatile uint32_t * _15;
  unsigned int _16;
  volatile uint32_t * _17;
  long unsigned int _18;
  long unsigned int iftmp.6_25;
  long unsigned int iftmp.6_42;
  long unsigned int iftmp.6_43;
  errno_t _54;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  nsec_temp_29 = nsec_28(D);
  # DEBUG nsec_temp => nsec_temp_29
  # DEBUG BEGIN_STMT
  sec_temp_31 = (int32_t) sec_30(D);
  # DEBUG sec_temp => sec_temp_31
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  nsec_temp.4_1 = (signed int) nsec_temp_29;
  if (nsec_temp.4_1 < 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  ret_32 = 0;
  # DEBUG ret => ret_32
  # DEBUG BEGIN_STMT
  _2 = base_va_33(D) + 2816;
  _3 = (volatile uint32_t *) _2;
  regval_35 ={v} *_3;
  # DEBUG regval => regval_35
  # DEBUG BEGIN_STMT
  if (sgn_36(D) == 0)
    goto <bb 5>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _4 = regval_35 & 512;
  if (_4 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  nsec_temp_38 = 1000000000 - nsec_28(D);
  # DEBUG nsec_temp => nsec_temp_38
  goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  nsec_temp_37 = 2147483648 - nsec_28(D);
  # DEBUG nsec_temp => nsec_temp_37

  <bb 8> :
  # nsec_temp_20 = PHI <nsec_temp_38(6), nsec_temp_37(7)>
  # DEBUG nsec_temp => nsec_temp_20
  # DEBUG BEGIN_STMT
  sec_temp_39 = -sec_temp_31;
  # DEBUG sec_temp => sec_temp_39

  <bb 9> :
  # nsec_temp_21 = PHI <nsec_temp_29(4), nsec_temp_20(8)>
  # sec_temp_22 = PHI <sec_temp_31(4), sec_temp_39(8)>
  # DEBUG sec_temp => sec_temp_22
  # DEBUG nsec_temp => nsec_temp_21
  # DEBUG BEGIN_STMT
  _5 = regval_35 & 512;
  if (_5 != 0)
    goto <bb 10>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  if (nsec_temp_21 > 999999999)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  ret_40 = 22;
  # DEBUG ret => ret_40

  <bb 12> :
  # ret_23 = PHI <ret_32(9), ret_32(10), ret_40(11)>
  # DEBUG ret => ret_23
  # DEBUG BEGIN_STMT
  if (ret_23 == 0)
    goto <bb 13>; [INV]
  else
    goto <bb 22>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = base_va_33(D) + 2832;
  _7 = (volatile uint32_t *) _6;
  sec_temp.5_8 = (long unsigned int) sec_temp_22;
  *_7 ={v} sec_temp.5_8;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (sgn_36(D) == 0)
    goto <bb 14>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 14> :
  iftmp.6_43 = 2147483648;
  goto <bb 16>; [INV]

  <bb 15> :
  iftmp.6_42 = 0;

  <bb 16> :
  # iftmp.6_25 = PHI <iftmp.6_43(14), iftmp.6_42(15)>
  _9 = base_va_33(D) + 2836;
  _10 = (volatile uint32_t *) _9;
  _11 = iftmp.6_25 | nsec_temp_21;
  *_10 ={v} _11;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _12 = base_va_33(D) + 2816;
  _13 = (volatile uint32_t *) _12;
  regval_45 ={v} *_13;
  # DEBUG regval => regval_45
  # DEBUG BEGIN_STMT
  regval_46 = regval_45 | 8;
  # DEBUG regval => regval_46
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _14 = base_va_33(D) + 2816;
  _15 = (volatile uint32_t *) _14;
  *_15 ={v} regval_46;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ii_48 = 0;
  # DEBUG ii => ii_48

  <bb 17> :
  # ii_19 = PHI <ii_48(16), ii_51(19)>
  # DEBUG ii => ii_19
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _16 = base_va_33(D) + 2816;
  _17 = (volatile uint32_t *) _16;
  regval_49 ={v} *_17;
  # DEBUG regval => regval_49
  # DEBUG BEGIN_STMT
  oal_time_usleep (100);
  # DEBUG BEGIN_STMT
  _18 = regval_49 & 8;
  if (_18 != 0)
    goto <bb 18>; [INV]
  else
    goto <bb 20>; [INV]

  <bb 18> :
  if (ii_19 <= 9)
    goto <bb 19>; [INV]
  else
    goto <bb 20>; [INV]

  <bb 19> :
  # DEBUG BEGIN_STMT
  ii_51 = ii_19 + 1;
  # DEBUG ii => ii_51
  # DEBUG BEGIN_STMT
  goto <bb 17>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  if (ii_19 > 9)
    goto <bb 21>; [INV]
  else
    goto <bb 22>; [INV]

  <bb 21> :
  # DEBUG BEGIN_STMT
  ret_52 = 62;
  # DEBUG ret => ret_52

  <bb 22> :
  # ret_24 = PHI <ret_53(3), ret_23(12), ret_23(20), ret_52(21)>
  # DEBUG ret => ret_24
  # DEBUG BEGIN_STMT
  _54 = ret_24;
  return _54;

}


pfe_emac_cfg_set_ts_time (addr_t base_va, uint32_t sec, uint32_t nsec, uint16_t sec_hi)
{
  errno_t ret;
  uint32_t ii;
  uint32_t regval;
  signed int nsec.3_1;
  unsigned int _2;
  volatile uint32_t * _3;
  unsigned int _4;
  volatile uint32_t * _5;
  unsigned int _6;
  volatile uint32_t * _7;
  long unsigned int _8;
  unsigned int _9;
  volatile uint32_t * _10;
  unsigned int _11;
  volatile uint32_t * _12;
  unsigned int _13;
  volatile uint32_t * _14;
  long unsigned int _15;
  errno_t _38;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  nsec.3_1 = (signed int) nsec_20(D);
  if (nsec.3_1 < 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = base_va_21(D) + 2832;
  _3 = (volatile uint32_t *) _2;
  *_3 ={v} sec_23(D);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = base_va_21(D) + 2836;
  _5 = (volatile uint32_t *) _4;
  *_5 ={v} nsec_20(D);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = base_va_21(D) + 2844;
  _7 = (volatile uint32_t *) _6;
  _8 = (long unsigned int) sec_hi_26(D);
  *_7 ={v} _8;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _9 = base_va_21(D) + 2816;
  _10 = (volatile uint32_t *) _9;
  regval_28 ={v} *_10;
  # DEBUG regval => regval_28
  # DEBUG BEGIN_STMT
  regval_29 = regval_28 | 4;
  # DEBUG regval => regval_29
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _11 = base_va_21(D) + 2816;
  _12 = (volatile uint32_t *) _11;
  *_12 ={v} regval_29;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ii_31 = 0;
  # DEBUG ii => ii_31

  <bb 5> :
  # ii_16 = PHI <ii_31(4), ii_34(7)>
  # DEBUG ii => ii_16
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _13 = base_va_21(D) + 2816;
  _14 = (volatile uint32_t *) _13;
  regval_32 ={v} *_14;
  # DEBUG regval => regval_32
  # DEBUG BEGIN_STMT
  oal_time_usleep (100);
  # DEBUG BEGIN_STMT
  _15 = regval_32 & 4;
  if (_15 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 6> :
  if (ii_16 <= 9)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  ii_34 = ii_16 + 1;
  # DEBUG ii => ii_34
  # DEBUG BEGIN_STMT
  goto <bb 5>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  if (ii_16 > 9)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  ret_36 = 62;
  # DEBUG ret => ret_36
  goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  ret_35 = 0;
  # DEBUG ret => ret_35

  <bb 11> :
  # ret_17 = PHI <ret_37(3), ret_36(9), ret_35(10)>
  # DEBUG ret => ret_17
  # DEBUG BEGIN_STMT
  _38 = ret_17;
  return _38;

}


pfe_emac_cfg_get_ts_time (addr_t base_va, uint32_t * sec, uint32_t * nsec, uint16_t * sec_hi)
{
  uint32_t sec_tmp;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _3;
  unsigned int _4;
  volatile uint32_t * _5;
  long unsigned int _6;
  unsigned int _7;
  volatile uint32_t * _8;
  long unsigned int _9;
  short unsigned int _10;
  unsigned int _11;
  volatile uint32_t * _12;
  long unsigned int _13;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = base_va_16(D) + 2824;
  _2 = (volatile uint32_t *) _1;
  _3 ={v} *_2;
  *sec_17(D) = _3;
  # DEBUG BEGIN_STMT
  _4 = base_va_16(D) + 2828;
  _5 = (volatile uint32_t *) _4;
  _6 ={v} *_5;
  *nsec_19(D) = _6;
  # DEBUG BEGIN_STMT
  _7 = base_va_16(D) + 2844;
  _8 = (volatile uint32_t *) _7;
  _9 ={v} *_8;
  _10 = (short unsigned int) _9;
  *sec_hi_21(D) = _10;
  # DEBUG BEGIN_STMT
  _11 = base_va_16(D) + 2824;
  _12 = (volatile uint32_t *) _11;
  sec_tmp_23 ={v} *_12;
  # DEBUG sec_tmp => sec_tmp_23
  # DEBUG BEGIN_STMT
  _13 = *sec_17(D);
  if (sec_tmp_23 != _13)
    goto <bb 2>; [INV]
  else
    goto <bb 3>; [INV]

  <bb 3> :
  return;

}


pfe_emac_cfg_adjust_ts_freq (addr_t base_va, uint32_t i_clk_hz, uint32_t o_clk_hz, uint32_t ppb, bool_t sgn)
{
  errno_t ret;
  uint32_t ii;
  uint32_t regval;
  uint32_t delta;
  uint32_t nil;
  long long unsigned int _1;
  long long unsigned int _2;
  long long unsigned int _3;
  long long unsigned int _4;
  long long unsigned int _5;
  long long unsigned int _6;
  long long unsigned int _7;
  long long unsigned int _8;
  long long unsigned int _9;
  long long unsigned int _10;
  long long unsigned int _11;
  unsigned int _12;
  volatile uint32_t * _13;
  unsigned int _14;
  volatile uint32_t * _15;
  unsigned int _16;
  volatile uint32_t * _17;
  long unsigned int _18;
  unsigned int _19;
  volatile uint32_t * _20;
  long unsigned int _21;
  errno_t _47;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (long long unsigned int) o_clk_hz_26(D);
  _2 = _1 << 32;
  _3 = (long long unsigned int) i_clk_hz_27(D);
  _4 = _2 / _3;
  nil_28 = (uint32_t) _4;
  # DEBUG nil => nil_28
  # DEBUG BEGIN_STMT
  _5 = (long long unsigned int) nil_28;
  _6 = (long long unsigned int) ppb_29(D);
  _7 = _5 * _6;
  _8 = _7 / 1000000000;
  delta_30 = (uint32_t) _8;
  # DEBUG delta => delta_30
  # DEBUG BEGIN_STMT
  if (sgn_31(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _9 = (long long unsigned int) nil_28;
  _10 = (long long unsigned int) delta_30;
  _11 = _9 + _10;
  if (_11 > 4294967295)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  regval_35 = 4294967295;
  # DEBUG regval => regval_35
  goto <bb 9>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  regval_34 = nil_28 + delta_30;
  # DEBUG regval => regval_34
  goto <bb 9>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  if (delta_30 > nil_28)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  regval_33 = 0;
  # DEBUG regval => regval_33
  goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  regval_32 = nil_28 - delta_30;
  # DEBUG regval => regval_32

  <bb 9> :
  # regval_22 = PHI <regval_34(5), regval_33(7), regval_32(8), regval_35(4)>
  # DEBUG regval => regval_22
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _12 = base_va_36(D) + 2840;
  _13 = (volatile uint32_t *) _12;
  *_13 ={v} regval_22;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _14 = base_va_36(D) + 2816;
  _15 = (volatile uint32_t *) _14;
  regval_39 ={v} *_15;
  # DEBUG regval => regval_39
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _16 = base_va_36(D) + 2816;
  _17 = (volatile uint32_t *) _16;
  _18 = regval_39 | 32;
  *_17 ={v} _18;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ii_41 = 0;
  # DEBUG ii => ii_41

  <bb 10> :
  # ii_23 = PHI <ii_41(9), ii_44(12)>
  # DEBUG ii => ii_23
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _19 = base_va_36(D) + 2816;
  _20 = (volatile uint32_t *) _19;
  regval_42 ={v} *_20;
  # DEBUG regval => regval_42
  # DEBUG BEGIN_STMT
  oal_time_usleep (100);
  # DEBUG BEGIN_STMT
  _21 = regval_42 & 32;
  if (_21 != 0)
    goto <bb 11>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 11> :
  if (ii_23 <= 9)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  ii_44 = ii_23 + 1;
  # DEBUG ii => ii_44
  # DEBUG BEGIN_STMT
  goto <bb 10>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  if (ii_23 > 9)
    goto <bb 14>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  ret_46 = 62;
  # DEBUG ret => ret_46
  goto <bb 16>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  ret_45 = 0;
  # DEBUG ret => ret_45

  <bb 16> :
  # ret_24 = PHI <ret_46(14), ret_45(15)>
  # DEBUG ret => ret_24
  # DEBUG BEGIN_STMT
  _47 = ret_24;
  return _47;

}


pfe_emac_cfg_disable_ts (addr_t base_va)
{
  unsigned int _1;
  volatile uint32_t * _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = base_va_3(D) + 2816;
  _2 = (volatile uint32_t *) _1;
  *_2 ={v} 0;
  # DEBUG BEGIN_STMT
  return;

}


pfe_emac_cfg_enable_ts (addr_t base_va, bool_t eclk, uint32_t i_clk_hz, uint32_t o_clk_hz)
{
  errno_t ret;
  uint32_t ii;
  uint32_t regval;
  uint32_t sns;
  uint32_t ss;
  uint64_t val;
  unsigned int _1;
  volatile uint32_t * _2;
  unsigned int _3;
  volatile uint32_t * _4;
  long long unsigned int _5;
  long long unsigned int _6;
  long long unsigned int _7;
  long long unsigned int _8;
  long long unsigned int _9;
  long unsigned int _10;
  long long unsigned int _11;
  long long unsigned int _12;
  long long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  unsigned int _21;
  volatile uint32_t * _22;
  long unsigned int _23;
  long long unsigned int _24;
  long long unsigned int _25;
  long long unsigned int _26;
  long long unsigned int _27;
  unsigned int _28;
  volatile uint32_t * _29;
  long unsigned int _30;
  unsigned int _31;
  volatile uint32_t * _32;
  unsigned int _33;
  volatile uint32_t * _34;
  long unsigned int _35;
  unsigned int _36;
  volatile uint32_t * _37;
  long unsigned int _38;
  unsigned int _39;
  volatile uint32_t * _40;
  unsigned int _41;
  volatile uint32_t * _42;
  unsigned int _43;
  volatile uint32_t * _44;
  unsigned int _45;
  volatile uint32_t * _46;
  unsigned int _47;
  volatile uint32_t * _48;
  long unsigned int _49;
  long unsigned int iftmp.2_55;
  long unsigned int iftmp.2_63;
  long unsigned int iftmp.2_64;
  errno_t _96;

  <bb 2> :
  # DEBUG BEGIN_STMT
  val_59 = 1000000000000;
  # DEBUG val => val_59
  # DEBUG BEGIN_STMT
  ss_60 = 0;
  # DEBUG ss => ss_60
  sns_61 = 0;
  # DEBUG sns => sns_61
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (eclk_62(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.2_64 = 1130243;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.2_63 = 81667;

  <bb 5> :
  # iftmp.2_55 = PHI <iftmp.2_64(3), iftmp.2_63(4)>
  _1 = base_va_65(D) + 2816;
  _2 = (volatile uint32_t *) _1;
  *_2 ={v} iftmp.2_55;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = base_va_65(D) + 2816;
  _4 = (volatile uint32_t *) _3;
  regval_68 ={v} *_4;
  # DEBUG regval => regval_68
  # DEBUG BEGIN_STMT
  if (eclk_62(D) == 1)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret_95 = 0;
  # DEBUG ret => ret_95
  goto <bb 23>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _5 = val_59 / 1000;
  _6 = (long long unsigned int) o_clk_hz_69(D);
  _7 = _5 / _6;
  ss_70 = (uint32_t) _7;
  # DEBUG ss => ss_70
  # DEBUG BEGIN_STMT
  _8 = (long long unsigned int) o_clk_hz_69(D);
  _9 = val_59 / _8;
  _10 = (long unsigned int) _9;
  _11 = val_59 / 1000;
  _12 = (long long unsigned int) o_clk_hz_69(D);
  _13 = _11 / _12;
  _14 = (long unsigned int) _13;
  _15 = _14 * 1000;
  sns_71 = _10 - _15;
  # DEBUG sns => sns_71
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _16 = regval_68 & 512;
  if (_16 == 0)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _17 = ss_70 * 1000;
  ss_72 = _17 / 465;
  # DEBUG ss => ss_72

  <bb 9> :
  # ss_50 = PHI <ss_70(7), ss_72(8)>
  # DEBUG ss => ss_50
  # DEBUG BEGIN_STMT
  _18 = sns_71 * 256;
  sns_73 = _18 / 1000;
  # DEBUG sns => sns_73
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _19 = ss_50 << 16;
  _20 = sns_73 << 8;
  _21 = base_va_65(D) + 2820;
  _22 = (volatile uint32_t *) _21;
  _23 = _19 | _20;
  *_22 ={v} _23;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _24 = (long long unsigned int) o_clk_hz_69(D);
  _25 = _24 << 32;
  _26 = (long long unsigned int) i_clk_hz_75(D);
  _27 = _25 / _26;
  _28 = base_va_65(D) + 2840;
  _29 = (volatile uint32_t *) _28;
  _30 = (long unsigned int) _27;
  *_29 ={v} _30;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _31 = base_va_65(D) + 2816;
  _32 = (volatile uint32_t *) _31;
  regval_77 ={v} *_32;
  # DEBUG regval => regval_77
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _33 = base_va_65(D) + 2816;
  _34 = (volatile uint32_t *) _33;
  _35 = regval_77 | 32;
  *_34 ={v} _35;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ii_79 = 0;
  # DEBUG ii => ii_79

  <bb 10> :
  # ii_51 = PHI <ii_79(9), ii_82(12)>
  # DEBUG ii => ii_51
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _36 = base_va_65(D) + 2816;
  _37 = (volatile uint32_t *) _36;
  regval_80 ={v} *_37;
  # DEBUG regval => regval_80
  # DEBUG BEGIN_STMT
  oal_time_usleep (100);
  # DEBUG BEGIN_STMT
  _38 = regval_80 & 32;
  if (_38 != 0)
    goto <bb 11>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 11> :
  if (ii_51 <= 9)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  ii_82 = ii_51 + 1;
  # DEBUG ii => ii_82
  # DEBUG BEGIN_STMT
  goto <bb 10>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  if (ii_51 > 9)
    goto <bb 14>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  ret_84 = 62;
  # DEBUG ret => ret_84
  goto <bb 16>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  ret_83 = 0;
  # DEBUG ret => ret_83

  <bb 16> :
  # ret_53 = PHI <ret_84(14), ret_83(15)>
  # DEBUG ret => ret_53
  # DEBUG BEGIN_STMT
  if (ret_53 == 0)
    goto <bb 17>; [INV]
  else
    goto <bb 23>; [INV]

  <bb 17> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _39 = base_va_65(D) + 2832;
  _40 = (volatile uint32_t *) _39;
  *_40 ={v} 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _41 = base_va_65(D) + 2836;
  _42 = (volatile uint32_t *) _41;
  *_42 ={v} 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _43 = base_va_65(D) + 2816;
  _44 = (volatile uint32_t *) _43;
  regval_87 ={v} *_44;
  # DEBUG regval => regval_87
  # DEBUG BEGIN_STMT
  regval_88 = regval_87 | 4;
  # DEBUG regval => regval_88
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _45 = base_va_65(D) + 2816;
  _46 = (volatile uint32_t *) _45;
  *_46 ={v} regval_88;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ii_90 = 0;
  # DEBUG ii => ii_90

  <bb 18> :
  # ii_52 = PHI <ii_90(17), ii_93(20)>
  # DEBUG ii => ii_52
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _47 = base_va_65(D) + 2816;
  _48 = (volatile uint32_t *) _47;
  regval_91 ={v} *_48;
  # DEBUG regval => regval_91
  # DEBUG BEGIN_STMT
  oal_time_usleep (100);
  # DEBUG BEGIN_STMT
  _49 = regval_91 & 4;
  if (_49 != 0)
    goto <bb 19>; [INV]
  else
    goto <bb 21>; [INV]

  <bb 19> :
  if (ii_52 <= 9)
    goto <bb 20>; [INV]
  else
    goto <bb 21>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  ii_93 = ii_52 + 1;
  # DEBUG ii => ii_93
  # DEBUG BEGIN_STMT
  goto <bb 18>; [INV]

  <bb 21> :
  # DEBUG BEGIN_STMT
  if (ii_52 > 9)
    goto <bb 22>; [INV]
  else
    goto <bb 23>; [INV]

  <bb 22> :
  # DEBUG BEGIN_STMT
  ret_94 = 62;
  # DEBUG ret => ret_94

  <bb 23> :
  # ret_54 = PHI <ret_95(6), ret_53(16), ret_53(21), ret_94(22)>
  # DEBUG ret => ret_54
  # DEBUG BEGIN_STMT
  _96 = ret_54;
  return _96;

}


pfe_emac_cfg_get_index (addr_t emac_base, addr_t cbus_base)
{
  uint8_t idx;
  unsigned int _1;
  uint8_t _9;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = emac_base_3(D) - cbus_base_4(D);
  switch (_1) <default: <L3> [INV], case 655360: <L0> [INV], case 671744: <L1> [INV], case 688128: <L2> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  idx_7 = 0;
  # DEBUG idx => idx_7
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  idx_6 = 1;
  # DEBUG idx => idx_6
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  idx_5 = 2;
  # DEBUG idx => idx_5
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 6> :
<L3>:
  # DEBUG BEGIN_STMT
  idx_8 = 255;
  # DEBUG idx => idx_8
  # DEBUG BEGIN_STMT

  <bb 7> :
  # idx_2 = PHI <idx_7(3), idx_6(4), idx_5(5), idx_8(6)>
  # DEBUG idx => idx_2
  # DEBUG BEGIN_STMT
  _9 = idx_2;
  return _9;

}


pfe_emac_cfg_init (addr_t base_va, pfe_emac_mii_mode_t mode, pfe_emac_speed_t speed, pfe_emac_duplex_t duplex)
{
  errno_t ret;
  uint32_t reg;
  volatile uint32_t * base_va.0_1;
  unsigned int _2;
  volatile uint32_t * _3;
  unsigned int _4;
  volatile uint32_t * _5;
  unsigned int _6;
  volatile uint32_t * _7;
  unsigned int _8;
  volatile uint32_t * _9;
  unsigned int _10;
  volatile uint32_t * _11;
  unsigned int _12;
  volatile uint32_t * _13;
  unsigned int _14;
  volatile uint32_t * _15;
  unsigned int _16;
  volatile uint32_t * _17;
  unsigned int _18;
  volatile uint32_t * _19;
  unsigned int _20;
  volatile uint32_t * _21;
  unsigned int _22;
  volatile uint32_t * _23;
  unsigned int _24;
  volatile uint32_t * _25;
  unsigned int _26;
  volatile uint32_t * _27;
  long unsigned int _28;
  unsigned int _29;
  volatile uint32_t * _30;
  unsigned int _31;
  volatile uint32_t * _32;
  unsigned char _33;
  volatile uint32_t * base_va.1_34;
  unsigned int _35;
  volatile uint32_t * _36;
  unsigned int _37;
  volatile uint32_t * _38;
  unsigned char _39;
  unsigned int _40;
  volatile uint32_t * _41;
  unsigned int _42;
  volatile uint32_t * _43;
  unsigned int _44;
  volatile uint32_t * _45;
  unsigned int _46;
  volatile uint32_t * _47;
  int _48;
  int _49;
  int _50;
  errno_t _96;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  base_va.0_1 = (volatile uint32_t *) base_va_55(D);
  *base_va.0_1 ={v} 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = base_va_55(D) + 768;
  _3 = (volatile uint32_t *) _2;
  *_3 ={v} 2147549166;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = base_va_55(D) + 772;
  _5 = (volatile uint32_t *) _4;
  *_5 ={v} 3721182122;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = base_va_55(D) + 8;
  _7 = (volatile uint32_t *) _6;
  *_7 ={v} 1094;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _8 = base_va_55(D) + 3296;
  _9 = (volatile uint32_t *) _8;
  *_9 ={v} 1;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _10 = base_va_55(D) + 112;
  _11 = (volatile uint32_t *) _10;
  reg_62 ={v} *_11;
  # DEBUG reg => reg_62
  # DEBUG BEGIN_STMT
  reg_63 = reg_62 & 4294967293;
  # DEBUG reg => reg_63
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _12 = base_va_55(D) + 112;
  _13 = (volatile uint32_t *) _12;
  *_13 ={v} reg_63;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _14 = base_va_55(D) + 180;
  _15 = (volatile uint32_t *) _14;
  *_15 ={v} 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _16 = base_va_55(D) + 1804;
  _17 = (volatile uint32_t *) _16;
  *_17 ={v} 4294967295;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _18 = base_va_55(D) + 1808;
  _19 = (volatile uint32_t *) _18;
  *_19 ={v} 4294967295;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _20 = base_va_55(D) + 2048;
  _21 = (volatile uint32_t *) _20;
  *_21 ={v} 4294967295;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _22 = base_va_55(D) + 3264;
  _23 = (volatile uint32_t *) _22;
  *_23 ={v} 31;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _24 = base_va_55(D) + 332;
  _25 = (volatile uint32_t *) _24;
  reg_70 ={v} *_25;
  # DEBUG reg => reg_70
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _26 = base_va_55(D) + 332;
  _27 = (volatile uint32_t *) _26;
  _28 = reg_70 | 2228240;
  *_27 ={v} _28;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _29 = base_va_55(D) + 3296;
  _30 = (volatile uint32_t *) _29;
  *_30 ={v} 5;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _31 = base_va_55(D) + 328;
  _32 = (volatile uint32_t *) _31;
  *_32 ={v} 3;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  reg_74 = 146415616;
  # DEBUG reg => reg_74
  # DEBUG BEGIN_STMT
  _33 = pfe_feature_mgr_is_available ("jumbo_frames");
  if (_33 == 1)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  reg_77 = reg_74 | 65536;
  # DEBUG reg => reg_77
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  reg_76 = reg_74;
  # DEBUG reg => reg_76

  <bb 5> :
  # reg_51 = PHI <reg_77(3), reg_76(4)>
  # DEBUG reg => reg_51
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  base_va.1_34 = (volatile uint32_t *) base_va_55(D);
  *base_va.1_34 ={v} reg_51;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _35 = base_va_55(D) + 3376;
  _36 = (volatile uint32_t *) _35;
  *_36 ={v} 16;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _37 = base_va_55(D) + 3328;
  _38 = (volatile uint32_t *) _37;
  *_38 ={v} 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _39 = pfe_feature_mgr_is_available ("jumbo_frames");
  if (_39 == 1)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _40 = base_va_55(D) + 4;
  _41 = (volatile uint32_t *) _40;
  *_41 ={v} 9022;
  # DEBUG BEGIN_STMT
  goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _42 = base_va_55(D) + 4;
  _43 = (volatile uint32_t *) _42;
  *_43 ={v} 1522;

  <bb 8> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _44 = base_va_55(D) + 2816;
  _45 = (volatile uint32_t *) _44;
  *_45 ={v} 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _46 = base_va_55(D) + 2820;
  _47 = (volatile uint32_t *) _46;
  *_47 ={v} 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _48 = pfe_emac_cfg_set_speed (base_va_55(D), speed_86(D));
  if (_48 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

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

  <bb 10> :
  # DEBUG BEGIN_STMT
  _49 = pfe_emac_cfg_set_mii_mode (base_va_55(D), mode_88(D));
  if (_49 != 0)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  ret_94 = 22;
  # DEBUG ret => ret_94
  goto <bb 15>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  _50 = pfe_emac_cfg_set_duplex (base_va_55(D), duplex_90(D));
  if (_50 != 0)
    goto <bb 13>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  ret_93 = 22;
  # DEBUG ret => ret_93
  goto <bb 15>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  ret_92 = 0;
  # DEBUG ret => ret_92

  <bb 15> :
  # ret_52 = PHI <ret_95(9), ret_94(11), ret_93(13), ret_92(14)>
  # DEBUG ret => ret_52
  # DEBUG BEGIN_STMT
  _96 = ret_52;
  return _96;

}


crc32_reversed (const uint8_t * const data, const uint32_t len)
{
  uint32_t jj;
  uint32_t ii;
  uint32_t res;
  const uint32_t poly;
  const uint8_t * _1;
  unsigned char _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  uint32_t _17;

  <bb 2> :
  # DEBUG BEGIN_STMT
  poly_11 = 3988292384;
  # DEBUG poly => poly_11
  # DEBUG BEGIN_STMT
  res_12 = 4294967295;
  # DEBUG res => res_12
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ii_13 = 0;
  # DEBUG ii => ii_13
  goto <bb 10>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = data_18(D) + ii_9;
  _2 = *_1;
  _3 = (long unsigned int) _2;
  res_19 = res_8 ^ _3;
  # DEBUG res => res_19
  # DEBUG BEGIN_STMT
  jj_20 = 0;
  # DEBUG jj => jj_20
  goto <bb 8>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _4 = res_7 & 1;
  if (_4 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  res_23 = res_7 >> 1;
  # DEBUG res => res_23
  # DEBUG BEGIN_STMT
  res_24 = res_23 ^ 3988292384;
  # DEBUG res => res_24
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  res_22 = res_7 >> 1;
  # DEBUG res => res_22

  <bb 7> :
  # res_6 = PHI <res_24(5), res_22(6)>
  # DEBUG res => res_6
  # DEBUG BEGIN_STMT
  jj_25 = jj_10 + 1;
  # DEBUG jj => jj_25

  <bb 8> :
  # res_7 = PHI <res_19(3), res_6(7)>
  # jj_10 = PHI <jj_20(3), jj_25(7)>
  # DEBUG jj => jj_10
  # DEBUG res => res_7
  # DEBUG BEGIN_STMT
  if (jj_10 <= 7)
    goto <bb 4>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  ii_21 = ii_9 + 1;
  # DEBUG ii => ii_21

  <bb 10> :
  # res_8 = PHI <res_12(2), res_7(9)>
  # ii_9 = PHI <ii_13(2), ii_21(9)>
  # DEBUG ii => ii_9
  # DEBUG res => res_8
  # DEBUG BEGIN_STMT
  if (ii_9 < len_14(D))
    goto <bb 3>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _5 = ~res_8;
  _17 = reverse_bits_32 (_5);
  return _17;

}


reverse_bits_32 (uint32_t u32Data)
{
  uint32_t u32RevData;
  uint32_t u32DataTemp;
  uint8_t u8Index;
  long unsigned int _1;
  long unsigned int _2;
  unsigned char u8Index.15_3;
  uint32_t _11;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  u32DataTemp_8 = u32Data_7(D);
  # DEBUG u32DataTemp => u32DataTemp_8
  # DEBUG BEGIN_STMT
  u32RevData_9 = 0;
  # DEBUG u32RevData => u32RevData_9
  # DEBUG BEGIN_STMT
  u8Index_10 = 0;
  # DEBUG u8Index => u8Index_10
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = u32RevData_6 << 1;
  _2 = u32DataTemp_5 & 1;
  u32RevData_13 = _1 | _2;
  # DEBUG u32RevData => u32RevData_13
  # DEBUG BEGIN_STMT
  u32DataTemp_14 = u32DataTemp_5 >> 1;
  # DEBUG u32DataTemp => u32DataTemp_14
  # DEBUG BEGIN_STMT
  u8Index.15_3 = u8Index_4;
  u8Index_15 = u8Index.15_3 + 1;
  # DEBUG u8Index => u8Index_15

  <bb 4> :
  # u8Index_4 = PHI <u8Index_10(2), u8Index_15(3)>
  # u32DataTemp_5 = PHI <u32DataTemp_8(2), u32DataTemp_14(3)>
  # u32RevData_6 = PHI <u32RevData_9(2), u32RevData_13(3)>
  # DEBUG u32RevData => u32RevData_6
  # DEBUG u32DataTemp => u32DataTemp_5
  # DEBUG u8Index => u8Index_4
  # DEBUG BEGIN_STMT
  if (u8Index_4 <= 31)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _11 = u32RevData_6;
  return _11;

}


