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>

typedef struct{
  int n;
  int count;
}hoge;
hoge s[13];
int sn;
int main(){
  int seq[13],n,i,j,k,fix;
  do{
    scanf("%d",&n);
    if(n==0) break;
    for(i=0;i<n;i++) scanf("%d ",seq+i);
    for(i=0;;i++){
      for(j=0;j<n;j++)
      fix=1;
      for(j=0;j<n;j++){
	for(k=0;k<sn;k++){
	  if(s[k].n==seq[j]){
	    s[k].count++;
	    break;
	  }
	}
	if(k==sn){
	  s[sn].n=seq[j];
	  s[sn].count=1;
	  sn++;
	}
      }
      for(j=0;j<n;j++){
	for(k=0;k<sn;k++){
	  if(s[k].n==seq[j]){
	    if(seq[j]!=s[k].count) fix=0;
	    seq[j]=s[k].count;
	    break;
	  }
	}
      }
      sn=0;
      if(fix) break;
    }
    printf("%d\n",i);
    for(i=0;i<n-1;i++){
      s[i].n=s[i].count=-1;
      printf("%d ",seq[i]);
    }
    printf("%d\n",seq[i]);
  }while(1);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 104
s:
	.zero	104
	.globl	sn
	.align 4
	.type	sn, @object
	.size	sn, 4
sn:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d "
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L27:
	leaq	-84(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-84(%rbp), %eax
	testl	%eax, %eax
	je	.L32
	movl	$0, -80(%rbp)
	jmp	.L4
.L5:
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -80(%rbp)
.L4:
	movl	-84(%rbp), %eax
	cmpl	%eax, -80(%rbp)
	jl	.L5
	movl	$0, -80(%rbp)
.L24:
	movl	$0, -76(%rbp)
	jmp	.L6
.L7:
	movl	$1, -68(%rbp)
	addl	$1, -76(%rbp)
.L6:
	movl	-84(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L7
	movl	$0, -76(%rbp)
	jmp	.L8
.L14:
	movl	$0, -72(%rbp)
	jmp	.L9
.L12:
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-76(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L10
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L11
.L10:
	addl	$1, -72(%rbp)
.L9:
	movl	sn(%rip), %eax
	cmpl	%eax, -72(%rbp)
	jl	.L12
.L11:
	movl	sn(%rip), %eax
	cmpl	%eax, -72(%rbp)
	jne	.L13
	movl	sn(%rip), %edx
	movl	-76(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sn(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	sn(%rip), %eax
	addl	$1, %eax
	movl	%eax, sn(%rip)
.L13:
	addl	$1, -76(%rbp)
.L8:
	movl	-84(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L14
	movl	$0, -76(%rbp)
	jmp	.L15
.L21:
	movl	$0, -72(%rbp)
	jmp	.L16
.L20:
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-76(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L17
	movl	-76(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %edx
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+s(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L18
	movl	$0, -68(%rbp)
.L18:
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-76(%rbp), %eax
	cltq
	movl	%edx, -64(%rbp,%rax,4)
	jmp	.L19
.L17:
	addl	$1, -72(%rbp)
.L16:
	movl	sn(%rip), %eax
	cmpl	%eax, -72(%rbp)
	jl	.L20
.L19:
	addl	$1, -76(%rbp)
.L15:
	movl	-84(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L21
	movl	$0, sn(%rip)
	cmpl	$0, -68(%rbp)
	jne	.L33
	addl	$1, -80(%rbp)
	jmp	.L24
.L33:
	nop
	movl	-80(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -80(%rbp)
	jmp	.L25
.L26:
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	$-1, (%rdx,%rax)
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-80(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-80(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -80(%rbp)
.L25:
	movl	-84(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -80(%rbp)
	jl	.L26
	movl	-80(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L27
.L32:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d "
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$136, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	60(%rsp), %rax
	movq	%rax, 40(%rsp)
.L22:
	movq	40(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	jle	.L3
	leaq	64(%rsp), %rax
	xorl	%ebx, %ebx
	movq	%rax, 24(%rsp)
	movq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbp, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L4
	leal	-1(%rax), %edx
	movl	sn(%rip), %r14d
	leaq	68(%rsp,%rdx,4), %r13
	testl	%eax, %eax
	jle	.L3
	movl	$0, 36(%rsp)
	leaq	s(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L24:
	movq	24(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%ecx, %ecx
	testl	%r14d, %r14d
	jle	.L8
	movl	(%rdx), %eax
	cmpl	(%r15), %eax
	je	.L26
	cmpl	$1, %r14d
	je	.L27
	cmpl	8+s(%rip), %eax
	je	.L28
	cmpl	$2, %r14d
	je	.L29
	cmpl	16+s(%rip), %eax
	je	.L30
	cmpl	$3, %r14d
	je	.L31
	cmpl	24+s(%rip), %eax
	je	.L32
	cmpl	$4, %r14d
	je	.L33
	cmpl	32+s(%rip), %eax
	je	.L34
	cmpl	$5, %r14d
	je	.L35
	cmpl	40+s(%rip), %eax
	je	.L36
	cmpl	$6, %r14d
	je	.L37
	cmpl	48+s(%rip), %eax
	je	.L38
	cmpl	$7, %r14d
	je	.L39
	cmpl	56+s(%rip), %eax
	je	.L40
	cmpl	$8, %r14d
	je	.L41
	cmpl	64+s(%rip), %eax
	je	.L42
	cmpl	$9, %r14d
	je	.L43
	cmpl	72+s(%rip), %eax
	je	.L44
	cmpl	$10, %r14d
	je	.L45
	cmpl	80+s(%rip), %eax
	je	.L46
	cmpl	$11, %r14d
	je	.L47
	cmpl	88+s(%rip), %eax
	je	.L48
	cmpl	$12, %r14d
	je	.L49
	cmpl	%eax, 96+s(%rip)
	movl	$13, %ecx
	je	.L105
.L8:
	cmpl	%ecx, %r14d
	je	.L106
	addq	$4, %rdx
	cmpq	%r13, %rdx
	jne	.L5
.L11:
	movl	64+s(%rip), %eax
	movl	(%r15), %edi
	movl	$1, %esi
	movl	8+s(%rip), %r8d
	movl	16+s(%rip), %r9d
	movl	40+s(%rip), %ebx
	movl	48+s(%rip), %ebp
	movl	%eax, 8(%rsp)
	movl	72+s(%rip), %eax
	movl	24+s(%rip), %r10d
	movl	32+s(%rip), %r11d
	movl	56+s(%rip), %r12d
	movl	%eax, 12(%rsp)
	movl	80+s(%rip), %eax
	movq	24(%rsp), %rdx
	movl	%eax, 16(%rsp)
	movl	88+s(%rip), %eax
	movl	%eax, 20(%rsp)
	movl	96+s(%rip), %eax
	movl	%eax, 32(%rsp)
	.p2align 4,,10
	.p2align 3
.L12:
	testl	%r14d, %r14d
	jle	.L15
	movl	(%rdx), %eax
	cmpl	%edi, %eax
	je	.L51
	cmpl	$1, %r14d
	je	.L15
	cmpl	%r8d, %eax
	je	.L52
	cmpl	$2, %r14d
	je	.L15
	cmpl	%r9d, %eax
	je	.L53
	cmpl	$3, %r14d
	je	.L15
	cmpl	%r10d, %eax
	je	.L54
	cmpl	$4, %r14d
	je	.L15
	cmpl	%r11d, %eax
	je	.L55
	cmpl	$5, %r14d
	je	.L15
	cmpl	%eax, %ebx
	je	.L56
	cmpl	$6, %r14d
	je	.L15
	cmpl	%ebp, %eax
	je	.L57
	cmpl	$7, %r14d
	je	.L15
	cmpl	%r12d, %eax
	je	.L58
	cmpl	$8, %r14d
	je	.L15
	cmpl	%eax, 8(%rsp)
	je	.L59
	cmpl	$9, %r14d
	je	.L15
	cmpl	12(%rsp), %eax
	je	.L60
	cmpl	$10, %r14d
	je	.L15
	cmpl	16(%rsp), %eax
	je	.L61
	cmpl	$11, %r14d
	je	.L15
	cmpl	20(%rsp), %eax
	je	.L62
	cmpl	$12, %r14d
	je	.L15
	movl	$12, %ecx
	cmpl	%eax, 32(%rsp)
	je	.L14
.L15:
	addq	$4, %rdx
	cmpq	%r13, %rdx
	jne	.L12
	testl	%esi, %esi
	jne	.L23
	addl	$1, 36(%rsp)
	xorl	%r14d, %r14d
	jmp	.L24
.L51:
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L14:
	movl	4(%r15,%rcx,8), %ecx
	cmpl	%ecx, %eax
	movl	$0, %eax
	movl	%ecx, (%rdx)
	cmovne	%eax, %esi
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L106:
	movl	(%rdx), %ecx
	movslq	%r14d, %rax
	addq	$4, %rdx
	addl	$1, %r14d
	movl	$1, 4(%r15,%rax,8)
	movl	%ecx, (%r15,%rax,8)
	cmpq	%r13, %rdx
	jne	.L5
	jmp	.L11
.L26:
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L6:
	movslq	%ecx, %rax
	addl	$1, 4(%r15,%rax,8)
	jmp	.L8
.L27:
	movl	$1, %ecx
	jmp	.L8
.L52:
	movl	$1, %ecx
	jmp	.L14
.L28:
	movl	$1, %ecx
	jmp	.L6
.L29:
	movl	$2, %ecx
	jmp	.L8
.L53:
	movl	$2, %ecx
	jmp	.L14
.L30:
	movl	$2, %ecx
	jmp	.L6
.L31:
	movl	$3, %ecx
	jmp	.L8
.L54:
	movl	$3, %ecx
	jmp	.L14
.L32:
	movl	$3, %ecx
	jmp	.L6
.L33:
	movl	$4, %ecx
	jmp	.L8
.L55:
	movl	$4, %ecx
	jmp	.L14
.L34:
	movl	$4, %ecx
	jmp	.L6
.L35:
	movl	$5, %ecx
	jmp	.L8
.L56:
	movl	$5, %ecx
	jmp	.L14
.L36:
	movl	$5, %ecx
	jmp	.L6
.L37:
	movl	$6, %ecx
	jmp	.L8
.L57:
	movl	$6, %ecx
	jmp	.L14
.L38:
	movl	$6, %ecx
	jmp	.L6
.L39:
	movl	$7, %ecx
	jmp	.L8
.L58:
	movl	$7, %ecx
	jmp	.L14
.L40:
	movl	$7, %ecx
	jmp	.L6
.L41:
	movl	$8, %ecx
	jmp	.L8
.L42:
	movl	$8, %ecx
	jmp	.L6
.L59:
	movl	$8, %ecx
	jmp	.L14
.L43:
	movl	$9, %ecx
	jmp	.L8
.L60:
	movl	$9, %ecx
	jmp	.L14
.L44:
	movl	$9, %ecx
	jmp	.L6
.L45:
	movl	$10, %ecx
	jmp	.L8
.L61:
	movl	$10, %ecx
	jmp	.L14
.L46:
	movl	$10, %ecx
	jmp	.L6
.L47:
	movl	$11, %ecx
	jmp	.L8
.L62:
	movl	$11, %ecx
	jmp	.L14
.L48:
	movl	$11, %ecx
	jmp	.L6
.L49:
	movl	$12, %ecx
	jmp	.L8
.L3:
	movl	$0, 36(%rsp)
.L23:
	movl	36(%rsp), %edx
	leaq	.LC2(%rip), %r12
	xorl	%eax, %eax
	movl	$1, %edi
	movl	$0, sn(%rip)
	movq	%r12, %rsi
	call	__printf_chk@PLT
	cmpl	$1, 60(%rsp)
	jle	.L63
	movq	.LC3(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	64(%rsp), %r13
	leaq	s(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L21:
	movl	0(%r13,%rbx,4), %edx
	movl	$1, %edi
	xorl	%eax, %eax
	movq	%rbp, (%r15,%rbx,8)
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movl	60(%rsp), %eax
	leal	1(%rbx), %edx
	addq	$1, %rbx
	subl	$1, %eax
	cmpl	%ebx, %eax
	jg	.L21
.L20:
	movslq	%edx, %rdx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	64(%rsp,%rdx,4), %edx
	call	__printf_chk@PLT
	jmp	.L22
.L105:
	movl	$12, %ecx
	jmp	.L6
.L63:
	xorl	%edx, %edx
	jmp	.L20
.L2:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L107
	addq	$136, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L107:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	sn
	.bss
	.align 4
	.type	sn, @object
	.size	sn, 4
sn:
	.zero	4
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 104
s:
	.zero	104
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC3:
	.long	-1
	.long	-1
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d "
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$136, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	60(%rsp), %rax
	movq	%rax, 40(%rsp)
.L22:
	movq	40(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	jle	.L3
	leaq	64(%rsp), %rax
	xorl	%ebx, %ebx
	movq	%rax, 24(%rsp)
	movq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbp, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L4
	leal	-1(%rax), %edx
	movl	sn(%rip), %r14d
	leaq	68(%rsp,%rdx,4), %r13
	testl	%eax, %eax
	jle	.L3
	movl	$0, 36(%rsp)
	leaq	s(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L24:
	movq	24(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	xorl	%ecx, %ecx
	testl	%r14d, %r14d
	jle	.L8
	movl	(%rdx), %eax
	cmpl	(%r15), %eax
	je	.L26
	cmpl	$1, %r14d
	je	.L27
	cmpl	8+s(%rip), %eax
	je	.L28
	cmpl	$2, %r14d
	je	.L29
	cmpl	16+s(%rip), %eax
	je	.L30
	cmpl	$3, %r14d
	je	.L31
	cmpl	24+s(%rip), %eax
	je	.L32
	cmpl	$4, %r14d
	je	.L33
	cmpl	32+s(%rip), %eax
	je	.L34
	cmpl	$5, %r14d
	je	.L35
	cmpl	40+s(%rip), %eax
	je	.L36
	cmpl	$6, %r14d
	je	.L37
	cmpl	48+s(%rip), %eax
	je	.L38
	cmpl	$7, %r14d
	je	.L39
	cmpl	56+s(%rip), %eax
	je	.L40
	cmpl	$8, %r14d
	je	.L41
	cmpl	64+s(%rip), %eax
	je	.L42
	cmpl	$9, %r14d
	je	.L43
	cmpl	72+s(%rip), %eax
	je	.L44
	cmpl	$10, %r14d
	je	.L45
	cmpl	80+s(%rip), %eax
	je	.L46
	cmpl	$11, %r14d
	je	.L47
	cmpl	88+s(%rip), %eax
	je	.L48
	cmpl	$12, %r14d
	je	.L49
	cmpl	%eax, 96+s(%rip)
	movl	$13, %ecx
	je	.L105
.L8:
	cmpl	%ecx, %r14d
	je	.L106
	addq	$4, %rdx
	cmpq	%r13, %rdx
	jne	.L5
.L11:
	movl	64+s(%rip), %eax
	movl	(%r15), %edi
	movl	$1, %esi
	movl	8+s(%rip), %r8d
	movl	16+s(%rip), %r9d
	movl	40+s(%rip), %ebx
	movl	48+s(%rip), %ebp
	movl	%eax, 8(%rsp)
	movl	72+s(%rip), %eax
	movl	24+s(%rip), %r10d
	movl	32+s(%rip), %r11d
	movl	56+s(%rip), %r12d
	movl	%eax, 12(%rsp)
	movl	80+s(%rip), %eax
	movq	24(%rsp), %rdx
	movl	%eax, 16(%rsp)
	movl	88+s(%rip), %eax
	movl	%eax, 20(%rsp)
	movl	96+s(%rip), %eax
	movl	%eax, 32(%rsp)
	.p2align 4,,10
	.p2align 3
.L12:
	testl	%r14d, %r14d
	jle	.L15
	movl	(%rdx), %eax
	cmpl	%edi, %eax
	je	.L51
	cmpl	$1, %r14d
	je	.L15
	cmpl	%r8d, %eax
	je	.L52
	cmpl	$2, %r14d
	je	.L15
	cmpl	%r9d, %eax
	je	.L53
	cmpl	$3, %r14d
	je	.L15
	cmpl	%r10d, %eax
	je	.L54
	cmpl	$4, %r14d
	je	.L15
	cmpl	%r11d, %eax
	je	.L55
	cmpl	$5, %r14d
	je	.L15
	cmpl	%eax, %ebx
	je	.L56
	cmpl	$6, %r14d
	je	.L15
	cmpl	%ebp, %eax
	je	.L57
	cmpl	$7, %r14d
	je	.L15
	cmpl	%r12d, %eax
	je	.L58
	cmpl	$8, %r14d
	je	.L15
	cmpl	%eax, 8(%rsp)
	je	.L59
	cmpl	$9, %r14d
	je	.L15
	cmpl	12(%rsp), %eax
	je	.L60
	cmpl	$10, %r14d
	je	.L15
	cmpl	16(%rsp), %eax
	je	.L61
	cmpl	$11, %r14d
	je	.L15
	cmpl	20(%rsp), %eax
	je	.L62
	cmpl	$12, %r14d
	je	.L15
	movl	$12, %ecx
	cmpl	%eax, 32(%rsp)
	je	.L14
.L15:
	addq	$4, %rdx
	cmpq	%r13, %rdx
	jne	.L12
	testl	%esi, %esi
	jne	.L23
	addl	$1, 36(%rsp)
	xorl	%r14d, %r14d
	jmp	.L24
.L51:
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L14:
	movl	4(%r15,%rcx,8), %ecx
	cmpl	%ecx, %eax
	movl	$0, %eax
	movl	%ecx, (%rdx)
	cmovne	%eax, %esi
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L106:
	movl	(%rdx), %ecx
	movslq	%r14d, %rax
	addq	$4, %rdx
	addl	$1, %r14d
	movl	$1, 4(%r15,%rax,8)
	movl	%ecx, (%r15,%rax,8)
	cmpq	%r13, %rdx
	jne	.L5
	jmp	.L11
.L26:
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L6:
	movslq	%ecx, %rax
	addl	$1, 4(%r15,%rax,8)
	jmp	.L8
.L27:
	movl	$1, %ecx
	jmp	.L8
.L52:
	movl	$1, %ecx
	jmp	.L14
.L28:
	movl	$1, %ecx
	jmp	.L6
.L29:
	movl	$2, %ecx
	jmp	.L8
.L53:
	movl	$2, %ecx
	jmp	.L14
.L30:
	movl	$2, %ecx
	jmp	.L6
.L31:
	movl	$3, %ecx
	jmp	.L8
.L54:
	movl	$3, %ecx
	jmp	.L14
.L32:
	movl	$3, %ecx
	jmp	.L6
.L33:
	movl	$4, %ecx
	jmp	.L8
.L55:
	movl	$4, %ecx
	jmp	.L14
.L34:
	movl	$4, %ecx
	jmp	.L6
.L35:
	movl	$5, %ecx
	jmp	.L8
.L56:
	movl	$5, %ecx
	jmp	.L14
.L36:
	movl	$5, %ecx
	jmp	.L6
.L37:
	movl	$6, %ecx
	jmp	.L8
.L57:
	movl	$6, %ecx
	jmp	.L14
.L38:
	movl	$6, %ecx
	jmp	.L6
.L39:
	movl	$7, %ecx
	jmp	.L8
.L58:
	movl	$7, %ecx
	jmp	.L14
.L40:
	movl	$7, %ecx
	jmp	.L6
.L41:
	movl	$8, %ecx
	jmp	.L8
.L42:
	movl	$8, %ecx
	jmp	.L6
.L59:
	movl	$8, %ecx
	jmp	.L14
.L43:
	movl	$9, %ecx
	jmp	.L8
.L60:
	movl	$9, %ecx
	jmp	.L14
.L44:
	movl	$9, %ecx
	jmp	.L6
.L45:
	movl	$10, %ecx
	jmp	.L8
.L61:
	movl	$10, %ecx
	jmp	.L14
.L46:
	movl	$10, %ecx
	jmp	.L6
.L47:
	movl	$11, %ecx
	jmp	.L8
.L62:
	movl	$11, %ecx
	jmp	.L14
.L48:
	movl	$11, %ecx
	jmp	.L6
.L49:
	movl	$12, %ecx
	jmp	.L8
.L3:
	movl	$0, 36(%rsp)
.L23:
	movl	36(%rsp), %edx
	leaq	.LC2(%rip), %r12
	xorl	%eax, %eax
	movl	$1, %edi
	movl	$0, sn(%rip)
	movq	%r12, %rsi
	call	__printf_chk@PLT
	cmpl	$1, 60(%rsp)
	jle	.L63
	movq	.LC3(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	64(%rsp), %r13
	leaq	s(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L21:
	movl	0(%r13,%rbx,4), %edx
	movl	$1, %edi
	xorl	%eax, %eax
	movq	%rbp, (%r15,%rbx,8)
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movl	60(%rsp), %eax
	leal	1(%rbx), %edx
	addq	$1, %rbx
	subl	$1, %eax
	cmpl	%ebx, %eax
	jg	.L21
.L20:
	movslq	%edx, %rdx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	64(%rsp,%rdx,4), %edx
	call	__printf_chk@PLT
	jmp	.L22
.L105:
	movl	$12, %ecx
	jmp	.L6
.L63:
	xorl	%edx, %edx
	jmp	.L20
.L2:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L107
	addq	$136, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L107:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	sn
	.bss
	.align 4
	.type	sn, @object
	.size	sn, 4
sn:
	.zero	4
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 104
s:
	.zero	104
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC3:
	.long	-1
	.long	-1
	.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>

typedef struct{
  int n;
  int count;
}hoge;
hoge s[13];
int sn;
int main(){
  int seq[13],n,i,j,k,fix;
  do{
    scanf("%d",&n);
    if(n==0) break;
    for(i=0;i<n;i++) scanf("%d ",seq+i);
    for(i=0;;i++){
      for(j=0;j<n;j++)
      fix=1;
      for(j=0;j<n;j++){
	for(k=0;k<sn;k++){
	  if(s[k].n==seq[j]){
	    s[k].count++;
	    break;
	  }
	}
	if(k==sn){
	  s[sn].n=seq[j];
	  s[sn].count=1;
	  sn++;
	}
      }
      for(j=0;j<n;j++){
	for(k=0;k<sn;k++){
	  if(s[k].n==seq[j]){
	    if(seq[j]!=s[k].count) fix=0;
	    seq[j]=s[k].count;
	    break;
	  }
	}
      }
      sn=0;
      if(fix) break;
    }
    printf("%d\n",i);
    for(i=0;i<n-1;i++){
      s[i].n=s[i].count=-1;
      printf("%d ",seq[i]);
    }
    printf("%d\n",seq[i]);
  }while(1);
  return 0;
}
10
4 5 1 1 4 5 12 3 6 4
0
 10
4 5 1 1 4 5 12 3 0 5
0
 10
4 5 1 1 3 5 14 3 0 5
0
 10
4 5 1 1 3 10 14 3 0 5
0
 10
4 5 1 0 3 10 14 3 0 5
0
 10
1 5 1 0 3 10 14 3 0 5
0
 10
1 5 1 0 3 4 27 0 0 5
0
 10
2 5 1 0 3 4 27 0 0 5
0
 10
2 5 1 0 3 4 27 0 -1 5
0
 10
2 5 1 0 3 4 27 0 -2 10
0

3
6 4 4 4 6 4 6 6 6 6
 3
4 6 4 4 4 6 6 6 6 6
 3
6 6 4 4 4 6 6 4 6 6
 2
4 6 6 6 6 4 4 6 4 6
 2
4 6 4 6 6 4 4 6 6 6
 2
8 8 8 8 8 2 2 8 8 8
 3
4 4 4 6 6 6 6 6 6 4
 2
5 2 5 3 5 5 5 3 3 2
 2
6 4 6 4 6 6 6 4 6 4
 2
8 8 8 2 8 8 8 2 8 8

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>

typedef struct{
  int n;
  int count;
}hoge;
hoge s[13];
int sn;
int main(){
  int seq[13],n,i,j,k,fix;
  do{
    scanf("%d",&n);
    if(n==0) break;
    for(i=0;i<n;i++) scanf("%d ",seq+i);
    for(i=0;;i++){
      for(j=0;j<n;j++)
      fix=1;
      for(j=0;j<n;j++){
	for(k=0;k<sn;k++){
	  if(s[k].n==seq[j]){
	    s[k].count++;
	    break;
	  }
	}
	if(k==sn){
	  s[sn].n=seq[j];
	  s[sn].count=1;
	  sn++;
	}
      }
      for(j=0;j<n;j++){
	for(k=0;k<sn;k++){
	  if(s[k].n==seq[j]){
	    if(seq[j]!=s[k].count) fix=0;
	    seq[j]=s[k].count;
	    break;
	  }
	}
      }
      sn=0;
      if(fix) break;
    }
    printf("%d\n",i);
    for(i=0;i<n-1;i++){
      s[i].n=s[i].count=-1;
      printf("%d ",seq[i]);
    }
    printf("%d\n",seq[i]);
  }while(1);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 104
s:
	.zero	104
	.globl	sn
	.align 4
	.type	sn, @object
	.size	sn, 4
sn:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d "
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L27:
	leaq	-84(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-84(%rbp), %eax
	testl	%eax, %eax
	je	.L32
	movl	$0, -80(%rbp)
	jmp	.L4
.L5:
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -80(%rbp)
.L4:
	movl	-84(%rbp), %eax
	cmpl	%eax, -80(%rbp)
	jl	.L5
	movl	$0, -80(%rbp)
.L24:
	movl	$0, -76(%rbp)
	jmp	.L6
.L7:
	movl	$1, -68(%rbp)
	addl	$1, -76(%rbp)
.L6:
	movl	-84(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L7
	movl	$0, -76(%rbp)
	jmp	.L8
.L14:
	movl	$0, -72(%rbp)
	jmp	.L9
.L12:
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-76(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L10
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L11
.L10:
	addl	$1, -72(%rbp)
.L9:
	movl	sn(%rip), %eax
	cmpl	%eax, -72(%rbp)
	jl	.L12
.L11:
	movl	sn(%rip), %eax
	cmpl	%eax, -72(%rbp)
	jne	.L13
	movl	sn(%rip), %edx
	movl	-76(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sn(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	sn(%rip), %eax
	addl	$1, %eax
	movl	%eax, sn(%rip)
.L13:
	addl	$1, -76(%rbp)
.L8:
	movl	-84(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L14
	movl	$0, -76(%rbp)
	jmp	.L15
.L21:
	movl	$0, -72(%rbp)
	jmp	.L16
.L20:
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-76(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L17
	movl	-76(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %edx
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+s(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L18
	movl	$0, -68(%rbp)
.L18:
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-76(%rbp), %eax
	cltq
	movl	%edx, -64(%rbp,%rax,4)
	jmp	.L19
.L17:
	addl	$1, -72(%rbp)
.L16:
	movl	sn(%rip), %eax
	cmpl	%eax, -72(%rbp)
	jl	.L20
.L19:
	addl	$1, -76(%rbp)
.L15:
	movl	-84(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L21
	movl	$0, sn(%rip)
	cmpl	$0, -68(%rbp)
	jne	.L33
	addl	$1, -80(%rbp)
	jmp	.L24
.L33:
	nop
	movl	-80(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -80(%rbp)
	jmp	.L25
.L26:
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	$-1, (%rdx,%rax)
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-80(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-80(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -80(%rbp)
.L25:
	movl	-84(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -80(%rbp)
	jl	.L26
	movl	-80(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L27
.L32:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 104
s:
	.zero	104
	.globl	sn
	.align 4
	.type	sn, @object
	.size	sn, 4
sn:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d "
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L27:
	leaq	-84(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-84(%rbp), %eax
	testl	%eax, %eax
	je	.L32
	movl	$0, -80(%rbp)
	jmp	.L4
.L5:
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -80(%rbp)
.L4:
	movl	-84(%rbp), %eax
	cmpl	%eax, -80(%rbp)
	jl	.L5
	movl	$0, -80(%rbp)
.L24:
	movl	$0, -76(%rbp)
	jmp	.L6
.L7:
	movl	$1, -68(%rbp)
	addl	$1, -76(%rbp)
.L6:
	movl	-84(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L7
	movl	$0, -76(%rbp)
	jmp	.L8
.L14:
	movl	$0, -72(%rbp)
	jmp	.L9
.L12:
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-76(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L10
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L11
.L10:
	addl	$1, -72(%rbp)
.L9:
	movl	sn(%rip), %eax
	cmpl	%eax, -72(%rbp)
	jl	.L12
.L11:
	movl	sn(%rip), %eax
	cmpl	%eax, -72(%rbp)
	jne	.L13
	movl	sn(%rip), %edx
	movl	-76(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sn(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	sn(%rip), %eax
	addl	$1, %eax
	movl	%eax, sn(%rip)
.L13:
	addl	$1, -76(%rbp)
.L8:
	movl	-84(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L14
	movl	$0, -76(%rbp)
	jmp	.L15
.L21:
	movl	$0, -72(%rbp)
	jmp	.L16
.L20:
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-76(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L17
	movl	-76(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %edx
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+s(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L18
	movl	$0, -68(%rbp)
.L18:
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-76(%rbp), %eax
	cltq
	movl	%edx, -64(%rbp,%rax,4)
	jmp	.L19
.L17:
	addl	$1, -72(%rbp)
.L16:
	movl	sn(%rip), %eax
	cmpl	%eax, -72(%rbp)
	jl	.L20
.L19:
	addl	$1, -76(%rbp)
.L15:
	movl	-84(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L21
	movl	$0, sn(%rip)
	cmpl	$0, -68(%rbp)
	jne	.L33
	addl	$1, -80(%rbp)
	jmp	.L24
.L33:
	nop
	movl	-80(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -80(%rbp)
	jmp	.L25
.L26:
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	$-1, (%rdx,%rax)
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+s(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-80(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-80(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -80(%rbp)
.L25:
	movl	-84(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -80(%rbp)
	jl	.L26
	movl	-80(%rbp), %eax
	cltq
	movl	-64(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L27
.L32:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
