Adc_Sar_Ip_SetExternalTrigger (const uint32 u32Instance, const Adc_Sar_Ip_ExtTriggerEdgeType eTriggerEdge, const Adc_Sar_Ip_ExtTriggerSourceType eTrggerSrc)
{
  int _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = (int) eTrggerSrc_3(D);
  switch (_1) <default: <L6> [INV], case 0: <L0> [INV], case 1: <L1> [INV], case 2: <L2> [INV], case 3: <L3> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  Adc_Sar_ConfigExternalTrigger (u32Instance_5(D), eTriggerEdge_6(D), 67108864, 0, 134217728);
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  Adc_Sar_ConfigExternalTrigger (u32Instance_5(D), eTriggerEdge_6(D), 67108864, 0, 33554432);
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  Adc_Sar_ConfigExternalTrigger (u32Instance_5(D), eTriggerEdge_6(D), 67108864, 67108864, 167772160);
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 6> :
<L3>:
  # DEBUG BEGIN_STMT
  Adc_Sar_ConfigExternalTrigger (u32Instance_5(D), eTriggerEdge_6(D), 2097152, 2097152, 4194304);
  # DEBUG BEGIN_STMT

  <bb 7> :
<L6>:
  return;

}


Adc_Sar_Ip_SetCtuMode (const uint32 u32Instance, const Adc_Sar_Ip_CtuModeType eCtuMode)
{
  struct ADC_Type * const pBase;
  Adc_Sar_Ip_StatusType eStatus;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  Adc_Sar_Ip_StatusType _14;
  Adc_Sar_Ip_StatusType _36;
  Adc_Sar_Ip_StatusType _37;

  <bb 2> :
  # DEBUG BEGIN_STMT
  eStatus_18 = 0;
  # DEBUG eStatus => eStatus_18
  # DEBUG BEGIN_STMT
  pBase_21 = pAdcBase[u32Instance_20(D)];
  # DEBUG pBase => pBase_21
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_20 ();
  # DEBUG BEGIN_STMT
  _1 ={v} pBase_21->MCR;
  _2 = _1 & 4294836223;
  pBase_21->MCR ={v} _2;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_20 ();
  # DEBUG BEGIN_STMT
  eStatus_26 = Adc_Sar_Ip_Powerdown (u32Instance_20(D));
  # DEBUG eStatus => eStatus_26
  # DEBUG BEGIN_STMT
  if (eStatus_26 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _37 = eStatus_26;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 11>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _3 = u32AdcFeatureBitmap[u32Instance_20(D)];
  _4 = _3 & 4;
  if (_4 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_20 ();
  # DEBUG BEGIN_STMT
  _5 = (int) eCtuMode_28(D);
  switch (_5) <default: <L10> [INV], case 0: <L5> [INV], case 1: <L3> [INV], case 2: <L4> [INV]>

  <bb 6> :
<L3>:
  # DEBUG BEGIN_STMT
  _6 ={v} pBase_21->MCR;
  _7 = _6 & 4294901759;
  pBase_21->MCR ={v} _7;
  # DEBUG BEGIN_STMT
  _8 ={v} pBase_21->MCR;
  _9 = _8 | 131072;
  pBase_21->MCR ={v} _9;
  # DEBUG BEGIN_STMT
  goto <bb 9>; [INV]

  <bb 7> :
<L4>:
  # DEBUG BEGIN_STMT
  _10 ={v} pBase_21->MCR;
  _11 = _10 | 196608;
  pBase_21->MCR ={v} _11;
  # DEBUG BEGIN_STMT
  goto <bb 9>; [INV]

  <bb 8> :
<L5>:
  # DEBUG BEGIN_STMT
  _12 ={v} pBase_21->MCR;
  _13 = _12 & 4294770687;
  pBase_21->MCR ={v} _13;
  # DEBUG BEGIN_STMT

  <bb 9> :
<L10>:
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_20 ();

  <bb 10> :
  # DEBUG BEGIN_STMT
  eStatus_35 = Adc_Sar_Ip_Powerup (u32Instance_20(D));
  # DEBUG eStatus => eStatus_35
  # DEBUG BEGIN_STMT
  _36 = eStatus_35;

  <bb 11> :
  # _14 = PHI <_37(3), _36(10)>
  return _14;

}


Adc_Sar_Ip_SetConversionMode (const uint32 u32Instance, const Adc_Sar_Ip_ConvModeType eConvMode)
{
  struct ADC_Type * const pBase;
  int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_9 = pAdcBase[u32Instance_8(D)];
  # DEBUG pBase => pBase_9
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_19 ();
  # DEBUG BEGIN_STMT
  _1 = (int) eConvMode_11(D);
  switch (_1) <default: <L4> [INV], case 0: <L0> [INV], case 1: <L1> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  _2 ={v} pBase_9->MCR;
  _3 = _2 & 3758096383;
  pBase_9->MCR ={v} _3;
  # DEBUG BEGIN_STMT
  goto <bb 5>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  _4 ={v} pBase_9->MCR;
  _5 = _4 | 536870912;
  pBase_9->MCR ={v} _5;
  # DEBUG BEGIN_STMT

  <bb 5> :
<L4>:
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_19 ();
  return;

}


Adc_Sar_Ip_SetWdgThreshold (const uint32 u32Instance, const uint8 u8RegisterIdx, const struct Adc_Sar_Ip_WdgThresholdType * const pThresholdValues)
{
  uint32 u32Wtimr;
  uint16 u16LowThreshold;
  uint16 u16HighThreshold;
  uint8 u8Shift;
  struct ADC_Type * const pBase;
  unsigned char _1;
  short unsigned int _2;
  int _3;
  int _4;
  int _5;
  short unsigned int _6;
  int _7;
  int _8;
  int _9;
  _Bool _10;
  unsigned int _11;
  unsigned int _12;
  unsigned int _13;
  long unsigned int _14;
  unsigned int _15;
  unsigned int _16;
  unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  _Bool _20;
  unsigned int _21;
  unsigned int _22;
  long unsigned int _23;
  unsigned int _24;
  unsigned int _25;
  long unsigned int _26;
  long unsigned int _27;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_32 = pAdcBase[u32Instance_31(D)];
  # DEBUG pBase => pBase_32
  # DEBUG BEGIN_STMT
  _1 = Adc_Sar_GetResolution (u32Instance_31(D));
  u8Shift_34 = 15 - _1;
  # DEBUG u8Shift => u8Shift_34
  # DEBUG BEGIN_STMT
  _2 = pThresholdValues_35(D)->u16HighThreshold;
  _3 = (int) _2;
  _4 = (int) u8Shift_34;
  _5 = _3 << _4;
  u16HighThreshold_36 = (uint16) _5;
  # DEBUG u16HighThreshold => u16HighThreshold_36
  # DEBUG BEGIN_STMT
  _6 = pThresholdValues_35(D)->u16LowThreshold;
  _7 = (int) _6;
  _8 = (int) u8Shift_34;
  _9 = _7 << _8;
  u16LowThreshold_37 = (uint16) _9;
  # DEBUG u16LowThreshold => u16LowThreshold_37
  # DEBUG BEGIN_STMT
  Adc_Sar_WriteThresholds (pBase_32, u8RegisterIdx_38(D), u16HighThreshold_36, u16LowThreshold_37);
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_32 ();
  # DEBUG BEGIN_STMT
  u32Wtimr_41 ={v} pBase_32->WTIMR;
  # DEBUG u32Wtimr => u32Wtimr_41
  # DEBUG BEGIN_STMT
  _10 = pThresholdValues_35(D)->bLowThresholdIntEn;
  if (_10 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _11 = (unsigned int) u8RegisterIdx_38(D);
  _12 = _11 * 2;
  _13 = _12 + 1;
  _14 = 1 << _13;
  u32Wtimr_43 = u32Wtimr_41 | _14;
  # DEBUG u32Wtimr => u32Wtimr_43
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _15 = (unsigned int) u8RegisterIdx_38(D);
  _16 = _15 * 2;
  _17 = _16 + 1;
  _18 = 1 << _17;
  _19 = ~_18;
  u32Wtimr_42 = u32Wtimr_41 & _19;
  # DEBUG u32Wtimr => u32Wtimr_42

  <bb 5> :
  # u32Wtimr_28 = PHI <u32Wtimr_43(3), u32Wtimr_42(4)>
  # DEBUG u32Wtimr => u32Wtimr_28
  # DEBUG BEGIN_STMT
  _20 = pThresholdValues_35(D)->bHighThresholdIntEn;
  if (_20 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _21 = (unsigned int) u8RegisterIdx_38(D);
  _22 = _21 * 2;
  _23 = 1 << _22;
  u32Wtimr_45 = u32Wtimr_28 | _23;
  # DEBUG u32Wtimr => u32Wtimr_45
  goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _24 = (unsigned int) u8RegisterIdx_38(D);
  _25 = _24 * 2;
  _26 = 1 << _25;
  _27 = ~_26;
  u32Wtimr_44 = u32Wtimr_28 & _27;
  # DEBUG u32Wtimr => u32Wtimr_44

  <bb 8> :
  # u32Wtimr_29 = PHI <u32Wtimr_45(6), u32Wtimr_44(7)>
  # DEBUG u32Wtimr => u32Wtimr_29
  # DEBUG BEGIN_STMT
  pBase_32->WTIMR ={v} u32Wtimr_29;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_32 ();
  return;

}


Adc_Sar_Ip_SetDmaClearSource (const uint32 u32Instance, const Adc_Sar_Ip_ClearSourceType pDmaClear)
{
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_10 = pAdcBase[u32Instance_9(D)];
  # DEBUG pBase => pBase_10
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_45 ();
  # DEBUG BEGIN_STMT
  _1 ={v} pBase_10->DMAE;
  _2 = _1 & 4294967293;
  pBase_10->DMAE ={v} _2;
  # DEBUG BEGIN_STMT
  _3 ={v} pBase_10->DMAE;
  _4 = (long unsigned int) pDmaClear_13(D);
  _5 = _4 << 1;
  _6 = _5 & 2;
  _7 = _3 | _6;
  pBase_10->DMAE ={v} _7;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_45 ();
  return;

}


Adc_Sar_Ip_DisableChannelDmaAll (const uint32 u32Instance)
{
  uint8 u8Index;
  struct ADC_Type * const pBase;
  int _1;
  long unsigned int _2;
  volatile uint32_t * _3;
  unsigned int _4;
  unsigned int _5;
  volatile uint32_t * _6;
  long unsigned int _7;
  int _8;
  long unsigned int _9;
  long unsigned int _10;
  volatile uint32_t * _11;
  unsigned int _12;
  unsigned int _13;
  volatile uint32_t * _14;
  long unsigned int _15;
  unsigned char u8Index.23_16;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_22 = pAdcBase[u32Instance_21(D)];
  # DEBUG pBase => pBase_22
  # DEBUG BEGIN_STMT
  u8Index_23 = 0;
  # DEBUG u8Index => u8Index_23
  # DEBUG BEGIN_STMT
  u8Index_24 = 0;
  # DEBUG u8Index => u8Index_24
  goto <bb 7>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = (int) u8Index_17;
  _2 = u32AdcChanBitmap[u32Instance_21(D)][_1];
  if (_2 == 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_48 ();
  # DEBUG BEGIN_STMT
  _3 = &pBase_22->DMAR0;
  _4 = (unsigned int) u8Index_17;
  _5 = _4 * 4;
  _6 = _3 + _5;
  _7 ={v} MEM[(volatile uint32 *)_6];
  _8 = (int) u8Index_17;
  _9 = u32AdcChanBitmap[u32Instance_21(D)][_8];
  _10 = ~_9;
  _11 = &pBase_22->DMAR0;
  _12 = (unsigned int) u8Index_17;
  _13 = _12 * 4;
  _14 = _11 + _13;
  _15 = _7 & _10;
  MEM[(volatile uint32 *)_14] ={v} _15;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_48 ();

  <bb 6> :
  # DEBUG BEGIN_STMT
  u8Index.23_16 = u8Index_17;
  u8Index_28 = u8Index.23_16 + 1;
  # DEBUG u8Index => u8Index_28

  <bb 7> :
  # u8Index_17 = PHI <u8Index_24(2), u8Index_28(6)>
  # DEBUG u8Index => u8Index_17
  # DEBUG BEGIN_STMT
  if (u8Index_17 <= 2)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 8> :
  return;

}


Adc_Sar_Ip_DisableChannelDma (const uint32 u32Instance, const uint32 u32ChnIdx)
{
  uint32 u32VectBit;
  uint32 u32VectAdr;
  struct ADC_Type * const pBase;
  volatile uint32_t * _1;
  long unsigned int _2;
  volatile uint32_t * _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  volatile uint32_t * _7;
  long unsigned int _8;
  volatile uint32_t * _9;
  long unsigned int _10;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_13 = pAdcBase[u32Instance_12(D)];
  # DEBUG pBase => pBase_13
  # DEBUG BEGIN_STMT
  u32VectAdr_15 = u32ChnIdx_14(D) / 32;
  # DEBUG u32VectAdr => u32VectAdr_15
  # DEBUG BEGIN_STMT
  u32VectBit_16 = u32ChnIdx_14(D) & 31;
  # DEBUG u32VectBit => u32VectBit_16
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_47 ();
  # DEBUG BEGIN_STMT
  _1 = &pBase_13->DMAR0;
  _2 = u32VectAdr_15 * 4;
  _3 = _1 + _2;
  _4 ={v} MEM[(volatile uint32 *)_3];
  _5 = 1 << u32VectBit_16;
  _6 = ~_5;
  _7 = &pBase_13->DMAR0;
  _8 = u32VectAdr_15 * 4;
  _9 = _7 + _8;
  _10 = _4 & _6;
  MEM[(volatile uint32 *)_9] ={v} _10;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_47 ();
  return;

}


Adc_Sar_Ip_EnableChannelDma (const uint32 u32Instance, const uint32 u32ChnIdx)
{
  uint32 u32VectBit;
  uint32 u32VectAdr;
  struct ADC_Type * const pBase;
  volatile uint32_t * _1;
  long unsigned int _2;
  volatile uint32_t * _3;
  long unsigned int _4;
  long unsigned int _5;
  volatile uint32_t * _6;
  long unsigned int _7;
  volatile uint32_t * _8;
  long unsigned int _9;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_12 = pAdcBase[u32Instance_11(D)];
  # DEBUG pBase => pBase_12
  # DEBUG BEGIN_STMT
  u32VectAdr_14 = u32ChnIdx_13(D) / 32;
  # DEBUG u32VectAdr => u32VectAdr_14
  # DEBUG BEGIN_STMT
  u32VectBit_15 = u32ChnIdx_13(D) & 31;
  # DEBUG u32VectBit => u32VectBit_15
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_46 ();
  # DEBUG BEGIN_STMT
  _1 = &pBase_12->DMAR0;
  _2 = u32VectAdr_14 * 4;
  _3 = _1 + _2;
  _4 ={v} MEM[(volatile uint32 *)_3];
  _5 = 1 << u32VectBit_15;
  _6 = &pBase_12->DMAR0;
  _7 = u32VectAdr_14 * 4;
  _8 = _6 + _7;
  _9 = _4 | _5;
  MEM[(volatile uint32 *)_8] ={v} _9;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_46 ();
  return;

}


Adc_Sar_Ip_DisableDma (const uint32 u32Instance)
{
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_5 = pAdcBase[u32Instance_4(D)];
  # DEBUG pBase => pBase_5
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_44 ();
  # DEBUG BEGIN_STMT
  _1 ={v} pBase_5->DMAE;
  _2 = _1 & 4294967294;
  pBase_5->DMAE ={v} _2;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_44 ();
  return;

}


Adc_Sar_Ip_EnableDma (const uint32 u32Instance)
{
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_5 = pAdcBase[u32Instance_4(D)];
  # DEBUG pBase => pBase_5
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_43 ();
  # DEBUG BEGIN_STMT
  _1 ={v} pBase_5->DMAE;
  _2 = _1 | 1;
  pBase_5->DMAE ={v} _2;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_43 ();
  return;

}


Adc_Sar_Ip_DisablePresampleConversion (const uint32 u32Instance)
{
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = u32AdcFeatureBitmap[u32Instance_7(D)];
  _2 = _1 & 2;
  if (_2 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  pBase_8 = pAdcBase[u32Instance_7(D)];
  # DEBUG pBase => pBase_8
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_40 ();
  # DEBUG BEGIN_STMT
  _3 ={v} pBase_8->PSCR;
  _4 = _3 & 4294967294;
  pBase_8->PSCR ={v} _4;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_40 ();

  <bb 4> :
  return;

}


Adc_Sar_Ip_EnablePresampleConversion (const uint32 u32Instance)
{
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = u32AdcFeatureBitmap[u32Instance_7(D)];
  _2 = _1 & 2;
  if (_2 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  pBase_8 = pAdcBase[u32Instance_7(D)];
  # DEBUG pBase => pBase_8
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_39 ();
  # DEBUG BEGIN_STMT
  _3 ={v} pBase_8->PSCR;
  _4 = _3 | 1;
  pBase_8->PSCR ={v} _4;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_39 ();

  <bb 4> :
  return;

}


Adc_Sar_Ip_DisableChannelPresampling (const uint32 u32Instance, const uint32 u32ChnIdx)
{
  uint32 u32VectBit;
  uint32 u32VectAdr;
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;
  volatile uint32_t * _3;
  long unsigned int _4;
  volatile uint32_t * _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  volatile uint32_t * _9;
  long unsigned int _10;
  volatile uint32_t * _11;
  long unsigned int _12;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = u32AdcFeatureBitmap[u32Instance_15(D)];
  _2 = _1 & 2;
  if (_2 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  pBase_16 = pAdcBase[u32Instance_15(D)];
  # DEBUG pBase => pBase_16
  # DEBUG BEGIN_STMT
  u32VectAdr_18 = u32ChnIdx_17(D) / 32;
  # DEBUG u32VectAdr => u32VectAdr_18
  # DEBUG BEGIN_STMT
  u32VectBit_19 = u32ChnIdx_17(D) & 31;
  # DEBUG u32VectBit => u32VectBit_19
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_42 ();
  # DEBUG BEGIN_STMT
  _3 = &pBase_16->PSR0;
  _4 = u32VectAdr_18 * 4;
  _5 = _3 + _4;
  _6 ={v} MEM[(volatile uint32 *)_5];
  _7 = 1 << u32VectBit_19;
  _8 = ~_7;
  _9 = &pBase_16->PSR0;
  _10 = u32VectAdr_18 * 4;
  _11 = _9 + _10;
  _12 = _6 & _8;
  MEM[(volatile uint32 *)_11] ={v} _12;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_42 ();

  <bb 4> :
  return;

}


Adc_Sar_Ip_EnableChannelPresampling (const uint32 u32Instance, const uint32 u32ChnIdx)
{
  uint32 u32VectBit;
  uint32 u32VectAdr;
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;
  volatile uint32_t * _3;
  long unsigned int _4;
  volatile uint32_t * _5;
  long unsigned int _6;
  long unsigned int _7;
  volatile uint32_t * _8;
  long unsigned int _9;
  volatile uint32_t * _10;
  long unsigned int _11;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = u32AdcFeatureBitmap[u32Instance_14(D)];
  _2 = _1 & 2;
  if (_2 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  pBase_15 = pAdcBase[u32Instance_14(D)];
  # DEBUG pBase => pBase_15
  # DEBUG BEGIN_STMT
  u32VectAdr_17 = u32ChnIdx_16(D) / 32;
  # DEBUG u32VectAdr => u32VectAdr_17
  # DEBUG BEGIN_STMT
  u32VectBit_18 = u32ChnIdx_16(D) & 31;
  # DEBUG u32VectBit => u32VectBit_18
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_41 ();
  # DEBUG BEGIN_STMT
  _3 = &pBase_15->PSR0;
  _4 = u32VectAdr_17 * 4;
  _5 = _3 + _4;
  _6 ={v} MEM[(volatile uint32 *)_5];
  _7 = 1 << u32VectBit_18;
  _8 = &pBase_15->PSR0;
  _9 = u32VectAdr_17 * 4;
  _10 = _8 + _9;
  _11 = _6 | _7;
  MEM[(volatile uint32 *)_10] ={v} _11;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_41 ();

  <bb 4> :
  return;

}


Adc_Sar_Ip_SetPresamplingSource (const uint32 u32Instance, const Adc_Sar_Ip_ChanGroupType pChanGroup, const Adc_Sar_Ip_PresamplingSourceType pPresampleSource)
{
  uint32 u32Pscr;
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;
  int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = u32AdcFeatureBitmap[u32Instance_16(D)];
  _2 = _1 & 2;
  if (_2 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  pBase_17 = pAdcBase[u32Instance_16(D)];
  # DEBUG pBase => pBase_17
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_38 ();
  # DEBUG BEGIN_STMT
  u32Pscr_19 ={v} pBase_17->PSCR;
  # DEBUG u32Pscr => u32Pscr_19
  # DEBUG BEGIN_STMT
  _3 = (int) pChanGroup_20(D);
  switch (_3) <default: <L7> [INV], case 0: <L1> [INV], case 1: <L2> [INV], case 2: <L3> [INV]>

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  u32Pscr_26 = u32Pscr_19 & 4294967293;
  # DEBUG u32Pscr => u32Pscr_26
  # DEBUG BEGIN_STMT
  _4 = (long unsigned int) pPresampleSource_22(D);
  _5 = _4 << 1;
  _6 = _5 & 2;
  u32Pscr_27 = u32Pscr_26 | _6;
  # DEBUG u32Pscr => u32Pscr_27
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  u32Pscr_24 = u32Pscr_19 & 4294967287;
  # DEBUG u32Pscr => u32Pscr_24
  # DEBUG BEGIN_STMT
  _7 = (long unsigned int) pPresampleSource_22(D);
  _8 = _7 << 3;
  _9 = _8 & 8;
  u32Pscr_25 = u32Pscr_24 | _9;
  # DEBUG u32Pscr => u32Pscr_25
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 6> :
<L3>:
  # DEBUG BEGIN_STMT
  u32Pscr_21 = u32Pscr_19 & 4294967263;
  # DEBUG u32Pscr => u32Pscr_21
  # DEBUG BEGIN_STMT
  _10 = (long unsigned int) pPresampleSource_22(D);
  _11 = _10 << 5;
  _12 = _11 & 32;
  u32Pscr_23 = u32Pscr_21 | _12;
  # DEBUG u32Pscr => u32Pscr_23
  # DEBUG BEGIN_STMT

  <bb 7> :
  # u32Pscr_13 = PHI <u32Pscr_27(4), u32Pscr_25(5), u32Pscr_23(6), u32Pscr_19(3)>
<L7>:
  # DEBUG u32Pscr => u32Pscr_13
  # DEBUG BEGIN_STMT
  pBase_17->PSCR ={v} u32Pscr_13;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_38 ();

  <bb 8> :
  return;

}


Adc_Sar_Ip_AbortChain (const uint32 u32Instance, const boolean bBlocking, const boolean bAllowRestart)
{
  uint32 u32ElapsedTicks;
  uint32 u32CurrentTicks;
  uint32 u32TimeoutTicks;
  uint32 u32Status;
  struct ADC_Type * const pBase;
  long unsigned int _1;
  _Bool _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  Adc_Sar_Ip_StatusType _11;
  long unsigned int _33;
  Adc_Sar_Ip_StatusType _35;
  Adc_Sar_Ip_StatusType _36;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_18 = pAdcBase[u32Instance_17(D)];
  # DEBUG pBase => pBase_18
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  u32TimeoutTicks_20 = OsIf_MicrosToTicks (3000, 0);
  # DEBUG u32TimeoutTicks => u32TimeoutTicks_20
  # DEBUG BEGIN_STMT
  _1 = OsIf_GetCounter (0);
  u32CurrentTicks = _1;
  # DEBUG BEGIN_STMT
  u32ElapsedTicks_23 = 0;
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_23
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_18 ();
  # DEBUG BEGIN_STMT
  _2 = ~bAllowRestart_25(D);
  if (_2 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _3 ={v} pBase_18->MCR;
  _4 = _3 & 4278190079;
  pBase_18->MCR ={v} _4;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _5 ={v} pBase_18->MCR;
  _6 = _5 | 128;
  pBase_18->MCR ={v} _6;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_18 ();
  # DEBUG BEGIN_STMT
  if (bBlocking_29(D) != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _7 ={v} pBase_18->MSR;
  u32Status_30 = _7 & 16777216;
  # DEBUG u32Status => u32Status_30
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _8 ={v} pBase_18->MSR;
  u32Status_31 = _8 & 16777216;
  # DEBUG u32Status => u32Status_31
  # DEBUG BEGIN_STMT
  _33 = OsIf_GetElapsed (&u32CurrentTicks, 0);
  u32ElapsedTicks_34 = _33 + u32ElapsedTicks_10;
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_34

  <bb 7> :
  # u32Status_9 = PHI <u32Status_30(5), u32Status_31(6)>
  # u32ElapsedTicks_10 = PHI <u32ElapsedTicks_23(5), u32ElapsedTicks_34(6)>
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_10
  # DEBUG u32Status => u32Status_9
  # DEBUG BEGIN_STMT
  if (u32Status_9 == 16777216)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  if (u32ElapsedTicks_10 < u32TimeoutTicks_20)
    goto <bb 6>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  if (u32ElapsedTicks_10 >= u32TimeoutTicks_20)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _35 = 2;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _36 = 0;

  <bb 12> :
  # _11 = PHI <_35(10), _36(11)>
  u32CurrentTicks ={v} {CLOBBER};
  return _11;

}


Adc_Sar_Ip_AbortConversion (const uint32 u32Instance)
{
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_5 = pAdcBase[u32Instance_4(D)];
  # DEBUG pBase => pBase_5
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_17 ();
  # DEBUG BEGIN_STMT
  _1 ={v} pBase_5->MCR;
  _2 = _1 | 64;
  pBase_5->MCR ={v} _2;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_17 ();
  return;

}


Adc_Sar_Ip_SetAveraging (const uint32 u32Instance, const boolean bAvgEn, const Adc_Sar_Ip_AvgSelectType eAvgSel)
{
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int iftmp.22_9;
  long unsigned int iftmp.22_16;
  long unsigned int iftmp.22_17;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_12 = pAdcBase[u32Instance_11(D)];
  # DEBUG pBase => pBase_12
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_16 ();
  # DEBUG BEGIN_STMT
  _1 ={v} pBase_12->MCR;
  _2 = _1 & 4294963711;
  pBase_12->MCR ={v} _2;
  # DEBUG BEGIN_STMT
  _3 ={v} pBase_12->MCR;
  if (bAvgEn_15(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.22_17 = 2048;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.22_16 = 0;

  <bb 5> :
  # iftmp.22_9 = PHI <iftmp.22_17(3), iftmp.22_16(4)>
  _4 = (long unsigned int) eAvgSel_18(D);
  _5 = _4 << 9;
  _6 = _5 & 1536;
  _7 = iftmp.22_9 | _6;
  _8 = _3 | _7;
  pBase_12->MCR ={v} _8;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_16 ();
  return;

}


Adc_Sar_Ip_SetSampleTimes (const uint32 u32Instance, const uint8 * const aSampleTimes)
{
  struct ADC_Type * const pBase;
  long unsigned int _1;
  unsigned char _2;
  volatile uint32_t * _3;
  long unsigned int _4;
  long unsigned int _5;
  const uint8 * _6;
  unsigned char _7;
  volatile uint32_t * _8;
  volatile uint32_t * _9;
  long unsigned int _10;
  long unsigned int _11;
  const uint8 * _12;
  unsigned char _13;
  volatile uint32_t * _14;
  volatile uint32_t * _15;
  long unsigned int _16;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_22 = pAdcBase[u32Instance_21(D)];
  # DEBUG pBase => pBase_22
  # DEBUG BEGIN_STMT
  _1 = u32AdcChanBitmap[u32Instance_21(D)][0];
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = *aSampleTimes_23(D);
  _3 = &pBase_22->CTR0;
  _4 = (long unsigned int) _2;
  MEM[(volatile uint32 *)_3] ={v} _4;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _5 = u32AdcChanBitmap[u32Instance_21(D)][1];
  if (_5 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _6 = aSampleTimes_23(D) + 1;
  _7 = *_6;
  _8 = &pBase_22->CTR0;
  _9 = _8 + 4;
  _10 = (long unsigned int) _7;
  MEM[(volatile uint32 *)_9] ={v} _10;

  <bb 6> :
  # DEBUG BEGIN_STMT
  _11 = u32AdcChanBitmap[u32Instance_21(D)][2];
  if (_11 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _12 = aSampleTimes_23(D) + 2;
  _13 = *_12;
  _14 = &pBase_22->CTR0;
  _15 = _14 + 8;
  _16 = (long unsigned int) _13;
  MEM[(volatile uint32 *)_15] ={v} _16;

  <bb 8> :
  return;

}


Adc_Sar_Ip_SetClockMode (const uint32 u32Instance, const struct Adc_Sar_Ip_ClockConfigType * const pConfig)
{
  uint32 u32Mcr;
  struct ADC_Type * const pBase;
  Adc_Sar_Ip_StatusType eStatus;
  <unnamed type> _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  _Bool _8;
  <unnamed type> _9;
  unsigned char _10;
  long unsigned int _11;
  const uint8[3] * _12;
  Adc_Sar_Ip_StatusType _13;
  Adc_Sar_Ip_StatusType _32;
  Adc_Sar_Ip_StatusType _33;
  Adc_Sar_Ip_StatusType _34;

  <bb 2> :
  # DEBUG BEGIN_STMT
  eStatus_15 = 0;
  # DEBUG eStatus => eStatus_15
  # DEBUG BEGIN_STMT
  pBase_18 = pAdcBase[u32Instance_17(D)];
  # DEBUG pBase => pBase_18
  # DEBUG BEGIN_STMT
  u32Mcr_19 = 0;
  # DEBUG u32Mcr => u32Mcr_19
  # DEBUG BEGIN_STMT
  _1 = pConfig_20(D)->eClkSelect;
  _2 = (long unsigned int) _1;
  _3 = _2 << 1;
  _4 = _3 & 6;
  u32Mcr_21 = u32Mcr_19 | _4;
  # DEBUG u32Mcr => u32Mcr_21
  # DEBUG BEGIN_STMT
  eStatus_23 = Adc_Sar_Ip_Powerdown (u32Instance_17(D));
  # DEBUG eStatus => eStatus_23
  # DEBUG BEGIN_STMT
  if (eStatus_23 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _34 = eStatus_23;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 7>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_15 ();
  # DEBUG BEGIN_STMT
  _5 ={v} pBase_18->MCR;
  _6 = _5 & 4294967289;
  _7 = u32Mcr_21 | _6;
  pBase_18->MCR ={v} _7;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_15 ();
  # DEBUG BEGIN_STMT
  eStatus_28 = Adc_Sar_Ip_Powerup (u32Instance_17(D));
  # DEBUG eStatus => eStatus_28
  # DEBUG BEGIN_STMT
  if (eStatus_28 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _33 = eStatus_28;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _8 = pConfig_20(D)->bAvgEn;
  _9 = pConfig_20(D)->eAvgSel;
  Adc_Sar_Ip_SetAveraging (u32Instance_17(D), _8, _9);
  # DEBUG BEGIN_STMT
  _10 = pConfig_20(D)->u8PowerDownDelay;
  _11 = (long unsigned int) _10;
  pBase_18->PDEDR ={v} _11;
  # DEBUG BEGIN_STMT
  _12 = &pConfig_20(D)->aSampleTime;
  Adc_Sar_Ip_SetSampleTimes (u32Instance_17(D), _12);
  # DEBUG BEGIN_STMT
  _32 = eStatus_28;

  <bb 7> :
  # _13 = PHI <_34(3), _33(5), _32(6)>
  return _13;

}


Adc_Sar_Ip_DisableChannelNotifications (const uint32 u32Instance, const uint32 u32ChnIdx, const uint32 u32Mask)
{
  uint32 u32VectBit;
  uint32 u32VectAdr;
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;
  volatile uint32_t * _3;
  long unsigned int _4;
  volatile uint32_t * _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  volatile uint32_t * _9;
  long unsigned int _10;
  volatile uint32_t * _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  volatile uint32_t * _15;
  long unsigned int _16;
  volatile uint32_t * _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  volatile uint32_t * _21;
  long unsigned int _22;
  volatile uint32_t * _23;
  long unsigned int _24;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_29 = pAdcBase[u32Instance_28(D)];
  # DEBUG pBase => pBase_29
  # DEBUG BEGIN_STMT
  u32VectAdr_31 = u32ChnIdx_30(D) / 32;
  # DEBUG u32VectAdr => u32VectAdr_31
  # DEBUG BEGIN_STMT
  u32VectBit_32 = u32ChnIdx_30(D) & 31;
  # DEBUG u32VectBit => u32VectBit_32
  # DEBUG BEGIN_STMT
  _1 = u32Mask_33(D) & 1;
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = u32AdcChanBitmap[u32Instance_28(D)][u32VectAdr_31];
  if (_2 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_31 ();
  # DEBUG BEGIN_STMT
  _3 = &pBase_29->CIMR0;
  _4 = u32VectAdr_31 * 4;
  _5 = _3 + _4;
  _6 ={v} MEM[(volatile uint32 *)_5];
  _7 = 1 << u32VectBit_32;
  _8 = ~_7;
  _9 = &pBase_29->CIMR0;
  _10 = u32VectAdr_31 * 4;
  _11 = _9 + _10;
  _12 = _6 & _8;
  MEM[(volatile uint32 *)_11] ={v} _12;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_31 ();

  <bb 5> :
  # DEBUG BEGIN_STMT
  _13 = u32Mask_33(D) & 2;
  if (_13 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _14 = u32AdcChanBitmap[u32Instance_28(D)][u32VectAdr_31];
  if (_14 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_29 ();
  # DEBUG BEGIN_STMT
  _15 = &pBase_29->CWENR0;
  _16 = u32VectAdr_31 * 4;
  _17 = _15 + _16;
  _18 ={v} MEM[(volatile uint32 *)_17];
  _19 = 1 << u32VectBit_32;
  _20 = ~_19;
  _21 = &pBase_29->CWENR0;
  _22 = u32VectAdr_31 * 4;
  _23 = _21 + _22;
  _24 = _18 & _20;
  MEM[(volatile uint32 *)_23] ={v} _24;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_29 ();

  <bb 8> :
  return;

}


Adc_Sar_Ip_EnableChannelNotifications (const uint32 u32Instance, const uint32 u32ChnIdx, const uint32 u32Mask)
{
  uint32 u32VectBit;
  uint32 u32VectAdr;
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;
  volatile uint32_t * _3;
  long unsigned int _4;
  volatile uint32_t * _5;
  long unsigned int _6;
  long unsigned int _7;
  volatile uint32_t * _8;
  long unsigned int _9;
  volatile uint32_t * _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  volatile uint32_t * _14;
  long unsigned int _15;
  volatile uint32_t * _16;
  long unsigned int _17;
  long unsigned int _18;
  volatile uint32_t * _19;
  long unsigned int _20;
  volatile uint32_t * _21;
  long unsigned int _22;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_27 = pAdcBase[u32Instance_26(D)];
  # DEBUG pBase => pBase_27
  # DEBUG BEGIN_STMT
  u32VectAdr_29 = u32ChnIdx_28(D) / 32;
  # DEBUG u32VectAdr => u32VectAdr_29
  # DEBUG BEGIN_STMT
  u32VectBit_30 = u32ChnIdx_28(D) & 31;
  # DEBUG u32VectBit => u32VectBit_30
  # DEBUG BEGIN_STMT
  _1 = u32Mask_31(D) & 1;
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = u32AdcChanBitmap[u32Instance_26(D)][u32VectAdr_29];
  if (_2 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_30 ();
  # DEBUG BEGIN_STMT
  _3 = &pBase_27->CIMR0;
  _4 = u32VectAdr_29 * 4;
  _5 = _3 + _4;
  _6 ={v} MEM[(volatile uint32 *)_5];
  _7 = 1 << u32VectBit_30;
  _8 = &pBase_27->CIMR0;
  _9 = u32VectAdr_29 * 4;
  _10 = _8 + _9;
  _11 = _6 | _7;
  MEM[(volatile uint32 *)_10] ={v} _11;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_30 ();

  <bb 5> :
  # DEBUG BEGIN_STMT
  _12 = u32Mask_31(D) & 2;
  if (_12 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _13 = u32AdcChanBitmap[u32Instance_26(D)][u32VectAdr_29];
  if (_13 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_28 ();
  # DEBUG BEGIN_STMT
  _14 = &pBase_27->CWENR0;
  _15 = u32VectAdr_29 * 4;
  _16 = _14 + _15;
  _17 ={v} MEM[(volatile uint32 *)_16];
  _18 = 1 << u32VectBit_30;
  _19 = &pBase_27->CWENR0;
  _20 = u32VectAdr_29 * 4;
  _21 = _19 + _20;
  _22 = _17 | _18;
  MEM[(volatile uint32 *)_21] ={v} _22;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_28 ();

  <bb 8> :
  return;

}


Adc_Sar_Ip_DisableNotifications (const uint32 u32Instance, const uint32 u32NotificationMask)
{
  uint32 u32ImrFlags;
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_14 = pAdcBase[u32Instance_13(D)];
  # DEBUG pBase => pBase_14
  # DEBUG BEGIN_STMT
  u32ImrFlags_15 = 0;
  # DEBUG u32ImrFlags => u32ImrFlags_15
  # DEBUG BEGIN_STMT
  _1 = u32NotificationMask_16(D) & 2;
  u32ImrFlags_17 = u32ImrFlags_15 | _1;
  # DEBUG u32ImrFlags => u32ImrFlags_17
  # DEBUG BEGIN_STMT
  _2 = u32NotificationMask_16(D) & 1;
  u32ImrFlags_18 = u32ImrFlags_17 | _2;
  # DEBUG u32ImrFlags => u32ImrFlags_18
  # DEBUG BEGIN_STMT
  _3 = u32NotificationMask_16(D) & 8;
  u32ImrFlags_19 = u32ImrFlags_18 | _3;
  # DEBUG u32ImrFlags => u32ImrFlags_19
  # DEBUG BEGIN_STMT
  _4 = u32NotificationMask_16(D) & 4;
  u32ImrFlags_20 = u32ImrFlags_19 | _4;
  # DEBUG u32ImrFlags => u32ImrFlags_20
  # DEBUG BEGIN_STMT
  _5 = u32AdcFeatureBitmap[u32Instance_13(D)];
  _6 = _5 & 4;
  if (_6 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _7 = u32NotificationMask_16(D) & 16;
  u32ImrFlags_21 = u32ImrFlags_20 | _7;
  # DEBUG u32ImrFlags => u32ImrFlags_21

  <bb 4> :
  # u32ImrFlags_11 = PHI <u32ImrFlags_20(2), u32ImrFlags_21(3)>
  # DEBUG u32ImrFlags => u32ImrFlags_11
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_34 ();
  # DEBUG BEGIN_STMT
  _8 ={v} pBase_14->IMR;
  _9 = ~u32ImrFlags_11;
  _10 = _8 & _9;
  pBase_14->IMR ={v} _10;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_34 ();
  return;

}


Adc_Sar_Ip_EnableNotifications (const uint32 u32Instance, const uint32 u32NotificationMask)
{
  uint32 u32ImrFlags;
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_13 = pAdcBase[u32Instance_12(D)];
  # DEBUG pBase => pBase_13
  # DEBUG BEGIN_STMT
  u32ImrFlags_14 = 0;
  # DEBUG u32ImrFlags => u32ImrFlags_14
  # DEBUG BEGIN_STMT
  _1 = u32NotificationMask_15(D) & 2;
  u32ImrFlags_16 = u32ImrFlags_14 | _1;
  # DEBUG u32ImrFlags => u32ImrFlags_16
  # DEBUG BEGIN_STMT
  _2 = u32NotificationMask_15(D) & 1;
  u32ImrFlags_17 = u32ImrFlags_16 | _2;
  # DEBUG u32ImrFlags => u32ImrFlags_17
  # DEBUG BEGIN_STMT
  _3 = u32NotificationMask_15(D) & 8;
  u32ImrFlags_18 = u32ImrFlags_17 | _3;
  # DEBUG u32ImrFlags => u32ImrFlags_18
  # DEBUG BEGIN_STMT
  _4 = u32NotificationMask_15(D) & 4;
  u32ImrFlags_19 = u32ImrFlags_18 | _4;
  # DEBUG u32ImrFlags => u32ImrFlags_19
  # DEBUG BEGIN_STMT
  _5 = u32AdcFeatureBitmap[u32Instance_12(D)];
  _6 = _5 & 4;
  if (_6 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _7 = u32NotificationMask_15(D) & 16;
  u32ImrFlags_20 = u32ImrFlags_19 | _7;
  # DEBUG u32ImrFlags => u32ImrFlags_20

  <bb 4> :
  # u32ImrFlags_10 = PHI <u32ImrFlags_19(2), u32ImrFlags_20(3)>
  # DEBUG u32ImrFlags => u32ImrFlags_10
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_33 ();
  # DEBUG BEGIN_STMT
  _8 ={v} pBase_13->IMR;
  _9 = u32ImrFlags_10 | _8;
  pBase_13->IMR ={v} _9;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_33 ();
  return;

}


Adc_Sar_Ip_Powerdown (const uint32 u32Instance)
{
  uint32 u32ElapsedTicks;
  uint32 u32CurrentTicks;
  uint32 u32TimeoutTicks;
  uint32 u32Status;
  uint32 u32ExpectedStatus;
  Adc_Sar_Ip_StatusType eStatus;
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _24;
  Adc_Sar_Ip_StatusType _27;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_10 = pAdcBase[u32Instance_9(D)];
  # DEBUG pBase => pBase_10
  # DEBUG BEGIN_STMT
  eStatus_11 = 0;
  # DEBUG eStatus => eStatus_11
  # DEBUG BEGIN_STMT
  u32ExpectedStatus_12 = 1;
  # DEBUG u32ExpectedStatus => u32ExpectedStatus_12
  # DEBUG BEGIN_STMT
  _1 ={v} pBase_10->MSR;
  u32Status_13 = _1 & 7;
  # DEBUG u32Status => u32Status_13
  # DEBUG BEGIN_STMT
  u32TimeoutTicks_15 = OsIf_MicrosToTicks (3000, 0);
  # DEBUG u32TimeoutTicks => u32TimeoutTicks_15
  # DEBUG BEGIN_STMT
  _2 = OsIf_GetCounter (0);
  u32CurrentTicks = _2;
  # DEBUG BEGIN_STMT
  u32ElapsedTicks_18 = 0;
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_18
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_14 ();
  # DEBUG BEGIN_STMT
  Adc_Sar_Powerdown (pBase_10);
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_14 ();
  # DEBUG BEGIN_STMT
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _3 ={v} pBase_10->MSR;
  u32Status_22 = _3 & 7;
  # DEBUG u32Status => u32Status_22
  # DEBUG BEGIN_STMT
  _24 = OsIf_GetElapsed (&u32CurrentTicks, 0);
  u32ElapsedTicks_25 = _24 + u32ElapsedTicks_6;
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_25

  <bb 4> :
  # u32Status_5 = PHI <u32Status_13(2), u32Status_22(3)>
  # u32ElapsedTicks_6 = PHI <u32ElapsedTicks_18(2), u32ElapsedTicks_25(3)>
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_6
  # DEBUG u32Status => u32Status_5
  # DEBUG BEGIN_STMT
  if (u32Status_5 != u32ExpectedStatus_12)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  if (u32ElapsedTicks_6 < u32TimeoutTicks_15)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  if (u32ElapsedTicks_6 >= u32TimeoutTicks_15)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  eStatus_26 = 2;
  # DEBUG eStatus => eStatus_26

  <bb 8> :
  # eStatus_4 = PHI <eStatus_11(6), eStatus_26(7)>
  # DEBUG eStatus => eStatus_4
  # DEBUG BEGIN_STMT
  _27 = eStatus_4;
  u32CurrentTicks ={v} {CLOBBER};
  return _27;

}


Adc_Sar_Ip_Powerup (const uint32 u32Instance)
{
  uint32 u32ElapsedTicks;
  uint32 u32CurrentTicks;
  uint32 u32TimeoutTicks;
  uint32 u32Status;
  uint32 u32ExpectedStatus;
  Adc_Sar_Ip_StatusType eStatus;
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _24;
  Adc_Sar_Ip_StatusType _27;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_10 = pAdcBase[u32Instance_9(D)];
  # DEBUG pBase => pBase_10
  # DEBUG BEGIN_STMT
  eStatus_11 = 0;
  # DEBUG eStatus => eStatus_11
  # DEBUG BEGIN_STMT
  u32ExpectedStatus_12 = 0;
  # DEBUG u32ExpectedStatus => u32ExpectedStatus_12
  # DEBUG BEGIN_STMT
  _1 ={v} pBase_10->MSR;
  u32Status_13 = _1 & 7;
  # DEBUG u32Status => u32Status_13
  # DEBUG BEGIN_STMT
  u32TimeoutTicks_15 = OsIf_MicrosToTicks (3000, 0);
  # DEBUG u32TimeoutTicks => u32TimeoutTicks_15
  # DEBUG BEGIN_STMT
  _2 = OsIf_GetCounter (0);
  u32CurrentTicks = _2;
  # DEBUG BEGIN_STMT
  u32ElapsedTicks_18 = 0;
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_18
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_13 ();
  # DEBUG BEGIN_STMT
  Adc_Sar_Powerup (pBase_10);
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_13 ();
  # DEBUG BEGIN_STMT
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _3 ={v} pBase_10->MSR;
  u32Status_22 = _3 & 7;
  # DEBUG u32Status => u32Status_22
  # DEBUG BEGIN_STMT
  _24 = OsIf_GetElapsed (&u32CurrentTicks, 0);
  u32ElapsedTicks_25 = _24 + u32ElapsedTicks_6;
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_25

  <bb 4> :
  # u32Status_5 = PHI <u32Status_13(2), u32Status_22(3)>
  # u32ElapsedTicks_6 = PHI <u32ElapsedTicks_18(2), u32ElapsedTicks_25(3)>
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_6
  # DEBUG u32Status => u32Status_5
  # DEBUG BEGIN_STMT
  if (u32Status_5 != u32ExpectedStatus_12)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  if (u32ElapsedTicks_6 < u32TimeoutTicks_15)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  if (u32ElapsedTicks_6 >= u32TimeoutTicks_15)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  eStatus_26 = 2;
  # DEBUG eStatus => eStatus_26

  <bb 8> :
  # eStatus_4 = PHI <eStatus_11(6), eStatus_26(7)>
  # DEBUG eStatus => eStatus_4
  # DEBUG BEGIN_STMT
  _27 = eStatus_4;
  u32CurrentTicks ={v} {CLOBBER};
  return _27;

}


Adc_Sar_Ip_DoCalibration (const uint32 u32Instance)
{
  uint32 u32Calbistreg;
  uint32 u32AdcClkSel;
  uint32 u32ElapsedTicks;
  uint32 u32CurrentTicks;
  uint32 u32TimeoutTicks;
  struct ADC_Type * const pBase;
  Adc_Sar_Ip_StatusType eCalStatus;
  Adc_Sar_Ip_StatusType eStatus;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  <unnamed type> _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  long unsigned int _22;
  Adc_Sar_Ip_StatusType _26;
  long unsigned int _59;
  Adc_Sar_Ip_StatusType _72;
  Adc_Sar_Ip_StatusType _73;
  Adc_Sar_Ip_StatusType _74;
  Adc_Sar_Ip_StatusType _75;

  <bb 2> :
  # DEBUG BEGIN_STMT
  eStatus_29 = 0;
  # DEBUG eStatus => eStatus_29
  # DEBUG BEGIN_STMT
  eCalStatus_30 = 0;
  # DEBUG eCalStatus => eCalStatus_30
  # DEBUG BEGIN_STMT
  pBase_33 = pAdcBase[u32Instance_32(D)];
  # DEBUG pBase => pBase_33
  # DEBUG BEGIN_STMT
  u32TimeoutTicks_35 = OsIf_MicrosToTicks (3000, 0);
  # DEBUG u32TimeoutTicks => u32TimeoutTicks_35
  # DEBUG BEGIN_STMT
  _1 = OsIf_GetCounter (0);
  u32CurrentTicks = _1;
  # DEBUG BEGIN_STMT
  u32ElapsedTicks_38 = 0;
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_38
  # DEBUG BEGIN_STMT
  u32AdcClkSel_39 = 0;
  # DEBUG u32AdcClkSel => u32AdcClkSel_39
  # DEBUG BEGIN_STMT
  eStatus_41 = Adc_Sar_Ip_Powerdown (u32Instance_32(D));
  # DEBUG eStatus => eStatus_41
  # DEBUG BEGIN_STMT
  if (eStatus_41 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _75 = eStatus_41;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 19>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_12 ();
  # DEBUG BEGIN_STMT
  _2 ={v} pBase_33->MCR;
  u32AdcClkSel_43 = _2 & 6;
  # DEBUG u32AdcClkSel => u32AdcClkSel_43
  # DEBUG BEGIN_STMT
  _3 ={v} pBase_33->MCR;
  _4 = _3 & 4294967289;
  pBase_33->MCR ={v} _4;
  # DEBUG BEGIN_STMT
  _5 ={v} pBase_33->MCR;
  _6 = aAdcSarState[u32Instance_32(D)].eCalibrationClkSelect;
  _7 = (long unsigned int) _6;
  _8 = _7 << 1;
  _9 = _8 & 6;
  _10 = _5 | _9;
  pBase_33->MCR ={v} _10;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_12 ();
  # DEBUG BEGIN_STMT
  eStatus_48 = Adc_Sar_Ip_Powerup (u32Instance_32(D));
  # DEBUG eStatus => eStatus_48
  # DEBUG BEGIN_STMT
  if (eStatus_48 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _74 = eStatus_48;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 19>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_36 ();
  # DEBUG BEGIN_STMT
  u32Calbistreg_50 ={v} pBase_33->CALBISTREG;
  # DEBUG u32Calbistreg => u32Calbistreg_50
  # DEBUG BEGIN_STMT
  u32Calbistreg_51 = u32Calbistreg_50 & 3892313998;
  # DEBUG u32Calbistreg => u32Calbistreg_51
  # DEBUG BEGIN_STMT
  u32Calbistreg_52 = u32Calbistreg_51 | 112;
  # DEBUG u32Calbistreg => u32Calbistreg_52
  # DEBUG BEGIN_STMT
  pBase_33->CALBISTREG ={v} u32Calbistreg_52;
  # DEBUG BEGIN_STMT
  _11 ={v} pBase_33->CALBISTREG;
  _12 = _11 | 8;
  pBase_33->CALBISTREG ={v} _12;
  # DEBUG BEGIN_STMT
  _13 ={v} pBase_33->CALBISTREG;
  _14 = _13 | 1;
  pBase_33->CALBISTREG ={v} _14;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_36 ();
  # DEBUG BEGIN_STMT
  u32ElapsedTicks_57 = 0;
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_57
  # DEBUG BEGIN_STMT
  goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _59 = OsIf_GetElapsed (&u32CurrentTicks, 0);
  u32ElapsedTicks_60 = _59 + u32ElapsedTicks_25;
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_60

  <bb 8> :
  # u32ElapsedTicks_25 = PHI <u32ElapsedTicks_57(6), u32ElapsedTicks_60(7)>
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_25
  # DEBUG BEGIN_STMT
  _15 ={v} pBase_33->CALBISTREG;
  _16 = _15 & 32768;
  if (_16 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  if (u32ElapsedTicks_25 < u32TimeoutTicks_35)
    goto <bb 7>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  if (u32ElapsedTicks_25 >= u32TimeoutTicks_35)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  eCalStatus_62 = 2;
  # DEBUG eCalStatus => eCalStatus_62
  goto <bb 14>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  _17 ={v} pBase_33->CALBISTREG;
  _18 = _17 & 8;
  if (_18 != 0)
    goto <bb 13>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  eCalStatus_61 = 1;
  # DEBUG eCalStatus => eCalStatus_61

  <bb 14> :
  # eCalStatus_24 = PHI <eCalStatus_62(11), eCalStatus_30(12), eCalStatus_61(13)>
  # DEBUG eCalStatus => eCalStatus_24
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  eStatus_64 = Adc_Sar_Ip_Powerdown (u32Instance_32(D));
  # DEBUG eStatus => eStatus_64
  # DEBUG BEGIN_STMT
  if (eStatus_64 != 0)
    goto <bb 15>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  _73 = eStatus_64;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 19>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_12 ();
  # DEBUG BEGIN_STMT
  _19 ={v} pBase_33->MCR;
  _20 = _19 & 4294967289;
  pBase_33->MCR ={v} _20;
  # DEBUG BEGIN_STMT
  _21 ={v} pBase_33->MCR;
  _22 = u32AdcClkSel_43 | _21;
  pBase_33->MCR ={v} _22;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_12 ();
  # DEBUG BEGIN_STMT
  eStatus_70 = Adc_Sar_Ip_Powerup (u32Instance_32(D));
  # DEBUG eStatus => eStatus_70
  # DEBUG BEGIN_STMT
  if (eCalStatus_24 != 0)
    goto <bb 17>; [INV]
  else
    goto <bb 18>; [INV]

  <bb 17> :
  # DEBUG BEGIN_STMT
  eStatus_71 = eCalStatus_24;
  # DEBUG eStatus => eStatus_71

  <bb 18> :
  # eStatus_23 = PHI <eStatus_70(16), eStatus_71(17)>
  # DEBUG eStatus => eStatus_23
  # DEBUG BEGIN_STMT
  _72 = eStatus_23;

  <bb 19> :
  # _26 = PHI <_75(3), _74(5), _73(15), _72(18)>
  u32CurrentTicks ={v} {CLOBBER};
  return _26;

}


Adc_Sar_Ip_GetConvResult (const uint32 u32Instance, const uint32 u32ChnIdx, const Adc_Sar_Ip_ConvChainType pChainType, struct Adc_Sar_Ip_ChanResultType * const pResult)
{
  uint32 u32Cdr;
  uint32 u32VectBit;
  uint32 u32VectAdr;
  struct ADC_Type * const pBase;
  unsigned char _1;
  const uint32_t * _2;
  long unsigned int _3;
  const uint32_t * _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  _Bool _11;
  short unsigned int _12;
  volatile uint32_t * _13;
  long unsigned int _14;
  volatile uint32_t * _15;
  long unsigned int _16;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_20 = pAdcBase[u32Instance_19(D)];
  # DEBUG pBase => pBase_20
  # DEBUG BEGIN_STMT
  u32VectAdr_22 = u32ChnIdx_21(D) / 32;
  # DEBUG u32VectAdr => u32VectAdr_22
  # DEBUG BEGIN_STMT
  u32VectBit_23 = u32ChnIdx_21(D) & 31;
  # DEBUG u32VectBit => u32VectBit_23
  # DEBUG BEGIN_STMT
  pResult_24(D)->u16ConvData = 0;
  # DEBUG BEGIN_STMT
  _1 = (unsigned char) u32ChnIdx_21(D);
  pResult_24(D)->u8ChnIdx = _1;
  # DEBUG BEGIN_STMT
  pResult_24(D)->bValid = 0;
  # DEBUG BEGIN_STMT
  pResult_24(D)->bOverWritten = 0;
  # DEBUG BEGIN_STMT
  _2 = &pBase_20->PCDR[0];
  _3 = u32ChnIdx_21(D) * 4;
  _4 = _2 + _3;
  u32Cdr_29 ={v} MEM[(volatile uint32 *)_4];
  # DEBUG u32Cdr => u32Cdr_29
  # DEBUG BEGIN_STMT
  _5 = (long unsigned int) pChainType_30(D);
  _6 = _5 << 16;
  _7 = u32Cdr_29 ^ _6;
  _8 = _7 & 196608;
  if (_8 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _9 = u32Cdr_29 & 524288;
  if (_9 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  pResult_24(D)->bValid = 1;
  # DEBUG BEGIN_STMT
  _10 = u32Cdr_29 & 262144;
  _11 = _10 != 0;
  pResult_24(D)->bOverWritten = _11;
  # DEBUG BEGIN_STMT
  _12 = Adc_Sar_GetMaskedResult (u32Instance_19(D), u32Cdr_29);
  pResult_24(D)->u16ConvData = _12;

  <bb 5> :
  # DEBUG BEGIN_STMT
  _13 = &pBase_20->CEOCFR0;
  _14 = u32VectAdr_22 * 4;
  _15 = _13 + _14;
  _16 = 1 << u32VectBit_23;
  MEM[(volatile uint32 *)_15] ={v} _16;
  return;

}


Adc_Sar_Ip_GetConvData (const uint32 u32Instance, const uint32 u32ChnIdx)
{
  uint32 u32Cdr;
  uint32 u32VectBit;
  uint32 u32VectAdr;
  struct ADC_Type * const pBase;
  uint16 u16Result;
  const uint32_t * _1;
  long unsigned int _2;
  const uint32_t * _3;
  long unsigned int _4;
  volatile uint32_t * _5;
  long unsigned int _6;
  volatile uint32_t * _7;
  long unsigned int _8;
  uint16 _22;

  <bb 2> :
  # DEBUG BEGIN_STMT
  u16Result_11 = 0;
  # DEBUG u16Result => u16Result_11
  # DEBUG BEGIN_STMT
  pBase_14 = pAdcBase[u32Instance_13(D)];
  # DEBUG pBase => pBase_14
  # DEBUG BEGIN_STMT
  u32VectAdr_16 = u32ChnIdx_15(D) / 32;
  # DEBUG u32VectAdr => u32VectAdr_16
  # DEBUG BEGIN_STMT
  u32VectBit_17 = u32ChnIdx_15(D) & 31;
  # DEBUG u32VectBit => u32VectBit_17
  # DEBUG BEGIN_STMT
  _1 = &pBase_14->PCDR[0];
  _2 = u32ChnIdx_15(D) * 4;
  _3 = _1 + _2;
  u32Cdr_18 ={v} MEM[(volatile uint32 *)_3];
  # DEBUG u32Cdr => u32Cdr_18
  # DEBUG BEGIN_STMT
  _4 = u32Cdr_18 & 524288;
  if (_4 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  u16Result_20 = Adc_Sar_GetMaskedResult (u32Instance_13(D), u32Cdr_18);
  # DEBUG u16Result => u16Result_20
  # DEBUG BEGIN_STMT
  _5 = &pBase_14->CEOCFR0;
  _6 = u32VectAdr_16 * 4;
  _7 = _5 + _6;
  _8 = 1 << u32VectBit_17;
  MEM[(volatile uint32 *)_7] ={v} _8;

  <bb 4> :
  # u16Result_9 = PHI <u16Result_11(2), u16Result_20(3)>
  # DEBUG u16Result => u16Result_9
  # DEBUG BEGIN_STMT
  _22 = u16Result_9;
  return _22;

}


Adc_Sar_Ip_GetConvResultsToArray (const uint32 u32Instance, const Adc_Sar_Ip_ConvChainType pChainType, const uint32 u32Length, struct Adc_Sar_Ip_ChanResultType * const pResults)
{
  uint32 _7;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _7 = Adc_Sar_GetConvResults (u32Instance_2(D), pChainType_3(D), 0B, pResults_4(D), u32Length_5(D));
  return _7;

}


Adc_Sar_Ip_GetConvDataToArray (const uint32 u32Instance, const Adc_Sar_Ip_ConvChainType pChainType, const uint32 u32Length, uint16 * const pResults)
{
  uint32 _7;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _7 = Adc_Sar_GetConvResults (u32Instance_2(D), pChainType_3(D), pResults_4(D), 0B, u32Length_5(D));
  return _7;

}


Adc_Sar_Ip_SelfTest (const uint32 u32Instance)
{
  uint32 u32ElapsedTicks;
  uint32 u32CurrentTicks;
  uint32 u32TimeoutTicks;
  uint32 u32MsrStatus;
  uint32 u32Reg;
  Adc_Sar_Ip_StatusType eStatus;
  struct ADC_Type * const pBase;
  long unsigned int _1;
  volatile uint32_t * _2;
  long unsigned int _3;
  volatile uint32_t * _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  long unsigned int _61;
  Adc_Sar_Ip_StatusType _67;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_28 = pAdcBase[u32Instance_27(D)];
  # DEBUG pBase => pBase_28
  # DEBUG BEGIN_STMT
  eStatus_29 = 0;
  # DEBUG eStatus => eStatus_29
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  u32TimeoutTicks_31 = OsIf_MicrosToTicks (3000, 0);
  # DEBUG u32TimeoutTicks => u32TimeoutTicks_31
  # DEBUG BEGIN_STMT
  _1 = OsIf_GetCounter (0);
  u32CurrentTicks = _1;
  # DEBUG BEGIN_STMT
  u32ElapsedTicks_34 = 0;
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_34
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_25 ();
  # DEBUG BEGIN_STMT
  _2 = &pBase_28->NCMR0;
  _3 ={v} MEM[(volatile uint32 *)_2];
  _4 = &pBase_28->NCMR0;
  _5 = _3 | 1;
  MEM[(volatile uint32 *)_4] ={v} _5;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_25 ();
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_11 ();
  # DEBUG BEGIN_STMT
  _6 ={v} pBase_28->MCR;
  _7 = _6 & 4294836223;
  pBase_28->MCR ={v} _7;
  # DEBUG BEGIN_STMT
  _8 ={v} pBase_28->MCR;
  _9 = _8 | 536870912;
  pBase_28->MCR ={v} _9;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_11 ();
  # DEBUG BEGIN_STMT
  u32Reg_42 = 0;
  # DEBUG u32Reg => u32Reg_42
  # DEBUG BEGIN_STMT
  u32Reg_43 = u32Reg_42 | 268439552;
  # DEBUG u32Reg => u32Reg_43
  # DEBUG BEGIN_STMT
  pBase_28->STCR1 ={v} u32Reg_43;
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_35 ();
  # DEBUG BEGIN_STMT
  _10 ={v} pBase_28->STCR3;
  _11 = _10 | 768;
  pBase_28->STCR3 ={v} _11;
  # DEBUG BEGIN_STMT
  _12 ={v} pBase_28->STCR2;
  _13 = _12 | 128;
  pBase_28->STCR2 ={v} _13;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_35 ();
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_11 ();
  # DEBUG BEGIN_STMT
  _14 ={v} pBase_28->MCR;
  _15 = _14 | 16777216;
  pBase_28->MCR ={v} _15;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_11 ();
  # DEBUG BEGIN_STMT
  eStatus_53 = Adc_Sar_CheckSelfTestProgress (u32Instance_27(D));
  # DEBUG eStatus => eStatus_53
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_11 ();
  # DEBUG BEGIN_STMT
  _16 ={v} pBase_28->MCR;
  _17 = _16 & 4278190079;
  pBase_28->MCR ={v} _17;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_11 ();
  # DEBUG BEGIN_STMT
  _18 ={v} pBase_28->MSR;
  u32MsrStatus_57 = _18 & 7;
  # DEBUG u32MsrStatus => u32MsrStatus_57
  # DEBUG BEGIN_STMT
  u32ElapsedTicks_58 = 0;
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_58
  # DEBUG BEGIN_STMT
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _19 ={v} pBase_28->MSR;
  u32MsrStatus_59 = _19 & 7;
  # DEBUG u32MsrStatus => u32MsrStatus_59
  # DEBUG BEGIN_STMT
  _61 = OsIf_GetElapsed (&u32CurrentTicks, 0);
  u32ElapsedTicks_62 = _61 + u32ElapsedTicks_24;
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_62

  <bb 4> :
  # u32MsrStatus_23 = PHI <u32MsrStatus_57(2), u32MsrStatus_59(3)>
  # u32ElapsedTicks_24 = PHI <u32ElapsedTicks_58(2), u32ElapsedTicks_62(3)>
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_24
  # DEBUG u32MsrStatus => u32MsrStatus_23
  # DEBUG BEGIN_STMT
  if (u32MsrStatus_23 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  if (u32ElapsedTicks_24 < u32TimeoutTicks_31)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_35 ();
  # DEBUG BEGIN_STMT
  _20 ={v} pBase_28->STCR2;
  _21 = _20 & 4294967167;
  pBase_28->STCR2 ={v} _21;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_35 ();
  # DEBUG BEGIN_STMT
  if (u32ElapsedTicks_24 >= u32TimeoutTicks_31)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  eStatus_66 = 2;
  # DEBUG eStatus => eStatus_66

  <bb 8> :
  # eStatus_22 = PHI <eStatus_53(6), eStatus_66(7)>
  # DEBUG eStatus => eStatus_22
  # DEBUG BEGIN_STMT
  _67 = eStatus_22;
  u32CurrentTicks ={v} {CLOBBER};
  return _67;

}


Adc_Sar_Ip_ClearStatusFlags (const uint32 u32Instance, const uint32 u32Mask)
{
  uint32 u32IsrFlags;
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_11 = pAdcBase[u32Instance_10(D)];
  # DEBUG pBase => pBase_11
  # DEBUG BEGIN_STMT
  u32IsrFlags_12 = 0;
  # DEBUG u32IsrFlags => u32IsrFlags_12
  # DEBUG BEGIN_STMT
  _1 = u32Mask_13(D) & 2;
  u32IsrFlags_14 = u32IsrFlags_12 | _1;
  # DEBUG u32IsrFlags => u32IsrFlags_14
  # DEBUG BEGIN_STMT
  _2 = u32Mask_13(D) & 1;
  u32IsrFlags_15 = u32IsrFlags_14 | _2;
  # DEBUG u32IsrFlags => u32IsrFlags_15
  # DEBUG BEGIN_STMT
  _3 = u32Mask_13(D) & 8;
  u32IsrFlags_16 = u32IsrFlags_15 | _3;
  # DEBUG u32IsrFlags => u32IsrFlags_16
  # DEBUG BEGIN_STMT
  _4 = u32Mask_13(D) & 4;
  u32IsrFlags_17 = u32IsrFlags_16 | _4;
  # DEBUG u32IsrFlags => u32IsrFlags_17
  # DEBUG BEGIN_STMT
  _5 = u32AdcFeatureBitmap[u32Instance_10(D)];
  _6 = _5 & 4;
  if (_6 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _7 = u32Mask_13(D) & 16;
  u32IsrFlags_18 = u32IsrFlags_17 | _7;
  # DEBUG u32IsrFlags => u32IsrFlags_18

  <bb 4> :
  # u32IsrFlags_8 = PHI <u32IsrFlags_17(2), u32IsrFlags_18(3)>
  # DEBUG u32IsrFlags => u32IsrFlags_8
  # DEBUG BEGIN_STMT
  pBase_11->ISR ={v} u32IsrFlags_8;
  return;

}


Adc_Sar_Ip_GetStatusFlags (const uint32 u32Instance)
{
  uint32 u32Flags;
  long unsigned int _5;
  long unsigned int _8;
  uint32 _10;

  <bb 2> :
  # DEBUG BEGIN_STMT
  u32Flags_1 = 0;
  # DEBUG u32Flags => u32Flags_1
  # DEBUG BEGIN_STMT
  _5 = Adc_Sar_GetMsrFlags (u32Instance_3(D));
  u32Flags_6 = _5 | u32Flags_1;
  # DEBUG u32Flags => u32Flags_6
  # DEBUG BEGIN_STMT
  _8 = Adc_Sar_GetIsrFlags (u32Instance_3(D));
  u32Flags_9 = _8 | u32Flags_6;
  # DEBUG u32Flags => u32Flags_9
  # DEBUG BEGIN_STMT
  _10 = u32Flags_9;
  return _10;

}


Adc_Sar_Ip_StartConversion (const uint32 u32Instance, const Adc_Sar_Ip_ConvChainType pChainType)
{
  struct ADC_Type * const pBase;
  int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_9 = pAdcBase[u32Instance_8(D)];
  # DEBUG pBase => pBase_9
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_10 ();
  # DEBUG BEGIN_STMT
  _1 = (int) pChainType_11(D);
  switch (_1) <default: <L4> [INV], case 0: <L0> [INV], case 1: <L1> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  _2 ={v} pBase_9->MCR;
  _3 = _2 | 16777216;
  pBase_9->MCR ={v} _3;
  # DEBUG BEGIN_STMT
  goto <bb 5>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  _4 ={v} pBase_9->MCR;
  _5 = _4 | 1048576;
  pBase_9->MCR ={v} _5;
  # DEBUG BEGIN_STMT

  <bb 5> :
<L4>:
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_10 ();
  return;

}


Adc_Sar_Ip_SetResolution (const uint32 u32Instance, const Adc_Sar_Ip_Resolution eResolution)
{
  uint32 u32Calbistreg;
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_5 = pAdcBase[u32Instance_4(D)];
  # DEBUG pBase => pBase_5
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_37 ();
  # DEBUG BEGIN_STMT
  u32Calbistreg_7 ={v} pBase_5->CALBISTREG;
  # DEBUG u32Calbistreg => u32Calbistreg_7
  # DEBUG BEGIN_STMT
  u32Calbistreg_8 = u32Calbistreg_7 & 536870911;
  # DEBUG u32Calbistreg => u32Calbistreg_8
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) eResolution_9(D);
  _2 = _1 << 29;
  u32Calbistreg_10 = u32Calbistreg_8 | _2;
  # DEBUG u32Calbistreg => u32Calbistreg_10
  # DEBUG BEGIN_STMT
  pBase_5->CALBISTREG ={v} u32Calbistreg_10;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_37 ();
  return;

}


Adc_Sar_Ip_DisableChannel (const uint32 u32Instance, const Adc_Sar_Ip_ConvChainType pChainType, const uint32 u32ChnIdx)
{
  uint32 u32VectBit;
  uint32 u32VectAdr;
  struct ADC_Type * const pBase;
  int _1;
  volatile uint32_t * _2;
  long unsigned int _3;
  volatile uint32_t * _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  volatile uint32_t * _8;
  long unsigned int _9;
  volatile uint32_t * _10;
  long unsigned int _11;
  volatile uint32_t * _12;
  long unsigned int _13;
  volatile uint32_t * _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  volatile uint32_t * _18;
  long unsigned int _19;
  volatile uint32_t * _20;
  long unsigned int _21;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_25 = pAdcBase[u32Instance_24(D)];
  # DEBUG pBase => pBase_25
  # DEBUG BEGIN_STMT
  u32VectAdr_27 = u32ChnIdx_26(D) / 32;
  # DEBUG u32VectAdr => u32VectAdr_27
  # DEBUG BEGIN_STMT
  u32VectBit_28 = u32ChnIdx_26(D) & 31;
  # DEBUG u32VectBit => u32VectBit_28
  # DEBUG BEGIN_STMT
  _1 = (int) pChainType_29(D);
  switch (_1) <default: <L4> [INV], case 0: <L0> [INV], case 1: <L1> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_24 ();
  # DEBUG BEGIN_STMT
  _2 = &pBase_25->NCMR0;
  _3 = u32VectAdr_27 * 4;
  _4 = _2 + _3;
  _5 ={v} MEM[(volatile uint32 *)_4];
  _6 = 1 << u32VectBit_28;
  _7 = ~_6;
  _8 = &pBase_25->NCMR0;
  _9 = u32VectAdr_27 * 4;
  _10 = _8 + _9;
  _11 = _5 & _7;
  MEM[(volatile uint32 *)_10] ={v} _11;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_24 ();
  # DEBUG BEGIN_STMT
  goto <bb 5>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_27 ();
  # DEBUG BEGIN_STMT
  _12 = &pBase_25->JCMR0;
  _13 = u32VectAdr_27 * 4;
  _14 = _12 + _13;
  _15 ={v} MEM[(volatile uint32 *)_14];
  _16 = 1 << u32VectBit_28;
  _17 = ~_16;
  _18 = &pBase_25->JCMR0;
  _19 = u32VectAdr_27 * 4;
  _20 = _18 + _19;
  _21 = _15 & _17;
  MEM[(volatile uint32 *)_20] ={v} _21;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_27 ();
  # DEBUG BEGIN_STMT

  <bb 5> :
<L4>:
  return;

}


Adc_Sar_Ip_EnableChannel (const uint32 u32Instance, const Adc_Sar_Ip_ConvChainType pChainType, const uint32 u32ChnIdx)
{
  uint32 u32VectBit;
  uint32 u32VectAdr;
  struct ADC_Type * const pBase;
  int _1;
  volatile uint32_t * _2;
  long unsigned int _3;
  volatile uint32_t * _4;
  long unsigned int _5;
  long unsigned int _6;
  volatile uint32_t * _7;
  long unsigned int _8;
  volatile uint32_t * _9;
  long unsigned int _10;
  volatile uint32_t * _11;
  long unsigned int _12;
  volatile uint32_t * _13;
  long unsigned int _14;
  long unsigned int _15;
  volatile uint32_t * _16;
  long unsigned int _17;
  volatile uint32_t * _18;
  long unsigned int _19;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_23 = pAdcBase[u32Instance_22(D)];
  # DEBUG pBase => pBase_23
  # DEBUG BEGIN_STMT
  u32VectAdr_25 = u32ChnIdx_24(D) / 32;
  # DEBUG u32VectAdr => u32VectAdr_25
  # DEBUG BEGIN_STMT
  u32VectBit_26 = u32ChnIdx_24(D) & 31;
  # DEBUG u32VectBit => u32VectBit_26
  # DEBUG BEGIN_STMT
  _1 = (int) pChainType_27(D);
  switch (_1) <default: <L4> [INV], case 0: <L0> [INV], case 1: <L1> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_23 ();
  # DEBUG BEGIN_STMT
  _2 = &pBase_23->NCMR0;
  _3 = u32VectAdr_25 * 4;
  _4 = _2 + _3;
  _5 ={v} MEM[(volatile uint32 *)_4];
  _6 = 1 << u32VectBit_26;
  _7 = &pBase_23->NCMR0;
  _8 = u32VectAdr_25 * 4;
  _9 = _7 + _8;
  _10 = _5 | _6;
  MEM[(volatile uint32 *)_9] ={v} _10;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_23 ();
  # DEBUG BEGIN_STMT
  goto <bb 5>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_26 ();
  # DEBUG BEGIN_STMT
  _11 = &pBase_23->JCMR0;
  _12 = u32VectAdr_25 * 4;
  _13 = _11 + _12;
  _14 ={v} MEM[(volatile uint32 *)_13];
  _15 = 1 << u32VectBit_26;
  _16 = &pBase_23->JCMR0;
  _17 = u32VectAdr_25 * 4;
  _18 = _16 + _17;
  _19 = _14 | _15;
  MEM[(volatile uint32 *)_18] ={v} _19;
  # DEBUG BEGIN_STMT
  SchM_Exit_Adc_ADC_EXCLUSIVE_AREA_26 ();
  # DEBUG BEGIN_STMT

  <bb 5> :
<L4>:
  return;

}


Adc_Sar_Ip_ChainConfig (const uint32 u32Instance, const struct Adc_Sar_Ip_ChansIdxMaskType * const pChansIdxMask, const Adc_Sar_Ip_ConvChainType pChainType)
{
  uint8 u8Index;
  struct ADC_Type * const pBase;
  int _1;
  int _2;
  long unsigned int _3;
  int _4;
  volatile uint32_t * _5;
  unsigned int _6;
  unsigned int _7;
  volatile uint32_t * _8;
  long unsigned int _9;
  unsigned char u8Index.18_10;
  int _11;
  long unsigned int _12;
  int _13;
  volatile uint32_t * _14;
  unsigned int _15;
  unsigned int _16;
  volatile uint32_t * _17;
  long unsigned int _18;
  unsigned char u8Index.19_19;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_29 = pAdcBase[u32Instance_28(D)];
  # DEBUG pBase => pBase_29
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (int) pChainType_30(D);
  switch (_1) <default: <L16> [INV], case 0: <L0> [INV], case 1: <L7> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  u8Index_35 = 0;
  # DEBUG u8Index => u8Index_35
  goto <bb 8>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _2 = (int) u8Index_20;
  _3 = u32AdcChanBitmap[u32Instance_28(D)][_2];
  if (_3 == 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _4 = (int) u8Index_20;
  _5 = &pBase_29->NCMR0;
  _6 = (unsigned int) u8Index_20;
  _7 = _6 * 4;
  _8 = _5 + _7;
  _9 = pChansIdxMask_32(D)->aChanMask[_4];
  MEM[(volatile uint32 *)_8] ={v} _9;

  <bb 7> :
  # DEBUG BEGIN_STMT
  u8Index.18_10 = u8Index_20;
  u8Index_37 = u8Index.18_10 + 1;
  # DEBUG u8Index => u8Index_37

  <bb 8> :
  # u8Index_20 = PHI <u8Index_35(3), u8Index_37(7)>
  # DEBUG u8Index => u8Index_20
  # DEBUG BEGIN_STMT
  if (u8Index_20 <= 2)
    goto <bb 4>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 9> :
<L7>:
  # DEBUG BEGIN_STMT
  u8Index_31 = 0;
  # DEBUG u8Index => u8Index_31
  goto <bb 14>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _11 = (int) u8Index_21;
  _12 = u32AdcChanBitmap[u32Instance_28(D)][_11];
  if (_12 == 0)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 13>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  _13 = (int) u8Index_21;
  _14 = &pBase_29->JCMR0;
  _15 = (unsigned int) u8Index_21;
  _16 = _15 * 4;
  _17 = _14 + _16;
  _18 = pChansIdxMask_32(D)->aChanMask[_13];
  MEM[(volatile uint32 *)_17] ={v} _18;

  <bb 13> :
  # DEBUG BEGIN_STMT
  u8Index.19_19 = u8Index_21;
  u8Index_34 = u8Index.19_19 + 1;
  # DEBUG u8Index => u8Index_34

  <bb 14> :
  # u8Index_21 = PHI <u8Index_31(9), u8Index_34(13)>
  # DEBUG u8Index => u8Index_21
  # DEBUG BEGIN_STMT
  if (u8Index_21 <= 2)
    goto <bb 10>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 15> :
<L16>:
  return;

}


Adc_Sar_Ip_Deinit (const uint32 u32Instance)
{
  struct ADC_Type * const pBase;
  Adc_Sar_Ip_StatusType eStatus;
  struct Adc_Sar_Ip_ConfigType pDefaultConfig;
  uint8 u8Index;
  int _1;
  int _2;
  unsigned char u8Index.12_3;
  int _4;
  long unsigned int _5;
  volatile uint32_t * _6;
  unsigned int _7;
  unsigned int _8;
  volatile uint32_t * _9;
  int _10;
  long unsigned int _11;
  volatile uint32_t * _12;
  unsigned int _13;
  unsigned int _14;
  volatile uint32_t * _15;
  int _16;
  long unsigned int _17;
  volatile uint32_t * _18;
  unsigned int _19;
  unsigned int _20;
  volatile uint32_t * _21;
  unsigned char u8Index.13_22;
  Adc_Sar_Ip_StatusType _25;
  Adc_Sar_Ip_StatusType _74;
  Adc_Sar_Ip_StatusType _79;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pBase_34 = pAdcBase[u32Instance_33(D)];
  # DEBUG pBase => pBase_34
  # DEBUG BEGIN_STMT
  pDefaultConfig.eConvMode = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.eClkSelect = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.eCalibrationClkSelect = 1;
  # DEBUG BEGIN_STMT
  pDefaultConfig.eCtuMode = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.eInjectedEdge = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.eExtTrigger = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.bNormalExtTrgEn = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.bNormalAuxExtTrgEn = 0;
  # DEBUG BEGIN_STMT
  u8Index_43 = 0;
  # DEBUG u8Index => u8Index_43
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = (int) u8Index_23;
  pDefaultConfig.aSampleTime[_1] = 22;
  # DEBUG BEGIN_STMT
  _2 = (int) u8Index_23;
  pDefaultConfig.aPresamplingSource[_2] = 0;
  # DEBUG BEGIN_STMT
  u8Index.12_3 = u8Index_23;
  u8Index_83 = u8Index.12_3 + 1;
  # DEBUG u8Index => u8Index_83

  <bb 4> :
  # u8Index_23 = PHI <u8Index_43(2), u8Index_83(3)>
  # DEBUG u8Index => u8Index_23
  # DEBUG BEGIN_STMT
  if (u8Index_23 <= 2)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  pDefaultConfig.bBypassSampling = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.bAutoClockOff = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.bOverwriteEnable = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.eDataAlign = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.u16DecodeDelay = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.u8PowerDownDelay = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.bAvgEn = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.eAvgSel = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.u8UsrOffset = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.u16UsrGain = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.eDmaClearSource = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.u8NumChannels = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.pChannelConfigs = 0B;
  # DEBUG BEGIN_STMT
  pDefaultConfig.u8NumWdgThresholds = 0;
  # DEBUG BEGIN_STMT
  pDefaultConfig.pWdgThresholds = 0B;
  # DEBUG BEGIN_STMT
  pDefaultConfig.pfEndOfNormalChainNotification = 0B;
  # DEBUG BEGIN_STMT
  pDefaultConfig.pfEndOfInjectedChainNotification = 0B;
  # DEBUG BEGIN_STMT
  pDefaultConfig.pfEndOfCtuConversionNotification = 0B;
  # DEBUG BEGIN_STMT
  pDefaultConfig.pfEndOfConvNotification = 0B;
  # DEBUG BEGIN_STMT
  pDefaultConfig.pfWdgOutOfRangeNotification = 0B;
  # DEBUG BEGIN_STMT
  eStatus_65 = Adc_Sar_Ip_Init (u32Instance_33(D), &pDefaultConfig);
  # DEBUG eStatus => eStatus_65
  # DEBUG BEGIN_STMT
  if (eStatus_65 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _79 = eStatus_65;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 17>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  u8Index_66 = 0;
  # DEBUG u8Index => u8Index_66
  goto <bb 15>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _4 = (int) u8Index_24;
  _5 = u32AdcChanBitmap[u32Instance_33(D)][_4];
  if (_5 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _6 = &pBase_34->CIMR0;
  _7 = (unsigned int) u8Index_24;
  _8 = _7 * 4;
  _9 = _6 + _8;
  MEM[(volatile uint32 *)_9] ={v} 0;

  <bb 10> :
  # DEBUG BEGIN_STMT
  _10 = (int) u8Index_24;
  _11 = u32AdcChanBitmap[u32Instance_33(D)][_10];
  if (_11 != 0)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _12 = &pBase_34->CEOCFR0;
  _13 = (unsigned int) u8Index_24;
  _14 = _13 * 4;
  _15 = _12 + _14;
  MEM[(volatile uint32 *)_15] ={v} 4294967295;

  <bb 12> :
  # DEBUG BEGIN_STMT
  _16 = (int) u8Index_24;
  _17 = u32AdcChanBitmap[u32Instance_33(D)][_16];
  if (_17 != 0)
    goto <bb 13>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  _18 = &pBase_34->PSR0;
  _19 = (unsigned int) u8Index_24;
  _20 = _19 * 4;
  _21 = _18 + _20;
  MEM[(volatile uint32 *)_21] ={v} 0;

  <bb 14> :
  # DEBUG BEGIN_STMT
  u8Index.13_22 = u8Index_24;
  u8Index_78 = u8Index.13_22 + 1;
  # DEBUG u8Index => u8Index_78

  <bb 15> :
  # u8Index_24 = PHI <u8Index_66(7), u8Index_78(14)>
  # DEBUG u8Index => u8Index_24
  # DEBUG BEGIN_STMT
  if (u8Index_24 <= 2)
    goto <bb 8>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  Adc_Sar_ResetWdog (u32Instance_33(D));
  # DEBUG BEGIN_STMT
  pBase_34->WTIMR ={v} 0;
  # DEBUG BEGIN_STMT
  Adc_Sar_Ip_ClearStatusFlags (u32Instance_33(D), 31);
  # DEBUG BEGIN_STMT
  Adc_Sar_Ip_SetResolution (u32Instance_33(D), 1);
  # DEBUG BEGIN_STMT
  aAdcSarState[u32Instance_33(D)].bInit = 0;
  # DEBUG BEGIN_STMT
  eStatus_73 = Adc_Sar_Ip_Powerdown (u32Instance_33(D));
  # DEBUG eStatus => eStatus_73
  # DEBUG BEGIN_STMT
  _74 = eStatus_73;

  <bb 17> :
  # _25 = PHI <_79(6), _74(16)>
  pDefaultConfig ={v} {CLOBBER};
  return _25;

}


Adc_Sar_Ip_Init (const uint32 u32Instance, const struct Adc_Sar_Ip_ConfigType * const pConfig)
{
  uint8 u8Index;
  struct ADC_Type * const pBase;
  Adc_Sar_Ip_StatusType eStatus;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  <unnamed type> _4;
  long unsigned int _5;
  unsigned char _6;
  volatile uint32_t * _7;
  long unsigned int _8;
  long unsigned int _9;
  unsigned char _10;
  volatile uint32_t * _11;
  volatile uint32_t * _12;
  long unsigned int _13;
  long unsigned int _14;
  unsigned char _15;
  volatile uint32_t * _16;
  volatile uint32_t * _17;
  long unsigned int _18;
  unsigned char _19;
  long unsigned int _20;
  long unsigned int _21;
  long unsigned int _22;
  short unsigned int _23;
  long unsigned int _24;
  int _25;
  long unsigned int _26;
  int _27;
  volatile uint32_t * _28;
  unsigned int _29;
  unsigned int _30;
  volatile uint32_t * _31;
  long unsigned int _32;
  unsigned char u8Index.0_33;
  int _34;
  long unsigned int _35;
  int _36;
  volatile uint32_t * _37;
  unsigned int _38;
  unsigned int _39;
  volatile uint32_t * _40;
  long unsigned int _41;
  unsigned char u8Index.1_42;
  <unnamed type> _43;
  const struct Adc_Sar_Ip_WdgThresholdType * _44;
  unsigned char _45;
  const struct Adc_Sar_Ip_WdgThresholdType * _46;
  unsigned int _47;
  unsigned int _48;
  const struct Adc_Sar_Ip_WdgThresholdType * _49;
  unsigned char _50;
  const struct Adc_Sar_Ip_WdgThresholdType * _51;
  unsigned int _52;
  unsigned int _53;
  const struct Adc_Sar_Ip_WdgThresholdType * _54;
  unsigned char u8Index.2_55;
  unsigned char _56;
  const struct Adc_Sar_Ip_ChanConfigType * _57;
  unsigned char _58;
  const struct Adc_Sar_Ip_ChanConfigType * _59;
  unsigned char _60;
  long unsigned int _61;
  long unsigned int _62;
  long unsigned int _63;
  _Bool _64;
  long unsigned int _65;
  <unnamed type> _66;
  <unnamed type> _67;
  <unnamed type> _68;
  void (*<T34c>) (void) _69;
  void (*<T34c>) (void) _70;
  void (*<T34c>) (void) _71;
  void (*<T34d>) (uint16) _72;
  void (*<T34d>) (uint16) _73;
  <unnamed type> _74;
  <unnamed type> _75;
  unsigned char _76;
  long unsigned int _77;
  short unsigned int _78;
  long unsigned int _79;
  long unsigned int _80;
  long unsigned int _81;
  long unsigned int _82;
  Adc_Sar_Ip_StatusType _86;
  long unsigned int iftmp.3_87;
  long unsigned int iftmp.3_128;
  long unsigned int iftmp.3_129;
  Adc_Sar_Ip_StatusType _143;
  Adc_Sar_Ip_StatusType _148;
  Adc_Sar_Ip_StatusType _149;

  <bb 2> :
  # DEBUG BEGIN_STMT
  eStatus_100 = 0;
  # DEBUG eStatus => eStatus_100
  # DEBUG BEGIN_STMT
  pBase_103 = pAdcBase[u32Instance_102(D)];
  # DEBUG pBase => pBase_103
  # DEBUG BEGIN_STMT
  u8Index_104 = 0;
  # DEBUG u8Index => u8Index_104
  # DEBUG BEGIN_STMT
  Adc_Sar_Ip_AbortChain (u32Instance_102(D), 1, 0);
  # DEBUG BEGIN_STMT
  _1 ={v} pBase_103->MCR;
  _2 = _1 & 4294836223;
  pBase_103->MCR ={v} _2;
  # DEBUG BEGIN_STMT
  eStatus_108 = Adc_Sar_Ip_Powerdown (u32Instance_102(D));
  # DEBUG eStatus => eStatus_108
  # DEBUG BEGIN_STMT
  if (eStatus_108 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _149 = eStatus_108;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 38>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _3 = Adc_Sar_CollectMcrMasks (u32Instance_102(D), pConfig_109(D));
  pBase_103->MCR ={v} _3;
  # DEBUG BEGIN_STMT
  _4 = pConfig_109(D)->eDataAlign;
  aAdcSarState[u32Instance_102(D)].eDataAlign = _4;
  # DEBUG BEGIN_STMT
  eStatus_114 = Adc_Sar_Ip_Powerup (u32Instance_102(D));
  # DEBUG eStatus => eStatus_114
  # DEBUG BEGIN_STMT
  if (eStatus_114 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _148 = eStatus_114;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 38>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _5 = u32AdcChanBitmap[u32Instance_102(D)][0];
  if (_5 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _6 = pConfig_109(D)->aSampleTime[0];
  _7 = &pBase_103->CTR0;
  _8 = (long unsigned int) _6;
  MEM[(volatile uint32 *)_7] ={v} _8;

  <bb 8> :
  # DEBUG BEGIN_STMT
  _9 = u32AdcChanBitmap[u32Instance_102(D)][1];
  if (_9 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _10 = pConfig_109(D)->aSampleTime[1];
  _11 = &pBase_103->CTR0;
  _12 = _11 + 4;
  _13 = (long unsigned int) _10;
  MEM[(volatile uint32 *)_12] ={v} _13;

  <bb 10> :
  # DEBUG BEGIN_STMT
  _14 = u32AdcChanBitmap[u32Instance_102(D)][2];
  if (_14 != 0)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _15 = pConfig_109(D)->aSampleTime[2];
  _16 = &pBase_103->CTR0;
  _17 = _16 + 8;
  _18 = (long unsigned int) _15;
  MEM[(volatile uint32 *)_17] ={v} _18;

  <bb 12> :
  # DEBUG BEGIN_STMT
  _19 = pConfig_109(D)->u8PowerDownDelay;
  _20 = (long unsigned int) _19;
  pBase_103->PDEDR ={v} _20;
  # DEBUG BEGIN_STMT
  _21 = u32AdcFeatureBitmap[u32Instance_102(D)];
  _22 = _21 & 1;
  if (_22 != 0)
    goto <bb 13>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  _23 = pConfig_109(D)->u16DecodeDelay;
  _24 = (long unsigned int) _23;
  pBase_103->DSDR ={v} _24;

  <bb 14> :
  # DEBUG BEGIN_STMT
  u8Index_120 = 0;
  # DEBUG u8Index => u8Index_120
  goto <bb 19>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  _25 = (int) u8Index_83;
  _26 = u32AdcChanBitmap[u32Instance_102(D)][_25];
  if (_26 == 0)
    goto <bb 16>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 18>; [INV]

  <bb 17> :
  # DEBUG BEGIN_STMT
  _27 = (int) u8Index_83;
  _28 = &pBase_103->NCMR0;
  _29 = (unsigned int) u8Index_83;
  _30 = _29 * 4;
  _31 = _28 + _30;
  _32 = pConfig_109(D)->pChanMaskNormal[_27];
  MEM[(volatile uint32 *)_31] ={v} _32;

  <bb 18> :
  # DEBUG BEGIN_STMT
  u8Index.0_33 = u8Index_83;
  u8Index_147 = u8Index.0_33 + 1;
  # DEBUG u8Index => u8Index_147

  <bb 19> :
  # u8Index_83 = PHI <u8Index_120(14), u8Index_147(18)>
  # DEBUG u8Index => u8Index_83
  # DEBUG BEGIN_STMT
  if (u8Index_83 <= 2)
    goto <bb 15>; [INV]
  else
    goto <bb 20>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  u8Index_121 = 0;
  # DEBUG u8Index => u8Index_121
  goto <bb 25>; [INV]

  <bb 21> :
  # DEBUG BEGIN_STMT
  _34 = (int) u8Index_84;
  _35 = u32AdcChanBitmap[u32Instance_102(D)][_34];
  if (_35 == 0)
    goto <bb 22>; [INV]
  else
    goto <bb 23>; [INV]

  <bb 22> :
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 24>; [INV]

  <bb 23> :
  # DEBUG BEGIN_STMT
  _36 = (int) u8Index_84;
  _37 = &pBase_103->JCMR0;
  _38 = (unsigned int) u8Index_84;
  _39 = _38 * 4;
  _40 = _37 + _39;
  _41 = pConfig_109(D)->pChanMaskInjected[_36];
  MEM[(volatile uint32 *)_40] ={v} _41;

  <bb 24> :
  # DEBUG BEGIN_STMT
  u8Index.1_42 = u8Index_84;
  u8Index_145 = u8Index.1_42 + 1;
  # DEBUG u8Index => u8Index_145

  <bb 25> :
  # u8Index_84 = PHI <u8Index_121(20), u8Index_145(24)>
  # DEBUG u8Index => u8Index_84
  # DEBUG BEGIN_STMT
  if (u8Index_84 <= 2)
    goto <bb 21>; [INV]
  else
    goto <bb 26>; [INV]

  <bb 26> :
  # DEBUG BEGIN_STMT
  _43 = pConfig_109(D)->eAdcResolution;
  Adc_Sar_Ip_SetResolution (u32Instance_102(D), _43);
  # DEBUG BEGIN_STMT
  _44 = pConfig_109(D)->pWdgThresholds;
  if (_44 != 0B)
    goto <bb 27>; [INV]
  else
    goto <bb 31>; [INV]

  <bb 27> :
  _45 = pConfig_109(D)->u8NumWdgThresholds;
  if (_45 != 0)
    goto <bb 28>; [INV]
  else
    goto <bb 31>; [INV]

  <bb 28> :
  # DEBUG BEGIN_STMT
  u8Index_123 = 0;
  # DEBUG u8Index => u8Index_123
  goto <bb 30>; [INV]

  <bb 29> :
  # DEBUG BEGIN_STMT
  _46 = pConfig_109(D)->pWdgThresholds;
  _47 = (unsigned int) u8Index_85;
  _48 = _47 * 8;
  _49 = _46 + _48;
  _50 = _49->u8WdgIndex;
  _51 = pConfig_109(D)->pWdgThresholds;
  _52 = (unsigned int) u8Index_85;
  _53 = _52 * 8;
  _54 = _51 + _53;
  Adc_Sar_Ip_SetWdgThreshold (u32Instance_102(D), _50, _54);
  # DEBUG BEGIN_STMT
  u8Index.2_55 = u8Index_85;
  u8Index_125 = u8Index.2_55 + 1;
  # DEBUG u8Index => u8Index_125

  <bb 30> :
  # u8Index_85 = PHI <u8Index_123(28), u8Index_125(29)>
  # DEBUG u8Index => u8Index_85
  # DEBUG BEGIN_STMT
  _56 = pConfig_109(D)->u8NumWdgThresholds;
  if (u8Index_85 < _56)
    goto <bb 29>; [INV]
  else
    goto <bb 31>; [INV]

  <bb 31> :
  # DEBUG BEGIN_STMT
  _57 = pConfig_109(D)->pChannelConfigs;
  if (_57 != 0B)
    goto <bb 32>; [INV]
  else
    goto <bb 34>; [INV]

  <bb 32> :
  _58 = pConfig_109(D)->u8NumChannels;
  if (_58 != 0)
    goto <bb 33>; [INV]
  else
    goto <bb 34>; [INV]

  <bb 33> :
  # DEBUG BEGIN_STMT
  _59 = pConfig_109(D)->pChannelConfigs;
  _60 = pConfig_109(D)->u8NumChannels;
  Adc_Sar_EnableChannelWatchdog (u32Instance_102(D), _59, _60);

  <bb 34> :
  # DEBUG BEGIN_STMT
  _61 ={v} pBase_103->PSCR;
  _62 = _61 & 4294967294;
  pBase_103->PSCR ={v} _62;
  # DEBUG BEGIN_STMT
  _63 ={v} pBase_103->PSCR;
  _64 = pConfig_109(D)->bBypassSampling;
  if (_64 != 0)
    goto <bb 35>; [INV]
  else
    goto <bb 36>; [INV]

  <bb 35> :
  iftmp.3_129 = 1;
  goto <bb 37>; [INV]

  <bb 36> :
  iftmp.3_128 = 0;

  <bb 37> :
  # iftmp.3_87 = PHI <iftmp.3_129(35), iftmp.3_128(36)>
  _65 = iftmp.3_87 | _63;
  pBase_103->PSCR ={v} _65;
  # DEBUG BEGIN_STMT
  _66 = pConfig_109(D)->aPresamplingSource[0];
  Adc_Sar_Ip_SetPresamplingSource (u32Instance_102(D), 0, _66);
  # DEBUG BEGIN_STMT
  _67 = pConfig_109(D)->aPresamplingSource[1];
  Adc_Sar_Ip_SetPresamplingSource (u32Instance_102(D), 1, _67);
  # DEBUG BEGIN_STMT
  _68 = pConfig_109(D)->aPresamplingSource[2];
  Adc_Sar_Ip_SetPresamplingSource (u32Instance_102(D), 2, _68);
  # DEBUG BEGIN_STMT
  _69 = pConfig_109(D)->pfEndOfNormalChainNotification;
  aAdcSarState[u32Instance_102(D)].pfEndOfNormalChainNotification = _69;
  # DEBUG BEGIN_STMT
  _70 = pConfig_109(D)->pfEndOfInjectedChainNotification;
  aAdcSarState[u32Instance_102(D)].pfEndOfInjectedChainNotification = _70;
  # DEBUG BEGIN_STMT
  _71 = pConfig_109(D)->pfEndOfCtuConversionNotification;
  aAdcSarState[u32Instance_102(D)].pfEndOfCtuConversionNotification = _71;
  # DEBUG BEGIN_STMT
  _72 = pConfig_109(D)->pfEndOfConvNotification;
  aAdcSarState[u32Instance_102(D)].pfEndOfConvNotification = _72;
  # DEBUG BEGIN_STMT
  _73 = pConfig_109(D)->pfWdgOutOfRangeNotification;
  aAdcSarState[u32Instance_102(D)].pfWdgOutOfRangeNotification = _73;
  # DEBUG BEGIN_STMT
  _74 = pConfig_109(D)->eCalibrationClkSelect;
  aAdcSarState[u32Instance_102(D)].eCalibrationClkSelect = _74;
  # DEBUG BEGIN_STMT
  _75 = pConfig_109(D)->eDmaClearSource;
  Adc_Sar_Ip_SetDmaClearSource (u32Instance_102(D), _75);
  # DEBUG BEGIN_STMT
  _76 = pConfig_109(D)->u8UsrOffset;
  _77 = (long unsigned int) _76;
  _78 = pConfig_109(D)->u16UsrGain;
  _79 = (long unsigned int) _78;
  _80 = _79 << 16;
  _81 = _80 & 67043328;
  _82 = _77 | _81;
  pBase_103->OFSGNUSR ={v} _82;
  # DEBUG BEGIN_STMT
  aAdcSarState[u32Instance_102(D)].bInit = 1;
  # DEBUG BEGIN_STMT
  _143 = eStatus_114;

  <bb 38> :
  # _86 = PHI <_149(3), _148(5), _143(37)>
  return _86;

}


Adc_Sar_Ip_IRQHandler (const uint32 u32Instance)
{
  struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  void (*<T34c>) (void) _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  void (*<T34c>) (void) _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  void (*<T34c>) (void) _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_27 = pAdcBase[u32Instance_26(D)];
  # DEBUG pBase => pBase_27
  # DEBUG BEGIN_STMT
  _1 ={v} pBase_27->ISR;
  _2 = _1 & 16;
  if (_2 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  pBase_27->ISR ={v} 16;
  # DEBUG BEGIN_STMT
  _3 ={v} pBase_27->IMR;
  _4 = _3 & 16;
  if (_4 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _5 = aAdcSarState[u32Instance_26(D)].pfEndOfCtuConversionNotification;
  Adc_Sar_CheckAndCallNotification (u32Instance_26(D), _5);

  <bb 5> :
  # DEBUG BEGIN_STMT
  _6 ={v} pBase_27->ISR;
  _7 = _6 & 1;
  if (_7 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  pBase_27->ISR ={v} 1;
  # DEBUG BEGIN_STMT
  _8 ={v} pBase_27->IMR;
  _9 = _8 & 1;
  if (_9 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _10 = aAdcSarState[u32Instance_26(D)].pfEndOfNormalChainNotification;
  Adc_Sar_CheckAndCallNotification (u32Instance_26(D), _10);

  <bb 8> :
  # DEBUG BEGIN_STMT
  _11 ={v} pBase_27->ISR;
  _12 = _11 & 4;
  if (_12 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  pBase_27->ISR ={v} 4;
  # DEBUG BEGIN_STMT
  _13 ={v} pBase_27->IMR;
  _14 = _13 & 4;
  if (_14 != 0)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _15 = aAdcSarState[u32Instance_26(D)].pfEndOfInjectedChainNotification;
  Adc_Sar_CheckAndCallNotification (u32Instance_26(D), _15);

  <bb 11> :
  # DEBUG BEGIN_STMT
  _16 ={v} pBase_27->ISR;
  _17 = _16 & 2;
  if (_17 != 0)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  pBase_27->ISR ={v} 2;

  <bb 13> :
  # DEBUG BEGIN_STMT
  _18 ={v} pBase_27->ISR;
  _19 = _18 & 8;
  if (_19 != 0)
    goto <bb 14>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  pBase_27->ISR ={v} 8;

  <bb 15> :
  return;

}


Adc_Sar_ConfigExternalTrigger (const uint32 u32Instance, const Adc_Sar_Ip_ExtTriggerEdgeType eTriggerEdge, const uint32 u32TrgEdgeSetMask, const uint32 u32TrgEdgeClrMask, const uint32 u32TrigSrcMask)
{
  struct ADC_Type * const pBase;
  int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_17 = pAdcBase[u32Instance_16(D)];
  # DEBUG pBase => pBase_17
  # DEBUG BEGIN_STMT
  SchM_Enter_Adc_ADC_EXCLUSIVE_AREA_21 ();
  # DEBUG BEGIN_STMT
  _1 = (int) eTriggerEdge_19(D);
  switch (_1) <default: <L5> [INV], case 0: <L2> [INV], case 1: <L0> [INV], case 2: <L1> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  _2 ={v} pBase_17->MCR;
  _3 = ~u32TrgEdgeSetMask_20(D);
  _4 = _2 & _3;
  pBase_17->MCR ={v} _4;
  # DEBUG BEGIN_STMT
  _5 ={v} pBase_17->MCR;
  _6 = u32TrigSrcMask_21(D) | _5;
  pBase_17->MCR ={v} _6;
  # DEBUG BEGIN_STMT
  goto <bb 6>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  _7 ={v} pBase_17->MCR;
  _8 = u32TrgEdgeSetMask_20(D) | u32TrigSrcMask_21(D);
  _9 = _7 | _8;
  pBase_17->MCR ={v} _9;
  # DEBUG BEGIN_STMT
  goto <bb 6>; [INV]

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  _10 ={v} pBase_17->MCR;
  _11 = u32TrgEdgeClrMask_25(D) | u32TrigSrcMask_21(D);
  _12 = ~_11;
  _13 = _10 & _12;
  pBase_17->MCR ={v} _13;
  # DEBUG BEGIN_STMT

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

}


Adc_Sar_Ip_GetDataAddress (uint32 u32Instance, uint32 u32ChannelIndex)
{
  struct ADC_Type * _1;
  const uint32_t * _2;
  long unsigned int _3;
  const uint32_t * _4;
  uint32 _8;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = pAdcBase[u32Instance_6(D)];
  _2 = &_1->PCDR[0];
  _3 = u32ChannelIndex_7(D) * 4;
  _4 = _2 + _3;
  _8 = (uint32) _4;
  return _8;

}


Adc_Sar_CheckAndCallNotification (const uint32 u32Instance, void (*<T34c>) (void) pfCallback)
{
  _Bool _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  if (pfCallback_3(D) != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  _1 = aAdcSarState[u32Instance_5(D)].bInit;
  if (_1 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  pfCallback_3(D) ();

  <bb 5> :
  return;

}


Adc_Sar_ResetWdog (const uint32 u32Instance)
{
  uint8 u8Index;
  uint32 u32ThrhlrCount;
  struct ADC_Type * const pBase;
  int _1;
  long unsigned int _2;
  volatile uint32_t * _3;
  unsigned int _4;
  unsigned int _5;
  volatile uint32_t * _6;
  unsigned char u8Index.14_7;
  int _8;
  long unsigned int _9;
  volatile uint32_t * _10;
  unsigned int _11;
  unsigned int _12;
  volatile uint32_t * _13;
  unsigned char u8Index.15_14;
  unsigned char u8Index.16_15;
  long unsigned int _16;
  unsigned char _17;
  unsigned int _18;
  long unsigned int _19;
  unsigned int _20;
  unsigned int _21;
  unsigned int _22;
  long unsigned int _23;
  long unsigned int _24;
  unsigned char u8Index.17_25;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_39 = pAdcBase[u32Instance_38(D)];
  # DEBUG pBase => pBase_39
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  u32ThrhlrCount_40 = 4;
  # DEBUG u32ThrhlrCount => u32ThrhlrCount_40
  # DEBUG BEGIN_STMT
  u8Index_41 = 0;
  # DEBUG u8Index => u8Index_41
  goto <bb 7>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = (int) u8Index_26;
  _2 = u32AdcChanBitmap[u32Instance_38(D)][_1];
  if (_2 == 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _3 = &pBase_39->CWENR0;
  _4 = (unsigned int) u8Index_26;
  _5 = _4 * 4;
  _6 = _3 + _5;
  MEM[(volatile uint32 *)_6] ={v} 0;

  <bb 6> :
  # DEBUG BEGIN_STMT
  u8Index.14_7 = u8Index_26;
  u8Index_52 = u8Index.14_7 + 1;
  # DEBUG u8Index => u8Index_52

  <bb 7> :
  # u8Index_26 = PHI <u8Index_41(2), u8Index_52(6)>
  # DEBUG u8Index => u8Index_26
  # DEBUG BEGIN_STMT
  if (u8Index_26 <= 2)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  u8Index_42 = 0;
  # DEBUG u8Index => u8Index_42
  goto <bb 13>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _8 = (int) u8Index_27;
  _9 = u32AdcChanBitmap[u32Instance_38(D)][_8];
  if (_9 == 0)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _10 = &pBase_39->AWORR0;
  _11 = (unsigned int) u8Index_27;
  _12 = _11 * 4;
  _13 = _10 + _12;
  MEM[(volatile uint32 *)_13] ={v} 4294967295;

  <bb 12> :
  # DEBUG BEGIN_STMT
  u8Index.15_14 = u8Index_27;
  u8Index_50 = u8Index.15_14 + 1;
  # DEBUG u8Index => u8Index_50

  <bb 13> :
  # u8Index_27 = PHI <u8Index_42(8), u8Index_50(12)>
  # DEBUG u8Index => u8Index_27
  # DEBUG BEGIN_STMT
  if (u8Index_27 <= 2)
    goto <bb 9>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  u8Index_43 = 0;
  # DEBUG u8Index => u8Index_43
  goto <bb 16>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  Adc_Sar_WriteThresholds (pBase_39, u8Index_28, 65535, 0);
  # DEBUG BEGIN_STMT
  u8Index.16_15 = u8Index_28;
  u8Index_48 = u8Index.16_15 + 1;
  # DEBUG u8Index => u8Index_48

  <bb 16> :
  # u8Index_28 = PHI <u8Index_43(14), u8Index_48(15)>
  # DEBUG u8Index => u8Index_28
  # DEBUG BEGIN_STMT
  _16 = (long unsigned int) u8Index_28;
  if (u32ThrhlrCount_40 > _16)
    goto <bb 15>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 17> :
  # DEBUG BEGIN_STMT
  u8Index_44 = 0;
  # DEBUG u8Index => u8Index_44
  goto <bb 22>; [INV]

  <bb 18> :
  # DEBUG BEGIN_STMT
  _17 = u8Index_29 / 4;
  _18 = (unsigned int) _17;
  _19 = u32AdcChanBitmap[u32Instance_38(D)][_18];
  _20 = (unsigned int) u8Index_29;
  _21 = _20 & 3;
  _22 = _21 * 8;
  _23 = 255 << _22;
  _24 = _19 & _23;
  if (_24 == 0)
    goto <bb 19>; [INV]
  else
    goto <bb 20>; [INV]

  <bb 19> :
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 21>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  Adc_Sar_ResetWdogCWSELR (pBase_39, u8Index_29);

  <bb 21> :
  # DEBUG BEGIN_STMT
  u8Index.17_25 = u8Index_29;
  u8Index_46 = u8Index.17_25 + 1;
  # DEBUG u8Index => u8Index_46

  <bb 22> :
  # u8Index_29 = PHI <u8Index_44(17), u8Index_46(21)>
  # DEBUG u8Index => u8Index_29
  # DEBUG BEGIN_STMT
  if (u8Index_29 <= 2)
    goto <bb 18>; [INV]
  else
    goto <bb 23>; [INV]

  <bb 23> :
  return;

}


Adc_Sar_GetConvResults (const uint32 u32Instance, const Adc_Sar_Ip_ConvChainType pChainType, uint16 * const pResultsRaw, struct Adc_Sar_Ip_ChanResultType * const pResultsStruct, const uint32 u32Length)
{
  uint32 u32Cdr;
  uint8 u8ChnIdx;
  uint32 u32VectBit;
  uint32 u32VectAdr;
  struct ADC_Type * const pBase;
  boolean bLengthExceeded;
  uint32 u32Index;
  long unsigned int _1;
  unsigned char _2;
  unsigned char _3;
  unsigned char _4;
  unsigned char _5;
  unsigned int _6;
  long unsigned int _7;
  unsigned int _8;
  unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  const uint32_t * _12;
  unsigned int _13;
  unsigned int _14;
  const uint32_t * _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  uint16 * _22;
  short unsigned int _23;
  long unsigned int _24;
  struct Adc_Sar_Ip_ChanResultType * _25;
  short unsigned int _26;
  long unsigned int _27;
  struct Adc_Sar_Ip_ChanResultType * _28;
  long unsigned int _29;
  int _30;
  int _31;
  long unsigned int _32;
  struct Adc_Sar_Ip_ChanResultType * _33;
  _Bool _34;
  long unsigned int _35;
  int _36;
  int _37;
  long unsigned int _38;
  struct Adc_Sar_Ip_ChanResultType * _39;
  _Bool _40;
  volatile uint32_t * _41;
  long unsigned int _42;
  volatile uint32_t * _43;
  long unsigned int _44;
  uint32 _89;

  <bb 2> :
  # DEBUG BEGIN_STMT
  u32Index_64 = 0;
  # DEBUG u32Index => u32Index_64
  # DEBUG BEGIN_STMT
  bLengthExceeded_65 = 0;
  # DEBUG bLengthExceeded => bLengthExceeded_65
  # DEBUG BEGIN_STMT
  pBase_68 = pAdcBase[u32Instance_67(D)];
  # DEBUG pBase => pBase_68
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  u32VectAdr_69 = 0;
  # DEBUG u32VectAdr => u32VectAdr_69
  goto <bb 19>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = u32AdcChanBitmap[u32Instance_67(D)][u32VectAdr_54];
  if (_1 == 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 18>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  u32VectBit_70 = 0;
  # DEBUG u32VectBit => u32VectBit_70
  goto <bb 16>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _2 = (unsigned char) u32VectAdr_54;
  _3 = _2 * 32;
  _4 = (unsigned char) u32VectBit_55;
  u8ChnIdx_71 = _3 + _4;
  # DEBUG u8ChnIdx => u8ChnIdx_71
  # DEBUG BEGIN_STMT
  _5 = u8ChnIdx_71 / 32;
  _6 = (unsigned int) _5;
  _7 = u32AdcChanBitmap[u32Instance_67(D)][_6];
  _8 = (unsigned int) u8ChnIdx_71;
  _9 = _8 & 31;
  _10 = _7 >> _9;
  _11 = _10 & 1;
  if (_11 == 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  // predicted unlikely by continue predictor.
  goto <bb 15>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _12 = &pBase_68->PCDR[0];
  _13 = (unsigned int) u8ChnIdx_71;
  _14 = _13 * 4;
  _15 = _12 + _14;
  u32Cdr_72 ={v} MEM[(volatile uint32 *)_15];
  # DEBUG u32Cdr => u32Cdr_72
  # DEBUG BEGIN_STMT
  _16 = (long unsigned int) pChainType_73(D);
  _17 = _16 << 16;
  _18 = _17 & 196608;
  _19 = _18 | 524288;
  _20 = u32Cdr_72 & 720896;
  if (_19 == _20)
    goto <bb 9>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  if (pResultsRaw_74(D) != 0B)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _21 = u32Index_46 * 2;
  _22 = pResultsRaw_74(D) + _21;
  _23 = Adc_Sar_GetMaskedResult (u32Instance_67(D), u32Cdr_72);
  *_22 = _23;

  <bb 11> :
  # DEBUG BEGIN_STMT
  if (pResultsStruct_77(D) != 0B)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  _24 = u32Index_46 * 6;
  _25 = pResultsStruct_77(D) + _24;
  _26 = Adc_Sar_GetMaskedResult (u32Instance_67(D), u32Cdr_72);
  _25->u16ConvData = _26;
  # DEBUG BEGIN_STMT
  _27 = u32Index_46 * 6;
  _28 = pResultsStruct_77(D) + _27;
  _28->u8ChnIdx = u8ChnIdx_71;
  # DEBUG BEGIN_STMT
  _29 = u32Cdr_72 >> 19;
  _30 = (int) _29;
  _31 = _30 & 1;
  _32 = u32Index_46 * 6;
  _33 = pResultsStruct_77(D) + _32;
  _34 = _31 != 0;
  _33->bValid = _34;
  # DEBUG BEGIN_STMT
  _35 = u32Cdr_72 >> 18;
  _36 = (int) _35;
  _37 = _36 & 1;
  _38 = u32Index_46 * 6;
  _39 = pResultsStruct_77(D) + _38;
  _40 = _37 != 0;
  _39->bOverWritten = _40;

  <bb 13> :
  # DEBUG BEGIN_STMT
  _41 = &pBase_68->CEOCFR0;
  _42 = u32VectAdr_54 * 4;
  _43 = _41 + _42;
  _44 = 1 << u32VectBit_55;
  MEM[(volatile uint32 *)_43] ={v} _44;
  # DEBUG BEGIN_STMT
  u32Index_84 = u32Index_46 + 1;
  # DEBUG u32Index => u32Index_84
  # DEBUG BEGIN_STMT
  if (u32Index_84 >= u32Length_85(D))
    goto <bb 14>; [INV]
  else
    goto <bb 15>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  bLengthExceeded_86 = 1;
  # DEBUG bLengthExceeded => bLengthExceeded_86
  # DEBUG BEGIN_STMT
  goto <bb 17>; [INV]

  <bb 15> :
  # u32Index_45 = PHI <u32Index_46(7), u32Index_46(8), u32Index_84(13)>
  # DEBUG u32Index => u32Index_45
  # DEBUG BEGIN_STMT
  u32VectBit_87 = u32VectBit_55 + 1;
  # DEBUG u32VectBit => u32VectBit_87

  <bb 16> :
  # u32Index_46 = PHI <u32Index_49(5), u32Index_45(15)>
  # u32VectBit_55 = PHI <u32VectBit_70(5), u32VectBit_87(15)>
  # DEBUG u32VectBit => u32VectBit_55
  # DEBUG u32Index => u32Index_46
  # DEBUG BEGIN_STMT
  if (u32VectBit_55 <= 31)
    goto <bb 6>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 17> :
  # u32Index_47 = PHI <u32Index_84(14), u32Index_46(16)>
  # bLengthExceeded_51 = PHI <bLengthExceeded_86(14), bLengthExceeded_53(16)>
  # DEBUG bLengthExceeded => bLengthExceeded_51
  # DEBUG u32Index => u32Index_47
  # DEBUG BEGIN_STMT
  if (bLengthExceeded_51 != 0)
    goto <bb 20>; [INV]
  else
    goto <bb 18>; [INV]

  <bb 18> :
  # u32Index_48 = PHI <u32Index_49(4), u32Index_47(17)>
  # bLengthExceeded_52 = PHI <bLengthExceeded_53(4), bLengthExceeded_51(17)>
  # DEBUG bLengthExceeded => bLengthExceeded_52
  # DEBUG u32Index => u32Index_48
  # DEBUG BEGIN_STMT
  u32VectAdr_88 = u32VectAdr_54 + 1;
  # DEBUG u32VectAdr => u32VectAdr_88

  <bb 19> :
  # u32Index_49 = PHI <u32Index_64(2), u32Index_48(18)>
  # bLengthExceeded_53 = PHI <bLengthExceeded_65(2), bLengthExceeded_52(18)>
  # u32VectAdr_54 = PHI <u32VectAdr_69(2), u32VectAdr_88(18)>
  # DEBUG u32VectAdr => u32VectAdr_54
  # DEBUG bLengthExceeded => bLengthExceeded_53
  # DEBUG u32Index => u32Index_49
  # DEBUG BEGIN_STMT
  if (u32VectAdr_54 <= 2)
    goto <bb 3>; [INV]
  else
    goto <bb 20>; [INV]

  <bb 20> :
  # u32Index_50 = PHI <u32Index_47(17), u32Index_49(19)>
  # DEBUG u32Index => u32Index_50
  # DEBUG BEGIN_STMT
  _89 = u32Index_50;
  return _89;

}


Adc_Sar_CheckSelfTestProgress (const uint32 u32Instance)
{
  uint8 u8Index;
  uint32 u32ElapsedTicks;
  uint32 u32CurrentTicks;
  uint32 u32TimeoutTicks;
  uint32 u32Reg;
  Adc_Sar_Ip_StatusType eStatus;
  const struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  unsigned char u8Index.21_6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _30;
  long unsigned int _34;
  Adc_Sar_Ip_StatusType _41;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_20 = pAdcBase[u32Instance_19(D)];
  # DEBUG pBase => pBase_20
  # DEBUG BEGIN_STMT
  eStatus_21 = 0;
  # DEBUG eStatus => eStatus_21
  # DEBUG BEGIN_STMT
  u32Reg_22 = 0;
  # DEBUG u32Reg => u32Reg_22
  # DEBUG BEGIN_STMT
  u32TimeoutTicks_24 = OsIf_MicrosToTicks (3000, 0);
  # DEBUG u32TimeoutTicks => u32TimeoutTicks_24
  # DEBUG BEGIN_STMT
  _1 = OsIf_GetCounter (0);
  u32CurrentTicks = _1;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  u8Index_27 = 0;
  # DEBUG u8Index => u8Index_27
  goto <bb 16>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  u32ElapsedTicks_28 = 0;
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_28
  # DEBUG BEGIN_STMT
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _30 = OsIf_GetElapsed (&u32CurrentTicks, 0);
  u32ElapsedTicks_31 = _30 + u32ElapsedTicks_11;
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_31

  <bb 5> :
  # u32ElapsedTicks_11 = PHI <u32ElapsedTicks_28(3), u32ElapsedTicks_31(4)>
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_11
  # DEBUG BEGIN_STMT
  _2 ={v} pBase_20->MSR;
  _3 = _2 & 262144;
  if (_3 != 262144)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  if (u32ElapsedTicks_11 < u32TimeoutTicks_24)
    goto <bb 4>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  if (u32ElapsedTicks_11 >= u32TimeoutTicks_24)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  eStatus_38 = 2;
  # DEBUG eStatus => eStatus_38
  # DEBUG BEGIN_STMT
  goto <bb 17>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  u32ElapsedTicks_32 = 0;
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_32
  # DEBUG BEGIN_STMT
  goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _34 = OsIf_GetElapsed (&u32CurrentTicks, 0);
  u32ElapsedTicks_35 = _34 + u32ElapsedTicks_12;
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_35

  <bb 11> :
  # u32ElapsedTicks_12 = PHI <u32ElapsedTicks_32(9), u32ElapsedTicks_35(10)>
  # DEBUG u32ElapsedTicks => u32ElapsedTicks_12
  # DEBUG BEGIN_STMT
  _4 ={v} pBase_20->MSR;
  _5 = _4 & 262144;
  if (_5 == 262144)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 12> :
  if (u32ElapsedTicks_12 < u32TimeoutTicks_24)
    goto <bb 10>; [INV]
  else
    goto <bb 13>; [INV]

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

  <bb 14> :
  # DEBUG BEGIN_STMT
  eStatus_37 = 2;
  # DEBUG eStatus => eStatus_37
  # DEBUG BEGIN_STMT
  goto <bb 17>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  u8Index.21_6 = u8Index_13;
  u8Index_36 = u8Index.21_6 + 1;
  # DEBUG u8Index => u8Index_36

  <bb 16> :
  # u8Index_13 = PHI <u8Index_27(2), u8Index_36(15)>
  # DEBUG u8Index => u8Index_13
  # DEBUG BEGIN_STMT
  if (u8Index_13 <= 1)
    goto <bb 3>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 17> :
  # eStatus_9 = PHI <eStatus_38(8), eStatus_37(14), eStatus_21(16)>
  # DEBUG eStatus => eStatus_9
  # DEBUG BEGIN_STMT
  if (eStatus_9 != 2)
    goto <bb 18>; [INV]
  else
    goto <bb 20>; [INV]

  <bb 18> :
  # DEBUG BEGIN_STMT
  u32Reg_39 = u32Reg_22 | 47104;
  # DEBUG u32Reg => u32Reg_39
  # DEBUG BEGIN_STMT
  _7 ={v} pBase_20->STSR1;
  _8 = u32Reg_39 & _7;
  if (_8 != 0)
    goto <bb 19>; [INV]
  else
    goto <bb 20>; [INV]

  <bb 19> :
  # DEBUG BEGIN_STMT
  eStatus_40 = 1;
  # DEBUG eStatus => eStatus_40

  <bb 20> :
  # eStatus_10 = PHI <eStatus_9(17), eStatus_9(18), eStatus_40(19)>
  # DEBUG eStatus => eStatus_10
  # DEBUG BEGIN_STMT
  _41 = eStatus_10;
  u32CurrentTicks ={v} {CLOBBER};
  return _41;

}


Adc_Sar_EnableChannelWatchdog (const uint32 u32Instance, const struct Adc_Sar_Ip_ChanConfigType * pChannelConfigs, uint8 u8NumChannels)
{
  uint32 u32Pos;
  uint32 u32RegNum;
  const struct Adc_Sar_Ip_ChanConfigType * pChnConfig;
  uint8 u8Index;
  uint32 u32Mask;
  struct ADC_Type * const pBase;
  unsigned int _1;
  unsigned int _2;
  unsigned char _3;
  unsigned char _4;
  unsigned char _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  unsigned char _13;
  long unsigned int _14;
  _Bool _15;
  _Bool _16;
  unsigned char _17;
  long unsigned int _18;
  unsigned char _19;
  unsigned char _20;
  unsigned char _21;
  long unsigned int _22;
  long unsigned int _23;
  volatile uint32_t * _24;
  long unsigned int _25;
  volatile uint32_t * _26;
  long unsigned int _27;
  _Bool _28;
  volatile uint32_t * _29;
  long unsigned int _30;
  volatile uint32_t * _31;
  long unsigned int _32;
  unsigned char u8Index.11_33;
  long unsigned int iftmp.10_37;
  long unsigned int iftmp.10_57;
  long unsigned int iftmp.10_58;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_43 = pAdcBase[u32Instance_42(D)];
  # DEBUG pBase => pBase_43
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  u8Index_44 = 0;
  # DEBUG u8Index => u8Index_44
  goto <bb 15>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = (unsigned int) u8Index_36;
  _2 = _1 * 5;
  pChnConfig_47 = pChannelConfigs_46(D) + _2;
  # DEBUG pChnConfig => pChnConfig_47
  # DEBUG BEGIN_STMT
  _3 = pChnConfig_47->u8ChannelIndex;
  _4 = _3 / 8;
  u32RegNum_48 = (uint32) _4;
  # DEBUG u32RegNum => u32RegNum_48
  # DEBUG BEGIN_STMT
  _5 = pChnConfig_47->u8ChannelIndex;
  _6 = (long unsigned int) _5;
  u32Pos_49 = _6 & 7;
  # DEBUG u32Pos => u32Pos_49
  # DEBUG BEGIN_STMT
  _7 = u32RegNum_48 / 4;
  _8 = u32AdcChanBitmap[u32Instance_42(D)][_7];
  _9 = u32RegNum_48 & 3;
  _10 = _9 * 8;
  _11 = 255 << _10;
  _12 = _8 & _11;
  if (_12 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _13 = pChnConfig_47->u8WdgThreshRegIndex;
  _14 = (long unsigned int) _13;
  Adc_Sar_WriteChannelMapping (pBase_43, u32RegNum_48, u32Pos_49, _14);

  <bb 5> :
  # DEBUG BEGIN_STMT
  u32Mask_51 = 0;
  # DEBUG u32Mask => u32Mask_51
  # DEBUG BEGIN_STMT
  _15 = pChnConfig_47->bEndOfConvNotification;
  if (_15 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  u32Mask_52 = u32Mask_51 | 1;
  # DEBUG u32Mask => u32Mask_52

  <bb 7> :
  # u32Mask_34 = PHI <u32Mask_51(5), u32Mask_52(6)>
  # DEBUG u32Mask => u32Mask_34
  # DEBUG BEGIN_STMT
  _16 = pChnConfig_47->bWdgNotification;
  if (_16 != 0)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  u32Mask_53 = u32Mask_34 | 2;
  # DEBUG u32Mask => u32Mask_53

  <bb 9> :
  # u32Mask_35 = PHI <u32Mask_34(7), u32Mask_53(8)>
  # DEBUG u32Mask => u32Mask_35
  # DEBUG BEGIN_STMT
  _17 = pChnConfig_47->u8ChannelIndex;
  _18 = (long unsigned int) _17;
  Adc_Sar_Ip_EnableChannelNotifications (u32Instance_42(D), _18, u32Mask_35);
  # DEBUG BEGIN_STMT
  _19 = pChnConfig_47->u8ChannelIndex;
  _20 = _19 / 32;
  u32RegNum_55 = (uint32) _20;
  # DEBUG u32RegNum => u32RegNum_55
  # DEBUG BEGIN_STMT
  _21 = pChnConfig_47->u8ChannelIndex;
  _22 = (long unsigned int) _21;
  u32Pos_56 = _22 & 31;
  # DEBUG u32Pos => u32Pos_56
  # DEBUG BEGIN_STMT
  _23 = u32AdcChanBitmap[u32Instance_42(D)][u32RegNum_55];
  if (_23 != 0)
    goto <bb 10>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _24 = &pBase_43->PSR0;
  _25 = u32RegNum_55 * 4;
  _26 = _24 + _25;
  _27 ={v} MEM[(volatile uint32 *)_26];
  _28 = pChnConfig_47->bPresamplingEnable;
  if (_28 != 0)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 11> :
  iftmp.10_58 = 1 << u32Pos_56;
  goto <bb 13>; [INV]

  <bb 12> :
  iftmp.10_57 = 0;

  <bb 13> :
  # iftmp.10_37 = PHI <iftmp.10_58(11), iftmp.10_57(12)>
  _29 = &pBase_43->PSR0;
  _30 = u32RegNum_55 * 4;
  _31 = _29 + _30;
  _32 = iftmp.10_37 | _27;
  MEM[(volatile uint32 *)_31] ={v} _32;

  <bb 14> :
  # DEBUG BEGIN_STMT
  u8Index.11_33 = u8Index_36;
  u8Index_60 = u8Index.11_33 + 1;
  # DEBUG u8Index => u8Index_60

  <bb 15> :
  # u8Index_36 = PHI <u8Index_44(2), u8Index_60(14)>
  # DEBUG u8Index => u8Index_36
  # DEBUG BEGIN_STMT
  if (u8Index_36 < u8NumChannels_45(D))
    goto <bb 3>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 16> :
  return;

}


Adc_Sar_CollectMcrMasks (const uint32 u32Instance, const struct Adc_Sar_Ip_ConfigType * const pConfig)
{
  uint32 u32Mcr;
  <unnamed type> _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  <unnamed type> _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  _Bool _9;
  _Bool _10;
  <unnamed type> _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  <unnamed type> _17;
  int _18;
  <unnamed type> _19;
  int _20;
  <unnamed type> _21;
  <unnamed type> _22;
  _Bool _23;
  _Bool _24;
  _Bool _25;
  <unnamed type> _26;
  long unsigned int _27;
  long unsigned int _28;
  long unsigned int _29;
  long unsigned int iftmp.4_33;
  long unsigned int iftmp.5_34;
  long unsigned int iftmp.6_35;
  long unsigned int iftmp.7_36;
  long unsigned int iftmp.8_37;
  long unsigned int iftmp.9_38;
  long unsigned int iftmp.4_44;
  long unsigned int iftmp.4_45;
  long unsigned int iftmp.5_47;
  long unsigned int iftmp.5_48;
  long unsigned int iftmp.6_57;
  long unsigned int iftmp.6_58;
  long unsigned int iftmp.7_60;
  long unsigned int iftmp.7_61;
  long unsigned int iftmp.8_63;
  long unsigned int iftmp.8_64;
  long unsigned int iftmp.9_66;
  long unsigned int iftmp.9_67;
  uint32 _70;

  <bb 2> :
  # DEBUG BEGIN_STMT
  u32Mcr_39 = 0;
  # DEBUG u32Mcr => u32Mcr_39
  # DEBUG BEGIN_STMT
  _1 = pConfig_41(D)->eConvMode;
  _2 = (long unsigned int) _1;
  _3 = _2 << 29;
  _4 = _3 & 536870912;
  u32Mcr_42 = u32Mcr_39 | _4;
  # DEBUG u32Mcr => u32Mcr_42
  # DEBUG BEGIN_STMT
  _5 = pConfig_41(D)->eClkSelect;
  _6 = (long unsigned int) _5;
  _7 = _6 << 1;
  _8 = _7 & 6;
  u32Mcr_43 = u32Mcr_42 | _8;
  # DEBUG u32Mcr => u32Mcr_43
  # DEBUG BEGIN_STMT
  _9 = pConfig_41(D)->bAutoClockOff;
  if (_9 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.4_45 = 32;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.4_44 = 0;

  <bb 5> :
  # iftmp.4_33 = PHI <iftmp.4_45(3), iftmp.4_44(4)>
  u32Mcr_46 = iftmp.4_33 | u32Mcr_43;
  # DEBUG u32Mcr => u32Mcr_46
  # DEBUG BEGIN_STMT
  _10 = pConfig_41(D)->bOverwriteEnable;
  if (_10 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  iftmp.5_48 = 2147483648;
  goto <bb 8>; [INV]

  <bb 7> :
  iftmp.5_47 = 0;

  <bb 8> :
  # iftmp.5_34 = PHI <iftmp.5_48(6), iftmp.5_47(7)>
  u32Mcr_49 = iftmp.5_34 | u32Mcr_46;
  # DEBUG u32Mcr => u32Mcr_49
  # DEBUG BEGIN_STMT
  _11 = pConfig_41(D)->eDataAlign;
  _12 = (long unsigned int) _11;
  _13 = _12 << 30;
  _14 = _13 & 1073741824;
  u32Mcr_50 = u32Mcr_49 | _14;
  # DEBUG u32Mcr => u32Mcr_50
  # DEBUG BEGIN_STMT
  _15 = u32AdcFeatureBitmap[u32Instance_51(D)];
  _16 = _15 & 4;
  if (_16 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _17 = pConfig_41(D)->eCtuMode;
  _18 = (int) _17;
  switch (_18) <default: <L33> [INV], case 1: <L7> [INV], case 2: <L8> [INV]>

  <bb 10> :
<L7>:
  # DEBUG BEGIN_STMT
  u32Mcr_54 = u32Mcr_50 | 131072;
  # DEBUG u32Mcr => u32Mcr_54
  # DEBUG BEGIN_STMT
  goto <bb 12>; [INV]

  <bb 11> :
<L8>:
  # DEBUG BEGIN_STMT
  u32Mcr_52 = u32Mcr_50 | 65536;
  # DEBUG u32Mcr => u32Mcr_52
  # DEBUG BEGIN_STMT
  u32Mcr_53 = u32Mcr_52 | 131072;
  # DEBUG u32Mcr => u32Mcr_53
  # DEBUG BEGIN_STMT

  <bb 12> :
  # u32Mcr_30 = PHI <u32Mcr_50(8), u32Mcr_54(10), u32Mcr_53(11), u32Mcr_50(9)>
<L33>:
  # DEBUG u32Mcr => u32Mcr_30
  # DEBUG BEGIN_STMT
  _19 = pConfig_41(D)->eInjectedEdge;
  _20 = (int) _19;
  switch (_20) <default: <L34> [INV], case 1: <L13> [INV], case 2: <L14> [INV]>

  <bb 13> :
<L13>:
  # DEBUG BEGIN_STMT
  u32Mcr_56 = u32Mcr_30 | 4194304;
  # DEBUG u32Mcr => u32Mcr_56
  # DEBUG BEGIN_STMT
  goto <bb 15>; [INV]

  <bb 14> :
<L14>:
  # DEBUG BEGIN_STMT
  u32Mcr_55 = u32Mcr_30 | 6291456;
  # DEBUG u32Mcr => u32Mcr_55
  # DEBUG BEGIN_STMT

  <bb 15> :
  # u32Mcr_31 = PHI <u32Mcr_56(13), u32Mcr_55(14), u32Mcr_30(12)>
<L34>:
  # DEBUG u32Mcr => u32Mcr_31
  # DEBUG BEGIN_STMT
  _21 = pConfig_41(D)->eExtTrigger;
  if (_21 == 2)
    goto <bb 16>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 16> :
  iftmp.6_58 = 67108864;
  goto <bb 18>; [INV]

  <bb 17> :
  iftmp.6_57 = 0;

  <bb 18> :
  # iftmp.6_35 = PHI <iftmp.6_58(16), iftmp.6_57(17)>
  u32Mcr_59 = iftmp.6_35 | u32Mcr_31;
  # DEBUG u32Mcr => u32Mcr_59
  # DEBUG BEGIN_STMT
  _22 = pConfig_41(D)->eExtTrigger;
  if (_22 != 0)
    goto <bb 19>; [INV]
  else
    goto <bb 26>; [INV]

  <bb 19> :
  # DEBUG BEGIN_STMT
  _23 = pConfig_41(D)->bNormalExtTrgEn;
  if (_23 != 0)
    goto <bb 20>; [INV]
  else
    goto <bb 21>; [INV]

  <bb 20> :
  iftmp.7_61 = 134217728;
  goto <bb 22>; [INV]

  <bb 21> :
  iftmp.7_60 = 0;

  <bb 22> :
  # iftmp.7_36 = PHI <iftmp.7_61(20), iftmp.7_60(21)>
  u32Mcr_62 = iftmp.7_36 | u32Mcr_59;
  # DEBUG u32Mcr => u32Mcr_62
  # DEBUG BEGIN_STMT
  _24 = pConfig_41(D)->bNormalAuxExtTrgEn;
  if (_24 != 0)
    goto <bb 23>; [INV]
  else
    goto <bb 24>; [INV]

  <bb 23> :
  iftmp.8_64 = 33554432;
  goto <bb 25>; [INV]

  <bb 24> :
  iftmp.8_63 = 0;

  <bb 25> :
  # iftmp.8_37 = PHI <iftmp.8_64(23), iftmp.8_63(24)>
  u32Mcr_65 = iftmp.8_37 | u32Mcr_62;
  # DEBUG u32Mcr => u32Mcr_65

  <bb 26> :
  # u32Mcr_32 = PHI <u32Mcr_59(18), u32Mcr_65(25)>
  # DEBUG u32Mcr => u32Mcr_32
  # DEBUG BEGIN_STMT
  _25 = pConfig_41(D)->bAvgEn;
  if (_25 != 0)
    goto <bb 27>; [INV]
  else
    goto <bb 28>; [INV]

  <bb 27> :
  iftmp.9_67 = 2048;
  goto <bb 29>; [INV]

  <bb 28> :
  iftmp.9_66 = 0;

  <bb 29> :
  # iftmp.9_38 = PHI <iftmp.9_67(27), iftmp.9_66(28)>
  u32Mcr_68 = iftmp.9_38 | u32Mcr_32;
  # DEBUG u32Mcr => u32Mcr_68
  # DEBUG BEGIN_STMT
  _26 = pConfig_41(D)->eAvgSel;
  _27 = (long unsigned int) _26;
  _28 = _27 << 9;
  _29 = _28 & 1536;
  u32Mcr_69 = u32Mcr_68 | _29;
  # DEBUG u32Mcr => u32Mcr_69
  # DEBUG BEGIN_STMT
  _70 = u32Mcr_69;
  return _70;

}


Adc_Sar_GetIsrFlags (const uint32 u32Instance)
{
  uint32 u32Flags;
  uint32 u32Isr;
  const struct ADC_Type * const pBase;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  uint32 _19;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_11 = pAdcBase[u32Instance_10(D)];
  # DEBUG pBase => pBase_11
  # DEBUG BEGIN_STMT
  u32Isr_12 ={v} pBase_11->ISR;
  # DEBUG u32Isr => u32Isr_12
  # DEBUG BEGIN_STMT
  u32Flags_13 = 0;
  # DEBUG u32Flags => u32Flags_13
  # DEBUG BEGIN_STMT
  _1 = u32Isr_12 & 2;
  u32Flags_14 = u32Flags_13 | _1;
  # DEBUG u32Flags => u32Flags_14
  # DEBUG BEGIN_STMT
  _2 = u32Isr_12 & 1;
  u32Flags_15 = u32Flags_14 | _2;
  # DEBUG u32Flags => u32Flags_15
  # DEBUG BEGIN_STMT
  _3 = u32Isr_12 & 8;
  u32Flags_16 = u32Flags_15 | _3;
  # DEBUG u32Flags => u32Flags_16
  # DEBUG BEGIN_STMT
  _4 = u32Isr_12 & 4;
  u32Flags_17 = u32Flags_16 | _4;
  # DEBUG u32Flags => u32Flags_17
  # DEBUG BEGIN_STMT
  _5 = u32AdcFeatureBitmap[u32Instance_10(D)];
  _6 = _5 & 4;
  if (_6 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _7 = u32Isr_12 & 16;
  u32Flags_18 = u32Flags_17 | _7;
  # DEBUG u32Flags => u32Flags_18

  <bb 4> :
  # u32Flags_8 = PHI <u32Flags_17(2), u32Flags_18(3)>
  # DEBUG u32Flags => u32Flags_8
  # DEBUG BEGIN_STMT
  _19 = u32Flags_8;
  return _19;

}


Adc_Sar_GetMsrFlags (const uint32 u32Instance)
{
  uint32 u32Flags;
  uint32 u32Msr;
  const struct ADC_Type * const pBase;
  signed int u32Msr.20_1;
  signed int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  uint32 _29;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pBase_20 = pAdcBase[u32Instance_19(D)];
  # DEBUG pBase => pBase_20
  # DEBUG BEGIN_STMT
  u32Msr_21 ={v} pBase_20->MSR;
  # DEBUG u32Msr => u32Msr_21
  # DEBUG BEGIN_STMT
  u32Flags_22 = 0;
  # DEBUG u32Flags => u32Flags_22
  # DEBUG BEGIN_STMT
  u32Msr.20_1 = (signed int) u32Msr_21;
  _2 = u32Msr.20_1 >> 26;
  _3 = (long unsigned int) _2;
  _4 = _3 & 32;
  u32Flags_23 = u32Flags_22 | _4;
  # DEBUG u32Flags => u32Flags_23
  # DEBUG BEGIN_STMT
  _5 = u32Msr_21 >> 18;
  _6 = _5 & 64;
  u32Flags_24 = u32Flags_23 | _6;
  # DEBUG u32Flags => u32Flags_24
  # DEBUG BEGIN_STMT
  _7 = u32Msr_21 >> 15;
  _8 = _7 & 256;
  u32Flags_25 = u32Flags_24 | _8;
  # DEBUG u32Flags => u32Flags_25
  # DEBUG BEGIN_STMT
  _9 = u32Msr_21 >> 13;
  _10 = _9 & 128;
  u32Flags_26 = u32Flags_25 | _10;
  # DEBUG u32Flags => u32Flags_26
  # DEBUG BEGIN_STMT
  _11 = u32AdcFeatureBitmap[u32Instance_19(D)];
  _12 = _11 & 4;
  if (_12 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _13 = u32Msr_21 >> 7;
  _14 = _13 & 512;
  u32Flags_27 = u32Flags_26 | _14;
  # DEBUG u32Flags => u32Flags_27

  <bb 4> :
  # u32Flags_17 = PHI <u32Flags_26(2), u32Flags_27(3)>
  # DEBUG u32Flags => u32Flags_17
  # DEBUG BEGIN_STMT
  _15 = u32Msr_21 << 5;
  _16 = _15 & 1024;
  u32Flags_28 = u32Flags_17 | _16;
  # DEBUG u32Flags => u32Flags_28
  # DEBUG BEGIN_STMT
  _29 = u32Flags_28;
  return _29;

}


Adc_Sar_GetMaskedResult (const uint32 u32Instance, const uint32 u32Cdr)
{
  uint8 u8Resolution;
  uint16 u16Result;
  uint32 u32CdrMask;
  unsigned int _1;
  unsigned int _2;
  <unnamed type> _3;
  unsigned int _4;
  unsigned int _5;
  short unsigned int _6;
  short unsigned int _7;
  unsigned int _8;
  unsigned int _9;
  unsigned int _10;
  short unsigned int _11;
  short unsigned int _12;
  short unsigned int _13;
  int _14;
  unsigned int _15;
  unsigned int _16;
  int _17;
  uint16 _29;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  u8Resolution_22 = Adc_Sar_GetResolution (u32Instance_20(D));
  # DEBUG u8Resolution => u8Resolution_22
  # DEBUG BEGIN_STMT
  _1 = (unsigned int) u8Resolution_22;
  _2 = 16 - _1;
  u32CdrMask_23 = 65535 << _2;
  # DEBUG u32CdrMask => u32CdrMask_23
  # DEBUG BEGIN_STMT
  _3 = aAdcSarState[u32Instance_20(D)].eDataAlign;
  if (_3 == 1)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _4 = (unsigned int) u8Resolution_22;
  _5 = 16 - _4;
  u32CdrMask_27 = 65535 << _5;
  # DEBUG u32CdrMask => u32CdrMask_27
  # DEBUG BEGIN_STMT
  _6 = (short unsigned int) u32Cdr_25(D);
  _7 = (short unsigned int) u32CdrMask_27;
  u16Result_28 = _6 & _7;
  # DEBUG u16Result => u16Result_28
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _8 = (unsigned int) u8Resolution_22;
  _9 = 15 - _8;
  _10 = 65535 << _9;
  u32CdrMask_24 = _10 & 32767;
  # DEBUG u32CdrMask => u32CdrMask_24
  # DEBUG BEGIN_STMT
  _11 = (short unsigned int) u32Cdr_25(D);
  _12 = (short unsigned int) u32CdrMask_24;
  _13 = _11 & _12;
  _14 = (int) _13;
  _15 = (unsigned int) u8Resolution_22;
  _16 = 15 - _15;
  _17 = _14 >> _16;
  u16Result_26 = (uint16) _17;
  # DEBUG u16Result => u16Result_26

  <bb 5> :
  # u16Result_18 = PHI <u16Result_28(3), u16Result_26(4)>
  # DEBUG u16Result => u16Result_18
  # DEBUG BEGIN_STMT
  _29 = u16Result_18;
  return _29;

}


Adc_Sar_GetResolution (const uint32 u32Instance)
{
  uint8 u8ResolutionBits;
  uint32 u32Calbistreg;
  struct ADC_Type * const pBase;
  uint8 u8Resolution;
  long unsigned int _1;
  int _2;
  uint8 _14;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pBase_6 = pAdcBase[u32Instance_5(D)];
  # DEBUG pBase => pBase_6
  # DEBUG BEGIN_STMT
  u32Calbistreg_7 ={v} pBase_6->CALBISTREG;
  # DEBUG u32Calbistreg => u32Calbistreg_7
  # DEBUG BEGIN_STMT
  _1 = u32Calbistreg_7 >> 29;
  u8ResolutionBits_8 = (uint8) _1;
  # DEBUG u8ResolutionBits => u8ResolutionBits_8
  # DEBUG BEGIN_STMT
  _2 = (int) u8ResolutionBits_8;
  switch (_2) <default: <L4> [INV], case 0: <L0> [INV], case 1: <L1> [INV], case 2: <L2> [INV], case 3: <L3> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  u8Resolution_12 = 14;
  # DEBUG u8Resolution => u8Resolution_12
  # DEBUG BEGIN_STMT
  goto <bb 8>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  u8Resolution_11 = 12;
  # DEBUG u8Resolution => u8Resolution_11
  # DEBUG BEGIN_STMT
  goto <bb 8>; [INV]

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  u8Resolution_10 = 10;
  # DEBUG u8Resolution => u8Resolution_10
  # DEBUG BEGIN_STMT
  goto <bb 8>; [INV]

  <bb 6> :
<L3>:
  # DEBUG BEGIN_STMT
  u8Resolution_9 = 8;
  # DEBUG u8Resolution => u8Resolution_9
  # DEBUG BEGIN_STMT
  goto <bb 8>; [INV]

  <bb 7> :
<L4>:
  # DEBUG BEGIN_STMT
  u8Resolution_13 = 14;
  # DEBUG u8Resolution => u8Resolution_13
  # DEBUG BEGIN_STMT

  <bb 8> :
  # u8Resolution_3 = PHI <u8Resolution_12(3), u8Resolution_11(4), u8Resolution_10(5), u8Resolution_9(6), u8Resolution_13(7)>
  # DEBUG u8Resolution => u8Resolution_3
  # DEBUG BEGIN_STMT
  _14 = u8Resolution_3;
  return _14;

}


Adc_Sar_ResetWdogCWSELR (struct ADC_Type * const pBase, uint8 u8CwselrId)
{
  volatile uint32_t * _1;
  unsigned int _2;
  unsigned int _3;
  volatile uint32_t * _4;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = &pBase_5(D)->CWSELRPI[0];
  _2 = (unsigned int) u8CwselrId_6(D);
  _3 = _2 * 4;
  _4 = _1 + _3;
  MEM[(volatile uint32 *)_4] ={v} 0;
  return;

}


Adc_Sar_WriteChannelMapping (struct ADC_Type * const pBase, uint32 u32RegisterNumber, uint32 u32FieldPosition, uint32 u32Value)
{
  volatile uint32_t * _1;
  long unsigned int _2;
  volatile uint32_t * _3;
  long unsigned int _4;
  volatile uint32_t * _5;
  long unsigned int _6;
  volatile uint32_t * _7;
  long unsigned int _8;
  volatile uint32_t * _9;
  long unsigned int _10;
  volatile uint32_t * _11;
  long unsigned int _12;
  long unsigned int _13;
  volatile uint32_t * _14;
  long unsigned int _15;
  volatile uint32_t * _16;
  long unsigned int _17;
  volatile uint32_t * _18;
  long unsigned int _19;
  volatile uint32_t * _20;
  long unsigned int _21;
  volatile uint32_t * _22;
  long unsigned int _23;
  volatile uint32_t * _24;
  long unsigned int _25;
  volatile uint32_t * _26;
  long unsigned int _27;
  volatile uint32_t * _28;
  long unsigned int _29;
  long unsigned int _30;
  long unsigned int _31;
  volatile uint32_t * _32;
  long unsigned int _33;
  volatile uint32_t * _34;
  long unsigned int _35;
  volatile uint32_t * _36;
  long unsigned int _37;
  volatile uint32_t * _38;
  long unsigned int _39;
  volatile uint32_t * _40;
  long unsigned int _41;
  volatile uint32_t * _42;
  long unsigned int _43;
  volatile uint32_t * _44;
  long unsigned int _45;
  volatile uint32_t * _46;
  long unsigned int _47;
  long unsigned int _48;
  long unsigned int _49;
  volatile uint32_t * _50;
  long unsigned int _51;
  volatile uint32_t * _52;
  long unsigned int _53;
  volatile uint32_t * _54;
  long unsigned int _55;
  volatile uint32_t * _56;
  long unsigned int _57;
  volatile uint32_t * _58;
  long unsigned int _59;
  volatile uint32_t * _60;
  long unsigned int _61;
  volatile uint32_t * _62;
  long unsigned int _63;
  volatile uint32_t * _64;
  long unsigned int _65;
  long unsigned int _66;
  long unsigned int _67;
  volatile uint32_t * _68;
  long unsigned int _69;
  volatile uint32_t * _70;
  long unsigned int _71;
  volatile uint32_t * _72;
  long unsigned int _73;
  volatile uint32_t * _74;
  long unsigned int _75;
  volatile uint32_t * _76;
  long unsigned int _77;
  volatile uint32_t * _78;
  long unsigned int _79;
  volatile uint32_t * _80;
  long unsigned int _81;
  volatile uint32_t * _82;
  long unsigned int _83;
  long unsigned int _84;
  long unsigned int _85;
  volatile uint32_t * _86;
  long unsigned int _87;
  volatile uint32_t * _88;
  long unsigned int _89;
  volatile uint32_t * _90;
  long unsigned int _91;
  volatile uint32_t * _92;
  long unsigned int _93;
  volatile uint32_t * _94;
  long unsigned int _95;
  volatile uint32_t * _96;
  long unsigned int _97;
  volatile uint32_t * _98;
  long unsigned int _99;
  volatile uint32_t * _100;
  long unsigned int _101;
  long unsigned int _102;
  long unsigned int _103;
  volatile uint32_t * _104;
  long unsigned int _105;
  volatile uint32_t * _106;
  long unsigned int _107;
  volatile uint32_t * _108;
  long unsigned int _109;
  volatile uint32_t * _110;
  long unsigned int _111;
  volatile uint32_t * _112;
  long unsigned int _113;
  volatile uint32_t * _114;
  long unsigned int _115;
  volatile uint32_t * _116;
  long unsigned int _117;
  volatile uint32_t * _118;
  long unsigned int _119;
  long unsigned int _120;
  long unsigned int _121;
  volatile uint32_t * _122;
  long unsigned int _123;
  volatile uint32_t * _124;
  long unsigned int _125;
  volatile uint32_t * _126;
  long unsigned int _127;
  volatile uint32_t * _128;
  long unsigned int _129;
  volatile uint32_t * _130;
  long unsigned int _131;
  volatile uint32_t * _132;
  long unsigned int _133;
  volatile uint32_t * _134;
  long unsigned int _135;
  volatile uint32_t * _136;
  long unsigned int _137;
  long unsigned int _138;
  long unsigned int _139;
  volatile uint32_t * _140;
  long unsigned int _141;
  volatile uint32_t * _142;
  long unsigned int _143;

  <bb 2> :
  # DEBUG BEGIN_STMT
  switch (u32FieldPosition_145(D)) <default: <L10> [INV], case 0: <L0> [INV], case 1: <L1> [INV], case 2: <L2> [INV], case 3: <L3> [INV], case 4: <L4> [INV], case 5: <L5> [INV], case 6: <L6> [INV], case 7: <L7> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  _1 = &pBase_147(D)->CWSELRPI[0];
  _2 = u32RegisterNumber_148(D) * 4;
  _3 = _1 + _2;
  _4 ={v} MEM[(volatile uint32 *)_3];
  _5 = &pBase_147(D)->CWSELRPI[0];
  _6 = u32RegisterNumber_148(D) * 4;
  _7 = _5 + _6;
  _8 = _4 & 4294967292;
  MEM[(volatile uint32 *)_7] ={v} _8;
  # DEBUG BEGIN_STMT
  _9 = &pBase_147(D)->CWSELRPI[0];
  _10 = u32RegisterNumber_148(D) * 4;
  _11 = _9 + _10;
  _12 ={v} MEM[(volatile uint32 *)_11];
  _13 = u32Value_150(D) & 3;
  _14 = &pBase_147(D)->CWSELRPI[0];
  _15 = u32RegisterNumber_148(D) * 4;
  _16 = _14 + _15;
  _17 = _12 | _13;
  MEM[(volatile uint32 *)_16] ={v} _17;
  # DEBUG BEGIN_STMT
  goto <bb 11>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  _18 = &pBase_147(D)->CWSELRPI[0];
  _19 = u32RegisterNumber_148(D) * 4;
  _20 = _18 + _19;
  _21 ={v} MEM[(volatile uint32 *)_20];
  _22 = &pBase_147(D)->CWSELRPI[0];
  _23 = u32RegisterNumber_148(D) * 4;
  _24 = _22 + _23;
  _25 = _21 & 4294967247;
  MEM[(volatile uint32 *)_24] ={v} _25;
  # DEBUG BEGIN_STMT
  _26 = &pBase_147(D)->CWSELRPI[0];
  _27 = u32RegisterNumber_148(D) * 4;
  _28 = _26 + _27;
  _29 ={v} MEM[(volatile uint32 *)_28];
  _30 = u32Value_150(D) << 4;
  _31 = _30 & 48;
  _32 = &pBase_147(D)->CWSELRPI[0];
  _33 = u32RegisterNumber_148(D) * 4;
  _34 = _32 + _33;
  _35 = _29 | _31;
  MEM[(volatile uint32 *)_34] ={v} _35;
  # DEBUG BEGIN_STMT
  goto <bb 11>; [INV]

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  _36 = &pBase_147(D)->CWSELRPI[0];
  _37 = u32RegisterNumber_148(D) * 4;
  _38 = _36 + _37;
  _39 ={v} MEM[(volatile uint32 *)_38];
  _40 = &pBase_147(D)->CWSELRPI[0];
  _41 = u32RegisterNumber_148(D) * 4;
  _42 = _40 + _41;
  _43 = _39 & 4294966527;
  MEM[(volatile uint32 *)_42] ={v} _43;
  # DEBUG BEGIN_STMT
  _44 = &pBase_147(D)->CWSELRPI[0];
  _45 = u32RegisterNumber_148(D) * 4;
  _46 = _44 + _45;
  _47 ={v} MEM[(volatile uint32 *)_46];
  _48 = u32Value_150(D) << 8;
  _49 = _48 & 768;
  _50 = &pBase_147(D)->CWSELRPI[0];
  _51 = u32RegisterNumber_148(D) * 4;
  _52 = _50 + _51;
  _53 = _47 | _49;
  MEM[(volatile uint32 *)_52] ={v} _53;
  # DEBUG BEGIN_STMT
  goto <bb 11>; [INV]

  <bb 6> :
<L3>:
  # DEBUG BEGIN_STMT
  _54 = &pBase_147(D)->CWSELRPI[0];
  _55 = u32RegisterNumber_148(D) * 4;
  _56 = _54 + _55;
  _57 ={v} MEM[(volatile uint32 *)_56];
  _58 = &pBase_147(D)->CWSELRPI[0];
  _59 = u32RegisterNumber_148(D) * 4;
  _60 = _58 + _59;
  _61 = _57 & 4294955007;
  MEM[(volatile uint32 *)_60] ={v} _61;
  # DEBUG BEGIN_STMT
  _62 = &pBase_147(D)->CWSELRPI[0];
  _63 = u32RegisterNumber_148(D) * 4;
  _64 = _62 + _63;
  _65 ={v} MEM[(volatile uint32 *)_64];
  _66 = u32Value_150(D) << 12;
  _67 = _66 & 12288;
  _68 = &pBase_147(D)->CWSELRPI[0];
  _69 = u32RegisterNumber_148(D) * 4;
  _70 = _68 + _69;
  _71 = _65 | _67;
  MEM[(volatile uint32 *)_70] ={v} _71;
  # DEBUG BEGIN_STMT
  goto <bb 11>; [INV]

  <bb 7> :
<L4>:
  # DEBUG BEGIN_STMT
  _72 = &pBase_147(D)->CWSELRPI[0];
  _73 = u32RegisterNumber_148(D) * 4;
  _74 = _72 + _73;
  _75 ={v} MEM[(volatile uint32 *)_74];
  _76 = &pBase_147(D)->CWSELRPI[0];
  _77 = u32RegisterNumber_148(D) * 4;
  _78 = _76 + _77;
  _79 = _75 & 4294770687;
  MEM[(volatile uint32 *)_78] ={v} _79;
  # DEBUG BEGIN_STMT
  _80 = &pBase_147(D)->CWSELRPI[0];
  _81 = u32RegisterNumber_148(D) * 4;
  _82 = _80 + _81;
  _83 ={v} MEM[(volatile uint32 *)_82];
  _84 = u32Value_150(D) << 16;
  _85 = _84 & 196608;
  _86 = &pBase_147(D)->CWSELRPI[0];
  _87 = u32RegisterNumber_148(D) * 4;
  _88 = _86 + _87;
  _89 = _83 | _85;
  MEM[(volatile uint32 *)_88] ={v} _89;
  # DEBUG BEGIN_STMT
  goto <bb 11>; [INV]

  <bb 8> :
<L5>:
  # DEBUG BEGIN_STMT
  _90 = &pBase_147(D)->CWSELRPI[0];
  _91 = u32RegisterNumber_148(D) * 4;
  _92 = _90 + _91;
  _93 ={v} MEM[(volatile uint32 *)_92];
  _94 = &pBase_147(D)->CWSELRPI[0];
  _95 = u32RegisterNumber_148(D) * 4;
  _96 = _94 + _95;
  _97 = _93 & 4291821567;
  MEM[(volatile uint32 *)_96] ={v} _97;
  # DEBUG BEGIN_STMT
  _98 = &pBase_147(D)->CWSELRPI[0];
  _99 = u32RegisterNumber_148(D) * 4;
  _100 = _98 + _99;
  _101 ={v} MEM[(volatile uint32 *)_100];
  _102 = u32Value_150(D) << 20;
  _103 = _102 & 3145728;
  _104 = &pBase_147(D)->CWSELRPI[0];
  _105 = u32RegisterNumber_148(D) * 4;
  _106 = _104 + _105;
  _107 = _101 | _103;
  MEM[(volatile uint32 *)_106] ={v} _107;
  # DEBUG BEGIN_STMT
  goto <bb 11>; [INV]

  <bb 9> :
<L6>:
  # DEBUG BEGIN_STMT
  _108 = &pBase_147(D)->CWSELRPI[0];
  _109 = u32RegisterNumber_148(D) * 4;
  _110 = _108 + _109;
  _111 ={v} MEM[(volatile uint32 *)_110];
  _112 = &pBase_147(D)->CWSELRPI[0];
  _113 = u32RegisterNumber_148(D) * 4;
  _114 = _112 + _113;
  _115 = _111 & 4244635647;
  MEM[(volatile uint32 *)_114] ={v} _115;
  # DEBUG BEGIN_STMT
  _116 = &pBase_147(D)->CWSELRPI[0];
  _117 = u32RegisterNumber_148(D) * 4;
  _118 = _116 + _117;
  _119 ={v} MEM[(volatile uint32 *)_118];
  _120 = u32Value_150(D) << 24;
  _121 = _120 & 50331648;
  _122 = &pBase_147(D)->CWSELRPI[0];
  _123 = u32RegisterNumber_148(D) * 4;
  _124 = _122 + _123;
  _125 = _119 | _121;
  MEM[(volatile uint32 *)_124] ={v} _125;
  # DEBUG BEGIN_STMT
  goto <bb 11>; [INV]

  <bb 10> :
<L7>:
  # DEBUG BEGIN_STMT
  _126 = &pBase_147(D)->CWSELRPI[0];
  _127 = u32RegisterNumber_148(D) * 4;
  _128 = _126 + _127;
  _129 ={v} MEM[(volatile uint32 *)_128];
  _130 = &pBase_147(D)->CWSELRPI[0];
  _131 = u32RegisterNumber_148(D) * 4;
  _132 = _130 + _131;
  _133 = _129 & 3489660927;
  MEM[(volatile uint32 *)_132] ={v} _133;
  # DEBUG BEGIN_STMT
  _134 = &pBase_147(D)->CWSELRPI[0];
  _135 = u32RegisterNumber_148(D) * 4;
  _136 = _134 + _135;
  _137 ={v} MEM[(volatile uint32 *)_136];
  _138 = u32Value_150(D) << 28;
  _139 = _138 & 805306368;
  _140 = &pBase_147(D)->CWSELRPI[0];
  _141 = u32RegisterNumber_148(D) * 4;
  _142 = _140 + _141;
  _143 = _137 | _139;
  MEM[(volatile uint32 *)_142] ={v} _143;
  # DEBUG BEGIN_STMT

  <bb 11> :
<L10>:
  return;

}


Adc_Sar_WriteThresholds (struct ADC_Type * const pBase, uint8 u8RegisterNumber, uint16 u16HighThreshold, uint16 u16LowThreshold)
{
  uint32 u32Value;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  int _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) u16HighThreshold_7(D);
  _2 = _1 << 16;
  _3 = _2 & 2147418112;
  _4 = (long unsigned int) u16LowThreshold_8(D);
  _5 = _4 & 32767;
  u32Value_9 = _3 | _5;
  # DEBUG u32Value => u32Value_9
  # DEBUG BEGIN_STMT
  _6 = (int) u8RegisterNumber_10(D);
  pBase_12(D)->THRHLR[_6] ={v} u32Value_9;
  return;

}


Adc_Sar_Powerdown (struct ADC_Type * const pBase)
{
  long unsigned int _1;
  long unsigned int _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 ={v} pBase_4(D)->MCR;
  _2 = _1 | 1;
  pBase_4(D)->MCR ={v} _2;
  return;

}


Adc_Sar_Powerup (struct ADC_Type * const pBase)
{
  long unsigned int _1;
  long unsigned int _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 ={v} pBase_4(D)->MCR;
  _2 = _1 & 4294967294;
  pBase_4(D)->MCR ={v} _2;
  return;

}


