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>

#define N (8000)
#define CtoI(c) (N + c)

void calc(int* array, int count) {
    int index;
    for (index = 0; index < 2 * N + 1; index++) {
        if (array[index] % 2 == 1) {
            array[index - count] += 2;
            array[index + count] += 2;
        }
    }
    for (index = 0; index < 2 * N + 1; index++) {
        if (array[index] > 1) {
            array[index] = 1;
        } else {
            array[index] = 0;
        }
    }
}
int main()
{
    char s[N + 1];
    scanf("%s", s);
    int x, y;
    scanf("%d %d", &x, &y);

    int x_set[2*N+1];
    int y_set[2*N+1];
    int tmp;
    for (tmp = 0; tmp < 2*N+1; tmp++) {
        x_set[tmp] = y_set[tmp] = 0;
    }
    x_set[CtoI(0)] = 1;
    y_set[CtoI(0)] = 1;

    int current, t_count, f_count;
    for (current = t_count = f_count = 0; 1 == 1; current++) {
        if (s[current] == 'F') {
            f_count++;
            continue;
        }
        if (f_count > 0) {
            if (t_count == 0) {
                x_set[CtoI(0)] = 0;
                x_set[CtoI(f_count)] = 1;
            } else {
                if (t_count % 2 == 0) {
                    calc(x_set, f_count);
                } else {
                    calc(y_set, f_count);
                }
            }
            f_count = 0;
        }
        if (s[current] == 'T') {
            t_count++;
        }
        if (s[current] == '\0') {
            break;
        }
    }
    if (x_set[CtoI(x)] == 1 && y_set[CtoI(y)] == 1) {
        printf("Yes\n");
    } else {
        printf("No\n");
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	calc
	.type	calc, @function
calc:
.LFB0:
	.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)
	movl	$0, -4(%rbp)
	jmp	.L2
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L3
	movl	-4(%rbp), %eax
	subl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-4(%rbp), %eax
	subl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	addl	$2, %edx
	movl	%edx, (%rax)
	movl	-4(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-4(%rbp), %ecx
	movl	-28(%rbp), %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	addl	$2, %edx
	movl	%edx, (%rax)
.L3:
	addl	$1, -4(%rbp)
.L2:
	cmpl	$16000, -4(%rbp)
	jle	.L4
	movl	$0, -4(%rbp)
	jmp	.L5
.L8:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$1, %eax
	jle	.L6
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	$1, (%rax)
	jmp	.L7
.L6:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
.L7:
	addl	$1, -4(%rbp)
.L5:
	cmpl	$16000, -4(%rbp)
	jle	.L8
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	calc, .-calc
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"Yes"
.LC3:
	.string	"No"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-135168(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$912, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-8016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-136068(%rbp), %rdx
	leaq	-136072(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -136064(%rbp)
	jmp	.L10
.L11:
	movl	-136064(%rbp), %eax
	cltq
	movl	$0, -72032(%rbp,%rax,4)
	movl	-136064(%rbp), %eax
	cltq
	movl	-72032(%rbp,%rax,4), %edx
	movl	-136064(%rbp), %eax
	cltq
	movl	%edx, -136048(%rbp,%rax,4)
	addl	$1, -136064(%rbp)
.L10:
	cmpl	$16000, -136064(%rbp)
	jle	.L11
	movl	$1, -104048(%rbp)
	movl	$1, -40032(%rbp)
	movl	$0, -136052(%rbp)
	movl	-136052(%rbp), %eax
	movl	%eax, -136056(%rbp)
	movl	-136056(%rbp), %eax
	movl	%eax, -136060(%rbp)
.L20:
	movl	-136060(%rbp), %eax
	cltq
	movzbl	-8016(%rbp,%rax), %eax
	cmpb	$70, %al
	jne	.L12
	addl	$1, -136052(%rbp)
	jmp	.L13
.L12:
	cmpl	$0, -136052(%rbp)
	jle	.L14
	cmpl	$0, -136056(%rbp)
	jne	.L15
	movl	$0, -104048(%rbp)
	movl	-136052(%rbp), %eax
	addl	$8000, %eax
	cltq
	movl	$1, -136048(%rbp,%rax,4)
	jmp	.L16
.L15:
	movl	-136056(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L17
	movl	-136052(%rbp), %edx
	leaq	-136048(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	calc
	jmp	.L16
.L17:
	movl	-136052(%rbp), %edx
	leaq	-72032(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	calc
.L16:
	movl	$0, -136052(%rbp)
.L14:
	movl	-136060(%rbp), %eax
	cltq
	movzbl	-8016(%rbp,%rax), %eax
	cmpb	$84, %al
	jne	.L18
	addl	$1, -136056(%rbp)
.L18:
	movl	-136060(%rbp), %eax
	cltq
	movzbl	-8016(%rbp,%rax), %eax
	testb	%al, %al
	je	.L26
.L13:
	addl	$1, -136060(%rbp)
	jmp	.L20
.L26:
	nop
	movl	-136072(%rbp), %eax
	addl	$8000, %eax
	cltq
	movl	-136048(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L21
	movl	-136068(%rbp), %eax
	addl	$8000, %eax
	cltq
	movl	-72032(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L21
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L22
.L21:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L22:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	calc
	.type	calc, @function
calc:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	movl	$1, %edx
	leal	-1(%rsi), %r8d
	.p2align 4,,10
	.p2align 3
.L3:
	movl	-4(%rcx,%rdx,4), %eax
	movl	%eax, %edi
	shrl	$31, %edi
	addl	%edi, %eax
	andl	$1, %eax
	subl	%edi, %eax
	cmpl	$1, %eax
	jne	.L2
	movl	%edx, %eax
	subl	%esi, %eax
	subl	$1, %eax
	cltq
	addl	$2, (%rcx,%rax,4)
	leal	(%r8,%rdx), %eax
	cltq
	addl	$2, (%rcx,%rax,4)
.L2:
	addq	$1, %rdx
	cmpq	$16002, %rdx
	jne	.L3
	movdqa	.LC0(%rip), %xmm1
	movq	%rcx, %rax
	leaq	64000(%rcx), %rdx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm1, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L4
	xorl	%eax, %eax
	cmpl	$1, 64000(%rcx)
	setg	%al
	movl	%eax, 64000(%rcx)
	ret
	.cfi_endproc
.LFE23:
	.size	calc, .-calc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%s"
.LC2:
	.string	"%d %d"
.LC3:
	.string	"Yes"
.LC4:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-135168(%rsp), %r11
	.cfi_def_cfa 11, 135200
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$896, %rsp
	.cfi_def_cfa_offset 136096
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 136056(%rsp)
	xorl	%eax, %eax
	leaq	128048(%rsp), %r12
	leaq	16(%rsp), %rbx
	movq	%r12, %rsi
	leaq	64032(%rsp), %rbp
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	xorl	%esi, %esi
	movl	$64004, %edx
	movq	%rbp, %rdi
	call	memset@PLT
	xorl	%esi, %esi
	movl	$64004, %edx
	movq	%rbx, %rdi
	call	memset@PLT
	xorl	%r10d, %r10d
	xorl	%esi, %esi
	xorl	%r11d, %r11d
	movl	$1, 32016(%rsp)
	movslq	%r10d, %r9
	cmpb	$70, 128048(%rsp,%r9)
	movl	$1, 96032(%rsp)
	je	.L28
.L9:
	testl	%esi, %esi
	je	.L11
	testl	%r11d, %r11d
	jne	.L12
	addl	$8000, %esi
	movl	$0, 32016(%rsp)
	movslq	%esi, %rsi
	movl	$1, 16(%rsp,%rsi,4)
.L11:
	leaq	(%r12,%r9), %rax
	leal	1(%r10), %edx
	movzbl	(%rax), %ecx
	cmpb	$84, %cl
	je	.L29
.L15:
	testb	%cl, %cl
	je	.L18
	movslq	%edx, %rcx
	cmpb	$70, 128048(%rsp,%rcx)
	movq	%rcx, %r10
	je	.L23
.L17:
	movzbl	1(%rax), %ecx
	addq	$1, %rax
	addl	$1, %edx
	cmpb	$84, %cl
	jne	.L15
.L29:
	movslq	%edx, %rcx
	addl	$1, %r11d
	cmpb	$70, 128048(%rsp,%rcx)
	movq	%rcx, %r10
	jne	.L17
.L23:
	movl	$1, %esi
.L16:
	addl	$1, %r10d
	movslq	%r10d, %r9
	cmpb	$70, 128048(%rsp,%r9)
	jne	.L9
.L28:
	addl	$1, %esi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L12:
	testb	$1, %r11b
	jne	.L13
	movq	%rbx, %rdi
	call	calc
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rbp, %rdi
	call	calc
	jmp	.L11
.L18:
	movl	8(%rsp), %eax
	addl	$8000, %eax
	cltq
	cmpl	$1, 16(%rsp,%rax,4)
	jne	.L19
	movl	12(%rsp), %eax
	addl	$8000, %eax
	cltq
	cmpl	$1, 64032(%rsp,%rax,4)
	je	.L30
.L19:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
.L20:
	movq	136056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$136064, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L30:
	.cfi_restore_state
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L20
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	1
	.long	1
	.long	1
	.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	calc
	.type	calc, @function
calc:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	movl	$1, %edx
	leal	-1(%rsi), %r8d
	.p2align 4,,10
	.p2align 3
.L3:
	movl	-4(%rcx,%rdx,4), %eax
	movl	%eax, %edi
	shrl	$31, %edi
	addl	%edi, %eax
	andl	$1, %eax
	subl	%edi, %eax
	cmpl	$1, %eax
	jne	.L2
	movl	%edx, %eax
	subl	%esi, %eax
	subl	$1, %eax
	cltq
	addl	$2, (%rcx,%rax,4)
	leal	(%r8,%rdx), %eax
	cltq
	addl	$2, (%rcx,%rax,4)
.L2:
	addq	$1, %rdx
	cmpq	$16002, %rdx
	jne	.L3
	movdqa	.LC0(%rip), %xmm1
	movq	%rcx, %rax
	leaq	64000(%rcx), %rdx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm1, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L4
	xorl	%eax, %eax
	cmpl	$1, 64000(%rcx)
	setg	%al
	movl	%eax, 64000(%rcx)
	ret
	.cfi_endproc
.LFE23:
	.size	calc, .-calc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%s"
.LC2:
	.string	"%d %d"
.LC3:
	.string	"Yes"
.LC4:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-135168(%rsp), %r11
	.cfi_def_cfa 11, 135200
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$896, %rsp
	.cfi_def_cfa_offset 136096
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 136056(%rsp)
	xorl	%eax, %eax
	leaq	128048(%rsp), %r12
	leaq	16(%rsp), %rbx
	movq	%r12, %rsi
	leaq	64032(%rsp), %rbp
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	xorl	%esi, %esi
	movl	$64004, %edx
	movq	%rbp, %rdi
	call	memset@PLT
	xorl	%esi, %esi
	movl	$64004, %edx
	movq	%rbx, %rdi
	call	memset@PLT
	xorl	%r10d, %r10d
	xorl	%esi, %esi
	xorl	%r11d, %r11d
	movl	$1, 32016(%rsp)
	movslq	%r10d, %r9
	cmpb	$70, 128048(%rsp,%r9)
	movl	$1, 96032(%rsp)
	je	.L28
.L9:
	testl	%esi, %esi
	je	.L11
	testl	%r11d, %r11d
	jne	.L12
	addl	$8000, %esi
	movl	$0, 32016(%rsp)
	movslq	%esi, %rsi
	movl	$1, 16(%rsp,%rsi,4)
.L11:
	leaq	(%r12,%r9), %rax
	leal	1(%r10), %edx
	movzbl	(%rax), %ecx
	cmpb	$84, %cl
	je	.L29
.L15:
	testb	%cl, %cl
	je	.L18
	movslq	%edx, %rcx
	cmpb	$70, 128048(%rsp,%rcx)
	movq	%rcx, %r10
	je	.L23
.L17:
	movzbl	1(%rax), %ecx
	addq	$1, %rax
	addl	$1, %edx
	cmpb	$84, %cl
	jne	.L15
.L29:
	movslq	%edx, %rcx
	addl	$1, %r11d
	cmpb	$70, 128048(%rsp,%rcx)
	movq	%rcx, %r10
	jne	.L17
.L23:
	movl	$1, %esi
.L16:
	addl	$1, %r10d
	movslq	%r10d, %r9
	cmpb	$70, 128048(%rsp,%r9)
	jne	.L9
.L28:
	addl	$1, %esi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L12:
	testb	$1, %r11b
	jne	.L13
	movq	%rbx, %rdi
	call	calc
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rbp, %rdi
	call	calc
	jmp	.L11
.L18:
	movl	8(%rsp), %eax
	addl	$8000, %eax
	cltq
	cmpl	$1, 16(%rsp,%rax,4)
	jne	.L19
	movl	12(%rsp), %eax
	addl	$8000, %eax
	cltq
	cmpl	$1, 64032(%rsp,%rax,4)
	je	.L30
.L19:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
.L20:
	movq	136056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$136064, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L30:
	.cfi_restore_state
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L20
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	1
	.long	1
	.long	1
	.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>

#define N (8000)
#define CtoI(c) (N + c)

void calc(int* array, int count) {
    int index;
    for (index = 0; index < 2 * N + 1; index++) {
        if (array[index] % 2 == 1) {
            array[index - count] += 2;
            array[index + count] += 2;
        }
    }
    for (index = 0; index < 2 * N + 1; index++) {
        if (array[index] > 1) {
            array[index] = 1;
        } else {
            array[index] = 0;
        }
    }
}
int main()
{
    char s[N + 1];
    scanf("%s", s);
    int x, y;
    scanf("%d %d", &x, &y);

    int x_set[2*N+1];
    int y_set[2*N+1];
    int tmp;
    for (tmp = 0; tmp < 2*N+1; tmp++) {
        x_set[tmp] = y_set[tmp] = 0;
    }
    x_set[CtoI(0)] = 1;
    y_set[CtoI(0)] = 1;

    int current, t_count, f_count;
    for (current = t_count = f_count = 0; 1 == 1; current++) {
        if (s[current] == 'F') {
            f_count++;
            continue;
        }
        if (f_count > 0) {
            if (t_count == 0) {
                x_set[CtoI(0)] = 0;
                x_set[CtoI(f_count)] = 1;
            } else {
                if (t_count % 2 == 0) {
                    calc(x_set, f_count);
                } else {
                    calc(y_set, f_count);
                }
            }
            f_count = 0;
        }
        if (s[current] == 'T') {
            t_count++;
        }
        if (s[current] == '\0') {
            break;
        }
    }
    if (x_set[CtoI(x)] == 1 && y_set[CtoI(y)] == 1) {
        printf("Yes\n");
    } else {
        printf("No\n");
    }
    return 0;
}
FTFFTFFF
4 2

Yes

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>

#define N (8000)
#define CtoI(c) (N + c)

void calc(int* array, int count) {
    int index;
    for (index = 0; index < 2 * N + 1; index++) {
        if (array[index] % 2 == 1) {
            array[index - count] += 2;
            array[index + count] += 2;
        }
    }
    for (index = 0; index < 2 * N + 1; index++) {
        if (array[index] > 1) {
            array[index] = 1;
        } else {
            array[index] = 0;
        }
    }
}
int main()
{
    char s[N + 1];
    scanf("%s", s);
    int x, y;
    scanf("%d %d", &x, &y);

    int x_set[2*N+1];
    int y_set[2*N+1];
    int tmp;
    for (tmp = 0; tmp < 2*N+1; tmp++) {
        x_set[tmp] = y_set[tmp] = 0;
    }
    x_set[CtoI(0)] = 1;
    y_set[CtoI(0)] = 1;

    int current, t_count, f_count;
    for (current = t_count = f_count = 0; 1 == 1; current++) {
        if (s[current] == 'F') {
            f_count++;
            continue;
        }
        if (f_count > 0) {
            if (t_count == 0) {
                x_set[CtoI(0)] = 0;
                x_set[CtoI(f_count)] = 1;
            } else {
                if (t_count % 2 == 0) {
                    calc(x_set, f_count);
                } else {
                    calc(y_set, f_count);
                }
            }
            f_count = 0;
        }
        if (s[current] == 'T') {
            t_count++;
        }
        if (s[current] == '\0') {
            break;
        }
    }
    if (x_set[CtoI(x)] == 1 && y_set[CtoI(y)] == 1) {
        printf("Yes\n");
    } else {
        printf("No\n");
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	calc
	.type	calc, @function
calc:
.LFB0:
	.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)
	movl	$0, -4(%rbp)
	jmp	.L2
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L3
	movl	-4(%rbp), %eax
	subl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-4(%rbp), %eax
	subl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	addl	$2, %edx
	movl	%edx, (%rax)
	movl	-4(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-4(%rbp), %ecx
	movl	-28(%rbp), %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	addl	$2, %edx
	movl	%edx, (%rax)
.L3:
	addl	$1, -4(%rbp)
.L2:
	cmpl	$16000, -4(%rbp)
	jle	.L4
	movl	$0, -4(%rbp)
	jmp	.L5
.L8:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$1, %eax
	jle	.L6
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	$1, (%rax)
	jmp	.L7
.L6:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
.L7:
	addl	$1, -4(%rbp)
.L5:
	cmpl	$16000, -4(%rbp)
	jle	.L8
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	calc, .-calc
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"Yes"
.LC3:
	.string	"No"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-135168(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$912, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-8016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-136068(%rbp), %rdx
	leaq	-136072(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -136064(%rbp)
	jmp	.L10
.L11:
	movl	-136064(%rbp), %eax
	cltq
	movl	$0, -72032(%rbp,%rax,4)
	movl	-136064(%rbp), %eax
	cltq
	movl	-72032(%rbp,%rax,4), %edx
	movl	-136064(%rbp), %eax
	cltq
	movl	%edx, -136048(%rbp,%rax,4)
	addl	$1, -136064(%rbp)
.L10:
	cmpl	$16000, -136064(%rbp)
	jle	.L11
	movl	$1, -104048(%rbp)
	movl	$1, -40032(%rbp)
	movl	$0, -136052(%rbp)
	movl	-136052(%rbp), %eax
	movl	%eax, -136056(%rbp)
	movl	-136056(%rbp), %eax
	movl	%eax, -136060(%rbp)
.L20:
	movl	-136060(%rbp), %eax
	cltq
	movzbl	-8016(%rbp,%rax), %eax
	cmpb	$70, %al
	jne	.L12
	addl	$1, -136052(%rbp)
	jmp	.L13
.L12:
	cmpl	$0, -136052(%rbp)
	jle	.L14
	cmpl	$0, -136056(%rbp)
	jne	.L15
	movl	$0, -104048(%rbp)
	movl	-136052(%rbp), %eax
	addl	$8000, %eax
	cltq
	movl	$1, -136048(%rbp,%rax,4)
	jmp	.L16
.L15:
	movl	-136056(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L17
	movl	-136052(%rbp), %edx
	leaq	-136048(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	calc
	jmp	.L16
.L17:
	movl	-136052(%rbp), %edx
	leaq	-72032(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	calc
.L16:
	movl	$0, -136052(%rbp)
.L14:
	movl	-136060(%rbp), %eax
	cltq
	movzbl	-8016(%rbp,%rax), %eax
	cmpb	$84, %al
	jne	.L18
	addl	$1, -136056(%rbp)
.L18:
	movl	-136060(%rbp), %eax
	cltq
	movzbl	-8016(%rbp,%rax), %eax
	testb	%al, %al
	je	.L26
.L13:
	addl	$1, -136060(%rbp)
	jmp	.L20
.L26:
	nop
	movl	-136072(%rbp), %eax
	addl	$8000, %eax
	cltq
	movl	-136048(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L21
	movl	-136068(%rbp), %eax
	addl	$8000, %eax
	cltq
	movl	-72032(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L21
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L22
.L21:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L22:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	calc
	.type	calc, @function
calc:
.LFB0:
	.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)
	movl	$0, -4(%rbp)
	jmp	.L2
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L3
	movl	-4(%rbp), %eax
	subl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-4(%rbp), %eax
	subl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	addl	$2, %edx
	movl	%edx, (%rax)
	movl	-4(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-4(%rbp), %ecx
	movl	-28(%rbp), %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	addl	$2, %edx
	movl	%edx, (%rax)
.L3:
	addl	$1, -4(%rbp)
.L2:
	cmpl	$16000, -4(%rbp)
	jle	.L4
	movl	$0, -4(%rbp)
	jmp	.L5
.L8:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	$1, %eax
	jle	.L6
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	$1, (%rax)
	jmp	.L7
.L6:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
.L7:
	addl	$1, -4(%rbp)
.L5:
	cmpl	$16000, -4(%rbp)
	jle	.L8
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	calc, .-calc
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"Yes"
.LC3:
	.string	"No"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-135168(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$912, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-8016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-136068(%rbp), %rdx
	leaq	-136072(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -136064(%rbp)
	jmp	.L10
.L11:
	movl	-136064(%rbp), %eax
	cltq
	movl	$0, -72032(%rbp,%rax,4)
	movl	-136064(%rbp), %eax
	cltq
	movl	-72032(%rbp,%rax,4), %edx
	movl	-136064(%rbp), %eax
	cltq
	movl	%edx, -136048(%rbp,%rax,4)
	addl	$1, -136064(%rbp)
.L10:
	cmpl	$16000, -136064(%rbp)
	jle	.L11
	movl	$1, -104048(%rbp)
	movl	$1, -40032(%rbp)
	movl	$0, -136052(%rbp)
	movl	-136052(%rbp), %eax
	movl	%eax, -136056(%rbp)
	movl	-136056(%rbp), %eax
	movl	%eax, -136060(%rbp)
.L20:
	movl	-136060(%rbp), %eax
	cltq
	movzbl	-8016(%rbp,%rax), %eax
	cmpb	$70, %al
	jne	.L12
	addl	$1, -136052(%rbp)
	jmp	.L13
.L12:
	cmpl	$0, -136052(%rbp)
	jle	.L14
	cmpl	$0, -136056(%rbp)
	jne	.L15
	movl	$0, -104048(%rbp)
	movl	-136052(%rbp), %eax
	addl	$8000, %eax
	cltq
	movl	$1, -136048(%rbp,%rax,4)
	jmp	.L16
.L15:
	movl	-136056(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L17
	movl	-136052(%rbp), %edx
	leaq	-136048(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	calc
	jmp	.L16
.L17:
	movl	-136052(%rbp), %edx
	leaq	-72032(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	calc
.L16:
	movl	$0, -136052(%rbp)
.L14:
	movl	-136060(%rbp), %eax
	cltq
	movzbl	-8016(%rbp,%rax), %eax
	cmpb	$84, %al
	jne	.L18
	addl	$1, -136056(%rbp)
.L18:
	movl	-136060(%rbp), %eax
	cltq
	movzbl	-8016(%rbp,%rax), %eax
	testb	%al, %al
	je	.L26
.L13:
	addl	$1, -136060(%rbp)
	jmp	.L20
.L26:
	nop
	movl	-136072(%rbp), %eax
	addl	$8000, %eax
	cltq
	movl	-136048(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L21
	movl	-136068(%rbp), %eax
	addl	$8000, %eax
	cltq
	movl	-72032(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L21
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L22
.L21:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L22:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
