	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_5709s_linkup
_bnx2_5709s_linkup:                     ## @bnx2_5709s_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
	movl	$1, (%rdi)
	movq	_MII_BNX2_BLK_ADDR@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_MII_BNX2_BLK_ADDR_GP_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_bnx2_write_phy
	movq	_MII_BNX2_GP_TOP_AN_STATUS1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_bnx2_read_phy
	movl	(%r14), %esi
	movq	_MII_BNX2_BLK_ADDR_COMBO_IEEEB0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_bnx2_write_phy
	movq	_AUTONEG_SPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	je	LBB0_1
## %bb.2:
	movl	-20(%rbp), %eax
	movq	_MII_BNX2_GP_TOP_AN_SPEED_MSK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	addl	$-128, %ecx
	cmpl	$4, %ecx
	ja	LBB0_4
## %bb.3:
	movslq	%ecx, %rcx
	leaq	l_switch.table.bnx2_5709s_linkup(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rbx)
LBB0_4:
	movq	_MII_BNX2_GP_TOP_AN_FD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_5
## %bb.6:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	movl	20(%rbx), %eax
	movl	%eax, 12(%rbx)
	leaq	16(%rbx), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_BNX2_BLK_ADDR,4,2          ## @MII_BNX2_BLK_ADDR
	.comm	_MII_BNX2_BLK_ADDR_GP_STATUS,4,2 ## @MII_BNX2_BLK_ADDR_GP_STATUS
	.comm	_MII_BNX2_GP_TOP_AN_STATUS1,4,2 ## @MII_BNX2_GP_TOP_AN_STATUS1
	.comm	_MII_BNX2_BLK_ADDR_COMBO_IEEEB0,4,2 ## @MII_BNX2_BLK_ADDR_COMBO_IEEEB0
	.comm	_AUTONEG_SPEED,4,2              ## @AUTONEG_SPEED
	.comm	_MII_BNX2_GP_TOP_AN_SPEED_MSK,4,2 ## @MII_BNX2_GP_TOP_AN_SPEED_MSK
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_SPEED_2500,4,2                 ## @SPEED_2500
	.comm	_MII_BNX2_GP_TOP_AN_FD,4,2      ## @MII_BNX2_GP_TOP_AN_FD
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
	.no_dead_strip	_bnx2_5709s_linkup
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.bnx2_5709s_linkup
l_switch.table.bnx2_5709s_linkup:
	.quad	_SPEED_2500
	.quad	_SPEED_1000
	.quad	_SPEED_1000
	.quad	_SPEED_100
	.quad	_SPEED_10

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_5709s_linkup
_bnx2_5709s_linkup:                     ; @bnx2_5709s_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
	mov	w8, #1
	str	w8, [x0]
Lloh0:
	adrp	x20, _MII_BNX2_BLK_ADDR@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MII_BNX2_BLK_ADDR@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x8, _MII_BNX2_BLK_ADDR_GP_STATUS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MII_BNX2_BLK_ADDR_GP_STATUS@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_bnx2_write_phy
Lloh5:
	adrp	x8, _MII_BNX2_GP_TOP_AN_STATUS1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MII_BNX2_GP_TOP_AN_STATUS1@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_bnx2_read_phy
	ldr	w1, [x20]
Lloh8:
	adrp	x8, _MII_BNX2_BLK_ADDR_COMBO_IEEEB0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MII_BNX2_BLK_ADDR_COMBO_IEEEB0@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_bnx2_write_phy
	ldr	w8, [x19, #4]
Lloh11:
	adrp	x9, _AUTONEG_SPEED@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AUTONEG_SPEED@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	ldr	w8, [sp, #12]
Lloh14:
	adrp	x9, _MII_BNX2_GP_TOP_AN_SPEED_MSK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MII_BNX2_GP_TOP_AN_SPEED_MSK@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	and	w9, w9, w8
	sub	w9, w9, #128
	cmp	w9, #4
	b.hi	LBB0_3
; %bb.2:
Lloh17:
	adrp	x10, l_switch.table.bnx2_5709s_linkup@PAGE
Lloh18:
	add	x10, x10, l_switch.table.bnx2_5709s_linkup@PAGEOFF
	ldr	x9, [x10, w9, sxtw #3]
	ldr	w9, [x9]
	str	w9, [x19, #12]
LBB0_3:
Lloh19:
	adrp	x9, _MII_BNX2_GP_TOP_AN_FD@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MII_BNX2_GP_TOP_AN_FD@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
Lloh22:
	adrp	x10, _DUPLEX_FULL@GOTPAGE
Lloh23:
	ldr	x10, [x10, _DUPLEX_FULL@GOTPAGEOFF]
Lloh24:
	adrp	x11, _DUPLEX_HALF@GOTPAGE
Lloh25:
	ldr	x11, [x11, _DUPLEX_HALF@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x11, x10, eq
	b	LBB0_5
LBB0_4:
	ldr	w8, [x19, #20]
	str	w8, [x19, #12]
	add	x8, x19, #16
LBB0_5:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	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
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_BNX2_BLK_ADDR,4,2          ; @MII_BNX2_BLK_ADDR
	.comm	_MII_BNX2_BLK_ADDR_GP_STATUS,4,2 ; @MII_BNX2_BLK_ADDR_GP_STATUS
	.comm	_MII_BNX2_GP_TOP_AN_STATUS1,4,2 ; @MII_BNX2_GP_TOP_AN_STATUS1
	.comm	_MII_BNX2_BLK_ADDR_COMBO_IEEEB0,4,2 ; @MII_BNX2_BLK_ADDR_COMBO_IEEEB0
	.comm	_AUTONEG_SPEED,4,2              ; @AUTONEG_SPEED
	.comm	_MII_BNX2_GP_TOP_AN_SPEED_MSK,4,2 ; @MII_BNX2_GP_TOP_AN_SPEED_MSK
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_SPEED_2500,4,2                 ; @SPEED_2500
	.comm	_MII_BNX2_GP_TOP_AN_FD,4,2      ; @MII_BNX2_GP_TOP_AN_FD
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
	.no_dead_strip	_bnx2_5709s_linkup
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.bnx2_5709s_linkup
l_switch.table.bnx2_5709s_linkup:
	.quad	_SPEED_2500
	.quad	_SPEED_1000
	.quad	_SPEED_1000
	.quad	_SPEED_100
	.quad	_SPEED_10

.subsections_via_symbols
