	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_ctrl
_set_ctrl:                              ## @set_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	_V4L2_CTRL_FLAG_READ_ONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_2
## %bb.1:
	movq	_EACCES@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_2:
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	24(%rdi), %rax
	movq	(%rax), %r15
	callq	_v4l2_ctrl_lock
	movl	4(%r15), %edx
	testl	%edx, %edx
	jle	LBB0_20
## %bb.3:
	movq	24(%r15), %rcx
	leaq	-1(%rdx), %rsi
	movl	%edx, %eax
	andl	$3, %eax
	cmpq	$3, %rsi
	jae	LBB0_5
## %bb.4:
	xorl	%esi, %esi
LBB0_15:
	testq	%rax, %rax
	je	LBB0_20
## %bb.16:
	leaq	(%rcx,%rsi,8), %rcx
	xorl	%edx, %edx
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_17 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	je	LBB0_20
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	$0, 8(%rsi)
	jmp	LBB0_19
LBB0_20:
	movl	(%r14), %eax
	movl	%eax, 16(%r12)
	movl	$1, 8(%r12)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_try_or_set_control_cluster
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_22
## %bb.21:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_try_or_set_control_cluster
	movl	%eax, %ebx
LBB0_22:
	movl	12(%r12), %eax
	movl	%eax, (%r14)
	movq	%r12, %rdi
	callq	_v4l2_ctrl_unlock
LBB0_23:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	andl	$-4, %edx
	xorl	%esi, %esi
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	addq	$4, %rsi
	cmpq	%rsi, %rdx
	je	LBB0_15
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rsi,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$0, 8(%rdi)
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%rcx,%rsi,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$0, 8(%rdi)
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	16(%rcx,%rsi,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	$0, 8(%rdi)
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	24(%rcx,%rsi,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	$0, 8(%rdi)
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_CTRL_FLAG_READ_ONLY,4,2   ## @V4L2_CTRL_FLAG_READ_ONLY
	.comm	_EACCES,4,2                     ## @EACCES
	.no_dead_strip	_set_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_ctrl
_set_ctrl:                              ; @set_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, [x0]
Lloh0:
	adrp	x9, _V4L2_CTRL_FLAG_READ_ONLY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_CTRL_FLAG_READ_ONLY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EACCES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_10
LBB0_2:
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #24]
	ldr	x21, [x8]
	bl	_v4l2_ctrl_lock
	ldr	w8, [x21, #4]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	ldr	x9, [x21, #24]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.eq	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cbz	x10, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	str	wzr, [x10, #8]
	b	LBB0_4
LBB0_7:
	ldr	w8, [x20]
	str	w8, [x19, #16]
	mov	w8, #1
	str	w8, [x19, #8]
	mov	x0, x21
	mov	w1, #0
	bl	_try_or_set_control_cluster
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.8:
	mov	x0, x21
	mov	w1, #1
	bl	_try_or_set_control_cluster
	mov	x22, x0
LBB0_9:
	ldr	w8, [x19, #12]
	str	w8, [x20]
	mov	x0, x19
	bl	_v4l2_ctrl_unlock
LBB0_10:
	mov	x0, x22
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_CTRL_FLAG_READ_ONLY,4,2   ; @V4L2_CTRL_FLAG_READ_ONLY
	.comm	_EACCES,4,2                     ; @EACCES
	.no_dead_strip	_set_ctrl
.subsections_via_symbols
