	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_hdmi_update_csc_coeffs
_dw_hdmi_update_csc_coeffs:             ## @dw_hdmi_update_csc_coeffs
	.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
	movq	%rdi, %r12
	callq	_is_color_space_conversion
	movq	_csc_coeff_default@GOTPCREL(%rip), %r14
	movl	$1, %r15d
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	12(%r12), %edi
	callq	_hdmi_bus_fmt_is_rgb
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	(%r12), %rax
	movq	_V4L2_YCBCR_ENC_601@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.5:
	movq	_csc_coeff_rgb_out_eitu601@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_1:
	movq	%r14, %rcx
	jmp	LBB0_11
LBB0_6:
	movl	8(%r12), %edi
	callq	_hdmi_bus_fmt_is_rgb
	movq	%r14, %rcx
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	movq	(%r12), %rax
	movq	_V4L2_YCBCR_ENC_601@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.9:
	movq	_csc_coeff_rgb_in_eitu601@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_4:
	movq	_csc_coeff_rgb_out_eitu709@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_8:
	movq	_csc_coeff_rgb_in_eitu709@GOTPCREL(%rip), %rcx
LBB0_10:
	xorl	%r15d, %r15d
LBB0_11:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	(%r14), %rax
	movq	(%rax), %rdi
	movq	%rcx, %r15
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	je	LBB0_14
## %bb.12:
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movl	(%r15,%rbx,2), %r14d
	movl	16(%r15,%rbx,2), %r13d
	movl	32(%r15,%rbx,2), %ebx
	movzbl	%r14b, %esi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
                                        ## kill: def $r15d killed $r15d killed $r15 def $r15
	andl	$-2, %r15d
	movq	_HDMI_CSC_COEF_A1_LSB@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	addq	%r15, %rdx
	movq	%r12, %rdi
	callq	_hdmi_writeb
	sarl	$8, %r14d
	movq	_HDMI_CSC_COEF_A1_MSB@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	addq	%r15, %rdx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	callq	_hdmi_writeb
	movzbl	%r13b, %esi
	movq	_HDMI_CSC_COEF_B1_LSB@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	addq	%r15, %rdx
	movq	%r12, %rdi
	callq	_hdmi_writeb
	sarl	$8, %r13d
	movq	_HDMI_CSC_COEF_B1_MSB@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	addq	%r15, %rdx
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_hdmi_writeb
	movzbl	%bl, %esi
	movq	_HDMI_CSC_COEF_C1_LSB@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	addq	%r15, %rdx
	movq	%r12, %rdi
	callq	_hdmi_writeb
	sarl	$8, %ebx
	movl	%ebx, %esi
	movq	_HDMI_CSC_COEF_C1_MSB@GOTPCREL(%rip), %rax
	addq	(%rax), %r15
	movq	%r12, %rdi
	movq	%r15, %rdx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	callq	_hdmi_writeb
	incq	%r14
	movq	_csc_coeff_default@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdi
	callq	_ARRAY_SIZE
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	%eax, %eax
	addq	$2, %rbx
	cmpq	%rax, %r14
	jb	LBB0_13
LBB0_14:
	movq	_HDMI_CSC_SCALE_CSCSCALE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_HDMI_CSC_SCALE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hdmi_modb                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_csc_coeff_default,8,3          ## @csc_coeff_default
	.comm	_V4L2_YCBCR_ENC_601,8,3         ## @V4L2_YCBCR_ENC_601
	.comm	_csc_coeff_rgb_out_eitu601,8,3  ## @csc_coeff_rgb_out_eitu601
	.comm	_csc_coeff_rgb_out_eitu709,8,3  ## @csc_coeff_rgb_out_eitu709
	.comm	_csc_coeff_rgb_in_eitu601,8,3   ## @csc_coeff_rgb_in_eitu601
	.comm	_csc_coeff_rgb_in_eitu709,8,3   ## @csc_coeff_rgb_in_eitu709
	.comm	_HDMI_CSC_COEF_A1_LSB,8,3       ## @HDMI_CSC_COEF_A1_LSB
	.comm	_HDMI_CSC_COEF_A1_MSB,8,3       ## @HDMI_CSC_COEF_A1_MSB
	.comm	_HDMI_CSC_COEF_B1_LSB,8,3       ## @HDMI_CSC_COEF_B1_LSB
	.comm	_HDMI_CSC_COEF_B1_MSB,8,3       ## @HDMI_CSC_COEF_B1_MSB
	.comm	_HDMI_CSC_COEF_C1_LSB,8,3       ## @HDMI_CSC_COEF_C1_LSB
	.comm	_HDMI_CSC_COEF_C1_MSB,8,3       ## @HDMI_CSC_COEF_C1_MSB
	.comm	_HDMI_CSC_SCALE_CSCSCALE_MASK,4,2 ## @HDMI_CSC_SCALE_CSCSCALE_MASK
	.comm	_HDMI_CSC_SCALE,4,2             ## @HDMI_CSC_SCALE
	.no_dead_strip	_dw_hdmi_update_csc_coeffs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_hdmi_update_csc_coeffs
_dw_hdmi_update_csc_coeffs:             ; @dw_hdmi_update_csc_coeffs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
	bl	_is_color_space_conversion
Lloh0:
	adrp	x20, _csc_coeff_default@GOTPAGE
Lloh1:
	ldr	x20, [x20, _csc_coeff_default@GOTPAGEOFF]
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w0, [x19, #12]
	bl	_hdmi_bus_fmt_is_rgb
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _V4L2_YCBCR_ENC_601@GOTPAGE
Lloh3:
	ldr	x9, [x9, _V4L2_YCBCR_ENC_601@GOTPAGEOFF]
Lloh4:
	adrp	x10, _csc_coeff_rgb_out_eitu709@GOTPAGE
Lloh5:
	ldr	x10, [x10, _csc_coeff_rgb_out_eitu709@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
Lloh7:
	adrp	x11, _csc_coeff_rgb_out_eitu601@GOTPAGE
Lloh8:
	ldr	x11, [x11, _csc_coeff_rgb_out_eitu601@GOTPAGEOFF]
	cmp	x8, x9
	csel	x22, x11, x10, eq
LBB0_3:
	mov	w8, #1
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	b	LBB0_7
LBB0_4:
	mov	w8, #1
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	mov	x22, x20
	b	LBB0_7
LBB0_5:
	ldr	w0, [x19, #8]
	bl	_hdmi_bus_fmt_is_rgb
	cbz	x0, LBB0_11
; %bb.6:
	str	wzr, [sp, #12]                  ; 4-byte Folded Spill
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _V4L2_YCBCR_ENC_601@GOTPAGE
Lloh10:
	ldr	x9, [x9, _V4L2_YCBCR_ENC_601@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	adrp	x10, _csc_coeff_rgb_in_eitu709@GOTPAGE
Lloh13:
	ldr	x10, [x10, _csc_coeff_rgb_in_eitu709@GOTPAGEOFF]
Lloh14:
	adrp	x11, _csc_coeff_rgb_in_eitu601@GOTPAGE
Lloh15:
	ldr	x11, [x11, _csc_coeff_rgb_in_eitu601@GOTPAGEOFF]
	cmp	x8, x9
	csel	x22, x11, x10, eq
LBB0_7:
	ldr	x8, [x20]
	ldr	x0, [x8]
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_10
; %bb.8:
	mov	x23, #0
	mov	x24, #0
Lloh16:
	adrp	x21, _HDMI_CSC_COEF_C1_MSB@GOTPAGE
Lloh17:
	ldr	x21, [x21, _HDMI_CSC_COEF_C1_MSB@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x22, x24, lsl #2
	ldr	w25, [x8]
	ldr	w26, [x8, #16]
	ldr	w27, [x8, #32]
	and	w1, w25, #0xff
Lloh18:
	adrp	x8, _HDMI_CSC_COEF_A1_LSB@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HDMI_CSC_COEF_A1_LSB@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	and	x28, x23, #0xfffffffe
	add	x2, x8, x28
	mov	x0, x19
	bl	_hdmi_writeb
	asr	w1, w25, #8
Lloh21:
	adrp	x8, _HDMI_CSC_COEF_A1_MSB@GOTPAGE
Lloh22:
	ldr	x8, [x8, _HDMI_CSC_COEF_A1_MSB@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	add	x2, x8, x28
	mov	x0, x19
	bl	_hdmi_writeb
	and	w1, w26, #0xff
Lloh24:
	adrp	x8, _HDMI_CSC_COEF_B1_LSB@GOTPAGE
Lloh25:
	ldr	x8, [x8, _HDMI_CSC_COEF_B1_LSB@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	add	x2, x8, x28
	mov	x0, x19
	bl	_hdmi_writeb
	asr	w1, w26, #8
Lloh27:
	adrp	x8, _HDMI_CSC_COEF_B1_MSB@GOTPAGE
Lloh28:
	ldr	x8, [x8, _HDMI_CSC_COEF_B1_MSB@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	add	x2, x8, x28
	mov	x0, x19
	bl	_hdmi_writeb
	and	w1, w27, #0xff
Lloh30:
	adrp	x8, _HDMI_CSC_COEF_C1_LSB@GOTPAGE
Lloh31:
	ldr	x8, [x8, _HDMI_CSC_COEF_C1_LSB@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	add	x2, x8, x28
	mov	x0, x19
	bl	_hdmi_writeb
	asr	w1, w27, #8
	ldr	x8, [x21]
	add	x2, x8, x28
	mov	x0, x19
	bl	_hdmi_writeb
	add	x24, x24, #1
	ldr	x8, [x20]
	ldr	x0, [x8]
	bl	_ARRAY_SIZE
	add	x23, x23, #2
	cmp	x24, w0, uxtw
	b.lo	LBB0_9
LBB0_10:
Lloh33:
	adrp	x8, _HDMI_CSC_SCALE_CSCSCALE_MASK@GOTPAGE
Lloh34:
	ldr	x8, [x8, _HDMI_CSC_SCALE_CSCSCALE_MASK@GOTPAGEOFF]
Lloh35:
	adrp	x9, _HDMI_CSC_SCALE@GOTPAGE
Lloh36:
	ldr	x9, [x9, _HDMI_CSC_SCALE@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x8]
Lloh38:
	ldr	w3, [x9]
	mov	x0, x19
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_hdmi_modb
LBB0_11:
Lloh39:
	adrp	x22, _csc_coeff_default@GOTPAGE
Lloh40:
	ldr	x22, [x22, _csc_coeff_default@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh37
	.loh AdrpLdrGot	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_csc_coeff_default,8,3          ; @csc_coeff_default
	.comm	_V4L2_YCBCR_ENC_601,8,3         ; @V4L2_YCBCR_ENC_601
	.comm	_csc_coeff_rgb_out_eitu601,8,3  ; @csc_coeff_rgb_out_eitu601
	.comm	_csc_coeff_rgb_out_eitu709,8,3  ; @csc_coeff_rgb_out_eitu709
	.comm	_csc_coeff_rgb_in_eitu601,8,3   ; @csc_coeff_rgb_in_eitu601
	.comm	_csc_coeff_rgb_in_eitu709,8,3   ; @csc_coeff_rgb_in_eitu709
	.comm	_HDMI_CSC_COEF_A1_LSB,8,3       ; @HDMI_CSC_COEF_A1_LSB
	.comm	_HDMI_CSC_COEF_A1_MSB,8,3       ; @HDMI_CSC_COEF_A1_MSB
	.comm	_HDMI_CSC_COEF_B1_LSB,8,3       ; @HDMI_CSC_COEF_B1_LSB
	.comm	_HDMI_CSC_COEF_B1_MSB,8,3       ; @HDMI_CSC_COEF_B1_MSB
	.comm	_HDMI_CSC_COEF_C1_LSB,8,3       ; @HDMI_CSC_COEF_C1_LSB
	.comm	_HDMI_CSC_COEF_C1_MSB,8,3       ; @HDMI_CSC_COEF_C1_MSB
	.comm	_HDMI_CSC_SCALE_CSCSCALE_MASK,4,2 ; @HDMI_CSC_SCALE_CSCSCALE_MASK
	.comm	_HDMI_CSC_SCALE,4,2             ; @HDMI_CSC_SCALE
	.no_dead_strip	_dw_hdmi_update_csc_coeffs
.subsections_via_symbols
