	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arena_reset_finish_background_thread
_arena_reset_finish_background_thread:  ## @arena_reset_finish_background_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_have_background_thread@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.1:
	movl	%esi, %ebx
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_background_thread_enabled
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_ncpus@GOTPCREL(%rip), %rcx
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	(%rcx)
	movl	%edx, %ebx
	movq	_background_thread_info@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	shlq	$4, %rbx
	movq	(%r12,%rbx), %rax
	movq	_background_thread_paused@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	movq	%r14, %rdi
	callq	_tsd_tsdn
	leaq	(%r12,%rbx), %r15
	addq	$8, %r15
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_malloc_mutex_lock
	movq	_background_thread_started@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12,%rbx)
	movq	%r14, %rdi
	callq	_tsd_tsdn
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_malloc_mutex_unlock
LBB0_3:
	movq	%r14, %rdi
	callq	_tsd_tsdn
	movq	_background_thread_lock@GOTPCREL(%rip), %rsi
	movl	%eax, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_malloc_mutex_unlock            ## TAILCALL
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_have_background_thread,8,3     ## @have_background_thread
	.comm	_ncpus,4,2                      ## @ncpus
	.comm	_background_thread_info,8,3     ## @background_thread_info
	.comm	_background_thread_paused,8,3   ## @background_thread_paused
	.comm	_background_thread_started,8,3  ## @background_thread_started
	.comm	_background_thread_lock,4,2     ## @background_thread_lock
	.no_dead_strip	_arena_reset_finish_background_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arena_reset_finish_background_thread
_arena_reset_finish_background_thread:  ; @arena_reset_finish_background_thread
	.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
Lloh0:
	adrp	x8, _have_background_thread@GOTPAGE
Lloh1:
	ldr	x8, [x8, _have_background_thread@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	bl	_background_thread_enabled
	cbz	x0, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _ncpus@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ncpus@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	udiv	w9, w20, w8
	msub	w8, w9, w8, w20
Lloh6:
	adrp	x9, _background_thread_info@GOTPAGE
Lloh7:
	ldr	x9, [x9, _background_thread_info@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x21, x9, w8, uxtw #4
	ldr	x8, [x21]
Lloh9:
	adrp	x9, _background_thread_paused@GOTPAGE
Lloh10:
	ldr	x9, [x9, _background_thread_paused@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	mov	x0, x19
	bl	_tsd_tsdn
	add	x20, x21, #8
	mov	x1, x20
	bl	_malloc_mutex_lock
Lloh12:
	adrp	x8, _background_thread_started@GOTPAGE
Lloh13:
	ldr	x8, [x8, _background_thread_started@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	x8, [x21]
	mov	x0, x19
	bl	_tsd_tsdn
	mov	x1, x20
	bl	_malloc_mutex_unlock
LBB0_3:
	mov	x0, x19
	bl	_tsd_tsdn
Lloh15:
	adrp	x1, _background_thread_lock@GOTPAGE
Lloh16:
	ldr	x1, [x1, _background_thread_lock@GOTPAGEOFF]
	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
	b	_malloc_mutex_unlock
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_have_background_thread,8,3     ; @have_background_thread
	.comm	_ncpus,4,2                      ; @ncpus
	.comm	_background_thread_info,8,3     ; @background_thread_info
	.comm	_background_thread_paused,8,3   ; @background_thread_paused
	.comm	_background_thread_started,8,3  ; @background_thread_started
	.comm	_background_thread_lock,4,2     ; @background_thread_lock
	.no_dead_strip	_arena_reset_finish_background_thread
.subsections_via_symbols
