CompletePllRdivMfiMfnOdiv2SdmenSsscgbypSpreadctlStepnoStepsize (Clock_Ip_NameType PllName)
{
  uint32 instance;
  uint32 PllLockStatus;
  uint32 TimeoutTicks;
  uint32 ElapsedTime;
  uint32 StartTime;
  boolean TimeoutOccurred;
  clock_pll_status_t pllStatus;
  clock_pll_status_t D.5107;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pllStatus = 2;
  # DEBUG BEGIN_STMT
  TimeoutOccurred = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (int) PllName;
  _2 = clockFeatures[_1][0];
  instance = (uint32) _2;
  # DEBUG BEGIN_STMT
  _3 = pll[instance];
  _4 = _3->PLLCR;
  _5 = (signed int) _4;
  if (_5 >= 0)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  Clock_Ip_TimeDelay ();
  # DEBUG BEGIN_STMT
  _6 = pll[instance];
  _7 = _6->PLLSR;
  _8 = _7 >> 2;
  PllLockStatus = _8 & 1;
  # DEBUG BEGIN_STMT
  TimeoutTicks.0_9 = TimeoutTicks;
  TimeoutOccurred = ClockTimeoutExpired (&StartTime, &ElapsedTime, TimeoutTicks.0_9);
  # DEBUG BEGIN_STMT
  if (PllLockStatus == 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

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

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

  <bb 7> :
  # DEBUG BEGIN_STMT
  UpdateClockState (PllName, 0);
  # DEBUG BEGIN_STMT
  pllStatus = 1;
  goto <bb 9>; [INV]

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

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

}


SetPllRdivMfiMfnOdiv2SdmenSsscgbypSpreadctlStepnoStepsize (const struct Clock_Ip_PllConfigType * config)
{
  uint32 TimeoutTicks;
  uint32 ElapsedTime;
  uint32 StartTime;
  boolean TimeoutOccurred;
  uint32 value;
  uint32 instance;
  long unsigned int iftmp.2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = config->name;
  _2 = (int) _1;
  _3 = clockFeatures[_2][0];
  instance = (uint32) _3;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  TimeoutOccurred = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = config->enable;
  if (_4 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _5 = 1076740096B;
  _6 = _5->PRTN1_COFB1_STAT;
  _7 = _6 & 16777216;
  if (_7 == 0)
    goto <bb 4>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _8 = 1076740096B;
  _9 = _8->PRTN1_COFB1_CLKEN;
  _10 = 1076740096B;
  _11 = _9 | 16777216;
  _10->PRTN1_COFB1_CLKEN = _11;
  # DEBUG BEGIN_STMT
  _12 = 1076740096B;
  _13 = _12->PRTN1_PCONF;
  _14 = 1076740096B;
  _15 = _13 | 1;
  _14->PRTN1_PCONF = _15;
  # DEBUG BEGIN_STMT
  _16 = 1076740096B;
  _17 = _16->PRTN1_PUPD;
  _18 = 1076740096B;
  _19 = _17 | 1;
  _18->PRTN1_PUPD = _19;
  # DEBUG BEGIN_STMT
  _20 = 1076740096B;
  _20->CTL_KEY = 23280;
  # DEBUG BEGIN_STMT
  _21 = 1076740096B;
  _21->CTL_KEY = 42255;
  # DEBUG BEGIN_STMT
  ClockStartTimeout (&StartTime, &ElapsedTime, &TimeoutTicks, 10000);

  <bb 5> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  TimeoutTicks.1_22 = TimeoutTicks;
  TimeoutOccurred = ClockTimeoutExpired (&StartTime, &ElapsedTime, TimeoutTicks.1_22);
  # DEBUG BEGIN_STMT
  _23 = 1076740096B;
  _24 = _23->PRTN1_COFB1_STAT;
  _25 = _24 & 16777216;
  if (_25 == 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

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

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

  <bb 8> :
  # DEBUG BEGIN_STMT
  _27 = config->name;
  ReportClockErrors (1, _27);

  <bb 9> :
  # DEBUG BEGIN_STMT
  _28 = pll[instance];
  value = _28->PLLDV;
  # DEBUG BEGIN_STMT
  value = value & 4294938368;
  # DEBUG BEGIN_STMT
  _29 = config->predivider;
  _30 = (long unsigned int) _29;
  _31 = _30 << 12;
  _32 = _31 & 28672;
  _33 = config->mulFactorDiv;
  _34 = (long unsigned int) _33;
  _35 = _32 | _34;
  value = value | _35;
  # DEBUG BEGIN_STMT
  _36 = pll[instance];
  _36->PLLDV = value;
  # DEBUG BEGIN_STMT
  _37 = pll[instance];
  value = _37->PLLFD;
  # DEBUG BEGIN_STMT
  value = value & 3221192704;
  # DEBUG BEGIN_STMT
  _38 = config->numeratorFracLoopDiv;
  _39 = (long unsigned int) _38;
  _40 = _39 & 32767;
  value = value | _40;
  # DEBUG BEGIN_STMT
  _41 = config->sigmaDelta;
  _42 = (long unsigned int) _41;
  _43 = _42 << 30;
  _44 = _43 & 1073741824;
  value = value | _44;
  # DEBUG BEGIN_STMT
  _45 = pll[instance];
  _45->PLLFD = value;
  # DEBUG BEGIN_STMT
  _46 = config->modulationFrequency;
  if (_46 == 0)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  iftmp.2 = 1073741824;
  goto <bb 12>; [INV]

  <bb 11> :
  iftmp.2 = 0;

  <bb 12> :
  _47 = config->modulationType;
  _48 = (long unsigned int) _47;
  _49 = _48 << 29;
  _50 = _49 & 536870912;
  _51 = iftmp.2 | _50;
  _52 = config->incrementStep;
  _53 = (long unsigned int) _52;
  _54 = _53 & 2047;
  _55 = _51 | _54;
  _56 = config->modulationPeriod;
  _57 = (long unsigned int) _56;
  _58 = _57 << 16;
  _59 = _58 & 67043328;
  value = _55 | _59;
  # DEBUG BEGIN_STMT
  _60 = pll[instance];
  _60->PLLFM = value;
  # DEBUG BEGIN_STMT
  _61 = pll[instance];
  _62 = _61->PLLCR;
  _63 = pll[instance];
  _64 = _62 & 2147483647;
  _63->PLLCR = _64;
  # DEBUG BEGIN_STMT
  _65 = config->name;
  UpdateClockState (_65, 255);

  <bb 13> :
  StartTime = {CLOBBER};
  ElapsedTime = {CLOBBER};
  TimeoutTicks = {CLOBBER};
  return;

}


ResetPllRdivMfiMfnOdiv2SdmenSsscgbypSpreadctlStepnoStepsize (const struct Clock_Ip_PllConfigType * config)
{
  uint32 instance;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = config->name;
  _2 = (int) _1;
  _3 = clockFeatures[_2][0];
  instance = (uint32) _3;
  # DEBUG BEGIN_STMT
  _4 = 1076740096B;
  _5 = _4->PRTN1_COFB1_STAT;
  _6 = _5 & 16777216;
  if (_6 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _7 = pll[instance];
  _8 = _7->PLLCR;
  _9 = pll[instance];
  _10 = _8 | 2147483648;
  _9->PLLCR = _10;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _11 = config->name;
  UpdateClockState (_11, 0);
  return;

}


Callback_PllEmptyComplete (Clock_Ip_NameType PllName)
{
  clock_pll_status_t D.5123;

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

}


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

}


