Dio_Ipw_WriteChannelGroup (const struct Dio_ChannelGroupType * pChannelGroupIdPtr, Dio_PortLevelType Level)
{
  struct GPIO_Type * GpioBase;
  Dio_PortLevelType ValueClear;
  Dio_PortLevelType ValueSet;
  unsigned char _1;
  int _2;
  long unsigned int _3;
  unsigned char _4;
  int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pChannelGroupIdPtr_11(D)->port;
  _2 = (int) _1;
  _3 = GpioBaseAdresses[_2];
  GpioBase_12 = (struct GPIO_Type *) _3;
  # DEBUG GpioBase => GpioBase_12
  # DEBUG BEGIN_STMT
  _4 = pChannelGroupIdPtr_11(D)->u8offset;
  _5 = (int) _4;
  _6 = Level_13(D) << _5;
  _7 = pChannelGroupIdPtr_11(D)->mask;
  ValueSet_14 = _6 & _7;
  # DEBUG ValueSet => ValueSet_14
  # DEBUG BEGIN_STMT
  Gpio_Dio_Ip_SetPins (GpioBase_12, ValueSet_14);
  # DEBUG BEGIN_STMT
  _8 = ~ValueSet_14;
  _9 = pChannelGroupIdPtr_11(D)->mask;
  ValueClear_16 = _8 & _9;
  # DEBUG ValueClear => ValueClear_16
  # DEBUG BEGIN_STMT
  Gpio_Dio_Ip_ClearPins (GpioBase_12, ValueClear_16);
  return;

}


Dio_Ipw_ReadChannelGroup (const struct Dio_ChannelGroupType * pChannelGroupIdPtr)
{
  const struct GPIO_Type * GpioBase;
  Dio_PortLevelType pinsValue;
  Dio_PortLevelType PortLevel;
  unsigned char _1;
  int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  unsigned char _6;
  int _7;
  Dio_PortLevelType _15;

  <bb 2> :
  # DEBUG BEGIN_STMT
  PortLevel_8 = 0;
  # DEBUG PortLevel => PortLevel_8
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = pChannelGroupIdPtr_10(D)->port;
  _2 = (int) _1;
  _3 = GpioBaseAdresses[_2];
  GpioBase_11 = (const struct GPIO_Type *) _3;
  # DEBUG GpioBase => GpioBase_11
  # DEBUG BEGIN_STMT
  pinsValue_13 = Gpio_Dio_Ip_ReadPins (GpioBase_11);
  # DEBUG pinsValue => pinsValue_13
  # DEBUG BEGIN_STMT
  _4 = pChannelGroupIdPtr_10(D)->mask;
  _5 = pinsValue_13 & _4;
  _6 = pChannelGroupIdPtr_10(D)->u8offset;
  _7 = (int) _6;
  PortLevel_14 = _5 >> _7;
  # DEBUG PortLevel => PortLevel_14
  # DEBUG BEGIN_STMT
  _15 = PortLevel_14;
  return _15;

}


Dio_Ipw_WritePort (Dio_PortType PortId, Dio_PortLevelType Level)
{
  struct GPIO_Type * GpioBase;
  Dio_PortLevelType CrtLevel;
  int _1;
  long unsigned int _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  CrtLevel_4 = Level_3(D);
  # DEBUG CrtLevel => CrtLevel_4
  # DEBUG BEGIN_STMT
  _1 = (int) PortId_5(D);
  _2 = GpioBaseAdresses[_1];
  GpioBase_7 = (struct GPIO_Type *) _2;
  # DEBUG GpioBase => GpioBase_7
  # DEBUG BEGIN_STMT
  Gpio_Dio_Ip_WritePins (GpioBase_7, CrtLevel_4);
  return;

}


Dio_Ipw_ReadPort (Dio_PortType PortId)
{
  const struct GPIO_Type * GpioBase;
  Dio_PortLevelType PortLevel;
  int _1;
  long unsigned int _2;
  Dio_PortLevelType _9;

  <bb 2> :
  # DEBUG BEGIN_STMT
  PortLevel_3 = 0;
  # DEBUG PortLevel => PortLevel_3
  # DEBUG BEGIN_STMT
  _1 = (int) PortId_4(D);
  _2 = GpioBaseAdresses[_1];
  GpioBase_6 = (const struct GPIO_Type *) _2;
  # DEBUG GpioBase => GpioBase_6
  # DEBUG BEGIN_STMT
  PortLevel_8 = Gpio_Dio_Ip_ReadPins (GpioBase_6);
  # DEBUG PortLevel => PortLevel_8
  # DEBUG BEGIN_STMT
  _9 = PortLevel_8;
  return _9;

}


Dio_Ipw_WriteChannel (Dio_ChannelType ChannelId, Dio_LevelType Level)
{
  struct GPIO_Type * GpioBase;
  uint32 u32PinIndex;
  uint32 u32GpioInstance;
  short unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = ChannelId_4(D) >> 5;
  u32GpioInstance_5 = (uint32) _1;
  # DEBUG u32GpioInstance => u32GpioInstance_5
  # DEBUG BEGIN_STMT
  _2 = (long unsigned int) ChannelId_4(D);
  u32PinIndex_6 = _2 & 31;
  # DEBUG u32PinIndex => u32PinIndex_6
  # DEBUG BEGIN_STMT
  _3 = GpioBaseAdresses[u32GpioInstance_5];
  GpioBase_8 = (struct GPIO_Type *) _3;
  # DEBUG GpioBase => GpioBase_8
  # DEBUG BEGIN_STMT
  Gpio_Dio_Ip_WritePin (GpioBase_8, u32PinIndex_6, Level_9(D));
  return;

}


Dio_Ipw_ReadChannel (Dio_ChannelType ChannelId)
{
  const struct GPIO_Type * GpioBase;
  uint32 u32PinIndex;
  uint32 u32GpioInstance;
  Dio_LevelType ChannelLevel;
  short unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  Dio_LevelType _12;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ChannelLevel_4 = 0;
  # DEBUG ChannelLevel => ChannelLevel_4
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = ChannelId_5(D) >> 5;
  u32GpioInstance_6 = (uint32) _1;
  # DEBUG u32GpioInstance => u32GpioInstance_6
  # DEBUG BEGIN_STMT
  _2 = (long unsigned int) ChannelId_5(D);
  u32PinIndex_7 = _2 & 31;
  # DEBUG u32PinIndex => u32PinIndex_7
  # DEBUG BEGIN_STMT
  _3 = GpioBaseAdresses[u32GpioInstance_6];
  GpioBase_9 = (const struct GPIO_Type *) _3;
  # DEBUG GpioBase => GpioBase_9
  # DEBUG BEGIN_STMT
  ChannelLevel_11 = Gpio_Dio_Ip_ReadPin (GpioBase_9, u32PinIndex_7);
  # DEBUG ChannelLevel => ChannelLevel_11
  # DEBUG BEGIN_STMT
  _12 = ChannelLevel_11;
  return _12;

}


