	.file	"90532.c"
	.intel_syntax noprefix
	.text
	.type	exch, @function
exch:
.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, 80
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -64[rbp], rcx
	mov	QWORD PTR -72[rbp], r8
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L2
	mov	eax, -1
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -64[rbp]
	imul	rax, QWORD PTR -56[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	imul	rax, QWORD PTR -56[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rdx, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memmove@PLT
	mov	rdx, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	exch, .-exch
	.type	comp, @function
comp:
.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 -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -48[rbp], rcx
	mov	QWORD PTR -56[rbp], r8
	mov	QWORD PTR -64[rbp], r9
	mov	rax, QWORD PTR -64[rbp]
	imul	rax, QWORD PTR -40[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR 16[rbp]
	imul	rax, QWORD PTR -40[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	r8, QWORD PTR -48[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	r8
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	comp, .-comp
	.globl	selection_sort
	.type	selection_sort, @function
selection_sort:
.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, 80
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -64[rbp], rcx
	mov	QWORD PTR -72[rbp], r8
	cmp	QWORD PTR -40[rbp], 0
	je	.L15
	cmp	QWORD PTR -64[rbp], 0
	je	.L16
	mov	QWORD PTR -24[rbp], 0
	jmp	.L10
.L14:
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	mov	QWORD PTR -16[rbp], rax
	jmp	.L11
.L13:
	mov	rdi, QWORD PTR -8[rbp]
	mov	r9, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	rsi, QWORD PTR -48[rbp]
	mov	r8, QWORD PTR -72[rbp]
	mov	rcx, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -40[rbp]
	sub	rsp, 8
	push	rdi
	mov	rdi, rax
	call	comp
	add	rsp, 16
	test	eax, eax
	jns	.L12
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -8[rbp], rax
.L12:
	add	QWORD PTR -16[rbp], 1
.L11:
	mov	rax, QWORD PTR -16[rbp]
	cmp	rax, QWORD PTR -48[rbp]
	jb	.L13
	mov	rdi, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -56[rbp]
	mov	rsi, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	r8, rdi
	mov	rdi, rax
	call	exch
	add	QWORD PTR -24[rbp], 1
.L10:
	mov	rax, QWORD PTR -24[rbp]
	cmp	rax, QWORD PTR -48[rbp]
	jb	.L14
	jmp	.L6
.L15:
	nop
	jmp	.L6
.L16:
	nop
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	selection_sort, .-selection_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	"90532.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	exch, %function
exch:
	@ args = 4, 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]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-32]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L2
	mvn	r3, #0
	b	.L3
.L2:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	mul	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	str	r3, [fp, #-12]
	ldr	r3, [fp, #4]
	ldr	r2, [fp, #-32]
	mul	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-32]
	mov	r2, r3
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	memcpy
	ldr	r3, [fp, #-32]
	mov	r2, r3
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	memmove
	ldr	r3, [fp, #-32]
	mov	r2, r3
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-8]
	bl	memcpy
	ldr	r0, [fp, #-16]
	bl	free
	mov	r3, #0
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	exch, .-exch
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	comp, %function
comp:
	@ args = 12, 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, #8]
	ldr	r2, [fp, #-24]
	mul	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	str	r3, [fp, #-12]
	ldr	r3, [fp, #12]
	ldr	r2, [fp, #-24]
	mul	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #4]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	blx	r3
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	comp, .-comp
	.align	2
	.global	selection_sort
	.syntax unified
	.arm
	.fpu softvfp
	.type	selection_sort, %function
selection_sort:
	@ args = 4, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L15
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L16
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L10
.L14:
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L11
.L13:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-32]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	str	r2, [sp, #8]
	str	r3, [sp, #4]
	ldr	r3, [fp, #4]
	str	r3, [sp]
	ldr	r3, [fp, #-36]
	mov	r2, r0
	ldr	r0, [fp, #-24]
	bl	comp
	mov	r3, r0
	cmp	r3, #0
	bge	.L12
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-8]
.L12:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L11:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	bcc	.L13
	ldr	r1, [fp, #-28]
	ldr	r2, [fp, #-32]
	ldr	r0, [fp, #-16]
	ldr	r3, [fp, #-8]
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, [fp, #-24]
	bl	exch
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L10:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	bcc	.L14
	b	.L6
.L15:
	nop
	b	.L6
.L16:
	nop
.L6:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	selection_sort, .-selection_sort
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
