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>
#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);}

int a[3][70];
int cnt[3];
ll ans[70],anscnt;
int main(){
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int t;
		scanf("%d",&t);
		if(t==2)a[0][cnt[0]++]=i+1;
		if(t==-2)a[1][cnt[1]++]=i+1;
		if(t==-1)a[2][cnt[2]++]=i+1;
	}
	for(int i=0;i<cnt[0];i++)ans[anscnt++]=a[0][i];
	for(int i=0;i<cnt[1]/2;i++){
		ans[anscnt++]=a[1][2*i];
		ans[anscnt++]=a[1][2*i+1];
	}
	if(cnt[2]&&cnt[1]%2){
		ans[anscnt++]=a[1][cnt[1]-1];
		ans[anscnt++]=a[2][0];
	}
	sortup(ans,anscnt);
	printf("%lld\n",anscnt);
	for(int i=0;i<anscnt;i++)printf("%lld\n",ans[i]);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	upll
	.type	upll, @function
upll:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L2
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upll, .-upll
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sortup, .-sortup
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 840
a:
	.zero	840
	.globl	cnt
	.align 8
	.type	cnt, @object
	.size	cnt, 12
cnt:
	.zero	12
	.globl	ans
	.align 32
	.type	ans, @object
	.size	ans, 560
ans:
	.zero	560
	.globl	anscnt
	.align 8
	.type	anscnt, @object
	.size	anscnt, 8
anscnt:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	%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	$0, -24(%rbp)
	jmp	.L7
.L11:
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	cmpl	$2, %eax
	jne	.L8
	movl	cnt(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, cnt(%rip)
	movl	-24(%rbp), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L8:
	movl	-28(%rbp), %eax
	cmpl	$-2, %eax
	jne	.L9
	movl	4+cnt(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, 4+cnt(%rip)
	movl	-24(%rbp), %edx
	leal	1(%rdx), %ecx
	cltq
	addq	$70, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L9:
	movl	-28(%rbp), %eax
	cmpl	$-1, %eax
	jne	.L10
	movl	8+cnt(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, 8+cnt(%rip)
	movl	-24(%rbp), %edx
	leal	1(%rdx), %ecx
	cltq
	addq	$140, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L10:
	addl	$1, -24(%rbp)
.L7:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L11
	movl	$0, -20(%rbp)
	jmp	.L12
.L13:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movq	anscnt(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, anscnt(%rip)
	movslq	%ecx, %rdx
	leaq	0(,%rax,8), %rcx
	leaq	ans(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	addl	$1, -20(%rbp)
.L12:
	movl	cnt(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L13
	movl	$0, -16(%rbp)
	jmp	.L14
.L15:
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	cltq
	addq	$70, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movq	anscnt(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, anscnt(%rip)
	movslq	%ecx, %rdx
	leaq	0(,%rax,8), %rcx
	leaq	ans(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	cltq
	addq	$70, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movq	anscnt(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, anscnt(%rip)
	movslq	%ecx, %rdx
	leaq	0(,%rax,8), %rcx
	leaq	ans(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	addl	$1, -16(%rbp)
.L14:
	movl	4+cnt(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -16(%rbp)
	jl	.L15
	movl	8+cnt(%rip), %eax
	testl	%eax, %eax
	je	.L16
	movl	4+cnt(%rip), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L16
	movl	4+cnt(%rip), %eax
	subl	$1, %eax
	cltq
	addq	$70, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movq	anscnt(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, anscnt(%rip)
	movslq	%ecx, %rdx
	leaq	0(,%rax,8), %rcx
	leaq	ans(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	movl	560+a(%rip), %ecx
	movq	anscnt(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, anscnt(%rip)
	movslq	%ecx, %rdx
	leaq	0(,%rax,8), %rcx
	leaq	ans(%rip), %rax
	movq	%rdx, (%rcx,%rax)
.L16:
	movq	anscnt(%rip), %rax
	movl	%eax, %esi
	leaq	ans(%rip), %rax
	movq	%rax, %rdi
	call	sortup
	movq	anscnt(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -12(%rbp)
	jmp	.L17
.L18:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -12(%rbp)
.L17:
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	anscnt(%rip), %rax
	cmpq	%rax, %rdx
	jl	.L18
	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
.LFE8:
	.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	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"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.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
	leaq	a(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdi
	xorl	%ebx, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	4(%rsp), %r13
	call	__isoc99_scanf@PLT
	movl	(%rsp), %edx
	testl	%edx, %edx
	jg	.L7
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	$-2, %eax
	je	.L12
	cmpl	$-1, %eax
	jne	.L11
	movslq	8+cnt(%rip), %rax
	leal	1(%rax), %edx
	movl	%ebx, 560(%r12,%rax,4)
	movl	%edx, 8+cnt(%rip)
.L11:
	cmpl	%ebx, (%rsp)
	jle	.L14
.L7:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	cmpl	$2, %eax
	jne	.L10
	movslq	cnt(%rip), %rax
	leal	1(%rax), %edx
	movl	%ebx, (%r12,%rax,4)
	movl	%edx, cnt(%rip)
	cmpl	%ebx, (%rsp)
	jg	.L7
.L14:
	movl	cnt(%rip), %edx
	movq	anscnt(%rip), %rsi
	leaq	ans(%rip), %rbp
	testl	%edx, %edx
	jle	.L9
	leal	-1(%rdx), %edi
	cmpl	$2, %edi
	jbe	.L27
	movdqa	a(%rip), %xmm1
	pxor	%xmm0, %xmm0
	movl	%edx, %ecx
	leaq	ans(%rip), %rbp
	movdqa	%xmm0, %xmm2
	leaq	0(%rbp,%rsi,8), %rax
	shrl	$2, %ecx
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, (%rax)
	movups	%xmm1, 16(%rax)
	cmpl	$1, %ecx
	je	.L16
	movdqa	16+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 32(%rax)
	movups	%xmm1, 48(%rax)
	cmpl	$2, %ecx
	je	.L16
	movdqa	32+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 64(%rax)
	movups	%xmm1, 80(%rax)
	cmpl	$3, %ecx
	je	.L16
	movdqa	48+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 96(%rax)
	movups	%xmm1, 112(%rax)
	cmpl	$4, %ecx
	je	.L16
	movdqa	64+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 128(%rax)
	movups	%xmm1, 144(%rax)
	cmpl	$5, %ecx
	je	.L16
	movdqa	80+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 160(%rax)
	movups	%xmm1, 176(%rax)
	cmpl	$6, %ecx
	je	.L16
	movdqa	96+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 192(%rax)
	movups	%xmm1, 208(%rax)
	cmpl	$7, %ecx
	je	.L16
	movdqa	112+a(%rip), %xmm1
	pcmpgtd	%xmm1, %xmm0
	movdqa	%xmm1, %xmm2
	punpckldq	%xmm0, %xmm2
	punpckhdq	%xmm0, %xmm1
	movups	%xmm2, 224(%rax)
	movups	%xmm1, 240(%rax)
	cmpl	$8, %ecx
	je	.L16
	movdqa	128+a(%rip), %xmm1
	pxor	%xmm0, %xmm0
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 256(%rax)
	movups	%xmm1, 272(%rax)
	cmpl	$9, %ecx
	je	.L16
	movdqa	144+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 288(%rax)
	movups	%xmm1, 304(%rax)
	cmpl	$10, %ecx
	je	.L16
	movdqa	160+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 320(%rax)
	movups	%xmm1, 336(%rax)
	cmpl	$11, %ecx
	je	.L16
	movdqa	176+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 352(%rax)
	movups	%xmm1, 368(%rax)
	cmpl	$12, %ecx
	je	.L16
	movdqa	192+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 384(%rax)
	movups	%xmm1, 400(%rax)
	cmpl	$13, %ecx
	je	.L16
	movdqa	208+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 416(%rax)
	movups	%xmm1, 432(%rax)
	cmpl	$14, %ecx
	je	.L16
	movdqa	224+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 448(%rax)
	movups	%xmm1, 464(%rax)
	cmpl	$15, %ecx
	je	.L16
	movdqa	240+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 480(%rax)
	movups	%xmm1, 496(%rax)
	cmpl	$16, %ecx
	je	.L16
	movdqa	256+a(%rip), %xmm1
	pcmpgtd	%xmm1, %xmm0
	movdqa	%xmm1, %xmm2
	punpckldq	%xmm0, %xmm2
	punpckhdq	%xmm0, %xmm1
	movups	%xmm2, 512(%rax)
	movups	%xmm1, 528(%rax)
	.p2align 4,,10
	.p2align 3
.L16:
	movl	%edx, %eax
	andl	$-4, %eax
	movl	%eax, %ecx
	addq	%rsi, %rcx
	cmpl	%eax, %edx
	je	.L17
.L15:
	leaq	a(%rip), %r9
	movslq	%eax, %r8
	leaq	1(%rcx), %r10
	movslq	(%r9,%r8,4), %r8
	movq	%r8, 0(%rbp,%rcx,8)
	leal	1(%rax), %r8d
	cmpl	%r8d, %edx
	jle	.L17
	movslq	%r8d, %r8
	addl	$2, %eax
	addq	$2, %rcx
	movslq	(%r9,%r8,4), %r8
	movq	%r8, 0(%rbp,%r10,8)
	cmpl	%eax, %edx
	jle	.L17
	cltq
	movslq	(%r9,%rax,4), %rax
	movq	%rax, 0(%rbp,%rcx,8)
.L17:
	leaq	1(%rsi,%rdi), %rsi
	movq	%rsi, anscnt(%rip)
.L9:
	movl	4+cnt(%rip), %r8d
	movl	%r8d, %edi
	shrl	$31, %edi
	addl	%r8d, %edi
	sarl	%edi
	cmpl	$1, %r8d
	jle	.L18
	cmpl	$3, %r8d
	jle	.L28
	movdqu	280+a(%rip), %xmm1
	pxor	%xmm0, %xmm0
	movl	%edi, %edx
	leaq	0(%rbp,%rsi,8), %rax
	movdqa	%xmm0, %xmm2
	shrl	%edx
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, (%rax)
	movups	%xmm1, 16(%rax)
	cmpl	$1, %edx
	je	.L20
	movdqu	296+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 32(%rax)
	movups	%xmm1, 48(%rax)
	cmpl	$2, %edx
	je	.L20
	movdqu	312+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 64(%rax)
	movups	%xmm1, 80(%rax)
	cmpl	$3, %edx
	je	.L20
	movdqu	328+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 96(%rax)
	movups	%xmm1, 112(%rax)
	cmpl	$4, %edx
	je	.L20
	movdqu	344+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 128(%rax)
	movups	%xmm1, 144(%rax)
	cmpl	$5, %edx
	je	.L20
	movdqu	360+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 160(%rax)
	movups	%xmm1, 176(%rax)
	cmpl	$6, %edx
	je	.L20
	movdqu	376+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 192(%rax)
	movups	%xmm1, 208(%rax)
	cmpl	$7, %edx
	je	.L20
	movdqu	392+a(%rip), %xmm1
	pcmpgtd	%xmm1, %xmm0
	movdqa	%xmm1, %xmm2
	punpckldq	%xmm0, %xmm2
	punpckhdq	%xmm0, %xmm1
	movups	%xmm2, 224(%rax)
	movups	%xmm1, 240(%rax)
	cmpl	$8, %edx
	je	.L20
	movdqu	408+a(%rip), %xmm1
	pxor	%xmm0, %xmm0
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 256(%rax)
	movups	%xmm1, 272(%rax)
	cmpl	$9, %edx
	je	.L20
	movdqu	424+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 288(%rax)
	movups	%xmm1, 304(%rax)
	cmpl	$10, %edx
	je	.L20
	movdqu	440+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 320(%rax)
	movups	%xmm1, 336(%rax)
	cmpl	$11, %edx
	je	.L20
	movdqu	456+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 352(%rax)
	movups	%xmm1, 368(%rax)
	cmpl	$12, %edx
	je	.L20
	movdqu	472+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 384(%rax)
	movups	%xmm1, 400(%rax)
	cmpl	$13, %edx
	je	.L20
	movdqu	488+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 416(%rax)
	movups	%xmm1, 432(%rax)
	cmpl	$14, %edx
	je	.L20
	movdqu	504+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 448(%rax)
	movups	%xmm1, 464(%rax)
	cmpl	$15, %edx
	je	.L20
	movdqu	520+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 480(%rax)
	movups	%xmm1, 496(%rax)
	cmpl	$16, %edx
	je	.L20
	movdqu	536+a(%rip), %xmm1
	pcmpgtd	%xmm1, %xmm0
	movdqa	%xmm1, %xmm2
	punpckldq	%xmm0, %xmm2
	punpckhdq	%xmm0, %xmm1
	movups	%xmm2, 512(%rax)
	movups	%xmm1, 528(%rax)
	.p2align 4,,10
	.p2align 3
.L20:
	movl	%edi, %eax
	andl	$-2, %eax
	movl	%eax, %edx
	leaq	(%rsi,%rdx,2), %r9
	cmpl	%edi, %eax
	je	.L21
.L19:
	addl	%eax, %eax
	leaq	a(%rip), %rdx
	movslq	%eax, %rcx
	addl	$1, %eax
	cltq
	movslq	280(%rdx,%rcx,4), %rcx
	movslq	280(%rdx,%rax,4), %rax
	movq	%rcx, %xmm0
	movq	%rax, %xmm4
	punpcklqdq	%xmm4, %xmm0
	movups	%xmm0, 0(%rbp,%r9,8)
.L21:
	leal	-1(%rdi), %eax
	xorl	%edx, %edx
	addq	%rax, %rax
	cmpl	$1, %r8d
	cmovle	%rdx, %rax
	leaq	2(%rsi,%rax), %rsi
	movq	%rsi, anscnt(%rip)
.L18:
	movl	8+cnt(%rip), %eax
	testl	%eax, %eax
	je	.L22
	testb	$1, %r8b
	jne	.L136
.L22:
	movslq	anscnt(%rip), %rsi
	leaq	upll(%rip), %rcx
	movq	%rbp, %rdi
	xorl	%ebx, %ebx
	movl	$8, %edx
	leaq	.LC1(%rip), %r12
	call	qsort@PLT
	xorl	%eax, %eax
	movq	%r12, %rsi
	movl	$1, %edi
	movq	anscnt(%rip), %rdx
	call	__printf_chk@PLT
	cmpq	$0, anscnt(%rip)
	jle	.L24
	.p2align 4,,10
	.p2align 3
.L23:
	movq	0(%rbp,%rbx,8), %rdx
	xorl	%eax, %eax
	movq	%r12, %rsi
	movl	$1, %edi
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpq	%rbx, anscnt(%rip)
	jg	.L23
.L24:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L137
	addq	$24, %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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	movslq	4+cnt(%rip), %rax
	leal	1(%rax), %edx
	movl	%ebx, 280(%r12,%rax,4)
	movl	%edx, 4+cnt(%rip)
	jmp	.L11
.L136:
	subl	$1, %r8d
	leaq	a(%rip), %rax
	movslq	%r8d, %r8
	movslq	280(%rax,%r8,4), %rax
	movq	%rax, %xmm0
	leaq	2(%rsi), %rax
	movq	%rax, anscnt(%rip)
	movslq	560+a(%rip), %rax
	movq	%rax, %xmm5
	punpcklqdq	%xmm5, %xmm0
	movups	%xmm0, 0(%rbp,%rsi,8)
	jmp	.L22
.L27:
	movq	%rsi, %rcx
	xorl	%eax, %eax
	leaq	ans(%rip), %rbp
	jmp	.L15
.L28:
	movq	%rsi, %r9
	xorl	%eax, %eax
	jmp	.L19
.L137:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	anscnt
	.bss
	.align 8
	.type	anscnt, @object
	.size	anscnt, 8
anscnt:
	.zero	8
	.globl	ans
	.align 32
	.type	ans, @object
	.size	ans, 560
ans:
	.zero	560
	.globl	cnt
	.align 8
	.type	cnt, @object
	.size	cnt, 12
cnt:
	.zero	12
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 840
a:
	.zero	840
	.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	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"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.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
	leaq	a(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdi
	xorl	%ebx, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	4(%rsp), %r13
	call	__isoc99_scanf@PLT
	movl	(%rsp), %edx
	testl	%edx, %edx
	jg	.L7
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	$-2, %eax
	je	.L12
	cmpl	$-1, %eax
	jne	.L11
	movslq	8+cnt(%rip), %rax
	leal	1(%rax), %edx
	movl	%ebx, 560(%r12,%rax,4)
	movl	%edx, 8+cnt(%rip)
.L11:
	cmpl	%ebx, (%rsp)
	jle	.L14
.L7:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	cmpl	$2, %eax
	jne	.L10
	movslq	cnt(%rip), %rax
	leal	1(%rax), %edx
	movl	%ebx, (%r12,%rax,4)
	movl	%edx, cnt(%rip)
	cmpl	%ebx, (%rsp)
	jg	.L7
.L14:
	movl	cnt(%rip), %edx
	movq	anscnt(%rip), %rsi
	leaq	ans(%rip), %rbp
	testl	%edx, %edx
	jle	.L9
	leal	-1(%rdx), %edi
	cmpl	$2, %edi
	jbe	.L27
	movdqa	a(%rip), %xmm1
	pxor	%xmm0, %xmm0
	movl	%edx, %ecx
	leaq	ans(%rip), %rbp
	movdqa	%xmm0, %xmm2
	leaq	0(%rbp,%rsi,8), %rax
	shrl	$2, %ecx
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, (%rax)
	movups	%xmm1, 16(%rax)
	cmpl	$1, %ecx
	je	.L16
	movdqa	16+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 32(%rax)
	movups	%xmm1, 48(%rax)
	cmpl	$2, %ecx
	je	.L16
	movdqa	32+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 64(%rax)
	movups	%xmm1, 80(%rax)
	cmpl	$3, %ecx
	je	.L16
	movdqa	48+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 96(%rax)
	movups	%xmm1, 112(%rax)
	cmpl	$4, %ecx
	je	.L16
	movdqa	64+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 128(%rax)
	movups	%xmm1, 144(%rax)
	cmpl	$5, %ecx
	je	.L16
	movdqa	80+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 160(%rax)
	movups	%xmm1, 176(%rax)
	cmpl	$6, %ecx
	je	.L16
	movdqa	96+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 192(%rax)
	movups	%xmm1, 208(%rax)
	cmpl	$7, %ecx
	je	.L16
	movdqa	112+a(%rip), %xmm1
	pcmpgtd	%xmm1, %xmm0
	movdqa	%xmm1, %xmm2
	punpckldq	%xmm0, %xmm2
	punpckhdq	%xmm0, %xmm1
	movups	%xmm2, 224(%rax)
	movups	%xmm1, 240(%rax)
	cmpl	$8, %ecx
	je	.L16
	movdqa	128+a(%rip), %xmm1
	pxor	%xmm0, %xmm0
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 256(%rax)
	movups	%xmm1, 272(%rax)
	cmpl	$9, %ecx
	je	.L16
	movdqa	144+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 288(%rax)
	movups	%xmm1, 304(%rax)
	cmpl	$10, %ecx
	je	.L16
	movdqa	160+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 320(%rax)
	movups	%xmm1, 336(%rax)
	cmpl	$11, %ecx
	je	.L16
	movdqa	176+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 352(%rax)
	movups	%xmm1, 368(%rax)
	cmpl	$12, %ecx
	je	.L16
	movdqa	192+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 384(%rax)
	movups	%xmm1, 400(%rax)
	cmpl	$13, %ecx
	je	.L16
	movdqa	208+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 416(%rax)
	movups	%xmm1, 432(%rax)
	cmpl	$14, %ecx
	je	.L16
	movdqa	224+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 448(%rax)
	movups	%xmm1, 464(%rax)
	cmpl	$15, %ecx
	je	.L16
	movdqa	240+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 480(%rax)
	movups	%xmm1, 496(%rax)
	cmpl	$16, %ecx
	je	.L16
	movdqa	256+a(%rip), %xmm1
	pcmpgtd	%xmm1, %xmm0
	movdqa	%xmm1, %xmm2
	punpckldq	%xmm0, %xmm2
	punpckhdq	%xmm0, %xmm1
	movups	%xmm2, 512(%rax)
	movups	%xmm1, 528(%rax)
	.p2align 4,,10
	.p2align 3
.L16:
	movl	%edx, %eax
	andl	$-4, %eax
	movl	%eax, %ecx
	addq	%rsi, %rcx
	cmpl	%eax, %edx
	je	.L17
.L15:
	leaq	a(%rip), %r9
	movslq	%eax, %r8
	leaq	1(%rcx), %r10
	movslq	(%r9,%r8,4), %r8
	movq	%r8, 0(%rbp,%rcx,8)
	leal	1(%rax), %r8d
	cmpl	%r8d, %edx
	jle	.L17
	movslq	%r8d, %r8
	addl	$2, %eax
	addq	$2, %rcx
	movslq	(%r9,%r8,4), %r8
	movq	%r8, 0(%rbp,%r10,8)
	cmpl	%eax, %edx
	jle	.L17
	cltq
	movslq	(%r9,%rax,4), %rax
	movq	%rax, 0(%rbp,%rcx,8)
.L17:
	leaq	1(%rsi,%rdi), %rsi
	movq	%rsi, anscnt(%rip)
.L9:
	movl	4+cnt(%rip), %r8d
	movl	%r8d, %edi
	shrl	$31, %edi
	addl	%r8d, %edi
	sarl	%edi
	cmpl	$1, %r8d
	jle	.L18
	cmpl	$3, %r8d
	jle	.L28
	movdqu	280+a(%rip), %xmm1
	pxor	%xmm0, %xmm0
	movl	%edi, %edx
	leaq	0(%rbp,%rsi,8), %rax
	movdqa	%xmm0, %xmm2
	shrl	%edx
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, (%rax)
	movups	%xmm1, 16(%rax)
	cmpl	$1, %edx
	je	.L20
	movdqu	296+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 32(%rax)
	movups	%xmm1, 48(%rax)
	cmpl	$2, %edx
	je	.L20
	movdqu	312+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 64(%rax)
	movups	%xmm1, 80(%rax)
	cmpl	$3, %edx
	je	.L20
	movdqu	328+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 96(%rax)
	movups	%xmm1, 112(%rax)
	cmpl	$4, %edx
	je	.L20
	movdqu	344+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 128(%rax)
	movups	%xmm1, 144(%rax)
	cmpl	$5, %edx
	je	.L20
	movdqu	360+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 160(%rax)
	movups	%xmm1, 176(%rax)
	cmpl	$6, %edx
	je	.L20
	movdqu	376+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 192(%rax)
	movups	%xmm1, 208(%rax)
	cmpl	$7, %edx
	je	.L20
	movdqu	392+a(%rip), %xmm1
	pcmpgtd	%xmm1, %xmm0
	movdqa	%xmm1, %xmm2
	punpckldq	%xmm0, %xmm2
	punpckhdq	%xmm0, %xmm1
	movups	%xmm2, 224(%rax)
	movups	%xmm1, 240(%rax)
	cmpl	$8, %edx
	je	.L20
	movdqu	408+a(%rip), %xmm1
	pxor	%xmm0, %xmm0
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 256(%rax)
	movups	%xmm1, 272(%rax)
	cmpl	$9, %edx
	je	.L20
	movdqu	424+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 288(%rax)
	movups	%xmm1, 304(%rax)
	cmpl	$10, %edx
	je	.L20
	movdqu	440+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 320(%rax)
	movups	%xmm1, 336(%rax)
	cmpl	$11, %edx
	je	.L20
	movdqu	456+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 352(%rax)
	movups	%xmm1, 368(%rax)
	cmpl	$12, %edx
	je	.L20
	movdqu	472+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 384(%rax)
	movups	%xmm1, 400(%rax)
	cmpl	$13, %edx
	je	.L20
	movdqu	488+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 416(%rax)
	movups	%xmm1, 432(%rax)
	cmpl	$14, %edx
	je	.L20
	movdqu	504+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 448(%rax)
	movups	%xmm1, 464(%rax)
	cmpl	$15, %edx
	je	.L20
	movdqu	520+a(%rip), %xmm1
	movdqa	%xmm0, %xmm2
	pcmpgtd	%xmm1, %xmm2
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm1
	movups	%xmm3, 480(%rax)
	movups	%xmm1, 496(%rax)
	cmpl	$16, %edx
	je	.L20
	movdqu	536+a(%rip), %xmm1
	pcmpgtd	%xmm1, %xmm0
	movdqa	%xmm1, %xmm2
	punpckldq	%xmm0, %xmm2
	punpckhdq	%xmm0, %xmm1
	movups	%xmm2, 512(%rax)
	movups	%xmm1, 528(%rax)
	.p2align 4,,10
	.p2align 3
.L20:
	movl	%edi, %eax
	andl	$-2, %eax
	movl	%eax, %edx
	leaq	(%rsi,%rdx,2), %r9
	cmpl	%edi, %eax
	je	.L21
.L19:
	addl	%eax, %eax
	leaq	a(%rip), %rdx
	movslq	%eax, %rcx
	addl	$1, %eax
	cltq
	movslq	280(%rdx,%rcx,4), %rcx
	movslq	280(%rdx,%rax,4), %rax
	movq	%rcx, %xmm0
	movq	%rax, %xmm4
	punpcklqdq	%xmm4, %xmm0
	movups	%xmm0, 0(%rbp,%r9,8)
.L21:
	leal	-1(%rdi), %eax
	xorl	%edx, %edx
	addq	%rax, %rax
	cmpl	$1, %r8d
	cmovle	%rdx, %rax
	leaq	2(%rsi,%rax), %rsi
	movq	%rsi, anscnt(%rip)
.L18:
	movl	8+cnt(%rip), %eax
	testl	%eax, %eax
	je	.L22
	testb	$1, %r8b
	jne	.L136
.L22:
	movslq	anscnt(%rip), %rsi
	leaq	upll(%rip), %rcx
	movq	%rbp, %rdi
	xorl	%ebx, %ebx
	movl	$8, %edx
	leaq	.LC1(%rip), %r12
	call	qsort@PLT
	xorl	%eax, %eax
	movq	%r12, %rsi
	movl	$1, %edi
	movq	anscnt(%rip), %rdx
	call	__printf_chk@PLT
	cmpq	$0, anscnt(%rip)
	jle	.L24
	.p2align 4,,10
	.p2align 3
.L23:
	movq	0(%rbp,%rbx,8), %rdx
	xorl	%eax, %eax
	movq	%r12, %rsi
	movl	$1, %edi
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpq	%rbx, anscnt(%rip)
	jg	.L23
.L24:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L137
	addq	$24, %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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	movslq	4+cnt(%rip), %rax
	leal	1(%rax), %edx
	movl	%ebx, 280(%r12,%rax,4)
	movl	%edx, 4+cnt(%rip)
	jmp	.L11
.L136:
	subl	$1, %r8d
	leaq	a(%rip), %rax
	movslq	%r8d, %r8
	movslq	280(%rax,%r8,4), %rax
	movq	%rax, %xmm0
	leaq	2(%rsi), %rax
	movq	%rax, anscnt(%rip)
	movslq	560+a(%rip), %rax
	movq	%rax, %xmm5
	punpcklqdq	%xmm5, %xmm0
	movups	%xmm0, 0(%rbp,%rsi,8)
	jmp	.L22
.L27:
	movq	%rsi, %rcx
	xorl	%eax, %eax
	leaq	ans(%rip), %rbp
	jmp	.L15
.L28:
	movq	%rsi, %r9
	xorl	%eax, %eax
	jmp	.L19
.L137:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	anscnt
	.bss
	.align 8
	.type	anscnt, @object
	.size	anscnt, 8
anscnt:
	.zero	8
	.globl	ans
	.align 32
	.type	ans, @object
	.size	ans, 560
ans:
	.zero	560
	.globl	cnt
	.align 8
	.type	cnt, @object
	.size	cnt, 12
cnt:
	.zero	12
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 840
a:
	.zero	840
	.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>
#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);}

int a[3][70];
int cnt[3];
ll ans[70],anscnt;
int main(){
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int t;
		scanf("%d",&t);
		if(t==2)a[0][cnt[0]++]=i+1;
		if(t==-2)a[1][cnt[1]++]=i+1;
		if(t==-1)a[2][cnt[2]++]=i+1;
	}
	for(int i=0;i<cnt[0];i++)ans[anscnt++]=a[0][i];
	for(int i=0;i<cnt[1]/2;i++){
		ans[anscnt++]=a[1][2*i];
		ans[anscnt++]=a[1][2*i+1];
	}
	if(cnt[2]&&cnt[1]%2){
		ans[anscnt++]=a[1][cnt[1]-1];
		ans[anscnt++]=a[2][0];
	}
	sortup(ans,anscnt);
	printf("%lld\n",anscnt);
	for(int i=0;i<anscnt;i++)printf("%lld\n",ans[i]);
}

4
2 -1 -2 1
 4
2 0 -1 1
 4
1 -1 -2 0
 4
0 -1 -1 1
 4
-1 -1 0 2
 4
-1 -2 0 2
 4
2 -1 1 2
 4
-1 1 -2 0
 4
2 -1 2 2
 4
1 2 -1 1

3
1
2
3
 1
1
 2
2
3
 0
 1
4
 3
1
2
4
 2
1
4
 2
1
3
 3
1
3
4
 1
2

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>
#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);}

int a[3][70];
int cnt[3];
ll ans[70],anscnt;
int main(){
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int t;
		scanf("%d",&t);
		if(t==2)a[0][cnt[0]++]=i+1;
		if(t==-2)a[1][cnt[1]++]=i+1;
		if(t==-1)a[2][cnt[2]++]=i+1;
	}
	for(int i=0;i<cnt[0];i++)ans[anscnt++]=a[0][i];
	for(int i=0;i<cnt[1]/2;i++){
		ans[anscnt++]=a[1][2*i];
		ans[anscnt++]=a[1][2*i+1];
	}
	if(cnt[2]&&cnt[1]%2){
		ans[anscnt++]=a[1][cnt[1]-1];
		ans[anscnt++]=a[2][0];
	}
	sortup(ans,anscnt);
	printf("%lld\n",anscnt);
	for(int i=0;i<anscnt;i++)printf("%lld\n",ans[i]);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	upll
	.type	upll, @function
upll:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L2
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upll, .-upll
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sortup, .-sortup
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 840
a:
	.zero	840
	.globl	cnt
	.align 8
	.type	cnt, @object
	.size	cnt, 12
cnt:
	.zero	12
	.globl	ans
	.align 32
	.type	ans, @object
	.size	ans, 560
ans:
	.zero	560
	.globl	anscnt
	.align 8
	.type	anscnt, @object
	.size	anscnt, 8
anscnt:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	%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	$0, -24(%rbp)
	jmp	.L7
.L11:
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	cmpl	$2, %eax
	jne	.L8
	movl	cnt(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, cnt(%rip)
	movl	-24(%rbp), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L8:
	movl	-28(%rbp), %eax
	cmpl	$-2, %eax
	jne	.L9
	movl	4+cnt(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, 4+cnt(%rip)
	movl	-24(%rbp), %edx
	leal	1(%rdx), %ecx
	cltq
	addq	$70, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L9:
	movl	-28(%rbp), %eax
	cmpl	$-1, %eax
	jne	.L10
	movl	8+cnt(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, 8+cnt(%rip)
	movl	-24(%rbp), %edx
	leal	1(%rdx), %ecx
	cltq
	addq	$140, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L10:
	addl	$1, -24(%rbp)
.L7:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L11
	movl	$0, -20(%rbp)
	jmp	.L12
.L13:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movq	anscnt(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, anscnt(%rip)
	movslq	%ecx, %rdx
	leaq	0(,%rax,8), %rcx
	leaq	ans(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	addl	$1, -20(%rbp)
.L12:
	movl	cnt(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L13
	movl	$0, -16(%rbp)
	jmp	.L14
.L15:
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	cltq
	addq	$70, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movq	anscnt(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, anscnt(%rip)
	movslq	%ecx, %rdx
	leaq	0(,%rax,8), %rcx
	leaq	ans(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	cltq
	addq	$70, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movq	anscnt(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, anscnt(%rip)
	movslq	%ecx, %rdx
	leaq	0(,%rax,8), %rcx
	leaq	ans(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	addl	$1, -16(%rbp)
.L14:
	movl	4+cnt(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -16(%rbp)
	jl	.L15
	movl	8+cnt(%rip), %eax
	testl	%eax, %eax
	je	.L16
	movl	4+cnt(%rip), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L16
	movl	4+cnt(%rip), %eax
	subl	$1, %eax
	cltq
	addq	$70, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movq	anscnt(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, anscnt(%rip)
	movslq	%ecx, %rdx
	leaq	0(,%rax,8), %rcx
	leaq	ans(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	movl	560+a(%rip), %ecx
	movq	anscnt(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, anscnt(%rip)
	movslq	%ecx, %rdx
	leaq	0(,%rax,8), %rcx
	leaq	ans(%rip), %rax
	movq	%rdx, (%rcx,%rax)
.L16:
	movq	anscnt(%rip), %rax
	movl	%eax, %esi
	leaq	ans(%rip), %rax
	movq	%rax, %rdi
	call	sortup
	movq	anscnt(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -12(%rbp)
	jmp	.L17
.L18:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -12(%rbp)
.L17:
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	anscnt(%rip), %rax
	cmpq	%rax, %rdx
	jl	.L18
	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
.LFE8:
	.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	upll
	.type	upll, @function
upll:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L2
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upll, .-upll
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sortup, .-sortup
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 840
a:
	.zero	840
	.globl	cnt
	.align 8
	.type	cnt, @object
	.size	cnt, 12
cnt:
	.zero	12
	.globl	ans
	.align 32
	.type	ans, @object
	.size	ans, 560
ans:
	.zero	560
	.globl	anscnt
	.align 8
	.type	anscnt, @object
	.size	anscnt, 8
anscnt:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	%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	$0, -24(%rbp)
	jmp	.L7
.L11:
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	cmpl	$2, %eax
	jne	.L8
	movl	cnt(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, cnt(%rip)
	movl	-24(%rbp), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L8:
	movl	-28(%rbp), %eax
	cmpl	$-2, %eax
	jne	.L9
	movl	4+cnt(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, 4+cnt(%rip)
	movl	-24(%rbp), %edx
	leal	1(%rdx), %ecx
	cltq
	addq	$70, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L9:
	movl	-28(%rbp), %eax
	cmpl	$-1, %eax
	jne	.L10
	movl	8+cnt(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, 8+cnt(%rip)
	movl	-24(%rbp), %edx
	leal	1(%rdx), %ecx
	cltq
	addq	$140, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L10:
	addl	$1, -24(%rbp)
.L7:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L11
	movl	$0, -20(%rbp)
	jmp	.L12
.L13:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movq	anscnt(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, anscnt(%rip)
	movslq	%ecx, %rdx
	leaq	0(,%rax,8), %rcx
	leaq	ans(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	addl	$1, -20(%rbp)
.L12:
	movl	cnt(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L13
	movl	$0, -16(%rbp)
	jmp	.L14
.L15:
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	cltq
	addq	$70, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movq	anscnt(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, anscnt(%rip)
	movslq	%ecx, %rdx
	leaq	0(,%rax,8), %rcx
	leaq	ans(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	cltq
	addq	$70, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movq	anscnt(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, anscnt(%rip)
	movslq	%ecx, %rdx
	leaq	0(,%rax,8), %rcx
	leaq	ans(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	addl	$1, -16(%rbp)
.L14:
	movl	4+cnt(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -16(%rbp)
	jl	.L15
	movl	8+cnt(%rip), %eax
	testl	%eax, %eax
	je	.L16
	movl	4+cnt(%rip), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L16
	movl	4+cnt(%rip), %eax
	subl	$1, %eax
	cltq
	addq	$70, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movq	anscnt(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, anscnt(%rip)
	movslq	%ecx, %rdx
	leaq	0(,%rax,8), %rcx
	leaq	ans(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	movl	560+a(%rip), %ecx
	movq	anscnt(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, anscnt(%rip)
	movslq	%ecx, %rdx
	leaq	0(,%rax,8), %rcx
	leaq	ans(%rip), %rax
	movq	%rdx, (%rcx,%rax)
.L16:
	movq	anscnt(%rip), %rax
	movl	%eax, %esi
	leaq	ans(%rip), %rax
	movq	%rax, %rdi
	call	sortup
	movq	anscnt(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -12(%rbp)
	jmp	.L17
.L18:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -12(%rbp)
.L17:
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movq	anscnt(%rip), %rax
	cmpq	%rax, %rdx
	jl	.L18
	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
.LFE8:
	.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:
