Parsed function:FlexCAN_ComputePayloadSize.part.0
Parsed function:FlexCAN_ConfigCtrlOptions
Parsed function:FlexCAN_SetEnhancedRxFifoFilter
Parsed function:FlexCAN_EnableEnhancedRxFifo
Parsed function:FlexCAN_IsEnhancedRxFifoAvailable
Parsed function:FlexCAN_IsMbOutOfRange
Parsed function:FlexCAN_GetRxFifoMask
Parsed function:FlexCAN_AbortTxMsgBuff
Parsed function:FlexCAN_GetBusOffStatusFlag
Parsed function:FlexCAN_GetErrStatusFlag
Parsed function:FlexCAN_ReadEnhancedRxFifo
Parsed function:FlexCAN_ReadRxFifo
Parsed function:FlexCAN_SetRxFifoFilter
Parsed function:FlexCAN_SetOperationMode
Parsed function:FlexCAN_SetMaxMsgBuffNum
Parsed function:FlexCAN_SetTxMsgBuff
Parsed function:FlexCAN_GetMsgBuff
Parsed function:FlexCAN_GetMsgBuffTimestamp
Parsed function:FlexCAN_SetRxMsgBuff
Parsed function:FlexCAN_EnableInterrupts
Parsed function:FlexCAN_DisableInterrupts
Parsed function:FLEXCAN_ClearMsgBuffIntCmd
Parsed function:FlexCAN_SetMsgBuffIntCmd
Parsed function:FlexCAN_LockRxMsgBuff
Parsed function:FlexCAN_GetMbPayloadSize
Parsed function:FlexCAN_GetPayloadSize
Parsed function:FlexCAN_SetPayloadSize
Parsed function:FlexCAN_EnableRxFifo
Parsed function:FlexCAN_Init
Parsed function:FlexCAN_SetErrIntCmd
Parsed function:FlexCAN_Disable
Parsed function:FlexCAN_ExitFreezeMode
Parsed function:FlexCAN_Enable
Parsed function:FlexCAN_EnterFreezeMode
Parsed function:FlexCAN_GetMaxMbNum
Parsed function:FlexCAN_GetMsgBuffRegion
Parsed function:FlexCAN_ComputePayloadSize
Parsed function:FlexCAN_ClearRAM
Dump after hash based groups
Congruence classes: 42 (unique hash values: 42), with total: 44 items
Class size histogram [num of members]: number of classe number of classess
[1]: 41 classes
[3]: 1 classes


Dump after WPA based types groups
Congruence classes: 42 (unique hash values: 42), with total: 44 items
Class size histogram [num of members]: number of classe number of classess
[1]: 41 classes
[3]: 1 classes


Worklist has been filled with: 12
Address reference subdivision created: 0 new classes.
Dump after callgraph-based congruence reduction
Congruence classes: 42 (unique hash values: 42), with total: 44 items
Class size histogram [num of members]: number of classe number of classess
[1]: 41 classes
[3]: 1 classes


Init called for 3 items (6.82%).
Dump after full equality comparison of groups
Congruence classes: 42 (unique hash values: 42), with total: 44 items
Class size histogram [num of members]: number of classe number of classess
[1]: 41 classes
[3]: 1 classes


Worklist has been filled with: 12
Address reference subdivision created: 0 new classes.
Congruence classes: 42 (unique hash values: 42), with total: 44 items
Class size histogram [num of members]: number of classe number of classess
[1]: 41 classes
[3]: 1 classes



Item count: 44
Congruent classes before: 42, after: 42
Average class size before: 1.05, after: 1.05
Average non-singular class size: 3.00, count: 1
Equal symbols: 2
Fraction of visited symbols: 4.55%

Semantic equality hit:flexcanBase->flexcanBase
Assembler symbol names:flexcanBase.5251->flexcanBase.5532
Unified; Variable alias has been created.
Semantic equality hit:flexcanBase->flexcanBase
Assembler symbol names:flexcanBase.5251->flexcanBase.5537
Unified; Variable alias has been created.
  Setting points-to UID of [flexcanBase.5537] as 5251
  Setting points-to UID of [flexcanBase.5532] as 5251
  Setting points-to UID of [flexcanBase.5537] as 5251
  Setting points-to UID of [flexcanBase.5532] as 5251

Reclaiming functions:
Reclaiming variables:
Clearing address taken flags:
FlexCAN_ComputePayloadSize.part.0 (uint8 dlcValue)
{
  uint8 ret;
  unsigned char _2;
  unsigned char _4;

  <bb 6> [local count: 1073741824]:

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _2 = dlcValue_1(D) + 247;
  if (_2 <= 6)
    goto <bb 4>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 536870913]:
<L0>:
  ret_3 = 8;
  goto <bb 5>; [100.00%]

  <bb 4> [local count: 536870913]:
<L1>:
  _4 = CSWTCH.37[_2];
  ret_5 = _4;

  <bb 5> [local count: 1073741824]:
  # ret_6 = PHI <ret_3(3), ret_5(4)>
<L2>:
<L3>:
  # DEBUG ret => ret_6
  # DEBUG BEGIN_STMT
  return ret_6;

}


FlexCAN_ConfigCtrlOptions (struct FLEXCAN_Type * pBase, uint32 u32Options)
{
  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 _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;
  long unsigned int _26;
  long unsigned int _27;
  long unsigned int _28;
  long unsigned int _29;
  long unsigned int _30;
  long unsigned int _31;
  long unsigned int _32;
  long unsigned int _33;
  long unsigned int _34;
  long unsigned int _35;
  long unsigned int _36;
  long unsigned int _37;
  long unsigned int _38;
  long unsigned int _39;
  long unsigned int _40;
  long unsigned int _41;
  long unsigned int _42;
  long unsigned int _43;
  long unsigned int _44;
  long unsigned int _45;
  long unsigned int _46;
  long unsigned int _47;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = u32Options_15(D) & 32;
  if (_1 != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_17(D)
  # DEBUG enable => 1
  # DEBUG INLINE_ENTRY FlexCAN_SetIsoCan
  # DEBUG BEGIN_STMT
  _18 ={v} pBase_17(D)->CTRL2;
  _19 = _18 & 4294963199;
  _20 = _19 | 4096;
  pBase_17(D)->CTRL2 ={v} _20;
  goto <bb 5>; [100.00%]

  <bb 4> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_17(D)
  # DEBUG enable => 0
  # DEBUG INLINE_ENTRY FlexCAN_SetIsoCan
  # DEBUG BEGIN_STMT
  _21 ={v} pBase_17(D)->CTRL2;
  _22 = _21 & 4294963199;
  pBase_17(D)->CTRL2 ={v} _22;

  <bb 5> [local count: 1073741824]:
  # DEBUG base => NULL
  # DEBUG enable => NULL
  # DEBUG base => NULL
  # DEBUG enable => NULL
  # DEBUG BEGIN_STMT
  _2 = u32Options_15(D) & 64;
  if (_2 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 6> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_17(D)
  # DEBUG enable => 1
  # DEBUG INLINE_ENTRY FlexCAN_SetEntireFrameArbitrationFieldComparison
  # DEBUG BEGIN_STMT
  _23 ={v} pBase_17(D)->CTRL2;
  _24 = _23 & 4294901759;
  _25 = _24 | 65536;
  pBase_17(D)->CTRL2 ={v} _25;
  goto <bb 8>; [100.00%]

  <bb 7> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_17(D)
  # DEBUG enable => 0
  # DEBUG INLINE_ENTRY FlexCAN_SetEntireFrameArbitrationFieldComparison
  # DEBUG BEGIN_STMT
  _26 ={v} pBase_17(D)->CTRL2;
  _27 = _26 & 4294901759;
  pBase_17(D)->CTRL2 ={v} _27;

  <bb 8> [local count: 1073741824]:
  # DEBUG base => NULL
  # DEBUG enable => NULL
  # DEBUG base => NULL
  # DEBUG enable => NULL
  # DEBUG BEGIN_STMT
  _3 = u32Options_15(D) & 8;
  if (_3 != 0)
    goto <bb 9>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 9> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_17(D)
  # DEBUG enable => 1
  # DEBUG INLINE_ENTRY FlexCAN_SetProtocolException
  # DEBUG BEGIN_STMT
  _28 ={v} pBase_17(D)->CTRL2;
  _29 = _28 & 4294950911;
  _30 = _29 | 16384;
  pBase_17(D)->CTRL2 ={v} _30;
  goto <bb 11>; [100.00%]

  <bb 10> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_17(D)
  # DEBUG enable => 0
  # DEBUG INLINE_ENTRY FlexCAN_SetProtocolException
  # DEBUG BEGIN_STMT
  _31 ={v} pBase_17(D)->CTRL2;
  _32 = _31 & 4294950911;
  pBase_17(D)->CTRL2 ={v} _32;

  <bb 11> [local count: 1073741824]:
  # DEBUG base => NULL
  # DEBUG enable => NULL
  # DEBUG base => NULL
  # DEBUG enable => NULL
  # DEBUG BEGIN_STMT
  _4 = u32Options_15(D) & 2;
  if (_4 != 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 14>; [50.00%]

  <bb 12> [local count: 536870913]:
  _5 ={v} pBase_17(D)->MCR;
  _6 = _5 & 2048;
  if (_6 == 0)
    goto <bb 13>; [50.00%]
  else
    goto <bb 14>; [50.00%]

  <bb 13> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_17(D)
  # DEBUG enable => 1
  # DEBUG INLINE_ENTRY FlexCAN_CanBitSampling
  # DEBUG BEGIN_STMT
  _33 ={v} pBase_17(D)->CTRL1;
  _34 = _33 & 4294967167;
  _35 = _34 | 128;
  pBase_17(D)->CTRL1 ={v} _35;
  goto <bb 15>; [100.00%]

  <bb 14> [local count: 805306369]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_17(D)
  # DEBUG enable => 0
  # DEBUG INLINE_ENTRY FlexCAN_CanBitSampling
  # DEBUG BEGIN_STMT
  _36 ={v} pBase_17(D)->CTRL1;
  _37 = _36 & 4294967167;
  pBase_17(D)->CTRL1 ={v} _37;

  <bb 15> [local count: 1073741824]:
  # DEBUG base => NULL
  # DEBUG enable => NULL
  # DEBUG base => NULL
  # DEBUG enable => NULL
  # DEBUG BEGIN_STMT
  _7 = u32Options_15(D) & 4;
  if (_7 != 0)
    goto <bb 16>; [50.00%]
  else
    goto <bb 17>; [50.00%]

  <bb 16> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_17(D)
  # DEBUG enable => 1
  # DEBUG INLINE_ENTRY FlexCAN_SetBusOffAutorecovery
  # DEBUG BEGIN_STMT
  _38 ={v} pBase_17(D)->CTRL1;
  _39 = _38 & 4294967231;
  pBase_17(D)->CTRL1 ={v} _39;
  goto <bb 18>; [100.00%]

  <bb 17> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_17(D)
  # DEBUG enable => 0
  # DEBUG INLINE_ENTRY FlexCAN_SetBusOffAutorecovery
  # DEBUG BEGIN_STMT
  _40 ={v} pBase_17(D)->CTRL1;
  _41 = _40 & 4294967231;
  _42 = _41 | 64;
  pBase_17(D)->CTRL1 ={v} _42;

  <bb 18> [local count: 1073741824]:
  # DEBUG base => NULL
  # DEBUG enable => NULL
  # DEBUG base => NULL
  # DEBUG enable => NULL
  # DEBUG BEGIN_STMT
  _8 = u32Options_15(D) & 16;
  if (_8 != 0)
    goto <bb 19>; [50.00%]
  else
    goto <bb 20>; [50.00%]

  <bb 19> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_17(D)
  # DEBUG enable => 1
  # DEBUG INLINE_ENTRY FlexCAN_SetEdgeFilter
  # DEBUG BEGIN_STMT
  _43 ={v} pBase_17(D)->CTRL2;
  _44 = _43 & 4294965247;
  pBase_17(D)->CTRL2 ={v} _44;
  goto <bb 21>; [100.00%]

  <bb 20> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG base => pBase_17(D)
  # DEBUG enable => 0
  # DEBUG INLINE_ENTRY FlexCAN_SetEdgeFilter
  # DEBUG BEGIN_STMT
  _45 ={v} pBase_17(D)->CTRL2;
  _46 = _45 & 4294965247;
  _47 = _46 | 2048;
  pBase_17(D)->CTRL2 ={v} _47;

  <bb 21> [local count: 1073741824]:
  # DEBUG base => NULL
  # DEBUG enable => NULL
  # DEBUG base => NULL
  # DEBUG enable => NULL
  return;

}


FlexCAN_SetEnhancedRxFifoFilter (struct FLEXCAN_Type * base, const struct Flexcan_Ip_EnhancedIdTableType * idFilterTable)
{
  volatile boolean x;
  volatile boolean x;
  volatile uint32 * filterStdIDTable;
  volatile uint32 * filterExtIDTable;
  uint32 val;
  uint32 val1;
  uint32 val2;
  uint32 numOfStdIDFilter;
  uint32 numOfExtIDFilter;
  uint32 numOfEnhancedFilter;
  uint32 n;
  uint32 j;
  uint32 i;
  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;
  const struct Flexcan_Ip_EnhancedIdTableType * _9;
  _Bool _10;
  _Bool _11;
  _Bool _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;
  volatile uint32 * _20;
  long unsigned int _21;
  <unnamed type> _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;
  long unsigned int _26;
  long unsigned int _27;
  _Bool _28;
  _Bool _29;
  long unsigned int _30;
  long unsigned int _31;
  long unsigned int _32;
  volatile uint32 * _33;
  long unsigned int _34;
  long unsigned int _35;
  long unsigned int _36;
  sizetype _37;
  sizetype _38;
  volatile uint32 * _39;
  long unsigned int _40;
  <unnamed type> _41;
  long unsigned int _42;
  long unsigned int _43;
  long unsigned int _44;
  long unsigned int _45;
  long unsigned int _46;
  long unsigned int _47;
  _Bool x.7_82;
  _Bool x.7_83;

  <bb 2> [local count: 280015]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG val2 => 0
  # DEBUG val1 => 0
  # DEBUG val => 0
  # DEBUG BEGIN_STMT
  # DEBUG filterExtIDTable => 0B
  # DEBUG BEGIN_STMT
  # DEBUG filterStdIDTable => 0B
  # DEBUG BEGIN_STMT
  _1 ={v} base_62(D)->ERFCR;
  _2 = _1 >> 8;
  numOfEnhancedFilter_63 = _2 & 63;
  # DEBUG numOfEnhancedFilter => numOfEnhancedFilter_63
  # DEBUG BEGIN_STMT
  _3 ={v} base_62(D)->ERFCR;
  _4 = _3 >> 16;
  numOfExtIDFilter_64 = _4 & 127;
  # DEBUG numOfExtIDFilter => numOfExtIDFilter_64
  # DEBUG BEGIN_STMT
  _5 = numOfEnhancedFilter_63 - numOfExtIDFilter_64;
  _6 = _5 + 1;
  numOfStdIDFilter_65 = _6 * 2;
  # DEBUG numOfStdIDFilter => numOfStdIDFilter_65
  # DEBUG BEGIN_STMT
  filterExtIDTable_66 = &base_62(D)->ERFFEL[0];
  # DEBUG filterExtIDTable => filterExtIDTable_66
  # DEBUG BEGIN_STMT
  _7 = numOfExtIDFilter_64 * 2;
  filterStdIDTable_67 = &base_62(D)->ERFFEL[_7];
  # DEBUG filterStdIDTable => filterStdIDTable_67
  # DEBUG BEGIN_STMT
  # DEBUG j => 0
  # DEBUG BEGIN_STMT
  # DEBUG n => 0
  # DEBUG BEGIN_STMT
  # DEBUG i => 0
  goto <bb 27>; [100.00%]

  <bb 3> [local count: 1717984]:
  # DEBUG BEGIN_STMT
  _8 = i_48 * 12;
  _9 = idFilterTable_68(D) + _8;
  _10 = _9->isExtendedFrame;
  if (_10 != 0)
    goto <bb 15>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 4> [local count: 858992]:
  # DEBUG BEGIN_STMT
  # DEBUG val => 0
  # DEBUG BEGIN_STMT
  _11 = _9->rtr2;
  if (_11 != 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 5> [local count: 429496]:
  # DEBUG BEGIN_STMT
  # DEBUG val => 134217728

  <bb 6> [local count: 858992]:
  # val_55 = PHI <0(4), 134217728(5)>
  # DEBUG val => val_55
  # DEBUG BEGIN_STMT
  _12 = _9->rtr1;
  if (_12 != 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 429496]:
  # DEBUG BEGIN_STMT
  val_75 = val_55 | 2048;
  # DEBUG val => val_75

  <bb 8> [local count: 858992]:
  # val_56 = PHI <val_55(6), val_75(7)>
  # DEBUG val => val_56
  # DEBUG BEGIN_STMT
  _13 = _9->id2;
  _14 = _13 << 16;
  _15 = _14 & 134152192;
  _16 = _9->id1;
  _17 = _16 & 2047;
  _18 = _15 | _17;
  _19 = j_50 * 4;
  _20 = filterStdIDTable_67 + _19;
  _21 = _18 | val_56;
  *_20 ={v} _21;
  # DEBUG BEGIN_STMT
  _22 = _9->filterType;
  switch (_22) <default: <L9> [25.00%], case 0: <L6> [25.00%], case 1: <L7> [25.00%], case 2: <L8> [25.00%]>

  <bb 9> [local count: 214748]:
<L6>:
  # DEBUG BEGIN_STMT
  _23 ={v} *_20;
  *_20 ={v} _23;
  # DEBUG BEGIN_STMT
  goto <bb 14>; [100.00%]

  <bb 10> [local count: 214748]:
<L7>:
  # DEBUG BEGIN_STMT
  _24 ={v} *_20;
  _25 = _24 | 1073741824;
  *_20 ={v} _25;
  # DEBUG BEGIN_STMT
  goto <bb 14>; [100.00%]

  <bb 11> [local count: 214748]:
<L8>:
  # DEBUG BEGIN_STMT
  _26 ={v} *_20;
  _27 = _26 | 2147483648;
  *_20 ={v} _27;
  # DEBUG BEGIN_STMT
  goto <bb 14>; [100.00%]

  <bb 12> [local count: 214748]:
<L9>:
  # DEBUG BEGIN_STMT
  x ={v} 0;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.7_82 ={v} x;
  if (x.7_82 != 0)
    goto <bb 14>; [50.00%]
  else
    goto <bb 29>; [50.00%]

  <bb 29> [local count: 107374]:

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

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

  <bb 14> [local count: 751618]:
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  j_80 = j_50 + 1;
  # DEBUG j => j_80
  goto <bb 26>; [100.00%]

  <bb 15> [local count: 858992]:
  # DEBUG BEGIN_STMT
  # DEBUG val2 => 0
  # DEBUG BEGIN_STMT
  # DEBUG val1 => 0
  # DEBUG BEGIN_STMT
  _28 = _9->rtr2;
  if (_28 != 0)
    goto <bb 16>; [50.00%]
  else
    goto <bb 17>; [50.00%]

  <bb 16> [local count: 429496]:
  # DEBUG BEGIN_STMT
  # DEBUG val2 => 536870912

  <bb 17> [local count: 858992]:
  # val2_53 = PHI <0(15), 536870912(16)>
  # DEBUG val2 => val2_53
  # DEBUG BEGIN_STMT
  _29 = _9->rtr1;
  if (_29 != 0)
    goto <bb 18>; [50.00%]
  else
    goto <bb 19>; [50.00%]

  <bb 18> [local count: 429496]:
  # DEBUG BEGIN_STMT
  # DEBUG val1 => 536870912

  <bb 19> [local count: 858992]:
  # val1_54 = PHI <0(17), 536870912(18)>
  # DEBUG val1 => val1_54
  # DEBUG BEGIN_STMT
  _30 = _9->id2;
  _31 = _30 & 536870911;
  _32 = n_52 * 4;
  _33 = filterExtIDTable_66 + _32;
  _34 = _31 | val2_53;
  *_33 ={v} _34;
  # DEBUG BEGIN_STMT
  _35 = _9->id1;
  _36 = _35 & 536870911;
  _37 = n_52 + 1;
  _38 = _37 * 4;
  _39 = filterExtIDTable_66 + _38;
  _40 = _36 | val1_54;
  *_39 ={v} _40;
  # DEBUG BEGIN_STMT
  _41 = _9->filterType;
  switch (_41) <default: <L19> [25.00%], case 0: <L16> [25.00%], case 1: <L17> [25.00%], case 2: <L18> [25.00%]>

  <bb 20> [local count: 214748]:
<L16>:
  # DEBUG BEGIN_STMT
  _42 ={v} *_33;
  *_33 ={v} _42;
  # DEBUG BEGIN_STMT
  goto <bb 25>; [100.00%]

  <bb 21> [local count: 214748]:
<L17>:
  # DEBUG BEGIN_STMT
  _43 ={v} *_33;
  _44 = _43 | 1073741824;
  *_33 ={v} _44;
  # DEBUG BEGIN_STMT
  goto <bb 25>; [100.00%]

  <bb 22> [local count: 214748]:
<L18>:
  # DEBUG BEGIN_STMT
  _45 ={v} *_33;
  _46 = _45 | 2147483648;
  *_33 ={v} _46;
  # DEBUG BEGIN_STMT
  goto <bb 25>; [100.00%]

  <bb 23> [local count: 214748]:
<L19>:
  # DEBUG BEGIN_STMT
  x ={v} 0;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.7_83 ={v} x;
  if (x.7_83 != 0)
    goto <bb 25>; [50.00%]
  else
    goto <bb 30>; [50.00%]

  <bb 30> [local count: 107374]:

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

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

  <bb 25> [local count: 751618]:
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  n_74 = n_52 + 2;
  # DEBUG n => n_74

  <bb 26> [local count: 1503236]:
  # j_49 = PHI <j_80(14), j_50(25)>
  # n_51 = PHI <n_52(14), n_74(25)>
  # DEBUG n => n_51
  # DEBUG j => j_49
  # DEBUG BEGIN_STMT
  i_81 = i_48 + 1;
  # DEBUG i => i_81

  <bb 27> [local count: 1783251]:
  # i_48 = PHI <0(2), i_81(26)>
  # j_50 = PHI <0(2), j_49(26)>
  # n_52 = PHI <0(2), n_51(26)>
  # DEBUG n => n_52
  # DEBUG j => j_50
  # DEBUG i => i_48
  # DEBUG BEGIN_STMT
  _47 = numOfExtIDFilter_64 + numOfStdIDFilter_65;
  if (_47 > i_48)
    goto <bb 3>; [96.34%]
  else
    goto <bb 28>; [3.66%]

  <bb 28> [local count: 65267]:
  return;

}


FlexCAN_EnableEnhancedRxFifo (struct FLEXCAN_Type * base, uint32 numOfStdIDFilters, uint32 numOfExtIDFilters, uint32 numOfWatermark)
{
  uint32 numOfEnhancedFilters;
  Flexcan_Ip_StatusType stat;
  _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;
  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;
  long unsigned int _26;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG stat => 0
  # DEBUG BEGIN_STMT
  # DEBUG numOfEnhancedFilters => 0
  # DEBUG BEGIN_STMT
  _1 = FlexCAN_IsEnhancedRxFifoAvailable (base_32(D));
  if (_1 != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 11>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  _2 = numOfStdIDFilters_33(D) >> 1;
  _3 = _2 + numOfExtIDFilters_34(D);
  numOfEnhancedFilters_35 = _3 + 4294967295;
  # DEBUG numOfEnhancedFilters => numOfEnhancedFilters_35
  # DEBUG BEGIN_STMT
  if (numOfStdIDFilters_33(D) == 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 4> [local count: 268435456]:
  if (numOfExtIDFilters_34(D) == 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 5> [local count: 134217728]:
  # DEBUG BEGIN_STMT
  # DEBUG stat => 1

  <bb 6> [local count: 536870913]:
  # stat_27 = PHI <0(3), 0(4), 1(5)>
  # DEBUG stat => stat_27
  # DEBUG BEGIN_STMT
  _4 = numOfStdIDFilters_33(D) & 1;
  if (_4 != 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

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

  <bb 8> [local count: 536870913]:
  # stat_28 = PHI <stat_27(6), 1(7)>
  # DEBUG stat => stat_28
  # DEBUG BEGIN_STMT
  _5 ={v} base_32(D)->MCR;
  _6 = _5 & 536870912;
  if (_6 != 0)
    goto <bb 11>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 9> [local count: 268435456]:
  # DEBUG stat => stat_28
  # DEBUG BEGIN_STMT
  if (stat_28 == 0)
    goto <bb 10>; [50.00%]
  else
    goto <bb 11>; [50.00%]

  <bb 10> [local count: 134217728]:
  # DEBUG BEGIN_STMT
  _7 ={v} base_32(D)->ERFCR;
  _8 = _7 | 2147483648;
  base_32(D)->ERFCR ={v} _8;
  # DEBUG BEGIN_STMT
  _9 ={v} base_32(D)->ERFSR;
  _10 = _9 | 134217728;
  base_32(D)->ERFSR ={v} _10;
  # DEBUG BEGIN_STMT
  _11 ={v} base_32(D)->ERFSR;
  _12 = _11 & 268435455;
  base_32(D)->ERFSR ={v} _12;
  # DEBUG BEGIN_STMT
  _13 ={v} base_32(D)->ERFCR;
  _14 = _13 & 4294951167;
  _15 = numOfEnhancedFilters_35 << 8;
  _16 = _15 & 16128;
  _17 = _14 | _16;
  base_32(D)->ERFCR ={v} _17;
  # DEBUG BEGIN_STMT
  _18 ={v} base_32(D)->ERFCR;
  _19 = _18 & 4286644223;
  _20 = numOfExtIDFilters_34(D) << 16;
  _21 = _20 & 8323072;
  _22 = _19 | _21;
  base_32(D)->ERFCR ={v} _22;
  # DEBUG BEGIN_STMT
  _23 ={v} base_32(D)->ERFCR;
  _24 = _23 & 4294967264;
  _25 = numOfWatermark_41(D) & 31;
  _26 = _24 | _25;
  base_32(D)->ERFCR ={v} _26;

  <bb 11> [local count: 1073741824]:
  # stat_29 = PHI <0(10), 1(2), stat_28(9), 1(8)>
  # DEBUG stat => stat_29
  # DEBUG BEGIN_STMT
  return stat_29;

}


FlexCAN_IsEnhancedRxFifoAvailable (const struct FLEXCAN_Type * base)
{
  boolean returnValue;
  uint32 i;

  <bb 2> [local count: 566398813]:
  # DEBUG BEGIN_STMT
  # DEBUG i => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG returnValue => 0
  # DEBUG BEGIN_STMT
  # DEBUG i => 0
  goto <bb 4>; [100.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  if (base_4(D) == 1076903936B)
    goto <bb 5>; [5.50%]
  else
    goto <bb 6>; [94.50%]

  <bb 6> [local count: 507343012]:

  <bb 4> [local count: 1073741824]:
  # i_1 = PHI <0(2), 1(6)>
  # DEBUG i => i_1
  # DEBUG BEGIN_STMT
  if (i_1 == 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 5> [local count: 566398813]:
  # returnValue_2 = PHI <1(3), 0(4)>
  # DEBUG returnValue => returnValue_2
  # DEBUG BEGIN_STMT
  return returnValue_2;

}


FlexCAN_IsMbOutOfRange (const struct FLEXCAN_Type * pBase, uint8 u8MbIndex, boolean bIsLegacyFifoEn, uint32 u32MaxMbNum)
{
  uint32 u32NumOfMbOccupiedByFiFo;
  uint32 u32NumOfFiFoElement;
  boolean returnValue;
  unsigned char _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;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG returnValue => 0
  # DEBUG BEGIN_STMT
  # DEBUG u32NumOfFiFoElement => 0
  # DEBUG BEGIN_STMT
  # DEBUG u32NumOfMbOccupiedByFiFo => 0
  # DEBUG BEGIN_STMT
  _1 = (unsigned char) u32MaxMbNum_9(D);
  if (_1 <= u8MbIndex_10(D))
    goto <bb 6>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  if (bIsLegacyFifoEn_11(D) != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 4> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  _2 ={v} pBase_13(D)->CTRL2;
  _3 = _2 >> 24;
  u32NumOfFiFoElement_14 = _3 & 15;
  # DEBUG u32NumOfFiFoElement => u32NumOfFiFoElement_14
  # DEBUG BEGIN_STMT
  _4 = u32NumOfFiFoElement_14 + 1;
  _5 = _4 * 8;
  _6 = _5 >> 2;
  u32NumOfMbOccupiedByFiFo_15 = _6 + 5;
  # DEBUG u32NumOfMbOccupiedByFiFo => u32NumOfMbOccupiedByFiFo_15
  # DEBUG BEGIN_STMT
  _7 = (long unsigned int) u8MbIndex_10(D);
  if (_7 <= u32NumOfMbOccupiedByFiFo_15)
    goto <bb 5>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 5> [local count: 134217728]:
  # DEBUG BEGIN_STMT
  # DEBUG returnValue => 1

  <bb 6> [local count: 1073741824]:
  # returnValue_8 = PHI <1(2), 1(5), 0(3), 0(4)>
  # DEBUG returnValue => returnValue_8
  # DEBUG BEGIN_STMT
  return returnValue_8;

}


FlexCAN_GetRxFifoMask (Flexcan_Ip_MsgBuffIdType id_type, Flexcan_Ip_RxFifoIdElementFormatType formatType, uint32 mask)
{
  uint32 val;
  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;

  <bb 2> [local count: 1073741823]:
  # DEBUG BEGIN_STMT
  # DEBUG val => 0
  # DEBUG BEGIN_STMT
  switch (formatType_11(D)) <default: <L22> [25.00%], case 0: <L0> [25.00%], case 1: <L7> [25.00%], case 2: <L14> [25.00%]>

  <bb 3> [local count: 268435456]:
<L0>:
  # DEBUG BEGIN_STMT
  val_17 = mask_13(D) & 3221225472;
  # DEBUG val => val_17
  # DEBUG BEGIN_STMT
  if (id_type_12(D) == 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 4> [local count: 134217728]:
  # DEBUG BEGIN_STMT
  _1 = mask_13(D) << 19;
  _2 = _1 & 1073217536;
  val_19 = _2 | val_17;
  # DEBUG val => val_19
  goto <bb 13>; [100.00%]

  <bb 5> [local count: 134217728]:
  # DEBUG BEGIN_STMT
  if (id_type_12(D) == 1)
    goto <bb 6>; [34.00%]
  else
    goto <bb 13>; [66.00%]

  <bb 6> [local count: 45634027]:
  # DEBUG BEGIN_STMT
  _3 = mask_13(D) << 1;
  _4 = _3 & 1073741823;
  val_18 = _4 | val_17;
  # DEBUG val => val_18
  goto <bb 13>; [100.00%]

  <bb 7> [local count: 268435456]:
<L7>:
  # DEBUG BEGIN_STMT
  val_14 = mask_13(D) & 3221225472;
  # DEBUG val => val_14
  # DEBUG BEGIN_STMT
  if (id_type_12(D) == 0)
    goto <bb 8>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 8> [local count: 134217728]:
  # DEBUG BEGIN_STMT
  _5 = mask_13(D) << 19;
  _6 = _5 & 1073217536;
  val_16 = _6 | val_14;
  # DEBUG val => val_16
  goto <bb 13>; [100.00%]

  <bb 9> [local count: 134217728]:
  # DEBUG BEGIN_STMT
  if (id_type_12(D) == 1)
    goto <bb 10>; [34.00%]
  else
    goto <bb 13>; [66.00%]

  <bb 10> [local count: 45634027]:
  # DEBUG BEGIN_STMT
  _7 = mask_13(D) << 16;
  _8 = _7 & 1073676288;
  val_15 = _8 | val_14;
  # DEBUG val => val_15
  goto <bb 13>; [100.00%]

  <bb 11> [local count: 268435456]:
<L14>:
  # DEBUG BEGIN_STMT
  if (id_type_12(D) <= 1)
    goto <bb 12>; [41.00%]
  else
    goto <bb 13>; [59.00%]

  <bb 12> [local count: 110058537]:
  # DEBUG BEGIN_STMT
  _9 = mask_13(D) << 24;
  # DEBUG val => _9

  <bb 13> [local count: 1073741824]:
  # val_10 = PHI <val_17(5), val_14(9), _9(12), 0(2), 0(11), val_19(4), val_18(6), val_16(8), val_15(10)>
<L22>:
  # DEBUG val => val_10
  # DEBUG BEGIN_STMT
  return val_10;

}


FlexCAN_AbortTxMsgBuff (const struct FLEXCAN_Type * base, uint32 msgBuffIdx)
{
  volatile uint32 * flexcan_mb;
  uint32 flexcan_mb_config;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_config => 0
  # DEBUG BEGIN_STMT
  # DEBUG code => 9
  # DEBUG BEGIN_STMT
  flexcan_mb_5 = FlexCAN_GetMsgBuffRegion (base_2(D), msgBuffIdx_3(D));
  # DEBUG flexcan_mb => flexcan_mb_5
  # DEBUG BEGIN_STMT
  flexcan_mb_config_6 ={v} *flexcan_mb_5;
  # DEBUG flexcan_mb_config => flexcan_mb_config_6
  # DEBUG BEGIN_STMT
  flexcan_mb_config_7 = flexcan_mb_config_6 & 4043309055;
  # DEBUG flexcan_mb_config => flexcan_mb_config_7
  # DEBUG BEGIN_STMT
  flexcan_mb_config_8 = flexcan_mb_config_7 | 150994944;
  # DEBUG flexcan_mb_config => flexcan_mb_config_8
  # DEBUG BEGIN_STMT
  *flexcan_mb_5 ={v} flexcan_mb_config_8;
  return;

}


FlexCAN_GetBusOffStatusFlag (uint8 u8Instance)
{
  boolean bBOffStatus;
  static struct FLEXCAN_Type * const flexcanBase[6];
  int _1;
  struct FLEXCAN_Type * _2;
  long unsigned int _3;
  long unsigned int _4;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG bBOffStatus => 0
  # DEBUG BEGIN_STMT
  _1 = (int) u8Instance_6(D);
  _2 = flexcanBase[_1];
  _3 ={v} _2->ESR1;
  _4 = _3 & 4;
  if (_4 != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG bBOffStatus => 1

  <bb 4> [local count: 1073741824]:
  # bBOffStatus_5 = PHI <0(2), 1(3)>
  # DEBUG bBOffStatus => bBOffStatus_5
  # DEBUG BEGIN_STMT
  return bBOffStatus_5;

}


FlexCAN_GetErrStatusFlag (uint8 u8Instance)
{
  boolean bErrStatus;
  static struct FLEXCAN_Type * const flexcanBase[6];
  int _1;
  struct FLEXCAN_Type * _2;
  long unsigned int _3;
  long unsigned int _4;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG bErrStatus => 0
  # DEBUG BEGIN_STMT
  _1 = (int) u8Instance_6(D);
  _2 = flexcanBase[_1];
  _3 ={v} _2->ESR1;
  _4 = _3 & 2;
  if (_4 != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  # DEBUG bErrStatus => 1

  <bb 4> [local count: 1073741824]:
  # bErrStatus_5 = PHI <0(2), 1(3)>
  # DEBUG bErrStatus => bErrStatus_5
  # DEBUG BEGIN_STMT
  return bErrStatus_5;

}


FlexCAN_ReadEnhancedRxFifo (const struct FLEXCAN_Type * base, struct Flexcan_Ip_MsgBuffType * rxFifo)
{
  volatile boolean x;
  uint8 can_real_payload;
  uint8 flexcan_mb_dlc_value;
  uint32 * msgData_32;
  const uint32 * flexcan_mb_data_32;
  const uint32 * flexcan_mb;
  uint8 idhit_offset;
  uint32 mbWord;
  uint32 databyte;
  long unsigned int base.18_1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  unsigned char _5;
  _Bool _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;
  unsigned char _13;
  unsigned char _14;
  unsigned int _15;
  unsigned int _16;
  const uint32 * _17;
  long unsigned int _18;
  unsigned char _19;
  unsigned char _20;
  long unsigned int _21;
  long unsigned int _22;
  long unsigned int _23;
  const uint32 * _24;
  long unsigned int _25;
  long unsigned int _26;
  long unsigned int _27;
  long unsigned int _28;
  long unsigned int _29;
  long unsigned int _30;
  long unsigned int _31;
  long unsigned int _32;
  uint32 * _33;
  long unsigned int _34;
  long unsigned int _35;
  uint8 iftmp.19_38;
  _Bool x.7_46;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  base.18_1 = (long unsigned int) base_41(D);
  _2 = base.18_1 + 8192;
  flexcan_mb_42 = (const uint32 *) _2;
  # DEBUG flexcan_mb => flexcan_mb_42
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_id => flexcan_mb_42 + 4
  # DEBUG BEGIN_STMT
  flexcan_mb_data_32_43 = flexcan_mb_42 + 8;
  # DEBUG flexcan_mb_data_32 => flexcan_mb_data_32_43
  # DEBUG BEGIN_STMT
  # DEBUG msgData_32 => 0B
  # DEBUG BEGIN_STMT
  _3 ={v} *flexcan_mb_42;
  _4 = _3 >> 16;
  _5 = (unsigned char) _4;
  flexcan_mb_dlc_value_45 = _5 & 15;
  # DEBUG flexcan_mb_dlc_value => flexcan_mb_dlc_value_45
  # DEBUG BEGIN_STMT
  can_real_payload_47 = FlexCAN_ComputePayloadSize (flexcan_mb_dlc_value_45);
  # DEBUG can_real_payload => can_real_payload_47
  # DEBUG BEGIN_STMT
  _6 = rxFifo_48(D) != 0B;
  x ={v} _6;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.7_46 ={v} x;
  if (x.7_46 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 15>; [50.00%]

  <bb 15> [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
  msgData_32_49 = &rxFifo_48(D)->data;
  # DEBUG msgData_32 => msgData_32_49
  # DEBUG BEGIN_STMT
  rxFifo_48(D)->dataLen = can_real_payload_47;
  # DEBUG BEGIN_STMT
  _7 ={v} *flexcan_mb_42;
  rxFifo_48(D)->cs = _7;
  # DEBUG BEGIN_STMT
  _8 = _7 & 2097152;
  if (_8 != 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 5> [local count: 53687]:
  # DEBUG BEGIN_STMT
  _9 ={v} MEM[(const uint32 *)flexcan_mb_42 + 4B];
  rxFifo_48(D)->msgId = _9;
  goto <bb 7>; [100.00%]

  <bb 6> [local count: 53687]:
  # DEBUG BEGIN_STMT
  _10 ={v} MEM[(const uint32 *)flexcan_mb_42 + 4B];
  _11 = _10 >> 18;
  rxFifo_48(D)->msgId = _11;

  <bb 7> [local count: 107374]:
  # DEBUG BEGIN_STMT
  _12 = _7 & 1048576;
  if (_12 != 0)
    goto <bb 8>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 8> [local count: 53687]:
  # DEBUG BEGIN_STMT
  # DEBUG can_real_payload => 0

  <bb 9> [local count: 107374]:
  # can_real_payload_37 = PHI <can_real_payload_47(7), 0(8)>
  # DEBUG can_real_payload => can_real_payload_37
  # DEBUG BEGIN_STMT
  _13 = can_real_payload_37 >> 2;
  _14 = can_real_payload_37 & 3;
  if (_14 != 0)
    goto <bb 11>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 10> [local count: 53687]:

  <bb 11> [local count: 107374]:
  # iftmp.19_38 = PHI <1(9), 0(10)>
  idhit_offset_54 = _13 + iftmp.19_38;
  # DEBUG idhit_offset => idhit_offset_54
  # DEBUG BEGIN_STMT
  _15 = (unsigned int) idhit_offset_54;
  _16 = _15 * 4;
  _17 = flexcan_mb_data_32_43 + _16;
  _18 ={v} *_17;
  _19 = (unsigned char) _18;
  _20 = _19 & 127;
  rxFifo_48(D)->id_hit = _20;
  # DEBUG BEGIN_STMT
  _21 = _7 & 65535;
  rxFifo_48(D)->time_stamp = _21;
  # DEBUG BEGIN_STMT
  # DEBUG databyte => 0
  goto <bb 13>; [100.00%]

  <bb 12> [local count: 868753]:
  # DEBUG BEGIN_STMT
  _22 = databyte_36 >> 2;
  _23 = _22 * 4;
  _24 = flexcan_mb_data_32_43 + _23;
  mbWord_57 ={v} *_24;
  # DEBUG mbWord => mbWord_57
  # DEBUG BEGIN_STMT
  _25 = mbWord_57 >> 24;
  _26 = mbWord_57 >> 8;
  _27 = _26 & 65280;
  _28 = _25 | _27;
  _29 = mbWord_57 << 8;
  _30 = _29 & 16711680;
  _31 = _28 | _30;
  _32 = mbWord_57 << 24;
  _33 = msgData_32_49 + _23;
  _34 = _31 | _32;
  *_33 = _34;
  # DEBUG BEGIN_STMT
  databyte_59 = databyte_36 + 4;
  # DEBUG databyte => databyte_59

  <bb 13> [local count: 976127]:
  # databyte_36 = PHI <0(11), databyte_59(12)>
  # DEBUG databyte => databyte_36
  # DEBUG BEGIN_STMT
  _35 = (long unsigned int) can_real_payload_37;
  if (_35 > databyte_36)
    goto <bb 12>; [89.00%]
  else
    goto <bb 14>; [11.00%]

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

}


FlexCAN_ReadRxFifo (const struct FLEXCAN_Type * base, struct Flexcan_Ip_MsgBuffType * rxFifo)
{
  volatile boolean x;
  uint8 can_real_payload;
  uint8 flexcan_mb_dlc_value;
  uint32 * msgData_32;
  const uint32 * flexcan_mb;
  uint32 mbWord;
  uint32 databyte;
  long unsigned int base.17_1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  unsigned char _5;
  _Bool _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;
  unsigned char _13;
  long unsigned int _14;
  long unsigned int _15;
  long unsigned int _16;
  const uint32 * _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;
  uint32 * _26;
  long unsigned int _27;
  long unsigned int _28;
  _Bool x.7_39;
  sizetype _41;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  base.17_1 = (long unsigned int) base_32(D);
  _2 = base.17_1 + 128;
  flexcan_mb_33 = (const uint32 *) _2;
  # DEBUG flexcan_mb => flexcan_mb_33
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_id => flexcan_mb_33 + 4
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_data_32 => flexcan_mb_33 + 8
  # DEBUG BEGIN_STMT
  msgData_32_36 = &rxFifo_35(D)->data;
  # DEBUG msgData_32 => msgData_32_36
  # DEBUG BEGIN_STMT
  _3 ={v} *flexcan_mb_33;
  _4 = _3 >> 16;
  _5 = (unsigned char) _4;
  flexcan_mb_dlc_value_38 = _5 & 15;
  # DEBUG flexcan_mb_dlc_value => flexcan_mb_dlc_value_38
  # DEBUG BEGIN_STMT
  can_real_payload_40 = FlexCAN_ComputePayloadSize (flexcan_mb_dlc_value_38);
  # DEBUG can_real_payload => can_real_payload_40
  # DEBUG BEGIN_STMT
  _6 = rxFifo_35(D) != 0B;
  x ={v} _6;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.7_39 ={v} x;
  if (x.7_39 != 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
  can_real_payload_34 = MIN_EXPR <8, can_real_payload_40>;
  # DEBUG can_real_payload => can_real_payload_34
  # DEBUG BEGIN_STMT
  rxFifo_35(D)->dataLen = can_real_payload_34;
  # DEBUG BEGIN_STMT
  _7 ={v} *flexcan_mb_33;
  rxFifo_35(D)->cs = _7;
  # DEBUG BEGIN_STMT
  _8 = _7 & 2097152;
  if (_8 != 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 5> [local count: 53687]:
  # DEBUG BEGIN_STMT
  _9 ={v} MEM[(const uint32 *)flexcan_mb_33 + 4B];
  rxFifo_35(D)->msgId = _9;
  goto <bb 7>; [100.00%]

  <bb 6> [local count: 53687]:
  # DEBUG BEGIN_STMT
  _10 ={v} MEM[(const uint32 *)flexcan_mb_33 + 4B];
  _11 = _10 >> 18;
  rxFifo_35(D)->msgId = _11;

  <bb 7> [local count: 107374]:
  # DEBUG BEGIN_STMT
  _12 ={v} base_32(D)->RXFIR;
  _13 = (unsigned char) _12;
  rxFifo_35(D)->id_hit = _13;
  # DEBUG BEGIN_STMT
  _14 = _7 & 65535;
  rxFifo_35(D)->time_stamp = _14;
  # DEBUG BEGIN_STMT
  # DEBUG databyte => 0
  goto <bb 9>; [100.00%]

  <bb 8> [local count: 868753]:
  # DEBUG BEGIN_STMT
  _15 = databyte_29 >> 2;
  _16 = _15 * 4;
  _41 = _16 + 8;
  _17 = flexcan_mb_33 + _41;
  mbWord_48 ={v} *_17;
  # DEBUG mbWord => mbWord_48
  # DEBUG BEGIN_STMT
  _18 = mbWord_48 >> 24;
  _19 = mbWord_48 >> 8;
  _20 = _19 & 65280;
  _21 = _18 | _20;
  _22 = mbWord_48 << 8;
  _23 = _22 & 16711680;
  _24 = _21 | _23;
  _25 = mbWord_48 << 24;
  _26 = msgData_32_36 + _16;
  _27 = _24 | _25;
  *_26 = _27;
  # DEBUG BEGIN_STMT
  databyte_50 = databyte_29 + 4;
  # DEBUG databyte => databyte_50

  <bb 9> [local count: 976127]:
  # databyte_29 = PHI <0(7), databyte_50(8)>
  # DEBUG databyte => databyte_29
  # DEBUG BEGIN_STMT
  _28 = (long unsigned int) can_real_payload_34;
  if (_28 > databyte_29)
    goto <bb 8>; [89.00%]
  else
    goto <bb 10>; [11.00%]

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

}


FlexCAN_SetRxFifoFilter (struct FLEXCAN_Type * base, Flexcan_Ip_RxFifoIdElementFormatType idFormat, const struct Flexcan_Ip_IdTableType * idFilterTable)
{
  volatile boolean x;
  volatile uint32 * filterTable;
  uint32 val;
  uint32 val2;
  uint32 val1;
  uint32 numOfFilters;
  uint32 j;
  uint32 i;
  long unsigned int base.15_1;
  long unsigned int _2;
  _Bool _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  const struct Flexcan_Ip_IdTableType * _9;
  _Bool _10;
  _Bool _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  volatile uint32 * _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  volatile uint32 * _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;
  long unsigned int _26;
  long unsigned int _27;
  long unsigned int _28;
  long unsigned int _29;
  const struct Flexcan_Ip_IdTableType * _30;
  _Bool _31;
  sizetype _32;
  sizetype _33;
  const struct Flexcan_Ip_IdTableType * _34;
  _Bool _35;
  _Bool _36;
  long unsigned int _37;
  long unsigned int _38;
  long unsigned int _39;
  long unsigned int _40;
  long unsigned int _41;
  volatile uint32 * _42;
  long unsigned int _43;
  long unsigned int _44;
  long unsigned int _45;
  long unsigned int _46;
  long unsigned int _47;
  volatile uint32 * _48;
  long unsigned int _49;
  _Bool _50;
  long unsigned int _51;
  volatile uint32 * _52;
  long unsigned int _53;
  long unsigned int _54;
  long unsigned int _55;
  long unsigned int _56;
  long unsigned int _57;
  long unsigned int _58;
  long unsigned int _59;
  volatile uint32 * _60;
  long unsigned int _61;
  long unsigned int _62;
  long unsigned int _63;
  long unsigned int _64;
  long unsigned int _65;
  long unsigned int _66;
  long unsigned int _67;
  long unsigned int _68;
  long unsigned int _69;
  long unsigned int _70;
  long unsigned int _71;
  long unsigned int _72;
  const struct Flexcan_Ip_IdTableType * _73;
  _Bool _74;
  long unsigned int _75;
  long unsigned int _76;
  long unsigned int _77;
  long unsigned int _78;
  volatile uint32 * _79;
  long unsigned int _80;
  long unsigned int _81;
  long unsigned int _82;
  long unsigned int _83;
  volatile uint32 * _84;
  sizetype _85;
  sizetype _86;
  const struct Flexcan_Ip_IdTableType * _87;
  _Bool _88;
  long unsigned int _89;
  volatile uint32 * _90;
  long unsigned int _91;
  long unsigned int _92;
  long unsigned int _93;
  long unsigned int _94;
  long unsigned int _95;
  long unsigned int _96;
  long unsigned int _97;
  volatile uint32 * _98;
  long unsigned int _99;
  long unsigned int _100;
  long unsigned int _101;
  long unsigned int _102;
  long unsigned int _103;
  long unsigned int _104;
  sizetype _105;
  sizetype _106;
  const struct Flexcan_Ip_IdTableType * _107;
  _Bool _108;
  long unsigned int _109;
  volatile uint32 * _110;
  long unsigned int _111;
  long unsigned int _112;
  long unsigned int _113;
  long unsigned int _114;
  long unsigned int _115;
  long unsigned int _116;
  long unsigned int _117;
  volatile uint32 * _118;
  long unsigned int _119;
  long unsigned int _120;
  long unsigned int _121;
  long unsigned int _122;
  long unsigned int _123;
  long unsigned int _124;
  sizetype _125;
  sizetype _126;
  const struct Flexcan_Ip_IdTableType * _127;
  _Bool _128;
  long unsigned int _129;
  volatile uint32 * _130;
  long unsigned int _131;
  long unsigned int _132;
  long unsigned int _133;
  long unsigned int _134;
  long unsigned int _135;
  long unsigned int _136;
  volatile uint32 * _137;
  long unsigned int _138;
  long unsigned int _139;
  long unsigned int _140;
  long unsigned int _141;
  long unsigned int _142;
  long unsigned int _143;
  long unsigned int _144;
  long unsigned int _145;
  long unsigned int _146;
  int iftmp.16_155;
  _Bool x.7_207;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG val1 => 0
  # DEBUG val2 => 0
  # DEBUG val => 0
  # DEBUG BEGIN_STMT
  base.15_1 = (long unsigned int) base_167(D);
  _2 = base.15_1 + 224;
  filterTable_168 = (volatile uint32 *) _2;
  # DEBUG filterTable => filterTable_168
  # DEBUG BEGIN_STMT
  if (idFilterTable_169(D) != 0B)
    goto <bb 5>; [70.00%]
  else
    goto <bb 3>; [30.00%]

  <bb 3> [local count: 64424]:
  if (idFormat_170(D) == 3)
    goto <bb 5>; [34.00%]
  else
    goto <bb 4>; [66.00%]

  <bb 4> [local count: 42520]:

  <bb 5> [local count: 214748]:
  # iftmp.16_155 = PHI <1(3), 0(4), 1(2)>
  _3 = (_Bool) iftmp.16_155;
  x ={v} _3;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.7_207 ={v} x;
  if (x.7_207 != 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 46>; [50.00%]

  <bb 46> [local count: 107374]:

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

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

  <bb 7> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  _4 ={v} base_167(D)->CTRL2;
  _5 = _4 >> 24;
  numOfFilters_172 = _5 & 15;
  # DEBUG numOfFilters => numOfFilters_172
  # DEBUG BEGIN_STMT
  switch (idFormat_170(D)) <default: <L46> [20.00%], case 0: <L4> [20.00%], case 1: <L13> [20.00%], case 2: <L27> [20.00%], case 3: <L43> [20.00%]>

  <bb 8> [local count: 21475]:
<L4>:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_13 ();
  # DEBUG BEGIN_STMT
  _6 ={v} base_167(D)->MCR;
  _7 = _6 & 4294966527;
  base_167(D)->MCR ={v} _7;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_13 ();
  # DEBUG BEGIN_STMT
  # DEBUG i => 0
  goto <bb 15>; [100.00%]

  <bb 9> [local count: 173751]:
  # DEBUG BEGIN_STMT
  # DEBUG val => 0
  # DEBUG BEGIN_STMT
  _8 = i_147 * 8;
  _9 = idFilterTable_169(D) + _8;
  _10 = _9->isRemoteFrame;
  if (_10 != 0)
    goto <bb 10>; [50.00%]
  else
    goto <bb 11>; [50.00%]

  <bb 10> [local count: 86875]:
  # DEBUG BEGIN_STMT
  # DEBUG val => 2147483648

  <bb 11> [local count: 173751]:
  # val_154 = PHI <0(9), 2147483648(10)>
  # DEBUG val => val_154
  # DEBUG BEGIN_STMT
  _11 = _9->isExtendedFrame;
  if (_11 != 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 12> [local count: 86875]:
  # DEBUG BEGIN_STMT
  val_204 = val_154 | 1073741824;
  # DEBUG val => val_204
  # DEBUG BEGIN_STMT
  _12 = _9->id;
  _13 = _12 << 1;
  _14 = _13 & 1073741823;
  _15 = i_147 * 4;
  _16 = filterTable_168 + _15;
  _17 = _14 + val_204;
  *_16 ={v} _17;
  goto <bb 14>; [100.00%]

  <bb 13> [local count: 86875]:
  # DEBUG BEGIN_STMT
  _18 = _9->id;
  _19 = _18 << 19;
  _20 = _19 & 1073217536;
  _21 = i_147 * 4;
  _22 = filterTable_168 + _21;
  _23 = _20 + val_154;
  *_22 ={v} _23;

  <bb 14> [local count: 173751]:
  # DEBUG BEGIN_STMT
  i_206 = i_147 + 1;
  # DEBUG i => i_206

  <bb 15> [local count: 195225]:
  # i_147 = PHI <0(8), i_206(14)>
  # DEBUG i => i_147
  # DEBUG BEGIN_STMT
  _24 = numOfFilters_172 + 1;
  _25 = _24 * 8;
  if (_25 > i_147)
    goto <bb 9>; [89.00%]
  else
    goto <bb 45>; [11.00%]

  <bb 16> [local count: 21475]:
<L13>:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_13 ();
  # DEBUG BEGIN_STMT
  _26 ={v} base_167(D)->MCR;
  _27 = _26 & 4294966527;
  _28 = _27 | 256;
  base_167(D)->MCR ={v} _28;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_13 ();
  # DEBUG BEGIN_STMT
  # DEBUG j => 0
  # DEBUG BEGIN_STMT
  # DEBUG i => 0
  goto <bb 28>; [100.00%]

  <bb 17> [local count: 173751]:
  # DEBUG BEGIN_STMT
  # DEBUG val1 => 0
  # DEBUG BEGIN_STMT
  # DEBUG val2 => 0
  # DEBUG BEGIN_STMT
  _29 = j_150 * 8;
  _30 = idFilterTable_169(D) + _29;
  _31 = _30->isRemoteFrame;
  if (_31 != 0)
    goto <bb 18>; [50.00%]
  else
    goto <bb 19>; [50.00%]

  <bb 18> [local count: 86875]:
  # DEBUG BEGIN_STMT
  # DEBUG val1 => 2147483648

  <bb 19> [local count: 173751]:
  # val1_152 = PHI <0(17), 2147483648(18)>
  # DEBUG val1 => val1_152
  # DEBUG BEGIN_STMT
  _32 = j_150 + 1;
  _33 = _32 * 8;
  _34 = idFilterTable_169(D) + _33;
  _35 = _34->isRemoteFrame;
  if (_35 != 0)
    goto <bb 20>; [50.00%]
  else
    goto <bb 21>; [50.00%]

  <bb 20> [local count: 86875]:
  # DEBUG BEGIN_STMT
  # DEBUG val2 => 32768

  <bb 21> [local count: 173751]:
  # val2_153 = PHI <0(19), 32768(20)>
  # DEBUG val2 => val2_153
  # DEBUG BEGIN_STMT
  _36 = _30->isExtendedFrame;
  if (_36 != 0)
    goto <bb 22>; [50.00%]
  else
    goto <bb 23>; [50.00%]

  <bb 22> [local count: 86875]:
  # DEBUG BEGIN_STMT
  val1_193 = val1_152 | 1073741824;
  # DEBUG val1 => val1_193
  # DEBUG BEGIN_STMT
  _37 = _30->id;
  _38 = _37 >> 15;
  _39 = _38 << 16;
  _40 = _39 & 1073676288;
  _41 = i_148 * 4;
  _42 = filterTable_168 + _41;
  _43 = _40 + val1_193;
  *_42 ={v} _43;
  goto <bb 24>; [100.00%]

  <bb 23> [local count: 86875]:
  # DEBUG BEGIN_STMT
  _44 = _30->id;
  _45 = _44 << 19;
  _46 = _45 & 1073217536;
  _47 = i_148 * 4;
  _48 = filterTable_168 + _47;
  _49 = _46 + val1_152;
  *_48 ={v} _49;

  <bb 24> [local count: 173751]:
  # DEBUG BEGIN_STMT
  _50 = _34->isExtendedFrame;
  if (_50 != 0)
    goto <bb 25>; [50.00%]
  else
    goto <bb 26>; [50.00%]

  <bb 25> [local count: 86875]:
  # DEBUG BEGIN_STMT
  val2_196 = val2_153 | 16384;
  # DEBUG val2 => val2_196
  # DEBUG BEGIN_STMT
  _51 = i_148 * 4;
  _52 = filterTable_168 + _51;
  _53 ={v} *_52;
  _54 = _34->id;
  _55 = _54 >> 15;
  _56 = _55 & 16383;
  _57 = _56 + val2_196;
  _58 = _53 | _57;
  *_52 ={v} _58;
  goto <bb 27>; [100.00%]

  <bb 26> [local count: 86875]:
  # DEBUG BEGIN_STMT
  _59 = i_148 * 4;
  _60 = filterTable_168 + _59;
  _61 ={v} *_60;
  _62 = _34->id;
  _63 = _62 << 3;
  _64 = _63 & 16376;
  _65 = _64 + val2_153;
  _66 = _61 | _65;
  *_60 ={v} _66;

  <bb 27> [local count: 173751]:
  # DEBUG BEGIN_STMT
  j_198 = j_150 + 2;
  # DEBUG j => j_198
  # DEBUG BEGIN_STMT
  i_199 = i_148 + 1;
  # DEBUG i => i_199

  <bb 28> [local count: 195225]:
  # i_148 = PHI <0(16), i_199(27)>
  # j_150 = PHI <0(16), j_198(27)>
  # DEBUG j => j_150
  # DEBUG i => i_148
  # DEBUG BEGIN_STMT
  _67 = numOfFilters_172 + 1;
  _68 = _67 * 8;
  if (_68 > i_148)
    goto <bb 17>; [89.00%]
  else
    goto <bb 45>; [11.00%]

  <bb 29> [local count: 21475]:
<L27>:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_13 ();
  # DEBUG BEGIN_STMT
  _69 ={v} base_167(D)->MCR;
  _70 = _69 & 4294966527;
  _71 = _70 | 512;
  base_167(D)->MCR ={v} _71;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_13 ();
  # DEBUG BEGIN_STMT
  # DEBUG j => 0
  # DEBUG BEGIN_STMT
  # DEBUG i => 0
  goto <bb 43>; [100.00%]

  <bb 30> [local count: 173751]:
  # DEBUG BEGIN_STMT
  _72 = j_151 * 8;
  _73 = idFilterTable_169(D) + _72;
  _74 = _73->isExtendedFrame;
  if (_74 != 0)
    goto <bb 31>; [50.00%]
  else
    goto <bb 32>; [50.00%]

  <bb 31> [local count: 86875]:
  # DEBUG BEGIN_STMT
  _75 = _73->id;
  _76 = _75 >> 21;
  _77 = _76 << 24;
  _78 = i_149 * 4;
  _79 = filterTable_168 + _78;
  *_79 ={v} _77;
  goto <bb 33>; [100.00%]

  <bb 32> [local count: 86875]:
  # DEBUG BEGIN_STMT
  _80 = _73->id;
  _81 = _80 >> 3;
  _82 = _81 << 24;
  _83 = i_149 * 4;
  _84 = filterTable_168 + _83;
  *_84 ={v} _82;

  <bb 33> [local count: 173751]:
  # DEBUG BEGIN_STMT
  _85 = j_151 + 1;
  _86 = _85 * 8;
  _87 = idFilterTable_169(D) + _86;
  _88 = _87->isExtendedFrame;
  if (_88 != 0)
    goto <bb 34>; [50.00%]
  else
    goto <bb 35>; [50.00%]

  <bb 34> [local count: 86875]:
  # DEBUG BEGIN_STMT
  _89 = i_149 * 4;
  _90 = filterTable_168 + _89;
  _91 ={v} *_90;
  _92 = _87->id;
  _93 = _92 >> 21;
  _94 = _93 << 16;
  _95 = _94 & 16711680;
  _96 = _91 | _95;
  *_90 ={v} _96;
  goto <bb 36>; [100.00%]

  <bb 35> [local count: 86875]:
  # DEBUG BEGIN_STMT
  _97 = i_149 * 4;
  _98 = filterTable_168 + _97;
  _99 ={v} *_98;
  _100 = _87->id;
  _101 = _100 >> 3;
  _102 = _101 << 16;
  _103 = _102 & 16711680;
  _104 = _99 | _103;
  *_98 ={v} _104;

  <bb 36> [local count: 173751]:
  # DEBUG BEGIN_STMT
  _105 = j_151 + 2;
  _106 = _105 * 8;
  _107 = idFilterTable_169(D) + _106;
  _108 = _107->isExtendedFrame;
  if (_108 != 0)
    goto <bb 37>; [50.00%]
  else
    goto <bb 38>; [50.00%]

  <bb 37> [local count: 86875]:
  # DEBUG BEGIN_STMT
  _109 = i_149 * 4;
  _110 = filterTable_168 + _109;
  _111 ={v} *_110;
  _112 = _107->id;
  _113 = _112 >> 21;
  _114 = _113 << 8;
  _115 = _114 & 65535;
  _116 = _111 | _115;
  *_110 ={v} _116;
  goto <bb 39>; [100.00%]

  <bb 38> [local count: 86875]:
  # DEBUG BEGIN_STMT
  _117 = i_149 * 4;
  _118 = filterTable_168 + _117;
  _119 ={v} *_118;
  _120 = _107->id;
  _121 = _120 >> 3;
  _122 = _121 << 8;
  _123 = _122 & 65535;
  _124 = _119 | _123;
  *_118 ={v} _124;

  <bb 39> [local count: 173751]:
  # DEBUG BEGIN_STMT
  _125 = j_151 + 3;
  _126 = _125 * 8;
  _127 = idFilterTable_169(D) + _126;
  _128 = _127->isExtendedFrame;
  if (_128 != 0)
    goto <bb 40>; [50.00%]
  else
    goto <bb 41>; [50.00%]

  <bb 40> [local count: 86875]:
  # DEBUG BEGIN_STMT
  _129 = i_149 * 4;
  _130 = filterTable_168 + _129;
  _131 ={v} *_130;
  _132 = _127->id;
  _133 = _132 >> 21;
  _134 = _133 & 255;
  _135 = _131 | _134;
  *_130 ={v} _135;
  goto <bb 42>; [100.00%]

  <bb 41> [local count: 86875]:
  # DEBUG BEGIN_STMT
  _136 = i_149 * 4;
  _137 = filterTable_168 + _136;
  _138 ={v} *_137;
  _139 = _127->id;
  _140 = _139 >> 3;
  _141 = _140 & 255;
  _142 = _138 | _141;
  *_137 ={v} _142;

  <bb 42> [local count: 173751]:
  # DEBUG BEGIN_STMT
  j_187 = j_151 + 4;
  # DEBUG j => j_187
  # DEBUG BEGIN_STMT
  i_188 = i_149 + 1;
  # DEBUG i => i_188

  <bb 43> [local count: 195225]:
  # i_149 = PHI <0(29), i_188(42)>
  # j_151 = PHI <0(29), j_187(42)>
  # DEBUG j => j_151
  # DEBUG i => i_149
  # DEBUG BEGIN_STMT
  _143 = numOfFilters_172 + 1;
  _144 = _143 * 8;
  if (_144 > i_149)
    goto <bb 30>; [89.00%]
  else
    goto <bb 45>; [11.00%]

  <bb 44> [local count: 21475]:
<L43>:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_13 ();
  # DEBUG BEGIN_STMT
  _145 ={v} base_167(D)->MCR;
  _146 = _145 | 768;
  base_167(D)->MCR ={v} _146;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_13 ();
  # DEBUG BEGIN_STMT

  <bb 45> [local count: 107374]:
<L46>:
  return;

}


FlexCAN_SetOperationMode (struct FLEXCAN_Type * base, Flexcan_Ip_ModesType mode)
{
  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 _26;
  long unsigned int _27;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  switch (mode_12(D)) <default: <L5> [25.00%], case 0: <L0> [25.00%], case 1: <L1> [25.00%], case 2: <L2> [25.00%]>

  <bb 3> [local count: 268435456]:
<L0>:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_12 ();
  # DEBUG BEGIN_STMT
  _1 ={v} base_15(D)->CTRL1;
  _2 = _1 & 4294967287;
  base_15(D)->CTRL1 ={v} _2;
  # DEBUG BEGIN_STMT
  _3 ={v} base_15(D)->CTRL1;
  _4 = _3 & 4294963199;
  base_15(D)->CTRL1 ={v} _4;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_12 ();
  # DEBUG BEGIN_STMT
  goto <bb 6>; [100.00%]

  <bb 4> [local count: 268435456]:
<L1>:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_12 ();
  # DEBUG BEGIN_STMT
  _5 ={v} base_15(D)->CTRL1;
  _6 = _5 | 8;
  base_15(D)->CTRL1 ={v} _6;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_12 ();
  # DEBUG BEGIN_STMT
  goto <bb 6>; [100.00%]

  <bb 5> [local count: 268435456]:
<L2>:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_12 ();
  # DEBUG BEGIN_STMT
  _7 ={v} base_15(D)->CTRL1;
  _8 = _7 | 4096;
  base_15(D)->CTRL1 ={v} _8;
  # DEBUG BEGIN_STMT
  _9 ={v} base_15(D)->CTRL1;
  _10 = _9 & 4294967287;
  base_15(D)->CTRL1 ={v} _10;
  # DEBUG BEGIN_STMT
  # DEBUG base => base_15(D)
  # DEBUG enable => 1
  # DEBUG INLINE_ENTRY FlexCAN_SetSelfReception
  # DEBUG BEGIN_STMT
  _26 ={v} base_15(D)->MCR;
  _27 = _26 & 4294836223;
  base_15(D)->MCR ={v} _27;
  # DEBUG base => NULL
  # DEBUG enable => NULL
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_12 ();
  # DEBUG BEGIN_STMT

  <bb 6> [local count: 1073741824]:
<L5>:
  return;

}


FlexCAN_SetMaxMsgBuffNum (struct FLEXCAN_Type * base, uint32 maxMsgBuffNum)
{
  volatile boolean x;
  Flexcan_Ip_StatusType status;
  uint32 valEndRam;
  uint32 valEndMb;
  uint8 can_real_payload;
  volatile uint32 * flexcan_mb;
  const uint32 * valEndMbPointer;
  const uint32 * RAM;
  uint32 databyte;
  uint8 msgBuffIdx;
  long unsigned int base.11_1;
  long unsigned int _2;
  long unsigned int _3;
  _Bool _4;
  long unsigned int _5;
  long unsigned int valEndMbPointer.12_6;
  long unsigned int _7;
  const uint32 * _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;
  volatile uint8 * _16;
  long unsigned int _17;
  long unsigned int _18;
  sizetype _27;
  _Bool x.7_37;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  base.11_1 = (long unsigned int) base_25(D);
  _2 = base.11_1 + 128;
  RAM_26 = (const uint32 *) _2;
  # DEBUG RAM => RAM_26
  # DEBUG BEGIN_STMT
  # DEBUG valEndMbPointer => 0B
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb => 0B
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_id => 0B
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_data => 0B
  # DEBUG BEGIN_STMT
  # DEBUG arbitration_field_size => 8
  # DEBUG BEGIN_STMT
  _3 = maxMsgBuffNum_29(D) + 4294967295;
  can_real_payload_32 = FlexCAN_GetMbPayloadSize (base_25(D), _3);
  # DEBUG can_real_payload => can_real_payload_32
  # DEBUG BEGIN_STMT
  # DEBUG valEndMb => 0
  # DEBUG BEGIN_STMT
  # DEBUG valEndRam => 0
  # DEBUG BEGIN_STMT
  # DEBUG status => 0
  # DEBUG BEGIN_STMT
  _4 = maxMsgBuffNum_29(D) != 0;
  x ={v} _4;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.7_37 ={v} x;
  if (x.7_37 != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 15>; [50.00%]

  <bb 15> [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
  valEndMbPointer_34 = FlexCAN_GetMsgBuffRegion (base_25(D), _3);
  # DEBUG valEndMbPointer => valEndMbPointer_34
  # DEBUG BEGIN_STMT
  _5 = (long unsigned int) can_real_payload_32;
  valEndMbPointer.12_6 = (long unsigned int) valEndMbPointer_34;
  _7 = _5 + valEndMbPointer.12_6;
  valEndMb_35 = _7 + 8;
  # DEBUG valEndMb => valEndMb_35
  # DEBUG BEGIN_STMT
  _8 = RAM_26 + 1536;
  valEndRam_36 = (uint32) _8;
  # DEBUG valEndRam => valEndRam_36
  # DEBUG BEGIN_STMT
  if (valEndMb_35 > valEndRam_36)
    goto <bb 13>; [35.00%]
  else
    goto <bb 5>; [65.00%]

  <bb 5> [local count: 69793]:
  _9 = FlexCAN_GetMaxMbNum (base_25(D));
  if (_9 < maxMsgBuffNum_29(D))
    goto <bb 13>; [52.23%]
  else
    goto <bb 6>; [47.77%]

  <bb 6> [local count: 33340]:
  # DEBUG status => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_11 ();
  # DEBUG BEGIN_STMT
  _10 ={v} base_25(D)->MCR;
  _11 = _10 & 4294967168;
  _12 = _3 & 127;
  _13 = _11 | _12;
  base_25(D)->MCR ={v} _13;
  # DEBUG BEGIN_STMT
  _14 ={v} base_25(D)->MCR;
  _15 = _14 & 536870912;
  if (_15 == 0)
    goto <bb 14>; [50.00%]
  else
    goto <bb 12>; [50.00%]

  <bb 14> [local count: 16670]:
  goto <bb 11>; [100.00%]

  <bb 7> [local count: 134876]:
  # DEBUG BEGIN_STMT
  flexcan_mb_41 = FlexCAN_GetMsgBuffRegion (base_25(D), _18);
  # DEBUG flexcan_mb => flexcan_mb_41
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_id => flexcan_mb_41 + 4
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_data => flexcan_mb_41 + 8
  # DEBUG BEGIN_STMT
  *flexcan_mb_41 ={v} 0;
  # DEBUG BEGIN_STMT
  MEM[(volatile uint32 *)flexcan_mb_41 + 4B] ={v} 0;
  # DEBUG BEGIN_STMT
  can_real_payload_45 = FlexCAN_GetMbPayloadSize (base_25(D), _18);
  # DEBUG can_real_payload => can_real_payload_45
  # DEBUG BEGIN_STMT
  # DEBUG databyte => 0
  goto <bb 9>; [100.00%]

  <bb 8> [local count: 1091270]:
  # DEBUG BEGIN_STMT
  _27 = databyte_20 + 8;
  _16 = flexcan_mb_41 + _27;
  *_16 ={v} 0;
  # DEBUG BEGIN_STMT
  databyte_48 = databyte_20 + 1;
  # DEBUG databyte => databyte_48

  <bb 9> [local count: 1226147]:
  # databyte_20 = PHI <0(7), databyte_48(8)>
  # DEBUG databyte => databyte_20
  # DEBUG BEGIN_STMT
  _17 = (long unsigned int) can_real_payload_45;
  if (_17 > databyte_20)
    goto <bb 8>; [89.00%]
  else
    goto <bb 10>; [11.00%]

  <bb 10> [local count: 134876]:
  # DEBUG BEGIN_STMT
  msgBuffIdx_46 = msgBuffIdx_19 + 1;
  # DEBUG msgBuffIdx => msgBuffIdx_46

  <bb 11> [local count: 151546]:
  # msgBuffIdx_19 = PHI <msgBuffIdx_46(10), 0(14)>
  # DEBUG msgBuffIdx => msgBuffIdx_19
  # DEBUG BEGIN_STMT
  _18 = (long unsigned int) msgBuffIdx_19;
  if (_18 < maxMsgBuffNum_29(D))
    goto <bb 7>; [89.00%]
  else
    goto <bb 12>; [11.00%]

  <bb 12> [local count: 33340]:
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_11 ();

  <bb 13> [local count: 107374]:
  # status_28 = PHI <4(5), 0(12), 4(4)>
  # DEBUG status => NULL
  # DEBUG BEGIN_STMT
  return status_28;

}


FlexCAN_SetTxMsgBuff (const struct FLEXCAN_Type * base, uint32 msgBuffIdx, const struct Flexcan_Ip_MsbuffCodeStatusType * cs, uint32 msgId, const uint8 * msgData, const boolean isRemote)
{
  volatile boolean x;
  volatile boolean x;
  uint32 ret;
  static const uint8 payload_code[65] = "\x00\x01\x02\x03\x04\x05\x06\x07\b\t\t\t\t\n\n\n\n\v\v\v\v\f\f\f\f\r\r\r\r\r\r\r\r\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0e\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f";
  volatile uint8 * flexcan_mb_data;
  volatile uint32 * flexcan_mb;
  uint8 payload_size;
  uint32 databyte;
  uint32 flexcan_mb_config;
  _Bool _1;
  long unsigned int _2;
  unsigned char _3;
  unsigned char _4;
  _Bool _5;
  long unsigned int _6;
  unsigned char _7;
  long unsigned int _8;
  long unsigned int _9;
  const uint32 * _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;
  volatile uint32 * _20;
  long unsigned int _21;
  long unsigned int _22;
  long unsigned int _23;
  const uint8 * _24;
  long unsigned int _25;
  volatile uint8 * _26;
  unsigned char _27;
  long unsigned int _28;
  long unsigned int _29;
  volatile uint8 * _30;
  unsigned char _31;
  long unsigned int _32;
  <unnamed type> _33;
  long unsigned int _34;
  long unsigned int _35;
  long unsigned int _36;
  long unsigned int _37;
  long unsigned int _38;
  <unnamed type> _39;
  long unsigned int _40;
  long unsigned int _41;
  long unsigned int _42;
  long unsigned int _43;
  long unsigned int _44;
  long unsigned int _45;
  long unsigned int _46;
  long unsigned int _47;
  long unsigned int _48;
  _Bool _49;
  long unsigned int _50;
  long unsigned int _51;
  long unsigned int _52;
  long unsigned int _53;
  long unsigned int _54;
  _Bool _55;
  long unsigned int _56;
  long unsigned int _57;
  long unsigned int _73;
  long unsigned int _80;
  long unsigned int _82;
  unsigned char _87;
  int _88;
  unsigned char _111;
  _Bool x.7_112;
  _Bool x.7_113;
  sizetype _116;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_config => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  flexcan_mb_78 = FlexCAN_GetMsgBuffRegion (base_75(D), msgBuffIdx_76(D));
  # DEBUG flexcan_mb => flexcan_mb_78
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_id => flexcan_mb_78 + 4
  # DEBUG BEGIN_STMT
  flexcan_mb_data_79 = flexcan_mb_78 + 8;
  # DEBUG flexcan_mb_data => flexcan_mb_data_79
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_data_32 => flexcan_mb_data_79
  # DEBUG BEGIN_STMT
  # DEBUG msgData_32 => msgData_81(D)
  # DEBUG BEGIN_STMT
  _1 = cs_83(D) != 0B;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.7_113 ={v} x;
  if (x.7_113 != 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
  *flexcan_mb_78 ={v} 134217728;
  # DEBUG BEGIN_STMT
  MEM[(volatile uint32 *)flexcan_mb_78 + 4B] ={v} 0;
  # DEBUG BEGIN_STMT
  _2 = cs_83(D)->dataLen;
  _3 = (unsigned char) _2;
  _4 = FlexCAN_GetMbPayloadSize (base_75(D), msgBuffIdx_76(D));
  _5 = _3 <= _4;
  x ={v} _5;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.7_112 ={v} x;
  if (x.7_112 != 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
  _6 = cs_83(D)->dataLen;
  _7 = (unsigned char) _6;
  # DEBUG payloadSize => _7
  # DEBUG INLINE_ENTRY FlexCAN_ComputeDLCValue
  # DEBUG BEGIN_STMT
  # DEBUG ret => 255
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (_7 <= 64)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 26844]:
  # DEBUG BEGIN_STMT
  _73 = _6 & 255;
  _88 = (int) _73;
  _87 = payload_code[_88];
  ret_109 = (uint32) _87;
  # DEBUG ret => ret_109

  <bb 8> [local count: 53687]:
  # ret_110 = PHI <255(6), ret_109(7)>
  # DEBUG ret => ret_110
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _111 = (unsigned char) ret_110;
  # DEBUG payloadSize => NULL
  # DEBUG ret => NULL
  # DEBUG dlc_value => _111
  # DEBUG BEGIN_STMT
  if (msgData_81(D) != 0B)
    goto <bb 33>; [70.00%]
  else
    goto <bb 16>; [30.00%]

  <bb 33> [local count: 37581]:
  goto <bb 10>; [100.00%]

  <bb 9> [local count: 304064]:
  # DEBUG BEGIN_STMT
  _8 = databyte_63 >> 2;
  _9 = _8 * 4;
  _10 = msgData_81(D) + _9;
  _11 = *_10;
  _12 = _11 >> 24;
  _13 = _11 >> 8;
  _14 = _13 & 65280;
  _15 = _12 | _14;
  _16 = _11 << 8;
  _17 = _16 & 16711680;
  _18 = _15 | _17;
  _19 = _11 << 24;
  _116 = _9 + 8;
  _20 = flexcan_mb_78 + _116;
  _21 = _18 | _19;
  *_20 ={v} _21;
  # DEBUG BEGIN_STMT
  databyte_95 = databyte_63 + 4;
  # DEBUG databyte => databyte_95

  <bb 10> [local count: 341645]:
  # databyte_63 = PHI <databyte_95(9), 0(33)>
  # DEBUG databyte => databyte_63
  # DEBUG BEGIN_STMT
  _22 = cs_83(D)->dataLen;
  _23 = _22 & 4294967292;
  if (_23 > databyte_63)
    goto <bb 9>; [89.00%]
  else
    goto <bb 32>; [11.00%]

  <bb 32> [local count: 37581]:
  goto <bb 12>; [100.00%]

  <bb 11> [local count: 304064]:
  # DEBUG BEGIN_STMT
  _24 = msgData_81(D) + databyte_64;
  _25 = databyte_64 ^ 3;
  _26 = flexcan_mb_data_79 + _25;
  _27 = *_24;
  *_26 ={v} _27;
  # DEBUG BEGIN_STMT
  databyte_93 = databyte_64 + 1;
  # DEBUG databyte => databyte_93

  <bb 12> [local count: 341645]:
  # databyte_64 = PHI <databyte_93(11), databyte_63(32)>
  # DEBUG databyte => databyte_64
  # DEBUG BEGIN_STMT
  _28 = cs_83(D)->dataLen;
  if (_28 > databyte_64)
    goto <bb 11>; [89.00%]
  else
    goto <bb 13>; [11.00%]

  <bb 13> [local count: 37581]:
  # _80 = PHI <_28(12)>
  # DEBUG BEGIN_STMT
  payload_size_89 = FlexCAN_ComputePayloadSize (_111);
  # DEBUG payload_size => payload_size_89
  # DEBUG BEGIN_STMT
  # DEBUG databyte => _80
  goto <bb 15>; [100.00%]

  <bb 14> [local count: 304064]:
  # DEBUG BEGIN_STMT
  _29 = databyte_65 ^ 3;
  _30 = flexcan_mb_data_79 + _29;
  _31 = cs_83(D)->fd_padding;
  *_30 ={v} _31;
  # DEBUG BEGIN_STMT
  databyte_91 = databyte_65 + 1;
  # DEBUG databyte => databyte_91

  <bb 15> [local count: 341645]:
  # databyte_65 = PHI <_80(13), databyte_91(14)>
  # DEBUG databyte => databyte_65
  # DEBUG BEGIN_STMT
  _32 = (long unsigned int) payload_size_89;
  if (_32 > databyte_65)
    goto <bb 14>; [89.00%]
  else
    goto <bb 16>; [11.00%]

  <bb 16> [local count: 53687]:
  # DEBUG BEGIN_STMT
  _33 = cs_83(D)->msgIdType;
  if (_33 == 1)
    goto <bb 17>; [34.00%]
  else
    goto <bb 18>; [66.00%]

  <bb 17> [local count: 18254]:
  # DEBUG BEGIN_STMT
  _34 ={v} MEM[(volatile uint32 *)flexcan_mb_78 + 4B];
  _35 = _34 & 3758096384;
  MEM[(volatile uint32 *)flexcan_mb_78 + 4B] ={v} _35;
  # DEBUG BEGIN_STMT
  _36 ={v} MEM[(volatile uint32 *)flexcan_mb_78 + 4B];
  _37 = msgId_97(D) & 536870911;
  _38 = _36 | _37;
  MEM[(volatile uint32 *)flexcan_mb_78 + 4B] ={v} _38;
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_config => 6291456

  <bb 18> [local count: 53687]:
  # flexcan_mb_config_58 = PHI <0(16), 6291456(17)>
  # DEBUG flexcan_mb_config => flexcan_mb_config_58
  # DEBUG BEGIN_STMT
  _39 = cs_83(D)->msgIdType;
  if (_39 == 0)
    goto <bb 19>; [50.00%]
  else
    goto <bb 20>; [50.00%]

  <bb 19> [local count: 26844]:
  # DEBUG BEGIN_STMT
  _40 ={v} MEM[(volatile uint32 *)flexcan_mb_78 + 4B];
  _41 = _40 & 3758358527;
  MEM[(volatile uint32 *)flexcan_mb_78 + 4B] ={v} _41;
  # DEBUG BEGIN_STMT
  _42 ={v} MEM[(volatile uint32 *)flexcan_mb_78 + 4B];
  _43 = msgId_97(D) << 18;
  _44 = _43 & 536608768;
  _45 = _42 | _44;
  MEM[(volatile uint32 *)flexcan_mb_78 + 4B] ={v} _45;
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_config => 0

  <bb 20> [local count: 53687]:
  # flexcan_mb_config_59 = PHI <flexcan_mb_config_58(18), 0(19)>
  # DEBUG flexcan_mb_config => flexcan_mb_config_59
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_config => flexcan_mb_config_59
  # DEBUG BEGIN_STMT
  _46 = ret_110 << 16;
  _47 = _46 & 983040;
  flexcan_mb_config_101 = _47 | flexcan_mb_config_59;
  # DEBUG flexcan_mb_config => flexcan_mb_config_101
  # DEBUG BEGIN_STMT
  _48 = cs_83(D)->code;
  if (_48 != 15)
    goto <bb 21>; [66.00%]
  else
    goto <bb 31>; [34.00%]

  <bb 21> [local count: 35433]:
  # DEBUG BEGIN_STMT
  if (_48 == 28)
    goto <bb 22>; [34.00%]
  else
    goto <bb 23>; [66.00%]

  <bb 22> [local count: 12047]:
  # DEBUG BEGIN_STMT
  flexcan_mb_config_104 = flexcan_mb_config_101 | 1048576;
  # DEBUG flexcan_mb_config => flexcan_mb_config_104
  goto <bb 25>; [100.00%]

  <bb 23> [local count: 23386]:
  # DEBUG BEGIN_STMT
  if (isRemote_102(D) != 0)
    goto <bb 24>; [50.00%]
  else
    goto <bb 25>; [50.00%]

  <bb 24> [local count: 11693]:
  # DEBUG BEGIN_STMT
  flexcan_mb_config_103 = flexcan_mb_config_101 | 1048576;
  # DEBUG flexcan_mb_config => flexcan_mb_config_103

  <bb 25> [local count: 35433]:
  # flexcan_mb_config_60 = PHI <flexcan_mb_config_104(22), flexcan_mb_config_101(23), flexcan_mb_config_103(24)>
  # DEBUG flexcan_mb_config => flexcan_mb_config_60
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_config => flexcan_mb_config_60
  # DEBUG BEGIN_STMT
  _49 = cs_83(D)->fd_enable;
  if (_49 != 0)
    goto <bb 26>; [50.00%]
  else
    goto <bb 27>; [50.00%]

  <bb 26> [local count: 17717]:
  # DEBUG BEGIN_STMT
  _50 = _48 << 24;
  _51 = _50 & 251658240;
  _52 = _51 | flexcan_mb_config_60;
  # DEBUG flexcan_mb_config => _52 | 2147483648
  # DEBUG BEGIN_STMT
  _82 = _52 & 4293918719;
  flexcan_mb_config_106 = _82 | 2147483648;
  # DEBUG flexcan_mb_config => flexcan_mb_config_106
  goto <bb 28>; [100.00%]

  <bb 27> [local count: 17717]:
  # DEBUG BEGIN_STMT
  _53 = _48 << 24;
  _54 = _53 & 251658240;
  flexcan_mb_config_105 = _54 | flexcan_mb_config_60;
  # DEBUG flexcan_mb_config => flexcan_mb_config_105

  <bb 28> [local count: 35433]:
  # flexcan_mb_config_61 = PHI <flexcan_mb_config_106(26), flexcan_mb_config_105(27)>
  # DEBUG flexcan_mb_config => flexcan_mb_config_61
  # DEBUG BEGIN_STMT
  _55 = cs_83(D)->enable_brs;
  if (_55 != 0)
    goto <bb 29>; [50.00%]
  else
    goto <bb 30>; [50.00%]

  <bb 29> [local count: 17717]:
  # DEBUG BEGIN_STMT
  flexcan_mb_config_107 = flexcan_mb_config_61 | 1073741824;
  # DEBUG flexcan_mb_config => flexcan_mb_config_107

  <bb 30> [local count: 35433]:
  # flexcan_mb_config_62 = PHI <flexcan_mb_config_61(28), flexcan_mb_config_107(29)>
  # DEBUG flexcan_mb_config => flexcan_mb_config_62
  # DEBUG BEGIN_STMT
  _56 ={v} *flexcan_mb_78;
  _57 = _56 | flexcan_mb_config_62;
  *flexcan_mb_78 ={v} _57;

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

}


FlexCAN_GetMsgBuff (const struct FLEXCAN_Type * base, uint32 msgBuffIdx, struct Flexcan_Ip_MsgBuffType * msgBuff)
{
  volatile boolean x;
  uint8 payload_size;
  uint8 flexcan_mb_dlc_value;
  uint32 mbWord;
  uint32 * msgBuff_data_32;
  const uint32 * flexcan_mb;
  uint8 i;
  long unsigned int _1;
  long unsigned int _2;
  unsigned char _3;
  _Bool _4;
  unsigned char _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;
  unsigned char _12;
  unsigned int _13;
  unsigned int _14;
  const uint32 * _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;
  uint32 * _24;
  long unsigned int _25;
  unsigned int _26;
  unsigned int _27;
  unsigned int _28;
  unsigned char _29;
  sizetype _30;
  const uint8 * _31;
  int _32;
  unsigned char _33;
  _Bool x.7_49;
  sizetype _51;
  sizetype _60;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  flexcan_mb_45 = FlexCAN_GetMsgBuffRegion (base_42(D), msgBuffIdx_43(D));
  # DEBUG flexcan_mb => flexcan_mb_45
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_id => flexcan_mb_45 + 4
  # DEBUG BEGIN_STMT
  # DEBUG D#1 => flexcan_mb_45 + 8
  # DEBUG flexcan_mb_data => D#1
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_data_32 => D#1
  # DEBUG BEGIN_STMT
  msgBuff_data_32_47 = &msgBuff_46(D)->data;
  # DEBUG msgBuff_data_32 => msgBuff_data_32_47
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 ={v} *flexcan_mb_45;
  _2 = _1 >> 16;
  _3 = (unsigned char) _2;
  flexcan_mb_dlc_value_48 = _3 & 15;
  # DEBUG flexcan_mb_dlc_value => flexcan_mb_dlc_value_48
  # DEBUG BEGIN_STMT
  payload_size_50 = FlexCAN_ComputePayloadSize (flexcan_mb_dlc_value_48);
  # DEBUG payload_size => payload_size_50
  # DEBUG BEGIN_STMT
  _4 = msgBuff_46(D) != 0B;
  x ={v} _4;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.7_49 ={v} x;
  if (x.7_49 != 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
  _5 = FlexCAN_GetMbPayloadSize (base_42(D), msgBuffIdx_43(D));
  if (_5 < payload_size_50)
    goto <bb 5>; [33.00%]
  else
    goto <bb 6>; [67.00%]

  <bb 5> [local count: 35433]:
  # DEBUG BEGIN_STMT
  payload_size_54 = FlexCAN_GetMbPayloadSize (base_42(D), msgBuffIdx_43(D));
  # DEBUG payload_size => payload_size_54

  <bb 6> [local count: 107374]:
  # payload_size_36 = PHI <payload_size_50(4), payload_size_54(5)>
  # DEBUG payload_size => payload_size_36
  # DEBUG BEGIN_STMT
  msgBuff_46(D)->dataLen = payload_size_36;
  # DEBUG BEGIN_STMT
  _6 ={v} *flexcan_mb_45;
  msgBuff_46(D)->cs = _6;
  # DEBUG BEGIN_STMT
  _7 = _6 & 2097152;
  if (_7 != 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 53687]:
  # DEBUG BEGIN_STMT
  _8 ={v} MEM[(const uint32 *)flexcan_mb_45 + 4B];
  msgBuff_46(D)->msgId = _8;
  goto <bb 9>; [100.00%]

  <bb 8> [local count: 53687]:
  # DEBUG BEGIN_STMT
  _9 ={v} MEM[(const uint32 *)flexcan_mb_45 + 4B];
  _10 = _9 >> 18;
  msgBuff_46(D)->msgId = _10;

  <bb 9> [local count: 107374]:
  # DEBUG BEGIN_STMT
  _11 = _6 & 65535;
  msgBuff_46(D)->time_stamp = _11;
  # DEBUG BEGIN_STMT
  # DEBUG i => 0
  goto <bb 11>; [100.00%]

  <bb 10> [local count: 868753]:
  # DEBUG BEGIN_STMT
  _12 = i_34 >> 2;
  _13 = (unsigned int) _12;
  _14 = _13 * 4;
  _51 = _14 + 8;
  _15 = flexcan_mb_45 + _51;
  mbWord_63 ={v} *_15;
  # DEBUG mbWord => mbWord_63
  # DEBUG BEGIN_STMT
  _16 = mbWord_63 >> 24;
  _17 = mbWord_63 >> 8;
  _18 = _17 & 65280;
  _19 = _16 | _18;
  _20 = mbWord_63 << 8;
  _21 = _20 & 16711680;
  _22 = _19 | _21;
  _23 = mbWord_63 << 24;
  _24 = msgBuff_data_32_47 + _14;
  _25 = _22 | _23;
  *_24 = _25;
  # DEBUG BEGIN_STMT
  i_65 = i_34 + 4;
  # DEBUG i => i_65

  <bb 11> [local count: 976127]:
  # i_34 = PHI <0(9), i_65(10)>
  # DEBUG i => i_34
  # DEBUG BEGIN_STMT
  _26 = (unsigned int) i_34;
  _27 = (unsigned int) payload_size_36;
  _28 = _27 & 4294967292;
  if (_26 < _28)
    goto <bb 10>; [89.00%]
  else
    goto <bb 15>; [11.00%]

  <bb 15> [local count: 107374]:
  goto <bb 13>; [100.00%]

  <bb 12> [local count: 868753]:
  # DEBUG BEGIN_STMT
  _29 = i_35 ^ 3;
  _30 = (sizetype) _29;
  _60 = _30 + 8;
  _31 = flexcan_mb_45 + _60;
  _32 = (int) i_35;
  _33 ={v} *_31;
  msgBuff_46(D)->data[_32] = _33;
  # DEBUG BEGIN_STMT
  i_62 = i_35 + 1;
  # DEBUG i => i_62

  <bb 13> [local count: 976127]:
  # i_35 = PHI <i_62(12), i_34(15)>
  # DEBUG i => i_35
  # DEBUG BEGIN_STMT
  if (i_35 < payload_size_36)
    goto <bb 12>; [89.00%]
  else
    goto <bb 14>; [11.00%]

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

}


FlexCAN_GetMsgBuffTimestamp (const struct FLEXCAN_Type * base, uint32 msgBuffIdx)
{
  const uint32 * flexcan_mb;
  uint32 timestamp;
  long unsigned int _1;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG timestamp => 0
  # DEBUG BEGIN_STMT
  flexcan_mb_6 = FlexCAN_GetMsgBuffRegion (base_3(D), msgBuffIdx_4(D));
  # DEBUG flexcan_mb => flexcan_mb_6
  # DEBUG BEGIN_STMT
  _1 ={v} *flexcan_mb_6;
  timestamp_7 = _1 & 65535;
  # DEBUG timestamp => timestamp_7
  # DEBUG BEGIN_STMT
  return timestamp_7;

}


FlexCAN_SetRxMsgBuff (const struct FLEXCAN_Type * base, uint32 msgBuffIdx, const struct Flexcan_Ip_MsbuffCodeStatusType * cs, uint32 msgId)
{
  volatile boolean x;
  volatile uint32 * flexcan_mb;
  _Bool _1;
  <unnamed type> _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;
  <unnamed type> _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;
  long unsigned int _26;
  long unsigned int _27;
  long unsigned int _28;
  _Bool x.7_50;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  flexcan_mb_36 = FlexCAN_GetMsgBuffRegion (base_33(D), msgBuffIdx_34(D));
  # DEBUG flexcan_mb => flexcan_mb_36
  # DEBUG BEGIN_STMT
  # DEBUG flexcan_mb_id => flexcan_mb_36 + 4
  # DEBUG BEGIN_STMT
  _1 = cs_37(D) != 0B;
  x ={v} _1;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.7_50 ={v} x;
  if (x.7_50 != 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
  *flexcan_mb_36 ={v} 0;
  # DEBUG BEGIN_STMT
  MEM[(volatile uint32 *)flexcan_mb_36 + 4B] ={v} 0;
  # DEBUG BEGIN_STMT
  _2 = cs_37(D)->msgIdType;
  if (_2 == 1)
    goto <bb 5>; [34.00%]
  else
    goto <bb 6>; [66.00%]

  <bb 5> [local count: 36507]:
  # DEBUG BEGIN_STMT
  _3 ={v} *flexcan_mb_36;
  _4 = _3 | 2097152;
  *flexcan_mb_36 ={v} _4;
  # DEBUG BEGIN_STMT
  _5 ={v} *flexcan_mb_36;
  _6 = _5 & 4290772991;
  *flexcan_mb_36 ={v} _6;
  # DEBUG BEGIN_STMT
  _7 ={v} MEM[(volatile uint32 *)flexcan_mb_36 + 4B];
  _8 = _7 & 3758096384;
  MEM[(volatile uint32 *)flexcan_mb_36 + 4B] ={v} _8;
  # DEBUG BEGIN_STMT
  _9 ={v} MEM[(volatile uint32 *)flexcan_mb_36 + 4B];
  _10 = msgId_43(D) & 536870911;
  _11 = _9 | _10;
  MEM[(volatile uint32 *)flexcan_mb_36 + 4B] ={v} _11;

  <bb 6> [local count: 107374]:
  # DEBUG BEGIN_STMT
  _12 = cs_37(D)->msgIdType;
  if (_12 == 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 53687]:
  # DEBUG BEGIN_STMT
  _13 ={v} *flexcan_mb_36;
  _14 = _13 & 4288675839;
  *flexcan_mb_36 ={v} _14;
  # DEBUG BEGIN_STMT
  _15 ={v} MEM[(volatile uint32 *)flexcan_mb_36 + 4B];
  _16 = _15 & 3758358527;
  MEM[(volatile uint32 *)flexcan_mb_36 + 4B] ={v} _16;
  # DEBUG BEGIN_STMT
  _17 ={v} MEM[(volatile uint32 *)flexcan_mb_36 + 4B];
  _18 = msgId_43(D) << 18;
  _19 = _18 & 536608768;
  _20 = _17 | _19;
  MEM[(volatile uint32 *)flexcan_mb_36 + 4B] ={v} _20;

  <bb 8> [local count: 107374]:
  # DEBUG BEGIN_STMT
  _21 = cs_37(D)->code;
  if (_21 != 15)
    goto <bb 9>; [66.00%]
  else
    goto <bb 10>; [34.00%]

  <bb 9> [local count: 70867]:
  # DEBUG BEGIN_STMT
  _22 ={v} *flexcan_mb_36;
  _23 = _22 & 4043309055;
  *flexcan_mb_36 ={v} _23;
  # DEBUG BEGIN_STMT
  _24 ={v} *flexcan_mb_36;
  _25 = cs_37(D)->code;
  _26 = _25 << 24;
  _27 = _26 & 251658240;
  _28 = _24 | _27;
  *flexcan_mb_36 ={v} _28;

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

}


FlexCAN_EnableInterrupts (struct FLEXCAN_Type * pBase, uint8 u8Instance)
{
  uint32 u32MaxMbCrtlNum;
  int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  u32MaxMbCrtlNum_9 = FlexCAN_GetMaxMbNum (pBase_8(D));
  # DEBUG u32MaxMbCrtlNum => u32MaxMbCrtlNum_9
  # DEBUG BEGIN_STMT
  _1 = (int) u8Instance_10(D);
  _2 ={v} g_FlexCAN_u32ImaskBuff[_1][0];
  pBase_8(D)->IMASK1 ={v} _2;
  # DEBUG BEGIN_STMT
  if (u32MaxMbCrtlNum_9 > 32)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  _3 ={v} g_FlexCAN_u32ImaskBuff[_1][1];
  pBase_8(D)->IMASK2 ={v} _3;

  <bb 4> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  if (u32MaxMbCrtlNum_9 > 64)
    goto <bb 5>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  _4 ={v} g_FlexCAN_u32ImaskBuff[_1][2];
  pBase_8(D)->IMASK3 ={v} _4;

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

}


FlexCAN_DisableInterrupts (struct FLEXCAN_Type * pBase)
{
  uint32 u32MaxMbCrtlNum;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  u32MaxMbCrtlNum_5 = FlexCAN_GetMaxMbNum (pBase_4(D));
  # DEBUG u32MaxMbCrtlNum => u32MaxMbCrtlNum_5
  # DEBUG BEGIN_STMT
  pBase_4(D)->IMASK1 ={v} 0;
  # DEBUG BEGIN_STMT
  if (u32MaxMbCrtlNum_5 > 32)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  pBase_4(D)->IMASK2 ={v} 0;

  <bb 4> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  if (u32MaxMbCrtlNum_5 > 64)
    goto <bb 5>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 5> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  pBase_4(D)->IMASK3 ={v} 0;

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

}


FLEXCAN_ClearMsgBuffIntCmd (struct FLEXCAN_Type * pBase, uint8 u8Instance, uint32 mb_idx, boolean bIsIntActive)
{
  uint32 temp;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  int _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  int _16;
  long unsigned int _17;
  long unsigned int _18;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _1 = mb_idx_25(D) & 31;
  temp_26 = 1 << _1;
  # DEBUG temp => temp_26
  # DEBUG BEGIN_STMT
  if (mb_idx_25(D) <= 31)
    goto <bb 3>; [33.00%]
  else
    goto <bb 6>; [67.00%]

  <bb 3> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_18 ();
  # DEBUG BEGIN_STMT
  _2 ={v} pBase_29(D)->IMASK1;
  _3 = ~temp_26;
  _4 = (int) u8Instance_30(D);
  _5 = _2 & _3;
  g_FlexCAN_u32ImaskBuff[_4][0] ={v} _5;
  # DEBUG BEGIN_STMT
  if (bIsIntActive_32(D) != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 4> [local count: 177167401]:
  # DEBUG BEGIN_STMT
  _6 ={v} g_FlexCAN_u32ImaskBuff[_4][0];
  pBase_29(D)->IMASK1 ={v} _6;

  <bb 5> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_18 ();

  <bb 6> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _7 = mb_idx_25(D) + 4294967264;
  if (_7 <= 31)
    goto <bb 7>; [33.00%]
  else
    goto <bb 10>; [67.00%]

  <bb 7> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_18 ();
  # DEBUG BEGIN_STMT
  _8 ={v} pBase_29(D)->IMASK2;
  _9 = ~temp_26;
  _10 = (int) u8Instance_30(D);
  _11 = _8 & _9;
  g_FlexCAN_u32ImaskBuff[_10][1] ={v} _11;
  # DEBUG BEGIN_STMT
  if (bIsIntActive_32(D) != 0)
    goto <bb 8>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 8> [local count: 177167401]:
  # DEBUG BEGIN_STMT
  _12 ={v} g_FlexCAN_u32ImaskBuff[_10][1];
  pBase_29(D)->IMASK2 ={v} _12;

  <bb 9> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_18 ();

  <bb 10> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _13 = mb_idx_25(D) + 4294967232;
  if (_13 <= 31)
    goto <bb 11>; [33.00%]
  else
    goto <bb 14>; [67.00%]

  <bb 11> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_18 ();
  # DEBUG BEGIN_STMT
  _14 ={v} pBase_29(D)->IMASK3;
  _15 = ~temp_26;
  _16 = (int) u8Instance_30(D);
  _17 = _14 & _15;
  g_FlexCAN_u32ImaskBuff[_16][2] ={v} _17;
  # DEBUG BEGIN_STMT
  if (bIsIntActive_32(D) != 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 12> [local count: 177167401]:
  # DEBUG BEGIN_STMT
  _18 ={v} g_FlexCAN_u32ImaskBuff[_16][2];
  pBase_29(D)->IMASK3 ={v} _18;

  <bb 13> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_18 ();

  <bb 14> [local count: 1073741824]:
  return;

}


FlexCAN_SetMsgBuffIntCmd (struct FLEXCAN_Type * base, uint8 u8Instance, uint32 msgBuffIdx, boolean enable, boolean bIsIntActive)
{
  uint32 temp;
  long unsigned int _1;
  int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  int _6;
  long unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  int _12;
  long unsigned int _13;
  long unsigned int _14;
  long unsigned int _15;
  int _16;
  long unsigned int _17;
  long unsigned int _18;
  long unsigned int _19;
  long unsigned int _20;
  long unsigned int _21;
  int _22;
  long unsigned int _23;
  long unsigned int _24;
  long unsigned int _25;
  int _26;
  long unsigned int _27;
  long unsigned int _28;
  long unsigned int _29;
  long unsigned int _30;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG stat => 0
  # DEBUG BEGIN_STMT
  _1 = msgBuffIdx_37(D) & 31;
  temp_38 = 1 << _1;
  # DEBUG temp => temp_38
  # DEBUG BEGIN_STMT
  if (msgBuffIdx_37(D) <= 31)
    goto <bb 3>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  if (enable_40(D) != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 7>; [50.00%]

  <bb 4> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_18 ();
  # DEBUG BEGIN_STMT
  _2 = (int) u8Instance_42(D);
  _3 ={v} g_FlexCAN_u32ImaskBuff[_2][0];
  _4 = _3 | temp_38;
  g_FlexCAN_u32ImaskBuff[_2][0] ={v} _4;
  # DEBUG BEGIN_STMT
  if (bIsIntActive_49(D) != 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 6>; [50.00%]

  <bb 5> [local count: 134217728]:
  # DEBUG BEGIN_STMT
  _5 ={v} g_FlexCAN_u32ImaskBuff[_2][0];
  base_44(D)->IMASK1 ={v} _5;

  <bb 6> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_18 ();
  goto <bb 8>; [100.00%]

  <bb 7> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_18 ();
  # DEBUG BEGIN_STMT
  _6 = (int) u8Instance_42(D);
  _7 ={v} g_FlexCAN_u32ImaskBuff[_6][0];
  _8 = ~temp_38;
  _9 = _7 & _8;
  g_FlexCAN_u32ImaskBuff[_6][0] ={v} _9;
  # DEBUG BEGIN_STMT
  _10 ={v} g_FlexCAN_u32ImaskBuff[_6][0];
  base_44(D)->IMASK1 ={v} _10;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_18 ();

  <bb 8> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _11 = msgBuffIdx_37(D) + 4294967264;
  if (_11 <= 31)
    goto <bb 9>; [50.00%]
  else
    goto <bb 14>; [50.00%]

  <bb 9> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  if (enable_40(D) != 0)
    goto <bb 10>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 10> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_18 ();
  # DEBUG BEGIN_STMT
  _12 = (int) u8Instance_42(D);
  _13 ={v} g_FlexCAN_u32ImaskBuff[_12][1];
  _14 = _13 | temp_38;
  g_FlexCAN_u32ImaskBuff[_12][1] ={v} _14;
  # DEBUG BEGIN_STMT
  if (bIsIntActive_49(D) != 0)
    goto <bb 11>; [50.00%]
  else
    goto <bb 12>; [50.00%]

  <bb 11> [local count: 134217728]:
  # DEBUG BEGIN_STMT
  _15 ={v} g_FlexCAN_u32ImaskBuff[_12][1];
  base_44(D)->IMASK2 ={v} _15;

  <bb 12> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_18 ();
  goto <bb 14>; [100.00%]

  <bb 13> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_18 ();
  # DEBUG BEGIN_STMT
  _16 = (int) u8Instance_42(D);
  _17 ={v} g_FlexCAN_u32ImaskBuff[_16][1];
  _18 = ~temp_38;
  _19 = _17 & _18;
  g_FlexCAN_u32ImaskBuff[_16][1] ={v} _19;
  # DEBUG BEGIN_STMT
  _20 ={v} g_FlexCAN_u32ImaskBuff[_16][1];
  base_44(D)->IMASK2 ={v} _20;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_18 ();

  <bb 14> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  _21 = msgBuffIdx_37(D) + 4294967232;
  if (_21 <= 31)
    goto <bb 15>; [50.00%]
  else
    goto <bb 20>; [50.00%]

  <bb 15> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  if (enable_40(D) != 0)
    goto <bb 16>; [50.00%]
  else
    goto <bb 19>; [50.00%]

  <bb 16> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_18 ();
  # DEBUG BEGIN_STMT
  _22 = (int) u8Instance_42(D);
  _23 ={v} g_FlexCAN_u32ImaskBuff[_22][2];
  _24 = _23 | temp_38;
  g_FlexCAN_u32ImaskBuff[_22][2] ={v} _24;
  # DEBUG BEGIN_STMT
  if (bIsIntActive_49(D) != 0)
    goto <bb 17>; [50.00%]
  else
    goto <bb 18>; [50.00%]

  <bb 17> [local count: 134217728]:
  # DEBUG BEGIN_STMT
  _25 ={v} g_FlexCAN_u32ImaskBuff[_22][2];
  base_44(D)->IMASK3 ={v} _25;

  <bb 18> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_18 ();
  goto <bb 20>; [100.00%]

  <bb 19> [local count: 268435456]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_18 ();
  # DEBUG BEGIN_STMT
  _26 = (int) u8Instance_42(D);
  _27 ={v} g_FlexCAN_u32ImaskBuff[_26][2];
  _28 = ~temp_38;
  _29 = _27 & _28;
  g_FlexCAN_u32ImaskBuff[_26][2] ={v} _29;
  # DEBUG BEGIN_STMT
  _30 ={v} g_FlexCAN_u32ImaskBuff[_26][2];
  base_44(D)->IMASK3 ={v} _30;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_18 ();

  <bb 20> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  return 0;

}


FlexCAN_LockRxMsgBuff (const struct FLEXCAN_Type * base, uint32 msgBuffIdx)
{
  const uint32 * flexcan_mb;
  long unsigned int vol.9_6;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  flexcan_mb_5 = FlexCAN_GetMsgBuffRegion (base_2(D), msgBuffIdx_3(D));
  # DEBUG flexcan_mb => flexcan_mb_5
  # DEBUG BEGIN_STMT
  vol.9_6 ={v} *flexcan_mb_5;
  return;

}


FlexCAN_GetMbPayloadSize (const struct FLEXCAN_Type * base, uint32 maxMsgBuffNum)
{
  uint8 mb_size;
  uint8 i;
  uint8 maxMbBlockNum;
  uint8 can_real_payload;
  long unsigned int _1;
  long unsigned int _2;
  unsigned char _3;
  long unsigned int _4;

  <bb 2> [local count: 312727306]:
  # DEBUG BEGIN_STMT
  # DEBUG arbitration_field_size => 8
  # DEBUG BEGIN_STMT
  # DEBUG ramBlockSize => 512
  # DEBUG BEGIN_STMT
  # DEBUG can_real_payload => 8
  # DEBUG BEGIN_STMT
  # DEBUG maxMbBlockNum => 0
  # DEBUG BEGIN_STMT
  # DEBUG i => 0
  # DEBUG BEGIN_STMT
  # DEBUG mb_size => 0
  # DEBUG BEGIN_STMT
  # DEBUG i => 0
  goto <bb 5>; [100.00%]

  <bb 3> [local count: 805306368]:
  # DEBUG BEGIN_STMT
  can_real_payload_14 = FlexCAN_GetPayloadSize (base_12(D), i_8);
  # DEBUG can_real_payload => can_real_payload_14
  # DEBUG BEGIN_STMT
  mb_size_15 = can_real_payload_14 + 8;
  # DEBUG mb_size => mb_size_15
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) mb_size_15;
  _2 = 512 / _1;
  _3 = (unsigned char) _2;
  maxMbBlockNum_16 = _3 + maxMbBlockNum_7;
  # DEBUG maxMbBlockNum => maxMbBlockNum_16
  # DEBUG BEGIN_STMT
  _4 = (long unsigned int) maxMbBlockNum_16;
  if (_4 > maxMsgBuffNum_17(D))
    goto <bb 6>; [5.50%]
  else
    goto <bb 4>; [94.50%]

  <bb 4> [local count: 761014519]:
  # DEBUG BEGIN_STMT
  i_18 = i_8 + 1;
  # DEBUG i => i_18

  <bb 5> [local count: 1073741824]:
  # can_real_payload_5 = PHI <8(2), can_real_payload_14(4)>
  # maxMbBlockNum_7 = PHI <0(2), maxMbBlockNum_16(4)>
  # i_8 = PHI <0(2), i_18(4)>
  # DEBUG i => i_8
  # DEBUG maxMbBlockNum => maxMbBlockNum_7
  # DEBUG can_real_payload => can_real_payload_5
  # DEBUG BEGIN_STMT
  if (i_8 != 3)
    goto <bb 3>; [75.00%]
  else
    goto <bb 6>; [25.00%]

  <bb 6> [local count: 312727306]:
  # can_real_payload_6 = PHI <can_real_payload_14(3), can_real_payload_5(5)>
  # DEBUG can_real_payload => can_real_payload_6
  # DEBUG BEGIN_STMT
  return can_real_payload_6;

}


FlexCAN_GetPayloadSize (const struct FLEXCAN_Type * base, uint8 mbdsrIdx)
{
  uint32 payloadSize;
  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 _21;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  switch (mbdsrIdx_14(D)) <default: <L3> [25.00%], case 0: <L0> [25.00%], case 1: <L1> [25.00%], case 2: <L2> [25.00%]>

  <bb 3> [local count: 268435456]:
<L0>:
  # DEBUG BEGIN_STMT
  _1 ={v} base_16(D)->FDCTRL;
  _2 = _1 >> 16;
  _3 = _2 & 3;
  payloadSize_19 = 8 << _3;
  # DEBUG payloadSize => payloadSize_19
  # DEBUG BEGIN_STMT
  goto <bb 7>; [100.00%]

  <bb 4> [local count: 268435456]:
<L1>:
  # DEBUG BEGIN_STMT
  _4 ={v} base_16(D)->FDCTRL;
  _5 = _4 >> 19;
  _6 = _5 & 3;
  payloadSize_18 = 8 << _6;
  # DEBUG payloadSize => payloadSize_18
  # DEBUG BEGIN_STMT
  goto <bb 7>; [100.00%]

  <bb 5> [local count: 268435456]:
<L2>:
  # DEBUG BEGIN_STMT
  _7 ={v} base_16(D)->FDCTRL;
  _8 = _7 >> 22;
  _9 = _8 & 3;
  payloadSize_17 = 8 << _9;
  # DEBUG payloadSize => payloadSize_17
  # DEBUG BEGIN_STMT
  goto <bb 7>; [100.00%]

  <bb 6> [local count: 268435456]:
<L3>:
  # DEBUG BEGIN_STMT
  _10 ={v} base_16(D)->FDCTRL;
  _11 = _10 >> 16;
  _12 = _11 & 3;
  payloadSize_20 = 8 << _12;
  # DEBUG payloadSize => payloadSize_20
  # DEBUG BEGIN_STMT

  <bb 7> [local count: 1073741824]:
  # payloadSize_13 = PHI <payloadSize_19(3), payloadSize_18(4), payloadSize_17(5), payloadSize_20(6)>
  # DEBUG payloadSize => payloadSize_13
  # DEBUG BEGIN_STMT
  _21 = (uint8) payloadSize_13;
  return _21;

}


FlexCAN_SetPayloadSize (struct FLEXCAN_Type * base, const struct Flexcan_Ip_PayloadSizeType * payloadSize)
{
  volatile boolean x;
  volatile boolean x;
  volatile boolean x;
  uint32 tmp;
  <unnamed type> _1;
  _Bool _2;
  <unnamed type> _3;
  _Bool _4;
  <unnamed type> _5;
  _Bool _6;
  <unnamed type> _7;
  long unsigned int _8;
  long unsigned int _9;
  <unnamed type> _10;
  long unsigned int _11;
  long unsigned int _12;
  <unnamed type> _13;
  long unsigned int _14;
  long unsigned int _15;
  int iftmp.4_16;
  int iftmp.5_17;
  int iftmp.6_18;
  long unsigned int _33;
  long unsigned int _34;
  long unsigned int _35;
  long unsigned int _36;
  _Bool x.7_37;
  long unsigned int _38;
  long unsigned int _39;
  _Bool x.7_40;
  long unsigned int _41;
  long unsigned int _42;
  _Bool x.7_43;

  <bb 2> [local count: 214748]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG base => base_21(D)
  # DEBUG INLINE_ENTRY FlexCAN_IsFDEnabled
  # DEBUG BEGIN_STMT
  _33 ={v} MEM[(const struct FLEXCAN_Type *)base_21(D)].MCR;
  _34 = _33 & 2048;
  # DEBUG base => NULL
  if (_34 != 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 107374]:
  _1 = payloadSize_22(D)->payloadBlock0;
  if (_1 == 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 4> [local count: 53687]:

  <bb 5> [local count: 214748]:
  # iftmp.4_16 = PHI <1(3), 0(4), 1(2)>
  _2 = (_Bool) iftmp.4_16;
  x ={v} _2;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.7_37 ={v} x;
  if (x.7_37 != 0)
    goto <bb 7>; [50.00%]
  else
    goto <bb 22>; [50.00%]

  <bb 22> [local count: 107374]:

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

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

  <bb 7> [local count: 107374]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  # DEBUG base => base_21(D)
  # DEBUG INLINE_ENTRY FlexCAN_IsFDEnabled
  # DEBUG BEGIN_STMT
  _35 ={v} MEM[(const struct FLEXCAN_Type *)base_21(D)].MCR;
  _36 = _35 & 2048;
  # DEBUG base => NULL
  if (_36 != 0)
    goto <bb 10>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 8> [local count: 53687]:
  _3 = payloadSize_22(D)->payloadBlock1;
  if (_3 == 0)
    goto <bb 10>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 9> [local count: 26844]:

  <bb 10> [local count: 107374]:
  # iftmp.5_17 = PHI <1(8), 0(9), 1(7)>
  _4 = (_Bool) iftmp.5_17;
  x ={v} _4;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.7_40 ={v} x;
  if (x.7_40 != 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 21>; [50.00%]

  <bb 21> [local count: 53687]:

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

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

  <bb 12> [local count: 53687]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  # DEBUG base => base_21(D)
  # DEBUG INLINE_ENTRY FlexCAN_IsFDEnabled
  # DEBUG BEGIN_STMT
  _38 ={v} MEM[(const struct FLEXCAN_Type *)base_21(D)].MCR;
  _39 = _38 & 2048;
  # DEBUG base => NULL
  if (_39 != 0)
    goto <bb 15>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 13> [local count: 26844]:
  _5 = payloadSize_22(D)->payloadBlock2;
  if (_5 == 0)
    goto <bb 15>; [50.00%]
  else
    goto <bb 14>; [50.00%]

  <bb 14> [local count: 13422]:

  <bb 15> [local count: 53687]:
  # iftmp.6_18 = PHI <1(13), 0(14), 1(12)>
  _6 = (_Bool) iftmp.6_18;
  x ={v} _6;
  # DEBUG x => x
  # DEBUG INLINE_ENTRY DevAssert
  # DEBUG BEGIN_STMT
  x.7_43 ={v} x;
  if (x.7_43 != 0)
    goto <bb 17>; [50.00%]
  else
    goto <bb 20>; [50.00%]

  <bb 20> [local count: 26844]:

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

  <bb 23> [local count: 268435456]:
  goto <bb 16>; [100.00%]

  <bb 17> [local count: 26844]:
  # DEBUG BEGIN_STMT
  # DEBUG x => NULL
  # DEBUG BEGIN_STMT
  # DEBUG base => base_21(D)
  # DEBUG INLINE_ENTRY FlexCAN_IsFDEnabled
  # DEBUG BEGIN_STMT
  _41 ={v} MEM[(const struct FLEXCAN_Type *)base_21(D)].MCR;
  _42 = _41 & 2048;
  # DEBUG base => NULL
  if (_42 != 0)
    goto <bb 18>; [33.00%]
  else
    goto <bb 19>; [67.00%]

  <bb 18> [local count: 8858]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_09 ();
  # DEBUG BEGIN_STMT
  tmp_24 ={v} base_21(D)->FDCTRL;
  # DEBUG tmp => tmp_24
  # DEBUG BEGIN_STMT
  tmp_25 = tmp_24 & 4294770687;
  # DEBUG tmp => tmp_25
  # DEBUG BEGIN_STMT
  _7 = payloadSize_22(D)->payloadBlock0;
  _8 = (long unsigned int) _7;
  _9 = _8 << 16;
  tmp_26 = _9 | tmp_25;
  # DEBUG tmp => tmp_26
  # DEBUG BEGIN_STMT
  tmp_27 = tmp_26 & 4293394431;
  # DEBUG tmp => tmp_27
  # DEBUG BEGIN_STMT
  _10 = payloadSize_22(D)->payloadBlock1;
  _11 = (long unsigned int) _10;
  _12 = _11 << 19;
  tmp_28 = _12 | tmp_27;
  # DEBUG tmp => tmp_28
  # DEBUG BEGIN_STMT
  tmp_29 = tmp_28 & 4282384383;
  # DEBUG tmp => tmp_29
  # DEBUG BEGIN_STMT
  _13 = payloadSize_22(D)->payloadBlock2;
  _14 = (long unsigned int) _13;
  _15 = _14 << 22;
  tmp_30 = _15 | tmp_29;
  # DEBUG tmp => tmp_30
  # DEBUG BEGIN_STMT
  base_21(D)->FDCTRL ={v} tmp_30;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_09 ();

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

}


FlexCAN_EnableRxFifo (struct FLEXCAN_Type * base, uint32 numOfFilters)
{
  Flexcan_Ip_StatusType stat;
  uint32 i;
  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 _17;

  <bb 2> [local count: 357913939]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = FlexCAN_GetMaxMbNum (base_15(D));
  # DEBUG noOfMbx => (uint16) _1
  # DEBUG BEGIN_STMT
  # DEBUG stat => 0
  # DEBUG BEGIN_STMT
  _2 ={v} base_15(D)->MCR;
  _3 = _2 & 2048;
  if (_3 != 0)
    goto <bb 6>; [67.00%]
  else
    goto <bb 3>; [33.00%]

  <bb 3> [local count: 118111600]:
  # DEBUG stat => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_08 ();
  # DEBUG BEGIN_STMT
  _4 ={v} base_15(D)->MCR;
  _5 = _4 | 536870912;
  base_15(D)->MCR ={v} _5;
  # DEBUG BEGIN_STMT
  _6 ={v} base_15(D)->CTRL2;
  _7 = _6 & 4043309055;
  _8 = numOfFilters_20(D) << 24;
  _9 = _8 & 251658240;
  _10 = _7 | _9;
  base_15(D)->CTRL2 ={v} _10;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_08 ();
  # DEBUG BEGIN_STMT
  base_15(D)->RXFGMASK ={v} 4294967295;
  # DEBUG BEGIN_STMT
  # DEBUG i => 0
  goto <bb 5>; [100.00%]

  <bb 4> [local count: 955630223]:
  # DEBUG BEGIN_STMT
  base_15(D)->RXIMR[i_11] ={v} 536870911;
  # DEBUG BEGIN_STMT
  i_25 = i_11 + 1;
  # DEBUG i => i_25

  <bb 5> [local count: 1073741824]:
  # i_11 = PHI <0(3), i_25(4)>
  # DEBUG i => i_11
  # DEBUG BEGIN_STMT
  _17 = _1 & 65535;
  if (i_11 < _17)
    goto <bb 4>; [89.00%]
  else
    goto <bb 6>; [11.00%]

  <bb 6> [local count: 357913940]:
  # stat_16 = PHI <1(2), 0(5)>
  # DEBUG stat => NULL
  # DEBUG BEGIN_STMT
  return stat_16;

}


FlexCAN_Init (struct FLEXCAN_Type * base)
{
  Flexcan_Ip_StatusType returnResult;
  uint32 uS2Ticks;
  uint32 timeElapsed;
  uint32 timeStart;
  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 _26;

  <bb 2> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  _1 = OsIf_GetCounter (0);
  timeStart = _1;
  # DEBUG BEGIN_STMT
  # DEBUG timeElapsed => 0
  # DEBUG BEGIN_STMT
  uS2Ticks_20 = OsIf_MicrosToTicks (100, 0);
  # DEBUG uS2Ticks => uS2Ticks_20
  # DEBUG BEGIN_STMT
  # DEBUG returnResult => 0
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_07 ();
  # DEBUG BEGIN_STMT
  _2 ={v} base_22(D)->MCR;
  _3 = _2 | 33554432;
  base_22(D)->MCR ={v} _3;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_07 ();
  # DEBUG BEGIN_STMT
  goto <bb 4>; [100.00%]

  <bb 3> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _26 = OsIf_GetElapsed (&timeStart, 0);
  timeElapsed_27 = timeElapsed_9 + _26;
  # DEBUG timeElapsed => timeElapsed_27
  # DEBUG BEGIN_STMT
  if (uS2Ticks_20 <= timeElapsed_27)
    goto <bb 5>; [5.50%]
  else
    goto <bb 12>; [94.50%]

  <bb 12> [local count: 958878293]:

  <bb 4> [local count: 1073741824]:
  # timeElapsed_9 = PHI <0(2), timeElapsed_27(12)>
  # DEBUG timeElapsed => timeElapsed_9
  # DEBUG BEGIN_STMT
  _4 ={v} base_22(D)->MCR;
  _5 = _4 & 33554432;
  if (_5 != 0)
    goto <bb 3>; [94.50%]
  else
    goto <bb 5>; [5.50%]

  <bb 5> [local count: 114863532]:
  # returnResult_10 = PHI <3(3), 0(4)>
  # DEBUG returnResult => returnResult_10
  # DEBUG BEGIN_STMT
  if (returnResult_10 == 0)
    goto <bb 6>; [33.00%]
  else
    goto <bb 11>; [67.00%]

  <bb 6> [local count: 37904965]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_07 ();
  # DEBUG BEGIN_STMT
  _6 ={v} base_22(D)->MCR;
  _7 = _6 | 4096;
  base_22(D)->MCR ={v} _7;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_07 ();
  # DEBUG BEGIN_STMT
  FlexCAN_ClearRAM (base_22(D));
  # DEBUG BEGIN_STMT
  base_22(D)->RXMGMASK ={v} 4294967295;
  # DEBUG BEGIN_STMT
  base_22(D)->RX14MASK ={v} 4294967295;
  # DEBUG BEGIN_STMT
  base_22(D)->RX15MASK ={v} 4294967295;
  # DEBUG BEGIN_STMT
  base_22(D)->IMASK1 ={v} 0;
  # DEBUG BEGIN_STMT
  base_22(D)->IFLAG1 ={v} 4294967295;
  # DEBUG BEGIN_STMT
  _8 = FlexCAN_GetMaxMbNum (base_22(D));
  if (_8 > 32)
    goto <bb 7>; [50.00%]
  else
    goto <bb 8>; [50.00%]

  <bb 7> [local count: 18952483]:
  # DEBUG BEGIN_STMT
  base_22(D)->IMASK2 ={v} 0;
  # DEBUG BEGIN_STMT
  base_22(D)->IFLAG2 ={v} 4294967295;

  <bb 8> [local count: 37904965]:
  # DEBUG BEGIN_STMT
  if (_8 > 64)
    goto <bb 9>; [50.00%]
  else
    goto <bb 10>; [50.00%]

  <bb 9> [local count: 18952483]:
  # DEBUG BEGIN_STMT
  base_22(D)->IMASK3 ={v} 0;
  # DEBUG BEGIN_STMT
  base_22(D)->IFLAG3 ={v} 4294967295;

  <bb 10> [local count: 37904965]:
  # DEBUG BEGIN_STMT
  base_22(D)->ESR1 ={v} 3866630;
  # DEBUG BEGIN_STMT
  base_22(D)->CTRL1 ={v} 0;
  # DEBUG BEGIN_STMT
  base_22(D)->CTRL2 ={v} 1048576;
  # DEBUG BEGIN_STMT
  base_22(D)->CBT ={v} 0;
  # DEBUG BEGIN_STMT
  base_22(D)->EPRS ={v} 0;
  # DEBUG BEGIN_STMT
  base_22(D)->ENCBT ={v} 0;
  # DEBUG BEGIN_STMT
  base_22(D)->EDCBT ={v} 0;
  # DEBUG BEGIN_STMT
  base_22(D)->ETDC ={v} 0;
  # DEBUG BEGIN_STMT
  base_22(D)->FDCBT ={v} 0;
  # DEBUG BEGIN_STMT
  base_22(D)->FDCTRL ={v} 2147500288;

  <bb 11> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  timeStart ={v} {CLOBBER};
  return returnResult_10;

}


FlexCAN_SetErrIntCmd (struct FLEXCAN_Type * base, flexcan_int_type_t errType, boolean enable)
{
  uint32 temp;
  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;
  unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  temp_18 = (uint32) errType_17(D);
  # DEBUG temp => temp_18
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_06 ();
  # DEBUG BEGIN_STMT
  if (enable_21(D) != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 9>; [50.00%]

  <bb 3> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  if (errType_17(D) == 16385)
    goto <bb 4>; [34.00%]
  else
    goto <bb 5>; [66.00%]

  <bb 4> [local count: 182536110]:
  # DEBUG BEGIN_STMT
  _1 ={v} base_22(D)->CTRL2;
  _2 = _1 | 2147483648;
  base_22(D)->CTRL2 ={v} _2;
  # DEBUG BEGIN_STMT
  goto <bb 13>; [100.00%]

  <bb 5> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  if (errType_17(D) == 1024)
    goto <bb 7>; [34.00%]
  else
    goto <bb 6>; [66.00%]

  <bb 6> [local count: 233860969]:
  if (errType_17(D) == 2048)
    goto <bb 7>; [34.00%]
  else
    goto <bb 8>; [66.00%]

  <bb 7> [local count: 199986562]:
  # DEBUG BEGIN_STMT
  _3 ={v} base_22(D)->MCR;
  _4 = _3 | 2097152;
  base_22(D)->MCR ={v} _4;

  <bb 8> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  _5 ={v} base_22(D)->CTRL1;
  _6 = _5 | temp_18;
  base_22(D)->CTRL1 ={v} _6;
  goto <bb 13>; [100.00%]

  <bb 9> [local count: 536870913]:
  # DEBUG BEGIN_STMT
  if (errType_17(D) == 16385)
    goto <bb 10>; [34.00%]
  else
    goto <bb 11>; [66.00%]

  <bb 10> [local count: 182536110]:
  # DEBUG BEGIN_STMT
  _7 ={v} base_22(D)->CTRL2;
  _8 = _7 & 2147483647;
  base_22(D)->CTRL2 ={v} _8;
  # DEBUG BEGIN_STMT
  goto <bb 13>; [100.00%]

  <bb 11> [local count: 354334802]:
  # DEBUG BEGIN_STMT
  _9 ={v} base_22(D)->CTRL1;
  _10 = ~temp_18;
  _11 = _9 & _10;
  base_22(D)->CTRL1 ={v} _11;
  # DEBUG BEGIN_STMT
  temp_24 ={v} base_22(D)->CTRL1;
  # DEBUG temp => temp_24
  # DEBUG BEGIN_STMT
  _12 = temp_24 & 3072;
  if (_12 == 0)
    goto <bb 12>; [50.00%]
  else
    goto <bb 13>; [50.00%]

  <bb 12> [local count: 177167401]:
  # DEBUG BEGIN_STMT
  _13 ={v} base_22(D)->MCR;
  _14 = _13 & 4292870143;
  base_22(D)->MCR ={v} _14;

  <bb 13> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_06 ();
  return;

}


FlexCAN_Disable (struct FLEXCAN_Type * base)
{
  Flexcan_Ip_StatusType returnResult;
  uint32 uS2Ticks;
  uint32 timeElapsed;
  uint32 timeStart;
  long unsigned int _1;
  long unsigned int _2;
  signed int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _22;

  <bb 2> [local count: 276913048]:
  # DEBUG BEGIN_STMT
  _1 = OsIf_GetCounter (0);
  timeStart = _1;
  # DEBUG BEGIN_STMT
  # DEBUG timeElapsed => 0
  # DEBUG BEGIN_STMT
  uS2Ticks_16 = OsIf_MicrosToTicks (100, 0);
  # DEBUG uS2Ticks => uS2Ticks_16
  # DEBUG BEGIN_STMT
  # DEBUG returnResult => 0
  # DEBUG BEGIN_STMT
  _2 ={v} base_17(D)->MCR;
  _3 = (signed int) _2;
  if (_3 >= 0)
    goto <bb 3>; [41.48%]
  else
    goto <bb 6>; [58.52%]

  <bb 3> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_05 ();
  # DEBUG BEGIN_STMT
  _4 ={v} base_17(D)->MCR;
  _5 = _4 | 2147483648;
  base_17(D)->MCR ={v} _5;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_05 ();
  # DEBUG BEGIN_STMT
  goto <bb 5>; [100.00%]

  <bb 4> [local count: 1014686024]:
  # DEBUG BEGIN_STMT
  _22 = OsIf_GetElapsed (&timeStart, 0);
  timeElapsed_23 = timeElapsed_8 + _22;
  # DEBUG timeElapsed => timeElapsed_23
  # DEBUG BEGIN_STMT
  if (uS2Ticks_16 <= timeElapsed_23)
    goto <bb 6>; [5.50%]
  else
    goto <bb 7>; [94.50%]

  <bb 7> [local count: 958878294]:

  <bb 5> [local count: 1073741824]:
  # timeElapsed_8 = PHI <0(3), timeElapsed_23(7)>
  # DEBUG timeElapsed => timeElapsed_8
  # DEBUG BEGIN_STMT
  _6 ={v} base_17(D)->MCR;
  _7 = _6 & 1048576;
  if (_7 == 0)
    goto <bb 4>; [94.50%]
  else
    goto <bb 6>; [5.50%]

  <bb 6> [local count: 276913047]:
  # returnResult_9 = PHI <0(2), 3(4), 0(5)>
  # DEBUG returnResult => returnResult_9
  # DEBUG BEGIN_STMT
  timeStart ={v} {CLOBBER};
  return returnResult_9;

}


FlexCAN_ExitFreezeMode (struct FLEXCAN_Type * base)
{
  Flexcan_Ip_StatusType returnValue;
  uint32 uS2Ticks;
  uint32 timeElapsed;
  uint32 timeStart;
  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 _23;

  <bb 2> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  _1 = OsIf_GetCounter (0);
  timeStart = _1;
  # DEBUG BEGIN_STMT
  # DEBUG timeElapsed => 0
  # DEBUG BEGIN_STMT
  uS2Ticks_16 = OsIf_MicrosToTicks (100, 0);
  # DEBUG uS2Ticks => uS2Ticks_16
  # DEBUG BEGIN_STMT
  # DEBUG returnValue => 0
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_04 ();
  # DEBUG BEGIN_STMT
  _2 ={v} base_18(D)->MCR;
  _3 = _2 & 4026531839;
  base_18(D)->MCR ={v} _3;
  # DEBUG BEGIN_STMT
  _4 ={v} base_18(D)->MCR;
  _5 = _4 & 3221225471;
  base_18(D)->MCR ={v} _5;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_04 ();
  # DEBUG BEGIN_STMT
  goto <bb 4>; [100.00%]

  <bb 3> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _23 = OsIf_GetElapsed (&timeStart, 0);
  timeElapsed_24 = timeElapsed_8 + _23;
  # DEBUG timeElapsed => timeElapsed_24
  # DEBUG BEGIN_STMT
  if (uS2Ticks_16 <= timeElapsed_24)
    goto <bb 5>; [5.50%]
  else
    goto <bb 6>; [94.50%]

  <bb 6> [local count: 958878293]:

  <bb 4> [local count: 1073741824]:
  # timeElapsed_8 = PHI <0(2), timeElapsed_24(6)>
  # DEBUG timeElapsed => timeElapsed_8
  # DEBUG BEGIN_STMT
  _6 ={v} base_18(D)->MCR;
  _7 = _6 & 16777216;
  if (_7 != 0)
    goto <bb 3>; [94.50%]
  else
    goto <bb 5>; [5.50%]

  <bb 5> [local count: 114863532]:
  # returnValue_9 = PHI <3(3), 0(4)>
  # DEBUG returnValue => returnValue_9
  # DEBUG BEGIN_STMT
  timeStart ={v} {CLOBBER};
  return returnValue_9;

}


FlexCAN_Enable (struct FLEXCAN_Type * base)
{
  Flexcan_Ip_StatusType returnValue;
  uint32 uS2Ticks;
  uint32 timeElapsed;
  uint32 timeStart;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _21;

  <bb 2> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  _1 = OsIf_GetCounter (0);
  timeStart = _1;
  # DEBUG BEGIN_STMT
  # DEBUG timeElapsed => 0
  # DEBUG BEGIN_STMT
  uS2Ticks_14 = OsIf_MicrosToTicks (100, 0);
  # DEBUG uS2Ticks => uS2Ticks_14
  # DEBUG BEGIN_STMT
  # DEBUG returnValue => 0
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_03 ();
  # DEBUG BEGIN_STMT
  _2 ={v} base_16(D)->MCR;
  _3 = _2 & 2147483647;
  base_16(D)->MCR ={v} _3;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_03 ();
  # DEBUG BEGIN_STMT
  timeStart = 0;
  # DEBUG BEGIN_STMT
  goto <bb 4>; [100.00%]

  <bb 3> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _21 = OsIf_GetElapsed (&timeStart, 0);
  timeElapsed_22 = timeElapsed_6 + _21;
  # DEBUG timeElapsed => timeElapsed_22
  # DEBUG BEGIN_STMT
  if (uS2Ticks_14 <= timeElapsed_22)
    goto <bb 5>; [5.50%]
  else
    goto <bb 6>; [94.50%]

  <bb 6> [local count: 958878293]:

  <bb 4> [local count: 1073741824]:
  # timeElapsed_6 = PHI <0(2), timeElapsed_22(6)>
  # DEBUG timeElapsed => timeElapsed_6
  # DEBUG BEGIN_STMT
  _4 ={v} base_16(D)->MCR;
  _5 = _4 & 16777216;
  if (_5 == 0)
    goto <bb 3>; [94.50%]
  else
    goto <bb 5>; [5.50%]

  <bb 5> [local count: 114863532]:
  # returnValue_7 = PHI <3(3), 0(4)>
  # DEBUG returnValue => returnValue_7
  # DEBUG BEGIN_STMT
  timeStart ={v} {CLOBBER};
  return returnValue_7;

}


FlexCAN_EnterFreezeMode (struct FLEXCAN_Type * base)
{
  Flexcan_Ip_StatusType returnResult;
  uint32 uS2Ticks;
  uint32 timeElapsed;
  uint32 timeStart;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  signed int _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _30;

  <bb 2> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  _1 = OsIf_GetCounter (0);
  timeStart = _1;
  # DEBUG BEGIN_STMT
  # DEBUG timeElapsed => 0
  # DEBUG BEGIN_STMT
  uS2Ticks_21 = OsIf_MicrosToTicks (100, 0);
  # DEBUG uS2Ticks => uS2Ticks_21
  # DEBUG BEGIN_STMT
  # DEBUG returnResult => 0
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_02 ();
  # DEBUG BEGIN_STMT
  _2 ={v} base_23(D)->MCR;
  _3 = _2 | 1073741824;
  base_23(D)->MCR ={v} _3;
  # DEBUG BEGIN_STMT
  _4 ={v} base_23(D)->MCR;
  _5 = _4 | 268435456;
  base_23(D)->MCR ={v} _5;
  # DEBUG BEGIN_STMT
  _6 ={v} base_23(D)->MCR;
  _7 = (signed int) _6;
  if (_7 < 0)
    goto <bb 3>; [41.00%]
  else
    goto <bb 4>; [59.00%]

  <bb 3> [local count: 47094048]:
  # DEBUG BEGIN_STMT
  _8 ={v} base_23(D)->MCR;
  _9 = _8 & 2147483647;
  base_23(D)->MCR ={v} _9;

  <bb 4> [local count: 114863532]:
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_02 ();
  # DEBUG BEGIN_STMT
  timeStart = 0;
  # DEBUG BEGIN_STMT
  goto <bb 6>; [100.00%]

  <bb 5> [local count: 1014686025]:
  # DEBUG BEGIN_STMT
  _30 = OsIf_GetElapsed (&timeStart, 0);
  timeElapsed_31 = timeElapsed_12 + _30;
  # DEBUG timeElapsed => timeElapsed_31
  # DEBUG BEGIN_STMT
  if (uS2Ticks_21 <= timeElapsed_31)
    goto <bb 7>; [5.50%]
  else
    goto <bb 8>; [94.50%]

  <bb 8> [local count: 958878293]:

  <bb 6> [local count: 1073741824]:
  # timeElapsed_12 = PHI <0(4), timeElapsed_31(8)>
  # DEBUG timeElapsed => timeElapsed_12
  # DEBUG BEGIN_STMT
  _10 ={v} base_23(D)->MCR;
  _11 = _10 & 16777216;
  if (_11 == 0)
    goto <bb 5>; [94.50%]
  else
    goto <bb 7>; [5.50%]

  <bb 7> [local count: 114863532]:
  # returnResult_13 = PHI <3(5), 0(6)>
  # DEBUG returnResult => returnResult_13
  # DEBUG BEGIN_STMT
  timeStart ={v} {CLOBBER};
  return returnResult_13;

}


FlexCAN_GetMaxMbNum (const struct FLEXCAN_Type * base)
{
  static const uint32 maxMbNum[6] = {96, 64, 64, 32, 32, 32};
  static struct FLEXCAN_Type * const flexcanBase[6] = {1076903936B, 1076920320B, 1076936704B, 1076953088B, 1076969472B, 1076985856B};
  uint32 ret;
  uint32 i;
  struct FLEXCAN_Type * _1;

  <bb 2> [local count: 153437706]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 0
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG i => 0
  goto <bb 6>; [100.00%]

  <bb 3> [local count: 920304118]:
  # DEBUG BEGIN_STMT
  _1 = flexcanBase[i_2];
  if (_1 == base_7(D))
    goto <bb 4>; [30.00%]
  else
    goto <bb 5>; [70.00%]

  <bb 4> [local count: 276091235]:
  # DEBUG BEGIN_STMT
  ret_8 = maxMbNum[i_2];
  # DEBUG ret => ret_8

  <bb 5> [local count: 920304118]:
  # ret_3 = PHI <ret_4(3), ret_8(4)>
  # DEBUG ret => ret_3
  # DEBUG BEGIN_STMT
  i_9 = i_2 + 1;
  # DEBUG i => i_9

  <bb 6> [local count: 1073741824]:
  # i_2 = PHI <0(2), i_9(5)>
  # ret_4 = PHI <0(2), ret_3(5)>
  # DEBUG ret => ret_4
  # DEBUG i => i_2
  # DEBUG BEGIN_STMT
  if (i_2 != 6)
    goto <bb 3>; [85.71%]
  else
    goto <bb 7>; [14.29%]

  <bb 7> [local count: 153437707]:
  # ret_5 = PHI <ret_4(6)>
  # DEBUG BEGIN_STMT
  return ret_5;

}


FlexCAN_GetMsgBuffRegion (const struct FLEXCAN_Type * base, uint32 msgBuffIdx)
{
  volatile uint32 * pAddressRet;
  volatile uint32 * RAM;
  uint8 payload_size;
  uint32 mb_index;
  uint8 maxMbNum;
  uint8 i;
  uint32 msgBuffIdxBackup;
  uint32 ramBlockOffset;
  uint8 mb_size;
  long unsigned int base.0_1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _6;
  long unsigned int _7;
  unsigned char _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;
  long unsigned int _21;

  <bb 2> [local count: 312727306]:
  # DEBUG BEGIN_STMT
  # DEBUG arbitration_field_size => 8
  # DEBUG BEGIN_STMT
  # DEBUG mb_size => 0
  # DEBUG BEGIN_STMT
  # DEBUG ramBlockSize => 512
  # DEBUG BEGIN_STMT
  # DEBUG ramBlockOffset => 0
  # DEBUG BEGIN_STMT
  # DEBUG msgBuffIdxBackup => msgBuffIdx_23(D)
  # DEBUG BEGIN_STMT
  # DEBUG i => 0
  # DEBUG BEGIN_STMT
  # DEBUG maxMbNum => 0
  # DEBUG BEGIN_STMT
  # DEBUG mb_index => 0
  # DEBUG BEGIN_STMT
  # DEBUG payload_size => 0
  # DEBUG BEGIN_STMT
  base.0_1 = (long unsigned int) base_24(D);
  _2 = base.0_1 + 128;
  RAM_25 = (volatile uint32 *) _2;
  # DEBUG RAM => RAM_25
  # DEBUG BEGIN_STMT
  # DEBUG pAddressRet => 0B
  # DEBUG BEGIN_STMT
  # DEBUG i => 0
  goto <bb 5>; [100.00%]

  <bb 3> [local count: 805306368]:
  # DEBUG BEGIN_STMT
  payload_size_28 = FlexCAN_GetPayloadSize (base_24(D), i_16);
  # DEBUG payload_size => payload_size_28
  # DEBUG BEGIN_STMT
  mb_size_29 = payload_size_28 + 8;
  # DEBUG mb_size => mb_size_29
  # DEBUG BEGIN_STMT
  _3 = (long unsigned int) mb_size_29;
  _4 = 512 / _3;
  maxMbNum_30 = (uint8) _4;
  # DEBUG maxMbNum => maxMbNum_30
  # DEBUG BEGIN_STMT
  _21 = _4 & 255;
  if (msgBuffIdxBackup_15 < _21)
    goto <bb 6>; [5.50%]
  else
    goto <bb 4>; [94.50%]

  <bb 4> [local count: 761014519]:
  # DEBUG BEGIN_STMT
  ramBlockOffset_31 = ramBlockOffset_14 + 128;
  # DEBUG ramBlockOffset => ramBlockOffset_31
  # DEBUG BEGIN_STMT
  msgBuffIdxBackup_32 = msgBuffIdxBackup_15 - _21;
  # DEBUG msgBuffIdxBackup => msgBuffIdxBackup_32
  # DEBUG BEGIN_STMT
  i_33 = i_16 + 1;
  # DEBUG i => i_33

  <bb 5> [local count: 1073741824]:
  # mb_size_12 = PHI <0(2), mb_size_29(4)>
  # ramBlockOffset_14 = PHI <0(2), ramBlockOffset_31(4)>
  # msgBuffIdxBackup_15 = PHI <msgBuffIdx_23(D)(2), msgBuffIdxBackup_32(4)>
  # i_16 = PHI <0(2), i_33(4)>
  # maxMbNum_17 = PHI <0(2), maxMbNum_30(4)>
  # DEBUG maxMbNum => maxMbNum_17
  # DEBUG i => i_16
  # DEBUG msgBuffIdxBackup => msgBuffIdxBackup_15
  # DEBUG ramBlockOffset => ramBlockOffset_14
  # DEBUG mb_size => mb_size_12
  # DEBUG BEGIN_STMT
  if (i_16 != 3)
    goto <bb 3>; [75.00%]
  else
    goto <bb 6>; [25.00%]

  <bb 6> [local count: 312727306]:
  # mb_size_13 = PHI <mb_size_29(3), mb_size_12(5)>
  # maxMbNum_18 = PHI <maxMbNum_30(3), maxMbNum_17(5)>
  # ramBlockOffset_5 = PHI <ramBlockOffset_14(3), ramBlockOffset_14(5)>
  # msgBuffIdxBackup_22 = PHI <msgBuffIdxBackup_15(3), msgBuffIdxBackup_15(5)>
  # DEBUG maxMbNum => maxMbNum_18
  # DEBUG mb_size => mb_size_13
  # DEBUG BEGIN_STMT
  _6 = (long unsigned int) maxMbNum_18;
  _7 = msgBuffIdxBackup_22 % _6;
  _8 = mb_size_13 >> 2;
  _9 = (long unsigned int) _8;
  _10 = _7 * _9;
  mb_index_34 = ramBlockOffset_5 + _10;
  # DEBUG mb_index => mb_index_34
  # DEBUG BEGIN_STMT
  _11 = mb_index_34 * 4;
  pAddressRet_35 = RAM_25 + _11;
  # DEBUG pAddressRet => pAddressRet_35
  # DEBUG BEGIN_STMT
  return pAddressRet_35;

}


FlexCAN_ComputePayloadSize (uint8 dlcValue)
{
  uint8 ret;

  <bb 2> [local count: 1073741824]:
  # DEBUG BEGIN_STMT
  # DEBUG ret => 8
  # DEBUG BEGIN_STMT
  if (dlcValue_2(D) <= 8)
    goto <bb 4>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 536870912]:
  ret_3 = FlexCAN_ComputePayloadSize.part.0 (dlcValue_2(D));

  <bb 4> [local count: 1073741824]:
  # ret_1 = PHI <dlcValue_2(D)(2), ret_3(3)>
<L16>:
<L13>:
  # DEBUG ret => ret_1
  # DEBUG BEGIN_STMT
  return ret_1;

}


FlexCAN_ClearRAM (struct FLEXCAN_Type * base)
{
  volatile uint32 * RAM;
  uint32 RAM_size;
  uint32 databyte;
  long unsigned int _1;
  long unsigned int base.2_2;
  long unsigned int _3;
  long unsigned int _4;
  volatile uint32 * _5;
  long unsigned int _6;
  volatile uint32 * _7;
  long unsigned int _8;
  long unsigned int _9;
  volatile uint32 * _10;
  long unsigned int _11;
  long unsigned int _12;

  <bb 2> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = FlexCAN_GetMaxMbNum (base_20(D));
  RAM_size_21 = _1 * 4;
  # DEBUG RAM_size => RAM_size_21
  # DEBUG BEGIN_STMT
  # DEBUG RXIMR_size => _1
  # DEBUG BEGIN_STMT
  base.2_2 = (long unsigned int) base_20(D);
  _3 = base.2_2 + 128;
  RAM_22 = (volatile uint32 *) _3;
  # DEBUG RAM => RAM_22
  # DEBUG BEGIN_STMT
  # DEBUG databyte => 0
  goto <bb 4>; [100.00%]

  <bb 3> [local count: 955630220]:
  # DEBUG BEGIN_STMT
  _4 = databyte_13 * 4;
  _5 = RAM_22 + _4;
  *_5 ={v} 0;
  # DEBUG BEGIN_STMT
  databyte_38 = databyte_13 + 1;
  # DEBUG databyte => databyte_38

  <bb 4> [local count: 1073741821]:
  # databyte_13 = PHI <0(2), databyte_38(3)>
  # DEBUG databyte => databyte_13
  # DEBUG BEGIN_STMT
  if (databyte_13 < RAM_size_21)
    goto <bb 3>; [89.00%]
  else
    goto <bb 5>; [11.00%]

  <bb 5> [local count: 118111600]:
  # DEBUG BEGIN_STMT
  RAM_23 = &base_20(D)->RXIMR;
  # DEBUG RAM => RAM_23
  # DEBUG BEGIN_STMT
  # DEBUG databyte => 0
  goto <bb 7>; [100.00%]

  <bb 6> [local count: 955630224]:
  # DEBUG BEGIN_STMT
  _6 = databyte_14 * 4;
  _7 = RAM_23 + _6;
  *_7 ={v} 0;
  # DEBUG BEGIN_STMT
  databyte_36 = databyte_14 + 1;
  # DEBUG databyte => databyte_36

  <bb 7> [local count: 1073741824]:
  # databyte_14 = PHI <0(5), databyte_36(6)>
  # DEBUG databyte => databyte_14
  # DEBUG BEGIN_STMT
  if (_1 > databyte_14)
    goto <bb 6>; [89.00%]
  else
    goto <bb 8>; [11.00%]

  <bb 8> [local count: 118111601]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_01 ();
  # DEBUG BEGIN_STMT
  _8 ={v} base_20(D)->CTRL2;
  _9 = _8 | 268435456;
  base_20(D)->CTRL2 ={v} _9;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_01 ();
  # DEBUG BEGIN_STMT
  # DEBUG ram_addr => _3
  # DEBUG BEGIN_STMT
  # DEBUG RAM => RAM_22
  # DEBUG BEGIN_STMT
  base_20(D)->RXMGMASK ={v} 0;
  # DEBUG BEGIN_STMT
  base_20(D)->RXFGMASK ={v} 0;
  # DEBUG BEGIN_STMT
  base_20(D)->RX14MASK ={v} 0;
  # DEBUG BEGIN_STMT
  base_20(D)->RX15MASK ={v} 0;
  # DEBUG BEGIN_STMT
  # DEBUG databyte => 0
  goto <bb 10>; [100.00%]

  <bb 9> [local count: 118111601]:
  # DEBUG BEGIN_STMT
  _10 = RAM_22;
  *_10 ={v} 0;
  # DEBUG BEGIN_STMT
  # DEBUG databyte => 1

  <bb 10> [local count: 236223202]:
  # databyte_15 = PHI <0(8), 1(9)>
  # DEBUG databyte => databyte_15
  # DEBUG BEGIN_STMT
  if (databyte_15 == 0)
    goto <bb 9>; [50.00%]
  else
    goto <bb 11>; [50.00%]

  <bb 11> [local count: 118111601]:
  # DEBUG BEGIN_STMT
  SchM_Enter_Can_CAN_EXCLUSIVE_AREA_01 ();
  # DEBUG BEGIN_STMT
  _11 ={v} base_20(D)->CTRL2;
  _12 = _11 & 4026531839;
  base_20(D)->CTRL2 ={v} _12;
  # DEBUG BEGIN_STMT
  SchM_Exit_Can_CAN_EXCLUSIVE_AREA_01 ();
  return;

}


