	.file	"119900.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"wb+"
.LC1:
	.string	"P6\n%d\n%d\n%d\n"
	.text
	.globl	saveImage
	.type	saveImage, @function
saveImage:
.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	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	ecx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	r8d, esi
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 4[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	ecx, DWORD PTR [rax]
	mov	eax, ecx
	add	eax, eax
	add	eax, ecx
	movsx	rsi, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rcx, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fwrite@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	saveImage, .-saveImage
	.section	.rodata
.LC2:
	.string	"rb"
.LC3:
	.string	"Error: Wrong image format!\n"
.LC4:
	.string	"%d %d %d"
	.text
	.globl	loadImage
	.type	loadImage, @function
loadImage:
.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 -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	getc@PLT
	cmp	eax, 80
	jne	.L3
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	getc@PLT
	cmp	eax, 54
	je	.L4
.L3:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 27
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	rax, QWORD PTR -32[rbp]
	lea	rsi, 8[rax]
	mov	rax, QWORD PTR -32[rbp]
	lea	rcx, 4[rax]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	r8, rsi
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	nop
.L5:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	getc@PLT
	cmp	eax, 10
	jne	.L5
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 4[rax]
	imul	edx, eax
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 4[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	ecx, DWORD PTR [rax]
	mov	eax, ecx
	add	eax, eax
	add	eax, ecx
	movsx	rsi, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rcx, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	loadImage, .-loadImage
	.section	.rodata
.LC5:
	.string	"w+"
.LC6:
	.string	"%d "
.LC7:
	.string	"%d"
	.text
	.globl	saveHistogram
	.type	saveHistogram, @function
saveHistogram:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -12[rbp], 4
	mov	DWORD PTR -16[rbp], 0
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -16[rbp], 1
.L7:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jl	.L8
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	saveHistogram, .-saveHistogram
	.type	addHistogram, @function
addHistogram:
.LFB9:
	.cfi_startproc
	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
	movzx	eax, BYTE PTR -24[rbp]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, eax
	pxor	xmm1, xmm1
	cvtss2sd	xmm1, xmm0
	movsd	xmm0, QWORD PTR .LC8[rip]
	mulsd	xmm1, xmm0
	movzx	eax, BYTE PTR -23[rbp]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, eax
	pxor	xmm2, xmm2
	cvtss2sd	xmm2, xmm0
	movsd	xmm0, QWORD PTR .LC9[rip]
	mulsd	xmm0, xmm2
	addsd	xmm1, xmm0
	movzx	eax, BYTE PTR -22[rbp]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, eax
	pxor	xmm2, xmm2
	cvtss2sd	xmm2, xmm0
	movsd	xmm0, QWORD PTR .LC10[rip]
	mulsd	xmm0, xmm2
	addsd	xmm1, xmm0
	movsd	xmm0, QWORD PTR .LC11[rip]
	addsd	xmm0, xmm1
	cvttsd2si	eax, xmm0
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 152
	jg	.L10
	cmp	DWORD PTR -4[rbp], 101
	jg	.L11
	cmp	DWORD PTR -4[rbp], 50
	jg	.L12
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], edx
	jmp	.L15
.L12:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 4
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 4
	add	edx, 1
	mov	DWORD PTR [rax], edx
	jmp	.L15
.L11:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	add	edx, 1
	mov	DWORD PTR [rax], edx
	jmp	.L15
.L10:
	cmp	DWORD PTR -4[rbp], 203
	jg	.L14
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 12
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 12
	add	edx, 1
	mov	DWORD PTR [rax], edx
	jmp	.L15
.L14:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 16
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 16
	add	edx, 1
	mov	DWORD PTR [rax], edx
.L15:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	addHistogram, .-addHistogram
	.type	checkInterval, @function
checkInterval:
.LFB10:
	.cfi_startproc
	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
	cmp	DWORD PTR -4[rbp], 0
	jns	.L17
	mov	eax, 0
	jmp	.L18
.L17:
	cmp	DWORD PTR -4[rbp], 255
	jle	.L19
	mov	eax, 255
	jmp	.L18
.L19:
	mov	eax, DWORD PTR -4[rbp]
.L18:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	checkInterval, .-checkInterval
	.globl	sharpenImage
	.type	sharpenImage, @function
sharpenImage:
.LFB11:
	.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, 88
	.cfi_offset 3, -24
	mov	QWORD PTR -88[rbp], rdi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR -88[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -88[rbp]
	mov	eax, DWORD PTR 4[rax]
	imul	edx, eax
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -56[rbp], 1
	jmp	.L21
.L22:
	mov	rax, QWORD PTR -88[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR -56[rbp]
	imul	eax, edx
	mov	DWORD PTR -28[rbp], eax
	mov	rax, QWORD PTR -88[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	lea	rdx, [rcx+rax]
	mov	eax, DWORD PTR -28[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rcx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	movzx	ecx, WORD PTR [rdx]
	mov	WORD PTR [rax], cx
	movzx	edx, BYTE PTR 2[rdx]
	mov	BYTE PTR 2[rax], dl
	mov	rax, QWORD PTR -88[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sub	rax, 3
	lea	rdx, [rcx+rax]
	mov	eax, DWORD PTR -28[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	lea	rcx, -3[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	movzx	ecx, WORD PTR [rdx]
	mov	WORD PTR [rax], cx
	movzx	edx, BYTE PTR 2[rdx]
	mov	BYTE PTR 2[rax], dl
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -96[rbp]
	mov	rsi, rdx
	movzx	ecx, BYTE PTR [rax]
	movzx	edx, BYTE PTR 1[rax]
	sal	rdx, 8
	or	rdx, rcx
	movzx	eax, BYTE PTR 2[rax]
	sal	rax, 16
	or	rax, rdx
	mov	rdi, rax
	call	addHistogram
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	lea	rdx, -3[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -96[rbp]
	mov	rsi, rdx
	movzx	ecx, BYTE PTR [rax]
	movzx	edx, BYTE PTR 1[rax]
	sal	rdx, 8
	or	rdx, rcx
	movzx	eax, BYTE PTR 2[rax]
	sal	rax, 16
	or	rax, rdx
	mov	rdi, rax
	call	addHistogram
	add	DWORD PTR -56[rbp], 1
.L21:
	mov	rax, QWORD PTR -88[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	DWORD PTR -56[rbp], eax
	jl	.L22
	mov	rax, QWORD PTR -88[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -88[rbp]
	mov	eax, DWORD PTR 4[rax]
	imul	eax, edx
	lea	ebx, -1[rax]
	mov	DWORD PTR -52[rbp], 0
	jmp	.L23
.L24:
	mov	rax, QWORD PTR -88[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	lea	rdx, [rcx+rax]
	mov	eax, DWORD PTR -52[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rcx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	movzx	ecx, WORD PTR [rdx]
	mov	WORD PTR [rax], cx
	movzx	edx, BYTE PTR 2[rdx]
	mov	BYTE PTR 2[rax], dl
	mov	rax, QWORD PTR -88[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	eax, ebx
	sub	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	lea	rdx, [rcx+rax]
	mov	eax, ebx
	sub	eax, DWORD PTR -52[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rcx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	movzx	ecx, WORD PTR [rdx]
	mov	WORD PTR [rax], cx
	movzx	edx, BYTE PTR 2[rdx]
	mov	BYTE PTR 2[rax], dl
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -96[rbp]
	mov	rsi, rdx
	movzx	ecx, BYTE PTR [rax]
	movzx	edx, BYTE PTR 1[rax]
	sal	rdx, 8
	or	rdx, rcx
	movzx	eax, BYTE PTR 2[rax]
	sal	rax, 16
	or	rax, rdx
	mov	rdi, rax
	call	addHistogram
	mov	eax, ebx
	sub	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -96[rbp]
	mov	rsi, rdx
	movzx	ecx, BYTE PTR [rax]
	movzx	edx, BYTE PTR 1[rax]
	sal	rdx, 8
	or	rdx, rcx
	movzx	eax, BYTE PTR 2[rax]
	sal	rax, 16
	or	rax, rdx
	mov	rdi, rax
	call	addHistogram
	add	DWORD PTR -52[rbp], 1
.L23:
	mov	rax, QWORD PTR -88[rbp]
	mov	eax, DWORD PTR [rax]
	sub	eax, 1
	cmp	DWORD PTR -52[rbp], eax
	jl	.L24
	mov	DWORD PTR -48[rbp], 1
	jmp	.L25
.L28:
	mov	DWORD PTR -44[rbp], 1
	jmp	.L26
.L27:
	mov	rax, QWORD PTR -88[rbp]
	mov	eax, DWORD PTR [rax]
	imul	eax, DWORD PTR -48[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -44[rbp]
	lea	ebx, [rdx+rax]
	mov	rax, QWORD PTR -88[rbp]
	mov	rcx, QWORD PTR 16[rax]
	movsx	rdx, ebx
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	add	rax, rcx
	movzx	edx, WORD PTR [rax]
	mov	WORD PTR -71[rbp], dx
	movzx	eax, BYTE PTR 2[rax]
	mov	BYTE PTR -69[rbp], al
	mov	rax, QWORD PTR -88[rbp]
	mov	rcx, QWORD PTR 16[rax]
	movsx	rdx, ebx
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sub	rax, 3
	add	rax, rcx
	movzx	edx, WORD PTR [rax]
	mov	WORD PTR -68[rbp], dx
	movzx	eax, BYTE PTR 2[rax]
	mov	BYTE PTR -66[rbp], al
	mov	rax, QWORD PTR -88[rbp]
	mov	rcx, QWORD PTR 16[rax]
	movsx	rax, ebx
	lea	rdx, 1[rax]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	add	rax, rcx
	movzx	edx, WORD PTR [rax]
	mov	WORD PTR -65[rbp], dx
	movzx	eax, BYTE PTR 2[rax]
	mov	BYTE PTR -63[rbp], al
	mov	rax, QWORD PTR -88[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -88[rbp]
	mov	eax, DWORD PTR [rax]
	add	eax, ebx
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	add	rax, rcx
	movzx	edx, WORD PTR [rax]
	mov	WORD PTR -62[rbp], dx
	movzx	eax, BYTE PTR 2[rax]
	mov	BYTE PTR -60[rbp], al
	mov	rax, QWORD PTR -88[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -88[rbp]
	mov	edx, DWORD PTR [rax]
	mov	eax, ebx
	sub	eax, edx
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	add	rax, rcx
	movzx	edx, WORD PTR [rax]
	mov	WORD PTR -59[rbp], dx
	movzx	eax, BYTE PTR 2[rax]
	mov	BYTE PTR -57[rbp], al
	movzx	eax, BYTE PTR -71[rbp]
	movzx	edx, al
	mov	eax, edx
	sal	eax, 2
	add	edx, eax
	movzx	eax, BYTE PTR -68[rbp]
	movzx	eax, al
	sub	edx, eax
	movzx	eax, BYTE PTR -65[rbp]
	movzx	eax, al
	sub	edx, eax
	movzx	eax, BYTE PTR -62[rbp]
	movzx	eax, al
	sub	edx, eax
	movzx	eax, BYTE PTR -59[rbp]
	movzx	ecx, al
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -40[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	mov	edi, eax
	call	checkInterval
	mov	DWORD PTR -40[rbp], eax
	movsx	rdx, ebx
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -40[rbp]
	mov	BYTE PTR [rax], dl
	movzx	eax, BYTE PTR -70[rbp]
	movzx	edx, al
	mov	eax, edx
	sal	eax, 2
	add	edx, eax
	movzx	eax, BYTE PTR -67[rbp]
	movzx	eax, al
	sub	edx, eax
	movzx	eax, BYTE PTR -64[rbp]
	movzx	eax, al
	sub	edx, eax
	movzx	eax, BYTE PTR -61[rbp]
	movzx	eax, al
	sub	edx, eax
	movzx	eax, BYTE PTR -58[rbp]
	movzx	ecx, al
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	checkInterval
	mov	DWORD PTR -36[rbp], eax
	movsx	rdx, ebx
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -36[rbp]
	mov	BYTE PTR 1[rax], dl
	movzx	eax, BYTE PTR -69[rbp]
	movzx	edx, al
	mov	eax, edx
	sal	eax, 2
	add	edx, eax
	movzx	eax, BYTE PTR -66[rbp]
	movzx	eax, al
	sub	edx, eax
	movzx	eax, BYTE PTR -63[rbp]
	movzx	eax, al
	sub	edx, eax
	movzx	eax, BYTE PTR -60[rbp]
	movzx	eax, al
	sub	edx, eax
	movzx	eax, BYTE PTR -57[rbp]
	movzx	ecx, al
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -32[rbp]
	mov	edi, eax
	call	checkInterval
	mov	DWORD PTR -32[rbp], eax
	movsx	rdx, ebx
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -32[rbp]
	mov	BYTE PTR 2[rax], dl
	movsx	rdx, ebx
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -96[rbp]
	mov	rsi, rdx
	movzx	ecx, BYTE PTR [rax]
	movzx	edx, BYTE PTR 1[rax]
	sal	rdx, 8
	or	rdx, rcx
	movzx	eax, BYTE PTR 2[rax]
	sal	rax, 16
	or	rax, rdx
	mov	rdi, rax
	call	addHistogram
	add	DWORD PTR -44[rbp], 1
.L26:
	mov	rax, QWORD PTR -88[rbp]
	mov	eax, DWORD PTR [rax]
	sub	eax, 1
	cmp	DWORD PTR -44[rbp], eax
	jl	.L27
	add	DWORD PTR -48[rbp], 1
.L25:
	mov	rax, QWORD PTR -88[rbp]
	mov	eax, DWORD PTR 4[rax]
	sub	eax, 1
	cmp	DWORD PTR -48[rbp], eax
	jl	.L28
	mov	rax, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -88[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 16[rax], rdx
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	sharpenImage, .-sharpenImage
	.section	.rodata
.LC12:
	.string	"Invalid arguments!"
.LC13:
	.string	"output.txt"
.LC14:
	.string	"output.ppm"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -84[rbp], 1
	jg	.L30
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L30:
	mov	rax, QWORD PTR -96[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -72[rbp], rax
	lea	rdx, -64[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	loadImage
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	lea	rdx, -32[rbp]
	lea	rax, -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	sharpenImage
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	call	saveHistogram
	lea	rax, -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC14[rip]
	call	saveImage
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC8:
	.long	261134012
	.long	1070282362
	.align 8
.LC9:
	.long	474164389
	.long	1072095979
	.align 8
.LC10:
	.long	-20615843
	.long	1068661682
	.align 8
.LC11:
	.long	0
	.long	1071644672
	.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	"119900.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"wb+\000"
	.align	2
.LC1:
	.ascii	"P6\012%d\012%d\012%d\012\000"
	.text
	.align	2
	.global	saveImage
	.syntax unified
	.arm
	.fpu softvfp
	.type	saveImage, %function
saveImage:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r1, .L2
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-20]
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r1, [r3, #4]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #8]
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L2+4
	ldr	r0, [fp, #-8]
	bl	fprintf
	ldr	r3, [fp, #-20]
	ldr	r0, [r3, #12]
	ldr	r3, [fp, #-20]
	ldr	r2, [r3]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	mov	r1, r3
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r3, [fp, #-8]
	bl	fwrite
	ldr	r0, [fp, #-8]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.word	.LC1
	.size	saveImage, .-saveImage
	.section	.rodata
	.align	2
.LC2:
	.ascii	"rb\000"
	.align	2
.LC3:
	.ascii	"Error: Wrong image format!\012\000"
	.align	2
.LC4:
	.ascii	"%d %d %d\000"
	.text
	.align	2
	.global	loadImage
	.syntax unified
	.arm
	.fpu softvfp
	.type	loadImage, %function
loadImage:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r1, .L8
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	getc
	mov	r3, r0
	cmp	r3, #80
	bne	.L5
	ldr	r0, [fp, #-8]
	bl	getc
	mov	r3, r0
	cmp	r3, #54
	beq	.L6
.L5:
	ldr	r3, .L8+4
	ldr	r3, [r3]
	mov	r2, #27
	mov	r1, #1
	ldr	r0, .L8+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L6:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-20]
	add	r1, r3, #4
	ldr	r3, [fp, #-20]
	add	r3, r3, #8
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L8+12
	ldr	r0, [fp, #-8]
	bl	__isoc99_fscanf
	nop
.L7:
	ldr	r0, [fp, #-8]
	bl	getc
	mov	r3, r0
	cmp	r3, #10
	bne	.L7
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	ldr	r2, [r2, #4]
	mul	r2, r3, r2
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-20]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-20]
	ldr	r0, [r3, #12]
	ldr	r3, [fp, #-20]
	ldr	r2, [r3]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	mov	r1, r3
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r3, [fp, #-8]
	bl	fread
	ldr	r0, [fp, #-8]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC2
	.word	stderr
	.word	.LC3
	.word	.LC4
	.size	loadImage, .-loadImage
	.section	.rodata
	.align	2
.LC5:
	.ascii	"w+\000"
	.align	2
.LC6:
	.ascii	"%d \000"
	.align	2
.LC7:
	.ascii	"%d\000"
	.text
	.align	2
	.global	saveHistogram
	.syntax unified
	.arm
	.fpu softvfp
	.type	saveHistogram, %function
saveHistogram:
	@ 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	r1, .L13
	ldr	r0, [fp, #-24]
	bl	fopen
	str	r0, [fp, #-12]
	mov	r3, #4
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L11
.L12:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L13+4
	ldr	r0, [fp, #-12]
	bl	fprintf
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L11:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L12
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L13+8
	ldr	r0, [fp, #-12]
	bl	fprintf
	ldr	r0, [fp, #-12]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	saveHistogram, .-saveHistogram
	.global	__aeabi_ui2f
	.global	__aeabi_f2d
	.global	__aeabi_dmul
	.global	__aeabi_dadd
	.global	__aeabi_d2iz
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	addHistogram, %function
addHistogram:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #16
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldrb	r3, [fp, #-24]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2f
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_f2d
	ldr	r2, .L22
	ldr	r3, .L22+4
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldrb	r3, [fp, #-23]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2f
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_f2d
	ldr	r2, .L22+8
	ldr	r3, .L22+12
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2f
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_f2d
	ldr	r2, .L22+16
	ldr	r3, .L22+20
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L22+24
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #152
	bgt	.L16
	ldr	r3, [fp, #-16]
	cmp	r3, #101
	bgt	.L17
	ldr	r3, [fp, #-16]
	cmp	r3, #50
	bgt	.L18
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	b	.L21
.L18:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	add	r2, r2, #1
	str	r2, [r3]
	b	.L21
.L17:
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	add	r2, r2, #1
	str	r2, [r3]
	b	.L21
.L16:
	ldr	r3, [fp, #-16]
	cmp	r3, #203
	bgt	.L20
	ldr	r3, [fp, #-28]
	add	r3, r3, #12
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #12
	add	r2, r2, #1
	str	r2, [r3]
	b	.L21
.L20:
	ldr	r3, [fp, #-28]
	add	r3, r3, #16
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #16
	add	r2, r2, #1
	str	r2, [r3]
.L21:
	nop
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L23:
	.align	2
.L22:
	.word	261134012
	.word	1070282362
	.word	474164389
	.word	1072095979
	.word	-20615843
	.word	1068661682
	.word	1071644672
	.size	addHistogram, .-addHistogram
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	checkInterval, %function
checkInterval:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L25
	mov	r3, #0
	b	.L26
.L25:
	ldr	r3, [fp, #-8]
	cmp	r3, #255
	ble	.L27
	mov	r3, #255
	b	.L26
.L27:
	ldr	r3, [fp, #-8]
.L26:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	checkInterval, .-checkInterval
	.align	2
	.global	sharpenImage
	.syntax unified
	.arm
	.fpu softvfp
	.type	sharpenImage, %function
sharpenImage:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #68
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	ldr	r2, [fp, #-72]
	ldr	r2, [r2, #4]
	mul	r2, r3, r2
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-32]
	mov	r3, #1
	str	r3, [fp, #-48]
	b	.L29
.L30:
	ldr	r3, [fp, #-72]
	ldr	r2, [r3]
	ldr	r3, [fp, #-48]
	mul	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-72]
	ldr	r1, [r3, #12]
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r1, r1, r3
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	mov	r0, r3
	mov	r3, #3
	mov	r2, r3
	bl	memcpy
	ldr	r3, [fp, #-72]
	ldr	r1, [r3, #12]
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	sub	r3, r3, #3
	add	r1, r1, r3
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	sub	r3, r3, #3
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	mov	r0, r3
	mov	r3, #3
	mov	r2, r3
	bl	memcpy
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldrb	r1, [r3, #1]	@ zero_extendqisi2
	lsl	r1, r1, #8
	orr	r2, r1, r2
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	lsl	r3, r3, #16
	orr	r2, r3, r2
	mov	r3, #0
	bic	r2, r2, #-16777216
	and	r3, r3, #-16777216
	orr	r3, r2, r3
	ldr	r1, [fp, #-76]
	mov	r0, r3
	bl	addHistogram
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	sub	r3, r3, #3
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldrb	r1, [r3, #1]	@ zero_extendqisi2
	lsl	r1, r1, #8
	orr	r2, r1, r2
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	lsl	r3, r3, #16
	orr	r2, r3, r2
	mov	r3, #0
	bic	r2, r2, #-16777216
	and	r3, r3, #-16777216
	orr	r3, r2, r3
	ldr	r1, [fp, #-76]
	mov	r0, r3
	bl	addHistogram
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L29:
	ldr	r3, [fp, #-72]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-48]
	cmp	r2, r3
	blt	.L30
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	ldr	r2, [fp, #-72]
	ldr	r2, [r2, #4]
	mul	r3, r2, r3
	sub	r4, r3, #1
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L31
.L32:
	ldr	r3, [fp, #-72]
	ldr	r1, [r3, #12]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r1, r1, r3
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	mov	r0, r3
	mov	r3, #3
	mov	r2, r3
	bl	memcpy
	ldr	r3, [fp, #-72]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-44]
	sub	r3, r4, r3
	mov	r1, r3
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	add	r1, r2, r3
	ldr	r3, [fp, #-44]
	sub	r3, r4, r3
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	mov	r0, r3
	mov	r3, #3
	mov	r2, r3
	bl	memcpy
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldrb	r1, [r3, #1]	@ zero_extendqisi2
	lsl	r1, r1, #8
	orr	r2, r1, r2
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	lsl	r3, r3, #16
	orr	r2, r3, r2
	mov	r3, #0
	bic	r2, r2, #-16777216
	and	r3, r3, #-16777216
	orr	r3, r2, r3
	ldr	r1, [fp, #-76]
	mov	r0, r3
	bl	addHistogram
	ldr	r3, [fp, #-44]
	sub	r3, r4, r3
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldrb	r1, [r3, #1]	@ zero_extendqisi2
	lsl	r1, r1, #8
	orr	r2, r1, r2
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	lsl	r3, r3, #16
	orr	r2, r3, r2
	mov	r3, #0
	bic	r2, r2, #-16777216
	and	r3, r3, #-16777216
	orr	r3, r2, r3
	ldr	r1, [fp, #-76]
	mov	r0, r3
	bl	addHistogram
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L31:
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	blt	.L32
	mov	r3, #1
	str	r3, [fp, #-40]
	b	.L33
.L36:
	mov	r3, #1
	str	r3, [fp, #-36]
	b	.L34
.L35:
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	ldr	r2, [fp, #-40]
	mul	r2, r3, r2
	ldr	r3, [fp, #-36]
	add	r4, r2, r3
	ldr	r3, [fp, #-72]
	ldr	r2, [r3, #12]
	mov	r1, r4
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	add	r2, r2, r3
	sub	r3, fp, #68
	mov	r1, r2
	mov	r2, #3
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-72]
	ldr	r2, [r3, #12]
	mov	r1, r4
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	sub	r3, r3, #3
	add	r2, r2, r3
	sub	r3, fp, #64
	mov	r1, r2
	mov	r2, #3
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-72]
	ldr	r1, [r3, #12]
	mov	r3, r4
	add	r2, r3, #1
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r2, r1, r3
	sub	r3, fp, #60
	mov	r1, r2
	mov	r2, #3
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-72]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	add	r3, r4, r3
	mov	r1, r3
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	add	r2, r2, r3
	sub	r3, fp, #56
	mov	r1, r2
	mov	r2, #3
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-72]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	sub	r3, r4, r3
	mov	r1, r3
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	add	r2, r2, r3
	sub	r3, fp, #52
	mov	r1, r2
	mov	r2, #3
	mov	r0, r3
	bl	memcpy
	ldrb	r3, [fp, #-68]	@ zero_extendqisi2
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	ldrb	r2, [fp, #-64]	@ zero_extendqisi2
	sub	r3, r3, r2
	ldrb	r2, [fp, #-60]	@ zero_extendqisi2
	sub	r3, r3, r2
	ldrb	r2, [fp, #-56]	@ zero_extendqisi2
	sub	r3, r3, r2
	ldrb	r2, [fp, #-52]	@ zero_extendqisi2
	sub	r3, r3, r2
	str	r3, [fp, #-28]
	ldr	r0, [fp, #-28]
	bl	checkInterval
	str	r0, [fp, #-28]
	mov	r2, r4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r2, [fp, #-28]
	and	r2, r2, #255
	strb	r2, [r3]
	ldrb	r3, [fp, #-67]	@ zero_extendqisi2
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	ldrb	r2, [fp, #-63]	@ zero_extendqisi2
	sub	r3, r3, r2
	ldrb	r2, [fp, #-59]	@ zero_extendqisi2
	sub	r3, r3, r2
	ldrb	r2, [fp, #-55]	@ zero_extendqisi2
	sub	r3, r3, r2
	ldrb	r2, [fp, #-51]	@ zero_extendqisi2
	sub	r3, r3, r2
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-24]
	bl	checkInterval
	str	r0, [fp, #-24]
	mov	r2, r4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r2, [fp, #-24]
	and	r2, r2, #255
	strb	r2, [r3, #1]
	ldrb	r3, [fp, #-66]	@ zero_extendqisi2
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	ldrb	r2, [fp, #-62]	@ zero_extendqisi2
	sub	r3, r3, r2
	ldrb	r2, [fp, #-58]	@ zero_extendqisi2
	sub	r3, r3, r2
	ldrb	r2, [fp, #-54]	@ zero_extendqisi2
	sub	r3, r3, r2
	ldrb	r2, [fp, #-50]	@ zero_extendqisi2
	sub	r3, r3, r2
	str	r3, [fp, #-20]
	ldr	r0, [fp, #-20]
	bl	checkInterval
	str	r0, [fp, #-20]
	mov	r2, r4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r2, [fp, #-20]
	and	r2, r2, #255
	strb	r2, [r3, #2]
	mov	r2, r4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldrb	r1, [r3, #1]	@ zero_extendqisi2
	lsl	r1, r1, #8
	orr	r2, r1, r2
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	lsl	r3, r3, #16
	orr	r2, r3, r2
	mov	r3, #0
	bic	r2, r2, #-16777216
	and	r3, r3, #-16777216
	orr	r3, r2, r3
	ldr	r1, [fp, #-76]
	mov	r0, r3
	bl	addHistogram
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L34:
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	blt	.L35
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L33:
	ldr	r3, [fp, #-72]
	ldr	r3, [r3, #4]
	sub	r3, r3, #1
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	blt	.L36
	ldr	r3, [fp, #-72]
	ldr	r3, [r3, #12]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-72]
	ldr	r2, [fp, #-32]
	str	r2, [r3, #12]
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	sharpenImage, .-sharpenImage
	.section	.rodata
	.align	2
.LC8:
	.ascii	"Invalid arguments!\000"
	.align	2
.LC9:
	.ascii	"output.txt\000"
	.align	2
.LC10:
	.ascii	"output.ppm\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L41
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-56]
	cmp	r3, #1
	bgt	.L38
	ldr	r0, .L41+4
	bl	puts
	mov	r0, #1
	bl	exit
.L38:
	ldr	r3, [fp, #-60]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-48]
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	loadImage
	sub	r3, fp, #28
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	str	r2, [r3, #16]
	sub	r2, fp, #28
	sub	r3, fp, #44
	mov	r1, r2
	mov	r0, r3
	bl	sharpenImage
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L41+8
	bl	saveHistogram
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, .L41+12
	bl	saveImage
	ldr	r3, [fp, #-32]
	mov	r0, r3
	bl	free
	mov	r3, #0
	ldr	r2, .L41
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L40
	bl	__stack_chk_fail
.L40:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L42:
	.align	2
.L41:
	.word	.LC11
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
