	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpmac_mdio_reset
_cpmac_mdio_reset:                      ## @cpmac_mdio_reset
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_AR7_RESET_BIT_MDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ar7_device_reset
	movl	(%rbx), %r14d
	movq	_CPMAC_MDIO_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_MDIOC_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_ar7_cpmac_freq
	cltq
	imulq	$511772685, %rax, %rax          ## imm = 0x1E81080D
	movq	%rax, %rcx
	sarq	$50, %rcx
	shrq	$63, %rax
	leal	(%rcx,%rax), %edi
	decl	%edi
	callq	_MDIOC_CLKDIV
	orl	%eax, %ebx
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_cpmac_write
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR7_RESET_BIT_MDIO,4,2         ## @AR7_RESET_BIT_MDIO
	.comm	_CPMAC_MDIO_CONTROL,4,2         ## @CPMAC_MDIO_CONTROL
	.comm	_MDIOC_ENABLE,4,2               ## @MDIOC_ENABLE
	.no_dead_strip	_cpmac_mdio_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpmac_mdio_reset
_cpmac_mdio_reset:                      ; @cpmac_mdio_reset
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _AR7_RESET_BIT_MDIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR7_RESET_BIT_MDIO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ar7_device_reset
	ldr	w19, [x19]
Lloh3:
	adrp	x8, _CPMAC_MDIO_CONTROL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CPMAC_MDIO_CONTROL@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
Lloh6:
	adrp	x8, _MDIOC_ENABLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MDIOC_ENABLE@GOTPAGEOFF]
Lloh8:
	ldr	w21, [x8]
	bl	_ar7_cpmac_freq
	mov	w8, #2061
	movk	w8, #7809, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #63
	asr	x8, x8, #50
	add	w8, w8, w9
	sub	w0, w8, #1
	bl	_MDIOC_CLKDIV
	orr	w2, w0, w21
	mov	x0, x19
	mov	x1, x20
	bl	_cpmac_write
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AR7_RESET_BIT_MDIO,4,2         ; @AR7_RESET_BIT_MDIO
	.comm	_CPMAC_MDIO_CONTROL,4,2         ; @CPMAC_MDIO_CONTROL
	.comm	_MDIOC_ENABLE,4,2               ; @MDIOC_ENABLE
	.no_dead_strip	_cpmac_mdio_reset
.subsections_via_symbols
