	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	cmpl	$130, %esi
	je	LBB0_2
## %bb.1:
	movq	_K_KP_INS@GOTPCREL(%rip), %rax
	cmpl	%esi, (%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.20:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Field_Paste                    ## TAILCALL
LBB0_3:
	movl	%esi, %edi
	callq	_tolower
	movl	%eax, %ebx
	movl	12(%r15), %edi
	callq	_strlen
	movl	%eax, %r14d
	addl	$-128, %ebx
	cmpl	$5, %ebx
	ja	LBB0_14
## %bb.4:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_7:
	movl	(%r15), %eax
	cmpl	%r14d, %eax
	jge	LBB0_14
## %bb.8:
	incl	%eax
	movl	%eax, (%r15)
	jmp	LBB0_14
LBB0_9:
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_14
## %bb.10:
	decl	%eax
	movl	%eax, (%r15)
	jmp	LBB0_14
LBB0_13:
	movq	_key_overstrikeMode@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	$0, (%rax)
	sete	%cl
	movl	%ecx, (%rax)
	jmp	LBB0_14
LBB0_11:
	movl	$0, (%r15)
	jmp	LBB0_14
LBB0_12:
	movl	%r14d, (%r15)
	jmp	LBB0_14
LBB0_5:
	movl	(%r15), %eax
	movl	%r14d, %edx
	subl	%eax, %edx
	jle	LBB0_14
## %bb.6:
	movl	12(%r15), %ecx
	leal	(%rcx,%rax), %edi
	leal	(%rcx,%rax), %esi
	incl	%esi
	callq	_memmove
LBB0_14:
	movl	(%r15), %eax
	movl	4(%r15), %edx
	cmpl	%edx, %eax
	jl	LBB0_18
## %bb.15:
	movl	8(%r15), %ecx
	addl	%ecx, %edx
	cmpl	%edx, %eax
	jl	LBB0_19
## %bb.16:
	cmpl	%r14d, %eax
	jg	LBB0_19
## %bb.17:
	subl	%ecx, %eax
	incl	%eax
LBB0_18:
	movl	%eax, 4(%r15)
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_9
	.long	L0_0_set_13
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.comm	_K_KP_INS,4,2                   ## @K_KP_INS
	.comm	_keys,8,3                       ## @keys
	.comm	_K_SHIFT,8,3                    ## @K_SHIFT
	.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	x19, x0
	cmp	w1, #130
	b.eq	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _K_KP_INS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _K_KP_INS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _keys@GOTPAGE
Lloh4:
	ldr	x8, [x8, _keys@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _K_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _K_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_4
; %bb.3:
	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_4:
	mov	x0, x1
	bl	_tolower
	mov	x21, x0
	ldr	w0, [x19, #12]
	bl	_strlen
	mov	x20, x0
	sub	w8, w21, #128
	cmp	w8, #5
	b.hi	LBB0_15
; %bb.5:
Lloh9:
	adrp	x9, lJTI0_0@PAGE
Lloh10:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_6
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_6:
	ldr	w8, [x19]
	cmp	w8, w20
	b.ge	LBB0_15
; %bb.7:
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_15
LBB0_8:
	ldr	w8, [x19]
	subs	w8, w8, #1
	b.lt	LBB0_15
; %bb.9:
	str	w8, [x19]
	b	LBB0_15
LBB0_10:
Lloh11:
	adrp	x8, _key_overstrikeMode@GOTPAGE
Lloh12:
	ldr	x8, [x8, _key_overstrikeMode@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #0
	cset	w9, eq
	str	w9, [x8]
	b	LBB0_15
LBB0_11:
	str	wzr, [x19]
	b	LBB0_15
LBB0_12:
	str	w20, [x19]
	b	LBB0_15
LBB0_13:
	ldr	w8, [x19]
	subs	w2, w20, w8
	b.le	LBB0_15
; %bb.14:
	ldr	w9, [x19, #12]
	add	w0, w9, w8
	add	w1, w0, #1
	bl	_memmove
LBB0_15:
	ldp	w8, w10, [x19]
	cmp	w8, w10
	b.lt	LBB0_19
; %bb.16:
	ldr	w9, [x19, #8]
	add	w10, w9, w10
	cmp	w8, w10
	b.lt	LBB0_20
; %bb.17:
	cmp	w8, w20
	b.gt	LBB0_20
; %bb.18:
	sub	w8, w8, w9
	add	w8, w8, #1
LBB0_19:
	str	w8, [x19, #4]
LBB0_20:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_10-LBB0_6)>>2
	.byte	(LBB0_11-LBB0_6)>>2
	.byte	(LBB0_12-LBB0_6)>>2
	.byte	(LBB0_13-LBB0_6)>>2
                                        ; -- End function
	.comm	_K_KP_INS,4,2                   ; @K_KP_INS
	.comm	_keys,8,3                       ; @keys
	.comm	_K_SHIFT,8,3                    ; @K_SHIFT
	.comm	_key_overstrikeMode,4,2         ; @key_overstrikeMode
.subsections_via_symbols
