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

```c
#include<stdio.h>
int main()
{
	int n;
	char s[102];
	scanf("%d%s", &n, s);
	int count[30];
	int i, j;
	for (i = 0; i < 30; i++)
		count[i] = 0;
	for (i = 0; i < n; i++)
		count[s[i] - 'a']++;
	int c[30];
	for (i = 0; i < 30; i++)
		c[i] = 0;
	int ans = 0, x = 0;
	for (i = 0; i < n; i++)
	{
		if (c[s[i] - 'a'] == 0)
		{
			c[s[i] - 'a']++;
			count[s[i] - 'a']--;
			if (count[s[i] - 'a'] > 0)
				x++;
		}
		else
		{
			c[s[i] - 'a']++;
			count[s[i] - 'a']--;
			if (count[s[i] - 'a'] == 0)
				x--;
		}
		if (ans < x)
			ans = x;
	}
	printf("%d\n", ans);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rdi
	subq	$384, %rsp
	.cfi_def_cfa_offset 400
	movq	%fs:40, %rax
	movq	%rax, 376(%rsp)
	xorl	%eax, %eax
	leaq	272(%rsp), %rbx
	leaq	12(%rsp), %rsi
	movq	%rbx, %rdx
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rdx
	movl	12(%rsp), %r10d
	xorl	%eax, %eax
	movl	$15, %ecx
	movq	%rdx, %rdi
	rep stosq
	testl	%r10d, %r10d
	jle	.L9
	leal	-1(%r10), %ecx
	leaq	273(%rsp), %rsi
	movq	%rbx, %rdx
	movq	%rcx, %r10
	addq	%rsi, %rcx
	.p2align 4,,10
	.p2align 3
.L3:
	movsbl	(%rdx), %eax
	addq	$1, %rdx
	subl	$97, %eax
	cltq
	addl	$1, 16(%rsp,%rax,4)
	cmpq	%rdx, %rcx
	jne	.L3
	leaq	144(%rsp), %rdx
	xorl	%eax, %eax
	addq	%rsi, %r10
	xorl	%r8d, %r8d
	movl	$15, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rbx, %rcx
	xorl	%edi, %edi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%r9d, %r9d
	testl	%edx, %edx
	movl	$1, %esi
	setg	%r9b
	addl	%r9d, %edi
.L6:
	cmpl	%edi, %r8d
	movl	%esi, 144(%rsp,%rax,4)
	cmovl	%edi, %r8d
	addq	$1, %rcx
	movl	%edx, 16(%rsp,%rax,4)
	cmpq	%rcx, %r10
	je	.L2
.L7:
	movsbl	(%rcx), %eax
	subl	$97, %eax
	cltq
	movl	16(%rsp,%rax,4), %ebx
	movl	144(%rsp,%rax,4), %esi
	leal	-1(%rbx), %edx
	testl	%esi, %esi
	je	.L17
	addl	$1, %esi
	cmpl	$1, %edx
	sbbl	$0, %edi
	jmp	.L6
.L9:
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	376(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$384, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rdi
	subq	$384, %rsp
	.cfi_def_cfa_offset 400
	movq	%fs:40, %rax
	movq	%rax, 376(%rsp)
	xorl	%eax, %eax
	leaq	272(%rsp), %rbx
	leaq	12(%rsp), %rsi
	movq	%rbx, %rdx
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rdx
	movl	12(%rsp), %r10d
	xorl	%eax, %eax
	movl	$15, %ecx
	movq	%rdx, %rdi
	rep stosq
	testl	%r10d, %r10d
	jle	.L9
	leal	-1(%r10), %ecx
	leaq	273(%rsp), %rsi
	movq	%rbx, %rdx
	movq	%rcx, %r10
	addq	%rsi, %rcx
	.p2align 4,,10
	.p2align 3
.L3:
	movsbl	(%rdx), %eax
	addq	$1, %rdx
	subl	$97, %eax
	cltq
	addl	$1, 16(%rsp,%rax,4)
	cmpq	%rdx, %rcx
	jne	.L3
	leaq	144(%rsp), %rdx
	xorl	%eax, %eax
	addq	%rsi, %r10
	xorl	%r8d, %r8d
	movl	$15, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rbx, %rcx
	xorl	%edi, %edi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%r9d, %r9d
	testl	%edx, %edx
	movl	$1, %esi
	setg	%r9b
	addl	%r9d, %edi
.L6:
	cmpl	%edi, %r8d
	movl	%esi, 144(%rsp,%rax,4)
	cmovl	%edi, %r8d
	addq	$1, %rcx
	movl	%edx, 16(%rsp,%rax,4)
	cmpq	%rcx, %r10
	je	.L2
.L7:
	movsbl	(%rcx), %eax
	subl	$97, %eax
	cltq
	movl	16(%rsp,%rax,4), %ebx
	movl	144(%rsp,%rax,4), %esi
	leal	-1(%rbx), %edx
	testl	%esi, %esi
	je	.L17
	addl	$1, %esi
	cmpl	$1, %edx
	sbbl	$0, %edi
	jmp	.L6
.L9:
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	376(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$384, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
rule
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rdi
	subq	$384, %rsp
	.cfi_def_cfa_offset 400
	movq	%fs:40, %rax
	movq	%rax, 376(%rsp)
	xorl	%eax, %eax
	leaq	272(%rsp), %rbx
	leaq	12(%rsp), %rsi
	movq	%rbx, %rdx
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rdx
	movl	12(%rsp), %r10d
	xorl	%eax, %eax
	movl	$15, %ecx
	movq	%rdx, %rdi
	rep stosq
	testl	%r10d, %r10d
	jle	.L9
	leal	-1(%r10), %ecx
	leaq	273(%rsp), %rsi
	movq	%rbx, %rdx
	movq	%rcx, %r10
	addq	%rsi, %rcx
	.p2align 4,,10
	.p2align 3
.L3:
	movsbl	(%rdx), %eax
	addq	$1, %rdx
	subl	$97, %eax
	cltq
	addl	$1, 16(%rsp,%rax,4)
	cmpq	%rdx, %rcx
	jne	.L3
	leaq	144(%rsp), %rdx
	xorl	%eax, %eax
	addq	%rsi, %r10
	xorl	%r8d, %r8d
	movl	$15, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rbx, %rcx
	xorl	%edi, %edi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%r9d, %r9d
	testl	%edx, %edx
	movl	$1, %esi
	setg	%r9b
	addl	%r9d, %edi
.L6:
	cmpl	%edi, %r8d
	movl	%esi, 144(%rsp,%rax,4)
	cmovl	%edi, %r8d
	addq	$1, %rcx
	movl	%edx, 16(%rsp,%rax,4)
	cmpq	%rcx, %r10
	je	.L2
.L7:
	movsbl	(%rcx), %eax
	subl	$97, %eax
	cltq
	movl	16(%rsp,%rax,4), %ebx
	movl	144(%rsp,%rax,4), %esi
	leal	-1(%rbx), %edx
	testl	%esi, %esi
	je	.L17
	addl	$1, %esi
	cmpl	$1, %edx
	sbbl	$0, %edi
	jmp	.L6
.L9:
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	376(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$384, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```
```c
#include<stdio.h>
int main()
{
	int n;
	char s[102];
	scanf("%d%s", &n, s);
	int count[30];
	int i, j;
	for (i = 0; i < 30; i++)
		count[i] = 0;
	for (i = 0; i < n; i++)
		count[s[i] - 'a']++;
	int c[30];
	for (i = 0; i < 30; i++)
		c[i] = 0;
	int ans = 0, x = 0;
	for (i = 0; i < n; i++)
	{
		if (c[s[i] - 'a'] == 0)
		{
			c[s[i] - 'a']++;
			count[s[i] - 'a']--;
			if (count[s[i] - 'a'] > 0)
				x++;
		}
		else
		{
			c[s[i] - 'a']++;
			count[s[i] - 'a']--;
			if (count[s[i] - 'a'] == 0)
				x--;
		}
		if (ans < x)
			ans = x;
	}
	printf("%d\n", ans);
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main()
{
	int n;
	char s[102];
	scanf("%d%s", &n, s);
	int count[30];
	int i, j;
	for (i = 0; i < 30; i++)
		count[i] = 0;
	for (i = 0; i < n; i++)
		count[s[i] - 'a']++;
	int c[30];
	for (i = 0; i < 30; i++)
		c[i] = 0;
	int ans = 0, x = 0;
	for (i = 0; i < n; i++)
	{
		if (c[s[i] - 'a'] == 0)
		{
			c[s[i] - 'a']++;
			count[s[i] - 'a']--;
			if (count[s[i] - 'a'] > 0)
				x++;
		}
		else
		{
			c[s[i] - 'a']++;
			count[s[i] - 'a']--;
			if (count[s[i] - 'a'] == 0)
				x--;
		}
		if (ans < x)
			ans = x;
	}
	printf("%d\n", ans);
	return 0;
}```

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.
Optimized Assembly Code:

10
aaabaaaaaa
 6
`abbca
 45
tgxgdqkyjphyzutjjtllptdfxocrylqfqjynmfbfucbir
 45
tgxgtqkyjfhyzutjjdllptdpxrbrylqfqjynmfbfucbio
 45
bnxgtqkykfhyzutjjdllptdpxrtrylqfqjygmfbftcbio
 10
aba`ab`bbb
 10
`bcca_ba_`
 45
blxhtqkyjehxzutkjdmlpidpurtrzlbfribgmhqfzcyto
 45
twhhbqkztehxjvukjdjioldpurzrzlbfribgmnqfzcytn

1
 1
 9
 10
 11
 2
 0
 12
 8

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

```c
#include<stdio.h>
int main()
{
	int n;
	char s[102];
	scanf("%d%s", &n, s);
	int count[30];
	int i, j;
	for (i = 0; i < 30; i++)
		count[i] = 0;
	for (i = 0; i < n; i++)
		count[s[i] - 'a']++;
	int c[30];
	for (i = 0; i < 30; i++)
		c[i] = 0;
	int ans = 0, x = 0;
	for (i = 0; i < n; i++)
	{
		if (c[s[i] - 'a'] == 0)
		{
			c[s[i] - 'a']++;
			count[s[i] - 'a']--;
			if (count[s[i] - 'a'] > 0)
				x++;
		}
		else
		{
			c[s[i] - 'a']++;
			count[s[i] - 'a']--;
			if (count[s[i] - 'a'] == 0)
				x--;
		}
		if (ans < x)
			ans = x;
	}
	printf("%d\n", ans);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rdi
	subq	$384, %rsp
	.cfi_def_cfa_offset 400
	movq	%fs:40, %rax
	movq	%rax, 376(%rsp)
	xorl	%eax, %eax
	leaq	272(%rsp), %rbx
	leaq	12(%rsp), %rsi
	movq	%rbx, %rdx
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rdx
	movl	12(%rsp), %r10d
	xorl	%eax, %eax
	movl	$15, %ecx
	movq	%rdx, %rdi
	rep stosq
	testl	%r10d, %r10d
	jle	.L9
	leal	-1(%r10), %ecx
	leaq	273(%rsp), %rsi
	movq	%rbx, %rdx
	movq	%rcx, %r10
	addq	%rsi, %rcx
	.p2align 4,,10
	.p2align 3
.L3:
	movsbl	(%rdx), %eax
	addq	$1, %rdx
	subl	$97, %eax
	cltq
	addl	$1, 16(%rsp,%rax,4)
	cmpq	%rdx, %rcx
	jne	.L3
	leaq	144(%rsp), %rdx
	xorl	%eax, %eax
	addq	%rsi, %r10
	xorl	%r8d, %r8d
	movl	$15, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rbx, %rcx
	xorl	%edi, %edi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%r9d, %r9d
	testl	%edx, %edx
	movl	$1, %esi
	setg	%r9b
	addl	%r9d, %edi
.L6:
	cmpl	%edi, %r8d
	movl	%esi, 144(%rsp,%rax,4)
	cmovl	%edi, %r8d
	addq	$1, %rcx
	movl	%edx, 16(%rsp,%rax,4)
	cmpq	%rcx, %r10
	je	.L2
.L7:
	movsbl	(%rcx), %eax
	subl	$97, %eax
	cltq
	movl	16(%rsp,%rax,4), %ebx
	movl	144(%rsp,%rax,4), %esi
	leal	-1(%rbx), %edx
	testl	%esi, %esi
	je	.L17
	addl	$1, %esi
	cmpl	$1, %edx
	sbbl	$0, %edi
	jmp	.L6
.L9:
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	376(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$384, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rdi
	subq	$384, %rsp
	.cfi_def_cfa_offset 400
	movq	%fs:40, %rax
	movq	%rax, 376(%rsp)
	xorl	%eax, %eax
	leaq	272(%rsp), %rbx
	leaq	12(%rsp), %rsi
	movq	%rbx, %rdx
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rdx
	movl	12(%rsp), %r10d
	xorl	%eax, %eax
	movl	$15, %ecx
	movq	%rdx, %rdi
	rep stosq
	testl	%r10d, %r10d
	jle	.L9
	leal	-1(%r10), %ecx
	leaq	273(%rsp), %rsi
	movq	%rbx, %rdx
	movq	%rcx, %r10
	addq	%rsi, %rcx
	.p2align 4,,10
	.p2align 3
.L3:
	movsbl	(%rdx), %eax
	addq	$1, %rdx
	subl	$97, %eax
	cltq
	addl	$1, 16(%rsp,%rax,4)
	cmpq	%rdx, %rcx
	jne	.L3
	leaq	144(%rsp), %rdx
	xorl	%eax, %eax
	addq	%rsi, %r10
	xorl	%r8d, %r8d
	movl	$15, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rbx, %rcx
	xorl	%edi, %edi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%r9d, %r9d
	testl	%edx, %edx
	movl	$1, %esi
	setg	%r9b
	addl	%r9d, %edi
.L6:
	cmpl	%edi, %r8d
	movl	%esi, 144(%rsp,%rax,4)
	cmovl	%edi, %r8d
	addq	$1, %rcx
	movl	%edx, 16(%rsp,%rax,4)
	cmpq	%rcx, %r10
	je	.L2
.L7:
	movsbl	(%rcx), %eax
	subl	$97, %eax
	cltq
	movl	16(%rsp,%rax,4), %ebx
	movl	144(%rsp,%rax,4), %esi
	leal	-1(%rbx), %edx
	testl	%esi, %esi
	je	.L17
	addl	$1, %esi
	cmpl	$1, %edx
	sbbl	$0, %edi
	jmp	.L6
.L9:
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	376(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$384, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```