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

```c
// AOJ 2710 An Equation in a Mine
// 2018.2.14 bal4u

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

#define INF 0x10101010

unsigned char s[202], sgn[202], num[202];
int min[202][202], max[202][202];

int main()
{
	int n, i, j, k, l, x;
	unsigned char *p, *qs, *qn;

	fgets(p=s, 202, stdin);
	qs = sgn, qn = num;	for (i = 0; *p >= ' '; i++) {
		if (isdigit(*p)) *qn++ = i;
		else if (*p == '+' || *p == '-') *qs++ = i;
		p++;
	}
	n = qn - num;

	memset(min,  INF, sizeof(min));
	memset(max, -INF, sizeof(max));
    for (i = 0; i < n; i++) min[i][i] = max[i][i] = s[num[i]] & 0xf;

	for(l = 1; l < n ; l++) for(i = 0; (j=i+l) < n; i++) {
		for (k = i; k < j; k++) {
			if (  i != k && (s[num[  i]+1] == ')' || s[num[k]-1] == '(')) continue;
			if (k+1 != j && (s[num[k+1]+1] == ')' || s[num[j]-1] == '(')) continue;

			if (s[sgn[k]] == '+') {
				x = max[i][k] + max[k+1][j];
				if (max[i][j] < x) max[i][j] = x;
				x = min[i][k] + min[k+1][j];
				if (min[i][j] > x) min[i][j] = x;
			} else {
				x = max[i][k] - min[k+1][j];
				if (max[i][j] < x) max[i][j] = x;
				x = min[i][k] - max[k+1][j];
				if (min[i][j] > x) min[i][j] = x;
            }
        }
    }
    printf("%d\n", max[0][n-1]);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 202
s:
	.zero	202
	.globl	sgn
	.align 32
	.type	sgn, @object
	.size	sgn, 202
sgn:
	.zero	202
	.globl	num
	.align 32
	.type	num, @object
	.size	num, 202
num:
	.zero	202
	.globl	min
	.align 32
	.type	min, @object
	.size	min, 163216
min:
	.zero	163216
	.globl	max
	.align 32
	.type	max, @object
	.size	max, 163216
max:
	.zero	163216
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	stdin(%rip), %rax
	leaq	s(%rip), %rdx
	movq	%rdx, -24(%rbp)
	movq	%rax, %rdx
	movl	$202, %esi
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	sgn(%rip), %rax
	movq	%rax, -16(%rbp)
	leaq	num(%rip), %rax
	movq	%rax, -8(%rbp)
	movl	$0, -48(%rbp)
	jmp	.L2
.L6:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movzbl	%al, %eax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	je	.L3
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	movl	-48(%rbp), %edx
	movb	%dl, (%rax)
	jmp	.L4
.L3:
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$43, %al
	je	.L5
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$45, %al
	jne	.L4
.L5:
	movq	-16(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -16(%rbp)
	movl	-48(%rbp), %edx
	movb	%dl, (%rax)
.L4:
	addq	$1, -24(%rbp)
	addl	$1, -48(%rbp)
.L2:
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$31, %al
	ja	.L6
	leaq	num(%rip), %rdx
	movq	-8(%rbp), %rax
	subq	%rdx, %rax
	movl	%eax, -36(%rbp)
	movl	$163216, %edx
	movl	$269488144, %esi
	leaq	min(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$163216, %edx
	movl	$-269488144, %esi
	leaq	max(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -48(%rbp)
	jmp	.L7
.L8:
	movl	-48(%rbp), %eax
	cltq
	leaq	num(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	andl	$15, %eax
	movl	%eax, %ecx
	movl	-48(%rbp), %eax
	cltq
	imulq	$812, %rax, %rax
	leaq	max(%rip), %rdx
	movl	%ecx, (%rax,%rdx)
	movl	-48(%rbp), %eax
	cltq
	imulq	$812, %rax, %rax
	leaq	max(%rip), %rdx
	movl	(%rax,%rdx), %edx
	movl	-48(%rbp), %eax
	cltq
	imulq	$812, %rax, %rax
	leaq	min(%rip), %rcx
	movl	%edx, (%rax,%rcx)
	addl	$1, -48(%rbp)
.L7:
	movl	-48(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L8
	movl	$1, -40(%rbp)
	jmp	.L9
.L22:
	movl	$0, -48(%rbp)
	jmp	.L10
.L21:
	movl	-48(%rbp), %eax
	movl	%eax, -44(%rbp)
	jmp	.L11
.L20:
	movl	-48(%rbp), %eax
	cmpl	-44(%rbp), %eax
	je	.L12
	movl	-48(%rbp), %eax
	cltq
	leaq	num(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	addl	$1, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$41, %al
	je	.L24
	movl	-44(%rbp), %eax
	cltq
	leaq	num(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	subl	$1, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$40, %al
	je	.L24
.L12:
	movl	-44(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -32(%rbp)
	je	.L15
	movl	-44(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	num(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	addl	$1, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$41, %al
	je	.L25
	movl	-32(%rbp), %eax
	cltq
	leaq	num(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	subl	$1, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$40, %al
	je	.L25
.L15:
	movl	-44(%rbp), %eax
	cltq
	leaq	sgn(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$43, %al
	jne	.L17
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-44(%rbp), %eax
	leal	1(%rax), %edx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$202, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L18
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	max(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L18:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-44(%rbp), %eax
	leal	1(%rax), %edx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$202, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L14
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	min(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L14
.L17:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	leal	1(%rdx), %ecx
	movl	-32(%rbp), %edx
	movslq	%edx, %rsi
	movslq	%ecx, %rdx
	imulq	$202, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	min(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L19
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	max(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L19:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	leal	1(%rdx), %ecx
	movl	-32(%rbp), %edx
	movslq	%edx, %rsi
	movslq	%ecx, %rdx
	imulq	$202, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	max(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L14
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	min(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L14
.L24:
	nop
	jmp	.L14
.L25:
	nop
.L14:
	addl	$1, -44(%rbp)
.L11:
	movl	-44(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jl	.L20
	addl	$1, -48(%rbp)
.L10:
	movl	-48(%rbp), %edx
	movl	-40(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -32(%rbp)
	movl	-32(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L21
	addl	$1, -40(%rbp)
.L9:
	movl	-40(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L22
	movl	-36(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	s(%rip), %r15
	movl	$202, %esi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%r15, %rdi
	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	stdin(%rip), %rdx
	call	fgets@PLT
	movzbl	s(%rip), %ebp
	cmpb	$31, %bpl
	jbe	.L2
	call	__ctype_b_loc@PLT
	leaq	num(%rip), %rbx
	xorl	%edx, %edx
	leaq	sgn(%rip), %rdi
	movq	%rax, %rsi
	jmp	.L5
.L35:
	movb	%dl, (%rbx)
	addq	$1, %rbx
.L4:
	addq	$1, %rdx
	movzbl	(%r15,%rdx), %ebp
	cmpb	$31, %bpl
	jbe	.L34
.L5:
	movq	(%rsi), %rcx
	movzbl	%bpl, %eax
	testb	$8, 1(%rcx,%rax,2)
	jne	.L35
	subl	$43, %ebp
	andl	$253, %ebp
	jne	.L4
	movb	%dl, (%rdi)
	addq	$1, %rdx
	addq	$1, %rdi
	movzbl	(%r15,%rdx), %ebp
	cmpb	$31, %bpl
	ja	.L5
.L34:
	leaq	num(%rip), %rax
	movl	$163216, %edx
	movl	$269488144, %esi
	subq	%rax, %rbx
	leaq	min(%rip), %rdi
	movl	%ebx, 32(%rsp)
	call	memset@PLT
	movl	$163216, %edx
	movl	$-269488144, %esi
	leaq	max(%rip), %rax
	movq	%rax, %rdi
	movq	%rax, 40(%rsp)
	movq	%rax, %r14
	call	memset@PLT
	testl	%ebx, %ebx
	jle	.L22
	leaq	num(%rip), %rdx
	leal	-1(%rbx), %edi
	movq	%r14, %rsi
	leaq	1(%rdx), %rax
	leaq	min(%rip), %rcx
	addq	%rax, %rdi
	.p2align 4,,10
	.p2align 3
.L7:
	movzbl	(%rdx), %eax
	addq	$1, %rdx
	addq	$812, %rsi
	addq	$812, %rcx
	movzbl	(%r15,%rax), %eax
	andl	$15, %eax
	movl	%eax, -812(%rsi)
	movl	%eax, -812(%rcx)
	cmpq	%rdi, %rdx
	jne	.L7
	leaq	1+num(%rip), %rax
	movl	$1, 36(%rsp)
	movq	%rax, 8(%rsp)
	movq	$-4, 24(%rsp)
	cmpl	$1, %ebx
	jle	.L22
	.p2align 4,,10
	.p2align 3
.L21:
	movq	24(%rsp), %rax
	movq	40(%rsp), %rbp
	xorl	%r13d, %r13d
	leaq	min(%rip), %r9
	movl	36(%rsp), %edi
	leaq	max(%rip), %r14
	leaq	num(%rip), %r12
	movq	%rax, %rcx
	subq	%rax, %r9
	subq	%rax, %rbp
	negq	%rcx
	movq	%rcx, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L23:
	movq	24(%rsp), %rax
	movq	16(%rsp), %rdx
	movl	%r13d, %r10d
	leaq	(%rax,%r9), %rcx
	movq	%r13, %rax
	cmpl	%r13d, %edi
	jg	.L17
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L14:
	subl	%r8d, %esi
	cmpl	%r11d, %esi
	jle	.L16
	movl	%esi, 0(%rbp)
.L16:
	leaq	808+max(%rip), %rbx
	movl	(%rcx), %esi
	subl	(%rbx,%rdx), %esi
	cmpl	%esi, (%r9)
	jle	.L11
	movl	%esi, (%r9)
	.p2align 4,,10
	.p2align 3
.L11:
	addq	$1, %rax
	addq	$4, %rcx
	addq	$808, %rdx
	cmpl	%eax, %edi
	jle	.L20
.L17:
	cmpl	%eax, %r10d
	je	.L9
	movzbl	(%r12), %esi
	cmpb	$41, 1(%r15,%rsi)
	je	.L11
	leaq	num(%rip), %rbx
	movzbl	(%rbx,%rax), %esi
	subl	$1, %esi
	movslq	%esi, %rsi
	cmpb	$40, (%r15,%rsi)
	je	.L11
.L9:
	leal	1(%rax), %esi
	cmpl	%esi, %edi
	je	.L13
	leaq	1+num(%rip), %rbx
	movzbl	(%rbx,%rax), %esi
	cmpb	$41, 1(%r15,%rsi)
	je	.L11
	movq	8(%rsp), %rbx
	movzbl	(%rbx,%r13), %esi
	subl	$1, %esi
	movslq	%esi, %rsi
	cmpb	$40, (%r15,%rsi)
	je	.L11
.L13:
	leaq	808+min(%rip), %rbx
	movl	(%r14,%rax,4), %esi
	movl	0(%rbp), %r11d
	movl	(%rbx,%rdx), %r8d
	leaq	sgn(%rip), %rbx
	movzbl	(%rbx,%rax), %ebx
	cmpb	$43, (%r15,%rbx)
	jne	.L14
	leaq	808+max(%rip), %rbx
	addl	(%rbx,%rdx), %esi
	cmpl	%r11d, %esi
	jle	.L15
	movl	%esi, 0(%rbp)
.L15:
	addl	(%rcx), %r8d
	cmpl	%r8d, (%r9)
	jle	.L11
	movl	%r8d, (%r9)
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$812, 16(%rsp)
	addl	$1, %edi
	addq	$1, %r13
	addq	$812, %r9
	addq	$812, %rbp
	addq	$808, %r14
	addq	$1, %r12
	cmpl	%edi, 32(%rsp)
	jg	.L23
	addl	$1, 36(%rsp)
	movl	36(%rsp), %eax
	addq	$1, 8(%rsp)
	subq	$4, 24(%rsp)
	cmpl	%eax, 32(%rsp)
	jne	.L21
.L22:
	movl	32(%rsp), %eax
	movq	40(%rsp), %rcx
	movl	$1, %edi
	leaq	.LC0(%rip), %rsi
	subl	$1, %eax
	cltq
	movl	(%rcx,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	movl	$163216, %edx
	movl	$269488144, %esi
	leaq	min(%rip), %rdi
	call	memset@PLT
	movl	$163216, %edx
	movl	$-269488144, %esi
	leaq	max(%rip), %rax
	movq	%rax, %rdi
	movq	%rax, 40(%rsp)
	call	memset@PLT
	movl	$0, 32(%rsp)
	jmp	.L22
	.cfi_endproc
.LFE37:
	.size	main, .-main
	.globl	max
	.bss
	.align 32
	.type	max, @object
	.size	max, 163216
max:
	.zero	163216
	.globl	min
	.align 32
	.type	min, @object
	.size	min, 163216
min:
	.zero	163216
	.globl	num
	.align 32
	.type	num, @object
	.size	num, 202
num:
	.zero	202
	.globl	sgn
	.align 32
	.type	sgn, @object
	.size	sgn, 202
sgn:
	.zero	202
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 202
s:
	.zero	202
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	s(%rip), %r15
	movl	$202, %esi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%r15, %rdi
	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	stdin(%rip), %rdx
	call	fgets@PLT
	movzbl	s(%rip), %ebp
	cmpb	$31, %bpl
	jbe	.L2
	call	__ctype_b_loc@PLT
	leaq	num(%rip), %rbx
	xorl	%edx, %edx
	leaq	sgn(%rip), %rdi
	movq	%rax, %rsi
	jmp	.L5
.L35:
	movb	%dl, (%rbx)
	addq	$1, %rbx
.L4:
	addq	$1, %rdx
	movzbl	(%r15,%rdx), %ebp
	cmpb	$31, %bpl
	jbe	.L34
.L5:
	movq	(%rsi), %rcx
	movzbl	%bpl, %eax
	testb	$8, 1(%rcx,%rax,2)
	jne	.L35
	subl	$43, %ebp
	andl	$253, %ebp
	jne	.L4
	movb	%dl, (%rdi)
	addq	$1, %rdx
	addq	$1, %rdi
	movzbl	(%r15,%rdx), %ebp
	cmpb	$31, %bpl
	ja	.L5
.L34:
	leaq	num(%rip), %rax
	movl	$163216, %edx
	movl	$269488144, %esi
	subq	%rax, %rbx
	leaq	min(%rip), %rdi
	movl	%ebx, 32(%rsp)
	call	memset@PLT
	movl	$163216, %edx
	movl	$-269488144, %esi
	leaq	max(%rip), %rax
	movq	%rax, %rdi
	movq	%rax, 40(%rsp)
	movq	%rax, %r14
	call	memset@PLT
	testl	%ebx, %ebx
	jle	.L22
	leaq	num(%rip), %rdx
	leal	-1(%rbx), %edi
	movq	%r14, %rsi
	leaq	1(%rdx), %rax
	leaq	min(%rip), %rcx
	addq	%rax, %rdi
	.p2align 4,,10
	.p2align 3
.L7:
	movzbl	(%rdx), %eax
	addq	$1, %rdx
	addq	$812, %rsi
	addq	$812, %rcx
	movzbl	(%r15,%rax), %eax
	andl	$15, %eax
	movl	%eax, -812(%rsi)
	movl	%eax, -812(%rcx)
	cmpq	%rdi, %rdx
	jne	.L7
	leaq	1+num(%rip), %rax
	movl	$1, 36(%rsp)
	movq	%rax, 8(%rsp)
	movq	$-4, 24(%rsp)
	cmpl	$1, %ebx
	jle	.L22
	.p2align 4,,10
	.p2align 3
.L21:
	movq	24(%rsp), %rax
	movq	40(%rsp), %rbp
	xorl	%r13d, %r13d
	leaq	min(%rip), %r9
	movl	36(%rsp), %edi
	leaq	max(%rip), %r14
	leaq	num(%rip), %r12
	movq	%rax, %rcx
	subq	%rax, %r9
	subq	%rax, %rbp
	negq	%rcx
	movq	%rcx, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L23:
	movq	24(%rsp), %rax
	movq	16(%rsp), %rdx
	movl	%r13d, %r10d
	leaq	(%rax,%r9), %rcx
	movq	%r13, %rax
	cmpl	%r13d, %edi
	jg	.L17
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L14:
	subl	%r8d, %esi
	cmpl	%r11d, %esi
	jle	.L16
	movl	%esi, 0(%rbp)
.L16:
	leaq	808+max(%rip), %rbx
	movl	(%rcx), %esi
	subl	(%rbx,%rdx), %esi
	cmpl	%esi, (%r9)
	jle	.L11
	movl	%esi, (%r9)
	.p2align 4,,10
	.p2align 3
.L11:
	addq	$1, %rax
	addq	$4, %rcx
	addq	$808, %rdx
	cmpl	%eax, %edi
	jle	.L20
.L17:
	cmpl	%eax, %r10d
	je	.L9
	movzbl	(%r12), %esi
	cmpb	$41, 1(%r15,%rsi)
	je	.L11
	leaq	num(%rip), %rbx
	movzbl	(%rbx,%rax), %esi
	subl	$1, %esi
	movslq	%esi, %rsi
	cmpb	$40, (%r15,%rsi)
	je	.L11
.L9:
	leal	1(%rax), %esi
	cmpl	%esi, %edi
	je	.L13
	leaq	1+num(%rip), %rbx
	movzbl	(%rbx,%rax), %esi
	cmpb	$41, 1(%r15,%rsi)
	je	.L11
	movq	8(%rsp), %rbx
	movzbl	(%rbx,%r13), %esi
	subl	$1, %esi
	movslq	%esi, %rsi
	cmpb	$40, (%r15,%rsi)
	je	.L11
.L13:
	leaq	808+min(%rip), %rbx
	movl	(%r14,%rax,4), %esi
	movl	0(%rbp), %r11d
	movl	(%rbx,%rdx), %r8d
	leaq	sgn(%rip), %rbx
	movzbl	(%rbx,%rax), %ebx
	cmpb	$43, (%r15,%rbx)
	jne	.L14
	leaq	808+max(%rip), %rbx
	addl	(%rbx,%rdx), %esi
	cmpl	%r11d, %esi
	jle	.L15
	movl	%esi, 0(%rbp)
.L15:
	addl	(%rcx), %r8d
	cmpl	%r8d, (%r9)
	jle	.L11
	movl	%r8d, (%r9)
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$812, 16(%rsp)
	addl	$1, %edi
	addq	$1, %r13
	addq	$812, %r9
	addq	$812, %rbp
	addq	$808, %r14
	addq	$1, %r12
	cmpl	%edi, 32(%rsp)
	jg	.L23
	addl	$1, 36(%rsp)
	movl	36(%rsp), %eax
	addq	$1, 8(%rsp)
	subq	$4, 24(%rsp)
	cmpl	%eax, 32(%rsp)
	jne	.L21
.L22:
	movl	32(%rsp), %eax
	movq	40(%rsp), %rcx
	movl	$1, %edi
	leaq	.LC0(%rip), %rsi
	subl	$1, %eax
	cltq
	movl	(%rcx,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	movl	$163216, %edx
	movl	$269488144, %esi
	leaq	min(%rip), %rdi
	call	memset@PLT
	movl	$163216, %edx
	movl	$-269488144, %esi
	leaq	max(%rip), %rax
	movq	%rax, %rdi
	movq	%rax, 40(%rsp)
	call	memset@PLT
	movl	$0, 32(%rsp)
	jmp	.L22
	.cfi_endproc
.LFE37:
	.size	main, .-main
	.globl	max
	.bss
	.align 32
	.type	max, @object
	.size	max, 163216
max:
	.zero	163216
	.globl	min
	.align 32
	.type	min, @object
	.size	min, 163216
min:
	.zero	163216
	.globl	num
	.align 32
	.type	num, @object
	.size	num, 202
num:
	.zero	202
	.globl	sgn
	.align 32
	.type	sgn, @object
	.size	sgn, 202
sgn:
	.zero	202
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 202
s:
	.zero	202
	.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 2710 An Equation in a Mine
// 2018.2.14 bal4u

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

#define INF 0x10101010

unsigned char s[202], sgn[202], num[202];
int min[202][202], max[202][202];

int main()
{
	int n, i, j, k, l, x;
	unsigned char *p, *qs, *qn;

	fgets(p=s, 202, stdin);
	qs = sgn, qn = num;	for (i = 0; *p >= ' '; i++) {
		if (isdigit(*p)) *qn++ = i;
		else if (*p == '+' || *p == '-') *qs++ = i;
		p++;
	}
	n = qn - num;

	memset(min,  INF, sizeof(min));
	memset(max, -INF, sizeof(max));
    for (i = 0; i < n; i++) min[i][i] = max[i][i] = s[num[i]] & 0xf;

	for(l = 1; l < n ; l++) for(i = 0; (j=i+l) < n; i++) {
		for (k = i; k < j; k++) {
			if (  i != k && (s[num[  i]+1] == ')' || s[num[k]-1] == '(')) continue;
			if (k+1 != j && (s[num[k+1]+1] == ')' || s[num[j]-1] == '(')) continue;

			if (s[sgn[k]] == '+') {
				x = max[i][k] + max[k+1][j];
				if (max[i][j] < x) max[i][j] = x;
				x = min[i][k] + min[k+1][j];
				if (min[i][j] > x) min[i][j] = x;
			} else {
				x = max[i][k] - min[k+1][j];
				if (max[i][j] < x) max[i][j] = x;
				x = min[i][k] - max[k+1][j];
				if (min[i][j] > x) min[i][j] = x;
            }
        }
    }
    printf("%d\n", max[0][n-1]);
    return 0;
}

0-(2+3-4+5)
 0-(2+3-3+5)
 2-(2+3-4+5)
 1-(3+2-4+5)
 2-(2-3+4+5)
 0-(3+4-4+5)
 3+(2-4-4+5)
 2-(2+2-4+5)
 2+(2-4-4+5)
 2-(2+2-5+5)

4
 3
 6
 5
 12
 2
 10
 7
 9
 8

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

```c
// AOJ 2710 An Equation in a Mine
// 2018.2.14 bal4u

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

#define INF 0x10101010

unsigned char s[202], sgn[202], num[202];
int min[202][202], max[202][202];

int main()
{
	int n, i, j, k, l, x;
	unsigned char *p, *qs, *qn;

	fgets(p=s, 202, stdin);
	qs = sgn, qn = num;	for (i = 0; *p >= ' '; i++) {
		if (isdigit(*p)) *qn++ = i;
		else if (*p == '+' || *p == '-') *qs++ = i;
		p++;
	}
	n = qn - num;

	memset(min,  INF, sizeof(min));
	memset(max, -INF, sizeof(max));
    for (i = 0; i < n; i++) min[i][i] = max[i][i] = s[num[i]] & 0xf;

	for(l = 1; l < n ; l++) for(i = 0; (j=i+l) < n; i++) {
		for (k = i; k < j; k++) {
			if (  i != k && (s[num[  i]+1] == ')' || s[num[k]-1] == '(')) continue;
			if (k+1 != j && (s[num[k+1]+1] == ')' || s[num[j]-1] == '(')) continue;

			if (s[sgn[k]] == '+') {
				x = max[i][k] + max[k+1][j];
				if (max[i][j] < x) max[i][j] = x;
				x = min[i][k] + min[k+1][j];
				if (min[i][j] > x) min[i][j] = x;
			} else {
				x = max[i][k] - min[k+1][j];
				if (max[i][j] < x) max[i][j] = x;
				x = min[i][k] - max[k+1][j];
				if (min[i][j] > x) min[i][j] = x;
            }
        }
    }
    printf("%d\n", max[0][n-1]);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 202
s:
	.zero	202
	.globl	sgn
	.align 32
	.type	sgn, @object
	.size	sgn, 202
sgn:
	.zero	202
	.globl	num
	.align 32
	.type	num, @object
	.size	num, 202
num:
	.zero	202
	.globl	min
	.align 32
	.type	min, @object
	.size	min, 163216
min:
	.zero	163216
	.globl	max
	.align 32
	.type	max, @object
	.size	max, 163216
max:
	.zero	163216
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	stdin(%rip), %rax
	leaq	s(%rip), %rdx
	movq	%rdx, -24(%rbp)
	movq	%rax, %rdx
	movl	$202, %esi
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	sgn(%rip), %rax
	movq	%rax, -16(%rbp)
	leaq	num(%rip), %rax
	movq	%rax, -8(%rbp)
	movl	$0, -48(%rbp)
	jmp	.L2
.L6:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movzbl	%al, %eax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	je	.L3
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	movl	-48(%rbp), %edx
	movb	%dl, (%rax)
	jmp	.L4
.L3:
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$43, %al
	je	.L5
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$45, %al
	jne	.L4
.L5:
	movq	-16(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -16(%rbp)
	movl	-48(%rbp), %edx
	movb	%dl, (%rax)
.L4:
	addq	$1, -24(%rbp)
	addl	$1, -48(%rbp)
.L2:
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$31, %al
	ja	.L6
	leaq	num(%rip), %rdx
	movq	-8(%rbp), %rax
	subq	%rdx, %rax
	movl	%eax, -36(%rbp)
	movl	$163216, %edx
	movl	$269488144, %esi
	leaq	min(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$163216, %edx
	movl	$-269488144, %esi
	leaq	max(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -48(%rbp)
	jmp	.L7
.L8:
	movl	-48(%rbp), %eax
	cltq
	leaq	num(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	andl	$15, %eax
	movl	%eax, %ecx
	movl	-48(%rbp), %eax
	cltq
	imulq	$812, %rax, %rax
	leaq	max(%rip), %rdx
	movl	%ecx, (%rax,%rdx)
	movl	-48(%rbp), %eax
	cltq
	imulq	$812, %rax, %rax
	leaq	max(%rip), %rdx
	movl	(%rax,%rdx), %edx
	movl	-48(%rbp), %eax
	cltq
	imulq	$812, %rax, %rax
	leaq	min(%rip), %rcx
	movl	%edx, (%rax,%rcx)
	addl	$1, -48(%rbp)
.L7:
	movl	-48(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L8
	movl	$1, -40(%rbp)
	jmp	.L9
.L22:
	movl	$0, -48(%rbp)
	jmp	.L10
.L21:
	movl	-48(%rbp), %eax
	movl	%eax, -44(%rbp)
	jmp	.L11
.L20:
	movl	-48(%rbp), %eax
	cmpl	-44(%rbp), %eax
	je	.L12
	movl	-48(%rbp), %eax
	cltq
	leaq	num(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	addl	$1, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$41, %al
	je	.L24
	movl	-44(%rbp), %eax
	cltq
	leaq	num(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	subl	$1, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$40, %al
	je	.L24
.L12:
	movl	-44(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -32(%rbp)
	je	.L15
	movl	-44(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	num(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	addl	$1, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$41, %al
	je	.L25
	movl	-32(%rbp), %eax
	cltq
	leaq	num(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	subl	$1, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$40, %al
	je	.L25
.L15:
	movl	-44(%rbp), %eax
	cltq
	leaq	sgn(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$43, %al
	jne	.L17
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-44(%rbp), %eax
	leal	1(%rax), %edx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$202, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L18
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	max(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L18:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-44(%rbp), %eax
	leal	1(%rax), %edx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$202, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L14
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	min(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L14
.L17:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	leal	1(%rdx), %ecx
	movl	-32(%rbp), %edx
	movslq	%edx, %rsi
	movslq	%ecx, %rdx
	imulq	$202, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	min(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L19
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	max(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L19:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	leal	1(%rdx), %ecx
	movl	-32(%rbp), %edx
	movslq	%edx, %rsi
	movslq	%ecx, %rdx
	imulq	$202, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	max(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L14
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	min(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L14
.L24:
	nop
	jmp	.L14
.L25:
	nop
.L14:
	addl	$1, -44(%rbp)
.L11:
	movl	-44(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jl	.L20
	addl	$1, -48(%rbp)
.L10:
	movl	-48(%rbp), %edx
	movl	-40(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -32(%rbp)
	movl	-32(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L21
	addl	$1, -40(%rbp)
.L9:
	movl	-40(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L22
	movl	-36(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 202
s:
	.zero	202
	.globl	sgn
	.align 32
	.type	sgn, @object
	.size	sgn, 202
sgn:
	.zero	202
	.globl	num
	.align 32
	.type	num, @object
	.size	num, 202
num:
	.zero	202
	.globl	min
	.align 32
	.type	min, @object
	.size	min, 163216
min:
	.zero	163216
	.globl	max
	.align 32
	.type	max, @object
	.size	max, 163216
max:
	.zero	163216
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	stdin(%rip), %rax
	leaq	s(%rip), %rdx
	movq	%rdx, -24(%rbp)
	movq	%rax, %rdx
	movl	$202, %esi
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	sgn(%rip), %rax
	movq	%rax, -16(%rbp)
	leaq	num(%rip), %rax
	movq	%rax, -8(%rbp)
	movl	$0, -48(%rbp)
	jmp	.L2
.L6:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movzbl	%al, %eax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	je	.L3
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	movl	-48(%rbp), %edx
	movb	%dl, (%rax)
	jmp	.L4
.L3:
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$43, %al
	je	.L5
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$45, %al
	jne	.L4
.L5:
	movq	-16(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -16(%rbp)
	movl	-48(%rbp), %edx
	movb	%dl, (%rax)
.L4:
	addq	$1, -24(%rbp)
	addl	$1, -48(%rbp)
.L2:
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$31, %al
	ja	.L6
	leaq	num(%rip), %rdx
	movq	-8(%rbp), %rax
	subq	%rdx, %rax
	movl	%eax, -36(%rbp)
	movl	$163216, %edx
	movl	$269488144, %esi
	leaq	min(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$163216, %edx
	movl	$-269488144, %esi
	leaq	max(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -48(%rbp)
	jmp	.L7
.L8:
	movl	-48(%rbp), %eax
	cltq
	leaq	num(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	andl	$15, %eax
	movl	%eax, %ecx
	movl	-48(%rbp), %eax
	cltq
	imulq	$812, %rax, %rax
	leaq	max(%rip), %rdx
	movl	%ecx, (%rax,%rdx)
	movl	-48(%rbp), %eax
	cltq
	imulq	$812, %rax, %rax
	leaq	max(%rip), %rdx
	movl	(%rax,%rdx), %edx
	movl	-48(%rbp), %eax
	cltq
	imulq	$812, %rax, %rax
	leaq	min(%rip), %rcx
	movl	%edx, (%rax,%rcx)
	addl	$1, -48(%rbp)
.L7:
	movl	-48(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L8
	movl	$1, -40(%rbp)
	jmp	.L9
.L22:
	movl	$0, -48(%rbp)
	jmp	.L10
.L21:
	movl	-48(%rbp), %eax
	movl	%eax, -44(%rbp)
	jmp	.L11
.L20:
	movl	-48(%rbp), %eax
	cmpl	-44(%rbp), %eax
	je	.L12
	movl	-48(%rbp), %eax
	cltq
	leaq	num(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	addl	$1, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$41, %al
	je	.L24
	movl	-44(%rbp), %eax
	cltq
	leaq	num(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	subl	$1, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$40, %al
	je	.L24
.L12:
	movl	-44(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -32(%rbp)
	je	.L15
	movl	-44(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	num(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	addl	$1, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$41, %al
	je	.L25
	movl	-32(%rbp), %eax
	cltq
	leaq	num(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	subl	$1, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$40, %al
	je	.L25
.L15:
	movl	-44(%rbp), %eax
	cltq
	leaq	sgn(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$43, %al
	jne	.L17
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-44(%rbp), %eax
	leal	1(%rax), %edx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$202, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L18
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	max(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L18:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-44(%rbp), %eax
	leal	1(%rax), %edx
	movl	-32(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$202, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L14
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	min(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L14
.L17:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	leal	1(%rdx), %ecx
	movl	-32(%rbp), %edx
	movslq	%edx, %rsi
	movslq	%ecx, %rdx
	imulq	$202, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	min(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L19
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	max(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L19:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	leal	1(%rdx), %ecx
	movl	-32(%rbp), %edx
	movslq	%edx, %rsi
	movslq	%ecx, %rdx
	imulq	$202, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	max(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L14
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	imulq	$202, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	min(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L14
.L24:
	nop
	jmp	.L14
.L25:
	nop
.L14:
	addl	$1, -44(%rbp)
.L11:
	movl	-44(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jl	.L20
	addl	$1, -48(%rbp)
.L10:
	movl	-48(%rbp), %edx
	movl	-40(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -32(%rbp)
	movl	-32(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L21
	addl	$1, -40(%rbp)
.L9:
	movl	-40(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L22
	movl	-36(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
