	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uvc_ctrl_set                   ## -- Begin function uvc_ctrl_set
	.p2align	4, 0x90
_uvc_ctrl_set:                          ## @uvc_ctrl_set
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	4(%rsi), %esi
	leaq	-64(%rbp), %rdx
	callq	_uvc_find_control
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %r13
	movq	_UVC_CONTROL_SET_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 12(%r13)
	je	LBB0_2
## %bb.4:
	movq	-64(%rbp), %r12
	movl	(%r12), %eax
	cmpl	$128, %eax
	je	LBB0_13
## %bb.5:
	cmpl	$130, %eax
	je	LBB0_11
## %bb.6:
	cmpl	$129, %eax
	jne	LBB0_17
## %bb.7:
	cmpl	$0, 32(%r13)
	jne	LBB0_10
## %bb.8:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_uvc_ctrl_populate_cache
	testl	%eax, %eax
	js	LBB0_27
## %bb.9:
	movq	-64(%rbp), %r12
LBB0_10:
	movq	8(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_UVC_GET_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_UVC_CTRL_DATA_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_uvc_ctrl_data
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	*-48(%rbp)                      ## 8-byte Folded Reload
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	-64(%rbp), %rbx
	movq	8(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_UVC_GET_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_UVC_CTRL_DATA_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_uvc_ctrl_data
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	*-48(%rbp)                      ## 8-byte Folded Reload
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	-64(%rbp), %r12
	movq	8(%r12), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_UVC_GET_RES@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_UVC_CTRL_DATA_RES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_uvc_ctrl_data
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	*-72(%rbp)                      ## 8-byte Folded Reload
	testl	%eax, %eax
	movl	$1, %ecx
	cmovnel	%eax, %ecx
	movl	(%r15), %eax
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	subl	%esi, %eax
	movl	%ecx, %edi
	shrl	$31, %edi
	addl	%ecx, %edi
	sarl	%edi
	addl	%eax, %edi
	movl	%edi, %eax
	cltd
	idivl	%ecx
	subl	%edx, %edi
	addl	%esi, %edi
	movl	%edi, (%r15)
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	jmp	LBB0_12
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_27
LBB0_13:
	movl	(%r15), %eax
	testl	%eax, %eax
	js	LBB0_15
## %bb.14:
	cmpl	16(%r12), %eax
	jge	LBB0_15
## %bb.16:
	movq	32(%r12), %rcx
	movl	(%rcx,%rax,4), %r12d
	cmpl	$0, (%r13)
	jne	LBB0_24
	jmp	LBB0_19
LBB0_11:
	movl	(%r15), %edi
	xorl	%esi, %esi
	movl	$1, %edx
LBB0_12:
	callq	_clamp
	movq	%rax, %r12
	movl	%r12d, (%r15)
	cmpl	$0, (%r13)
	jne	LBB0_24
	jmp	LBB0_19
LBB0_17:
	movl	(%r15), %r12d
	cmpl	$0, (%r13)
	jne	LBB0_24
LBB0_19:
	movl	16(%r13), %eax
	shll	$3, %eax
	movq	-64(%rbp), %rcx
	cmpl	20(%rcx), %eax
	je	LBB0_24
## %bb.20:
	movq	_UVC_CONTROL_GET_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 12(%r13)
	je	LBB0_21
## %bb.22:
	movq	(%r14), %r14
	movq	_UVC_GET_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	24(%r13), %rax
	movl	(%rax), %ebx
	movl	(%r14), %r15d
	movl	20(%r13), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_UVC_CTRL_DATA_CURRENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_uvc_ctrl_data
	movl	16(%r13), %ecx
	movl	%ecx, (%rsp)
	movq	%r14, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, %edx
	movl	%r15d, %ecx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	movl	%eax, %r9d
	callq	_uvc_query_ctrl
	testl	%eax, %eax
	jns	LBB0_23
	jmp	LBB0_27
LBB0_15:
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_21:
	movq	_UVC_CTRL_DATA_CURRENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_uvc_ctrl_data
	movl	16(%r13), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_memset
LBB0_23:
	movl	$1, (%r13)
LBB0_24:
	cmpl	$0, 4(%r13)
	jne	LBB0_26
## %bb.25:
	movq	_UVC_CTRL_DATA_BACKUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_uvc_ctrl_data
	movl	%eax, %r14d
	movq	_UVC_CTRL_DATA_CURRENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_uvc_ctrl_data
	movl	16(%r13), %edx
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_memcpy
LBB0_26:
	movq	-64(%rbp), %rbx
	movq	24(%rbx), %r14
	movq	_UVC_CTRL_DATA_CURRENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_uvc_ctrl_data
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	*%r14
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 4(%r13)
	xorl	%eax, %eax
LBB0_27:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UVC_CONTROL_SET_CUR,4,2        ## @UVC_CONTROL_SET_CUR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_UVC_GET_MIN,4,2                ## @UVC_GET_MIN
	.comm	_UVC_CTRL_DATA_MIN,4,2          ## @UVC_CTRL_DATA_MIN
	.comm	_UVC_GET_MAX,4,2                ## @UVC_GET_MAX
	.comm	_UVC_CTRL_DATA_MAX,4,2          ## @UVC_CTRL_DATA_MAX
	.comm	_UVC_GET_RES,4,2                ## @UVC_GET_RES
	.comm	_UVC_CTRL_DATA_RES,4,2          ## @UVC_CTRL_DATA_RES
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_UVC_CONTROL_GET_CUR,4,2        ## @UVC_CONTROL_GET_CUR
	.comm	_UVC_CTRL_DATA_CURRENT,4,2      ## @UVC_CTRL_DATA_CURRENT
	.comm	_UVC_GET_CUR,4,2                ## @UVC_GET_CUR
	.comm	_UVC_CTRL_DATA_BACKUP,4,2       ## @UVC_CTRL_DATA_BACKUP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uvc_ctrl_set                   ; -- Begin function uvc_ctrl_set
	.p2align	2
_uvc_ctrl_set:                          ; @uvc_ctrl_set
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x20, x0
	ldr	w1, [x1, #4]
	add	x2, sp, #8
	bl	_uvc_find_control
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0, #12]
Lloh0:
	adrp	x9, _UVC_CONTROL_SET_CUR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _UVC_CONTROL_SET_CUR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.2:
	ldr	x22, [sp, #8]
	ldr	w8, [x22]
	cmp	w8, #128
	b.eq	LBB0_11
; %bb.3:
	cmp	w8, #130
	b.eq	LBB0_14
; %bb.4:
	cmp	w8, #129
	b.ne	LBB0_15
; %bb.5:
	ldr	w8, [x19, #32]
	cbnz	w8, LBB0_8
; %bb.6:
	mov	x0, x20
	mov	x1, x19
	bl	_uvc_ctrl_populate_cache
	tbnz	w0, #31, LBB0_26
; %bb.7:
	ldr	x22, [sp, #8]
LBB0_8:
	ldr	x24, [x22, #8]
Lloh3:
	adrp	x8, _UVC_GET_MIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UVC_GET_MIN@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
Lloh6:
	adrp	x8, _UVC_CTRL_DATA_MIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UVC_CTRL_DATA_MIN@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_uvc_ctrl_data
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	blr	x24
	mov	x22, x0
	ldr	x23, [sp, #8]
	ldr	x25, [x23, #8]
Lloh9:
	adrp	x8, _UVC_GET_MAX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _UVC_GET_MAX@GOTPAGEOFF]
Lloh11:
	ldr	w24, [x8]
Lloh12:
	adrp	x8, _UVC_CTRL_DATA_MAX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _UVC_CTRL_DATA_MAX@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_uvc_ctrl_data
	mov	x2, x0
	mov	x0, x23
	mov	x1, x24
	blr	x25
	mov	x23, x0
	ldr	x24, [sp, #8]
	ldr	x26, [x24, #8]
Lloh15:
	adrp	x8, _UVC_GET_RES@GOTPAGE
Lloh16:
	ldr	x8, [x8, _UVC_GET_RES@GOTPAGEOFF]
Lloh17:
	ldr	w25, [x8]
Lloh18:
	adrp	x8, _UVC_CTRL_DATA_RES@GOTPAGE
Lloh19:
	ldr	x8, [x8, _UVC_CTRL_DATA_RES@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_uvc_ctrl_data
	mov	x2, x0
	mov	x0, x24
	mov	x1, x25
	blr	x26
	cmp	w0, #0
	csinc	w8, w0, wzr, ne
	ldr	w9, [x21]
	sub	w9, w9, w22
	cmp	w8, #0
	cinc	w10, w8, lt
	add	w9, w9, w10, asr #1
	sdiv	w9, w9, w8
	madd	w0, w9, w8, w22
	str	w0, [x21]
	mov	x1, x22
	mov	x2, x23
	bl	_clamp
	mov	x22, x0
	str	w22, [x21]
	b	LBB0_16
LBB0_9:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_26
LBB0_11:
	ldr	w8, [x21]
	tbnz	w8, #31, LBB0_20
; %bb.12:
	ldr	w9, [x22, #16]
	cmp	w8, w9
	b.ge	LBB0_20
; %bb.13:
	ldr	x9, [x22, #32]
	ldr	w22, [x9, x8, lsl #2]
	b	LBB0_16
LBB0_14:
	ldr	w0, [x21]
	mov	w1, #0
	mov	w2, #1
	bl	_clamp
	str	w0, [x21]
	mov	x22, x0
	b	LBB0_16
LBB0_15:
	ldr	w22, [x21]
LBB0_16:
	ldr	w8, [x19]
Lloh23:
	adrp	x26, _UVC_CTRL_DATA_CURRENT@GOTPAGE
Lloh24:
	ldr	x26, [x26, _UVC_CTRL_DATA_CURRENT@GOTPAGEOFF]
	cbnz	w8, LBB0_23
; %bb.17:
	ldr	w8, [x19, #16]
	ldr	x9, [sp, #8]
	ldr	w9, [x9, #20]
	cmp	w9, w8, lsl #3
	b.eq	LBB0_23
; %bb.18:
	ldr	w8, [x19, #12]
Lloh25:
	adrp	x9, _UVC_CONTROL_GET_CUR@GOTPAGE
Lloh26:
	ldr	x9, [x9, _UVC_CONTROL_GET_CUR@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.19:
	ldr	x20, [x20]
Lloh28:
	adrp	x8, _UVC_GET_CUR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _UVC_GET_CUR@GOTPAGEOFF]
Lloh30:
	ldr	w21, [x8]
	ldr	x8, [x19, #24]
	ldr	w23, [x8]
	ldr	w24, [x20]
	ldr	w25, [x19, #20]
	ldr	w1, [x26]
	mov	x0, x19
	bl	_uvc_ctrl_data
	mov	x5, x0
	ldr	w6, [x19, #16]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x23
	mov	x3, x24
	mov	x4, x25
	bl	_uvc_query_ctrl
	tbz	w0, #31, LBB0_22
	b	LBB0_26
LBB0_20:
Lloh31:
	adrp	x8, _ERANGE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
	b	LBB0_10
LBB0_21:
	ldr	w1, [x26]
	mov	x0, x19
	bl	_uvc_ctrl_data
	ldr	w2, [x19, #16]
	mov	w1, #0
	bl	_memset
LBB0_22:
	mov	w8, #1
	str	w8, [x19]
LBB0_23:
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_25
; %bb.24:
Lloh33:
	adrp	x8, _UVC_CTRL_DATA_BACKUP@GOTPAGE
Lloh34:
	ldr	x8, [x8, _UVC_CTRL_DATA_BACKUP@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_uvc_ctrl_data
	mov	x20, x0
	ldr	w1, [x26]
	mov	x0, x19
	bl	_uvc_ctrl_data
	mov	x1, x0
	ldr	w2, [x19, #16]
	mov	x0, x20
	bl	_memcpy
LBB0_25:
	ldr	x20, [sp, #8]
	ldr	x21, [x20, #24]
	ldr	w1, [x26]
	mov	x0, x19
	bl	_uvc_ctrl_data
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	blr	x21
	mov	w0, #0
	movi.2s	v0, #1
	stur	d0, [x19, #4]
LBB0_26:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_UVC_CONTROL_SET_CUR,4,2        ; @UVC_CONTROL_SET_CUR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_UVC_GET_MIN,4,2                ; @UVC_GET_MIN
	.comm	_UVC_CTRL_DATA_MIN,4,2          ; @UVC_CTRL_DATA_MIN
	.comm	_UVC_GET_MAX,4,2                ; @UVC_GET_MAX
	.comm	_UVC_CTRL_DATA_MAX,4,2          ; @UVC_CTRL_DATA_MAX
	.comm	_UVC_GET_RES,4,2                ; @UVC_GET_RES
	.comm	_UVC_CTRL_DATA_RES,4,2          ; @UVC_CTRL_DATA_RES
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_UVC_CONTROL_GET_CUR,4,2        ; @UVC_CONTROL_GET_CUR
	.comm	_UVC_CTRL_DATA_CURRENT,4,2      ; @UVC_CTRL_DATA_CURRENT
	.comm	_UVC_GET_CUR,4,2                ; @UVC_GET_CUR
	.comm	_UVC_CTRL_DATA_BACKUP,4,2       ; @UVC_CTRL_DATA_BACKUP
.subsections_via_symbols
