	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ag71xx_mdio_probe
_ag71xx_mdio_probe:                     ## @ag71xx_mdio_probe
	.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, %rbx
	movq	24(%rdi), %r15
	movq	32(%rdi), %r12
	movq	(%r12), %r14
	movq	$0, 8(%rdi)
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_devm_clk_get
	movl	%eax, 4(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_probe@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rcx
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_netif_err
	movl	4(%rbx), %edi
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_3:
	movl	4(%rbx), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r13d
	movq	_probe@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rcx
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_netif_err
	jmp	LBB0_14
LBB0_5:
	movq	%r12, %rdi
	callq	_devm_mdiobus_alloc
	movq	%rax, _ag71xx_mdio_probe.mii_bus(%rip)
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_of_reset_control_get_exclusive
	movl	%eax, 16(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_probe@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rcx
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_netif_err
	movl	16(%rbx), %edi
	jmp	LBB0_2
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_7
LBB0_10:
	movq	_ag71xx_mdio_probe.mii_bus(%rip), %rax
	leaq	L_.str.4(%rip), %rcx
	movq	%rcx, (%rax)
	movq	_ag71xx_mdio_mii_read@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 40(%rax)
	movq	_ag71xx_mdio_mii_write@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 36(%rax)
	movq	_ag71xx_mdio_reset@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 32(%rax)
	movq	%rbx, 24(%rax)
	movq	%r12, 16(%rax)
	movl	8(%rax), %edi
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r14), %rcx
	movl	(%rbx), %r8d
	leaq	L_.str.5(%rip), %rdx
	callq	_snprintf
	movl	16(%rbx), %edi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_12
## %bb.11:
	movl	16(%rbx), %edi
	callq	_reset_control_assert
	movl	$100, %edi
	callq	_msleep
	movl	16(%rbx), %edi
	callq	_reset_control_deassert
	movl	$200, %edi
	callq	_msleep
LBB0_12:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_of_get_child_by_name
	movq	%rax, %r14
	movq	_ag71xx_mdio_probe.mii_bus(%rip), %rdi
	movq	%rax, %rsi
	callq	_of_mdiobus_register
	movl	%eax, %r13d
	movq	%r14, %rdi
	callq	_of_node_put
	testl	%r13d, %r13d
	je	LBB0_13
LBB0_7:
	movl	4(%rbx), %edi
	callq	_clk_disable_unprepare
LBB0_14:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_ag71xx_mdio_probe.mii_bus(%rip), %rax
	movq	%rax, 8(%rbx)
	xorl	%r13d, %r13d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_ag71xx_mdio_probe.mii_bus,8,3 ## @ag71xx_mdio_probe.mii_bus
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mdio"

	.comm	_probe,4,2                      ## @probe
L_.str.1:                               ## @.str.1
	.asciz	"Failed to get mdio clk.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to enable mdio clk.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.3:                               ## @.str.3
	.asciz	"Failed to get reset mdio.\n"

L_.str.4:                               ## @.str.4
	.asciz	"ag71xx_mdio"

	.comm	_ag71xx_mdio_mii_read,4,2       ## @ag71xx_mdio_mii_read
	.comm	_ag71xx_mdio_mii_write,4,2      ## @ag71xx_mdio_mii_write
	.comm	_ag71xx_mdio_reset,4,2          ## @ag71xx_mdio_reset
	.comm	_MII_BUS_ID_SIZE,4,2            ## @MII_BUS_ID_SIZE
L_.str.5:                               ## @.str.5
	.asciz	"%s.%d"

	.no_dead_strip	_ag71xx_mdio_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ag71xx_mdio_probe
_ag71xx_mdio_probe:                     ; @ag71xx_mdio_probe
	.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
	ldp	x21, x22, [x0, #24]
	ldr	x20, [x22]
	str	xzr, [x0, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_devm_clk_get
	str	w0, [x19, #4]
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _probe@GOTPAGE
Lloh3:
	ldr	x8, [x8, _probe@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x3, l_.str.1@PAGE
Lloh6:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_netif_err
	ldr	w0, [x19, #4]
LBB0_2:
	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
	b	_PTR_ERR
LBB0_3:
	ldr	w0, [x19, #4]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_5
; %bb.4:
	mov	x23, x0
Lloh7:
	adrp	x8, _probe@GOTPAGE
Lloh8:
	ldr	x8, [x8, _probe@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x3, l_.str.2@PAGE
Lloh11:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_netif_err
	b	LBB0_13
LBB0_5:
	mov	x0, x22
	bl	_devm_mdiobus_alloc
	adrp	x24, _ag71xx_mdio_probe.mii_bus@PAGE
	str	x0, [x24, _ag71xx_mdio_probe.mii_bus@PAGEOFF]
	cbz	x0, LBB0_8
; %bb.6:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_of_reset_control_get_exclusive
	str	w0, [x19, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.7:
Lloh14:
	adrp	x8, _probe@GOTPAGE
Lloh15:
	ldr	x8, [x8, _probe@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x3, l_.str.3@PAGE
Lloh18:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_netif_err
	ldr	w0, [x19, #16]
	b	LBB0_2
LBB0_8:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_12
LBB0_9:
	ldr	x8, [x24, _ag71xx_mdio_probe.mii_bus@PAGEOFF]
Lloh22:
	adrp	x9, l_.str.4@PAGE
Lloh23:
	add	x9, x9, l_.str.4@PAGEOFF
	str	x9, [x8]
Lloh24:
	adrp	x9, _ag71xx_mdio_mii_read@GOTPAGE
Lloh25:
	ldr	x9, [x9, _ag71xx_mdio_mii_read@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	str	w9, [x8, #40]
Lloh27:
	adrp	x9, _ag71xx_mdio_mii_write@GOTPAGE
Lloh28:
	ldr	x9, [x9, _ag71xx_mdio_mii_write@GOTPAGEOFF]
Lloh29:
	adrp	x10, _ag71xx_mdio_reset@GOTPAGE
Lloh30:
	ldr	x10, [x10, _ag71xx_mdio_reset@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
Lloh32:
	ldr	w10, [x10]
	stp	w10, w9, [x8, #32]
	stp	x22, x19, [x8, #16]
	ldr	w0, [x8, #8]
Lloh33:
	adrp	x8, _MII_BUS_ID_SIZE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MII_BUS_ID_SIZE@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	ldr	x3, [x20]
	ldr	w4, [x19]
Lloh36:
	adrp	x2, l_.str.5@PAGE
Lloh37:
	add	x2, x2, l_.str.5@PAGEOFF
	bl	_snprintf
	ldr	w0, [x19, #16]
	bl	_IS_ERR
	cbnz	x0, LBB0_11
; %bb.10:
	ldr	w0, [x19, #16]
	bl	_reset_control_assert
	mov	w0, #100
	bl	_msleep
	ldr	w0, [x19, #16]
	bl	_reset_control_deassert
	mov	w0, #200
	bl	_msleep
LBB0_11:
Lloh38:
	adrp	x1, l_.str@PAGE
Lloh39:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_of_get_child_by_name
	mov	x20, x0
	ldr	x0, [x24, _ag71xx_mdio_probe.mii_bus@PAGEOFF]
	mov	x1, x20
	bl	_of_mdiobus_register
	mov	x23, x0
	mov	x0, x20
	bl	_of_node_put
	cbz	w23, LBB0_14
LBB0_12:
	ldr	w0, [x19, #4]
	bl	_clk_disable_unprepare
LBB0_13:
	mov	x0, x23
	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
LBB0_14:
	ldr	x8, [x24, _ag71xx_mdio_probe.mii_bus@PAGEOFF]
	str	x8, [x19, #8]
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh31
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_ag71xx_mdio_probe.mii_bus,8,3 ; @ag71xx_mdio_probe.mii_bus
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mdio"

	.comm	_probe,4,2                      ; @probe
l_.str.1:                               ; @.str.1
	.asciz	"Failed to get mdio clk.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to enable mdio clk.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.3:                               ; @.str.3
	.asciz	"Failed to get reset mdio.\n"

l_.str.4:                               ; @.str.4
	.asciz	"ag71xx_mdio"

	.comm	_ag71xx_mdio_mii_read,4,2       ; @ag71xx_mdio_mii_read
	.comm	_ag71xx_mdio_mii_write,4,2      ; @ag71xx_mdio_mii_write
	.comm	_ag71xx_mdio_reset,4,2          ; @ag71xx_mdio_reset
	.comm	_MII_BUS_ID_SIZE,4,2            ; @MII_BUS_ID_SIZE
l_.str.5:                               ; @.str.5
	.asciz	"%s.%d"

	.no_dead_strip	_ag71xx_mdio_probe
.subsections_via_symbols
