	.file	"711801.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%s:\n"
.LC2:
	.string	"%s is correct\n"
.LC3:
	.string	"%s:"
.LC4:
	.string	" %s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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	eax, 0
	call	build_dict
	mov	QWORD PTR -24[rbp], rax
.L9:
	mov	edi, 15
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 35
	je	.L11
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	lookup
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L4
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L9
.L4:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR -16[rbp], rax
	jne	.L6
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L9
.L6:
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -28[rbp], 0
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -28[rbp], 1
.L7:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L8
	mov	edi, 10
	call	putchar@PLT
	jmp	.L9
.L11:
	nop
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	build_dict
	.type	build_dict, @function
build_dict:
.LFB7:
	.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	edi, 80000
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -20[rbp], 0
.L15:
	mov	edi, 15
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 35
	jne	.L13
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	jmp	.L17
.L13:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	add	DWORD PTR -20[rbp], 1
	jmp	.L15
.L17:
	mov	rax, QWORD PTR -16[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	build_dict, .-build_dict
	.globl	lookup
	.type	lookup, @function
lookup:
.LFB8:
	.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	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	edi, 80000
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], 0
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	jmp	.L19
.L23:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	calc_dist
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jne	.L20
	mov	DWORD PTR -16[rbp], 0
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rdx], rax
	jmp	.L21
.L20:
	cmp	DWORD PTR -12[rbp], 1
	jne	.L22
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -16[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -16[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR [rcx]
	mov	QWORD PTR [rdx], rax
.L22:
	add	DWORD PTR -20[rbp], 1
.L19:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L23
.L21:
	add	DWORD PTR -16[rbp], 1
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	lookup, .-lookup
	.globl	calc_dist
	.type	calc_dist, @function
calc_dist:
.LFB9:
	.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
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, DWORD PTR -4[rbp]
	cdq
	xor	eax, edx
	sub	eax, edx
	cmp	eax, 1
	jle	.L26
	mov	eax, 2
	jmp	.L27
.L26:
	mov	ecx, DWORD PTR -4[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	esi, DWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	calc_dist_helper2
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	calc_dist, .-calc_dist
	.globl	calc_dist_helper2
	.type	calc_dist_helper2, @function
calc_dist_helper2:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 104
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	QWORD PTR -104[rbp], rdi
	mov	DWORD PTR -108[rbp], esi
	mov	QWORD PTR -120[rbp], rdx
	mov	DWORD PTR -112[rbp], ecx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	QWORD PTR -128[rbp], rax
	mov	eax, DWORD PTR -112[rbp]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -108[rbp]
	lea	esi, 1[rax]
	movsx	rax, ecx
	sub	rax, 1
	mov	QWORD PTR -80[rbp], rax
	movsx	rax, ecx
	mov	QWORD PTR -144[rbp], rax
	mov	QWORD PTR -136[rbp], 0
	movsx	rax, ecx
	lea	rbx, 0[0+rax*4]
	movsx	rax, esi
	sub	rax, 1
	mov	QWORD PTR -72[rbp], rax
	movsx	rax, ecx
	mov	r14, rax
	mov	r15d, 0
	movsx	rax, esi
	mov	r12, rax
	mov	r13d, 0
	mov	rdx, r15
	imul	rdx, r12
	mov	rax, r13
	imul	rax, r14
	lea	rdi, [rdx+rax]
	mov	rax, r14
	mul	r12
	add	rdi, rdx
	mov	rdx, rdi
	movsx	rax, ecx
	mov	r10, rax
	mov	r11d, 0
	movsx	rax, esi
	mov	r8, rax
	mov	r9d, 0
	mov	rdx, r11
	imul	rdx, r8
	mov	rax, r9
	imul	rax, r10
	lea	rdi, [rdx+rax]
	mov	rax, r10
	mul	r8
	add	rdi, rdx
	mov	rdx, rdi
	movsx	rdx, ecx
	movsx	rax, esi
	imul	rax, rdx
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	edi, 16
	mov	edx, 0
	div	rdi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L29:
	cmp	rsp, rdx
	je	.L30
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L29
.L30:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L31
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L31:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	mov	DWORD PTR [rax], 0
	mov	DWORD PTR -84[rbp], 1
	jmp	.L32
.L33:
	mov	rcx, rbx
	shr	rcx, 2
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -84[rbp]
	movsx	rdx, edx
	imul	rdx, rcx
	mov	ecx, DWORD PTR -84[rbp]
	mov	DWORD PTR [rax+rdx*4], ecx
	add	DWORD PTR -84[rbp], 1
.L32:
	mov	eax, DWORD PTR -84[rbp]
	cmp	eax, DWORD PTR -108[rbp]
	jle	.L33
	mov	DWORD PTR -88[rbp], 1
	jmp	.L34
.L35:
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -88[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR -88[rbp]
	mov	DWORD PTR [rax+rdx*4], ecx
	add	DWORD PTR -88[rbp], 1
.L34:
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -112[rbp]
	jle	.L35
	mov	DWORD PTR -88[rbp], 1
	jmp	.L36
.L43:
	mov	DWORD PTR -84[rbp], 1
	jmp	.L37
.L42:
	mov	rcx, rbx
	shr	rcx, 2
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -88[rbp]
	movsx	rsi, edx
	mov	edx, DWORD PTR -84[rbp]
	movsx	rdx, edx
	imul	rdx, rcx
	add	rdx, rsi
	mov	DWORD PTR [rax+rdx*4], 0
	mov	rcx, rbx
	shr	rcx, 2
	mov	eax, DWORD PTR -84[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -88[rbp]
	lea	esi, -1[rax]
	mov	rax, QWORD PTR -64[rbp]
	movsx	rsi, esi
	movsx	rdx, edx
	imul	rdx, rcx
	add	rdx, rsi
	mov	eax, DWORD PTR [rax+rdx*4]
	cmp	eax, 1
	jg	.L38
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	lea	rcx, -1[rax]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L39
	mov	rcx, rbx
	shr	rcx, 2
	mov	eax, DWORD PTR -84[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -88[rbp]
	lea	edi, -1[rax]
	mov	rsi, rbx
	shr	rsi, 2
	mov	rax, QWORD PTR -64[rbp]
	movsx	rdi, edi
	movsx	rdx, edx
	imul	rdx, rcx
	add	rdx, rdi
	mov	edx, DWORD PTR [rax+rdx*4]
	mov	rax, QWORD PTR -64[rbp]
	mov	ecx, DWORD PTR -88[rbp]
	movsx	rdi, ecx
	mov	ecx, DWORD PTR -84[rbp]
	movsx	rcx, ecx
	imul	rcx, rsi
	add	rcx, rdi
	mov	DWORD PTR [rax+rcx*4], edx
	jmp	.L40
.L39:
	mov	rcx, rbx
	shr	rcx, 2
	mov	eax, DWORD PTR -84[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -88[rbp]
	lea	esi, -1[rax]
	mov	rax, QWORD PTR -64[rbp]
	movsx	rsi, esi
	movsx	rdx, edx
	imul	rdx, rcx
	add	rdx, rsi
	mov	eax, DWORD PTR [rax+rdx*4]
	lea	edx, 1[rax]
	mov	rsi, rbx
	shr	rsi, 2
	mov	eax, DWORD PTR -88[rbp]
	lea	ecx, -1[rax]
	mov	rax, QWORD PTR -64[rbp]
	movsx	rdi, ecx
	mov	ecx, DWORD PTR -84[rbp]
	movsx	rcx, ecx
	imul	rcx, rsi
	add	rcx, rdi
	mov	eax, DWORD PTR [rax+rcx*4]
	lea	ecx, 1[rax]
	mov	rdi, rbx
	shr	rdi, 2
	mov	eax, DWORD PTR -84[rbp]
	lea	r8d, -1[rax]
	mov	rax, QWORD PTR -64[rbp]
	mov	esi, DWORD PTR -88[rbp]
	movsx	r9, esi
	movsx	rsi, r8d
	imul	rsi, rdi
	add	rsi, r9
	mov	eax, DWORD PTR [rax+rsi*4]
	add	eax, 1
	mov	r12, rbx
	shr	r12, 2
	mov	esi, ecx
	mov	edi, eax
	call	min3
	mov	rdx, QWORD PTR -64[rbp]
	mov	ecx, DWORD PTR -88[rbp]
	movsx	rsi, ecx
	mov	ecx, DWORD PTR -84[rbp]
	movsx	rcx, ecx
	imul	rcx, r12
	add	rcx, rsi
	mov	DWORD PTR [rdx+rcx*4], eax
.L40:
	mov	rcx, rbx
	shr	rcx, 2
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -88[rbp]
	movsx	rsi, edx
	mov	edx, DWORD PTR -84[rbp]
	movsx	rdx, edx
	imul	rdx, rcx
	add	rdx, rsi
	mov	eax, DWORD PTR [rax+rdx*4]
	cmp	eax, 1
	jle	.L41
	mov	rcx, rbx
	shr	rcx, 2
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -88[rbp]
	movsx	rsi, edx
	mov	edx, DWORD PTR -84[rbp]
	movsx	rdx, edx
	imul	rdx, rcx
	add	rdx, rsi
	mov	DWORD PTR [rax+rdx*4], 2
	jmp	.L41
.L38:
	mov	rcx, rbx
	shr	rcx, 2
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -88[rbp]
	movsx	rsi, edx
	mov	edx, DWORD PTR -84[rbp]
	movsx	rdx, edx
	imul	rdx, rcx
	add	rdx, rsi
	mov	DWORD PTR [rax+rdx*4], 2
.L41:
	add	DWORD PTR -84[rbp], 1
.L37:
	mov	eax, DWORD PTR -84[rbp]
	cmp	eax, DWORD PTR -108[rbp]
	jle	.L42
	add	DWORD PTR -88[rbp], 1
.L36:
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -112[rbp]
	jle	.L43
	shr	rbx, 2
	mov	rcx, rbx
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -112[rbp]
	movsx	rsi, edx
	mov	edx, DWORD PTR -108[rbp]
	movsx	rdx, edx
	imul	rdx, rcx
	add	rdx, rsi
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	rsp, QWORD PTR -128[rbp]
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L45
	call	__stack_chk_fail@PLT
.L45:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	calc_dist_helper2, .-calc_dist_helper2
	.globl	calc_dist_helper
	.type	calc_dist_helper, @function
calc_dist_helper:
.LFB11:
	.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	QWORD PTR -40[rbp], rdx
	mov	DWORD PTR -32[rbp], ecx
	cmp	DWORD PTR -28[rbp], 0
	jne	.L47
	mov	eax, DWORD PTR -32[rbp]
	jmp	.L48
.L47:
	cmp	DWORD PTR -32[rbp], 0
	jne	.L49
	mov	eax, DWORD PTR -28[rbp]
	jmp	.L48
.L49:
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, DWORD PTR -32[rbp]
	cdq
	xor	eax, edx
	sub	eax, edx
	cmp	eax, 1
	jle	.L50
	mov	eax, 2
	jmp	.L48
.L50:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rcx, -1[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	setne	al
	movzx	eax, al
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	lea	esi, -1[rax]
	mov	ecx, DWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	calc_dist_helper
	add	eax, 1
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -32[rbp]
	lea	ecx, -1[rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	esi, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	calc_dist_helper
	add	eax, 1
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -32[rbp]
	lea	ecx, -1[rax]
	mov	eax, DWORD PTR -28[rbp]
	lea	esi, -1[rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	calc_dist_helper
	mov	edx, DWORD PTR -16[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	edx, DWORD PTR -4[rbp]
	mov	ecx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	min3
.L48:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	calc_dist_helper, .-calc_dist_helper
	.globl	min3
	.type	min3, @function
min3:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	DWORD PTR -12[rbp], edx
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jg	.L52
	mov	eax, DWORD PTR -12[rbp]
	cmp	DWORD PTR -4[rbp], eax
	cmovle	eax, DWORD PTR -4[rbp]
	jmp	.L53
.L52:
	mov	eax, DWORD PTR -12[rbp]
	cmp	DWORD PTR -8[rbp], eax
	cmovle	eax, DWORD PTR -8[rbp]
.L53:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	min3, .-min3
	.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	"711801.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s\000"
	.align	2
.LC1:
	.ascii	"%s:\012\000"
	.align	2
.LC2:
	.ascii	"%s is correct\012\000"
	.align	2
.LC3:
	.ascii	"%s:\000"
	.align	2
.LC4:
	.ascii	" %s\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	bl	build_dict
	str	r0, [fp, #-16]
.L9:
	mov	r0, #15
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r1, [fp, #-12]
	ldr	r0, .L12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-12]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #35
	beq	.L11
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-12]
	bl	lookup
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L4
	ldr	r1, [fp, #-12]
	ldr	r0, .L12+4
	bl	printf
	b	.L9
.L4:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bne	.L6
	ldr	r1, [fp, #-12]
	ldr	r0, .L12+8
	bl	printf
	b	.L9
.L6:
	ldr	r1, [fp, #-12]
	ldr	r0, .L12+12
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L7
.L8:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L12+16
	bl	printf
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L7:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L8
	mov	r0, #10
	bl	putchar
	b	.L9
.L11:
	nop
	mov	r0, #0
	bl	exit
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.align	2
	.global	build_dict
	.syntax unified
	.arm
	.fpu softvfp
	.type	build_dict, %function
build_dict:
	@ 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	r0, .L20
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
.L17:
	mov	r0, #15
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L20+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #35
	bne	.L15
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	b	.L19
.L15:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	b	.L17
.L19:
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	40000
	.word	.LC0
	.size	build_dict, .-build_dict
	.align	2
	.global	lookup
	.syntax unified
	.arm
	.fpu softvfp
	.type	lookup, %function
lookup:
	@ 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]
	str	r1, [fp, #-28]
	ldr	r0, .L29
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L23
.L27:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	calc_dist
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L24
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-24]
	str	r2, [r3]
	b	.L25
.L24:
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	bne	.L26
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	add	r1, r3, #1
	str	r1, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-12]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
.L26:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L23:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L27
.L25:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	40000
	.size	lookup, .-lookup
	.align	2
	.global	calc_dist
	.syntax unified
	.arm
	.fpu softvfp
	.type	calc_dist, %function
calc_dist:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r0, [fp, #-20]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	cmp	r3, #0
	rsblt	r3, r3, #0
	cmp	r3, #1
	ble	.L32
	mov	r3, #2
	b	.L33
.L32:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	calc_dist_helper2
	mov	r3, r0
.L33:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	calc_dist, .-calc_dist
	.section	.rodata
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	calc_dist_helper2
	.syntax unified
	.arm
	.fpu softvfp
	.type	calc_dist_helper2, %function
calc_dist_helper2:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, fp, lr}
	add	fp, sp, #24
	sub	sp, sp, #44
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	str	r2, [fp, #-64]
	str	r3, [fp, #-68]
	ldr	r3, .L49
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	mov	r3, sp
	mov	r8, r3
	ldr	r3, [fp, #-68]
	add	ip, r3, #1
	ldr	r3, [fp, #-60]
	add	lr, r3, #1
	sub	r3, ip, #1
	str	r3, [fp, #-44]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r4, r3, #2
	sub	r3, lr, #1
	str	r3, [fp, #-40]
	mov	r3, ip
	mov	r6, r3
	mov	r7, #0
	mov	r3, lr
	mov	r0, r3
	mov	r1, #0
	mul	r2, r0, r7
	mul	r3, r6, r1
	add	r5, r2, r3
	umull	r2, r3, r6, r0
	add	r1, r5, r3
	mov	r3, r1
	mov	r0, #0
	mov	r1, #0
	lsl	r1, r3, #5
	orr	r1, r1, r2, lsr #27
	lsl	r0, r2, #5
	mov	r3, ip
	mov	r6, r3
	mov	r7, #0
	mov	r3, lr
	mov	r0, r3
	mov	r1, #0
	mul	r2, r0, r7
	mul	r3, r6, r1
	add	r5, r2, r3
	umull	r2, r3, r6, r0
	add	r1, r5, r3
	mov	r3, r1
	mov	r0, #0
	mov	r1, #0
	lsl	r1, r3, #5
	orr	r1, r1, r2, lsr #27
	lsl	r0, r2, #5
	mov	r3, ip
	mov	r2, lr
	mul	r3, r2, r3
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #1
	str	r3, [fp, #-48]
	b	.L35
.L36:
	lsr	r2, r4, #2
	ldr	r3, [fp, #-36]
	ldr	r1, [fp, #-48]
	mul	r2, r1, r2
	ldr	r1, [fp, #-48]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L35:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-60]
	cmp	r2, r3
	ble	.L36
	mov	r3, #1
	str	r3, [fp, #-52]
	b	.L37
.L38:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-52]
	ldr	r1, [fp, #-52]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L37:
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-68]
	cmp	r2, r3
	ble	.L38
	mov	r3, #1
	str	r3, [fp, #-52]
	b	.L39
.L46:
	mov	r3, #1
	str	r3, [fp, #-48]
	b	.L40
.L45:
	lsr	r2, r4, #2
	ldr	r3, [fp, #-36]
	ldr	r1, [fp, #-48]
	mul	r1, r2, r1
	ldr	r2, [fp, #-52]
	add	r2, r1, r2
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	lsr	r1, r4, #2
	ldr	r3, [fp, #-48]
	sub	r0, r3, #1
	ldr	r3, [fp, #-52]
	sub	r2, r3, #1
	ldr	r3, [fp, #-36]
	mul	r1, r0, r1
	add	r2, r1, r2
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #1
	bgt	.L41
	ldr	r3, [fp, #-48]
	sub	r3, r3, #1
	ldr	r2, [fp, #-56]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-52]
	sub	r3, r3, #1
	ldr	r1, [fp, #-64]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L42
	lsr	r0, r4, #2
	ldr	r3, [fp, #-48]
	sub	ip, r3, #1
	ldr	r3, [fp, #-52]
	sub	r1, r3, #1
	lsr	r2, r4, #2
	ldr	r3, [fp, #-36]
	mul	r0, ip, r0
	add	r1, r0, r1
	ldr	r1, [r3, r1, lsl #2]
	ldr	r3, [fp, #-36]
	ldr	r0, [fp, #-48]
	mul	r0, r2, r0
	ldr	r2, [fp, #-52]
	add	r2, r0, r2
	str	r1, [r3, r2, lsl #2]
	b	.L43
.L42:
	lsr	r2, r4, #2
	ldr	r3, [fp, #-48]
	sub	r1, r3, #1
	ldr	r3, [fp, #-36]
	mul	r1, r2, r1
	ldr	r2, [fp, #-52]
	add	r2, r1, r2
	ldr	r3, [r3, r2, lsl #2]
	add	ip, r3, #1
	lsr	r1, r4, #2
	ldr	r3, [fp, #-52]
	sub	r2, r3, #1
	ldr	r3, [fp, #-36]
	ldr	r0, [fp, #-48]
	mul	r1, r0, r1
	add	r2, r1, r2
	ldr	r3, [r3, r2, lsl #2]
	add	lr, r3, #1
	lsr	r1, r4, #2
	ldr	r3, [fp, #-48]
	sub	r0, r3, #1
	ldr	r3, [fp, #-52]
	sub	r2, r3, #1
	ldr	r3, [fp, #-36]
	mul	r1, r0, r1
	add	r2, r1, r2
	ldr	r3, [r3, r2, lsl #2]
	add	r3, r3, #1
	lsr	r5, r4, #2
	mov	r2, r3
	mov	r1, lr
	mov	r0, ip
	bl	min3
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-48]
	mul	r1, r2, r5
	ldr	r2, [fp, #-52]
	add	r2, r1, r2
	str	r0, [r3, r2, lsl #2]
.L43:
	lsr	r2, r4, #2
	ldr	r3, [fp, #-36]
	ldr	r1, [fp, #-48]
	mul	r1, r2, r1
	ldr	r2, [fp, #-52]
	add	r2, r1, r2
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #1
	ble	.L44
	lsr	r2, r4, #2
	ldr	r3, [fp, #-36]
	ldr	r1, [fp, #-48]
	mul	r1, r2, r1
	ldr	r2, [fp, #-52]
	add	r2, r1, r2
	mov	r1, #2
	str	r1, [r3, r2, lsl #2]
	b	.L44
.L41:
	lsr	r2, r4, #2
	ldr	r3, [fp, #-36]
	ldr	r1, [fp, #-48]
	mul	r1, r2, r1
	ldr	r2, [fp, #-52]
	add	r2, r1, r2
	mov	r1, #2
	str	r1, [r3, r2, lsl #2]
.L44:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L40:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-60]
	cmp	r2, r3
	ble	.L45
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L39:
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-68]
	cmp	r2, r3
	ble	.L46
	lsr	r2, r4, #2
	ldr	r3, [fp, #-36]
	ldr	r1, [fp, #-60]
	mul	r1, r2, r1
	ldr	r2, [fp, #-68]
	add	r2, r1, r2
	ldr	r3, [r3, r2, lsl #2]
	mov	sp, r8
	ldr	r2, .L49
	ldr	r1, [r2]
	ldr	r2, [fp, #-32]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L48
	bl	__stack_chk_fail
.L48:
	mov	r0, r3
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, fp, pc}
.L50:
	.align	2
.L49:
	.word	.LC5
	.size	calc_dist_helper2, .-calc_dist_helper2
	.align	2
	.global	calc_dist_helper
	.syntax unified
	.arm
	.fpu softvfp
	.type	calc_dist_helper, %function
calc_dist_helper:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L52
	ldr	r3, [fp, #-36]
	b	.L53
.L52:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L54
	ldr	r3, [fp, #-28]
	b	.L53
.L54:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-36]
	sub	r3, r2, r3
	cmp	r3, #0
	rsblt	r3, r3, #0
	cmp	r3, #1
	ble	.L55
	mov	r3, #2
	b	.L53
.L55:
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	ldr	r1, [fp, #-32]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	movne	r3, #1
	moveq	r3, #0
	and	r3, r3, #255
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-28]
	sub	r1, r3, #1
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	ldr	r0, [fp, #-24]
	bl	calc_dist_helper
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	calc_dist_helper
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	sub	r1, r3, #1
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	ldr	r2, [fp, #-32]
	ldr	r0, [fp, #-24]
	bl	calc_dist_helper
	mov	r2, r0
	ldr	r3, [fp, #-20]
	add	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	min3
	mov	r3, r0
.L53:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	calc_dist_helper, .-calc_dist_helper
	.align	2
	.global	min3
	.syntax unified
	.arm
	.fpu softvfp
	.type	min3, %function
min3:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bgt	.L57
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	movlt	r3, r2
	movge	r3, r3
	b	.L58
.L57:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	movlt	r3, r2
	movge	r3, r3
.L58:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	min3, .-min3
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
