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

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  config.name = clockName_3(D);
  # DEBUG BEGIN_STMT
  if (gate_5(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  config.enable = 1;

  <bb 5> :
  # DEBUG BEGIN_STMT
  ClockSetGateMcMePartitionCollectionClockRequest (&config);
  config ={v} {CLOBBER};
  return;

}


ClockSetGateMcMePartitionCollectionClockRequest (const struct Clock_Ip_GateConfigType * config)
{
  uint32 enableRequest;
  uint32 collection;
  uint32 partition;
  uint32 TimeoutTicks;
  uint32 ElapsedTime;
  uint32 StartTime;
  boolean TimeoutOccurred;
  <unnamed type> _1;
  int _2;
  unsigned char _3;
  <unnamed type> _4;
  int _5;
  unsigned char _6;
  <unnamed type> _7;
  int _8;
  unsigned char _9;
  short unsigned int _10;
  const volatile struct getMcmePartition_Type * _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  volatile struct setMcmePartition_Type * _15;
  long unsigned int _16;
  long unsigned int _17;
  volatile struct setMcmePartition_Type * _18;
  long unsigned int _19;
  volatile struct triggerMcmePartition_Type * _20;
  long unsigned int _21;
  volatile struct triggerMcmePartition_Type * _22;
  long unsigned int _23;
  volatile struct triggerMcmePartition_Type * _24;
  long unsigned int _25;
  volatile struct triggerMcmePartition_Type * _26;
  long unsigned int _27;
  long unsigned int TimeoutTicks.0_28;
  const volatile struct getMcmePartition_Type * _29;
  long unsigned int _30;
  long unsigned int _31;
  long unsigned int _32;
  _Bool _33;
  <unnamed type> _34;
  const volatile struct getMcmePartition_Type * _35;
  long unsigned int _36;
  long unsigned int _37;
  long unsigned int _38;
  volatile struct setMcmePartition_Type * _39;
  long unsigned int _40;
  long unsigned int _41;
  long unsigned int _42;
  volatile struct setMcmePartition_Type * _43;
  long unsigned int _44;
  volatile struct triggerMcmePartition_Type * _45;
  long unsigned int _46;
  volatile struct triggerMcmePartition_Type * _47;
  long unsigned int _48;
  volatile struct triggerMcmePartition_Type * _49;
  long unsigned int _50;
  volatile struct triggerMcmePartition_Type * _51;
  long unsigned int _52;
  long unsigned int TimeoutTicks.1_53;
  const volatile struct getMcmePartition_Type * _54;
  long unsigned int _55;
  long unsigned int _56;
  long unsigned int _57;
  _Bool _58;
  <unnamed type> _59;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TimeoutOccurred_63 = 0;
  # DEBUG TimeoutOccurred => TimeoutOccurred_63
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = config_65(D)->name;
  _2 = (int) _1;
  _3 = clockFeatures[_2][3];
  partition_66 = (uint32) _3;
  # DEBUG partition => partition_66
  # DEBUG BEGIN_STMT
  _4 = config_65(D)->name;
  _5 = (int) _4;
  _6 = clockFeatures[_5][4];
  collection_67 = (uint32) _6;
  # DEBUG collection => collection_67
  # DEBUG BEGIN_STMT
  _7 = config_65(D)->name;
  _8 = (int) _7;
  _9 = clockFeatures[_8][5];
  enableRequest_68 = (uint32) _9;
  # DEBUG enableRequest => enableRequest_68
  # DEBUG BEGIN_STMT
  _10 = config_65(D)->enable;
  if (_10 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _11 = mcmeGetPartitions[partition_66];
  _12 ={v} _11->PRTN_COFB_STAT[collection_67];
  _13 = _12 >> enableRequest_68;
  _14 = _13 & 1;
  if (_14 == 0)
    goto <bb 4>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _15 = mcmeSetPartitions[partition_66];
  _16 ={v} _15->PRTN_COFB_CLKEN[collection_67];
  _17 = 1 << enableRequest_68;
  _18 = mcmeSetPartitions[partition_66];
  _19 = _16 | _17;
  _18->PRTN_COFB_CLKEN[collection_67] ={v} _19;
  # DEBUG BEGIN_STMT
  _20 = mcmeTriggerPartitions[partition_66];
  _21 ={v} _20->PRTN_PCONF;
  _22 = mcmeTriggerPartitions[partition_66];
  _23 = _21 | 1;
  _22->PRTN_PCONF ={v} _23;
  # DEBUG BEGIN_STMT
  _24 = mcmeTriggerPartitions[partition_66];
  _25 ={v} _24->PRTN_PUPD;
  _26 = mcmeTriggerPartitions[partition_66];
  _27 = _25 | 1;
  _26->PRTN_PUPD ={v} _27;
  # DEBUG BEGIN_STMT
  McMeEnterKey ();
  # DEBUG BEGIN_STMT
  ClockStartTimeout (&StartTime, &ElapsedTime, &TimeoutTicks, 10000);

  <bb 5> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  TimeoutTicks.0_28 = TimeoutTicks;
  TimeoutOccurred_83 = ClockTimeoutExpired (&StartTime, &ElapsedTime, TimeoutTicks.0_28);
  # DEBUG TimeoutOccurred => TimeoutOccurred_83
  # DEBUG BEGIN_STMT
  _29 = mcmeGetPartitions[partition_66];
  _30 ={v} _29->PRTN_COFB_STAT[collection_67];
  _31 = _30 >> enableRequest_68;
  _32 = _31 & 1;
  if (_32 == 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

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

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

  <bb 8> :
  # DEBUG BEGIN_STMT
  _34 = config_65(D)->name;
  ReportClockErrors (1, _34);
  goto <bb 15>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _35 = mcmeGetPartitions[partition_66];
  _36 ={v} _35->PRTN_COFB_STAT[collection_67];
  _37 = _36 >> enableRequest_68;
  _38 = _37 & 1;
  if (_38 != 0)
    goto <bb 10>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _39 = mcmeSetPartitions[partition_66];
  _40 ={v} _39->PRTN_COFB_CLKEN[collection_67];
  _41 = 1 << enableRequest_68;
  _42 = ~_41;
  _43 = mcmeSetPartitions[partition_66];
  _44 = _40 & _42;
  _43->PRTN_COFB_CLKEN[collection_67] ={v} _44;
  # DEBUG BEGIN_STMT
  _45 = mcmeTriggerPartitions[partition_66];
  _46 ={v} _45->PRTN_PCONF;
  _47 = mcmeTriggerPartitions[partition_66];
  _48 = _46 | 1;
  _47->PRTN_PCONF ={v} _48;
  # DEBUG BEGIN_STMT
  _49 = mcmeTriggerPartitions[partition_66];
  _50 ={v} _49->PRTN_PUPD;
  _51 = mcmeTriggerPartitions[partition_66];
  _52 = _50 | 1;
  _51->PRTN_PUPD ={v} _52;
  # DEBUG BEGIN_STMT
  McMeEnterKey ();
  # DEBUG BEGIN_STMT
  ClockStartTimeout (&StartTime, &ElapsedTime, &TimeoutTicks, 10000);

  <bb 11> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  TimeoutTicks.1_53 = TimeoutTicks;
  TimeoutOccurred_75 = ClockTimeoutExpired (&StartTime, &ElapsedTime, TimeoutTicks.1_53);
  # DEBUG TimeoutOccurred => TimeoutOccurred_75
  # DEBUG BEGIN_STMT
  _54 = mcmeGetPartitions[partition_66];
  _55 ={v} _54->PRTN_COFB_STAT[collection_67];
  _56 = _55 >> enableRequest_68;
  _57 = _56 & 1;
  if (_57 != 0)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 12> :
  _58 = ~TimeoutOccurred_75;
  if (_58 != 0)
    goto <bb 11>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  if (TimeoutOccurred_75 != 0)
    goto <bb 14>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  _59 = config_65(D)->name;
  ReportClockErrors (1, _59);

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

}


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

}


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

}


