SetPllPlldvOdiv2Output (const struct Clock_Ip_DividerConfigType * config)
{
  uint32 dividerValue;
  uint32 regValue;
  uint32 instance;
  uint32 TimeoutTicks;
  uint32 ElapsedTime;
  uint32 StartTime;
  boolean TimeoutOccurred;
  const long unsigned int iftmp.1;

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

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

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

  <bb 5> :
  _25 = ~TimeoutOccurred;
  if (_25 != 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 8>; [INV]

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

  <bb 8> :
  # DEBUG BEGIN_STMT
  _27 = config->value;
  if (_27 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  iftmp.1 = config->value;
  goto <bb 11>; [INV]

  <bb 10> :
  iftmp.1 = 1;

  <bb 11> :
  dividerValue = iftmp.1;
  # DEBUG BEGIN_STMT
  _28 = pll[instance];
  regValue = _28->PLLDV;
  # DEBUG BEGIN_STMT
  regValue = regValue & 2181038079;
  # DEBUG BEGIN_STMT
  _29 = dividerValue << 25;
  _30 = _29 & 2113929216;
  regValue = regValue | _30;
  # DEBUG BEGIN_STMT
  _31 = pll[instance];
  _31->PLLDV = regValue;
  # DEBUG BEGIN_STMT
  _32 = config->name;
  UpdateClockState (_32, 255);
  StartTime = {CLOBBER};
  ElapsedTime = {CLOBBER};
  TimeoutTicks = {CLOBBER};
  return;

}


SetPllPll0divDeDivOutput (const struct Clock_Ip_DividerConfigType * config)
{
  uint32 regValue;
  uint32 dividerIndex;
  uint32 instance;
  uint32 TimeoutTicks;
  uint32 ElapsedTime;
  uint32 StartTime;
  boolean TimeoutOccurred;

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

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

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

  <bb 5> :
  _28 = ~TimeoutOccurred;
  if (_28 != 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 8>; [INV]

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

  <bb 8> :
  # DEBUG BEGIN_STMT
  _30 = pll[instance];
  _31 = _30->PLLODIV[dividerIndex];
  _32 = pll[instance];
  _33 = _31 & 2147483647;
  _32->PLLODIV[dividerIndex] = _33;
  # DEBUG BEGIN_STMT
  _34 = config->value;
  if (_34 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _35 = pll[instance];
  regValue = _35->PLLODIV[dividerIndex];
  # DEBUG BEGIN_STMT
  regValue = regValue | 2147483648;
  # DEBUG BEGIN_STMT
  regValue = regValue & 4293984255;
  # DEBUG BEGIN_STMT
  _36 = config->value;
  _37 = _36 + 4294967295;
  _38 = _37 << 16;
  _39 = _38 & 983040;
  regValue = regValue | _39;
  # DEBUG BEGIN_STMT
  _40 = pll[instance];
  _40->PLLODIV[dividerIndex] = regValue;
  # DEBUG BEGIN_STMT
  _41 = config->name;
  _42 = GetClockState (_41);
  if (_42 == 0)
    goto <bb 10>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _43 = config->name;
  UpdateClockState (_43, 255);
  goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _44 = config->name;
  UpdateClockState (_44, 0);

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

}


SetCgmXDeDivStatWithPhase (const struct Clock_Ip_DividerConfigType * config)
{
  boolean immediateTriggerIsUpdated;
  uint32 DividerStatus;
  uint32 TimeoutTicks;
  uint32 ElapsedTime;
  uint32 StartTime;
  boolean TimeoutOccurred;
  uint32 regValue;
  uint32 triggerFeat;
  uint32 dividerIndex;
  uint32 selectorIndex;
  uint32 instance;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = config->name;
  _2 = (int) _1;
  _3 = clockFeatures[_2][0];
  instance = (uint32) _3;
  # DEBUG BEGIN_STMT
  _4 = config->name;
  _5 = (int) _4;
  _6 = clockFeatures[_5][2];
  selectorIndex = (uint32) _6;
  # DEBUG BEGIN_STMT
  _7 = config->name;
  _8 = (int) _7;
  _9 = clockFeatures[_8][3];
  dividerIndex = (uint32) _9;
  # DEBUG BEGIN_STMT
  _10 = config->name;
  _11 = (int) _10;
  _12 = clockFeatures[_11][5];
  triggerFeat = (uint32) _12;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  TimeoutOccurred = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  immediateTriggerIsUpdated = 1;
  # DEBUG BEGIN_STMT
  _13 = config->value;
  if (_13 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _14 = cgm[instance][selectorIndex];
  regValue = _14->divider[dividerIndex];
  # DEBUG BEGIN_STMT
  regValue = regValue & 4290838527;
  # DEBUG BEGIN_STMT
  _15 = config->value;
  _16 = _15 + 4294967295;
  _17 = _16 << 16;
  _18 = _17 & 4128768;
  regValue = regValue | _18;
  # DEBUG BEGIN_STMT
  _19 = cgm[instance][selectorIndex];
  _19->divider[dividerIndex] = regValue;

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (triggerFeat == 1)
    goto <bb 5>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _20 = cgm[instance][selectorIndex];
  _21 = _20->MUX_DIV_TRIG_CTRL;
  _22 = _21 & 1;
  if (_22 == 1)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  immediateTriggerIsUpdated = 0;

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

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

  <bb 9> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _23 = cgm[instance][selectorIndex];
  _24 = _23->MUX_DIV_UPD_STAT;
  DividerStatus = _24 & 1;
  # DEBUG BEGIN_STMT
  TimeoutTicks.3_25 = TimeoutTicks;
  TimeoutOccurred = ClockTimeoutExpired (&StartTime, &ElapsedTime, TimeoutTicks.3_25);
  # DEBUG BEGIN_STMT
  if (DividerStatus == 1)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  _26 = ~TimeoutOccurred;
  if (_26 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _27 = ~TimeoutOccurred;
  if (_27 != 0)
    goto <bb 12>; [INV]
  else
    goto <bb 21>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  _28 = cgm[instance][selectorIndex];
  _29 = _28->divider[dividerIndex];
  _30 = cgm[instance][selectorIndex];
  _31 = _29 & 2147483647;
  _30->divider[dividerIndex] = _31;
  # DEBUG BEGIN_STMT
  _32 = config->name;
  UpdateClockState (_32, 0);
  # DEBUG BEGIN_STMT
  ClockStartTimeout (&StartTime, &ElapsedTime, &TimeoutTicks, 10000);

  <bb 13> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _33 = cgm[instance][selectorIndex];
  _34 = _33->MUX_DIV_UPD_STAT;
  DividerStatus = _34 & 1;
  # DEBUG BEGIN_STMT
  TimeoutTicks.4_35 = TimeoutTicks;
  TimeoutOccurred = ClockTimeoutExpired (&StartTime, &ElapsedTime, TimeoutTicks.4_35);
  # DEBUG BEGIN_STMT
  if (DividerStatus == 1)
    goto <bb 14>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 14> :
  _36 = ~TimeoutOccurred;
  if (_36 != 0)
    goto <bb 13>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  _37 = ~TimeoutOccurred;
  if (_37 != 0)
    goto <bb 16>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  _38 = cgm[instance][selectorIndex];
  regValue = _38->divider[dividerIndex];
  # DEBUG BEGIN_STMT
  regValue = regValue & 4294967040;
  # DEBUG BEGIN_STMT
  _39 = config->options[0];
  _40 = (long unsigned int) _39;
  regValue = regValue | _40;
  # DEBUG BEGIN_STMT
  _41 = cgm[instance][selectorIndex];
  _41->divider[dividerIndex] = regValue;
  goto <bb 18>; [INV]

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

  <bb 18> :
  # DEBUG BEGIN_STMT
  _43 = config->value;
  if (_43 != 0)
    goto <bb 19>; [INV]
  else
    goto <bb 22>; [INV]

  <bb 19> :
  # DEBUG BEGIN_STMT
  _44 = cgm[instance][selectorIndex];
  _45 = _44->divider[dividerIndex];
  _46 = cgm[instance][selectorIndex];
  _47 = _45 | 2147483648;
  _46->divider[dividerIndex] = _47;
  # DEBUG BEGIN_STMT
  _48 = config->name;
  _49 = GetClockState (_48);
  if (_49 == 0)
    goto <bb 20>; [INV]
  else
    goto <bb 22>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  _50 = config->name;
  UpdateClockState (_50, 255);
  goto <bb 22>; [INV]

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

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

}


SetCgmXDeDivStatWithoutPhase (const struct Clock_Ip_DividerConfigType * config)
{
  boolean immediateTriggerIsUpdated;
  uint32 DividerStatus;
  uint32 TimeoutTicks;
  uint32 ElapsedTime;
  uint32 StartTime;
  boolean TimeoutOccurred;
  uint32 regValue;
  uint32 triggerFeat;
  uint32 dividerIndex;
  uint32 selectorIndex;
  uint32 instance;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = config->name;
  _2 = (int) _1;
  _3 = clockFeatures[_2][0];
  instance = (uint32) _3;
  # DEBUG BEGIN_STMT
  _4 = config->name;
  _5 = (int) _4;
  _6 = clockFeatures[_5][2];
  selectorIndex = (uint32) _6;
  # DEBUG BEGIN_STMT
  _7 = config->name;
  _8 = (int) _7;
  _9 = clockFeatures[_8][3];
  dividerIndex = (uint32) _9;
  # DEBUG BEGIN_STMT
  _10 = config->name;
  _11 = (int) _10;
  _12 = clockFeatures[_11][5];
  triggerFeat = (uint32) _12;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  TimeoutOccurred = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  immediateTriggerIsUpdated = 1;
  # DEBUG BEGIN_STMT
  _13 = config->value;
  if (_13 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _14 = cgm[instance][selectorIndex];
  regValue = _14->divider[dividerIndex];
  # DEBUG BEGIN_STMT
  regValue = regValue & 4290838527;
  # DEBUG BEGIN_STMT
  _15 = config->value;
  _16 = _15 + 4294967295;
  _17 = _16 << 16;
  _18 = _17 & 4128768;
  regValue = regValue | _18;
  # DEBUG BEGIN_STMT
  _19 = cgm[instance][selectorIndex];
  _19->divider[dividerIndex] = regValue;

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (triggerFeat == 1)
    goto <bb 5>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _20 = cgm[instance][selectorIndex];
  _21 = _20->MUX_DIV_TRIG_CTRL;
  _22 = _21 & 1;
  if (_22 == 1)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  immediateTriggerIsUpdated = 0;

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

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

  <bb 9> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _23 = cgm[instance][selectorIndex];
  _24 = _23->MUX_DIV_UPD_STAT;
  DividerStatus = _24 & 1;
  # DEBUG BEGIN_STMT
  TimeoutTicks.5_25 = TimeoutTicks;
  TimeoutOccurred = ClockTimeoutExpired (&StartTime, &ElapsedTime, TimeoutTicks.5_25);
  # DEBUG BEGIN_STMT
  if (DividerStatus == 1)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  _26 = ~TimeoutOccurred;
  if (_26 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _27 = ~TimeoutOccurred;
  if (_27 != 0)
    goto <bb 12>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  _28 = config->value;
  if (_28 != 0)
    goto <bb 13>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  _29 = cgm[instance][selectorIndex];
  _30 = _29->divider[dividerIndex];
  _31 = cgm[instance][selectorIndex];
  _32 = _30 | 2147483648;
  _31->divider[dividerIndex] = _32;
  # DEBUG BEGIN_STMT
  _33 = config->name;
  _34 = GetClockState (_33);
  if (_34 == 0)
    goto <bb 14>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  _35 = config->name;
  UpdateClockState (_35, 255);
  goto <bb 17>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  _36 = cgm[instance][selectorIndex];
  _37 = _36->divider[dividerIndex];
  _38 = cgm[instance][selectorIndex];
  _39 = _37 & 2147483647;
  _38->divider[dividerIndex] = _39;
  # DEBUG BEGIN_STMT
  _40 = config->name;
  UpdateClockState (_40, 0);
  goto <bb 17>; [INV]

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

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

}


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

}


