	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vioapic_process_eoi            ## -- Begin function vioapic_process_eoi
	.p2align	4, 0x90
_vioapic_process_eoi:                   ## @vioapic_process_eoi
	.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
	movl	%edx, %r14d
	movq	%rdi, %r15
	xorl	%edi, %edi
	cmpl	$256, %edx                      ## imm = 0x100
	setb	%dil
	movslq	%edx, %rbx
	movq	%rbx, %rsi
	callq	_KASSERT
	movq	%r15, %rdi
	callq	_vm_ioapic
	movq	%rax, %r12
	leaq	L_.str.1(%rip), %rsi
	movq	%rax, %rdi
	movl	%ebx, %edx
	callq	_VIOAPIC_CTR1
	movq	%r12, %rdi
	callq	_VIOAPIC_LOCK
	movq	_REDIR_ENTRIES@GOTPCREL(%rip), %rdi
	cmpl	$0, (%rdi)
	jle	LBB0_7
## %bb.1:
	xorl	%r15d, %r15d
	movq	_IOART_REM_IRR@GOTPCREL(%rip), %r8
	movq	_IOART_INTVEC@GOTPCREL(%rip), %r13
	xorl	%ebx, %ebx
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	(%rdi), %rax
	addq	$16, %r15
	cmpq	%rax, %rbx
	jge	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movl	(%rax,%r15), %ecx
	movl	(%r8), %edx
	testl	%ecx, %edx
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %esi
	andl	%ecx, %esi
	cmpl	%r14d, %esi
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	notl	%edx
	andl	%edx, %ecx
	movl	%ecx, (%rax,%r15)
	movq	8(%rax,%r15), %rcx
	testq	%rcx, %rcx
	jle	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	movq	%r8, %r14
	callq	_VIOAPIC_CTR2
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_vioapic_send_intr
	movq	%r14, %r8
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movq	_REDIR_ENTRIES@GOTPCREL(%rip), %rdi
	jmp	LBB0_6
LBB0_7:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_VIOAPIC_UNLOCK                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"ioapic processing eoi for vector %d"

	.comm	_REDIR_ENTRIES,4,2              ## @REDIR_ENTRIES
	.comm	_IOART_REM_IRR,4,2              ## @IOART_REM_IRR
	.comm	_IOART_INTVEC,4,2               ## @IOART_INTVEC
L_.str.2:                               ## @.str.2
	.asciz	"ioapic pin%d: asserted at eoi, acnt %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vioapic_process_eoi            ; -- Begin function vioapic_process_eoi
	.p2align	2
_vioapic_process_eoi:                   ; @vioapic_process_eoi
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x20, x0
	cmp	w2, #256
	cset	w0, lo
	sxtw	x1, w19
	bl	_KASSERT
	mov	x0, x20
	bl	_vm_ioapic
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_VIOAPIC_CTR1
	mov	x0, x20
	bl	_VIOAPIC_LOCK
Lloh2:
	adrp	x23, _REDIR_ENTRIES@GOTPAGE
Lloh3:
	ldr	x23, [x23, _REDIR_ENTRIES@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x24, #0
	mov	x21, #0
Lloh4:
	adrp	x25, _IOART_REM_IRR@GOTPAGE
Lloh5:
	ldr	x25, [x25, _IOART_REM_IRR@GOTPAGEOFF]
Lloh6:
	adrp	x26, _IOART_INTVEC@GOTPAGE
Lloh7:
	ldr	x26, [x26, _IOART_INTVEC@GOTPAGEOFF]
Lloh8:
	adrp	x22, l_.str.2@PAGE
Lloh9:
	add	x22, x22, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x23]
	add	x24, x24, #16
	cmp	x21, x8
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	w9, [x8, x24]
	ldr	w10, [x25]
	tst	w10, w9
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w11, [x26]
	and	w11, w11, w9
	cmp	w11, w19
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	bic	w9, w9, w10
	add	x8, x8, x24
	str	w9, [x8]
	ldr	x3, [x8, #8]
	cmp	x3, #1
	b.lt	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	_VIOAPIC_CTR2
	mov	x0, x20
	mov	x1, x21
	bl	_vioapic_send_intr
	b	LBB0_2
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_VIOAPIC_UNLOCK
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"ioapic processing eoi for vector %d"

	.comm	_REDIR_ENTRIES,4,2              ; @REDIR_ENTRIES
	.comm	_IOART_REM_IRR,4,2              ; @IOART_REM_IRR
	.comm	_IOART_INTVEC,4,2               ; @IOART_INTVEC
l_.str.2:                               ; @.str.2
	.asciz	"ioapic pin%d: asserted at eoi, acnt %d"

.subsections_via_symbols
