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 a[99],sum[99];
char s[100010];
int main(){
	scanf("%s",s);
	for(int i=0;s[i];i++)a[s[i]-'a']++;
	while(1){
		int m1=-1,m2=-1;
		for(int i=0;i<26;i++)if(a[i]){
			if(m1==-1||a[m1]>a[i])m2=m1,m1=i;
			else if(m2==-1||a[m2]>a[i])m2=i;
		}
		if(m2==-1){
			printf("%d\n",sum[m1]?:a[m1]);
			return 0;
		}
		a[m1]+=a[m2];
		sum[m1]+=sum[m2]+a[m1];
		a[m2]=0;
	}
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 396
a:
	.zero	396
	.globl	sum
	.align 32
	.type	sum, @object
	.size	sum, 396
sum:
	.zero	396
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 100010
s:
	.zero	100010
	.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
	subq	$16, %rsp
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L2
.L3:
	movl	-16(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L2:
	movl	-16(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L3
.L14:
	movl	$-1, -12(%rbp)
	movl	$-1, -8(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L4
.L9:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L5
	cmpl	$-1, -12(%rbp)
	je	.L6
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L7
.L6:
	movl	-12(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L5
.L7:
	cmpl	$-1, -8(%rbp)
	je	.L8
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L5
.L8:
	movl	-4(%rbp), %eax
	movl	%eax, -8(%rbp)
.L5:
	addl	$1, -4(%rbp)
.L4:
	cmpl	$25, -4(%rbp)
	jle	.L9
	cmpl	$-1, -8(%rbp)
	jne	.L10
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sum(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L12
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
.L12:
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L15
.L10:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sum(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sum(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%esi, %eax
	addl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sum(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	$0, (%rdx,%rax)
	jmp	.L14
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"%s"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	s(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movsbl	s(%rip), %eax
	leaq	a(%rip), %r10
	leaq	1+s(%rip), %rdx
	testb	%al, %al
	je	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	subl	$97, %eax
	addq	$1, %rdx
	cltq
	addl	$1, (%r10,%rax,4)
	movsbl	-1(%rdx), %eax
	testb	%al, %al
	jne	.L4
.L5:
	leaq	sum(%rip), %r11
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	a(%rip), %rax
	xorl	%ecx, %ecx
	movq	$-1, %r8
	movq	$-1, %rdi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L27:
	movslq	%edi, %r9
	cmpl	(%r10,%r9,4), %esi
	jl	.L14
	cmpl	$-1, %r8d
	je	.L15
	movslq	%r8d, %r9
	cmpl	(%r10,%r9,4), %esi
	cmovl	%rcx, %r8
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	$26, %edx
	je	.L26
.L12:
	addq	$4, %rax
	movslq	%edx, %rcx
.L9:
	movl	(%rax), %esi
	leal	1(%rcx), %edx
	testl	%esi, %esi
	je	.L6
	cmpl	$-1, %edi
	jne	.L27
	cmpl	$26, %edx
	je	.L28
	movq	$-1, %r8
	movslq	%ecx, %rdi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L14:
	movslq	%edi, %r8
	movslq	%ecx, %rdi
	cmpl	$26, %edx
	jne	.L12
	.p2align 4,,10
	.p2align 3
.L26:
	movl	(%r11,%rdi,4), %edx
	cmpl	$-1, %r8d
	je	.L13
	movl	(%r10,%r8,4), %eax
	addl	(%r10,%rdi,4), %eax
	movl	%eax, (%r10,%rdi,4)
	addl	(%r11,%r8,4), %eax
	addl	%edx, %eax
	movl	$0, (%r10,%r8,4)
	movl	%eax, (%r11,%rdi,4)
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L15:
	movslq	%ecx, %r8
	jmp	.L6
.L28:
	movl	$25, %edi
.L13:
	movl	(%r11,%rdi,4), %edx
	testl	%edx, %edx
	jne	.L11
	movl	(%r10,%rdi,4), %edx
.L11:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 100010
s:
	.zero	100010
	.globl	sum
	.align 32
	.type	sum, @object
	.size	sum, 396
sum:
	.zero	396
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 396
a:
	.zero	396
	.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
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	leaq	s(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movsbl	s(%rip), %eax
	leaq	a(%rip), %r10
	leaq	1+s(%rip), %rdx
	testb	%al, %al
	je	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	subl	$97, %eax
	addq	$1, %rdx
	cltq
	addl	$1, (%r10,%rax,4)
	movsbl	-1(%rdx), %eax
	testb	%al, %al
	jne	.L4
.L5:
	leaq	sum(%rip), %r11
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	a(%rip), %rax
	xorl	%ecx, %ecx
	movq	$-1, %r8
	movq	$-1, %rdi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L27:
	movslq	%edi, %r9
	cmpl	(%r10,%r9,4), %esi
	jl	.L14
	cmpl	$-1, %r8d
	je	.L15
	movslq	%r8d, %r9
	cmpl	(%r10,%r9,4), %esi
	cmovl	%rcx, %r8
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	$26, %edx
	je	.L26
.L12:
	addq	$4, %rax
	movslq	%edx, %rcx
.L9:
	movl	(%rax), %esi
	leal	1(%rcx), %edx
	testl	%esi, %esi
	je	.L6
	cmpl	$-1, %edi
	jne	.L27
	cmpl	$26, %edx
	je	.L28
	movq	$-1, %r8
	movslq	%ecx, %rdi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L14:
	movslq	%edi, %r8
	movslq	%ecx, %rdi
	cmpl	$26, %edx
	jne	.L12
	.p2align 4,,10
	.p2align 3
.L26:
	movl	(%r11,%rdi,4), %edx
	cmpl	$-1, %r8d
	je	.L13
	movl	(%r10,%r8,4), %eax
	addl	(%r10,%rdi,4), %eax
	movl	%eax, (%r10,%rdi,4)
	addl	(%r11,%r8,4), %eax
	addl	%edx, %eax
	movl	$0, (%r10,%r8,4)
	movl	%eax, (%r11,%rdi,4)
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L15:
	movslq	%ecx, %r8
	jmp	.L6
.L28:
	movl	$25, %edi
.L13:
	movl	(%r11,%rdi,4), %edx
	testl	%edx, %edx
	jne	.L11
	movl	(%r10,%rdi,4), %edx
.L11:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 100010
s:
	.zero	100010
	.globl	sum
	.align 32
	.type	sum, @object
	.size	sum, 396
sum:
	.zero	396
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 396
a:
	.zero	396
	.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 a[99],sum[99];
char s[100010];
int main(){
	scanf("%s",s);
	for(int i=0;s[i];i++)a[s[i]-'a']++;
	while(1){
		int m1=-1,m2=-1;
		for(int i=0;i<26;i++)if(a[i]){
			if(m1==-1||a[m1]>a[i])m2=m1,m1=i;
			else if(m2==-1||a[m2]>a[i])m2=i;
		}
		if(m2==-1){
			printf("%d\n",sum[m1]?:a[m1]);
			return 0;
		}
		a[m1]+=a[m2];
		sum[m1]+=sum[m2]+a[m1];
		a[m2]=0;
	}
}

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 a[99],sum[99];
char s[100010];
int main(){
	scanf("%s",s);
	for(int i=0;s[i];i++)a[s[i]-'a']++;
	while(1){
		int m1=-1,m2=-1;
		for(int i=0;i<26;i++)if(a[i]){
			if(m1==-1||a[m1]>a[i])m2=m1,m1=i;
			else if(m2==-1||a[m2]>a[i])m2=i;
		}
		if(m2==-1){
			printf("%d\n",sum[m1]?:a[m1]);
			return 0;
		}
		a[m1]+=a[m2];
		sum[m1]+=sum[m2]+a[m1];
		a[m2]=0;
	}
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 396
a:
	.zero	396
	.globl	sum
	.align 32
	.type	sum, @object
	.size	sum, 396
sum:
	.zero	396
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 100010
s:
	.zero	100010
	.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
	subq	$16, %rsp
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L2
.L3:
	movl	-16(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L2:
	movl	-16(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L3
.L14:
	movl	$-1, -12(%rbp)
	movl	$-1, -8(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L4
.L9:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L5
	cmpl	$-1, -12(%rbp)
	je	.L6
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L7
.L6:
	movl	-12(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L5
.L7:
	cmpl	$-1, -8(%rbp)
	je	.L8
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L5
.L8:
	movl	-4(%rbp), %eax
	movl	%eax, -8(%rbp)
.L5:
	addl	$1, -4(%rbp)
.L4:
	cmpl	$25, -4(%rbp)
	jle	.L9
	cmpl	$-1, -8(%rbp)
	jne	.L10
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sum(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L12
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
.L12:
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L15
.L10:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sum(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sum(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%esi, %eax
	addl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sum(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	$0, (%rdx,%rax)
	jmp	.L14
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 396
a:
	.zero	396
	.globl	sum
	.align 32
	.type	sum, @object
	.size	sum, 396
sum:
	.zero	396
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 100010
s:
	.zero	100010
	.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
	subq	$16, %rsp
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L2
.L3:
	movl	-16(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -16(%rbp)
.L2:
	movl	-16(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L3
.L14:
	movl	$-1, -12(%rbp)
	movl	$-1, -8(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L4
.L9:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L5
	cmpl	$-1, -12(%rbp)
	je	.L6
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L7
.L6:
	movl	-12(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-4(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L5
.L7:
	cmpl	$-1, -8(%rbp)
	je	.L8
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L5
.L8:
	movl	-4(%rbp), %eax
	movl	%eax, -8(%rbp)
.L5:
	addl	$1, -4(%rbp)
.L4:
	cmpl	$25, -4(%rbp)
	jle	.L9
	cmpl	$-1, -8(%rbp)
	jne	.L10
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sum(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L12
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
.L12:
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L15
.L10:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sum(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sum(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%esi, %eax
	addl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sum(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	$0, (%rdx,%rax)
	jmp	.L14
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
