	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tvp5150_s_ctrl
_tvp5150_s_ctrl:                        ## @tvp5150_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_tvp5150_qctrl@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_ARRAY_SIZE
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	(%r15), %r8
	movq	(%rbx), %rcx
	addq	$16, %rcx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	-16(%rcx), %r8
	je	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$24, %rcx
	decq	%rax
	jne	LBB0_2
	jmp	LBB0_8
LBB0_3:
	movq	8(%r15), %r9
	cmpq	-8(%rcx), %r9
	jl	LBB0_5
## %bb.4:
	cmpq	(%rcx), %r9
	jle	LBB0_6
LBB0_5:
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	jmp	LBB0_16
LBB0_6:
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%r14, %rdx
	callq	_v4l2_dbg
LBB0_8:
	movq	(%r15), %rax
	addq	$-128, %rax
	cmpq	$3, %rax
	ja	LBB0_15
## %bb.9:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_13:
	movq	_TVP5150_SATURATION_CTL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_16:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_17
LBB0_14:
	movq	_TVP5150_HUE_CTL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_12:
	movq	_TVP5150_CONTRAST_CTL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_10:
	movq	_TVP5150_BRIGHT_CTL@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %esi
	movq	8(%r15), %rdx
	movq	%r14, %rdi
	callq	_tvp5150_write
	xorl	%eax, %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_13
	.long	L0_0_set_14
	.long	L0_0_set_12
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.comm	_tvp5150_qctrl,8,3              ## @tvp5150_qctrl
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"s_ctrl: id=%d, value=%d\n"

	.comm	_TVP5150_BRIGHT_CTL,4,2         ## @TVP5150_BRIGHT_CTL
	.comm	_TVP5150_CONTRAST_CTL,4,2       ## @TVP5150_CONTRAST_CTL
	.comm	_TVP5150_SATURATION_CTL,4,2     ## @TVP5150_SATURATION_CTL
	.comm	_TVP5150_HUE_CTL,4,2            ## @TVP5150_HUE_CTL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_tvp5150_s_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tvp5150_s_ctrl
_tvp5150_s_ctrl:                        ; @tvp5150_s_ctrl
	.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
Lloh0:
	adrp	x21, _tvp5150_qctrl@GOTPAGE
Lloh1:
	ldr	x21, [x21, _tvp5150_qctrl@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cbz	x0, LBB0_8
; %bb.1:
	ldr	x4, [x20]
	ldr	x8, [x21]
	add	x8, x8, #16
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x9, [x8, #-16]
	cmp	x4, x9
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x8, x8, #24
	subs	x0, x0, #1
	b.ne	LBB0_2
	b	LBB0_8
LBB0_4:
	ldr	x5, [x20, #8]
	ldur	x9, [x8, #-8]
	cmp	x5, x9
	b.lt	LBB0_6
; %bb.5:
	ldr	x8, [x8]
	cmp	x5, x8
	b.le	LBB0_7
LBB0_6:
Lloh2:
	adrp	x8, _ERANGE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
	b	LBB0_12
LBB0_7:
Lloh4:
	adrp	x8, _debug@GOTPAGE
Lloh5:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x3, l_.str@PAGE
Lloh8:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_v4l2_dbg
LBB0_8:
	ldr	x8, [x20]
	sub	x8, x8, #128
	cmp	x8, #3
	b.hi	LBB0_11
; %bb.9:
Lloh9:
	adrp	x9, lJTI0_0@PAGE
Lloh10:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_10
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_10:
Lloh11:
	adrp	x8, _TVP5150_SATURATION_CTL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TVP5150_SATURATION_CTL@GOTPAGEOFF]
	b	LBB0_16
LBB0_11:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_13:
Lloh15:
	adrp	x8, _TVP5150_HUE_CTL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TVP5150_HUE_CTL@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:
Lloh17:
	adrp	x8, _TVP5150_CONTRAST_CTL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TVP5150_CONTRAST_CTL@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh19:
	adrp	x8, _TVP5150_BRIGHT_CTL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _TVP5150_BRIGHT_CTL@GOTPAGEOFF]
LBB0_16:
	ldr	w1, [x8]
	ldr	x2, [x20, #8]
	mov	x0, x19
	bl	_tvp5150_write
	mov	w0, #0
LBB0_17:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_10-LBB0_10)>>2
	.byte	(LBB0_13-LBB0_10)>>2
	.byte	(LBB0_14-LBB0_10)>>2
	.byte	(LBB0_15-LBB0_10)>>2
                                        ; -- End function
	.comm	_tvp5150_qctrl,8,3              ; @tvp5150_qctrl
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"s_ctrl: id=%d, value=%d\n"

	.comm	_TVP5150_BRIGHT_CTL,4,2         ; @TVP5150_BRIGHT_CTL
	.comm	_TVP5150_CONTRAST_CTL,4,2       ; @TVP5150_CONTRAST_CTL
	.comm	_TVP5150_SATURATION_CTL,4,2     ; @TVP5150_SATURATION_CTL
	.comm	_TVP5150_HUE_CTL,4,2            ; @TVP5150_HUE_CTL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_tvp5150_s_ctrl
.subsections_via_symbols
