	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_set_link
_bnx2_set_link:                         ## @bnx2_set_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_MAC_LOOPBACK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	_PHY_LOOPBACK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.3:
	movq	_BNX2_PHY_FLAG_REMOTE_PHY_CAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 12(%rbx)
	jne	LBB0_32
## %bb.4:
	movl	8(%rbx), %r15d
	movq	%rbx, %rdi
	callq	_bnx2_enable_bmsr1
	movl	24(%rbx), %esi
	leaq	-44(%rbp), %r14
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_bnx2_read_phy
	movl	24(%rbx), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_bnx2_read_phy
	movq	%rbx, %rdi
	callq	_bnx2_disable_bmsr1
	movq	_BNX2_PHY_FLAG_SERDES@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, 12(%rbx)
	je	LBB0_13
## %bb.5:
	movq	%rbx, %rdi
	callq	_BNX2_CHIP
	movq	_BNX2_CHIP_5706@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.6:
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movq	_BNX2_PHY_FLAG_FORCED_DOWN@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, 12(%rbx)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_bnx2_5706s_force_link_dn
	movl	(%r14), %eax
	notl	%eax
	andl	%eax, 12(%rbx)
LBB0_8:
	movq	_BNX2_EMAC_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_BNX2_RD
	movl	%eax, %r14d
	movq	_MII_BNX2_MISC_SHADOW@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_MISC_SHDW_AN_DBG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_bnx2_write_phy
	movl	(%r12), %esi
	leaq	-56(%rbp), %r15
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_bnx2_read_phy
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_bnx2_read_phy
	movq	_BNX2_EMAC_STATUS_LINK@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_11
## %bb.9:
	movq	_MISC_SHDW_AN_DBG_NOSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -56(%rbp)
	je	LBB0_10
LBB0_11:
	movq	_BMSR_LSTATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	-44(%rbp), %eax
	jmp	LBB0_12
LBB0_2:
	movl	$1, 8(%rbx)
	jmp	LBB0_32
LBB0_10:
	movq	_BMSR_LSTATUS@GOTPCREL(%rip), %rcx
	movl	-44(%rbp), %eax
	orl	(%rcx), %eax
LBB0_12:
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movl	%eax, -44(%rbp)
LBB0_13:
	movq	_BMSR_LSTATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_23
## %bb.14:
	movl	$1, 8(%rbx)
	movl	(%r13), %eax
	testl	%eax, 12(%rbx)
	je	LBB0_21
## %bb.15:
	movq	%rbx, %rdi
	callq	_BNX2_CHIP
	movq	_BNX2_CHIP_5706@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.16:
	movq	%rbx, %rdi
	callq	_bnx2_5706s_linkup
	jmp	LBB0_22
LBB0_23:
	movl	12(%rbx), %eax
	testl	%eax, (%r13)
	je	LBB0_26
## %bb.24:
	movq	_AUTONEG_SPEED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 16(%rbx)
	je	LBB0_26
## %bb.25:
	movq	%rbx, %rdi
	callq	_bnx2_disable_forced_2g5
	movl	12(%rbx), %eax
LBB0_26:
	movq	_BNX2_PHY_FLAG_PARALLEL_DETECT@GOTPCREL(%rip), %r14
	testl	%eax, (%r14)
	je	LBB0_28
## %bb.27:
	movl	20(%rbx), %esi
	leaq	-52(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_bnx2_read_phy
	movq	_BMCR_ANENABLE@GOTPCREL(%rip), %rax
	movl	-52(%rbp), %edx
	orl	(%rax), %edx
	movl	%edx, -52(%rbp)
	movl	20(%rbx), %esi
	movq	%rbx, %rdi
	callq	_bnx2_write_phy
	movl	(%r14), %eax
	notl	%eax
	andl	%eax, 12(%rbx)
LBB0_28:
	movl	$0, 8(%rbx)
	xorl	%eax, %eax
	cmpl	%r15d, %eax
	jne	LBB0_30
	jmp	LBB0_31
LBB0_21:
	movq	%rbx, %rdi
	callq	_bnx2_copper_linkup
	jmp	LBB0_22
LBB0_17:
	movq	%rbx, %rdi
	callq	_BNX2_CHIP
	movq	_BNX2_CHIP_5708@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.18:
	movq	%rbx, %rdi
	callq	_bnx2_5708s_linkup
	jmp	LBB0_22
LBB0_19:
	movq	%rbx, %rdi
	callq	_BNX2_CHIP
	movq	_BNX2_CHIP_5709@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_22
## %bb.20:
	movq	%rbx, %rdi
	callq	_bnx2_5709s_linkup
LBB0_22:
	movq	%rbx, %rdi
	callq	_bnx2_resolve_flow_ctrl
	movl	8(%rbx), %eax
	cmpl	%r15d, %eax
	je	LBB0_31
LBB0_30:
	movq	%rbx, %rdi
	callq	_bnx2_report_link
LBB0_31:
	movq	%rbx, %rdi
	callq	_bnx2_set_mac_link
LBB0_32:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAC_LOOPBACK,8,3               ## @MAC_LOOPBACK
	.comm	_PHY_LOOPBACK,8,3               ## @PHY_LOOPBACK
	.comm	_BNX2_PHY_FLAG_REMOTE_PHY_CAP,4,2 ## @BNX2_PHY_FLAG_REMOTE_PHY_CAP
	.comm	_BNX2_PHY_FLAG_SERDES,4,2       ## @BNX2_PHY_FLAG_SERDES
	.comm	_BNX2_CHIP_5706,8,3             ## @BNX2_CHIP_5706
	.comm	_BNX2_PHY_FLAG_FORCED_DOWN,4,2  ## @BNX2_PHY_FLAG_FORCED_DOWN
	.comm	_BNX2_EMAC_STATUS,4,2           ## @BNX2_EMAC_STATUS
	.comm	_MII_BNX2_MISC_SHADOW,4,2       ## @MII_BNX2_MISC_SHADOW
	.comm	_MISC_SHDW_AN_DBG,4,2           ## @MISC_SHDW_AN_DBG
	.comm	_BNX2_EMAC_STATUS_LINK,4,2      ## @BNX2_EMAC_STATUS_LINK
	.comm	_MISC_SHDW_AN_DBG_NOSYNC,4,2    ## @MISC_SHDW_AN_DBG_NOSYNC
	.comm	_BMSR_LSTATUS,4,2               ## @BMSR_LSTATUS
	.comm	_BNX2_CHIP_5708,8,3             ## @BNX2_CHIP_5708
	.comm	_BNX2_CHIP_5709,8,3             ## @BNX2_CHIP_5709
	.comm	_AUTONEG_SPEED,4,2              ## @AUTONEG_SPEED
	.comm	_BNX2_PHY_FLAG_PARALLEL_DETECT,4,2 ## @BNX2_PHY_FLAG_PARALLEL_DETECT
	.comm	_BMCR_ANENABLE,4,2              ## @BMCR_ANENABLE
	.no_dead_strip	_bnx2_set_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_set_link
_bnx2_set_link:                         ; @bnx2_set_link
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MAC_LOOPBACK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAC_LOOPBACK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _PHY_LOOPBACK@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PHY_LOOPBACK@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	w8, #1
	str	w8, [x19, #8]
	b	LBB0_30
LBB0_2:
	ldr	w8, [x19, #12]
Lloh6:
	adrp	x9, _BNX2_PHY_FLAG_REMOTE_PHY_CAP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BNX2_PHY_FLAG_REMOTE_PHY_CAP@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_30
; %bb.3:
	ldr	w21, [x19, #8]
	mov	x0, x19
	bl	_bnx2_enable_bmsr1
	ldr	w1, [x19, #24]
	add	x2, sp, #12
	mov	x0, x19
	bl	_bnx2_read_phy
	ldr	w1, [x19, #24]
	add	x2, sp, #12
	mov	x0, x19
	bl	_bnx2_read_phy
	mov	x0, x19
	bl	_bnx2_disable_bmsr1
	ldr	w8, [x19, #12]
Lloh9:
	adrp	x23, _BNX2_PHY_FLAG_SERDES@GOTPAGE
Lloh10:
	ldr	x23, [x23, _BNX2_PHY_FLAG_SERDES@GOTPAGEOFF]
	ldr	w9, [x23]
Lloh11:
	adrp	x24, _BMSR_LSTATUS@GOTPAGE
Lloh12:
	ldr	x24, [x24, _BMSR_LSTATUS@GOTPAGEOFF]
Lloh13:
	adrp	x22, _BNX2_CHIP_5706@GOTPAGE
Lloh14:
	ldr	x22, [x22, _BNX2_CHIP_5706@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.4:
	mov	x0, x19
	bl	_BNX2_CHIP
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.5:
	ldr	w8, [x19, #12]
Lloh15:
	adrp	x20, _BNX2_PHY_FLAG_FORCED_DOWN@GOTPAGE
Lloh16:
	ldr	x20, [x20, _BNX2_PHY_FLAG_FORCED_DOWN@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x19
	mov	w1, #0
	bl	_bnx2_5706s_force_link_dn
	ldr	w8, [x20]
	ldr	w9, [x19, #12]
	bic	w8, w9, w8
	str	w8, [x19, #12]
LBB0_7:
Lloh17:
	adrp	x8, _BNX2_EMAC_STATUS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BNX2_EMAC_STATUS@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_BNX2_RD
	mov	x20, x0
Lloh20:
	adrp	x25, _MII_BNX2_MISC_SHADOW@GOTPAGE
Lloh21:
	ldr	x25, [x25, _MII_BNX2_MISC_SHADOW@GOTPAGEOFF]
	ldr	w1, [x25]
Lloh22:
	adrp	x8, _MISC_SHDW_AN_DBG@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MISC_SHDW_AN_DBG@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_bnx2_write_phy
	ldr	w1, [x25]
	add	x2, sp, #8
	mov	x0, x19
	bl	_bnx2_read_phy
	ldr	w1, [x25]
	add	x2, sp, #8
	mov	x0, x19
	bl	_bnx2_read_phy
Lloh25:
	adrp	x8, _BNX2_EMAC_STATUS_LINK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _BNX2_EMAC_STATUS_LINK@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_9
; %bb.8:
	ldr	w8, [sp, #8]
Lloh28:
	adrp	x9, _MISC_SHDW_AN_DBG_NOSYNC@GOTPAGE
Lloh29:
	ldr	x9, [x9, _MISC_SHDW_AN_DBG_NOSYNC@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
LBB0_9:
	ldr	w8, [x24]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
	b	LBB0_11
LBB0_10:
	ldr	w8, [x24]
	ldr	w9, [sp, #12]
	orr	w8, w9, w8
LBB0_11:
	str	w8, [sp, #12]
LBB0_12:
	ldr	w8, [sp, #12]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.13:
	mov	w8, #1
	str	w8, [x19, #8]
	ldr	w8, [x19, #12]
	ldr	w9, [x23]
	mov	x0, x19
	tst	w9, w8
	b.eq	LBB0_22
; %bb.14:
	bl	_BNX2_CHIP
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_23
; %bb.15:
	mov	x0, x19
	bl	_bnx2_5706s_linkup
	b	LBB0_27
LBB0_16:
	ldr	w8, [x19, #12]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.17:
	ldr	w9, [x19, #16]
Lloh31:
	adrp	x10, _AUTONEG_SPEED@GOTPAGE
Lloh32:
	ldr	x10, [x10, _AUTONEG_SPEED@GOTPAGEOFF]
Lloh33:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_19
; %bb.18:
	mov	x0, x19
	bl	_bnx2_disable_forced_2g5
	ldr	w8, [x19, #12]
LBB0_19:
Lloh34:
	adrp	x20, _BNX2_PHY_FLAG_PARALLEL_DETECT@GOTPAGE
Lloh35:
	ldr	x20, [x20, _BNX2_PHY_FLAG_PARALLEL_DETECT@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.20:
	ldr	w1, [x19, #20]
	add	x2, sp, #4
	mov	x0, x19
	bl	_bnx2_read_phy
Lloh36:
	adrp	x8, _BMCR_ANENABLE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _BMCR_ANENABLE@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	ldr	w9, [sp, #4]
	orr	w2, w9, w8
	str	w2, [sp, #4]
	ldr	w1, [x19, #20]
	mov	x0, x19
	bl	_bnx2_write_phy
	ldr	w8, [x20]
	ldr	w9, [x19, #12]
	bic	w8, w9, w8
	str	w8, [x19, #12]
LBB0_21:
	mov	w8, #0
	str	wzr, [x19, #8]
	cmp	w8, w21
	b.ne	LBB0_28
	b	LBB0_29
LBB0_22:
	bl	_bnx2_copper_linkup
	b	LBB0_27
LBB0_23:
	mov	x0, x19
	bl	_BNX2_CHIP
Lloh39:
	adrp	x8, _BNX2_CHIP_5708@GOTPAGE
Lloh40:
	ldr	x8, [x8, _BNX2_CHIP_5708@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_25
; %bb.24:
	mov	x0, x19
	bl	_bnx2_5708s_linkup
	b	LBB0_27
LBB0_25:
	mov	x0, x19
	bl	_BNX2_CHIP
Lloh42:
	adrp	x8, _BNX2_CHIP_5709@GOTPAGE
Lloh43:
	ldr	x8, [x8, _BNX2_CHIP_5709@GOTPAGEOFF]
Lloh44:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_27
; %bb.26:
	mov	x0, x19
	bl	_bnx2_5709s_linkup
LBB0_27:
	mov	x0, x19
	bl	_bnx2_resolve_flow_ctrl
	ldr	w8, [x19, #8]
	cmp	w8, w21
	b.eq	LBB0_29
LBB0_28:
	mov	x0, x19
	bl	_bnx2_report_link
LBB0_29:
	mov	x0, x19
	bl	_bnx2_set_mac_link
LBB0_30:
	mov	w0, #0
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_MAC_LOOPBACK,8,3               ; @MAC_LOOPBACK
	.comm	_PHY_LOOPBACK,8,3               ; @PHY_LOOPBACK
	.comm	_BNX2_PHY_FLAG_REMOTE_PHY_CAP,4,2 ; @BNX2_PHY_FLAG_REMOTE_PHY_CAP
	.comm	_BNX2_PHY_FLAG_SERDES,4,2       ; @BNX2_PHY_FLAG_SERDES
	.comm	_BNX2_CHIP_5706,8,3             ; @BNX2_CHIP_5706
	.comm	_BNX2_PHY_FLAG_FORCED_DOWN,4,2  ; @BNX2_PHY_FLAG_FORCED_DOWN
	.comm	_BNX2_EMAC_STATUS,4,2           ; @BNX2_EMAC_STATUS
	.comm	_MII_BNX2_MISC_SHADOW,4,2       ; @MII_BNX2_MISC_SHADOW
	.comm	_MISC_SHDW_AN_DBG,4,2           ; @MISC_SHDW_AN_DBG
	.comm	_BNX2_EMAC_STATUS_LINK,4,2      ; @BNX2_EMAC_STATUS_LINK
	.comm	_MISC_SHDW_AN_DBG_NOSYNC,4,2    ; @MISC_SHDW_AN_DBG_NOSYNC
	.comm	_BMSR_LSTATUS,4,2               ; @BMSR_LSTATUS
	.comm	_BNX2_CHIP_5708,8,3             ; @BNX2_CHIP_5708
	.comm	_BNX2_CHIP_5709,8,3             ; @BNX2_CHIP_5709
	.comm	_AUTONEG_SPEED,4,2              ; @AUTONEG_SPEED
	.comm	_BNX2_PHY_FLAG_PARALLEL_DETECT,4,2 ; @BNX2_PHY_FLAG_PARALLEL_DETECT
	.comm	_BMCR_ANENABLE,4,2              ; @BMCR_ANENABLE
	.no_dead_strip	_bnx2_set_link
.subsections_via_symbols
