	.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
	movq	(%rdi), %rbx
	leaq	-28(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ag71xx_mdio_get_divider
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	(%rbx), %rax
	cmpq	$0, 24(%rax)
	je	LBB0_4
## %bb.3:
	movq	_MII_CFG_CLK_DIV_6@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_1:
	movl	-28(%rbp), %edx
	jmp	LBB0_11
LBB0_4:
	cmpq	$0, 16(%rax)
	movq	8(%rax), %rax
	je	LBB0_7
## %bb.5:
	testq	%rax, %rax
	jne	LBB0_9
## %bb.6:
	movq	_MII_CFG_CLK_DIV_10@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_7:
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_MII_CFG_CLK_DIV_58@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_MII_CFG_CLK_DIV_28@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %edx
	movl	%edx, -28(%rbp)
LBB0_11:
	movq	_AG71XX_REG_MII_CFG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_MII_CFG_RESET@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_ag71xx_mdio_wr
	movl	$100, %edi
	callq	_udelay
	movl	(%r15), %esi
	movl	-28(%rbp), %edx
	movq	%rbx, %rdi
	callq	_ag71xx_mdio_wr
	movl	$100, %edi
	callq	_udelay
	movq	(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	*%rax
LBB0_13:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_CFG_CLK_DIV_6,4,2          ## @MII_CFG_CLK_DIV_6
	.comm	_MII_CFG_CLK_DIV_10,4,2         ## @MII_CFG_CLK_DIV_10
	.comm	_MII_CFG_CLK_DIV_58,4,2         ## @MII_CFG_CLK_DIV_58
	.comm	_MII_CFG_CLK_DIV_28,4,2         ## @MII_CFG_CLK_DIV_28
	.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
	mov	x19, x0
	ldr	x20, [x0]
	add	x1, sp, #12
	mov	x0, x20
	bl	_ag71xx_mdio_get_divider
	cbz	w0, LBB0_3
; %bb.1:
	ldr	x8, [x20]
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _MII_CFG_CLK_DIV_6@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_CFG_CLK_DIV_6@GOTPAGEOFF]
	b	LBB0_10
LBB0_3:
	ldr	w8, [sp, #12]
	b	LBB0_11
LBB0_4:
	ldp	x8, x9, [x8, #8]
	cbz	x9, LBB0_7
; %bb.5:
	cbnz	x8, LBB0_9
; %bb.6:
Lloh2:
	adrp	x8, _MII_CFG_CLK_DIV_10@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MII_CFG_CLK_DIV_10@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
	cbz	x8, LBB0_9
; %bb.8:
Lloh4:
	adrp	x8, _MII_CFG_CLK_DIV_58@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MII_CFG_CLK_DIV_58@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh6:
	adrp	x8, _MII_CFG_CLK_DIV_28@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MII_CFG_CLK_DIV_28@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	str	w8, [sp, #12]
LBB0_11:
Lloh8:
	adrp	x21, _AG71XX_REG_MII_CFG@GOTPAGE
Lloh9:
	ldr	x21, [x21, _AG71XX_REG_MII_CFG@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh10:
	adrp	x9, _MII_CFG_RESET@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MII_CFG_RESET@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x20
	bl	_ag71xx_mdio_wr
	mov	w0, #100
	bl	_udelay
	ldr	w1, [x21]
	ldr	w2, [sp, #12]
	mov	x0, x20
	bl	_ag71xx_mdio_wr
	mov	w0, #100
	bl	_udelay
	ldr	x8, [x20]
	ldr	x8, [x8]
	cbz	x8, LBB0_13
; %bb.12:
	mov	x0, x19
	blr	x8
LBB0_13:
	mov	w0, #0
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_CFG_CLK_DIV_6,4,2          ; @MII_CFG_CLK_DIV_6
	.comm	_MII_CFG_CLK_DIV_10,4,2         ; @MII_CFG_CLK_DIV_10
	.comm	_MII_CFG_CLK_DIV_58,4,2         ; @MII_CFG_CLK_DIV_58
	.comm	_MII_CFG_CLK_DIV_28,4,2         ; @MII_CFG_CLK_DIV_28
	.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
