	.file	"145452489.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"\n1. Sort"
.LC1:
	.string	"\n2. Search"
.LC2:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -12[rbp], 0
	jmp	.L2
.L3:
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	scanf_s@PLT
.L2:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, 2
	jg	.L3
	mov	eax, DWORD PTR -12[rbp]
	test	eax, eax
	jle	.L3
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, 2
	je	.L4
	mov	eax, 0
	call	sort
	jmp	.L5
.L4:
	mov	eax, 0
	call	search
	nop
.L5:
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.string	"\nSort completed. Comparing sorted arrays..."
	.align 8
.LC4:
	.string	"\n!!! - Array validation failed -- something has gone horribly wrong."
.LC5:
	.string	"\n   Bubble comparisons: %d"
.LC6:
	.string	"\nInsertion comparisons: %d"
	.text
	.globl	sort
	.type	sort, @function
sort:
.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, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -48[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	fillArray
	lea	rax, -48[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	copyArray
	mov	QWORD PTR -56[rbp], rax
	lea	rax, -48[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	bubbleSort
	mov	DWORD PTR -64[rbp], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	insertionSort
	mov	DWORD PTR -60[rbp], eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rcx, QWORD PTR -56[rbp]
	lea	rax, -48[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	rdi, rax
	call	arrayCompare
	test	eax, eax
	jne	.L9
	lea	rdi, .LC4[rip]
	call	puts@PLT
.L9:
	mov	eax, DWORD PTR -64[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -60[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sort, .-sort
	.section	.rodata
.LC7:
	.string	"\nEnter number for item %d:"
.LC8:
	.string	"\n\n1. Linear search"
	.align 8
.LC9:
	.string	"\n2. Binary search (will auto-sort)"
.LC10:
	.string	"\nSearch term: "
	.align 8
.LC11:
	.string	"\nValue was found at index %d of the array."
	.text
	.globl	search
	.type	search, @function
search:
.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, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -56[rbp], 0
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -56[rbp]
	add	eax, 1
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, -48[rbp]
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	scanf_s@PLT
	add	DWORD PTR -56[rbp], 1
.L12:
	cmp	DWORD PTR -56[rbp], 9
	jle	.L13
	mov	DWORD PTR -64[rbp], 0
	jmp	.L14
.L15:
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	scanf_s@PLT
.L14:
	mov	eax, DWORD PTR -64[rbp]
	cmp	eax, 2
	jg	.L15
	mov	eax, DWORD PTR -64[rbp]
	test	eax, eax
	jle	.L15
	mov	DWORD PTR -60[rbp], 0
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -60[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	scanf_s@PLT
	mov	DWORD PTR -52[rbp], -2
	mov	eax, DWORD PTR -64[rbp]
	cmp	eax, 2
	je	.L16
	mov	edx, DWORD PTR -60[rbp]
	lea	rax, -48[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	linearSearch
	mov	DWORD PTR -52[rbp], eax
	jmp	.L17
.L16:
	lea	rax, -48[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	insertionSort
	mov	edx, DWORD PTR -60[rbp]
	lea	rax, -48[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	binarySearch
	mov	DWORD PTR -52[rbp], eax
	nop
.L17:
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	search, .-search
	.section	.rodata
	.align 8
.LC12:
	.string	"\nIndex %d: %d is equal to search term %d"
.LC13:
	.string	"\nFound at index %d"
	.align 8
.LC14:
	.string	"\nIndex %d: %d is not equal to search term %d"
.LC15:
	.string	"\nNot found in array."
	.text
	.globl	linearSearch
	.type	linearSearch, @function
linearSearch:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	DWORD PTR -4[rbp], 0
	jmp	.L20
.L23:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -32[rbp], eax
	jne	.L21
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	ecx, DWORD PTR -32[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L22
.L21:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	ecx, DWORD PTR -32[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L20:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L23
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	linearSearch, .-linearSearch
	.section	.rodata
	.align 8
.LC16:
	.string	"\nIndex %d: %d is greater than search term %d. Discarding upper half."
	.align 8
.LC17:
	.string	"\nIndex %d: %d is less than search term %d. Discarding lower half."
	.text
	.globl	binarySearch
	.type	binarySearch, @function
binarySearch:
.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	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	DWORD PTR -16[rbp], -1
	mov	DWORD PTR -12[rbp], 0
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, 1
	mov	DWORD PTR -8[rbp], eax
	jmp	.L25
.L29:
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -32[rbp], eax
	jne	.L26
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	ecx, DWORD PTR -32[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L27
.L26:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -32[rbp], eax
	jge	.L28
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	ecx, DWORD PTR -32[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 1
	mov	DWORD PTR -8[rbp], eax
	jmp	.L25
.L28:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	ecx, DWORD PTR -32[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	DWORD PTR -12[rbp], eax
.L25:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jl	.L27
	cmp	DWORD PTR -16[rbp], -1
	je	.L29
.L27:
	cmp	DWORD PTR -16[rbp], -1
	jne	.L30
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L31
.L30:
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
.L31:
	mov	eax, DWORD PTR -16[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	binarySearch, .-binarySearch
	.globl	arrayCompare
	.type	arrayCompare, @function
arrayCompare:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	DWORD PTR -4[rbp], 0
	jmp	.L34
.L37:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	je	.L35
	mov	eax, 0
	jmp	.L36
.L35:
	add	DWORD PTR -4[rbp], 1
.L34:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L37
	mov	eax, 1
.L36:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	arrayCompare, .-arrayCompare
	.globl	copyArray
	.type	copyArray, @function
copyArray:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rcx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	copyArray, .-copyArray
	.globl	fillArray
	.type	fillArray, @function
fillArray:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L41
.L42:
	call	rand@PLT
	mov	ecx, eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, [rdx+rax]
	movsx	rax, ecx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 2
	mov	edi, ecx
	sar	edi, 31
	sub	eax, edi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	sub	ecx, eax
	mov	edx, ecx
	mov	DWORD PTR [rsi], edx
	add	DWORD PTR -4[rbp], 1
.L41:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L42
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	fillArray, .-fillArray
	.globl	insertionSort
	.type	insertionSort, @function
insertionSort:
.LFB14:
	.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 -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -16[rbp], 1
	jmp	.L44
.L49:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -12[rbp], eax
	mov	DWORD PTR -8[rbp], 0
	jmp	.L45
.L47:
	mov	DWORD PTR -8[rbp], 1
	add	DWORD PTR -20[rbp], 1
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -12[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -40[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	sub	DWORD PTR -12[rbp], 1
.L45:
	cmp	DWORD PTR -12[rbp], 0
	jle	.L46
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L47
.L46:
	cmp	DWORD PTR -8[rbp], 0
	jne	.L48
	add	DWORD PTR -20[rbp], 1
.L48:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -16[rbp], 1
.L44:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L49
	mov	eax, DWORD PTR -20[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	insertionSort, .-insertionSort
	.globl	bubbleSort
	.type	bubbleSort, @function
bubbleSort:
.LFB15:
	.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 -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	DWORD PTR -20[rbp], 1
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L52
.L56:
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -8[rbp], 0
	jmp	.L53
.L55:
	add	DWORD PTR -12[rbp], 1
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	add	rax, 1
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jle	.L54
	mov	DWORD PTR -20[rbp], 1
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -40[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rdx], eax
.L54:
	add	DWORD PTR -8[rbp], 1
.L53:
	mov	eax, DWORD PTR -44[rbp]
	sub	eax, 1
	sub	eax, DWORD PTR -16[rbp]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L55
	add	DWORD PTR -16[rbp], 1
.L52:
	cmp	DWORD PTR -20[rbp], 1
	je	.L56
	mov	eax, DWORD PTR -12[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	bubbleSort, .-bubbleSort
	.section	.rodata
.LC18:
	.string	"%4d "
	.text
	.globl	printArray
	.type	printArray, @function
printArray:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L59
.L60:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L59:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L60
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	printArray, .-printArray
	.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	"145452489.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\0121. Sort\000"
	.align	2
.LC1:
	.ascii	"\0122. Search\000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.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	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L3:
	ldr	r0, .L8+4
	bl	printf
	ldr	r0, .L8+8
	bl	printf
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L8+12
	bl	scanf_s
.L2:
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	bgt	.L3
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	ble	.L3
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	beq	.L4
	bl	sort
	b	.L5
.L4:
	bl	search
	nop
.L5:
	mov	r3, #0
	ldr	r2, .L8
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.section	.rodata
	.align	2
.LC4:
	.ascii	"\012Sort completed. Comparing sorted arrays...\000"
	.align	2
.LC5:
	.ascii	"\012!!! - Array validation failed -- something has "
	.ascii	"gone horribly wrong.\000"
	.align	2
.LC6:
	.ascii	"\012   Bubble comparisons: %d\000"
	.align	2
.LC7:
	.ascii	"\012Insertion comparisons: %d\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sort
	.syntax unified
	.arm
	.fpu softvfp
	.type	sort, %function
sort:
	@ 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, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #48
	mov	r1, #10
	mov	r0, r3
	bl	fillArray
	sub	r3, fp, #48
	mov	r1, #10
	mov	r0, r3
	bl	copyArray
	str	r0, [fp, #-60]
	sub	r3, fp, #48
	mov	r1, #10
	mov	r0, r3
	bl	bubbleSort
	str	r0, [fp, #-56]
	mov	r1, #10
	ldr	r0, [fp, #-60]
	bl	insertionSort
	str	r0, [fp, #-52]
	ldr	r0, .L13+4
	bl	printf
	sub	r3, fp, #48
	mov	r2, #10
	ldr	r1, [fp, #-60]
	mov	r0, r3
	bl	arrayCompare
	mov	r3, r0
	cmp	r3, #0
	bne	.L11
	ldr	r0, .L13+8
	bl	puts
.L11:
	ldr	r1, [fp, #-56]
	ldr	r0, .L13+12
	bl	printf
	ldr	r1, [fp, #-52]
	ldr	r0, .L13+16
	bl	printf
	nop
	ldr	r3, .L13
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC8
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	sort, .-sort
	.section	.rodata
	.align	2
.LC9:
	.ascii	"\012Enter number for item %d:\000"
	.align	2
.LC10:
	.ascii	"\012\0121. Linear search\000"
	.align	2
.LC11:
	.ascii	"\0122. Binary search (will auto-sort)\000"
	.align	2
.LC12:
	.ascii	"\012Search term: \000"
	.align	2
.LC13:
	.ascii	"\012Value was found at index %d of the array.\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	search
	.syntax unified
	.arm
	.fpu softvfp
	.type	search, %function
search:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L16
.L17:
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L23+4
	bl	printf
	sub	r2, fp, #48
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L23+8
	bl	scanf_s
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L16:
	ldr	r3, [fp, #-56]
	cmp	r3, #9
	ble	.L17
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L18
.L19:
	ldr	r0, .L23+12
	bl	printf
	ldr	r0, .L23+16
	bl	printf
	sub	r3, fp, #64
	mov	r1, r3
	ldr	r0, .L23+8
	bl	scanf_s
.L18:
	ldr	r3, [fp, #-64]
	cmp	r3, #2
	bgt	.L19
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	ble	.L19
	mov	r3, #0
	str	r3, [fp, #-60]
	ldr	r0, .L23+20
	bl	printf
	sub	r3, fp, #60
	mov	r1, r3
	ldr	r0, .L23+8
	bl	scanf_s
	mvn	r3, #1
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-64]
	cmp	r3, #2
	beq	.L20
	ldr	r2, [fp, #-60]
	sub	r3, fp, #48
	mov	r1, #10
	mov	r0, r3
	bl	linearSearch
	str	r0, [fp, #-52]
	b	.L21
.L20:
	sub	r3, fp, #48
	mov	r1, #10
	mov	r0, r3
	bl	insertionSort
	ldr	r2, [fp, #-60]
	sub	r3, fp, #48
	mov	r1, #10
	mov	r0, r3
	bl	binarySearch
	str	r0, [fp, #-52]
	nop
.L21:
	ldr	r1, [fp, #-52]
	ldr	r0, .L23+24
	bl	printf
	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	.LC14
	.word	.LC9
	.word	.LC2
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	search, .-search
	.section	.rodata
	.align	2
.LC15:
	.ascii	"\012Index %d: %d is equal to search term %d\000"
	.align	2
.LC16:
	.ascii	"\012Found at index %d\000"
	.align	2
.LC17:
	.ascii	"\012Index %d: %d is not equal to search term %d\000"
	.align	2
.LC18:
	.ascii	"\012Not found in array.\000"
	.text
	.align	2
	.global	linearSearch
	.syntax unified
	.arm
	.fpu softvfp
	.type	linearSearch, %function
linearSearch:
	@ 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L26
.L29:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bne	.L27
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-8]
	ldr	r0, .L30
	bl	printf
	ldr	r1, [fp, #-8]
	ldr	r0, .L30+4
	bl	printf
	ldr	r3, [fp, #-8]
	b	.L28
.L27:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-8]
	ldr	r0, .L30+8
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L26:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L29
	ldr	r0, .L30+12
	bl	printf
	mvn	r3, #0
.L28:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.size	linearSearch, .-linearSearch
	.section	.rodata
	.align	2
.LC19:
	.ascii	"\012Index %d: %d is greater than search term %d. Di"
	.ascii	"scarding upper half.\000"
	.align	2
.LC20:
	.ascii	"\012Index %d: %d is less than search term %d. Disca"
	.ascii	"rding lower half.\000"
	.text
	.align	2
	.global	binarySearch
	.syntax unified
	.arm
	.fpu softvfp
	.type	binarySearch, %function
binarySearch:
	@ 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, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	mvn	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L33
.L37:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	bne	.L34
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	ldr	r1, [fp, #-8]
	ldr	r0, .L41
	bl	printf
	b	.L35
.L34:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	bge	.L36
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	ldr	r1, [fp, #-8]
	ldr	r0, .L41+4
	bl	printf
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L33
.L36:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	ldr	r1, [fp, #-8]
	ldr	r0, .L41+8
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L33:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L35
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	beq	.L37
.L35:
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L38
	ldr	r0, .L41+12
	bl	printf
	b	.L39
.L38:
	ldr	r1, [fp, #-20]
	ldr	r0, .L41+16
	bl	printf
.L39:
	ldr	r3, [fp, #-20]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L42:
	.align	2
.L41:
	.word	.LC15
	.word	.LC19
	.word	.LC20
	.word	.LC18
	.word	.LC16
	.size	binarySearch, .-binarySearch
	.align	2
	.global	arrayCompare
	.syntax unified
	.arm
	.fpu softvfp
	.type	arrayCompare, %function
arrayCompare:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L44
.L47:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-20]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L45
	mov	r3, #0
	b	.L46
.L45:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L44:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L47
	mov	r3, #1
.L46:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	arrayCompare, .-arrayCompare
	.align	2
	.global	copyArray
	.syntax unified
	.arm
	.fpu softvfp
	.type	copyArray, %function
copyArray:
	@ 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	r3, [fp, #-20]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-8]
	bl	memcpy
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	copyArray, .-copyArray
	.align	2
	.global	fillArray
	.syntax unified
	.arm
	.fpu softvfp
	.type	fillArray, %function
fillArray:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L51
.L52:
	bl	rand
	mov	r1, r0
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r0, r2, r3
	ldr	r3, .L53
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	str	r2, [r0]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L51:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L52
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L54:
	.align	2
.L53:
	.word	1717986919
	.size	fillArray, .-fillArray
	.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]
	str	r1, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L56
.L61:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L57
.L59:
	mov	r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-32]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	str	r3, [fp, #-16]
.L57:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	ble	.L58
	ldr	r3, [fp, #-16]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L59
.L58:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L60
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L60:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L56:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L61
	ldr	r3, [fp, #-24]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	insertionSort, .-insertionSort
	.align	2
	.global	bubbleSort
	.syntax unified
	.arm
	.fpu softvfp
	.type	bubbleSort, %function
bubbleSort:
	@ 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]
	str	r1, [fp, #-36]
	mov	r3, #1
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L64
.L68:
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L65
.L67:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r1, [fp, #-32]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L66
	mov	r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r2, r2, r3
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-32]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
.L66:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L65:
	ldr	r3, [fp, #-36]
	sub	r2, r3, #1
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L67
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L64:
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	beq	.L68
	ldr	r3, [fp, #-16]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	bubbleSort, .-bubbleSort
	.section	.rodata
	.align	2
.LC21:
	.ascii	"%4d \000"
	.text
	.align	2
	.global	printArray
	.syntax unified
	.arm
	.fpu softvfp
	.type	printArray, %function
printArray:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L71
.L72:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L73
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L71:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L72
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L74:
	.align	2
.L73:
	.word	.LC21
	.size	printArray, .-printArray
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
