Gpt_Ipw_DisableInterrupt (const struct Gpt_Ipw_HwChannelConfigType * pHwChannelConfig)
{
  <unnamed type> _1;
  int _2;
  unsigned char _3;
  unsigned char _4;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = pHwChannelConfig_7(D)->instanceType;
  _2 = (int) _1;
  if (_2 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  _3 = pHwChannelConfig_7(D)->instance;
  _4 = pHwChannelConfig_7(D)->channel;
  Pit_Ip_DisableChannelInterrupt (_3, _4);
  # DEBUG BEGIN_STMT

  <bb 4> :
  # DEBUG BEGIN_STMT
  return;

}


Gpt_Ipw_DeInit (const struct Gpt_Ipw_HwChannelConfigType * pHwChannelConfig)
{
  <unnamed type> _1;
  int _2;
  unsigned char _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = pHwChannelConfig_6(D)->instanceType;
  _2 = (int) _1;
  if (_2 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  _3 = pHwChannelConfig_6(D)->instance;
  Pit_Ip_Deinit (_3);
  # DEBUG BEGIN_STMT

  <bb 4> :
  # DEBUG BEGIN_STMT
  return;

}


Gpt_Ipw_EnableInterrupt (const struct Gpt_Ipw_HwChannelConfigType * pHwChannelConfig)
{
  <unnamed type> _1;
  int _2;
  unsigned char _3;
  unsigned char _4;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = pHwChannelConfig_7(D)->instanceType;
  _2 = (int) _1;
  if (_2 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  _3 = pHwChannelConfig_7(D)->instance;
  _4 = pHwChannelConfig_7(D)->channel;
  Pit_Ip_EnableChannelInterrupt (_3, _4);
  # DEBUG BEGIN_STMT

  <bb 4> :
  # DEBUG BEGIN_STMT
  return;

}


Gpt_Ipw_StopTimer (const struct Gpt_Ipw_HwChannelConfigType * pHwChannelConfig)
{
  <unnamed type> _1;
  int _2;
  unsigned char _3;
  unsigned char _4;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = pHwChannelConfig_7(D)->instanceType;
  _2 = (int) _1;
  if (_2 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  _3 = pHwChannelConfig_7(D)->instance;
  _4 = pHwChannelConfig_7(D)->channel;
  Pit_Ip_StopChannel (_3, _4);
  # DEBUG BEGIN_STMT

  <bb 4> :
  # DEBUG BEGIN_STMT
  return;

}


Gpt_Ipw_GetTimeElapsed (const struct Gpt_Ipw_HwChannelConfigType * pHwChannelConfig, struct Gpt_HwChannelInfoType * pReturnHwChannelInfo)
{
  uint32 returnValue;
  <unnamed type> _1;
  int _2;
  Gpt_ValueType _11;

  <bb 2> :
  # DEBUG BEGIN_STMT
  returnValue_5 = 0;
  # DEBUG returnValue => returnValue_5
  # DEBUG BEGIN_STMT
  _1 = pHwChannelConfig_7(D)->instanceType;
  _2 = (int) _1;
  if (_2 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  returnValue_10 = Gpt_Ipw_PitGetTimeElapsed (pHwChannelConfig_7(D), pReturnHwChannelInfo_8(D));
  # DEBUG returnValue => returnValue_10
  # DEBUG BEGIN_STMT

  <bb 4> :
  # returnValue_3 = PHI <returnValue_10(3), returnValue_5(2)>
  # DEBUG returnValue => returnValue_3
  # DEBUG BEGIN_STMT
  _11 = returnValue_3;
  return _11;

}


Gpt_Ipw_StartTimer (const struct Gpt_Ipw_HwChannelConfigType * pHwChannelConfig, Gpt_ValueType uValue)
{
  Std_ReturnType returnValue;
  <unnamed type> _1;
  int _2;
  unsigned char _3;
  unsigned char _4;
  Std_ReturnType _13;

  <bb 2> :
  # DEBUG BEGIN_STMT
  returnValue_7 = 1;
  # DEBUG returnValue => returnValue_7
  # DEBUG BEGIN_STMT
  _1 = pHwChannelConfig_9(D)->instanceType;
  _2 = (int) _1;
  if (_2 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  _3 = pHwChannelConfig_9(D)->instance;
  _4 = pHwChannelConfig_9(D)->channel;
  returnValue_12 = Pit_Ip_StartChannel (_3, _4, uValue_10(D));
  # DEBUG returnValue => returnValue_12
  # DEBUG BEGIN_STMT

  <bb 4> :
  # returnValue_5 = PHI <returnValue_12(3), returnValue_7(2)>
  # DEBUG returnValue => returnValue_5
  # DEBUG BEGIN_STMT
  _13 = returnValue_5;
  return _13;

}


Gpt_Ipw_Init (const struct Gpt_Ipw_HwChannelConfigType * pHwChannelConfig)
{
  <unnamed type> _1;
  int _2;
  unsigned char _3;
  const struct Pit_Ip_ChannelConfigType * _4;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = pHwChannelConfig_7(D)->instanceType;
  _2 = (int) _1;
  if (_2 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  _3 = pHwChannelConfig_7(D)->instance;
  _4 = pHwChannelConfig_7(D)->Gpt_Ipw_ChannelConfig.Pit_Ip_ChannelConfig;
  Pit_Ip_InitChannel (_3, _4);
  # DEBUG BEGIN_STMT

  <bb 4> :
  # DEBUG BEGIN_STMT
  return;

}


Gpt_Ipw_InitInstances (const struct Gpt_ConfigType * configPtr)
{
  uint8 index;
  struct Gpt_Ipw_HwInstanceConfigType[<unknown>] * _1;
  int _2;
  <unnamed type> _3;
  int _4;
  struct Gpt_Ipw_HwInstanceConfigType[<unknown>] * _5;
  int _6;
  unsigned char _7;
  struct Gpt_Ipw_HwInstanceConfigType[<unknown>] * _8;
  int _9;
  const struct Pit_Ip_InstanceConfigType * _10;
  unsigned char index.0_11;
  unsigned char _12;

  <bb 2> :
  # DEBUG BEGIN_STMT
  index_16 = 0;
  # DEBUG index => index_16
  # DEBUG BEGIN_STMT
  index_17 = 0;
  # DEBUG index => index_17
  goto <bb 6>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = configPtr_19(D)->Gpt_Ipw_HwInstanceConfig;
  _2 = (int) index_13;
  _3 = *_1[_2].instanceType;
  _4 = (int) _3;
  if (_4 == 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  _5 = configPtr_19(D)->Gpt_Ipw_HwInstanceConfig;
  _6 = (int) index_13;
  _7 = *_5[_6].instance;
  _8 = configPtr_19(D)->Gpt_Ipw_HwInstanceConfig;
  _9 = (int) index_13;
  _10 = *_8[_9].Gpt_Ipw_InstanceConfig.Pit_Ip_InstanceConfig;
  Pit_Ip_Init (_7, _10);
  # DEBUG BEGIN_STMT

  <bb 5> :
  # DEBUG BEGIN_STMT
  index.0_11 = index_13;
  index_21 = index.0_11 + 1;
  # DEBUG index => index_21

  <bb 6> :
  # index_13 = PHI <index_17(2), index_21(5)>
  # DEBUG index => index_13
  # DEBUG BEGIN_STMT
  _12 = configPtr_19(D)->instanceCount;
  if (index_13 < _12)
    goto <bb 3>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  return;

}


Gpt_Ipw_PitGetTimeElapsed (const struct Gpt_Ipw_HwChannelConfigType * pHwChannelConfig, struct Gpt_HwChannelInfoType * pReturnHwChannelInfo)
{
  uint32 returnValue;
  unsigned char _1;
  unsigned char _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  unsigned char _6;
  unsigned char _7;
  long long unsigned int _8;
  long unsigned int _9;
  unsigned char _10;
  unsigned char _11;
  long unsigned int _12;
  Gpt_ValueType _25;

  <bb 2> :
  # DEBUG BEGIN_STMT
  returnValue_14 = 0;
  # DEBUG returnValue => returnValue_14
  # DEBUG BEGIN_STMT
  _1 = pHwChannelConfig_16(D)->instance;
  _2 = pHwChannelConfig_16(D)->channel;
  _3 = Pit_Ip_GetLoadValue (_1, _2);
  _4 = _3 + 1;
  pReturnHwChannelInfo_18(D)->uTargetTime = _4;
  # DEBUG BEGIN_STMT
  _5 = pReturnHwChannelInfo_18(D)->uTargetTime;
  _6 = pHwChannelConfig_16(D)->instance;
  _7 = pHwChannelConfig_16(D)->channel;
  _8 = Pit_Ip_GetCurrentTimer (_6, _7);
  _9 = (long unsigned int) _8;
  returnValue_21 = _5 - _9;
  # DEBUG returnValue => returnValue_21
  # DEBUG BEGIN_STMT
  _10 = pHwChannelConfig_16(D)->instance;
  _11 = pHwChannelConfig_16(D)->channel;
  _12 = Pit_Ip_GetInterruptFlags (_10, _11);
  if (_12 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  pReturnHwChannelInfo_18(D)->bChannelRollover = 1;
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  pReturnHwChannelInfo_18(D)->bChannelRollover = 0;

  <bb 5> :
  # DEBUG BEGIN_STMT
  _25 = returnValue_21;
  return _25;

}


