	.file	"799004.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Pre-sort array: "
.LC1:
	.string	"%d "
.LC2:
	.string	"Sorted array:   "
.LC3:
	.string	"PAUSE"
	.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
	add	rsp, -128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -80[rbp], 5
	mov	DWORD PTR -76[rbp], 1
	mov	DWORD PTR -72[rbp], 5
	mov	DWORD PTR -68[rbp], 2
	mov	DWORD PTR -64[rbp], 1
	mov	DWORD PTR -60[rbp], 2
	mov	DWORD PTR -56[rbp], 1
	mov	DWORD PTR -52[rbp], 5
	mov	DWORD PTR -120[rbp], 5
	mov	DWORD PTR -116[rbp], 8
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -124[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -124[rbp], 1
.L2:
	mov	eax, DWORD PTR -124[rbp]
	cmp	eax, DWORD PTR -116[rbp]
	jl	.L3
	mov	edi, 10
	call	putchar@PLT
	mov	DWORD PTR -124[rbp], 0
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	mov	DWORD PTR -112[rbp+rax*4], 0
	add	DWORD PTR -124[rbp], 1
.L4:
	mov	eax, DWORD PTR -124[rbp]
	cmp	eax, DWORD PTR -120[rbp]
	jl	.L5
	mov	DWORD PTR -124[rbp], 0
	jmp	.L6
.L7:
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	mov	DWORD PTR -48[rbp+rax*4], 0
	add	DWORD PTR -124[rbp], 1
.L6:
	mov	eax, DWORD PTR -124[rbp]
	cmp	eax, DWORD PTR -116[rbp]
	jl	.L7
	mov	DWORD PTR -124[rbp], 0
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -112[rbp+rax*4]
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	sub	eax, 1
	add	edx, 1
	cdqe
	mov	DWORD PTR -112[rbp+rax*4], edx
	add	DWORD PTR -124[rbp], 1
.L8:
	mov	eax, DWORD PTR -124[rbp]
	cmp	eax, DWORD PTR -116[rbp]
	jl	.L9
	mov	DWORD PTR -124[rbp], 1
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	mov	edx, DWORD PTR -112[rbp+rax*4]
	mov	eax, DWORD PTR -124[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -112[rbp+rax*4]
	add	edx, eax
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	mov	DWORD PTR -112[rbp+rax*4], edx
	add	DWORD PTR -124[rbp], 1
.L10:
	mov	eax, DWORD PTR -124[rbp]
	cmp	eax, DWORD PTR -120[rbp]
	jl	.L11
	mov	eax, DWORD PTR -116[rbp]
	sub	eax, 1
	mov	DWORD PTR -124[rbp], eax
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -112[rbp+rax*4]
	lea	ecx, -1[rax]
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	mov	edx, DWORD PTR -80[rbp+rax*4]
	movsx	rax, ecx
	mov	DWORD PTR -48[rbp+rax*4], edx
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -112[rbp+rax*4]
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	sub	eax, 1
	sub	edx, 1
	cdqe
	mov	DWORD PTR -112[rbp+rax*4], edx
	sub	DWORD PTR -124[rbp], 1
.L12:
	cmp	DWORD PTR -124[rbp], 0
	js	.L13
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -124[rbp], 0
	jmp	.L14
.L15:
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	mov	eax, DWORD PTR -48[rbp+rax*4]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -124[rbp], 1
.L14:
	mov	eax, DWORD PTR -124[rbp]
	cmp	eax, DWORD PTR -116[rbp]
	jl	.L15
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC3[rip]
	call	system@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"799004.c"
	.text
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Pre-sort array: \000"
	.align	2
.LC2:
	.ascii	"%d \000"
	.align	2
.LC3:
	.ascii	"Sorted array:   \000"
	.align	2
.LC4:
	.ascii	"PAUSE\000"
	.align	2
.LC0:
	.word	5
	.word	1
	.word	5
	.word	2
	.word	1
	.word	2
	.word	1
	.word	5
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #104
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L18+4
	sub	ip, fp, #72
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	mov	r3, #5
	str	r3, [fp, #-100]
	mov	r3, #8
	str	r3, [fp, #-96]
	ldr	r0, .L18+8
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L2
.L3:
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-68]
	mov	r1, r3
	ldr	r0, .L18+12
	bl	printf
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L2:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	cmp	r2, r3
	blt	.L3
	mov	r0, #10
	bl	putchar
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L4
.L5:
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #-88]
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L4:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-100]
	cmp	r2, r3
	blt	.L5
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L6
.L7:
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #-36]
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L6:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	cmp	r2, r3
	blt	.L7
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L8
.L9:
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-68]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-88]
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-68]
	sub	r3, r3, #1
	add	r2, r2, #1
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-88]
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L8:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	cmp	r2, r3
	blt	.L9
	mov	r3, #1
	str	r3, [fp, #-104]
	b	.L10
.L11:
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-88]
	ldr	r3, [fp, #-104]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-88]
	add	r2, r2, r3
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-88]
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L10:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-100]
	cmp	r2, r3
	blt	.L11
	ldr	r3, [fp, #-96]
	sub	r3, r3, #1
	str	r3, [fp, #-104]
	b	.L12
.L13:
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-68]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-88]
	sub	r1, r3, #1
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-68]
	lsl	r3, r1, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-36]
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-68]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-88]
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-68]
	sub	r3, r3, #1
	sub	r2, r2, #1
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-88]
	ldr	r3, [fp, #-104]
	sub	r3, r3, #1
	str	r3, [fp, #-104]
.L12:
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	blt	.L13
	ldr	r0, .L18+16
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L14
.L15:
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-36]
	mov	r1, r3
	ldr	r0, .L18+12
	bl	printf
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L14:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	cmp	r2, r3
	blt	.L15
	mov	r0, #10
	bl	putchar
	ldr	r0, .L18+20
	bl	system
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
