	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function skl_compute_wm_params
_skl_compute_wm_params:                 ## @skl_compute_wm_params
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movl	%r8d, %r13d
	movq	%rcx, %r12
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_to_intel_crtc
	movl	(%rax), %edi
	callq	_to_i915
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	cmpl	$1, 24(%rbp)
	jne	LBB0_3
## %bb.1:
	movl	8(%r14), %edi
	callq	_is_planar_yuv_format
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_I915_FORMAT_MOD_Y_TILED@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	sete	%al
	movq	_I915_FORMAT_MOD_Yf_TILED@GOTPCREL(%rip), %rcx
	cmpq	%r12, (%rcx)
	movq	16(%rbp), %r13
	sete	%cl
	orb	%al, %cl
	movq	_I915_FORMAT_MOD_Y_TILED_CCS@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	sete	%al
	movq	_I915_FORMAT_MOD_Yf_TILED_CCS@GOTPCREL(%rip), %rsi
	cmpq	%r12, (%rsi)
	sete	%dl
	orb	%al, %dl
	orb	%cl, %dl
	movzbl	%dl, %ecx
	movl	%ecx, (%r13)
	movq	_I915_FORMAT_MOD_X_TILED@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	%r12, (%rcx)
	sete	%dl
	movl	%edx, 4(%r13)
	cmpq	%r12, (%rsi)
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %eax
	movl	%eax, 8(%r13)
	movl	8(%r14), %edi
	callq	_is_planar_yuv_format
	movl	%r15d, %ecx
	shrl	$31, %ecx
	addl	%r15d, %ecx
	sarl	%ecx
	testq	%rax, %rax
	cmovel	%r15d, %ecx
	movl	24(%rbp), %edx
	cmpl	$1, %edx
	movq	%rax, 64(%r13)
	cmovnel	%r15d, %ecx
	movl	%ecx, 12(%r13)
	movq	(%r14), %rax
	movslq	%edx, %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 16(%r13)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 56(%r13)
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_INTEL_GEN
	cmpl	$11, %eax
	jl	LBB0_6
## %bb.4:
	movq	_I915_FORMAT_MOD_Yf_TILED@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jne	LBB0_6
## %bb.5:
	movl	$256, %eax                      ## imm = 0x100
	cmpl	$1, 16(%r13)
	je	LBB0_7
LBB0_6:
	movl	$512, %eax                      ## imm = 0x200
LBB0_7:
	movl	%eax, 20(%r13)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_drm_rotation_90_or_270
	movl	$4, %ecx
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	movl	16(%r13), %edi
	cmpl	$1, %edi
	je	LBB0_9
## %bb.10:
	cmpl	$4, %edi
	je	LBB0_13
## %bb.11:
	cmpl	$2, %edi
	jne	LBB0_17
## %bb.12:
	movl	$8, %ecx
	jmp	LBB0_13
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_18
LBB0_9:
	movl	$16, %ecx
LBB0_13:
	movl	%ecx, 24(%r13)
	movq	%rbx, %rdi
	callq	_skl_needs_memory_bw_wa
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	shll	24(%r13)
LBB0_15:
	movl	16(%r13), %edi
	imull	12(%r13), %edi
	movl	%edi, 28(%r13)
	cmpl	$0, (%r13)
	je	LBB0_19
## %bb.16:
	imull	24(%r13), %edi
	movl	20(%r13), %esi
	callq	_DIV_ROUND_UP
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_INTEL_GEN
	xorl	%edi, %edi
	cmpl	$10, %eax
	setge	%dil
	addq	%r14, %rdi
	movl	24(%r13), %esi
	callq	_div_fixed16
	jmp	LBB0_24
LBB0_19:
	cmpl	$0, 4(%r13)
	je	LBB0_22
## %bb.20:
	movq	%rbx, %rdi
	movl	$9, %esi
	callq	_IS_GEN
	movl	28(%r13), %edi
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	movl	20(%r13), %esi
	callq	_DIV_ROUND_UP
	movq	%rax, %rdi
	jmp	LBB0_23
LBB0_22:
	movl	20(%r13), %esi
	callq	_DIV_ROUND_UP
	leaq	1(%rax), %rdi
LBB0_23:
	callq	_u32_to_fixed16
LBB0_24:
	movq	%rax, %rsi
	movq	%rax, 40(%r13)
	movl	24(%r13), %edi
	callq	_mul_u32_fixed16
	movl	%eax, 48(%r13)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_intel_get_linetime_us
	movl	%eax, %edi
	callq	_fixed16_to_u32_round_up
	movl	%eax, 32(%r13)
	xorl	%eax, %eax
	jmp	LBB0_25
LBB0_17:
	callq	_MISSING_CASE
LBB0_18:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_25:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Non planar format have single plane\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_I915_FORMAT_MOD_Y_TILED,8,3    ## @I915_FORMAT_MOD_Y_TILED
	.comm	_I915_FORMAT_MOD_Yf_TILED,8,3   ## @I915_FORMAT_MOD_Yf_TILED
	.comm	_I915_FORMAT_MOD_Y_TILED_CCS,8,3 ## @I915_FORMAT_MOD_Y_TILED_CCS
	.comm	_I915_FORMAT_MOD_Yf_TILED_CCS,8,3 ## @I915_FORMAT_MOD_Yf_TILED_CCS
	.comm	_I915_FORMAT_MOD_X_TILED,8,3    ## @I915_FORMAT_MOD_X_TILED
	.no_dead_strip	_skl_compute_wm_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function skl_compute_wm_params
_skl_compute_wm_params:                 ; @skl_compute_wm_params
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x7
	mov	x19, x6
	mov	x24, x5
	mov	x22, x4
	mov	x23, x3
	mov	x26, x2
	mov	x27, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_to_intel_crtc
	ldr	w0, [x0]
	bl	_to_i915
	mov	x21, x0
	cmp	w25, #1
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x26, #8]
	bl	_is_planar_yuv_format
	cbz	x0, LBB0_12
LBB0_2:
Lloh0:
	adrp	x8, _I915_FORMAT_MOD_Y_TILED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I915_FORMAT_MOD_Y_TILED@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x23
Lloh3:
	adrp	x28, _I915_FORMAT_MOD_Yf_TILED@GOTPAGE
Lloh4:
	ldr	x28, [x28, _I915_FORMAT_MOD_Yf_TILED@GOTPAGEOFF]
	ldr	x8, [x28]
	ccmp	x8, x23, #4, ne
Lloh5:
	adrp	x8, _I915_FORMAT_MOD_Y_TILED_CCS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _I915_FORMAT_MOD_Y_TILED_CCS@GOTPAGEOFF]
	cset	w9, eq
Lloh7:
	ldr	x8, [x8]
	cmp	x8, x23
	cset	w8, eq
Lloh8:
	adrp	x10, _I915_FORMAT_MOD_Yf_TILED_CCS@GOTPAGE
Lloh9:
	ldr	x10, [x10, _I915_FORMAT_MOD_Yf_TILED_CCS@GOTPAGEOFF]
	orr	w9, w9, w8
	ldr	x11, [x10]
	cmp	x11, x23
	cset	w11, eq
Lloh10:
	adrp	x12, _I915_FORMAT_MOD_X_TILED@GOTPAGE
Lloh11:
	ldr	x12, [x12, _I915_FORMAT_MOD_X_TILED@GOTPAGEOFF]
	orr	w9, w9, w11
Lloh12:
	ldr	x11, [x12]
	cmp	x11, x23
	cset	w11, eq
	stp	w9, w11, [x19]
	ldr	x9, [x10]
	cmp	x9, x23
	cset	w9, eq
	orr	w8, w8, w9
	str	w8, [x19, #8]
	ldr	w0, [x26, #8]
	bl	_is_planar_yuv_format
	cmp	w27, #0
	cinc	w8, w27, lt
	cmp	x0, #0
	ccmp	w25, #1, #0, ne
	asr	w8, w8, #1
	csel	w8, w27, w8, ne
	str	w8, [x19, #12]
	ldr	x8, [x26]
	ldr	w8, [x8, w25, sxtw #2]
	str	w8, [x19, #16]
	stp	x24, x0, [x19, #56]
	mov	x0, x21
	bl	_INTEL_GEN
	ldr	x8, [x28]
	cmp	w0, #11
	ccmp	x8, x23, #0, ge
	b.ne	LBB0_5
; %bb.3:
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.ne	LBB0_5
; %bb.4:
	mov	w8, #256
	b	LBB0_6
LBB0_5:
	mov	w8, #512
LBB0_6:
	str	w8, [x19, #20]
	mov	x0, x22
	bl	_drm_rotation_90_or_270
	cbz	x0, LBB0_11
; %bb.7:
	ldr	w0, [x19, #16]
	cmp	w0, #1
	b.eq	LBB0_13
; %bb.8:
	cmp	w0, #4
	b.eq	LBB0_11
; %bb.9:
	cmp	w0, #2
	b.ne	LBB0_24
; %bb.10:
	mov	w8, #8
	b	LBB0_14
LBB0_11:
	mov	w8, #4
	b	LBB0_14
LBB0_12:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	b	LBB0_25
LBB0_13:
	mov	w8, #16
LBB0_14:
	str	w8, [x19, #24]
	mov	x0, x21
	bl	_skl_needs_memory_bw_wa
	cbz	x0, LBB0_16
; %bb.15:
	ldr	w8, [x19, #24]
	lsl	w8, w8, #1
	str	w8, [x19, #24]
LBB0_16:
	ldp	w8, w9, [x19, #12]
	mul	w0, w9, w8
	str	w0, [x19, #28]
	ldr	w8, [x19]
	cbz	w8, LBB0_18
; %bb.17:
	ldp	w1, w8, [x19, #20]
	mul	w0, w8, w0
	bl	_DIV_ROUND_UP
	mov	x22, x0
	mov	x0, x21
	bl	_INTEL_GEN
	cmp	w0, #9
	cinc	x0, x22, gt
	ldr	w1, [x19, #24]
	bl	_div_fixed16
	b	LBB0_23
LBB0_18:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_21
; %bb.19:
	mov	x0, x21
	mov	w1, #9
	bl	_IS_GEN
	mov	x8, x0
	ldr	w0, [x19, #28]
	cbz	x8, LBB0_21
; %bb.20:
	ldr	w1, [x19, #20]
	bl	_DIV_ROUND_UP
	b	LBB0_22
LBB0_21:
	ldr	w1, [x19, #20]
	bl	_DIV_ROUND_UP
	add	x0, x0, #1
LBB0_22:
	bl	_u32_to_fixed16
LBB0_23:
	mov	x1, x0
	str	x0, [x19, #40]
	ldr	w0, [x19, #24]
	bl	_mul_u32_fixed16
	str	w0, [x19, #48]
	mov	x0, x20
	bl	_intel_get_linetime_us
	bl	_fixed16_to_u32_round_up
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #32]
	b	LBB0_26
LBB0_24:
	bl	_MISSING_CASE
LBB0_25:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_26:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Non planar format have single plane\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_I915_FORMAT_MOD_Y_TILED,8,3    ; @I915_FORMAT_MOD_Y_TILED
	.comm	_I915_FORMAT_MOD_Yf_TILED,8,3   ; @I915_FORMAT_MOD_Yf_TILED
	.comm	_I915_FORMAT_MOD_Y_TILED_CCS,8,3 ; @I915_FORMAT_MOD_Y_TILED_CCS
	.comm	_I915_FORMAT_MOD_Yf_TILED_CCS,8,3 ; @I915_FORMAT_MOD_Yf_TILED_CCS
	.comm	_I915_FORMAT_MOD_X_TILED,8,3    ; @I915_FORMAT_MOD_X_TILED
	.no_dead_strip	_skl_compute_wm_params
.subsections_via_symbols
