// File: /workspace/github_c_makefile_star2_O0/weaslepalace[P]FreeRTOS_Posix_Sim/FreeRTOS_Kernel/tasks.c
// Function: prvGenerateRunTimeStatsForTasksInList
static void prvGenerateRunTimeStatsForTasksInList( const signed char *pcWriteBuffer, xList *pxList, unsigned long ulTotalRunTime )
	{
	volatile tskTCB *pxNextTCB, *pxFirstTCB;
	unsigned long ulStatsAsPercentage;

		/* Write the run time stats of all the TCB's in pxList into the buffer. */
		listGET_OWNER_OF_NEXT_ENTRY( pxFirstTCB, pxList );
		do
		{
			/* Get next TCB in from the list. */
			listGET_OWNER_OF_NEXT_ENTRY( pxNextTCB, pxList );

			/* Divide by zero check. */
			if( ulTotalRunTime > 0UL )
			{
				/* Has the task run at all? */
				if( pxNextTCB->ulRunTimeCounter == 0 )
				{
					/* The task has used no CPU time at all. */
					sprintf( pcStatsString, ( char * ) "%s\t\t0\t\t0%%\r\n", pxNextTCB->pcTaskName );
				}
				else
				{
					/* What percentage of the total run time as the task used?
					This will always be rounded down to the nearest integer. */
					ulStatsAsPercentage = ( 100UL * pxNextTCB->ulRunTimeCounter ) / ulTotalRunTime;

					if( ulStatsAsPercentage > 0UL )
					{
						sprintf( pcStatsString, ( char * ) "%s\t\t%u\t\t%u%%\r\n", pxNextTCB->pcTaskName, ( unsigned int ) pxNextTCB->ulRunTimeCounter, ( unsigned int ) ulStatsAsPercentage );
					}
					else
					{
						/* If the percentage is zero here then the task has
						consumed less than 1% of the total run time. */
						sprintf( pcStatsString, ( char * ) "%s\t\t%u\t\t<1%%\r\n", pxNextTCB->pcTaskName, ( unsigned int ) pxNextTCB->ulRunTimeCounter );
					}
				}

				strcat( ( char * ) pcWriteBuffer, ( char * ) pcStatsString );
			}

		} while( pxNextTCB != pxFirstTCB );
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x38(%rbp), %rcx
addq $0x10, %rcx
cmpq %rcx, %rax
jne 0x7619
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x40(%rbp), %rcx
addq $0x10, %rcx
cmpq %rcx, %rax
jne 0x766e
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jbe 0x774d
movq -0x20(%rbp), %rax
movq 0x90(%rax), %rax
cmpq $0x0, %rax
jne 0x76bc
movq -0x20(%rbp), %rdx
addq $0x68, %rdx
movq 0x67ef(%rip), %rdi      # 0xde98
leaq 0x3967(%rip), %rsi      # 0xb017
movb $0x0, %al
callq 0x46b0
jmp 0x773d
movq -0x20(%rbp), %rax
movq 0x90(%rax), %rax
imulq $0x64, %rax, %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x18(%rbp)
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jbe 0x7711
movq -0x20(%rbp), %rdx
addq $0x68, %rdx
movq -0x20(%rbp), %rax
movq 0x90(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %eax, %r8d
movq 0x6797(%rip), %rdi      # 0xde98
leaq 0x391c(%rip), %rsi      # 0xb024
movb $0x0, %al
callq 0x46b0
jmp 0x773b
movq -0x20(%rbp), %rdx
addq $0x68, %rdx
movq -0x20(%rbp), %rax
movq 0x90(%rax), %rax
movl %eax, %ecx
movq 0x676b(%rip), %rdi      # 0xde98
leaq 0x38ff(%rip), %rsi      # 0xb033
movb $0x0, %al
callq 0x46b0
jmp 0x773d
movq -0x8(%rbp), %rdi
movq 0x6750(%rip), %rsi      # 0xde98
callq 0x4680
jmp 0x774f
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0x7629
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)