main ()
{
  uint8 u8TimeOut;
  static struct Can_Msg_Type Can_MsgInfo;
  unsigned char pinValue.34_1;
  unsigned char _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  u8TimeOut_4 = 100;
  # DEBUG u8TimeOut => u8TimeOut_4
  # DEBUG BEGIN_STMT
  CanIf_bTxFlag = 0;
  # DEBUG BEGIN_STMT
  CanIf_bRxFlag = 0;
  # DEBUG BEGIN_STMT
  Mcu_Init (0B);
  # DEBUG BEGIN_STMT
  Mcu_InitClock (0);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  Mcl_Init (0B);
  # DEBUG BEGIN_STMT
  Mcu_SetMode (0);
  # DEBUG BEGIN_STMT
  OsIf_Init (0B);
  # DEBUG BEGIN_STMT
  Platform_Init (0B);
  # DEBUG BEGIN_STMT
  Platform_InstallIrqHandler (31, LPUART_UART_IP_0_IRQHandler, 0B);
  # DEBUG BEGIN_STMT
  Platform_InstallIrqHandler (33, LPUART_UART_IP_1_IRQHandler, 0B);
  # DEBUG BEGIN_STMT
  Platform_InstallIrqHandler (35, LPUART_UART_IP_2_IRQHandler, 0B);
  # DEBUG BEGIN_STMT
  Platform_InstallIrqHandler (69, MCL_FLEXIO_ISR, 0B);
  # DEBUG BEGIN_STMT
  Platform_InstallIrqHandler (0, Dma0_Ch0_IRQHandler, 0B);
  # DEBUG BEGIN_STMT
  Platform_InstallIrqHandler (1, Dma0_Ch1_IRQHandler, 0B);
  # DEBUG BEGIN_STMT
  Platform_InstallIrqHandler (2, Dma0_Ch2_IRQHandler, 0B);
  # DEBUG BEGIN_STMT
  Platform_InstallIrqHandler (3, Dma0_Ch3_IRQHandler, 0B);
  # DEBUG BEGIN_STMT
  Platform_InstallIrqHandler (4, Dma0_Ch4_IRQHandler, 0B);
  # DEBUG BEGIN_STMT
  Platform_InstallIrqHandler (5, Dma0_Ch5_IRQHandler, 0B);
  # DEBUG BEGIN_STMT
  Port_Init (0B);
  # DEBUG BEGIN_STMT
  Uart_Init (0B);
  # DEBUG BEGIN_STMT
  Can_Init (0B);
  # DEBUG BEGIN_STMT
  Can_SetControllerMode (0, 1);
  # DEBUG BEGIN_STMT
  Can_MsgInfo.id = 403846230;
  # DEBUG BEGIN_STMT
  Can_MsgInfo.idFrame = 2;
  # DEBUG BEGIN_STMT
  Can_MsgInfo.length = 8;
  # DEBUG BEGIN_STMT
  Can_MsgInfo.sdu = &Can_au8Sdu8bytes;

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pinValue.34_1 ={v} pinValue;
  _2 = ~pinValue.34_1;
  pinValue ={v} _2;
  # DEBUG BEGIN_STMT
  CanIf_SendMessage (0, Can_MsgInfo);
  # DEBUG BEGIN_STMT
  TestDelay (100000);
  # DEBUG BEGIN_STMT
  Can_MainFunction_Read ();
  # DEBUG BEGIN_STMT
  CanIf_bRxFlag = 0;
  # DEBUG BEGIN_STMT
  TestDelay (100000);
  # DEBUG BEGIN_STMT
  goto <bb 3>; [INV]

}


UART_Callback (uint32 hwInstance, Lpuart_Uart_Ip_EventType event, void * userData)
{
  uint32_t temp;
  long unsigned int bufferIdx.30_1;
  long unsigned int bufferIdx.31_2;
  long unsigned int _3;
  unsigned char _4;
  long unsigned int bufferIdx.32_5;
  uint8_t * _6;
  struct 
{
  volatile uint32_t SADDR;
  volatile uint16_t SOFF;
  volatile uint16_t ATTR;
  union 
  {
    volatile uint32_t MLNO;
    volatile uint32_t MLOFFNO;
    volatile uint32_t MLOFFYES;
  } NBYTES;
  volatile uint32_t SLAST;
  volatile uint32_t DADDR;
  volatile uint16_t DOFF;
  union 
  {
    volatile uint16_t ELINKNO;
    volatile uint16_t ELINKYES;
  } CITER;
  volatile uint32_t DLASTSGA;
  volatile uint16_t CSR;
  union 
  {
    volatile uint16_t ELINKNO;
    volatile uint16_t ELINKYES;
  } BITER;
} * _7;
  short unsigned int _8;
  long unsigned int _9;
  long unsigned int bufferIdx.33_10;
  long unsigned int _11;
  unsigned char _12;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (event_15(D) == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  bufferIdx.30_1 = bufferIdx;
  if (bufferIdx.30_1 <= 480)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  bufferIdx.31_2 = bufferIdx;
  _3 = bufferIdx.31_2 + 20;
  bufferIdx = _3;
  # DEBUG BEGIN_STMT
  _4 = (unsigned char) hwInstance_18(D);
  bufferIdx.32_5 = bufferIdx;
  _6 = &RX_Buffer[hwInstance_18(D)][bufferIdx.32_5];
  Uart_SetBuffer (_4, _6, 20, 1);

  <bb 5> :
  # DEBUG BEGIN_STMT
  if (event_15(D) == 3)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _7 = 1073778688B;
  _8 ={v} _7->CITER.ELINKNO;
  _9 = (long unsigned int) _8;
  temp_20 = 20 - _9;
  # DEBUG temp => temp_20
  # DEBUG BEGIN_STMT
  bufferIdx.33_10 = bufferIdx;
  _11 = temp_20 + bufferIdx.33_10;
  bufferIdx = _11;
  # DEBUG BEGIN_STMT
  _12 = (unsigned char) hwInstance_18(D);
  Lpuart_Uart_Ip_AbortReceivingData (_12);

  <bb 7> :
  return;

}


UART_Receive_Data (uint8 recvChannel, uint8 * rxBuffer, uint32 T_timeout)
{
  uint32 retVal;
  uint32 timeout;
  uint32 T_bytesRemaining;
  volatile Uart_StatusType Uart_ReceiveStatus;
  volatile Std_ReturnType R_Uart_Status;
  int _1;
  uint8_t * _2;
  unsigned char _3;
  unsigned char R_Uart_Status.27_4;
  <unnamed type> _5;
  <unnamed type> Uart_ReceiveStatus.28_6;
  <unnamed type> Uart_ReceiveStatus.29_7;
  uint32 _10;
  uint32 _30;
  uint32 _32;
  uint32 _33;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  Uart_ReceiveStatus ={v} 6;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  timeout_17 = T_timeout_16(D);
  # DEBUG timeout => timeout_17
  # DEBUG BEGIN_STMT
  retVal_18 = 1;
  # DEBUG retVal => retVal_18
  # DEBUG BEGIN_STMT
  if (rxBuffer_19(D) == 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _33 = retVal_18;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 12>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _1 = (int) recvChannel_20(D);
  _2 = &RX_Buffer[_1][0];
  Uart_SetBuffer (recvChannel_20(D), _2, 20, 1);
  # DEBUG BEGIN_STMT
  _3 = Uart_AsyncReceive (recvChannel_20(D), rxBuffer_19(D), 20);
  R_Uart_Status ={v} _3;
  # DEBUG BEGIN_STMT
  R_Uart_Status.27_4 ={v} R_Uart_Status;
  if (R_Uart_Status.27_4 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  Uart_Abort (recvChannel_20(D), 1);
  # DEBUG BEGIN_STMT
  _32 = 1;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 12>; [INV]

  <bb 6> :
  # timeout_8 = PHI <timeout_17(4), timeout_26(7)>
  # DEBUG timeout => timeout_8
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = Uart_GetStatus (recvChannel_20(D), &T_bytesRemaining, 1);
  Uart_ReceiveStatus ={v} _5;
  # DEBUG BEGIN_STMT
  Uart_ReceiveStatus.28_6 ={v} Uart_ReceiveStatus;
  if (Uart_ReceiveStatus.28_6 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  timeout_26 = timeout_8 + 4294967295;
  # DEBUG timeout => timeout_26
  if (timeout_26 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  Uart_ReceiveStatus.29_7 ={v} Uart_ReceiveStatus;
  if (Uart_ReceiveStatus.29_7 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  Uart_Abort (recvChannel_20(D), 1);
  # DEBUG BEGIN_STMT
  retVal_29 = 1;
  # DEBUG retVal => retVal_29
  goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  retVal_27 = 0;
  # DEBUG retVal => retVal_27

  <bb 11> :
  # retVal_9 = PHI <retVal_29(9), retVal_27(10)>
  # DEBUG retVal => retVal_9
  # DEBUG BEGIN_STMT
  _30 = retVal_9;

  <bb 12> :
  # _10 = PHI <_33(3), _32(5), _30(11)>
  T_bytesRemaining ={v} {CLOBBER};
  return _10;

}


UART_Send_Data (uint8 transChannel, const uint8 * txBuffer, uint32 sendLength, uint32 T_timeout)
{
  uint32 retVal;
  uint32 timeout;
  uint32 T_bytesRemaining;
  volatile Uart_StatusType Uart_TransmitStatus;
  volatile Std_ReturnType T_Uart_Status;
  unsigned char _1;
  unsigned char T_Uart_Status.24_2;
  <unnamed type> _3;
  <unnamed type> Uart_TransmitStatus.25_4;
  <unnamed type> Uart_TransmitStatus.26_5;
  Std_ReturnType _8;
  Std_ReturnType _29;
  Std_ReturnType _31;
  Std_ReturnType _32;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  Uart_TransmitStatus ={v} 6;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  timeout_15 = T_timeout_14(D);
  # DEBUG timeout => timeout_15
  # DEBUG BEGIN_STMT
  retVal_16 = 1;
  # DEBUG retVal => retVal_16
  # DEBUG BEGIN_STMT
  if (txBuffer_17(D) == 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _32 = (Std_ReturnType) retVal_16;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 12>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  Uart_SetBuffer (transChannel_18(D), txBuffer_17(D), sendLength_19(D), 0);
  # DEBUG BEGIN_STMT
  _1 = Uart_AsyncSend (transChannel_18(D), txBuffer_17(D), sendLength_19(D));
  T_Uart_Status ={v} _1;
  # DEBUG BEGIN_STMT
  T_Uart_Status.24_2 ={v} T_Uart_Status;
  if (T_Uart_Status.24_2 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  Uart_Abort (transChannel_18(D), 0);
  # DEBUG BEGIN_STMT
  _31 = 1;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 12>; [INV]

  <bb 6> :
  # timeout_6 = PHI <timeout_15(4), timeout_25(7)>
  # DEBUG timeout => timeout_6
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _3 = Uart_GetStatus (transChannel_18(D), &T_bytesRemaining, 0);
  Uart_TransmitStatus ={v} _3;
  # DEBUG BEGIN_STMT
  Uart_TransmitStatus.25_4 ={v} Uart_TransmitStatus;
  if (Uart_TransmitStatus.25_4 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  timeout_25 = timeout_6 + 4294967295;
  # DEBUG timeout => timeout_25
  if (timeout_25 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  Uart_TransmitStatus.26_5 ={v} Uart_TransmitStatus;
  if (Uart_TransmitStatus.26_5 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  Uart_Abort (transChannel_18(D), 0);
  # DEBUG BEGIN_STMT
  retVal_28 = 1;
  # DEBUG retVal => retVal_28
  goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  retVal_26 = 0;
  # DEBUG retVal => retVal_26

  <bb 11> :
  # retVal_7 = PHI <retVal_28(9), retVal_26(10)>
  # DEBUG retVal => retVal_7
  # DEBUG BEGIN_STMT
  _29 = (Std_ReturnType) retVal_7;

  <bb 12> :
  # _8 = PHI <_32(3), _31(5), _29(11)>
  T_bytesRemaining ={v} {CLOBBER};
  return _8;

}


UART_Query_Data (uint8 transChannel, uint8 recvChannel, const uint8 * txBuffer, uint32 sendLength, uint8 * rxBuffer, uint32 T_timeout)
{
  uint32 retVal;
  uint32 timeout;
  uint32 T_bytesRemaining;
  volatile Uart_StatusType Uart_TransmitStatus;
  volatile Uart_StatusType Uart_ReceiveStatus;
  volatile Std_ReturnType T_Uart_Status;
  volatile Std_ReturnType R_Uart_Status;
  int _1;
  uint8_t * _2;
  unsigned char _3;
  unsigned char T_Uart_Status.18_4;
  unsigned char _5;
  unsigned char T_Uart_Status.19_6;
  <unnamed type> _7;
  <unnamed type> _8;
  <unnamed type> Uart_TransmitStatus.20_9;
  <unnamed type> Uart_ReceiveStatus.21_10;
  <unnamed type> Uart_TransmitStatus.22_11;
  <unnamed type> Uart_ReceiveStatus.23_12;
  Std_ReturnType _15;
  Std_ReturnType _48;
  Std_ReturnType _50;
  Std_ReturnType _52;
  Std_ReturnType _53;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  Uart_ReceiveStatus ={v} 6;
  # DEBUG BEGIN_STMT
  Uart_TransmitStatus ={v} 6;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  timeout_24 = T_timeout_23(D);
  # DEBUG timeout => timeout_24
  # DEBUG BEGIN_STMT
  retVal_25 = 1;
  # DEBUG retVal => retVal_25
  # DEBUG BEGIN_STMT
  if (txBuffer_26(D) == 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 3>; [INV]

  <bb 3> :
  if (rxBuffer_27(D) == 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _53 = (Std_ReturnType) retVal_25;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 19>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _1 = (int) recvChannel_28(D);
  _2 = &RX_Buffer[_1][0];
  Uart_SetBuffer (recvChannel_28(D), _2, 20, 1);
  # DEBUG BEGIN_STMT
  _3 = Uart_AsyncReceive (recvChannel_28(D), rxBuffer_27(D), 20);
  R_Uart_Status ={v} _3;
  # DEBUG BEGIN_STMT
  T_Uart_Status.18_4 ={v} T_Uart_Status;
  if (T_Uart_Status.18_4 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  Uart_Abort (recvChannel_28(D), 1);
  # DEBUG BEGIN_STMT
  _52 = 1;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 19>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  Uart_SetBuffer (transChannel_32(D), txBuffer_26(D), sendLength_33(D), 0);
  # DEBUG BEGIN_STMT
  _5 = Uart_AsyncSend (transChannel_32(D), txBuffer_26(D), sendLength_33(D));
  T_Uart_Status ={v} _5;
  # DEBUG BEGIN_STMT
  T_Uart_Status.19_6 ={v} T_Uart_Status;
  if (T_Uart_Status.19_6 != 0)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  Uart_Abort (transChannel_32(D), 0);
  # DEBUG BEGIN_STMT
  _50 = 1;
  // predicted unlikely by early return (on trees) predictor.
  goto <bb 19>; [INV]

  <bb 9> :
  # timeout_13 = PHI <timeout_24(7), timeout_41(11)>
  # DEBUG timeout => timeout_13
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _7 = Uart_GetStatus (transChannel_32(D), &T_bytesRemaining, 0);
  Uart_TransmitStatus ={v} _7;
  # DEBUG BEGIN_STMT
  _8 = Uart_GetStatus (recvChannel_28(D), &T_bytesRemaining, 1);
  Uart_ReceiveStatus ={v} _8;
  # DEBUG BEGIN_STMT
  Uart_TransmitStatus.20_9 ={v} Uart_TransmitStatus;
  if (Uart_TransmitStatus.20_9 != 0)
    goto <bb 10>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 10> :
  Uart_ReceiveStatus.21_10 ={v} Uart_ReceiveStatus;
  if (Uart_ReceiveStatus.21_10 != 0)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 11> :
  timeout_41 = timeout_13 + 4294967295;
  # DEBUG timeout => timeout_41
  if (timeout_41 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  Uart_TransmitStatus.22_11 ={v} Uart_TransmitStatus;
  if (Uart_TransmitStatus.22_11 != 0)
    goto <bb 13>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  Uart_Abort (transChannel_32(D), 0);
  # DEBUG BEGIN_STMT
  retVal_44 = 1;
  # DEBUG retVal => retVal_44
  goto <bb 15>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  retVal_42 = 0;
  # DEBUG retVal => retVal_42

  <bb 15> :
  # DEBUG BEGIN_STMT
  Uart_ReceiveStatus.23_12 ={v} Uart_ReceiveStatus;
  if (Uart_ReceiveStatus.23_12 != 0)
    goto <bb 16>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  Uart_Abort (recvChannel_28(D), 1);
  # DEBUG BEGIN_STMT
  retVal_47 = 1;
  # DEBUG retVal => retVal_47
  goto <bb 18>; [INV]

  <bb 17> :
  # DEBUG BEGIN_STMT
  retVal_45 = 0;
  # DEBUG retVal => retVal_45

  <bb 18> :
  # retVal_14 = PHI <retVal_47(16), retVal_45(17)>
  # DEBUG retVal => retVal_14
  # DEBUG BEGIN_STMT
  _48 = (Std_ReturnType) retVal_14;

  <bb 19> :
  # _15 = PHI <_53(4), _52(6), _50(8), _48(18)>
  T_bytesRemaining ={v} {CLOBBER};
  return _15;

}


TestDelay (uint32 delay)
{
  static volatile uint32 DelayTimer = 0;
  long unsigned int DelayTimer.16_1;
  long unsigned int _2;
  long unsigned int DelayTimer.17_3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  DelayTimer.16_1 ={v} DelayTimer;
  _2 = DelayTimer.16_1 + 1;
  DelayTimer ={v} _2;

  <bb 4> :
  # DEBUG BEGIN_STMT
  DelayTimer.17_3 ={v} DelayTimer;
  if (delay_6(D) > DelayTimer.17_3)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  DelayTimer ={v} 0;
  return;

}


CanIf_SendMessage (uint8 ControllerId, struct Can_Msg_Type CanMsg)
{
  Can_HwHandleType Hth;
  uint8 u8TimeOut;
  Std_ReturnType retVal;
  volatile Std_ReturnType CAN_Write_Status;
  volatile struct Can_PduType Can_PduInfo;
  short unsigned int _1;
  long unsigned int _2;
  <unnamed type> _3;
  unsigned char _4;
  uint8 * _5;
  unsigned char _6;
  unsigned char CAN_Write_Status.12_7;
  unsigned char u8TimeOut.13_8;
  _Bool CanIf_bTxFlag.14_9;
  _Bool _10;
  _Bool CanIf_bTxFlag.15_11;
  Std_ReturnType _30;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  retVal_16 = 1;
  # DEBUG retVal => retVal_16
  # DEBUG BEGIN_STMT
  u8TimeOut_17 = 100;
  # DEBUG u8TimeOut => u8TimeOut_17
  # DEBUG BEGIN_STMT
  _1 = (short unsigned int) ControllerId_18(D);
  Hth_19 = _1 + 1;
  # DEBUG Hth => Hth_19
  # DEBUG BEGIN_STMT
  _2 = CanMsg.id;
  _3 = CanMsg.idFrame;
  _4 = CanMsg.length;
  _5 = CanMsg.sdu;
  Can_PduInfo ={v} Can_CreatePduInfo (_2, _3, 0, _4, _5);
  # DEBUG BEGIN_STMT
  _6 = Can_Write (Hth_19, &Can_PduInfo);
  CAN_Write_Status ={v} _6;
  # DEBUG BEGIN_STMT
  CanIf_bTxFlag = 0;
  # DEBUG BEGIN_STMT
  CAN_Write_Status.12_7 ={v} CAN_Write_Status;
  if (CAN_Write_Status.12_7 == 0)
    goto <bb 4>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Can_MainFunction_Write ();
  # DEBUG BEGIN_STMT
  Can_DummyDelay (100);
  # DEBUG BEGIN_STMT
  u8TimeOut.13_8 = u8TimeOut_13;
  u8TimeOut_27 = u8TimeOut.13_8 + 255;
  # DEBUG u8TimeOut => u8TimeOut_27

  <bb 4> :
  # u8TimeOut_13 = PHI <u8TimeOut_17(2), u8TimeOut_27(3)>
  # DEBUG u8TimeOut => u8TimeOut_13
  # DEBUG BEGIN_STMT
  CanIf_bTxFlag.14_9 = CanIf_bTxFlag;
  _10 = ~CanIf_bTxFlag.14_9;
  if (_10 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  if (u8TimeOut_13 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  CanIf_bTxFlag.15_11 = CanIf_bTxFlag;
  if (CanIf_bTxFlag.15_11 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  retVal_29 = 0;
  # DEBUG retVal => retVal_29
  goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  retVal_28 = 1;
  # DEBUG retVal => retVal_28

  <bb 9> :
  # retVal_12 = PHI <retVal_29(7), retVal_28(8)>
  # DEBUG retVal => retVal_12
  # DEBUG BEGIN_STMT
  _30 = retVal_12;
  return _30;

}


Can_DummyDelay (uint32 loops)
{
  volatile uint32 contor2;
  volatile uint32 contor1;
  volatile uint32 data;
  long unsigned int contor1.5_1;
  int _2;
  long unsigned int _3;
  long unsigned int contor2.6_4;
  long unsigned int _5;
  long unsigned int data.7_6;
  long unsigned int _7;
  long unsigned int contor1.8_8;
  long unsigned int _9;
  long unsigned int contor1.9_10;
  long unsigned int contor2.10_11;
  long unsigned int _12;
  long unsigned int contor2.11_13;
  long unsigned int _23;

  <bb 2> :
  # DEBUG BEGIN_STMT
  data ={v} 2857740885;
  # DEBUG BEGIN_STMT
  contor1 ={v} 0;
  # DEBUG BEGIN_STMT
  contor2 ={v} loops_19(D);

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  contor1 ={v} 0;
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  contor1.5_1 ={v} contor1;
  _2 = 1 << contor1.5_1;
  _3 = (long unsigned int) _2;
  contor2.6_4 ={v} contor2;
  _5 = _3 | contor2.6_4;
  _23 = _5 | 11184810;
  data.7_6 ={v} data;
  _7 = _23 ^ data.7_6;
  data ={v} _7;
  # DEBUG BEGIN_STMT
  contor1.8_8 ={v} contor1;
  _9 = contor1.8_8 + 1;
  contor1 ={v} _9;

  <bb 5> :
  # DEBUG BEGIN_STMT
  contor1.9_10 ={v} contor1;
  if (contor1.9_10 <= 766)
    goto <bb 4>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  contor2.10_11 ={v} contor2;
  _12 = contor2.10_11 + 4294967295;
  contor2 ={v} _12;
  # DEBUG BEGIN_STMT
  contor2.11_13 ={v} contor2;
  if (contor2.11_13 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 7> :
  return;

}


CanIf_CurrentIcomConfiguration (uint8 ControllerId, IcomConfigIdType ConfigurationId, IcomSwitch_ErrorType Error)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  return;

}


CanIf_RxIndication (const struct Can_HwType * Mailbox, const struct PduInfoType * PduInfoPtr)
{
  long unsigned int _1;
  long unsigned int _2;
  unsigned char _3;
  uint8 * _4;
  unsigned char CanIf_u8RxIndicationCnt.2_5;
  int _6;
  unsigned char CanIf_u8RxIndicationCnt.3_7;
  unsigned char CanIf_u8RxIndicationCnt.4_8;
  unsigned char _9;

  <bb 2> :
  # DEBUG BEGIN_STMT
  CanIf_bRxFlag = 1;
  # DEBUG BEGIN_STMT
  _1 = Mailbox_12(D)->CanId;
  _2 = PduInfoPtr_13(D)->SduLength;
  _3 = (unsigned char) _2;
  _4 = PduInfoPtr_13(D)->SduDataPtr;
  CanIf_u8RxIndicationCnt.2_5 = CanIf_u8RxIndicationCnt;
  _6 = (int) CanIf_u8RxIndicationCnt.2_5;
  canRxMsg_Buff[_6] = Can_GetMsgInfo (_1, _3, _4);
  # DEBUG BEGIN_STMT
  CanIf_u8RxIndicationCnt.3_7 = CanIf_u8RxIndicationCnt;
  CanIf_u8RxIndicationCnt.4_8 = CanIf_u8RxIndicationCnt.3_7;
  _9 = CanIf_u8RxIndicationCnt.4_8 + 1;
  CanIf_u8RxIndicationCnt = _9;
  return;

}


CanIf_TxConfirmation (PduIdType CanTxPduId)
{
  unsigned char CanIf_u8TxConfirmCnt.0_1;
  unsigned char CanIf_u8TxConfirmCnt.1_2;
  unsigned char _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  CanIf_u8TxConfirmCnt.0_1 = CanIf_u8TxConfirmCnt;
  CanIf_u8TxConfirmCnt.1_2 = CanIf_u8TxConfirmCnt.0_1;
  _3 = CanIf_u8TxConfirmCnt.1_2 + 1;
  CanIf_u8TxConfirmCnt = _3;
  # DEBUG BEGIN_STMT
  CanIf_bTxFlag = 1;
  # DEBUG BEGIN_STMT
  return;

}


CanIf_ControllerModeIndication (uint8 ControllerId, Can_ControllerStateType ControllerMode)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  return;

}


CanIf_ControllerBusOff (uint8 ControllerId)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  return;

}


Can_GetMsgInfo (Can_IdType id, uint8 length, uint8 * sdu)
{
  struct Can_Msg_Type CanMsgInfo;
  long unsigned int _1;
  long unsigned int _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = id_3(D) & 1073741823;
  CanMsgInfo.id = _1;
  # DEBUG BEGIN_STMT
  _2 = id_3(D) >> 30;
  CanMsgInfo.idFrame = _2;
  # DEBUG BEGIN_STMT
  CanMsgInfo.length = length_7(D);
  # DEBUG BEGIN_STMT
  CanMsgInfo.sdu = sdu_9(D);
  # DEBUG BEGIN_STMT
  <retval> = CanMsgInfo;
  CanMsgInfo ={v} {CLOBBER};
  return <retval>;

}


Can_CreatePduInfo (Can_IdType id, CAN_IdFrameType idFrame, PduIdType swPduHandle, uint8 length, uint8 * sdu)
{
  struct Can_PduType PduInfo;
  long unsigned int _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  switch (idFrame_3(D)) <default: <L4> [INV], case 0: <L0> [INV], case 1: <L1> [INV], case 2: <L2> [INV], case 3: <L3> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  id_8 = id_4(D) & 2047;
  # DEBUG id => id_8
  # DEBUG BEGIN_STMT
  goto <bb 8>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  _1 = id_4(D) & 2047;
  id_7 = _1 | 1073741824;
  # DEBUG id => id_7
  # DEBUG BEGIN_STMT
  goto <bb 8>; [INV]

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  id_6 = id_4(D) | 2147483648;
  # DEBUG id => id_6
  # DEBUG BEGIN_STMT
  goto <bb 8>; [INV]

  <bb 6> :
<L3>:
  # DEBUG BEGIN_STMT
  id_5 = id_4(D) | 3221225472;
  # DEBUG id => id_5
  # DEBUG BEGIN_STMT
  goto <bb 8>; [INV]

  <bb 7> :
<L4>:
  # DEBUG BEGIN_STMT
  id_9 = id_4(D) & 2047;
  # DEBUG id => id_9
  # DEBUG BEGIN_STMT

  <bb 8> :
  # id_2 = PHI <id_8(3), id_7(4), id_6(5), id_5(6), id_9(7)>
  # DEBUG id => id_2
  # DEBUG BEGIN_STMT
  PduInfo.id = id_2;
  # DEBUG BEGIN_STMT
  PduInfo.swPduHandle = swPduHandle_12(D);
  # DEBUG BEGIN_STMT
  PduInfo.length = length_14(D);
  # DEBUG BEGIN_STMT
  PduInfo.sdu = sdu_16(D);
  # DEBUG BEGIN_STMT
  <retval> = PduInfo;
  PduInfo ={v} {CLOBBER};
  return <retval>;

}


