Clock_Ip_CgmXPcfsSdurDivcDiveDivs (const struct Clock_Ip_PcfsConfigType * Config)
{
  uint32 DivEndValue;
  uint32 DivStartValue;
  uint32 DivcRate;
  uint32 DivcInit;
  uint32 Sdur;
  uint32 K;
  uint32 Var3;
  uint32 Var2;
  uint32 Var1;
  uint32 Index;
  uint32 Rate;
  uint32 AmaxBrut;
  uint32 Fsafe;
  uint32 Finput;
  static uint32 Hash[52];
  static const uint32 PcfsRate[6] = {0, 12, 48, 112, 184, 1000};
  static const uint32 AMax[6] = {0, 5, 10, 15, 20, 100};
  uint32 HwIndex;
  volatile struct Clock_Ip_CgmPcfsType * CgmPcfsBase;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = Config->SelectorName;
  _2 = (int) _1;
  _3 = Clock_Ip_au8ClockFeatures[_2][0];
  _4 = (int) _3;
  CgmPcfsBase = Clock_Ip_apxCgmPcfs[_4];
  # DEBUG BEGIN_STMT
  _5 = Config->Name;
  _6 = (int) _5;
  _7 = Clock_Ip_au8ClockFeatures[_6][7];
  HwIndex = (uint32) _7;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  Finput = 0;
  # DEBUG BEGIN_STMT
  Fsafe = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  Rate = 0;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _8 = Config->Name;
  _9 = (int) _8;
  _10 = Clock_Ip_au8ClockFeatures[_9][7];
  _11 = (int) _10;
  _12 = Hash[_11];
  _13 = Config->ClockSourceFrequency;
  _14 = Config->MaxAllowableIDDchange;
  _15 = _13 ^ _14;
  _16 = Config->Name;
  _17 = (long unsigned int) _16;
  _18 = _15 ^ _17;
  _19 = Config->SelectorName;
  _20 = (long unsigned int) _19;
  _21 = _18 ^ _20;
  _22 = Config->StepDuration;
  _23 = _21 ^ _22;
  if (_12 != _23)
    goto <bb 3>; [INV]
  else
    goto <bb 20>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _24 = Config->ClockSourceFrequency;
  _25 = Config->MaxAllowableIDDchange;
  _26 = _24 ^ _25;
  _27 = Config->Name;
  _28 = (long unsigned int) _27;
  _29 = _26 ^ _28;
  _30 = Config->SelectorName;
  _31 = (long unsigned int) _30;
  _32 = _29 ^ _31;
  _33 = Config->StepDuration;
  _34 = Config->Name;
  _35 = (int) _34;
  _36 = Clock_Ip_au8ClockFeatures[_35][7];
  _37 = (int) _36;
  _38 = _32 ^ _33;
  Hash[_37] = _38;
  # DEBUG BEGIN_STMT
  _39 = Config->ClockSourceFrequency;
  Finput = _39 / 1000000;
  # DEBUG BEGIN_STMT
  _40 = Clock_Ip_GetConfiguredFrequencyValue (0);
  Fsafe = _40 / 1000000;
  # DEBUG BEGIN_STMT
  _41 = Config->MaxAllowableIDDchange;
  _42 = Config->StepDuration;
  _43 = _41 * _42;
  _44 = _43 * 100000;
  _45 = Finput * 2360;
  AmaxBrut = _44 / _45;
  # DEBUG BEGIN_STMT
  Rate = AmaxBrut;
  # DEBUG BEGIN_STMT
  _46 = AMax[0];
  if (AmaxBrut < _46)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  Rate = PcfsRate[0];
  goto <bb 12>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _47 = AMax[5];
  if (AmaxBrut > _47)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  Rate = PcfsRate[5];
  goto <bb 12>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  Index = 1;
  goto <bb 11>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _48 = Index + 4294967295;
  _49 = AMax[_48];
  if (AmaxBrut > _49)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  Rate = PcfsRate[Index];

  <bb 10> :
  # DEBUG BEGIN_STMT
  Index = Index + 1;

  <bb 11> :
  # DEBUG BEGIN_STMT
  if (Index <= 5)
    goto <bb 8>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  _50 = Finput * 2048000;
  _51 = Fsafe * Rate;
  _52 = _50 / _51;
  _53 = 2048000 / Rate;
  _54 = _52 - _53;
  Var1 = _54 + 256;
  # DEBUG BEGIN_STMT
  Var2 = 1073741824;
  # DEBUG BEGIN_STMT
  Var3 = 0;
  # DEBUG BEGIN_STMT
  goto <bb 14>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  Var2 = Var2 >> 2;

  <bb 14> :
  # DEBUG BEGIN_STMT
  if (Var2 > Var1)
    goto <bb 13>; [INV]
  else
    goto <bb 18>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  _55 = Var3 + Var2;
  if (Var1 >= _55)
    goto <bb 16>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  _56 = Var3 + Var2;
  Var1 = Var1 - _56;
  # DEBUG BEGIN_STMT
  _57 = Var2 << 1;
  Var3 = Var3 + _57;

  <bb 17> :
  # DEBUG BEGIN_STMT
  Var3 = Var3 >> 1;
  # DEBUG BEGIN_STMT
  Var2 = Var2 >> 2;

  <bb 18> :
  # DEBUG BEGIN_STMT
  if (Var2 != 0)
    goto <bb 15>; [INV]
  else
    goto <bb 19>; [INV]

  <bb 19> :
  # DEBUG BEGIN_STMT
  _58 = Var3 << 2;
  _59 = _58 + 191;
  K = _59 >> 7;
  # DEBUG BEGIN_STMT
  _60 = Config->StepDuration;
  Sdur = Fsafe * _60;
  # DEBUG BEGIN_STMT
  DivcInit = Rate * K;
  # DEBUG BEGIN_STMT
  DivcRate = Rate;
  # DEBUG BEGIN_STMT
  _61 = Rate * K;
  _62 = K + 1;
  _63 = _61 * _62;
  _64 = _63 >> 1;
  DivStartValue = _64 + 999;
  # DEBUG BEGIN_STMT
  _65 = Finput * 1000;
  _66 = _65 / Fsafe;
  DivEndValue = _66 + 4294967295;
  # DEBUG BEGIN_STMT
  _67 = Sdur & 65535;
  CgmPcfsBase->PCFS_SDUR = _67;
  # DEBUG BEGIN_STMT
  _68 = DivcRate & 255;
  _69 = DivcInit << 16;
  _70 = _68 | _69;
  CgmPcfsBase->PCFS[HwIndex].DIVC = _70;
  # DEBUG BEGIN_STMT
  _71 = DivEndValue & 1048575;
  CgmPcfsBase->PCFS[HwIndex].DIVE = _71;
  # DEBUG BEGIN_STMT
  _72 = DivStartValue & 1048575;
  CgmPcfsBase->PCFS[HwIndex].DIVS = _72;

  <bb 20> :
  return;

}


Clock_Ip_ProgressiveFrequencyClockSwitchEmpty (const struct Clock_Ip_PcfsConfigType * Config)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  return;

}


