	.file	"107953822.c"
	.intel_syntax noprefix
	.text
	.globl	arr
	.bss
	.align 32
	.type	arr, @object
	.size	arr, 40
arr:
	.zero	40
	.section	.rodata
.LC0:
	.string	"Unsorted Array: "
.LC1:
	.string	"\n\nSorted Array"
	.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
	mov	eax, 0
	call	generateArray
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, 0
	call	printArray
	mov	eax, 0
	call	BSort
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, 0
	call	printArray
	mov	eax, 0
	call	getch@PLT
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	generateArray
	.type	generateArray, @function
generateArray:
.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, 16
	mov	DWORD PTR -8[rbp], 0
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	jmp	.L4
.L5:
	call	rand@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	edx, DWORD PTR -4[rbp]
	movsx	rax, edx
	imul	rax, rax, 1374389535
	shr	rax, 32
	sar	eax, 5
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	imul	ecx, eax, 100
	mov	eax, edx
	sub	eax, ecx
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, arr[rip]
	mov	DWORD PTR [rcx+rdx], eax
	add	DWORD PTR -8[rbp], 1
.L4:
	cmp	DWORD PTR -8[rbp], 9
	jle	.L5
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	generateArray, .-generateArray
	.section	.rodata
.LC2:
	.string	"%d "
	.text
	.globl	printArray
	.type	printArray, @function
printArray:
.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, 16
	mov	DWORD PTR -4[rbp], 0
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, arr[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L7:
	cmp	DWORD PTR -4[rbp], 9
	jle	.L8
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	printArray, .-printArray
	.globl	Swap
	.type	Swap, @function
Swap:
.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 -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -4[rbp]
	mov	DWORD PTR [rax], edx
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	Swap, .-Swap
	.globl	BSort
	.type	BSort, @function
BSort:
.LFB10:
	.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	DWORD PTR -12[rbp], 0
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L11
.L17:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L12
.L14:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, arr[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 1
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, arr[rip]
	mov	eax, DWORD PTR [rcx+rax]
	cmp	edx, eax
	jle	.L13
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 1
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, arr[rip]
	add	rdx, rax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, arr[rip]
	add	rax, rcx
	mov	rsi, rdx
	mov	rdi, rax
	call	Swap
	mov	DWORD PTR -4[rbp], 1
.L13:
	add	DWORD PTR -8[rbp], 1
.L12:
	mov	eax, 9
	sub	eax, DWORD PTR -12[rbp]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L14
	mov	DWORD PTR -8[rbp], 0
	cmp	DWORD PTR -4[rbp], 0
	je	.L18
	add	DWORD PTR -12[rbp], 1
.L11:
	cmp	DWORD PTR -12[rbp], 9
	jle	.L17
	jmp	.L19
.L18:
	nop
.L19:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	BSort, .-BSort
	.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	"107953822.c"
	.text
	.comm	arr,40,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Unsorted Array: \000"
	.align	2
.LC1:
	.ascii	"\012\012Sorted Array\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	generateArray
	ldr	r0, .L3
	bl	puts
	bl	printArray
	bl	BSort
	ldr	r0, .L3+4
	bl	puts
	bl	printArray
	bl	getch
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.align	2
	.global	generateArray
	.syntax unified
	.arm
	.fpu softvfp
	.type	generateArray, %function
generateArray:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	b	.L6
.L7:
	bl	rand
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r3, .L8
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	ldr	r1, .L8+4
	ldr	r3, [fp, #-12]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L6:
	ldr	r3, [fp, #-12]
	cmp	r3, #9
	ble	.L7
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	1374389535
	.word	arr
	.size	generateArray, .-generateArray
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%d \000"
	.text
	.align	2
	.global	printArray
	.syntax unified
	.arm
	.fpu softvfp
	.type	printArray, %function
printArray:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L11
.L12:
	ldr	r2, .L13
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L13+4
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L11:
	ldr	r3, [fp, #-8]
	cmp	r3, #9
	ble	.L12
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	arr
	.word	.LC2
	.size	printArray, .-printArray
	.align	2
	.global	Swap
	.syntax unified
	.arm
	.fpu softvfp
	.type	Swap, %function
Swap:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	Swap, .-Swap
	.align	2
	.global	BSort
	.syntax unified
	.arm
	.fpu softvfp
	.type	BSort, %function
BSort:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L17
.L23:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L18
.L20:
	ldr	r2, .L26
	ldr	r3, [fp, #-12]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	ldr	r1, .L26
	ldr	r3, [r1, r3, lsl #2]
	cmp	r2, r3
	ble	.L19
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, .L26
	add	r2, r3, r2
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r1, .L26
	add	r3, r3, r1
	mov	r1, r3
	mov	r0, r2
	bl	Swap
	mov	r3, #1
	str	r3, [fp, #-8]
.L19:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L18:
	ldr	r3, [fp, #-16]
	rsb	r3, r3, #9
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L20
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L24
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L17:
	ldr	r3, [fp, #-16]
	cmp	r3, #9
	ble	.L23
	b	.L25
.L24:
	nop
.L25:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	arr
	.size	BSort, .-BSort
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
