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>
#include<string.h>

int main(void)
{
  char str[1010];
  int a[30]={};
  int i;
  int sum=0;
  
  scanf("%s",str);
  for(i=0;str[i];i++)
    a[str[i]-'a']=!a[str[i]-'a'];
  for(i=0;i<30;i++)
    sum+=a[i];
  
  printf("%d\n",sum/2);
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	subq	$1160, %rsp
	.cfi_def_cfa_offset 1168
	movl	$15, %ecx
	movq	%fs:40, %rax
	movq	%rax, 1144(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rdi
	leaq	128(%rsp), %rsi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movsbl	128(%rsp), %eax
	testb	%al, %al
	je	.L2
	leaq	129(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	subl	$97, %eax
	xorl	%ecx, %ecx
	cltq
	movl	(%rsp,%rax,4), %esi
	testl	%esi, %esi
	sete	%cl
	addq	$1, %rdx
	movl	%ecx, (%rsp,%rax,4)
	movsbl	-1(%rdx), %eax
	testb	%al, %al
	jne	.L3
.L2:
	movdqa	(%rsp), %xmm0
	movl	112(%rsp), %ecx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	paddd	16(%rsp), %xmm0
	paddd	32(%rsp), %xmm0
	paddd	48(%rsp), %xmm0
	paddd	64(%rsp), %xmm0
	paddd	80(%rsp), %xmm0
	paddd	96(%rsp), %xmm0
	movl	116(%rsp), %edx
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	addl	%ecx, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	xorl	%eax, %eax
	sarl	%edx
	call	__printf_chk@PLT
	movq	1144(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	xorl	%eax, %eax
	addq	$1160, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	subq	$1160, %rsp
	.cfi_def_cfa_offset 1168
	movl	$15, %ecx
	movq	%fs:40, %rax
	movq	%rax, 1144(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rdi
	leaq	128(%rsp), %rsi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movsbl	128(%rsp), %eax
	testb	%al, %al
	je	.L2
	leaq	129(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	subl	$97, %eax
	xorl	%ecx, %ecx
	cltq
	movl	(%rsp,%rax,4), %esi
	testl	%esi, %esi
	sete	%cl
	addq	$1, %rdx
	movl	%ecx, (%rsp,%rax,4)
	movsbl	-1(%rdx), %eax
	testb	%al, %al
	jne	.L3
.L2:
	movdqa	(%rsp), %xmm0
	movl	112(%rsp), %ecx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	paddd	16(%rsp), %xmm0
	paddd	32(%rsp), %xmm0
	paddd	48(%rsp), %xmm0
	paddd	64(%rsp), %xmm0
	paddd	80(%rsp), %xmm0
	paddd	96(%rsp), %xmm0
	movl	116(%rsp), %edx
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	addl	%ecx, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	xorl	%eax, %eax
	sarl	%edx
	call	__printf_chk@PLT
	movq	1144(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	xorl	%eax, %eax
	addq	$1160, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	subq	$1160, %rsp
	.cfi_def_cfa_offset 1168
	movl	$15, %ecx
	movq	%fs:40, %rax
	movq	%rax, 1144(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rdi
	leaq	128(%rsp), %rsi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movsbl	128(%rsp), %eax
	testb	%al, %al
	je	.L2
	leaq	129(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	subl	$97, %eax
	xorl	%ecx, %ecx
	cltq
	movl	(%rsp,%rax,4), %esi
	testl	%esi, %esi
	sete	%cl
	addq	$1, %rdx
	movl	%ecx, (%rsp,%rax,4)
	movsbl	-1(%rdx), %eax
	testb	%al, %al
	jne	.L3
.L2:
	movdqa	(%rsp), %xmm0
	movl	112(%rsp), %ecx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	paddd	16(%rsp), %xmm0
	paddd	32(%rsp), %xmm0
	paddd	48(%rsp), %xmm0
	paddd	64(%rsp), %xmm0
	paddd	80(%rsp), %xmm0
	paddd	96(%rsp), %xmm0
	movl	116(%rsp), %edx
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	addl	%ecx, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	xorl	%eax, %eax
	sarl	%edx
	call	__printf_chk@PLT
	movq	1144(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	xorl	%eax, %eax
	addq	$1160, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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>
#include<string.h>

int main(void)
{
  char str[1010];
  int a[30]={};
  int i;
  int sum=0;
  
  scanf("%s",str);
  for(i=0;str[i];i++)
    a[str[i]-'a']=!a[str[i]-'a'];
  for(i=0;i<30;i++)
    sum+=a[i];
  
  printf("%d\n",sum/2);
  return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

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

int main(void)
{
  char str[1010];
  int a[30]={};
  int i;
  int sum=0;
  
  scanf("%s",str);
  for(i=0;str[i];i++)
    a[str[i]-'a']=!a[str[i]-'a'];
  for(i=0;i<30;i++)
    sum+=a[i];
  
  printf("%d\n",sum/2);
  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:

gcpc
 bgnc
 gcoc
 gcnc
 cgnc
 bcng
 bcnh
 hncb
 bnch
 boch

1
 2
 1
 1
 1
 2
 2
 2
 2
 2

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>
#include<string.h>

int main(void)
{
  char str[1010];
  int a[30]={};
  int i;
  int sum=0;
  
  scanf("%s",str);
  for(i=0;str[i];i++)
    a[str[i]-'a']=!a[str[i]-'a'];
  for(i=0;i<30;i++)
    sum+=a[i];
  
  printf("%d\n",sum/2);
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	subq	$1160, %rsp
	.cfi_def_cfa_offset 1168
	movl	$15, %ecx
	movq	%fs:40, %rax
	movq	%rax, 1144(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rdi
	leaq	128(%rsp), %rsi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movsbl	128(%rsp), %eax
	testb	%al, %al
	je	.L2
	leaq	129(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	subl	$97, %eax
	xorl	%ecx, %ecx
	cltq
	movl	(%rsp,%rax,4), %esi
	testl	%esi, %esi
	sete	%cl
	addq	$1, %rdx
	movl	%ecx, (%rsp,%rax,4)
	movsbl	-1(%rdx), %eax
	testb	%al, %al
	jne	.L3
.L2:
	movdqa	(%rsp), %xmm0
	movl	112(%rsp), %ecx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	paddd	16(%rsp), %xmm0
	paddd	32(%rsp), %xmm0
	paddd	48(%rsp), %xmm0
	paddd	64(%rsp), %xmm0
	paddd	80(%rsp), %xmm0
	paddd	96(%rsp), %xmm0
	movl	116(%rsp), %edx
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	addl	%ecx, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	xorl	%eax, %eax
	sarl	%edx
	call	__printf_chk@PLT
	movq	1144(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	xorl	%eax, %eax
	addq	$1160, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	subq	$1160, %rsp
	.cfi_def_cfa_offset 1168
	movl	$15, %ecx
	movq	%fs:40, %rax
	movq	%rax, 1144(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rdi
	leaq	128(%rsp), %rsi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movsbl	128(%rsp), %eax
	testb	%al, %al
	je	.L2
	leaq	129(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	subl	$97, %eax
	xorl	%ecx, %ecx
	cltq
	movl	(%rsp,%rax,4), %esi
	testl	%esi, %esi
	sete	%cl
	addq	$1, %rdx
	movl	%ecx, (%rsp,%rax,4)
	movsbl	-1(%rdx), %eax
	testb	%al, %al
	jne	.L3
.L2:
	movdqa	(%rsp), %xmm0
	movl	112(%rsp), %ecx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	paddd	16(%rsp), %xmm0
	paddd	32(%rsp), %xmm0
	paddd	48(%rsp), %xmm0
	paddd	64(%rsp), %xmm0
	paddd	80(%rsp), %xmm0
	paddd	96(%rsp), %xmm0
	movl	116(%rsp), %edx
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	addl	%ecx, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	xorl	%eax, %eax
	sarl	%edx
	call	__printf_chk@PLT
	movq	1144(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	xorl	%eax, %eax
	addq	$1160, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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:
```