	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx8800_ctrl_query              ## -- Begin function cx8800_ctrl_query
	.p2align	4, 0x90
_cx8800_ctrl_query:                     ## @cx8800_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	(%rsi), %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	_CX8800_CTLS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	testl	%r8d, %r8d
	jle	LBB0_7
## %bb.3:
	movq	_cx8800_ctls@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rax, (%rcx)
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rdx
	addq	$16, %rcx
	cmpq	%rdx, %r8
	jne	LBB0_4
	jmp	LBB0_9
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_7:
	xorl	%edx, %edx
LBB0_8:
	cmpl	%r8d, %edx
	jne	LBB0_10
LBB0_9:
	movq	_no_ctl@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movups	%xmm0, (%rsi)
	xorl	%eax, %eax
LBB0_13:
	popq	%rbp
	retq
LBB0_10:
	movq	_cx8800_ctls@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	%edx, %edx
	shlq	$4, %rdx
	movups	(%rcx,%rdx), %xmm0
	movups	%xmm0, (%rsi)
	movq	(%rax), %rax
	movq	(%rax,%rdx), %rcx
	movq	_V4L2_CID_CHROMA_AGC@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_13
## %bb.11:
	movq	_V4L2_STD_SECAM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rdi)
	je	LBB0_13
## %bb.12:
	movq	_V4L2_CTRL_FLAG_INACTIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 8(%rsi)
	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	_CX8800_CTLS,4,2                ## @CX8800_CTLS
	.comm	_cx8800_ctls,8,3                ## @cx8800_ctls
	.comm	_no_ctl,16,3                    ## @no_ctl
	.comm	_V4L2_CID_CHROMA_AGC,8,3        ## @V4L2_CID_CHROMA_AGC
	.comm	_V4L2_STD_SECAM,4,2             ## @V4L2_STD_SECAM
	.comm	_V4L2_CTRL_FLAG_INACTIVE,4,2    ## @V4L2_CTRL_FLAG_INACTIVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx8800_ctrl_query              ; -- Begin function cx8800_ctrl_query
	.p2align	2
_cx8800_ctrl_query:                     ; @cx8800_ctrl_query
	.cfi_startproc
; %bb.0:
	ldr	x9, [x1]
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, _CX8800_CTLS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CX8800_CTLS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x10, #0
Lloh12:
	adrp	x11, _cx8800_ctls@GOTPAGE
Lloh13:
	ldr	x11, [x11, _cx8800_ctls@GOTPAGEOFF]
Lloh14:
	ldr	x11, [x11]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x11]
	cmp	x12, x9
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x10, x10, #1
	add	x11, x11, #16
	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	w0, #0
Lloh15:
	adrp	x8, _no_ctl@GOTPAGE
Lloh16:
	ldr	x8, [x8, _no_ctl@GOTPAGEOFF]
Lloh17:
	ldr	q0, [x8]
	str	q0, [x1]
	ret
LBB0_9:
Lloh18:
	adrp	x8, _cx8800_ctls@GOTPAGE
Lloh19:
	ldr	x8, [x8, _cx8800_ctls@GOTPAGEOFF]
	ldr	x9, [x8]
	mov	w10, w10
	lsl	x10, x10, #4
	ldr	q0, [x9, x10]
	str	q0, [x1]
	ldr	x8, [x8]
	ldr	x8, [x8, x10]
Lloh20:
	adrp	x9, _V4L2_CID_CHROMA_AGC@GOTPAGE
Lloh21:
	ldr	x9, [x9, _V4L2_CID_CHROMA_AGC@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.10:
	ldr	w8, [x0]
Lloh23:
	adrp	x9, _V4L2_STD_SECAM@GOTPAGE
Lloh24:
	ldr	x9, [x9, _V4L2_STD_SECAM@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
	mov	w0, #0
Lloh26:
	adrp	x8, _V4L2_CTRL_FLAG_INACTIVE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _V4L2_CTRL_FLAG_INACTIVE@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	ldr	w9, [x1, #8]
	orr	w8, w9, w8
	str	w8, [x1, #8]
	ret
LBB0_12:
	mov	w0, #0
	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	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.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	_CX8800_CTLS,4,2                ; @CX8800_CTLS
	.comm	_cx8800_ctls,8,3                ; @cx8800_ctls
	.comm	_no_ctl,16,3                    ; @no_ctl
	.comm	_V4L2_CID_CHROMA_AGC,8,3        ; @V4L2_CID_CHROMA_AGC
	.comm	_V4L2_STD_SECAM,4,2             ; @V4L2_STD_SECAM
	.comm	_V4L2_CTRL_FLAG_INACTIVE,4,2    ; @V4L2_CTRL_FLAG_INACTIVE
.subsections_via_symbols
