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 sort(int data[],int n);
int main(void){
    
    int i,n,d[100],s=0;
    
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d",&d[i]);
    }

    sort(d,n);

    for(i=0;i<n;i++){
        if(d[i]!=d[i+1]) s++;
    }

    printf("%d\n",s);
    
}
void sort(int data[],int n){
        
    int i,j,tmp;
        
    for(i=1;i<n;i++){
    for(j=n-1;j>=1;j--){
        if(data[j]>data[j-1]){
            tmp=data[j-1];
            data[j-1]=data[j];
            data[j]=tmp;
            }
        }
    }
    
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$432, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -420(%rbp)
	leaq	-428(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -424(%rbp)
	jmp	.L2
.L3:
	leaq	-416(%rbp), %rdx
	movl	-424(%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, -424(%rbp)
.L2:
	movl	-428(%rbp), %eax
	cmpl	%eax, -424(%rbp)
	jl	.L3
	movl	-428(%rbp), %edx
	leaq	-416(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	sort
	movl	$0, -424(%rbp)
	jmp	.L4
.L6:
	movl	-424(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-424(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L5
	addl	$1, -420(%rbp)
.L5:
	addl	$1, -424(%rbp)
.L4:
	movl	-428(%rbp), %eax
	cmpl	%eax, -424(%rbp)
	jl	.L6
	movl	-420(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	sort
	.type	sort, @function
sort:
.LFB1:
	.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	$1, -12(%rbp)
	jmp	.L10
.L14:
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L11
.L13:
	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
	salq	$2, %rax
	leaq	-4(%rax), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L12
	movl	-8(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	leaq	-4(%rdx), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
.L12:
	subl	$1, -8(%rbp)
.L11:
	cmpl	$0, -8(%rbp)
	jg	.L13
	addl	$1, -12(%rbp)
.L10:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L14
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	sort, .-sort
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	addq	$4, %r12
	cmpl	%ebp, %edi
	jg	.L3
	cmpl	$1, %edi
	jle	.L4
	leal	-1(%rdi), %eax
	movl	$1, %r8d
	cltq
	leaq	-4(%rbx,%rax,4), %r9
	movslq	%edi, %rax
	leaq	4(%rsp,%rax,4), %rsi
	leal	-2(%rdi), %eax
	salq	$2, %rax
	subq	%rax, %rsi
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r9, %rdx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm3
	movd	%xmm0, %ecx
	movd	%xmm3, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jge	.L5
	movq	%xmm1, (%rdx)
.L5:
	subq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L6
	addl	$1, %r8d
	cmpl	%r8d, %edi
	jg	.L7
	testl	%edi, %edi
	movl	$1, %ecx
	cmovg	%edi, %ecx
	cmpl	$3, %edi
	jle	.L19
	movl	%ecx, %eax
	pxor	%xmm1, %xmm1
	shrl	$2, %eax
	movdqa	%xmm1, %xmm2
	subl	$1, %eax
	salq	$4, %rax
	leaq	32(%rsp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movdqu	4(%rbx), %xmm0
	addq	$16, %rbx
	pcmpeqd	-16(%rbx), %xmm0
	pcmpeqd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rbx, %rax
	jne	.L11
	movdqa	%xmm1, %xmm0
	movl	%ecx, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	andl	$3, %ecx
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	je	.L10
.L9:
	leal	1(%rax), %ecx
	movslq	%eax, %r8
	movslq	%ecx, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, 16(%rsp,%r8,4)
	je	.L13
	addl	$1, %edx
.L13:
	cmpl	%edi, %ecx
	jge	.L10
	leal	2(%rax), %ecx
	movslq	%ecx, %r8
	movl	16(%rsp,%r8,4), %r8d
	cmpl	%r8d, %esi
	je	.L14
	addl	$1, %edx
.L14:
	cmpl	%edi, %ecx
	jge	.L10
	addl	$3, %eax
	cltq
	cmpl	%r8d, 16(%rsp,%rax,4)
	je	.L10
	addl	$1, %edx
.L10:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$440, %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
.L4:
	.cfi_restore_state
	je	.L19
.L2:
	xorl	%edx, %edx
	jmp	.L10
.L19:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L9
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	sort
	.type	sort, @function
sort:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	$1, %esi
	jle	.L28
	leal	-1(%rsi), %eax
	movl	$1, %r8d
	cltq
	leaq	-4(%rdi,%rax,4), %r9
	movslq	%esi, %rax
	leaq	-12(%rdi,%rax,4), %rdi
	leal	-2(%rsi), %eax
	salq	$2, %rax
	subq	%rax, %rdi
	.p2align 4,,10
	.p2align 3
.L32:
	movq	%r9, %rdx
	.p2align 4,,10
	.p2align 3
.L31:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %ecx
	movd	%xmm2, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jge	.L30
	movq	%xmm1, (%rdx)
.L30:
	subq	$4, %rdx
	cmpq	%rdi, %rdx
	jne	.L31
	addl	$1, %r8d
	cmpl	%r8d, %esi
	jne	.L32
.L28:
	ret
	.cfi_endproc
.LFE24:
	.size	sort, .-sort
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	addq	$4, %r12
	cmpl	%ebp, %edi
	jg	.L3
	cmpl	$1, %edi
	jle	.L4
	leal	-1(%rdi), %eax
	movl	$1, %r8d
	cltq
	leaq	-4(%rbx,%rax,4), %r9
	movslq	%edi, %rax
	leaq	4(%rsp,%rax,4), %rsi
	leal	-2(%rdi), %eax
	salq	$2, %rax
	subq	%rax, %rsi
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r9, %rdx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm3
	movd	%xmm0, %ecx
	movd	%xmm3, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jge	.L5
	movq	%xmm1, (%rdx)
.L5:
	subq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L6
	addl	$1, %r8d
	cmpl	%r8d, %edi
	jg	.L7
	testl	%edi, %edi
	movl	$1, %ecx
	cmovg	%edi, %ecx
	cmpl	$3, %edi
	jle	.L19
	movl	%ecx, %eax
	pxor	%xmm1, %xmm1
	shrl	$2, %eax
	movdqa	%xmm1, %xmm2
	subl	$1, %eax
	salq	$4, %rax
	leaq	32(%rsp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movdqu	4(%rbx), %xmm0
	addq	$16, %rbx
	pcmpeqd	-16(%rbx), %xmm0
	pcmpeqd	%xmm2, %xmm0
	psubd	%xmm0, %xmm1
	cmpq	%rbx, %rax
	jne	.L11
	movdqa	%xmm1, %xmm0
	movl	%ecx, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	andl	$3, %ecx
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	je	.L10
.L9:
	leal	1(%rax), %ecx
	movslq	%eax, %r8
	movslq	%ecx, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, 16(%rsp,%r8,4)
	je	.L13
	addl	$1, %edx
.L13:
	cmpl	%edi, %ecx
	jge	.L10
	leal	2(%rax), %ecx
	movslq	%ecx, %r8
	movl	16(%rsp,%r8,4), %r8d
	cmpl	%r8d, %esi
	je	.L14
	addl	$1, %edx
.L14:
	cmpl	%edi, %ecx
	jge	.L10
	addl	$3, %eax
	cltq
	cmpl	%r8d, 16(%rsp,%rax,4)
	je	.L10
	addl	$1, %edx
.L10:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$440, %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
.L4:
	.cfi_restore_state
	je	.L19
.L2:
	xorl	%edx, %edx
	jmp	.L10
.L19:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L9
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	sort
	.type	sort, @function
sort:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	$1, %esi
	jle	.L28
	leal	-1(%rsi), %eax
	movl	$1, %r8d
	cltq
	leaq	-4(%rdi,%rax,4), %r9
	movslq	%esi, %rax
	leaq	-12(%rdi,%rax,4), %rdi
	leal	-2(%rsi), %eax
	salq	$2, %rax
	subq	%rax, %rdi
	.p2align 4,,10
	.p2align 3
.L32:
	movq	%r9, %rdx
	.p2align 4,,10
	.p2align 3
.L31:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %ecx
	movd	%xmm2, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jge	.L30
	movq	%xmm1, (%rdx)
.L30:
	subq	$4, %rdx
	cmpq	%rdi, %rdx
	jne	.L31
	addl	$1, %r8d
	cmpl	%r8d, %esi
	jne	.L32
.L28:
	ret
	.cfi_endproc
.LFE24:
	.size	sort, .-sort
	.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 sort(int data[],int n);
int main(void){
    
    int i,n,d[100],s=0;
    
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d",&d[i]);
    }

    sort(d,n);

    for(i=0;i<n;i++){
        if(d[i]!=d[i+1]) s++;
    }

    printf("%d\n",s);
    
}
void sort(int data[],int n){
        
    int i,j,tmp;
        
    for(i=1;i<n;i++){
    for(j=n-1;j>=1;j--){
        if(data[j]>data[j-1]){
            tmp=data[j-1];
            data[j-1]=data[j];
            data[j]=tmp;
            }
        }
    }
    
}
7
50
30
50
100
50
80
35
 3
29
15
15
 4
10
8
14
6
 3
29
15
14
 7
50
40
91
110
50
34
59
 7
50
40
91
110
3
34
59
 3
1
1
1
 7
50
30
50
100
50
80
59
 4
10
8
16
6
 7
50
40
50
100
50
80
59

5
 2
 4
 3
 6
 7
 1
 5
 4
 5

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 sort(int data[],int n);
int main(void){
    
    int i,n,d[100],s=0;
    
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d",&d[i]);
    }

    sort(d,n);

    for(i=0;i<n;i++){
        if(d[i]!=d[i+1]) s++;
    }

    printf("%d\n",s);
    
}
void sort(int data[],int n){
        
    int i,j,tmp;
        
    for(i=1;i<n;i++){
    for(j=n-1;j>=1;j--){
        if(data[j]>data[j-1]){
            tmp=data[j-1];
            data[j-1]=data[j];
            data[j]=tmp;
            }
        }
    }
    
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$432, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -420(%rbp)
	leaq	-428(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -424(%rbp)
	jmp	.L2
.L3:
	leaq	-416(%rbp), %rdx
	movl	-424(%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, -424(%rbp)
.L2:
	movl	-428(%rbp), %eax
	cmpl	%eax, -424(%rbp)
	jl	.L3
	movl	-428(%rbp), %edx
	leaq	-416(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	sort
	movl	$0, -424(%rbp)
	jmp	.L4
.L6:
	movl	-424(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-424(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L5
	addl	$1, -420(%rbp)
.L5:
	addl	$1, -424(%rbp)
.L4:
	movl	-428(%rbp), %eax
	cmpl	%eax, -424(%rbp)
	jl	.L6
	movl	-420(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	sort
	.type	sort, @function
sort:
.LFB1:
	.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	$1, -12(%rbp)
	jmp	.L10
.L14:
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L11
.L13:
	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
	salq	$2, %rax
	leaq	-4(%rax), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L12
	movl	-8(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	leaq	-4(%rdx), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
.L12:
	subl	$1, -8(%rbp)
.L11:
	cmpl	$0, -8(%rbp)
	jg	.L13
	addl	$1, -12(%rbp)
.L10:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L14
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	sort, .-sort
	.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
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$432, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -420(%rbp)
	leaq	-428(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -424(%rbp)
	jmp	.L2
.L3:
	leaq	-416(%rbp), %rdx
	movl	-424(%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, -424(%rbp)
.L2:
	movl	-428(%rbp), %eax
	cmpl	%eax, -424(%rbp)
	jl	.L3
	movl	-428(%rbp), %edx
	leaq	-416(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	sort
	movl	$0, -424(%rbp)
	jmp	.L4
.L6:
	movl	-424(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-424(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	je	.L5
	addl	$1, -420(%rbp)
.L5:
	addl	$1, -424(%rbp)
.L4:
	movl	-428(%rbp), %eax
	cmpl	%eax, -424(%rbp)
	jl	.L6
	movl	-420(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	sort
	.type	sort, @function
sort:
.LFB1:
	.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	$1, -12(%rbp)
	jmp	.L10
.L14:
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L11
.L13:
	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
	salq	$2, %rax
	leaq	-4(%rax), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L12
	movl	-8(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	leaq	-4(%rdx), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
.L12:
	subl	$1, -8(%rbp)
.L11:
	cmpl	$0, -8(%rbp)
	jg	.L13
	addl	$1, -12(%rbp)
.L10:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L14
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	sort, .-sort
	.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:
