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>
#include <string.h>
int main()
{
    char S[10];
    gets(S);
    int i,flag = 0,len;
    len = strlen(S);
    for(i=0;i<len;i++)
    {
        if(S[5]=='0')
        {
            if(S[6]>='1' && S[6]<='4')
            {
                if(S[8]>='0' && S[8]<='2')
                {
                    if(S[9]>='0' && S[9]<='9')
                    {
                        flag = 1;
                    }
                }
                else if(S[8]=='3')
                {
                    if(S[9]=='0')
                    {
                        flag = 1;
                    }
                }
            }
        }
    }
    if(flag==1)
    {
        printf("Heisei\n");
    }
    else
    {
        printf("TBD\n");
    }
    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Heisei"
.LC1:
	.string	"TBD"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	14(%rsp), %rbp
	movq	%rbp, %rdi
	call	gets@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L2
	movl	%eax, %esi
	movzbl	20(%rsp), %eax
	movzbl	22(%rsp), %edx
	movzbl	23(%rsp), %ecx
	subl	$49, %eax
	cmpb	$48, 19(%rsp)
	leal	-48(%rdx), %r8d
	leal	-48(%rcx), %edi
	je	.L18
.L2:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L8:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	cmpb	$9, %dil
	ja	.L2
	cmpb	$2, %r8b
	jbe	.L3
	cmpb	$3, %al
	ja	.L2
	xorl	%edi, %edi
	xorl	%eax, %eax
	movl	$1, %r8d
	jmp	.L5
.L4:
	addl	$1, %eax
	cmpl	%eax, %esi
	je	.L20
.L5:
	cmpb	$51, %dl
	jne	.L4
	cmpb	$48, %cl
	cmove	%r8d, %edi
	jmp	.L4
.L3:
	cmpb	$3, %al
	ja	.L2
.L7:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L8
.L20:
	subl	$1, %edi
	je	.L7
	jmp	.L2
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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	"Heisei"
.LC1:
	.string	"TBD"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	14(%rsp), %rbp
	movq	%rbp, %rdi
	call	gets@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L2
	movl	%eax, %esi
	movzbl	20(%rsp), %eax
	movzbl	22(%rsp), %edx
	movzbl	23(%rsp), %ecx
	subl	$49, %eax
	cmpb	$48, 19(%rsp)
	leal	-48(%rdx), %r8d
	leal	-48(%rcx), %edi
	je	.L18
.L2:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L8:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	cmpb	$9, %dil
	ja	.L2
	cmpb	$2, %r8b
	jbe	.L3
	cmpb	$3, %al
	ja	.L2
	xorl	%edi, %edi
	xorl	%eax, %eax
	movl	$1, %r8d
	jmp	.L5
.L4:
	addl	$1, %eax
	cmpl	%eax, %esi
	je	.L20
.L5:
	cmpb	$51, %dl
	jne	.L4
	cmpb	$48, %cl
	cmove	%r8d, %edi
	jmp	.L4
.L3:
	cmpb	$3, %al
	ja	.L2
.L7:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L8
.L20:
	subl	$1, %edi
	je	.L7
	jmp	.L2
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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	"Heisei"
.LC1:
	.string	"TBD"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	14(%rsp), %rbp
	movq	%rbp, %rdi
	call	gets@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L2
	movl	%eax, %esi
	movzbl	20(%rsp), %eax
	movzbl	22(%rsp), %edx
	movzbl	23(%rsp), %ecx
	subl	$49, %eax
	cmpb	$48, 19(%rsp)
	leal	-48(%rdx), %r8d
	leal	-48(%rcx), %edi
	je	.L18
.L2:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L8:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	cmpb	$9, %dil
	ja	.L2
	cmpb	$2, %r8b
	jbe	.L3
	cmpb	$3, %al
	ja	.L2
	xorl	%edi, %edi
	xorl	%eax, %eax
	movl	$1, %r8d
	jmp	.L5
.L4:
	addl	$1, %eax
	cmpl	%eax, %esi
	je	.L20
.L5:
	cmpb	$51, %dl
	jne	.L4
	cmpb	$48, %cl
	cmove	%r8d, %edi
	jmp	.L4
.L3:
	cmpb	$3, %al
	ja	.L2
.L7:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L8
.L20:
	subl	$1, %edi
	je	.L7
	jmp	.L2
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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>
#include <string.h>
int main()
{
    char S[10];
    gets(S);
    int i,flag = 0,len;
    len = strlen(S);
    for(i=0;i<len;i++)
    {
        if(S[5]=='0')
        {
            if(S[6]>='1' && S[6]<='4')
            {
                if(S[8]>='0' && S[8]<='2')
                {
                    if(S[9]>='0' && S[9]<='9')
                    {
                        flag = 1;
                    }
                }
                else if(S[8]=='3')
                {
                    if(S[9]=='0')
                    {
                        flag = 1;
                    }
                }
            }
        }
    }
    if(flag==1)
    {
        printf("Heisei\n");
    }
    else
    {
        printf("TBD\n");
    }
    return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <string.h>
int main()
{
    char S[10];
    gets(S);
    int i,flag = 0,len;
    len = strlen(S);
    for(i=0;i<len;i++)
    {
        if(S[5]=='0')
        {
            if(S[6]>='1' && S[6]<='4')
            {
                if(S[8]>='0' && S[8]<='2')
                {
                    if(S[9]>='0' && S[9]<='9')
                    {
                        flag = 1;
                    }
                }
                else if(S[8]=='3')
                {
                    if(S[9]=='0')
                    {
                        flag = 1;
                    }
                }
            }
        }
    }
    if(flag==1)
    {
        printf("Heisei\n");
    }
    else
    {
        printf("TBD\n");
    }
    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:

2019/03/30
 2019/11/00
 2019/04/20
 2019/12/01
 2019/14/20
 2119/12/01
 2019/24/10
 1019/04/30
 2119/10/01
 2029/11/00

Heisei
 TBD
 Heisei
 TBD
 TBD
 TBD
 TBD
 Heisei
 TBD
 TBD

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>
#include <string.h>
int main()
{
    char S[10];
    gets(S);
    int i,flag = 0,len;
    len = strlen(S);
    for(i=0;i<len;i++)
    {
        if(S[5]=='0')
        {
            if(S[6]>='1' && S[6]<='4')
            {
                if(S[8]>='0' && S[8]<='2')
                {
                    if(S[9]>='0' && S[9]<='9')
                    {
                        flag = 1;
                    }
                }
                else if(S[8]=='3')
                {
                    if(S[9]=='0')
                    {
                        flag = 1;
                    }
                }
            }
        }
    }
    if(flag==1)
    {
        printf("Heisei\n");
    }
    else
    {
        printf("TBD\n");
    }
    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Heisei"
.LC1:
	.string	"TBD"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	14(%rsp), %rbp
	movq	%rbp, %rdi
	call	gets@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L2
	movl	%eax, %esi
	movzbl	20(%rsp), %eax
	movzbl	22(%rsp), %edx
	movzbl	23(%rsp), %ecx
	subl	$49, %eax
	cmpb	$48, 19(%rsp)
	leal	-48(%rdx), %r8d
	leal	-48(%rcx), %edi
	je	.L18
.L2:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L8:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	cmpb	$9, %dil
	ja	.L2
	cmpb	$2, %r8b
	jbe	.L3
	cmpb	$3, %al
	ja	.L2
	xorl	%edi, %edi
	xorl	%eax, %eax
	movl	$1, %r8d
	jmp	.L5
.L4:
	addl	$1, %eax
	cmpl	%eax, %esi
	je	.L20
.L5:
	cmpb	$51, %dl
	jne	.L4
	cmpb	$48, %cl
	cmove	%r8d, %edi
	jmp	.L4
.L3:
	cmpb	$3, %al
	ja	.L2
.L7:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L8
.L20:
	subl	$1, %edi
	je	.L7
	jmp	.L2
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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	"Heisei"
.LC1:
	.string	"TBD"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	14(%rsp), %rbp
	movq	%rbp, %rdi
	call	gets@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L2
	movl	%eax, %esi
	movzbl	20(%rsp), %eax
	movzbl	22(%rsp), %edx
	movzbl	23(%rsp), %ecx
	subl	$49, %eax
	cmpb	$48, 19(%rsp)
	leal	-48(%rdx), %r8d
	leal	-48(%rcx), %edi
	je	.L18
.L2:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L8:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	cmpb	$9, %dil
	ja	.L2
	cmpb	$2, %r8b
	jbe	.L3
	cmpb	$3, %al
	ja	.L2
	xorl	%edi, %edi
	xorl	%eax, %eax
	movl	$1, %r8d
	jmp	.L5
.L4:
	addl	$1, %eax
	cmpl	%eax, %esi
	je	.L20
.L5:
	cmpb	$51, %dl
	jne	.L4
	cmpb	$48, %cl
	cmove	%r8d, %edi
	jmp	.L4
.L3:
	cmpb	$3, %al
	ja	.L2
.L7:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L8
.L20:
	subl	$1, %edi
	je	.L7
	jmp	.L2
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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:
```