	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jme_mdio_read
_jme_mdio_read:                         ## @jme_mdio_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	%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	%edx, %ebx
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	callq	_netdev_priv
	movq	%rax, %r12
	movq	_MII_BMSR@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	cmpl	%ebx, (%rax)
	sete	%r15b
                                        ## implicit-def: $r13d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	testl	%ebx, %ebx
	je	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	subl	$1, %r15d
	jb	LBB0_9
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	_JME_SMI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_SMI_OP_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_smi_phy_addr
	movl	%eax, %r14d
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_smi_reg_addr
	orl	%eax, %r14d
	orl	%ebx, %r14d
	movq	%r12, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	callq	_jwrite32
	xorl	%eax, %eax
	callq	_wmb
	movq	_JME_PHY_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	$50, %eax, %ebx
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%ebx, %ebx
	movl	$1, %r14d
	cmovlel	%ebx, %r14d
	decl	%r14d
	incl	%ebx
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	$20, %edi
	callq	_udelay
	movq	_JME_SMI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_jread32
	movl	%eax, %r13d
	movq	_SMI_OP_REQ@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	decl	%ebx
	cmpl	$1, %ebx
	jg	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r14d, %ebx
	jmp	LBB0_6
LBB0_9:
	movq	_SMI_DATA_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	movq	_SMI_DATA_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r13d
	jmp	LBB0_10
LBB0_7:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	_jeprintk
	xorl	%r13d, %r13d
LBB0_10:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_BMSR,4,2                   ## @MII_BMSR
	.comm	_JME_SMI,4,2                    ## @JME_SMI
	.comm	_SMI_OP_REQ,4,2                 ## @SMI_OP_REQ
	.comm	_JME_PHY_TIMEOUT,4,2            ## @JME_PHY_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phy(%d) read timeout : %d\n"

	.comm	_SMI_DATA_MASK,4,2              ## @SMI_DATA_MASK
	.comm	_SMI_DATA_SHIFT,4,2             ## @SMI_DATA_SHIFT
	.no_dead_strip	_jme_mdio_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jme_mdio_read
_jme_mdio_read:                         ; @jme_mdio_read
	.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	x19, x2
	mov	x20, x1
	bl	_netdev_priv
	mov	x21, x0
Lloh0:
	adrp	x8, _MII_BMSR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_BMSR@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
Lloh3:
	adrp	x24, _JME_SMI@GOTPAGE
Lloh4:
	ldr	x24, [x24, _JME_SMI@GOTPAGEOFF]
	ldr	w22, [x24]
Lloh5:
	adrp	x25, _SMI_OP_REQ@GOTPAGE
Lloh6:
	ldr	x25, [x25, _SMI_OP_REQ@GOTPAGEOFF]
	ldr	w26, [x25]
	mov	x0, x20
	bl	_smi_phy_addr
	orr	w26, w0, w26
	mov	x0, x19
	bl	_smi_reg_addr
	orr	w2, w26, w0
	mov	x0, x21
	mov	x1, x22
	bl	_jwrite32
	bl	_wmb
Lloh7:
	adrp	x26, _JME_PHY_TIMEOUT@GOTPAGE
Lloh8:
	ldr	x26, [x26, _JME_PHY_TIMEOUT@GOTPAGEOFF]
	ldr	w9, [x26]
	mov	w8, #50
	mul	w8, w9, w8
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.1:
	cmp	w8, #1
	csinc	w9, w8, wzr, lt
	sub	w27, w9, #1
	add	w28, w8, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #20
	bl	_udelay
	ldr	w1, [x24]
	mov	x0, x21
	bl	_jread32
	mov	x22, x0
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w28, w28, #1
	cmp	w28, #1
	b.gt	LBB0_2
; %bb.4:
	cbnz	w27, LBB0_6
	b	LBB0_14
LBB0_5:
	mov	x27, x8
                                        ; implicit-def: $w22
	cbz	w27, LBB0_14
LBB0_6:
	cmp	w23, w19
	b.ne	LBB0_12
; %bb.7:
	ldr	w23, [x24]
	ldr	w27, [x25]
	mov	x0, x20
	bl	_smi_phy_addr
	orr	w27, w0, w27
	mov	x0, x19
	bl	_smi_reg_addr
	orr	w2, w27, w0
	mov	x0, x21
	mov	x1, x23
	bl	_jwrite32
	bl	_wmb
	ldr	w9, [x26]
	mov	w8, #50
	mul	w8, w9, w8
	cmp	w9, #1
	b.lt	LBB0_13
; %bb.8:
	cmp	w8, #1
	csinc	w9, w8, wzr, lt
	sub	w23, w9, #1
	add	w26, w8, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #20
	bl	_udelay
	ldr	w1, [x24]
	mov	x0, x21
	bl	_jread32
	mov	x22, x0
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	sub	w26, w26, #1
	cmp	w26, #1
	b.gt	LBB0_9
; %bb.11:
	cbz	w23, LBB0_14
LBB0_12:
Lloh9:
	adrp	x8, _SMI_DATA_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SMI_DATA_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	and	w8, w8, w22
Lloh12:
	adrp	x9, _SMI_DATA_SHIFT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SMI_DATA_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	asr	w0, w8, w9
	b	LBB0_15
LBB0_13:
	mov	x23, x8
	cbnz	w23, LBB0_12
LBB0_14:
	ldr	w0, [x21]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	bl	_jeprintk
	mov	w0, #0
LBB0_15:
	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	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_BMSR,4,2                   ; @MII_BMSR
	.comm	_JME_SMI,4,2                    ; @JME_SMI
	.comm	_SMI_OP_REQ,4,2                 ; @SMI_OP_REQ
	.comm	_JME_PHY_TIMEOUT,4,2            ; @JME_PHY_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phy(%d) read timeout : %d\n"

	.comm	_SMI_DATA_MASK,4,2              ; @SMI_DATA_MASK
	.comm	_SMI_DATA_SHIFT,4,2             ; @SMI_DATA_SHIFT
	.no_dead_strip	_jme_mdio_read
.subsections_via_symbols
