	.file	"492401.c"
	.intel_syntax noprefix
	.text
	.globl	train_letters_set
	.bss
	.align 32
	.type	train_letters_set, @object
	.size	train_letters_set, 1432800
train_letters_set:
	.zero	1432800
	.globl	test_letters_set
	.align 32
	.type	test_letters_set, @object
	.size	test_letters_set, 7200
test_letters_set:
	.zero	7200
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"train19900.txt"
.LC2:
	.string	"%c "
.LC3:
	.string	"%d "
	.text
	.globl	Read_training_file_from_disk
	.type	Read_training_file_from_disk, @function
Read_training_file_from_disk:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -16[rbp], 0
	jmp	.L2
.L5:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 3
	lea	rdx, train_letters_set[rip]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	DWORD PTR -12[rbp], 0
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	add	rax, rax
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, train_letters_set[rip]
	add	rax, rdx
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	add	DWORD PTR -12[rbp], 1
.L3:
	cmp	DWORD PTR -12[rbp], 15
	jle	.L4
	add	DWORD PTR -16[rbp], 1
.L2:
	cmp	DWORD PTR -16[rbp], 19899
	jle	.L5
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	Read_training_file_from_disk, .-Read_training_file_from_disk
	.section	.rodata
.LC4:
	.string	"test100.txt"
	.text
	.globl	Read_testing_file_from_disk
	.type	Read_testing_file_from_disk, @function
Read_testing_file_from_disk:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	lea	rsi, .LC0[rip]
	lea	rdi, .LC4[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -16[rbp], 0
	jmp	.L7
.L10:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 3
	lea	rdx, test_letters_set[rip]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	DWORD PTR -12[rbp], 0
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	add	rax, rax
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, test_letters_set[rip]
	add	rax, rdx
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	add	DWORD PTR -12[rbp], 1
.L8:
	cmp	DWORD PTR -12[rbp], 15
	jle	.L9
	add	DWORD PTR -16[rbp], 1
.L7:
	cmp	DWORD PTR -16[rbp], 99
	jle	.L10
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	Read_testing_file_from_disk, .-Read_testing_file_from_disk
	.globl	Calc_Euclidean_Distance
	.type	Calc_Euclidean_Distance, @function
Calc_Euclidean_Distance:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	pxor	xmm0, xmm0
	movss	DWORD PTR -4[rbp], xmm0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L12
.L15:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L13
.L14:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	add	rax, rax
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, train_letters_set[rip+4]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR 4[rax+rdx*4]
	mov	esi, ecx
	sub	esi, eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	add	rax, rax
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, train_letters_set[rip+4]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	mov	edx, DWORD PTR 4[rax+rdx*4]
	mov	eax, ecx
	sub	eax, edx
	imul	eax, esi
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, eax
	movss	xmm1, DWORD PTR -4[rbp]
	addss	xmm0, xmm1
	movss	DWORD PTR -4[rbp], xmm0
	add	DWORD PTR -8[rbp], 1
.L13:
	cmp	DWORD PTR -8[rbp], 15
	jle	.L14
	pxor	xmm2, xmm2
	cvtss2sd	xmm2, DWORD PTR -4[rbp]
	movq	rax, xmm2
	movq	xmm0, rax
	call	sqrt@PLT
	cvtsd2ss	xmm0, xmm0
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, train_letters_set[rip+68]
	movss	DWORD PTR [rdx+rax], xmm0
	pxor	xmm0, xmm0
	movss	DWORD PTR -4[rbp], xmm0
	add	DWORD PTR -12[rbp], 1
.L12:
	cmp	DWORD PTR -12[rbp], 19899
	jle	.L15
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	Calc_Euclidean_Distance, .-Calc_Euclidean_Distance
	.globl	KNN
	.type	KNN, @function
KNN:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 144
	mov	DWORD PTR -132[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -112[rbp]
	mov	eax, 0
	mov	ecx, 13
	mov	rdi, rdx
	rep stosq
	mov	DWORD PTR -124[rbp], 0
	jmp	.L17
.L46:
	mov	eax, DWORD PTR -124[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, train_letters_set[rip]
	movzx	eax, BYTE PTR [rdx+rax]
	movsx	eax, al
	sub	eax, 65
	cmp	eax, 25
	ja	.L18
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L20[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L20[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L20:
	.long	.L45-.L20
	.long	.L44-.L20
	.long	.L43-.L20
	.long	.L42-.L20
	.long	.L41-.L20
	.long	.L40-.L20
	.long	.L39-.L20
	.long	.L38-.L20
	.long	.L37-.L20
	.long	.L36-.L20
	.long	.L35-.L20
	.long	.L34-.L20
	.long	.L33-.L20
	.long	.L32-.L20
	.long	.L31-.L20
	.long	.L30-.L20
	.long	.L29-.L20
	.long	.L28-.L20
	.long	.L27-.L20
	.long	.L26-.L20
	.long	.L25-.L20
	.long	.L24-.L20
	.long	.L23-.L20
	.long	.L22-.L20
	.long	.L21-.L20
	.long	.L19-.L20
	.text
.L45:
	mov	eax, DWORD PTR -112[rbp]
	add	eax, 1
	mov	DWORD PTR -112[rbp], eax
	jmp	.L18
.L44:
	mov	eax, DWORD PTR -108[rbp]
	add	eax, 1
	mov	DWORD PTR -108[rbp], eax
	jmp	.L18
.L43:
	mov	eax, DWORD PTR -104[rbp]
	add	eax, 1
	mov	DWORD PTR -104[rbp], eax
	jmp	.L18
.L42:
	mov	eax, DWORD PTR -100[rbp]
	add	eax, 1
	mov	DWORD PTR -100[rbp], eax
	jmp	.L18
.L41:
	mov	eax, DWORD PTR -96[rbp]
	add	eax, 1
	mov	DWORD PTR -96[rbp], eax
	jmp	.L18
.L40:
	mov	eax, DWORD PTR -92[rbp]
	add	eax, 1
	mov	DWORD PTR -92[rbp], eax
	jmp	.L18
.L39:
	mov	eax, DWORD PTR -88[rbp]
	add	eax, 1
	mov	DWORD PTR -88[rbp], eax
	jmp	.L18
.L38:
	mov	eax, DWORD PTR -84[rbp]
	add	eax, 1
	mov	DWORD PTR -84[rbp], eax
	jmp	.L18
.L37:
	mov	eax, DWORD PTR -80[rbp]
	add	eax, 1
	mov	DWORD PTR -80[rbp], eax
	jmp	.L18
.L36:
	mov	eax, DWORD PTR -76[rbp]
	add	eax, 1
	mov	DWORD PTR -76[rbp], eax
	jmp	.L18
.L35:
	mov	eax, DWORD PTR -72[rbp]
	add	eax, 1
	mov	DWORD PTR -72[rbp], eax
	jmp	.L18
.L34:
	mov	eax, DWORD PTR -68[rbp]
	add	eax, 1
	mov	DWORD PTR -68[rbp], eax
	jmp	.L18
.L33:
	mov	eax, DWORD PTR -64[rbp]
	add	eax, 1
	mov	DWORD PTR -64[rbp], eax
	jmp	.L18
.L32:
	mov	eax, DWORD PTR -60[rbp]
	add	eax, 1
	mov	DWORD PTR -60[rbp], eax
	jmp	.L18
.L31:
	mov	eax, DWORD PTR -56[rbp]
	add	eax, 1
	mov	DWORD PTR -56[rbp], eax
	jmp	.L18
.L30:
	mov	eax, DWORD PTR -52[rbp]
	add	eax, 1
	mov	DWORD PTR -52[rbp], eax
	jmp	.L18
.L29:
	mov	eax, DWORD PTR -48[rbp]
	add	eax, 1
	mov	DWORD PTR -48[rbp], eax
	jmp	.L18
.L28:
	mov	eax, DWORD PTR -44[rbp]
	add	eax, 1
	mov	DWORD PTR -44[rbp], eax
	jmp	.L18
.L27:
	mov	eax, DWORD PTR -40[rbp]
	add	eax, 1
	mov	DWORD PTR -40[rbp], eax
	jmp	.L18
.L26:
	mov	eax, DWORD PTR -36[rbp]
	add	eax, 1
	mov	DWORD PTR -36[rbp], eax
	jmp	.L18
.L25:
	mov	eax, DWORD PTR -32[rbp]
	add	eax, 1
	mov	DWORD PTR -32[rbp], eax
	jmp	.L18
.L24:
	mov	eax, DWORD PTR -28[rbp]
	add	eax, 1
	mov	DWORD PTR -28[rbp], eax
	jmp	.L18
.L23:
	mov	eax, DWORD PTR -24[rbp]
	add	eax, 1
	mov	DWORD PTR -24[rbp], eax
	jmp	.L18
.L22:
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	mov	DWORD PTR -20[rbp], eax
	jmp	.L18
.L21:
	mov	eax, DWORD PTR -16[rbp]
	add	eax, 1
	mov	DWORD PTR -16[rbp], eax
	jmp	.L18
.L19:
	mov	eax, DWORD PTR -12[rbp]
	add	eax, 1
	mov	DWORD PTR -12[rbp], eax
	nop
.L18:
	add	DWORD PTR -124[rbp], 1
.L17:
	mov	eax, DWORD PTR -124[rbp]
	cmp	eax, DWORD PTR -132[rbp]
	jl	.L46
	mov	eax, DWORD PTR -112[rbp]
	mov	DWORD PTR -116[rbp], eax
	mov	DWORD PTR -120[rbp], 0
	mov	DWORD PTR -124[rbp], 0
	jmp	.L47
.L49:
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	mov	eax, DWORD PTR -112[rbp+rax*4]
	cmp	DWORD PTR -116[rbp], eax
	jge	.L48
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	mov	eax, DWORD PTR -112[rbp+rax*4]
	mov	DWORD PTR -116[rbp], eax
	mov	eax, DWORD PTR -124[rbp]
	mov	DWORD PTR -120[rbp], eax
.L48:
	add	DWORD PTR -124[rbp], 1
.L47:
	cmp	DWORD PTR -124[rbp], 25
	jle	.L49
	mov	eax, DWORD PTR -120[rbp]
	add	eax, 65
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L51
	call	__stack_chk_fail@PLT
.L51:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	KNN, .-KNN
	.globl	Sort_letters_distance
	.type	Sort_letters_distance, @function
Sort_letters_distance:
.LFB4:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 104
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -104[rbp], 0
	jmp	.L53
.L58:
	mov	eax, DWORD PTR -104[rbp]
	add	eax, 1
	mov	DWORD PTR -100[rbp], eax
	jmp	.L54
.L57:
	mov	eax, DWORD PTR -104[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, train_letters_set[rip+68]
	movss	xmm0, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -100[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, train_letters_set[rip+68]
	movss	xmm1, DWORD PTR [rdx+rax]
	comiss	xmm0, xmm1
	jbe	.L55
	mov	eax, DWORD PTR -104[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, train_letters_set[rip]
	mov	rcx, QWORD PTR [rdx+rax]
	mov	rbx, QWORD PTR 8[rdx+rax]
	mov	QWORD PTR -96[rbp], rcx
	mov	QWORD PTR -88[rbp], rbx
	mov	rcx, QWORD PTR 16[rdx+rax]
	mov	rbx, QWORD PTR 24[rdx+rax]
	mov	QWORD PTR -80[rbp], rcx
	mov	QWORD PTR -72[rbp], rbx
	mov	rcx, QWORD PTR 32[rdx+rax]
	mov	rbx, QWORD PTR 40[rdx+rax]
	mov	QWORD PTR -64[rbp], rcx
	mov	QWORD PTR -56[rbp], rbx
	mov	rcx, QWORD PTR 48[rdx+rax]
	mov	rbx, QWORD PTR 56[rdx+rax]
	mov	QWORD PTR -48[rbp], rcx
	mov	QWORD PTR -40[rbp], rbx
	mov	rax, QWORD PTR 64[rdx+rax]
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -104[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 3
	mov	rcx, rax
	lea	rdx, train_letters_set[rip]
	mov	eax, DWORD PTR -100[rbp]
	movsx	rsi, eax
	mov	rax, rsi
	sal	rax, 3
	add	rax, rsi
	sal	rax, 3
	mov	rsi, rax
	lea	rax, train_letters_set[rip]
	mov	r8, QWORD PTR [rsi+rax]
	mov	r9, QWORD PTR 8[rsi+rax]
	mov	QWORD PTR [rcx+rdx], r8
	mov	QWORD PTR 8[rcx+rdx], r9
	mov	r8, QWORD PTR 16[rsi+rax]
	mov	r9, QWORD PTR 24[rsi+rax]
	mov	QWORD PTR 16[rcx+rdx], r8
	mov	QWORD PTR 24[rcx+rdx], r9
	mov	r8, QWORD PTR 32[rsi+rax]
	mov	r9, QWORD PTR 40[rsi+rax]
	mov	QWORD PTR 32[rcx+rdx], r8
	mov	QWORD PTR 40[rcx+rdx], r9
	mov	r8, QWORD PTR 48[rsi+rax]
	mov	r9, QWORD PTR 56[rsi+rax]
	mov	QWORD PTR 48[rcx+rdx], r8
	mov	QWORD PTR 56[rcx+rdx], r9
	mov	rax, QWORD PTR 64[rsi+rax]
	mov	QWORD PTR 64[rcx+rdx], rax
	mov	eax, DWORD PTR -100[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, train_letters_set[rip]
	mov	rcx, QWORD PTR -96[rbp]
	mov	rbx, QWORD PTR -88[rbp]
	mov	QWORD PTR [rdx+rax], rcx
	mov	QWORD PTR 8[rdx+rax], rbx
	mov	rcx, QWORD PTR -80[rbp]
	mov	rbx, QWORD PTR -72[rbp]
	mov	QWORD PTR 16[rdx+rax], rcx
	mov	QWORD PTR 24[rdx+rax], rbx
	mov	rcx, QWORD PTR -64[rbp]
	mov	rbx, QWORD PTR -56[rbp]
	mov	QWORD PTR 32[rdx+rax], rcx
	mov	QWORD PTR 40[rdx+rax], rbx
	mov	rcx, QWORD PTR -48[rbp]
	mov	rbx, QWORD PTR -40[rbp]
	mov	QWORD PTR 48[rdx+rax], rcx
	mov	QWORD PTR 56[rdx+rax], rbx
	mov	rcx, QWORD PTR -32[rbp]
	mov	QWORD PTR 64[rdx+rax], rcx
.L55:
	add	DWORD PTR -100[rbp], 1
.L54:
	cmp	DWORD PTR -100[rbp], 19899
	jle	.L57
	add	DWORD PTR -104[rbp], 1
.L53:
	cmp	DWORD PTR -104[rbp], 19898
	jle	.L58
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L59
	call	__stack_chk_fail@PLT
.L59:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	Sort_letters_distance, .-Sort_letters_distance
	.section	.rodata
	.align 8
.LC6:
	.ascii	"               *********************************************"
	.ascii	"***************************************************\n       "
	.ascii	"        *                           K-NN Demo using Data Set"
	.ascii	": UCI Letter"
	.string	" Recognition                   *\n               *                                       - [Yang (Simon) Guo] -                                 *\n               ************************************************************************************************"
	.align 8
.LC7:
	.string	"\nrows of training data set: %d\n"
.LC8:
	.string	"rows of test data set: %d\n"
	.align 8
.LC9:
	.string	"input K in K-nearest-neighbour algorithm: "
.LC10:
	.string	"%d"
	.align 8
.LC11:
	.string	"\n-------------------INDIVIDUAL TEST RESULT-------------------"
.LC12:
	.string	"Distance is %f.\n"
	.align 8
.LC13:
	.string	"This subject belongs to class: [%c], prediction is class: [%c], CORRECT!\n"
	.align 8
.LC14:
	.string	"This subject belongs to class: [%c], prediction is class: [%c], WRONG!\n"
	.align 8
.LC15:
	.string	"\n-------------------TEST RESULT SUMMARY-------------------"
.LC16:
	.string	"right prediction: %d\n"
.LC17:
	.string	"wrong prediction: %d\n"
.LC19:
	.string	"accuracy: %.3f%% [%f]\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB5:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -32[rbp], 0
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	esi, 19900
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	Read_training_file_from_disk
	mov	esi, 100
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	Read_testing_file_from_disk
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	DWORD PTR -28[rbp], 0
	jmp	.L62
.L65:
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 3
	lea	rdx, test_letters_set[rip]
	add	rax, rdx
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	Calc_Euclidean_Distance
	mov	eax, 0
	call	Sort_letters_distance
	mov	eax, DWORD PTR -32[rbp]
	mov	edi, eax
	call	KNN
	mov	BYTE PTR -33[rbp], al
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, test_letters_set[rip]
	movzx	eax, BYTE PTR [rdx+rax]
	cmp	BYTE PTR -33[rbp], al
	jne	.L63
	movss	xmm0, DWORD PTR train_letters_set[rip+68]
	pxor	xmm3, xmm3
	cvtss2sd	xmm3, xmm0
	movq	rax, xmm3
	movq	xmm0, rax
	lea	rdi, .LC12[rip]
	mov	eax, 1
	call	printf@PLT
	movsx	edx, BYTE PTR -33[rbp]
	mov	eax, DWORD PTR -28[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	add	rax, rcx
	sal	rax, 3
	mov	rcx, rax
	lea	rax, test_letters_set[rip]
	movzx	eax, BYTE PTR [rcx+rax]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -24[rbp], 1
	jmp	.L64
.L63:
	movss	xmm0, DWORD PTR train_letters_set[rip+68]
	pxor	xmm4, xmm4
	cvtss2sd	xmm4, xmm0
	movq	rax, xmm4
	movq	xmm0, rax
	lea	rdi, .LC12[rip]
	mov	eax, 1
	call	printf@PLT
	movsx	edx, BYTE PTR -33[rbp]
	mov	eax, DWORD PTR -28[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	add	rax, rcx
	sal	rax, 3
	mov	rcx, rax
	lea	rax, test_letters_set[rip]
	movzx	eax, BYTE PTR [rcx+rax]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -20[rbp], 1
.L64:
	add	DWORD PTR -28[rbp], 1
.L62:
	cmp	DWORD PTR -28[rbp], 99
	jle	.L65
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, DWORD PTR -24[rbp]
	movss	xmm1, DWORD PTR .LC18[rip]
	divss	xmm0, xmm1
	pxor	xmm2, xmm2
	cvtss2sd	xmm2, xmm0
	pxor	xmm1, xmm1
	cvtsi2ss	xmm1, DWORD PTR -24[rbp]
	movss	xmm0, DWORD PTR .LC18[rip]
	mulss	xmm0, xmm1
	movss	xmm1, DWORD PTR .LC18[rip]
	divss	xmm0, xmm1
	pxor	xmm5, xmm5
	cvtss2sd	xmm5, xmm0
	movq	rax, xmm5
	movapd	xmm1, xmm2
	movq	xmm0, rax
	lea	rdi, .LC19[rip]
	mov	eax, 2
	call	printf@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L67
	call	__stack_chk_fail@PLT
.L67:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	main, .-main
	.section	.rodata
	.align 4
.LC18:
	.long	1120403456
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"492401.c"
	.text
	.comm	train_letters_set,1432800,4
	.comm	test_letters_set,7200,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"train19900.txt\000"
	.align	2
.LC2:
	.ascii	"%c \000"
	.align	2
.LC3:
	.ascii	"%d \000"
	.text
	.align	2
	.global	Read_training_file_from_disk
	.syntax unified
	.arm
	.fpu softvfp
	.type	Read_training_file_from_disk, %function
Read_training_file_from_disk:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r1, .L6
	ldr	r0, .L6+4
	bl	fopen
	str	r0, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L2
.L5:
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L6+8
	add	r3, r3, r2
	mov	r2, r3
	ldr	r1, .L6+12
	ldr	r0, [fp, #-8]
	bl	__isoc99_fscanf
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L3
.L4:
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #1
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, .L6+8
	add	r3, r3, r2
	add	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L6+16
	ldr	r0, [fp, #-8]
	bl	__isoc99_fscanf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L3:
	ldr	r3, [fp, #-12]
	cmp	r3, #15
	ble	.L4
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L2:
	ldr	r3, [fp, #-16]
	ldr	r2, .L6+20
	cmp	r3, r2
	ble	.L5
	ldr	r0, [fp, #-8]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	.LC1
	.word	train_letters_set
	.word	.LC2
	.word	.LC3
	.word	19899
	.size	Read_training_file_from_disk, .-Read_training_file_from_disk
	.section	.rodata
	.align	2
.LC4:
	.ascii	"test100.txt\000"
	.text
	.align	2
	.global	Read_testing_file_from_disk
	.syntax unified
	.arm
	.fpu softvfp
	.type	Read_testing_file_from_disk, %function
Read_testing_file_from_disk:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r1, .L13
	ldr	r0, .L13+4
	bl	fopen
	str	r0, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L9
.L12:
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L13+8
	add	r3, r3, r2
	mov	r2, r3
	ldr	r1, .L13+12
	ldr	r0, [fp, #-8]
	bl	__isoc99_fscanf
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L10
.L11:
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #1
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, .L13+8
	add	r3, r3, r2
	add	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L13+16
	ldr	r0, [fp, #-8]
	bl	__isoc99_fscanf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L10:
	ldr	r3, [fp, #-12]
	cmp	r3, #15
	ble	.L11
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L9:
	ldr	r3, [fp, #-16]
	cmp	r3, #99
	ble	.L12
	ldr	r0, [fp, #-8]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC0
	.word	.LC4
	.word	test_letters_set
	.word	.LC2
	.word	.LC3
	.size	Read_testing_file_from_disk, .-Read_testing_file_from_disk
	.global	__aeabi_i2f
	.global	__aeabi_fadd
	.global	__aeabi_f2d
	.global	__aeabi_d2f
	.align	2
	.global	Calc_Euclidean_Distance
	.syntax unified
	.arm
	.fpu softvfp
	.type	Calc_Euclidean_Distance, %function
Calc_Euclidean_Distance:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-8]	@ float
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L16
.L19:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L17
.L18:
	ldr	r1, .L20
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #1
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r3, #4]
	ldr	r1, [fp, #-24]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #4]
	sub	r1, r2, r3
	ldr	r0, .L20
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #1
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r0, r3
	ldr	r2, [r3, #4]
	ldr	r0, [fp, #-24]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r0, r3
	ldr	r3, [r3, #4]
	sub	r3, r2, r3
	mul	r3, r1, r3
	mov	r0, r3
	bl	__aeabi_i2f
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-8]	@ float
	bl	__aeabi_fadd
	mov	r3, r0
	str	r3, [fp, #-8]	@ float
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L17:
	ldr	r3, [fp, #-12]
	cmp	r3, #15
	ble	.L18
	ldr	r0, [fp, #-8]	@ float
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sqrt
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2f
	mov	r1, r0
	ldr	r0, .L20
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r0, r3
	add	r3, r3, #68
	str	r1, [r3]	@ float
	mov	r3, #0
	str	r3, [fp, #-8]	@ float
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L16:
	ldr	r3, [fp, #-16]
	ldr	r2, .L20+4
	cmp	r3, r2
	ble	.L19
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	train_letters_set
	.word	19899
	.size	Calc_Euclidean_Distance, .-Calc_Euclidean_Distance
	.section	.rodata
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	KNN
	.syntax unified
	.arm
	.fpu softvfp
	.type	KNN, %function
KNN:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #128
	str	r0, [fp, #-128]
	ldr	r3, .L58
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #112
	mov	r2, #104
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-124]
	b	.L23
.L52:
	ldr	r1, .L58+4
	ldr	r2, [fp, #-124]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #65
	cmp	r3, #25
	ldrls	pc, [pc, r3, asl #2]
	b	.L24
.L26:
	.word	.L51
	.word	.L50
	.word	.L49
	.word	.L48
	.word	.L47
	.word	.L46
	.word	.L45
	.word	.L44
	.word	.L43
	.word	.L42
	.word	.L41
	.word	.L40
	.word	.L39
	.word	.L38
	.word	.L37
	.word	.L36
	.word	.L35
	.word	.L34
	.word	.L33
	.word	.L32
	.word	.L31
	.word	.L30
	.word	.L29
	.word	.L28
	.word	.L27
	.word	.L25
.L51:
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
	b	.L24
.L50:
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
	b	.L24
.L49:
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
	b	.L24
.L48:
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
	b	.L24
.L47:
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	str	r3, [fp, #-96]
	b	.L24
.L46:
	ldr	r3, [fp, #-92]
	add	r3, r3, #1
	str	r3, [fp, #-92]
	b	.L24
.L45:
	ldr	r3, [fp, #-88]
	add	r3, r3, #1
	str	r3, [fp, #-88]
	b	.L24
.L44:
	ldr	r3, [fp, #-84]
	add	r3, r3, #1
	str	r3, [fp, #-84]
	b	.L24
.L43:
	ldr	r3, [fp, #-80]
	add	r3, r3, #1
	str	r3, [fp, #-80]
	b	.L24
.L42:
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
	b	.L24
.L41:
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
	b	.L24
.L40:
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
	b	.L24
.L39:
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
	b	.L24
.L38:
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
	b	.L24
.L37:
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
	b	.L24
.L36:
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
	b	.L24
.L35:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
	b	.L24
.L34:
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
	b	.L24
.L33:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
	b	.L24
.L32:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
	b	.L24
.L31:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
	b	.L24
.L30:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
	b	.L24
.L29:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	b	.L24
.L28:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	b	.L24
.L27:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	b	.L24
.L25:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	nop
.L24:
	ldr	r3, [fp, #-124]
	add	r3, r3, #1
	str	r3, [fp, #-124]
.L23:
	ldr	r2, [fp, #-124]
	ldr	r3, [fp, #-128]
	cmp	r2, r3
	blt	.L52
	ldr	r3, [fp, #-112]
	str	r3, [fp, #-116]
	mov	r3, #0
	str	r3, [fp, #-120]
	mov	r3, #0
	str	r3, [fp, #-124]
	b	.L53
.L55:
	ldr	r3, [fp, #-124]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-108]
	ldr	r2, [fp, #-116]
	cmp	r2, r3
	bge	.L54
	ldr	r3, [fp, #-124]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-108]
	str	r3, [fp, #-116]
	ldr	r3, [fp, #-124]
	str	r3, [fp, #-120]
.L54:
	ldr	r3, [fp, #-124]
	add	r3, r3, #1
	str	r3, [fp, #-124]
.L53:
	ldr	r3, [fp, #-124]
	cmp	r3, #25
	ble	.L55
	ldr	r3, [fp, #-120]
	and	r3, r3, #255
	add	r3, r3, #65
	and	r3, r3, #255
	ldr	r2, .L58
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L57
	bl	__stack_chk_fail
.L57:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L59:
	.align	2
.L58:
	.word	.LC5
	.word	train_letters_set
	.size	KNN, .-KNN
	.global	__aeabi_fcmpgt
	.section	.rodata
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	Sort_letters_distance
	.syntax unified
	.arm
	.fpu softvfp
	.type	Sort_letters_distance, %function
Sort_letters_distance:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #88
	ldr	r3, .L69
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-88]
	b	.L61
.L66:
	ldr	r3, [fp, #-88]
	add	r3, r3, #1
	str	r3, [fp, #-84]
	b	.L62
.L65:
	ldr	r1, .L69+4
	ldr	r2, [fp, #-88]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #68
	ldr	r0, [r3]	@ float
	ldr	r1, .L69+4
	ldr	r2, [fp, #-84]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #68
	ldr	r3, [r3]	@ float
	mov	r1, r3
	bl	__aeabi_fcmpgt
	mov	r3, r0
	cmp	r3, #0
	beq	.L63
	ldr	r1, .L69+4
	ldr	r2, [fp, #-88]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r2, r1, r3
	sub	r3, fp, #80
	mov	r1, r2
	mov	r2, #72
	mov	r0, r3
	bl	memcpy
	ldr	r1, .L69+4
	ldr	r2, [fp, #-88]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r0, r1, r3
	ldr	r1, .L69+4
	ldr	r2, [fp, #-84]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	mov	r1, r3
	mov	r3, #72
	mov	r2, r3
	bl	memcpy
	ldr	r1, .L69+4
	ldr	r2, [fp, #-84]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	mov	r0, r3
	sub	r3, fp, #80
	mov	r2, #72
	mov	r1, r3
	bl	memcpy
.L63:
	ldr	r3, [fp, #-84]
	add	r3, r3, #1
	str	r3, [fp, #-84]
.L62:
	ldr	r3, [fp, #-84]
	ldr	r2, .L69+8
	cmp	r3, r2
	ble	.L65
	ldr	r3, [fp, #-88]
	add	r3, r3, #1
	str	r3, [fp, #-88]
.L61:
	ldr	r3, [fp, #-88]
	ldr	r2, .L69+12
	cmp	r3, r2
	ble	.L66
	nop
	ldr	r3, .L69
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L67
	bl	__stack_chk_fail
.L67:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L70:
	.align	2
.L69:
	.word	.LC6
	.word	train_letters_set
	.word	19899
	.word	19898
	.size	Sort_letters_distance, .-Sort_letters_distance
	.section	.rodata
	.align	2
.LC7:
	.ascii	"               ************************************"
	.ascii	"***************************************************"
	.ascii	"*********\012               *                      "
	.ascii	"     K-NN Demo using Data Set: UCI Letter Recogniti"
	.ascii	"on                   *\012               *         "
	.ascii	"                              - [Yang (Simon) Guo] "
	.ascii	"-                                 *\012            "
	.ascii	"   ************************************************"
	.ascii	"************************************************\000"
	.align	2
.LC8:
	.ascii	"\012rows of training data set: %d\012\000"
	.align	2
.LC9:
	.ascii	"rows of test data set: %d\012\000"
	.align	2
.LC10:
	.ascii	"input K in K-nearest-neighbour algorithm: \000"
	.align	2
.LC11:
	.ascii	"%d\000"
	.align	2
.LC12:
	.ascii	"\012-------------------INDIVIDUAL TEST RESULT------"
	.ascii	"-------------\000"
	.align	2
.LC13:
	.ascii	"Distance is %f.\012\000"
	.align	2
.LC14:
	.ascii	"This subject belongs to class: [%c], prediction is "
	.ascii	"class: [%c], CORRECT!\012\000"
	.align	2
.LC15:
	.ascii	"This subject belongs to class: [%c], prediction is "
	.ascii	"class: [%c], WRONG!\012\000"
	.align	2
.LC16:
	.ascii	"\012-------------------TEST RESULT SUMMARY---------"
	.ascii	"----------\000"
	.align	2
.LC17:
	.ascii	"right prediction: %d\012\000"
	.align	2
.LC18:
	.ascii	"wrong prediction: %d\012\000"
	.global	__aeabi_fmul
	.global	__aeabi_fdiv
	.align	2
.LC19:
	.ascii	"accuracy: %.3f%% [%f]\012\000"
	.align	2
.LC20:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #40
	ldr	r3, .L78
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r0, .L78+4
	bl	puts
	ldr	r1, .L78+8
	ldr	r0, .L78+12
	bl	printf
	bl	Read_training_file_from_disk
	mov	r1, #100
	ldr	r0, .L78+16
	bl	printf
	bl	Read_testing_file_from_disk
	ldr	r0, .L78+20
	bl	printf
	sub	r3, fp, #36
	mov	r1, r3
	ldr	r0, .L78+24
	bl	__isoc99_scanf
	ldr	r0, .L78+28
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L72
.L75:
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #3
	ldr	r2, .L78+32
	add	r3, r3, r2
	str	r3, [fp, #-20]
	ldr	r0, [fp, #-20]
	bl	Calc_Euclidean_Distance
	bl	Sort_letters_distance
	ldr	r3, [fp, #-36]
	mov	r0, r3
	bl	KNN
	mov	r3, r0
	strb	r3, [fp, #-37]
	ldr	r1, .L78+32
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-37]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L73
	ldr	r3, .L78+36
	ldr	r3, [r3, #68]	@ float
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L78+40
	bl	printf
	ldr	r1, .L78+32
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r0, .L78+44
	bl	printf
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
	b	.L74
.L73:
	ldr	r3, .L78+36
	ldr	r3, [r3, #68]	@ float
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L78+40
	bl	printf
	ldr	r1, .L78+32
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r0, .L78+48
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L74:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L72:
	ldr	r3, [fp, #-32]
	cmp	r3, #99
	ble	.L75
	ldr	r0, .L78+52
	bl	puts
	ldr	r1, [fp, #-28]
	ldr	r0, .L78+56
	bl	printf
	ldr	r1, [fp, #-24]
	ldr	r0, .L78+60
	bl	printf
	ldr	r0, [fp, #-28]
	bl	__aeabi_i2f
	mov	r3, r0
	ldr	r1, .L78+64
	mov	r0, r3
	bl	__aeabi_fmul
	mov	r3, r0
	ldr	r1, .L78+64
	mov	r0, r3
	bl	__aeabi_fdiv
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r4, r0
	mov	r5, r1
	ldr	r0, [fp, #-28]
	bl	__aeabi_i2f
	mov	r3, r0
	ldr	r1, .L78+64
	mov	r0, r3
	bl	__aeabi_fdiv
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	stm	sp, {r2-r3}
	mov	r2, r4
	mov	r3, r5
	ldr	r0, .L78+68
	bl	printf
	mov	r3, #0
	ldr	r2, .L78
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L77
	bl	__stack_chk_fail
.L77:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L79:
	.align	2
.L78:
	.word	.LC20
	.word	.LC7
	.word	19900
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	test_letters_set
	.word	train_letters_set
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	1120403456
	.word	.LC19
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
