ClockUpdateSimTraceEnable (Clock_Ip_NameType clockName, boolean gate)
{
  struct Clock_Ip_GateConfigType config;

  <bb 2> :
  config.name = clockName;
  if (gate != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  config.enable = 0;
  goto <bb 5>; [INV]

  <bb 4> :
  config.enable = 1;

  <bb 5> :
  ClockSetSimTraceEnable (&config);
  config = {CLOBBER};
  return;

}


ClockSetSimTraceEnable (const struct Clock_Ip_GateConfigType * config)
{
  <bb 2> :
  ClockSetSimTraceEnable_TrustedCall (config);
  return;

}


ClockSetSimTraceEnable_TrustedCall (const struct Clock_Ip_GateConfigType * config)
{
  uint32 regValue;

  <bb 2> :
  _1 = 1074036736B;
  regValue = _1->CLKDIV4;
  _2 = config->enable;
  if (_2 == 1)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  regValue = regValue | 268435456;
  goto <bb 5>; [INV]

  <bb 4> :
  regValue = regValue & 4026531839;

  <bb 5> :
  _3 = 1074036736B;
  _3->CLKDIV4 = regValue;
  return;

}


ClockUpdateSimGate (Clock_Ip_NameType clockName, boolean gate)
{
  struct Clock_Ip_GateConfigType config;

  <bb 2> :
  config.name = clockName;
  if (gate != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  config.enable = 0;
  goto <bb 5>; [INV]

  <bb 4> :
  config.enable = 1;

  <bb 5> :
  ClockSetSimGate (&config);
  config = {CLOBBER};
  return;

}


ClockSetSimGate (const struct Clock_Ip_GateConfigType * config)
{
  <bb 2> :
  ClockSetSimGate_TrustedCall (config);
  return;

}


ClockSetSimGate_TrustedCall (const struct Clock_Ip_GateConfigType * config)
{
  uint32 regValue;
  uint32 gateIndex;
  uint32 enable;

  <bb 2> :
  _1 = config->enable;
  enable = (uint32) _1;
  _2 = config->name;
  _3 = clockFeatures[_2][6];
  gateIndex = (uint32) _3;
  _4 = 1074036736B;
  regValue = _4->PLATCGC;
  _5 = 1 << gateIndex;
  _6 = ~_5;
  regValue = regValue & _6;
  _7 = enable << gateIndex;
  regValue = regValue | _7;
  _8 = 1074036736B;
  _8->PLATCGC = regValue;
  return;

}


ClockUpdatePccCgcEnable (Clock_Ip_NameType clockName, boolean gate)
{
  struct Clock_Ip_GateConfigType config;

  <bb 2> :
  config.name = clockName;
  if (gate != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  config.enable = 0;
  goto <bb 5>; [INV]

  <bb 4> :
  config.enable = 1;

  <bb 5> :
  ClockSetPccCgcEnable (&config);
  config = {CLOBBER};
  return;

}


ClockSetPccCgcEnable (const struct Clock_Ip_GateConfigType * config)
{
  <bb 2> :
  ClockSetPccCgcEnable_TrustedCall (config);
  return;

}


ClockSetPccCgcEnable_TrustedCall (const struct Clock_Ip_GateConfigType * config)
{
  uint32 regValue;

  <bb 2> :
  _1 = 1074155520B;
  _2 = config->name;
  _3 = clockFeatures[_2][6];
  _4 = (int) _3;
  regValue = _1->PCCn[_4];
  regValue = regValue & 3221225471;
  _5 = config->enable;
  _6 = (long unsigned int) _5;
  _7 = _6 << 30;
  regValue = regValue | _7;
  _8 = 1074155520B;
  _9 = config->name;
  _10 = clockFeatures[_9][6];
  _11 = (int) _10;
  _8->PCCn[_11] = regValue;
  return;

}


ClockUpdateSimClkoutEnable (Clock_Ip_NameType clockName, boolean gate)
{
  struct Clock_Ip_GateConfigType config;

  <bb 2> :
  config.name = clockName;
  if (gate != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  config.enable = 0;
  goto <bb 5>; [INV]

  <bb 4> :
  config.enable = 1;

  <bb 5> :
  ClockSetSimClkoutEnable (&config);
  config = {CLOBBER};
  return;

}


ClockSetSimClkoutEnable (const struct Clock_Ip_GateConfigType * config)
{
  <bb 2> :
  ClockSetSimClkoutEnable_TrustedCall (config);
  return;

}


ClockSetSimClkoutEnable_TrustedCall (const struct Clock_Ip_GateConfigType * config)
{
  uint32 regValue;

  <bb 2> :
  _1 = 1074036736B;
  regValue = _1->CHIPCTL;
  regValue = regValue & 4294965247;
  _2 = config->enable;
  _3 = (long unsigned int) _2;
  _4 = _3 << 11;
  regValue = regValue | _4;
  _5 = 1074036736B;
  _5->CHIPCTL = regValue;
  return;

}


ClockUpdateSimLPO32KEnable (Clock_Ip_NameType clockName, boolean gate)
{
  struct Clock_Ip_GateConfigType config;

  <bb 2> :
  config.name = clockName;
  if (gate != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  config.enable = 0;
  goto <bb 5>; [INV]

  <bb 4> :
  config.enable = 1;

  <bb 5> :
  ClockSetSimLPO32KEnable (&config);
  config = {CLOBBER};
  return;

}


ClockSetSimLPO32KEnable (const struct Clock_Ip_GateConfigType * config)
{
  <bb 2> :
  ClockSetSimLPO32KEnable_TrustedCall (config);
  return;

}


ClockSetSimLPO32KEnable_TrustedCall (const struct Clock_Ip_GateConfigType * config)
{
  uint32 regValue;

  <bb 2> :
  _1 = 1074036736B;
  regValue = _1->LPOCLKS;
  regValue = regValue & 4294967293;
  _2 = config->enable;
  _3 = (long unsigned int) _2;
  _4 = _3 << 1;
  regValue = regValue | _4;
  _5 = 1074036736B;
  _5->LPOCLKS = regValue;
  return;

}


ClockUpdateSimLPO1KEnable (Clock_Ip_NameType clockName, boolean gate)
{
  struct Clock_Ip_GateConfigType config;

  <bb 2> :
  config.name = clockName;
  if (gate != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  config.enable = 0;
  goto <bb 5>; [INV]

  <bb 4> :
  config.enable = 1;

  <bb 5> :
  ClockSetSimLPO1KEnable (&config);
  config = {CLOBBER};
  return;

}


ClockSetSimLPO1KEnable (const struct Clock_Ip_GateConfigType * config)
{
  <bb 2> :
  ClockSetSimLPO1KEnable_TrustedCall (config);
  return;

}


ClockSetSimLPO1KEnable_TrustedCall (const struct Clock_Ip_GateConfigType * config)
{
  uint32 regValue;

  <bb 2> :
  _1 = 1074036736B;
  regValue = _1->LPOCLKS;
  regValue = regValue & 4294967294;
  _2 = config->enable;
  _3 = (long unsigned int) _2;
  regValue = regValue | _3;
  _4 = 1074036736B;
  _4->LPOCLKS = regValue;
  return;

}


ClockUpdateGateEmpty (Clock_Ip_NameType clockName, boolean gate)
{
  <bb 2> :
  return;

}


ClockSetGateEmpty (const struct Clock_Ip_GateConfigType * config)
{
  <bb 2> :
  return;

}


