	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vk2ascii
_vk2ascii:                              ## @vk2ascii
	.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
	subq	$1048, %rsp                     ## imm = 0x418
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_GetKeyboardLayout
	movl	%eax, %r15d
	leaq	-1056(%rbp), %rdi
	callq	_GetKeyboardState
	testl	%eax, %eax
	je	LBB0_13
## %bb.1:
	xorl	%ebx, %ebx
	movl	%r14d, %edi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_MapVirtualKeyEx
	movw	$0, -1058(%rbp)
	leaq	-1056(%rbp), %rdx
	leaq	-1058(%rbp), %rcx
	movl	%r14d, %edi
	movl	%eax, %esi
	xorl	%r8d, %r8d
	movl	%r15d, %r9d
	callq	_ToAsciiEx
	testq	%rax, %rax
	jle	LBB0_13
## %bb.2:
	movzwl	-1058(%rbp), %eax
	movl	%eax, %ecx
	addl	$-97, %ecx
	cmpw	$25, %cx
	ja	LBB0_4
## %bb.3:
	addl	$-32, %eax
	movw	%ax, -1058(%rbp)
LBB0_4:
	addl	$-65, %r14d
	cmpl	$25, %r14d
	ja	LBB0_8
## %bb.5:
	movq	_CTRL_A@GOTPCREL(%rip), %rcx
	cmpw	(%rcx), %ax
	jb	LBB0_8
## %bb.6:
	movq	_CTRL_Z@GOTPCREL(%rip), %rcx
	cmpw	(%rcx), %ax
	ja	LBB0_8
## %bb.7:
	movq	_CTRL_FLAG@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_8:
	movq	_VK_MENU@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_GetAsyncKeyState
	testq	%rax, %rax
	js	LBB0_10
## %bb.9:
	movzwl	-1058(%rbp), %eax
	jmp	LBB0_12
LBB0_10:
	movq	_ALT_FLAG@GOTPCREL(%rip), %rcx
	movzwl	-1058(%rbp), %eax
LBB0_11:
	orw	(%rcx), %ax
LBB0_12:
	movzwl	%ax, %ebx
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	movl	%ebx, %eax
	addq	$1048, %rsp                     ## imm = 0x418
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CTRL_A,2,1                     ## @CTRL_A
	.comm	_CTRL_Z,2,1                     ## @CTRL_Z
	.comm	_CTRL_FLAG,2,1                  ## @CTRL_FLAG
	.comm	_VK_MENU,4,2                    ## @VK_MENU
	.comm	_ALT_FLAG,2,1                   ## @ALT_FLAG
	.no_dead_strip	_vk2ascii
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vk2ascii
_vk2ascii:                              ; @vk2ascii
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -40
	.cfi_offset w28, -48
	sub	sp, sp, #1040
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	mov	w0, #0
	bl	_GetKeyboardLayout
	mov	x20, x0
	add	x0, sp, #8
	bl	_GetKeyboardState
	cbz	w0, LBB0_14
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_MapVirtualKeyEx
	mov	x1, x0
	strh	wzr, [sp, #6]
	add	x2, sp, #8
	add	x3, sp, #6
	mov	x0, x19
	mov	w4, #0
	mov	x5, x20
	bl	_ToAsciiEx
	cmp	x0, #1
	b.lt	LBB0_10
; %bb.2:
	ldrh	w8, [sp, #6]
	sub	w9, w8, #97
	cmp	w9, #25
	b.hi	LBB0_4
; %bb.3:
	sub	w8, w8, #32
	strh	w8, [sp, #6]
LBB0_4:
	sub	w9, w19, #65
	cmp	w9, #25
	b.hi	LBB0_8
; %bb.5:
Lloh3:
	adrp	x9, _CTRL_A@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CTRL_A@GOTPAGEOFF]
	ldrh	w9, [x9]
	cmp	w9, w8, uxth
	b.hi	LBB0_8
; %bb.6:
Lloh5:
	adrp	x9, _CTRL_Z@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CTRL_Z@GOTPAGEOFF]
	ldrh	w9, [x9]
	cmp	w9, w8, uxth
	b.lo	LBB0_8
; %bb.7:
Lloh7:
	adrp	x9, _CTRL_FLAG@GOTPAGE
Lloh8:
	ldr	x9, [x9, _CTRL_FLAG@GOTPAGEOFF]
	ldrh	w9, [x9]
	b	LBB0_12
LBB0_8:
Lloh9:
	adrp	x8, _VK_MENU@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VK_MENU@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_GetAsyncKeyState
	tbnz	x0, #63, LBB0_11
; %bb.9:
	ldrh	w8, [sp, #6]
	b	LBB0_13
LBB0_10:
	mov	w0, #0
	b	LBB0_14
LBB0_11:
Lloh12:
	adrp	x8, _ALT_FLAG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ALT_FLAG@GOTPAGEOFF]
	ldrh	w8, [x8]
	ldrh	w9, [sp, #6]
LBB0_12:
	orr	w8, w9, w8
LBB0_13:
	and	w0, w8, #0xffff
LBB0_14:
	ldur	x8, [x29, #-40]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	add	sp, sp, #1040
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_CTRL_A,2,1                     ; @CTRL_A
	.comm	_CTRL_Z,2,1                     ; @CTRL_Z
	.comm	_CTRL_FLAG,2,1                  ; @CTRL_FLAG
	.comm	_VK_MENU,4,2                    ; @VK_MENU
	.comm	_ALT_FLAG,2,1                   ; @ALT_FLAG
	.no_dead_strip	_vk2ascii
.subsections_via_symbols
