	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tenxpress_phy_reconfigure
_tenxpress_phy_reconfigure:             ## @tenxpress_phy_reconfigure
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %r14
	movl	(%rdi), %eax
	movq	_PHY_MODE_OFF@GOTPCREL(%rip), %rcx
	movq	_PHY_MODE_SPECIAL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%eax, %edx
	jne	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	movq	_PHY_MODE_NORMAL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.3:
	cmpl	%eax, (%r14)
	setne	%r15b
	jmp	LBB0_4
LBB0_2:
	xorl	%r15d, %r15d
LBB0_4:
	movq	%rbx, %rdi
	callq	_LOOPBACKS_EXTERNAL
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_LOOPBACK_OUT_OF
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	_LOOPBACK_GPHY@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %edx
	shll	%cl, %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_LOOPBACK_CHANGED
	testq	%rax, %rax
	setne	%al
	orb	%r15b, %al
	cmpb	$1, %al
	jne	LBB0_7
LBB0_6:
	movq	%rbx, %rdi
	callq	_tenxpress_special_reset
	movq	%rbx, %rdi
	callq	_falcon_reset_xaui
LBB0_7:
	movq	%rbx, %rdi
	callq	_tenxpress_low_power
	movq	%rbx, %rdi
	callq	_ef4_mdio_transmit_disable
	movq	%rbx, %rdi
	callq	_ef4_mdio_phy_reconfigure
	movq	%rbx, %rdi
	callq	_tenxpress_ext_loopback
	movq	%rbx, %rdi
	callq	_ef4_mdio_an_reconfigure
	movl	4(%rbx), %eax
	movl	%eax, 4(%r14)
	movl	(%rbx), %eax
LBB0_8:
	movl	%eax, (%r14)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_MODE_OFF,4,2               ## @PHY_MODE_OFF
	.comm	_PHY_MODE_SPECIAL,4,2           ## @PHY_MODE_SPECIAL
	.comm	_PHY_MODE_NORMAL,4,2            ## @PHY_MODE_NORMAL
	.comm	_LOOPBACK_GPHY,4,2              ## @LOOPBACK_GPHY
	.no_dead_strip	_tenxpress_phy_reconfigure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tenxpress_phy_reconfigure
_tenxpress_phy_reconfigure:             ; @tenxpress_phy_reconfigure
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	x19, [x0, #8]
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _PHY_MODE_OFF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PHY_MODE_OFF@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _PHY_MODE_SPECIAL@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PHY_MODE_SPECIAL@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.ne	LBB0_8
; %bb.1:
	mov	x20, x0
Lloh6:
	adrp	x9, _PHY_MODE_NORMAL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PHY_MODE_NORMAL@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.2:
	ldr	w9, [x19]
	cmp	w9, w8
	cset	w21, ne
	b	LBB0_4
LBB0_3:
	mov	w21, #0
LBB0_4:
	mov	x0, x20
	bl	_LOOPBACKS_EXTERNAL
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_LOOPBACK_OUT_OF
	cbnz	x0, LBB0_6
; %bb.5:
Lloh9:
	adrp	x8, _LOOPBACK_GPHY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LOOPBACK_GPHY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w2, w9, w8
	mov	x0, x19
	mov	x1, x20
	bl	_LOOPBACK_CHANGED
	cmp	x0, #0
	cset	w8, ne
	orr	w8, w8, w21
	cmp	w8, #1
	b.ne	LBB0_7
LBB0_6:
	mov	x0, x20
	bl	_tenxpress_special_reset
	mov	x0, x20
	bl	_falcon_reset_xaui
LBB0_7:
	mov	x0, x20
	bl	_tenxpress_low_power
	mov	x0, x20
	bl	_ef4_mdio_transmit_disable
	mov	x0, x20
	bl	_ef4_mdio_phy_reconfigure
	mov	x0, x20
	bl	_tenxpress_ext_loopback
	mov	x0, x20
	bl	_ef4_mdio_an_reconfigure
	ldp	w8, w9, [x20]
	str	w9, [x19, #4]
LBB0_8:
	str	w8, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_MODE_OFF,4,2               ; @PHY_MODE_OFF
	.comm	_PHY_MODE_SPECIAL,4,2           ; @PHY_MODE_SPECIAL
	.comm	_PHY_MODE_NORMAL,4,2            ; @PHY_MODE_NORMAL
	.comm	_LOOPBACK_GPHY,4,2              ; @LOOPBACK_GPHY
	.no_dead_strip	_tenxpress_phy_reconfigure
.subsections_via_symbols
