	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function Controls_MenuKey
_Controls_MenuKey:                      ## @Controls_MenuKey
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	_qfalse@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	_s_controls@GOTPCREL(%rip), %r15
	cmpq	$0, 16(%r15)
	je	LBB0_1
## %bb.6:
	movq	_K_CHAR_FLAG@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	jne	LBB0_5
## %bb.7:
	cmpl	$96, %ebx
	je	LBB0_5
## %bb.8:
	cmpl	$130, %ebx
	jne	LBB0_11
## %bb.9:
	movq	%rax, 16(%r15)
	jmp	LBB0_37
LBB0_1:
	leal	-128(%rbx), %ecx
	cmpl	$4, %ecx
	ja	LBB0_5
## %bb.2:
	movl	$26, %edx
	btl	%ecx, %edx
	jae	LBB0_3
## %bb.10:
	movq	_qtrue@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r13
	movq	%r13, 24(%r15)
LBB0_12:
	movl	$-1, %ebx
	movb	$1, %cl
LBB0_20:
	movq	_g_bindings@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r14
	cmpl	$0, 12(%r14)
	je	LBB0_35
## %bb.21:
	movq	(%r15), %rdx
	movq	8(%r15), %rsi
	movq	(%rsi,%rdx,8), %rdx
	movl	(%rdx), %edx
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%edx, 8(%r14)
	je	LBB0_23
## %bb.34:                              ##   in Loop: Header=BB0_22 Depth=1
	cmpl	$0, 28(%r14)
	leaq	16(%r14), %r14
	jne	LBB0_22
LBB0_35:
	movq	%rax, %r13
LBB0_36:
	movq	(%r12), %rax
	movq	%rax, 16(%r15)
	testq	%r13, %r13
	je	LBB0_5
LBB0_37:
	xorl	%eax, %eax
	callq	_Controls_Update
	movq	_menu_out_sound@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	cmpq	$0, 24(%r15)
	je	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	_Controls_SetConfig
LBB0_5:
	movq	_s_controls@GOTPCREL(%rip), %rdi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Menu_DefaultKey                ## TAILCALL
LBB0_23:
	movl	4(%r14), %edi
	testb	%cl, %cl
	je	LBB0_28
## %bb.24:
	cmpl	$-1, %edi
	je	LBB0_26
## %bb.25:
	leaq	L_.str(%rip), %rsi
	callq	_trap_Key_SetBinding
	movl	$-1, 4(%r14)
LBB0_26:
	movl	(%r14), %edi
	cmpl	$-1, %edi
	je	LBB0_36
## %bb.27:
	leaq	L_.str(%rip), %rsi
	callq	_trap_Key_SetBinding
	movl	$-1, (%r14)
	jmp	LBB0_36
LBB0_11:
	movq	_qtrue@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r13
	movq	%r13, 24(%r15)
	cmpl	$-1, %ebx
	je	LBB0_12
## %bb.13:
	movq	_g_bindings@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpl	$0, 12(%rcx)
	jne	LBB0_14
LBB0_19:
	xorl	%ecx, %ecx
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_14 Depth=1
	cmpl	$0, 28(%rcx)
	leaq	16(%rcx), %rcx
	je	LBB0_19
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx), %edx
	cmpl	%ebx, %edx
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	$-1, (%rcx)
	movl	$-1, %edx
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	cmpl	%ebx, 4(%rcx)
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	%edx, 4(%rcx)
	movl	$-1, (%rcx)
	jmp	LBB0_18
LBB0_28:
	cmpl	$-1, %edi
	je	LBB0_29
## %bb.30:
	cmpl	%ebx, %edi
	je	LBB0_33
## %bb.31:
	cmpl	$-1, (%r14)
	je	LBB0_32
LBB0_33:
	leaq	L_.str(%rip), %rsi
	callq	_trap_Key_SetBinding
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_trap_Key_SetBinding
	movl	%ebx, 4(%r14)
	movl	$-1, (%r14)
	jmp	LBB0_36
LBB0_29:
	movl	%ebx, 4(%r14)
	jmp	LBB0_36
LBB0_32:
	movl	%ebx, (%r14)
	jmp	LBB0_36
	.cfi_endproc
                                        ## -- End function
	.comm	_qfalse,8,3                     ## @qfalse
	.comm	_s_controls,32,3                ## @s_controls
	.comm	_K_CHAR_FLAG,4,2                ## @K_CHAR_FLAG
	.comm	_menu_out_sound,4,2             ## @menu_out_sound
	.comm	_qtrue,8,3                      ## @qtrue
	.comm	_g_bindings,8,3                 ## @g_bindings
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.no_dead_strip	_Controls_MenuKey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function Controls_MenuKey
_Controls_MenuKey:                      ; @Controls_MenuKey
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x22, _qfalse@GOTPAGE
Lloh1:
	ldr	x22, [x22, _qfalse@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh2:
	adrp	x21, _s_controls@GOTPAGE
Lloh3:
	ldr	x21, [x21, _s_controls@GOTPAGEOFF]
	ldr	x9, [x21, #16]
	cbz	x9, LBB0_5
; %bb.1:
Lloh4:
	adrp	x9, _K_CHAR_FLAG@GOTPAGE
Lloh5:
	ldr	x9, [x9, _K_CHAR_FLAG@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w19
	b.ne	LBB0_18
; %bb.2:
	cmp	w19, #96
	b.eq	LBB0_18
; %bb.3:
	cmp	w19, #130
	b.ne	LBB0_24
; %bb.4:
	str	x8, [x21, #16]
	b	LBB0_15
LBB0_5:
	sub	w9, w19, #128
	cmp	w9, #4
	b.hi	LBB0_18
; %bb.6:
	mov	w10, #1
	lsl	w9, w10, w9
	mov	w10, #26
	tst	w9, w10
	b.eq	LBB0_16
; %bb.7:
Lloh7:
	adrp	x9, _qtrue@GOTPAGE
Lloh8:
	ldr	x9, [x9, _qtrue@GOTPAGEOFF]
Lloh9:
	ldr	x23, [x9]
	str	x23, [x21, #24]
	mov	w19, #-1
LBB0_8:
	mov	w9, #1
LBB0_9:
Lloh10:
	adrp	x10, _g_bindings@GOTPAGE
Lloh11:
	ldr	x10, [x10, _g_bindings@GOTPAGEOFF]
Lloh12:
	ldr	x24, [x10]
	ldr	w10, [x24, #12]
	cbz	w10, LBB0_13
; %bb.10:
	ldp	x11, x10, [x21]
	ldr	x10, [x10, x11, lsl #3]
	ldr	w10, [x10]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x24, #8]
	cmp	w11, w10
	b.eq	LBB0_19
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w11, [x24, #28]
	add	x24, x24, #16
	cbnz	w11, LBB0_11
LBB0_13:
	mov	x23, x8
LBB0_14:
	ldr	x8, [x22]
	str	x8, [x21, #16]
	cbz	x23, LBB0_18
LBB0_15:
	bl	_Controls_Update
Lloh13:
	adrp	x8, _menu_out_sound@GOTPAGE
Lloh14:
	ldr	x8, [x8, _menu_out_sound@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_16:
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_18
; %bb.17:
	bl	_Controls_SetConfig
LBB0_18:
Lloh16:
	adrp	x0, _s_controls@GOTPAGE
Lloh17:
	ldr	x0, [x0, _s_controls@GOTPAGEOFF]
	mov	x1, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_Menu_DefaultKey
LBB0_19:
	ldr	w0, [x24, #4]
	cmn	w0, #1
	cbz	w9, LBB0_33
; %bb.20:
	b.eq	LBB0_22
; %bb.21:
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_trap_Key_SetBinding
	mov	w8, #-1
	str	w8, [x24, #4]
LBB0_22:
	ldr	w0, [x24]
	cmn	w0, #1
	b.eq	LBB0_14
; %bb.23:
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_trap_Key_SetBinding
	mov	w8, #-1
	str	w8, [x24]
	b	LBB0_14
LBB0_24:
Lloh22:
	adrp	x9, _qtrue@GOTPAGE
Lloh23:
	ldr	x9, [x9, _qtrue@GOTPAGEOFF]
Lloh24:
	ldr	x23, [x9]
	str	x23, [x21, #24]
	cmn	w19, #1
	b.eq	LBB0_8
; %bb.25:
Lloh25:
	adrp	x9, _g_bindings@GOTPAGE
Lloh26:
	ldr	x9, [x9, _g_bindings@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	ldr	w10, [x9, #12]
	cbz	w10, LBB0_32
; %bb.26:
	mov	w10, #-1
	b	LBB0_28
LBB0_27:                                ;   in Loop: Header=BB0_28 Depth=1
	ldr	w11, [x9, #28]
	add	x9, x9, #16
	cbz	w11, LBB0_32
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9]
	cmp	w11, w19
	b.ne	LBB0_30
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
	mov	w11, #-1
	str	w11, [x9]
LBB0_30:                                ;   in Loop: Header=BB0_28 Depth=1
	ldr	w12, [x9, #4]
	cmp	w12, w19
	b.ne	LBB0_27
; %bb.31:                               ;   in Loop: Header=BB0_28 Depth=1
	stp	w10, w11, [x9]
	b	LBB0_27
LBB0_32:
	mov	w9, #0
	b	LBB0_9
LBB0_33:
	b.eq	LBB0_37
; %bb.34:
	cmp	w0, w19
	b.eq	LBB0_36
; %bb.35:
	ldr	w8, [x24]
	cmn	w8, #1
	b.eq	LBB0_38
LBB0_36:
Lloh28:
	adrp	x20, l_.str@PAGE
Lloh29:
	add	x20, x20, l_.str@PAGEOFF
	mov	x1, x20
	bl	_trap_Key_SetBinding
	ldr	w0, [x24]
	mov	x1, x20
	bl	_trap_Key_SetBinding
	mov	w8, #-1
	stp	w8, w19, [x24]
	b	LBB0_14
LBB0_37:
	str	w19, [x24, #4]
	b	LBB0_14
LBB0_38:
	str	w19, [x24]
	b	LBB0_14
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_qfalse,8,3                     ; @qfalse
	.comm	_s_controls,32,3                ; @s_controls
	.comm	_K_CHAR_FLAG,4,2                ; @K_CHAR_FLAG
	.comm	_menu_out_sound,4,2             ; @menu_out_sound
	.comm	_qtrue,8,3                      ; @qtrue
	.comm	_g_bindings,8,3                 ; @g_bindings
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.no_dead_strip	_Controls_MenuKey
.subsections_via_symbols
