
Marking local functions: Port_Ipw_Init_UnusedPins


Marking externally visible functions: Port_Ipw_RefreshPortDirection Port_Ipw_SetGpioPadOutput Port_Ipw_SetGpioDirChangeability Port_Ipw_SetPinMode Port_Ipw_SetPinDirection Port_Ipw_Init


Marking externally visible variables:


Reclaiming functions:
Reclaiming variables:
Clearing address taken flags:
Symbol table:

SchM_Exit_Port_PORT_EXCLUSIVE_AREA_00/23 (SchM_Exit_Port_PORT_EXCLUSIVE_AREA_00) @06cbf7e0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags:
  Called by: Port_Ipw_SetGpioDirChangeability/6 
  Calls: 
SchM_Enter_Port_PORT_EXCLUSIVE_AREA_00/22 (SchM_Enter_Port_PORT_EXCLUSIVE_AREA_00) @06cbf700
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags:
  Called by: Port_Ipw_SetGpioDirChangeability/6 
  Calls: 
Port_Ci_Port_Ip_ReadPCR/21 (Port_Ci_Port_Ip_ReadPCR) @06cbf540
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags:
  Called by: Port_Ipw_SetPinMode/5 
  Calls: 
Port_au16PinDescription/20 (Port_au16PinDescription) @06cbdee8
  Type: variable
  Body removed by symtab_remove_unreachable_nodes
  Visibility: external public
  References: 
  Referring: Port_Ipw_SetPinMode/5 (read)
  Availability: not_available
  Varpool flags: read-only
Port_Ci_Port_Ip_SetPCR/19 (Port_Ci_Port_Ip_SetPCR) @06cbf2a0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags:
  Called by: Port_Ipw_SetPinMode/5 Port_Ipw_Init_UnusedPins/2 
  Calls: 
Port_Ci_Port_Ip_SetPIDR/18 (Port_Ci_Port_Ip_SetPIDR) @06cbf0e0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags:
  Called by: Port_Ipw_RefreshPortDirection/8 Port_Ipw_SetPinDirection/4 Port_Ipw_Init_UnusedPins/2 
  Calls: 
Port_Ci_Port_Ip_ClearPDDR/17 (Port_Ci_Port_Ip_ClearPDDR) @06cbf000
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags:
  Called by: Port_Ipw_RefreshPortDirection/8 Port_Ipw_SetPinDirection/4 Port_Ipw_Init_UnusedPins/2 
  Calls: 
Port_Ci_Port_Ip_SetPDDR/16 (Port_Ci_Port_Ip_SetPDDR) @06bc7e00
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags:
  Called by: Port_Ipw_RefreshPortDirection/8 Port_Ipw_SetPinDirection/4 Port_Ipw_Init_UnusedPins/2 
  Calls: 
Port_Ci_Port_Ip_SetPCOR/15 (Port_Ci_Port_Ip_SetPCOR) @06bc7000
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags:
  Called by: Port_Ipw_SetGpioPadOutput/7 Port_Ipw_Init_UnusedPins/2 
  Calls: 
Port_Ci_Port_Ip_SetPSOR/14 (Port_Ci_Port_Ip_SetPSOR) @06bc7ee0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags:
  Called by: Port_Ipw_SetGpioPadOutput/7 Port_Ipw_Init_UnusedPins/2 
  Calls: 
Port_au32PortCiGpioBaseAddr/13 (Port_au32PortCiGpioBaseAddr) @06cbd3f0
  Type: variable
  Body removed by symtab_remove_unreachable_nodes
  Visibility: external public
  References: 
  Referring: Port_Ipw_Init_UnusedPins/2 (read)Port_Ipw_Init_UnusedPins/2 (read)Port_Ipw_Init_UnusedPins/2 (read)Port_Ipw_SetPinDirection/4 (read)Port_Ipw_SetPinDirection/4 (read)Port_Ipw_SetPinDirection/4 (read)Port_Ipw_SetGpioPadOutput/7 (read)Port_Ipw_SetGpioPadOutput/7 (read)Port_Ipw_Init_UnusedPins/2 (read)Port_Ipw_Init_UnusedPins/2 (read)Port_Ipw_RefreshPortDirection/8 (read)Port_Ipw_RefreshPortDirection/8 (read)Port_Ipw_RefreshPortDirection/8 (read)
  Availability: not_available
  Varpool flags:
Port_Ci_Port_Ip_Init/12 (Port_Ci_Port_Ip_Init) @06bc7d20
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags:
  Called by: Port_Ipw_Init/3 
  Calls: 
Port_Ci_Port_Ip_SetDFER/11 (Port_Ci_Port_Ip_SetDFER) @06bc7c40
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags:
  Called by: Port_Ipw_Init/3 
  Calls: 
Port_Ci_Port_Ip_ConfigDigitalFilter/10 (Port_Ci_Port_Ip_ConfigDigitalFilter) @06bc7b60
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags:
  Called by: Port_Ipw_Init/3 
  Calls: 
Port_au32PortCiPortBaseAddr/9 (Port_au32PortCiPortBaseAddr) @06b2ee58
  Type: variable
  Body removed by symtab_remove_unreachable_nodes
  Visibility: external public
  References: 
  Referring: Port_Ipw_Init/3 (read)Port_Ipw_Init/3 (read)Port_Ipw_Init_UnusedPins/2 (read)Port_Ipw_SetPinMode/5 (read)Port_Ipw_SetPinMode/5 (read)
  Availability: not_available
  Varpool flags:
Port_Ipw_RefreshPortDirection/8 (Port_Ipw_RefreshPortDirection) @06bc7700
  Type: function definition analyzed
  Visibility: force_output externally_visible no_reorder public
  References: Port_au32PortCiGpioBaseAddr/13 (read)Port_au32PortCiGpioBaseAddr/13 (read)Port_au32PortCiGpioBaseAddr/13 (read)
  Referring: 
  Availability: available
  Function flags: body
  Called by: 
  Calls: Port_Ci_Port_Ip_SetPIDR/18 Port_Ci_Port_Ip_ClearPDDR/17 Port_Ci_Port_Ip_SetPDDR/16 
Port_Ipw_SetGpioPadOutput/7 (Port_Ipw_SetGpioPadOutput) @06b3ac40
  Type: function definition analyzed
  Visibility: force_output externally_visible no_reorder public
  References: Port_au32PortCiGpioBaseAddr/13 (read)Port_au32PortCiGpioBaseAddr/13 (read)
  Referring: 
  Availability: available
  Function flags: body
  Called by: Port_Ipw_SetPinMode/5 
  Calls: Port_Ci_Port_Ip_SetPCOR/15 Port_Ci_Port_Ip_SetPSOR/14 
Port_Ipw_SetGpioDirChangeability/6 (Port_Ipw_SetGpioDirChangeability) @06b3ab60
  Type: function definition analyzed
  Visibility: force_output externally_visible no_reorder public
  References: Port_Ipw_au16GpioDirChangeability/1 (read)Port_Ipw_au16GpioDirChangeability/1 (write)
  Referring: 
  Availability: available
  Function flags: body
  Called by: Port_Ipw_SetPinMode/5 Port_Ipw_SetPinMode/5 
  Calls: SchM_Exit_Port_PORT_EXCLUSIVE_AREA_00/23 SchM_Enter_Port_PORT_EXCLUSIVE_AREA_00/22 
Port_Ipw_SetPinMode/5 (Port_Ipw_SetPinMode) @06b3a8c0
  Type: function definition analyzed
  Visibility: force_output externally_visible no_reorder public
  References: Port_au16PinDescription/20 (read)Port_au32PortCiPortBaseAddr/9 (read)Port_au32PortCiPortBaseAddr/9 (read)
  Referring: 
  Availability: available
  Function flags: body
  Called by: 
  Calls: Port_Ci_Port_Ip_SetPCR/19 Port_Ci_Port_Ip_ReadPCR/21 Port_Ipw_SetGpioDirChangeability/6 Port_Ipw_SetPinDirection/4 Port_Ipw_SetGpioPadOutput/7 Port_Ipw_SetGpioDirChangeability/6 
Port_Ipw_SetPinDirection/4 (Port_Ipw_SetPinDirection) @06b3a2a0
  Type: function definition analyzed
  Visibility: force_output externally_visible no_reorder public
  References: Port_Ipw_au16GpioDirChangeability/1 (read)Port_au32PortCiGpioBaseAddr/13 (read)Port_au32PortCiGpioBaseAddr/13 (read)Port_au32PortCiGpioBaseAddr/13 (read)
  Referring: 
  Availability: available
  Function flags: body
  Called by: Port_Ipw_SetPinMode/5 
  Calls: Port_Ci_Port_Ip_SetPIDR/18 Port_Ci_Port_Ip_ClearPDDR/17 Port_Ci_Port_Ip_SetPDDR/16 
Port_Ipw_Init/3 (Port_Ipw_Init) @06b32c40
  Type: function definition analyzed
  Visibility: force_output externally_visible no_reorder public
  References: Port_au32PortCiPortBaseAddr/9 (read)Port_au32PortCiPortBaseAddr/9 (read)Port_Ipw_au16GpioDirChangeability/1 (write)
  Referring: 
  Availability: available
  Function flags: body
  Called by: 
  Calls: Port_Ipw_Init_UnusedPins/2 Port_Ci_Port_Ip_Init/12 Port_Ci_Port_Ip_SetDFER/11 Port_Ci_Port_Ip_ConfigDigitalFilter/10 
Port_Ipw_Init_UnusedPins/2 (Port_Ipw_Init_UnusedPins) @06b329a0
  Type: function definition analyzed
  Visibility: no_reorder prevailing_def_ironly
  References: Port_au32PortCiGpioBaseAddr/13 (read)Port_au32PortCiGpioBaseAddr/13 (read)Port_au32PortCiGpioBaseAddr/13 (read)Port_au32PortCiGpioBaseAddr/13 (read)Port_au32PortCiGpioBaseAddr/13 (read)Port_au32PortCiPortBaseAddr/9 (read)
  Referring: 
  Availability: local
  Function flags: body local
  Called by: Port_Ipw_Init/3 
  Calls: Port_Ci_Port_Ip_SetPCR/19 Port_Ci_Port_Ip_SetPIDR/18 Port_Ci_Port_Ip_ClearPDDR/17 Port_Ci_Port_Ip_SetPDDR/16 Port_Ci_Port_Ip_SetPCOR/15 Port_Ci_Port_Ip_SetPSOR/14 
Port_Ipw_au16GpioDirChangeability/1 (Port_Ipw_au16GpioDirChangeability) @06b2e000
  Type: variable definition analyzed
  Visibility: force_output no_reorder prevailing_def_ironly
  References: 
  Referring: Port_Ipw_Init/3 (write)Port_Ipw_SetPinDirection/4 (read)Port_Ipw_SetGpioDirChangeability/6 (read)Port_Ipw_SetGpioDirChangeability/6 (write)
  Availability: available
  Varpool flags:
Port_Ipw_RefreshPortDirection (const struct Port_ConfigType * pConfigPtr)
{
  uint16 PinPad;
  uint16 u16PinIndex;
  uint16 u16NumPins;
  const struct Port_PinConfigType * _1;
  unsigned int _2;
  unsigned int _3;
  const struct Port_PinConfigType * _4;
  _Bool _5;
  _Bool _6;
  const struct Port_PinConfigType * _7;
  unsigned int _8;
  unsigned int _9;
  const struct Port_PinConfigType * _10;
  _Bool _11;
  const struct Port_PinConfigType * _12;
  unsigned int _13;
  unsigned int _14;
  const struct Port_PinConfigType * _15;
  const struct Port_PinConfigType * _16;
  unsigned int _17;
  unsigned int _18;
  const struct Port_PinConfigType * _19;
  <unnamed type> _20;
  short unsigned int _21;
  long unsigned int _22;
  struct GPIO_Type * _23;
  long unsigned int _24;
  long unsigned int _25;
  long unsigned int _26;
  const struct Port_PinConfigType * _27;
  unsigned int _28;
  unsigned int _29;
  const struct Port_PinConfigType * _30;
  <unnamed type> _31;
  const struct Port_PinConfigType * _32;
  unsigned int _33;
  unsigned int _34;
  const struct Port_PinConfigType * _35;
  <unnamed type> _36;
  short unsigned int _37;
  long unsigned int _38;
  struct GPIO_Type * _39;
  long unsigned int _40;
  long unsigned int _41;
  long unsigned int _42;
  const struct Port_PinConfigType * _43;
  unsigned int _44;
  unsigned int _45;
  const struct Port_PinConfigType * _46;
  <unnamed type> _47;
  short unsigned int _48;
  long unsigned int _49;
  struct GPIO_Type * _50;
  long unsigned int _51;
  long unsigned int _52;
  long unsigned int _53;
  short unsigned int u16PinIndex.3_54;

  <bb 2> :
  u16NumPins_60 = pConfigPtr_59(D)->u16NumPins;
  u16PinIndex_61 = 0;
  goto <bb 12>; [INV]

  <bb 3> :
  _1 = pConfigPtr_59(D)->pUsedPadConfig;
  _2 = (unsigned int) u16PinIndex_55;
  _3 = _2 * 20;
  _4 = _1 + _3;
  _5 = _4->bDC;
  _6 = ~_5;
  if (_6 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 4> :
  _7 = pConfigPtr_59(D)->pUsedPadConfig;
  _8 = (unsigned int) u16PinIndex_55;
  _9 = _8 * 20;
  _10 = _7 + _9;
  _11 = _10->bGPIO;
  if (_11 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 5> :
  _12 = pConfigPtr_59(D)->pUsedPadConfig;
  _13 = (unsigned int) u16PinIndex_55;
  _14 = _13 * 20;
  _15 = _12 + _14;
  PinPad_62 = _15->Pin;
  _16 = pConfigPtr_59(D)->pUsedPadConfig;
  _17 = (unsigned int) u16PinIndex_55;
  _18 = _17 * 20;
  _19 = _16 + _18;
  _20 = _19->ePadDir;
  if (_20 == 2)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  _21 = PinPad_62 >> 5;
  _22 = (long unsigned int) _21;
  _23 = Port_au32PortCiGpioBaseAddr[_22];
  _24 = (long unsigned int) PinPad_62;
  _25 = _24 & 31;
  _26 = 1 << _25;
  Port_Ci_Port_Ip_SetPDDR (_23, _26);
  goto <bb 11>; [INV]

  <bb 7> :
  _27 = pConfigPtr_59(D)->pUsedPadConfig;
  _28 = (unsigned int) u16PinIndex_55;
  _29 = _28 * 20;
  _30 = _27 + _29;
  _31 = _30->ePadDir;
  if (_31 == 1)
    goto <bb 9>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 8> :
  _32 = pConfigPtr_59(D)->pUsedPadConfig;
  _33 = (unsigned int) u16PinIndex_55;
  _34 = _33 * 20;
  _35 = _32 + _34;
  _36 = _35->ePadDir;
  if (_36 == 3)
    goto <bb 9>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 9> :
  _37 = PinPad_62 >> 5;
  _38 = (long unsigned int) _37;
  _39 = Port_au32PortCiGpioBaseAddr[_38];
  _40 = (long unsigned int) PinPad_62;
  _41 = _40 & 31;
  _42 = 1 << _41;
  Port_Ci_Port_Ip_ClearPDDR (_39, _42);
  _43 = pConfigPtr_59(D)->pUsedPadConfig;
  _44 = (unsigned int) u16PinIndex_55;
  _45 = _44 * 20;
  _46 = _43 + _45;
  _47 = _46->ePadDir;
  if (_47 == 3)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  _48 = PinPad_62 >> 5;
  _49 = (long unsigned int) _48;
  _50 = Port_au32PortCiGpioBaseAddr[_49];
  _51 = (long unsigned int) PinPad_62;
  _52 = _51 & 31;
  _53 = 1 << _52;
  Port_Ci_Port_Ip_SetPIDR (_50, _53);

  <bb 11> :
  u16PinIndex.3_54 = u16PinIndex_55;
  u16PinIndex_66 = u16PinIndex.3_54 + 1;

  <bb 12> :
  # u16PinIndex_55 = PHI <u16PinIndex_61(2), u16PinIndex_66(11)>
  if (u16PinIndex_55 < u16NumPins_60)
    goto <bb 3>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 13> :
  return;

}


Port_Ipw_SetGpioPadOutput (Port_PinType PinIndex, const struct Port_ConfigType * pConfigPtr)
{
  uint8 u8LocalPDO;
  uint16 Pin;
  const struct Port_PinConfigType * _1;
  long unsigned int _2;
  const struct Port_PinConfigType * _3;
  const struct Port_PinConfigType * _4;
  long unsigned int _5;
  const struct Port_PinConfigType * _6;
  short unsigned int _7;
  long unsigned int _8;
  struct GPIO_Type * _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  short unsigned int _13;
  long unsigned int _14;
  struct GPIO_Type * _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;

  <bb 2> :
  _1 = pConfigPtr_21(D)->pUsedPadConfig;
  _2 = PinIndex_22(D) * 20;
  _3 = _1 + _2;
  Pin_23 = _3->Pin;
  _4 = pConfigPtr_21(D)->pUsedPadConfig;
  _5 = PinIndex_22(D) * 20;
  _6 = _4 + _5;
  u8LocalPDO_24 = _6->u8PDO;
  if (u8LocalPDO_24 == 1)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  _7 = Pin_23 >> 5;
  _8 = (long unsigned int) _7;
  _9 = Port_au32PortCiGpioBaseAddr[_8];
  _10 = (long unsigned int) Pin_23;
  _11 = _10 & 31;
  _12 = 1 << _11;
  Port_Ci_Port_Ip_SetPSOR (_9, _12);
  goto <bb 6>; [INV]

  <bb 4> :
  if (u8LocalPDO_24 == 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  _13 = Pin_23 >> 5;
  _14 = (long unsigned int) _13;
  _15 = Port_au32PortCiGpioBaseAddr[_14];
  _16 = (long unsigned int) Pin_23;
  _17 = _16 & 31;
  _18 = 1 << _17;
  Port_Ci_Port_Ip_SetPCOR (_15, _18);

  <bb 6> :
  return;

}


Port_Ipw_SetGpioDirChangeability (uint16 PadID, boolean bStatus)
{
  uint16 u16PinDirFlagWord;
  uint8 u8PinBitOffset;
  unsigned char _1;
  unsigned char _2;
  unsigned char _3;
  int _4;
  int _5;
  long unsigned int _6;
  short unsigned int _7;
  int _8;
  long unsigned int _9;
  short unsigned int _10;
  short unsigned int _11;
  unsigned char _12;
  unsigned char _13;
  int _14;

  <bb 2> :
  SchM_Enter_Port_PORT_EXCLUSIVE_AREA_00 ();
  _1 = (unsigned char) PadID_18(D);
  u8PinBitOffset_19 = _1 & 15;
  _2 = (unsigned char) PadID_18(D);
  _3 = _2 >> 4;
  _4 = (int) _3;
  u16PinDirFlagWord_20 = Port_Ipw_au16GpioDirChangeability[_4];
  if (bStatus_21(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  _5 = (int) u8PinBitOffset_19;
  _6 = 1 << _5;
  _7 = (short unsigned int) _6;
  u16PinDirFlagWord_23 = u16PinDirFlagWord_20 | _7;
  goto <bb 5>; [INV]

  <bb 4> :
  _8 = (int) u8PinBitOffset_19;
  _9 = 1 << _8;
  _10 = (short unsigned int) _9;
  _11 = ~_10;
  u16PinDirFlagWord_22 = u16PinDirFlagWord_20 & _11;

  <bb 5> :
  # u16PinDirFlagWord_15 = PHI <u16PinDirFlagWord_23(3), u16PinDirFlagWord_22(4)>
  _12 = (unsigned char) PadID_18(D);
  _13 = _12 >> 4;
  _14 = (int) _13;
  Port_Ipw_au16GpioDirChangeability[_14] = u16PinDirFlagWord_15;
  SchM_Exit_Port_PORT_EXCLUSIVE_AREA_00 ();
  return;

}


Port_Ipw_SetPinMode (Port_PinType PinIndex, Port_PinModeType PinMode, const struct Port_ConfigType * pConfigPtr)
{
  Port_PinDirectionType ePadDirection;
  uint32 u32LocalPCR;
  uint16 u16PinDescBitOffset;
  uint16 u16PinDescWord;
  Port_PinModeType PinCfgRegValue;
  uint16 PinPad;
  Std_ReturnType PinModeError;
  Std_ReturnType D.5867;
  const struct Port_PinConfigType * _1;
  long unsigned int _2;
  const struct Port_PinConfigType * _3;
  int _4;
  short unsigned int _5;
  int _6;
  int _7;
  int _8;
  int _9;
  int _10;
  int _11;
  const struct Port_PinConfigType * _12;
  long unsigned int _13;
  const struct Port_PinConfigType * _14;
  short unsigned int _15;
  long unsigned int _16;
  struct PORT_Type * _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  short unsigned int _22;
  long unsigned int _23;
  struct PORT_Type * _24;
  long unsigned int _25;
  long unsigned int _26;
  Std_ReturnType _53;

  <bb 2> :
  PinModeError_31 = 0;
  _1 = pConfigPtr_33(D)->pUsedPadConfig;
  _2 = PinIndex_34(D) * 20;
  _3 = _1 + _2;
  PinPad_35 = _3->Pin;
  PinCfgRegValue_37 = PinMode_36(D);
  if (PinMode_36(D) > 7)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  PinModeError_52 = 13;
  goto <bb 13>; [INV]

  <bb 4> :
  ePadDirection_38 = 0;
  u16PinDescBitOffset_39 = PinPad_35 & 15;
  _4 = (int) PinMode_36(D);
  _5 = PinPad_35 >> 4;
  _6 = (int) _5;
  u16PinDescWord_40 = Port_au16PinDescription[_4][_6];
  _7 = (int) u16PinDescWord_40;
  _8 = (int) u16PinDescBitOffset_39;
  _9 = _7 >> _8;
  _10 = _9 & 1;
  if (_10 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 5> :
  _11 = (int) PinMode_36(D);
  if (_11 == 1)
    goto <bb 6>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 6> :
<L3>:
  Port_Ipw_SetGpioDirChangeability (PinPad_35, 1);
  _12 = pConfigPtr_33(D)->pUsedPadConfig;
  _13 = PinIndex_34(D) * 20;
  _14 = _12 + _13;
  ePadDirection_43 = _14->ePadDir;
  if (ePadDirection_43 != 1)
    goto <bb 7>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 7> :
  if (ePadDirection_43 != 3)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  Port_Ipw_SetGpioPadOutput (PinIndex_34(D), pConfigPtr_33(D));

  <bb 9> :
  Port_Ipw_SetPinDirection (PinIndex_34(D), ePadDirection_43, pConfigPtr_33(D));
  goto <bb 11>; [INV]

  <bb 10> :
<L8>:
  Port_Ipw_SetGpioDirChangeability (PinPad_35, 0);

  <bb 11> :
  _15 = PinPad_35 >> 5;
  _16 = (long unsigned int) _15;
  _17 = Port_au32PortCiPortBaseAddr[_16];
  _18 = (long unsigned int) PinPad_35;
  _19 = _18 & 31;
  u32LocalPCR_48 = Port_Ci_Port_Ip_ReadPCR (_17, _19);
  u32LocalPCR_49 = u32LocalPCR_48 & 4294965503;
  _20 = (long unsigned int) PinCfgRegValue_37;
  _21 = _20 << 8;
  u32LocalPCR_50 = u32LocalPCR_49 | _21;
  _22 = PinPad_35 >> 5;
  _23 = (long unsigned int) _22;
  _24 = Port_au32PortCiPortBaseAddr[_23];
  _25 = (long unsigned int) PinPad_35;
  _26 = _25 & 31;
  Port_Ci_Port_Ip_SetPCR (_24, _26, u32LocalPCR_50);
  goto <bb 13>; [INV]

  <bb 12> :
  PinModeError_41 = 13;

  <bb 13> :
  # PinModeError_27 = PHI <PinModeError_52(3), PinModeError_31(11), PinModeError_41(12)>
  _53 = PinModeError_27;

  <bb 14> :
<L13>:
  return _53;

}


Port_Ipw_SetPinDirection (Port_PinType PinIndex, Port_PinDirectionType eDirection, const struct Port_ConfigType * pConfigPtr)
{
  uint16 u16PinChangeDirFlagWord;
  uint8 u8PinDescBitOffset;
  Std_ReturnType PinDirError;
  uint16 Pin;
  Std_ReturnType D.5855;
  const struct Port_PinConfigType * _1;
  long unsigned int _2;
  const struct Port_PinConfigType * _3;
  unsigned char _4;
  short unsigned int _5;
  unsigned char _6;
  int _7;
  const struct Port_PinConfigType * _8;
  long unsigned int _9;
  const struct Port_PinConfigType * _10;
  _Bool _11;
  int _12;
  long unsigned int _13;
  short unsigned int _14;
  short unsigned int _15;
  short unsigned int _16;
  long unsigned int _17;
  struct GPIO_Type * _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  short unsigned int _22;
  long unsigned int _23;
  struct GPIO_Type * _24;
  long unsigned int _25;
  long unsigned int _26;
  long unsigned int _27;
  short unsigned int _28;
  long unsigned int _29;
  struct GPIO_Type * _30;
  long unsigned int _31;
  long unsigned int _32;
  long unsigned int _33;
  Std_ReturnType _49;

  <bb 2> :
  _1 = pConfigPtr_38(D)->pUsedPadConfig;
  _2 = PinIndex_39(D) * 20;
  _3 = _1 + _2;
  Pin_40 = _3->Pin;
  PinDirError_41 = 0;
  _4 = (unsigned char) Pin_40;
  u8PinDescBitOffset_42 = _4 & 15;
  _5 = Pin_40 >> 4;
  _6 = (unsigned char) _5;
  _7 = (int) _6;
  u16PinChangeDirFlagWord_43 = Port_Ipw_au16GpioDirChangeability[_7];
  _8 = pConfigPtr_38(D)->pUsedPadConfig;
  _9 = PinIndex_39(D) * 20;
  _10 = _8 + _9;
  _11 = _10->bDC;
  if (_11 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 3>; [INV]

  <bb 3> :
  _12 = (int) u8PinDescBitOffset_42;
  _13 = 1 << _12;
  _14 = (short unsigned int) _13;
  _15 = u16PinChangeDirFlagWord_43 & _14;
  if (_15 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 4> :
  if (eDirection_45(D) == 2)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  _16 = Pin_40 >> 5;
  _17 = (long unsigned int) _16;
  _18 = Port_au32PortCiGpioBaseAddr[_17];
  _19 = (long unsigned int) Pin_40;
  _20 = _19 & 31;
  _21 = 1 << _20;
  Port_Ci_Port_Ip_SetPDDR (_18, _21);
  goto <bb 10>; [INV]

  <bb 6> :
  if (eDirection_45(D) == 1)
    goto <bb 8>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 7> :
  if (eDirection_45(D) == 3)
    goto <bb 8>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 8> :
  _22 = Pin_40 >> 5;
  _23 = (long unsigned int) _22;
  _24 = Port_au32PortCiGpioBaseAddr[_23];
  _25 = (long unsigned int) Pin_40;
  _26 = _25 & 31;
  _27 = 1 << _26;
  Port_Ci_Port_Ip_ClearPDDR (_24, _27);
  if (eDirection_45(D) == 3)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  _28 = Pin_40 >> 5;
  _29 = (long unsigned int) _28;
  _30 = Port_au32PortCiGpioBaseAddr[_29];
  _31 = (long unsigned int) Pin_40;
  _32 = _31 & 31;
  _33 = 1 << _32;
  Port_Ci_Port_Ip_SetPIDR (_30, _33);

  <bb 10> :
  goto <bb 12>; [INV]

  <bb 11> :
  PinDirError_44 = 1;

  <bb 12> :
  # PinDirError_34 = PHI <PinDirError_41(10), PinDirError_44(11)>
  _49 = PinDirError_34;

  <bb 13> :
<L12>:
  return _49;

}


Port_Ipw_Init (const struct Port_ConfigType * pConfigPtr)
{
  uint8 u8Port;
  uint8 u8NumDigFilterPorts;
  uint16 u16PinIndex;
  const struct Port_Ci_Port_Ip_DigitalFilterConfigType * _1;
  unsigned int _2;
  unsigned int _3;
  const struct Port_Ci_Port_Ip_DigitalFilterConfigType * _4;
  int _5;
  struct PORT_Type * _6;
  const struct Port_Ci_Port_Ip_DigitalFilterConfigType * _7;
  unsigned int _8;
  unsigned int _9;
  const struct Port_Ci_Port_Ip_DigitalFilterConfigType * _10;
  int _11;
  struct PORT_Type * _12;
  const struct Port_Ci_Port_Ip_DigitalFilterConfigType * _13;
  unsigned int _14;
  unsigned int _15;
  const struct Port_Ci_Port_Ip_DigitalFilterConfigType * _16;
  long unsigned int _17;
  short unsigned int u16PinIndex.0_18;
  short unsigned int _19;
  const struct Port_Ci_Port_Ip_PinSettingsConfig * _20;
  int _21;
  short unsigned int u16PinIndex.1_22;

  <bb 2> :
  u8NumDigFilterPorts_29 = pConfigPtr_28(D)->u8NumDigitalFilterPorts;
  u16PinIndex_30 = 0;
  goto <bb 4>; [INV]

  <bb 3> :
  _1 = pConfigPtr_28(D)->pDigitalFilterConfig;
  _2 = (unsigned int) u16PinIndex_23;
  _3 = _2 * 8;
  _4 = _1 + _3;
  u8Port_36 = _4->u8Port;
  _5 = (int) u8Port_36;
  _6 = Port_au32PortCiPortBaseAddr[_5];
  _7 = pConfigPtr_28(D)->pDigitalFilterConfig;
  _8 = (unsigned int) u16PinIndex_23;
  _9 = _8 * 8;
  _10 = _7 + _9;
  Port_Ci_Port_Ip_ConfigDigitalFilter (_6, _10);
  _11 = (int) u8Port_36;
  _12 = Port_au32PortCiPortBaseAddr[_11];
  _13 = pConfigPtr_28(D)->pDigitalFilterConfig;
  _14 = (unsigned int) u16PinIndex_23;
  _15 = _14 * 8;
  _16 = _13 + _15;
  _17 = _16->u32PinMask;
  Port_Ci_Port_Ip_SetDFER (_12, _17);
  u16PinIndex.0_18 = u16PinIndex_23;
  u16PinIndex_39 = u16PinIndex.0_18 + 1;

  <bb 4> :
  # u16PinIndex_23 = PHI <u16PinIndex_30(2), u16PinIndex_39(3)>
  _19 = (short unsigned int) u8NumDigFilterPorts_29;
  if (u16PinIndex_23 < _19)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  _20 = pConfigPtr_28(D)->IpConfigPtr;
  Port_Ci_Port_Ip_Init (13, _20);
  Port_Ipw_Init_UnusedPins (pConfigPtr_28(D));
  u16PinIndex_33 = 0;
  goto <bb 7>; [INV]

  <bb 6> :
  _21 = (int) u16PinIndex_24;
  Port_Ipw_au16GpioDirChangeability[_21] = 0;
  u16PinIndex.1_22 = u16PinIndex_24;
  u16PinIndex_35 = u16PinIndex.1_22 + 1;

  <bb 7> :
  # u16PinIndex_24 = PHI <u16PinIndex_33(5), u16PinIndex_35(6)>
  if (u16PinIndex_24 <= 8)
    goto <bb 6>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 8> :
  return;

}


Port_Ipw_Init_UnusedPins (const struct Port_ConfigType * pConfigPtr)
{
  Port_PinDirectionType eLocalPDDIR;
  uint32 u32LocalPCR;
  uint8 u8LocalPDO;
  uint16 u16NumUnusedPins;
  uint16 u16PinIndex;
  const struct Port_UnUsedPinConfigType * _1;
  const struct Port_UnUsedPinConfigType * _2;
  const struct Port_UnUsedPinConfigType * _3;
  const uint16 * _4;
  unsigned int _5;
  unsigned int _6;
  const uint16 * _7;
  short unsigned int _8;
  short unsigned int _9;
  long unsigned int _10;
  struct GPIO_Type * _11;
  const uint16 * _12;
  unsigned int _13;
  unsigned int _14;
  const uint16 * _15;
  short unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  const uint16 * _20;
  unsigned int _21;
  unsigned int _22;
  const uint16 * _23;
  short unsigned int _24;
  short unsigned int _25;
  long unsigned int _26;
  struct GPIO_Type * _27;
  const uint16 * _28;
  unsigned int _29;
  unsigned int _30;
  const uint16 * _31;
  short unsigned int _32;
  long unsigned int _33;
  long unsigned int _34;
  long unsigned int _35;
  const uint16 * _36;
  unsigned int _37;
  unsigned int _38;
  const uint16 * _39;
  short unsigned int _40;
  short unsigned int _41;
  long unsigned int _42;
  struct GPIO_Type * _43;
  const uint16 * _44;
  unsigned int _45;
  unsigned int _46;
  const uint16 * _47;
  short unsigned int _48;
  long unsigned int _49;
  long unsigned int _50;
  long unsigned int _51;
  const uint16 * _52;
  unsigned int _53;
  unsigned int _54;
  const uint16 * _55;
  short unsigned int _56;
  short unsigned int _57;
  long unsigned int _58;
  struct GPIO_Type * _59;
  const uint16 * _60;
  unsigned int _61;
  unsigned int _62;
  const uint16 * _63;
  short unsigned int _64;
  long unsigned int _65;
  long unsigned int _66;
  long unsigned int _67;
  const uint16 * _68;
  unsigned int _69;
  unsigned int _70;
  const uint16 * _71;
  short unsigned int _72;
  short unsigned int _73;
  long unsigned int _74;
  struct GPIO_Type * _75;
  const uint16 * _76;
  unsigned int _77;
  unsigned int _78;
  const uint16 * _79;
  short unsigned int _80;
  long unsigned int _81;
  long unsigned int _82;
  long unsigned int _83;
  const uint16 * _84;
  unsigned int _85;
  unsigned int _86;
  const uint16 * _87;
  short unsigned int _88;
  short unsigned int _89;
  long unsigned int _90;
  struct PORT_Type * _91;
  const uint16 * _92;
  unsigned int _93;
  unsigned int _94;
  const uint16 * _95;
  short unsigned int _96;
  long unsigned int _97;
  long unsigned int _98;
  short unsigned int u16PinIndex.2_99;

  <bb 2> :
  u16NumUnusedPins_106 = pConfigPtr_105(D)->u16NumUnusedPins;
  _1 = pConfigPtr_105(D)->pUnusedPadConfig;
  u8LocalPDO_107 = _1->u8PDO;
  _2 = pConfigPtr_105(D)->pUnusedPadConfig;
  u32LocalPCR_108 = _2->u32PCR;
  _3 = pConfigPtr_105(D)->pUnusedPadConfig;
  eLocalPDDIR_109 = _3->ePadDir;
  u16PinIndex_110 = 0;
  goto <bb 12>; [INV]

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

  <bb 4> :
  if (u8LocalPDO_107 == 1)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  _4 = pConfigPtr_105(D)->pUnusedPads;
  _5 = (unsigned int) u16PinIndex_100;
  _6 = _5 * 2;
  _7 = _4 + _6;
  _8 = *_7;
  _9 = _8 >> 5;
  _10 = (long unsigned int) _9;
  _11 = Port_au32PortCiGpioBaseAddr[_10];
  _12 = pConfigPtr_105(D)->pUnusedPads;
  _13 = (unsigned int) u16PinIndex_100;
  _14 = _13 * 2;
  _15 = _12 + _14;
  _16 = *_15;
  _17 = (long unsigned int) _16;
  _18 = _17 & 31;
  _19 = 1 << _18;
  Port_Ci_Port_Ip_SetPSOR (_11, _19);
  goto <bb 8>; [INV]

  <bb 6> :
  if (u8LocalPDO_107 == 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  _20 = pConfigPtr_105(D)->pUnusedPads;
  _21 = (unsigned int) u16PinIndex_100;
  _22 = _21 * 2;
  _23 = _20 + _22;
  _24 = *_23;
  _25 = _24 >> 5;
  _26 = (long unsigned int) _25;
  _27 = Port_au32PortCiGpioBaseAddr[_26];
  _28 = pConfigPtr_105(D)->pUnusedPads;
  _29 = (unsigned int) u16PinIndex_100;
  _30 = _29 * 2;
  _31 = _28 + _30;
  _32 = *_31;
  _33 = (long unsigned int) _32;
  _34 = _33 & 31;
  _35 = 1 << _34;
  Port_Ci_Port_Ip_SetPCOR (_27, _35);

  <bb 8> :
  _36 = pConfigPtr_105(D)->pUnusedPads;
  _37 = (unsigned int) u16PinIndex_100;
  _38 = _37 * 2;
  _39 = _36 + _38;
  _40 = *_39;
  _41 = _40 >> 5;
  _42 = (long unsigned int) _41;
  _43 = Port_au32PortCiGpioBaseAddr[_42];
  _44 = pConfigPtr_105(D)->pUnusedPads;
  _45 = (unsigned int) u16PinIndex_100;
  _46 = _45 * 2;
  _47 = _44 + _46;
  _48 = *_47;
  _49 = (long unsigned int) _48;
  _50 = _49 & 31;
  _51 = 1 << _50;
  Port_Ci_Port_Ip_SetPDDR (_43, _51);
  goto <bb 11>; [INV]

  <bb 9> :
  _52 = pConfigPtr_105(D)->pUnusedPads;
  _53 = (unsigned int) u16PinIndex_100;
  _54 = _53 * 2;
  _55 = _52 + _54;
  _56 = *_55;
  _57 = _56 >> 5;
  _58 = (long unsigned int) _57;
  _59 = Port_au32PortCiGpioBaseAddr[_58];
  _60 = pConfigPtr_105(D)->pUnusedPads;
  _61 = (unsigned int) u16PinIndex_100;
  _62 = _61 * 2;
  _63 = _60 + _62;
  _64 = *_63;
  _65 = (long unsigned int) _64;
  _66 = _65 & 31;
  _67 = 1 << _66;
  Port_Ci_Port_Ip_ClearPDDR (_59, _67);
  if (eLocalPDDIR_109 == 3)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  _68 = pConfigPtr_105(D)->pUnusedPads;
  _69 = (unsigned int) u16PinIndex_100;
  _70 = _69 * 2;
  _71 = _68 + _70;
  _72 = *_71;
  _73 = _72 >> 5;
  _74 = (long unsigned int) _73;
  _75 = Port_au32PortCiGpioBaseAddr[_74];
  _76 = pConfigPtr_105(D)->pUnusedPads;
  _77 = (unsigned int) u16PinIndex_100;
  _78 = _77 * 2;
  _79 = _76 + _78;
  _80 = *_79;
  _81 = (long unsigned int) _80;
  _82 = _81 & 31;
  _83 = 1 << _82;
  Port_Ci_Port_Ip_SetPIDR (_75, _83);

  <bb 11> :
  _84 = pConfigPtr_105(D)->pUnusedPads;
  _85 = (unsigned int) u16PinIndex_100;
  _86 = _85 * 2;
  _87 = _84 + _86;
  _88 = *_87;
  _89 = _88 >> 5;
  _90 = (long unsigned int) _89;
  _91 = Port_au32PortCiPortBaseAddr[_90];
  _92 = pConfigPtr_105(D)->pUnusedPads;
  _93 = (unsigned int) u16PinIndex_100;
  _94 = _93 * 2;
  _95 = _92 + _94;
  _96 = *_95;
  _97 = (long unsigned int) _96;
  _98 = _97 & 31;
  Port_Ci_Port_Ip_SetPCR (_91, _98, u32LocalPCR_108);
  u16PinIndex.2_99 = u16PinIndex_100;
  u16PinIndex_117 = u16PinIndex.2_99 + 1;

  <bb 12> :
  # u16PinIndex_100 = PHI <u16PinIndex_110(2), u16PinIndex_117(11)>
  if (u16PinIndex_100 < u16NumUnusedPins_106)
    goto <bb 3>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 13> :
  return;

}


