	.file	"72013725.c"
	.intel_syntax noprefix
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.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 -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
.LFE6:
	.size	cmp, .-cmp
	.globl	init
	.bss
	.align 32
	.type	init, @object
	.size	init, 400
init:
	.zero	400
	.globl	partial
	.align 32
	.type	partial, @object
	.size	partial, 400
partial:
	.zero	400
	.globl	ok
	.type	ok, @object
	.size	ok, 1
ok:
	.zero	1
	.section	.rodata
.LC0:
	.string	"Insertion Sort"
.LC1:
	.string	"%d"
	.text
	.globl	try_insert_sort
	.type	try_insert_sort, @function
try_insert_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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	eax, DWORD PTR -36[rbp]
	sub	eax, 1
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, partial[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L4
.L7:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, partial[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -16[rbp], eax
	jge	.L5
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, partial[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -16[rbp], eax
.L5:
	sub	DWORD PTR -20[rbp], 1
.L4:
	cmp	DWORD PTR -20[rbp], 0
	js	.L6
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, init[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, partial[rip]
	mov	eax, DWORD PTR [rcx+rax]
	cmp	edx, eax
	je	.L7
.L6:
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -8[rbp], eax
	jmp	.L8
.L10:
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 1
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, partial[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, partial[rip]
	mov	eax, DWORD PTR [rcx+rax]
	cmp	edx, eax
	jl	.L14
.L8:
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -8[rbp], edx
	test	eax, eax
	jne	.L10
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	BYTE PTR ok[rip], 1
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, partial[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, partial[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	mov	esi, ecx
	xor	esi, edx
	movsx	rdx, eax
	lea	rcx, 0[0+rdx*4]
	lea	rdx, partial[rip]
	mov	DWORD PTR [rcx+rdx], esi
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, partial[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, partial[rip]
	mov	eax, DWORD PTR [rdx+rax]
	xor	ecx, eax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, partial[rip]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, partial[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, partial[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	xor	ecx, edx
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, partial[rip]
	mov	DWORD PTR [rdx+rax], ecx
	mov	DWORD PTR -4[rbp], 0
	jmp	.L11
.L13:
	cmp	DWORD PTR -4[rbp], 0
	je	.L12
	mov	edi, 32
	call	putchar@PLT
.L12:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, partial[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L11:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L13
	jmp	.L3
.L14:
	nop
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	try_insert_sort, .-try_insert_sort
	.globl	try_heap_sort
	.type	try_heap_sort, @function
try_heap_sort:
.LFB8:
	.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 -4[rbp], edi
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	try_heap_sort, .-try_heap_sort
	.globl	main
	.type	main, @function
main:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -20[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -16[rbp], 0
	jmp	.L17
.L18:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, init[rip]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -16[rbp], 1
.L17:
	mov	eax, DWORD PTR -20[rbp]
	cmp	DWORD PTR -16[rbp], eax
	jl	.L18
	mov	DWORD PTR -12[rbp], 0
	jmp	.L19
.L20:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, partial[rip]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -12[rbp], 1
.L19:
	mov	eax, DWORD PTR -20[rbp]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L20
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	try_insert_sort
	movzx	eax, BYTE PTR ok[rip]
	xor	eax, 1
	test	al, al
	je	.L21
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	try_heap_sort
.L21:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"72013725.c"
	.text
	.align	2
	.global	cmp
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmp, %function
cmp:
	@ 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	cmp, .-cmp
	.comm	init,400,4
	.comm	partial,400,4
	.global	ok
	.bss
	.type	ok, %object
	.size	ok, 1
ok:
	.space	1
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Insertion Sort\000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.text
	.align	2
	.global	try_insert_sort
	.syntax unified
	.arm
	.fpu softvfp
	.type	try_insert_sort, %function
try_insert_sort:
	@ 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, #-32]
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r2, .L15
	ldr	r3, [fp, #-24]
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	b	.L4
.L7:
	ldr	r2, .L15
	ldr	r3, [fp, #-24]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bge	.L5
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	ldr	r2, .L15
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [fp, #-20]
.L5:
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
.L4:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	blt	.L6
	ldr	r2, .L15+4
	ldr	r3, [fp, #-24]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L15
	ldr	r3, [fp, #-24]
	ldr	r3, [r1, r3, lsl #2]
	cmp	r2, r3
	beq	.L7
.L6:
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-12]
	b	.L8
.L10:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	ldr	r2, .L15
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L15
	ldr	r3, [fp, #-12]
	ldr	r3, [r1, r3, lsl #2]
	cmp	r2, r3
	blt	.L14
.L8:
	ldr	r3, [fp, #-12]
	sub	r2, r3, #1
	str	r2, [fp, #-12]
	cmp	r3, #0
	bne	.L10
	ldr	r0, .L15+8
	bl	puts
	ldr	r3, .L15+12
	mov	r2, #1
	strb	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	ldr	r2, .L15
	ldr	r1, [r2, r3, lsl #2]
	ldr	r2, .L15
	ldr	r3, [fp, #-16]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	eor	r2, r2, r1
	ldr	r1, .L15
	str	r2, [r1, r3, lsl #2]
	ldr	r2, .L15
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L15
	ldr	r3, [fp, #-16]
	ldr	r3, [r1, r3, lsl #2]
	eor	r2, r2, r3
	ldr	r1, .L15
	ldr	r3, [fp, #-16]
	str	r2, [r1, r3, lsl #2]
	ldr	r2, .L15
	ldr	r3, [fp, #-16]
	ldr	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	ldr	r2, .L15
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	eor	r2, r2, r1
	ldr	r1, .L15
	str	r2, [r1, r3, lsl #2]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L11
.L13:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L12
	mov	r0, #32
	bl	putchar
.L12:
	ldr	r2, .L15
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L15+16
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L11:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L13
	b	.L3
.L14:
	nop
.L3:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	partial
	.word	init
	.word	.LC0
	.word	ok
	.word	.LC1
	.size	try_insert_sort, .-try_insert_sort
	.align	2
	.global	try_heap_sort
	.syntax unified
	.arm
	.fpu softvfp
	.type	try_heap_sort, %function
try_heap_sort:
	@ 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]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	try_heap_sort, .-try_heap_sort
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L26+4
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L19
.L20:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, .L26+8
	add	r3, r3, r2
	mov	r1, r3
	ldr	r0, .L26+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L19:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L20
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L21
.L22:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, .L26+12
	add	r3, r3, r2
	mov	r1, r3
	ldr	r0, .L26+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L21:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L22
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	try_insert_sort
	ldr	r3, .L26+16
	ldrb	r3, [r3]	@ zero_extendqisi2
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L23
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	try_heap_sort
.L23:
	mov	r3, #0
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC2
	.word	.LC1
	.word	init
	.word	partial
	.word	ok
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
