	.file	"89201328.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"\n----------------------EXERCISE 1----------------------------------\n"
.LC1:
	.string	"%p"
.LC2:
	.string	"%13d"
	.align 8
.LC3:
	.string	"\n----------------------EXERCISE 2----------------------------------\n"
.LC4:
	.string	"%13d  "
	.align 8
.LC5:
	.string	"\n------------------------------------------------------------------\n"
.LC6:
	.string	"\nChcecking!"
	.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, 240
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	DWORD PTR -228[rbp], 42
	lea	rax, -228[rbp]
	mov	QWORD PTR -216[rbp], rax
	mov	rax, QWORD PTR -216[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -216[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdx, -208[rbp]
	mov	eax, 0
	mov	ecx, 25
	mov	rdi, rdx
	rep stosq
	mov	DWORD PTR -224[rbp], 0
	jmp	.L2
.L4:
	call	rand@PLT
	mov	edx, DWORD PTR -224[rbp]
	movsx	rdx, edx
	mov	DWORD PTR -208[rbp+rdx*4], eax
	mov	eax, DWORD PTR -224[rbp]
	cdqe
	mov	eax, DWORD PTR -208[rbp+rax*4]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -224[rbp], 1
	jle	.L3
	mov	eax, DWORD PTR -224[rbp]
	lea	edx, 1[rax]
	movsx	rax, edx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	sal	ecx, 2
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	test	eax, eax
	jne	.L3
	mov	edi, 10
	call	putchar@PLT
.L3:
	add	DWORD PTR -224[rbp], 1
.L2:
	mov	eax, DWORD PTR -224[rbp]
	cmp	eax, 49
	jbe	.L4
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 10
	call	putchar@PLT
	lea	rax, -208[rbp]
	mov	esi, 50
	mov	rdi, rax
	call	sort
	mov	edi, 10
	call	putchar@PLT
	mov	DWORD PTR -220[rbp], 0
	jmp	.L5
.L7:
	mov	eax, DWORD PTR -220[rbp]
	cdqe
	mov	eax, DWORD PTR -208[rbp+rax*4]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -220[rbp], 1
	jle	.L6
	mov	eax, DWORD PTR -220[rbp]
	lea	edx, 1[rax]
	movsx	rax, edx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	sal	ecx, 2
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	test	eax, eax
	jne	.L6
	mov	edi, 10
	call	putchar@PLT
.L6:
	add	DWORD PTR -220[rbp], 1
.L5:
	mov	eax, DWORD PTR -220[rbp]
	cmp	eax, 49
	jbe	.L7
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC7:
	.string	"\nSorting complete!"
	.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -28[rbp], 0
	lea	rax, -28[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -24[rbp], 0
	jmp	.L11
.L15:
	mov	DWORD PTR -20[rbp], 0
	jmp	.L12
.L14:
	mov	eax, DWORD PTR -20[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 -20[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	.L13
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	add	rdx, 1
	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 -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
.L13:
	add	DWORD PTR -20[rbp], 1
.L12:
	mov	eax, DWORD PTR -44[rbp]
	sub	eax, 1
	cmp	DWORD PTR -20[rbp], eax
	jl	.L14
	add	DWORD PTR -24[rbp], 1
.L11:
	mov	eax, DWORD PTR -44[rbp]
	sub	eax, 1
	cmp	DWORD PTR -24[rbp], eax
	jl	.L15
	lea	rdi, .LC7[rip]
	call	puts@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sort, .-sort
	.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	"89201328.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012----------------------EXERCISE 1---------------"
	.ascii	"-------------------\012\000"
	.align	2
.LC1:
	.ascii	"%p\000"
	.align	2
.LC2:
	.ascii	"%13d\000"
	.align	2
.LC3:
	.ascii	"\012----------------------EXERCISE 2---------------"
	.ascii	"-------------------\012\000"
	.align	2
.LC4:
	.ascii	"%13d  \000"
	.align	2
.LC5:
	.ascii	"\012-----------------------------------------------"
	.ascii	"-------------------\012\000"
	.align	2
.LC6:
	.ascii	"\012Chcecking!\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 224
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #224
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	ldr	r0, .L10+4
	bl	puts
	mov	r3, #42
	str	r3, [fp, #-224]
	sub	r3, fp, #224
	str	r3, [fp, #-212]
	ldr	r1, [fp, #-212]
	ldr	r0, .L10+8
	bl	printf
	ldr	r3, [fp, #-212]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L10+12
	bl	printf
	ldr	r0, .L10+16
	bl	puts
	sub	r3, fp, #208
	mov	r2, #200
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-220]
	b	.L2
.L4:
	bl	rand
	mov	r2, r0
	ldr	r3, [fp, #-220]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-204]
	ldr	r3, [fp, #-220]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-204]
	mov	r1, r3
	ldr	r0, .L10+20
	bl	printf
	ldr	r3, [fp, #-220]
	cmp	r3, #1
	ble	.L3
	ldr	r3, [fp, #-220]
	add	r1, r3, #1
	ldr	r3, .L10+24
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L3
	mov	r0, #10
	bl	putchar
.L3:
	ldr	r3, [fp, #-220]
	add	r3, r3, #1
	str	r3, [fp, #-220]
.L2:
	ldr	r3, [fp, #-220]
	cmp	r3, #49
	bls	.L4
	ldr	r0, .L10+28
	bl	puts
	mov	r0, #10
	bl	putchar
	sub	r3, fp, #208
	mov	r1, #50
	mov	r0, r3
	bl	sort
	mov	r0, #10
	bl	putchar
	mov	r3, #0
	str	r3, [fp, #-216]
	b	.L5
.L7:
	ldr	r3, [fp, #-216]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-204]
	mov	r1, r3
	ldr	r0, .L10+12
	bl	printf
	ldr	r3, [fp, #-216]
	cmp	r3, #1
	ble	.L6
	ldr	r3, [fp, #-216]
	add	r1, r3, #1
	ldr	r3, .L10+24
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L6
	mov	r0, #10
	bl	putchar
.L6:
	ldr	r3, [fp, #-216]
	add	r3, r3, #1
	str	r3, [fp, #-216]
.L5:
	ldr	r3, [fp, #-216]
	cmp	r3, #49
	bls	.L7
	ldr	r0, .L10+28
	bl	puts
	ldr	r0, .L10+32
	bl	puts
	mov	r3, #0
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC7
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	1717986919
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.section	.rodata
	.align	2
.LC8:
	.ascii	"\012Sorting complete!\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sort
	.syntax unified
	.arm
	.fpu softvfp
	.type	sort, %function
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]
	str	r1, [fp, #-36]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-24]
	sub	r3, fp, #24
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L13
.L17:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L14
.L16:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r1, [fp, #-32]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L15
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r1, [fp, #-32]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	ldr	r2, [r2]
	str	r2, [r3]
.L15:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L14:
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L16
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L13:
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L17
	ldr	r0, .L19+4
	bl	puts
	nop
	ldr	r3, .L19
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L18
	bl	__stack_chk_fail
.L18:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC9
	.word	.LC8
	.size	sort, .-sort
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
