	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function taskq_thread
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_taskq_thread:                          ## @taskq_thread
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_enter
	movq	_TASKQ_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_7
## %bb.1:
	leaq	40(%rbx), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	28(%rbx), %r15
	leaq	20(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	32(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	decq	8(%rbx)
	je	LBB0_4
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_cv_wait
	incq	8(%rbx)
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_TASKQ_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	64(%rbx), %r12
	cmpq	-64(%rbp), %r12                 ## 8-byte Folded Reload
	je	LBB0_3
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r12), %rax
	movq	24(%r12), %rcx
	movq	%rcx, (%rax)
	movq	%rax, 16(%rcx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r12)
	movq	_TQENT_FLAG_PREALLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	andl	(%r12), %r13d
	movq	%r14, %rdi
	callq	_mutex_exit
	movq	_RW_READER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rw_enter
	movl	4(%r12), %edi
	callq	*8(%r12)
	movq	%r15, %rdi
	callq	_rw_exit
	movq	%r14, %rdi
	callq	_mutex_enter
	testl	%r13d, %r13d
	jne	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_task_free
	jmp	LBB0_6
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_cv_broadcast
	jmp	LBB0_5
LBB0_7:
	decl	24(%rbx)
	addq	$20, %rbx
	movq	%rbx, %rdi
	callq	_cv_broadcast
	movq	%r14, %rdi
	callq	_mutex_exit
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TASKQ_ACTIVE,4,2               ## @TASKQ_ACTIVE
	.comm	_TQENT_FLAG_PREALLOC,4,2        ## @TQENT_FLAG_PREALLOC
	.comm	_RW_READER,4,2                  ## @RW_READER
	.no_dead_strip	_taskq_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function taskq_thread
_taskq_thread:                          ; @taskq_thread
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
	add	x19, x0, #16
	mov	x0, x19
	bl	_mutex_enter
	ldr	w8, [x20]
Lloh0:
	adrp	x25, _TASKQ_ACTIVE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _TASKQ_ACTIVE@GOTPAGEOFF]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.1:
	add	x26, x20, #40
	add	x21, x20, #28
	add	x8, x20, #20
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	add	x23, x20, #32
Lloh2:
	adrp	x27, _TQENT_FLAG_PREALLOC@GOTPAGE
Lloh3:
	ldr	x27, [x27, _TQENT_FLAG_PREALLOC@GOTPAGEOFF]
Lloh4:
	adrp	x28, _RW_READER@GOTPAGE
Lloh5:
	ldr	x28, [x28, _RW_READER@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20, #8]
	subs	x8, x8, #1
	str	x8, [x20, #8]
	b.eq	LBB0_8
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	mov	x1, x19
	bl	_cv_wait
	ldr	x8, [x20, #8]
	add	x8, x8, #1
	str	x8, [x20, #8]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x24, [x20, #64]
	cmp	x24, x26
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldp	x9, x8, [x24, #16]
	str	x8, [x9]
	str	x9, [x8, #16]
	stp	xzr, xzr, [x24, #16]
	ldr	w8, [x24]
	ldr	w9, [x27]
	and	w22, w9, w8
	mov	x0, x19
	bl	_mutex_exit
	ldr	w1, [x28]
	mov	x0, x21
	bl	_rw_enter
	ldr	x8, [x24, #8]
	ldr	w0, [x24, #4]
	blr	x8
	mov	x0, x21
	bl	_rw_exit
	mov	x0, x19
	bl	_mutex_enter
	cbnz	w22, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x24
	bl	_task_free
	b	LBB0_4
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_cv_broadcast
	b	LBB0_3
LBB0_9:
	ldr	w8, [x20, #24]
	sub	w8, w8, #1
	str	w8, [x20, #24]
	add	x0, x20, #20
	bl	_cv_broadcast
	mov	x0, x19
	bl	_mutex_exit
	mov	x0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_TASKQ_ACTIVE,4,2               ; @TASKQ_ACTIVE
	.comm	_TQENT_FLAG_PREALLOC,4,2        ; @TQENT_FLAG_PREALLOC
	.comm	_RW_READER,4,2                  ; @RW_READER
	.no_dead_strip	_taskq_thread
.subsections_via_symbols
