	.file	"extr_tasks.c_prvAddNewTaskToReadyList.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	prvAddNewTaskToReadyList, @function
prvAddNewTaskToReadyList:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	DWORD PTR tskNO_AFFINITY[rip], edx
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	edi, 1
	je	.L2
	xor	edi, edi
	cmp	DWORD PTR portNUM_PROCESSORS[rip], edx
	setg	dil
.L2:
	call	configASSERT@PLT
	lea	rdi, xTaskQueueMutex[rip]
	call	taskENTER_CRITICAL@PLT
	mov	rax, QWORD PTR uxCurrentNumberOfTasks[rip]
	add	rax, 1
	cmp	DWORD PTR tskNO_AFFINITY[rip], ebp
	mov	QWORD PTR uxCurrentNumberOfTasks[rip], rax
	je	.L3
	mov	rdx, QWORD PTR pxCurrentTCB[rip]
	movsx	r12, ebp
	sal	r12, 3
	add	rdx, r12
	mov	rcx, QWORD PTR [rdx]
.L4:
	test	rcx, rcx
	je	.L28
	mov	rax, QWORD PTR pdFALSE[rip]
	cmp	QWORD PTR xSchedulerRunning[rip], rax
	jne	.L14
	mov	rax, QWORD PTR [rbx]
	cmp	QWORD PTR [rcx], rax
	jg	.L13
.L20:
	mov	QWORD PTR [rdx], rbx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdx, QWORD PTR pxCurrentTCB[rip]
	cmp	DWORD PTR portNUM_PROCESSORS[rip], 1
	mov	rcx, QWORD PTR [rdx]
	je	.L22
	test	rcx, rcx
	je	.L23
	mov	rax, QWORD PTR 8[rdx]
	test	rax, rax
	je	.L33
	mov	rsi, QWORD PTR [rcx]
	mov	rcx, QWORD PTR [rbx]
	mov	rdi, QWORD PTR [rax]
	cmp	rsi, rcx
	jge	.L7
	cmp	rsi, rdi
	jge	.L9
	mov	rax, QWORD PTR xSchedulerRunning[rip]
	xor	ebp, ebp
	xor	r12d, r12d
	cmp	QWORD PTR pdFALSE[rip], rax
	je	.L20
	.p2align 4,,10
	.p2align 3
.L14:
	xor	eax, eax
.L31:
	call	mtCOVERAGE_TEST_MARKER@PLT
.L13:
	mov	rdi, rbx
	add	QWORD PTR uxTaskNumber[rip], 1
	call	traceTASK_CREATE@PLT
	mov	rdi, rbx
	call	prvAddTaskToReadyList@PLT
	mov	rdi, rbx
	call	portSETUP_TCB@PLT
	lea	rdi, xTaskQueueMutex[rip]
	call	taskEXIT_CRITICAL@PLT
	mov	rax, QWORD PTR pdFALSE[rip]
	cmp	QWORD PTR xSchedulerRunning[rip], rax
	je	.L15
	lea	rdi, xTaskQueueMutex[rip]
	call	taskENTER_CRITICAL@PLT
	mov	rax, QWORD PTR pxCurrentTCB[rip]
	mov	rax, QWORD PTR [rax+r12]
	test	rax, rax
	je	.L16
	mov	rsi, QWORD PTR [rbx]
	cmp	QWORD PTR [rax], rsi
	jge	.L17
.L16:
	xor	eax, eax
	call	xPortGetCoreID@PLT
	cmp	eax, ebp
	je	.L34
	mov	rsi, QWORD PTR [rbx]
	mov	edi, ebp
	call	taskYIELD_OTHER_CORE@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	lea	rdi, xTaskQueueMutex[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	taskEXIT_CRITICAL@PLT
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	mtCOVERAGE_TEST_MARKER@PLT
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	add	rdx, 8
	mov	r12d, 8
	mov	ebp, 1
	.p2align 4,,10
	.p2align 3
.L28:
	mov	rax, QWORD PTR uxCurrentNumberOfTasks[rip]
.L5:
	cmp	rax, 1
	mov	QWORD PTR [rdx], rbx
	mov	eax, 0
	jne	.L31
	call	prvInitialiseTaskLists@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L23:
	xor	ebp, ebp
	xor	r12d, r12d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L7:
	cmp	rcx, rdi
	jle	.L10
.L9:
	mov	rcx, rax
	add	rdx, 8
	mov	r12d, 8
	mov	ebp, 1
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L17:
	xor	eax, eax
	call	mtCOVERAGE_TEST_MARKER@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	lea	rdi, xTaskQueueMutex[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	taskEXIT_CRITICAL@PLT
	.p2align 4,,10
	.p2align 3
.L34:
	.cfi_restore_state
	xor	eax, eax
	call	taskYIELD_IF_USING_PREEMPTION@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	lea	rdi, xTaskQueueMutex[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	taskEXIT_CRITICAL@PLT
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	xor	r12d, r12d
	xor	ebp, ebp
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	xor	eax, eax
	call	xPortGetCoreID@PLT
	mov	rdx, QWORD PTR pxCurrentTCB[rip]
	movsx	r12, eax
	mov	rbp, r12
	sal	r12, 3
	add	rdx, r12
	mov	rcx, QWORD PTR [rdx]
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	prvAddNewTaskToReadyList, .-prvAddNewTaskToReadyList
	.comm	xTaskQueueMutex,4,4
	.comm	xSchedulerRunning,8,8
	.comm	uxTaskNumber,8,8
	.comm	uxCurrentNumberOfTasks,8,8
	.comm	tskNO_AFFINITY,4,4
	.comm	pxCurrentTCB,8,8
	.comm	portNUM_PROCESSORS,4,4
	.comm	pdFALSE,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_tasks.c_prvAddNewTaskToReadyList.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	prvAddNewTaskToReadyList, %function
prvAddNewTaskToReadyList:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r7, .L33
	mov	r5, r0
	ldr	r3, [r7]
	mov	r4, r2
	cmp	r3, r2
	moveq	r0, #1
	beq	.L2
	ldr	r3, .L33+4
	ldr	r0, [r3]
	cmp	r0, r2
	movle	r0, #0
	movgt	r0, #1
.L2:
	ldr	r6, .L33+8
	bl	configASSERT
	ldr	r0, .L33+12
	bl	taskENTER_CRITICAL
	ldr	r3, [r6]
	ldr	r2, [r7]
	add	r3, r3, #1
	cmp	r2, r4
	str	r3, [r6]
	beq	.L3
	ldr	r7, .L33+16
	lsl	r8, r4, #2
	ldr	r3, [r7]
	ldr	r2, [r3, r4, lsl #2]
	add	r1, r3, r4, lsl #2
.L4:
	cmp	r2, #0
	beq	.L28
	ldr	r6, .L33+20
	ldr	r9, .L33+24
	ldr	r0, [r6]
	ldr	r3, [r9]
	cmp	r0, r3
	bne	.L14
	ldr	r2, [r2]
	ldr	r3, [r5]
	cmp	r2, r3
	bgt	.L13
.L20:
	str	r5, [r1]
	b	.L13
.L3:
	ldr	r2, .L33+4
	ldr	r7, .L33+16
	ldr	r2, [r2]
	ldr	r1, [r7]
	cmp	r2, #1
	ldr	r2, [r1]
	beq	.L22
	cmp	r2, #0
	beq	.L23
	ldr	r3, [r1, #4]
	cmp	r3, #0
	moveq	r8, #4
	moveq	r4, #1
	addeq	r1, r1, #4
	beq	.L28
	ldr	r0, [r2]
	ldr	r2, [r5]
	ldr	ip, [r3]
	cmp	r0, r2
	bge	.L7
	cmp	r0, ip
	bge	.L9
	mov	r4, #0
	ldr	r9, .L33+24
	ldr	r6, .L33+20
	ldr	r2, [r9]
	ldr	r3, [r6]
	mov	r8, r4
	cmp	r2, r3
	beq	.L20
.L14:
	bl	mtCOVERAGE_TEST_MARKER
.L13:
	ldr	r2, .L33+28
	mov	r0, r5
	ldr	r3, [r2]
	add	r3, r3, #1
	str	r3, [r2]
	bl	traceTASK_CREATE
	mov	r0, r5
	bl	prvAddTaskToReadyList
	mov	r0, r5
	bl	portSETUP_TCB
	ldr	r0, .L33+12
	bl	taskEXIT_CRITICAL
	ldr	r2, [r6]
	ldr	r3, [r9]
	cmp	r2, r3
	beq	.L15
	ldr	r0, .L33+12
	bl	taskENTER_CRITICAL
	ldr	r3, [r7]
	ldr	r3, [r3, r8]
	cmp	r3, #0
	beq	.L16
	ldr	r2, [r3]
	ldr	r3, [r5]
	cmp	r2, r3
	bge	.L17
.L16:
	bl	xPortGetCoreID
	cmp	r0, r4
	beq	.L31
	mov	r0, r4
	ldr	r1, [r5]
	bl	taskYIELD_OTHER_CORE
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r0, .L33+12
	b	taskEXIT_CRITICAL
.L15:
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	mtCOVERAGE_TEST_MARKER
.L28:
	ldr	r3, [r6]
.L5:
	cmp	r3, #1
	str	r5, [r1]
	beq	.L32
	bl	mtCOVERAGE_TEST_MARKER
	ldr	r6, .L33+20
	ldr	r9, .L33+24
	b	.L13
.L32:
	bl	prvInitialiseTaskLists
	ldr	r6, .L33+20
	ldr	r9, .L33+24
	b	.L13
.L23:
	mov	r4, r2
	mov	r8, r2
	b	.L5
.L7:
	cmp	r2, ip
	ble	.L10
.L9:
	mov	r2, r3
	mov	r8, #4
	mov	r4, #1
	add	r1, r1, #4
	b	.L4
.L17:
	bl	mtCOVERAGE_TEST_MARKER
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r0, .L33+12
	b	taskEXIT_CRITICAL
.L31:
	bl	taskYIELD_IF_USING_PREEMPTION
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r0, .L33+12
	b	taskEXIT_CRITICAL
.L22:
	mov	r4, #0
	mov	r8, r4
	b	.L4
.L10:
	bl	xPortGetCoreID
	ldr	r3, [r7]
	mov	r4, r0
	ldr	r2, [r3, r0, lsl #2]
	lsl	r8, r0, #2
	add	r1, r3, r0, lsl #2
	b	.L4
.L34:
	.align	2
.L33:
	.word	tskNO_AFFINITY
	.word	portNUM_PROCESSORS
	.word	uxCurrentNumberOfTasks
	.word	xTaskQueueMutex
	.word	pxCurrentTCB
	.word	xSchedulerRunning
	.word	pdFALSE
	.word	uxTaskNumber
	.size	prvAddNewTaskToReadyList, .-prvAddNewTaskToReadyList
	.comm	xTaskQueueMutex,4,4
	.comm	xSchedulerRunning,4,4
	.comm	uxTaskNumber,4,4
	.comm	uxCurrentNumberOfTasks,4,4
	.comm	tskNO_AFFINITY,4,4
	.comm	pxCurrentTCB,4,4
	.comm	portNUM_PROCESSORS,4,4
	.comm	pdFALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
