	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpmac_mdio_write
_cpmac_mdio_write:                      ## @cpmac_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r14
	movl	(%rdi), %r13d
	xorl	%edi, %edi
	callq	_CPMAC_MDIO_ACCESS
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_cpmac_read
	movq	_MDIO_BUSY@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_3
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	movl	(%r14), %ebx
	xorl	%edi, %edi
	callq	_CPMAC_MDIO_ACCESS
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_cpmac_read
	testl	%eax, (%r15)
	jne	LBB0_1
LBB0_3:
	movl	(%r14), %r14d
	xorl	%edi, %edi
	callq	_CPMAC_MDIO_ACCESS
	movl	%eax, %r13d
	movq	_MDIO_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	orl	(%r15), %r12d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_MDIO_REG
	movl	%eax, %ebx
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_MDIO_PHY
	orl	%eax, %ebx
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_MDIO_DATA
	orl	%eax, %ebx
	orl	%r12d, %ebx
	movl	%r14d, %edi
	movl	%r13d, %esi
	movl	%ebx, %edx
	callq	_cpmac_write
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MDIO_BUSY,4,2                  ## @MDIO_BUSY
	.comm	_MDIO_WRITE,4,2                 ## @MDIO_WRITE
	.no_dead_strip	_cpmac_mdio_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpmac_mdio_write
_cpmac_mdio_write:                      ; @cpmac_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
	mov	x19, x3
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	ldr	w23, [x0]
	mov	w0, #0
	bl	_CPMAC_MDIO_ACCESS
	mov	x1, x0
	mov	x0, x23
	bl	_cpmac_read
Lloh0:
	adrp	x24, _MDIO_BUSY@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MDIO_BUSY@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_cpu_relax
	ldr	w23, [x22]
	mov	w0, #0
	bl	_CPMAC_MDIO_ACCESS
	mov	x1, x0
	mov	x0, x23
	bl	_cpmac_read
	b	LBB0_1
LBB0_3:
	ldr	w22, [x22]
	mov	w0, #0
	bl	_CPMAC_MDIO_ACCESS
	mov	x23, x0
	ldr	w8, [x24]
Lloh2:
	adrp	x9, _MDIO_WRITE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MDIO_WRITE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w24, w9, w8
	mov	x0, x21
	bl	_MDIO_REG
	orr	w21, w24, w0
	mov	x0, x20
	bl	_MDIO_PHY
	orr	w20, w21, w0
	mov	x0, x19
	bl	_MDIO_DATA
	orr	w2, w20, w0
	mov	x0, x22
	mov	x1, x23
	bl	_cpmac_write
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MDIO_BUSY,4,2                  ; @MDIO_BUSY
	.comm	_MDIO_WRITE,4,2                 ; @MDIO_WRITE
	.no_dead_strip	_cpmac_mdio_write
.subsections_via_symbols
