	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_setup_fan_failure_detection
_bnx2x_setup_fan_failure_detection:     ## @bnx2x_setup_fan_failure_detection
	.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
	callq	_BP_NOMCP
	testq	%rax, %rax
	je	LBB0_1
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_dev_info@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_SHMEM_RD
	movq	_SHARED_HW_CFG_FAN_FAILURE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_SHARED_HW_CFG_FAN_FAILURE_ENABLED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.2:
	movq	_NETIF_MSG_HW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	$1, %edx
	callq	_DP
LBB0_3:
	movq	_MISC_SPIO_SPIO5@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_MISC_SPIO_INPUT_HI_Z@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_bnx2x_set_spio
	movq	_MISC_REG_SPIO_INT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_REG_RD
	movl	(%r15), %edx
	movq	_MISC_SPIO_INT_OLD_SET_POS@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	orl	%eax, %edx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_REG_WR
	movq	_MISC_REG_SPIO_EVENT_EN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_REG_RD
	orl	(%r15), %eax
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REG_WR                         ## TAILCALL
LBB0_4:
	movq	_SHARED_HW_CFG_FAN_FAILURE_PHY_TYPE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.5:
	movq	_PORT_0@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_PORT_MAX@GOTPCREL(%rip), %r12
	cmpl	(%r12), %ebx
	jge	LBB0_10
## %bb.6:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edx
	movl	4(%r14), %esi
	movq	%r14, %rdi
	movl	%ebx, %ecx
	callq	_bnx2x_fan_failure_det_req
	orl	%eax, %r15d
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_7
## %bb.8:
	movq	_NETIF_MSG_HW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_DP
	testl	%r15d, %r15d
	jne	LBB0_3
	jmp	LBB0_9
LBB0_10:
	movq	_NETIF_MSG_HW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%edx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DP                             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_dev_info,4,2                   ## @dev_info
	.comm	_SHARED_HW_CFG_FAN_FAILURE_MASK,4,2 ## @SHARED_HW_CFG_FAN_FAILURE_MASK
	.comm	_SHARED_HW_CFG_FAN_FAILURE_ENABLED,4,2 ## @SHARED_HW_CFG_FAN_FAILURE_ENABLED
	.comm	_SHARED_HW_CFG_FAN_FAILURE_PHY_TYPE,4,2 ## @SHARED_HW_CFG_FAN_FAILURE_PHY_TYPE
	.comm	_PORT_0,4,2                     ## @PORT_0
	.comm	_PORT_MAX,4,2                   ## @PORT_MAX
	.comm	_NETIF_MSG_HW,4,2               ## @NETIF_MSG_HW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fan detection setting: %d\n"

	.comm	_MISC_SPIO_SPIO5,4,2            ## @MISC_SPIO_SPIO5
	.comm	_MISC_SPIO_INPUT_HI_Z,4,2       ## @MISC_SPIO_INPUT_HI_Z
	.comm	_MISC_REG_SPIO_INT,4,2          ## @MISC_REG_SPIO_INT
	.comm	_MISC_SPIO_INT_OLD_SET_POS,4,2  ## @MISC_SPIO_INT_OLD_SET_POS
	.comm	_MISC_REG_SPIO_EVENT_EN,4,2     ## @MISC_REG_SPIO_EVENT_EN
	.no_dead_strip	_bnx2x_setup_fan_failure_detection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_setup_fan_failure_detection
_bnx2x_setup_fan_failure_detection:     ; @bnx2x_setup_fan_failure_detection
	.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
	bl	_BP_NOMCP
	cbz	x0, LBB0_2
LBB0_1:
	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:
Lloh0:
	adrp	x8, _dev_info@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dev_info@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_SHMEM_RD
Lloh3:
	adrp	x8, _SHARED_HW_CFG_FAN_FAILURE_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SHARED_HW_CFG_FAN_FAILURE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh6:
	adrp	x9, _SHARED_HW_CFG_FAN_FAILURE_ENABLED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SHARED_HW_CFG_FAN_FAILURE_ENABLED@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.3:
Lloh9:
	adrp	x8, _NETIF_MSG_HW@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NETIF_MSG_HW@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #1
	bl	_DP
LBB0_4:
Lloh14:
	adrp	x20, _MISC_SPIO_SPIO5@GOTPAGE
Lloh15:
	ldr	x20, [x20, _MISC_SPIO_SPIO5@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh16:
	adrp	x8, _MISC_SPIO_INPUT_HI_Z@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MISC_SPIO_INPUT_HI_Z@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_bnx2x_set_spio
Lloh19:
	adrp	x21, _MISC_REG_SPIO_INT@GOTPAGE
Lloh20:
	ldr	x21, [x21, _MISC_REG_SPIO_INT@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_REG_RD
	ldr	w8, [x20]
Lloh21:
	adrp	x9, _MISC_SPIO_INT_OLD_SET_POS@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MISC_SPIO_INT_OLD_SET_POS@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	orr	w2, w8, w0
	ldr	w1, [x21]
	mov	x0, x19
	bl	_REG_WR
Lloh24:
	adrp	x21, _MISC_REG_SPIO_EVENT_EN@GOTPAGE
Lloh25:
	ldr	x21, [x21, _MISC_REG_SPIO_EVENT_EN@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_REG_RD
	ldr	w8, [x20]
	orr	w2, w8, w0
	ldr	w1, [x21]
	mov	x0, x19
	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
	b	_REG_WR
LBB0_5:
Lloh26:
	adrp	x9, _SHARED_HW_CFG_FAN_FAILURE_PHY_TYPE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _SHARED_HW_CFG_FAN_FAILURE_PHY_TYPE@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.6:
Lloh29:
	adrp	x8, _PORT_0@GOTPAGE
Lloh30:
	ldr	x8, [x8, _PORT_0@GOTPAGEOFF]
Lloh31:
	ldr	w20, [x8]
Lloh32:
	adrp	x22, _PORT_MAX@GOTPAGE
Lloh33:
	ldr	x22, [x22, _PORT_MAX@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w20, w8
	b.ge	LBB0_10
; %bb.7:
	mov	w21, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w2, w1, [x19]
	mov	x0, x19
	mov	x3, x20
	bl	_bnx2x_fan_failure_det_req
	orr	w21, w0, w21
	add	w20, w20, #1
	ldr	w8, [x22]
	cmp	w20, w8
	b.lt	LBB0_8
; %bb.9:
Lloh34:
	adrp	x8, _NETIF_MSG_HW@GOTPAGE
Lloh35:
	ldr	x8, [x8, _NETIF_MSG_HW@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
Lloh37:
	adrp	x1, l_.str@PAGE
Lloh38:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_DP
	cbnz	w21, LBB0_4
	b	LBB0_1
LBB0_10:
Lloh39:
	adrp	x8, _NETIF_MSG_HW@GOTPAGE
Lloh40:
	ldr	x8, [x8, _NETIF_MSG_HW@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
Lloh42:
	adrp	x1, l_.str@PAGE
Lloh43:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #0
	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
	b	_DP
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_dev_info,4,2                   ; @dev_info
	.comm	_SHARED_HW_CFG_FAN_FAILURE_MASK,4,2 ; @SHARED_HW_CFG_FAN_FAILURE_MASK
	.comm	_SHARED_HW_CFG_FAN_FAILURE_ENABLED,4,2 ; @SHARED_HW_CFG_FAN_FAILURE_ENABLED
	.comm	_SHARED_HW_CFG_FAN_FAILURE_PHY_TYPE,4,2 ; @SHARED_HW_CFG_FAN_FAILURE_PHY_TYPE
	.comm	_PORT_0,4,2                     ; @PORT_0
	.comm	_PORT_MAX,4,2                   ; @PORT_MAX
	.comm	_NETIF_MSG_HW,4,2               ; @NETIF_MSG_HW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fan detection setting: %d\n"

	.comm	_MISC_SPIO_SPIO5,4,2            ; @MISC_SPIO_SPIO5
	.comm	_MISC_SPIO_INPUT_HI_Z,4,2       ; @MISC_SPIO_INPUT_HI_Z
	.comm	_MISC_REG_SPIO_INT,4,2          ; @MISC_REG_SPIO_INT
	.comm	_MISC_SPIO_INT_OLD_SET_POS,4,2  ; @MISC_SPIO_INT_OLD_SET_POS
	.comm	_MISC_REG_SPIO_EVENT_EN,4,2     ; @MISC_REG_SPIO_EVENT_EN
	.no_dead_strip	_bnx2x_setup_fan_failure_detection
.subsections_via_symbols
