	.file	"626224.c"
	.intel_syntax noprefix
	.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 -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -12[rbp], 1
	jmp	.L2
.L6:
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, 1
	mov	DWORD PTR -8[rbp], eax
	jmp	.L3
.L5:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[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 -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -24[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 -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rdx], eax
	sub	DWORD PTR -8[rbp], 1
.L3:
	cmp	DWORD PTR -8[rbp], 0
	js	.L4
	mov	eax, DWORD PTR -8[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 -8[rbp]
	cdqe
	add	rax, 1
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jg	.L5
.L4:
	add	DWORD PTR -12[rbp], 1
.L2:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L6
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	insertionSort, .-insertionSort
	.section	.rodata
.LC0:
	.string	"Enter array size: "
.LC1:
	.string	"%i"
	.align 8
.LC2:
	.string	"Enter CONSOLE if you want to enter array values from the console, or enter RANDOM if you want to populate the array with random numbers: "
.LC3:
	.string	"%s"
.LC4:
	.string	"CONSOLE"
.LC5:
	.string	"console"
.LC6:
	.string	"Console"
.LC7:
	.string	"Enter array elements: "
.LC8:
	.string	"RANDOM"
.LC9:
	.string	"random"
.LC10:
	.string	"Random"
.LC11:
	.string	"Incorrect input!"
.LC12:
	.string	"%i "
	.text
	.globl	main
	.type	main, @function
main:
.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
	mov	DWORD PTR -60[rbp], 0
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -60[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -16[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L8
	lea	rax, -16[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L8
	lea	rax, -16[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L9
.L8:
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -56[rbp], 0
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -56[rbp], 1
.L10:
	mov	eax, DWORD PTR -60[rbp]
	cmp	DWORD PTR -56[rbp], eax
	jl	.L11
	jmp	.L12
.L9:
	lea	rax, -16[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L13
	lea	rax, -16[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L13
	lea	rax, -16[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L14
.L13:
	mov	DWORD PTR -52[rbp], 0
	jmp	.L15
.L16:
	call	rand@PLT
	cdq
	shr	edx, 27
	add	eax, edx
	and	eax, 31
	sub	eax, edx
	mov	edx, eax
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	add	edx, 11
	mov	DWORD PTR [rax], edx
	add	DWORD PTR -52[rbp], 1
.L15:
	mov	eax, DWORD PTR -60[rbp]
	cmp	DWORD PTR -52[rbp], eax
	jl	.L16
	jmp	.L12
.L14:
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	jmp	.L26
.L12:
	mov	eax, DWORD PTR -60[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L18
	mov	eax, DWORD PTR -60[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	jmp	.L19
.L18:
	mov	eax, DWORD PTR -60[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	add	eax, 1
.L19:
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -48[rbp], 0
	jmp	.L20
.L21:
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -48[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR [rcx]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -48[rbp], 2
.L20:
	mov	eax, DWORD PTR -60[rbp]
	cmp	DWORD PTR -48[rbp], eax
	jl	.L21
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	insertionSort
	mov	DWORD PTR -44[rbp], 0
	jmp	.L22
.L23:
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -44[rbp]
	add	edx, edx
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -32[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -44[rbp], 1
.L22:
	mov	eax, DWORD PTR -44[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L23
	mov	DWORD PTR -40[rbp], 0
	jmp	.L24
.L25:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -40[rbp], 1
.L24:
	mov	eax, DWORD PTR -60[rbp]
	cmp	DWORD PTR -40[rbp], eax
	jl	.L25
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
.L26:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"626224.c"
	.text
	.align	2
	.global	insertionSort
	.syntax unified
	.arm
	.fpu softvfp
	.type	insertionSort, %function
insertionSort:
	@ 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, #-24]
	str	r1, [fp, #-28]
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L2
.L6:
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L3
.L5:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	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, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-24]
	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, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L3:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L4
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	bgt	.L5
.L4:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L2:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L6
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	insertionSort, .-insertionSort
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Enter array size: \000"
	.align	2
.LC1:
	.ascii	"%i\000"
	.align	2
.LC2:
	.ascii	"Enter CONSOLE if you want to enter array values fro"
	.ascii	"m the console, or enter RANDOM if you want to popul"
	.ascii	"ate the array with random numbers: \000"
	.align	2
.LC3:
	.ascii	"%s\000"
	.align	2
.LC4:
	.ascii	"CONSOLE\000"
	.align	2
.LC5:
	.ascii	"console\000"
	.align	2
.LC6:
	.ascii	"Console\000"
	.align	2
.LC7:
	.ascii	"Enter array elements: \000"
	.align	2
.LC8:
	.ascii	"RANDOM\000"
	.align	2
.LC9:
	.ascii	"random\000"
	.align	2
.LC10:
	.ascii	"Random\000"
	.align	2
.LC11:
	.ascii	"Incorrect input!\000"
	.align	2
.LC12:
	.ascii	"%i \000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	ldr	r3, .L28
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-52]
	ldr	r0, .L28+4
	bl	printf
	sub	r3, fp, #52
	mov	r1, r3
	ldr	r0, .L28+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r0, .L28+12
	bl	printf
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, .L28+16
	bl	__isoc99_scanf
	sub	r3, fp, #16
	ldr	r1, .L28+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L8
	sub	r3, fp, #16
	ldr	r1, .L28+24
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L8
	sub	r3, fp, #16
	ldr	r1, .L28+28
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
.L8:
	ldr	r0, .L28+32
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L10
.L11:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L28+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L10:
	ldr	r3, [fp, #-52]
	ldr	r2, [fp, #-48]
	cmp	r2, r3
	blt	.L11
	b	.L12
.L9:
	sub	r3, fp, #16
	ldr	r1, .L28+36
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L13
	sub	r3, fp, #16
	ldr	r1, .L28+40
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L13
	sub	r3, fp, #16
	ldr	r1, .L28+44
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L14
.L13:
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L15
.L16:
	bl	rand
	mov	r3, r0
	rsbs	r2, r3, #0
	and	r3, r3, #31
	and	r2, r2, #31
	rsbpl	r3, r2, #0
	ldr	r2, [fp, #-44]
	lsl	r2, r2, #2
	ldr	r1, [fp, #-28]
	add	r2, r1, r2
	add	r3, r3, #11
	str	r3, [r2]
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L15:
	ldr	r3, [fp, #-52]
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	blt	.L16
	b	.L12
.L14:
	ldr	r0, .L28+48
	bl	printf
	mov	r3, #0
	b	.L26
.L12:
	ldr	r3, [fp, #-52]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L18
	ldr	r3, [fp, #-52]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	b	.L19
.L18:
	ldr	r3, [fp, #-52]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	add	r3, r3, #1
.L19:
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L20
.L21:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r2, r2, r3
	ldr	r3, [fp, #-40]
	lsr	r1, r3, #31
	add	r3, r1, r3
	asr	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r1, [fp, #-20]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-40]
	add	r3, r3, #2
	str	r3, [fp, #-40]
.L20:
	ldr	r3, [fp, #-52]
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	blt	.L21
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-20]
	bl	insertionSort
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L22
.L23:
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r2, r2, r3
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #3
	ldr	r1, [fp, #-28]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L22:
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L23
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L24
.L25:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L28+52
	bl	printf
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L24:
	ldr	r3, [fp, #-52]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	blt	.L25
	ldr	r0, [fp, #-28]
	bl	free
	ldr	r0, [fp, #-20]
	bl	free
	mov	r3, #0
.L26:
	ldr	r2, .L28
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L27
	bl	__stack_chk_fail
.L27:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L29:
	.align	2
.L28:
	.word	.LC13
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
