	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_callout
_test_callout:                          ## @test_callout
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_critical_enter
	movq	_curcpu@GOTPCREL(%rip), %rax
	movslq	(%rax), %r15
	xorl	%eax, %eax
	callq	_critical_exit
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_atomic_add_int
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_mtx_lock
	shlq	$2, %r15
	movq	16(%rbx), %rdi
	addq	%r15, %rdi
	callq	_callout_pending
	testq	%rax, %rax
	je	LBB0_1
LBB0_2:
	incl	24(%rbx)
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_atomic_subtract_int
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtx_unlock                     ## TAILCALL
LBB0_1:
	movq	16(%rbx), %rdi
	addq	%r15, %rdi
	callq	_callout_active
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	addq	16(%rbx), %r15
	movq	%r15, %rdi
	callq	_callout_deactivate
	incl	8(%rbx)
	movq	%r14, %rdi
	callq	_mtx_unlock
	movq	%rbx, %rdi
	movl	$1, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_atomic_subtract_int            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_curcpu,4,2                     ## @curcpu
	.no_dead_strip	_test_callout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_callout
_test_callout:                          ; @test_callout
	.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	x19, x0
	bl	_critical_enter
Lloh0:
	adrp	x8, _curcpu@GOTPAGE
Lloh1:
	ldr	x8, [x8, _curcpu@GOTPAGEOFF]
Lloh2:
	ldrsw	x21, [x8]
	bl	_critical_exit
	mov	x0, x19
	mov	w1, #1
	bl	_atomic_add_int
	add	x20, x19, #4
	mov	x0, x20
	bl	_mtx_lock
	ldr	x8, [x19, #16]
	add	x0, x8, x21, lsl #2
	bl	_callout_pending
	cbz	x0, LBB0_2
LBB0_1:
	ldr	w8, [x19, #24]
	add	w8, w8, #1
	str	w8, [x19, #24]
	mov	x0, x19
	mov	w1, #1
	bl	_atomic_subtract_int
	mov	x0, x20
	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	_mtx_unlock
LBB0_2:
	ldr	x8, [x19, #16]
	add	x0, x8, x21, lsl #2
	bl	_callout_active
	cbz	w0, LBB0_1
; %bb.3:
	ldr	x8, [x19, #16]
	add	x0, x8, x21, lsl #2
	bl	_callout_deactivate
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	mov	x0, x20
	bl	_mtx_unlock
	mov	x0, x19
	mov	w1, #1
	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	_atomic_subtract_int
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_curcpu,4,2                     ; @curcpu
	.no_dead_strip	_test_callout
.subsections_via_symbols
