	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vlapic_set_intr_ready          ## -- Begin function vlapic_set_intr_ready
	.p2align	4, 0x90
_vlapic_set_intr_ready:                 ## @vlapic_set_intr_ready
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r15
	xorl	%edi, %edi
	cmpl	$256, %esi                      ## imm = 0x100
	setb	%dil
	movslq	%esi, %rsi
	callq	_KASSERT
	movq	8(%r15), %r14
	movq	_APIC_SVR_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_1
## %bb.2:
	cmpl	$15, %ebx
	jg	LBB0_4
## %bb.3:
	movq	_APIC_ESR_RECEIVE_ILLEGAL_VECTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_vlapic_set_error
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_VLAPIC_CTR1
	movl	$1, %r12d
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_VLAPIC_CTR1
	xorl	%r12d, %r12d
	jmp	LBB0_8
LBB0_4:
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.9:
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_5:
	movl	%ebx, %eax
	shrl	$5, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leal	(,%rax,4), %eax
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movl	$1, %r12d
	movl	$1, %r13d
	movl	%ebx, %ecx
	shll	%cl, %r13d
	movq	%rax, %rbx
	leaq	(%r14,%rax,4), %rdi
	addq	$4, %rdi
	movl	%r13d, %esi
	callq	_atomic_set_int
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	8(%r14,%rbx,4), %ecx
	movl	%ecx, %eax
	andl	%r13d, %eax
	testl	%edx, %edx
	cmovel	%edx, %r13d
	cmpl	%r13d, %eax
	je	LBB0_7
## %bb.6:
	testl	%edx, %edx
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.4(%rip), %r8
	cmoveq	%rax, %r8
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_VLAPIC_CTR3
LBB0_7:
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdi
	callq	_VLAPIC_CTR_IRR
LBB0_8:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APIC_SVR_ENABLE,4,2            ## @APIC_SVR_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"vlapic is software disabled, ignoring interrupt %d"

	.comm	_APIC_ESR_RECEIVE_ILLEGAL_VECTOR,4,2 ## @APIC_ESR_RECEIVE_ILLEGAL_VECTOR
L_.str.2:                               ## @.str.2
	.asciz	"vlapic ignoring interrupt to vector %d"

L_.str.3:                               ## @.str.3
	.asciz	"vlapic TMR[%d] is 0x%08x but interrupt is %s-triggered"

L_.str.4:                               ## @.str.4
	.asciz	"level"

L_.str.5:                               ## @.str.5
	.asciz	"edge"

L_.str.6:                               ## @.str.6
	.asciz	"vlapic_set_intr_ready"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vlapic_set_intr_ready          ; -- Begin function vlapic_set_intr_ready
	.p2align	2
_vlapic_set_intr_ready:                 ; @vlapic_set_intr_ready
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	cmp	w1, #256
	cset	w0, lo
	sxtw	x1, w21
	bl	_KASSERT
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
Lloh0:
	adrp	x10, _APIC_SVR_ENABLE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _APIC_SVR_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_3
; %bb.1:
	cmp	w21, #15
	b.gt	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _APIC_ESR_RECEIVE_ILLEGAL_VECTOR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _APIC_ESR_RECEIVE_ILLEGAL_VECTOR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_vlapic_set_error
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_VLAPIC_CTR1
	b	LBB0_9
LBB0_3:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_VLAPIC_CTR1
	mov	w0, #0
	b	LBB0_10
LBB0_4:
	ldr	x3, [x19]
	cbz	x3, LBB0_6
; %bb.5:
	mov	x0, x19
	mov	x1, x21
	mov	x2, 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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	br	x3
LBB0_6:
	lsr	w22, w21, #5
	lsl	w9, w22, #2
	mov	w10, #1
	lsl	w21, w10, w21
	add	x23, x8, w9, uxtw #2
	add	x0, x23, #4
	mov	x1, x21
	bl	_atomic_set_int
	ldr	w3, [x23, #8]
	and	w8, w3, w21
	cmp	w20, #0
	csel	w9, wzr, w21, eq
	cmp	w8, w9
	b.eq	LBB0_8
; %bb.7:
Lloh10:
	adrp	x8, l_.str.4@PAGE
Lloh11:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh12:
	adrp	x9, l_.str.5@PAGE
Lloh13:
	add	x9, x9, l_.str.5@PAGEOFF
	cmp	w20, #0
	csel	x4, x9, x8, eq
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_VLAPIC_CTR3
LBB0_8:
Lloh16:
	adrp	x1, l_.str.6@PAGE
Lloh17:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_VLAPIC_CTR_IRR
LBB0_9:
	mov	w0, #1
LBB0_10:
	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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_APIC_SVR_ENABLE,4,2            ; @APIC_SVR_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"vlapic is software disabled, ignoring interrupt %d"

	.comm	_APIC_ESR_RECEIVE_ILLEGAL_VECTOR,4,2 ; @APIC_ESR_RECEIVE_ILLEGAL_VECTOR
l_.str.2:                               ; @.str.2
	.asciz	"vlapic ignoring interrupt to vector %d"

l_.str.3:                               ; @.str.3
	.asciz	"vlapic TMR[%d] is 0x%08x but interrupt is %s-triggered"

l_.str.4:                               ; @.str.4
	.asciz	"level"

l_.str.5:                               ; @.str.5
	.asciz	"edge"

l_.str.6:                               ; @.str.6
	.asciz	"vlapic_set_intr_ready"

.subsections_via_symbols
