	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fire_map_msi
_fire_map_msi:                          ## @fire_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%edx, %r12d
	movl	%esi, %ebx
	movl	%edi, %r13d
	callq	_device_get_softc
	movq	%rax, %r15
	movl	%ebx, %edi
	callq	_device_get_ivars
	movq	%rax, %r14
	cmpq	$0, (%rax)
	jle	LBB0_4
## %bb.1:
	movl	(%r15), %eax
	notl	%eax
	testl	%r12d, %eax
	je	LBB0_9
## %bb.2:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_3
LBB0_4:
	movq	_FIRE_MSIX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r15)
	je	LBB0_5
## %bb.6:
	movl	%r12d, %edi
	callq	_fls
	cmpq	8(%r15), %rax
	jle	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
LBB0_3:
	movl	%r13d, %edi
	movl	%r12d, %edx
	callq	_device_printf
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_13
LBB0_5:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_13
LBB0_8:
	cmpq	$0, (%r14)
	jle	LBB0_11
LBB0_9:
	movq	_PCIM_MSICTRL_64BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	je	LBB0_10
LBB0_11:
	addq	$16, %r15
	jmp	LBB0_12
LBB0_10:
	addq	$20, %r15
LBB0_12:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	(%r15), %eax
	movl	%eax, (%rdx)
	movl	%r12d, (%rcx)
	xorl	%eax, %eax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid MSI 0x%x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FIRE_MSIX,4,2                  ## @FIRE_MSIX
	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"invalid MSI-X 0x%x\n"

	.comm	_PCIM_MSICTRL_64BIT,4,2         ## @PCIM_MSICTRL_64BIT
	.no_dead_strip	_fire_map_msi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fire_map_msi
_fire_map_msi:                          ; @fire_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	x19, x2
	mov	x24, x1
	mov	x23, x0
	bl	_device_get_softc
	mov	x22, x0
	mov	x0, x24
	bl	_device_get_ivars
	mov	x24, x0
	ldr	x8, [x0]
	cmp	x8, #1
	b.lt	LBB0_3
; %bb.1:
	ldr	w8, [x22]
	bics	wzr, w19, w8
	b.eq	LBB0_9
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_3:
	ldr	w8, [x22, #4]
Lloh2:
	adrp	x9, _FIRE_MSIX@GOTPAGE
Lloh3:
	ldr	x9, [x9, _FIRE_MSIX@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.4:
	mov	x0, x19
	bl	_fls
	ldr	x8, [x22, #8]
	cmp	x0, x8
	b.le	LBB0_8
; %bb.5:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	mov	x0, x23
	mov	x2, x19
	bl	_device_printf
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	b	LBB0_13
LBB0_7:
Lloh10:
	adrp	x8, _ENXIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	b	LBB0_13
LBB0_8:
	ldr	x8, [x24]
	cmp	x8, #1
	b.lt	LBB0_10
LBB0_9:
	ldr	w8, [x24, #8]
Lloh13:
	adrp	x9, _PCIM_MSICTRL_64BIT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PCIM_MSICTRL_64BIT@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
LBB0_10:
	add	x8, x22, #16
	b	LBB0_12
LBB0_11:
	add	x8, x22, #20
LBB0_12:
	mov	w0, #0
	ldr	w8, [x8]
	str	w8, [x21]
	str	w19, [x20]
LBB0_13:
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid MSI 0x%x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FIRE_MSIX,4,2                  ; @FIRE_MSIX
	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"invalid MSI-X 0x%x\n"

	.comm	_PCIM_MSICTRL_64BIT,4,2         ; @PCIM_MSICTRL_64BIT
	.no_dead_strip	_fire_map_msi
.subsections_via_symbols
