Histogram:
15 indirect calls trained.
0 (0.00%) have common target.
0 (0.00%) targets was not found.
0 (0.00%) targets had parameter count mismatch.
0 (0.00%) targets was not in polymorphic call target list.
0 (0.00%) speculations seems useless.
0 (0.00%) speculations produced.
FlexCAN_StartRxMessageFifoData.part.0 (uint8 instance, struct Flexcan_Ip_MsgBuffType * data)
{
  struct FLEXCAN_Type * base;
  struct Flexcan_Ip_StateType * state;
  Flexcan_Ip_StatusType eResult;
  volatile boolean x;
  int _2;
  _Bool _5;
  <unnamed type> _6;
  <unnamed type> _7;
  _Bool _9;
  _Bool _10;
  _Bool _11;

  <bb 9> [local count: 1073741824]:

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 = (int) instance_1(D);
  base_3 = g_Flexcan_Ip_aBase[_2];
  # DEBUG base => base_3
  # DEBUG BEGIN_STMT
  state_4 = g_flexcan_Ip_StatePtr[_2];
  # DEBUG state => state_4
  # DEBUG BEGIN_STMT
  _5 = state_4->bIsLegacyFifoEn;
  if (_5 != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  _6 ={v} state_4->mbs[0].state;
  if (_6 != 0)
    goto <bb 8>; [35.00%]
  else
    goto <bb 4>; [65.00%]

  <bb 4> [local count: 348966093]:
  # DEBUG BEGIN_STMT
  state_4->mbs[0].state ={v} 1;
  # DEBUG BEGIN_STMT
  _7 = state_4->transferType;
  if (_7 == 1)
    goto <bb 5>; [34.00%]
  else
    goto <bb 6>; [66.00%]

  <bb 5> [local count: 118648472]:
  # DEBUG BEGIN_STMT
  state_4->mbs[0].isPolling = 1;

  <bb 6> [local count: 348966093]:
  # DEBUG BEGIN_STMT
  state_4->mbs[0].pMBmessage = data_8(D);
  # DEBUG BEGIN_STMT
  if (_7 == 0)
    goto <bb 7>; [33.00%]
  else
    goto <bb 8>; [67.00%]

  <bb 7> [local count: 115158811]:
  # DEBUG BEGIN_STMT
  state_4->mbs[0].isPolling = 0;
  # DEBUG BEGIN_STMT
  _9 = state_4->isIntActive;
  FlexCAN_SetMsgBuffIntCmd (base_3, instance_1(D), 6, 1, _9);
  # DEBUG BEGIN_STMT
  _10 = state_4->isIntActive;
  FlexCAN_SetMsgBuffIntCmd (base_3, instance_1(D), 7, 1, _10);
  # DEBUG BEGIN_STMT
  _11 = state_4->isIntActive;
  FlexCAN_SetMsgBuffIntCmd (base_3, instance_1(D), 5, 1, _11);

  <bb 8> [local count: 1073741824]:
  # eResult_12 = PHI <1(2), 2(3), 0(6), 0(7)>
  # DEBUG eResult => eResult_12
  # DEBUG BEGIN_STMT
  return eResult_12;

}


FlexCAN_GetMsgBuffIntStatusFlag.part.0 (const struct FLEXCAN_Type * base, uint32 msgBuffIdx)
{
  uint8 flag;
  uint32 mask;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _6;
  long unsigned int _7;
  unsigned char _8;

  <bb 4> [local count: 1073741824]:

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  mask_2 ={v} base_1(D)->IMASK3;
  # DEBUG mask => mask_2
  # DEBUG BEGIN_STMT
  _3 ={v} base_1(D)->IFLAG3;
  _4 = mask_2 & _3;
  _6 = msgBuffIdx_5(D) & 31;
  _7 = _4 >> _6;
  _8 = (unsigned char) _7;
  flag_9 = _8 & 1;
  # DEBUG flag => flag_9

  <bb 3> [local count: 1073741824]:
  # flag_10 = PHI <flag_9(2)>
  # DEBUG flag => flag_10
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  return flag_10;

}


FlexCAN_SetEnhancedDataTimeSegments.part.0 (struct FLEXCAN_Type * base, const struct Flexcan_Ip_TimeSegmentType * timeSeg)
{
  volatile boolean x;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  long unsigned int _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;

  <bb 3> [local count: 1073741824]:

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 ={v} base_1(D)->EDCBT;
  _3 = _2 & 4231991264;
  base_1(D)->EDCBT ={v} _3;
  # DEBUG BEGIN_STMT
  _4 ={v} base_1(D)->EDCBT;
  _6 = timeSeg_5(D)->phaseSeg1;
  _7 = timeSeg_5(D)->propSeg;
  _8 = _6 + _7;
  _9 = _8 & 31;
  _10 = timeSeg_5(D)->phaseSeg2;
  _11 = _10 << 12;
  _12 = _11 & 65535;
  _13 = _9 | _12;
  _14 = timeSeg_5(D)->rJumpwidth;
  _15 = _14 << 22;
  _16 = _15 & 62914560;
  _17 = _13 | _16;
  _18 = _4 | _17;
  base_1(D)->EDCBT ={v} _18;
  # DEBUG BEGIN_STMT
  _19 ={v} base_1(D)->EPRS;
  _20 = _19 & 4227923967;
  base_1(D)->EPRS ={v} _20;
  # DEBUG BEGIN_STMT
  _21 ={v} base_1(D)->EPRS;
  _22 = timeSeg_5(D)->preDivider;
  _23 = _22 << 16;
  _24 = _23 & 67043328;
  _25 = _21 | _24;
  base_1(D)->EPRS ={v} _25;
  return;

}


FlexCAN_SetEnhancedNominalTimeSegments.part.0 (struct FLEXCAN_Type * base, const struct Flexcan_Ip_TimeSegmentType * timeSeg)
{
  volatile boolean x;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  long unsigned int _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;

  <bb 3> [local count: 1073741824]:

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 ={v} base_1(D)->ENCBT;
  _3 = _2 & 3761770240;
  base_1(D)->ENCBT ={v} _3;
  # DEBUG BEGIN_STMT
  _4 ={v} base_1(D)->ENCBT;
  _6 = timeSeg_5(D)->phaseSeg1;
  _7 = timeSeg_5(D)->propSeg;
  _8 = _6 + _7;
  _9 = _8 + 1;
  _10 = _9 & 255;
  _11 = timeSeg_5(D)->phaseSeg2;
  _12 = _11 << 12;
  _13 = _12 & 520192;
  _14 = _10 | _13;
  _15 = timeSeg_5(D)->rJumpwidth;
  _16 = _15 << 22;
  _17 = _16 & 532676608;
  _18 = _14 | _17;
  _19 = _4 | _18;
  base_1(D)->ENCBT ={v} _19;
  # DEBUG BEGIN_STMT
  _20 ={v} base_1(D)->EPRS;
  _21 = _20 & 4294966272;
  base_1(D)->EPRS ={v} _21;
  # DEBUG BEGIN_STMT
  _22 ={v} base_1(D)->EPRS;
  _23 = timeSeg_5(D)->preDivider;
  _24 = _23 & 1023;
  _25 = _22 | _24;
  base_1(D)->EPRS ={v} _25;
  return;

}


FlexCAN_SetExtendedTimeSegments.part.0 (struct FLEXCAN_Type * base, const struct Flexcan_Ip_TimeSegmentType * timeSeg)
{
  volatile boolean x;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  long unsigned int _22;
  long unsigned int _23;
  long unsigned int _24;

  <bb 3> [local count: 1073741824]:

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 ={v} base_1(D)->CBT;
  _3 = _2 & 2147483648;
  base_1(D)->CBT ={v} _3;
  # DEBUG BEGIN_STMT
  _4 ={v} base_1(D)->CBT;
  _6 = timeSeg_5(D)->propSeg;
  _7 = _6 << 10;
  _8 = _7 & 65535;
  _9 = timeSeg_5(D)->phaseSeg2;
  _10 = _9 & 31;
  _11 = _8 | _10;
  _12 = timeSeg_5(D)->phaseSeg1;
  _13 = _12 << 5;
  _14 = _13 & 992;
  _15 = _11 | _14;
  _16 = timeSeg_5(D)->preDivider;
  _17 = _16 << 21;
  _18 = _17 & 2145386496;
  _19 = _15 | _18;
  _20 = timeSeg_5(D)->rJumpwidth;
  _21 = _20 << 16;
  _22 = _21 & 2031616;
  _23 = _19 | _22;
  _24 = _4 | _23;
  base_1(D)->CBT ={v} _24;
  return;

}


FlexCAN_SetTimeSegments.part.0 (struct FLEXCAN_Type * base, const struct Flexcan_Ip_TimeSegmentType * timeSeg)
{
  volatile boolean x;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  long unsigned int _22;
  long unsigned int _23;

  <bb 3> [local count: 1073741824]:

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 ={v} base_1(D)->CTRL1;
  _3 = _2 & 65528;
  base_1(D)->CTRL1 ={v} _3;
  # DEBUG BEGIN_STMT
  _4 ={v} base_1(D)->CTRL1;
  _6 = timeSeg_5(D)->propSeg;
  _7 = _6 & 7;
  _8 = timeSeg_5(D)->phaseSeg2;
  _9 = _8 << 16;
  _10 = _9 & 458752;
  _11 = _7 | _10;
  _12 = timeSeg_5(D)->phaseSeg1;
  _13 = _12 << 19;
  _14 = _13 & 3670016;
  _15 = _11 | _14;
  _16 = timeSeg_5(D)->preDivider;
  _17 = _16 << 24;
  _18 = _15 | _17;
  _19 = timeSeg_5(D)->rJumpwidth;
  _20 = _19 << 22;
  _21 = _20 & 12582912;
  _22 = _18 | _21;
  _23 = _4 | _22;
  base_1(D)->CTRL1 ={v} _23;
  return;

}


FlexCAN_SetFDTimeSegments.part.0 (struct FLEXCAN_Type * base, const struct Flexcan_Ip_TimeSegmentType * timeSeg)
{
  volatile boolean x;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  long unsigned int _22;
  long unsigned int _23;
  long unsigned int _24;

  <bb 3> [local count: 1073741824]:

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 ={v} base_1(D)->FDCBT;
  _3 = _2 & 3221783320;
  base_1(D)->FDCBT ={v} _3;
  # DEBUG BEGIN_STMT
  _4 ={v} base_1(D)->FDCBT;
  _6 = timeSeg_5(D)->propSeg;
  _7 = _6 << 10;
  _8 = _7 & 31744;
  _9 = timeSeg_5(D)->phaseSeg2;
  _10 = _9 & 7;
  _11 = _8 | _10;
  _12 = timeSeg_5(D)->phaseSeg1;
  _13 = _12 << 5;
  _14 = _13 & 255;
  _15 = _11 | _14;
  _16 = timeSeg_5(D)->preDivider;
  _17 = _16 << 20;
  _18 = _17 & 1072693248;
  _19 = _15 | _18;
  _20 = timeSeg_5(D)->rJumpwidth;
  _21 = _20 << 16;
  _22 = _21 & 458752;
  _23 = _19 | _22;
  _24 = _4 | _23;
  base_1(D)->FDCBT ={v} _24;
  return;

}


FlexCAN_Ip_GetListenOnlyMode (uint8 instance)
{
  const struct FLEXCAN_Type * base;
  int _1;
  long unsigned int _5;
  long unsigned int _6;
  _Bool _7;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_2(D);
  base_4 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_4
  # DEBUG BEGIN_STMT
  # DEBUG base => base_4
  # DEBUG INLINE_ENTRY FlexCAN_IsListenOnlyModeEnabled
  # DEBUG BEGIN_STMT
  _5 ={v} base_4->CTRL1;
  _6 = _5 & 8;
  _7 = _6 != 0;
  # DEBUG base => NULL
  return _7;

}


FlexCAN_Ip_SetListenOnlyMode_Privileged (uint8 instance, const boolean enable)
{
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  Flexcan_Ip_StatusType status;
  Flexcan_Ip_StatusType result;
  _Bool _1;
  int _2;
  long unsigned int _18;
  signed int _19;
  _Bool x.0_20;
  long unsigned int _21;
  long unsigned int _22;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = instance_8(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_20 ={v} x;
  if (x.0_20 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 14>; [50.00%]

  <bb 14> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 15> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  # DEBUG status => 0
  # DEBUG BEGIN_STMT
  _2 = (int) instance_8(D);
  pBase_11 = g_Flexcan_Ip_aBase[_2];
  # DEBUG pBase => pBase_11
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _18 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _19 = (signed int) _18;
  # DEBUG pBase => NULL
  # DEBUG disabled => _19 < 0
  # DEBUG BEGIN_STMT
  if (_19 < 0)
    goto <bb 5>; [25.50%]
  else
    goto <bb 6>; [74.50%]

  <bb 5> [local count: 27380]:
  # DEBUG BEGIN_STMT
  result_13 = FlexCAN_Enable (pBase_11);
  # DEBUG result => result_13

  <bb 6> [local count: 107374]:
  # result_3 = PHI <0(4), result_13(5)>
  # DEBUG result => result_3
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsFreezeMode
  # DEBUG BEGIN_STMT
  _21 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _22 = _21 & 16777216;
  # DEBUG base => NULL
  # DEBUG freeze => _22 != 0
  # DEBUG BEGIN_STMT
  if (_22 == 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 53687]:
  if (result_3 == 0)
    goto <bb 10>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 8> [local count: 80531]:
  # DEBUG result => result_3
  # DEBUG BEGIN_STMT
  if (result_3 == 0)
    goto <bb 9>; [33.00%]
  else
    goto <bb 10>; [67.00%]

  <bb 9> [local count: 26575]:
  # DEBUG BEGIN_STMT
  FlexCAN_SetListenOnlyMode (pBase_11, enable_14(D));

  <bb 10> [local count: 107374]:
  # result_10 = PHI <result_3(8), 0(9), 1(7)>
  # DEBUG result => NULL
  # DEBUG BEGIN_STMT
  if (_19 < 0)
    goto <bb 11>; [25.50%]
  else
    goto <bb 13>; [74.50%]

  <bb 11> [local count: 27380]:
  # DEBUG BEGIN_STMT
  status_17 = FlexCAN_Disable (pBase_11);
  # DEBUG status => status_17
  # DEBUG BEGIN_STMT
  if (status_17 != 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 12> [local count: 13690]:
  # DEBUG BEGIN_STMT
  # DEBUG result => status_17

  <bb 13> [local count: 107374]:
  # result_4 = PHI <result_10(10), result_10(11), status_17(12)>
  # DEBUG result => result_4
  # DEBUG BEGIN_STMT
  return result_4;

}


FlexCAN_Ip_SetRxMb15Mask_Privileged (uint8 instance, uint32 mask)
{
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  Flexcan_Ip_StatusType status;
  Flexcan_Ip_StatusType result;
  _Bool _1;
  int _2;
  long unsigned int _18;
  signed int _19;
  _Bool x.0_20;
  long unsigned int _21;
  long unsigned int _22;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = instance_8(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_20 ={v} x;
  if (x.0_20 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 14>; [50.00%]

  <bb 14> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 15> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  # DEBUG status => 0
  # DEBUG BEGIN_STMT
  _2 = (int) instance_8(D);
  pBase_11 = g_Flexcan_Ip_aBase[_2];
  # DEBUG pBase => pBase_11
  # DEBUG BEGIN_STMT
  # DEBUG freeze => 0
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _18 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _19 = (signed int) _18;
  # DEBUG pBase => NULL
  # DEBUG disabled => _19 < 0
  # DEBUG BEGIN_STMT
  if (_19 < 0)
    goto <bb 5>; [25.50%]
  else
    goto <bb 6>; [74.50%]

  <bb 5> [local count: 27380]:
  # DEBUG BEGIN_STMT
  result_13 = FlexCAN_Enable (pBase_11);
  # DEBUG result => result_13

  <bb 6> [local count: 107374]:
  # result_3 = PHI <0(4), result_13(5)>
  # DEBUG result => result_3
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsFreezeMode
  # DEBUG BEGIN_STMT
  _21 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _22 = _21 & 16777216;
  # DEBUG base => NULL
  # DEBUG freeze => _22 != 0
  # DEBUG BEGIN_STMT
  if (_22 == 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 53687]:
  if (result_3 == 0)
    goto <bb 10>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 8> [local count: 80531]:
  # DEBUG result => result_3
  # DEBUG BEGIN_STMT
  if (result_3 == 0)
    goto <bb 9>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 9> [local count: 40265]:
  # DEBUG BEGIN_STMT
  pBase_11->RX15MASK ={v} mask_14(D);

  <bb 10> [local count: 107374]:
  # result_10 = PHI <result_3(8), 0(9), 1(7)>
  # DEBUG result => NULL
  # DEBUG BEGIN_STMT
  if (_19 < 0)
    goto <bb 11>; [25.50%]
  else
    goto <bb 13>; [74.50%]

  <bb 11> [local count: 27380]:
  # DEBUG BEGIN_STMT
  status_17 = FlexCAN_Disable (pBase_11);
  # DEBUG status => status_17
  # DEBUG BEGIN_STMT
  if (status_17 != 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 12> [local count: 13690]:
  # DEBUG BEGIN_STMT
  # DEBUG result => status_17

  <bb 13> [local count: 107374]:
  # result_4 = PHI <result_10(10), result_10(11), status_17(12)>
  # DEBUG result => result_4
  # DEBUG BEGIN_STMT
  return result_4;

}


FlexCAN_Ip_SetRxMb14Mask_Privileged (uint8 instance, uint32 mask)
{
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  Flexcan_Ip_StatusType status;
  Flexcan_Ip_StatusType result;
  _Bool _1;
  int _2;
  long unsigned int _18;
  signed int _19;
  _Bool x.0_20;
  long unsigned int _21;
  long unsigned int _22;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = instance_8(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_20 ={v} x;
  if (x.0_20 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 14>; [50.00%]

  <bb 14> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 15> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  # DEBUG status => 0
  # DEBUG BEGIN_STMT
  _2 = (int) instance_8(D);
  pBase_11 = g_Flexcan_Ip_aBase[_2];
  # DEBUG pBase => pBase_11
  # DEBUG BEGIN_STMT
  # DEBUG freeze => 0
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _18 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _19 = (signed int) _18;
  # DEBUG pBase => NULL
  # DEBUG disabled => _19 < 0
  # DEBUG BEGIN_STMT
  if (_19 < 0)
    goto <bb 5>; [25.50%]
  else
    goto <bb 6>; [74.50%]

  <bb 5> [local count: 27380]:
  # DEBUG BEGIN_STMT
  result_13 = FlexCAN_Enable (pBase_11);
  # DEBUG result => result_13

  <bb 6> [local count: 107374]:
  # result_3 = PHI <0(4), result_13(5)>
  # DEBUG result => result_3
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsFreezeMode
  # DEBUG BEGIN_STMT
  _21 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _22 = _21 & 16777216;
  # DEBUG base => NULL
  # DEBUG freeze => _22 != 0
  # DEBUG BEGIN_STMT
  if (_22 == 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 53687]:
  if (result_3 == 0)
    goto <bb 10>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 8> [local count: 80531]:
  # DEBUG result => result_3
  # DEBUG BEGIN_STMT
  if (result_3 == 0)
    goto <bb 9>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 9> [local count: 40265]:
  # DEBUG BEGIN_STMT
  pBase_11->RX14MASK ={v} mask_14(D);

  <bb 10> [local count: 107374]:
  # result_10 = PHI <result_3(8), 0(9), 1(7)>
  # DEBUG result => NULL
  # DEBUG BEGIN_STMT
  if (_19 < 0)
    goto <bb 11>; [25.50%]
  else
    goto <bb 13>; [74.50%]

  <bb 11> [local count: 27380]:
  # DEBUG BEGIN_STMT
  status_17 = FlexCAN_Disable (pBase_11);
  # DEBUG status => status_17
  # DEBUG BEGIN_STMT
  if (status_17 != 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 12> [local count: 13690]:
  # DEBUG BEGIN_STMT
  # DEBUG result => status_17

  <bb 13> [local count: 107374]:
  # result_4 = PHI <result_10(10), result_10(11), status_17(12)>
  # DEBUG result => result_4
  # DEBUG BEGIN_STMT
  return result_4;

}


FlexCAN_Ip_AbortTransfer (uint8 u8Instance, uint8 mb_idx)
{
  volatile boolean x;
  volatile boolean x;
  Flexcan_Ip_StatusType result;
  const struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * pBase;
  _Bool _1;
  unsigned char _2;
  _Bool _3;
  int _4;
  int _5;
  <unnamed type> _6;
  long unsigned int _7;
  _Bool _8;
  <unnamed type> _9;
  <unnamed type> _10;
  _Bool x.0_24;
  _Bool x.0_25;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = u8Instance_15(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_25 ={v} x;
  if (x.0_25 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 14>; [50.00%]

  <bb 14> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 16> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 = mb_idx_17(D) + 160;
  _3 = _2 > 158;
  x ={v} _3;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_24 ={v} x;
  if (x.0_24 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 13> [local count: 53687]:

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 15> [local count: 536870913]:
  goto <bb 5>; [100.00%]

  <bb 6> [local count: 53687]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _4 = (int) u8Instance_15(D);
  pBase_18 = g_Flexcan_Ip_aBase[_4];
  # DEBUG pBase => pBase_18
  # DEBUG BEGIN_STMT
  state_19 = g_flexcan_Ip_StatePtr[_4];
  # DEBUG state => state_19
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  if (mb_idx_17(D) <= 95)
    goto <bb 7>; [50.00%]
  else
    goto <bb 12>; [50.00%]

  <bb 7> [local count: 26844]:
  # DEBUG BEGIN_STMT
  _5 = (int) mb_idx_17(D);
  _6 ={v} state_19->mbs[_5].state;
  if (_6 == 0)
    goto <bb 12>; [52.23%]
  else
    goto <bb 8>; [47.77%]

  <bb 8> [local count: 12823]:
  # DEBUG BEGIN_STMT
  _7 = (long unsigned int) mb_idx_17(D);
  _8 = state_19->isIntActive;
  FLEXCAN_ClearMsgBuffIntCmd (pBase_18, u8Instance_15(D), _7, _8);
  # DEBUG BEGIN_STMT
  _9 ={v} state_19->mbs[_5].state;
  if (_9 == 2)
    goto <bb 9>; [20.24%]
  else
    goto <bb 10>; [79.76%]

  <bb 9> [local count: 2595]:
  # DEBUG BEGIN_STMT
  result_22 = FlexCAN_AbortTxTransfer (u8Instance_15(D), mb_idx_17(D));
  # DEBUG result => result_22

  <bb 10> [local count: 12823]:
  # result_11 = PHI <0(8), result_22(9)>
  # DEBUG result => result_11
  # DEBUG BEGIN_STMT
  _10 ={v} state_19->mbs[_5].state;
  if (_10 == 1)
    goto <bb 11>; [20.24%]
  else
    goto <bb 12>; [79.76%]

  <bb 11> [local count: 2595]:
  # DEBUG BEGIN_STMT
  FlexCAN_AbortRxTransfer (u8Instance_15(D), mb_idx_17(D));

  <bb 12> [local count: 53687]:
  # result_12 = PHI <0(6), 5(7), result_11(10), result_11(11)>
  # DEBUG result => result_12
  # DEBUG BEGIN_STMT
  return result_12;

}


FlexCAN_Ip_SetErrorInt_Privileged (uint8 u8Instance, Flexcan_Ip_ErrorIntType type, boolean enable)
{
  volatile boolean x;
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  Flexcan_Ip_StatusType status;
  Flexcan_Ip_StatusType result;
  _Bool _1;
  int _2;
  long unsigned int _23;
  signed int _24;
  _Bool x.0_25;
  long unsigned int _26;
  long unsigned int _27;
  long unsigned int _28;
  long unsigned int _29;
  _Bool x.0_30;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = u8Instance_7(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_25 ={v} x;
  if (x.0_25 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 21>; [50.00%]

  <bb 21> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 23> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  # DEBUG status => 0
  # DEBUG BEGIN_STMT
  _2 = (int) u8Instance_7(D);
  pBase_11 = g_Flexcan_Ip_aBase[_2];
  # DEBUG pBase => pBase_11
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _23 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _24 = (signed int) _23;
  # DEBUG pBase => NULL
  # DEBUG disabled => _24 < 0
  # DEBUG BEGIN_STMT
  if (_24 < 0)
    goto <bb 5>; [25.50%]
  else
    goto <bb 6>; [74.50%]

  <bb 5> [local count: 27380]:
  # DEBUG BEGIN_STMT
  result_13 = FlexCAN_Enable (pBase_11);
  # DEBUG result => result_13
  # DEBUG BEGIN_STMT
  if (result_13 == 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 16>; [50.00%]

  <bb 6> [local count: 93684]:
  # result_9 = PHI <result_13(5), 0(4)>
  # DEBUG result => NULL
  # DEBUG BEGIN_STMT
  switch (type_14(D)) <default: <L14> [16.67%], case 0: <L22> [16.67%], case 1: <L23> [16.67%], case 2: <L4> [16.67%], case 3: <L5> [16.67%], case 4: <L3> [16.67%]>

  <bb 7> [local count: 15617]:
<L3>:
  # DEBUG BEGIN_STMT
  FlexCAN_SetErrIntCmd (pBase_11, 32768, enable_15(D));
  # DEBUG BEGIN_STMT
  goto <bb 16>; [100.00%]

  <bb 8> [local count: 15617]:
<L4>:
  # DEBUG BEGIN_STMT
  FlexCAN_SetErrIntCmd (pBase_11, 16384, enable_15(D));
  # DEBUG BEGIN_STMT
  goto <bb 16>; [100.00%]

  <bb 9> [local count: 15617]:
<L5>:
  # DEBUG BEGIN_STMT
  FlexCAN_SetErrIntCmd (pBase_11, 16385, enable_15(D));
  # DEBUG BEGIN_STMT
  goto <bb 16>; [100.00%]

  <bb 10> [local count: 15617]:
<L22>:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsFreezeMode
  # DEBUG BEGIN_STMT
  _26 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _27 = _26 & 16777216;
  # DEBUG base => NULL
  if (_27 == 0)
    goto <bb 16>; [67.00%]
  else
    goto <bb 11>; [33.00%]

  <bb 11> [local count: 5154]:
  # DEBUG BEGIN_STMT
  FlexCAN_SetErrIntCmd (pBase_11, 1024, enable_15(D));
  goto <bb 16>; [100.00%]

  <bb 12> [local count: 15617]:
<L23>:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsFreezeMode
  # DEBUG BEGIN_STMT
  _28 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _29 = _28 & 16777216;
  # DEBUG base => NULL
  if (_29 == 0)
    goto <bb 16>; [67.00%]
  else
    goto <bb 13>; [33.00%]

  <bb 13> [local count: 5154]:
  # DEBUG BEGIN_STMT
  FlexCAN_SetErrIntCmd (pBase_11, 2048, enable_15(D));
  goto <bb 16>; [100.00%]

  <bb 14> [local count: 15617]:
<L14>:
  # DEBUG BEGIN_STMT
  x ={v} 0;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_30 ={v} x;
  if (x.0_30 != 0)
    goto <bb 16>; [50.00%]
  else
    goto <bb 20>; [50.00%]

  <bb 20> [local count: 7809]:

  <bb 15> [local count: 78085593]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 22> [local count: 78085593]:
  goto <bb 15>; [100.00%]

  <bb 16> [local count: 99584]:
  # result_3 = PHI <result_13(5), result_9(7), result_9(8), result_9(9), result_9(11), result_9(13), result_9(14), 1(10), 1(12)>
  # DEBUG x => NULL
  # DEBUG result => result_3
  # DEBUG BEGIN_STMT
  if (_24 < 0)
    goto <bb 17>; [25.50%]
  else
    goto <bb 19>; [74.50%]

  <bb 17> [local count: 25394]:
  # DEBUG BEGIN_STMT
  status_22 = FlexCAN_Disable (pBase_11);
  # DEBUG status => status_22
  # DEBUG BEGIN_STMT
  if (status_22 != 0)
    goto <bb 18>; [50.00%]
  else
    goto <bb 19>; [50.00%]

  <bb 18> [local count: 12697]:
  # DEBUG BEGIN_STMT
  # DEBUG result => status_22

  <bb 19> [local count: 99584]:
  # result_4 = PHI <result_3(16), result_3(17), status_22(18)>
  # DEBUG result => result_4
  # DEBUG BEGIN_STMT
  return result_4;

}


FlexCAN_Ip_DisableInterrupts_Privileged (uint8 u8Instance)
{
  volatile boolean x;
  struct Flexcan_Ip_StateType * state;
  Flexcan_Ip_StatusType result;
  struct FLEXCAN_Type * pBase;
  int _1;
  _Bool _2;
  _Bool _3;
  long unsigned int _14;
  signed int _15;
  _Bool x.0_16;
  long unsigned int _17;
  signed int _18;
  long unsigned int _19;
  long unsigned int _20;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = (int) u8Instance_7(D);
  pBase_9 = g_Flexcan_Ip_aBase[_1];
  # DEBUG pBase => pBase_9
  # DEBUG BEGIN_STMT
  # DEBUG result => 1
  # DEBUG BEGIN_STMT
  state_10 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_10
  # DEBUG BEGIN_STMT
  _2 = u8Instance_7(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_16 ={v} x;
  if (x.0_16 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 10> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 11> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_9
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _14 ={v} MEM[(const struct FLEXCAN_Type *)pBase_9].MCR;
  _15 = (signed int) _14;
  # DEBUG pBase => NULL
  if (_15 >= 0)
    goto <bb 5>; [41.48%]
  else
    goto <bb 9>; [58.52%]

  <bb 5> [local count: 44539]:
  # DEBUG BEGIN_STMT
  FlexCAN_DisableInterrupts (pBase_9);
  # DEBUG BEGIN_STMT
  _3 = FlexCAN_IsEnhancedRxFifoAvailable (pBase_9);
  if (_3 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 6> [local count: 22269]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_9
  # DEBUG INLINE_ENTRY FlexCAN_IsEnhancedRxFifoEnabled
  # DEBUG BEGIN_STMT
  _17 ={v} MEM[(const struct FLEXCAN_Type *)pBase_9].ERFCR;
  _18 = (signed int) _17;
  # DEBUG base => NULL
  if (_18 < 0)
    goto <bb 7>; [41.00%]
  else
    goto <bb 8>; [59.00%]

  <bb 7> [local count: 9130]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_9
  # DEBUG enable => 0
  # DEBUG INLINE_ENTRY FlexCAN_SetEnhancedRxFifoIntAll
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _19 ={v} pBase_9->ERFIER;
  _20 = _19 & 268435455;
  pBase_9->ERFIER ={v} _20;

  <bb 8> [local count: 44539]:
  # DEBUG base => NULL
  # DEBUG enable => NULL
  # DEBUG BEGIN_STMT
  state_10->isIntActive = 0;
  # DEBUG BEGIN_STMT
  # DEBUG result => 0

  <bb 9> [local count: 107374]:
  # result_4 = PHI <1(4), 0(8)>
  # DEBUG result => result_4
  # DEBUG BEGIN_STMT
  return result_4;

}


FlexCAN_Ip_EnableInterrupts_Privileged (uint8 u8Instance)
{
  volatile boolean x;
  struct Flexcan_Ip_StateType * state;
  Flexcan_Ip_StatusType result;
  struct FLEXCAN_Type * pBase;
  int _1;
  _Bool _2;
  _Bool _3;
  _Bool _4;
  long unsigned int _15;
  signed int _16;
  _Bool x.0_17;
  long unsigned int _18;
  signed int _19;
  long unsigned int _20;
  long unsigned int _21;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = (int) u8Instance_8(D);
  pBase_10 = g_Flexcan_Ip_aBase[_1];
  # DEBUG pBase => pBase_10
  # DEBUG BEGIN_STMT
  # DEBUG result => 1
  # DEBUG BEGIN_STMT
  state_11 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_11
  # DEBUG BEGIN_STMT
  _2 = u8Instance_8(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_17 ={v} x;
  if (x.0_17 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 11>; [50.00%]

  <bb 11> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 12> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_10
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _15 ={v} MEM[(const struct FLEXCAN_Type *)pBase_10].MCR;
  _16 = (signed int) _15;
  # DEBUG pBase => NULL
  if (_16 >= 0)
    goto <bb 5>; [41.48%]
  else
    goto <bb 10>; [58.52%]

  <bb 5> [local count: 44539]:
  # DEBUG BEGIN_STMT
  FlexCAN_EnableInterrupts (pBase_10, u8Instance_8(D));
  # DEBUG BEGIN_STMT
  _3 = state_11->enhancedFifoOutput.isPolling;
  if (_3 != 0)
    goto <bb 9>; [67.00%]
  else
    goto <bb 6>; [33.00%]

  <bb 6> [local count: 14698]:
  _4 = FlexCAN_IsEnhancedRxFifoAvailable (pBase_10);
  if (_4 != 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 7> [local count: 7349]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_10
  # DEBUG INLINE_ENTRY FlexCAN_IsEnhancedRxFifoEnabled
  # DEBUG BEGIN_STMT
  _18 ={v} MEM[(const struct FLEXCAN_Type *)pBase_10].ERFCR;
  _19 = (signed int) _18;
  # DEBUG base => NULL
  if (_19 < 0)
    goto <bb 8>; [41.00%]
  else
    goto <bb 9>; [59.00%]

  <bb 8> [local count: 3013]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_10
  # DEBUG enable => 1
  # DEBUG INLINE_ENTRY FlexCAN_SetEnhancedRxFifoIntAll
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _20 ={v} pBase_10->ERFIER;
  _21 = _20 | 4026531840;
  pBase_10->ERFIER ={v} _21;

  <bb 9> [local count: 44539]:
  # DEBUG base => NULL
  # DEBUG enable => NULL
  # DEBUG BEGIN_STMT
  state_11->isIntActive = 1;
  # DEBUG BEGIN_STMT
  # DEBUG result => 0

  <bb 10> [local count: 107374]:
  # result_5 = PHI <1(4), 0(9)>
  # DEBUG result => result_5
  # DEBUG BEGIN_STMT
  return result_5;

}


FlexCAN_Ip_ClearBuffStatusFlag (uint8 instance, uint8 msgBuffIdx)
{
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  _Bool _1;
  int _2;
  long unsigned int _3;
  _Bool x.0_10;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = instance_5(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_10 ={v} x;
  if (x.0_10 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 8> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 9> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 = (int) instance_5(D);
  pBase_7 = g_Flexcan_Ip_aBase[_2];
  # DEBUG pBase => pBase_7
  # DEBUG BEGIN_STMT
  if (msgBuffIdx_8(D) == 255)
    goto <bb 5>; [51.12%]
  else
    goto <bb 6>; [48.88%]

  <bb 5> [local count: 54890]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_7
  # DEBUG intFlag => 30
  # DEBUG INLINE_ENTRY FlexCAN_ClearEnhancedRxFifoIntStatusFlag
  # DEBUG BEGIN_STMT
  pBase_7->ERFSR ={v} 1073741824;
  goto <bb 7>; [100.00%]

  <bb 6> [local count: 52484]:
  # DEBUG BEGIN_STMT
  _3 = (long unsigned int) msgBuffIdx_8(D);
  FlexCAN_ClearMsgBuffIntStatusFlag (pBase_7, _3);

  <bb 7> [local count: 107374]:
  # DEBUG base => NULL
  # DEBUG intFlag => NULL
  return;

}


FlexCAN_Ip_GetBuffStatusFlag (uint8 instance, uint8 msgBuffIdx)
{
  volatile boolean x;
  const struct FLEXCAN_Type * pBase;
  boolean returnResult;
  _Bool _1;
  int _2;
  long unsigned int _3;
  unsigned char _4;
  long unsigned int _13;
  _Bool x.0_15;
  long unsigned int _16;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG returnResult => 1
  # DEBUG BEGIN_STMT
  _1 = instance_7(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_15 ={v} x;
  if (x.0_15 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 8> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 9> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 = (int) instance_7(D);
  pBase_9 = g_Flexcan_Ip_aBase[_2];
  # DEBUG pBase => pBase_9
  # DEBUG BEGIN_STMT
  if (msgBuffIdx_10(D) == 255)
    goto <bb 5>; [51.12%]
  else
    goto <bb 6>; [48.88%]

  <bb 5> [local count: 54890]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_9
  # DEBUG intFlag => 30
  # DEBUG INLINE_ENTRY FlexCAN_GetEnhancedRxFIFOStatusFlag
  # DEBUG BEGIN_STMT
  _16 ={v} pBase_9->ERFSR;
  _13 = _16 >> 30;
  # DEBUG base => NULL
  # DEBUG intFlag => NULL
  returnResult_14 = (boolean) _13;
  # DEBUG returnResult => returnResult_14
  goto <bb 7>; [100.00%]

  <bb 6> [local count: 52484]:
  # DEBUG BEGIN_STMT
  _3 = (long unsigned int) msgBuffIdx_10(D);
  _4 = FlexCAN_GetBuffStatusFlag (pBase_9, _3);
  returnResult_12 = _4 == 1;
  # DEBUG returnResult => returnResult_12

  <bb 7> [local count: 107374]:
  # returnResult_5 = PHI <returnResult_14(5), returnResult_12(6)>
  # DEBUG returnResult => returnResult_5
  # DEBUG BEGIN_STMT
  return returnResult_5;

}


FlexCAN_Ip_SetTxArbitrationStartDelay_Privileged (uint8 instance, uint8 value)
{
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  Flexcan_Ip_StatusType status;
  Flexcan_Ip_StatusType result;
  _Bool _1;
  int _2;
  long unsigned int _20;
  signed int _21;
  _Bool x.0_22;
  long unsigned int _23;
  long unsigned int _24;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = instance_8(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_22 ={v} x;
  if (x.0_22 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 14>; [50.00%]

  <bb 14> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 15> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  # DEBUG status => 0
  # DEBUG BEGIN_STMT
  _2 = (int) instance_8(D);
  pBase_11 = g_Flexcan_Ip_aBase[_2];
  # DEBUG pBase => pBase_11
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _20 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _21 = (signed int) _20;
  # DEBUG pBase => NULL
  # DEBUG disabled => _21 < 0
  # DEBUG BEGIN_STMT
  if (_21 < 0)
    goto <bb 5>; [25.50%]
  else
    goto <bb 6>; [74.50%]

  <bb 5> [local count: 27380]:
  # DEBUG BEGIN_STMT
  result_13 = FlexCAN_Enable (pBase_11);
  # DEBUG result => result_13

  <bb 6> [local count: 107374]:
  # result_3 = PHI <0(4), result_13(5)>
  # DEBUG result => result_3
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsFreezeMode
  # DEBUG BEGIN_STMT
  _23 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _24 = _23 & 16777216;
  # DEBUG base => NULL
  # DEBUG freeze => _24 != 0
  # DEBUG BEGIN_STMT
  if (_24 == 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 53687]:
  if (result_3 == 0)
    goto <bb 10>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 8> [local count: 80531]:
  # DEBUG result => result_3
  # DEBUG BEGIN_STMT
  if (result_3 == 0)
    goto <bb 9>; [33.00%]
  else
    goto <bb 10>; [67.00%]

  <bb 9> [local count: 26575]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_17 ();
  # DEBUG BEGIN_STMT
  FlexCAN_SetTxArbitrationStartDelay (pBase_11, value_15(D));
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_17 ();

  <bb 10> [local count: 107374]:
  # result_10 = PHI <result_3(8), 0(9), 1(7)>
  # DEBUG result => NULL
  # DEBUG BEGIN_STMT
  if (_21 < 0)
    goto <bb 11>; [25.50%]
  else
    goto <bb 13>; [74.50%]

  <bb 11> [local count: 27380]:
  # DEBUG BEGIN_STMT
  status_19 = FlexCAN_Disable (pBase_11);
  # DEBUG status => status_19
  # DEBUG BEGIN_STMT
  if (status_19 != 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 12> [local count: 13690]:
  # DEBUG BEGIN_STMT
  # DEBUG result => status_19

  <bb 13> [local count: 107374]:
  # result_4 = PHI <result_10(10), result_10(11), status_19(12)>
  # DEBUG result => result_4
  # DEBUG BEGIN_STMT
  return result_4;

}


FlexCAN_Ip_SetTDCOffset_Privileged (uint8 instance, boolean enable, uint8 offset)
{
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  Flexcan_Ip_StatusType status;
  Flexcan_Ip_StatusType result;
  _Bool _1;
  int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _25;
  signed int _26;
  _Bool x.0_27;
  long unsigned int _28;
  long unsigned int _29;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = instance_11(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_27 ={v} x;
  if (x.0_27 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 17>; [50.00%]

  <bb 17> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 18> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  # DEBUG status => 0
  # DEBUG BEGIN_STMT
  _2 = (int) instance_11(D);
  pBase_14 = g_Flexcan_Ip_aBase[_2];
  # DEBUG pBase => pBase_14
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_14
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _25 ={v} MEM[(const struct FLEXCAN_Type *)pBase_14].MCR;
  _26 = (signed int) _25;
  # DEBUG pBase => NULL
  # DEBUG disabled => _26 < 0
  # DEBUG BEGIN_STMT
  if (_26 < 0)
    goto <bb 5>; [25.50%]
  else
    goto <bb 6>; [74.50%]

  <bb 5> [local count: 27380]:
  # DEBUG BEGIN_STMT
  result_16 = FlexCAN_Enable (pBase_14);
  # DEBUG result => result_16

  <bb 6> [local count: 107374]:
  # result_5 = PHI <0(4), result_16(5)>
  # DEBUG result => result_5
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_14
  # DEBUG INLINE_ENTRY FlexCAN_IsFreezeMode
  # DEBUG BEGIN_STMT
  _28 ={v} MEM[(const struct FLEXCAN_Type *)pBase_14].MCR;
  _29 = _28 & 16777216;
  # DEBUG base => NULL
  # DEBUG freeze => _29 != 0
  # DEBUG BEGIN_STMT
  if (_29 == 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 53687]:
  if (result_5 == 0)
    goto <bb 13>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 8> [local count: 80531]:
  # DEBUG result => result_5
  # DEBUG BEGIN_STMT
  if (result_5 == 0)
    goto <bb 9>; [33.00%]
  else
    goto <bb 13>; [67.00%]

  <bb 9> [local count: 26575]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_16 ();
  # DEBUG BEGIN_STMT
  _3 ={v} pBase_14->CTRL2;
  _4 = _3 & 8192;
  if (_4 != 0)
    goto <bb 10>; [50.00%]
  else
    goto <bb 11>; [50.00%]

  <bb 10> [local count: 13288]:
  # DEBUG BEGIN_STMT
  FlexCAN_SetEnhancedTDCOffset (pBase_14, enable_18(D), offset_19(D));
  goto <bb 12>; [100.00%]

  <bb 11> [local count: 13288]:
  # DEBUG BEGIN_STMT
  FlexCAN_SetTDCOffset (pBase_14, enable_18(D), offset_19(D));

  <bb 12> [local count: 26575]:
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_16 ();

  <bb 13> [local count: 107374]:
  # result_13 = PHI <result_5(8), 0(12), 1(7)>
  # DEBUG result => NULL
  # DEBUG BEGIN_STMT
  if (_26 < 0)
    goto <bb 14>; [25.50%]
  else
    goto <bb 16>; [74.50%]

  <bb 14> [local count: 27380]:
  # DEBUG BEGIN_STMT
  status_24 = FlexCAN_Disable (pBase_14);
  # DEBUG status => status_24
  # DEBUG BEGIN_STMT
  if (status_24 != 0)
    goto <bb 15>; [50.00%]
  else
    goto <bb 16>; [50.00%]

  <bb 15> [local count: 13690]:
  # DEBUG BEGIN_STMT
  # DEBUG result => status_24

  <bb 16> [local count: 107374]:
  # result_6 = PHI <result_13(13), result_13(14), status_24(15)>
  # DEBUG result => result_6
  # DEBUG BEGIN_STMT
  return result_6;

}


FlexCAN_Ip_GetBitrateFD (uint8 instance, struct Flexcan_Ip_TimeSegmentType * bitrate)
{
  volatile boolean x;
  volatile boolean x;
  const struct FLEXCAN_Type * pBase;
  _Bool _1;
  _Bool _2;
  int _3;
  long unsigned int _11;
  long unsigned int _12;
  _Bool _13;
  _Bool x.0_14;
  _Bool x.0_15;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = instance_5(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_15 ={v} x;
  if (x.0_15 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 11>; [50.00%]

  <bb 11> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 13> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 = bitrate_7(D) != 0B;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_14 ={v} x;
  if (x.0_14 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 10> [local count: 53687]:

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 12> [local count: 536870913]:
  goto <bb 5>; [100.00%]

  <bb 6> [local count: 53687]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 = (int) instance_5(D);
  pBase_8 = g_Flexcan_Ip_aBase[_3];
  # DEBUG pBase => pBase_8
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_8
  # DEBUG INLINE_ENTRY FlexCAN_IsEnhCbtEnabled
  # DEBUG BEGIN_STMT
  _11 ={v} pBase_8->CTRL2;
  _12 = _11 & 8192;
  _13 = _12 != 0;
  # DEBUG pBase => NULL
  # DEBUG enhCbt => _13
  # DEBUG BEGIN_STMT
  if (_12 != 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 26844]:
  # DEBUG BEGIN_STMT
  FlexCAN_GetEnhancedDataTimeSegments (pBase_8, bitrate_7(D));
  goto <bb 9>; [100.00%]

  <bb 8> [local count: 26844]:
  # DEBUG BEGIN_STMT
  FlexCAN_GetFDTimeSegments (pBase_8, bitrate_7(D));

  <bb 9> [local count: 53687]:
  # DEBUG BEGIN_STMT
  return _13;

}


FlexCAN_Ip_SetBitrateCbt_Privileged (uint8 instance, const struct Flexcan_Ip_TimeSegmentType * bitrate, boolean bitRateSwitch)
{
  volatile boolean x;
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  Flexcan_Ip_StatusType status;
  Flexcan_Ip_StatusType result;
  _Bool _1;
  _Bool _2;
  int _3;
  long unsigned int _25;
  long unsigned int _26;
  _Bool _27;
  long unsigned int _28;
  signed int _29;
  _Bool x.0_30;
  _Bool x.0_31;
  long unsigned int _32;
  long unsigned int _33;
  long unsigned int _34;
  long unsigned int _35;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = instance_11(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_31 ={v} x;
  if (x.0_31 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 21>; [50.00%]

  <bb 21> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 23> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 = bitrate_13(D) != 0B;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_30 ={v} x;
  if (x.0_30 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 20>; [50.00%]

  <bb 20> [local count: 53687]:

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 22> [local count: 536870913]:
  goto <bb 5>; [100.00%]

  <bb 6> [local count: 53687]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  # DEBUG status => 0
  # DEBUG BEGIN_STMT
  _3 = (int) instance_11(D);
  pBase_14 = g_Flexcan_Ip_aBase[_3];
  # DEBUG pBase => pBase_14
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_14
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _28 ={v} MEM[(const struct FLEXCAN_Type *)pBase_14].MCR;
  _29 = (signed int) _28;
  # DEBUG pBase => NULL
  # DEBUG disabled => _29 < 0
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_14
  # DEBUG INLINE_ENTRY FlexCAN_IsFDEnabled
  # DEBUG BEGIN_STMT
  _25 ={v} MEM[(const struct FLEXCAN_Type *)pBase_14].MCR;
  _26 = _25 & 2048;
  _27 = _26 != 0;
  # DEBUG base => NULL
  # DEBUG fd_enable => _27
  # DEBUG BEGIN_STMT
  if (_29 < 0)
    goto <bb 7>; [25.50%]
  else
    goto <bb 8>; [74.50%]

  <bb 7> [local count: 13690]:
  # DEBUG BEGIN_STMT
  result_16 = FlexCAN_Enable (pBase_14);
  # DEBUG result => result_16

  <bb 8> [local count: 53687]:
  # result_5 = PHI <0(6), result_16(7)>
  # DEBUG result => result_5
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_14
  # DEBUG INLINE_ENTRY FlexCAN_IsFreezeMode
  # DEBUG BEGIN_STMT
  _32 ={v} MEM[(const struct FLEXCAN_Type *)pBase_14].MCR;
  _33 = _32 & 16777216;
  # DEBUG base => NULL
  # DEBUG freeze => _33 != 0
  # DEBUG BEGIN_STMT
  if (_26 == 0)
    goto <bb 16>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 9> [local count: 26844]:
  if (_33 == 0)
    goto <bb 10>; [50.00%]
  else
    goto <bb 11>; [50.00%]

  <bb 10> [local count: 13422]:
  if (result_5 == 0)
    goto <bb 16>; [50.00%]
  else
    goto <bb 11>; [50.00%]

  <bb 11> [local count: 20133]:
  # DEBUG result => result_5
  # DEBUG BEGIN_STMT
  if (result_5 == 0)
    goto <bb 12>; [33.00%]
  else
    goto <bb 16>; [67.00%]

  <bb 12> [local count: 6644]:
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_14
  # DEBUG INLINE_ENTRY FlexCAN_IsEnhCbtEnabled
  # DEBUG BEGIN_STMT
  _34 ={v} MEM[(const struct FLEXCAN_Type *)pBase_14].CTRL2;
  _35 = _34 & 8192;
  # DEBUG pBase => NULL
  # DEBUG enhCbt => _35 != 0
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_15 ();
  # DEBUG BEGIN_STMT
  FlexCAN_SetFDEnabled (pBase_14, _27, bitRateSwitch_18(D));
  # DEBUG BEGIN_STMT
  if (_35 != 0)
    goto <bb 13>; [50.00%]
  else
    goto <bb 14>; [50.00%]

  <bb 13> [local count: 3322]:
  # DEBUG BEGIN_STMT
  FlexCAN_SetEnhancedDataTimeSegments (pBase_14, bitrate_13(D));
  goto <bb 15>; [100.00%]

  <bb 14> [local count: 3322]:
  # DEBUG BEGIN_STMT
  FlexCAN_SetFDTimeSegments (pBase_14, bitrate_13(D));

  <bb 15> [local count: 6644]:
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_15 ();

  <bb 16> [local count: 53687]:
  # result_4 = PHI <result_5(11), 0(15), 1(8), 1(10)>
  # DEBUG result => NULL
  # DEBUG BEGIN_STMT
  if (_29 < 0)
    goto <bb 17>; [25.50%]
  else
    goto <bb 19>; [74.50%]

  <bb 17> [local count: 13690]:
  # DEBUG BEGIN_STMT
  status_24 = FlexCAN_Disable (pBase_14);
  # DEBUG status => status_24
  # DEBUG BEGIN_STMT
  if (status_24 != 0)
    goto <bb 18>; [50.00%]
  else
    goto <bb 19>; [50.00%]

  <bb 18> [local count: 6845]:
  # DEBUG BEGIN_STMT
  # DEBUG result => status_24

  <bb 19> [local count: 53687]:
  # result_6 = PHI <result_4(16), result_4(17), status_24(18)>
  # DEBUG result => result_6
  # DEBUG BEGIN_STMT
  return result_6;

}


FlexCAN_Ip_GetTDCValue_Privileged (uint8 u8Instance)
{
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  Flexcan_Ip_StatusType result;
  uint8 value;
  _Bool _1;
  int _2;
  long unsigned int _3;
  long unsigned int _4;
  unsigned char _5;
  long unsigned int _18;
  signed int _19;
  _Bool x.0_20;
  long unsigned int _21;
  long unsigned int _22;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG value => 0
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  _1 = u8Instance_10(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_20 ={v} x;
  if (x.0_20 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 12>; [50.00%]

  <bb 12> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 13> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 = (int) u8Instance_10(D);
  pBase_12 = g_Flexcan_Ip_aBase[_2];
  # DEBUG pBase => pBase_12
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_12
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _18 ={v} MEM[(const struct FLEXCAN_Type *)pBase_12].MCR;
  _19 = (signed int) _18;
  # DEBUG pBase => NULL
  # DEBUG disabled => _19 < 0
  # DEBUG BEGIN_STMT
  if (_19 < 0)
    goto <bb 5>; [25.50%]
  else
    goto <bb 6>; [74.50%]

  <bb 5> [local count: 27380]:
  # DEBUG BEGIN_STMT
  result_14 = FlexCAN_Enable (pBase_12);
  # DEBUG result => result_14
  # DEBUG BEGIN_STMT
  if (result_14 == 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 6> [local count: 93684]:
  # DEBUG result => NULL
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_12
  # DEBUG INLINE_ENTRY FlexCAN_IsEnhCbtEnabled
  # DEBUG BEGIN_STMT
  _21 ={v} MEM[(const struct FLEXCAN_Type *)pBase_12].CTRL2;
  _22 = _21 & 8192;
  # DEBUG pBase => NULL
  if (_22 != 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 46842]:
  # DEBUG BEGIN_STMT
  _3 ={v} pBase_12->ETDC;
  value_16 = (uint8) _3;
  # DEBUG value => value_16
  goto <bb 9>; [100.00%]

  <bb 8> [local count: 46842]:
  # DEBUG BEGIN_STMT
  _4 ={v} pBase_12->FDCTRL;
  _5 = (unsigned char) _4;
  value_15 = _5 & 63;
  # DEBUG value => value_15

  <bb 9> [local count: 107374]:
  # value_6 = PHI <0(5), value_16(7), value_15(8)>
  # DEBUG value => value_6
  # DEBUG BEGIN_STMT
  if (_19 < 0)
    goto <bb 10>; [25.50%]
  else
    goto <bb 11>; [74.50%]

  <bb 10> [local count: 27380]:
  # DEBUG BEGIN_STMT
  FlexCAN_Disable (pBase_12);

  <bb 11> [local count: 107374]:
  # DEBUG BEGIN_STMT
  return value_6;

}


FlexCAN_Ip_GetTDCFail_Privileged (uint8 u8Instance)
{
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  Flexcan_Ip_StatusType result;
  boolean value;
  _Bool _1;
  int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _19;
  signed int _20;
  _Bool x.0_21;
  long unsigned int _22;
  long unsigned int _23;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG value => 0
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  _1 = u8Instance_11(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_21 ={v} x;
  if (x.0_21 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 12>; [50.00%]

  <bb 12> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 13> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 = (int) u8Instance_11(D);
  pBase_13 = g_Flexcan_Ip_aBase[_2];
  # DEBUG pBase => pBase_13
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_13
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _19 ={v} MEM[(const struct FLEXCAN_Type *)pBase_13].MCR;
  _20 = (signed int) _19;
  # DEBUG pBase => NULL
  # DEBUG disabled => _20 < 0
  # DEBUG BEGIN_STMT
  if (_20 < 0)
    goto <bb 5>; [25.50%]
  else
    goto <bb 6>; [74.50%]

  <bb 5> [local count: 27380]:
  # DEBUG BEGIN_STMT
  result_15 = FlexCAN_Enable (pBase_13);
  # DEBUG result => result_15
  # DEBUG BEGIN_STMT
  if (result_15 == 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 6> [local count: 93684]:
  # DEBUG result => NULL
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_13
  # DEBUG INLINE_ENTRY FlexCAN_IsEnhCbtEnabled
  # DEBUG BEGIN_STMT
  _22 ={v} MEM[(const struct FLEXCAN_Type *)pBase_13].CTRL2;
  _23 = _22 & 8192;
  # DEBUG pBase => NULL
  if (_23 != 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 46842]:
  # DEBUG BEGIN_STMT
  _3 ={v} pBase_13->ETDC;
  _4 = _3 & 32768;
  value_17 = _4 != 0;
  # DEBUG value => value_17
  goto <bb 9>; [100.00%]

  <bb 8> [local count: 46842]:
  # DEBUG BEGIN_STMT
  _5 ={v} pBase_13->FDCTRL;
  _6 = _5 & 16384;
  value_16 = _6 != 0;
  # DEBUG value => value_16

  <bb 9> [local count: 107374]:
  # value_7 = PHI <0(5), value_17(7), value_16(8)>
  # DEBUG value => value_7
  # DEBUG BEGIN_STMT
  if (_20 < 0)
    goto <bb 10>; [25.50%]
  else
    goto <bb 11>; [74.50%]

  <bb 10> [local count: 27380]:
  # DEBUG BEGIN_STMT
  FlexCAN_Disable (pBase_13);

  <bb 11> [local count: 107374]:
  # DEBUG BEGIN_STMT
  return value_7;

}


FlexCAN_Ip_ClearTDCFail_Privileged (uint8 u8Instance)
{
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  Flexcan_Ip_StatusType result;
  _Bool _1;
  int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _17;
  signed int _18;
  _Bool x.0_19;
  long unsigned int _20;
  long unsigned int _21;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  _1 = u8Instance_9(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_19 ={v} x;
  if (x.0_19 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 12>; [50.00%]

  <bb 12> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 13> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 = (int) u8Instance_9(D);
  pBase_11 = g_Flexcan_Ip_aBase[_2];
  # DEBUG pBase => pBase_11
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _17 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _18 = (signed int) _17;
  # DEBUG pBase => NULL
  # DEBUG disabled => _18 < 0
  # DEBUG BEGIN_STMT
  if (_18 < 0)
    goto <bb 5>; [25.50%]
  else
    goto <bb 6>; [74.50%]

  <bb 5> [local count: 27380]:
  # DEBUG BEGIN_STMT
  result_13 = FlexCAN_Enable (pBase_11);
  # DEBUG result => result_13
  # DEBUG BEGIN_STMT
  if (result_13 == 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 6> [local count: 93684]:
  # DEBUG result => NULL
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsEnhCbtEnabled
  # DEBUG BEGIN_STMT
  _20 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].CTRL2;
  _21 = _20 & 8192;
  # DEBUG pBase => NULL
  if (_21 != 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 46842]:
  # DEBUG BEGIN_STMT
  _3 ={v} pBase_11->ETDC;
  _4 = _3 | 32768;
  pBase_11->ETDC ={v} _4;
  goto <bb 9>; [100.00%]

  <bb 8> [local count: 46842]:
  # DEBUG BEGIN_STMT
  _5 ={v} pBase_11->FDCTRL;
  _6 = _5 | 16384;
  pBase_11->FDCTRL ={v} _6;

  <bb 9> [local count: 107374]:
  # DEBUG BEGIN_STMT
  if (_18 < 0)
    goto <bb 10>; [25.50%]
  else
    goto <bb 11>; [74.50%]

  <bb 10> [local count: 27380]:
  # DEBUG BEGIN_STMT
  FlexCAN_Disable (pBase_11);

  <bb 11> [local count: 107374]:
  return;

}


FlexCAN_Ip_GetBitrate (uint8 instance, struct Flexcan_Ip_TimeSegmentType * bitrate)
{
  volatile boolean x;
  volatile boolean x;
  const struct FLEXCAN_Type * pBase;
  _Bool _1;
  _Bool _2;
  int _3;
  long unsigned int _12;
  long unsigned int _13;
  _Bool _14;
  _Bool x.0_15;
  _Bool x.0_16;
  long unsigned int _17;
  signed int _18;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = instance_5(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_16 ={v} x;
  if (x.0_16 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 13> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 15> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 = bitrate_7(D) != 0B;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_15 ={v} x;
  if (x.0_15 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 12>; [50.00%]

  <bb 12> [local count: 53687]:

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 14> [local count: 536870913]:
  goto <bb 5>; [100.00%]

  <bb 6> [local count: 53687]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 = (int) instance_5(D);
  pBase_8 = g_Flexcan_Ip_aBase[_3];
  # DEBUG pBase => pBase_8
  # DEBUG BEGIN_STMT
  # DEBUG enhCbt => 0
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_8
  # DEBUG INLINE_ENTRY FlexCAN_IsEnhCbtEnabled
  # DEBUG BEGIN_STMT
  _12 ={v} pBase_8->CTRL2;
  _13 = _12 & 8192;
  _14 = _13 != 0;
  # DEBUG pBase => NULL
  # DEBUG enhCbt => _14
  # DEBUG BEGIN_STMT
  if (_13 != 0)
    goto <bb 7>; [33.00%]
  else
    goto <bb 8>; [67.00%]

  <bb 7> [local count: 17717]:
  # DEBUG BEGIN_STMT
  FlexCAN_GetEnhancedNominalTimeSegments (pBase_8, bitrate_7(D));
  goto <bb 11>; [100.00%]

  <bb 8> [local count: 35970]:
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_8
  # DEBUG INLINE_ENTRY FlexCAN_IsExCbtEnabled
  # DEBUG BEGIN_STMT
  _17 ={v} pBase_8->CBT;
  _18 = (signed int) _17;
  # DEBUG pBase => NULL
  if (_18 < 0)
    goto <bb 9>; [41.00%]
  else
    goto <bb 10>; [59.00%]

  <bb 9> [local count: 14748]:
  # DEBUG BEGIN_STMT
  FlexCAN_GetExtendedTimeSegments (pBase_8, bitrate_7(D));
  goto <bb 11>; [100.00%]

  <bb 10> [local count: 21222]:
  # DEBUG BEGIN_STMT
  FlexCAN_GetTimeSegments (pBase_8, bitrate_7(D));

  <bb 11> [local count: 53687]:
  # DEBUG BEGIN_STMT
  return _14;

}


FlexCAN_Ip_SetBitrate_Privileged (uint8 instance, const struct Flexcan_Ip_TimeSegmentType * bitrate, boolean enhExt)
{
  volatile boolean x;
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  Flexcan_Ip_StatusType status;
  Flexcan_Ip_StatusType result;
  _Bool _1;
  _Bool _2;
  int _3;
  long unsigned int _26;
  signed int _27;
  _Bool x.0_28;
  _Bool x.0_29;
  long unsigned int _30;
  long unsigned int _31;
  long unsigned int _32;
  signed int _33;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = instance_11(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_29 ={v} x;
  if (x.0_29 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 22>; [50.00%]

  <bb 22> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 24> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 = bitrate_13(D) != 0B;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_28 ={v} x;
  if (x.0_28 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 21>; [50.00%]

  <bb 21> [local count: 53687]:

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 23> [local count: 536870913]:
  goto <bb 5>; [100.00%]

  <bb 6> [local count: 53687]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  # DEBUG status => 0
  # DEBUG BEGIN_STMT
  _3 = (int) instance_11(D);
  pBase_14 = g_Flexcan_Ip_aBase[_3];
  # DEBUG pBase => pBase_14
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_14
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _26 ={v} MEM[(const struct FLEXCAN_Type *)pBase_14].MCR;
  _27 = (signed int) _26;
  # DEBUG pBase => NULL
  # DEBUG disabled => _27 < 0
  # DEBUG BEGIN_STMT
  if (_27 < 0)
    goto <bb 7>; [25.50%]
  else
    goto <bb 8>; [74.50%]

  <bb 7> [local count: 13690]:
  # DEBUG BEGIN_STMT
  result_16 = FlexCAN_Enable (pBase_14);
  # DEBUG result => result_16

  <bb 8> [local count: 53687]:
  # result_5 = PHI <0(6), result_16(7)>
  # DEBUG result => result_5
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_14
  # DEBUG INLINE_ENTRY FlexCAN_IsFreezeMode
  # DEBUG BEGIN_STMT
  _30 ={v} MEM[(const struct FLEXCAN_Type *)pBase_14].MCR;
  _31 = _30 & 16777216;
  # DEBUG base => NULL
  # DEBUG freeze => _31 != 0
  # DEBUG BEGIN_STMT
  if (_31 == 0)
    goto <bb 9>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 9> [local count: 26844]:
  if (result_5 == 0)
    goto <bb 17>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 10> [local count: 40265]:
  # DEBUG result => result_5
  # DEBUG BEGIN_STMT
  if (result_5 == 0)
    goto <bb 11>; [33.00%]
  else
    goto <bb 17>; [67.00%]

  <bb 11> [local count: 13288]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_14 ();
  # DEBUG BEGIN_STMT
  FlexCAN_EnhCbtEnable (pBase_14, enhExt_18(D));
  # DEBUG BEGIN_STMT
  if (enhExt_18(D) != 0)
    goto <bb 12>; [33.00%]
  else
    goto <bb 13>; [67.00%]

  <bb 12> [local count: 4385]:
  # DEBUG BEGIN_STMT
  FlexCAN_SetEnhancedNominalTimeSegments (pBase_14, bitrate_13(D));
  goto <bb 16>; [100.00%]

  <bb 13> [local count: 8903]:
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_14
  # DEBUG INLINE_ENTRY FlexCAN_IsExCbtEnabled
  # DEBUG BEGIN_STMT
  _32 ={v} MEM[(const struct FLEXCAN_Type *)pBase_14].CBT;
  _33 = (signed int) _32;
  # DEBUG pBase => NULL
  if (_33 < 0)
    goto <bb 14>; [41.00%]
  else
    goto <bb 15>; [59.00%]

  <bb 14> [local count: 3650]:
  # DEBUG BEGIN_STMT
  FlexCAN_SetExtendedTimeSegments (pBase_14, bitrate_13(D));
  goto <bb 16>; [100.00%]

  <bb 15> [local count: 5253]:
  # DEBUG BEGIN_STMT
  FlexCAN_SetTimeSegments (pBase_14, bitrate_13(D));

  <bb 16> [local count: 13288]:
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_14 ();

  <bb 17> [local count: 53687]:
  # result_4 = PHI <result_5(10), 0(16), 1(9)>
  # DEBUG result => NULL
  # DEBUG BEGIN_STMT
  if (_27 < 0)
    goto <bb 18>; [25.50%]
  else
    goto <bb 20>; [74.50%]

  <bb 18> [local count: 13690]:
  # DEBUG BEGIN_STMT
  status_25 = FlexCAN_Disable (pBase_14);
  # DEBUG status => status_25
  # DEBUG BEGIN_STMT
  if (status_25 != 0)
    goto <bb 19>; [50.00%]
  else
    goto <bb 20>; [50.00%]

  <bb 19> [local count: 6845]:
  # DEBUG BEGIN_STMT
  # DEBUG result => status_25

  <bb 20> [local count: 53687]:
  # result_6 = PHI <result_4(17), result_4(18), status_25(19)>
  # DEBUG result => result_6
  # DEBUG BEGIN_STMT
  return result_6;

}


FlexCAN_Ip_SetRxMaskType_Privileged (uint8 instance, Flexcan_Ip_RxMaskType type)
{
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  Flexcan_Ip_StatusType status;
  Flexcan_Ip_StatusType result;
  _Bool _1;
  int _2;
  long unsigned int _18;
  signed int _19;
  _Bool x.0_20;
  long unsigned int _21;
  long unsigned int _22;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = instance_8(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_20 ={v} x;
  if (x.0_20 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 14>; [50.00%]

  <bb 14> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 15> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  # DEBUG status => 0
  # DEBUG BEGIN_STMT
  _2 = (int) instance_8(D);
  pBase_11 = g_Flexcan_Ip_aBase[_2];
  # DEBUG pBase => pBase_11
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _18 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _19 = (signed int) _18;
  # DEBUG pBase => NULL
  # DEBUG disabled => _19 < 0
  # DEBUG BEGIN_STMT
  if (_19 < 0)
    goto <bb 5>; [25.50%]
  else
    goto <bb 6>; [74.50%]

  <bb 5> [local count: 27380]:
  # DEBUG BEGIN_STMT
  result_13 = FlexCAN_Enable (pBase_11);
  # DEBUG result => result_13

  <bb 6> [local count: 107374]:
  # result_3 = PHI <0(4), result_13(5)>
  # DEBUG result => result_3
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsFreezeMode
  # DEBUG BEGIN_STMT
  _21 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _22 = _21 & 16777216;
  # DEBUG base => NULL
  # DEBUG freeze => _22 != 0
  # DEBUG BEGIN_STMT
  if (_22 == 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 53687]:
  if (result_3 == 0)
    goto <bb 10>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 8> [local count: 80531]:
  # DEBUG result => result_3
  # DEBUG BEGIN_STMT
  if (result_3 == 0)
    goto <bb 9>; [33.00%]
  else
    goto <bb 10>; [67.00%]

  <bb 9> [local count: 26575]:
  # DEBUG BEGIN_STMT
  FlexCAN_SetRxMaskType (pBase_11, type_14(D));

  <bb 10> [local count: 107374]:
  # result_10 = PHI <result_3(8), 0(9), 1(7)>
  # DEBUG result => NULL
  # DEBUG BEGIN_STMT
  if (_19 < 0)
    goto <bb 11>; [25.50%]
  else
    goto <bb 13>; [74.50%]

  <bb 11> [local count: 27380]:
  # DEBUG BEGIN_STMT
  status_17 = FlexCAN_Disable (pBase_11);
  # DEBUG status => status_17
  # DEBUG BEGIN_STMT
  if (status_17 != 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 12> [local count: 13690]:
  # DEBUG BEGIN_STMT
  # DEBUG result => status_17

  <bb 13> [local count: 107374]:
  # result_4 = PHI <result_10(10), result_10(11), status_17(12)>
  # DEBUG result => result_4
  # DEBUG BEGIN_STMT
  return result_4;

}


FlexCAN_Ip_SetStopMode_Privileged (uint8 instance)
{
  volatile boolean x;
  Flexcan_Ip_StatusType status;
  struct FLEXCAN_Type * pBase;
  _Bool _1;
  int _2;
  _Bool x.0_12;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = instance_5(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_12 ={v} x;
  if (x.0_12 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 7> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 8> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 = (int) instance_5(D);
  pBase_7 = g_Flexcan_Ip_aBase[_2];
  # DEBUG pBase => pBase_7
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  status_9 = FlexCAN_EnterFreezeMode (pBase_7);
  # DEBUG status => status_9
  # DEBUG BEGIN_STMT
  if (status_9 == 0)
    goto <bb 5>; [33.00%]
  else
    goto <bb 6>; [67.00%]

  <bb 5> [local count: 35433]:
  # DEBUG BEGIN_STMT
  status_11 = FlexCAN_Disable (pBase_7);
  # DEBUG status => status_11

  <bb 6> [local count: 107374]:
  # status_3 = PHI <status_9(4), status_11(5)>
  # DEBUG status => status_3
  # DEBUG BEGIN_STMT
  return status_3;

}


FlexCAN_Ip_SetStartMode_Privileged (uint8 instance)
{
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  _Bool _1;
  int _2;
  long unsigned int _3;
  long unsigned int _4;
  Flexcan_Ip_StatusType _10;
  _Bool x.0_11;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = instance_5(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_11 ={v} x;
  if (x.0_11 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 5> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 6> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 = (int) instance_5(D);
  pBase_7 = g_Flexcan_Ip_aBase[_2];
  # DEBUG pBase => pBase_7
  # DEBUG BEGIN_STMT
  _3 ={v} pBase_7->MCR;
  _4 = _3 & 2147483647;
  pBase_7->MCR ={v} _4;
  # DEBUG BEGIN_STMT
  _10 = FlexCAN_ExitFreezeMode (pBase_7);
  return _10;

}


FlexCAN_Ip_GetStartMode_Privileged (uint8 instance)
{
  const struct FLEXCAN_Type * base;
  int _1;
  long unsigned int _2;
  long unsigned int _3;
  boolean _7;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_4(D);
  base_6 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_6
  # DEBUG BEGIN_STMT
  _2 ={v} base_6->MCR;
  _3 = _2 & 17825792;
  _7 = _3 == 0;
  return _7;

}


FlexCAN_Ip_GetStopMode_Privileged (uint8 instance)
{
  const struct FLEXCAN_Type * base;
  int _1;
  long unsigned int _2;
  long unsigned int _3;
  boolean _7;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_4(D);
  base_6 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_6
  # DEBUG BEGIN_STMT
  _2 ={v} base_6->MCR;
  _3 = _2 & 1048576;
  _7 = _3 != 0;
  return _7;

}


FlexCAN_Ip_MainFunctionWrite (uint8 instance, uint8 mb_idx)
{
  volatile boolean x;
  struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * base;
  int _1;
  _Bool _2;
  long unsigned int _3;
  unsigned char _4;
  int _5;
  long unsigned int _6;
  _Bool x.0_18;
  long unsigned int vol.5_19;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_8(D);
  base_10 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_10
  # DEBUG BEGIN_STMT
  state_11 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_11
  # DEBUG BEGIN_STMT
  _2 = instance_8(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_18 ={v} x;
  if (x.0_18 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 7> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 8> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 = (long unsigned int) mb_idx_12(D);
  _4 = FlexCAN_GetBuffStatusFlag (base_10, _3);
  if (_4 != 0)
    goto <bb 5>; [33.00%]
  else
    goto <bb 6>; [67.00%]

  <bb 5> [local count: 35433]:
  # DEBUG BEGIN_STMT
  _5 = (int) mb_idx_12(D);
  _6 = FlexCAN_GetMsgBuffTimestamp (base_10, _3);
  state_11->mbs[_5].time_stamp = _6;
  # DEBUG BEGIN_STMT
  # DEBUG base => base_10
  # DEBUG INLINE_ENTRY FlexCAN_UnlockRxMsgBuff
  # DEBUG BEGIN_STMT
  vol.5_19 ={v} MEM[(const struct FLEXCAN_Type *)base_10].TIMER;
  # DEBUG base => NULL
  # DEBUG BEGIN_STMT
  FlexCAN_ClearMsgBuffIntStatusFlag (base_10, _3);
  # DEBUG BEGIN_STMT
  state_11->mbs[_5].state ={v} 0;

  <bb 6> [local count: 107374]:
  return;

}


FlexCAN_Ip_MainFunctionBusOff_Privileged (uint8 instance)
{
  volatile boolean x;
  uint32 u32ErrStatus;
  const struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * base;
  Flexcan_Ip_StatusType eRetVal;
  int _1;
  _Bool _2;
  long unsigned int _3;
  void (*<T33b>) (uint8, Flexcan_Ip_EventType, uint32, const struct FlexCANState *) _4;
  _Bool x.0_15;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG eRetVal => 1
  # DEBUG BEGIN_STMT
  _1 = (int) instance_8(D);
  base_10 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_10
  # DEBUG BEGIN_STMT
  state_11 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_11
  # DEBUG BEGIN_STMT
  # DEBUG u32ErrStatus => 0
  # DEBUG BEGIN_STMT
  _2 = instance_8(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_15 ={v} x;
  if (x.0_15 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 9> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 10> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  u32ErrStatus_12 ={v} base_10->ESR1;
  # DEBUG u32ErrStatus => u32ErrStatus_12
  # DEBUG BEGIN_STMT
  _3 = u32ErrStatus_12 & 4;
  if (_3 != 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 5> [local count: 53687]:
  # DEBUG BEGIN_STMT
  _4 = state_11->error_callback;
  if (_4 != 0B)
    goto <bb 6>; [70.00%]
  else
    goto <bb 7>; [30.00%]

  <bb 6> [local count: 37581]:
  # DEBUG BEGIN_STMT
  _4 (instance_8(D), 11, u32ErrStatus_12, state_11);

  <bb 7> [local count: 53687]:
  # DEBUG BEGIN_STMT
  base_10->ESR1 ={v} 4;
  # DEBUG BEGIN_STMT
  # DEBUG eRetVal => 0

  <bb 8> [local count: 107374]:
  # eRetVal_5 = PHI <1(4), 0(7)>
  # DEBUG eRetVal => eRetVal_5
  # DEBUG BEGIN_STMT
  return eRetVal_5;

}


FlexCAN_Ip_MainFunctionRead (uint8 instance, uint8 mb_idx)
{
  uint32 flag;
  volatile boolean x;
  volatile boolean x;
  const struct Flexcan_Ip_StateType * state;
  const struct FLEXCAN_Type * base;
  int _1;
  _Bool _2;
  unsigned char _3;
  _Bool _4;
  _Bool _5;
  _Bool _6;
  long unsigned int _7;
  unsigned char _8;
  int _9;
  <unnamed type> _10;
  _Bool x.0_22;
  _Bool x.0_23;
  long unsigned int _24;
  signed int _25;
  long unsigned int _26;
  long unsigned int _27;
  unsigned char _28;
  long unsigned int _29;
  long unsigned int _31;
  long unsigned int _32;
  unsigned char _33;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_12(D);
  base_14 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_14
  # DEBUG BEGIN_STMT
  state_15 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_15
  # DEBUG BEGIN_STMT
  _2 = instance_12(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_23 ={v} x;
  if (x.0_23 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 21>; [50.00%]

  <bb 21> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 23> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 = mb_idx_16(D) + 160;
  _4 = _3 > 158;
  x ={v} _4;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_22 ={v} x;
  if (x.0_22 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 20>; [50.00%]

  <bb 20> [local count: 53687]:

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 22> [local count: 536870913]:
  goto <bb 5>; [100.00%]

  <bb 6> [local count: 53687]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  if (mb_idx_16(D) == 255)
    goto <bb 7>; [20.24%]
  else
    goto <bb 11>; [79.76%]

  <bb 7> [local count: 10866]:
  # DEBUG BEGIN_STMT
  _5 = FlexCAN_IsEnhancedRxFifoAvailable (base_14);
  if (_5 != 0)
    goto <bb 8>; [50.00%]
  else
    goto <bb 19>; [50.00%]

  <bb 8> [local count: 5433]:
  # DEBUG BEGIN_STMT
  # DEBUG base => base_14
  # DEBUG INLINE_ENTRY FlexCAN_IsEnhancedRxFifoEnabled
  # DEBUG BEGIN_STMT
  _24 ={v} base_14->ERFCR;
  _25 = (signed int) _24;
  # DEBUG base => NULL
  if (_25 < 0)
    goto <bb 9>; [41.00%]
  else
    goto <bb 19>; [59.00%]

  <bb 9> [local count: 2228]:
  # DEBUG BEGIN_STMT
  # DEBUG base => base_14
  # DEBUG intFlag => 28
  # DEBUG INLINE_ENTRY FlexCAN_GetEnhancedRxFIFOStatusFlag
  # DEBUG BEGIN_STMT
  _26 ={v} base_14->ERFSR;
  _31 = _26 >> 28;
  _27 = _31 & 1;
  _28 = (unsigned char) _27;
  # DEBUG base => NULL
  # DEBUG intFlag => NULL
  if (_28 != 0)
    goto <bb 10>; [33.00%]
  else
    goto <bb 19>; [67.00%]

  <bb 10> [local count: 735]:
  # DEBUG BEGIN_STMT
  FlexCAN_IRQHandlerEnhancedRxFIFO (instance_12(D), 28);
  goto <bb 19>; [100.00%]

  <bb 11> [local count: 42821]:
  # DEBUG BEGIN_STMT
  _6 = state_15->bIsLegacyFifoEn;
  if (_6 != 0)
    goto <bb 12>; [67.00%]
  else
    goto <bb 16>; [33.00%]

  <bb 12> [local count: 28690]:
  if (mb_idx_16(D) <= 7)
    goto <bb 13>; [50.00%]
  else
    goto <bb 16>; [50.00%]

  <bb 13> [local count: 14345]:
  # DEBUG BEGIN_STMT
  if (mb_idx_16(D) == 0)
    goto <bb 14>; [50.00%]
  else
    goto <bb 19>; [50.00%]

  <bb 14> [local count: 7172]:
  # DEBUG BEGIN_STMT
  # DEBUG base => base_14
  # DEBUG msgBuffIdx => 5
  # DEBUG INLINE_ENTRY FlexCAN_GetBuffStatusFlag
  # DEBUG BEGIN_STMT
  # DEBUG flag => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _29 ={v} base_14->IFLAG1;
  _32 = _29 >> 5;
  flag_30 = _32 & 1;
  # DEBUG flag => flag_30
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _33 = (unsigned char) flag_30;
  # DEBUG base => NULL
  # DEBUG msgBuffIdx => NULL
  # DEBUG flag => NULL
  if (_33 != 0)
    goto <bb 15>; [33.00%]
  else
    goto <bb 19>; [67.00%]

  <bb 15> [local count: 2367]:
  # DEBUG BEGIN_STMT
  FlexCAN_IRQHandlerRxFIFO (instance_12(D), 5);
  goto <bb 19>; [100.00%]

  <bb 16> [local count: 28476]:
  # DEBUG BEGIN_STMT
  _7 = (long unsigned int) mb_idx_16(D);
  _8 = FlexCAN_GetBuffStatusFlag (base_14, _7);
  if (_8 != 0)
    goto <bb 17>; [50.00%]
  else
    goto <bb 19>; [50.00%]

  <bb 17> [local count: 14238]:
  # DEBUG BEGIN_STMT
  _9 = (int) mb_idx_16(D);
  _10 ={v} state_15->mbs[_9].state;
  if (_10 == 1)
    goto <bb 18>; [20.24%]
  else
    goto <bb 19>; [79.76%]

  <bb 18> [local count: 2882]:
  # DEBUG BEGIN_STMT
  FlexCAN_IRQHandlerRxMB (instance_12(D), _7);

  <bb 19> [local count: 53687]:
  return;

}


FlexCAN_Ip_Deinit_Privileged (uint8 instance)
{
  volatile boolean x;
  Flexcan_Ip_StatusType result;
  struct FLEXCAN_Type * base;
  int _1;
  _Bool _2;
  _Bool x.0_12;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_4(D);
  base_6 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_6
  # DEBUG BEGIN_STMT
  # DEBUG result => 1
  # DEBUG BEGIN_STMT
  _2 = instance_4(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_12 ={v} x;
  if (x.0_12 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 7> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 8> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  result_8 = FlexCAN_EnterFreezeMode (base_6);
  # DEBUG result => result_8
  # DEBUG BEGIN_STMT
  if (result_8 == 0)
    goto <bb 5>; [33.00%]
  else
    goto <bb 6>; [67.00%]

  <bb 5> [local count: 35433]:
  # DEBUG BEGIN_STMT
  FlexCAN_SetRegDefaultVal (base_6);
  # DEBUG BEGIN_STMT
  FlexCAN_Disable (base_6);
  # DEBUG BEGIN_STMT
  g_flexcan_Ip_StatePtr[_1] = 0B;

  <bb 6> [local count: 107374]:
  # DEBUG BEGIN_STMT
  return result_8;

}


FlexCAN_Ip_SetRxFifoGlobalMask_Privileged (uint8 instance, uint32 mask)
{
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  Flexcan_Ip_StatusType status;
  Flexcan_Ip_StatusType result;
  _Bool _1;
  int _2;
  long unsigned int _17;
  signed int _18;
  _Bool x.0_19;
  long unsigned int _20;
  long unsigned int _21;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = instance_8(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_19 ={v} x;
  if (x.0_19 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 14>; [50.00%]

  <bb 14> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 15> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  # DEBUG status => 0
  # DEBUG BEGIN_STMT
  _2 = (int) instance_8(D);
  pBase_11 = g_Flexcan_Ip_aBase[_2];
  # DEBUG pBase => pBase_11
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _17 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _18 = (signed int) _17;
  # DEBUG pBase => NULL
  # DEBUG disabled => _18 < 0
  # DEBUG BEGIN_STMT
  if (_18 < 0)
    goto <bb 5>; [25.50%]
  else
    goto <bb 6>; [74.50%]

  <bb 5> [local count: 27380]:
  # DEBUG BEGIN_STMT
  result_13 = FlexCAN_Enable (pBase_11);
  # DEBUG result => result_13

  <bb 6> [local count: 107374]:
  # result_3 = PHI <0(4), result_13(5)>
  # DEBUG result => result_3
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsFreezeMode
  # DEBUG BEGIN_STMT
  _20 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _21 = _20 & 16777216;
  # DEBUG base => NULL
  # DEBUG freeze => _21 != 0
  # DEBUG BEGIN_STMT
  if (_21 == 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 53687]:
  if (result_3 == 0)
    goto <bb 10>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 8> [local count: 80531]:
  # DEBUG result => result_3
  # DEBUG BEGIN_STMT
  if (result_3 == 0)
    goto <bb 9>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 9> [local count: 40265]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_11
  # DEBUG Mask => mask_14(D)
  # DEBUG INLINE_ENTRY FlexCAN_SetRxFifoGlobalMask
  # DEBUG BEGIN_STMT
  pBase_11->RXFGMASK ={v} mask_14(D);

  <bb 10> [local count: 107374]:
  # result_10 = PHI <result_3(8), 0(9), 1(7)>
  # DEBUG result => NULL
  # DEBUG base => NULL
  # DEBUG Mask => NULL
  # DEBUG BEGIN_STMT
  if (_18 < 0)
    goto <bb 11>; [25.50%]
  else
    goto <bb 13>; [74.50%]

  <bb 11> [local count: 27380]:
  # DEBUG BEGIN_STMT
  status_16 = FlexCAN_Disable (pBase_11);
  # DEBUG status => status_16
  # DEBUG BEGIN_STMT
  if (status_16 != 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 12> [local count: 13690]:
  # DEBUG BEGIN_STMT
  # DEBUG result => status_16

  <bb 13> [local count: 107374]:
  # result_4 = PHI <result_10(10), result_10(11), status_16(12)>
  # DEBUG result => result_4
  # DEBUG BEGIN_STMT
  return result_4;

}


FlexCAN_Ip_SetRxIndividualMask_Privileged (uint8 instance, uint8 mb_idx, uint32 mask)
{
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  Flexcan_Ip_StatusType status;
  Flexcan_Ip_StatusType result;
  int _1;
  _Bool _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  _Bool x.0_21;
  long unsigned int _22;
  signed int _23;
  long unsigned int _24;
  long unsigned int _25;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  # DEBUG status => 0
  # DEBUG BEGIN_STMT
  _1 = (int) instance_12(D);
  pBase_14 = g_Flexcan_Ip_aBase[_1];
  # DEBUG pBase => pBase_14
  # DEBUG BEGIN_STMT
  # DEBUG freeze => 0
  # DEBUG BEGIN_STMT
  _2 = instance_12(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_21 ={v} x;
  if (x.0_21 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 16>; [50.00%]

  <bb 16> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 17> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 = (long unsigned int) mb_idx_15(D);
  _4 ={v} pBase_14->MCR;
  _5 = _4 & 127;
  if (_3 > _5)
    goto <bb 15>; [35.00%]
  else
    goto <bb 5>; [65.00%]

  <bb 5> [local count: 69793]:
  if (mb_idx_15(D) > 95)
    goto <bb 15>; [35.00%]
  else
    goto <bb 6>; [65.00%]

  <bb 6> [local count: 45366]:
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_14
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _22 ={v} MEM[(const struct FLEXCAN_Type *)pBase_14].MCR;
  _23 = (signed int) _22;
  # DEBUG pBase => NULL
  # DEBUG disabled => _23 < 0
  # DEBUG BEGIN_STMT
  if (_23 < 0)
    goto <bb 7>; [25.50%]
  else
    goto <bb 8>; [74.50%]

  <bb 7> [local count: 11568]:
  # DEBUG BEGIN_STMT
  result_17 = FlexCAN_Enable (pBase_14);
  # DEBUG result => result_17

  <bb 8> [local count: 45366]:
  # result_6 = PHI <0(6), result_17(7)>
  # DEBUG result => result_6
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_14
  # DEBUG INLINE_ENTRY FlexCAN_IsFreezeMode
  # DEBUG BEGIN_STMT
  _24 ={v} MEM[(const struct FLEXCAN_Type *)pBase_14].MCR;
  _25 = _24 & 16777216;
  # DEBUG base => NULL
  # DEBUG freeze => _25 != 0
  # DEBUG BEGIN_STMT
  if (_25 == 0)
    goto <bb 9>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 9> [local count: 22683]:
  if (result_6 == 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 10> [local count: 34024]:
  # DEBUG result => result_6
  # DEBUG BEGIN_STMT
  if (result_6 == 0)
    goto <bb 11>; [50.00%]
  else
    goto <bb 12>; [50.00%]

  <bb 11> [local count: 17012]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_14
  # DEBUG msgBuffIdx => _3
  # DEBUG mask => mask_18(D)
  # DEBUG INLINE_ENTRY FlexCAN_SetRxIndividualMask
  # DEBUG BEGIN_STMT
  pBase_14->RXIMR[_3] ={v} mask_18(D);

  <bb 12> [local count: 45366]:
  # result_11 = PHI <result_6(10), 0(11), 1(9)>
  # DEBUG result => NULL
  # DEBUG base => NULL
  # DEBUG msgBuffIdx => NULL
  # DEBUG mask => NULL
  # DEBUG BEGIN_STMT
  if (_23 < 0)
    goto <bb 13>; [25.50%]
  else
    goto <bb 15>; [74.50%]

  <bb 13> [local count: 11568]:
  # DEBUG BEGIN_STMT
  status_20 = FlexCAN_Disable (pBase_14);
  # DEBUG status => status_20
  # DEBUG BEGIN_STMT
  if (status_20 != 0)
    goto <bb 14>; [50.00%]
  else
    goto <bb 15>; [50.00%]

  <bb 14> [local count: 5784]:
  # DEBUG BEGIN_STMT
  # DEBUG result => status_20

  <bb 15> [local count: 107374]:
  # result_7 = PHI <4(5), result_11(12), result_11(13), status_20(14), 4(4)>
  # DEBUG result => result_7
  # DEBUG BEGIN_STMT
  return result_7;

}


FlexCAN_Ip_ExitFreezeMode_Privileged (uint8 instance)
{
  struct FLEXCAN_Type * base;
  int _1;
  Flexcan_Ip_StatusType _6;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_2(D);
  base_4 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_4
  # DEBUG BEGIN_STMT
  _6 = FlexCAN_ExitFreezeMode (base_4);
  return _6;

}


FlexCAN_Ip_EnterFreezeMode_Privileged (uint8 instance)
{
  struct FLEXCAN_Type * base;
  int _1;
  Flexcan_Ip_StatusType _6;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_2(D);
  base_4 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_4
  # DEBUG BEGIN_STMT
  _6 = FlexCAN_EnterFreezeMode (base_4);
  return _6;

}


FlexCAN_Ip_SetRxMbGlobalMask_Privileged (uint8 instance, uint32 mask)
{
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  Flexcan_Ip_StatusType status;
  Flexcan_Ip_StatusType result;
  int _1;
  _Bool _2;
  long unsigned int _17;
  signed int _18;
  _Bool x.0_19;
  long unsigned int _20;
  long unsigned int _21;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  # DEBUG status => 0
  # DEBUG BEGIN_STMT
  _1 = (int) instance_9(D);
  pBase_11 = g_Flexcan_Ip_aBase[_1];
  # DEBUG pBase => pBase_11
  # DEBUG BEGIN_STMT
  # DEBUG freeze => 0
  # DEBUG BEGIN_STMT
  _2 = instance_9(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_19 ={v} x;
  if (x.0_19 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 14>; [50.00%]

  <bb 14> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 15> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _17 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _18 = (signed int) _17;
  # DEBUG pBase => NULL
  # DEBUG disabled => _18 < 0
  # DEBUG BEGIN_STMT
  if (_18 < 0)
    goto <bb 5>; [25.50%]
  else
    goto <bb 6>; [74.50%]

  <bb 5> [local count: 27380]:
  # DEBUG BEGIN_STMT
  result_13 = FlexCAN_Enable (pBase_11);
  # DEBUG result => result_13

  <bb 6> [local count: 107374]:
  # result_3 = PHI <0(4), result_13(5)>
  # DEBUG result => result_3
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsFreezeMode
  # DEBUG BEGIN_STMT
  _20 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _21 = _20 & 16777216;
  # DEBUG base => NULL
  # DEBUG freeze => _21 != 0
  # DEBUG BEGIN_STMT
  if (_21 == 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 53687]:
  if (result_3 == 0)
    goto <bb 10>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 8> [local count: 80531]:
  # DEBUG result => result_3
  # DEBUG BEGIN_STMT
  if (result_3 == 0)
    goto <bb 9>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 9> [local count: 40265]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_11
  # DEBUG Mask => mask_14(D)
  # DEBUG INLINE_ENTRY FlexCAN_SetRxMsgBuffGlobalMask
  # DEBUG BEGIN_STMT
  pBase_11->RXMGMASK ={v} mask_14(D);

  <bb 10> [local count: 107374]:
  # result_8 = PHI <result_3(8), 0(9), 1(7)>
  # DEBUG result => NULL
  # DEBUG base => NULL
  # DEBUG Mask => NULL
  # DEBUG BEGIN_STMT
  if (_18 < 0)
    goto <bb 11>; [25.50%]
  else
    goto <bb 13>; [74.50%]

  <bb 11> [local count: 27380]:
  # DEBUG BEGIN_STMT
  status_16 = FlexCAN_Disable (pBase_11);
  # DEBUG status => status_16
  # DEBUG BEGIN_STMT
  if (status_16 != 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 12> [local count: 13690]:
  # DEBUG BEGIN_STMT
  # DEBUG result => status_16

  <bb 13> [local count: 107374]:
  # result_4 = PHI <result_8(10), result_8(11), status_16(12)>
  # DEBUG result => result_4
  # DEBUG BEGIN_STMT
  return result_4;

}


FlexCAN_Ip_SendBlocking (uint8 instance, uint8 mb_idx, const struct Flexcan_Ip_DataInfoType * tx_info, uint32 msg_id, const uint8 * mb_data, uint32 timeout_ms)
{
  volatile boolean x;
  volatile boolean x;
  volatile uint32 * flexcan_mb;
  uint32 flexcan_mb_config;
  uint32 uS2Ticks;
  uint32 mS2Ticks;
  uint32 timeElapsed;
  uint32 timeStart;
  struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * base;
  Flexcan_Ip_StatusType result;
  int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  _Bool _5;
  _Bool _6;
  long unsigned int _7;
  unsigned char _8;
  int _9;
  <unnamed type> _10;
  long unsigned int _11;
  unsigned char _12;
  long unsigned int _13;
  long unsigned int _14;
  int _15;
  long unsigned int _45;
  long unsigned int _60;
  _Bool x.0_66;
  _Bool x.0_67;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (int) instance_28(D);
  base_30 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_30
  # DEBUG BEGIN_STMT
  state_31 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_31
  # DEBUG BEGIN_STMT
  _3 = OsIf_GetCounter (0);
  timeStart = _3;
  # DEBUG BEGIN_STMT
  # DEBUG timeElapsed => 0
  # DEBUG BEGIN_STMT
  _4 = timeout_ms_34(D) * 1000;
  mS2Ticks_36 = OsIf_MicrosToTicks (_4, 0);
  # DEBUG mS2Ticks => mS2Ticks_36
  # DEBUG BEGIN_STMT
  # DEBUG uS2Ticks => 0
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_config => 0
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb => 0B
  # DEBUG BEGIN_STMT
  _5 = instance_28(D) <= 5;
  x ={v} _5;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_67 ={v} x;
  if (x.0_67 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 22>; [50.00%]

  <bb 22> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 26> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _6 = tx_info_37(D) != 0B;
  x ={v} _6;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_66 ={v} x;
  if (x.0_66 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 21>; [50.00%]

  <bb 21> [local count: 53687]:

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 25> [local count: 536870913]:
  goto <bb 5>; [100.00%]

  <bb 6> [local count: 53687]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  result_42 = FlexCAN_StartSendData (instance_28(D), mb_idx_38(D), tx_info_37(D), msg_id_39(D), mb_data_40(D));
  # DEBUG result => result_42
  # DEBUG BEGIN_STMT
  if (result_42 == 0)
    goto <bb 20>; [50.00%]
  else
    goto <bb 19>; [50.00%]

  <bb 20> [local count: 26844]:
  goto <bb 8>; [100.00%]

  <bb 7> [local count: 237131]:
  # DEBUG BEGIN_STMT
  _45 = OsIf_GetElapsed (&timeStart, 0);
  timeElapsed_46 = timeElapsed_20 + _45;
  # DEBUG timeElapsed => timeElapsed_46
  # DEBUG BEGIN_STMT
  if (mS2Ticks_36 <= timeElapsed_46)
    goto <bb 9>; [5.50%]
  else
    goto <bb 24>; [94.50%]

  <bb 24> [local count: 224089]:

  <bb 8> [local count: 250932]:
  # timeElapsed_20 = PHI <0(20), timeElapsed_46(24)>
  # DEBUG timeElapsed => timeElapsed_20
  # DEBUG BEGIN_STMT
  _7 = (long unsigned int) mb_idx_38(D);
  _8 = FlexCAN_GetBuffStatusFlag (base_30, _7);
  if (_8 != 1)
    goto <bb 7>; [94.50%]
  else
    goto <bb 9>; [5.50%]

  <bb 9> [local count: 26843]:
  # result_16 = PHI <3(7), 0(8)>
  # _2 = PHI <_7(7), _7(8)>
  # DEBUG result => result_16
  # DEBUG BEGIN_STMT
  if (result_16 == 3)
    goto <bb 10>; [34.00%]
  else
    goto <bb 18>; [66.00%]

  <bb 10> [local count: 9127]:
  _9 = (int) mb_idx_38(D);
  _10 ={v} state_31->mbs[_9].state;
  if (_10 != 0)
    goto <bb 11>; [33.00%]
  else
    goto <bb 18>; [67.00%]

  <bb 11> [local count: 3012]:
  # DEBUG BEGIN_STMT
  FlexCAN_ClearMsgBuffIntStatusFlag (base_30, _2);
  # DEBUG BEGIN_STMT
  flexcan_mb_49 = FlexCAN_GetMsgBuffRegion (base_30, _2);
  # DEBUG flexcan_mb => flexcan_mb_49
  # DEBUG BEGIN_STMT
  flexcan_mb_config_50 ={v} *flexcan_mb_49;
  # DEBUG flexcan_mb_config => flexcan_mb_config_50
  # DEBUG BEGIN_STMT
  flexcan_mb_config_51 = flexcan_mb_config_50 & 4043309055;
  # DEBUG flexcan_mb_config => flexcan_mb_config_51
  # DEBUG BEGIN_STMT
  flexcan_mb_config_52 = flexcan_mb_config_51 | 150994944;
  # DEBUG flexcan_mb_config => flexcan_mb_config_52
  # DEBUG BEGIN_STMT
  *flexcan_mb_49 ={v} flexcan_mb_config_52;
  # DEBUG BEGIN_STMT
  uS2Ticks_55 = OsIf_MicrosToTicks (100, 0);
  # DEBUG uS2Ticks => uS2Ticks_55
  # DEBUG BEGIN_STMT
  _11 = OsIf_GetCounter (0);
  timeStart = _11;
  # DEBUG BEGIN_STMT
  # DEBUG timeElapsed => 0
  # DEBUG BEGIN_STMT
  goto <bb 13>; [100.00%]

  <bb 12> [local count: 26606]:
  # DEBUG BEGIN_STMT
  _60 = OsIf_GetElapsed (&timeStart, 0);
  timeElapsed_61 = timeElapsed_21 + _60;
  # DEBUG timeElapsed => timeElapsed_61
  # DEBUG BEGIN_STMT
  if (uS2Ticks_55 <= timeElapsed_61)
    goto <bb 14>; [5.50%]
  else
    goto <bb 23>; [94.50%]

  <bb 23> [local count: 25143]:

  <bb 13> [local count: 28155]:
  # timeElapsed_21 = PHI <0(11), timeElapsed_61(23)>
  # DEBUG timeElapsed => timeElapsed_21
  # DEBUG BEGIN_STMT
  _12 = FlexCAN_GetBuffStatusFlag (base_30, _2);
  if (_12 == 0)
    goto <bb 12>; [94.50%]
  else
    goto <bb 14>; [5.50%]

  <bb 14> [local count: 3012]:
  # DEBUG result => 3
  # DEBUG BEGIN_STMT
  flexcan_mb_config_62 ={v} *flexcan_mb_49;
  # DEBUG flexcan_mb_config => flexcan_mb_config_62
  # DEBUG BEGIN_STMT
  _13 = flexcan_mb_config_62 >> 24;
  _14 = _13 & 15;
  if (_14 == 8)
    goto <bb 15>; [34.00%]
  else
    goto <bb 16>; [66.00%]

  <bb 15> [local count: 1024]:
  # DEBUG BEGIN_STMT
  # DEBUG result => 0

  <bb 16> [local count: 3012]:
  # result_17 = PHI <3(14), 0(15)>
  # DEBUG result => result_17
  # DEBUG BEGIN_STMT
  if (_14 == 9)
    goto <bb 17>; [34.00%]
  else
    goto <bb 18>; [66.00%]

  <bb 17> [local count: 1024]:
  # DEBUG BEGIN_STMT
  # DEBUG result => 3

  <bb 18> [local count: 26843]:
  # result_18 = PHI <result_16(9), 3(10), result_17(16), 3(17)>
  # DEBUG result => result_18
  # DEBUG BEGIN_STMT
  FlexCAN_ClearMsgBuffIntStatusFlag (base_30, _2);
  # DEBUG BEGIN_STMT
  _15 = (int) mb_idx_38(D);
  state_31->mbs[_15].state ={v} 0;

  <bb 19> [local count: 53687]:
  # result_19 = PHI <result_42(6), result_18(18)>
  # DEBUG result => result_19
  # DEBUG BEGIN_STMT
  timeStart ={v} {CLOBBER};
  return result_19;

}


FlexCAN_Busoff_Error_IRQHandler (uint8 instance)
{
  volatile boolean x;
  boolean isSpuriousInt;
  uint32 u32ErrStatus;
  const struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * pBase;
  int _1;
  _Bool _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  void (*<T33b>) (uint8, Flexcan_Ip_EventType, uint32, const struct FlexCANState *) _6;
  long unsigned int _7;
  long unsigned int _8;
  signed int _9;
  void (*<T33b>) (uint8, Flexcan_Ip_EventType, uint32, const struct FlexCANState *) _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  void (*<T33b>) (uint8, Flexcan_Ip_EventType, uint32, const struct FlexCANState *) _14;
  long unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  void (*<T33b>) (uint8, Flexcan_Ip_EventType, uint32, const struct FlexCANState *) _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  void (*<T33b>) (uint8, Flexcan_Ip_EventType, uint32, const struct FlexCANState *) _22;
  _Bool x.0_57;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_36(D);
  pBase_38 = g_Flexcan_Ip_aBase[_1];
  # DEBUG pBase => pBase_38
  # DEBUG BEGIN_STMT
  state_39 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_39
  # DEBUG BEGIN_STMT
  # DEBUG u32ErrStatus => 0
  # DEBUG BEGIN_STMT
  # DEBUG isSpuriousInt => 1
  # DEBUG BEGIN_STMT
  _2 = instance_36(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_57 ={v} x;
  if (x.0_57 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 28>; [50.00%]

  <bb 28> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 29> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  if (state_39 != 0B)
    goto <bb 5>; [70.00%]
  else
    goto <bb 26>; [30.00%]

  <bb 5> [local count: 75162]:
  # DEBUG BEGIN_STMT
  u32ErrStatus_40 ={v} pBase_38->ESR1;
  # DEBUG u32ErrStatus => u32ErrStatus_40
  # DEBUG BEGIN_STMT
  _3 = u32ErrStatus_40 & 2;
  if (_3 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 6> [local count: 37581]:
  _4 ={v} pBase_38->CTRL1;
  _5 = _4 & 16384;
  if (_5 != 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 7> [local count: 18790]:
  # DEBUG BEGIN_STMT
  pBase_38->ESR1 ={v} 2;
  # DEBUG BEGIN_STMT
  _6 = state_39->error_callback;
  if (_6 != 0B)
    goto <bb 8>; [70.00%]
  else
    goto <bb 9>; [30.00%]

  <bb 8> [local count: 13153]:
  # DEBUG BEGIN_STMT
  _6 (instance_36(D), 9, u32ErrStatus_40, state_39);
  # DEBUG BEGIN_STMT
  u32ErrStatus_43 ={v} pBase_38->ESR1;
  # DEBUG u32ErrStatus => u32ErrStatus_43

  <bb 9> [local count: 75162]:
  # u32ErrStatus_23 = PHI <u32ErrStatus_40(5), u32ErrStatus_40(6), u32ErrStatus_43(8), u32ErrStatus_40(7)>
  # isSpuriousInt_27 = PHI <1(5), 1(6), 0(8), 0(7)>
  # DEBUG isSpuriousInt => isSpuriousInt_27
  # DEBUG u32ErrStatus => u32ErrStatus_23
  # DEBUG BEGIN_STMT
  _7 = u32ErrStatus_23 & 1048576;
  if (_7 != 0)
    goto <bb 10>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 10> [local count: 37581]:
  _8 ={v} pBase_38->CTRL2;
  _9 = (signed int) _8;
  if (_9 < 0)
    goto <bb 11>; [41.00%]
  else
    goto <bb 13>; [59.00%]

  <bb 11> [local count: 15408]:
  # DEBUG BEGIN_STMT
  pBase_38->ESR1 ={v} 1048576;
  # DEBUG BEGIN_STMT
  _10 = state_39->error_callback;
  if (_10 != 0B)
    goto <bb 12>; [70.00%]
  else
    goto <bb 13>; [30.00%]

  <bb 12> [local count: 10786]:
  # DEBUG BEGIN_STMT
  _10 (instance_36(D), 10, u32ErrStatus_23, state_39);
  # DEBUG BEGIN_STMT
  u32ErrStatus_46 ={v} pBase_38->ESR1;
  # DEBUG u32ErrStatus => u32ErrStatus_46

  <bb 13> [local count: 75162]:
  # u32ErrStatus_24 = PHI <u32ErrStatus_23(9), u32ErrStatus_23(10), u32ErrStatus_46(12), u32ErrStatus_23(11)>
  # isSpuriousInt_28 = PHI <isSpuriousInt_27(9), isSpuriousInt_27(10), 0(12), 0(11)>
  # DEBUG isSpuriousInt => isSpuriousInt_28
  # DEBUG u32ErrStatus => u32ErrStatus_24
  # DEBUG BEGIN_STMT
  _11 = u32ErrStatus_24 & 131072;
  if (_11 != 0)
    goto <bb 14>; [50.00%]
  else
    goto <bb 17>; [50.00%]

  <bb 14> [local count: 37581]:
  _12 ={v} pBase_38->CTRL1;
  _13 = _12 & 2048;
  if (_13 != 0)
    goto <bb 15>; [50.00%]
  else
    goto <bb 17>; [50.00%]

  <bb 15> [local count: 18790]:
  # DEBUG BEGIN_STMT
  pBase_38->ESR1 ={v} 131072;
  # DEBUG BEGIN_STMT
  _14 = state_39->error_callback;
  if (_14 != 0B)
    goto <bb 16>; [70.00%]
  else
    goto <bb 17>; [30.00%]

  <bb 16> [local count: 13153]:
  # DEBUG BEGIN_STMT
  _14 (instance_36(D), 13, u32ErrStatus_24, state_39);
  # DEBUG BEGIN_STMT
  u32ErrStatus_49 ={v} pBase_38->ESR1;
  # DEBUG u32ErrStatus => u32ErrStatus_49

  <bb 17> [local count: 75162]:
  # u32ErrStatus_25 = PHI <u32ErrStatus_24(13), u32ErrStatus_24(14), u32ErrStatus_49(16), u32ErrStatus_24(15)>
  # isSpuriousInt_29 = PHI <isSpuriousInt_28(13), isSpuriousInt_28(14), 0(16), 0(15)>
  # DEBUG isSpuriousInt => isSpuriousInt_29
  # DEBUG u32ErrStatus => u32ErrStatus_25
  # DEBUG BEGIN_STMT
  _15 = u32ErrStatus_25 & 65536;
  if (_15 != 0)
    goto <bb 18>; [50.00%]
  else
    goto <bb 21>; [50.00%]

  <bb 18> [local count: 37581]:
  _16 ={v} pBase_38->CTRL1;
  _17 = _16 & 1024;
  if (_17 != 0)
    goto <bb 19>; [50.00%]
  else
    goto <bb 21>; [50.00%]

  <bb 19> [local count: 18790]:
  # DEBUG BEGIN_STMT
  pBase_38->ESR1 ={v} 65536;
  # DEBUG BEGIN_STMT
  _18 = state_39->error_callback;
  if (_18 != 0B)
    goto <bb 20>; [70.00%]
  else
    goto <bb 21>; [30.00%]

  <bb 20> [local count: 13153]:
  # DEBUG BEGIN_STMT
  _18 (instance_36(D), 12, u32ErrStatus_25, state_39);
  # DEBUG BEGIN_STMT
  u32ErrStatus_53 ={v} pBase_38->ESR1;
  # DEBUG u32ErrStatus => u32ErrStatus_53

  <bb 21> [local count: 75162]:
  # u32ErrStatus_26 = PHI <u32ErrStatus_25(17), u32ErrStatus_25(18), u32ErrStatus_53(20), u32ErrStatus_25(19)>
  # isSpuriousInt_30 = PHI <isSpuriousInt_29(17), isSpuriousInt_29(18), 0(20), 0(19)>
  # DEBUG isSpuriousInt => isSpuriousInt_30
  # DEBUG u32ErrStatus => u32ErrStatus_26
  # DEBUG BEGIN_STMT
  _19 = u32ErrStatus_26 & 4;
  if (_19 != 0)
    goto <bb 22>; [50.00%]
  else
    goto <bb 25>; [50.00%]

  <bb 22> [local count: 37581]:
  _20 ={v} pBase_38->CTRL1;
  _21 = _20 & 32768;
  if (_21 != 0)
    goto <bb 23>; [50.00%]
  else
    goto <bb 25>; [50.00%]

  <bb 23> [local count: 18790]:
  # DEBUG BEGIN_STMT
  pBase_38->ESR1 ={v} 4;
  # DEBUG BEGIN_STMT
  _22 = state_39->error_callback;
  if (_22 != 0B)
    goto <bb 24>; [70.00%]
  else
    goto <bb 27>; [30.00%]

  <bb 24> [local count: 13153]:
  # DEBUG BEGIN_STMT
  _22 (instance_36(D), 11, u32ErrStatus_26, state_39);
  goto <bb 27>; [100.00%]

  <bb 25> [local count: 56371]:
  # DEBUG isSpuriousInt => isSpuriousInt_30
  # DEBUG BEGIN_STMT
  if (isSpuriousInt_30 != 0)
    goto <bb 26>; [50.00%]
  else
    goto <bb 27>; [50.00%]

  <bb 26> [local count: 60398]:
  # DEBUG isSpuriousInt => NULL
  # DEBUG BEGIN_STMT
  pBase_38->ESR1 ={v} 3866630;

  <bb 27> [local count: 107374]:
  # DEBUG isSpuriousInt => NULL
  return;

}


FlexCAN_Ip_GetControllerRxErrorCounter (uint8 instance)
{
  volatile boolean x;
  const struct FLEXCAN_Type * base;
  int _1;
  _Bool _2;
  long unsigned int _3;
  long unsigned int _4;
  uint8 _8;
  _Bool x.0_9;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_5(D);
  base_7 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_7
  # DEBUG BEGIN_STMT
  _2 = instance_5(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_9 ={v} x;
  if (x.0_9 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 5> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 6> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 ={v} base_7->ECR;
  _4 = _3 >> 8;
  _8 = (uint8) _4;
  return _8;

}


FlexCAN_Ip_GetControllerTxErrorCounter (uint8 instance)
{
  volatile boolean x;
  const struct FLEXCAN_Type * base;
  int _1;
  _Bool _2;
  long unsigned int _3;
  uint8 _7;
  _Bool x.0_8;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_4(D);
  base_6 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_6
  # DEBUG BEGIN_STMT
  _2 = instance_4(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_8 ={v} x;
  if (x.0_8 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 5> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 6> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 ={v} base_6->ECR;
  _7 = (uint8) _3;
  return _7;

}


FlexCAN_Ip_GetErrorStatus (uint8 instance)
{
  volatile boolean x;
  const struct FLEXCAN_Type * base;
  int _1;
  _Bool _2;
  uint32 _6;
  _Bool x.0_7;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_3(D);
  base_5 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_5
  # DEBUG BEGIN_STMT
  _2 = instance_3(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_7 ={v} x;
  if (x.0_7 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 5> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 6> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _6 ={v} base_5->ESR1;
  return _6;

}


FlexCAN_Ip_ClearErrorStatus (uint8 instance, uint32 error)
{
  volatile boolean x;
  struct FLEXCAN_Type * base;
  int _1;
  _Bool _2;
  _Bool x.0_8;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_3(D);
  base_5 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_5
  # DEBUG BEGIN_STMT
  _2 = instance_3(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_8 ={v} x;
  if (x.0_8 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 5> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 6> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  base_5->ESR1 ={v} error_6(D);
  return;

}


FlexCAN_IRQHandler (uint8 instance, uint32 startMbIdx, uint32 endMbIdx, boolean bEnhancedFifoExisted)
{
  volatile boolean x;
  volatile boolean x;
  uint32 mb_idx;
  boolean bIsSpuriousInt;
  const struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * base;
  uint32 flag_reg;
  uint32 u32MbHandle;
  int _1;
  _Bool _3;
  _Bool _4;
  unsigned char _5;
  unsigned char _6;
  _Bool _7;
  <unnamed type> _8;
  <unnamed type> _9;
  unsigned char _10;
  <unnamed type> _11;
  <unnamed type> _12;
  _Bool x.0_49;
  _Bool x.0_50;
  long unsigned int _51;
  signed int _52;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG u32MbHandle => 0
  # DEBUG BEGIN_STMT
  # DEBUG flag_reg => 0
  # DEBUG BEGIN_STMT
  _1 = (int) instance_26(D);
  base_28 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_28
  # DEBUG BEGIN_STMT
  state_29 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_29
  # DEBUG BEGIN_STMT
  # DEBUG bIsSpuriousInt => 1
  # DEBUG BEGIN_STMT
  # DEBUG mb_idx => endMbIdx_30(D)
  # DEBUG BEGIN_STMT
  _3 = instance_26(D) <= 5;
  x ={v} _3;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_50 ={v} x;
  if (x.0_50 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 35>; [50.00%]

  <bb 35> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 37> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _4 = endMbIdx_30(D) <= 95;
  x ={v} _4;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_49 ={v} x;
  if (x.0_49 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 34>; [50.00%]

  <bb 34> [local count: 53687]:

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 36> [local count: 536870913]:
  goto <bb 5>; [100.00%]

  <bb 6> [local count: 53687]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  if (state_29 != 0B)
    goto <bb 7>; [53.47%]
  else
    goto <bb 33>; [46.53%]

  <bb 33> [local count: 24981]:
  goto <bb 29>; [100.00%]

  <bb 7> [local count: 28706]:
  # DEBUG BEGIN_STMT
  _5 = FlexCAN_GetMsgBuffIntStatusFlag (base_28, endMbIdx_30(D));
  flag_reg_36 = (uint32) _5;
  # DEBUG flag_reg => flag_reg_36
  # DEBUG BEGIN_STMT
  goto <bb 9>; [100.00%]

  <bb 8> [local count: 239641]:
  # DEBUG BEGIN_STMT
  mb_idx_37 = mb_idx_17 + 4294967295;
  # DEBUG mb_idx => mb_idx_37
  # DEBUG BEGIN_STMT
  _6 = FlexCAN_GetMsgBuffIntStatusFlag (base_28, mb_idx_37);
  flag_reg_39 = (uint32) _6;
  # DEBUG flag_reg => flag_reg_39

  <bb 9> [local count: 268347]:
  # flag_reg_14 = PHI <flag_reg_36(7), flag_reg_39(8)>
  # mb_idx_17 = PHI <endMbIdx_30(D)(7), mb_idx_37(8)>
  # DEBUG mb_idx => mb_idx_17
  # DEBUG flag_reg => flag_reg_14
  # DEBUG BEGIN_STMT
  if (flag_reg_14 == 0)
    goto <bb 10>; [94.50%]
  else
    goto <bb 11>; [5.50%]

  <bb 10> [local count: 253588]:
  if (mb_idx_17 > startMbIdx_31(D))
    goto <bb 8>; [94.50%]
  else
    goto <bb 11>; [5.50%]

  <bb 11> [local count: 28706]:
  # flag_reg_2 = PHI <flag_reg_14(9), 0(10)>
  # mb_idx_40 = PHI <mb_idx_17(9), mb_idx_17(10)>
  # DEBUG BEGIN_STMT
  if (flag_reg_2 != 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 22>; [50.00%]

  <bb 12> [local count: 14353]:
  # DEBUG BEGIN_STMT
  # DEBUG bIsSpuriousInt => 0
  # DEBUG BEGIN_STMT
  # DEBUG u32MbHandle => mb_idx_40
  # DEBUG BEGIN_STMT
  _7 = state_29->bIsLegacyFifoEn;
  if (_7 != 0)
    goto <bb 13>; [50.00%]
  else
    goto <bb 15>; [50.00%]

  <bb 13> [local count: 7177]:
  if (mb_idx_40 <= 7)
    goto <bb 14>; [33.00%]
  else
    goto <bb 15>; [67.00%]

  <bb 14> [local count: 2368]:
  # DEBUG BEGIN_STMT
  FlexCAN_IRQHandlerRxFIFO (instance_26(D), mb_idx_40);
  # DEBUG BEGIN_STMT
  # DEBUG u32MbHandle => 0
  goto <bb 17>; [100.00%]

  <bb 15> [local count: 11985]:
  # DEBUG BEGIN_STMT
  _8 ={v} state_29->mbs[mb_idx_40].state;
  if (_8 == 1)
    goto <bb 16>; [20.24%]
  else
    goto <bb 17>; [79.76%]

  <bb 16> [local count: 2426]:
  # DEBUG BEGIN_STMT
  FlexCAN_IRQHandlerRxMB (instance_26(D), mb_idx_40);

  <bb 17> [local count: 14353]:
  # u32MbHandle_13 = PHI <0(14), mb_idx_40(15), mb_idx_40(16)>
  # DEBUG u32MbHandle => u32MbHandle_13
  # DEBUG BEGIN_STMT
  _9 ={v} state_29->mbs[u32MbHandle_13].state;
  if (_9 == 2)
    goto <bb 18>; [20.24%]
  else
    goto <bb 19>; [79.76%]

  <bb 18> [local count: 2905]:
  # DEBUG BEGIN_STMT
  FlexCAN_IRQHandlerTxMB (instance_26(D), mb_idx_40);

  <bb 19> [local count: 14353]:
  # DEBUG BEGIN_STMT
  _10 = FlexCAN_GetMsgBuffIntStatusFlag (base_28, mb_idx_40);
  if (_10 != 0)
    goto <bb 20>; [50.00%]
  else
    goto <bb 22>; [50.00%]

  <bb 20> [local count: 7177]:
  # DEBUG BEGIN_STMT
  _11 ={v} state_29->mbs[u32MbHandle_13].state;
  if (_11 == 0)
    goto <bb 21>; [33.00%]
  else
    goto <bb 22>; [67.00%]

  <bb 21> [local count: 2368]:
  # DEBUG BEGIN_STMT
  FlexCAN_ClearMsgBuffIntStatusFlag (base_28, mb_idx_40);

  <bb 22> [local count: 28706]:
  # bIsSpuriousInt_15 = PHI <1(11), 0(19), 0(20), 0(21)>
  # DEBUG bIsSpuriousInt => bIsSpuriousInt_15
  # DEBUG BEGIN_STMT
  if (bEnhancedFifoExisted_32(D) != 0)
    goto <bb 23>; [50.00%]
  else
    goto <bb 26>; [50.00%]

  <bb 23> [local count: 14353]:
  # DEBUG BEGIN_STMT
  # DEBUG base => base_28
  # DEBUG INLINE_ENTRY FlexCAN_IsEnhancedRxFifoEnabled
  # DEBUG BEGIN_STMT
  _51 ={v} MEM[(const struct FLEXCAN_Type *)base_28].ERFCR;
  _52 = (signed int) _51;
  # DEBUG base => NULL
  if (_52 < 0)
    goto <bb 24>; [41.00%]
  else
    goto <bb 26>; [59.00%]

  <bb 24> [local count: 5885]:
  _12 = state_29->transferType;
  if (_12 == 0)
    goto <bb 25>; [33.00%]
  else
    goto <bb 26>; [67.00%]

  <bb 25> [local count: 1942]:
  # DEBUG BEGIN_STMT
  bIsSpuriousInt_47 = FlexCAN_ProcessIRQHandlerEnhancedRxFIFO (instance_26(D), bIsSpuriousInt_15);
  # DEBUG bIsSpuriousInt => bIsSpuriousInt_47

  <bb 26> [local count: 28706]:
  # bIsSpuriousInt_16 = PHI <bIsSpuriousInt_15(22), bIsSpuriousInt_15(23), bIsSpuriousInt_15(24), bIsSpuriousInt_47(25)>
  # DEBUG bIsSpuriousInt => bIsSpuriousInt_16
  # DEBUG BEGIN_STMT
  if (bIsSpuriousInt_16 != 0)
    goto <bb 27>; [33.00%]
  else
    goto <bb 32>; [67.00%]

  <bb 27> [local count: 9473]:
  # DEBUG BEGIN_STMT
  FlexCAN_ProcessSpuriousInterruptMB (instance_26(D), startMbIdx_31(D), endMbIdx_30(D));
  goto <bb 32>; [100.00%]

  <bb 28> [local count: 202115]:
  # DEBUG BEGIN_STMT
  FlexCAN_ClearMsgBuffIntStatusFlag (base_28, mb_idx_18);
  # DEBUG BEGIN_STMT
  mb_idx_34 = mb_idx_18 + 1;
  # DEBUG mb_idx => mb_idx_34

  <bb 29> [local count: 227096]:
  # mb_idx_18 = PHI <mb_idx_34(28), startMbIdx_31(D)(33)>
  # DEBUG mb_idx => mb_idx_18
  # DEBUG BEGIN_STMT
  if (mb_idx_18 <= endMbIdx_30(D))
    goto <bb 28>; [89.00%]
  else
    goto <bb 30>; [11.00%]

  <bb 30> [local count: 24981]:
  # DEBUG BEGIN_STMT
  if (bEnhancedFifoExisted_32(D) != 0)
    goto <bb 31>; [50.00%]
  else
    goto <bb 32>; [50.00%]

  <bb 31> [local count: 12490]:
  # DEBUG BEGIN_STMT
  # DEBUG base => base_28
  # DEBUG intFlag => 28
  # DEBUG INLINE_ENTRY FlexCAN_ClearEnhancedRxFifoIntStatusFlag
  # DEBUG BEGIN_STMT
  base_28->ERFSR ={v} 268435456;
  # DEBUG base => NULL
  # DEBUG intFlag => NULL
  # DEBUG BEGIN_STMT
  # DEBUG base => base_28
  # DEBUG intFlag => 29
  # DEBUG INLINE_ENTRY FlexCAN_ClearEnhancedRxFifoIntStatusFlag
  # DEBUG BEGIN_STMT
  base_28->ERFSR ={v} 536870912;
  # DEBUG base => NULL
  # DEBUG intFlag => NULL
  # DEBUG BEGIN_STMT
  # DEBUG base => base_28
  # DEBUG intFlag => 30
  # DEBUG INLINE_ENTRY FlexCAN_ClearEnhancedRxFifoIntStatusFlag
  # DEBUG BEGIN_STMT
  base_28->ERFSR ={v} 1073741824;
  # DEBUG base => NULL
  # DEBUG intFlag => NULL
  # DEBUG BEGIN_STMT
  # DEBUG base => base_28
  # DEBUG intFlag => 31
  # DEBUG INLINE_ENTRY FlexCAN_ClearEnhancedRxFifoIntStatusFlag
  # DEBUG BEGIN_STMT
  base_28->ERFSR ={v} 2147483648;

  <bb 32> [local count: 53687]:
  # DEBUG base => NULL
  # DEBUG intFlag => NULL
  return;

}


FlexCAN_CompleteRxMessageFifoData (uint8 instance)
{
  volatile boolean x;
  struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * base;
  int _1;
  _Bool _2;
  <unnamed type> _3;
  _Bool _4;
  _Bool _5;
  _Bool _6;
  _Bool x.0_17;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_8(D);
  base_10 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_10
  # DEBUG BEGIN_STMT
  state_11 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_11
  # DEBUG BEGIN_STMT
  _2 = instance_8(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_17 ={v} x;
  if (x.0_17 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 7> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 8> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 = state_11->transferType;
  if (_3 == 0)
    goto <bb 5>; [33.00%]
  else
    goto <bb 6>; [67.00%]

  <bb 5> [local count: 35433]:
  # DEBUG BEGIN_STMT
  _4 = state_11->isIntActive;
  FlexCAN_SetMsgBuffIntCmd (base_10, instance_8(D), 5, 0, _4);
  # DEBUG BEGIN_STMT
  _5 = state_11->isIntActive;
  FlexCAN_SetMsgBuffIntCmd (base_10, instance_8(D), 6, 0, _5);
  # DEBUG BEGIN_STMT
  _6 = state_11->isIntActive;
  FlexCAN_SetMsgBuffIntCmd (base_10, instance_8(D), 7, 0, _6);

  <bb 6> [local count: 107374]:
  # DEBUG BEGIN_STMT
  state_11->mbs[0].pMBmessage = 0B;
  # DEBUG BEGIN_STMT
  state_11->mbs[0].state ={v} 0;
  return;

}


FlexCAN_Ip_GetTransferStatus (uint8 instance, uint8 mb_idx)
{
  volatile boolean x;
  volatile boolean x;
  Flexcan_Ip_StatusType status;
  const struct Flexcan_Ip_StateType * state;
  int _1;
  _Bool _2;
  unsigned char _3;
  _Bool _4;
  int _5;
  <unnamed type> _6;
  <unnamed type> _7;
  _Bool x.0_13;
  _Bool x.0_14;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_9(D);
  state_11 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_11
  # DEBUG BEGIN_STMT
  # DEBUG status => 1
  # DEBUG BEGIN_STMT
  _2 = instance_9(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_14 ={v} x;
  if (x.0_14 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 13> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 15> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 = mb_idx_12(D) + 160;
  _4 = _3 > 158;
  x ={v} _4;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_13 ={v} x;
  if (x.0_13 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 12>; [50.00%]

  <bb 12> [local count: 53687]:

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 14> [local count: 536870913]:
  goto <bb 5>; [100.00%]

  <bb 6> [local count: 53687]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  if (mb_idx_12(D) <= 95)
    goto <bb 7>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 7> [local count: 26844]:
  # DEBUG BEGIN_STMT
  _5 = (int) mb_idx_12(D);
  _6 ={v} state_11->mbs[_5].state;
  if (_6 == 0)
    goto <bb 11>; [65.00%]
  else
    goto <bb 8>; [35.00%]

  <bb 8> [local count: 9395]:
  # DEBUG BEGIN_STMT
  # DEBUG status => 2
  goto <bb 11>; [100.00%]

  <bb 9> [local count: 26844]:
  # DEBUG BEGIN_STMT
  _7 ={v} state_11->enhancedFifoOutput.state;
  if (_7 == 0)
    goto <bb 11>; [65.00%]
  else
    goto <bb 10>; [35.00%]

  <bb 10> [local count: 9395]:
  # DEBUG BEGIN_STMT
  # DEBUG status => 2

  <bb 11> [local count: 53687]:
  # status_8 = PHI <2(8), 0(9), 2(10), 0(7)>
  # DEBUG status => status_8
  # DEBUG BEGIN_STMT
  return status_8;

}


FlexCAN_Ip_ConfigRemoteResponseMb (uint8 instance, uint8 mb_idx, const struct Flexcan_Ip_DataInfoType * tx_info, uint32 msg_id, const uint8 * mb_data)
{
  volatile boolean x;
  volatile boolean x;
  const struct Flexcan_Ip_StateType * const state;
  struct FLEXCAN_Type * pBase;
  struct Flexcan_Ip_MsbuffCodeStatusType cs;
  Flexcan_Ip_StatusType result;
  int _1;
  _Bool _2;
  _Bool _3;
  _Bool _4;
  long unsigned int _5;
  _Bool _6;
  long unsigned int _7;
  <unnamed type> _8;
  long unsigned int _9;
  _Bool _10;
  _Bool _11;
  _Bool _12;
  _Bool x.0_33;
  _Bool x.0_34;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (int) instance_15(D);
  pBase_17 = g_Flexcan_Ip_aBase[_1];
  # DEBUG pBase => pBase_17
  # DEBUG BEGIN_STMT
  state_18 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_18
  # DEBUG BEGIN_STMT
  _2 = instance_15(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_34 ={v} x;
  if (x.0_34 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 11>; [50.00%]

  <bb 11> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 13> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 = tx_info_19(D) != 0B;
  x ={v} _3;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_33 ={v} x;
  if (x.0_33 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 10> [local count: 53687]:

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 12> [local count: 536870913]:
  goto <bb 5>; [100.00%]

  <bb 6> [local count: 53687]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _4 = state_18->bIsLegacyFifoEn;
  _5 = state_18->u32MaxMbNum;
  _6 = FlexCAN_IsMbOutOfRange (pBase_17, mb_idx_20(D), _4, _5);
  if (_6 != 0)
    goto <bb 9>; [52.23%]
  else
    goto <bb 7>; [47.77%]

  <bb 7> [local count: 25646]:
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _7 = tx_info_19(D)->data_length;
  cs.dataLen = _7;
  # DEBUG BEGIN_STMT
  _8 = tx_info_19(D)->msg_id_type;
  cs.msgIdType = _8;
  # DEBUG BEGIN_STMT
  cs.code = 10;
  # DEBUG BEGIN_STMT
  cs.fd_enable = 0;
  # DEBUG BEGIN_STMT
  _9 = (long unsigned int) mb_idx_20(D);
  FlexCAN_ClearMsgBuffIntStatusFlag (pBase_17, _9);
  # DEBUG BEGIN_STMT
  _10 = tx_info_19(D)->is_remote;
  FlexCAN_SetTxMsgBuff (pBase_17, _9, &cs, msg_id_27(D), mb_data_28(D), _10);
  # DEBUG BEGIN_STMT
  _11 = tx_info_19(D)->is_polling;
  if (_11 != 0)
    goto <bb 9>; [67.00%]
  else
    goto <bb 8>; [33.00%]

  <bb 8> [local count: 8463]:
  # DEBUG BEGIN_STMT
  _12 = state_18->isIntActive;
  result_31 = FlexCAN_SetMsgBuffIntCmd (pBase_17, instance_15(D), _9, 1, _12);
  # DEBUG result => result_31

  <bb 9> [local count: 53687]:
  # result_13 = PHI <4(6), 0(7), result_31(8)>
  # DEBUG result => result_13
  # DEBUG BEGIN_STMT
  cs ={v} {CLOBBER};
  return result_13;

}


FlexCAN_Ip_ConfigEnhancedRxFifo_Privileged (uint8 instance, const struct Flexcan_Ip_EnhancedIdTableType * id_filter_table)
{
  volatile boolean x;
  volatile boolean x;
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  Flexcan_Ip_StatusType status;
  Flexcan_Ip_StatusType result;
  int _1;
  _Bool _2;
  _Bool _3;
  _Bool _4;
  _Bool x.0_21;
  _Bool x.0_22;
  _Bool x.0_23;
  long unsigned int _24;
  signed int _25;
  long unsigned int _26;
  long unsigned int _27;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  # DEBUG status => 0
  # DEBUG BEGIN_STMT
  _1 = (int) instance_11(D);
  pBase_13 = g_Flexcan_Ip_aBase[_1];
  # DEBUG pBase => pBase_13
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_13
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _24 ={v} MEM[(const struct FLEXCAN_Type *)pBase_13].MCR;
  _25 = (signed int) _24;
  # DEBUG pBase => NULL
  # DEBUG disabled => _25 < 0
  # DEBUG BEGIN_STMT
  _2 = instance_11(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_23 ={v} x;
  if (x.0_23 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 20>; [50.00%]

  <bb 20> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 23> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 = FlexCAN_IsEnhancedRxFifoAvailable (pBase_13);
  x ={v} _3;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_22 ={v} x;
  if (x.0_22 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 19>; [50.00%]

  <bb 19> [local count: 53687]:

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 22> [local count: 536870913]:
  goto <bb 5>; [100.00%]

  <bb 6> [local count: 53687]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _4 = id_filter_table_15(D) != 0B;
  x ={v} _4;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_21 ={v} x;
  if (x.0_21 != 0)
    goto <bb 8>; [50.00%]
  else
    goto <bb 18>; [50.00%]

  <bb 18> [local count: 26844]:

  <bb 7> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 21> [local count: 268435456]:
  goto <bb 7>; [100.00%]

  <bb 8> [local count: 26844]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  if (_25 < 0)
    goto <bb 9>; [25.50%]
  else
    goto <bb 10>; [74.50%]

  <bb 9> [local count: 6845]:
  # DEBUG BEGIN_STMT
  result_17 = FlexCAN_Enable (pBase_13);
  # DEBUG result => result_17

  <bb 10> [local count: 26844]:
  # result_5 = PHI <0(8), result_17(9)>
  # DEBUG result => result_5
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_13
  # DEBUG INLINE_ENTRY FlexCAN_IsFreezeMode
  # DEBUG BEGIN_STMT
  _26 ={v} MEM[(const struct FLEXCAN_Type *)pBase_13].MCR;
  _27 = _26 & 16777216;
  # DEBUG base => NULL
  # DEBUG freeze => _27 != 0
  # DEBUG BEGIN_STMT
  if (_27 == 0)
    goto <bb 11>; [50.00%]
  else
    goto <bb 12>; [50.00%]

  <bb 11> [local count: 13422]:
  if (result_5 == 0)
    goto <bb 14>; [50.00%]
  else
    goto <bb 12>; [50.00%]

  <bb 12> [local count: 20133]:
  # DEBUG result => result_5
  # DEBUG BEGIN_STMT
  if (result_5 == 0)
    goto <bb 13>; [33.00%]
  else
    goto <bb 14>; [67.00%]

  <bb 13> [local count: 6644]:
  # DEBUG BEGIN_STMT
  FlexCAN_SetEnhancedRxFifoFilter (pBase_13, id_filter_table_15(D));

  <bb 14> [local count: 26843]:
  # result_10 = PHI <result_5(12), 0(13), 1(11)>
  # DEBUG result => NULL
  # DEBUG BEGIN_STMT
  if (_25 < 0)
    goto <bb 15>; [25.50%]
  else
    goto <bb 17>; [74.50%]

  <bb 15> [local count: 6845]:
  # DEBUG BEGIN_STMT
  status_20 = FlexCAN_Disable (pBase_13);
  # DEBUG status => status_20
  # DEBUG BEGIN_STMT
  if (status_20 != 0)
    goto <bb 16>; [50.00%]
  else
    goto <bb 17>; [50.00%]

  <bb 16> [local count: 3423]:
  # DEBUG BEGIN_STMT
  # DEBUG result => status_20

  <bb 17> [local count: 26843]:
  # result_6 = PHI <result_10(14), result_10(15), status_20(16)>
  # DEBUG result => result_6
  # DEBUG BEGIN_STMT
  return result_6;

}


FlexCAN_Ip_ConfigRxFifo_Privileged (uint8 instance, Flexcan_Ip_RxFifoIdElementFormatType id_format, const struct Flexcan_Ip_IdTableType * id_filter_table)
{
  volatile boolean x;
  struct FLEXCAN_Type * pBase;
  Flexcan_Ip_StatusType status;
  Flexcan_Ip_StatusType result;
  _Bool _1;
  int _2;
  long unsigned int _19;
  signed int _20;
  _Bool x.0_21;
  long unsigned int _22;
  long unsigned int _23;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = instance_8(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_21 ={v} x;
  if (x.0_21 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 14>; [50.00%]

  <bb 14> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 15> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  # DEBUG status => 0
  # DEBUG BEGIN_STMT
  _2 = (int) instance_8(D);
  pBase_11 = g_Flexcan_Ip_aBase[_2];
  # DEBUG pBase => pBase_11
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _19 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _20 = (signed int) _19;
  # DEBUG pBase => NULL
  # DEBUG disabled => _20 < 0
  # DEBUG BEGIN_STMT
  if (_20 < 0)
    goto <bb 5>; [25.50%]
  else
    goto <bb 6>; [74.50%]

  <bb 5> [local count: 27380]:
  # DEBUG BEGIN_STMT
  result_13 = FlexCAN_Enable (pBase_11);
  # DEBUG result => result_13

  <bb 6> [local count: 107374]:
  # result_3 = PHI <0(4), result_13(5)>
  # DEBUG result => result_3
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_11
  # DEBUG INLINE_ENTRY FlexCAN_IsFreezeMode
  # DEBUG BEGIN_STMT
  _22 ={v} MEM[(const struct FLEXCAN_Type *)pBase_11].MCR;
  _23 = _22 & 16777216;
  # DEBUG base => NULL
  # DEBUG freeze => _23 != 0
  # DEBUG BEGIN_STMT
  if (_23 == 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 53687]:
  if (result_3 == 0)
    goto <bb 10>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 8> [local count: 80531]:
  # DEBUG result => result_3
  # DEBUG BEGIN_STMT
  if (result_3 == 0)
    goto <bb 9>; [33.00%]
  else
    goto <bb 10>; [67.00%]

  <bb 9> [local count: 26575]:
  # DEBUG BEGIN_STMT
  FlexCAN_SetRxFifoFilter (pBase_11, id_format_14(D), id_filter_table_15(D));

  <bb 10> [local count: 107374]:
  # result_10 = PHI <result_3(8), 0(9), 1(7)>
  # DEBUG result => NULL
  # DEBUG BEGIN_STMT
  if (_20 < 0)
    goto <bb 11>; [25.50%]
  else
    goto <bb 13>; [74.50%]

  <bb 11> [local count: 27380]:
  # DEBUG BEGIN_STMT
  status_18 = FlexCAN_Disable (pBase_11);
  # DEBUG status => status_18
  # DEBUG BEGIN_STMT
  if (status_18 != 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 12> [local count: 13690]:
  # DEBUG BEGIN_STMT
  # DEBUG result => status_18

  <bb 13> [local count: 107374]:
  # result_4 = PHI <result_10(10), result_10(11), status_18(12)>
  # DEBUG result => result_4
  # DEBUG BEGIN_STMT
  return result_4;

}


FlexCAN_Ip_RxFifoBlocking (uint8 instance, struct Flexcan_Ip_MsgBuffType * data, uint32 timeout)
{
  volatile boolean x;
  const struct FLEXCAN_Type * base;
  Flexcan_Ip_StatusType result;
  int _1;
  _Bool _2;
  _Bool _3;
  _Bool x.0_24;
  long unsigned int _25;
  signed int _26;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  _1 = (int) instance_6(D);
  base_8 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_8
  # DEBUG BEGIN_STMT
  _2 = instance_6(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_24 ={v} x;
  if (x.0_24 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 13> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 14> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 = FlexCAN_IsEnhancedRxFifoAvailable (base_8);
  if (_3 != 0)
    goto <bb 5>; [67.00%]
  else
    goto <bb 10>; [33.00%]

  <bb 5> [local count: 71941]:
  # DEBUG BEGIN_STMT
  # DEBUG base => base_8
  # DEBUG INLINE_ENTRY FlexCAN_IsEnhancedRxFifoEnabled
  # DEBUG BEGIN_STMT
  _25 ={v} base_8->ERFCR;
  _26 = (signed int) _25;
  # DEBUG base => NULL
  if (_26 < 0)
    goto <bb 6>; [41.00%]
  else
    goto <bb 8>; [59.00%]

  <bb 6> [local count: 29496]:
  # DEBUG BEGIN_STMT
  result_21 = FlexCAN_StartRxMessageEnhancedFifoData (instance_6(D), data_10(D));
  # DEBUG result => result_21
  # DEBUG BEGIN_STMT
  if (result_21 == 0)
    goto <bb 7>; [33.00%]
  else
    goto <bb 12>; [67.00%]

  <bb 7> [local count: 9734]:
  # DEBUG BEGIN_STMT
  result_23 = FlexCAN_ProccessEnhancedRxFifo (instance_6(D), timeout_13(D));
  # DEBUG result => result_23
  goto <bb 12>; [100.00%]

  <bb 8> [local count: 42445]:
  # DEBUG BEGIN_STMT
  result_17 = FlexCAN_StartRxMessageFifoData (instance_6(D), data_10(D));
  # DEBUG result => result_17
  # DEBUG BEGIN_STMT
  if (result_17 == 0)
    goto <bb 9>; [33.00%]
  else
    goto <bb 12>; [67.00%]

  <bb 9> [local count: 14007]:
  # DEBUG BEGIN_STMT
  result_19 = FlexCAN_ProccessLegacyRxFIFO (instance_6(D), timeout_13(D));
  # DEBUG result => result_19
  goto <bb 12>; [100.00%]

  <bb 10> [local count: 35433]:
  # DEBUG BEGIN_STMT
  result_12 = FlexCAN_StartRxMessageFifoData (instance_6(D), data_10(D));
  # DEBUG result => result_12
  # DEBUG BEGIN_STMT
  if (result_12 == 0)
    goto <bb 11>; [33.00%]
  else
    goto <bb 12>; [67.00%]

  <bb 11> [local count: 11693]:
  # DEBUG BEGIN_STMT
  result_15 = FlexCAN_ProccessLegacyRxFIFO (instance_6(D), timeout_13(D));
  # DEBUG result => result_15

  <bb 12> [local count: 107374]:
  # result_4 = PHI <result_17(8), result_12(10), result_15(11), result_23(7), result_21(6), result_19(9)>
  # DEBUG result => result_4
  # DEBUG BEGIN_STMT
  return result_4;

}


FlexCAN_Ip_RxFifo (uint8 instance, struct Flexcan_Ip_MsgBuffType * data)
{
  volatile boolean x;
  const struct FLEXCAN_Type * base;
  Flexcan_Ip_StatusType result;
  _Bool _1;
  int _2;
  _Bool _3;
  _Bool x.0_17;
  long unsigned int _18;
  signed int _19;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  _1 = instance_6(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_17 ={v} x;
  if (x.0_17 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 10> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 11> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _2 = (int) instance_6(D);
  base_8 = g_Flexcan_Ip_aBase[_2];
  # DEBUG base => base_8
  # DEBUG BEGIN_STMT
  _3 = FlexCAN_IsEnhancedRxFifoAvailable (base_8);
  if (_3 != 0)
    goto <bb 5>; [67.00%]
  else
    goto <bb 8>; [33.00%]

  <bb 5> [local count: 71941]:
  # DEBUG BEGIN_STMT
  # DEBUG base => base_8
  # DEBUG INLINE_ENTRY FlexCAN_IsEnhancedRxFifoEnabled
  # DEBUG BEGIN_STMT
  _18 ={v} base_8->ERFCR;
  _19 = (signed int) _18;
  # DEBUG base => NULL
  if (_19 < 0)
    goto <bb 6>; [41.00%]
  else
    goto <bb 7>; [59.00%]

  <bb 6> [local count: 29496]:
  # DEBUG BEGIN_STMT
  result_16 = FlexCAN_StartRxMessageEnhancedFifoData (instance_6(D), data_10(D));
  # DEBUG result => result_16
  goto <bb 9>; [100.00%]

  <bb 7> [local count: 42445]:
  # DEBUG BEGIN_STMT
  result_14 = FlexCAN_StartRxMessageFifoData (instance_6(D), data_10(D));
  # DEBUG result => result_14
  goto <bb 9>; [100.00%]

  <bb 8> [local count: 35433]:
  # DEBUG BEGIN_STMT
  result_12 = FlexCAN_StartRxMessageFifoData (instance_6(D), data_10(D));
  # DEBUG result => result_12

  <bb 9> [local count: 107374]:
  # result_4 = PHI <result_14(7), result_12(8), result_16(6)>
  # DEBUG result => result_4
  # DEBUG BEGIN_STMT
  return result_4;

}


FlexCAN_Ip_ReceiveBlocking (uint8 instance, uint8 mb_idx, struct Flexcan_Ip_MsgBuffType * data, boolean isPolling, uint32 u32TimeoutMs)
{
  volatile boolean x;
  struct FLEXCAN_Type * base;
  struct Flexcan_Ip_StateType * state;
  uint32 mS2Ticks;
  uint32 timeElapsed;
  uint32 timeStart;
  Flexcan_Ip_StatusType result;
  long unsigned int _1;
  _Bool _2;
  int _3;
  long unsigned int _4;
  _Bool _5;
  long unsigned int _6;
  long unsigned int _7;
  unsigned char _8;
  int _9;
  <unnamed type> _10;
  long unsigned int _11;
  _Bool _12;
  int _13;
  <unnamed type> _14;
  long unsigned int _45;
  _Bool x.0_50;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  timeStart = 0;
  # DEBUG BEGIN_STMT
  # DEBUG timeElapsed => 0
  # DEBUG BEGIN_STMT
  _1 = u32TimeoutMs_27(D) * 1000;
  mS2Ticks_29 = OsIf_MicrosToTicks (_1, 0);
  # DEBUG mS2Ticks => mS2Ticks_29
  # DEBUG BEGIN_STMT
  _2 = instance_30(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_50 ={v} x;
  if (x.0_50 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 22>; [50.00%]

  <bb 22> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 24> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 = (int) instance_30(D);
  state_31 = g_flexcan_Ip_StatePtr[_3];
  # DEBUG state => state_31
  # DEBUG BEGIN_STMT
  base_32 = g_Flexcan_Ip_aBase[_3];
  # DEBUG base => base_32
  # DEBUG BEGIN_STMT
  result_37 = FlexCAN_StartRxMessageBufferData (instance_30(D), mb_idx_33(D), data_34(D), isPolling_35(D));
  # DEBUG result => result_37
  # DEBUG BEGIN_STMT
  if (result_37 == 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 5> [local count: 53687]:
  if (isPolling_35(D) != 0)
    goto <bb 7>; [67.00%]
  else
    goto <bb 6>; [33.00%]

  <bb 6> [local count: 17717]:
  # DEBUG BEGIN_STMT
  _4 = (long unsigned int) mb_idx_33(D);
  _5 = state_31->isIntActive;
  result_39 = FlexCAN_SetMsgBuffIntCmd (base_32, instance_30(D), _4, 1, _5);
  # DEBUG result => result_39

  <bb 7> [local count: 107374]:
  # result_15 = PHI <result_37(4), 0(5), result_39(6)>
  # DEBUG result => result_15
  # DEBUG BEGIN_STMT
  if (result_15 == 0)
    goto <bb 8>; [33.00%]
  else
    goto <bb 14>; [67.00%]

  <bb 8> [local count: 35433]:
  # DEBUG BEGIN_STMT
  _6 = OsIf_GetCounter (0);
  timeStart = _6;
  # DEBUG BEGIN_STMT
  goto <bb 13>; [100.00%]

  <bb 9> [local count: 313013]:
  # DEBUG BEGIN_STMT
  if (isPolling_35(D) != 0)
    goto <bb 10>; [33.00%]
  else
    goto <bb 12>; [67.00%]

  <bb 10> [local count: 103294]:
  # DEBUG BEGIN_STMT
  _7 = (long unsigned int) mb_idx_33(D);
  _8 = FlexCAN_GetBuffStatusFlag (base_32, _7);
  if (_8 != 0)
    goto <bb 11>; [33.00%]
  else
    goto <bb 12>; [67.00%]

  <bb 11> [local count: 34087]:
  # DEBUG BEGIN_STMT
  FlexCAN_IRQHandlerRxMB (instance_30(D), _7);

  <bb 12> [local count: 313013]:
  # DEBUG BEGIN_STMT
  _45 = OsIf_GetElapsed (&timeStart, 0);
  timeElapsed_46 = timeElapsed_18 + _45;
  # DEBUG timeElapsed => timeElapsed_46
  # DEBUG BEGIN_STMT
  if (mS2Ticks_29 <= timeElapsed_46)
    goto <bb 14>; [5.50%]
  else
    goto <bb 23>; [94.50%]

  <bb 23> [local count: 295797]:

  <bb 13> [local count: 331231]:
  # timeElapsed_18 = PHI <0(8), timeElapsed_46(23)>
  # DEBUG timeElapsed => timeElapsed_18
  # DEBUG BEGIN_STMT
  _9 = (int) mb_idx_33(D);
  _10 ={v} state_31->mbs[_9].state;
  if (_10 == 1)
    goto <bb 9>; [94.50%]
  else
    goto <bb 14>; [5.50%]

  <bb 14> [local count: 107374]:
  # result_16 = PHI <result_15(7), 3(12), 0(13)>
  # DEBUG result => result_16
  # DEBUG BEGIN_STMT
  if (result_16 == 3)
    goto <bb 15>; [34.00%]
  else
    goto <bb 17>; [66.00%]

  <bb 15> [local count: 36507]:
  if (isPolling_35(D) != 0)
    goto <bb 17>; [67.00%]
  else
    goto <bb 16>; [33.00%]

  <bb 16> [local count: 12047]:
  # DEBUG BEGIN_STMT
  _11 = (long unsigned int) mb_idx_33(D);
  _12 = state_31->isIntActive;
  FlexCAN_SetMsgBuffIntCmd (base_32, instance_30(D), _11, 0, _12);

  <bb 17> [local count: 107374]:
  # DEBUG BEGIN_STMT
  if (result_16 != 4)
    goto <bb 18>; [66.00%]
  else
    goto <bb 21>; [34.00%]

  <bb 18> [local count: 70867]:
  if (result_16 != 2)
    goto <bb 19>; [66.00%]
  else
    goto <bb 21>; [34.00%]

  <bb 19> [local count: 46772]:
  # DEBUG BEGIN_STMT
  _13 = (int) mb_idx_33(D);
  _14 ={v} state_31->mbs[_13].state;
  if (_14 == 0)
    goto <bb 21>; [65.00%]
  else
    goto <bb 20>; [35.00%]

  <bb 20> [local count: 16370]:
  # DEBUG BEGIN_STMT
  state_31->mbs[_13].state ={v} 0;
  # DEBUG BEGIN_STMT
  # DEBUG result => 3

  <bb 21> [local count: 107374]:
  # result_17 = PHI <result_16(17), result_16(18), 0(19), 3(20)>
  # DEBUG result => result_17
  # DEBUG BEGIN_STMT
  timeStart ={v} {CLOBBER};
  return result_17;

}


FlexCAN_Ip_Receive (uint8 instance, uint8 mb_idx, struct Flexcan_Ip_MsgBuffType * data, boolean isPolling)
{
  volatile boolean x;
  const struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * base;
  Flexcan_Ip_StatusType result;
  int _1;
  _Bool _2;
  long unsigned int _3;
  _Bool _4;
  _Bool x.0_18;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (int) instance_7(D);
  base_9 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_9
  # DEBUG BEGIN_STMT
  state_10 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_10
  # DEBUG BEGIN_STMT
  _2 = instance_7(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_18 ={v} x;
  if (x.0_18 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 8> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 9> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  result_15 = FlexCAN_StartRxMessageBufferData (instance_7(D), mb_idx_11(D), data_12(D), isPolling_13(D));
  # DEBUG result => result_15
  # DEBUG BEGIN_STMT
  if (result_15 == 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 5> [local count: 53687]:
  if (isPolling_13(D) != 0)
    goto <bb 7>; [67.00%]
  else
    goto <bb 6>; [33.00%]

  <bb 6> [local count: 17717]:
  # DEBUG BEGIN_STMT
  _3 = (long unsigned int) mb_idx_11(D);
  _4 = state_10->isIntActive;
  result_17 = FlexCAN_SetMsgBuffIntCmd (base_9, instance_7(D), _3, 1, _4);
  # DEBUG result => result_17

  <bb 7> [local count: 107374]:
  # result_5 = PHI <result_15(4), 0(5), result_17(6)>
  # DEBUG result => result_5
  # DEBUG BEGIN_STMT
  return result_5;

}


FlexCAN_Ip_ConfigRxMb (uint8 instance, uint8 mb_idx, const struct Flexcan_Ip_DataInfoType * rx_info, uint32 msg_id)
{
  volatile boolean x;
  volatile boolean x;
  const struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * base;
  struct Flexcan_Ip_MsbuffCodeStatusType cs;
  Flexcan_Ip_StatusType eResult;
  int _1;
  _Bool _2;
  _Bool _3;
  _Bool _4;
  long unsigned int _5;
  _Bool _6;
  long unsigned int _7;
  long unsigned int _8;
  <unnamed type> _9;
  _Bool _10;
  _Bool x.0_32;
  _Bool x.0_33;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG eResult => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (int) instance_13(D);
  base_15 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_15
  # DEBUG BEGIN_STMT
  state_16 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_16
  # DEBUG BEGIN_STMT
  _2 = instance_13(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_33 ={v} x;
  if (x.0_33 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 10> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 12> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 = rx_info_17(D) != 0B;
  x ={v} _3;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_32 ={v} x;
  if (x.0_32 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 9> [local count: 53687]:

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 11> [local count: 536870913]:
  goto <bb 5>; [100.00%]

  <bb 6> [local count: 53687]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _4 = state_16->bIsLegacyFifoEn;
  _5 = state_16->u32MaxMbNum;
  _6 = FlexCAN_IsMbOutOfRange (base_15, mb_idx_18(D), _4, _5);
  if (_6 != 0)
    goto <bb 8>; [52.23%]
  else
    goto <bb 7>; [47.77%]

  <bb 7> [local count: 25646]:
  # DEBUG BEGIN_STMT
  _7 = (long unsigned int) mb_idx_18(D);
  FlexCAN_ClearMsgBuffIntStatusFlag (base_15, _7);
  # DEBUG BEGIN_STMT
  _8 = rx_info_17(D)->data_length;
  cs.dataLen = _8;
  # DEBUG BEGIN_STMT
  _9 = rx_info_17(D)->msg_id_type;
  cs.msgIdType = _9;
  # DEBUG BEGIN_STMT
  _10 = rx_info_17(D)->fd_enable;
  cs.fd_enable = _10;
  # DEBUG BEGIN_STMT
  cs.code = 15;
  # DEBUG BEGIN_STMT
  FlexCAN_SetRxMsgBuff (base_15, _7, &cs, msg_id_25(D));
  # DEBUG BEGIN_STMT
  cs.code = 0;
  # DEBUG BEGIN_STMT
  FlexCAN_SetRxMsgBuff (base_15, _7, &cs, msg_id_25(D));
  # DEBUG BEGIN_STMT
  cs.code = 4;
  # DEBUG BEGIN_STMT
  FlexCAN_SetRxMsgBuff (base_15, _7, &cs, msg_id_25(D));

  <bb 8> [local count: 53687]:
  # eResult_11 = PHI <4(6), 0(7)>
  # DEBUG eResult => eResult_11
  # DEBUG BEGIN_STMT
  cs ={v} {CLOBBER};
  return eResult_11;

}


FlexCAN_Ip_Send (uint8 instance, uint8 mb_idx, const struct Flexcan_Ip_DataInfoType * tx_info, uint32 msg_id, const uint8 * mb_data)
{
  volatile boolean x;
  volatile boolean x;
  const struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * base;
  Flexcan_Ip_StatusType result;
  int _1;
  _Bool _2;
  _Bool _3;
  _Bool _4;
  long unsigned int _5;
  _Bool _6;
  long unsigned int _21;
  long unsigned int _22;
  _Bool x.0_23;
  _Bool x.0_24;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG result => 1
  # DEBUG BEGIN_STMT
  _1 = (int) instance_9(D);
  base_11 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_11
  # DEBUG BEGIN_STMT
  state_12 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_12
  # DEBUG BEGIN_STMT
  _2 = instance_9(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_24 ={v} x;
  if (x.0_24 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 12>; [50.00%]

  <bb 12> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 14> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 = tx_info_13(D) != 0B;
  x ={v} _3;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_23 ={v} x;
  if (x.0_23 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 11>; [50.00%]

  <bb 11> [local count: 53687]:

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 13> [local count: 536870913]:
  goto <bb 5>; [100.00%]

  <bb 6> [local count: 53687]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  # DEBUG base => base_11
  # DEBUG INLINE_ENTRY FlexCAN_IsListenOnlyModeEnabled
  # DEBUG BEGIN_STMT
  _21 ={v} MEM[(const struct FLEXCAN_Type *)base_11].CTRL1;
  _22 = _21 & 8;
  # DEBUG base => NULL
  if (_22 == 0)
    goto <bb 7>; [33.00%]
  else
    goto <bb 10>; [67.00%]

  <bb 7> [local count: 17717]:
  # DEBUG BEGIN_STMT
  result_18 = FlexCAN_StartSendData (instance_9(D), mb_idx_14(D), tx_info_13(D), msg_id_15(D), mb_data_16(D));
  # DEBUG result => result_18
  # DEBUG BEGIN_STMT
  if (result_18 == 0)
    goto <bb 8>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 8> [local count: 8858]:
  _4 = tx_info_13(D)->is_polling;
  if (_4 != 0)
    goto <bb 10>; [67.00%]
  else
    goto <bb 9>; [33.00%]

  <bb 9> [local count: 2923]:
  # DEBUG BEGIN_STMT
  _5 = (long unsigned int) mb_idx_14(D);
  _6 = state_12->isIntActive;
  result_20 = FlexCAN_SetMsgBuffIntCmd (base_11, instance_9(D), _5, 1, _6);
  # DEBUG result => result_20

  <bb 10> [local count: 53687]:
  # result_7 = PHI <1(6), result_18(7), 0(8), result_20(9)>
  # DEBUG result => result_7
  # DEBUG BEGIN_STMT
  return result_7;

}


FlexCAN_Ip_Init_Privileged (uint8 Flexcan_Ip_u8Instance, struct Flexcan_Ip_StateType * Flexcan_Ip_pState, const struct Flexcan_Ip_ConfigType * Flexcan_Ip_pData)
{
  volatile boolean x;
  volatile boolean x;
  uint32 i;
  struct FLEXCAN_Type * pBase;
  Flexcan_Ip_StatusType eResult;
  int _1;
  _Bool _2;
  _Bool _3;
  _Bool _4;
  _Bool _5;
  long unsigned int _6;
  long unsigned int _7;
  const struct Flexcan_Ip_TimeSegmentType * _8;
  _Bool _9;
  const struct Flexcan_Ip_TimeSegmentType * _10;
  long unsigned int _11;
  long unsigned int _12;
  _Bool _13;
  const struct Flexcan_Ip_TimeSegmentType * _14;
  const struct Flexcan_Ip_TimeSegmentType * _15;
  const struct Flexcan_Ip_TimeSegmentType * _16;
  <unnamed type> _17;
  <unnamed type> _18;
  void (*<T341>) (uint8, Flexcan_Ip_EventType, uint32, const struct Flexcan_Ip_StateType *) _19;
  void (*<T341>) (uint8, Flexcan_Ip_EventType, uint32, const struct Flexcan_Ip_StateType *) _20;
  _Bool _21;
  long unsigned int _22;
  _Bool x.0_68;
  _Bool x.0_69;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG eResult => 0
  # DEBUG BEGIN_STMT
  _1 = (int) Flexcan_Ip_u8Instance_30(D);
  pBase_32 = g_Flexcan_Ip_aBase[_1];
  # DEBUG pBase => pBase_32
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = Flexcan_Ip_u8Instance_30(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_69 ={v} x;
  if (x.0_69 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 22>; [50.00%]

  <bb 22> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 24> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 = Flexcan_Ip_pData_33(D) != 0B;
  x ={v} _3;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_68 ={v} x;
  if (x.0_68 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 21>; [50.00%]

  <bb 21> [local count: 53687]:

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 23> [local count: 536870913]:
  goto <bb 5>; [100.00%]

  <bb 6> [local count: 53687]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  eResult_35 = FlexCAN_InitController (pBase_32, Flexcan_Ip_pData_33(D));
  # DEBUG eResult => eResult_35
  # DEBUG BEGIN_STMT
  if (eResult_35 == 0)
    goto <bb 7>; [33.00%]
  else
    goto <bb 19>; [67.00%]

  <bb 7> [local count: 17717]:
  # DEBUG BEGIN_STMT
  _4 = Flexcan_Ip_pData_33(D)->fd_enable;
  FlexCAN_EnableExtCbt (pBase_32, _4);
  # DEBUG BEGIN_STMT
  _5 = Flexcan_Ip_pData_33(D)->enhCbtEnable;
  if (_5 != 0)
    goto <bb 8>; [50.00%]
  else
    goto <bb 11>; [50.00%]

  <bb 8> [local count: 8858]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_00 ();
  # DEBUG BEGIN_STMT
  _6 ={v} pBase_32->CTRL2;
  _7 = _6 | 8192;
  pBase_32->CTRL2 ={v} _7;
  # DEBUG BEGIN_STMT
  _8 = &Flexcan_Ip_pData_33(D)->bitrate;
  FlexCAN_SetEnhancedNominalTimeSegments (pBase_32, _8);
  # DEBUG BEGIN_STMT
  _9 = Flexcan_Ip_pData_33(D)->fd_enable;
  if (_9 != 0)
    goto <bb 9>; [33.00%]
  else
    goto <bb 10>; [67.00%]

  <bb 9> [local count: 2923]:
  # DEBUG BEGIN_STMT
  _10 = &Flexcan_Ip_pData_33(D)->bitrate_cbt;
  FlexCAN_SetEnhancedDataTimeSegments (pBase_32, _10);

  <bb 10> [local count: 8858]:
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_00 ();
  goto <bb 15>; [100.00%]

  <bb 11> [local count: 8858]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_00 ();
  # DEBUG BEGIN_STMT
  _11 ={v} pBase_32->CTRL2;
  _12 = _11 & 4294959103;
  pBase_32->CTRL2 ={v} _12;
  # DEBUG BEGIN_STMT
  _13 = Flexcan_Ip_pData_33(D)->fd_enable;
  if (_13 != 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 12> [local count: 4429]:
  # DEBUG BEGIN_STMT
  _14 = &Flexcan_Ip_pData_33(D)->bitrate;
  FlexCAN_SetExtendedTimeSegments (pBase_32, _14);
  # DEBUG BEGIN_STMT
  _15 = &Flexcan_Ip_pData_33(D)->bitrate_cbt;
  FlexCAN_SetFDTimeSegments (pBase_32, _15);
  goto <bb 14>; [100.00%]

  <bb 13> [local count: 4429]:
  # DEBUG BEGIN_STMT
  _16 = &Flexcan_Ip_pData_33(D)->bitrate;
  FlexCAN_SetTimeSegments (pBase_32, _16);

  <bb 14> [local count: 8858]:
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_00 ();

  <bb 15> [local count: 17717]:
  # DEBUG BEGIN_STMT
  _17 = Flexcan_Ip_pData_33(D)->flexcanMode;
  FlexCAN_SetOperationMode (pBase_32, _17);
  # DEBUG BEGIN_STMT
  eResult_50 = FlexCAN_EnterFreezeMode (pBase_32);
  # DEBUG eResult => eResult_50
  # DEBUG BEGIN_STMT
  if (eResult_50 == 0)
    goto <bb 20>; [50.00%]
  else
    goto <bb 19>; [50.00%]

  <bb 20> [local count: 8858]:
  goto <bb 17>; [100.00%]

  <bb 16> [local count: 851176]:
  # DEBUG BEGIN_STMT
  Flexcan_Ip_pState_51(D)->mbs[i_24].isPolling = 1;
  # DEBUG BEGIN_STMT
  Flexcan_Ip_pState_51(D)->mbs[i_24].pMBmessage = 0B;
  # DEBUG BEGIN_STMT
  Flexcan_Ip_pState_51(D)->mbs[i_24].state ={v} 0;
  # DEBUG BEGIN_STMT
  Flexcan_Ip_pState_51(D)->mbs[i_24].time_stamp = 0;
  # DEBUG BEGIN_STMT
  i_67 = i_24 + 1;
  # DEBUG i => i_67

  <bb 17> [local count: 860035]:
  # i_24 = PHI <i_67(16), 0(20)>
  # DEBUG i => i_24
  # DEBUG BEGIN_STMT
  if (i_24 != 96)
    goto <bb 16>; [98.97%]
  else
    goto <bb 18>; [1.03%]

  <bb 18> [local count: 8858]:
  # DEBUG BEGIN_STMT
  Flexcan_Ip_pState_51(D)->enhancedFifoOutput.isPolling = 1;
  # DEBUG BEGIN_STMT
  Flexcan_Ip_pState_51(D)->enhancedFifoOutput.state ={v} 0;
  # DEBUG BEGIN_STMT
  _18 = Flexcan_Ip_pData_33(D)->transfer_type;
  Flexcan_Ip_pState_51(D)->transferType = _18;
  # DEBUG BEGIN_STMT
  _19 = Flexcan_Ip_pData_33(D)->Callback;
  Flexcan_Ip_pState_51(D)->callback = _19;
  # DEBUG BEGIN_STMT
  Flexcan_Ip_pState_51(D)->callbackParam = 0B;
  # DEBUG BEGIN_STMT
  _20 = Flexcan_Ip_pData_33(D)->ErrorCallback;
  Flexcan_Ip_pState_51(D)->error_callback = _20;
  # DEBUG BEGIN_STMT
  Flexcan_Ip_pState_51(D)->errorCallbackParam = 0B;
  # DEBUG BEGIN_STMT
  _21 = Flexcan_Ip_pData_33(D)->is_rx_fifo_needed;
  Flexcan_Ip_pState_51(D)->bIsLegacyFifoEn = _21;
  # DEBUG BEGIN_STMT
  _22 = Flexcan_Ip_pData_33(D)->max_num_mb;
  Flexcan_Ip_pState_51(D)->u32MaxMbNum = _22;
  # DEBUG BEGIN_STMT
  Flexcan_Ip_pState_51(D)->isIntActive = 1;
  # DEBUG BEGIN_STMT
  g_flexcan_Ip_StatePtr[_1] = Flexcan_Ip_pState_51(D);

  <bb 19> [local count: 53687]:
  # eResult_23 = PHI <eResult_35(6), eResult_50(15), 0(18)>
  # DEBUG eResult => eResult_23
  # DEBUG BEGIN_STMT
  return eResult_23;

}


FlexCAN_AbortRxTransfer (uint8 u8Instance, uint8 mb_idx)
{
  volatile uint32 * flexcan_mb;
  uint32 flexcan_mb_config;
  uint32 val2;
  uint32 val1;
  struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * pBase;
  int _1;
  int _2;
  _Bool _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  _Bool _7;
  long unsigned int _8;
  long unsigned int _9;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  _1 = (int) u8Instance_12(D);
  pBase_14 = g_Flexcan_Ip_aBase[_1];
  # DEBUG pBase => pBase_14
  # DEBUG BEGIN_STMT
  state_15 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_15
  # DEBUG BEGIN_STMT
  # DEBUG val1 => 0
  # DEBUG BEGIN_STMT
  # DEBUG val2 => 0
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_config => 0
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb => 0B
  # DEBUG BEGIN_STMT
  _2 = (int) mb_idx_16(D);
  state_15->mbs[_2].state ={v} 0;
  # DEBUG BEGIN_STMT
  _3 = state_15->bIsLegacyFifoEn;
  if (_3 != 0)
    goto <bb 3>; [67.00%]
  else
    goto <bb 7>; [33.00%]

  <bb 3> [local count: 719407022]:
  # DEBUG BEGIN_STMT
  _4 ={v} pBase_14->CTRL2;
  _5 = _4 >> 24;
  val1_25 = _5 & 15;
  # DEBUG val1 => val1_25
  # DEBUG BEGIN_STMT
  val2_26 = RxFifoOcuppiedLastMsgBuff (val1_25);
  # DEBUG val2 => val2_26
  # DEBUG BEGIN_STMT
  _6 = (long unsigned int) mb_idx_16(D);
  if (_6 > val2_26)
    goto <bb 4>; [33.00%]
  else
    goto <bb 5>; [67.00%]

  <bb 4> [local count: 237404317]:
  # DEBUG BEGIN_STMT
  flexcan_mb_28 = FlexCAN_GetMsgBuffRegion (pBase_14, _6);
  # DEBUG flexcan_mb => flexcan_mb_28
  # DEBUG BEGIN_STMT
  flexcan_mb_config_29 ={v} *flexcan_mb_28;
  # DEBUG flexcan_mb_config => flexcan_mb_config_29
  # DEBUG BEGIN_STMT
  flexcan_mb_config_30 = flexcan_mb_config_29 & 4043309055;
  # DEBUG flexcan_mb_config => flexcan_mb_config_30
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_config => flexcan_mb_config_30
  # DEBUG BEGIN_STMT
  *flexcan_mb_28 ={v} flexcan_mb_config_30;
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_config => flexcan_mb_config_30
  # DEBUG BEGIN_STMT
  flexcan_mb_config_32 = flexcan_mb_config_30 | 67108864;
  # DEBUG flexcan_mb_config => flexcan_mb_config_32
  # DEBUG BEGIN_STMT
  *flexcan_mb_28 ={v} flexcan_mb_config_32;

  <bb 5> [local count: 719407022]:
  # DEBUG BEGIN_STMT
  if (mb_idx_16(D) == 0)
    goto <bb 6>; [33.00%]
  else
    goto <bb 8>; [67.00%]

  <bb 6> [local count: 237404317]:
  # DEBUG BEGIN_STMT
  _7 = state_15->isIntActive;
  FLEXCAN_ClearMsgBuffIntCmd (pBase_14, u8Instance_12(D), 5, _7);
  goto <bb 8>; [100.00%]

  <bb 7> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  _8 = (long unsigned int) mb_idx_16(D);
  flexcan_mb_19 = FlexCAN_GetMsgBuffRegion (pBase_14, _8);
  # DEBUG flexcan_mb => flexcan_mb_19
  # DEBUG BEGIN_STMT
  flexcan_mb_config_20 ={v} *flexcan_mb_19;
  # DEBUG flexcan_mb_config => flexcan_mb_config_20
  # DEBUG BEGIN_STMT
  flexcan_mb_config_21 = flexcan_mb_config_20 & 4043309055;
  # DEBUG flexcan_mb_config => flexcan_mb_config_21
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_config => flexcan_mb_config_21
  # DEBUG BEGIN_STMT
  *flexcan_mb_19 ={v} flexcan_mb_config_21;
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_config => flexcan_mb_config_21
  # DEBUG BEGIN_STMT
  flexcan_mb_config_23 = flexcan_mb_config_21 | 67108864;
  # DEBUG flexcan_mb_config => flexcan_mb_config_23
  # DEBUG BEGIN_STMT
  *flexcan_mb_19 ={v} flexcan_mb_config_23;

  <bb 8> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _9 = (long unsigned int) mb_idx_16(D);
  FlexCAN_ClearMsgBuffIntStatusFlag (pBase_14, _9);
  return;

}


FlexCAN_AbortTxTransfer (uint8 u8Instance, uint8 mb_idx)
{
  volatile uint32 * flexcan_mb;
  uint32 uS2Ticks;
  uint32 flexcan_mb_config;
  uint32 timeElapsed;
  uint32 timeStart;
  Flexcan_Ip_StatusType result;
  struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * pBase;
  int _1;
  long unsigned int _2;
  long unsigned int _3;
  unsigned char _4;
  long unsigned int _5;
  long unsigned int _6;
  int _7;
  long unsigned int _32;

  <bb 2> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  _1 = (int) u8Instance_14(D);
  pBase_16 = g_Flexcan_Ip_aBase[_1];
  # DEBUG pBase => pBase_16
  # DEBUG BEGIN_STMT
  state_17 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_17
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  timeStart = 0;
  # DEBUG BEGIN_STMT
  # DEBUG timeElapsed => 0
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_config => 0
  # DEBUG BEGIN_STMT
  # DEBUG uS2Ticks => 0
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb => 0B
  # DEBUG BEGIN_STMT
  _2 = (long unsigned int) mb_idx_19(D);
  flexcan_mb_21 = FlexCAN_GetMsgBuffRegion (pBase_16, _2);
  # DEBUG flexcan_mb => flexcan_mb_21
  # DEBUG BEGIN_STMT
  flexcan_mb_config_22 ={v} *flexcan_mb_21;
  # DEBUG flexcan_mb_config => flexcan_mb_config_22
  # DEBUG BEGIN_STMT
  flexcan_mb_config_23 = flexcan_mb_config_22 & 4043309055;
  # DEBUG flexcan_mb_config => flexcan_mb_config_23
  # DEBUG BEGIN_STMT
  flexcan_mb_config_24 = flexcan_mb_config_23 | 150994944;
  # DEBUG flexcan_mb_config => flexcan_mb_config_24
  # DEBUG BEGIN_STMT
  *flexcan_mb_21 ={v} flexcan_mb_config_24;
  # DEBUG BEGIN_STMT
  uS2Ticks_27 = OsIf_MicrosToTicks (100, 0);
  # DEBUG uS2Ticks => uS2Ticks_27
  # DEBUG BEGIN_STMT
  _3 = OsIf_GetCounter (0);
  timeStart = _3;
  # DEBUG BEGIN_STMT
  goto <bb 4>; [100.00%]

  <bb 3> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _32 = OsIf_GetElapsed (&timeStart, 0);
  timeElapsed_33 = timeElapsed_11 + _32;
  # DEBUG timeElapsed => timeElapsed_33
  # DEBUG BEGIN_STMT
  if (uS2Ticks_27 <= timeElapsed_33)
    goto <bb 5>; [5.50%]
  else
    goto <bb 11>; [94.50%]

  <bb 11> [local count: 958878293]:

  <bb 4> [local count: 1073741824]:
  # timeElapsed_11 = PHI <0(2), timeElapsed_33(11)>
  # DEBUG timeElapsed => timeElapsed_11
  # DEBUG BEGIN_STMT
  _4 = FlexCAN_GetBuffStatusFlag (pBase_16, _2);
  if (_4 == 0)
    goto <bb 3>; [94.50%]
  else
    goto <bb 5>; [5.50%]

  <bb 5> [local count: 114863532]:
  # result_8 = PHI <3(3), 0(4)>
  # DEBUG result => result_8
  # DEBUG BEGIN_STMT
  if (result_8 != 3)
    goto <bb 6>; [66.00%]
  else
    goto <bb 10>; [34.00%]

  <bb 6> [local count: 75809931]:
  # DEBUG BEGIN_STMT
  flexcan_mb_config_34 ={v} *flexcan_mb_21;
  # DEBUG flexcan_mb_config => flexcan_mb_config_34
  # DEBUG BEGIN_STMT
  _5 = flexcan_mb_config_34 >> 24;
  _6 = _5 & 15;
  if (_6 == 8)
    goto <bb 7>; [34.00%]
  else
    goto <bb 8>; [66.00%]

  <bb 7> [local count: 25775377]:
  # DEBUG BEGIN_STMT
  # DEBUG result => 5

  <bb 8> [local count: 75809931]:
  # result_9 = PHI <result_8(6), 5(7)>
  # DEBUG result => result_9
  # DEBUG BEGIN_STMT
  if (_6 == 9)
    goto <bb 9>; [34.00%]
  else
    goto <bb 10>; [66.00%]

  <bb 9> [local count: 25775377]:
  # DEBUG BEGIN_STMT
  # DEBUG result => 0

  <bb 10> [local count: 114863532]:
  # result_10 = PHI <result_8(5), result_9(8), 0(9)>
  # DEBUG result => result_10
  # DEBUG BEGIN_STMT
  FlexCAN_ClearMsgBuffIntStatusFlag (pBase_16, _2);
  # DEBUG BEGIN_STMT
  _7 = (int) mb_idx_19(D);
  state_17->mbs[_7].state ={v} 0;
  # DEBUG BEGIN_STMT
  timeStart ={v} {CLOBBER};
  return result_10;

}


FlexCAN_IRQHandlerEnhancedRxFIFO (uint8 instance, uint32 intType)
{
  struct Flexcan_Ip_MsgBuffType data;
  struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * base;
  int _1;
  <unnamed type> _2;
  struct Flexcan_Ip_MsgBuffType * _3;
  struct Flexcan_Ip_MsgBuffType * _4;
  void (*<T33b>) (uint8, Flexcan_Ip_EventType, uint32, const struct FlexCANState *) _5;
  <unnamed type> _6;
  void (*<T33b>) (uint8, Flexcan_Ip_EventType, uint32, const struct FlexCANState *) _7;
  void (*<T33b>) (uint8, Flexcan_Ip_EventType, uint32, const struct FlexCANState *) _8;
  void (*<T33b>) (uint8, Flexcan_Ip_EventType, uint32, const struct FlexCANState *) _9;
  long unsigned int _27;
  long unsigned int _28;
  long unsigned int _29;
  long unsigned int _30;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_13(D);
  base_15 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_15
  # DEBUG BEGIN_STMT
  state_16 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_16
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  switch (intType_17(D)) <default: <L20> [20.00%], case 28: <L0> [20.00%], case 29: <L21> [20.00%], case 30: <L22> [20.00%], case 31: <L23> [20.00%]>

  <bb 3> [local count: 214748365]:
<L0>:
  # DEBUG BEGIN_STMT
  _2 ={v} state_16->enhancedFifoOutput.state;
  if (_2 == 1)
    goto <bb 4>; [34.00%]
  else
    goto <bb 16>; [66.00%]

  <bb 4> [local count: 73014444]:
  # DEBUG BEGIN_STMT
  _3 = state_16->enhancedFifoOutput.pMBmessage;
  if (_3 == 0B)
    goto <bb 5>; [30.00%]
  else
    goto <bb 6>; [70.00%]

  <bb 5> [local count: 21904333]:
  # DEBUG BEGIN_STMT
  state_16->enhancedFifoOutput.pMBmessage = &data;

  <bb 6> [local count: 73014444]:
  # DEBUG BEGIN_STMT
  _4 = state_16->enhancedFifoOutput.pMBmessage;
  FlexCAN_ReadEnhancedRxFifo (base_15, _4);
  # DEBUG BEGIN_STMT
  # DEBUG base => base_15
  # DEBUG intFlag => intType_17(D)
  # DEBUG INLINE_ENTRY FlexCAN_ClearEnhancedRxFifoIntStatusFlag
  # DEBUG BEGIN_STMT
  _27 = 1 << intType_17(D);
  base_15->ERFSR ={v} _27;
  # DEBUG base => NULL
  # DEBUG intFlag => NULL
  # DEBUG BEGIN_STMT
  # DEBUG base => base_15
  # DEBUG intFlag => 29
  # DEBUG INLINE_ENTRY FlexCAN_ClearEnhancedRxFifoIntStatusFlag
  # DEBUG BEGIN_STMT
  base_15->ERFSR ={v} 536870912;
  # DEBUG base => NULL
  # DEBUG intFlag => NULL
  # DEBUG BEGIN_STMT
  # DEBUG base => base_15
  # DEBUG intFlag => 30
  # DEBUG INLINE_ENTRY FlexCAN_ClearEnhancedRxFifoIntStatusFlag
  # DEBUG BEGIN_STMT
  base_15->ERFSR ={v} 1073741824;
  # DEBUG base => NULL
  # DEBUG intFlag => NULL
  # DEBUG BEGIN_STMT
  state_16->enhancedFifoOutput.state ={v} 0;
  # DEBUG BEGIN_STMT
  _5 = state_16->callback;
  if (_5 != 0B)
    goto <bb 7>; [70.00%]
  else
    goto <bb 8>; [30.00%]

  <bb 7> [local count: 51110111]:
  # DEBUG BEGIN_STMT
  _5 (instance_13(D), 5, 255, state_16);

  <bb 8> [local count: 73014444]:
  # DEBUG BEGIN_STMT
  _6 ={v} state_16->enhancedFifoOutput.state;
  if (_6 == 0)
    goto <bb 9>; [33.00%]
  else
    goto <bb 16>; [67.00%]

  <bb 9> [local count: 24094767]:
  # DEBUG BEGIN_STMT
  FlexCAN_CompleteRxMessageEnhancedFifoData (instance_13(D));
  goto <bb 16>; [100.00%]

  <bb 10> [local count: 214748365]:
<L21>:
  # DEBUG BEGIN_STMT
  # DEBUG base => base_15
  # DEBUG intFlag => intType_17(D)
  # DEBUG INLINE_ENTRY FlexCAN_ClearEnhancedRxFifoIntStatusFlag
  # DEBUG BEGIN_STMT
  _28 = 1 << intType_17(D);
  base_15->ERFSR ={v} _28;
  # DEBUG base => NULL
  # DEBUG intFlag => NULL
  # DEBUG BEGIN_STMT
  _7 = state_16->callback;
  if (_7 != 0B)
    goto <bb 11>; [70.00%]
  else
    goto <bb 16>; [30.00%]

  <bb 11> [local count: 150323855]:
  # DEBUG BEGIN_STMT
  _7 (instance_13(D), 6, 255, state_16);
  goto <bb 16>; [100.00%]

  <bb 12> [local count: 214748365]:
<L22>:
  # DEBUG BEGIN_STMT
  # DEBUG base => base_15
  # DEBUG intFlag => intType_17(D)
  # DEBUG INLINE_ENTRY FlexCAN_ClearEnhancedRxFifoIntStatusFlag
  # DEBUG BEGIN_STMT
  _29 = 1 << intType_17(D);
  base_15->ERFSR ={v} _29;
  # DEBUG base => NULL
  # DEBUG intFlag => NULL
  # DEBUG BEGIN_STMT
  _8 = state_16->callback;
  if (_8 != 0B)
    goto <bb 13>; [70.00%]
  else
    goto <bb 16>; [30.00%]

  <bb 13> [local count: 150323855]:
  # DEBUG BEGIN_STMT
  _8 (instance_13(D), 7, 255, state_16);
  goto <bb 16>; [100.00%]

  <bb 14> [local count: 214748365]:
<L23>:
  # DEBUG BEGIN_STMT
  # DEBUG base => base_15
  # DEBUG intFlag => intType_17(D)
  # DEBUG INLINE_ENTRY FlexCAN_ClearEnhancedRxFifoIntStatusFlag
  # DEBUG BEGIN_STMT
  _30 = 1 << intType_17(D);
  base_15->ERFSR ={v} _30;
  # DEBUG base => NULL
  # DEBUG intFlag => NULL
  # DEBUG BEGIN_STMT
  _9 = state_16->callback;
  if (_9 != 0B)
    goto <bb 15>; [70.00%]
  else
    goto <bb 16>; [30.00%]

  <bb 15> [local count: 150323855]:
  # DEBUG BEGIN_STMT
  _9 (instance_13(D), 8, 255, state_16);

  <bb 16> [local count: 1073741824]:
<L20>:
  data ={v} {CLOBBER};
  return;

}


FlexCAN_ProcessIRQHandlerEnhancedRxFIFO (uint8 u8Instance, boolean bIsSpuriousIntPrevious)
{
  boolean bIsSpuriousInt;
  uint32 u32intType;
  const struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * base;
  int _1;
  unsigned char _3;
  unsigned char _4;
  _Bool _5;
  long unsigned int _20;

  <bb 2> [local count: 214748364]:
  # DEBUG BEGIN_STMT
  _1 = (int) u8Instance_11(D);
  base_13 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_13
  # DEBUG BEGIN_STMT
  state_14 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_14
  # DEBUG BEGIN_STMT
  # DEBUG u32intType => 0
  # DEBUG BEGIN_STMT
  # DEBUG bIsSpuriousInt => bIsSpuriousIntPrevious_15(D)
  # DEBUG BEGIN_STMT
  # DEBUG u32intType => 31
  goto <bb 10>; [100.00%]

  <bb 3> [local count: 858993459]:
  # DEBUG BEGIN_STMT
  _3 = FlexCAN_GetEnhancedRxFIFOStatusFlag (base_13, u32intType_6);
  if (_3 != 0)
    goto <bb 4>; [33.00%]
  else
    goto <bb 9>; [67.00%]

  <bb 4> [local count: 283467841]:
  # DEBUG BEGIN_STMT
  _4 = FlexCAN_GetEnhancedRxFIFOIntStatusFlag (base_13, u32intType_6);
  if (_4 != 0)
    goto <bb 5>; [33.00%]
  else
    goto <bb 6>; [67.00%]

  <bb 5> [local count: 93544388]:
  # DEBUG BEGIN_STMT
  FlexCAN_IRQHandlerEnhancedRxFIFO (u8Instance_11(D), u32intType_6);
  # DEBUG BEGIN_STMT
  # DEBUG bIsSpuriousInt => 0
  goto <bb 9>; [100.00%]

  <bb 6> [local count: 189923454]:
  # DEBUG BEGIN_STMT
  if (bIsSpuriousInt_8 != 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 7> [local count: 94961727]:
  _5 = state_14->enhancedFifoOutput.isPolling;
  if (_5 != 0)
    goto <bb 9>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 8> [local count: 47480863]:
  # DEBUG BEGIN_STMT
  # DEBUG base => base_13
  # DEBUG intFlag => u32intType_6
  # DEBUG INLINE_ENTRY FlexCAN_ClearEnhancedRxFifoIntStatusFlag
  # DEBUG BEGIN_STMT
  _20 = 1 << u32intType_6;
  base_13->ERFSR ={v} _20;

  <bb 9> [local count: 858993459]:
  # bIsSpuriousInt_7 = PHI <bIsSpuriousInt_8(3), 0(5), bIsSpuriousInt_8(6), 1(7), 1(8)>
  # DEBUG base => NULL
  # DEBUG intFlag => NULL
  # DEBUG bIsSpuriousInt => bIsSpuriousInt_7
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  u32intType_19 = u32intType_6 + 4294967295;
  # DEBUG u32intType => u32intType_19

  <bb 10> [local count: 1073741824]:
  # u32intType_6 = PHI <31(2), u32intType_19(9)>
  # bIsSpuriousInt_8 = PHI <bIsSpuriousIntPrevious_15(D)(2), bIsSpuriousInt_7(9)>
  # DEBUG bIsSpuriousInt => bIsSpuriousInt_8
  # DEBUG u32intType => u32intType_6
  # DEBUG BEGIN_STMT
  if (u32intType_6 > 27)
    goto <bb 3>; [80.00%]
  else
    goto <bb 11>; [20.00%]

  <bb 11> [local count: 214748365]:
  # bIsSpuriousInt_2 = PHI <bIsSpuriousInt_8(10)>
  # DEBUG BEGIN_STMT
  return bIsSpuriousInt_2;

}


FlexCAN_ProcessSpuriousInterruptMB (uint8 instance, uint32 startMbIdx, uint32 endMbIdx)
{
  uint32 u32MbHandle;
  uint32 mb_idx;
  struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * base;
  int _1;
  unsigned char _2;
  unsigned char _3;
  _Bool _4;
  _Bool _5;
  <unnamed type> _6;

  <bb 2> [local count: 118111602]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_11(D);
  base_13 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_13
  # DEBUG BEGIN_STMT
  state_14 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_14
  # DEBUG BEGIN_STMT
  # DEBUG mb_idx => 0
  # DEBUG BEGIN_STMT
  # DEBUG u32MbHandle => 0
  # DEBUG BEGIN_STMT
  # DEBUG mb_idx => startMbIdx_15(D)
  goto <bb 12>; [100.00%]

  <bb 3> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  _2 = FlexCAN_GetBuffStatusFlag (base_13, mb_idx_7);
  if (_2 != 0)
    goto <bb 4>; [33.00%]
  else
    goto <bb 11>; [67.00%]

  <bb 4> [local count: 315357973]:
  _3 = FlexCAN_GetBuffStatusImask (base_13, mb_idx_7);
  if (_3 == 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 11>; [50.00%]

  <bb 5> [local count: 157678987]:
  # DEBUG BEGIN_STMT
  # DEBUG u32MbHandle => mb_idx_7
  # DEBUG BEGIN_STMT
  _4 = state_14->bIsLegacyFifoEn;
  if (_4 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 6> [local count: 78839493]:
  if (mb_idx_7 <= 7)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 39419747]:
  # DEBUG BEGIN_STMT
  # DEBUG u32MbHandle => 0

  <bb 8> [local count: 157678987]:
  # u32MbHandle_8 = PHI <mb_idx_7(5), mb_idx_7(6), 0(7)>
  # DEBUG u32MbHandle => u32MbHandle_8
  # DEBUG BEGIN_STMT
  _5 = state_14->mbs[u32MbHandle_8].isPolling;
  if (_5 != 0)
    goto <bb 11>; [67.00%]
  else
    goto <bb 9>; [33.00%]

  <bb 9> [local count: 52034066]:
  # DEBUG BEGIN_STMT
  FlexCAN_ClearMsgBuffIntStatusFlag (base_13, mb_idx_7);
  # DEBUG BEGIN_STMT
  _6 ={v} state_14->mbs[u32MbHandle_8].state;
  if (_6 == 2)
    goto <bb 10>; [34.00%]
  else
    goto <bb 11>; [66.00%]

  <bb 10> [local count: 17691582]:
  # DEBUG BEGIN_STMT
  state_14->mbs[u32MbHandle_8].state ={v} 0;
  # DEBUG BEGIN_STMT
  state_14->mbs[u32MbHandle_8].isPolling = 1;

  <bb 11> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  mb_idx_22 = mb_idx_7 + 1;
  # DEBUG mb_idx => mb_idx_22

  <bb 12> [local count: 1073741824]:
  # mb_idx_7 = PHI <startMbIdx_15(D)(2), mb_idx_22(11)>
  # DEBUG mb_idx => mb_idx_7
  # DEBUG BEGIN_STMT
  if (mb_idx_7 <= endMbIdx_16(D))
    goto <bb 3>; [89.00%]
  else
    goto <bb 13>; [11.00%]

  <bb 13> [local count: 118111601]:
  return;

}


FlexCAN_IRQHandlerRxFIFO (uint8 instance, uint32 mb_idx)
{
  struct Flexcan_Ip_MsgBuffType data;
  struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * base;
  int _1;
  struct Flexcan_Ip_MsgBuffType * _2;
  <unnamed type> _3;
  struct Flexcan_Ip_MsgBuffType * _4;
  void (*<T33b>) (uint8, Flexcan_Ip_EventType, uint32, const struct FlexCANState *) _5;
  <unnamed type> _6;
  void (*<T33b>) (uint8, Flexcan_Ip_EventType, uint32, const struct FlexCANState *) _7;
  void (*<T33b>) (uint8, Flexcan_Ip_EventType, uint32, const struct FlexCANState *) _8;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_12(D);
  base_14 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_14
  # DEBUG BEGIN_STMT
  state_15 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_15
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _2 = state_15->mbs[0].pMBmessage;
  if (_2 == 0B)
    goto <bb 3>; [30.00%]
  else
    goto <bb 4>; [70.00%]

  <bb 3> [local count: 322122547]:
  # DEBUG BEGIN_STMT
  state_15->mbs[0].pMBmessage = &data;

  <bb 4> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  switch (mb_idx_17(D)) <default: <L17> [25.00%], case 5: <L2> [25.00%], case 6: <L9> [25.00%], case 7: <L12> [25.00%]>

  <bb 5> [local count: 268435456]:
<L2>:
  # DEBUG BEGIN_STMT
  _3 ={v} state_15->mbs[0].state;
  if (_3 == 1)
    goto <bb 6>; [20.24%]
  else
    goto <bb 14>; [79.76%]

  <bb 6> [local count: 54331336]:
  # DEBUG BEGIN_STMT
  _4 = state_15->mbs[0].pMBmessage;
  FlexCAN_ReadRxFifo (base_14, _4);
  # DEBUG BEGIN_STMT
  FlexCAN_ClearMsgBuffIntStatusFlag (base_14, mb_idx_17(D));
  # DEBUG BEGIN_STMT
  state_15->mbs[0].state ={v} 0;
  # DEBUG BEGIN_STMT
  _5 = state_15->callback;
  if (_5 != 0B)
    goto <bb 7>; [70.00%]
  else
    goto <bb 8>; [30.00%]

  <bb 7> [local count: 38031935]:
  # DEBUG BEGIN_STMT
  _5 (instance_12(D), 1, 0, state_15);

  <bb 8> [local count: 54331336]:
  # DEBUG BEGIN_STMT
  _6 ={v} state_15->mbs[0].state;
  if (_6 == 0)
    goto <bb 9>; [33.00%]
  else
    goto <bb 14>; [67.00%]

  <bb 9> [local count: 17929341]:
  # DEBUG BEGIN_STMT
  state_15->mbs[0].isPolling = 1;
  # DEBUG BEGIN_STMT
  FlexCAN_CompleteRxMessageFifoData (instance_12(D));
  goto <bb 14>; [100.00%]

  <bb 10> [local count: 268435456]:
<L9>:
  # DEBUG BEGIN_STMT
  FlexCAN_ClearMsgBuffIntStatusFlag (base_14, mb_idx_17(D));
  # DEBUG BEGIN_STMT
  _7 = state_15->callback;
  if (_7 != 0B)
    goto <bb 11>; [70.00%]
  else
    goto <bb 14>; [30.00%]

  <bb 11> [local count: 187904819]:
  # DEBUG BEGIN_STMT
  _7 (instance_12(D), 2, 0, state_15);
  goto <bb 14>; [100.00%]

  <bb 12> [local count: 268435456]:
<L12>:
  # DEBUG BEGIN_STMT
  FlexCAN_ClearMsgBuffIntStatusFlag (base_14, mb_idx_17(D));
  # DEBUG BEGIN_STMT
  _8 = state_15->callback;
  if (_8 != 0B)
    goto <bb 13>; [70.00%]
  else
    goto <bb 14>; [30.00%]

  <bb 13> [local count: 187904819]:
  # DEBUG BEGIN_STMT
  _8 (instance_12(D), 3, 0, state_15);

  <bb 14> [local count: 1073741824]:
<L17>:
  data ={v} {CLOBBER};
  return;

}


FlexCAN_IRQHandlerTxMB (uint8 u8Instance, uint32 u32MbIdx)
{
  boolean bCurrentIntStat;
  struct Flexcan_Ip_MsgBuffType mb;
  struct Flexcan_Ip_StateType * pState;
  struct FLEXCAN_Type * pBase;
  int _1;
  _Bool _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  void (*<T33b>) (uint8, Flexcan_Ip_EventType, uint32, const struct FlexCANState *) _8;
  <unnamed type> _9;
  _Bool _10;
  _Bool _11;
  _Bool _12;
  _Bool _13;
  long unsigned int vol.5_36;
  long unsigned int vol.5_37;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  _1 = (int) u8Instance_17(D);
  pBase_19 = g_Flexcan_Ip_aBase[_1];
  # DEBUG pBase => pBase_19
  # DEBUG BEGIN_STMT
  pState_20 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG pState => pState_20
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG bCurrentIntStat => 0
  # DEBUG BEGIN_STMT
  _2 = pState_20->mbs[u32MbIdx_21(D)].isRemote;
  if (_2 != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 3> [local count: 536870911]:
  # DEBUG BEGIN_STMT
  FlexCAN_LockRxMsgBuff (pBase_19, u32MbIdx_21(D));
  # DEBUG BEGIN_STMT
  FlexCAN_GetMsgBuff (pBase_19, u32MbIdx_21(D), &mb);
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_19
  # DEBUG INLINE_ENTRY FlexCAN_UnlockRxMsgBuff
  # DEBUG BEGIN_STMT
  vol.5_36 ={v} MEM[(const struct FLEXCAN_Type *)pBase_19].TIMER;
  # DEBUG base => NULL
  # DEBUG BEGIN_STMT
  _3 = mb.time_stamp;
  pState_20->mbs[u32MbIdx_21(D)].time_stamp = _3;
  # DEBUG BEGIN_STMT
  _4 = mb.cs;
  _5 = _4 >> 24;
  _6 = _5 & 15;
  if (_6 == 4)
    goto <bb 4>; [20.24%]
  else
    goto <bb 6>; [79.76%]

  <bb 4> [local count: 108662672]:
  # DEBUG BEGIN_STMT
  FlexCAN_ClearMsgBuffIntStatusFlag (pBase_19, u32MbIdx_21(D));
  goto <bb 6>; [100.00%]

  <bb 5> [local count: 536870911]:
  # DEBUG BEGIN_STMT
  _7 = FlexCAN_GetMsgBuffTimestamp (pBase_19, u32MbIdx_21(D));
  pState_20->mbs[u32MbIdx_21(D)].time_stamp = _7;
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_19
  # DEBUG INLINE_ENTRY FlexCAN_UnlockRxMsgBuff
  # DEBUG BEGIN_STMT
  vol.5_37 ={v} MEM[(const struct FLEXCAN_Type *)pBase_19].TIMER;
  # DEBUG base => NULL
  # DEBUG BEGIN_STMT
  FlexCAN_ClearMsgBuffIntStatusFlag (pBase_19, u32MbIdx_21(D));

  <bb 6> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  pState_20->mbs[u32MbIdx_21(D)].state ={v} 0;
  # DEBUG BEGIN_STMT
  bCurrentIntStat_30 = pState_20->mbs[u32MbIdx_21(D)].isPolling;
  # DEBUG bCurrentIntStat => bCurrentIntStat_30
  # DEBUG BEGIN_STMT
  _8 = pState_20->callback;
  if (_8 != 0B)
    goto <bb 7>; [70.00%]
  else
    goto <bb 8>; [30.00%]

  <bb 7> [local count: 751619278]:
  # DEBUG BEGIN_STMT
  _8 (u8Instance_17(D), 4, u32MbIdx_21(D), pState_20);

  <bb 8> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _9 ={v} pState_20->mbs[u32MbIdx_21(D)].state;
  if (_9 == 0)
    goto <bb 9>; [50.00%]
  else
    goto <bb 11>; [50.00%]

  <bb 9> [local count: 536870913]:
  _10 = pState_20->mbs[u32MbIdx_21(D)].isPolling;
  if (_10 != 0)
    goto <bb 11>; [67.00%]
  else
    goto <bb 10>; [33.00%]

  <bb 10> [local count: 177167401]:
  # DEBUG BEGIN_STMT
  pState_20->mbs[u32MbIdx_21(D)].isPolling = 1;
  # DEBUG BEGIN_STMT
  _11 = pState_20->isIntActive;
  FlexCAN_SetMsgBuffIntCmd (pBase_19, u8Instance_17(D), u32MbIdx_21(D), 0, _11);
  goto <bb 14>; [100.00%]

  <bb 11> [local count: 896574424]:
  # DEBUG BEGIN_STMT
  if (bCurrentIntStat_30 != 0)
    goto <bb 14>; [50.00%]
  else
    goto <bb 12>; [50.00%]

  <bb 12> [local count: 448287211]:
  _12 = pState_20->mbs[u32MbIdx_21(D)].isPolling;
  if (_12 != 0)
    goto <bb 13>; [33.00%]
  else
    goto <bb 14>; [67.00%]

  <bb 13> [local count: 147934780]:
  # DEBUG BEGIN_STMT
  _13 = pState_20->isIntActive;
  FlexCAN_SetMsgBuffIntCmd (pBase_19, u8Instance_17(D), u32MbIdx_21(D), 0, _13);

  <bb 14> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  mb ={v} {CLOBBER};
  return;

}


FlexCAN_IRQHandlerRxMB (uint8 instance, uint32 mb_idx)
{
  boolean bCurrentIntStat;
  struct Flexcan_Ip_MsgBuffType data;
  struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * base;
  int _1;
  struct Flexcan_Ip_MsgBuffType * _2;
  struct Flexcan_Ip_MsgBuffType * _3;
  void (*<T33b>) (uint8, Flexcan_Ip_EventType, uint32, const struct FlexCANState *) _4;
  <unnamed type> _5;
  _Bool _6;
  _Bool _7;
  _Bool _8;
  _Bool _9;
  long unsigned int vol.5_29;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_13(D);
  base_15 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_15
  # DEBUG BEGIN_STMT
  state_16 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_16
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG bCurrentIntStat => 0
  # DEBUG BEGIN_STMT
  _2 = state_16->mbs[mb_idx_17(D)].pMBmessage;
  if (_2 == 0B)
    goto <bb 3>; [30.00%]
  else
    goto <bb 4>; [70.00%]

  <bb 3> [local count: 322122547]:
  # DEBUG BEGIN_STMT
  state_16->mbs[mb_idx_17(D)].pMBmessage = &data;

  <bb 4> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  FlexCAN_LockRxMsgBuff (base_15, mb_idx_17(D));
  # DEBUG BEGIN_STMT
  _3 = state_16->mbs[mb_idx_17(D)].pMBmessage;
  FlexCAN_GetMsgBuff (base_15, mb_idx_17(D), _3);
  # DEBUG BEGIN_STMT
  FlexCAN_ClearMsgBuffIntStatusFlag (base_15, mb_idx_17(D));
  # DEBUG BEGIN_STMT
  # DEBUG base => base_15
  # DEBUG INLINE_ENTRY FlexCAN_UnlockRxMsgBuff
  # DEBUG BEGIN_STMT
  vol.5_29 ={v} MEM[(const struct FLEXCAN_Type *)base_15].TIMER;
  # DEBUG base => NULL
  # DEBUG BEGIN_STMT
  state_16->mbs[mb_idx_17(D)].state ={v} 0;
  # DEBUG BEGIN_STMT
  bCurrentIntStat_23 = state_16->mbs[mb_idx_17(D)].isPolling;
  # DEBUG bCurrentIntStat => bCurrentIntStat_23
  # DEBUG BEGIN_STMT
  _4 = state_16->callback;
  if (_4 != 0B)
    goto <bb 5>; [70.00%]
  else
    goto <bb 6>; [30.00%]

  <bb 5> [local count: 751619277]:
  # DEBUG BEGIN_STMT
  _4 (instance_13(D), 0, mb_idx_17(D), state_16);

  <bb 6> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  _5 ={v} state_16->mbs[mb_idx_17(D)].state;
  if (_5 == 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 7> [local count: 536870911]:
  _6 = state_16->mbs[mb_idx_17(D)].isPolling;
  if (_6 != 0)
    goto <bb 9>; [67.00%]
  else
    goto <bb 8>; [33.00%]

  <bb 8> [local count: 177167401]:
  # DEBUG BEGIN_STMT
  state_16->mbs[mb_idx_17(D)].isPolling = 1;
  # DEBUG BEGIN_STMT
  _7 = state_16->isIntActive;
  FlexCAN_SetMsgBuffIntCmd (base_15, instance_13(D), mb_idx_17(D), 0, _7);
  goto <bb 12>; [100.00%]

  <bb 9> [local count: 896574422]:
  # DEBUG BEGIN_STMT
  if (bCurrentIntStat_23 != 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 10> [local count: 448287211]:
  _8 = state_16->mbs[mb_idx_17(D)].isPolling;
  if (_8 != 0)
    goto <bb 11>; [33.00%]
  else
    goto <bb 12>; [67.00%]

  <bb 11> [local count: 147934780]:
  # DEBUG BEGIN_STMT
  _9 = state_16->isIntActive;
  FlexCAN_SetMsgBuffIntCmd (base_15, instance_13(D), mb_idx_17(D), 0, _9);

  <bb 12> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  data ={v} {CLOBBER};
  return;

}


FlexCAN_StartRxMessageFifoData (uint8 instance, struct Flexcan_Ip_MsgBuffType * data)
{
  volatile boolean x;
  Flexcan_Ip_StatusType eResult;
  _Bool _1;
  _Bool x.0_7;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG base => 0B
  # DEBUG BEGIN_STMT
  # DEBUG state => 0B
  # DEBUG BEGIN_STMT
  # DEBUG eResult => 0
  # DEBUG BEGIN_STMT
  _1 = instance_4(D) <= 5;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_7 ={v} x;
  if (x.0_7 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 5> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 6> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  eResult_3 = FlexCAN_StartRxMessageFifoData.part.0 (instance_4(D), data_6(D));
  # DEBUG eResult => eResult_3
  # DEBUG BEGIN_STMT
  return eResult_3;

}


FlexCAN_StartSendData (uint8 Flexcan_Ip_u8Instance, uint8 mb_idx, const struct Flexcan_Ip_DataInfoType * tx_info, uint32 msg_id, const uint8 * mb_data)
{
  volatile boolean x;
  volatile boolean x;
  struct FLEXCAN_Type * base;
  struct Flexcan_Ip_StateType * state;
  struct Flexcan_Ip_MsbuffCodeStatusType cs;
  Flexcan_Ip_StatusType eResult;
  int _1;
  _Bool _2;
  _Bool _3;
  _Bool _4;
  long unsigned int _5;
  _Bool _6;
  int _7;
  <unnamed type> _8;
  long unsigned int _9;
  _Bool _10;
  _Bool _11;
  long unsigned int _12;
  <unnamed type> _13;
  _Bool _14;
  unsigned char _15;
  _Bool _16;
  _Bool x.0_43;
  _Bool x.0_44;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG eResult => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = (int) Flexcan_Ip_u8Instance_20(D);
  state_22 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_22
  # DEBUG BEGIN_STMT
  base_23 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_23
  # DEBUG BEGIN_STMT
  _2 = Flexcan_Ip_u8Instance_20(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_44 ={v} x;
  if (x.0_44 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 14>; [50.00%]

  <bb 14> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 16> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 = tx_info_24(D) != 0B;
  x ={v} _3;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_43 ={v} x;
  if (x.0_43 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 13> [local count: 53687]:

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 15> [local count: 536870913]:
  goto <bb 5>; [100.00%]

  <bb 6> [local count: 53687]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _4 = state_22->bIsLegacyFifoEn;
  _5 = state_22->u32MaxMbNum;
  _6 = FlexCAN_IsMbOutOfRange (base_23, mb_idx_25(D), _4, _5);
  if (_6 != 0)
    goto <bb 12>; [35.00%]
  else
    goto <bb 7>; [65.00%]

  <bb 7> [local count: 34897]:
  # DEBUG BEGIN_STMT
  _7 = (int) mb_idx_25(D);
  _8 ={v} state_22->mbs[_7].state;
  if (_8 != 0)
    goto <bb 12>; [52.23%]
  else
    goto <bb 8>; [47.77%]

  <bb 8> [local count: 16670]:
  # DEBUG BEGIN_STMT
  _9 = (long unsigned int) mb_idx_25(D);
  FlexCAN_ClearMsgBuffIntStatusFlag (base_23, _9);
  # DEBUG BEGIN_STMT
  state_22->mbs[_7].state ={v} 2;
  # DEBUG BEGIN_STMT
  state_22->mbs[_7].time_stamp = 0;
  # DEBUG BEGIN_STMT
  _10 = tx_info_24(D)->is_polling;
  state_22->mbs[_7].isPolling = _10;
  # DEBUG BEGIN_STMT
  _11 = tx_info_24(D)->is_remote;
  state_22->mbs[_7].isRemote = _11;
  # DEBUG BEGIN_STMT
  _12 = tx_info_24(D)->data_length;
  cs.dataLen = _12;
  # DEBUG BEGIN_STMT
  _13 = tx_info_24(D)->msg_id_type;
  cs.msgIdType = _13;
  # DEBUG BEGIN_STMT
  _14 = tx_info_24(D)->fd_enable;
  cs.fd_enable = _14;
  # DEBUG BEGIN_STMT
  _15 = tx_info_24(D)->fd_padding;
  cs.fd_padding = _15;
  # DEBUG BEGIN_STMT
  _16 = tx_info_24(D)->enable_brs;
  cs.enable_brs = _16;
  # DEBUG BEGIN_STMT
  if (_11 != 0)
    goto <bb 9>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 9> [local count: 8335]:
  # DEBUG BEGIN_STMT
  cs.code = 28;
  goto <bb 11>; [100.00%]

  <bb 10> [local count: 8335]:
  # DEBUG BEGIN_STMT
  cs.code = 12;

  <bb 11> [local count: 16670]:
  # DEBUG BEGIN_STMT
  FlexCAN_SetTxMsgBuff (base_23, _9, &cs, msg_id_39(D), mb_data_40(D), 0);

  <bb 12> [local count: 53687]:
  # eResult_17 = PHI <4(6), 2(7), 0(11)>
  # DEBUG eResult => eResult_17
  # DEBUG BEGIN_STMT
  cs ={v} {CLOBBER};
  return eResult_17;

}


FlexCAN_StartRxMessageBufferData (uint8 instance, uint8 mb_idx, struct Flexcan_Ip_MsgBuffType * data, boolean isPolling)
{
  volatile boolean x;
  struct Flexcan_Ip_StateType * state;
  const struct FLEXCAN_Type * base;
  Flexcan_Ip_StatusType result;
  int _1;
  _Bool _2;
  _Bool _3;
  long unsigned int _4;
  _Bool _5;
  int _6;
  <unnamed type> _7;
  _Bool x.0_21;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG result => 0
  # DEBUG BEGIN_STMT
  _1 = (int) instance_10(D);
  base_12 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_12
  # DEBUG BEGIN_STMT
  state_13 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_13
  # DEBUG BEGIN_STMT
  _2 = instance_10(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_21 ={v} x;
  if (x.0_21 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 8> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 9> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 = state_13->bIsLegacyFifoEn;
  _4 = state_13->u32MaxMbNum;
  _5 = FlexCAN_IsMbOutOfRange (base_12, mb_idx_14(D), _3, _4);
  if (_5 != 0)
    goto <bb 7>; [35.00%]
  else
    goto <bb 5>; [65.00%]

  <bb 5> [local count: 69793]:
  # DEBUG BEGIN_STMT
  _6 = (int) mb_idx_14(D);
  _7 ={v} state_13->mbs[_6].state;
  if (_7 != 0)
    goto <bb 7>; [35.00%]
  else
    goto <bb 6>; [65.00%]

  <bb 6> [local count: 45366]:
  # DEBUG BEGIN_STMT
  state_13->mbs[_6].state ={v} 1;
  # DEBUG BEGIN_STMT
  state_13->mbs[_6].pMBmessage = data_17(D);
  # DEBUG BEGIN_STMT
  state_13->mbs[_6].isPolling = isPolling_19(D);

  <bb 7> [local count: 107374]:
  # result_8 = PHI <4(4), 2(5), 0(6)>
  # DEBUG result => result_8
  # DEBUG BEGIN_STMT
  return result_8;

}


FlexCAN_ProccessLegacyRxFIFO (uint8 u8Instance, uint32 u32TimeoutMs)
{
  uint32 u32intType;
  uint32 mS2Ticks;
  uint32 timeElapsed;
  uint32 timeStart;
  struct FLEXCAN_Type * pBase;
  struct Flexcan_Ip_StateType * pState;
  Flexcan_Ip_StatusType eResult;
  int _1;
  long unsigned int _2;
  long unsigned int _3;
  <unnamed type> _4;
  unsigned char _5;
  <unnamed type> _6;
  <unnamed type> _7;
  _Bool _8;
  _Bool _9;
  _Bool _10;
  <unnamed type> _11;
  long unsigned int _37;

  <bb 2> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  # DEBUG eResult => 0
  # DEBUG BEGIN_STMT
  _1 = (int) u8Instance_23(D);
  pState_25 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG pState => pState_25
  # DEBUG BEGIN_STMT
  pBase_26 = g_Flexcan_Ip_aBase[_1];
  # DEBUG pBase => pBase_26
  # DEBUG BEGIN_STMT
  timeStart = 0;
  # DEBUG BEGIN_STMT
  # DEBUG timeElapsed => 0
  # DEBUG BEGIN_STMT
  _2 = u32TimeoutMs_28(D) * 1000;
  mS2Ticks_30 = OsIf_MicrosToTicks (_2, 0);
  # DEBUG mS2Ticks => mS2Ticks_30
  # DEBUG BEGIN_STMT
  # DEBUG u32intType => 0
  # DEBUG BEGIN_STMT
  _3 = OsIf_GetCounter (0);
  timeStart = _3;
  # DEBUG BEGIN_STMT
  goto <bb 9>; [100.00%]

  <bb 3> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _4 = pState_25->transferType;
  if (_4 == 1)
    goto <bb 17>; [16.00%]
  else
    goto <bb 8>; [84.00%]

  <bb 17> [local count: 162349764]:
  goto <bb 7>; [100.00%]

  <bb 4> [local count: 487049291]:
  # DEBUG BEGIN_STMT
  _5 = FlexCAN_GetBuffStatusFlag (pBase_26, u32intType_15);
  if (_5 != 0)
    goto <bb 5>; [33.00%]
  else
    goto <bb 6>; [67.00%]

  <bb 5> [local count: 160726266]:
  # DEBUG BEGIN_STMT
  FlexCAN_IRQHandlerRxFIFO (u8Instance_23(D), u32intType_15);

  <bb 6> [local count: 487049291]:
  # DEBUG BEGIN_STMT
  u32intType_35 = u32intType_15 + 4294967295;
  # DEBUG u32intType => u32intType_35

  <bb 7> [local count: 649399056]:
  # u32intType_15 = PHI <u32intType_35(6), 7(17)>
  # DEBUG u32intType => u32intType_15
  # DEBUG BEGIN_STMT
  if (u32intType_15 > 4)
    goto <bb 4>; [75.00%]
  else
    goto <bb 8>; [25.00%]

  <bb 8> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _37 = OsIf_GetElapsed (&timeStart, 0);
  timeElapsed_38 = timeElapsed_14 + _37;
  # DEBUG timeElapsed => timeElapsed_38
  # DEBUG BEGIN_STMT
  if (mS2Ticks_30 <= timeElapsed_38)
    goto <bb 10>; [5.50%]
  else
    goto <bb 18>; [94.50%]

  <bb 18> [local count: 958878293]:

  <bb 9> [local count: 1073741824]:
  # timeElapsed_14 = PHI <0(2), timeElapsed_38(18)>
  # DEBUG timeElapsed => timeElapsed_14
  # DEBUG BEGIN_STMT
  _6 ={v} pState_25->mbs[0].state;
  if (_6 == 1)
    goto <bb 3>; [94.50%]
  else
    goto <bb 10>; [5.50%]

  <bb 10> [local count: 114863532]:
  # eResult_12 = PHI <3(8), 0(9)>
  # DEBUG eResult => eResult_12
  # DEBUG BEGIN_STMT
  if (eResult_12 == 3)
    goto <bb 11>; [34.00%]
  else
    goto <bb 13>; [66.00%]

  <bb 11> [local count: 39053601]:
  _7 = pState_25->transferType;
  if (_7 != 1)
    goto <bb 12>; [48.88%]
  else
    goto <bb 13>; [51.12%]

  <bb 12> [local count: 19089400]:
  # DEBUG BEGIN_STMT
  _8 = pState_25->isIntActive;
  FlexCAN_SetMsgBuffIntCmd (pBase_26, u8Instance_23(D), 5, 0, _8);
  # DEBUG BEGIN_STMT
  _9 = pState_25->isIntActive;
  FlexCAN_SetMsgBuffIntCmd (pBase_26, u8Instance_23(D), 6, 0, _9);
  # DEBUG BEGIN_STMT
  _10 = pState_25->isIntActive;
  FlexCAN_SetMsgBuffIntCmd (pBase_26, u8Instance_23(D), 7, 0, _10);

  <bb 13> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  _11 ={v} pState_25->mbs[0].state;
  switch (_11) <default: <L18> [33.33%], case 0: <L22> [33.33%], case 1: <L16> [33.33%]>

  <bb 14> [local count: 38284015]:
<L16>:
  # DEBUG BEGIN_STMT
  pState_25->mbs[0].state ={v} 0;
  # DEBUG BEGIN_STMT
  goto <bb 16>; [100.00%]

  <bb 15> [local count: 38284015]:
<L18>:
  # DEBUG BEGIN_STMT
  # DEBUG eResult => 1
  # DEBUG BEGIN_STMT

  <bb 16> [local count: 114852045]:
  # eResult_13 = PHI <eResult_12(14), 0(13), 1(15)>
<L22>:
  # DEBUG eResult => eResult_13
  # DEBUG BEGIN_STMT
  timeStart ={v} {CLOBBER};
  return eResult_13;

}


FlexCAN_ProccessEnhancedRxFifo (uint8 u8Instance, uint32 u32TimeoutMs)
{
  uint32 u32intType;
  uint32 mS2Ticks;
  uint32 timeElapsed;
  uint32 timeStart;
  struct FLEXCAN_Type * pBase;
  struct Flexcan_Ip_StateType * pState;
  Flexcan_Ip_StatusType eResult;
  int _1;
  long unsigned int _2;
  long unsigned int _3;
  <unnamed type> _4;
  unsigned char _5;
  <unnamed type> _6;
  <unnamed type> _7;
  <unnamed type> _8;
  long unsigned int _34;
  long unsigned int _38;
  long unsigned int _39;

  <bb 2> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  # DEBUG eResult => 0
  # DEBUG BEGIN_STMT
  _1 = (int) u8Instance_20(D);
  pState_22 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG pState => pState_22
  # DEBUG BEGIN_STMT
  pBase_23 = g_Flexcan_Ip_aBase[_1];
  # DEBUG pBase => pBase_23
  # DEBUG BEGIN_STMT
  timeStart = 0;
  # DEBUG BEGIN_STMT
  # DEBUG timeElapsed => 0
  # DEBUG BEGIN_STMT
  _2 = u32TimeoutMs_25(D) * 1000;
  mS2Ticks_27 = OsIf_MicrosToTicks (_2, 0);
  # DEBUG mS2Ticks => mS2Ticks_27
  # DEBUG BEGIN_STMT
  # DEBUG u32intType => 0
  # DEBUG BEGIN_STMT
  _3 = OsIf_GetCounter (0);
  timeStart = _3;
  # DEBUG BEGIN_STMT
  goto <bb 9>; [100.00%]

  <bb 3> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _4 = pState_22->transferType;
  if (_4 == 1)
    goto <bb 17>; [16.00%]
  else
    goto <bb 8>; [84.00%]

  <bb 17> [local count: 162349764]:
  goto <bb 7>; [100.00%]

  <bb 4> [local count: 649399059]:
  # DEBUG BEGIN_STMT
  _5 = FlexCAN_GetEnhancedRxFIFOStatusFlag (pBase_23, u32intType_12);
  if (_5 != 0)
    goto <bb 5>; [33.00%]
  else
    goto <bb 6>; [67.00%]

  <bb 5> [local count: 214301689]:
  # DEBUG BEGIN_STMT
  FlexCAN_IRQHandlerEnhancedRxFIFO (u8Instance_20(D), u32intType_12);

  <bb 6> [local count: 649399059]:
  # DEBUG BEGIN_STMT
  u32intType_32 = u32intType_12 + 4294967295;
  # DEBUG u32intType => u32intType_32

  <bb 7> [local count: 811748823]:
  # u32intType_12 = PHI <u32intType_32(6), 31(17)>
  # DEBUG u32intType => u32intType_12
  # DEBUG BEGIN_STMT
  if (u32intType_12 > 27)
    goto <bb 4>; [80.00%]
  else
    goto <bb 8>; [20.00%]

  <bb 8> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _34 = OsIf_GetElapsed (&timeStart, 0);
  timeElapsed_35 = timeElapsed_11 + _34;
  # DEBUG timeElapsed => timeElapsed_35
  # DEBUG BEGIN_STMT
  if (mS2Ticks_27 <= timeElapsed_35)
    goto <bb 10>; [5.50%]
  else
    goto <bb 18>; [94.50%]

  <bb 18> [local count: 958878293]:

  <bb 9> [local count: 1073741824]:
  # timeElapsed_11 = PHI <0(2), timeElapsed_35(18)>
  # DEBUG timeElapsed => timeElapsed_11
  # DEBUG BEGIN_STMT
  _6 ={v} pState_22->enhancedFifoOutput.state;
  if (_6 == 1)
    goto <bb 3>; [94.50%]
  else
    goto <bb 10>; [5.50%]

  <bb 10> [local count: 114863532]:
  # eResult_9 = PHI <3(8), 0(9)>
  # DEBUG eResult => eResult_9
  # DEBUG BEGIN_STMT
  if (eResult_9 == 3)
    goto <bb 11>; [34.00%]
  else
    goto <bb 13>; [66.00%]

  <bb 11> [local count: 39053601]:
  _7 = pState_22->transferType;
  if (_7 != 1)
    goto <bb 12>; [66.00%]
  else
    goto <bb 13>; [34.00%]

  <bb 12> [local count: 25775377]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_23
  # DEBUG enable => 0
  # DEBUG INLINE_ENTRY FlexCAN_SetEnhancedRxFifoIntAll
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _38 ={v} pBase_23->ERFIER;
  _39 = _38 & 268435455;
  pBase_23->ERFIER ={v} _39;

  <bb 13> [local count: 114863532]:
  # DEBUG base => NULL
  # DEBUG enable => NULL
  # DEBUG BEGIN_STMT
  _8 ={v} pState_22->enhancedFifoOutput.state;
  switch (_8) <default: <L18> [33.33%], case 0: <L22> [33.33%], case 1: <L16> [33.33%]>

  <bb 14> [local count: 38284015]:
<L16>:
  # DEBUG BEGIN_STMT
  pState_22->enhancedFifoOutput.state ={v} 0;
  # DEBUG BEGIN_STMT
  goto <bb 16>; [100.00%]

  <bb 15> [local count: 38284015]:
<L18>:
  # DEBUG BEGIN_STMT
  # DEBUG eResult => 1
  # DEBUG BEGIN_STMT

  <bb 16> [local count: 114852045]:
  # eResult_10 = PHI <eResult_9(14), 0(13), 1(15)>
<L22>:
  # DEBUG eResult => eResult_10
  # DEBUG BEGIN_STMT
  timeStart ={v} {CLOBBER};
  return eResult_10;

}


FlexCAN_StartRxMessageEnhancedFifoData (uint8 instance, struct Flexcan_Ip_MsgBuffType * data)
{
  volatile boolean x;
  Flexcan_Ip_StatusType eResult;
  struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * base;
  int _1;
  _Bool _2;
  <unnamed type> _3;
  <unnamed type> _4;
  _Bool _5;
  _Bool x.0_18;
  long unsigned int _19;
  long unsigned int _20;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_9(D);
  base_11 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_11
  # DEBUG BEGIN_STMT
  state_12 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_12
  # DEBUG BEGIN_STMT
  # DEBUG eResult => 0
  # DEBUG BEGIN_STMT
  _2 = instance_9(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_18 ={v} x;
  if (x.0_18 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 11>; [50.00%]

  <bb 11> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 12> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 ={v} state_12->enhancedFifoOutput.state;
  if (_3 == 1)
    goto <bb 10>; [21.72%]
  else
    goto <bb 5>; [78.28%]

  <bb 5> [local count: 84052]:
  # DEBUG BEGIN_STMT
  state_12->enhancedFifoOutput.state ={v} 1;
  # DEBUG BEGIN_STMT
  state_12->enhancedFifoOutput.pMBmessage = data_14(D);
  # DEBUG BEGIN_STMT
  _4 = state_12->transferType;
  if (_4 == 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 6> [local count: 42026]:
  # DEBUG BEGIN_STMT
  state_12->enhancedFifoOutput.isPolling = 0;
  # DEBUG BEGIN_STMT
  _5 = state_12->isIntActive;
  if (_5 != 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 21013]:
  # DEBUG BEGIN_STMT
  # DEBUG base => base_11
  # DEBUG enable => 1
  # DEBUG INLINE_ENTRY FlexCAN_SetEnhancedRxFifoIntAll
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _19 ={v} base_11->ERFIER;
  _20 = _19 | 4026531840;
  base_11->ERFIER ={v} _20;

  <bb 8> [local count: 84052]:
  # DEBUG base => NULL
  # DEBUG enable => NULL
  # DEBUG BEGIN_STMT
  if (_4 == 1)
    goto <bb 9>; [34.00%]
  else
    goto <bb 10>; [66.00%]

  <bb 9> [local count: 28578]:
  # DEBUG BEGIN_STMT
  state_12->enhancedFifoOutput.isPolling = 1;

  <bb 10> [local count: 107374]:
  # eResult_6 = PHI <2(4), 0(8), 0(9)>
  # DEBUG eResult => eResult_6
  # DEBUG BEGIN_STMT
  return eResult_6;

}


FlexCAN_CompleteRxMessageEnhancedFifoData (uint8 instance)
{
  volatile boolean x;
  volatile boolean x;
  struct Flexcan_Ip_StateType * state;
  struct FLEXCAN_Type * base;
  int _1;
  _Bool _2;
  _Bool _3;
  _Bool _4;
  _Bool x.0_14;
  _Bool x.0_15;
  long unsigned int _16;
  long unsigned int _17;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = (int) instance_6(D);
  base_8 = g_Flexcan_Ip_aBase[_1];
  # DEBUG base => base_8
  # DEBUG BEGIN_STMT
  state_9 = g_flexcan_Ip_StatePtr[_1];
  # DEBUG state => state_9
  # DEBUG BEGIN_STMT
  _2 = instance_6(D) <= 5;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_15 ={v} x;
  if (x.0_15 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 10> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 12> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _3 = FlexCAN_IsEnhancedRxFifoAvailable (base_8);
  x ={v} _3;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_14 ={v} x;
  if (x.0_14 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 9> [local count: 53687]:

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 11> [local count: 536870913]:
  goto <bb 5>; [100.00%]

  <bb 6> [local count: 53687]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _4 = state_9->enhancedFifoOutput.isPolling;
  if (_4 != 0)
    goto <bb 8>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 7> [local count: 26844]:
  # DEBUG BEGIN_STMT
  state_9->enhancedFifoOutput.isPolling = 1;
  # DEBUG BEGIN_STMT
  # DEBUG base => base_8
  # DEBUG enable => 0
  # DEBUG INLINE_ENTRY FlexCAN_SetEnhancedRxFifoIntAll
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _16 ={v} base_8->ERFIER;
  _17 = _16 & 268435455;
  base_8->ERFIER ={v} _17;

  <bb 8> [local count: 53687]:
  # DEBUG base => NULL
  # DEBUG enable => NULL
  # DEBUG BEGIN_STMT
  state_9->enhancedFifoOutput.pMBmessage = 0B;
  # DEBUG BEGIN_STMT
  state_9->enhancedFifoOutput.state ={v} 0;
  return;

}


FlexCAN_InitController (struct FLEXCAN_Type * pBase, const struct Flexcan_Ip_ConfigType * Flexcan_Ip_pData)
{
  Flexcan_Ip_StatusType eResult;
  long unsigned int _1;
  long unsigned int _2;
  _Bool _3;
  _Bool _4;
  long unsigned int _5;
  <unnamed type> _6;
  const struct Flexcan_Ip_PayloadSizeType * _7;
  long unsigned int _8;
  long unsigned int _40;
  signed int _41;
  long unsigned int _42;
  long unsigned int _43;
  long unsigned int _44;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG eResult => 0
  # DEBUG BEGIN_STMT
  # DEBUG pBase => pBase_15(D)
  # DEBUG INLINE_ENTRY FlexCAN_IsEnabled
  # DEBUG BEGIN_STMT
  _40 ={v} MEM[(const struct FLEXCAN_Type *)pBase_15(D)].MCR;
  _41 = (signed int) _40;
  # DEBUG pBase => NULL
  if (_41 >= 0)
    goto <bb 4>; [59.00%]
  else
    goto <bb 7>; [41.00%]

  <bb 4> [local count: 633507676]:
  # DEBUG BEGIN_STMT
  eResult_17 = FlexCAN_EnterFreezeMode (pBase_15(D));
  # DEBUG eResult => eResult_17
  # DEBUG BEGIN_STMT
  if (eResult_17 == 0)
    goto <bb 5>; [33.00%]
  else
    goto <bb 6>; [67.00%]

  <bb 5> [local count: 209057533]:
  # DEBUG BEGIN_STMT
  eResult_19 = FlexCAN_Disable (pBase_15(D));
  # DEBUG eResult => eResult_19

  <bb 6> [local count: 633507676]:
  # eResult_9 = PHI <eResult_19(5), eResult_17(4)>
  # DEBUG eResult => eResult_9
  # DEBUG BEGIN_STMT
  if (eResult_9 == 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 15>; [50.00%]

  <bb 7> [local count: 756987986]:
  # DEBUG eResult => NULL
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_00 ();
  # DEBUG BEGIN_STMT
  _1 ={v} pBase_15(D)->MCR;
  _2 = _1 & 2147483647;
  pBase_15(D)->MCR ={v} _2;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_00 ();
  # DEBUG BEGIN_STMT
  eResult_24 = FlexCAN_Init (pBase_15(D));
  # DEBUG eResult => eResult_24
  # DEBUG BEGIN_STMT
  if (eResult_24 != 0)
    goto <bb 8>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 8> [local count: 378493993]:
  # DEBUG BEGIN_STMT
  FlexCAN_EnterFreezeMode (pBase_15(D));
  # DEBUG BEGIN_STMT
  FlexCAN_Disable (pBase_15(D));
  goto <bb 15>; [100.00%]

  <bb 9> [local count: 378493993]:
  # DEBUG BEGIN_STMT
  FlexCAN_DisableMemErrorDetection (pBase_15(D));
  # DEBUG BEGIN_STMT
  _3 = Flexcan_Ip_pData_26(D)->fd_enable;
  _4 = Flexcan_Ip_pData_26(D)->bitRateSwitch;
  FlexCAN_SetFDEnabled (pBase_15(D), _3, _4);
  # DEBUG BEGIN_STMT
  _5 = Flexcan_Ip_pData_26(D)->ctrlOptions;
  FlexCAN_ConfigCtrlOptions (pBase_15(D), _5);
  # DEBUG BEGIN_STMT
  _6 = Flexcan_Ip_pData_26(D)->flexcanMode;
  if (_6 != 2)
    goto <bb 10>; [66.00%]
  else
    goto <bb 11>; [34.00%]

  <bb 10> [local count: 249806035]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_15(D)
  # DEBUG enable => 0
  # DEBUG INLINE_ENTRY FlexCAN_SetSelfReception
  # DEBUG BEGIN_STMT
  _42 ={v} pBase_15(D)->MCR;
  _43 = _42 & 4294836223;
  _44 = _43 | 131072;
  pBase_15(D)->MCR ={v} _44;

  <bb 11> [local count: 378493993]:
  # DEBUG base => NULL
  # DEBUG enable => NULL
  # DEBUG BEGIN_STMT
  eResult_30 = FlexCAN_InitRxFifo (pBase_15(D), Flexcan_Ip_pData_26(D));
  # DEBUG eResult => eResult_30
  # DEBUG BEGIN_STMT
  if (eResult_30 != 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 12> [local count: 189246996]:
  # DEBUG BEGIN_STMT
  FlexCAN_EnterFreezeMode (pBase_15(D));
  # DEBUG BEGIN_STMT
  FlexCAN_Disable (pBase_15(D));
  goto <bb 15>; [100.00%]

  <bb 13> [local count: 189246996]:
  # DEBUG BEGIN_STMT
  _7 = &Flexcan_Ip_pData_26(D)->payload;
  FlexCAN_SetPayloadSize (pBase_15(D), _7);
  # DEBUG BEGIN_STMT
  _8 = Flexcan_Ip_pData_26(D)->max_num_mb;
  eResult_33 = FlexCAN_SetMaxMsgBuffNum (pBase_15(D), _8);
  # DEBUG eResult => eResult_33
  # DEBUG BEGIN_STMT
  if (eResult_33 != 0)
    goto <bb 14>; [33.00%]
  else
    goto <bb 15>; [67.00%]

  <bb 14> [local count: 62451509]:
  # DEBUG BEGIN_STMT
  FlexCAN_EnterFreezeMode (pBase_15(D));
  # DEBUG BEGIN_STMT
  FlexCAN_Disable (pBase_15(D));

  <bb 15> [local count: 1073741824]:
  # eResult_10 = PHI <eResult_9(6), eResult_24(8), eResult_30(12), eResult_33(13), eResult_33(14)>
  # DEBUG eResult => eResult_10
  # DEBUG BEGIN_STMT
  return eResult_10;

}


FlexCAN_InitRxFifo (struct FLEXCAN_Type * pBase, const struct Flexcan_Ip_ConfigType * Flexcan_Ip_pData)
{
  Flexcan_Ip_StatusType eResult;
  _Bool _1;
  <unnamed type> _2;
  long unsigned int _3;
  _Bool _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG eResult => 0
  # DEBUG BEGIN_STMT
  _1 = Flexcan_Ip_pData_11(D)->is_rx_fifo_needed;
  if (_1 != 0)
    goto <bb 4>; [33.00%]
  else
    goto <bb 5>; [67.00%]

  <bb 4> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  _2 = Flexcan_Ip_pData_11(D)->num_id_filters;
  _3 = (long unsigned int) _2;
  eResult_14 = FlexCAN_EnableRxFifo (pBase_12(D), _3);
  # DEBUG eResult => eResult_14
  # DEBUG BEGIN_STMT
  if (eResult_14 == 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 5> [local count: 896574424]:
  # eResult_17 = PHI <eResult_14(4), 0(2)>
  # DEBUG eResult => NULL
  _4 = Flexcan_Ip_pData_11(D)->is_enhanced_rx_fifo_needed;
  if (_4 != 0)
    goto <bb 6>; [33.00%]
  else
    goto <bb 7>; [67.00%]

  <bb 6> [local count: 295869560]:
  # DEBUG BEGIN_STMT
  _5 = Flexcan_Ip_pData_11(D)->num_enhanced_std_id_filters;
  _6 = Flexcan_Ip_pData_11(D)->num_enhanced_ext_id_filters;
  _7 = Flexcan_Ip_pData_11(D)->num_enhanced_watermark;
  eResult_16 = FlexCAN_EnableEnhancedRxFifo (pBase_12(D), _5, _6, _7);
  # DEBUG eResult => eResult_16

  <bb 7> [local count: 1073741824]:
  # eResult_8 = PHI <eResult_14(4), eResult_17(5), eResult_16(6)>
  # DEBUG eResult => eResult_8
  # DEBUG BEGIN_STMT
  return eResult_8;

}


FlexCAN_SetRegDefaultVal (struct FLEXCAN_Type * base)
{
  _Bool _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = FlexCAN_IsEnhancedRxFifoAvailable (base_16(D));
  if (_1 != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  base_16(D)->ERFSR ={v} 4160749568;
  # DEBUG BEGIN_STMT
  base_16(D)->ERFIER ={v} 0;
  # DEBUG BEGIN_STMT
  base_16(D)->ERFCR ={v} 0;

  <bb 4> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  base_16(D)->FDCBT ={v} 0;
  # DEBUG BEGIN_STMT
  base_16(D)->FDCTRL ={v} 2147500288;
  # DEBUG BEGIN_STMT
  base_16(D)->ERRSR ={v} 851981;
  # DEBUG BEGIN_STMT
  base_16(D)->ERRIPPR ={v} 0;
  # DEBUG BEGIN_STMT
  base_16(D)->ERRIDPR ={v} 0;
  # DEBUG BEGIN_STMT
  base_16(D)->ERRIAR ={v} 0;
  # DEBUG BEGIN_STMT
  _2 ={v} base_16(D)->CTRL2;
  _3 = _2 | 536870912;
  base_16(D)->CTRL2 ={v} _3;
  # DEBUG BEGIN_STMT
  _4 ={v} base_16(D)->MECR;
  _5 = _4 & 2147483647;
  base_16(D)->MECR ={v} _5;
  # DEBUG BEGIN_STMT
  base_16(D)->MECR ={v} 786560;
  # DEBUG BEGIN_STMT
  _6 ={v} base_16(D)->MECR;
  _7 = _6 | 2147483648;
  base_16(D)->MECR ={v} _7;
  # DEBUG BEGIN_STMT
  _8 ={v} base_16(D)->CTRL2;
  _9 = _8 & 3758096383;
  base_16(D)->CTRL2 ={v} _9;
  # DEBUG BEGIN_STMT
  _10 = FlexCAN_GetMaxMbNum (base_16(D));
  if (_10 > 64)
    goto <bb 5>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  base_16(D)->IFLAG3 ={v} 4294967295;
  # DEBUG BEGIN_STMT
  base_16(D)->IMASK3 ={v} 0;

  <bb 6> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _11 = FlexCAN_GetMaxMbNum (base_16(D));
  if (_11 > 32)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  base_16(D)->IFLAG2 ={v} 4294967295;
  # DEBUG BEGIN_STMT
  base_16(D)->IMASK2 ={v} 0;

  <bb 8> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  base_16(D)->IFLAG1 ={v} 4294967295;
  # DEBUG BEGIN_STMT
  base_16(D)->IMASK1 ={v} 0;
  # DEBUG BEGIN_STMT
  base_16(D)->CBT ={v} 0;
  # DEBUG BEGIN_STMT
  base_16(D)->CTRL2 ={v} 1048576;
  # DEBUG BEGIN_STMT
  base_16(D)->ESR1 ={v} 241670;
  # DEBUG BEGIN_STMT
  base_16(D)->ECR ={v} 0;
  # DEBUG BEGIN_STMT
  base_16(D)->TIMER ={v} 0;
  # DEBUG BEGIN_STMT
  base_16(D)->CTRL1 ={v} 0;
  # DEBUG BEGIN_STMT
  base_16(D)->EPRS ={v} 0;
  # DEBUG BEGIN_STMT
  base_16(D)->ENCBT ={v} 0;
  # DEBUG BEGIN_STMT
  base_16(D)->EDCBT ={v} 0;
  # DEBUG BEGIN_STMT
  base_16(D)->ETDC ={v} 0;
  # DEBUG BEGIN_STMT
  base_16(D)->MCR ={v} 3633315855;
  return;

}


FlexCAN_GetEnhancedRxFIFOIntStatusFlag (const struct FLEXCAN_Type * base, uint32 intFlag)
{
  long unsigned int _1;
  int _2;
  int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  uint8 _10;
  long unsigned int _11;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 ={v} base_8(D)->ERFIER;
  _11 = intFlag_9(D) & 255;
  _2 = (int) _11;
  _3 = _2 & 31;
  _4 = 1 << _3;
  _5 = _1 & _4;
  _6 = _5 >> _3;
  _10 = (uint8) _6;
  return _10;

}


FlexCAN_GetEnhancedRxFIFOStatusFlag (const struct FLEXCAN_Type * base, uint32 intFlag)
{
  long unsigned int _1;
  int _2;
  int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  uint8 _10;
  long unsigned int _11;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 ={v} base_8(D)->ERFSR;
  _11 = intFlag_9(D) & 255;
  _2 = (int) _11;
  _3 = _2 & 31;
  _4 = 1 << _3;
  _5 = _1 & _4;
  _6 = _5 >> _3;
  _10 = (uint8) _6;
  return _10;

}


FlexCAN_SetRxMaskType (struct FLEXCAN_Type * base, Flexcan_Ip_RxMaskType type)
{
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  if (type_6(D) == 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  _1 ={v} base_8(D)->MCR;
  _2 = _1 & 4294901759;
  base_8(D)->MCR ={v} _2;
  goto <bb 5>; [100.00%]

  <bb 4> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  _3 ={v} base_8(D)->MCR;
  _4 = _3 | 65536;
  base_8(D)->MCR ={v} _4;

  <bb 5> [local count: 1073741824]:
  return;

}


FlexCAN_SetTxArbitrationStartDelay (struct FLEXCAN_Type * base, uint8 tasd)
{
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 ={v} base_8(D)->CTRL2;
  _2 = _1 & 4278714367;
  _3 = (long unsigned int) tasd_9(D);
  _4 = _3 << 19;
  _5 = _4 & 16252928;
  _6 = _2 | _5;
  base_8(D)->CTRL2 ={v} _6;
  return;

}


FlexCAN_GetMsgBuffIntStatusFlag (const struct FLEXCAN_Type * base, uint32 msgBuffIdx)
{
  uint32 mask;
  uint8 flag;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  unsigned char _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  unsigned char _10;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG flag => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (msgBuffIdx_13(D) <= 31)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  mask_18 ={v} base_15(D)->IMASK1;
  # DEBUG mask => mask_18
  # DEBUG BEGIN_STMT
  _1 ={v} base_15(D)->IFLAG1;
  _2 = _1 & mask_18;
  _3 = msgBuffIdx_13(D);
  _4 = _2 >> _3;
  _5 = (unsigned char) _4;
  flag_19 = _5 & 1;
  # DEBUG flag => flag_19
  goto <bb 8>; [100.00%]

  <bb 4> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  if (msgBuffIdx_13(D) <= 63)
    goto <bb 5>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 5> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  mask_16 ={v} base_15(D)->IMASK2;
  # DEBUG mask => mask_16
  # DEBUG BEGIN_STMT
  _6 ={v} base_15(D)->IFLAG2;
  _7 = _6 & mask_16;
  _8 = msgBuffIdx_13(D) & 31;
  _9 = _7 >> _8;
  _10 = (unsigned char) _9;
  flag_17 = _10 & 1;
  # DEBUG flag => flag_17
  goto <bb 8>; [100.00%]

  <bb 6> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  if (msgBuffIdx_13(D) <= 95)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 134217728]:
  flag_20 = FlexCAN_GetMsgBuffIntStatusFlag.part.0 (base_15(D), msgBuffIdx_13(D));

  <bb 8> [local count: 1073741824]:
  # flag_11 = PHI <flag_19(3), flag_17(5), 0(6), flag_20(7)>
  # DEBUG flag => flag_11
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  return flag_11;

}


RxFifoOcuppiedLastMsgBuff (uint32 x)
{
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  uint32 _5;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = x_4(D) + 1;
  _2 = _1 * 8;
  _3 = _2 >> 2;
  _5 = _3 + 5;
  return _5;

}


FlexCAN_EnhCbtEnable (struct FLEXCAN_Type * base, boolean enableCBT)
{
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int iftmp.6_4;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 ={v} base_6(D)->CTRL2;
  _2 = _1 & 4294959103;
  if (enableCBT_7(D) != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 536870913]:

  <bb 4> [local count: 1073741824]:
  # iftmp.6_4 = PHI <8192(2), 0(3)>
  _3 = _2 | iftmp.6_4;
  base_6(D)->CTRL2 ={v} _3;
  return;

}


FlexCAN_EnableExtCbt (struct FLEXCAN_Type * base, boolean enableCBT)
{
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int iftmp.4_4;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 ={v} base_6(D)->CBT;
  _2 = _1 & 2147483647;
  if (enableCBT_7(D) != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 536870913]:

  <bb 4> [local count: 1073741824]:
  # iftmp.4_4 = PHI <2147483648(2), 0(3)>
  _3 = _2 | iftmp.4_4;
  base_6(D)->CBT ={v} _3;
  return;

}


FlexCAN_GetFDTimeSegments (const struct FLEXCAN_Type * base, struct Flexcan_Ip_TimeSegmentType * timeSeg)
{
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 ={v} base_16(D)->FDCBT;
  _2 = _1 >> 20;
  _3 = _2 & 1023;
  timeSeg_17(D)->preDivider = _3;
  # DEBUG BEGIN_STMT
  _4 ={v} base_16(D)->FDCBT;
  _5 = _4 >> 10;
  _6 = _5 & 31;
  timeSeg_17(D)->propSeg = _6;
  # DEBUG BEGIN_STMT
  _7 ={v} base_16(D)->FDCBT;
  _8 = _7 >> 5;
  _9 = _8 & 7;
  timeSeg_17(D)->phaseSeg1 = _9;
  # DEBUG BEGIN_STMT
  _10 ={v} base_16(D)->FDCBT;
  _11 = _10 & 7;
  timeSeg_17(D)->phaseSeg2 = _11;
  # DEBUG BEGIN_STMT
  _12 ={v} base_16(D)->FDCBT;
  _13 = _12 >> 16;
  _14 = _13 & 7;
  timeSeg_17(D)->rJumpwidth = _14;
  return;

}


FlexCAN_GetTimeSegments (const struct FLEXCAN_Type * base, struct Flexcan_Ip_TimeSegmentType * timeSeg)
{
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 ={v} base_15(D)->CTRL1;
  _2 = _1 >> 24;
  timeSeg_16(D)->preDivider = _2;
  # DEBUG BEGIN_STMT
  _3 ={v} base_15(D)->CTRL1;
  _4 = _3 & 7;
  timeSeg_16(D)->propSeg = _4;
  # DEBUG BEGIN_STMT
  _5 ={v} base_15(D)->CTRL1;
  _6 = _5 >> 19;
  _7 = _6 & 7;
  timeSeg_16(D)->phaseSeg1 = _7;
  # DEBUG BEGIN_STMT
  _8 ={v} base_15(D)->CTRL1;
  _9 = _8 >> 16;
  _10 = _9 & 7;
  timeSeg_16(D)->phaseSeg2 = _10;
  # DEBUG BEGIN_STMT
  _11 ={v} base_15(D)->CTRL1;
  _12 = _11 >> 22;
  _13 = _12 & 3;
  timeSeg_16(D)->rJumpwidth = _13;
  return;

}


FlexCAN_GetExtendedTimeSegments (const struct FLEXCAN_Type * base, struct Flexcan_Ip_TimeSegmentType * timeSeg)
{
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 ={v} base_16(D)->CBT;
  _2 = _1 >> 21;
  _3 = _2 & 1023;
  timeSeg_17(D)->preDivider = _3;
  # DEBUG BEGIN_STMT
  _4 ={v} base_16(D)->CBT;
  _5 = _4 >> 10;
  _6 = _5 & 63;
  timeSeg_17(D)->propSeg = _6;
  # DEBUG BEGIN_STMT
  _7 ={v} base_16(D)->CBT;
  _8 = _7 >> 5;
  _9 = _8 & 31;
  timeSeg_17(D)->phaseSeg1 = _9;
  # DEBUG BEGIN_STMT
  _10 ={v} base_16(D)->CBT;
  _11 = _10 & 31;
  timeSeg_17(D)->phaseSeg2 = _11;
  # DEBUG BEGIN_STMT
  _12 ={v} base_16(D)->CBT;
  _13 = _12 >> 16;
  _14 = _13 & 31;
  timeSeg_17(D)->rJumpwidth = _14;
  return;

}


FlexCAN_GetEnhancedDataTimeSegments (const struct FLEXCAN_Type * base, struct Flexcan_Ip_TimeSegmentType * timeSeg)
{
  volatile boolean x;
  _Bool _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  _Bool x.0_21;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = timeSeg_13(D) != 0B;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_21 ={v} x;
  if (x.0_21 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 5> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 6> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  timeSeg_13(D)->propSeg = 0;
  # DEBUG BEGIN_STMT
  _2 ={v} base_16(D)->EDCBT;
  _3 = _2 & 31;
  timeSeg_13(D)->phaseSeg1 = _3;
  # DEBUG BEGIN_STMT
  _4 ={v} base_16(D)->EDCBT;
  _5 = _4 >> 12;
  _6 = _5 & 15;
  timeSeg_13(D)->phaseSeg2 = _6;
  # DEBUG BEGIN_STMT
  _7 ={v} base_16(D)->EDCBT;
  _8 = _7 >> 22;
  _9 = _8 & 15;
  timeSeg_13(D)->rJumpwidth = _9;
  # DEBUG BEGIN_STMT
  _10 ={v} base_16(D)->EPRS;
  _11 = _10 >> 16;
  _12 = _11 & 1023;
  timeSeg_13(D)->preDivider = _12;
  return;

}


FlexCAN_SetEnhancedDataTimeSegments (struct FLEXCAN_Type * base, const struct Flexcan_Ip_TimeSegmentType * timeSeg)
{
  volatile boolean x;
  _Bool _1;
  _Bool x.0_6;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = timeSeg_2(D) != 0B;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_6 ={v} x;
  if (x.0_6 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 5> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 6> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  FlexCAN_SetEnhancedDataTimeSegments.part.0 (base_5(D), timeSeg_2(D));
  return;

}


FlexCAN_GetEnhancedNominalTimeSegments (const struct FLEXCAN_Type * base, struct Flexcan_Ip_TimeSegmentType * timeSeg)
{
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  timeSeg_12(D)->propSeg = 0;
  # DEBUG BEGIN_STMT
  _1 ={v} base_14(D)->EPRS;
  _2 = _1 & 1023;
  timeSeg_12(D)->preDivider = _2;
  # DEBUG BEGIN_STMT
  _3 ={v} base_14(D)->ENCBT;
  _4 = _3 & 255;
  timeSeg_12(D)->phaseSeg1 = _4;
  # DEBUG BEGIN_STMT
  _5 ={v} base_14(D)->ENCBT;
  _6 = _5 >> 12;
  _7 = _6 & 127;
  timeSeg_12(D)->phaseSeg2 = _7;
  # DEBUG BEGIN_STMT
  _8 ={v} base_14(D)->ENCBT;
  _9 = _8 >> 22;
  _10 = _9 & 127;
  timeSeg_12(D)->rJumpwidth = _10;
  return;

}


FlexCAN_SetEnhancedNominalTimeSegments (struct FLEXCAN_Type * base, const struct Flexcan_Ip_TimeSegmentType * timeSeg)
{
  volatile boolean x;
  _Bool _1;
  _Bool x.0_6;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = timeSeg_2(D) != 0B;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_6 ={v} x;
  if (x.0_6 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 5> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 6> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  FlexCAN_SetEnhancedNominalTimeSegments.part.0 (base_5(D), timeSeg_2(D));
  return;

}


FlexCAN_SetExtendedTimeSegments (struct FLEXCAN_Type * base, const struct Flexcan_Ip_TimeSegmentType * timeSeg)
{
  volatile boolean x;
  _Bool _1;
  _Bool x.0_6;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = timeSeg_2(D) != 0B;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_6 ={v} x;
  if (x.0_6 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 5> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 6> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  FlexCAN_SetExtendedTimeSegments.part.0 (base_5(D), timeSeg_2(D));
  return;

}


FlexCAN_SetTimeSegments (struct FLEXCAN_Type * base, const struct Flexcan_Ip_TimeSegmentType * timeSeg)
{
  volatile boolean x;
  _Bool _1;
  _Bool x.0_6;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = timeSeg_2(D) != 0B;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_6 ={v} x;
  if (x.0_6 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 5> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 6> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  FlexCAN_SetTimeSegments.part.0 (base_5(D), timeSeg_2(D));
  return;

}


FlexCAN_SetFDTimeSegments (struct FLEXCAN_Type * base, const struct Flexcan_Ip_TimeSegmentType * timeSeg)
{
  volatile boolean x;
  _Bool _1;
  _Bool x.0_6;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  _1 = timeSeg_2(D) != 0B;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.0_6 ={v} x;
  if (x.0_6 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 5> [local count: 107374]:

  <bb 3> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT

  <bb 6> [local count: 1073741824]:
  goto <bb 3>; [100.00%]

  <bb 4> [local count: 107374]:
  FlexCAN_SetFDTimeSegments.part.0 (base_5(D), timeSeg_2(D));
  return;

}


FlexCAN_GetBuffStatusImask (const struct FLEXCAN_Type * base, uint32 msgBuffIdx)
{
  uint32 u32Imask;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  uint8 _20;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG u32Imask => 0
  # DEBUG BEGIN_STMT
  if (msgBuffIdx_14(D) <= 31)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  _1 ={v} base_16(D)->IMASK1;
  _2 = msgBuffIdx_14(D);
  _3 = 1 << _2;
  _4 = _1 & _3;
  u32Imask_19 = _4 >> _2;
  # DEBUG u32Imask => u32Imask_19
  goto <bb 8>; [100.00%]

  <bb 4> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  if (msgBuffIdx_14(D) <= 63)
    goto <bb 5>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 5> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  _5 ={v} base_16(D)->IMASK2;
  _6 = msgBuffIdx_14(D) & 31;
  _7 = 1 << _6;
  _8 = _5 & _7;
  u32Imask_18 = _8 >> _6;
  # DEBUG u32Imask => u32Imask_18
  goto <bb 8>; [100.00%]

  <bb 6> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  if (msgBuffIdx_14(D) <= 95)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 134217728]:
  # DEBUG BEGIN_STMT
  _9 ={v} base_16(D)->IMASK3;
  _10 = msgBuffIdx_14(D) & 31;
  _11 = 1 << _10;
  _12 = _9 & _11;
  u32Imask_17 = _12 >> _10;
  # DEBUG u32Imask => u32Imask_17

  <bb 8> [local count: 1073741824]:
  # u32Imask_13 = PHI <u32Imask_19(3), u32Imask_18(5), 0(6), u32Imask_17(7)>
  # DEBUG u32Imask => u32Imask_13
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _20 = (uint8) u32Imask_13;
  return _20;

}


FlexCAN_GetBuffStatusFlag (const struct FLEXCAN_Type * base, uint32 msgBuffIdx)
{
  uint32 flag;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _12;
  uint8 _20;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG flag => 0
  # DEBUG BEGIN_STMT
  if (msgBuffIdx_14(D) <= 31)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  _1 ={v} base_16(D)->IFLAG1;
  _2 = msgBuffIdx_14(D);
  _3 = 1 << _2;
  _4 = _1 & _3;
  flag_19 = _4 >> _2;
  # DEBUG flag => flag_19
  goto <bb 8>; [100.00%]

  <bb 4> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  if (msgBuffIdx_14(D) <= 63)
    goto <bb 5>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 5> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  _5 ={v} base_16(D)->IFLAG2;
  _6 = msgBuffIdx_14(D) & 31;
  _7 = 1 << _6;
  _8 = _5 & _7;
  flag_18 = _8 >> _6;
  # DEBUG flag => flag_18
  goto <bb 8>; [100.00%]

  <bb 6> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  if (msgBuffIdx_14(D) <= 95)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 134217728]:
  # DEBUG BEGIN_STMT
  _9 ={v} base_16(D)->IFLAG3;
  _10 = msgBuffIdx_14(D) & 31;
  _11 = 1 << _10;
  _12 = _9 & _11;
  flag_17 = _12 >> _10;
  # DEBUG flag => flag_17

  <bb 8> [local count: 1073741824]:
  # flag_13 = PHI <flag_19(3), flag_18(5), 0(6), flag_17(7)>
  # DEBUG flag => flag_13
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _20 = (uint8) flag_13;
  return _20;

}


FlexCAN_ClearMsgBuffIntStatusFlag (struct FLEXCAN_Type * base, uint32 msgBuffIdx)
{
  uint32 flag;
  long unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = msgBuffIdx_3(D) & 31;
  flag_4 = 1 << _1;
  # DEBUG flag => flag_4
  # DEBUG BEGIN_STMT
  if (msgBuffIdx_3(D) <= 31)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  base_6(D)->IFLAG1 ={v} flag_4;
  goto <bb 8>; [100.00%]

  <bb 4> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  if (msgBuffIdx_3(D) <= 63)
    goto <bb 5>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 5> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  base_6(D)->IFLAG2 ={v} flag_4;
  goto <bb 8>; [100.00%]

  <bb 6> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  if (msgBuffIdx_3(D) <= 95)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 134217728]:
  # DEBUG BEGIN_STMT
  base_6(D)->IFLAG3 ={v} flag_4;

  <bb 8> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  return;

}


FlexCAN_SetListenOnlyMode (struct FLEXCAN_Type * base, boolean enableListenOnly)
{
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int iftmp.7_4;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 ={v} base_6(D)->CTRL1;
  _2 = _1 & 4294967287;
  if (enableListenOnly_7(D) != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 536870913]:

  <bb 4> [local count: 1073741824]:
  # iftmp.7_4 = PHI <8(2), 0(3)>
  _3 = _2 | iftmp.7_4;
  base_6(D)->CTRL1 ={v} _3;
  return;

}


FlexCAN_SetFDEnabled (struct FLEXCAN_Type * base, boolean enableFD, boolean enableBRS)
{
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int iftmp.1_9;
  long unsigned int iftmp.2_10;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 ={v} base_12(D)->MCR;
  _2 = _1 & 4294965247;
  if (enableFD_13(D) != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 536870913]:

  <bb 4> [local count: 1073741824]:
  # iftmp.1_9 = PHI <2048(2), 0(3)>
  _3 = _2 | iftmp.1_9;
  base_12(D)->MCR ={v} _3;
  # DEBUG BEGIN_STMT
  _4 ={v} base_12(D)->FDCTRL;
  _5 = _4 & 2147483647;
  if (enableBRS_15(D) != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 5> [local count: 536870913]:

  <bb 6> [local count: 1073741824]:
  # iftmp.2_10 = PHI <2147483648(4), 0(5)>
  _6 = _5 | iftmp.2_10;
  base_12(D)->FDCTRL ={v} _6;
  # DEBUG BEGIN_STMT
  _7 ={v} base_12(D)->FDCTRL;
  _8 = _7 & 4294926591;
  base_12(D)->FDCTRL ={v} _8;
  return;

}


FlexCAN_DisableMemErrorDetection (struct FLEXCAN_Type * base)
{
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 ={v} base_7(D)->CTRL2;
  _2 = _1 | 536870912;
  base_7(D)->CTRL2 ={v} _2;
  # DEBUG BEGIN_STMT
  base_7(D)->MECR ={v} 0;
  # DEBUG BEGIN_STMT
  base_7(D)->MECR ={v} 0;
  # DEBUG BEGIN_STMT
  _3 ={v} base_7(D)->MECR;
  _4 = _3 | 256;
  base_7(D)->MECR ={v} _4;
  # DEBUG BEGIN_STMT
  _5 ={v} base_7(D)->CTRL2;
  base_7(D)->CTRL2 ={v} _5;
  return;

}


FlexCAN_SetEnhancedTDCOffset (struct FLEXCAN_Type * base, boolean enable, uint8 offset)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  tmp_7 ={v} base_6(D)->ETDC;
  # DEBUG tmp => tmp_7
  # DEBUG BEGIN_STMT
  tmp_8 = tmp_7 & 2139160575;
  # DEBUG tmp => tmp_8
  # DEBUG BEGIN_STMT
  if (enable_9(D) != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  tmp_10 = tmp_8 | 2147483648;
  # DEBUG tmp => tmp_10
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) offset_11(D);
  _2 = _1 << 16;
  _3 = _2 & 8323072;
  tmp_12 = _3 | tmp_10;
  # DEBUG tmp => tmp_12

  <bb 4> [local count: 1073741824]:
  # tmp_4 = PHI <tmp_8(2), tmp_12(3)>
  # DEBUG tmp => tmp_4
  # DEBUG BEGIN_STMT
  base_6(D)->ETDC ={v} tmp_4;
  return;

}


FlexCAN_SetTDCOffset (struct FLEXCAN_Type * base, boolean enable, uint8 offset)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  tmp_7 ={v} base_6(D)->FDCTRL;
  # DEBUG tmp => tmp_7
  # DEBUG BEGIN_STMT
  tmp_8 = tmp_7 & 4294926591;
  # DEBUG tmp => tmp_8
  # DEBUG BEGIN_STMT
  if (enable_9(D) != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  tmp_10 = tmp_8 | 32768;
  # DEBUG tmp => tmp_10
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) offset_11(D);
  _2 = _1 << 8;
  _3 = _2 & 7936;
  tmp_12 = _3 | tmp_10;
  # DEBUG tmp => tmp_12

  <bb 4> [local count: 1073741824]:
  # tmp_4 = PHI <tmp_8(2), tmp_12(3)>
  # DEBUG tmp => tmp_4
  # DEBUG BEGIN_STMT
  base_6(D)->FDCTRL ={v} tmp_4;
  return;

}


