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

```c
// AOJ 0332: Disappearing Sequence
// 2017.10.28 bal4u@uu

#include <stdio.h>

int c[102];
char dp[102][102];
 
int main()
{
	int n, i, j, k, m;

	scanf("%d", &n);
	for (i = 0; i < n; i++) scanf("%d", c+i);
    for (i = 1; i < n; i++) if (c[i-1] == c[i]) dp[i-1][i+1] = 1;
    for (m = 2; m <= n; m++) for (i = 0; i <= n-m; i++) {
		j = i+m;
		for (k = i+1; k < j; k++) {
			dp[i][j] |= dp[i][k] & dp[k][j];
			if (c[i] == c[j-1]) {
				dp[i][j] |= dp[i+1][j-1];
				if (c[i] == c[k]) dp[i][j] |= dp[i+1][k] & dp[k+1][j-1];
			}
		}
		if (c[i] && c[j-1]) {
			if (i > 0 && c[i-1] == c[i]) dp[i-1][k] |= dp[i][j];
			if (j < n && c[j-1] == c[j]) dp[i][j+1] |= dp[i][j];
		}
	}
	puts(dp[0][n] ? "yes" : "no");
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 408
c:
	.zero	408
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 10404
dp:
	.zero	10404
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"yes"
.LC2:
	.string	"no"
	.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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -24(%rbp)
	jmp	.L2
.L3:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -24(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L3
	movl	$1, -24(%rbp)
	jmp	.L4
.L6:
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L5
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$102, %rax, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movb	$1, (%rax)
.L5:
	addl	$1, -24(%rbp)
.L4:
	movl	-28(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L6
	movl	$2, -16(%rbp)
	jmp	.L7
.L15:
	movl	$0, -24(%rbp)
	jmp	.L8
.L14:
	movl	-24(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -20(%rbp)
	jmp	.L9
.L11:
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rcx
	leaq	dp(%rip), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %ecx
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rsi
	leaq	dp(%rip), %rax
	addq	%rsi, %rax
	movzbl	(%rax), %eax
	andl	%ecx, %eax
	orl	%eax, %edx
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rcx
	leaq	dp(%rip), %rax
	addq	%rcx, %rax
	movb	%dl, (%rax)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-12(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L10
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %ecx
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	-12(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$102, %rax, %rax
	leaq	(%rax,%rsi), %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	orl	%eax, %ecx
	movl	%ecx, %edx
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rcx
	leaq	dp(%rip), %rax
	addq	%rcx, %rax
	movb	%dl, (%rax)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L10
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %ecx
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	-20(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$102, %rax, %rax
	leaq	(%rax,%rsi), %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %esi
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-12(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdi
	movslq	%edx, %rax
	imulq	$102, %rax, %rax
	leaq	(%rax,%rdi), %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	andl	%esi, %eax
	orl	%eax, %ecx
	movl	%ecx, %edx
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rcx
	leaq	dp(%rip), %rax
	addq	%rcx, %rax
	movb	%dl, (%rax)
.L10:
	addl	$1, -20(%rbp)
.L9:
	movl	-20(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L11
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L12
	movl	-12(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L12
	cmpl	$0, -24(%rbp)
	jle	.L13
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L13
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$102, %rax, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %esi
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-24(%rbp), %eax
	leal	-1(%rax), %ecx
	orl	%esi, %edx
	movl	-20(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%ecx, %rax
	imulq	$102, %rax, %rax
	leaq	(%rax,%rsi), %rcx
	leaq	dp(%rip), %rax
	addq	%rcx, %rax
	movb	%dl, (%rax)
.L13:
	movl	-28(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L12
	movl	-12(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L12
	movl	-12(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %ecx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-12(%rbp), %eax
	addl	$1, %eax
	orl	%ecx, %edx
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rcx
	leaq	dp(%rip), %rax
	addq	%rcx, %rax
	movb	%dl, (%rax)
.L12:
	addl	$1, -24(%rbp)
.L8:
	movl	-28(%rbp), %eax
	subl	-16(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L14
	addl	$1, -16(%rbp)
.L7:
	movl	-28(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L15
	movl	-28(%rbp), %eax
	cltq
	leaq	dp(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L16
	leaq	.LC1(%rip), %rax
	jmp	.L17
.L16:
	leaq	.LC2(%rip), %rax
.L17:
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	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	"yes"
.LC1:
	.string	"no"
.LC2:
	.string	"%d"
	.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
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	dp(%rip), %rbx
	subq	$120, %rsp
	.cfi_def_cfa_offset 176
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	100(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	100(%rsp), %eax
	movq	%rbx, 88(%rsp)
	movl	%eax, 60(%rsp)
	testl	%eax, %eax
	jle	.L18
	leaq	c(%rip), %r15
	xorl	%ebx, %ebx
	movq	%r15, %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	100(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L3
	movl	%eax, 60(%rsp)
	cmpl	$1, %eax
	jle	.L44
	movl	%eax, %ebx
	leaq	4+c(%rip), %rax
	movl	c(%rip), %edx
	leaq	2+dp(%rip), %rcx
	leal	-2(%rbx), %r8d
	leaq	4(%rax), %rsi
	movl	%r8d, 56(%rsp)
	leaq	(%rsi,%r8,4), %rdi
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%edx, %esi
	movl	(%rax), %edx
	cmpl	%esi, %edx
	jne	.L4
	movb	$1, (%rcx)
.L4:
	addq	$4, %rax
	addq	$103, %rcx
	cmpq	%rdi, %rax
	jne	.L5
	movq	$2, 48(%rsp)
	leaq	3(%r8), %rax
	movq	%rax, 80(%rsp)
	leaq	dp(%rip), %rax
	movq	$0, 8(%rsp)
	movq	%rax, 88(%rsp)
	.p2align 4,,10
	.p2align 3
.L17:
	movl	56(%rsp), %eax
	testl	%eax, %eax
	js	.L45
	movq	8(%rsp), %rax
	leaq	dp(%rip), %r8
	movq	48(%rsp), %rbx
	xorl	%r10d, %r10d
	leaq	2(%r8), %rcx
	movl	$1, %r13d
	addq	%rax, %rcx
	addq	$1, %rax
	movl	%ebx, %edi
	movq	%rax, 64(%rsp)
	movq	%rax, %r14
	movl	56(%rsp), %eax
	addl	$1, %eax
	movq	%rax, 16(%rsp)
	leaq	(%r15,%rbx,4), %rax
	movq	%rax, 72(%rsp)
	.p2align 4,,10
	.p2align 3
.L16:
	movl	%r10d, 28(%rsp)
	movl	(%r15,%r10,4), %r11d
	movl	%r10d, %ebx
	movl	%r13d, %ebp
	movzbl	(%rcx), %eax
	movq	%rcx, %r9
	movq	%r13, %rdx
	cmpl	(%r15,%r14,4), %r11d
	je	.L46
	.p2align 4,,10
	.p2align 3
.L8:
	movzbl	(%r8,%rdx), %esi
	andb	102(%r9), %sil
	addq	$1, %rdx
	addq	$102, %r9
	orl	%esi, %eax
	movb	%al, (%rcx)
	cmpl	%edx, %edi
	jg	.L8
	xorl	%eax, %eax
	cmpl	%ebp, %edi
	leaq	102(%r8), %r12
	cmovg	8(%rsp), %eax
	leal	2(%rbx,%rax), %edx
.L12:
	leal	1(%rdi), %eax
	testl	%r11d, %r11d
	je	.L14
	leal	-1(%rdi), %eax
	cltq
	movl	(%r15,%rax,4), %esi
	leal	1(%rdi), %eax
	testl	%esi, %esi
	je	.L14
	testq	%r10, %r10
	je	.L15
	leaq	-4+c(%rip), %rax
	subl	$1, %ebx
	cmpl	(%rax,%r10,4), %r11d
	jne	.L15
	movslq	%ebx, %rax
	movslq	%edx, %rdx
	imulq	$102, %rax, %rax
	addq	88(%rsp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	orb	(%rcx), %dl
	movb	%dl, (%rax)
	.p2align 4,,10
	.p2align 3
.L15:
	leal	1(%rdi), %eax
	cmpl	%edi, 60(%rsp)
	jle	.L14
	movq	72(%rsp), %rbx
	cmpl	(%rbx,%r10,4), %esi
	jne	.L14
	movslq	28(%rsp), %rdx
	movslq	%eax, %rsi
	imulq	$102, %rdx, %rdx
	addq	88(%rsp), %rdx
	addq	%rsi, %rdx
	movzbl	(%rdx), %esi
	orb	(%rcx), %sil
	movb	%sil, (%rdx)
	.p2align 4,,10
	.p2align 3
.L14:
	addq	$1, %r10
	addq	$1, %r13
	addq	$103, %rcx
	movl	%eax, %edi
	movq	%r12, %r8
	addq	$1, %r14
	cmpq	16(%rsp), %r10
	jne	.L16
.L6:
	movq	64(%rsp), %rax
	addq	$1, 48(%rsp)
	subl	$1, 56(%rsp)
	movq	%rax, 8(%rsp)
	movq	48(%rsp), %rax
	cmpq	80(%rsp), %rax
	jne	.L17
.L18:
	movslq	60(%rsp), %rax
	movq	88(%rsp), %rbx
	leaq	.LC0(%rip), %rdi
	cmpb	$0, (%rbx,%rax)
	leaq	.LC1(%rip), %rax
	cmove	%rax, %rdi
	call	puts@PLT
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L47
	addq	$120, %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
	.p2align 4,,10
	.p2align 3
.L46:
	.cfi_restore_state
	movq	%r14, %rdx
	movq	%r10, 40(%rsp)
	movq	%r13, %rsi
	leaq	102(%r8), %r12
	notq	%rdx
	movq	%rdx, 32(%rsp)
	movl	%eax, %edx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L49:
	addq	$1, %rsi
	addq	$102, %r9
	cmpl	%esi, %edi
	jle	.L48
.L7:
	movzbl	(%r8,%rsi), %eax
	andb	102(%r9), %al
	orl	%edx, %eax
	orb	101(%rcx), %al
	movb	%al, (%rcx)
	movl	%eax, %edx
	cmpl	(%r15,%rsi,4), %r11d
	jne	.L49
	movq	32(%rsp), %r10
	leaq	(%r9,%r14), %rax
	addq	$102, %r9
	movzbl	204(%rax,%r10), %eax
	andb	(%r12,%rsi), %al
	addq	$1, %rsi
	orl	%eax, %edx
	movb	%dl, (%rcx)
	cmpl	%esi, %edi
	jg	.L7
	.p2align 4,,10
	.p2align 3
.L48:
	xorl	%eax, %eax
	cmpl	%ebp, %edi
	cmovg	8(%rsp), %eax
	movq	40(%rsp), %r10
	leal	2(%rbx,%rax), %edx
	jmp	.L12
.L45:
	movq	8(%rsp), %rax
	addq	$1, %rax
	movq	%rax, 64(%rsp)
	jmp	.L6
.L44:
	leaq	dp(%rip), %rax
	movq	%rax, 88(%rsp)
	jmp	.L18
.L47:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 10404
dp:
	.zero	10404
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 408
c:
	.zero	408
	.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	"yes"
.LC1:
	.string	"no"
.LC2:
	.string	"%d"
	.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
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	dp(%rip), %rbx
	subq	$120, %rsp
	.cfi_def_cfa_offset 176
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	100(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	100(%rsp), %eax
	movq	%rbx, 88(%rsp)
	movl	%eax, 60(%rsp)
	testl	%eax, %eax
	jle	.L18
	leaq	c(%rip), %r15
	xorl	%ebx, %ebx
	movq	%r15, %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	100(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L3
	movl	%eax, 60(%rsp)
	cmpl	$1, %eax
	jle	.L44
	movl	%eax, %ebx
	leaq	4+c(%rip), %rax
	movl	c(%rip), %edx
	leaq	2+dp(%rip), %rcx
	leal	-2(%rbx), %r8d
	leaq	4(%rax), %rsi
	movl	%r8d, 56(%rsp)
	leaq	(%rsi,%r8,4), %rdi
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%edx, %esi
	movl	(%rax), %edx
	cmpl	%esi, %edx
	jne	.L4
	movb	$1, (%rcx)
.L4:
	addq	$4, %rax
	addq	$103, %rcx
	cmpq	%rdi, %rax
	jne	.L5
	movq	$2, 48(%rsp)
	leaq	3(%r8), %rax
	movq	%rax, 80(%rsp)
	leaq	dp(%rip), %rax
	movq	$0, 8(%rsp)
	movq	%rax, 88(%rsp)
	.p2align 4,,10
	.p2align 3
.L17:
	movl	56(%rsp), %eax
	testl	%eax, %eax
	js	.L45
	movq	8(%rsp), %rax
	leaq	dp(%rip), %r8
	movq	48(%rsp), %rbx
	xorl	%r10d, %r10d
	leaq	2(%r8), %rcx
	movl	$1, %r13d
	addq	%rax, %rcx
	addq	$1, %rax
	movl	%ebx, %edi
	movq	%rax, 64(%rsp)
	movq	%rax, %r14
	movl	56(%rsp), %eax
	addl	$1, %eax
	movq	%rax, 16(%rsp)
	leaq	(%r15,%rbx,4), %rax
	movq	%rax, 72(%rsp)
	.p2align 4,,10
	.p2align 3
.L16:
	movl	%r10d, 28(%rsp)
	movl	(%r15,%r10,4), %r11d
	movl	%r10d, %ebx
	movl	%r13d, %ebp
	movzbl	(%rcx), %eax
	movq	%rcx, %r9
	movq	%r13, %rdx
	cmpl	(%r15,%r14,4), %r11d
	je	.L46
	.p2align 4,,10
	.p2align 3
.L8:
	movzbl	(%r8,%rdx), %esi
	andb	102(%r9), %sil
	addq	$1, %rdx
	addq	$102, %r9
	orl	%esi, %eax
	movb	%al, (%rcx)
	cmpl	%edx, %edi
	jg	.L8
	xorl	%eax, %eax
	cmpl	%ebp, %edi
	leaq	102(%r8), %r12
	cmovg	8(%rsp), %eax
	leal	2(%rbx,%rax), %edx
.L12:
	leal	1(%rdi), %eax
	testl	%r11d, %r11d
	je	.L14
	leal	-1(%rdi), %eax
	cltq
	movl	(%r15,%rax,4), %esi
	leal	1(%rdi), %eax
	testl	%esi, %esi
	je	.L14
	testq	%r10, %r10
	je	.L15
	leaq	-4+c(%rip), %rax
	subl	$1, %ebx
	cmpl	(%rax,%r10,4), %r11d
	jne	.L15
	movslq	%ebx, %rax
	movslq	%edx, %rdx
	imulq	$102, %rax, %rax
	addq	88(%rsp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	orb	(%rcx), %dl
	movb	%dl, (%rax)
	.p2align 4,,10
	.p2align 3
.L15:
	leal	1(%rdi), %eax
	cmpl	%edi, 60(%rsp)
	jle	.L14
	movq	72(%rsp), %rbx
	cmpl	(%rbx,%r10,4), %esi
	jne	.L14
	movslq	28(%rsp), %rdx
	movslq	%eax, %rsi
	imulq	$102, %rdx, %rdx
	addq	88(%rsp), %rdx
	addq	%rsi, %rdx
	movzbl	(%rdx), %esi
	orb	(%rcx), %sil
	movb	%sil, (%rdx)
	.p2align 4,,10
	.p2align 3
.L14:
	addq	$1, %r10
	addq	$1, %r13
	addq	$103, %rcx
	movl	%eax, %edi
	movq	%r12, %r8
	addq	$1, %r14
	cmpq	16(%rsp), %r10
	jne	.L16
.L6:
	movq	64(%rsp), %rax
	addq	$1, 48(%rsp)
	subl	$1, 56(%rsp)
	movq	%rax, 8(%rsp)
	movq	48(%rsp), %rax
	cmpq	80(%rsp), %rax
	jne	.L17
.L18:
	movslq	60(%rsp), %rax
	movq	88(%rsp), %rbx
	leaq	.LC0(%rip), %rdi
	cmpb	$0, (%rbx,%rax)
	leaq	.LC1(%rip), %rax
	cmove	%rax, %rdi
	call	puts@PLT
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L47
	addq	$120, %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
	.p2align 4,,10
	.p2align 3
.L46:
	.cfi_restore_state
	movq	%r14, %rdx
	movq	%r10, 40(%rsp)
	movq	%r13, %rsi
	leaq	102(%r8), %r12
	notq	%rdx
	movq	%rdx, 32(%rsp)
	movl	%eax, %edx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L49:
	addq	$1, %rsi
	addq	$102, %r9
	cmpl	%esi, %edi
	jle	.L48
.L7:
	movzbl	(%r8,%rsi), %eax
	andb	102(%r9), %al
	orl	%edx, %eax
	orb	101(%rcx), %al
	movb	%al, (%rcx)
	movl	%eax, %edx
	cmpl	(%r15,%rsi,4), %r11d
	jne	.L49
	movq	32(%rsp), %r10
	leaq	(%r9,%r14), %rax
	addq	$102, %r9
	movzbl	204(%rax,%r10), %eax
	andb	(%r12,%rsi), %al
	addq	$1, %rsi
	orl	%eax, %edx
	movb	%dl, (%rcx)
	cmpl	%esi, %edi
	jg	.L7
	.p2align 4,,10
	.p2align 3
.L48:
	xorl	%eax, %eax
	cmpl	%ebp, %edi
	cmovg	8(%rsp), %eax
	movq	40(%rsp), %r10
	leal	2(%rbx,%rax), %edx
	jmp	.L12
.L45:
	movq	8(%rsp), %rax
	addq	$1, %rax
	movq	%rax, 64(%rsp)
	jmp	.L6
.L44:
	leaq	dp(%rip), %rax
	movq	%rax, 88(%rsp)
	jmp	.L18
.L47:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 10404
dp:
	.zero	10404
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 408
c:
	.zero	408
	.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:

// AOJ 0332: Disappearing Sequence
// 2017.10.28 bal4u@uu

#include <stdio.h>

int c[102];
char dp[102][102];
 
int main()
{
	int n, i, j, k, m;

	scanf("%d", &n);
	for (i = 0; i < n; i++) scanf("%d", c+i);
    for (i = 1; i < n; i++) if (c[i-1] == c[i]) dp[i-1][i+1] = 1;
    for (m = 2; m <= n; m++) for (i = 0; i <= n-m; i++) {
		j = i+m;
		for (k = i+1; k < j; k++) {
			dp[i][j] |= dp[i][k] & dp[k][j];
			if (c[i] == c[j-1]) {
				dp[i][j] |= dp[i+1][j-1];
				if (c[i] == c[k]) dp[i][j] |= dp[i+1][k] & dp[k+1][j-1];
			}
		}
		if (c[i] && c[j-1]) {
			if (i > 0 && c[i-1] == c[i]) dp[i-1][k] |= dp[i][j];
			if (j < n && c[j-1] == c[j]) dp[i][j+1] |= dp[i][j];
		}
	}
	puts(dp[0][n] ? "yes" : "no");
    return 0;
}
5
1 1 4 2 1
 7
1 2 2 2 1 0 0
 8
1 2 3 3 2 0 2 2
 16
9 8 8 7 7 6 5 4 4 5 1 1 2 3 3 3
 7
1 2 2 1 1 3 1
 8
1 2 3 3 2 0 2 4
 16
9 8 3 7 7 6 5 4 4 5 1 1 2 3 3 3
 7
1 2 2 1 1 3 0
 8
1 2 3 3 2 0 2 3
 16
9 8 3 7 7 6 5 4 3 5 1 1 2 3 3 3

no
 yes
 no
 no
 no
 no
 no
 no
 no
 no

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

```c
// AOJ 0332: Disappearing Sequence
// 2017.10.28 bal4u@uu

#include <stdio.h>

int c[102];
char dp[102][102];
 
int main()
{
	int n, i, j, k, m;

	scanf("%d", &n);
	for (i = 0; i < n; i++) scanf("%d", c+i);
    for (i = 1; i < n; i++) if (c[i-1] == c[i]) dp[i-1][i+1] = 1;
    for (m = 2; m <= n; m++) for (i = 0; i <= n-m; i++) {
		j = i+m;
		for (k = i+1; k < j; k++) {
			dp[i][j] |= dp[i][k] & dp[k][j];
			if (c[i] == c[j-1]) {
				dp[i][j] |= dp[i+1][j-1];
				if (c[i] == c[k]) dp[i][j] |= dp[i+1][k] & dp[k+1][j-1];
			}
		}
		if (c[i] && c[j-1]) {
			if (i > 0 && c[i-1] == c[i]) dp[i-1][k] |= dp[i][j];
			if (j < n && c[j-1] == c[j]) dp[i][j+1] |= dp[i][j];
		}
	}
	puts(dp[0][n] ? "yes" : "no");
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 408
c:
	.zero	408
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 10404
dp:
	.zero	10404
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"yes"
.LC2:
	.string	"no"
	.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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -24(%rbp)
	jmp	.L2
.L3:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -24(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L3
	movl	$1, -24(%rbp)
	jmp	.L4
.L6:
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L5
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$102, %rax, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movb	$1, (%rax)
.L5:
	addl	$1, -24(%rbp)
.L4:
	movl	-28(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L6
	movl	$2, -16(%rbp)
	jmp	.L7
.L15:
	movl	$0, -24(%rbp)
	jmp	.L8
.L14:
	movl	-24(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -20(%rbp)
	jmp	.L9
.L11:
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rcx
	leaq	dp(%rip), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %ecx
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rsi
	leaq	dp(%rip), %rax
	addq	%rsi, %rax
	movzbl	(%rax), %eax
	andl	%ecx, %eax
	orl	%eax, %edx
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rcx
	leaq	dp(%rip), %rax
	addq	%rcx, %rax
	movb	%dl, (%rax)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-12(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L10
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %ecx
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	-12(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$102, %rax, %rax
	leaq	(%rax,%rsi), %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	orl	%eax, %ecx
	movl	%ecx, %edx
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rcx
	leaq	dp(%rip), %rax
	addq	%rcx, %rax
	movb	%dl, (%rax)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L10
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %ecx
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	-20(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$102, %rax, %rax
	leaq	(%rax,%rsi), %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %esi
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-12(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdi
	movslq	%edx, %rax
	imulq	$102, %rax, %rax
	leaq	(%rax,%rdi), %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	andl	%esi, %eax
	orl	%eax, %ecx
	movl	%ecx, %edx
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rcx
	leaq	dp(%rip), %rax
	addq	%rcx, %rax
	movb	%dl, (%rax)
.L10:
	addl	$1, -20(%rbp)
.L9:
	movl	-20(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L11
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L12
	movl	-12(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L12
	cmpl	$0, -24(%rbp)
	jle	.L13
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L13
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$102, %rax, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %esi
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-24(%rbp), %eax
	leal	-1(%rax), %ecx
	orl	%esi, %edx
	movl	-20(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%ecx, %rax
	imulq	$102, %rax, %rax
	leaq	(%rax,%rsi), %rcx
	leaq	dp(%rip), %rax
	addq	%rcx, %rax
	movb	%dl, (%rax)
.L13:
	movl	-28(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L12
	movl	-12(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L12
	movl	-12(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %ecx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-12(%rbp), %eax
	addl	$1, %eax
	orl	%ecx, %edx
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rcx
	leaq	dp(%rip), %rax
	addq	%rcx, %rax
	movb	%dl, (%rax)
.L12:
	addl	$1, -24(%rbp)
.L8:
	movl	-28(%rbp), %eax
	subl	-16(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L14
	addl	$1, -16(%rbp)
.L7:
	movl	-28(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L15
	movl	-28(%rbp), %eax
	cltq
	leaq	dp(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L16
	leaq	.LC1(%rip), %rax
	jmp	.L17
.L16:
	leaq	.LC2(%rip), %rax
.L17:
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	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	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 408
c:
	.zero	408
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 10404
dp:
	.zero	10404
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"yes"
.LC2:
	.string	"no"
	.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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -24(%rbp)
	jmp	.L2
.L3:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -24(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L3
	movl	$1, -24(%rbp)
	jmp	.L4
.L6:
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L5
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$102, %rax, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movb	$1, (%rax)
.L5:
	addl	$1, -24(%rbp)
.L4:
	movl	-28(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L6
	movl	$2, -16(%rbp)
	jmp	.L7
.L15:
	movl	$0, -24(%rbp)
	jmp	.L8
.L14:
	movl	-24(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -20(%rbp)
	jmp	.L9
.L11:
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rcx
	leaq	dp(%rip), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %ecx
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rsi
	leaq	dp(%rip), %rax
	addq	%rsi, %rax
	movzbl	(%rax), %eax
	andl	%ecx, %eax
	orl	%eax, %edx
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rcx
	leaq	dp(%rip), %rax
	addq	%rcx, %rax
	movb	%dl, (%rax)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-12(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L10
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %ecx
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	-12(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$102, %rax, %rax
	leaq	(%rax,%rsi), %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	orl	%eax, %ecx
	movl	%ecx, %edx
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rcx
	leaq	dp(%rip), %rax
	addq	%rcx, %rax
	movb	%dl, (%rax)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L10
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %ecx
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	-20(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$102, %rax, %rax
	leaq	(%rax,%rsi), %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %esi
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-12(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdi
	movslq	%edx, %rax
	imulq	$102, %rax, %rax
	leaq	(%rax,%rdi), %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	andl	%esi, %eax
	orl	%eax, %ecx
	movl	%ecx, %edx
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rcx
	leaq	dp(%rip), %rax
	addq	%rcx, %rax
	movb	%dl, (%rax)
.L10:
	addl	$1, -20(%rbp)
.L9:
	movl	-20(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L11
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L12
	movl	-12(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L12
	cmpl	$0, -24(%rbp)
	jle	.L13
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L13
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$102, %rax, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %esi
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-24(%rbp), %eax
	leal	-1(%rax), %ecx
	orl	%esi, %edx
	movl	-20(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%ecx, %rax
	imulq	$102, %rax, %rax
	leaq	(%rax,%rsi), %rcx
	leaq	dp(%rip), %rax
	addq	%rcx, %rax
	movb	%dl, (%rax)
.L13:
	movl	-28(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L12
	movl	-12(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L12
	movl	-12(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %ecx
	movl	-12(%rbp), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	dp(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-12(%rbp), %eax
	addl	$1, %eax
	orl	%ecx, %edx
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rcx
	leaq	dp(%rip), %rax
	addq	%rcx, %rax
	movb	%dl, (%rax)
.L12:
	addl	$1, -24(%rbp)
.L8:
	movl	-28(%rbp), %eax
	subl	-16(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L14
	addl	$1, -16(%rbp)
.L7:
	movl	-28(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L15
	movl	-28(%rbp), %eax
	cltq
	leaq	dp(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L16
	leaq	.LC1(%rip), %rax
	jmp	.L17
.L16:
	leaq	.LC2(%rip), %rax
.L17:
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	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:
