	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psycho_route_interrupt
_psycho_route_interrupt:                ## @psycho_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r12d
	movl	%edi, %r14d
	callq	_ofw_pci_route_interrupt_common
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_PCI_INTERRUPT_VALID
	testq	%rax, %rax
	jne	LBB0_4
## %bb.1:
	cmpl	$4, %r15d
	jle	LBB0_3
## %bb.2:
	movl	%r15d, %ebx
	jmp	LBB0_4
LBB0_3:
	movl	%r14d, %edi
	callq	_device_get_softc
	movq	%rax, %rbx
	movq	_PSR_PCIA0_INT_MAP@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	%r12d, %edi
	callq	_pci_get_slot
	cltq
	movslq	(%rbx), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	addq	%rax, %rcx
	leaq	-8(,%rcx,8), %rsi
	addq	%r13, %rsi
	movq	%rbx, %rdi
	callq	_PSYCHO_READ8
	movl	%eax, %edi
	callq	_INTINO
                                        ## kill: def $eax killed $eax def $rax
	leal	(%r15,%rax), %ebx
	decl	%ebx
	movl	%r12d, %edi
	callq	_pci_get_slot
	movl	%eax, %r13d
	movl	%r12d, %edi
	callq	_pci_get_function
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%ebx, %edx
	movl	%r13d, %ecx
	movl	%eax, %r8d
	movl	%r15d, %r9d
	callq	_device_printf
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PSR_PCIA0_INT_MAP,8,3          ## @PSR_PCIA0_INT_MAP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"guessing interrupt %d for device %d.%d pin %d\n"

	.no_dead_strip	_psycho_route_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psycho_route_interrupt
_psycho_route_interrupt:                ; @psycho_route_interrupt
	.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	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_ofw_pci_route_interrupt_common
	mov	x22, x0
	bl	_PCI_INTERRUPT_VALID
	cbnz	x0, LBB0_4
; %bb.1:
	cmp	w19, #4
	b.le	LBB0_3
; %bb.2:
	mov	x22, x19
	b	LBB0_4
LBB0_3:
	mov	x0, x20
	bl	_device_get_softc
	mov	x22, x0
Lloh0:
	adrp	x8, _PSR_PCIA0_INT_MAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PSR_PCIA0_INT_MAP@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
	mov	x0, x21
	bl	_pci_get_slot
	ldr	w8, [x22]
	add	w8, w8, w8, lsl #1
	add	w8, w0, w8
	lsl	w8, w8, #3
	sub	w8, w8, #8
	add	x1, x23, w8, sxtw
	mov	x0, x22
	bl	_PSYCHO_READ8
	bl	_INTINO
	add	w8, w19, w0
	sub	w22, w8, #1
	mov	x0, x21
	bl	_pci_get_slot
	mov	x23, x0
	mov	x0, x21
	bl	_pci_get_function
	mov	x4, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	mov	x3, x23
	mov	x5, x19
	bl	_device_printf
LBB0_4:
	mov	x0, x22
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PSR_PCIA0_INT_MAP,8,3          ; @PSR_PCIA0_INT_MAP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"guessing interrupt %d for device %d.%d pin %d\n"

	.no_dead_strip	_psycho_route_interrupt
.subsections_via_symbols
