// File: /workspace/github_c_makefile_star2_O0/weaslepalace[P]FreeRTOS_Posix_Sim/FreeRTOS_Kernel/croutine.c
// Function: prvCheckDelayedList
static void prvCheckDelayedList( void )
{
corCRCB *pxCRCB;

	xPassedTicks = xTaskGetTickCount() - xLastTickCount;
	while( xPassedTicks )
	{
		xCoRoutineTickCount++;
		xPassedTicks--;

		/* If the tick count has overflowed we need to swap the ready lists. */
		if( xCoRoutineTickCount == 0 )
		{
			xList * pxTemp;

			/* Tick count has overflowed so we need to swap the delay lists.  If there are
			any items in pxDelayedCoRoutineList here then there is an error! */
			pxTemp = pxDelayedCoRoutineList;
			pxDelayedCoRoutineList = pxOverflowDelayedCoRoutineList;
			pxOverflowDelayedCoRoutineList = pxTemp;
		}

		/* See if this tick has made a timeout expire. */
		while( ( pxCRCB = ( corCRCB * ) listGET_OWNER_OF_HEAD_ENTRY( pxDelayedCoRoutineList ) ) != NULL )
		{	
			if( xCoRoutineTickCount < listGET_LIST_ITEM_VALUE( &( pxCRCB->xGenericListItem ) ) )				
			{			
				/* Timeout not yet expired. */																			
				break;																				
			}																						

			portDISABLE_INTERRUPTS();
			{
				/* The event could have occurred just before this critical
				section.  If this is the case then the generic list item will
				have been moved to the pending ready list and the following
				line is still valid.  Also the pvContainer parameter will have
				been set to NULL so the following lines are also valid. */
				vListRemove( &( pxCRCB->xGenericListItem ) );											

				/* Is the co-routine waiting on an event also? */												
				if( pxCRCB->xEventListItem.pvContainer )													
				{															
					vListRemove( &( pxCRCB->xEventListItem ) );											
				}
			}
			portENABLE_INTERRUPTS();

			prvAddCoRoutineToReadyQueue( pxCRCB );													
		}																									
	}

	xLastTickCount = xCoRoutineTickCount;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
callq 0x4310
movl %eax, %ecx
movq 0x92ba(%rip), %rax      # 0xded0
subl (%rax), %ecx
movq 0x9371(%rip), %rax      # 0xdf90
movl %ecx, (%rax)
movq 0x9368(%rip), %rax      # 0xdf90
cmpl $0x0, (%rax)
je 0x4d71
movq 0x9368(%rip), %rax      # 0xdfa0
movl (%rax), %ecx
addl $0x1, %ecx
movq 0x935c(%rip), %rax      # 0xdfa0
movl %ecx, (%rax)
movq 0x9343(%rip), %rax      # 0xdf90
movl (%rax), %ecx
addl $-0x1, %ecx
movq 0x9337(%rip), %rax      # 0xdf90
movl %ecx, (%rax)
movq 0x933e(%rip), %rax      # 0xdfa0
cmpl $0x0, (%rax)
jne 0x4c97
movq 0x935a(%rip), %rax      # 0xdfc8
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq 0x920c(%rip), %rax      # 0xde88
movq (%rax), %rcx
movq 0x9342(%rip), %rax      # 0xdfc8
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq 0x91f4(%rip), %rax      # 0xde88
movq %rcx, (%rax)
jmp 0x4c99
movq 0x9328(%rip), %rax      # 0xdfc8
movq (%rax), %rax
movq (%rax), %rax
cmpq $0x0, %rax
je 0x4cc4
movq 0x9315(%rip), %rax      # 0xdfc8
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x4ccc
xorl %eax, %eax
movq %rax, -0x18(%rbp)
jmp 0x4ccc
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0x4d6c
movq 0x92bb(%rip), %rax      # 0xdfa0
movl (%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x4cf2
jmp 0x4d6c
callq 0x4320
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x4040
movq -0x8(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x4d1c
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
callq 0x4040
callq 0x43e0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x9248(%rip), %rcx      # 0xdf78
cmpq (%rcx), %rax
jbe 0x4d47
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rcx
movq 0x9234(%rip), %rax      # 0xdf78
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x914e(%rip), %rdi      # 0xdea0
imulq $0x28, 0x58(%rax), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
callq 0x4760
jmp 0x4c99
jmp 0x4c21
movq 0x9228(%rip), %rax      # 0xdfa0
movl (%rax), %ecx
movq 0x914f(%rip), %rax      # 0xded0
movl %ecx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)