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>

char formula[101];
int p;

int additive() {
  int result = multitive();
  while (formula[p] == '+' || formula[p] == '-')
    if (formula[p++] == '+')
      result += multitive();
    else
      result -= multitive();
  return result;
}

int multitive() {
  int result = term();
  while (formula[p] == '*' || formula[p] == '/')
    if (formula[p++] == '*')
      result *= term();
    else
      result /= term();
  return result;
}

int term() {
  int result = 0;
  if (formula[p] == '(') {
    p++;
    result = additive();
    p++;
  } else while ('0' <= formula[p] && formula[p] <= '9')
    result = result * 10 + formula[p++] - '0';
  return result;
}

int main() {
  int i, n;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%s", formula);
    p = 0;
    printf("%d\n", additive());
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	formula
	.bss
	.align 32
	.type	formula, @object
	.size	formula, 101
formula:
	.zero	101
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.text
	.globl	additive
	.type	additive, @function
additive:
.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, %eax
	call	multitive
	movl	%eax, -4(%rbp)
	jmp	.L2
.L4:
	movl	p(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, p(%rip)
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$43, %al
	jne	.L3
	movl	$0, %eax
	call	multitive
	addl	%eax, -4(%rbp)
	jmp	.L2
.L3:
	movl	$0, %eax
	call	multitive
	subl	%eax, -4(%rbp)
.L2:
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$43, %al
	je	.L4
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$45, %al
	je	.L4
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	additive, .-additive
	.globl	multitive
	.type	multitive, @function
multitive:
.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, %eax
	call	term
	movl	%eax, -4(%rbp)
	jmp	.L7
.L9:
	movl	p(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, p(%rip)
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$42, %al
	jne	.L8
	movl	$0, %eax
	call	term
	movl	-4(%rbp), %edx
	imull	%edx, %eax
	movl	%eax, -4(%rbp)
	jmp	.L7
.L8:
	movl	$0, %eax
	call	term
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%eax, -4(%rbp)
.L7:
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$42, %al
	je	.L9
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$47, %al
	je	.L9
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	multitive, .-multitive
	.globl	term
	.type	term, @function
term:
.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, -4(%rbp)
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$40, %al
	jne	.L14
	movl	p(%rip), %eax
	addl	$1, %eax
	movl	%eax, p(%rip)
	movl	$0, %eax
	call	additive
	movl	%eax, -4(%rbp)
	movl	p(%rip), %eax
	addl	$1, %eax
	movl	%eax, p(%rip)
	jmp	.L13
.L15:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movl	p(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, p(%rip)
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	subl	$48, %eax
	movl	%eax, -4(%rbp)
.L14:
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$47, %al
	jle	.L13
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$57, %al
	jle	.L15
.L13:
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	term, .-term
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L18
.L19:
	leaq	formula(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, p(%rip)
	movl	$0, %eax
	call	additive
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -12(%rbp)
.L18:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L19
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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
	.section	.text.unlikely,"ax",@progbits
.LCOLDB0:
	.text
.LHOTB0:
	.p2align 4
	.globl	multitive
	.type	multitive, @function
multitive:
.LFB24:
	.cfi_startproc
	endbr64
	movslq	p(%rip), %rax
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	formula(%rip), %rbp
	movsbl	0(%rbp,%rax), %esi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rax, %rcx
	cmpb	$40, %sil
	je	.L2
	leal	1(%rax), %eax
	leal	-48(%rsi), %edx
	xorl	%r12d, %r12d
	cltq
	cmpb	$9, %dl
	ja	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	leal	(%r12,%r12,4), %edx
	movl	%eax, %ecx
	leal	-48(%rsi,%rdx,2), %r12d
	movsbl	0(%rbp,%rax), %esi
	addq	$1, %rax
	leal	-48(%rsi), %edx
	cmpb	$9, %dl
	jbe	.L11
	movl	%ecx, p(%rip)
.L4:
	cmpb	$47, %sil
	je	.L42
	cmpb	$42, %sil
	jne	.L1
	.p2align 4,,10
	.p2align 3
.L42:
	leal	1(%rcx), %edx
	movslq	%edx, %rax
	movl	%edx, p(%rip)
	movsbl	0(%rbp,%rax), %eax
	cmpb	$42, %sil
	je	.L52
	cmpb	$40, %al
	je	.L22
	leal	-48(%rax), %edx
	cmpb	$9, %dl
	ja	.L53
	leal	2(%rcx), %edx
	xorl	%ebx, %ebx
	movslq	%edx, %rdx
	.p2align 4,,10
	.p2align 3
.L30:
	leal	(%rbx,%rbx,4), %esi
	movl	%edx, %ecx
	leal	-48(%rax,%rsi,2), %ebx
	movsbl	0(%rbp,%rdx), %eax
	addq	$1, %rdx
	leal	-48(%rax), %esi
	cmpb	$9, %sil
	jbe	.L30
	movl	%ecx, p(%rip)
	movl	%eax, %esi
.L29:
	movl	%r12d, %eax
	cltd
	idivl	%ebx
	movl	%eax, %r12d
.L21:
	cmpb	$42, %sil
	je	.L42
	cmpb	$47, %sil
	je	.L42
.L1:
	movl	%r12d, %eax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L52:
	.cfi_restore_state
	cmpb	$40, %al
	je	.L13
	leal	-48(%rax), %esi
	cmpb	$9, %sil
	ja	.L54
	leal	2(%rcx), %edx
	movsbl	%al, %esi
	xorl	%eax, %eax
	movslq	%edx, %rdx
	.p2align 4,,10
	.p2align 3
.L20:
	leal	(%rax,%rax,4), %eax
	movl	%edx, %ecx
	leal	-48(%rsi,%rax,2), %eax
	movsbl	0(%rbp,%rdx), %esi
	addq	$1, %rdx
	leal	-48(%rsi), %edi
	cmpb	$9, %dil
	jbe	.L20
	movl	%ecx, p(%rip)
	imull	%eax, %r12d
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L22:
	addl	$2, %ecx
	xorl	%eax, %eax
	movl	%ecx, p(%rip)
	call	multitive
	movl	%eax, %ebx
	.p2align 4,,10
	.p2align 3
.L50:
	movslq	p(%rip), %rax
	movq	%rax, %rcx
	movzbl	0(%rbp,%rax), %eax
	addl	$1, %ecx
	leal	-43(%rax), %edx
	movl	%ecx, p(%rip)
	andl	$253, %edx
	jne	.L25
	cmpb	$43, %al
	movl	$0, %eax
	je	.L55
	call	multitive
	subl	%eax, %ebx
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L55:
	call	multitive
	addl	%eax, %ebx
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L25:
	movslq	%ecx, %rax
	movzbl	0(%rbp,%rax), %esi
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L13:
	addl	$2, %ecx
	xorl	%eax, %eax
	movl	%ecx, p(%rip)
	call	multitive
	movl	%eax, %ebx
	.p2align 4,,10
	.p2align 3
.L49:
	movslq	p(%rip), %rax
	movq	%rax, %rcx
	movzbl	0(%rbp,%rax), %eax
	addl	$1, %ecx
	leal	-43(%rax), %edx
	movl	%ecx, p(%rip)
	andl	$253, %edx
	jne	.L16
	cmpb	$43, %al
	movl	$0, %eax
	je	.L56
	call	multitive
	subl	%eax, %ebx
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L56:
	call	multitive
	addl	%eax, %ebx
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	%ecx, %rax
	imull	%ebx, %r12d
	movzbl	0(%rbp,%rax), %esi
	jmp	.L21
.L54:
	movl	%eax, %esi
	movl	%edx, %ecx
	xorl	%r12d, %r12d
	jmp	.L21
.L2:
	addl	$1, %ecx
	xorl	%eax, %eax
	movl	%ecx, p(%rip)
	call	multitive
	movl	%eax, %r12d
	.p2align 4,,10
	.p2align 3
.L48:
	movslq	p(%rip), %rax
	movq	%rax, %rcx
	movzbl	0(%rbp,%rax), %eax
	addl	$1, %ecx
	leal	-43(%rax), %edx
	movl	%ecx, p(%rip)
	andl	$253, %edx
	jne	.L5
	cmpb	$43, %al
	movl	$0, %eax
	je	.L57
	call	multitive
	subl	%eax, %r12d
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L57:
	call	multitive
	addl	%eax, %r12d
	jmp	.L48
.L5:
	movslq	%ecx, %rax
	movzbl	0(%rbp,%rax), %esi
	jmp	.L4
.L53:
	jmp	.L46
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	multitive.cold, @function
multitive.cold:
.LFSB24:
.L46:
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	.cfi_offset 6, -24
	.cfi_offset 12, -16
	ud2
	.cfi_endproc
.LFE24:
	.text
	.size	multitive, .-multitive
	.section	.text.unlikely
	.size	multitive.cold, .-multitive.cold
.LCOLDE0:
	.text
.LHOTE0:
	.p2align 4
	.globl	additive
	.type	additive, @function
additive:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	leaq	formula(%rip), %r9
	call	multitive
	movslq	p(%rip), %rdx
	movl	%eax, %r8d
	movq	%rdx, %rax
	movzbl	(%r9,%rdx), %edx
	leal	-43(%rdx), %ecx
	andl	$253, %ecx
	je	.L62
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L60:
	call	multitive
	subl	%eax, %r8d
.L67:
	movslq	p(%rip), %rdx
	movq	%rdx, %rax
	movzbl	(%r9,%rdx), %edx
	leal	-43(%rdx), %ecx
	andl	$253, %ecx
	jne	.L58
.L62:
	addl	$1, %eax
	movl	%eax, p(%rip)
	xorl	%eax, %eax
	cmpb	$43, %dl
	jne	.L60
	call	multitive
	addl	%eax, %r8d
	jmp	.L67
	.p2align 4,,10
	.p2align 3
.L58:
	movl	%r8d, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE23:
	.size	additive, .-additive
	.p2align 4
	.globl	term
	.type	term, @function
term:
.LFB25:
	.cfi_startproc
	endbr64
	movslq	p(%rip), %rax
	leaq	formula(%rip), %r9
	movq	%rax, %rdx
	movsbl	(%r9,%rax), %eax
	cmpb	$40, %al
	je	.L69
	addl	$1, %edx
	leal	-48(%rax), %ecx
	xorl	%r8d, %r8d
	movslq	%edx, %rdx
	cmpb	$9, %cl
	ja	.L83
	.p2align 4,,10
	.p2align 3
.L76:
	leal	(%r8,%r8,4), %ecx
	movl	%edx, %esi
	leal	-48(%rax,%rcx,2), %r8d
	movsbl	(%r9,%rdx), %eax
	addq	$1, %rdx
	leal	-48(%rax), %ecx
	cmpb	$9, %cl
	jbe	.L76
	movl	%esi, p(%rip)
.L83:
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L69:
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	addl	$1, %edx
	xorl	%eax, %eax
	movl	%edx, p(%rip)
	call	multitive
	movl	%eax, %r8d
	.p2align 4,,10
	.p2align 3
.L85:
	movslq	p(%rip), %rdx
	movq	%rdx, %rax
	movzbl	(%r9,%rdx), %edx
	addl	$1, %eax
	leal	-43(%rdx), %ecx
	movl	%eax, p(%rip)
	andl	$253, %ecx
	jne	.L72
	xorl	%eax, %eax
	cmpb	$43, %dl
	je	.L86
	call	multitive
	subl	%eax, %r8d
	jmp	.L85
	.p2align 4,,10
	.p2align 3
.L86:
	call	multitive
	addl	%eax, %r8d
	jmp	.L85
	.p2align 4,,10
	.p2align 3
.L72:
	movl	%r8d, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE25:
	.size	term, .-term
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%s"
.LC3:
	.string	"%d\n"
	.section	.text.unlikely
.LCOLDB4:
	.section	.text.startup,"ax",@progbits
.LHOTB4:
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC1(%rip), %rdi
	leaq	formula(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC3(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L130
.L88:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$0, p(%rip)
	call	multitive
	movl	%eax, %r10d
	movslq	p(%rip), %rax
	movzbl	0(%r13,%rax), %ecx
	movq	%rax, %rsi
.L153:
	leal	-43(%rcx), %eax
	testb	$-3, %al
	jne	.L89
.L161:
	leal	1(%rsi), %eax
	movslq	%eax, %rdx
	movl	%eax, p(%rip)
	movzbl	0(%r13,%rdx), %edx
	cmpb	$43, %cl
	je	.L157
	cmpb	$40, %dl
	je	.L113
	leal	-48(%rdx), %ecx
	cmpb	$9, %cl
	ja	.L156
	leal	2(%rsi), %eax
	movsbl	%dl, %ecx
	xorl	%r11d, %r11d
	cltq
	.p2align 4,,10
	.p2align 3
.L118:
	leal	(%r11,%r11,4), %edx
	movl	%eax, %esi
	leal	-48(%rcx,%rdx,2), %r11d
	movsbl	0(%r13,%rax), %ecx
	addq	$1, %rax
	leal	-48(%rcx), %edx
	cmpb	$9, %dl
	jbe	.L118
	movl	%esi, p(%rip)
	.p2align 4,,10
	.p2align 3
.L124:
	cmpb	$42, %cl
	je	.L147
	cmpb	$47, %cl
	jne	.L158
.L147:
	leal	1(%rsi), %eax
	movslq	%eax, %rdx
	movl	%eax, p(%rip)
	movsbl	0(%r13,%rdx), %edx
	cmpb	$42, %cl
	je	.L159
	cmpb	$40, %dl
	je	.L125
	leal	-48(%rdx), %eax
	cmpb	$9, %al
	ja	.L160
	leal	2(%rsi), %eax
	xorl	%edi, %edi
	cltq
	.p2align 4,,10
	.p2align 3
.L128:
	leal	(%rdi,%rdi,4), %ecx
	movl	%eax, %esi
	leal	-48(%rdx,%rcx,2), %edi
	movsbl	0(%r13,%rax), %edx
	addq	$1, %rax
	leal	-48(%rdx), %ecx
	cmpb	$9, %cl
	jbe	.L128
	movl	%esi, p(%rip)
	movl	%edx, %ecx
.L127:
	movl	%r11d, %eax
	cltd
	idivl	%edi
	movl	%eax, %r11d
	jmp	.L124
	.p2align 4,,10
	.p2align 3
.L159:
	cmpb	$40, %dl
	je	.L120
	leal	-48(%rdx), %ecx
	cmpb	$9, %cl
	ja	.L156
	leal	2(%rsi), %eax
	movsbl	%dl, %ecx
	xorl	%edx, %edx
	cltq
	.p2align 4,,10
	.p2align 3
.L123:
	leal	(%rdx,%rdx,4), %edx
	movl	%eax, %esi
	leal	-48(%rcx,%rdx,2), %edx
	movsbl	0(%r13,%rax), %ecx
	addq	$1, %rax
	leal	-48(%rcx), %edi
	cmpb	$9, %dil
	jbe	.L123
	movl	%esi, p(%rip)
	imull	%edx, %r11d
	jmp	.L124
	.p2align 4,,10
	.p2align 3
.L125:
	addl	$2, %esi
	xorl	%eax, %eax
	movl	%esi, p(%rip)
	call	additive
	movl	%eax, %edi
	movl	p(%rip), %eax
	leal	1(%rax), %esi
	movslq	%esi, %rax
	movl	%esi, p(%rip)
	movzbl	0(%r13,%rax), %ecx
	jmp	.L127
	.p2align 4,,10
	.p2align 3
.L158:
	leal	-43(%rcx), %eax
	subl	%r11d, %r10d
	testb	$-3, %al
	je	.L161
.L89:
	movl	%r10d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addl	$1, %ebx
	cmpl	%ebx, 4(%rsp)
	jg	.L88
.L130:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L162
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L120:
	.cfi_restore_state
	addl	$2, %esi
	xorl	%eax, %eax
	movl	%esi, p(%rip)
	call	additive
	movl	p(%rip), %esi
	imull	%eax, %r11d
	addl	$1, %esi
	movslq	%esi, %rax
	movl	%esi, p(%rip)
	movzbl	0(%r13,%rax), %ecx
	jmp	.L124
	.p2align 4,,10
	.p2align 3
.L157:
	cmpb	$40, %dl
	je	.L91
	leal	-48(%rdx), %ecx
	cmpb	$9, %cl
	ja	.L163
	leal	2(%rsi), %eax
	movsbl	%dl, %ecx
	xorl	%r11d, %r11d
	cltq
	.p2align 4,,10
	.p2align 3
.L100:
	leal	(%r11,%r11,4), %edx
	movl	%eax, %esi
	leal	-48(%rcx,%rdx,2), %r11d
	movsbl	0(%r13,%rax), %ecx
	addq	$1, %rax
	leal	-48(%rcx), %edx
	cmpb	$9, %dl
	jbe	.L100
	movl	%esi, p(%rip)
.L93:
	cmpb	$47, %cl
	je	.L146
	cmpb	$42, %cl
	jne	.L99
	.p2align 4,,10
	.p2align 3
.L146:
	leal	1(%rsi), %edx
	movslq	%edx, %rax
	movl	%edx, p(%rip)
	movsbl	0(%r13,%rax), %eax
	cmpb	$42, %cl
	je	.L164
	cmpb	$40, %al
	je	.L107
	leal	-48(%rax), %edx
	cmpb	$9, %dl
	ja	.L165
	leal	2(%rsi), %edx
	xorl	%edi, %edi
	movslq	%edx, %rdx
	.p2align 4,,10
	.p2align 3
.L111:
	leal	(%rdi,%rdi,4), %ecx
	movl	%edx, %esi
	leal	-48(%rax,%rcx,2), %edi
	movsbl	0(%r13,%rdx), %eax
	addq	$1, %rdx
	leal	-48(%rax), %ecx
	cmpb	$9, %cl
	jbe	.L111
	movl	%esi, p(%rip)
	movl	%eax, %ecx
.L110:
	movl	%r11d, %eax
	cltd
	idivl	%edi
	movl	%eax, %r11d
.L106:
	cmpb	$42, %cl
	je	.L146
	cmpb	$47, %cl
	je	.L146
.L99:
	addl	%r11d, %r10d
	jmp	.L153
	.p2align 4,,10
	.p2align 3
.L164:
	cmpb	$40, %al
	je	.L102
	leal	-48(%rax), %ecx
	cmpb	$9, %cl
	ja	.L166
	leal	2(%rsi), %edx
	movsbl	%al, %ecx
	xorl	%eax, %eax
	movslq	%edx, %rdx
	.p2align 4,,10
	.p2align 3
.L105:
	leal	(%rax,%rax,4), %eax
	movl	%edx, %esi
	leal	-48(%rcx,%rax,2), %eax
	movsbl	0(%r13,%rdx), %ecx
	addq	$1, %rdx
	leal	-48(%rcx), %edi
	cmpb	$9, %dil
	jbe	.L105
	movl	%esi, p(%rip)
	imull	%eax, %r11d
	jmp	.L106
	.p2align 4,,10
	.p2align 3
.L107:
	addl	$2, %esi
	xorl	%eax, %eax
	movl	%esi, p(%rip)
	call	additive
	movl	%eax, %edi
	movl	p(%rip), %eax
	leal	1(%rax), %esi
	movslq	%esi, %rax
	movl	%esi, p(%rip)
	movzbl	0(%r13,%rax), %ecx
	jmp	.L110
.L156:
	movl	%edx, %ecx
	movl	%eax, %esi
	xorl	%r11d, %r11d
	jmp	.L124
.L102:
	addl	$2, %esi
	xorl	%eax, %eax
	movl	%esi, p(%rip)
	call	additive
	movl	p(%rip), %esi
	imull	%eax, %r11d
	addl	$1, %esi
	movslq	%esi, %rax
	movl	%esi, p(%rip)
	movzbl	0(%r13,%rax), %ecx
	jmp	.L106
.L113:
	addl	$2, %esi
	xorl	%eax, %eax
	movl	%esi, p(%rip)
	call	additive
	movl	%eax, %r11d
	movl	p(%rip), %eax
	leal	1(%rax), %esi
	movslq	%esi, %rax
	movl	%esi, p(%rip)
	movzbl	0(%r13,%rax), %ecx
	jmp	.L124
.L166:
	movl	%eax, %ecx
	movl	%edx, %esi
	xorl	%r11d, %r11d
	jmp	.L106
.L91:
	addl	$2, %esi
	xorl	%eax, %eax
	movl	%esi, p(%rip)
	call	multitive
	movl	%eax, %r11d
	.p2align 4,,10
	.p2align 3
.L154:
	movslq	p(%rip), %rax
	movq	%rax, %rsi
	movzbl	0(%r13,%rax), %eax
	addl	$1, %esi
	leal	-43(%rax), %edx
	movl	%esi, p(%rip)
	andl	$253, %edx
	jne	.L94
	cmpb	$43, %al
	movl	$0, %eax
	je	.L167
	call	multitive
	subl	%eax, %r11d
	jmp	.L154
.L167:
	call	multitive
	addl	%eax, %r11d
	jmp	.L154
.L94:
	movslq	%esi, %rax
	movzbl	0(%r13,%rax), %ecx
	jmp	.L93
.L163:
	movl	%edx, %ecx
	movl	%eax, %esi
	xorl	%r11d, %r11d
	jmp	.L93
.L162:
	call	__stack_chk_fail@PLT
.L165:
	jmp	.L109
.L160:
	jmp	.L109
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB26:
.L109:
	.cfi_def_cfa_offset 64
	.cfi_offset 3, -40
	.cfi_offset 6, -32
	.cfi_offset 12, -24
	.cfi_offset 13, -16
	ud2
	.cfi_endproc
.LFE26:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE4:
	.section	.text.startup
.LHOTE4:
	.globl	p
	.bss
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.globl	formula
	.align 32
	.type	formula, @object
	.size	formula, 101
formula:
	.zero	101
	.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
	.section	.text.unlikely,"ax",@progbits
.LCOLDB0:
	.text
.LHOTB0:
	.p2align 4
	.globl	multitive
	.type	multitive, @function
multitive:
.LFB24:
	.cfi_startproc
	endbr64
	movslq	p(%rip), %rax
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	formula(%rip), %rbp
	movsbl	0(%rbp,%rax), %esi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rax, %rcx
	cmpb	$40, %sil
	je	.L2
	leal	1(%rax), %eax
	leal	-48(%rsi), %edx
	xorl	%r12d, %r12d
	cltq
	cmpb	$9, %dl
	ja	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	leal	(%r12,%r12,4), %edx
	movl	%eax, %ecx
	leal	-48(%rsi,%rdx,2), %r12d
	movsbl	0(%rbp,%rax), %esi
	addq	$1, %rax
	leal	-48(%rsi), %edx
	cmpb	$9, %dl
	jbe	.L11
	movl	%ecx, p(%rip)
.L4:
	cmpb	$47, %sil
	je	.L42
	cmpb	$42, %sil
	jne	.L1
	.p2align 4,,10
	.p2align 3
.L42:
	leal	1(%rcx), %edx
	movslq	%edx, %rax
	movl	%edx, p(%rip)
	movsbl	0(%rbp,%rax), %eax
	cmpb	$42, %sil
	je	.L52
	cmpb	$40, %al
	je	.L22
	leal	-48(%rax), %edx
	cmpb	$9, %dl
	ja	.L53
	leal	2(%rcx), %edx
	xorl	%ebx, %ebx
	movslq	%edx, %rdx
	.p2align 4,,10
	.p2align 3
.L30:
	leal	(%rbx,%rbx,4), %esi
	movl	%edx, %ecx
	leal	-48(%rax,%rsi,2), %ebx
	movsbl	0(%rbp,%rdx), %eax
	addq	$1, %rdx
	leal	-48(%rax), %esi
	cmpb	$9, %sil
	jbe	.L30
	movl	%ecx, p(%rip)
	movl	%eax, %esi
.L29:
	movl	%r12d, %eax
	cltd
	idivl	%ebx
	movl	%eax, %r12d
.L21:
	cmpb	$42, %sil
	je	.L42
	cmpb	$47, %sil
	je	.L42
.L1:
	movl	%r12d, %eax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L52:
	.cfi_restore_state
	cmpb	$40, %al
	je	.L13
	leal	-48(%rax), %esi
	cmpb	$9, %sil
	ja	.L54
	leal	2(%rcx), %edx
	movsbl	%al, %esi
	xorl	%eax, %eax
	movslq	%edx, %rdx
	.p2align 4,,10
	.p2align 3
.L20:
	leal	(%rax,%rax,4), %eax
	movl	%edx, %ecx
	leal	-48(%rsi,%rax,2), %eax
	movsbl	0(%rbp,%rdx), %esi
	addq	$1, %rdx
	leal	-48(%rsi), %edi
	cmpb	$9, %dil
	jbe	.L20
	movl	%ecx, p(%rip)
	imull	%eax, %r12d
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L22:
	addl	$2, %ecx
	xorl	%eax, %eax
	movl	%ecx, p(%rip)
	call	multitive
	movl	%eax, %ebx
	.p2align 4,,10
	.p2align 3
.L50:
	movslq	p(%rip), %rax
	movq	%rax, %rcx
	movzbl	0(%rbp,%rax), %eax
	addl	$1, %ecx
	leal	-43(%rax), %edx
	movl	%ecx, p(%rip)
	andl	$253, %edx
	jne	.L25
	cmpb	$43, %al
	movl	$0, %eax
	je	.L55
	call	multitive
	subl	%eax, %ebx
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L55:
	call	multitive
	addl	%eax, %ebx
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L25:
	movslq	%ecx, %rax
	movzbl	0(%rbp,%rax), %esi
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L13:
	addl	$2, %ecx
	xorl	%eax, %eax
	movl	%ecx, p(%rip)
	call	multitive
	movl	%eax, %ebx
	.p2align 4,,10
	.p2align 3
.L49:
	movslq	p(%rip), %rax
	movq	%rax, %rcx
	movzbl	0(%rbp,%rax), %eax
	addl	$1, %ecx
	leal	-43(%rax), %edx
	movl	%ecx, p(%rip)
	andl	$253, %edx
	jne	.L16
	cmpb	$43, %al
	movl	$0, %eax
	je	.L56
	call	multitive
	subl	%eax, %ebx
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L56:
	call	multitive
	addl	%eax, %ebx
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	%ecx, %rax
	imull	%ebx, %r12d
	movzbl	0(%rbp,%rax), %esi
	jmp	.L21
.L54:
	movl	%eax, %esi
	movl	%edx, %ecx
	xorl	%r12d, %r12d
	jmp	.L21
.L2:
	addl	$1, %ecx
	xorl	%eax, %eax
	movl	%ecx, p(%rip)
	call	multitive
	movl	%eax, %r12d
	.p2align 4,,10
	.p2align 3
.L48:
	movslq	p(%rip), %rax
	movq	%rax, %rcx
	movzbl	0(%rbp,%rax), %eax
	addl	$1, %ecx
	leal	-43(%rax), %edx
	movl	%ecx, p(%rip)
	andl	$253, %edx
	jne	.L5
	cmpb	$43, %al
	movl	$0, %eax
	je	.L57
	call	multitive
	subl	%eax, %r12d
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L57:
	call	multitive
	addl	%eax, %r12d
	jmp	.L48
.L5:
	movslq	%ecx, %rax
	movzbl	0(%rbp,%rax), %esi
	jmp	.L4
.L53:
	jmp	.L46
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	multitive.cold, @function
multitive.cold:
.LFSB24:
.L46:
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	.cfi_offset 6, -24
	.cfi_offset 12, -16
	ud2
	.cfi_endproc
.LFE24:
	.text
	.size	multitive, .-multitive
	.section	.text.unlikely
	.size	multitive.cold, .-multitive.cold
.LCOLDE0:
	.text
.LHOTE0:
	.p2align 4
	.globl	additive
	.type	additive, @function
additive:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	leaq	formula(%rip), %r9
	call	multitive
	movslq	p(%rip), %rdx
	movl	%eax, %r8d
	movq	%rdx, %rax
	movzbl	(%r9,%rdx), %edx
	leal	-43(%rdx), %ecx
	andl	$253, %ecx
	je	.L62
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L60:
	call	multitive
	subl	%eax, %r8d
.L67:
	movslq	p(%rip), %rdx
	movq	%rdx, %rax
	movzbl	(%r9,%rdx), %edx
	leal	-43(%rdx), %ecx
	andl	$253, %ecx
	jne	.L58
.L62:
	addl	$1, %eax
	movl	%eax, p(%rip)
	xorl	%eax, %eax
	cmpb	$43, %dl
	jne	.L60
	call	multitive
	addl	%eax, %r8d
	jmp	.L67
	.p2align 4,,10
	.p2align 3
.L58:
	movl	%r8d, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE23:
	.size	additive, .-additive
	.p2align 4
	.globl	term
	.type	term, @function
term:
.LFB25:
	.cfi_startproc
	endbr64
	movslq	p(%rip), %rax
	leaq	formula(%rip), %r9
	movq	%rax, %rdx
	movsbl	(%r9,%rax), %eax
	cmpb	$40, %al
	je	.L69
	addl	$1, %edx
	leal	-48(%rax), %ecx
	xorl	%r8d, %r8d
	movslq	%edx, %rdx
	cmpb	$9, %cl
	ja	.L83
	.p2align 4,,10
	.p2align 3
.L76:
	leal	(%r8,%r8,4), %ecx
	movl	%edx, %esi
	leal	-48(%rax,%rcx,2), %r8d
	movsbl	(%r9,%rdx), %eax
	addq	$1, %rdx
	leal	-48(%rax), %ecx
	cmpb	$9, %cl
	jbe	.L76
	movl	%esi, p(%rip)
.L83:
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L69:
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	addl	$1, %edx
	xorl	%eax, %eax
	movl	%edx, p(%rip)
	call	multitive
	movl	%eax, %r8d
	.p2align 4,,10
	.p2align 3
.L85:
	movslq	p(%rip), %rdx
	movq	%rdx, %rax
	movzbl	(%r9,%rdx), %edx
	addl	$1, %eax
	leal	-43(%rdx), %ecx
	movl	%eax, p(%rip)
	andl	$253, %ecx
	jne	.L72
	xorl	%eax, %eax
	cmpb	$43, %dl
	je	.L86
	call	multitive
	subl	%eax, %r8d
	jmp	.L85
	.p2align 4,,10
	.p2align 3
.L86:
	call	multitive
	addl	%eax, %r8d
	jmp	.L85
	.p2align 4,,10
	.p2align 3
.L72:
	movl	%r8d, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE25:
	.size	term, .-term
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%s"
.LC3:
	.string	"%d\n"
	.section	.text.unlikely
.LCOLDB4:
	.section	.text.startup,"ax",@progbits
.LHOTB4:
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC1(%rip), %rdi
	leaq	formula(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC3(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L130
.L88:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$0, p(%rip)
	call	multitive
	movl	%eax, %r10d
	movslq	p(%rip), %rax
	movzbl	0(%r13,%rax), %ecx
	movq	%rax, %rsi
.L153:
	leal	-43(%rcx), %eax
	testb	$-3, %al
	jne	.L89
.L161:
	leal	1(%rsi), %eax
	movslq	%eax, %rdx
	movl	%eax, p(%rip)
	movzbl	0(%r13,%rdx), %edx
	cmpb	$43, %cl
	je	.L157
	cmpb	$40, %dl
	je	.L113
	leal	-48(%rdx), %ecx
	cmpb	$9, %cl
	ja	.L156
	leal	2(%rsi), %eax
	movsbl	%dl, %ecx
	xorl	%r11d, %r11d
	cltq
	.p2align 4,,10
	.p2align 3
.L118:
	leal	(%r11,%r11,4), %edx
	movl	%eax, %esi
	leal	-48(%rcx,%rdx,2), %r11d
	movsbl	0(%r13,%rax), %ecx
	addq	$1, %rax
	leal	-48(%rcx), %edx
	cmpb	$9, %dl
	jbe	.L118
	movl	%esi, p(%rip)
	.p2align 4,,10
	.p2align 3
.L124:
	cmpb	$42, %cl
	je	.L147
	cmpb	$47, %cl
	jne	.L158
.L147:
	leal	1(%rsi), %eax
	movslq	%eax, %rdx
	movl	%eax, p(%rip)
	movsbl	0(%r13,%rdx), %edx
	cmpb	$42, %cl
	je	.L159
	cmpb	$40, %dl
	je	.L125
	leal	-48(%rdx), %eax
	cmpb	$9, %al
	ja	.L160
	leal	2(%rsi), %eax
	xorl	%edi, %edi
	cltq
	.p2align 4,,10
	.p2align 3
.L128:
	leal	(%rdi,%rdi,4), %ecx
	movl	%eax, %esi
	leal	-48(%rdx,%rcx,2), %edi
	movsbl	0(%r13,%rax), %edx
	addq	$1, %rax
	leal	-48(%rdx), %ecx
	cmpb	$9, %cl
	jbe	.L128
	movl	%esi, p(%rip)
	movl	%edx, %ecx
.L127:
	movl	%r11d, %eax
	cltd
	idivl	%edi
	movl	%eax, %r11d
	jmp	.L124
	.p2align 4,,10
	.p2align 3
.L159:
	cmpb	$40, %dl
	je	.L120
	leal	-48(%rdx), %ecx
	cmpb	$9, %cl
	ja	.L156
	leal	2(%rsi), %eax
	movsbl	%dl, %ecx
	xorl	%edx, %edx
	cltq
	.p2align 4,,10
	.p2align 3
.L123:
	leal	(%rdx,%rdx,4), %edx
	movl	%eax, %esi
	leal	-48(%rcx,%rdx,2), %edx
	movsbl	0(%r13,%rax), %ecx
	addq	$1, %rax
	leal	-48(%rcx), %edi
	cmpb	$9, %dil
	jbe	.L123
	movl	%esi, p(%rip)
	imull	%edx, %r11d
	jmp	.L124
	.p2align 4,,10
	.p2align 3
.L125:
	addl	$2, %esi
	xorl	%eax, %eax
	movl	%esi, p(%rip)
	call	additive
	movl	%eax, %edi
	movl	p(%rip), %eax
	leal	1(%rax), %esi
	movslq	%esi, %rax
	movl	%esi, p(%rip)
	movzbl	0(%r13,%rax), %ecx
	jmp	.L127
	.p2align 4,,10
	.p2align 3
.L158:
	leal	-43(%rcx), %eax
	subl	%r11d, %r10d
	testb	$-3, %al
	je	.L161
.L89:
	movl	%r10d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addl	$1, %ebx
	cmpl	%ebx, 4(%rsp)
	jg	.L88
.L130:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L162
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L120:
	.cfi_restore_state
	addl	$2, %esi
	xorl	%eax, %eax
	movl	%esi, p(%rip)
	call	additive
	movl	p(%rip), %esi
	imull	%eax, %r11d
	addl	$1, %esi
	movslq	%esi, %rax
	movl	%esi, p(%rip)
	movzbl	0(%r13,%rax), %ecx
	jmp	.L124
	.p2align 4,,10
	.p2align 3
.L157:
	cmpb	$40, %dl
	je	.L91
	leal	-48(%rdx), %ecx
	cmpb	$9, %cl
	ja	.L163
	leal	2(%rsi), %eax
	movsbl	%dl, %ecx
	xorl	%r11d, %r11d
	cltq
	.p2align 4,,10
	.p2align 3
.L100:
	leal	(%r11,%r11,4), %edx
	movl	%eax, %esi
	leal	-48(%rcx,%rdx,2), %r11d
	movsbl	0(%r13,%rax), %ecx
	addq	$1, %rax
	leal	-48(%rcx), %edx
	cmpb	$9, %dl
	jbe	.L100
	movl	%esi, p(%rip)
.L93:
	cmpb	$47, %cl
	je	.L146
	cmpb	$42, %cl
	jne	.L99
	.p2align 4,,10
	.p2align 3
.L146:
	leal	1(%rsi), %edx
	movslq	%edx, %rax
	movl	%edx, p(%rip)
	movsbl	0(%r13,%rax), %eax
	cmpb	$42, %cl
	je	.L164
	cmpb	$40, %al
	je	.L107
	leal	-48(%rax), %edx
	cmpb	$9, %dl
	ja	.L165
	leal	2(%rsi), %edx
	xorl	%edi, %edi
	movslq	%edx, %rdx
	.p2align 4,,10
	.p2align 3
.L111:
	leal	(%rdi,%rdi,4), %ecx
	movl	%edx, %esi
	leal	-48(%rax,%rcx,2), %edi
	movsbl	0(%r13,%rdx), %eax
	addq	$1, %rdx
	leal	-48(%rax), %ecx
	cmpb	$9, %cl
	jbe	.L111
	movl	%esi, p(%rip)
	movl	%eax, %ecx
.L110:
	movl	%r11d, %eax
	cltd
	idivl	%edi
	movl	%eax, %r11d
.L106:
	cmpb	$42, %cl
	je	.L146
	cmpb	$47, %cl
	je	.L146
.L99:
	addl	%r11d, %r10d
	jmp	.L153
	.p2align 4,,10
	.p2align 3
.L164:
	cmpb	$40, %al
	je	.L102
	leal	-48(%rax), %ecx
	cmpb	$9, %cl
	ja	.L166
	leal	2(%rsi), %edx
	movsbl	%al, %ecx
	xorl	%eax, %eax
	movslq	%edx, %rdx
	.p2align 4,,10
	.p2align 3
.L105:
	leal	(%rax,%rax,4), %eax
	movl	%edx, %esi
	leal	-48(%rcx,%rax,2), %eax
	movsbl	0(%r13,%rdx), %ecx
	addq	$1, %rdx
	leal	-48(%rcx), %edi
	cmpb	$9, %dil
	jbe	.L105
	movl	%esi, p(%rip)
	imull	%eax, %r11d
	jmp	.L106
	.p2align 4,,10
	.p2align 3
.L107:
	addl	$2, %esi
	xorl	%eax, %eax
	movl	%esi, p(%rip)
	call	additive
	movl	%eax, %edi
	movl	p(%rip), %eax
	leal	1(%rax), %esi
	movslq	%esi, %rax
	movl	%esi, p(%rip)
	movzbl	0(%r13,%rax), %ecx
	jmp	.L110
.L156:
	movl	%edx, %ecx
	movl	%eax, %esi
	xorl	%r11d, %r11d
	jmp	.L124
.L102:
	addl	$2, %esi
	xorl	%eax, %eax
	movl	%esi, p(%rip)
	call	additive
	movl	p(%rip), %esi
	imull	%eax, %r11d
	addl	$1, %esi
	movslq	%esi, %rax
	movl	%esi, p(%rip)
	movzbl	0(%r13,%rax), %ecx
	jmp	.L106
.L113:
	addl	$2, %esi
	xorl	%eax, %eax
	movl	%esi, p(%rip)
	call	additive
	movl	%eax, %r11d
	movl	p(%rip), %eax
	leal	1(%rax), %esi
	movslq	%esi, %rax
	movl	%esi, p(%rip)
	movzbl	0(%r13,%rax), %ecx
	jmp	.L124
.L166:
	movl	%eax, %ecx
	movl	%edx, %esi
	xorl	%r11d, %r11d
	jmp	.L106
.L91:
	addl	$2, %esi
	xorl	%eax, %eax
	movl	%esi, p(%rip)
	call	multitive
	movl	%eax, %r11d
	.p2align 4,,10
	.p2align 3
.L154:
	movslq	p(%rip), %rax
	movq	%rax, %rsi
	movzbl	0(%r13,%rax), %eax
	addl	$1, %esi
	leal	-43(%rax), %edx
	movl	%esi, p(%rip)
	andl	$253, %edx
	jne	.L94
	cmpb	$43, %al
	movl	$0, %eax
	je	.L167
	call	multitive
	subl	%eax, %r11d
	jmp	.L154
.L167:
	call	multitive
	addl	%eax, %r11d
	jmp	.L154
.L94:
	movslq	%esi, %rax
	movzbl	0(%r13,%rax), %ecx
	jmp	.L93
.L163:
	movl	%edx, %ecx
	movl	%eax, %esi
	xorl	%r11d, %r11d
	jmp	.L93
.L162:
	call	__stack_chk_fail@PLT
.L165:
	jmp	.L109
.L160:
	jmp	.L109
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB26:
.L109:
	.cfi_def_cfa_offset 64
	.cfi_offset 3, -40
	.cfi_offset 6, -32
	.cfi_offset 12, -24
	.cfi_offset 13, -16
	ud2
	.cfi_endproc
.LFE26:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE4:
	.section	.text.startup
.LHOTE4:
	.globl	p
	.bss
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.globl	formula
	.align 32
	.type	formula, @object
	.size	formula, 101
formula:
	.zero	101
	.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>

char formula[101];
int p;

int additive() {
  int result = multitive();
  while (formula[p] == '+' || formula[p] == '-')
    if (formula[p++] == '+')
      result += multitive();
    else
      result -= multitive();
  return result;
}

int multitive() {
  int result = term();
  while (formula[p] == '*' || formula[p] == '/')
    if (formula[p++] == '*')
      result *= term();
    else
      result /= term();
  return result;
}

int term() {
  int result = 0;
  if (formula[p] == '(') {
    p++;
    result = additive();
    p++;
  } else while ('0' <= formula[p] && formula[p] <= '9')
    result = result * 10 + formula[p++] - '0';
  return result;
}

int main() {
  int i, n;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%s", formula);
    p = 0;
    printf("%d\n", additive());
  }
  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 <stdio.h>

char formula[101];
int p;

int additive() {
  int result = multitive();
  while (formula[p] == '+' || formula[p] == '-')
    if (formula[p++] == '+')
      result += multitive();
    else
      result -= multitive();
  return result;
}

int multitive() {
  int result = term();
  while (formula[p] == '*' || formula[p] == '/')
    if (formula[p++] == '*')
      result *= term();
    else
      result /= term();
  return result;
}

int term() {
  int result = 0;
  if (formula[p] == '(') {
    p++;
    result = additive();
    p++;
  } else while ('0' <= formula[p] && formula[p] <= '9')
    result = result * 10 + formula[p++] - '0';
  return result;
}

int main() {
  int i, n;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%s", formula);
    p = 0;
    printf("%d\n", additive());
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	formula
	.bss
	.align 32
	.type	formula, @object
	.size	formula, 101
formula:
	.zero	101
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.text
	.globl	additive
	.type	additive, @function
additive:
.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, %eax
	call	multitive
	movl	%eax, -4(%rbp)
	jmp	.L2
.L4:
	movl	p(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, p(%rip)
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$43, %al
	jne	.L3
	movl	$0, %eax
	call	multitive
	addl	%eax, -4(%rbp)
	jmp	.L2
.L3:
	movl	$0, %eax
	call	multitive
	subl	%eax, -4(%rbp)
.L2:
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$43, %al
	je	.L4
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$45, %al
	je	.L4
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	additive, .-additive
	.globl	multitive
	.type	multitive, @function
multitive:
.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, %eax
	call	term
	movl	%eax, -4(%rbp)
	jmp	.L7
.L9:
	movl	p(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, p(%rip)
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$42, %al
	jne	.L8
	movl	$0, %eax
	call	term
	movl	-4(%rbp), %edx
	imull	%edx, %eax
	movl	%eax, -4(%rbp)
	jmp	.L7
.L8:
	movl	$0, %eax
	call	term
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%eax, -4(%rbp)
.L7:
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$42, %al
	je	.L9
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$47, %al
	je	.L9
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	multitive, .-multitive
	.globl	term
	.type	term, @function
term:
.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, -4(%rbp)
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$40, %al
	jne	.L14
	movl	p(%rip), %eax
	addl	$1, %eax
	movl	%eax, p(%rip)
	movl	$0, %eax
	call	additive
	movl	%eax, -4(%rbp)
	movl	p(%rip), %eax
	addl	$1, %eax
	movl	%eax, p(%rip)
	jmp	.L13
.L15:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movl	p(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, p(%rip)
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	subl	$48, %eax
	movl	%eax, -4(%rbp)
.L14:
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$47, %al
	jle	.L13
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$57, %al
	jle	.L15
.L13:
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	term, .-term
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L18
.L19:
	leaq	formula(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, p(%rip)
	movl	$0, %eax
	call	additive
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -12(%rbp)
.L18:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L19
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	formula
	.bss
	.align 32
	.type	formula, @object
	.size	formula, 101
formula:
	.zero	101
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.text
	.globl	additive
	.type	additive, @function
additive:
.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, %eax
	call	multitive
	movl	%eax, -4(%rbp)
	jmp	.L2
.L4:
	movl	p(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, p(%rip)
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$43, %al
	jne	.L3
	movl	$0, %eax
	call	multitive
	addl	%eax, -4(%rbp)
	jmp	.L2
.L3:
	movl	$0, %eax
	call	multitive
	subl	%eax, -4(%rbp)
.L2:
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$43, %al
	je	.L4
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$45, %al
	je	.L4
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	additive, .-additive
	.globl	multitive
	.type	multitive, @function
multitive:
.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, %eax
	call	term
	movl	%eax, -4(%rbp)
	jmp	.L7
.L9:
	movl	p(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, p(%rip)
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$42, %al
	jne	.L8
	movl	$0, %eax
	call	term
	movl	-4(%rbp), %edx
	imull	%edx, %eax
	movl	%eax, -4(%rbp)
	jmp	.L7
.L8:
	movl	$0, %eax
	call	term
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%eax, -4(%rbp)
.L7:
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$42, %al
	je	.L9
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$47, %al
	je	.L9
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	multitive, .-multitive
	.globl	term
	.type	term, @function
term:
.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, -4(%rbp)
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$40, %al
	jne	.L14
	movl	p(%rip), %eax
	addl	$1, %eax
	movl	%eax, p(%rip)
	movl	$0, %eax
	call	additive
	movl	%eax, -4(%rbp)
	movl	p(%rip), %eax
	addl	$1, %eax
	movl	%eax, p(%rip)
	jmp	.L13
.L15:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movl	p(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, p(%rip)
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	subl	$48, %eax
	movl	%eax, -4(%rbp)
.L14:
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$47, %al
	jle	.L13
	movl	p(%rip), %eax
	cltq
	leaq	formula(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$57, %al
	jle	.L15
.L13:
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	term, .-term
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L18
.L19:
	leaq	formula(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, p(%rip)
	movl	$0, %eax
	call	additive
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -12(%rbp)
.L18:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L19
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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:
