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>

char s[128];

int last[256], max[256];

int main(void) {
	int i, len,  kotae;
	if (scanf("%127s",s) != 1) return 1;

	for (i = 0; i < 256; i++) {
		last[i] = -1;
	}

	for (i = 0; s[i] != '\0'; i++) {
		int idx = (unsigned char)s[i];
		if (i - last[idx] - 1 > max[idx]) max[idx] = i - last[idx] - 1;
		last[idx] = i;
	}

	len = i;
	for (i = 0; i < 256; i++) {
		if (len - last[i] - 1 > max[i]) max[i] = len - last[i] - 1;
	}

	kotae = len;
	for (i = 0; i < 256; i++) {
		if (max[i] < kotae) kotae = max[i];
	}

	printf("%d\n", kotae);
	return 0;
}

/*

s e r v a l
|/|/|/|/|/
s r v v l
|/|/|/|/
s v v v
|/|/|/
v v v

j a c k a l
|/|/|/|/|/
a a c a a
|/|/|/|/
a a a a

各文字は後ろへは拡散できない
ある位置の文字に統一したい → その長さになるまで待たないといけない

*/
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 128
s:
	.zero	128
	.globl	last
	.align 32
	.type	last, @object
	.size	last, 1024
last:
	.zero	1024
	.globl	max
	.align 32
	.type	max, @object
	.size	max, 1024
max:
	.zero	1024
	.section	.rodata
.LC0:
	.string	"%127s"
.LC1:
	.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	$16, %rsp
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movl	$0, -16(%rbp)
	jmp	.L4
.L5:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	last(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L4:
	cmpl	$255, -16(%rbp)
	jle	.L5
	movl	$0, -16(%rbp)
	jmp	.L6
.L8:
	movl	-16(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	last(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	subl	%edx, %eax
	leal	-1(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jle	.L7
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	last(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	subl	%edx, %eax
	leal	-1(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L7:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	last(%rip), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L6:
	movl	-16(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L8
	movl	-16(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L9
.L11:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	last(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	subl	%edx, %eax
	leal	-1(%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jle	.L10
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	last(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	subl	%edx, %eax
	leal	-1(%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L10:
	addl	$1, -16(%rbp)
.L9:
	cmpl	$255, -16(%rbp)
	jle	.L11
	movl	-8(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L12
.L14:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L13
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
.L13:
	addl	$1, -16(%rbp)
.L12:
	cmpl	$255, -16(%rbp)
	jle	.L14
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L3:
	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	"%127s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	s(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	%eax, %r8d
	movl	$1, %eax
	cmpl	$1, %r8d
	jne	.L1
	leaq	last(%rip), %r8
	orq	$-1, %rax
	movl	$128, %ecx
	movq	%r8, %rdi
	rep stosq
	movzbl	s(%rip), %eax
	testb	%al, %al
	je	.L11
	leaq	1+s(%rip), %rcx
	xorl	%esi, %esi
	leaq	max(%rip), %rdi
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%esi, %edx
	subl	(%r8,%rax,4), %edx
	subl	$1, %edx
	cmpl	(%rdi,%rax,4), %edx
	jle	.L4
	movl	%edx, (%rdi,%rax,4)
.L4:
	addq	$1, %rcx
	movl	%esi, (%r8,%rax,4)
	addl	$1, %esi
	movzbl	-1(%rcx), %eax
	testb	%al, %al
	jne	.L6
.L3:
	leaq	last(%rip), %rdx
	leaq	max(%rip), %rdi
	leaq	1024(%rdx), %r8
	movq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%esi, %eax
	subl	(%rdx), %eax
	subl	$1, %eax
	cmpl	(%rcx), %eax
	jle	.L7
	movl	%eax, (%rcx)
.L7:
	addq	$4, %rdx
	addq	$4, %rcx
	cmpq	%rdx, %r8
	jne	.L8
	movd	%esi, %xmm3
	leaq	1024+max(%rip), %rax
	pshufd	$0, %xmm3, %xmm0
	.p2align 4,,10
	.p2align 3
.L9:
	movdqa	%xmm0, %xmm2
	movdqa	(%rdi), %xmm1
	addq	$16, %rdi
	pcmpgtd	-16(%rdi), %xmm2
	pand	%xmm2, %xmm1
	pandn	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	por	%xmm1, %xmm0
	cmpq	%rdi, %rax
	jne	.L9
	movdqa	%xmm0, %xmm2
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	psrldq	$8, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movd	%xmm1, %edx
	call	__printf_chk@PLT
	xorl	%eax, %eax
.L1:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	xorl	%esi, %esi
	jmp	.L3
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	max
	.bss
	.align 32
	.type	max, @object
	.size	max, 1024
max:
	.zero	1024
	.globl	last
	.align 32
	.type	last, @object
	.size	last, 1024
last:
	.zero	1024
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 128
s:
	.zero	128
	.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	"%127s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	s(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	%eax, %r8d
	movl	$1, %eax
	cmpl	$1, %r8d
	jne	.L1
	leaq	last(%rip), %r8
	orq	$-1, %rax
	movl	$128, %ecx
	movq	%r8, %rdi
	rep stosq
	movzbl	s(%rip), %eax
	testb	%al, %al
	je	.L11
	leaq	1+s(%rip), %rcx
	xorl	%esi, %esi
	leaq	max(%rip), %rdi
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%esi, %edx
	subl	(%r8,%rax,4), %edx
	subl	$1, %edx
	cmpl	(%rdi,%rax,4), %edx
	jle	.L4
	movl	%edx, (%rdi,%rax,4)
.L4:
	addq	$1, %rcx
	movl	%esi, (%r8,%rax,4)
	addl	$1, %esi
	movzbl	-1(%rcx), %eax
	testb	%al, %al
	jne	.L6
.L3:
	leaq	last(%rip), %rdx
	leaq	max(%rip), %rdi
	leaq	1024(%rdx), %r8
	movq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%esi, %eax
	subl	(%rdx), %eax
	subl	$1, %eax
	cmpl	(%rcx), %eax
	jle	.L7
	movl	%eax, (%rcx)
.L7:
	addq	$4, %rdx
	addq	$4, %rcx
	cmpq	%rdx, %r8
	jne	.L8
	movd	%esi, %xmm3
	leaq	1024+max(%rip), %rax
	pshufd	$0, %xmm3, %xmm0
	.p2align 4,,10
	.p2align 3
.L9:
	movdqa	%xmm0, %xmm2
	movdqa	(%rdi), %xmm1
	addq	$16, %rdi
	pcmpgtd	-16(%rdi), %xmm2
	pand	%xmm2, %xmm1
	pandn	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	por	%xmm1, %xmm0
	cmpq	%rdi, %rax
	jne	.L9
	movdqa	%xmm0, %xmm2
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	psrldq	$8, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movd	%xmm1, %edx
	call	__printf_chk@PLT
	xorl	%eax, %eax
.L1:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	xorl	%esi, %esi
	jmp	.L3
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	max
	.bss
	.align 32
	.type	max, @object
	.size	max, 1024
max:
	.zero	1024
	.globl	last
	.align 32
	.type	last, @object
	.size	last, 1024
last:
	.zero	1024
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 128
s:
	.zero	128
	.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>

char s[128];

int last[256], max[256];

int main(void) {
	int i, len,  kotae;
	if (scanf("%127s",s) != 1) return 1;

	for (i = 0; i < 256; i++) {
		last[i] = -1;
	}

	for (i = 0; s[i] != '\0'; i++) {
		int idx = (unsigned char)s[i];
		if (i - last[idx] - 1 > max[idx]) max[idx] = i - last[idx] - 1;
		last[idx] = i;
	}

	len = i;
	for (i = 0; i < 256; i++) {
		if (len - last[i] - 1 > max[i]) max[i] = len - last[i] - 1;
	}

	kotae = len;
	for (i = 0; i < 256; i++) {
		if (max[i] < kotae) kotae = max[i];
	}

	printf("%d\n", kotae);
	return 0;
}

/*

s e r v a l
|/|/|/|/|/
s r v v l
|/|/|/|/
s v v v
|/|/|/
v v v

j a c k a l
|/|/|/|/|/
a a c a a
|/|/|/|/
a a a a

各文字は後ろへは拡散できない
ある位置の文字に統一したい → その長さになるまで待たないといけない

*/

resval
 whbrjpjyhsrywlqjxcbrbaomnw
 zzy
 lakjac
 xmboabrbnxjrlwyrthyjpjrchv
 whcrjpbyhtxywkrlxnbrbaojmr
 smjoabjdoxmrjwypugydyqrchv
 whdrpxdwhuozxkrmxodjaaojkt
 xwwwnajdrxmrqwzpugnhlojced
 wyeoqidphazibqrnvxibngzwpx

3
 8
 1
 2
 6
 10
 11
 9
 12
 7

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>

char s[128];

int last[256], max[256];

int main(void) {
	int i, len,  kotae;
	if (scanf("%127s",s) != 1) return 1;

	for (i = 0; i < 256; i++) {
		last[i] = -1;
	}

	for (i = 0; s[i] != '\0'; i++) {
		int idx = (unsigned char)s[i];
		if (i - last[idx] - 1 > max[idx]) max[idx] = i - last[idx] - 1;
		last[idx] = i;
	}

	len = i;
	for (i = 0; i < 256; i++) {
		if (len - last[i] - 1 > max[i]) max[i] = len - last[i] - 1;
	}

	kotae = len;
	for (i = 0; i < 256; i++) {
		if (max[i] < kotae) kotae = max[i];
	}

	printf("%d\n", kotae);
	return 0;
}

/*

s e r v a l
|/|/|/|/|/
s r v v l
|/|/|/|/
s v v v
|/|/|/
v v v

j a c k a l
|/|/|/|/|/
a a c a a
|/|/|/|/
a a a a

各文字は後ろへは拡散できない
ある位置の文字に統一したい → その長さになるまで待たないといけない

*/
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 128
s:
	.zero	128
	.globl	last
	.align 32
	.type	last, @object
	.size	last, 1024
last:
	.zero	1024
	.globl	max
	.align 32
	.type	max, @object
	.size	max, 1024
max:
	.zero	1024
	.section	.rodata
.LC0:
	.string	"%127s"
.LC1:
	.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	$16, %rsp
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movl	$0, -16(%rbp)
	jmp	.L4
.L5:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	last(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L4:
	cmpl	$255, -16(%rbp)
	jle	.L5
	movl	$0, -16(%rbp)
	jmp	.L6
.L8:
	movl	-16(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	last(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	subl	%edx, %eax
	leal	-1(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jle	.L7
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	last(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	subl	%edx, %eax
	leal	-1(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L7:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	last(%rip), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L6:
	movl	-16(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L8
	movl	-16(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L9
.L11:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	last(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	subl	%edx, %eax
	leal	-1(%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jle	.L10
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	last(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	subl	%edx, %eax
	leal	-1(%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L10:
	addl	$1, -16(%rbp)
.L9:
	cmpl	$255, -16(%rbp)
	jle	.L11
	movl	-8(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L12
.L14:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L13
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
.L13:
	addl	$1, -16(%rbp)
.L12:
	cmpl	$255, -16(%rbp)
	jle	.L14
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L3:
	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, 128
s:
	.zero	128
	.globl	last
	.align 32
	.type	last, @object
	.size	last, 1024
last:
	.zero	1024
	.globl	max
	.align 32
	.type	max, @object
	.size	max, 1024
max:
	.zero	1024
	.section	.rodata
.LC0:
	.string	"%127s"
.LC1:
	.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	$16, %rsp
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movl	$0, -16(%rbp)
	jmp	.L4
.L5:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	last(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L4:
	cmpl	$255, -16(%rbp)
	jle	.L5
	movl	$0, -16(%rbp)
	jmp	.L6
.L8:
	movl	-16(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	last(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	subl	%edx, %eax
	leal	-1(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jle	.L7
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	last(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	subl	%edx, %eax
	leal	-1(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L7:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	last(%rip), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -16(%rbp)
.L6:
	movl	-16(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L8
	movl	-16(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L9
.L11:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	last(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	subl	%edx, %eax
	leal	-1(%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jle	.L10
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	last(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	subl	%edx, %eax
	leal	-1(%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L10:
	addl	$1, -16(%rbp)
.L9:
	cmpl	$255, -16(%rbp)
	jle	.L11
	movl	-8(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L12
.L14:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L13
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
.L13:
	addl	$1, -16(%rbp)
.L12:
	cmpl	$255, -16(%rbp)
	jle	.L14
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L3:
	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:
