pfe_bus_err_cfg_irq_unmask_all (addr_t base_va)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = base_va + 212;
  _2 = (volatile uint32_t *) _1;
  *_2 = 2097151;
  # DEBUG BEGIN_STMT
  return;

}


pfe_bus_err_cfg_irq_unmask (addr_t base_va)
{
  uint32_t reg;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = base_va + 212;
  _2 = (volatile uint32_t *) _1;
  _3 = *_2;
  reg = _3 | 1;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = base_va + 212;
  _5 = (volatile uint32_t *) _4;
  *_5 = reg;
  # DEBUG BEGIN_STMT
  return;

}


pfe_bus_err_cfg_irq_mask (addr_t base_va)
{
  uint32_t reg;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = base_va + 212;
  _2 = (volatile uint32_t *) _1;
  _3 = *_2;
  reg = _3 & 4294967294;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = base_va + 212;
  _5 = (volatile uint32_t *) _4;
  *_5 = reg;
  # DEBUG BEGIN_STMT
  return;

}


pfe_bus_err_cfg_isr (addr_t base_va)
{
  static const pfe_hm_evt_t event_id[20] = {60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79};
  uint8_t index;
  uint32_t trig_en_interrupts;
  errno_t ret;
  uint32_t reg_src;
  uint32_t reg_en;
  errno_t D.10676;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = 2;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  index = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = base_va + 212;
  _2 = (volatile uint32_t *) _1;
  reg_en = *_2;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = base_va + 212;
  _4 = (volatile uint32_t *) _3;
  _5 = reg_en & 4294967294;
  *_4 = _5;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = base_va + 208;
  _7 = (volatile uint32_t *) _6;
  reg_src = *_7;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _8 = base_va + 208;
  _9 = (volatile uint32_t *) _8;
  *_9 = reg_src;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _10 = reg_src & reg_en;
  trig_en_interrupts = _10 & 2097150;
  # DEBUG BEGIN_STMT
  if (trig_en_interrupts != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  trig_en_interrupts = trig_en_interrupts >> 1;
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  _12 = (int) index;
  _13 = event_id[_12];
  pfe_hm_report (5, 2, _13, "");

  <bb 6> :
  # DEBUG BEGIN_STMT
  trig_en_interrupts = trig_en_interrupts >> 1;
  # DEBUG BEGIN_STMT
  index.0_14 = index;
  index = index.0_14 + 1;

  <bb 7> :
  # DEBUG BEGIN_STMT
  if (trig_en_interrupts != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 8>; [INV]

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

  <bb 9> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _15 = ~reg_src;
  _16 = base_va + 212;
  _17 = (volatile uint32_t *) _16;
  _18 = reg_en & _15;
  *_17 = _18;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  D.10676 = ret;
  return D.10676;

}


