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

```c
#include <strings.h>
#include <stdio.h>
#include <ctype.h>

char str[101];
int tindex=0;
int map[255];
int token;

int addminus();

void getToken(void) {
    int r = 0;
    if (isdigit(str[tindex])) {
	while (isdigit(str[tindex])) {
	    r = r*10+(str[tindex++]-'0');
	}
	token = r;
    } else {
	token = map[(int)str[tindex++]];
    }
}

int terminal() {
    int result = 0;
    if (token == -5) {
	getToken();
	result = addminus();
	getToken();
    } else if (token >= 0) {
	result = token;
	getToken();
    }
    return result;
}

int multidiv() {
    int result = terminal();
    while (token == -3 || token == -4) {
	if (token == -3) {
	    getToken();
	    result *= terminal();
	} else {
	    getToken();
	    result /= terminal();
	}
    }
    return result;
}
 
int addminus() {
    int result = multidiv();
    while (token == -1 || token == -2) {
	if (token == -1) {
	    getToken();
	    result += multidiv();
	} else {
	    getToken();
	    result -= multidiv();
	}
    }
    return result;
}
 
int main(void) {
    int i, n, total;

    map['+'] = -1;
    map['-'] = -2;
    map['*'] = -3;
    map['/'] = -4;
    map['('] = -5;
    map[')'] = -6;
    map['='] = -7;

    scanf("%d", &n);
    for (i = 0; i < n; i++) {
	tindex=0;
	scanf("%s", str);
	getToken();
	total=addminus();
	printf("%d\n", total);
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	str
	.bss
	.align 32
	.type	str, @object
	.size	str, 101
str:
	.zero	101
	.globl	tindex
	.align 4
	.type	tindex, @object
	.size	tindex, 4
tindex:
	.zero	4
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 1020
map:
	.zero	1020
	.globl	token
	.align 4
	.type	token, @object
	.size	token, 4
token:
	.zero	4
	.text
	.globl	getToken
	.type	getToken, @function
getToken:
.LFB0:
	.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
	movl	$0, -4(%rbp)
	call	__ctype_b_loc@PLT
	movq	(%rax), %rcx
	movl	tindex(%rip), %eax
	cltq
	leaq	str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	je	.L2
	jmp	.L3
.L4:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movl	tindex(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, tindex(%rip)
	cltq
	leaq	str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%ecx, %eax
	movl	%eax, -4(%rbp)
.L3:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rcx
	movl	tindex(%rip), %eax
	cltq
	leaq	str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	jne	.L4
	movl	-4(%rbp), %eax
	movl	%eax, token(%rip)
	jmp	.L6
.L2:
	movl	tindex(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, tindex(%rip)
	cltq
	leaq	str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	map(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, token(%rip)
.L6:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	getToken, .-getToken
	.globl	terminal
	.type	terminal, @function
terminal:
.LFB1:
	.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
	movl	$0, -4(%rbp)
	movl	token(%rip), %eax
	cmpl	$-5, %eax
	jne	.L8
	call	getToken
	movl	$0, %eax
	call	addminus
	movl	%eax, -4(%rbp)
	call	getToken
	jmp	.L9
.L8:
	movl	token(%rip), %eax
	testl	%eax, %eax
	js	.L9
	movl	token(%rip), %eax
	movl	%eax, -4(%rbp)
	call	getToken
.L9:
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	terminal, .-terminal
	.globl	multidiv
	.type	multidiv, @function
multidiv:
.LFB2:
	.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
	movl	$0, %eax
	call	terminal
	movl	%eax, -4(%rbp)
	jmp	.L12
.L14:
	movl	token(%rip), %eax
	cmpl	$-3, %eax
	jne	.L13
	call	getToken
	movl	$0, %eax
	call	terminal
	movl	-4(%rbp), %edx
	imull	%edx, %eax
	movl	%eax, -4(%rbp)
	jmp	.L12
.L13:
	call	getToken
	movl	$0, %eax
	call	terminal
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%eax, -4(%rbp)
.L12:
	movl	token(%rip), %eax
	cmpl	$-3, %eax
	je	.L14
	movl	token(%rip), %eax
	cmpl	$-4, %eax
	je	.L14
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	multidiv, .-multidiv
	.globl	addminus
	.type	addminus, @function
addminus:
.LFB3:
	.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
	movl	$0, %eax
	call	multidiv
	movl	%eax, -4(%rbp)
	jmp	.L17
.L19:
	movl	token(%rip), %eax
	cmpl	$-1, %eax
	jne	.L18
	call	getToken
	movl	$0, %eax
	call	multidiv
	addl	%eax, -4(%rbp)
	jmp	.L17
.L18:
	call	getToken
	movl	$0, %eax
	call	multidiv
	subl	%eax, -4(%rbp)
.L17:
	movl	token(%rip), %eax
	cmpl	$-1, %eax
	je	.L19
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	je	.L19
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	addminus, .-addminus
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$-1, 172+map(%rip)
	movl	$-2, 180+map(%rip)
	movl	$-3, 168+map(%rip)
	movl	$-4, 188+map(%rip)
	movl	$-5, 160+map(%rip)
	movl	$-6, 164+map(%rip)
	movl	$-7, 244+map(%rip)
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L22
.L23:
	movl	$0, tindex(%rip)
	leaq	str(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	call	getToken
	movl	$0, %eax
	call	addminus
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -16(%rbp)
.L22:
	movl	-20(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L23
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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	getToken
	.type	getToken, @function
getToken:
.LFB27:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	__ctype_b_loc@PLT
	leaq	str(%rip), %r8
	movq	(%rax), %rdi
	movslq	tindex(%rip), %rax
	movsbq	(%r8,%rax), %rcx
	movq	%rax, %rdx
	addl	$1, %edx
	movq	%rcx, %rax
	testb	$8, 1(%rdi,%rcx,2)
	je	.L2
	movslq	%edx, %rdx
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L3:
	leal	(%rcx,%rcx,4), %ecx
	movl	%edx, %r9d
	leal	-48(%rax,%rcx,2), %ecx
	movsbl	(%r8,%rdx), %eax
	addq	$1, %rdx
	movsbq	%al, %rsi
	testb	$8, 1(%rdi,%rsi,2)
	jne	.L3
	movl	%r9d, tindex(%rip)
	movl	%ecx, token(%rip)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	movl	%edx, tindex(%rip)
	leaq	map(%rip), %rdx
	movl	(%rdx,%rcx,4), %ecx
	movl	%ecx, token(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE27:
	.size	getToken, .-getToken
	.section	.text.unlikely,"ax",@progbits
.LCOLDB0:
	.text
.LHOTB0:
	.p2align 4
	.globl	multidiv
	.type	multidiv, @function
multidiv:
.LFB29:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	movl	token(%rip), %ebx
	cmpl	$-5, %ebx
	je	.L40
	xorl	%r12d, %r12d
	testl	%ebx, %ebx
	jns	.L41
	.p2align 4,,10
	.p2align 3
.L24:
	leal	4(%rbx), %eax
	cmpl	$1, %eax
	ja	.L42
.L14:
	cmpl	$-3, %ebx
	je	.L43
	call	getToken
	movl	token(%rip), %ebx
	cmpl	$-5, %ebx
	je	.L44
	testl	%ebx, %ebx
	js	.L31
.L37:
	call	getToken
	movl	%r12d, %eax
	cltd
	idivl	%ebx
	movl	token(%rip), %ebx
	movl	%eax, %r12d
	leal	4(%rbx), %eax
	cmpl	$1, %eax
	jbe	.L14
.L42:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movl	%r12d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L43:
	.cfi_restore_state
	call	getToken
	movl	token(%rip), %ebx
	cmpl	$-5, %ebx
	je	.L45
	testl	%ebx, %ebx
	jns	.L38
	xorl	%r12d, %r12d
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L47:
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	addl	%eax, %ebx
	movl	token(%rip), %eax
	leal	2(%rax), %edx
	cmpl	$1, %edx
	jbe	.L22
.L38:
	call	getToken
	imull	%ebx, %r12d
	movl	token(%rip), %ebx
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L44:
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	movl	%eax, %ebx
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jb	.L37
	.p2align 4,,10
	.p2align 3
.L29:
	cmpl	$-1, %eax
	je	.L46
.L27:
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	subl	%eax, %ebx
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jb	.L37
	cmpl	$-1, %eax
	jne	.L27
	.p2align 4,,10
	.p2align 3
.L46:
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	addl	%eax, %ebx
	movl	token(%rip), %eax
	leal	2(%rax), %edx
	cmpl	$1, %edx
	jbe	.L29
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L45:
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	movl	%eax, %ebx
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jb	.L38
	.p2align 4,,10
	.p2align 3
.L22:
	cmpl	$-1, %eax
	je	.L47
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	subl	%eax, %ebx
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jnb	.L22
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L41:
	call	getToken
	movl	%ebx, %r12d
	movl	token(%rip), %ebx
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L40:
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	movl	%eax, %r12d
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jb	.L10
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	$-1, %eax
	je	.L48
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	subl	%eax, %r12d
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jnb	.L13
.L10:
	call	getToken
	movl	token(%rip), %ebx
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L48:
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	addl	%eax, %r12d
	movl	token(%rip), %eax
	leal	2(%rax), %edx
	cmpl	$1, %edx
	jbe	.L13
	jmp	.L10
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	multidiv.cold, @function
multidiv.cold:
.LFSB29:
.L31:
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -24
	.cfi_offset 12, -16
	ud2
	.cfi_endproc
.LFE29:
	.text
	.size	multidiv, .-multidiv
	.section	.text.unlikely
	.size	multidiv.cold, .-multidiv.cold
.LCOLDE0:
	.text
.LHOTE0:
	.p2align 4
	.globl	terminal
	.type	terminal, @function
terminal:
.LFB28:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	token(%rip), %r12d
	cmpl	$-5, %r12d
	je	.L59
	testl	%r12d, %r12d
	jns	.L58
	xorl	%r12d, %r12d
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L60:
	.cfi_restore_state
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	addl	%eax, %r12d
	movl	token(%rip), %eax
	leal	2(%rax), %edx
	cmpl	$1, %edx
	ja	.L58
.L54:
	cmpl	$-1, %eax
	je	.L60
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	subl	%eax, %r12d
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jnb	.L54
.L58:
	call	getToken
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L59:
	.cfi_restore_state
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	movl	%eax, %r12d
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jnb	.L54
	jmp	.L58
	.cfi_endproc
.LFE28:
	.size	terminal, .-terminal
	.p2align 4
	.globl	addminus
	.type	addminus, @function
addminus:
.LFB30:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xorl	%eax, %eax
	call	multidiv
	movl	%eax, %r12d
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jb	.L61
	.p2align 4,,10
	.p2align 3
.L65:
	cmpl	$-1, %eax
	je	.L67
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	subl	%eax, %r12d
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jnb	.L65
.L61:
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L67:
	.cfi_restore_state
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	addl	%eax, %r12d
	movl	token(%rip), %eax
	leal	2(%rax), %edx
	cmpl	$1, %edx
	jbe	.L65
	movl	%r12d, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE30:
	.size	addminus, .-addminus
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"%d"
.LC3:
	.string	"%s"
.LC4:
	.string	"%d\n"
	.section	.text.unlikely
.LCOLDB5:
	.section	.text.startup,"ax",@progbits
.LHOTB5:
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB31:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC2(%rip), %rdi
	leaq	str(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC3(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movdqa	.LC1(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	movl	$-2, 180+map(%rip)
	movl	$-4, 188+map(%rip)
	movl	$-7, 244+map(%rip)
	movaps	%xmm0, 160+map(%rip)
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L85
	.p2align 4,,10
	.p2align 3
.L69:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	movl	$0, tindex(%rip)
	call	__isoc99_scanf@PLT
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	movl	token(%rip), %ebp
	movl	%eax, %r12d
	cmpl	$-2, %ebp
	jb	.L70
	.p2align 4,,10
	.p2align 3
.L84:
	cmpl	$-1, %ebp
	je	.L98
	call	getToken
	movl	token(%rip), %ebp
	cmpl	$-5, %ebp
	je	.L99
	xorl	%ebx, %ebx
	testl	%ebp, %ebp
	js	.L80
	call	getToken
	movl	%ebp, %ebx
	movl	token(%rip), %ebp
	.p2align 4,,10
	.p2align 3
.L80:
	leal	4(%rbp), %eax
	cmpl	$1, %eax
	ja	.L100
.L74:
	cmpl	$-3, %ebp
	je	.L101
	call	getToken
	movl	token(%rip), %ebp
	cmpl	$-5, %ebp
	je	.L102
	testl	%ebp, %ebp
	js	.L83
	call	getToken
.L82:
	movl	%ebx, %eax
	cltd
	idivl	%ebp
	movl	token(%rip), %ebp
	movl	%eax, %ebx
	leal	4(%rbp), %eax
	cmpl	$1, %eax
	jbe	.L74
.L100:
	subl	%ebx, %r12d
.L72:
	leal	2(%rbp), %eax
	cmpl	$1, %eax
	jbe	.L84
.L70:
	movl	%r12d, %edx
	leaq	.LC4(%rip), %rsi
	xorl	%eax, %eax
	addl	$1, %r13d
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	%r13d, 4(%rsp)
	jg	.L69
.L85:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L103
	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
.L101:
	.cfi_restore_state
	call	getToken
	movl	token(%rip), %ebp
	cmpl	$-5, %ebp
	je	.L104
	testl	%ebp, %ebp
	jns	.L105
	xorl	%ebx, %ebx
	jmp	.L80
	.p2align 4,,10
	.p2align 3
.L102:
	call	getToken
	xorl	%eax, %eax
	call	addminus
	movl	%eax, %ebp
	call	getToken
	jmp	.L82
	.p2align 4,,10
	.p2align 3
.L105:
	call	getToken
	imull	%ebp, %ebx
	movl	token(%rip), %ebp
	jmp	.L80
	.p2align 4,,10
	.p2align 3
.L104:
	call	getToken
	xorl	%eax, %eax
	call	addminus
	movl	%eax, %ebp
	call	getToken
	imull	%ebp, %ebx
	movl	token(%rip), %ebp
	jmp	.L80
	.p2align 4,,10
	.p2align 3
.L98:
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	movl	token(%rip), %ebp
	addl	%eax, %r12d
	jmp	.L72
	.p2align 4,,10
	.p2align 3
.L99:
	call	getToken
	xorl	%eax, %eax
	call	addminus
	movl	%eax, %ebx
	call	getToken
	movl	token(%rip), %ebp
	jmp	.L80
.L103:
	call	__stack_chk_fail@PLT
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB31:
.L83:
	.cfi_def_cfa_offset 80
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	ud2
	.cfi_endproc
.LFE31:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE5:
	.section	.text.startup
.LHOTE5:
	.globl	token
	.bss
	.align 4
	.type	token, @object
	.size	token, 4
token:
	.zero	4
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 1020
map:
	.zero	1020
	.globl	tindex
	.align 4
	.type	tindex, @object
	.size	tindex, 4
tindex:
	.zero	4
	.globl	str
	.align 32
	.type	str, @object
	.size	str, 101
str:
	.zero	101
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	-5
	.long	-6
	.long	-3
	.long	-1
	.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	getToken
	.type	getToken, @function
getToken:
.LFB27:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	__ctype_b_loc@PLT
	leaq	str(%rip), %r8
	movq	(%rax), %rdi
	movslq	tindex(%rip), %rax
	movsbq	(%r8,%rax), %rcx
	movq	%rax, %rdx
	addl	$1, %edx
	movq	%rcx, %rax
	testb	$8, 1(%rdi,%rcx,2)
	je	.L2
	movslq	%edx, %rdx
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L3:
	leal	(%rcx,%rcx,4), %ecx
	movl	%edx, %r9d
	leal	-48(%rax,%rcx,2), %ecx
	movsbl	(%r8,%rdx), %eax
	addq	$1, %rdx
	movsbq	%al, %rsi
	testb	$8, 1(%rdi,%rsi,2)
	jne	.L3
	movl	%r9d, tindex(%rip)
	movl	%ecx, token(%rip)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	movl	%edx, tindex(%rip)
	leaq	map(%rip), %rdx
	movl	(%rdx,%rcx,4), %ecx
	movl	%ecx, token(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE27:
	.size	getToken, .-getToken
	.section	.text.unlikely,"ax",@progbits
.LCOLDB0:
	.text
.LHOTB0:
	.p2align 4
	.globl	multidiv
	.type	multidiv, @function
multidiv:
.LFB29:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	movl	token(%rip), %ebx
	cmpl	$-5, %ebx
	je	.L40
	xorl	%r12d, %r12d
	testl	%ebx, %ebx
	jns	.L41
	.p2align 4,,10
	.p2align 3
.L24:
	leal	4(%rbx), %eax
	cmpl	$1, %eax
	ja	.L42
.L14:
	cmpl	$-3, %ebx
	je	.L43
	call	getToken
	movl	token(%rip), %ebx
	cmpl	$-5, %ebx
	je	.L44
	testl	%ebx, %ebx
	js	.L31
.L37:
	call	getToken
	movl	%r12d, %eax
	cltd
	idivl	%ebx
	movl	token(%rip), %ebx
	movl	%eax, %r12d
	leal	4(%rbx), %eax
	cmpl	$1, %eax
	jbe	.L14
.L42:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movl	%r12d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L43:
	.cfi_restore_state
	call	getToken
	movl	token(%rip), %ebx
	cmpl	$-5, %ebx
	je	.L45
	testl	%ebx, %ebx
	jns	.L38
	xorl	%r12d, %r12d
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L47:
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	addl	%eax, %ebx
	movl	token(%rip), %eax
	leal	2(%rax), %edx
	cmpl	$1, %edx
	jbe	.L22
.L38:
	call	getToken
	imull	%ebx, %r12d
	movl	token(%rip), %ebx
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L44:
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	movl	%eax, %ebx
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jb	.L37
	.p2align 4,,10
	.p2align 3
.L29:
	cmpl	$-1, %eax
	je	.L46
.L27:
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	subl	%eax, %ebx
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jb	.L37
	cmpl	$-1, %eax
	jne	.L27
	.p2align 4,,10
	.p2align 3
.L46:
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	addl	%eax, %ebx
	movl	token(%rip), %eax
	leal	2(%rax), %edx
	cmpl	$1, %edx
	jbe	.L29
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L45:
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	movl	%eax, %ebx
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jb	.L38
	.p2align 4,,10
	.p2align 3
.L22:
	cmpl	$-1, %eax
	je	.L47
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	subl	%eax, %ebx
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jnb	.L22
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L41:
	call	getToken
	movl	%ebx, %r12d
	movl	token(%rip), %ebx
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L40:
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	movl	%eax, %r12d
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jb	.L10
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	$-1, %eax
	je	.L48
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	subl	%eax, %r12d
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jnb	.L13
.L10:
	call	getToken
	movl	token(%rip), %ebx
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L48:
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	addl	%eax, %r12d
	movl	token(%rip), %eax
	leal	2(%rax), %edx
	cmpl	$1, %edx
	jbe	.L13
	jmp	.L10
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	multidiv.cold, @function
multidiv.cold:
.LFSB29:
.L31:
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -24
	.cfi_offset 12, -16
	ud2
	.cfi_endproc
.LFE29:
	.text
	.size	multidiv, .-multidiv
	.section	.text.unlikely
	.size	multidiv.cold, .-multidiv.cold
.LCOLDE0:
	.text
.LHOTE0:
	.p2align 4
	.globl	terminal
	.type	terminal, @function
terminal:
.LFB28:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	token(%rip), %r12d
	cmpl	$-5, %r12d
	je	.L59
	testl	%r12d, %r12d
	jns	.L58
	xorl	%r12d, %r12d
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L60:
	.cfi_restore_state
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	addl	%eax, %r12d
	movl	token(%rip), %eax
	leal	2(%rax), %edx
	cmpl	$1, %edx
	ja	.L58
.L54:
	cmpl	$-1, %eax
	je	.L60
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	subl	%eax, %r12d
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jnb	.L54
.L58:
	call	getToken
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L59:
	.cfi_restore_state
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	movl	%eax, %r12d
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jnb	.L54
	jmp	.L58
	.cfi_endproc
.LFE28:
	.size	terminal, .-terminal
	.p2align 4
	.globl	addminus
	.type	addminus, @function
addminus:
.LFB30:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xorl	%eax, %eax
	call	multidiv
	movl	%eax, %r12d
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jb	.L61
	.p2align 4,,10
	.p2align 3
.L65:
	cmpl	$-1, %eax
	je	.L67
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	subl	%eax, %r12d
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	jnb	.L65
.L61:
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L67:
	.cfi_restore_state
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	addl	%eax, %r12d
	movl	token(%rip), %eax
	leal	2(%rax), %edx
	cmpl	$1, %edx
	jbe	.L65
	movl	%r12d, %eax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE30:
	.size	addminus, .-addminus
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"%d"
.LC3:
	.string	"%s"
.LC4:
	.string	"%d\n"
	.section	.text.unlikely
.LCOLDB5:
	.section	.text.startup,"ax",@progbits
.LHOTB5:
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB31:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC2(%rip), %rdi
	leaq	str(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC3(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movdqa	.LC1(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	movl	$-2, 180+map(%rip)
	movl	$-4, 188+map(%rip)
	movl	$-7, 244+map(%rip)
	movaps	%xmm0, 160+map(%rip)
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L85
	.p2align 4,,10
	.p2align 3
.L69:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	movl	$0, tindex(%rip)
	call	__isoc99_scanf@PLT
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	movl	token(%rip), %ebp
	movl	%eax, %r12d
	cmpl	$-2, %ebp
	jb	.L70
	.p2align 4,,10
	.p2align 3
.L84:
	cmpl	$-1, %ebp
	je	.L98
	call	getToken
	movl	token(%rip), %ebp
	cmpl	$-5, %ebp
	je	.L99
	xorl	%ebx, %ebx
	testl	%ebp, %ebp
	js	.L80
	call	getToken
	movl	%ebp, %ebx
	movl	token(%rip), %ebp
	.p2align 4,,10
	.p2align 3
.L80:
	leal	4(%rbp), %eax
	cmpl	$1, %eax
	ja	.L100
.L74:
	cmpl	$-3, %ebp
	je	.L101
	call	getToken
	movl	token(%rip), %ebp
	cmpl	$-5, %ebp
	je	.L102
	testl	%ebp, %ebp
	js	.L83
	call	getToken
.L82:
	movl	%ebx, %eax
	cltd
	idivl	%ebp
	movl	token(%rip), %ebp
	movl	%eax, %ebx
	leal	4(%rbp), %eax
	cmpl	$1, %eax
	jbe	.L74
.L100:
	subl	%ebx, %r12d
.L72:
	leal	2(%rbp), %eax
	cmpl	$1, %eax
	jbe	.L84
.L70:
	movl	%r12d, %edx
	leaq	.LC4(%rip), %rsi
	xorl	%eax, %eax
	addl	$1, %r13d
	movl	$1, %edi
	call	__printf_chk@PLT
	cmpl	%r13d, 4(%rsp)
	jg	.L69
.L85:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L103
	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
.L101:
	.cfi_restore_state
	call	getToken
	movl	token(%rip), %ebp
	cmpl	$-5, %ebp
	je	.L104
	testl	%ebp, %ebp
	jns	.L105
	xorl	%ebx, %ebx
	jmp	.L80
	.p2align 4,,10
	.p2align 3
.L102:
	call	getToken
	xorl	%eax, %eax
	call	addminus
	movl	%eax, %ebp
	call	getToken
	jmp	.L82
	.p2align 4,,10
	.p2align 3
.L105:
	call	getToken
	imull	%ebp, %ebx
	movl	token(%rip), %ebp
	jmp	.L80
	.p2align 4,,10
	.p2align 3
.L104:
	call	getToken
	xorl	%eax, %eax
	call	addminus
	movl	%eax, %ebp
	call	getToken
	imull	%ebp, %ebx
	movl	token(%rip), %ebp
	jmp	.L80
	.p2align 4,,10
	.p2align 3
.L98:
	call	getToken
	xorl	%eax, %eax
	call	multidiv
	movl	token(%rip), %ebp
	addl	%eax, %r12d
	jmp	.L72
	.p2align 4,,10
	.p2align 3
.L99:
	call	getToken
	xorl	%eax, %eax
	call	addminus
	movl	%eax, %ebx
	call	getToken
	movl	token(%rip), %ebp
	jmp	.L80
.L103:
	call	__stack_chk_fail@PLT
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB31:
.L83:
	.cfi_def_cfa_offset 80
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	ud2
	.cfi_endproc
.LFE31:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE5:
	.section	.text.startup
.LHOTE5:
	.globl	token
	.bss
	.align 4
	.type	token, @object
	.size	token, 4
token:
	.zero	4
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 1020
map:
	.zero	1020
	.globl	tindex
	.align 4
	.type	tindex, @object
	.size	tindex, 4
tindex:
	.zero	4
	.globl	str
	.align 32
	.type	str, @object
	.size	str, 101
str:
	.zero	101
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	-5
	.long	-6
	.long	-3
	.long	-1
	.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 <strings.h>
#include <stdio.h>
#include <ctype.h>

char str[101];
int tindex=0;
int map[255];
int token;

int addminus();

void getToken(void) {
    int r = 0;
    if (isdigit(str[tindex])) {
	while (isdigit(str[tindex])) {
	    r = r*10+(str[tindex++]-'0');
	}
	token = r;
    } else {
	token = map[(int)str[tindex++]];
    }
}

int terminal() {
    int result = 0;
    if (token == -5) {
	getToken();
	result = addminus();
	getToken();
    } else if (token >= 0) {
	result = token;
	getToken();
    }
    return result;
}

int multidiv() {
    int result = terminal();
    while (token == -3 || token == -4) {
	if (token == -3) {
	    getToken();
	    result *= terminal();
	} else {
	    getToken();
	    result /= terminal();
	}
    }
    return result;
}
 
int addminus() {
    int result = multidiv();
    while (token == -1 || token == -2) {
	if (token == -1) {
	    getToken();
	    result += multidiv();
	} else {
	    getToken();
	    result -= multidiv();
	}
    }
    return result;
}
 
int main(void) {
    int i, n, total;

    map['+'] = -1;
    map['-'] = -2;
    map['*'] = -3;
    map['/'] = -4;
    map['('] = -5;
    map[')'] = -6;
    map['='] = -7;

    scanf("%d", &n);
    for (i = 0; i < n; i++) {
	tindex=0;
	scanf("%s", str);
	getToken();
	total=addminus();
	printf("%d\n", total);
    }
    return 0;
}
2
4-2*3=
8*(4+4+3)=
 2
4-2*3=
8*(4+4+2)=
 2
4-3*3=
4*(8+4+3)=
 2
4-1*3=
4*(8+4+3)=
 2
4-1+3=
4*(8+4+3)=
 2
4-2+3=
4*(8+4+3)=
 2
5-1+3=
4*(8+4+3)=
 2
3-1*3=
4*(8+4+3)=
 2
4-2+3=
4+(8+4*3)=
 2
4-2*3=
4+(8+4*3)=

-2
88
 -2
80
 -5
60
 1
60
 6
60
 5
60
 7
60
 0
60
 5
24
 -2
24

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

```c
#include <strings.h>
#include <stdio.h>
#include <ctype.h>

char str[101];
int tindex=0;
int map[255];
int token;

int addminus();

void getToken(void) {
    int r = 0;
    if (isdigit(str[tindex])) {
	while (isdigit(str[tindex])) {
	    r = r*10+(str[tindex++]-'0');
	}
	token = r;
    } else {
	token = map[(int)str[tindex++]];
    }
}

int terminal() {
    int result = 0;
    if (token == -5) {
	getToken();
	result = addminus();
	getToken();
    } else if (token >= 0) {
	result = token;
	getToken();
    }
    return result;
}

int multidiv() {
    int result = terminal();
    while (token == -3 || token == -4) {
	if (token == -3) {
	    getToken();
	    result *= terminal();
	} else {
	    getToken();
	    result /= terminal();
	}
    }
    return result;
}
 
int addminus() {
    int result = multidiv();
    while (token == -1 || token == -2) {
	if (token == -1) {
	    getToken();
	    result += multidiv();
	} else {
	    getToken();
	    result -= multidiv();
	}
    }
    return result;
}
 
int main(void) {
    int i, n, total;

    map['+'] = -1;
    map['-'] = -2;
    map['*'] = -3;
    map['/'] = -4;
    map['('] = -5;
    map[')'] = -6;
    map['='] = -7;

    scanf("%d", &n);
    for (i = 0; i < n; i++) {
	tindex=0;
	scanf("%s", str);
	getToken();
	total=addminus();
	printf("%d\n", total);
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	str
	.bss
	.align 32
	.type	str, @object
	.size	str, 101
str:
	.zero	101
	.globl	tindex
	.align 4
	.type	tindex, @object
	.size	tindex, 4
tindex:
	.zero	4
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 1020
map:
	.zero	1020
	.globl	token
	.align 4
	.type	token, @object
	.size	token, 4
token:
	.zero	4
	.text
	.globl	getToken
	.type	getToken, @function
getToken:
.LFB0:
	.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
	movl	$0, -4(%rbp)
	call	__ctype_b_loc@PLT
	movq	(%rax), %rcx
	movl	tindex(%rip), %eax
	cltq
	leaq	str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	je	.L2
	jmp	.L3
.L4:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movl	tindex(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, tindex(%rip)
	cltq
	leaq	str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%ecx, %eax
	movl	%eax, -4(%rbp)
.L3:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rcx
	movl	tindex(%rip), %eax
	cltq
	leaq	str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	jne	.L4
	movl	-4(%rbp), %eax
	movl	%eax, token(%rip)
	jmp	.L6
.L2:
	movl	tindex(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, tindex(%rip)
	cltq
	leaq	str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	map(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, token(%rip)
.L6:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	getToken, .-getToken
	.globl	terminal
	.type	terminal, @function
terminal:
.LFB1:
	.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
	movl	$0, -4(%rbp)
	movl	token(%rip), %eax
	cmpl	$-5, %eax
	jne	.L8
	call	getToken
	movl	$0, %eax
	call	addminus
	movl	%eax, -4(%rbp)
	call	getToken
	jmp	.L9
.L8:
	movl	token(%rip), %eax
	testl	%eax, %eax
	js	.L9
	movl	token(%rip), %eax
	movl	%eax, -4(%rbp)
	call	getToken
.L9:
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	terminal, .-terminal
	.globl	multidiv
	.type	multidiv, @function
multidiv:
.LFB2:
	.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
	movl	$0, %eax
	call	terminal
	movl	%eax, -4(%rbp)
	jmp	.L12
.L14:
	movl	token(%rip), %eax
	cmpl	$-3, %eax
	jne	.L13
	call	getToken
	movl	$0, %eax
	call	terminal
	movl	-4(%rbp), %edx
	imull	%edx, %eax
	movl	%eax, -4(%rbp)
	jmp	.L12
.L13:
	call	getToken
	movl	$0, %eax
	call	terminal
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%eax, -4(%rbp)
.L12:
	movl	token(%rip), %eax
	cmpl	$-3, %eax
	je	.L14
	movl	token(%rip), %eax
	cmpl	$-4, %eax
	je	.L14
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	multidiv, .-multidiv
	.globl	addminus
	.type	addminus, @function
addminus:
.LFB3:
	.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
	movl	$0, %eax
	call	multidiv
	movl	%eax, -4(%rbp)
	jmp	.L17
.L19:
	movl	token(%rip), %eax
	cmpl	$-1, %eax
	jne	.L18
	call	getToken
	movl	$0, %eax
	call	multidiv
	addl	%eax, -4(%rbp)
	jmp	.L17
.L18:
	call	getToken
	movl	$0, %eax
	call	multidiv
	subl	%eax, -4(%rbp)
.L17:
	movl	token(%rip), %eax
	cmpl	$-1, %eax
	je	.L19
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	je	.L19
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	addminus, .-addminus
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$-1, 172+map(%rip)
	movl	$-2, 180+map(%rip)
	movl	$-3, 168+map(%rip)
	movl	$-4, 188+map(%rip)
	movl	$-5, 160+map(%rip)
	movl	$-6, 164+map(%rip)
	movl	$-7, 244+map(%rip)
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L22
.L23:
	movl	$0, tindex(%rip)
	leaq	str(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	call	getToken
	movl	$0, %eax
	call	addminus
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -16(%rbp)
.L22:
	movl	-20(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L23
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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	str
	.bss
	.align 32
	.type	str, @object
	.size	str, 101
str:
	.zero	101
	.globl	tindex
	.align 4
	.type	tindex, @object
	.size	tindex, 4
tindex:
	.zero	4
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 1020
map:
	.zero	1020
	.globl	token
	.align 4
	.type	token, @object
	.size	token, 4
token:
	.zero	4
	.text
	.globl	getToken
	.type	getToken, @function
getToken:
.LFB0:
	.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
	movl	$0, -4(%rbp)
	call	__ctype_b_loc@PLT
	movq	(%rax), %rcx
	movl	tindex(%rip), %eax
	cltq
	leaq	str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	je	.L2
	jmp	.L3
.L4:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movl	tindex(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, tindex(%rip)
	cltq
	leaq	str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%ecx, %eax
	movl	%eax, -4(%rbp)
.L3:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rcx
	movl	tindex(%rip), %eax
	cltq
	leaq	str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	jne	.L4
	movl	-4(%rbp), %eax
	movl	%eax, token(%rip)
	jmp	.L6
.L2:
	movl	tindex(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, tindex(%rip)
	cltq
	leaq	str(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	map(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, token(%rip)
.L6:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	getToken, .-getToken
	.globl	terminal
	.type	terminal, @function
terminal:
.LFB1:
	.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
	movl	$0, -4(%rbp)
	movl	token(%rip), %eax
	cmpl	$-5, %eax
	jne	.L8
	call	getToken
	movl	$0, %eax
	call	addminus
	movl	%eax, -4(%rbp)
	call	getToken
	jmp	.L9
.L8:
	movl	token(%rip), %eax
	testl	%eax, %eax
	js	.L9
	movl	token(%rip), %eax
	movl	%eax, -4(%rbp)
	call	getToken
.L9:
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	terminal, .-terminal
	.globl	multidiv
	.type	multidiv, @function
multidiv:
.LFB2:
	.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
	movl	$0, %eax
	call	terminal
	movl	%eax, -4(%rbp)
	jmp	.L12
.L14:
	movl	token(%rip), %eax
	cmpl	$-3, %eax
	jne	.L13
	call	getToken
	movl	$0, %eax
	call	terminal
	movl	-4(%rbp), %edx
	imull	%edx, %eax
	movl	%eax, -4(%rbp)
	jmp	.L12
.L13:
	call	getToken
	movl	$0, %eax
	call	terminal
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%eax, -4(%rbp)
.L12:
	movl	token(%rip), %eax
	cmpl	$-3, %eax
	je	.L14
	movl	token(%rip), %eax
	cmpl	$-4, %eax
	je	.L14
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	multidiv, .-multidiv
	.globl	addminus
	.type	addminus, @function
addminus:
.LFB3:
	.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
	movl	$0, %eax
	call	multidiv
	movl	%eax, -4(%rbp)
	jmp	.L17
.L19:
	movl	token(%rip), %eax
	cmpl	$-1, %eax
	jne	.L18
	call	getToken
	movl	$0, %eax
	call	multidiv
	addl	%eax, -4(%rbp)
	jmp	.L17
.L18:
	call	getToken
	movl	$0, %eax
	call	multidiv
	subl	%eax, -4(%rbp)
.L17:
	movl	token(%rip), %eax
	cmpl	$-1, %eax
	je	.L19
	movl	token(%rip), %eax
	cmpl	$-2, %eax
	je	.L19
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	addminus, .-addminus
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$-1, 172+map(%rip)
	movl	$-2, 180+map(%rip)
	movl	$-3, 168+map(%rip)
	movl	$-4, 188+map(%rip)
	movl	$-5, 160+map(%rip)
	movl	$-6, 164+map(%rip)
	movl	$-7, 244+map(%rip)
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L22
.L23:
	movl	$0, tindex(%rip)
	leaq	str(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	call	getToken
	movl	$0, %eax
	call	addminus
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -16(%rbp)
.L22:
	movl	-20(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L23
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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:
