	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_phy_copper_fetch_rmtadv
_tg3_phy_copper_fetch_rmtadv:           ## @tg3_phy_copper_fetch_rmtadv
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_TG3_PHYFLG_10_100_ONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r14d, %r14d
	movl	$0, %r12d
	testl	%eax, (%rdi)
	je	LBB0_1
LBB0_3:
	movq	_MII_LPA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_tg3_readphy
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movl	(%r15), %edi
	callq	_mii_lpa_to_ethtool_lpa_t
	orl	%r12d, %eax
	movl	%eax, 4(%rbx)
	movl	$1, %r14d
	jmp	LBB0_5
LBB0_1:
	movq	_MII_STAT1000@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_tg3_readphy
	testq	%rax, %rax
	je	LBB0_2
LBB0_5:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	-36(%rbp), %edi
	callq	_mii_stat1000_to_ethtool_lpa_t
	movl	%eax, %r12d
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_TG3_PHYFLG_10_100_ONLY,4,2     ## @TG3_PHYFLG_10_100_ONLY
	.comm	_MII_STAT1000,4,2               ## @MII_STAT1000
	.comm	_MII_LPA,4,2                    ## @MII_LPA
	.no_dead_strip	_tg3_phy_copper_fetch_rmtadv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tg3_phy_copper_fetch_rmtadv
_tg3_phy_copper_fetch_rmtadv:           ; @tg3_phy_copper_fetch_rmtadv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _TG3_PHYFLG_10_100_ONLY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TG3_PHYFLG_10_100_ONLY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	mov	w21, #0
LBB0_2:
Lloh3:
	adrp	x8, _MII_LPA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MII_LPA@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_tg3_readphy
	cbnz	x0, LBB0_5
; %bb.3:
	ldr	w0, [x20]
	bl	_mii_lpa_to_ethtool_lpa_t
	orr	w8, w0, w21
	str	w8, [x19, #4]
	mov	w0, #1
	b	LBB0_6
LBB0_4:
Lloh6:
	adrp	x8, _MII_STAT1000@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MII_STAT1000@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_tg3_readphy
	cbz	x0, LBB0_7
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_7:
	ldr	w0, [sp, #12]
	bl	_mii_stat1000_to_ethtool_lpa_t
	mov	x21, x0
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_TG3_PHYFLG_10_100_ONLY,4,2     ; @TG3_PHYFLG_10_100_ONLY
	.comm	_MII_STAT1000,4,2               ; @MII_STAT1000
	.comm	_MII_LPA,4,2                    ; @MII_LPA
	.no_dead_strip	_tg3_phy_copper_fetch_rmtadv
.subsections_via_symbols
