	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgbe_phy_reset
_xgbe_phy_reset:                        ## @xgbe_phy_reset
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	_MDIO_MMD_PCS@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_MDIO_CTRL1@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	callq	_XMDIO_READ
	movq	_MDIO_CTRL1_RESET@GOTPCREL(%rip), %r12
	orl	(%r12), %eax
	movl	(%r14), %esi
	movl	(%r15), %edx
	movq	%r13, %rdi
	movl	%eax, %ecx
	callq	_XMDIO_WRITE
	movl	$-49, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	$20, %edi
	callq	_msleep
	movl	(%r14), %esi
	movl	(%r15), %edx
	movq	%r13, %rdi
	callq	_XMDIO_READ
	andl	(%r12), %eax
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%rbx), %ecx
	testl	%ebx, %ebx
	movl	%ecx, %ebx
	jne	LBB0_1
LBB0_3:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	subl	(%rdx), %ecx
	testl	%eax, %eax
	cmovel	%eax, %ecx
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MDIO_MMD_PCS,4,2               ## @MDIO_MMD_PCS
	.comm	_MDIO_CTRL1,4,2                 ## @MDIO_CTRL1
	.comm	_MDIO_CTRL1_RESET,4,2           ## @MDIO_CTRL1_RESET
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_xgbe_phy_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgbe_phy_reset
_xgbe_phy_reset:                        ; @xgbe_phy_reset
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x20, _MDIO_MMD_PCS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MDIO_MMD_PCS@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x21, _MDIO_CTRL1@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MDIO_CTRL1@GOTPAGEOFF]
	ldr	w2, [x21]
	bl	_XMDIO_READ
Lloh4:
	adrp	x22, _MDIO_CTRL1_RESET@GOTPAGE
Lloh5:
	ldr	x22, [x22, _MDIO_CTRL1_RESET@GOTPAGEOFF]
	ldr	w8, [x22]
	orr	w3, w8, w0
	ldr	w1, [x20]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_XMDIO_WRITE
	mov	w23, #-49
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #20
	bl	_msleep
	ldr	w1, [x20]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_XMDIO_READ
	ldr	w8, [x22]
	and	w8, w8, w0
	cmp	w8, #0
	ccmp	w23, #0, #4, ne
	add	w23, w23, #1
	b.ne	LBB0_1
; %bb.2:
Lloh6:
	adrp	x9, _ETIMEDOUT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ETIMEDOUT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, #0
	csneg	w0, wzr, w9, eq
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MDIO_MMD_PCS,4,2               ; @MDIO_MMD_PCS
	.comm	_MDIO_CTRL1,4,2                 ; @MDIO_CTRL1
	.comm	_MDIO_CTRL1_RESET,4,2           ; @MDIO_CTRL1_RESET
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_xgbe_phy_reset
.subsections_via_symbols
