Lpi2c_Ip_SetMasterHighSpeedMode (uint32 u32Instance, boolean bHighSpeedEnabled)
{
  struct Lpi2c_Ip_MasterStateType * master;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  master_4 = g_lpi2cMasterStatePtr[u32Instance_3(D)];
  # DEBUG master => master_4
  # DEBUG BEGIN_STMT
  if (bHighSpeedEnabled_5(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  master_4->operatingMode = 3;
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  master_4->operatingMode = 0;

  <bb 5> :
  return;

}


Lpi2c_Ip_SetSlaveCallback (uint32 u32Instance, void (*Lpi2c_Ip_SlaveCallbackType) (Lpi2c_Ip_SlaveEventType, uint8) slaveCallback)
{
  struct Lpi2c_Ip_SlaveStateType * slave;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  slave_3 = g_lpi2cSlaveStatePtr[u32Instance_2(D)];
  # DEBUG slave => slave_3
  # DEBUG BEGIN_STMT
  slave_3->slaveCallback = slaveCallback_4(D);
  return;

}


Lpi2c_Ip_SetMasterCallback (uint32 u32Instance, void (*Lpi2c_Ip_MasterCallbackType) (Lpi2c_Ip_MasterEventType, uint8) masterCallback)
{
  struct Lpi2c_Ip_MasterStateType * master;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  master_3 = g_lpi2cMasterStatePtr[u32Instance_2(D)];
  # DEBUG master => master_3
  # DEBUG BEGIN_STMT
  master_3->masterCallback = masterCallback_4(D);
  return;

}


Lpi2c_Ip_ModuleIRQHandler (uint32 instance)
{
  uint32 u32SlaveIsrStatus;
  uint32 u32SlaveIsrEnable;
  uint32 u32MasterIsrStatus;
  uint32 u32MasterIsrEnable;
  struct LPI2C_Type * baseAddr;
  struct Lpi2c_Ip_SlaveStateType * _1;
  struct Lpi2c_Ip_MasterStateType * _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  struct Lpi2c_Ip_SlaveStateType * _7;
  long unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  long unsigned int _11;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  u32MasterIsrEnable_13 = 0;
  # DEBUG u32MasterIsrEnable => u32MasterIsrEnable_13
  # DEBUG BEGIN_STMT
  u32MasterIsrStatus_14 = 0;
  # DEBUG u32MasterIsrStatus => u32MasterIsrStatus_14
  # DEBUG BEGIN_STMT
  u32SlaveIsrEnable_15 = 0;
  # DEBUG u32SlaveIsrEnable => u32SlaveIsrEnable_15
  # DEBUG BEGIN_STMT
  u32SlaveIsrStatus_16 = 0;
  # DEBUG u32SlaveIsrStatus => u32SlaveIsrStatus_16
  # DEBUG BEGIN_STMT
  baseAddr_19 = g_lpi2cBase[instance_18(D)];
  # DEBUG baseAddr => baseAddr_19
  # DEBUG BEGIN_STMT
  _1 = g_lpi2cSlaveStatePtr[instance_18(D)];
  if (_1 != 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 3>; [INV]

  <bb 3> :
  _2 = g_lpi2cMasterStatePtr[instance_18(D)];
  if (_2 != 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _3 ={v} baseAddr_19->MIER;
  u32MasterIsrEnable_22 = _3 & 32515;
  # DEBUG u32MasterIsrEnable => u32MasterIsrEnable_22
  # DEBUG BEGIN_STMT
  _4 ={v} baseAddr_19->MSR;
  u32MasterIsrStatus_23 = _4 & 32515;
  # DEBUG u32MasterIsrStatus => u32MasterIsrStatus_23
  # DEBUG BEGIN_STMT
  _5 ={v} baseAddr_19->SIER;
  u32SlaveIsrEnable_24 = _5 & 65295;
  # DEBUG u32SlaveIsrEnable => u32SlaveIsrEnable_24
  # DEBUG BEGIN_STMT
  _6 ={v} baseAddr_19->SSR;
  u32SlaveIsrStatus_25 = _6 & 65295;
  # DEBUG u32SlaveIsrStatus => u32SlaveIsrStatus_25
  # DEBUG BEGIN_STMT
  if (u32MasterIsrEnable_22 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

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

  <bb 6> :
  if (u32SlaveIsrEnable_24 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 7> :
  if (u32SlaveIsrStatus_25 != 0)
    goto <bb 8>; [INV]
  else
    goto <bb 11>; [INV]

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

  <bb 9> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterIRQHandler (instance_18(D));
  goto <bb 13>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_SlaveIRQHandler (instance_18(D));
  goto <bb 13>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _8 ={v} baseAddr_19->MSR;
  baseAddr_19->MSR ={v} _8;
  # DEBUG BEGIN_STMT
  _9 ={v} baseAddr_19->SSR;
  baseAddr_19->SSR ={v} _9;
  goto <bb 13>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  _10 ={v} baseAddr_19->MSR;
  baseAddr_19->MSR ={v} _10;
  # DEBUG BEGIN_STMT
  _11 ={v} baseAddr_19->SSR;
  baseAddr_19->SSR ={v} _11;

  <bb 13> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  return;

}


Lpi2c_Ip_SlaveIRQHandler (uint32 instance)
{
  boolean repeatStartDetect;
  boolean stopDetect;
  struct Lpi2c_Ip_SlaveStateType * slave;
  struct LPI2C_Type * baseAddr;
  unsigned char _1;
  unsigned char _2;
  unsigned char _3;
  unsigned char _4;
  _Bool _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  stopDetect_9 = 0;
  # DEBUG stopDetect => stopDetect_9
  repeatStartDetect_10 = 0;
  # DEBUG repeatStartDetect => repeatStartDetect_10
  # DEBUG BEGIN_STMT
  baseAddr_13 = g_lpi2cBase[instance_12(D)];
  # DEBUG baseAddr => baseAddr_13
  # DEBUG BEGIN_STMT
  slave_14 = g_lpi2cSlaveStatePtr[instance_12(D)];
  # DEBUG slave => slave_14
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_SlaveCheckDataEvent (instance_12(D), baseAddr_13, slave_14);
  # DEBUG BEGIN_STMT
  stopDetect_17 = LPI2C_Get_SlaveSTOPDetectEvent (baseAddr_13);
  # DEBUG stopDetect => stopDetect_17
  # DEBUG BEGIN_STMT
  repeatStartDetect_19 = LPI2C_Get_SlaveRepeatedStartEvent (baseAddr_13);
  # DEBUG repeatStartDetect => repeatStartDetect_19
  # DEBUG BEGIN_STMT
  if (repeatStartDetect_19 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = slave_14->repeatedStarts;
  _2 = _1;
  _3 = _2 + 1;
  slave_14->repeatedStarts = _3;
  # DEBUG BEGIN_STMT
  _4 = slave_14->repeatedStarts;
  if (_4 == 1)
    goto <bb 4>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 4> :
  _5 = slave_14->is10bitAddress;
  if (_5 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  repeatStartDetect_21 = 0;
  # DEBUG repeatStartDetect => repeatStartDetect_21
  # DEBUG BEGIN_STMT
  LPI2C_Clear_SlaveRepeatedStartEvent (baseAddr_13);

  <bb 6> :
  # repeatStartDetect_6 = PHI <repeatStartDetect_19(2), repeatStartDetect_19(3), repeatStartDetect_19(4), repeatStartDetect_21(5)>
  # DEBUG repeatStartDetect => repeatStartDetect_6
  # DEBUG BEGIN_STMT
  if (stopDetect_17 != 0)
    goto <bb 8>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 7> :
  if (repeatStartDetect_6 != 0)
    goto <bb 8>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_SlaveStopDetectHandler (baseAddr_13, slave_14);
  # DEBUG BEGIN_STMT
  if (stopDetect_17 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  slave_14->repeatedStarts = 0;

  <bb 10> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_SlaveCheckErrorEvent (baseAddr_13, slave_14);
  return;

}


Lpi2c_Ip_SlaveCheckErrorEvent (struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_SlaveStateType * slave)
{
  _Bool _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = LPI2C_Get_SlaveBitErrorEvent (baseAddr_4(D));
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_SlaveBitErrorEventHandler (baseAddr_4(D), slave_6(D));

  <bb 4> :
  return;

}


Lpi2c_Ip_SlaveBitErrorEventHandler (struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_SlaveStateType * slave)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  slave_2(D)->status = 1;
  # DEBUG BEGIN_STMT
  LPI2C_Clear_SlaveBitErrorEvent (baseAddr_4(D));
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveInt (baseAddr_4(D), 1, 0);
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_SlaveEndTransferHandler (slave_2(D), baseAddr_4(D));
  return;

}


Lpi2c_Ip_SlaveStopDetectHandler (struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_SlaveStateType * slave)
{
  <unnamed type> _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  LPI2C_Clear_SlaveSTOPDetectEvent (baseAddr_4(D));
  # DEBUG BEGIN_STMT
  LPI2C_Clear_SlaveRepeatedStartEvent (baseAddr_4(D));
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveInt (baseAddr_4(D), 1, 0);
  # DEBUG BEGIN_STMT
  _1 = slave_8(D)->status;
  if (_1 == 2)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  slave_8(D)->status = 0;

  <bb 4> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_SlaveEndTransferHandler (slave_8(D), baseAddr_4(D));
  return;

}


Lpi2c_Ip_SlaveCheckDataEvent (uint32 instance, struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_SlaveStateType * slave)
{
  boolean slaveInterrupt;
  _Bool _1;
  _Bool _2;
  _Bool _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  slaveInterrupt_7 = 0;
  # DEBUG slaveInterrupt => slaveInterrupt_7
  # DEBUG BEGIN_STMT
  _1 = LPI2C_Get_SlaveAddressValidEvent (baseAddr_9(D));
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_SlaveHandleAddressValidEvent (instance_11(D), baseAddr_9(D), slave_12(D));

  <bb 4> :
  # DEBUG BEGIN_STMT
  _2 = LPI2C_Get_SlaveTransmitDataEvent (baseAddr_9(D));
  if (_2 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  slaveInterrupt_16 = LPI2C_Get_SlaveInt (baseAddr_9(D), 1);
  # DEBUG slaveInterrupt => slaveInterrupt_16
  # DEBUG BEGIN_STMT
  if (slaveInterrupt_16 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_SlaveHandleTransmitDataEvent (baseAddr_9(D), slave_12(D));

  <bb 7> :
  # DEBUG BEGIN_STMT
  _3 = LPI2C_Get_SlaveReceiveDataEvent (baseAddr_9(D));
  if (_3 != 0)
    goto <bb 8>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  slaveInterrupt_20 = LPI2C_Get_SlaveInt (baseAddr_9(D), 2);
  # DEBUG slaveInterrupt => slaveInterrupt_20
  # DEBUG BEGIN_STMT
  if (slaveInterrupt_20 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_SlaveHandleReceiveDataEvent (baseAddr_9(D), slave_12(D));

  <bb 10> :
  return;

}


Lpi2c_Ip_SlaveEndTransferHandler (const struct Lpi2c_Ip_SlaveStateType * slave, struct LPI2C_Type * baseAddr)
{
  _Bool _1;
  _Bool _2;
  void (*<T2d7>) (Lpi2c_Ip_SlaveEventType, uint8) _3;
  void (*<T2d7>) (Lpi2c_Ip_SlaveEventType, uint8) _4;
  unsigned char _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = slave_9(D)->slaveListening;
  _2 = ~_1;
  if (_2 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_SlaveEndTransfer (baseAddr_10(D));

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  _4 = slave_9(D)->slaveCallback;
  _5 = slave_9(D)->callbackParam;
  _4 (7, _5);

  <bb 6> :
  # DEBUG BEGIN_STMT
  return;

}


Lpi2c_Ip_SlaveEndTransfer (struct LPI2C_Type * baseAddr)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveInt (baseAddr_2(D), 3847, 0);
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveEnable (baseAddr_2(D), 0);
  return;

}


Lpi2c_Ip_SlaveGetTransferStatus (uint32 instance, uint32 * bytesRemaining)
{
  const struct Lpi2c_Ip_SlaveStateType * slave;
  <unnamed type> _1;
  long unsigned int _2;
  Lpi2c_Ip_StatusType _9;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  slave_6 = g_lpi2cSlaveStatePtr[instance_5(D)];
  # DEBUG slave => slave_6
  # DEBUG BEGIN_STMT
  if (bytesRemaining_7(D) != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  _1 = slave_6->transferType;
  if (_1 == 1)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _2 = slave_6->bufferSize;
  *bytesRemaining_7(D) = _2;

  <bb 5> :
  # DEBUG BEGIN_STMT
  _9 = slave_6->status;
  return _9;

}


Lpi2c_Ip_SlaveSetBuffer (uint32 instance, uint8 * dataBuff, uint32 dataSize)
{
  struct Lpi2c_Ip_SlaveStateType * slave;
  Lpi2c_Ip_StatusType _8;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  slave_3 = g_lpi2cSlaveStatePtr[instance_2(D)];
  # DEBUG slave => slave_3
  # DEBUG BEGIN_STMT
  slave_3->dataBuffer = dataBuff_4(D);
  # DEBUG BEGIN_STMT
  slave_3->bufferSize = dataSize_6(D);
  # DEBUG BEGIN_STMT
  _8 = 0;
  return _8;

}


Lpi2c_Ip_SlaveDeinit (uint32 instance)
{
  const struct Lpi2c_Ip_SlaveStateType * slave;
  struct LPI2C_Type * baseAddr;
  <unnamed type> _1;
  _Bool _2;
  Lpi2c_Ip_StatusType _12;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  baseAddr_6 = g_lpi2cBase[instance_5(D)];
  # DEBUG baseAddr => baseAddr_6
  # DEBUG BEGIN_STMT
  slave_7 = g_lpi2cSlaveStatePtr[instance_5(D)];
  # DEBUG slave => slave_7
  # DEBUG BEGIN_STMT
  _1 = slave_7->transferType;
  if (_1 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  _2 = slave_7->slaveListening;
  if (_2 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveRxDMA (baseAddr_6, 0);
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveTxDMA (baseAddr_6, 0);

  <bb 5> :
  # DEBUG BEGIN_STMT
  g_lpi2cSlaveStatePtr[instance_5(D)] = 0B;
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveEnable (baseAddr_6, 0);
  # DEBUG BEGIN_STMT
  _12 = 0;
  return _12;

}


Lpi2c_Ip_StartListening (uint32 u32Instance)
{
  const struct Lpi2c_Ip_SlaveStateType * slave;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  slave_3 = g_lpi2cSlaveStatePtr[u32Instance_2(D)];
  # DEBUG slave => slave_3
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_SlaveActivateEvents (u32Instance_2(D));
  # DEBUG BEGIN_STMT
  return;

}


Lpi2c_Ip_SlaveInit (uint32 instance, const struct Lpi2c_Ip_SlaveConfigType * userConfigPtr)
{
  struct Lpi2c_Ip_SlaveStateType * slave;
  struct LPI2C_Type * baseAddr;
  struct Lpi2c_Ip_SlaveStateType * _1;
  void (*<T2d7>) (Lpi2c_Ip_SlaveEventType, uint8) _2;
  unsigned char _3;
  <unnamed type> _4;
  long unsigned int _5;
  long unsigned int _6;
  _Bool _7;
  _Bool _8;
  short unsigned int _9;
  _Bool _10;
  <unnamed type> _11;
  long unsigned int _12;
  long unsigned int _13;
  _Bool _14;
  Lpi2c_Ip_StatusType _40;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  baseAddr_18 = g_lpi2cBase[instance_17(D)];
  # DEBUG baseAddr => baseAddr_18
  # DEBUG BEGIN_STMT
  _1 = userConfigPtr_19(D)->slaveState;
  g_lpi2cSlaveStatePtr[instance_17(D)] = _1;
  # DEBUG BEGIN_STMT
  slave_21 = g_lpi2cSlaveStatePtr[instance_17(D)];
  # DEBUG slave => slave_21
  # DEBUG BEGIN_STMT
  slave_21->status = 0;
  # DEBUG BEGIN_STMT
  _2 = userConfigPtr_19(D)->slaveCallback;
  slave_21->slaveCallback = _2;
  # DEBUG BEGIN_STMT
  _3 = userConfigPtr_19(D)->callbackParam;
  slave_21->callbackParam = _3;
  # DEBUG BEGIN_STMT
  slave_21->dataBuffer = 0B;
  # DEBUG BEGIN_STMT
  slave_21->bufferSize = 0;
  # DEBUG BEGIN_STMT
  slave_21->direction = 0;
  # DEBUG BEGIN_STMT
  _4 = userConfigPtr_19(D)->transferType;
  slave_21->transferType = _4;
  # DEBUG BEGIN_STMT
  _5 = userConfigPtr_19(D)->dmaTxChannel;
  slave_21->dmaTxChannel = _5;
  # DEBUG BEGIN_STMT
  _6 = userConfigPtr_19(D)->dmaRxChannel;
  slave_21->dmaRxChannel = _6;
  # DEBUG BEGIN_STMT
  slave_21->isTransferInProgress ={v} 0;
  # DEBUG BEGIN_STMT
  _7 = userConfigPtr_19(D)->is10bitAddr;
  slave_21->is10bitAddress = _7;
  # DEBUG BEGIN_STMT
  slave_21->repeatedStarts = 0;
  # DEBUG BEGIN_STMT
  _8 = userConfigPtr_19(D)->slaveListening;
  slave_21->slaveListening = _8;
  # DEBUG BEGIN_STMT
  LPI2C_Init (baseAddr_18);
  # DEBUG BEGIN_STMT
  _9 = userConfigPtr_19(D)->slaveAddress;
  _10 = userConfigPtr_19(D)->is10bitAddr;
  Lpi2c_Ip_SlaveConigureAddress (baseAddr_18, _9, _10);
  # DEBUG BEGIN_STMT
  _11 = userConfigPtr_19(D)->operatingMode;
  Lpi2c_Ip_SlaveSetOperatingMode (instance_17(D), _11);
  # DEBUG BEGIN_STMT
  _12 = userConfigPtr_19(D)->u32GlitchFilterSDA;
  _13 = userConfigPtr_19(D)->u32GlitchFilterSCL;
  Lpi2c_Ip_SlaveConfigureGlitchFilter (baseAddr_18, _12, _13);
  # DEBUG BEGIN_STMT
  _14 = slave_21->slaveListening;
  if (_14 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_SlaveActivateEvents (instance_17(D));

  <bb 4> :
  # DEBUG BEGIN_STMT
  _40 = 0;
  return _40;

}


Lpi2c_Ip_SlaveConfigureGlitchFilter (struct LPI2C_Type * baseAddr, uint32 u32GlitchFilterSDA, uint32 u32GlitchFilterSCL)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveGlitchFilterSDA (baseAddr_2(D), u32GlitchFilterSDA_3(D));
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveGlitchFilterSCL (baseAddr_2(D), u32GlitchFilterSCL_5(D));
  return;

}


Lpi2c_Ip_SlaveConigureAddress (struct LPI2C_Type * baseAddr, uint16 slaveAddr, boolean is10bitAddr)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveAddr0 (baseAddr_3(D), slaveAddr_4(D));
  # DEBUG BEGIN_STMT
  if (is10bitAddr_6(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveAddrConfig (baseAddr_3(D), 1);
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveAddrConfig (baseAddr_3(D), 0);

  <bb 5> :
  return;

}


Lpi2c_Ip_SlaveActivateEvents (uint32 instance)
{
  const struct Lpi2c_Ip_SlaveStateType * slave;
  struct LPI2C_Type * baseAddr;
  <unnamed type> _1;
  <unnamed type> _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  baseAddr_7 = g_lpi2cBase[instance_6(D)];
  # DEBUG baseAddr => baseAddr_7
  # DEBUG BEGIN_STMT
  slave_8 = g_lpi2cSlaveStatePtr[instance_6(D)];
  # DEBUG slave => slave_8
  # DEBUG BEGIN_STMT
  _1 = slave_8->transferType;
  if (_1 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveInt (baseAddr_7, 3844, 1);

  <bb 4> :
  # DEBUG BEGIN_STMT
  _2 = slave_8->transferType;
  if (_2 == 1)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveInt (baseAddr_7, 3846, 1);

  <bb 6> :
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveEnable (baseAddr_7, 1);
  return;

}


Lpi2c_Ip_MasterIRQHandler (uint32 instance)
{
  struct Lpi2c_Ip_MasterStateType * master;
  struct LPI2C_Type * baseAddr;
  _Bool _1;
  void (*<T2dc>) (Lpi2c_Ip_MasterEventType, uint8) _2;
  void (*<T2dc>) (Lpi2c_Ip_MasterEventType, uint8) _3;
  unsigned char _4;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  baseAddr_9 = g_lpi2cBase[instance_8(D)];
  # DEBUG baseAddr => baseAddr_9
  # DEBUG BEGIN_STMT
  master_10 = g_lpi2cMasterStatePtr[instance_8(D)];
  # DEBUG master => master_10
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterCheckDataTxRxEvent (baseAddr_9, master_10);
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterCheckErrorEvents (baseAddr_9, master_10);
  # DEBUG BEGIN_STMT
  _1 = LPI2C_Get_MasterPinLowTimeoutEvent (baseAddr_9);
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = master_10->masterCallback;
  if (_2 != 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _3 = master_10->masterCallback;
  _4 = master_10->callbackParam;
  _3 (12, _4);

  <bb 5> :
  # DEBUG BEGIN_STMT
  LPI2C_Clear_MasterPinLowTimeoutEvent (baseAddr_9);

  <bb 6> :
  return;

}


Lpi2c_Ip_MasterCheckDataTxRxEvent (struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_MasterStateType * master)
{
  _Bool _1;
  _Bool _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = LPI2C_Get_MasterTransmitDataRequestEvent (baseAddr_6(D));
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterHandleTransmitDataRequest (baseAddr_6(D), master_8(D));

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterHandleReceiveDataReadyEvent (baseAddr_6(D), master_8(D));

  <bb 6> :
  return;

}


Lpi2c_Ip_MasterGetTransferStatus (uint32 instance, uint32 * bytesRemaining)
{
  const struct Lpi2c_Ip_MasterStateType * master;
  <unnamed type> _1;
  long unsigned int _2;
  Lpi2c_Ip_StatusType _9;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  master_6 = g_lpi2cMasterStatePtr[instance_5(D)];
  # DEBUG master => master_6
  # DEBUG BEGIN_STMT
  if (bytesRemaining_7(D) != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  _1 = master_6->transferType;
  if (_1 == 1)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _2 = master_6->bufferSize;
  *bytesRemaining_7(D) = _2;

  <bb 5> :
  # DEBUG BEGIN_STMT
  _9 ={v} master_6->status;
  return _9;

}


Lpi2c_Ip_MasterReceiveDataBlocking (uint32 instance, uint8 * rxBuff, uint32 rxSize, boolean sendStop, uint32 timeout)
{
  Lpi2c_Ip_StatusType retStatus;
  uint32 TimeoutTicks;
  uint32 ElapsedTicks;
  uint32 CurrentTicks;
  struct Lpi2c_Ip_MasterStateType * master;
  _Bool _1;
  long unsigned int _2;
  <unnamed type> _3;
  long unsigned int _32;
  Lpi2c_Ip_StatusType _37;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  CurrentTicks = 0;
  # DEBUG BEGIN_STMT
  ElapsedTicks_11 = 0;
  # DEBUG ElapsedTicks => ElapsedTicks_11
  # DEBUG BEGIN_STMT
  TimeoutTicks_14 = OsIf_MicrosToTicks (timeout_12(D), 1);
  # DEBUG TimeoutTicks => TimeoutTicks_14
  # DEBUG BEGIN_STMT
  retStatus_15 = 2;
  # DEBUG retStatus => retStatus_15
  # DEBUG BEGIN_STMT
  master_17 = g_lpi2cMasterStatePtr[instance_16(D)];
  # DEBUG master => master_17
  # DEBUG BEGIN_STMT
  _1 ={v} master_17->i2cIdle;
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  master_17->bufferSize = rxSize_18(D);
  # DEBUG BEGIN_STMT
  master_17->dataBuffer = rxBuff_20(D);
  # DEBUG BEGIN_STMT
  master_17->direction = 1;
  # DEBUG BEGIN_STMT
  master_17->sendStop = sendStop_23(D);
  # DEBUG BEGIN_STMT
  master_17->i2cIdle ={v} 0;
  # DEBUG BEGIN_STMT
  master_17->status ={v} 2;
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterInterruptReceiveInit (instance_16(D), rxSize_18(D));
  # DEBUG BEGIN_STMT
  _2 = OsIf_GetCounter (1);
  CurrentTicks = _2;

  <bb 4> :
  # ElapsedTicks_4 = PHI <ElapsedTicks_11(3), ElapsedTicks_33(5)>
  # DEBUG ElapsedTicks => ElapsedTicks_4
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterReceive (instance_16(D));
  # DEBUG BEGIN_STMT
  _32 = OsIf_GetElapsed (&CurrentTicks, 1);
  ElapsedTicks_33 = _32 + ElapsedTicks_4;
  # DEBUG ElapsedTicks => ElapsedTicks_33
  # DEBUG BEGIN_STMT
  _3 = Lpi2c_Ip_MasterGetTransferStatus (instance_16(D), 0B);
  if (_3 == 2)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  if (ElapsedTicks_33 < TimeoutTicks_14)
    goto <bb 4>; [INV]
  else
    goto <bb 6>; [INV]

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

  <bb 7> :
  # DEBUG BEGIN_STMT
  master_17->status ={v} 9;

  <bb 8> :
  # DEBUG BEGIN_STMT
  retStatus_36 ={v} master_17->status;
  # DEBUG retStatus => retStatus_36

  <bb 9> :
  # retStatus_5 = PHI <retStatus_15(2), retStatus_36(8)>
  # DEBUG retStatus => retStatus_5
  # DEBUG BEGIN_STMT
  _37 = retStatus_5;
  CurrentTicks ={v} {CLOBBER};
  return _37;

}


Lpi2c_Ip_MasterReceiveData (uint32 instance, uint8 * rxBuff, uint32 rxSize, boolean sendStop)
{
  Lpi2c_Ip_StatusType retStatus;
  struct Lpi2c_Ip_MasterStateType * master;
  struct LPI2C_Type * baseAddr;
  _Bool _1;
  _Bool _2;
  _Bool _3;
  _Bool _4;
  Lpi2c_Ip_StatusType _27;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  retStatus_7 = 2;
  # DEBUG retStatus => retStatus_7
  # DEBUG BEGIN_STMT
  baseAddr_10 = g_lpi2cBase[instance_9(D)];
  # DEBUG baseAddr => baseAddr_10
  # DEBUG BEGIN_STMT
  master_11 = g_lpi2cMasterStatePtr[instance_9(D)];
  # DEBUG master => master_11
  # DEBUG BEGIN_STMT
  _1 ={v} master_11->i2cIdle;
  _2 = ~_1;
  if (_2 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  retStatus_26 = 2;
  # DEBUG retStatus => retStatus_26
  goto <bb 7>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  retStatus_12 = 0;
  # DEBUG retStatus => retStatus_12
  # DEBUG BEGIN_STMT
  master_11->bufferSize = rxSize_13(D);
  # DEBUG BEGIN_STMT
  master_11->i2cIdle ={v} 0;
  # DEBUG BEGIN_STMT
  master_11->sendStop = sendStop_16(D);
  # DEBUG BEGIN_STMT
  master_11->dataBuffer = rxBuff_18(D);
  # DEBUG BEGIN_STMT
  master_11->direction = 1;
  # DEBUG BEGIN_STMT
  master_11->status ={v} 2;
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterInterruptReceiveInit (instance_9(D), rxSize_13(D));
  # DEBUG BEGIN_STMT
  _3 = Lpi2c_Ip_MasterCmdQueueEmpty (master_11);
  _4 = ~_3;
  if (_4 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  LPI2C_Set_MasterInt (baseAddr_10, 7171, 1);
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  LPI2C_Set_MasterInt (baseAddr_10, 7170, 1);

  <bb 7> :
  # retStatus_5 = PHI <retStatus_26(3), retStatus_12(5), retStatus_12(6)>
  # DEBUG retStatus => retStatus_5
  # DEBUG BEGIN_STMT
  _27 = retStatus_5;
  return _27;

}


Lpi2c_Ip_MasterInterruptReceiveInit (uint32 instance, uint32 rxSize)
{
  uint16 rxBytes;
  struct Lpi2c_Ip_MasterStateType * master;
  struct LPI2C_Type * baseAddr;
  unsigned char _1;
  unsigned char _2;
  long unsigned int _3;
  unsigned char _4;
  short unsigned int _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  baseAddr_9 = g_lpi2cBase[instance_8(D)];
  # DEBUG baseAddr => baseAddr_9
  # DEBUG BEGIN_STMT
  master_10 = g_lpi2cMasterStatePtr[instance_8(D)];
  # DEBUG master => master_10
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterSendAddress (baseAddr_9, master_10, 1);
  # DEBUG BEGIN_STMT
  _1 = (unsigned char) rxSize_12(D);
  _2 = _1 + 255;
  Lpi2c_Ip_MasterQueueCmd (baseAddr_9, master_10, 1, _2);
  # DEBUG BEGIN_STMT
  rxBytes_15 = LPI2C_Get_MasterRxFIFOSize (baseAddr_9);
  # DEBUG rxBytes => rxBytes_15
  # DEBUG BEGIN_STMT
  _3 = (long unsigned int) rxBytes_15;
  if (rxSize_12(D) < _3)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _4 = (unsigned char) rxSize_12(D);
  rxBytes_16 = (uint16) _4;
  # DEBUG rxBytes => rxBytes_16

  <bb 4> :
  # rxBytes_6 = PHI <rxBytes_15(2), rxBytes_16(3)>
  # DEBUG rxBytes => rxBytes_6
  # DEBUG BEGIN_STMT
  _5 = rxBytes_6 + 65535;
  LPI2C_Set_MasterRxFIFOWatermark (baseAddr_9, _5);
  return;

}


Lpi2c_Ip_MasterSendDataBlocking (uint32 instance, uint8 * txBuff, uint32 txSize, boolean sendStop, uint32 timeout)
{
  struct Lpi2c_Ip_MasterStateType * master;
  struct LPI2C_Type * baseAddr;
  Lpi2c_Ip_StatusType retStatus;
  uint32 TimeoutTicks;
  uint32 ElapsedTicks;
  uint32 CurrentTicks;
  _Bool _1;
  long unsigned int _2;
  <unnamed type> _3;
  long unsigned int _33;
  Lpi2c_Ip_StatusType _38;

  <bb 2> :
  # DEBUG BEGIN_STMT
  CurrentTicks = 0;
  # DEBUG BEGIN_STMT
  ElapsedTicks_11 = 0;
  # DEBUG ElapsedTicks => ElapsedTicks_11
  # DEBUG BEGIN_STMT
  TimeoutTicks_14 = OsIf_MicrosToTicks (timeout_12(D), 1);
  # DEBUG TimeoutTicks => TimeoutTicks_14
  # DEBUG BEGIN_STMT
  retStatus_15 = 2;
  # DEBUG retStatus => retStatus_15
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  baseAddr_17 = g_lpi2cBase[instance_16(D)];
  # DEBUG baseAddr => baseAddr_17
  # DEBUG BEGIN_STMT
  master_18 = g_lpi2cMasterStatePtr[instance_16(D)];
  # DEBUG master => master_18
  # DEBUG BEGIN_STMT
  _1 ={v} master_18->i2cIdle;
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  master_18->bufferSize = txSize_19(D);
  # DEBUG BEGIN_STMT
  master_18->dataBuffer = txBuff_21(D);
  # DEBUG BEGIN_STMT
  master_18->direction = 0;
  # DEBUG BEGIN_STMT
  master_18->sendStop = sendStop_24(D);
  # DEBUG BEGIN_STMT
  master_18->i2cIdle ={v} 0;
  # DEBUG BEGIN_STMT
  master_18->status ={v} 2;
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterInitSendTransfer (baseAddr_17, master_18);
  # DEBUG BEGIN_STMT
  _2 = OsIf_GetCounter (1);
  CurrentTicks = _2;

  <bb 4> :
  # ElapsedTicks_4 = PHI <ElapsedTicks_11(3), ElapsedTicks_34(5)>
  # DEBUG ElapsedTicks => ElapsedTicks_4
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterSend (instance_16(D));
  # DEBUG BEGIN_STMT
  _33 = OsIf_GetElapsed (&CurrentTicks, 1);
  ElapsedTicks_34 = _33 + ElapsedTicks_4;
  # DEBUG ElapsedTicks => ElapsedTicks_34
  # DEBUG BEGIN_STMT
  _3 = Lpi2c_Ip_MasterGetTransferStatus (instance_16(D), 0B);
  if (_3 == 2)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  if (ElapsedTicks_34 < TimeoutTicks_14)
    goto <bb 4>; [INV]
  else
    goto <bb 6>; [INV]

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

  <bb 7> :
  # DEBUG BEGIN_STMT
  master_18->status ={v} 9;

  <bb 8> :
  # DEBUG BEGIN_STMT
  retStatus_37 ={v} master_18->status;
  # DEBUG retStatus => retStatus_37

  <bb 9> :
  # retStatus_5 = PHI <retStatus_15(2), retStatus_37(8)>
  # DEBUG retStatus => retStatus_5
  # DEBUG BEGIN_STMT
  _38 = retStatus_5;
  CurrentTicks ={v} {CLOBBER};
  return _38;

}


Lpi2c_Ip_MasterInitSendTransfer (struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_MasterStateType * master)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterSendAddress (baseAddr_2(D), master_3(D), 0);
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterQueueData (baseAddr_2(D), master_3(D));
  # DEBUG BEGIN_STMT
  LPI2C_Set_MasterTxFIFOWatermark (baseAddr_2(D), 0);
  return;

}


Lpi2c_Ip_MasterSendData (uint32 instance, uint8 * txBuff, uint32 txSize, boolean sendStop)
{
  Lpi2c_Ip_StatusType retStatus;
  struct Lpi2c_Ip_MasterStateType * master;
  struct LPI2C_Type * baseAddr;
  _Bool _1;
  Lpi2c_Ip_StatusType _23;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  retStatus_4 = 2;
  # DEBUG retStatus => retStatus_4
  # DEBUG BEGIN_STMT
  baseAddr_7 = g_lpi2cBase[instance_6(D)];
  # DEBUG baseAddr => baseAddr_7
  # DEBUG BEGIN_STMT
  master_8 = g_lpi2cMasterStatePtr[instance_6(D)];
  # DEBUG master => master_8
  # DEBUG BEGIN_STMT
  _1 ={v} master_8->i2cIdle;
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  master_8->bufferSize = txSize_9(D);
  # DEBUG BEGIN_STMT
  master_8->dataBuffer = txBuff_11(D);
  # DEBUG BEGIN_STMT
  master_8->direction = 0;
  # DEBUG BEGIN_STMT
  master_8->sendStop = sendStop_14(D);
  # DEBUG BEGIN_STMT
  master_8->i2cIdle ={v} 0;
  # DEBUG BEGIN_STMT
  master_8->status ={v} 2;
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterSendAddress (baseAddr_7, master_8, 0);
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterQueueData (baseAddr_7, master_8);
  # DEBUG BEGIN_STMT
  LPI2C_Set_MasterTxFIFOWatermark (baseAddr_7, 0);
  # DEBUG BEGIN_STMT
  LPI2C_Set_MasterInt (baseAddr_7, 15361, 1);
  # DEBUG BEGIN_STMT
  retStatus_22 = 0;
  # DEBUG retStatus => retStatus_22

  <bb 4> :
  # retStatus_2 = PHI <retStatus_4(2), retStatus_22(3)>
  # DEBUG retStatus => retStatus_2
  # DEBUG BEGIN_STMT
  _23 = retStatus_2;
  return _23;

}


Lpi2c_Ip_MasterSetSlaveAddr (uint32 instance, const uint16 address, const boolean is10bitAddr)
{
  struct Lpi2c_Ip_MasterStateType * master;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  master_3 = g_lpi2cMasterStatePtr[instance_2(D)];
  # DEBUG master => master_3
  # DEBUG BEGIN_STMT
  master_3->slaveAddress = address_4(D);
  # DEBUG BEGIN_STMT
  master_3->is10bitAddr = is10bitAddr_6(D);
  return;

}


Lpi2c_Ip_MasterGetBaudRate (uint32 instance, uint32 inputClock, uint32 * baudRate)
{
  uint32 clkHi;
  uint32 clkLo;
  uint32 prescaler;
  const struct Lpi2c_Ip_MasterStateType * master;
  const struct LPI2C_Type * baseAddr;
  <unnamed type> _1;
  unsigned char _2;
  unsigned char _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _7;
  <unnamed type> _8;
  unsigned char _9;
  unsigned char _10;
  long unsigned int _11;
  long unsigned int _12;
  long unsigned int _13;
  long unsigned int _14;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  baseAddr_18 = g_lpi2cBase[instance_17(D)];
  # DEBUG baseAddr => baseAddr_18
  # DEBUG BEGIN_STMT
  master_19 = g_lpi2cMasterStatePtr[instance_17(D)];
  # DEBUG master => master_19
  # DEBUG BEGIN_STMT
  _1 = LPI2C_Get_MasterPrescaler (baseAddr_18);
  prescaler_21 = (uint32) _1;
  # DEBUG prescaler => prescaler_21
  # DEBUG BEGIN_STMT
  _2 = LPI2C_Get_MasterClockHighPeriod (baseAddr_18);
  clkHi_23 = (uint32) _2;
  # DEBUG clkHi => clkHi_23
  # DEBUG BEGIN_STMT
  _3 = LPI2C_Get_MasterClockLowPeriod (baseAddr_18);
  clkLo_25 = (uint32) _3;
  # DEBUG clkLo => clkLo_25
  # DEBUG BEGIN_STMT
  _4 = clkLo_25 + clkHi_23;
  _5 = _4 + 2;
  _6 = _5 << prescaler_21;
  _7 = inputClock_26(D) / _6;
  *baudRate_27(D) = _7;
  # DEBUG BEGIN_STMT
  _8 = master_19->operatingMode;
  if (_8 == 3)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _9 = LPI2C_Get_MasterClockHighPeriodHS (baseAddr_18);
  clkHi_30 = (uint32) _9;
  # DEBUG clkHi => clkHi_30
  # DEBUG BEGIN_STMT
  _10 = LPI2C_Get_MasterClockLowPeriodHS (baseAddr_18);
  clkLo_32 = (uint32) _10;
  # DEBUG clkLo => clkLo_32
  # DEBUG BEGIN_STMT
  _11 = clkLo_32 + clkHi_30;
  _12 = _11 + 2;
  _13 = _12 << prescaler_21;
  _14 = inputClock_26(D) / _13;
  *baudRate_27(D) = _14;

  <bb 4> :
  return;

}


Lpi2c_Ip_MasterDeinit (uint32 instance)
{
  const struct Lpi2c_Ip_MasterStateType * master;
  struct LPI2C_Type * baseAddr;
  Lpi2c_Ip_StatusType _7;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  baseAddr_3 = g_lpi2cBase[instance_2(D)];
  # DEBUG baseAddr => baseAddr_3
  # DEBUG BEGIN_STMT
  master_4 = g_lpi2cMasterStatePtr[instance_2(D)];
  # DEBUG master => master_4
  # DEBUG BEGIN_STMT
  g_lpi2cMasterStatePtr[instance_2(D)] = 0B;
  # DEBUG BEGIN_STMT
  LPI2C_Set_MasterEnable (baseAddr_3, 0);
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _7 = 0;
  return _7;

}


Lpi2c_Ip_MasterInit (uint32 instance, const struct Lpi2c_Ip_MasterConfigType * userConfigPtr)
{
  struct Lpi2c_Ip_MasterStateType * master;
  struct LPI2C_Type * baseAddr;
  struct Lpi2c_Ip_MasterStateType * _1;
  short unsigned int _2;
  _Bool _3;
  <unnamed type> _4;
  long unsigned int _5;
  long unsigned int _6;
  void (*<T2dc>) (Lpi2c_Ip_MasterEventType, uint8) _7;
  unsigned char _8;
  unsigned char _9;
  const struct Lpi2c_Ip_BaudRateType * _10;
  <unnamed type> _11;
  const struct Lpi2c_Ip_BaudRateType * _12;
  short unsigned int _13;
  _Bool _14;
  Lpi2c_Ip_StatusType _41;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  baseAddr_17 = g_lpi2cBase[instance_16(D)];
  # DEBUG baseAddr => baseAddr_17
  # DEBUG BEGIN_STMT
  _1 = userConfigPtr_18(D)->masterState;
  g_lpi2cMasterStatePtr[instance_16(D)] = _1;
  # DEBUG BEGIN_STMT
  master_20 = g_lpi2cMasterStatePtr[instance_16(D)];
  # DEBUG master => master_20
  # DEBUG BEGIN_STMT
  master_20->direction = 0;
  # DEBUG BEGIN_STMT
  master_20->dataBuffer = 0B;
  # DEBUG BEGIN_STMT
  master_20->bufferSize = 0;
  # DEBUG BEGIN_STMT
  master_20->status ={v} 0;
  # DEBUG BEGIN_STMT
  master_20->i2cIdle ={v} 1;
  # DEBUG BEGIN_STMT
  _2 = userConfigPtr_18(D)->slaveAddress;
  master_20->slaveAddress = _2;
  # DEBUG BEGIN_STMT
  _3 = userConfigPtr_18(D)->is10bitAddr;
  master_20->is10bitAddr = _3;
  # DEBUG BEGIN_STMT
  _4 = userConfigPtr_18(D)->transferType;
  master_20->transferType = _4;
  # DEBUG BEGIN_STMT
  _5 = userConfigPtr_18(D)->dmaTxChannel;
  master_20->dmaTxChannel = _5;
  # DEBUG BEGIN_STMT
  _6 = userConfigPtr_18(D)->dmaRxChannel;
  master_20->dmaRxChannel = _6;
  # DEBUG BEGIN_STMT
  _7 = userConfigPtr_18(D)->masterCallback;
  master_20->masterCallback = _7;
  # DEBUG BEGIN_STMT
  _8 = userConfigPtr_18(D)->callbackParam;
  master_20->callbackParam = _8;
  # DEBUG BEGIN_STMT
  _9 = userConfigPtr_18(D)->masterCode;
  master_20->masterCode = _9;
  # DEBUG BEGIN_STMT
  master_20->highSpeedInProgress = 0;
  # DEBUG BEGIN_STMT
  _10 = userConfigPtr_18(D)->baudrateParams;
  master_20->baudrateParams = _10;
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterInitModule (baseAddr_17, master_20);
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterConfigFeatures (baseAddr_17, userConfigPtr_18(D));
  # DEBUG BEGIN_STMT
  _11 = userConfigPtr_18(D)->operatingMode;
  _12 = master_20->baudrateParams;
  Lpi2c_Ip_MasterSetBaudRateInit (instance_16(D), _11, _12);
  # DEBUG BEGIN_STMT
  _13 = userConfigPtr_18(D)->slaveAddress;
  _14 = userConfigPtr_18(D)->is10bitAddr;
  Lpi2c_Ip_MasterSetSlaveAddr (instance_16(D), _13, _14);
  # DEBUG BEGIN_STMT
  LPI2C_Set_MasterEnable (baseAddr_17, 1);
  # DEBUG BEGIN_STMT
  _41 = 0;
  return _41;

}


Lpi2c_Ip_MasterConfigFeatures (struct LPI2C_Type * baseAddr, const struct Lpi2c_Ip_MasterConfigType * userConfigPtr)
{
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = userConfigPtr_6(D)->u32GlitchFilterSDA;
  LPI2C_Set_MasterGlitchFilterSDA (baseAddr_7(D), _1);
  # DEBUG BEGIN_STMT
  _2 = userConfigPtr_6(D)->u32GlitchFilterSCL;
  LPI2C_Set_MasterGlitchFilterSCL (baseAddr_7(D), _2);
  # DEBUG BEGIN_STMT
  _3 = userConfigPtr_6(D)->u32BusIdleTimeout;
  LPI2C_Set_MasterBusIdleTimeout (baseAddr_7(D), _3);
  # DEBUG BEGIN_STMT
  LPI2C_Set_MasterPinLowTimeoutConfiguration (baseAddr_7(D), 1);
  # DEBUG BEGIN_STMT
  _4 = userConfigPtr_6(D)->u32PinLowTimeout;
  LPI2C_Set_MasterPinLowTimeout (baseAddr_7(D), _4);
  return;

}


Lpi2c_Ip_MasterInitModule (struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_MasterStateType * master)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterResetQueue (master_2(D));
  # DEBUG BEGIN_STMT
  LPI2C_Init (baseAddr_4(D));
  return;

}


Lpi2c_Ip_MasterSetBaudRateInit (uint32 instance, const Lpi2c_Ip_ModeType operatingMode, const struct Lpi2c_Ip_BaudRateType * baudRate)
{
  Lpi2c_Ip_StatusType retStatus;
  const struct Lpi2c_Ip_MasterStateType * master;
  struct LPI2C_Type * baseAddr;
  _Bool _1;
  Lpi2c_Ip_StatusType _17;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  retStatus_4 = 2;
  # DEBUG retStatus => retStatus_4
  # DEBUG BEGIN_STMT
  master_7 = g_lpi2cMasterStatePtr[instance_6(D)];
  # DEBUG master => master_7
  # DEBUG BEGIN_STMT
  baseAddr_8 = g_lpi2cBase[instance_6(D)];
  # DEBUG baseAddr => baseAddr_8
  # DEBUG BEGIN_STMT
  _1 ={v} master_7->i2cIdle;
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  LPI2C_Set_MasterEnable (baseAddr_8, 0);
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_BaudRateConfig (baseAddr_8, baudRate_10(D));
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_HSBaudRateConfig (baseAddr_8, baudRate_10(D));
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterSetOperatingMode (instance_6(D), operatingMode_13(D));
  # DEBUG BEGIN_STMT
  LPI2C_Set_MasterEnable (baseAddr_8, 1);
  # DEBUG BEGIN_STMT
  retStatus_16 = 0;
  # DEBUG retStatus => retStatus_16

  <bb 4> :
  # retStatus_2 = PHI <retStatus_4(2), retStatus_16(3)>
  # DEBUG retStatus => retStatus_2
  # DEBUG BEGIN_STMT
  _17 = retStatus_2;
  return _17;

}


Lpi2c_Ip_MasterSetBaudRate (uint32 instance, Lpi2c_Ip_ModeType operatingMode, uint32 baudrate, uint32 inputClock)
{
  Lpi2c_Ip_StatusType retStatus;
  uint32 dataVd;
  uint32 setHold;
  uint32 clkHi;
  uint32 clkLo;
  uint32 clkTotal;
  uint32 prescaler;
  uint32 minPrescaler;
  struct Lpi2c_Ip_BaudRateType baudRateParams;
  const struct Lpi2c_Ip_MasterStateType * master;
  struct LPI2C_Type * baseAddr;
  _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;
  <unnamed type> _12;
  Lpi2c_Ip_StatusType _61;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  minPrescaler_25 = 0;
  # DEBUG minPrescaler => minPrescaler_25
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  retStatus_26 = 2;
  # DEBUG retStatus => retStatus_26
  # DEBUG BEGIN_STMT
  baseAddr_29 = g_lpi2cBase[instance_28(D)];
  # DEBUG baseAddr => baseAddr_29
  # DEBUG BEGIN_STMT
  master_30 = g_lpi2cMasterStatePtr[instance_28(D)];
  # DEBUG master => master_30
  # DEBUG BEGIN_STMT
  _1 ={v} master_30->i2cIdle;
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 24>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  LPI2C_Set_MasterEnable (baseAddr_29, 0);
  # DEBUG BEGIN_STMT
  if (baudrate_32(D) != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _2 = inputClock_35(D) + 4294967295;
  _3 = baudrate_32(D) * 128;
  _4 = _2 / _3;
  minPrescaler_36 = _4 + 1;
  # DEBUG minPrescaler => minPrescaler_36
  # DEBUG BEGIN_STMT
  prescaler_37 = 0;
  # DEBUG prescaler => prescaler_37
  goto <bb 7>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _5 = 1 << prescaler_13;
  if (minPrescaler_36 <= _5)
    goto <bb 8>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  prescaler_38 = prescaler_13 + 1;
  # DEBUG prescaler => prescaler_38

  <bb 7> :
  # prescaler_13 = PHI <prescaler_37(4), prescaler_38(6)>
  # DEBUG prescaler => prescaler_13
  # DEBUG BEGIN_STMT
  if (prescaler_13 <= 6)
    goto <bb 5>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _6 = baudrate_32(D) << prescaler_13;
  _7 = _6 >> 1;
  _8 = inputClock_35(D) + _7;
  _9 = baudrate_32(D) << prescaler_13;
  clkTotal_39 = _8 / _9;
  # DEBUG clkTotal => clkTotal_39
  goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  prescaler_33 = 7;
  # DEBUG prescaler => prescaler_33
  # DEBUG BEGIN_STMT
  clkTotal_34 = 128;
  # DEBUG clkTotal => clkTotal_34

  <bb 10> :
  # prescaler_14 = PHI <prescaler_13(8), prescaler_33(9)>
  # clkTotal_15 = PHI <clkTotal_39(8), clkTotal_34(9)>
  # DEBUG clkTotal => clkTotal_15
  # DEBUG prescaler => prescaler_14
  # DEBUG BEGIN_STMT
  if (clkTotal_15 > 128)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  clkTotal_40 = 128;
  # DEBUG clkTotal => clkTotal_40

  <bb 12> :
  # clkTotal_16 = PHI <clkTotal_15(10), clkTotal_40(11)>
  # DEBUG clkTotal => clkTotal_16
  # DEBUG BEGIN_STMT
  if (clkTotal_16 <= 1)
    goto <bb 13>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  clkHi_43 = 0;
  # DEBUG clkHi => clkHi_43
  # DEBUG BEGIN_STMT
  clkLo_44 = 0;
  # DEBUG clkLo => clkLo_44
  goto <bb 15>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  _10 = clkTotal_16 + 4294967294;
  clkHi_41 = _10 / 2;
  # DEBUG clkHi => clkHi_41
  # DEBUG BEGIN_STMT
  _11 = clkTotal_16 - clkHi_41;
  clkLo_42 = _11 + 4294967294;
  # DEBUG clkLo => clkLo_42

  <bb 15> :
  # clkLo_17 = PHI <clkLo_44(13), clkLo_42(14)>
  # clkHi_19 = PHI <clkHi_43(13), clkHi_41(14)>
  # DEBUG clkHi => clkHi_19
  # DEBUG clkLo => clkLo_17
  # DEBUG BEGIN_STMT
  if (clkHi_19 == 0)
    goto <bb 16>; [INV]
  else
    goto <bb 17>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  clkHi_45 = 1;
  # DEBUG clkHi => clkHi_45

  <bb 17> :
  # clkHi_20 = PHI <clkHi_19(15), clkHi_45(16)>
  # DEBUG clkHi => clkHi_20
  # DEBUG BEGIN_STMT
  if (clkLo_17 <= 2)
    goto <bb 18>; [INV]
  else
    goto <bb 19>; [INV]

  <bb 18> :
  # DEBUG BEGIN_STMT
  clkLo_46 = 3;
  # DEBUG clkLo => clkLo_46

  <bb 19> :
  # clkLo_18 = PHI <clkLo_17(17), clkLo_46(18)>
  # DEBUG clkLo => clkLo_18
  # DEBUG BEGIN_STMT
  setHold_47 = clkHi_20;
  # DEBUG setHold => setHold_47
  # DEBUG BEGIN_STMT
  dataVd_48 = clkHi_20 >> 1;
  # DEBUG dataVd => dataVd_48
  # DEBUG BEGIN_STMT
  if (setHold_47 <= 1)
    goto <bb 20>; [INV]
  else
    goto <bb 21>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  setHold_49 = 2;
  # DEBUG setHold => setHold_49

  <bb 21> :
  # setHold_21 = PHI <setHold_47(19), setHold_49(20)>
  # DEBUG setHold => setHold_21
  # DEBUG BEGIN_STMT
  if (dataVd_48 == 0)
    goto <bb 22>; [INV]
  else
    goto <bb 23>; [INV]

  <bb 22> :
  # DEBUG BEGIN_STMT
  dataVd_50 = 1;
  # DEBUG dataVd => dataVd_50

  <bb 23> :
  # dataVd_22 = PHI <dataVd_48(21), dataVd_50(22)>
  # DEBUG dataVd => dataVd_22
  # DEBUG BEGIN_STMT
  _12 = (<unnamed type>) prescaler_14;
  baudRateParams.prescaler = _12;
  # DEBUG BEGIN_STMT
  baudRateParams.dataValid = dataVd_22;
  # DEBUG BEGIN_STMT
  baudRateParams.setHold = setHold_21;
  # DEBUG BEGIN_STMT
  baudRateParams.clkHI = clkHi_20;
  # DEBUG BEGIN_STMT
  baudRateParams.clkLO = clkLo_18;
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_BaudRateConfig (baseAddr_29, &baudRateParams);
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterSetOperatingMode (instance_28(D), operatingMode_57(D));
  # DEBUG BEGIN_STMT
  LPI2C_Set_MasterEnable (baseAddr_29, 1);
  # DEBUG BEGIN_STMT
  retStatus_60 = 0;
  # DEBUG retStatus => retStatus_60

  <bb 24> :
  # retStatus_23 = PHI <retStatus_26(2), retStatus_60(23)>
  # DEBUG retStatus => retStatus_23
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _61 = retStatus_23;
  baudRateParams ={v} {CLOBBER};
  return _61;

}


Lpi2c_Ip_HSBaudRateConfig (struct LPI2C_Type * baseAddr, const struct Lpi2c_Ip_BaudRateType * baudRate)
{
  long unsigned int _1;
  unsigned char _2;
  long unsigned int _3;
  unsigned char _4;
  long unsigned int _5;
  unsigned char _6;
  long unsigned int _7;
  unsigned char _8;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = baudRate_10(D)->setHoldHS;
  _2 = (unsigned char) _1;
  LPI2C_Set_MasterDataValidDelayHS (baseAddr_11(D), _2);
  # DEBUG BEGIN_STMT
  _3 = baudRate_10(D)->dataValidHS;
  _4 = (unsigned char) _3;
  LPI2C_Set_MasterSetupHoldDelayHS (baseAddr_11(D), _4);
  # DEBUG BEGIN_STMT
  _5 = baudRate_10(D)->clkHIHS;
  _6 = (unsigned char) _5;
  LPI2C_Set_MasterClockHighPeriodHS (baseAddr_11(D), _6);
  # DEBUG BEGIN_STMT
  _7 = baudRate_10(D)->clkLOHS;
  _8 = (unsigned char) _7;
  LPI2C_Set_MasterClockLowPeriodHS (baseAddr_11(D), _8);
  return;

}


Lpi2c_Ip_BaudRateConfig (struct LPI2C_Type * baseAddr, const struct Lpi2c_Ip_BaudRateType * baudRate)
{
  <unnamed type> _1;
  long unsigned int _2;
  unsigned char _3;
  long unsigned int _4;
  unsigned char _5;
  long unsigned int _6;
  unsigned char _7;
  long unsigned int _8;
  unsigned char _9;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = baudRate_11(D)->prescaler;
  LPI2C_Set_MasterPrescaler (baseAddr_12(D), _1);
  # DEBUG BEGIN_STMT
  _2 = baudRate_11(D)->setHold;
  _3 = (unsigned char) _2;
  LPI2C_Set_MasterSetupHoldDelay (baseAddr_12(D), _3);
  # DEBUG BEGIN_STMT
  _4 = baudRate_11(D)->dataValid;
  _5 = (unsigned char) _4;
  LPI2C_Set_MasterDataValidDelay (baseAddr_12(D), _5);
  # DEBUG BEGIN_STMT
  _6 = baudRate_11(D)->clkHI;
  _7 = (unsigned char) _6;
  LPI2C_Set_MasterClockHighPeriod (baseAddr_12(D), _7);
  # DEBUG BEGIN_STMT
  _8 = baudRate_11(D)->clkLO;
  _9 = (unsigned char) _8;
  LPI2C_Set_MasterClockLowPeriod (baseAddr_12(D), _9);
  return;

}


Lpi2c_Ip_MasterReceive (uint32 instance)
{
  struct Lpi2c_Ip_MasterStateType * master;
  struct LPI2C_Type * baseAddr;
  _Bool _1;
  long unsigned int _2;
  _Bool _3;
  void (*<T2dc>) (Lpi2c_Ip_MasterEventType, uint8) _4;
  void (*<T2dc>) (Lpi2c_Ip_MasterEventType, uint8) _5;
  unsigned char _6;
  long unsigned int _7;
  short unsigned int _8;
  long unsigned int _9;
  long unsigned int _10;
  short unsigned int _11;
  short unsigned int _12;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  baseAddr_16 = g_lpi2cBase[instance_15(D)];
  # DEBUG baseAddr => baseAddr_16
  # DEBUG BEGIN_STMT
  master_17 = g_lpi2cMasterStatePtr[instance_15(D)];
  # DEBUG master => master_17
  # DEBUG BEGIN_STMT
  _1 = LPI2C_Get_MasterReceiveDataReadyEvent (baseAddr_16);
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterGetReceivedData (baseAddr_16, master_17);
  # DEBUG BEGIN_STMT
  _2 = master_17->bufferSize;
  if (_2 == 0)
    goto <bb 4>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _3 = master_17->sendStop;
  Lpi2c_Ip_MasterEndTransfer (baseAddr_16, master_17, _3, 0);
  # DEBUG BEGIN_STMT
  master_17->status ={v} 0;
  # DEBUG BEGIN_STMT
  _4 = master_17->masterCallback;
  if (_4 != 0B)
    goto <bb 5>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _5 = master_17->masterCallback;
  _6 = master_17->callbackParam;
  _5 (11, _6);
  goto <bb 8>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _7 = master_17->bufferSize;
  _8 = LPI2C_Get_MasterRxFIFOWatermark (baseAddr_16);
  _9 = (long unsigned int) _8;
  if (_7 <= _9)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _10 = master_17->bufferSize;
  _11 = (short unsigned int) _10;
  _12 = _11 + 65535;
  LPI2C_Set_MasterRxFIFOWatermark (baseAddr_16, _12);

  <bb 8> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterCheckErrorEvents (baseAddr_16, master_17);
  return;

}


Lpi2c_Ip_MasterGetReceivedData (const struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_MasterStateType * master)
{
  uint8 * _1;
  unsigned char _2;
  uint8 * _3;
  uint8 * _4;
  long unsigned int _5;
  long unsigned int _6;
  short unsigned int _7;
  long unsigned int _8;

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

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = master_13(D)->dataBuffer;
  _2 = LPI2C_Get_MasterRxData (baseAddr_11(D));
  *_1 = _2;
  # DEBUG BEGIN_STMT
  _3 = master_13(D)->dataBuffer;
  _4 = _3 + 1;
  master_13(D)->dataBuffer = _4;
  # DEBUG BEGIN_STMT
  _5 = master_13(D)->bufferSize;
  _6 = _5 + 4294967295;
  master_13(D)->bufferSize = _6;

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

  <bb 5> :
  _8 = master_13(D)->bufferSize;
  if (_8 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 6> :
  return;

}


Lpi2c_Ip_MasterSend (uint32 instance)
{
  boolean masterCmdQueueEmpty;
  struct Lpi2c_Ip_MasterStateType * master;
  struct LPI2C_Type * baseAddr;
  _Bool _1;
  _Bool _2;
  _Bool _3;
  uint8 * _4;
  long unsigned int _5;
  _Bool _6;
  void (*<T2dc>) (Lpi2c_Ip_MasterEventType, uint8) _7;
  void (*<T2dc>) (Lpi2c_Ip_MasterEventType, uint8) _8;
  unsigned char _9;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  masterCmdQueueEmpty_13 = 0;
  # DEBUG masterCmdQueueEmpty => masterCmdQueueEmpty_13
  # DEBUG BEGIN_STMT
  baseAddr_16 = g_lpi2cBase[instance_15(D)];
  # DEBUG baseAddr => baseAddr_16
  # DEBUG BEGIN_STMT
  master_17 = g_lpi2cMasterStatePtr[instance_15(D)];
  # DEBUG master => master_17
  # DEBUG BEGIN_STMT
  _1 = LPI2C_Get_MasterTransmitDataRequestEvent (baseAddr_16);
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = Lpi2c_Ip_MasterCmdQueueEmpty (master_17);
  _3 = ~_2;
  if (_3 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterSendQueuedCmd (baseAddr_16, master_17);
  goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  masterCmdQueueEmpty_20 = 1;
  # DEBUG masterCmdQueueEmpty => masterCmdQueueEmpty_20

  <bb 6> :
  # masterCmdQueueEmpty_10 = PHI <masterCmdQueueEmpty_13(2), masterCmdQueueEmpty_13(4), masterCmdQueueEmpty_20(5)>
  # DEBUG masterCmdQueueEmpty => masterCmdQueueEmpty_10
  # DEBUG BEGIN_STMT
  if (masterCmdQueueEmpty_10 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _4 = master_17->dataBuffer;
  if (_4 != 0B)
    goto <bb 8>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _5 = master_17->bufferSize;
  if (_5 == 0)
    goto <bb 9>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _6 = master_17->sendStop;
  Lpi2c_Ip_MasterEndTransfer (baseAddr_16, master_17, _6, 0);
  # DEBUG BEGIN_STMT
  master_17->status ={v} 0;
  # DEBUG BEGIN_STMT
  _7 = master_17->masterCallback;
  if (_7 != 0B)
    goto <bb 10>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _8 = master_17->masterCallback;
  _9 = master_17->callbackParam;
  _8 (11, _9);
  goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterQueueData (baseAddr_16, master_17);

  <bb 12> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterCheckErrorEvents (baseAddr_16, master_17);
  return;

}


Lpi2c_Ip_MasterCheckErrorEvents (struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_MasterStateType * master)
{
  _Bool _1;
  _Bool _2;
  _Bool _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = LPI2C_Get_MasterFIFOErrorEvent (baseAddr_8(D));
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  LPI2C_Get_MasterFIFOErrorEventHandler (baseAddr_8(D), master_10(D));

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  LPI2C_Get_MasterArbitrationLostEventHandler (baseAddr_8(D), master_10(D));

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

  <bb 7> :
  # DEBUG BEGIN_STMT
  LPI2C_Get_MasterNACKDetectEventHandler (baseAddr_8(D), master_10(D));

  <bb 8> :
  return;

}


LPI2C_Get_MasterArbitrationLostEventHandler (struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_MasterStateType * master)
{
  void (*<T2dc>) (Lpi2c_Ip_MasterEventType, uint8) _1;
  void (*<T2dc>) (Lpi2c_Ip_MasterEventType, uint8) _2;
  unsigned char _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  LPI2C_Clear_MasterArbitrationLostEvent (baseAddr_6(D));
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterEndTransfer (baseAddr_6(D), master_8(D), 0, 1);
  # DEBUG BEGIN_STMT
  master_8(D)->status ={v} 6;
  # DEBUG BEGIN_STMT
  _1 = master_8(D)->masterCallback;
  if (_1 != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = master_8(D)->masterCallback;
  _3 = master_8(D)->callbackParam;
  _2 (11, _3);

  <bb 4> :
  return;

}


LPI2C_Get_MasterNACKDetectEventHandler (struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_MasterStateType * master)
{
  void (*<T2dc>) (Lpi2c_Ip_MasterEventType, uint8) _1;
  void (*<T2dc>) (Lpi2c_Ip_MasterEventType, uint8) _2;
  unsigned char _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  master_6(D)->highSpeedInProgress = 0;
  # DEBUG BEGIN_STMT
  master_6(D)->status ={v} 3;
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterEndTransfer (baseAddr_9(D), master_6(D), 0, 1);
  # DEBUG BEGIN_STMT
  _1 = master_6(D)->masterCallback;
  if (_1 != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = master_6(D)->masterCallback;
  _3 = master_6(D)->callbackParam;
  _2 (11, _3);

  <bb 4> :
  # DEBUG BEGIN_STMT
  LPI2C_Clear_MasterNACKDetectEvent (baseAddr_9(D));
  return;

}


LPI2C_Get_MasterFIFOErrorEventHandler (struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_MasterStateType * master)
{
  <unnamed type> _1;
  void (*<T2dc>) (Lpi2c_Ip_MasterEventType, uint8) _2;
  void (*<T2dc>) (Lpi2c_Ip_MasterEventType, uint8) _3;
  unsigned char _4;

  <bb 2> :
  # DEBUG BEGIN_STMT
  LPI2C_Clear_MasterFIFOErrorEvent (baseAddr_8(D));
  # DEBUG BEGIN_STMT
  _1 = master_10(D)->operatingMode;
  if (_1 == 3)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  master_10(D)->highSpeedInProgress = 0;

  <bb 4> :
  # DEBUG BEGIN_STMT
  master_10(D)->status ={v} 1;
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterEndTransfer (baseAddr_8(D), master_10(D), 0, 1);
  # DEBUG BEGIN_STMT
  _2 = master_10(D)->masterCallback;
  if (_2 != 0B)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _3 = master_10(D)->masterCallback;
  _4 = master_10(D)->callbackParam;
  _3 (11, _4);

  <bb 6> :
  return;

}


Lpi2c_Ip_SlaveHandleReceiveDataEvent (const struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_SlaveStateType * slave)
{
  long unsigned int _1;
  void (*<T2d7>) (Lpi2c_Ip_SlaveEventType, uint8) _2;
  void (*<T2d7>) (Lpi2c_Ip_SlaveEventType, uint8) _3;
  unsigned char _4;
  long unsigned int _5;
  uint8 * _6;
  unsigned char _7;
  uint8 * _8;
  uint8 * _9;
  long unsigned int _10;
  long unsigned int _11;

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

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = slave_15(D)->slaveCallback;
  if (_2 != 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _3 = slave_15(D)->slaveCallback;
  _4 = slave_15(D)->callbackParam;
  _3 (3, _4);

  <bb 5> :
  # DEBUG BEGIN_STMT
  _5 = slave_15(D)->bufferSize;
  if (_5 == 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  slave_15(D)->status = 5;
  # DEBUG BEGIN_STMT
  LPI2C_Get_SlaveData (baseAddr_17(D));
  goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _6 = slave_15(D)->dataBuffer;
  _7 = LPI2C_Get_SlaveData (baseAddr_17(D));
  *_6 = _7;
  # DEBUG BEGIN_STMT
  _8 = slave_15(D)->dataBuffer;
  _9 = _8 + 1;
  slave_15(D)->dataBuffer = _9;
  # DEBUG BEGIN_STMT
  _10 = slave_15(D)->bufferSize;
  _11 = _10 + 4294967295;
  slave_15(D)->bufferSize = _11;

  <bb 8> :
  return;

}


Lpi2c_Ip_SlaveHandleTransmitDataEvent (struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_SlaveStateType * slave)
{
  _Bool _1;
  long unsigned int _2;
  void (*<T2d7>) (Lpi2c_Ip_SlaveEventType, uint8) _3;
  void (*<T2d7>) (Lpi2c_Ip_SlaveEventType, uint8) _4;
  unsigned char _5;
  long unsigned int _6;
  uint8 * _7;
  unsigned char _8;
  uint8 * _9;
  uint8 * _10;
  long unsigned int _11;
  long unsigned int _12;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = slave_17(D)->txUnderrunWarning;
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  slave_17(D)->status = 4;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _2 = slave_17(D)->bufferSize;
  if (_2 == 0)
    goto <bb 5>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _3 = slave_17(D)->slaveCallback;
  if (_3 != 0B)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _4 = slave_17(D)->slaveCallback;
  _5 = slave_17(D)->callbackParam;
  _4 (4, _5);

  <bb 7> :
  # DEBUG BEGIN_STMT
  _6 = slave_17(D)->bufferSize;
  if (_6 == 0)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  slave_17(D)->txUnderrunWarning = 1;
  # DEBUG BEGIN_STMT
  LPI2C_Transmit_SlaveData (baseAddr_20(D), 255);
  goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _7 = slave_17(D)->dataBuffer;
  _8 = *_7;
  LPI2C_Transmit_SlaveData (baseAddr_20(D), _8);
  # DEBUG BEGIN_STMT
  _9 = slave_17(D)->dataBuffer;
  _10 = _9 + 1;
  slave_17(D)->dataBuffer = _10;
  # DEBUG BEGIN_STMT
  _11 = slave_17(D)->bufferSize;
  _12 = _11 + 4294967295;
  slave_17(D)->bufferSize = _12;

  <bb 10> :
  return;

}


Lpi2c_Ip_SlaveHandleAddressValidEvent (uint32 instance, const struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_SlaveStateType * slave)
{
  uint16 receivedAddr;
  unsigned int _1;
  unsigned int _2;
  void (*<T2d7>) (Lpi2c_Ip_SlaveEventType, uint8) _3;
  void (*<T2d7>) (Lpi2c_Ip_SlaveEventType, uint8) _4;
  unsigned char _5;
  <unnamed type> _6;
  struct LPI2C_Type * _7;
  void (*<T2d7>) (Lpi2c_Ip_SlaveEventType, uint8) _8;
  void (*<T2d7>) (Lpi2c_Ip_SlaveEventType, uint8) _9;
  unsigned char _10;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  receivedAddr_17 = LPI2C_Get_SlaveReceivedAddr (baseAddr_15(D));
  # DEBUG receivedAddr => receivedAddr_17
  # DEBUG BEGIN_STMT
  _1 = (unsigned int) receivedAddr_17;
  _2 = _1 & 1;
  if (_2 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  slave_18(D)->direction = 0;
  # DEBUG BEGIN_STMT
  _3 = slave_18(D)->slaveCallback;
  if (_3 != 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _4 = slave_18(D)->slaveCallback;
  _5 = slave_18(D)->callbackParam;
  _4 (5, _5);

  <bb 5> :
  # DEBUG BEGIN_STMT
  _6 = slave_18(D)->transferType;
  if (_6 == 1)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _7 = g_lpi2cBase[instance_23(D)];
  LPI2C_Set_SlaveInt (_7, 1, 1);

  <bb 7> :
  # DEBUG BEGIN_STMT
  slave_18(D)->txUnderrunWarning = 0;
  goto <bb 10>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  slave_18(D)->direction = 1;
  # DEBUG BEGIN_STMT
  _8 = slave_18(D)->slaveCallback;
  if (_8 != 0B)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _9 = slave_18(D)->slaveCallback;
  _10 = slave_18(D)->callbackParam;
  _9 (6, _10);

  <bb 10> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  slave_18(D)->status = 2;
  return;

}


Lpi2c_Ip_MasterHandleReceiveDataReadyEvent (struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_MasterStateType * master)
{
  uint8 * _1;
  unsigned char _2;
  uint8 * _3;
  uint8 * _4;
  long unsigned int _5;
  long unsigned int _6;
  short unsigned int _7;
  long unsigned int _8;
  long unsigned int _9;
  _Bool _10;
  void (*<T2dc>) (Lpi2c_Ip_MasterEventType, uint8) _11;
  void (*<T2dc>) (Lpi2c_Ip_MasterEventType, uint8) _12;
  unsigned char _13;
  long unsigned int _14;
  short unsigned int _15;
  long unsigned int _16;
  long unsigned int _17;
  short unsigned int _18;
  short unsigned int _19;

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

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = master_25(D)->dataBuffer;
  _2 = LPI2C_Get_MasterRxData (baseAddr_23(D));
  *_1 = _2;
  # DEBUG BEGIN_STMT
  _3 = master_25(D)->dataBuffer;
  _4 = _3 + 1;
  master_25(D)->dataBuffer = _4;
  # DEBUG BEGIN_STMT
  _5 = master_25(D)->bufferSize;
  _6 = _5 + 4294967295;
  master_25(D)->bufferSize = _6;

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

  <bb 5> :
  _8 = master_25(D)->bufferSize;
  if (_8 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _9 = master_25(D)->bufferSize;
  if (_9 == 0)
    goto <bb 7>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _10 = master_25(D)->sendStop;
  Lpi2c_Ip_MasterEndTransfer (baseAddr_23(D), master_25(D), _10, 0);
  # DEBUG BEGIN_STMT
  master_25(D)->status ={v} 0;
  # DEBUG BEGIN_STMT
  _11 = master_25(D)->masterCallback;
  if (_11 != 0B)
    goto <bb 8>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _12 = master_25(D)->masterCallback;
  _13 = master_25(D)->callbackParam;
  _12 (11, _13);
  goto <bb 11>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _14 = master_25(D)->bufferSize;
  _15 = LPI2C_Get_MasterRxFIFOWatermark (baseAddr_23(D));
  _16 = (long unsigned int) _15;
  if (_14 <= _16)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _17 = master_25(D)->bufferSize;
  _18 = (short unsigned int) _17;
  _19 = _18 + 65535;
  LPI2C_Set_MasterRxFIFOWatermark (baseAddr_23(D), _19);

  <bb 11> :
  # DEBUG BEGIN_STMT
  return;

}


Lpi2c_Ip_MasterHandleTransmitDataRequest (struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_MasterStateType * master)
{
  _Bool _1;
  _Bool _2;
  uint8 * _3;
  <unnamed type> _4;
  long unsigned int _5;
  _Bool _6;
  void (*<T2dc>) (Lpi2c_Ip_MasterEventType, uint8) _7;
  void (*<T2dc>) (Lpi2c_Ip_MasterEventType, uint8) _8;
  unsigned char _9;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = Lpi2c_Ip_MasterCmdQueueEmpty (master_12(D));
  _2 = ~_1;
  if (_2 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterSendQueuedCmd (baseAddr_14(D), master_12(D));
  goto <bb 11>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _3 = master_12(D)->dataBuffer;
  if (_3 != 0B)
    goto <bb 5>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 5> :
  _4 = master_12(D)->direction;
  if (_4 == 0)
    goto <bb 6>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _5 = master_12(D)->bufferSize;
  if (_5 == 0)
    goto <bb 7>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _6 = master_12(D)->sendStop;
  Lpi2c_Ip_MasterEndTransfer (baseAddr_14(D), master_12(D), _6, 0);
  # DEBUG BEGIN_STMT
  master_12(D)->status ={v} 0;
  # DEBUG BEGIN_STMT
  _7 = master_12(D)->masterCallback;
  if (_7 != 0B)
    goto <bb 8>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _8 = master_12(D)->masterCallback;
  _9 = master_12(D)->callbackParam;
  _8 (11, _9);
  goto <bb 11>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterQueueData (baseAddr_14(D), master_12(D));
  goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  LPI2C_Set_MasterInt (baseAddr_14(D), 1, 0);

  <bb 11> :
  return;

}


Lpi2c_Ip_SlaveSetOperatingMode (uint32 instance, Lpi2c_Ip_ModeType operatingMode)
{
  boolean bHighSpeedMode;
  struct Lpi2c_Ip_SlaveStateType * slave;
  struct LPI2C_Type * baseAddr;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  bHighSpeedMode_2 = 0;
  # DEBUG bHighSpeedMode => bHighSpeedMode_2
  # DEBUG BEGIN_STMT
  baseAddr_5 = g_lpi2cBase[instance_4(D)];
  # DEBUG baseAddr => baseAddr_5
  # DEBUG BEGIN_STMT
  slave_6 = g_lpi2cSlaveStatePtr[instance_4(D)];
  # DEBUG slave => slave_6
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_SlaveConfigureNormalMode (baseAddr_5);
  # DEBUG BEGIN_STMT
  if (operatingMode_8(D) == 3)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  bHighSpeedMode_9 = 1;
  # DEBUG bHighSpeedMode => bHighSpeedMode_9

  <bb 4> :
  # bHighSpeedMode_1 = PHI <bHighSpeedMode_2(2), bHighSpeedMode_9(3)>
  # DEBUG bHighSpeedMode => bHighSpeedMode_1
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveHighSpeedModeDetect (baseAddr_5, bHighSpeedMode_1);
  # DEBUG BEGIN_STMT
  slave_6->operatingMode = operatingMode_8(D);
  return;

}


Lpi2c_Ip_SlaveConfigureNormalMode (struct LPI2C_Type * baseAddr)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveIgnoreNACK (baseAddr_2(D), 0);
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveTransmitNACK (baseAddr_2(D), 0);
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveACKStall (baseAddr_2(D), 0);
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveTXDStall (baseAddr_2(D), 1);
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveRXStall (baseAddr_2(D), 1);
  # DEBUG BEGIN_STMT
  LPI2C_Set_SlaveAddrStall (baseAddr_2(D), 1);
  return;

}


Lpi2c_Ip_MasterSetOperatingMode (uint32 instance, Lpi2c_Ip_ModeType operatingMode)
{
  struct Lpi2c_Ip_MasterStateType * master;
  struct LPI2C_Type * baseAddr;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  baseAddr_3 = g_lpi2cBase[instance_2(D)];
  # DEBUG baseAddr => baseAddr_3
  # DEBUG BEGIN_STMT
  master_4 = g_lpi2cMasterStatePtr[instance_2(D)];
  # DEBUG master => master_4
  # DEBUG BEGIN_STMT
  LPI2C_Set_MasterPinConfig (baseAddr_3, 0);
  # DEBUG BEGIN_STMT
  LPI2C_Set_MasterNACKConfig (baseAddr_3, 0);
  # DEBUG BEGIN_STMT
  master_4->operatingMode = operatingMode_7(D);
  return;

}


Lpi2c_Ip_MasterEndTransfer (struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_MasterStateType * master, boolean sendStop, boolean resetFIFO)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  LPI2C_Set_MasterInt (baseAddr_4(D), 15363, 0);
  # DEBUG BEGIN_STMT
  if (resetFIFO_6(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  LPI2C_Reset_MasterTxFIFOCmd (baseAddr_4(D));
  # DEBUG BEGIN_STMT
  LPI2C_Reset_MasterRxFIFOCmd (baseAddr_4(D));

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

  <bb 5> :
  # DEBUG BEGIN_STMT
  LPI2C_Cmd_MasterTransmit (baseAddr_4(D), 2, 0);
  # DEBUG BEGIN_STMT
  master_11(D)->highSpeedInProgress = 0;

  <bb 6> :
  # DEBUG BEGIN_STMT
  master_11(D)->dataBuffer = 0B;
  # DEBUG BEGIN_STMT
  master_11(D)->bufferSize = 0;
  # DEBUG BEGIN_STMT
  master_11(D)->i2cIdle ={v} 1;
  return;

}


Lpi2c_Ip_MasterQueueData (struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_MasterStateType * master)
{
  uint16 txFifoSize;
  uint16 txFIFOCount;
  _Bool _1;
  uint8 * _2;
  unsigned char _3;
  uint8 * _4;
  uint8 * _5;
  long unsigned int _6;
  long unsigned int _7;
  long unsigned int _8;

  <bb 2> :
  # DEBUG BEGIN_STMT
  txFIFOCount_15 = LPI2C_Get_MasterTxFIFOCount (baseAddr_13(D));
  # DEBUG txFIFOCount => txFIFOCount_15
  # DEBUG BEGIN_STMT
  txFifoSize_17 = LPI2C_Get_MasterTxFIFOSize (baseAddr_13(D));
  # DEBUG txFifoSize => txFifoSize_17
  # DEBUG BEGIN_STMT
  _1 = Lpi2c_Ip_MasterCmdQueueEmpty (master_18(D));
  if (_1 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = master_18(D)->dataBuffer;
  _3 = *_2;
  LPI2C_Cmd_MasterTransmit (baseAddr_13(D), 0, _3);
  # DEBUG BEGIN_STMT
  _4 = master_18(D)->dataBuffer;
  _5 = _4 + 1;
  master_18(D)->dataBuffer = _5;
  # DEBUG BEGIN_STMT
  _6 = master_18(D)->bufferSize;
  _7 = _6 + 4294967295;
  master_18(D)->bufferSize = _7;
  # DEBUG BEGIN_STMT
  txFIFOCount_24 = LPI2C_Get_MasterTxFIFOCount (baseAddr_13(D));
  # DEBUG txFIFOCount => txFIFOCount_24

  <bb 4> :
  # txFIFOCount_9 = PHI <txFIFOCount_15(2), txFIFOCount_24(3)>
  # DEBUG txFIFOCount => txFIFOCount_9
  # DEBUG BEGIN_STMT
  _8 = master_18(D)->bufferSize;
  if (_8 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  if (txFIFOCount_9 < txFifoSize_17)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 6> :
  return;

}


Lpi2c_Ip_MasterSendAddress (struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_MasterStateType * master, boolean receive)
{
  Lpi2c_Ip_MasterCommandType startCommand;
  uint8 addrByte;
  <unnamed type> _1;
  _Bool _2;
  _Bool _3;
  unsigned char _4;
  _Bool _5;
  _Bool _6;
  short unsigned int _7;
  short unsigned int _8;
  unsigned char _9;
  unsigned char _10;
  short unsigned int _11;
  short unsigned int _12;
  short unsigned int _13;
  unsigned char _14;
  unsigned char _15;
  short unsigned int _16;
  unsigned char _17;
  unsigned char _18;
  unsigned char _19;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = master_24(D)->operatingMode;
  if (_1 == 3)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 3> :
  _2 = master_24(D)->highSpeedInProgress;
  _3 = ~_2;
  if (_3 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _4 = master_24(D)->masterCode;
  Lpi2c_Ip_MasterQueueCmd (baseAddr_25(D), master_24(D), 5, _4);
  # DEBUG BEGIN_STMT
  master_24(D)->highSpeedInProgress = 1;

  <bb 5> :
  # DEBUG BEGIN_STMT
  _5 = master_24(D)->highSpeedInProgress;
  if (_5 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  startCommand_29 = 6;
  # DEBUG startCommand => startCommand_29
  goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  startCommand_28 = 4;
  # DEBUG startCommand => startCommand_28

  <bb 8> :
  # startCommand_20 = PHI <startCommand_29(6), startCommand_28(7)>
  # DEBUG startCommand => startCommand_20
  # DEBUG BEGIN_STMT
  _6 = master_24(D)->is10bitAddr;
  if (_6 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _7 = master_24(D)->slaveAddress;
  _8 = _7 >> 7;
  _9 = (unsigned char) _8;
  _10 = _9 & 6;
  addrByte_33 = _10 + 240;
  # DEBUG addrByte => addrByte_33
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterQueueCmd (baseAddr_25(D), master_24(D), startCommand_20, addrByte_33);
  # DEBUG BEGIN_STMT
  _11 = master_24(D)->slaveAddress;
  addrByte_35 = (uint8) _11;
  # DEBUG addrByte => addrByte_35
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterQueueCmd (baseAddr_25(D), master_24(D), 0, addrByte_35);
  # DEBUG BEGIN_STMT
  if (receive_30(D) != 0)
    goto <bb 10>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _12 = master_24(D)->slaveAddress;
  _13 = _12 >> 7;
  _14 = (unsigned char) _13;
  _15 = _14 & 6;
  addrByte_37 = _15 + 241;
  # DEBUG addrByte => addrByte_37
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterQueueCmd (baseAddr_25(D), master_24(D), startCommand_20, addrByte_37);
  goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _16 = master_24(D)->slaveAddress;
  _17 = (unsigned char) _16;
  _18 = _17 << 1;
  _19 = (unsigned char) receive_30(D);
  addrByte_31 = _18 + _19;
  # DEBUG addrByte => addrByte_31
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterQueueCmd (baseAddr_25(D), master_24(D), startCommand_20, addrByte_31);

  <bb 12> :
  return;

}


Lpi2c_Ip_MasterSendQueuedCmd (struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_MasterStateType * master)
{
  uint16 txFifoSize;
  uint16 txFIFOCount;
  unsigned char _1;
  int _2;
  <unnamed type> _3;
  unsigned char _4;
  int _5;
  unsigned char _6;
  unsigned char _7;
  unsigned char _8;
  unsigned char _9;
  _Bool _10;
  _Bool _11;
  _Bool _12;

  <bb 2> :
  # DEBUG BEGIN_STMT
  txFIFOCount_19 = LPI2C_Get_MasterTxFIFOCount (baseAddr_17(D));
  # DEBUG txFIFOCount => txFIFOCount_19
  # DEBUG BEGIN_STMT
  txFifoSize_21 = LPI2C_Get_MasterTxFIFOSize (baseAddr_17(D));
  # DEBUG txFifoSize => txFifoSize_21
  # DEBUG BEGIN_STMT
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = master_22(D)->cmdQueue.readIdx;
  _2 = (int) _1;
  _3 = master_22(D)->cmdQueue.cmd[_2];
  _4 = master_22(D)->cmdQueue.readIdx;
  _5 = (int) _4;
  _6 = master_22(D)->cmdQueue.data[_5];
  LPI2C_Cmd_MasterTransmit (baseAddr_17(D), _3, _6);
  # DEBUG BEGIN_STMT
  _7 = master_22(D)->cmdQueue.readIdx;
  _8 = _7;
  _9 = _8 + 1;
  master_22(D)->cmdQueue.readIdx = _9;
  # DEBUG BEGIN_STMT
  txFIFOCount_27 = LPI2C_Get_MasterTxFIFOCount (baseAddr_17(D));
  # DEBUG txFIFOCount => txFIFOCount_27

  <bb 4> :
  # txFIFOCount_13 = PHI <txFIFOCount_19(2), txFIFOCount_27(3)>
  # DEBUG txFIFOCount => txFIFOCount_13
  # DEBUG BEGIN_STMT
  _10 = Lpi2c_Ip_MasterCmdQueueEmpty (master_22(D));
  _11 = ~_10;
  if (_11 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  if (txFIFOCount_13 < txFifoSize_21)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

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

  <bb 7> :
  # DEBUG BEGIN_STMT
  Lpi2c_Ip_MasterResetQueue (master_22(D));

  <bb 8> :
  return;

}


Lpi2c_Ip_MasterQueueCmd (struct LPI2C_Type * baseAddr, struct Lpi2c_Ip_MasterStateType * master, Lpi2c_Ip_MasterCommandType cmd, uint8 data)
{
  uint16 txFIFOSize;
  uint16 txFIFOCount;
  unsigned char _1;
  int _2;
  unsigned char _3;
  int _4;
  unsigned char _5;
  unsigned char _6;
  unsigned char _7;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  txFIFOCount_12 = LPI2C_Get_MasterTxFIFOCount (baseAddr_10(D));
  # DEBUG txFIFOCount => txFIFOCount_12
  # DEBUG BEGIN_STMT
  txFIFOSize_14 = LPI2C_Get_MasterTxFIFOSize (baseAddr_10(D));
  # DEBUG txFIFOSize => txFIFOSize_14
  # DEBUG BEGIN_STMT
  if (txFIFOCount_12 < txFIFOSize_14)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  LPI2C_Cmd_MasterTransmit (baseAddr_10(D), cmd_16(D), data_18(D));
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _1 = master_15(D)->cmdQueue.writeIdx;
  _2 = (int) _1;
  master_15(D)->cmdQueue.cmd[_2] = cmd_16(D);
  # DEBUG BEGIN_STMT
  _3 = master_15(D)->cmdQueue.writeIdx;
  _4 = (int) _3;
  master_15(D)->cmdQueue.data[_4] = data_18(D);
  # DEBUG BEGIN_STMT
  _5 = master_15(D)->cmdQueue.writeIdx;
  _6 = _5;
  _7 = _6 + 1;
  master_15(D)->cmdQueue.writeIdx = _7;

  <bb 5> :
  return;

}


Lpi2c_Ip_MasterResetQueue (struct Lpi2c_Ip_MasterStateType * master)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  master_2(D)->cmdQueue.readIdx = 0;
  # DEBUG BEGIN_STMT
  master_2(D)->cmdQueue.writeIdx = 0;
  return;

}


Lpi2c_Ip_MasterCmdQueueEmpty (const struct Lpi2c_Ip_MasterStateType * master)
{
  unsigned char _1;
  unsigned char _2;
  boolean _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = master_4(D)->cmdQueue.writeIdx;
  _2 = master_4(D)->cmdQueue.readIdx;
  _5 = _1 == _2;
  return _5;

}


LPI2C_Get_SlaveData (const struct LPI2C_Type * baseAddr)
{
  uint32 tmp;
  uint8 _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_3 ={v} baseAddr_2(D)->SRDR;
  # DEBUG tmp => tmp_3
  # DEBUG BEGIN_STMT
  tmp_4 = tmp_3 & 255;
  # DEBUG tmp => tmp_4
  # DEBUG BEGIN_STMT
  _5 = (uint8) tmp_4;
  return _5;

}


LPI2C_Transmit_SlaveData (struct LPI2C_Type * baseAddr, uint8 data)
{
  long unsigned int _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) data_2(D);
  baseAddr_4(D)->STDR ={v} _1;
  return;

}


LPI2C_Set_SlaveTransmitNACK (struct LPI2C_Type * baseAddr, Lpi2c_Ip_SlaveNackTransmitType nack)
{
  uint32 regValue;
  long unsigned int _1;
  long unsigned int _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_5 ={v} baseAddr_4(D)->STAR;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  regValue_6 = regValue_5 & 4294967294;
  # DEBUG regValue => regValue_6
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) nack_7(D);
  _2 = _1 & 1;
  regValue_8 = regValue_6 | _2;
  # DEBUG regValue => regValue_8
  # DEBUG BEGIN_STMT
  baseAddr_4(D)->STAR ={v} regValue_8;
  return;

}


LPI2C_Get_SlaveReceivedAddr (const struct LPI2C_Type * baseAddr)
{
  uint32 tmp;
  uint16 _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_3 ={v} baseAddr_2(D)->SASR;
  # DEBUG tmp => tmp_3
  # DEBUG BEGIN_STMT
  tmp_4 = tmp_3 & 2047;
  # DEBUG tmp => tmp_4
  # DEBUG BEGIN_STMT
  _5 = (uint16) tmp_4;
  return _5;

}


LPI2C_Set_SlaveAddr0 (struct LPI2C_Type * baseAddr, uint16 addr)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_6 ={v} baseAddr_5(D)->SAMR;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  tmp_7 = tmp_6 & 4294965249;
  # DEBUG tmp => tmp_7
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) addr_8(D);
  _2 = _1 << 1;
  _3 = _2 & 2046;
  tmp_9 = tmp_7 | _3;
  # DEBUG tmp => tmp_9
  # DEBUG BEGIN_STMT
  baseAddr_5(D)->SAMR ={v} tmp_9;
  return;

}


LPI2C_Set_SlaveAddrStall (struct LPI2C_Type * baseAddr, boolean enable)
{
  uint32 regValue;
  long unsigned int iftmp.5_1;
  long unsigned int iftmp.5_7;
  long unsigned int iftmp.5_8;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->SCFGR1;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  regValue_5 = regValue_4 & 4294967294;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  if (enable_6(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.5_8 = 1;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.5_7 = 0;

  <bb 5> :
  # iftmp.5_1 = PHI <iftmp.5_8(3), iftmp.5_7(4)>
  regValue_9 = iftmp.5_1 | regValue_5;
  # DEBUG regValue => regValue_9
  # DEBUG BEGIN_STMT
  baseAddr_3(D)->SCFGR1 ={v} regValue_9;
  return;

}


LPI2C_Set_SlaveRXStall (struct LPI2C_Type * baseAddr, boolean enable)
{
  uint32 regValue;
  long unsigned int iftmp.4_1;
  long unsigned int iftmp.4_7;
  long unsigned int iftmp.4_8;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->SCFGR1;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  regValue_5 = regValue_4 & 4294967293;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  if (enable_6(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.4_8 = 2;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.4_7 = 0;

  <bb 5> :
  # iftmp.4_1 = PHI <iftmp.4_8(3), iftmp.4_7(4)>
  regValue_9 = iftmp.4_1 | regValue_5;
  # DEBUG regValue => regValue_9
  # DEBUG BEGIN_STMT
  baseAddr_3(D)->SCFGR1 ={v} regValue_9;
  return;

}


LPI2C_Set_SlaveTXDStall (struct LPI2C_Type * baseAddr, boolean enable)
{
  uint32 regValue;
  long unsigned int iftmp.3_1;
  long unsigned int iftmp.3_7;
  long unsigned int iftmp.3_8;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->SCFGR1;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  regValue_5 = regValue_4 & 4294967291;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  if (enable_6(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.3_8 = 4;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.3_7 = 0;

  <bb 5> :
  # iftmp.3_1 = PHI <iftmp.3_8(3), iftmp.3_7(4)>
  regValue_9 = iftmp.3_1 | regValue_5;
  # DEBUG regValue => regValue_9
  # DEBUG BEGIN_STMT
  baseAddr_3(D)->SCFGR1 ={v} regValue_9;
  return;

}


LPI2C_Set_SlaveACKStall (struct LPI2C_Type * baseAddr, boolean enable)
{
  uint32 regValue;
  long unsigned int iftmp.2_1;
  long unsigned int iftmp.2_7;
  long unsigned int iftmp.2_8;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->SCFGR1;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  regValue_5 = regValue_4 & 4294967287;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  if (enable_6(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.2_8 = 8;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.2_7 = 0;

  <bb 5> :
  # iftmp.2_1 = PHI <iftmp.2_8(3), iftmp.2_7(4)>
  regValue_9 = iftmp.2_1 | regValue_5;
  # DEBUG regValue => regValue_9
  # DEBUG BEGIN_STMT
  baseAddr_3(D)->SCFGR1 ={v} regValue_9;
  return;

}


LPI2C_Set_SlaveIgnoreNACK (struct LPI2C_Type * baseAddr, Lpi2c_Ip_SlaveNackConfigType nack_config)
{
  uint32 regValue;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_6 ={v} baseAddr_5(D)->SCFGR1;
  # DEBUG regValue => regValue_6
  # DEBUG BEGIN_STMT
  regValue_7 = regValue_6 & 4294963199;
  # DEBUG regValue => regValue_7
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) nack_config_8(D);
  _2 = _1 << 12;
  _3 = _2 & 4096;
  regValue_9 = regValue_7 | _3;
  # DEBUG regValue => regValue_9
  # DEBUG BEGIN_STMT
  baseAddr_5(D)->SCFGR1 ={v} regValue_9;
  return;

}


LPI2C_Set_SlaveHighSpeedModeDetect (struct LPI2C_Type * baseAddr, boolean enable)
{
  uint32 regValue;
  long unsigned int iftmp.6_1;
  long unsigned int iftmp.6_7;
  long unsigned int iftmp.6_8;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->SCFGR1;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  regValue_5 = regValue_4 & 4294959103;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  if (enable_6(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.6_8 = 8192;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.6_7 = 0;

  <bb 5> :
  # iftmp.6_1 = PHI <iftmp.6_8(3), iftmp.6_7(4)>
  regValue_9 = iftmp.6_1 | regValue_5;
  # DEBUG regValue => regValue_9
  # DEBUG BEGIN_STMT
  baseAddr_3(D)->SCFGR1 ={v} regValue_9;
  return;

}


LPI2C_Set_SlaveAddrConfig (struct LPI2C_Type * baseAddr, Lpi2c_Ip_SlaveAddressConfigType configuration)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_6 ={v} baseAddr_5(D)->SCFGR1;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  tmp_7 = tmp_6 & 4294508543;
  # DEBUG tmp => tmp_7
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) configuration_8(D);
  _2 = _1 << 16;
  _3 = _2 & 458752;
  tmp_9 = tmp_7 | _3;
  # DEBUG tmp => tmp_9
  # DEBUG BEGIN_STMT
  baseAddr_5(D)->SCFGR1 ={v} tmp_9;
  return;

}


LPI2C_Set_SlaveTxDMA (struct LPI2C_Type * baseAddr, boolean enable)
{
  uint32 regValue;
  long unsigned int iftmp.8_1;
  long unsigned int iftmp.8_7;
  long unsigned int iftmp.8_8;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->SDER;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  regValue_5 = regValue_4 & 4294967294;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  if (enable_6(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.8_8 = 1;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.8_7 = 0;

  <bb 5> :
  # iftmp.8_1 = PHI <iftmp.8_8(3), iftmp.8_7(4)>
  regValue_9 = iftmp.8_1 | regValue_5;
  # DEBUG regValue => regValue_9
  # DEBUG BEGIN_STMT
  baseAddr_3(D)->SDER ={v} regValue_9;
  return;

}


LPI2C_Set_SlaveRxDMA (struct LPI2C_Type * baseAddr, boolean enable)
{
  uint32 regValue;
  long unsigned int iftmp.7_1;
  long unsigned int iftmp.7_7;
  long unsigned int iftmp.7_8;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->SDER;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  regValue_5 = regValue_4 & 4294967293;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  if (enable_6(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.7_8 = 2;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.7_7 = 0;

  <bb 5> :
  # iftmp.7_1 = PHI <iftmp.7_8(3), iftmp.7_7(4)>
  regValue_9 = iftmp.7_1 | regValue_5;
  # DEBUG regValue => regValue_9
  # DEBUG BEGIN_STMT
  baseAddr_3(D)->SDER ={v} regValue_9;
  return;

}


LPI2C_Get_SlaveInt (const struct LPI2C_Type * baseAddr, uint32 interrupts)
{
  boolean hasInterrupts;
  uint32 tmp;
  long unsigned int _1;
  boolean _9;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_5 ={v} baseAddr_4(D)->SIER;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = tmp_5 & interrupts_6(D);
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  hasInterrupts_8 = 1;
  # DEBUG hasInterrupts => hasInterrupts_8
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  hasInterrupts_7 = 0;
  # DEBUG hasInterrupts => hasInterrupts_7

  <bb 5> :
  # hasInterrupts_2 = PHI <hasInterrupts_8(3), hasInterrupts_7(4)>
  # DEBUG hasInterrupts => hasInterrupts_2
  # DEBUG BEGIN_STMT
  _9 = hasInterrupts_2;
  return _9;

}


LPI2C_Set_SlaveInt (struct LPI2C_Type * baseAddr, uint32 interrupts, boolean enable)
{
  uint32 tmp;
  long unsigned int _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_5 ={v} baseAddr_4(D)->SIER;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  if (enable_6(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  tmp_9 = tmp_5 | interrupts_7(D);
  # DEBUG tmp => tmp_9
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _1 = ~interrupts_7(D);
  tmp_8 = tmp_5 & _1;
  # DEBUG tmp => tmp_8

  <bb 5> :
  # tmp_2 = PHI <tmp_9(3), tmp_8(4)>
  # DEBUG tmp => tmp_2
  # DEBUG BEGIN_STMT
  baseAddr_4(D)->SIER ={v} tmp_2;
  return;

}


LPI2C_Clear_SlaveRepeatedStartEvent (struct LPI2C_Type * baseAddr)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  baseAddr_2(D)->SSR ={v} 256;
  return;

}


LPI2C_Clear_SlaveSTOPDetectEvent (struct LPI2C_Type * baseAddr)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  baseAddr_2(D)->SSR ={v} 512;
  return;

}


LPI2C_Clear_SlaveBitErrorEvent (struct LPI2C_Type * baseAddr)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  baseAddr_2(D)->SSR ={v} 1024;
  return;

}


LPI2C_Get_SlaveTransmitDataEvent (const struct LPI2C_Type * baseAddr)
{
  uint32 regValue;
  boolean _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_3 ={v} baseAddr_2(D)->SSR;
  # DEBUG regValue => regValue_3
  # DEBUG BEGIN_STMT
  regValue_4 = regValue_3 & 1;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  _5 = regValue_4 != 0;
  return _5;

}


LPI2C_Get_SlaveReceiveDataEvent (const struct LPI2C_Type * baseAddr)
{
  uint32 regValue;
  long unsigned int _1;
  boolean _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->SSR;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  _1 = regValue_4 >> 1;
  regValue_5 = _1 & 1;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  _6 = regValue_5 != 0;
  return _6;

}


LPI2C_Get_SlaveAddressValidEvent (const struct LPI2C_Type * baseAddr)
{
  uint32 regValue;
  long unsigned int _1;
  boolean _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->SSR;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  _1 = regValue_4 >> 2;
  regValue_5 = _1 & 1;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  _6 = regValue_5 != 0;
  return _6;

}


LPI2C_Get_SlaveRepeatedStartEvent (const struct LPI2C_Type * baseAddr)
{
  uint32 regValue;
  long unsigned int _1;
  boolean _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->SSR;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  _1 = regValue_4 >> 8;
  regValue_5 = _1 & 1;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  _6 = regValue_5 != 0;
  return _6;

}


LPI2C_Get_SlaveSTOPDetectEvent (const struct LPI2C_Type * baseAddr)
{
  uint32 regValue;
  long unsigned int _1;
  boolean _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->SSR;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  _1 = regValue_4 >> 9;
  regValue_5 = _1 & 1;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  _6 = regValue_5 != 0;
  return _6;

}


LPI2C_Get_SlaveBitErrorEvent (const struct LPI2C_Type * baseAddr)
{
  uint32 regValue;
  long unsigned int _1;
  boolean _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->SSR;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  _1 = regValue_4 >> 10;
  regValue_5 = _1 & 1;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  _6 = regValue_5 != 0;
  return _6;

}


LPI2C_Set_SlaveEnable (struct LPI2C_Type * baseAddr, boolean enable)
{
  uint32 regValue;
  long unsigned int _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->SCR;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  regValue_5 = regValue_4 & 4294967294;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) enable_6(D);
  regValue_7 = regValue_5 | _1;
  # DEBUG regValue => regValue_7
  # DEBUG BEGIN_STMT
  baseAddr_3(D)->SCR ={v} regValue_7;
  return;

}


LPI2C_Get_MasterRxData (const struct LPI2C_Type * baseAddr)
{
  uint32 tmp;
  uint8 _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_3 ={v} baseAddr_2(D)->MRDR;
  # DEBUG tmp => tmp_3
  # DEBUG BEGIN_STMT
  tmp_4 = tmp_3 & 255;
  # DEBUG tmp => tmp_4
  # DEBUG BEGIN_STMT
  _5 = (uint8) tmp_4;
  return _5;

}


LPI2C_Cmd_MasterTransmit (struct LPI2C_Type * baseAddr, Lpi2c_Ip_MasterCommandType cmd, uint8 data)
{
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) cmd_5(D);
  _2 = _1 << 8;
  _3 = (long unsigned int) data_6(D);
  _4 = _2 + _3;
  baseAddr_8(D)->MTDR ={v} _4;
  return;

}


LPI2C_Get_MasterTxFIFOCount (const struct LPI2C_Type * baseAddr)
{
  uint32 tmp;
  uint16 _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_3 ={v} baseAddr_2(D)->MFSR;
  # DEBUG tmp => tmp_3
  # DEBUG BEGIN_STMT
  tmp_4 = tmp_3 & 7;
  # DEBUG tmp => tmp_4
  # DEBUG BEGIN_STMT
  _5 = (uint16) tmp_4;
  return _5;

}


LPI2C_Get_MasterRxFIFOCount (const struct LPI2C_Type * baseAddr)
{
  uint32 tmp;
  long unsigned int _1;
  uint16 _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_4 ={v} baseAddr_3(D)->MFSR;
  # DEBUG tmp => tmp_4
  # DEBUG BEGIN_STMT
  _1 = tmp_4 >> 16;
  tmp_5 = _1 & 7;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  _6 = (uint16) tmp_5;
  return _6;

}


LPI2C_Set_MasterTxFIFOWatermark (struct LPI2C_Type * baseAddr, uint16 value)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_5 ={v} baseAddr_4(D)->MFCR;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  tmp_6 = tmp_5 & 4294967292;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) value_7(D);
  _2 = _1 & 3;
  tmp_8 = tmp_6 | _2;
  # DEBUG tmp => tmp_8
  # DEBUG BEGIN_STMT
  baseAddr_4(D)->MFCR ={v} tmp_8;
  return;

}


LPI2C_Get_MasterRxFIFOWatermark (const struct LPI2C_Type * baseAddr)
{
  uint32 tmp;
  long unsigned int _1;
  uint16 _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_4 ={v} baseAddr_3(D)->MFCR;
  # DEBUG tmp => tmp_4
  # DEBUG BEGIN_STMT
  _1 = tmp_4 >> 16;
  tmp_5 = _1 & 3;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  _6 = (uint16) tmp_5;
  return _6;

}


LPI2C_Set_MasterRxFIFOWatermark (struct LPI2C_Type * baseAddr, uint16 value)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_6 ={v} baseAddr_5(D)->MFCR;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  tmp_7 = tmp_6 & 4294770687;
  # DEBUG tmp => tmp_7
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) value_8(D);
  _2 = _1 << 16;
  _3 = _2 & 196608;
  tmp_9 = tmp_7 | _3;
  # DEBUG tmp => tmp_9
  # DEBUG BEGIN_STMT
  baseAddr_5(D)->MFCR ={v} tmp_9;
  return;

}


LPI2C_Get_MasterClockLowPeriodHS (const struct LPI2C_Type * baseAddr)
{
  uint32 tmp;
  uint8 _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_3 ={v} baseAddr_2(D)->MCCR1;
  # DEBUG tmp => tmp_3
  # DEBUG BEGIN_STMT
  tmp_4 = tmp_3 & 63;
  # DEBUG tmp => tmp_4
  # DEBUG BEGIN_STMT
  _5 = (uint8) tmp_4;
  return _5;

}


LPI2C_Set_MasterClockLowPeriodHS (struct LPI2C_Type * baseAddr, uint8 value)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_5 ={v} baseAddr_4(D)->MCCR1;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  tmp_6 = tmp_5 & 4294967232;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) value_7(D);
  _2 = _1 & 63;
  tmp_8 = tmp_6 | _2;
  # DEBUG tmp => tmp_8
  # DEBUG BEGIN_STMT
  baseAddr_4(D)->MCCR1 ={v} tmp_8;
  return;

}


LPI2C_Get_MasterClockHighPeriodHS (const struct LPI2C_Type * baseAddr)
{
  uint32 tmp;
  long unsigned int _1;
  uint8 _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_4 ={v} baseAddr_3(D)->MCCR1;
  # DEBUG tmp => tmp_4
  # DEBUG BEGIN_STMT
  _1 = tmp_4 >> 8;
  tmp_5 = _1 & 63;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  _6 = (uint8) tmp_5;
  return _6;

}


LPI2C_Set_MasterClockHighPeriodHS (struct LPI2C_Type * baseAddr, uint8 value)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_6 ={v} baseAddr_5(D)->MCCR1;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  tmp_7 = tmp_6 & 4294951167;
  # DEBUG tmp => tmp_7
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) value_8(D);
  _2 = _1 << 8;
  _3 = _2 & 16128;
  tmp_9 = tmp_7 | _3;
  # DEBUG tmp => tmp_9
  # DEBUG BEGIN_STMT
  baseAddr_5(D)->MCCR1 ={v} tmp_9;
  return;

}


LPI2C_Set_MasterSetupHoldDelayHS (struct LPI2C_Type * baseAddr, uint8 value)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_6 ={v} baseAddr_5(D)->MCCR1;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  tmp_7 = tmp_6 & 4290838527;
  # DEBUG tmp => tmp_7
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) value_8(D);
  _2 = _1 << 16;
  _3 = _2 & 4128768;
  tmp_9 = tmp_7 | _3;
  # DEBUG tmp => tmp_9
  # DEBUG BEGIN_STMT
  baseAddr_5(D)->MCCR1 ={v} tmp_9;
  return;

}


LPI2C_Set_MasterDataValidDelayHS (struct LPI2C_Type * baseAddr, uint8 value)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_6 ={v} baseAddr_5(D)->MCCR1;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  tmp_7 = tmp_6 & 3238002687;
  # DEBUG tmp => tmp_7
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) value_8(D);
  _2 = _1 << 24;
  _3 = _2 & 1056964608;
  tmp_9 = tmp_7 | _3;
  # DEBUG tmp => tmp_9
  # DEBUG BEGIN_STMT
  baseAddr_5(D)->MCCR1 ={v} tmp_9;
  return;

}


LPI2C_Get_MasterClockLowPeriod (const struct LPI2C_Type * baseAddr)
{
  uint32 tmp;
  uint8 _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_3 ={v} baseAddr_2(D)->MCCR0;
  # DEBUG tmp => tmp_3
  # DEBUG BEGIN_STMT
  tmp_4 = tmp_3 & 63;
  # DEBUG tmp => tmp_4
  # DEBUG BEGIN_STMT
  _5 = (uint8) tmp_4;
  return _5;

}


LPI2C_Set_MasterClockLowPeriod (struct LPI2C_Type * baseAddr, uint8 value)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_5 ={v} baseAddr_4(D)->MCCR0;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  tmp_6 = tmp_5 & 4294967232;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) value_7(D);
  _2 = _1 & 63;
  tmp_8 = tmp_6 | _2;
  # DEBUG tmp => tmp_8
  # DEBUG BEGIN_STMT
  baseAddr_4(D)->MCCR0 ={v} tmp_8;
  return;

}


LPI2C_Set_MasterSetupHoldDelay (struct LPI2C_Type * baseAddr, uint8 value)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_6 ={v} baseAddr_5(D)->MCCR0;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  tmp_7 = tmp_6 & 4290838527;
  # DEBUG tmp => tmp_7
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) value_8(D);
  _2 = _1 << 16;
  _3 = _2 & 4128768;
  tmp_9 = tmp_7 | _3;
  # DEBUG tmp => tmp_9
  # DEBUG BEGIN_STMT
  baseAddr_5(D)->MCCR0 ={v} tmp_9;
  return;

}


LPI2C_Set_MasterDataValidDelay (struct LPI2C_Type * baseAddr, uint8 value)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_6 ={v} baseAddr_5(D)->MCCR0;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  tmp_7 = tmp_6 & 3238002687;
  # DEBUG tmp => tmp_7
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) value_8(D);
  _2 = _1 << 24;
  _3 = _2 & 1056964608;
  tmp_9 = tmp_7 | _3;
  # DEBUG tmp => tmp_9
  # DEBUG BEGIN_STMT
  baseAddr_5(D)->MCCR0 ={v} tmp_9;
  return;

}


LPI2C_Set_MasterClockHighPeriod (struct LPI2C_Type * baseAddr, uint8 value)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_6 ={v} baseAddr_5(D)->MCCR0;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  tmp_7 = tmp_6 & 4294951167;
  # DEBUG tmp => tmp_7
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) value_8(D);
  _2 = _1 << 8;
  _3 = _2 & 16128;
  tmp_9 = tmp_7 | _3;
  # DEBUG tmp => tmp_9
  # DEBUG BEGIN_STMT
  baseAddr_5(D)->MCCR0 ={v} tmp_9;
  return;

}


LPI2C_Get_MasterClockHighPeriod (const struct LPI2C_Type * baseAddr)
{
  uint32 tmp;
  long unsigned int _1;
  uint8 _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_4 ={v} baseAddr_3(D)->MCCR0;
  # DEBUG tmp => tmp_4
  # DEBUG BEGIN_STMT
  _1 = tmp_4 >> 8;
  tmp_5 = _1 & 63;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  _6 = (uint8) tmp_5;
  return _6;

}


LPI2C_Get_MasterPrescaler (const struct LPI2C_Type * baseAddr)
{
  uint32 tmp;
  Lpi2c_Ip_MasterPrescalerType _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_3 ={v} baseAddr_2(D)->MCFGR1;
  # DEBUG tmp => tmp_3
  # DEBUG BEGIN_STMT
  tmp_4 = tmp_3 & 7;
  # DEBUG tmp => tmp_4
  # DEBUG BEGIN_STMT
  _5 = (Lpi2c_Ip_MasterPrescalerType) tmp_4;
  return _5;

}


LPI2C_Set_MasterPrescaler (struct LPI2C_Type * baseAddr, Lpi2c_Ip_MasterPrescalerType prescaler)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_5 ={v} baseAddr_4(D)->MCFGR1;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  tmp_6 = tmp_5 & 4294967288;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) prescaler_7(D);
  _2 = _1 & 7;
  tmp_8 = tmp_6 | _2;
  # DEBUG tmp => tmp_8
  # DEBUG BEGIN_STMT
  baseAddr_4(D)->MCFGR1 ={v} tmp_8;
  return;

}


LPI2C_Set_MasterNACKConfig (struct LPI2C_Type * baseAddr, Lpi2c_Ip_NackConfigType configuration)
{
  uint32 regValue;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_6 ={v} baseAddr_5(D)->MCFGR1;
  # DEBUG regValue => regValue_6
  # DEBUG BEGIN_STMT
  regValue_7 = regValue_6 & 4294966783;
  # DEBUG regValue => regValue_7
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) configuration_8(D);
  _2 = _1 << 9;
  _3 = _2 & 512;
  regValue_9 = regValue_7 | _3;
  # DEBUG regValue => regValue_9
  # DEBUG BEGIN_STMT
  baseAddr_5(D)->MCFGR1 ={v} regValue_9;
  return;

}


LPI2C_Set_MasterBusIdleTimeout (struct LPI2C_Type * baseAddr, uint32 u32Timeout)
{
  uint32 tmp;
  long unsigned int _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_4 ={v} baseAddr_3(D)->MCFGR2;
  # DEBUG tmp => tmp_4
  # DEBUG BEGIN_STMT
  tmp_5 = tmp_4 & 4294963200;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  _1 = u32Timeout_6(D) & 4095;
  tmp_7 = tmp_5 | _1;
  # DEBUG tmp => tmp_7
  # DEBUG BEGIN_STMT
  baseAddr_3(D)->MCFGR2 ={v} tmp_7;
  return;

}


LPI2C_Set_MasterPinLowTimeoutConfiguration (struct LPI2C_Type * baseAddr, boolean configuration)
{
  uint32 tmp;
  long unsigned int iftmp.1_1;
  long unsigned int iftmp.1_7;
  long unsigned int iftmp.1_8;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_4 ={v} baseAddr_3(D)->MCFGR1;
  # DEBUG tmp => tmp_4
  # DEBUG BEGIN_STMT
  tmp_5 = tmp_4 & 4294966271;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  if (configuration_6(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.1_8 = 1024;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.1_7 = 0;

  <bb 5> :
  # iftmp.1_1 = PHI <iftmp.1_8(3), iftmp.1_7(4)>
  tmp_9 = iftmp.1_1 | tmp_5;
  # DEBUG tmp => tmp_9
  # DEBUG BEGIN_STMT
  baseAddr_3(D)->MCFGR1 ={v} tmp_9;
  return;

}


LPI2C_Set_MasterPinLowTimeout (struct LPI2C_Type * baseAddr, uint32 u32Timeout)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_5 ={v} baseAddr_4(D)->MCFGR3;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  tmp_6 = tmp_5 & 4293918975;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  _1 = u32Timeout_7(D) << 8;
  _2 = _1 & 1048320;
  tmp_8 = tmp_6 | _2;
  # DEBUG tmp => tmp_8
  # DEBUG BEGIN_STMT
  baseAddr_4(D)->MCFGR3 ={v} tmp_8;
  return;

}


LPI2C_Set_SlaveGlitchFilterSCL (struct LPI2C_Type * baseAddr, uint32 cycles)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_5 ={v} baseAddr_4(D)->SCFGR2;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  tmp_6 = tmp_5 & 4293984255;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  _1 = cycles_7(D) << 16;
  _2 = _1 & 983040;
  tmp_8 = tmp_6 | _2;
  # DEBUG tmp => tmp_8
  # DEBUG BEGIN_STMT
  baseAddr_4(D)->SCFGR2 ={v} tmp_8;
  return;

}


LPI2C_Set_SlaveGlitchFilterSDA (struct LPI2C_Type * baseAddr, uint32 cycles)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_5 ={v} baseAddr_4(D)->SCFGR2;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  tmp_6 = tmp_5 & 4043309055;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  _1 = cycles_7(D) << 24;
  _2 = _1 & 251658240;
  tmp_8 = tmp_6 | _2;
  # DEBUG tmp => tmp_8
  # DEBUG BEGIN_STMT
  baseAddr_4(D)->SCFGR2 ={v} tmp_8;
  return;

}


LPI2C_Set_MasterGlitchFilterSCL (struct LPI2C_Type * baseAddr, uint32 cycles)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_5 ={v} baseAddr_4(D)->MCFGR2;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  tmp_6 = tmp_5 & 4293984255;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  _1 = cycles_7(D) << 16;
  _2 = _1 & 983040;
  tmp_8 = tmp_6 | _2;
  # DEBUG tmp => tmp_8
  # DEBUG BEGIN_STMT
  baseAddr_4(D)->MCFGR2 ={v} tmp_8;
  return;

}


LPI2C_Set_MasterGlitchFilterSDA (struct LPI2C_Type * baseAddr, uint32 cycles)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_5 ={v} baseAddr_4(D)->MCFGR2;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  tmp_6 = tmp_5 & 4043309055;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  _1 = cycles_7(D) << 24;
  _2 = _1 & 251658240;
  tmp_8 = tmp_6 | _2;
  # DEBUG tmp => tmp_8
  # DEBUG BEGIN_STMT
  baseAddr_4(D)->MCFGR2 ={v} tmp_8;
  return;

}


LPI2C_Set_MasterPinConfig (struct LPI2C_Type * baseAddr, Lpi2c_Ip_PinConfigType configuration)
{
  uint32 tmp;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_6 ={v} baseAddr_5(D)->MCFGR1;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  tmp_7 = tmp_6 & 4177526783;
  # DEBUG tmp => tmp_7
  # DEBUG BEGIN_STMT
  _1 = (long unsigned int) configuration_8(D);
  _2 = _1 << 24;
  _3 = _2 & 117440512;
  tmp_9 = tmp_7 | _3;
  # DEBUG tmp => tmp_9
  # DEBUG BEGIN_STMT
  baseAddr_5(D)->MCFGR1 ={v} tmp_9;
  return;

}


LPI2C_Set_MasterInt (struct LPI2C_Type * baseAddr, uint32 interrupts, boolean enable)
{
  uint32 tmp;
  long unsigned int _1;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_5 ={v} baseAddr_4(D)->MIER;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  if (enable_6(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  tmp_9 = tmp_5 | interrupts_7(D);
  # DEBUG tmp => tmp_9
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _1 = ~interrupts_7(D);
  tmp_8 = tmp_5 & _1;
  # DEBUG tmp => tmp_8

  <bb 5> :
  # tmp_2 = PHI <tmp_9(3), tmp_8(4)>
  # DEBUG tmp => tmp_2
  # DEBUG BEGIN_STMT
  baseAddr_4(D)->MIER ={v} tmp_2;
  return;

}


LPI2C_Clear_MasterPinLowTimeoutEvent (struct LPI2C_Type * baseAddr)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  baseAddr_2(D)->MSR ={v} 8192;
  return;

}


LPI2C_Clear_MasterNACKDetectEvent (struct LPI2C_Type * baseAddr)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  baseAddr_2(D)->MSR ={v} 1024;
  return;

}


LPI2C_Clear_MasterArbitrationLostEvent (struct LPI2C_Type * baseAddr)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  baseAddr_2(D)->MSR ={v} 2048;
  return;

}


LPI2C_Clear_MasterFIFOErrorEvent (struct LPI2C_Type * baseAddr)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  baseAddr_2(D)->MSR ={v} 4096;
  return;

}


LPI2C_Get_MasterPinLowTimeoutEvent (const struct LPI2C_Type * baseAddr)
{
  uint32 regValue;
  long unsigned int _1;
  boolean _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->MSR;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  _1 = regValue_4 >> 13;
  regValue_5 = _1 & 1;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  _6 = regValue_5 != 0;
  return _6;

}


LPI2C_Get_MasterNACKDetectEvent (const struct LPI2C_Type * baseAddr)
{
  uint32 regValue;
  long unsigned int _1;
  boolean _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->MSR;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  _1 = regValue_4 >> 10;
  regValue_5 = _1 & 1;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  _6 = regValue_5 != 0;
  return _6;

}


LPI2C_Get_MasterArbitrationLostEvent (const struct LPI2C_Type * baseAddr)
{
  uint32 regValue;
  long unsigned int _1;
  boolean _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->MSR;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  _1 = regValue_4 >> 11;
  regValue_5 = _1 & 1;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  _6 = regValue_5 != 0;
  return _6;

}


LPI2C_Get_MasterFIFOErrorEvent (const struct LPI2C_Type * baseAddr)
{
  uint32 regValue;
  long unsigned int _1;
  boolean _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->MSR;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  _1 = regValue_4 >> 12;
  regValue_5 = _1 & 1;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  _6 = regValue_5 != 0;
  return _6;

}


LPI2C_Get_MasterTransmitDataRequestEvent (const struct LPI2C_Type * baseAddr)
{
  uint32 regValue;
  boolean _5;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_3 ={v} baseAddr_2(D)->MSR;
  # DEBUG regValue => regValue_3
  # DEBUG BEGIN_STMT
  regValue_4 = regValue_3 & 1;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  _5 = regValue_4 != 0;
  return _5;

}


LPI2C_Get_MasterReceiveDataReadyEvent (const struct LPI2C_Type * baseAddr)
{
  uint32 regValue;
  long unsigned int _1;
  boolean _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->MSR;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  _1 = regValue_4 >> 1;
  regValue_5 = _1 & 1;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  _6 = regValue_5 != 0;
  return _6;

}


LPI2C_Set_MasterEnable (struct LPI2C_Type * baseAddr, boolean enable)
{
  uint32 regValue;
  long unsigned int iftmp.0_1;
  long unsigned int iftmp.0_7;
  long unsigned int iftmp.0_8;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_4 ={v} baseAddr_3(D)->MCR;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  regValue_5 = regValue_4 & 4294967294;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  if (enable_6(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  iftmp.0_8 = 1;
  goto <bb 5>; [INV]

  <bb 4> :
  iftmp.0_7 = 0;

  <bb 5> :
  # iftmp.0_1 = PHI <iftmp.0_8(3), iftmp.0_7(4)>
  regValue_9 = iftmp.0_1 | regValue_5;
  # DEBUG regValue => regValue_9
  # DEBUG BEGIN_STMT
  baseAddr_3(D)->MCR ={v} regValue_9;
  return;

}


LPI2C_Reset_MasterTxFIFOCmd (struct LPI2C_Type * baseAddr)
{
  uint32 regValue;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_3 ={v} baseAddr_2(D)->MCR;
  # DEBUG regValue => regValue_3
  # DEBUG BEGIN_STMT
  regValue_4 = regValue_3 & 4294967039;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  regValue_5 = regValue_4 | 256;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  baseAddr_2(D)->MCR ={v} regValue_5;
  return;

}


LPI2C_Reset_MasterRxFIFOCmd (struct LPI2C_Type * baseAddr)
{
  uint32 regValue;

  <bb 2> :
  # DEBUG BEGIN_STMT
  regValue_3 ={v} baseAddr_2(D)->MCR;
  # DEBUG regValue => regValue_3
  # DEBUG BEGIN_STMT
  regValue_4 = regValue_3 & 4294966783;
  # DEBUG regValue => regValue_4
  # DEBUG BEGIN_STMT
  regValue_5 = regValue_4 | 512;
  # DEBUG regValue => regValue_5
  # DEBUG BEGIN_STMT
  baseAddr_2(D)->MCR ={v} regValue_5;
  return;

}


LPI2C_Get_MasterTxFIFOSize (const struct LPI2C_Type * baseAddr)
{
  uint32 tmp;
  uint16 _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_3 ={v} baseAddr_2(D)->PARAM;
  # DEBUG tmp => tmp_3
  # DEBUG BEGIN_STMT
  tmp_4 = tmp_3 & 15;
  # DEBUG tmp => tmp_4
  # DEBUG BEGIN_STMT
  tmp_5 = 1 << tmp_4;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  _6 = (uint16) tmp_5;
  return _6;

}


LPI2C_Get_MasterRxFIFOSize (const struct LPI2C_Type * baseAddr)
{
  uint32 tmp;
  long unsigned int _1;
  uint16 _7;

  <bb 2> :
  # DEBUG BEGIN_STMT
  tmp_4 ={v} baseAddr_3(D)->PARAM;
  # DEBUG tmp => tmp_4
  # DEBUG BEGIN_STMT
  _1 = tmp_4 >> 8;
  tmp_5 = _1 & 15;
  # DEBUG tmp => tmp_5
  # DEBUG BEGIN_STMT
  tmp_6 = 1 << tmp_5;
  # DEBUG tmp => tmp_6
  # DEBUG BEGIN_STMT
  _7 = (uint16) tmp_6;
  return _7;

}


