	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipu_dp_csc_init
_ipu_dp_csc_init:                       ## @ipu_dp_csc_init
	.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	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_DP_COM_CONF@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	(%r15), %rdi
	callq	_readl
	movq	_DP_COM_CONF_CSC_DEF_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	notl	%r13d
	andl	%eax, %r13d
	cmpl	%ebx, %r14d
	je	LBB0_2
## %bb.1:
	movq	_IPUV3_COLORSPACE_RGB@GOTPCREL(%rip), %rax
	xorl	(%rax), %r14d
	movq	_IPUV3_COLORSPACE_YUV@GOTPCREL(%rip), %rax
	xorl	(%rax), %ebx
	movq	_DP_CSC_A_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	orl	%r14d, %ebx
	movl	$19726489, %eax                 ## imm = 0x12D0099
	movl	$149, %edi
	cmovel	%eax, %edi
	movl	$61407290, %eax                 ## imm = 0x3A9003A
	movl	$9765068, %ebx                  ## imm = 0x9500CC
	cmovel	%eax, %ebx
	movl	$16778070, %eax                 ## imm = 0x1000356
	movl	$60294094, %r12d                ## imm = 0x39803CE
	cmovel	%eax, %r12d
	movl	$53018880, %eax                 ## imm = 0x3290100
	movl	$16711829, %r14d                ## imm = 0xFF0095
	cmovel	%eax, %r14d
	movl	$-2147482666, %eax              ## imm = 0x800003D6
	movl	$2118254592, %ecx               ## imm = 0x7E420000
	cmovel	%eax, %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	$-2113895936, %eax              ## imm = 0x82008200
	movl	$2111193354, %ecx               ## imm = 0x7DD6410A
	cmovel	%eax, %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	callq	_writel
	movq	_DP_CSC_A_1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	_DP_CSC_A_2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	%r12d, %edi
	movq	_DP_COM_CONF@GOTPCREL(%rip), %r12
	callq	_writel
	movq	_DP_CSC_A_3@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	%r14d, %edi
	callq	_writel
	movq	_DP_CSC_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_writel
	movq	_DP_CSC_1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_writel
	orl	-52(%rbp), %r13d                ## 4-byte Folded Reload
LBB0_2:
	movq	(%r12), %rsi
	addq	(%r15), %rsi
	movl	%r13d, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_COM_CONF,8,3                ## @DP_COM_CONF
	.comm	_DP_COM_CONF_CSC_DEF_MASK,4,2   ## @DP_COM_CONF_CSC_DEF_MASK
	.comm	_IPUV3_COLORSPACE_RGB,4,2       ## @IPUV3_COLORSPACE_RGB
	.comm	_IPUV3_COLORSPACE_YUV,4,2       ## @IPUV3_COLORSPACE_YUV
	.comm	_DP_CSC_A_0,8,3                 ## @DP_CSC_A_0
	.comm	_DP_CSC_A_1,8,3                 ## @DP_CSC_A_1
	.comm	_DP_CSC_A_2,8,3                 ## @DP_CSC_A_2
	.comm	_DP_CSC_A_3,8,3                 ## @DP_CSC_A_3
	.comm	_DP_CSC_0,8,3                   ## @DP_CSC_0
	.comm	_DP_CSC_1,8,3                   ## @DP_CSC_1
	.no_dead_strip	_ipu_dp_csc_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipu_dp_csc_init
_ipu_dp_csc_init:                       ; @ipu_dp_csc_init
	.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	x20, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x27, _DP_COM_CONF@GOTPAGE
Lloh1:
	ldr	x27, [x27, _DP_COM_CONF@GOTPAGEOFF]
	ldr	x9, [x27]
	add	x0, x9, x8
	bl	_readl
Lloh2:
	adrp	x8, _DP_COM_CONF_CSC_DEF_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DP_COM_CONF_CSC_DEF_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w21, w0, w8
	cmp	w23, w22
	b.eq	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _IPUV3_COLORSPACE_RGB@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IPUV3_COLORSPACE_RGB@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w23
	cset	w8, eq
Lloh8:
	adrp	x9, _IPUV3_COLORSPACE_YUV@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IPUV3_COLORSPACE_YUV@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w9, w22
	cset	w9, eq
Lloh11:
	adrp	x10, _DP_CSC_A_0@GOTPAGE
Lloh12:
	ldr	x10, [x10, _DP_CSC_A_0@GOTPAGEOFF]
	ldr	x11, [x19]
Lloh13:
	ldr	x10, [x10]
	add	x1, x10, x11
	tst	w8, w9
	mov	w8, #149
	mov	w9, #153
	movk	w9, #301, lsl #16
	csel	w0, w9, w8, ne
	mov	w8, #204
	movk	w8, #149, lsl #16
	mov	w9, #58
	movk	w9, #937, lsl #16
	csel	w22, w9, w8, ne
	mov	w8, #974
	movk	w8, #920, lsl #16
	mov	w9, #854
	movk	w9, #256, lsl #16
	csel	w23, w9, w8, ne
	mov	w8, #149
	movk	w8, #255, lsl #16
	mov	w9, #256
	movk	w9, #809, lsl #16
	csel	w24, w9, w8, ne
	mov	w8, #2118254592
	mov	w9, #982
	movk	w9, #32768, lsl #16
	csel	w25, w9, w8, ne
	mov	w8, #16650
	movk	w8, #32214, lsl #16
	mov	w9, #33280
	movk	w9, #33280, lsl #16
	csel	w26, w9, w8, ne
	bl	_writel
	ldr	x8, [x19]
Lloh14:
	adrp	x9, _DP_CSC_A_1@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DP_CSC_A_1@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x22
	bl	_writel
	ldr	x8, [x19]
Lloh17:
	adrp	x9, _DP_CSC_A_2@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DP_CSC_A_2@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x23
	bl	_writel
	ldr	x8, [x19]
Lloh20:
	adrp	x9, _DP_CSC_A_3@GOTPAGE
Lloh21:
	ldr	x9, [x9, _DP_CSC_A_3@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x24
	bl	_writel
	ldr	x8, [x19]
Lloh23:
	adrp	x9, _DP_CSC_0@GOTPAGE
Lloh24:
	ldr	x9, [x9, _DP_CSC_0@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x25
	bl	_writel
	ldr	x8, [x19]
Lloh26:
	adrp	x9, _DP_CSC_1@GOTPAGE
Lloh27:
	ldr	x9, [x9, _DP_CSC_1@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x26
	bl	_writel
	orr	w21, w21, w20
LBB0_2:
	ldr	x8, [x19]
	ldr	x9, [x27]
	add	x1, x9, x8
	mov	x0, x21
	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
	b	_writel
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_COM_CONF,8,3                ; @DP_COM_CONF
	.comm	_DP_COM_CONF_CSC_DEF_MASK,4,2   ; @DP_COM_CONF_CSC_DEF_MASK
	.comm	_IPUV3_COLORSPACE_RGB,4,2       ; @IPUV3_COLORSPACE_RGB
	.comm	_IPUV3_COLORSPACE_YUV,4,2       ; @IPUV3_COLORSPACE_YUV
	.comm	_DP_CSC_A_0,8,3                 ; @DP_CSC_A_0
	.comm	_DP_CSC_A_1,8,3                 ; @DP_CSC_A_1
	.comm	_DP_CSC_A_2,8,3                 ; @DP_CSC_A_2
	.comm	_DP_CSC_A_3,8,3                 ; @DP_CSC_A_3
	.comm	_DP_CSC_0,8,3                   ; @DP_CSC_0
	.comm	_DP_CSC_1,8,3                   ; @DP_CSC_1
	.no_dead_strip	_ipu_dp_csc_init
.subsections_via_symbols
