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

```c
// Aizu Vol-5 0517: Longest Steps
// 2017.8.30 bal4u@uu

#include <stdio.h>
#include <string.h>

char c[100005];

int main()
{
	int n, k, a;
	int i, f, w, w0, ans;

	while (scanf("%d%d", &n, &k) && n) {
		memset(c, 0, n+3), f = 0;
		while (k-- > 0) {
			scanf("%d", &a);
			if (a == 0) f = 1;
			else c[a] = 1;
		}
		for (ans = w0 = w = 0, i = 1; i <= n; i++) {
			if (c[i]) w++;
			else if (w > 0) {
				if (w0 + w + f > ans) ans = w0 + w + f;
				if (f && c[i+1]) w0 = w; else w0 = 0;
				w = 0;
			}
		}
		if (w0 + w + f > ans) ans = w0 + w + f;
		printf("%d\n", ans);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 100005
c:
	.zero	100005
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L15:
	movl	-40(%rbp), %eax
	addl	$3, %eax
	cltq
	movq	%rax, %rdx
	movl	$0, %esi
	leaq	c(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -24(%rbp)
	jmp	.L3
.L5:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	jne	.L4
	movl	$1, -24(%rbp)
	jmp	.L3
.L4:
	movl	-32(%rbp), %eax
	cltq
	leaq	c(%rip), %rdx
	movb	$1, (%rax,%rdx)
.L3:
	movl	-36(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -36(%rbp)
	testl	%eax, %eax
	jg	.L5
	movl	$0, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	$1, -28(%rbp)
	jmp	.L6
.L12:
	movl	-28(%rbp), %eax
	cltq
	leaq	c(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L7
	addl	$1, -20(%rbp)
	jmp	.L8
.L7:
	cmpl	$0, -20(%rbp)
	jle	.L8
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -12(%rbp)
	jge	.L9
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
.L9:
	cmpl	$0, -24(%rbp)
	je	.L10
	movl	-28(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	c(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L10
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L11
.L10:
	movl	$0, -16(%rbp)
.L11:
	movl	$0, -20(%rbp)
.L8:
	addl	$1, -28(%rbp)
.L6:
	movl	-40(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L12
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -12(%rbp)
	jge	.L13
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
.L13:
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L14
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	jne	.L15
.L14:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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\n"
.LC2:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	c(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r15
	leaq	12(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r15, %rdx
	movq	%r14, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L15
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L15
	addl	$3, %eax
	movl	$100005, %ecx
	xorl	%esi, %esi
	movq	%r12, %rdi
	movslq	%eax, %rdx
	xorl	%ebx, %ebx
	call	__memset_chk@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	20(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	testl	%eax, %eax
	jne	.L34
	movl	$1, %ebx
.L4:
	movl	16(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 16(%rsp)
	testl	%eax, %eax
	jg	.L5
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L19
	leaq	1+c(%rip), %rcx
	testl	%ebx, %ebx
	jne	.L7
	leal	-1(%rax), %esi
	leaq	1(%rcx), %rax
	xorl	%edx, %edx
	addq	%rax, %rsi
	xorl	%eax, %eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L36:
	testl	%eax, %eax
	je	.L9
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	xorl	%eax, %eax
.L9:
	addq	$1, %rcx
	cmpq	%rsi, %rcx
	je	.L35
.L10:
	cmpb	$0, (%rcx)
	je	.L36
	addq	$1, %rcx
	addl	$1, %eax
	cmpq	%rsi, %rcx
	jne	.L10
.L35:
	xorl	%esi, %esi
.L11:
	addl	%eax, %esi
	addl	%esi, %ebx
.L6:
	cmpl	%ebx, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	cmovl	%ebx, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L34:
	movb	$1, (%r12,%rax)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	leal	-1(%rax), %edi
	leaq	1(%rcx), %rax
	xorl	%edx, %edx
	xorl	%esi, %esi
	addq	%rax, %rdi
	xorl	%eax, %eax
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L37:
	addl	$1, %eax
.L13:
	addq	$1, %rcx
	cmpq	%rdi, %rcx
	je	.L11
.L14:
	cmpb	$0, (%rcx)
	jne	.L37
	testl	%eax, %eax
	je	.L13
	leal	1(%rsi,%rax), %esi
	cmpl	%esi, %edx
	cmovl	%esi, %edx
	cmpb	$0, 1(%rcx)
	jne	.L20
	xorl	%esi, %esi
	xorl	%eax, %eax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L20:
	movl	%eax, %esi
	xorl	%eax, %eax
	jmp	.L13
.L15:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$40, %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
.L19:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L6
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 100005
c:
	.zero	100005
	.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\n"
.LC2:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	c(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r15
	leaq	12(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r15, %rdx
	movq	%r14, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L15
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L15
	addl	$3, %eax
	movl	$100005, %ecx
	xorl	%esi, %esi
	movq	%r12, %rdi
	movslq	%eax, %rdx
	xorl	%ebx, %ebx
	call	__memset_chk@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	20(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	testl	%eax, %eax
	jne	.L34
	movl	$1, %ebx
.L4:
	movl	16(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 16(%rsp)
	testl	%eax, %eax
	jg	.L5
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L19
	leaq	1+c(%rip), %rcx
	testl	%ebx, %ebx
	jne	.L7
	leal	-1(%rax), %esi
	leaq	1(%rcx), %rax
	xorl	%edx, %edx
	addq	%rax, %rsi
	xorl	%eax, %eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L36:
	testl	%eax, %eax
	je	.L9
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	xorl	%eax, %eax
.L9:
	addq	$1, %rcx
	cmpq	%rsi, %rcx
	je	.L35
.L10:
	cmpb	$0, (%rcx)
	je	.L36
	addq	$1, %rcx
	addl	$1, %eax
	cmpq	%rsi, %rcx
	jne	.L10
.L35:
	xorl	%esi, %esi
.L11:
	addl	%eax, %esi
	addl	%esi, %ebx
.L6:
	cmpl	%ebx, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	cmovl	%ebx, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L34:
	movb	$1, (%r12,%rax)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	leal	-1(%rax), %edi
	leaq	1(%rcx), %rax
	xorl	%edx, %edx
	xorl	%esi, %esi
	addq	%rax, %rdi
	xorl	%eax, %eax
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L37:
	addl	$1, %eax
.L13:
	addq	$1, %rcx
	cmpq	%rdi, %rcx
	je	.L11
.L14:
	cmpb	$0, (%rcx)
	jne	.L37
	testl	%eax, %eax
	je	.L13
	leal	1(%rsi,%rax), %esi
	cmpl	%esi, %edx
	cmovl	%esi, %edx
	cmpb	$0, 1(%rcx)
	jne	.L20
	xorl	%esi, %esi
	xorl	%eax, %eax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L20:
	movl	%eax, %esi
	xorl	%eax, %eax
	jmp	.L13
.L15:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$40, %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
.L19:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L6
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 100005
c:
	.zero	100005
	.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:

// Aizu Vol-5 0517: Longest Steps
// 2017.8.30 bal4u@uu

#include <stdio.h>
#include <string.h>

char c[100005];

int main()
{
	int n, k, a;
	int i, f, w, w0, ans;

	while (scanf("%d%d", &n, &k) && n) {
		memset(c, 0, n+3), f = 0;
		while (k-- > 0) {
			scanf("%d", &a);
			if (a == 0) f = 1;
			else c[a] = 1;
		}
		for (ans = w0 = w = 0, i = 1; i <= n; i++) {
			if (c[i]) w++;
			else if (w > 0) {
				if (w0 + w + f > ans) ans = w0 + w + f;
				if (f && c[i+1]) w0 = w; else w0 = 0;
				w = 0;
			}
		}
		if (w0 + w + f > ans) ans = w0 + w + f;
		printf("%d\n", ans);
	}
	return 0;
}
7 5
6
2
4
7
1
7 5
5
2
0
4
7
0 0
 7 5
6
2
4
7
1
7 5
5
2
0
1
7
0 0
 9 5
6
2
4
7
1
7 5
5
2
1
4
7
0 0
 14 5
6
0
4
7
1
7 5
5
2
0
4
7
0 0
 7 5
6
2
3
7
1
7 5
6
2
0
4
7
0 0
 7 5
6
2
4
7
0
25 5
5
2
0
1
7
0 0
 14 5
5
3
4
7
1
7 5
5
2
1
4
7
0 0
 7 5
6
2
4
7
1
7 5
5
2
0
4
6
0 0
 9 5
6
2
4
3
1
7 5
5
2
1
4
7
0 0
 7 5
6
2
4
3
0
25 5
5
2
0
1
7
0 0

2
4
 2
3
 2
2
 4
4
 3
4
 4
3
 3
2
 2
5
 4
2
 5
3

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

```c
// Aizu Vol-5 0517: Longest Steps
// 2017.8.30 bal4u@uu

#include <stdio.h>
#include <string.h>

char c[100005];

int main()
{
	int n, k, a;
	int i, f, w, w0, ans;

	while (scanf("%d%d", &n, &k) && n) {
		memset(c, 0, n+3), f = 0;
		while (k-- > 0) {
			scanf("%d", &a);
			if (a == 0) f = 1;
			else c[a] = 1;
		}
		for (ans = w0 = w = 0, i = 1; i <= n; i++) {
			if (c[i]) w++;
			else if (w > 0) {
				if (w0 + w + f > ans) ans = w0 + w + f;
				if (f && c[i+1]) w0 = w; else w0 = 0;
				w = 0;
			}
		}
		if (w0 + w + f > ans) ans = w0 + w + f;
		printf("%d\n", ans);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 100005
c:
	.zero	100005
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L15:
	movl	-40(%rbp), %eax
	addl	$3, %eax
	cltq
	movq	%rax, %rdx
	movl	$0, %esi
	leaq	c(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -24(%rbp)
	jmp	.L3
.L5:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	jne	.L4
	movl	$1, -24(%rbp)
	jmp	.L3
.L4:
	movl	-32(%rbp), %eax
	cltq
	leaq	c(%rip), %rdx
	movb	$1, (%rax,%rdx)
.L3:
	movl	-36(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -36(%rbp)
	testl	%eax, %eax
	jg	.L5
	movl	$0, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	$1, -28(%rbp)
	jmp	.L6
.L12:
	movl	-28(%rbp), %eax
	cltq
	leaq	c(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L7
	addl	$1, -20(%rbp)
	jmp	.L8
.L7:
	cmpl	$0, -20(%rbp)
	jle	.L8
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -12(%rbp)
	jge	.L9
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
.L9:
	cmpl	$0, -24(%rbp)
	je	.L10
	movl	-28(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	c(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L10
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L11
.L10:
	movl	$0, -16(%rbp)
.L11:
	movl	$0, -20(%rbp)
.L8:
	addl	$1, -28(%rbp)
.L6:
	movl	-40(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L12
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -12(%rbp)
	jge	.L13
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
.L13:
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L14
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	jne	.L15
.L14:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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, 100005
c:
	.zero	100005
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L15:
	movl	-40(%rbp), %eax
	addl	$3, %eax
	cltq
	movq	%rax, %rdx
	movl	$0, %esi
	leaq	c(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -24(%rbp)
	jmp	.L3
.L5:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	jne	.L4
	movl	$1, -24(%rbp)
	jmp	.L3
.L4:
	movl	-32(%rbp), %eax
	cltq
	leaq	c(%rip), %rdx
	movb	$1, (%rax,%rdx)
.L3:
	movl	-36(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -36(%rbp)
	testl	%eax, %eax
	jg	.L5
	movl	$0, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	$1, -28(%rbp)
	jmp	.L6
.L12:
	movl	-28(%rbp), %eax
	cltq
	leaq	c(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L7
	addl	$1, -20(%rbp)
	jmp	.L8
.L7:
	cmpl	$0, -20(%rbp)
	jle	.L8
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -12(%rbp)
	jge	.L9
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
.L9:
	cmpl	$0, -24(%rbp)
	je	.L10
	movl	-28(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	c(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L10
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L11
.L10:
	movl	$0, -16(%rbp)
.L11:
	movl	$0, -20(%rbp)
.L8:
	addl	$1, -28(%rbp)
.L6:
	movl	-40(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L12
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -12(%rbp)
	jge	.L13
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
.L13:
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L14
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	jne	.L15
.L14:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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:
