	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_input
_set_input:                             ## @set_input
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	callq	_i2c_get_clientdata
	movl	%eax, %edi
	callq	_to_state
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_CX25840_COMPOSITE1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_CX25840_COMPOSITE8@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
	movq	_CX25840_COMPONENT_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r15d, %r13d
	andl	%r12d, %r13d
	movl	%r12d, %eax
	andl	$3840, %eax                     ## imm = 0xF00
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_cx25840_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdx
	movl	%r12d, %r8d
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	%r14d, %r9d
	xorl	%eax, %eax
	callq	_v4l_dbg
	movq	_CX25840_VIN1_CH1@GOTPCREL(%rip), %rax
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	cmpl	%r12d, (%rax)
	movl	%r15d, -88(%rbp)                ## 4-byte Spill
	jbe	LBB0_1
## %bb.2:
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	ja	LBB0_6
## %bb.3:
	movl	-84(%rbp), %eax                 ## 4-byte Reload
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	jb	LBB0_6
## %bb.4:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movq	_CX25840_COMPOSITE1@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	addl	$240, %r15d
	movl	$1, -48(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_5
LBB0_1:
	cmpl	%r15d, %r13d
	setne	%r12b
	movq	_cx25840_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rcx
	movl	$1, %edi
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdx
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_v4l_dbg
	movzbl	%bl, %r15d
	movq	_CX25840_SVIDEO_ON@GOTPCREL(%rip), %rax
	notl	%ebx
	andl	(%rax), %ebx
	setne	%al
	andb	%r12b, %al
	movzbl	%al, %r9d
	movq	_cx25840_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rcx
	movl	$1, %edi
	movq	%r14, %rdx
	movl	%r15d, %r8d
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_v4l_dbg
LBB0_5:
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_16:
	movq	%r12, %rdi
	callq	_is_cx2388x
	testq	%rax, %rax
	jne	LBB0_27
## %bb.17:
	movq	%r12, %rdi
	callq	_is_cx231xx
	testq	%rax, %rax
	je	LBB0_18
LBB0_27:
	movq	%r14, %rdi
	movl	$259, %esi                      ## imm = 0x103
	movl	%r15d, -80(%rbp)                ## 4-byte Spill
	movl	%r15d, %edx
	callq	_cx25840_write
	xorl	%eax, %eax
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	sete	%al
	addl	%eax, %eax
	movl	-88(%rbp), %r15d                ## 4-byte Reload
	cmpl	%r15d, %r13d
	movl	$6, %ecx
	cmovnel	%eax, %ecx
	movq	%r14, %rdi
	movl	$1025, %esi                     ## imm = 0x401
	movl	$-7, %edx
	callq	_cx25840_and_or
	movq	%r12, %rdi
	callq	_is_cx2388x
	testq	%rax, %rax
	jne	LBB0_33
## %bb.28:
	movq	%r12, %rdi
	callq	_is_cx231xx
	testq	%rax, %rax
	je	LBB0_29
LBB0_33:
	xorl	%ecx, %ecx
	cmpl	%r15d, %r13d
	sete	%cl
	shll	$2, %ecx
	movq	%r14, %rdi
	movl	$258, %esi                      ## imm = 0x102
	movl	$-5, %edx
	callq	_cx25840_and_or
	testl	%ebx, %ebx
	je	LBB0_35
## %bb.34:
	movq	%r14, %rdi
	movl	$258, %esi                      ## imm = 0x102
	movl	$-3, %edx
	xorl	%ecx, %ecx
	callq	_cx25840_and_or
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_41
LBB0_6:
	testl	$-4081, -44(%rbp)               ## 4-byte Folded Reload
                                        ## imm = 0xF00F
	je	LBB0_7
LBB0_11:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
LBB0_25:
	callq	_v4l_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_45
LBB0_35:
	cmpl	%r15d, %r13d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_41
## %bb.36:
	movq	_CX25840_SVIDEO_CHROMA7@GOTPCREL(%rip), %rax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	cmpl	(%rax), %ecx
	jge	LBB0_37
## %bb.38:
	movq	%r14, %rdi
	movl	$258, %esi                      ## imm = 0x102
	movl	$-3, %edx
	jmp	LBB0_39
LBB0_18:
	leal	-128(%rbx), %eax
	cmpl	$5, %eax
	ja	LBB0_24
## %bb.19:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_23:
	andl	$-193, %r15d
	orl	$64, %r15d
	jmp	LBB0_27
LBB0_29:
	movl	-80(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %ecx
	shrl	$6, %ecx
	notl	%ecx
	andl	$2, %ecx
	movq	%r14, %rdi
	movl	$258, %esi                      ## imm = 0x102
	movl	$-3, %edx
	callq	_cx25840_and_or
	movl	%r15d, %eax
	notl	%eax
	testb	$-64, %al
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_32
## %bb.30:
	andl	$48, %r15d
	cmpl	$48, %r15d
	je	LBB0_32
## %bb.31:
	movq	%r14, %rdi
	movl	$258, %esi                      ## imm = 0x102
	movl	$-5, %edx
	movl	$4, %ecx
	jmp	LBB0_40
LBB0_7:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	andl	$240, %ecx
	movq	_CX25840_SVIDEO_LUMA1@GOTPCREL(%rip), %rdx
	movl	%ecx, %eax
	subl	(%rdx), %eax
	jl	LBB0_11
## %bb.8:
	movq	_CX25840_SVIDEO_LUMA8@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jg	LBB0_11
## %bb.9:
	movq	_CX25840_SVIDEO_CHROMA4@GOTPCREL(%rip), %rdx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	subl	(%rdx), %ecx
	jl	LBB0_11
## %bb.10:
	movq	_CX25840_SVIDEO_CHROMA8@GOTPCREL(%rip), %rdx
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	cmpl	(%rdx), %esi
	jg	LBB0_11
## %bb.12:
	sarl	$4, %eax
	addl	$240, %eax
	movq	_CX25840_SVIDEO_CHROMA7@GOTPCREL(%rip), %rdx
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	subl	(%rdx), %r15d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jge	LBB0_13
## %bb.14:
	andl	$207, %eax
	sarl	$4, %ecx
	orl	%eax, %ecx
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	movl	%ecx, %r15d
	jmp	LBB0_15
LBB0_37:
	movq	%r14, %rdi
	movl	$258, %esi                      ## imm = 0x102
	movl	$-3, %edx
	movl	$2, %ecx
	jmp	LBB0_40
LBB0_32:
	movq	%r14, %rdi
	movl	$258, %esi                      ## imm = 0x102
	movl	$-5, %edx
LBB0_39:
	xorl	%ecx, %ecx
LBB0_40:
	callq	_cx25840_and_or
LBB0_41:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r12)
	movl	%ebx, 4(%r12)
	movq	%r14, %rdi
	callq	_cx25840_audio_set_path
	movq	%r14, %rdi
	callq	_input_change
	movq	%r12, %rdi
	callq	_is_cx2388x
	testq	%rax, %rax
	je	LBB0_43
## %bb.42:
	movq	%r14, %rdi
	movl	$292, %esi                      ## imm = 0x124
	movl	$3, %edx
	callq	_cx25840_write
	movq	%r14, %rdi
	movl	$324, %esi                      ## imm = 0x144
	movl	$5, %edx
	callq	_cx25840_write
	movq	%r14, %rdi
	movl	$2324, %esi                     ## imm = 0x914
	movl	$160, %edx
	callq	_cx25840_write
	movq	%r14, %rdi
	movl	$2328, %esi                     ## imm = 0x918
	movl	$160, %edx
	callq	_cx25840_write
	movq	%r14, %rdi
	movl	$2329, %esi                     ## imm = 0x919
	movl	$1, %edx
	callq	_cx25840_write
	xorl	%ebx, %ebx
	jmp	LBB0_45
LBB0_43:
	movq	%r12, %rdi
	callq	_is_cx231xx
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_45
## %bb.44:
	movq	%r14, %rdi
	movl	$292, %esi                      ## imm = 0x124
	movl	$3, %edx
	callq	_cx25840_write
	movq	%r14, %rdi
	movl	$2324, %esi                     ## imm = 0x914
	movl	$160, %edx
	callq	_cx25840_write
	movq	%r14, %rdi
	movl	$2328, %esi                     ## imm = 0x918
	movl	$160, %edx
	callq	_cx25840_write
	movq	%r14, %rdi
	movl	$2329, %esi                     ## imm = 0x919
	movl	$1, %edx
	callq	_cx25840_write
LBB0_45:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	jmp	LBB0_25
LBB0_22:
	andl	$-193, %r15d
	jmp	LBB0_27
LBB0_21:
	andl	$-49, %r15d
	orl	$32, %r15d
	jmp	LBB0_27
LBB0_20:
	andl	$-49, %r15d
	orl	$16, %r15d
	jmp	LBB0_27
LBB0_26:
	andl	$-49, %r15d
	jmp	LBB0_27
LBB0_13:
	andl	$63, %eax
	sarl	$2, %r15d
	orl	%eax, %r15d
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
LBB0_15:
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_16
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_27, LBB0_27-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_26, LBB0_26-LJTI0_0
LJTI0_0:
	.long	L0_0_set_27
	.long	L0_0_set_23
	.long	L0_0_set_22
	.long	L0_0_set_21
	.long	L0_0_set_20
	.long	L0_0_set_26
	.end_data_region
                                        ## -- End function
	.comm	_CX25840_COMPOSITE1,4,2         ## @CX25840_COMPOSITE1
	.comm	_CX25840_COMPOSITE8,4,2         ## @CX25840_COMPOSITE8
	.comm	_CX25840_COMPONENT_ON,4,2       ## @CX25840_COMPONENT_ON
	.comm	_cx25840_debug,4,2              ## @cx25840_debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"decoder set video input %d, audio input %d\n"

	.comm	_CX25840_VIN1_CH1,4,2           ## @CX25840_VIN1_CH1
L_.str.1:                               ## @.str.1
	.asciz	"vid_input 0x%x\n"

	.comm	_CX25840_SVIDEO_ON,4,2          ## @CX25840_SVIDEO_ON
L_.str.2:                               ## @.str.2
	.asciz	"mux cfg 0x%x comp=%d\n"

	.comm	_CX25840_SVIDEO_LUMA1,4,2       ## @CX25840_SVIDEO_LUMA1
	.comm	_CX25840_SVIDEO_LUMA8,4,2       ## @CX25840_SVIDEO_LUMA8
	.comm	_CX25840_SVIDEO_CHROMA4,4,2     ## @CX25840_SVIDEO_CHROMA4
	.comm	_CX25840_SVIDEO_CHROMA8,4,2     ## @CX25840_SVIDEO_CHROMA8
L_.str.3:                               ## @.str.3
	.asciz	"0x%04x is not a valid video input!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CX25840_SVIDEO_CHROMA7,4,2     ## @CX25840_SVIDEO_CHROMA7
L_.str.4:                               ## @.str.4
	.asciz	"0x%04x is not a valid audio input!\n"

	.no_dead_strip	_set_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_input
_set_input:                             ; @set_input
	.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	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_i2c_get_clientdata
	bl	_to_state
	mov	x20, x0
Lloh0:
	adrp	x23, _CX25840_COMPOSITE1@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CX25840_COMPOSITE1@GOTPAGEOFF]
	ldr	w27, [x23]
Lloh2:
	adrp	x8, _CX25840_COMPOSITE8@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CX25840_COMPOSITE8@GOTPAGEOFF]
Lloh4:
	ldr	w24, [x8]
Lloh5:
	adrp	x8, _CX25840_COMPONENT_ON@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CX25840_COMPONENT_ON@GOTPAGEOFF]
Lloh7:
	ldr	w25, [x8]
	and	w26, w25, w22
	and	w8, w22, #0xf00
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
Lloh8:
	adrp	x28, _cx25840_debug@GOTPAGE
Lloh9:
	ldr	x28, [x28, _cx25840_debug@GOTPAGEOFF]
	ldr	w1, [x28]
Lloh10:
	adrp	x3, l_.str@PAGE
Lloh11:
	add	x3, x3, l_.str@PAGEOFF
	str	x21, [sp]
	mov	w0, #1
	mov	x2, x19
	mov	x4, x22
	bl	_v4l_dbg
Lloh12:
	adrp	x8, _CX25840_VIN1_CH1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CX25840_VIN1_CH1@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ls	LBB0_7
; %bb.1:
	cmp	w27, w22
	ccmp	w24, w22, #0, ls
	b.hs	LBB0_8
; %bb.2:
	tst	w22, #0xfffff00f
	b.ne	LBB0_5
; %bb.3:
	and	w9, w22, #0xf0
Lloh15:
	adrp	x8, _CX25840_SVIDEO_LUMA1@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CX25840_SVIDEO_LUMA1@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x10, _CX25840_SVIDEO_LUMA8@GOTPAGE
Lloh19:
	ldr	x10, [x10, _CX25840_SVIDEO_LUMA8@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	subs	w8, w9, w8
	ccmp	w9, w10, #0, ge
	b.gt	LBB0_5
; %bb.4:
Lloh21:
	adrp	x9, _CX25840_SVIDEO_CHROMA4@GOTPAGE
Lloh22:
	ldr	x9, [x9, _CX25840_SVIDEO_CHROMA4@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
Lloh24:
	adrp	x10, _CX25840_SVIDEO_CHROMA8@GOTPAGE
Lloh25:
	ldr	x10, [x10, _CX25840_SVIDEO_CHROMA8@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	ldr	w11, [sp, #12]                  ; 4-byte Folded Reload
	subs	w9, w11, w9
	ccmp	w11, w10, #0, ge
	b.le	LBB0_33
LBB0_5:
Lloh27:
	adrp	x1, l_.str.3@PAGE
Lloh28:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x22
LBB0_6:
	bl	_v4l_err
Lloh29:
	adrp	x8, _EINVAL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_22
LBB0_7:
	ldr	w1, [x28]
Lloh32:
	adrp	x3, l_.str.1@PAGE
Lloh33:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	mov	x4, x22
	bl	_v4l_dbg
Lloh34:
	adrp	x8, _CX25840_SVIDEO_ON@GOTPAGE
Lloh35:
	ldr	x8, [x8, _CX25840_SVIDEO_ON@GOTPAGEOFF]
	and	w23, w22, #0xff
Lloh36:
	ldr	w8, [x8]
	bics	wzr, w8, w22
	ccmp	w26, w25, #4, ne
	cset	w27, ne
	ldr	w1, [x28]
Lloh37:
	adrp	x3, l_.str.2@PAGE
Lloh38:
	add	x3, x3, l_.str.2@PAGEOFF
	str	x27, [sp]
	mov	w0, #1
	mov	x2, x19
	mov	x4, x23
	bl	_v4l_dbg
	b	LBB0_9
LBB0_8:
	ldr	w8, [x23]
	sub	w8, w22, w8
	add	w23, w8, #240
	mov	w27, #1
LBB0_9:
	mov	x0, x20
	bl	_is_cx2388x
	cbnz	x0, LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_is_cx231xx
	cbz	x0, LBB0_26
LBB0_11:
	mov	x0, x19
	mov	w1, #259
	mov	x2, x23
	bl	_cx25840_write
	cmp	w27, #0
	cset	w8, eq
	lsl	w8, w8, #1
	mov	w9, #6
	cmp	w26, w25
	csel	w3, w9, w8, eq
	mov	x0, x19
	mov	w1, #1025
	mov	w2, #-7
	bl	_cx25840_and_or
	mov	x0, x20
	bl	_is_cx2388x
	cbnz	x0, LBB0_13
; %bb.12:
	mov	x0, x20
	bl	_is_cx231xx
	cbz	x0, LBB0_29
LBB0_13:
	cmp	w26, w25
	cset	w8, eq
	lsl	w3, w8, #2
	mov	x0, x19
	mov	w1, #258
	mov	w2, #-5
	bl	_cx25840_and_or
	cbz	w27, LBB0_23
LBB0_14:
	mov	x0, x19
	mov	w1, #258
	mov	w2, #-3
LBB0_15:
	mov	w3, #0
LBB0_16:
	bl	_cx25840_and_or
LBB0_17:
	stp	w22, w21, [x20]
	mov	x0, x19
	bl	_cx25840_audio_set_path
	mov	x0, x19
	bl	_input_change
	mov	x0, x20
	bl	_is_cx2388x
	cbz	x0, LBB0_19
; %bb.18:
	mov	x0, x19
	mov	w1, #292
	mov	w2, #3
	bl	_cx25840_write
	mov	x0, x19
	mov	w1, #324
	mov	w2, #5
	b	LBB0_21
LBB0_19:
	mov	x0, x20
	bl	_is_cx231xx
	cbz	x0, LBB0_22
; %bb.20:
	mov	x0, x19
	mov	w1, #292
	mov	w2, #3
LBB0_21:
	bl	_cx25840_write
	mov	x0, x19
	mov	w1, #2324
	mov	w2, #160
	bl	_cx25840_write
	mov	x0, x19
	mov	w1, #2328
	mov	w2, #160
	bl	_cx25840_write
	mov	x0, x19
	mov	w1, #2329
	mov	w2, #1
	bl	_cx25840_write
	mov	w0, #0
LBB0_22:
	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
	ret
LBB0_23:
	cmp	w26, w25
	b.eq	LBB0_17
; %bb.24:
Lloh39:
	adrp	x8, _CX25840_SVIDEO_CHROMA7@GOTPAGE
Lloh40:
	ldr	x8, [x8, _CX25840_SVIDEO_CHROMA7@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w9, w8
	b.lt	LBB0_14
; %bb.25:
	mov	x0, x19
	mov	w1, #258
	mov	w2, #-3
	mov	w3, #2
	b	LBB0_16
LBB0_26:
	sub	w8, w21, #128
	cmp	w8, #5
	b.hi	LBB0_34
; %bb.27:
Lloh42:
	adrp	x9, lJTI0_0@PAGE
Lloh43:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_11
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_28:
	and	w8, w23, #0xffffff3f
	orr	w23, w8, #0x40
	b	LBB0_11
LBB0_29:
	mvn	w24, w23
	mov	w8, #2
	bic	w3, w8, w23, lsr #6
	mov	x0, x19
	mov	w1, #258
	mov	w2, #-3
	bl	_cx25840_and_or
	tst	w24, #0xc0
	b.eq	LBB0_32
; %bb.30:
	and	w8, w23, #0x30
	cmp	w8, #48
	b.eq	LBB0_32
; %bb.31:
	mov	x0, x19
	mov	w1, #258
	mov	w2, #-5
	mov	w3, #4
	b	LBB0_16
LBB0_32:
	mov	x0, x19
	mov	w1, #258
	mov	w2, #-5
	b	LBB0_15
LBB0_33:
	asr	w8, w8, #4
	add	w8, w8, #240
Lloh44:
	adrp	x10, _CX25840_SVIDEO_CHROMA7@GOTPAGE
Lloh45:
	ldr	x10, [x10, _CX25840_SVIDEO_CHROMA7@GOTPAGEOFF]
Lloh46:
	ldr	w10, [x10]
	mov	w11, #207
	and	w11, w8, w11
	orr	w9, w11, w9, asr #4
	and	w8, w8, #0x3f
	ldr	w11, [sp, #12]                  ; 4-byte Folded Reload
	subs	w10, w11, w10
	orr	w8, w8, w10, asr #2
	csel	w27, wzr, wzr, lt
	csel	w23, w9, w8, lt
	b	LBB0_9
LBB0_34:
Lloh47:
	adrp	x1, l_.str.4@PAGE
Lloh48:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	b	LBB0_6
LBB0_35:
	and	w23, w23, #0xffffff3f
	b	LBB0_11
LBB0_36:
	and	w8, w23, #0xffffffcf
	orr	w23, w8, #0x20
	b	LBB0_11
LBB0_37:
	and	w8, w23, #0xffffffcf
	orr	w23, w8, #0x10
	b	LBB0_11
LBB0_38:
	and	w23, w23, #0xffffffcf
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_28-LBB0_11)>>2
	.byte	(LBB0_35-LBB0_11)>>2
	.byte	(LBB0_36-LBB0_11)>>2
	.byte	(LBB0_37-LBB0_11)>>2
	.byte	(LBB0_38-LBB0_11)>>2
                                        ; -- End function
	.comm	_CX25840_COMPOSITE1,4,2         ; @CX25840_COMPOSITE1
	.comm	_CX25840_COMPOSITE8,4,2         ; @CX25840_COMPOSITE8
	.comm	_CX25840_COMPONENT_ON,4,2       ; @CX25840_COMPONENT_ON
	.comm	_cx25840_debug,4,2              ; @cx25840_debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"decoder set video input %d, audio input %d\n"

	.comm	_CX25840_VIN1_CH1,4,2           ; @CX25840_VIN1_CH1
l_.str.1:                               ; @.str.1
	.asciz	"vid_input 0x%x\n"

	.comm	_CX25840_SVIDEO_ON,4,2          ; @CX25840_SVIDEO_ON
l_.str.2:                               ; @.str.2
	.asciz	"mux cfg 0x%x comp=%d\n"

	.comm	_CX25840_SVIDEO_LUMA1,4,2       ; @CX25840_SVIDEO_LUMA1
	.comm	_CX25840_SVIDEO_LUMA8,4,2       ; @CX25840_SVIDEO_LUMA8
	.comm	_CX25840_SVIDEO_CHROMA4,4,2     ; @CX25840_SVIDEO_CHROMA4
	.comm	_CX25840_SVIDEO_CHROMA8,4,2     ; @CX25840_SVIDEO_CHROMA8
l_.str.3:                               ; @.str.3
	.asciz	"0x%04x is not a valid video input!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CX25840_SVIDEO_CHROMA7,4,2     ; @CX25840_SVIDEO_CHROMA7
l_.str.4:                               ; @.str.4
	.asciz	"0x%04x is not a valid audio input!\n"

	.no_dead_strip	_set_input
.subsections_via_symbols
