	.file	"130122.c"
	.intel_syntax noprefix
	.text
	.globl	stderr
	.bss
	.align 8
	.type	stderr, @object
	.size	stderr, 8
stderr:
	.zero	8
	.globl	sync_cond
	.align 32
	.type	sync_cond, @object
	.size	sync_cond, 48
sync_cond:
	.zero	48
	.globl	sync_count
	.align 4
	.type	sync_count, @object
	.size	sync_count, 4
sync_count:
	.zero	4
	.globl	sync_lock
	.align 32
	.type	sync_lock, @object
	.size	sync_lock, 40
sync_lock:
	.zero	40
	.globl	sync_max_count
	.align 4
	.type	sync_max_count, @object
	.size	sync_max_count, 4
sync_max_count:
	.zero	4
	.text
	.globl	SynchronizationPoint
	.type	SynchronizationPoint, @function
SynchronizationPoint:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, sync_lock[rip]
	call	pthread_mutex_lock@PLT
	mov	eax, DWORD PTR sync_count[rip]
	add	eax, 1
	mov	DWORD PTR sync_count[rip], eax
	mov	edx, DWORD PTR sync_count[rip]
	mov	eax, DWORD PTR sync_max_count[rip]
	cmp	edx, eax
	jge	.L2
	lea	rsi, sync_lock[rip]
	lea	rdi, sync_cond[rip]
	call	pthread_cond_wait@PLT
	jmp	.L3
.L2:
	mov	DWORD PTR sync_count[rip], 0
	lea	rdi, sync_cond[rip]
	call	pthread_cond_broadcast@PLT
.L3:
	lea	rdi, sync_lock[rip]
	call	pthread_mutex_unlock@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	SynchronizationPoint, .-SynchronizationPoint
	.section	.rodata
.LC0:
	.string	"malloc failed"
	.text
	.globl	allocate_image
	.type	allocate_image, @function
allocate_image:
.LFB1:
	.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	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 13
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	call	getchar@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	allocate_image, .-allocate_image
	.section	.rodata
.LC2:
	.string	"Filtering %d took %g secs\n"
	.text
	.globl	blurfilter
	.type	blurfilter, @function
blurfilter:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 368
	mov	DWORD PTR -324[rbp], edi
	mov	DWORD PTR -328[rbp], esi
	mov	QWORD PTR -336[rbp], rdx
	mov	QWORD PTR -344[rbp], rcx
	mov	DWORD PTR -348[rbp], r8d
	mov	QWORD PTR -360[rbp], r9
	mov	rax, QWORD PTR 16[rbp]
	mov	QWORD PTR -368[rbp], rax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR 24[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -368[rbp]
	add	rax, rdx
	mov	QWORD PTR -264[rbp], rax
	mov	rax, QWORD PTR -264[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -256[rbp], rax
	mov	rax, QWORD PTR -256[rbp]
	mov	eax, DWORD PTR 24[rax]
	mov	DWORD PTR -308[rbp], eax
	mov	rax, QWORD PTR -256[rbp]
	mov	eax, DWORD PTR 28[rax]
	mov	DWORD PTR -304[rbp], eax
	lea	rax, -48[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	clock_gettime@PLT
	mov	eax, DWORD PTR -308[rbp]
	mov	DWORD PTR -316[rbp], eax
	jmp	.L9
.L16:
	mov	DWORD PTR -320[rbp], 0
	jmp	.L10
.L15:
	mov	ecx, DWORD PTR -324[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -320[rbp]
	mov	rax, QWORD PTR -336[rbp]
	mov	rdi, rax
	call	pix
	mov	QWORD PTR -144[rbp], rax
	mov	rax, QWORD PTR -360[rbp]
	movsd	xmm1, QWORD PTR [rax]
	mov	rax, QWORD PTR -144[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -296[rbp], xmm0
	mov	ecx, DWORD PTR -324[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -320[rbp]
	mov	rax, QWORD PTR -336[rbp]
	mov	rdi, rax
	call	pix
	mov	QWORD PTR -136[rbp], rax
	mov	rax, QWORD PTR -360[rbp]
	movsd	xmm1, QWORD PTR [rax]
	mov	rax, QWORD PTR -136[rbp]
	movzx	eax, BYTE PTR 1[rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -288[rbp], xmm0
	mov	ecx, DWORD PTR -324[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -320[rbp]
	mov	rax, QWORD PTR -336[rbp]
	mov	rdi, rax
	call	pix
	mov	QWORD PTR -128[rbp], rax
	mov	rax, QWORD PTR -360[rbp]
	movsd	xmm1, QWORD PTR [rax]
	mov	rax, QWORD PTR -128[rbp]
	movzx	eax, BYTE PTR 2[rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -280[rbp], xmm0
	mov	rax, QWORD PTR -360[rbp]
	movsd	xmm0, QWORD PTR [rax]
	movsd	QWORD PTR -272[rbp], xmm0
	mov	DWORD PTR -312[rbp], 1
	jmp	.L11
.L14:
	mov	eax, DWORD PTR -312[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -360[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	movsd	QWORD PTR -200[rbp], xmm0
	mov	eax, DWORD PTR -320[rbp]
	sub	eax, DWORD PTR -312[rbp]
	mov	DWORD PTR -300[rbp], eax
	cmp	DWORD PTR -300[rbp], 0
	js	.L12
	mov	ecx, DWORD PTR -324[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -300[rbp]
	mov	rax, QWORD PTR -336[rbp]
	mov	rdi, rax
	call	pix
	mov	QWORD PTR -96[rbp], rax
	mov	rax, QWORD PTR -96[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, QWORD PTR -200[rbp]
	movsd	xmm1, QWORD PTR -296[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -296[rbp], xmm0
	mov	ecx, DWORD PTR -324[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -300[rbp]
	mov	rax, QWORD PTR -336[rbp]
	mov	rdi, rax
	call	pix
	mov	QWORD PTR -88[rbp], rax
	mov	rax, QWORD PTR -88[rbp]
	movzx	eax, BYTE PTR 1[rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, QWORD PTR -200[rbp]
	movsd	xmm1, QWORD PTR -288[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -288[rbp], xmm0
	mov	ecx, DWORD PTR -324[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -300[rbp]
	mov	rax, QWORD PTR -336[rbp]
	mov	rdi, rax
	call	pix
	mov	QWORD PTR -80[rbp], rax
	mov	rax, QWORD PTR -80[rbp]
	movzx	eax, BYTE PTR 2[rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, QWORD PTR -200[rbp]
	movsd	xmm1, QWORD PTR -280[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -280[rbp], xmm0
	movsd	xmm0, QWORD PTR -272[rbp]
	addsd	xmm0, QWORD PTR -200[rbp]
	movsd	QWORD PTR -272[rbp], xmm0
.L12:
	mov	edx, DWORD PTR -320[rbp]
	mov	eax, DWORD PTR -312[rbp]
	add	eax, edx
	mov	DWORD PTR -300[rbp], eax
	mov	eax, DWORD PTR -300[rbp]
	cmp	eax, DWORD PTR -324[rbp]
	jge	.L13
	mov	ecx, DWORD PTR -324[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -300[rbp]
	mov	rax, QWORD PTR -336[rbp]
	mov	rdi, rax
	call	pix
	mov	QWORD PTR -72[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, QWORD PTR -200[rbp]
	movsd	xmm1, QWORD PTR -296[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -296[rbp], xmm0
	mov	ecx, DWORD PTR -324[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -300[rbp]
	mov	rax, QWORD PTR -336[rbp]
	mov	rdi, rax
	call	pix
	mov	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	movzx	eax, BYTE PTR 1[rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, QWORD PTR -200[rbp]
	movsd	xmm1, QWORD PTR -288[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -288[rbp], xmm0
	mov	ecx, DWORD PTR -324[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -300[rbp]
	mov	rax, QWORD PTR -336[rbp]
	mov	rdi, rax
	call	pix
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	movzx	eax, BYTE PTR 2[rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, QWORD PTR -200[rbp]
	movsd	xmm1, QWORD PTR -280[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -280[rbp], xmm0
	movsd	xmm0, QWORD PTR -272[rbp]
	addsd	xmm0, QWORD PTR -200[rbp]
	movsd	QWORD PTR -272[rbp], xmm0
.L13:
	add	DWORD PTR -312[rbp], 1
.L11:
	mov	eax, DWORD PTR -348[rbp]
	cmp	eax, DWORD PTR -312[rbp]
	jge	.L14
	mov	ecx, DWORD PTR -328[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -320[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	pix_trans
	mov	QWORD PTR -120[rbp], rax
	movsd	xmm0, QWORD PTR -296[rbp]
	divsd	xmm0, QWORD PTR -272[rbp]
	cvttsd2si	eax, xmm0
	mov	edx, eax
	mov	rax, QWORD PTR -120[rbp]
	mov	BYTE PTR [rax], dl
	mov	ecx, DWORD PTR -328[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -320[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	pix_trans
	mov	QWORD PTR -112[rbp], rax
	movsd	xmm0, QWORD PTR -288[rbp]
	divsd	xmm0, QWORD PTR -272[rbp]
	cvttsd2si	eax, xmm0
	mov	edx, eax
	mov	rax, QWORD PTR -112[rbp]
	mov	BYTE PTR 1[rax], dl
	mov	ecx, DWORD PTR -328[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -320[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	pix_trans
	mov	QWORD PTR -104[rbp], rax
	movsd	xmm0, QWORD PTR -280[rbp]
	divsd	xmm0, QWORD PTR -272[rbp]
	cvttsd2si	eax, xmm0
	mov	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	BYTE PTR 2[rax], dl
	add	DWORD PTR -320[rbp], 1
.L10:
	mov	eax, DWORD PTR -320[rbp]
	cmp	eax, DWORD PTR -324[rbp]
	jl	.L15
	add	DWORD PTR -316[rbp], 1
.L9:
	mov	eax, DWORD PTR -316[rbp]
	cmp	eax, DWORD PTR -304[rbp]
	jl	.L16
	call	SynchronizationPoint
	mov	DWORD PTR -316[rbp], 0
	jmp	.L17
.L24:
	mov	eax, DWORD PTR -308[rbp]
	mov	DWORD PTR -320[rbp], eax
	jmp	.L18
.L23:
	mov	ecx, DWORD PTR -328[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -320[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	pix
	mov	QWORD PTR -248[rbp], rax
	mov	rax, QWORD PTR -360[rbp]
	movsd	xmm1, QWORD PTR [rax]
	mov	rax, QWORD PTR -248[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -296[rbp], xmm0
	mov	ecx, DWORD PTR -328[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -320[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	pix
	mov	QWORD PTR -240[rbp], rax
	mov	rax, QWORD PTR -360[rbp]
	movsd	xmm1, QWORD PTR [rax]
	mov	rax, QWORD PTR -240[rbp]
	movzx	eax, BYTE PTR 1[rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -288[rbp], xmm0
	mov	ecx, DWORD PTR -328[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -320[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	pix
	mov	QWORD PTR -232[rbp], rax
	mov	rax, QWORD PTR -360[rbp]
	movsd	xmm1, QWORD PTR [rax]
	mov	rax, QWORD PTR -232[rbp]
	movzx	eax, BYTE PTR 2[rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, xmm1
	movsd	QWORD PTR -280[rbp], xmm0
	mov	rax, QWORD PTR -360[rbp]
	movsd	xmm0, QWORD PTR [rax]
	movsd	QWORD PTR -272[rbp], xmm0
	mov	DWORD PTR -312[rbp], 1
	jmp	.L19
.L22:
	mov	eax, DWORD PTR -312[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -360[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	movsd	QWORD PTR -200[rbp], xmm0
	mov	eax, DWORD PTR -320[rbp]
	sub	eax, DWORD PTR -312[rbp]
	mov	DWORD PTR -300[rbp], eax
	cmp	DWORD PTR -300[rbp], 0
	js	.L20
	mov	ecx, DWORD PTR -328[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -300[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	pix
	mov	QWORD PTR -192[rbp], rax
	mov	rax, QWORD PTR -192[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, QWORD PTR -200[rbp]
	movsd	xmm1, QWORD PTR -296[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -296[rbp], xmm0
	mov	ecx, DWORD PTR -328[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -300[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	pix
	mov	QWORD PTR -184[rbp], rax
	mov	rax, QWORD PTR -184[rbp]
	movzx	eax, BYTE PTR 1[rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, QWORD PTR -200[rbp]
	movsd	xmm1, QWORD PTR -288[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -288[rbp], xmm0
	mov	ecx, DWORD PTR -328[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -300[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	pix
	mov	QWORD PTR -176[rbp], rax
	mov	rax, QWORD PTR -176[rbp]
	movzx	eax, BYTE PTR 2[rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, QWORD PTR -200[rbp]
	movsd	xmm1, QWORD PTR -280[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -280[rbp], xmm0
	movsd	xmm0, QWORD PTR -272[rbp]
	addsd	xmm0, QWORD PTR -200[rbp]
	movsd	QWORD PTR -272[rbp], xmm0
.L20:
	mov	edx, DWORD PTR -320[rbp]
	mov	eax, DWORD PTR -312[rbp]
	add	eax, edx
	mov	DWORD PTR -300[rbp], eax
	mov	eax, DWORD PTR -300[rbp]
	cmp	eax, DWORD PTR -328[rbp]
	jge	.L21
	mov	ecx, DWORD PTR -328[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -300[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	pix
	mov	QWORD PTR -168[rbp], rax
	mov	rax, QWORD PTR -168[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, QWORD PTR -200[rbp]
	movsd	xmm1, QWORD PTR -296[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -296[rbp], xmm0
	mov	ecx, DWORD PTR -328[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -300[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	pix
	mov	QWORD PTR -160[rbp], rax
	mov	rax, QWORD PTR -160[rbp]
	movzx	eax, BYTE PTR 1[rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, QWORD PTR -200[rbp]
	movsd	xmm1, QWORD PTR -288[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -288[rbp], xmm0
	mov	ecx, DWORD PTR -328[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -300[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	pix
	mov	QWORD PTR -152[rbp], rax
	mov	rax, QWORD PTR -152[rbp]
	movzx	eax, BYTE PTR 2[rax]
	movzx	eax, al
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, QWORD PTR -200[rbp]
	movsd	xmm1, QWORD PTR -280[rbp]
	addsd	xmm0, xmm1
	movsd	QWORD PTR -280[rbp], xmm0
	movsd	xmm0, QWORD PTR -272[rbp]
	addsd	xmm0, QWORD PTR -200[rbp]
	movsd	QWORD PTR -272[rbp], xmm0
.L21:
	add	DWORD PTR -312[rbp], 1
.L19:
	mov	eax, DWORD PTR -348[rbp]
	cmp	eax, DWORD PTR -312[rbp]
	jge	.L22
	mov	ecx, DWORD PTR -324[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -320[rbp]
	mov	rax, QWORD PTR -336[rbp]
	mov	rdi, rax
	call	pix_trans
	mov	QWORD PTR -224[rbp], rax
	movsd	xmm0, QWORD PTR -296[rbp]
	divsd	xmm0, QWORD PTR -272[rbp]
	cvttsd2si	eax, xmm0
	mov	edx, eax
	mov	rax, QWORD PTR -224[rbp]
	mov	BYTE PTR [rax], dl
	mov	ecx, DWORD PTR -324[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -320[rbp]
	mov	rax, QWORD PTR -336[rbp]
	mov	rdi, rax
	call	pix_trans
	mov	QWORD PTR -216[rbp], rax
	movsd	xmm0, QWORD PTR -288[rbp]
	divsd	xmm0, QWORD PTR -272[rbp]
	cvttsd2si	eax, xmm0
	mov	edx, eax
	mov	rax, QWORD PTR -216[rbp]
	mov	BYTE PTR 1[rax], dl
	mov	ecx, DWORD PTR -324[rbp]
	mov	edx, DWORD PTR -316[rbp]
	mov	esi, DWORD PTR -320[rbp]
	mov	rax, QWORD PTR -336[rbp]
	mov	rdi, rax
	call	pix_trans
	mov	QWORD PTR -208[rbp], rax
	movsd	xmm0, QWORD PTR -280[rbp]
	divsd	xmm0, QWORD PTR -272[rbp]
	cvttsd2si	eax, xmm0
	mov	edx, eax
	mov	rax, QWORD PTR -208[rbp]
	mov	BYTE PTR 2[rax], dl
	add	DWORD PTR -320[rbp], 1
.L18:
	mov	eax, DWORD PTR -320[rbp]
	cmp	eax, DWORD PTR -304[rbp]
	jl	.L23
	add	DWORD PTR -316[rbp], 1
.L17:
	mov	eax, DWORD PTR -316[rbp]
	cmp	eax, DWORD PTR -324[rbp]
	jl	.L24
	lea	rax, -32[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	clock_gettime@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	sub	rax, rdx
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	sub	rax, rdx
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, rax
	movsd	xmm0, QWORD PTR .LC1[rip]
	mulsd	xmm0, xmm2
	addsd	xmm1, xmm0
	movq	rdx, xmm1
	mov	eax, DWORD PTR 24[rbp]
	movq	xmm0, rdx
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 1
	call	printf@PLT
	call	SynchronizationPoint
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	blurfilter, .-blurfilter
	.globl	blurfilterwrapper
	.type	blurfilterwrapper, @function
blurfilterwrapper:
.LFB3:
	.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]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	r8d, DWORD PTR 48[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, QWORD PTR 40[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	r9, QWORD PTR 32[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	r10d, DWORD PTR 24[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	push	r8
	push	rdi
	mov	r8d, r10d
	mov	edi, eax
	call	blurfilter
	add	rsp, 16
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	blurfilterwrapper, .-blurfilterwrapper
	.section	.rodata
	.align 8
.LC3:
	.string	"Usage: %s thread_count radius infile outfile\n"
.LC4:
	.string	"Too few threads\n"
	.align 8
.LC5:
	.string	"Radius (%d) must be greater than zero and less then %d\n"
	.align 8
.LC6:
	.string	"Too large maximum color-component value\n"
	.align 8
.LC7:
	.string	"Has read the image, generating coefficients"
.LC8:
	.string	"Calling filter"
.LC9:
	.string	"Creating threads"
.LC10:
	.string	"Dividing image"
.LC11:
	.string	"Setting arguments"
.LC12:
	.string	"Starting threads"
.LC13:
	.string	"Threads working on x-axis"
.LC14:
	.string	"Threads working on y-axis"
.LC15:
	.string	"Threads done"
.LC16:
	.string	"Filtering took: %g secs\n"
.LC17:
	.string	"Writing output file \"%s\"\n"
	.text
	.globl	blurmain
	.type	blurmain, @function
blurmain:
.LFB4:
	.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, 184
	.cfi_offset 3, -24
	mov	DWORD PTR -180[rbp], edi
	mov	QWORD PTR -192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	edi, 1000000
	call	allocate_image
	mov	QWORD PTR -136[rbp], rax
	mov	edi, 1000000
	call	allocate_image
	mov	QWORD PTR -128[rbp], rax
	mov	edi, 8000
	call	malloc@PLT
	mov	QWORD PTR -120[rbp], rax
	mov	rax, QWORD PTR -120[rbp]
	mov	QWORD PTR -112[rbp], rax
	cmp	DWORD PTR -180[rbp], 5
	je	.L30
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L42
.L30:
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -152[rbp], eax
	cmp	DWORD PTR -152[rbp], 0
	jg	.L32
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 16
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L42
.L32:
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -152[rbp], eax
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -148[rbp], eax
	cmp	DWORD PTR -148[rbp], 1000
	jle	.L33
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -148[rbp]
	mov	ecx, 1000
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L42
.L33:
	cmp	DWORD PTR -148[rbp], 0
	jg	.L34
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -148[rbp]
	mov	ecx, 1000
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L42
.L34:
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR -104[rbp], rax
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 32
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR -96[rbp], rax
	mov	rdi, QWORD PTR -136[rbp]
	lea	rcx, -160[rbp]
	lea	rdx, -164[rbp]
	lea	rsi, -168[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	r8, rdi
	mov	rdi, rax
	call	read_ppm
	mov	DWORD PTR -144[rbp], eax
	cmp	DWORD PTR -144[rbp], 0
	je	.L35
	mov	eax, 1
	jmp	.L42
.L35:
	mov	eax, DWORD PTR -160[rbp]
	cmp	eax, 255
	jle	.L36
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 40
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L42
.L36:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	rdx, QWORD PTR -112[rbp]
	mov	eax, DWORD PTR -148[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	get_gauss_weights
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rax, -64[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	clock_gettime@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -152[rbp]
	mov	edi, eax
	call	createThreadData
	mov	QWORD PTR -88[rbp], rax
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	r8d, DWORD PTR -164[rbp]
	mov	edi, DWORD PTR -168[rbp]
	mov	rcx, QWORD PTR -128[rbp]
	mov	rdx, QWORD PTR -136[rbp]
	mov	esi, DWORD PTR -152[rbp]
	mov	rax, QWORD PTR -88[rbp]
	mov	r9d, r8d
	mov	r8d, edi
	mov	rdi, rax
	call	divide
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -152[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -80[rbp], rax
	mov	rax, QWORD PTR -80[rbp]
	mov	QWORD PTR -72[rbp], rax
	mov	DWORD PTR -156[rbp], 0
	jmp	.L37
.L38:
	mov	eax, DWORD PTR -156[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -72[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -168[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -156[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -72[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -164[rbp]
	mov	DWORD PTR 4[rdx], eax
	mov	eax, DWORD PTR -156[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -72[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -136[rbp]
	mov	QWORD PTR 8[rdx], rax
	mov	eax, DWORD PTR -156[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -72[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -128[rbp]
	mov	QWORD PTR 16[rdx], rax
	mov	eax, DWORD PTR -156[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -72[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -148[rbp]
	mov	DWORD PTR 24[rdx], eax
	mov	eax, DWORD PTR -156[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -72[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -112[rbp]
	mov	QWORD PTR 32[rdx], rax
	mov	eax, DWORD PTR -156[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -72[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	mov	QWORD PTR 40[rdx], rax
	mov	eax, DWORD PTR -156[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -72[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -156[rbp]
	mov	DWORD PTR 48[rdx], eax
	add	DWORD PTR -156[rbp], 1
.L37:
	mov	eax, DWORD PTR -156[rbp]
	cmp	eax, DWORD PTR -152[rbp]
	jl	.L38
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -152[rbp]
	mov	edi, eax
	call	setThreadSyncCount
	mov	DWORD PTR -156[rbp], 0
	jmp	.L39
.L40:
	mov	eax, DWORD PTR -156[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rcx, rax
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -72[rbp]
	add	rdx, rcx
	mov	QWORD PTR 24[rax], rdx
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 24[rax]
	mov	edx, DWORD PTR -156[rbp]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 5
	mov	rdx, QWORD PTR -88[rbp]
	lea	rbx, [rcx+rdx]
	mov	rsi, rax
	lea	rdi, blurfilterwrapper[rip]
	call	createThread
	mov	QWORD PTR 8[rbx], rax
	add	DWORD PTR -156[rbp], 1
.L39:
	mov	eax, DWORD PTR -156[rbp]
	cmp	eax, DWORD PTR -152[rbp]
	jl	.L40
	lea	rdi, .LC13[rip]
	call	puts@PLT
	call	SynchronizationPoint
	lea	rdi, .LC14[rip]
	call	puts@PLT
	call	SynchronizationPoint
	lea	rdi, .LC15[rip]
	call	puts@PLT
	lea	rax, -48[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	clock_gettime@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -64[rbp]
	sub	rax, rdx
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	sub	rax, rdx
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, rax
	movsd	xmm0, QWORD PTR .LC1[rip]
	mulsd	xmm0, xmm2
	addsd	xmm1, xmm0
	movq	rax, xmm1
	movq	xmm0, rax
	lea	rdi, .LC16[rip]
	mov	eax, 1
	call	printf@PLT
	mov	rax, QWORD PTR -96[rbp]
	mov	rsi, rax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -164[rbp]
	mov	esi, DWORD PTR -168[rbp]
	mov	rcx, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	write_ppm
	mov	DWORD PTR -140[rbp], eax
	cmp	DWORD PTR -140[rbp], 0
	je	.L41
	mov	eax, 1
	jmp	.L42
.L41:
	mov	eax, 0
.L42:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L43
	call	__stack_chk_fail@PLT
.L43:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	blurmain, .-blurmain
	.globl	createThread
	.type	createThread, @function
createThread:
.LFB5:
	.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	edi, 8
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	createThread, .-createThread
	.globl	createThreadData
	.type	createThreadData, @function
createThreadData:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 5
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -20[rbp], 0
	jmp	.L47
.L48:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR 4[rdx], eax
	add	DWORD PTR -20[rbp], 1
.L47:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L48
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	createThreadData, .-createThreadData
	.section	.rodata
.LC18:
	.string	"Setting structs\n"
.LC19:
	.string	"Setting initial height\n"
.LC20:
	.string	"Setting corrected height\n"
.LC21:
	.string	"Setting pixel count & bytes\n"
	.align 8
.LC22:
	.string	"Setting ystart, sourcePixels and destinationPixels\n"
	.text
	.globl	divide
	.type	divide, @function
divide:
.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, 80
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -64[rbp], rcx
	mov	DWORD PTR -48[rbp], r8d
	mov	DWORD PTR -68[rbp], r9d
	mov	eax, DWORD PTR -68[rbp]
	cdq
	idiv	DWORD PTR -44[rbp]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -68[rbp]
	cdq
	idiv	DWORD PTR -44[rbp]
	mov	DWORD PTR -12[rbp], edx
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 16
	mov	esi, 1
	lea	rdi, .LC18[rip]
	call	fwrite@PLT
	mov	DWORD PTR -20[rbp], 0
	jmp	.L51
.L52:
	mov	edi, 40
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rdx], rax
	add	DWORD PTR -20[rbp], 1
.L51:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L52
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 23
	mov	esi, 1
	lea	rdi, .LC19[rip]
	call	fwrite@PLT
	mov	DWORD PTR -20[rbp], 0
	jmp	.L53
.L54:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR -48[rbp]
	mov	DWORD PTR 20[rax], edx
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR -16[rbp]
	mov	DWORD PTR 16[rax], edx
	add	DWORD PTR -20[rbp], 1
.L53:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L54
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC20[rip]
	call	fwrite@PLT
	mov	DWORD PTR -20[rbp], 0
	jmp	.L55
.L56:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR 16[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rcx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR 16[rax]
	add	edx, 1
	mov	DWORD PTR 16[rax], edx
	add	DWORD PTR -20[rbp], 1
.L55:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jl	.L56
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 28
	mov	esi, 1
	lea	rdi, .LC21[rip]
	call	fwrite@PLT
	mov	DWORD PTR -20[rbp], 0
	jmp	.L57
.L58:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	ecx, DWORD PTR 20[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR 16[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rsi, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rsi
	mov	rax, QWORD PTR 16[rax]
	imul	edx, ecx
	mov	DWORD PTR 32[rax], edx
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR 32[rax]
	cdqe
	mov	edx, eax
	mov	eax, edx
	add	eax, eax
	add	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rcx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR 16[rax]
	mov	DWORD PTR 36[rax], edx
	add	DWORD PTR -20[rbp], 1
.L57:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L58
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 51
	mov	esi, 1
	lea	rdi, .LC22[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	DWORD PTR 24[rax], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR 16[rdx]
	mov	DWORD PTR 28[rax], edx
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR -64[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	DWORD PTR -20[rbp], 1
	jmp	.L59
.L60:
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rcx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR 28[rdx]
	mov	DWORD PTR 24[rax], edx
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	ecx, DWORD PTR 24[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR 16[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rsi, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rsi
	mov	rax, QWORD PTR 16[rax]
	add	edx, ecx
	mov	DWORD PTR 28[rax], edx
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR 36[rax]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rsi, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rsi
	mov	rax, QWORD PTR 16[rax]
	add	rdx, rcx
	mov	QWORD PTR [rax], rdx
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	rcx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR 36[rax]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 5
	mov	rsi, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rsi
	mov	rax, QWORD PTR 16[rax]
	add	rdx, rcx
	mov	QWORD PTR 8[rax], rdx
	add	DWORD PTR -20[rbp], 1
.L59:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L60
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	divide, .-divide
	.globl	get_gauss_weights
	.type	get_gauss_weights, @function
get_gauss_weights:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -28[rbp], 0
	jmp	.L63
.L64:
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, DWORD PTR -28[rbp]
	movsd	xmm0, QWORD PTR .LC23[rip]
	mulsd	xmm0, xmm1
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, DWORD PTR -36[rbp]
	divsd	xmm0, xmm1
	movsd	QWORD PTR -24[rbp], xmm0
	movsd	xmm0, QWORD PTR -24[rbp]
	movq	xmm1, QWORD PTR .LC24[rip]
	xorpd	xmm0, xmm1
	movapd	xmm1, xmm0
	mulsd	xmm1, QWORD PTR -24[rbp]
	movsd	xmm0, QWORD PTR .LC25[rip]
	mulsd	xmm1, xmm0
	movq	rax, xmm1
	mov	edx, DWORD PTR -28[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -48[rbp]
	lea	rbx, [rcx+rdx]
	movq	xmm0, rax
	call	exp@PLT
	movq	rax, xmm0
	mov	QWORD PTR [rbx], rax
	add	DWORD PTR -28[rbp], 1
.L63:
	mov	eax, DWORD PTR -36[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jge	.L64
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	get_gauss_weights, .-get_gauss_weights
	.section	.rodata
.LC26:
	.string	"Threshold!"
.LC27:
	.string	"Blur!"
	.align 8
.LC28:
	.string	"Threshold usage: %s thread_count infile outfile\n"
	.align 8
.LC29:
	.string	"Blur usage: %s thread_count radius infile outfile\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
	cmp	DWORD PTR -20[rbp], 4
	jne	.L67
	lea	rdi, .LC26[rip]
	call	puts@PLT
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	thresmain
	mov	DWORD PTR -4[rbp], eax
	jmp	.L68
.L67:
	cmp	DWORD PTR -20[rbp], 5
	jne	.L69
	lea	rdi, .LC27[rip]
	call	puts@PLT
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	blurmain
	mov	DWORD PTR -4[rbp], eax
	jmp	.L68
.L69:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC29[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -4[rbp], 1
.L68:
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	exit@PLT
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.section	.rodata
.LC30:
	.string	"\n Terribly wrong: %d %d %d\n"
	.text
	.globl	pix
	.type	pix, @function
pix:
.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 -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	DWORD PTR -36[rbp], ecx
	mov	eax, DWORD PTR -36[rbp]
	imul	eax, DWORD PTR -32[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -28[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 999999
	jle	.L71
	mov	rax, QWORD PTR stderr[rip]
	mov	esi, DWORD PTR -36[rbp]
	mov	ecx, DWORD PTR -32[rbp]
	mov	edx, DWORD PTR -28[rbp]
	mov	r8d, esi
	lea	rsi, .LC30[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L71:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	pix, .-pix
	.globl	pix_trans
	.type	pix_trans, @function
pix_trans:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	DWORD PTR -36[rbp], ecx
	mov	eax, DWORD PTR -36[rbp]
	imul	eax, DWORD PTR -28[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 999999
	jle	.L74
	mov	rax, QWORD PTR stderr[rip]
	mov	esi, DWORD PTR -36[rbp]
	mov	ecx, DWORD PTR -32[rbp]
	mov	edx, DWORD PTR -28[rbp]
	mov	r8d, esi
	lea	rsi, .LC30[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L74:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	pix_trans, .-pix_trans
	.section	.rodata
.LC31:
	.string	"%s\n"
	.text
	.globl	ppm_error
	.type	ppm_error, @function
ppm_error:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC31[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	call	getchar@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE12:
	.size	ppm_error, .-ppm_error
	.section	.rodata
.LC32:
	.string	"read error"
	.text
	.globl	ppm_readchar
	.type	ppm_readchar, @function
ppm_readchar:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	_IO_getc@PLT
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	mov	BYTE PTR -9[rbp], al
	cmp	BYTE PTR -9[rbp], -1
	jne	.L78
	lea	rdi, .LC32[rip]
	call	ppm_error
.L78:
	cmp	BYTE PTR -9[rbp], 35
	jne	.L84
.L82:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	_IO_getc@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	BYTE PTR -9[rbp], al
	cmp	BYTE PTR -9[rbp], -1
	jne	.L80
	lea	rdi, .LC32[rip]
	call	ppm_error
.L80:
	cmp	BYTE PTR -9[rbp], 10
	je	.L85
	jmp	.L82
.L84:
	nop
	jmp	.L79
.L85:
	nop
.L79:
	movzx	eax, BYTE PTR -9[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	ppm_readchar, .-ppm_readchar
	.section	.rodata
.LC33:
	.string	"error in readint"
	.text
	.globl	ppm_readint
	.type	ppm_readint, @function
ppm_readint:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
.L89:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	ppm_readchar
	mov	BYTE PTR -5[rbp], al
	cmp	BYTE PTR -5[rbp], 32
	je	.L89
	cmp	BYTE PTR -5[rbp], 9
	je	.L89
	cmp	BYTE PTR -5[rbp], 10
	jne	.L98
	jmp	.L89
.L98:
	nop
.L88:
	cmp	BYTE PTR -5[rbp], 47
	jg	.L90
	lea	rdi, .LC33[rip]
	call	ppm_error
	jmp	.L91
.L90:
	cmp	BYTE PTR -5[rbp], 57
	jle	.L91
	lea	rdi, .LC33[rip]
	call	ppm_error
.L91:
	mov	DWORD PTR -4[rbp], 0
.L95:
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	mov	edx, eax
	movsx	eax, BYTE PTR -5[rbp]
	sub	eax, 48
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	ppm_readchar
	mov	BYTE PTR -5[rbp], al
	cmp	BYTE PTR -5[rbp], 47
	jle	.L99
	cmp	BYTE PTR -5[rbp], 57
	jg	.L100
	jmp	.L95
.L99:
	nop
	jmp	.L94
.L100:
	nop
.L94:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	ppm_readint, .-ppm_readint
	.globl	ppm_readmagicnumber
	.type	ppm_readmagicnumber, @function
ppm_readmagicnumber:
.LFB15:
	.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]
	mov	rdi, rax
	call	_IO_getc@PLT
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -8[rbp], -1
	jne	.L102
	lea	rdi, .LC32[rip]
	call	ppm_error
.L102:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	_IO_getc@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L103
	lea	rdi, .LC32[rip]
	call	ppm_error
.L103:
	mov	eax, DWORD PTR -8[rbp]
	sal	eax, 8
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	ppm_readmagicnumber, .-ppm_readmagicnumber
	.section	.rodata
.LC34:
	.string	""
.LC35:
	.string	"r"
	.align 8
.LC36:
	.string	"read_ppm failed to open %s: %s\n"
.LC37:
	.string	"%s"
.LC38:
	.string	"%d%d"
.LC39:
	.string	"%d\n"
.LC40:
	.string	"Image size is too big\n"
.LC41:
	.string	"Read failed"
.LC42:
	.string	"Wrong file format: %s\n"
.LC43:
	.string	"Close failed"
	.text
	.globl	read_ppm
	.type	read_ppm, @function
read_ppm:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 304
	mov	QWORD PTR -264[rbp], rdi
	mov	QWORD PTR -272[rbp], rsi
	mov	QWORD PTR -280[rbp], rdx
	mov	QWORD PTR -288[rbp], rcx
	mov	QWORD PTR -296[rbp], r8
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	BYTE PTR -144[rbp], 80
	mov	BYTE PTR -143[rbp], 54
	mov	BYTE PTR -142[rbp], 0
	mov	DWORD PTR -256[rbp], 3
	jmp	.L106
.L107:
	mov	eax, DWORD PTR -256[rbp]
	mov	BYTE PTR -144[rbp+rax], 0
	add	DWORD PTR -256[rbp], 1
.L106:
	cmp	DWORD PTR -256[rbp], 39
	jbe	.L107
	mov	DWORD PTR -252[rbp], 0
	mov	rax, QWORD PTR -264[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR -232[rbp], rax
	cmp	QWORD PTR -232[rbp], 0
	jne	.L108
	lea	rax, .LC34[rip]
	mov	QWORD PTR -232[rbp], rax
.L108:
	mov	rax, QWORD PTR -232[rbp]
	lea	rsi, .LC35[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -224[rbp], rax
	cmp	QWORD PTR -224[rbp], 0
	jne	.L109
	mov	eax, DWORD PTR -252[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	QWORD PTR -200[rbp], rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -200[rbp]
	mov	rdx, QWORD PTR -232[rbp]
	lea	rsi, .LC36[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	call	getchar@PLT
	mov	edi, 1
	call	exit@PLT
.L109:
	mov	rdx, QWORD PTR -224[rbp]
	lea	rax, -96[rbp]
	mov	esi, 80
	mov	rdi, rax
	call	fgets@PLT
	lea	rdx, -192[rbp]
	lea	rax, -96[rbp]
	lea	rsi, .LC37[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sscanf@PLT
.L113:
	mov	rdx, QWORD PTR -224[rbp]
	lea	rax, -96[rbp]
	mov	esi, 80
	mov	rdi, rax
	call	fgets@PLT
	mov	QWORD PTR -216[rbp], rax
	cmp	QWORD PTR -216[rbp], 0
	je	.L121
	movzx	eax, BYTE PTR -96[rbp]
	cmp	al, 35
	jne	.L122
	jmp	.L113
.L121:
	nop
	jmp	.L112
.L122:
	nop
.L112:
	mov	rcx, QWORD PTR -280[rbp]
	mov	rdx, QWORD PTR -272[rbp]
	lea	rax, -96[rbp]
	lea	rsi, .LC38[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sscanf@PLT
	mov	rdx, QWORD PTR -288[rbp]
	mov	rax, QWORD PTR -224[rbp]
	lea	rsi, .LC39[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fscanf@PLT
	mov	rax, QWORD PTR -272[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -280[rbp]
	mov	eax, DWORD PTR [rax]
	imul	eax, edx
	cmp	eax, 1000000
	jle	.L114
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 22
	mov	esi, 1
	lea	rdi, .LC40[rip]
	call	fwrite@PLT
	mov	eax, 4
	jmp	.L119
.L114:
	lea	rcx, -144[rbp]
	lea	rax, -192[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	rdi, rax
	call	strncmp@PLT
	mov	DWORD PTR -248[rbp], eax
	cmp	DWORD PTR -248[rbp], 0
	jne	.L116
	mov	rax, QWORD PTR -272[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -280[rbp]
	mov	eax, DWORD PTR [rax]
	imul	edx, eax
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	mov	DWORD PTR -244[rbp], eax
	mov	eax, DWORD PTR -244[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -224[rbp]
	mov	rax, QWORD PTR -296[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -208[rbp], rax
	mov	rax, QWORD PTR -208[rbp]
	mov	DWORD PTR -240[rbp], eax
	mov	eax, DWORD PTR -240[rbp]
	cmp	eax, DWORD PTR -244[rbp]
	je	.L117
	lea	rdi, .LC41[rip]
	call	perror@PLT
	mov	eax, 2
	jmp	.L119
.L116:
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -192[rbp]
	lea	rsi, .LC42[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L117:
	mov	rax, QWORD PTR -224[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	DWORD PTR -236[rbp], eax
	cmp	DWORD PTR -236[rbp], -1
	jne	.L118
	lea	rdi, .LC43[rip]
	call	perror@PLT
	mov	eax, 3
	jmp	.L119
.L118:
	mov	eax, 0
.L119:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L120
	call	__stack_chk_fail@PLT
.L120:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	read_ppm, .-read_ppm
	.globl	setThreadSyncCount
	.type	setThreadSyncCount, @function
setThreadSyncCount:
.LFB17:
	.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 -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	DWORD PTR sync_max_count[rip], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	setThreadSyncCount, .-setThreadSyncCount
	.section	.rodata
.LC44:
	.string	"Hello from thread %d\n"
	.text
	.globl	thresfilter
	.type	thresfilter, @function
thresfilter:
.LFB18:
	.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	DWORD PTR -116[rbp], edi
	mov	DWORD PTR -120[rbp], esi
	mov	QWORD PTR -128[rbp], rdx
	mov	QWORD PTR -136[rbp], rcx
	mov	QWORD PTR -144[rbp], r8
	mov	QWORD PTR -152[rbp], r9
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR 16[rbp]
	lea	rsi, .LC44[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR 16[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -152[rbp]
	add	rax, rdx
	mov	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 24[rax]
	mov	DWORD PTR -92[rbp], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 28[rax]
	mov	DWORD PTR -88[rbp], eax
	lea	rax, -48[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	clock_gettime@PLT
	mov	eax, DWORD PTR -116[rbp]
	imul	eax, DWORD PTR -120[rbp]
	mov	DWORD PTR -84[rbp], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 32[rax]
	mov	DWORD PTR -80[rbp], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR 20[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 24[rax]
	imul	eax, edx
	mov	DWORD PTR -76[rbp], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR 20[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 24[rax]
	imul	eax, edx
	mov	edx, eax
	mov	eax, DWORD PTR -80[rbp]
	add	eax, edx
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -76[rbp]
	mov	DWORD PTR -96[rbp], eax
	mov	DWORD PTR -100[rbp], 0
	jmp	.L126
.L127:
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -128[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	eax, DWORD PTR -100[rbp]
	lea	ecx, [rdx+rax]
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -128[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR 1[rax]
	movzx	eax, al
	add	ecx, eax
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -128[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR 2[rax]
	movzx	eax, al
	add	eax, ecx
	mov	DWORD PTR -100[rbp], eax
	add	DWORD PTR -96[rbp], 1
.L126:
	mov	eax, DWORD PTR -96[rbp]
	cmp	eax, DWORD PTR -72[rbp]
	jb	.L127
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR -136[rbp]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -100[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -136[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	call	SynchronizationPoint
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edx, 0
	div	DWORD PTR -84[rbp]
	mov	DWORD PTR -100[rbp], eax
	mov	eax, DWORD PTR -76[rbp]
	mov	DWORD PTR -96[rbp], eax
	jmp	.L128
.L131:
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -128[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	ecx, al
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -128[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR 1[rax]
	movzx	eax, al
	add	ecx, eax
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -128[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR 2[rax]
	movzx	eax, al
	add	eax, ecx
	mov	DWORD PTR -68[rbp], eax
	mov	eax, DWORD PTR -68[rbp]
	cmp	eax, DWORD PTR -100[rbp]
	jnb	.L129
	mov	BYTE PTR -102[rbp], 0
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -128[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -102[rbp]
	mov	BYTE PTR 2[rdx], al
	movzx	eax, BYTE PTR -102[rbp]
	mov	BYTE PTR -101[rbp], al
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -128[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -101[rbp]
	mov	BYTE PTR 1[rdx], al
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -128[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -101[rbp]
	mov	BYTE PTR [rdx], al
	jmp	.L130
.L129:
	mov	BYTE PTR -104[rbp], -1
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -128[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -104[rbp]
	mov	BYTE PTR 2[rdx], al
	movzx	eax, BYTE PTR -104[rbp]
	mov	BYTE PTR -103[rbp], al
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -128[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -103[rbp]
	mov	BYTE PTR 1[rdx], al
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rdx, rax
	mov	rax, QWORD PTR -128[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -103[rbp]
	mov	BYTE PTR [rdx], al
.L130:
	add	DWORD PTR -96[rbp], 1
.L128:
	mov	eax, DWORD PTR -96[rbp]
	cmp	eax, DWORD PTR -72[rbp]
	jb	.L131
	lea	rax, -32[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	clock_gettime@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	sub	rax, rdx
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	sub	rax, rdx
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, rax
	movsd	xmm0, QWORD PTR .LC1[rip]
	mulsd	xmm0, xmm2
	addsd	xmm1, xmm0
	movq	rax, xmm1
	movq	xmm0, rax
	mov	esi, DWORD PTR 16[rbp]
	lea	rdi, .LC2[rip]
	mov	eax, 1
	call	printf@PLT
	call	SynchronizationPoint
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L133
	call	__stack_chk_fail@PLT
.L133:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	thresfilter, .-thresfilter
	.globl	thresfilterwrapper
	.type	thresfilterwrapper, @function
thresfilterwrapper:
.LFB19:
	.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]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edi, DWORD PTR 40[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	r9, QWORD PTR 32[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	r8, QWORD PTR 48[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR 24[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	sub	rsp, 8
	push	rdi
	mov	edi, eax
	call	thresfilter
	add	rsp, 16
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	thresfilterwrapper, .-thresfilterwrapper
	.section	.rodata
	.align 8
.LC45:
	.string	"Usage: %s thread_count infile outfile\n"
	.align 8
.LC46:
	.string	"Threads working on average value"
.LC47:
	.string	"Average value is %d\n"
.LC48:
	.string	"Threads working on threshold"
.LC49:
	.string	"Writing output file"
	.text
	.globl	thresmain
	.type	thresmain, @function
thresmain:
.LFB20:
	.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, 200
	.cfi_offset 3, -24
	mov	DWORD PTR -196[rbp], edi
	mov	QWORD PTR -208[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -64[rbp], 0
	mov	DWORD PTR -60[rbp], 0
	mov	DWORD PTR -56[rbp], 0
	mov	DWORD PTR -52[rbp], 0
	mov	DWORD PTR -48[rbp], 0
	mov	DWORD PTR -44[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	DWORD PTR -172[rbp], 0
	mov	edi, 1000000
	call	allocate_image
	mov	QWORD PTR -152[rbp], rax
	mov	edi, 1000000
	call	allocate_image
	mov	QWORD PTR -144[rbp], rax
	cmp	DWORD PTR -196[rbp], 4
	je	.L137
	mov	rax, QWORD PTR -208[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC45[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L147
.L137:
	mov	rax, QWORD PTR -208[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -164[rbp], eax
	cmp	DWORD PTR -164[rbp], 0
	jg	.L139
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 16
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L147
.L139:
	mov	rax, QWORD PTR -208[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR -136[rbp], rax
	mov	rax, QWORD PTR -208[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR -128[rbp], rax
	mov	rdi, QWORD PTR -152[rbp]
	lea	rcx, -176[rbp]
	lea	rdx, -180[rbp]
	lea	rsi, -184[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	r8, rdi
	mov	rdi, rax
	call	read_ppm
	mov	DWORD PTR -160[rbp], eax
	cmp	DWORD PTR -160[rbp], 0
	je	.L140
	mov	eax, 1
	jmp	.L147
.L140:
	mov	eax, DWORD PTR -176[rbp]
	cmp	eax, 255
	jle	.L141
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 40
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L147
.L141:
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -164[rbp]
	mov	edi, eax
	call	createThreadData
	mov	QWORD PTR -120[rbp], rax
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	r8d, DWORD PTR -180[rbp]
	mov	edi, DWORD PTR -184[rbp]
	mov	rcx, QWORD PTR -144[rbp]
	mov	rdx, QWORD PTR -152[rbp]
	mov	esi, DWORD PTR -164[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	r9d, r8d
	mov	r8d, edi
	mov	rdi, rax
	call	divide
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -164[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -112[rbp], rax
	mov	rax, QWORD PTR -112[rbp]
	mov	QWORD PTR -104[rbp], rax
	mov	DWORD PTR -168[rbp], 0
	jmp	.L142
.L143:
	mov	eax, DWORD PTR -168[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -184[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -168[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -180[rbp]
	mov	DWORD PTR 4[rdx], eax
	mov	eax, DWORD PTR -168[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -152[rbp]
	mov	QWORD PTR 8[rdx], rax
	mov	eax, DWORD PTR -168[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -144[rbp]
	mov	QWORD PTR 16[rdx], rax
	mov	eax, DWORD PTR -168[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rdx, rax
	lea	rax, -172[rbp]
	mov	QWORD PTR 24[rdx], rax
	mov	eax, DWORD PTR -168[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -120[rbp]
	mov	QWORD PTR 32[rdx], rax
	mov	eax, DWORD PTR -168[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -168[rbp]
	mov	DWORD PTR 40[rdx], eax
	mov	eax, DWORD PTR -168[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -104[rbp]
	add	rdx, rax
	lea	rax, -64[rbp]
	mov	QWORD PTR 48[rdx], rax
	add	DWORD PTR -168[rbp], 1
.L142:
	mov	eax, DWORD PTR -168[rbp]
	cmp	eax, DWORD PTR -164[rbp]
	jl	.L143
	lea	rax, -96[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	clock_gettime@PLT
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -164[rbp]
	mov	edi, eax
	call	setThreadSyncCount
	mov	DWORD PTR -168[rbp], 0
	jmp	.L144
.L145:
	mov	eax, DWORD PTR -168[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 3
	mov	rcx, rax
	mov	eax, DWORD PTR -168[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR -104[rbp]
	add	rdx, rcx
	mov	QWORD PTR 24[rax], rdx
	mov	eax, DWORD PTR -168[rbp]
	cdqe
	sal	rax, 5
	mov	rdx, rax
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR 24[rax]
	mov	edx, DWORD PTR -168[rbp]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 5
	mov	rdx, QWORD PTR -120[rbp]
	lea	rbx, [rcx+rdx]
	mov	rsi, rax
	lea	rdi, thresfilterwrapper[rip]
	call	createThread
	mov	QWORD PTR 8[rbx], rax
	add	DWORD PTR -168[rbp], 1
.L144:
	mov	eax, DWORD PTR -168[rbp]
	cmp	eax, DWORD PTR -164[rbp]
	jl	.L145
	lea	rdi, .LC46[rip]
	call	puts@PLT
	call	SynchronizationPoint
	mov	eax, DWORD PTR -172[rbp]
	mov	ecx, DWORD PTR -184[rbp]
	mov	edx, DWORD PTR -180[rbp]
	imul	edx, ecx
	mov	ebx, edx
	mov	edx, 0
	div	ebx
	mov	esi, eax
	lea	rdi, .LC47[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC48[rip]
	call	puts@PLT
	call	SynchronizationPoint
	lea	rdi, .LC15[rip]
	call	puts@PLT
	lea	rax, -80[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	clock_gettime@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rdx, QWORD PTR -96[rbp]
	sub	rax, rdx
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR -88[rbp]
	sub	rax, rdx
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, rax
	movsd	xmm0, QWORD PTR .LC1[rip]
	mulsd	xmm0, xmm2
	addsd	xmm1, xmm0
	movq	rax, xmm1
	movq	xmm0, rax
	lea	rdi, .LC16[rip]
	mov	eax, 1
	call	printf@PLT
	lea	rdi, .LC49[rip]
	call	puts@PLT
	mov	edx, DWORD PTR -180[rbp]
	mov	esi, DWORD PTR -184[rbp]
	mov	rcx, QWORD PTR -152[rbp]
	mov	rax, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	write_ppm
	mov	DWORD PTR -156[rbp], eax
	cmp	DWORD PTR -156[rbp], 0
	je	.L146
	mov	eax, 1
	jmp	.L147
.L146:
	mov	eax, 0
.L147:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L148
	call	__stack_chk_fail@PLT
.L148:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	thresmain, .-thresmain
	.section	.rodata
.LC50:
	.string	"write_ppm filename is null.\n"
.LC51:
	.string	"w"
	.align 8
.LC52:
	.string	"write_ppm failed to open %s: %s\n"
.LC53:
	.string	"P6\n"
.LC54:
	.string	"%d %d 255\n"
.LC55:
	.string	"Write failed"
	.text
	.globl	write_ppm
	.type	write_ppm, @function
write_ppm:
.LFB21:
	.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	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	DWORD PTR -64[rbp], edx
	mov	QWORD PTR -72[rbp], rcx
	mov	DWORD PTR -48[rbp], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L150
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 28
	mov	esi, 1
	lea	rdi, .LC50[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L150:
	mov	rax, QWORD PTR -32[rbp]
	lea	rsi, .LC51[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L151
	mov	eax, DWORD PTR -48[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	lea	rsi, .LC52[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	call	getchar@PLT
	mov	edi, 1
	call	exit@PLT
.L151:
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 3
	mov	esi, 1
	lea	rdi, .LC53[rip]
	call	fwrite@PLT
	mov	ecx, DWORD PTR -64[rbp]
	mov	edx, DWORD PTR -60[rbp]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC54[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR -60[rbp]
	imul	eax, DWORD PTR -64[rbp]
	mov	edx, eax
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR -40[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	je	.L152
	lea	rdi, .LC55[rip]
	call	perror@PLT
	mov	eax, 2
	jmp	.L153
.L152:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], -1
	jne	.L154
	lea	rdi, .LC43[rip]
	call	perror@PLT
	mov	eax, 3
	jmp	.L153
.L154:
	mov	eax, 0
.L153:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	write_ppm, .-write_ppm
	.section	.rodata
	.align 8
.LC1:
	.long	-400107883
	.long	1041313291
	.align 8
.LC23:
	.long	343597384
	.long	1073039278
	.align 16
.LC24:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.align 8
.LC25:
	.long	-266631570
	.long	1074340345
	.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	"130122.c"
	.text
	.comm	stderr,4,4
	.global	sync_cond
	.bss
	.align	3
	.type	sync_cond, %object
	.size	sync_cond, 48
sync_cond:
	.space	48
	.global	sync_count
	.align	2
	.type	sync_count, %object
	.size	sync_count, 4
sync_count:
	.space	4
	.global	sync_lock
	.align	2
	.type	sync_lock, %object
	.size	sync_lock, 40
sync_lock:
	.space	40
	.global	sync_max_count
	.align	2
	.type	sync_max_count, %object
	.size	sync_max_count, 4
sync_max_count:
	.space	4
	.text
	.align	2
	.global	SynchronizationPoint
	.syntax unified
	.arm
	.fpu softvfp
	.type	SynchronizationPoint, %function
SynchronizationPoint:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L5
	bl	pthread_mutex_lock
	ldr	r3, .L5+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L5+4
	str	r3, [r2]
	ldr	r3, .L5+4
	ldr	r2, [r3]
	ldr	r3, .L5+8
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L2
	ldr	r1, .L5
	ldr	r0, .L5+12
	bl	pthread_cond_wait
	b	.L3
.L2:
	ldr	r3, .L5+4
	mov	r2, #0
	str	r2, [r3]
	ldr	r0, .L5+12
	bl	pthread_cond_broadcast
.L3:
	ldr	r0, .L5
	bl	pthread_mutex_unlock
	nop
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	sync_lock
	.word	sync_count
	.word	sync_max_count
	.word	sync_cond
	.size	SynchronizationPoint, .-SynchronizationPoint
	.section	.rodata
	.align	2
.LC0:
	.ascii	"malloc failed\000"
	.text
	.align	2
	.global	allocate_image
	.syntax unified
	.arm
	.fpu softvfp
	.type	allocate_image, %function
allocate_image:
	@ 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	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L8
	ldr	r3, .L10
	ldr	r3, [r3]
	mov	r2, #13
	mov	r1, #1
	ldr	r0, .L10+4
	bl	fwrite
	bl	getchar
	mov	r0, #1
	bl	exit
.L8:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	stderr
	.word	.LC0
	.size	allocate_image, .-allocate_image
	.global	__aeabi_ui2d
	.global	__aeabi_dmul
	.global	__aeabi_dadd
	.global	__aeabi_ddiv
	.global	__aeabi_d2uiz
	.global	__aeabi_i2d
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Filtering %d took %g secs\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	blurfilter
	.syntax unified
	.arm
	.fpu softvfp
	.type	blurfilter, %function
blurfilter:
	@ args = 16, pretend = 0, frame = 216
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #216
	str	r0, [fp, #-208]
	str	r1, [fp, #-212]
	str	r2, [fp, #-216]
	str	r3, [fp, #-220]
	ldr	r3, [fp, #8]
	str	r3, [fp, #-224]
	ldr	r3, [fp, #12]
	str	r3, [fp, #-228]
	ldr	r3, .L31
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r2, [fp, #16]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-228]
	add	r3, r3, r2
	str	r3, [fp, #-192]
	ldr	r3, [fp, #-192]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-188]
	ldr	r3, [fp, #-188]
	ldr	r3, [r3, #16]
	str	r3, [fp, #-184]
	ldr	r3, [fp, #-188]
	ldr	r3, [r3, #20]
	str	r3, [fp, #-180]
	sub	r3, fp, #32
	mov	r1, r3
	mov	r0, #0
	bl	clock_gettime
	ldr	r3, [fp, #-184]
	str	r3, [fp, #-200]
	b	.L13
.L20:
	mov	r3, #0
	str	r3, [fp, #-204]
	b	.L14
.L19:
	ldr	r3, [fp, #-208]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-204]
	ldr	r0, [fp, #-216]
	bl	pix
	str	r0, [fp, #-124]
	ldr	r3, [fp, #-224]
	ldmia	r3, {r4-r5}
	ldr	r3, [fp, #-124]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-76]
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-208]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-204]
	ldr	r0, [fp, #-216]
	bl	pix
	str	r0, [fp, #-120]
	ldr	r3, [fp, #-224]
	ldmia	r3, {r4-r5}
	ldr	r3, [fp, #-120]
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-68]
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-208]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-204]
	ldr	r0, [fp, #-216]
	bl	pix
	str	r0, [fp, #-116]
	ldr	r3, [fp, #-224]
	ldmia	r3, {r4-r5}
	ldr	r3, [fp, #-116]
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-60]
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-224]
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	mov	r3, #1
	str	r3, [fp, #-196]
	b	.L15
.L18:
	ldr	r3, [fp, #-196]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-224]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-44]
	str	r3, [fp, #-40]
	ldr	r2, [fp, #-204]
	ldr	r3, [fp, #-196]
	sub	r3, r2, r3
	str	r3, [fp, #-152]
	ldr	r3, [fp, #-152]
	cmp	r3, #0
	blt	.L16
	ldr	r3, [fp, #-208]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-152]
	ldr	r0, [fp, #-216]
	bl	pix
	str	r0, [fp, #-100]
	ldr	r3, [fp, #-100]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #76
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-76]
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-208]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-152]
	ldr	r0, [fp, #-216]
	bl	pix
	str	r0, [fp, #-96]
	ldr	r3, [fp, #-96]
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #68
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-68]
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-208]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-152]
	ldr	r0, [fp, #-216]
	bl	pix
	str	r0, [fp, #-92]
	ldr	r3, [fp, #-92]
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #60
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-60]
	str	r3, [fp, #-56]
	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]
.L16:
	ldr	r2, [fp, #-204]
	ldr	r3, [fp, #-196]
	add	r3, r2, r3
	str	r3, [fp, #-152]
	ldr	r2, [fp, #-152]
	ldr	r3, [fp, #-208]
	cmp	r2, r3
	bge	.L17
	ldr	r3, [fp, #-208]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-152]
	ldr	r0, [fp, #-216]
	bl	pix
	str	r0, [fp, #-88]
	ldr	r3, [fp, #-88]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #76
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-76]
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-208]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-152]
	ldr	r0, [fp, #-216]
	bl	pix
	str	r0, [fp, #-84]
	ldr	r3, [fp, #-84]
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #68
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-68]
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-208]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-152]
	ldr	r0, [fp, #-216]
	bl	pix
	str	r0, [fp, #-80]
	ldr	r3, [fp, #-80]
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #60
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-60]
	str	r3, [fp, #-56]
	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]
.L17:
	ldr	r3, [fp, #-196]
	add	r3, r3, #1
	str	r3, [fp, #-196]
.L15:
	ldr	r2, [fp, #4]
	ldr	r3, [fp, #-196]
	cmp	r2, r3
	bge	.L18
	ldr	r3, [fp, #-212]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-204]
	ldr	r0, [fp, #-220]
	bl	pix_trans
	str	r0, [fp, #-112]
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	sub	r1, fp, #76
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2uiz
	mov	r3, r0
	and	r2, r3, #255
	ldr	r3, [fp, #-112]
	strb	r2, [r3]
	ldr	r3, [fp, #-212]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-204]
	ldr	r0, [fp, #-220]
	bl	pix_trans
	str	r0, [fp, #-108]
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	sub	r1, fp, #68
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2uiz
	mov	r3, r0
	and	r2, r3, #255
	ldr	r3, [fp, #-108]
	strb	r2, [r3, #1]
	ldr	r3, [fp, #-212]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-204]
	ldr	r0, [fp, #-220]
	bl	pix_trans
	str	r0, [fp, #-104]
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	sub	r1, fp, #60
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2uiz
	mov	r3, r0
	and	r2, r3, #255
	ldr	r3, [fp, #-104]
	strb	r2, [r3, #2]
	ldr	r3, [fp, #-204]
	add	r3, r3, #1
	str	r3, [fp, #-204]
.L14:
	ldr	r2, [fp, #-204]
	ldr	r3, [fp, #-208]
	cmp	r2, r3
	blt	.L19
	ldr	r3, [fp, #-200]
	add	r3, r3, #1
	str	r3, [fp, #-200]
.L13:
	ldr	r2, [fp, #-200]
	ldr	r3, [fp, #-180]
	cmp	r2, r3
	blt	.L20
	bl	SynchronizationPoint
	mov	r3, #0
	str	r3, [fp, #-200]
	b	.L21
.L28:
	ldr	r3, [fp, #-184]
	str	r3, [fp, #-204]
	b	.L22
.L27:
	ldr	r3, [fp, #-212]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-204]
	ldr	r0, [fp, #-220]
	bl	pix
	str	r0, [fp, #-176]
	ldr	r3, [fp, #-224]
	ldmia	r3, {r4-r5}
	ldr	r3, [fp, #-176]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-76]
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-212]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-204]
	ldr	r0, [fp, #-220]
	bl	pix
	str	r0, [fp, #-172]
	ldr	r3, [fp, #-224]
	ldmia	r3, {r4-r5}
	ldr	r3, [fp, #-172]
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-68]
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-212]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-204]
	ldr	r0, [fp, #-220]
	bl	pix
	str	r0, [fp, #-168]
	ldr	r3, [fp, #-224]
	ldmia	r3, {r4-r5}
	ldr	r3, [fp, #-168]
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-60]
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-224]
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	mov	r3, #1
	str	r3, [fp, #-196]
	b	.L23
.L26:
	ldr	r3, [fp, #-196]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-224]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-44]
	str	r3, [fp, #-40]
	ldr	r2, [fp, #-204]
	ldr	r3, [fp, #-196]
	sub	r3, r2, r3
	str	r3, [fp, #-152]
	ldr	r3, [fp, #-152]
	cmp	r3, #0
	blt	.L24
	ldr	r3, [fp, #-212]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-152]
	ldr	r0, [fp, #-220]
	bl	pix
	str	r0, [fp, #-148]
	ldr	r3, [fp, #-148]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #76
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-76]
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-212]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-152]
	ldr	r0, [fp, #-220]
	bl	pix
	str	r0, [fp, #-144]
	ldr	r3, [fp, #-144]
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #68
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-68]
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-212]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-152]
	ldr	r0, [fp, #-220]
	bl	pix
	str	r0, [fp, #-140]
	ldr	r3, [fp, #-140]
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #60
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-60]
	str	r3, [fp, #-56]
	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]
.L24:
	ldr	r2, [fp, #-204]
	ldr	r3, [fp, #-196]
	add	r3, r2, r3
	str	r3, [fp, #-152]
	ldr	r2, [fp, #-152]
	ldr	r3, [fp, #-212]
	cmp	r2, r3
	bge	.L25
	ldr	r3, [fp, #-212]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-152]
	ldr	r0, [fp, #-220]
	bl	pix
	str	r0, [fp, #-136]
	ldr	r3, [fp, #-136]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #76
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-76]
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-212]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-152]
	ldr	r0, [fp, #-220]
	bl	pix
	str	r0, [fp, #-132]
	ldr	r3, [fp, #-132]
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #68
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-68]
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-212]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-152]
	ldr	r0, [fp, #-220]
	bl	pix
	str	r0, [fp, #-128]
	ldr	r3, [fp, #-128]
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	mov	r0, r3
	bl	__aeabi_ui2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	sub	r1, fp, #60
	ldmia	r1, {r0-r1}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-60]
	str	r3, [fp, #-56]
	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]
.L25:
	ldr	r3, [fp, #-196]
	add	r3, r3, #1
	str	r3, [fp, #-196]
.L23:
	ldr	r2, [fp, #4]
	ldr	r3, [fp, #-196]
	cmp	r2, r3
	bge	.L26
	ldr	r3, [fp, #-208]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-204]
	ldr	r0, [fp, #-216]
	bl	pix_trans
	str	r0, [fp, #-164]
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	sub	r1, fp, #76
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2uiz
	mov	r3, r0
	and	r2, r3, #255
	ldr	r3, [fp, #-164]
	strb	r2, [r3]
	ldr	r3, [fp, #-208]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-204]
	ldr	r0, [fp, #-216]
	bl	pix_trans
	str	r0, [fp, #-160]
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	sub	r1, fp, #68
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2uiz
	mov	r3, r0
	and	r2, r3, #255
	ldr	r3, [fp, #-160]
	strb	r2, [r3, #1]
	ldr	r3, [fp, #-208]
	ldr	r2, [fp, #-200]
	ldr	r1, [fp, #-204]
	ldr	r0, [fp, #-216]
	bl	pix_trans
	str	r0, [fp, #-156]
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	sub	r1, fp, #60
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2uiz
	mov	r3, r0
	and	r2, r3, #255
	ldr	r3, [fp, #-156]
	strb	r2, [r3, #2]
	ldr	r3, [fp, #-204]
	add	r3, r3, #1
	str	r3, [fp, #-204]
.L22:
	ldr	r2, [fp, #-204]
	ldr	r3, [fp, #-180]
	cmp	r2, r3
	blt	.L27
	ldr	r3, [fp, #-200]
	add	r3, r3, #1
	str	r3, [fp, #-200]
.L21:
	ldr	r2, [fp, #-200]
	ldr	r3, [fp, #-208]
	cmp	r2, r3
	blt	.L28
	sub	r3, fp, #24
	mov	r1, r3
	mov	r0, #0
	bl	clock_gettime
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-32]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	ldr	r2, .L31+4
	ldr	r3, .L31+8
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #16]
	ldr	r0, .L31+12
	bl	printf
	bl	SynchronizationPoint
	nop
	ldr	r3, .L31
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L30
	bl	__stack_chk_fail
.L30:
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC2
	.word	-400107883
	.word	1041313291
	.word	.LC1
	.size	blurfilter, .-blurfilter
	.align	2
	.global	blurfilterwrapper
	.syntax unified
	.arm
	.fpu softvfp
	.type	blurfilterwrapper, %function
blurfilterwrapper:
	@ 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, #32
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	ip, [r3]
	ldr	r3, [fp, #-16]
	ldr	lr, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r4, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r5, [r3, #12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #16]
	ldr	r2, [fp, #-16]
	ldr	r2, [r2, #20]
	ldr	r1, [fp, #-16]
	ldr	r1, [r1, #24]
	ldr	r0, [fp, #-16]
	ldr	r0, [r0, #28]
	str	r0, [sp, #12]
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, r5
	mov	r2, r4
	mov	r1, lr
	mov	r0, ip
	bl	blurfilter
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
	.size	blurfilterwrapper, .-blurfilterwrapper
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Usage: %s thread_count radius infile outfile\012\000"
	.align	2
.LC4:
	.ascii	"Too few threads\012\000"
	.align	2
.LC5:
	.ascii	"Radius (%d) must be greater than zero and less then"
	.ascii	" %d\012\000"
	.align	2
.LC6:
	.ascii	"Too large maximum color-component value\012\000"
	.align	2
.LC7:
	.ascii	"Has read the image, generating coefficients\000"
	.align	2
.LC8:
	.ascii	"Calling filter\000"
	.align	2
.LC9:
	.ascii	"Creating threads\000"
	.align	2
.LC10:
	.ascii	"Dividing image\000"
	.align	2
.LC11:
	.ascii	"Setting arguments\000"
	.align	2
.LC12:
	.ascii	"Starting threads\000"
	.align	2
.LC13:
	.ascii	"Threads working on x-axis\000"
	.align	2
.LC14:
	.ascii	"Threads working on y-axis\000"
	.align	2
.LC15:
	.ascii	"Threads done\000"
	.align	2
.LC16:
	.ascii	"Filtering took: %g secs\012\000"
	.align	2
.LC17:
	.ascii	"Writing output file \"%s\"\012\000"
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	blurmain
	.syntax unified
	.arm
	.fpu softvfp
	.type	blurmain, %function
blurmain:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #104
	str	r0, [fp, #-104]
	str	r1, [fp, #-108]
	ldr	r3, .L50
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r0, .L50+4
	bl	allocate_image
	str	r0, [fp, #-84]
	ldr	r0, .L50+4
	bl	allocate_image
	str	r0, [fp, #-80]
	mov	r0, #8000
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-76]
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-104]
	cmp	r3, #5
	beq	.L36
	ldr	r3, .L50+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-108]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L50+12
	bl	fprintf
	mov	r3, #1
	b	.L48
.L36:
	ldr	r3, [fp, #-108]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-68]
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bgt	.L38
	ldr	r3, .L50+8
	ldr	r3, [r3]
	mov	r2, #16
	mov	r1, #1
	ldr	r0, .L50+16
	bl	fwrite
	mov	r3, #1
	b	.L48
.L38:
	ldr	r3, [fp, #-108]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-68]
	ldr	r3, [fp, #-108]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-64]
	ldr	r3, [fp, #-64]
	cmp	r3, #1000
	ble	.L39
	ldr	r3, .L50+8
	ldr	r0, [r3]
	mov	r3, #1000
	ldr	r2, [fp, #-64]
	ldr	r1, .L50+20
	bl	fprintf
	mov	r3, #1
	b	.L48
.L39:
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bgt	.L40
	ldr	r3, .L50+8
	ldr	r0, [r3]
	mov	r3, #1000
	ldr	r2, [fp, #-64]
	ldr	r1, .L50+20
	bl	fprintf
	mov	r3, #1
	b	.L48
.L40:
	ldr	r3, [fp, #-108]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r0, r3
	bl	strdup
	mov	r3, r0
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-108]
	add	r3, r3, #16
	ldr	r3, [r3]
	mov	r0, r3
	bl	strdup
	mov	r3, r0
	str	r3, [fp, #-56]
	sub	r0, fp, #92
	sub	r2, fp, #96
	sub	r1, fp, #100
	ldr	r3, [fp, #-84]
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, [fp, #-60]
	bl	read_ppm
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	beq	.L41
	mov	r3, #1
	b	.L48
.L41:
	ldr	r3, [fp, #-92]
	cmp	r3, #255
	ble	.L42
	ldr	r3, .L50+8
	ldr	r3, [r3]
	mov	r2, #40
	mov	r1, #1
	ldr	r0, .L50+24
	bl	fwrite
	mov	r3, #1
	b	.L48
.L42:
	ldr	r0, .L50+28
	bl	puts
	ldr	r1, [fp, #-72]
	ldr	r0, [fp, #-64]
	bl	get_gauss_weights
	ldr	r0, .L50+32
	bl	puts
	sub	r3, fp, #32
	mov	r1, r3
	mov	r0, #0
	bl	clock_gettime
	ldr	r0, .L50+36
	bl	puts
	ldr	r0, [fp, #-68]
	bl	createThreadData
	str	r0, [fp, #-48]
	ldr	r0, .L50+40
	bl	puts
	ldr	r3, [fp, #-100]
	ldr	r2, [fp, #-96]
	str	r2, [sp, #4]
	str	r3, [sp]
	ldr	r3, [fp, #-80]
	ldr	r2, [fp, #-84]
	ldr	r1, [fp, #-68]
	ldr	r0, [fp, #-48]
	bl	divide
	mov	r0, #10
	bl	putchar
	ldr	r0, .L50+44
	bl	puts
	ldr	r2, [fp, #-68]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-88]
	b	.L43
.L44:
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r2, [fp, #-100]
	str	r2, [r3]
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r2, [fp, #-96]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r2, [fp, #-84]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r2, [fp, #-80]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r2, [fp, #-64]
	str	r2, [r3, #16]
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r2, [fp, #-72]
	str	r2, [r3, #20]
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r2, [fp, #-48]
	str	r2, [r3, #24]
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r2, [fp, #-88]
	str	r2, [r3, #28]
	ldr	r3, [fp, #-88]
	add	r3, r3, #1
	str	r3, [fp, #-88]
.L43:
	ldr	r2, [fp, #-88]
	ldr	r3, [fp, #-68]
	cmp	r2, r3
	blt	.L44
	ldr	r0, .L50+48
	bl	puts
	ldr	r0, [fp, #-68]
	bl	setThreadSyncCount
	mov	r3, #0
	str	r3, [fp, #-88]
	b	.L45
.L46:
	ldr	r3, [fp, #-88]
	lsl	r1, r3, #5
	ldr	r2, [fp, #-88]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-48]
	add	r3, r3, r2
	ldr	r2, [fp, #-40]
	add	r2, r2, r1
	str	r2, [r3, #16]
	ldr	r2, [fp, #-88]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-48]
	add	r3, r3, r2
	ldr	r1, [r3, #16]
	ldr	r2, [fp, #-88]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-48]
	add	r4, r3, r2
	ldr	r0, .L50+52
	bl	createThread
	mov	r3, r0
	str	r3, [r4, #8]
	ldr	r3, [fp, #-88]
	add	r3, r3, #1
	str	r3, [fp, #-88]
.L45:
	ldr	r2, [fp, #-88]
	ldr	r3, [fp, #-68]
	cmp	r2, r3
	blt	.L46
	ldr	r0, .L50+56
	bl	puts
	bl	SynchronizationPoint
	ldr	r0, .L50+60
	bl	puts
	bl	SynchronizationPoint
	ldr	r0, .L50+64
	bl	puts
	sub	r3, fp, #24
	mov	r1, r3
	mov	r0, #0
	bl	clock_gettime
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-32]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	ldr	r2, .L50+68
	ldr	r3, .L50+72
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L50+76
	bl	printf
	ldr	r1, [fp, #-56]
	ldr	r0, .L50+80
	bl	printf
	ldr	r1, [fp, #-100]
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-84]
	ldr	r0, [fp, #-56]
	bl	write_ppm
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L47
	mov	r3, #1
	b	.L48
.L47:
	mov	r3, #0
.L48:
	ldr	r2, .L50
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L49
	bl	__stack_chk_fail
.L49:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L51:
	.align	2
.L50:
	.word	.LC18
	.word	1000000
	.word	stderr
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	blurfilterwrapper
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	-400107883
	.word	1041313291
	.word	.LC16
	.word	.LC17
	.size	blurmain, .-blurmain
	.align	2
	.global	createThread
	.syntax unified
	.arm
	.fpu softvfp
	.type	createThread, %function
createThread:
	@ 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]
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	pthread_create
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	createThread, .-createThread
	.align	2
	.global	createThreadData
	.syntax unified
	.arm
	.fpu softvfp
	.type	createThreadData, %function
createThreadData:
	@ 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, [fp, #-24]
	lsl	r3, r3, #5
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L55
.L56:
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	ldr	r2, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L55:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L56
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	createThreadData, .-createThreadData
	.global	__aeabi_idiv
	.global	__aeabi_idivmod
	.section	.rodata
	.align	2
.LC19:
	.ascii	"Setting structs\012\000"
	.align	2
.LC20:
	.ascii	"Setting initial height\012\000"
	.align	2
.LC21:
	.ascii	"Setting corrected height\012\000"
	.align	2
.LC22:
	.ascii	"Setting pixel count & bytes\012\000"
	.align	2
.LC23:
	.ascii	"Setting ystart, sourcePixels and destinationPixels\012"
	.ascii	"\000"
	.text
	.align	2
	.global	divide
	.syntax unified
	.arm
	.fpu softvfp
	.type	divide, %function
divide:
	@ args = 8, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #8]
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #8]
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	str	r3, [fp, #-12]
	ldr	r3, .L70
	ldr	r3, [r3]
	mov	r2, #16
	mov	r1, #1
	ldr	r0, .L70+4
	bl	fwrite
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L59
.L60:
	mov	r0, #40
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L59:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L60
	ldr	r3, .L70
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L70+8
	bl	fwrite
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L61
.L62:
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #4]
	str	r2, [r3, #12]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L61:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L62
	ldr	r3, .L70
	ldr	r3, [r3]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L70+12
	bl	fwrite
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L63
.L64:
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r1, [r3, #8]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	add	r2, r1, #1
	str	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L63:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	blt	.L64
	ldr	r3, .L70
	ldr	r3, [r3]
	mov	r2, #28
	mov	r1, #1
	ldr	r0, .L70+16
	bl	fwrite
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L65
.L66:
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r1, [r3, #12]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r0, [r3, #8]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	mul	r2, r0, r1
	str	r2, [r3, #24]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r3, [r3, #24]
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r1, r3, r2
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	mov	r2, r1
	str	r2, [r3, #28]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L65:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L66
	ldr	r3, .L70
	ldr	r3, [r3]
	mov	r2, #51
	mov	r1, #1
	ldr	r0, .L70+20
	bl	fwrite
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	mov	r2, #0
	str	r2, [r3, #16]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	ldr	r2, [r2, #8]
	str	r2, [r3, #20]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-32]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-36]
	str	r2, [r3, #4]
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L67
.L68:
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r1, [r3, #12]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r2, [r1, #20]
	str	r2, [r3, #16]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r0, [r3, #16]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r1, [r3, #8]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	add	r2, r0, r1
	str	r2, [r3, #20]
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r0, [r3]
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r3, [r3, #28]
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r1, r3, r2
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	add	r2, r0, r1
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r0, [r3, #4]
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	ldr	r3, [r3, #28]
	mov	r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r1, r3, r2
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r3, [r3, #12]
	add	r2, r0, r1
	str	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L67:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L68
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L71:
	.align	2
.L70:
	.word	stderr
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.size	divide, .-divide
	.align	2
	.global	get_gauss_weights
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_gauss_weights, %function
get_gauss_weights:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #24
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L73
.L74:
	ldr	r0, [fp, #-32]
	bl	__aeabi_i2d
	ldr	r2, .L76
	ldr	r3, .L76+4
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r6, r2
	mov	r7, r3
	ldr	r0, [fp, #-40]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	ldr	r4, [fp, #-28]
	ldr	r3, [fp, #-24]
	eor	r5, r3, #-2147483648
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r2, .L76+8
	ldr	r3, .L76+12
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-44]
	add	r6, r2, r3
	bl	exp
	mov	r2, r0
	mov	r3, r1
	stm	r6, {r2-r3}
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L73:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bge	.L74
	nop
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L77:
	.align	2
.L76:
	.word	343597384
	.word	1073039278
	.word	-266631570
	.word	1074340345
	.size	get_gauss_weights, .-get_gauss_weights
	.section	.rodata
	.align	2
.LC24:
	.ascii	"Threshold!\000"
	.align	2
.LC25:
	.ascii	"Blur!\000"
	.align	2
.LC26:
	.ascii	"Threshold usage: %s thread_count infile outfile\012"
	.ascii	"\000"
	.align	2
.LC27:
	.ascii	"Blur usage: %s thread_count radius infile outfile\012"
	.ascii	"\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]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r3, #4
	bne	.L79
	ldr	r0, .L82
	bl	puts
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	thresmain
	str	r0, [fp, #-8]
	b	.L80
.L79:
	ldr	r3, [fp, #-16]
	cmp	r3, #5
	bne	.L81
	ldr	r0, .L82+4
	bl	puts
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	blurmain
	str	r0, [fp, #-8]
	b	.L80
.L81:
	ldr	r3, .L82+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L82+12
	bl	fprintf
	ldr	r3, .L82+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L82+16
	bl	fprintf
	mov	r3, #1
	str	r3, [fp, #-8]
.L80:
	ldr	r0, [fp, #-8]
	bl	exit
.L83:
	.align	2
.L82:
	.word	.LC24
	.word	.LC25
	.word	stderr
	.word	.LC26
	.word	.LC27
	.size	main, .-main
	.section	.rodata
	.align	2
.LC28:
	.ascii	"\012 Terribly wrong: %d %d %d\012\000"
	.text
	.align	2
	.global	pix
	.syntax unified
	.arm
	.fpu softvfp
	.type	pix, %function
pix:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	mul	r3, r2, r3
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, .L87
	cmp	r3, r2
	blt	.L85
	ldr	r3, .L87+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-28]
	str	r3, [sp]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-20]
	ldr	r1, .L87+8
	bl	fprintf
.L85:
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L88:
	.align	2
.L87:
	.word	1000000
	.word	stderr
	.word	.LC28
	.size	pix, .-pix
	.align	2
	.global	pix_trans
	.syntax unified
	.arm
	.fpu softvfp
	.type	pix_trans, %function
pix_trans:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-20]
	mul	r3, r2, r3
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, .L92
	cmp	r3, r2
	blt	.L90
	ldr	r3, .L92+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-28]
	str	r3, [sp]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-20]
	ldr	r1, .L92+8
	bl	fprintf
.L90:
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L93:
	.align	2
.L92:
	.word	1000000
	.word	stderr
	.word	.LC28
	.size	pix_trans, .-pix_trans
	.section	.rodata
	.align	2
.LC29:
	.ascii	"%s\012\000"
	.text
	.align	2
	.global	ppm_error
	.syntax unified
	.arm
	.fpu softvfp
	.type	ppm_error, %function
ppm_error:
	@ 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	r3, .L95
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L95+4
	mov	r0, r3
	bl	fprintf
	bl	getchar
	mov	r0, #1
	bl	exit
.L96:
	.align	2
.L95:
	.word	stderr
	.word	.LC29
	.size	ppm_error, .-ppm_error
	.align	2
	.global	ppm_readchar
	.syntax unified
	.arm
	.fpu softvfp
	.type	ppm_readchar, %function
ppm_readchar:
	@ 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	r0, [fp, #-24]
	bl	_IO_getc
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	strb	r3, [fp, #-13]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #35
	bne	.L102
.L100:
	ldr	r0, [fp, #-24]
	bl	_IO_getc
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	strb	r3, [fp, #-13]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L103
	b	.L100
.L102:
	nop
	b	.L98
.L103:
	nop
.L98:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	ppm_readchar, .-ppm_readchar
	.section	.rodata
	.align	2
.LC30:
	.ascii	"error in readint\000"
	.text
	.align	2
	.global	ppm_readint
	.syntax unified
	.arm
	.fpu softvfp
	.type	ppm_readint, %function
ppm_readint:
	@ 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]
.L107:
	ldr	r0, [fp, #-16]
	bl	ppm_readchar
	mov	r3, r0
	strb	r3, [fp, #-9]
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L107
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #9
	beq	.L107
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L116
	b	.L107
.L116:
	nop
.L106:
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #47
	bhi	.L108
	ldr	r0, .L119
	bl	ppm_error
	b	.L109
.L108:
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #57
	bls	.L109
	ldr	r0, .L119
	bl	ppm_error
.L109:
	mov	r3, #0
	str	r3, [fp, #-8]
.L113:
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	mov	r2, r3
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	sub	r3, r3, #48
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	ppm_readchar
	mov	r3, r0
	strb	r3, [fp, #-9]
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #47
	bls	.L117
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #57
	bhi	.L118
	b	.L113
.L117:
	nop
	b	.L112
.L118:
	nop
.L112:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L120:
	.align	2
.L119:
	.word	.LC30
	.size	ppm_readint, .-ppm_readint
	.section	.rodata
	.align	2
.LC31:
	.ascii	"read error\000"
	.text
	.align	2
	.global	ppm_readmagicnumber
	.syntax unified
	.arm
	.fpu softvfp
	.type	ppm_readmagicnumber, %function
ppm_readmagicnumber:
	@ 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	r0, [fp, #-16]
	bl	_IO_getc
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L122
	ldr	r0, .L125
	bl	ppm_error
.L122:
	ldr	r0, [fp, #-16]
	bl	_IO_getc
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L123
	ldr	r0, .L125
	bl	ppm_error
.L123:
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #8
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L126:
	.align	2
.L125:
	.word	.LC31
	.size	ppm_readmagicnumber, .-ppm_readmagicnumber
	.section	.rodata
	.align	2
.LC32:
	.ascii	"\000"
	.align	2
.LC33:
	.ascii	"r\000"
	.align	2
.LC34:
	.ascii	"read_ppm failed to open %s: %s\012\000"
	.align	2
.LC35:
	.ascii	"%s\000"
	.align	2
.LC36:
	.ascii	"%d%d\000"
	.align	2
.LC37:
	.ascii	"%d\012\000"
	.align	2
.LC38:
	.ascii	"Image size is too big\012\000"
	.align	2
.LC39:
	.ascii	"Read failed\000"
	.align	2
.LC40:
	.ascii	"Wrong file format: %s\012\000"
	.align	2
.LC41:
	.ascii	"Close failed\000"
	.align	2
.LC42:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_ppm
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_ppm, %function
read_ppm:
	@ args = 4, pretend = 0, frame = 232
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #232
	str	r0, [fp, #-216]
	str	r1, [fp, #-220]
	str	r2, [fp, #-224]
	str	r3, [fp, #-228]
	ldr	r3, [fp, #4]
	str	r3, [fp, #-232]
	ldr	r3, .L145
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #80
	strb	r3, [fp, #-128]
	mov	r3, #54
	strb	r3, [fp, #-127]
	mov	r3, #0
	strb	r3, [fp, #-126]
	mov	r3, #3
	str	r3, [fp, #-212]
	b	.L128
.L129:
	ldr	r3, [fp, #-212]
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #-124]
	ldr	r3, [fp, #-212]
	add	r3, r3, #1
	str	r3, [fp, #-212]
.L128:
	ldr	r3, [fp, #-212]
	cmp	r3, #39
	bls	.L129
	mov	r3, #0
	str	r3, [fp, #-204]
	ldr	r0, [fp, #-216]
	bl	strdup
	mov	r3, r0
	str	r3, [fp, #-208]
	ldr	r3, [fp, #-208]
	cmp	r3, #0
	bne	.L130
	ldr	r3, .L145+4
	str	r3, [fp, #-208]
.L130:
	ldr	r1, .L145+8
	ldr	r0, [fp, #-208]
	bl	fopen
	str	r0, [fp, #-200]
	ldr	r3, [fp, #-200]
	cmp	r3, #0
	bne	.L131
	ldr	r0, [fp, #-204]
	bl	strerror
	str	r0, [fp, #-172]
	ldr	r3, .L145+12
	ldr	r0, [r3]
	ldr	r3, [fp, #-172]
	ldr	r2, [fp, #-208]
	ldr	r1, .L145+16
	bl	fprintf
	bl	getchar
	mov	r0, #1
	bl	exit
.L131:
	sub	r3, fp, #88
	ldr	r2, [fp, #-200]
	mov	r1, #80
	mov	r0, r3
	bl	fgets
	sub	r2, fp, #168
	sub	r3, fp, #88
	ldr	r1, .L145+20
	mov	r0, r3
	bl	sscanf
.L135:
	sub	r3, fp, #88
	ldr	r2, [fp, #-200]
	mov	r1, #80
	mov	r0, r3
	bl	fgets
	str	r0, [fp, #-196]
	ldr	r3, [fp, #-196]
	cmp	r3, #0
	beq	.L143
	ldrb	r3, [fp, #-88]	@ zero_extendqisi2
	cmp	r3, #35
	bne	.L144
	b	.L135
.L143:
	nop
	b	.L134
.L144:
	nop
.L134:
	sub	r0, fp, #88
	ldr	r3, [fp, #-224]
	ldr	r2, [fp, #-220]
	ldr	r1, .L145+24
	bl	sscanf
	ldr	r2, [fp, #-228]
	ldr	r1, .L145+28
	ldr	r0, [fp, #-200]
	bl	fscanf
	ldr	r3, [fp, #-220]
	ldr	r3, [r3]
	ldr	r2, [fp, #-224]
	ldr	r2, [r2]
	mul	r3, r2, r3
	ldr	r2, .L145+32
	cmp	r3, r2
	ble	.L136
	ldr	r3, .L145+12
	ldr	r3, [r3]
	mov	r2, #22
	mov	r1, #1
	ldr	r0, .L145+36
	bl	fwrite
	mov	r3, #4
	b	.L141
.L136:
	sub	r1, fp, #128
	sub	r3, fp, #168
	mov	r2, #2
	mov	r0, r3
	bl	strncmp
	str	r0, [fp, #-192]
	ldr	r3, [fp, #-192]
	cmp	r3, #0
	bne	.L138
	ldr	r3, [fp, #-220]
	ldr	r3, [r3]
	ldr	r2, [fp, #-224]
	ldr	r2, [r2]
	mul	r2, r3, r2
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	str	r3, [fp, #-188]
	ldr	r2, [fp, #-188]
	ldr	r3, [fp, #-200]
	mov	r1, #1
	ldr	r0, [fp, #-232]
	bl	fread
	str	r0, [fp, #-184]
	ldr	r3, [fp, #-184]
	str	r3, [fp, #-180]
	ldr	r2, [fp, #-180]
	ldr	r3, [fp, #-188]
	cmp	r2, r3
	beq	.L139
	ldr	r0, .L145+40
	bl	perror
	mov	r3, #2
	b	.L141
.L138:
	ldr	r3, .L145+12
	ldr	r3, [r3]
	sub	r2, fp, #168
	ldr	r1, .L145+44
	mov	r0, r3
	bl	fprintf
.L139:
	ldr	r0, [fp, #-200]
	bl	fclose
	str	r0, [fp, #-176]
	ldr	r3, [fp, #-176]
	cmn	r3, #1
	bne	.L140
	ldr	r0, .L145+48
	bl	perror
	mov	r3, #3
	b	.L141
.L140:
	mov	r3, #0
.L141:
	ldr	r2, .L145
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L142
	bl	__stack_chk_fail
.L142:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L146:
	.align	2
.L145:
	.word	.LC42
	.word	.LC32
	.word	.LC33
	.word	stderr
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.word	.LC37
	.word	1000000
	.word	.LC38
	.word	.LC39
	.word	.LC40
	.word	.LC41
	.size	read_ppm, .-read_ppm
	.align	2
	.global	setThreadSyncCount
	.syntax unified
	.arm
	.fpu softvfp
	.type	setThreadSyncCount, %function
setThreadSyncCount:
	@ 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]
	add	r3, r3, #1
	ldr	r2, .L149
	str	r3, [r2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L150:
	.align	2
.L149:
	.word	sync_max_count
	.size	setThreadSyncCount, .-setThreadSyncCount
	.section	.rodata
	.align	2
.LC43:
	.ascii	"Hello from thread %d\012\000"
	.global	__aeabi_uidiv
	.align	2
.LC44:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	thresfilter
	.syntax unified
	.arm
	.fpu softvfp
	.type	thresfilter, %function
thresfilter:
	@ args = 12, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #96
	str	r0, [fp, #-88]
	str	r1, [fp, #-92]
	str	r2, [fp, #-96]
	str	r3, [fp, #-100]
	ldr	r3, [fp, #4]
	str	r3, [fp, #-104]
	ldr	r3, [fp, #8]
	str	r3, [fp, #-108]
	ldr	r3, .L160
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L160+4
	ldr	r3, [r3]
	ldr	r2, [fp, #12]
	ldr	r1, .L160+8
	mov	r0, r3
	bl	fprintf
	ldr	r2, [fp, #12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-108]
	add	r3, r3, r2
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-68]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-64]
	ldr	r3, [r3, #16]
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-64]
	ldr	r3, [r3, #20]
	str	r3, [fp, #-56]
	sub	r3, fp, #32
	mov	r1, r3
	mov	r0, #0
	bl	clock_gettime
	ldr	r3, [fp, #-88]
	ldr	r2, [fp, #-92]
	mul	r3, r2, r3
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-64]
	ldr	r3, [r3, #24]
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-64]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-64]
	ldr	r2, [r2, #16]
	mul	r3, r2, r3
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-64]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-64]
	ldr	r2, [r2, #16]
	mul	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-48]
	add	r3, r3, r2
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-72]
	mov	r3, #0
	str	r3, [fp, #-76]
	b	.L152
.L153:
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-76]
	add	r1, r2, r3
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	add	r1, r1, r3
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	add	r3, r1, r3
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L152:
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	bcc	.L153
	ldr	r0, [fp, #-104]
	bl	pthread_mutex_lock
	ldr	r3, [fp, #-100]
	ldr	r2, [r3]
	ldr	r3, [fp, #-76]
	add	r2, r2, r3
	ldr	r3, [fp, #-100]
	str	r2, [r3]
	ldr	r0, [fp, #-104]
	bl	pthread_mutex_unlock
	bl	SynchronizationPoint
	ldr	r3, [fp, #-100]
	ldr	r3, [r3]
	ldr	r1, [fp, #-52]
	mov	r0, r3
	bl	__aeabi_uidiv
	mov	r3, r0
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-72]
	b	.L154
.L157:
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	add	r1, r1, r3
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	add	r3, r1, r3
	str	r3, [fp, #-36]
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-76]
	cmp	r2, r3
	bcs	.L155
	mov	r3, #0
	strb	r3, [fp, #-78]
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldrb	r2, [fp, #-78]
	strb	r2, [r3, #2]
	ldrb	r3, [fp, #-78]
	strb	r3, [fp, #-77]
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldrb	r2, [fp, #-77]
	strb	r2, [r3, #1]
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldrb	r2, [fp, #-77]
	strb	r2, [r3]
	b	.L156
.L155:
	mvn	r3, #0
	strb	r3, [fp, #-80]
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldrb	r2, [fp, #-80]
	strb	r2, [r3, #2]
	ldrb	r3, [fp, #-80]
	strb	r3, [fp, #-79]
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldrb	r2, [fp, #-79]
	strb	r2, [r3, #1]
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	ldrb	r2, [fp, #-79]
	strb	r2, [r3]
.L156:
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L154:
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	bcc	.L157
	sub	r3, fp, #24
	mov	r1, r3
	mov	r0, #0
	bl	clock_gettime
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-32]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	ldr	r2, .L160+12
	ldr	r3, .L160+16
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #12]
	ldr	r0, .L160+20
	bl	printf
	bl	SynchronizationPoint
	nop
	ldr	r3, .L160
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L159
	bl	__stack_chk_fail
.L159:
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L161:
	.align	2
.L160:
	.word	.LC44
	.word	stderr
	.word	.LC43
	.word	-400107883
	.word	1041313291
	.word	.LC1
	.size	thresfilter, .-thresfilter
	.align	2
	.global	thresfilterwrapper
	.syntax unified
	.arm
	.fpu softvfp
	.type	thresfilterwrapper, %function
thresfilterwrapper:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r0, [r3]
	ldr	r3, [fp, #-16]
	ldr	ip, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	lr, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r4, [r3, #16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #28]
	ldr	r2, [fp, #-16]
	ldr	r2, [r2, #20]
	ldr	r1, [fp, #-16]
	ldr	r1, [r1, #24]
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, r4
	mov	r2, lr
	mov	r1, ip
	bl	thresfilter
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	thresfilterwrapper, .-thresfilterwrapper
	.section	.rodata
	.align	2
.LC45:
	.ascii	"Usage: %s thread_count infile outfile\012\000"
	.align	2
.LC46:
	.ascii	"Threads working on average value\000"
	.align	2
.LC47:
	.ascii	"Average value is %d\012\000"
	.align	2
.LC48:
	.ascii	"Threads working on threshold\000"
	.align	2
.LC49:
	.ascii	"Writing output file\000"
	.align	2
.LC50:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	thresmain
	.syntax unified
	.arm
	.fpu softvfp
	.type	thresmain, %function
thresmain:
	@ 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, #136
	str	r0, [fp, #-136]
	str	r1, [fp, #-140]
	ldr	r3, .L177
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-56]
	mov	r3, #0
	str	r3, [fp, #-52]
	mov	r3, #0
	str	r3, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-120]
	ldr	r0, .L177+4
	bl	allocate_image
	str	r0, [fp, #-112]
	ldr	r0, .L177+4
	bl	allocate_image
	str	r0, [fp, #-108]
	ldr	r3, [fp, #-136]
	cmp	r3, #4
	beq	.L165
	ldr	r3, .L177+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-140]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L177+12
	bl	fprintf
	mov	r3, #1
	b	.L175
.L165:
	ldr	r3, [fp, #-140]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	bgt	.L167
	ldr	r3, .L177+8
	ldr	r3, [r3]
	mov	r2, #16
	mov	r1, #1
	ldr	r0, .L177+16
	bl	fwrite
	mov	r3, #1
	b	.L175
.L167:
	ldr	r3, [fp, #-140]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	strdup
	mov	r3, r0
	str	r3, [fp, #-100]
	ldr	r3, [fp, #-140]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r0, r3
	bl	strdup
	mov	r3, r0
	str	r3, [fp, #-96]
	sub	r0, fp, #124
	sub	r2, fp, #128
	sub	r1, fp, #132
	ldr	r3, [fp, #-112]
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, [fp, #-100]
	bl	read_ppm
	str	r0, [fp, #-92]
	ldr	r3, [fp, #-92]
	cmp	r3, #0
	beq	.L168
	mov	r3, #1
	b	.L175
.L168:
	ldr	r3, [fp, #-124]
	cmp	r3, #255
	ble	.L169
	ldr	r3, .L177+8
	ldr	r3, [r3]
	mov	r2, #40
	mov	r1, #1
	ldr	r0, .L177+20
	bl	fwrite
	mov	r3, #1
	b	.L175
.L169:
	ldr	r0, .L177+24
	bl	puts
	ldr	r0, [fp, #-104]
	bl	createThreadData
	str	r0, [fp, #-88]
	ldr	r0, .L177+28
	bl	puts
	ldr	r3, [fp, #-132]
	ldr	r2, [fp, #-128]
	str	r2, [sp, #4]
	str	r3, [sp]
	ldr	r3, [fp, #-108]
	ldr	r2, [fp, #-112]
	ldr	r1, [fp, #-104]
	ldr	r0, [fp, #-88]
	bl	divide
	mov	r0, #10
	bl	putchar
	ldr	r0, .L177+32
	bl	puts
	ldr	r2, [fp, #-104]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-84]
	ldr	r3, [fp, #-84]
	str	r3, [fp, #-80]
	mov	r3, #0
	str	r3, [fp, #-116]
	b	.L170
.L171:
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-80]
	add	r3, r2, r3
	ldr	r2, [fp, #-132]
	str	r2, [r3]
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-80]
	add	r3, r2, r3
	ldr	r2, [fp, #-128]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-80]
	add	r3, r2, r3
	ldr	r2, [fp, #-112]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-80]
	add	r3, r2, r3
	ldr	r2, [fp, #-108]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-80]
	add	r3, r2, r3
	sub	r2, fp, #120
	str	r2, [r3, #16]
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-80]
	add	r3, r2, r3
	ldr	r2, [fp, #-88]
	str	r2, [r3, #20]
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-80]
	add	r3, r2, r3
	ldr	r2, [fp, #-116]
	str	r2, [r3, #24]
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #5
	ldr	r2, [fp, #-80]
	add	r3, r2, r3
	sub	r2, fp, #56
	str	r2, [r3, #28]
	ldr	r3, [fp, #-116]
	add	r3, r3, #1
	str	r3, [fp, #-116]
.L170:
	ldr	r2, [fp, #-116]
	ldr	r3, [fp, #-104]
	cmp	r2, r3
	blt	.L171
	sub	r3, fp, #72
	mov	r1, r3
	mov	r0, #0
	bl	clock_gettime
	ldr	r0, .L177+36
	bl	puts
	ldr	r0, [fp, #-104]
	bl	setThreadSyncCount
	mov	r3, #0
	str	r3, [fp, #-116]
	b	.L172
.L173:
	ldr	r3, [fp, #-116]
	lsl	r1, r3, #5
	ldr	r2, [fp, #-116]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r3, r2
	ldr	r2, [fp, #-80]
	add	r2, r2, r1
	str	r2, [r3, #16]
	ldr	r2, [fp, #-116]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r3, r2
	ldr	r1, [r3, #16]
	ldr	r2, [fp, #-116]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-88]
	add	r4, r3, r2
	ldr	r0, .L177+40
	bl	createThread
	mov	r3, r0
	str	r3, [r4, #8]
	ldr	r3, [fp, #-116]
	add	r3, r3, #1
	str	r3, [fp, #-116]
.L172:
	ldr	r2, [fp, #-116]
	ldr	r3, [fp, #-104]
	cmp	r2, r3
	blt	.L173
	ldr	r0, .L177+44
	bl	puts
	bl	SynchronizationPoint
	ldr	r0, [fp, #-120]
	ldr	r3, [fp, #-132]
	ldr	r2, [fp, #-128]
	mul	r3, r2, r3
	mov	r1, r3
	bl	__aeabi_uidiv
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L177+48
	bl	printf
	ldr	r0, .L177+52
	bl	puts
	bl	SynchronizationPoint
	ldr	r0, .L177+56
	bl	puts
	sub	r3, fp, #64
	mov	r1, r3
	mov	r0, #0
	bl	clock_gettime
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-72]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-68]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	ldr	r2, .L177+60
	ldr	r3, .L177+64
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L177+68
	bl	printf
	ldr	r0, .L177+72
	bl	puts
	ldr	r1, [fp, #-132]
	ldr	r2, [fp, #-128]
	ldr	r3, [fp, #-112]
	ldr	r0, [fp, #-96]
	bl	write_ppm
	str	r0, [fp, #-76]
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	beq	.L174
	mov	r3, #1
	b	.L175
.L174:
	mov	r3, #0
.L175:
	ldr	r2, .L177
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L176
	bl	__stack_chk_fail
.L176:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L178:
	.align	2
.L177:
	.word	.LC50
	.word	1000000
	.word	stderr
	.word	.LC45
	.word	.LC4
	.word	.LC6
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	thresfilterwrapper
	.word	.LC46
	.word	.LC47
	.word	.LC48
	.word	.LC15
	.word	-400107883
	.word	1041313291
	.word	.LC16
	.word	.LC49
	.size	thresmain, .-thresmain
	.section	.rodata
	.align	2
.LC51:
	.ascii	"write_ppm filename is null.\012\000"
	.align	2
.LC52:
	.ascii	"w\000"
	.align	2
.LC53:
	.ascii	"write_ppm failed to open %s: %s\012\000"
	.align	2
.LC54:
	.ascii	"P6\012\000"
	.align	2
.LC55:
	.ascii	"%d %d 255\012\000"
	.align	2
.LC56:
	.ascii	"Write failed\000"
	.text
	.align	2
	.global	write_ppm
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_ppm, %function
write_ppm:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	str	r3, [fp, #-52]
	mov	r3, #0
	str	r3, [fp, #-36]
	ldr	r0, [fp, #-40]
	bl	strdup
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L180
	ldr	r3, .L185
	ldr	r3, [r3]
	mov	r2, #28
	mov	r1, #1
	ldr	r0, .L185+4
	bl	fwrite
	mov	r0, #1
	bl	exit
.L180:
	ldr	r1, .L185+8
	ldr	r0, [fp, #-32]
	bl	fopen
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L181
	ldr	r0, [fp, #-36]
	bl	strerror
	str	r0, [fp, #-8]
	ldr	r3, .L185
	ldr	r0, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-32]
	ldr	r1, .L185+12
	bl	fprintf
	bl	getchar
	mov	r0, #1
	bl	exit
.L181:
	ldr	r3, [fp, #-28]
	mov	r2, #3
	mov	r1, #1
	ldr	r0, .L185+16
	bl	fwrite
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-44]
	ldr	r1, .L185+20
	ldr	r0, [fp, #-28]
	bl	fprintf
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-48]
	mul	r2, r3, r2
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	str	r3, [fp, #-24]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-28]
	mov	r1, #1
	ldr	r0, [fp, #-52]
	bl	fwrite
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	beq	.L182
	ldr	r0, .L185+24
	bl	perror
	mov	r3, #2
	b	.L183
.L182:
	ldr	r0, [fp, #-28]
	bl	fclose
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L184
	ldr	r0, .L185+28
	bl	perror
	mov	r3, #3
	b	.L183
.L184:
	mov	r3, #0
.L183:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L186:
	.align	2
.L185:
	.word	stderr
	.word	.LC51
	.word	.LC52
	.word	.LC53
	.word	.LC54
	.word	.LC55
	.word	.LC56
	.word	.LC41
	.size	write_ppm, .-write_ppm
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
