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

```c
// AOJ 1244: Molecular Formula
// 2017.10.12 bal4u@uu

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

int w[1024];

void insert(char *s, int n)
{
	int i;
	i = (s[0]-'A'+1);
	if (s[1]) i |= (s[1]-'a'+1) << 5;
	w[i] = n;
}

int lookup(char *s)
{
	int i;
	i = (s[0]-'A'+1);
	if (s[1]) i |= (s[1]-'a'+1) << 5;
	return w[i];
}

char *molecular();
char *atom(int *n, char *s)
{
	int k;
	char b[3];

	if (*s == '(') {
		s++; if ((s = molecular(n, s)) == NULL) return NULL;
		s++;
		if (isdigit(*s)) {
			k = 0; while (isdigit(*s)) k = 10*k + (*s++ - '0');
			*n *= k;
		}
	} else if (isalpha(*s)) {
		b[0] = *s++, b[1] = 0;
		if (islower(*s)) b[1] = *s++, b[2] = 0;
		if ((k = lookup(b)) == 0) return NULL;
		*n = k;
	}
	return s;
}

char *molecular(int *n, char *s)
{
	int k, m;

	*n = 0, m = 0;
	while (*s >= ' ') {
		if (*s == '(' || isalpha(*s)) {
			if ((s = atom(&m, s)) == NULL) return NULL;
			k = 1;
		} else if (*s == ')') break;
		if (isdigit(*s)) {
			k = 0; while (isdigit(*s)) k = 10*k + (*s++ - '0');
		}
		*n += m*k;
	}
	return s;
}

int main()
{
	int ans;
	char buf[202], *p, *q;

	while (fgets(buf, 200, stdin) && *(buf+2) != 'D') {
		p = buf;
		while (isspace(*p)) p++;
		q = p; while (isalpha(*p)) p++;
		*p++ = 0;
		insert(q, atoi(p));
	}

	while (fgets(buf, 200, stdin) && *buf != '0') {
		p = buf; while (isspace(*p)) p++;
		if (molecular(&ans, p) == NULL) puts("UNKNOWN");
		else printf("%d\n", ans);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	w
	.bss
	.align 32
	.type	w, @object
	.size	w, 4096
w:
	.zero	4096
	.text
	.globl	insert
	.type	insert, @function
insert:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$64, %eax
	movl	%eax, -4(%rbp)
	movq	-24(%rbp), %rax
	addq	$1, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L2
	movq	-24(%rbp), %rax
	addq	$1, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$96, %eax
	sall	$5, %eax
	orl	%eax, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	w(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	insert, .-insert
	.globl	lookup
	.type	lookup, @function
lookup:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$64, %eax
	movl	%eax, -4(%rbp)
	movq	-24(%rbp), %rax
	addq	$1, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L4
	movq	-24(%rbp), %rax
	addq	$1, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$96, %eax
	sall	$5, %eax
	orl	%eax, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	lookup, .-lookup
	.globl	atom
	.type	atom, @function
atom:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$40, %al
	jne	.L7
	addq	$1, -32(%rbp)
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	molecular
	movq	%rax, -32(%rbp)
	cmpq	$0, -32(%rbp)
	jne	.L8
	movl	$0, %eax
	jmp	.L15
.L8:
	addq	$1, -32(%rbp)
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	je	.L10
	movl	$0, -16(%rbp)
	jmp	.L11
.L12:
	movl	-16(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %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)
.L11:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	jne	.L12
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	imull	-16(%rbp), %eax
	movl	%eax, %edx
	movq	-24(%rbp), %rax
	movl	%edx, (%rax)
	jmp	.L10
.L7:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$1024, %eax
	testl	%eax, %eax
	je	.L10
	movq	-32(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -32(%rbp)
	movzbl	(%rax), %eax
	movb	%al, -11(%rbp)
	movb	$0, -10(%rbp)
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$512, %eax
	testl	%eax, %eax
	je	.L13
	movq	-32(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -32(%rbp)
	movzbl	(%rax), %eax
	movb	%al, -10(%rbp)
	movb	$0, -9(%rbp)
.L13:
	leaq	-11(%rbp), %rax
	movq	%rax, %rdi
	call	lookup
	movl	%eax, -16(%rbp)
	cmpl	$0, -16(%rbp)
	jne	.L14
	movl	$0, %eax
	jmp	.L15
.L14:
	movq	-24(%rbp), %rax
	movl	-16(%rbp), %edx
	movl	%edx, (%rax)
.L10:
	movq	-32(%rbp), %rax
.L15:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	atom, .-atom
	.globl	molecular
	.type	molecular, @function
molecular:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	-24(%rbp), %rax
	movl	$0, (%rax)
	movl	$0, -16(%rbp)
	jmp	.L18
.L28:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$40, %al
	je	.L19
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$1024, %eax
	testl	%eax, %eax
	je	.L20
.L19:
	movq	-32(%rbp), %rdx
	leaq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	atom
	movq	%rax, -32(%rbp)
	cmpq	$0, -32(%rbp)
	jne	.L21
	movl	$0, %eax
	jmp	.L29
.L21:
	movl	$1, -12(%rbp)
	jmp	.L23
.L20:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$41, %al
	je	.L31
.L23:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	je	.L25
	movl	$0, -12(%rbp)
	jmp	.L26
.L27:
	movl	-12(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %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, -12(%rbp)
.L26:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	jne	.L27
.L25:
	movq	-24(%rbp), %rax
	movl	(%rax), %edx
	movl	-16(%rbp), %eax
	imull	-12(%rbp), %eax
	addl	%eax, %edx
	movq	-24(%rbp), %rax
	movl	%edx, (%rax)
.L18:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$31, %al
	jg	.L28
	jmp	.L24
.L31:
	nop
.L24:
	movq	-32(%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
.LFE9:
	.size	molecular, .-molecular
	.section	.rodata
.LC0:
	.string	"UNKNOWN"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$256, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L33
.L39:
	leaq	-224(%rbp), %rax
	movq	%rax, -240(%rbp)
	jmp	.L34
.L35:
	addq	$1, -240(%rbp)
.L34:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-240(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$8192, %eax
	testl	%eax, %eax
	jne	.L35
	movq	-240(%rbp), %rax
	movq	%rax, -232(%rbp)
	jmp	.L36
.L37:
	addq	$1, -240(%rbp)
.L36:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-240(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$1024, %eax
	testl	%eax, %eax
	jne	.L37
	movq	-240(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -240(%rbp)
	movb	$0, (%rax)
	movq	-240(%rbp), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movl	%eax, %edx
	movq	-232(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	insert
.L33:
	movq	stdin(%rip), %rdx
	leaq	-224(%rbp), %rax
	movl	$200, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L40
	movzbl	-222(%rbp), %eax
	cmpb	$68, %al
	jne	.L39
	jmp	.L40
.L45:
	leaq	-224(%rbp), %rax
	movq	%rax, -240(%rbp)
	jmp	.L41
.L42:
	addq	$1, -240(%rbp)
.L41:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-240(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$8192, %eax
	testl	%eax, %eax
	jne	.L42
	movq	-240(%rbp), %rdx
	leaq	-244(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	molecular
	testq	%rax, %rax
	jne	.L43
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L40
.L43:
	movl	-244(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L40:
	movq	stdin(%rip), %rdx
	leaq	-224(%rbp), %rax
	movl	$200, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L44
	movzbl	-224(%rbp), %eax
	cmpb	$48, %al
	jne	.L45
.L44:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L47
	call	__stack_chk_fail@PLT
.L47:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	insert
	.type	insert, @function
insert:
.LFB53:
	.cfi_startproc
	endbr64
	movsbl	(%rdi), %eax
	movsbl	1(%rdi), %edx
	subl	$64, %eax
	testb	%dl, %dl
	je	.L2
	subl	$96, %edx
	sall	$5, %edx
	orl	%edx, %eax
.L2:
	cltq
	leaq	w(%rip), %rdx
	movl	%esi, (%rdx,%rax,4)
	ret
	.cfi_endproc
.LFE53:
	.size	insert, .-insert
	.p2align 4
	.globl	lookup
	.type	lookup, @function
lookup:
.LFB54:
	.cfi_startproc
	endbr64
	movsbl	(%rdi), %eax
	movsbl	1(%rdi), %edx
	subl	$64, %eax
	testb	%dl, %dl
	je	.L8
	subl	$96, %edx
	sall	$5, %edx
	orl	%edx, %eax
.L8:
	leaq	w(%rip), %rdx
	cltq
	movl	(%rdx,%rax,4), %eax
	ret
	.cfi_endproc
.LFE54:
	.size	lookup, .-lookup
	.p2align 4
	.globl	molecular
	.type	molecular, @function
molecular:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movl	$0, (%rdi)
	movzbl	(%rsi), %r14d
	movl	$0, 4(%rsp)
	cmpb	$31, %r14b
	jle	.L23
	movq	%rdi, %r12
	leaq	4(%rsp), %r13
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L15:
	cmpb	$41, %r14b
	je	.L23
	movsbq	0(%rbp), %rcx
	movq	%rcx, %rax
	testb	$8, 1(%rdx,%rcx,2)
	jne	.L33
.L17:
	movl	4(%rsp), %eax
	imull	%ebx, %eax
	addl	%eax, (%r12)
	movzbl	0(%rbp), %r14d
	cmpb	$31, %r14b
	jle	.L23
.L19:
	cmpb	$40, %r14b
	je	.L14
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movsbq	%r14b, %rax
	testb	$4, 1(%rdx,%rax,2)
	je	.L15
.L14:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	call	atom
	movq	%rax, %rbp
	testq	%rax, %rax
	je	.L22
	call	__ctype_b_loc@PLT
	movsbq	0(%rbp), %rcx
	movl	$1, %ebx
	movq	(%rax), %rdx
	movq	%rcx, %rax
	testb	$8, 1(%rdx,%rcx,2)
	je	.L17
.L33:
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L18:
	leal	(%rbx,%rbx,4), %ecx
	addq	$1, %rbp
	leal	-48(%rax,%rcx,2), %ebx
	movsbl	0(%rbp), %eax
	movsbq	%al, %rcx
	testb	$8, 1(%rdx,%rcx,2)
	jne	.L18
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L23:
	movq	%rbp, %rax
.L12:
	movq	8(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L34
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L12
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE56:
	.size	molecular, .-molecular
	.p2align 4
	.globl	atom
	.type	atom, @function
atom:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movsbl	(%rsi), %ebx
	cmpb	$40, %bl
	je	.L56
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movsbq	%bl, %rax
	testb	$4, 1(%rdx,%rax,2)
	je	.L35
	movsbq	1(%r12), %rcx
	subl	$64, %ebx
	movq	%rcx, %rax
	testb	$2, 1(%rdx,%rcx,2)
	jne	.L40
	addq	$1, %r12
.L41:
	movslq	%ebx, %rbx
	leaq	w(%rip), %rax
	movl	(%rax,%rbx,4), %eax
	testl	%eax, %eax
	je	.L42
	movl	%eax, 0(%rbp)
.L35:
	movq	%r12, %rax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L56:
	.cfi_restore_state
	leaq	1(%rsi), %rsi
	xorl	%eax, %eax
	call	molecular
	movq	%rax, %rbx
	testq	%rax, %rax
	je	.L42
	leaq	1(%rax), %r12
	call	__ctype_b_loc@PLT
	movsbq	1(%rbx), %rdx
	movq	(%rax), %rsi
	movq	%rdx, %rax
	testb	$8, 1(%rsi,%rdx,2)
	je	.L35
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L39:
	leal	(%rdx,%rdx,4), %edx
	addq	$1, %r12
	leal	-48(%rax,%rdx,2), %edx
	movsbl	(%r12), %eax
	movsbq	%al, %rcx
	testb	$8, 1(%rsi,%rcx,2)
	jne	.L39
	imull	0(%rbp), %edx
	movl	%edx, 0(%rbp)
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L40:
	addq	$2, %r12
	testb	%cl, %cl
	je	.L41
	subl	$96, %eax
	sall	$5, %eax
	orl	%eax, %ebx
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L42:
	xorl	%r12d, %r12d
	jmp	.L35
	.cfi_endproc
.LFE55:
	.size	atom, .-atom
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"UNKNOWN"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB57:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	w(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$240, %rsp
	.cfi_def_cfa_offset 288
	movq	%fs:40, %rax
	movq	%rax, 232(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L58:
	movq	stdin(%rip), %rdx
	movl	$200, %esi
	movq	%rbp, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L63
	cmpb	$68, 18(%rsp)
	je	.L63
	call	__ctype_b_loc@PLT
	movq	(%rax), %rcx
	movq	%rbp, %rax
	.p2align 4,,10
	.p2align 3
.L59:
	movsbq	(%rax), %rdx
	movq	%rax, %rbx
	leaq	1(%rax), %rax
	movzwl	(%rcx,%rdx,2), %edx
	testb	$32, %dh
	jne	.L59
	movq	%rbx, %rdi
	andb	$4, %dh
	je	.L60
	.p2align 4,,10
	.p2align 3
.L61:
	movsbq	1(%rdi), %rax
	addq	$1, %rdi
	testb	$4, 1(%rcx,%rax,2)
	jne	.L61
.L60:
	movb	$0, (%rdi)
	movl	$10, %edx
	addq	$1, %rdi
	xorl	%esi, %esi
	call	strtol@PLT
	movsbl	(%rbx), %edx
	movsbl	1(%rbx), %ecx
	subl	$64, %edx
	testb	%cl, %cl
	je	.L62
	subl	$96, %ecx
	sall	$5, %ecx
	orl	%ecx, %edx
.L62:
	movslq	%edx, %rdx
	movl	%eax, (%r12,%rdx,4)
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L63:
	leaq	12(%rsp), %rbx
	leaq	.LC1(%rip), %r12
	leaq	.LC0(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L67:
	movq	stdin(%rip), %rdx
	movl	$200, %esi
	movq	%rbp, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L68
	movsbq	16(%rsp), %r14
	cmpb	$48, %r14b
	je	.L68
	call	__ctype_b_loc@PLT
	movq	%rbp, %rsi
	movq	(%rax), %rdx
	testb	$32, 1(%rdx,%r14,2)
	je	.L69
	.p2align 4,,10
	.p2align 3
.L64:
	movsbq	1(%rsi), %rax
	addq	$1, %rsi
	testb	$32, 1(%rdx,%rax,2)
	jne	.L64
.L69:
	movq	%rbx, %rdi
	call	molecular
	testq	%rax, %rax
	je	.L90
	movl	12(%rsp), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L67
	.p2align 4,,10
	.p2align 3
.L90:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L67
	.p2align 4,,10
	.p2align 3
.L68:
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L91
	addq	$240, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L91:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE57:
	.size	main, .-main
	.globl	w
	.bss
	.align 32
	.type	w, @object
	.size	w, 4096
w:
	.zero	4096
	.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	insert
	.type	insert, @function
insert:
.LFB53:
	.cfi_startproc
	endbr64
	movsbl	(%rdi), %eax
	movsbl	1(%rdi), %edx
	subl	$64, %eax
	testb	%dl, %dl
	je	.L2
	subl	$96, %edx
	sall	$5, %edx
	orl	%edx, %eax
.L2:
	cltq
	leaq	w(%rip), %rdx
	movl	%esi, (%rdx,%rax,4)
	ret
	.cfi_endproc
.LFE53:
	.size	insert, .-insert
	.p2align 4
	.globl	lookup
	.type	lookup, @function
lookup:
.LFB54:
	.cfi_startproc
	endbr64
	movsbl	(%rdi), %eax
	movsbl	1(%rdi), %edx
	subl	$64, %eax
	testb	%dl, %dl
	je	.L8
	subl	$96, %edx
	sall	$5, %edx
	orl	%edx, %eax
.L8:
	leaq	w(%rip), %rdx
	cltq
	movl	(%rdx,%rax,4), %eax
	ret
	.cfi_endproc
.LFE54:
	.size	lookup, .-lookup
	.p2align 4
	.globl	molecular
	.type	molecular, @function
molecular:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movl	$0, (%rdi)
	movzbl	(%rsi), %r14d
	movl	$0, 4(%rsp)
	cmpb	$31, %r14b
	jle	.L23
	movq	%rdi, %r12
	leaq	4(%rsp), %r13
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L15:
	cmpb	$41, %r14b
	je	.L23
	movsbq	0(%rbp), %rcx
	movq	%rcx, %rax
	testb	$8, 1(%rdx,%rcx,2)
	jne	.L33
.L17:
	movl	4(%rsp), %eax
	imull	%ebx, %eax
	addl	%eax, (%r12)
	movzbl	0(%rbp), %r14d
	cmpb	$31, %r14b
	jle	.L23
.L19:
	cmpb	$40, %r14b
	je	.L14
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movsbq	%r14b, %rax
	testb	$4, 1(%rdx,%rax,2)
	je	.L15
.L14:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	call	atom
	movq	%rax, %rbp
	testq	%rax, %rax
	je	.L22
	call	__ctype_b_loc@PLT
	movsbq	0(%rbp), %rcx
	movl	$1, %ebx
	movq	(%rax), %rdx
	movq	%rcx, %rax
	testb	$8, 1(%rdx,%rcx,2)
	je	.L17
.L33:
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L18:
	leal	(%rbx,%rbx,4), %ecx
	addq	$1, %rbp
	leal	-48(%rax,%rcx,2), %ebx
	movsbl	0(%rbp), %eax
	movsbq	%al, %rcx
	testb	$8, 1(%rdx,%rcx,2)
	jne	.L18
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L23:
	movq	%rbp, %rax
.L12:
	movq	8(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L34
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L12
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE56:
	.size	molecular, .-molecular
	.p2align 4
	.globl	atom
	.type	atom, @function
atom:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movsbl	(%rsi), %ebx
	cmpb	$40, %bl
	je	.L56
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movsbq	%bl, %rax
	testb	$4, 1(%rdx,%rax,2)
	je	.L35
	movsbq	1(%r12), %rcx
	subl	$64, %ebx
	movq	%rcx, %rax
	testb	$2, 1(%rdx,%rcx,2)
	jne	.L40
	addq	$1, %r12
.L41:
	movslq	%ebx, %rbx
	leaq	w(%rip), %rax
	movl	(%rax,%rbx,4), %eax
	testl	%eax, %eax
	je	.L42
	movl	%eax, 0(%rbp)
.L35:
	movq	%r12, %rax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L56:
	.cfi_restore_state
	leaq	1(%rsi), %rsi
	xorl	%eax, %eax
	call	molecular
	movq	%rax, %rbx
	testq	%rax, %rax
	je	.L42
	leaq	1(%rax), %r12
	call	__ctype_b_loc@PLT
	movsbq	1(%rbx), %rdx
	movq	(%rax), %rsi
	movq	%rdx, %rax
	testb	$8, 1(%rsi,%rdx,2)
	je	.L35
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L39:
	leal	(%rdx,%rdx,4), %edx
	addq	$1, %r12
	leal	-48(%rax,%rdx,2), %edx
	movsbl	(%r12), %eax
	movsbq	%al, %rcx
	testb	$8, 1(%rsi,%rcx,2)
	jne	.L39
	imull	0(%rbp), %edx
	movl	%edx, 0(%rbp)
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L40:
	addq	$2, %r12
	testb	%cl, %cl
	je	.L41
	subl	$96, %eax
	sall	$5, %eax
	orl	%eax, %ebx
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L42:
	xorl	%r12d, %r12d
	jmp	.L35
	.cfi_endproc
.LFE55:
	.size	atom, .-atom
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"UNKNOWN"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB57:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	w(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$240, %rsp
	.cfi_def_cfa_offset 288
	movq	%fs:40, %rax
	movq	%rax, 232(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L58:
	movq	stdin(%rip), %rdx
	movl	$200, %esi
	movq	%rbp, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L63
	cmpb	$68, 18(%rsp)
	je	.L63
	call	__ctype_b_loc@PLT
	movq	(%rax), %rcx
	movq	%rbp, %rax
	.p2align 4,,10
	.p2align 3
.L59:
	movsbq	(%rax), %rdx
	movq	%rax, %rbx
	leaq	1(%rax), %rax
	movzwl	(%rcx,%rdx,2), %edx
	testb	$32, %dh
	jne	.L59
	movq	%rbx, %rdi
	andb	$4, %dh
	je	.L60
	.p2align 4,,10
	.p2align 3
.L61:
	movsbq	1(%rdi), %rax
	addq	$1, %rdi
	testb	$4, 1(%rcx,%rax,2)
	jne	.L61
.L60:
	movb	$0, (%rdi)
	movl	$10, %edx
	addq	$1, %rdi
	xorl	%esi, %esi
	call	strtol@PLT
	movsbl	(%rbx), %edx
	movsbl	1(%rbx), %ecx
	subl	$64, %edx
	testb	%cl, %cl
	je	.L62
	subl	$96, %ecx
	sall	$5, %ecx
	orl	%ecx, %edx
.L62:
	movslq	%edx, %rdx
	movl	%eax, (%r12,%rdx,4)
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L63:
	leaq	12(%rsp), %rbx
	leaq	.LC1(%rip), %r12
	leaq	.LC0(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L67:
	movq	stdin(%rip), %rdx
	movl	$200, %esi
	movq	%rbp, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L68
	movsbq	16(%rsp), %r14
	cmpb	$48, %r14b
	je	.L68
	call	__ctype_b_loc@PLT
	movq	%rbp, %rsi
	movq	(%rax), %rdx
	testb	$32, 1(%rdx,%r14,2)
	je	.L69
	.p2align 4,,10
	.p2align 3
.L64:
	movsbq	1(%rsi), %rax
	addq	$1, %rsi
	testb	$32, 1(%rdx,%rax,2)
	jne	.L64
.L69:
	movq	%rbx, %rdi
	call	molecular
	testq	%rax, %rax
	je	.L90
	movl	12(%rsp), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L67
	.p2align 4,,10
	.p2align 3
.L90:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L67
	.p2align 4,,10
	.p2align 3
.L68:
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L91
	addq	$240, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L91:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE57:
	.size	main, .-main
	.globl	w
	.bss
	.align 32
	.type	w, @object
	.size	w, 4096
w:
	.zero	4096
	.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 1244: Molecular Formula
// 2017.10.12 bal4u@uu

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

int w[1024];

void insert(char *s, int n)
{
	int i;
	i = (s[0]-'A'+1);
	if (s[1]) i |= (s[1]-'a'+1) << 5;
	w[i] = n;
}

int lookup(char *s)
{
	int i;
	i = (s[0]-'A'+1);
	if (s[1]) i |= (s[1]-'a'+1) << 5;
	return w[i];
}

char *molecular();
char *atom(int *n, char *s)
{
	int k;
	char b[3];

	if (*s == '(') {
		s++; if ((s = molecular(n, s)) == NULL) return NULL;
		s++;
		if (isdigit(*s)) {
			k = 0; while (isdigit(*s)) k = 10*k + (*s++ - '0');
			*n *= k;
		}
	} else if (isalpha(*s)) {
		b[0] = *s++, b[1] = 0;
		if (islower(*s)) b[1] = *s++, b[2] = 0;
		if ((k = lookup(b)) == 0) return NULL;
		*n = k;
	}
	return s;
}

char *molecular(int *n, char *s)
{
	int k, m;

	*n = 0, m = 0;
	while (*s >= ' ') {
		if (*s == '(' || isalpha(*s)) {
			if ((s = atom(&m, s)) == NULL) return NULL;
			k = 1;
		} else if (*s == ')') break;
		if (isdigit(*s)) {
			k = 0; while (isdigit(*s)) k = 10*k + (*s++ - '0');
		}
		*n += m*k;
	}
	return s;
}

int main()
{
	int ans;
	char buf[202], *p, *q;

	while (fgets(buf, 200, stdin) && *(buf+2) != 'D') {
		p = buf;
		while (isspace(*p)) p++;
		q = p; while (isalpha(*p)) p++;
		*p++ = 0;
		insert(q, atoi(p));
	}

	while (fgets(buf, 200, stdin) && *buf != '0') {
		p = buf; while (isspace(*p)) p++;
		if (molecular(&ans, p) == NULL) puts("UNKNOWN");
		else printf("%d\n", ans);
	}
	return 0;
}
H 1
He 4
C 12
O 16
F 19
Ne 24
Cu 64
Cc 333
END_OF_FIRST_PART
H2C
(MgF)2As
Cu(OH)2
H((CO)2F)99
0
 H 1
He 4
C 12
O 16
F 22
Ne 24
Cu 64
Cc 333
END_OF_FIRST_PART
H2C
(MgF)2As
Cu(OH)2
H((CO)2F)99
0
 H 1
He 4
C 12
O 16
F 19
Ne 20
Cu 64
Cc 333
END_OF_FIRST_PART
H2C
(MgF)2As
Cu(OH)2
H((CO)2F)89
0
 H 1
He 4
C 12
O 16
F 19
Ne 24
Cu 64
Cc 333
END_OF_FIRST_PART
HC2
(MgF)2As
Cu(OH)2
H((CO)2F)99
0

14
UNKNOWN
98
7426
 14
UNKNOWN
98
7723
 14
UNKNOWN
98
6676
 25
UNKNOWN
98
7426

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

```c
// AOJ 1244: Molecular Formula
// 2017.10.12 bal4u@uu

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

int w[1024];

void insert(char *s, int n)
{
	int i;
	i = (s[0]-'A'+1);
	if (s[1]) i |= (s[1]-'a'+1) << 5;
	w[i] = n;
}

int lookup(char *s)
{
	int i;
	i = (s[0]-'A'+1);
	if (s[1]) i |= (s[1]-'a'+1) << 5;
	return w[i];
}

char *molecular();
char *atom(int *n, char *s)
{
	int k;
	char b[3];

	if (*s == '(') {
		s++; if ((s = molecular(n, s)) == NULL) return NULL;
		s++;
		if (isdigit(*s)) {
			k = 0; while (isdigit(*s)) k = 10*k + (*s++ - '0');
			*n *= k;
		}
	} else if (isalpha(*s)) {
		b[0] = *s++, b[1] = 0;
		if (islower(*s)) b[1] = *s++, b[2] = 0;
		if ((k = lookup(b)) == 0) return NULL;
		*n = k;
	}
	return s;
}

char *molecular(int *n, char *s)
{
	int k, m;

	*n = 0, m = 0;
	while (*s >= ' ') {
		if (*s == '(' || isalpha(*s)) {
			if ((s = atom(&m, s)) == NULL) return NULL;
			k = 1;
		} else if (*s == ')') break;
		if (isdigit(*s)) {
			k = 0; while (isdigit(*s)) k = 10*k + (*s++ - '0');
		}
		*n += m*k;
	}
	return s;
}

int main()
{
	int ans;
	char buf[202], *p, *q;

	while (fgets(buf, 200, stdin) && *(buf+2) != 'D') {
		p = buf;
		while (isspace(*p)) p++;
		q = p; while (isalpha(*p)) p++;
		*p++ = 0;
		insert(q, atoi(p));
	}

	while (fgets(buf, 200, stdin) && *buf != '0') {
		p = buf; while (isspace(*p)) p++;
		if (molecular(&ans, p) == NULL) puts("UNKNOWN");
		else printf("%d\n", ans);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	w
	.bss
	.align 32
	.type	w, @object
	.size	w, 4096
w:
	.zero	4096
	.text
	.globl	insert
	.type	insert, @function
insert:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$64, %eax
	movl	%eax, -4(%rbp)
	movq	-24(%rbp), %rax
	addq	$1, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L2
	movq	-24(%rbp), %rax
	addq	$1, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$96, %eax
	sall	$5, %eax
	orl	%eax, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	w(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	insert, .-insert
	.globl	lookup
	.type	lookup, @function
lookup:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$64, %eax
	movl	%eax, -4(%rbp)
	movq	-24(%rbp), %rax
	addq	$1, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L4
	movq	-24(%rbp), %rax
	addq	$1, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$96, %eax
	sall	$5, %eax
	orl	%eax, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	lookup, .-lookup
	.globl	atom
	.type	atom, @function
atom:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$40, %al
	jne	.L7
	addq	$1, -32(%rbp)
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	molecular
	movq	%rax, -32(%rbp)
	cmpq	$0, -32(%rbp)
	jne	.L8
	movl	$0, %eax
	jmp	.L15
.L8:
	addq	$1, -32(%rbp)
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	je	.L10
	movl	$0, -16(%rbp)
	jmp	.L11
.L12:
	movl	-16(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %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)
.L11:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	jne	.L12
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	imull	-16(%rbp), %eax
	movl	%eax, %edx
	movq	-24(%rbp), %rax
	movl	%edx, (%rax)
	jmp	.L10
.L7:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$1024, %eax
	testl	%eax, %eax
	je	.L10
	movq	-32(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -32(%rbp)
	movzbl	(%rax), %eax
	movb	%al, -11(%rbp)
	movb	$0, -10(%rbp)
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$512, %eax
	testl	%eax, %eax
	je	.L13
	movq	-32(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -32(%rbp)
	movzbl	(%rax), %eax
	movb	%al, -10(%rbp)
	movb	$0, -9(%rbp)
.L13:
	leaq	-11(%rbp), %rax
	movq	%rax, %rdi
	call	lookup
	movl	%eax, -16(%rbp)
	cmpl	$0, -16(%rbp)
	jne	.L14
	movl	$0, %eax
	jmp	.L15
.L14:
	movq	-24(%rbp), %rax
	movl	-16(%rbp), %edx
	movl	%edx, (%rax)
.L10:
	movq	-32(%rbp), %rax
.L15:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	atom, .-atom
	.globl	molecular
	.type	molecular, @function
molecular:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	-24(%rbp), %rax
	movl	$0, (%rax)
	movl	$0, -16(%rbp)
	jmp	.L18
.L28:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$40, %al
	je	.L19
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$1024, %eax
	testl	%eax, %eax
	je	.L20
.L19:
	movq	-32(%rbp), %rdx
	leaq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	atom
	movq	%rax, -32(%rbp)
	cmpq	$0, -32(%rbp)
	jne	.L21
	movl	$0, %eax
	jmp	.L29
.L21:
	movl	$1, -12(%rbp)
	jmp	.L23
.L20:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$41, %al
	je	.L31
.L23:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	je	.L25
	movl	$0, -12(%rbp)
	jmp	.L26
.L27:
	movl	-12(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %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, -12(%rbp)
.L26:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	jne	.L27
.L25:
	movq	-24(%rbp), %rax
	movl	(%rax), %edx
	movl	-16(%rbp), %eax
	imull	-12(%rbp), %eax
	addl	%eax, %edx
	movq	-24(%rbp), %rax
	movl	%edx, (%rax)
.L18:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$31, %al
	jg	.L28
	jmp	.L24
.L31:
	nop
.L24:
	movq	-32(%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
.LFE9:
	.size	molecular, .-molecular
	.section	.rodata
.LC0:
	.string	"UNKNOWN"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$256, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L33
.L39:
	leaq	-224(%rbp), %rax
	movq	%rax, -240(%rbp)
	jmp	.L34
.L35:
	addq	$1, -240(%rbp)
.L34:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-240(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$8192, %eax
	testl	%eax, %eax
	jne	.L35
	movq	-240(%rbp), %rax
	movq	%rax, -232(%rbp)
	jmp	.L36
.L37:
	addq	$1, -240(%rbp)
.L36:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-240(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$1024, %eax
	testl	%eax, %eax
	jne	.L37
	movq	-240(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -240(%rbp)
	movb	$0, (%rax)
	movq	-240(%rbp), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movl	%eax, %edx
	movq	-232(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	insert
.L33:
	movq	stdin(%rip), %rdx
	leaq	-224(%rbp), %rax
	movl	$200, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L40
	movzbl	-222(%rbp), %eax
	cmpb	$68, %al
	jne	.L39
	jmp	.L40
.L45:
	leaq	-224(%rbp), %rax
	movq	%rax, -240(%rbp)
	jmp	.L41
.L42:
	addq	$1, -240(%rbp)
.L41:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-240(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$8192, %eax
	testl	%eax, %eax
	jne	.L42
	movq	-240(%rbp), %rdx
	leaq	-244(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	molecular
	testq	%rax, %rax
	jne	.L43
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L40
.L43:
	movl	-244(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L40:
	movq	stdin(%rip), %rdx
	leaq	-224(%rbp), %rax
	movl	$200, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L44
	movzbl	-224(%rbp), %eax
	cmpb	$48, %al
	jne	.L45
.L44:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L47
	call	__stack_chk_fail@PLT
.L47:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	w
	.bss
	.align 32
	.type	w, @object
	.size	w, 4096
w:
	.zero	4096
	.text
	.globl	insert
	.type	insert, @function
insert:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$64, %eax
	movl	%eax, -4(%rbp)
	movq	-24(%rbp), %rax
	addq	$1, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L2
	movq	-24(%rbp), %rax
	addq	$1, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$96, %eax
	sall	$5, %eax
	orl	%eax, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	w(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	insert, .-insert
	.globl	lookup
	.type	lookup, @function
lookup:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$64, %eax
	movl	%eax, -4(%rbp)
	movq	-24(%rbp), %rax
	addq	$1, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L4
	movq	-24(%rbp), %rax
	addq	$1, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$96, %eax
	sall	$5, %eax
	orl	%eax, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	(%rdx,%rax), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	lookup, .-lookup
	.globl	atom
	.type	atom, @function
atom:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$40, %al
	jne	.L7
	addq	$1, -32(%rbp)
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	molecular
	movq	%rax, -32(%rbp)
	cmpq	$0, -32(%rbp)
	jne	.L8
	movl	$0, %eax
	jmp	.L15
.L8:
	addq	$1, -32(%rbp)
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	je	.L10
	movl	$0, -16(%rbp)
	jmp	.L11
.L12:
	movl	-16(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %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)
.L11:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	jne	.L12
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	imull	-16(%rbp), %eax
	movl	%eax, %edx
	movq	-24(%rbp), %rax
	movl	%edx, (%rax)
	jmp	.L10
.L7:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$1024, %eax
	testl	%eax, %eax
	je	.L10
	movq	-32(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -32(%rbp)
	movzbl	(%rax), %eax
	movb	%al, -11(%rbp)
	movb	$0, -10(%rbp)
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$512, %eax
	testl	%eax, %eax
	je	.L13
	movq	-32(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -32(%rbp)
	movzbl	(%rax), %eax
	movb	%al, -10(%rbp)
	movb	$0, -9(%rbp)
.L13:
	leaq	-11(%rbp), %rax
	movq	%rax, %rdi
	call	lookup
	movl	%eax, -16(%rbp)
	cmpl	$0, -16(%rbp)
	jne	.L14
	movl	$0, %eax
	jmp	.L15
.L14:
	movq	-24(%rbp), %rax
	movl	-16(%rbp), %edx
	movl	%edx, (%rax)
.L10:
	movq	-32(%rbp), %rax
.L15:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	atom, .-atom
	.globl	molecular
	.type	molecular, @function
molecular:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	-24(%rbp), %rax
	movl	$0, (%rax)
	movl	$0, -16(%rbp)
	jmp	.L18
.L28:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$40, %al
	je	.L19
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$1024, %eax
	testl	%eax, %eax
	je	.L20
.L19:
	movq	-32(%rbp), %rdx
	leaq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	atom
	movq	%rax, -32(%rbp)
	cmpq	$0, -32(%rbp)
	jne	.L21
	movl	$0, %eax
	jmp	.L29
.L21:
	movl	$1, -12(%rbp)
	jmp	.L23
.L20:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$41, %al
	je	.L31
.L23:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	je	.L25
	movl	$0, -12(%rbp)
	jmp	.L26
.L27:
	movl	-12(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %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, -12(%rbp)
.L26:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	jne	.L27
.L25:
	movq	-24(%rbp), %rax
	movl	(%rax), %edx
	movl	-16(%rbp), %eax
	imull	-12(%rbp), %eax
	addl	%eax, %edx
	movq	-24(%rbp), %rax
	movl	%edx, (%rax)
.L18:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$31, %al
	jg	.L28
	jmp	.L24
.L31:
	nop
.L24:
	movq	-32(%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
.LFE9:
	.size	molecular, .-molecular
	.section	.rodata
.LC0:
	.string	"UNKNOWN"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$256, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L33
.L39:
	leaq	-224(%rbp), %rax
	movq	%rax, -240(%rbp)
	jmp	.L34
.L35:
	addq	$1, -240(%rbp)
.L34:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-240(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$8192, %eax
	testl	%eax, %eax
	jne	.L35
	movq	-240(%rbp), %rax
	movq	%rax, -232(%rbp)
	jmp	.L36
.L37:
	addq	$1, -240(%rbp)
.L36:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-240(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$1024, %eax
	testl	%eax, %eax
	jne	.L37
	movq	-240(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -240(%rbp)
	movb	$0, (%rax)
	movq	-240(%rbp), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movl	%eax, %edx
	movq	-232(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	insert
.L33:
	movq	stdin(%rip), %rdx
	leaq	-224(%rbp), %rax
	movl	$200, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L40
	movzbl	-222(%rbp), %eax
	cmpb	$68, %al
	jne	.L39
	jmp	.L40
.L45:
	leaq	-224(%rbp), %rax
	movq	%rax, -240(%rbp)
	jmp	.L41
.L42:
	addq	$1, -240(%rbp)
.L41:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	-240(%rbp), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$8192, %eax
	testl	%eax, %eax
	jne	.L42
	movq	-240(%rbp), %rdx
	leaq	-244(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	molecular
	testq	%rax, %rax
	jne	.L43
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L40
.L43:
	movl	-244(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L40:
	movq	stdin(%rip), %rdx
	leaq	-224(%rbp), %rax
	movl	$200, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L44
	movzbl	-224(%rbp), %eax
	cmpb	$48, %al
	jne	.L45
.L44:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L47
	call	__stack_chk_fail@PLT
.L47:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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:
