	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function malidp500_se_calc_mclk
_malidp500_se_calc_mclk:                ## @malidp500_se_calc_mclk
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdx), %rcx
	cmpq	$0, 24(%rsi)
	je	LBB0_1
## %bb.2:
	movq	(%rsi), %rax
	movdqu	8(%rdx), %xmm0
	movdqu	24(%rdx), %xmm1
	paddq	%xmm0, %xmm1
	pshufd	$238, %xmm1, %xmm0              ## xmm0 = xmm1[2,3,2,3]
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rbx
	imulq	8(%rsi), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,2), %rax
	imulq	16(%rsi), %rbx
	movq	%rax, %rdx
	orq	%rbx, %rdx
	shrq	$32, %rdx
	je	LBB0_3
## %bb.4:
	xorl	%edx, %edx
	divq	%rbx
	jmp	LBB0_5
LBB0_1:
	movl	$10, %r14d
	jmp	LBB0_6
LBB0_3:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ebx
                                        ## kill: def $eax killed $eax def $rax
LBB0_5:
	cmpq	$16, %rax
	movl	$15, %r14d
	cmovaeq	%rax, %r14
LBB0_6:
	imulq	%rcx, %r14
	movabsq	$-3689348814741910323, %rcx     ## imm = 0xCCCCCCCCCCCCCCCD
	movq	%r14, %rax
	mulq	%rcx
	movq	%rdx, %rbx
	shrq	$3, %rbx
	movl	(%rdi), %edi
	callq	_clk_get_rate
	cmpq	%rbx, %rax
	jae	LBB0_8
## %bb.7:
	movabsq	$3777893186295716171, %rcx      ## imm = 0x346DC5D63886594B
	movq	%r14, %rax
	mulq	%rcx
	shrq	$11, %rdx
	leaq	L_.str(%rip), %rdi
	movq	%rdx, %rsi
	callq	_DRM_DEBUG_DRIVER
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mclk requirement of %lu kHz can't be met.\n"

	.comm	_EINVAL,8,3                     ## @EINVAL
	.no_dead_strip	_malidp500_se_calc_mclk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function malidp500_se_calc_mclk
_malidp500_se_calc_mclk:                ; @malidp500_se_calc_mclk
	.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
	ldr	x8, [x2]
	ldr	x9, [x1, #24]
	cbz	x9, LBB0_2
; %bb.1:
	ldp	x9, x10, [x1]
	ldp	x11, x12, [x2, #8]
	ldp	x13, x14, [x2, #24]
	add	x11, x12, x11
	add	x11, x11, x13
	add	x11, x11, x14
	mul	x9, x9, x10
	lsl	x10, x9, #4
	sub	x9, x10, x9
	ldr	x10, [x1, #16]
	mul	x10, x11, x10
	udiv	x9, x9, x10
	mov	w10, #15
	cmp	x9, #15
	csel	x9, x9, x10, hi
	b	LBB0_3
LBB0_2:
	mov	w9, #10
LBB0_3:
	mul	x19, x9, x8
	mov	x8, #-3689348814741910324
	movk	x8, #52429
	umulh	x20, x19, x8
	ldr	w0, [x0]
	bl	_clk_get_rate
	cmp	x0, x20, lsr #3
	b.hs	LBB0_5
; %bb.4:
	mov	x8, #22859
	movk	x8, #14470, lsl #16
	movk	x8, #50646, lsl #32
	movk	x8, #13421, lsl #48
	umulh	x8, x19, x8
	lsr	x1, x8, #11
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	neg	x0, x8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mclk requirement of %lu kHz can't be met.\n"

	.comm	_EINVAL,8,3                     ; @EINVAL
	.no_dead_strip	_malidp500_se_calc_mclk
.subsections_via_symbols
