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 <string.h>

int main(void) {
    char s[16];
    int count = 0;
    scanf("%s",s);
    for(int i = 0; i < strlen(s); i++) {
        if(s[i] == 'x') count++;
    }
    if(count > 7) printf("NO\n");
    else printf("YES\n");
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.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
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$0, -56(%rbp)
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -52(%rbp)
	jmp	.L2
.L4:
	movl	-52(%rbp), %eax
	cltq
	movzbl	-48(%rbp,%rax), %eax
	cmpb	$120, %al
	jne	.L3
	addl	$1, -56(%rbp)
.L3:
	addl	$1, -52(%rbp)
.L2:
	movl	-52(%rbp), %eax
	movslq	%eax, %rbx
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L4
	cmpl	$7, -56(%rbp)
	jle	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L6
.L5:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L6:
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	movq	-8(%rbp), %rbx
	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	"NO"
.LC2:
	.string	"YES"
	.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
	leaq	.LC0(%rip), %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L2
	xorl	%edx, %edx
	cmpb	$120, (%rsp)
	sete	%dl
	cmpq	$1, %rax
	je	.L2
	xorl	%ecx, %ecx
	cmpb	$120, 1(%rsp)
	sete	%cl
	addl	%ecx, %edx
	cmpq	$2, %rax
	je	.L2
	xorl	%ecx, %ecx
	cmpb	$120, 2(%rsp)
	sete	%cl
	addl	%ecx, %edx
	cmpq	$3, %rax
	je	.L2
	cmpb	$120, 3(%rsp)
	je	.L66
.L5:
	cmpq	$4, %rax
	je	.L2
	cmpb	$120, 4(%rsp)
	je	.L67
.L6:
	cmpq	$5, %rax
	je	.L2
	cmpb	$120, 5(%rsp)
	jne	.L7
	addl	$1, %edx
.L7:
	cmpq	$6, %rax
	je	.L2
	cmpb	$120, 6(%rsp)
	jne	.L8
	addl	$1, %edx
.L8:
	cmpq	$7, %rax
	je	.L2
	cmpb	$120, 7(%rsp)
	je	.L68
	cmpq	$8, %rax
	je	.L2
.L19:
	cmpb	$120, 8(%rsp)
	jne	.L11
	addl	$1, %edx
.L11:
	cmpq	$9, %rax
	je	.L10
	cmpb	$120, 9(%rsp)
	jne	.L12
	addl	$1, %edx
.L12:
	cmpq	$10, %rax
	je	.L10
	cmpb	$120, 10(%rsp)
	je	.L69
.L13:
	cmpq	$11, %rax
	je	.L10
	cmpb	$120, 11(%rsp)
	je	.L70
.L14:
	cmpq	$12, %rax
	je	.L10
	cmpb	$120, 12(%rsp)
	je	.L71
.L15:
	cmpq	$13, %rax
	je	.L10
	cmpb	$120, 13(%rsp)
	jne	.L16
	addl	$1, %edx
.L16:
	cmpq	$15, %rax
	jne	.L10
	cmpb	$120, 14(%rsp)
	jne	.L10
	addl	$1, %edx
.L10:
	cmpl	$7, %edx
	jle	.L2
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L18
.L2:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L18:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L72
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L66:
	.cfi_restore_state
	addl	$1, %edx
	jmp	.L5
.L67:
	addl	$1, %edx
	jmp	.L6
.L69:
	addl	$1, %edx
	jmp	.L13
.L70:
	addl	$1, %edx
	jmp	.L14
.L71:
	addl	$1, %edx
	jmp	.L15
.L68:
	addl	$1, %edx
	cmpq	$8, %rax
	jne	.L19
	jmp	.L10
.L72:
	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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.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
	leaq	.LC0(%rip), %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L2
	xorl	%edx, %edx
	cmpb	$120, (%rsp)
	sete	%dl
	cmpq	$1, %rax
	je	.L2
	xorl	%ecx, %ecx
	cmpb	$120, 1(%rsp)
	sete	%cl
	addl	%ecx, %edx
	cmpq	$2, %rax
	je	.L2
	xorl	%ecx, %ecx
	cmpb	$120, 2(%rsp)
	sete	%cl
	addl	%ecx, %edx
	cmpq	$3, %rax
	je	.L2
	cmpb	$120, 3(%rsp)
	je	.L66
.L5:
	cmpq	$4, %rax
	je	.L2
	cmpb	$120, 4(%rsp)
	je	.L67
.L6:
	cmpq	$5, %rax
	je	.L2
	cmpb	$120, 5(%rsp)
	jne	.L7
	addl	$1, %edx
.L7:
	cmpq	$6, %rax
	je	.L2
	cmpb	$120, 6(%rsp)
	jne	.L8
	addl	$1, %edx
.L8:
	cmpq	$7, %rax
	je	.L2
	cmpb	$120, 7(%rsp)
	je	.L68
	cmpq	$8, %rax
	je	.L2
.L19:
	cmpb	$120, 8(%rsp)
	jne	.L11
	addl	$1, %edx
.L11:
	cmpq	$9, %rax
	je	.L10
	cmpb	$120, 9(%rsp)
	jne	.L12
	addl	$1, %edx
.L12:
	cmpq	$10, %rax
	je	.L10
	cmpb	$120, 10(%rsp)
	je	.L69
.L13:
	cmpq	$11, %rax
	je	.L10
	cmpb	$120, 11(%rsp)
	je	.L70
.L14:
	cmpq	$12, %rax
	je	.L10
	cmpb	$120, 12(%rsp)
	je	.L71
.L15:
	cmpq	$13, %rax
	je	.L10
	cmpb	$120, 13(%rsp)
	jne	.L16
	addl	$1, %edx
.L16:
	cmpq	$15, %rax
	jne	.L10
	cmpb	$120, 14(%rsp)
	jne	.L10
	addl	$1, %edx
.L10:
	cmpl	$7, %edx
	jle	.L2
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L18
.L2:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L18:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L72
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L66:
	.cfi_restore_state
	addl	$1, %edx
	jmp	.L5
.L67:
	addl	$1, %edx
	jmp	.L6
.L69:
	addl	$1, %edx
	jmp	.L13
.L70:
	addl	$1, %edx
	jmp	.L14
.L71:
	addl	$1, %edx
	jmp	.L15
.L68:
	addl	$1, %edx
	cmpq	$8, %rax
	jne	.L19
	jmp	.L10
.L72:
	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:

#include <stdio.h>
#include <string.h>

int main(void) {
    char s[16];
    int count = 0;
    scanf("%s",s);
    for(int i = 0; i < strlen(s); i++) {
        if(s[i] == 'x') count++;
    }
    if(count > 7) printf("NO\n");
    else printf("YES\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>
#include <string.h>

int main(void) {
    char s[16];
    int count = 0;
    scanf("%s",s);
    for(int i = 0; i < strlen(s); i++) {
        if(s[i] == 'x') count++;
    }
    if(count > 7) printf("NO\n");
    else printf("YES\n");
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.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
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$0, -56(%rbp)
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -52(%rbp)
	jmp	.L2
.L4:
	movl	-52(%rbp), %eax
	cltq
	movzbl	-48(%rbp,%rax), %eax
	cmpb	$120, %al
	jne	.L3
	addl	$1, -56(%rbp)
.L3:
	addl	$1, -52(%rbp)
.L2:
	movl	-52(%rbp), %eax
	movslq	%eax, %rbx
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L4
	cmpl	$7, -56(%rbp)
	jle	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L6
.L5:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L6:
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	movq	-8(%rbp), %rbx
	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	"NO"
.LC2:
	.string	"YES"
	.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
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$0, -56(%rbp)
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -52(%rbp)
	jmp	.L2
.L4:
	movl	-52(%rbp), %eax
	cltq
	movzbl	-48(%rbp,%rax), %eax
	cmpb	$120, %al
	jne	.L3
	addl	$1, -56(%rbp)
.L3:
	addl	$1, -52(%rbp)
.L2:
	movl	-52(%rbp), %eax
	movslq	%eax, %rbx
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L4
	cmpl	$7, -56(%rbp)
	jle	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L6
.L5:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L6:
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	movq	-8(%rbp), %rbx
	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:
