	.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	%rsi, %r13
	movq	%rdi, %r14
	callq	_to_decoder
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	testq	%r13, %r13
	je	LBB0_29
## %bb.1:
	movl	4(%r13), %edx
	leal	-128(%rdx), %esi
	cmpl	$4, %esi
	ja	LBB0_28
## %bb.2:
	movl	(%r13), %r15d
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rsi,4), %rdx
	addq	%rcx, %rdx
	jmpq	*%rdx
LBB0_10:
	cmpl	$256, %r15d                     ## imm = 0x100
	jb	LBB0_12
## %bb.11:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_5
LBB0_13:
	cmpl	$180, %r15d
	je	LBB0_14
## %bb.15:
	testl	%r15d, %r15d
	je	LBB0_19
## %bb.16:
	cmpl	$-180, %r15d
	jne	LBB0_18
## %bb.17:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$128, %r15d
	jmp	LBB0_20
LBB0_7:
	cmpl	$256, %r15d                     ## imm = 0x100
	jb	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_3:
	cmpl	$256, %r15d                     ## imm = 0x100
	jb	LBB0_6
## %bb.4:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_23:
	cmpl	$1, %r15d
	je	LBB0_24
## %bb.25:
	testl	%r15d, %r15d
	jne	LBB0_30
## %bb.26:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$12, %r15d
	movq	_REG_AFE_GAIN_CTRL@GOTPCREL(%rip), %r12
	jmp	LBB0_21
LBB0_28:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_v4l2_err
	jmp	LBB0_29
LBB0_12:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_REG_SATURATION@GOTPCREL(%rip), %r12
	jmp	LBB0_21
LBB0_9:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_REG_CONTRAST@GOTPCREL(%rip), %r12
	jmp	LBB0_21
LBB0_6:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_REG_BRIGHTNESS@GOTPCREL(%rip), %r12
	jmp	LBB0_21
LBB0_24:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$15, %r15d
	movq	_REG_AFE_GAIN_CTRL@GOTPCREL(%rip), %r12
	jmp	LBB0_21
LBB0_30:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_5
LBB0_14:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$127, %r15d
	jmp	LBB0_20
LBB0_19:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
LBB0_20:
	movq	_REG_HUE@GOTPCREL(%rip), %r12
LBB0_21:
	movq	(%r12), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_tvp514x_write_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_29
## %bb.22:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%r12), %rcx
	movl	%r15d, (%rax,%rcx,4)
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %r9d
	movl	4(%r13), %r8d
	leaq	L_.str.6(%rip), %rcx
	movl	$1, %edi
	movq	%r14, %rdx
	callq	_v4l2_dbg
	xorl	%ebx, %ebx
	jmp	LBB0_29
LBB0_18:
	leaq	L_.str.3(%rip), %rsi
LBB0_5:
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_v4l2_err
	movq	_ERANGE@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_29:
	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_10, LBB0_10-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_13
	.long	L0_0_set_7
	.long	L0_0_set_3
	.long	L0_0_set_23
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid brightness setting %d\n"

	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_REG_BRIGHTNESS,8,3             ## @REG_BRIGHTNESS
L_.str.1:                               ## @.str.1
	.asciz	"invalid contrast setting %d\n"

	.comm	_REG_CONTRAST,8,3               ## @REG_CONTRAST
L_.str.2:                               ## @.str.2
	.asciz	"invalid saturation setting %d\n"

	.comm	_REG_SATURATION,8,3             ## @REG_SATURATION
L_.str.3:                               ## @.str.3
	.asciz	"invalid hue setting %d\n"

	.comm	_REG_HUE,8,3                    ## @REG_HUE
L_.str.4:                               ## @.str.4
	.asciz	"invalid auto gain setting %d\n"

	.comm	_REG_AFE_GAIN_CTRL,8,3          ## @REG_AFE_GAIN_CTRL
L_.str.5:                               ## @.str.5
	.asciz	"invalid control id %d\n"

	.comm	_debug,4,2                      ## @debug
L_.str.6:                               ## @.str.6
	.asciz	"Set Control: ID - %d - %d"

	.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, x1
	mov	x19, x0
	bl	_to_decoder
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
	cbz	x20, LBB0_29
; %bb.1:
	ldr	w2, [x20, #4]
	sub	w8, w2, #128
	cmp	w8, #4
	b.hi	LBB0_16
; %bb.2:
	mov	x22, x0
	ldr	w21, [x20]
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	cmp	w21, #256
	b.lo	LBB0_17
; %bb.4:
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_28
LBB0_5:
	cmp	w21, #180
	b.eq	LBB0_23
; %bb.6:
	cbz	w21, LBB0_24
; %bb.7:
	cmn	w21, #180
	b.ne	LBB0_27
; %bb.8:
	mov	w21, #128
	b	LBB0_24
LBB0_9:
	cmp	w21, #256
	b.lo	LBB0_18
; %bb.10:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_28
LBB0_11:
	cmp	w21, #256
	b.lo	LBB0_19
; %bb.12:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_28
LBB0_13:
	cmp	w21, #1
	b.eq	LBB0_20
; %bb.14:
	cbnz	w21, LBB0_22
; %bb.15:
	mov	w21, #12
	b	LBB0_21
LBB0_16:
Lloh11:
	adrp	x1, l_.str.5@PAGE
Lloh12:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_v4l2_err
	b	LBB0_29
LBB0_17:
Lloh13:
	adrp	x24, _REG_SATURATION@GOTPAGE
Lloh14:
	ldr	x24, [x24, _REG_SATURATION@GOTPAGEOFF]
	b	LBB0_25
LBB0_18:
Lloh15:
	adrp	x24, _REG_CONTRAST@GOTPAGE
Lloh16:
	ldr	x24, [x24, _REG_CONTRAST@GOTPAGEOFF]
	b	LBB0_25
LBB0_19:
Lloh17:
	adrp	x24, _REG_BRIGHTNESS@GOTPAGE
Lloh18:
	ldr	x24, [x24, _REG_BRIGHTNESS@GOTPAGEOFF]
	b	LBB0_25
LBB0_20:
	mov	w21, #15
LBB0_21:
Lloh19:
	adrp	x24, _REG_AFE_GAIN_CTRL@GOTPAGE
Lloh20:
	ldr	x24, [x24, _REG_AFE_GAIN_CTRL@GOTPAGEOFF]
	b	LBB0_25
LBB0_22:
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_28
LBB0_23:
	mov	w21, #127
LBB0_24:
Lloh23:
	adrp	x24, _REG_HUE@GOTPAGE
Lloh24:
	ldr	x24, [x24, _REG_HUE@GOTPAGEOFF]
LBB0_25:
	ldr	x1, [x24]
	mov	x0, x19
	mov	x2, x21
	bl	_tvp514x_write_reg
	mov	x23, x0
	cbnz	w0, LBB0_29
; %bb.26:
	ldr	x8, [x22]
	ldr	x9, [x24]
	str	w21, [x8, x9, lsl #2]
Lloh25:
	adrp	x8, _debug@GOTPAGE
Lloh26:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	ldp	w5, w4, [x20]
Lloh28:
	adrp	x3, l_.str.6@PAGE
Lloh29:
	add	x3, x3, l_.str.6@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_v4l2_dbg
	mov	w23, #0
	b	LBB0_29
LBB0_27:
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_28:
	mov	x0, x19
	mov	x2, x21
	bl	_v4l2_err
Lloh32:
	adrp	x8, _ERANGE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_29:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_5-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_11-LBB0_3)>>2
	.byte	(LBB0_13-LBB0_3)>>2
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid brightness setting %d\n"

	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_REG_BRIGHTNESS,8,3             ; @REG_BRIGHTNESS
l_.str.1:                               ; @.str.1
	.asciz	"invalid contrast setting %d\n"

	.comm	_REG_CONTRAST,8,3               ; @REG_CONTRAST
l_.str.2:                               ; @.str.2
	.asciz	"invalid saturation setting %d\n"

	.comm	_REG_SATURATION,8,3             ; @REG_SATURATION
l_.str.3:                               ; @.str.3
	.asciz	"invalid hue setting %d\n"

	.comm	_REG_HUE,8,3                    ; @REG_HUE
l_.str.4:                               ; @.str.4
	.asciz	"invalid auto gain setting %d\n"

	.comm	_REG_AFE_GAIN_CTRL,8,3          ; @REG_AFE_GAIN_CTRL
l_.str.5:                               ; @.str.5
	.asciz	"invalid control id %d\n"

	.comm	_debug,4,2                      ; @debug
l_.str.6:                               ; @.str.6
	.asciz	"Set Control: ID - %d - %d"

	.no_dead_strip	_tvp514x_s_ctrl
.subsections_via_symbols
