EnableSpll (const struct Clock_Ip_PllConfigType * config)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  EnableSpll_TrustedCall (config);
  return;

}


EnableSpll_TrustedCall (const struct Clock_Ip_PllConfigType * config)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = config->enable;
  if (_1 == 1)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = 1074151424B;
  _3 = _2->SPLLCSR;
  _4 = 1074151424B;
  _5 = _3 | 1;
  _4->SPLLCSR = _5;

  <bb 4> :
  return;

}


DisableSpll (Clock_Ip_NameType PllName)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  DisableSpll_TrustedCall (PllName);
  return;

}


DisableSpll_TrustedCall (Clock_Ip_NameType PllName)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = 1074151424B;
  _2 = _1->SPLLCSR;
  _3 = 1074151424B;
  _4 = _2 & 4286578687;
  _3->SPLLCSR = _4;
  # DEBUG BEGIN_STMT
  _5 = 1074151424B;
  _6 = _5->SPLLCSR;
  _7 = 1074151424B;
  _8 = _6 & 4294967294;
  _7->SPLLCSR = _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.6123;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pllStatus = 1;
  # DEBUG BEGIN_STMT
  TimeoutOccurred = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = 1074151424B;
  _2 = _1->SPLLCSR;
  _3 = _2 & 1;
  if (_3 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 9>; [INV]

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = 1074151424B;
  _5 = _4->SPLLCSR;
  _6 = _5 >> 24;
  SPLLStatus = _6 & 1;
  # DEBUG BEGIN_STMT
  TimeoutTicks.0_7 = TimeoutTicks;
  TimeoutOccurred = ClockTimeoutExpired (&StartTime, &ElapsedTime, TimeoutTicks.0_7);
  # DEBUG BEGIN_STMT
  if (SPLLStatus == 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

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

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

  <bb 7> :
  # DEBUG BEGIN_STMT
  pllStatus = 2;
  goto <bb 10>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  ReportClockErrors (1, pllName);
  goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  pllStatus = 0;

  <bb 10> :
  # DEBUG BEGIN_STMT
  D.6123 = pllStatus;
  StartTime = {CLOBBER};
  ElapsedTime = {CLOBBER};
  TimeoutTicks = {CLOBBER};
  return D.6123;

}


SetSpll (const struct Clock_Ip_PllConfigType * config)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  SetSpll_TrustedCall (config);
  return;

}


SetSpll_TrustedCall (const struct Clock_Ip_PllConfigType * config)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = config->enable;
  if (_1 == 1)
    goto <bb 3>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = 1074151424B;
  _3 = _2->SPLLCFG;
  _4 = config->predivider;
  _5 = (long unsigned int) _4;
  _6 = _5 + 4294967295;
  _7 = _6 << 8;
  _8 = _7 & 1792;
  _9 = config->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 = _16;
  # DEBUG BEGIN_STMT
  _17 = config->monitor;
  _18 = (int) _17;
  switch (_18) <default: <L7> [INV], case 0: <L1> [INV], case 1: <L2> [INV], case 2: <L3> [INV]>

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  _19 = 1074151424B;
  _19->SPLLCSR = 0;
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  _20 = 1074151424B;
  _20->SPLLCSR = 65536;
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 6> :
<L3>:
  # DEBUG BEGIN_STMT
  _21 = 1074151424B;
  _21->SPLLCSR = 196608;
  # DEBUG BEGIN_STMT

  <bb 7> :
<L7>:
  return;

}


ResetSpll (const struct Clock_Ip_PllConfigType * config)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  ResetSpll_TrustedCall (config);
  return;

}


ResetSpll_TrustedCall (const struct Clock_Ip_PllConfigType * config)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = 1074151424B;
  _2 = _1->SPLLCSR;
  _3 = 1074151424B;
  _4 = _2 & 4286578687;
  _3->SPLLCSR = _4;
  # DEBUG BEGIN_STMT
  _5 = 1074151424B;
  _6 = _5->SPLLCSR;
  _7 = 1074151424B;
  _8 = _6 & 4294967294;
  _7->SPLLCSR = _8;
  # DEBUG BEGIN_STMT
  _9 = 1074151424B;
  _10 = _9->SPLLCFG;
  _11 = 1074151424B;
  _12 = _10 & 4294965503;
  _11->SPLLCFG = _12;
  # DEBUG BEGIN_STMT
  _13 = 1074151424B;
  _14 = _13->SPLLCFG;
  _15 = 1074151424B;
  _16 = _14 & 4292935679;
  _15->SPLLCFG = _16;
  return;

}


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

}


Callback_PllEmptyComplete (Clock_Ip_NameType PllName)
{
  clock_pll_status_t D.6129;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  D.6129 = 0;
  return D.6129;

}


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

}


