Swt_Ip_IrqHandler (uint32 u32Instance)
{
  struct SWT_Type * const base;

  <bb 2> :
  # DEBUG BEGIN_STMT
  base = s_swtBase[u32Instance];
  # DEBUG BEGIN_STMT
  _1 = Swt_Ip_GetIntFlag (base);
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Swt_Ip_ClearIntFlag (base);
  # DEBUG BEGIN_STMT
  _2 = Swt_Ip_apCallbackPtr[u32Instance];
  if (_2 != 0B)
    goto <bb 4>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 4> :
  _3 = Swt_Ip_IsIntEnabled (base);
  if (_3 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _4 = Swt_Ip_apCallbackPtr[u32Instance];
  _4 ();

  <bb 6> :
  return;

}


Swt_Ip_StopTimer (const uint32 u32Instance)
{
  Swt_Ip_StatusType ret;
  Swt_Ip_LockType lockConfig;
  struct SWT_Type * const base;
  Swt_Ip_StatusType D.4582;

  <bb 2> :
  # DEBUG BEGIN_STMT
  base = s_swtBase[u32Instance];
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  lockConfig = Swt_Ip_GetLock (base);
  # DEBUG BEGIN_STMT
  SchM_Enter_Wdg_WDG_EXCLUSIVE_AREA_11 ();
  # DEBUG BEGIN_STMT
  ret = Swt_Ip_Unlock (base);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Swt_Ip_Disable (base);
  # DEBUG BEGIN_STMT
  Swt_Ip_Lock (base, lockConfig);

  <bb 4> :
  # DEBUG BEGIN_STMT
  SchM_Exit_Wdg_WDG_EXCLUSIVE_AREA_11 ();
  # DEBUG BEGIN_STMT
  D.4582 = ret;
  return D.4582;

}


Swt_Ip_StartTimer (const uint32 u32Instance)
{
  Swt_Ip_StatusType ret;
  Swt_Ip_LockType lockConfig;
  struct SWT_Type * const base;
  Swt_Ip_StatusType D.4578;

  <bb 2> :
  # DEBUG BEGIN_STMT
  base = s_swtBase[u32Instance];
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  lockConfig = Swt_Ip_GetLock (base);
  # DEBUG BEGIN_STMT
  SchM_Enter_Wdg_WDG_EXCLUSIVE_AREA_10 ();
  # DEBUG BEGIN_STMT
  ret = Swt_Ip_Unlock (base);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Swt_Ip_Enable (base);
  # DEBUG BEGIN_STMT
  Swt_Ip_Lock (base, lockConfig);

  <bb 4> :
  # DEBUG BEGIN_STMT
  SchM_Exit_Wdg_WDG_EXCLUSIVE_AREA_10 ();
  # DEBUG BEGIN_STMT
  D.4578 = ret;
  return D.4578;

}


Swt_Ip_SetTimeout (const uint32 u32Instance, const uint32 u32TimeoutValue, const uint32 u32WindowValue)
{
  Swt_Ip_StatusType ret;
  Swt_Ip_LockType lockConfig;
  struct SWT_Type * const base;
  Swt_Ip_StatusType D.4574;

  <bb 2> :
  # DEBUG BEGIN_STMT
  base = s_swtBase[u32Instance];
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  lockConfig = Swt_Ip_GetLock (base);
  # DEBUG BEGIN_STMT
  ret = Swt_Ip_CheckTimeout (u32TimeoutValue, u32WindowValue);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = Swt_Ip_Unlock (base);
  if (_1 == 1)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  ret = 1;
  goto <bb 9>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  Swt_Ip_Disable (base);
  # DEBUG BEGIN_STMT
  base->TO = u32TimeoutValue;
  # DEBUG BEGIN_STMT
  if (u32WindowValue != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  base->WN = u32WindowValue;
  # DEBUG BEGIN_STMT
  _2 = base->CR;
  _3 = _2 | 128;
  base->CR = _3;
  goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _4 = base->CR;
  _5 = _4 & 4294967167;
  base->CR = _5;

  <bb 8> :
  # DEBUG BEGIN_STMT
  Swt_Ip_Enable (base);
  # DEBUG BEGIN_STMT
  Swt_Ip_Lock (base, lockConfig);

  <bb 9> :
  # DEBUG BEGIN_STMT
  D.4574 = ret;
  return D.4574;

}


Swt_Ip_Config (const uint32 u32Instance, const struct Swt_Ip_ConfigType * const Swt_Ip_pConfig)
{
  boolean bSwtEnabled;
  Swt_Ip_StatusType ret;
  struct SWT_Type * const base;
  Swt_Ip_StatusType D.4564;

  <bb 2> :
  # DEBUG BEGIN_STMT
  base = s_swtBase[u32Instance];
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _1 = Swt_Ip_pConfig->u32TimeoutValue;
  _2 = Swt_Ip_pConfig->u32WindowValue;
  ret = Swt_Ip_CheckTimeout (_1, _2);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _3 = Swt_Ip_Unlock (base);
  if (_3 == 1)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  ret = 1;
  goto <bb 10>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  bSwtEnabled = Swt_Ip_IsEnable (base);
  # DEBUG BEGIN_STMT
  if (bSwtEnabled != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  Swt_Ip_Disable (base);

  <bb 7> :
  # DEBUG BEGIN_STMT
  Swt_Ip_RegisterConfig (base, Swt_Ip_pConfig);
  # DEBUG BEGIN_STMT
  if (bSwtEnabled != 0)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  Swt_Ip_Enable (base);

  <bb 9> :
  # DEBUG BEGIN_STMT
  _4 = Swt_Ip_pConfig->lockConfig;
  Swt_Ip_Lock (base, _4);

  <bb 10> :
  # DEBUG BEGIN_STMT
  D.4564 = ret;
  return D.4564;

}


Swt_Ip_Service (const uint32 u32Instance)
{
  boolean bUnlockSequence;
  struct SWT_Type * const base;
  boolean iftmp.7;
  boolean iftmp.6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  base = s_swtBase[u32Instance];
  # DEBUG BEGIN_STMT
  bUnlockSequence = 0;
  # DEBUG BEGIN_STMT
  SchM_Enter_Wdg_WDG_EXCLUSIVE_AREA_09 ();
  # DEBUG BEGIN_STMT
  _1 = Swt_Ip_IsKeyedServiceMode (base);
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = Swt_Ip_ServiceKeyGen (base);
  if (_2 == 50464)
    goto <bb 5>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 4> :
  _3 = (int) bUnlockSequence;
  if (_3 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  iftmp.6 = 1;
  goto <bb 7>; [INV]

  <bb 6> :
  iftmp.6 = 0;

  <bb 7> :
  bUnlockSequence = iftmp.6;
  # DEBUG BEGIN_STMT
  _4 = Swt_Ip_ServiceKeyGen (base);
  Swt_Ip_ServiceCmd (base, _4);
  # DEBUG BEGIN_STMT
  _5 = Swt_Ip_ServiceKeyGen (base);
  if (_5 == 50464)
    goto <bb 9>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 8> :
  _6 = (int) bUnlockSequence;
  if (_6 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  iftmp.7 = 1;
  goto <bb 11>; [INV]

  <bb 10> :
  iftmp.7 = 0;

  <bb 11> :
  bUnlockSequence = iftmp.7;
  # DEBUG BEGIN_STMT
  _7 = Swt_Ip_ServiceKeyGen (base);
  Swt_Ip_ServiceCmd (base, _7);
  # DEBUG BEGIN_STMT
  _8 = Swt_Ip_GetLock (base);
  if (_8 == 1)
    goto <bb 12>; [INV]
  else
    goto <bb 15>; [INV]

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

  <bb 13> :
  # DEBUG BEGIN_STMT
  Swt_Ip_ServiceCmd (base, 55592);
  # DEBUG BEGIN_STMT
  Swt_Ip_Lock (base, 1);
  goto <bb 15>; [INV]

  <bb 14> :
  # DEBUG BEGIN_STMT
  Swt_Ip_ServiceCmd (base, 42498);
  # DEBUG BEGIN_STMT
  Swt_Ip_ServiceCmd (base, 46208);

  <bb 15> :
  # DEBUG BEGIN_STMT
  SchM_Exit_Wdg_WDG_EXCLUSIVE_AREA_09 ();
  return;

}


Swt_Ip_Deinit (const uint32 u32Instance)
{
  Swt_Ip_StatusType ret;
  struct SWT_Type * const base;
  Swt_Ip_StatusType D.4530;

  <bb 2> :
  # DEBUG BEGIN_STMT
  base = s_swtBase[u32Instance];
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  ret = Swt_Ip_Unlock (base);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  Swt_Ip_Disable (base);
  # DEBUG BEGIN_STMT
  base->IR = 1;
  # DEBUG BEGIN_STMT
  base->TO = 7601632;
  # DEBUG BEGIN_STMT
  base->WN = 0;
  # DEBUG BEGIN_STMT
  base->SK = 0;
  # DEBUG BEGIN_STMT
  base->CR = 4278190346;
  # DEBUG BEGIN_STMT
  Swt_Ip_ClearRequest (base);

  <bb 4> :
  # DEBUG BEGIN_STMT
  D.4530 = ret;
  return D.4530;

}


Swt_Ip_Init (const uint32 u32Instance, const struct Swt_Ip_ConfigType * const Swt_Ip_pConfig)
{
  Swt_Ip_StatusType ret;
  struct SWT_Type * const base;
  Swt_Ip_StatusType D.4474;

  <bb 2> :
  # DEBUG BEGIN_STMT
  base = s_swtBase[u32Instance];
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  _1 = Swt_Ip_IsEnable (base);
  if (_1 != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 3>; [INV]

  <bb 3> :
  _2 = Swt_Ip_Unlock (base);
  if (_2 == 1)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  ret = 1;
  goto <bb 9>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _3 = Swt_Ip_pConfig->u32TimeoutValue;
  _4 = Swt_Ip_pConfig->u32WindowValue;
  ret = Swt_Ip_CheckTimeout (_3, _4);
  # DEBUG BEGIN_STMT
  if (ret == 0)
    goto <bb 6>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  Swt_Ip_RegisterConfig (base, Swt_Ip_pConfig);
  # DEBUG BEGIN_STMT
  _5 = Swt_Ip_pConfig->bEnInterrupt;
  if (_5 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _6 = Swt_Ip_pConfig->pfSwtCallback;
  Swt_Ip_apCallbackPtr[u32Instance] = _6;

  <bb 8> :
  # DEBUG BEGIN_STMT
  Swt_Ip_Enable (base);
  # DEBUG BEGIN_STMT
  _7 = Swt_Ip_pConfig->lockConfig;
  Swt_Ip_Lock (base, _7);

  <bb 9> :
  # DEBUG BEGIN_STMT
  D.4474 = ret;
  return D.4474;

}


Swt_Ip_ClearIntFlag (struct SWT_Type * const base)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = base->IR;
  _2 = _1 & 1;
  base->IR = _2;
  return;

}


Swt_Ip_IsIntEnabled (const struct SWT_Type * const base)
{
  boolean D.4592;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = base->CR;
  _2 = _1 & 64;
  D.4592 = _2 != 0;
  return D.4592;

}


Swt_Ip_GetIntFlag (const struct SWT_Type * const base)
{
  boolean D.4590;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = base->IR;
  _2 = _1 & 1;
  D.4590 = _2 != 0;
  return D.4590;

}


Swt_Ip_ClearRequest (struct SWT_Type * const base)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  base->RRR = 1;
  return;

}


Swt_Ip_ServiceKeyGen (const struct SWT_Type * const base)
{
  uint16 D.4551;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = base->SK;
  _2 = (short unsigned int) _1;
  _3 = _2 * 17;
  D.4551 = _3 + 3;
  return D.4551;

}


Swt_Ip_IsKeyedServiceMode (const struct SWT_Type * const base)
{
  boolean D.4549;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = base->CR;
  _2 = _1 >> 9;
  _3 = _2 & 3;
  D.4549 = _3 == 1;
  return D.4549;

}


Swt_Ip_ServiceCmd (struct SWT_Type * const base, uint16 u16ServiceKey)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = base->SR;
  _2 = _1 & 4294901760;
  _3 = (long unsigned int) u16ServiceKey;
  _4 = _2 | _3;
  base->SR = _4;
  return;

}


Swt_Ip_CheckTimeout (uint32 u32TimeoutValue, uint32 u32WindowValue)
{
  Swt_Ip_StatusType ret;
  Swt_Ip_StatusType D.4497;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  if (u32TimeoutValue <= 2)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  ret = 1;

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

  <bb 5> :
  if (u32TimeoutValue <= u32WindowValue)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  ret = 1;

  <bb 7> :
  # DEBUG BEGIN_STMT
  D.4497 = ret;
  return D.4497;

}


Swt_Ip_RegisterConfig (struct SWT_Type * const base, const struct Swt_Ip_ConfigType * const Swt_Ip_pConfig)
{
  uint32 cr;
  long unsigned int iftmp.5;
  long unsigned int iftmp.4;
  long unsigned int iftmp.3;
  long unsigned int iftmp.2;
  long unsigned int iftmp.1;
  long unsigned int iftmp.0;

  <bb 2> :
  # DEBUG BEGIN_STMT
  cr = 0;
  # DEBUG BEGIN_STMT
  _1 = Swt_Ip_pConfig->u8MapEnBitmask;
  _2 = (long unsigned int) _1;
  _3 = _2 << 24;
  _4 = Swt_Ip_pConfig->bEnKeyedService;
  if (_4 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

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

  <bb 4> :
  iftmp.0 = 0;

  <bb 5> :
  _5 = iftmp.0 | _3;
  _6 = Swt_Ip_pConfig->bEnResetOnInvalidAccess;
  if (_6 != 0)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  iftmp.1 = 256;
  goto <bb 8>; [INV]

  <bb 7> :
  iftmp.1 = 0;

  <bb 8> :
  _7 = iftmp.1 | _5;
  _8 = Swt_Ip_pConfig->bEnWindow;
  if (_8 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  iftmp.2 = 128;
  goto <bb 11>; [INV]

  <bb 10> :
  iftmp.2 = 0;

  <bb 11> :
  _9 = iftmp.2 | _7;
  _10 = Swt_Ip_pConfig->bEnInterrupt;
  if (_10 != 0)
    goto <bb 12>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 12> :
  iftmp.3 = 64;
  goto <bb 14>; [INV]

  <bb 13> :
  iftmp.3 = 0;

  <bb 14> :
  _11 = iftmp.3 | _9;
  _12 = Swt_Ip_pConfig->bEnRunInStopMode;
  if (_12 != 0)
    goto <bb 15>; [INV]
  else
    goto <bb 16>; [INV]

  <bb 15> :
  iftmp.4 = 0;
  goto <bb 17>; [INV]

  <bb 16> :
  iftmp.4 = 4;

  <bb 17> :
  _13 = iftmp.4 | _11;
  _14 = Swt_Ip_pConfig->bEnRunInDebugMode;
  if (_14 != 0)
    goto <bb 18>; [INV]
  else
    goto <bb 19>; [INV]

  <bb 18> :
  iftmp.5 = 0;
  goto <bb 20>; [INV]

  <bb 19> :
  iftmp.5 = 2;

  <bb 20> :
  cr = iftmp.5 | _13;
  # DEBUG BEGIN_STMT
  base->CR = cr;
  # DEBUG BEGIN_STMT
  base->IR = 1;
  # DEBUG BEGIN_STMT
  _15 = Swt_Ip_pConfig->u32TimeoutValue;
  base->TO = _15;
  # DEBUG BEGIN_STMT
  _16 = Swt_Ip_pConfig->bEnWindow;
  if (_16 != 0)
    goto <bb 21>; [INV]
  else
    goto <bb 22>; [INV]

  <bb 21> :
  # DEBUG BEGIN_STMT
  _17 = Swt_Ip_pConfig->u32WindowValue;
  base->WN = _17;

  <bb 22> :
  # DEBUG BEGIN_STMT
  _18 = Swt_Ip_pConfig->bEnKeyedService;
  if (_18 != 0)
    goto <bb 23>; [INV]
  else
    goto <bb 24>; [INV]

  <bb 23> :
  # DEBUG BEGIN_STMT
  _19 = Swt_Ip_pConfig->u16InitialKey;
  _20 = (long unsigned int) _19;
  base->SK = _20;

  <bb 24> :
  return;

}


Swt_Ip_Unlock (struct SWT_Type * const base)
{
  uint32 ElapsedTicks;
  uint32 CurrentTicks;
  uint32 TimeoutTicks;
  Swt_Ip_StatusType ret;
  Swt_Ip_StatusType D.4488;
  long unsigned int D.4483;

  <bb 2> :
  # DEBUG BEGIN_STMT
  ret = 0;
  # DEBUG BEGIN_STMT
  TimeoutTicks = OsIf_MicrosToTicks (3000, 0);
  # DEBUG BEGIN_STMT
  CurrentTicks = 0;
  # DEBUG BEGIN_STMT
  ElapsedTicks = 0;
  # DEBUG BEGIN_STMT
  _1 = base->CR;
  _2 = _1 & 32;
  if (_2 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  ret = 1;
  goto <bb 11>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _3 = base->CR;
  _4 = _3 & 16;
  if (_4 != 0)
    goto <bb 5>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  base->SR = 50464;
  # DEBUG BEGIN_STMT
  base->SR = 55592;
  # DEBUG BEGIN_STMT
  _5 = OsIf_GetCounter (0);
  CurrentTicks = _5;
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  D.4483 = OsIf_GetElapsed (&CurrentTicks, 0);
  ElapsedTicks = D.4483 + ElapsedTicks;

  <bb 7> :
  # DEBUG BEGIN_STMT
  _6 = base->CR;
  _7 = _6 & 16;
  if (_7 != 0)
    goto <bb 8>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 8> :
  if (ElapsedTicks < TimeoutTicks)
    goto <bb 6>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  if (ElapsedTicks >= TimeoutTicks)
    goto <bb 10>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  ret = 1;

  <bb 11> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  D.4488 = ret;
  CurrentTicks = {CLOBBER};
  return D.4488;

}


Swt_Ip_Lock (struct SWT_Type * const base, Swt_Ip_LockType lockConfig)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = (int) lockConfig;
  switch (_1) <default: <L4> [INV], case 1: <L1> [INV], case 2: <L0> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  _2 = base->CR;
  _3 = _2 | 32;
  base->CR = _3;
  # DEBUG BEGIN_STMT
  goto <bb 5>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  _4 = base->CR;
  _5 = _4 | 16;
  base->CR = _5;
  # DEBUG BEGIN_STMT

  <bb 5> :
<L4>:
  return;

}


Swt_Ip_GetLock (const struct SWT_Type * const base)
{
  Swt_Ip_LockType lockMode;
  Swt_Ip_LockType D.4553;

  <bb 2> :
  # DEBUG BEGIN_STMT
  lockMode = 0;
  # DEBUG BEGIN_STMT
  _1 = base->CR;
  _2 = _1 >> 4;
  _3 = _2 & 3;
  switch (_3) <default: <L3> [INV], case 0: <L0> [INV], case 1: <L1> [INV], case 2: <L2> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  lockMode = 0;
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 4> :
<L1>:
  # DEBUG BEGIN_STMT
  lockMode = 1;
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 5> :
<L2>:
  # DEBUG BEGIN_STMT
  lockMode = 2;
  # DEBUG BEGIN_STMT
  goto <bb 7>; [INV]

  <bb 6> :
<L3>:
  # DEBUG BEGIN_STMT
  lockMode = 2;
  # DEBUG BEGIN_STMT

  <bb 7> :
  # DEBUG BEGIN_STMT
  D.4553 = lockMode;
  return D.4553;

}


Swt_Ip_Disable (struct SWT_Type * const base)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = base->CR;
  _2 = _1 & 4294967294;
  base->CR = _2;
  return;

}


Swt_Ip_Enable (struct SWT_Type * const base)
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = base->CR;
  _2 = _1 | 1;
  base->CR = _2;
  return;

}


Swt_Ip_IsEnable (const struct SWT_Type * const base)
{
  boolean D.4476;

  <bb 2> :
  # DEBUG BEGIN_STMT
  _1 = base->CR;
  _2 = _1 & 1;
  D.4476 = _2 != 0;
  return D.4476;

}


