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

```c
// AOJ 2428: Lost Number
// 2017.10.19 bal4u@uu

#include <stdio.h>
#include <string.h>

#define MAX 1024

char q[10002][102]; int top;

char *expr();
char *factor(char *s, char *p, int *z, int *op)
{
	int x, k;

	if (*p == '(') {
		k = 0;
		if ((p = expr(s, p+1, &x, &k)) == NULL) return NULL;
		if (!k || (*p != ')' && *p != '.')) return NULL;
		p++;
		*op = 0;
	} else if (*p == '1' || *p == '0' || *p == '.') {
		x = 0;
		while (*p == '1' || *p == '0') x = (x << 1) + (*p++ - '0');
		while (*p == '.') {
			strcpy(q[top], s), q[top++][p-s] = '1';
			strcpy(q[top], s), q[top++][p-s] = '0';
			strcpy(q[top], s), q[top++][p-s] = '+';
			strcpy(q[top], s), q[top++][p-s] = '-';
			strcpy(q[top], s), q[top++][p-s] = '*';
			strcpy(q[top], s), q[top++][p-s] = '(';
			strcpy(q[top], s), q[top++][p-s] = ')';
			x = (x << 1) + 1, p++;
		}
		while (*p == '1' || *p == '0') x = (x << 1) + (*p++ - '0');
		*op = 0;
	} else return NULL;
	if (x < 0 || x >= MAX) return NULL;
	*z = x;
	return p;
}

char *term(char *s, char *p, int *z, int *op)
{
	int x, y, k = 0;

	if ((p = factor(s, p, &x, &k)) == NULL) return NULL;
	while (1) {
		if (*p == '.') {
			strcpy(q[top], s), q[top++][p-s] = '*';
			strcpy(q[top], s), q[top++][p-s] = '+';
			strcpy(q[top], s), q[top++][p-s] = '-';
			break;
		} else if (*p == '*') ;
		else break;
		if ((p = factor(s, p+1, &y, &k)) == NULL) return NULL;
		x *= y, k = 1;
		if (x < 0 || x >= MAX) return NULL;
	}
	*z = x;
	*op = k;
	return p;
}

char *expr(char *s, char *p, int *z, int *op)
{
	int x, y, t, k = 0;
	
	if ((p = term(s, p, &x, &k)) == NULL) return NULL;
	while (1) {
		if (*p == '.') {
			strcpy(q[top], s), q[top++][p-s] = '*';
			strcpy(q[top], s), q[top++][p-s] = '+';
			strcpy(q[top], s), q[top++][p-s] = '-';
			break;
		} else if (*p == '+') t = 1;
		else if (*p == '-') t = 0;
		else break;
		if ((p = term(s, p+1, &y, &k)) == NULL) return NULL; 
		if (t) x += y;
		else   x -= y;
		k = 1;
		if (x < 0 || x >= MAX) return NULL;
	}
	*z = x;
	*op = k;
	return p;
}

int main()
{
	int n, op, ans;
	char *p;

	scanf("%s", q[0]);
	ans = -1, top = 1;
	while (top > 0) {
		top--;
		if ((p = expr(q[top], q[top], &n, &op)) == NULL) continue;
		if (*p) continue;
		if (n >= 0 && n < MAX && n > ans) ans = n;
	}
	printf("%d\n", ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	q
	.bss
	.align 32
	.type	q, @object
	.size	q, 1020204
q:
	.zero	1020204
	.globl	top
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.zero	4
	.text
	.globl	factor
	.type	factor, @function
factor:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	%rcx, -48(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$40, %al
	jne	.L2
	movl	$0, -12(%rbp)
	movq	-32(%rbp), %rax
	leaq	1(%rax), %rsi
	leaq	-12(%rbp), %rcx
	leaq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	expr
	movq	%rax, -32(%rbp)
	cmpq	$0, -32(%rbp)
	jne	.L3
	movl	$0, %eax
	jmp	.L18
.L3:
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	je	.L5
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$41, %al
	je	.L6
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	je	.L6
.L5:
	movl	$0, %eax
	jmp	.L18
.L6:
	addq	$1, -32(%rbp)
	movq	-48(%rbp), %rax
	movl	$0, (%rax)
	jmp	.L7
.L2:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	je	.L8
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	je	.L8
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L9
.L8:
	movl	$0, -16(%rbp)
	jmp	.L10
.L11:
	movl	-16(%rbp), %eax
	leal	(%rax,%rax), %ecx
	movq	-32(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -32(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
.L10:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	je	.L11
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	je	.L11
	jmp	.L12
.L13:
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$49, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$48, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$43, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$45, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$42, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$40, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$41, (%rax)
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
	addq	$1, -32(%rbp)
.L12:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	je	.L13
	jmp	.L14
.L15:
	movl	-16(%rbp), %eax
	leal	(%rax,%rax), %ecx
	movq	-32(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -32(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
.L14:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	je	.L15
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	je	.L15
	movq	-48(%rbp), %rax
	movl	$0, (%rax)
	jmp	.L7
.L9:
	movl	$0, %eax
	jmp	.L18
.L7:
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	js	.L16
	movl	-16(%rbp), %eax
	cmpl	$1023, %eax
	jle	.L17
.L16:
	movl	$0, %eax
	jmp	.L18
.L17:
	movl	-16(%rbp), %edx
	movq	-40(%rbp), %rax
	movl	%edx, (%rax)
	movq	-32(%rbp), %rax
.L18:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	factor, .-factor
	.globl	term
	.type	term, @function
term:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	%rcx, -64(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -12(%rbp)
	leaq	-12(%rbp), %rcx
	leaq	-20(%rbp), %rdx
	movq	-48(%rbp), %rsi
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	factor
	movq	%rax, -48(%rbp)
	cmpq	$0, -48(%rbp)
	jne	.L21
	movl	$0, %eax
	jmp	.L29
.L21:
	movq	-48(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L23
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-48(%rbp), %rdx
	subq	-40(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$42, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-48(%rbp), %rdx
	subq	-40(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$43, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-48(%rbp), %rdx
	subq	-40(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$45, (%rax)
	jmp	.L24
.L23:
	movq	-48(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$42, %al
	jne	.L31
	movq	-48(%rbp), %rax
	leaq	1(%rax), %rsi
	leaq	-12(%rbp), %rcx
	leaq	-16(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	factor
	movq	%rax, -48(%rbp)
	cmpq	$0, -48(%rbp)
	jne	.L26
	movl	$0, %eax
	jmp	.L29
.L26:
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	$1, -12(%rbp)
	movl	-20(%rbp), %eax
	testl	%eax, %eax
	js	.L27
	movl	-20(%rbp), %eax
	cmpl	$1023, %eax
	jle	.L21
.L27:
	movl	$0, %eax
	jmp	.L29
.L31:
	nop
.L24:
	movl	-20(%rbp), %edx
	movq	-56(%rbp), %rax
	movl	%edx, (%rax)
	movl	-12(%rbp), %edx
	movq	-64(%rbp), %rax
	movl	%edx, (%rax)
	movq	-48(%rbp), %rax
.L29:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	term, .-term
	.globl	expr
	.type	expr, @function
expr:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	%rcx, -64(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -16(%rbp)
	leaq	-16(%rbp), %rcx
	leaq	-24(%rbp), %rdx
	movq	-48(%rbp), %rsi
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	term
	movq	%rax, -48(%rbp)
	cmpq	$0, -48(%rbp)
	jne	.L33
	movl	$0, %eax
	jmp	.L45
.L33:
	movq	-48(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L35
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-48(%rbp), %rdx
	subq	-40(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$42, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-48(%rbp), %rdx
	subq	-40(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$43, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-48(%rbp), %rdx
	subq	-40(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$45, (%rax)
	jmp	.L36
.L35:
	movq	-48(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$43, %al
	jne	.L37
	movl	$1, -12(%rbp)
	jmp	.L38
.L37:
	movq	-48(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$45, %al
	jne	.L47
	movl	$0, -12(%rbp)
.L38:
	movq	-48(%rbp), %rax
	leaq	1(%rax), %rsi
	leaq	-16(%rbp), %rcx
	leaq	-20(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	term
	movq	%rax, -48(%rbp)
	cmpq	$0, -48(%rbp)
	jne	.L40
	movl	$0, %eax
	jmp	.L45
.L40:
	cmpl	$0, -12(%rbp)
	je	.L41
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -24(%rbp)
	jmp	.L42
.L41:
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -24(%rbp)
.L42:
	movl	$1, -16(%rbp)
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	js	.L43
	movl	-24(%rbp), %eax
	cmpl	$1023, %eax
	jle	.L33
.L43:
	movl	$0, %eax
	jmp	.L45
.L47:
	nop
.L36:
	movl	-24(%rbp), %edx
	movq	-56(%rbp), %rax
	movl	%edx, (%rax)
	movl	-16(%rbp), %edx
	movq	-64(%rbp), %rax
	movl	%edx, (%rax)
	movq	-48(%rbp), %rax
.L45:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L46
	call	__stack_chk_fail@PLT
.L46:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	expr, .-expr
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	q(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$-1, -20(%rbp)
	movl	$1, top(%rip)
	jmp	.L49
.L52:
	movl	top(%rip), %eax
	subl	$1, %eax
	movl	%eax, top(%rip)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	leaq	(%rax,%rdx), %rsi
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	leaq	(%rax,%rdx), %rdi
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rdx, %rcx
	movq	%rax, %rdx
	call	expr
	movq	%rax, -16(%rbp)
	cmpq	$0, -16(%rbp)
	jne	.L50
	jmp	.L49
.L50:
	movq	-16(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L51
	jmp	.L49
.L51:
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	js	.L49
	movl	-28(%rbp), %eax
	cmpl	$1023, %eax
	jg	.L49
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L49
	movl	-28(%rbp), %eax
	movl	%eax, -20(%rbp)
.L49:
	movl	top(%rip), %eax
	testl	%eax, %eax
	jg	.L52
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L54
	call	__stack_chk_fail@PLT
.L54:
	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
	.p2align 4
	.globl	expr
	.type	expr, @function
expr:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdx, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rcx, %r13
	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	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	52(%rsp), %rbx
	leaq	44(%rsp), %rdx
	movl	$0, 52(%rsp)
	movq	%rbx, %rcx
	leaq	48(%rsp), %rbp
	call	term
	movq	%rax, %r12
	testq	%rax, %rax
	jne	.L2
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L21:
	movl	44(%rsp), %eax
	subl	48(%rsp), %eax
.L8:
	movl	%eax, 44(%rsp)
	movl	$1, 52(%rsp)
	cmpl	$1023, %eax
	ja	.L9
.L2:
	movzbl	(%r12), %eax
	cmpb	$46, %al
	je	.L25
	cmpb	$43, %al
	je	.L6
	cmpb	$45, %al
	jne	.L5
	leaq	1(%r12), %rsi
	movq	%rbx, %rcx
	movq	%rbp, %rdx
	movq	%r15, %rdi
	call	term
	movq	%rax, %r12
	testq	%rax, %rax
	jne	.L21
.L9:
	xorl	%r12d, %r12d
.L1:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r12, %rax
	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
.L6:
	.cfi_restore_state
	leaq	1(%r12), %rsi
	movq	%rbx, %rcx
	movq	%rbp, %rdx
	movq	%r15, %rdi
	call	term
	movq	%rax, %r12
	testq	%rax, %rax
	je	.L9
	movl	48(%rsp), %eax
	addl	44(%rsp), %eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L25:
	movslq	top(%rip), %r9
	leaq	q(%rip), %rbx
	movq	%r15, %rsi
	movq	%r9, %rbp
	imulq	$102, %r9, %r9
	leaq	(%r9,%rbx), %rcx
	movq	%r9, 8(%rsp)
	movq	%rcx, %rdi
	call	strcpy@PLT
	movq	8(%rsp), %r9
	leal	1(%rbp), %edx
	movq	%r15, %rsi
	movq	%rax, %rcx
	movq	%r12, %rax
	movl	%edx, top(%rip)
	subq	%r15, %rax
	leaq	102(%rbx,%r9), %rdi
	movl	%edx, 28(%rsp)
	movb	$42, (%rcx,%rax)
	movq	%r9, 16(%rsp)
	movq	%rax, (%rsp)
	call	strcpy@PLT
	movslq	28(%rsp), %rax
	leal	2(%rbp), %ecx
	movq	%r15, %rsi
	movq	(%rsp), %rdi
	movq	16(%rsp), %r9
	movl	%ecx, 8(%rsp)
	addl	$3, %ebp
	imulq	$102, %rax, %rax
	movl	%ecx, top(%rip)
	addq	%rbx, %rax
	movb	$43, (%rax,%rdi)
	leaq	204(%rbx,%r9), %rdi
	call	strcpy@PLT
	movslq	8(%rsp), %rcx
	movq	(%rsp), %rdi
	movl	%ebp, top(%rip)
	imulq	$102, %rcx, %rcx
	addq	%rcx, %rbx
	movb	$45, (%rbx,%rdi)
.L5:
	movl	44(%rsp), %eax
	movl	%eax, (%r14)
	movl	52(%rsp), %eax
	movl	%eax, 0(%r13)
	jmp	.L1
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE37:
	.size	expr, .-expr
	.p2align 4
	.globl	factor
	.type	factor, @function
factor:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rsi, %r8
	movq	%rdi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%rdx, 24(%rsp)
	movq	%rcx, 16(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	movzbl	(%rsi), %eax
	cmpb	$40, %al
	je	.L59
	leal	-48(%rax), %edx
	cmpb	$1, %dl
	jbe	.L54
	cmpb	$46, %al
	jne	.L31
	cmpb	$1, %dl
	ja	.L41
.L54:
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L36:
	subl	$48, %eax
	addq	$1, %r8
	movsbl	%al, %eax
	leal	(%rax,%rdx,2), %edx
	movzbl	(%r8), %eax
	leal	-48(%rax), %ecx
	cmpb	$1, %cl
	jbe	.L36
	movl	%edx, 32(%rsp)
	cmpb	$46, %al
	jne	.L37
.L35:
	movslq	top(%rip), %r14
	leaq	q(%rip), %r13
	imulq	$102, %r14, %rbp
	movq	%r14, %rbx
	addq	%r13, %rbp
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L60:
	movslq	%ebx, %r14
.L38:
	movq	%rbp, %rdi
	imulq	$102, %r14, %r14
	movq	%r15, %rsi
	movq	%r8, (%rsp)
	movl	%edx, 12(%rsp)
	call	strcpy@PLT
	movq	(%rsp), %r12
	leal	1(%rbx), %ecx
	leaq	102(%rbp), %rdi
	addq	%r13, %r14
	movq	%r15, %rsi
	movl	%ecx, top(%rip)
	subq	%r15, %r12
	movl	%ecx, 8(%rsp)
	movb	$49, (%r14,%r12)
	leal	2(%rbx), %r14d
	call	strcpy@PLT
	movslq	8(%rsp), %rcx
	movl	%r14d, top(%rip)
	movslq	%r14d, %r14
	imulq	$102, %r14, %r14
	leaq	204(%rbp), %rdi
	movq	%r15, %rsi
	imulq	$102, %rcx, %rcx
	addq	%r13, %r14
	addq	%r13, %rcx
	movb	$48, (%rcx,%r12)
	call	strcpy@PLT
	movb	$43, (%r14,%r12)
	leal	3(%rbx), %ecx
	movq	%r15, %rsi
	leaq	306(%rbp), %rdi
	movl	%ecx, top(%rip)
	leal	4(%rbx), %r14d
	movl	%ecx, 8(%rsp)
	call	strcpy@PLT
	movslq	8(%rsp), %rcx
	movl	%r14d, top(%rip)
	movslq	%r14d, %r14
	imulq	$102, %r14, %r14
	leaq	408(%rbp), %rdi
	movq	%r15, %rsi
	imulq	$102, %rcx, %rcx
	addq	%r13, %r14
	addq	%r13, %rcx
	movb	$45, (%rcx,%r12)
	call	strcpy@PLT
	movb	$42, (%r14,%r12)
	leal	5(%rbx), %ecx
	movq	%r15, %rsi
	leaq	510(%rbp), %rdi
	movl	%ecx, top(%rip)
	leal	6(%rbx), %r14d
	addl	$7, %ebx
	movl	%ecx, 8(%rsp)
	call	strcpy@PLT
	movslq	8(%rsp), %rcx
	movl	%r14d, top(%rip)
	movslq	%r14d, %r14
	imulq	$102, %r14, %r14
	leaq	612(%rbp), %rdi
	movq	%r15, %rsi
	addq	$714, %rbp
	imulq	$102, %rcx, %rcx
	addq	%r13, %r14
	addq	%r13, %rcx
	movb	$40, (%rcx,%r12)
	call	strcpy@PLT
	movq	(%rsp), %r8
	movl	12(%rsp), %edx
	movl	%ebx, top(%rip)
	movb	$41, (%r14,%r12)
	movzbl	1(%r8), %eax
	leal	1(%rdx,%rdx), %edx
	addq	$1, %r8
	movl	%edx, 32(%rsp)
	cmpb	$46, %al
	je	.L60
	leal	-48(%rax), %ecx
	cmpb	$1, %cl
	ja	.L37
	.p2align 4,,10
	.p2align 3
.L39:
	subl	$48, %eax
	addq	$1, %r8
	movsbl	%al, %eax
	leal	(%rax,%rdx,2), %edx
	movzbl	(%r8), %eax
	leal	-48(%rax), %ecx
	cmpb	$1, %cl
	jbe	.L39
.L37:
	movq	16(%rsp), %rax
	movl	$0, (%rax)
.L33:
	cmpl	$1023, %edx
	ja	.L31
	movq	24(%rsp), %rax
	movl	%edx, (%rax)
.L27:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L61
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r8, %rax
	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
.L59:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	1(%rsi), %rsi
	leaq	36(%rsp), %rcx
	movl	$0, 36(%rsp)
	leaq	32(%rsp), %rdx
	call	expr
	testq	%rax, %rax
	jne	.L29
	.p2align 4,,10
	.p2align 3
.L31:
	xorl	%r8d, %r8d
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L29:
	movl	36(%rsp), %edx
	testl	%edx, %edx
	je	.L31
	movzbl	(%rax), %edx
	cmpb	$41, %dl
	je	.L43
	cmpb	$46, %dl
	jne	.L31
.L43:
	leaq	1(%rax), %r8
	movq	16(%rsp), %rax
	movl	32(%rsp), %edx
	movl	$0, (%rax)
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L41:
	xorl	%edx, %edx
	jmp	.L35
.L61:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	factor, .-factor
	.p2align 4
	.globl	term
	.type	term, @function
term:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdx, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rcx, %r13
	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	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	52(%rsp), %rbx
	leaq	44(%rsp), %rdx
	movl	$0, 52(%rsp)
	movq	%rbx, %rcx
	leaq	48(%rsp), %rbp
	call	factor
	movq	%rax, %r12
	testq	%rax, %rax
	jne	.L63
	jmp	.L67
	.p2align 4,,10
	.p2align 3
.L65:
	cmpb	$42, %al
	jne	.L66
	leaq	1(%r12), %rsi
	movq	%rbx, %rcx
	movq	%rbp, %rdx
	movq	%r15, %rdi
	call	factor
	movq	%rax, %r12
	testq	%rax, %rax
	je	.L67
	movl	44(%rsp), %eax
	imull	48(%rsp), %eax
	movl	$1, 52(%rsp)
	movl	%eax, 44(%rsp)
	cmpl	$1023, %eax
	ja	.L67
.L63:
	movzbl	(%r12), %eax
	cmpb	$46, %al
	jne	.L65
	movslq	top(%rip), %r9
	leaq	q(%rip), %rbx
	movq	%r15, %rsi
	movq	%r9, %rbp
	imulq	$102, %r9, %r9
	leaq	(%r9,%rbx), %rcx
	movq	%r9, 8(%rsp)
	movq	%rcx, %rdi
	call	strcpy@PLT
	movq	8(%rsp), %r9
	leal	1(%rbp), %edx
	movq	%r15, %rsi
	movq	%rax, %rcx
	movq	%r12, %rax
	movl	%edx, top(%rip)
	subq	%r15, %rax
	leaq	102(%rbx,%r9), %rdi
	movl	%edx, 28(%rsp)
	movb	$42, (%rcx,%rax)
	movq	%r9, 16(%rsp)
	movq	%rax, (%rsp)
	call	strcpy@PLT
	movslq	28(%rsp), %rax
	leal	2(%rbp), %ecx
	movq	%r15, %rsi
	movq	(%rsp), %rdi
	movq	16(%rsp), %r9
	movl	%ecx, 8(%rsp)
	addl	$3, %ebp
	imulq	$102, %rax, %rax
	movl	%ecx, top(%rip)
	addq	%rbx, %rax
	movb	$43, (%rax,%rdi)
	leaq	204(%rbx,%r9), %rdi
	call	strcpy@PLT
	movslq	8(%rsp), %rcx
	movq	(%rsp), %rdi
	movl	%ebp, top(%rip)
	imulq	$102, %rcx, %rcx
	addq	%rcx, %rbx
	movb	$45, (%rbx,%rdi)
.L66:
	movl	44(%rsp), %eax
	movl	%eax, (%r14)
	movl	52(%rsp), %eax
	movl	%eax, 0(%r13)
	jmp	.L62
	.p2align 4,,10
	.p2align 3
.L67:
	xorl	%r12d, %r12d
.L62:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L75
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r12, %rax
	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
.L75:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.size	term, .-term
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB38:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	movl	$-1, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	q(%rip), %rbx
	movq	%rbx, %rsi
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r12
	movq	%rsp, %rbp
	call	__isoc99_scanf@PLT
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L78:
	subl	$1, %eax
	movq	%r12, %rcx
	movq	%rbp, %rdx
	movslq	%eax, %rdi
	movl	%eax, top(%rip)
	imulq	$102, %rdi, %rdi
	addq	%rbx, %rdi
	movq	%rdi, %rsi
	call	expr
	testq	%rax, %rax
	je	.L77
	cmpb	$0, (%rax)
	jne	.L77
	movl	(%rsp), %eax
	cmpl	%eax, %r13d
	movl	%eax, %edx
	cmovge	%r13d, %edx
	cmpl	$1024, %eax
	cmovb	%edx, %r13d
.L77:
	movl	top(%rip), %eax
	testl	%eax, %eax
	jg	.L78
	xorl	%eax, %eax
	movl	%r13d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L85
	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
.L85:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE38:
	.size	main, .-main
	.globl	top
	.bss
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.zero	4
	.globl	q
	.align 32
	.type	q, @object
	.size	q, 1020204
q:
	.zero	1020204
	.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	expr
	.type	expr, @function
expr:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdx, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rcx, %r13
	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	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	52(%rsp), %rbx
	leaq	44(%rsp), %rdx
	movl	$0, 52(%rsp)
	movq	%rbx, %rcx
	leaq	48(%rsp), %rbp
	call	term
	movq	%rax, %r12
	testq	%rax, %rax
	jne	.L2
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L21:
	movl	44(%rsp), %eax
	subl	48(%rsp), %eax
.L8:
	movl	%eax, 44(%rsp)
	movl	$1, 52(%rsp)
	cmpl	$1023, %eax
	ja	.L9
.L2:
	movzbl	(%r12), %eax
	cmpb	$46, %al
	je	.L25
	cmpb	$43, %al
	je	.L6
	cmpb	$45, %al
	jne	.L5
	leaq	1(%r12), %rsi
	movq	%rbx, %rcx
	movq	%rbp, %rdx
	movq	%r15, %rdi
	call	term
	movq	%rax, %r12
	testq	%rax, %rax
	jne	.L21
.L9:
	xorl	%r12d, %r12d
.L1:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r12, %rax
	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
.L6:
	.cfi_restore_state
	leaq	1(%r12), %rsi
	movq	%rbx, %rcx
	movq	%rbp, %rdx
	movq	%r15, %rdi
	call	term
	movq	%rax, %r12
	testq	%rax, %rax
	je	.L9
	movl	48(%rsp), %eax
	addl	44(%rsp), %eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L25:
	movslq	top(%rip), %r9
	leaq	q(%rip), %rbx
	movq	%r15, %rsi
	movq	%r9, %rbp
	imulq	$102, %r9, %r9
	leaq	(%r9,%rbx), %rcx
	movq	%r9, 8(%rsp)
	movq	%rcx, %rdi
	call	strcpy@PLT
	movq	8(%rsp), %r9
	leal	1(%rbp), %edx
	movq	%r15, %rsi
	movq	%rax, %rcx
	movq	%r12, %rax
	movl	%edx, top(%rip)
	subq	%r15, %rax
	leaq	102(%rbx,%r9), %rdi
	movl	%edx, 28(%rsp)
	movb	$42, (%rcx,%rax)
	movq	%r9, 16(%rsp)
	movq	%rax, (%rsp)
	call	strcpy@PLT
	movslq	28(%rsp), %rax
	leal	2(%rbp), %ecx
	movq	%r15, %rsi
	movq	(%rsp), %rdi
	movq	16(%rsp), %r9
	movl	%ecx, 8(%rsp)
	addl	$3, %ebp
	imulq	$102, %rax, %rax
	movl	%ecx, top(%rip)
	addq	%rbx, %rax
	movb	$43, (%rax,%rdi)
	leaq	204(%rbx,%r9), %rdi
	call	strcpy@PLT
	movslq	8(%rsp), %rcx
	movq	(%rsp), %rdi
	movl	%ebp, top(%rip)
	imulq	$102, %rcx, %rcx
	addq	%rcx, %rbx
	movb	$45, (%rbx,%rdi)
.L5:
	movl	44(%rsp), %eax
	movl	%eax, (%r14)
	movl	52(%rsp), %eax
	movl	%eax, 0(%r13)
	jmp	.L1
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE37:
	.size	expr, .-expr
	.p2align 4
	.globl	factor
	.type	factor, @function
factor:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rsi, %r8
	movq	%rdi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%rdx, 24(%rsp)
	movq	%rcx, 16(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	movzbl	(%rsi), %eax
	cmpb	$40, %al
	je	.L59
	leal	-48(%rax), %edx
	cmpb	$1, %dl
	jbe	.L54
	cmpb	$46, %al
	jne	.L31
	cmpb	$1, %dl
	ja	.L41
.L54:
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L36:
	subl	$48, %eax
	addq	$1, %r8
	movsbl	%al, %eax
	leal	(%rax,%rdx,2), %edx
	movzbl	(%r8), %eax
	leal	-48(%rax), %ecx
	cmpb	$1, %cl
	jbe	.L36
	movl	%edx, 32(%rsp)
	cmpb	$46, %al
	jne	.L37
.L35:
	movslq	top(%rip), %r14
	leaq	q(%rip), %r13
	imulq	$102, %r14, %rbp
	movq	%r14, %rbx
	addq	%r13, %rbp
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L60:
	movslq	%ebx, %r14
.L38:
	movq	%rbp, %rdi
	imulq	$102, %r14, %r14
	movq	%r15, %rsi
	movq	%r8, (%rsp)
	movl	%edx, 12(%rsp)
	call	strcpy@PLT
	movq	(%rsp), %r12
	leal	1(%rbx), %ecx
	leaq	102(%rbp), %rdi
	addq	%r13, %r14
	movq	%r15, %rsi
	movl	%ecx, top(%rip)
	subq	%r15, %r12
	movl	%ecx, 8(%rsp)
	movb	$49, (%r14,%r12)
	leal	2(%rbx), %r14d
	call	strcpy@PLT
	movslq	8(%rsp), %rcx
	movl	%r14d, top(%rip)
	movslq	%r14d, %r14
	imulq	$102, %r14, %r14
	leaq	204(%rbp), %rdi
	movq	%r15, %rsi
	imulq	$102, %rcx, %rcx
	addq	%r13, %r14
	addq	%r13, %rcx
	movb	$48, (%rcx,%r12)
	call	strcpy@PLT
	movb	$43, (%r14,%r12)
	leal	3(%rbx), %ecx
	movq	%r15, %rsi
	leaq	306(%rbp), %rdi
	movl	%ecx, top(%rip)
	leal	4(%rbx), %r14d
	movl	%ecx, 8(%rsp)
	call	strcpy@PLT
	movslq	8(%rsp), %rcx
	movl	%r14d, top(%rip)
	movslq	%r14d, %r14
	imulq	$102, %r14, %r14
	leaq	408(%rbp), %rdi
	movq	%r15, %rsi
	imulq	$102, %rcx, %rcx
	addq	%r13, %r14
	addq	%r13, %rcx
	movb	$45, (%rcx,%r12)
	call	strcpy@PLT
	movb	$42, (%r14,%r12)
	leal	5(%rbx), %ecx
	movq	%r15, %rsi
	leaq	510(%rbp), %rdi
	movl	%ecx, top(%rip)
	leal	6(%rbx), %r14d
	addl	$7, %ebx
	movl	%ecx, 8(%rsp)
	call	strcpy@PLT
	movslq	8(%rsp), %rcx
	movl	%r14d, top(%rip)
	movslq	%r14d, %r14
	imulq	$102, %r14, %r14
	leaq	612(%rbp), %rdi
	movq	%r15, %rsi
	addq	$714, %rbp
	imulq	$102, %rcx, %rcx
	addq	%r13, %r14
	addq	%r13, %rcx
	movb	$40, (%rcx,%r12)
	call	strcpy@PLT
	movq	(%rsp), %r8
	movl	12(%rsp), %edx
	movl	%ebx, top(%rip)
	movb	$41, (%r14,%r12)
	movzbl	1(%r8), %eax
	leal	1(%rdx,%rdx), %edx
	addq	$1, %r8
	movl	%edx, 32(%rsp)
	cmpb	$46, %al
	je	.L60
	leal	-48(%rax), %ecx
	cmpb	$1, %cl
	ja	.L37
	.p2align 4,,10
	.p2align 3
.L39:
	subl	$48, %eax
	addq	$1, %r8
	movsbl	%al, %eax
	leal	(%rax,%rdx,2), %edx
	movzbl	(%r8), %eax
	leal	-48(%rax), %ecx
	cmpb	$1, %cl
	jbe	.L39
.L37:
	movq	16(%rsp), %rax
	movl	$0, (%rax)
.L33:
	cmpl	$1023, %edx
	ja	.L31
	movq	24(%rsp), %rax
	movl	%edx, (%rax)
.L27:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L61
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r8, %rax
	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
.L59:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	1(%rsi), %rsi
	leaq	36(%rsp), %rcx
	movl	$0, 36(%rsp)
	leaq	32(%rsp), %rdx
	call	expr
	testq	%rax, %rax
	jne	.L29
	.p2align 4,,10
	.p2align 3
.L31:
	xorl	%r8d, %r8d
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L29:
	movl	36(%rsp), %edx
	testl	%edx, %edx
	je	.L31
	movzbl	(%rax), %edx
	cmpb	$41, %dl
	je	.L43
	cmpb	$46, %dl
	jne	.L31
.L43:
	leaq	1(%rax), %r8
	movq	16(%rsp), %rax
	movl	32(%rsp), %edx
	movl	$0, (%rax)
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L41:
	xorl	%edx, %edx
	jmp	.L35
.L61:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	factor, .-factor
	.p2align 4
	.globl	term
	.type	term, @function
term:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdx, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rcx, %r13
	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	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	52(%rsp), %rbx
	leaq	44(%rsp), %rdx
	movl	$0, 52(%rsp)
	movq	%rbx, %rcx
	leaq	48(%rsp), %rbp
	call	factor
	movq	%rax, %r12
	testq	%rax, %rax
	jne	.L63
	jmp	.L67
	.p2align 4,,10
	.p2align 3
.L65:
	cmpb	$42, %al
	jne	.L66
	leaq	1(%r12), %rsi
	movq	%rbx, %rcx
	movq	%rbp, %rdx
	movq	%r15, %rdi
	call	factor
	movq	%rax, %r12
	testq	%rax, %rax
	je	.L67
	movl	44(%rsp), %eax
	imull	48(%rsp), %eax
	movl	$1, 52(%rsp)
	movl	%eax, 44(%rsp)
	cmpl	$1023, %eax
	ja	.L67
.L63:
	movzbl	(%r12), %eax
	cmpb	$46, %al
	jne	.L65
	movslq	top(%rip), %r9
	leaq	q(%rip), %rbx
	movq	%r15, %rsi
	movq	%r9, %rbp
	imulq	$102, %r9, %r9
	leaq	(%r9,%rbx), %rcx
	movq	%r9, 8(%rsp)
	movq	%rcx, %rdi
	call	strcpy@PLT
	movq	8(%rsp), %r9
	leal	1(%rbp), %edx
	movq	%r15, %rsi
	movq	%rax, %rcx
	movq	%r12, %rax
	movl	%edx, top(%rip)
	subq	%r15, %rax
	leaq	102(%rbx,%r9), %rdi
	movl	%edx, 28(%rsp)
	movb	$42, (%rcx,%rax)
	movq	%r9, 16(%rsp)
	movq	%rax, (%rsp)
	call	strcpy@PLT
	movslq	28(%rsp), %rax
	leal	2(%rbp), %ecx
	movq	%r15, %rsi
	movq	(%rsp), %rdi
	movq	16(%rsp), %r9
	movl	%ecx, 8(%rsp)
	addl	$3, %ebp
	imulq	$102, %rax, %rax
	movl	%ecx, top(%rip)
	addq	%rbx, %rax
	movb	$43, (%rax,%rdi)
	leaq	204(%rbx,%r9), %rdi
	call	strcpy@PLT
	movslq	8(%rsp), %rcx
	movq	(%rsp), %rdi
	movl	%ebp, top(%rip)
	imulq	$102, %rcx, %rcx
	addq	%rcx, %rbx
	movb	$45, (%rbx,%rdi)
.L66:
	movl	44(%rsp), %eax
	movl	%eax, (%r14)
	movl	52(%rsp), %eax
	movl	%eax, 0(%r13)
	jmp	.L62
	.p2align 4,,10
	.p2align 3
.L67:
	xorl	%r12d, %r12d
.L62:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L75
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r12, %rax
	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
.L75:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.size	term, .-term
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB38:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	movl	$-1, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	q(%rip), %rbx
	movq	%rbx, %rsi
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r12
	movq	%rsp, %rbp
	call	__isoc99_scanf@PLT
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L78:
	subl	$1, %eax
	movq	%r12, %rcx
	movq	%rbp, %rdx
	movslq	%eax, %rdi
	movl	%eax, top(%rip)
	imulq	$102, %rdi, %rdi
	addq	%rbx, %rdi
	movq	%rdi, %rsi
	call	expr
	testq	%rax, %rax
	je	.L77
	cmpb	$0, (%rax)
	jne	.L77
	movl	(%rsp), %eax
	cmpl	%eax, %r13d
	movl	%eax, %edx
	cmovge	%r13d, %edx
	cmpl	$1024, %eax
	cmovb	%edx, %r13d
.L77:
	movl	top(%rip), %eax
	testl	%eax, %eax
	jg	.L78
	xorl	%eax, %eax
	movl	%r13d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L85
	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
.L85:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE38:
	.size	main, .-main
	.globl	top
	.bss
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.zero	4
	.globl	q
	.align 32
	.type	q, @object
	.size	q, 1020204
q:
	.zero	1020204
	.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:

// AOJ 2428: Lost Number
// 2017.10.19 bal4u@uu

#include <stdio.h>
#include <string.h>

#define MAX 1024

char q[10002][102]; int top;

char *expr();
char *factor(char *s, char *p, int *z, int *op)
{
	int x, k;

	if (*p == '(') {
		k = 0;
		if ((p = expr(s, p+1, &x, &k)) == NULL) return NULL;
		if (!k || (*p != ')' && *p != '.')) return NULL;
		p++;
		*op = 0;
	} else if (*p == '1' || *p == '0' || *p == '.') {
		x = 0;
		while (*p == '1' || *p == '0') x = (x << 1) + (*p++ - '0');
		while (*p == '.') {
			strcpy(q[top], s), q[top++][p-s] = '1';
			strcpy(q[top], s), q[top++][p-s] = '0';
			strcpy(q[top], s), q[top++][p-s] = '+';
			strcpy(q[top], s), q[top++][p-s] = '-';
			strcpy(q[top], s), q[top++][p-s] = '*';
			strcpy(q[top], s), q[top++][p-s] = '(';
			strcpy(q[top], s), q[top++][p-s] = ')';
			x = (x << 1) + 1, p++;
		}
		while (*p == '1' || *p == '0') x = (x << 1) + (*p++ - '0');
		*op = 0;
	} else return NULL;
	if (x < 0 || x >= MAX) return NULL;
	*z = x;
	return p;
}

char *term(char *s, char *p, int *z, int *op)
{
	int x, y, k = 0;

	if ((p = factor(s, p, &x, &k)) == NULL) return NULL;
	while (1) {
		if (*p == '.') {
			strcpy(q[top], s), q[top++][p-s] = '*';
			strcpy(q[top], s), q[top++][p-s] = '+';
			strcpy(q[top], s), q[top++][p-s] = '-';
			break;
		} else if (*p == '*') ;
		else break;
		if ((p = factor(s, p+1, &y, &k)) == NULL) return NULL;
		x *= y, k = 1;
		if (x < 0 || x >= MAX) return NULL;
	}
	*z = x;
	*op = k;
	return p;
}

char *expr(char *s, char *p, int *z, int *op)
{
	int x, y, t, k = 0;
	
	if ((p = term(s, p, &x, &k)) == NULL) return NULL;
	while (1) {
		if (*p == '.') {
			strcpy(q[top], s), q[top++][p-s] = '*';
			strcpy(q[top], s), q[top++][p-s] = '+';
			strcpy(q[top], s), q[top++][p-s] = '-';
			break;
		} else if (*p == '+') t = 1;
		else if (*p == '-') t = 0;
		else break;
		if ((p = term(s, p+1, &y, &k)) == NULL) return NULL; 
		if (t) x += y;
		else   x -= y;
		k = 1;
		if (x < 0 || x >= MAX) return NULL;
	}
	*z = x;
	*op = k;
	return p;
}

int main()
{
	int n, op, ans;
	char *p;

	scanf("%s", q[0]);
	ans = -1, top = 1;
	while (top > 0) {
		top--;
		if ((p = expr(q[top], q[top], &n, &op)) == NULL) continue;
		if (*p) continue;
		if (n >= 0 && n < MAX && n > ans) ans = n;
	}
	printf("%d\n", ans);
	return 0;
}
0.010621136904092388
 0.1.
 100
 .01.
 101
 .10.
 010
 .00.
 110
 011

-1
 7
 4
 11
 5
 13
 2
 9
 6
 3

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

```c
// AOJ 2428: Lost Number
// 2017.10.19 bal4u@uu

#include <stdio.h>
#include <string.h>

#define MAX 1024

char q[10002][102]; int top;

char *expr();
char *factor(char *s, char *p, int *z, int *op)
{
	int x, k;

	if (*p == '(') {
		k = 0;
		if ((p = expr(s, p+1, &x, &k)) == NULL) return NULL;
		if (!k || (*p != ')' && *p != '.')) return NULL;
		p++;
		*op = 0;
	} else if (*p == '1' || *p == '0' || *p == '.') {
		x = 0;
		while (*p == '1' || *p == '0') x = (x << 1) + (*p++ - '0');
		while (*p == '.') {
			strcpy(q[top], s), q[top++][p-s] = '1';
			strcpy(q[top], s), q[top++][p-s] = '0';
			strcpy(q[top], s), q[top++][p-s] = '+';
			strcpy(q[top], s), q[top++][p-s] = '-';
			strcpy(q[top], s), q[top++][p-s] = '*';
			strcpy(q[top], s), q[top++][p-s] = '(';
			strcpy(q[top], s), q[top++][p-s] = ')';
			x = (x << 1) + 1, p++;
		}
		while (*p == '1' || *p == '0') x = (x << 1) + (*p++ - '0');
		*op = 0;
	} else return NULL;
	if (x < 0 || x >= MAX) return NULL;
	*z = x;
	return p;
}

char *term(char *s, char *p, int *z, int *op)
{
	int x, y, k = 0;

	if ((p = factor(s, p, &x, &k)) == NULL) return NULL;
	while (1) {
		if (*p == '.') {
			strcpy(q[top], s), q[top++][p-s] = '*';
			strcpy(q[top], s), q[top++][p-s] = '+';
			strcpy(q[top], s), q[top++][p-s] = '-';
			break;
		} else if (*p == '*') ;
		else break;
		if ((p = factor(s, p+1, &y, &k)) == NULL) return NULL;
		x *= y, k = 1;
		if (x < 0 || x >= MAX) return NULL;
	}
	*z = x;
	*op = k;
	return p;
}

char *expr(char *s, char *p, int *z, int *op)
{
	int x, y, t, k = 0;
	
	if ((p = term(s, p, &x, &k)) == NULL) return NULL;
	while (1) {
		if (*p == '.') {
			strcpy(q[top], s), q[top++][p-s] = '*';
			strcpy(q[top], s), q[top++][p-s] = '+';
			strcpy(q[top], s), q[top++][p-s] = '-';
			break;
		} else if (*p == '+') t = 1;
		else if (*p == '-') t = 0;
		else break;
		if ((p = term(s, p+1, &y, &k)) == NULL) return NULL; 
		if (t) x += y;
		else   x -= y;
		k = 1;
		if (x < 0 || x >= MAX) return NULL;
	}
	*z = x;
	*op = k;
	return p;
}

int main()
{
	int n, op, ans;
	char *p;

	scanf("%s", q[0]);
	ans = -1, top = 1;
	while (top > 0) {
		top--;
		if ((p = expr(q[top], q[top], &n, &op)) == NULL) continue;
		if (*p) continue;
		if (n >= 0 && n < MAX && n > ans) ans = n;
	}
	printf("%d\n", ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	q
	.bss
	.align 32
	.type	q, @object
	.size	q, 1020204
q:
	.zero	1020204
	.globl	top
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.zero	4
	.text
	.globl	factor
	.type	factor, @function
factor:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	%rcx, -48(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$40, %al
	jne	.L2
	movl	$0, -12(%rbp)
	movq	-32(%rbp), %rax
	leaq	1(%rax), %rsi
	leaq	-12(%rbp), %rcx
	leaq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	expr
	movq	%rax, -32(%rbp)
	cmpq	$0, -32(%rbp)
	jne	.L3
	movl	$0, %eax
	jmp	.L18
.L3:
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	je	.L5
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$41, %al
	je	.L6
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	je	.L6
.L5:
	movl	$0, %eax
	jmp	.L18
.L6:
	addq	$1, -32(%rbp)
	movq	-48(%rbp), %rax
	movl	$0, (%rax)
	jmp	.L7
.L2:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	je	.L8
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	je	.L8
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L9
.L8:
	movl	$0, -16(%rbp)
	jmp	.L10
.L11:
	movl	-16(%rbp), %eax
	leal	(%rax,%rax), %ecx
	movq	-32(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -32(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
.L10:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	je	.L11
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	je	.L11
	jmp	.L12
.L13:
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$49, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$48, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$43, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$45, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$42, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$40, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$41, (%rax)
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
	addq	$1, -32(%rbp)
.L12:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	je	.L13
	jmp	.L14
.L15:
	movl	-16(%rbp), %eax
	leal	(%rax,%rax), %ecx
	movq	-32(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -32(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
.L14:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	je	.L15
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	je	.L15
	movq	-48(%rbp), %rax
	movl	$0, (%rax)
	jmp	.L7
.L9:
	movl	$0, %eax
	jmp	.L18
.L7:
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	js	.L16
	movl	-16(%rbp), %eax
	cmpl	$1023, %eax
	jle	.L17
.L16:
	movl	$0, %eax
	jmp	.L18
.L17:
	movl	-16(%rbp), %edx
	movq	-40(%rbp), %rax
	movl	%edx, (%rax)
	movq	-32(%rbp), %rax
.L18:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	factor, .-factor
	.globl	term
	.type	term, @function
term:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	%rcx, -64(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -12(%rbp)
	leaq	-12(%rbp), %rcx
	leaq	-20(%rbp), %rdx
	movq	-48(%rbp), %rsi
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	factor
	movq	%rax, -48(%rbp)
	cmpq	$0, -48(%rbp)
	jne	.L21
	movl	$0, %eax
	jmp	.L29
.L21:
	movq	-48(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L23
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-48(%rbp), %rdx
	subq	-40(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$42, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-48(%rbp), %rdx
	subq	-40(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$43, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-48(%rbp), %rdx
	subq	-40(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$45, (%rax)
	jmp	.L24
.L23:
	movq	-48(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$42, %al
	jne	.L31
	movq	-48(%rbp), %rax
	leaq	1(%rax), %rsi
	leaq	-12(%rbp), %rcx
	leaq	-16(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	factor
	movq	%rax, -48(%rbp)
	cmpq	$0, -48(%rbp)
	jne	.L26
	movl	$0, %eax
	jmp	.L29
.L26:
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	$1, -12(%rbp)
	movl	-20(%rbp), %eax
	testl	%eax, %eax
	js	.L27
	movl	-20(%rbp), %eax
	cmpl	$1023, %eax
	jle	.L21
.L27:
	movl	$0, %eax
	jmp	.L29
.L31:
	nop
.L24:
	movl	-20(%rbp), %edx
	movq	-56(%rbp), %rax
	movl	%edx, (%rax)
	movl	-12(%rbp), %edx
	movq	-64(%rbp), %rax
	movl	%edx, (%rax)
	movq	-48(%rbp), %rax
.L29:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	term, .-term
	.globl	expr
	.type	expr, @function
expr:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	%rcx, -64(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -16(%rbp)
	leaq	-16(%rbp), %rcx
	leaq	-24(%rbp), %rdx
	movq	-48(%rbp), %rsi
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	term
	movq	%rax, -48(%rbp)
	cmpq	$0, -48(%rbp)
	jne	.L33
	movl	$0, %eax
	jmp	.L45
.L33:
	movq	-48(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L35
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-48(%rbp), %rdx
	subq	-40(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$42, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-48(%rbp), %rdx
	subq	-40(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$43, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-48(%rbp), %rdx
	subq	-40(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$45, (%rax)
	jmp	.L36
.L35:
	movq	-48(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$43, %al
	jne	.L37
	movl	$1, -12(%rbp)
	jmp	.L38
.L37:
	movq	-48(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$45, %al
	jne	.L47
	movl	$0, -12(%rbp)
.L38:
	movq	-48(%rbp), %rax
	leaq	1(%rax), %rsi
	leaq	-16(%rbp), %rcx
	leaq	-20(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	term
	movq	%rax, -48(%rbp)
	cmpq	$0, -48(%rbp)
	jne	.L40
	movl	$0, %eax
	jmp	.L45
.L40:
	cmpl	$0, -12(%rbp)
	je	.L41
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -24(%rbp)
	jmp	.L42
.L41:
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -24(%rbp)
.L42:
	movl	$1, -16(%rbp)
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	js	.L43
	movl	-24(%rbp), %eax
	cmpl	$1023, %eax
	jle	.L33
.L43:
	movl	$0, %eax
	jmp	.L45
.L47:
	nop
.L36:
	movl	-24(%rbp), %edx
	movq	-56(%rbp), %rax
	movl	%edx, (%rax)
	movl	-16(%rbp), %edx
	movq	-64(%rbp), %rax
	movl	%edx, (%rax)
	movq	-48(%rbp), %rax
.L45:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L46
	call	__stack_chk_fail@PLT
.L46:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	expr, .-expr
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	q(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$-1, -20(%rbp)
	movl	$1, top(%rip)
	jmp	.L49
.L52:
	movl	top(%rip), %eax
	subl	$1, %eax
	movl	%eax, top(%rip)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	leaq	(%rax,%rdx), %rsi
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	leaq	(%rax,%rdx), %rdi
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rdx, %rcx
	movq	%rax, %rdx
	call	expr
	movq	%rax, -16(%rbp)
	cmpq	$0, -16(%rbp)
	jne	.L50
	jmp	.L49
.L50:
	movq	-16(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L51
	jmp	.L49
.L51:
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	js	.L49
	movl	-28(%rbp), %eax
	cmpl	$1023, %eax
	jg	.L49
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L49
	movl	-28(%rbp), %eax
	movl	%eax, -20(%rbp)
.L49:
	movl	top(%rip), %eax
	testl	%eax, %eax
	jg	.L52
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L54
	call	__stack_chk_fail@PLT
.L54:
	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	q
	.bss
	.align 32
	.type	q, @object
	.size	q, 1020204
q:
	.zero	1020204
	.globl	top
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.zero	4
	.text
	.globl	factor
	.type	factor, @function
factor:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	%rcx, -48(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$40, %al
	jne	.L2
	movl	$0, -12(%rbp)
	movq	-32(%rbp), %rax
	leaq	1(%rax), %rsi
	leaq	-12(%rbp), %rcx
	leaq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	expr
	movq	%rax, -32(%rbp)
	cmpq	$0, -32(%rbp)
	jne	.L3
	movl	$0, %eax
	jmp	.L18
.L3:
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	je	.L5
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$41, %al
	je	.L6
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	je	.L6
.L5:
	movl	$0, %eax
	jmp	.L18
.L6:
	addq	$1, -32(%rbp)
	movq	-48(%rbp), %rax
	movl	$0, (%rax)
	jmp	.L7
.L2:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	je	.L8
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	je	.L8
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L9
.L8:
	movl	$0, -16(%rbp)
	jmp	.L10
.L11:
	movl	-16(%rbp), %eax
	leal	(%rax,%rax), %ecx
	movq	-32(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -32(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
.L10:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	je	.L11
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	je	.L11
	jmp	.L12
.L13:
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$49, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$48, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$43, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$45, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$42, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$40, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-32(%rbp), %rdx
	subq	-24(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$41, (%rax)
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
	addq	$1, -32(%rbp)
.L12:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	je	.L13
	jmp	.L14
.L15:
	movl	-16(%rbp), %eax
	leal	(%rax,%rax), %ecx
	movq	-32(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -32(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
.L14:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$49, %al
	je	.L15
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	je	.L15
	movq	-48(%rbp), %rax
	movl	$0, (%rax)
	jmp	.L7
.L9:
	movl	$0, %eax
	jmp	.L18
.L7:
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	js	.L16
	movl	-16(%rbp), %eax
	cmpl	$1023, %eax
	jle	.L17
.L16:
	movl	$0, %eax
	jmp	.L18
.L17:
	movl	-16(%rbp), %edx
	movq	-40(%rbp), %rax
	movl	%edx, (%rax)
	movq	-32(%rbp), %rax
.L18:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	factor, .-factor
	.globl	term
	.type	term, @function
term:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	%rcx, -64(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -12(%rbp)
	leaq	-12(%rbp), %rcx
	leaq	-20(%rbp), %rdx
	movq	-48(%rbp), %rsi
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	factor
	movq	%rax, -48(%rbp)
	cmpq	$0, -48(%rbp)
	jne	.L21
	movl	$0, %eax
	jmp	.L29
.L21:
	movq	-48(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L23
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-48(%rbp), %rdx
	subq	-40(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$42, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-48(%rbp), %rdx
	subq	-40(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$43, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-48(%rbp), %rdx
	subq	-40(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$45, (%rax)
	jmp	.L24
.L23:
	movq	-48(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$42, %al
	jne	.L31
	movq	-48(%rbp), %rax
	leaq	1(%rax), %rsi
	leaq	-12(%rbp), %rcx
	leaq	-16(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	factor
	movq	%rax, -48(%rbp)
	cmpq	$0, -48(%rbp)
	jne	.L26
	movl	$0, %eax
	jmp	.L29
.L26:
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	$1, -12(%rbp)
	movl	-20(%rbp), %eax
	testl	%eax, %eax
	js	.L27
	movl	-20(%rbp), %eax
	cmpl	$1023, %eax
	jle	.L21
.L27:
	movl	$0, %eax
	jmp	.L29
.L31:
	nop
.L24:
	movl	-20(%rbp), %edx
	movq	-56(%rbp), %rax
	movl	%edx, (%rax)
	movl	-12(%rbp), %edx
	movq	-64(%rbp), %rax
	movl	%edx, (%rax)
	movq	-48(%rbp), %rax
.L29:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	term, .-term
	.globl	expr
	.type	expr, @function
expr:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	%rcx, -64(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -16(%rbp)
	leaq	-16(%rbp), %rcx
	leaq	-24(%rbp), %rdx
	movq	-48(%rbp), %rsi
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	term
	movq	%rax, -48(%rbp)
	cmpq	$0, -48(%rbp)
	jne	.L33
	movl	$0, %eax
	jmp	.L45
.L33:
	movq	-48(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L35
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-48(%rbp), %rdx
	subq	-40(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$42, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-48(%rbp), %rdx
	subq	-40(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$43, (%rax)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	addq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	top(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, top(%rip)
	movq	-48(%rbp), %rdx
	subq	-40(%rbp), %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	leaq	q(%rip), %rax
	addq	%rdx, %rax
	movb	$45, (%rax)
	jmp	.L36
.L35:
	movq	-48(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$43, %al
	jne	.L37
	movl	$1, -12(%rbp)
	jmp	.L38
.L37:
	movq	-48(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$45, %al
	jne	.L47
	movl	$0, -12(%rbp)
.L38:
	movq	-48(%rbp), %rax
	leaq	1(%rax), %rsi
	leaq	-16(%rbp), %rcx
	leaq	-20(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	term
	movq	%rax, -48(%rbp)
	cmpq	$0, -48(%rbp)
	jne	.L40
	movl	$0, %eax
	jmp	.L45
.L40:
	cmpl	$0, -12(%rbp)
	je	.L41
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -24(%rbp)
	jmp	.L42
.L41:
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -24(%rbp)
.L42:
	movl	$1, -16(%rbp)
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	js	.L43
	movl	-24(%rbp), %eax
	cmpl	$1023, %eax
	jle	.L33
.L43:
	movl	$0, %eax
	jmp	.L45
.L47:
	nop
.L36:
	movl	-24(%rbp), %edx
	movq	-56(%rbp), %rax
	movl	%edx, (%rax)
	movl	-16(%rbp), %edx
	movq	-64(%rbp), %rax
	movl	%edx, (%rax)
	movq	-48(%rbp), %rax
.L45:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L46
	call	__stack_chk_fail@PLT
.L46:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	expr, .-expr
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	q(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$-1, -20(%rbp)
	movl	$1, top(%rip)
	jmp	.L49
.L52:
	movl	top(%rip), %eax
	subl	$1, %eax
	movl	%eax, top(%rip)
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	leaq	(%rax,%rdx), %rsi
	movl	top(%rip), %eax
	cltq
	imulq	$102, %rax, %rax
	leaq	q(%rip), %rdx
	leaq	(%rax,%rdx), %rdi
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rdx, %rcx
	movq	%rax, %rdx
	call	expr
	movq	%rax, -16(%rbp)
	cmpq	$0, -16(%rbp)
	jne	.L50
	jmp	.L49
.L50:
	movq	-16(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L51
	jmp	.L49
.L51:
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	js	.L49
	movl	-28(%rbp), %eax
	cmpl	$1023, %eax
	jg	.L49
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L49
	movl	-28(%rbp), %eax
	movl	%eax, -20(%rbp)
.L49:
	movl	top(%rip), %eax
	testl	%eax, %eax
	jg	.L52
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L54
	call	__stack_chk_fail@PLT
.L54:
	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:
