	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa7191_s_ctrl
_saa7191_s_ctrl:                        ## @saa7191_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
	movl	(%rsi), %eax
	addl	$-128, %eax
	cmpl	$8, %eax
	ja	LBB0_23
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_2:
	movq	_SAA7191_REG_LUMA@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_saa7191_read_reg
	movl	(%rbx), %ecx
	cmpl	$133, %ecx
	je	LBB0_7
## %bb.3:
	cmpl	$136, %ecx
	je	LBB0_4
## %bb.5:
	cmpl	$135, %ecx
	jne	LBB0_9
## %bb.6:
	movq	_SAA7191_LUMA_APER_SHIFT@GOTPCREL(%rip), %rcx
	movq	_SAA7191_LUMA_APER_MASK@GOTPCREL(%rip), %rdx
	jmp	LBB0_8
LBB0_10:
	movq	_SAA7191_REG_GAIN@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_saa7191_read_reg
	cmpl	$132, (%rbx)
	jne	LBB0_14
## %bb.11:
	cmpl	$0, 4(%rbx)
	movq	_SAA7191_GAIN_COLO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	je	LBB0_13
## %bb.12:
	orl	%eax, %edx
	jmp	LBB0_16
LBB0_23:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movzbl	4(%rbx), %eax
	xorl	%ecx, %ecx
	cmpl	$128, %eax
	setb	%cl
	shll	$8, %ecx
	leal	(%rcx,%rax), %edx
	addl	$-128, %edx
	movq	_SAA7191_REG_HUEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_17
LBB0_20:
	movq	_SAA7191_REG_STDC@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_saa7191_read_reg
	movq	_SAA7191_STDC_VTRC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, %ecx
	orl	%eax, %ecx
	notl	%edx
	andl	%eax, %edx
	cmpl	$0, 4(%rbx)
	cmovnel	%ecx, %edx
	jmp	LBB0_16
LBB0_22:
	movq	_SAA7191_REG_CTL4@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_saa7191_read_reg
	movq	_SAA7191_CTL4_VNOI_MASK@GOTPCREL(%rip), %rsi
	movl	4(%rbx), %edx
	movq	_SAA7191_CTL4_VNOI_SHIFT@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_21:
	movl	4(%rbx), %eax
	leal	8(%rax), %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	movq	_SAA7191_REG_CTL3@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_saa7191_read_reg
	movq	_SAA7191_CTL3_YDEL_MASK@GOTPCREL(%rip), %rdx
	movq	_SAA7191_CTL3_YDEL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	xorl	%eax, %ebx
	andl	(%rdx), %ebx
	xorl	%eax, %ebx
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	jmp	LBB0_18
LBB0_14:
	movq	_SAA7191_GAIN_LFIS_MASK@GOTPCREL(%rip), %rsi
	movl	4(%rbx), %edx
	movq	_SAA7191_GAIN_LFIS_SHIFT@GOTPCREL(%rip), %rcx
LBB0_15:
	movb	(%rcx), %cl
	shll	%cl, %edx
	xorl	%eax, %edx
	andl	(%rsi), %edx
	xorl	%eax, %edx
LBB0_16:
	movl	(%r15), %esi
LBB0_17:
	movq	%r14, %rdi
	jmp	LBB0_18
LBB0_7:
	movq	_SAA7191_LUMA_CORI_SHIFT@GOTPCREL(%rip), %rcx
	movq	_SAA7191_LUMA_CORI_MASK@GOTPCREL(%rip), %rdx
	jmp	LBB0_8
LBB0_4:
	movq	_SAA7191_LUMA_BPSS_SHIFT@GOTPCREL(%rip), %rcx
	movq	_SAA7191_LUMA_BPSS_MASK@GOTPCREL(%rip), %rdx
LBB0_8:
	movl	4(%rbx), %esi
	movb	(%rcx), %cl
	shll	%cl, %esi
	xorl	%eax, %esi
	andl	(%rdx), %esi
	xorl	%esi, %eax
LBB0_9:
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_saa7191_write_reg              ## TAILCALL
LBB0_13:
	notl	%edx
	andl	%eax, %edx
	jmp	LBB0_16
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_19
	.long	L0_0_set_20
	.long	L0_0_set_22
	.long	L0_0_set_21
	.long	L0_0_set_10
	.long	L0_0_set_2
	.long	L0_0_set_10
	.long	L0_0_set_2
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_SAA7191_REG_LUMA,4,2           ## @SAA7191_REG_LUMA
	.comm	_SAA7191_LUMA_BPSS_MASK,4,2     ## @SAA7191_LUMA_BPSS_MASK
	.comm	_SAA7191_LUMA_BPSS_SHIFT,4,2    ## @SAA7191_LUMA_BPSS_SHIFT
	.comm	_SAA7191_LUMA_APER_MASK,4,2     ## @SAA7191_LUMA_APER_MASK
	.comm	_SAA7191_LUMA_APER_SHIFT,4,2    ## @SAA7191_LUMA_APER_SHIFT
	.comm	_SAA7191_LUMA_CORI_MASK,4,2     ## @SAA7191_LUMA_CORI_MASK
	.comm	_SAA7191_LUMA_CORI_SHIFT,4,2    ## @SAA7191_LUMA_CORI_SHIFT
	.comm	_SAA7191_REG_GAIN,4,2           ## @SAA7191_REG_GAIN
	.comm	_SAA7191_GAIN_COLO,4,2          ## @SAA7191_GAIN_COLO
	.comm	_SAA7191_GAIN_LFIS_MASK,4,2     ## @SAA7191_GAIN_LFIS_MASK
	.comm	_SAA7191_GAIN_LFIS_SHIFT,4,2    ## @SAA7191_GAIN_LFIS_SHIFT
	.comm	_SAA7191_REG_HUEC,4,2           ## @SAA7191_REG_HUEC
	.comm	_SAA7191_REG_STDC,4,2           ## @SAA7191_REG_STDC
	.comm	_SAA7191_STDC_VTRC,4,2          ## @SAA7191_STDC_VTRC
	.comm	_SAA7191_REG_CTL3,4,2           ## @SAA7191_REG_CTL3
	.comm	_SAA7191_CTL3_YDEL_MASK,4,2     ## @SAA7191_CTL3_YDEL_MASK
	.comm	_SAA7191_CTL3_YDEL_SHIFT,4,2    ## @SAA7191_CTL3_YDEL_SHIFT
	.comm	_SAA7191_REG_CTL4,4,2           ## @SAA7191_REG_CTL4
	.comm	_SAA7191_CTL4_VNOI_MASK,4,2     ## @SAA7191_CTL4_VNOI_MASK
	.comm	_SAA7191_CTL4_VNOI_SHIFT,4,2    ## @SAA7191_CTL4_VNOI_SHIFT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_saa7191_s_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa7191_s_ctrl
_saa7191_s_ctrl:                        ; @saa7191_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
	ldr	w8, [x1]
	sub	w8, w8, #128
	cmp	w8, #8
	b.hi	LBB0_8
; %bb.1:
	mov	x20, x1
	mov	x19, x0
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	x21, _SAA7191_REG_LUMA@GOTPAGE
Lloh3:
	ldr	x21, [x21, _SAA7191_REG_LUMA@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_saa7191_read_reg
	mov	x2, x0
	ldr	w8, [x20]
	cmp	w8, #133
	b.eq	LBB0_16
; %bb.3:
	cmp	w8, #136
	b.eq	LBB0_17
; %bb.4:
	cmp	w8, #135
	b.ne	LBB0_19
; %bb.5:
Lloh4:
	adrp	x8, _SAA7191_LUMA_APER_SHIFT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SAA7191_LUMA_APER_SHIFT@GOTPAGEOFF]
Lloh6:
	adrp	x9, _SAA7191_LUMA_APER_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SAA7191_LUMA_APER_MASK@GOTPAGEOFF]
	b	LBB0_18
LBB0_6:
Lloh8:
	adrp	x21, _SAA7191_REG_GAIN@GOTPAGE
Lloh9:
	ldr	x21, [x21, _SAA7191_REG_GAIN@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_saa7191_read_reg
	ldr	w8, [x20]
	cmp	w8, #132
	b.ne	LBB0_13
; %bb.7:
Lloh10:
	adrp	x8, _SAA7191_GAIN_COLO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SAA7191_GAIN_COLO@GOTPAGEOFF]
	ldr	w9, [x20, #4]
Lloh12:
	ldr	w8, [x8]
	bic	w10, w0, w8
	orr	w8, w8, w0
	cmp	w9, #0
	csel	w2, w10, w8, eq
	b	LBB0_19
LBB0_8:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	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
LBB0_9:
	ldrb	w8, [x20, #4]
	cmp	w8, #128
	mov	w9, #128
	cneg	w9, w9, hs
	add	w2, w9, w8
Lloh16:
	adrp	x8, _SAA7191_REG_HUEC@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SAA7191_REG_HUEC@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	b	LBB0_20
LBB0_10:
Lloh19:
	adrp	x21, _SAA7191_REG_STDC@GOTPAGE
Lloh20:
	ldr	x21, [x21, _SAA7191_REG_STDC@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_saa7191_read_reg
	ldr	w8, [x20, #4]
Lloh21:
	adrp	x9, _SAA7191_STDC_VTRC@GOTPAGE
Lloh22:
	ldr	x9, [x9, _SAA7191_STDC_VTRC@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w10, w9, w0
	bic	w9, w0, w9
	cmp	w8, #0
	csel	w2, w9, w10, eq
	b	LBB0_19
LBB0_11:
Lloh24:
	adrp	x21, _SAA7191_REG_CTL4@GOTPAGE
Lloh25:
	ldr	x21, [x21, _SAA7191_REG_CTL4@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_saa7191_read_reg
Lloh26:
	adrp	x8, _SAA7191_CTL4_VNOI_MASK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SAA7191_CTL4_VNOI_MASK@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	bic	w9, w0, w8
	ldr	w10, [x20, #4]
Lloh29:
	adrp	x11, _SAA7191_CTL4_VNOI_SHIFT@GOTPAGE
Lloh30:
	ldr	x11, [x11, _SAA7191_CTL4_VNOI_SHIFT@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:
	ldr	w8, [x20, #4]
	add	w9, w8, #8
	cmp	w8, #0
	csel	w20, w9, w8, lt
Lloh31:
	adrp	x21, _SAA7191_REG_CTL3@GOTPAGE
Lloh32:
	ldr	x21, [x21, _SAA7191_REG_CTL3@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_saa7191_read_reg
Lloh33:
	adrp	x8, _SAA7191_CTL3_YDEL_MASK@GOTPAGE
Lloh34:
	ldr	x8, [x8, _SAA7191_CTL3_YDEL_MASK@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	bic	w9, w0, w8
Lloh36:
	adrp	x10, _SAA7191_CTL3_YDEL_SHIFT@GOTPAGE
Lloh37:
	ldr	x10, [x10, _SAA7191_CTL3_YDEL_SHIFT@GOTPAGEOFF]
Lloh38:
	ldr	w10, [x10]
	lsl	w10, w20, w10
	b	LBB0_15
LBB0_13:
Lloh39:
	adrp	x8, _SAA7191_GAIN_LFIS_MASK@GOTPAGE
Lloh40:
	ldr	x8, [x8, _SAA7191_GAIN_LFIS_MASK@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	bic	w9, w0, w8
	ldr	w10, [x20, #4]
Lloh42:
	adrp	x11, _SAA7191_GAIN_LFIS_SHIFT@GOTPAGE
Lloh43:
	ldr	x11, [x11, _SAA7191_GAIN_LFIS_SHIFT@GOTPAGEOFF]
LBB0_14:
	ldr	w11, [x11]
	lsl	w10, w10, w11
LBB0_15:
	and	w8, w10, w8
	orr	w2, w8, w9
	b	LBB0_19
LBB0_16:
Lloh44:
	adrp	x8, _SAA7191_LUMA_CORI_SHIFT@GOTPAGE
Lloh45:
	ldr	x8, [x8, _SAA7191_LUMA_CORI_SHIFT@GOTPAGEOFF]
Lloh46:
	adrp	x9, _SAA7191_LUMA_CORI_MASK@GOTPAGE
Lloh47:
	ldr	x9, [x9, _SAA7191_LUMA_CORI_MASK@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh48:
	adrp	x8, _SAA7191_LUMA_BPSS_SHIFT@GOTPAGE
Lloh49:
	ldr	x8, [x8, _SAA7191_LUMA_BPSS_SHIFT@GOTPAGEOFF]
Lloh50:
	adrp	x9, _SAA7191_LUMA_BPSS_MASK@GOTPAGE
Lloh51:
	ldr	x9, [x9, _SAA7191_LUMA_BPSS_MASK@GOTPAGEOFF]
LBB0_18:
	ldr	w9, [x9]
	bic	w10, w2, w9
	ldr	w11, [x20, #4]
	ldr	w8, [x8]
	lsl	w8, w11, w8
	and	w8, w8, w9
	orr	w2, w8, w10
LBB0_19:
	ldr	w1, [x21]
LBB0_20:
	mov	x0, x19
	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
	b	_saa7191_write_reg
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh48, Lloh49
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
                                        ; -- End function
	.comm	_SAA7191_REG_LUMA,4,2           ; @SAA7191_REG_LUMA
	.comm	_SAA7191_LUMA_BPSS_MASK,4,2     ; @SAA7191_LUMA_BPSS_MASK
	.comm	_SAA7191_LUMA_BPSS_SHIFT,4,2    ; @SAA7191_LUMA_BPSS_SHIFT
	.comm	_SAA7191_LUMA_APER_MASK,4,2     ; @SAA7191_LUMA_APER_MASK
	.comm	_SAA7191_LUMA_APER_SHIFT,4,2    ; @SAA7191_LUMA_APER_SHIFT
	.comm	_SAA7191_LUMA_CORI_MASK,4,2     ; @SAA7191_LUMA_CORI_MASK
	.comm	_SAA7191_LUMA_CORI_SHIFT,4,2    ; @SAA7191_LUMA_CORI_SHIFT
	.comm	_SAA7191_REG_GAIN,4,2           ; @SAA7191_REG_GAIN
	.comm	_SAA7191_GAIN_COLO,4,2          ; @SAA7191_GAIN_COLO
	.comm	_SAA7191_GAIN_LFIS_MASK,4,2     ; @SAA7191_GAIN_LFIS_MASK
	.comm	_SAA7191_GAIN_LFIS_SHIFT,4,2    ; @SAA7191_GAIN_LFIS_SHIFT
	.comm	_SAA7191_REG_HUEC,4,2           ; @SAA7191_REG_HUEC
	.comm	_SAA7191_REG_STDC,4,2           ; @SAA7191_REG_STDC
	.comm	_SAA7191_STDC_VTRC,4,2          ; @SAA7191_STDC_VTRC
	.comm	_SAA7191_REG_CTL3,4,2           ; @SAA7191_REG_CTL3
	.comm	_SAA7191_CTL3_YDEL_MASK,4,2     ; @SAA7191_CTL3_YDEL_MASK
	.comm	_SAA7191_CTL3_YDEL_SHIFT,4,2    ; @SAA7191_CTL3_YDEL_SHIFT
	.comm	_SAA7191_REG_CTL4,4,2           ; @SAA7191_REG_CTL4
	.comm	_SAA7191_CTL4_VNOI_MASK,4,2     ; @SAA7191_CTL4_VNOI_MASK
	.comm	_SAA7191_CTL4_VNOI_SHIFT,4,2    ; @SAA7191_CTL4_VNOI_SHIFT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_saa7191_s_ctrl
.subsections_via_symbols
