	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netxen_check_health
_netxen_check_health:                   ## @netxen_check_health
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	48(%rdi), %r15
	movq	_NX_CRB_DEV_STATE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	callq	_NXRD32
	movq	%rax, %rbx
	movq	_NX_DEV_NEED_AER@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	cmpq	(%rax), %rbx
	je	LBB0_17
## %bb.1:
	movq	%r13, %rdi
	callq	_netxen_nic_check_temp
	testq	%rax, %rax
	je	LBB0_2
LBB0_14:
	movq	_auto_fw_reset@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_AUTO_FW_RESET_ENABLED@GOTPCREL(%rip), %rcx
	movl	$1, %r14d
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.15:
	movq	___NX_RESETTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%r13), %rsi
	callq	_test_and_set_bit
	testl	%eax, %eax
	jne	LBB0_17
## %bb.16:
	movq	_netxen_detach_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_netxen_schedule_work
	jmp	LBB0_17
LBB0_2:
	cmpl	$0, (%r13)
	je	LBB0_4
## %bb.3:
	movq	%r13, %rdi
	callq	_nx_dev_request_reset
	testq	%rax, %rax
	jne	LBB0_17
	jmp	LBB0_14
LBB0_4:
	movq	_NX_DEV_NEED_RESET@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_6
## %bb.5:
	movq	_NX_DEV_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_7
LBB0_6:
	movl	$1, (%r13)
	movl	40(%r13), %edi
	callq	_NX_IS_REVISION_P2
	testq	%rax, %rax
	jne	LBB0_14
LBB0_7:
	movl	40(%r13), %edi
	callq	_NX_IS_REVISION_P2
	testq	%rax, %rax
	je	LBB0_8
LBB0_17:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_NETXEN_PEG_ALIVE_COUNTER@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r13, %rdi
	callq	_NXRD32
	cmpq	8(%r13), %rax
	jne	LBB0_9
## %bb.10:
	movq	16(%r13), %rax
	incq	%rax
	movq	%rax, 16(%r13)
	movq	_FW_FAIL_THRESH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_17
## %bb.11:
	movq	%r13, %rdi
	callq	_nx_dev_request_reset
	testq	%rax, %rax
	jne	LBB0_17
## %bb.12:
	movq	___NX_FW_ATTACHED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%r13), %rsi
	callq	_clear_bit
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_NETXEN_PEG_HALT_STATUS1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r13, %rdi
	callq	_NXRD32
	movq	%rax, %r15
	movq	32(%r13), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_NETXEN_PEG_HALT_STATUS2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r13, %rdi
	callq	_NXRD32
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_NETXEN_CRB_PEG_NET_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	$60, %rsi
	movq	%r13, %rdi
	callq	_NXRD32
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_NETXEN_CRB_PEG_NET_1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	$60, %rsi
	movq	%r13, %rdi
	callq	_NXRD32
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_NETXEN_CRB_PEG_NET_2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	$60, %rsi
	movq	%r13, %rdi
	callq	_NXRD32
	movq	%rax, %r12
	movq	_NETXEN_CRB_PEG_NET_3@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	$60, %rsi
	movq	%r13, %rdi
	callq	_NXRD32
	movq	%rax, %r14
	movq	_NETXEN_CRB_PEG_NET_4@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	$60, %rsi
	movq	%r13, %rdi
	callq	_NXRD32
	movq	%rax, %rbx
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rdx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	xorl	%eax, %eax
	pushq	%rbx
	pushq	%r14
	pushq	%r12
	callq	_dev_err
	addq	$32, %rsp
	movq	%r15, %rdi
	callq	_NX_FWERROR_PEGSTAT1
	cmpl	$103, %eax
	jne	LBB0_14
## %bb.13:
	movq	32(%r13), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_14
LBB0_9:
	movq	%rax, 8(%r13)
	movq	$0, 16(%r13)
	cmpl	$0, (%r13)
	jne	LBB0_14
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_NX_CRB_DEV_STATE,8,3           ## @NX_CRB_DEV_STATE
	.comm	_NX_DEV_NEED_AER,8,3            ## @NX_DEV_NEED_AER
	.comm	_NX_DEV_NEED_RESET,8,3          ## @NX_DEV_NEED_RESET
	.comm	_NX_DEV_FAILED,8,3              ## @NX_DEV_FAILED
	.comm	_NETXEN_PEG_ALIVE_COUNTER,8,3   ## @NETXEN_PEG_ALIVE_COUNTER
	.comm	_FW_FAIL_THRESH,8,3             ## @FW_FAIL_THRESH
	.comm	___NX_FW_ATTACHED,4,2           ## @__NX_FW_ATTACHED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"firmware hang detected\n"

	.comm	_NETXEN_PEG_HALT_STATUS1,8,3    ## @NETXEN_PEG_HALT_STATUS1
L_.str.1:                               ## @.str.1
	.asciz	"Dumping hw/fw registers\nPEG_HALT_STATUS1: 0x%x, PEG_HALT_STATUS2: 0x%x,\nPEG_NET_0_PC: 0x%x, PEG_NET_1_PC: 0x%x,\nPEG_NET_2_PC: 0x%x, PEG_NET_3_PC: 0x%x,\nPEG_NET_4_PC: 0x%x\n"

	.comm	_NETXEN_PEG_HALT_STATUS2,8,3    ## @NETXEN_PEG_HALT_STATUS2
	.comm	_NETXEN_CRB_PEG_NET_0,8,3       ## @NETXEN_CRB_PEG_NET_0
	.comm	_NETXEN_CRB_PEG_NET_1,8,3       ## @NETXEN_CRB_PEG_NET_1
	.comm	_NETXEN_CRB_PEG_NET_2,8,3       ## @NETXEN_CRB_PEG_NET_2
	.comm	_NETXEN_CRB_PEG_NET_3,8,3       ## @NETXEN_CRB_PEG_NET_3
	.comm	_NETXEN_CRB_PEG_NET_4,8,3       ## @NETXEN_CRB_PEG_NET_4
L_.str.2:                               ## @.str.2
	.asciz	"Firmware aborted with error code 0x00006700. Device is being reset.\n"

	.comm	_auto_fw_reset,8,3              ## @auto_fw_reset
	.comm	_AUTO_FW_RESET_ENABLED,8,3      ## @AUTO_FW_RESET_ENABLED
	.comm	___NX_RESETTING,4,2             ## @__NX_RESETTING
	.comm	_netxen_detach_work,4,2         ## @netxen_detach_work
	.no_dead_strip	_netxen_check_health
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netxen_check_health
_netxen_check_health:                   ; @netxen_check_health
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x20, [x0, #48]
Lloh0:
	adrp	x8, _NX_CRB_DEV_STATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NX_CRB_DEV_STATE@GOTPAGEOFF]
Lloh2:
	ldr	x1, [x8]
	bl	_NXRD32
Lloh3:
	adrp	x8, _NX_DEV_NEED_AER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NX_DEV_NEED_AER@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_7
LBB0_2:
	mov	x21, x0
	mov	x0, x19
	bl	_netxen_nic_check_temp
	cbz	x0, LBB0_8
LBB0_3:
Lloh6:
	adrp	x8, _auto_fw_reset@GOTPAGE
Lloh7:
	ldr	x8, [x8, _auto_fw_reset@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _AUTO_FW_RESET_ENABLED@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AUTO_FW_RESET_ENABLED@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
Lloh12:
	adrp	x8, ___NX_RESETTING@GOTPAGE
Lloh13:
	ldr	x8, [x8, ___NX_RESETTING@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	add	x1, x19, #24
	bl	_test_and_set_bit
	cbnz	w0, LBB0_6
; %bb.5:
Lloh15:
	adrp	x8, _netxen_detach_work@GOTPAGE
Lloh16:
	ldr	x8, [x8, _netxen_detach_work@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_netxen_schedule_work
LBB0_6:
	mov	w0, #1
LBB0_7:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_8:
	ldr	w8, [x19]
	cbz	w8, LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_nx_dev_request_reset
	cbnz	x0, LBB0_1
	b	LBB0_3
LBB0_10:
Lloh18:
	adrp	x8, _NX_DEV_NEED_RESET@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NX_DEV_NEED_RESET@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
Lloh21:
	adrp	x9, _NX_DEV_FAILED@GOTPAGE
Lloh22:
	ldr	x9, [x9, _NX_DEV_FAILED@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x21, x8
	ccmp	x21, x9, #4, ne
	b.ne	LBB0_12
; %bb.11:
	mov	w8, #1
	str	w8, [x19]
	ldr	w0, [x19, #40]
	bl	_NX_IS_REVISION_P2
	cbnz	x0, LBB0_3
LBB0_12:
	ldr	w0, [x19, #40]
	bl	_NX_IS_REVISION_P2
	cbnz	x0, LBB0_1
; %bb.13:
Lloh24:
	adrp	x8, _NETXEN_PEG_ALIVE_COUNTER@GOTPAGE
Lloh25:
	ldr	x8, [x8, _NETXEN_PEG_ALIVE_COUNTER@GOTPAGEOFF]
Lloh26:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_NXRD32
	ldr	x8, [x19, #8]
	cmp	x0, x8
	b.ne	LBB0_18
; %bb.14:
	ldr	x8, [x19, #16]
	add	x8, x8, #1
	str	x8, [x19, #16]
Lloh27:
	adrp	x9, _FW_FAIL_THRESH@GOTPAGE
Lloh28:
	ldr	x9, [x9, _FW_FAIL_THRESH@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_1
; %bb.15:
	mov	x0, x19
	bl	_nx_dev_request_reset
	cbnz	x0, LBB0_1
; %bb.16:
Lloh30:
	adrp	x8, ___NX_FW_ATTACHED@GOTPAGE
Lloh31:
	ldr	x8, [x8, ___NX_FW_ATTACHED@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	add	x1, x19, #24
	bl	_clear_bit
Lloh33:
	adrp	x1, l_.str@PAGE
Lloh34:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh35:
	adrp	x8, _NETXEN_PEG_HALT_STATUS1@GOTPAGE
Lloh36:
	ldr	x8, [x8, _NETXEN_PEG_HALT_STATUS1@GOTPAGEOFF]
Lloh37:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_NXRD32
	mov	x20, x0
	ldr	x21, [x19, #32]
Lloh38:
	adrp	x8, _NETXEN_PEG_HALT_STATUS2@GOTPAGE
Lloh39:
	ldr	x8, [x8, _NETXEN_PEG_HALT_STATUS2@GOTPAGEOFF]
Lloh40:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_NXRD32
	mov	x22, x0
Lloh41:
	adrp	x8, _NETXEN_CRB_PEG_NET_0@GOTPAGE
Lloh42:
	ldr	x8, [x8, _NETXEN_CRB_PEG_NET_0@GOTPAGEOFF]
Lloh43:
	ldr	x8, [x8]
	add	x1, x8, #60
	mov	x0, x19
	bl	_NXRD32
	mov	x23, x0
Lloh44:
	adrp	x8, _NETXEN_CRB_PEG_NET_1@GOTPAGE
Lloh45:
	ldr	x8, [x8, _NETXEN_CRB_PEG_NET_1@GOTPAGEOFF]
Lloh46:
	ldr	x8, [x8]
	add	x1, x8, #60
	mov	x0, x19
	bl	_NXRD32
	mov	x24, x0
Lloh47:
	adrp	x8, _NETXEN_CRB_PEG_NET_2@GOTPAGE
Lloh48:
	ldr	x8, [x8, _NETXEN_CRB_PEG_NET_2@GOTPAGEOFF]
Lloh49:
	ldr	x8, [x8]
	add	x1, x8, #60
	mov	x0, x19
	bl	_NXRD32
	mov	x25, x0
Lloh50:
	adrp	x8, _NETXEN_CRB_PEG_NET_3@GOTPAGE
Lloh51:
	ldr	x8, [x8, _NETXEN_CRB_PEG_NET_3@GOTPAGEOFF]
Lloh52:
	ldr	x8, [x8]
	add	x1, x8, #60
	mov	x0, x19
	bl	_NXRD32
	mov	x26, x0
Lloh53:
	adrp	x8, _NETXEN_CRB_PEG_NET_4@GOTPAGE
Lloh54:
	ldr	x8, [x8, _NETXEN_CRB_PEG_NET_4@GOTPAGEOFF]
Lloh55:
	ldr	x8, [x8]
	add	x1, x8, #60
	mov	x0, x19
	bl	_NXRD32
	stp	x26, x0, [sp, #40]
	stp	x24, x25, [sp, #24]
	stp	x22, x23, [sp, #8]
Lloh56:
	adrp	x1, l_.str.1@PAGE
Lloh57:
	add	x1, x1, l_.str.1@PAGEOFF
	str	x20, [sp]
	mov	x0, x21
	bl	_dev_err
	mov	x0, x20
	bl	_NX_FWERROR_PEGSTAT1
	cmp	w0, #103
	b.ne	LBB0_3
; %bb.17:
	ldr	x0, [x19, #32]
Lloh58:
	adrp	x1, l_.str.2@PAGE
Lloh59:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	b	LBB0_3
LBB0_18:
	stp	x0, xzr, [x19, #8]
	ldr	w8, [x19]
	cbnz	w8, LBB0_3
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh58, Lloh59
	.cfi_endproc
                                        ; -- End function
	.comm	_NX_CRB_DEV_STATE,8,3           ; @NX_CRB_DEV_STATE
	.comm	_NX_DEV_NEED_AER,8,3            ; @NX_DEV_NEED_AER
	.comm	_NX_DEV_NEED_RESET,8,3          ; @NX_DEV_NEED_RESET
	.comm	_NX_DEV_FAILED,8,3              ; @NX_DEV_FAILED
	.comm	_NETXEN_PEG_ALIVE_COUNTER,8,3   ; @NETXEN_PEG_ALIVE_COUNTER
	.comm	_FW_FAIL_THRESH,8,3             ; @FW_FAIL_THRESH
	.comm	___NX_FW_ATTACHED,4,2           ; @__NX_FW_ATTACHED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"firmware hang detected\n"

	.comm	_NETXEN_PEG_HALT_STATUS1,8,3    ; @NETXEN_PEG_HALT_STATUS1
l_.str.1:                               ; @.str.1
	.asciz	"Dumping hw/fw registers\nPEG_HALT_STATUS1: 0x%x, PEG_HALT_STATUS2: 0x%x,\nPEG_NET_0_PC: 0x%x, PEG_NET_1_PC: 0x%x,\nPEG_NET_2_PC: 0x%x, PEG_NET_3_PC: 0x%x,\nPEG_NET_4_PC: 0x%x\n"

	.comm	_NETXEN_PEG_HALT_STATUS2,8,3    ; @NETXEN_PEG_HALT_STATUS2
	.comm	_NETXEN_CRB_PEG_NET_0,8,3       ; @NETXEN_CRB_PEG_NET_0
	.comm	_NETXEN_CRB_PEG_NET_1,8,3       ; @NETXEN_CRB_PEG_NET_1
	.comm	_NETXEN_CRB_PEG_NET_2,8,3       ; @NETXEN_CRB_PEG_NET_2
	.comm	_NETXEN_CRB_PEG_NET_3,8,3       ; @NETXEN_CRB_PEG_NET_3
	.comm	_NETXEN_CRB_PEG_NET_4,8,3       ; @NETXEN_CRB_PEG_NET_4
l_.str.2:                               ; @.str.2
	.asciz	"Firmware aborted with error code 0x00006700. Device is being reset.\n"

	.comm	_auto_fw_reset,8,3              ; @auto_fw_reset
	.comm	_AUTO_FW_RESET_ENABLED,8,3      ; @AUTO_FW_RESET_ENABLED
	.comm	___NX_RESETTING,4,2             ; @__NX_RESETTING
	.comm	_netxen_detach_work,4,2         ; @netxen_detach_work
	.no_dead_strip	_netxen_check_health
.subsections_via_symbols
