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>

int expr(char **);

int number(char **s) {
  int val = 0;
  while ('0' <= **s && **s <= '9') {
    val = val * 10 + **s - '0';
    (*s)++;
  }
  return val;
}

int factor(char **s) {
  if (**s == '(') {
    (*s)++;
    int val = expr(s);
    (*s)++;
    return val;
  }
  return number(s);
}

int term(char **s) {
  int val = factor(s);
  while (1) {
    if (**s == '*') {
      (*s)++;
      val *= factor(s);
    } else if (**s == '/') {
      (*s)++;
      val /= factor(s);
    } else {
      break;
    }
  }
  return val;
}

int expr(char **s) {
  int val = term(s);
  while (1) {
    if (**s == '+') {
      (*s)++;
      val += term(s);
    } else if (**s == '-') {
      (*s)++;
      val -= term(s);
    } else {
      break;
    }
  }
  return val;
}

int main() {
  int n;
  scanf("%d", &n);
  char s[101];
  while (n--) {
    scanf("%s", s);
    char *p = s;
    printf("%d\n", expr(&p));
  }
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	number
	.type	number, @function
number:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L4:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	addl	%edx, %eax
	subl	$48, %eax
	movl	%eax, -4(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
.L2:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$47, %al
	jle	.L3
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$57, %al
	jle	.L4
.L3:
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	number, .-number
	.globl	factor
	.type	factor, @function
factor:
.LFB1:
	.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	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$40, %al
	jne	.L7
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	expr
	movl	%eax, -4(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movl	-4(%rbp), %eax
	jmp	.L8
.L7:
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	number
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	factor, .-factor
	.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	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	factor
	movl	%eax, -4(%rbp)
.L14:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$42, %al
	jne	.L10
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	factor
	movl	-4(%rbp), %edx
	imull	%edx, %eax
	movl	%eax, -4(%rbp)
	jmp	.L14
.L10:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$47, %al
	jne	.L16
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	factor
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%eax, -4(%rbp)
	jmp	.L14
.L16:
	nop
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	term, .-term
	.globl	expr
	.type	expr, @function
expr:
.LFB3:
	.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	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	term
	movl	%eax, -4(%rbp)
.L22:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$43, %al
	jne	.L18
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	term
	addl	%eax, -4(%rbp)
	jmp	.L22
.L18:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$45, %al
	jne	.L24
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	term
	subl	%eax, -4(%rbp)
	jmp	.L22
.L24:
	nop
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	expr, .-expr
	.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
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L26
.L27:
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-112(%rbp), %rax
	movq	%rax, -120(%rbp)
	leaq	-120(%rbp), %rax
	movq	%rax, %rdi
	call	expr
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L26:
	movl	-124(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -124(%rbp)
	testl	%eax, %eax
	jne	.L27
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	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	number
	.type	number, @function
number:
.LFB23:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rdx
	movsbl	(%rdx), %eax
	leal	-48(%rax), %ecx
	cmpb	$9, %cl
	ja	.L4
	addq	$1, %rdx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L3:
	leal	(%r8,%r8,4), %ecx
	movq	%rdx, (%rdi)
	addq	$1, %rdx
	leal	-48(%rax,%rcx,2), %r8d
	movsbl	-1(%rdx), %eax
	leal	-48(%rax), %ecx
	cmpb	$9, %cl
	jbe	.L3
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%r8d, %r8d
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	number, .-number
	.section	.text.unlikely,"ax",@progbits
.LCOLDB0:
	.text
.LHOTB0:
	.p2align 4
	.globl	term
	.type	term, @function
term:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	(%rdi), %rdx
	movsbl	(%rdx), %ecx
	cmpb	$40, %cl
	je	.L8
	leal	-48(%rcx), %esi
	leaq	1(%rdx), %rax
	xorl	%r12d, %r12d
	cmpb	$9, %sil
	ja	.L15
	.p2align 4,,10
	.p2align 3
.L16:
	leal	(%r12,%r12,4), %edx
	movq	%rax, 0(%rbp)
	leal	-48(%rcx,%rdx,2), %r12d
	movsbl	(%rax), %ecx
	movq	%rax, %rdx
	addq	$1, %rax
	leal	-48(%rcx), %esi
	cmpb	$9, %sil
	jbe	.L16
.L15:
	cmpb	$42, %cl
	je	.L45
.L17:
	cmpb	$47, %cl
	jne	.L7
	leaq	1(%rdx), %rsi
	movq	%rsi, 0(%rbp)
	movsbl	1(%rdx), %ecx
	cmpb	$40, %cl
	je	.L27
	leal	-48(%rcx), %eax
	cmpb	$9, %al
	ja	.L46
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L28:
	leal	(%rbx,%rbx,4), %eax
	addq	$1, %rsi
	leal	-48(%rcx,%rax,2), %ebx
	movq	%rsi, 0(%rbp)
	movsbl	(%rsi), %ecx
	leal	-48(%rcx), %eax
	cmpb	$9, %al
	jbe	.L28
	movl	%r12d, %eax
	cltd
	idivl	%ebx
	movq	%rsi, %rdx
	movl	%eax, %r12d
.L49:
	cmpb	$42, %cl
	jne	.L17
.L45:
	leaq	1(%rdx), %rax
	movq	%rax, 0(%rbp)
	movsbl	1(%rdx), %ecx
	cmpb	$40, %cl
	je	.L18
	leal	-48(%rcx), %esi
	xorl	%edx, %edx
	cmpb	$9, %sil
	ja	.L47
	.p2align 4,,10
	.p2align 3
.L19:
	addq	$1, %rax
	leal	(%rdx,%rdx,4), %edx
	movq	%rax, 0(%rbp)
	leal	-48(%rcx,%rdx,2), %edx
	movsbl	(%rax), %ecx
	leal	-48(%rcx), %esi
	cmpb	$9, %sil
	jbe	.L19
	imull	%edx, %r12d
	movq	%rax, %rdx
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L7:
	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
.L27:
	.cfi_restore_state
	addq	$2, %rdx
	movq	%rbp, %rdi
	movq	%rdx, 0(%rbp)
	call	term
	movl	%eax, %ebx
.L30:
	movq	0(%rbp), %rax
	movzbl	(%rax), %edx
	leaq	1(%rax), %rsi
	movq	%rsi, 0(%rbp)
	cmpb	$43, %dl
	je	.L48
	cmpb	$45, %dl
	jne	.L33
	movq	%rbp, %rdi
	call	term
	subl	%eax, %ebx
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L33:
	movzbl	1(%rax), %ecx
	movl	%r12d, %eax
	cltd
	idivl	%ebx
	movq	%rsi, %rdx
	movl	%eax, %r12d
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L48:
	movq	%rbp, %rdi
	call	term
	addl	%eax, %ebx
	jmp	.L30
.L18:
	addq	$2, %rdx
	movq	%rbp, %rdi
	movq	%rdx, 0(%rbp)
	call	term
	movl	%eax, %ebx
	.p2align 4,,10
	.p2align 3
.L21:
	movq	0(%rbp), %rax
	movzbl	(%rax), %ecx
	leaq	1(%rax), %rdx
	movq	%rdx, 0(%rbp)
	cmpb	$43, %cl
	je	.L50
	cmpb	$45, %cl
	jne	.L24
	movq	%rbp, %rdi
	call	term
	subl	%eax, %ebx
	jmp	.L21
.L50:
	movq	%rbp, %rdi
	call	term
	addl	%eax, %ebx
	jmp	.L21
.L24:
	imull	%ebx, %r12d
.L44:
	movzbl	1(%rax), %ecx
	jmp	.L15
.L47:
	movq	%rax, %rdx
	xorl	%r12d, %r12d
	jmp	.L15
.L8:
	addq	$1, %rdx
	movq	%rdx, (%rdi)
	call	term
	movl	%eax, %r12d
	.p2align 4,,10
	.p2align 3
.L11:
	movq	0(%rbp), %rax
	movzbl	(%rax), %ecx
	leaq	1(%rax), %rdx
	movq	%rdx, 0(%rbp)
	cmpb	$43, %cl
	je	.L51
	cmpb	$45, %cl
	jne	.L44
	movq	%rbp, %rdi
	call	term
	subl	%eax, %r12d
	jmp	.L11
.L51:
	movq	%rbp, %rdi
	call	term
	addl	%eax, %r12d
	jmp	.L11
.L46:
	jmp	.L42
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	term.cold, @function
term.cold:
.LFSB25:
.L42:
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	.cfi_offset 6, -24
	.cfi_offset 12, -16
	ud2
	.cfi_endproc
.LFE25:
	.text
	.size	term, .-term
	.section	.text.unlikely
	.size	term.cold, .-term.cold
.LCOLDE0:
	.text
.LHOTE0:
	.p2align 4
	.globl	factor
	.type	factor, @function
factor:
.LFB24:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rdx
	movq	%rdi, %r9
	movsbl	(%rdx), %eax
	cmpb	$40, %al
	je	.L53
	leal	-48(%rax), %ecx
	addq	$1, %rdx
	xorl	%r8d, %r8d
	cmpb	$9, %cl
	ja	.L64
	.p2align 4,,10
	.p2align 3
.L60:
	leal	(%r8,%r8,4), %ecx
	movq	%rdx, (%r9)
	addq	$1, %rdx
	leal	-48(%rax,%rcx,2), %r8d
	movsbl	-1(%rdx), %eax
	leal	-48(%rax), %ecx
	cmpb	$9, %cl
	jbe	.L60
.L64:
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L53:
	addq	$1, %rdx
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	movq	%rdx, (%rdi)
	call	term
	movl	%eax, %r8d
	.p2align 4,,10
	.p2align 3
.L56:
	movq	(%r9), %rax
	movzbl	(%rax), %edx
	addq	$1, %rax
	movq	%rax, (%r9)
	cmpb	$43, %dl
	je	.L66
	cmpb	$45, %dl
	jne	.L59
	movq	%r9, %rdi
	call	term
	subl	%eax, %r8d
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L66:
	movq	%r9, %rdi
	call	term
	addl	%eax, %r8d
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L59:
	movl	%r8d, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE24:
	.size	factor, .-factor
	.p2align 4
	.globl	expr
	.type	expr, @function
expr:
.LFB26:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	movq	%rdi, %r8
	call	term
	movl	%eax, %r9d
.L68:
	movq	(%r8), %rax
	movzbl	(%rax), %edx
	cmpb	$43, %dl
	je	.L73
.L69:
	cmpb	$45, %dl
	jne	.L67
	addq	$1, %rax
	movq	%r8, %rdi
	movq	%rax, (%r8)
	call	term
	subl	%eax, %r9d
	movq	(%r8), %rax
	movzbl	(%rax), %edx
	cmpb	$43, %dl
	jne	.L69
.L73:
	addq	$1, %rax
	movq	%r8, %rdi
	movq	%rax, (%r8)
	call	term
	addl	%eax, %r9d
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L67:
	movl	%r9d, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE26:
	.size	expr, .-expr
	.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:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC1(%rip), %rdi
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC3(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$136, %rsp
	.cfi_def_cfa_offset 176
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	leaq	16(%rsp), %rbp
	leaq	8(%rsp), %rbx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 4(%rsp)
	testl	%eax, %eax
	je	.L96
.L75:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	movq	%rbp, 8(%rsp)
	call	term
	movq	8(%rsp), %rsi
	movl	%eax, %r10d
	movzbl	(%rsi), %ecx
.L76:
	cmpb	$43, %cl
	je	.L111
.L77:
	cmpb	$45, %cl
	jne	.L79
	leaq	1(%rsi), %rax
	movq	%rax, 8(%rsp)
	movsbl	1(%rsi), %ecx
	cmpb	$40, %cl
	je	.L80
	leal	-48(%rcx), %edx
	xorl	%r11d, %r11d
	cmpb	$9, %dl
	ja	.L82
	.p2align 4,,10
	.p2align 3
.L81:
	leal	(%r11,%r11,4), %edx
	addq	$1, %rax
	leal	-48(%rcx,%rdx,2), %r11d
	movq	%rax, 8(%rsp)
	movsbl	(%rax), %ecx
	leal	-48(%rcx), %edx
	cmpb	$9, %dl
	jbe	.L81
.L82:
	movq	%rax, %rsi
.L83:
	cmpb	$42, %cl
	je	.L112
.L84:
	cmpb	$47, %cl
	jne	.L90
	leaq	1(%rsi), %rax
	movq	%rax, 8(%rsp)
	movsbl	1(%rsi), %ecx
	cmpb	$40, %cl
	je	.L91
	leal	-48(%rcx), %eax
	cmpb	$9, %al
	ja	.L113
	leaq	2(%rsi), %rax
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L95:
	leal	(%rdi,%rdi,4), %edx
	movq	%rax, 8(%rsp)
	movq	%rax, %rsi
	addq	$1, %rax
	leal	-48(%rcx,%rdx,2), %edi
	movsbl	-1(%rax), %ecx
	leal	-48(%rcx), %edx
	cmpb	$9, %dl
	jbe	.L95
	movl	%r11d, %eax
	cltd
	idivl	%edi
	movl	%eax, %r11d
.L115:
	cmpb	$42, %cl
	jne	.L84
.L112:
	leaq	1(%rsi), %rdi
	movq	%rdi, 8(%rsp)
	movsbl	1(%rsi), %ecx
	cmpb	$40, %cl
	je	.L85
	leal	-48(%rcx), %r8d
	leaq	2(%rsi), %rdx
	xorl	%eax, %eax
	cmpb	$9, %r8b
	ja	.L114
	.p2align 4,,10
	.p2align 3
.L88:
	leal	(%rax,%rax,4), %eax
	movq	%rdx, 8(%rsp)
	movq	%rdx, %rsi
	leaq	1(%rdx), %rdx
	leal	-48(%rcx,%rax,2), %eax
	movsbl	-1(%rdx), %ecx
	leal	-48(%rcx), %edi
	cmpb	$9, %dil
	jbe	.L88
	imull	%eax, %r11d
	jmp	.L83
	.p2align 4,,10
	.p2align 3
.L90:
	subl	%r11d, %r10d
	cmpb	$43, %cl
	jne	.L77
.L111:
	addq	$1, %rsi
	movq	%rbx, %rdi
	movq	%rsi, 8(%rsp)
	call	term
	movq	8(%rsp), %rsi
	addl	%eax, %r10d
	movzbl	(%rsi), %ecx
	jmp	.L76
	.p2align 4,,10
	.p2align 3
.L91:
	addq	$2, %rsi
	movq	%rbx, %rdi
	movq	%rsi, 8(%rsp)
	call	expr
	movl	%eax, %edi
	movq	8(%rsp), %rax
	leaq	1(%rax), %rsi
	movq	%rsi, 8(%rsp)
	movzbl	1(%rax), %ecx
	movl	%r11d, %eax
	cltd
	idivl	%edi
	movl	%eax, %r11d
	jmp	.L115
.L85:
	addq	$2, %rsi
	movq	%rbx, %rdi
	movq	%rsi, 8(%rsp)
	call	expr
	movl	%eax, %r8d
	movq	8(%rsp), %rax
	imull	%r8d, %r11d
	leaq	1(%rax), %rsi
	movq	%rsi, 8(%rsp)
	movzbl	1(%rax), %ecx
	jmp	.L83
.L114:
	movq	%rdi, %rsi
	xorl	%r11d, %r11d
	jmp	.L83
.L79:
	movl	%r10d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	4(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 4(%rsp)
	testl	%eax, %eax
	jne	.L75
.L96:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L116
	addq	$136, %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
.L80:
	.cfi_restore_state
	addq	$2, %rsi
	movq	%rbx, %rdi
	movq	%rsi, 8(%rsp)
	call	expr
	movq	8(%rsp), %rdx
	movl	%eax, %r11d
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rsp)
	movzbl	1(%rdx), %ecx
	jmp	.L82
.L116:
	call	__stack_chk_fail@PLT
.L113:
	jmp	.L107
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB27:
.L107:
	.cfi_def_cfa_offset 176
	.cfi_offset 3, -40
	.cfi_offset 6, -32
	.cfi_offset 12, -24
	.cfi_offset 13, -16
	ud2
	.cfi_endproc
.LFE27:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE4:
	.section	.text.startup
.LHOTE4:
	.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	number
	.type	number, @function
number:
.LFB23:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rdx
	movsbl	(%rdx), %eax
	leal	-48(%rax), %ecx
	cmpb	$9, %cl
	ja	.L4
	addq	$1, %rdx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L3:
	leal	(%r8,%r8,4), %ecx
	movq	%rdx, (%rdi)
	addq	$1, %rdx
	leal	-48(%rax,%rcx,2), %r8d
	movsbl	-1(%rdx), %eax
	leal	-48(%rax), %ecx
	cmpb	$9, %cl
	jbe	.L3
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%r8d, %r8d
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	number, .-number
	.section	.text.unlikely,"ax",@progbits
.LCOLDB0:
	.text
.LHOTB0:
	.p2align 4
	.globl	term
	.type	term, @function
term:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	(%rdi), %rdx
	movsbl	(%rdx), %ecx
	cmpb	$40, %cl
	je	.L8
	leal	-48(%rcx), %esi
	leaq	1(%rdx), %rax
	xorl	%r12d, %r12d
	cmpb	$9, %sil
	ja	.L15
	.p2align 4,,10
	.p2align 3
.L16:
	leal	(%r12,%r12,4), %edx
	movq	%rax, 0(%rbp)
	leal	-48(%rcx,%rdx,2), %r12d
	movsbl	(%rax), %ecx
	movq	%rax, %rdx
	addq	$1, %rax
	leal	-48(%rcx), %esi
	cmpb	$9, %sil
	jbe	.L16
.L15:
	cmpb	$42, %cl
	je	.L45
.L17:
	cmpb	$47, %cl
	jne	.L7
	leaq	1(%rdx), %rsi
	movq	%rsi, 0(%rbp)
	movsbl	1(%rdx), %ecx
	cmpb	$40, %cl
	je	.L27
	leal	-48(%rcx), %eax
	cmpb	$9, %al
	ja	.L46
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L28:
	leal	(%rbx,%rbx,4), %eax
	addq	$1, %rsi
	leal	-48(%rcx,%rax,2), %ebx
	movq	%rsi, 0(%rbp)
	movsbl	(%rsi), %ecx
	leal	-48(%rcx), %eax
	cmpb	$9, %al
	jbe	.L28
	movl	%r12d, %eax
	cltd
	idivl	%ebx
	movq	%rsi, %rdx
	movl	%eax, %r12d
.L49:
	cmpb	$42, %cl
	jne	.L17
.L45:
	leaq	1(%rdx), %rax
	movq	%rax, 0(%rbp)
	movsbl	1(%rdx), %ecx
	cmpb	$40, %cl
	je	.L18
	leal	-48(%rcx), %esi
	xorl	%edx, %edx
	cmpb	$9, %sil
	ja	.L47
	.p2align 4,,10
	.p2align 3
.L19:
	addq	$1, %rax
	leal	(%rdx,%rdx,4), %edx
	movq	%rax, 0(%rbp)
	leal	-48(%rcx,%rdx,2), %edx
	movsbl	(%rax), %ecx
	leal	-48(%rcx), %esi
	cmpb	$9, %sil
	jbe	.L19
	imull	%edx, %r12d
	movq	%rax, %rdx
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L7:
	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
.L27:
	.cfi_restore_state
	addq	$2, %rdx
	movq	%rbp, %rdi
	movq	%rdx, 0(%rbp)
	call	term
	movl	%eax, %ebx
.L30:
	movq	0(%rbp), %rax
	movzbl	(%rax), %edx
	leaq	1(%rax), %rsi
	movq	%rsi, 0(%rbp)
	cmpb	$43, %dl
	je	.L48
	cmpb	$45, %dl
	jne	.L33
	movq	%rbp, %rdi
	call	term
	subl	%eax, %ebx
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L33:
	movzbl	1(%rax), %ecx
	movl	%r12d, %eax
	cltd
	idivl	%ebx
	movq	%rsi, %rdx
	movl	%eax, %r12d
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L48:
	movq	%rbp, %rdi
	call	term
	addl	%eax, %ebx
	jmp	.L30
.L18:
	addq	$2, %rdx
	movq	%rbp, %rdi
	movq	%rdx, 0(%rbp)
	call	term
	movl	%eax, %ebx
	.p2align 4,,10
	.p2align 3
.L21:
	movq	0(%rbp), %rax
	movzbl	(%rax), %ecx
	leaq	1(%rax), %rdx
	movq	%rdx, 0(%rbp)
	cmpb	$43, %cl
	je	.L50
	cmpb	$45, %cl
	jne	.L24
	movq	%rbp, %rdi
	call	term
	subl	%eax, %ebx
	jmp	.L21
.L50:
	movq	%rbp, %rdi
	call	term
	addl	%eax, %ebx
	jmp	.L21
.L24:
	imull	%ebx, %r12d
.L44:
	movzbl	1(%rax), %ecx
	jmp	.L15
.L47:
	movq	%rax, %rdx
	xorl	%r12d, %r12d
	jmp	.L15
.L8:
	addq	$1, %rdx
	movq	%rdx, (%rdi)
	call	term
	movl	%eax, %r12d
	.p2align 4,,10
	.p2align 3
.L11:
	movq	0(%rbp), %rax
	movzbl	(%rax), %ecx
	leaq	1(%rax), %rdx
	movq	%rdx, 0(%rbp)
	cmpb	$43, %cl
	je	.L51
	cmpb	$45, %cl
	jne	.L44
	movq	%rbp, %rdi
	call	term
	subl	%eax, %r12d
	jmp	.L11
.L51:
	movq	%rbp, %rdi
	call	term
	addl	%eax, %r12d
	jmp	.L11
.L46:
	jmp	.L42
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	term.cold, @function
term.cold:
.LFSB25:
.L42:
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	.cfi_offset 6, -24
	.cfi_offset 12, -16
	ud2
	.cfi_endproc
.LFE25:
	.text
	.size	term, .-term
	.section	.text.unlikely
	.size	term.cold, .-term.cold
.LCOLDE0:
	.text
.LHOTE0:
	.p2align 4
	.globl	factor
	.type	factor, @function
factor:
.LFB24:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rdx
	movq	%rdi, %r9
	movsbl	(%rdx), %eax
	cmpb	$40, %al
	je	.L53
	leal	-48(%rax), %ecx
	addq	$1, %rdx
	xorl	%r8d, %r8d
	cmpb	$9, %cl
	ja	.L64
	.p2align 4,,10
	.p2align 3
.L60:
	leal	(%r8,%r8,4), %ecx
	movq	%rdx, (%r9)
	addq	$1, %rdx
	leal	-48(%rax,%rcx,2), %r8d
	movsbl	-1(%rdx), %eax
	leal	-48(%rax), %ecx
	cmpb	$9, %cl
	jbe	.L60
.L64:
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L53:
	addq	$1, %rdx
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	movq	%rdx, (%rdi)
	call	term
	movl	%eax, %r8d
	.p2align 4,,10
	.p2align 3
.L56:
	movq	(%r9), %rax
	movzbl	(%rax), %edx
	addq	$1, %rax
	movq	%rax, (%r9)
	cmpb	$43, %dl
	je	.L66
	cmpb	$45, %dl
	jne	.L59
	movq	%r9, %rdi
	call	term
	subl	%eax, %r8d
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L66:
	movq	%r9, %rdi
	call	term
	addl	%eax, %r8d
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L59:
	movl	%r8d, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE24:
	.size	factor, .-factor
	.p2align 4
	.globl	expr
	.type	expr, @function
expr:
.LFB26:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	movq	%rdi, %r8
	call	term
	movl	%eax, %r9d
.L68:
	movq	(%r8), %rax
	movzbl	(%rax), %edx
	cmpb	$43, %dl
	je	.L73
.L69:
	cmpb	$45, %dl
	jne	.L67
	addq	$1, %rax
	movq	%r8, %rdi
	movq	%rax, (%r8)
	call	term
	subl	%eax, %r9d
	movq	(%r8), %rax
	movzbl	(%rax), %edx
	cmpb	$43, %dl
	jne	.L69
.L73:
	addq	$1, %rax
	movq	%r8, %rdi
	movq	%rax, (%r8)
	call	term
	addl	%eax, %r9d
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L67:
	movl	%r9d, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE26:
	.size	expr, .-expr
	.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:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC1(%rip), %rdi
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC3(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$136, %rsp
	.cfi_def_cfa_offset 176
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	leaq	16(%rsp), %rbp
	leaq	8(%rsp), %rbx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 4(%rsp)
	testl	%eax, %eax
	je	.L96
.L75:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	movq	%rbp, 8(%rsp)
	call	term
	movq	8(%rsp), %rsi
	movl	%eax, %r10d
	movzbl	(%rsi), %ecx
.L76:
	cmpb	$43, %cl
	je	.L111
.L77:
	cmpb	$45, %cl
	jne	.L79
	leaq	1(%rsi), %rax
	movq	%rax, 8(%rsp)
	movsbl	1(%rsi), %ecx
	cmpb	$40, %cl
	je	.L80
	leal	-48(%rcx), %edx
	xorl	%r11d, %r11d
	cmpb	$9, %dl
	ja	.L82
	.p2align 4,,10
	.p2align 3
.L81:
	leal	(%r11,%r11,4), %edx
	addq	$1, %rax
	leal	-48(%rcx,%rdx,2), %r11d
	movq	%rax, 8(%rsp)
	movsbl	(%rax), %ecx
	leal	-48(%rcx), %edx
	cmpb	$9, %dl
	jbe	.L81
.L82:
	movq	%rax, %rsi
.L83:
	cmpb	$42, %cl
	je	.L112
.L84:
	cmpb	$47, %cl
	jne	.L90
	leaq	1(%rsi), %rax
	movq	%rax, 8(%rsp)
	movsbl	1(%rsi), %ecx
	cmpb	$40, %cl
	je	.L91
	leal	-48(%rcx), %eax
	cmpb	$9, %al
	ja	.L113
	leaq	2(%rsi), %rax
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L95:
	leal	(%rdi,%rdi,4), %edx
	movq	%rax, 8(%rsp)
	movq	%rax, %rsi
	addq	$1, %rax
	leal	-48(%rcx,%rdx,2), %edi
	movsbl	-1(%rax), %ecx
	leal	-48(%rcx), %edx
	cmpb	$9, %dl
	jbe	.L95
	movl	%r11d, %eax
	cltd
	idivl	%edi
	movl	%eax, %r11d
.L115:
	cmpb	$42, %cl
	jne	.L84
.L112:
	leaq	1(%rsi), %rdi
	movq	%rdi, 8(%rsp)
	movsbl	1(%rsi), %ecx
	cmpb	$40, %cl
	je	.L85
	leal	-48(%rcx), %r8d
	leaq	2(%rsi), %rdx
	xorl	%eax, %eax
	cmpb	$9, %r8b
	ja	.L114
	.p2align 4,,10
	.p2align 3
.L88:
	leal	(%rax,%rax,4), %eax
	movq	%rdx, 8(%rsp)
	movq	%rdx, %rsi
	leaq	1(%rdx), %rdx
	leal	-48(%rcx,%rax,2), %eax
	movsbl	-1(%rdx), %ecx
	leal	-48(%rcx), %edi
	cmpb	$9, %dil
	jbe	.L88
	imull	%eax, %r11d
	jmp	.L83
	.p2align 4,,10
	.p2align 3
.L90:
	subl	%r11d, %r10d
	cmpb	$43, %cl
	jne	.L77
.L111:
	addq	$1, %rsi
	movq	%rbx, %rdi
	movq	%rsi, 8(%rsp)
	call	term
	movq	8(%rsp), %rsi
	addl	%eax, %r10d
	movzbl	(%rsi), %ecx
	jmp	.L76
	.p2align 4,,10
	.p2align 3
.L91:
	addq	$2, %rsi
	movq	%rbx, %rdi
	movq	%rsi, 8(%rsp)
	call	expr
	movl	%eax, %edi
	movq	8(%rsp), %rax
	leaq	1(%rax), %rsi
	movq	%rsi, 8(%rsp)
	movzbl	1(%rax), %ecx
	movl	%r11d, %eax
	cltd
	idivl	%edi
	movl	%eax, %r11d
	jmp	.L115
.L85:
	addq	$2, %rsi
	movq	%rbx, %rdi
	movq	%rsi, 8(%rsp)
	call	expr
	movl	%eax, %r8d
	movq	8(%rsp), %rax
	imull	%r8d, %r11d
	leaq	1(%rax), %rsi
	movq	%rsi, 8(%rsp)
	movzbl	1(%rax), %ecx
	jmp	.L83
.L114:
	movq	%rdi, %rsi
	xorl	%r11d, %r11d
	jmp	.L83
.L79:
	movl	%r10d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	4(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 4(%rsp)
	testl	%eax, %eax
	jne	.L75
.L96:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L116
	addq	$136, %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
.L80:
	.cfi_restore_state
	addq	$2, %rsi
	movq	%rbx, %rdi
	movq	%rsi, 8(%rsp)
	call	expr
	movq	8(%rsp), %rdx
	movl	%eax, %r11d
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rsp)
	movzbl	1(%rdx), %ecx
	jmp	.L82
.L116:
	call	__stack_chk_fail@PLT
.L113:
	jmp	.L107
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB27:
.L107:
	.cfi_def_cfa_offset 176
	.cfi_offset 3, -40
	.cfi_offset 6, -32
	.cfi_offset 12, -24
	.cfi_offset 13, -16
	ud2
	.cfi_endproc
.LFE27:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE4:
	.section	.text.startup
.LHOTE4:
	.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>

int expr(char **);

int number(char **s) {
  int val = 0;
  while ('0' <= **s && **s <= '9') {
    val = val * 10 + **s - '0';
    (*s)++;
  }
  return val;
}

int factor(char **s) {
  if (**s == '(') {
    (*s)++;
    int val = expr(s);
    (*s)++;
    return val;
  }
  return number(s);
}

int term(char **s) {
  int val = factor(s);
  while (1) {
    if (**s == '*') {
      (*s)++;
      val *= factor(s);
    } else if (**s == '/') {
      (*s)++;
      val /= factor(s);
    } else {
      break;
    }
  }
  return val;
}

int expr(char **s) {
  int val = term(s);
  while (1) {
    if (**s == '+') {
      (*s)++;
      val += term(s);
    } else if (**s == '-') {
      (*s)++;
      val -= term(s);
    } else {
      break;
    }
  }
  return val;
}

int main() {
  int n;
  scanf("%d", &n);
  char s[101];
  while (n--) {
    scanf("%s", s);
    char *p = s;
    printf("%d\n", expr(&p));
  }
}
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>

int expr(char **);

int number(char **s) {
  int val = 0;
  while ('0' <= **s && **s <= '9') {
    val = val * 10 + **s - '0';
    (*s)++;
  }
  return val;
}

int factor(char **s) {
  if (**s == '(') {
    (*s)++;
    int val = expr(s);
    (*s)++;
    return val;
  }
  return number(s);
}

int term(char **s) {
  int val = factor(s);
  while (1) {
    if (**s == '*') {
      (*s)++;
      val *= factor(s);
    } else if (**s == '/') {
      (*s)++;
      val /= factor(s);
    } else {
      break;
    }
  }
  return val;
}

int expr(char **s) {
  int val = term(s);
  while (1) {
    if (**s == '+') {
      (*s)++;
      val += term(s);
    } else if (**s == '-') {
      (*s)++;
      val -= term(s);
    } else {
      break;
    }
  }
  return val;
}

int main() {
  int n;
  scanf("%d", &n);
  char s[101];
  while (n--) {
    scanf("%s", s);
    char *p = s;
    printf("%d\n", expr(&p));
  }
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	number
	.type	number, @function
number:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L4:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	addl	%edx, %eax
	subl	$48, %eax
	movl	%eax, -4(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
.L2:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$47, %al
	jle	.L3
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$57, %al
	jle	.L4
.L3:
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	number, .-number
	.globl	factor
	.type	factor, @function
factor:
.LFB1:
	.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	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$40, %al
	jne	.L7
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	expr
	movl	%eax, -4(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movl	-4(%rbp), %eax
	jmp	.L8
.L7:
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	number
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	factor, .-factor
	.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	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	factor
	movl	%eax, -4(%rbp)
.L14:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$42, %al
	jne	.L10
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	factor
	movl	-4(%rbp), %edx
	imull	%edx, %eax
	movl	%eax, -4(%rbp)
	jmp	.L14
.L10:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$47, %al
	jne	.L16
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	factor
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%eax, -4(%rbp)
	jmp	.L14
.L16:
	nop
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	term, .-term
	.globl	expr
	.type	expr, @function
expr:
.LFB3:
	.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	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	term
	movl	%eax, -4(%rbp)
.L22:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$43, %al
	jne	.L18
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	term
	addl	%eax, -4(%rbp)
	jmp	.L22
.L18:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$45, %al
	jne	.L24
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	term
	subl	%eax, -4(%rbp)
	jmp	.L22
.L24:
	nop
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	expr, .-expr
	.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
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L26
.L27:
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-112(%rbp), %rax
	movq	%rax, -120(%rbp)
	leaq	-120(%rbp), %rax
	movq	%rax, %rdi
	call	expr
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L26:
	movl	-124(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -124(%rbp)
	testl	%eax, %eax
	jne	.L27
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	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	number
	.type	number, @function
number:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L4:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	addl	%edx, %eax
	subl	$48, %eax
	movl	%eax, -4(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
.L2:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$47, %al
	jle	.L3
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$57, %al
	jle	.L4
.L3:
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	number, .-number
	.globl	factor
	.type	factor, @function
factor:
.LFB1:
	.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	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$40, %al
	jne	.L7
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	expr
	movl	%eax, -4(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movl	-4(%rbp), %eax
	jmp	.L8
.L7:
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	number
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	factor, .-factor
	.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	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	factor
	movl	%eax, -4(%rbp)
.L14:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$42, %al
	jne	.L10
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	factor
	movl	-4(%rbp), %edx
	imull	%edx, %eax
	movl	%eax, -4(%rbp)
	jmp	.L14
.L10:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$47, %al
	jne	.L16
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	factor
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%eax, -4(%rbp)
	jmp	.L14
.L16:
	nop
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	term, .-term
	.globl	expr
	.type	expr, @function
expr:
.LFB3:
	.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	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	term
	movl	%eax, -4(%rbp)
.L22:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$43, %al
	jne	.L18
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	term
	addl	%eax, -4(%rbp)
	jmp	.L22
.L18:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movzbl	(%rax), %eax
	cmpb	$45, %al
	jne	.L24
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	1(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	term
	subl	%eax, -4(%rbp)
	jmp	.L22
.L24:
	nop
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	expr, .-expr
	.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
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L26
.L27:
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-112(%rbp), %rax
	movq	%rax, -120(%rbp)
	leaq	-120(%rbp), %rax
	movq	%rax, %rdi
	call	expr
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L26:
	movl	-124(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -124(%rbp)
	testl	%eax, %eax
	jne	.L27
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	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:
