	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vioapic_send_intr
_vioapic_send_intr:                     ## @vioapic_send_intr
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	testl	%esi, %esi
	setns	%al
	movq	_REDIR_ENTRIES@GOTPCREL(%rip), %rcx
	cmpl	%esi, (%rcx)
	setg	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	movslq	%esi, %r15
	movq	%r15, %rsi
	callq	_KASSERT
	movq	%r14, %rdi
	callq	_VIOAPIC_LOCKED
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_KASSERT
	movq	8(%r14), %rax
	movl	(%rax,%r15,4), %r9d
	movq	_IOART_INTMASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%r9d, %ecx
	movq	_IOART_INTMSET@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_1
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_VIOAPIC_CTR1                   ## TAILCALL
LBB0_1:
	movq	_IOART_DESTMOD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	%r9d, %edx
	movq	_IOART_DESTPHY@GOTPCREL(%rip), %rsi
	xorl	%ecx, %ecx
	cmpl	(%rsi), %edx
	sete	%cl
	movq	_IOART_DELMOD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	andl	%r9d, %r8d
	movq	_IOART_TRGRLVL@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	testl	%r9d, (%rdx)
	setne	%sil
	je	LBB0_3
## %bb.2:
	movq	_IOART_REM_IRR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%r9d, %edx
	movl	%edx, (%rax,%r15,4)
LBB0_3:
	movq	_IOART_INTVEC@GOTPCREL(%rip), %rax
	andl	(%rax), %r9d
	movl	(%r14), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vlapic_deliver_intr            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REDIR_ENTRIES,4,2              ## @REDIR_ENTRIES
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"vioapic_set_pinstate: vioapic is not locked"

	.comm	_IOART_INTMASK,4,2              ## @IOART_INTMASK
	.comm	_IOART_INTMSET,4,2              ## @IOART_INTMSET
L_.str.2:                               ## @.str.2
	.asciz	"ioapic pin%d: masked"

	.comm	_IOART_DESTMOD,4,2              ## @IOART_DESTMOD
	.comm	_IOART_DESTPHY,4,2              ## @IOART_DESTPHY
	.comm	_IOART_DELMOD,4,2               ## @IOART_DELMOD
	.comm	_IOART_TRGRLVL,4,2              ## @IOART_TRGRLVL
	.comm	_IOART_REM_IRR,4,2              ## @IOART_REM_IRR
	.comm	_IOART_INTVEC,4,2               ## @IOART_INTVEC
	.comm	_APIC_ID_SHIFT,4,2              ## @APIC_ID_SHIFT
	.no_dead_strip	_vioapic_send_intr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vioapic_send_intr
_vioapic_send_intr:                     ; @vioapic_send_intr
	.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	x21, x1
	mov	x19, x0
	cmp	w1, #0
Lloh0:
	adrp	x8, _REDIR_ENTRIES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REDIR_ENTRIES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ccmp	w8, w1, #4, ge
	cset	w0, gt
	sxtw	x20, w21
	mov	x1, x20
	bl	_KASSERT
	mov	x0, x19
	bl	_VIOAPIC_LOCKED
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	ldr	x9, [x19, #8]
	ldr	w8, [x9, w21, sxtw #2]
Lloh5:
	adrp	x10, _IOART_INTMASK@GOTPAGE
Lloh6:
	ldr	x10, [x10, _IOART_INTMASK@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	and	w10, w10, w8
Lloh8:
	adrp	x11, _IOART_INTMSET@GOTPAGE
Lloh9:
	ldr	x11, [x11, _IOART_INTMSET@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_2
; %bb.1:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	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	_VIOAPIC_CTR1
LBB0_2:
Lloh13:
	adrp	x10, _IOART_DESTMOD@GOTPAGE
Lloh14:
	ldr	x10, [x10, _IOART_DESTMOD@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	and	w10, w10, w8
Lloh16:
	adrp	x11, _IOART_DESTPHY@GOTPAGE
Lloh17:
	ldr	x11, [x11, _IOART_DESTPHY@GOTPAGEOFF]
Lloh18:
	ldr	w11, [x11]
	cmp	w10, w11
	cset	w3, eq
Lloh19:
	adrp	x10, _IOART_DELMOD@GOTPAGE
Lloh20:
	ldr	x10, [x10, _IOART_DELMOD@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	and	w4, w10, w8
Lloh22:
	adrp	x10, _IOART_TRGRLVL@GOTPAGE
Lloh23:
	ldr	x10, [x10, _IOART_TRGRLVL@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	ands	w10, w10, w8
	cset	w1, ne
	cbz	w10, LBB0_4
; %bb.3:
Lloh25:
	adrp	x10, _IOART_REM_IRR@GOTPAGE
Lloh26:
	ldr	x10, [x10, _IOART_REM_IRR@GOTPAGEOFF]
Lloh27:
	ldr	w10, [x10]
	orr	w10, w10, w8
	str	w10, [x9, x20, lsl #2]
LBB0_4:
Lloh28:
	adrp	x9, _IOART_INTVEC@GOTPAGE
Lloh29:
	ldr	x9, [x9, _IOART_INTVEC@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	and	w5, w9, w8
	ldr	w0, [x19]
	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	_vlapic_deliver_intr
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_REDIR_ENTRIES,4,2              ; @REDIR_ENTRIES
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"vioapic_set_pinstate: vioapic is not locked"

	.comm	_IOART_INTMASK,4,2              ; @IOART_INTMASK
	.comm	_IOART_INTMSET,4,2              ; @IOART_INTMSET
l_.str.2:                               ; @.str.2
	.asciz	"ioapic pin%d: masked"

	.comm	_IOART_DESTMOD,4,2              ; @IOART_DESTMOD
	.comm	_IOART_DESTPHY,4,2              ; @IOART_DESTPHY
	.comm	_IOART_DELMOD,4,2               ; @IOART_DELMOD
	.comm	_IOART_TRGRLVL,4,2              ; @IOART_TRGRLVL
	.comm	_IOART_REM_IRR,4,2              ; @IOART_REM_IRR
	.comm	_IOART_INTVEC,4,2               ; @IOART_INTVEC
	.comm	_APIC_ID_SHIFT,4,2              ; @APIC_ID_SHIFT
	.no_dead_strip	_vioapic_send_intr
.subsections_via_symbols
