	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netxen_setup_intr
_netxen_setup_intr:                     ## @netxen_setup_intr
	.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	24(%rdi), %r14
	cmpq	$0, 16(%rdi)
	je	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	callq	_num_online_cpus
	movq	_MSIX_ENTRIES_PER_ADAPTER@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	movl	$2, %r15d
	cmovgel	%ecx, %r15d
	jmp	LBB0_3
LBB0_1:
	movl	$1, %r15d
LBB0_3:
	movl	$1, (%rbx)
	movq	_NETXEN_NIC_MSI_ENABLED@GOTPCREL(%rip), %rax
	movq	_NETXEN_NIC_MSIX_ENABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, 4(%rbx)
	movq	%rbx, %rdi
	callq	_netxen_initialize_interrupt_registers
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_netxen_set_msix_bit
	movq	%r14, %rdi
	callq	_netxen_function_zero
	movq	%rbx, %rdi
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movl	%r15d, %esi
	callq	_netxen_setup_msi_interrupts
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:
	movq	_NETXEN_MSI_MODE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_10:
	callq	_netxen_get_interrupt_mode
	movq	_NETXEN_MSI_MODE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.11:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_netxen_setup_msi_interrupts
	testq	%rax, %rax
	je	LBB0_8
## %bb.12:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_13
LBB0_5:
	movq	_NETXEN_INTX_MODE@GOTPCREL(%rip), %rax
LBB0_7:
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	callq	_netxen_set_interrupt_mode
LBB0_8:
	movq	%rbx, %rdi
	callq	_NETXEN_IS_MSI_FAMILY
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.9:
	movl	4(%r14), %eax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
LBB0_13:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSIX_ENTRIES_PER_ADAPTER,8,3   ## @MSIX_ENTRIES_PER_ADAPTER
	.comm	_NETXEN_NIC_MSI_ENABLED,4,2     ## @NETXEN_NIC_MSI_ENABLED
	.comm	_NETXEN_NIC_MSIX_ENABLED,4,2    ## @NETXEN_NIC_MSIX_ENABLED
	.comm	_NETXEN_MSI_MODE,8,3            ## @NETXEN_MSI_MODE
	.comm	_NETXEN_INTX_MODE,8,3           ## @NETXEN_INTX_MODE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Co-existence of MSI-X/MSI and INTx interrupts is not supported\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"using legacy interrupts\n"

	.no_dead_strip	_netxen_setup_intr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netxen_setup_intr
_netxen_setup_intr:                     ; @netxen_setup_intr
	.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, #16]
	mov	w22, #1
	cbz	x8, LBB0_2
; %bb.1:
	bl	_num_online_cpus
Lloh0:
	adrp	x8, _MSIX_ENTRIES_PER_ADAPTER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSIX_ENTRIES_PER_ADAPTER@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	mov	w9, #2
	csel	w21, w9, w8, lt
	b	LBB0_3
LBB0_2:
	mov	w21, #1
LBB0_3:
	str	w22, [x20]
Lloh3:
	adrp	x8, _NETXEN_NIC_MSI_ENABLED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NETXEN_NIC_MSI_ENABLED@GOTPAGEOFF]
Lloh5:
	adrp	x9, _NETXEN_NIC_MSIX_ENABLED@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NETXEN_NIC_MSIX_ENABLED@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x20, #4]
	bic	w8, w9, w8
	str	w8, [x20, #4]
	mov	x0, x20
	bl	_netxen_initialize_interrupt_registers
	mov	x0, x19
	mov	w1, #0
	bl	_netxen_set_msix_bit
	mov	x0, x19
	bl	_netxen_function_zero
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x20
	mov	x1, x21
	bl	_netxen_setup_msi_interrupts
Lloh9:
	adrp	x8, _NETXEN_MSI_MODE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NETXEN_MSI_MODE@GOTPAGEOFF]
Lloh11:
	adrp	x9, _NETXEN_INTX_MODE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _NETXEN_INTX_MODE@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	x1, [x8]
	mov	x0, x20
	bl	_netxen_set_interrupt_mode
	b	LBB0_8
LBB0_5:
	mov	x0, x20
	bl	_netxen_get_interrupt_mode
Lloh13:
	adrp	x8, _NETXEN_MSI_MODE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _NETXEN_MSI_MODE@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.6:
	mov	x0, x20
	mov	x1, x21
	bl	_netxen_setup_msi_interrupts
	cbz	x0, LBB0_8
; %bb.7:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_8:
	mov	x0, x20
	bl	_NETXEN_IS_MSI_FAMILY
	cbnz	w0, LBB0_10
; %bb.9:
	ldr	w8, [x19, #4]
	ldr	x9, [x20, #8]
	str	w8, [x9]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_info
LBB0_10:
	mov	w0, #0
LBB0_11:
	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 AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MSIX_ENTRIES_PER_ADAPTER,8,3   ; @MSIX_ENTRIES_PER_ADAPTER
	.comm	_NETXEN_NIC_MSI_ENABLED,4,2     ; @NETXEN_NIC_MSI_ENABLED
	.comm	_NETXEN_NIC_MSIX_ENABLED,4,2    ; @NETXEN_NIC_MSIX_ENABLED
	.comm	_NETXEN_MSI_MODE,8,3            ; @NETXEN_MSI_MODE
	.comm	_NETXEN_INTX_MODE,8,3           ; @NETXEN_INTX_MODE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Co-existence of MSI-X/MSI and INTx interrupts is not supported\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"using legacy interrupts\n"

	.no_dead_strip	_netxen_setup_intr
.subsections_via_symbols
