Can_ProcessBusOffInterrupt (uint8 u8CtrlOffset)
{
  const struct Can_ControllerConfigType * Can_pController;
  uint32 u32CoreId;
  uint8 u8ControllerID;

  <bb 2> :
  u8ControllerID = 0;
  u32CoreId = 0;
  Can_pController = 0B;
  u32CoreId = 0;
  _1 = Can_apxConfig[u32CoreId];
  if (_1 != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 3> :
  _2 = Can_apxConfig[u32CoreId];
  _3 = _2->Can_pCtrlOffsetToCtrlIDMap;
  _4 = (sizetype) u8CtrlOffset;
  _5 = _3 + _4;
  u8ControllerID = *_5;
  _6 = Can_apxConfig[u32CoreId];
  _7 = _6->Can_ppController;
  _8 = (unsigned int) u8ControllerID;
  _9 = _8 * 4;
  _10 = _7 + _9;
  Can_pController = *_10;
  if (Can_pController != 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 6>; [INV]

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

  <bb 5> :
  _12 = (int) u8ControllerID;
  Can_eControllerState[_12] = 2;
  _13 = Can_pController->Can_u8AbstControllerID;
  CanIf_ControllerBusOff (_13);

  <bb 6> :
  return;

}


Can_ProcessPNInterrupt (uint8 u8CtrlOffset)
{
  const struct Can_ControllerConfigType * Can_pController;
  uint32 u32CoreId;
  uint8 u8ControllerID;

  <bb 2> :
  u8ControllerID = 0;
  u32CoreId = 0;
  Can_pController = 0B;
  u32CoreId = 0;
  _1 = Can_apxConfig[u32CoreId];
  if (_1 != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 3> :
  _2 = Can_apxConfig[u32CoreId];
  _3 = _2->Can_pCtrlOffsetToCtrlIDMap;
  _4 = (sizetype) u8CtrlOffset;
  _5 = _3 + _4;
  u8ControllerID = *_5;
  _6 = Can_apxConfig[u32CoreId];
  _7 = _6->Can_ppController;
  _8 = (unsigned int) u8ControllerID;
  _9 = _8 * 4;
  _10 = _7 + _9;
  Can_pController = *_10;
  if (Can_pController != 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 4> :
  _11 = (int) u8ControllerID;
  _12 = Can_apxCtrlConfigIcomIndex[_11];
  if (_12 != 0B)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  _13 = (int) u8ControllerID;
  _14 = Can_apxCtrlConfigIcomIndex[_13];
  Can_Ipw_ProcessPN (Can_pController, _14);

  <bb 6> :
  return;

}


Can_SetIcomConfiguration (uint8 Controller, IcomConfigIdType ConfigurationId)
{
  uint8 u8ConfigIcomIndex;
  Std_ReturnType eReturnValue;
  uint32 u32CoreId;
  Std_ReturnType D.7289;

  <bb 2> :
  u32CoreId = 0;
  eReturnValue = 1;
  u8ConfigIcomIndex = 0;
  u32CoreId = 0;
  if (ConfigurationId == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  _1 = Can_apxConfig[u32CoreId];
  _2 = _1->Can_ppController;
  _3 = (unsigned int) Controller;
  _4 = _3 * 4;
  _5 = _2 + _4;
  _6 = *_5;
  eReturnValue = Can_Ipw_DeactivateIcomConfiguration (_6);
  goto <bb 11>; [INV]

  <bb 4> :
  u8ConfigIcomIndex = 0;
  goto <bb 10>; [INV]

  <bb 5> :
  _7 = Can_apxConfig[u32CoreId];
  _8 = _7->pCanIcomConfigs;
  _9 = (unsigned int) u8ConfigIcomIndex;
  _10 = _9 * 8;
  _11 = _8 + _10;
  _12 = _11->u8CanIcomConfigId;
  if (ConfigurationId == _12)
    goto <bb 6>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 6> :
  _13 = (int) Controller;
  _14 = Can_eControllerState[_13];
  if (_14 == 1)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  _15 = Can_apxConfig[u32CoreId];
  _16 = _15->Can_ppController;
  _17 = (unsigned int) Controller;
  _18 = _17 * 4;
  _19 = _16 + _18;
  _20 = *_19;
  _21 = Can_apxConfig[u32CoreId];
  _22 = _21->pCanIcomConfigs;
  _23 = (unsigned int) u8ConfigIcomIndex;
  _24 = _23 * 8;
  _25 = _22 + _24;
  eReturnValue = Can_Ipw_SetIcomConfiguration (_20, _25);

  <bb 8> :
  goto <bb 11>; [INV]

  <bb 9> :
  u8ConfigIcomIndex.9_26 = u8ConfigIcomIndex;
  u8ConfigIcomIndex = u8ConfigIcomIndex.9_26 + 1;

  <bb 10> :
  _27 = Can_apxConfig[u32CoreId];
  _28 = _27->u8NumCanIcomConfigs;
  if (u8ConfigIcomIndex < _28)
    goto <bb 5>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 11> :
  if (eReturnValue == 0)
    goto <bb 12>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 12> :
  if (ConfigurationId != 0)
    goto <bb 13>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 13> :
  _29 = Can_apxConfig[u32CoreId];
  _30 = _29->pCanIcomConfigs;
  _31 = (unsigned int) u8ConfigIcomIndex;
  _32 = _31 * 8;
  _33 = (int) Controller;
  _34 = _30 + _32;
  Can_apxCtrlConfigIcomIndex[_33] = _34;
  goto <bb 15>; [INV]

  <bb 14> :
  _35 = (int) Controller;
  Can_apxCtrlConfigIcomIndex[_35] = 0B;

  <bb 15> :
  _36 = Can_apxConfig[u32CoreId];
  _37 = _36->Can_ppController;
  _38 = (unsigned int) Controller;
  _39 = _38 * 4;
  _40 = _37 + _39;
  _41 = *_40;
  _42 = _41->Can_u8AbstControllerID;
  CanIf_CurrentIcomConfiguration (_42, ConfigurationId, 0);
  goto <bb 17>; [INV]

  <bb 16> :
  _43 = Can_apxConfig[u32CoreId];
  _44 = _43->Can_ppController;
  _45 = (unsigned int) Controller;
  _46 = _45 * 4;
  _47 = _44 + _46;
  _48 = *_47;
  _49 = _48->Can_u8AbstControllerID;
  CanIf_CurrentIcomConfiguration (_49, ConfigurationId, 1);

  <bb 17> :
  D.7289 = eReturnValue;

  <bb 18> :
<L16>:
  return D.7289;

}


Can_MainFunction_Mode ()
{
  const struct Can_ControllerConfigType * Can_pController;
  uint32 u32CoreId;
  uint8 u8ControllerID;

  <bb 2> :
  u8ControllerID = 0;
  u32CoreId = 0;
  Can_pController = 0B;
  u32CoreId = 0;
  _1 = Can_apxConfig[u32CoreId];
  if (_1 != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 3> :
  goto <bb 8>; [INV]

  <bb 4> :
  _2 = Can_apxConfig[u32CoreId];
  _3 = _2->Can_ppController;
  _4 = (unsigned int) u8ControllerID;
  _5 = _4 * 4;
  _6 = _3 + _5;
  Can_pController = *_6;
  if (Can_pController != 0B)
    goto <bb 5>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 5> :
  _7 = Can_pController->Can_bActivation;
  if (_7 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  _8 = (int) u8ControllerID;
  _9 = &Can_eControllerState[_8];
  Can_Ipw_MainFunction_Mode (Can_pController, _9);

  <bb 7> :
  u8ControllerID.8_10 = u8ControllerID;
  u8ControllerID = u8ControllerID.8_10 + 1;

  <bb 8> :
  if (u8ControllerID == 0)
    goto <bb 4>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 9> :
  return;

}


Can_MainFunction_BusOff ()
{
  const struct Can_ControllerConfigType * Can_pController;
  uint32 u32CoreId;
  uint8 u8ControllerID;

  <bb 2> :
  u8ControllerID = 0;
  u32CoreId = 0;
  Can_pController = 0B;
  u32CoreId = 0;
  _1 = Can_apxConfig[u32CoreId];
  if (_1 != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 3> :
  goto <bb 9>; [INV]

  <bb 4> :
  _2 = Can_apxConfig[u32CoreId];
  _3 = _2->Can_ppController;
  _4 = (unsigned int) u8ControllerID;
  _5 = _4 * 4;
  _6 = _3 + _5;
  Can_pController = *_6;
  if (Can_pController != 0B)
    goto <bb 5>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 5> :
  _7 = Can_pController->Can_bActivation;
  if (_7 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 6> :
  _8 = Can_pController->Can_bBusOffUsesPolling;
  if (_8 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  Can_Ipw_MainFunction_BusOff (Can_pController);

  <bb 8> :
  u8ControllerID.7_9 = u8ControllerID;
  u8ControllerID = u8ControllerID.7_9 + 1;

  <bb 9> :
  if (u8ControllerID == 0)
    goto <bb 4>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 10> :
  return;

}


Can_MainFunction_Read ()
{
  const struct Can_ControllerConfigType * Can_pController;
  uint32 u32CoreId;
  uint8 u8ControllerID;
  Can_HwHandleType HwObjectID;

  <bb 2> :
  HwObjectID = 0;
  u8ControllerID = 0;
  u32CoreId = 0;
  Can_pController = 0B;
  u32CoreId = 0;
  _1 = Can_apxConfig[u32CoreId];
  if (_1 != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 3> :
  goto <bb 9>; [INV]

  <bb 4> :
  _2 = Can_apxConfig[u32CoreId];
  _3 = _2->Can_pHwObjIDToCtrlIDMap;
  _4 = (sizetype) HwObjectID;
  _5 = _3 + _4;
  u8ControllerID = *_5;
  _6 = Can_apxConfig[u32CoreId];
  _7 = _6->Can_ppController;
  _8 = (unsigned int) u8ControllerID;
  _9 = _8 * 4;
  _10 = _7 + _9;
  Can_pController = *_10;
  if (Can_pController != 0B)
    goto <bb 5>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 5> :
  _11 = Can_pController->Can_bActivation;
  if (_11 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 6> :
  _12 = Can_apxConfig[u32CoreId];
  _13 = _12->Can_pHwObjectConfig;
  _14 = (unsigned int) HwObjectID;
  _15 = _14 * 36;
  _16 = _13 + _15;
  _17 = _16->Can_bHwObjectUsesPolling;
  if (_17 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  _18 = Can_apxConfig[u32CoreId];
  _19 = _18->Can_pHwObjectConfig;
  _20 = (unsigned int) HwObjectID;
  _21 = _20 * 36;
  _22 = _19 + _21;
  Can_Ipw_MainFunction_Read (Can_pController, _22);

  <bb 8> :
  HwObjectID.6_23 = HwObjectID;
  HwObjectID = HwObjectID.6_23 + 1;

  <bb 9> :
  _24 = Can_apxConfig[u32CoreId];
  _25 = _24->Can_uHthFirstIndex;
  if (HwObjectID < _25)
    goto <bb 4>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 10> :
  return;

}


Can_MainFunction_Write ()
{
  const struct Can_ControllerConfigType * Can_pController;
  uint32 u32CoreId;
  uint8 u8ControllerID;
  Can_HwHandleType HwObjectID;

  <bb 2> :
  HwObjectID = 0;
  u8ControllerID = 0;
  u32CoreId = 0;
  Can_pController = 0B;
  u32CoreId = 0;
  _1 = Can_apxConfig[u32CoreId];
  if (_1 != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 3> :
  _2 = Can_apxConfig[u32CoreId];
  HwObjectID = _2->Can_uHthFirstIndex;
  goto <bb 9>; [INV]

  <bb 4> :
  _3 = Can_apxConfig[u32CoreId];
  _4 = _3->Can_pHwObjIDToCtrlIDMap;
  _5 = (sizetype) HwObjectID;
  _6 = _4 + _5;
  u8ControllerID = *_6;
  _7 = Can_apxConfig[u32CoreId];
  _8 = _7->Can_ppController;
  _9 = (unsigned int) u8ControllerID;
  _10 = _9 * 4;
  _11 = _8 + _10;
  Can_pController = *_11;
  if (Can_pController != 0B)
    goto <bb 5>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 5> :
  _12 = Can_pController->Can_bActivation;
  if (_12 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 6> :
  _13 = Can_apxConfig[u32CoreId];
  _14 = _13->Can_pHwObjectConfig;
  _15 = (unsigned int) HwObjectID;
  _16 = _15 * 36;
  _17 = _14 + _16;
  _18 = _17->Can_bHwObjectUsesPolling;
  if (_18 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  _19 = Can_apxConfig[u32CoreId];
  _20 = _19->Can_pHwObjectConfig;
  _21 = (unsigned int) HwObjectID;
  _22 = _21 * 36;
  _23 = _20 + _22;
  Can_Ipw_MainFunction_Write (Can_pController, _23);

  <bb 8> :
  HwObjectID.5_24 = HwObjectID;
  HwObjectID = HwObjectID.5_24 + 1;

  <bb 9> :
  if (HwObjectID <= 1)
    goto <bb 4>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 10> :
  return;

}


Can_AbortMb (Can_HwHandleType Hth)
{
  const struct Can_HwObjectConfigType * Can_pHwObject;
  const struct Can_ControllerConfigType * Can_pController;
  uint8 u8ControllerID;
  uint32 u32CoreId;

  <bb 2> :
  u32CoreId = 0;
  u8ControllerID = 0;
  Can_pController = 0B;
  Can_pHwObject = 0B;
  u32CoreId = 0;
  _1 = Can_apxConfig[u32CoreId];
  _2 = _1->Can_pHwObjIDToCtrlIDMap;
  _3 = (sizetype) Hth;
  _4 = _2 + _3;
  u8ControllerID = *_4;
  _5 = Can_apxConfig[u32CoreId];
  _6 = _5->Can_ppController;
  _7 = (unsigned int) u8ControllerID;
  _8 = _7 * 4;
  _9 = _6 + _8;
  Can_pController = *_9;
  if (Can_pController != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  _10 = Can_apxConfig[u32CoreId];
  _11 = _10->Can_pHwObjectConfig;
  _12 = (unsigned int) Hth;
  _13 = _12 * 36;
  Can_pHwObject = _11 + _13;
  Can_Ipw_AbortMb (Can_pController, Can_pHwObject);

  <bb 4> :
  return;

}


Can_Write (Can_HwHandleType Hth, const struct Can_PduType * PduInfo)
{
  const struct Can_HwObjectConfigType * Can_pHwObject;
  const struct Can_ControllerConfigType * Can_pController;
  uint32 u32CoreId;
  uint8 u8ControllerID;
  Std_ReturnType eRetVal;
  Std_ReturnType D.7242;

  <bb 2> :
  eRetVal = 1;
  u8ControllerID = 0;
  u32CoreId = 0;
  Can_pController = 0B;
  Can_pHwObject = 0B;
  u32CoreId = 0;
  _1 = Can_apxConfig[u32CoreId];
  _2 = _1->Can_pHwObjIDToCtrlIDMap;
  _3 = (sizetype) Hth;
  _4 = _2 + _3;
  u8ControllerID = *_4;
  _5 = Can_apxConfig[u32CoreId];
  _6 = _5->Can_ppController;
  _7 = (unsigned int) u8ControllerID;
  _8 = _7 * 4;
  _9 = _6 + _8;
  Can_pController = *_9;
  if (Can_pController != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 3> :
  _10 = Can_apxConfig[u32CoreId];
  _11 = _10->Can_pHwObjectConfig;
  _12 = (unsigned int) Hth;
  _13 = _12 * 36;
  Can_pHwObject = _11 + _13;
  _14 = (int) u8ControllerID;
  _15 = Can_eControllerState[_14];
  if (_15 == 1)
    goto <bb 4>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 4> :
  _16 = (int) u8ControllerID;
  _17 = Can_apxCtrlConfigIcomIndex[_16];
  if (_17 != 0B)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  eRetVal = 2;
  goto <bb 7>; [INV]

  <bb 6> :
  eRetVal = Can_Ipw_Write (Can_pController, Can_pHwObject, PduInfo);

  <bb 7> :
  D.7242 = eRetVal;

  <bb 8> :
<L7>:
  return D.7242;

}


Can_GetControllerTxErrorCounter (uint8 ControllerId, uint8 * TxErrorCounterPtr)
{
  const struct Can_ControllerConfigType * Can_pController;
  uint32 u32CoreId;
  Std_ReturnType eRetVal;
  Std_ReturnType D.7233;

  <bb 2> :
  eRetVal = 1;
  u32CoreId = 0;
  Can_pController = 0B;
  u32CoreId = 0;
  _1 = Can_apxConfig[u32CoreId];
  _2 = _1->Can_ppController;
  _3 = (unsigned int) ControllerId;
  _4 = _3 * 4;
  _5 = _2 + _4;
  Can_pController = *_5;
  _6 = Can_Ipw_GetControllerTxErrorCounter (Can_pController);
  *TxErrorCounterPtr = _6;
  eRetVal = 0;
  D.7233 = eRetVal;

  <bb 3> :
<L0>:
  return D.7233;

}


Can_GetControllerRxErrorCounter (uint8 ControllerId, uint8 * RxErrorCounterPtr)
{
  const struct Can_ControllerConfigType * Can_pController;
  uint32 u32CoreId;
  Std_ReturnType eRetVal;
  Std_ReturnType D.7231;

  <bb 2> :
  eRetVal = 1;
  u32CoreId = 0;
  Can_pController = 0B;
  u32CoreId = 0;
  _1 = Can_apxConfig[u32CoreId];
  _2 = _1->Can_ppController;
  _3 = (unsigned int) ControllerId;
  _4 = _3 * 4;
  _5 = _2 + _4;
  Can_pController = *_5;
  _6 = Can_Ipw_GetControllerRxErrorCounter (Can_pController);
  *RxErrorCounterPtr = _6;
  eRetVal = 0;
  D.7231 = eRetVal;

  <bb 3> :
<L0>:
  return D.7231;

}


Can_GetControllerMode (uint8 Controller, Can_ControllerStateType * ControllerModePtr)
{
  Std_ReturnType eRetVal;
  Std_ReturnType D.7229;

  <bb 2> :
  eRetVal = 1;
  _1 = (int) Controller;
  _2 = Can_eControllerState[_1];
  *ControllerModePtr = _2;
  eRetVal = 0;
  D.7229 = eRetVal;

  <bb 3> :
<L0>:
  return D.7229;

}


Can_GetControllerErrorState (uint8 ControllerId, Can_ErrorStateType * ErrorStatePtr)
{
  const struct Can_ControllerConfigType * Can_pController;
  uint32 u32CoreId;
  Std_ReturnType eRetVal;
  Std_ReturnType D.7227;

  <bb 2> :
  eRetVal = 1;
  u32CoreId = 0;
  Can_pController = 0B;
  u32CoreId = 0;
  _1 = Can_apxConfig[u32CoreId];
  _2 = _1->Can_ppController;
  _3 = (unsigned int) ControllerId;
  _4 = _3 * 4;
  _5 = _2 + _4;
  Can_pController = *_5;
  _6 = Can_Ipw_GetControllerErrorState (Can_pController);
  _7 = (int) _6;
  switch (_7) <default: <L2> [INV], case 0: <L0> [INV], case 1: <L1> [INV]>

  <bb 3> :
<L0>:
  *ErrorStatePtr = 0;
  goto <bb 6>; [INV]

  <bb 4> :
<L1>:
  *ErrorStatePtr = 1;
  goto <bb 6>; [INV]

  <bb 5> :
<L2>:
  *ErrorStatePtr = 2;

  <bb 6> :
  eRetVal = 0;
  D.7227 = eRetVal;

  <bb 7> :
<L4>:
  return D.7227;

}


Can_EnableControllerInterrupts (uint8 Controller)
{
  const struct Can_ControllerConfigType * Can_pController;
  uint32 u32CoreId;

  <bb 2> :
  u32CoreId = 0;
  Can_pController = 0B;
  u32CoreId = 0;
  _1 = Can_apxConfig[u32CoreId];
  _2 = _1->Can_ppController;
  _3 = (unsigned int) Controller;
  _4 = _3 * 4;
  _5 = _2 + _4;
  Can_pController = *_5;
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_01 ();
  _6 = (int) Controller;
  _7 = Can_au8DisableInterruptLevel[_6];
  if (_7 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  _8 = (int) Controller;
  _9 = Can_au8DisableInterruptLevel[_8];
  _10 = (int) Controller;
  _11 = _9 + 255;
  Can_au8DisableInterruptLevel[_10] = _11;

  <bb 4> :
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_01 ();
  _12 = (int) Controller;
  _13 = Can_au8DisableInterruptLevel[_12];
  if (_13 == 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  Can_Ipw_EnableControllerInterrupts (Can_pController);

  <bb 6> :
  return;

}


Can_DisableControllerInterrupts (uint8 Controller)
{
  const struct Can_ControllerConfigType * Can_pController;
  uint32 u32CoreId;

  <bb 2> :
  u32CoreId = 0;
  Can_pController = 0B;
  u32CoreId = 0;
  _1 = Can_apxConfig[u32CoreId];
  _2 = _1->Can_ppController;
  _3 = (unsigned int) Controller;
  _4 = _3 * 4;
  _5 = _2 + _4;
  Can_pController = *_5;
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_00 ();
  _6 = (int) Controller;
  _7 = Can_au8DisableInterruptLevel[_6];
  _8 = (int) Controller;
  _9 = _7 + 1;
  Can_au8DisableInterruptLevel[_8] = _9;
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_00 ();
  Can_Ipw_DisableControllerInterrupts (Can_pController);
  return;

}


Can_SetControllerMode (uint8 Controller, Can_ControllerStateType Transition)
{
  <unnamed type> D.7222;
  const struct Can_ControllerConfigType * Can_pController;
  uint32 u32CoreId;
  Std_ReturnType eRetVal;
  Std_ReturnType D.7220;

  <bb 2> :
  eRetVal = 1;
  u32CoreId = 0;
  Can_pController = 0B;
  u32CoreId = 0;
  _1 = Can_apxConfig[u32CoreId];
  _2 = _1->Can_ppController;
  _3 = (unsigned int) Controller;
  _4 = _3 * 4;
  _5 = _2 + _4;
  Can_pController = *_5;
  switch (Transition) <default: <L18> [INV], case 1: <L0> [INV], case 2: <L5> [INV], case 3: <L13> [INV]>

  <bb 3> :
<L0>:
  _6 = (int) Controller;
  _7 = Can_eControllerState[_6];
  if (_7 == 2)
    goto <bb 4>; [INV]
  else
    goto <bb 6>; [INV]

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

  <bb 5> :
  _9 = (int) Controller;
  Can_eControllerState[_9] = 1;
  _10 = Can_pController->Can_u8AbstControllerID;
  CanIf_ControllerModeIndication (_10, 1);
  eRetVal = 0;
  _11 = (int) Controller;
  Can_apxCtrlConfigIcomIndex[_11] = 0B;

  <bb 6> :
  goto <bb 19>; [INV]

  <bb 7> :
<L5>:
  _12 = (int) Controller;
  _13 = Can_eControllerState[_12];
  switch (_13) <default: <L11> [INV], case 1: <L6> [INV], case 2 ... 3: <L9> [INV]>

  <bb 8> :
<L6>:
  _14 = Can_Ipw_SetControllerToStopMode (Can_pController);
  if (_14 == 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  _15 = (int) Controller;
  Can_eControllerState[_15] = 2;
  _16 = Can_pController->Can_u8AbstControllerID;
  CanIf_ControllerModeIndication (_16, 2);
  eRetVal = 0;
  _17 = (int) Controller;
  Can_apxCtrlConfigIcomIndex[_17] = 0B;

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

  <bb 11> :
<L9>:
  _18 = (int) Controller;
  Can_eControllerState[_18] = 2;
  _19 = Can_pController->Can_u8AbstControllerID;
  CanIf_ControllerModeIndication (_19, 2);
  eRetVal = 0;
  goto <bb 13>; [INV]

  <bb 12> :
<L11>:

  <bb 13> :
  goto <bb 19>; [INV]

  <bb 14> :
<L13>:
  _20 = (int) Controller;
  _21 = Can_eControllerState[_20];
  D.7222 = _21 + 4294967294;
  if (D.7222 <= 1)
    goto <bb 15>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 15> :
<L14>:
  _22 = (int) Controller;
  Can_eControllerState[_22] = 3;
  _23 = Can_pController->Can_u8AbstControllerID;
  CanIf_ControllerModeIndication (_23, 3);
  eRetVal = 0;
  goto <bb 17>; [INV]

  <bb 16> :
<L16>:

  <bb 17> :
  goto <bb 19>; [INV]

  <bb 18> :
<L18>:

  <bb 19> :
  D.7220 = eRetVal;

  <bb 20> :
<L20>:
  return D.7220;

}


Can_SetBaudrate (uint8 Controller, uint16 BaudRateConfigID)
{
  const struct Can_ControllerConfigType * Can_pController;
  uint32 u32CoreId;
  Std_ReturnType eRetVal;
  Std_ReturnType D.7212;

  <bb 2> :
  eRetVal = 1;
  u32CoreId = 0;
  Can_pController = 0B;
  u32CoreId = 0;
  _1 = Can_apxConfig[u32CoreId];
  _2 = _1->Can_ppController;
  _3 = (unsigned int) Controller;
  _4 = _3 * 4;
  _5 = _2 + _4;
  Can_pController = *_5;
  _6 = (int) Controller;
  _7 = Can_eControllerState[_6];
  if (_7 == 2)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  eRetVal = Can_Ipw_SetBaudrate (Can_pController, BaudRateConfigID);

  <bb 4> :
  D.7212 = eRetVal;

  <bb 5> :
<L2>:
  return D.7212;

}


Can_DeInit ()
{
  uint32 u32CoreId;
  boolean bCtrlBusy;
  uint8 u8ControllerID;

  <bb 2> :
  u8ControllerID = 0;
  bCtrlBusy = 0;
  u32CoreId = 0;
  u32CoreId = 0;
  u8ControllerID = 0;
  goto <bb 7>; [INV]

  <bb 3> :
  _1 = Can_apxConfig[u32CoreId];
  _2 = _1->Can_ppController;
  _3 = (unsigned int) u8ControllerID;
  _4 = _3 * 4;
  _5 = _2 + _4;
  _6 = *_5;
  if (_6 != 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 4> :
  _7 = (int) u8ControllerID;
  _8 = Can_eControllerState[_7];
  if (_8 == 1)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  bCtrlBusy = 1;
  goto <bb 8>; [INV]

  <bb 6> :
  u8ControllerID.4_9 = u8ControllerID;
  u8ControllerID = u8ControllerID.4_9 + 1;

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

  <bb 8> :
  _10 = ~bCtrlBusy;
  if (_10 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  Can_DeInitControllers (u32CoreId);
  Can_apxConfig[u32CoreId] = 0B;

  <bb 10> :
  return;

}


Can_Init (const struct Can_ConfigType * Config)
{
  boolean bCtrlBusy;
  uint32 u32CoreId;

  <bb 2> :
  u32CoreId = 0;
  bCtrlBusy = 0;
  u32CoreId = 0;
  Can_apxConfig[u32CoreId] = &Can_Config;
  bCtrlBusy = Can_IsControllersBusy (u32CoreId);
  _1 = ~bCtrlBusy;
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  Can_InitControllers (u32CoreId);

  <bb 4> :
  return;

}


Can_GetVersionInfo (struct Std_VersionInfoType * versioninfo)
{
  <bb 2> :
  versioninfo->vendorID = 43;
  versioninfo->moduleID = 80;
  versioninfo->sw_major_version = 1;
  versioninfo->sw_minor_version = 0;
  versioninfo->sw_patch_version = 0;
  return;

}


Can_DeInitControllers (uint32 u32CoreId)
{
  const struct Can_ControllerConfigType * Can_pController;
  uint8 u8ControllerID;

  <bb 2> :
  u8ControllerID = 0;
  Can_pController = 0B;
  u8ControllerID = 0;
  goto <bb 7>; [INV]

  <bb 3> :
  _1 = Can_apxConfig[u32CoreId];
  _2 = _1->Can_ppController;
  _3 = (unsigned int) u8ControllerID;
  _4 = _3 * 4;
  _5 = _2 + _4;
  _6 = *_5;
  if (_6 != 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 4> :
  _7 = Can_apxConfig[u32CoreId];
  _8 = _7->Can_ppController;
  _9 = (unsigned int) u8ControllerID;
  _10 = _9 * 4;
  _11 = _8 + _10;
  Can_pController = *_11;
  _12 = Can_pController->Can_bActivation;
  if (_12 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  _13 = (int) u8ControllerID;
  Can_eControllerState[_13] = 0;
  Can_Ipw_DeInit (Can_pController);

  <bb 6> :
  u8ControllerID.3_14 = u8ControllerID;
  u8ControllerID = u8ControllerID.3_14 + 1;

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

  <bb 8> :
  return;

}


Can_InitControllers (uint32 u32CoreId)
{
  const struct Can_ControllerConfigType * Can_pController;
  Std_ReturnType RetVal;
  uint8 u8ControllerID;
  boolean bCtrlBusy;

  <bb 2> :
  bCtrlBusy = 0;
  u8ControllerID = 0;
  RetVal = 1;
  Can_pController = 0B;
  u8ControllerID = 0;
  goto <bb 11>; [INV]

  <bb 3> :
  _1 = Can_apxConfig[u32CoreId];
  _2 = _1->Can_ppController;
  _3 = (unsigned int) u8ControllerID;
  _4 = _3 * 4;
  _5 = _2 + _4;
  _6 = *_5;
  if (_6 != 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 4> :
  _7 = Can_apxConfig[u32CoreId];
  _8 = _7->Can_ppController;
  _9 = (unsigned int) u8ControllerID;
  _10 = _9 * 4;
  _11 = _8 + _10;
  Can_pController = *_11;
  _12 = Can_pController->Can_bActivation;
  if (_12 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 5> :
  _13 = (int) u8ControllerID;
  Can_au8DisableInterruptLevel[_13] = 0;
  _14 = (int) u8ControllerID;
  Can_apxCtrlConfigIcomIndex[_14] = 0B;
  RetVal = Can_Ipw_Init (Can_pController);
  if (RetVal == 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  RetVal = Can_Ipw_InitRx (Can_pController);

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

  <bb 8> :
  _15 = (int) u8ControllerID;
  Can_eControllerState[_15] = 2;
  goto <bb 10>; [INV]

  <bb 9> :
  bCtrlBusy = 1;
  goto <bb 12>; [INV]

  <bb 10> :
  u8ControllerID.1_16 = u8ControllerID;
  u8ControllerID = u8ControllerID.1_16 + 1;

  <bb 11> :
  if (u8ControllerID == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 12> :
  if (bCtrlBusy != 0)
    goto <bb 13>; [INV]
  else
    goto <bb 18>; [INV]

  <bb 13> :
  u8ControllerID = 0;
  goto <bb 17>; [INV]

  <bb 14> :
  _17 = Can_apxConfig[u32CoreId];
  _18 = _17->Can_ppController;
  _19 = (unsigned int) u8ControllerID;
  _20 = _19 * 4;
  _21 = _18 + _20;
  _22 = *_21;
  if (_22 != 0B)
    goto <bb 15>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 15> :
  _23 = (int) u8ControllerID;
  Can_eControllerState[_23] = 0;

  <bb 16> :
  u8ControllerID.2_24 = u8ControllerID;
  u8ControllerID = u8ControllerID.2_24 + 1;

  <bb 17> :
  if (u8ControllerID == 0)
    goto <bb 14>; [INV]
  else
    goto <bb 18>; [INV]

  <bb 18> :
  return;

}


Can_IsControllersBusy (uint32 u32CoreId)
{
  uint8 u8ControllerID;
  boolean bCtrlBusy;
  boolean D.7183;

  <bb 2> :
  bCtrlBusy = 0;
  u8ControllerID = 0;
  u8ControllerID = 0;
  goto <bb 7>; [INV]

  <bb 3> :
  _1 = Can_apxConfig[u32CoreId];
  _2 = _1->Can_ppController;
  _3 = (unsigned int) u8ControllerID;
  _4 = _3 * 4;
  _5 = _2 + _4;
  _6 = *_5;
  if (_6 != 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 4> :
  _7 = (int) u8ControllerID;
  _8 = Can_eControllerState[_7];
  if (_8 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  bCtrlBusy = 1;
  goto <bb 8>; [INV]

  <bb 6> :
  u8ControllerID.0_9 = u8ControllerID;
  u8ControllerID = u8ControllerID.0_9 + 1;

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

  <bb 8> :
  D.7183 = bCtrlBusy;

  <bb 9> :
<L7>:
  return D.7183;

}


