	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netxen_setup_msi_interrupts
_netxen_setup_msi_interrupts:           ## @netxen_setup_msi_interrupts
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	48(%rdi), %r14
	cmpq	$0, 40(%rdi)
	je	LBB0_6
## %bb.1:
	movl	%esi, %r15d
	movq	%rbx, %rdi
	callq	_netxen_init_msix_entries
	movq	8(%rbx), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	movl	%r15d, %ecx
	callq	_pci_enable_msix_range
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	movq	_NETXEN_NIC_MSIX_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 20(%rbx)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_netxen_set_msix_bit
	cmpq	$0, 32(%rbx)
	je	LBB0_4
## %bb.3:
	movl	%r15d, (%rbx)
LBB0_4:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_6:
	movq	_use_msi@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.7:
	movq	%r14, %rdi
	callq	_pci_enable_msi
	testl	%eax, %eax
	je	LBB0_8
LBB0_9:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_8:
	movq	_msi_tgt_status@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%rbx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	_NETXEN_NIC_MSI_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 20(%rbx)
	movq	%rbx, %rdi
	callq	_netxen_get_ioaddr
	movl	%eax, 16(%rbx)
	movl	4(%r14), %eax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
	leaq	L_.str.1(%rip), %rsi
LBB0_5:
	movq	%r14, %rdi
	callq	_dev_info
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NETXEN_NIC_MSIX_ENABLED,4,2    ## @NETXEN_NIC_MSIX_ENABLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"using msi-x interrupts\n"

	.comm	_use_msi,8,3                    ## @use_msi
	.comm	_msi_tgt_status,8,3             ## @msi_tgt_status
	.comm	_NETXEN_NIC_MSI_ENABLED,4,2     ## @NETXEN_NIC_MSI_ENABLED
L_.str.1:                               ## @.str.1
	.asciz	"using msi interrupts\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to acquire MSI-X/MSI interrupt vector\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_netxen_setup_msi_interrupts
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netxen_setup_msi_interrupts
_netxen_setup_msi_interrupts:           ; @netxen_setup_msi_interrupts
	.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	x20, x0
	ldp	x8, x19, [x0, #40]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x21, x1
	mov	x0, x20
	bl	_netxen_init_msix_entries
	ldr	x1, [x20, #8]
	mov	x0, x19
	mov	x2, x21
	mov	x3, x21
	bl	_pci_enable_msix_range
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _NETXEN_NIC_MSIX_ENABLED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NETXEN_NIC_MSIX_ENABLED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x20, #20]
	orr	w8, w9, w8
	str	w8, [x20, #20]
	mov	x0, x19
	mov	w1, #1
	bl	_netxen_set_msix_bit
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_4
; %bb.3:
	str	w21, [x20]
LBB0_4:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_5:
Lloh5:
	adrp	x8, _use_msi@GOTPAGE
Lloh6:
	ldr	x8, [x8, _use_msi@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_pci_enable_msi
	cbz	w0, LBB0_8
LBB0_7:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_8:
Lloh13:
	adrp	x8, _msi_tgt_status@GOTPAGE
Lloh14:
	ldr	x8, [x8, _msi_tgt_status@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	ldr	x9, [x20, #24]
	ldr	w1, [x8, x9, lsl #2]
Lloh16:
	adrp	x8, _NETXEN_NIC_MSI_ENABLED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NETXEN_NIC_MSI_ENABLED@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	w9, [x20, #20]
	orr	w8, w9, w8
	str	w8, [x20, #20]
	mov	x0, x20
	bl	_netxen_get_ioaddr
	str	w0, [x20, #16]
	ldr	w8, [x19, #4]
	ldr	x9, [x20, #8]
	str	w8, [x9]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_9:
	mov	x0, x19
	bl	_dev_info
	mov	w0, #0
LBB0_10:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_NETXEN_NIC_MSIX_ENABLED,4,2    ; @NETXEN_NIC_MSIX_ENABLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"using msi-x interrupts\n"

	.comm	_use_msi,8,3                    ; @use_msi
	.comm	_msi_tgt_status,8,3             ; @msi_tgt_status
	.comm	_NETXEN_NIC_MSI_ENABLED,4,2     ; @NETXEN_NIC_MSI_ENABLED
l_.str.1:                               ; @.str.1
	.asciz	"using msi interrupts\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to acquire MSI-X/MSI interrupt vector\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_netxen_setup_msi_interrupts
.subsections_via_symbols
