	.file	"116370.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"======================="
.LC1:
	.string	"[1] \354\235\264\353\257\270\354\247\200 \353\266\210\353\237\254\354\230\244\352\270\260"
.LC2:
	.string	"[2] \354\235\264\353\257\270\354\247\200 \354\240\225\355\225\251(SSD)"
.LC3:
	.string	"[3] \354\235\264\353\257\270\354\247\200 \354\240\225\355\225\251(NCC)"
.LC4:
	.string	"[4] \354\242\205\353\243\214"
.LC5:
	.string	"\353\251\224\353\211\264 \354\204\240\355\203\235> "
.LC6:
	.string	"%d"
.LC7:
	.string	"\354\235\264\353\257\270\354\247\200 \354\235\264\353\246\204: "
.LC8:
	.string	"%s"
.LC9:
	.string	"r"
.LC10:
	.string	"Cannot open the file!"
.LC11:
	.string	"%d%d%d"
	.align 8
.LC12:
	.string	"\354\235\264\353\257\270\354\247\200 \354\235\275\352\270\260\353\245\274 \354\231\204\353\243\214\355\226\210\354\212\265\353\213\210\353\213\244."
	.align 8
.LC13:
	.string	"[1] \354\235\264\353\257\270\354\247\200 \353\263\200\352\262\275 - \355\230\204\354\236\254 \354\235\264\353\257\270\354\247\200: %s\n"
	.align 8
.LC14:
	.string	"SSD - R : [%d, %d]  G : [%d, %d]\n"
	.align 8
.LC15:
	.string	"\352\262\260\352\263\274 \354\235\264\353\257\270\354\247\200 \355\214\214\354\235\274: %s_SSD_R%d_%d_G%d_%d%s\n"
	.align 8
.LC16:
	.string	"NCC - R : [%d, %d]  G : [%d, %d]\n"
	.align 8
.LC17:
	.string	"\352\262\260\352\263\274 \354\235\264\353\257\270\354\247\200 \355\214\214\354\235\274: %s_NCC_R%d_%d_G%d_%d.ppm\n"
.LC18:
	.string	"It is not a valid number!"
.LC19:
	.string	"Call an image first!"
	.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
	push	rbx
	sub	rsp, 360
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -356[rbp], 0
	mov	DWORD PTR -352[rbp], 0
	mov	QWORD PTR -320[rbp], 0
	mov	QWORD PTR -312[rbp], 0
	mov	QWORD PTR -304[rbp], 0
	lea	rax, -272[rbp]
	mov	esi, 46
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -328[rbp], rax
.L26:
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -364[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -364[rbp]
	cmp	eax, 1
	jne	.L2
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -272[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -296[rbp], rax
	cmp	QWORD PTR -296[rbp], 0
	jne	.L3
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	edi, 10
	call	putchar@PLT
	jmp	.L4
.L3:
	lea	rdx, -352[rbp]
	lea	rcx, -356[rbp]
	mov	rax, QWORD PTR -296[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	readppm
	mov	eax, DWORD PTR -352[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -320[rbp], rax
	mov	DWORD PTR -336[rbp], 0
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -356[rbp]
	cdqe
	sal	rax, 2
	mov	edx, DWORD PTR -336[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -320[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	add	DWORD PTR -336[rbp], 1
.L5:
	mov	eax, DWORD PTR -352[rbp]
	cmp	DWORD PTR -336[rbp], eax
	jl	.L6
	mov	eax, DWORD PTR -352[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -312[rbp], rax
	mov	DWORD PTR -336[rbp], 0
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -356[rbp]
	cdqe
	sal	rax, 2
	mov	edx, DWORD PTR -336[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -312[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	add	DWORD PTR -336[rbp], 1
.L7:
	mov	eax, DWORD PTR -352[rbp]
	cmp	DWORD PTR -336[rbp], eax
	jl	.L8
	mov	eax, DWORD PTR -352[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -304[rbp], rax
	mov	DWORD PTR -336[rbp], 0
	jmp	.L9
.L10:
	mov	eax, DWORD PTR -356[rbp]
	cdqe
	sal	rax, 2
	mov	edx, DWORD PTR -336[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -304[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	add	DWORD PTR -336[rbp], 1
.L9:
	mov	eax, DWORD PTR -352[rbp]
	cmp	DWORD PTR -336[rbp], eax
	jl	.L10
	mov	DWORD PTR -336[rbp], 0
	jmp	.L11
.L14:
	mov	DWORD PTR -332[rbp], 0
	jmp	.L12
.L13:
	lea	rsi, -340[rbp]
	lea	rcx, -344[rbp]
	lea	rdx, -348[rbp]
	mov	rax, QWORD PTR -296[rbp]
	mov	r8, rsi
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	eax, DWORD PTR -336[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -320[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -332[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR -348[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -336[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -312[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -332[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR -344[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -336[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -304[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -332[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR -340[rbp]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -332[rbp], 1
.L12:
	mov	eax, DWORD PTR -356[rbp]
	cmp	DWORD PTR -332[rbp], eax
	jl	.L13
	add	DWORD PTR -336[rbp], 1
.L11:
	mov	eax, DWORD PTR -352[rbp]
	cmp	DWORD PTR -336[rbp], eax
	jl	.L14
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -360[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -360[rbp]
	cmp	eax, 1
	jne	.L15
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -360[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	jmp	.L4
.L15:
	mov	eax, DWORD PTR -360[rbp]
	cmp	eax, 2
	jne	.L16
	mov	ecx, DWORD PTR -352[rbp]
	mov	edx, DWORD PTR -356[rbp]
	mov	rsi, QWORD PTR -304[rbp]
	mov	rax, QWORD PTR -320[rbp]
	mov	rdi, rax
	call	calc_SSD
	mov	QWORD PTR -288[rbp], rax
	mov	ecx, DWORD PTR -352[rbp]
	mov	edx, DWORD PTR -356[rbp]
	mov	rsi, QWORD PTR -304[rbp]
	mov	rax, QWORD PTR -312[rbp]
	mov	rdi, rax
	call	calc_SSD
	mov	QWORD PTR -280[rbp], rax
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	esi, DWORD PTR -276[rbp]
	mov	ecx, DWORD PTR -280[rbp]
	mov	edx, DWORD PTR -284[rbp]
	mov	eax, DWORD PTR -288[rbp]
	mov	r8d, esi
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L17
.L18:
	mov	rax, QWORD PTR -328[rbp]
	add	rax, 1
	mov	esi, 46
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -328[rbp], rax
.L17:
	cmp	QWORD PTR -328[rbp], 0
	jne	.L18
	mov	edi, DWORD PTR -276[rbp]
	mov	esi, DWORD PTR -280[rbp]
	mov	ecx, DWORD PTR -284[rbp]
	mov	edx, DWORD PTR -288[rbp]
	lea	rax, -272[rbp]
	sub	rsp, 8
	push	QWORD PTR -328[rbp]
	mov	r9d, edi
	mov	r8d, esi
	mov	rsi, rax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 16
	jmp	.L4
.L16:
	mov	eax, DWORD PTR -360[rbp]
	cmp	eax, 3
	jne	.L19
	mov	ecx, DWORD PTR -352[rbp]
	mov	edx, DWORD PTR -356[rbp]
	mov	rsi, QWORD PTR -304[rbp]
	mov	rax, QWORD PTR -320[rbp]
	mov	rdi, rax
	call	calc_NCC
	mov	QWORD PTR -288[rbp], rax
	mov	ecx, DWORD PTR -352[rbp]
	mov	edx, DWORD PTR -356[rbp]
	mov	rsi, QWORD PTR -304[rbp]
	mov	rax, QWORD PTR -312[rbp]
	mov	rdi, rax
	call	calc_NCC
	mov	QWORD PTR -280[rbp], rax
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	esi, DWORD PTR -276[rbp]
	mov	ecx, DWORD PTR -280[rbp]
	mov	edx, DWORD PTR -284[rbp]
	mov	eax, DWORD PTR -288[rbp]
	mov	r8d, esi
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, DWORD PTR -276[rbp]
	mov	esi, DWORD PTR -280[rbp]
	mov	ecx, DWORD PTR -284[rbp]
	mov	edx, DWORD PTR -288[rbp]
	lea	rax, -272[rbp]
	mov	r9d, edi
	mov	r8d, esi
	mov	rsi, rax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L4
.L19:
	mov	eax, DWORD PTR -360[rbp]
	cmp	eax, 4
	jne	.L20
	mov	eax, 0
	jmp	.L27
.L20:
	lea	rdi, .LC18[rip]
	call	puts@PLT
	jmp	.L4
.L2:
	mov	eax, DWORD PTR -364[rbp]
	cmp	eax, 2
	jne	.L22
	lea	rdi, .LC19[rip]
	call	puts@PLT
	jmp	.L4
.L22:
	mov	eax, DWORD PTR -364[rbp]
	cmp	eax, 3
	jne	.L23
	lea	rdi, .LC19[rip]
	call	puts@PLT
	jmp	.L4
.L23:
	mov	eax, DWORD PTR -364[rbp]
	cmp	eax, 4
	jne	.L24
	mov	eax, 0
	jmp	.L27
.L24:
	mov	eax, DWORD PTR -364[rbp]
	test	eax, eax
	jle	.L25
	mov	eax, DWORD PTR -364[rbp]
	cmp	eax, 4
	jle	.L4
.L25:
	lea	rdi, .LC18[rip]
	call	puts@PLT
	nop
.L4:
	mov	eax, DWORD PTR -364[rbp]
	cmp	eax, 4
	jne	.L26
	mov	eax, 0
.L27:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC20:
	.string	"%*c%*d %d %d %*d\n"
	.text
	.globl	readppm
	.type	readppm, @function
readppm:
.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	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	mov	rcx, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	readppm, .-readppm
	.globl	calc_SSD
	.type	calc_SSD, @function
calc_SSD:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	DWORD PTR -68[rbp], edx
	mov	DWORD PTR -72[rbp], ecx
	mov	DWORD PTR -40[rbp], 2147483647
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -8[rbp], -15
	mov	DWORD PTR -4[rbp], -15
	mov	DWORD PTR -24[rbp], -15
	jmp	.L31
.L43:
	mov	DWORD PTR -20[rbp], -15
	jmp	.L32
.L42:
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -32[rbp], 0
	jmp	.L33
.L40:
	mov	DWORD PTR -28[rbp], 0
	jmp	.L34
.L39:
	cmp	DWORD PTR -24[rbp], 0
	js	.L35
	cmp	DWORD PTR -20[rbp], 0
	js	.L36
	mov	eax, DWORD PTR -20[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -20[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -32[rbp]
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -24[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -24[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -28[rbp]
	add	eax, edx
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L37
.L36:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -20[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -32[rbp]
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -24[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -24[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -28[rbp]
	add	eax, edx
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L37
.L35:
	cmp	DWORD PTR -20[rbp], 0
	js	.L38
	mov	eax, DWORD PTR -20[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -20[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -32[rbp]
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -24[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -24[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -28[rbp]
	add	eax, edx
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L37
.L38:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -24[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -24[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -28[rbp]
	add	eax, edx
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -20[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -32[rbp]
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
.L37:
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, DWORD PTR -12[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, DWORD PTR -12[rbp]
	imul	eax, edx
	add	DWORD PTR -36[rbp], eax
	add	DWORD PTR -28[rbp], 1
.L34:
	mov	eax, DWORD PTR -24[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -24[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -68[rbp]
	sub	edx, eax
	cmp	DWORD PTR -28[rbp], edx
	jl	.L39
	add	DWORD PTR -32[rbp], 1
.L33:
	mov	eax, DWORD PTR -20[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -20[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -72[rbp]
	sub	edx, eax
	cmp	DWORD PTR -32[rbp], edx
	jl	.L40
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jle	.L41
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -40[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -4[rbp], eax
.L41:
	add	DWORD PTR -20[rbp], 1
.L32:
	cmp	DWORD PTR -20[rbp], 15
	jle	.L42
	add	DWORD PTR -24[rbp], 1
.L31:
	cmp	DWORD PTR -24[rbp], 15
	jle	.L43
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	calc_SSD, .-calc_SSD
	.globl	calc_NCC
	.type	calc_NCC, @function
calc_NCC:
.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, 112
	mov	QWORD PTR -72[rbp], rdi
	mov	QWORD PTR -80[rbp], rsi
	mov	DWORD PTR -84[rbp], edx
	mov	DWORD PTR -88[rbp], ecx
	movsd	xmm0, QWORD PTR .LC21[rip]
	movsd	QWORD PTR -24[rbp], xmm0
	pxor	xmm0, xmm0
	movsd	QWORD PTR -16[rbp], xmm0
	mov	DWORD PTR -8[rbp], -15
	mov	DWORD PTR -4[rbp], -15
	mov	DWORD PTR -52[rbp], -15
	jmp	.L46
.L65:
	mov	DWORD PTR -48[rbp], -15
	jmp	.L47
.L64:
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -32[rbp], 0
	mov	DWORD PTR -28[rbp], 0
	mov	DWORD PTR -60[rbp], 0
	jmp	.L48
.L55:
	mov	DWORD PTR -56[rbp], 0
	jmp	.L49
.L54:
	cmp	DWORD PTR -52[rbp], 0
	js	.L50
	cmp	DWORD PTR -48[rbp], 0
	js	.L51
	mov	eax, DWORD PTR -48[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -48[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -60[rbp]
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -52[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -52[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -56[rbp]
	add	eax, edx
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -40[rbp], eax
	jmp	.L52
.L51:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -48[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -60[rbp]
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -52[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -52[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -56[rbp]
	add	eax, edx
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -40[rbp], eax
	jmp	.L52
.L50:
	cmp	DWORD PTR -48[rbp], 0
	js	.L53
	mov	eax, DWORD PTR -48[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -48[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -60[rbp]
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -52[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -52[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -56[rbp]
	add	eax, edx
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -40[rbp], eax
	jmp	.L52
.L53:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -52[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -52[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -56[rbp]
	add	eax, edx
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -48[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -60[rbp]
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -40[rbp], eax
.L52:
	mov	eax, DWORD PTR -44[rbp]
	imul	eax, DWORD PTR -40[rbp]
	add	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	imul	eax, eax
	add	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	imul	eax, eax
	add	DWORD PTR -28[rbp], eax
	add	DWORD PTR -56[rbp], 1
.L49:
	mov	eax, DWORD PTR -52[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -52[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -84[rbp]
	sub	edx, eax
	cmp	DWORD PTR -56[rbp], edx
	jl	.L54
	add	DWORD PTR -60[rbp], 1
.L48:
	mov	eax, DWORD PTR -48[rbp]
	cdq
	mov	eax, edx
	xor	eax, DWORD PTR -48[rbp]
	sub	eax, edx
	mov	edx, DWORD PTR -88[rbp]
	sub	edx, eax
	cmp	DWORD PTR -60[rbp], edx
	jl	.L55
	mov	eax, DWORD PTR -36[rbp]
	test	rax, rax
	js	.L56
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, rax
	movsd	QWORD PTR -96[rbp], xmm2
	jmp	.L57
.L56:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
	movsd	QWORD PTR -96[rbp], xmm0
.L57:
	mov	eax, DWORD PTR -32[rbp]
	test	rax, rax
	js	.L58
	pxor	xmm3, xmm3
	cvtsi2sd	xmm3, rax
	movq	rax, xmm3
	jmp	.L59
.L58:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
	movq	rax, xmm0
.L59:
	movq	xmm0, rax
	call	sqrt@PLT
	movsd	QWORD PTR -104[rbp], xmm0
	mov	eax, DWORD PTR -28[rbp]
	test	rax, rax
	js	.L60
	pxor	xmm4, xmm4
	cvtsi2sd	xmm4, rax
	movq	rax, xmm4
	jmp	.L61
.L60:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
	movq	rax, xmm0
.L61:
	movq	xmm0, rax
	call	sqrt@PLT
	movsd	xmm1, QWORD PTR -104[rbp]
	mulsd	xmm1, xmm0
	movsd	xmm0, QWORD PTR -96[rbp]
	divsd	xmm0, xmm1
	movsd	QWORD PTR -16[rbp], xmm0
	movsd	xmm0, QWORD PTR -16[rbp]
	comisd	xmm0, QWORD PTR -24[rbp]
	jbe	.L62
	movsd	xmm0, QWORD PTR -16[rbp]
	movsd	QWORD PTR -24[rbp], xmm0
	mov	eax, DWORD PTR -52[rbp]
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	mov	DWORD PTR -4[rbp], eax
.L62:
	add	DWORD PTR -48[rbp], 1
.L47:
	cmp	DWORD PTR -48[rbp], 15
	jle	.L64
	add	DWORD PTR -52[rbp], 1
.L46:
	cmp	DWORD PTR -52[rbp], 15
	jle	.L65
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	calc_NCC, .-calc_NCC
	.section	.rodata
	.align 8
.LC21:
	.long	0
	.long	-1074790400
	.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	"116370.c"
	.text
	.section	.rodata
	.align	2
.LC1:
	.ascii	"=======================\000"
	.align	2
.LC2:
	.ascii	"[1] \354\235\264\353\257\270\354\247\200 \353\266\210"
	.ascii	"\353\237\254\354\230\244\352\270\260\000"
	.align	2
.LC3:
	.ascii	"[2] \354\235\264\353\257\270\354\247\200 \354\240\225"
	.ascii	"\355\225\251(SSD)\000"
	.align	2
.LC4:
	.ascii	"[3] \354\235\264\353\257\270\354\247\200 \354\240\225"
	.ascii	"\355\225\251(NCC)\000"
	.align	2
.LC5:
	.ascii	"[4] \354\242\205\353\243\214\000"
	.align	2
.LC6:
	.ascii	"\353\251\224\353\211\264 \354\204\240\355\203\235> "
	.ascii	"\000"
	.align	2
.LC7:
	.ascii	"%d\000"
	.align	2
.LC8:
	.ascii	"\354\235\264\353\257\270\354\247\200 \354\235\264\353"
	.ascii	"\246\204: \000"
	.align	2
.LC9:
	.ascii	"%s\000"
	.align	2
.LC10:
	.ascii	"r\000"
	.align	2
.LC11:
	.ascii	"Cannot open the file!\000"
	.align	2
.LC12:
	.ascii	"%d%d%d\000"
	.align	2
.LC13:
	.ascii	"\354\235\264\353\257\270\354\247\200 \354\235\275\352"
	.ascii	"\270\260\353\245\274 \354\231\204\353\243\214\355\226"
	.ascii	"\210\354\212\265\353\213\210\353\213\244.\000"
	.align	2
.LC14:
	.ascii	"[1] \354\235\264\353\257\270\354\247\200 \353\263\200"
	.ascii	"\352\262\275 - \355\230\204\354\236\254 \354\235\264"
	.ascii	"\353\257\270\354\247\200: %s\012\000"
	.align	2
.LC15:
	.ascii	"SSD - R : [%d, %d]  G : [%d, %d]\012\000"
	.align	2
.LC16:
	.ascii	"\352\262\260\352\263\274 \354\235\264\353\257\270\354"
	.ascii	"\247\200 \355\214\214\354\235\274: %s_SSD_R%d_%d_G%"
	.ascii	"d_%d%s\012\000"
	.align	2
.LC17:
	.ascii	"NCC - R : [%d, %d]  G : [%d, %d]\012\000"
	.align	2
.LC18:
	.ascii	"\352\262\260\352\263\274 \354\235\264\353\257\270\354"
	.ascii	"\247\200 \355\214\214\354\235\274: %s_NCC_R%d_%d_G%"
	.ascii	"d_%d.ppm\012\000"
	.align	2
.LC19:
	.ascii	"It is not a valid number!\000"
	.align	2
.LC20:
	.ascii	"Call an image first!\000"
	.align	2
.LC21:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 200
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #220
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-200]
	mov	r3, #0
	str	r3, [fp, #-196]
	mov	r3, #0
	str	r3, [fp, #-168]
	mov	r3, #0
	str	r3, [fp, #-164]
	mov	r3, #0
	str	r3, [fp, #-160]
	sub	r3, fp, #136
	mov	r1, #46
	mov	r0, r3
	bl	strchr
	str	r0, [fp, #-180]
.L26:
	ldr	r0, .L29+4
	bl	puts
	ldr	r0, .L29+8
	bl	puts
	ldr	r0, .L29+12
	bl	puts
	ldr	r0, .L29+16
	bl	puts
	ldr	r0, .L29+20
	bl	puts
	ldr	r0, .L29+4
	bl	puts
	ldr	r0, .L29+24
	bl	printf
	sub	r3, fp, #208
	mov	r1, r3
	ldr	r0, .L29+28
	bl	__isoc99_scanf
	ldr	r3, [fp, #-208]
	cmp	r3, #1
	bne	.L2
	ldr	r0, .L29+32
	bl	printf
	sub	r3, fp, #136
	mov	r1, r3
	ldr	r0, .L29+36
	bl	__isoc99_scanf
	sub	r3, fp, #136
	ldr	r1, .L29+40
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-156]
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	bne	.L3
	ldr	r0, .L29+44
	bl	puts
	mov	r0, #10
	bl	putchar
	b	.L4
.L3:
	sub	r2, fp, #196
	sub	r3, fp, #200
	mov	r1, r3
	ldr	r0, [fp, #-156]
	bl	readppm
	ldr	r3, [fp, #-196]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-168]
	mov	r3, #0
	str	r3, [fp, #-176]
	b	.L5
.L6:
	ldr	r3, [fp, #-200]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-168]
	add	r4, r2, r3
	mov	r0, r1
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-176]
	add	r3, r3, #1
	str	r3, [fp, #-176]
.L5:
	ldr	r3, [fp, #-196]
	ldr	r2, [fp, #-176]
	cmp	r2, r3
	blt	.L6
	ldr	r3, [fp, #-196]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-164]
	mov	r3, #0
	str	r3, [fp, #-176]
	b	.L7
.L8:
	ldr	r3, [fp, #-200]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-164]
	add	r4, r2, r3
	mov	r0, r1
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-176]
	add	r3, r3, #1
	str	r3, [fp, #-176]
.L7:
	ldr	r3, [fp, #-196]
	ldr	r2, [fp, #-176]
	cmp	r2, r3
	blt	.L8
	ldr	r3, [fp, #-196]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-160]
	mov	r3, #0
	str	r3, [fp, #-176]
	b	.L9
.L10:
	ldr	r3, [fp, #-200]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-160]
	add	r4, r2, r3
	mov	r0, r1
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-176]
	add	r3, r3, #1
	str	r3, [fp, #-176]
.L9:
	ldr	r3, [fp, #-196]
	ldr	r2, [fp, #-176]
	cmp	r2, r3
	blt	.L10
	mov	r3, #0
	str	r3, [fp, #-176]
	b	.L11
.L14:
	mov	r3, #0
	str	r3, [fp, #-172]
	b	.L12
.L13:
	sub	r1, fp, #188
	sub	r2, fp, #192
	sub	r3, fp, #184
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L29+48
	ldr	r0, [fp, #-156]
	bl	__isoc99_fscanf
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-168]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-172]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-192]
	str	r2, [r3]
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-164]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-172]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-188]
	str	r2, [r3]
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-160]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-172]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-184]
	str	r2, [r3]
	ldr	r3, [fp, #-172]
	add	r3, r3, #1
	str	r3, [fp, #-172]
.L12:
	ldr	r3, [fp, #-200]
	ldr	r2, [fp, #-172]
	cmp	r2, r3
	blt	.L13
	ldr	r3, [fp, #-176]
	add	r3, r3, #1
	str	r3, [fp, #-176]
.L11:
	ldr	r3, [fp, #-196]
	ldr	r2, [fp, #-176]
	cmp	r2, r3
	blt	.L14
	ldr	r0, .L29+52
	bl	puts
	mov	r0, #10
	bl	putchar
	ldr	r0, .L29+4
	bl	puts
	sub	r3, fp, #136
	mov	r1, r3
	ldr	r0, .L29+56
	bl	printf
	ldr	r0, .L29+12
	bl	puts
	ldr	r0, .L29+16
	bl	puts
	ldr	r0, .L29+20
	bl	puts
	ldr	r0, .L29+4
	bl	puts
	ldr	r0, .L29+24
	bl	printf
	sub	r3, fp, #204
	mov	r1, r3
	ldr	r0, .L29+28
	bl	__isoc99_scanf
	ldr	r3, [fp, #-204]
	cmp	r3, #1
	bne	.L15
	ldr	r0, .L29+32
	bl	printf
	sub	r3, fp, #136
	mov	r1, r3
	ldr	r0, .L29+36
	bl	__isoc99_scanf
	ldr	r0, .L29+4
	bl	puts
	sub	r3, fp, #136
	mov	r1, r3
	ldr	r0, .L29+56
	bl	printf
	ldr	r0, .L29+12
	bl	puts
	ldr	r0, .L29+16
	bl	puts
	ldr	r0, .L29+20
	bl	puts
	ldr	r0, .L29+4
	bl	puts
	ldr	r0, .L29+24
	bl	printf
	sub	r3, fp, #204
	mov	r1, r3
	ldr	r0, .L29+28
	bl	__isoc99_scanf
	b	.L4
.L15:
	ldr	r3, [fp, #-204]
	cmp	r3, #2
	bne	.L16
	ldr	r2, [fp, #-200]
	ldr	r3, [fp, #-196]
	sub	r0, fp, #152
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-160]
	ldr	r1, [fp, #-168]
	bl	calc_SSD
	ldr	r2, [fp, #-200]
	ldr	r3, [fp, #-196]
	sub	r0, fp, #144
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-160]
	ldr	r1, [fp, #-164]
	bl	calc_SSD
	mov	r0, #10
	bl	putchar
	ldr	r0, .L29+4
	bl	puts
	ldr	r1, [fp, #-152]
	ldr	r2, [fp, #-148]
	ldr	r0, [fp, #-144]
	ldr	r3, [fp, #-140]
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, .L29+60
	bl	printf
	b	.L17
.L18:
	ldr	r3, [fp, #-180]
	add	r3, r3, #1
	mov	r1, #46
	mov	r0, r3
	bl	strchr
	str	r0, [fp, #-180]
.L17:
	ldr	r3, [fp, #-180]
	cmp	r3, #0
	bne	.L18
	ldr	ip, [fp, #-152]
	ldr	lr, [fp, #-148]
	ldr	r3, [fp, #-144]
	ldr	r2, [fp, #-140]
	sub	r0, fp, #136
	ldr	r1, [fp, #-180]
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, lr
	mov	r2, ip
	mov	r1, r0
	ldr	r0, .L29+64
	bl	printf
	b	.L4
.L16:
	ldr	r3, [fp, #-204]
	cmp	r3, #3
	bne	.L19
	ldr	r2, [fp, #-200]
	ldr	r3, [fp, #-196]
	sub	r0, fp, #152
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-160]
	ldr	r1, [fp, #-168]
	bl	calc_NCC
	ldr	r2, [fp, #-200]
	ldr	r3, [fp, #-196]
	sub	r0, fp, #144
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-160]
	ldr	r1, [fp, #-164]
	bl	calc_NCC
	mov	r0, #10
	bl	putchar
	ldr	r0, .L29+4
	bl	puts
	ldr	r1, [fp, #-152]
	ldr	r2, [fp, #-148]
	ldr	r0, [fp, #-144]
	ldr	r3, [fp, #-140]
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, .L29+68
	bl	printf
	ldr	r0, [fp, #-152]
	ldr	ip, [fp, #-148]
	ldr	r3, [fp, #-144]
	ldr	r2, [fp, #-140]
	sub	r1, fp, #136
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, ip
	mov	r2, r0
	ldr	r0, .L29+72
	bl	printf
	b	.L4
.L19:
	ldr	r3, [fp, #-204]
	cmp	r3, #4
	bne	.L20
	mov	r3, #0
	b	.L27
.L20:
	ldr	r0, .L29+76
	bl	puts
	b	.L4
.L2:
	ldr	r3, [fp, #-208]
	cmp	r3, #2
	bne	.L22
	ldr	r0, .L29+80
	bl	puts
	b	.L4
.L22:
	ldr	r3, [fp, #-208]
	cmp	r3, #3
	bne	.L23
	ldr	r0, .L29+80
	bl	puts
	b	.L4
.L23:
	ldr	r3, [fp, #-208]
	cmp	r3, #4
	bne	.L24
	mov	r3, #0
	b	.L27
.L24:
	ldr	r3, [fp, #-208]
	cmp	r3, #0
	ble	.L25
	ldr	r3, [fp, #-208]
	cmp	r3, #4
	ble	.L4
.L25:
	ldr	r0, .L29+76
	bl	puts
	nop
.L4:
	ldr	r3, [fp, #-208]
	cmp	r3, #4
	bne	.L26
	mov	r3, #0
.L27:
	ldr	r2, .L29
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L28
	bl	__stack_chk_fail
.L28:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC21
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.size	main, .-main
	.section	.rodata
	.align	2
.LC22:
	.ascii	"%*c%*d %d %d %*d\012\000"
	.text
	.align	2
	.global	readppm
	.syntax unified
	.arm
	.fpu softvfp
	.type	readppm, %function
readppm:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	ldr	r1, .L32
	ldr	r0, [fp, #-8]
	bl	__isoc99_fscanf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L33:
	.align	2
.L32:
	.word	.LC22
	.size	readppm, .-readppm
	.section	.rodata
	.align	2
.LC0:
	.word	-15
	.word	-15
	.text
	.align	2
	.global	calc_SSD
	.syntax unified
	.arm
	.fpu softvfp
	.type	calc_SSD, %function
calc_SSD:
	@ args = 4, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #60
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	str	r2, [fp, #-56]
	str	r3, [fp, #-60]
	mvn	r3, #-2147483648
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-40]
	ldr	r2, .L49
	sub	r3, fp, #12
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	mvn	r3, #14
	str	r3, [fp, #-28]
	b	.L35
.L47:
	mvn	r3, #14
	str	r3, [fp, #-24]
	b	.L36
.L46:
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L37
.L44:
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L38
.L43:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	blt	.L39
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	blt	.L40
	ldr	r3, [fp, #-24]
	eor	r2, r3, r3, asr #31
	sub	r2, r2, r3, asr #31
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-56]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	eor	r1, r3, r3, asr #31
	sub	r1, r1, r3, asr #31
	ldr	r3, [fp, #-32]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	b	.L41
.L40:
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	eor	r2, r3, r3, asr #31
	sub	r2, r2, r3, asr #31
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-56]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	eor	r1, r3, r3, asr #31
	sub	r1, r1, r3, asr #31
	ldr	r3, [fp, #-32]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	b	.L41
.L39:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	blt	.L42
	ldr	r3, [fp, #-24]
	eor	r2, r3, r3, asr #31
	sub	r2, r2, r3, asr #31
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	eor	r1, r3, r3, asr #31
	sub	r1, r1, r3, asr #31
	ldr	r3, [fp, #-32]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-56]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	b	.L41
.L42:
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	eor	r1, r3, r3, asr #31
	sub	r1, r1, r3, asr #31
	ldr	r3, [fp, #-32]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	eor	r2, r3, r3, asr #31
	sub	r2, r2, r3, asr #31
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-56]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-16]
.L41:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	sub	r3, r2, r3
	ldr	r1, [fp, #-20]
	ldr	r2, [fp, #-16]
	sub	r2, r1, r2
	mul	r3, r2, r3
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L38:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	rsblt	r3, r3, #0
	ldr	r2, [fp, #-60]
	sub	r3, r2, r3
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	blt	.L43
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L37:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	rsblt	r3, r3, #0
	ldr	r2, [fp, #4]
	sub	r3, r2, r3
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	blt	.L44
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	ble	.L45
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-8]
.L45:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L36:
	ldr	r3, [fp, #-24]
	cmp	r3, #15
	ble	.L46
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L35:
	ldr	r3, [fp, #-28]
	cmp	r3, #15
	ble	.L47
	ldr	r3, [fp, #-48]
	mov	r2, r3
	sub	r3, fp, #12
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r0, [fp, #-48]
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L50:
	.align	2
.L49:
	.word	.LC0
	.size	calc_SSD, .-calc_SSD
	.global	__aeabi_ui2d
	.global	__aeabi_dmul
	.global	__aeabi_ddiv
	.global	__aeabi_dcmplt
	.align	2
	.global	calc_NCC
	.syntax unified
	.arm
	.fpu softvfp
	.type	calc_NCC, %function
calc_NCC:
	@ args = 4, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #80
	str	r0, [fp, #-88]
	str	r1, [fp, #-92]
	str	r2, [fp, #-96]
	str	r3, [fp, #-100]
	mov	r2, #0
	ldr	r3, .L68
	str	r2, [fp, #-44]
	str	r3, [fp, #-40]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	ldr	r2, .L68+4
	sub	r3, fp, #28
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	mvn	r3, #14
	str	r3, [fp, #-72]
	b	.L52
.L65:
	mvn	r3, #14
	str	r3, [fp, #-68]
	b	.L53
.L64:
	mov	r3, #0
	str	r3, [fp, #-56]
	mov	r3, #0
	str	r3, [fp, #-52]
	mov	r3, #0
	str	r3, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-80]
	b	.L54
.L61:
	mov	r3, #0
	str	r3, [fp, #-76]
	b	.L55
.L60:
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	blt	.L56
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	blt	.L57
	ldr	r3, [fp, #-68]
	eor	r2, r3, r3, asr #31
	sub	r2, r2, r3, asr #31
	ldr	r3, [fp, #-80]
	add	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-72]
	eor	r1, r3, r3, asr #31
	sub	r1, r1, r3, asr #31
	ldr	r3, [fp, #-76]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-60]
	b	.L58
.L57:
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-68]
	eor	r2, r3, r3, asr #31
	sub	r2, r2, r3, asr #31
	ldr	r3, [fp, #-80]
	add	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-72]
	eor	r1, r3, r3, asr #31
	sub	r1, r1, r3, asr #31
	ldr	r3, [fp, #-76]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-60]
	b	.L58
.L56:
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	blt	.L59
	ldr	r3, [fp, #-68]
	eor	r2, r3, r3, asr #31
	sub	r2, r2, r3, asr #31
	ldr	r3, [fp, #-80]
	add	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-72]
	eor	r1, r3, r3, asr #31
	sub	r1, r1, r3, asr #31
	ldr	r3, [fp, #-76]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-60]
	b	.L58
.L59:
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-72]
	eor	r1, r3, r3, asr #31
	sub	r1, r1, r3, asr #31
	ldr	r3, [fp, #-76]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-68]
	eor	r2, r3, r3, asr #31
	sub	r2, r2, r3, asr #31
	ldr	r3, [fp, #-80]
	add	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-60]
.L58:
	ldr	r3, [fp, #-64]
	ldr	r2, [fp, #-60]
	mul	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-64]
	mov	r2, r3
	mul	r2, r3, r2
	mov	r3, r2
	mov	r2, r3
	ldr	r3, [fp, #-52]
	add	r3, r3, r2
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-60]
	mov	r2, r3
	mul	r2, r3, r2
	mov	r3, r2
	mov	r2, r3
	ldr	r3, [fp, #-48]
	add	r3, r3, r2
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L55:
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	rsblt	r3, r3, #0
	ldr	r2, [fp, #-100]
	sub	r3, r2, r3
	ldr	r2, [fp, #-76]
	cmp	r2, r3
	blt	.L60
	ldr	r3, [fp, #-80]
	add	r3, r3, #1
	str	r3, [fp, #-80]
.L54:
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	rsblt	r3, r3, #0
	ldr	r2, [fp, #4]
	sub	r3, r2, r3
	ldr	r2, [fp, #-80]
	cmp	r2, r3
	blt	.L61
	ldr	r0, [fp, #-56]
	bl	__aeabi_ui2d
	mov	r4, r0
	mov	r5, r1
	ldr	r0, [fp, #-52]
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sqrt
	mov	r6, r0
	mov	r7, r1
	ldr	r0, [fp, #-48]
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sqrt
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	sub	r1, fp, #44
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmplt
	mov	r3, r0
	cmp	r3, #0
	beq	.L62
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-44]
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-72]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-68]
	str	r3, [fp, #-24]
.L62:
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L53:
	ldr	r3, [fp, #-68]
	cmp	r3, #15
	ble	.L64
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L52:
	ldr	r3, [fp, #-72]
	cmp	r3, #15
	ble	.L65
	ldr	r3, [fp, #-88]
	mov	r2, r3
	sub	r3, fp, #28
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r0, [fp, #-88]
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L69:
	.align	2
.L68:
	.word	-1074790400
	.word	.LC0
	.size	calc_NCC, .-calc_NCC
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
