	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ioctl_querymenu
_ioctl_querymenu:                       ## @ioctl_querymenu
	.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, %r14
	movq	%rdi, %rbx
	movl	16(%rdi), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	$0, 24(%rbx)
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_14
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_7
## %bb.2:
	cmpl	$130, %eax
	jne	LBB0_16
## %bb.3:
	movq	8(%rbx), %rax
	movq	_NUM_FLICKER_CONTROLS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_16
## %bb.4:
	movl	16(%rbx), %edi
	movq	_flicker_controls@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_7:
	movq	_NUM_FRAMERATE_CONTROLS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leal	-1(%rcx), %eax
	movl	4(%r14), %edx
	movq	_DEVICE_STV_672@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	jne	LBB0_12
## %bb.8:
	movl	(%r14), %edx
	movq	_CPIA2_VP_SENSOR_FLAGS_500@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	jne	LBB0_12
## %bb.9:
	cmpl	$2, %ecx
	jl	LBB0_12
## %bb.10:
	movq	_framerate_controls@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_CPIA2_VP_FRAMERATE_15@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%edx, 4(%rcx,%rsi,8)
	cmovel	%esi, %eax
	incq	%rsi
	movslq	%eax, %rdi
	cmpq	%rdi, %rsi
	jl	LBB0_11
LBB0_12:
	movq	8(%rbx), %rcx
	cltq
	cmpq	%rax, %rcx
	ja	LBB0_16
## %bb.13:
	movl	16(%rbx), %edi
	movq	_framerate_controls@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rcx,8), %esi
	jmp	LBB0_6
LBB0_14:
	movq	8(%rbx), %rax
	movq	_NUM_LIGHTS_CONTROLS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_16
## %bb.15:
	movl	16(%rbx), %edi
	movq	_lights_controls@GOTPCREL(%rip), %rcx
LBB0_5:
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %esi
LBB0_6:
	callq	_strcpy
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_16:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_17:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_FLICKER_CONTROLS,8,3       ## @NUM_FLICKER_CONTROLS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_flicker_controls,8,3           ## @flicker_controls
	.comm	_NUM_FRAMERATE_CONTROLS,4,2     ## @NUM_FRAMERATE_CONTROLS
	.comm	_DEVICE_STV_672,4,2             ## @DEVICE_STV_672
	.comm	_CPIA2_VP_SENSOR_FLAGS_500,4,2  ## @CPIA2_VP_SENSOR_FLAGS_500
	.comm	_framerate_controls,8,3         ## @framerate_controls
	.comm	_CPIA2_VP_FRAMERATE_15,4,2      ## @CPIA2_VP_FRAMERATE_15
	.comm	_NUM_LIGHTS_CONTROLS,8,3        ## @NUM_LIGHTS_CONTROLS
	.comm	_lights_controls,8,3            ## @lights_controls
	.no_dead_strip	_ioctl_querymenu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ioctl_querymenu
_ioctl_querymenu:                       ; @ioctl_querymenu
	.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
	ldr	w0, [x0, #16]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	str	xzr, [x19, #24]
	ldr	w8, [x19]
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_8
; %bb.2:
	cmp	w8, #130
	b.ne	LBB0_13
; %bb.3:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _NUM_FLICKER_CONTROLS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NUM_FLICKER_CONTROLS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_13
; %bb.4:
	ldr	w0, [x19, #16]
Lloh3:
	adrp	x9, _flicker_controls@GOTPAGE
Lloh4:
	ldr	x9, [x9, _flicker_controls@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x9, _NUM_LIGHTS_CONTROLS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NUM_LIGHTS_CONTROLS@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_13
; %bb.6:
	ldr	w0, [x19, #16]
Lloh8:
	adrp	x9, _lights_controls@GOTPAGE
Lloh9:
	ldr	x9, [x9, _lights_controls@GOTPAGEOFF]
LBB0_7:
	ldr	x9, [x9]
	ldr	w1, [x9, x8, lsl #2]
	b	LBB0_15
LBB0_8:
Lloh10:
	adrp	x8, _NUM_FRAMERATE_CONTROLS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NUM_FRAMERATE_CONTROLS@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x8]
	sub	w8, w9, #1
	ldr	w10, [x20, #4]
Lloh13:
	adrp	x11, _DEVICE_STV_672@GOTPAGE
Lloh14:
	ldr	x11, [x11, _DEVICE_STV_672@GOTPAGEOFF]
Lloh15:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_12
; %bb.9:
	ldr	w10, [x20]
Lloh16:
	adrp	x11, _CPIA2_VP_SENSOR_FLAGS_500@GOTPAGE
Lloh17:
	ldr	x11, [x11, _CPIA2_VP_SENSOR_FLAGS_500@GOTPAGEOFF]
Lloh18:
	ldr	w11, [x11]
	cmp	w10, w11
	ccmp	w9, #2, #8, eq
	b.lt	LBB0_12
; %bb.10:
	mov	x9, #0
Lloh19:
	adrp	x10, _framerate_controls@GOTPAGE
Lloh20:
	ldr	x10, [x10, _framerate_controls@GOTPAGEOFF]
Lloh21:
	ldr	x11, [x10]
Lloh22:
	adrp	x10, _CPIA2_VP_FRAMERATE_15@GOTPAGE
Lloh23:
	ldr	x10, [x10, _CPIA2_VP_FRAMERATE_15@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	add	x11, x11, #4
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11], #8
	cmp	w12, w10
	csel	w8, w9, w8, eq
	add	x9, x9, #1
	cmp	x9, w8, sxtw
	b.lt	LBB0_11
LBB0_12:
	ldr	x9, [x19, #8]
	cmp	x9, w8, sxtw
	b.ls	LBB0_14
LBB0_13:
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_14:
	ldr	w0, [x19, #16]
Lloh28:
	adrp	x8, _framerate_controls@GOTPAGE
Lloh29:
	ldr	x8, [x8, _framerate_controls@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	lsl	x9, x9, #3
	ldr	w1, [x8, x9]
LBB0_15:
	bl	_strcpy
	mov	w0, #0
LBB0_16:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_FLICKER_CONTROLS,8,3       ; @NUM_FLICKER_CONTROLS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_flicker_controls,8,3           ; @flicker_controls
	.comm	_NUM_FRAMERATE_CONTROLS,4,2     ; @NUM_FRAMERATE_CONTROLS
	.comm	_DEVICE_STV_672,4,2             ; @DEVICE_STV_672
	.comm	_CPIA2_VP_SENSOR_FLAGS_500,4,2  ; @CPIA2_VP_SENSOR_FLAGS_500
	.comm	_framerate_controls,8,3         ; @framerate_controls
	.comm	_CPIA2_VP_FRAMERATE_15,4,2      ; @CPIA2_VP_FRAMERATE_15
	.comm	_NUM_LIGHTS_CONTROLS,8,3        ; @NUM_LIGHTS_CONTROLS
	.comm	_lights_controls,8,3            ; @lights_controls
	.no_dead_strip	_ioctl_querymenu
.subsections_via_symbols
