	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function check_keypad
LCPI0_0:
	.quad	2147483648                      ## 0x80000000
	.quad	2147483648                      ## 0x80000000
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_check_keypad:                          ## @check_keypad
	.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
	subq	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_key_a1@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_VALID_STRING
	testq	%rax, %rax
	je	LBB0_42
## %bb.1:
	movq	_key_a3@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_VALID_STRING
	testq	%rax, %rax
	je	LBB0_42
## %bb.2:
	movq	_key_b2@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_VALID_STRING
	testq	%rax, %rax
	je	LBB0_42
## %bb.3:
	movq	_key_c1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_VALID_STRING
	testq	%rax, %rax
	je	LBB0_42
## %bb.4:
	movq	_key_c3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_VALID_STRING
	testq	%rax, %rax
	je	LBB0_42
## %bb.5:
	movq	%rsp, -144(%rbp)                ## 8-byte Spill
	movq	_MAX_KP@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	incl	%eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movl	(%r14), %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movl	(%r15), %edi
	callq	_keypad_final
	movb	%al, (%rbx)
	movl	(%r12), %edi
	callq	_keypad_final
	movb	%al, 1(%rbx)
	movl	(%r13), %edi
	callq	_keypad_final
	movb	%al, 2(%rbx)
	movq	_key_c1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_keypad_final
	movb	%al, 3(%rbx)
	movq	_key_c3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_keypad_final
	movb	%al, 4(%rbx)
	movb	$0, 5(%rbx)
	movq	%rbx, %rdi
	callq	_strlen
	xorl	%edi, %edi
	movq	_MAX_KP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	setle	%dil
	callq	_assert
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_60
## %bb.6:
	movl	(%r15), %edi
	callq	_keypad_index
	movq	%rax, %r15
	movq	%rax, (%r14)
	movl	(%r12), %edi
	callq	_keypad_index
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	movq	%rax, 8(%r14)
	movl	(%r13), %edi
	callq	_keypad_index
	movq	%rax, -168(%rbp)                ## 8-byte Spill
	movq	%rax, 16(%r14)
	movq	_key_c1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_keypad_index
	movq	%rax, -160(%rbp)                ## 8-byte Spill
	movq	%rax, 24(%r14)
	movq	_key_c3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_keypad_index
	movq	%rax, -152(%rbp)                ## 8-byte Spill
	movq	%rax, 32(%r14)
	movq	_MAX_KP@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	testl	%r9d, %r9d
	jle	LBB0_63
## %bb.7:
	testq	%r15, %r15
	movq	-144(%rbp), %r8                 ## 8-byte Reload
	js	LBB0_11
## %bb.8:
	movl	$1, %ecx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rcx, %r9
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	$0, (%r14,%rcx,8)
	leaq	1(%rcx), %rcx
	jns	LBB0_9
LBB0_11:
	movq	%r8, %rsp
	jmp	LBB0_61
LBB0_42:
	movl	(%r15), %edi
	callq	_VALID_STRING
	testq	%rax, %rax
	jne	LBB0_47
## %bb.43:
	movq	_key_a3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_VALID_STRING
	testq	%rax, %rax
	jne	LBB0_47
## %bb.44:
	movq	_key_b2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_VALID_STRING
	testq	%rax, %rax
	jne	LBB0_47
## %bb.45:
	movq	_key_c1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_VALID_STRING
	testq	%rax, %rax
	jne	LBB0_47
## %bb.46:
	movq	_key_c3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_VALID_STRING
	testq	%rax, %rax
	je	LBB0_59
LBB0_47:
	movb	$0, -128(%rbp)
	movl	(%r15), %edi
	callq	_keypad_index
	testq	%rax, %rax
	js	LBB0_49
## %bb.48:
	leaq	L_.str.1(%rip), %rsi
	leaq	-128(%rbp), %rdi
	movl	$80, %edx
	callq	__nc_STRCAT
LBB0_49:
	movq	_key_a3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_keypad_index
	testq	%rax, %rax
	js	LBB0_51
## %bb.50:
	leaq	L_.str.2(%rip), %rsi
	leaq	-128(%rbp), %rdi
	movl	$80, %edx
	callq	__nc_STRCAT
LBB0_51:
	movq	_key_b2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_keypad_index
	testq	%rax, %rax
	js	LBB0_53
## %bb.52:
	leaq	L_.str.3(%rip), %rsi
	leaq	-128(%rbp), %rdi
	movl	$80, %edx
	callq	__nc_STRCAT
LBB0_53:
	movq	_key_c1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_keypad_index
	testq	%rax, %rax
	js	LBB0_55
## %bb.54:
	leaq	L_.str.4(%rip), %rsi
	leaq	-128(%rbp), %rdi
	movl	$80, %edx
	callq	__nc_STRCAT
LBB0_55:
	movq	_key_c3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_keypad_index
	testq	%rax, %rax
	js	LBB0_57
## %bb.56:
	leaq	L_.str.5(%rip), %rsi
	leaq	-128(%rbp), %rdi
	movl	$80, %edx
	callq	__nc_STRCAT
LBB0_57:
	cmpb	$0, -128(%rbp)
	je	LBB0_59
## %bb.58:
	leaq	L_.str.7(%rip), %rdi
	leaq	-128(%rbp), %rsi
	callq	__nc_warning
LBB0_59:
	movq	_key_ic@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_key_dc@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ANDMISSING
LBB0_61:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_64
## %bb.62:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_60:
	movq	-144(%rbp), %rsp                ## 8-byte Reload
	jmp	LBB0_61
LBB0_63:
	movb	$0, -128(%rbp)
LBB0_40:
	leaq	L_.str.6(%rip), %rdi
	leaq	-128(%rbp), %rsi
	callq	__nc_warning
	movq	-144(%rbp), %r8                 ## 8-byte Reload
LBB0_41:
	movq	%r8, %rsp
	jmp	LBB0_59
LBB0_12:
	xorl	%esi, %esi
	cmpl	$2, %r9d
	jl	LBB0_25
## %bb.13:
	xorl	%esi, %esi
	cmpq	%r15, -136(%rbp)                ## 8-byte Folded Reload
	setg	%sil
	cmpl	$2, %r9d
	je	LBB0_25
## %bb.14:
	leaq	-2(%r9), %rdx
	movl	$2, %ecx
	cmpq	$4, %rdx
	jae	LBB0_16
## %bb.15:
	movq	-136(%rbp), %rdx                ## 8-byte Reload
	jmp	LBB0_24
LBB0_16:
	movq	%rdx, %rcx
	andq	$-4, %rcx
	movd	%esi, %xmm10
	movq	-136(%rbp), %xmm1               ## 8-byte Folded Reload
                                        ## xmm1 = mem[0],zero
	pshufd	$68, %xmm1, %xmm9               ## xmm9 = xmm1[0,1,0,1]
	leaq	-4(%rcx), %rsi
	movq	%rsi, %rbx
	shrq	$2, %rbx
	incq	%rbx
	testq	%rsi, %rsi
	je	LBB0_17
## %bb.18:
	movq	%rbx, %rsi
	andq	$-2, %rsi
	pxor	%xmm1, %xmm1
	movl	$2, %edi
	movdqa	LCPI0_0(%rip), %xmm8            ## xmm8 = [2147483648,2147483648]
	movdqa	%xmm9, %xmm6
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movdqa	(%r14,%rdi,8), %xmm3
	movdqa	16(%r14,%rdi,8), %xmm5
	movdqa	32(%r14,%rdi,8), %xmm4
	movdqa	48(%r14,%rdi,8), %xmm9
	movdqa	%xmm3, %xmm7
	palignr	$8, %xmm6, %xmm7                ## xmm7 = xmm6[8,9,10,11,12,13,14,15],xmm7[0,1,2,3,4,5,6,7]
	movdqa	%xmm5, %xmm6
	palignr	$8, %xmm3, %xmm6                ## xmm6 = xmm3[8,9,10,11,12,13,14,15],xmm6[0,1,2,3,4,5,6,7]
	pxor	%xmm8, %xmm3
	pxor	%xmm8, %xmm7
	movdqa	%xmm3, %xmm2
	pcmpgtd	%xmm7, %xmm2
	pshufd	$232, %xmm2, %xmm0              ## xmm0 = xmm2[0,2,2,3]
	pcmpeqd	%xmm3, %xmm7
	pshufd	$253, %xmm7, %xmm3              ## xmm3 = xmm7[1,3,3,3]
	pand	%xmm0, %xmm3
	pshufd	$253, %xmm2, %xmm0              ## xmm0 = xmm2[1,3,3,3]
	por	%xmm3, %xmm0
	psubd	%xmm0, %xmm10
	movdqa	%xmm4, %xmm0
	palignr	$8, %xmm5, %xmm0                ## xmm0 = xmm5[8,9,10,11,12,13,14,15],xmm0[0,1,2,3,4,5,6,7]
	pxor	%xmm8, %xmm5
	pxor	%xmm8, %xmm6
	movdqa	%xmm5, %xmm2
	pcmpgtd	%xmm6, %xmm2
	pshufd	$232, %xmm2, %xmm3              ## xmm3 = xmm2[0,2,2,3]
	pcmpeqd	%xmm5, %xmm6
	pshufd	$253, %xmm6, %xmm5              ## xmm5 = xmm6[1,3,3,3]
	pand	%xmm3, %xmm5
	pshufd	$253, %xmm2, %xmm2              ## xmm2 = xmm2[1,3,3,3]
	por	%xmm5, %xmm2
	psubd	%xmm2, %xmm1
	movdqa	%xmm9, %xmm2
	palignr	$8, %xmm4, %xmm2                ## xmm2 = xmm4[8,9,10,11,12,13,14,15],xmm2[0,1,2,3,4,5,6,7]
	pxor	%xmm8, %xmm4
	pxor	%xmm8, %xmm0
	movdqa	%xmm4, %xmm3
	pcmpgtd	%xmm0, %xmm3
	pshufd	$232, %xmm3, %xmm5              ## xmm5 = xmm3[0,2,2,3]
	pcmpeqd	%xmm4, %xmm0
	pshufd	$253, %xmm0, %xmm0              ## xmm0 = xmm0[1,3,3,3]
	pand	%xmm5, %xmm0
	pshufd	$253, %xmm3, %xmm3              ## xmm3 = xmm3[1,3,3,3]
	por	%xmm0, %xmm3
	psubd	%xmm3, %xmm10
	movdqa	%xmm9, %xmm0
	pxor	%xmm8, %xmm0
	pxor	%xmm8, %xmm2
	movdqa	%xmm0, %xmm3
	pcmpgtd	%xmm2, %xmm3
	pshufd	$232, %xmm3, %xmm4              ## xmm4 = xmm3[0,2,2,3]
	pcmpeqd	%xmm0, %xmm2
	pshufd	$253, %xmm2, %xmm0              ## xmm0 = xmm2[1,3,3,3]
	pand	%xmm4, %xmm0
	pshufd	$253, %xmm3, %xmm2              ## xmm2 = xmm3[1,3,3,3]
	por	%xmm0, %xmm2
	psubd	%xmm2, %xmm1
	addq	$8, %rdi
	movdqa	%xmm9, %xmm6
	addq	$-2, %rsi
	jne	LBB0_19
	jmp	LBB0_20
LBB0_17:
	pxor	%xmm1, %xmm1
	movl	$2, %edi
LBB0_20:
	testb	$1, %bl
	je	LBB0_22
## %bb.21:
	movdqa	(%r14,%rdi,8), %xmm3
	movdqa	16(%r14,%rdi,8), %xmm5
	movdqa	%xmm3, %xmm4
	palignr	$8, %xmm9, %xmm4                ## xmm4 = xmm9[8,9,10,11,12,13,14,15],xmm4[0,1,2,3,4,5,6,7]
	movdqa	%xmm5, %xmm0
	movdqa	%xmm5, %xmm9
	palignr	$8, %xmm3, %xmm5                ## xmm5 = xmm3[8,9,10,11,12,13,14,15],xmm5[0,1,2,3,4,5,6,7]
	movdqa	LCPI0_0(%rip), %xmm2            ## xmm2 = [2147483648,2147483648]
	pxor	%xmm2, %xmm3
	pxor	%xmm2, %xmm4
	movdqa	%xmm3, %xmm6
	pcmpgtd	%xmm4, %xmm6
	pcmpeqd	%xmm3, %xmm4
	pshufd	$232, %xmm6, %xmm3              ## xmm3 = xmm6[0,2,2,3]
	pshufd	$253, %xmm4, %xmm4              ## xmm4 = xmm4[1,3,3,3]
	pand	%xmm3, %xmm4
	pshufd	$253, %xmm6, %xmm3              ## xmm3 = xmm6[1,3,3,3]
	por	%xmm4, %xmm3
	psubd	%xmm3, %xmm10
	pxor	%xmm2, %xmm0
	pxor	%xmm2, %xmm5
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm5, %xmm2
	pshufd	$232, %xmm2, %xmm3              ## xmm3 = xmm2[0,2,2,3]
	pcmpeqd	%xmm0, %xmm5
	pshufd	$253, %xmm5, %xmm0              ## xmm0 = xmm5[1,3,3,3]
	pand	%xmm3, %xmm0
	pshufd	$253, %xmm2, %xmm2              ## xmm2 = xmm2[1,3,3,3]
	por	%xmm0, %xmm2
	psubd	%xmm2, %xmm1
LBB0_22:
	paddd	%xmm1, %xmm10
	pshufd	$85, %xmm10, %xmm0              ## xmm0 = xmm10[1,1,1,1]
	paddd	%xmm10, %xmm0
	movd	%xmm0, %esi
	cmpq	%rcx, %rdx
	je	LBB0_25
## %bb.23:
	orq	$2, %rcx
	pextrq	$1, %xmm9, %rdx
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14,%rcx,8), %rdi
	xorl	%ebx, %ebx
	cmpq	%rdx, %rdi
	setg	%bl
	addl	%ebx, %esi
	incq	%rcx
	movq	%rdi, %rdx
	cmpq	%rcx, %r9
	jne	LBB0_24
LBB0_25:
	decl	%r9d
	cmpl	%r9d, %esi
	je	LBB0_41
## %bb.26:
	movb	$0, -128(%rbp)
	xorl	%r12d, %r12d
	movq	$-1, %r13
	jmp	LBB0_27
LBB0_39:                                ##   in Loop: Header=BB0_27 Depth=1
	incl	%r12d
	cmpl	(%rbx), %r12d
	jge	LBB0_40
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$100, %r15
	setl	%al
	cmpq	%r13, %r15
	setg	%cl
	movq	%r15, %rdx
	andb	%al, %cl
	jne	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_27 Depth=1
	movl	$100, %edx
LBB0_29:                                ##   in Loop: Header=BB0_27 Depth=1
	movq	-136(%rbp), %rsi                ## 8-byte Reload
	cmpq	%r13, %rsi
	setg	%dil
	cmpq	%rdx, %rsi
	setl	%bl
	movl	$1, %eax
	testb	%bl, %dil
	jne	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_27 Depth=1
	movzbl	%cl, %eax
	decl	%eax
	movq	%rdx, %rsi
LBB0_31:                                ##   in Loop: Header=BB0_27 Depth=1
	movq	-168(%rbp), %rdx                ## 8-byte Reload
	cmpq	%r13, %rdx
	setg	%bl
	cmpq	%rsi, %rdx
	setl	%cl
	movl	$2, %edi
	testb	%cl, %bl
	jne	LBB0_33
## %bb.32:                              ##   in Loop: Header=BB0_27 Depth=1
	movl	%eax, %edi
	movq	%rsi, %rdx
LBB0_33:                                ##   in Loop: Header=BB0_27 Depth=1
	movq	-160(%rbp), %rsi                ## 8-byte Reload
	cmpq	%r13, %rsi
	setg	%cl
	cmpq	%rdx, %rsi
	setl	%bl
	movl	$3, %eax
	testb	%bl, %cl
	jne	LBB0_35
## %bb.34:                              ##   in Loop: Header=BB0_27 Depth=1
	movl	%edi, %eax
	movq	%rdx, %rsi
LBB0_35:                                ##   in Loop: Header=BB0_27 Depth=1
	movq	-152(%rbp), %rdi                ## 8-byte Reload
	cmpq	%r13, %rdi
	setg	%cl
	cmpq	%rsi, %rdi
	setl	%dl
	movl	$4, %r14d
	movq	%rdi, %r13
	testb	%dl, %cl
	movq	_MAX_KP@GOTPCREL(%rip), %rbx
	jne	LBB0_37
## %bb.36:                              ##   in Loop: Header=BB0_27 Depth=1
	movl	%eax, %r14d
	movq	%rsi, %r13
LBB0_37:                                ##   in Loop: Header=BB0_27 Depth=1
	leaq	-128(%rbp), %rdi
	callq	_strlen
	movl	(%rbx), %ecx
	shll	$2, %ecx
	xorl	%edi, %edi
	cmpl	%ecx, %eax
	setl	%dil
	callq	_assert
	cmpl	$4, %r14d
	ja	LBB0_39
## %bb.38:                              ##   in Loop: Header=BB0_27 Depth=1
	movslq	%r14d, %rax
	leaq	l_reltable.check_keypad(%rip), %rcx
	movslq	(%rcx,%rax,4), %rsi
	addq	%rcx, %rsi
	leaq	-128(%rbp), %rdi
	movl	$80, %edx
	callq	__nc_STRCAT
	jmp	LBB0_39
LBB0_64:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_key_a1,4,2                     ## @key_a1
	.comm	_key_a3,4,2                     ## @key_a3
	.comm	_key_b2,4,2                     ## @key_b2
	.comm	_key_c1,4,2                     ## @key_c1
	.comm	_key_c3,4,2                     ## @key_c3
	.comm	_MAX_KP,4,2                     ## @MAX_KP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"qsrpn"

L_.str.1:                               ## @.str.1
	.asciz	" ka1"

L_.str.2:                               ## @.str.2
	.asciz	" ka3"

L_.str.3:                               ## @.str.3
	.asciz	" kb2"

L_.str.4:                               ## @.str.4
	.asciz	" kc1"

L_.str.5:                               ## @.str.5
	.asciz	" kc3"

L_.str.6:                               ## @.str.6
	.asciz	"vt100 keypad order inconsistent: %s"

L_.str.7:                               ## @.str.7
	.asciz	"vt100 keypad map incomplete:%s"

	.comm	_key_ic,4,2                     ## @key_ic
	.comm	_key_dc,4,2                     ## @key_dc
	.no_dead_strip	_check_keypad
	.section	__TEXT,__const
	.p2align	2                               ## @reltable.check_keypad
l_reltable.check_keypad:
	.long	L_.str.1-l_reltable.check_keypad
	.long	L_.str.2-l_reltable.check_keypad
	.long	L_.str.3-l_reltable.check_keypad
	.long	L_.str.4-l_reltable.check_keypad
	.long	L_.str.5-l_reltable.check_keypad

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_keypad
_check_keypad:                          ; @check_keypad
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #96
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x27, _key_a1@GOTPAGE
Lloh4:
	ldr	x27, [x27, _key_a1@GOTPAGEOFF]
	ldr	w0, [x27]
	bl	_VALID_STRING
Lloh5:
	adrp	x20, _key_a3@GOTPAGE
Lloh6:
	ldr	x20, [x20, _key_a3@GOTPAGEOFF]
Lloh7:
	adrp	x21, _key_b2@GOTPAGE
Lloh8:
	ldr	x21, [x21, _key_b2@GOTPAGEOFF]
Lloh9:
	adrp	x22, _key_c1@GOTPAGE
Lloh10:
	ldr	x22, [x22, _key_c1@GOTPAGEOFF]
Lloh11:
	adrp	x23, _key_c3@GOTPAGE
Lloh12:
	ldr	x23, [x23, _key_c3@GOTPAGEOFF]
	cbz	x0, LBB0_12
; %bb.1:
	ldr	w0, [x20]
	bl	_VALID_STRING
	cbz	x0, LBB0_12
; %bb.2:
	ldr	w0, [x21]
	bl	_VALID_STRING
	cbz	x0, LBB0_12
; %bb.3:
	ldr	w0, [x22]
	bl	_VALID_STRING
	cbz	x0, LBB0_12
; %bb.4:
	ldr	w0, [x23]
	bl	_VALID_STRING
	cbz	x0, LBB0_12
; %bb.5:
	mov	x24, sp
Lloh13:
	adrp	x25, _MAX_KP@GOTPAGE
Lloh14:
	ldr	x25, [x25, _MAX_KP@GOTPAGEOFF]
	ldr	w8, [x25]
	add	w8, w8, #1
	mov	x9, x8
Lloh15:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh16:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x19, x9, x8
	mov	sp, x19
	ldr	w8, [x25]
	lsl	x8, x8, #3
	mov	x9, x8
Lloh17:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh18:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x26, x9, x8
	mov	sp, x26
	ldr	w0, [x27]
	bl	_keypad_final
	strb	w0, [x19]
	ldr	w0, [x20]
	bl	_keypad_final
	strb	w0, [x19, #1]
	ldr	w0, [x21]
	bl	_keypad_final
	strb	w0, [x19, #2]
	ldr	w0, [x22]
	bl	_keypad_final
	strb	w0, [x19, #3]
	ldr	w0, [x23]
	bl	_keypad_final
	strb	w0, [x19, #4]
	strb	wzr, [x19, #5]
	mov	x0, x19
	bl	_strlen
	ldr	w8, [x25]
	cmp	w0, w8
	cset	w0, le
	bl	_assert
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_strcmp
	cbz	w0, LBB0_11
; %bb.6:
	ldr	w0, [x27]
	bl	_keypad_index
	mov	x19, x0
	str	x0, [x26]
	ldr	w0, [x20]
	bl	_keypad_index
	mov	x20, x0
	str	x0, [x26, #8]
	ldr	w0, [x21]
	bl	_keypad_index
	mov	x21, x0
	str	x0, [x26, #16]
	ldr	w0, [x22]
	bl	_keypad_index
	mov	x22, x0
	str	x0, [x26, #24]
	ldr	w0, [x23]
	bl	_keypad_index
	str	x0, [x26, #32]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_32
; %bb.7:
	tbnz	x19, #63, LBB0_11
; %bb.8:
	mov	x23, x0
	add	x9, x26, #8
	sub	x10, x8, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x10, LBB0_35
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x11, [x9], #8
	sub	x10, x10, #1
	tbz	x11, #63, LBB0_9
LBB0_11:
	mov	sp, x24
	b	LBB0_30
LBB0_12:
	ldr	w0, [x27]
	bl	_VALID_STRING
	cbnz	x0, LBB0_17
; %bb.13:
	ldr	w0, [x20]
	bl	_VALID_STRING
	cbnz	x0, LBB0_17
; %bb.14:
	ldr	w0, [x21]
	bl	_VALID_STRING
	cbnz	x0, LBB0_17
; %bb.15:
	ldr	w0, [x22]
	bl	_VALID_STRING
	cbnz	x0, LBB0_17
; %bb.16:
	ldr	w0, [x23]
	bl	_VALID_STRING
	cbz	x0, LBB0_29
LBB0_17:
	sturb	wzr, [x29, #-168]
	ldr	w0, [x27]
	bl	_keypad_index
	tbnz	x0, #63, LBB0_19
; %bb.18:
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	sub	x0, x29, #168
	mov	w2, #80
	bl	__nc_STRCAT
LBB0_19:
	ldr	w0, [x20]
	bl	_keypad_index
	tbnz	x0, #63, LBB0_21
; %bb.20:
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	sub	x0, x29, #168
	mov	w2, #80
	bl	__nc_STRCAT
LBB0_21:
	ldr	w0, [x21]
	bl	_keypad_index
	tbnz	x0, #63, LBB0_23
; %bb.22:
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	sub	x0, x29, #168
	mov	w2, #80
	bl	__nc_STRCAT
LBB0_23:
	ldr	w0, [x22]
	bl	_keypad_index
	tbnz	x0, #63, LBB0_25
; %bb.24:
Lloh27:
	adrp	x1, l_.str.4@PAGE
Lloh28:
	add	x1, x1, l_.str.4@PAGEOFF
	sub	x0, x29, #168
	mov	w2, #80
	bl	__nc_STRCAT
LBB0_25:
	ldr	w0, [x23]
	bl	_keypad_index
	tbnz	x0, #63, LBB0_27
; %bb.26:
Lloh29:
	adrp	x1, l_.str.5@PAGE
Lloh30:
	add	x1, x1, l_.str.5@PAGEOFF
	sub	x0, x29, #168
	mov	w2, #80
	bl	__nc_STRCAT
LBB0_27:
	ldurb	w8, [x29, #-168]
	cbz	w8, LBB0_29
; %bb.28:
Lloh31:
	adrp	x0, l_.str.7@PAGE
Lloh32:
	add	x0, x0, l_.str.7@PAGEOFF
	sub	x1, x29, #168
	bl	__nc_warning
LBB0_29:
Lloh33:
	adrp	x8, _key_ic@GOTPAGE
Lloh34:
	ldr	x8, [x8, _key_ic@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
Lloh36:
	adrp	x8, _key_dc@GOTPAGE
Lloh37:
	ldr	x8, [x8, _key_dc@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	bl	_ANDMISSING
LBB0_30:
	ldur	x8, [x29, #-88]
Lloh39:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh40:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_51
; %bb.31:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_32:
	stur	x24, [x29, #-176]               ; 8-byte Folded Spill
	sturb	wzr, [x29, #-168]
LBB0_33:
Lloh42:
	adrp	x0, l_.str.6@PAGE
Lloh43:
	add	x0, x0, l_.str.6@PAGEOFF
	sub	x1, x29, #168
	bl	__nc_warning
	ldur	x24, [x29, #-176]               ; 8-byte Folded Reload
LBB0_34:
	mov	sp, x24
	b	LBB0_29
LBB0_35:
	cmp	w8, #2
	b.lt	LBB0_39
; %bb.36:
	cmp	x20, x19
	cset	w10, gt
	cmp	w8, #2
	b.eq	LBB0_46
; %bb.37:
	sub	x11, x8, #2
	cmp	x11, #8
	b.hs	LBB0_40
; %bb.38:
	mov	w9, #2
	mov	x11, x20
	b	LBB0_44
LBB0_39:
	mov	w10, #0
	b	LBB0_46
LBB0_40:
	and	x12, x11, #0xfffffffffffffff8
	movi	d0, #0000000000000000
	mov.s	v0[0], w10
	dup.2d	v2, x20
	orr	x9, x12, #0x2
	movi.2d	v1, #0000000000000000
	add	x10, x26, #64
	mov	x13, x12
	movi.2d	v3, #0000000000000000
	movi.2d	v4, #0000000000000000
LBB0_41:                                ; =>This Inner Loop Header: Depth=1
	ldp	q5, q6, [x10, #-48]
	ext.16b	v16, v2, v5, #8
	ldp	q7, q2, [x10, #-16]
	ext.16b	v17, v5, v6, #8
	ext.16b	v18, v6, v7, #8
	ext.16b	v19, v7, v2, #8
	cmgt.2d	v5, v5, v16
	xtn.2s	v5, v5
	cmgt.2d	v6, v6, v17
	xtn.2s	v6, v6
	cmgt.2d	v7, v7, v18
	xtn.2s	v7, v7
	cmgt.2d	v16, v2, v19
	xtn.2s	v16, v16
	sub.2s	v0, v0, v5
	sub.2s	v1, v1, v6
	sub.2s	v3, v3, v7
	sub.2s	v4, v4, v16
	add	x10, x10, #64
	subs	x13, x13, #8
	b.ne	LBB0_41
; %bb.42:
	add.2s	v0, v1, v0
	add.2s	v0, v3, v0
	add.2s	v0, v4, v0
	addp.2s	v0, v0, v0
	fmov	w10, s0
	cmp	x11, x12
	b.eq	LBB0_46
; %bb.43:
	mov.d	x11, v2[1]
LBB0_44:
	sub	x12, x8, x9
	add	x9, x26, x9, lsl #3
LBB0_45:                                ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x9], #8
	cmp	x13, x11
	cinc	w10, w10, gt
	mov	x11, x13
	subs	x12, x12, #1
	b.ne	LBB0_45
LBB0_46:
	sub	w8, w8, #1
	cmp	w10, w8
	b.eq	LBB0_34
; %bb.47:
	stur	x24, [x29, #-176]               ; 8-byte Folded Spill
	mov	w26, #0
	sturb	wzr, [x29, #-168]
	mov	x28, #-1
	mov	w27, #4
	b	LBB0_49
LBB0_48:                                ;   in Loop: Header=BB0_49 Depth=1
	add	w26, w26, #1
	ldr	w8, [x25]
	cmp	w26, w8
	b.ge	LBB0_33
LBB0_49:                                ; =>This Inner Loop Header: Depth=1
	cmp	x19, #100
	cset	w8, lt
	cmp	x19, x28
	cset	w9, gt
	ands	w8, w9, w8
	mov	w9, #100
	csel	x9, x19, x9, ne
	sub	w8, w8, #1
	cmp	x20, x28
	cset	w10, gt
	cmp	x20, x9
	cset	w11, lt
	tst	w10, w11
	csinc	w8, w8, wzr, eq
	csel	x9, x20, x9, ne
	cmp	x21, x28
	cset	w10, gt
	cmp	x21, x9
	cset	w11, lt
	tst	w10, w11
	mov	w10, #2
	csel	w8, w10, w8, ne
	csel	x9, x21, x9, ne
	cmp	x22, x28
	cset	w10, gt
	cmp	x22, x9
	cset	w11, lt
	tst	w10, w11
	mov	w10, #3
	csel	w8, w10, w8, ne
	csel	x9, x22, x9, ne
	cmp	x23, x28
	cset	w10, gt
	cmp	x23, x9
	cset	w11, lt
	tst	w10, w11
	csel	w24, w27, w8, ne
	csel	x28, x23, x9, ne
	sub	x0, x29, #168
	bl	_strlen
	ldr	w8, [x25]
	cmp	w0, w8, lsl #2
	cset	w0, lt
	bl	_assert
	cmp	w24, #4
	b.hi	LBB0_48
; %bb.50:                               ;   in Loop: Header=BB0_49 Depth=1
Lloh44:
	adrp	x8, l_switch.table.check_keypad@PAGE
Lloh45:
	add	x8, x8, l_switch.table.check_keypad@PAGEOFF
	ldr	x1, [x8, w24, sxtw #3]
	sub	x0, x29, #168
	mov	w2, #80
	bl	__nc_STRCAT
	b	LBB0_48
LBB0_51:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_key_a1,4,2                     ; @key_a1
	.comm	_key_a3,4,2                     ; @key_a3
	.comm	_key_b2,4,2                     ; @key_b2
	.comm	_key_c1,4,2                     ; @key_c1
	.comm	_key_c3,4,2                     ; @key_c3
	.comm	_MAX_KP,4,2                     ; @MAX_KP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"qsrpn"

l_.str.1:                               ; @.str.1
	.asciz	" ka1"

l_.str.2:                               ; @.str.2
	.asciz	" ka3"

l_.str.3:                               ; @.str.3
	.asciz	" kb2"

l_.str.4:                               ; @.str.4
	.asciz	" kc1"

l_.str.5:                               ; @.str.5
	.asciz	" kc3"

l_.str.6:                               ; @.str.6
	.asciz	"vt100 keypad order inconsistent: %s"

l_.str.7:                               ; @.str.7
	.asciz	"vt100 keypad map incomplete:%s"

	.comm	_key_ic,4,2                     ; @key_ic
	.comm	_key_dc,4,2                     ; @key_dc
	.no_dead_strip	_check_keypad
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.check_keypad
l_switch.table.check_keypad:
	.quad	l_.str.1
	.quad	l_.str.2
	.quad	l_.str.3
	.quad	l_.str.4
	.quad	l_.str.5

.subsections_via_symbols
