	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_copper_linkup
_bnx2_copper_linkup:                    ## @bnx2_copper_linkup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_BNX2_PHY_FLAG_MDIX@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	notl	%eax
	andl	%eax, (%rdi)
	movl	40(%rdi), %esi
	leaq	-28(%rbp), %rdx
	callq	_bnx2_read_phy
	movl	-28(%rbp), %eax
	movq	_BMCR_ANENABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_17
## %bb.1:
	movq	_MII_CTRL1000@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_bnx2_read_phy
	movq	_MII_STAT1000@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_bnx2_read_phy
	movl	-24(%rbp), %eax
	sarl	$2, %eax
	andl	-20(%rbp), %eax
	movq	_ADVERTISE_1000FULL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.2:
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
	jmp	LBB0_21
LBB0_17:
	movq	_BMCR_SPEED100@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	jne	LBB0_18
## %bb.19:
	movq	_SPEED_10@GOTPCREL(%rip), %rcx
	jmp	LBB0_20
LBB0_4:
	movq	_ADVERTISE_1000HALF@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.5:
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
LBB0_6:
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
	jmp	LBB0_7
LBB0_18:
	movq	_SPEED_100@GOTPCREL(%rip), %rcx
LBB0_20:
	movq	(%rcx), %rcx
	movq	%rcx, 24(%rbx)
	movq	_BMCR_FULLDPLX@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
LBB0_21:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_7:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
LBB0_22:
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
	cmpq	$0, 8(%rbx)
	je	LBB0_26
LBB0_24:
	movq	_MII_BNX2_EXT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_bnx2_read_phy
	movq	_EXT_STATUS_MDIX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -20(%rbp)
	je	LBB0_26
## %bb.25:
	movl	(%r14), %eax
	orl	%eax, (%rbx)
LBB0_26:
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	movl	36(%rbx), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_bnx2_read_phy
	movl	32(%rbx), %esi
	leaq	-24(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_bnx2_read_phy
	movl	-24(%rbp), %eax
	andl	-20(%rbp), %eax
	movq	_ADVERTISE_100FULL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.9:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_10:
	movq	_ADVERTISE_100HALF@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.11:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_12:
	movq	_ADVERTISE_10FULL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
## %bb.13:
	movq	_SPEED_10@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_14:
	movq	_ADVERTISE_10HALF@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_16
## %bb.15:
	movq	_SPEED_10@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_16:
	movq	$0, 24(%rbx)
	movq	$0, 8(%rbx)
	cmpq	$0, 8(%rbx)
	jne	LBB0_24
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_BNX2_PHY_FLAG_MDIX,4,2         ## @BNX2_PHY_FLAG_MDIX
	.comm	_BMCR_ANENABLE,4,2              ## @BMCR_ANENABLE
	.comm	_MII_CTRL1000,4,2               ## @MII_CTRL1000
	.comm	_MII_STAT1000,4,2               ## @MII_STAT1000
	.comm	_ADVERTISE_1000FULL,4,2         ## @ADVERTISE_1000FULL
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_ADVERTISE_1000HALF,4,2         ## @ADVERTISE_1000HALF
	.comm	_DUPLEX_HALF,8,3                ## @DUPLEX_HALF
	.comm	_ADVERTISE_100FULL,4,2          ## @ADVERTISE_100FULL
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_ADVERTISE_100HALF,4,2          ## @ADVERTISE_100HALF
	.comm	_ADVERTISE_10FULL,4,2           ## @ADVERTISE_10FULL
	.comm	_SPEED_10,8,3                   ## @SPEED_10
	.comm	_ADVERTISE_10HALF,4,2           ## @ADVERTISE_10HALF
	.comm	_BMCR_SPEED100,4,2              ## @BMCR_SPEED100
	.comm	_BMCR_FULLDPLX,4,2              ## @BMCR_FULLDPLX
	.comm	_MII_BNX2_EXT_STATUS,4,2        ## @MII_BNX2_EXT_STATUS
	.comm	_EXT_STATUS_MDIX,4,2            ## @EXT_STATUS_MDIX
	.no_dead_strip	_bnx2_copper_linkup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_copper_linkup
_bnx2_copper_linkup:                    ; @bnx2_copper_linkup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _BNX2_PHY_FLAG_MDIX@GOTPAGE
Lloh1:
	ldr	x20, [x20, _BNX2_PHY_FLAG_MDIX@GOTPAGEOFF]
	ldr	w8, [x20]
	ldr	w9, [x0]
	bic	w8, w9, w8
	str	w8, [x0]
	ldr	w1, [x0, #40]
	add	x2, sp, #12
	bl	_bnx2_read_phy
	ldr	w8, [sp, #12]
Lloh2:
	adrp	x9, _BMCR_ANENABLE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BMCR_ANENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
Lloh5:
	adrp	x8, _MII_CTRL1000@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MII_CTRL1000@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_bnx2_read_phy
Lloh8:
	adrp	x8, _MII_STAT1000@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MII_STAT1000@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #4
	mov	x0, x19
	bl	_bnx2_read_phy
	ldp	w9, w8, [sp, #4]
	and	w8, w8, w9, asr #2
Lloh11:
	adrp	x9, _ADVERTISE_1000FULL@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ADVERTISE_1000FULL@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w8, w9
	b.eq	LBB0_6
; %bb.2:
Lloh14:
	adrp	x8, _SPEED_1000@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SPEED_1000@GOTPAGEOFF]
LBB0_3:
	ldr	x8, [x8]
Lloh16:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh17:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
	b	LBB0_9
LBB0_4:
Lloh18:
	adrp	x9, _BMCR_SPEED100@GOTPAGE
Lloh19:
	ldr	x9, [x9, _BMCR_SPEED100@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
Lloh21:
	adrp	x10, _SPEED_10@GOTPAGE
Lloh22:
	ldr	x10, [x10, _SPEED_10@GOTPAGEOFF]
Lloh23:
	adrp	x11, _SPEED_100@GOTPAGE
Lloh24:
	ldr	x11, [x11, _SPEED_100@GOTPAGEOFF]
	tst	w9, w8
	csel	x9, x10, x11, eq
	ldr	x9, [x9]
	str	x9, [x19, #24]
Lloh25:
	adrp	x9, _BMCR_FULLDPLX@GOTPAGE
Lloh26:
	ldr	x9, [x9, _BMCR_FULLDPLX@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.5:
Lloh28:
	adrp	x8, _DUPLEX_FULL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _DUPLEX_FULL@GOTPAGEOFF]
	b	LBB0_11
LBB0_6:
Lloh30:
	adrp	x9, _ADVERTISE_1000HALF@GOTPAGE
Lloh31:
	ldr	x9, [x9, _ADVERTISE_1000HALF@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.7:
Lloh33:
	adrp	x8, _SPEED_1000@GOTPAGE
Lloh34:
	ldr	x8, [x8, _SPEED_1000@GOTPAGEOFF]
LBB0_8:
	ldr	x8, [x8]
Lloh35:
	adrp	x9, _DUPLEX_HALF@GOTPAGE
Lloh36:
	ldr	x9, [x9, _DUPLEX_HALF@GOTPAGEOFF]
LBB0_9:
	ldr	x9, [x9]
	stp	x9, x8, [x19, #16]
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_12
	b	LBB0_14
LBB0_10:
Lloh37:
	adrp	x8, _DUPLEX_HALF@GOTPAGE
Lloh38:
	ldr	x8, [x8, _DUPLEX_HALF@GOTPAGEOFF]
LBB0_11:
	ldr	x8, [x8]
	str	x8, [x19, #16]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_14
LBB0_12:
Lloh39:
	adrp	x8, _MII_BNX2_EXT_STATUS@GOTPAGE
Lloh40:
	ldr	x8, [x8, _MII_BNX2_EXT_STATUS@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_bnx2_read_phy
	ldr	w8, [sp, #8]
Lloh42:
	adrp	x9, _EXT_STATUS_MDIX@GOTPAGE
Lloh43:
	ldr	x9, [x9, _EXT_STATUS_MDIX@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:
	ldr	w8, [x20]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_14:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_15:
	ldr	w1, [x19, #36]
	add	x2, sp, #8
	mov	x0, x19
	bl	_bnx2_read_phy
	ldr	w1, [x19, #32]
	add	x2, sp, #4
	mov	x0, x19
	bl	_bnx2_read_phy
	ldp	w9, w8, [sp, #4]
	and	w8, w9, w8
Lloh45:
	adrp	x9, _ADVERTISE_100FULL@GOTPAGE
Lloh46:
	ldr	x9, [x9, _ADVERTISE_100FULL@GOTPAGEOFF]
Lloh47:
	ldr	w9, [x9]
	tst	w8, w9
	b.eq	LBB0_17
; %bb.16:
Lloh48:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh49:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
	b	LBB0_3
LBB0_17:
Lloh50:
	adrp	x9, _ADVERTISE_100HALF@GOTPAGE
Lloh51:
	ldr	x9, [x9, _ADVERTISE_100HALF@GOTPAGEOFF]
Lloh52:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.18:
Lloh53:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh54:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
	b	LBB0_8
LBB0_19:
Lloh55:
	adrp	x9, _ADVERTISE_10FULL@GOTPAGE
Lloh56:
	ldr	x9, [x9, _ADVERTISE_10FULL@GOTPAGEOFF]
Lloh57:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.20:
Lloh58:
	adrp	x8, _SPEED_10@GOTPAGE
Lloh59:
	ldr	x8, [x8, _SPEED_10@GOTPAGEOFF]
	b	LBB0_3
LBB0_21:
Lloh60:
	adrp	x9, _ADVERTISE_10HALF@GOTPAGE
Lloh61:
	ldr	x9, [x9, _ADVERTISE_10HALF@GOTPAGEOFF]
Lloh62:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_23
; %bb.22:
Lloh63:
	adrp	x8, _SPEED_10@GOTPAGE
Lloh64:
	ldr	x8, [x8, _SPEED_10@GOTPAGEOFF]
	b	LBB0_8
LBB0_23:
	str	xzr, [x19, #24]
	str	xzr, [x19, #8]
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_12
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGot	Lloh63, Lloh64
	.cfi_endproc
                                        ; -- End function
	.comm	_BNX2_PHY_FLAG_MDIX,4,2         ; @BNX2_PHY_FLAG_MDIX
	.comm	_BMCR_ANENABLE,4,2              ; @BMCR_ANENABLE
	.comm	_MII_CTRL1000,4,2               ; @MII_CTRL1000
	.comm	_MII_STAT1000,4,2               ; @MII_STAT1000
	.comm	_ADVERTISE_1000FULL,4,2         ; @ADVERTISE_1000FULL
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_ADVERTISE_1000HALF,4,2         ; @ADVERTISE_1000HALF
	.comm	_DUPLEX_HALF,8,3                ; @DUPLEX_HALF
	.comm	_ADVERTISE_100FULL,4,2          ; @ADVERTISE_100FULL
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_ADVERTISE_100HALF,4,2          ; @ADVERTISE_100HALF
	.comm	_ADVERTISE_10FULL,4,2           ; @ADVERTISE_10FULL
	.comm	_SPEED_10,8,3                   ; @SPEED_10
	.comm	_ADVERTISE_10HALF,4,2           ; @ADVERTISE_10HALF
	.comm	_BMCR_SPEED100,4,2              ; @BMCR_SPEED100
	.comm	_BMCR_FULLDPLX,4,2              ; @BMCR_FULLDPLX
	.comm	_MII_BNX2_EXT_STATUS,4,2        ; @MII_BNX2_EXT_STATUS
	.comm	_EXT_STATUS_MDIX,4,2            ; @EXT_STATUS_MDIX
	.no_dead_strip	_bnx2_copper_linkup
.subsections_via_symbols
