	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lmc_mii_readreg                ## -- Begin function lmc_mii_readreg
	.p2align	4, 0x90
_lmc_mii_readreg:                       ## @lmc_mii_readreg
	.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	%esi, %r14d
	movq	%rdi, %r15
	shll	$5, %r14d
	orl	%edx, %r14d
	orl	$251904, %r14d                  ## imm = 0x3D800
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_lmc_trace
	movq	%r15, %rdi
	callq	_LMC_MII_SYNC
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_lmc_trace
	movl	$15, %r13d
	movq	_csr_9@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%ebx, %ebx
	btl	%r13d, %r14d
	setb	%bl
	shll	$17, %ebx
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_LMC_CSR_WRITE
	xorl	%eax, %eax
	callq	_lmc_delay
	movl	(%r12), %esi
	orl	$65536, %ebx                    ## imm = 0x10000
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_LMC_CSR_WRITE
	xorl	%eax, %eax
	callq	_lmc_delay
	addl	$-1, %r13d
	jb	LBB0_1
## %bb.2:
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_lmc_trace
	movl	$20, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %r14d
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	$262144, %edx                   ## imm = 0x40000
	callq	_LMC_CSR_WRITE
	xorl	%eax, %eax
	callq	_lmc_delay
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_LMC_CSR_READ
                                        ## kill: def $eax killed $eax def $rax
	shrl	$19, %eax
	andl	$1, %eax
	leal	(%rax,%r14,2), %r13d
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	$327680, %edx                   ## imm = 0x50000
	callq	_LMC_CSR_WRITE
	xorl	%eax, %eax
	callq	_lmc_delay
	decl	%ebx
	cmpl	$1, %ebx
	ja	LBB0_3
## %bb.4:
	movl	(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_lmc_trace
	movzwl	%r14w, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"lmc_mii_readreg in"

L_.str.1:                               ## @.str.1
	.asciz	"lmc_mii_readreg: done sync"

	.comm	_csr_9,4,2                      ## @csr_9
L_.str.2:                               ## @.str.2
	.asciz	"lmc_mii_readreg: done1"

L_.str.3:                               ## @.str.3
	.asciz	"lmc_mii_readreg out"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lmc_mii_readreg                ; -- Begin function lmc_mii_readreg
	.p2align	2
_lmc_mii_readreg:                       ; @lmc_mii_readreg
	.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, x0
	orr	w8, w2, w1, lsl #5
	mov	w9, #55296
	movk	w9, #3, lsl #16
	orr	w22, w8, w9
	ldr	w0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_lmc_trace
	mov	x0, x19
	bl	_LMC_MII_SYNC
	ldr	w0, [x19]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_lmc_trace
	mov	w23, #15
Lloh4:
	adrp	x21, _csr_9@GOTPAGE
Lloh5:
	ldr	x21, [x21, _csr_9@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	lsr	w8, w22, w23
	ubfiz	w20, w8, #17, #1
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_LMC_CSR_WRITE
	bl	_lmc_delay
	ldr	w1, [x21]
	orr	w2, w20, #0x10000
	mov	x0, x19
	bl	_LMC_CSR_WRITE
	bl	_lmc_delay
	sub	w23, w23, #1
	cmn	w23, #1
	b.ne	LBB0_1
; %bb.2:
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_lmc_trace
	mov	w23, #0
	mov	w22, #20
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x20, x23
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #262144
	bl	_LMC_CSR_WRITE
	bl	_lmc_delay
	lsl	w23, w23, #1
	ldr	w1, [x21]
	mov	x0, x19
	bl	_LMC_CSR_READ
	bfxil	w23, w0, #19, #1
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #327680
	bl	_LMC_CSR_WRITE
	bl	_lmc_delay
	sub	w22, w22, #1
	cmp	w22, #1
	b.hi	LBB0_3
; %bb.4:
	ldr	w0, [x19]
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_lmc_trace
	and	w0, w20, #0xffff
	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	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"lmc_mii_readreg in"

l_.str.1:                               ; @.str.1
	.asciz	"lmc_mii_readreg: done sync"

	.comm	_csr_9,4,2                      ; @csr_9
l_.str.2:                               ; @.str.2
	.asciz	"lmc_mii_readreg: done1"

l_.str.3:                               ; @.str.3
	.asciz	"lmc_mii_readreg out"

.subsections_via_symbols
