	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ave_mdiobus_write
_ave_mdiobus_write:                     ## @ave_mdiobus_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
	movl	%ecx, %r13d
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	(%rdi), %r12
	movq	%r12, %rdi
	callq	_netdev_priv
	movq	%rax, %rbx
	movl	%r15d, %edi
	shll	$8, %edi
	orl	%r14d, %edi
	movq	_AVE_MDIOAR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	callq	_writel
	movq	_AVE_MDIOWDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	movl	%r13d, %edi
	callq	_writel
	movq	_AVE_MDIOCTR@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	(%rbx), %rdi
	callq	_readl
	movq	_AVE_MDIOCTR_WREQ@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_AVE_MDIOCTR_RREQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	movq	(%r13), %rsi
	addq	(%rbx), %rsi
	callq	_writel
	movq	_AVE_MDIOSR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	movl	$1, %edx
	movl	$20, %ecx
	movl	$2000, %r8d                     ## imm = 0x7D0
	callq	_readl_poll_timeout
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_netdev_err
LBB0_2:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVE_MDIOAR,8,3                 ## @AVE_MDIOAR
	.comm	_AVE_MDIOWDR,8,3                ## @AVE_MDIOWDR
	.comm	_AVE_MDIOCTR,8,3                ## @AVE_MDIOCTR
	.comm	_AVE_MDIOCTR_WREQ,4,2           ## @AVE_MDIOCTR_WREQ
	.comm	_AVE_MDIOCTR_RREQ,4,2           ## @AVE_MDIOCTR_RREQ
	.comm	_AVE_MDIOSR,8,3                 ## @AVE_MDIOSR
	.comm	_AVE_MDIOSR_STS,4,2             ## @AVE_MDIOSR_STS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to write (phy:%d reg:%x)\n"

	.no_dead_strip	_ave_mdiobus_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ave_mdiobus_write
_ave_mdiobus_write:                     ; @ave_mdiobus_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	x22, x3
	mov	x19, x2
	mov	x20, x1
	ldr	x21, [x0]
	mov	x0, x21
	bl	_netdev_priv
	mov	x23, x0
	orr	w0, w19, w20, lsl #8
	ldr	x8, [x23]
Lloh0:
	adrp	x9, _AVE_MDIOAR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AVE_MDIOAR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x23]
Lloh3:
	adrp	x9, _AVE_MDIOWDR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AVE_MDIOWDR@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x22
	bl	_writel
	ldr	x8, [x23]
Lloh6:
	adrp	x22, _AVE_MDIOCTR@GOTPAGE
Lloh7:
	ldr	x22, [x22, _AVE_MDIOCTR@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
Lloh8:
	adrp	x8, _AVE_MDIOCTR_WREQ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AVE_MDIOCTR_WREQ@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _AVE_MDIOCTR_RREQ@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AVE_MDIOCTR_RREQ@GOTPAGEOFF]
	orr	w8, w8, w0
Lloh13:
	ldr	w9, [x9]
	bic	w0, w8, w9
	ldr	x8, [x23]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x23]
Lloh14:
	adrp	x9, _AVE_MDIOSR@GOTPAGE
Lloh15:
	ldr	x9, [x9, _AVE_MDIOSR@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x0, x9, x8
	mov	w2, #1
	mov	w3, #20
	mov	w4, #2000
	bl	_readl_poll_timeout
	mov	x22, x0
	cbz	w0, LBB0_2
; %bb.1:
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	mov	x3, x19
	bl	_netdev_err
LBB0_2:
	mov	x0, x22
	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 AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_AVE_MDIOAR,8,3                 ; @AVE_MDIOAR
	.comm	_AVE_MDIOWDR,8,3                ; @AVE_MDIOWDR
	.comm	_AVE_MDIOCTR,8,3                ; @AVE_MDIOCTR
	.comm	_AVE_MDIOCTR_WREQ,4,2           ; @AVE_MDIOCTR_WREQ
	.comm	_AVE_MDIOCTR_RREQ,4,2           ; @AVE_MDIOCTR_RREQ
	.comm	_AVE_MDIOSR,8,3                 ; @AVE_MDIOSR
	.comm	_AVE_MDIOSR_STS,4,2             ; @AVE_MDIOSR_STS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to write (phy:%d reg:%x)\n"

	.no_dead_strip	_ave_mdiobus_write
.subsections_via_symbols
