	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_phy_set_extloopbk
_tg3_phy_set_extloopbk:                 ## @tg3_phy_set_extloopbk
	.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	_TG3_PHYFLG_IS_FET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	testl	%ecx, (%rdi)
	je	LBB0_1
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %rbx
	movq	_TG3_PHY_ID_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	4(%rdi), %eax
	movq	_TG3_PHY_ID_BCM5401@GOTPCREL(%rip), %rcx
	movq	_MII_TG3_AUXCTL_SHDWSEL_AUXCTL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.5:
	movq	_MII_TG3_AUXCTL_ACTL_EXTLOOPBK@GOTPCREL(%rip), %rax
	movl	$19488, %edx                    ## imm = 0x4C20
	orl	(%rax), %edx
	movq	%rbx, %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_tg3_phy_auxctl_write           ## TAILCALL
LBB0_2:
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_tg3_phy_auxctl_read
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_MII_TG3_AUXCTL_ACTL_EXTLOOPBK@GOTPCREL(%rip), %rax
	movl	-20(%rbp), %edx
	orl	(%rax), %edx
	movl	%edx, -20(%rbp)
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_tg3_phy_auxctl_write
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_TG3_PHYFLG_IS_FET,4,2          ## @TG3_PHYFLG_IS_FET
	.comm	_TG3_PHY_ID_MASK,4,2            ## @TG3_PHY_ID_MASK
	.comm	_TG3_PHY_ID_BCM5401,4,2         ## @TG3_PHY_ID_BCM5401
	.comm	_MII_TG3_AUXCTL_SHDWSEL_AUXCTL,4,2 ## @MII_TG3_AUXCTL_SHDWSEL_AUXCTL
	.comm	_MII_TG3_AUXCTL_ACTL_EXTLOOPBK,4,2 ## @MII_TG3_AUXCTL_ACTL_EXTLOOPBK
	.no_dead_strip	_tg3_phy_set_extloopbk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tg3_phy_set_extloopbk
_tg3_phy_set_extloopbk:                 ; @tg3_phy_set_extloopbk
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _TG3_PHYFLG_IS_FET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TG3_PHYFLG_IS_FET@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	mov	w0, #0
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_3:
	mov	x19, x0
	ldr	w8, [x0, #4]
Lloh3:
	adrp	x9, _TG3_PHY_ID_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TG3_PHY_ID_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _TG3_PHY_ID_BCM5401@GOTPAGE
Lloh7:
	ldr	x10, [x10, _TG3_PHY_ID_BCM5401@GOTPAGEOFF]
	and	w8, w9, w8
Lloh8:
	ldr	w9, [x10]
Lloh9:
	adrp	x20, _MII_TG3_AUXCTL_SHDWSEL_AUXCTL@GOTPAGE
Lloh10:
	ldr	x20, [x20, _MII_TG3_AUXCTL_SHDWSEL_AUXCTL@GOTPAGEOFF]
	ldr	w1, [x20]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.4:
Lloh11:
	adrp	x8, _MII_TG3_AUXCTL_ACTL_EXTLOOPBK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MII_TG3_AUXCTL_ACTL_EXTLOOPBK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	mov	w9, #19488
	orr	w2, w8, w9
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_tg3_phy_auxctl_write
LBB0_5:
	add	x2, sp, #12
	mov	x0, x19
	bl	_tg3_phy_auxctl_read
	cbnz	w0, LBB0_2
; %bb.6:
Lloh14:
	adrp	x8, _MII_TG3_AUXCTL_ACTL_EXTLOOPBK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MII_TG3_AUXCTL_ACTL_EXTLOOPBK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_tg3_phy_auxctl_write
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_TG3_PHYFLG_IS_FET,4,2          ; @TG3_PHYFLG_IS_FET
	.comm	_TG3_PHY_ID_MASK,4,2            ; @TG3_PHY_ID_MASK
	.comm	_TG3_PHY_ID_BCM5401,4,2         ; @TG3_PHY_ID_BCM5401
	.comm	_MII_TG3_AUXCTL_SHDWSEL_AUXCTL,4,2 ; @MII_TG3_AUXCTL_SHDWSEL_AUXCTL
	.comm	_MII_TG3_AUXCTL_ACTL_EXTLOOPBK,4,2 ; @MII_TG3_AUXCTL_ACTL_EXTLOOPBK
	.no_dead_strip	_tg3_phy_set_extloopbk
.subsections_via_symbols
