	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ag71xx_mdio_reset
_ag71xx_mdio_reset:                     ## @ag71xx_mdio_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r14
	leaq	-28(%rbp), %rsi
	movq	%r14, %rdi
	callq	_ag71xx_mdio_get_divider
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_AG71XX_REG_MII_CFG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_MII_CFG_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	-28(%rbp), %edx
	movq	%r14, %rdi
	callq	_ag71xx_wr
	movl	$100, %edi
	movl	$200, %esi
	callq	_usleep_range
	movl	(%r15), %esi
	movl	-28(%rbp), %edx
	movq	%r14, %rdi
	callq	_ag71xx_wr
	movl	$100, %edi
	movl	$200, %esi
	callq	_usleep_range
LBB0_2:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AG71XX_REG_MII_CFG,4,2         ## @AG71XX_REG_MII_CFG
	.comm	_MII_CFG_RESET,4,2              ## @MII_CFG_RESET
	.no_dead_strip	_ag71xx_mdio_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ag71xx_mdio_reset
_ag71xx_mdio_reset:                     ; @ag71xx_mdio_reset
	.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
	ldr	x20, [x0]
	add	x1, sp, #12
	mov	x0, x20
	bl	_ag71xx_mdio_get_divider
	mov	x19, x0
	cbnz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x21, _AG71XX_REG_MII_CFG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AG71XX_REG_MII_CFG@GOTPAGEOFF]
	ldr	w1, [x21]
	ldr	w8, [sp, #12]
Lloh2:
	adrp	x9, _MII_CFG_RESET@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MII_CFG_RESET@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x20
	bl	_ag71xx_wr
	mov	w0, #100
	mov	w1, #200
	bl	_usleep_range
	ldr	w1, [x21]
	ldr	w2, [sp, #12]
	mov	x0, x20
	bl	_ag71xx_wr
	mov	w0, #100
	mov	w1, #200
	bl	_usleep_range
LBB0_2:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AG71XX_REG_MII_CFG,4,2         ; @AG71XX_REG_MII_CFG
	.comm	_MII_CFG_RESET,4,2              ; @MII_CFG_RESET
	.no_dead_strip	_ag71xx_mdio_reset
.subsections_via_symbols
