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>
int main()
{
    unsigned long long i,n,count=1,X,j,temp;
    scanf("%llu",&n);
    unsigned long long x[n];
    for(i=0;i<n;i++)scanf("%llu",&x[i]);
    for(i=0;i<n-1;i++){
        for(j=0;j<n-1;j++){
            if(x[j]>x[j+1])
            {
                temp=x[j];
                x[j]=x[j+1];
                x[j+1]=temp;
            }
        }
    }
    X=x[0];
    for(i=0;i<n;i++){
        if(x[i]!=X){
                X=x[i];
                count++;
        }
    }
    printf("%llu\n",count);
    return 0;
}


```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%llu"
.LC1:
	.string	"%llu\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movq	$1, -104(%rbp)
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rax
	movq	%rax, %rdx
	subq	$1, %rdx
	movq	%rdx, -80(%rbp)
	movq	%rax, %r14
	movl	$0, %r15d
	movq	%rax, %r12
	movl	$0, %r13d
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -72(%rbp)
	movq	$0, -112(%rbp)
	jmp	.L5
.L6:
	movq	-112(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -112(%rbp)
.L5:
	movq	-120(%rbp), %rax
	cmpq	%rax, -112(%rbp)
	jb	.L6
	movq	$0, -112(%rbp)
	jmp	.L7
.L11:
	movq	$0, -88(%rbp)
	jmp	.L8
.L10:
	movq	-72(%rbp), %rax
	movq	-88(%rbp), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	-88(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	-72(%rbp), %rax
	movq	(%rax,%rcx,8), %rax
	cmpq	%rax, %rdx
	jbe	.L9
	movq	-72(%rbp), %rax
	movq	-88(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -64(%rbp)
	movq	-88(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-72(%rbp), %rax
	movq	(%rax,%rdx,8), %rcx
	movq	-72(%rbp), %rax
	movq	-88(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	-88(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	-72(%rbp), %rax
	movq	-64(%rbp), %rdx
	movq	%rdx, (%rax,%rcx,8)
.L9:
	addq	$1, -88(%rbp)
.L8:
	movq	-120(%rbp), %rax
	subq	$1, %rax
	cmpq	%rax, -88(%rbp)
	jb	.L10
	addq	$1, -112(%rbp)
.L7:
	movq	-120(%rbp), %rax
	subq	$1, %rax
	cmpq	%rax, -112(%rbp)
	jb	.L11
	movq	-72(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)
	movq	$0, -112(%rbp)
	jmp	.L12
.L14:
	movq	-72(%rbp), %rax
	movq	-112(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, -96(%rbp)
	je	.L13
	movq	-72(%rbp), %rax
	movq	-112(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -96(%rbp)
	addq	$1, -104(%rbp)
.L13:
	addq	$1, -112(%rbp)
.L12:
	movq	-120(%rbp), %rax
	cmpq	%rax, -112(%rbp)
	jb	.L14
	movq	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%llu"
.LC1:
	.string	"%llu\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	.LC0(%rip), %r14
	leaq	-64(%rbp), %rsi
	pushq	%r13
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rdi
	movq	%rsp, %rcx
	leaq	15(,%rdi,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L27:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L27
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L28
.L4:
	leaq	7(%rsp), %rbx
	movq	%rbx, %r12
	andq	$-8, %rbx
	shrq	$3, %r12
	testq	%rdi, %rdi
	je	.L16
	movq	%rbx, %r15
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$1, %r13
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rdi
	addq	$8, %r15
	cmpq	%r13, %rdi
	ja	.L6
	movq	%rdi, %rsi
	movq	0(,%r12,8), %rdx
	subq	$1, %rsi
	je	.L29
.L5:
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L14:
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L9:
	movdqu	(%rbx,%rdx,8), %xmm0
	addq	$1, %rdx
	movhlps	%xmm0, %xmm2
	movdqa	%xmm0, %xmm1
	movq	%xmm0, %rcx
	movq	%xmm2, %rax
	shufpd	$1, %xmm0, %xmm1
	cmpq	%rax, %rcx
	jbe	.L8
	movups	%xmm1, -8(%rbx,%rdx,8)
.L8:
	cmpq	%rsi, %rdx
	jne	.L9
	addq	$1, %r8
	cmpq	%rdx, %r8
	jne	.L14
	movq	0(,%r12,8), %rdx
	testq	%rdi, %rdi
	je	.L17
.L7:
	movl	$1, %r8d
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rdx, %rcx
	movq	(%rbx,%rax,8), %rdx
	cmpq	%rcx, %rdx
	setne	%cl
	addq	$1, %rax
	movzbl	%cl, %ecx
	addq	%rcx, %r8
	cmpq	%rdi, %rax
	jb	.L13
.L11:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L30
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L28:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L17:
	movl	$1, %r8d
	jmp	.L11
.L29:
	movl	$1, %edi
	jmp	.L7
.L16:
	orq	$-1, %rsi
	jmp	.L5
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%llu"
.LC1:
	.string	"%llu\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	.LC0(%rip), %r14
	leaq	-64(%rbp), %rsi
	pushq	%r13
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rdi
	movq	%rsp, %rcx
	leaq	15(,%rdi,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L27:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L27
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L28
.L4:
	leaq	7(%rsp), %rbx
	movq	%rbx, %r12
	andq	$-8, %rbx
	shrq	$3, %r12
	testq	%rdi, %rdi
	je	.L16
	movq	%rbx, %r15
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$1, %r13
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rdi
	addq	$8, %r15
	cmpq	%r13, %rdi
	ja	.L6
	movq	%rdi, %rsi
	movq	0(,%r12,8), %rdx
	subq	$1, %rsi
	je	.L29
.L5:
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L14:
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L9:
	movdqu	(%rbx,%rdx,8), %xmm0
	addq	$1, %rdx
	movhlps	%xmm0, %xmm2
	movdqa	%xmm0, %xmm1
	movq	%xmm0, %rcx
	movq	%xmm2, %rax
	shufpd	$1, %xmm0, %xmm1
	cmpq	%rax, %rcx
	jbe	.L8
	movups	%xmm1, -8(%rbx,%rdx,8)
.L8:
	cmpq	%rsi, %rdx
	jne	.L9
	addq	$1, %r8
	cmpq	%rdx, %r8
	jne	.L14
	movq	0(,%r12,8), %rdx
	testq	%rdi, %rdi
	je	.L17
.L7:
	movl	$1, %r8d
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rdx, %rcx
	movq	(%rbx,%rax,8), %rdx
	cmpq	%rcx, %rdx
	setne	%cl
	addq	$1, %rax
	movzbl	%cl, %ecx
	addq	%rcx, %r8
	cmpq	%rdi, %rax
	jb	.L13
.L11:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L30
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L28:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L17:
	movl	$1, %r8d
	jmp	.L11
.L29:
	movl	$1, %edi
	jmp	.L7
.L16:
	orq	$-1, %rsi
	jmp	.L5
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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>
int main()
{
    unsigned long long i,n,count=1,X,j,temp;
    scanf("%llu",&n);
    unsigned long long x[n];
    for(i=0;i<n;i++)scanf("%llu",&x[i]);
    for(i=0;i<n-1;i++){
        for(j=0;j<n-1;j++){
            if(x[j]>x[j+1])
            {
                temp=x[j];
                x[j]=x[j+1];
                x[j+1]=temp;
            }
        }
    }
    X=x[0];
    for(i=0;i<n;i++){
        if(x[i]!=X){
                X=x[i];
                count++;
        }
    }
    printf("%llu\n",count);
    return 0;
}



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>
int main()
{
    unsigned long long i,n,count=1,X,j,temp;
    scanf("%llu",&n);
    unsigned long long x[n];
    for(i=0;i<n;i++)scanf("%llu",&x[i]);
    for(i=0;i<n-1;i++){
        for(j=0;j<n-1;j++){
            if(x[j]>x[j+1])
            {
                temp=x[j];
                x[j]=x[j+1];
                x[j+1]=temp;
            }
        }
    }
    X=x[0];
    for(i=0;i<n;i++){
        if(x[i]!=X){
                X=x[i];
                count++;
        }
    }
    printf("%llu\n",count);
    return 0;
}


```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%llu"
.LC1:
	.string	"%llu\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movq	$1, -104(%rbp)
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rax
	movq	%rax, %rdx
	subq	$1, %rdx
	movq	%rdx, -80(%rbp)
	movq	%rax, %r14
	movl	$0, %r15d
	movq	%rax, %r12
	movl	$0, %r13d
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -72(%rbp)
	movq	$0, -112(%rbp)
	jmp	.L5
.L6:
	movq	-112(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -112(%rbp)
.L5:
	movq	-120(%rbp), %rax
	cmpq	%rax, -112(%rbp)
	jb	.L6
	movq	$0, -112(%rbp)
	jmp	.L7
.L11:
	movq	$0, -88(%rbp)
	jmp	.L8
.L10:
	movq	-72(%rbp), %rax
	movq	-88(%rbp), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	-88(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	-72(%rbp), %rax
	movq	(%rax,%rcx,8), %rax
	cmpq	%rax, %rdx
	jbe	.L9
	movq	-72(%rbp), %rax
	movq	-88(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -64(%rbp)
	movq	-88(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-72(%rbp), %rax
	movq	(%rax,%rdx,8), %rcx
	movq	-72(%rbp), %rax
	movq	-88(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	-88(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	-72(%rbp), %rax
	movq	-64(%rbp), %rdx
	movq	%rdx, (%rax,%rcx,8)
.L9:
	addq	$1, -88(%rbp)
.L8:
	movq	-120(%rbp), %rax
	subq	$1, %rax
	cmpq	%rax, -88(%rbp)
	jb	.L10
	addq	$1, -112(%rbp)
.L7:
	movq	-120(%rbp), %rax
	subq	$1, %rax
	cmpq	%rax, -112(%rbp)
	jb	.L11
	movq	-72(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)
	movq	$0, -112(%rbp)
	jmp	.L12
.L14:
	movq	-72(%rbp), %rax
	movq	-112(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, -96(%rbp)
	je	.L13
	movq	-72(%rbp), %rax
	movq	-112(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -96(%rbp)
	addq	$1, -104(%rbp)
.L13:
	addq	$1, -112(%rbp)
.L12:
	movq	-120(%rbp), %rax
	cmpq	%rax, -112(%rbp)
	jb	.L14
	movq	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata
.LC0:
	.string	"%llu"
.LC1:
	.string	"%llu\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movq	$1, -104(%rbp)
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rax
	movq	%rax, %rdx
	subq	$1, %rdx
	movq	%rdx, -80(%rbp)
	movq	%rax, %r14
	movl	$0, %r15d
	movq	%rax, %r12
	movl	$0, %r13d
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -72(%rbp)
	movq	$0, -112(%rbp)
	jmp	.L5
.L6:
	movq	-112(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -112(%rbp)
.L5:
	movq	-120(%rbp), %rax
	cmpq	%rax, -112(%rbp)
	jb	.L6
	movq	$0, -112(%rbp)
	jmp	.L7
.L11:
	movq	$0, -88(%rbp)
	jmp	.L8
.L10:
	movq	-72(%rbp), %rax
	movq	-88(%rbp), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	-88(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	-72(%rbp), %rax
	movq	(%rax,%rcx,8), %rax
	cmpq	%rax, %rdx
	jbe	.L9
	movq	-72(%rbp), %rax
	movq	-88(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -64(%rbp)
	movq	-88(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-72(%rbp), %rax
	movq	(%rax,%rdx,8), %rcx
	movq	-72(%rbp), %rax
	movq	-88(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	-88(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	-72(%rbp), %rax
	movq	-64(%rbp), %rdx
	movq	%rdx, (%rax,%rcx,8)
.L9:
	addq	$1, -88(%rbp)
.L8:
	movq	-120(%rbp), %rax
	subq	$1, %rax
	cmpq	%rax, -88(%rbp)
	jb	.L10
	addq	$1, -112(%rbp)
.L7:
	movq	-120(%rbp), %rax
	subq	$1, %rax
	cmpq	%rax, -112(%rbp)
	jb	.L11
	movq	-72(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)
	movq	$0, -112(%rbp)
	jmp	.L12
.L14:
	movq	-72(%rbp), %rax
	movq	-112(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, -96(%rbp)
	je	.L13
	movq	-72(%rbp), %rax
	movq	-112(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -96(%rbp)
	addq	$1, -104(%rbp)
.L13:
	addq	$1, -112(%rbp)
.L12:
	movq	-120(%rbp), %rax
	cmpq	%rax, -112(%rbp)
	jb	.L14
	movq	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
