	.file	"147020.c"
	.intel_syntax noprefix
	.text
	.globl	init_out_image
	.type	init_out_image, @function
init_out_image:
.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, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, 16[rbp]
	mov	rdi, rax
	call	strcpy@PLT
	mov	edx, DWORD PTR 20[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	edx, DWORD PTR 24[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	edx, DWORD PTR 28[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 12[rax], edx
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 8[rax]
	cdqe
	mov	esi, 8
	mov	rdi, rax
	call	calloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	DWORD PTR -24[rbp], 0
	jmp	.L2
.L3:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	cdqe
	mov	rdx, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR 16[rdx]
	mov	edx, DWORD PTR -24[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	lea	rbx, [rcx+rdx]
	mov	esi, 4
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR [rbx], rax
	add	DWORD PTR -24[rbp], 1
.L2:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -24[rbp], eax
	jl	.L3
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 8[rax]
	cdqe
	mov	esi, 8
	mov	rdi, rax
	call	calloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	DWORD PTR -24[rbp], 0
	jmp	.L4
.L5:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	cdqe
	mov	rdx, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR 24[rdx]
	mov	edx, DWORD PTR -24[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	lea	rbx, [rcx+rdx]
	mov	esi, 4
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR [rbx], rax
	add	DWORD PTR -24[rbp], 1
.L4:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -24[rbp], eax
	jl	.L5
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 8[rax]
	cdqe
	mov	esi, 8
	mov	rdi, rax
	call	calloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 32[rax], rdx
	mov	DWORD PTR -24[rbp], 0
	jmp	.L6
.L7:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	cdqe
	mov	rdx, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR 32[rdx]
	mov	edx, DWORD PTR -24[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	lea	rbx, [rcx+rdx]
	mov	esi, 4
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR [rbx], rax
	add	DWORD PTR -24[rbp], 1
.L6:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -24[rbp], eax
	jl	.L7
	mov	DWORD PTR -24[rbp], 0
	jmp	.L8
.L11:
	mov	DWORD PTR -20[rbp], 0
	jmp	.L9
.L10:
	mov	rdx, QWORD PTR 32[rbp]
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 2
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR [rcx]
	mov	DWORD PTR [rdx], eax
	mov	rdx, QWORD PTR 32[rbp]
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 2
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 24[rax]
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR [rcx]
	mov	DWORD PTR [rdx], eax
	mov	rdx, QWORD PTR 32[rbp]
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 2
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 32[rax]
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR [rcx]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -20[rbp], 1
.L9:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L10
	add	DWORD PTR -24[rbp], 1
.L8:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -24[rbp], eax
	jl	.L11
	nop
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	init_out_image, .-init_out_image
	.globl	read_comments
	.type	read_comments, @function
read_comments:
.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, 144
	mov	QWORD PTR -136[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	nop
.L14:
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	BYTE PTR -113[rbp], al
	cmp	BYTE PTR -113[rbp], -1
	je	.L13
	movsx	eax, BYTE PTR -113[rbp]
	mov	edi, eax
	call	isspace@PLT
	test	eax, eax
	jne	.L14
.L13:
	cmp	BYTE PTR -113[rbp], 35
	jne	.L15
	mov	rdx, QWORD PTR -136[rbp]
	lea	rax, -112[rbp]
	mov	esi, 100
	mov	rdi, rax
	call	fgets@PLT
	jmp	.L18
.L15:
	mov	rax, QWORD PTR -136[rbp]
	mov	edx, 1
	mov	rsi, -2
	mov	rdi, rax
	call	fseek@PLT
.L18:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	read_comments, .-read_comments
	.section	.rodata
.LC0:
	.string	"rb"
.LC1:
	.string	"File could not opened!"
.LC2:
	.string	"%d %d %d"
.LC3:
	.string	"P2"
.LC4:
	.string	"%d"
.LC5:
	.string	"P5"
	.align 8
.LC6:
	.string	"Can not allocate memory for buffer! "
	.align 8
.LC7:
	.string	"_______________IMAGE INFO__________________"
	.align 8
.LC8:
	.string	"Version: %s \nWidth: %d \nHeight: %d \nMaximum Gray Level: %d \n"
	.text
	.globl	read_pgm_file
	.type	read_pgm_file, @function
read_pgm_file:
.LFB8:
	.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, 72
	.cfi_offset 3, -24
	mov	QWORD PTR -72[rbp], rdi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L20
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L19
.L20:
	mov	rax, QWORD PTR -80[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	esi, 3
	mov	rdi, rax
	call	fgets@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	read_comments
	mov	rax, QWORD PTR -80[rbp]
	lea	rsi, 12[rax]
	mov	rax, QWORD PTR -80[rbp]
	lea	rcx, 8[rax]
	mov	rax, QWORD PTR -80[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	r8, rsi
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	eax, DWORD PTR 8[rax]
	cdqe
	mov	esi, 8
	mov	rdi, rax
	call	calloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -80[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	DWORD PTR -52[rbp], 0
	jmp	.L22
.L23:
	mov	rax, QWORD PTR -80[rbp]
	mov	eax, DWORD PTR 4[rax]
	cdqe
	mov	rdx, QWORD PTR -80[rbp]
	mov	rcx, QWORD PTR 16[rdx]
	mov	edx, DWORD PTR -52[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	lea	rbx, [rcx+rdx]
	mov	esi, 4
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR [rbx], rax
	add	DWORD PTR -52[rbp], 1
.L22:
	mov	rax, QWORD PTR -80[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -52[rbp], eax
	jl	.L23
	mov	rax, QWORD PTR -80[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L24
	mov	DWORD PTR -52[rbp], 0
	jmp	.L25
.L28:
	mov	DWORD PTR -48[rbp], 0
	jmp	.L26
.L27:
	lea	rdx, -56[rbp]
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR -56[rbp]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -48[rbp], 1
.L26:
	mov	rax, QWORD PTR -80[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	DWORD PTR -48[rbp], eax
	jl	.L27
	add	DWORD PTR -52[rbp], 1
.L25:
	mov	rax, QWORD PTR -80[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -52[rbp], eax
	jl	.L28
	jmp	.L29
.L24:
	mov	rax, QWORD PTR -80[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L29
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -80[rbp]
	mov	eax, DWORD PTR 4[rax]
	imul	eax, edx
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	add	eax, 1
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L30
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L19
.L30:
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -80[rbp]
	mov	eax, DWORD PTR 8[rax]
	imul	eax, edx
	movsx	rdx, eax
	mov	rcx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -52[rbp], 0
	jmp	.L31
.L32:
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	ecx, BYTE PTR [rax]
	mov	rax, QWORD PTR -80[rbp]
	mov	rsi, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -80[rbp]
	mov	ebx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR -52[rbp]
	cdq
	idiv	ebx
	cdqe
	sal	rax, 3
	add	rax, rsi
	mov	rdi, QWORD PTR [rax]
	mov	rax, QWORD PTR -80[rbp]
	mov	esi, DWORD PTR 4[rax]
	mov	eax, DWORD PTR -52[rbp]
	cdq
	idiv	esi
	mov	eax, edx
	cdqe
	sal	rax, 2
	lea	rdx, [rdi+rax]
	movsx	eax, cl
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -52[rbp], 1
.L31:
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -80[rbp]
	mov	eax, DWORD PTR 4[rax]
	imul	eax, edx
	cmp	DWORD PTR -52[rbp], eax
	jl	.L32
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
.L29:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	esi, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -80[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -80[rbp]
	mov	r8d, esi
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
.L19:
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	read_pgm_file, .-read_pgm_file
	.globl	padding
	.type	padding, @function
padding:
.LFB9:
	.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 -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L36
.L37:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	cdqe
	sal	rax, 3
	sub	rax, 8
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	add	DWORD PTR -4[rbp], 1
.L36:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L37
	mov	DWORD PTR -4[rbp], 0
	jmp	.L38
.L39:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	cdqe
	sal	rax, 2
	sub	rax, 4
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	add	DWORD PTR -4[rbp], 1
.L38:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L39
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	padding, .-padding
	.globl	convolution
	.type	convolution, @function
convolution:
.LFB10:
	.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 -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	DWORD PTR -40[rbp], ecx
	mov	DWORD PTR -4[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L41
.L44:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L42
.L43:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	ecx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -36[rbp]
	add	eax, ecx
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	ecx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -40[rbp]
	add	eax, ecx
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	imul	eax, ecx
	add	DWORD PTR -4[rbp], eax
	add	DWORD PTR -8[rbp], 1
.L42:
	cmp	DWORD PTR -8[rbp], 2
	jle	.L43
	add	DWORD PTR -12[rbp], 1
.L41:
	cmp	DWORD PTR -12[rbp], 2
	jle	.L44
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	convolution, .-convolution
	.globl	sobel_edge_detector
	.type	sobel_edge_detector, @function
sobel_edge_detector:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	QWORD PTR -120[rbp], rdi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -96[rbp], -1
	mov	DWORD PTR -92[rbp], 0
	mov	DWORD PTR -88[rbp], 1
	mov	DWORD PTR -84[rbp], -2
	mov	DWORD PTR -80[rbp], 0
	mov	DWORD PTR -76[rbp], 2
	mov	DWORD PTR -72[rbp], -1
	mov	DWORD PTR -68[rbp], 0
	mov	DWORD PTR -64[rbp], 1
	mov	DWORD PTR -48[rbp], -1
	mov	DWORD PTR -44[rbp], -2
	mov	DWORD PTR -40[rbp], -1
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -32[rbp], 0
	mov	DWORD PTR -28[rbp], 0
	mov	DWORD PTR -24[rbp], 1
	mov	DWORD PTR -20[rbp], 2
	mov	DWORD PTR -16[rbp], 1
	mov	DWORD PTR -112[rbp], 1
	jmp	.L47
.L50:
	mov	DWORD PTR -108[rbp], 1
	jmp	.L48
.L49:
	mov	ecx, DWORD PTR -108[rbp]
	mov	edx, DWORD PTR -112[rbp]
	lea	rsi, -96[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	convolution
	mov	DWORD PTR -104[rbp], eax
	mov	ecx, DWORD PTR -108[rbp]
	mov	edx, DWORD PTR -112[rbp]
	lea	rsi, -48[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	convolution
	mov	DWORD PTR -100[rbp], eax
	mov	eax, DWORD PTR -104[rbp]
	imul	eax, eax
	mov	edx, eax
	mov	eax, DWORD PTR -100[rbp]
	imul	eax, eax
	add	eax, edx
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, eax
	movq	rax, xmm1
	movq	xmm0, rax
	call	sqrt@PLT
	mov	rax, QWORD PTR -128[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	cvttsd2si	eax, xmm0
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -128[rbp]
	mov	rdx, QWORD PTR 24[rax]
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR -104[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -128[rbp]
	mov	rdx, QWORD PTR 32[rax]
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR -100[rbp]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -108[rbp], 1
.L48:
	mov	rax, QWORD PTR -120[rbp]
	mov	eax, DWORD PTR 4[rax]
	sub	eax, 2
	cmp	DWORD PTR -108[rbp], eax
	jl	.L49
	add	DWORD PTR -112[rbp], 1
.L47:
	mov	rax, QWORD PTR -120[rbp]
	mov	eax, DWORD PTR 8[rax]
	sub	eax, 2
	cmp	DWORD PTR -112[rbp], eax
	jl	.L50
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L51
	call	__stack_chk_fail@PLT
.L51:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	sobel_edge_detector, .-sobel_edge_detector
	.globl	min_max_normalization
	.type	min_max_normalization, @function
min_max_normalization:
.LFB12:
	.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 -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -24[rbp], 1000000
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	jmp	.L53
.L58:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L54
.L57:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -24[rbp], eax
	jle	.L55
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -24[rbp], eax
	jmp	.L56
.L55:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jge	.L56
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -20[rbp], eax
.L56:
	add	DWORD PTR -12[rbp], 1
.L54:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L57
	add	DWORD PTR -16[rbp], 1
.L53:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -16[rbp], eax
	jl	.L58
	mov	DWORD PTR -16[rbp], 0
	jmp	.L59
.L62:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L60
.L61:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	sub	eax, DWORD PTR -24[rbp]
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, DWORD PTR -24[rbp]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, eax
	divsd	xmm0, xmm1
	movsd	QWORD PTR -8[rbp], xmm0
	movsd	xmm1, QWORD PTR -8[rbp]
	movsd	xmm0, QWORD PTR .LC9[rip]
	mulsd	xmm0, xmm1
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	cvttsd2si	eax, xmm0
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -12[rbp], 1
.L60:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L61
	add	DWORD PTR -16[rbp], 1
.L59:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -16[rbp], eax
	jl	.L62
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	min_max_normalization, .-min_max_normalization
	.section	.rodata
.LC10:
	.string	"."
.LC11:
	.string	"wb"
.LC12:
	.string	"%s\n"
.LC13:
	.string	"%d %d\n"
.LC14:
	.string	"%d\n"
	.text
	.globl	write_pgm_file
	.type	write_pgm_file, @function
write_pgm_file:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -64[rbp], rcx
	mov	DWORD PTR -20[rbp], 0
	mov	rax, QWORD PTR -48[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	je	.L64
	mov	rdx, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
.L64:
	mov	rax, QWORD PTR -48[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L65
	mov	DWORD PTR -28[rbp], 0
	jmp	.L66
.L71:
	mov	DWORD PTR -24[rbp], 0
	jmp	.L67
.L70:
	mov	eax, DWORD PTR -28[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 -24[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edx, DWORD PTR -20[rbp]
	movsx	rax, edx
	imul	rax, rax, 2021161081
	shr	rax, 32
	sar	eax, 3
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	sal	ecx, 4
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	test	eax, eax
	jne	.L68
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	jmp	.L69
.L68:
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	mov	edi, 32
	call	fputc@PLT
.L69:
	add	DWORD PTR -20[rbp], 1
	add	DWORD PTR -24[rbp], 1
.L67:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	DWORD PTR -24[rbp], eax
	jl	.L70
	add	DWORD PTR -28[rbp], 1
.L66:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -28[rbp], eax
	jl	.L71
	jmp	.L72
.L65:
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L72
	mov	DWORD PTR -28[rbp], 0
	jmp	.L73
.L76:
	mov	DWORD PTR -24[rbp], 0
	jmp	.L74
.L75:
	mov	eax, DWORD PTR -28[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 -24[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	BYTE PTR -29[rbp], al
	movsx	eax, BYTE PTR -29[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	add	DWORD PTR -24[rbp], 1
.L74:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	DWORD PTR -24[rbp], eax
	jl	.L75
	add	DWORD PTR -28[rbp], 1
.L73:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -28[rbp], eax
	jl	.L76
.L72:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	write_pgm_file, .-write_pgm_file
	.section	.rodata
.LC15:
	.string	"Enter the file name: "
.LC16:
	.string	"%s"
.LC17:
	.string	".G.pgm"
.LC18:
	.string	"\nGradient saved: %s \n"
.LC19:
	.string	".GX.pgm"
.LC20:
	.string	"Gradient X saved: %s \n"
.LC21:
	.string	".GY.pgm"
.LC22:
	.string	"Gradient Y saved: %s \n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 320
	mov	DWORD PTR -308[rbp], edi
	mov	QWORD PTR -320[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -208[rbp]
	mov	rsi, rax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdx, -304[rbp]
	lea	rax, -208[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	read_pgm_file
	lea	rax, -304[rbp]
	mov	rdi, rax
	call	padding
	lea	rax, -256[rbp]
	sub	rsp, 8
	push	QWORD PTR -272[rbp]
	push	QWORD PTR -280[rbp]
	push	QWORD PTR -288[rbp]
	push	QWORD PTR -296[rbp]
	push	QWORD PTR -304[rbp]
	mov	rdi, rax
	call	init_out_image
	add	rsp, 48
	lea	rdx, -256[rbp]
	lea	rax, -304[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	sobel_edge_detector
	mov	rdx, QWORD PTR -240[rbp]
	lea	rax, -256[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	min_max_normalization
	mov	rdx, QWORD PTR -232[rbp]
	lea	rax, -256[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	min_max_normalization
	mov	rdx, QWORD PTR -224[rbp]
	lea	rax, -256[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	min_max_normalization
	mov	rdx, QWORD PTR -240[rbp]
	lea	rsi, -208[rbp]
	lea	rax, -256[rbp]
	lea	rcx, .LC17[rip]
	mov	rdi, rax
	call	write_pgm_file
	lea	rax, -208[rbp]
	mov	rsi, rax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR -232[rbp]
	lea	rsi, -208[rbp]
	lea	rax, -256[rbp]
	lea	rcx, .LC19[rip]
	mov	rdi, rax
	call	write_pgm_file
	lea	rax, -208[rbp]
	mov	rsi, rax
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR -224[rbp]
	lea	rsi, -208[rbp]
	lea	rax, -256[rbp]
	lea	rcx, .LC21[rip]
	mov	rdi, rax
	call	write_pgm_file
	lea	rax, -208[rbp]
	mov	rsi, rax
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -288[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -240[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -224[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L79
	call	__stack_chk_fail@PLT
.L79:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC9:
	.long	0
	.long	1081073664
	.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	"147020.c"
	.text
	.align	2
	.global	init_out_image
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_out_image, %function
init_out_image:
	@ args = 32, pretend = 16, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	sub	sp, sp, #16
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	add	r0, fp, #8
	stm	r0, {r1, r2, r3}
	ldr	r3, [fp, #-24]
	add	r2, fp, #8
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r2, [fp, #12]
	ldr	r3, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r2, [fp, #16]
	ldr	r3, [fp, #-24]
	str	r2, [r3, #8]
	ldr	r2, [fp, #20]
	ldr	r3, [fp, #-24]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r1, #4
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3, #16]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L2
.L3:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	mov	r0, r3
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r1, #4
	bl	calloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L2:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L3
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r1, #4
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3, #20]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L4
.L5:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	mov	r0, r3
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #20]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r1, #4
	bl	calloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L4:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L5
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r1, #4
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3, #24]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L6
.L7:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	mov	r0, r3
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #24]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r1, #4
	bl	calloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L6:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L7
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L8
.L11:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L9
.L10:
	ldr	r2, [fp, #24]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	ldr	r1, [r3, #16]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r2, [fp, #24]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	ldr	r1, [r3, #20]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r2, [fp, #24]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	ldr	r1, [r3, #24]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L9:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L10
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L8:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L11
	nop
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, lr}
	add	sp, sp, #16
	bx	lr
	.size	init_out_image, .-init_out_image
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_comments
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_comments, %function
read_comments:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #120
	str	r0, [fp, #-120]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	nop
.L13:
	ldr	r0, [fp, #-120]
	bl	fgetc
	mov	r3, r0
	strb	r3, [fp, #-109]
	ldrb	r3, [fp, #-109]	@ zero_extendqisi2
	mov	r0, r3
	bl	isspace
	mov	r3, r0
	cmp	r3, #0
	bne	.L13
	ldrb	r3, [fp, #-109]	@ zero_extendqisi2
	cmp	r3, #35
	bne	.L14
	sub	r3, fp, #108
	ldr	r2, [fp, #-120]
	mov	r1, #100
	mov	r0, r3
	bl	fgets
	b	.L17
.L14:
	mov	r2, #1
	mvn	r1, #1
	ldr	r0, [fp, #-120]
	bl	fseek
.L17:
	nop
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC2
	.size	read_comments, .-read_comments
	.section	.rodata
	.align	2
.LC3:
	.ascii	"rb\000"
	.align	2
.LC4:
	.ascii	"File could not opened!\000"
	.align	2
.LC5:
	.ascii	"%d %d %d\000"
	.align	2
.LC6:
	.ascii	"P2\000"
	.align	2
.LC7:
	.ascii	"%d\000"
	.align	2
.LC8:
	.ascii	"P5\000"
	.align	2
.LC9:
	.ascii	"Can not allocate memory for buffer! \000"
	.global	__aeabi_idiv
	.global	__aeabi_idivmod
	.align	2
.LC10:
	.ascii	"_______________IMAGE INFO__________________\000"
	.align	2
.LC11:
	.ascii	"Version: %s \012Width: %d \012Height: %d \012Maximu"
	.ascii	"m Gray Level: %d \012\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_pgm_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_pgm_file, %function
read_pgm_file:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L36
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, .L36+4
	ldr	r0, [fp, #-48]
	bl	fopen
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L21
	ldr	r0, .L36+8
	bl	printf
	b	.L20
.L21:
	ldr	r3, [fp, #-52]
	ldr	r2, [fp, #-28]
	mov	r1, #3
	mov	r0, r3
	bl	fgets
	ldr	r0, [fp, #-28]
	bl	read_comments
	ldr	r3, [fp, #-52]
	add	r2, r3, #4
	ldr	r3, [fp, #-52]
	add	r1, r3, #8
	ldr	r3, [fp, #-52]
	add	r3, r3, #12
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L36+12
	ldr	r0, [fp, #-28]
	bl	__isoc99_fscanf
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #8]
	mov	r1, #4
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-52]
	str	r2, [r3, #16]
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L23
.L24:
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #4]
	mov	r0, r3
	ldr	r3, [fp, #-52]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r1, #4
	bl	calloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L23:
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	blt	.L24
	ldr	r3, [fp, #-52]
	ldr	r1, .L36+16
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L25
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L26
.L29:
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L27
.L28:
	sub	r3, fp, #40
	mov	r2, r3
	ldr	r1, .L36+20
	ldr	r0, [fp, #-28]
	bl	__isoc99_fscanf
	ldr	r3, [fp, #-52]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-40]
	str	r2, [r3]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L27:
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	blt	.L28
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L26:
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	blt	.L29
	b	.L30
.L25:
	ldr	r3, [fp, #-52]
	ldr	r1, .L36+24
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L30
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-52]
	ldr	r2, [r2, #4]
	mul	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L31
	ldr	r0, .L36+28
	bl	puts
	b	.L20
.L31:
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-52]
	ldr	r2, [r2, #8]
	mul	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-28]
	mov	r1, #1
	ldr	r0, [fp, #-20]
	bl	fread
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L32
.L33:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldrb	r5, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-52]
	ldr	r4, [r3, #16]
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	__aeabi_idiv
	mov	r3, r0
	lsl	r3, r3, #2
	add	r3, r4, r3
	ldr	r4, [r3]
	ldr	r3, [fp, #-52]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-36]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r4, r3
	mov	r2, r5
	str	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L32:
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-52]
	ldr	r2, [r2, #4]
	mul	r3, r2, r3
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	blt	.L33
	ldr	r0, [fp, #-20]
	bl	free
.L30:
	ldr	r0, [fp, #-28]
	bl	fclose
	ldr	r0, .L36+32
	bl	puts
	ldr	r1, [fp, #-52]
	ldr	r3, [fp, #-52]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-52]
	ldr	r0, [r3, #8]
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #12]
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, .L36+36
	bl	printf
.L20:
	ldr	r3, .L36
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L35
	bl	__stack_chk_fail
.L35:
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L37:
	.align	2
.L36:
	.word	.LC12
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	read_pgm_file, .-read_pgm_file
	.align	2
	.global	padding
	.syntax unified
	.arm
	.fpu softvfp
	.type	padding, %function
padding:
	@ 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, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L39
.L40:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L39:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L40
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L41
.L42:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L41:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L42
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	padding, .-padding
	.align	2
	.global	convolution
	.syntax unified
	.arm
	.fpu softvfp
	.type	convolution, %function
convolution:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #36
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L44
.L47:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L45
.L46:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #16]
	ldr	r1, [fp, #-16]
	ldr	r3, [fp, #-32]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r1, [fp, #-12]
	ldr	r3, [fp, #-36]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r3, r2
	ldr	r2, [fp, #-12]
	ldr	r3, [r3, r2, lsl #2]
	mul	r3, r1, r3
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L45:
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	ble	.L46
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L44:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	ble	.L47
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	convolution, .-convolution
	.global	__aeabi_i2d
	.global	__aeabi_d2iz
	.section	.rodata
	.align	2
.LC0:
	.word	-1
	.word	0
	.word	1
	.word	-2
	.word	0
	.word	2
	.word	-1
	.word	0
	.word	1
	.align	2
.LC1:
	.word	-1
	.word	-2
	.word	-1
	.word	0
	.word	0
	.word	0
	.word	1
	.word	2
	.word	1
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sobel_edge_detector
	.syntax unified
	.arm
	.fpu softvfp
	.type	sobel_edge_detector, %function
sobel_edge_detector:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #108
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	ldr	r3, .L55
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L55+4
	sub	ip, fp, #88
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	str	r3, [ip]
	ldr	r3, .L55+8
	sub	ip, fp, #52
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	str	r3, [ip]
	mov	r3, #1
	str	r3, [fp, #-104]
	b	.L50
.L53:
	mov	r3, #1
	str	r3, [fp, #-100]
	b	.L51
.L52:
	sub	r1, fp, #88
	ldr	r3, [fp, #-100]
	ldr	r2, [fp, #-104]
	ldr	r0, [fp, #-112]
	bl	convolution
	str	r0, [fp, #-96]
	sub	r1, fp, #52
	ldr	r3, [fp, #-100]
	ldr	r2, [fp, #-104]
	ldr	r0, [fp, #-112]
	bl	convolution
	str	r0, [fp, #-92]
	ldr	r3, [fp, #-96]
	mul	r2, r3, r3
	ldr	r3, [fp, #-92]
	mov	r1, r3
	mul	r1, r3, r1
	mov	r3, r1
	add	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sqrt
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-116]
	ldr	r0, [r1, #16]
	ldr	r1, [fp, #-104]
	lsl	r1, r1, #2
	add	r1, r0, r1
	ldr	r0, [r1]
	ldr	r1, [fp, #-100]
	lsl	r1, r1, #2
	add	r4, r0, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-116]
	ldr	r2, [r3, #20]
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-96]
	str	r2, [r3]
	ldr	r3, [fp, #-116]
	ldr	r2, [r3, #24]
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-92]
	str	r2, [r3]
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
.L51:
	ldr	r3, [fp, #-112]
	ldr	r3, [r3, #4]
	sub	r3, r3, #2
	ldr	r2, [fp, #-100]
	cmp	r2, r3
	blt	.L52
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L50:
	ldr	r3, [fp, #-112]
	ldr	r3, [r3, #8]
	sub	r3, r3, #2
	ldr	r2, [fp, #-104]
	cmp	r2, r3
	blt	.L53
	nop
	ldr	r3, .L55
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L54
	bl	__stack_chk_fail
.L54:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L56:
	.align	2
.L55:
	.word	.LC13
	.word	.LC0
	.word	.LC1
	.size	sobel_edge_detector, .-sobel_edge_detector
	.global	__aeabi_ddiv
	.global	__aeabi_dmul
	.align	2
	.global	min_max_normalization
	.syntax unified
	.arm
	.fpu softvfp
	.type	min_max_normalization, %function
min_max_normalization:
	@ 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, #32
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L68
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L58
.L63:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L59
.L62:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	ble	.L60
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-36]
	b	.L61
.L60:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	bge	.L61
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-32]
.L61:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L59:
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L62
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L58:
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L63
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L64
.L67:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L65
.L66:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-36]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	mov	r2, #0
	ldr	r3, .L68+4
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r4, r2, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L65:
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L66
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L64:
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L67
	nop
	nop
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L69:
	.align	2
.L68:
	.word	1000000
	.word	1081073664
	.size	min_max_normalization, .-min_max_normalization
	.section	.rodata
	.align	2
.LC14:
	.ascii	".\000"
	.align	2
.LC15:
	.ascii	"wb\000"
	.align	2
.LC16:
	.ascii	"%s\012\000"
	.align	2
.LC17:
	.ascii	"%d %d\012\000"
	.align	2
.LC18:
	.ascii	"%d\012\000"
	.text
	.align	2
	.global	write_pgm_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_pgm_file, %function
write_pgm_file:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r1, .L84
	ldr	r0, [fp, #-36]
	bl	strtok
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L71
	ldr	r1, [fp, #-44]
	ldr	r0, [fp, #-12]
	bl	strcat
	ldr	r1, .L84+4
	ldr	r0, [fp, #-12]
	bl	fopen
	str	r0, [fp, #-8]
.L71:
	ldr	r1, .L84+4
	ldr	r0, [fp, #-36]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-32]
	mov	r2, r3
	ldr	r1, .L84+8
	ldr	r0, [fp, #-8]
	bl	fprintf
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	ldr	r1, .L84+12
	ldr	r0, [fp, #-8]
	bl	fprintf
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #12]
	mov	r2, r3
	ldr	r1, .L84+16
	ldr	r0, [fp, #-8]
	bl	fprintf
	ldr	r3, [fp, #-32]
	ldr	r1, .L84+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L72
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L73
.L78:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L74
.L77:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L84+24
	ldr	r0, [fp, #-8]
	bl	fprintf
	ldr	r1, [fp, #-16]
	ldr	r3, .L84+28
	smull	r2, r3, r1, r3
	asr	r2, r3, #3
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #4
	add	r3, r3, r2
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L75
	ldr	r1, [fp, #-8]
	mov	r0, #10
	bl	fputc
	b	.L76
.L75:
	ldr	r1, [fp, #-8]
	mov	r0, #32
	bl	fputc
.L76:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L74:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L77
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L73:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L78
	b	.L79
.L72:
	ldr	r3, [fp, #-32]
	ldr	r1, .L84+32
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L79
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L80
.L83:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L81
.L82:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	strb	r3, [fp, #-25]
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	fputc
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L81:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L82
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L80:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L83
.L79:
	ldr	r0, [fp, #-8]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L85:
	.align	2
.L84:
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC6
	.word	.LC7
	.word	2021161081
	.word	.LC8
	.size	write_pgm_file, .-write_pgm_file
	.section	.rodata
	.align	2
.LC19:
	.ascii	"Enter the file name: \000"
	.align	2
.LC20:
	.ascii	"%s\000"
	.align	2
.LC21:
	.ascii	".G.pgm\000"
	.align	2
.LC22:
	.ascii	"\012Gradient saved: %s \012\000"
	.align	2
.LC23:
	.ascii	".GX.pgm\000"
	.align	2
.LC24:
	.ascii	"Gradient X saved: %s \012\000"
	.align	2
.LC25:
	.ascii	".GY.pgm\000"
	.align	2
.LC26:
	.ascii	"Gradient Y saved: %s \012\000"
	.align	2
.LC27:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 272
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #288
	str	r0, [fp, #-272]
	str	r1, [fp, #-276]
	ldr	r3, .L89
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L89+4
	bl	printf
	sub	r3, fp, #208
	mov	r1, r3
	ldr	r0, .L89+8
	bl	__isoc99_scanf
	sub	r2, fp, #264
	sub	r3, fp, #208
	mov	r1, r2
	mov	r0, r3
	bl	read_pgm_file
	sub	r3, fp, #264
	mov	r0, r3
	bl	padding
	sub	lr, fp, #236
	mov	ip, sp
	sub	r3, fp, #252
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	sub	r3, fp, #264
	ldm	r3, {r1, r2, r3}
	mov	r0, lr
	bl	init_out_image
	sub	r2, fp, #236
	sub	r3, fp, #264
	mov	r1, r2
	mov	r0, r3
	bl	sobel_edge_detector
	ldr	r2, [fp, #-220]
	sub	r3, fp, #236
	mov	r1, r2
	mov	r0, r3
	bl	min_max_normalization
	ldr	r2, [fp, #-216]
	sub	r3, fp, #236
	mov	r1, r2
	mov	r0, r3
	bl	min_max_normalization
	ldr	r2, [fp, #-212]
	sub	r3, fp, #236
	mov	r1, r2
	mov	r0, r3
	bl	min_max_normalization
	ldr	r2, [fp, #-220]
	sub	r1, fp, #208
	sub	r0, fp, #236
	ldr	r3, .L89+12
	bl	write_pgm_file
	sub	r3, fp, #208
	mov	r1, r3
	ldr	r0, .L89+16
	bl	printf
	ldr	r2, [fp, #-216]
	sub	r1, fp, #208
	sub	r0, fp, #236
	ldr	r3, .L89+20
	bl	write_pgm_file
	sub	r3, fp, #208
	mov	r1, r3
	ldr	r0, .L89+24
	bl	printf
	ldr	r2, [fp, #-212]
	sub	r1, fp, #208
	sub	r0, fp, #236
	ldr	r3, .L89+28
	bl	write_pgm_file
	sub	r3, fp, #208
	mov	r1, r3
	ldr	r0, .L89+32
	bl	printf
	ldr	r3, [fp, #-248]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-220]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-216]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-212]
	mov	r0, r3
	bl	free
	mov	r3, #0
	ldr	r2, .L89
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L88
	bl	__stack_chk_fail
.L88:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L90:
	.align	2
.L89:
	.word	.LC27
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
