Uart_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 (255, 0, 10, 3);
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  VersionInfo_2(D)->vendorID = 43;
  # DEBUG BEGIN_STMT
  VersionInfo_2(D)->moduleID = 255;
  # 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;

}


Uart_GetStatus (uint8 Channel, uint32 * BytesTransfered, Uart_DataDirectionType TransferType)
{
  uint8 CoreId;
  Uart_StatusType TempReturn;
  int _1;
  <unnamed type> _2;
  Uart_StatusType _18;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  TempReturn_5 = 4;
  # DEBUG TempReturn => TempReturn_5
  # DEBUG BEGIN_STMT
  CoreId_6 = 0;
  # DEBUG CoreId => CoreId_6
  # DEBUG BEGIN_STMT
  _1 = (int) CoreId_6;
  _2 = Uart_au8DriverStatus[_1];
  if (_2 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 9, 1);
  goto <bb 11>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (Channel_8(D) > 4)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 9, 2);
  goto <bb 11>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  if (BytesTransfered_9(D) == 0B)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 9, 3);
  goto <bb 11>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  if (TransferType_10(D) == 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  TempReturn_14 = Uart_Ipw_GetTransmitStatus (Channel_8(D), BytesTransfered_9(D));
  # DEBUG TempReturn => TempReturn_14
  goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  TempReturn_12 = Uart_Ipw_GetReceiveStatus (Channel_8(D), BytesTransfered_9(D));
  # DEBUG TempReturn => TempReturn_12

  <bb 11> :
  # TempReturn_3 = PHI <TempReturn_5(3), TempReturn_5(5), TempReturn_5(7), TempReturn_14(9), TempReturn_12(10)>
  # DEBUG TempReturn => TempReturn_3
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _18 = TempReturn_3;
  return _18;

}


Uart_AsyncSend (uint8 Channel, const uint8 * Buffer, uint32 BufferSize)
{
  uint8 CoreId;
  Std_ReturnType TempReturn;
  int _1;
  <unnamed type> _2;
  Std_ReturnType _17;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempReturn_5 = 1;
  # DEBUG TempReturn => TempReturn_5
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  CoreId_6 = 0;
  # DEBUG CoreId => CoreId_6
  # DEBUG BEGIN_STMT
  _1 = (int) CoreId_6;
  _2 = Uart_au8DriverStatus[_1];
  if (_2 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 5, 1);
  goto <bb 11>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (Channel_8(D) > 4)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 5, 2);
  goto <bb 11>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  if (Buffer_9(D) == 0B)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 5, 3);
  goto <bb 11>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  if (BufferSize_10(D) == 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 5, 7);
  goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  TempReturn_12 = Uart_StartAsyncSend (CoreId_6, Channel_8(D), Buffer_9(D), BufferSize_10(D));
  # DEBUG TempReturn => TempReturn_12

  <bb 11> :
  # TempReturn_3 = PHI <TempReturn_5(3), TempReturn_5(5), TempReturn_5(7), TempReturn_5(9), TempReturn_12(10)>
  # DEBUG TempReturn => TempReturn_3
  # DEBUG BEGIN_STMT
  _17 = TempReturn_3;
  return _17;

}


Uart_AsyncReceive (uint8 Channel, uint8 * Buffer, uint32 BufferSize)
{
  uint8 CoreId;
  Std_ReturnType TempReturn;
  int _1;
  <unnamed type> _2;
  Std_ReturnType _17;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempReturn_5 = 1;
  # DEBUG TempReturn => TempReturn_5
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  CoreId_6 = 0;
  # DEBUG CoreId => CoreId_6
  # DEBUG BEGIN_STMT
  _1 = (int) CoreId_6;
  _2 = Uart_au8DriverStatus[_1];
  if (_2 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 7, 1);
  goto <bb 11>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (Channel_8(D) > 4)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

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

  <bb 6> :
  # DEBUG BEGIN_STMT
  if (Buffer_9(D) == 0B)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

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

  <bb 8> :
  # DEBUG BEGIN_STMT
  if (BufferSize_10(D) == 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 7, 7);
  goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  TempReturn_12 = Uart_StartAsyncReceive (CoreId_6, Channel_8(D), Buffer_9(D), BufferSize_10(D));
  # DEBUG TempReturn => TempReturn_12

  <bb 11> :
  # TempReturn_3 = PHI <TempReturn_5(3), TempReturn_5(5), TempReturn_5(7), TempReturn_5(9), TempReturn_12(10)>
  # DEBUG TempReturn => TempReturn_3
  # DEBUG BEGIN_STMT
  _17 = TempReturn_3;
  return _17;

}


Uart_SyncReceive (uint8 Channel, uint8 * Buffer, uint32 BufferSize, uint32 Timeout)
{
  uint8 CoreId;
  Std_ReturnType TempReturn;
  int _1;
  <unnamed type> _2;
  Std_ReturnType _18;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempReturn_5 = 1;
  # DEBUG TempReturn => TempReturn_5
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  CoreId_6 = 0;
  # DEBUG CoreId => CoreId_6
  # DEBUG BEGIN_STMT
  _1 = (int) CoreId_6;
  _2 = Uart_au8DriverStatus[_1];
  if (_2 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (Channel_8(D) > 4)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 6, 2);
  goto <bb 11>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  if (Buffer_9(D) == 0B)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 6, 3);
  goto <bb 11>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  if (BufferSize_10(D) == 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 6, 7);
  goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  TempReturn_13 = Uart_StartSyncReceive (CoreId_6, Channel_8(D), Buffer_9(D), BufferSize_10(D), Timeout_11(D));
  # DEBUG TempReturn => TempReturn_13

  <bb 11> :
  # TempReturn_3 = PHI <TempReturn_5(3), TempReturn_5(5), TempReturn_5(7), TempReturn_5(9), TempReturn_13(10)>
  # DEBUG TempReturn => TempReturn_3
  # DEBUG BEGIN_STMT
  _18 = TempReturn_3;
  return _18;

}


Uart_SyncSend (uint8 Channel, const uint8 * Buffer, uint32 BufferSize, uint32 Timeout)
{
  uint8 CoreId;
  Std_ReturnType TempReturn;
  int _1;
  <unnamed type> _2;
  Std_ReturnType _18;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempReturn_5 = 1;
  # DEBUG TempReturn => TempReturn_5
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  CoreId_6 = 0;
  # DEBUG CoreId => CoreId_6
  # DEBUG BEGIN_STMT
  _1 = (int) CoreId_6;
  _2 = Uart_au8DriverStatus[_1];
  if (_2 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 4, 1);
  goto <bb 11>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (Channel_8(D) > 4)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 4, 2);
  goto <bb 11>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  if (Buffer_9(D) == 0B)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 4, 3);
  goto <bb 11>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  if (BufferSize_10(D) == 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 4, 7);
  goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  TempReturn_13 = Uart_StartSyncSend (CoreId_6, Channel_8(D), Buffer_9(D), BufferSize_10(D), Timeout_11(D));
  # DEBUG TempReturn => TempReturn_13

  <bb 11> :
  # TempReturn_3 = PHI <TempReturn_5(3), TempReturn_5(5), TempReturn_5(7), TempReturn_5(9), TempReturn_13(10)>
  # DEBUG TempReturn => TempReturn_3
  # DEBUG BEGIN_STMT
  _18 = TempReturn_3;
  return _18;

}


Uart_SetBuffer (uint8 Channel, uint8 * Buffer, uint32 BufferSize, Uart_DataDirectionType Direction)
{
  uint8 CoreId;
  Std_ReturnType TempReturn;
  int _1;
  <unnamed type> _2;
  Std_ReturnType _18;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempReturn_5 = 1;
  # DEBUG TempReturn => TempReturn_5
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  CoreId_6 = 0;
  # DEBUG CoreId => CoreId_6
  # DEBUG BEGIN_STMT
  _1 = (int) CoreId_6;
  _2 = Uart_au8DriverStatus[_1];
  if (_2 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 11, 1);
  goto <bb 11>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (Channel_8(D) > 4)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 11, 2);
  goto <bb 11>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  if (Buffer_9(D) == 0B)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

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

  <bb 8> :
  # DEBUG BEGIN_STMT
  if (BufferSize_10(D) == 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 11, 7);
  goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  TempReturn_13 = Uart_StartSetBuffer (CoreId_6, Channel_8(D), Buffer_9(D), BufferSize_10(D), Direction_11(D));
  # DEBUG TempReturn => TempReturn_13

  <bb 11> :
  # TempReturn_3 = PHI <TempReturn_5(3), TempReturn_5(5), TempReturn_5(7), TempReturn_5(9), TempReturn_13(10)>
  # DEBUG TempReturn => TempReturn_3
  # DEBUG BEGIN_STMT
  _18 = TempReturn_3;
  return _18;

}


Uart_Abort (uint8 Channel, Uart_DataDirectionType TransmissionType)
{
  uint8 CoreId;
  Std_ReturnType TempReturn;
  int _1;
  <unnamed type> _2;
  Std_ReturnType _16;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempReturn_5 = 1;
  # DEBUG TempReturn => TempReturn_5
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  CoreId_6 = 0;
  # DEBUG CoreId => CoreId_6
  # DEBUG BEGIN_STMT
  _1 = (int) CoreId_6;
  _2 = Uart_au8DriverStatus[_1];
  if (_2 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 8, 1);
  goto <bb 9>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (Channel_8(D) > 4)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 8, 2);
  goto <bb 9>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  if (TransmissionType_9(D) == 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  TempReturn_13 = Uart_Ipw_AbortSendingData (Channel_8(D));
  # DEBUG TempReturn => TempReturn_13
  goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  TempReturn_11 = Uart_Ipw_AbortReceivingData (Channel_8(D));
  # DEBUG TempReturn => TempReturn_11

  <bb 9> :
  # TempReturn_3 = PHI <TempReturn_5(3), TempReturn_5(5), TempReturn_13(7), TempReturn_11(8)>
  # DEBUG TempReturn => TempReturn_3
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _16 = TempReturn_3;
  return _16;

}


Uart_GetBaudrate (uint8 Channel, uint32 * Baudrate)
{
  uint8 CoreId;
  Std_ReturnType TempReturn;
  int _1;
  <unnamed type> _2;
  Std_ReturnType _15;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempReturn_5 = 1;
  # DEBUG TempReturn => TempReturn_5
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  CoreId_6 = 0;
  # DEBUG CoreId => CoreId_6
  # DEBUG BEGIN_STMT
  _1 = (int) CoreId_6;
  _2 = Uart_au8DriverStatus[_1];
  if (_2 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 3, 1);
  goto <bb 9>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (Channel_8(D) > 4)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 3, 2);
  goto <bb 9>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  if (Baudrate_9(D) == 0B)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

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

  <bb 8> :
  # DEBUG BEGIN_STMT
  Uart_Ipw_GetBaudrate (Channel_8(D), Baudrate_9(D));
  # DEBUG BEGIN_STMT
  TempReturn_11 = 0;
  # DEBUG TempReturn => TempReturn_11

  <bb 9> :
  # TempReturn_3 = PHI <TempReturn_5(3), TempReturn_5(5), TempReturn_5(7), TempReturn_11(8)>
  # DEBUG TempReturn => TempReturn_3
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _15 = TempReturn_3;
  return _15;

}


Uart_SetBaudrate (uint8 Channel, Uart_BaudrateType Baudrate)
{
  Uart_StatusType TransmitStatus;
  Uart_StatusType ReceiveStatus;
  uint8 CoreId;
  Std_ReturnType TempReturn;
  int _1;
  <unnamed type> _2;
  int _3;
  int _4;
  long unsigned int _5;
  Std_ReturnType _22;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempReturn_8 = 1;
  # DEBUG TempReturn => TempReturn_8
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  CoreId_9 = 0;
  # DEBUG CoreId => CoreId_9
  # DEBUG BEGIN_STMT
  _1 = (int) CoreId_9;
  _2 = Uart_au8DriverStatus[_1];
  if (_2 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 2, 1);
  goto <bb 10>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (Channel_11(D) > 4)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

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

  <bb 6> :
  # DEBUG BEGIN_STMT
  ReceiveStatus_13 = Uart_Ipw_GetReceiveStatus (Channel_11(D), 0B);
  # DEBUG ReceiveStatus => ReceiveStatus_13
  # DEBUG BEGIN_STMT
  TransmitStatus_15 = Uart_Ipw_GetTransmitStatus (Channel_11(D), 0B);
  # DEBUG TransmitStatus => TransmitStatus_15
  # DEBUG BEGIN_STMT
  if (ReceiveStatus_13 == 1)
    goto <bb 8>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 7> :
  if (TransmitStatus_15 == 1)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 2, 6);
  goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _3 = (int) CoreId_9;
  _4 = (int) Channel_11(D);
  _5 = Uart_au32ClockFrequency[_3][_4];
  TempReturn_18 = Uart_Ipw_SetBaudrate (Channel_11(D), Baudrate_16(D), _5);
  # DEBUG TempReturn => TempReturn_18

  <bb 10> :
  # TempReturn_6 = PHI <TempReturn_8(3), TempReturn_8(5), TempReturn_8(8), TempReturn_18(9)>
  # DEBUG TempReturn => TempReturn_6
  # DEBUG BEGIN_STMT
  _22 = TempReturn_6;
  return _22;

}


Uart_Deinit ()
{
  uint8 CoreId;
  uint8 u8ChLoop;
  int _1;
  <unnamed type> _2;
  int _3;
  const struct Uart_ConfigType * _4;
  int _5;
  const struct Uart_ChannelConfigType * _6;
  unsigned char _7;
  int _8;
  unsigned char u8ChLoop.1_9;
  int _10;

  <bb 2> :
  # DEBUG BEGIN_STMT
  u8ChLoop_14 = 0;
  # DEBUG u8ChLoop => u8ChLoop_14
  # DEBUG BEGIN_STMT
  CoreId_15 = 0;
  # DEBUG CoreId => CoreId_15
  # DEBUG BEGIN_STMT
  CoreId_16 = 0;
  # DEBUG CoreId => CoreId_16
  # DEBUG BEGIN_STMT
  _1 = (int) CoreId_16;
  _2 = Uart_au8DriverStatus[_1];
  if (_2 != 1)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 1, 1);
  goto <bb 8>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  u8ChLoop_18 = 0;
  # DEBUG u8ChLoop => u8ChLoop_18
  goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _3 = (int) CoreId_16;
  _4 = Uart_apConfig[_3];
  _5 = (int) u8ChLoop_11;
  _6 = _4->Configs[_5];
  _7 = _6->UartChannelId;
  Uart_Ipw_Deinit (_7);
  # DEBUG BEGIN_STMT
  _8 = (int) CoreId_16;
  Uart_au8DriverStatus[_8] = 0;
  # DEBUG BEGIN_STMT
  u8ChLoop.1_9 = u8ChLoop_11;
  u8ChLoop_22 = u8ChLoop.1_9 + 1;
  # DEBUG u8ChLoop => u8ChLoop_22

  <bb 6> :
  # u8ChLoop_11 = PHI <u8ChLoop_18(4), u8ChLoop_22(5)>
  # DEBUG u8ChLoop => u8ChLoop_11
  # DEBUG BEGIN_STMT
  if (u8ChLoop_11 <= 4)
    goto <bb 5>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _10 = (int) CoreId_16;
  Uart_apConfig[_10] = 0B;

  <bb 8> :
  return;

}


Uart_Init (const struct Uart_ConfigType * Config)
{
  uint8 Channel;
  uint8 CoreId;
  uint8 u8ChLoop;
  int _1;
  <unnamed type> _2;
  int _3;
  int _4;
  const struct Uart_ConfigType * _5;
  int _6;
  const struct Uart_ConfigType * _7;
  int _8;
  const struct Uart_ChannelConfigType * _9;
  int _10;
  const struct Uart_ConfigType * _11;
  int _12;
  const struct Uart_ChannelConfigType * _13;
  int _14;
  const struct Uart_ConfigType * _15;
  int _16;
  const struct Uart_ChannelConfigType * _17;
  const struct Uart_Ipw_HwConfigType * _18;
  int _19;
  const struct Uart_ConfigType * _20;
  int _21;
  const struct Uart_ChannelConfigType * _22;
  int _23;
  int _24;
  long unsigned int _25;
  int _26;
  unsigned char u8ChLoop.0_27;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  CoreId_32 = 0;
  # DEBUG CoreId => CoreId_32
  # DEBUG BEGIN_STMT
  _1 = (int) CoreId_32;
  _2 = Uart_au8DriverStatus[_1];
  if (_2 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 0, 4);
  goto <bb 11>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  if (Config_34(D) != 0B)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 0, 9);
  goto <bb 11>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _3 = (int) CoreId_32;
  _4 = (int) CoreId_32;
  _5 = Uart_pxPBcfgVariantPredefined[_3];
  Uart_apConfig[_4] = _5;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  u8ChLoop_36 = 0;
  # DEBUG u8ChLoop => u8ChLoop_36
  goto <bb 10>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _6 = (int) CoreId_32;
  _7 = Uart_apConfig[_6];
  _8 = (int) u8ChLoop_28;
  _9 = _7->Configs[_8];
  if (_9 != 0B)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _10 = (int) CoreId_32;
  _11 = Uart_apConfig[_10];
  _12 = (int) u8ChLoop_28;
  _13 = _11->Configs[_12];
  Channel_37 = _13->UartChannelId;
  # DEBUG Channel => Channel_37
  # DEBUG BEGIN_STMT
  _14 = (int) CoreId_32;
  _15 = Uart_apConfig[_14];
  _16 = (int) u8ChLoop_28;
  _17 = _15->Configs[_16];
  _18 = _17->UartChannelConfig;
  Uart_Ipw_Init (Channel_37, _18);
  # DEBUG BEGIN_STMT
  _19 = (int) CoreId_32;
  _20 = Uart_apConfig[_19];
  _21 = (int) u8ChLoop_28;
  _22 = _20->Configs[_21];
  _23 = (int) CoreId_32;
  _24 = (int) Channel_37;
  _25 = _22->ChannelClockFrequency;
  Uart_au32ClockFrequency[_23][_24] = _25;
  # DEBUG BEGIN_STMT
  _26 = (int) CoreId_32;
  Uart_au8DriverStatus[_26] = 1;

  <bb 9> :
  # DEBUG BEGIN_STMT
  u8ChLoop.0_27 = u8ChLoop_28;
  u8ChLoop_41 = u8ChLoop.0_27 + 1;
  # DEBUG u8ChLoop => u8ChLoop_41

  <bb 10> :
  # u8ChLoop_28 = PHI <u8ChLoop_36(6), u8ChLoop_41(9)>
  # DEBUG u8ChLoop => u8ChLoop_28
  # DEBUG BEGIN_STMT
  if (u8ChLoop_28 <= 4)
    goto <bb 7>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 11> :
  return;

}


Uart_StartSetBuffer (uint8 CoreId, uint8 Channel, uint8 * Buffer, uint32 BufferSize, Uart_DataDirectionType Direction)
{
  Std_ReturnType TempReturn;
  Std_ReturnType _11;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempReturn_2 = 1;
  # DEBUG TempReturn => TempReturn_2
  # DEBUG BEGIN_STMT
  if (Direction_3(D) == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Uart_Ipw_SetTxBuffer (Channel_5(D), Buffer_6(D), BufferSize_7(D));
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  Uart_Ipw_SetRxBuffer (Channel_5(D), Buffer_6(D), BufferSize_7(D));

  <bb 5> :
  # DEBUG BEGIN_STMT
  TempReturn_10 = 0;
  # DEBUG TempReturn => TempReturn_10
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _11 = TempReturn_10;
  return _11;

}


Uart_StartAsyncSend (uint8 CoreId, uint8 Channel, const uint8 * Buffer, uint32 BufferSize)
{
  Std_ReturnType TempReturn;
  <unnamed type> _1;
  Std_ReturnType _13;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempReturn_4 = 1;
  # DEBUG TempReturn => TempReturn_4
  # DEBUG BEGIN_STMT
  _1 = Uart_Ipw_GetTransmitStatus (Channel_6(D), 0B);
  if (_1 == 1)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  TempReturn_11 = Uart_Ipw_AsyncSend (Channel_6(D), Buffer_8(D), BufferSize_9(D));
  # DEBUG TempReturn => TempReturn_11

  <bb 5> :
  # TempReturn_2 = PHI <TempReturn_4(3), TempReturn_11(4)>
  # DEBUG TempReturn => TempReturn_2
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _13 = TempReturn_2;
  return _13;

}


Uart_StartAsyncReceive (uint8 CoreId, uint8 Channel, uint8 * Buffer, uint32 BufferSize)
{
  Std_ReturnType TempReturn;
  <unnamed type> _1;
  Std_ReturnType _13;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempReturn_4 = 1;
  # DEBUG TempReturn => TempReturn_4
  # DEBUG BEGIN_STMT
  _1 = Uart_Ipw_GetReceiveStatus (Channel_6(D), 0B);
  if (_1 == 1)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Det_ReportError (255, 0, 7, 6);
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  TempReturn_11 = Uart_Ipw_AsyncReceive (Channel_6(D), Buffer_8(D), BufferSize_9(D));
  # DEBUG TempReturn => TempReturn_11

  <bb 5> :
  # TempReturn_2 = PHI <TempReturn_4(3), TempReturn_11(4)>
  # DEBUG TempReturn => TempReturn_2
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _13 = TempReturn_2;
  return _13;

}


Uart_StartSyncSend (uint8 CoreId, uint8 Channel, const uint8 * Buffer, uint32 BufferSize, uint32 Timeout)
{
  Std_ReturnType TempReturn;
  <unnamed type> _1;
  Std_ReturnType _16;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempReturn_4 = 1;
  # DEBUG TempReturn => TempReturn_4
  # DEBUG BEGIN_STMT
  _1 = Uart_Ipw_GetTransmitStatus (Channel_6(D), 0B);
  if (_1 == 1)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  TempReturn_12 = Uart_Ipw_SyncSend (Channel_6(D), Buffer_8(D), BufferSize_9(D), Timeout_10(D));
  # DEBUG TempReturn => TempReturn_12
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (TempReturn_12 == 6)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  Det_ReportRuntimeError (255, 0, 4, 8);
  # DEBUG BEGIN_STMT
  TempReturn_14 = 1;
  # DEBUG TempReturn => TempReturn_14

  <bb 6> :
  # TempReturn_2 = PHI <TempReturn_4(3), TempReturn_12(4), TempReturn_14(5)>
  # DEBUG TempReturn => TempReturn_2
  # DEBUG BEGIN_STMT
  _16 = TempReturn_2;
  return _16;

}


Uart_StartSyncReceive (uint8 CoreId, uint8 Channel, uint8 * Buffer, uint32 BufferSize, uint32 Timeout)
{
  Std_ReturnType TempReturn;
  <unnamed type> _1;
  Std_ReturnType _16;

  <bb 2> :
  # DEBUG BEGIN_STMT
  TempReturn_4 = 1;
  # DEBUG TempReturn => TempReturn_4
  # DEBUG BEGIN_STMT
  _1 = Uart_Ipw_GetReceiveStatus (Channel_6(D), 0B);
  if (_1 == 1)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

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

  <bb 4> :
  # DEBUG BEGIN_STMT
  TempReturn_12 = Uart_Ipw_SyncReceive (Channel_6(D), Buffer_8(D), BufferSize_9(D), Timeout_10(D));
  # DEBUG TempReturn => TempReturn_12
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (TempReturn_12 == 6)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  Det_ReportRuntimeError (255, 0, 6, 8);
  # DEBUG BEGIN_STMT
  TempReturn_14 = 1;
  # DEBUG TempReturn => TempReturn_14

  <bb 6> :
  # TempReturn_2 = PHI <TempReturn_4(3), TempReturn_12(4), TempReturn_14(5)>
  # DEBUG TempReturn => TempReturn_2
  # DEBUG BEGIN_STMT
  _16 = TempReturn_2;
  return _16;

}


