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()
// {
//     int n;
//     int m;

//     scanf("%d %d",&n,&m);

//     int a[n];
//     int b[n];
//     int temp=0;

//     for (int i = 0; i < n; i++)
//     {
//         scanf("%d %d",&a[i],&b[i]);
//     }
    
//     // for (int i = 0; i < n-1; i++)
//     // {
//     //     if(a[i]<a[i+1]){
//     //         temp=a[i];
//     //         a[i]=a[i+1];
//     //         a[i+1]=temp;
//     //         temp=b[i];
//     //         b[i]=b[i+1];
//     //         b[i+1]=temp;
//     //     }
//     // }
//     int flag=1;

//     while(flag==1){
//         flag=0;
//         for (int i = 0; i < n-1; i++)
//         {
//             if(a[i]<a[i+1]){
//                 flag=1;
//                 temp=a[i];
//                 a[i]=a[i+1];
//                 a[i+1]=temp;
//                 temp=b[i];
//                 b[i]=b[i+1];
//                 b[i+1]=temp;
//             }
//         }
//     }

//     int total=0;
//     int k=m;
//     int i=0;

//     int u=0;
//     while(k>0){
//         k=k-b[i];
//         i++;
//     }

//     for (int j = 0; j < i; ++i)
//     {
//         total=total+a[j]*b[j];
//         u=m-b[j];
//     }
//     total=total+a[i]*u;
//     printf("%d\n",total);
//     return 0;
// }

#include <stdio.h>
int main(int argc, char const *argv[])
{
    int n;
    scanf("%d",&n);
    char str[n];
    scanf("%s",&str);
    int rcount=0;
    int bcount=0;
    for (int i = 0; i < n; ++i)
    {
        if (str[i]=='R')
        {
            rcount++;
        }else if (str[i]=='B')
        {
            bcount++;
        }
    }
    if (rcount>bcount)
    {
        printf("Yes\n");
    }else{
        printf("No\n");
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Yes"
.LC3:
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movl	%edi, -100(%rbp)
	movq	%rsi, -112(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-88(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-88(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	movl	$16, %edx
	subq	$1, %rdx
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -84(%rbp)
	movl	$0, -80(%rbp)
	movl	$0, -76(%rbp)
	jmp	.L5
.L8:
	movq	-64(%rbp), %rdx
	movl	-76(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %eax
	cmpb	$82, %al
	jne	.L6
	addl	$1, -84(%rbp)
	jmp	.L7
.L6:
	movq	-64(%rbp), %rdx
	movl	-76(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %eax
	cmpb	$66, %al
	jne	.L7
	addl	$1, -80(%rbp)
.L7:
	addl	$1, -76(%rbp)
.L5:
	movl	-88(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L8
	movl	-84(%rbp), %eax
	cmpl	-80(%rbp), %eax
	jle	.L9
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L10
.L9:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L10:
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	"%d"
.LC1:
	.string	"%s"
.LC5:
	.string	"Yes"
.LC6:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	leaq	-28(%rbp), %rsi
	subq	$24, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-28(%rbp), %rax
	movq	%rsp, %rcx
	addq	$15, %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L25:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L25
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L26
.L4:
	leaq	.LC1(%rip), %rdi
	movq	%rsp, %rsi
	xorl	%eax, %eax
	movq	%rsp, %rbx
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %edi
	testl	%edi, %edi
	jle	.L5
	leal	-1(%rdi), %eax
	cmpl	$14, %eax
	jbe	.L16
	movl	%edi, %edx
	pxor	%xmm9, %xmm9
	movdqa	.LC2(%rip), %xmm7
	movdqa	.LC3(%rip), %xmm5
	shrl	$4, %edx
	movdqa	%xmm9, %xmm8
	pxor	%xmm4, %xmm4
	movq	%rsp, %rax
	salq	$4, %rdx
	movdqa	.LC4(%rip), %xmm6
	pxor	%xmm3, %xmm3
	addq	%rsp, %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	movdqu	(%rax), %xmm1
	movdqa	%xmm4, %xmm2
	movdqa	%xmm3, %xmm10
	addq	$16, %rax
	pcmpeqb	%xmm7, %xmm1
	pand	%xmm5, %xmm1
	pcmpgtb	%xmm1, %xmm2
	movdqa	%xmm1, %xmm0
	punpcklbw	%xmm2, %xmm0
	punpckhbw	%xmm2, %xmm1
	pcmpgtw	%xmm0, %xmm10
	movdqa	%xmm0, %xmm2
	punpcklwd	%xmm10, %xmm2
	punpckhwd	%xmm10, %xmm0
	movdqa	%xmm3, %xmm10
	paddd	%xmm8, %xmm2
	movdqa	%xmm1, %xmm8
	paddd	%xmm0, %xmm2
	movdqa	%xmm3, %xmm0
	pcmpgtw	%xmm1, %xmm0
	punpcklwd	%xmm0, %xmm8
	punpckhwd	%xmm0, %xmm1
	movdqu	-16(%rax), %xmm0
	paddd	%xmm8, %xmm2
	pcmpeqb	%xmm6, %xmm0
	paddd	%xmm1, %xmm2
	movdqa	%xmm2, %xmm8
	movdqa	%xmm4, %xmm2
	pand	%xmm5, %xmm0
	pcmpgtb	%xmm0, %xmm2
	movdqa	%xmm0, %xmm1
	punpcklbw	%xmm2, %xmm1
	punpckhbw	%xmm2, %xmm0
	pcmpgtw	%xmm1, %xmm10
	movdqa	%xmm1, %xmm2
	punpcklwd	%xmm10, %xmm2
	punpckhwd	%xmm10, %xmm1
	paddd	%xmm9, %xmm2
	movdqa	%xmm0, %xmm9
	paddd	%xmm1, %xmm2
	movdqa	%xmm3, %xmm1
	pcmpgtw	%xmm0, %xmm1
	punpcklwd	%xmm1, %xmm9
	punpckhwd	%xmm1, %xmm0
	paddd	%xmm9, %xmm2
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm9
	cmpq	%rax, %rdx
	jne	.L7
	movdqa	%xmm2, %xmm0
	movl	%edi, %eax
	psrldq	$8, %xmm0
	andl	$-16, %eax
	paddd	%xmm2, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	movdqa	%xmm8, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm8
	movdqa	%xmm8, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm8
	movd	%xmm8, %ecx
	testb	$15, %dil
	je	.L8
.L6:
	cltq
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L22:
	cmpb	$66, %sil
	sete	%sil
	addq	$1, %rax
	movzbl	%sil, %esi
	addl	%esi, %edx
	cmpl	%eax, %edi
	jle	.L8
.L11:
	movzbl	(%rbx,%rax), %esi
	cmpb	$82, %sil
	jne	.L22
	addq	$1, %rax
	addl	$1, %ecx
	cmpl	%eax, %edi
	jg	.L11
.L8:
	cmpl	%edx, %ecx
	jle	.L5
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
.L14:
	movq	-24(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	movq	-8(%rbp), %rbx
	xorl	%eax, %eax
	leave
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L5:
	.cfi_restore_state
	leaq	.LC6(%rip), %rdi
	call	puts@PLT
	jmp	.L14
.L26:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L16:
	xorl	%eax, %eax
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L6
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.align 16
.LC3:
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.align 16
.LC4:
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.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	"%d"
.LC1:
	.string	"%s"
.LC5:
	.string	"Yes"
.LC6:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	leaq	-28(%rbp), %rsi
	subq	$24, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-28(%rbp), %rax
	movq	%rsp, %rcx
	addq	$15, %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L25:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L25
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L26
.L4:
	leaq	.LC1(%rip), %rdi
	movq	%rsp, %rsi
	xorl	%eax, %eax
	movq	%rsp, %rbx
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %edi
	testl	%edi, %edi
	jle	.L5
	leal	-1(%rdi), %eax
	cmpl	$14, %eax
	jbe	.L16
	movl	%edi, %edx
	pxor	%xmm9, %xmm9
	movdqa	.LC2(%rip), %xmm7
	movdqa	.LC3(%rip), %xmm5
	shrl	$4, %edx
	movdqa	%xmm9, %xmm8
	pxor	%xmm4, %xmm4
	movq	%rsp, %rax
	salq	$4, %rdx
	movdqa	.LC4(%rip), %xmm6
	pxor	%xmm3, %xmm3
	addq	%rsp, %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	movdqu	(%rax), %xmm1
	movdqa	%xmm4, %xmm2
	movdqa	%xmm3, %xmm10
	addq	$16, %rax
	pcmpeqb	%xmm7, %xmm1
	pand	%xmm5, %xmm1
	pcmpgtb	%xmm1, %xmm2
	movdqa	%xmm1, %xmm0
	punpcklbw	%xmm2, %xmm0
	punpckhbw	%xmm2, %xmm1
	pcmpgtw	%xmm0, %xmm10
	movdqa	%xmm0, %xmm2
	punpcklwd	%xmm10, %xmm2
	punpckhwd	%xmm10, %xmm0
	movdqa	%xmm3, %xmm10
	paddd	%xmm8, %xmm2
	movdqa	%xmm1, %xmm8
	paddd	%xmm0, %xmm2
	movdqa	%xmm3, %xmm0
	pcmpgtw	%xmm1, %xmm0
	punpcklwd	%xmm0, %xmm8
	punpckhwd	%xmm0, %xmm1
	movdqu	-16(%rax), %xmm0
	paddd	%xmm8, %xmm2
	pcmpeqb	%xmm6, %xmm0
	paddd	%xmm1, %xmm2
	movdqa	%xmm2, %xmm8
	movdqa	%xmm4, %xmm2
	pand	%xmm5, %xmm0
	pcmpgtb	%xmm0, %xmm2
	movdqa	%xmm0, %xmm1
	punpcklbw	%xmm2, %xmm1
	punpckhbw	%xmm2, %xmm0
	pcmpgtw	%xmm1, %xmm10
	movdqa	%xmm1, %xmm2
	punpcklwd	%xmm10, %xmm2
	punpckhwd	%xmm10, %xmm1
	paddd	%xmm9, %xmm2
	movdqa	%xmm0, %xmm9
	paddd	%xmm1, %xmm2
	movdqa	%xmm3, %xmm1
	pcmpgtw	%xmm0, %xmm1
	punpcklwd	%xmm1, %xmm9
	punpckhwd	%xmm1, %xmm0
	paddd	%xmm9, %xmm2
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm9
	cmpq	%rax, %rdx
	jne	.L7
	movdqa	%xmm2, %xmm0
	movl	%edi, %eax
	psrldq	$8, %xmm0
	andl	$-16, %eax
	paddd	%xmm2, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	movdqa	%xmm8, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm8
	movdqa	%xmm8, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm8
	movd	%xmm8, %ecx
	testb	$15, %dil
	je	.L8
.L6:
	cltq
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L22:
	cmpb	$66, %sil
	sete	%sil
	addq	$1, %rax
	movzbl	%sil, %esi
	addl	%esi, %edx
	cmpl	%eax, %edi
	jle	.L8
.L11:
	movzbl	(%rbx,%rax), %esi
	cmpb	$82, %sil
	jne	.L22
	addq	$1, %rax
	addl	$1, %ecx
	cmpl	%eax, %edi
	jg	.L11
.L8:
	cmpl	%edx, %ecx
	jle	.L5
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
.L14:
	movq	-24(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	movq	-8(%rbp), %rbx
	xorl	%eax, %eax
	leave
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L5:
	.cfi_restore_state
	leaq	.LC6(%rip), %rdi
	call	puts@PLT
	jmp	.L14
.L26:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L16:
	xorl	%eax, %eax
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L6
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.byte	82
	.align 16
.LC3:
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.align 16
.LC4:
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.byte	66
	.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()
// {
//     int n;
//     int m;

//     scanf("%d %d",&n,&m);

//     int a[n];
//     int b[n];
//     int temp=0;

//     for (int i = 0; i < n; i++)
//     {
//         scanf("%d %d",&a[i],&b[i]);
//     }
    
//     // for (int i = 0; i < n-1; i++)
//     // {
//     //     if(a[i]<a[i+1]){
//     //         temp=a[i];
//     //         a[i]=a[i+1];
//     //         a[i+1]=temp;
//     //         temp=b[i];
//     //         b[i]=b[i+1];
//     //         b[i+1]=temp;
//     //     }
//     // }
//     int flag=1;

//     while(flag==1){
//         flag=0;
//         for (int i = 0; i < n-1; i++)
//         {
//             if(a[i]<a[i+1]){
//                 flag=1;
//                 temp=a[i];
//                 a[i]=a[i+1];
//                 a[i+1]=temp;
//                 temp=b[i];
//                 b[i]=b[i+1];
//                 b[i+1]=temp;
//             }
//         }
//     }

//     int total=0;
//     int k=m;
//     int i=0;

//     int u=0;
//     while(k>0){
//         k=k-b[i];
//         i++;
//     }

//     for (int j = 0; j < i; ++i)
//     {
//         total=total+a[j]*b[j];
//         u=m-b[j];
//     }
//     total=total+a[i]*u;
//     printf("%d\n",total);
//     return 0;
// }

#include <stdio.h>
int main(int argc, char const *argv[])
{
    int n;
    scanf("%d",&n);
    char str[n];
    scanf("%s",&str);
    int rcount=0;
    int bcount=0;
    for (int i = 0; i < n; ++i)
    {
        if (str[i]=='R')
        {
            rcount++;
        }else if (str[i]=='B')
        {
            bcount++;
        }
    }
    if (rcount>bcount)
    {
        printf("Yes\n");
    }else{
        printf("No\n");
    }
    return 0;
}
4
RBRR
 4
BBRR
 4
RRCR
 4
RRAR
 4
RARR
 4
BQBR
 4
RCRR
 4
BPBR
 4
RRRC
 4
AQBR

Yes
 No
 Yes
 Yes
 Yes
 No
 Yes
 No
 Yes
 No

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()
// {
//     int n;
//     int m;

//     scanf("%d %d",&n,&m);

//     int a[n];
//     int b[n];
//     int temp=0;

//     for (int i = 0; i < n; i++)
//     {
//         scanf("%d %d",&a[i],&b[i]);
//     }
    
//     // for (int i = 0; i < n-1; i++)
//     // {
//     //     if(a[i]<a[i+1]){
//     //         temp=a[i];
//     //         a[i]=a[i+1];
//     //         a[i+1]=temp;
//     //         temp=b[i];
//     //         b[i]=b[i+1];
//     //         b[i+1]=temp;
//     //     }
//     // }
//     int flag=1;

//     while(flag==1){
//         flag=0;
//         for (int i = 0; i < n-1; i++)
//         {
//             if(a[i]<a[i+1]){
//                 flag=1;
//                 temp=a[i];
//                 a[i]=a[i+1];
//                 a[i+1]=temp;
//                 temp=b[i];
//                 b[i]=b[i+1];
//                 b[i+1]=temp;
//             }
//         }
//     }

//     int total=0;
//     int k=m;
//     int i=0;

//     int u=0;
//     while(k>0){
//         k=k-b[i];
//         i++;
//     }

//     for (int j = 0; j < i; ++i)
//     {
//         total=total+a[j]*b[j];
//         u=m-b[j];
//     }
//     total=total+a[i]*u;
//     printf("%d\n",total);
//     return 0;
// }

#include <stdio.h>
int main(int argc, char const *argv[])
{
    int n;
    scanf("%d",&n);
    char str[n];
    scanf("%s",&str);
    int rcount=0;
    int bcount=0;
    for (int i = 0; i < n; ++i)
    {
        if (str[i]=='R')
        {
            rcount++;
        }else if (str[i]=='B')
        {
            bcount++;
        }
    }
    if (rcount>bcount)
    {
        printf("Yes\n");
    }else{
        printf("No\n");
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Yes"
.LC3:
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movl	%edi, -100(%rbp)
	movq	%rsi, -112(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-88(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-88(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	movl	$16, %edx
	subq	$1, %rdx
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -84(%rbp)
	movl	$0, -80(%rbp)
	movl	$0, -76(%rbp)
	jmp	.L5
.L8:
	movq	-64(%rbp), %rdx
	movl	-76(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %eax
	cmpb	$82, %al
	jne	.L6
	addl	$1, -84(%rbp)
	jmp	.L7
.L6:
	movq	-64(%rbp), %rdx
	movl	-76(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %eax
	cmpb	$66, %al
	jne	.L7
	addl	$1, -80(%rbp)
.L7:
	addl	$1, -76(%rbp)
.L5:
	movl	-88(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L8
	movl	-84(%rbp), %eax
	cmpl	-80(%rbp), %eax
	jle	.L9
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L10
.L9:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L10:
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Yes"
.LC3:
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movl	%edi, -100(%rbp)
	movq	%rsi, -112(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-88(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-88(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	movl	$16, %edx
	subq	$1, %rdx
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -84(%rbp)
	movl	$0, -80(%rbp)
	movl	$0, -76(%rbp)
	jmp	.L5
.L8:
	movq	-64(%rbp), %rdx
	movl	-76(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %eax
	cmpb	$82, %al
	jne	.L6
	addl	$1, -84(%rbp)
	jmp	.L7
.L6:
	movq	-64(%rbp), %rdx
	movl	-76(%rbp), %eax
	cltq
	movzbl	(%rdx,%rax), %eax
	cmpb	$66, %al
	jne	.L7
	addl	$1, -80(%rbp)
.L7:
	addl	$1, -76(%rbp)
.L5:
	movl	-88(%rbp), %eax
	cmpl	%eax, -76(%rbp)
	jl	.L8
	movl	-84(%rbp), %eax
	cmpl	-80(%rbp), %eax
	jle	.L9
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L10
.L9:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L10:
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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:
