	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_check_kr2_wa
_bnx2x_check_kr2_wa:                    ## @bnx2x_check_kr2_wa
	.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	%rsi, %r15
	movq	(%rsi), %rax
	testq	%rax, %rax
	jle	LBB0_2
## %bb.1:
	decq	%rax
	movq	%rax, (%r15)
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %r12
	movq	%rdx, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_warpcore_get_sigdet
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_get_warpcore_lane
	movq	_MDIO_REG_BANK_AER_BLOCK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_MDIO_AER_BLOCK_AER_REG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%eax, %r8d
	callq	_CL22_WR_OVER_CL45
	movq	_MDIO_AN_DEVAD@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	_MDIO_AN_REG_LP_AUTO_NEG@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-48(%rbp), %r8
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_bnx2x_cl45_read
	movl	(%r13), %edx
	movq	_MDIO_AN_REG_LP_AUTO_NEG2@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-44(%rbp), %r8
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_bnx2x_cl45_read
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_bnx2x_set_aer_mmd
	movl	-48(%rbp), %edx
	testl	%edx, %edx
	je	LBB0_6
## %bb.8:
	testl	$32768, %edx                    ## imm = 0x8000
	sete	%sil
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	andl	$224, %eax
	cmpl	$32, %eax
	sete	%al
	orb	%sil, %al
	movq	_LINK_ATTR_SYNC_KR2_ENABLE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%esi, (%rbx)
	je	LBB0_9
## %bb.11:
	testb	%al, %al
	je	LBB0_13
## %bb.12:
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_DP
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_bnx2x_disable_kr2
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_warpcore_restart_AN_KR
	jmp	LBB0_13
LBB0_3:
	movq	_LINK_ATTR_SYNC_KR2_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_13
## %bb.4:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_bnx2x_kr2_recovery
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DP                             ## TAILCALL
LBB0_6:
	movq	_LINK_ATTR_SYNC_KR2_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_13
## %bb.7:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_bnx2x_kr2_recovery
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_DP
	jmp	LBB0_13
LBB0_9:
	testb	%al, %al
	jne	LBB0_13
## %bb.10:
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_DP
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_bnx2x_kr2_recovery
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_LINK_ATTR_SYNC_KR2_ENABLE,4,2  ## @LINK_ATTR_SYNC_KR2_ENABLE
	.comm	_NETIF_MSG_LINK,4,2             ## @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No sigdet\n"

	.comm	_MDIO_REG_BANK_AER_BLOCK,4,2    ## @MDIO_REG_BANK_AER_BLOCK
	.comm	_MDIO_AER_BLOCK_AER_REG,4,2     ## @MDIO_AER_BLOCK_AER_REG
	.comm	_MDIO_AN_DEVAD,4,2              ## @MDIO_AN_DEVAD
	.comm	_MDIO_AN_REG_LP_AUTO_NEG,4,2    ## @MDIO_AN_REG_LP_AUTO_NEG
	.comm	_MDIO_AN_REG_LP_AUTO_NEG2,4,2   ## @MDIO_AN_REG_LP_AUTO_NEG2
L_.str.1:                               ## @.str.1
	.asciz	"No BP\n"

L_.str.2:                               ## @.str.2
	.asciz	"BP=0x%x, NP=0x%x\n"

	.no_dead_strip	_bnx2x_check_kr2_wa
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_check_kr2_wa
_bnx2x_check_kr2_wa:                    ; @bnx2x_check_kr2_wa
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x1
	ldr	x8, [x1]
	subs	x8, x8, #1
	b.lt	LBB0_3
; %bb.1:
	str	x8, [x21]
LBB0_2:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_3:
	mov	x19, x2
	mov	x20, x0
	ldr	x22, [x0, #8]
	mov	x0, x2
	mov	x1, x20
	bl	_bnx2x_warpcore_get_sigdet
	cbz	w0, LBB0_8
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	_bnx2x_get_warpcore_lane
	mov	x4, x0
Lloh0:
	adrp	x8, _MDIO_REG_BANK_AER_BLOCK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MDIO_REG_BANK_AER_BLOCK@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _MDIO_AER_BLOCK_AER_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MDIO_AER_BLOCK_AER_REG@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x22
	mov	x1, x19
	bl	_CL22_WR_OVER_CL45
Lloh6:
	adrp	x23, _MDIO_AN_DEVAD@GOTPAGE
Lloh7:
	ldr	x23, [x23, _MDIO_AN_DEVAD@GOTPAGEOFF]
	ldr	w2, [x23]
Lloh8:
	adrp	x8, _MDIO_AN_REG_LP_AUTO_NEG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MDIO_AN_REG_LP_AUTO_NEG@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	add	x4, sp, #28
	mov	x0, x22
	mov	x1, x19
	bl	_bnx2x_cl45_read
	ldr	w2, [x23]
Lloh11:
	adrp	x8, _MDIO_AN_REG_LP_AUTO_NEG2@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MDIO_AN_REG_LP_AUTO_NEG2@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	add	x4, sp, #24
	mov	x0, x22
	mov	x1, x19
	bl	_bnx2x_cl45_read
	mov	x0, x20
	mov	x1, x19
	bl	_bnx2x_set_aer_mmd
	ldr	w8, [sp, #28]
	cbz	w8, LBB0_10
; %bb.5:
	tst	w8, #0x8000
	ldr	w9, [sp, #24]
	and	w10, w9, #0xe0
	mov	w11, #32
	ccmp	w10, w11, #4, ne
	cset	w10, eq
	ldr	w11, [x20]
Lloh14:
	adrp	x12, _LINK_ATTR_SYNC_KR2_ENABLE@GOTPAGE
Lloh15:
	ldr	x12, [x12, _LINK_ATTR_SYNC_KR2_ENABLE@GOTPAGEOFF]
Lloh16:
	ldr	w12, [x12]
	tst	w12, w11
	b.eq	LBB0_12
; %bb.6:
	cbz	w10, LBB0_2
; %bb.7:
Lloh17:
	adrp	x10, _NETIF_MSG_LINK@GOTPAGE
Lloh18:
	ldr	x10, [x10, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x10]
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	stp	x8, x9, [sp]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_DP
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_bnx2x_disable_kr2
	mov	x0, x19
	mov	x1, x20
	bl	_bnx2x_warpcore_restart_AN_KR
	b	LBB0_2
LBB0_8:
	ldr	w8, [x20]
Lloh22:
	adrp	x9, _LINK_ATTR_SYNC_KR2_ENABLE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _LINK_ATTR_SYNC_KR2_ENABLE@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.9:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_bnx2x_kr2_recovery
Lloh25:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x1, l_.str@PAGE
Lloh29:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_DP
LBB0_10:
	ldr	w8, [x20]
Lloh30:
	adrp	x9, _LINK_ATTR_SYNC_KR2_ENABLE@GOTPAGE
Lloh31:
	ldr	x9, [x9, _LINK_ATTR_SYNC_KR2_ENABLE@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.11:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_bnx2x_kr2_recovery
Lloh33:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh34:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
Lloh36:
	adrp	x1, l_.str.1@PAGE
Lloh37:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_DP
	b	LBB0_2
LBB0_12:
	tbnz	w10, #0, LBB0_2
; %bb.13:
Lloh38:
	adrp	x10, _NETIF_MSG_LINK@GOTPAGE
Lloh39:
	ldr	x10, [x10, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x10]
	stp	x8, x9, [sp]
Lloh41:
	adrp	x1, l_.str.2@PAGE
Lloh42:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_DP
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_bnx2x_kr2_recovery
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_LINK_ATTR_SYNC_KR2_ENABLE,4,2  ; @LINK_ATTR_SYNC_KR2_ENABLE
	.comm	_NETIF_MSG_LINK,4,2             ; @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No sigdet\n"

	.comm	_MDIO_REG_BANK_AER_BLOCK,4,2    ; @MDIO_REG_BANK_AER_BLOCK
	.comm	_MDIO_AER_BLOCK_AER_REG,4,2     ; @MDIO_AER_BLOCK_AER_REG
	.comm	_MDIO_AN_DEVAD,4,2              ; @MDIO_AN_DEVAD
	.comm	_MDIO_AN_REG_LP_AUTO_NEG,4,2    ; @MDIO_AN_REG_LP_AUTO_NEG
	.comm	_MDIO_AN_REG_LP_AUTO_NEG2,4,2   ; @MDIO_AN_REG_LP_AUTO_NEG2
l_.str.1:                               ; @.str.1
	.asciz	"No BP\n"

l_.str.2:                               ; @.str.2
	.asciz	"BP=0x%x, NP=0x%x\n"

	.no_dead_strip	_bnx2x_check_kr2_wa
.subsections_via_symbols
