	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_test_link                ## -- Begin function bnx2x_test_link
	.p2align	4, 0x90
_bnx2x_test_link:                       ## @bnx2x_test_link
	.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
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	32(%rdi), %r15
	movl	$0, -44(%rbp)
	movq	_INT_PHY@GOTPCREL(%rip), %r12
	movq	(%r12), %rbx
	shlq	$4, %rbx
	addq	24(%rdi), %rbx
	movq	%r15, %rdi
	callq	_CHIP_IS_E3
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	(%r13), %r14
	movq	(%r12), %rdi
	callq	_LINK_CONFIG_IDX
	movq	(%r14,%rax,8), %rax
	movq	_SPEED_10000@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_3
## %bb.2:
	movq	_MDIO_WC_DEVAD@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	leaq	-60(%rbp), %r12
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_bnx2x_cl45_read
	movl	(%r14), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_bnx2x_cl45_read
	movl	-60(%rbp), %eax
	andl	$4, %eax
	jmp	LBB0_4
LBB0_5:
	movq	_MDIO_REG_BANK_GP_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MDIO_GP_STATUS_TOP_AN_STATUS1@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-44(%rbp), %r8
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_CL22_RD_OVER_CL45
	movq	_MDIO_GP_STATUS_TOP_AN_STATUS1_LINK_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -44(%rbp)
	jne	LBB0_6
	jmp	LBB0_22
LBB0_3:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_bnx2x_get_warpcore_lane
	movl	%eax, %r12d
	movq	_MDIO_WC_DEVAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MDIO_WC_REG_GP2_STATUS_GP_2_1@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-44(%rbp), %r8
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_cl45_read
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	shrl	$8, %eax
	shrl	$12, %edx
	orl	%eax, %edx
	andl	$15, %edx
	movl	%edx, -44(%rbp)
	movl	$1, %eax
	movl	%r12d, %ecx
	shll	%cl, %eax
	andl	%edx, %eax
LBB0_4:
	testl	%eax, %eax
	je	LBB0_22
LBB0_6:
	movq	8(%r13), %rdx
	movq	_LOOPBACK_XGXS@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpq	(%rcx), %rdx
	je	LBB0_23
## %bb.7:
	movl	16(%r13), %ecx
	cmpl	$1, %ecx
	je	LBB0_23
## %bb.8:
	cmpl	$3, %ecx
	je	LBB0_11
## %bb.9:
	cmpl	$2, %ecx
	jne	LBB0_22
## %bb.10:
	movq	24(%r13), %rax
	movq	_EXT_PHY1@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shlq	$4, %rcx
	leaq	(%rax,%rcx), %rdi
	leaq	-48(%rbp), %rdx
	movq	%r13, %rsi
	callq	*(%rax,%rcx)
	movl	%eax, %esi
LBB0_21:
	testl	%esi, %esi
	movl	$0, %eax
	jne	LBB0_23
	jmp	LBB0_22
LBB0_11:
	movq	_EXT_PHY1@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$2, %eax
	jg	LBB0_22
## %bb.12:
	movslq	%eax, %r12
	movq	%r12, %rbx
	shlq	$4, %rbx
	xorl	%esi, %esi
	movl	$3, %eax
	movq	_ETH_PHY_SFPP_10G_FIBER@GOTPCREL(%rip), %r14
	movq	_ETH_PHY_SFP_1G_FIBER@GOTPCREL(%rip), %r9
	movq	_ETH_PHY_XFP_FIBER@GOTPCREL(%rip), %r15
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%r12
	movslq	%eax, %rcx
	addq	$16, %rbx
	cmpq	%rcx, %r12
	jge	LBB0_21
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r13), %rdi
	movl	8(%rdi,%rbx), %edx
	movb	$1, %cl
	cmpl	(%r14), %edx
	je	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpl	(%r9), %edx
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpl	(%r15), %edx
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_ETH_PHY_DA_TWINAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	sete	%cl
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=1
	movzbl	%cl, %ecx
	cmpl	-56(%rbp), %ecx                 ## 4-byte Folded Reload
	jne	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	(%rdi,%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_13 Depth=1
	addq	%rbx, %rdi
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%r13, %rsi
	leaq	-48(%rbp), %rdx
	movq	%r9, %r13
	callq	*%rcx
	movq	%r13, %r9
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	orl	%eax, %esi
	movl	16(%r13), %eax
	jmp	LBB0_20
LBB0_22:
	movq	_ESRCH@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_23:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_PHY,8,3                    ## @INT_PHY
	.comm	_SPEED_10000,8,3                ## @SPEED_10000
	.comm	_MDIO_WC_DEVAD,4,2              ## @MDIO_WC_DEVAD
	.comm	_MDIO_WC_REG_GP2_STATUS_GP_2_1,4,2 ## @MDIO_WC_REG_GP2_STATUS_GP_2_1
	.comm	_ESRCH,4,2                      ## @ESRCH
	.comm	_MDIO_REG_BANK_GP_STATUS,4,2    ## @MDIO_REG_BANK_GP_STATUS
	.comm	_MDIO_GP_STATUS_TOP_AN_STATUS1,4,2 ## @MDIO_GP_STATUS_TOP_AN_STATUS1
	.comm	_MDIO_GP_STATUS_TOP_AN_STATUS1_LINK_STATUS,4,2 ## @MDIO_GP_STATUS_TOP_AN_STATUS1_LINK_STATUS
	.comm	_LOOPBACK_XGXS,8,3              ## @LOOPBACK_XGXS
	.comm	_EXT_PHY1,8,3                   ## @EXT_PHY1
	.comm	_ETH_PHY_SFPP_10G_FIBER,4,2     ## @ETH_PHY_SFPP_10G_FIBER
	.comm	_ETH_PHY_SFP_1G_FIBER,4,2       ## @ETH_PHY_SFP_1G_FIBER
	.comm	_ETH_PHY_XFP_FIBER,4,2          ## @ETH_PHY_XFP_FIBER
	.comm	_ETH_PHY_DA_TWINAX,4,2          ## @ETH_PHY_DA_TWINAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_test_link                ; -- Begin function bnx2x_test_link
	.p2align	2
_bnx2x_test_link:                       ; @bnx2x_test_link
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x19, x0
	str	wzr, [sp, #12]
	ldp	x8, x21, [x0, #24]
Lloh0:
	adrp	x23, _INT_PHY@GOTPAGE
Lloh1:
	ldr	x23, [x23, _INT_PHY@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x22, x8, x9, lsl #4
	mov	x0, x21
	bl	_CHIP_IS_E3
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x24, [x19]
	ldr	x0, [x23]
	bl	_LINK_CONFIG_IDX
	ldr	x8, [x24, x0, lsl #3]
Lloh2:
	adrp	x9, _SPEED_10000@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SPEED_10000@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_4
; %bb.2:
Lloh5:
	adrp	x23, _MDIO_WC_DEVAD@GOTPAGE
Lloh6:
	ldr	x23, [x23, _MDIO_WC_DEVAD@GOTPAGEOFF]
	ldr	w2, [x23]
	add	x4, sp, #4
	mov	x0, x21
	mov	x1, x22
	mov	w3, #1
	bl	_bnx2x_cl45_read
	ldr	w2, [x23]
	add	x4, sp, #4
	mov	x0, x21
	mov	x1, x22
	mov	w3, #1
	bl	_bnx2x_cl45_read
	ldr	w8, [sp, #4]
	and	w8, w8, #0x4
	cbnz	w8, LBB0_5
	b	LBB0_20
LBB0_3:
Lloh7:
	adrp	x8, _MDIO_REG_BANK_GP_STATUS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MDIO_REG_BANK_GP_STATUS@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
Lloh10:
	adrp	x8, _MDIO_GP_STATUS_TOP_AN_STATUS1@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MDIO_GP_STATUS_TOP_AN_STATUS1@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	add	x4, sp, #12
	mov	x0, x21
	mov	x1, x22
	bl	_CL22_RD_OVER_CL45
	ldr	w8, [sp, #12]
Lloh13:
	adrp	x9, _MDIO_GP_STATUS_TOP_AN_STATUS1_LINK_STATUS@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MDIO_GP_STATUS_TOP_AN_STATUS1_LINK_STATUS@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_5
	b	LBB0_20
LBB0_4:
	mov	x0, x22
	mov	x1, x19
	bl	_bnx2x_get_warpcore_lane
	mov	x23, x0
Lloh16:
	adrp	x8, _MDIO_WC_DEVAD@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MDIO_WC_DEVAD@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
Lloh19:
	adrp	x8, _MDIO_WC_REG_GP2_STATUS_GP_2_1@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MDIO_WC_REG_GP2_STATUS_GP_2_1@GOTPAGEOFF]
Lloh21:
	ldr	w3, [x8]
	add	x4, sp, #12
	mov	x0, x21
	mov	x1, x22
	bl	_bnx2x_cl45_read
	ldr	w8, [sp, #12]
	lsr	w9, w8, #8
	orr	w8, w9, w8, lsr #12
	and	w8, w8, #0xf
	str	w8, [sp, #12]
	mov	w9, #1
	lsl	w9, w9, w23
	and	w8, w8, w9
	cbz	w8, LBB0_20
LBB0_5:
	ldr	x8, [x19, #8]
Lloh22:
	adrp	x9, _LOOPBACK_XGXS@GOTPAGE
Lloh23:
	ldr	x9, [x9, _LOOPBACK_XGXS@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
LBB0_6:
	mov	w0, #0
	b	LBB0_21
LBB0_7:
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.eq	LBB0_6
; %bb.8:
	cmp	w8, #3
	b.eq	LBB0_12
; %bb.9:
	cmp	w8, #2
	b.ne	LBB0_20
; %bb.10:
	ldr	x8, [x19, #24]
Lloh25:
	adrp	x9, _EXT_PHY1@GOTPAGE
Lloh26:
	ldr	x9, [x9, _EXT_PHY1@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	add	x0, x8, x9, lsl #4
	ldr	x8, [x0]
	add	x2, sp, #8
	mov	x1, x19
	blr	x8
	mov	x21, x0
LBB0_11:
	cbnz	w21, LBB0_6
	b	LBB0_20
LBB0_12:
Lloh28:
	adrp	x8, _EXT_PHY1@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EXT_PHY1@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	cmp	w8, #2
	b.gt	LBB0_20
; %bb.13:
	mov	w21, #0
	sxtw	x22, w8
	lsl	x23, x22, #4
	mov	w8, #3
Lloh31:
	adrp	x24, _ETH_PHY_SFPP_10G_FIBER@GOTPAGE
Lloh32:
	ldr	x24, [x24, _ETH_PHY_SFPP_10G_FIBER@GOTPAGEOFF]
Lloh33:
	adrp	x25, _ETH_PHY_SFP_1G_FIBER@GOTPAGE
Lloh34:
	ldr	x25, [x25, _ETH_PHY_SFP_1G_FIBER@GOTPAGEOFF]
Lloh35:
	adrp	x26, _ETH_PHY_XFP_FIBER@GOTPAGE
Lloh36:
	ldr	x26, [x26, _ETH_PHY_XFP_FIBER@GOTPAGEOFF]
Lloh37:
	adrp	x27, _ETH_PHY_DA_TWINAX@GOTPAGE
Lloh38:
	ldr	x27, [x27, _ETH_PHY_DA_TWINAX@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x22, x22, #1
	add	x23, x23, #16
	cmp	x22, w8, sxtw
	b.ge	LBB0_11
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #24]
	add	x10, x9, x23
	ldr	w10, [x10, #8]
	ldr	w11, [x24]
	ldr	w12, [x25]
	ldr	w13, [x26]
	cmp	w10, w11
	ccmp	w10, w12, #4, ne
	ccmp	w10, w13, #4, ne
	b.ne	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	w10, #1
	cmp	w10, w20
	b.ne	LBB0_14
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w11, [x27]
	cmp	w10, w11
	cset	w10, eq
	cmp	w10, w20
	b.ne	LBB0_14
LBB0_18:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x0, x9, x23
	ldr	x9, [x0]
	cbz	x9, LBB0_14
; %bb.19:                               ;   in Loop: Header=BB0_15 Depth=1
	add	x2, sp, #8
	mov	x1, x19
	blr	x9
	orr	w21, w0, w21
	ldr	w8, [x19, #16]
	b	LBB0_14
LBB0_20:
Lloh39:
	adrp	x8, _ESRCH@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ESRCH@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_21:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_PHY,8,3                    ; @INT_PHY
	.comm	_SPEED_10000,8,3                ; @SPEED_10000
	.comm	_MDIO_WC_DEVAD,4,2              ; @MDIO_WC_DEVAD
	.comm	_MDIO_WC_REG_GP2_STATUS_GP_2_1,4,2 ; @MDIO_WC_REG_GP2_STATUS_GP_2_1
	.comm	_ESRCH,4,2                      ; @ESRCH
	.comm	_MDIO_REG_BANK_GP_STATUS,4,2    ; @MDIO_REG_BANK_GP_STATUS
	.comm	_MDIO_GP_STATUS_TOP_AN_STATUS1,4,2 ; @MDIO_GP_STATUS_TOP_AN_STATUS1
	.comm	_MDIO_GP_STATUS_TOP_AN_STATUS1_LINK_STATUS,4,2 ; @MDIO_GP_STATUS_TOP_AN_STATUS1_LINK_STATUS
	.comm	_LOOPBACK_XGXS,8,3              ; @LOOPBACK_XGXS
	.comm	_EXT_PHY1,8,3                   ; @EXT_PHY1
	.comm	_ETH_PHY_SFPP_10G_FIBER,4,2     ; @ETH_PHY_SFPP_10G_FIBER
	.comm	_ETH_PHY_SFP_1G_FIBER,4,2       ; @ETH_PHY_SFP_1G_FIBER
	.comm	_ETH_PHY_XFP_FIBER,4,2          ; @ETH_PHY_XFP_FIBER
	.comm	_ETH_PHY_DA_TWINAX,4,2          ; @ETH_PHY_DA_TWINAX
.subsections_via_symbols
