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>
#include<string.h>
#include<math.h>

int cmp(const int *a,const int *b){
  if(*a>*b){
    return 1;
  }
  else if(*a<*b)
  return -1;
  else return 0;
}

int main(void){
  int n;

  scanf("%d",&n);

  int d[n];
  long long kosu[n];
  long long ans=1;
  int cnt;
  int i,j,k;

  for(i=0;i<n;i++){
    scanf("%d",&d[i]);
    if(d[i]==0&&i!=0){
      printf("0\n");
      return 0;
    }
  }
  if(d[0]!=0){
    printf("0");
    return 0;
  }




  qsort(d,n,sizeof(int),(int (*)(const void *,const void *))cmp);
/*for(i=0;i<n;i++){
  printf("%d",d[i]);
}*/
for(i=0;i<n-1;i++){
if(d[i+1]-d[i]>1){
  printf("%d",0);
  return 0;
}
}
k=1;
kosu[0]=1;
  for(i=1;i<n;i=i+cnt){
    cnt=0;
    for(j=i;j<n;j++){
      if(d[j]==d[j+1]){
        cnt++;
        ans=ans*kosu[k-1]%998244353;
      }
      else{
        ans=ans*kosu[k-1]%998244353;
        kosu[k]=cnt+1;
        k++;
        cnt++;
        break;
      }
    }
  }
/*for(i=0;i<k;i++){
  printf("kosu[%d]=%d\n",i,kosu[i]);
}*/

/* for(i=1;i<k;i++){

    ans=ans*pow(kosu[i-1],kosu[i]);

    ans=ans%998244353;

  }*/
  ans=ans%998244353;
  printf("%lld",ans);



return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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	$120, %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
	leaq	-116(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	cltq
	leaq	0(,%rax,4), %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
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L9:
	cmpq	%rdx, %rsp
	je	.L10
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L9
.L10:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L11
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L11:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movq	$1, -96(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L12
.L15:
	movl	-108(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	testl	%eax, %eax
	jne	.L13
	cmpl	$0, -108(%rbp)
	je	.L13
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L14
.L13:
	addl	$1, -108(%rbp)
.L12:
	movl	-116(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L15
	movq	-80(%rbp), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	.L16
	movl	$48, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L14
.L16:
	movl	-116(%rbp), %eax
	movslq	%eax, %rsi
	movq	-80(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -108(%rbp)
	jmp	.L17
.L19:
	movl	-108(%rbp), %eax
	leal	1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jle	.L18
	movl	$0, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L14
.L18:
	addl	$1, -108(%rbp)
.L17:
	movl	-116(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -108(%rbp)
	jl	.L19
	movl	$1, -100(%rbp)
	movq	-64(%rbp), %rax
	movq	$1, (%rax)
	movl	$1, -108(%rbp)
	jmp	.L20
.L26:
	movl	$0, -112(%rbp)
	movl	-108(%rbp), %eax
	movl	%eax, -104(%rbp)
	jmp	.L21
.L25:
	movq	-80(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-104(%rbp), %eax
	leal	1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	jne	.L22
	addl	$1, -112(%rbp)
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	imulq	-96(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -96(%rbp)
	movq	-96(%rbp), %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -96(%rbp)
	jmp	.L29
.L22:
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	imulq	-96(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -96(%rbp)
	movq	-96(%rbp), %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -96(%rbp)
	movl	-112(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movq	-64(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rcx, (%rax,%rdx,8)
	addl	$1, -100(%rbp)
	addl	$1, -112(%rbp)
	jmp	.L24
.L29:
	addl	$1, -104(%rbp)
.L21:
	movl	-116(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L25
.L24:
	movl	-112(%rbp), %eax
	addl	%eax, -108(%rbp)
.L20:
	movl	-116(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L26
	movq	-96(%rbp), %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -96(%rbp)
	movq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L14:
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	cmp
	.type	cmp, @function
cmp:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, (%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.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
	leaq	-60(%rbp), %rsi
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	.LC0(%rip), %r13
	pushq	%r12
	movq	%r13, %rdi
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rcx
	movq	%rsp, %rdi
	leaq	15(,%rcx,4), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rdi
	andq	$-16, %rdx
	cmpq	%rdi, %rsp
	je	.L7
.L37:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L37
.L7:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L38
.L8:
	leaq	15(,%rcx,8), %rax
	leaq	3(%rsp), %rbx
	movq	%rsp, %rcx
	movq	%rbx, %r14
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-4, %rbx
	shrq	$2, %r14
	andq	$-16, %rdx
	subq	%rax, %rcx
.L9:
	cmpq	%rcx, %rsp
	je	.L10
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L9
.L38:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L8
.L10:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L39
.L11:
	leaq	7(%rsp), %rax
	movq	%rax, %rdi
	andq	$-8, %rax
	shrq	$3, %rdi
	movq	%rax, -72(%rbp)
	movq	%rdi, -80(%rbp)
	testl	%esi, %esi
	jle	.L13
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	call	__isoc99_scanf@PLT
	leaq	4(%rbx), %r12
.L14:
	movslq	-60(%rbp), %rsi
	addl	$1, %r15d
	cmpl	%r15d, %esi
	jle	.L13
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %r12
	call	__isoc99_scanf@PLT
	movl	-4(%r12), %eax
	testl	%eax, %eax
	jne	.L14
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L15:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L40
	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
.L13:
	.cfi_restore_state
	cmpl	$0, 0(,%r14,4)
	jne	.L41
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	-60(%rbp), %r14d
	xorl	%eax, %eax
	leal	-1(%r14), %ecx
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L19:
	movl	4(%rbx,%rax,4), %edx
	subl	(%rbx,%rax,4), %edx
	addq	$1, %rax
	cmpl	$1, %edx
	jg	.L42
.L18:
	cmpl	%eax, %ecx
	jg	.L19
	movq	-80(%rbp), %rax
	movl	$1, %r15d
	movl	$1, %r13d
	movl	$1, %edx
	movabsq	$155014655926305585, %r12
	movq	$1, 0(,%rax,8)
.L20:
	cmpl	%r13d, %r14d
	jle	.L43
	movq	-72(%rbp), %rdi
	leal	-1(%r15), %eax
	movl	%r14d, %r11d
	cltq
	subl	%r13d, %r11d
	movq	(%rdi,%rax,8), %r10
	movslq	%r13d, %rax
	xorl	%edi, %edi
	leaq	(%rbx,%rax,4), %rsi
	movl	(%rsi), %r8d
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rdx, %rcx
	movl	%r8d, %r9d
	movl	4(%rsi), %r8d
	addl	$1, %edi
	imulq	%r10, %rcx
	movq	%rcx, %rax
	imulq	%r12
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	cmpl	%r9d, %r8d
	jne	.L21
	addq	$4, %rsi
	cmpl	%edi, %r11d
	jne	.L22
.L23:
	addl	%edi, %r13d
	jmp	.L20
.L21:
	movq	-72(%rbp), %rsi
	movslq	%r15d, %rax
	movslq	%edi, %rcx
	addl	$1, %r15d
	movq	%rcx, (%rsi,%rax,8)
	jmp	.L23
.L43:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L15
.L41:
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L15
.L42:
	xorl	%edx, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L15
.L39:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L11
.L40:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, (%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE51:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.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
	leaq	-60(%rbp), %rsi
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	.LC0(%rip), %r13
	pushq	%r12
	movq	%r13, %rdi
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rcx
	movq	%rsp, %rdi
	leaq	15(,%rcx,4), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rdi
	andq	$-16, %rdx
	cmpq	%rdi, %rsp
	je	.L7
.L37:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L37
.L7:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L38
.L8:
	leaq	15(,%rcx,8), %rax
	leaq	3(%rsp), %rbx
	movq	%rsp, %rcx
	movq	%rbx, %r14
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-4, %rbx
	shrq	$2, %r14
	andq	$-16, %rdx
	subq	%rax, %rcx
.L9:
	cmpq	%rcx, %rsp
	je	.L10
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L9
.L38:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L8
.L10:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L39
.L11:
	leaq	7(%rsp), %rax
	movq	%rax, %rdi
	andq	$-8, %rax
	shrq	$3, %rdi
	movq	%rax, -72(%rbp)
	movq	%rdi, -80(%rbp)
	testl	%esi, %esi
	jle	.L13
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	call	__isoc99_scanf@PLT
	leaq	4(%rbx), %r12
.L14:
	movslq	-60(%rbp), %rsi
	addl	$1, %r15d
	cmpl	%r15d, %esi
	jle	.L13
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %r12
	call	__isoc99_scanf@PLT
	movl	-4(%r12), %eax
	testl	%eax, %eax
	jne	.L14
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L15:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L40
	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
.L13:
	.cfi_restore_state
	cmpl	$0, 0(,%r14,4)
	jne	.L41
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	-60(%rbp), %r14d
	xorl	%eax, %eax
	leal	-1(%r14), %ecx
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L19:
	movl	4(%rbx,%rax,4), %edx
	subl	(%rbx,%rax,4), %edx
	addq	$1, %rax
	cmpl	$1, %edx
	jg	.L42
.L18:
	cmpl	%eax, %ecx
	jg	.L19
	movq	-80(%rbp), %rax
	movl	$1, %r15d
	movl	$1, %r13d
	movl	$1, %edx
	movabsq	$155014655926305585, %r12
	movq	$1, 0(,%rax,8)
.L20:
	cmpl	%r13d, %r14d
	jle	.L43
	movq	-72(%rbp), %rdi
	leal	-1(%r15), %eax
	movl	%r14d, %r11d
	cltq
	subl	%r13d, %r11d
	movq	(%rdi,%rax,8), %r10
	movslq	%r13d, %rax
	xorl	%edi, %edi
	leaq	(%rbx,%rax,4), %rsi
	movl	(%rsi), %r8d
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rdx, %rcx
	movl	%r8d, %r9d
	movl	4(%rsi), %r8d
	addl	$1, %edi
	imulq	%r10, %rcx
	movq	%rcx, %rax
	imulq	%r12
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	cmpl	%r9d, %r8d
	jne	.L21
	addq	$4, %rsi
	cmpl	%edi, %r11d
	jne	.L22
.L23:
	addl	%edi, %r13d
	jmp	.L20
.L21:
	movq	-72(%rbp), %rsi
	movslq	%r15d, %rax
	movslq	%edi, %rcx
	addl	$1, %r15d
	movq	%rcx, (%rsi,%rax,8)
	jmp	.L23
.L43:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L15
.L41:
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L15
.L42:
	xorl	%edx, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L15
.L39:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L11
.L40:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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>
#include<stdlib.h>
#include<string.h>
#include<math.h>

int cmp(const int *a,const int *b){
  if(*a>*b){
    return 1;
  }
  else if(*a<*b)
  return -1;
  else return 0;
}

int main(void){
  int n;

  scanf("%d",&n);

  int d[n];
  long long kosu[n];
  long long ans=1;
  int cnt;
  int i,j,k;

  for(i=0;i<n;i++){
    scanf("%d",&d[i]);
    if(d[i]==0&&i!=0){
      printf("0\n");
      return 0;
    }
  }
  if(d[0]!=0){
    printf("0");
    return 0;
  }




  qsort(d,n,sizeof(int),(int (*)(const void *,const void *))cmp);
/*for(i=0;i<n;i++){
  printf("%d",d[i]);
}*/
for(i=0;i<n-1;i++){
if(d[i+1]-d[i]>1){
  printf("%d",0);
  return 0;
}
}
k=1;
kosu[0]=1;
  for(i=1;i<n;i=i+cnt){
    cnt=0;
    for(j=i;j<n;j++){
      if(d[j]==d[j+1]){
        cnt++;
        ans=ans*kosu[k-1]%998244353;
      }
      else{
        ans=ans*kosu[k-1]%998244353;
        kosu[k]=cnt+1;
        k++;
        cnt++;
        break;
      }
    }
  }
/*for(i=0;i<k;i++){
  printf("kosu[%d]=%d\n",i,kosu[i]);
}*/

/* for(i=1;i<k;i++){

    ans=ans*pow(kosu[i-1],kosu[i]);

    ans=ans%998244353;

  }*/
  ans=ans%998244353;
  printf("%lld",ans);



return 0;
}

4
0 1 1 2

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>
#include<string.h>
#include<math.h>

int cmp(const int *a,const int *b){
  if(*a>*b){
    return 1;
  }
  else if(*a<*b)
  return -1;
  else return 0;
}

int main(void){
  int n;

  scanf("%d",&n);

  int d[n];
  long long kosu[n];
  long long ans=1;
  int cnt;
  int i,j,k;

  for(i=0;i<n;i++){
    scanf("%d",&d[i]);
    if(d[i]==0&&i!=0){
      printf("0\n");
      return 0;
    }
  }
  if(d[0]!=0){
    printf("0");
    return 0;
  }




  qsort(d,n,sizeof(int),(int (*)(const void *,const void *))cmp);
/*for(i=0;i<n;i++){
  printf("%d",d[i]);
}*/
for(i=0;i<n-1;i++){
if(d[i+1]-d[i]>1){
  printf("%d",0);
  return 0;
}
}
k=1;
kosu[0]=1;
  for(i=1;i<n;i=i+cnt){
    cnt=0;
    for(j=i;j<n;j++){
      if(d[j]==d[j+1]){
        cnt++;
        ans=ans*kosu[k-1]%998244353;
      }
      else{
        ans=ans*kosu[k-1]%998244353;
        kosu[k]=cnt+1;
        k++;
        cnt++;
        break;
      }
    }
  }
/*for(i=0;i<k;i++){
  printf("kosu[%d]=%d\n",i,kosu[i]);
}*/

/* for(i=1;i<k;i++){

    ans=ans*pow(kosu[i-1],kosu[i]);

    ans=ans%998244353;

  }*/
  ans=ans%998244353;
  printf("%lld",ans);



return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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	$120, %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
	leaq	-116(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	cltq
	leaq	0(,%rax,4), %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
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L9:
	cmpq	%rdx, %rsp
	je	.L10
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L9
.L10:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L11
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L11:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movq	$1, -96(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L12
.L15:
	movl	-108(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	testl	%eax, %eax
	jne	.L13
	cmpl	$0, -108(%rbp)
	je	.L13
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L14
.L13:
	addl	$1, -108(%rbp)
.L12:
	movl	-116(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L15
	movq	-80(%rbp), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	.L16
	movl	$48, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L14
.L16:
	movl	-116(%rbp), %eax
	movslq	%eax, %rsi
	movq	-80(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -108(%rbp)
	jmp	.L17
.L19:
	movl	-108(%rbp), %eax
	leal	1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jle	.L18
	movl	$0, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L14
.L18:
	addl	$1, -108(%rbp)
.L17:
	movl	-116(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -108(%rbp)
	jl	.L19
	movl	$1, -100(%rbp)
	movq	-64(%rbp), %rax
	movq	$1, (%rax)
	movl	$1, -108(%rbp)
	jmp	.L20
.L26:
	movl	$0, -112(%rbp)
	movl	-108(%rbp), %eax
	movl	%eax, -104(%rbp)
	jmp	.L21
.L25:
	movq	-80(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-104(%rbp), %eax
	leal	1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	jne	.L22
	addl	$1, -112(%rbp)
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	imulq	-96(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -96(%rbp)
	movq	-96(%rbp), %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -96(%rbp)
	jmp	.L29
.L22:
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	imulq	-96(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -96(%rbp)
	movq	-96(%rbp), %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -96(%rbp)
	movl	-112(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movq	-64(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rcx, (%rax,%rdx,8)
	addl	$1, -100(%rbp)
	addl	$1, -112(%rbp)
	jmp	.L24
.L29:
	addl	$1, -104(%rbp)
.L21:
	movl	-116(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L25
.L24:
	movl	-112(%rbp), %eax
	addl	%eax, -108(%rbp)
.L20:
	movl	-116(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L26
	movq	-96(%rbp), %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -96(%rbp)
	movq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L14:
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	cmp
	.type	cmp, @function
cmp:
.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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	$120, %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
	leaq	-116(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	cltq
	leaq	0(,%rax,4), %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
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L9:
	cmpq	%rdx, %rsp
	je	.L10
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L9
.L10:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L11
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L11:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movq	$1, -96(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L12
.L15:
	movl	-108(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	testl	%eax, %eax
	jne	.L13
	cmpl	$0, -108(%rbp)
	je	.L13
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L14
.L13:
	addl	$1, -108(%rbp)
.L12:
	movl	-116(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L15
	movq	-80(%rbp), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	.L16
	movl	$48, %edi
	call	putchar@PLT
	movl	$0, %eax
	jmp	.L14
.L16:
	movl	-116(%rbp), %eax
	movslq	%eax, %rsi
	movq	-80(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -108(%rbp)
	jmp	.L17
.L19:
	movl	-108(%rbp), %eax
	leal	1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-80(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jle	.L18
	movl	$0, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L14
.L18:
	addl	$1, -108(%rbp)
.L17:
	movl	-116(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -108(%rbp)
	jl	.L19
	movl	$1, -100(%rbp)
	movq	-64(%rbp), %rax
	movq	$1, (%rax)
	movl	$1, -108(%rbp)
	jmp	.L20
.L26:
	movl	$0, -112(%rbp)
	movl	-108(%rbp), %eax
	movl	%eax, -104(%rbp)
	jmp	.L21
.L25:
	movq	-80(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-104(%rbp), %eax
	leal	1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	jne	.L22
	addl	$1, -112(%rbp)
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	imulq	-96(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -96(%rbp)
	movq	-96(%rbp), %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -96(%rbp)
	jmp	.L29
.L22:
	movl	-100(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	imulq	-96(%rbp), %rax
	movq	%rax, %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -96(%rbp)
	movq	-96(%rbp), %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -96(%rbp)
	movl	-112(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movq	-64(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rcx, (%rax,%rdx,8)
	addl	$1, -100(%rbp)
	addl	$1, -112(%rbp)
	jmp	.L24
.L29:
	addl	$1, -104(%rbp)
.L21:
	movl	-116(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L25
.L24:
	movl	-112(%rbp), %eax
	addl	%eax, -108(%rbp)
.L20:
	movl	-116(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jl	.L26
	movq	-96(%rbp), %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -96(%rbp)
	movq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L14:
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
