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

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = base_va_7(D) + 84;
  _2 = (volatile uint32_t *) _1;
  *_2 ={v} 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = base_va_7(D) + 132;
  _4 = (volatile uint32_t *) _3;
  reg_10 ={v} *_4;
  # DEBUG reg => reg_10
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = base_va_7(D) + 132;
  _6 = (volatile uint32_t *) _5;
  *_6 ={v} reg_10;
  # DEBUG BEGIN_STMT
  return;

}


pfe_wdt_cfg_init (addr_t base_va)
{
  uint32_t reg;
  unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _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 char _18;
  unsigned int _19;
  volatile uint32_t * _20;
  unsigned int _21;
  volatile uint32_t * _22;
  unsigned int _23;
  volatile uint32_t * _24;
  unsigned int _25;
  volatile uint32_t * _26;
  unsigned int _27;
  volatile uint32_t * _28;
  unsigned int _29;
  volatile uint32_t * _30;
  unsigned int _31;
  volatile uint32_t * _32;
  unsigned int _33;
  volatile uint32_t * _34;
  unsigned int _35;
  volatile uint32_t * _36;
  unsigned int _37;
  volatile uint32_t * _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;
  unsigned int _49;
  volatile uint32_t * _50;
  unsigned int _51;
  volatile uint32_t * _52;
  unsigned char _53;
  unsigned int _54;
  volatile uint32_t * _55;
  unsigned int _56;
  volatile uint32_t * _57;
  unsigned int _58;
  volatile uint32_t * _59;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = base_va_62(D) + 84;
  _2 = (volatile uint32_t *) _1;
  _3 ={v} *_2;
  reg_64 = _3 & 4294967294;
  # DEBUG reg => reg_64
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = base_va_62(D) + 84;
  _5 = (volatile uint32_t *) _4;
  *_5 ={v} reg_64;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = base_va_62(D) + 132;
  _7 = (volatile uint32_t *) _6;
  reg_66 ={v} *_7;
  # DEBUG reg => reg_66
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _8 = base_va_62(D) + 132;
  _9 = (volatile uint32_t *) _8;
  *_9 ={v} reg_66;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _10 = base_va_62(D) + 136;
  _11 = (volatile uint32_t *) _10;
  *_11 ={v} 4294967295;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _12 = base_va_62(D) + 140;
  _13 = (volatile uint32_t *) _12;
  *_13 ={v} 4294967295;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _14 = base_va_62(D) + 144;
  _15 = (volatile uint32_t *) _14;
  *_15 ={v} 4294967295;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _16 = base_va_62(D) + 148;
  _17 = (volatile uint32_t *) _16;
  *_17 ={v} 16777215;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _18 = pfe_feature_mgr_is_available ("drv_run_on_g3");
  if (_18 == 1)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _19 = base_va_62(D) + 152;
  _20 = (volatile uint32_t *) _19;
  *_20 ={v} 16777215;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _21 = base_va_62(D) + 156;
  _22 = (volatile uint32_t *) _21;
  *_22 ={v} 16777215;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _23 = base_va_62(D) + 160;
  _24 = (volatile uint32_t *) _23;
  *_24 ={v} 16777215;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _25 = base_va_62(D) + 312;
  _26 = (volatile uint32_t *) _25;
  *_26 ={v} 16777215;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _27 = base_va_62(D) + 324;
  _28 = (volatile uint32_t *) _27;
  *_28 ={v} 16777215;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _29 = base_va_62(D) + 328;
  _30 = (volatile uint32_t *) _29;
  *_30 ={v} 16777215;

  <bb 4> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _31 = base_va_62(D) + 88;
  _32 = (volatile uint32_t *) _31;
  *_32 ={v} 16777215;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _33 = base_va_62(D) + 92;
  _34 = (volatile uint32_t *) _33;
  *_34 ={v} 15;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _35 = base_va_62(D) + 96;
  _36 = (volatile uint32_t *) _35;
  *_36 ={v} 511;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _37 = base_va_62(D) + 100;
  _38 = (volatile uint32_t *) _37;
  *_38 ={v} 15;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _39 = base_va_62(D) + 104;
  _40 = (volatile uint32_t *) _39;
  *_40 ={v} 16777215;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _41 = base_va_62(D) + 108;
  _42 = (volatile uint32_t *) _41;
  *_42 ={v} 63;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _43 = base_va_62(D) + 112;
  _44 = (volatile uint32_t *) _43;
  *_44 ={v} 15;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _45 = base_va_62(D) + 116;
  _46 = (volatile uint32_t *) _45;
  *_46 ={v} 15;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _47 = base_va_62(D) + 120;
  _48 = (volatile uint32_t *) _47;
  *_48 ={v} 4095;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _49 = base_va_62(D) + 124;
  _50 = (volatile uint32_t *) _49;
  *_50 ={v} 4095;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _51 = base_va_62(D) + 128;
  _52 = (volatile uint32_t *) _51;
  *_52 ={v} 4095;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _53 = pfe_feature_mgr_is_available ("drv_run_on_g3");
  if (_53 == 1)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _54 = base_va_62(D) + 308;
  _55 = (volatile uint32_t *) _54;
  *_55 ={v} 3;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _56 = base_va_62(D) + 320;
  _57 = (volatile uint32_t *) _56;
  *_57 ={v} 3;

  <bb 6> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _58 = base_va_62(D) + 84;
  _59 = (volatile uint32_t *) _58;
  *_59 ={v} 4294967294;
  # DEBUG BEGIN_STMT
  return;

}


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

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = base_va_6(D) + 84;
  _2 = (volatile uint32_t *) _1;
  _3 ={v} *_2;
  reg_8 = _3 | 1;
  # DEBUG reg => reg_8
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = base_va_6(D) + 84;
  _5 = (volatile uint32_t *) _4;
  *_5 ={v} reg_8;
  # DEBUG BEGIN_STMT
  return;

}


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

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = base_va_6(D) + 84;
  _2 = (volatile uint32_t *) _1;
  _3 ={v} *_2;
  reg_8 = _3 & 4294967294;
  # DEBUG reg => reg_8
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = base_va_6(D) + 84;
  _5 = (volatile uint32_t *) _4;
  *_5 ={v} reg_8;
  # DEBUG BEGIN_STMT
  return;

}


pfe_wdt_cfg_isr (addr_t base_va, addr_t cbus_base_va)
{
  uint8_t int_src_nbr;
  const pfe_hm_evt_t * int_event_arr;
  const uint32_t * int_en_arr;
  const uint32_t * int_src_arr;
  static const pfe_hm_evt_t wdt_int_event_id_g3[18] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27};
  static const uint32_t wdt_int_en_arr_g3[18] = {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144};
  static const uint32_t wdt_int_src_arr_g3[18] = {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144};
  static const pfe_hm_evt_t wdt_int_event_id_g2[11] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};
  static const uint32_t wdt_int_en_arr_g2[11] = {128, 256, 2, 512, 1024, 2048, 8, 64, 16, 32, 4};
  static const uint32_t wdt_int_src_arr_g2[11] = {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048};
  errno_t ret;
  uint32_t reg_reen;
  uint32_t reg_src;
  uint32_t reg_en;
  uint8_t index;
  unsigned char _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;
  unsigned int _11;
  const uint32_t * _12;
  long unsigned int _13;
  long unsigned int _14;
  unsigned int _15;
  unsigned int _16;
  const uint32_t * _17;
  long unsigned int _18;
  long unsigned int _19;
  sizetype _20;
  const pfe_hm_evt_t * _21;
  <unnamed type> _22;
  unsigned int _23;
  unsigned int _24;
  const uint32_t * _25;
  long unsigned int _26;
  unsigned char index.0_27;
  long unsigned int _28;
  unsigned int _29;
  volatile uint32_t * _30;
  long unsigned int _31;
  errno_t _64;

  <bb 2> :
  # DEBUG BEGIN_STMT
  index_43 = 0;
  # DEBUG index => index_43
  # DEBUG BEGIN_STMT
  reg_reen_44 = 0;
  # DEBUG reg_reen => reg_reen_44
  # DEBUG BEGIN_STMT
  ret_45 = 2;
  # DEBUG ret => ret_45
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  int_src_nbr_46 = 0;
  # DEBUG int_src_nbr => int_src_nbr_46
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pfe_feature_mgr_is_available ("drv_run_on_g3");
  if (_1 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  int_src_arr_53 = &wdt_int_src_arr_g2;
  # DEBUG int_src_arr => int_src_arr_53
  # DEBUG BEGIN_STMT
  int_en_arr_54 = &wdt_int_en_arr_g2;
  # DEBUG int_en_arr => int_en_arr_54
  # DEBUG BEGIN_STMT
  int_event_arr_55 = &wdt_int_event_id_g2;
  # DEBUG int_event_arr => int_event_arr_55
  # DEBUG BEGIN_STMT
  int_src_nbr_56 = 11;
  # DEBUG int_src_nbr => int_src_nbr_56
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  int_src_arr_49 = &wdt_int_src_arr_g3;
  # DEBUG int_src_arr => int_src_arr_49
  # DEBUG BEGIN_STMT
  int_en_arr_50 = &wdt_int_en_arr_g3;
  # DEBUG int_en_arr => int_en_arr_50
  # DEBUG BEGIN_STMT
  int_event_arr_51 = &wdt_int_event_id_g3;
  # DEBUG int_event_arr => int_event_arr_51
  # DEBUG BEGIN_STMT
  int_src_nbr_52 = 18;
  # DEBUG int_src_nbr => int_src_nbr_52

  <bb 5> :
  # int_src_arr_37 = PHI <int_src_arr_53(3), int_src_arr_49(4)>
  # int_en_arr_38 = PHI <int_en_arr_54(3), int_en_arr_50(4)>
  # int_event_arr_39 = PHI <int_event_arr_55(3), int_event_arr_51(4)>
  # int_src_nbr_40 = PHI <int_src_nbr_56(3), int_src_nbr_52(4)>
  # DEBUG int_src_nbr => int_src_nbr_40
  # DEBUG int_event_arr => int_event_arr_39
  # DEBUG int_en_arr => int_en_arr_38
  # DEBUG int_src_arr => int_src_arr_37
  # DEBUG BEGIN_STMT
  _2 = base_va_57(D) + 84;
  _3 = (volatile uint32_t *) _2;
  reg_en_58 ={v} *_3;
  # DEBUG reg_en => reg_en_58
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = base_va_57(D) + 84;
  _5 = (volatile uint32_t *) _4;
  *_5 ={v} 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _6 = base_va_57(D) + 132;
  _7 = (volatile uint32_t *) _6;
  reg_src_60 ={v} *_7;
  # DEBUG reg_src => reg_src_60
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _8 = base_va_57(D) + 132;
  _9 = (volatile uint32_t *) _8;
  *_9 ={v} reg_src_60;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  index_62 = 0;
  # DEBUG index => index_62
  goto <bb 10>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _10 = (unsigned int) index_32;
  _11 = _10 * 4;
  _12 = int_src_arr_37 + _11;
  _13 = *_12;
  _14 = reg_src_60 & _13;
  if (_14 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 7> :
  _15 = (unsigned int) index_32;
  _16 = _15 * 4;
  _17 = int_en_arr_38 + _16;
  _18 = *_17;
  _19 = reg_en_58 & _18;
  if (_19 != 0)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _20 = (sizetype) index_32;
  _21 = int_event_arr_39 + _20;
  _22 = *_21;
  pfe_hm_report (1, 2, _22, "");
  # DEBUG BEGIN_STMT
  _23 = (unsigned int) index_32;
  _24 = _23 * 4;
  _25 = int_en_arr_38 + _24;
  _26 = *_25;
  reg_reen_66 = reg_reen_34 | _26;
  # DEBUG reg_reen => reg_reen_66
  # DEBUG BEGIN_STMT
  ret_67 = 0;
  # DEBUG ret => ret_67

  <bb 9> :
  # reg_reen_33 = PHI <reg_reen_34(6), reg_reen_34(7), reg_reen_66(8)>
  # ret_35 = PHI <ret_36(6), ret_36(7), ret_67(8)>
  # DEBUG ret => ret_35
  # DEBUG reg_reen => reg_reen_33
  # DEBUG BEGIN_STMT
  index.0_27 = index_32;
  index_68 = index.0_27 + 1;
  # DEBUG index => index_68

  <bb 10> :
  # index_32 = PHI <index_62(5), index_68(9)>
  # reg_reen_34 = PHI <reg_reen_44(5), reg_reen_33(9)>
  # ret_36 = PHI <ret_45(5), ret_35(9)>
  # DEBUG ret => ret_36
  # DEBUG reg_reen => reg_reen_34
  # DEBUG index => index_32
  # DEBUG BEGIN_STMT
  if (index_32 < int_src_nbr_40)
    goto <bb 6>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _28 = ~reg_reen_34;
  _29 = base_va_57(D) + 84;
  _30 = (volatile uint32_t *) _29;
  _31 = reg_en_58 & _28;
  *_30 ={v} _31;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _64 = ret_36;
  return _64;

}


