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 size(char *s);

int main() {
	int i, count = 0;
	char S[16];
	char *sp;

	scanf("%s", S);

	sp = &S[0];

	for (i = 0; i < size(sp); i++) {
		if (S[i] == 'o')count++;
	}

	printf(size(sp) - count <= 7 ? "YES\n" : "NO\n");

	return 0;
}

int size(char *s) {
	int n = 0;

	while (*s != '\0') {
		n++;
		s++;
	}

	return n;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"YES\n"
.LC2:
	.string	"NO\n"
	.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, -44(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-32(%rbp), %rax
	movq	%rax, -40(%rbp)
	movl	$0, -48(%rbp)
	jmp	.L2
.L4:
	movl	-48(%rbp), %eax
	cltq
	movzbl	-32(%rbp,%rax), %eax
	cmpb	$111, %al
	jne	.L3
	addl	$1, -44(%rbp)
.L3:
	addl	$1, -48(%rbp)
.L2:
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	size
	cmpl	%eax, -48(%rbp)
	jl	.L4
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	size
	subl	-44(%rbp), %eax
	cmpl	$7, %eax
	jg	.L5
	leaq	.LC1(%rip), %rax
	jmp	.L6
.L5:
	leaq	.LC2(%rip), %rax
.L6:
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	size
	.type	size, @function
size:
.LFB1:
	.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	$0, -4(%rbp)
	jmp	.L10
.L11:
	addl	$1, -4(%rbp)
	addq	$1, -24(%rbp)
.L10:
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L11
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	size, .-size
	.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	"YES\n"
.LC1:
	.string	"NO\n"
.LC2:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC2(%rip), %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movzbl	(%rsp), %r8d
	xorl	%esi, %esi
	xorl	%edi, %edi
	movl	$1, %ecx
	subl	%ebx, %ecx
	testb	%r8b, %r8b
	je	.L9
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rbx, %rax
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%rcx,%rax), %edx
	addq	$1, %rax
	cmpb	$0, (%rax)
	jne	.L5
	cmpl	%esi, %edx
	jle	.L15
	xorl	%eax, %eax
	cmpb	$111, (%rbx,%rsi)
	sete	%al
	addq	$1, %rsi
	addl	%eax, %edi
	testb	%r8b, %r8b
	jne	.L16
.L9:
	leaq	.LC0(%rip), %rsi
.L4:
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	movl	$1, %ecx
	movq	%rbx, %rax
	subl	%ebx, %ecx
	.p2align 4,,10
	.p2align 3
.L7:
	leal	(%rcx,%rax), %edx
	addq	$1, %rax
	cmpb	$0, (%rax)
	jne	.L7
	subl	%edi, %edx
	leaq	.LC0(%rip), %rsi
	leaq	.LC1(%rip), %rax
	cmpl	$8, %edx
	cmovge	%rax, %rsi
	jmp	.L4
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	size
	.type	size, @function
size:
.LFB24:
	.cfi_startproc
	endbr64
	cmpb	$0, (%rdi)
	je	.L21
	movl	$1, %eax
	subl	%edi, %eax
	.p2align 4,,10
	.p2align 3
.L20:
	leal	(%rax,%rdi), %r8d
	addq	$1, %rdi
	cmpb	$0, (%rdi)
	jne	.L20
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%r8d, %r8d
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	size, .-size
	.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	"YES\n"
.LC1:
	.string	"NO\n"
.LC2:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC2(%rip), %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movzbl	(%rsp), %r8d
	xorl	%esi, %esi
	xorl	%edi, %edi
	movl	$1, %ecx
	subl	%ebx, %ecx
	testb	%r8b, %r8b
	je	.L9
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rbx, %rax
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%rcx,%rax), %edx
	addq	$1, %rax
	cmpb	$0, (%rax)
	jne	.L5
	cmpl	%esi, %edx
	jle	.L15
	xorl	%eax, %eax
	cmpb	$111, (%rbx,%rsi)
	sete	%al
	addq	$1, %rsi
	addl	%eax, %edi
	testb	%r8b, %r8b
	jne	.L16
.L9:
	leaq	.LC0(%rip), %rsi
.L4:
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	movl	$1, %ecx
	movq	%rbx, %rax
	subl	%ebx, %ecx
	.p2align 4,,10
	.p2align 3
.L7:
	leal	(%rcx,%rax), %edx
	addq	$1, %rax
	cmpb	$0, (%rax)
	jne	.L7
	subl	%edi, %edx
	leaq	.LC0(%rip), %rsi
	leaq	.LC1(%rip), %rax
	cmpl	$8, %edx
	cmovge	%rax, %rsi
	jmp	.L4
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	size
	.type	size, @function
size:
.LFB24:
	.cfi_startproc
	endbr64
	cmpb	$0, (%rdi)
	je	.L21
	movl	$1, %eax
	subl	%edi, %eax
	.p2align 4,,10
	.p2align 3
.L20:
	leal	(%rax,%rdi), %r8d
	addq	$1, %rdi
	cmpb	$0, (%rdi)
	jne	.L20
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%r8d, %r8d
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	size, .-size
	.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 size(char *s);

int main() {
	int i, count = 0;
	char S[16];
	char *sp;

	scanf("%s", S);

	sp = &S[0];

	for (i = 0; i < size(sp); i++) {
		if (S[i] == 'o')count++;
	}

	printf(size(sp) - count <= 7 ? "YES\n" : "NO\n");

	return 0;
}

int size(char *s) {
	int n = 0;

	while (*s != '\0') {
		n++;
		s++;
	}

	return n;
}
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 size(char *s);

int main() {
	int i, count = 0;
	char S[16];
	char *sp;

	scanf("%s", S);

	sp = &S[0];

	for (i = 0; i < size(sp); i++) {
		if (S[i] == 'o')count++;
	}

	printf(size(sp) - count <= 7 ? "YES\n" : "NO\n");

	return 0;
}

int size(char *s) {
	int n = 0;

	while (*s != '\0') {
		n++;
		s++;
	}

	return n;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"YES\n"
.LC2:
	.string	"NO\n"
	.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, -44(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-32(%rbp), %rax
	movq	%rax, -40(%rbp)
	movl	$0, -48(%rbp)
	jmp	.L2
.L4:
	movl	-48(%rbp), %eax
	cltq
	movzbl	-32(%rbp,%rax), %eax
	cmpb	$111, %al
	jne	.L3
	addl	$1, -44(%rbp)
.L3:
	addl	$1, -48(%rbp)
.L2:
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	size
	cmpl	%eax, -48(%rbp)
	jl	.L4
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	size
	subl	-44(%rbp), %eax
	cmpl	$7, %eax
	jg	.L5
	leaq	.LC1(%rip), %rax
	jmp	.L6
.L5:
	leaq	.LC2(%rip), %rax
.L6:
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	size
	.type	size, @function
size:
.LFB1:
	.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	$0, -4(%rbp)
	jmp	.L10
.L11:
	addl	$1, -4(%rbp)
	addq	$1, -24(%rbp)
.L10:
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L11
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	size, .-size
	.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\n"
.LC2:
	.string	"NO\n"
	.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, -44(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-32(%rbp), %rax
	movq	%rax, -40(%rbp)
	movl	$0, -48(%rbp)
	jmp	.L2
.L4:
	movl	-48(%rbp), %eax
	cltq
	movzbl	-32(%rbp,%rax), %eax
	cmpb	$111, %al
	jne	.L3
	addl	$1, -44(%rbp)
.L3:
	addl	$1, -48(%rbp)
.L2:
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	size
	cmpl	%eax, -48(%rbp)
	jl	.L4
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	size
	subl	-44(%rbp), %eax
	cmpl	$7, %eax
	jg	.L5
	leaq	.LC1(%rip), %rax
	jmp	.L6
.L5:
	leaq	.LC2(%rip), %rax
.L6:
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	size
	.type	size, @function
size:
.LFB1:
	.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	$0, -4(%rbp)
	jmp	.L10
.L11:
	addl	$1, -4(%rbp)
	addq	$1, -24(%rbp)
.L10:
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L11
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	size, .-size
	.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:
