	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt305x_mii_write
_rt305x_mii_write:                      ## @rt305x_mii_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, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movq	_jiffies@GOTPCREL(%rip), %r13
	movq	(%r13), %r14
	movq	_RT305X_ESW_REG_PCR1@GOTPCREL(%rip), %r15
	movq	_RT305X_ESW_PCR1_WT_DONE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_esw_r32
	testl	%eax, (%r12)
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r13), %rdi
	movq	_RT305X_ESW_PHY_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r14, %rsi
	callq	_time_after
	testq	%rax, %rax
	je	LBB0_1
	jmp	LBB0_7
LBB0_3:
	movzwl	-44(%rbp), %esi                 ## 2-byte Folded Reload
	movq	_RT305X_ESW_PCR0_WT_NWAY_DATA_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %esi
	movq	_RT305X_ESW_PCR0_CPU_PHY_REG_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	shll	%cl, %edx
	movq	_RT305X_ESW_PCR0_WT_PHY_CMD@GOTPCREL(%rip), %rax
	orl	-48(%rbp), %esi                 ## 4-byte Folded Reload
	orl	%edx, %esi
	orl	(%rax), %esi
	movq	_RT305X_ESW_REG_PCR0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_esw_w32
	movq	(%r13), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_esw_r32
	testl	%eax, (%r12)
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r13), %rdi
	movq	_RT305X_ESW_PHY_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r14, %rsi
	callq	_time_after
	testq	%rax, %rax
	je	LBB0_4
LBB0_7:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	$1, %eax
	jmp	LBB0_8
LBB0_5:
	xorl	%eax, %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_RT305X_ESW_REG_PCR1,4,2        ## @RT305X_ESW_REG_PCR1
	.comm	_RT305X_ESW_PCR1_WT_DONE,4,2    ## @RT305X_ESW_PCR1_WT_DONE
	.comm	_RT305X_ESW_PHY_TIMEOUT,8,3     ## @RT305X_ESW_PHY_TIMEOUT
	.comm	_RT305X_ESW_PCR0_WT_NWAY_DATA_S,4,2 ## @RT305X_ESW_PCR0_WT_NWAY_DATA_S
	.comm	_RT305X_ESW_PCR0_CPU_PHY_REG_S,4,2 ## @RT305X_ESW_PCR0_CPU_PHY_REG_S
	.comm	_RT305X_ESW_PCR0_WT_PHY_CMD,4,2 ## @RT305X_ESW_PCR0_WT_PHY_CMD
	.comm	_RT305X_ESW_REG_PCR0,4,2        ## @RT305X_ESW_REG_PCR0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ramips_eth: MDIO timeout\n"

	.no_dead_strip	_rt305x_mii_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt305x_mii_write
_rt305x_mii_write:                      ; @rt305x_mii_write
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _jiffies@GOTPAGE
Lloh1:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x27, [x23]
Lloh2:
	adrp	x24, _RT305X_ESW_REG_PCR1@GOTPAGE
Lloh3:
	ldr	x24, [x24, _RT305X_ESW_REG_PCR1@GOTPAGEOFF]
Lloh4:
	adrp	x25, _RT305X_ESW_PCR1_WT_DONE@GOTPAGE
Lloh5:
	ldr	x25, [x25, _RT305X_ESW_PCR1_WT_DONE@GOTPAGEOFF]
Lloh6:
	adrp	x26, _RT305X_ESW_PHY_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x26, [x26, _RT305X_ESW_PHY_TIMEOUT@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	bl	_esw_r32
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x0, [x23]
	ldr	x8, [x26]
	add	x1, x8, x27
	bl	_time_after
	cbz	x0, LBB0_1
	b	LBB0_6
LBB0_3:
	and	w8, w22, #0xffff
Lloh8:
	adrp	x9, _RT305X_ESW_PCR0_WT_NWAY_DATA_S@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RT305X_ESW_PCR0_WT_NWAY_DATA_S@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _RT305X_ESW_PCR0_CPU_PHY_REG_S@GOTPAGE
Lloh12:
	ldr	x10, [x10, _RT305X_ESW_PCR0_CPU_PHY_REG_S@GOTPAGEOFF]
	lsl	w8, w8, w9
Lloh13:
	ldr	w9, [x10]
	lsl	w9, w21, w9
Lloh14:
	adrp	x10, _RT305X_ESW_PCR0_WT_PHY_CMD@GOTPAGE
Lloh15:
	ldr	x10, [x10, _RT305X_ESW_PCR0_WT_PHY_CMD@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	orr	w8, w8, w20
	orr	w8, w8, w9
	orr	w1, w8, w10
Lloh17:
	adrp	x8, _RT305X_ESW_REG_PCR0@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RT305X_ESW_REG_PCR0@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_esw_w32
	ldr	x20, [x23]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	bl	_esw_r32
	ldr	w8, [x25]
	tst	w8, w0
	b.ne	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x23]
	ldr	x8, [x26]
	add	x1, x8, x20
	bl	_time_after
	cbz	x0, LBB0_4
LBB0_6:
	ldr	w0, [x19]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	w0, #1
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_RT305X_ESW_REG_PCR1,4,2        ; @RT305X_ESW_REG_PCR1
	.comm	_RT305X_ESW_PCR1_WT_DONE,4,2    ; @RT305X_ESW_PCR1_WT_DONE
	.comm	_RT305X_ESW_PHY_TIMEOUT,8,3     ; @RT305X_ESW_PHY_TIMEOUT
	.comm	_RT305X_ESW_PCR0_WT_NWAY_DATA_S,4,2 ; @RT305X_ESW_PCR0_WT_NWAY_DATA_S
	.comm	_RT305X_ESW_PCR0_CPU_PHY_REG_S,4,2 ; @RT305X_ESW_PCR0_CPU_PHY_REG_S
	.comm	_RT305X_ESW_PCR0_WT_PHY_CMD,4,2 ; @RT305X_ESW_PCR0_WT_PHY_CMD
	.comm	_RT305X_ESW_REG_PCR0,4,2        ; @RT305X_ESW_REG_PCR0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ramips_eth: MDIO timeout\n"

	.no_dead_strip	_rt305x_mii_write
.subsections_via_symbols
