	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Item_Bind_HandleKey            ## -- Begin function Item_Bind_HandleKey
	.p2align	4, 0x90
_Item_Bind_HandleKey:                   ## @Item_Bind_HandleKey
	.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
	movq	%rdx, %rbx
	movl	%esi, %r15d
	movq	%rdi, %r14
	addq	$4, %rdi
	movq	_DC@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movl	8(%rax), %edx
	movl	12(%rax), %esi
	callq	_Rect_ContainsPoint
	movq	_g_waitingForKey@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	testq	%rcx, %rcx
	jne	LBB0_6
## %bb.2:
	testq	%rbx, %rbx
	je	LBB0_39
## %bb.3:
	movq	_K_MOUSE1@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_5
## %bb.4:
	movq	_K_ENTER@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_39
LBB0_5:
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	movq	_g_bindItem@GOTPCREL(%rip), %rax
	movq	%r14, (%rax)
	jmp	LBB0_39
LBB0_6:
	testq	%rcx, %rcx
	je	LBB0_39
## %bb.7:
	movq	_g_bindItem@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_39
## %bb.8:
	movq	_K_CHAR_FLAG@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	jne	LBB0_39
## %bb.9:
	cmpl	$127, %r15d
	jg	LBB0_12
## %bb.10:
	cmpl	$-1, %r15d
	je	LBB0_21
## %bb.11:
	cmpl	$96, %r15d
	je	LBB0_39
	jmp	LBB0_14
LBB0_12:
	cmpl	$128, %r15d
	je	LBB0_38
## %bb.13:
	cmpl	$129, %r15d
	jne	LBB0_14
## %bb.27:
	movl	(%r14), %edi
	callq	_BindingIDFromName
	cmpl	$-1, %eax
	je	LBB0_29
## %bb.28:
	movq	_g_bindings@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cltq
	movq	$-1, (%rcx,%rax,8)
LBB0_29:
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_Controls_SetConfig
	movq	_qfalse@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	movq	$0, (%rbx)
	jmp	LBB0_39
LBB0_14:
	movq	_g_bindCount@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_21
## %bb.15:
	movq	_g_bindings@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edx, %edx
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_16 Depth=1
	incq	%rdx
	movslq	(%rax), %rsi
	cmpq	%rsi, %rdx
	jge	LBB0_21
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	leaq	(%rdx,%rdx), %rsi
	movl	4(%rcx,%rdx,8), %edi
	cmpl	%r15d, %edi
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	$-1, 4(%rcx,%rsi,4)
	movl	$-1, %edi
LBB0_18:                                ##   in Loop: Header=BB0_16 Depth=1
	cmpl	%r15d, (%rcx,%rdx,8)
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	%edi, (%rcx,%rsi,4)
	movl	$-1, 4(%rcx,%rsi,4)
	jmp	LBB0_20
LBB0_21:
	movl	(%r14), %edi
	callq	_BindingIDFromName
	cmpl	$-1, %eax
	je	LBB0_37
## %bb.22:
	movq	_g_bindings@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movslq	%eax, %rbx
	movl	(%rcx,%rbx,8), %edi
	cmpl	$-1, %r15d
	je	LBB0_23
## %bb.30:
	cmpl	$-1, %edi
	je	LBB0_31
## %bb.32:
	cmpl	%r15d, %edi
	je	LBB0_35
## %bb.33:
	cmpl	$-1, 4(%rcx,%rbx,8)
	je	LBB0_34
LBB0_35:
	movq	(%r13), %rax
	leaq	L_.str(%rip), %rsi
	callq	*(%rax)
	movq	(%r13), %rax
	movq	(%r14), %rcx
	movl	4(%rcx,%rbx,8), %edi
	leaq	L_.str(%rip), %rsi
	callq	*(%rax)
	movq	(%r14), %rax
	movl	%r15d, (%rax,%rbx,8)
	jmp	LBB0_36
LBB0_23:
	cmpl	$-1, %edi
	je	LBB0_25
## %bb.24:
	movq	(%r13), %rax
	leaq	L_.str(%rip), %rsi
	callq	*(%rax)
	movq	(%r14), %rcx
	movl	$-1, (%rcx,%rbx,8)
LBB0_25:
	movl	4(%rcx,%rbx,8), %edi
	cmpl	$-1, %edi
	je	LBB0_37
## %bb.26:
	movq	(%r13), %rax
	leaq	L_.str(%rip), %rsi
	callq	*(%rax)
	movq	(%r14), %rax
LBB0_36:
	movl	$-1, 4(%rax,%rbx,8)
	jmp	LBB0_37
LBB0_31:
	movl	%r15d, (%rcx,%rbx,8)
	jmp	LBB0_37
LBB0_34:
	movl	%r15d, 4(%rcx,%rbx,8)
LBB0_37:
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_Controls_SetConfig
LBB0_38:
	movq	_qfalse@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
LBB0_39:
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DC,8,3                         ## @DC
	.comm	_g_waitingForKey,8,3            ## @g_waitingForKey
	.comm	_K_MOUSE1,4,2                   ## @K_MOUSE1
	.comm	_K_ENTER,4,2                    ## @K_ENTER
	.comm	_qtrue,8,3                      ## @qtrue
	.comm	_g_bindItem,8,3                 ## @g_bindItem
	.comm	_K_CHAR_FLAG,4,2                ## @K_CHAR_FLAG
	.comm	_qfalse,8,3                     ## @qfalse
	.comm	_g_bindings,8,3                 ## @g_bindings
	.comm	_g_bindCount,4,2                ## @g_bindCount
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Item_Bind_HandleKey            ; -- Begin function Item_Bind_HandleKey
	.p2align	2
_Item_Bind_HandleKey:                   ; @Item_Bind_HandleKey
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	add	x0, x0, #4
Lloh0:
	adrp	x24, _DC@GOTPAGE
Lloh1:
	ldr	x24, [x24, _DC@GOTPAGEOFF]
	ldr	x8, [x24]
	ldp	w2, w1, [x8, #8]
	bl	_Rect_ContainsPoint
Lloh2:
	adrp	x23, _g_waitingForKey@GOTPAGE
Lloh3:
	ldr	x23, [x23, _g_waitingForKey@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, #0
	ccmp	x8, #0, #0, ne
Lloh4:
	adrp	x22, _qtrue@GOTPAGE
Lloh5:
	ldr	x22, [x22, _qtrue@GOTPAGEOFF]
	b.eq	LBB0_6
; %bb.1:
Lloh6:
	adrp	x21, _g_bindItem@GOTPAGE
Lloh7:
	ldr	x21, [x21, _g_bindItem@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, #0
	ccmp	x9, #0, #4, ne
	b.eq	LBB0_36
; %bb.2:
Lloh8:
	adrp	x8, _K_CHAR_FLAG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _K_CHAR_FLAG@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w19
	b.ne	LBB0_36
; %bb.3:
	cmp	w19, #127
	b.gt	LBB0_9
; %bb.4:
	cmn	w19, #1
	b.eq	LBB0_21
; %bb.5:
	cmp	w19, #96
	b.eq	LBB0_36
	b	LBB0_14
LBB0_6:
	cbz	x21, LBB0_36
; %bb.7:
Lloh11:
	adrp	x8, _K_MOUSE1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _K_MOUSE1@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _K_ENTER@GOTPAGE
Lloh15:
	ldr	x9, [x9, _K_ENTER@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w8, w19
	ccmp	w9, w19, #4, ne
	b.ne	LBB0_36
; %bb.8:
	ldr	x8, [x22]
	str	x8, [x23]
Lloh17:
	adrp	x8, _g_bindItem@GOTPAGE
Lloh18:
	ldr	x8, [x8, _g_bindItem@GOTPAGEOFF]
Lloh19:
	str	x20, [x8]
	b	LBB0_36
LBB0_9:
	cmp	w19, #128
	b.eq	LBB0_35
; %bb.10:
	cmp	w19, #129
	b.ne	LBB0_14
; %bb.11:
	ldr	w0, [x20]
	bl	_BindingIDFromName
	cmn	w0, #1
	b.eq	LBB0_13
; %bb.12:
Lloh20:
	adrp	x8, _g_bindings@GOTPAGE
Lloh21:
	ldr	x8, [x8, _g_bindings@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x8, w0, sxtw #3]
LBB0_13:
	ldr	x0, [x22]
	bl	_Controls_SetConfig
Lloh23:
	adrp	x8, _qfalse@GOTPAGE
Lloh24:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	str	x8, [x23]
	str	xzr, [x21]
	b	LBB0_36
LBB0_14:
Lloh26:
	adrp	x8, _g_bindCount@GOTPAGE
Lloh27:
	ldr	x8, [x8, _g_bindCount@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_21
; %bb.15:
	mov	x9, #0
Lloh28:
	adrp	x10, _g_bindings@GOTPAGE
Lloh29:
	ldr	x10, [x10, _g_bindings@GOTPAGEOFF]
Lloh30:
	ldr	x10, [x10]
	add	x10, x10, #4
	mov	w11, #-1
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	add	x9, x9, #1
	ldrsw	x12, [x8]
	add	x10, x10, #8
	cmp	x9, x12
	b.ge	LBB0_21
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x10]
	cmp	w12, w19
	b.ne	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	w12, #-1
	str	w12, [x10]
LBB0_19:                                ;   in Loop: Header=BB0_17 Depth=1
	ldur	w13, [x10, #-4]
	cmp	w13, w19
	b.ne	LBB0_16
; %bb.20:                               ;   in Loop: Header=BB0_17 Depth=1
	stp	w12, w11, [x10, #-4]
	b	LBB0_16
LBB0_21:
	ldr	w0, [x20]
	bl	_BindingIDFromName
                                        ; kill: def $w0 killed $w0 def $x0
	cmn	w0, #1
	b.eq	LBB0_34
; %bb.22:
Lloh31:
	adrp	x21, _g_bindings@GOTPAGE
Lloh32:
	ldr	x21, [x21, _g_bindings@GOTPAGEOFF]
	ldr	x8, [x21]
	sxtw	x25, w0
	add	x9, x8, w0, sxtw #3
	ldr	w0, [x9]
	cmn	w19, #1
	b.eq	LBB0_27
; %bb.23:
	cmn	w0, #1
	b.eq	LBB0_32
; %bb.24:
	cmp	w0, w19
	b.eq	LBB0_26
; %bb.25:
	add	x8, x8, x25, lsl #3
	ldr	w9, [x8, #4]!
	cmn	w9, #1
	b.eq	LBB0_33
LBB0_26:
	ldr	x8, [x24]
	ldr	x8, [x8]
Lloh33:
	adrp	x20, l_.str@PAGE
Lloh34:
	add	x20, x20, l_.str@PAGEOFF
	mov	x1, x20
	blr	x8
	ldr	x8, [x24]
	ldr	x8, [x8]
	ldr	x9, [x21]
	lsl	x24, x25, #3
	add	x9, x9, x24
	ldr	w0, [x9, #4]
	mov	x1, x20
	blr	x8
	ldr	x8, [x21]
	add	x8, x8, x24
	mov	w9, #-1
	str	w19, [x8]
	b	LBB0_31
LBB0_27:
	cmn	w0, #1
	b.eq	LBB0_29
; %bb.28:
	ldr	x8, [x24]
	ldr	x8, [x8]
Lloh35:
	adrp	x1, l_.str@PAGE
Lloh36:
	add	x1, x1, l_.str@PAGEOFF
	blr	x8
	ldr	x8, [x21]
	lsl	x9, x25, #3
	mov	w10, #-1
	str	w10, [x8, x9]
LBB0_29:
	add	x8, x8, x25, lsl #3
	ldr	w0, [x8, #4]
	cmn	w0, #1
	b.eq	LBB0_34
; %bb.30:
	ldr	x8, [x24]
	ldr	x8, [x8]
Lloh37:
	adrp	x1, l_.str@PAGE
Lloh38:
	add	x1, x1, l_.str@PAGEOFF
	blr	x8
	ldr	x8, [x21]
	add	x8, x8, x25, lsl #3
	mov	w9, #-1
LBB0_31:
	str	w9, [x8, #4]
	b	LBB0_34
LBB0_32:
	str	w19, [x9]
	b	LBB0_34
LBB0_33:
	str	w19, [x8]
LBB0_34:
	ldr	x0, [x22]
	bl	_Controls_SetConfig
LBB0_35:
Lloh39:
	adrp	x8, _qfalse@GOTPAGE
Lloh40:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
	str	x8, [x23]
LBB0_36:
	ldr	x0, [x22]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_DC,8,3                         ; @DC
	.comm	_g_waitingForKey,8,3            ; @g_waitingForKey
	.comm	_K_MOUSE1,4,2                   ; @K_MOUSE1
	.comm	_K_ENTER,4,2                    ; @K_ENTER
	.comm	_qtrue,8,3                      ; @qtrue
	.comm	_g_bindItem,8,3                 ; @g_bindItem
	.comm	_K_CHAR_FLAG,4,2                ; @K_CHAR_FLAG
	.comm	_qfalse,8,3                     ; @qfalse
	.comm	_g_bindings,8,3                 ; @g_bindings
	.comm	_g_bindCount,4,2                ; @g_bindCount
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

.subsections_via_symbols
