// File: /workspace/github_c_makefile_star2_O0/weaslepalace[P]FreeRTOS_Posix_Sim/FreeRTOS_Kernel/tasks.c
// Function: vTaskGetRunTimeStats
void vTaskGetRunTimeStats( signed char *pcWriteBuffer )
	{
	unsigned portBASE_TYPE uxQueue;
	unsigned long ulTotalRunTime = portGET_RUN_TIME_COUNTER_VALUE();

		/* This is a VERY costly function that should be used for debug only.
		It leaves interrupts disabled for a LONG time. */

		vTaskSuspendAll();
		{
			/* Run through all the lists that could potentially contain a TCB,
			generating a table of run timer percentages in the provided
			buffer. */

			pcWriteBuffer[ 0 ] = ( signed char ) 0x00;
			strcat( ( char * ) pcWriteBuffer, ( const char * ) "\r\n" );

			uxQueue = uxTopUsedPriority + 1;

			do
			{
				uxQueue--;

				if( !listLIST_IS_EMPTY( &( pxReadyTasksLists[ uxQueue ] ) ) )
				{
					prvGenerateRunTimeStatsForTasksInList( pcWriteBuffer, ( xList * ) &( pxReadyTasksLists[ uxQueue ] ), ulTotalRunTime );
				}
			}while( uxQueue > ( unsigned short ) tskIDLE_PRIORITY );

			if( !listLIST_IS_EMPTY( pxDelayedTaskList ) )
			{
				prvGenerateRunTimeStatsForTasksInList( pcWriteBuffer, ( xList * ) pxDelayedTaskList, ulTotalRunTime );
			}

			if( !listLIST_IS_EMPTY( pxOverflowDelayedTaskList ) )
			{
				prvGenerateRunTimeStatsForTasksInList( pcWriteBuffer, ( xList * ) pxOverflowDelayedTaskList, ulTotalRunTime );
			}

			#if ( INCLUDE_vTaskDelete == 1 )
			{
				if( !listLIST_IS_EMPTY( &xTasksWaitingTermination ) )
				{
					prvGenerateRunTimeStatsForTasksInList( pcWriteBuffer, ( xList * ) &xTasksWaitingTermination, ulTotalRunTime );
				}
			}
			#endif

			#if ( INCLUDE_vTaskSuspend == 1 )
			{
				if( !listLIST_IS_EMPTY( &xSuspendedTaskList ) )
				{
					prvGenerateRunTimeStatsForTasksInList( pcWriteBuffer, ( xList * ) &xSuspendedTaskList, ulTotalRunTime );
				}
			}
			#endif
		}
		xTaskResumeAll();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
callq 0x4490
movq %rax, -0x18(%rbp)
callq 0x4650
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rdi
leaq 0x3b75(%rip), %rsi      # 0xb021
callq 0x4680
movq 0x6b00(%rip), %rax      # 0xdfb8
movq (%rax), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
movq 0x6a3a(%rip), %rax      # 0xdf10
imulq $0x28, -0x10(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq $0x0, %rax
je 0x7503
movq -0x8(%rbp), %rdi
movq 0x6a1e(%rip), %rsi      # 0xdf10
imulq $0x28, -0x10(%rbp), %rax
addq %rax, %rsi
movq -0x18(%rbp), %rdx
callq 0x4580
jmp 0x7505
cmpq $0x0, -0x10(%rbp)
ja 0x74c3
movq 0x6aad(%rip), %rax      # 0xdfc0
movq (%rax), %rax
movq (%rax), %rax
cmpq $0x0, %rax
je 0x7536
movq -0x8(%rbp), %rdi
movq 0x6a96(%rip), %rax      # 0xdfc0
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x4580
movq 0x6a23(%rip), %rax      # 0xdf60
movq (%rax), %rax
movq (%rax), %rax
cmpq $0x0, %rax
je 0x7560
movq -0x8(%rbp), %rdi
movq 0x6a0c(%rip), %rax      # 0xdf60
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x4580
movq 0x6a21(%rip), %rax      # 0xdf88
movq (%rax), %rax
cmpq $0x0, %rax
je 0x7584
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq 0x6a09(%rip), %rsi      # 0xdf88
callq 0x4580
movq 0x697d(%rip), %rax      # 0xdf08
movq (%rax), %rax
cmpq $0x0, %rax
je 0x75a8
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq 0x6965(%rip), %rsi      # 0xdf08
callq 0x4580
callq 0x4080
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)