	.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	%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	96(%rdi), %r14
	cmpq	$0, 40(%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), %rcx
	movq	_NETXEN_NIC_MSIX_ENABLED@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	orl	(%rcx), %eax
	notl	%eax
	andl	%eax, 4(%rbx)
	movq	16(%rbx), %rax
	movq	_NX_P3_B0@GOTPCREL(%rip), %rcx
	movq	_legacy_intr@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r12
	cmpq	(%rcx), %rax
	jl	LBB0_5
## %bb.4:
	movq	24(%rbx), %rax
	shlq	$4, %rax
	addq	%rax, %r12
LBB0_5:
	movl	12(%r12), %eax
	movl	%eax, 88(%rbx)
	movl	8(%r12), %esi
	movq	%rbx, %rdi
	callq	_netxen_get_ioaddr
	movq	%rax, 32(%rbx)
	movl	4(%r12), %esi
	movq	%rbx, %rdi
	callq	_netxen_get_ioaddr
	movq	%rax, 80(%rbx)
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_netxen_get_ioaddr
	movq	%rax, 72(%rbx)
	movq	_ISR_INT_VECTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_netxen_get_ioaddr
	movq	%rax, 64(%rbx)
	movq	16(%rbx), %rax
	movq	_NX_P3_B1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_6
## %bb.7:
	movq	_CRB_INT_VECTOR@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_ISR_INT_STATE_REG@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_netxen_get_ioaddr
	movq	%rax, 56(%rbx)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_netxen_set_msix_bit
	cmpq	$0, 48(%rbx)
	je	LBB0_15
## %bb.9:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_netxen_init_msix_entries
	movq	8(%rbx), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_pci_enable_msix
	testl	%eax, %eax
	je	LBB0_10
## %bb.13:
	jle	LBB0_15
## %bb.14:
	movq	%r14, %rdi
	callq	_pci_disable_msix
LBB0_15:
	movq	_use_msi@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_18
## %bb.16:
	movq	%r14, %rdi
	callq	_pci_enable_msi
	testl	%eax, %eax
	je	LBB0_17
LBB0_18:
	leaq	4(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_19
LBB0_10:
	movl	(%r13), %eax
	orl	%eax, 4(%rbx)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_netxen_set_msix_bit
	cmpq	$0, 40(%rbx)
	je	LBB0_12
## %bb.11:
	movl	%r15d, (%rbx)
LBB0_12:
	addq	$4, %r14
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_info                       ## TAILCALL
LBB0_17:
	movq	_NETXEN_NIC_MSI_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
	movq	_msi_tgt_status@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%rbx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	%rbx, %rdi
	callq	_netxen_get_ioaddr
	movq	%rax, 32(%rbx)
	leaq	4(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
LBB0_19:
	callq	_dev_info
	movl	(%r14), %eax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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	_NX_P3_B0,8,3                   ## @NX_P3_B0
	.comm	_legacy_intr,8,3                ## @legacy_intr
	.comm	_ISR_INT_VECTOR,4,2             ## @ISR_INT_VECTOR
	.comm	_NX_P3_B1,8,3                   ## @NX_P3_B1
	.comm	_ISR_INT_STATE_REG,4,2          ## @ISR_INT_STATE_REG
	.comm	_CRB_INT_VECTOR,4,2             ## @CRB_INT_VECTOR
	.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
L_.str.1:                               ## @.str.1
	.asciz	"using msi interrupts\n"

L_.str.2:                               ## @.str.2
	.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	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	x19, x0
	ldr	x20, [x0, #96]
	ldr	x8, [x0, #40]
	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, [x19]
Lloh3:
	adrp	x22, _NETXEN_NIC_MSI_ENABLED@GOTPAGE
Lloh4:
	ldr	x22, [x22, _NETXEN_NIC_MSI_ENABLED@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh5:
	adrp	x23, _NETXEN_NIC_MSIX_ENABLED@GOTPAGE
Lloh6:
	ldr	x23, [x23, _NETXEN_NIC_MSIX_ENABLED@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w8, w9, w8
	ldr	w9, [x19, #4]
	bic	w8, w9, w8
	str	w8, [x19, #4]
Lloh7:
	adrp	x8, _NX_P3_B0@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NX_P3_B0@GOTPAGEOFF]
	ldr	x9, [x19, #16]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x10, _legacy_intr@GOTPAGE
Lloh11:
	ldr	x10, [x10, _legacy_intr@GOTPAGEOFF]
Lloh12:
	ldr	x24, [x10]
	cmp	x9, x8
	b.lt	LBB0_5
; %bb.4:
	ldr	x8, [x19, #24]
	add	x24, x24, x8, lsl #4
LBB0_5:
	ldp	w1, w8, [x24, #8]
	str	w8, [x19, #88]
	mov	x0, x19
	bl	_netxen_get_ioaddr
	str	x0, [x19, #32]
	ldr	w1, [x24, #4]
	mov	x0, x19
	bl	_netxen_get_ioaddr
	str	x0, [x19, #80]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_netxen_get_ioaddr
	str	x0, [x19, #72]
Lloh13:
	adrp	x8, _ISR_INT_VECTOR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ISR_INT_VECTOR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_netxen_get_ioaddr
	str	x0, [x19, #64]
	ldr	x8, [x19, #16]
Lloh16:
	adrp	x9, _NX_P3_B1@GOTPAGE
Lloh17:
	ldr	x9, [x9, _NX_P3_B1@GOTPAGEOFF]
Lloh18:
	adrp	x10, _CRB_INT_VECTOR@GOTPAGE
Lloh19:
	ldr	x10, [x10, _CRB_INT_VECTOR@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
Lloh21:
	adrp	x11, _ISR_INT_STATE_REG@GOTPAGE
Lloh22:
	ldr	x11, [x11, _ISR_INT_STATE_REG@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, lt
	ldr	w1, [x8]
	mov	x0, x19
	bl	_netxen_get_ioaddr
	str	x0, [x19, #56]
	mov	x0, x20
	mov	w1, #0
	bl	_netxen_set_msix_bit
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_9
; %bb.6:
	mov	x0, x19
	mov	x1, x21
	bl	_netxen_init_msix_entries
	ldr	x1, [x19, #8]
	mov	x0, x20
	mov	x2, x21
	bl	_pci_enable_msix
	cbz	w0, LBB0_12
; %bb.7:
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_pci_disable_msix
LBB0_9:
Lloh23:
	adrp	x8, _use_msi@GOTPAGE
Lloh24:
	ldr	x8, [x8, _use_msi@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_pci_enable_msi
	cbz	w0, LBB0_15
LBB0_11:
	add	x0, x20, #4
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_12:
	ldr	w8, [x23]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	mov	x0, x20
	mov	w1, #1
	bl	_netxen_set_msix_bit
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_14
; %bb.13:
	str	w21, [x19]
LBB0_14:
	add	x0, x20, #4
Lloh28:
	adrp	x1, l_.str@PAGE
Lloh29:
	add	x1, x1, l_.str@PAGEOFF
	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
	b	_dev_info
LBB0_15:
	ldr	w8, [x22]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
Lloh30:
	adrp	x8, _msi_tgt_status@GOTPAGE
Lloh31:
	ldr	x8, [x8, _msi_tgt_status@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	ldr	x9, [x19, #24]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x19
	bl	_netxen_get_ioaddr
	str	x0, [x19, #32]
	add	x0, x20, #4
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_16:
	bl	_dev_info
	ldr	w8, [x20]
	ldr	x9, [x19, #8]
	str	w8, [x9]
	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	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.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	_NX_P3_B0,8,3                   ; @NX_P3_B0
	.comm	_legacy_intr,8,3                ; @legacy_intr
	.comm	_ISR_INT_VECTOR,4,2             ; @ISR_INT_VECTOR
	.comm	_NX_P3_B1,8,3                   ; @NX_P3_B1
	.comm	_ISR_INT_STATE_REG,4,2          ; @ISR_INT_STATE_REG
	.comm	_CRB_INT_VECTOR,4,2             ; @CRB_INT_VECTOR
	.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
l_.str.1:                               ; @.str.1
	.asciz	"using msi interrupts\n"

l_.str.2:                               ; @.str.2
	.asciz	"using legacy interrupts\n"

	.no_dead_strip	_netxen_setup_intr
.subsections_via_symbols
