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 = 1;
  # 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_pConfig.9_1;
  const struct Port_ConfigType * Port_pConfig.10_2;
  const uint8 * _3;
  sizetype _4;
  const uint8 * _5;
  unsigned char _6;
  const struct Port_ConfigType * Port_pConfig.11_7;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  CoreId_9 = 0;
  # DEBUG CoreId => CoreId_9
  # DEBUG BEGIN_STMT
  Port_pConfig.9_1 = Port_pConfig;
  if (Port_pConfig.9_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_pConfig.10_2 = Port_pConfig;
  _3 = Port_pConfig.10_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_pConfig.11_7 = Port_pConfig;
  Port_Ipw_RefreshPortDirection (Port_pConfig.11_7);

  <bb 7> :
  return;

}


Port_SetPinMode (Port_PinType Pin, Port_PinModeType Mode)
{
  uint8 CoreId;
  uint8 u8PinModeError;
  const struct Port_ConfigType * Port_pConfig.4_1;
  const struct Port_ConfigType * Port_pConfig.5_2;
  short unsigned int _3;
  long unsigned int _4;
  const struct Port_ConfigType * Port_pConfig.6_5;
  const uint32 * _6;
  long unsigned int _7;
  const uint32 * _8;
  long unsigned int _9;
  int _10;
  long unsigned int _11;
  long unsigned int _12;
  int _13;
  long unsigned int _14;
  const struct Port_ConfigType * Port_pConfig.7_15;
  const struct Port_PinConfigType * _16;
  long unsigned int _17;
  const struct Port_PinConfigType * _18;
  _Bool _19;
  _Bool _20;
  const struct Port_ConfigType * Port_pConfig.8_21;

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

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  Port_pConfig.5_2 = Port_pConfig;
  _3 = Port_pConfig.5_2->u16NumPins;
  _4 = (long unsigned int) _3;
  if (Pin_26(D) >= _4)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  Det_ReportError (124, 0, 4, 10);
  goto <bb 12>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  Port_pConfig.6_5 = Port_pConfig;
  _6 = Port_pConfig.6_5->pau32Port_PinToPartitionMap;
  _7 = Pin_26(D) * 4;
  _8 = _6 + _7;
  _9 = *_8;
  _10 = (int) CoreId_24;
  _11 = 1 << _10;
  _12 = _9 & _11;
  _13 = (int) CoreId_24;
  _14 = _12 >> _13;
  if (_14 != 1)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

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

  <bb 8> :
  # DEBUG BEGIN_STMT
  Port_pConfig.7_15 = Port_pConfig;
  _16 = Port_pConfig.7_15->pUsedPadConfig;
  _17 = Pin_26(D) * 20;
  _18 = _16 + _17;
  _19 = _18->bMC;
  _20 = ~_19;
  if (_20 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  Det_ReportError (124, 0, 4, 14);
  goto <bb 12>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  Port_pConfig.8_21 = Port_pConfig;
  u8PinModeError_29 = Port_Ipw_SetPinMode (Pin_26(D), Mode_27(D), Port_pConfig.8_21);
  # DEBUG u8PinModeError => u8PinModeError_29
  # DEBUG BEGIN_STMT
  if (u8PinModeError_29 == 13)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

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

  <bb 12> :
  return;

}


Port_SetPinDirection (Port_PinType Pin, Port_PinDirectionType Direction)
{
  uint8 CoreId;
  Std_ReturnType ErrStatus;
  const struct Port_ConfigType * Port_pConfig.0_1;
  const struct Port_ConfigType * Port_pConfig.1_2;
  short unsigned int _3;
  long unsigned int _4;
  const struct Port_ConfigType * Port_pConfig.2_5;
  const uint32 * _6;
  long unsigned int _7;
  const uint32 * _8;
  long unsigned int _9;
  int _10;
  long unsigned int _11;
  long unsigned int _12;
  int _13;
  long unsigned int _14;
  const struct Port_ConfigType * Port_pConfig.3_15;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  CoreId_17 = 0;
  # DEBUG CoreId => CoreId_17
  # DEBUG BEGIN_STMT
  Port_pConfig.0_1 = Port_pConfig;
  if (Port_pConfig.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 10>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  Port_pConfig.1_2 = Port_pConfig;
  _3 = Port_pConfig.1_2->u16NumPins;
  _4 = (long unsigned int) _3;
  if (Pin_19(D) >= _4)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

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

  <bb 6> :
  # DEBUG BEGIN_STMT
  Port_pConfig.2_5 = Port_pConfig;
  _6 = Port_pConfig.2_5->pau32Port_PinToPartitionMap;
  _7 = Pin_19(D) * 4;
  _8 = _6 + _7;
  _9 = *_8;
  _10 = (int) CoreId_17;
  _11 = 1 << _10;
  _12 = _9 & _11;
  _13 = (int) CoreId_17;
  _14 = _12 >> _13;
  if (_14 != 1)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

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

  <bb 8> :
  # DEBUG BEGIN_STMT
  Port_pConfig.3_15 = Port_pConfig;
  ErrStatus_22 = Port_Ipw_SetPinDirection (Pin_19(D), Direction_20(D), Port_pConfig.3_15);
  # DEBUG ErrStatus => ErrStatus_22
  # DEBUG BEGIN_STMT
  if (ErrStatus_22 == 1)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

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

  <bb 10> :
  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_pConfig = pLocalConfigPtr_9;

  <bb 7> :
  return;

}


