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

int value[100];
int sp = 0;

void push(const int val)
{
    value[sp++] = val;
}

int pop()
{
    return value[--sp];
}

void operand(const char operand)
{
    int ch, val = operand - '0';
    while( (ch = getchar()) != ' ' ){
        val = val * 10 + (ch - '0'); 
    }
    push(val);
}

void operator(const char operator)
{
    int tmp1 = pop(), tmp2 = pop();

    switch( operator ){
    case '+': push(tmp2 + tmp1); break;
    case '-': push(tmp2 - tmp1); break;
    case '*': push(tmp2 * tmp1); break;
    default : break;
    }
}

int main()
{
    while( 1 ){
        int ch = getchar();
        if( ch == ' ' || ch == '\n' ) continue;
        if( ch == EOF ) break;
        
        switch( ch ){
        case '+': case '-': case '*': operator(ch); break;
        default : operand(ch); break;
        }
    }

    printf("%d\n", pop());

    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	value
	.bss
	.align 32
	.type	value, @object
	.size	value, 400
value:
	.zero	400
	.globl	sp
	.align 4
	.type	sp, @object
	.size	sp, 4
sp:
	.zero	4
	.text
	.globl	push
	.type	push, @function
push:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	sp(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sp(%rip)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	value(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	push, .-push
	.globl	pop
	.type	pop, @function
pop:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	sp(%rip), %eax
	subl	$1, %eax
	movl	%eax, sp(%rip)
	movl	sp(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	value(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	pop, .-pop
	.globl	operand
	.type	operand, @function
operand:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, %eax
	movb	%al, -20(%rbp)
	movsbl	-20(%rbp), %eax
	subl	$48, %eax
	movl	%eax, -8(%rbp)
	jmp	.L5
.L6:
	movl	-8(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	subl	$48, %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
.L5:
	call	getchar@PLT
	movl	%eax, -4(%rbp)
	cmpl	$32, -4(%rbp)
	jne	.L6
	movl	-8(%rbp), %eax
	movl	%eax, %edi
	call	push
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	operand, .-operand
	.globl	operator
	.type	operator, @function
operator:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movl	%edi, %eax
	movb	%al, -20(%rbp)
	movl	$0, %eax
	call	pop
	movl	%eax, -8(%rbp)
	movl	$0, %eax
	call	pop
	movl	%eax, -4(%rbp)
	movsbl	-20(%rbp), %eax
	cmpl	$45, %eax
	je	.L8
	cmpl	$45, %eax
	jg	.L12
	cmpl	$42, %eax
	je	.L10
	cmpl	$43, %eax
	jne	.L12
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edi
	call	push
	jmp	.L11
.L8:
	movl	-4(%rbp), %eax
	subl	-8(%rbp), %eax
	movl	%eax, %edi
	call	push
	jmp	.L11
.L10:
	movl	-4(%rbp), %eax
	imull	-8(%rbp), %eax
	movl	%eax, %edi
	call	push
	jmp	.L11
.L12:
	nop
.L11:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	operator, .-operator
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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
.L22:
	call	getchar@PLT
	movl	%eax, -4(%rbp)
	cmpl	$32, -4(%rbp)
	je	.L25
	cmpl	$10, -4(%rbp)
	je	.L25
	cmpl	$-1, -4(%rbp)
	je	.L26
	cmpl	$43, -4(%rbp)
	jg	.L19
	cmpl	$42, -4(%rbp)
	jge	.L20
	jmp	.L21
.L19:
	cmpl	$45, -4(%rbp)
	jne	.L21
.L20:
	movl	-4(%rbp), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	operator
	jmp	.L16
.L21:
	movl	-4(%rbp), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	operand
	jmp	.L16
.L25:
	nop
.L16:
	jmp	.L22
.L26:
	nop
	movl	$0, %eax
	call	pop
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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
	.p2align 4
	.globl	push
	.type	push, @function
push:
.LFB39:
	.cfi_startproc
	endbr64
	movslq	sp(%rip), %rax
	leal	1(%rax), %edx
	movl	%edx, sp(%rip)
	leaq	value(%rip), %rdx
	movl	%edi, (%rdx,%rax,4)
	ret
	.cfi_endproc
.LFE39:
	.size	push, .-push
	.p2align 4
	.globl	pop
	.type	pop, @function
pop:
.LFB40:
	.cfi_startproc
	endbr64
	movl	sp(%rip), %eax
	leaq	value(%rip), %rdx
	subl	$1, %eax
	movl	%eax, sp(%rip)
	cltq
	movl	(%rdx,%rax,4), %eax
	ret
	.cfi_endproc
.LFE40:
	.size	pop, .-pop
	.p2align 4
	.globl	operand
	.type	operand, @function
operand:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movsbl	%dil, %ebx
	subl	$48, %ebx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	leal	(%rbx,%rbx,4), %edx
	leal	-48(%rax,%rdx,2), %ebx
.L5:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	cmpl	$32, %eax
	jne	.L6
	movslq	sp(%rip), %rax
	leal	1(%rax), %edx
	movl	%edx, sp(%rip)
	leaq	value(%rip), %rdx
	movl	%ebx, (%rdx,%rax,4)
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE41:
	.size	operand, .-operand
	.p2align 4
	.globl	operator
	.type	operator, @function
operator:
.LFB42:
	.cfi_startproc
	endbr64
	movl	sp(%rip), %eax
	leaq	value(%rip), %rdx
	leal	-1(%rax), %esi
	subl	$2, %eax
	movslq	%esi, %rcx
	movl	%eax, sp(%rip)
	cltq
	movl	(%rdx,%rcx,4), %r8d
	movl	(%rdx,%rax,4), %ecx
	cmpb	$43, %dil
	je	.L9
	cmpb	$45, %dil
	je	.L10
	cmpb	$42, %dil
	je	.L13
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	imull	%r8d, %ecx
	movl	%esi, sp(%rip)
	movl	%ecx, (%rdx,%rax,4)
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	subl	%r8d, %ecx
	movl	%esi, sp(%rip)
	movl	%ecx, (%rdx,%rax,4)
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	addl	%r8d, %ecx
	movl	%esi, sp(%rip)
	movl	%ecx, (%rdx,%rax,4)
	ret
	.cfi_endproc
.LFE42:
	.size	operator, .-operator
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB43:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	value(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	.p2align 4,,10
	.p2align 3
.L28:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	cmpl	$32, %eax
	je	.L28
	cmpl	$10, %eax
	je	.L28
	cmpl	$-1, %eax
	je	.L17
	cmpl	$43, %eax
	jg	.L18
	cmpl	$41, %eax
	jg	.L31
.L20:
	movsbl	%al, %eax
	leal	-48(%rax), %ebx
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L27:
	leal	(%rbx,%rbx,4), %edx
	leal	-48(%rax,%rdx,2), %ebx
.L26:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	cmpl	$32, %eax
	jne	.L27
	movslq	sp(%rip), %rax
	leal	1(%rax), %edx
	movl	%ebx, 0(%rbp,%rax,4)
	movl	%edx, sp(%rip)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	$45, %eax
	jne	.L20
	movl	sp(%rip), %edx
	leal	-1(%rdx), %ecx
	subl	$2, %edx
	movslq	%ecx, %rax
	movslq	%edx, %rdx
	movl	0(%rbp,%rax,4), %esi
	movl	0(%rbp,%rdx,4), %edi
.L23:
	subl	%esi, %edi
	movl	%ecx, sp(%rip)
	movl	%edi, 0(%rbp,%rdx,4)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L31:
	movl	sp(%rip), %edx
	leal	-1(%rdx), %ecx
	subl	$2, %edx
	movl	%edx, sp(%rip)
	movslq	%ecx, %rsi
	movslq	%edx, %rdx
	movl	0(%rbp,%rsi,4), %esi
	movl	0(%rbp,%rdx,4), %edi
	cmpb	$43, %al
	je	.L22
	cmpb	$45, %al
	je	.L23
	cmpb	$42, %al
	jne	.L28
	imull	%edi, %esi
	movl	%ecx, sp(%rip)
	movl	%esi, 0(%rbp,%rdx,4)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L22:
	addl	%edi, %esi
	movl	%ecx, sp(%rip)
	movl	%esi, 0(%rbp,%rdx,4)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L17:
	movl	sp(%rip), %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	subl	$1, %eax
	movl	%eax, sp(%rip)
	cltq
	movl	0(%rbp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE43:
	.size	main, .-main
	.globl	sp
	.bss
	.align 4
	.type	sp, @object
	.size	sp, 4
sp:
	.zero	4
	.globl	value
	.align 32
	.type	value, @object
	.size	value, 400
value:
	.zero	400
	.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
	.p2align 4
	.globl	push
	.type	push, @function
push:
.LFB39:
	.cfi_startproc
	endbr64
	movslq	sp(%rip), %rax
	leal	1(%rax), %edx
	movl	%edx, sp(%rip)
	leaq	value(%rip), %rdx
	movl	%edi, (%rdx,%rax,4)
	ret
	.cfi_endproc
.LFE39:
	.size	push, .-push
	.p2align 4
	.globl	pop
	.type	pop, @function
pop:
.LFB40:
	.cfi_startproc
	endbr64
	movl	sp(%rip), %eax
	leaq	value(%rip), %rdx
	subl	$1, %eax
	movl	%eax, sp(%rip)
	cltq
	movl	(%rdx,%rax,4), %eax
	ret
	.cfi_endproc
.LFE40:
	.size	pop, .-pop
	.p2align 4
	.globl	operand
	.type	operand, @function
operand:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movsbl	%dil, %ebx
	subl	$48, %ebx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	leal	(%rbx,%rbx,4), %edx
	leal	-48(%rax,%rdx,2), %ebx
.L5:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	cmpl	$32, %eax
	jne	.L6
	movslq	sp(%rip), %rax
	leal	1(%rax), %edx
	movl	%edx, sp(%rip)
	leaq	value(%rip), %rdx
	movl	%ebx, (%rdx,%rax,4)
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE41:
	.size	operand, .-operand
	.p2align 4
	.globl	operator
	.type	operator, @function
operator:
.LFB42:
	.cfi_startproc
	endbr64
	movl	sp(%rip), %eax
	leaq	value(%rip), %rdx
	leal	-1(%rax), %esi
	subl	$2, %eax
	movslq	%esi, %rcx
	movl	%eax, sp(%rip)
	cltq
	movl	(%rdx,%rcx,4), %r8d
	movl	(%rdx,%rax,4), %ecx
	cmpb	$43, %dil
	je	.L9
	cmpb	$45, %dil
	je	.L10
	cmpb	$42, %dil
	je	.L13
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	imull	%r8d, %ecx
	movl	%esi, sp(%rip)
	movl	%ecx, (%rdx,%rax,4)
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	subl	%r8d, %ecx
	movl	%esi, sp(%rip)
	movl	%ecx, (%rdx,%rax,4)
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	addl	%r8d, %ecx
	movl	%esi, sp(%rip)
	movl	%ecx, (%rdx,%rax,4)
	ret
	.cfi_endproc
.LFE42:
	.size	operator, .-operator
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB43:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	value(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	.p2align 4,,10
	.p2align 3
.L28:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	cmpl	$32, %eax
	je	.L28
	cmpl	$10, %eax
	je	.L28
	cmpl	$-1, %eax
	je	.L17
	cmpl	$43, %eax
	jg	.L18
	cmpl	$41, %eax
	jg	.L31
.L20:
	movsbl	%al, %eax
	leal	-48(%rax), %ebx
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L27:
	leal	(%rbx,%rbx,4), %edx
	leal	-48(%rax,%rdx,2), %ebx
.L26:
	movq	stdin(%rip), %rdi
	call	getc@PLT
	cmpl	$32, %eax
	jne	.L27
	movslq	sp(%rip), %rax
	leal	1(%rax), %edx
	movl	%ebx, 0(%rbp,%rax,4)
	movl	%edx, sp(%rip)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	$45, %eax
	jne	.L20
	movl	sp(%rip), %edx
	leal	-1(%rdx), %ecx
	subl	$2, %edx
	movslq	%ecx, %rax
	movslq	%edx, %rdx
	movl	0(%rbp,%rax,4), %esi
	movl	0(%rbp,%rdx,4), %edi
.L23:
	subl	%esi, %edi
	movl	%ecx, sp(%rip)
	movl	%edi, 0(%rbp,%rdx,4)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L31:
	movl	sp(%rip), %edx
	leal	-1(%rdx), %ecx
	subl	$2, %edx
	movl	%edx, sp(%rip)
	movslq	%ecx, %rsi
	movslq	%edx, %rdx
	movl	0(%rbp,%rsi,4), %esi
	movl	0(%rbp,%rdx,4), %edi
	cmpb	$43, %al
	je	.L22
	cmpb	$45, %al
	je	.L23
	cmpb	$42, %al
	jne	.L28
	imull	%edi, %esi
	movl	%ecx, sp(%rip)
	movl	%esi, 0(%rbp,%rdx,4)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L22:
	addl	%edi, %esi
	movl	%ecx, sp(%rip)
	movl	%esi, 0(%rbp,%rdx,4)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L17:
	movl	sp(%rip), %eax
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	subl	$1, %eax
	movl	%eax, sp(%rip)
	cltq
	movl	0(%rbp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE43:
	.size	main, .-main
	.globl	sp
	.bss
	.align 4
	.type	sp, @object
	.size	sp, 4
sp:
	.zero	4
	.globl	value
	.align 32
	.type	value, @object
	.size	value, 400
value:
	.zero	400
	.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>
#include <stdlib.h>

int value[100];
int sp = 0;

void push(const int val)
{
    value[sp++] = val;
}

int pop()
{
    return value[--sp];
}

void operand(const char operand)
{
    int ch, val = operand - '0';
    while( (ch = getchar()) != ' ' ){
        val = val * 10 + (ch - '0'); 
    }
    push(val);
}

void operator(const char operator)
{
    int tmp1 = pop(), tmp2 = pop();

    switch( operator ){
    case '+': push(tmp2 + tmp1); break;
    case '-': push(tmp2 - tmp1); break;
    case '*': push(tmp2 * tmp1); break;
    default : break;
    }
}

int main()
{
    while( 1 ){
        int ch = getchar();
        if( ch == ' ' || ch == '\n' ) continue;
        if( ch == EOF ) break;
        
        switch( ch ){
        case '+': case '-': case '*': operator(ch); break;
        default : operand(ch); break;
        }
    }

    printf("%d\n", pop());

    return 0;
}

1 4 + 3 4 - *
 1 3 +
 1 4 + 2 4 - *
 0 3 +
 1 1 + 2 4 - *
 0 3 *
 1 4 + 3 8 - *
 0 5 +
 1 1 + 3 4 - *
 1 4 * 3 1 - *

-5
 4
 -10
 3
 -4
 0
 -25
 5
 -2
 8

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

int value[100];
int sp = 0;

void push(const int val)
{
    value[sp++] = val;
}

int pop()
{
    return value[--sp];
}

void operand(const char operand)
{
    int ch, val = operand - '0';
    while( (ch = getchar()) != ' ' ){
        val = val * 10 + (ch - '0'); 
    }
    push(val);
}

void operator(const char operator)
{
    int tmp1 = pop(), tmp2 = pop();

    switch( operator ){
    case '+': push(tmp2 + tmp1); break;
    case '-': push(tmp2 - tmp1); break;
    case '*': push(tmp2 * tmp1); break;
    default : break;
    }
}

int main()
{
    while( 1 ){
        int ch = getchar();
        if( ch == ' ' || ch == '\n' ) continue;
        if( ch == EOF ) break;
        
        switch( ch ){
        case '+': case '-': case '*': operator(ch); break;
        default : operand(ch); break;
        }
    }

    printf("%d\n", pop());

    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	value
	.bss
	.align 32
	.type	value, @object
	.size	value, 400
value:
	.zero	400
	.globl	sp
	.align 4
	.type	sp, @object
	.size	sp, 4
sp:
	.zero	4
	.text
	.globl	push
	.type	push, @function
push:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	sp(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sp(%rip)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	value(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	push, .-push
	.globl	pop
	.type	pop, @function
pop:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	sp(%rip), %eax
	subl	$1, %eax
	movl	%eax, sp(%rip)
	movl	sp(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	value(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	pop, .-pop
	.globl	operand
	.type	operand, @function
operand:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, %eax
	movb	%al, -20(%rbp)
	movsbl	-20(%rbp), %eax
	subl	$48, %eax
	movl	%eax, -8(%rbp)
	jmp	.L5
.L6:
	movl	-8(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	subl	$48, %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
.L5:
	call	getchar@PLT
	movl	%eax, -4(%rbp)
	cmpl	$32, -4(%rbp)
	jne	.L6
	movl	-8(%rbp), %eax
	movl	%eax, %edi
	call	push
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	operand, .-operand
	.globl	operator
	.type	operator, @function
operator:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movl	%edi, %eax
	movb	%al, -20(%rbp)
	movl	$0, %eax
	call	pop
	movl	%eax, -8(%rbp)
	movl	$0, %eax
	call	pop
	movl	%eax, -4(%rbp)
	movsbl	-20(%rbp), %eax
	cmpl	$45, %eax
	je	.L8
	cmpl	$45, %eax
	jg	.L12
	cmpl	$42, %eax
	je	.L10
	cmpl	$43, %eax
	jne	.L12
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edi
	call	push
	jmp	.L11
.L8:
	movl	-4(%rbp), %eax
	subl	-8(%rbp), %eax
	movl	%eax, %edi
	call	push
	jmp	.L11
.L10:
	movl	-4(%rbp), %eax
	imull	-8(%rbp), %eax
	movl	%eax, %edi
	call	push
	jmp	.L11
.L12:
	nop
.L11:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	operator, .-operator
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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
.L22:
	call	getchar@PLT
	movl	%eax, -4(%rbp)
	cmpl	$32, -4(%rbp)
	je	.L25
	cmpl	$10, -4(%rbp)
	je	.L25
	cmpl	$-1, -4(%rbp)
	je	.L26
	cmpl	$43, -4(%rbp)
	jg	.L19
	cmpl	$42, -4(%rbp)
	jge	.L20
	jmp	.L21
.L19:
	cmpl	$45, -4(%rbp)
	jne	.L21
.L20:
	movl	-4(%rbp), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	operator
	jmp	.L16
.L21:
	movl	-4(%rbp), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	operand
	jmp	.L16
.L25:
	nop
.L16:
	jmp	.L22
.L26:
	nop
	movl	$0, %eax
	call	pop
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	value
	.bss
	.align 32
	.type	value, @object
	.size	value, 400
value:
	.zero	400
	.globl	sp
	.align 4
	.type	sp, @object
	.size	sp, 4
sp:
	.zero	4
	.text
	.globl	push
	.type	push, @function
push:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	sp(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sp(%rip)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	value(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	push, .-push
	.globl	pop
	.type	pop, @function
pop:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	sp(%rip), %eax
	subl	$1, %eax
	movl	%eax, sp(%rip)
	movl	sp(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	value(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	pop, .-pop
	.globl	operand
	.type	operand, @function
operand:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, %eax
	movb	%al, -20(%rbp)
	movsbl	-20(%rbp), %eax
	subl	$48, %eax
	movl	%eax, -8(%rbp)
	jmp	.L5
.L6:
	movl	-8(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	subl	$48, %eax
	addl	%edx, %eax
	movl	%eax, -8(%rbp)
.L5:
	call	getchar@PLT
	movl	%eax, -4(%rbp)
	cmpl	$32, -4(%rbp)
	jne	.L6
	movl	-8(%rbp), %eax
	movl	%eax, %edi
	call	push
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	operand, .-operand
	.globl	operator
	.type	operator, @function
operator:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movl	%edi, %eax
	movb	%al, -20(%rbp)
	movl	$0, %eax
	call	pop
	movl	%eax, -8(%rbp)
	movl	$0, %eax
	call	pop
	movl	%eax, -4(%rbp)
	movsbl	-20(%rbp), %eax
	cmpl	$45, %eax
	je	.L8
	cmpl	$45, %eax
	jg	.L12
	cmpl	$42, %eax
	je	.L10
	cmpl	$43, %eax
	jne	.L12
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edi
	call	push
	jmp	.L11
.L8:
	movl	-4(%rbp), %eax
	subl	-8(%rbp), %eax
	movl	%eax, %edi
	call	push
	jmp	.L11
.L10:
	movl	-4(%rbp), %eax
	imull	-8(%rbp), %eax
	movl	%eax, %edi
	call	push
	jmp	.L11
.L12:
	nop
.L11:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	operator, .-operator
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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
.L22:
	call	getchar@PLT
	movl	%eax, -4(%rbp)
	cmpl	$32, -4(%rbp)
	je	.L25
	cmpl	$10, -4(%rbp)
	je	.L25
	cmpl	$-1, -4(%rbp)
	je	.L26
	cmpl	$43, -4(%rbp)
	jg	.L19
	cmpl	$42, -4(%rbp)
	jge	.L20
	jmp	.L21
.L19:
	cmpl	$45, -4(%rbp)
	jne	.L21
.L20:
	movl	-4(%rbp), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	operator
	jmp	.L16
.L21:
	movl	-4(%rbp), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	operand
	jmp	.L16
.L25:
	nop
.L16:
	jmp	.L22
.L26:
	nop
	movl	$0, %eax
	call	pop
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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:
