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

#define MAX(a,b) (a > b ? a : b)
#define MIN(a,b) (a < b ? a : b)
const int inf = 1000000000; // 10^9

int main(){
   char s[5];scanf("%s",s);
   int ans=0;
   for(int i = 0;i < 4;i++){
      if(s[i]=='+')ans++;
      else ans--;
   }
   printf("%d",ans);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	3(%rsp), %rsi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	cmpb	$43, 3(%rsp)
	sete	%al
	cmpb	$43, 4(%rsp)
	leal	-1(%rax,%rax), %eax
	leal	-1(%rax), %edx
	jne	.L4
	leal	1(%rax), %edx
.L4:
	cmpb	$43, 5(%rsp)
	leal	1(%rdx), %eax
	je	.L6
	leal	-1(%rdx), %eax
.L6:
	cmpb	$43, 6(%rsp)
	leal	-1(%rax), %edx
	jne	.L8
	leal	1(%rax), %edx
.L8:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	inf
	.section	.rodata
	.align 4
	.type	inf, @object
	.size	inf, 4
inf:
	.long	1000000000
	.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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	3(%rsp), %rsi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	cmpb	$43, 3(%rsp)
	sete	%al
	cmpb	$43, 4(%rsp)
	leal	-1(%rax,%rax), %eax
	leal	-1(%rax), %edx
	jne	.L4
	leal	1(%rax), %edx
.L4:
	cmpb	$43, 5(%rsp)
	leal	1(%rdx), %eax
	je	.L6
	leal	-1(%rdx), %eax
.L6:
	cmpb	$43, 6(%rsp)
	leal	-1(%rax), %edx
	jne	.L8
	leal	1(%rax), %edx
.L8:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	inf
	.section	.rodata
	.align 4
	.type	inf, @object
	.size	inf, 4
inf:
	.long	1000000000
	.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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	3(%rsp), %rsi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	cmpb	$43, 3(%rsp)
	sete	%al
	cmpb	$43, 4(%rsp)
	leal	-1(%rax,%rax), %eax
	leal	-1(%rax), %edx
	jne	.L4
	leal	1(%rax), %edx
.L4:
	cmpb	$43, 5(%rsp)
	leal	1(%rdx), %eax
	je	.L6
	leal	-1(%rdx), %eax
.L6:
	cmpb	$43, 6(%rsp)
	leal	-1(%rax), %edx
	jne	.L8
	leal	1(%rax), %edx
.L8:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	inf
	.section	.rodata
	.align 4
	.type	inf, @object
	.size	inf, 4
inf:
	.long	1000000000
	.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 <stdlib.h>
#include <string.h>

#define MAX(a,b) (a > b ? a : b)
#define MIN(a,b) (a < b ? a : b)
const int inf = 1000000000; // 10^9

int main(){
   char s[5];scanf("%s",s);
   int ans=0;
   for(int i = 0;i < 4;i++){
      if(s[i]=='+')ans++;
      else ans--;
   }
   printf("%d",ans);
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

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

#define MAX(a,b) (a > b ? a : b)
#define MIN(a,b) (a < b ? a : b)
const int inf = 1000000000; // 10^9

int main(){
   char s[5];scanf("%s",s);
   int ans=0;
   for(int i = 0;i < 4;i++){
      if(s[i]=='+')ans++;
      else ans--;
   }
   printf("%d",ans);
}```

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:

--+-
 ++-+
 ++++
 -+-+
 ---+
 +---
 -+++
 +++-
 ++--
 +--+

-2 2 4 0 -2 -2 2 2 0 0
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 <stdlib.h>
#include <string.h>

#define MAX(a,b) (a > b ? a : b)
#define MIN(a,b) (a < b ? a : b)
const int inf = 1000000000; // 10^9

int main(){
   char s[5];scanf("%s",s);
   int ans=0;
   for(int i = 0;i < 4;i++){
      if(s[i]=='+')ans++;
      else ans--;
   }
   printf("%d",ans);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	3(%rsp), %rsi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	cmpb	$43, 3(%rsp)
	sete	%al
	cmpb	$43, 4(%rsp)
	leal	-1(%rax,%rax), %eax
	leal	-1(%rax), %edx
	jne	.L4
	leal	1(%rax), %edx
.L4:
	cmpb	$43, 5(%rsp)
	leal	1(%rdx), %eax
	je	.L6
	leal	-1(%rdx), %eax
.L6:
	cmpb	$43, 6(%rsp)
	leal	-1(%rax), %edx
	jne	.L8
	leal	1(%rax), %edx
.L8:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	inf
	.section	.rodata
	.align 4
	.type	inf, @object
	.size	inf, 4
inf:
	.long	1000000000
	.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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	3(%rsp), %rsi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	cmpb	$43, 3(%rsp)
	sete	%al
	cmpb	$43, 4(%rsp)
	leal	-1(%rax,%rax), %eax
	leal	-1(%rax), %edx
	jne	.L4
	leal	1(%rax), %edx
.L4:
	cmpb	$43, 5(%rsp)
	leal	1(%rdx), %eax
	je	.L6
	leal	-1(%rdx), %eax
.L6:
	cmpb	$43, 6(%rsp)
	leal	-1(%rax), %edx
	jne	.L8
	leal	1(%rax), %edx
.L8:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	inf
	.section	.rodata
	.align 4
	.type	inf, @object
	.size	inf, 4
inf:
	.long	1000000000
	.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:
```