	.file	"496568.c"
	.intel_syntax noprefix
	.text
	.globl	array
	.bss
	.align 32
	.type	array, @object
	.size	array, 16000
array:
	.zero	16000
	.globl	avg
	.align 8
	.type	avg, @object
	.size	avg, 8
avg:
	.zero	8
	.text
	.globl	InsertionSort
	.type	InsertionSort, @function
InsertionSort:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	imul	rax, rax, 500
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 500
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -48[rbp], rax
	jmp	.L2
.L6:
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, array[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -40[rbp], rax
	jmp	.L3
.L5:
	mov	rax, QWORD PTR -40[rbp]
	sub	rax, 1
	lea	rdx, 0[0+rax*8]
	lea	rax, array[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rdx, QWORD PTR -40[rbp]
	lea	rcx, 0[0+rdx*8]
	lea	rdx, array[rip]
	mov	QWORD PTR [rcx+rdx], rax
	sub	QWORD PTR -40[rbp], 1
.L3:
	cmp	QWORD PTR -40[rbp], 0
	jle	.L4
	mov	rax, QWORD PTR -40[rbp]
	sub	rax, 1
	lea	rdx, 0[0+rax*8]
	lea	rax, array[rip]
	mov	rax, QWORD PTR [rdx+rax]
	cmp	QWORD PTR -8[rbp], rax
	jl	.L5
.L4:
	mov	rax, QWORD PTR -40[rbp]
	lea	rcx, 0[0+rax*8]
	lea	rdx, array[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rcx+rdx], rax
	add	QWORD PTR -48[rbp], 1
.L2:
	mov	rax, QWORD PTR -48[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	jl	.L6
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	InsertionSort, .-InsertionSort
	.section	.rodata
.LC0:
	.string	"Sorted Array: "
.LC1:
	.string	"array[%ld] ==> %ld \n"
	.text
	.globl	Automated
	.type	Automated, @function
Automated:
.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, 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	QWORD PTR -104[rbp], 0
	jmp	.L8
.L13:
	cmp	QWORD PTR -104[rbp], 499
	jg	.L9
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 5
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 500
	sub	eax, ecx
	mov	edx, eax
	lea	eax, 1[rdx]
	cdqe
	mov	rdx, QWORD PTR -104[rbp]
	lea	rcx, 0[0+rdx*8]
	lea	rdx, array[rip]
	mov	QWORD PTR [rcx+rdx], rax
	jmp	.L10
.L9:
	cmp	QWORD PTR -104[rbp], 999
	jg	.L11
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 5
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 500
	sub	eax, ecx
	mov	edx, eax
	lea	eax, 501[rdx]
	cdqe
	mov	rdx, QWORD PTR -104[rbp]
	lea	rcx, 0[0+rdx*8]
	lea	rdx, array[rip]
	mov	QWORD PTR [rcx+rdx], rax
	jmp	.L10
.L11:
	cmp	QWORD PTR -104[rbp], 1499
	jg	.L12
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 5
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 500
	sub	eax, ecx
	mov	edx, eax
	lea	eax, 1001[rdx]
	cdqe
	mov	rdx, QWORD PTR -104[rbp]
	lea	rcx, 0[0+rdx*8]
	lea	rdx, array[rip]
	mov	QWORD PTR [rcx+rdx], rax
	jmp	.L10
.L12:
	cmp	QWORD PTR -104[rbp], 1999
	jg	.L10
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 5
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 500
	sub	eax, ecx
	mov	edx, eax
	lea	eax, 1501[rdx]
	cdqe
	mov	rdx, QWORD PTR -104[rbp]
	lea	rcx, 0[0+rdx*8]
	lea	rdx, array[rip]
	mov	QWORD PTR [rcx+rdx], rax
.L10:
	add	QWORD PTR -104[rbp], 1
.L8:
	cmp	QWORD PTR -104[rbp], 1999
	jle	.L13
	call	clock@PLT
	mov	QWORD PTR -72[rbp], rax
	mov	QWORD PTR -96[rbp], 0
	jmp	.L14
.L15:
	mov	rax, QWORD PTR -96[rbp]
	lea	rcx, -48[rbp]
	mov	rdx, QWORD PTR -96[rbp]
	sal	rdx, 3
	lea	rdi, [rcx+rdx]
	mov	rcx, rax
	lea	rdx, InsertionSort[rip]
	mov	esi, 0
	call	pthread_create@PLT
	add	QWORD PTR -96[rbp], 1
.L14:
	cmp	QWORD PTR -96[rbp], 3
	jle	.L15
	mov	QWORD PTR -88[rbp], 0
	jmp	.L16
.L17:
	mov	rax, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -48[rbp+rax*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	add	QWORD PTR -88[rbp], 1
.L16:
	cmp	QWORD PTR -88[rbp], 3
	jle	.L17
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	QWORD PTR -80[rbp], 0
	jmp	.L18
.L19:
	mov	rax, QWORD PTR -80[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, array[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -80[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	QWORD PTR -80[rbp], 1
.L18:
	cmp	QWORD PTR -80[rbp], 1999
	jle	.L19
	call	clock@PLT
	mov	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	sub	rax, QWORD PTR -72[rbp]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	movsd	xmm0, QWORD PTR .LC2[rip]
	mulsd	xmm0, xmm1
	movsd	xmm1, QWORD PTR .LC3[rip]
	divsd	xmm0, xmm1
	movsd	QWORD PTR -56[rbp], xmm0
	movsd	xmm0, QWORD PTR avg[rip]
	addsd	xmm0, QWORD PTR -56[rbp]
	movsd	QWORD PTR avg[rip], xmm0
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Automated, .-Automated
	.section	.rodata
	.align 8
.LC6:
	.string	"\n\nPthread: Average Time Taken; InsertionSort: %lf \n\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	pxor	xmm0, xmm0
	movsd	QWORD PTR avg[rip], xmm0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L22
.L23:
	mov	eax, 0
	call	Automated
	add	DWORD PTR -4[rbp], 1
.L22:
	cmp	DWORD PTR -4[rbp], 99
	jle	.L23
	movsd	xmm0, QWORD PTR avg[rip]
	movsd	xmm1, QWORD PTR .LC5[rip]
	divsd	xmm0, xmm1
	movsd	QWORD PTR avg[rip], xmm0
	mov	rax, QWORD PTR avg[rip]
	movq	xmm0, rax
	lea	rdi, .LC6[rip]
	mov	eax, 1
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	0
	.long	1083129856
	.align 8
.LC3:
	.long	0
	.long	1093567616
	.align 8
.LC5:
	.long	0
	.long	1079574528
	.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	"496568.c"
	.text
	.comm	array,8000,4
	.comm	avg,8,8
	.align	2
	.global	InsertionSort
	.syntax unified
	.arm
	.fpu softvfp
	.type	InsertionSort, %function
InsertionSort:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #36
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	add	r3, r3, #500
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-28]
	b	.L2
.L6:
	ldr	r2, .L7
	ldr	r3, [fp, #-28]
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-24]
	b	.L3
.L5:
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	ldr	r2, .L7
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L7
	ldr	r3, [fp, #-24]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
.L3:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	ble	.L4
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	ldr	r2, .L7
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L5
.L4:
	ldr	r1, .L7
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L2:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	blt	.L6
	nop
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L8:
	.align	2
.L7:
	.word	array
	.size	InsertionSort, .-InsertionSort
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Sorted Array: \000"
	.align	2
.LC1:
	.ascii	"array[%ld] ==> %ld \012\000"
	.global	__aeabi_i2d
	.global	__aeabi_dmul
	.global	__aeabi_ddiv
	.global	__aeabi_dadd
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	Automated
	.syntax unified
	.arm
	.fpu softvfp
	.type	Automated, %function
Automated:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L10
.L15:
	ldr	r3, [fp, #-60]
	cmp	r3, #500
	bge	.L11
	bl	rand
	mov	r1, r0
	ldr	r3, .L23+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	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, #2
	sub	r2, r1, r3
	add	r2, r2, #1
	ldr	r1, .L23+8
	ldr	r3, [fp, #-60]
	str	r2, [r1, r3, lsl #2]
	b	.L12
.L11:
	ldr	r3, [fp, #-60]
	cmp	r3, #1000
	bge	.L13
	bl	rand
	mov	r1, r0
	ldr	r3, .L23+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	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, #2
	sub	r2, r1, r3
	add	r3, r2, #500
	add	r3, r3, #1
	ldr	r1, .L23+8
	ldr	r2, [fp, #-60]
	str	r3, [r1, r2, lsl #2]
	b	.L12
.L13:
	ldr	r3, [fp, #-60]
	ldr	r2, .L23+12
	cmp	r3, r2
	bgt	.L14
	bl	rand
	mov	r1, r0
	ldr	r3, .L23+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	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, #2
	sub	r2, r1, r3
	add	r3, r2, #1000
	add	r3, r3, #1
	ldr	r1, .L23+8
	ldr	r2, [fp, #-60]
	str	r3, [r1, r2, lsl #2]
	b	.L12
.L14:
	ldr	r3, [fp, #-60]
	cmp	r3, #2000
	bge	.L12
	bl	rand
	mov	r1, r0
	ldr	r3, .L23+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	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, #2
	sub	r2, r1, r3
	add	r3, r2, #1488
	add	r3, r3, #13
	ldr	r1, .L23+8
	ldr	r2, [fp, #-60]
	str	r3, [r1, r2, lsl #2]
.L12:
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L10:
	ldr	r3, [fp, #-60]
	cmp	r3, #2000
	blt	.L15
	bl	clock
	str	r0, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L16
.L17:
	sub	r2, fp, #24
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #2
	add	r0, r2, r3
	ldr	r3, [fp, #-56]
	ldr	r2, .L23+16
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L16:
	ldr	r3, [fp, #-56]
	cmp	r3, #3
	ble	.L17
	mov	r3, #0
	str	r3, [fp, #-52]
	b	.L18
.L19:
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-20]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L18:
	ldr	r3, [fp, #-52]
	cmp	r3, #3
	ble	.L19
	ldr	r0, .L23+20
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L20
.L21:
	ldr	r2, .L23+8
	ldr	r3, [fp, #-48]
	ldr	r3, [r2, r3, lsl #2]
	mov	r2, r3
	ldr	r1, [fp, #-48]
	ldr	r0, .L23+24
	bl	printf
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L20:
	ldr	r3, [fp, #-48]
	cmp	r3, #2000
	blt	.L21
	bl	clock
	str	r0, [fp, #-40]
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-44]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L23+28
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L23+32
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	ldr	r3, .L23+36
	ldmia	r3, {r0-r1}
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L23+36
	stm	r1, {r2-r3}
	nop
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC2
	.word	274877907
	.word	array
	.word	1499
	.word	InsertionSort
	.word	.LC0
	.word	.LC1
	.word	1083129856
	.word	1093567616
	.word	avg
	.size	Automated, .-Automated
	.section	.rodata
	.align	2
.LC3:
	.ascii	"\012\012Pthread: Average Time Taken; InsertionSort:"
	.ascii	" %lf \012\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r1, .L29
	mov	r2, #0
	mov	r3, #0
	stm	r1, {r2-r3}
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L26
.L27:
	bl	Automated
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L26:
	ldr	r3, [fp, #-8]
	cmp	r3, #99
	ble	.L27
	ldr	r3, .L29
	ldmia	r3, {r0-r1}
	mov	r2, #0
	ldr	r3, .L29+4
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L29
	stm	r1, {r2-r3}
	ldr	r3, .L29
	ldmia	r3, {r2-r3}
	ldr	r0, .L29+8
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	avg
	.word	1079574528
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
