	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_v4l2_s_ctrl                    ## -- Begin function v4l2_s_ctrl
	.p2align	4, 0x90
_v4l2_s_ctrl:                           ## @v4l2_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	movq	%rsi, %rax
	movq	%rdi, %r14
	movl	4(%rdx), %esi
	movq	%rax, %rdi
	callq	_v4l2_ctrl_find
	movl	$0, -20(%rbp)
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	cmpl	$0, 4(%rax)
	je	LBB0_2
## %bb.4:
	movq	_V4L2_CTRL_FLAG_READ_ONLY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_EACCES@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movl	(%rbx), %ecx
	movl	%ecx, -24(%rbp)
	leaq	-24(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_set_ctrl_lock
	movl	-24(%rbp), %ecx
	movl	%ecx, (%rbx)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_CTRL_FLAG_READ_ONLY,4,2   ## @V4L2_CTRL_FLAG_READ_ONLY
	.comm	_EACCES,4,2                     ## @EACCES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_v4l2_s_ctrl                    ; -- Begin function v4l2_s_ctrl
	.p2align	2
_v4l2_s_ctrl:                           ; @v4l2_s_ctrl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x2
	mov	x8, x1
	mov	x20, x0
	ldr	w1, [x2, #4]
	mov	x0, x8
	bl	_v4l2_ctrl_find
	str	wzr, [sp, #12]
	cbz	x0, LBB0_4
; %bb.1:
	mov	x1, x0
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_4
; %bb.2:
	ldr	w8, [x1]
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_7
; %bb.3:
Lloh3:
	adrp	x8, _EACCES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_7:
	ldr	w8, [x19]
	str	w8, [sp, #8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_set_ctrl_lock
	ldr	w8, [sp, #8]
	str	w8, [x19]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_CTRL_FLAG_READ_ONLY,4,2   ; @V4L2_CTRL_FLAG_READ_ONLY
	.comm	_EACCES,4,2                     ; @EACCES
.subsections_via_symbols
