	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netxen_start_firmware
_netxen_start_firmware:                 ## @netxen_start_firmware
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	24(%rdi), %r15
	callq	_nx_set_dma_mask
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
LBB0_24:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r14, %rdi
	callq	_netxen_can_start_firmware
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	je	LBB0_20
## %bb.4:
	movl	$508, %edi                      ## imm = 0x1FC
	callq	_NETXEN_CAM_RAM
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_NXRD32
	movl	%eax, %r12d
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_netxen_check_hw_init
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_24
LBB0_2:
	movl	%eax, %ebx
	jmp	LBB0_24
LBB0_6:
	movq	%r14, %rdi
	callq	_netxen_request_firmware
	movq	%r14, %rdi
	callq	_netxen_need_fw_reset
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	je	LBB0_18
## %bb.9:
	cmpl	$1431655765, %r12d              ## imm = 0x55555555
	je	LBB0_11
## %bb.10:
	movq	_CRB_CMDPEG_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_NXWR32
	movq	%r14, %rdi
	callq	_netxen_pinit_from_rom
	movl	$1, %edi
	callq	_msleep
LBB0_11:
	movq	_CRB_DMA_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$1431655765, %edx               ## imm = 0x55555555
	callq	_NXWR32
	movq	_NETXEN_PEG_HALT_STATUS1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_NXWR32
	movq	_NETXEN_PEG_HALT_STATUS2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_NXWR32
	movl	16(%r14), %edi
	callq	_NX_IS_REVISION_P3
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_netxen_set_port_mode
LBB0_13:
	movq	%r14, %rdi
	callq	_netxen_load_firmware
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.14:
	movq	%r14, %rdi
	callq	_netxen_release_firmware
	movl	16(%r14), %edi
	callq	_NX_IS_REVISION_P2
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	8(%r14), %rax
	movq	_NETXEN_NIC_XGBE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	$251688532, %eax                ## imm = 0xF007654
	movl	$30292, %edx                    ## imm = 0x7654
	cmovel	%eax, %edx
	movq	_NETXEN_MAC_ADDR_CNTL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_NXWR32
LBB0_16:
	movq	%r14, %rdi
	callq	_netxen_init_dummy_dma
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.17:
	movq	__NETXEN_NIC_LINUX_MAJOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$16, %eax
	movq	__NETXEN_NIC_LINUX_MINOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	shll	$8, %edx
	orl	%eax, %edx
	movq	__NETXEN_NIC_LINUX_SUBVERSION@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_CRB_DRIVER_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_NXWR32
LBB0_18:
	movl	16(%r14), %edi
	callq	_NX_IS_REVISION_P3
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	movq	%r14, %rdi
	callq	_netxen_pcie_strap_init
LBB0_20:
	movq	_NETXEN_NIC_PEG_TUNE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_netxen_phantom_init
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_netxen_free_dummy_dma
	jmp	LBB0_23
LBB0_22:
	movq	_NX_CRB_DEV_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NX_DEV_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_NXWR32
	movq	%r14, %rdi
	callq	_nx_update_dma_mask
	movq	%r14, %rdi
	callq	_netxen_check_options
	movq	$0, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_23
LBB0_7:
	movl	%eax, %ebx
LBB0_23:
	movq	%r14, %rdi
	callq	_netxen_release_firmware
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error in init HW init sequence\n"

	.comm	_CRB_CMDPEG_STATE,4,2           ## @CRB_CMDPEG_STATE
	.comm	_CRB_DMA_SHIFT,4,2              ## @CRB_DMA_SHIFT
	.comm	_NETXEN_PEG_HALT_STATUS1,4,2    ## @NETXEN_PEG_HALT_STATUS1
	.comm	_NETXEN_PEG_HALT_STATUS2,4,2    ## @NETXEN_PEG_HALT_STATUS2
	.comm	_NETXEN_NIC_XGBE,8,3            ## @NETXEN_NIC_XGBE
	.comm	_NETXEN_MAC_ADDR_CNTL_REG,4,2   ## @NETXEN_MAC_ADDR_CNTL_REG
	.comm	__NETXEN_NIC_LINUX_MAJOR,4,2    ## @_NETXEN_NIC_LINUX_MAJOR
	.comm	__NETXEN_NIC_LINUX_MINOR,4,2    ## @_NETXEN_NIC_LINUX_MINOR
	.comm	__NETXEN_NIC_LINUX_SUBVERSION,4,2 ## @_NETXEN_NIC_LINUX_SUBVERSION
	.comm	_CRB_DRIVER_VERSION,4,2         ## @CRB_DRIVER_VERSION
	.comm	_NETXEN_NIC_PEG_TUNE,4,2        ## @NETXEN_NIC_PEG_TUNE
	.comm	_NX_CRB_DEV_STATE,4,2           ## @NX_CRB_DEV_STATE
	.comm	_NX_DEV_READY,4,2               ## @NX_DEV_READY
	.no_dead_strip	_netxen_start_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netxen_start_firmware
_netxen_start_firmware:                 ; @netxen_start_firmware
	.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, #24]
	bl	_nx_set_dma_mask
	mov	x20, x0
	cbz	w0, LBB0_2
LBB0_1:
	mov	x0, x20
	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
LBB0_2:
	mov	x0, x19
	bl	_netxen_can_start_firmware
	mov	x20, x0
	tbnz	w0, #31, LBB0_1
; %bb.3:
	cbz	w20, LBB0_19
; %bb.4:
	mov	w0, #508
	bl	_NETXEN_CAM_RAM
	mov	x1, x0
	mov	x0, x19
	bl	_NXRD32
	mov	x22, x0
	mov	x0, x19
	mov	x1, x22
	bl	_netxen_check_hw_init
	cbz	w0, LBB0_6
; %bb.5:
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_1
LBB0_6:
	mov	x0, x19
	bl	_netxen_request_firmware
	mov	x0, x19
	bl	_netxen_need_fw_reset
	mov	x20, x0
	tbnz	w0, #31, LBB0_22
; %bb.7:
	cbz	w20, LBB0_17
; %bb.8:
	mov	w8, #1431655765
	cmp	w22, w8
	b.eq	LBB0_10
; %bb.9:
Lloh2:
	adrp	x8, _CRB_CMDPEG_STATE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CRB_CMDPEG_STATE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_NXWR32
	mov	x0, x19
	bl	_netxen_pinit_from_rom
	mov	w0, #1
	bl	_msleep
LBB0_10:
Lloh5:
	adrp	x8, _CRB_DMA_SHIFT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CRB_DMA_SHIFT@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1431655765
	bl	_NXWR32
Lloh8:
	adrp	x8, _NETXEN_PEG_HALT_STATUS1@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NETXEN_PEG_HALT_STATUS1@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_NXWR32
Lloh11:
	adrp	x8, _NETXEN_PEG_HALT_STATUS2@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NETXEN_PEG_HALT_STATUS2@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_NXWR32
	ldr	w0, [x19, #16]
	bl	_NX_IS_REVISION_P3
	cbz	x0, LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_netxen_set_port_mode
LBB0_12:
	mov	x0, x19
	bl	_netxen_load_firmware
	mov	x20, x0
	cbnz	w0, LBB0_22
; %bb.13:
	mov	x0, x19
	bl	_netxen_release_firmware
	ldr	w0, [x19, #16]
	bl	_NX_IS_REVISION_P2
	cbz	x0, LBB0_15
; %bb.14:
	ldr	x8, [x19, #8]
Lloh14:
	adrp	x9, _NETXEN_NIC_XGBE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _NETXEN_NIC_XGBE@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	mov	w8, #30292
	mov	w9, #30292
	movk	w9, #3840, lsl #16
	csel	w2, w9, w8, eq
Lloh17:
	adrp	x8, _NETXEN_MAC_ADDR_CNTL_REG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _NETXEN_MAC_ADDR_CNTL_REG@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_NXWR32
LBB0_15:
	mov	x0, x19
	bl	_netxen_init_dummy_dma
	mov	x20, x0
	cbnz	w0, LBB0_22
; %bb.16:
Lloh20:
	adrp	x8, __NETXEN_NIC_LINUX_MAJOR@GOTPAGE
Lloh21:
	ldr	x8, [x8, __NETXEN_NIC_LINUX_MAJOR@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, __NETXEN_NIC_LINUX_MINOR@GOTPAGE
Lloh24:
	ldr	x9, [x9, __NETXEN_NIC_LINUX_MINOR@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	lsl	w9, w9, #8
Lloh26:
	adrp	x10, __NETXEN_NIC_LINUX_SUBVERSION@GOTPAGE
Lloh27:
	ldr	x10, [x10, __NETXEN_NIC_LINUX_SUBVERSION@GOTPAGEOFF]
	orr	w8, w9, w8, lsl #16
Lloh28:
	ldr	w9, [x10]
	orr	w2, w8, w9
Lloh29:
	adrp	x8, _CRB_DRIVER_VERSION@GOTPAGE
Lloh30:
	ldr	x8, [x8, _CRB_DRIVER_VERSION@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_NXWR32
LBB0_17:
	ldr	w0, [x19, #16]
	bl	_NX_IS_REVISION_P3
	cbz	x0, LBB0_19
; %bb.18:
	mov	x0, x19
	bl	_netxen_pcie_strap_init
LBB0_19:
Lloh32:
	adrp	x8, _NETXEN_NIC_PEG_TUNE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _NETXEN_NIC_PEG_TUNE@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_netxen_phantom_init
	mov	x20, x0
	cbz	w0, LBB0_21
; %bb.20:
	mov	x0, x19
	bl	_netxen_free_dummy_dma
	b	LBB0_22
LBB0_21:
Lloh35:
	adrp	x8, _NX_CRB_DEV_STATE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _NX_CRB_DEV_STATE@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
Lloh38:
	adrp	x8, _NX_DEV_READY@GOTPAGE
Lloh39:
	ldr	x8, [x8, _NX_DEV_READY@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_NXWR32
	mov	x0, x19
	bl	_nx_update_dma_mask
	mov	x0, x19
	bl	_netxen_check_options
	str	xzr, [x19]
LBB0_22:
	mov	x0, x19
	bl	_netxen_release_firmware
	b	LBB0_1
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error in init HW init sequence\n"

	.comm	_CRB_CMDPEG_STATE,4,2           ; @CRB_CMDPEG_STATE
	.comm	_CRB_DMA_SHIFT,4,2              ; @CRB_DMA_SHIFT
	.comm	_NETXEN_PEG_HALT_STATUS1,4,2    ; @NETXEN_PEG_HALT_STATUS1
	.comm	_NETXEN_PEG_HALT_STATUS2,4,2    ; @NETXEN_PEG_HALT_STATUS2
	.comm	_NETXEN_NIC_XGBE,8,3            ; @NETXEN_NIC_XGBE
	.comm	_NETXEN_MAC_ADDR_CNTL_REG,4,2   ; @NETXEN_MAC_ADDR_CNTL_REG
	.comm	__NETXEN_NIC_LINUX_MAJOR,4,2    ; @_NETXEN_NIC_LINUX_MAJOR
	.comm	__NETXEN_NIC_LINUX_MINOR,4,2    ; @_NETXEN_NIC_LINUX_MINOR
	.comm	__NETXEN_NIC_LINUX_SUBVERSION,4,2 ; @_NETXEN_NIC_LINUX_SUBVERSION
	.comm	_CRB_DRIVER_VERSION,4,2         ; @CRB_DRIVER_VERSION
	.comm	_NETXEN_NIC_PEG_TUNE,4,2        ; @NETXEN_NIC_PEG_TUNE
	.comm	_NX_CRB_DEV_STATE,4,2           ; @NX_CRB_DEV_STATE
	.comm	_NX_DEV_READY,4,2               ; @NX_DEV_READY
	.no_dead_strip	_netxen_start_firmware
.subsections_via_symbols
