	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dnet_mdio_read
_dnet_mdio_read:                        ## @dnet_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, %r14d
	movl	%esi, %r15d
	movq	(%rdi), %rbx
	movq	_DNET_INTERNAL_GMII_MNG_CTL_REG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_dnet_readw_mac
	movq	_DNET_INTERNAL_GMII_MNG_CMD_FIN@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	jne	LBB0_3
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_dnet_readw_mac
	testl	%eax, (%r13)
	je	LBB0_1
LBB0_3:
	andl	$31, %r15d
	andl	$31, %r14d
	movl	%r15d, %edx
	shll	$8, %edx
	orl	%r14d, %edx
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_dnet_writew_mac
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_dnet_readw_mac
	testl	%eax, (%r13)
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	jmp	LBB0_5
LBB0_6:
	movq	_DNET_INTERNAL_GMII_MNG_DAT_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dnet_readw_mac
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_pr_debug
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DNET_INTERNAL_GMII_MNG_CTL_REG,4,2 ## @DNET_INTERNAL_GMII_MNG_CTL_REG
	.comm	_DNET_INTERNAL_GMII_MNG_CMD_FIN,4,2 ## @DNET_INTERNAL_GMII_MNG_CMD_FIN
	.comm	_DNET_INTERNAL_GMII_MNG_DAT_REG,4,2 ## @DNET_INTERNAL_GMII_MNG_DAT_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mdio_read %02x:%02x <- %04x\n"

	.no_dead_strip	_dnet_mdio_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dnet_mdio_read
_dnet_mdio_read:                        ; @dnet_mdio_read
	.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	x21, x2
	mov	x20, x1
	ldr	x19, [x0]
Lloh0:
	adrp	x22, _DNET_INTERNAL_GMII_MNG_CTL_REG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DNET_INTERNAL_GMII_MNG_CTL_REG@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_dnet_readw_mac
Lloh2:
	adrp	x23, _DNET_INTERNAL_GMII_MNG_CMD_FIN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _DNET_INTERNAL_GMII_MNG_CMD_FIN@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_cpu_relax
	ldr	w1, [x22]
	mov	x0, x19
	bl	_dnet_readw_mac
	b	LBB0_1
LBB0_3:
	and	w20, w20, #0x1f
	and	w21, w21, #0x1f
	mov	x2, x21
	bfi	w2, w20, #8, #5
	ldr	w1, [x22]
	mov	x0, x19
	bl	_dnet_writew_mac
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_dnet_readw_mac
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_cpu_relax
	b	LBB0_4
LBB0_6:
Lloh4:
	adrp	x8, _DNET_INTERNAL_GMII_MNG_DAT_REG@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DNET_INTERNAL_GMII_MNG_DAT_REG@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dnet_readw_mac
	mov	x19, x0
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	mov	x3, x19
	bl	_pr_debug
	mov	x0, x19
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_DNET_INTERNAL_GMII_MNG_CTL_REG,4,2 ; @DNET_INTERNAL_GMII_MNG_CTL_REG
	.comm	_DNET_INTERNAL_GMII_MNG_CMD_FIN,4,2 ; @DNET_INTERNAL_GMII_MNG_CMD_FIN
	.comm	_DNET_INTERNAL_GMII_MNG_DAT_REG,4,2 ; @DNET_INTERNAL_GMII_MNG_DAT_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mdio_read %02x:%02x <- %04x\n"

	.no_dead_strip	_dnet_mdio_read
.subsections_via_symbols
