	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_skl_plane_ctl                  ## -- Begin function skl_plane_ctl
	.p2align	4, 0x90
_skl_plane_ctl:                         ## @skl_plane_ctl
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	32(%rsi), %rax
	movl	(%rax), %edi
	callq	_to_i915
	movq	%rax, %rbx
	movq	24(%r12), %r14
	movl	(%r12), %r15d
	movq	_PLANE_CTL_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%rbx, %rdi
	callq	_INTEL_GEN
	cmpl	$9, %eax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jg	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_IS_GEMINILAKE
	testl	%eax, %eax
	je	LBB0_12
LBB0_3:
	movl	%r13d, %ebx
LBB0_4:
	movq	8(%r14), %rax
	movl	(%rax), %edi
	callq	_skl_plane_ctl_format
	movl	%eax, %r13d
	movl	(%r14), %edi
	callq	_skl_plane_ctl_tiling
	movl	%eax, %r14d
	orl	%ebx, %r14d
	movq	_DRM_MODE_ROTATE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	%r15d, %edi
	callq	_skl_plane_ctl_rotate
	movl	%eax, %ebx
	orl	%r14d, %ebx
	orl	%r13d, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_INTEL_GEN
	cmpl	$10, %eax
	jl	LBB0_6
## %bb.5:
	movq	_DRM_MODE_REFLECT_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movl	%r15d, %edi
	callq	_cnl_plane_ctl_flip
	orl	%eax, %ebx
LBB0_6:
	movl	40(%r12), %eax
	movq	_I915_SET_COLORKEY_DESTINATION@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:
	movq	_PLANE_CTL_KEY_ENABLE_DESTINATION@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_I915_SET_COLORKEY_SOURCE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.9:
	movq	_PLANE_CTL_KEY_ENABLE_SOURCE@GOTPCREL(%rip), %rax
LBB0_10:
	orl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%r12, %rdi
	callq	_skl_plane_ctl_alpha
	movl	%r13d, %ebx
	orl	%eax, %ebx
	movq	_PLANE_CTL_PLANE_GAMMA_DISABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_DRM_COLOR_YCBCR_BT709@GOTPCREL(%rip), %rdx
	movq	8(%r12), %rsi
	movq	16(%r12), %rax
	xorl	%ecx, %ecx
	cmpq	(%rdx), %rsi
	jne	LBB0_14
## %bb.13:
	movq	_PLANE_CTL_YUV_TO_RGB_CSC_FORMAT_BT709@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_14:
	orl	%ecx, %ebx
	movq	_DRM_COLOR_YCBCR_FULL_RANGE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.15:
	movq	_PLANE_CTL_YUV_RANGE_CORRECTION_DISABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_PLANE_CTL_ENABLE,4,2           ## @PLANE_CTL_ENABLE
	.comm	_PLANE_CTL_PLANE_GAMMA_DISABLE,4,2 ## @PLANE_CTL_PLANE_GAMMA_DISABLE
	.comm	_DRM_COLOR_YCBCR_BT709,8,3      ## @DRM_COLOR_YCBCR_BT709
	.comm	_PLANE_CTL_YUV_TO_RGB_CSC_FORMAT_BT709,4,2 ## @PLANE_CTL_YUV_TO_RGB_CSC_FORMAT_BT709
	.comm	_DRM_COLOR_YCBCR_FULL_RANGE,8,3 ## @DRM_COLOR_YCBCR_FULL_RANGE
	.comm	_PLANE_CTL_YUV_RANGE_CORRECTION_DISABLE,4,2 ## @PLANE_CTL_YUV_RANGE_CORRECTION_DISABLE
	.comm	_DRM_MODE_ROTATE_MASK,4,2       ## @DRM_MODE_ROTATE_MASK
	.comm	_DRM_MODE_REFLECT_MASK,4,2      ## @DRM_MODE_REFLECT_MASK
	.comm	_I915_SET_COLORKEY_DESTINATION,4,2 ## @I915_SET_COLORKEY_DESTINATION
	.comm	_PLANE_CTL_KEY_ENABLE_DESTINATION,4,2 ## @PLANE_CTL_KEY_ENABLE_DESTINATION
	.comm	_I915_SET_COLORKEY_SOURCE,4,2   ## @I915_SET_COLORKEY_SOURCE
	.comm	_PLANE_CTL_KEY_ENABLE_SOURCE,4,2 ## @PLANE_CTL_KEY_ENABLE_SOURCE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_skl_plane_ctl                  ; -- Begin function skl_plane_ctl
	.p2align	2
_skl_plane_ctl:                         ; @skl_plane_ctl
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	ldr	x8, [x1, #32]
	ldr	w0, [x8]
	bl	_to_i915
	mov	x20, x0
	ldr	x21, [x19, #24]
	ldr	w22, [x19]
Lloh0:
	adrp	x8, _PLANE_CTL_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PLANE_CTL_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	bl	_INTEL_GEN
	cmp	w0, #9
	b.gt	LBB0_4
; %bb.1:
	mov	x0, x20
	bl	_IS_GEMINILAKE
	cbnz	w0, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_skl_plane_ctl_alpha
Lloh3:
	adrp	x8, _PLANE_CTL_PLANE_GAMMA_DISABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PLANE_CTL_PLANE_GAMMA_DISABLE@GOTPAGEOFF]
	orr	w9, w0, w23
Lloh5:
	ldr	w8, [x8]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _DRM_COLOR_YCBCR_BT709@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DRM_COLOR_YCBCR_BT709@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldp	x10, x11, [x19, #8]
	cmp	x10, x9
Lloh9:
	adrp	x9, _PLANE_CTL_YUV_TO_RGB_CSC_FORMAT_BT709@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PLANE_CTL_YUV_TO_RGB_CSC_FORMAT_BT709@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	csel	w9, w9, wzr, eq
	orr	w23, w8, w9
Lloh12:
	adrp	x8, _DRM_COLOR_YCBCR_FULL_RANGE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DRM_COLOR_YCBCR_FULL_RANGE@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x11, x8
	b.ne	LBB0_4
; %bb.3:
Lloh15:
	adrp	x8, _PLANE_CTL_YUV_RANGE_CORRECTION_DISABLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PLANE_CTL_YUV_RANGE_CORRECTION_DISABLE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	orr	w23, w8, w23
LBB0_4:
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
	bl	_skl_plane_ctl_format
	orr	w23, w0, w23
	ldr	w0, [x21]
	bl	_skl_plane_ctl_tiling
	orr	w21, w23, w0
Lloh18:
	adrp	x8, _DRM_MODE_ROTATE_MASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DRM_MODE_ROTATE_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	and	w0, w8, w22
	bl	_skl_plane_ctl_rotate
	orr	w21, w21, w0
	mov	x0, x20
	bl	_INTEL_GEN
	cmp	w0, #10
	b.lt	LBB0_6
; %bb.5:
Lloh21:
	adrp	x8, _DRM_MODE_REFLECT_MASK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DRM_MODE_REFLECT_MASK@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	and	w0, w8, w22
	bl	_cnl_plane_ctl_flip
	orr	w21, w0, w21
LBB0_6:
	ldr	w8, [x19, #40]
Lloh24:
	adrp	x9, _I915_SET_COLORKEY_DESTINATION@GOTPAGE
Lloh25:
	ldr	x9, [x9, _I915_SET_COLORKEY_DESTINATION@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
Lloh27:
	adrp	x8, _PLANE_CTL_KEY_ENABLE_DESTINATION@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PLANE_CTL_KEY_ENABLE_DESTINATION@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
Lloh29:
	adrp	x9, _I915_SET_COLORKEY_SOURCE@GOTPAGE
Lloh30:
	ldr	x9, [x9, _I915_SET_COLORKEY_SOURCE@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.9:
Lloh32:
	adrp	x8, _PLANE_CTL_KEY_ENABLE_SOURCE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _PLANE_CTL_KEY_ENABLE_SOURCE@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_PLANE_CTL_ENABLE,4,2           ; @PLANE_CTL_ENABLE
	.comm	_PLANE_CTL_PLANE_GAMMA_DISABLE,4,2 ; @PLANE_CTL_PLANE_GAMMA_DISABLE
	.comm	_DRM_COLOR_YCBCR_BT709,8,3      ; @DRM_COLOR_YCBCR_BT709
	.comm	_PLANE_CTL_YUV_TO_RGB_CSC_FORMAT_BT709,4,2 ; @PLANE_CTL_YUV_TO_RGB_CSC_FORMAT_BT709
	.comm	_DRM_COLOR_YCBCR_FULL_RANGE,8,3 ; @DRM_COLOR_YCBCR_FULL_RANGE
	.comm	_PLANE_CTL_YUV_RANGE_CORRECTION_DISABLE,4,2 ; @PLANE_CTL_YUV_RANGE_CORRECTION_DISABLE
	.comm	_DRM_MODE_ROTATE_MASK,4,2       ; @DRM_MODE_ROTATE_MASK
	.comm	_DRM_MODE_REFLECT_MASK,4,2      ; @DRM_MODE_REFLECT_MASK
	.comm	_I915_SET_COLORKEY_DESTINATION,4,2 ; @I915_SET_COLORKEY_DESTINATION
	.comm	_PLANE_CTL_KEY_ENABLE_DESTINATION,4,2 ; @PLANE_CTL_KEY_ENABLE_DESTINATION
	.comm	_I915_SET_COLORKEY_SOURCE,4,2   ; @I915_SET_COLORKEY_SOURCE
	.comm	_PLANE_CTL_KEY_ENABLE_SOURCE,4,2 ; @PLANE_CTL_KEY_ENABLE_SOURCE
.subsections_via_symbols
