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>
#include<string.h>
#include<math.h>

int main(void) {
	char people[300000];
	int n, dir[300001][2] = { 0 },min = 3000000;
	scanf("%d", &n);
	scanf("%s", people);
	for (int i = 0; i < n; i++) {
		if (people[i] == 'E')dir[i + 1][0] = dir[i][0] + 1, dir[i + 1][1] = dir[i][1];
		else dir[i + 1][1] = dir[i][1] + 1, dir[i + 1][0] = dir[i][0];
	}

	for (int i = 1; i <= n; i++) {
		if ((dir[i - 1][1] - dir[0][1]) + (dir[n][0] - dir[i][0]) < min)
			min = (dir[i - 1][1] - dir[0][1]) + (dir[n][0] - dir[i][0]);
	}
	printf("%d\n", min);

}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.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	-2699264(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$784, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2700032(%rbp), %rax
	movl	$2400008, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$3000000, -2700044(%rbp)
	leaq	-2700048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-300016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -2700040(%rbp)
	jmp	.L2
.L5:
	movl	-2700040(%rbp), %eax
	cltq
	movzbl	-300016(%rbp,%rax), %eax
	cmpb	$69, %al
	jne	.L3
	movl	-2700040(%rbp), %eax
	cltq
	movl	-2700032(%rbp,%rax,8), %eax
	movl	-2700040(%rbp), %edx
	leal	1(%rdx), %ecx
	leal	1(%rax), %edx
	movslq	%ecx, %rax
	movl	%edx, -2700032(%rbp,%rax,8)
	movl	-2700040(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-2700040(%rbp), %eax
	cltq
	movl	-2700028(%rbp,%rax,8), %edx
	movslq	%ecx, %rax
	movl	%edx, -2700028(%rbp,%rax,8)
	jmp	.L4
.L3:
	movl	-2700040(%rbp), %eax
	cltq
	movl	-2700028(%rbp,%rax,8), %eax
	movl	-2700040(%rbp), %edx
	leal	1(%rdx), %ecx
	leal	1(%rax), %edx
	movslq	%ecx, %rax
	movl	%edx, -2700028(%rbp,%rax,8)
	movl	-2700040(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-2700040(%rbp), %eax
	cltq
	movl	-2700032(%rbp,%rax,8), %edx
	movslq	%ecx, %rax
	movl	%edx, -2700032(%rbp,%rax,8)
.L4:
	addl	$1, -2700040(%rbp)
.L2:
	movl	-2700048(%rbp), %eax
	cmpl	%eax, -2700040(%rbp)
	jl	.L5
	movl	$1, -2700036(%rbp)
	jmp	.L6
.L8:
	movl	-2700036(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-2700028(%rbp,%rax,8), %eax
	movl	-2700028(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-2700048(%rbp), %eax
	cltq
	movl	-2700032(%rbp,%rax,8), %edx
	movl	-2700036(%rbp), %eax
	cltq
	movl	-2700032(%rbp,%rax,8), %eax
	subl	%eax, %edx
	leal	(%rcx,%rdx), %eax
	cmpl	%eax, -2700044(%rbp)
	jle	.L7
	movl	-2700036(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-2700028(%rbp,%rax,8), %eax
	movl	-2700028(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-2700048(%rbp), %eax
	cltq
	movl	-2700032(%rbp,%rax,8), %edx
	movl	-2700036(%rbp), %eax
	cltq
	movl	-2700032(%rbp,%rax,8), %eax
	subl	%eax, %edx
	leal	(%rcx,%rdx), %eax
	movl	%eax, -2700044(%rbp)
.L7:
	addl	$1, -2700036(%rbp)
.L6:
	movl	-2700048(%rbp), %eax
	cmpl	%eax, -2700036(%rbp)
	jle	.L8
	movl	-2700044(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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
.LC1:
	.string	"%d"
.LC2:
	.string	"%s"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	-2699264(%rsp), %r11
	.cfi_def_cfa 11, 2699288
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$792, %rsp
	.cfi_def_cfa_offset 2700080
	movl	$2400008, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 2700040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	leaq	2400032(%rsp), %rbx
	movq	%rbp, %rdi
	call	memset@PLT
	leaq	12(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L9
	leal	-1(%r9), %eax
	movq	%rbx, %rsi
	movq	%rbp, %rdx
	movq	%rax, %r11
	leaq	24(%rsp,%rax,8), %r10
	.p2align 4,,10
	.p2align 3
.L3:
	movl	(%rdx), %eax
	movzbl	(%rsi), %edi
	movl	4(%rdx), %ecx
	cmpb	$69, %dil
	leal	1(%rax), %r8d
	cmovne	%eax, %r8d
	leal	1(%rcx), %eax
	cmovne	%eax, %ecx
	addq	$8, %rdx
	addq	$1, %rsi
	movd	%r8d, %xmm0
	movd	%ecx, %xmm5
	punpckldq	%xmm5, %xmm0
	movq	%xmm0, (%rdx)
	cmpq	%rdx, %r10
	jne	.L3
	movslq	%r9d, %rax
	movl	16(%rsp,%rax,8), %ecx
	cmpl	$2, %r11d
	jbe	.L10
	movl	%r9d, %edx
	movd	%ecx, %xmm4
	leaq	20(%rsp), %rax
	movdqa	.LC0(%rip), %xmm0
	shrl	$2, %edx
	pshufd	$0, %xmm4, %xmm4
	subl	$1, %edx
	salq	$5, %rdx
	leaq	36(%rbp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	movdqu	(%rax), %xmm1
	movdqu	16(%rax), %xmm6
	movdqa	%xmm4, %xmm2
	addq	$32, %rax
	movdqa	%xmm1, %xmm3
	shufps	$136, %xmm6, %xmm1
	shufps	$221, %xmm6, %xmm3
	psubd	%xmm3, %xmm2
	paddd	%xmm1, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm1, %xmm0
	cmpq	%rdx, %rax
	jne	.L5
	movdqa	%xmm0, %xmm2
	movl	%r9d, %esi
	psrldq	$8, %xmm2
	andl	$-4, %esi
	movdqa	%xmm2, %xmm1
	leal	1(%rsi), %eax
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movd	%xmm1, %edx
	cmpl	%esi, %r9d
	je	.L2
.L4:
	leal	-1(%rax), %edi
	movslq	%eax, %r8
	movl	%ecx, %esi
	movslq	%edi, %rdi
	subl	16(%rsp,%r8,8), %esi
	addl	20(%rsp,%rdi,8), %esi
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	leal	1(%rax), %esi
	cmpl	%esi, %r9d
	jl	.L2
	movslq	%esi, %rsi
	movl	%ecx, %edi
	subl	16(%rsp,%rsi,8), %edi
	addl	20(%rsp,%r8,8), %edi
	cmpl	%edi, %edx
	cmovg	%edi, %edx
	addl	$2, %eax
	cmpl	%eax, %r9d
	jl	.L2
	cltq
	subl	16(%rsp,%rax,8), %ecx
	movl	20(%rsp,%rsi,8), %eax
	addl	%ecx, %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
.L2:
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	2700040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$2700056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	movl	$3000000, %edx
	jmp	.L2
.L10:
	movl	$1, %eax
	movl	$3000000, %edx
	jmp	.L4
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	3000000
	.long	3000000
	.long	3000000
	.long	3000000
	.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
.LC1:
	.string	"%d"
.LC2:
	.string	"%s"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	-2699264(%rsp), %r11
	.cfi_def_cfa 11, 2699288
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$792, %rsp
	.cfi_def_cfa_offset 2700080
	movl	$2400008, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 2700040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	leaq	2400032(%rsp), %rbx
	movq	%rbp, %rdi
	call	memset@PLT
	leaq	12(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L9
	leal	-1(%r9), %eax
	movq	%rbx, %rsi
	movq	%rbp, %rdx
	movq	%rax, %r11
	leaq	24(%rsp,%rax,8), %r10
	.p2align 4,,10
	.p2align 3
.L3:
	movl	(%rdx), %eax
	movzbl	(%rsi), %edi
	movl	4(%rdx), %ecx
	cmpb	$69, %dil
	leal	1(%rax), %r8d
	cmovne	%eax, %r8d
	leal	1(%rcx), %eax
	cmovne	%eax, %ecx
	addq	$8, %rdx
	addq	$1, %rsi
	movd	%r8d, %xmm0
	movd	%ecx, %xmm5
	punpckldq	%xmm5, %xmm0
	movq	%xmm0, (%rdx)
	cmpq	%rdx, %r10
	jne	.L3
	movslq	%r9d, %rax
	movl	16(%rsp,%rax,8), %ecx
	cmpl	$2, %r11d
	jbe	.L10
	movl	%r9d, %edx
	movd	%ecx, %xmm4
	leaq	20(%rsp), %rax
	movdqa	.LC0(%rip), %xmm0
	shrl	$2, %edx
	pshufd	$0, %xmm4, %xmm4
	subl	$1, %edx
	salq	$5, %rdx
	leaq	36(%rbp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	movdqu	(%rax), %xmm1
	movdqu	16(%rax), %xmm6
	movdqa	%xmm4, %xmm2
	addq	$32, %rax
	movdqa	%xmm1, %xmm3
	shufps	$136, %xmm6, %xmm1
	shufps	$221, %xmm6, %xmm3
	psubd	%xmm3, %xmm2
	paddd	%xmm1, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm1, %xmm0
	cmpq	%rdx, %rax
	jne	.L5
	movdqa	%xmm0, %xmm2
	movl	%r9d, %esi
	psrldq	$8, %xmm2
	andl	$-4, %esi
	movdqa	%xmm2, %xmm1
	leal	1(%rsi), %eax
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movd	%xmm1, %edx
	cmpl	%esi, %r9d
	je	.L2
.L4:
	leal	-1(%rax), %edi
	movslq	%eax, %r8
	movl	%ecx, %esi
	movslq	%edi, %rdi
	subl	16(%rsp,%r8,8), %esi
	addl	20(%rsp,%rdi,8), %esi
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	leal	1(%rax), %esi
	cmpl	%esi, %r9d
	jl	.L2
	movslq	%esi, %rsi
	movl	%ecx, %edi
	subl	16(%rsp,%rsi,8), %edi
	addl	20(%rsp,%r8,8), %edi
	cmpl	%edi, %edx
	cmovg	%edi, %edx
	addl	$2, %eax
	cmpl	%eax, %r9d
	jl	.L2
	cltq
	subl	16(%rsp,%rax,8), %ecx
	movl	20(%rsp,%rsi,8), %eax
	addl	%ecx, %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
.L2:
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	2700040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$2700056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	movl	$3000000, %edx
	jmp	.L2
.L10:
	movl	$1, %eax
	movl	$3000000, %edx
	jmp	.L4
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	3000000
	.long	3000000
	.long	3000000
	.long	3000000
	.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>
#include<string.h>
#include<math.h>

int main(void) {
	char people[300000];
	int n, dir[300001][2] = { 0 },min = 3000000;
	scanf("%d", &n);
	scanf("%s", people);
	for (int i = 0; i < n; i++) {
		if (people[i] == 'E')dir[i + 1][0] = dir[i][0] + 1, dir[i + 1][1] = dir[i][1];
		else dir[i + 1][1] = dir[i][1] + 1, dir[i + 1][0] = dir[i][0];
	}

	for (int i = 1; i <= n; i++) {
		if ((dir[i - 1][1] - dir[0][1]) + (dir[n][0] - dir[i][0]) < min)
			min = (dir[i - 1][1] - dir[0][1]) + (dir[n][0] - dir[i][0]);
	}
	printf("%d\n", min);

}
5
WEEWW

1

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>
#include<string.h>
#include<math.h>

int main(void) {
	char people[300000];
	int n, dir[300001][2] = { 0 },min = 3000000;
	scanf("%d", &n);
	scanf("%s", people);
	for (int i = 0; i < n; i++) {
		if (people[i] == 'E')dir[i + 1][0] = dir[i][0] + 1, dir[i + 1][1] = dir[i][1];
		else dir[i + 1][1] = dir[i][1] + 1, dir[i + 1][0] = dir[i][0];
	}

	for (int i = 1; i <= n; i++) {
		if ((dir[i - 1][1] - dir[0][1]) + (dir[n][0] - dir[i][0]) < min)
			min = (dir[i - 1][1] - dir[0][1]) + (dir[n][0] - dir[i][0]);
	}
	printf("%d\n", min);

}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.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	-2699264(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$784, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2700032(%rbp), %rax
	movl	$2400008, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$3000000, -2700044(%rbp)
	leaq	-2700048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-300016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -2700040(%rbp)
	jmp	.L2
.L5:
	movl	-2700040(%rbp), %eax
	cltq
	movzbl	-300016(%rbp,%rax), %eax
	cmpb	$69, %al
	jne	.L3
	movl	-2700040(%rbp), %eax
	cltq
	movl	-2700032(%rbp,%rax,8), %eax
	movl	-2700040(%rbp), %edx
	leal	1(%rdx), %ecx
	leal	1(%rax), %edx
	movslq	%ecx, %rax
	movl	%edx, -2700032(%rbp,%rax,8)
	movl	-2700040(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-2700040(%rbp), %eax
	cltq
	movl	-2700028(%rbp,%rax,8), %edx
	movslq	%ecx, %rax
	movl	%edx, -2700028(%rbp,%rax,8)
	jmp	.L4
.L3:
	movl	-2700040(%rbp), %eax
	cltq
	movl	-2700028(%rbp,%rax,8), %eax
	movl	-2700040(%rbp), %edx
	leal	1(%rdx), %ecx
	leal	1(%rax), %edx
	movslq	%ecx, %rax
	movl	%edx, -2700028(%rbp,%rax,8)
	movl	-2700040(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-2700040(%rbp), %eax
	cltq
	movl	-2700032(%rbp,%rax,8), %edx
	movslq	%ecx, %rax
	movl	%edx, -2700032(%rbp,%rax,8)
.L4:
	addl	$1, -2700040(%rbp)
.L2:
	movl	-2700048(%rbp), %eax
	cmpl	%eax, -2700040(%rbp)
	jl	.L5
	movl	$1, -2700036(%rbp)
	jmp	.L6
.L8:
	movl	-2700036(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-2700028(%rbp,%rax,8), %eax
	movl	-2700028(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-2700048(%rbp), %eax
	cltq
	movl	-2700032(%rbp,%rax,8), %edx
	movl	-2700036(%rbp), %eax
	cltq
	movl	-2700032(%rbp,%rax,8), %eax
	subl	%eax, %edx
	leal	(%rcx,%rdx), %eax
	cmpl	%eax, -2700044(%rbp)
	jle	.L7
	movl	-2700036(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-2700028(%rbp,%rax,8), %eax
	movl	-2700028(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-2700048(%rbp), %eax
	cltq
	movl	-2700032(%rbp,%rax,8), %edx
	movl	-2700036(%rbp), %eax
	cltq
	movl	-2700032(%rbp,%rax,8), %eax
	subl	%eax, %edx
	leal	(%rcx,%rdx), %eax
	movl	%eax, -2700044(%rbp)
.L7:
	addl	$1, -2700036(%rbp)
.L6:
	movl	-2700048(%rbp), %eax
	cmpl	%eax, -2700036(%rbp)
	jle	.L8
	movl	-2700044(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.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	-2699264(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$784, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2700032(%rbp), %rax
	movl	$2400008, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$3000000, -2700044(%rbp)
	leaq	-2700048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-300016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -2700040(%rbp)
	jmp	.L2
.L5:
	movl	-2700040(%rbp), %eax
	cltq
	movzbl	-300016(%rbp,%rax), %eax
	cmpb	$69, %al
	jne	.L3
	movl	-2700040(%rbp), %eax
	cltq
	movl	-2700032(%rbp,%rax,8), %eax
	movl	-2700040(%rbp), %edx
	leal	1(%rdx), %ecx
	leal	1(%rax), %edx
	movslq	%ecx, %rax
	movl	%edx, -2700032(%rbp,%rax,8)
	movl	-2700040(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-2700040(%rbp), %eax
	cltq
	movl	-2700028(%rbp,%rax,8), %edx
	movslq	%ecx, %rax
	movl	%edx, -2700028(%rbp,%rax,8)
	jmp	.L4
.L3:
	movl	-2700040(%rbp), %eax
	cltq
	movl	-2700028(%rbp,%rax,8), %eax
	movl	-2700040(%rbp), %edx
	leal	1(%rdx), %ecx
	leal	1(%rax), %edx
	movslq	%ecx, %rax
	movl	%edx, -2700028(%rbp,%rax,8)
	movl	-2700040(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-2700040(%rbp), %eax
	cltq
	movl	-2700032(%rbp,%rax,8), %edx
	movslq	%ecx, %rax
	movl	%edx, -2700032(%rbp,%rax,8)
.L4:
	addl	$1, -2700040(%rbp)
.L2:
	movl	-2700048(%rbp), %eax
	cmpl	%eax, -2700040(%rbp)
	jl	.L5
	movl	$1, -2700036(%rbp)
	jmp	.L6
.L8:
	movl	-2700036(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-2700028(%rbp,%rax,8), %eax
	movl	-2700028(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-2700048(%rbp), %eax
	cltq
	movl	-2700032(%rbp,%rax,8), %edx
	movl	-2700036(%rbp), %eax
	cltq
	movl	-2700032(%rbp,%rax,8), %eax
	subl	%eax, %edx
	leal	(%rcx,%rdx), %eax
	cmpl	%eax, -2700044(%rbp)
	jle	.L7
	movl	-2700036(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-2700028(%rbp,%rax,8), %eax
	movl	-2700028(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-2700048(%rbp), %eax
	cltq
	movl	-2700032(%rbp,%rax,8), %edx
	movl	-2700036(%rbp), %eax
	cltq
	movl	-2700032(%rbp,%rax,8), %eax
	subl	%eax, %edx
	leal	(%rcx,%rdx), %eax
	movl	%eax, -2700044(%rbp)
.L7:
	addl	$1, -2700036(%rbp)
.L6:
	movl	-2700048(%rbp), %eax
	cmpl	%eax, -2700036(%rbp)
	jle	.L8
	movl	-2700044(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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:
