	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function al_msix_map_msi
_al_msix_map_msi:                       ## @al_msix_map_msi
	.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
	movq	%r8, %r14
	movq	%rcx, %r15
	movq	%rdx, %rbx
	movl	%edi, %r13d
	callq	_device_get_softc
	movq	%rax, %r12
	movl	%r13d, %edi
	movq	%rbx, %rsi
	callq	_al_find_intr_pos_in_map
                                        ## kill: def $eax killed $eax def $rax
	movq	_ERR_NOT_IN_MAP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_5
LBB0_2:
	addl	(%r12), %eax
	movq	8(%r12), %rcx
	leal	(,%rax,8), %edx
	movslq	%edx, %rdx
	addq	%rdx, %rcx
	addq	$65536, %rcx                    ## imm = 0x10000
	movq	%rcx, (%r15)
	movl	$0, (%r14)
	movq	_bootverbose@GOTPCREL(%rip), %rdx
	cmpq	$0, (%rdx)
	je	LBB0_3
## %bb.4:
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movl	%r13d, %edi
	movl	%eax, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%r8d, %r8d
	callq	_device_printf
	jmp	LBB0_5
LBB0_3:
	xorl	%r14d, %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERR_NOT_IN_MAP,4,2             ## @ERR_NOT_IN_MAP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_bootverbose,8,3                ## @bootverbose
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MSI mapping: SPI: %d addr: %jx data: %x\n"

	.no_dead_strip	_al_msix_map_msi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function al_msix_map_msi
_al_msix_map_msi:                       ; @al_msix_map_msi
	.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	x20, x4
	mov	x21, x3
	mov	x23, x2
	mov	x19, x0
	bl	_device_get_softc
	mov	x22, x0
	mov	x0, x19
	mov	x1, x23
	bl	_al_find_intr_pos_in_map
Lloh0:
	adrp	x8, _ERR_NOT_IN_MAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERR_NOT_IN_MAP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_2:
	ldr	w8, [x22]
	add	w2, w8, w0
	ldr	x8, [x22, #8]
	lsl	w9, w2, #3
	add	w9, w9, #16, lsl #12            ; =65536
	add	x3, x8, w9, sxtw
	str	x3, [x21]
	str	wzr, [x20]
Lloh6:
	adrp	x8, _bootverbose@GOTPAGE
Lloh7:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w3 killed $w3 killed $x3
	mov	w4, #0
	bl	_device_printf
LBB0_4:
	mov	w0, #0
LBB0_5:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ERR_NOT_IN_MAP,4,2             ; @ERR_NOT_IN_MAP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_bootverbose,8,3                ; @bootverbose
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MSI mapping: SPI: %d addr: %jx data: %x\n"

	.no_dead_strip	_al_msix_map_msi
.subsections_via_symbols
