	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_csc_set_coeff                  ## -- Begin function csc_set_coeff
	.p2align	4, 0x90
_csc_set_coeff:                         ## @csc_set_coeff
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_V4L2_COLORSPACE_SRGB@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_V4L2_COLORSPACE_SMPTE170M@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	cmpl	%ecx, %r9d
	jne	LBB0_1
## %bb.5:
	movl	$1, %eax
	cmpl	%edx, %r8d
	je	LBB0_7
## %bb.6:
	movq	_V4L2_COLORSPACE_REC709@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	cmpl	%edx, %edi
	jne	LBB0_2
LBB0_7:
	movl	%edx, %ecx
	jmp	LBB0_8
LBB0_1:
	movq	_V4L2_COLORSPACE_REC709@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_2:
	cmpl	%ecx, %r8d
	sete	%r10b
	cmpl	%ecx, %edi
	sete	%al
	orb	%r10b, %al
	cmpb	$1, %al
	jne	LBB0_4
## %bb.3:
	movl	$3, %eax
	cmpl	%edx, %r9d
	jne	LBB0_4
LBB0_8:
	movq	_colorspace_coeffs@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	shlq	$4, %rax
	leaq	(%rdx,%rax), %rdi
	cmpl	%r8d, %ecx
	leaq	8(%rdx,%rax), %rax
	cmoveq	%rdi, %rax
	movq	(%rax), %rax
	movl	4(%rax), %ecx
	shll	$16, %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%rsi)
	movl	12(%rax), %ecx
	shll	$16, %ecx
	orl	8(%rax), %ecx
	movl	%ecx, 4(%rsi)
	movl	20(%rax), %ecx
	shll	$16, %ecx
	orl	16(%rax), %ecx
	movl	%ecx, 8(%rsi)
	movl	28(%rax), %ecx
	shll	$16, %ecx
	orl	24(%rax), %ecx
	movl	%ecx, 12(%rsi)
	movl	36(%rax), %ecx
	shll	$16, %ecx
	orl	32(%rax), %ecx
	movl	%ecx, 16(%rsi)
	movl	44(%rax), %ecx
	addq	$40, %rax
	shll	$16, %ecx
	jmp	LBB0_9
LBB0_4:
	movl	20(%rsi), %ecx
	movq	_CSC_BYPASS@GOTPCREL(%rip), %rax
LBB0_9:
	orl	(%rax), %ecx
	movl	%ecx, 20(%rsi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_COLORSPACE_SRGB,4,2       ## @V4L2_COLORSPACE_SRGB
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ## @V4L2_COLORSPACE_SMPTE170M
	.comm	_V4L2_COLORSPACE_REC709,4,2     ## @V4L2_COLORSPACE_REC709
	.comm	_CSC_BYPASS,4,2                 ## @CSC_BYPASS
	.comm	_colorspace_coeffs,8,3          ## @colorspace_coeffs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_csc_set_coeff                  ; -- Begin function csc_set_coeff
	.p2align	2
_csc_set_coeff:                         ; @csc_set_coeff
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _V4L2_COLORSPACE_SRGB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_COLORSPACE_SRGB@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
Lloh3:
	adrp	x8, _V4L2_COLORSPACE_SMPTE170M@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_COLORSPACE_SMPTE170M@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x10, _V4L2_COLORSPACE_REC709@GOTPAGE
Lloh7:
	ldr	x10, [x10, _V4L2_COLORSPACE_REC709@GOTPAGEOFF]
	cmp	w9, w3
	b.ne	LBB0_3
; %bb.1:
	ldr	w10, [x10]
	cmp	w8, w2
	ccmp	w10, w2, #4, ne
	b.ne	LBB0_4
; %bb.2:
	mov	w9, #1
	b	LBB0_7
LBB0_3:
	ldr	w10, [x10]
LBB0_4:
	cmp	w10, w3
	ccmp	w8, w3, #4, ne
	ccmp	w9, w2, #0, eq
	b.eq	LBB0_6
; %bb.5:
	ldr	w9, [x1, #20]
Lloh8:
	adrp	x8, _CSC_BYPASS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CSC_BYPASS@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	mov	w9, #3
	mov	x2, x3
LBB0_7:
Lloh10:
	adrp	x10, _colorspace_coeffs@GOTPAGE
Lloh11:
	ldr	x10, [x10, _colorspace_coeffs@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	add	x9, x10, x9, lsl #4
	add	x10, x9, #8
	cmp	w2, w8
	csel	x8, x9, x10, eq
	ldr	x9, [x8]
	ldp	w10, w8, [x9]
	orr	w8, w10, w8, lsl #16
	str	w8, [x1]
	ldp	w10, w8, [x9, #8]
	orr	w8, w10, w8, lsl #16
	str	w8, [x1, #4]
	ldp	w10, w8, [x9, #16]
	orr	w8, w10, w8, lsl #16
	str	w8, [x1, #8]
	ldp	w10, w8, [x9, #24]
	orr	w8, w10, w8, lsl #16
	str	w8, [x1, #12]
	ldp	w10, w8, [x9, #32]
	orr	w8, w10, w8, lsl #16
	str	w8, [x1, #16]
	add	x8, x9, #40
	ldr	w9, [x9, #44]
	lsl	w9, w9, #16
LBB0_8:
	ldr	w8, [x8]
	orr	w8, w9, w8
	str	w8, [x1, #20]
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_COLORSPACE_SRGB,4,2       ; @V4L2_COLORSPACE_SRGB
	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ; @V4L2_COLORSPACE_SMPTE170M
	.comm	_V4L2_COLORSPACE_REC709,4,2     ; @V4L2_COLORSPACE_REC709
	.comm	_CSC_BYPASS,4,2                 ; @CSC_BYPASS
	.comm	_colorspace_coeffs,8,3          ; @colorspace_coeffs
.subsections_via_symbols
