	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_s_ctrl
_vidioc_s_ctrl:                         ## @vidioc_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	(%rsi), %r15
	movq	(%r15), %r12
	movl	(%rdx), %edi
	callq	_ctrl_by_id
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movl	(%rax), %ecx
	addl	$-128, %ecx
	cmpl	$2, %ecx
	ja	LBB0_6
## %bb.2:
	movl	4(%rbx), %ecx
	movl	4(%rax), %edx
	cmpl	%edx, %ecx
	jge	LBB0_4
## %bb.3:
	movl	%edx, 4(%rbx)
	movl	%edx, %ecx
LBB0_4:
	movl	8(%rax), %eax
	cmpl	%eax, %ecx
	jle	LBB0_6
## %bb.5:
	movl	%eax, 4(%rbx)
LBB0_6:
	movl	$-131, %eax
	addl	(%rbx), %eax
	cmpl	$4, %eax
	ja	LBB0_11
## %bb.7:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_8:
	movq	%r14, %rdi
	callq	_IS_CAPTURE_ACTIVE
	testl	%eax, %eax
	je	LBB0_25
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_15
LBB0_10:
	movslq	(%rbx), %rdi
	callq	_DEB_D
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_12:
	movq	_BCS_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_saa7146_read
	andl	$-256, %eax
	orl	4(%rbx), %eax
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	jmp	LBB0_21
LBB0_13:
	movq	%r14, %rdi
	callq	_IS_CAPTURE_ACTIVE
	testl	%eax, %eax
	je	LBB0_26
## %bb.14:
	leaq	L_.str.1(%rip), %rdi
LBB0_15:
	callq	_DEB_D
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_16:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_24
LBB0_17:
	movq	_BCS_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_saa7146_read
	andl	$-16711681, %eax                ## imm = 0xFF00FFFF
	movl	4(%rbx), %edx
	shll	$16, %edx
	jmp	LBB0_19
LBB0_18:
	movq	_BCS_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_saa7146_read
	andl	$16777215, %eax                 ## imm = 0xFFFFFF
	movl	4(%rbx), %edx
	shll	$24, %edx
LBB0_19:
	orl	%eax, %edx
	movl	(%r12), %esi
	movq	%r15, %rdi
LBB0_21:
	callq	_saa7146_write
	movq	_MC2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MASK_22@GOTPCREL(%rip), %rax
	movq	_MASK_06@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r15, %rdi
	callq	_saa7146_write
LBB0_22:
	movq	%r14, %rdi
	callq	_IS_OVERLAY_ACTIVE
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	movq	%r14, %rdi
	callq	_saa7146_stop_preview
	movq	%r14, %rdi
	callq	_saa7146_start_preview
LBB0_24:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movl	4(%rbx), %eax
	movl	%eax, 4(%r12)
	jmp	LBB0_22
LBB0_26:
	movl	4(%rbx), %eax
	movl	%eax, (%r12)
	jmp	LBB0_22
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_12
	.long	L0_0_set_13
	.long	L0_0_set_17
	.long	L0_0_set_18
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BCS_CTRL,4,2                   ## @BCS_CTRL
	.comm	_MC2,4,2                        ## @MC2
	.comm	_MASK_22,4,2                    ## @MASK_22
	.comm	_MASK_06,4,2                    ## @MASK_06
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"V4L2_CID_HFLIP while active capture.\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.2:                               ## @.str.2
	.asciz	"V4L2_CID_VFLIP while active capture.\n"

	.no_dead_strip	_vidioc_s_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_s_ctrl
_vidioc_s_ctrl:                         ; @vidioc_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	x21, x2
	mov	x19, x1
	ldr	x20, [x1]
	ldr	x22, [x20]
	ldr	w0, [x2]
	bl	_ctrl_by_id
	cbz	x0, LBB0_10
; %bb.1:
	ldr	w8, [x0]
	sub	w8, w8, #128
	cmp	w8, #2
	b.hi	LBB0_6
; %bb.2:
	ldr	w8, [x21, #4]
	ldr	w9, [x0, #4]
	cmp	w8, w9
	b.ge	LBB0_4
; %bb.3:
	str	w9, [x21, #4]
	mov	x8, x9
LBB0_4:
	ldr	w9, [x0, #8]
	cmp	w8, w9
	b.le	LBB0_6
; %bb.5:
	str	w9, [x21, #4]
LBB0_6:
	ldr	w8, [x21]
	sub	w8, w8, #131
	cmp	w8, #4
	b.hi	LBB0_11
; %bb.7:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_8
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_8:
	mov	x0, x19
	bl	_IS_CAPTURE_ACTIVE
	cbz	w0, LBB0_23
; %bb.9:
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_10:
	ldrsw	x0, [x21]
	bl	_DEB_D
LBB0_11:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_16
LBB0_12:
Lloh6:
	adrp	x22, _BCS_CTRL@GOTPAGE
Lloh7:
	ldr	x22, [x22, _BCS_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_saa7146_read
	and	w8, w0, #0xffffff00
	ldr	w9, [x21, #4]
	orr	w2, w8, w9
	b	LBB0_19
LBB0_13:
	mov	x0, x19
	bl	_IS_CAPTURE_ACTIVE
	cbz	w0, LBB0_24
; %bb.14:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_15:
	bl	_DEB_D
Lloh10:
	adrp	x8, _EBUSY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_22
LBB0_17:
Lloh12:
	adrp	x22, _BCS_CTRL@GOTPAGE
Lloh13:
	ldr	x22, [x22, _BCS_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_saa7146_read
	and	w8, w0, #0xff00ffff
	ldr	w9, [x21, #4]
	orr	w2, w8, w9, lsl #16
	b	LBB0_19
LBB0_18:
Lloh14:
	adrp	x22, _BCS_CTRL@GOTPAGE
Lloh15:
	ldr	x22, [x22, _BCS_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_saa7146_read
	mov	x2, x0
	ldr	w8, [x21, #4]
	bfi	w2, w8, #24, #8
LBB0_19:
	ldr	w1, [x22]
	mov	x0, x20
	bl	_saa7146_write
Lloh16:
	adrp	x8, _MC2@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MC2@GOTPAGEOFF]
Lloh18:
	adrp	x9, _MASK_22@GOTPAGE
Lloh19:
	ldr	x9, [x9, _MASK_22@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	ldr	w8, [x9]
Lloh22:
	adrp	x9, _MASK_06@GOTPAGE
Lloh23:
	ldr	x9, [x9, _MASK_06@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x20
	bl	_saa7146_write
LBB0_20:
	mov	x0, x19
	bl	_IS_OVERLAY_ACTIVE
	cbz	x0, LBB0_22
; %bb.21:
	mov	x0, x19
	bl	_saa7146_stop_preview
	mov	x0, x19
	bl	_saa7146_start_preview
	mov	w0, #0
LBB0_22:
	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_23:
	ldr	w8, [x21, #4]
	str	w8, [x22, #4]
	b	LBB0_20
LBB0_24:
	ldr	w8, [x21, #4]
	str	w8, [x22]
	b	LBB0_20
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_12-LBB0_8)>>2
	.byte	(LBB0_13-LBB0_8)>>2
	.byte	(LBB0_17-LBB0_8)>>2
	.byte	(LBB0_18-LBB0_8)>>2
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BCS_CTRL,4,2                   ; @BCS_CTRL
	.comm	_MC2,4,2                        ; @MC2
	.comm	_MASK_22,4,2                    ; @MASK_22
	.comm	_MASK_06,4,2                    ; @MASK_06
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"V4L2_CID_HFLIP while active capture.\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.2:                               ; @.str.2
	.asciz	"V4L2_CID_VFLIP while active capture.\n"

	.no_dead_strip	_vidioc_s_ctrl
.subsections_via_symbols
