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>
int main(void)
{
    char S[14];
    int i;
    int win = 0;
    int lose = 0;
    scanf("%s",S);
    
    for(i=0;S[i]!='\0';i++);
    
    for(i=0;S[i];i++){
        if(S[i] == 'o'){
            win ++ ;
        }
        if(S[i] == 'x'){
            lose ++ ;
        }
    }
    
    if(lose < 8){
        printf("YES\n");
    }
    if(lose >= 8){
        printf("NO\n");
    }
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -32(%rbp)
	movl	$0, -28(%rbp)
	leaq	-22(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -36(%rbp)
	jmp	.L2
.L3:
	addl	$1, -36(%rbp)
.L2:
	movl	-36(%rbp), %eax
	cltq
	movzbl	-22(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L3
	movl	$0, -36(%rbp)
	jmp	.L4
.L7:
	movl	-36(%rbp), %eax
	cltq
	movzbl	-22(%rbp,%rax), %eax
	cmpb	$111, %al
	jne	.L5
	addl	$1, -32(%rbp)
.L5:
	movl	-36(%rbp), %eax
	cltq
	movzbl	-22(%rbp,%rax), %eax
	cmpb	$120, %al
	jne	.L6
	addl	$1, -28(%rbp)
.L6:
	addl	$1, -36(%rbp)
.L4:
	movl	-36(%rbp), %eax
	cltq
	movzbl	-22(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L7
	cmpl	$7, -28(%rbp)
	jg	.L8
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L8:
	cmpl	$7, -28(%rbp)
	jle	.L9
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	10(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movzbl	10(%rsp), %eax
	testb	%al, %al
	je	.L2
	cmpb	$120, %al
	movzbl	11(%rsp), %edx
	sete	%al
	movzbl	%al, %eax
	testb	%dl, %dl
	je	.L2
	cmpb	$120, %dl
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %eax
	movzbl	12(%rsp), %edx
	testb	%dl, %dl
	je	.L2
	cmpb	$120, %dl
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %eax
	movzbl	13(%rsp), %edx
	testb	%dl, %dl
	je	.L2
	cmpb	$120, %dl
	je	.L62
.L5:
	movzbl	14(%rsp), %edx
	testb	%dl, %dl
	je	.L2
	cmpb	$120, %dl
	je	.L63
.L6:
	movzbl	15(%rsp), %edx
	testb	%dl, %dl
	je	.L2
	cmpb	$120, %dl
	jne	.L7
	addl	$1, %eax
.L7:
	movzbl	16(%rsp), %edx
	testb	%dl, %dl
	je	.L2
	cmpb	$120, %dl
	jne	.L8
	addl	$1, %eax
.L8:
	movzbl	17(%rsp), %edx
	testb	%dl, %dl
	je	.L2
	cmpb	$120, %dl
	je	.L64
	movzbl	18(%rsp), %edx
	testb	%dl, %dl
	je	.L2
.L18:
	cmpb	$120, %dl
	jne	.L11
	addl	$1, %eax
.L11:
	movzbl	19(%rsp), %edx
	testb	%dl, %dl
	je	.L10
	cmpb	$120, %dl
	jne	.L12
	addl	$1, %eax
.L12:
	movzbl	20(%rsp), %edx
	testb	%dl, %dl
	je	.L10
	cmpb	$120, %dl
	je	.L65
.L13:
	movzbl	21(%rsp), %edx
	testb	%dl, %dl
	je	.L10
	cmpb	$120, %dl
	je	.L66
.L14:
	movzbl	22(%rsp), %edx
	testb	%dl, %dl
	je	.L10
	cmpb	$120, %dl
	je	.L67
.L10:
	cmpl	$7, %eax
	jle	.L2
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L17:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L68
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L62:
	.cfi_restore_state
	addl	$1, %eax
	jmp	.L5
.L2:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L17
.L63:
	addl	$1, %eax
	jmp	.L6
.L65:
	addl	$1, %eax
	jmp	.L13
.L66:
	addl	$1, %eax
	jmp	.L14
.L67:
	addl	$1, %eax
	jmp	.L10
.L64:
	movzbl	18(%rsp), %edx
	addl	$1, %eax
	testb	%dl, %dl
	jne	.L18
	jmp	.L10
.L68:
	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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	10(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movzbl	10(%rsp), %eax
	testb	%al, %al
	je	.L2
	cmpb	$120, %al
	movzbl	11(%rsp), %edx
	sete	%al
	movzbl	%al, %eax
	testb	%dl, %dl
	je	.L2
	cmpb	$120, %dl
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %eax
	movzbl	12(%rsp), %edx
	testb	%dl, %dl
	je	.L2
	cmpb	$120, %dl
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %eax
	movzbl	13(%rsp), %edx
	testb	%dl, %dl
	je	.L2
	cmpb	$120, %dl
	je	.L62
.L5:
	movzbl	14(%rsp), %edx
	testb	%dl, %dl
	je	.L2
	cmpb	$120, %dl
	je	.L63
.L6:
	movzbl	15(%rsp), %edx
	testb	%dl, %dl
	je	.L2
	cmpb	$120, %dl
	jne	.L7
	addl	$1, %eax
.L7:
	movzbl	16(%rsp), %edx
	testb	%dl, %dl
	je	.L2
	cmpb	$120, %dl
	jne	.L8
	addl	$1, %eax
.L8:
	movzbl	17(%rsp), %edx
	testb	%dl, %dl
	je	.L2
	cmpb	$120, %dl
	je	.L64
	movzbl	18(%rsp), %edx
	testb	%dl, %dl
	je	.L2
.L18:
	cmpb	$120, %dl
	jne	.L11
	addl	$1, %eax
.L11:
	movzbl	19(%rsp), %edx
	testb	%dl, %dl
	je	.L10
	cmpb	$120, %dl
	jne	.L12
	addl	$1, %eax
.L12:
	movzbl	20(%rsp), %edx
	testb	%dl, %dl
	je	.L10
	cmpb	$120, %dl
	je	.L65
.L13:
	movzbl	21(%rsp), %edx
	testb	%dl, %dl
	je	.L10
	cmpb	$120, %dl
	je	.L66
.L14:
	movzbl	22(%rsp), %edx
	testb	%dl, %dl
	je	.L10
	cmpb	$120, %dl
	je	.L67
.L10:
	cmpl	$7, %eax
	jle	.L2
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L17:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L68
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L62:
	.cfi_restore_state
	addl	$1, %eax
	jmp	.L5
.L2:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L17
.L63:
	addl	$1, %eax
	jmp	.L6
.L65:
	addl	$1, %eax
	jmp	.L13
.L66:
	addl	$1, %eax
	jmp	.L14
.L67:
	addl	$1, %eax
	jmp	.L10
.L64:
	movzbl	18(%rsp), %edx
	addl	$1, %eax
	testb	%dl, %dl
	jne	.L18
	jmp	.L10
.L68:
	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:

#include<stdio.h>
int main(void)
{
    char S[14];
    int i;
    int win = 0;
    int lose = 0;
    scanf("%s",S);
    
    for(i=0;S[i]!='\0';i++);
    
    for(i=0;S[i];i++){
        if(S[i] == 'o'){
            win ++ ;
        }
        if(S[i] == 'x'){
            lose ++ ;
        }
    }
    
    if(lose < 8){
        printf("YES\n");
    }
    if(lose >= 8){
        printf("NO\n");
    }
    return 0;
}

xoxoxoxoxoxoxo
 oxoxowoxoxoxox
 oxoxowoooxoxxx
 xxxoxooowoxoxo
 xoxoxooxwoxoxo
 xoxoyoxoxoxoxo
 xxxoxoooooxwxo
 xoxowooxwoxoxo
 oxoxoxoxoyoxox
 xoxoxoxoxoyoxo

YES
 YES
 YES
 YES
 YES
 YES
 YES
 YES
 YES
 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>
int main(void)
{
    char S[14];
    int i;
    int win = 0;
    int lose = 0;
    scanf("%s",S);
    
    for(i=0;S[i]!='\0';i++);
    
    for(i=0;S[i];i++){
        if(S[i] == 'o'){
            win ++ ;
        }
        if(S[i] == 'x'){
            lose ++ ;
        }
    }
    
    if(lose < 8){
        printf("YES\n");
    }
    if(lose >= 8){
        printf("NO\n");
    }
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -32(%rbp)
	movl	$0, -28(%rbp)
	leaq	-22(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -36(%rbp)
	jmp	.L2
.L3:
	addl	$1, -36(%rbp)
.L2:
	movl	-36(%rbp), %eax
	cltq
	movzbl	-22(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L3
	movl	$0, -36(%rbp)
	jmp	.L4
.L7:
	movl	-36(%rbp), %eax
	cltq
	movzbl	-22(%rbp,%rax), %eax
	cmpb	$111, %al
	jne	.L5
	addl	$1, -32(%rbp)
.L5:
	movl	-36(%rbp), %eax
	cltq
	movzbl	-22(%rbp,%rax), %eax
	cmpb	$120, %al
	jne	.L6
	addl	$1, -28(%rbp)
.L6:
	addl	$1, -36(%rbp)
.L4:
	movl	-36(%rbp), %eax
	cltq
	movzbl	-22(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L7
	cmpl	$7, -28(%rbp)
	jg	.L8
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L8:
	cmpl	$7, -28(%rbp)
	jle	.L9
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"%s"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -32(%rbp)
	movl	$0, -28(%rbp)
	leaq	-22(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -36(%rbp)
	jmp	.L2
.L3:
	addl	$1, -36(%rbp)
.L2:
	movl	-36(%rbp), %eax
	cltq
	movzbl	-22(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L3
	movl	$0, -36(%rbp)
	jmp	.L4
.L7:
	movl	-36(%rbp), %eax
	cltq
	movzbl	-22(%rbp,%rax), %eax
	cmpb	$111, %al
	jne	.L5
	addl	$1, -32(%rbp)
.L5:
	movl	-36(%rbp), %eax
	cltq
	movzbl	-22(%rbp,%rax), %eax
	cmpb	$120, %al
	jne	.L6
	addl	$1, -28(%rbp)
.L6:
	addl	$1, -36(%rbp)
.L4:
	movl	-36(%rbp), %eax
	cltq
	movzbl	-22(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L7
	cmpl	$7, -28(%rbp)
	jg	.L8
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L8:
	cmpl	$7, -28(%rbp)
	jle	.L9
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
