	.file	"741547.c"
	.intel_syntax noprefix
	.text
	.globl	job_queue
	.bss
	.align 8
	.type	job_queue, @object
	.size	job_queue, 8
job_queue:
	.zero	8
	.globl	q_temp
	.align 8
	.type	q_temp, @object
	.size	q_temp, 8
q_temp:
	.zero	8
	.globl	temp_queue
	.align 8
	.type	temp_queue, @object
	.size	temp_queue, 8
temp_queue:
	.zero	8
	.globl	temp
	.align 8
	.type	temp, @object
	.size	temp, 8
temp:
	.zero	8
	.globl	time_limit
	.align 4
	.type	time_limit, @object
	.size	time_limit, 4
time_limit:
	.zero	4
	.globl	counter
	.align 4
	.type	counter, @object
	.size	counter, 4
counter:
	.zero	4
	.globl	NStep
	.type	NStep, @object
	.size	NStep, 1
NStep:
	.zero	1
	.globl	SCAN
	.type	SCAN, @object
	.size	SCAN, 1
SCAN:
	.zero	1
	.globl	N
	.data
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.long	15
	.text
	.globl	handle_alarm
	.type	handle_alarm, @function
handle_alarm:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR time_limit[rip], 1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	handle_alarm, .-handle_alarm
	.globl	lock
	.bss
	.align 32
	.type	lock, @object
	.size	lock, 40
lock:
	.zero	40
	.section	.rodata
	.align 8
.LC0:
	.string	"Memory allocation failed for the job_queue!!"
	.align 8
.LC1:
	.string	"Thread 1 setup the job_queue!!"
	.align 8
.LC2:
	.string	"Memory allocation failed for the temp_queue!!"
	.align 8
.LC3:
	.string	"Thread 1 setup the temp_queue!!"
.LC4:
	.string	"Thread 1 just locked!!!"
.LC5:
	.string	"Thread 1, pass %d:\n"
	.align 8
.LC6:
	.string	"Thread one created the first node!!"
	.align 8
.LC7:
	.string	"Memory allocation failed for a node!!"
	.align 8
.LC8:
	.string	"Thread one created an additional node (1)!!"
	.align 8
.LC9:
	.string	"Thread one created an additional node (2)!!"
	.align 8
.LC10:
	.string	"Thread one created an additional node (3)!!"
	.align 8
.LC11:
	.string	"Thread one created an additional node (4)!!"
.LC12:
	.string	"Thread 1 just unlocked!"
	.text
	.globl	ThreadOne
	.type	ThreadOne, @function
ThreadOne:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	edi, 1492
	call	srand@PLT
	mov	DWORD PTR -4[rbp], 0
	mov	edi, 32
	call	malloc@PLT
	mov	QWORD PTR q_temp[rip], rax
	mov	rax, QWORD PTR q_temp[rip]
	test	rax, rax
	jne	.L3
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR q_temp[rip]
	mov	QWORD PTR job_queue[rip], rax
	mov	rax, QWORD PTR job_queue[rip]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR job_queue[rip]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR job_queue[rip]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR job_queue[rip]
	mov	DWORD PTR 24[rax], 0
	lea	rdi, .LC1[rip]
	call	puts@PLT
	movzx	eax, BYTE PTR NStep[rip]
	test	al, al
	je	.L4
	mov	edi, 32
	call	malloc@PLT
	mov	QWORD PTR q_temp[rip], rax
	mov	rax, QWORD PTR q_temp[rip]
	test	rax, rax
	jne	.L5
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L5:
	mov	rax, QWORD PTR q_temp[rip]
	mov	QWORD PTR temp_queue[rip], rax
	mov	rax, QWORD PTR temp_queue[rip]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	DWORD PTR 24[rax], 0
	lea	rdi, .LC3[rip]
	call	puts@PLT
.L4:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L6
.L23:
	mov	edi, 100000
	call	usleep@PLT
	lea	rdi, lock[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	movzx	eax, BYTE PTR SCAN[rip]
	test	al, al
	je	.L7
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 6
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 1000
	sub	eax, ecx
	mov	edx, eax
	lea	eax, 1[rdx]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -8[rbp], 1
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L8
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR temp[rip], rax
	mov	rax, QWORD PTR temp[rip]
	test	rax, rax
	je	.L9
	mov	rax, QWORD PTR temp[rip]
	mov	edx, DWORD PTR -4[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR temp[rip]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR temp[rip]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR temp[rip]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR temp[rip]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR temp[rip]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	add	edx, 1
	mov	DWORD PTR 24[rax], edx
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L10
.L9:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L8:
	mov	rdx, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR [rdx]
	mov	QWORD PTR 16[rax], rdx
	jmp	.L11
.L19:
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -4[rbp], eax
	jge	.L12
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	je	.L13
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 16[rdx]
	mov	QWORD PTR 16[rax], rdx
	jmp	.L11
.L13:
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR temp[rip], rax
	mov	rax, QWORD PTR temp[rip]
	test	rax, rax
	je	.L14
	mov	rax, QWORD PTR temp[rip]
	mov	edx, DWORD PTR -4[rbp]
	mov	DWORD PTR [rax], edx
	mov	rdx, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR temp[rip]
	mov	rdx, QWORD PTR 16[rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR temp[rip]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR temp[rip]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR temp[rip]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	add	edx, 1
	mov	DWORD PTR 24[rax], edx
	lea	rdi, .LC8[rip]
	call	puts@PLT
	jmp	.L15
.L14:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L12:
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L16
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR temp[rip], rax
	mov	rax, QWORD PTR temp[rip]
	test	rax, rax
	je	.L17
	mov	rax, QWORD PTR temp[rip]
	mov	edx, DWORD PTR -4[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR temp[rip]
	mov	QWORD PTR 8[rax], 0
	mov	rdx, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR temp[rip]
	mov	rdx, QWORD PTR 16[rdx]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR temp[rip]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR temp[rip]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	add	edx, 1
	mov	DWORD PTR 24[rax], edx
	lea	rdi, .LC9[rip]
	call	puts@PLT
	jmp	.L15
.L17:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L16:
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR temp[rip], rax
	mov	rax, QWORD PTR temp[rip]
	test	rax, rax
	je	.L18
	mov	rax, QWORD PTR temp[rip]
	mov	edx, DWORD PTR -4[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR temp[rip]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rdx, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR temp[rip]
	mov	rdx, QWORD PTR 16[rdx]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR temp[rip]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR temp[rip]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	add	edx, 1
	mov	DWORD PTR 24[rax], edx
	lea	rdi, .LC10[rip]
	call	puts@PLT
	jmp	.L15
.L18:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L11:
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L19
.L15:
	mov	rdx, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR [rdx]
	mov	QWORD PTR 16[rax], rdx
	jmp	.L10
.L7:
	movzx	eax, BYTE PTR NStep[rip]
	test	al, al
	je	.L10
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L20
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR temp[rip], rax
	mov	rax, QWORD PTR temp[rip]
	test	rax, rax
	je	.L21
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 6
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 1000
	sub	eax, ecx
	mov	edx, eax
	mov	rax, QWORD PTR temp[rip]
	add	edx, 1
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR temp[rip]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR temp[rip]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR temp[rip]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR temp[rip]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR temp[rip]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	add	edx, 1
	mov	DWORD PTR 24[rax], edx
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L10
.L21:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L20:
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR temp[rip], rax
	mov	rax, QWORD PTR temp[rip]
	test	rax, rax
	je	.L22
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 6
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 1000
	sub	eax, ecx
	mov	edx, eax
	mov	rax, QWORD PTR temp[rip]
	add	edx, 1
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR temp[rip]
	mov	QWORD PTR 8[rax], 0
	mov	rdx, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR temp[rip]
	mov	rdx, QWORD PTR 16[rdx]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR temp[rip]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR temp[rip]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR temp[rip]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	add	edx, 1
	mov	DWORD PTR 24[rax], edx
	lea	rdi, .LC11[rip]
	call	puts@PLT
	jmp	.L10
.L22:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L10:
	lea	rdi, lock[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, .LC12[rip]
	call	puts@PLT
.L6:
	mov	eax, DWORD PTR time_limit[rip]
	cmp	eax, 1
	jne	.L23
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	ThreadOne, .-ThreadOne
	.section	.rodata
	.align 8
.LC13:
	.string	"Thread 2 is waiting for the queue to fill..."
	.align 8
.LC14:
	.string	"Thread 2 is done waiting for the queue to fill!!"
	.align 8
.LC15:
	.string	"Thread 2 saw a valid job_queue!!"
.LC16:
	.string	"Thread 2 woke up!!"
.LC17:
	.string	"Thread 2 pass %d:\n"
	.align 8
.LC18:
	.string	"Thread 2 is sleeping for\t\t%d milliseconds!! (1)\n"
.LC19:
	.string	"Thread 2 just locked!!!"
.LC20:
	.string	"Thread 2 just unlocked!"
	.align 8
.LC21:
	.string	"Thread 2 is sleeping for\t\t%d milliseconds!! (2)\n"
	.align 8
.LC22:
	.string	"Thread 2 just added the first node to the temp_queue!!"
	.align 8
.LC23:
	.string	"Thread 2 just added a node to the bottom of the temp_queue!!"
	.align 8
.LC24:
	.string	"Thread 2 just added a node to the top of the temp_queue!!"
	.align 8
.LC25:
	.string	"Thread 2 just added a node to the middle of the temp_queue!!"
.LC26:
	.string	"Thread 2 just unlocked (1)!"
	.align 8
.LC27:
	.string	"Thread 2 is sleeping for\t\t%d milliseconds!! (3)\n"
	.align 8
.LC28:
	.string	"Thread 2 just processed the last node in temp_queue!!"
	.align 8
.LC29:
	.string	"Thread 2 just processed the top node in temp_queue!!"
	.align 8
.LC30:
	.string	"Thread 2 just processed the bottom node in temp_queue!!"
	.align 8
.LC31:
	.string	"Thread 2 just processed a middle node in temp_queue!!"
.LC32:
	.string	"Thread 2 just unlocked! (2)"
	.align 8
.LC33:
	.string	"Thread 2 is sleeping for\t\t%d milliseconds!! (4)\n"
	.text
	.globl	ThreadTwo
	.type	ThreadTwo, @function
ThreadTwo:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -16[rbp], 0
	mov	QWORD PTR -8[rbp], 0
	mov	DWORD PTR -24[rbp], 0
	lea	rdi, .LC13[rip]
	call	puts@PLT
	jmp	.L26
.L27:
	mov	edi, 50
	call	usleep@PLT
.L26:
	mov	rax, QWORD PTR job_queue[rip]
	test	rax, rax
	je	.L27
	lea	rdi, .LC14[rip]
	call	puts@PLT
	lea	rdi, .LC15[rip]
	call	puts@PLT
	jmp	.L28
.L75:
	mov	edi, 500000
	call	usleep@PLT
	lea	rdi, .LC16[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -24[rbp], 1
	movzx	eax, BYTE PTR SCAN[rip]
	test	al, al
	je	.L29
	mov	DWORD PTR -32[rbp], 1
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L30
.L35:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	sub	eax, DWORD PTR -32[rbp]
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -20[rbp]
	imul	eax, eax, 1000
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	usleep@PLT
	mov	eax, DWORD PTR counter[rip]
	add	eax, 1
	mov	DWORD PTR counter[rip], eax
	lea	rdi, lock[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, .LC19[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L31
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	jmp	.L32
.L31:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L33
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	mov	QWORD PTR -16[rbp], 0
	jmp	.L32
.L33:
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
.L32:
	lea	rdi, lock[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, .LC20[rip]
	call	puts@PLT
.L30:
	cmp	QWORD PTR -16[rbp], 0
	je	.L34
	mov	eax, DWORD PTR time_limit[rip]
	cmp	eax, 1
	jne	.L35
.L34:
	mov	DWORD PTR -32[rbp], 1000
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L36
.L40:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -32[rbp]
	sub	eax, edx
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC21[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -20[rbp]
	imul	eax, eax, 1000
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	usleep@PLT
	mov	eax, DWORD PTR counter[rip]
	add	eax, 1
	mov	DWORD PTR counter[rip], eax
	lea	rdi, lock[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, .LC19[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L37
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	QWORD PTR -16[rbp], 0
	jmp	.L38
.L37:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L39
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L38
.L39:
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
.L38:
	lea	rdi, lock[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, .LC20[rip]
	call	puts@PLT
.L36:
	cmp	QWORD PTR -16[rbp], 0
	je	.L28
	mov	eax, DWORD PTR time_limit[rip]
	cmp	eax, 1
	jne	.L40
	jmp	.L28
.L29:
	movzx	eax, BYTE PTR NStep[rip]
	test	al, al
	je	.L28
	mov	rax, QWORD PTR job_queue[rip]
	mov	eax, DWORD PTR 24[rax]
	cmp	eax, 15
	jle	.L28
	mov	eax, DWORD PTR time_limit[rip]
	cmp	eax, 1
	je	.L28
	lea	rdi, lock[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, .LC19[rip]
	call	puts@PLT
	mov	DWORD PTR -28[rbp], 0
	jmp	.L41
.L51:
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
	cmp	DWORD PTR -28[rbp], 0
	jne	.L42
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	add	edx, 1
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	lea	rdi, .LC22[rip]
	call	puts@PLT
	jmp	.L43
.L42:
	mov	rdx, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR [rdx]
	mov	QWORD PTR 16[rax], rdx
	jmp	.L44
.L49:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jge	.L45
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	je	.L46
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR 16[rdx]
	mov	QWORD PTR 16[rax], rdx
	jmp	.L44
.L46:
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	add	edx, 1
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	lea	rdi, .LC23[rip]
	call	puts@PLT
	jmp	.L47
.L45:
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L48
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	add	edx, 1
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	lea	rdi, .LC24[rip]
	call	puts@PLT
	jmp	.L47
.L48:
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	add	edx, 1
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	lea	rdi, .LC25[rip]
	call	puts@PLT
	jmp	.L47
.L44:
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L49
.L47:
	mov	rdx, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR [rdx]
	mov	QWORD PTR 16[rax], rdx
.L43:
	add	DWORD PTR -28[rbp], 1
.L41:
	mov	eax, DWORD PTR N[rip]
	cmp	DWORD PTR -28[rbp], eax
	jge	.L50
	mov	eax, DWORD PTR time_limit[rip]
	cmp	eax, 1
	jne	.L51
.L50:
	lea	rdi, lock[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, .LC26[rip]
	call	puts@PLT
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -32[rbp], 1
	jmp	.L52
.L57:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	sub	eax, DWORD PTR -32[rbp]
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC27[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -20[rbp]
	imul	eax, eax, 1000
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	usleep@PLT
	mov	eax, DWORD PTR counter[rip]
	add	eax, 1
	mov	DWORD PTR counter[rip], eax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L53
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L53
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR temp_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	QWORD PTR 8[rax], 0
	mov	QWORD PTR -16[rbp], 0
	lea	rdi, .LC28[rip]
	call	puts@PLT
	jmp	.L52
.L53:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L54
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR temp_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	mov	QWORD PTR -16[rbp], 0
	lea	rdi, .LC29[rip]
	call	puts@PLT
	jmp	.L52
.L54:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L55
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR temp_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	lea	rdi, .LC30[rip]
	call	puts@PLT
	jmp	.L52
.L55:
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR temp_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	lea	rdi, .LC31[rip]
	call	puts@PLT
.L52:
	cmp	QWORD PTR -16[rbp], 0
	je	.L56
	mov	eax, DWORD PTR time_limit[rip]
	cmp	eax, 1
	je	.L56
	mov	rax, QWORD PTR temp_queue[rip]
	mov	eax, DWORD PTR 24[rax]
	test	eax, eax
	jg	.L57
.L56:
	lea	rdi, .LC13[rip]
	call	puts@PLT
	jmp	.L58
.L59:
	mov	edi, 50
	call	usleep@PLT
.L58:
	mov	rax, QWORD PTR job_queue[rip]
	mov	eax, DWORD PTR 24[rax]
	cmp	eax, 15
	jle	.L59
	lea	rdi, .LC14[rip]
	call	puts@PLT
	lea	rdi, lock[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, .LC19[rip]
	call	puts@PLT
	mov	DWORD PTR -28[rbp], 0
	jmp	.L60
.L69:
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
	cmp	DWORD PTR -28[rbp], 0
	jne	.L61
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	add	edx, 1
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	lea	rdi, .LC22[rip]
	call	puts@PLT
	jmp	.L62
.L61:
	mov	rdx, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR [rdx]
	mov	QWORD PTR 16[rax], rdx
	jmp	.L63
.L67:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jge	.L64
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	je	.L65
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR 16[rdx]
	mov	QWORD PTR 16[rax], rdx
	jmp	.L63
.L65:
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	add	edx, 1
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	lea	rdi, .LC23[rip]
	call	puts@PLT
	jmp	.L62
.L64:
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L66
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	add	edx, 1
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	lea	rdi, .LC24[rip]
	call	puts@PLT
	jmp	.L62
.L66:
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	add	edx, 1
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR job_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	lea	rdi, .LC25[rip]
	call	puts@PLT
	jmp	.L62
.L63:
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	je	.L62
	mov	eax, DWORD PTR time_limit[rip]
	cmp	eax, 1
	jne	.L67
.L62:
	add	DWORD PTR -28[rbp], 1
.L60:
	mov	eax, DWORD PTR N[rip]
	cmp	DWORD PTR -28[rbp], eax
	jge	.L68
	mov	eax, DWORD PTR time_limit[rip]
	cmp	eax, 1
	jne	.L69
.L68:
	lea	rdi, lock[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, .LC32[rip]
	call	puts@PLT
	mov	DWORD PTR -32[rbp], 1000
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L70
.L74:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -32[rbp]
	sub	eax, edx
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC33[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -20[rbp]
	imul	eax, eax, 1000
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	usleep@PLT
	mov	eax, DWORD PTR counter[rip]
	add	eax, 1
	mov	DWORD PTR counter[rip], eax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L71
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L71
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR temp_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	QWORD PTR 8[rax], 0
	mov	QWORD PTR -16[rbp], 0
	lea	rdi, .LC28[rip]
	call	puts@PLT
	jmp	.L70
.L71:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L72
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR temp_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	QWORD PTR -16[rbp], 0
	lea	rdi, .LC30[rip]
	call	puts@PLT
	jmp	.L70
.L72:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L73
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR temp_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	lea	rdi, .LC29[rip]
	call	puts@PLT
	jmp	.L70
.L73:
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR temp_queue[rip]
	mov	edx, DWORD PTR 24[rax]
	sub	edx, 1
	mov	DWORD PTR 24[rax], edx
	lea	rdi, .LC31[rip]
	call	puts@PLT
.L70:
	cmp	QWORD PTR -16[rbp], 0
	je	.L28
	mov	eax, DWORD PTR time_limit[rip]
	cmp	eax, 1
	je	.L28
	mov	rax, QWORD PTR temp_queue[rip]
	mov	eax, DWORD PTR 24[rax]
	test	eax, eax
	jg	.L74
.L28:
	mov	eax, DWORD PTR time_limit[rip]
	cmp	eax, 1
	jne	.L75
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	ThreadTwo, .-ThreadTwo
	.section	.rodata
	.align 8
.LC34:
	.string	"You didn't enter any args. This program requires exactly (1) arg."
	.align 8
.LC35:
	.string	"You entered an invalid selection. Please enter either '%s' or '%s'.\n"
	.align 8
.LC36:
	.string	"You entered %d args. This program requires exactly (1) arg.\n"
	.align 8
.LC37:
	.string	"This program will run for %d seconds (that's %d minute(s), just fyi).\n"
.LC38:
	.string	"\n ERROR creating thread 1!!"
.LC39:
	.string	"\n ERROR creating thread 2!!"
.LC40:
	.string	"\n ERROR joining thread 1!!"
.LC41:
	.string	"\n ERROR joining thread 2!!"
	.align 8
.LC42:
	.string	"\n\nTime limit expired!! Posting results..."
	.align 8
.LC43:
	.string	"\nN-STEP-SCAN:\t%d drive requests serviced.\n"
	.align 8
.LC44:
	.string	"\nSCAN:\t%d drive requests serviced.\n"
	.align 8
.LC45:
	.string	"Freeing all allocated memory..."
.LC46:
	.string	"Memory freed!! Exiting..."
	.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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -38[rbp]
	mov	DWORD PTR [rax], 1312899923
	mov	BYTE PTR 4[rax], 0
	lea	rax, -23[rbp]
	movabs	rcx, 5993534937797700942
	mov	QWORD PTR [rax], rcx
	mov	DWORD PTR 8[rax], 5128515
	cmp	DWORD PTR -68[rbp], 1
	jne	.L78
	lea	rdi, .LC34[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L78:
	cmp	DWORD PTR -68[rbp], 2
	jne	.L79
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -38[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L80
	mov	BYTE PTR SCAN[rip], 1
	jmp	.L81
.L80:
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -23[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L82
	mov	BYTE PTR NStep[rip], 1
	jmp	.L81
.L82:
	lea	rdx, -23[rbp]
	lea	rax, -38[rbp]
	mov	rsi, rax
	lea	rdi, .LC35[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L79:
	mov	eax, DWORD PTR -68[rbp]
	mov	esi, eax
	lea	rdi, .LC36[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L81:
	mov	DWORD PTR -60[rbp], 300
	mov	eax, DWORD PTR -60[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, -2004318071
	shr	rdx, 32
	add	edx, eax
	sar	edx, 5
	sar	eax, 31
	sub	edx, eax
	mov	eax, DWORD PTR -60[rbp]
	mov	esi, eax
	lea	rdi, .LC37[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, handle_alarm[rip]
	mov	edi, 14
	call	signal@PLT
	mov	eax, DWORD PTR -60[rbp]
	mov	edi, eax
	call	alarm@PLT
	lea	rax, -56[rbp]
	mov	ecx, 0
	lea	rdx, ThreadOne[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L83
	lea	rdi, .LC38[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L83:
	lea	rax, -48[rbp]
	mov	ecx, 0
	lea	rdx, ThreadTwo[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L84
	lea	rdi, .LC39[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L84:
	mov	DWORD PTR -64[rbp], 1
	jmp	.L85
.L86:
	lea	rax, -64[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	wait@PLT
.L85:
	mov	eax, DWORD PTR time_limit[rip]
	cmp	eax, 1
	jne	.L86
	mov	rax, QWORD PTR -56[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	test	eax, eax
	je	.L87
	lea	rdi, .LC40[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L87:
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	test	eax, eax
	je	.L88
	lea	rdi, .LC41[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L88:
	lea	rdi, .LC42[rip]
	call	puts@PLT
	movzx	eax, BYTE PTR NStep[rip]
	test	al, al
	je	.L89
	mov	eax, DWORD PTR counter[rip]
	mov	esi, eax
	lea	rdi, .LC43[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L90
.L89:
	movzx	eax, BYTE PTR SCAN[rip]
	test	al, al
	je	.L90
	mov	eax, DWORD PTR counter[rip]
	mov	esi, eax
	lea	rdi, .LC44[rip]
	mov	eax, 0
	call	printf@PLT
.L90:
	lea	rdi, .LC45[rip]
	call	puts@PLT
	jmp	.L91
.L94:
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L92
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	free@PLT
	jmp	.L93
.L92:
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	free@PLT
.L91:
	mov	rax, QWORD PTR job_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L94
.L93:
	movzx	eax, BYTE PTR NStep[rip]
	test	al, al
	je	.L95
	jmp	.L96
.L98:
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L97
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	free@PLT
	jmp	.L95
.L97:
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	free@PLT
.L96:
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L98
.L95:
	mov	rax, QWORD PTR job_queue[rip]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR temp_queue[rip]
	mov	rdi, rax
	call	free@PLT
	lea	rdi, lock[rip]
	call	pthread_mutex_destroy@PLT
	lea	rdi, .LC46[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L100
	call	__stack_chk_fail@PLT
.L100:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.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	"741547.c"
	.text
	.global	job_queue
	.bss
	.align	2
	.type	job_queue, %object
	.size	job_queue, 4
job_queue:
	.space	4
	.global	q_temp
	.align	2
	.type	q_temp, %object
	.size	q_temp, 4
q_temp:
	.space	4
	.global	temp_queue
	.align	2
	.type	temp_queue, %object
	.size	temp_queue, 4
temp_queue:
	.space	4
	.global	temp
	.align	2
	.type	temp, %object
	.size	temp, 4
temp:
	.space	4
	.global	time_limit
	.align	2
	.type	time_limit, %object
	.size	time_limit, 4
time_limit:
	.space	4
	.global	counter
	.align	2
	.type	counter, %object
	.size	counter, 4
counter:
	.space	4
	.global	NStep
	.type	NStep, %object
	.size	NStep, 1
NStep:
	.space	1
	.global	SCAN
	.type	SCAN, %object
	.size	SCAN, 1
SCAN:
	.space	1
	.global	N
	.data
	.align	2
	.type	N, %object
	.size	N, 4
N:
	.word	15
	.text
	.align	2
	.global	handle_alarm
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_alarm, %function
handle_alarm:
	@ 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, .L2
	mov	r2, #1
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L3:
	.align	2
.L2:
	.word	time_limit
	.size	handle_alarm, .-handle_alarm
	.global	lock
	.bss
	.align	2
	.type	lock, %object
	.size	lock, 24
lock:
	.space	24
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Memory allocation failed for the job_queue!!\000"
	.align	2
.LC1:
	.ascii	"Thread 1 setup the job_queue!!\000"
	.align	2
.LC2:
	.ascii	"Memory allocation failed for the temp_queue!!\000"
	.align	2
.LC3:
	.ascii	"Thread 1 setup the temp_queue!!\000"
	.align	2
.LC4:
	.ascii	"Thread 1 just locked!!!\000"
	.align	2
.LC5:
	.ascii	"Thread 1, pass %d:\012\000"
	.align	2
.LC6:
	.ascii	"Thread one created the first node!!\000"
	.align	2
.LC7:
	.ascii	"Memory allocation failed for a node!!\000"
	.align	2
.LC8:
	.ascii	"Thread one created an additional node (1)!!\000"
	.align	2
.LC9:
	.ascii	"Thread one created an additional node (2)!!\000"
	.align	2
.LC10:
	.ascii	"Thread one created an additional node (3)!!\000"
	.align	2
.LC11:
	.ascii	"Thread one created an additional node (4)!!\000"
	.align	2
.LC12:
	.ascii	"Thread 1 just unlocked!\000"
	.text
	.align	2
	.global	ThreadOne
	.syntax unified
	.arm
	.fpu softvfp
	.type	ThreadOne, %function
ThreadOne:
	@ 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, .L27
	bl	srand
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L27+4
	str	r2, [r3]
	ldr	r3, .L27+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L5
	ldr	r0, .L27+8
	bl	puts
	mov	r0, #0
	bl	exit
.L5:
	ldr	r3, .L27+4
	ldr	r3, [r3]
	ldr	r2, .L27+12
	str	r3, [r2]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #12]
	ldr	r0, .L27+16
	bl	puts
	ldr	r3, .L27+20
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L6
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L27+4
	str	r2, [r3]
	ldr	r3, .L27+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L7
	ldr	r0, .L27+24
	bl	puts
	mov	r0, #0
	bl	exit
.L7:
	ldr	r3, .L27+4
	ldr	r3, [r3]
	ldr	r2, .L27+28
	str	r3, [r2]
	ldr	r3, .L27+28
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L27+28
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L27+28
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L27+28
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #12]
	ldr	r0, .L27+32
	bl	puts
.L6:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L8
.L25:
	ldr	r0, .L27+36
	bl	usleep
	ldr	r0, .L27+40
	bl	pthread_mutex_lock
	ldr	r0, .L27+44
	bl	puts
	ldr	r3, .L27+48
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L9
	bl	rand
	mov	r1, r0
	ldr	r3, .L27+52
	smull	r2, r3, r1, r3
	asr	r2, r3, #6
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	sub	r2, r1, r3
	add	r3, r2, #1
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, .L27+56
	bl	printf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L10
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L27+60
	str	r2, [r3]
	ldr	r3, .L27+60
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L11
	ldr	r3, .L27+60
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, .L27+60
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L27+60
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, .L27+60
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, .L27+60
	ldr	r2, [r2]
	str	r2, [r3, #4]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, .L27+60
	ldr	r2, [r2]
	str	r2, [r3, #8]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	add	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r0, .L27+64
	bl	puts
	b	.L12
.L11:
	ldr	r0, .L27+68
	bl	puts
	mov	r0, #0
	bl	exit
.L10:
	ldr	r3, .L27+12
	ldr	r2, [r3]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, [r2]
	str	r2, [r3, #8]
	b	.L13
.L21:
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bge	.L14
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	beq	.L15
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, [r3, #8]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, [r2, #8]
	str	r2, [r3, #8]
	b	.L13
.L15:
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L27+60
	str	r2, [r3]
	ldr	r3, .L27+60
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L16
	ldr	r3, .L27+60
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, .L27+12
	ldr	r2, [r3]
	ldr	r3, .L27+60
	ldr	r3, [r3]
	ldr	r2, [r2, #8]
	str	r2, [r3, #4]
	ldr	r3, .L27+60
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r2, .L27+60
	ldr	r2, [r2]
	str	r2, [r3, #8]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, .L27+60
	ldr	r2, [r2]
	str	r2, [r3, #4]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	add	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r0, .L27+72
	bl	puts
	b	.L17
.L16:
	ldr	r0, .L27+68
	bl	puts
	mov	r0, #0
	bl	exit
.L14:
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L18
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L27+60
	str	r2, [r3]
	ldr	r3, .L27+60
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L19
	ldr	r3, .L27+60
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, .L27+60
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L27+12
	ldr	r2, [r3]
	ldr	r3, .L27+60
	ldr	r3, [r3]
	ldr	r2, [r2, #8]
	str	r2, [r3, #8]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r2, .L27+60
	ldr	r2, [r2]
	str	r2, [r3, #4]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, .L27+60
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	add	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r0, .L27+76
	bl	puts
	b	.L17
.L19:
	ldr	r0, .L27+68
	bl	puts
	mov	r0, #0
	bl	exit
.L18:
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L27+60
	str	r2, [r3]
	ldr	r3, .L27+60
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L20
	ldr	r3, .L27+60
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, [r3, #8]
	ldr	r3, .L27+60
	ldr	r3, [r3]
	ldr	r2, [r2, #4]
	str	r2, [r3, #4]
	ldr	r3, .L27+12
	ldr	r2, [r3]
	ldr	r3, .L27+60
	ldr	r3, [r3]
	ldr	r2, [r2, #8]
	str	r2, [r3, #8]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r3, [r3, #4]
	ldr	r2, .L27+60
	ldr	r2, [r2]
	str	r2, [r3, #8]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r2, .L27+60
	ldr	r2, [r2]
	str	r2, [r3, #4]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	add	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r0, .L27+80
	bl	puts
	b	.L17
.L20:
	ldr	r0, .L27+68
	bl	puts
	mov	r0, #0
	bl	exit
.L13:
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L21
.L17:
	ldr	r3, .L27+12
	ldr	r2, [r3]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, [r2]
	str	r2, [r3, #8]
	b	.L12
.L9:
	ldr	r3, .L27+20
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L12
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L22
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L27+60
	str	r2, [r3]
	ldr	r3, .L27+60
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L23
	bl	rand
	mov	r1, r0
	ldr	r3, .L27+52
	smull	r2, r3, r1, r3
	asr	r2, r3, #6
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	sub	r2, r1, r3
	ldr	r3, .L27+60
	ldr	r3, [r3]
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r3, .L27+60
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L27+60
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, .L27+60
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, .L27+60
	ldr	r2, [r2]
	str	r2, [r3, #4]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, .L27+60
	ldr	r2, [r2]
	str	r2, [r3, #8]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	add	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r0, .L27+64
	bl	puts
	b	.L12
.L23:
	ldr	r0, .L27+68
	bl	puts
	mov	r0, #0
	bl	exit
.L22:
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L27+60
	str	r2, [r3]
	ldr	r3, .L27+60
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L24
	bl	rand
	mov	r1, r0
	ldr	r3, .L27+52
	smull	r2, r3, r1, r3
	asr	r2, r3, #6
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	sub	r2, r1, r3
	ldr	r3, .L27+60
	ldr	r3, [r3]
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r3, .L27+60
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L27+12
	ldr	r2, [r3]
	ldr	r3, .L27+60
	ldr	r3, [r3]
	ldr	r2, [r2, #8]
	str	r2, [r3, #8]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r2, .L27+60
	ldr	r2, [r2]
	str	r2, [r3, #4]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, .L27+60
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, .L27+60
	ldr	r2, [r2]
	str	r2, [r3, #8]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	add	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r0, .L27+84
	bl	puts
	b	.L12
.L24:
	ldr	r0, .L27+68
	bl	puts
	mov	r0, #0
	bl	exit
.L12:
	ldr	r0, .L27+40
	bl	pthread_mutex_unlock
	ldr	r0, .L27+88
	bl	puts
.L8:
	ldr	r3, .L27+92
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L25
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	1492
	.word	q_temp
	.word	.LC0
	.word	job_queue
	.word	.LC1
	.word	NStep
	.word	.LC2
	.word	temp_queue
	.word	.LC3
	.word	100000
	.word	lock
	.word	.LC4
	.word	SCAN
	.word	274877907
	.word	.LC5
	.word	temp
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	time_limit
	.size	ThreadOne, .-ThreadOne
	.section	.rodata
	.align	2
.LC13:
	.ascii	"Thread 2 is waiting for the queue to fill...\000"
	.align	2
.LC14:
	.ascii	"Thread 2 is done waiting for the queue to fill!!\000"
	.align	2
.LC15:
	.ascii	"Thread 2 saw a valid job_queue!!\000"
	.align	2
.LC16:
	.ascii	"Thread 2 woke up!!\000"
	.align	2
.LC17:
	.ascii	"Thread 2 pass %d:\012\000"
	.align	2
.LC18:
	.ascii	"Thread 2 is sleeping for\011\011%d milliseconds!! ("
	.ascii	"1)\012\000"
	.align	2
.LC19:
	.ascii	"Thread 2 just locked!!!\000"
	.align	2
.LC20:
	.ascii	"Thread 2 just unlocked!\000"
	.align	2
.LC21:
	.ascii	"Thread 2 is sleeping for\011\011%d milliseconds!! ("
	.ascii	"2)\012\000"
	.align	2
.LC22:
	.ascii	"Thread 2 just added the first node to the temp_queu"
	.ascii	"e!!\000"
	.align	2
.LC23:
	.ascii	"Thread 2 just added a node to the bottom of the tem"
	.ascii	"p_queue!!\000"
	.align	2
.LC24:
	.ascii	"Thread 2 just added a node to the top of the temp_q"
	.ascii	"ueue!!\000"
	.align	2
.LC25:
	.ascii	"Thread 2 just added a node to the middle of the tem"
	.ascii	"p_queue!!\000"
	.align	2
.LC26:
	.ascii	"Thread 2 just unlocked (1)!\000"
	.align	2
.LC27:
	.ascii	"Thread 2 is sleeping for\011\011%d milliseconds!! ("
	.ascii	"3)\012\000"
	.align	2
.LC28:
	.ascii	"Thread 2 just processed the last node in temp_queue"
	.ascii	"!!\000"
	.align	2
.LC29:
	.ascii	"Thread 2 just processed the top node in temp_queue!"
	.ascii	"!\000"
	.align	2
.LC30:
	.ascii	"Thread 2 just processed the bottom node in temp_que"
	.ascii	"ue!!\000"
	.align	2
.LC31:
	.ascii	"Thread 2 just processed a middle node in temp_queue"
	.ascii	"!!\000"
	.align	2
.LC32:
	.ascii	"Thread 2 just unlocked! (2)\000"
	.align	2
.LC33:
	.ascii	"Thread 2 is sleeping for\011\011%d milliseconds!! ("
	.ascii	"4)\012\000"
	.text
	.align	2
	.global	ThreadTwo
	.syntax unified
	.arm
	.fpu softvfp
	.type	ThreadTwo, %function
ThreadTwo:
	@ args = 0, 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, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r0, .L81
	bl	puts
	b	.L30
.L31:
	mov	r0, #50
	bl	usleep
.L30:
	ldr	r3, .L81+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L31
	ldr	r0, .L81+8
	bl	puts
	ldr	r0, .L81+12
	bl	puts
	b	.L32
.L79:
	ldr	r0, .L81+16
	bl	usleep
	ldr	r0, .L81+20
	bl	puts
	ldr	r1, [fp, #-16]
	ldr	r0, .L81+24
	bl	printf
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, .L81+28
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L33
	mov	r3, #1
	str	r3, [fp, #-24]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-28]
	b	.L34
.L39:
	ldr	r3, [fp, #-28]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	sub	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L81+32
	bl	printf
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	bl	usleep
	ldr	r3, .L81+92
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L81+92
	str	r3, [r2]
	ldr	r0, .L81+36
	bl	pthread_mutex_lock
	ldr	r0, .L81+40
	bl	puts
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L35
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	free
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #4]
	b	.L36
.L35:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L37
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	free
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L36
.L37:
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	str	r2, [r3, #8]
	ldr	r0, [fp, #-12]
	bl	free
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
.L36:
	ldr	r0, .L81+36
	bl	pthread_mutex_unlock
	ldr	r0, .L81+44
	bl	puts
.L34:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L38
	ldr	r3, .L81+116
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L39
.L38:
	mov	r3, #1000
	str	r3, [fp, #-24]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r3, [r3]
	str	r3, [fp, #-28]
	b	.L40
.L44:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	sub	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L81+48
	bl	printf
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	bl	usleep
	ldr	r3, .L81+92
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L81+92
	str	r3, [r2]
	ldr	r0, .L81+36
	bl	pthread_mutex_lock
	ldr	r0, .L81+40
	bl	puts
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L41
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	free
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #4]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L42
.L41:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L43
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	free
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3]
	b	.L42
.L43:
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-12]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r0, [fp, #-12]
	bl	free
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
.L42:
	ldr	r0, .L81+36
	bl	pthread_mutex_unlock
	ldr	r0, .L81+44
	bl	puts
.L40:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L32
	ldr	r3, .L81+116
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L44
	b	.L32
.L33:
	ldr	r3, .L81+52
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L32
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r3, [r3, #12]
	cmp	r3, #15
	ble	.L32
	ldr	r3, .L81+116
	ldr	r3, [r3]
	cmp	r3, #1
	beq	.L32
	ldr	r0, .L81+36
	bl	pthread_mutex_lock
	ldr	r0, .L81+40
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L45
.L55:
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L46
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r2, #4]
	str	r2, [r3, #4]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	add	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r0, .L81+56
	bl	puts
	b	.L47
.L46:
	ldr	r3, .L81+112
	ldr	r2, [r3]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r2]
	str	r2, [r3, #8]
	b	.L48
.L53:
	ldr	r3, [fp, #-28]
	ldr	r2, [r3]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L49
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	beq	.L50
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r2, #8]
	str	r2, [r3, #8]
	b	.L48
.L50:
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r2, #4]
	str	r2, [r3, #4]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	add	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r0, .L81+60
	bl	puts
	b	.L51
.L49:
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L52
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r2, #4]
	str	r2, [r3, #4]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	add	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r0, .L81+64
	bl	puts
	b	.L51
.L52:
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r2, #4]
	str	r2, [r3, #4]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	add	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r0, .L81+68
	bl	puts
	b	.L51
.L48:
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L53
.L51:
	ldr	r3, .L81+112
	ldr	r2, [r3]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r2]
	str	r2, [r3, #8]
.L47:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L45:
	ldr	r3, .L81+72
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bge	.L54
	ldr	r3, .L81+116
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L55
.L54:
	ldr	r0, .L81+36
	bl	pthread_mutex_unlock
	ldr	r0, .L81+76
	bl	puts
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-28]
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L56
.L61:
	ldr	r3, [fp, #-28]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	sub	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L81+80
	bl	printf
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	bl	usleep
	ldr	r3, .L81+92
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L81+92
	str	r3, [r2]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L57
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L57
	ldr	r0, [fp, #-28]
	bl	free
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #4]
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r0, .L81+96
	bl	puts
	b	.L56
.L57:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L58
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	free
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r0, .L81+104
	bl	puts
	b	.L56
.L58:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L59
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	free
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r0, .L81+100
	bl	puts
	b	.L56
.L59:
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	str	r2, [r3, #8]
	ldr	r0, [fp, #-12]
	bl	free
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r0, .L81+108
	bl	puts
.L56:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L60
	ldr	r3, .L81+116
	ldr	r3, [r3]
	cmp	r3, #1
	beq	.L60
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #12]
	cmp	r3, #0
	bgt	.L61
.L60:
	ldr	r0, .L81
	bl	puts
	b	.L62
.L63:
	mov	r0, #50
	bl	usleep
.L62:
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r3, [r3, #12]
	cmp	r3, #15
	ble	.L63
	ldr	r0, .L81+8
	bl	puts
	ldr	r0, .L81+36
	bl	pthread_mutex_lock
	ldr	r0, .L81+40
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L64
.L73:
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L65
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r2, #4]
	str	r2, [r3, #4]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	add	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r0, .L81+56
	bl	puts
	b	.L66
.L65:
	ldr	r3, .L81+112
	ldr	r2, [r3]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r2]
	str	r2, [r3, #8]
	b	.L67
.L71:
	ldr	r3, [fp, #-28]
	ldr	r2, [r3]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L68
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	beq	.L69
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r2, #8]
	str	r2, [r3, #8]
	b	.L67
.L69:
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r2, #4]
	str	r2, [r3, #4]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	add	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r0, .L81+60
	bl	puts
	b	.L66
.L68:
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L70
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r2, #4]
	str	r2, [r3, #4]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	add	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r0, .L81+64
	bl	puts
	b	.L66
.L70:
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r2, #4]
	str	r2, [r3, #4]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	add	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, .L81+4
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r0, .L81+68
	bl	puts
	b	.L66
.L67:
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	beq	.L66
	ldr	r3, .L81+116
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L71
.L66:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L64:
	ldr	r3, .L81+72
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bge	.L72
	ldr	r3, .L81+116
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L73
.L72:
	ldr	r0, .L81+36
	bl	pthread_mutex_unlock
	ldr	r0, .L81+84
	bl	puts
	mov	r3, #1000
	str	r3, [fp, #-24]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3]
	str	r3, [fp, #-28]
	b	.L74
.L82:
	.align	2
.L81:
	.word	.LC13
	.word	job_queue
	.word	.LC14
	.word	.LC15
	.word	500000
	.word	.LC16
	.word	.LC17
	.word	SCAN
	.word	.LC18
	.word	lock
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	NStep
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	N
	.word	.LC26
	.word	.LC27
	.word	.LC32
	.word	.LC33
	.word	counter
	.word	.LC28
	.word	.LC30
	.word	.LC29
	.word	.LC31
	.word	temp_queue
	.word	time_limit
.L78:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	sub	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L81+88
	bl	printf
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	bl	usleep
	ldr	r3, .L81+92
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L81+92
	str	r3, [r2]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L75
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L75
	ldr	r0, [fp, #-28]
	bl	free
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #4]
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r0, .L81+96
	bl	puts
	b	.L74
.L75:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L76
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	free
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #4]
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r0, .L81+100
	bl	puts
	b	.L74
.L76:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L77
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	free
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	str	r2, [r3]
	ldr	r0, .L81+104
	bl	puts
	b	.L74
.L77:
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-12]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r0, [fp, #-12]
	bl	free
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	sub	r2, r2, #1
	str	r2, [r3, #12]
	ldr	r0, .L81+108
	bl	puts
.L74:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L32
	ldr	r3, .L81+116
	ldr	r3, [r3]
	cmp	r3, #1
	beq	.L32
	ldr	r3, .L81+112
	ldr	r3, [r3]
	ldr	r3, [r3, #12]
	cmp	r3, #0
	bgt	.L78
.L32:
	ldr	r3, .L81+116
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L79
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	ThreadTwo, .-ThreadTwo
	.section	.rodata
	.align	2
.LC34:
	.ascii	"SCAN\000"
	.align	2
.LC35:
	.ascii	"N-STEP-SCAN\000"
	.align	2
.LC36:
	.ascii	"You didn't enter any args. This program requires ex"
	.ascii	"actly (1) arg.\000"
	.align	2
.LC37:
	.ascii	"You entered an invalid selection. Please enter eith"
	.ascii	"er '%s' or '%s'.\012\000"
	.align	2
.LC38:
	.ascii	"You entered %d args. This program requires exactly "
	.ascii	"(1) arg.\012\000"
	.align	2
.LC39:
	.ascii	"This program will run for %d seconds (that's %d min"
	.ascii	"ute(s), just fyi).\012\000"
	.align	2
.LC40:
	.ascii	"\012 ERROR creating thread 1!!\000"
	.align	2
.LC41:
	.ascii	"\012 ERROR creating thread 2!!\000"
	.align	2
.LC42:
	.ascii	"\012 ERROR joining thread 1!!\000"
	.align	2
.LC43:
	.ascii	"\012 ERROR joining thread 2!!\000"
	.align	2
.LC44:
	.ascii	"\012\012Time limit expired!! Posting results...\000"
	.align	2
.LC45:
	.ascii	"\012N-STEP-SCAN:\011%d drive requests serviced.\012"
	.ascii	"\000"
	.align	2
.LC46:
	.ascii	"\012SCAN:\011%d drive requests serviced.\012\000"
	.align	2
.LC47:
	.ascii	"Freeing all allocated memory...\000"
	.align	2
.LC48:
	.ascii	"Memory freed!! Exiting...\000"
	.align	2
.LC49:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L107
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #40
	ldr	r2, .L107+4
	ldm	r2, {r0, r1}
	str	r0, [r3]
	add	r3, r3, #4
	strb	r1, [r3]
	sub	r3, fp, #24
	ldr	r2, .L107+8
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	ldr	r3, [fp, #-64]
	cmp	r3, #1
	bne	.L84
	ldr	r0, .L107+12
	bl	puts
	mov	r0, #0
	bl	exit
.L84:
	ldr	r3, [fp, #-64]
	cmp	r3, #2
	bne	.L85
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #40
	mov	r1, r2
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L86
	ldr	r3, .L107+16
	mov	r2, #1
	strb	r2, [r3]
	b	.L87
.L86:
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #24
	mov	r1, r2
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L88
	ldr	r3, .L107+20
	mov	r2, #1
	strb	r2, [r3]
	b	.L87
.L88:
	sub	r2, fp, #24
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, .L107+24
	bl	printf
	mov	r0, #0
	bl	exit
.L85:
	ldr	r1, [fp, #-64]
	ldr	r0, .L107+28
	bl	printf
	mov	r0, #0
	bl	exit
.L87:
	mov	r3, #300
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	ldr	r2, .L107+32
	smull	r1, r2, r3, r2
	add	r2, r2, r3
	asr	r2, r2, #5
	asr	r3, r3, #31
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r1, [fp, #-44]
	ldr	r0, .L107+36
	bl	printf
	ldr	r1, .L107+40
	mov	r0, #14
	bl	signal
	ldr	r3, [fp, #-44]
	mov	r0, r3
	bl	alarm
	sub	r0, fp, #56
	mov	r3, #0
	ldr	r2, .L107+44
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L89
	ldr	r0, .L107+48
	bl	puts
	mov	r0, #0
	bl	exit
.L89:
	sub	r0, fp, #52
	mov	r3, #0
	ldr	r2, .L107+52
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L90
	ldr	r0, .L107+56
	bl	puts
	mov	r0, #0
	bl	exit
.L90:
	mov	r3, #1
	str	r3, [fp, #-48]
	b	.L91
.L92:
	sub	r3, fp, #48
	mov	r0, r3
	bl	wait
.L91:
	ldr	r3, .L107+60
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L92
	ldr	r3, [fp, #-56]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, r0
	cmp	r3, #0
	beq	.L93
	ldr	r0, .L107+64
	bl	puts
	mov	r0, #0
	bl	exit
.L93:
	ldr	r3, [fp, #-52]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, r0
	cmp	r3, #0
	beq	.L94
	ldr	r0, .L107+68
	bl	puts
	mov	r0, #0
	bl	exit
.L94:
	ldr	r0, .L107+72
	bl	puts
	ldr	r3, .L107+20
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L95
	ldr	r3, .L107+76
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L107+80
	bl	printf
	b	.L96
.L95:
	ldr	r3, .L107+16
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L96
	ldr	r3, .L107+76
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L107+84
	bl	printf
.L96:
	ldr	r0, .L107+88
	bl	puts
	b	.L97
.L100:
	ldr	r3, .L107+92
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L98
	ldr	r3, .L107+92
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	free
	b	.L99
.L98:
	ldr	r3, .L107+92
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, .L107+92
	ldr	r3, [r3]
	ldr	r2, [r2, #4]
	str	r2, [r3, #4]
	ldr	r3, .L107+92
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	free
.L97:
	ldr	r3, .L107+92
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L100
.L99:
	ldr	r3, .L107+20
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L101
	b	.L102
.L104:
	ldr	r3, .L107+96
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L103
	ldr	r3, .L107+96
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	free
	b	.L101
.L103:
	ldr	r3, .L107+96
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, .L107+96
	ldr	r3, [r3]
	ldr	r2, [r2, #4]
	str	r2, [r3, #4]
	ldr	r3, .L107+96
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	free
.L102:
	ldr	r3, .L107+96
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L104
.L101:
	ldr	r3, .L107+92
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, .L107+96
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r0, .L107+100
	bl	pthread_mutex_destroy
	ldr	r0, .L107+104
	bl	puts
	mov	r3, #0
	ldr	r2, .L107
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L106
	bl	__stack_chk_fail
.L106:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L108:
	.align	2
.L107:
	.word	.LC49
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.word	SCAN
	.word	NStep
	.word	.LC37
	.word	.LC38
	.word	-2004318071
	.word	.LC39
	.word	handle_alarm
	.word	ThreadOne
	.word	.LC40
	.word	ThreadTwo
	.word	.LC41
	.word	time_limit
	.word	.LC42
	.word	.LC43
	.word	.LC44
	.word	counter
	.word	.LC45
	.word	.LC46
	.word	.LC47
	.word	job_queue
	.word	temp_queue
	.word	lock
	.word	.LC48
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
