	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function skl_plane_relative_data_rate
_skl_plane_relative_data_rate:          ## @skl_plane_relative_data_rate
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	20(%rsi), %edi
	callq	_to_intel_plane
	xorl	%ebx, %ebx
	cmpl	$0, 16(%r12)
	je	LBB0_9
## %bb.1:
	movq	(%rax), %rax
	movq	_PLANE_CURSOR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.2:
	movq	8(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movl	(%rax), %r13d
	cmpl	$1, %r14d
	jne	LBB0_4
## %bb.3:
	movl	%r13d, %edi
	callq	_is_planar_yuv_format
	testq	%rax, %rax
	je	LBB0_9
LBB0_4:
	movq	%r12, %rdi
	callq	_drm_rect_width
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_drm_rect_height
	movd	%ebx, %xmm0
	pinsrd	$1, %eax, %xmm0
	psrad	$16, %xmm0
	cmpl	$1, %r14d
	jne	LBB0_8
## %bb.5:
	movdqa	%xmm0, -64(%rbp)                ## 16-byte Spill
	movl	%r13d, %edi
	callq	_is_planar_yuv_format
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movdqa	-64(%rbp), %xmm1                ## 16-byte Reload
	packssdw	%xmm1, %xmm1
	movdqa	%xmm1, %xmm0
	psrlw	$15, %xmm0
	paddw	%xmm1, %xmm0
	psraw	$1, %xmm0
	pmovsxwd	%xmm0, %xmm0
	jmp	LBB0_8
LBB0_6:
	movdqa	-64(%rbp), %xmm0                ## 16-byte Reload
LBB0_8:
	movd	%xmm0, %eax
	pextrd	$1, %xmm0, %ebx
	imull	%eax, %ebx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_skl_plane_downscale_amount
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_mul_round_up_u32_fixed16
	movl	%eax, %ebx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movslq	%r14d, %rcx
	imull	(%rax,%rcx,4), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PLANE_CURSOR,8,3               ## @PLANE_CURSOR
	.no_dead_strip	_skl_plane_relative_data_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function skl_plane_relative_data_rate
_skl_plane_relative_data_rate:          ; @skl_plane_relative_data_rate
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w0, [x1, #20]
	bl	_to_intel_plane
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PLANE_CURSOR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PLANE_CURSOR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_8
LBB0_3:
	ldr	x25, [x20, #8]
	ldr	x8, [x25]
	ldr	w22, [x8]
	cmp	w19, #1
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x22
	bl	_is_planar_yuv_format
	cbz	x0, LBB0_8
LBB0_5:
	mov	x0, x20
	bl	_drm_rect_width
	mov	x23, x0
	asr	w26, w0, #16
	mov	x0, x20
	bl	_drm_rect_height
	asr	w27, w0, #16
	cmp	w19, #1
	b.ne	LBB0_7
; %bb.6:
	mov	x24, x0
	mov	x0, x22
	bl	_is_planar_yuv_format
	lsr	w8, w24, #16
	lsr	w9, w23, #16
	add	w9, w9, w23, lsr #31
	sbfx	w9, w9, #1, #15
	add	w8, w8, w24, lsr #31
	sbfx	w8, w8, #1, #15
	cmp	x0, #0
	csel	w27, w27, w8, eq
	csel	w26, w26, w9, eq
LBB0_7:
	mul	w22, w26, w27
	mov	x0, x21
	mov	x1, x20
	bl	_skl_plane_downscale_amount
	mov	x1, x0
	mov	x0, x22
	bl	_mul_round_up_u32_fixed16
	ldr	x8, [x25]
	ldr	x8, [x8, #8]
	ldr	w8, [x8, w19, sxtw #2]
	mul	w0, w8, w0
LBB0_8:
	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	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PLANE_CURSOR,8,3               ; @PLANE_CURSOR
	.no_dead_strip	_skl_plane_relative_data_rate
.subsections_via_symbols
