	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mptable_pci_route_interrupt    ## -- Begin function mptable_pci_route_interrupt
	.p2align	4, 0x90
_mptable_pci_route_interrupt:           ## @mptable_pci_route_interrupt
	.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
	movl	%edi, %r14d
	leal	-1(%r12), %r13d
	movq	_pci0@GOTPCREL(%rip), %r15
	xorl	%edi, %edi
	cmpl	$-1, (%r15)
	setne	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movl	%ebx, %edi
	callq	_pci_get_bus
	movslq	(%r15), %rcx
	addq	%rax, %rcx
	movq	%rcx, -48(%rbp)
	movl	%ebx, %edi
	callq	_pci_get_slot
	movl	%eax, %r15d
	shll	$2, %eax
	orl	%r13d, %eax
	movl	%eax, -56(%rbp)
	movl	$-1, -52(%rbp)
	movq	_mptable_pci_route_interrupt_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-56(%rbp), %rsi
	callq	_mptable_walk_table
	movl	-52(%rbp), %eax
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_bootverbose@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_4
## %bb.3:
	addb	$64, %r12b
	movsbl	%r12b, %ecx
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edi
	movl	%r15d, %edx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_device_printf
	movl	-52(%rbp), %eax
	jmp	LBB0_4
LBB0_1:
	addb	$64, %r12b
	movsbl	%r12b, %ecx
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_device_printf
	movq	_PCI_INVALID_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pci0,4,2                       ## @pci0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"do not know how to route PCI interrupts"

	.comm	_mptable_pci_route_interrupt_handler,4,2 ## @mptable_pci_route_interrupt_handler
L_.str.1:                               ## @.str.1
	.asciz	"unable to route slot %d INT%c\n"

	.comm	_PCI_INVALID_IRQ,4,2            ## @PCI_INVALID_IRQ
	.comm	_bootverbose,8,3                ## @bootverbose
L_.str.2:                               ## @.str.2
	.asciz	"slot %d INT%c routed to irq %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mptable_pci_route_interrupt    ; -- Begin function mptable_pci_route_interrupt
	.p2align	2
_mptable_pci_route_interrupt:           ; @mptable_pci_route_interrupt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	w22, w2, #1
Lloh0:
	adrp	x23, _pci0@GOTPAGE
Lloh1:
	ldr	x23, [x23, _pci0@GOTPAGEOFF]
	ldr	w8, [x23]
	cmn	w8, #1
	cset	w0, ne
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	mov	x0, x21
	bl	_pci_get_bus
	ldrsw	x8, [x23]
	add	x8, x0, x8
	str	x8, [sp, #24]
	mov	x0, x21
	bl	_pci_get_slot
	mov	x21, x0
	orr	w8, w22, w0, lsl #2
	mov	w9, #-1
	stp	w8, w9, [sp, #16]
Lloh4:
	adrp	x8, _mptable_pci_route_interrupt_handler@GOTPAGE
Lloh5:
	ldr	x8, [x8, _mptable_pci_route_interrupt_handler@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	add	x1, sp, #16
	bl	_mptable_walk_table
	ldr	w0, [sp, #20]
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh7:
	adrp	x8, _bootverbose@GOTPAGE
Lloh8:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.2:
	add	w8, w20, #64
	str	x0, [sp]
	sxtb	w3, w8
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_device_printf
	ldr	w0, [sp, #20]
	b	LBB0_4
LBB0_3:
	add	w8, w20, #64
	sxtb	w3, w8
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_device_printf
Lloh14:
	adrp	x8, _PCI_INVALID_IRQ@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PCI_INVALID_IRQ@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
LBB0_4:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_pci0,4,2                       ; @pci0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"do not know how to route PCI interrupts"

	.comm	_mptable_pci_route_interrupt_handler,4,2 ; @mptable_pci_route_interrupt_handler
l_.str.1:                               ; @.str.1
	.asciz	"unable to route slot %d INT%c\n"

	.comm	_PCI_INVALID_IRQ,4,2            ; @PCI_INVALID_IRQ
	.comm	_bootverbose,8,3                ; @bootverbose
l_.str.2:                               ; @.str.2
	.asciz	"slot %d INT%c routed to irq %d\n"

.subsections_via_symbols
