	.file	"447767.c"
	.intel_syntax noprefix
	.text
	.globl	horiz_operator
	.data
	.align 8
	.type	horiz_operator, @object
	.size	horiz_operator, 9
horiz_operator:
	.string	"\377"
	.ascii	"\001"
	.string	"\376"
	.ascii	"\002"
	.string	"\377"
	.ascii	"\001"
	.globl	vert_operator
	.align 8
	.type	vert_operator, @object
	.size	vert_operator, 9
vert_operator:
	.ascii	"\001\002\001"
	.string	""
	.string	""
	.string	""
	.ascii	"\377\376\377"
	.globl	input
	.bss
	.align 32
	.type	input, @object
	.size	input, 16777216
input:
	.zero	16777216
	.globl	output
	.align 32
	.type	output, @object
	.size	output, 16777216
output:
	.zero	16777216
	.globl	golden
	.align 32
	.type	golden, @object
	.size	golden, 16777216
golden:
	.zero	16777216
	.text
	.globl	convolution2D
	.type	convolution2D, @function
convolution2D:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	QWORD PTR -32[rbp], rdx
	mov	QWORD PTR -40[rbp], rcx
	mov	DWORD PTR -4[rbp], 0
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	sal	eax, 12
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	add	eax, edx
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	imul	eax, edx
	add	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	sal	eax, 12
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR 1[rax]
	movsx	eax, al
	imul	eax, edx
	add	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	sal	eax, 12
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	add	eax, edx
	cdqe
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR 2[rax]
	movsx	eax, al
	imul	eax, edx
	add	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	sal	eax, 12
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	add	eax, edx
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 3
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	imul	eax, edx
	add	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	sal	eax, 12
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 3
	movzx	eax, BYTE PTR 1[rax]
	movsx	eax, al
	imul	eax, edx
	add	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	sal	eax, 12
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	add	eax, edx
	cdqe
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 3
	movzx	eax, BYTE PTR 2[rax]
	movsx	eax, al
	imul	eax, edx
	add	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	sal	eax, 12
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	add	eax, edx
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 6
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	imul	eax, edx
	add	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	sal	eax, 12
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 6
	movzx	eax, BYTE PTR 1[rax]
	movsx	eax, al
	imul	eax, edx
	add	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	sal	eax, 12
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	add	eax, edx
	cdqe
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 6
	movzx	eax, BYTE PTR 2[rax]
	movsx	eax, al
	imul	eax, edx
	add	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	convolution2D, .-convolution2D
	.section	.rodata
.LC1:
	.string	"r"
.LC2:
	.string	"input.grey"
.LC3:
	.string	"File input.grey not found"
.LC4:
	.string	"wb"
.LC5:
	.string	"output_sobel.grey"
	.align 8
.LC6:
	.string	"File output_sobel.grey could not be created"
.LC7:
	.string	"golden.grey"
.LC8:
	.string	"File golden.grey not found"
.LC14:
	.string	"Total time = %10g seconds\n"
	.text
	.globl	sobel
	.type	sobel, @function
sobel:
.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 -120[rbp], rdi
	mov	QWORD PTR -128[rbp], rsi
	mov	QWORD PTR -136[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	pxor	xmm0, xmm0
	movsd	QWORD PTR -88[rbp], xmm0
	mov	rax, QWORD PTR -128[rbp]
	mov	edx, 4096
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -128[rbp]
	add	rax, 16773120
	mov	edx, 4096
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -104[rbp], 1
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -104[rbp]
	sal	eax, 12
	movsx	rdx, eax
	mov	rax, QWORD PTR -128[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR -104[rbp]
	add	eax, 1
	sal	eax, 12
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -128[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	add	DWORD PTR -104[rbp], 1
.L4:
	cmp	DWORD PTR -104[rbp], 4094
	jle	.L5
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	fopen@PLT
	mov	QWORD PTR -80[rbp], rax
	cmp	QWORD PTR -80[rbp], 0
	jne	.L6
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	lea	rsi, .LC4[rip]
	lea	rdi, .LC5[rip]
	call	fopen@PLT
	mov	QWORD PTR -72[rbp], rax
	cmp	QWORD PTR -72[rbp], 0
	jne	.L7
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	lea	rsi, .LC1[rip]
	lea	rdi, .LC7[rip]
	call	fopen@PLT
	mov	QWORD PTR -64[rbp], rax
	cmp	QWORD PTR -64[rbp], 0
	jne	.L8
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	rdx, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	rcx, rdx
	mov	edx, 16777216
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rdx, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	rcx, rdx
	mov	edx, 16777216
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rax, -48[rbp]
	mov	rsi, rax
	mov	edi, 4
	call	clock_gettime@PLT
	mov	DWORD PTR -104[rbp], 1
	jmp	.L9
.L16:
	mov	DWORD PTR -100[rbp], 1
	jmp	.L10
.L15:
	mov	rdx, QWORD PTR -120[rbp]
	mov	esi, DWORD PTR -100[rbp]
	mov	eax, DWORD PTR -104[rbp]
	lea	rcx, horiz_operator[rip]
	mov	edi, eax
	call	convolution2D
	pxor	xmm3, xmm3
	cvtsi2sd	xmm3, eax
	movq	rax, xmm3
	movsd	xmm0, QWORD PTR .LC9[rip]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	pow@PLT
	movsd	QWORD PTR -144[rbp], xmm0
	mov	rdx, QWORD PTR -120[rbp]
	mov	esi, DWORD PTR -100[rbp]
	mov	eax, DWORD PTR -104[rbp]
	lea	rcx, vert_operator[rip]
	mov	edi, eax
	call	convolution2D
	pxor	xmm4, xmm4
	cvtsi2sd	xmm4, eax
	movq	rax, xmm4
	movsd	xmm0, QWORD PTR .LC9[rip]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	pow@PLT
	addsd	xmm0, QWORD PTR -144[rbp]
	cvttsd2si	rax, xmm0
	mov	DWORD PTR -96[rbp], eax
	mov	eax, DWORD PTR -96[rbp]
	test	rax, rax
	js	.L11
	pxor	xmm6, xmm6
	cvtsi2sd	xmm6, rax
	movq	rax, xmm6
	jmp	.L12
.L11:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
	movq	rax, xmm0
.L12:
	movq	xmm0, rax
	call	sqrt@PLT
	cvttsd2si	eax, xmm0
	mov	DWORD PTR -92[rbp], eax
	cmp	DWORD PTR -92[rbp], 255
	jle	.L13
	mov	eax, DWORD PTR -104[rbp]
	sal	eax, 12
	mov	edx, eax
	mov	eax, DWORD PTR -100[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -128[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], -1
	jmp	.L14
.L13:
	mov	eax, DWORD PTR -104[rbp]
	sal	eax, 12
	mov	edx, eax
	mov	eax, DWORD PTR -100[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -128[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -92[rbp]
	mov	BYTE PTR [rax], dl
.L14:
	add	DWORD PTR -100[rbp], 1
.L10:
	cmp	DWORD PTR -100[rbp], 4094
	jle	.L15
	add	DWORD PTR -104[rbp], 1
.L9:
	cmp	DWORD PTR -104[rbp], 4094
	jle	.L16
	mov	DWORD PTR -100[rbp], 1
	jmp	.L17
.L20:
	mov	DWORD PTR -104[rbp], 1
	jmp	.L18
.L19:
	mov	eax, DWORD PTR -104[rbp]
	sal	eax, 12
	mov	edx, eax
	mov	eax, DWORD PTR -100[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -128[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	edx, DWORD PTR -104[rbp]
	mov	ecx, edx
	sal	ecx, 12
	mov	edx, DWORD PTR -100[rbp]
	add	edx, ecx
	movsx	rcx, edx
	mov	rdx, QWORD PTR -136[rbp]
	add	rdx, rcx
	movzx	edx, BYTE PTR [rdx]
	movzx	edx, dl
	sub	eax, edx
	pxor	xmm7, xmm7
	cvtsi2sd	xmm7, eax
	movq	rax, xmm7
	movsd	xmm0, QWORD PTR .LC9[rip]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	pow@PLT
	movq	rax, xmm0
	mov	QWORD PTR -56[rbp], rax
	movsd	xmm0, QWORD PTR -88[rbp]
	addsd	xmm0, QWORD PTR -56[rbp]
	movsd	QWORD PTR -88[rbp], xmm0
	mov	eax, DWORD PTR -104[rbp]
	add	eax, 1
	sal	eax, 12
	mov	edx, eax
	mov	eax, DWORD PTR -100[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -128[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	edx, DWORD PTR -104[rbp]
	add	edx, 1
	mov	ecx, edx
	sal	ecx, 12
	mov	edx, DWORD PTR -100[rbp]
	add	edx, ecx
	movsx	rcx, edx
	mov	rdx, QWORD PTR -136[rbp]
	add	rdx, rcx
	movzx	edx, BYTE PTR [rdx]
	movzx	edx, dl
	sub	eax, edx
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, eax
	movq	rax, xmm2
	movsd	xmm0, QWORD PTR .LC9[rip]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	pow@PLT
	movq	rax, xmm0
	mov	QWORD PTR -56[rbp], rax
	movsd	xmm0, QWORD PTR -88[rbp]
	addsd	xmm0, QWORD PTR -56[rbp]
	movsd	QWORD PTR -88[rbp], xmm0
	add	DWORD PTR -104[rbp], 2
.L18:
	cmp	DWORD PTR -104[rbp], 4094
	jle	.L19
	add	DWORD PTR -100[rbp], 1
.L17:
	cmp	DWORD PTR -100[rbp], 4094
	jle	.L20
	movsd	xmm0, QWORD PTR -88[rbp]
	movsd	xmm1, QWORD PTR .LC10[rip]
	divsd	xmm0, xmm1
	movsd	QWORD PTR -88[rbp], xmm0
	movsd	xmm0, QWORD PTR .LC11[rip]
	divsd	xmm0, QWORD PTR -88[rbp]
	movq	rax, xmm0
	movq	xmm0, rax
	call	log10@PLT
	movsd	xmm1, QWORD PTR .LC12[rip]
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -88[rbp], xmm0
	lea	rax, -32[rbp]
	mov	rsi, rax
	mov	edi, 4
	call	clock_gettime@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	sub	rax, rdx
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	movsd	xmm2, QWORD PTR .LC13[rip]
	movapd	xmm1, xmm0
	divsd	xmm1, xmm2
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	sub	rax, rdx
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	addsd	xmm1, xmm0
	movq	rax, xmm1
	movq	xmm0, rax
	lea	rdi, .LC14[rip]
	mov	eax, 1
	call	printf@PLT
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -128[rbp]
	mov	rcx, rdx
	mov	edx, 16777216
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	fclose@PLT
	movsd	xmm0, QWORD PTR -88[rbp]
	movq	rax, xmm0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	movq	xmm0, rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sobel, .-sobel
	.section	.rodata
	.align 8
.LC15:
	.string	"PSNR of original Sobel and computed Sobel image: %g\n"
	.align 8
.LC16:
	.string	"A visualization of the sobel filter can be found at output_sobel.grey, or you can run 'make image' to get the jpg"
	.text
	.globl	main
	.type	main, @function
main:
.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	lea	rdx, golden[rip]
	lea	rsi, output[rip]
	lea	rdi, input[rip]
	call	sobel
	movq	rax, xmm0
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	movq	xmm0, rax
	lea	rdi, .LC15[rip]
	mov	eax, 1
	call	printf@PLT
	lea	rdi, .LC16[rip]
	call	puts@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC9:
	.long	0
	.long	1073741824
	.align 8
.LC10:
	.long	0
	.long	1097859072
	.align 8
.LC11:
	.long	0
	.long	1089470464
	.align 8
.LC12:
	.long	0
	.long	1076101120
	.align 8
.LC13:
	.long	0
	.long	1104006501
	.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	"447767.c"
	.text
	.global	horiz_operator
	.data
	.align	2
	.type	horiz_operator, %object
	.size	horiz_operator, 9
horiz_operator:
	.ascii	"\377\000\001"
	.ascii	"\376\000\002"
	.ascii	"\377\000\001"
	.global	vert_operator
	.align	2
	.type	vert_operator, %object
	.size	vert_operator, 9
vert_operator:
	.ascii	"\001\002\001"
	.ascii	"\000\000\000"
	.ascii	"\377\376\377"
	.comm	input,16777216,4
	.comm	output,16777216,4
	.comm	golden,16777216,4
	.text
	.align	2
	.global	convolution2D
	.syntax unified
	.arm
	.fpu softvfp
	.type	convolution2D, %function
convolution2D:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	lsl	r2, r3, #12
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	sub	r3, r3, #1
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mul	r3, r2, r3
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	lsl	r2, r3, #12
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	mul	r3, r2, r3
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	lsl	r2, r3, #12
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	add	r3, r3, #1
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	mul	r3, r2, r3
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	lsl	r2, r3, #12
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	sub	r3, r3, #1
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r3, #3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mul	r3, r2, r3
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	lsl	r2, r3, #12
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r3, #3
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	mul	r3, r2, r3
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	lsl	r2, r3, #12
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	add	r3, r3, #1
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r3, #3
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	mul	r3, r2, r3
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	lsl	r2, r3, #12
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	sub	r3, r3, #1
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r3, #6
	ldrb	r3, [r3]	@ zero_extendqisi2
	mul	r3, r2, r3
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	lsl	r2, r3, #12
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r3, #6
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	mul	r3, r2, r3
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	lsl	r2, r3, #12
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	add	r3, r3, #1
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r3, #6
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	mul	r3, r2, r3
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	convolution2D, .-convolution2D
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"input.grey\000"
	.align	2
.LC2:
	.ascii	"File input.grey not found\000"
	.align	2
.LC3:
	.ascii	"wb\000"
	.align	2
.LC4:
	.ascii	"output_sobel.grey\000"
	.align	2
.LC5:
	.ascii	"File output_sobel.grey could not be created\000"
	.align	2
.LC6:
	.ascii	"golden.grey\000"
	.align	2
.LC7:
	.ascii	"File golden.grey not found\000"
	.global	__aeabi_i2d
	.global	__aeabi_dadd
	.global	__aeabi_d2uiz
	.global	__aeabi_ui2d
	.global	__aeabi_d2iz
	.global	__aeabi_ddiv
	.global	__aeabi_dmul
	.align	2
.LC8:
	.ascii	"Total time = %10g seconds\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sobel
	.syntax unified
	.arm
	.fpu softvfp
	.type	sobel, %function
sobel:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #88
	str	r0, [fp, #-88]
	str	r1, [fp, #-92]
	str	r2, [fp, #-96]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	mov	r2, #4096
	mov	r1, #0
	ldr	r0, [fp, #-92]
	bl	memset
	ldr	r3, [fp, #-92]
	add	r3, r3, #16711680
	add	r3, r3, #61440
	mov	r2, #4096
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-80]
	b	.L4
.L5:
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #12
	mov	r2, r3
	ldr	r3, [fp, #-92]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #12
	add	r3, r3, #4080
	add	r3, r3, #15
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-80]
	add	r3, r3, #1
	str	r3, [fp, #-80]
.L4:
	ldr	r3, [fp, #-80]
	ldr	r2, .L21+4
	cmp	r3, r2
	ble	.L5
	ldr	r1, .L21+8
	ldr	r0, .L21+12
	bl	fopen
	str	r0, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bne	.L6
	ldr	r0, .L21+16
	bl	puts
	mov	r0, #1
	bl	exit
.L6:
	ldr	r1, .L21+20
	ldr	r0, .L21+24
	bl	fopen
	str	r0, [fp, #-68]
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bne	.L7
	ldr	r0, .L21+28
	bl	puts
	ldr	r0, [fp, #-72]
	bl	fclose
	mov	r0, #1
	bl	exit
.L7:
	ldr	r1, .L21+8
	ldr	r0, .L21+32
	bl	fopen
	str	r0, [fp, #-64]
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bne	.L8
	ldr	r0, .L21+36
	bl	puts
	ldr	r0, [fp, #-72]
	bl	fclose
	ldr	r0, [fp, #-68]
	bl	fclose
	mov	r0, #1
	bl	exit
.L8:
	ldr	r3, [fp, #-72]
	mov	r2, #16777216
	mov	r1, #1
	ldr	r0, [fp, #-88]
	bl	fread
	ldr	r3, [fp, #-64]
	mov	r2, #16777216
	mov	r1, #1
	ldr	r0, [fp, #-96]
	bl	fread
	ldr	r0, [fp, #-72]
	bl	fclose
	ldr	r0, [fp, #-64]
	bl	fclose
	sub	r3, fp, #32
	mov	r1, r3
	mov	r0, #4
	bl	clock_gettime
	mov	r3, #1
	str	r3, [fp, #-80]
	b	.L9
.L14:
	mov	r3, #1
	str	r3, [fp, #-76]
	b	.L10
.L13:
	ldr	r3, .L21+40
	ldr	r2, [fp, #-88]
	ldr	r1, [fp, #-76]
	ldr	r0, [fp, #-80]
	bl	convolution2D
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	mov	r3, #1073741824
	bl	pow
	mov	r4, r0
	mov	r5, r1
	ldr	r3, .L21+44
	ldr	r2, [fp, #-88]
	ldr	r1, [fp, #-76]
	ldr	r0, [fp, #-80]
	bl	convolution2D
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	mov	r3, #1073741824
	bl	pow
	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
	bl	__aeabi_d2uiz
	mov	r3, r0
	str	r3, [fp, #-60]
	ldr	r0, [fp, #-60]
	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, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #255
	ble	.L11
	ldr	r3, [fp, #-80]
	lsl	r2, r3, #12
	ldr	r3, [fp, #-76]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-92]
	add	r3, r3, r2
	mvn	r2, #0
	strb	r2, [r3]
	b	.L12
.L11:
	ldr	r3, [fp, #-80]
	lsl	r2, r3, #12
	ldr	r3, [fp, #-76]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-92]
	add	r3, r3, r2
	ldr	r2, [fp, #-56]
	and	r2, r2, #255
	strb	r2, [r3]
.L12:
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L10:
	ldr	r3, [fp, #-76]
	ldr	r2, .L21+4
	cmp	r3, r2
	ble	.L13
	ldr	r3, [fp, #-80]
	add	r3, r3, #1
	str	r3, [fp, #-80]
.L9:
	ldr	r3, [fp, #-80]
	ldr	r2, .L21+4
	cmp	r3, r2
	ble	.L14
	mov	r3, #1
	str	r3, [fp, #-76]
	b	.L15
.L18:
	mov	r3, #1
	str	r3, [fp, #-80]
	b	.L16
.L17:
	ldr	r3, [fp, #-80]
	lsl	r2, r3, #12
	ldr	r3, [fp, #-76]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-92]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, [fp, #-80]
	lsl	r2, r3, #12
	ldr	r3, [fp, #-76]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-96]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r1, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	mov	r3, #1073741824
	bl	pow
	str	r0, [fp, #-44]
	str	r1, [fp, #-40]
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	sub	r1, fp, #52
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-80]
	add	r3, r3, #1
	lsl	r2, r3, #12
	ldr	r3, [fp, #-76]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-92]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, [fp, #-80]
	add	r3, r3, #1
	lsl	r2, r3, #12
	ldr	r3, [fp, #-76]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-96]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r1, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	mov	r3, #1073741824
	bl	pow
	str	r0, [fp, #-44]
	str	r1, [fp, #-40]
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	sub	r1, fp, #52
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-80]
	add	r3, r3, #2
	str	r3, [fp, #-80]
.L16:
	ldr	r3, [fp, #-80]
	ldr	r2, .L21+4
	cmp	r3, r2
	ble	.L17
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L15:
	ldr	r3, [fp, #-76]
	ldr	r2, .L21+4
	cmp	r3, r2
	ble	.L18
	mov	r2, #0
	ldr	r3, .L21+48
	sub	r1, fp, #52
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	mov	r0, #0
	ldr	r1, .L21+52
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	log10
	mov	r2, #0
	ldr	r3, .L21+56
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	sub	r3, fp, #24
	mov	r1, r3
	mov	r0, #4
	bl	clock_gettime
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L21+60
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-32]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L21+64
	bl	printf
	ldr	r3, [fp, #-68]
	mov	r2, #16777216
	mov	r1, #1
	ldr	r0, [fp, #-92]
	bl	fwrite
	ldr	r0, [fp, #-68]
	bl	fclose
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	ldr	r1, .L21
	ldr	r0, [r1]
	ldr	r1, [fp, #-16]
	eors	r0, r1, r0
	mov	r1, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC9
	.word	4094
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	horiz_operator
	.word	vert_operator
	.word	1097859072
	.word	1089470464
	.word	1076101120
	.word	1104006501
	.word	.LC8
	.size	sobel, .-sobel
	.section	.rodata
	.align	2
.LC10:
	.ascii	"PSNR of original Sobel and computed Sobel image: %g"
	.ascii	"\012\000"
	.align	2
.LC11:
	.ascii	"A visualization of the sobel filter can be found at"
	.ascii	" output_sobel.grey, or you can run 'make image' to "
	.ascii	"get the jpg\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r2, .L25
	ldr	r1, .L25+4
	ldr	r0, .L25+8
	bl	sobel
	str	r0, [fp, #-12]
	str	r1, [fp, #-8]
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	ldr	r0, .L25+12
	bl	printf
	ldr	r0, .L25+16
	bl	puts
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	golden
	.word	output
	.word	input
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
