
Marking local functions: prvInsertBlockIntoFreeList prvHeapInit vPortRaiseBASEPRI


Marking externally visible functions: vPortGetHeapStats vPortInitialiseBlocks xPortGetMinimumEverFreeHeapSize xPortGetFreeHeapSize vPortFree pvPortMalloc


Marking externally visible variables:


Reclaiming functions:
Reclaiming variables:
Clearing address taken flags:
Symbol table:

vPortExitCritical/24 (vPortExitCritical) @06a8ee00
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: vPortGetHeapStats/20 
  Calls: 
vPortEnterCritical/23 (vPortEnterCritical) @06a8ec40
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: vPortGetHeapStats/20 
  Calls: 
xTaskResumeAll/22 (xTaskResumeAll) @06a8e2a0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: vPortGetHeapStats/20 vPortFree/14 pvPortMalloc/13 
  Calls: 
vTaskSuspendAll/21 (vTaskSuspendAll) @06a8e0e0
  Type: function
  Visibility: external public
  References: 
  Referring: 
  Availability: not_available
  Function flags: optimize_size
  Called by: vPortGetHeapStats/20 vPortFree/14 pvPortMalloc/13 
  Calls: 
vPortGetHeapStats/20 (vPortGetHeapStats) @06a800e0
  Type: function definition analyzed
  Visibility: externally_visible public
  References: xStart/6 (read)pxEnd/7 (read)xFreeBytesRemaining/8 (read)xNumberOfSuccessfulAllocations/10 (read)xNumberOfSuccessfulFrees/11 (read)xMinimumEverFreeBytesRemaining/9 (read)
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: vPortExitCritical/24 vPortEnterCritical/23 xTaskResumeAll/22 vTaskSuspendAll/21 
prvInsertBlockIntoFreeList/19 (prvInsertBlockIntoFreeList) @06a80d20
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: xStart/6 (addr)pxEnd/7 (read)pxEnd/7 (read)
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: vPortFree/14 pvPortMalloc/13 
  Calls: 
prvHeapInit/18 (prvHeapInit) @06a80a80
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: ucHeap/4 (addr)ucHeap/4 (addr)xStart/6 (write)xStart/6 (write)pxEnd/7 (write)pxEnd/7 (read)pxEnd/7 (read)pxEnd/7 (read)xMinimumEverFreeBytesRemaining/9 (write)xFreeBytesRemaining/8 (write)xBlockAllocatedBit/12 (write)
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: pvPortMalloc/13 
  Calls: 
vPortInitialiseBlocks/17 (vPortInitialiseBlocks) @06a807e0
  Type: function definition analyzed
  Visibility: externally_visible public
  References: 
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: 
xPortGetMinimumEverFreeHeapSize/16 (xPortGetMinimumEverFreeHeapSize) @06a80540
  Type: function definition analyzed
  Visibility: externally_visible public
  References: xMinimumEverFreeBytesRemaining/9 (read)
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: 
xPortGetFreeHeapSize/15 (xPortGetFreeHeapSize) @06a802a0
  Type: function definition analyzed
  Visibility: externally_visible public
  References: xFreeBytesRemaining/8 (read)
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: 
vPortFree/14 (vPortFree) @06a80000
  Type: function definition analyzed
  Visibility: externally_visible public
  References: xBlockAllocatedBit/12 (read)xBlockAllocatedBit/12 (read)xBlockAllocatedBit/12 (read)xFreeBytesRemaining/8 (read)xFreeBytesRemaining/8 (write)xNumberOfSuccessfulFrees/11 (read)xNumberOfSuccessfulFrees/11 (write)
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: xTaskResumeAll/22 prvInsertBlockIntoFreeList/19 vTaskSuspendAll/21 vPortRaiseBASEPRI/1 vPortRaiseBASEPRI/1 
pvPortMalloc/13 (pvPortMalloc) @06a78ee0
  Type: function definition analyzed
  Visibility: externally_visible public
  References: pxEnd/7 (read)xBlockAllocatedBit/12 (read)xFreeBytesRemaining/8 (read)xStart/6 (addr)xStart/6 (read)pxEnd/7 (read)xFreeBytesRemaining/8 (read)xFreeBytesRemaining/8 (write)xFreeBytesRemaining/8 (read)xMinimumEverFreeBytesRemaining/9 (read)xFreeBytesRemaining/8 (read)xMinimumEverFreeBytesRemaining/9 (write)xBlockAllocatedBit/12 (read)xNumberOfSuccessfulAllocations/10 (read)xNumberOfSuccessfulAllocations/10 (write)
  Referring: 
  Availability: available
  Function flags: body optimize_size
  Called by: 
  Calls: vPortRaiseBASEPRI/1 xTaskResumeAll/22 prvInsertBlockIntoFreeList/19 vPortRaiseBASEPRI/1 vPortRaiseBASEPRI/1 prvHeapInit/18 vTaskSuspendAll/21 
xBlockAllocatedBit/12 (xBlockAllocatedBit) @06acd678
  Type: variable definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: pvPortMalloc/13 (read)pvPortMalloc/13 (read)prvHeapInit/18 (write)vPortFree/14 (read)vPortFree/14 (read)vPortFree/14 (read)
  Availability: available
  Varpool flags: initialized
xNumberOfSuccessfulFrees/11 (xNumberOfSuccessfulFrees) @06acd5e8
  Type: variable definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: vPortFree/14 (read)vPortFree/14 (write)vPortGetHeapStats/20 (read)
  Availability: available
  Varpool flags: initialized
xNumberOfSuccessfulAllocations/10 (xNumberOfSuccessfulAllocations) @06acd5a0
  Type: variable definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: pvPortMalloc/13 (read)pvPortMalloc/13 (write)vPortGetHeapStats/20 (read)
  Availability: available
  Varpool flags: initialized
xMinimumEverFreeBytesRemaining/9 (xMinimumEverFreeBytesRemaining) @06acd558
  Type: variable definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: pvPortMalloc/13 (read)pvPortMalloc/13 (write)prvHeapInit/18 (write)xPortGetMinimumEverFreeHeapSize/16 (read)vPortGetHeapStats/20 (read)
  Availability: available
  Varpool flags: initialized
xFreeBytesRemaining/8 (xFreeBytesRemaining) @06acd510
  Type: variable definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: pvPortMalloc/13 (read)pvPortMalloc/13 (read)pvPortMalloc/13 (write)pvPortMalloc/13 (read)pvPortMalloc/13 (read)prvHeapInit/18 (write)vPortFree/14 (read)vPortFree/14 (write)xPortGetFreeHeapSize/15 (read)vPortGetHeapStats/20 (read)
  Availability: available
  Varpool flags: initialized
pxEnd/7 (pxEnd) @06acd480
  Type: variable definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: pvPortMalloc/13 (read)pvPortMalloc/13 (read)prvHeapInit/18 (write)prvHeapInit/18 (read)prvHeapInit/18 (read)prvHeapInit/18 (read)prvInsertBlockIntoFreeList/19 (read)prvInsertBlockIntoFreeList/19 (read)vPortGetHeapStats/20 (read)
  Availability: available
  Varpool flags: initialized
xStart/6 (xStart) @06acd3f0
  Type: variable definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: pvPortMalloc/13 (addr)pvPortMalloc/13 (read)prvHeapInit/18 (write)prvHeapInit/18 (write)prvInsertBlockIntoFreeList/19 (addr)vPortGetHeapStats/20 (read)
  Availability: available
  Varpool flags:
ucHeap/4 (ucHeap) @06acd120
  Type: variable definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: prvHeapInit/18 (addr)prvHeapInit/18 (addr)
  Availability: available
  Varpool flags:
vPortRaiseBASEPRI/1 (vPortRaiseBASEPRI) @06a15d20
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Availability: local
  Function flags: body local optimize_size
  Called by: vPortFree/14 vPortFree/14 pvPortMalloc/13 pvPortMalloc/13 pvPortMalloc/13 
  Calls: 
vPortGetHeapStats (struct HeapStats_t * pxHeapStats)
{
  size_t xMinSize;
  size_t xMaxSize;
  size_t xBlocks;
  struct BlockLink_t * pxBlock;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  xBlocks = 0;
  xMaxSize = 0;
  xMinSize = 4294967295;
  # DEBUG BEGIN_STMT
  vTaskSuspendAll ();
  # DEBUG BEGIN_STMT
  pxBlock = xStart.pxNextFreeBlock;
  # DEBUG BEGIN_STMT
  if (pxBlock != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  xBlocks = xBlocks + 1;
  # DEBUG BEGIN_STMT
  _1 = pxBlock->xBlockSize;
  if (xMaxSize < _1)
    goto <bb 4>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  xMaxSize = pxBlock->xBlockSize;

  <bb 5> :
  # DEBUG BEGIN_STMT
  _2 = pxBlock->xBlockSize;
  if (xMinSize > _2)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  xMinSize = pxBlock->xBlockSize;

  <bb 7> :
  # DEBUG BEGIN_STMT
  pxBlock = pxBlock->pxNextFreeBlock;
  # DEBUG BEGIN_STMT
  pxEnd.26_3 = pxEnd;
  if (pxBlock != pxEnd.26_3)
    goto <bb 3>; [INV]
  else
    goto <bb 8>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  xTaskResumeAll ();
  # DEBUG BEGIN_STMT
  pxHeapStats->xSizeOfLargestFreeBlockInBytes = xMaxSize;
  # DEBUG BEGIN_STMT
  pxHeapStats->xSizeOfSmallestFreeBlockInBytes = xMinSize;
  # DEBUG BEGIN_STMT
  pxHeapStats->xNumberOfFreeBlocks = xBlocks;
  # DEBUG BEGIN_STMT
  vPortEnterCritical ();
  # DEBUG BEGIN_STMT
  xFreeBytesRemaining.27_4 = xFreeBytesRemaining;
  pxHeapStats->xAvailableHeapSpaceInBytes = xFreeBytesRemaining.27_4;
  # DEBUG BEGIN_STMT
  xNumberOfSuccessfulAllocations.28_5 = xNumberOfSuccessfulAllocations;
  pxHeapStats->xNumberOfSuccessfulAllocations = xNumberOfSuccessfulAllocations.28_5;
  # DEBUG BEGIN_STMT
  xNumberOfSuccessfulFrees.29_6 = xNumberOfSuccessfulFrees;
  pxHeapStats->xNumberOfSuccessfulFrees = xNumberOfSuccessfulFrees.29_6;
  # DEBUG BEGIN_STMT
  xMinimumEverFreeBytesRemaining.30_7 = xMinimumEverFreeBytesRemaining;
  pxHeapStats->xMinimumEverFreeBytesRemaining = xMinimumEverFreeBytesRemaining.30_7;
  # DEBUG BEGIN_STMT
  vPortExitCritical ();
  return;

}


prvInsertBlockIntoFreeList (struct BlockLink_t * pxBlockToInsert)
{
  uint8_t * puc;
  struct BlockLink_t * pxIterator;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pxIterator = &xStart;
  goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pxIterator = pxIterator->pxNextFreeBlock;

  <bb 4> :
  # DEBUG BEGIN_STMT
  _1 = pxIterator->pxNextFreeBlock;
  if (pxBlockToInsert > _1)
    goto <bb 3>; [INV]
  else
    goto <bb 5>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  puc = pxIterator;
  # DEBUG BEGIN_STMT
  _2 = pxIterator->xBlockSize;
  _3 = puc + _2;
  if (pxBlockToInsert == _3)
    goto <bb 6>; [INV]
  else
    goto <bb 7>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  _4 = pxIterator->xBlockSize;
  _5 = pxBlockToInsert->xBlockSize;
  _6 = _4 + _5;
  pxIterator->xBlockSize = _6;
  # DEBUG BEGIN_STMT
  pxBlockToInsert = pxIterator;

  <bb 7> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  puc = pxBlockToInsert;
  # DEBUG BEGIN_STMT
  _7 = pxBlockToInsert->xBlockSize;
  _8 = puc + _7;
  _9 = pxIterator->pxNextFreeBlock;
  if (_8 == _9)
    goto <bb 8>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _10 = pxIterator->pxNextFreeBlock;
  pxEnd.19_11 = pxEnd;
  if (_10 != pxEnd.19_11)
    goto <bb 9>; [INV]
  else
    goto <bb 10>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  _12 = pxBlockToInsert->xBlockSize;
  _13 = pxIterator->pxNextFreeBlock;
  _14 = _13->xBlockSize;
  _15 = _12 + _14;
  pxBlockToInsert->xBlockSize = _15;
  # DEBUG BEGIN_STMT
  _16 = pxIterator->pxNextFreeBlock;
  _17 = _16->pxNextFreeBlock;
  pxBlockToInsert->pxNextFreeBlock = _17;
  goto <bb 12>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  pxEnd.20_18 = pxEnd;
  pxBlockToInsert->pxNextFreeBlock = pxEnd.20_18;
  goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _19 = pxIterator->pxNextFreeBlock;
  pxBlockToInsert->pxNextFreeBlock = _19;

  <bb 12> :
  # DEBUG BEGIN_STMT
  if (pxIterator != pxBlockToInsert)
    goto <bb 13>; [INV]
  else
    goto <bb 14>; [INV]

  <bb 13> :
  # DEBUG BEGIN_STMT
  pxIterator->pxNextFreeBlock = pxBlockToInsert;

  <bb 14> :
  # DEBUG BEGIN_STMT
  return;

}


prvHeapInit ()
{
  size_t xTotalHeapSize;
  size_t uxAddress;
  uint8_t * pucAlignedHeap;
  struct BlockLink_t * pxFirstFreeBlock;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  xTotalHeapSize = 8192;
  # DEBUG BEGIN_STMT
  uxAddress = (size_t) &ucHeap;
  # DEBUG BEGIN_STMT
  _1 = uxAddress & 7;
  if (_1 != 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  uxAddress = uxAddress + 7;
  # DEBUG BEGIN_STMT
  uxAddress = uxAddress & 4294967288;
  # DEBUG BEGIN_STMT
  _2 = xTotalHeapSize - uxAddress;
  ucHeap.12_3 = (unsigned int) &ucHeap;
  xTotalHeapSize = _2 + ucHeap.12_3;

  <bb 4> :
  # DEBUG BEGIN_STMT
  pucAlignedHeap = (uint8_t *) uxAddress;
  # DEBUG BEGIN_STMT
  xStart.pxNextFreeBlock = pucAlignedHeap;
  # DEBUG BEGIN_STMT
  xStart.xBlockSize = 0;
  # DEBUG BEGIN_STMT
  pucAlignedHeap.13_4 = (unsigned int) pucAlignedHeap;
  uxAddress = xTotalHeapSize + pucAlignedHeap.13_4;
  # DEBUG BEGIN_STMT
  uxAddress = uxAddress + 4294967288;
  # DEBUG BEGIN_STMT
  uxAddress = uxAddress & 4294967288;
  # DEBUG BEGIN_STMT
  uxAddress.14_5 = (struct BlockLink_t *) uxAddress;
  pxEnd = uxAddress.14_5;
  # DEBUG BEGIN_STMT
  pxEnd.15_6 = pxEnd;
  pxEnd.15_6->xBlockSize = 0;
  # DEBUG BEGIN_STMT
  pxEnd.16_7 = pxEnd;
  pxEnd.16_7->pxNextFreeBlock = 0B;
  # DEBUG BEGIN_STMT
  pxFirstFreeBlock = pucAlignedHeap;
  # DEBUG BEGIN_STMT
  pxFirstFreeBlock.17_8 = (unsigned int) pxFirstFreeBlock;
  _9 = uxAddress - pxFirstFreeBlock.17_8;
  pxFirstFreeBlock->xBlockSize = _9;
  # DEBUG BEGIN_STMT
  pxEnd.18_10 = pxEnd;
  pxFirstFreeBlock->pxNextFreeBlock = pxEnd.18_10;
  # DEBUG BEGIN_STMT
  _11 = pxFirstFreeBlock->xBlockSize;
  xMinimumEverFreeBytesRemaining = _11;
  # DEBUG BEGIN_STMT
  _12 = pxFirstFreeBlock->xBlockSize;
  xFreeBytesRemaining = _12;
  # DEBUG BEGIN_STMT
  xBlockAllocatedBit = 2147483648;
  return;

}


vPortInitialiseBlocks ()
{
  <bb 2> :
  # DEBUG BEGIN_STMT
  return;

}


xPortGetMinimumEverFreeHeapSize ()
{
  size_t D.6351;

  <bb 2> :
  # DEBUG BEGIN_STMT
  D.6351 = xMinimumEverFreeBytesRemaining;
  return D.6351;

}


xPortGetFreeHeapSize ()
{
  size_t D.6349;

  <bb 2> :
  # DEBUG BEGIN_STMT
  D.6349 = xFreeBytesRemaining;
  return D.6349;

}


vPortFree (void * pv)
{
  struct BlockLink_t * pxLink;
  uint8_t * puc;

  <bb 2> :
  # DEBUG BEGIN_STMT
  puc = pv;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  if (pv != 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  puc = puc + 4294967288;
  # DEBUG BEGIN_STMT
  pxLink = puc;
  # DEBUG BEGIN_STMT
  _1 = pxLink->xBlockSize;
  xBlockAllocatedBit.21_2 = xBlockAllocatedBit;
  _3 = _1 & xBlockAllocatedBit.21_2;
  if (_3 == 0)
    goto <bb 4>; [INV]
  else
    goto <bb 6>; [INV]

  <bb 4> :
  # DEBUG BEGIN_STMT
  vPortRaiseBASEPRI ();

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

  <bb 6> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _4 = pxLink->pxNextFreeBlock;
  if (_4 != 0B)
    goto <bb 7>; [INV]
  else
    goto <bb 9>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  vPortRaiseBASEPRI ();

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

  <bb 9> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _5 = pxLink->xBlockSize;
  xBlockAllocatedBit.22_6 = xBlockAllocatedBit;
  _7 = _5 & xBlockAllocatedBit.22_6;
  if (_7 != 0)
    goto <bb 10>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 10> :
  # DEBUG BEGIN_STMT
  _8 = pxLink->pxNextFreeBlock;
  if (_8 == 0B)
    goto <bb 11>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 11> :
  # DEBUG BEGIN_STMT
  _9 = pxLink->xBlockSize;
  xBlockAllocatedBit.23_10 = xBlockAllocatedBit;
  _11 = ~xBlockAllocatedBit.23_10;
  _12 = _9 & _11;
  pxLink->xBlockSize = _12;
  # DEBUG BEGIN_STMT
  vTaskSuspendAll ();
  # DEBUG BEGIN_STMT
  _13 = pxLink->xBlockSize;
  xFreeBytesRemaining.24_14 = xFreeBytesRemaining;
  _15 = _13 + xFreeBytesRemaining.24_14;
  xFreeBytesRemaining = _15;
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  prvInsertBlockIntoFreeList (pxLink);
  # DEBUG BEGIN_STMT
  xNumberOfSuccessfulFrees.25_16 = xNumberOfSuccessfulFrees;
  _17 = xNumberOfSuccessfulFrees.25_16 + 1;
  xNumberOfSuccessfulFrees = _17;
  # DEBUG BEGIN_STMT
  xTaskResumeAll ();

  <bb 12> :
  # DEBUG BEGIN_STMT
  return;

}


pvPortMalloc (size_t xWantedSize)
{
  void * pvReturn;
  struct BlockLink_t * pxNewBlockLink;
  struct BlockLink_t * pxPreviousBlock;
  struct BlockLink_t * pxBlock;
  void * D.6321;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  pvReturn = 0B;
  # DEBUG BEGIN_STMT
  vTaskSuspendAll ();
  # DEBUG BEGIN_STMT
  pxEnd.0_1 = pxEnd;
  if (pxEnd.0_1 == 0B)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  # DEBUG BEGIN_STMT
  prvHeapInit ();

  <bb 4> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  xBlockAllocatedBit.1_2 = xBlockAllocatedBit;
  _3 = xWantedSize & xBlockAllocatedBit.1_2;
  if (_3 == 0)
    goto <bb 5>; [INV]
  else
    goto <bb 28>; [INV]

  <bb 5> :
  # DEBUG BEGIN_STMT
  _4 = xWantedSize + 4294967295;
  if (_4 <= 4294967286)
    goto <bb 6>; [INV]
  else
    goto <bb 12>; [INV]

  <bb 6> :
  # DEBUG BEGIN_STMT
  xWantedSize = xWantedSize + 8;
  # DEBUG BEGIN_STMT
  _5 = xWantedSize & 7;
  if (_5 != 0)
    goto <bb 7>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 7> :
  # DEBUG BEGIN_STMT
  _6 = xWantedSize & 4294967288;
  _7 = _6 + 8;
  if (xWantedSize < _7)
    goto <bb 8>; [INV]
  else
    goto <bb 11>; [INV]

  <bb 8> :
  # DEBUG BEGIN_STMT
  _8 = xWantedSize & 4294967288;
  xWantedSize = _8 + 8;
  # DEBUG BEGIN_STMT
  _9 = xWantedSize & 7;
  if (_9 != 0)
    goto <bb 9>; [INV]
  else
    goto <bb 13>; [INV]

  <bb 9> :
  # DEBUG BEGIN_STMT
  vPortRaiseBASEPRI ();

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

  <bb 11> :
  # DEBUG BEGIN_STMT
  xWantedSize = 0;
  goto <bb 13>; [INV]

  <bb 12> :
  # DEBUG BEGIN_STMT
  xWantedSize = 0;

  <bb 13> :
  # DEBUG BEGIN_STMT
  if (xWantedSize != 0)
    goto <bb 14>; [INV]
  else
    goto <bb 28>; [INV]

  <bb 14> :
  xFreeBytesRemaining.2_10 = xFreeBytesRemaining;
  if (xWantedSize <= xFreeBytesRemaining.2_10)
    goto <bb 15>; [INV]
  else
    goto <bb 28>; [INV]

  <bb 15> :
  # DEBUG BEGIN_STMT
  pxPreviousBlock = &xStart;
  # DEBUG BEGIN_STMT
  pxBlock = xStart.pxNextFreeBlock;
  # DEBUG BEGIN_STMT
  goto <bb 17>; [INV]

  <bb 16> :
  # DEBUG BEGIN_STMT
  pxPreviousBlock = pxBlock;
  # DEBUG BEGIN_STMT
  pxBlock = pxBlock->pxNextFreeBlock;

  <bb 17> :
  # DEBUG BEGIN_STMT
  _11 = pxBlock->xBlockSize;
  if (xWantedSize > _11)
    goto <bb 18>; [INV]
  else
    goto <bb 19>; [INV]

  <bb 18> :
  _12 = pxBlock->pxNextFreeBlock;
  if (_12 != 0B)
    goto <bb 16>; [INV]
  else
    goto <bb 19>; [INV]

  <bb 19> :
  # DEBUG BEGIN_STMT
  pxEnd.3_13 = pxEnd;
  if (pxBlock != pxEnd.3_13)
    goto <bb 20>; [INV]
  else
    goto <bb 28>; [INV]

  <bb 20> :
  # DEBUG BEGIN_STMT
  _14 = pxPreviousBlock->pxNextFreeBlock;
  pvReturn = _14 + 8;
  # DEBUG BEGIN_STMT
  _15 = pxBlock->pxNextFreeBlock;
  pxPreviousBlock->pxNextFreeBlock = _15;
  # DEBUG BEGIN_STMT
  _16 = pxBlock->xBlockSize;
  _17 = _16 - xWantedSize;
  if (_17 > 16)
    goto <bb 21>; [INV]
  else
    goto <bb 25>; [INV]

  <bb 21> :
  # DEBUG BEGIN_STMT
  pxNewBlockLink = pxBlock + xWantedSize;
  # DEBUG BEGIN_STMT
  pxNewBlockLink.4_18 = (unsigned int) pxNewBlockLink;
  _19 = pxNewBlockLink.4_18 & 7;
  if (_19 != 0)
    goto <bb 22>; [INV]
  else
    goto <bb 24>; [INV]

  <bb 22> :
  # DEBUG BEGIN_STMT
  vPortRaiseBASEPRI ();

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

  <bb 24> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _20 = pxBlock->xBlockSize;
  _21 = _20 - xWantedSize;
  pxNewBlockLink->xBlockSize = _21;
  # DEBUG BEGIN_STMT
  pxBlock->xBlockSize = xWantedSize;
  # DEBUG BEGIN_STMT
  prvInsertBlockIntoFreeList (pxNewBlockLink);

  <bb 25> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  xFreeBytesRemaining.5_22 = xFreeBytesRemaining;
  _23 = pxBlock->xBlockSize;
  _24 = xFreeBytesRemaining.5_22 - _23;
  xFreeBytesRemaining = _24;
  # DEBUG BEGIN_STMT
  xFreeBytesRemaining.6_25 = xFreeBytesRemaining;
  xMinimumEverFreeBytesRemaining.7_26 = xMinimumEverFreeBytesRemaining;
  if (xFreeBytesRemaining.6_25 < xMinimumEverFreeBytesRemaining.7_26)
    goto <bb 26>; [INV]
  else
    goto <bb 27>; [INV]

  <bb 26> :
  # DEBUG BEGIN_STMT
  xFreeBytesRemaining.8_27 = xFreeBytesRemaining;
  xMinimumEverFreeBytesRemaining = xFreeBytesRemaining.8_27;

  <bb 27> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  _28 = pxBlock->xBlockSize;
  xBlockAllocatedBit.9_29 = xBlockAllocatedBit;
  _30 = _28 | xBlockAllocatedBit.9_29;
  pxBlock->xBlockSize = _30;
  # DEBUG BEGIN_STMT
  pxBlock->pxNextFreeBlock = 0B;
  # DEBUG BEGIN_STMT
  xNumberOfSuccessfulAllocations.10_31 = xNumberOfSuccessfulAllocations;
  _32 = xNumberOfSuccessfulAllocations.10_31 + 1;
  xNumberOfSuccessfulAllocations = _32;

  <bb 28> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  xTaskResumeAll ();
  # DEBUG BEGIN_STMT
  pvReturn.11_33 = (unsigned int) pvReturn;
  _34 = pvReturn.11_33 & 7;
  if (_34 != 0)
    goto <bb 29>; [INV]
  else
    goto <bb 31>; [INV]

  <bb 29> :
  # DEBUG BEGIN_STMT
  vPortRaiseBASEPRI ();

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

  <bb 31> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  D.6321 = pvReturn;
  return D.6321;

}


__attribute__((always_inline))
vPortRaiseBASEPRI ()
{
  uint32_t ulNewBASEPRI;

  <bb 2> :
  # DEBUG BEGIN_STMT
  # DEBUG BEGIN_STMT
  __asm__ __volatile__("	mov %0, %1												
	msr basepri, %0											
	isb														
	dsb														
" : "=r" ulNewBASEPRI : "i" 16 : "memory");
  return;

}


