	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_mii_word
_read_mii_word:                         ## @read_mii_word
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PHY_READ@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%esi, -60(%rbp)
	movq	_PHY_GO@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	$0, -56(%rbp)
	movl	%edx, -64(%rbp)
	movq	_PHYADD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-60(%rbp), %r15
	movl	$12, %edx
	movq	%r15, %rcx
	callq	_set_registers
	movq	_PHYCNT@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-64(%rbp), %rcx
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_set_registers
	xorl	%r14d, %r14d
	movq	_MII_TIMEOUT@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	movq	%r15, %rcx
	callq	_get_registers
	movq	_PHY_GO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -60(%rbp)
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%r14), %edx
	movl	(%r12), %ecx
	cmpl	%ecx, %r14d
	movl	%edx, %r14d
	jl	LBB0_1
	jmp	LBB0_4
LBB0_2:
	movl	(%r12), %ecx
	movl	%r14d, %edx
LBB0_4:
	movl	$1, %eax
	cmpl	%ecx, %edx
	jge	LBB0_6
## %bb.5:
	movq	_PHYDAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-60(%rbp), %rcx
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_get_registers
	movl	-56(%rbp), %eax
	shll	$8, %eax
	orl	-60(%rbp), %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%eax, %eax
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_8
## %bb.7:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_READ,4,2                   ## @PHY_READ
	.comm	_PHY_GO,4,2                     ## @PHY_GO
	.comm	_PHYADD,4,2                     ## @PHYADD
	.comm	_PHYCNT,4,2                     ## @PHYCNT
	.comm	_MII_TIMEOUT,4,2                ## @MII_TIMEOUT
	.comm	_PHYDAT,4,2                     ## @PHYDAT
	.no_dead_strip	_read_mii_word
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_mii_word
_read_mii_word:                         ; @read_mii_word
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x3
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	str	xzr, [sp, #16]
	str	w1, [sp, #12]
Lloh3:
	adrp	x8, _PHY_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PHY_READ@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	orr	w8, w8, w2
Lloh6:
	adrp	x21, _PHY_GO@GOTPAGE
Lloh7:
	ldr	x21, [x21, _PHY_GO@GOTPAGEOFF]
	ldr	w9, [x21]
	orr	w8, w8, w9
	str	w8, [sp, #8]
Lloh8:
	adrp	x8, _PHYADD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PHYADD@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x3, sp, #12
	mov	w2, #12
	bl	_set_registers
Lloh11:
	adrp	x22, _PHYCNT@GOTPAGE
Lloh12:
	ldr	x22, [x22, _PHYCNT@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x3, sp, #8
	mov	x0, x20
	mov	w2, #1
	bl	_set_registers
	mov	w23, #0
Lloh13:
	adrp	x24, _MII_TIMEOUT@GOTPAGE
Lloh14:
	ldr	x24, [x24, _MII_TIMEOUT@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	add	x3, sp, #12
	mov	x0, x20
	mov	w2, #1
	bl	_get_registers
	ldr	w8, [sp, #12]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w9, w23, #1
	ldr	w8, [x24]
	cmp	w23, w8
	mov	x23, x9
	b.lt	LBB0_1
; %bb.3:
	mov	x23, x9
	cmp	w23, w8
	b.lt	LBB0_6
LBB0_4:
	mov	w0, #1
	b	LBB0_7
LBB0_5:
	ldr	w8, [x24]
	cmp	w23, w8
	b.ge	LBB0_4
LBB0_6:
Lloh15:
	adrp	x8, _PHYDAT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PHYDAT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x3, sp, #12
	mov	x0, x20
	mov	w2, #2
	bl	_get_registers
	mov	w0, #0
	ldp	w8, w9, [sp, #12]
	orr	w8, w8, w9, lsl #8
	str	w8, [x19]
LBB0_7:
	ldr	x8, [sp, #24]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	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
	add	sp, sp, #96
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_READ,4,2                   ; @PHY_READ
	.comm	_PHY_GO,4,2                     ; @PHY_GO
	.comm	_PHYADD,4,2                     ; @PHYADD
	.comm	_PHYCNT,4,2                     ; @PHYCNT
	.comm	_MII_TIMEOUT,4,2                ; @MII_TIMEOUT
	.comm	_PHYDAT,4,2                     ; @PHYDAT
	.no_dead_strip	_read_mii_word
.subsections_via_symbols
