	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function task_shutdown
_task_shutdown:                         ## @task_shutdown
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_ISC_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	L_.str(%rip), %rdi
	callq	_XTRACE
	movq	%r15, %rdi
	callq	_TASK_SHUTTINGDOWN
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	_isc_msgcat@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ISC_MSGSET_GENERAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ISC_MSG_SHUTTINGDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rcx
	callq	_isc_msgcat_get
	movq	%rax, %rdi
	callq	_XTRACE
	movq	_TASK_F_SHUTTINGDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%r15)
	movq	(%r15), %rax
	movq	_task_state_idle@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movl	8(%r15), %edi
	callq	_EMPTY
	movl	%eax, %edi
	callq	_INSIST
	movq	_task_state_ready@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movq	_ISC_TRUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
LBB0_3:
	movq	_task_state_ready@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	movq	_task_state_running@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_INSIST
	movl	12(%r15), %edi
	callq	_TAIL
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%rax, %rbx
	movq	_ev_link@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_PREV
	movq	%rax, %r12
	movl	12(%r15), %edi
	movl	(%r13), %edx
	movq	%rbx, %rsi
	callq	_DEQUEUE
	movl	8(%r15), %edi
	movl	(%r13), %edx
	movq	%rbx, %rsi
	callq	_ENQUEUE
	movq	%r12, %rbx
	testq	%r12, %r12
	jne	LBB0_5
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ISC_FALSE,4,2                  ## @ISC_FALSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"task_shutdown"

	.comm	_isc_msgcat,4,2                 ## @isc_msgcat
	.comm	_ISC_MSGSET_GENERAL,4,2         ## @ISC_MSGSET_GENERAL
	.comm	_ISC_MSG_SHUTTINGDOWN,4,2       ## @ISC_MSG_SHUTTINGDOWN
L_.str.1:                               ## @.str.1
	.asciz	"shutting down"

	.comm	_TASK_F_SHUTTINGDOWN,4,2        ## @TASK_F_SHUTTINGDOWN
	.comm	_task_state_idle,8,3            ## @task_state_idle
	.comm	_task_state_ready,8,3           ## @task_state_ready
	.comm	_ISC_TRUE,4,2                   ## @ISC_TRUE
	.comm	_task_state_running,8,3         ## @task_state_running
	.comm	_ev_link,4,2                    ## @ev_link
	.no_dead_strip	_task_shutdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function task_shutdown
_task_shutdown:                         ; @task_shutdown
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, _ISC_FALSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ISC_FALSE@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_XTRACE
	mov	x0, x19
	bl	_TASK_SHUTTINGDOWN
	cbnz	w0, LBB0_6
; %bb.1:
Lloh5:
	adrp	x8, _isc_msgcat@GOTPAGE
Lloh6:
	ldr	x8, [x8, _isc_msgcat@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _ISC_MSGSET_GENERAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ISC_MSGSET_GENERAL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _ISC_MSG_SHUTTINGDOWN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ISC_MSG_SHUTTINGDOWN@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
Lloh14:
	adrp	x3, l_.str.1@PAGE
Lloh15:
	add	x3, x3, l_.str.1@PAGEOFF
	bl	_isc_msgcat_get
	bl	_XTRACE
Lloh16:
	adrp	x8, _TASK_F_SHUTTINGDOWN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TASK_F_SHUTTINGDOWN@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
	ldr	x8, [x19]
Lloh19:
	adrp	x9, _task_state_idle@GOTPAGE
Lloh20:
	ldr	x9, [x9, _task_state_idle@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
Lloh22:
	adrp	x21, _task_state_ready@GOTPAGE
Lloh23:
	ldr	x21, [x21, _task_state_ready@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	w0, [x19, #8]
	bl	_EMPTY
	bl	_INSIST
	ldr	x8, [x21]
	str	x8, [x19]
Lloh24:
	adrp	x9, _ISC_TRUE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _ISC_TRUE@GOTPAGEOFF]
Lloh26:
	ldr	w20, [x9]
LBB0_3:
	ldr	x9, [x21]
	cmp	x8, x9
Lloh27:
	adrp	x9, _task_state_running@GOTPAGE
Lloh28:
	ldr	x9, [x9, _task_state_running@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w0, eq
	bl	_INSIST
	ldr	w0, [x19, #12]
	bl	_TAIL
	cbz	x0, LBB0_6
; %bb.4:
	mov	x21, x0
Lloh30:
	adrp	x23, _ev_link@GOTPAGE
Lloh31:
	ldr	x23, [x23, _ev_link@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x21
	bl	_PREV
	mov	x22, x0
	ldr	w0, [x19, #12]
	ldr	w2, [x23]
	mov	x1, x21
	bl	_DEQUEUE
	ldr	w0, [x19, #8]
	ldr	w2, [x23]
	mov	x1, x21
	bl	_ENQUEUE
	mov	x21, x22
	cbnz	x22, LBB0_5
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_ISC_FALSE,4,2                  ; @ISC_FALSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"task_shutdown"

	.comm	_isc_msgcat,4,2                 ; @isc_msgcat
	.comm	_ISC_MSGSET_GENERAL,4,2         ; @ISC_MSGSET_GENERAL
	.comm	_ISC_MSG_SHUTTINGDOWN,4,2       ; @ISC_MSG_SHUTTINGDOWN
l_.str.1:                               ; @.str.1
	.asciz	"shutting down"

	.comm	_TASK_F_SHUTTINGDOWN,4,2        ; @TASK_F_SHUTTINGDOWN
	.comm	_task_state_idle,8,3            ; @task_state_idle
	.comm	_task_state_ready,8,3           ; @task_state_ready
	.comm	_ISC_TRUE,4,2                   ; @ISC_TRUE
	.comm	_task_state_running,8,3         ; @task_state_running
	.comm	_ev_link,4,2                    ; @ev_link
	.no_dead_strip	_task_shutdown
.subsections_via_symbols
