	.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), %r15
	movq	8(%rdi), %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_of_property_read_bool
	movl	%eax, %r14d
	leaq	-28(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ag71xx_mdio_get_divider
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_of_device_is_compatible
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_MII_CFG_CLK_DIV_58@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	movl	-28(%rbp), %edx
	jmp	LBB0_8
LBB0_4:
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.5:
	movq	_MII_CFG_CLK_DIV_10@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_MII_CFG_CLK_DIV_28@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %edx
	movl	%edx, -28(%rbp)
LBB0_8:
	movl	(%r15), %edi
	movq	_AG71XX_REG_MII_CFG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_MII_CFG_RESET@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	callq	_regmap_write
	movl	$100, %edi
	callq	_udelay
	movl	(%r15), %edi
	movl	(%rbx), %esi
	movl	-28(%rbp), %edx
	callq	_regmap_write
	movl	$100, %edi
	callq	_udelay
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"builtin-switch"

L_.str.1:                               ## @.str.1
	.asciz	"qca,ar9340-mdio"

	.comm	_MII_CFG_CLK_DIV_58,4,2         ## @MII_CFG_CLK_DIV_58
	.comm	_MII_CFG_CLK_DIV_10,4,2         ## @MII_CFG_CLK_DIV_10
	.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
	ldp	x21, x19, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_of_property_read_bool
	mov	x20, x0
	add	x1, sp, #12
	mov	x0, x19
	bl	_ag71xx_mdio_get_divider
	cbz	x0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_of_device_is_compatible
	cbz	x0, LBB0_4
; %bb.2:
Lloh4:
	adrp	x8, _MII_CFG_CLK_DIV_58@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MII_CFG_CLK_DIV_58@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
	ldr	w8, [sp, #12]
	b	LBB0_8
LBB0_4:
	cbz	w20, LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _MII_CFG_CLK_DIV_10@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MII_CFG_CLK_DIV_10@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh8:
	adrp	x8, _MII_CFG_CLK_DIV_28@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MII_CFG_CLK_DIV_28@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	str	w8, [sp, #12]
LBB0_8:
Lloh10:
	adrp	x19, _AG71XX_REG_MII_CFG@GOTPAGE
Lloh11:
	ldr	x19, [x19, _AG71XX_REG_MII_CFG@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	w1, [x19]
Lloh12:
	adrp	x9, _MII_CFG_RESET@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MII_CFG_RESET@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_regmap_write
	mov	w0, #100
	bl	_udelay
	ldr	w0, [x21]
	ldr	w1, [x19]
	ldr	w2, [sp, #12]
	bl	_regmap_write
	mov	w0, #100
	bl	_udelay
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"builtin-switch"

l_.str.1:                               ; @.str.1
	.asciz	"qca,ar9340-mdio"

	.comm	_MII_CFG_CLK_DIV_58,4,2         ; @MII_CFG_CLK_DIV_58
	.comm	_MII_CFG_CLK_DIV_10,4,2         ; @MII_CFG_CLK_DIV_10
	.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
