	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qlcnic_enable_msi_legacy
_qlcnic_enable_msi_legacy:              ## @qlcnic_enable_msi_legacy
	.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	%rdi, %rbx
	movq	40(%rdi), %r15
	movq	56(%rdi), %r14
	movq	_qlcnic_use_msi@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_pci_enable_msi
	testl	%eax, %eax
	je	LBB0_10
## %bb.3:
	cmpq	$0, (%r12)
	setne	%al
	testb	%al, %al
	je	LBB0_5
	jmp	LBB0_6
LBB0_1:
	xorl	%eax, %eax
	testb	%al, %al
	jne	LBB0_6
LBB0_5:
	movq	_qlcnic_use_msi_x@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_6
## %bb.7:
	movq	_legacy_intr@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	40(%rbx), %rax
	movq	(%rax), %rcx
	leaq	(%rcx,%rcx,2), %r13
	movl	8(%r12,%r13,4), %ecx
	movl	%ecx, 8(%rax)
	movl	4(%r12,%r13,4), %esi
	movq	%r15, %rdi
	callq	_qlcnic_get_ioaddr
	movq	%rax, 32(%rbx)
	movl	(%r12,%r13,4), %esi
	movq	%r15, %rdi
	callq	_qlcnic_get_ioaddr
	movq	%rax, 24(%rbx)
	movq	_ISR_INT_VECTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_qlcnic_get_ioaddr
	movq	%rax, 16(%rbx)
	movq	_ISR_INT_STATE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_qlcnic_get_ioaddr
	movq	%rax, 8(%rbx)
	leaq	4(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_8
LBB0_6:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_10:
	movq	_QLCNIC_MSI_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 48(%rbx)
	movq	_msi_tgt_status@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	40(%rbx), %rdi
	movq	(%rdi), %rcx
	movl	(%rax,%rcx,4), %esi
	callq	_qlcnic_get_ioaddr
	movq	%rax, 32(%rbx)
	leaq	4(%r14), %rdi
	leaq	L_.str(%rip), %rsi
LBB0_8:
	callq	_dev_info
	movl	(%r14), %eax
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_qlcnic_use_msi,8,3             ## @qlcnic_use_msi
	.comm	_QLCNIC_MSI_ENABLED,4,2         ## @QLCNIC_MSI_ENABLED
	.comm	_msi_tgt_status,8,3             ## @msi_tgt_status
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"using msi interrupts\n"

	.comm	_qlcnic_use_msi_x,8,3           ## @qlcnic_use_msi_x
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_legacy_intr,8,3                ## @legacy_intr
	.comm	_ISR_INT_VECTOR,4,2             ## @ISR_INT_VECTOR
	.comm	_ISR_INT_STATE_REG,4,2          ## @ISR_INT_STATE_REG
L_.str.1:                               ## @.str.1
	.asciz	"using legacy interrupts\n"

	.no_dead_strip	_qlcnic_enable_msi_legacy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qlcnic_enable_msi_legacy
_qlcnic_enable_msi_legacy:              ; @qlcnic_enable_msi_legacy
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x21, [x0, #40]
	ldr	x20, [x0, #56]
Lloh0:
	adrp	x22, _qlcnic_use_msi@GOTPAGE
Lloh1:
	ldr	x22, [x22, _qlcnic_use_msi@GOTPAGEOFF]
	ldr	x8, [x22]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_pci_enable_msi
	cbz	w0, LBB0_7
; %bb.2:
	ldr	x8, [x22]
	cmp	x8, #0
	cset	w8, ne
LBB0_3:
	tbnz	w8, #0, LBB0_6
; %bb.4:
Lloh2:
	adrp	x8, _qlcnic_use_msi_x@GOTPAGE
Lloh3:
	ldr	x8, [x8, _qlcnic_use_msi_x@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbnz	x8, LBB0_6
; %bb.5:
Lloh5:
	adrp	x8, _legacy_intr@GOTPAGE
Lloh6:
	ldr	x8, [x8, _legacy_intr@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x19, #40]
	ldr	x10, [x9]
	mov	w11, #12
	madd	x22, x10, x11, x8
	ldp	w1, w8, [x22, #4]
	str	w8, [x9, #8]
	mov	x0, x21
	bl	_qlcnic_get_ioaddr
	str	x0, [x19, #32]
	ldr	w1, [x22]
	mov	x0, x21
	bl	_qlcnic_get_ioaddr
	str	x0, [x19, #24]
Lloh8:
	adrp	x8, _ISR_INT_VECTOR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ISR_INT_VECTOR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_qlcnic_get_ioaddr
	str	x0, [x19, #16]
Lloh11:
	adrp	x8, _ISR_INT_STATE_REG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ISR_INT_STATE_REG@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_qlcnic_get_ioaddr
	str	x0, [x19, #8]
	add	x0, x20, #4
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_6:
Lloh16:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_7:
Lloh19:
	adrp	x8, _QLCNIC_MSI_ENABLED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _QLCNIC_MSI_ENABLED@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [x19, #48]
	orr	w8, w9, w8
Lloh22:
	adrp	x9, _msi_tgt_status@GOTPAGE
Lloh23:
	ldr	x9, [x9, _msi_tgt_status@GOTPAGEOFF]
	str	w8, [x19, #48]
Lloh24:
	ldr	x8, [x9]
	ldr	x0, [x19, #40]
	ldr	x9, [x0]
	ldr	w1, [x8, x9, lsl #2]
	bl	_qlcnic_get_ioaddr
	str	x0, [x19, #32]
	add	x0, x20, #4
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
LBB0_8:
	bl	_dev_info
	mov	w0, #0
	ldr	w8, [x20]
	ldr	x9, [x19]
	str	w8, [x9]
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_qlcnic_use_msi,8,3             ; @qlcnic_use_msi
	.comm	_QLCNIC_MSI_ENABLED,4,2         ; @QLCNIC_MSI_ENABLED
	.comm	_msi_tgt_status,8,3             ; @msi_tgt_status
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"using msi interrupts\n"

	.comm	_qlcnic_use_msi_x,8,3           ; @qlcnic_use_msi_x
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_legacy_intr,8,3                ; @legacy_intr
	.comm	_ISR_INT_VECTOR,4,2             ; @ISR_INT_VECTOR
	.comm	_ISR_INT_STATE_REG,4,2          ; @ISR_INT_STATE_REG
l_.str.1:                               ; @.str.1
	.asciz	"using legacy interrupts\n"

	.no_dead_strip	_qlcnic_enable_msi_legacy
.subsections_via_symbols
