	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s6mii_read
_s6mii_read:                            ## @s6mii_read
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	(%rdi), %r14
	movq	%r14, %rdi
	callq	_s6mii_enable
	movq	%r14, %rdi
	movl	$256, %esi                      ## imm = 0x100
	callq	_s6mii_busy
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ETIME@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_4
LBB0_2:
	movq	_S6_GMAC_MACMIIADDR_PHY@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r15d
	movq	_S6_GMAC_MACMIIADDR_REG@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	orl	%r15d, %ebx
	movq	_S6_GMAC_MACMIIADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	_S6_GMAC_MACMIICMD_READ@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %edi
	shll	%cl, %edi
	movq	_S6_GMAC_MACMIICMD@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	(%r14), %rsi
	callq	_writel
	movq	(%rbx), %rsi
	addq	(%r14), %rsi
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_writel
	movq	%r14, %rdi
	movl	$256, %esi                      ## imm = 0x100
	callq	_s6mii_busy
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	_ETIME@GOTPCREL(%rip), %rax
LBB0_4:
	subl	(%rax), %ebx
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_S6_GMAC_MACMIISTAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r14), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_readl                          ## TAILCALL
	.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_MACMIICMD_READ,4,2     ## @S6_GMAC_MACMIICMD_READ
	.comm	_S6_GMAC_MACMIICMD,8,3          ## @S6_GMAC_MACMIICMD
	.comm	_S6_GMAC_MACMIISTAT,8,3         ## @S6_GMAC_MACMIISTAT
	.no_dead_strip	_s6mii_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s6mii_read
_s6mii_read:                            ; @s6mii_read
	.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, x2
	mov	x21, 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, w21, w8
Lloh3:
	adrp	x9, _S6_GMAC_MACMIIADDR_REG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _S6_GMAC_MACMIIADDR_REG@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	lsl	w9, w20, 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
Lloh9:
	adrp	x8, _S6_GMAC_MACMIICMD_READ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _S6_GMAC_MACMIICMD_READ@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w0, w9, w8
	ldr	x8, [x19]
Lloh12:
	adrp	x20, _S6_GMAC_MACMIICMD@GOTPAGE
Lloh13:
	ldr	x20, [x20, _S6_GMAC_MACMIICMD@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	mov	x0, x19
	mov	w1, #256
	bl	_s6mii_busy
	cbz	x0, LBB0_3
LBB0_2:
Lloh14:
	adrp	x8, _ETIME@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	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
LBB0_3:
	ldr	x8, [x19]
Lloh17:
	adrp	x9, _S6_GMAC_MACMIISTAT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _S6_GMAC_MACMIISTAT@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	add	x0, x9, x8
	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
	b	_readl
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.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_MACMIICMD_READ,4,2     ; @S6_GMAC_MACMIICMD_READ
	.comm	_S6_GMAC_MACMIICMD,8,3          ; @S6_GMAC_MACMIICMD
	.comm	_S6_GMAC_MACMIISTAT,8,3         ; @S6_GMAC_MACMIISTAT
	.no_dead_strip	_s6mii_read
.subsections_via_symbols
