	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx23885_ctrl_query
_cx23885_ctrl_query:                    ## @cx23885_ctrl_query
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rax
	movq	_V4L2_CID_BASE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_6
## %bb.1:
	movq	_V4L2_CID_LASTP1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_6
## %bb.2:
	movq	_CX23885_CTLS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_3
## %bb.7:
	movq	_cx23885_ctls@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rax, (%rsi,%rdx,8)
	je	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	LBB0_8
	jmp	LBB0_10
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_3:
	xorl	%edx, %edx
LBB0_4:
	cmpl	%ecx, %edx
	jne	LBB0_5
LBB0_10:
	movq	_no_ctl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_11
LBB0_5:
	movq	_cx23885_ctls@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%edx, %ecx
	movq	(%rax,%rcx,8), %rax
LBB0_11:
	movq	%rax, (%rdi)
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_CID_BASE,8,3              ## @V4L2_CID_BASE
	.comm	_V4L2_CID_LASTP1,8,3            ## @V4L2_CID_LASTP1
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CX23885_CTLS,4,2               ## @CX23885_CTLS
	.comm	_cx23885_ctls,8,3               ## @cx23885_ctls
	.comm	_no_ctl,8,3                     ## @no_ctl
	.no_dead_strip	_cx23885_ctrl_query
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx23885_ctrl_query
_cx23885_ctrl_query:                    ; @cx23885_ctrl_query
	.cfi_startproc
; %bb.0:
	ldr	x9, [x0]
Lloh0:
	adrp	x8, _V4L2_CID_BASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_CID_BASE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x10, _V4L2_CID_LASTP1@GOTPAGE
Lloh4:
	ldr	x10, [x10, _V4L2_CID_LASTP1@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x8
	ccmp	x9, x10, #0, ge
	b.lt	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_2:
Lloh9:
	adrp	x8, _CX23885_CTLS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CX23885_CTLS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x10, #0
Lloh12:
	adrp	x11, _cx23885_ctls@GOTPAGE
Lloh13:
	ldr	x11, [x11, _cx23885_ctls@GOTPAGEOFF]
Lloh14:
	ldr	x11, [x11]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x11, x10, lsl #3]
	cmp	x12, x9
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x10, x10, #1
	cmp	x8, x10
	b.ne	LBB0_4
	b	LBB0_8
LBB0_6:
	mov	w10, #0
LBB0_7:
	cmp	w10, w8
	b.ne	LBB0_9
LBB0_8:
	mov	w8, #0
Lloh15:
	adrp	x9, _no_ctl@GOTPAGE
Lloh16:
	ldr	x9, [x9, _no_ctl@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	b	LBB0_10
LBB0_9:
	mov	w8, #0
Lloh18:
	adrp	x9, _cx23885_ctls@GOTPAGE
Lloh19:
	ldr	x9, [x9, _cx23885_ctls@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	ldr	x9, [x9, w10, uxtw #3]
LBB0_10:
	str	x9, [x0]
	mov	x0, x8
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_CID_BASE,8,3              ; @V4L2_CID_BASE
	.comm	_V4L2_CID_LASTP1,8,3            ; @V4L2_CID_LASTP1
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CX23885_CTLS,4,2               ; @CX23885_CTLS
	.comm	_cx23885_ctls,8,3               ; @cx23885_ctls
	.comm	_no_ctl,8,3                     ; @no_ctl
	.no_dead_strip	_cx23885_ctrl_query
.subsections_via_symbols
