	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movl	8(%rdx), %esi
	movq	%r12, %rdi
	callq	_get_ctrl
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movl	(%r12), %ecx
	btl	%eax, %ecx
	jae	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_22:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	32(%r12), %rdx
	movq	40(%r12), %rcx
	movq	(%rcx), %r13
	movl	%eax, %r15d
	testq	%rdx, %rdx
	je	LBB0_8
## %bb.5:
	leaq	(%r15,%r15,2), %rax
	movq	(%r14), %rcx
	cmpq	(%rdx,%rax,8), %rcx
	jl	LBB0_23
## %bb.6:
	cmpq	8(%rdx,%rax,8), %rcx
	jg	LBB0_23
## %bb.7:
	leaq	(%rdx,%rax,8), %rax
	jmp	LBB0_11
LBB0_8:
	movq	(%r14), %rcx
	movq	%r15, %rax
	shlq	$5, %rax
	cmpq	16(%r13,%rax), %rcx
	jl	LBB0_23
## %bb.9:
	cmpq	24(%r13,%rax), %rcx
	jle	LBB0_10
LBB0_23:
	movq	_ERANGE@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_10:
	xorl	%eax, %eax
LBB0_11:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_D_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_PDEBUG
	leaq	8(%r12), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_13:
	cmpl	$0, 24(%r12)
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_14
## %bb.15:
	movl	$0, 4(%r12)
	shlq	$5, %r15
	movq	(%r13,%r15), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	(%r14), %rsi
	movq	%r12, %rdi
	callq	*%rax
	movl	%eax, %ebx
	jmp	LBB0_21
LBB0_14:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_21:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	jmp	LBB0_22
LBB0_17:
	xorl	%ebx, %ebx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_21
## %bb.18:
	movq	(%r14), %rax
	movq	%rax, 16(%rcx)
	movq	8(%r13,%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_21
## %bb.19:
	cmpq	$0, 16(%r12)
	je	LBB0_21
## %bb.20:
	movq	%r12, %rdi
	callq	*%rcx
	movl	4(%r12), %ebx
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_D_CONF,4,2                     ## @D_CONF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set ctrl [%08x] = %d"

	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_ENODEV,4,2                     ## @ENODEV
	.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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x19, x1
	ldr	w1, [x2, #8]
	mov	x0, x19
	bl	_get_ctrl
	tbnz	w0, #31, LBB0_2
; %bb.1:
	ldr	w8, [x19]
	lsr	w8, w8, w0
	tbz	w8, #0, LBB0_5
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldp	x8, x9, [x19, #32]
	ldr	x22, [x9]
	mov	w23, w0
	cbz	x8, LBB0_8
; %bb.6:
	mov	w9, #24
	madd	x24, x23, x9, x8
	ldr	x3, [x20]
	ldr	x9, [x24]
	cmp	x3, x9
	b.lt	LBB0_10
; %bb.7:
	mov	w9, #24
	madd	x8, x23, x9, x8
	ldr	x8, [x8, #8]
	cmp	x3, x8
	b.gt	LBB0_10
	b	LBB0_12
LBB0_8:
	ldr	x3, [x20]
	add	x8, x22, x23, lsl #5
	ldr	x9, [x8, #16]
	cmp	x3, x9
	b.lt	LBB0_10
; %bb.9:
	ldr	x8, [x8, #24]
	cmp	x3, x8
	b.le	LBB0_11
LBB0_10:
Lloh2:
	adrp	x8, _ERANGE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
	b	LBB0_3
LBB0_11:
	mov	x24, #0
LBB0_12:
Lloh4:
	adrp	x8, _D_CONF@GOTPAGE
Lloh5:
	ldr	x8, [x8, _D_CONF@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	ldr	w2, [x20, #8]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_PDEBUG
	add	x21, x19, #8
	mov	x0, x21
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_14
; %bb.13:
Lloh9:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_3
LBB0_14:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_17
; %bb.15:
	str	wzr, [x19, #4]
	lsl	x8, x23, #5
	ldr	x8, [x22, x8]
	cbz	x8, LBB0_18
; %bb.16:
	ldr	x1, [x20]
	mov	x0, x19
	blr	x8
	mov	x19, x0
	b	LBB0_23
LBB0_17:
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_23
LBB0_18:
	cbz	x24, LBB0_22
; %bb.19:
	ldr	x8, [x20]
	str	x8, [x24, #16]
	add	x8, x22, x23, lsl #5
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_22
; %bb.20:
	ldr	x9, [x19, #16]
	cbz	x9, LBB0_22
; %bb.21:
	mov	x0, x19
	blr	x8
	ldr	w19, [x19, #4]
	b	LBB0_23
LBB0_22:
	mov	w19, #0
LBB0_23:
	mov	x0, x21
	bl	_mutex_unlock
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_D_CONF,4,2                     ; @D_CONF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set ctrl [%08x] = %d"

	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_vidioc_s_ctrl
.subsections_via_symbols
