Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>


typedef struct{
	int start;
	int end;
}DATA_T;


int Center_pos(DATA_T *box, int l, int r)
{
	int mid;

	mid = (l + r) / 2;

	if(box[l].end < box[mid].end && box[mid].end < box[r].end
	|| box[r].end < box[mid].end && box[mid].end < box[l].end)
		return mid;
	else if(box[mid].end < box[l].end && box[l].end < box[r].end
	|| box[r].end < box[l].end && box[l].end < box[mid].end)
		return l;
	else
		return r;

}


int Partition(DATA_T *box, int l, int r)
{
	DATA_T tmp;
	int i = l - 1;
	int j = r;
	int x, soeji;

	soeji = Center_pos(box, l, r);
	x = box[soeji].end;
	tmp = box[r];
	box[r] = box[soeji];
	box[soeji] = tmp;

	while(1){
		while(box[++i].end < x);

		while(i < --j && x < box[j].end);

		if(j <= i)
			break;

		tmp = box[i];
		box[i] = box[j];
		box[j] = tmp;
	}

	tmp = box[i];
	box[i] = box[r];
	box[r] = tmp;

	return i;
}


void Quick_sort(DATA_T *box, int l, int r)
{
	int pivot;

	if(r <= l)
		return;

	pivot = Partition(box, l, r);

	Quick_sort(box, l, pivot - 1);

	Quick_sort(box, pivot + 1, r);
}


int main()
{
	int n;
	DATA_T *activity;
	int *array;
	int count, etime;
	int i, j;

	scanf("%d", &n);

	activity = (DATA_T *)malloc(sizeof(DATA_T) * n);

	for(i = 0; i < n; i++)
		scanf("%d %d", &activity[i].start, &activity[i].end);


	Quick_sort(activity, 0, n - 1);

/*	printf("<sorted>\n");
	for(i = 0; i < n; i++)
		printf("%d %d\n", activity[i].start, activity[i].end);
*/
	etime = count = 0;
	for(i = 0; i < n; i++){
		if(etime < activity[i].start){
			count++;
			etime = activity[i].end;
		}
	}


	printf("%d\n", count);

	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	Center_pos
	.type	Center_pos, @function
Center_pos:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L2
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jl	.L3
.L2:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L4
.L3:
	movl	-4(%rbp), %eax
	jmp	.L5
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L6
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jl	.L7
.L6:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L8
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L8
.L7:
	movl	-28(%rbp), %eax
	jmp	.L5
.L8:
	movl	-32(%rbp), %eax
.L5:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Center_pos, .-Center_pos
	.globl	Partition
	.type	Partition, @function
Partition:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	%edx, -48(%rbp)
	movl	-44(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %ecx
	movq	-40(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	Center_pos
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	movl	%eax, -12(%rbp)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-48(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
.L15:
	nop
.L10:
	addl	$1, -24(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jg	.L10
	nop
.L12:
	subl	$1, -20(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L11
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L12
.L11:
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L18
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	jmp	.L15
.L18:
	nop
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	movl	-24(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Partition, .-Partition
	.globl	Quick_sort
	.type	Quick_sort, @function
Quick_sort:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-32(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L22
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	Partition
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	Quick_sort
	movl	-4(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %edx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	Quick_sort
	jmp	.L19
.L22:
	nop
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Quick_sort, .-Quick_sort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L24
.L25:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	addq	$4, %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movq	%rdx, %rcx
	movq	%rax, %rdx
	movq	%rcx, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L24:
	movl	-32(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L25
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-16(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	Quick_sort
	movl	$0, -28(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L26
.L28:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L27
	addl	$1, -28(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	movl	%eax, -24(%rbp)
.L27:
	addl	$1, -20(%rbp)
.L26:
	movl	-32(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L28
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	Center_pos
	.type	Center_pos, @function
Center_pos:
.LFB39:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	leal	(%rsi,%rdx), %edi
	movslq	%edx, %r9
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%edi, %eax
	movslq	%esi, %rdi
	sarl	%eax
	movl	4(%rcx,%rdi,8), %r8d
	movslq	%eax, %rdi
	movl	4(%rcx,%rdi,8), %edi
	movl	4(%rcx,%r9,8), %ecx
	cmpl	%edi, %r8d
	jge	.L2
	cmpl	%ecx, %edi
	jl	.L19
	cmpl	%ecx, %r8d
	movl	%esi, %eax
	cmovle	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	cmpl	%ecx, %edi
	jle	.L5
	cmpl	%edi, %r8d
	cmovle	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	cmpl	%ecx, %r8d
	jge	.L8
	cmpl	%edi, %r8d
	jle	.L8
	movl	%esi, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	Center_pos, .-Center_pos
	.p2align 4
	.globl	Partition
	.type	Partition, @function
Partition:
.LFB40:
	.cfi_startproc
	endbr64
	movslq	%esi, %rax
	leal	-1(%rsi), %r8d
	addl	%edx, %esi
	movq	%rdi, %r10
	leaq	(%rdi,%rax,8), %rdi
	movl	%esi, %eax
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	shrl	$31, %eax
	movl	4(%rdi), %r9d
	addl	%esi, %eax
	sarl	%eax
	cltq
	leaq	(%r10,%rax,8), %rsi
	movslq	%edx, %rax
	movl	4(%rsi), %ebx
	leaq	(%r10,%rax,8), %r11
	movl	4(%r11), %ecx
	cmpl	%ebx, %r9d
	jge	.L21
	cmpl	%ecx, %ebx
	jl	.L47
	cmpl	%ecx, %r9d
	jle	.L33
.L34:
	movl	%r9d, %ecx
	movq	%rdi, %rsi
.L22:
	movq	(%r11), %r9
	movq	(%rsi), %rbx
	movq	%rbx, (%r11)
	movq	%r9, (%rsi)
	.p2align 4,,10
	.p2align 3
.L26:
	movl	4(%rdi), %r9d
	addl	$1, %r8d
	cmpl	%ecx, %r9d
	jl	.L27
	leaq	-8(%r10,%rax,8), %rax
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L49:
	movq	%rax, %rsi
	subq	$8, %rax
	cmpl	%ecx, 12(%rax)
	jle	.L48
.L29:
	subl	$1, %edx
	cmpl	%edx, %r8d
	jl	.L49
	movd	(%rdi), %xmm0
	movq	(%r11), %rax
	movd	%r9d, %xmm2
	punpckldq	%xmm2, %xmm0
	movq	%rax, (%rdi)
	movl	%r8d, %eax
	movq	%xmm0, (%r11)
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	cmpl	%ecx, %ebx
	jle	.L24
	cmpl	%ebx, %r9d
	cmovg	%ebx, %ecx
	cmovle	%r11, %rsi
	jmp	.L22
.L24:
	cmpl	%ebx, %r9d
	jle	.L33
	cmpl	%ecx, %r9d
	jl	.L34
.L33:
	movq	%r11, %rsi
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L48:
	movd	(%rdi), %xmm0
	movq	(%rsi), %rax
	movd	%r9d, %xmm1
	punpckldq	%xmm1, %xmm0
	movq	%rax, (%rdi)
	movslq	%edx, %rax
	movq	%xmm0, (%rsi)
.L27:
	addq	$8, %rdi
	jmp	.L26
.L47:
	movl	%ebx, %ecx
	jmp	.L22
	.cfi_endproc
.LFE40:
	.size	Partition, .-Partition
	.p2align 4
	.globl	Quick_sort
	.type	Quick_sort, @function
Quick_sort:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	%edx, 36(%rsp)
	cmpl	%esi, %edx
	jle	.L50
	movq	%rdi, %r15
	movl	%esi, %r13d
.L51:
	movl	36(%rsp), %edx
	movl	%r13d, %esi
	movq	%r15, %rdi
	call	Partition
	movl	%eax, 40(%rsp)
	subl	$1, %eax
	movl	%eax, 24(%rsp)
	cmpl	%r13d, %eax
	jle	.L52
	movl	%r13d, %r14d
	movq	%r15, %r13
.L67:
	movl	24(%rsp), %edx
	movl	%r14d, %esi
	movq	%r13, %rdi
	call	Partition
	movl	%eax, 44(%rsp)
	subl	$1, %eax
	movl	%eax, 28(%rsp)
	cmpl	%r14d, %eax
	jle	.L53
	movl	%r14d, %eax
	movq	%r13, %r14
	movl	%eax, %r13d
.L66:
	movl	28(%rsp), %edx
	movl	%r13d, %esi
	movq	%r14, %rdi
	call	Partition
	movl	%eax, 48(%rsp)
	subl	$1, %eax
	movl	%eax, 32(%rsp)
	cmpl	%r13d, %eax
	jle	.L54
.L65:
	movl	32(%rsp), %edx
	movl	%r13d, %esi
	movq	%r14, %rdi
	call	Partition
	leal	-1(%rax), %r12d
	movl	%eax, 52(%rsp)
	cmpl	%r13d, %r12d
	jle	.L55
.L64:
	movl	%r12d, %edx
	movl	%r13d, %esi
	movq	%r14, %rdi
	call	Partition
	leal	-1(%rax), %ebx
	movl	%eax, %ebp
	cmpl	%r13d, %ebx
	jle	.L56
	movl	%r12d, 8(%rsp)
	movl	%r13d, %r15d
	movl	%ebx, %ebp
	movq	%r14, %r13
	movl	%eax, %r14d
.L63:
	movl	%ebp, %edx
	movl	%r15d, %esi
	movq	%r13, %rdi
	call	Partition
	leal	-1(%rax), %ebx
	movl	%eax, 16(%rsp)
	cmpl	%r15d, %ebx
	jle	.L57
	movl	%ebp, 12(%rsp)
	movl	%ebx, %ebp
	movq	%r13, %rbx
.L62:
	movl	%ebp, %edx
	movl	%r15d, %esi
	movq	%rbx, %rdi
	call	Partition
	leal	-1(%rax), %r13d
	movl	%eax, 56(%rsp)
	cmpl	%r15d, %r13d
	jle	.L58
	movl	%ebp, 20(%rsp)
	movq	%rbx, %rbp
	movl	%r13d, %ebx
.L61:
	movl	%ebx, %edx
	movl	%r15d, %esi
	movq	%rbp, %rdi
	call	Partition
	leal	-1(%rax), %r13d
	movl	%eax, %r12d
	cmpl	%r15d, %r13d
	jle	.L59
	movl	%ebx, %r12d
	movl	%eax, %ecx
	movl	%r13d, %ebx
.L60:
	movl	%r15d, %esi
	movl	%ebx, %edx
	movq	%rbp, %rdi
	movl	%ecx, 60(%rsp)
	call	Partition
	movl	%r15d, %esi
	movq	%rbp, %rdi
	movl	%eax, %r13d
	leal	-1(%rax), %edx
	call	Quick_sort
	leal	1(%r13), %r15d
	movl	60(%rsp), %ecx
	cmpl	%r15d, %ebx
	jg	.L60
	movl	%r12d, %ebx
	movl	%ecx, %r12d
.L59:
	leal	1(%r12), %r15d
	cmpl	%r15d, %ebx
	jg	.L61
	movq	%rbp, %rbx
	movl	20(%rsp), %ebp
.L58:
	movl	56(%rsp), %r15d
	addl	$1, %r15d
	cmpl	%r15d, %ebp
	jg	.L62
	movl	12(%rsp), %ebp
	movq	%rbx, %r13
.L57:
	movl	16(%rsp), %r15d
	addl	$1, %r15d
	cmpl	%r15d, %ebp
	jg	.L63
	movl	8(%rsp), %r12d
	movl	%r14d, %ebp
	movq	%r13, %r14
.L56:
	leal	1(%rbp), %r13d
	cmpl	%r13d, %r12d
	jg	.L64
.L55:
	movl	52(%rsp), %r13d
	addl	$1, %r13d
	cmpl	%r13d, 32(%rsp)
	jg	.L65
.L54:
	movl	48(%rsp), %r13d
	addl	$1, %r13d
	cmpl	%r13d, 28(%rsp)
	jg	.L66
	movq	%r14, %r13
.L53:
	movl	44(%rsp), %r14d
	addl	$1, %r14d
	cmpl	%r14d, 24(%rsp)
	jg	.L67
	movq	%r13, %r15
.L52:
	movl	40(%rsp), %r13d
	addl	$1, %r13d
	cmpl	36(%rsp), %r13d
	jl	.L51
.L50:
	addq	$72, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE41:
	.size	Quick_sort, .-Quick_sort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rdi
	movq	%rdi, %r13
	salq	$3, %rdi
	call	malloc@PLT
	movq	%rax, %rbx
	testl	%r13d, %r13d
	jle	.L80
	movq	%rax, %rbp
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L81:
	leaq	4(%rbp), %rdx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r13d
	addl	$1, %r12d
	addq	$8, %rbp
	cmpl	%r12d, %r13d
	jg	.L81
.L80:
	leal	-1(%r13), %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	Quick_sort
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L86
	leaq	(%rbx,%rdx,8), %rcx
	movq	%rbx, %rax
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L84:
	cmpl	%edx, (%rax)
	jle	.L83
	movl	4(%rax), %edx
	addl	$1, %r8d
.L83:
	addq	$8, %rax
	cmpq	%rax, %rcx
	jne	.L84
.L82:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L90
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L86:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L82
.L90:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE42:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	Center_pos
	.type	Center_pos, @function
Center_pos:
.LFB39:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	leal	(%rsi,%rdx), %edi
	movslq	%edx, %r9
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%edi, %eax
	movslq	%esi, %rdi
	sarl	%eax
	movl	4(%rcx,%rdi,8), %r8d
	movslq	%eax, %rdi
	movl	4(%rcx,%rdi,8), %edi
	movl	4(%rcx,%r9,8), %ecx
	cmpl	%edi, %r8d
	jge	.L2
	cmpl	%ecx, %edi
	jl	.L19
	cmpl	%ecx, %r8d
	movl	%esi, %eax
	cmovle	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	cmpl	%ecx, %edi
	jle	.L5
	cmpl	%edi, %r8d
	cmovle	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	cmpl	%ecx, %r8d
	jge	.L8
	cmpl	%edi, %r8d
	jle	.L8
	movl	%esi, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	Center_pos, .-Center_pos
	.p2align 4
	.globl	Partition
	.type	Partition, @function
Partition:
.LFB40:
	.cfi_startproc
	endbr64
	movslq	%esi, %rax
	leal	-1(%rsi), %r8d
	addl	%edx, %esi
	movq	%rdi, %r10
	leaq	(%rdi,%rax,8), %rdi
	movl	%esi, %eax
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	shrl	$31, %eax
	movl	4(%rdi), %r9d
	addl	%esi, %eax
	sarl	%eax
	cltq
	leaq	(%r10,%rax,8), %rsi
	movslq	%edx, %rax
	movl	4(%rsi), %ebx
	leaq	(%r10,%rax,8), %r11
	movl	4(%r11), %ecx
	cmpl	%ebx, %r9d
	jge	.L21
	cmpl	%ecx, %ebx
	jl	.L47
	cmpl	%ecx, %r9d
	jle	.L33
.L34:
	movl	%r9d, %ecx
	movq	%rdi, %rsi
.L22:
	movq	(%r11), %r9
	movq	(%rsi), %rbx
	movq	%rbx, (%r11)
	movq	%r9, (%rsi)
	.p2align 4,,10
	.p2align 3
.L26:
	movl	4(%rdi), %r9d
	addl	$1, %r8d
	cmpl	%ecx, %r9d
	jl	.L27
	leaq	-8(%r10,%rax,8), %rax
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L49:
	movq	%rax, %rsi
	subq	$8, %rax
	cmpl	%ecx, 12(%rax)
	jle	.L48
.L29:
	subl	$1, %edx
	cmpl	%edx, %r8d
	jl	.L49
	movd	(%rdi), %xmm0
	movq	(%r11), %rax
	movd	%r9d, %xmm2
	punpckldq	%xmm2, %xmm0
	movq	%rax, (%rdi)
	movl	%r8d, %eax
	movq	%xmm0, (%r11)
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	cmpl	%ecx, %ebx
	jle	.L24
	cmpl	%ebx, %r9d
	cmovg	%ebx, %ecx
	cmovle	%r11, %rsi
	jmp	.L22
.L24:
	cmpl	%ebx, %r9d
	jle	.L33
	cmpl	%ecx, %r9d
	jl	.L34
.L33:
	movq	%r11, %rsi
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L48:
	movd	(%rdi), %xmm0
	movq	(%rsi), %rax
	movd	%r9d, %xmm1
	punpckldq	%xmm1, %xmm0
	movq	%rax, (%rdi)
	movslq	%edx, %rax
	movq	%xmm0, (%rsi)
.L27:
	addq	$8, %rdi
	jmp	.L26
.L47:
	movl	%ebx, %ecx
	jmp	.L22
	.cfi_endproc
.LFE40:
	.size	Partition, .-Partition
	.p2align 4
	.globl	Quick_sort
	.type	Quick_sort, @function
Quick_sort:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	%edx, 36(%rsp)
	cmpl	%esi, %edx
	jle	.L50
	movq	%rdi, %r15
	movl	%esi, %r13d
.L51:
	movl	36(%rsp), %edx
	movl	%r13d, %esi
	movq	%r15, %rdi
	call	Partition
	movl	%eax, 40(%rsp)
	subl	$1, %eax
	movl	%eax, 24(%rsp)
	cmpl	%r13d, %eax
	jle	.L52
	movl	%r13d, %r14d
	movq	%r15, %r13
.L67:
	movl	24(%rsp), %edx
	movl	%r14d, %esi
	movq	%r13, %rdi
	call	Partition
	movl	%eax, 44(%rsp)
	subl	$1, %eax
	movl	%eax, 28(%rsp)
	cmpl	%r14d, %eax
	jle	.L53
	movl	%r14d, %eax
	movq	%r13, %r14
	movl	%eax, %r13d
.L66:
	movl	28(%rsp), %edx
	movl	%r13d, %esi
	movq	%r14, %rdi
	call	Partition
	movl	%eax, 48(%rsp)
	subl	$1, %eax
	movl	%eax, 32(%rsp)
	cmpl	%r13d, %eax
	jle	.L54
.L65:
	movl	32(%rsp), %edx
	movl	%r13d, %esi
	movq	%r14, %rdi
	call	Partition
	leal	-1(%rax), %r12d
	movl	%eax, 52(%rsp)
	cmpl	%r13d, %r12d
	jle	.L55
.L64:
	movl	%r12d, %edx
	movl	%r13d, %esi
	movq	%r14, %rdi
	call	Partition
	leal	-1(%rax), %ebx
	movl	%eax, %ebp
	cmpl	%r13d, %ebx
	jle	.L56
	movl	%r12d, 8(%rsp)
	movl	%r13d, %r15d
	movl	%ebx, %ebp
	movq	%r14, %r13
	movl	%eax, %r14d
.L63:
	movl	%ebp, %edx
	movl	%r15d, %esi
	movq	%r13, %rdi
	call	Partition
	leal	-1(%rax), %ebx
	movl	%eax, 16(%rsp)
	cmpl	%r15d, %ebx
	jle	.L57
	movl	%ebp, 12(%rsp)
	movl	%ebx, %ebp
	movq	%r13, %rbx
.L62:
	movl	%ebp, %edx
	movl	%r15d, %esi
	movq	%rbx, %rdi
	call	Partition
	leal	-1(%rax), %r13d
	movl	%eax, 56(%rsp)
	cmpl	%r15d, %r13d
	jle	.L58
	movl	%ebp, 20(%rsp)
	movq	%rbx, %rbp
	movl	%r13d, %ebx
.L61:
	movl	%ebx, %edx
	movl	%r15d, %esi
	movq	%rbp, %rdi
	call	Partition
	leal	-1(%rax), %r13d
	movl	%eax, %r12d
	cmpl	%r15d, %r13d
	jle	.L59
	movl	%ebx, %r12d
	movl	%eax, %ecx
	movl	%r13d, %ebx
.L60:
	movl	%r15d, %esi
	movl	%ebx, %edx
	movq	%rbp, %rdi
	movl	%ecx, 60(%rsp)
	call	Partition
	movl	%r15d, %esi
	movq	%rbp, %rdi
	movl	%eax, %r13d
	leal	-1(%rax), %edx
	call	Quick_sort
	leal	1(%r13), %r15d
	movl	60(%rsp), %ecx
	cmpl	%r15d, %ebx
	jg	.L60
	movl	%r12d, %ebx
	movl	%ecx, %r12d
.L59:
	leal	1(%r12), %r15d
	cmpl	%r15d, %ebx
	jg	.L61
	movq	%rbp, %rbx
	movl	20(%rsp), %ebp
.L58:
	movl	56(%rsp), %r15d
	addl	$1, %r15d
	cmpl	%r15d, %ebp
	jg	.L62
	movl	12(%rsp), %ebp
	movq	%rbx, %r13
.L57:
	movl	16(%rsp), %r15d
	addl	$1, %r15d
	cmpl	%r15d, %ebp
	jg	.L63
	movl	8(%rsp), %r12d
	movl	%r14d, %ebp
	movq	%r13, %r14
.L56:
	leal	1(%rbp), %r13d
	cmpl	%r13d, %r12d
	jg	.L64
.L55:
	movl	52(%rsp), %r13d
	addl	$1, %r13d
	cmpl	%r13d, 32(%rsp)
	jg	.L65
.L54:
	movl	48(%rsp), %r13d
	addl	$1, %r13d
	cmpl	%r13d, 28(%rsp)
	jg	.L66
	movq	%r14, %r13
.L53:
	movl	44(%rsp), %r14d
	addl	$1, %r14d
	cmpl	%r14d, 24(%rsp)
	jg	.L67
	movq	%r13, %r15
.L52:
	movl	40(%rsp), %r13d
	addl	$1, %r13d
	cmpl	36(%rsp), %r13d
	jl	.L51
.L50:
	addq	$72, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE41:
	.size	Quick_sort, .-Quick_sort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rdi
	movq	%rdi, %r13
	salq	$3, %rdi
	call	malloc@PLT
	movq	%rax, %rbx
	testl	%r13d, %r13d
	jle	.L80
	movq	%rax, %rbp
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L81:
	leaq	4(%rbp), %rdx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r13d
	addl	$1, %r12d
	addq	$8, %rbp
	cmpl	%r12d, %r13d
	jg	.L81
.L80:
	leal	-1(%r13), %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	Quick_sort
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L86
	leaq	(%rbx,%rdx,8), %rcx
	movq	%rbx, %rax
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L84:
	cmpl	%edx, (%rax)
	jle	.L83
	movl	4(%rax), %edx
	addl	$1, %r8d
.L83:
	addq	$8, %rax
	cmpq	%rax, %rcx
	jne	.L84
.L82:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L90
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L86:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L82
.L90:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE42:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:

#include <stdio.h>
#include <stdlib.h>


typedef struct{
	int start;
	int end;
}DATA_T;


int Center_pos(DATA_T *box, int l, int r)
{
	int mid;

	mid = (l + r) / 2;

	if(box[l].end < box[mid].end && box[mid].end < box[r].end
	|| box[r].end < box[mid].end && box[mid].end < box[l].end)
		return mid;
	else if(box[mid].end < box[l].end && box[l].end < box[r].end
	|| box[r].end < box[l].end && box[l].end < box[mid].end)
		return l;
	else
		return r;

}


int Partition(DATA_T *box, int l, int r)
{
	DATA_T tmp;
	int i = l - 1;
	int j = r;
	int x, soeji;

	soeji = Center_pos(box, l, r);
	x = box[soeji].end;
	tmp = box[r];
	box[r] = box[soeji];
	box[soeji] = tmp;

	while(1){
		while(box[++i].end < x);

		while(i < --j && x < box[j].end);

		if(j <= i)
			break;

		tmp = box[i];
		box[i] = box[j];
		box[j] = tmp;
	}

	tmp = box[i];
	box[i] = box[r];
	box[r] = tmp;

	return i;
}


void Quick_sort(DATA_T *box, int l, int r)
{
	int pivot;

	if(r <= l)
		return;

	pivot = Partition(box, l, r);

	Quick_sort(box, l, pivot - 1);

	Quick_sort(box, pivot + 1, r);
}


int main()
{
	int n;
	DATA_T *activity;
	int *array;
	int count, etime;
	int i, j;

	scanf("%d", &n);

	activity = (DATA_T *)malloc(sizeof(DATA_T) * n);

	for(i = 0; i < n; i++)
		scanf("%d %d", &activity[i].start, &activity[i].end);


	Quick_sort(activity, 0, n - 1);

/*	printf("<sorted>\n");
	for(i = 0; i < n; i++)
		printf("%d %d\n", activity[i].start, activity[i].end);
*/
	etime = count = 0;
	for(i = 0; i < n; i++){
		if(etime < activity[i].start){
			count++;
			etime = activity[i].end;
		}
	}


	printf("%d\n", count);

	return 0;
}

5
2 2
3 9
3 5
5 9
6 8
 3
1 1
2 3
3 4
 3
0 5
3 4
2 5
 5
3 2
5 5
4 3
0 3
6 8
 5
2 2
3 9
4 5
5 9
6 8
 3
1 1
2 4
3 4
 3
-1 5
3 4
2 5
 5
2 2
3 9
4 5
1 9
6 8
 3
1 1
2 4
3 3
 3
-1 5
3 4
2 7

3
 2
 1
 4
 3
 2
 1
 3
 2
 1

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>


typedef struct{
	int start;
	int end;
}DATA_T;


int Center_pos(DATA_T *box, int l, int r)
{
	int mid;

	mid = (l + r) / 2;

	if(box[l].end < box[mid].end && box[mid].end < box[r].end
	|| box[r].end < box[mid].end && box[mid].end < box[l].end)
		return mid;
	else if(box[mid].end < box[l].end && box[l].end < box[r].end
	|| box[r].end < box[l].end && box[l].end < box[mid].end)
		return l;
	else
		return r;

}


int Partition(DATA_T *box, int l, int r)
{
	DATA_T tmp;
	int i = l - 1;
	int j = r;
	int x, soeji;

	soeji = Center_pos(box, l, r);
	x = box[soeji].end;
	tmp = box[r];
	box[r] = box[soeji];
	box[soeji] = tmp;

	while(1){
		while(box[++i].end < x);

		while(i < --j && x < box[j].end);

		if(j <= i)
			break;

		tmp = box[i];
		box[i] = box[j];
		box[j] = tmp;
	}

	tmp = box[i];
	box[i] = box[r];
	box[r] = tmp;

	return i;
}


void Quick_sort(DATA_T *box, int l, int r)
{
	int pivot;

	if(r <= l)
		return;

	pivot = Partition(box, l, r);

	Quick_sort(box, l, pivot - 1);

	Quick_sort(box, pivot + 1, r);
}


int main()
{
	int n;
	DATA_T *activity;
	int *array;
	int count, etime;
	int i, j;

	scanf("%d", &n);

	activity = (DATA_T *)malloc(sizeof(DATA_T) * n);

	for(i = 0; i < n; i++)
		scanf("%d %d", &activity[i].start, &activity[i].end);


	Quick_sort(activity, 0, n - 1);

/*	printf("<sorted>\n");
	for(i = 0; i < n; i++)
		printf("%d %d\n", activity[i].start, activity[i].end);
*/
	etime = count = 0;
	for(i = 0; i < n; i++){
		if(etime < activity[i].start){
			count++;
			etime = activity[i].end;
		}
	}


	printf("%d\n", count);

	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	Center_pos
	.type	Center_pos, @function
Center_pos:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L2
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jl	.L3
.L2:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L4
.L3:
	movl	-4(%rbp), %eax
	jmp	.L5
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L6
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jl	.L7
.L6:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L8
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L8
.L7:
	movl	-28(%rbp), %eax
	jmp	.L5
.L8:
	movl	-32(%rbp), %eax
.L5:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Center_pos, .-Center_pos
	.globl	Partition
	.type	Partition, @function
Partition:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	%edx, -48(%rbp)
	movl	-44(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %ecx
	movq	-40(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	Center_pos
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	movl	%eax, -12(%rbp)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-48(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
.L15:
	nop
.L10:
	addl	$1, -24(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jg	.L10
	nop
.L12:
	subl	$1, -20(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L11
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L12
.L11:
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L18
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	jmp	.L15
.L18:
	nop
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	movl	-24(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Partition, .-Partition
	.globl	Quick_sort
	.type	Quick_sort, @function
Quick_sort:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-32(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L22
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	Partition
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	Quick_sort
	movl	-4(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %edx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	Quick_sort
	jmp	.L19
.L22:
	nop
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Quick_sort, .-Quick_sort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L24
.L25:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	addq	$4, %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movq	%rdx, %rcx
	movq	%rax, %rdx
	movq	%rcx, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L24:
	movl	-32(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L25
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-16(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	Quick_sort
	movl	$0, -28(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L26
.L28:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L27
	addl	$1, -28(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	movl	%eax, -24(%rbp)
.L27:
	addl	$1, -20(%rbp)
.L26:
	movl	-32(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L28
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	Center_pos
	.type	Center_pos, @function
Center_pos:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L2
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jl	.L3
.L2:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L4
.L3:
	movl	-4(%rbp), %eax
	jmp	.L5
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L6
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jl	.L7
.L6:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L8
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L8
.L7:
	movl	-28(%rbp), %eax
	jmp	.L5
.L8:
	movl	-32(%rbp), %eax
.L5:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Center_pos, .-Center_pos
	.globl	Partition
	.type	Partition, @function
Partition:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movl	%edx, -48(%rbp)
	movl	-44(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %ecx
	movq	-40(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	Center_pos
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	movl	%eax, -12(%rbp)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-48(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
.L15:
	nop
.L10:
	addl	$1, -24(%rbp)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jg	.L10
	nop
.L12:
	subl	$1, -20(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L11
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L12
.L11:
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L18
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	jmp	.L15
.L18:
	nop
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax), %rax
	movq	%rax, (%rdx)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	movl	-24(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Partition, .-Partition
	.globl	Quick_sort
	.type	Quick_sort, @function
Quick_sort:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-32(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L22
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	Partition
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	Quick_sort
	movl	-4(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %edx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	Quick_sort
	jmp	.L19
.L22:
	nop
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Quick_sort, .-Quick_sort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L24
.L25:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	addq	$4, %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-16(%rbp), %rdx
	addq	%rcx, %rdx
	movq	%rdx, %rcx
	movq	%rax, %rdx
	movq	%rcx, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L24:
	movl	-32(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L25
	movl	-32(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-16(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	Quick_sort
	movl	$0, -28(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L26
.L28:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L27
	addl	$1, -28(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	movl	%eax, -24(%rbp)
.L27:
	addl	$1, -20(%rbp)
.L26:
	movl	-32(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L28
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:
