	.file	"458629.c"
	.intel_syntax noprefix
	.text
	.globl	num_threads
	.data
	.align 4
	.type	num_threads, @object
	.size	num_threads, 4
num_threads:
	.long	1
	.globl	keys
	.bss
	.align 32
	.type	keys, @object
	.size	keys, 400000
keys:
	.zero	400000
	.globl	table
	.align 32
	.type	table, @object
	.size	table, 40
table:
	.zero	40
	.globl	spinlock
	.align 4
	.type	spinlock, @object
	.size	spinlock, 4
spinlock:
	.zero	4
	.text
	.globl	panic
	.type	panic, @function
panic:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	panic, .-panic
	.globl	now
	.type	now, @function
now:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rax, QWORD PTR -32[rbp]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	mov	rax, QWORD PTR -24[rbp]
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	movsd	xmm2, QWORD PTR .LC0[rip]
	divsd	xmm0, xmm2
	addsd	xmm0, xmm1
	movq	rax, xmm0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	movq	xmm0, rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	now, .-now
	.section	.rodata
.LC1:
	.string	"No memory to allocate bucket!"
	.text
	.globl	insert
	.type	insert, @function
insert:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1717986919
	shr	rdx, 32
	sar	edx
	mov	esi, eax
	sar	esi, 31
	mov	ecx, edx
	sub	ecx, esi
	mov	edx, ecx
	sal	edx, 2
	add	edx, ecx
	sub	eax, edx
	mov	DWORD PTR -12[rbp], eax
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L6
	lea	rdi, .LC1[rip]
	call	panic
.L6:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, table[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rdx, table[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rcx+rdx], rax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	insert, .-insert
	.globl	retrieve
	.type	retrieve, @function
retrieve:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	edx, DWORD PTR -20[rbp]
	movsx	rax, edx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	sal	ecx, 2
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, table[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L8
.L11:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L9
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L10
.L9:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
.L8:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L11
	mov	eax, 0
.L10:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	retrieve, .-retrieve
	.globl	put_phase
	.type	put_phase, @function
put_phase:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -12[rbp], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L13
.L14:
	lea	rdi, spinlock[rip]
	call	pthread_spin_lock@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, keys[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, ecx
	mov	edi, eax
	call	insert
	lea	rdi, spinlock[rip]
	call	pthread_spin_unlock@PLT
	mov	eax, DWORD PTR num_threads[rip]
	add	DWORD PTR -12[rbp], eax
.L13:
	cmp	DWORD PTR -12[rbp], 99999
	jle	.L14
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE10:
	.size	put_phase, .-put_phase
	.section	.rodata
.LC2:
	.string	"[thread %ld] %ld keys lost!\n"
	.text
	.globl	get_phase
	.type	get_phase, @function
get_phase:
.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 -40[rbp], rdi
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -20[rbp], 0
	mov	QWORD PTR -16[rbp], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR -20[rbp], eax
	jmp	.L16
.L18:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, keys[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edi, eax
	call	retrieve
	test	rax, rax
	jne	.L17
	add	QWORD PTR -16[rbp], 1
.L17:
	mov	eax, DWORD PTR num_threads[rip]
	add	DWORD PTR -20[rbp], eax
.L16:
	cmp	DWORD PTR -20[rbp], 99999
	jle	.L18
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	pthread_exit@PLT
	.cfi_endproc
.LFE11:
	.size	get_phase, .-get_phase
	.section	.rodata
	.align 8
.LC3:
	.string	"usage: ./parallel_hashtable <num_threads>"
	.align 8
.LC4:
	.string	"must enter a valid number of threads to run"
	.align 8
.LC5:
	.string	"out of memory allocating thread handles"
	.align 8
.LC6:
	.string	"[main] Inserted %d keys in %f seconds\n"
	.align 8
.LC7:
	.string	"[main] Retrieved %ld/%d keys in %f seconds\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	cmp	DWORD PTR -52[rbp], 2
	je	.L20
	lea	rdi, .LC3[rip]
	call	panic
.L20:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR num_threads[rip], eax
	mov	eax, DWORD PTR num_threads[rip]
	test	eax, eax
	jg	.L21
	lea	rdi, .LC4[rip]
	call	panic
.L21:
	mov	esi, 0
	lea	rdi, spinlock[rip]
	call	pthread_spin_init@PLT
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srandom@PLT
	mov	QWORD PTR -48[rbp], 0
	jmp	.L22
.L23:
	call	random@PLT
	mov	ecx, eax
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 0[0+rax*4]
	lea	rax, keys[rip]
	mov	DWORD PTR [rdx+rax], ecx
	add	QWORD PTR -48[rbp], 1
.L22:
	cmp	QWORD PTR -48[rbp], 99999
	jle	.L23
	mov	eax, DWORD PTR num_threads[rip]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L24
	lea	rdi, .LC5[rip]
	call	panic
.L24:
	mov	eax, 0
	call	now
	movq	rax, xmm0
	mov	QWORD PTR -24[rbp], rax
	mov	QWORD PTR -48[rbp], 0
	jmp	.L25
.L26:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -32[rbp]
	lea	rdi, [rcx+rdx]
	mov	rcx, rax
	lea	rdx, put_phase[rip]
	mov	esi, 0
	call	pthread_create@PLT
	add	QWORD PTR -48[rbp], 1
.L25:
	mov	eax, DWORD PTR num_threads[rip]
	cdqe
	cmp	QWORD PTR -48[rbp], rax
	jl	.L26
	mov	QWORD PTR -48[rbp], 0
	jmp	.L27
.L28:
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	add	QWORD PTR -48[rbp], 1
.L27:
	mov	eax, DWORD PTR num_threads[rip]
	cdqe
	cmp	QWORD PTR -48[rbp], rax
	jl	.L28
	mov	eax, 0
	call	now
	movq	rax, xmm0
	mov	QWORD PTR -16[rbp], rax
	movsd	xmm0, QWORD PTR -16[rbp]
	subsd	xmm0, QWORD PTR -24[rbp]
	movq	rax, xmm0
	movq	xmm0, rax
	mov	esi, 100000
	lea	rdi, .LC6[rip]
	mov	eax, 1
	call	printf@PLT
	mov	eax, DWORD PTR num_threads[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, 0
	call	now
	movq	rax, xmm0
	mov	QWORD PTR -24[rbp], rax
	mov	QWORD PTR -48[rbp], 0
	jmp	.L29
.L30:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -32[rbp]
	lea	rdi, [rcx+rdx]
	mov	rcx, rax
	lea	rdx, get_phase[rip]
	mov	esi, 0
	call	pthread_create@PLT
	add	QWORD PTR -48[rbp], 1
.L29:
	mov	eax, DWORD PTR num_threads[rip]
	cdqe
	cmp	QWORD PTR -48[rbp], rax
	jl	.L30
	mov	QWORD PTR -40[rbp], 0
	mov	eax, DWORD PTR num_threads[rip]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	QWORD PTR -48[rbp], 0
	jmp	.L31
.L32:
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	add	QWORD PTR -40[rbp], rax
	add	QWORD PTR -48[rbp], 1
.L31:
	mov	eax, DWORD PTR num_threads[rip]
	cdqe
	cmp	QWORD PTR -48[rbp], rax
	jl	.L32
	mov	eax, 0
	call	now
	movq	rax, xmm0
	mov	QWORD PTR -16[rbp], rax
	movsd	xmm0, QWORD PTR -16[rbp]
	subsd	xmm0, QWORD PTR -24[rbp]
	movq	rdx, xmm0
	mov	eax, 100000
	sub	rax, QWORD PTR -40[rbp]
	movq	xmm0, rdx
	mov	edx, 100000
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 1
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	1093567616
	.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	"458629.c"
	.text
	.global	num_threads
	.data
	.align	2
	.type	num_threads, %object
	.size	num_threads, 4
num_threads:
	.word	1
	.comm	keys,400000,4
	.comm	table,20,4
	.comm	spinlock,4,4
	.text
	.align	2
	.global	panic
	.syntax unified
	.arm
	.fpu softvfp
	.type	panic, %function
panic:
	@ 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	r0, [fp, #-8]
	bl	puts
	mov	r0, #1
	bl	exit
	.size	panic, .-panic
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.global	__aeabi_dadd
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	now
	.syntax unified
	.arm
	.fpu softvfp
	.type	now, %function
now:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #16
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #24
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r3, [fp, #-24]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L5+4
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L5
	ldr	r0, [r1]
	ldr	r1, [fp, #-16]
	eors	r0, r1, r0
	mov	r1, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	1093567616
	.size	now, .-now
	.section	.rodata
	.align	2
.LC1:
	.ascii	"No memory to allocate bucket!\000"
	.text
	.align	2
	.global	insert
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert, %function
insert:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r2, [fp, #-16]
	ldr	r3, .L9
	smull	r1, r3, r2, r3
	asr	r1, r3, #1
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	sub	r3, r2, r3
	str	r3, [fp, #-12]
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L8
	ldr	r0, .L9+4
	bl	panic
.L8:
	ldr	r2, .L9+8
	ldr	r3, [fp, #-12]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #4]
	ldr	r1, .L9+8
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	1717986919
	.word	.LC1
	.word	table
	.size	insert, .-insert
	.align	2
	.global	retrieve
	.syntax unified
	.arm
	.fpu softvfp
	.type	retrieve, %function
retrieve:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	ldr	r1, [fp, #-16]
	ldr	r3, .L16
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	sub	r2, r1, r3
	ldr	r3, .L16+4
	ldr	r3, [r3, r2, lsl #2]
	str	r3, [fp, #-8]
	b	.L12
.L15:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L13
	ldr	r3, [fp, #-8]
	b	.L14
.L13:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-8]
.L12:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L15
	mov	r3, #0
.L14:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L17:
	.align	2
.L16:
	.word	1717986919
	.word	table
	.size	retrieve, .-retrieve
	.align	2
	.global	put_phase
	.syntax unified
	.arm
	.fpu softvfp
	.type	put_phase, %function
put_phase:
	@ 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	r3, [fp, #-16]
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-12]
	b	.L19
.L20:
	ldr	r0, .L21
	bl	pthread_spin_lock
	ldr	r2, .L21+4
	ldr	r3, [fp, #-12]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	insert
	ldr	r0, .L21
	bl	pthread_spin_unlock
	ldr	r3, .L21+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-12]
.L19:
	ldr	r3, [fp, #-12]
	ldr	r2, .L21+12
	cmp	r3, r2
	blt	.L20
	mov	r0, #0
	bl	pthread_exit
.L22:
	.align	2
.L21:
	.word	spinlock
	.word	keys
	.word	num_threads
	.word	100000
	.size	put_phase, .-put_phase
	.section	.rodata
	.align	2
.LC2:
	.ascii	"[thread %ld] %ld keys lost!\012\000"
	.text
	.align	2
	.global	get_phase
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_phase, %function
get_phase:
	@ 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]
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-16]
	b	.L24
.L26:
	ldr	r2, .L27
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	mov	r0, r3
	bl	retrieve
	mov	r3, r0
	cmp	r3, #0
	bne	.L25
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L25:
	ldr	r3, .L27+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-16]
.L24:
	ldr	r3, [fp, #-16]
	ldr	r2, .L27+8
	cmp	r3, r2
	blt	.L26
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-8]
	ldr	r0, .L27+12
	bl	printf
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	pthread_exit
.L28:
	.align	2
.L27:
	.word	keys
	.word	num_threads
	.word	100000
	.word	.LC2
	.size	get_phase, .-get_phase
	.section	.rodata
	.align	2
.LC3:
	.ascii	"usage: ./parallel_hashtable <num_threads>\000"
	.align	2
.LC4:
	.ascii	"must enter a valid number of threads to run\000"
	.align	2
.LC5:
	.ascii	"out of memory allocating thread handles\000"
	.global	__aeabi_dsub
	.align	2
.LC6:
	.ascii	"[main] Inserted %d keys in %f seconds\012\000"
	.align	2
.LC7:
	.ascii	"[main] Retrieved %ld/%d keys in %f seconds\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #52
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, [fp, #-48]
	cmp	r3, #2
	beq	.L30
	ldr	r0, .L44
	bl	panic
.L30:
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L44+4
	str	r3, [r2]
	ldr	r3, .L44+4
	ldr	r3, [r3]
	cmp	r3, #0
	bgt	.L31
	ldr	r0, .L44+8
	bl	panic
.L31:
	mov	r1, #0
	ldr	r0, .L44+12
	bl	pthread_spin_init
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srandom
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L32
.L33:
	bl	random
	mov	r2, r0
	ldr	r1, .L44+16
	ldr	r3, [fp, #-44]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L32:
	ldr	r3, [fp, #-44]
	ldr	r2, .L44+20
	cmp	r3, r2
	blt	.L33
	ldr	r3, .L44+4
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L34
	ldr	r0, .L44+24
	bl	panic
.L34:
	bl	now
	str	r0, [fp, #-28]
	str	r1, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L35
.L36:
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r0, r2, r3
	ldr	r3, [fp, #-44]
	ldr	r2, .L44+28
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L35:
	ldr	r3, .L44+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	blt	.L36
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L37
.L38:
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L37:
	ldr	r3, .L44+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	blt	.L38
	bl	now
	str	r0, [fp, #-20]
	str	r1, [fp, #-16]
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L44+20
	ldr	r0, .L44+32
	bl	printf
	ldr	r3, .L44+4
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-36]
	bl	memset
	bl	now
	str	r0, [fp, #-28]
	str	r1, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L39
.L40:
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r0, r2, r3
	ldr	r3, [fp, #-44]
	ldr	r2, .L44+36
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L39:
	ldr	r3, .L44+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	blt	.L40
	mov	r3, #0
	str	r3, [fp, #-40]
	ldr	r3, .L44+4
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L41
.L42:
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	mov	r1, r3
	bl	pthread_join
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L41:
	ldr	r3, .L44+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	blt	.L42
	bl	now
	str	r0, [fp, #-20]
	str	r1, [fp, #-16]
	ldr	r3, [fp, #-40]
	rsb	r4, r3, #99328
	add	r4, r4, #672
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	sub	r1, fp, #20
	ldmia	r1, {r0-r1}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	stm	sp, {r2-r3}
	ldr	r2, .L44+20
	mov	r1, r4
	ldr	r0, .L44+40
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L45:
	.align	2
.L44:
	.word	.LC3
	.word	num_threads
	.word	.LC4
	.word	spinlock
	.word	keys
	.word	100000
	.word	.LC5
	.word	put_phase
	.word	.LC6
	.word	get_phase
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
