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

```c
#include<stdio.h>
#include<stdlib.h>
#define ll long long
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}

ll a[100010];
int main(){
	int n,m;
	scanf("%d%d",&n,&m);
	for(int i=0;i<n;i++){
		int t;
		scanf("%d",&t);
		a[i+1]=(a[i]+t)%m;
	}
	n++;
	sortup(a,n);
	ll ans=0;
	for(int i=0;i<n;i++){
		ll t=1;
		while(i+t<n&&a[i+t]==a[i])t++;
		ans+=t*(t-1)/2;
		i=i+t-1;
	}
	printf("%lld",ans);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	upll
	.type	upll, @function
upll:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	upll, .-upll
	.p2align 4
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB40:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE40:
	.size	sortup, .-sortup
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.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
	leaq	a(%rip), %rbx
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	xorl	%r14d, %r14d
	leaq	20(%rsp), %r13
	leaq	.LC1(%rip), %r12
	leaq	8(%rbx), %rbp
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	movslq	16(%rsp), %rcx
	addq	(%rbx,%r14,8), %rax
	cqto
	idivq	%rcx
	movl	12(%rsp), %eax
	movq	%rdx, 0(%rbp,%r14,8)
	addq	$1, %r14
	cmpl	%r14d, %eax
	jg	.L8
.L7:
	addl	$1, %eax
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	movq	%rbx, %rdi
	movslq	%eax, %rsi
	movl	%eax, 12(%rsp)
	call	qsort@PLT
	movslq	12(%rsp), %r11
	xorl	%r8d, %r8d
	xorl	%r10d, %r10d
	movq	%r11, %r9
	testl	%r11d, %r11d
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	leal	1(%r8), %eax
	cmpl	%eax, %r9d
	jle	.L16
	movslq	%r8d, %rax
	movq	%r11, %rcx
	movq	(%rbx,%rax,8), %rdi
	subq	%rax, %rcx
	leaq	(%rbx,%rax,8), %rsi
	movl	$1, %eax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	1(%rax), %rdx
	cmpq	%rcx, %rdx
	je	.L11
	movq	%rdx, %rax
.L13:
	cmpq	%rdi, (%rsi,%rax,8)
	je	.L12
	movq	%rax, %rcx
	subq	$1, %rax
.L11:
	imulq	%rcx, %rax
	addl	%ecx, %r8d
	sarq	%rax
	addq	%rax, %r10
	cmpl	%r8d, %r9d
	jg	.L9
.L10:
	xorl	%eax, %eax
	movq	%r10, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$32, %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
.L16:
	.cfi_restore_state
	xorl	%eax, %eax
	movl	$1, %ecx
	jmp	.L11
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800080
a:
	.zero	800080
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	upll
	.type	upll, @function
upll:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	upll, .-upll
	.p2align 4
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB40:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE40:
	.size	sortup, .-sortup
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.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
	leaq	a(%rip), %rbx
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	xorl	%r14d, %r14d
	leaq	20(%rsp), %r13
	leaq	.LC1(%rip), %r12
	leaq	8(%rbx), %rbp
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	movslq	16(%rsp), %rcx
	addq	(%rbx,%r14,8), %rax
	cqto
	idivq	%rcx
	movl	12(%rsp), %eax
	movq	%rdx, 0(%rbp,%r14,8)
	addq	$1, %r14
	cmpl	%r14d, %eax
	jg	.L8
.L7:
	addl	$1, %eax
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	movq	%rbx, %rdi
	movslq	%eax, %rsi
	movl	%eax, 12(%rsp)
	call	qsort@PLT
	movslq	12(%rsp), %r11
	xorl	%r8d, %r8d
	xorl	%r10d, %r10d
	movq	%r11, %r9
	testl	%r11d, %r11d
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	leal	1(%r8), %eax
	cmpl	%eax, %r9d
	jle	.L16
	movslq	%r8d, %rax
	movq	%r11, %rcx
	movq	(%rbx,%rax,8), %rdi
	subq	%rax, %rcx
	leaq	(%rbx,%rax,8), %rsi
	movl	$1, %eax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	1(%rax), %rdx
	cmpq	%rcx, %rdx
	je	.L11
	movq	%rdx, %rax
.L13:
	cmpq	%rdi, (%rsi,%rax,8)
	je	.L12
	movq	%rax, %rcx
	subq	$1, %rax
.L11:
	imulq	%rcx, %rax
	addl	%ecx, %r8d
	sarq	%rax
	addq	%rax, %r10
	cmpl	%r8d, %r9d
	jg	.L9
.L10:
	xorl	%eax, %eax
	movq	%r10, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$32, %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
.L16:
	.cfi_restore_state
	xorl	%eax, %eax
	movl	$1, %ecx
	jmp	.L11
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800080
a:
	.zero	800080
	.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
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	upll
	.type	upll, @function
upll:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	upll, .-upll
	.p2align 4
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB40:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE40:
	.size	sortup, .-sortup
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.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
	leaq	a(%rip), %rbx
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	xorl	%r14d, %r14d
	leaq	20(%rsp), %r13
	leaq	.LC1(%rip), %r12
	leaq	8(%rbx), %rbp
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	movslq	16(%rsp), %rcx
	addq	(%rbx,%r14,8), %rax
	cqto
	idivq	%rcx
	movl	12(%rsp), %eax
	movq	%rdx, 0(%rbp,%r14,8)
	addq	$1, %r14
	cmpl	%r14d, %eax
	jg	.L8
.L7:
	addl	$1, %eax
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	movq	%rbx, %rdi
	movslq	%eax, %rsi
	movl	%eax, 12(%rsp)
	call	qsort@PLT
	movslq	12(%rsp), %r11
	xorl	%r8d, %r8d
	xorl	%r10d, %r10d
	movq	%r11, %r9
	testl	%r11d, %r11d
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	leal	1(%r8), %eax
	cmpl	%eax, %r9d
	jle	.L16
	movslq	%r8d, %rax
	movq	%r11, %rcx
	movq	(%rbx,%rax,8), %rdi
	subq	%rax, %rcx
	leaq	(%rbx,%rax,8), %rsi
	movl	$1, %eax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	1(%rax), %rdx
	cmpq	%rcx, %rdx
	je	.L11
	movq	%rdx, %rax
.L13:
	cmpq	%rdi, (%rsi,%rax,8)
	je	.L12
	movq	%rax, %rcx
	subq	$1, %rax
.L11:
	imulq	%rcx, %rax
	addl	%ecx, %r8d
	sarq	%rax
	addq	%rax, %r10
	cmpl	%r8d, %r9d
	jg	.L9
.L10:
	xorl	%eax, %eax
	movq	%r10, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$32, %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
.L16:
	.cfi_restore_state
	xorl	%eax, %eax
	movl	$1, %ecx
	jmp	.L11
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800080
a:
	.zero	800080
	.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:
```
```c
#include<stdio.h>
#include<stdlib.h>
#define ll long long
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}

ll a[100010];
int main(){
	int n,m;
	scanf("%d%d",&n,&m);
	for(int i=0;i<n;i++){
		int t;
		scanf("%d",&t);
		a[i+1]=(a[i]+t)%m;
	}
	n++;
	sortup(a,n);
	ll ans=0;
	for(int i=0;i<n;i++){
		ll t=1;
		while(i+t<n&&a[i+t]==a[i])t++;
		ans+=t*(t-1)/2;
		i=i+t-1;
	}
	printf("%lld",ans);
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<stdlib.h>
#define ll long long
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}

ll a[100010];
int main(){
	int n,m;
	scanf("%d%d",&n,&m);
	for(int i=0;i<n;i++){
		int t;
		scanf("%d",&t);
		a[i+1]=(a[i]+t)%m;
	}
	n++;
	sortup(a,n);
	ll ans=0;
	for(int i=0;i<n;i++){
		ll t=1;
		while(i+t<n&&a[i+t]==a[i])t++;
		ans+=t*(t-1)/2;
		i=i+t-1;
	}
	printf("%lld",ans);
}```

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.
Optimized Assembly Code:

10 400000000
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000010 1000000000 1000000000
 13 17
29 7 5 7 18 51 7 13 8 55 42 9 81
 10 400000000
1000000000 1100000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000010 1000000000 1000000000
 13 17
29 7 5 3 18 51 7 13 8 55 42 9 81
 13 17
29 9 6 3 18 51 7 13 16 55 8 9 81
 13 17
29 9 6 3 34 51 7 13 16 55 8 9 81
 13 17
15 9 2 3 34 64 12 13 8 34 8 9 81
 10 400000000
1000000000 1000000010 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000
 13 17
29 11 6 3 34 51 7 13 16 55 8 9 81
 13 17
15 9 2 3 34 64 7 13 8 61 8 9 81

13 3 7 4 5 6 9 16 10 8
Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<stdlib.h>
#define ll long long
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}

ll a[100010];
int main(){
	int n,m;
	scanf("%d%d",&n,&m);
	for(int i=0;i<n;i++){
		int t;
		scanf("%d",&t);
		a[i+1]=(a[i]+t)%m;
	}
	n++;
	sortup(a,n);
	ll ans=0;
	for(int i=0;i<n;i++){
		ll t=1;
		while(i+t<n&&a[i+t]==a[i])t++;
		ans+=t*(t-1)/2;
		i=i+t-1;
	}
	printf("%lld",ans);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	upll
	.type	upll, @function
upll:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	upll, .-upll
	.p2align 4
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB40:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE40:
	.size	sortup, .-sortup
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.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
	leaq	a(%rip), %rbx
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	xorl	%r14d, %r14d
	leaq	20(%rsp), %r13
	leaq	.LC1(%rip), %r12
	leaq	8(%rbx), %rbp
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	movslq	16(%rsp), %rcx
	addq	(%rbx,%r14,8), %rax
	cqto
	idivq	%rcx
	movl	12(%rsp), %eax
	movq	%rdx, 0(%rbp,%r14,8)
	addq	$1, %r14
	cmpl	%r14d, %eax
	jg	.L8
.L7:
	addl	$1, %eax
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	movq	%rbx, %rdi
	movslq	%eax, %rsi
	movl	%eax, 12(%rsp)
	call	qsort@PLT
	movslq	12(%rsp), %r11
	xorl	%r8d, %r8d
	xorl	%r10d, %r10d
	movq	%r11, %r9
	testl	%r11d, %r11d
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	leal	1(%r8), %eax
	cmpl	%eax, %r9d
	jle	.L16
	movslq	%r8d, %rax
	movq	%r11, %rcx
	movq	(%rbx,%rax,8), %rdi
	subq	%rax, %rcx
	leaq	(%rbx,%rax,8), %rsi
	movl	$1, %eax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	1(%rax), %rdx
	cmpq	%rcx, %rdx
	je	.L11
	movq	%rdx, %rax
.L13:
	cmpq	%rdi, (%rsi,%rax,8)
	je	.L12
	movq	%rax, %rcx
	subq	$1, %rax
.L11:
	imulq	%rcx, %rax
	addl	%ecx, %r8d
	sarq	%rax
	addq	%rax, %r10
	cmpl	%r8d, %r9d
	jg	.L9
.L10:
	xorl	%eax, %eax
	movq	%r10, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$32, %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
.L16:
	.cfi_restore_state
	xorl	%eax, %eax
	movl	$1, %ecx
	jmp	.L11
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800080
a:
	.zero	800080
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	upll
	.type	upll, @function
upll:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	upll, .-upll
	.p2align 4
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB40:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE40:
	.size	sortup, .-sortup
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.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
	leaq	a(%rip), %rbx
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	xorl	%r14d, %r14d
	leaq	20(%rsp), %r13
	leaq	.LC1(%rip), %r12
	leaq	8(%rbx), %rbp
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	movslq	16(%rsp), %rcx
	addq	(%rbx,%r14,8), %rax
	cqto
	idivq	%rcx
	movl	12(%rsp), %eax
	movq	%rdx, 0(%rbp,%r14,8)
	addq	$1, %r14
	cmpl	%r14d, %eax
	jg	.L8
.L7:
	addl	$1, %eax
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	movq	%rbx, %rdi
	movslq	%eax, %rsi
	movl	%eax, 12(%rsp)
	call	qsort@PLT
	movslq	12(%rsp), %r11
	xorl	%r8d, %r8d
	xorl	%r10d, %r10d
	movq	%r11, %r9
	testl	%r11d, %r11d
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	leal	1(%r8), %eax
	cmpl	%eax, %r9d
	jle	.L16
	movslq	%r8d, %rax
	movq	%r11, %rcx
	movq	(%rbx,%rax,8), %rdi
	subq	%rax, %rcx
	leaq	(%rbx,%rax,8), %rsi
	movl	$1, %eax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	1(%rax), %rdx
	cmpq	%rcx, %rdx
	je	.L11
	movq	%rdx, %rax
.L13:
	cmpq	%rdi, (%rsi,%rax,8)
	je	.L12
	movq	%rax, %rcx
	subq	$1, %rax
.L11:
	imulq	%rcx, %rax
	addl	%ecx, %r8d
	sarq	%rax
	addq	%rax, %r10
	cmpl	%r8d, %r9d
	jg	.L9
.L10:
	xorl	%eax, %eax
	movq	%r10, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$32, %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
.L16:
	.cfi_restore_state
	xorl	%eax, %eax
	movl	$1, %ecx
	jmp	.L11
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800080
a:
	.zero	800080
	.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:
```