pfe_gpi_cfg_shp_get_drop_cnt (addr_t base_va, uint8_t id)
{
  unsigned int _1;
  unsigned int _2;
  unsigned int _3;
  unsigned int _4;
  volatile uint32_t * _5;
  uint32_t _9;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = (unsigned int) id_6(D);
  _2 = _1 + 111;
  _3 = _2 * 4;
  _4 = _3 + base_va_7(D);
  _5 = (volatile uint32_t *) _4;
  _9 ={v} *_5;
  return _9;

}


pfe_gpi_cfg_shp_get_limits (addr_t base_va, uint8_t id, uint32_t * max_credit, uint32_t * min_credit)
{
  uint32_t reg;
  unsigned int _1;
  unsigned int _2;
  unsigned int _3;
  unsigned int _4;
  volatile uint32_t * _5;
  unsigned int _6;
  unsigned int _7;
  unsigned int _8;
  volatile uint32_t * _9;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (unsigned int) id_10(D);
  _2 = _1 + 128;
  _3 = _2 * 4;
  _4 = _3 + base_va_11(D);
  _5 = (volatile uint32_t *) _4;
  reg_13 ={v} *_5;
  # DEBUG reg => reg_13
  # DEBUG BEGIN_STMT
  reg_14 = reg_13 & 4194303;
  # DEBUG reg => reg_14
  # DEBUG BEGIN_STMT
  *min_credit_15(D) = reg_14;
  # DEBUG BEGIN_STMT
  _6 = _1 * 12;
  _7 = _6 + base_va_11(D);
  _8 = _7 + 480;
  _9 = (volatile uint32_t *) _8;
  reg_17 ={v} *_9;
  # DEBUG reg => reg_17
  # DEBUG BEGIN_STMT
  reg_18 = reg_17 >> 8;
  # DEBUG reg => reg_18
  # DEBUG BEGIN_STMT
  reg_19 = reg_18 & 4194303;
  # DEBUG reg => reg_19
  # DEBUG BEGIN_STMT
  *max_credit_20(D) = reg_19;
  return;

}


pfe_gpi_cfg_shp_set_limits (addr_t base_va, uint8_t id, uint32_t max_credit, uint32_t min_credit)
{
  uint32_t reg;
  unsigned int _1;
  unsigned int _2;
  unsigned int _3;
  unsigned int _4;
  volatile uint32_t * _5;
  long unsigned int _6;
  unsigned int _7;
  unsigned int _8;
  unsigned int _9;
  volatile uint32_t * _10;
  long unsigned int _11;
  long unsigned int _12;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (unsigned int) id_13(D);
  _2 = _1 + 128;
  _3 = _2 * 4;
  _4 = _3 + base_va_14(D);
  _5 = (volatile uint32_t *) _4;
  _6 = min_credit_15(D) & 4194303;
  *_5 ={v} _6;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _7 = _1 * 12;
  _8 = _7 + base_va_14(D);
  _9 = _8 + 480;
  _10 = (volatile uint32_t *) _9;
  reg_18 ={v} *_10;
  # DEBUG reg => reg_18
  # DEBUG BEGIN_STMT
  reg_19 = reg_18 & 3221225727;
  # DEBUG reg => reg_19
  # DEBUG BEGIN_STMT
  _11 = max_credit_20(D) << 8;
  _12 = _11 & 1073741568;
  reg_21 = _12 | reg_19;
  # DEBUG reg => reg_21
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_10 ={v} reg_21;
  # DEBUG BEGIN_STMT
  return;

}


pfe_gpi_cfg_shp_get_isl_weight (addr_t base_va, uint8_t id, uint32_t * weight)
{
  uint32_t reg;
  unsigned int _1;
  unsigned int _2;
  unsigned int _3;
  unsigned int _4;
  volatile uint32_t * _5;
  long unsigned int _6;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (unsigned int) id_7(D);
  _2 = _1 * 12;
  _3 = _2 + base_va_8(D);
  _4 = _3 + 484;
  _5 = (volatile uint32_t *) _4;
  reg_10 ={v} *_5;
  # DEBUG reg => reg_10
  # DEBUG BEGIN_STMT
  _6 = reg_10 & 2047;
  *weight_11(D) = _6;
  return;

}


pfe_gpi_cfg_shp_set_isl_weight (addr_t base_va, uint8_t id, uint32_t clk_div_log2, uint32_t weight)
{
  uint32_t reg;
  unsigned int _1;
  unsigned int _2;
  unsigned int _3;
  unsigned int _4;
  volatile uint32_t * _5;
  long unsigned int _6;
  long unsigned int _7;
  unsigned int _8;
  volatile uint32_t * _9;
  long unsigned int _10;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (unsigned int) id_11(D);
  _2 = _1 * 12;
  _3 = _2 + base_va_12(D);
  _4 = _3 + 480;
  _5 = (volatile uint32_t *) _4;
  reg_14 ={v} *_5;
  # DEBUG reg => reg_14
  # DEBUG BEGIN_STMT
  reg_15 = reg_14 & 4294967265;
  # DEBUG reg => reg_15
  # DEBUG BEGIN_STMT
  _6 = clk_div_log2_16(D) << 1;
  _7 = _6 & 30;
  reg_17 = _7 | reg_15;
  # DEBUG reg => reg_17
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_5 ={v} reg_17;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _8 = _3 + 484;
  _9 = (volatile uint32_t *) _8;
  _10 = weight_19(D) & 2047;
  *_9 ={v} _10;
  # DEBUG BEGIN_STMT
  return;

}


pfe_gpi_cfg_shp_get_mode (addr_t base_va, uint8_t id, pfe_iqos_shp_rate_mode_t * mode)
{
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  int _3;
  long unsigned int _4;
  long unsigned int _5;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = base_va_7(D) + 504;
  _2 = (volatile uint32_t *) _1;
  reg_9 ={v} *_2;
  # DEBUG reg => reg_9
  # DEBUG BEGIN_STMT
  _3 = (int) id_10(D);
  _4 = reg_9 >> _3;
  _5 = _4 & 1;
  if (_5 != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  *mode_11(D) = 1;
  goto <bb 5>; [100.00%]

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

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

}


pfe_gpi_cfg_shp_set_mode (addr_t base_va, uint8_t id, pfe_iqos_shp_rate_mode_t mode)
{
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  int _3;
  long unsigned int _4;
  long unsigned int _5;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = base_va_7(D) + 504;
  _2 = (volatile uint32_t *) _1;
  reg_9 ={v} *_2;
  # DEBUG reg => reg_9
  # DEBUG BEGIN_STMT
  _3 = (int) id_10(D);
  _4 = 1 << _3;
  _5 = ~_4;
  reg_11 = _5 & reg_9;
  # DEBUG reg => reg_11
  # DEBUG BEGIN_STMT
  if (mode_12(D) == 1)
    goto <bb 3>; [34.00%]
  else
    goto <bb 4>; [66.00%]

  <bb 3> [local count: 365072220]:
  # DEBUG BEGIN_STMT
  reg_13 = _4 | reg_11;
  # DEBUG reg => reg_13

  <bb 4> [local count: 1073741824]:
  # reg_6 = PHI <reg_11(2), reg_13(3)>
  # DEBUG reg => reg_6
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_2 ={v} reg_6;
  # DEBUG BEGIN_STMT
  return;

}


pfe_gpi_cfg_shp_get_type (addr_t base_va, uint8_t id, pfe_iqos_shp_type_t * type)
{
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  unsigned int _3;
  unsigned int _4;
  unsigned int _5;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = base_va_7(D) + 504;
  _2 = (volatile uint32_t *) _1;
  reg_9 ={v} *_2;
  # DEBUG reg => reg_9
  # DEBUG BEGIN_STMT
  _3 = (unsigned int) id_10(D);
  _4 = _3 + 1;
  _5 = _4 * 2;
  reg_11 = reg_9 >> _5;
  # DEBUG reg => reg_11
  # DEBUG BEGIN_STMT
  reg_12 = reg_11 & 3;
  # DEBUG reg => reg_12
  # DEBUG BEGIN_STMT
  switch (reg_12) <default: <L5> [25.00%], case 0: <L0> [25.00%], case 1: <L1> [25.00%], case 2: <L2> [25.00%]>

  <bb 3> [local count: 268435456]:
<L0>:
  # DEBUG BEGIN_STMT
  *type_13(D) = 0;
  # DEBUG BEGIN_STMT
  goto <bb 6>; [100.00%]

  <bb 4> [local count: 268435456]:
<L1>:
  # DEBUG BEGIN_STMT
  *type_13(D) = 1;
  # DEBUG BEGIN_STMT
  goto <bb 6>; [100.00%]

  <bb 5> [local count: 268435456]:
<L2>:
  # DEBUG BEGIN_STMT
  *type_13(D) = 2;
  # DEBUG BEGIN_STMT

  <bb 6> [local count: 1073741824]:
<L5>:
  return;

}


pfe_gpi_cfg_shp_set_type (addr_t base_va, uint8_t id, pfe_iqos_shp_type_t type)
{
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  unsigned int _3;
  unsigned int _4;
  unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  <unnamed type> _18;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = base_va_10(D) + 504;
  _2 = (volatile uint32_t *) _1;
  reg_12 ={v} *_2;
  # DEBUG reg => reg_12
  # DEBUG BEGIN_STMT
  _3 = (unsigned int) id_13(D);
  _4 = _3 + 1;
  _5 = _4 * 2;
  _6 = 3 << _5;
  _7 = ~_6;
  reg_14 = _7 & reg_12;
  # DEBUG reg => reg_14
  # DEBUG BEGIN_STMT
  _18 = type_15(D) & 3;
  _8 = (long unsigned int) _18;
  _9 = _8 << _5;
  reg_16 = _9 | reg_14;
  # DEBUG reg => reg_16
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_2 ={v} reg_16;
  # DEBUG BEGIN_STMT
  return;

}


pfe_gpi_cfg_shp_is_enabled (addr_t base_va, uint8_t id)
{
  uint32_t reg;
  unsigned int _1;
  unsigned int _2;
  unsigned int _3;
  unsigned int _4;
  volatile uint32_t * _5;
  long unsigned int _6;
  unsigned char _11;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  _1 = (unsigned int) id_7(D);
  _2 = _1 * 12;
  _3 = _2 + base_va_8(D);
  _4 = _3 + 480;
  _5 = (volatile uint32_t *) _4;
  reg_10 ={v} *_5;
  # DEBUG reg => reg_10
  # DEBUG BEGIN_STMT
  _6 = reg_10 & 1;
  _11 = (unsigned char) _6;
  # DEBUG ret => _11
  # DEBUG BEGIN_STMT
  return _11;

}


pfe_gpi_cfg_shp_disable (addr_t base_va, uint8_t id)
{
  uint32_t reg;
  unsigned int _1;
  unsigned int _2;
  unsigned int _3;
  unsigned int _4;
  volatile uint32_t * _5;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = (unsigned int) id_6(D);
  _2 = _1 * 12;
  _3 = _2 + base_va_7(D);
  _4 = _3 + 480;
  _5 = (volatile uint32_t *) _4;
  reg_9 ={v} *_5;
  # DEBUG reg => reg_9
  # DEBUG BEGIN_STMT
  reg_10 = reg_9 & 4294967294;
  # DEBUG reg => reg_10
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_5 ={v} reg_10;
  # DEBUG BEGIN_STMT
  return;

}


pfe_gpi_cfg_shp_enable (addr_t base_va, uint8_t id)
{
  uint32_t reg;
  unsigned int _1;
  unsigned int _2;
  unsigned int _3;
  unsigned int _4;
  volatile uint32_t * _5;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = (unsigned int) id_6(D);
  _2 = _1 * 12;
  _3 = _2 + base_va_7(D);
  _4 = _3 + 480;
  _5 = (volatile uint32_t *) _4;
  reg_9 ={v} *_5;
  # DEBUG reg => reg_9
  # DEBUG BEGIN_STMT
  reg_10 = reg_9 | 1;
  # DEBUG reg => reg_10
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_5 ={v} reg_10;
  # DEBUG BEGIN_STMT
  return;

}


pfe_gpi_cfg_shp_default_init (addr_t base_va, uint8_t id)
{
  unsigned int _1;
  unsigned int _2;
  unsigned int _3;
  unsigned int _4;
  volatile uint32_t * _5;
  unsigned int _6;
  unsigned int _7;
  unsigned int _8;
  volatile uint32_t * _9;
  unsigned int _10;
  volatile uint32_t * _11;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (unsigned int) id_12(D);
  _2 = _1 * 12;
  _3 = _2 + base_va_13(D);
  _4 = _3 + 484;
  _5 = (volatile uint32_t *) _4;
  *_5 ={v} 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = _1 + 80;
  _7 = _6 * 4;
  _8 = _7 + base_va_13(D);
  _9 = (volatile uint32_t *) _8;
  *_9 ={v} 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_gpi_cfg_shp_set_type (base_va_13(D), id_12(D), 0);
  # DEBUG BEGIN_STMT
  pfe_gpi_cfg_shp_set_mode (base_va_13(D), id_12(D), 0);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _10 = _3 + 480;
  _11 = (volatile uint32_t *) _10;
  *_11 ={v} 0;
  # DEBUG BEGIN_STMT
  return;

}


pfe_gpi_cfg_get_sys_clk_mhz (addr_t cbus_base_va)
{
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  uint32_t _6;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = cbus_base_va_3(D) + 606272;
  _2 = (volatile uint32_t *) _1;
  reg_5 ={v} *_2;
  # DEBUG reg => reg_5
  # DEBUG BEGIN_STMT
  _6 = reg_5 & 65535;
  return _6;

}


pfe_gpi_cfg_wred_get_thr (addr_t base_va, pfe_iqos_queue_t queue, pfe_iqos_wred_thr_t thr, uint16_t * val)
{
  uint32_t reg;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  volatile uint32_t * _5;
  long unsigned int _6;
  short unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  volatile uint32_t * _12;
  short unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  volatile uint32_t * _18;
  short unsigned int _19;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG off => 0
  # DEBUG BEGIN_STMT
  switch (thr_21(D)) <default: <L5> [25.00%], case 0: <L1> [25.00%], case 1: <L2> [25.00%], case 2: <L0> [25.00%]>

  <bb 3> [local count: 268435456]:
<L0>:
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) queue_23(D);
  _2 = _1 * 12;
  _3 = _2 + base_va_24(D);
  _4 = _3 + 340;
  _5 = (volatile uint32_t *) _4;
  _6 ={v} *_5;
  _7 = (short unsigned int) _6;
  *val_25(D) = _7;
  # DEBUG BEGIN_STMT
  goto <bb 6>; [100.00%]

  <bb 4> [local count: 268435456]:
<L1>:
  # DEBUG BEGIN_STMT
  # DEBUG off => 16
  # DEBUG BEGIN_STMT
  _8 = (long unsigned int) queue_23(D);
  _9 = _8 * 12;
  _10 = _9 + base_va_24(D);
  _11 = _10 + 344;
  _12 = (volatile uint32_t *) _11;
  reg_29 ={v} *_12;
  # DEBUG reg => reg_29
  # DEBUG BEGIN_STMT
  reg_30 = reg_29 >> 16;
  # DEBUG reg => reg_30
  # DEBUG BEGIN_STMT
  # DEBUG reg => reg_30
  # DEBUG BEGIN_STMT
  _13 = (short unsigned int) reg_30;
  *val_25(D) = _13;
  # DEBUG BEGIN_STMT
  goto <bb 6>; [100.00%]

  <bb 5> [local count: 268435456]:
<L2>:
  # DEBUG BEGIN_STMT
  _14 = (long unsigned int) queue_23(D);
  _15 = _14 * 12;
  _16 = _15 + base_va_24(D);
  _17 = _16 + 344;
  _18 = (volatile uint32_t *) _17;
  reg_27 ={v} *_18;
  # DEBUG reg => reg_27
  # DEBUG BEGIN_STMT
  # DEBUG reg => reg_27
  # DEBUG BEGIN_STMT
  # DEBUG reg => reg_27 & 65535
  # DEBUG BEGIN_STMT
  _19 = (short unsigned int) reg_27;
  *val_25(D) = _19;
  # DEBUG BEGIN_STMT

  <bb 6> [local count: 1073741824]:
<L5>:
  return;

}


pfe_gpi_cfg_wred_set_thr (addr_t base_va, pfe_iqos_queue_t queue, pfe_iqos_wred_thr_t thr, uint16_t val)
{
  uint32_t reg;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long 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;
  volatile uint32_t * _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  volatile uint32_t * _18;
  long unsigned int _19;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG off => 0
  # DEBUG BEGIN_STMT
  switch (thr_21(D)) <default: <L5> [25.00%], case 0: <L1> [25.00%], case 1: <L2> [25.00%], case 2: <L0> [25.00%]>

  <bb 3> [local count: 268435456]:
<L0>:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) queue_23(D);
  _2 = _1 * 12;
  _3 = _2 + base_va_24(D);
  _4 = _3 + 340;
  _5 = (volatile uint32_t *) _4;
  _6 = (long unsigned int) val_25(D);
  *_5 ={v} _6;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  goto <bb 6>; [100.00%]

  <bb 4> [local count: 268435456]:
<L1>:
  # DEBUG BEGIN_STMT
  # DEBUG off => 16
  # DEBUG BEGIN_STMT
  _7 = (long unsigned int) queue_23(D);
  _8 = _7 * 12;
  _9 = _8 + base_va_24(D);
  _10 = _9 + 344;
  _11 = (volatile uint32_t *) _10;
  reg_31 ={v} *_11;
  # DEBUG reg => reg_31
  # DEBUG BEGIN_STMT
  reg_32 = reg_31 & 65535;
  # DEBUG reg => reg_32
  # DEBUG BEGIN_STMT
  _12 = (long unsigned int) val_25(D);
  _13 = _12 << 16;
  reg_33 = _13 | reg_32;
  # DEBUG reg => reg_33
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_11 ={v} reg_33;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  goto <bb 6>; [100.00%]

  <bb 5> [local count: 268435456]:
<L2>:
  # DEBUG BEGIN_STMT
  _14 = (long unsigned int) queue_23(D);
  _15 = _14 * 12;
  _16 = _15 + base_va_24(D);
  _17 = _16 + 344;
  _18 = (volatile uint32_t *) _17;
  reg_27 ={v} *_18;
  # DEBUG reg => reg_27
  # DEBUG BEGIN_STMT
  reg_28 = reg_27 & 4294901760;
  # DEBUG reg => reg_28
  # DEBUG BEGIN_STMT
  _19 = (long unsigned int) val_25(D);
  reg_29 = _19 | reg_28;
  # DEBUG reg => reg_29
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_18 ={v} reg_29;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 6> [local count: 1073741824]:
<L5>:
  return;

}


pfe_gpi_cfg_wred_get_prob (addr_t base_va, pfe_iqos_queue_t queue, pfe_iqos_wred_zone_t zone, uint8_t * val)
{
  uint32_t reg;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  volatile uint32_t * _5;
  unsigned int _6;
  unsigned int _7;
  unsigned char _8;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) queue_9(D);
  _2 = _1 * 12;
  _3 = _2 + base_va_10(D);
  _4 = _3 + 336;
  _5 = (volatile uint32_t *) _4;
  reg_12 ={v} *_5;
  # DEBUG reg => reg_12
  # DEBUG BEGIN_STMT
  _6 = (unsigned int) zone_13(D);
  _7 = _6 * 4;
  reg_14 = reg_12 >> _7;
  # DEBUG reg => reg_14
  # DEBUG BEGIN_STMT
  reg_15 = reg_14 & 15;
  # DEBUG reg => reg_15
  # DEBUG BEGIN_STMT
  _8 = (unsigned char) reg_15;
  *val_16(D) = _8;
  return;

}


pfe_gpi_cfg_wred_set_prob (addr_t base_va, pfe_iqos_queue_t queue, pfe_iqos_wred_zone_t zone, uint8_t val)
{
  uint32_t reg;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  volatile uint32_t * _5;
  unsigned int _6;
  unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  unsigned char _21;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) queue_12(D);
  _2 = _1 * 12;
  _3 = _2 + base_va_13(D);
  _4 = _3 + 336;
  _5 = (volatile uint32_t *) _4;
  reg_15 ={v} *_5;
  # DEBUG reg => reg_15
  # DEBUG BEGIN_STMT
  _6 = (unsigned int) zone_16(D);
  _7 = _6 * 4;
  _8 = 15 << _7;
  _9 = ~_8;
  reg_17 = _9 & reg_15;
  # DEBUG reg => reg_17
  # DEBUG BEGIN_STMT
  _21 = val_18(D) & 15;
  _10 = (long unsigned int) _21;
  _11 = _10 << _7;
  reg_19 = _11 | reg_17;
  # DEBUG reg => reg_19
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_5 ={v} reg_19;
  # DEBUG BEGIN_STMT
  return;

}


pfe_gpi_cfg_wred_is_enabled (addr_t base_va, pfe_iqos_queue_t queue)
{
  uint32_t reg;
  uint32_t wred_q_en;
  bool_t ret;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _3;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  wred_q_en_7 = igqos_wred_queue_enable_bit (queue_6(D));
  # DEBUG wred_q_en => wred_q_en_7
  # DEBUG BEGIN_STMT
  _1 = base_va_8(D) + 380;
  _2 = (volatile uint32_t *) _1;
  reg_9 ={v} *_2;
  # DEBUG reg => reg_9
  # DEBUG BEGIN_STMT
  _3 = wred_q_en_7 & reg_9;
  if (_3 == wred_q_en_7)
    goto <bb 3>; [34.00%]
  else
    goto <bb 4>; [66.00%]

  <bb 3> [local count: 365072220]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 1

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

}


pfe_gpi_cfg_wred_disable (addr_t base_va, pfe_iqos_queue_t queue)
{
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _3;
  long unsigned int _8;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = base_va_4(D) + 380;
  _2 = (volatile uint32_t *) _1;
  reg_6 ={v} *_2;
  # DEBUG reg => reg_6
  # DEBUG BEGIN_STMT
  _3 = igqos_wred_queue_enable_bit (queue_7(D));
  _8 = ~_3;
  reg_9 = reg_6 & _8;
  # DEBUG reg => reg_9
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_2 ={v} reg_9;
  # DEBUG BEGIN_STMT
  return;

}


pfe_gpi_cfg_wred_enable (addr_t base_va, pfe_iqos_queue_t queue)
{
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _7;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = base_va_3(D) + 380;
  _2 = (volatile uint32_t *) _1;
  reg_5 ={v} *_2;
  # DEBUG reg => reg_5
  # DEBUG BEGIN_STMT
  _7 = igqos_wred_queue_enable_bit (queue_6(D));
  reg_8 = reg_5 | _7;
  # DEBUG reg => reg_8
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_2 ={v} reg_8;
  # DEBUG BEGIN_STMT
  return;

}


igqos_wred_queue_enable_bit (pfe_iqos_queue_t queue)
{
  uint32_t ret;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  switch (queue_2(D)) <default: <L6> [33.33%], case 1: <L1> [33.33%], case 2: <L2> [33.33%]>

  <bb 3> [local count: 357878150]:
<L1>:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 1
  # DEBUG BEGIN_STMT
  goto <bb 5>; [100.00%]

  <bb 4> [local count: 357878150]:
<L2>:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 4
  # DEBUG BEGIN_STMT

  <bb 5> [local count: 1073634451]:
  # ret_1 = PHI <2(2), 1(3), 4(4)>
<L6>:
  # DEBUG ret => ret_1
  # DEBUG BEGIN_STMT
  return ret_1;

}


pfe_gpi_cfg_wred_default_init (addr_t base_va)
{
  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;
  unsigned int _9;
  volatile uint32_t * _10;
  unsigned int _11;
  volatile uint32_t * _12;
  unsigned int _13;
  volatile uint32_t * _14;
  unsigned int _15;
  volatile uint32_t * _16;
  unsigned int _17;
  volatile uint32_t * _18;
  unsigned int _19;
  volatile uint32_t * _20;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = base_va_21(D) + 380;
  _2 = (volatile uint32_t *) _1;
  *_2 ={v} 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG val => 65536
  # DEBUG BEGIN_STMT
  # DEBUG val => 98304
  # DEBUG BEGIN_STMT
  # DEBUG val => 99328
  # DEBUG BEGIN_STMT
  # DEBUG val => 99360
  # DEBUG BEGIN_STMT
  # DEBUG val => 99361
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = base_va_21(D) + 336;
  _4 = (volatile uint32_t *) _3;
  *_4 ={v} 99361;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = base_va_21(D) + 348;
  _6 = (volatile uint32_t *) _5;
  *_6 ={v} 99361;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _7 = base_va_21(D) + 360;
  _8 = (volatile uint32_t *) _7;
  *_8 ={v} 99361;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG val => 8192
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _9 = base_va_21(D) + 340;
  _10 = (volatile uint32_t *) _9;
  *_10 ={v} 8192;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG val => 268443632
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _11 = base_va_21(D) + 344;
  _12 = (volatile uint32_t *) _11;
  *_12 ={v} 268443632;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG val => 512
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _13 = base_va_21(D) + 352;
  _14 = (volatile uint32_t *) _13;
  *_14 ={v} 512;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _15 = base_va_21(D) + 364;
  _16 = (volatile uint32_t *) _15;
  *_16 ={v} 512;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG val => 16777712
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _17 = base_va_21(D) + 356;
  _18 = (volatile uint32_t *) _17;
  *_18 ={v} 16777712;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _19 = base_va_21(D) + 368;
  _20 = (volatile uint32_t *) _19;
  *_20 ={v} 16777712;
  # DEBUG BEGIN_STMT
  return;

}


pfe_gpi_cfg_qos_entry_ready (addr_t base_va)
{
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _3;
  unsigned char _7;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  _1 = base_va_4(D) + 384;
  _2 = (volatile uint32_t *) _1;
  reg_6 ={v} *_2;
  # DEBUG reg => reg_6
  # DEBUG BEGIN_STMT
  _3 = reg_6 & 1;
  _7 = (unsigned char) _3;
  # DEBUG ret => _7
  # DEBUG BEGIN_STMT
  return _7;

}


pfe_gpi_cfg_qos_rd_fl_entry_resp (addr_t base_va, uint32_t * entry)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  igqos_class_read_entry_data (base_va_2(D), entry_3(D));
  return;

}


pfe_gpi_cfg_qos_rd_fl_entry_req (addr_t base_va, uint32_t addr)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  igqos_class_read_flow_cmd (base_va_2(D), addr_3(D));
  return;

}


pfe_gpi_cfg_qos_clear_lru_entry_req (addr_t base_va, uint32_t addr)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  igqos_class_clear_entry_data (base_va_2(D));
  # DEBUG BEGIN_STMT
  igqos_class_write_lru_cmd (base_va_2(D), addr_4(D));
  return;

}


pfe_gpi_cfg_qos_clear_flow_entry_req (addr_t base_va, uint32_t addr)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  igqos_class_clear_entry_data (base_va_2(D));
  # DEBUG BEGIN_STMT
  igqos_class_write_flow_cmd (base_va_2(D), addr_4(D));
  return;

}


pfe_gpi_cfg_qos_write_flow_entry_req (addr_t base_va, uint32_t addr, const uint32_t * entry)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  igqos_class_prepare_entry_data (base_va_2(D), entry_3(D));
  # DEBUG BEGIN_STMT
  igqos_class_write_flow_cmd (base_va_2(D), addr_5(D));
  return;

}


pfe_gpi_cfg_qos_is_enabled (addr_t base_va)
{
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _3;
  unsigned char _7;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  _1 = base_va_4(D) + 372;
  _2 = (volatile uint32_t *) _1;
  reg_6 ={v} *_2;
  # DEBUG reg => reg_6
  # DEBUG BEGIN_STMT
  _3 = reg_6 & 1;
  _7 = (unsigned char) _3;
  # DEBUG ret => _7
  # DEBUG BEGIN_STMT
  return _7;

}


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

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = base_va_3(D) + 372;
  _2 = (volatile uint32_t *) _1;
  reg_5 ={v} *_2;
  # DEBUG reg => reg_5
  # DEBUG BEGIN_STMT
  reg_6 = reg_5 & 4294967294;
  # DEBUG reg => reg_6
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_2 ={v} reg_6;
  # DEBUG BEGIN_STMT
  return;

}


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

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = base_va_3(D) + 372;
  _2 = (volatile uint32_t *) _1;
  reg_5 ={v} *_2;
  # DEBUG reg => reg_5
  # DEBUG BEGIN_STMT
  reg_6 = reg_5 | 1;
  # DEBUG reg => reg_6
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_2 ={v} reg_6;
  # DEBUG BEGIN_STMT
  return;

}


pfe_gpi_cfg_qos_default_init (addr_t base_va)
{
  unsigned int _1;
  volatile uint32_t * _2;
  unsigned int _3;
  volatile uint32_t * _4;
  unsigned int _5;
  volatile uint32_t * _6;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = base_va_7(D) + 372;
  _2 = (volatile uint32_t *) _1;
  *_2 ={v} 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pfe_gpi_cfg_wred_default_init (base_va_7(D));
  # DEBUG BEGIN_STMT
  pfe_gpi_cfg_shp_default_init (base_va_7(D), 0);
  # DEBUG BEGIN_STMT
  pfe_gpi_cfg_shp_default_init (base_va_7(D), 1);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = base_va_7(D) + 536;
  _4 = (volatile uint32_t *) _3;
  *_4 ={v} 2164293888;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = base_va_7(D) + 376;
  _6 = (volatile uint32_t *) _5;
  *_6 ={v} 48;
  # DEBUG BEGIN_STMT
  return;

}


pfe_gpi_cfg_disable (addr_t base_va)
{
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _3;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = base_va_4(D) + 4;
  _2 = (volatile uint32_t *) _1;
  reg_6 ={v} *_2;
  # DEBUG reg => reg_6
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = reg_6 & 4294967294;
  *_2 ={v} _3;
  # DEBUG BEGIN_STMT
  return;

}


pfe_gpi_cfg_enable (addr_t base_va)
{
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _3;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = base_va_4(D) + 4;
  _2 = (volatile uint32_t *) _1;
  reg_6 ={v} *_2;
  # DEBUG reg => reg_6
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = reg_6 | 1;
  *_2 ={v} _3;
  # DEBUG BEGIN_STMT
  return;

}


pfe_gpi_cfg_reset (addr_t base_va)
{
  uint32_t reg;
  uint32_t timeout;
  errno_t ret;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _4;

  <bb 2> [local count: 109790102]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG timeout => 20
  # DEBUG BEGIN_STMT
  _1 = base_va_8(D) + 4;
  _2 = (volatile uint32_t *) _1;
  reg_10 ={v} *_2;
  # DEBUG reg => reg_10
  # DEBUG BEGIN_STMT
  reg_11 = reg_10 | 2;
  # DEBUG reg => reg_11
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_2 ={v} reg_11;

  <bb 3> [local count: 1073741824]:
  # timeout_6 = PHI <20(2), timeout_15(8)>
  # DEBUG timeout => timeout_6
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  oal_time_usleep (100);
  # DEBUG BEGIN_STMT
  reg_14 ={v} *_2;
  # DEBUG reg => reg_14
  # DEBUG BEGIN_STMT
  timeout_15 = timeout_6 + 4294967295;
  # DEBUG timeout => timeout_15
  # DEBUG BEGIN_STMT
  _4 = reg_14 & 2;
  if (_4 != 0)
    goto <bb 4>; [94.50%]
  else
    goto <bb 5>; [5.50%]

  <bb 4> [local count: 1014686025]:
  if (timeout_15 != 0)
    goto <bb 8>; [95.00%]
  else
    goto <bb 5>; [5.00%]

  <bb 8> [local count: 963951724]:
  goto <bb 3>; [100.00%]

  <bb 5> [local count: 109790101]:
  # timeout_3 = PHI <timeout_15(3), timeout_15(4)>
  # DEBUG BEGIN_STMT
  if (timeout_3 == 0)
    goto <bb 6>; [35.00%]
  else
    goto <bb 7>; [65.00%]

  <bb 6> [local count: 38426536]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 110

  <bb 7> [local count: 109790101]:
  # ret_5 = PHI <0(5), 110(6)>
  # DEBUG ret => ret_5
  # DEBUG BEGIN_STMT
  return ret_5;

}


pfe_gpi_cfg_init (addr_t base_va, const struct pfe_gpi_cfg_t * cfg)
{
  uint32_t regval;
  unsigned int _1;
  volatile uint32_t * _2;
  unsigned char _3;
  long unsigned int _4;
  long unsigned int _5;
  unsigned int _6;
  volatile uint32_t * _7;
  long unsigned int _8;
  short unsigned int _9;
  long unsigned int _10;
  unsigned int _11;
  volatile uint32_t * _12;
  long unsigned int _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;
  unsigned int _28;
  volatile uint32_t * _29;
  unsigned int _30;
  volatile uint32_t * _31;
  unsigned int _32;
  volatile uint32_t * _33;
  long unsigned int _34;
  unsigned int _35;
  volatile uint32_t * _36;
  long unsigned int _37;
  unsigned int _38;
  volatile uint32_t * _39;
  unsigned char _40;
  unsigned char _41;
  unsigned int _42;
  volatile uint32_t * _43;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = base_va_46(D) + 316;
  _2 = (volatile uint32_t *) _1;
  *_2 ={v} 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = cfg_49(D)->emac_1588_ts_en;
  if (_3 != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_2 ={v} 3585;

  <bb 4> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = cfg_49(D)->alloc_retry_cycles;
  _5 = _4 << 16;
  _6 = base_va_46(D) + 8;
  _7 = (volatile uint32_t *) _6;
  _8 = _5 | 3;
  *_7 ={v} _8;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _9 = cfg_49(D)->lmem_header_size;
  _10 = (long unsigned int) _9;
  _11 = base_va_46(D) + 12;
  _12 = (volatile uint32_t *) _11;
  _13 = _10 | 33554432;
  *_12 ={v} _13;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _14 = base_va_46(D) + 16;
  _15 = (volatile uint32_t *) _14;
  *_15 ={v} 134217984;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _16 = base_va_46(D) + 20;
  _17 = (volatile uint32_t *) _16;
  *_17 ={v} 3221782576;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _18 = base_va_46(D) + 24;
  _19 = (volatile uint32_t *) _18;
  *_19 ={v} 3221782580;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _20 = base_va_46(D) + 28;
  _21 = (volatile uint32_t *) _20;
  *_21 ={v} 3221798960;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _22 = base_va_46(D) + 32;
  _23 = (volatile uint32_t *) _22;
  *_23 ={v} 3221798964;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _24 = base_va_46(D) + 36;
  _25 = (volatile uint32_t *) _24;
  *_25 ={v} 3221815312;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _26 = base_va_46(D) + 52;
  _27 = (volatile uint32_t *) _26;
  *_27 ={v} 512;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _28 = base_va_46(D) + 56;
  _29 = (volatile uint32_t *) _28;
  *_29 ={v} 48;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _30 = base_va_46(D) + 96;
  _31 = (volatile uint32_t *) _30;
  *_31 ={v} _10;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _32 = base_va_46(D) + 76;
  _33 = (volatile uint32_t *) _32;
  _34 = cfg_49(D)->gpi_tmlf_txthres;
  *_33 ={v} _34;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _35 = base_va_46(D) + 80;
  _36 = (volatile uint32_t *) _35;
  _37 = cfg_49(D)->gpi_dtx_aseq_len;
  *_36 ={v} _37;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _38 = base_va_46(D) + 104;
  _39 = (volatile uint32_t *) _38;
  *_39 ={v} 1;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _40 = pfe_feature_mgr_is_available ("drv_run_on_g3");
  if (_40 == 1)
    goto <bb 6>; [34.00%]
  else
    goto <bb 5>; [66.00%]

  <bb 5> [local count: 708669605]:
  _41 = cfg_49(D)->g2_ordered_class_writes;
  if (_41 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 6> [local count: 719407023]:
  # DEBUG BEGIN_STMT
  _42 = base_va_46(D) + 332;
  _43 = (volatile uint32_t *) _42;
  regval_66 ={v} *_43;
  # DEBUG regval => regval_66
  # DEBUG BEGIN_STMT
  regval_67 = regval_66 | 3;
  # DEBUG regval => regval_67
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  *_43 ={v} regval_67;

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

}


igqos_class_write_lru_cmd (addr_t base_va, uint32_t addr)
{
  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  igqos_class_request_entry_cmd (base_va_2(D), 1, 1, addr_3(D));
  return;

}


igqos_class_read_flow_cmd (addr_t base_va, uint32_t addr)
{
  uint32_t val;
  long unsigned int _4;
  unsigned int _7;
  volatile uint32_t * _8;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG base_va => base_va_2(D)
  # DEBUG write => 0
  # DEBUG is_lru => 0
  # DEBUG addr => addr_3(D)
  # DEBUG INLINE_ENTRY igqos_class_request_entry_cmd
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = addr_3(D) << 8;
  val_5 = _4 & 32512;
  # DEBUG val => val_5
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  val_6 = val_5 | 2;
  # DEBUG val => val_6
  # DEBUG BEGIN_STMT
  # DEBUG val => val_6
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _7 = base_va_2(D) + 388;
  _8 = (volatile uint32_t *) _7;
  *_8 ={v} val_6;
  # DEBUG BEGIN_STMT
  # DEBUG base_va => NULL
  # DEBUG write => NULL
  # DEBUG is_lru => NULL
  # DEBUG addr => NULL
  # DEBUG val => NULL
  return;

}


igqos_class_write_flow_cmd (addr_t base_va, uint32_t addr)
{
  uint32_t val;
  long unsigned int _4;
  unsigned int _7;
  volatile uint32_t * _8;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG base_va => base_va_2(D)
  # DEBUG write => 1
  # DEBUG is_lru => 0
  # DEBUG addr => addr_3(D)
  # DEBUG INLINE_ENTRY igqos_class_request_entry_cmd
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = addr_3(D) << 8;
  val_5 = _4 & 32512;
  # DEBUG val => val_5
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  val_6 = val_5 | 1;
  # DEBUG val => val_6
  # DEBUG BEGIN_STMT
  # DEBUG val => val_6
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _7 = base_va_2(D) + 388;
  _8 = (volatile uint32_t *) _7;
  *_8 ={v} val_6;
  # DEBUG BEGIN_STMT
  # DEBUG base_va => NULL
  # DEBUG write => NULL
  # DEBUG is_lru => NULL
  # DEBUG addr => NULL
  # DEBUG val => NULL
  return;

}


igqos_class_request_entry_cmd (addr_t base_va, bool_t write, bool_t is_lru, uint32_t addr)
{
  uint32_t val;
  long unsigned int _1;
  unsigned int _2;
  volatile uint32_t * _3;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = addr_6(D) << 8;
  val_7 = _1 & 32512;
  # DEBUG val => val_7
  # DEBUG BEGIN_STMT
  if (write_8(D) == 1)
    goto <bb 3>; [34.00%]
  else
    goto <bb 4>; [66.00%]

  <bb 3> [local count: 365072220]:
  # DEBUG BEGIN_STMT
  val_10 = val_7 | 1;
  # DEBUG val => val_10
  goto <bb 5>; [100.00%]

  <bb 4> [local count: 708669605]:
  # DEBUG BEGIN_STMT
  val_9 = val_7 | 2;
  # DEBUG val => val_9

  <bb 5> [local count: 1073741824]:
  # val_4 = PHI <val_10(3), val_9(4)>
  # DEBUG val => val_4
  # DEBUG BEGIN_STMT
  if (is_lru_11(D) == 1)
    goto <bb 6>; [34.00%]
  else
    goto <bb 7>; [66.00%]

  <bb 6> [local count: 365072220]:
  # DEBUG BEGIN_STMT
  val_12 = val_4 | 65536;
  # DEBUG val => val_12

  <bb 7> [local count: 1073741824]:
  # val_5 = PHI <val_4(5), val_12(6)>
  # DEBUG val => val_5
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = base_va_13(D) + 388;
  _3 = (volatile uint32_t *) _2;
  *_3 ={v} val_5;
  # DEBUG BEGIN_STMT
  return;

}


igqos_class_clear_entry_data (addr_t base_va)
{
  uint32_t ii;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  volatile uint32_t * _4;

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

  <bb 3> [local count: 954449108]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = ii_5 + 98;
  _2 = _1 * 4;
  _3 = _2 + base_va_8(D);
  _4 = (volatile uint32_t *) _3;
  *_4 ={v} 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ii_10 = ii_5 + 1;
  # DEBUG ii => ii_10

  <bb 4> [local count: 1073741824]:
  # ii_5 = PHI <0(2), ii_10(3)>
  # DEBUG ii => ii_5
  # DEBUG BEGIN_STMT
  if (ii_5 != 8)
    goto <bb 3>; [88.89%]
  else
    goto <bb 5>; [11.11%]

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

}


igqos_class_prepare_entry_data (addr_t base_va, const uint32_t * entry)
{
  uint32_t ii;
  long unsigned int _1;
  const uint32_t * _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  volatile uint32_t * _6;
  long unsigned int _7;

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

  <bb 3> [local count: 954449108]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = ii_8 * 4;
  _2 = entry_11(D) + _1;
  _3 = ii_8 + 98;
  _4 = _3 * 4;
  _5 = _4 + base_va_12(D);
  _6 = (volatile uint32_t *) _5;
  _7 = *_2;
  *_6 ={v} _7;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ii_14 = ii_8 + 1;
  # DEBUG ii => ii_14

  <bb 4> [local count: 1073741824]:
  # ii_8 = PHI <0(2), ii_14(3)>
  # DEBUG ii => ii_8
  # DEBUG BEGIN_STMT
  if (ii_8 != 8)
    goto <bb 3>; [88.89%]
  else
    goto <bb 5>; [11.11%]

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

}


igqos_class_read_entry_data (addr_t base_va, uint32_t * entry)
{
  uint32_t ii;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  volatile uint32_t * _4;
  long unsigned int _5;
  uint32_t * _6;
  long unsigned int _7;

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

  <bb 3> [local count: 954449108]:
  # DEBUG BEGIN_STMT
  _1 = ii_8 + 98;
  _2 = _1 * 4;
  _3 = _2 + base_va_11(D);
  _4 = (volatile uint32_t *) _3;
  _5 = ii_8 * 4;
  _6 = entry_12(D) + _5;
  _7 ={v} *_4;
  *_6 = _7;
  # DEBUG BEGIN_STMT
  ii_14 = ii_8 + 1;
  # DEBUG ii => ii_14

  <bb 4> [local count: 1073741824]:
  # ii_8 = PHI <0(2), ii_14(3)>
  # DEBUG ii => ii_8
  # DEBUG BEGIN_STMT
  if (ii_8 != 8)
    goto <bb 3>; [88.89%]
  else
    goto <bb 5>; [11.11%]

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

}


