	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function emac_mii_reset
_emac_mii_reset:                        ## @emac_mii_reset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_emac_bus_frequency@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_mdio_max_freq@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_1
## %bb.2:
	cltd
	idivl	%ecx
	movl	%eax, %esi
	decl	%esi
	jmp	LBB0_3
LBB0_1:
	movl	$255, %esi
LBB0_3:
	movq	_MDIO_CONTROL_CLKDIV@GOTPCREL(%rip), %rax
	andl	(%rax), %esi
	movq	_MDIO_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MDIO_CONTROL_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	callq	_emac_mdio_write
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_emac_bus_frequency,4,2         ## @emac_bus_frequency
	.comm	_mdio_max_freq,4,2              ## @mdio_max_freq
	.comm	_MDIO_CONTROL_CLKDIV,4,2        ## @MDIO_CONTROL_CLKDIV
	.comm	_MDIO_CONTROL,4,2               ## @MDIO_CONTROL
	.comm	_MDIO_CONTROL_ENABLE,4,2        ## @MDIO_CONTROL_ENABLE
	.no_dead_strip	_emac_mii_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function emac_mii_reset
_emac_mii_reset:                        ; @emac_mii_reset
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _emac_bus_frequency@GOTPAGE
Lloh1:
	ldr	x8, [x8, _emac_bus_frequency@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _mdio_max_freq@GOTPAGE
Lloh4:
	ldr	x9, [x9, _mdio_max_freq@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	sdiv	w8, w8, w9
	sub	w8, w8, #1
	b	LBB0_3
LBB0_2:
	mov	w8, #255
LBB0_3:
Lloh6:
	adrp	x9, _MDIO_CONTROL_CLKDIV@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MDIO_CONTROL_CLKDIV@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _MDIO_CONTROL@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MDIO_CONTROL@GOTPAGEOFF]
	and	w8, w9, w8
Lloh11:
	ldr	w0, [x10]
Lloh12:
	adrp	x9, _MDIO_CONTROL_ENABLE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MDIO_CONTROL_ENABLE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_emac_mdio_write
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_emac_bus_frequency,4,2         ; @emac_bus_frequency
	.comm	_mdio_max_freq,4,2              ; @mdio_max_freq
	.comm	_MDIO_CONTROL_CLKDIV,4,2        ; @MDIO_CONTROL_CLKDIV
	.comm	_MDIO_CONTROL,4,2               ; @MDIO_CONTROL
	.comm	_MDIO_CONTROL_ENABLE,4,2        ; @MDIO_CONTROL_ENABLE
	.no_dead_strip	_emac_mii_reset
.subsections_via_symbols
