	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_calculate_wm
_intel_calculate_wm:                    ## @intel_calculate_wm
	.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
	movl	%edx, %r15d
	movq	%rsi, %r14
	movl	%r8d, %eax
	imulq	$1374389535, %rax, %rdx         ## imm = 0x51EB851F
	shrq	$37, %rdx
	movl	%ecx, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_intel_wm_method1
	movl	12(%r14), %esi
	movl	%eax, %edi
	callq	_DIV_ROUND_UP
	movl	%eax, %ebx
	addl	(%r14), %ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_DRM_DEBUG_KMS
	subl	%ebx, %r15d
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	callq	_DRM_DEBUG_KMS
	movl	4(%r14), %eax
	cmpl	%eax, %r15d
	cmovgel	%eax, %r15d
	testl	%r15d, %r15d
	jg	LBB0_2
## %bb.1:
	movl	8(%r14), %r15d
LBB0_2:
	cmpl	$9, %r15d
	movl	$8, %eax
	cmovgel	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FIFO entries required for mode: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"FIFO watermark level: %d\n"

	.no_dead_strip	_intel_calculate_wm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_calculate_wm
_intel_calculate_wm:                    ; @intel_calculate_wm
	.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	x20, x2
	mov	x19, x1
	mov	w8, #34079
	movk	w8, #20971, lsl #16
	umull	x8, w4, w8
	lsr	x2, x8, #37
	mov	x1, x3
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_intel_wm_method1
	ldr	w1, [x19, #12]
	bl	_DIV_ROUND_UP
	ldr	w8, [x19]
	add	w21, w8, w0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_DRM_DEBUG_KMS
	sub	w20, w20, w21
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x19, #4]
	cmp	w20, w8
	csel	w8, w20, w8, lt
	cmp	w8, #0
	b.gt	LBB0_2
; %bb.1:
	ldr	w8, [x19, #8]
LBB0_2:
	mov	w9, #8
	cmp	w8, #8
	csel	w0, w8, w9, gt
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FIFO entries required for mode: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"FIFO watermark level: %d\n"

	.no_dead_strip	_intel_calculate_wm
.subsections_via_symbols
