	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s6mii_write
_s6mii_write:                           ## @s6mii_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_s6mii_enable
	movq	%rbx, %rdi
	movl	$256, %esi                      ## imm = 0x100
	callq	_s6mii_busy
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movq	_S6_GMAC_MACMIIADDR_PHY@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r12d
	movq	_S6_GMAC_MACMIIADDR_REG@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r15d
	orl	%r12d, %r15d
	movq	_S6_GMAC_MACMIIADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	movl	%r15d, %edi
	callq	_writel
	movq	_S6_GMAC_MACMIICTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	movl	%r14d, %edi
	callq	_writel
	movq	%rbx, %rdi
	movl	$256, %esi                      ## imm = 0x100
	callq	_s6mii_busy
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	movq	_ETIME@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorl	%eax, %eax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_ETIME,4,2                      ## @ETIME
	.comm	_S6_GMAC_MACMIIADDR_PHY,4,2     ## @S6_GMAC_MACMIIADDR_PHY
	.comm	_S6_GMAC_MACMIIADDR_REG,4,2     ## @S6_GMAC_MACMIIADDR_REG
	.comm	_S6_GMAC_MACMIIADDR,8,3         ## @S6_GMAC_MACMIIADDR
	.comm	_S6_GMAC_MACMIICTRL,8,3         ## @S6_GMAC_MACMIICTRL
	.no_dead_strip	_s6mii_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s6mii_write
_s6mii_write:                           ; @s6mii_write
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	ldr	x19, [x0]
	mov	x0, x19
	bl	_s6mii_enable
	mov	x0, x19
	mov	w1, #256
	bl	_s6mii_busy
	cbnz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _S6_GMAC_MACMIIADDR_PHY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _S6_GMAC_MACMIIADDR_PHY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsl	w8, w22, w8
Lloh3:
	adrp	x9, _S6_GMAC_MACMIIADDR_REG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _S6_GMAC_MACMIIADDR_REG@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	lsl	w9, w21, w9
	orr	w0, w9, w8
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _S6_GMAC_MACMIIADDR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _S6_GMAC_MACMIIADDR@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _S6_GMAC_MACMIICTRL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _S6_GMAC_MACMIICTRL@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x20
	bl	_writel
	mov	x0, x19
	mov	w1, #256
	bl	_s6mii_busy
	cbz	x0, LBB0_3
LBB0_2:
Lloh12:
	adrp	x8, _ETIME@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ETIME,4,2                      ; @ETIME
	.comm	_S6_GMAC_MACMIIADDR_PHY,4,2     ; @S6_GMAC_MACMIIADDR_PHY
	.comm	_S6_GMAC_MACMIIADDR_REG,4,2     ; @S6_GMAC_MACMIIADDR_REG
	.comm	_S6_GMAC_MACMIIADDR,8,3         ; @S6_GMAC_MACMIIADDR
	.comm	_S6_GMAC_MACMIICTRL,8,3         ; @S6_GMAC_MACMIICTRL
	.no_dead_strip	_s6mii_write
.subsections_via_symbols
