	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_on_key_esc                     ## -- Begin function on_key_esc
	.p2align	4, 0x90
_on_key_esc:                            ## @on_key_esc
	.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	%rdi, %rbx
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_nodelay
	movq	_FALSE@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_keypad
	movq	%rbx, %rdi
	callq	_wgetch
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_wgetch
	movl	%eax, %r15d
	movq	_ERR@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_wgetch
	cmpl	(%r12), %eax
	jne	LBB0_1
## %bb.2:
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_nodelay
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_keypad
	movq	_KEY_ESC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r12), %eax
	cmpl	%ecx, %r14d
	jne	LBB0_5
## %bb.3:
	cmpl	%eax, %r15d
	jne	LBB0_5
## %bb.4:
	movl	%r14d, %ebx
	jmp	LBB0_9
LBB0_5:
	movl	$-1, %ebx
	cmpl	%eax, %r14d
	je	LBB0_9
## %bb.6:
	cmpl	%ecx, %r14d
	je	LBB0_9
## %bb.7:
	cmpl	%eax, %r15d
	jne	LBB0_9
## %bb.8:
	movl	%r14d, %edi
	callq	_ungetch
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_ERR,4,2                        ## @ERR
	.comm	_KEY_ESC,4,2                    ## @KEY_ESC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_on_key_esc                     ; -- Begin function on_key_esc
	.p2align	2
_on_key_esc:                            ; @on_key_esc
	.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	x20, x0
Lloh0:
	adrp	x22, _TRUE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _TRUE@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_nodelay
Lloh2:
	adrp	x23, _FALSE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _FALSE@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_keypad
	mov	x0, x20
	bl	_wgetch
	mov	x19, x0
	mov	x0, x20
	bl	_wgetch
	mov	x21, x0
Lloh4:
	adrp	x24, _ERR@GOTPAGE
Lloh5:
	ldr	x24, [x24, _ERR@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_wgetch
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_1
; %bb.2:
	ldr	w1, [x23]
	mov	x0, x20
	bl	_nodelay
	ldr	w1, [x22]
	mov	x0, x20
	bl	_keypad
Lloh6:
	adrp	x8, _KEY_ESC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KEY_ESC@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x24]
	cmp	w19, w8
	ccmp	w21, w9, #0, eq
	b.eq	LBB0_6
; %bb.3:
	cmp	w19, w9
	ccmp	w19, w8, #4, ne
	ccmp	w21, w9, #0, ne
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_ungetch
LBB0_5:
	mov	w19, #-1
LBB0_6:
	mov	x0, 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
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_ERR,4,2                        ; @ERR
	.comm	_KEY_ESC,4,2                    ; @KEY_ESC
.subsections_via_symbols
