	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv_pcib_route_interrupt
_mv_pcib_route_interrupt:               ## @mv_pcib_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r13d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	%edi, -76(%rbp)                 ## 4-byte Spill
	callq	_device_get_softc
	movq	%rax, %r12
	movl	%r14d, -84(%rbp)
	movl	%r13d, %edi
	callq	_pci_get_bus
	movl	%eax, %ebx
	movq	_OFW_PCI_PHYS_HI_BUSSHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movl	%r13d, %edi
	callq	_pci_get_slot
	movl	%eax, %r15d
	movq	_OFW_PCI_PHYS_HI_DEVICESHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r15d
	orl	%ebx, %r15d
	movl	%r13d, %edi
	callq	_pci_get_function
	movq	_OFW_PCI_PHYS_HI_FUNCTIONSHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%r15d, %eax
	movl	%eax, -72(%rbp)
	movl	%r13d, %edi
	callq	_ofw_bus_get_node
	subq	$8, %rsp
	leaq	-80(%rbp), %rbx
	leaq	-64(%rbp), %r10
	leaq	-72(%rbp), %rdx
	leaq	-84(%rbp), %r8
	movl	%eax, %edi
	movq	%r12, %rsi
	movl	$4, %ecx
	movl	$4, %r9d
	pushq	%rbx
	pushq	$16
	pushq	%r10
	callq	_ofw_bus_lookup_imap
	addq	$32, %rsp
	testl	%eax, %eax
	jle	LBB0_2
## %bb.1:
	movl	-80(%rbp), %esi
	leaq	-64(%rbp), %rcx
	movl	%r13d, %edi
	movl	%eax, %edx
	callq	_ofw_bus_map_intr
	movl	%eax, %r14d
	jmp	LBB0_4
LBB0_2:
	movl	-76(%rbp), %ebx                 ## 4-byte Reload
	cmpl	$4, %r14d
	jg	LBB0_4
## %bb.3:
	movl	%r13d, %edi
	callq	_pci_get_slot
	movl	%eax, %r15d
	movl	%r13d, %edi
	callq	_pci_get_function
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%r14d, %edx
	movl	%r15d, %ecx
	movl	%eax, %r8d
	callq	_device_printf
	movq	_PCI_INVALID_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_OFW_PCI_PHYS_HI_BUSSHIFT,4,2   ## @OFW_PCI_PHYS_HI_BUSSHIFT
	.comm	_OFW_PCI_PHYS_HI_DEVICESHIFT,4,2 ## @OFW_PCI_PHYS_HI_DEVICESHIFT
	.comm	_OFW_PCI_PHYS_HI_FUNCTIONSHIFT,4,2 ## @OFW_PCI_PHYS_HI_FUNCTIONSHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not route pin %d for device %d.%d\n"

	.comm	_PCI_INVALID_IRQ,4,2            ## @PCI_INVALID_IRQ
	.no_dead_strip	_mv_pcib_route_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv_pcib_route_interrupt
_mv_pcib_route_interrupt:               ; @mv_pcib_route_interrupt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	bl	_device_get_softc
	mov	x22, x0
	str	w19, [sp, #12]
	mov	x0, x20
	bl	_pci_get_bus
Lloh3:
	adrp	x8, _OFW_PCI_PHYS_HI_BUSSHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OFW_PCI_PHYS_HI_BUSSHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	w23, w0, w8
	mov	x0, x20
	bl	_pci_get_slot
Lloh6:
	adrp	x8, _OFW_PCI_PHYS_HI_DEVICESHIFT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OFW_PCI_PHYS_HI_DEVICESHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	lsl	w8, w0, w8
	orr	w23, w8, w23
	mov	x0, x20
	bl	_pci_get_function
Lloh9:
	adrp	x8, _OFW_PCI_PHYS_HI_FUNCTIONSHIFT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _OFW_PCI_PHYS_HI_FUNCTIONSHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	lsl	w8, w0, w8
	orr	w8, w23, w8
	str	w8, [sp, #16]
	mov	x0, x20
	bl	_ofw_bus_get_node
	add	x8, sp, #8
	str	x8, [sp]
	add	x2, sp, #16
	add	x4, sp, #12
	add	x6, sp, #24
	mov	x1, x22
	mov	w3, #4
	mov	w5, #4
	mov	w7, #16
	bl	_ofw_bus_lookup_imap
	cmp	w0, #1
	b.lt	LBB0_2
; %bb.1:
	mov	x2, x0
	ldr	w1, [sp, #8]
	add	x3, sp, #24
	mov	x0, x20
	bl	_ofw_bus_map_intr
	mov	x19, x0
	b	LBB0_4
LBB0_2:
	cmp	w19, #4
	b.gt	LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_pci_get_slot
	mov	x22, x0
	mov	x0, x20
	bl	_pci_get_function
	mov	x4, x0
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x19
	mov	x3, x22
	bl	_device_printf
Lloh14:
	adrp	x8, _PCI_INVALID_IRQ@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PCI_INVALID_IRQ@GOTPAGEOFF]
Lloh16:
	ldr	w19, [x8]
LBB0_4:
	ldr	x8, [sp, #40]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_OFW_PCI_PHYS_HI_BUSSHIFT,4,2   ; @OFW_PCI_PHYS_HI_BUSSHIFT
	.comm	_OFW_PCI_PHYS_HI_DEVICESHIFT,4,2 ; @OFW_PCI_PHYS_HI_DEVICESHIFT
	.comm	_OFW_PCI_PHYS_HI_FUNCTIONSHIFT,4,2 ; @OFW_PCI_PHYS_HI_FUNCTIONSHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not route pin %d for device %d.%d\n"

	.comm	_PCI_INVALID_IRQ,4,2            ; @PCI_INVALID_IRQ
	.no_dead_strip	_mv_pcib_route_interrupt
.subsections_via_symbols
