	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tvp514x_s_ctrl
_tvp514x_s_ctrl:                        ## @tvp514x_s_ctrl
	.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
	movq	%rdi, %r13
	callq	_to_sd
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_to_decoder
	movl	4(%r13), %edx
	addl	$-128, %edx
	cmpl	$4, %edx
	ja	LBB0_1
## %bb.2:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%r13), %r12d
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rdx,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_6:
	movq	_REG_SATURATION@GOTPCREL(%rip), %r15
	jmp	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_7:
	cmpl	$-180, %r12d
	movl	$128, %eax
	cmovnel	%r12d, %eax
	cmpl	$180, %r12d
	movl	$127, %r12d
	cmovnel	%eax, %r12d
	movq	_REG_HUE@GOTPCREL(%rip), %r15
	jmp	LBB0_4
LBB0_5:
	movq	_REG_CONTRAST@GOTPCREL(%rip), %r15
	jmp	LBB0_4
LBB0_3:
	movq	_REG_BRIGHTNESS@GOTPCREL(%rip), %r15
LBB0_4:
	movq	(%r15), %rsi
	movq	%r14, %rdi
	movl	%r12d, %edx
	jmp	LBB0_9
LBB0_8:
	movq	_REG_AFE_GAIN_CTRL@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	xorl	%eax, %eax
	testl	%r12d, %r12d
	setne	%al
	leal	(%rax,%rax,2), %edx
	orl	$12, %edx
	movq	%r14, %rdi
LBB0_9:
	callq	_tvp514x_write_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%r15), %rcx
	movl	%r12d, (%rax,%rcx,4)
	xorl	%ebx, %ebx
LBB0_11:
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %r9d
	movl	4(%r13), %r8d
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%r14, %rdx
	callq	_v4l2_dbg
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_5
	.long	L0_0_set_3
	.long	L0_0_set_8
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_REG_BRIGHTNESS,8,3             ## @REG_BRIGHTNESS
	.comm	_REG_CONTRAST,8,3               ## @REG_CONTRAST
	.comm	_REG_SATURATION,8,3             ## @REG_SATURATION
	.comm	_REG_HUE,8,3                    ## @REG_HUE
	.comm	_REG_AFE_GAIN_CTRL,8,3          ## @REG_AFE_GAIN_CTRL
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set Control: ID - %d - %d\n"

	.no_dead_strip	_tvp514x_s_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tvp514x_s_ctrl
_tvp514x_s_ctrl:                        ; @tvp514x_s_ctrl
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	bl	_to_sd
	mov	x19, x0
	bl	_to_decoder
	ldr	w8, [x20, #4]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_3
; %bb.1:
	mov	x21, x0
	ldr	w22, [x20]
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh2:
	adrp	x24, _REG_SATURATION@GOTPAGE
Lloh3:
	ldr	x24, [x24, _REG_SATURATION@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_11
LBB0_4:
	cmn	w22, #180
	mov	w8, #128
	csel	w8, w8, w22, eq
	mov	w9, #127
	cmp	w22, #180
	csel	w22, w9, w8, eq
Lloh7:
	adrp	x24, _REG_HUE@GOTPAGE
Lloh8:
	ldr	x24, [x24, _REG_HUE@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh9:
	adrp	x24, _REG_CONTRAST@GOTPAGE
Lloh10:
	ldr	x24, [x24, _REG_CONTRAST@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x24, _REG_BRIGHTNESS@GOTPAGE
Lloh12:
	ldr	x24, [x24, _REG_BRIGHTNESS@GOTPAGEOFF]
LBB0_7:
	ldr	x1, [x24]
	mov	x0, x19
	mov	x2, x22
	b	LBB0_9
LBB0_8:
Lloh13:
	adrp	x24, _REG_AFE_GAIN_CTRL@GOTPAGE
Lloh14:
	ldr	x24, [x24, _REG_AFE_GAIN_CTRL@GOTPAGEOFF]
	ldr	x1, [x24]
	mov	w8, #15
	mov	w9, #12
	cmp	w22, #0
	csel	w2, w9, w8, eq
	mov	x0, x19
LBB0_9:
	bl	_tvp514x_write_reg
	mov	x23, x0
	cbnz	w0, LBB0_11
; %bb.10:
	mov	w23, #0
	ldr	x8, [x21]
	ldr	x9, [x24]
	str	w22, [x8, x9, lsl #2]
LBB0_11:
Lloh15:
	adrp	x8, _debug@GOTPAGE
Lloh16:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldp	w5, w4, [x20]
Lloh18:
	adrp	x3, l_.str@PAGE
Lloh19:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_v4l2_dbg
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_REG_BRIGHTNESS,8,3             ; @REG_BRIGHTNESS
	.comm	_REG_CONTRAST,8,3               ; @REG_CONTRAST
	.comm	_REG_SATURATION,8,3             ; @REG_SATURATION
	.comm	_REG_HUE,8,3                    ; @REG_HUE
	.comm	_REG_AFE_GAIN_CTRL,8,3          ; @REG_AFE_GAIN_CTRL
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set Control: ID - %d - %d\n"

	.no_dead_strip	_tvp514x_s_ctrl
.subsections_via_symbols
