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

```c
#include <stdio.h>
#include <stdlib.h>

int e1[100+1],result[100+1];
char eFin[100000+1];
int cnt=0;
int a;
int b;

void FirstReload();
void Distinguish();

int main(){
	scanf("%s",eFin);
	FirstReload();
	while(1){
	    a=b=-1;
        Distinguish();
        //printf(">>>%d %d\n", result[a], e1[a]);

		if(b == -1){
			// printf("%d\n",result[a]?:e1[a]);
            if(result[a]){
                printf("%d\n",result[a]?:e1[a]);
            }else{printf("%d\n",result[a]?:e1[a]);}
            //printf(">>>>%d %d\n", result[a], e1[a]);
			goto aaa;
		}
		//e1[a]+=e1[b];
		result[a]+=result[b]+(e1[a]+=e1[b]);
		e1[b]=0;    //初期化
	}
    aaa: return 0;
}

void Distinguish(){
    for(int cnt=0; cnt<26; cnt++){
        if(e1[cnt] != 0){
			if( e1[a] > e1[cnt] || a==-1){
                b=a,a=cnt;
                continue;
            }
			if(b==-1||e1[b] > e1[cnt]){
                b=cnt;
                continue;
            }
	    }
    }
}
void FirstReload(){while(eFin[cnt]){e1[eFin[cnt]-97]++;cnt++;}}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	e1
	.bss
	.align 32
	.type	e1, @object
	.size	e1, 404
e1:
	.zero	404
	.globl	result
	.align 32
	.type	result, @object
	.size	result, 404
result:
	.zero	404
	.globl	eFin
	.align 32
	.type	eFin, @object
	.size	eFin, 100001
eFin:
	.zero	100001
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	eFin(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, %eax
	call	FirstReload
.L10:
	movl	$-1, b(%rip)
	movl	b(%rip), %eax
	movl	%eax, a(%rip)
	movl	$0, %eax
	call	Distinguish
	movl	b(%rip), %eax
	cmpl	$-1, %eax
	jne	.L2
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	result(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L3
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	result(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L5
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %eax
.L5:
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L9
.L3:
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	result(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L8
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %eax
.L8:
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L9
.L2:
	movl	b(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	result(%rip), %rax
	movl	(%rdx,%rax), %edi
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	b(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	a(%rip), %eax
	leal	(%rcx,%rdx), %esi
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	e1(%rip), %rdx
	movl	%esi, (%rcx,%rdx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	(%rdi,%rax), %ecx
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	result(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	a(%rip), %eax
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	result(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	b(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	$0, (%rdx,%rax)
	jmp	.L10
.L9:
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	Distinguish
	.type	Distinguish, @function
Distinguish:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -4(%rbp)
	jmp	.L13
.L18:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L14
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	e1(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L15
	movl	a(%rip), %eax
	cmpl	$-1, %eax
	jne	.L16
.L15:
	movl	a(%rip), %eax
	movl	%eax, b(%rip)
	movl	-4(%rbp), %eax
	movl	%eax, a(%rip)
	jmp	.L14
.L16:
	movl	b(%rip), %eax
	cmpl	$-1, %eax
	je	.L17
	movl	b(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	e1(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L14
.L17:
	movl	-4(%rbp), %eax
	movl	%eax, b(%rip)
	nop
.L14:
	addl	$1, -4(%rbp)
.L13:
	cmpl	$25, -4(%rbp)
	jle	.L18
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Distinguish, .-Distinguish
	.globl	FirstReload
	.type	FirstReload, @function
FirstReload:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	jmp	.L20
.L21:
	movl	cnt(%rip), %eax
	cltq
	leaq	eFin(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	e1(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
.L20:
	movl	cnt(%rip), %eax
	cltq
	leaq	eFin(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L21
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	FirstReload, .-FirstReload
	.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	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	eFin(%rip), %rbx
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movslq	cnt(%rip), %rax
	leaq	e1(%rip), %rcx
	movq	%rax, %rdx
	movsbl	(%rbx,%rax), %eax
	testb	%al, %al
	je	.L2
	addl	$1, %edx
	leaq	-1(%rbx), %rdi
	movslq	%edx, %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	subl	$97, %eax
	movl	%edx, %esi
	addq	$1, %rdx
	cltq
	addl	$1, (%rcx,%rax,4)
	movsbl	(%rdi,%rdx), %eax
	testb	%al, %al
	jne	.L3
	movl	%esi, cnt(%rip)
.L2:
	leaq	result(%rip), %r10
	.p2align 4,,10
	.p2align 3
.L9:
	xorl	%eax, %eax
	movl	$-1, %esi
	movl	$-1, %r8d
	movq	$-1, %r9
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L25:
	cmpl	$-1, %r8d
	je	.L10
	cmpl	$-1, %esi
	je	.L11
	movslq	%esi, %rdi
	cmpl	(%rcx,%rdi,4), %edx
	cmovl	%eax, %esi
.L4:
	addq	$1, %rax
	cmpq	$26, %rax
	je	.L24
.L5:
	movl	(%rcx,%rax,4), %edx
	movl	%eax, %edi
	testl	%edx, %edx
	je	.L4
	cmpl	(%rcx,%r9,4), %edx
	jge	.L25
.L10:
	movslq	%edi, %r9
	addq	$1, %rax
	movl	%r8d, %esi
	movq	%r9, %r8
	cmpq	$26, %rax
	jne	.L5
.L24:
	movl	(%r10,%r9,4), %edx
	cmpl	$-1, %esi
	je	.L26
	movslq	%esi, %rsi
	movl	(%rcx,%rsi,4), %eax
	addl	(%rcx,%r9,4), %eax
	movl	%eax, (%rcx,%r9,4)
	addl	(%r10,%rsi,4), %eax
	addl	%edx, %eax
	movl	$0, (%rcx,%rsi,4)
	movl	%eax, (%r10,%r9,4)
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%eax, %esi
	jmp	.L4
.L26:
	movl	$-1, b(%rip)
	movl	%r8d, a(%rip)
	testl	%edx, %edx
	jne	.L22
	movl	(%rcx,%r9,4), %edx
.L22:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.text
	.p2align 4
	.globl	Distinguish
	.type	Distinguish, @function
Distinguish:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	a(%rip), %edi
	xorl	%eax, %eax
	xorl	%r10d, %r10d
	movl	b(%rip), %r9d
	xorl	%r11d, %r11d
	movl	$1, %ebx
	leaq	e1(%rip), %rsi
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L46:
	cmpl	$-1, %r9d
	je	.L33
	movslq	%r9d, %rcx
	cmpl	(%rsi,%rcx,4), %edx
	cmovl	%eax, %r9d
	cmovl	%ebx, %r10d
.L28:
	addq	$1, %rax
	cmpq	$26, %rax
	je	.L45
.L29:
	movl	(%rsi,%rax,4), %edx
	testl	%edx, %edx
	je	.L28
	movslq	%edi, %rcx
	cmpl	(%rsi,%rcx,4), %edx
	setl	%cl
	cmpl	$-1, %edi
	sete	%r8b
	orb	%r8b, %cl
	je	.L46
	movl	%edi, %r9d
	movl	%eax, %edi
	addq	$1, %rax
	movl	%ecx, %r10d
	movl	%ecx, %r11d
	cmpq	$26, %rax
	jne	.L29
.L45:
	testb	%r10b, %r10b
	je	.L30
	movl	%r9d, b(%rip)
.L30:
	testb	%r11b, %r11b
	je	.L27
	movl	%edi, a(%rip)
.L27:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	movl	%eax, %r9d
	movl	$1, %r10d
	jmp	.L28
	.cfi_endproc
.LFE40:
	.size	Distinguish, .-Distinguish
	.p2align 4
	.globl	FirstReload
	.type	FirstReload, @function
FirstReload:
.LFB41:
	.cfi_startproc
	endbr64
	movslq	cnt(%rip), %rax
	leaq	eFin(%rip), %rcx
	movq	%rax, %rdx
	movsbl	(%rcx,%rax), %eax
	testb	%al, %al
	je	.L47
	addl	$1, %edx
	leaq	e1(%rip), %rcx
	leaq	-1+eFin(%rip), %rdi
	movslq	%edx, %rdx
	.p2align 4,,10
	.p2align 3
.L49:
	subl	$97, %eax
	movl	%edx, %esi
	addq	$1, %rdx
	cltq
	addl	$1, (%rcx,%rax,4)
	movsbl	(%rdi,%rdx), %eax
	testb	%al, %al
	jne	.L49
	movl	%esi, cnt(%rip)
.L47:
	ret
	.cfi_endproc
.LFE41:
	.size	FirstReload, .-FirstReload
	.globl	b
	.bss
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	eFin
	.align 32
	.type	eFin, @object
	.size	eFin, 100001
eFin:
	.zero	100001
	.globl	result
	.align 32
	.type	result, @object
	.size	result, 404
result:
	.zero	404
	.globl	e1
	.align 32
	.type	e1, @object
	.size	e1, 404
e1:
	.zero	404
	.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	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	eFin(%rip), %rbx
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movslq	cnt(%rip), %rax
	leaq	e1(%rip), %rcx
	movq	%rax, %rdx
	movsbl	(%rbx,%rax), %eax
	testb	%al, %al
	je	.L2
	addl	$1, %edx
	leaq	-1(%rbx), %rdi
	movslq	%edx, %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	subl	$97, %eax
	movl	%edx, %esi
	addq	$1, %rdx
	cltq
	addl	$1, (%rcx,%rax,4)
	movsbl	(%rdi,%rdx), %eax
	testb	%al, %al
	jne	.L3
	movl	%esi, cnt(%rip)
.L2:
	leaq	result(%rip), %r10
	.p2align 4,,10
	.p2align 3
.L9:
	xorl	%eax, %eax
	movl	$-1, %esi
	movl	$-1, %r8d
	movq	$-1, %r9
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L25:
	cmpl	$-1, %r8d
	je	.L10
	cmpl	$-1, %esi
	je	.L11
	movslq	%esi, %rdi
	cmpl	(%rcx,%rdi,4), %edx
	cmovl	%eax, %esi
.L4:
	addq	$1, %rax
	cmpq	$26, %rax
	je	.L24
.L5:
	movl	(%rcx,%rax,4), %edx
	movl	%eax, %edi
	testl	%edx, %edx
	je	.L4
	cmpl	(%rcx,%r9,4), %edx
	jge	.L25
.L10:
	movslq	%edi, %r9
	addq	$1, %rax
	movl	%r8d, %esi
	movq	%r9, %r8
	cmpq	$26, %rax
	jne	.L5
.L24:
	movl	(%r10,%r9,4), %edx
	cmpl	$-1, %esi
	je	.L26
	movslq	%esi, %rsi
	movl	(%rcx,%rsi,4), %eax
	addl	(%rcx,%r9,4), %eax
	movl	%eax, (%rcx,%r9,4)
	addl	(%r10,%rsi,4), %eax
	addl	%edx, %eax
	movl	$0, (%rcx,%rsi,4)
	movl	%eax, (%r10,%r9,4)
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%eax, %esi
	jmp	.L4
.L26:
	movl	$-1, b(%rip)
	movl	%r8d, a(%rip)
	testl	%edx, %edx
	jne	.L22
	movl	(%rcx,%r9,4), %edx
.L22:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.text
	.p2align 4
	.globl	Distinguish
	.type	Distinguish, @function
Distinguish:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	a(%rip), %edi
	xorl	%eax, %eax
	xorl	%r10d, %r10d
	movl	b(%rip), %r9d
	xorl	%r11d, %r11d
	movl	$1, %ebx
	leaq	e1(%rip), %rsi
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L46:
	cmpl	$-1, %r9d
	je	.L33
	movslq	%r9d, %rcx
	cmpl	(%rsi,%rcx,4), %edx
	cmovl	%eax, %r9d
	cmovl	%ebx, %r10d
.L28:
	addq	$1, %rax
	cmpq	$26, %rax
	je	.L45
.L29:
	movl	(%rsi,%rax,4), %edx
	testl	%edx, %edx
	je	.L28
	movslq	%edi, %rcx
	cmpl	(%rsi,%rcx,4), %edx
	setl	%cl
	cmpl	$-1, %edi
	sete	%r8b
	orb	%r8b, %cl
	je	.L46
	movl	%edi, %r9d
	movl	%eax, %edi
	addq	$1, %rax
	movl	%ecx, %r10d
	movl	%ecx, %r11d
	cmpq	$26, %rax
	jne	.L29
.L45:
	testb	%r10b, %r10b
	je	.L30
	movl	%r9d, b(%rip)
.L30:
	testb	%r11b, %r11b
	je	.L27
	movl	%edi, a(%rip)
.L27:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	movl	%eax, %r9d
	movl	$1, %r10d
	jmp	.L28
	.cfi_endproc
.LFE40:
	.size	Distinguish, .-Distinguish
	.p2align 4
	.globl	FirstReload
	.type	FirstReload, @function
FirstReload:
.LFB41:
	.cfi_startproc
	endbr64
	movslq	cnt(%rip), %rax
	leaq	eFin(%rip), %rcx
	movq	%rax, %rdx
	movsbl	(%rcx,%rax), %eax
	testb	%al, %al
	je	.L47
	addl	$1, %edx
	leaq	e1(%rip), %rcx
	leaq	-1+eFin(%rip), %rdi
	movslq	%edx, %rdx
	.p2align 4,,10
	.p2align 3
.L49:
	subl	$97, %eax
	movl	%edx, %esi
	addq	$1, %rdx
	cltq
	addl	$1, (%rcx,%rax,4)
	movsbl	(%rdi,%rdx), %eax
	testb	%al, %al
	jne	.L49
	movl	%esi, cnt(%rip)
.L47:
	ret
	.cfi_endproc
.LFE41:
	.size	FirstReload, .-FirstReload
	.globl	b
	.bss
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	eFin
	.align 32
	.type	eFin, @object
	.size	eFin, 100001
eFin:
	.zero	100001
	.globl	result
	.align 32
	.type	result, @object
	.size	result, 404
result:
	.zero	404
	.globl	e1
	.align 32
	.type	e1, @object
	.size	e1, 404
e1:
	.zero	404
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

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

int e1[100+1],result[100+1];
char eFin[100000+1];
int cnt=0;
int a;
int b;

void FirstReload();
void Distinguish();

int main(){
	scanf("%s",eFin);
	FirstReload();
	while(1){
	    a=b=-1;
        Distinguish();
        //printf(">>>%d %d\n", result[a], e1[a]);

		if(b == -1){
			// printf("%d\n",result[a]?:e1[a]);
            if(result[a]){
                printf("%d\n",result[a]?:e1[a]);
            }else{printf("%d\n",result[a]?:e1[a]);}
            //printf(">>>>%d %d\n", result[a], e1[a]);
			goto aaa;
		}
		//e1[a]+=e1[b];
		result[a]+=result[b]+(e1[a]+=e1[b]);
		e1[b]=0;    //初期化
	}
    aaa: return 0;
}

void Distinguish(){
    for(int cnt=0; cnt<26; cnt++){
        if(e1[cnt] != 0){
			if( e1[a] > e1[cnt] || a==-1){
                b=a,a=cnt;
                continue;
            }
			if(b==-1||e1[b] > e1[cnt]){
                b=cnt;
                continue;
            }
	    }
    }
}
void FirstReload(){while(eFin[cnt]){e1[eFin[cnt]-97]++;cnt++;}}

y
 aaabbcccdeeegfg
 baca
 aaadbcccbeedgfg
 bbcb
 gegdeebcccbeaaa
 aeaaacccbeedgeg
 gegdeebccdaaaea
 gegdfebccdaaaea
 bedc

1
 41
 6
 42
 4
 38
 36
 37
 40
 8

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

```c
#include <stdio.h>
#include <stdlib.h>

int e1[100+1],result[100+1];
char eFin[100000+1];
int cnt=0;
int a;
int b;

void FirstReload();
void Distinguish();

int main(){
	scanf("%s",eFin);
	FirstReload();
	while(1){
	    a=b=-1;
        Distinguish();
        //printf(">>>%d %d\n", result[a], e1[a]);

		if(b == -1){
			// printf("%d\n",result[a]?:e1[a]);
            if(result[a]){
                printf("%d\n",result[a]?:e1[a]);
            }else{printf("%d\n",result[a]?:e1[a]);}
            //printf(">>>>%d %d\n", result[a], e1[a]);
			goto aaa;
		}
		//e1[a]+=e1[b];
		result[a]+=result[b]+(e1[a]+=e1[b]);
		e1[b]=0;    //初期化
	}
    aaa: return 0;
}

void Distinguish(){
    for(int cnt=0; cnt<26; cnt++){
        if(e1[cnt] != 0){
			if( e1[a] > e1[cnt] || a==-1){
                b=a,a=cnt;
                continue;
            }
			if(b==-1||e1[b] > e1[cnt]){
                b=cnt;
                continue;
            }
	    }
    }
}
void FirstReload(){while(eFin[cnt]){e1[eFin[cnt]-97]++;cnt++;}}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	e1
	.bss
	.align 32
	.type	e1, @object
	.size	e1, 404
e1:
	.zero	404
	.globl	result
	.align 32
	.type	result, @object
	.size	result, 404
result:
	.zero	404
	.globl	eFin
	.align 32
	.type	eFin, @object
	.size	eFin, 100001
eFin:
	.zero	100001
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	eFin(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, %eax
	call	FirstReload
.L10:
	movl	$-1, b(%rip)
	movl	b(%rip), %eax
	movl	%eax, a(%rip)
	movl	$0, %eax
	call	Distinguish
	movl	b(%rip), %eax
	cmpl	$-1, %eax
	jne	.L2
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	result(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L3
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	result(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L5
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %eax
.L5:
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L9
.L3:
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	result(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L8
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %eax
.L8:
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L9
.L2:
	movl	b(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	result(%rip), %rax
	movl	(%rdx,%rax), %edi
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	b(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	a(%rip), %eax
	leal	(%rcx,%rdx), %esi
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	e1(%rip), %rdx
	movl	%esi, (%rcx,%rdx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	(%rdi,%rax), %ecx
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	result(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	a(%rip), %eax
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	result(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	b(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	$0, (%rdx,%rax)
	jmp	.L10
.L9:
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	Distinguish
	.type	Distinguish, @function
Distinguish:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -4(%rbp)
	jmp	.L13
.L18:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L14
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	e1(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L15
	movl	a(%rip), %eax
	cmpl	$-1, %eax
	jne	.L16
.L15:
	movl	a(%rip), %eax
	movl	%eax, b(%rip)
	movl	-4(%rbp), %eax
	movl	%eax, a(%rip)
	jmp	.L14
.L16:
	movl	b(%rip), %eax
	cmpl	$-1, %eax
	je	.L17
	movl	b(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	e1(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L14
.L17:
	movl	-4(%rbp), %eax
	movl	%eax, b(%rip)
	nop
.L14:
	addl	$1, -4(%rbp)
.L13:
	cmpl	$25, -4(%rbp)
	jle	.L18
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Distinguish, .-Distinguish
	.globl	FirstReload
	.type	FirstReload, @function
FirstReload:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	jmp	.L20
.L21:
	movl	cnt(%rip), %eax
	cltq
	leaq	eFin(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	e1(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
.L20:
	movl	cnt(%rip), %eax
	cltq
	leaq	eFin(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L21
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	FirstReload, .-FirstReload
	.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.
val
	.file	"temp.c"
	.text
	.globl	e1
	.bss
	.align 32
	.type	e1, @object
	.size	e1, 404
e1:
	.zero	404
	.globl	result
	.align 32
	.type	result, @object
	.size	result, 404
result:
	.zero	404
	.globl	eFin
	.align 32
	.type	eFin, @object
	.size	eFin, 100001
eFin:
	.zero	100001
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	eFin(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, %eax
	call	FirstReload
.L10:
	movl	$-1, b(%rip)
	movl	b(%rip), %eax
	movl	%eax, a(%rip)
	movl	$0, %eax
	call	Distinguish
	movl	b(%rip), %eax
	cmpl	$-1, %eax
	jne	.L2
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	result(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L3
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	result(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L5
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %eax
.L5:
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L9
.L3:
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	result(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L8
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %eax
.L8:
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L9
.L2:
	movl	b(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	result(%rip), %rax
	movl	(%rdx,%rax), %edi
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	b(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	a(%rip), %eax
	leal	(%rcx,%rdx), %esi
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	e1(%rip), %rdx
	movl	%esi, (%rcx,%rdx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	(%rdi,%rax), %ecx
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	result(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	a(%rip), %eax
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	result(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	b(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	$0, (%rdx,%rax)
	jmp	.L10
.L9:
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	Distinguish
	.type	Distinguish, @function
Distinguish:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -4(%rbp)
	jmp	.L13
.L18:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L14
	movl	a(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	e1(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L15
	movl	a(%rip), %eax
	cmpl	$-1, %eax
	jne	.L16
.L15:
	movl	a(%rip), %eax
	movl	%eax, b(%rip)
	movl	-4(%rbp), %eax
	movl	%eax, a(%rip)
	jmp	.L14
.L16:
	movl	b(%rip), %eax
	cmpl	$-1, %eax
	je	.L17
	movl	b(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	e1(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L14
.L17:
	movl	-4(%rbp), %eax
	movl	%eax, b(%rip)
	nop
.L14:
	addl	$1, -4(%rbp)
.L13:
	cmpl	$25, -4(%rbp)
	jle	.L18
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Distinguish, .-Distinguish
	.globl	FirstReload
	.type	FirstReload, @function
FirstReload:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	jmp	.L20
.L21:
	movl	cnt(%rip), %eax
	cltq
	leaq	eFin(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	e1(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e1(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
.L20:
	movl	cnt(%rip), %eax
	cltq
	leaq	eFin(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L21
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	FirstReload, .-FirstReload
	.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:
