	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx18_dualwatch
_cx18_dualwatch:                        ## @cx18_dualwatch
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	callq	_v4l2_ctrl_g_ctrl
	movq	%rax, %r14
	leaq	-40(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_tuner@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_g_tuner@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r15, %rcx
	callq	_cx18_call_all
	movq	-40(%rbp), %rax
	movq	_V4L2_TUNER_MODE_LANG1_LANG2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_V4L2_TUNER_SUB_LANG2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -32(%rbp)
	movl	$512, %eax                      ## imm = 0x200
	cmovneq	%rax, %r14
LBB0_2:
	movq	(%rbx), %rsi
	cmpq	%rsi, %r14
	je	LBB0_5
## %bb.3:
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_CX18_DEBUG_INFO
	movl	8(%rbx), %edi
	movq	%r14, %rsi
	callq	_v4l2_ctrl_s_ctrl
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_CX18_DEBUG_INFO
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tuner,4,2                      ## @tuner
	.comm	_g_tuner,4,2                    ## @g_tuner
	.comm	_V4L2_TUNER_MODE_LANG1_LANG2,8,3 ## @V4L2_TUNER_MODE_LANG1_LANG2
	.comm	_V4L2_TUNER_SUB_LANG2,4,2       ## @V4L2_TUNER_SUB_LANG2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dualwatch: change stereo flag from 0x%x to 0x%x.\n"

L_.str.1:                               ## @.str.1
	.asciz	"dualwatch: changing stereo flag failed\n"

	.no_dead_strip	_cx18_dualwatch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx18_dualwatch
_cx18_dualwatch:                        ; @cx18_dualwatch
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #8]
	bl	_v4l2_ctrl_g_ctrl
	mov	x20, x0
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh0:
	adrp	x8, _tuner@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tuner@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _g_tuner@GOTPAGE
Lloh4:
	ldr	x8, [x8, _g_tuner@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x3, sp, #16
	mov	x0, x19
	bl	_cx18_call_all
	ldr	x8, [sp, #16]
Lloh6:
	adrp	x9, _V4L2_TUNER_MODE_LANG1_LANG2@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_TUNER_MODE_LANG1_LANG2@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [sp, #24]
Lloh9:
	adrp	x9, _V4L2_TUNER_SUB_LANG2@GOTPAGE
Lloh10:
	ldr	x9, [x9, _V4L2_TUNER_SUB_LANG2@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w8, #512
	csel	x20, x20, x8, eq
LBB0_2:
	ldr	x8, [x19]
	cmp	x20, x8
	b.eq	LBB0_5
; %bb.3:
	stp	x8, x20, [sp]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_CX18_DEBUG_INFO
	ldr	w0, [x19, #8]
	mov	x1, x20
	bl	_v4l2_ctrl_s_ctrl
	cbz	x0, LBB0_5
; %bb.4:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_CX18_DEBUG_INFO
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_tuner,4,2                      ; @tuner
	.comm	_g_tuner,4,2                    ; @g_tuner
	.comm	_V4L2_TUNER_MODE_LANG1_LANG2,8,3 ; @V4L2_TUNER_MODE_LANG1_LANG2
	.comm	_V4L2_TUNER_SUB_LANG2,4,2       ; @V4L2_TUNER_SUB_LANG2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dualwatch: change stereo flag from 0x%x to 0x%x.\n"

l_.str.1:                               ; @.str.1
	.asciz	"dualwatch: changing stereo flag failed\n"

	.no_dead_strip	_cx18_dualwatch
.subsections_via_symbols
