	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mdio_read
_mdio_read:                             ## @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
	pushq	%rax
	.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, %r14d
	callq	_netdev_priv
	movq	%rax, %r13
	movq	_Config4@GOTPCREL(%rip), %rax
	movslq	(%rax), %r12
	addq	(%r13), %r12
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_DPRINTK
	cmpl	$32, %r14d
	jl	LBB0_4
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DPRINTK
	cmpl	$7, %ebx
	jg	LBB0_11
## %bb.2:
	movq	_mii_2_8139_map@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	movslq	(%rax,%rcx,4), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.3:
	addq	(%r13), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_readw                          ## TAILCALL
LBB0_4:
	shll	$5, %r14d
	orl	%ebx, %r14d
	orl	$251904, %r14d                  ## imm = 0x3D800
	movq	%r12, %rdi
	callq	_mdio_sync
	movl	$15, %r13d
	movq	_MDIO_DIR@GOTPCREL(%rip), %r15
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r15), %edi
	orl	%ebx, %edi
	movq	%r12, %rsi
	callq	_writeb
	xorl	%eax, %eax
	callq	_mdio_delay
	orl	(%r15), %ebx
	movq	_MDIO_CLK@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	_writeb
	xorl	%eax, %eax
	callq	_mdio_delay
	addl	$-1, %r13d
	jae	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	btl	%r13d, %r14d
	movl	$0, %ebx
	jae	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_MDIO_DATA_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_7
LBB0_8:
	movl	$20, %ebx
	xorl	%r15d, %r15d
	movq	_MDIO_CLK@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %r13d
	xorl	%edi, %edi
	movq	%r12, %rsi
	callq	_writeb
	xorl	%eax, %eax
	callq	_mdio_delay
	movq	%r12, %rdi
	callq	_readb
	xorl	%ecx, %ecx
	movq	_MDIO_DATA_IN@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	setne	%cl
	leal	(%rcx,%r13,2), %r15d
	movl	(%r14), %edi
	movq	%r12, %rsi
	callq	_writeb
	xorl	%eax, %eax
	callq	_mdio_delay
	decl	%ebx
	cmpl	$1, %ebx
	ja	LBB0_9
## %bb.10:
	movzwl	%r13w, %r15d
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_DPRINTK
LBB0_11:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Config4,4,2                    ## @Config4
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ENTER\n"

L_.str.1:                               ## @.str.1
	.asciz	"EXIT after directly using 8139 internal regs\n"

	.comm	_mii_2_8139_map,8,3             ## @mii_2_8139_map
	.comm	_MDIO_DATA_OUT,4,2              ## @MDIO_DATA_OUT
	.comm	_MDIO_DIR,4,2                   ## @MDIO_DIR
	.comm	_MDIO_CLK,4,2                   ## @MDIO_CLK
	.comm	_MDIO_DATA_IN,4,2               ## @MDIO_DATA_IN
L_.str.2:                               ## @.str.2
	.asciz	"EXIT, returning %d\n"

	.no_dead_strip	_mdio_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mdio_read
_mdio_read:                             ; @mdio_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x2
	mov	x21, x1
	bl	_netdev_priv
	mov	x19, x0
	ldr	x22, [x0]
Lloh0:
	adrp	x8, _Config4@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Config4@GOTPAGEOFF]
Lloh2:
	ldrsw	x23, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINTK
	cmp	w21, #32
	b.lt	LBB0_4
; %bb.1:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DPRINTK
	cmp	w20, #7
	b.gt	LBB0_9
; %bb.2:
Lloh7:
	adrp	x8, _mii_2_8139_map@GOTPAGE
Lloh8:
	ldr	x8, [x8, _mii_2_8139_map@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldrsw	x8, [x8, w20, sxtw #2]
	cbz	w8, LBB0_9
; %bb.3:
	ldr	x9, [x19]
	add	x0, x9, x8
	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
	add	sp, sp, #96
	b	_readw
LBB0_4:
	add	x19, x22, x23
	orr	w8, w20, w21, lsl #5
	mov	w9, #55296
	movk	w9, #3, lsl #16
	orr	w21, w8, w9
	mov	x0, x19
	bl	_mdio_sync
	mov	w22, #15
Lloh10:
	adrp	x23, _MDIO_DATA_OUT@GOTPAGE
Lloh11:
	ldr	x23, [x23, _MDIO_DATA_OUT@GOTPAGEOFF]
Lloh12:
	adrp	x24, _MDIO_DIR@GOTPAGE
Lloh13:
	ldr	x24, [x24, _MDIO_DIR@GOTPAGEOFF]
Lloh14:
	adrp	x20, _MDIO_CLK@GOTPAGE
Lloh15:
	ldr	x20, [x20, _MDIO_CLK@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	lsr	w9, w21, w22
	sbfx	w9, w9, #0, #1
	and	w25, w9, w8
	ldr	w8, [x24]
	orr	w0, w8, w25
	mov	x1, x19
	bl	_writeb
	bl	_mdio_delay
	ldr	w8, [x24]
	orr	w8, w8, w25
	ldr	w9, [x20]
	orr	w0, w8, w9
	mov	x1, x19
	bl	_writeb
	bl	_mdio_delay
	sub	w22, w22, #1
	cmn	w22, #1
	b.ne	LBB0_5
; %bb.6:
	mov	w24, #0
	mov	w21, #20
Lloh16:
	adrp	x22, _MDIO_DATA_IN@GOTPAGE
Lloh17:
	ldr	x22, [x22, _MDIO_DATA_IN@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x23, x24
	mov	w0, #0
	mov	x1, x19
	bl	_writeb
	bl	_mdio_delay
	mov	x0, x19
	bl	_readb
	ldr	w8, [x22]
	tst	w8, w0
	cset	w24, ne
	bfi	w24, w23, #1, #31
	ldr	w0, [x20]
	mov	x1, x19
	bl	_writeb
	bl	_mdio_delay
	sub	w21, w21, #1
	cmp	w21, #1
	b.hi	LBB0_7
; %bb.8:
	and	w19, w23, #0xffff
	str	x19, [sp]
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DPRINTK
	b	LBB0_10
LBB0_9:
	mov	w19, #0
LBB0_10:
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_Config4,4,2                    ; @Config4
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ENTER\n"

l_.str.1:                               ; @.str.1
	.asciz	"EXIT after directly using 8139 internal regs\n"

	.comm	_mii_2_8139_map,8,3             ; @mii_2_8139_map
	.comm	_MDIO_DATA_OUT,4,2              ; @MDIO_DATA_OUT
	.comm	_MDIO_DIR,4,2                   ; @MDIO_DIR
	.comm	_MDIO_CLK,4,2                   ; @MDIO_CLK
	.comm	_MDIO_DATA_IN,4,2               ; @MDIO_DATA_IN
l_.str.2:                               ; @.str.2
	.asciz	"EXIT, returning %d\n"

	.no_dead_strip	_mdio_read
.subsections_via_symbols
