	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ijk_threadpool_destroy         ## -- Begin function ijk_threadpool_destroy
	.p2align	4, 0x90
_ijk_threadpool_destroy:                ## @ijk_threadpool_destroy
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -40(%rbp)
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, %rbx
	leaq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	_IJK_THREADPOOL_LOCK_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_12
LBB0_3:
	movq	_IJK_THREADPOOL_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_12
LBB0_4:
	cmpl	$0, (%rbx)
	je	LBB0_6
## %bb.5:
	movq	_IJK_THREADPOOL_SHUTDOWN@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	movl	%r15d, (%rbx)
	leaq	20(%rbx), %rdi
	callq	_pthread_cond_broadcast
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	testq	%rax, %rax
	je	LBB0_13
LBB0_8:
	movq	_IJK_THREADPOOL_LOCK_FAILURE@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %r14d
LBB0_10:
	testl	%r14d, %r14d
	jne	LBB0_12
LBB0_11:
	leaq	-40(%rbp), %rdi
	callq	_ijk_threadpool_freep
	movl	%eax, %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	cmpl	$0, 4(%rbx)
	jle	LBB0_11
## %bb.14:
	xorl	%r15d, %r15d
	movq	_IJK_THREADPOOL_THREAD_FAILURE@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_16 Depth=1
	incq	%r15
	movslq	4(%rbx), %rax
	cmpq	%rax, %r15
	jge	LBB0_10
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movl	(%rax,%r15,4), %edi
	xorl	%esi, %esi
	callq	_pthread_join
	testq	%rax, %rax
	je	LBB0_15
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	(%r12), %r14d
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_IJK_THREADPOOL_INVALID,4,2     ## @IJK_THREADPOOL_INVALID
	.comm	_IJK_THREADPOOL_LOCK_FAILURE,4,2 ## @IJK_THREADPOOL_LOCK_FAILURE
	.comm	_IJK_THREADPOOL_SHUTDOWN,4,2    ## @IJK_THREADPOOL_SHUTDOWN
	.comm	_IJK_THREADPOOL_THREAD_FAILURE,4,2 ## @IJK_THREADPOOL_THREAD_FAILURE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ijk_threadpool_destroy         ; -- Begin function ijk_threadpool_destroy
	.p2align	2
_ijk_threadpool_destroy:                ; @ijk_threadpool_destroy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	str	x0, [sp, #8]
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	add	x20, x0, #16
	mov	x0, x20
	bl	_pthread_mutex_lock
	cbz	x0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _IJK_THREADPOOL_LOCK_FAILURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IJK_THREADPOOL_LOCK_FAILURE@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	b	LBB0_12
LBB0_3:
Lloh3:
	adrp	x8, _IJK_THREADPOOL_INVALID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IJK_THREADPOOL_INVALID@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	b	LBB0_12
LBB0_4:
	ldr	w8, [x19]
	cbz	w8, LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _IJK_THREADPOOL_SHUTDOWN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IJK_THREADPOOL_SHUTDOWN@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	mov	x0, x19
	str	w21, [x0], #20
	bl	_pthread_cond_broadcast
	cbnz	x0, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_pthread_mutex_unlock
	cbz	x0, LBB0_13
LBB0_8:
Lloh8:
	adrp	x8, _IJK_THREADPOOL_LOCK_FAILURE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IJK_THREADPOOL_LOCK_FAILURE@GOTPAGEOFF]
LBB0_9:
	ldr	w20, [x8]
LBB0_10:
	cbnz	w20, LBB0_12
LBB0_11:
	add	x0, sp, #8
	bl	_ijk_threadpool_freep
	mov	x20, x0
LBB0_12:
	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
	add	sp, sp, #64
	ret
LBB0_13:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.14:
	mov	x21, #0
	mov	w20, #0
Lloh10:
	adrp	x22, _IJK_THREADPOOL_THREAD_FAILURE@GOTPAGE
Lloh11:
	ldr	x22, [x22, _IJK_THREADPOOL_THREAD_FAILURE@GOTPAGEOFF]
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w0, [x8, x21, lsl #2]
	mov	x1, #0
	bl	_pthread_join
	ldr	w8, [x22]
	cmp	x0, #0
	csel	w20, w20, w8, eq
	add	x21, x21, #1
	ldrsw	x8, [x19, #4]
	cmp	x21, x8
	b.lt	LBB0_15
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IJK_THREADPOOL_INVALID,4,2     ; @IJK_THREADPOOL_INVALID
	.comm	_IJK_THREADPOOL_LOCK_FAILURE,4,2 ; @IJK_THREADPOOL_LOCK_FAILURE
	.comm	_IJK_THREADPOOL_SHUTDOWN,4,2    ; @IJK_THREADPOOL_SHUTDOWN
	.comm	_IJK_THREADPOOL_THREAD_FAILURE,4,2 ; @IJK_THREADPOOL_THREAD_FAILURE
.subsections_via_symbols
