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

```c
//Vol5 588
#include<stdio.h>
#include<string.h>
int main()
{
	int n,s=0;
	char c,l='+';
	while(1){
		scanf("%d\n",&n);
		scanf("%c",&c);
		if(l=='+'){
			s+=n;
		}else if(l=='-'){
			s-=n;
		}else if(l=='*'){
			s*=n;
		}else{
			s/=n;
		}
		l=c;
		if(c=='='){
			printf("%d\n",s);
			break;
		}
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%c"
	.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
	leaq	.LC0(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	$43, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r14
	leaq	3(%rsp), %r13
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	movl	4(%rsp), %ecx
	cmpb	$45, %bl
	je	.L11
	cmpb	$42, %bl
	je	.L12
	movl	%r12d, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r12d
.L3:
	movzbl	3(%rsp), %ebx
	cmpb	$61, %bl
	je	.L13
.L6:
	movq	%r14, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpb	$43, %bl
	jne	.L2
	movzbl	3(%rsp), %ebx
	addl	4(%rsp), %r12d
	cmpb	$61, %bl
	jne	.L6
.L13:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$24, %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
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	subl	%ecx, %r12d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	imull	%ecx, %r12d
	jmp	.L3
.L14:
	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	"%d\n"
.LC1:
	.string	"%c"
	.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
	leaq	.LC0(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	$43, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r14
	leaq	3(%rsp), %r13
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	movl	4(%rsp), %ecx
	cmpb	$45, %bl
	je	.L11
	cmpb	$42, %bl
	je	.L12
	movl	%r12d, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r12d
.L3:
	movzbl	3(%rsp), %ebx
	cmpb	$61, %bl
	je	.L13
.L6:
	movq	%r14, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpb	$43, %bl
	jne	.L2
	movzbl	3(%rsp), %ebx
	addl	4(%rsp), %r12d
	cmpb	$61, %bl
	jne	.L6
.L13:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$24, %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
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	subl	%ecx, %r12d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	imull	%ecx, %r12d
	jmp	.L3
.L14:
	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	"%d\n"
.LC1:
	.string	"%c"
	.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
	leaq	.LC0(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	$43, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r14
	leaq	3(%rsp), %r13
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	movl	4(%rsp), %ecx
	cmpb	$45, %bl
	je	.L11
	cmpb	$42, %bl
	je	.L12
	movl	%r12d, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r12d
.L3:
	movzbl	3(%rsp), %ebx
	cmpb	$61, %bl
	je	.L13
.L6:
	movq	%r14, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpb	$43, %bl
	jne	.L2
	movzbl	3(%rsp), %ebx
	addl	4(%rsp), %r12d
	cmpb	$61, %bl
	jne	.L6
.L13:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$24, %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
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	subl	%ecx, %r12d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	imull	%ecx, %r12d
	jmp	.L3
.L14:
	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
//Vol5 588
#include<stdio.h>
#include<string.h>
int main()
{
	int n,s=0;
	char c,l='+';
	while(1){
		scanf("%d\n",&n);
		scanf("%c",&c);
		if(l=='+'){
			s+=n;
		}else if(l=='-'){
			s-=n;
		}else if(l=='*'){
			s*=n;
		}else{
			s/=n;
		}
		l=c;
		if(c=='='){
			printf("%d\n",s);
			break;
		}
	}
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
//Vol5 588
#include<stdio.h>
#include<string.h>
int main()
{
	int n,s=0;
	char c,l='+';
	while(1){
		scanf("%d\n",&n);
		scanf("%c",&c);
		if(l=='+'){
			s+=n;
		}else if(l=='-'){
			s-=n;
		}else if(l=='*'){
			s*=n;
		}else{
			s/=n;
		}
		l=c;
		if(c=='='){
			printf("%d\n",s);
			break;
		}
	}
	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:

1
+
1
=

2

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

```c
//Vol5 588
#include<stdio.h>
#include<string.h>
int main()
{
	int n,s=0;
	char c,l='+';
	while(1){
		scanf("%d\n",&n);
		scanf("%c",&c);
		if(l=='+'){
			s+=n;
		}else if(l=='-'){
			s-=n;
		}else if(l=='*'){
			s*=n;
		}else{
			s/=n;
		}
		l=c;
		if(c=='='){
			printf("%d\n",s);
			break;
		}
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%c"
	.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
	leaq	.LC0(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	$43, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r14
	leaq	3(%rsp), %r13
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	movl	4(%rsp), %ecx
	cmpb	$45, %bl
	je	.L11
	cmpb	$42, %bl
	je	.L12
	movl	%r12d, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r12d
.L3:
	movzbl	3(%rsp), %ebx
	cmpb	$61, %bl
	je	.L13
.L6:
	movq	%r14, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpb	$43, %bl
	jne	.L2
	movzbl	3(%rsp), %ebx
	addl	4(%rsp), %r12d
	cmpb	$61, %bl
	jne	.L6
.L13:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$24, %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
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	subl	%ecx, %r12d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	imull	%ecx, %r12d
	jmp	.L3
.L14:
	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	"%d\n"
.LC1:
	.string	"%c"
	.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
	leaq	.LC0(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	$43, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r14
	leaq	3(%rsp), %r13
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	movl	4(%rsp), %ecx
	cmpb	$45, %bl
	je	.L11
	cmpb	$42, %bl
	je	.L12
	movl	%r12d, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r12d
.L3:
	movzbl	3(%rsp), %ebx
	cmpb	$61, %bl
	je	.L13
.L6:
	movq	%r14, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpb	$43, %bl
	jne	.L2
	movzbl	3(%rsp), %ebx
	addl	4(%rsp), %r12d
	cmpb	$61, %bl
	jne	.L6
.L13:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$24, %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
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	subl	%ecx, %r12d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	imull	%ecx, %r12d
	jmp	.L3
.L14:
	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:
```