	.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, %r15d
	movl	%esi, %r14d
	callq	_netdev_priv
	movq	%rax, %r12
	shll	$5, %r14d
	orl	%r15d, %r14d
	movq	%rax, %rdi
	callq	_spin_lock_bh
	movq	_mii_preamble_required@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movl	$32, %esi
	callq	_mdio_sync
LBB0_2:
	orl	$251904, %r14d                  ## imm = 0x3D800
	movl	$14, %r13d
	movq	_Wn4_PhysicalMgmt@GOTPCREL(%rip), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rax), %ebx
	movl	(%r15), %ecx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	$4, %edx
	callq	_window_write16
	movq	%r12, %rdi
	callq	_mdio_delay
	movq	_MDIO_SHIFT_CLK@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r15), %ecx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	$4, %edx
	callq	_window_write16
	movq	%r12, %rdi
	callq	_mdio_delay
	addl	$-1, %r13d
	jae	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	btl	%r13d, %r14d
	movq	_MDIO_DATA_WRITE1@GOTPCREL(%rip), %rax
	jb	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_MDIO_DATA_WRITE0@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_6:
	xorl	%r13d, %r13d
	movl	$20, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
                                        ## kill: def $r13d killed $r13d def $r13
	movq	%r15, %r14
	movq	_MDIO_ENB_IN@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	(%r14), %ecx
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_window_write16
	movq	%r12, %rdi
	callq	_mdio_delay
	movl	(%r14), %edx
	movq	%r12, %rdi
	movl	$4, %esi
	callq	_window_read16
	xorl	%ecx, %ecx
	movq	_MDIO_DATA_READ@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	setne	%cl
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	leal	(%rcx,%r13,2), %r13d
	movq	_MDIO_SHIFT_CLK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r15), %esi
	movq	%r14, %r15
	movl	(%r14), %ecx
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_window_write16
	movq	%r12, %rdi
	callq	_mdio_delay
	decl	%ebx
	cmpl	$1, %ebx
	ja	LBB0_7
## %bb.8:
	movq	%r12, %rdi
	callq	_spin_unlock_bh
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testl	$65536, %eax                    ## imm = 0x10000
	movzwl	%ax, %ecx
	movl	$65535, %eax                    ## imm = 0xFFFF
	cmovel	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mii_preamble_required,8,3      ## @mii_preamble_required
	.comm	_MDIO_DATA_WRITE1,4,2           ## @MDIO_DATA_WRITE1
	.comm	_MDIO_DATA_WRITE0,4,2           ## @MDIO_DATA_WRITE0
	.comm	_Wn4_PhysicalMgmt,4,2           ## @Wn4_PhysicalMgmt
	.comm	_MDIO_SHIFT_CLK,4,2             ## @MDIO_SHIFT_CLK
	.comm	_MDIO_ENB_IN,4,2                ## @MDIO_ENB_IN
	.comm	_MDIO_DATA_READ,4,2             ## @MDIO_DATA_READ
	.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:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	orr	w20, w20, w21, lsl #5
	mov	w21, #55296
	movk	w21, #3, lsl #16
	bl	_spin_lock_bh
Lloh0:
	adrp	x8, _mii_preamble_required@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mii_preamble_required@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #32
	bl	_mdio_sync
LBB0_2:
	orr	w23, w20, w21
	mov	w24, #14
Lloh3:
	adrp	x25, _MDIO_DATA_WRITE1@GOTPAGE
Lloh4:
	ldr	x25, [x25, _MDIO_DATA_WRITE1@GOTPAGEOFF]
Lloh5:
	adrp	x26, _MDIO_DATA_WRITE0@GOTPAGE
Lloh6:
	ldr	x26, [x26, _MDIO_DATA_WRITE0@GOTPAGEOFF]
Lloh7:
	adrp	x21, _Wn4_PhysicalMgmt@GOTPAGE
Lloh8:
	ldr	x21, [x21, _Wn4_PhysicalMgmt@GOTPAGEOFF]
Lloh9:
	adrp	x22, _MDIO_SHIFT_CLK@GOTPAGE
Lloh10:
	ldr	x22, [x22, _MDIO_SHIFT_CLK@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	lsr	w8, w23, w24
	tst	w8, #0x1
	csel	x8, x26, x25, eq
	ldr	w20, [x8]
	ldr	w3, [x21]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #4
	bl	_window_write16
	mov	x0, x19
	bl	_mdio_delay
	ldr	w8, [x22]
	orr	w1, w8, w20
	ldr	w3, [x21]
	mov	x0, x19
	mov	w2, #4
	bl	_window_write16
	mov	x0, x19
	bl	_mdio_delay
	sub	w24, w24, #1
	cmn	w24, #1
	b.ne	LBB0_3
; %bb.4:
	mov	w26, #0
	mov	w20, #20
Lloh11:
	adrp	x24, _MDIO_ENB_IN@GOTPAGE
Lloh12:
	ldr	x24, [x24, _MDIO_ENB_IN@GOTPAGEOFF]
Lloh13:
	adrp	x25, _MDIO_DATA_READ@GOTPAGE
Lloh14:
	ldr	x25, [x25, _MDIO_DATA_READ@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x23, x26
	ldr	w1, [x24]
	ldr	w3, [x21]
	mov	x0, x19
	mov	w2, #4
	bl	_window_write16
	mov	x0, x19
	bl	_mdio_delay
	ldr	w2, [x21]
	mov	x0, x19
	mov	w1, #4
	bl	_window_read16
	ldr	w8, [x25]
	tst	w8, w0
	cset	w26, ne
	bfi	w26, w23, #1, #31
	ldr	w8, [x24]
	ldr	w9, [x22]
	orr	w1, w9, w8
	ldr	w3, [x21]
	mov	x0, x19
	mov	w2, #4
	bl	_window_write16
	mov	x0, x19
	bl	_mdio_delay
	sub	w20, w20, #1
	cmp	w20, #1
	b.hi	LBB0_5
; %bb.6:
	mov	x0, x19
	bl	_spin_unlock_bh
	and	w8, w23, #0xffff
	tst	w23, #0x10000
	mov	w9, #65535
	csel	w0, w8, w9, eq
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_mii_preamble_required,8,3      ; @mii_preamble_required
	.comm	_MDIO_DATA_WRITE1,4,2           ; @MDIO_DATA_WRITE1
	.comm	_MDIO_DATA_WRITE0,4,2           ; @MDIO_DATA_WRITE0
	.comm	_Wn4_PhysicalMgmt,4,2           ; @Wn4_PhysicalMgmt
	.comm	_MDIO_SHIFT_CLK,4,2             ; @MDIO_SHIFT_CLK
	.comm	_MDIO_ENB_IN,4,2                ; @MDIO_ENB_IN
	.comm	_MDIO_DATA_READ,4,2             ; @MDIO_DATA_READ
	.no_dead_strip	_mdio_read
.subsections_via_symbols
