	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mpc2_set_output_csc            ## -- Begin function mpc2_set_output_csc
	.p2align	4, 0x90
_mpc2_set_output_csc:                   ## @mpc2_set_output_csc
	.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
	movl	%ecx, %r12d
	movq	%rdx, %r14
	movl	%esi, %ebx
	callq	_TO_DCN20_MPC
	movq	%rax, %r15
	movq	_CSC_MODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %r13
	movl	(%rax,%r13,4), %edi
	movq	_MPC_OCSC_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	movl	%r12d, %ecx
	callq	_REG_SET
	movq	_MPC_OUTPUT_CSC_DISABLE@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	je	LBB0_3
## %bb.1:
	testq	%r14, %r14
	je	LBB0_4
## %bb.2:
	movq	8(%r15), %rax
	movq	16(%r15), %rcx
	movsd	(%rcx), %xmm0                   ## xmm0 = mem[0],zero
	movsd	(%rax), %xmm1                   ## xmm1 = mem[0],zero
	movq	_MPC_OUTPUT_CSC_COEF_A@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	movq	_CSC_C11_C12_B@GOTPCREL(%rip), %rax
	cmoveq	_CSC_C11_C12_A@GOTPCREL(%rip), %rax
	movlhps	%xmm0, %xmm1                    ## xmm1 = xmm1[0],xmm0[0]
	movups	%xmm1, -56(%rbp)
	movq	(%rax), %rax
	movl	(%rax,%r13,4), %edi
	movq	_CSC_C33_C34_B@GOTPCREL(%rip), %rbx
	cmoveq	_CSC_C33_C34_A@GOTPCREL(%rip), %rbx
	callq	_REG
	movq	%rax, %r12
	movq	(%rbx), %rax
	movl	(%rax,%r13,4), %edi
	callq	_REG
	movq	%r12, -64(%rbp)
	movq	%rax, -72(%rbp)
	movl	(%r15), %edi
	leaq	-72(%rbp), %rdx
	movq	%r14, %rsi
	callq	_cm_helper_program_color_matrices
LBB0_3:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_BREAK_TO_DEBUGGER              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CSC_MODE,8,3                   ## @CSC_MODE
	.comm	_MPC_OCSC_MODE,4,2              ## @MPC_OCSC_MODE
	.comm	_MPC_OUTPUT_CSC_DISABLE,4,2     ## @MPC_OUTPUT_CSC_DISABLE
	.comm	_MPC_OUTPUT_CSC_COEF_A,4,2      ## @MPC_OUTPUT_CSC_COEF_A
	.comm	_CSC_C11_C12_A,8,3              ## @CSC_C11_C12_A
	.comm	_CSC_C33_C34_A,8,3              ## @CSC_C33_C34_A
	.comm	_CSC_C11_C12_B,8,3              ## @CSC_C11_C12_B
	.comm	_CSC_C33_C34_B,8,3              ## @CSC_C33_C34_B
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mpc2_set_output_csc            ; -- Begin function mpc2_set_output_csc
	.p2align	2
_mpc2_set_output_csc:                   ; @mpc2_set_output_csc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x21, x3
	mov	x19, x2
	mov	x22, x1
	bl	_TO_DCN20_MPC
	mov	x20, x0
Lloh0:
	adrp	x8, _CSC_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CSC_MODE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w0, [x8, w22, sxtw #2]
Lloh3:
	adrp	x8, _MPC_OCSC_MODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MPC_OCSC_MODE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w1, #0
	mov	x3, x21
	bl	_REG_SET
Lloh6:
	adrp	x8, _MPC_OUTPUT_CSC_DISABLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MPC_OUTPUT_CSC_DISABLE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_3
; %bb.1:
	cbz	x19, LBB0_4
; %bb.2:
	sxtw	x8, w22
	ldp	x10, x9, [x20, #8]
	ldr	d0, [x9]
	ldr	d1, [x10]
	mov.d	v1[1], v0[0]
Lloh9:
	adrp	x9, _MPC_OUTPUT_CSC_COEF_A@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MPC_OUTPUT_CSC_COEF_A@GOTPAGEOFF]
	str	q1, [sp, #16]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _CSC_C11_C12_A@GOTPAGE
Lloh13:
	ldr	x10, [x10, _CSC_C11_C12_A@GOTPAGEOFF]
Lloh14:
	adrp	x11, _CSC_C11_C12_B@GOTPAGE
Lloh15:
	ldr	x11, [x11, _CSC_C11_C12_B@GOTPAGEOFF]
	cmp	w9, w21
	csel	x9, x10, x11, eq
	ldr	x9, [x9]
	lsl	x22, x8, #2
	ldr	w0, [x9, x22]
Lloh16:
	adrp	x8, _CSC_C33_C34_A@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CSC_C33_C34_A@GOTPAGEOFF]
Lloh18:
	adrp	x9, _CSC_C33_C34_B@GOTPAGE
Lloh19:
	ldr	x9, [x9, _CSC_C33_C34_B@GOTPAGEOFF]
	csel	x23, x8, x9, eq
	bl	_REG
	mov	x21, x0
	ldr	x8, [x23]
	ldr	w0, [x8, x22]
	bl	_REG
	stp	x0, x21, [sp]
	ldr	w0, [x20]
	mov	x2, sp
	mov	x1, x19
	bl	_cm_helper_program_color_matrices
LBB0_3:
	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
	add	sp, sp, #96
	ret
LBB0_4:
	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
	add	sp, sp, #96
	b	_BREAK_TO_DEBUGGER
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CSC_MODE,8,3                   ; @CSC_MODE
	.comm	_MPC_OCSC_MODE,4,2              ; @MPC_OCSC_MODE
	.comm	_MPC_OUTPUT_CSC_DISABLE,4,2     ; @MPC_OUTPUT_CSC_DISABLE
	.comm	_MPC_OUTPUT_CSC_COEF_A,4,2      ; @MPC_OUTPUT_CSC_COEF_A
	.comm	_CSC_C11_C12_A,8,3              ; @CSC_C11_C12_A
	.comm	_CSC_C33_C34_A,8,3              ; @CSC_C33_C34_A
	.comm	_CSC_C11_C12_B,8,3              ; @CSC_C11_C12_B
	.comm	_CSC_C33_C34_B,8,3              ; @CSC_C33_C34_B
.subsections_via_symbols
