	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function davinci_mdio_reset
_davinci_mdio_reset:                    ## @davinci_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), %rbx
	movl	4(%rbx), %edi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_PHY_MAX_ADDR@GOTPCREL(%rip), %rax
	movl	(%rbx), %edi
	imull	(%rax), %edi
	callq	_msleep
	movq	16(%rbx), %rdi
	addq	$4, %rdi
	callq	_readl
	movzbl	%ah, %edx
	movzbl	%al, %ecx
	movl	4(%rbx), %edi
	movl	32(%rbx), %r8d
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_info
	cmpq	$0, 24(%rbx)
	jne	LBB0_7
## %bb.3:
	movq	16(%rbx), %rdi
	callq	_readl
	movl	4(%rbx), %edi
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r14d
	notl	%r14d
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dev_info
	jmp	LBB0_6
LBB0_1:
	movl	%eax, %r15d
	movl	4(%rbx), %edi
	callq	_pm_runtime_put_noidle
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_warn
	xorl	%r14d, %r14d
LBB0_6:
	movq	8(%rbx), %rax
	movl	%r14d, (%rax)
LBB0_7:
	movl	4(%rbx), %edi
	callq	_pm_runtime_mark_last_busy
	movl	4(%rbx), %edi
	callq	_pm_runtime_put_autosuspend
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_MAX_ADDR,4,2               ## @PHY_MAX_ADDR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"davinci mdio revision %d.%d, bus freq %ld\n"

L_.str.1:                               ## @.str.1
	.asciz	"detected phy mask %x\n"

L_.str.2:                               ## @.str.2
	.asciz	"no live phy, scanning all\n"

	.no_dead_strip	_davinci_mdio_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function davinci_mdio_reset
_davinci_mdio_reset:                    ; @davinci_mdio_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x20, [x0]
	ldr	w0, [x20, #4]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _PHY_MAX_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_MAX_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x20]
	mul	w0, w9, w8
	bl	_msleep
	ldr	x8, [x20, #16]
	add	x0, x8, #4
	bl	_readl
	ldr	w8, [x20, #4]
	ubfx	w2, w0, #8, #8
	and	w9, w0, #0xff
	ldr	w10, [x20, #32]
	stp	x9, x10, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	bl	_dev_info
	ldr	x8, [x20, #24]
	cbnz	x8, LBB0_7
; %bb.2:
	ldr	x0, [x20, #16]
	bl	_readl
	mov	x8, x0
	ldr	w0, [x20, #4]
	cbz	w8, LBB0_5
; %bb.3:
	mvn	w19, w8
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_dev_info
	b	LBB0_6
LBB0_4:
	mov	x19, x0
	ldr	w0, [x20, #4]
	bl	_pm_runtime_put_noidle
	b	LBB0_8
LBB0_5:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_warn
	mov	w19, #0
LBB0_6:
	ldr	x8, [x20, #8]
	str	w19, [x8]
LBB0_7:
	ldr	w0, [x20, #4]
	bl	_pm_runtime_mark_last_busy
	ldr	w0, [x20, #4]
	bl	_pm_runtime_put_autosuspend
	mov	w19, #0
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_MAX_ADDR,4,2               ; @PHY_MAX_ADDR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"davinci mdio revision %d.%d, bus freq %ld\n"

l_.str.1:                               ; @.str.1
	.asciz	"detected phy mask %x\n"

l_.str.2:                               ; @.str.2
	.asciz	"no live phy, scanning all\n"

	.no_dead_strip	_davinci_mdio_reset
.subsections_via_symbols
