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

```c
#include <stdio.h>

int main () {
	int N;
	long long num[] = {0,0,0,0,0};
	char name[11];
	scanf ("%d", &N);
	for (int i=0; i<N; i++) {
		scanf ("%s", name);
		switch (name[0]) {
			case 'M':
				num[0] ++;
				break;
			case 'A':
				num[1] ++;
				break;
			case 'R':
				num[2] ++;
				break;
			case 'C':
				num[3] ++;
				break;
			case 'H':
				num[4] ++;
				break;
		}
	}
	long long sum = 0;
	for (int i=0; i<5; i++)
		for (int j=i+1; j<5; j++)
			for (int k=j+1; k<5; k++)
				sum += num[i] * num[j] * num[k];
	printf ("%lld\n", sum);
	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	%xmm0, %xmm0
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.L6(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$88, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	movaps	%xmm0, 16(%rsp)
	leaq	61(%rsp), %r13
	movq	$0, 48(%rsp)
	movaps	%xmm0, 32(%rsp)
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	61(%rsp), %eax
	subl	$65, %eax
	cmpb	$17, %al
	ja	.L4
	movzbl	%al, %eax
	movslq	0(%rbp,%rax,4), %rax
	addq	%rbp, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L6:
	.long	.L10-.L6
	.long	.L4-.L6
	.long	.L9-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L8-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L7-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L5-.L6
	.section	.text.startup
.L7:
	addq	$1, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
.L11:
	xorl	%edi, %edi
	movl	$1, %r9d
	movl	$1, %edx
	xorl	%r8d, %r8d
.L3:
	leal	1(%rdx), %ecx
	cmpl	$4, %edx
	je	.L12
	.p2align 4,,10
	.p2align 3
.L29:
	movslq	%edx, %rsi
	movslq	%edi, %rax
	movq	16(%rsp,%rax,8), %rax
	imulq	16(%rsp,%rsi,8), %rax
	movslq	%ecx, %rsi
	movq	16(%rsp,%rsi,8), %rbx
	leal	2(%rdx), %esi
	imulq	%rax, %rbx
	addq	%rbx, %r8
	cmpl	$3, %edx
	je	.L13
	movslq	%esi, %rdx
	movq	16(%rsp,%rdx,8), %rbx
	imulq	%rax, %rbx
	addq	%rbx, %r8
	cmpl	$3, %esi
	jne	.L13
	imulq	48(%rsp), %rax
	addq	%rax, %r8
.L13:
	movl	%ecx, %edx
	leal	1(%rdx), %ecx
	cmpl	$4, %edx
	jne	.L29
.L12:
	leal	1(%r9), %edx
	cmpl	$4, %r9d
	je	.L30
	movl	%r9d, %edi
	movl	%edx, %r9d
	jmp	.L3
.L5:
	addq	$1, 32(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L8:
	addq	$1, 48(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L9:
	addq	$1, 40(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L10:
	addq	$1, 24(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L30:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$88, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L31:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	%xmm0, %xmm0
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.L6(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$88, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	movaps	%xmm0, 16(%rsp)
	leaq	61(%rsp), %r13
	movq	$0, 48(%rsp)
	movaps	%xmm0, 32(%rsp)
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	61(%rsp), %eax
	subl	$65, %eax
	cmpb	$17, %al
	ja	.L4
	movzbl	%al, %eax
	movslq	0(%rbp,%rax,4), %rax
	addq	%rbp, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L6:
	.long	.L10-.L6
	.long	.L4-.L6
	.long	.L9-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L8-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L7-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L5-.L6
	.section	.text.startup
.L7:
	addq	$1, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
.L11:
	xorl	%edi, %edi
	movl	$1, %r9d
	movl	$1, %edx
	xorl	%r8d, %r8d
.L3:
	leal	1(%rdx), %ecx
	cmpl	$4, %edx
	je	.L12
	.p2align 4,,10
	.p2align 3
.L29:
	movslq	%edx, %rsi
	movslq	%edi, %rax
	movq	16(%rsp,%rax,8), %rax
	imulq	16(%rsp,%rsi,8), %rax
	movslq	%ecx, %rsi
	movq	16(%rsp,%rsi,8), %rbx
	leal	2(%rdx), %esi
	imulq	%rax, %rbx
	addq	%rbx, %r8
	cmpl	$3, %edx
	je	.L13
	movslq	%esi, %rdx
	movq	16(%rsp,%rdx,8), %rbx
	imulq	%rax, %rbx
	addq	%rbx, %r8
	cmpl	$3, %esi
	jne	.L13
	imulq	48(%rsp), %rax
	addq	%rax, %r8
.L13:
	movl	%ecx, %edx
	leal	1(%rdx), %ecx
	cmpl	$4, %edx
	jne	.L29
.L12:
	leal	1(%r9), %edx
	cmpl	$4, %r9d
	je	.L30
	movl	%r9d, %edi
	movl	%edx, %r9d
	jmp	.L3
.L5:
	addq	$1, 32(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L8:
	addq	$1, 48(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L9:
	addq	$1, 40(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L10:
	addq	$1, 24(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L30:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$88, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L31:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```
rule
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	%xmm0, %xmm0
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.L6(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$88, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	movaps	%xmm0, 16(%rsp)
	leaq	61(%rsp), %r13
	movq	$0, 48(%rsp)
	movaps	%xmm0, 32(%rsp)
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	61(%rsp), %eax
	subl	$65, %eax
	cmpb	$17, %al
	ja	.L4
	movzbl	%al, %eax
	movslq	0(%rbp,%rax,4), %rax
	addq	%rbp, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L6:
	.long	.L10-.L6
	.long	.L4-.L6
	.long	.L9-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L8-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L7-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L5-.L6
	.section	.text.startup
.L7:
	addq	$1, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
.L11:
	xorl	%edi, %edi
	movl	$1, %r9d
	movl	$1, %edx
	xorl	%r8d, %r8d
.L3:
	leal	1(%rdx), %ecx
	cmpl	$4, %edx
	je	.L12
	.p2align 4,,10
	.p2align 3
.L29:
	movslq	%edx, %rsi
	movslq	%edi, %rax
	movq	16(%rsp,%rax,8), %rax
	imulq	16(%rsp,%rsi,8), %rax
	movslq	%ecx, %rsi
	movq	16(%rsp,%rsi,8), %rbx
	leal	2(%rdx), %esi
	imulq	%rax, %rbx
	addq	%rbx, %r8
	cmpl	$3, %edx
	je	.L13
	movslq	%esi, %rdx
	movq	16(%rsp,%rdx,8), %rbx
	imulq	%rax, %rbx
	addq	%rbx, %r8
	cmpl	$3, %esi
	jne	.L13
	imulq	48(%rsp), %rax
	addq	%rax, %r8
.L13:
	movl	%ecx, %edx
	leal	1(%rdx), %ecx
	cmpl	$4, %edx
	jne	.L29
.L12:
	leal	1(%r9), %edx
	cmpl	$4, %r9d
	je	.L30
	movl	%r9d, %edi
	movl	%edx, %r9d
	jmp	.L3
.L5:
	addq	$1, 32(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L8:
	addq	$1, 48(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L9:
	addq	$1, 40(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L10:
	addq	$1, 24(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L30:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$88, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L31:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```
```c
#include <stdio.h>

int main () {
	int N;
	long long num[] = {0,0,0,0,0};
	char name[11];
	scanf ("%d", &N);
	for (int i=0; i<N; i++) {
		scanf ("%s", name);
		switch (name[0]) {
			case 'M':
				num[0] ++;
				break;
			case 'A':
				num[1] ++;
				break;
			case 'R':
				num[2] ++;
				break;
			case 'C':
				num[3] ++;
				break;
			case 'H':
				num[4] ++;
				break;
		}
	}
	long long sum = 0;
	for (int i=0; i<5; i++)
		for (int j=i+1; j<5; j++)
			for (int k=j+1; k<5; k++)
				sum += num[i] * num[j] * num[k];
	printf ("%lld\n", sum);
	return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int main () {
	int N;
	long long num[] = {0,0,0,0,0};
	char name[11];
	scanf ("%d", &N);
	for (int i=0; i<N; i++) {
		scanf ("%s", name);
		switch (name[0]) {
			case 'M':
				num[0] ++;
				break;
			case 'A':
				num[1] ++;
				break;
			case 'R':
				num[2] ++;
				break;
			case 'C':
				num[3] ++;
				break;
			case 'H':
				num[4] ++;
				break;
		}
	}
	long long sum = 0;
	for (int i=0; i<5; i++)
		for (int j=i+1; j<5; j++)
			for (int k=j+1; k<5; k++)
				sum += num[i] * num[j] * num[k];
	printf ("%lld\n", sum);
	return 0;
}
```

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.
Optimized Assembly Code:

5
MASHIKE
RUMOI
OBIRA
OROBAH
HOROKANAI
 5
CHOKUD@I
RNG
MAKOTO
AOKI
RINGO
 4
ZY
ZZZ
Z
ZZZZZZZZZZ
 5
DHOKUD@I
RNG
MAKOTO
AOKI
RINGN
 5
I@DUKOGE
HNR
MTAOKP
AINK
RINGN
 5
MASHIKE
IOMUR
OBIRA
OROBAH
HOROKANAI
 5
CHOKUD@I
RNG
MAKOTO
AOKI
RINGN
 4
ZY
ZZY
Z
ZZZZZZZZZZ
 5
MASHIKE
IOMUR
ARIBO
OROBAH
HOROKANAI
 4
ZY
YZZ
Z
ZZZZZZZZZZ

1
 7
 0
 2
 4
 0
 7
 0
 1
 0

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

```c
#include <stdio.h>

int main () {
	int N;
	long long num[] = {0,0,0,0,0};
	char name[11];
	scanf ("%d", &N);
	for (int i=0; i<N; i++) {
		scanf ("%s", name);
		switch (name[0]) {
			case 'M':
				num[0] ++;
				break;
			case 'A':
				num[1] ++;
				break;
			case 'R':
				num[2] ++;
				break;
			case 'C':
				num[3] ++;
				break;
			case 'H':
				num[4] ++;
				break;
		}
	}
	long long sum = 0;
	for (int i=0; i<5; i++)
		for (int j=i+1; j<5; j++)
			for (int k=j+1; k<5; k++)
				sum += num[i] * num[j] * num[k];
	printf ("%lld\n", sum);
	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	%xmm0, %xmm0
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.L6(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$88, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	movaps	%xmm0, 16(%rsp)
	leaq	61(%rsp), %r13
	movq	$0, 48(%rsp)
	movaps	%xmm0, 32(%rsp)
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	61(%rsp), %eax
	subl	$65, %eax
	cmpb	$17, %al
	ja	.L4
	movzbl	%al, %eax
	movslq	0(%rbp,%rax,4), %rax
	addq	%rbp, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L6:
	.long	.L10-.L6
	.long	.L4-.L6
	.long	.L9-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L8-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L7-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L5-.L6
	.section	.text.startup
.L7:
	addq	$1, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
.L11:
	xorl	%edi, %edi
	movl	$1, %r9d
	movl	$1, %edx
	xorl	%r8d, %r8d
.L3:
	leal	1(%rdx), %ecx
	cmpl	$4, %edx
	je	.L12
	.p2align 4,,10
	.p2align 3
.L29:
	movslq	%edx, %rsi
	movslq	%edi, %rax
	movq	16(%rsp,%rax,8), %rax
	imulq	16(%rsp,%rsi,8), %rax
	movslq	%ecx, %rsi
	movq	16(%rsp,%rsi,8), %rbx
	leal	2(%rdx), %esi
	imulq	%rax, %rbx
	addq	%rbx, %r8
	cmpl	$3, %edx
	je	.L13
	movslq	%esi, %rdx
	movq	16(%rsp,%rdx,8), %rbx
	imulq	%rax, %rbx
	addq	%rbx, %r8
	cmpl	$3, %esi
	jne	.L13
	imulq	48(%rsp), %rax
	addq	%rax, %r8
.L13:
	movl	%ecx, %edx
	leal	1(%rdx), %ecx
	cmpl	$4, %edx
	jne	.L29
.L12:
	leal	1(%r9), %edx
	cmpl	$4, %r9d
	je	.L30
	movl	%r9d, %edi
	movl	%edx, %r9d
	jmp	.L3
.L5:
	addq	$1, 32(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L8:
	addq	$1, 48(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L9:
	addq	$1, 40(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L10:
	addq	$1, 24(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L30:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$88, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L31:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	%xmm0, %xmm0
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.L6(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$88, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	movaps	%xmm0, 16(%rsp)
	leaq	61(%rsp), %r13
	movq	$0, 48(%rsp)
	movaps	%xmm0, 32(%rsp)
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	61(%rsp), %eax
	subl	$65, %eax
	cmpb	$17, %al
	ja	.L4
	movzbl	%al, %eax
	movslq	0(%rbp,%rax,4), %rax
	addq	%rbp, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L6:
	.long	.L10-.L6
	.long	.L4-.L6
	.long	.L9-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L8-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L7-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L4-.L6
	.long	.L5-.L6
	.section	.text.startup
.L7:
	addq	$1, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
.L11:
	xorl	%edi, %edi
	movl	$1, %r9d
	movl	$1, %edx
	xorl	%r8d, %r8d
.L3:
	leal	1(%rdx), %ecx
	cmpl	$4, %edx
	je	.L12
	.p2align 4,,10
	.p2align 3
.L29:
	movslq	%edx, %rsi
	movslq	%edi, %rax
	movq	16(%rsp,%rax,8), %rax
	imulq	16(%rsp,%rsi,8), %rax
	movslq	%ecx, %rsi
	movq	16(%rsp,%rsi,8), %rbx
	leal	2(%rdx), %esi
	imulq	%rax, %rbx
	addq	%rbx, %r8
	cmpl	$3, %edx
	je	.L13
	movslq	%esi, %rdx
	movq	16(%rsp,%rdx,8), %rbx
	imulq	%rax, %rbx
	addq	%rbx, %r8
	cmpl	$3, %esi
	jne	.L13
	imulq	48(%rsp), %rax
	addq	%rax, %r8
.L13:
	movl	%ecx, %edx
	leal	1(%rdx), %ecx
	cmpl	$4, %edx
	jne	.L29
.L12:
	leal	1(%r9), %edx
	cmpl	$4, %r9d
	je	.L30
	movl	%r9d, %edi
	movl	%edx, %r9d
	jmp	.L3
.L5:
	addq	$1, 32(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L8:
	addq	$1, 48(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L9:
	addq	$1, 40(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L10:
	addq	$1, 24(%rsp)
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L2
	jmp	.L11
.L30:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$88, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L31:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```