	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ilk_load_csc_matrix
_ilk_load_csc_matrix:                   ## @ilk_load_csc_matrix
	.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	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	32(%rdi), %edi
	callq	_to_intel_crtc
	movq	%rax, %r14
	movl	4(%rax), %edi
	callq	_to_i915
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_ilk_csc_limited_range
	movl	%eax, %ebx
	cmpq	$0, 24(%r12)
	je	LBB0_4
## %bb.1:
	leaq	-80(%rbp), %r15
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_ilk_csc_convert_ctm
	movq	_ilk_csc_off_zero@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, %ecx
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.2:
	movq	_ilk_csc_postoff_limited_range@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_3:
	movq	%r14, %rdi
	movq	%r15, %rdx
	jmp	LBB0_13
LBB0_4:
	movq	(%r12), %rax
	movq	_INTEL_OUTPUT_FORMAT_RGB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.7:
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.8:
	movq	_ilk_csc_off_zero@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ilk_csc_coeff_limited_range@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_ilk_csc_postoff_limited_range@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_ilk_csc_off_zero@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ilk_csc_coeff_rgb_to_ycbcr@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_ilk_csc_postoff_rgb_to_ycbcr@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %ecx
	movq	%r14, %rdi
LBB0_13:
	callq	_ilk_update_pipe_csc
LBB0_14:
	movl	(%r14), %edi
	callq	_PIPE_CSC_MODE
	movl	8(%r12), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	cmpq	$0, 16(%r12)
	je	LBB0_14
## %bb.10:
	movq	%r15, %rdi
	callq	_IS_CANNONLAKE
	xorl	%edi, %edi
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	%r15, %rdi
	callq	_IS_GEMINILAKE
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
LBB0_12:
	callq	_WARN_ON
	movq	_ilk_csc_off_zero@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ilk_csc_coeff_identity@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r14, %rdi
	movl	%ecx, %esi
	jmp	LBB0_13
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ilk_csc_off_zero,4,2           ## @ilk_csc_off_zero
	.comm	_ilk_csc_postoff_limited_range,4,2 ## @ilk_csc_postoff_limited_range
	.comm	_INTEL_OUTPUT_FORMAT_RGB,8,3    ## @INTEL_OUTPUT_FORMAT_RGB
	.comm	_ilk_csc_coeff_rgb_to_ycbcr,8,3 ## @ilk_csc_coeff_rgb_to_ycbcr
	.comm	_ilk_csc_postoff_rgb_to_ycbcr,4,2 ## @ilk_csc_postoff_rgb_to_ycbcr
	.comm	_ilk_csc_coeff_limited_range,8,3 ## @ilk_csc_coeff_limited_range
	.comm	_ilk_csc_coeff_identity,8,3     ## @ilk_csc_coeff_identity
	.no_dead_strip	_ilk_load_csc_matrix
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ilk_load_csc_matrix
_ilk_load_csc_matrix:                   ; @ilk_load_csc_matrix
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	w0, [x0, #32]
	bl	_to_intel_crtc
	mov	x20, x0
	ldr	w0, [x0, #4]
	bl	_to_i915
	mov	x21, x0
	mov	x0, x19
	bl	_ilk_csc_limited_range
	mov	x22, x0
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_2
; %bb.1:
	add	x1, sp, #4
	mov	x0, x19
	bl	_ilk_csc_convert_ctm
Lloh3:
	adrp	x8, _ilk_csc_off_zero@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ilk_csc_off_zero@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _ilk_csc_postoff_limited_range@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ilk_csc_postoff_limited_range@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w22, #0
	csel	w3, w1, w8, eq
	add	x2, sp, #4
	b	LBB0_7
LBB0_2:
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _INTEL_OUTPUT_FORMAT_RGB@GOTPAGE
Lloh10:
	ldr	x9, [x9, _INTEL_OUTPUT_FORMAT_RGB@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	cbz	w22, LBB0_11
; %bb.4:
Lloh12:
	adrp	x8, _ilk_csc_off_zero@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ilk_csc_off_zero@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _ilk_csc_coeff_limited_range@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ilk_csc_coeff_limited_range@GOTPAGEOFF]
Lloh17:
	ldr	x2, [x8]
Lloh18:
	adrp	x8, _ilk_csc_postoff_limited_range@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ilk_csc_postoff_limited_range@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh20:
	adrp	x8, _ilk_csc_off_zero@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ilk_csc_off_zero@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x8, _ilk_csc_coeff_rgb_to_ycbcr@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ilk_csc_coeff_rgb_to_ycbcr@GOTPAGEOFF]
Lloh25:
	ldr	x2, [x8]
Lloh26:
	adrp	x8, _ilk_csc_postoff_rgb_to_ycbcr@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ilk_csc_postoff_rgb_to_ycbcr@GOTPAGEOFF]
LBB0_6:
	ldr	w3, [x8]
LBB0_7:
	mov	x0, x20
LBB0_8:
	bl	_ilk_update_pipe_csc
LBB0_9:
	ldr	w0, [x20]
	bl	_PIPE_CSC_MODE
	ldr	w1, [x19, #8]
	bl	_I915_WRITE
	ldr	x8, [sp, #40]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.10:
	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
	add	sp, sp, #96
	ret
LBB0_11:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_9
; %bb.12:
	mov	x0, x21
	bl	_IS_CANNONLAKE
	cbz	w0, LBB0_14
; %bb.13:
	mov	w0, #0
	b	LBB0_15
LBB0_14:
	mov	x0, x21
	bl	_IS_GEMINILAKE
	cmp	w0, #0
	cset	w0, eq
LBB0_15:
	bl	_WARN_ON
Lloh31:
	adrp	x8, _ilk_csc_off_zero@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ilk_csc_off_zero@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
Lloh34:
	adrp	x8, _ilk_csc_coeff_identity@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ilk_csc_coeff_identity@GOTPAGEOFF]
Lloh36:
	ldr	x2, [x8]
	mov	x0, x20
	mov	x3, x1
	b	LBB0_8
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_ilk_csc_off_zero,4,2           ; @ilk_csc_off_zero
	.comm	_ilk_csc_postoff_limited_range,4,2 ; @ilk_csc_postoff_limited_range
	.comm	_INTEL_OUTPUT_FORMAT_RGB,8,3    ; @INTEL_OUTPUT_FORMAT_RGB
	.comm	_ilk_csc_coeff_rgb_to_ycbcr,8,3 ; @ilk_csc_coeff_rgb_to_ycbcr
	.comm	_ilk_csc_postoff_rgb_to_ycbcr,4,2 ; @ilk_csc_postoff_rgb_to_ycbcr
	.comm	_ilk_csc_coeff_limited_range,8,3 ; @ilk_csc_coeff_limited_range
	.comm	_ilk_csc_coeff_identity,8,3     ; @ilk_csc_coeff_identity
	.no_dead_strip	_ilk_load_csc_matrix
.subsections_via_symbols
