	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda1997x_configure_csc
_tda1997x_configure_csc:                ## @tda1997x_configure_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_to_state
	movq	%rax, %rbx
	movq	_debug@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	16(%rax), %edx
	movq	_hdmi_colorspace_names@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	40(%rbx), %rcx
	movl	(%rax,%rcx,4), %r8d
	movq	_v4l2_quantization_names@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%rbx), %rcx
	movl	(%rax,%rcx,4), %r9d
	movq	_vidfmt_names@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rcx
	xorl	%r15d, %r15d
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_v4l_dbg
	movq	$0, 8(%rbx)
	movq	(%rbx), %rax
	leaq	-129(%rax), %rcx
	cmpq	$2, %rcx
	jae	LBB0_1
## %bb.10:
	movl	32(%rbx), %eax
	movq	_V4L2_COLORSPACE_SRGB@GOTPCREL(%rip), %rcx
	leaq	_tda1997x_configure_csc.yuv_blanking(%rip), %r15
	cmpl	(%rcx), %eax
	jne	LBB0_23
## %bb.11:
	movq	24(%rbx), %rax
	movq	_V4L2_QUANTIZATION_FULL_RANGE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.12:
	cmpl	$577, 20(%rbx)                  ## imm = 0x241
	jge	LBB0_13
## %bb.14:
	movq	_RGBFULL_ITU601@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_1:
	cmpq	$128, %rax
	jne	LBB0_2
## %bb.3:
	movl	32(%rbx), %eax
	movq	_V4L2_COLORSPACE_SRGB@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.4:
	movq	24(%rbx), %rax
	movq	_V4L2_QUANTIZATION_LIM_RANGE@GOTPCREL(%rip), %rcx
	leaq	_tda1997x_configure_csc.rgb_blanking(%rip), %r15
	cmpq	(%rcx), %rax
	jne	LBB0_23
## %bb.5:
	movq	_RGBLIMITED_RGBFULL@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_2:
	movb	$1, %r12b
	jmp	LBB0_24
LBB0_15:
	movq	_V4L2_QUANTIZATION_LIM_RANGE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_23
## %bb.16:
	cmpl	$577, 20(%rbx)                  ## imm = 0x241
	jge	LBB0_17
## %bb.18:
	movq	_RGBLIMITED_ITU601@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_6:
	movq	_V4L2_COLORSPACE_REC709@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.7:
	leaq	_tda1997x_configure_csc.rgb_blanking(%rip), %r15
	movq	_ITU709_RGBFULL@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_13:
	movq	_RGBFULL_ITU709@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_8:
	movq	_V4L2_COLORSPACE_SMPTE170M@GOTPCREL(%rip), %rcx
	leaq	_tda1997x_configure_csc.rgb_blanking(%rip), %r15
	cmpl	(%rcx), %eax
	jne	LBB0_23
## %bb.9:
	movq	_ITU601_RGBFULL@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_17:
	movq	_RGBLIMITED_ITU709@GOTPCREL(%rip), %rax
LBB0_19:
	leaq	_tda1997x_configure_csc.yuv_blanking(%rip), %r15
LBB0_20:
	movq	_conv_matrix@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax), %rax
	shlq	$6, %rax
	leaq	(%rcx,%rax), %rdx
	movq	%rdx, 8(%rbx)
	testq	%rcx, %rcx
	je	LBB0_23
## %bb.21:
	movl	(%r12), %esi
	movl	16(%rbx), %edx
	movl	60(%rcx,%rax), %r8d
	leaq	L_.str.1(%rip), %rcx
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_v4l_dbg
	movq	_REG_VDP_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_io_read
	movq	_VDP_CTRL_MATRIX_BP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_io_write
	movq	_REG_VDP_MATRIX@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	movq	8(%rbx), %rax
	movl	56(%rax), %edx
	movq	%r14, %rdi
	callq	_io_write16
	movq	(%r12), %rsi
	addq	$2, %rsi
	movq	8(%rbx), %rax
	movl	52(%rax), %edx
	movq	%r14, %rdi
	callq	_io_write16
	movq	(%r12), %rsi
	addq	$4, %rsi
	movq	8(%rbx), %rax
	movl	48(%rax), %edx
	movq	%r14, %rdi
	callq	_io_write16
	movq	(%r12), %rsi
	addq	$6, %rsi
	movq	8(%rbx), %rax
	movl	44(%rax), %edx
	movq	%r14, %rdi
	callq	_io_write16
	movq	(%r12), %rsi
	addq	$8, %rsi
	movq	8(%rbx), %rax
	movl	40(%rax), %edx
	movq	%r14, %rdi
	callq	_io_write16
	movq	(%r12), %rsi
	addq	$10, %rsi
	movq	8(%rbx), %rax
	movl	36(%rax), %edx
	movq	%r14, %rdi
	callq	_io_write16
	movq	(%r12), %rsi
	addq	$12, %rsi
	movq	8(%rbx), %rax
	movl	32(%rax), %edx
	movq	%r14, %rdi
	callq	_io_write16
	movq	(%r12), %rsi
	addq	$14, %rsi
	movq	8(%rbx), %rax
	movl	28(%rax), %edx
	movq	%r14, %rdi
	callq	_io_write16
	movq	(%r12), %rsi
	addq	$16, %rsi
	movq	8(%rbx), %rax
	movl	24(%rax), %edx
	movq	%r14, %rdi
	callq	_io_write16
	movq	(%r12), %rsi
	addq	$18, %rsi
	movq	8(%rbx), %rax
	movl	20(%rax), %edx
	movq	%r14, %rdi
	callq	_io_write16
	movq	(%r12), %rsi
	addq	$20, %rsi
	movq	8(%rbx), %rax
	movl	16(%rax), %edx
	movq	%r14, %rdi
	callq	_io_write16
	movq	(%r12), %rsi
	addq	$22, %rsi
	movq	8(%rbx), %rax
	movl	12(%rax), %edx
	movq	%r14, %rdi
	callq	_io_write16
	movq	(%r12), %rsi
	addq	$24, %rsi
	movq	8(%rbx), %rax
	movl	8(%rax), %edx
	movq	%r14, %rdi
	callq	_io_write16
	movq	(%r12), %rsi
	addq	$26, %rsi
	movq	8(%rbx), %rax
	movl	4(%rax), %edx
	movq	%r14, %rdi
	callq	_io_write16
	movq	(%r12), %rsi
	addq	$28, %rsi
	movq	8(%rbx), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_io_write16
	jmp	LBB0_22
LBB0_23:
	xorl	%r12d, %r12d
LBB0_24:
	movq	_REG_VDP_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_io_read
	movq	_VDP_CTRL_MATRIX_BP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_io_write
	testb	%r12b, %r12b
	je	LBB0_22
## %bb.25:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	_REG_BLK_GY@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	(%r15), %edx
	movq	%r14, %rdi
	callq	_io_write16
	movq	_REG_BLK_BU@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	4(%r15), %edx
	movq	%r14, %rdi
	callq	_io_write16
	movq	_REG_BLK_RV@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	8(%r15), %edx
	movq	%r14, %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_io_write16                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @tda1997x_configure_csc.rgb_blanking
_tda1997x_configure_csc.rgb_blanking:
	.long	64                              ## 0x40
	.long	64                              ## 0x40
	.long	64                              ## 0x40

	.p2align	2                               ## @tda1997x_configure_csc.yuv_blanking
_tda1997x_configure_csc.yuv_blanking:
	.long	64                              ## 0x40
	.long	512                             ## 0x200
	.long	512                             ## 0x200

	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"input:%s quant:%s output:%s\n"

	.comm	_hdmi_colorspace_names,8,3      ## @hdmi_colorspace_names
	.comm	_v4l2_quantization_names,8,3    ## @v4l2_quantization_names
	.comm	_vidfmt_names,8,3               ## @vidfmt_names
	.comm	_V4L2_COLORSPACE_SRGB,4,2       ## @V4L2_COLORSPACE_SRGB
	.comm	_V4L2_QUANTIZATION_LIM_RANGE,8,3 ## @V4L2_QUANTIZATION_LIM_RANGE
	.comm	_conv_matrix,8,3                ## @conv_matrix
	.comm	_RGBLIMITED_RGBFULL,8,3         ## @RGBLIMITED_RGBFULL
	.comm	_V4L2_COLORSPACE_REC709,4,2     ## @V4L2_COLORSPACE_REC709
	.comm	_ITU709_RGBFULL,8,3             ## @ITU709_RGBFULL
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ## @V4L2_COLORSPACE_SMPTE170M
	.comm	_ITU601_RGBFULL,8,3             ## @ITU601_RGBFULL
	.comm	_V4L2_QUANTIZATION_FULL_RANGE,8,3 ## @V4L2_QUANTIZATION_FULL_RANGE
	.comm	_RGBFULL_ITU601,8,3             ## @RGBFULL_ITU601
	.comm	_RGBFULL_ITU709,8,3             ## @RGBFULL_ITU709
	.comm	_RGBLIMITED_ITU601,8,3          ## @RGBLIMITED_ITU601
	.comm	_RGBLIMITED_ITU709,8,3          ## @RGBLIMITED_ITU709
L_.str.1:                               ## @.str.1
	.asciz	"%s\n"

	.comm	_REG_VDP_CTRL,4,2               ## @REG_VDP_CTRL
	.comm	_VDP_CTRL_MATRIX_BP,4,2         ## @VDP_CTRL_MATRIX_BP
	.comm	_REG_VDP_MATRIX,8,3             ## @REG_VDP_MATRIX
	.comm	_REG_BLK_GY,8,3                 ## @REG_BLK_GY
	.comm	_REG_BLK_BU,8,3                 ## @REG_BLK_BU
	.comm	_REG_BLK_RV,8,3                 ## @REG_BLK_RV
	.no_dead_strip	_tda1997x_configure_csc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda1997x_configure_csc
_tda1997x_configure_csc:                ; @tda1997x_configure_csc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	bl	_to_state
	mov	x20, x0
Lloh0:
	adrp	x22, _debug@GOTPAGE
Lloh1:
	ldr	x22, [x22, _debug@GOTPAGEOFF]
	ldr	w1, [x22]
	ldr	w2, [x0, #16]
Lloh2:
	adrp	x8, _hdmi_colorspace_names@GOTPAGE
Lloh3:
	ldr	x8, [x8, _hdmi_colorspace_names@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	x9, [x0, #40]
	ldr	w4, [x8, x9, lsl #2]
Lloh5:
	adrp	x8, _v4l2_quantization_names@GOTPAGE
Lloh6:
	ldr	x8, [x8, _v4l2_quantization_names@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x0, #24]
Lloh8:
	adrp	x10, _vidfmt_names@GOTPAGE
Lloh9:
	ldr	x10, [x10, _vidfmt_names@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	ldr	x11, [x0]
	ldr	w8, [x8, x9, lsl #2]
	ldr	w9, [x10, x11, lsl #2]
	stp	x8, x9, [sp]
Lloh11:
	adrp	x3, l_.str@PAGE
Lloh12:
	add	x3, x3, l_.str@PAGEOFF
	mov	w23, #1
	mov	w0, #1
	bl	_v4l_dbg
	str	xzr, [x20, #8]
	ldr	x8, [x20]
	sub	x9, x8, #129
	cmp	x9, #2
	b.hs	LBB0_4
; %bb.1:
	ldr	w8, [x20, #32]
Lloh13:
	adrp	x9, _V4L2_COLORSPACE_SRGB@GOTPAGE
Lloh14:
	ldr	x9, [x9, _V4L2_COLORSPACE_SRGB@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.2:
	ldr	x8, [x20, #24]
Lloh16:
	adrp	x9, _V4L2_QUANTIZATION_FULL_RANGE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _V4L2_QUANTIZATION_FULL_RANGE@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.3:
	ldr	w8, [x20, #20]
Lloh19:
	adrp	x9, _RGBFULL_ITU709@GOTPAGE
Lloh20:
	ldr	x9, [x9, _RGBFULL_ITU709@GOTPAGEOFF]
Lloh21:
	adrp	x10, _RGBFULL_ITU601@GOTPAGE
Lloh22:
	ldr	x10, [x10, _RGBFULL_ITU601@GOTPAGEOFF]
	b	LBB0_11
LBB0_4:
	cmp	x8, #128
	b.ne	LBB0_8
; %bb.5:
	ldr	w8, [x20, #32]
Lloh23:
	adrp	x9, _V4L2_COLORSPACE_SRGB@GOTPAGE
Lloh24:
	ldr	x9, [x9, _V4L2_COLORSPACE_SRGB@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_13
; %bb.6:
	ldr	x8, [x20, #24]
Lloh26:
	adrp	x9, _V4L2_QUANTIZATION_LIM_RANGE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _V4L2_QUANTIZATION_LIM_RANGE@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
Lloh29:
	adrp	x21, _tda1997x_configure_csc.rgb_blanking@PAGE
Lloh30:
	add	x21, x21, _tda1997x_configure_csc.rgb_blanking@PAGEOFF
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.7:
Lloh31:
	adrp	x8, _RGBLIMITED_RGBFULL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _RGBLIMITED_RGBFULL@GOTPAGEOFF]
	b	LBB0_17
LBB0_8:
	mov	x21, #0
	b	LBB0_20
LBB0_9:
Lloh33:
	adrp	x9, _V4L2_QUANTIZATION_LIM_RANGE@GOTPAGE
Lloh34:
	ldr	x9, [x9, _V4L2_QUANTIZATION_LIM_RANGE@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.10:
	ldr	w8, [x20, #20]
Lloh36:
	adrp	x9, _RGBLIMITED_ITU709@GOTPAGE
Lloh37:
	ldr	x9, [x9, _RGBLIMITED_ITU709@GOTPAGEOFF]
Lloh38:
	adrp	x10, _RGBLIMITED_ITU601@GOTPAGE
Lloh39:
	ldr	x10, [x10, _RGBLIMITED_ITU601@GOTPAGEOFF]
LBB0_11:
	cmp	w8, #577
	csel	x8, x10, x9, lt
Lloh40:
	adrp	x21, _tda1997x_configure_csc.yuv_blanking@PAGE
Lloh41:
	add	x21, x21, _tda1997x_configure_csc.yuv_blanking@PAGEOFF
	b	LBB0_17
LBB0_12:
	mov	w23, #0
Lloh42:
	adrp	x21, _tda1997x_configure_csc.yuv_blanking@PAGE
Lloh43:
	add	x21, x21, _tda1997x_configure_csc.yuv_blanking@PAGEOFF
	b	LBB0_20
LBB0_13:
Lloh44:
	adrp	x9, _V4L2_COLORSPACE_REC709@GOTPAGE
Lloh45:
	ldr	x9, [x9, _V4L2_COLORSPACE_REC709@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_15
; %bb.14:
Lloh47:
	adrp	x21, _tda1997x_configure_csc.rgb_blanking@PAGE
Lloh48:
	add	x21, x21, _tda1997x_configure_csc.rgb_blanking@PAGEOFF
Lloh49:
	adrp	x8, _ITU709_RGBFULL@GOTPAGE
Lloh50:
	ldr	x8, [x8, _ITU709_RGBFULL@GOTPAGEOFF]
	b	LBB0_17
LBB0_15:
Lloh51:
	adrp	x9, _V4L2_COLORSPACE_SMPTE170M@GOTPAGE
Lloh52:
	ldr	x9, [x9, _V4L2_COLORSPACE_SMPTE170M@GOTPAGEOFF]
Lloh53:
	ldr	w9, [x9]
Lloh54:
	adrp	x21, _tda1997x_configure_csc.rgb_blanking@PAGE
Lloh55:
	add	x21, x21, _tda1997x_configure_csc.rgb_blanking@PAGEOFF
	cmp	w8, w9
	b.ne	LBB0_19
; %bb.16:
Lloh56:
	adrp	x8, _ITU601_RGBFULL@GOTPAGE
Lloh57:
	ldr	x8, [x8, _ITU601_RGBFULL@GOTPAGEOFF]
LBB0_17:
Lloh58:
	adrp	x9, _conv_matrix@GOTPAGE
Lloh59:
	ldr	x9, [x9, _conv_matrix@GOTPAGEOFF]
Lloh60:
	ldr	x9, [x9]
	ldr	x8, [x8]
	add	x8, x9, x8, lsl #6
	str	x8, [x20, #8]
	cbz	x9, LBB0_19
; %bb.18:
	ldr	w1, [x22]
	ldr	w2, [x20, #16]
	ldr	w4, [x8, #60]
Lloh61:
	adrp	x3, l_.str.1@PAGE
Lloh62:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_v4l_dbg
Lloh63:
	adrp	x22, _REG_VDP_CTRL@GOTPAGE
Lloh64:
	ldr	x22, [x22, _REG_VDP_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_io_read
Lloh65:
	adrp	x8, _VDP_CTRL_MATRIX_BP@GOTPAGE
Lloh66:
	ldr	x8, [x8, _VDP_CTRL_MATRIX_BP@GOTPAGEOFF]
Lloh67:
	ldr	w8, [x8]
	bic	w2, w0, w8
	ldr	w1, [x22]
	mov	x0, x19
	bl	_io_write
Lloh68:
	adrp	x22, _REG_VDP_MATRIX@GOTPAGE
Lloh69:
	ldr	x22, [x22, _REG_VDP_MATRIX@GOTPAGEOFF]
	ldr	x1, [x22]
	ldr	x8, [x20, #8]
	ldr	w2, [x8, #56]
	mov	x0, x19
	bl	_io_write16
	ldr	x8, [x22]
	add	x1, x8, #2
	ldr	x8, [x20, #8]
	ldr	w2, [x8, #52]
	mov	x0, x19
	bl	_io_write16
	ldr	x8, [x22]
	add	x1, x8, #4
	ldr	x8, [x20, #8]
	ldr	w2, [x8, #48]
	mov	x0, x19
	bl	_io_write16
	ldr	x8, [x22]
	add	x1, x8, #6
	ldr	x8, [x20, #8]
	ldr	w2, [x8, #44]
	mov	x0, x19
	bl	_io_write16
	ldr	x8, [x22]
	add	x1, x8, #8
	ldr	x8, [x20, #8]
	ldr	w2, [x8, #40]
	mov	x0, x19
	bl	_io_write16
	ldr	x8, [x22]
	add	x1, x8, #10
	ldr	x8, [x20, #8]
	ldr	w2, [x8, #36]
	mov	x0, x19
	bl	_io_write16
	ldr	x8, [x22]
	add	x1, x8, #12
	ldr	x8, [x20, #8]
	ldr	w2, [x8, #32]
	mov	x0, x19
	bl	_io_write16
	ldr	x8, [x22]
	add	x1, x8, #14
	ldr	x8, [x20, #8]
	ldr	w2, [x8, #28]
	mov	x0, x19
	bl	_io_write16
	ldr	x8, [x22]
	add	x1, x8, #16
	ldr	x8, [x20, #8]
	ldr	w2, [x8, #24]
	mov	x0, x19
	bl	_io_write16
	ldr	x8, [x22]
	add	x1, x8, #18
	ldr	x8, [x20, #8]
	ldr	w2, [x8, #20]
	mov	x0, x19
	bl	_io_write16
	ldr	x8, [x22]
	add	x1, x8, #20
	ldr	x8, [x20, #8]
	ldr	w2, [x8, #16]
	mov	x0, x19
	bl	_io_write16
	ldr	x8, [x22]
	add	x1, x8, #22
	ldr	x8, [x20, #8]
	ldr	w2, [x8, #12]
	mov	x0, x19
	bl	_io_write16
	ldr	x8, [x22]
	add	x1, x8, #24
	ldr	x8, [x20, #8]
	ldr	w2, [x8, #8]
	mov	x0, x19
	bl	_io_write16
	ldr	x8, [x22]
	add	x1, x8, #26
	ldr	x8, [x20, #8]
	ldr	w2, [x8, #4]
	mov	x0, x19
	bl	_io_write16
	ldr	x8, [x22]
	add	x1, x8, #28
	ldr	x8, [x20, #8]
	ldr	w2, [x8]
	mov	x0, x19
	bl	_io_write16
	b	LBB0_22
LBB0_19:
	mov	w23, #0
LBB0_20:
Lloh70:
	adrp	x20, _REG_VDP_CTRL@GOTPAGE
Lloh71:
	ldr	x20, [x20, _REG_VDP_CTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_io_read
Lloh72:
	adrp	x8, _VDP_CTRL_MATRIX_BP@GOTPAGE
Lloh73:
	ldr	x8, [x8, _VDP_CTRL_MATRIX_BP@GOTPAGEOFF]
Lloh74:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_io_write
	tbz	w23, #0, LBB0_22
; %bb.21:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_22:
Lloh75:
	adrp	x8, _REG_BLK_GY@GOTPAGE
Lloh76:
	ldr	x8, [x8, _REG_BLK_GY@GOTPAGEOFF]
Lloh77:
	ldr	x1, [x8]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_io_write16
Lloh78:
	adrp	x8, _REG_BLK_BU@GOTPAGE
Lloh79:
	ldr	x8, [x8, _REG_BLK_BU@GOTPAGEOFF]
Lloh80:
	ldr	x1, [x8]
	ldr	w2, [x21, #4]
	mov	x0, x19
	bl	_io_write16
Lloh81:
	adrp	x8, _REG_BLK_RV@GOTPAGE
Lloh82:
	ldr	x8, [x8, _REG_BLK_RV@GOTPAGEOFF]
Lloh83:
	ldr	x1, [x8]
	ldr	w2, [x21, #8]
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_io_write16
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGot	Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGot	Lloh63, Lloh64
	.loh AdrpAdd	Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGot	Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @tda1997x_configure_csc.rgb_blanking
_tda1997x_configure_csc.rgb_blanking:
	.long	64                              ; 0x40
	.long	64                              ; 0x40
	.long	64                              ; 0x40

	.p2align	2                               ; @tda1997x_configure_csc.yuv_blanking
_tda1997x_configure_csc.yuv_blanking:
	.long	64                              ; 0x40
	.long	512                             ; 0x200
	.long	512                             ; 0x200

	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"input:%s quant:%s output:%s\n"

	.comm	_hdmi_colorspace_names,8,3      ; @hdmi_colorspace_names
	.comm	_v4l2_quantization_names,8,3    ; @v4l2_quantization_names
	.comm	_vidfmt_names,8,3               ; @vidfmt_names
	.comm	_V4L2_COLORSPACE_SRGB,4,2       ; @V4L2_COLORSPACE_SRGB
	.comm	_V4L2_QUANTIZATION_LIM_RANGE,8,3 ; @V4L2_QUANTIZATION_LIM_RANGE
	.comm	_conv_matrix,8,3                ; @conv_matrix
	.comm	_RGBLIMITED_RGBFULL,8,3         ; @RGBLIMITED_RGBFULL
	.comm	_V4L2_COLORSPACE_REC709,4,2     ; @V4L2_COLORSPACE_REC709
	.comm	_ITU709_RGBFULL,8,3             ; @ITU709_RGBFULL
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ; @V4L2_COLORSPACE_SMPTE170M
	.comm	_ITU601_RGBFULL,8,3             ; @ITU601_RGBFULL
	.comm	_V4L2_QUANTIZATION_FULL_RANGE,8,3 ; @V4L2_QUANTIZATION_FULL_RANGE
	.comm	_RGBFULL_ITU601,8,3             ; @RGBFULL_ITU601
	.comm	_RGBFULL_ITU709,8,3             ; @RGBFULL_ITU709
	.comm	_RGBLIMITED_ITU601,8,3          ; @RGBLIMITED_ITU601
	.comm	_RGBLIMITED_ITU709,8,3          ; @RGBLIMITED_ITU709
l_.str.1:                               ; @.str.1
	.asciz	"%s\n"

	.comm	_REG_VDP_CTRL,4,2               ; @REG_VDP_CTRL
	.comm	_VDP_CTRL_MATRIX_BP,4,2         ; @VDP_CTRL_MATRIX_BP
	.comm	_REG_VDP_MATRIX,8,3             ; @REG_VDP_MATRIX
	.comm	_REG_BLK_GY,8,3                 ; @REG_BLK_GY
	.comm	_REG_BLK_BU,8,3                 ; @REG_BLK_BU
	.comm	_REG_BLK_RV,8,3                 ; @REG_BLK_RV
	.no_dead_strip	_tda1997x_configure_csc
.subsections_via_symbols
