Power_Ip_MC_ME_SocTriggerResetEvent (Power_Ip_PowerModeType PowerMode)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  if (PowerMode == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.28_1 = Power_Ip_pxMC_ME;
  Power_Ip_pxMC_ME.28_1->MODE_CONF = 1;
  goto <bb 6>; [INV]

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.29_2 = Power_Ip_pxMC_ME;
  Power_Ip_pxMC_ME.29_2->MODE_CONF = 2;

  <bb 6> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  Power_Ip_MC_ME_TriggerModeUpdate ();
  return;

}


Power_Ip_MC_ME_DisablePartitionOutputSafe (const struct Power_Ip_MC_ME_ModeConfigType * ModeConfigPtr)
{
  uint8 PartitionIndex;
  const struct Power_Ip_MC_ME_PartitionConfigType * TempPartitionConfig;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempPartitionConfig = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  PartitionIndex = 0;
  goto <bb 8>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = ModeConfigPtr->ArrayPartitionConfigPtr;
  _2 = (int) PartitionIndex;
  TempPartitionConfig = &*_1[_2];
  # DEBUG BEGIN_STMT
  _3 = TempPartitionConfig->PartitionUnderMcuControl;
  if (_3 == 1)
    goto <bb 4>; [INV]
  else
    goto <bb 7>; [INV]

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  _5 = TempPartitionConfig->PartitionPconfRegValue;
  _6 = _5 & 4;
  if (_6 == 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  Power_Ip_MC_ME_ConfigurePartitionOutputSafe (TempPartitionConfig);

  <bb 7> :
  # DEBUG BEGIN_STMT
  PartitionIndex = PartitionIndex + 1;

  <bb 8> :
  # DEBUG BEGIN_STMT
  if (PartitionIndex <= 3)
    goto <bb 3>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 9> :
  return;

}


Power_Ip_MC_ME_EnablePartitionOutputSafe (const struct Power_Ip_MC_ME_ModeConfigType * ModeConfigPtr)
{
  uint8 PartitionIndex;
  const struct Power_Ip_MC_ME_PartitionConfigType * TempPartitionConfig;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempPartitionConfig = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  PartitionIndex = 0;
  goto <bb 8>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = ModeConfigPtr->ArrayPartitionConfigPtr;
  _2 = (int) PartitionIndex;
  TempPartitionConfig = &*_1[_2];
  # DEBUG BEGIN_STMT
  _3 = TempPartitionConfig->PartitionUnderMcuControl;
  if (_3 == 1)
    goto <bb 4>; [INV]
  else
    goto <bb 7>; [INV]

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  _5 = TempPartitionConfig->PartitionPconfRegValue;
  _6 = _5 & 4;
  if (_6 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  Power_Ip_MC_ME_ConfigurePartitionOutputSafe (TempPartitionConfig);

  <bb 7> :
  # DEBUG BEGIN_STMT
  PartitionIndex = PartitionIndex + 1;

  <bb 8> :
  # DEBUG BEGIN_STMT
  if (PartitionIndex <= 3)
    goto <bb 3>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 9> :
  return;

}


Power_Ip_MC_ME_DisablePartitionClock (const struct Power_Ip_MC_ME_ModeConfigType * ModeConfigPtr)
{
  uint8 PartitionIndex;
  const struct Power_Ip_MC_ME_PartitionConfigType * TempPartitionConfig;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempPartitionConfig = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  PartitionIndex = 0;
  goto <bb 8>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = ModeConfigPtr->ArrayPartitionConfigPtr;
  _2 = (int) PartitionIndex;
  TempPartitionConfig = &*_1[_2];
  # DEBUG BEGIN_STMT
  _3 = TempPartitionConfig->PartitionUnderMcuControl;
  if (_3 == 1)
    goto <bb 4>; [INV]
  else
    goto <bb 7>; [INV]

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  _5 = TempPartitionConfig->PartitionPconfRegValue;
  _6 = _5 & 1;
  if (_6 == 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  Power_Ip_MC_ME_ConfigurePartitionClock (TempPartitionConfig);

  <bb 7> :
  # DEBUG BEGIN_STMT
  PartitionIndex = PartitionIndex + 1;

  <bb 8> :
  # DEBUG BEGIN_STMT
  if (PartitionIndex <= 3)
    goto <bb 3>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 9> :
  return;

}


Power_Ip_MC_ME_EnablePartitionClock (const struct Power_Ip_MC_ME_ModeConfigType * ModeConfigPtr)
{
  uint8 PartitionIndex;
  const struct Power_Ip_MC_ME_PartitionConfigType * TempPartitionConfig;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempPartitionConfig = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  PartitionIndex = 0;
  goto <bb 8>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = ModeConfigPtr->ArrayPartitionConfigPtr;
  _2 = (int) PartitionIndex;
  TempPartitionConfig = &*_1[_2];
  # DEBUG BEGIN_STMT
  _3 = TempPartitionConfig->PartitionUnderMcuControl;
  if (_3 == 1)
    goto <bb 4>; [INV]
  else
    goto <bb 7>; [INV]

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  _5 = TempPartitionConfig->PartitionPconfRegValue;
  _6 = _5 & 1;
  if (_6 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  Power_Ip_MC_ME_ConfigurePartitionClock (TempPartitionConfig);

  <bb 7> :
  # DEBUG BEGIN_STMT
  PartitionIndex = PartitionIndex + 1;

  <bb 8> :
  # DEBUG BEGIN_STMT
  if (PartitionIndex <= 3)
    goto <bb 3>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 9> :
  return;

}


Power_Ip_MC_ME_ConfigCoreCOFBClock (const struct Power_Ip_MC_ME_ModeConfigType * ModeConfigPtr)
{
  uint8 CoreIndex;
  uint8 CofbIndex;
  uint8 PartitionIndex;
  const struct Power_Ip_MC_ME_PartitionConfigType * TempPartitionConfig;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempPartitionConfig = 0B;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  PartitionIndex = 0;
  goto <bb 21>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = ModeConfigPtr->ArrayPartitionConfigPtr;
  _2 = (int) PartitionIndex;
  TempPartitionConfig = &*_1[_2];
  # DEBUG BEGIN_STMT
  _3 = TempPartitionConfig->PartitionUnderMcuControl;
  if (_3 == 1)
    goto <bb 4>; [INV]
  else
    goto <bb 20>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  CofbIndex = 0;
  goto <bb 8>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _4 = TempPartitionConfig->ArrayPartitionCofbConfigPtr;
  _5 = (int) CofbIndex;
  _6 = *_4[_5].CofbUnderMcuControl;
  if (_6 == 1)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _7 = TempPartitionConfig->ArrayPartitionCofbConfigPtr;
  _8 = (int) CofbIndex;
  _9 = &*_7[_8];
  _10 = TempPartitionConfig->PartitionIndex;
  Power_Ip_MC_ME_ConfigureCOFB (_9, _10);

  <bb 7> :
  # DEBUG BEGIN_STMT
  CofbIndex = CofbIndex + 1;

  <bb 8> :
  # DEBUG BEGIN_STMT
  _11 = TempPartitionConfig->NumberOfCofbs;
  if (CofbIndex < _11)
    goto <bb 5>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  CoreIndex = 0;
  goto <bb 13>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _12 = TempPartitionConfig->ArrayPartitionCoreConfigPtr;
  _13 = (int) CoreIndex;
  _14 = *_12[_13].CoreUnderMcuControl;
  if (_14 == 1)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _15 = TempPartitionConfig->ArrayPartitionCoreConfigPtr;
  _16 = (int) CoreIndex;
  _17 = &*_15[_16];
  _18 = TempPartitionConfig->PartitionIndex;
  Power_Ip_MC_ME_ConfigureCore (_17, _18);

  <bb 12> :
  # DEBUG BEGIN_STMT
  CoreIndex = CoreIndex + 1;

  <bb 13> :
  # DEBUG BEGIN_STMT
  _19 = TempPartitionConfig->NumberOfCores;
  if (CoreIndex < _19)
    goto <bb 10>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  _20 = TempPartitionConfig->PartitionIndex;
  if (_20 == 1)
    goto <bb 15>; [INV]
  else
    goto <bb 20>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  CoreIndex = 0;
  goto <bb 19>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  _21 = TempPartitionConfig->ArrayPartitionCoreConfigPtr;
  _22 = (int) CoreIndex;
  _23 = *_21[_22].CoreUnderMcuControl;
  if (_23 == 1)
    goto <bb 17>; [INV]
  else
    goto <bb 18>; [INV]

  <bb 17> :
  # DEBUG BEGIN_STMT
  _24 = TempPartitionConfig->ArrayPartitionCoreConfigPtr;
  _25 = (int) CoreIndex;
  _26 = &*_24[_25];
  _27 = TempPartitionConfig->PartitionIndex;
  Power_Ip_MC_ME_ConfigureCorePartition1 (_26, _27);

  <bb 18> :
  # DEBUG BEGIN_STMT
  CoreIndex = CoreIndex + 1;

  <bb 19> :
  # DEBUG BEGIN_STMT
  _28 = TempPartitionConfig->NumberOfCores;
  if (CoreIndex < _28)
    goto <bb 16>; [INV]
  else
    goto <bb 20>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  PartitionIndex = PartitionIndex + 1;

  <bb 21> :
  # DEBUG BEGIN_STMT
  if (PartitionIndex <= 3)
    goto <bb 3>; [INV]
  else
    goto <bb 22>; [INV]

  <bb 22> :
  return;

}


Power_Ip_MC_ME_ConfigureCorePartition1 (const struct Power_Ip_MC_ME_CoreConfigType * CoreConfigPtr, uint8 PartitionIndex)
{
  uint8 CoreIndex;
  boolean TimeoutOccurred;
  uint32 TimeoutTicks;
  uint32 ElapsedTime;
  uint32 StartTime;
  uint32 CoreStatus;
  uint32 CoreConfig;

  <bb 2> :
  # DEBUG BEGIN_STMT
  CoreConfig = CoreConfigPtr->CorePconfRegValue;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  TimeoutOccurred = 0;
  # DEBUG BEGIN_STMT
  CoreIndex = CoreConfigPtr->CoreIndex;
  # DEBUG BEGIN_STMT
  if (CoreIndex == 0)
    goto <bb 4>; [INV]
  else
    goto <bb 3>; [INV]

  <bb 3> :
  if (CoreIndex == 2)
    goto <bb 4>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.15_1 = Power_Ip_pxMC_ME;
  _2 = (int) PartitionIndex;
  _3 = (int) CoreIndex;
  Power_Ip_pxMC_ME.15_1->McMePrtnArray[_2].McMePrtnCoreArray[_3].PRTN_CORE_PCONF = CoreConfig;
  # DEBUG BEGIN_STMT
  Power_Ip_MC_ME_TriggerCoreUpdate (PartitionIndex, CoreIndex);
  # DEBUG BEGIN_STMT
  Power_Ip_StartTimeout (&StartTime, &ElapsedTime, &TimeoutTicks, 50000);

  <bb 5> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  TimeoutTicks.16_4 = TimeoutTicks;
  TimeoutOccurred = Power_Ip_TimeoutExpired (&StartTime, &ElapsedTime, TimeoutTicks.16_4);
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.17_5 = Power_Ip_pxMC_ME;
  _6 = (int) PartitionIndex;
  _7 = (int) CoreIndex;
  CoreStatus = Power_Ip_pxMC_ME.17_5->McMePrtnArray[_6].McMePrtnCoreArray[_7].PRTN_CORE_STAT;
  # DEBUG BEGIN_STMT
  _8 = CoreStatus ^ CoreConfig;
  _9 = _8 & 1;
  if (_9 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  if (TimeoutOccurred == 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
  Power_Ip_ReportPowerErrors (0, 255);

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

}


Power_Ip_MC_ME_ConfigureCore (const struct Power_Ip_MC_ME_CoreConfigType * CoreConfigPtr, uint8 PartitionIndex)
{
  uint8 CoreIndex;
  boolean TimeoutOccurred;
  uint32 TimeoutTicks;
  uint32 ElapsedTime;
  uint32 StartTime;
  uint32 CoreStatus;
  uint32 CoreConfig;

  <bb 2> :
  # DEBUG BEGIN_STMT
  CoreConfig = CoreConfigPtr->CorePconfRegValue;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  TimeoutOccurred = 0;
  # DEBUG BEGIN_STMT
  CoreIndex = CoreConfigPtr->CoreIndex;
  # DEBUG BEGIN_STMT
  _1 = CoreConfigPtr->CorePconfRegValue;
  _2 = _1 & 1;
  if (_2 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  TimeoutTicks.7_3 = TimeoutTicks;
  TimeoutOccurred = Power_Ip_TimeoutExpired (&StartTime, &ElapsedTime, TimeoutTicks.7_3);
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.8_4 = Power_Ip_pxMC_ME;
  _5 = (int) PartitionIndex;
  _6 = (int) CoreIndex;
  CoreStatus = Power_Ip_pxMC_ME.8_4->McMePrtnArray[_5].McMePrtnCoreArray[_6].PRTN_CORE_STAT;
  # DEBUG BEGIN_STMT
  CoreStatus.9_7 = (signed int) CoreStatus;
  if (CoreStatus.9_7 >= 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  if (TimeoutOccurred == 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
  Power_Ip_ReportPowerErrors (0, 255);

  <bb 8> :
  # DEBUG BEGIN_STMT
  if (PartitionIndex != 1)
    goto <bb 9>; [INV]
  else
    goto <bb 15>; [INV]

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

  <bb 10> :
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.10_8 = Power_Ip_pxMC_ME;
  _9 = (int) PartitionIndex;
  _10 = (int) CoreIndex;
  Power_Ip_pxMC_ME.10_8->McMePrtnArray[_9].McMePrtnCoreArray[_10].PRTN_CORE_PCONF = CoreConfig;
  # DEBUG BEGIN_STMT
  Power_Ip_MC_ME_TriggerCoreUpdate (PartitionIndex, CoreIndex);
  # DEBUG BEGIN_STMT
  Power_Ip_StartTimeout (&StartTime, &ElapsedTime, &TimeoutTicks, 50000);

  <bb 11> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  TimeoutTicks.11_11 = TimeoutTicks;
  TimeoutOccurred = Power_Ip_TimeoutExpired (&StartTime, &ElapsedTime, TimeoutTicks.11_11);
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.12_12 = Power_Ip_pxMC_ME;
  _13 = (int) PartitionIndex;
  _14 = (int) CoreIndex;
  CoreStatus = Power_Ip_pxMC_ME.12_12->McMePrtnArray[_13].McMePrtnCoreArray[_14].PRTN_CORE_STAT;
  # DEBUG BEGIN_STMT
  _15 = CoreStatus ^ CoreConfig;
  _16 = _15 & 1;
  if (_16 != 0)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 12> :
  if (TimeoutOccurred == 0)
    goto <bb 11>; [INV]
  else
    goto <bb 13>; [INV]

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

  <bb 14> :
  # DEBUG BEGIN_STMT
  Power_Ip_ReportPowerErrors (0, 255);

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

}


Power_Ip_MC_ME_ConfigureCOFB (const struct Power_Ip_MC_ME_CofbConfigType * CofbConfigPtr, uint8 PartitionIndex)
{
  uint8 CofbIndex;
  boolean TimeoutOccurred;
  uint32 TimeoutTicks;
  uint32 ElapsedTime;
  uint32 StartTime;
  uint32 PeripheralsStatus;
  uint32 PeripheralsToUpdate;
  uint32 PeripheralsConfig;

  <bb 2> :
  # DEBUG BEGIN_STMT
  PeripheralsConfig = CofbConfigPtr->CofbClkenRegValue;
  # DEBUG BEGIN_STMT
  PeripheralsToUpdate = CofbConfigPtr->CofbBlocksToUpdateMask;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  TimeoutOccurred = 0;
  # DEBUG BEGIN_STMT
  CofbIndex = CofbConfigPtr->CofbIndex;
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.0_1 = Power_Ip_pxMC_ME;
  _2 = (int) PartitionIndex;
  _3 = (int) CofbIndex;
  Power_Ip_pxMC_ME.0_1->McMePrtnArray[_2].PRTN_COFB_CLKEN[_3] = PeripheralsConfig;
  # DEBUG BEGIN_STMT
  Power_Ip_MC_ME_TriggerCofbUpdate (PartitionIndex);
  # DEBUG BEGIN_STMT
  if (PartitionIndex != 2)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  TimeoutTicks.1_4 = TimeoutTicks;
  TimeoutOccurred = Power_Ip_TimeoutExpired (&StartTime, &ElapsedTime, TimeoutTicks.1_4);
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.2_5 = Power_Ip_pxMC_ME;
  _6 = (int) PartitionIndex;
  _7 = (int) CofbIndex;
  PeripheralsStatus = Power_Ip_pxMC_ME.2_5->McMePrtnArray[_6].PRTN_COFB_STAT[_7];
  # DEBUG BEGIN_STMT
  _8 = PeripheralsStatus & PeripheralsToUpdate;
  if (PeripheralsConfig != _8)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  if (TimeoutOccurred == 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
  Power_Ip_ReportPowerErrors (0, 255);

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

}


Power_Ip_MC_ME_ConfigurePartitionOutputSafe (const struct Power_Ip_MC_ME_PartitionConfigType * PartitionConfigPtr)
{
  uint8 PartitionIndex;
  boolean TimeoutOccurred;
  uint32 TimeoutTicks;
  uint32 ElapsedTime;
  uint32 StartTime;
  uint32 PartitionStatus;
  uint32 PartitionTriggerMask;
  uint32 PartitionConfig;
  uint32 TempValue;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempValue = 0;
  # DEBUG BEGIN_STMT
  PartitionConfig = PartitionConfigPtr->PartitionPconfRegValue;
  # DEBUG BEGIN_STMT
  PartitionTriggerMask = PartitionConfigPtr->PartitionTriggerMask;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  TimeoutOccurred = 0;
  # DEBUG BEGIN_STMT
  PartitionIndex = PartitionConfigPtr->PartitionIndex;
  # DEBUG BEGIN_STMT
  _1 = PartitionTriggerMask & 4;
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.24_2 = Power_Ip_pxMC_ME;
  _3 = (int) PartitionIndex;
  TempValue = Power_Ip_pxMC_ME.24_2->McMePrtnArray[_3].PRTN_PCONF;
  # DEBUG BEGIN_STMT
  TempValue = TempValue & 4294967291;
  # DEBUG BEGIN_STMT
  _4 = PartitionConfig & 4;
  TempValue = TempValue | _4;
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.25_5 = Power_Ip_pxMC_ME;
  _6 = (int) PartitionIndex;
  Power_Ip_pxMC_ME.25_5->McMePrtnArray[_6].PRTN_PCONF = TempValue;
  # DEBUG BEGIN_STMT
  Power_Ip_MC_ME_TriggerPartitionUpdate (4, PartitionIndex);
  # DEBUG BEGIN_STMT
  Power_Ip_StartTimeout (&StartTime, &ElapsedTime, &TimeoutTicks, 50000);

  <bb 4> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  TimeoutTicks.26_7 = TimeoutTicks;
  TimeoutOccurred = Power_Ip_TimeoutExpired (&StartTime, &ElapsedTime, TimeoutTicks.26_7);
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.27_8 = Power_Ip_pxMC_ME;
  _9 = (int) PartitionIndex;
  PartitionStatus = Power_Ip_pxMC_ME.27_8->McMePrtnArray[_9].PRTN_STAT;
  # DEBUG BEGIN_STMT
  _10 = PartitionStatus ^ PartitionConfig;
  _11 = _10 & 4;
  if (_11 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  if (TimeoutOccurred == 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
  Power_Ip_ReportPowerErrors (0, 255);

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

}


Power_Ip_MC_ME_ConfigurePartitionClock (const struct Power_Ip_MC_ME_PartitionConfigType * PartitionConfigPtr)
{
  uint8 PartitionIndex;
  boolean TimeoutOccurred;
  uint32 TimeoutTicks;
  uint32 ElapsedTime;
  uint32 StartTime;
  uint32 PartitionStatus;
  uint32 PartitionTriggerMask;
  uint32 PartitionConfig;
  uint32 TempValue;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempValue = 0;
  # DEBUG BEGIN_STMT
  PartitionConfig = PartitionConfigPtr->PartitionPconfRegValue;
  # DEBUG BEGIN_STMT
  PartitionTriggerMask = PartitionConfigPtr->PartitionTriggerMask;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  TimeoutOccurred = 0;
  # DEBUG BEGIN_STMT
  PartitionIndex = PartitionConfigPtr->PartitionIndex;
  # DEBUG BEGIN_STMT
  _1 = PartitionTriggerMask & 1;
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.18_2 = Power_Ip_pxMC_ME;
  _3 = (int) PartitionIndex;
  TempValue = Power_Ip_pxMC_ME.18_2->McMePrtnArray[_3].PRTN_PCONF;
  # DEBUG BEGIN_STMT
  TempValue = TempValue & 4294967294;
  # DEBUG BEGIN_STMT
  _4 = PartitionConfig & 1;
  TempValue = TempValue | _4;
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.19_5 = Power_Ip_pxMC_ME;
  _6 = (int) PartitionIndex;
  Power_Ip_pxMC_ME.19_5->McMePrtnArray[_6].PRTN_PCONF = TempValue;
  # DEBUG BEGIN_STMT
  Power_Ip_MC_ME_TriggerPartitionUpdate (1, PartitionIndex);
  # DEBUG BEGIN_STMT
  Power_Ip_StartTimeout (&StartTime, &ElapsedTime, &TimeoutTicks, 50000);

  <bb 4> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  TimeoutTicks.20_7 = TimeoutTicks;
  TimeoutOccurred = Power_Ip_TimeoutExpired (&StartTime, &ElapsedTime, TimeoutTicks.20_7);
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.21_8 = Power_Ip_pxMC_ME;
  _9 = (int) PartitionIndex;
  PartitionStatus = Power_Ip_pxMC_ME.21_8->McMePrtnArray[_9].PRTN_STAT;
  # DEBUG BEGIN_STMT
  _10 = PartitionStatus ^ PartitionConfig;
  _11 = _10 & 1;
  if (_11 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  if (TimeoutOccurred == 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
  Power_Ip_ReportPowerErrors (0, 255);

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

}


Power_Ip_MC_ME_TriggerCoreUpdate (uint8 PartitionIndex, uint8 CoreIndex)
{
  uint32 TempValue;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempValue = 0;
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.13_1 = Power_Ip_pxMC_ME;
  _2 = (int) PartitionIndex;
  _3 = (int) CoreIndex;
  TempValue = Power_Ip_pxMC_ME.13_1->McMePrtnArray[_2].McMePrtnCoreArray[_3].PRTN_CORE_PUPD;
  # DEBUG BEGIN_STMT
  TempValue = TempValue & 4294967294;
  # DEBUG BEGIN_STMT
  TempValue = TempValue | 1;
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.14_4 = Power_Ip_pxMC_ME;
  _5 = (int) PartitionIndex;
  _6 = (int) CoreIndex;
  Power_Ip_pxMC_ME.14_4->McMePrtnArray[_5].McMePrtnCoreArray[_6].PRTN_CORE_PUPD = TempValue;
  # DEBUG BEGIN_STMT
  Power_Ip_MC_ME_WriteControlKeys ();
  return;

}


Power_Ip_MC_ME_TriggerCofbUpdate (uint8 PartitionIndex)
{
  uint32 TempValue;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempValue = 0;
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.3_1 = Power_Ip_pxMC_ME;
  _2 = (int) PartitionIndex;
  TempValue = Power_Ip_pxMC_ME.3_1->McMePrtnArray[_2].PRTN_PUPD;
  # DEBUG BEGIN_STMT
  TempValue = TempValue & 4294967294;
  # DEBUG BEGIN_STMT
  TempValue = TempValue | 1;
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.4_3 = Power_Ip_pxMC_ME;
  _4 = (int) PartitionIndex;
  Power_Ip_pxMC_ME.4_3->McMePrtnArray[_4].PRTN_PUPD = TempValue;
  # DEBUG BEGIN_STMT
  Power_Ip_MC_ME_WriteControlKeys ();
  return;

}


Power_Ip_MC_ME_TriggerPartitionUpdate (uint32 TriggerMask, uint8 PartitionIndex)
{
  uint32 TempValue;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempValue = 0;
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.22_1 = Power_Ip_pxMC_ME;
  _2 = (int) PartitionIndex;
  TempValue = Power_Ip_pxMC_ME.22_1->McMePrtnArray[_2].PRTN_PUPD;
  # DEBUG BEGIN_STMT
  _3 = ~TriggerMask;
  TempValue = TempValue & _3;
  # DEBUG BEGIN_STMT
  TempValue = TempValue | TriggerMask;
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.23_4 = Power_Ip_pxMC_ME;
  _5 = (int) PartitionIndex;
  Power_Ip_pxMC_ME.23_4->McMePrtnArray[_5].PRTN_PUPD = TempValue;
  # DEBUG BEGIN_STMT
  Power_Ip_MC_ME_WriteControlKeys ();
  return;

}


Power_Ip_MC_ME_TriggerModeUpdate ()
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.30_1 = Power_Ip_pxMC_ME;
  Power_Ip_pxMC_ME.30_1->MODE_UPD = 1;
  # DEBUG BEGIN_STMT
  Power_Ip_MC_ME_WriteControlKeys ();
  return;

}


Power_Ip_MC_ME_WriteControlKeys ()
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.5_1 = Power_Ip_pxMC_ME;
  Power_Ip_pxMC_ME.5_1->CTL_KEY = 23280;
  # DEBUG BEGIN_STMT
  Power_Ip_pxMC_ME.6_2 = Power_Ip_pxMC_ME;
  Power_Ip_pxMC_ME.6_2->CTL_KEY = 42255;
  return;

}


