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>
void quicksort(int a[],int s,int t){
  if(s<t){
    int i=s,j=t,p=a[(s+t)/2];
    while(1){
      while(a[i]<p)i++;
      while(p<a[j])j--;
      if(i>=j)break;
      a[i]^=a[j]^=a[i]^=a[j];
      i++;j--;
    }
    quicksort(a,s,i-1);quicksort(a,j+1,t);
  }
}
int main(){
  int n,a[100001],i,x=0;
  scanf("%d",&n);
  for(i=0;i<n;i++)scanf("%d",&a[i]);
  quicksort(a,0,n-1);
  a[n]=-1;
  for(i=0;i<n;i++){if(a[i]==a[i+1]){x--;i++;}x++;}
  printf("%d",x);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	quicksort
	.type	quicksort, @function
quicksort:
.LFB0:
	.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	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jge	.L11
	movl	-28(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	jmp	.L3
.L4:
	addl	$1, -12(%rbp)
.L3:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -4(%rbp)
	jg	.L4
	jmp	.L5
.L6:
	subl	$1, -8(%rbp)
.L5:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L6
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L12
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-24(%rbp), %rax
	addq	%rsi, %rax
	xorl	%ecx, %edx
	movl	%edx, (%rax)
	movl	(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-24(%rbp), %rax
	addq	%rsi, %rax
	xorl	%ecx, %edx
	movl	%edx, (%rax)
	movl	(%rax), %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-24(%rbp), %rax
	addq	%rsi, %rax
	xorl	%ecx, %edx
	movl	%edx, (%rax)
	addl	$1, -12(%rbp)
	subl	$1, -8(%rbp)
	jmp	.L3
.L12:
	nop
	movl	-12(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quicksort
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %edx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quicksort
.L11:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	quicksort, .-quicksort
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2720, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -400020(%rbp)
	leaq	-400028(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400024(%rbp)
	jmp	.L14
.L15:
	leaq	-400016(%rbp), %rdx
	movl	-400024(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -400024(%rbp)
.L14:
	movl	-400028(%rbp), %eax
	cmpl	%eax, -400024(%rbp)
	jl	.L15
	movl	-400028(%rbp), %eax
	leal	-1(%rax), %edx
	leaq	-400016(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	quicksort
	movl	-400028(%rbp), %eax
	cltq
	movl	$-1, -400016(%rbp,%rax,4)
	movl	$0, -400024(%rbp)
	jmp	.L16
.L18:
	movl	-400024(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	-400024(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L17
	subl	$1, -400020(%rbp)
	addl	$1, -400024(%rbp)
.L17:
	addl	$1, -400020(%rbp)
	addl	$1, -400024(%rbp)
.L16:
	movl	-400028(%rbp), %eax
	cmpl	%eax, -400024(%rbp)
	jl	.L18
	movl	-400020(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	quicksort
	.type	quicksort, @function
quicksort:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movslq	%edx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	cmpl	%ebp, %esi
	jge	.L1
	movq	%rdi, %r13
	movl	%esi, %r10d
	movq	%rbp, %r12
.L2:
	leal	(%r12,%r10), %edx
	movl	%r10d, %r9d
	movl	%r12d, %ebx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	0(%r13,%rax,4), %esi
	movslq	%r10d, %rax
	leaq	0(%r13,%rax,4), %r8
	movq	%rbp, %rax
	.p2align 4,,10
	.p2align 3
.L3:
	movl	(%r8), %edi
	leaq	0(%r13,%rax,4), %rcx
	movl	(%rcx), %edx
	cmpl	%esi, %edi
	jl	.L4
	cmpl	%edx, %esi
	jge	.L5
	leaq	-4(%r13,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rax, %rcx
	movl	(%rax), %edx
	subq	$4, %rax
	subl	$1, %ebx
	cmpl	%esi, %edx
	jg	.L6
.L5:
	cmpl	%ebx, %r9d
	jge	.L7
	xorl	%edx, %edi
	subl	$1, %ebx
	movl	%edi, (%r8)
	xorl	(%rcx), %edi
	movslq	%ebx, %rax
	movl	%edi, (%rcx)
	xorl	%edi, (%r8)
.L4:
	addq	$4, %r8
	addl	$1, %r9d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%r10d, %esi
	leal	-1(%r9), %edx
	movq	%r13, %rdi
	call	quicksort
	leal	1(%rbx), %r10d
	cmpl	%r12d, %r10d
	jl	.L2
.L1:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE23:
	.size	quicksort, .-quicksort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397352
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2728, %rsp
	.cfi_def_cfa_offset 400080
	leaq	.LC0(%rip), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r13
	movq	%r13, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jle	.L15
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	addq	$4, %rbp
	cmpl	%ebx, %edx
	jg	.L16
.L15:
	movq	%r13, %rdi
	subl	$1, %edx
	xorl	%esi, %esi
	call	quicksort
	movslq	12(%rsp), %rax
	xorl	%r8d, %r8d
	movl	$-1, 16(%rsp,%rax,4)
	movq	%rax, %rdi
	testl	%eax, %eax
	jle	.L17
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L20:
	leal	1(%rdx), %eax
	movslq	%edx, %rcx
	movslq	%eax, %rsi
	movl	16(%rsp,%rcx,4), %ecx
	cmpl	%ecx, 16(%rsp,%rsi,4)
	je	.L27
	addl	$1, %r8d
	cmpl	%eax, %edi
	jle	.L17
.L19:
	movl	%eax, %edx
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L27:
	leal	2(%rdx), %eax
	cmpl	%eax, %edi
	jg	.L19
.L17:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$400040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L28:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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	quicksort
	.type	quicksort, @function
quicksort:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movslq	%edx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	cmpl	%ebp, %esi
	jge	.L1
	movq	%rdi, %r13
	movl	%esi, %r10d
	movq	%rbp, %r12
.L2:
	leal	(%r12,%r10), %edx
	movl	%r10d, %r9d
	movl	%r12d, %ebx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	0(%r13,%rax,4), %esi
	movslq	%r10d, %rax
	leaq	0(%r13,%rax,4), %r8
	movq	%rbp, %rax
	.p2align 4,,10
	.p2align 3
.L3:
	movl	(%r8), %edi
	leaq	0(%r13,%rax,4), %rcx
	movl	(%rcx), %edx
	cmpl	%esi, %edi
	jl	.L4
	cmpl	%edx, %esi
	jge	.L5
	leaq	-4(%r13,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rax, %rcx
	movl	(%rax), %edx
	subq	$4, %rax
	subl	$1, %ebx
	cmpl	%esi, %edx
	jg	.L6
.L5:
	cmpl	%ebx, %r9d
	jge	.L7
	xorl	%edx, %edi
	subl	$1, %ebx
	movl	%edi, (%r8)
	xorl	(%rcx), %edi
	movslq	%ebx, %rax
	movl	%edi, (%rcx)
	xorl	%edi, (%r8)
.L4:
	addq	$4, %r8
	addl	$1, %r9d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%r10d, %esi
	leal	-1(%r9), %edx
	movq	%r13, %rdi
	call	quicksort
	leal	1(%rbx), %r10d
	cmpl	%r12d, %r10d
	jl	.L2
.L1:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE23:
	.size	quicksort, .-quicksort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397352
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2728, %rsp
	.cfi_def_cfa_offset 400080
	leaq	.LC0(%rip), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r13
	movq	%r13, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jle	.L15
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	addq	$4, %rbp
	cmpl	%ebx, %edx
	jg	.L16
.L15:
	movq	%r13, %rdi
	subl	$1, %edx
	xorl	%esi, %esi
	call	quicksort
	movslq	12(%rsp), %rax
	xorl	%r8d, %r8d
	movl	$-1, 16(%rsp,%rax,4)
	movq	%rax, %rdi
	testl	%eax, %eax
	jle	.L17
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L20:
	leal	1(%rdx), %eax
	movslq	%edx, %rcx
	movslq	%eax, %rsi
	movl	16(%rsp,%rcx,4), %ecx
	cmpl	%ecx, 16(%rsp,%rsi,4)
	je	.L27
	addl	$1, %r8d
	cmpl	%eax, %edi
	jle	.L17
.L19:
	movl	%eax, %edx
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L27:
	leal	2(%rdx), %eax
	cmpl	%eax, %edi
	jg	.L19
.L17:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$400040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L28:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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>
void quicksort(int a[],int s,int t){
  if(s<t){
    int i=s,j=t,p=a[(s+t)/2];
    while(1){
      while(a[i]<p)i++;
      while(p<a[j])j--;
      if(i>=j)break;
      a[i]^=a[j]^=a[i]^=a[j];
      i++;j--;
    }
    quicksort(a,s,i-1);quicksort(a,j+1,t);
  }
}
int main(){
  int n,a[100001],i,x=0;
  scanf("%d",&n);
  for(i=0;i<n;i++)scanf("%d",&a[i]);
  quicksort(a,0,n-1);
  a[n]=-1;
  for(i=0;i<n;i++){if(a[i]==a[i+1]){x--;i++;}x++;}
  printf("%d",x);
}

3
6
2
7
 4
3
5
5
2
 6
12
22
18
22
18
12
 4
3
5
9
1
 6
4
47
28
35
18
12
 3
0
0
10
 3
6
2
8
 4
3
5
5
1
 6
12
22
18
35
18
12
 3
3
2
8

3 2 0 4 6 1 3 2 2 3
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>
void quicksort(int a[],int s,int t){
  if(s<t){
    int i=s,j=t,p=a[(s+t)/2];
    while(1){
      while(a[i]<p)i++;
      while(p<a[j])j--;
      if(i>=j)break;
      a[i]^=a[j]^=a[i]^=a[j];
      i++;j--;
    }
    quicksort(a,s,i-1);quicksort(a,j+1,t);
  }
}
int main(){
  int n,a[100001],i,x=0;
  scanf("%d",&n);
  for(i=0;i<n;i++)scanf("%d",&a[i]);
  quicksort(a,0,n-1);
  a[n]=-1;
  for(i=0;i<n;i++){if(a[i]==a[i+1]){x--;i++;}x++;}
  printf("%d",x);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	quicksort
	.type	quicksort, @function
quicksort:
.LFB0:
	.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	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jge	.L11
	movl	-28(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	jmp	.L3
.L4:
	addl	$1, -12(%rbp)
.L3:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -4(%rbp)
	jg	.L4
	jmp	.L5
.L6:
	subl	$1, -8(%rbp)
.L5:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L6
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L12
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-24(%rbp), %rax
	addq	%rsi, %rax
	xorl	%ecx, %edx
	movl	%edx, (%rax)
	movl	(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-24(%rbp), %rax
	addq	%rsi, %rax
	xorl	%ecx, %edx
	movl	%edx, (%rax)
	movl	(%rax), %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-24(%rbp), %rax
	addq	%rsi, %rax
	xorl	%ecx, %edx
	movl	%edx, (%rax)
	addl	$1, -12(%rbp)
	subl	$1, -8(%rbp)
	jmp	.L3
.L12:
	nop
	movl	-12(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quicksort
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %edx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quicksort
.L11:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	quicksort, .-quicksort
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2720, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -400020(%rbp)
	leaq	-400028(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400024(%rbp)
	jmp	.L14
.L15:
	leaq	-400016(%rbp), %rdx
	movl	-400024(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -400024(%rbp)
.L14:
	movl	-400028(%rbp), %eax
	cmpl	%eax, -400024(%rbp)
	jl	.L15
	movl	-400028(%rbp), %eax
	leal	-1(%rax), %edx
	leaq	-400016(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	quicksort
	movl	-400028(%rbp), %eax
	cltq
	movl	$-1, -400016(%rbp,%rax,4)
	movl	$0, -400024(%rbp)
	jmp	.L16
.L18:
	movl	-400024(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	-400024(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L17
	subl	$1, -400020(%rbp)
	addl	$1, -400024(%rbp)
.L17:
	addl	$1, -400020(%rbp)
	addl	$1, -400024(%rbp)
.L16:
	movl	-400028(%rbp), %eax
	cmpl	%eax, -400024(%rbp)
	jl	.L18
	movl	-400020(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	quicksort
	.type	quicksort, @function
quicksort:
.LFB0:
	.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	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jge	.L11
	movl	-28(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	jmp	.L3
.L4:
	addl	$1, -12(%rbp)
.L3:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -4(%rbp)
	jg	.L4
	jmp	.L5
.L6:
	subl	$1, -8(%rbp)
.L5:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L6
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L12
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-24(%rbp), %rax
	addq	%rsi, %rax
	xorl	%ecx, %edx
	movl	%edx, (%rax)
	movl	(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-24(%rbp), %rax
	addq	%rsi, %rax
	xorl	%ecx, %edx
	movl	%edx, (%rax)
	movl	(%rax), %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-24(%rbp), %rax
	addq	%rsi, %rax
	xorl	%ecx, %edx
	movl	%edx, (%rax)
	addl	$1, -12(%rbp)
	subl	$1, -8(%rbp)
	jmp	.L3
.L12:
	nop
	movl	-12(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quicksort
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %edx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quicksort
.L11:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	quicksort, .-quicksort
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2720, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -400020(%rbp)
	leaq	-400028(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400024(%rbp)
	jmp	.L14
.L15:
	leaq	-400016(%rbp), %rdx
	movl	-400024(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -400024(%rbp)
.L14:
	movl	-400028(%rbp), %eax
	cmpl	%eax, -400024(%rbp)
	jl	.L15
	movl	-400028(%rbp), %eax
	leal	-1(%rax), %edx
	leaq	-400016(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	quicksort
	movl	-400028(%rbp), %eax
	cltq
	movl	$-1, -400016(%rbp,%rax,4)
	movl	$0, -400024(%rbp)
	jmp	.L16
.L18:
	movl	-400024(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	-400024(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L17
	subl	$1, -400020(%rbp)
	addl	$1, -400024(%rbp)
.L17:
	addl	$1, -400020(%rbp)
	addl	$1, -400024(%rbp)
.L16:
	movl	-400028(%rbp), %eax
	cmpl	%eax, -400024(%rbp)
	jl	.L18
	movl	-400020(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
