	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_glk_plane_color_ctl            ## -- Begin function glk_plane_color_ctl
	.p2align	4, 0x90
_glk_plane_color_ctl:                   ## @glk_plane_color_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, %rbx
	movq	16(%rsi), %rax
	movl	(%rax), %edi
	callq	_to_i915
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rbx), %rdi
	movq	24(%rbx), %r13
	callq	_to_intel_plane
	movq	%rax, %r12
	movq	_PLANE_COLOR_PLANE_GAMMA_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_glk_plane_color_ctl_alpha
	movl	%eax, %r14d
	orl	%r15d, %r14d
	movq	(%r13), %rax
	cmpq	$0, (%rax)
	je	LBB0_10
## %bb.1:
	movl	(%r12), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_icl_is_hdr_plane
	testl	%eax, %eax
	je	LBB0_2
## %bb.7:
	movq	(%r13), %rax
	cmpq	$0, (%rax)
	je	LBB0_10
## %bb.8:
	movq	_PLANE_COLOR_INPUT_CSC_ENABLE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_2:
	movq	_DRM_COLOR_YCBCR_BT709@GOTPCREL(%rip), %rcx
	movq	(%rbx), %rdx
	movq	8(%rbx), %rax
	cmpq	(%rcx), %rdx
	jne	LBB0_3
## %bb.4:
	movq	_PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_3:
	movq	_PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709@GOTPCREL(%rip), %rcx
LBB0_5:
	orl	(%rcx), %r14d
	movq	_DRM_COLOR_YCBCR_FULL_RANGE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.6:
	movq	_PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE@GOTPCREL(%rip), %rax
LBB0_9:
	orl	(%rax), %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PLANE_COLOR_PLANE_GAMMA_DISABLE,4,2 ## @PLANE_COLOR_PLANE_GAMMA_DISABLE
	.comm	_DRM_COLOR_YCBCR_BT709,8,3      ## @DRM_COLOR_YCBCR_BT709
	.comm	_PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709,4,2 ## @PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709
	.comm	_PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709,4,2 ## @PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709
	.comm	_DRM_COLOR_YCBCR_FULL_RANGE,8,3 ## @DRM_COLOR_YCBCR_FULL_RANGE
	.comm	_PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE,4,2 ## @PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE
	.comm	_PLANE_COLOR_INPUT_CSC_ENABLE,4,2 ## @PLANE_COLOR_INPUT_CSC_ENABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_glk_plane_color_ctl            ; -- Begin function glk_plane_color_ctl
	.p2align	2
_glk_plane_color_ctl:                   ; @glk_plane_color_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	x20, x1
	ldr	x8, [x1, #16]
	ldr	w0, [x8]
	bl	_to_i915
	mov	x21, x0
	ldp	x0, x23, [x20, #16]
	bl	_to_intel_plane
	mov	x22, x0
Lloh0:
	adrp	x8, _PLANE_COLOR_PLANE_GAMMA_DISABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PLANE_COLOR_PLANE_GAMMA_DISABLE@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	mov	x0, x20
	bl	_glk_plane_color_ctl_alpha
	orr	w19, w0, w19
	ldr	x8, [x23]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.1:
	ldr	w1, [x22]
	mov	x0, x21
	bl	_icl_is_hdr_plane
	cbz	w0, LBB0_4
; %bb.2:
	ldr	x8, [x23]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.3:
Lloh3:
	adrp	x8, _PLANE_COLOR_INPUT_CSC_ENABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PLANE_COLOR_INPUT_CSC_ENABLE@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh5:
	adrp	x8, _DRM_COLOR_YCBCR_BT709@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DRM_COLOR_YCBCR_BT709@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709@GOTPAGEOFF]
Lloh10:
	adrp	x10, _PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709@GOTPAGE
Lloh11:
	ldr	x10, [x10, _PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709@GOTPAGEOFF]
	ldp	x11, x12, [x20]
	cmp	x11, x8
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	orr	w19, w8, w19
Lloh12:
	adrp	x8, _DRM_COLOR_YCBCR_FULL_RANGE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DRM_COLOR_YCBCR_FULL_RANGE@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x12, x8
	b.ne	LBB0_7
; %bb.5:
Lloh15:
	adrp	x8, _PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	orr	w19, w8, w19
LBB0_7:
	mov	x0, x19
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PLANE_COLOR_PLANE_GAMMA_DISABLE,4,2 ; @PLANE_COLOR_PLANE_GAMMA_DISABLE
	.comm	_DRM_COLOR_YCBCR_BT709,8,3      ; @DRM_COLOR_YCBCR_BT709
	.comm	_PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709,4,2 ; @PLANE_COLOR_CSC_MODE_YUV709_TO_RGB709
	.comm	_PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709,4,2 ; @PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709
	.comm	_DRM_COLOR_YCBCR_FULL_RANGE,8,3 ; @DRM_COLOR_YCBCR_FULL_RANGE
	.comm	_PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE,4,2 ; @PLANE_COLOR_YUV_RANGE_CORRECTION_DISABLE
	.comm	_PLANE_COLOR_INPUT_CSC_ENABLE,4,2 ; @PLANE_COLOR_INPUT_CSC_ENABLE
.subsections_via_symbols
