Port_GetVersionInfo (struct Std_VersionInfoType * versioninfo)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  if (versioninfo_2(D) == 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Det_ReportError (124, 0, 3, 16);
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  versioninfo_2(D)->vendorID = 43;
  # DEBUG BEGIN_STMT
  versioninfo_2(D)->moduleID = 124;
  # DEBUG BEGIN_STMT
  versioninfo_2(D)->sw_major_version = 4;
  # DEBUG BEGIN_STMT
  versioninfo_2(D)->sw_minor_version = 0;
  # DEBUG BEGIN_STMT
  versioninfo_2(D)->sw_patch_version = 0;

  <bb 5> :
  return;

}


Port_RefreshPortDirection ()
{
  uint8 CoreId;
  const struct Port_ConfigType * Port_pConfigPtr.4_1;
  const struct Port_ConfigType * Port_pConfigPtr.5_2;
  const uint8 * _3;
  sizetype _4;
  const uint8 * _5;
  unsigned char _6;
  const struct Port_ConfigType * Port_pConfigPtr.6_7;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  CoreId_9 = 0;
  # DEBUG CoreId => CoreId_9
  # DEBUG BEGIN_STMT
  Port_pConfigPtr.4_1 = Port_pConfigPtr;
  if (Port_pConfigPtr.4_1 == 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Det_ReportError (124, 0, 2, 15);
  goto <bb 7>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  Port_pConfigPtr.5_2 = Port_pConfigPtr;
  _3 = Port_pConfigPtr.5_2->pau8Port_PartitionList;
  _4 = (sizetype) CoreId_9;
  _5 = _3 + _4;
  _6 = *_5;
  if (_6 != 1)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  Det_ReportError (124, 0, 2, 240);
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  Port_pConfigPtr.6_7 = Port_pConfigPtr;
  Port_Ipw_RefreshPortDirection (Port_pConfigPtr.6_7);

  <bb 7> :
  return;

}


Port_SetPinMode (Port_PinType Pin, Port_PinModeType Mode)
{
  uint8 u8PinModeError;
  const struct Port_ConfigType * Port_pConfigPtr.2_1;
  const struct Port_ConfigType * Port_pConfigPtr.3_2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  u8PinModeError_4 = 0;
  # DEBUG u8PinModeError => u8PinModeError_4
  # DEBUG BEGIN_STMT
  Port_pConfigPtr.2_1 = Port_pConfigPtr;
  if (Port_pConfigPtr.2_1 == 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Det_ReportError (124, 0, 4, 15);
  goto <bb 6>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  Port_pConfigPtr.3_2 = Port_pConfigPtr;
  u8PinModeError_9 = Port_Ipw_SetPinMode (Pin_6(D), Mode_7(D), Port_pConfigPtr.3_2);
  # DEBUG u8PinModeError => u8PinModeError_9
  # DEBUG BEGIN_STMT
  if (u8PinModeError_9 == 13)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  Det_ReportError (124, 0, 4, 13);

  <bb 6> :
  return;

}


Port_SetPinDirection (Port_PinType Pin, Port_PinDirectionType Direction)
{
  Std_ReturnType ErrStatus;
  const struct Port_ConfigType * Port_pConfigPtr.0_1;
  const struct Port_ConfigType * Port_pConfigPtr.1_2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  Port_pConfigPtr.0_1 = Port_pConfigPtr;
  if (Port_pConfigPtr.0_1 == 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Det_ReportError (124, 0, 1, 15);
  goto <bb 6>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  Port_pConfigPtr.1_2 = Port_pConfigPtr;
  ErrStatus_8 = Port_Ipw_SetPinDirection (Pin_5(D), Direction_6(D), Port_pConfigPtr.1_2);
  # DEBUG ErrStatus => ErrStatus_8
  # DEBUG BEGIN_STMT
  if (ErrStatus_8 == 1)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  Det_ReportError (124, 0, 1, 11);

  <bb 6> :
  return;

}


Port_Init (const struct Port_ConfigType * ConfigPtr)
{
  uint8 CoreId;
  const struct Port_ConfigType * pLocalConfigPtr;
  const uint8 * _1;
  sizetype _2;
  const uint8 * _3;
  unsigned char _4;

  <bb 2> :
  # DEBUG BEGIN_STMT
  pLocalConfigPtr_7 = ConfigPtr_6(D);
  # DEBUG pLocalConfigPtr => pLocalConfigPtr_7
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  CoreId_8 = 0;
  # DEBUG CoreId => CoreId_8
  # DEBUG BEGIN_STMT
  if (ConfigPtr_6(D) != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Det_ReportError (124, 0, 0, 12);
  goto <bb 7>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  pLocalConfigPtr_9 = &Port_Config;
  # DEBUG pLocalConfigPtr => pLocalConfigPtr_9
  # DEBUG BEGIN_STMT
  _1 = pLocalConfigPtr_9->pau8Port_PartitionList;
  _2 = (sizetype) CoreId_8;
  _3 = _1 + _2;
  _4 = *_3;
  if (_4 != 1)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  Det_ReportError (124, 0, 0, 240);
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  Port_Ipw_Init (pLocalConfigPtr_9);
  # DEBUG BEGIN_STMT
  Port_pConfigPtr = pLocalConfigPtr_9;

  <bb 7> :
  return;

}


