Cache_Ip_CleanByAddr (const Cache_Ip_Type CacheType, const boolean EnInvalidate, const uint32 Addr, const uint32 Length)
{
  Std_ReturnType Status;
  Std_ReturnType _13;

  <bb 2> :
  # DEBUG BEGIN_STMT
  Status_3 = 0;
  # DEBUG Status => Status_3
  # DEBUG BEGIN_STMT
  SchM_Enter_Mcl_MCL_EXCLUSIVE_AREA_18 ();
  # DEBUG BEGIN_STMT
  switch (CacheType_6(D)) <default: <L6> [INV], case 0: <L0> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  Status_11 = hwAcc_Lmem_ProcessorCodeCacheCleanByAddr (EnInvalidate_7(D), Addr_8(D), Length_9(D));
  # DEBUG Status => Status_11
  # DEBUG BEGIN_STMT

  <bb 4> :
  # Status_1 = PHI <Status_11(3), Status_3(2)>
<L6>:
  # DEBUG Status => Status_1
  # DEBUG BEGIN_STMT
  SchM_Exit_Mcl_MCL_EXCLUSIVE_AREA_18 ();
  # DEBUG BEGIN_STMT
  _13 = Status_1;
  return _13;

}


Cache_Ip_InvalidateByAddr (const Cache_Ip_Type CacheType, const uint32 Addr, const uint32 Length)
{
  Std_ReturnType Status;
  Std_ReturnType _12;

  <bb 2> :
  # DEBUG BEGIN_STMT
  Status_3 = 0;
  # DEBUG Status => Status_3
  # DEBUG BEGIN_STMT
  SchM_Enter_Mcl_MCL_EXCLUSIVE_AREA_17 ();
  # DEBUG BEGIN_STMT
  switch (CacheType_6(D)) <default: <L6> [INV], case 0: <L0> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  Status_10 = hwAcc_Lmem_ProcessorCodeInvalidateByAddr (Addr_7(D), Length_8(D));
  # DEBUG Status => Status_10
  # DEBUG BEGIN_STMT

  <bb 4> :
  # Status_1 = PHI <Status_10(3), Status_3(2)>
<L6>:
  # DEBUG Status => Status_1
  # DEBUG BEGIN_STMT
  SchM_Exit_Mcl_MCL_EXCLUSIVE_AREA_17 ();
  # DEBUG BEGIN_STMT
  _12 = Status_1;
  return _12;

}


Cache_Ip_Clean (const Cache_Ip_Type CacheType, const boolean EnInvalidate)
{
  Std_ReturnType Status;
  Std_ReturnType _11;

  <bb 2> :
  # DEBUG BEGIN_STMT
  Status_3 = 0;
  # DEBUG Status => Status_3
  # DEBUG BEGIN_STMT
  SchM_Enter_Mcl_MCL_EXCLUSIVE_AREA_16 ();
  # DEBUG BEGIN_STMT
  switch (CacheType_6(D)) <default: <L6> [INV], case 0: <L0> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  Status_9 = hwAcc_Lmem_ProcessorCodeClean (EnInvalidate_7(D));
  # DEBUG Status => Status_9
  # DEBUG BEGIN_STMT

  <bb 4> :
  # Status_1 = PHI <Status_9(3), Status_3(2)>
<L6>:
  # DEBUG Status => Status_1
  # DEBUG BEGIN_STMT
  SchM_Exit_Mcl_MCL_EXCLUSIVE_AREA_16 ();
  # DEBUG BEGIN_STMT
  _11 = Status_1;
  return _11;

}


Cache_Ip_Invalidate (const Cache_Ip_Type CacheType)
{
  Std_ReturnType Status;
  Std_ReturnType _10;

  <bb 2> :
  # DEBUG BEGIN_STMT
  Status_3 = 0;
  # DEBUG Status => Status_3
  # DEBUG BEGIN_STMT
  SchM_Enter_Mcl_MCL_EXCLUSIVE_AREA_15 ();
  # DEBUG BEGIN_STMT
  switch (CacheType_6(D)) <default: <L6> [INV], case 0: <L0> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  Status_8 = hwAcc_Lmem_ProcessorCodeInvalidate ();
  # DEBUG Status => Status_8
  # DEBUG BEGIN_STMT

  <bb 4> :
  # Status_1 = PHI <Status_8(3), Status_3(2)>
<L6>:
  # DEBUG Status => Status_1
  # DEBUG BEGIN_STMT
  SchM_Exit_Mcl_MCL_EXCLUSIVE_AREA_15 ();
  # DEBUG BEGIN_STMT
  _10 = Status_1;
  return _10;

}


Cache_Ip_Disable (const Cache_Ip_Type CacheType)
{
  Std_ReturnType Status;
  Std_ReturnType _10;

  <bb 2> :
  # DEBUG BEGIN_STMT
  Status_3 = 0;
  # DEBUG Status => Status_3
  # DEBUG BEGIN_STMT
  SchM_Enter_Mcl_MCL_EXCLUSIVE_AREA_14 ();
  # DEBUG BEGIN_STMT
  switch (CacheType_6(D)) <default: <L6> [INV], case 0: <L0> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  Status_8 = hwAcc_Lmem_ProcessorCodeCacheDisable ();
  # DEBUG Status => Status_8
  # DEBUG BEGIN_STMT

  <bb 4> :
  # Status_1 = PHI <Status_8(3), Status_3(2)>
<L6>:
  # DEBUG Status => Status_1
  # DEBUG BEGIN_STMT
  SchM_Exit_Mcl_MCL_EXCLUSIVE_AREA_14 ();
  # DEBUG BEGIN_STMT
  _10 = Status_1;
  return _10;

}


Cache_Ip_Enable (const Cache_Ip_Type CacheType)
{
  Std_ReturnType Status;
  Std_ReturnType _10;

  <bb 2> :
  # DEBUG BEGIN_STMT
  Status_3 = 0;
  # DEBUG Status => Status_3
  # DEBUG BEGIN_STMT
  SchM_Enter_Mcl_MCL_EXCLUSIVE_AREA_13 ();
  # DEBUG BEGIN_STMT
  switch (CacheType_6(D)) <default: <L6> [INV], case 0: <L0> [INV]>

  <bb 3> :
<L0>:
  # DEBUG BEGIN_STMT
  Status_8 = hwAcc_Lmem_ProcessorCodeCacheEnable ();
  # DEBUG Status => Status_8
  # DEBUG BEGIN_STMT

  <bb 4> :
  # Status_1 = PHI <Status_8(3), Status_3(2)>
<L6>:
  # DEBUG Status => Status_1
  # DEBUG BEGIN_STMT
  SchM_Exit_Mcl_MCL_EXCLUSIVE_AREA_13 ();
  # DEBUG BEGIN_STMT
  _10 = Status_1;
  return _10;

}


hwAcc_Lmem_ProcessorCodeCacheCleanByAddr (const boolean enInvalidate, const uint32 addr, const uint32 length)
{
  uint32 locEndAddr;
  uint32 locStartAddr;
  Std_ReturnType locStatus;
  struct LMEM_Type * _1;
  struct LMEM_Type * _2;
  struct LMEM_Type * _3;
  Std_ReturnType _21;

  <bb 2> :
  # DEBUG BEGIN_STMT
  locStatus_7 = 0;
  # DEBUG locStatus => locStatus_7
  # DEBUG BEGIN_STMT
  locStartAddr_9 = addr_8(D) & 4294967280;
  # DEBUG locStartAddr => locStartAddr_9
  # DEBUG BEGIN_STMT
  locEndAddr_11 = addr_8(D) + length_10(D);
  # DEBUG locEndAddr => locEndAddr_11
  # DEBUG BEGIN_STMT
  if (enInvalidate_12(D) != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _1 = 3758628864B;
  locStatus_17 = hwAcc_Lmem_LineControlReg (_1, 117506048, 0);
  # DEBUG locStatus => locStatus_17
  goto <bb 6>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _2 = 3758628864B;
  locStatus_15 = hwAcc_Lmem_LineControlReg (_2, 100728832, 0);
  # DEBUG locStatus => locStatus_15
  goto <bb 6>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _3 = 3758628864B;
  locStatus_19 = hwAcc_Lmem_AddressReg (_3, locStartAddr_5, 1);
  # DEBUG locStatus => locStatus_19
  # DEBUG BEGIN_STMT
  locStartAddr_20 = locStartAddr_5 + 16;
  # DEBUG locStartAddr => locStartAddr_20

  <bb 6> :
  # locStatus_4 = PHI <locStatus_15(4), locStatus_19(5), locStatus_17(3)>
  # locStartAddr_5 = PHI <locStartAddr_9(4), locStartAddr_20(5), locStartAddr_9(3)>
  # DEBUG locStartAddr => locStartAddr_5
  # DEBUG locStatus => locStatus_4
  # DEBUG BEGIN_STMT
  if (locStartAddr_5 < locEndAddr_11)
    goto <bb 7>; [INV]
  else
    goto <bb 8>; [INV]

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

  <bb 8> :
  # DEBUG BEGIN_STMT
  _21 = locStatus_4;
  return _21;

}


hwAcc_Lmem_ProcessorCodeInvalidateByAddr (const uint32 addr, const uint32 length)
{
  uint32 locEndAddr;
  uint32 locStartAddr;
  Std_ReturnType locStatus;
  struct LMEM_Type * _1;
  struct LMEM_Type * _2;
  Std_ReturnType _17;

  <bb 2> :
  # DEBUG BEGIN_STMT
  locStatus_6 = 0;
  # DEBUG locStatus => locStatus_6
  # DEBUG BEGIN_STMT
  locStartAddr_8 = addr_7(D) & 4294967280;
  # DEBUG locStartAddr => locStartAddr_8
  # DEBUG BEGIN_STMT
  locEndAddr_10 = addr_7(D) + length_9(D);
  # DEBUG locEndAddr => locEndAddr_10
  # DEBUG BEGIN_STMT
  _1 = 3758628864B;
  locStatus_13 = hwAcc_Lmem_LineControlReg (_1, 83951616, 0);
  # DEBUG locStatus => locStatus_13
  # DEBUG BEGIN_STMT
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = 3758628864B;
  locStatus_15 = hwAcc_Lmem_AddressReg (_2, locStartAddr_4, 1);
  # DEBUG locStatus => locStatus_15
  # DEBUG BEGIN_STMT
  locStartAddr_16 = locStartAddr_4 + 16;
  # DEBUG locStartAddr => locStartAddr_16

  <bb 4> :
  # locStatus_3 = PHI <locStatus_13(2), locStatus_15(3)>
  # locStartAddr_4 = PHI <locStartAddr_8(2), locStartAddr_16(3)>
  # DEBUG locStartAddr => locStartAddr_4
  # DEBUG locStatus => locStatus_3
  # DEBUG BEGIN_STMT
  if (locStartAddr_4 < locEndAddr_10)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 5> :
  if (locStatus_3 == 0)
    goto <bb 3>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _17 = locStatus_3;
  return _17;

}


hwAcc_Lmem_ProcessorCodeClean (const boolean enInvalidate)
{
  Std_ReturnType locStatus;
  _Bool _1;
  struct LMEM_Type * _2;
  struct LMEM_Type * _3;
  Std_ReturnType _13;

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

  <bb 3> :
  # DEBUG BEGIN_STMT
  _2 = 3758628864B;
  locStatus_12 = hwAcc_Lmem_ControlReg (_2, 167772160, 2147483648);
  # DEBUG locStatus => locStatus_12
  goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  _3 = 3758628864B;
  locStatus_10 = hwAcc_Lmem_ControlReg (_3, 251658240, 2147483648);
  # DEBUG locStatus => locStatus_10

  <bb 5> :
  # locStatus_4 = PHI <locStatus_12(3), locStatus_10(4)>
  # DEBUG locStatus => locStatus_4
  # DEBUG BEGIN_STMT
  _13 = locStatus_4;
  return _13;

}


hwAcc_Lmem_ProcessorCodeInvalidate ()
{
  Std_ReturnType locStatus;
  struct LMEM_Type * _1;
  Std_ReturnType _6;

  <bb 2> :
  # DEBUG BEGIN_STMT
  locStatus_2 = 0;
  # DEBUG locStatus => locStatus_2
  # DEBUG BEGIN_STMT
  _1 = 3758628864B;
  locStatus_5 = hwAcc_Lmem_ControlReg (_1, 83886080, 2147483648);
  # DEBUG locStatus => locStatus_5
  # DEBUG BEGIN_STMT
  _6 = locStatus_5;
  return _6;

}


hwAcc_Lmem_ProcessorCodeCacheDisable ()
{
  uint32 locReg;
  uint32 locElapsedTicks;
  uint32 locCurrentTicks;
  uint32 locTimeoutTicks;
  Std_ReturnType locStatus;
  long unsigned int _1;
  struct LMEM_Type * _2;
  struct LMEM_Type * _3;
  struct LMEM_Type * _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _21;
  Std_ReturnType _24;

  <bb 2> :
  # DEBUG BEGIN_STMT
  locStatus_10 = 0;
  # DEBUG locStatus => locStatus_10
  # DEBUG BEGIN_STMT
  locTimeoutTicks_13 = OsIf_MicrosToTicks (100000, 0);
  # DEBUG locTimeoutTicks => locTimeoutTicks_13
  # DEBUG BEGIN_STMT
  _1 = OsIf_GetCounter (0);
  locCurrentTicks = _1;
  # DEBUG BEGIN_STMT
  locElapsedTicks_16 = 0;
  # DEBUG locElapsedTicks => locElapsedTicks_16
  # DEBUG BEGIN_STMT
  _2 = 3758628864B;
  locReg_17 ={v} _2->PCCCR;
  # DEBUG locReg => locReg_17
  # DEBUG BEGIN_STMT
  locReg_18 = locReg_17 & 4294967294;
  # DEBUG locReg => locReg_18
  # DEBUG BEGIN_STMT
  _3 = 3758628864B;
  _3->PCCCR ={v} locReg_18;
  # DEBUG BEGIN_STMT
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _21 = OsIf_GetElapsed (&locCurrentTicks, 0);
  locElapsedTicks_22 = _21 + locElapsedTicks_8;
  # DEBUG locElapsedTicks => locElapsedTicks_22

  <bb 4> :
  # locElapsedTicks_8 = PHI <locElapsedTicks_16(2), locElapsedTicks_22(3)>
  # DEBUG locElapsedTicks => locElapsedTicks_8
  # DEBUG BEGIN_STMT
  _4 = 3758628864B;
  _5 ={v} _4->PCCCR;
  _6 = _5 & 1;
  if (_6 == 1)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

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

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

  <bb 7> :
  # DEBUG BEGIN_STMT
  locStatus_23 = 1;
  # DEBUG locStatus => locStatus_23

  <bb 8> :
  # locStatus_7 = PHI <locStatus_10(6), locStatus_23(7)>
  # DEBUG locStatus => locStatus_7
  # DEBUG BEGIN_STMT
  _24 = locStatus_7;
  locCurrentTicks ={v} {CLOBBER};
  return _24;

}


hwAcc_Lmem_ProcessorCodeCacheEnable ()
{
  uint32 locReg;
  uint32 locElapsedTicks;
  uint32 locCurrentTicks;
  uint32 locTimeoutTicks;
  Std_ReturnType locStatus;
  long unsigned int _1;
  struct LMEM_Type * _2;
  struct LMEM_Type * _3;
  struct LMEM_Type * _4;
  long unsigned int _5;
  long unsigned int _6;
  long unsigned int _21;
  Std_ReturnType _24;

  <bb 2> :
  # DEBUG BEGIN_STMT
  locStatus_10 = 0;
  # DEBUG locStatus => locStatus_10
  # DEBUG BEGIN_STMT
  locTimeoutTicks_13 = OsIf_MicrosToTicks (100000, 0);
  # DEBUG locTimeoutTicks => locTimeoutTicks_13
  # DEBUG BEGIN_STMT
  _1 = OsIf_GetCounter (0);
  locCurrentTicks = _1;
  # DEBUG BEGIN_STMT
  locElapsedTicks_16 = 0;
  # DEBUG locElapsedTicks => locElapsedTicks_16
  # DEBUG BEGIN_STMT
  _2 = 3758628864B;
  locReg_17 ={v} _2->PCCCR;
  # DEBUG locReg => locReg_17
  # DEBUG BEGIN_STMT
  locReg_18 = locReg_17 | 1;
  # DEBUG locReg => locReg_18
  # DEBUG BEGIN_STMT
  _3 = 3758628864B;
  _3->PCCCR ={v} locReg_18;
  # DEBUG BEGIN_STMT
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _21 = OsIf_GetElapsed (&locCurrentTicks, 0);
  locElapsedTicks_22 = _21 + locElapsedTicks_8;
  # DEBUG locElapsedTicks => locElapsedTicks_22

  <bb 4> :
  # locElapsedTicks_8 = PHI <locElapsedTicks_16(2), locElapsedTicks_22(3)>
  # DEBUG locElapsedTicks => locElapsedTicks_8
  # DEBUG BEGIN_STMT
  _4 = 3758628864B;
  _5 ={v} _4->PCCCR;
  _6 = _5 & 1;
  if (_6 != 1)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

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

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

  <bb 7> :
  # DEBUG BEGIN_STMT
  locStatus_23 = 1;
  # DEBUG locStatus => locStatus_23

  <bb 8> :
  # locStatus_7 = PHI <locStatus_10(6), locStatus_23(7)>
  # DEBUG locStatus => locStatus_7
  # DEBUG BEGIN_STMT
  _24 = locStatus_7;
  locCurrentTicks ={v} {CLOBBER};
  return _24;

}


hwAcc_Lmem_AddressReg (struct LMEM_Type * pInst, uint32 Address, uint32 GoMask)
{
  uint32 locReg;
  uint32 locElapsedTicks;
  uint32 locCurrentTicks;
  uint32 locTimeoutTicks;
  Std_ReturnType locStatus;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _25;
  Std_ReturnType _28;

  <bb 2> :
  # DEBUG BEGIN_STMT
  locStatus_10 = 0;
  # DEBUG locStatus => locStatus_10
  # DEBUG BEGIN_STMT
  locTimeoutTicks_13 = OsIf_MicrosToTicks (100000, 0);
  # DEBUG locTimeoutTicks => locTimeoutTicks_13
  # DEBUG BEGIN_STMT
  _1 = OsIf_GetCounter (0);
  locCurrentTicks = _1;
  # DEBUG BEGIN_STMT
  locElapsedTicks_16 = 0;
  # DEBUG locElapsedTicks => locElapsedTicks_16
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  locReg_18 ={v} pInst_17(D)->PCCSAR;
  # DEBUG locReg => locReg_18
  # DEBUG BEGIN_STMT
  locReg_19 = locReg_18 & 3;
  # DEBUG locReg => locReg_19
  # DEBUG BEGIN_STMT
  _2 = Address_20(D) & 4294967292;
  _3 = GoMask_21(D) | _2;
  locReg_22 = locReg_19 | _3;
  # DEBUG locReg => locReg_22
  # DEBUG BEGIN_STMT
  pInst_17(D)->PCCSAR ={v} locReg_22;
  # DEBUG BEGIN_STMT
  if (GoMask_21(D) != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _25 = OsIf_GetElapsed (&locCurrentTicks, 0);
  locElapsedTicks_26 = _25 + locElapsedTicks_7;
  # DEBUG locElapsedTicks => locElapsedTicks_26

  <bb 4> :
  # locElapsedTicks_7 = PHI <locElapsedTicks_16(2), locElapsedTicks_26(3)>
  # DEBUG locElapsedTicks => locElapsedTicks_7
  # DEBUG BEGIN_STMT
  _4 ={v} pInst_17(D)->PCCSAR;
  _5 = GoMask_21(D) & _4;
  if (GoMask_21(D) == _5)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

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

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

  <bb 7> :
  # DEBUG BEGIN_STMT
  locStatus_27 = 1;
  # DEBUG locStatus => locStatus_27

  <bb 8> :
  # locStatus_6 = PHI <locStatus_10(2), locStatus_10(6), locStatus_27(7)>
  # DEBUG locStatus => locStatus_6
  # DEBUG BEGIN_STMT
  _28 = locStatus_6;
  locCurrentTicks ={v} {CLOBBER};
  return _28;

}


hwAcc_Lmem_LineControlReg (struct LMEM_Type * pInst, uint32 LineControlMask, uint32 GoMask)
{
  uint32 locReg;
  uint32 locElapsedTicks;
  uint32 locCurrentTicks;
  uint32 locTimeoutTicks;
  Std_ReturnType locStatus;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _25;
  Std_ReturnType _28;

  <bb 2> :
  # DEBUG BEGIN_STMT
  locStatus_10 = 0;
  # DEBUG locStatus => locStatus_10
  # DEBUG BEGIN_STMT
  locTimeoutTicks_13 = OsIf_MicrosToTicks (100000, 0);
  # DEBUG locTimeoutTicks => locTimeoutTicks_13
  # DEBUG BEGIN_STMT
  _1 = OsIf_GetCounter (0);
  locCurrentTicks = _1;
  # DEBUG BEGIN_STMT
  locElapsedTicks_16 = 0;
  # DEBUG locElapsedTicks => locElapsedTicks_16
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  locReg_18 ={v} pInst_17(D)->PCCLCR;
  # DEBUG locReg => locReg_18
  # DEBUG BEGIN_STMT
  _2 = ~LineControlMask_19(D);
  locReg_20 = locReg_18 & _2;
  # DEBUG locReg => locReg_20
  # DEBUG BEGIN_STMT
  _3 = LineControlMask_19(D) | GoMask_21(D);
  locReg_22 = locReg_20 | _3;
  # DEBUG locReg => locReg_22
  # DEBUG BEGIN_STMT
  pInst_17(D)->PCCLCR ={v} locReg_22;
  # DEBUG BEGIN_STMT
  if (GoMask_21(D) != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _25 = OsIf_GetElapsed (&locCurrentTicks, 0);
  locElapsedTicks_26 = _25 + locElapsedTicks_7;
  # DEBUG locElapsedTicks => locElapsedTicks_26

  <bb 4> :
  # locElapsedTicks_7 = PHI <locElapsedTicks_16(2), locElapsedTicks_26(3)>
  # DEBUG locElapsedTicks => locElapsedTicks_7
  # DEBUG BEGIN_STMT
  _4 ={v} pInst_17(D)->PCCLCR;
  _5 = GoMask_21(D) & _4;
  if (GoMask_21(D) == _5)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

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

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

  <bb 7> :
  # DEBUG BEGIN_STMT
  locStatus_27 = 1;
  # DEBUG locStatus => locStatus_27

  <bb 8> :
  # locStatus_6 = PHI <locStatus_10(2), locStatus_10(6), locStatus_27(7)>
  # DEBUG locStatus => locStatus_6
  # DEBUG BEGIN_STMT
  _28 = locStatus_6;
  locCurrentTicks ={v} {CLOBBER};
  return _28;

}


hwAcc_Lmem_ControlReg (struct LMEM_Type * pInst, uint32 ControlMask, uint32 GoMask)
{
  uint32 locReg;
  uint32 locElapsedTicks;
  uint32 locCurrentTicks;
  uint32 locTimeoutTicks;
  Std_ReturnType locStatus;
  long unsigned int _1;
  long unsigned int _2;
  long unsigned int _3;
  long unsigned int _4;
  long unsigned int _5;
  long unsigned int _25;
  Std_ReturnType _28;

  <bb 2> :
  # DEBUG BEGIN_STMT
  locStatus_10 = 0;
  # DEBUG locStatus => locStatus_10
  # DEBUG BEGIN_STMT
  locTimeoutTicks_13 = OsIf_MicrosToTicks (100000, 0);
  # DEBUG locTimeoutTicks => locTimeoutTicks_13
  # DEBUG BEGIN_STMT
  _1 = OsIf_GetCounter (0);
  locCurrentTicks = _1;
  # DEBUG BEGIN_STMT
  locElapsedTicks_16 = 0;
  # DEBUG locElapsedTicks => locElapsedTicks_16
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  locReg_18 ={v} pInst_17(D)->PCCCR;
  # DEBUG locReg => locReg_18
  # DEBUG BEGIN_STMT
  _2 = ~ControlMask_19(D);
  locReg_20 = locReg_18 & _2;
  # DEBUG locReg => locReg_20
  # DEBUG BEGIN_STMT
  _3 = ControlMask_19(D) | GoMask_21(D);
  locReg_22 = locReg_20 | _3;
  # DEBUG locReg => locReg_22
  # DEBUG BEGIN_STMT
  pInst_17(D)->PCCCR ={v} locReg_22;
  # DEBUG BEGIN_STMT
  if (GoMask_21(D) != 0)
    goto <bb 4>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  _25 = OsIf_GetElapsed (&locCurrentTicks, 0);
  locElapsedTicks_26 = _25 + locElapsedTicks_7;
  # DEBUG locElapsedTicks => locElapsedTicks_26

  <bb 4> :
  # locElapsedTicks_7 = PHI <locElapsedTicks_16(2), locElapsedTicks_26(3)>
  # DEBUG locElapsedTicks => locElapsedTicks_7
  # DEBUG BEGIN_STMT
  _4 ={v} pInst_17(D)->PCCCR;
  _5 = GoMask_21(D) & _4;
  if (GoMask_21(D) == _5)
    goto <bb 5>; [INV]
  else
    goto <bb 6>; [INV]

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

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

  <bb 7> :
  # DEBUG BEGIN_STMT
  locStatus_27 = 1;
  # DEBUG locStatus => locStatus_27

  <bb 8> :
  # locStatus_6 = PHI <locStatus_10(2), locStatus_10(6), locStatus_27(7)>
  # DEBUG locStatus => locStatus_6
  # DEBUG BEGIN_STMT
  _28 = locStatus_6;
  locCurrentTicks ={v} {CLOBBER};
  return _28;

}


