	.file	"18576.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"ERROR: %s\n"
	.text
	.globl	die
	.type	die, @function
die:
.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
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L2
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	perror@PLT
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
.L3:
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	die, .-die
	.section	.rodata
.LC1:
	.string	"the_stack_data/18576.c"
.LC2:
	.string	"numbers != NULL"
.LC3:
	.string	"cmp != NULL"
.LC4:
	.string	"target != NULL"
	.text
	.globl	bubblesort
	.type	bubblesort, @function
bubblesort:
.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	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	QWORD PTR -56[rbp], rdx
	cmp	QWORD PTR -40[rbp], 0
	jne	.L5
	lea	rcx, __PRETTY_FUNCTION__.3[rip]
	mov	edx, 23
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	__assert_fail@PLT
.L5:
	cmp	QWORD PTR -56[rbp], 0
	jne	.L6
	lea	rcx, __PRETTY_FUNCTION__.3[rip]
	mov	edx, 24
	lea	rsi, .LC1[rip]
	lea	rdi, .LC3[rip]
	call	__assert_fail@PLT
.L6:
	mov	DWORD PTR -12[rbp], 0
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L7
	lea	rcx, __PRETTY_FUNCTION__.3[rip]
	mov	edx, 29
	lea	rsi, .LC1[rip]
	lea	rdi, .LC4[rip]
	call	__assert_fail@PLT
.L7:
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rcx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	DWORD PTR -20[rbp], 0
	jmp	.L8
.L12:
	mov	DWORD PTR -16[rbp], 0
	jmp	.L9
.L11:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rcx
	mov	rdi, rdx
	call	rax
	test	eax, eax
	jle	.L10
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -16[rbp]
	movsx	rdx, edx
	add	rdx, 1
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -8[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR [rdx], eax
.L10:
	add	DWORD PTR -16[rbp], 1
.L9:
	mov	eax, DWORD PTR -44[rbp]
	sub	eax, 1
	cmp	DWORD PTR -16[rbp], eax
	jl	.L11
	add	DWORD PTR -20[rbp], 1
.L8:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L12
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	bubblesort, .-bubblesort
	.section	.rodata
.LC5:
	.string	"numbers_sorted != NULL"
	.text
	.globl	quicksort
	.type	quicksort, @function
quicksort:
.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 -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	QWORD PTR -40[rbp], rdx
	cmp	QWORD PTR -24[rbp], 0
	jne	.L15
	lea	rcx, __PRETTY_FUNCTION__.2[rip]
	mov	edx, 48
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	__assert_fail@PLT
.L15:
	cmp	QWORD PTR -40[rbp], 0
	jne	.L16
	lea	rcx, __PRETTY_FUNCTION__.2[rip]
	mov	edx, 49
	lea	rsi, .LC1[rip]
	lea	rdi, .LC3[rip]
	call	__assert_fail@PLT
.L16:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L17
	lea	rcx, __PRETTY_FUNCTION__.2[rip]
	mov	edx, 52
	lea	rsi, .LC1[rip]
	lea	rdi, .LC5[rip]
	call	__assert_fail@PLT
.L17:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	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	eax, DWORD PTR -28[rbp]
	movsx	rsi, eax
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rdx
	mov	edx, 4
	mov	rdi, rax
	call	qsort@PLT
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	quicksort, .-quicksort
	.globl	sorted_order
	.type	sorted_order, @function
sorted_order:
.LFB9:
	.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 -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	ecx, DWORD PTR [rax]
	mov	eax, edx
	sub	eax, ecx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	sorted_order, .-sorted_order
	.globl	reverse_order
	.type	reverse_order, @function
reverse_order:
.LFB10:
	.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 -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR [rax]
	mov	eax, edx
	sub	eax, ecx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	reverse_order, .-reverse_order
	.section	.rodata
.LC6:
	.string	"algo != NULL"
.LC7:
	.string	"%d "
	.text
	.globl	test_sorting
	.type	test_sorting, @function
test_sorting:
.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 -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -48[rbp], rcx
	cmp	QWORD PTR -24[rbp], 0
	jne	.L24
	lea	rcx, __PRETTY_FUNCTION__.1[rip]
	mov	edx, 74
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	__assert_fail@PLT
.L24:
	cmp	QWORD PTR -40[rbp], 0
	jne	.L25
	lea	rcx, __PRETTY_FUNCTION__.1[rip]
	mov	edx, 75
	lea	rsi, .LC1[rip]
	lea	rdi, .LC6[rip]
	call	__assert_fail@PLT
.L25:
	cmp	QWORD PTR -48[rbp], 0
	jne	.L26
	lea	rcx, __PRETTY_FUNCTION__.1[rip]
	mov	edx, 76
	lea	rsi, .LC1[rip]
	lea	rdi, .LC3[rip]
	call	__assert_fail@PLT
.L26:
	mov	rdx, QWORD PTR -48[rbp]
	mov	ecx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r8, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	r8
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -12[rbp], 0
	jmp	.L27
.L28:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -12[rbp], 1
.L27:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L28
	mov	edi, 10
	call	putchar@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	test_sorting, .-test_sorting
	.section	.rodata
.LC8:
	.string	"USAGE: ex18 4 3 1 5 6"
	.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
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	cmp	DWORD PTR -52[rbp], 1
	jg	.L30
	lea	rdi, .LC8[rip]
	call	die
.L30:
	mov	eax, DWORD PTR -52[rbp]
	sub	eax, 1
	mov	DWORD PTR -36[rbp], eax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L31
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 99
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	__assert_fail@PLT
.L31:
	mov	DWORD PTR -40[rbp], 0
	jmp	.L32
.L33:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -40[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR [rbx], eax
	add	DWORD PTR -40[rbp], 1
.L32:
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L33
	mov	esi, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, sorted_order[rip]
	lea	rdx, quicksort[rip]
	mov	rdi, rax
	call	test_sorting
	mov	esi, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, reverse_order[rip]
	lea	rdx, quicksort[rip]
	mov	rdi, rax
	call	test_sorting
	mov	esi, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, sorted_order[rip]
	lea	rdx, bubblesort[rip]
	mov	rdi, rax
	call	test_sorting
	mov	esi, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, reverse_order[rip]
	lea	rdx, bubblesort[rip]
	mov	rdi, rax
	call	test_sorting
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	main, .-main
	.section	.rodata
	.align 8
	.type	__PRETTY_FUNCTION__.3, @object
	.size	__PRETTY_FUNCTION__.3, 11
__PRETTY_FUNCTION__.3:
	.string	"bubblesort"
	.align 8
	.type	__PRETTY_FUNCTION__.2, @object
	.size	__PRETTY_FUNCTION__.2, 10
__PRETTY_FUNCTION__.2:
	.string	"quicksort"
	.align 8
	.type	__PRETTY_FUNCTION__.1, @object
	.size	__PRETTY_FUNCTION__.1, 13
__PRETTY_FUNCTION__.1:
	.string	"test_sorting"
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 5
__PRETTY_FUNCTION__.0:
	.string	"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	"18576.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"ERROR: %s\012\000"
	.text
	.align	2
	.global	die
	.syntax unified
	.arm
	.fpu softvfp
	.type	die, %function
die:
	@ 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]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L2
	ldr	r0, [fp, #-8]
	bl	perror
	b	.L3
.L2:
	ldr	r1, [fp, #-8]
	ldr	r0, .L4
	bl	printf
.L3:
	mov	r0, #1
	bl	exit
.L5:
	.align	2
.L4:
	.word	.LC0
	.size	die, .-die
	.section	.rodata
	.align	2
.LC1:
	.ascii	"the_stack_data/18576.c\000"
	.align	2
.LC2:
	.ascii	"numbers != NULL\000"
	.align	2
.LC3:
	.ascii	"cmp != NULL\000"
	.align	2
.LC4:
	.ascii	"target != NULL\000"
	.text
	.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
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L7
	ldr	r3, .L16
	mov	r2, #23
	ldr	r1, .L16+4
	ldr	r0, .L16+8
	bl	__assert_fail
.L7:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L8
	ldr	r3, .L16
	mov	r2, #24
	ldr	r1, .L16+4
	ldr	r0, .L16+12
	bl	__assert_fail
.L8:
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L9
	ldr	r3, .L16
	mov	r2, #29
	ldr	r1, .L16+4
	ldr	r0, .L16+16
	bl	__assert_fail
.L9:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-8]
	bl	memcpy
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L10
.L14:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L11
.L13:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r0, r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r2, r2, r3
	ldr	r3, [fp, #-32]
	mov	r1, r2
	blx	r3
	mov	r3, r0
	cmp	r3, #0
	ble	.L12
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r1, [fp, #-8]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	str	r2, [r3]
.L12:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L11:
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L13
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L10:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L14
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	__PRETTY_FUNCTION__.5326
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	bubblesort, .-bubblesort
	.section	.rodata
	.align	2
.LC5:
	.ascii	"numbers_sorted != NULL\000"
	.text
	.align	2
	.global	quicksort
	.syntax unified
	.arm
	.fpu softvfp
	.type	quicksort, %function
quicksort:
	@ 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]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L19
	ldr	r3, .L23
	mov	r2, #48
	ldr	r1, .L23+4
	ldr	r0, .L23+8
	bl	__assert_fail
.L19:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L20
	ldr	r3, .L23
	mov	r2, #49
	ldr	r1, .L23+4
	ldr	r0, .L23+12
	bl	__assert_fail
.L20:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L21
	ldr	r3, .L23
	mov	r2, #52
	ldr	r1, .L23+4
	ldr	r0, .L23+16
	bl	__assert_fail
.L21:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-8]
	bl	memcpy
	ldr	r1, [fp, #-20]
	ldr	r3, [fp, #-24]
	mov	r2, #4
	ldr	r0, [fp, #-8]
	bl	qsort
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	__PRETTY_FUNCTION__.5342
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC5
	.size	quicksort, .-quicksort
	.align	2
	.global	sorted_order
	.syntax unified
	.arm
	.fpu softvfp
	.type	sorted_order, %function
sorted_order:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	sub	r3, r2, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	sorted_order, .-sorted_order
	.align	2
	.global	reverse_order
	.syntax unified
	.arm
	.fpu softvfp
	.type	reverse_order, %function
reverse_order:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	sub	r3, r2, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	reverse_order, .-reverse_order
	.section	.rodata
	.align	2
.LC6:
	.ascii	"algo != NULL\000"
	.align	2
.LC7:
	.ascii	"%d \000"
	.text
	.align	2
	.global	test_sorting
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_sorting, %function
test_sorting:
	@ 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]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L30
	ldr	r3, .L35
	mov	r2, #74
	ldr	r1, .L35+4
	ldr	r0, .L35+8
	bl	__assert_fail
.L30:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L31
	ldr	r3, .L35
	mov	r2, #75
	ldr	r1, .L35+4
	ldr	r0, .L35+12
	bl	__assert_fail
.L31:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L32
	ldr	r3, .L35
	mov	r2, #76
	ldr	r1, .L35+4
	ldr	r0, .L35+16
	bl	__assert_fail
.L32:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	blx	r3
	str	r0, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L33
.L34:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L35+20
	bl	printf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L33:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L34
	mov	r0, #10
	bl	putchar
	ldr	r0, [fp, #-8]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L36:
	.align	2
.L35:
	.word	__PRETTY_FUNCTION__.5358
	.word	.LC1
	.word	.LC2
	.word	.LC6
	.word	.LC3
	.word	.LC7
	.size	test_sorting, .-test_sorting
	.section	.rodata
	.align	2
.LC8:
	.ascii	"USAGE: ex18 4 3 1 5 6\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, [fp, #-32]
	cmp	r3, #1
	bgt	.L38
	ldr	r0, .L43
	bl	die
.L38:
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L39
	ldr	r3, .L43+4
	mov	r2, #99
	ldr	r1, .L43+8
	ldr	r0, .L43+12
	bl	__assert_fail
.L39:
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L40
.L41:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r4, r2, r3
	mov	r0, r1
	bl	atoi
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L40:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L41
	ldr	r3, .L43+16
	ldr	r2, .L43+20
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	test_sorting
	ldr	r3, .L43+24
	ldr	r2, .L43+20
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	test_sorting
	ldr	r3, .L43+16
	ldr	r2, .L43+28
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	test_sorting
	ldr	r3, .L43+24
	ldr	r2, .L43+28
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	test_sorting
	ldr	r0, [fp, #-16]
	bl	free
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L44:
	.align	2
.L43:
	.word	.LC8
	.word	__PRETTY_FUNCTION__.5371
	.word	.LC1
	.word	.LC2
	.word	sorted_order
	.word	quicksort
	.word	reverse_order
	.word	bubblesort
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.5326, %object
	.size	__PRETTY_FUNCTION__.5326, 11
__PRETTY_FUNCTION__.5326:
	.ascii	"bubblesort\000"
	.align	2
	.type	__PRETTY_FUNCTION__.5342, %object
	.size	__PRETTY_FUNCTION__.5342, 10
__PRETTY_FUNCTION__.5342:
	.ascii	"quicksort\000"
	.align	2
	.type	__PRETTY_FUNCTION__.5358, %object
	.size	__PRETTY_FUNCTION__.5358, 13
__PRETTY_FUNCTION__.5358:
	.ascii	"test_sorting\000"
	.align	2
	.type	__PRETTY_FUNCTION__.5371, %object
	.size	__PRETTY_FUNCTION__.5371, 5
__PRETTY_FUNCTION__.5371:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
