	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tpool_dispatch                 ## -- Begin function tpool_dispatch
	.p2align	4, 0x90
_tpool_dispatch:                        ## @tpool_dispatch
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	$1, %edi
	movl	$24, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	$0, 8(%rax)
	movq	%r12, (%rax)
	movq	%r14, 16(%rax)
	leaq	32(%r15), %r14
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
	cmpq	$0, 56(%r15)
	je	LBB0_3
## %bb.4:
	movq	48(%r15), %rax
	addq	$8, %rax
	jmp	LBB0_5
LBB0_1:
	movl	$-1, %eax
	jmp	LBB0_12
LBB0_3:
	leaq	56(%r15), %rax
LBB0_5:
	movq	%rbx, (%rax)
	movq	%rbx, 48(%r15)
	incl	40(%r15)
	movq	_TP_SUSPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	jne	LBB0_11
## %bb.6:
	cmpq	$0, 8(%r15)
	jle	LBB0_8
## %bb.7:
	addq	$36, %r15
	movq	%r15, %rdi
	callq	_pthread_cond_signal
	jmp	LBB0_11
LBB0_8:
	movq	16(%r15), %rax
	cmpq	24(%r15), %rax
	jge	LBB0_11
## %bb.9:
	movq	%r15, %rdi
	callq	_create_worker
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	incq	16(%r15)
LBB0_11:
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	xorl	%eax, %eax
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TP_SUSPEND,4,2                 ## @TP_SUSPEND
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tpool_dispatch                 ; -- Begin function tpool_dispatch
	.p2align	2
_tpool_dispatch:                        ; @tpool_dispatch
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	mov	w0, #1
	mov	w1, #24
	bl	_calloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x0
	stp	x20, xzr, [x0]
	add	x20, x19, #32
	str	x22, [x0, #16]
	mov	x0, x20
	bl	_pthread_mutex_lock
	mov	x8, x19
	ldr	x9, [x8, #56]!
	cbz	x9, LBB0_3
; %bb.2:
	ldr	x8, [x19, #48]
	add	x8, x8, #8
LBB0_3:
	str	x21, [x8]
	str	x21, [x19, #48]
	ldr	w8, [x19, #40]
	add	w8, w8, #1
	str	w8, [x19, #40]
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _TP_SUSPEND@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TP_SUSPEND@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_10
; %bb.4:
	ldr	x8, [x19, #8]
	cmp	x8, #1
	b.lt	LBB0_7
; %bb.5:
	add	x0, x19, #36
	bl	_pthread_cond_signal
	b	LBB0_10
LBB0_6:
	mov	w0, #-1
	b	LBB0_11
LBB0_7:
	ldp	x8, x9, [x19, #16]
	cmp	x8, x9
	b.ge	LBB0_10
; %bb.8:
	mov	x0, x19
	bl	_create_worker
	cbnz	x0, LBB0_10
; %bb.9:
	ldr	x8, [x19, #16]
	add	x8, x8, #1
	str	x8, [x19, #16]
LBB0_10:
	mov	x0, x20
	bl	_pthread_mutex_unlock
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TP_SUSPEND,4,2                 ; @TP_SUSPEND
.subsections_via_symbols
