EnableSpll (const struct Clock_Ip_PllConfigType * config)
{
  <bb 2> :
  EnableSpll_TrustedCall (config_2(D));
  return;

}


EnableSpll_TrustedCall (const struct Clock_Ip_PllConfigType * config)
{
  short unsigned int _1;
  struct SCG_Type * _2;
  long unsigned int _3;
  struct SCG_Type * _4;
  long unsigned int _5;

  <bb 2> :
  _1 = config_8(D)->enable;
  if (_1 == 1)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  _2 = 1074151424B;
  _3 ={v} _2->SPLLCSR;
  _4 = 1074151424B;
  _5 = _3 | 1;
  _4->SPLLCSR ={v} _5;

  <bb 4> :
  return;

}


DisableSpll (Clock_Ip_NameType PllName)
{
  <bb 2> :
  DisableSpll_TrustedCall (PllName_2(D));
  return;

}


DisableSpll_TrustedCall (Clock_Ip_NameType PllName)
{
  struct SCG_Type * _1;
  long unsigned int _2;
  struct SCG_Type * _3;
  long unsigned int _4;
  struct SCG_Type * _5;
  long unsigned int _6;
  struct SCG_Type * _7;
  long unsigned int _8;

  <bb 2> :
  _1 = 1074151424B;
  _2 ={v} _1->SPLLCSR;
  _3 = 1074151424B;
  _4 = _2 & 4286578687;
  _3->SPLLCSR ={v} _4;
  _5 = 1074151424B;
  _6 ={v} _5->SPLLCSR;
  _7 = 1074151424B;
  _8 = _6 & 4294967294;
  _7->SPLLCSR ={v} _8;
  return;

}


CompleteSpll (Clock_Ip_NameType pllName)
{
  uint32 SPLLStatus;
  uint32 TimeoutTicks;
  uint32 ElapsedTime;
  uint32 StartTime;
  boolean TimeoutOccurred;
  clock_pll_status_t pllStatus;
  clock_pll_status_t D.6125;
  struct SCG_Type * _1;
  long unsigned int _2;
  long unsigned int _3;
  struct SCG_Type * _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int TimeoutTicks.0_7;
  _Bool _8;
  _Bool _9;
  clock_pll_status_t _24;

  <bb 2> :
  pllStatus_13 = 1;
  TimeoutOccurred_14 = 0;
  _1 = 1074151424B;
  _2 ={v} _1->SPLLCSR;
  _3 = _2 & 1;
  if (_3 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 3> :
  ClockStartTimeout (&StartTime, &ElapsedTime, &TimeoutTicks, 50000);

  <bb 4> :
  _4 = 1074151424B;
  _5 ={v} _4->SPLLCSR;
  _6 = _5 >> 24;
  SPLLStatus_18 = _6 & 1;
  TimeoutTicks.0_7 = TimeoutTicks;
  TimeoutOccurred_20 = ClockTimeoutExpired (&StartTime, &ElapsedTime, TimeoutTicks.0_7);
  if (SPLLStatus_18 == 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  _8 = ~TimeoutOccurred_20;
  if (_8 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 6>; [INV]

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

  <bb 7> :
  pllStatus_23 = 2;
  goto <bb 10>; [INV]

  <bb 8> :
  ReportClockErrors (1, pllName_21(D));
  goto <bb 10>; [INV]

  <bb 9> :
  pllStatus_16 = 0;

  <bb 10> :
  # pllStatus_10 = PHI <pllStatus_13(8), pllStatus_16(9), pllStatus_23(7)>
  _24 = pllStatus_10;
  StartTime ={v} {CLOBBER};
  ElapsedTime ={v} {CLOBBER};
  TimeoutTicks ={v} {CLOBBER};

  <bb 11> :
<L10>:
  return _24;

}


SetSpll (const struct Clock_Ip_PllConfigType * config)
{
  <bb 2> :
  SetSpll_TrustedCall (config_2(D));
  return;

}


SetSpll_TrustedCall (const struct Clock_Ip_PllConfigType * config)
{
  short unsigned int _1;
  struct SCG_Type * _2;
  long unsigned int _3;
  unsigned char _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  unsigned char _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  struct SCG_Type * _15;
  long unsigned int _16;
  unsigned char _17;
  int _18;
  struct SCG_Type * _19;
  struct SCG_Type * _20;
  struct SCG_Type * _21;

  <bb 2> :
  _1 = config_24(D)->enable;
  if (_1 == 1)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 3> :
  _2 = 1074151424B;
  _3 ={v} _2->SPLLCFG;
  _4 = config_24(D)->predivider;
  _5 = (long unsigned int) _4;
  _6 = _5 + 4294967295;
  _7 = _6 << 8;
  _8 = _7 & 1792;
  _9 = config_24(D)->mulFactorDiv;
  _10 = (long unsigned int) _9;
  _11 = _10 + 4294967280;
  _12 = _11 << 16;
  _13 = _12 & 2031616;
  _14 = _8 | _13;
  _15 = 1074151424B;
  _16 = _3 | _14;
  _15->SPLLCFG ={v} _16;
  _17 = config_24(D)->monitor;
  _18 = (int) _17;
  switch (_18) <default: <L4> [INV], case 0: <L1> [INV], case 1: <L2> [INV], case 2: <L3> [INV]>

  <bb 4> :
<L1>:
  _19 = 1074151424B;
  _19->SPLLCSR ={v} 0;
  goto <bb 8>; [INV]

  <bb 5> :
<L2>:
  _20 = 1074151424B;
  _20->SPLLCSR ={v} 65536;
  goto <bb 8>; [INV]

  <bb 6> :
<L3>:
  _21 = 1074151424B;
  _21->SPLLCSR ={v} 196608;
  goto <bb 8>; [INV]

  <bb 7> :
<L4>:

  <bb 8> :
  return;

}


ResetSpll (const struct Clock_Ip_PllConfigType * config)
{
  <bb 2> :
  ResetSpll_TrustedCall (config_2(D));
  return;

}


ResetSpll_TrustedCall (const struct Clock_Ip_PllConfigType * config)
{
  struct SCG_Type * _1;
  long unsigned int _2;
  struct SCG_Type * _3;
  long unsigned int _4;
  struct SCG_Type * _5;
  long unsigned int _6;
  struct SCG_Type * _7;
  long unsigned int _8;
  struct SCG_Type * _9;
  long unsigned int _10;
  struct SCG_Type * _11;
  long unsigned int _12;
  struct SCG_Type * _13;
  long unsigned int _14;
  struct SCG_Type * _15;
  long unsigned int _16;

  <bb 2> :
  _1 = 1074151424B;
  _2 ={v} _1->SPLLCSR;
  _3 = 1074151424B;
  _4 = _2 & 4286578687;
  _3->SPLLCSR ={v} _4;
  _5 = 1074151424B;
  _6 ={v} _5->SPLLCSR;
  _7 = 1074151424B;
  _8 = _6 & 4294967294;
  _7->SPLLCSR ={v} _8;
  _9 = 1074151424B;
  _10 ={v} _9->SPLLCFG;
  _11 = 1074151424B;
  _12 = _10 & 4294965503;
  _11->SPLLCFG ={v} _12;
  _13 = 1074151424B;
  _14 ={v} _13->SPLLCFG;
  _15 = 1074151424B;
  _16 = _14 & 4292935679;
  _15->SPLLCFG ={v} _16;
  return;

}


Callback_PllEmptyDisable (Clock_Ip_NameType PllName)
{
  <bb 2> :
  return;

}


Callback_PllEmptyComplete (Clock_Ip_NameType PllName)
{
  clock_pll_status_t D.6114;
  clock_pll_status_t _1;

  <bb 2> :
  _1 = 0;

  <bb 3> :
<L0>:
  return _1;

}


Callback_PllEmpty (const struct Clock_Ip_PllConfigType * config)
{
  <bb 2> :
  return;

}


