	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Field_KeyDownEvent             ## -- Begin function Field_KeyDownEvent
	.p2align	4, 0x90
_Field_KeyDownEvent:                    ## @Field_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_K_INS@GOTPCREL(%rip), %r12
	cmpl	%esi, (%r12)
	je	LBB0_2
## %bb.1:
	movq	_K_KP_INS@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_3
LBB0_2:
	movq	_keys@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_K_SHIFT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_3
## %bb.28:
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Field_Paste                    ## TAILCALL
LBB0_3:
	movq	16(%r15), %rdi
	callq	_strlen
	movl	%eax, %r14d
	movq	_K_DEL@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_6
## %bb.4:
	movslq	(%r15), %rax
	cmpl	%eax, %r14d
	jle	LBB0_27
## %bb.5:
	movq	16(%r15), %rcx
	leaq	(%rcx,%rax), %rdi
	leaq	(%rcx,%rax), %rsi
	incq	%rsi
	subl	%eax, %r14d
	movl	%r14d, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memmove                        ## TAILCALL
LBB0_6:
	movq	_K_RIGHTARROW@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_12
## %bb.7:
	movl	(%r15), %eax
	cmpl	%r14d, %eax
	jge	LBB0_9
## %bb.8:
	incl	%eax
	movl	%eax, (%r15)
LBB0_9:
	movl	4(%r15), %ecx
	movl	8(%r15), %edx
	addl	%ecx, %edx
	cmpl	%edx, %eax
	jl	LBB0_27
## %bb.10:
	cmpl	%r14d, %eax
	jg	LBB0_27
## %bb.11:
	incl	%ecx
	movl	%ecx, 4(%r15)
	jmp	LBB0_27
LBB0_12:
	movq	_K_LEFTARROW@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_17
## %bb.13:
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_15
## %bb.14:
	decl	%eax
	movl	%eax, (%r15)
LBB0_15:
	movl	4(%r15), %ecx
	cmpl	%ecx, %eax
	jge	LBB0_27
## %bb.16:
	decl	%ecx
	movl	%ecx, 4(%r15)
	jmp	LBB0_27
LBB0_17:
	movq	_K_HOME@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_20
## %bb.18:
	movl	%ebx, %edi
	callq	_tolower
	cmpb	$97, %al
	jne	LBB0_21
## %bb.19:
	movq	_keys@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_K_CTRL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_21
LBB0_20:
	movl	$0, (%r15)
	jmp	LBB0_27
LBB0_21:
	movq	_K_END@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_24
## %bb.22:
	movl	%ebx, %edi
	callq	_tolower
	cmpb	$101, %al
	jne	LBB0_25
## %bb.23:
	movq	_keys@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_K_CTRL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_25
LBB0_24:
	movl	%r14d, (%r15)
	jmp	LBB0_27
LBB0_25:
	cmpl	%ebx, (%r12)
	jne	LBB0_27
## %bb.26:
	movq	_key_overstrikeMode@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	$0, (%rax)
	sete	%cl
	movl	%ecx, (%rax)
LBB0_27:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_K_INS,4,2                      ## @K_INS
	.comm	_K_KP_INS,4,2                   ## @K_KP_INS
	.comm	_keys,8,3                       ## @keys
	.comm	_K_SHIFT,8,3                    ## @K_SHIFT
	.comm	_K_DEL,4,2                      ## @K_DEL
	.comm	_K_RIGHTARROW,4,2               ## @K_RIGHTARROW
	.comm	_K_LEFTARROW,4,2                ## @K_LEFTARROW
	.comm	_K_HOME,4,2                     ## @K_HOME
	.comm	_K_CTRL,8,3                     ## @K_CTRL
	.comm	_K_END,4,2                      ## @K_END
	.comm	_key_overstrikeMode,4,2         ## @key_overstrikeMode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Field_KeyDownEvent             ; -- Begin function Field_KeyDownEvent
	.p2align	2
_Field_KeyDownEvent:                    ; @Field_KeyDownEvent
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _K_INS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _K_INS@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh2:
	adrp	x9, _K_KP_INS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _K_KP_INS@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w1
	ccmp	w9, w1, #4, ne
	b.ne	LBB0_3
; %bb.1:
Lloh5:
	adrp	x8, _keys@GOTPAGE
Lloh6:
	ldr	x8, [x8, _keys@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _K_SHIFT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _K_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_Field_Paste
LBB0_3:
	ldr	x0, [x19, #16]
	bl	_strlen
	mov	x20, x0
Lloh11:
	adrp	x8, _K_DEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _K_DEL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w8, w21
	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, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_memmove
LBB0_6:
Lloh14:
	adrp	x8, _K_RIGHTARROW@GOTPAGE
Lloh15:
	ldr	x8, [x8, _K_RIGHTARROW@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w8, w21
	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:
Lloh17:
	adrp	x8, _K_LEFTARROW@GOTPAGE
Lloh18:
	ldr	x8, [x8, _K_LEFTARROW@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w8, w21
	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:
Lloh20:
	adrp	x8, _K_HOME@GOTPAGE
Lloh21:
	ldr	x8, [x8, _K_HOME@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_20
; %bb.18:
	mov	x0, x21
	bl	_tolower
	cmp	w0, #97
	b.ne	LBB0_21
; %bb.19:
Lloh23:
	adrp	x8, _keys@GOTPAGE
Lloh24:
	ldr	x8, [x8, _keys@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
Lloh26:
	adrp	x9, _K_CTRL@GOTPAGE
Lloh27:
	ldr	x9, [x9, _K_CTRL@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_21
LBB0_20:
	str	wzr, [x19]
	b	LBB0_27
LBB0_21:
Lloh29:
	adrp	x8, _K_END@GOTPAGE
Lloh30:
	ldr	x8, [x8, _K_END@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_24
; %bb.22:
	mov	x0, x21
	bl	_tolower
	cmp	w0, #101
	b.ne	LBB0_25
; %bb.23:
Lloh32:
	adrp	x8, _keys@GOTPAGE
Lloh33:
	ldr	x8, [x8, _keys@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
Lloh35:
	adrp	x9, _K_CTRL@GOTPAGE
Lloh36:
	ldr	x9, [x9, _K_CTRL@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_25
LBB0_24:
	str	w20, [x19]
	b	LBB0_27
LBB0_25:
	ldr	w8, [x22]
	cmp	w8, w21
	b.ne	LBB0_27
; %bb.26:
Lloh38:
	adrp	x8, _key_overstrikeMode@GOTPAGE
Lloh39:
	ldr	x8, [x8, _key_overstrikeMode@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #0
	cset	w9, eq
	str	w9, [x8]
LBB0_27:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_K_INS,4,2                      ; @K_INS
	.comm	_K_KP_INS,4,2                   ; @K_KP_INS
	.comm	_keys,8,3                       ; @keys
	.comm	_K_SHIFT,8,3                    ; @K_SHIFT
	.comm	_K_DEL,4,2                      ; @K_DEL
	.comm	_K_RIGHTARROW,4,2               ; @K_RIGHTARROW
	.comm	_K_LEFTARROW,4,2                ; @K_LEFTARROW
	.comm	_K_HOME,4,2                     ; @K_HOME
	.comm	_K_CTRL,8,3                     ; @K_CTRL
	.comm	_K_END,4,2                      ; @K_END
	.comm	_key_overstrikeMode,4,2         ; @key_overstrikeMode
.subsections_via_symbols
