	.file	"154827063.c"
	.intel_syntax noprefix
	.text
	.globl	option
	.bss
	.align 4
	.type	option, @object
	.size	option, 4
option:
	.zero	4
	.globl	sobelout
	.align 8
	.type	sobelout, @object
	.size	sobelout, 8
sobelout:
	.zero	8
	.globl	temppicx
	.align 8
	.type	temppicx, @object
	.size	temppicx, 8
temppicx:
	.zero	8
	.globl	temppicy
	.align 4
	.type	temppicy, @object
	.size	temppicy, 4
temppicy:
	.zero	4
	.globl	img
	.align 8
	.type	img, @object
	.size	img, 8
img:
	.zero	8
	.globl	img2
	.align 8
	.type	img2, @object
	.size	img2, 8
img2:
	.zero	8
	.globl	numRows
	.align 4
	.type	numRows, @object
	.size	numRows, 4
numRows:
	.zero	4
	.globl	numCols
	.align 4
	.type	numCols, @object
	.size	numCols, 4
numCols:
	.zero	4
	.globl	maxVal
	.align 4
	.type	maxVal, @object
	.size	maxVal, 4
maxVal:
	.zero	4
	.globl	fo1
	.align 8
	.type	fo1, @object
	.size	fo1, 8
fo1:
	.zero	8
	.section	.rodata
.LC0:
	.string	"1) Option 1 (Brightness)"
.LC1:
	.string	"2) Option 2 (Subtract Pics)"
	.align 8
.LC2:
	.string	"3) Option 3 (Sobel Edge Highlighter)"
.LC3:
	.string	"Option: "
.LC4:
	.string	"%d"
.LC5:
	.string	"Enter image filename: "
.LC6:
	.string	"%s"
	.align 8
.LC7:
	.string	"Successfully read image file '%s'\n"
	.align 8
.LC8:
	.string	"Enter image filename for output: "
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, option[rip]
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -80[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	readpic
	mov	QWORD PTR img[rip], rax
	lea	rax, -80[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR option[rip]
	cmp	eax, 1
	jne	.L2
	mov	rax, QWORD PTR img[rip]
	mov	rdi, rax
	call	brightness
.L2:
	mov	eax, DWORD PTR option[rip]
	cmp	eax, 2
	jne	.L3
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -80[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	readpic
	mov	QWORD PTR img2[rip], rax
	lea	rax, -80[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR img[rip]
	mov	rdi, rax
	call	subtractPics
.L3:
	mov	eax, DWORD PTR option[rip]
	cmp	eax, 3
	jne	.L4
	mov	eax, 0
	call	setImage
	mov	QWORD PTR sobelout[rip], rax
	mov	eax, 0
	call	setImage
	mov	QWORD PTR temppicx[rip], rax
	mov	eax, 0
	call	setImage
	mov	DWORD PTR temppicy[rip], eax
	mov	eax, DWORD PTR temppicy[rip]
	cdqe
	mov	rcx, rax
	mov	rdx, QWORD PTR temppicx[rip]
	mov	rsi, QWORD PTR sobelout[rip]
	mov	rax, QWORD PTR img[rip]
	mov	rdi, rax
	call	sobelfunc
.L4:
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -80[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR option[rip]
	cmp	eax, 3
	jne	.L5
	mov	rdx, QWORD PTR sobelout[rip]
	lea	rax, -80[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	writeoutpic
	jmp	.L6
.L5:
	mov	rdx, QWORD PTR img[rip]
	lea	rax, -80[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	writeoutpic
.L6:
	mov	rax, QWORD PTR img[rip]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR img[rip], 0
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC9:
	.string	"Brightness: "
	.text
	.globl	brightness
	.type	brightness, @function
brightness:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -20[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -16[rbp], 0
	jmp	.L10
.L13:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L11
.L12:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rsi, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rsi
	mov	rsi, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rsi
	add	edx, ecx
	mov	DWORD PTR [rax], edx
	add	DWORD PTR -12[rbp], 1
.L11:
	mov	eax, DWORD PTR numCols[rip]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L12
	add	DWORD PTR -16[rbp], 1
.L10:
	mov	eax, DWORD PTR numRows[rip]
	cmp	DWORD PTR -16[rbp], eax
	jl	.L13
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	brightness, .-brightness
	.globl	subtractPics
	.type	subtractPics, @function
subtractPics:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -8[rbp], 0
	jmp	.L16
.L19:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L17
.L18:
	mov	rdx, QWORD PTR img[rip]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	rcx, QWORD PTR img2[rip]
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	add	rdx, rcx
	mov	rcx, QWORD PTR [rdx]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	mov	edx, DWORD PTR [rdx]
	sub	eax, edx
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	mov	rcx, QWORD PTR [rdx]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	mov	ecx, eax
	sar	ecx, 31
	xor	eax, ecx
	sub	eax, ecx
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -4[rbp], 1
.L17:
	mov	eax, DWORD PTR numCols[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L18
	add	DWORD PTR -8[rbp], 1
.L16:
	mov	eax, DWORD PTR numRows[rip]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L19
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	subtractPics, .-subtractPics
	.globl	sobelfunc
	.type	sobelfunc, @function
sobelfunc:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 160
	mov	QWORD PTR -136[rbp], rdi
	mov	QWORD PTR -144[rbp], rsi
	mov	QWORD PTR -152[rbp], rdx
	mov	QWORD PTR -160[rbp], rcx
	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 -100[rbp], 1
	mov	eax, DWORD PTR -100[rbp]
	mov	DWORD PTR -124[rbp], eax
	jmp	.L21
.L28:
	mov	eax, DWORD PTR -100[rbp]
	mov	DWORD PTR -120[rbp], eax
	jmp	.L22
.L27:
	mov	DWORD PTR -108[rbp], 0
	mov	DWORD PTR -104[rbp], 0
	mov	eax, DWORD PTR -100[rbp]
	neg	eax
	mov	DWORD PTR -116[rbp], eax
	jmp	.L23
.L26:
	mov	eax, DWORD PTR -100[rbp]
	neg	eax
	mov	DWORD PTR -112[rbp], eax
	jmp	.L24
.L25:
	mov	edx, DWORD PTR -124[rbp]
	mov	eax, DWORD PTR -116[rbp]
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	ecx, DWORD PTR -120[rbp]
	mov	eax, DWORD PTR -112[rbp]
	add	eax, ecx
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	edx, DWORD PTR -116[rbp]
	mov	eax, DWORD PTR -100[rbp]
	add	eax, edx
	mov	esi, DWORD PTR -112[rbp]
	mov	edx, DWORD PTR -100[rbp]
	add	edx, esi
	movsx	rsi, edx
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	add	rax, rsi
	mov	eax, DWORD PTR -96[rbp+rax*4]
	imul	eax, ecx
	add	DWORD PTR -108[rbp], eax
	mov	edx, DWORD PTR -124[rbp]
	mov	eax, DWORD PTR -116[rbp]
	add	eax, edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	ecx, DWORD PTR -120[rbp]
	mov	eax, DWORD PTR -112[rbp]
	add	eax, ecx
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	edx, DWORD PTR -116[rbp]
	mov	eax, DWORD PTR -100[rbp]
	add	eax, edx
	mov	esi, DWORD PTR -112[rbp]
	mov	edx, DWORD PTR -100[rbp]
	add	edx, esi
	movsx	rsi, edx
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	add	rax, rsi
	mov	eax, DWORD PTR -48[rbp+rax*4]
	imul	eax, ecx
	add	DWORD PTR -104[rbp], eax
	add	DWORD PTR -112[rbp], 1
.L24:
	mov	eax, DWORD PTR -112[rbp]
	cmp	eax, DWORD PTR -100[rbp]
	jle	.L25
	add	DWORD PTR -116[rbp], 1
.L23:
	mov	eax, DWORD PTR -116[rbp]
	cmp	eax, DWORD PTR -100[rbp]
	jle	.L26
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -152[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR -108[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -160[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR -104[rbp]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -120[rbp], 1
.L22:
	mov	eax, DWORD PTR numCols[rip]
	sub	eax, DWORD PTR -100[rbp]
	cmp	DWORD PTR -120[rbp], eax
	jl	.L27
	add	DWORD PTR -124[rbp], 1
.L21:
	mov	eax, DWORD PTR numRows[rip]
	sub	eax, DWORD PTR -100[rbp]
	cmp	DWORD PTR -124[rbp], eax
	jl	.L28
	mov	DWORD PTR -128[rbp], 0
	mov	eax, DWORD PTR -100[rbp]
	mov	DWORD PTR -124[rbp], eax
	jmp	.L29
.L33:
	mov	eax, DWORD PTR -100[rbp]
	mov	DWORD PTR -120[rbp], eax
	jmp	.L30
.L32:
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -152[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -152[rbp]
	add	rax, rcx
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	mov	ecx, edx
	imul	ecx, eax
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -160[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	lea	rsi, 0[0+rax*8]
	mov	rax, QWORD PTR -160[rbp]
	add	rax, rsi
	mov	rsi, QWORD PTR [rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 2
	add	rax, rsi
	mov	eax, DWORD PTR [rax]
	imul	eax, edx
	add	eax, ecx
	pxor	xmm3, xmm3
	cvtsi2sd	xmm3, eax
	movq	rax, xmm3
	movq	xmm0, rax
	call	sqrt@PLT
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -144[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	cvttsd2si	eax, xmm0
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -144[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -128[rbp], eax
	jge	.L31
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -144[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -128[rbp], eax
.L31:
	add	DWORD PTR -120[rbp], 1
.L30:
	mov	eax, DWORD PTR numCols[rip]
	sub	eax, DWORD PTR -100[rbp]
	cmp	DWORD PTR -120[rbp], eax
	jl	.L32
	add	DWORD PTR -124[rbp], 1
.L29:
	mov	eax, DWORD PTR numRows[rip]
	sub	eax, DWORD PTR -100[rbp]
	cmp	DWORD PTR -124[rbp], eax
	jl	.L33
	mov	DWORD PTR -124[rbp], 0
	jmp	.L34
.L37:
	mov	DWORD PTR -120[rbp], 0
	jmp	.L35
.L36:
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -144[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, DWORD PTR -128[rbp]
	movapd	xmm1, xmm0
	divsd	xmm1, xmm2
	movsd	xmm0, QWORD PTR .LC10[rip]
	mulsd	xmm0, xmm1
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -144[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	cvttsd2si	eax, xmm0
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -120[rbp], 1
.L35:
	mov	eax, DWORD PTR numCols[rip]
	cmp	DWORD PTR -120[rbp], eax
	jl	.L36
	add	DWORD PTR -124[rbp], 1
.L34:
	mov	eax, DWORD PTR numRows[rip]
	cmp	DWORD PTR -124[rbp], eax
	jl	.L37
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	sobelfunc, .-sobelfunc
	.section	.rodata
.LC11:
	.string	"wb"
	.align 8
.LC12:
	.string	"Unable to open out image file '%s'\n"
.LC13:
	.string	"P5\n"
.LC14:
	.string	"%d %d\n"
.LC15:
	.string	"255\n"
	.text
	.globl	writeoutpic
	.type	writeoutpic, @function
writeoutpic:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L40
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L40:
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rax
	mov	edx, 3
	mov	esi, 1
	lea	rdi, .LC13[rip]
	call	fwrite@PLT
	mov	ecx, DWORD PTR numCols[rip]
	mov	edx, DWORD PTR numRows[rip]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rax
	mov	edx, 4
	mov	esi, 1
	lea	rdi, .LC15[rip]
	call	fwrite@PLT
	mov	DWORD PTR -16[rbp], 0
	jmp	.L41
.L44:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L42
.L43:
	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	BYTE PTR -17[rbp], al
	movsx	eax, BYTE PTR -17[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	add	DWORD PTR -12[rbp], 1
.L42:
	mov	eax, DWORD PTR numCols[rip]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L43
	add	DWORD PTR -16[rbp], 1
.L41:
	mov	eax, DWORD PTR numRows[rip]
	cmp	DWORD PTR -16[rbp], eax
	jl	.L44
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	writeoutpic, .-writeoutpic
	.section	.rodata
.LC16:
	.string	"rb"
	.align 8
.LC17:
	.string	"Unable to open image file '%s'\n"
	.text
	.globl	readpic
	.type	readpic, @function
readpic:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L46
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L46:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	readHeader
	mov	eax, 0
	call	setImage
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	readBinaryData
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	readpic, .-readpic
	.globl	readHeader
	.type	readHeader, @function
readHeader:
.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, 112
	mov	QWORD PTR -104[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -92[rbp], 0
	mov	DWORD PTR -88[rbp], 0
	mov	DWORD PTR -84[rbp], 0
	jmp	.L49
.L55:
	mov	rdx, QWORD PTR -104[rbp]
	lea	rax, -80[rbp]
	mov	esi, 70
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -80[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L49
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 1
	jne	.L51
	jmp	.L49
.L51:
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	isComment
	test	eax, eax
	je	.L52
	jmp	.L49
.L52:
	cmp	DWORD PTR -92[rbp], 0
	jne	.L53
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	readImgID
	mov	DWORD PTR -92[rbp], 1
	jmp	.L49
.L53:
	cmp	DWORD PTR -88[rbp], 0
	jne	.L54
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	readImgSize
	mov	DWORD PTR -88[rbp], 1
	jmp	.L49
.L54:
	cmp	DWORD PTR -84[rbp], 0
	jne	.L49
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	readMaxVal
	mov	DWORD PTR -84[rbp], 1
.L49:
	cmp	DWORD PTR -92[rbp], 0
	je	.L55
	cmp	DWORD PTR -88[rbp], 0
	je	.L55
	cmp	DWORD PTR -84[rbp], 0
	je	.L55
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L56
	call	__stack_chk_fail@PLT
.L56:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	readHeader, .-readHeader
	.globl	isComment
	.type	isComment, @function
isComment:
.LFB13:
	.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 -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 35
	jne	.L58
	mov	eax, 1
	jmp	.L59
.L58:
	mov	eax, 0
.L59:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	isComment, .-isComment
	.section	.rodata
.LC18:
	.string	"Invalid image ID"
	.text
	.globl	readImgID
	.type	readImgID, @function
readImgID:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L62
	lea	rdi, .LC18[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L62:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	readImgID, .-readImgID
	.section	.rodata
.LC19:
	.string	"Invalid image size"
.LC20:
	.string	"%d %d"
	.text
	.globl	readImgSize
	.type	readImgSize, @function
readImgSize:
.LFB15:
	.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	DWORD PTR -20[rbp], 0
	jmp	.L64
.L66:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	ecx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	jne	.L65
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	ecx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	jne	.L65
	lea	rdi, .LC19[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L65:
	add	DWORD PTR -20[rbp], 1
.L64:
	mov	ebx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	jb	.L66
	mov	rax, QWORD PTR -40[rbp]
	lea	rcx, numCols[rip]
	lea	rdx, numRows[rip]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	readImgSize, .-readImgSize
	.section	.rodata
.LC21:
	.string	"Invalid image max value"
	.text
	.globl	readMaxVal
	.type	readMaxVal, @function
readMaxVal:
.LFB16:
	.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	DWORD PTR -20[rbp], 0
	jmp	.L68
.L70:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	ecx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	jne	.L69
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	ecx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	jne	.L69
	lea	rdi, .LC21[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L69:
	add	DWORD PTR -20[rbp], 1
.L68:
	mov	ebx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	jb	.L70
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR maxVal[rip], eax
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	readMaxVal, .-readMaxVal
	.globl	setImage
	.type	setImage, @function
setImage:
.LFB17:
	.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, 24
	.cfi_offset 3, -24
	mov	eax, DWORD PTR numRows[rip]
	cdqe
	mov	esi, 8
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -28[rbp], 0
	jmp	.L72
.L73:
	mov	eax, DWORD PTR numCols[rip]
	cdqe
	mov	edx, DWORD PTR -28[rbp]
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rbx, [rcx+rdx]
	mov	esi, 4
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR [rbx], rax
	add	DWORD PTR -28[rbp], 1
.L72:
	mov	eax, DWORD PTR numRows[rip]
	cmp	DWORD PTR -28[rbp], eax
	jb	.L73
	mov	rax, QWORD PTR -24[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	setImage, .-setImage
	.globl	readBinaryData
	.type	readBinaryData, @function
readBinaryData:
.LFB18:
	.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	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -24[rbp], 0
	jmp	.L76
.L79:
	mov	DWORD PTR -20[rbp], 0
	jmp	.L77
.L78:
	mov	eax, DWORD PTR -24[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	sal	rax, 2
	lea	rbx, [rdx+rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	DWORD PTR [rbx], eax
	add	DWORD PTR -20[rbp], 1
.L77:
	mov	eax, DWORD PTR numCols[rip]
	cmp	DWORD PTR -20[rbp], eax
	jb	.L78
	add	DWORD PTR -24[rbp], 1
.L76:
	mov	eax, DWORD PTR numRows[rip]
	cmp	DWORD PTR -24[rbp], eax
	jb	.L79
	nop
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	readBinaryData, .-readBinaryData
	.section	.rodata
	.align 8
.LC10:
	.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	"154827063.c"
	.text
	.comm	option,4,4
	.comm	sobelout,4,4
	.comm	temppicx,4,4
	.comm	temppicy,4,4
	.comm	img,4,4
	.comm	img2,4,4
	.comm	numRows,4,4
	.comm	numCols,4,4
	.comm	maxVal,4,4
	.comm	fo1,4,4
	.section	.rodata
	.align	2
.LC2:
	.ascii	"1) Option 1 (Brightness)\000"
	.align	2
.LC3:
	.ascii	"2) Option 2 (Subtract Pics)\000"
	.align	2
.LC4:
	.ascii	"3) Option 3 (Sobel Edge Highlighter)\000"
	.align	2
.LC5:
	.ascii	"Option: \000"
	.align	2
.LC6:
	.ascii	"%d\000"
	.align	2
.LC7:
	.ascii	"Enter image filename: \000"
	.align	2
.LC8:
	.ascii	"%s\000"
	.align	2
.LC9:
	.ascii	"Successfully read image file '%s'\012\000"
	.align	2
.LC10:
	.ascii	"Enter image filename for output: \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 = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #80
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L9+4
	bl	puts
	ldr	r0, .L9+8
	bl	puts
	ldr	r0, .L9+12
	bl	puts
	ldr	r0, .L9+16
	bl	printf
	ldr	r1, .L9+20
	ldr	r0, .L9+24
	bl	__isoc99_scanf
	ldr	r0, .L9+28
	bl	printf
	sub	r3, fp, #80
	mov	r1, r3
	ldr	r0, .L9+32
	bl	__isoc99_scanf
	sub	r3, fp, #80
	mov	r0, r3
	bl	readpic
	mov	r3, r0
	ldr	r2, .L9+36
	str	r3, [r2]
	sub	r3, fp, #80
	mov	r1, r3
	ldr	r0, .L9+40
	bl	printf
	ldr	r3, .L9+20
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L2
	ldr	r3, .L9+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	brightness
.L2:
	ldr	r3, .L9+20
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L3
	ldr	r0, .L9+28
	bl	printf
	sub	r3, fp, #80
	mov	r1, r3
	ldr	r0, .L9+32
	bl	__isoc99_scanf
	sub	r3, fp, #80
	mov	r0, r3
	bl	readpic
	mov	r3, r0
	ldr	r2, .L9+44
	str	r3, [r2]
	sub	r3, fp, #80
	mov	r1, r3
	ldr	r0, .L9+40
	bl	printf
	ldr	r3, .L9+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	subtractPics
.L3:
	ldr	r3, .L9+20
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L4
	bl	setImage
	mov	r3, r0
	ldr	r2, .L9+48
	str	r3, [r2]
	bl	setImage
	mov	r3, r0
	ldr	r2, .L9+52
	str	r3, [r2]
	bl	setImage
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L9+56
	str	r2, [r3]
	ldr	r3, .L9+36
	ldr	r0, [r3]
	ldr	r3, .L9+48
	ldr	r1, [r3]
	ldr	r3, .L9+52
	ldr	r2, [r3]
	ldr	r3, .L9+56
	ldr	r3, [r3]
	bl	sobelfunc
.L4:
	ldr	r0, .L9+60
	bl	printf
	sub	r3, fp, #80
	mov	r1, r3
	ldr	r0, .L9+32
	bl	__isoc99_scanf
	ldr	r3, .L9+20
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L5
	ldr	r3, .L9+48
	ldr	r2, [r3]
	sub	r3, fp, #80
	mov	r1, r2
	mov	r0, r3
	bl	writeoutpic
	b	.L6
.L5:
	ldr	r3, .L9+36
	ldr	r2, [r3]
	sub	r3, fp, #80
	mov	r1, r2
	mov	r0, r3
	bl	writeoutpic
.L6:
	ldr	r3, .L9+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, .L9+36
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #0
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC11
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	option
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	img
	.word	.LC9
	.word	img2
	.word	sobelout
	.word	temppicx
	.word	temppicy
	.word	.LC10
	.size	main, .-main
	.section	.rodata
	.align	2
.LC12:
	.ascii	"Brightness: \000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	brightness
	.syntax unified
	.arm
	.fpu softvfp
	.type	brightness, %function
brightness:
	@ 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]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L17+4
	bl	printf
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L17+8
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L12
.L15:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L13
.L14:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-24]
	add	r3, r0, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r0, r3
	add	r2, r1, r2
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L13:
	ldr	r3, .L17+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L14
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L12:
	ldr	r3, .L17+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L15
	nop
	ldr	r3, .L17
	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}
.L18:
	.align	2
.L17:
	.word	.LC13
	.word	.LC12
	.word	.LC6
	.word	numCols
	.word	numRows
	.size	brightness, .-brightness
	.align	2
	.global	subtractPics
	.syntax unified
	.arm
	.fpu softvfp
	.type	subtractPics, %function
subtractPics:
	@ 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, #-12]
	b	.L20
.L23:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L21
.L22:
	ldr	r3, .L24
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, .L24+4
	ldr	r1, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	sub	r2, r2, r3
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r1, r3
	cmp	r2, #0
	rsblt	r2, r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L21:
	ldr	r3, .L24+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L22
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L20:
	ldr	r3, .L24+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L23
	nop
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L25:
	.align	2
.L24:
	.word	img
	.word	img2
	.word	numCols
	.word	numRows
	.size	subtractPics, .-subtractPics
	.global	__aeabi_i2d
	.global	__aeabi_d2iz
	.global	__aeabi_ddiv
	.global	__aeabi_dmul
	.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
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sobelfunc
	.syntax unified
	.arm
	.fpu softvfp
	.type	sobelfunc, %function
sobelfunc:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #128
	str	r0, [fp, #-128]
	str	r1, [fp, #-132]
	str	r2, [fp, #-136]
	str	r3, [fp, #-140]
	ldr	r3, .L45
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L45+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, .L45+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, #-92]
	ldr	r3, [fp, #-92]
	str	r3, [fp, #-116]
	b	.L27
.L34:
	ldr	r3, [fp, #-92]
	str	r3, [fp, #-112]
	b	.L28
.L33:
	mov	r3, #0
	str	r3, [fp, #-100]
	mov	r3, #0
	str	r3, [fp, #-96]
	ldr	r3, [fp, #-92]
	rsb	r3, r3, #0
	str	r3, [fp, #-108]
	b	.L29
.L32:
	ldr	r3, [fp, #-92]
	rsb	r3, r3, #0
	str	r3, [fp, #-104]
	b	.L30
.L31:
	ldr	r2, [fp, #-116]
	ldr	r3, [fp, #-108]
	add	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-128]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r1, [fp, #-112]
	ldr	r3, [fp, #-104]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r2, [fp, #-108]
	ldr	r3, [fp, #-92]
	add	r2, r2, r3
	ldr	r0, [fp, #-104]
	ldr	r3, [fp, #-92]
	add	r0, r0, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r3, r0
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-76]
	mul	r3, r1, r3
	ldr	r2, [fp, #-100]
	add	r3, r2, r3
	str	r3, [fp, #-100]
	ldr	r2, [fp, #-116]
	ldr	r3, [fp, #-108]
	add	r3, r2, r3
	lsl	r3, r3, #2
	ldr	r2, [fp, #-128]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r1, [fp, #-112]
	ldr	r3, [fp, #-104]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r2, [fp, #-108]
	ldr	r3, [fp, #-92]
	add	r2, r2, r3
	ldr	r0, [fp, #-104]
	ldr	r3, [fp, #-92]
	add	r0, r0, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r3, r0
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-40]
	mul	r3, r1, r3
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	str	r3, [fp, #-96]
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L30:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	ble	.L31
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L29:
	ldr	r2, [fp, #-108]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	ble	.L32
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-136]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-100]
	str	r2, [r3]
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-140]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-96]
	str	r2, [r3]
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
.L28:
	ldr	r3, .L45+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	ldr	r2, [fp, #-112]
	cmp	r2, r3
	blt	.L33
	ldr	r3, [fp, #-116]
	add	r3, r3, #1
	str	r3, [fp, #-116]
.L27:
	ldr	r3, .L45+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	ldr	r2, [fp, #-116]
	cmp	r2, r3
	blt	.L34
	mov	r3, #0
	str	r3, [fp, #-120]
	ldr	r3, [fp, #-92]
	str	r3, [fp, #-116]
	b	.L35
.L39:
	ldr	r3, [fp, #-92]
	str	r3, [fp, #-112]
	b	.L36
.L38:
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-136]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-116]
	lsl	r2, r2, #2
	ldr	r1, [fp, #-136]
	add	r2, r1, r2
	ldr	r1, [r2]
	ldr	r2, [fp, #-112]
	lsl	r2, r2, #2
	add	r2, r1, r2
	ldr	r2, [r2]
	mul	r2, r3, r2
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-140]
	add	r3, r1, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	ldr	r1, [fp, #-116]
	lsl	r1, r1, #2
	ldr	r0, [fp, #-140]
	add	r1, r0, r1
	ldr	r0, [r1]
	ldr	r1, [fp, #-112]
	lsl	r1, r1, #2
	add	r1, r0, r1
	ldr	r1, [r1]
	mul	r3, r1, r3
	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]
	lsl	r1, r1, #2
	ldr	r0, [fp, #-132]
	add	r1, r0, r1
	ldr	r0, [r1]
	ldr	r1, [fp, #-112]
	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]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-132]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-120]
	cmp	r2, r3
	bge	.L37
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-132]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-120]
.L37:
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
.L36:
	ldr	r3, .L45+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	ldr	r2, [fp, #-112]
	cmp	r2, r3
	blt	.L38
	ldr	r3, [fp, #-116]
	add	r3, r3, #1
	str	r3, [fp, #-116]
.L35:
	ldr	r3, .L45+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	ldr	r2, [fp, #-116]
	cmp	r2, r3
	blt	.L39
	mov	r3, #0
	str	r3, [fp, #-116]
	b	.L40
.L43:
	mov	r3, #0
	str	r3, [fp, #-112]
	b	.L41
.L42:
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-132]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r0, [fp, #-120]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L45+20
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-132]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	add	r4, r2, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
.L41:
	ldr	r3, .L45+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-112]
	cmp	r2, r3
	blt	.L42
	ldr	r3, [fp, #-116]
	add	r3, r3, #1
	str	r3, [fp, #-116]
.L40:
	ldr	r3, .L45+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-116]
	cmp	r2, r3
	blt	.L43
	nop
	ldr	r3, .L45
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L44
	bl	__stack_chk_fail
.L44:
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L46:
	.align	2
.L45:
	.word	.LC14
	.word	.LC0
	.word	.LC1
	.word	numCols
	.word	numRows
	.word	1081073664
	.size	sobelfunc, .-sobelfunc
	.section	.rodata
	.align	2
.LC15:
	.ascii	"wb\000"
	.align	2
.LC16:
	.ascii	"Unable to open out image file '%s'\012\000"
	.align	2
.LC17:
	.ascii	"P5\012\000"
	.align	2
.LC18:
	.ascii	"%d %d\012\000"
	.align	2
.LC19:
	.ascii	"255\012\000"
	.text
	.align	2
	.global	writeoutpic
	.syntax unified
	.arm
	.fpu softvfp
	.type	writeoutpic, %function
writeoutpic:
	@ 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, .L53
	ldr	r0, [fp, #-24]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L48
	ldr	r1, [fp, #-24]
	ldr	r0, .L53+4
	bl	printf
	mov	r0, #1
	bl	exit
.L48:
	ldr	r3, [fp, #-8]
	mov	r2, #3
	mov	r1, #1
	ldr	r0, .L53+8
	bl	fwrite
	ldr	r3, .L53+12
	ldr	r2, [r3]
	ldr	r3, .L53+16
	ldr	r3, [r3]
	ldr	r1, .L53+20
	ldr	r0, [fp, #-8]
	bl	fprintf
	ldr	r3, [fp, #-8]
	mov	r2, #4
	mov	r1, #1
	ldr	r0, .L53+24
	bl	fwrite
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L49
.L52:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L50
.L51:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	strb	r3, [fp, #-17]
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	fputc
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L50:
	ldr	r3, .L53+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L51
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L49:
	ldr	r3, .L53+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L52
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L54:
	.align	2
.L53:
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	numRows
	.word	numCols
	.word	.LC18
	.word	.LC19
	.size	writeoutpic, .-writeoutpic
	.section	.rodata
	.align	2
.LC20:
	.ascii	"rb\000"
	.align	2
.LC21:
	.ascii	"Unable to open image file '%s'\012\000"
	.text
	.align	2
	.global	readpic
	.syntax unified
	.arm
	.fpu softvfp
	.type	readpic, %function
readpic:
	@ 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]
	ldr	r1, .L58
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L56
	ldr	r1, [fp, #-16]
	ldr	r0, .L58+4
	bl	printf
	mov	r0, #1
	bl	exit
.L56:
	ldr	r0, [fp, #-12]
	bl	readHeader
	bl	setImage
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	readBinaryData
	ldr	r0, [fp, #-12]
	bl	fclose
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L59:
	.align	2
.L58:
	.word	.LC20
	.word	.LC21
	.size	readpic, .-readpic
	.section	.rodata
	.align	2
.LC22:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	readHeader
	.syntax unified
	.arm
	.fpu softvfp
	.type	readHeader, %function
readHeader:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #96
	str	r0, [fp, #-96]
	ldr	r3, .L69
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-92]
	mov	r3, #0
	str	r3, [fp, #-88]
	mov	r3, #0
	str	r3, [fp, #-84]
	b	.L61
.L67:
	sub	r3, fp, #80
	ldr	r2, [fp, #-96]
	mov	r1, #70
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #80
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L61
	sub	r3, fp, #80
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	cmp	r3, #1
	bne	.L63
	b	.L61
.L63:
	sub	r3, fp, #80
	mov	r0, r3
	bl	isComment
	mov	r3, r0
	cmp	r3, #0
	beq	.L64
	b	.L61
.L64:
	ldr	r3, [fp, #-92]
	cmp	r3, #0
	bne	.L65
	sub	r3, fp, #80
	mov	r0, r3
	bl	readImgID
	mov	r3, #1
	str	r3, [fp, #-92]
	b	.L61
.L65:
	ldr	r3, [fp, #-88]
	cmp	r3, #0
	bne	.L66
	sub	r3, fp, #80
	mov	r0, r3
	bl	readImgSize
	mov	r3, #1
	str	r3, [fp, #-88]
	b	.L61
.L66:
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	bne	.L61
	sub	r3, fp, #80
	mov	r0, r3
	bl	readMaxVal
	mov	r3, #1
	str	r3, [fp, #-84]
.L61:
	ldr	r3, [fp, #-92]
	cmp	r3, #0
	beq	.L67
	ldr	r3, [fp, #-88]
	cmp	r3, #0
	beq	.L67
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	beq	.L67
	nop
	ldr	r3, .L69
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L68
	bl	__stack_chk_fail
.L68:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L70:
	.align	2
.L69:
	.word	.LC22
	.size	readHeader, .-readHeader
	.align	2
	.global	isComment
	.syntax unified
	.arm
	.fpu softvfp
	.type	isComment, %function
isComment:
	@ 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]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #35
	bne	.L72
	mov	r3, #1
	b	.L73
.L72:
	mov	r3, #0
.L73:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	isComment, .-isComment
	.section	.rodata
	.align	2
.LC23:
	.ascii	"Invalid image ID\000"
	.text
	.align	2
	.global	readImgID
	.syntax unified
	.arm
	.fpu softvfp
	.type	readImgID, %function
readImgID:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r1, .L77
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L76
	ldr	r0, .L77+4
	bl	puts
	mov	r0, #1
	bl	exit
.L76:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L78:
	.align	2
.L77:
	.word	.LC17
	.word	.LC23
	.size	readImgID, .-readImgID
	.section	.rodata
	.align	2
.LC24:
	.ascii	"Invalid image size\000"
	.align	2
.LC25:
	.ascii	"%d %d\000"
	.text
	.align	2
	.global	readImgSize
	.syntax unified
	.arm
	.fpu softvfp
	.type	readImgSize, %function
readImgSize:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L80
.L82:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r1, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	bne	.L81
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r1, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L81
	ldr	r0, .L83
	bl	puts
	mov	r0, #1
	bl	exit
.L81:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L80:
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-8]
	cmp	r3, r2
	bcc	.L82
	ldr	r3, .L83+4
	ldr	r2, .L83+8
	ldr	r1, .L83+12
	ldr	r0, [fp, #-16]
	bl	__isoc99_sscanf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L84:
	.align	2
.L83:
	.word	.LC24
	.word	numCols
	.word	numRows
	.word	.LC25
	.size	readImgSize, .-readImgSize
	.section	.rodata
	.align	2
.LC26:
	.ascii	"Invalid image max value\000"
	.text
	.align	2
	.global	readMaxVal
	.syntax unified
	.arm
	.fpu softvfp
	.type	readMaxVal, %function
readMaxVal:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L86
.L88:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r1, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	bne	.L87
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r1, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L87
	ldr	r0, .L89
	bl	puts
	mov	r0, #1
	bl	exit
.L87:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L86:
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-8]
	cmp	r3, r2
	bcc	.L88
	ldr	r0, [fp, #-16]
	bl	atoi
	mov	r3, r0
	ldr	r2, .L89+4
	str	r3, [r2]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L90:
	.align	2
.L89:
	.word	.LC26
	.word	maxVal
	.size	readMaxVal, .-readMaxVal
	.align	2
	.global	setImage
	.syntax unified
	.arm
	.fpu softvfp
	.type	setImage, %function
setImage:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	ldr	r3, .L95
	ldr	r3, [r3]
	mov	r1, #4
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L92
.L93:
	ldr	r3, .L95+4
	ldr	r3, [r3]
	mov	r0, r3
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	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]
.L92:
	ldr	r3, .L95
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-20]
	cmp	r3, r2
	bcc	.L93
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L96:
	.align	2
.L95:
	.word	numRows
	.word	numCols
	.size	setImage, .-setImage
	.align	2
	.global	readBinaryData
	.syntax unified
	.arm
	.fpu softvfp
	.type	readBinaryData, %function
readBinaryData:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L98
.L101:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L99
.L100:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r4, r2, r3
	ldr	r0, [fp, #-24]
	bl	fgetc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L99:
	ldr	r3, .L102
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-16]
	cmp	r3, r2
	bcc	.L100
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L98:
	ldr	r3, .L102+4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-20]
	cmp	r3, r2
	bcc	.L101
	nop
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L103:
	.align	2
.L102:
	.word	numCols
	.word	numRows
	.size	readBinaryData, .-readBinaryData
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
