sys_m7_cache_init ()
{
  uint32 ways;
  uint32 sets;
  uint32 ccsidr;
  struct S32_SCB_Type * _1;
  struct S32_SCB_Type * _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  struct S32_SCB_Type * _8;
  long unsigned int _9;
  long unsigned int ways.1_10;
  long unsigned int sets.2_11;
  struct S32_SCB_Type * _12;
  long unsigned int _13;
  struct S32_SCB_Type * _14;
  long unsigned int _15;
  struct S32_SCB_Type * _16;
  struct S32_SCB_Type * _17;
  long unsigned int _18;
  struct S32_SCB_Type * _19;
  long unsigned int _20;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ccsidr_25 = 0;
  # DEBUG ccsidr => ccsidr_25
  # DEBUG BEGIN_STMT
  sets_26 = 0;
  # DEBUG sets => sets_26
  # DEBUG BEGIN_STMT
  ways_27 = 0;
  # DEBUG ways => ways_27
  # DEBUG BEGIN_STMT
  _1 = 3758153728B;
  _1->CSSELR ={v} 0;
  # DEBUG BEGIN_STMT
  __asm__ __volatile__("dsb");
  # DEBUG BEGIN_STMT
  _2 = 3758153728B;
  ccsidr_31 ={v} _2->CCSIDR;
  # DEBUG ccsidr => ccsidr_31
  # DEBUG BEGIN_STMT
  _3 = ccsidr_31 >> 13;
  sets_32 = _3 & 32767;
  # DEBUG sets => sets_32

  <bb 3> :
  # sets_21 = PHI <sets_32(2), sets_37(5)>
  # DEBUG sets => sets_21
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = ccsidr_31 >> 3;
  ways_33 = _4 & 1023;
  # DEBUG ways => ways_33

  <bb 4> :
  # ways_22 = PHI <ways_33(3), ways_36(4)>
  # DEBUG ways => ways_22
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = sets_21 << 5;
  _6 = _5 & 16352;
  _7 = ways_22 << 30;
  _8 = 3758153728B;
  _9 = _6 | _7;
  _8->DCISW ={v} _9;
  # DEBUG BEGIN_STMT
  __asm__ __volatile__("dsb");
  # DEBUG BEGIN_STMT
  ways.1_10 = ways_22;
  ways_36 = ways.1_10 + 4294967295;
  # DEBUG ways => ways_36
  if (ways.1_10 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  sets.2_11 = sets_21;
  sets_37 = sets.2_11 + 4294967295;
  # DEBUG sets => sets_37
  if (sets.2_11 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  __asm__ __volatile__("dsb");
  # DEBUG BEGIN_STMT
  _12 = 3758153728B;
  _13 ={v} _12->CCR;
  _14 = 3758153728B;
  _15 = _13 | 65536;
  _14->CCR ={v} _15;
  # DEBUG BEGIN_STMT
  __asm__ __volatile__("dsb");
  # DEBUG BEGIN_STMT
  __asm__ __volatile__("isb");
  # DEBUG BEGIN_STMT
  __asm__ __volatile__("dsb");
  # DEBUG BEGIN_STMT
  __asm__ __volatile__("isb");
  # DEBUG BEGIN_STMT
  _16 = 3758153728B;
  _16->ICIALLU ={v} 0;
  # DEBUG BEGIN_STMT
  __asm__ __volatile__("dsb");
  # DEBUG BEGIN_STMT
  __asm__ __volatile__("isb");
  # DEBUG BEGIN_STMT
  _17 = 3758153728B;
  _18 ={v} _17->CCR;
  _19 = 3758153728B;
  _20 = _18 | 131072;
  _19->CCR ={v} _20;
  # DEBUG BEGIN_STMT
  __asm__ __volatile__("dsb");
  # DEBUG BEGIN_STMT
  __asm__ __volatile__("isb");
  return;

}


SystemInit ()
{
  uint8 coreId;
  uint8 regionNum;
  uint32 coreMask;
  uint32 i;
  int _1;
  struct MSCM_Type * _2;
  short unsigned int _3;
  short unsigned int _4;
  struct MSCM_Type * _5;
  short unsigned int _6;
  struct S32_MPU_Type * _7;
  long unsigned int _8;
  int _9;
  struct S32_MPU_Type * _10;
  long unsigned int _11;
  int _12;
  struct S32_MPU_Type * _13;
  long unsigned int _14;
  unsigned char regionNum.0_15;
  struct S32_MPU_Type * _16;
  long unsigned int _17;
  struct S32_MPU_Type * _18;
  long unsigned int _19;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  regionNum_25 = 0;
  # DEBUG regionNum => regionNum_25
  # DEBUG BEGIN_STMT
  coreId_28 = Sys_GetCoreID ();
  # DEBUG coreId => coreId_28
  # DEBUG BEGIN_STMT
  _1 = (int) coreId_28;
  switch (_1) <default: <L2> [INV], case 0: <L0> [INV], case 1: <L1> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  coreMask_30 = 1;
  # DEBUG coreMask => coreMask_30
  # DEBUG BEGIN_STMT
  goto <bb 6>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  coreMask_29 = 2;
  # DEBUG coreMask => coreMask_29
  # DEBUG BEGIN_STMT
  goto <bb 6>; [INV]

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  coreMask_31 = 0;
  # DEBUG coreMask => coreMask_31
  # DEBUG BEGIN_STMT

  <bb 6> :
  # coreMask_21 = PHI <coreMask_30(3), coreMask_29(4), coreMask_31(5)>
  # DEBUG coreMask => coreMask_21
  # DEBUG BEGIN_STMT
  i_32 = 0;
  # DEBUG i => i_32
  goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _2 = 1076232192B;
  _3 ={v} _2->IRSPRC[i_20];
  _4 = (short unsigned int) coreMask_21;
  _5 = 1076232192B;
  _6 = _3 | _4;
  _5->IRSPRC[i_20] ={v} _6;
  # DEBUG BEGIN_STMT
  i_45 = i_20 + 1;
  # DEBUG i => i_45

  <bb 8> :
  # i_20 = PHI <i_32(6), i_45(7)>
  # DEBUG i => i_20
  # DEBUG BEGIN_STMT
  if (i_20 <= 239)
    goto <bb 7>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  __asm__ __volatile__("dsb");
  # DEBUG BEGIN_STMT
  __asm__ __volatile__("isb");
  # DEBUG BEGIN_STMT
  regionNum_35 = 0;
  # DEBUG regionNum => regionNum_35
  goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _7 = 3758153728B;
  _8 = (long unsigned int) regionNum_22;
  _7->RNR ={v} _8;
  # DEBUG BEGIN_STMT
  _9 = (int) regionNum_22;
  _10 = 3758153728B;
  _11 = rbar[_9];
  _10->RBAR ={v} _11;
  # DEBUG BEGIN_STMT
  _12 = (int) regionNum_22;
  _13 = 3758153728B;
  _14 = rasr[_12];
  _13->RASR ={v} _14;
  # DEBUG BEGIN_STMT
  regionNum.0_15 = regionNum_22;
  regionNum_43 = regionNum.0_15 + 1;
  # DEBUG regionNum => regionNum_43

  <bb 11> :
  # regionNum_22 = PHI <regionNum_35(9), regionNum_43(10)>
  # DEBUG regionNum => regionNum_22
  # DEBUG BEGIN_STMT
  if (regionNum_22 <= 13)
    goto <bb 10>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  _16 = 3758153728B;
  _17 ={v} _16->CTRL;
  _18 = 3758153728B;
  _19 = _17 | 1;
  _18->CTRL ={v} _19;
  # DEBUG BEGIN_STMT
  __asm__ __volatile__("dsb");
  # DEBUG BEGIN_STMT
  __asm__ __volatile__("isb");
  # DEBUG BEGIN_STMT
  sys_m7_cache_init ();
  return;

}


Sys_GetCoreID ()
{
  struct MSCM_Type * _1;
  long unsigned int _2;
  unsigned char _3;
  uint8 _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = 1076232192B;
  _2 ={v} _1->CPXNUM;
  _3 = (unsigned char) _2;
  _5 = _3 & 3;
  return _5;

}


default_interrupt_routine ()
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  goto <bb 2>; [INV]

}


startup_go_to_user_mode ()
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  return;

}


