	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_v4l2_ctrl_query_menu           ## -- Begin function v4l2_ctrl_query_menu
	.p2align	4, 0x90
_v4l2_ctrl_query_menu:                  ## @v4l2_ctrl_query_menu
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	$0, 16(%rdi)
	testq	%rdx, %rdx
	jne	LBB0_2
## %bb.1:
	movl	8(%r14), %edi
	callq	_v4l2_ctrl_get_menu
	movq	%rax, %rdx
	testq	%rax, %rax
	je	LBB0_5
LBB0_2:
	movl	(%r14), %eax
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.3:
	cmpl	(%rbx), %eax
	jl	LBB0_5
## %bb.4:
	cmpl	4(%rbx), %eax
	jg	LBB0_5
LBB0_6:
	xorl	%ecx, %ecx
	testl	%eax, %eax
	jle	LBB0_10
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rdx,%rcx,8)
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_7
## %bb.9:
	movl	%eax, %ecx
LBB0_10:
	movl	%ecx, %ecx
	movq	(%rdx,%rcx,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.11:
	cmpb	$0, (%rcx)
	je	LBB0_5
## %bb.12:
	cltq
	movl	4(%r14), %edi
	movq	(%rdx,%rax,8), %rsi
	movl	$4, %edx
	callq	_strlcpy
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_v4l2_ctrl_query_menu           ; -- Begin function v4l2_ctrl_query_menu
	.p2align	2
_v4l2_ctrl_query_menu:                  ; @v4l2_ctrl_query_menu
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	str	xzr, [x0, #16]
	cbnz	x2, LBB0_2
; %bb.1:
	ldr	w0, [x19, #8]
	bl	_v4l2_ctrl_get_menu
	mov	x2, x0
	cbz	x0, LBB0_14
LBB0_2:
	ldr	w9, [x19]
	sxtw	x8, w9
	cbz	x20, LBB0_5
; %bb.3:
	ldr	w10, [x20]
	cmp	w8, w10
	b.lt	LBB0_14
; %bb.4:
	ldr	w10, [x20, #4]
	cmp	w9, w10
	b.gt	LBB0_14
LBB0_5:
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.6:
	mov	x10, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x2, x10, lsl #3]
	cbz	x11, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x10, x10, #1
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.9:
	mov	x10, x9
LBB0_10:
	ldr	x9, [x2, w10, uxtw #3]
	cbnz	x9, LBB0_12
	b	LBB0_14
LBB0_11:
	mov	w10, #0
	ldr	x9, [x2, w10, uxtw #3]
	cbz	x9, LBB0_14
LBB0_12:
	ldrb	w9, [x9]
	cbz	w9, LBB0_14
; %bb.13:
	ldr	w0, [x19, #4]
	ldr	x1, [x2, x8, lsl #3]
	mov	w2, #4
	bl	_strlcpy
	mov	w0, #0
	b	LBB0_15
LBB0_14:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
