	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MField_KeyDownEvent            ## -- Begin function MField_KeyDownEvent
	.p2align	4, 0x90
_MField_KeyDownEvent:                   ## @MField_KeyDownEvent
	.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	%esi, %ebx
	movq	%rdi, %r15
	movq	_K_INS@GOTPCREL(%rip), %r13
	movq	_K_KP_INS@GOTPCREL(%rip), %r12
	cmpl	%esi, (%r13)
	je	LBB0_2
## %bb.1:
	cmpl	%ebx, (%r12)
	jne	LBB0_4
LBB0_2:
	movq	_K_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_trap_Key_IsDown
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_MField_Paste                   ## TAILCALL
LBB0_4:
	movq	16(%r15), %rdi
	callq	_strlen
	movl	%eax, %r14d
	movq	_K_DEL@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_15
## %bb.5:
	movq	_K_KP_DEL@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_15
## %bb.6:
	movq	_K_RIGHTARROW@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_17
## %bb.7:
	movq	_K_KP_RIGHTARROW@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_17
## %bb.8:
	movq	_K_LEFTARROW@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_22
## %bb.9:
	movq	_K_KP_LEFTARROW@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_22
## %bb.10:
	movq	_K_HOME@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_14
## %bb.11:
	movq	_K_KP_HOME@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_14
## %bb.12:
	movl	%ebx, %edi
	callq	_tolower
	cmpb	$97, %al
	jne	LBB0_26
## %bb.13:
	movq	_K_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_trap_Key_IsDown
	testq	%rax, %rax
	je	LBB0_26
LBB0_14:
	movq	$0, (%r15)
	jmp	LBB0_32
LBB0_15:
	movslq	(%r15), %rax
	cmpl	%eax, %r14d
	jle	LBB0_32
## %bb.16:
	movq	16(%r15), %rcx
	leaq	(%rcx,%rax), %rdi
	leaq	(%rcx,%rax), %rsi
	incq	%rsi
	subl	%eax, %r14d
	movl	%r14d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memmove                        ## TAILCALL
LBB0_17:
	movl	(%r15), %eax
	cmpl	%r14d, %eax
	jge	LBB0_19
## %bb.18:
	incl	%eax
	movl	%eax, (%r15)
LBB0_19:
	movl	4(%r15), %ecx
	movl	8(%r15), %edx
	addl	%ecx, %edx
	cmpl	%edx, %eax
	jl	LBB0_32
## %bb.20:
	cmpl	%r14d, %eax
	jg	LBB0_32
## %bb.21:
	incl	%ecx
	jmp	LBB0_31
LBB0_22:
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_24
## %bb.23:
	decl	%eax
	movl	%eax, (%r15)
LBB0_24:
	movl	4(%r15), %ecx
	cmpl	%ecx, %eax
	jge	LBB0_32
## %bb.25:
	decl	%ecx
	jmp	LBB0_31
LBB0_26:
	movq	_K_END@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_30
## %bb.27:
	movq	_K_KP_END@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_30
## %bb.28:
	movl	%ebx, %edi
	callq	_tolower
	cmpb	$101, %al
	jne	LBB0_33
## %bb.29:
	movq	_K_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_trap_Key_IsDown
	testq	%rax, %rax
	je	LBB0_33
LBB0_30:
	movl	%r14d, (%r15)
	subl	8(%r15), %r14d
	leal	1(%r14), %eax
	xorl	%ecx, %ecx
	cmpl	$-1, %r14d
	cmovgel	%eax, %ecx
LBB0_31:
	movl	%ecx, 4(%r15)
LBB0_32:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_33:
	cmpl	%ebx, (%r13)
	je	LBB0_35
## %bb.34:
	cmpl	%ebx, (%r12)
	jne	LBB0_32
LBB0_35:
	xorl	%eax, %eax
	callq	_trap_Key_GetOverstrikeMode
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_trap_Key_SetOverstrikeMode     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_K_INS,4,2                      ## @K_INS
	.comm	_K_KP_INS,4,2                   ## @K_KP_INS
	.comm	_K_SHIFT,4,2                    ## @K_SHIFT
	.comm	_K_DEL,4,2                      ## @K_DEL
	.comm	_K_KP_DEL,4,2                   ## @K_KP_DEL
	.comm	_K_RIGHTARROW,4,2               ## @K_RIGHTARROW
	.comm	_K_KP_RIGHTARROW,4,2            ## @K_KP_RIGHTARROW
	.comm	_K_LEFTARROW,4,2                ## @K_LEFTARROW
	.comm	_K_KP_LEFTARROW,4,2             ## @K_KP_LEFTARROW
	.comm	_K_HOME,4,2                     ## @K_HOME
	.comm	_K_KP_HOME,4,2                  ## @K_KP_HOME
	.comm	_K_CTRL,4,2                     ## @K_CTRL
	.comm	_K_END,4,2                      ## @K_END
	.comm	_K_KP_END,4,2                   ## @K_KP_END
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MField_KeyDownEvent            ; -- Begin function MField_KeyDownEvent
	.p2align	2
_MField_KeyDownEvent:                   ; @MField_KeyDownEvent
	.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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _K_INS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _K_INS@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh2:
	adrp	x22, _K_KP_INS@GOTPAGE
Lloh3:
	ldr	x22, [x22, _K_KP_INS@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w8, w1
	ccmp	w9, w1, #4, ne
	b.ne	LBB0_3
; %bb.1:
Lloh4:
	adrp	x8, _K_SHIFT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _K_SHIFT@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_trap_Key_IsDown
	cbz	x0, LBB0_3
; %bb.2:
	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
	b	_MField_Paste
LBB0_3:
	ldr	x0, [x19, #16]
	bl	_strlen
	mov	x20, x0
Lloh7:
	adrp	x8, _K_DEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _K_DEL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _K_KP_DEL@GOTPAGE
Lloh11:
	ldr	x9, [x9, _K_KP_DEL@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	w8, w21
	ccmp	w9, w21, #4, ne
	b.ne	LBB0_6
; %bb.4:
	ldrsw	x8, [x19]
	cmp	w20, w8
	b.le	LBB0_27
; %bb.5:
	ldr	x9, [x19, #16]
	add	x0, x9, x8
	add	x1, x0, #1
	sub	w2, w20, w8
	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	_memmove
LBB0_6:
Lloh13:
	adrp	x8, _K_RIGHTARROW@GOTPAGE
Lloh14:
	ldr	x8, [x8, _K_RIGHTARROW@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _K_KP_RIGHTARROW@GOTPAGE
Lloh17:
	ldr	x9, [x9, _K_KP_RIGHTARROW@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w8, w21
	ccmp	w9, w21, #4, ne
	b.ne	LBB0_12
; %bb.7:
	ldr	w8, [x19]
	cmp	w8, w20
	b.ge	LBB0_9
; %bb.8:
	add	w8, w8, #1
	str	w8, [x19]
LBB0_9:
	ldp	w9, w10, [x19, #4]
	add	w10, w10, w9
	cmp	w8, w10
	b.lt	LBB0_27
; %bb.10:
	cmp	w8, w20
	b.gt	LBB0_27
; %bb.11:
	add	w8, w9, #1
	str	w8, [x19, #4]
	b	LBB0_27
LBB0_12:
Lloh19:
	adrp	x8, _K_LEFTARROW@GOTPAGE
Lloh20:
	ldr	x8, [x8, _K_LEFTARROW@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _K_KP_LEFTARROW@GOTPAGE
Lloh23:
	ldr	x9, [x9, _K_KP_LEFTARROW@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	cmp	w8, w21
	ccmp	w9, w21, #4, ne
	b.ne	LBB0_17
; %bb.13:
	ldr	w8, [x19]
	subs	w9, w8, #1
	b.lt	LBB0_15
; %bb.14:
	str	w9, [x19]
	mov	x8, x9
LBB0_15:
	ldr	w9, [x19, #4]
	cmp	w8, w9
	b.ge	LBB0_27
; %bb.16:
	sub	w8, w9, #1
	str	w8, [x19, #4]
	b	LBB0_27
LBB0_17:
Lloh25:
	adrp	x8, _K_HOME@GOTPAGE
Lloh26:
	ldr	x8, [x8, _K_HOME@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_21
; %bb.18:
Lloh28:
	adrp	x8, _K_KP_HOME@GOTPAGE
Lloh29:
	ldr	x8, [x8, _K_KP_HOME@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_21
; %bb.19:
	mov	x0, x21
	bl	_tolower
	cmp	w0, #97
	b.ne	LBB0_22
; %bb.20:
Lloh31:
	adrp	x8, _K_CTRL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _K_CTRL@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	bl	_trap_Key_IsDown
	cbz	x0, LBB0_22
LBB0_21:
	str	xzr, [x19]
	b	LBB0_27
LBB0_22:
Lloh34:
	adrp	x8, _K_END@GOTPAGE
Lloh35:
	ldr	x8, [x8, _K_END@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_26
; %bb.23:
Lloh37:
	adrp	x8, _K_KP_END@GOTPAGE
Lloh38:
	ldr	x8, [x8, _K_KP_END@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_26
; %bb.24:
	mov	x0, x21
	bl	_tolower
	cmp	w0, #101
	b.ne	LBB0_28
; %bb.25:
Lloh40:
	adrp	x8, _K_CTRL@GOTPAGE
Lloh41:
	ldr	x8, [x8, _K_CTRL@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
	bl	_trap_Key_IsDown
	cbz	x0, LBB0_28
LBB0_26:
	ldr	w8, [x19, #8]
	sub	w8, w20, w8
	cmn	w8, #1
	csinc	w8, wzr, w8, lt
	stp	w20, w8, [x19]
LBB0_27:
	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_28:
	ldr	w8, [x23]
	cmp	w8, w21
	b.eq	LBB0_30
; %bb.29:
	ldr	w8, [x22]
	cmp	w8, w21
	b.ne	LBB0_27
LBB0_30:
	bl	_trap_Key_GetOverstrikeMode
	cmp	w0, #0
	cset	w0, eq
	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	_trap_Key_SetOverstrikeMode
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_K_INS,4,2                      ; @K_INS
	.comm	_K_KP_INS,4,2                   ; @K_KP_INS
	.comm	_K_SHIFT,4,2                    ; @K_SHIFT
	.comm	_K_DEL,4,2                      ; @K_DEL
	.comm	_K_KP_DEL,4,2                   ; @K_KP_DEL
	.comm	_K_RIGHTARROW,4,2               ; @K_RIGHTARROW
	.comm	_K_KP_RIGHTARROW,4,2            ; @K_KP_RIGHTARROW
	.comm	_K_LEFTARROW,4,2                ; @K_LEFTARROW
	.comm	_K_KP_LEFTARROW,4,2             ; @K_KP_LEFTARROW
	.comm	_K_HOME,4,2                     ; @K_HOME
	.comm	_K_KP_HOME,4,2                  ; @K_KP_HOME
	.comm	_K_CTRL,4,2                     ; @K_CTRL
	.comm	_K_END,4,2                      ; @K_END
	.comm	_K_KP_END,4,2                   ; @K_KP_END
.subsections_via_symbols
