	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtlgen_read_mmd
_rtlgen_read_mmd:                       ## @rtlgen_read_mmd
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_MDIO_MMD_PCS@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_4
## %bb.1:
	movq	_MDIO_PCS_EEE_ABLE@GOTPCREL(%rip), %rax
	cmpq	%rdx, (%rax)
	jne	LBB0_4
## %bb.2:
	movq	%rbx, %rdi
	movl	$2652, %esi                     ## imm = 0xA5C
	callq	_rtl821x_write_page
	movq	%rbx, %rdi
	movl	$18, %esi
	jmp	LBB0_3
LBB0_4:
	movq	_MDIO_MMD_AN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%esi, %eax
	jne	LBB0_7
## %bb.5:
	movq	_MDIO_AN_EEE_ADV@GOTPCREL(%rip), %rcx
	cmpq	%rdx, (%rcx)
	jne	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	movl	$2653, %esi                     ## imm = 0xA5D
	callq	_rtl821x_write_page
	movq	%rbx, %rdi
	movl	$16, %esi
	jmp	LBB0_3
LBB0_7:
	cmpl	%esi, %eax
	jne	LBB0_10
## %bb.8:
	movq	_MDIO_AN_EEE_LPABLE@GOTPCREL(%rip), %rax
	cmpq	%rdx, (%rax)
	jne	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	movl	$2653, %esi                     ## imm = 0xA5D
	callq	_rtl821x_write_page
	movq	%rbx, %rdi
	movl	$17, %esi
LBB0_3:
	callq	___phy_read
	movl	%eax, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rtl821x_write_page
	movl	%r14d, %eax
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_10:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_MDIO_MMD_PCS,4,2               ## @MDIO_MMD_PCS
	.comm	_MDIO_PCS_EEE_ABLE,8,3          ## @MDIO_PCS_EEE_ABLE
	.comm	_MDIO_MMD_AN,4,2                ## @MDIO_MMD_AN
	.comm	_MDIO_AN_EEE_ADV,8,3            ## @MDIO_AN_EEE_ADV
	.comm	_MDIO_AN_EEE_LPABLE,8,3         ## @MDIO_AN_EEE_LPABLE
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.no_dead_strip	_rtlgen_read_mmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtlgen_read_mmd
_rtlgen_read_mmd:                       ; @rtlgen_read_mmd
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _MDIO_MMD_PCS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MDIO_MMD_PCS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _MDIO_PCS_EEE_ABLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MDIO_PCS_EEE_ABLE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	w8, w1
	ccmp	x9, x2, #0, eq
	b.eq	LBB0_4
; %bb.1:
Lloh6:
	adrp	x8, _MDIO_MMD_AN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MDIO_MMD_AN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _MDIO_AN_EEE_ADV@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MDIO_AN_EEE_ADV@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	w8, w1
	ccmp	x9, x2, #0, eq
	b.eq	LBB0_5
; %bb.2:
Lloh12:
	adrp	x9, _MDIO_AN_EEE_LPABLE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MDIO_AN_EEE_LPABLE@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	w8, w1
	ccmp	x9, x2, #0, eq
	b.eq	LBB0_6
; %bb.3:
Lloh15:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_4:
	mov	x0, x19
	mov	w1, #2652
	bl	_rtl821x_write_page
	mov	x0, x19
	mov	w1, #18
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	mov	w1, #2653
	bl	_rtl821x_write_page
	mov	x0, x19
	mov	w1, #16
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	mov	w1, #2653
	bl	_rtl821x_write_page
	mov	x0, x19
	mov	w1, #17
LBB0_7:
	bl	___phy_read
	mov	x20, x0
	mov	x0, x19
	mov	w1, #0
	bl	_rtl821x_write_page
	mov	x0, x20
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MDIO_MMD_PCS,4,2               ; @MDIO_MMD_PCS
	.comm	_MDIO_PCS_EEE_ABLE,8,3          ; @MDIO_PCS_EEE_ABLE
	.comm	_MDIO_MMD_AN,4,2                ; @MDIO_MMD_AN
	.comm	_MDIO_AN_EEE_ADV,8,3            ; @MDIO_AN_EEE_ADV
	.comm	_MDIO_AN_EEE_LPABLE,8,3         ; @MDIO_AN_EEE_LPABLE
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.no_dead_strip	_rtlgen_read_mmd
.subsections_via_symbols
