	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function davinci_mdio_write
_davinci_mdio_write:                    ## @davinci_mdio_write
	.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	_PHY_REG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	testl	%edx, %eax
	jne	LBB0_2
## %bb.1:
	movl	%esi, %r14d
	movq	_PHY_ID_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	testl	%esi, %eax
	je	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%ecx, %r12d
	movl	%edx, %r13d
	movq	(%rdi), %r15
	movl	(%r15), %edi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	_USERACCESS_GO@GOTPCREL(%rip), %rax
	movq	_USERACCESS_WRITE@GOTPCREL(%rip), %rcx
	shll	$21, %r13d
	shll	$16, %r14d
	orl	%r13d, %r14d
	movq	_USERACCESS_DATA@GOTPCREL(%rip), %rdx
	andl	(%rdx), %r12d
	orl	(%rax), %r14d
	orl	(%rcx), %r14d
	orl	%r12d, %r14d
	movq	_EAGAIN@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_wait_for_user_access
	movl	%eax, %ebx
	movl	(%r12), %eax
	addl	%ebx, %eax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	testl	%ebx, %ebx
	js	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%r15), %rax
	movq	(%rax), %rsi
	movl	%r14d, %edi
	callq	_writel
	movq	%r15, %rdi
	callq	_wait_for_user_access
	movl	%eax, %ebx
	movl	(%r12), %eax
	addl	%ebx, %eax
	je	LBB0_6
LBB0_9:
	movl	(%r15), %edi
	callq	_pm_runtime_mark_last_busy
	movl	(%r15), %edi
	callq	_pm_runtime_put_autosuspend
	jmp	LBB0_10
LBB0_4:
	movl	%eax, %ebx
	movl	(%r15), %edi
	callq	_pm_runtime_put_noidle
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_REG_MASK,4,2               ## @PHY_REG_MASK
	.comm	_PHY_ID_MASK,4,2                ## @PHY_ID_MASK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_USERACCESS_GO,4,2              ## @USERACCESS_GO
	.comm	_USERACCESS_WRITE,4,2           ## @USERACCESS_WRITE
	.comm	_USERACCESS_DATA,4,2            ## @USERACCESS_DATA
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_davinci_mdio_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function davinci_mdio_write
_davinci_mdio_write:                    ; @davinci_mdio_write
	.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
Lloh0:
	adrp	x8, _PHY_REG_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_REG_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bics	wzr, w2, w8
	b.ne	LBB0_2
; %bb.1:
	mov	x22, x1
Lloh3:
	adrp	x8, _PHY_ID_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PHY_ID_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	bics	wzr, w1, w8
	b.eq	LBB0_4
LBB0_2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_3:
	mov	x0, x20
	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_4:
	mov	x21, x3
	mov	x23, x2
	ldr	x19, [x0]
	ldr	w0, [x19]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_11
; %bb.5:
Lloh9:
	adrp	x8, _USERACCESS_GO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _USERACCESS_GO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _USERACCESS_WRITE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _USERACCESS_WRITE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	lsl	w10, w23, #21
Lloh15:
	adrp	x11, _USERACCESS_DATA@GOTPAGE
Lloh16:
	ldr	x11, [x11, _USERACCESS_DATA@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x11]
	and	w11, w11, w21
	orr	w10, w10, w22, lsl #16
	orr	w8, w10, w8
	orr	w8, w8, w9
	orr	w21, w8, w11
Lloh18:
	adrp	x22, _EAGAIN@GOTPAGE
Lloh19:
	ldr	x22, [x22, _EAGAIN@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_wait_for_user_access
	ldr	w8, [x22]
	cmn	w0, w8
	b.eq	LBB0_6
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x20, x0
	tbnz	w0, #31, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #8]
	ldr	x1, [x8]
	mov	x0, x21
	bl	_writel
	mov	x0, x19
	bl	_wait_for_user_access
	ldr	w8, [x22]
	cmn	w0, w8
	b.eq	LBB0_6
; %bb.9:
	mov	x20, x0
LBB0_10:
	ldr	w0, [x19]
	bl	_pm_runtime_mark_last_busy
	ldr	w0, [x19]
	bl	_pm_runtime_put_autosuspend
	b	LBB0_3
LBB0_11:
	mov	x20, x0
	ldr	w0, [x19]
	bl	_pm_runtime_put_noidle
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_REG_MASK,4,2               ; @PHY_REG_MASK
	.comm	_PHY_ID_MASK,4,2                ; @PHY_ID_MASK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_USERACCESS_GO,4,2              ; @USERACCESS_GO
	.comm	_USERACCESS_WRITE,4,2           ; @USERACCESS_WRITE
	.comm	_USERACCESS_DATA,4,2            ; @USERACCESS_DATA
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_davinci_mdio_write
.subsections_via_symbols
