	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function davinci_mdio_init_clk
_davinci_mdio_init_clk:                 ## @davinci_mdio_init_clk
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	12(%rdi), %edi
	callq	_clk_get_rate
	movl	%eax, %ecx
	cltd
	idivl	8(%rbx)
	decl	%eax
	movq	_CONTROL_MAX_DIV@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	%edx, %eax
	cmovgel	%edx, %eax
	movl	%eax, (%rbx)
	imull	$1000, %eax, %esi               ## imm = 0x3E8
	addl	$1000, %esi                     ## imm = 0x3E8
	movl	%ecx, %eax
	cltd
	idivl	%esi
	movl	%eax, %ecx
	movl	$88000, %eax                    ## imm = 0x157C0
	xorl	%edx, %edx
	idivl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	leal	(,%rax,4), %edi
	callq	_usecs_to_jiffies
	testl	%eax, %eax
	movl	$1, %ecx
	cmovnel	%eax, %ecx
	movl	%ecx, 4(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONTROL_MAX_DIV,4,2            ## @CONTROL_MAX_DIV
	.no_dead_strip	_davinci_mdio_init_clk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function davinci_mdio_init_clk
_davinci_mdio_init_clk:                 ; @davinci_mdio_init_clk
	.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
	ldr	w0, [x0, #12]
	bl	_clk_get_rate
	ldr	w8, [x19, #8]
	sdiv	w8, w0, w8
Lloh0:
	adrp	x9, _CONTROL_MAX_DIV@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CONTROL_MAX_DIV@GOTPAGEOFF]
	sub	w8, w8, #1
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w8, w8, w9, lt
	str	w8, [x19]
	mov	w9, #1000
	mul	w8, w8, w9
	add	w8, w8, #1000
	sdiv	w8, w0, w8
	mov	w9, #22464
	movk	w9, #1, lsl #16
	sdiv	w8, w9, w8
	lsl	w0, w8, #2
	bl	_usecs_to_jiffies
	cmp	w0, #0
	csinc	w8, w0, wzr, ne
	str	w8, [x19, #4]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CONTROL_MAX_DIV,4,2            ; @CONTROL_MAX_DIV
	.no_dead_strip	_davinci_mdio_init_clk
.subsections_via_symbols
