	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ijk_threadpool_add             ## -- Begin function ijk_threadpool_add
	.p2align	4, 0x90
_ijk_threadpool_add:                    ## @ijk_threadpool_add
	.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
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rsi, %r13
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.3:
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rdi, %rbx
	leaq	12(%rdi), %r14
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
	testq	%rax, %rax
	je	LBB0_4
LBB0_16:
	movq	_IJK_THREADPOOL_LOCK_FAILURE@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_2:
	movq	_IJK_THREADPOOL_INVALID@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_4:
	movl	(%rbx), %ecx
	movq	_MAX_QUEUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	je	LBB0_6
## %bb.5:
	movl	4(%rbx), %esi
	cmpl	%esi, %ecx
	jne	LBB0_7
LBB0_6:
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	movq	_IJK_THREADPOOL_QUEUE_FULL@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leal	-1(%rsi), %edx
	cmpl	%edx, %ecx
	jne	LBB0_10
## %bb.8:
	addl	%esi, %esi
	cmpl	%eax, %esi
	cmovgel	%eax, %esi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	24(%rbx), %rdi
	leal	(,%rsi,8), %eax
	leal	(%rax,%rax,2), %esi
	callq	_realloc
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%rax, 24(%rbx)
	movl	%ecx, 4(%rbx)
LBB0_10:
	cmpq	$0, 32(%rbx)
	je	LBB0_12
## %bb.11:
	movq	_IJK_THREADPOOL_SHUTDOWN@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_12:
	movslq	8(%rbx), %rcx
	leal	1(%rcx), %eax
	cltd
	idivl	4(%rbx)
	movq	24(%rbx), %rax
	leaq	(%rcx,%rcx,2), %rcx
	movq	%r13, 16(%rax,%rcx,8)
	movq	%r12, 8(%rax,%rcx,8)
	movq	%r15, (%rax,%rcx,8)
	movl	%edx, 8(%rbx)
	incl	(%rbx)
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_pthread_cond_signal
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	movq	_IJK_THREADPOOL_LOCK_FAILURE@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %ebx
LBB0_15:
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	testq	%rax, %rax
	jne	LBB0_16
	jmp	LBB0_18
	.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	_MAX_QUEUE,4,2                  ## @MAX_QUEUE
	.comm	_IJK_THREADPOOL_QUEUE_FULL,4,2  ## @IJK_THREADPOOL_QUEUE_FULL
	.comm	_IJK_THREADPOOL_SHUTDOWN,4,2    ## @IJK_THREADPOOL_SHUTDOWN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ijk_threadpool_add             ; -- Begin function ijk_threadpool_add
	.p2align	2
_ijk_threadpool_add:                    ; @ijk_threadpool_add
	.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
	cbz	x0, LBB0_4
; %bb.1:
	mov	x23, x1
	cbz	x1, LBB0_4
; %bb.2:
	mov	x20, x3
	mov	x22, x2
	mov	x21, x0
	add	x19, x0, #12
	mov	x0, x19
	bl	_pthread_mutex_lock
	cbz	x0, LBB0_5
; %bb.3:
Lloh0:
	adrp	x8, _IJK_THREADPOOL_LOCK_FAILURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IJK_THREADPOOL_LOCK_FAILURE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_15
LBB0_4:
Lloh3:
	adrp	x8, _IJK_THREADPOOL_INVALID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IJK_THREADPOOL_INVALID@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_15
LBB0_5:
	ldr	w9, [x21]
Lloh6:
	adrp	x8, _MAX_QUEUE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAX_QUEUE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w9, w8
	b.eq	LBB0_7
; %bb.6:
	ldr	w10, [x21, #4]
	cmp	w9, w10
	b.ne	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_pthread_mutex_unlock
Lloh9:
	adrp	x8, _IJK_THREADPOOL_QUEUE_FULL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IJK_THREADPOOL_QUEUE_FULL@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	b	LBB0_15
LBB0_8:
	sub	w11, w10, #1
	cmp	w9, w11
	b.ne	LBB0_11
; %bb.9:
	lsl	w9, w10, #1
	cmp	w9, w8
	csel	w24, w9, w8, lt
	ldr	x0, [x21, #24]
	add	w8, w24, w24, lsl #1
	lsl	w1, w8, #3
	bl	_realloc
	cbz	x0, LBB0_11
; %bb.10:
	str	x0, [x21, #24]
	str	w24, [x21, #4]
LBB0_11:
	ldr	x8, [x21, #32]
	cbz	x8, LBB0_13
; %bb.12:
Lloh12:
	adrp	x8, _IJK_THREADPOOL_SHUTDOWN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IJK_THREADPOOL_SHUTDOWN@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	b	LBB0_14
LBB0_13:
	ldrsw	x8, [x21, #8]
	add	w9, w8, #1
	ldr	x10, [x21, #24]
	mov	w11, #24
	madd	x8, x8, x11, x10
	str	x23, [x8, #16]
	ldp	w11, w10, [x21]
	sdiv	w12, w9, w10
	msub	w9, w12, w10, w9
	stp	x20, x22, [x8]
	str	w9, [x21, #8]
	add	w8, w11, #1
	str	w8, [x21]
	add	x0, x21, #16
	bl	_pthread_cond_signal
Lloh15:
	adrp	x8, _IJK_THREADPOOL_LOCK_FAILURE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IJK_THREADPOOL_LOCK_FAILURE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w20, wzr, w8, eq
LBB0_14:
	mov	x0, x19
	bl	_pthread_mutex_unlock
Lloh18:
	adrp	x8, _IJK_THREADPOOL_LOCK_FAILURE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IJK_THREADPOOL_LOCK_FAILURE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, w20, w8, eq
LBB0_15:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.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	_MAX_QUEUE,4,2                  ; @MAX_QUEUE
	.comm	_IJK_THREADPOOL_QUEUE_FULL,4,2  ; @IJK_THREADPOOL_QUEUE_FULL
	.comm	_IJK_THREADPOOL_SHUTDOWN,4,2    ; @IJK_THREADPOOL_SHUTDOWN
.subsections_via_symbols
