	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ths7303_setvalue
_ths7303_setvalue:                      ## @ths7303_setvalue
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r14
	callq	_v4l2_get_subdevdata
	movq	%rax, %r15
	movq	_V4L2_STD_ALL@GOTPCREL(%rip), %rax
	movq	_V4L2_STD_SECAM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	(%rax), %r12d
	xorl	%ebx, %ebx
	testl	%ecx, %r12d
	setne	%bl
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rcx
	cmoveq	%rax, %rcx
	addl	%ebx, %ebx
	movl	$1, %edi
	movq	%r14, %rdx
	callq	_v4l2_dbg
	movq	%r15, %rdi
	movl	$1, %esi
	movl	%ebx, %edx
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %r12d
	movq	%r15, %rdi
	movl	$2, %esi
	movl	%ebx, %edx
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %r13d
	orl	%r12d, %r13d
	movq	%r15, %rdi
	movl	$3, %esi
	movl	%ebx, %edx
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %ebx
	orl	%r13d, %ebx
	je	LBB0_2
## %bb.1:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_v4l2_err
LBB0_2:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_STD_ALL,4,2               ## @V4L2_STD_ALL
	.comm	_V4L2_STD_SECAM,4,2             ## @V4L2_STD_SECAM
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setting value for SDTV format\n"

L_.str.1:                               ## @.str.1
	.asciz	"disabling all channels\n"

L_.str.2:                               ## @.str.2
	.asciz	"write failed\n"

	.no_dead_strip	_ths7303_setvalue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ths7303_setvalue
_ths7303_setvalue:                      ; @ths7303_setvalue
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_v4l2_get_subdevdata
	mov	x21, x0
Lloh0:
	adrp	x8, _V4L2_STD_ALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_STD_ALL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _V4L2_STD_SECAM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_STD_SECAM@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w8, w20
	bics	wzr, w8, w9
	cset	w8, ne
Lloh6:
	adrp	x9, _debug@GOTPAGE
Lloh7:
	ldr	x9, [x9, _debug@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
Lloh9:
	adrp	x9, l_.str@PAGE
Lloh10:
	add	x9, x9, l_.str@PAGEOFF
Lloh11:
	adrp	x10, l_.str.1@PAGE
Lloh12:
	add	x10, x10, l_.str.1@PAGEOFF
	csel	x3, x10, x9, eq
	lsl	w20, w8, #1
	mov	w0, #1
	mov	x2, x19
	bl	_v4l2_dbg
	mov	x0, x21
	mov	w1, #1
	mov	x2, x20
	bl	_i2c_smbus_write_byte_data
	mov	x22, x0
	mov	x0, x21
	mov	w1, #2
	mov	x2, x20
	bl	_i2c_smbus_write_byte_data
	orr	w22, w0, w22
	mov	x0, x21
	mov	w1, #3
	mov	x2, x20
	bl	_i2c_smbus_write_byte_data
	orr	w20, w22, w0
	cbz	w20, LBB0_2
; %bb.1:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_v4l2_err
LBB0_2:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_STD_ALL,4,2               ; @V4L2_STD_ALL
	.comm	_V4L2_STD_SECAM,4,2             ; @V4L2_STD_SECAM
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setting value for SDTV format\n"

l_.str.1:                               ; @.str.1
	.asciz	"disabling all channels\n"

l_.str.2:                               ; @.str.2
	.asciz	"write failed\n"

	.no_dead_strip	_ths7303_setvalue
.subsections_via_symbols
