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){
	int n,m,i,j,k,a,b,min=999999999,ans=0;
	scanf("%d %d",&n,&m);
	char map[n][m+1];
	for(i=0;i<n;i++){
		scanf("%s",map[i]);
	}
	
	
	for(a=0;a<=n-3;a++){
		for(b=a+1;b<=n-2;b++){
			
			for(i=0;i<=a;i++){
				for(j=0;j<m;j++){
					if(map[i][j]!='W')ans++;
				}
			}
			
			for(i=a+1;i<=b;i++){
				for(j=0;j<m;j++){
					if(map[i][j]!='B')ans++;
				}
			}
			
			for(i=b+1;i<n;i++){
				for(j=0;j<m;j++){
					if(map[i][j]!='R')ans++;
				}
			}
			
			if(ans<min)min=ans;
			ans=0;
		}
	}
	
	
	
	printf("%d\n",min);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -168(%rbp)
	movl	$999999999, -88(%rbp)
	movl	$0, -84(%rbp)
	leaq	-108(%rbp), %rdx
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-108(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-112(%rbp), %esi
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%ecx, %rbx
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -72(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -128(%rbp)
	movq	$0, -120(%rbp)
	movslq	%esi, %rax
	movq	%rax, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	-128(%rbp), %r8
	movq	-120(%rbp), %r9
	movq	%r9, %rdx
	movq	-144(%rbp), %r10
	movq	-136(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%esi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movslq	%ecx, %rdx
	movslq	%esi, %rax
	imulq	%rdx, %rax
	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)
	movl	$0, -104(%rbp)
	jmp	.L5
.L6:
	movl	-104(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -104(%rbp)
.L5:
	movl	-112(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L6
	movl	$0, -96(%rbp)
	jmp	.L7
.L26:
	movl	-96(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -92(%rbp)
	jmp	.L8
.L25:
	movl	$0, -104(%rbp)
	jmp	.L9
.L13:
	movl	$0, -100(%rbp)
	jmp	.L10
.L12:
	movq	-64(%rbp), %rcx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movl	-104(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$87, %al
	je	.L11
	addl	$1, -84(%rbp)
.L11:
	addl	$1, -100(%rbp)
.L10:
	movl	-108(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L12
	addl	$1, -104(%rbp)
.L9:
	movl	-104(%rbp), %eax
	cmpl	-96(%rbp), %eax
	jle	.L13
	movl	-96(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -104(%rbp)
	jmp	.L14
.L18:
	movl	$0, -100(%rbp)
	jmp	.L15
.L17:
	movq	-64(%rbp), %rcx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movl	-104(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$66, %al
	je	.L16
	addl	$1, -84(%rbp)
.L16:
	addl	$1, -100(%rbp)
.L15:
	movl	-108(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L17
	addl	$1, -104(%rbp)
.L14:
	movl	-104(%rbp), %eax
	cmpl	-92(%rbp), %eax
	jle	.L18
	movl	-92(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -104(%rbp)
	jmp	.L19
.L23:
	movl	$0, -100(%rbp)
	jmp	.L20
.L22:
	movq	-64(%rbp), %rcx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movl	-104(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$82, %al
	je	.L21
	addl	$1, -84(%rbp)
.L21:
	addl	$1, -100(%rbp)
.L20:
	movl	-108(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L22
	addl	$1, -104(%rbp)
.L19:
	movl	-112(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L23
	movl	-84(%rbp), %eax
	cmpl	-88(%rbp), %eax
	jge	.L24
	movl	-84(%rbp), %eax
	movl	%eax, -88(%rbp)
.L24:
	movl	$0, -84(%rbp)
	addl	$1, -92(%rbp)
.L8:
	movl	-112(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -92(%rbp)
	jl	.L25
	addl	$1, -96(%rbp)
.L7:
	movl	-112(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -96(%rbp)
	jl	.L26
	movl	-88(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-168(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	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 %d"
.LC1:
	.string	"%s"
.LC6:
	.string	"%d\n"
	.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	%r15
	pushq	%r14
	leaq	-60(%rbp), %rdx
	leaq	-64(%rbp), %rsi
	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
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %ebx
	movslq	-64(%rbp), %rax
	movq	%rsp, %rcx
	leal	1(%rbx), %r12d
	movl	%eax, -76(%rbp)
	movslq	%r12d, %r12
	imulq	%r12, %rax
	addq	$15, %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L97:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L97
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L98
.L4:
	cmpl	$0, -76(%rbp)
	movq	%rsp, %rbx
	jle	.L5
	movq	%rsp, %r14
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %r15
.L6:
	movq	%r14, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	-64(%rbp), %eax
	addq	%r12, %r14
	movl	%eax, -76(%rbp)
	cmpl	%r13d, %eax
	jg	.L6
.L5:
	movl	-76(%rbp), %esi
	leal	-2(%rsi), %eax
	movl	%eax, -108(%rbp)
	testl	%eax, %eax
	jle	.L79
	movl	-60(%rbp), %edx
	leal	-1(%rsi), %eax
	movl	$999999999, -80(%rbp)
	movl	%eax, -92(%rbp)
	leaq	(%rbx,%r12), %rax
	movdqa	.LC2(%rip), %xmm5
	movq	%rax, -104(%rbp)
	movl	%edx, %eax
	movl	%edx, %r8d
	movdqa	.LC3(%rip), %xmm3
	shrl	$4, %eax
	movl	$0, -88(%rbp)
	leal	-1(%rdx), %r10d
	andl	$-16, %r8d
	subl	$1, %eax
	movdqa	.LC4(%rip), %xmm4
	salq	$4, %rax
	movq	%rax, -72(%rbp)
.L77:
	movl	-88(%rbp), %eax
	movl	%eax, -96(%rbp)
	addl	$1, %eax
	movl	%eax, -88(%rbp)
	cmpl	%eax, -92(%rbp)
	jle	.L8
	movdqa	.LC3(%rip), %xmm6
	movl	%eax, %r9d
	.p2align 4,,10
	.p2align 3
.L76:
	movq	-72(%rbp), %rsi
	movl	%r9d, -84(%rbp)
	movq	%rbx, %r13
	xorl	%eax, %eax
	movl	-96(%rbp), %r9d
	xorl	%r11d, %r11d
	pxor	%xmm8, %xmm8
	pxor	%xmm7, %xmm7
	leaq	16(%rsi), %r15
	.p2align 4,,10
	.p2align 3
.L29:
	testl	%edx, %edx
	jle	.L9
	cmpl	$14, %r10d
	jbe	.L80
	leaq	(%r15,%r13), %rsi
	movq	%r13, %rcx
	pxor	%xmm1, %xmm1
	.p2align 4,,10
	.p2align 3
.L11:
	movdqu	(%rcx), %xmm0
	movdqa	%xmm8, %xmm2
	movdqa	%xmm7, %xmm10
	addq	$16, %rcx
	pcmpeqb	%xmm5, %xmm0
	pandn	%xmm6, %xmm0
	pcmpgtb	%xmm0, %xmm2
	movdqa	%xmm0, %xmm9
	punpcklbw	%xmm2, %xmm9
	punpckhbw	%xmm2, %xmm0
	pcmpgtw	%xmm9, %xmm10
	movdqa	%xmm9, %xmm2
	punpcklwd	%xmm10, %xmm2
	punpckhwd	%xmm10, %xmm9
	paddd	%xmm2, %xmm1
	movdqa	%xmm7, %xmm2
	pcmpgtw	%xmm0, %xmm2
	paddd	%xmm9, %xmm1
	movdqa	%xmm0, %xmm9
	punpcklwd	%xmm2, %xmm9
	punpckhwd	%xmm2, %xmm0
	paddd	%xmm9, %xmm1
	paddd	%xmm0, %xmm1
	cmpq	%rsi, %rcx
	jne	.L11
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ecx
	addl	%ecx, %eax
	cmpl	%r8d, %edx
	je	.L9
	movl	%r8d, %ecx
.L10:
	movslq	%r11d, %r14
	movslq	%ecx, %rdi
	movq	%r14, %rsi
	addq	%rbx, %rdi
	imulq	%r12, %rsi
	cmpb	$87, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	1(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L9
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$87, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	2(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L9
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$87, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	3(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L9
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$87, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	4(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L9
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$87, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	5(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L9
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$87, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	6(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L9
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$87, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	7(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L9
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$87, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	8(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L9
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$87, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	9(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L9
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$87, (%rdi,%rsi)
	setne	%sil
	movzbl	%sil, %esi
	addl	%esi, %eax
	leal	10(%rcx), %esi
	cmpl	%esi, %edx
	jle	.L9
	imulq	%r12, %r14
	movslq	%esi, %rsi
	addq	%rbx, %rsi
	cmpb	$87, (%rsi,%r14)
	setne	%sil
	movzbl	%sil, %esi
	addl	%esi, %eax
	leal	11(%rcx), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	addq	%rbx, %rsi
	cmpb	$87, (%rsi,%r14)
	setne	%sil
	movzbl	%sil, %esi
	addl	%esi, %eax
	leal	12(%rcx), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	addq	%rbx, %rsi
	cmpb	$87, (%rsi,%r14)
	setne	%sil
	movzbl	%sil, %esi
	addl	%esi, %eax
	leal	13(%rcx), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	addq	%rbx, %rsi
	cmpb	$87, (%rsi,%r14)
	setne	%sil
	addl	$14, %ecx
	movzbl	%sil, %esi
	addl	%esi, %eax
	cmpl	%ecx, %edx
	jle	.L9
	movslq	%ecx, %rcx
	addq	%rbx, %rcx
	cmpb	$87, (%rcx,%r14)
	setne	%cl
	movzbl	%cl, %ecx
	addl	%ecx, %eax
	.p2align 4,,10
	.p2align 3
.L9:
	leal	1(%r11), %ecx
	addq	%r12, %r13
	cmpl	%r9d, %r11d
	je	.L99
	movl	%ecx, %r11d
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L99:
	movq	-72(%rbp), %rsi
	movl	-84(%rbp), %r9d
	pxor	%xmm8, %xmm8
	pxor	%xmm7, %xmm7
	movq	-104(%rbp), %r13
	movl	-88(%rbp), %r11d
	leaq	16(%rsi), %r15
	.p2align 4,,10
	.p2align 3
.L31:
	testl	%edx, %edx
	jle	.L53
	cmpl	$14, %r10d
	jbe	.L82
	leaq	(%r15,%r13), %rsi
	movq	%r13, %rcx
	pxor	%xmm1, %xmm1
	.p2align 4,,10
	.p2align 3
.L35:
	movdqu	(%rcx), %xmm0
	movdqa	%xmm8, %xmm2
	movdqa	%xmm7, %xmm10
	addq	$16, %rcx
	pcmpeqb	%xmm4, %xmm0
	pandn	%xmm3, %xmm0
	pcmpgtb	%xmm0, %xmm2
	movdqa	%xmm0, %xmm9
	punpcklbw	%xmm2, %xmm9
	punpckhbw	%xmm2, %xmm0
	pcmpgtw	%xmm9, %xmm10
	movdqa	%xmm9, %xmm2
	punpcklwd	%xmm10, %xmm2
	punpckhwd	%xmm10, %xmm9
	paddd	%xmm2, %xmm1
	movdqa	%xmm7, %xmm2
	pcmpgtw	%xmm0, %xmm2
	paddd	%xmm9, %xmm1
	movdqa	%xmm0, %xmm9
	punpcklwd	%xmm2, %xmm9
	punpckhwd	%xmm2, %xmm0
	paddd	%xmm9, %xmm1
	paddd	%xmm0, %xmm1
	cmpq	%rsi, %rcx
	jne	.L35
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ecx
	addl	%ecx, %eax
	cmpl	%r8d, %edx
	je	.L53
	movl	%r8d, %ecx
.L34:
	movslq	%r11d, %rsi
	movslq	%ecx, %r14
	movq	%rsi, %rdi
	addq	%rbx, %r14
	imulq	%r12, %rdi
	cmpb	$66, (%r14,%rdi)
	setne	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %eax
	leal	1(%rcx), %r14d
	cmpl	%r14d, %edx
	jle	.L53
	movslq	%r14d, %r14
	addq	%rbx, %r14
	cmpb	$66, (%r14,%rdi)
	setne	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %eax
	leal	2(%rcx), %r14d
	cmpl	%r14d, %edx
	jle	.L53
	movslq	%r14d, %r14
	addq	%rbx, %r14
	cmpb	$66, (%r14,%rdi)
	setne	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %eax
	leal	3(%rcx), %r14d
	cmpl	%r14d, %edx
	jle	.L53
	movslq	%r14d, %r14
	addq	%rbx, %r14
	cmpb	$66, (%r14,%rdi)
	setne	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %eax
	leal	4(%rcx), %r14d
	cmpl	%r14d, %edx
	jle	.L53
	movslq	%r14d, %r14
	addq	%rbx, %r14
	cmpb	$66, (%r14,%rdi)
	setne	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %eax
	leal	5(%rcx), %r14d
	cmpl	%r14d, %edx
	jle	.L53
	movslq	%r14d, %r14
	addq	%rbx, %r14
	cmpb	$66, (%r14,%rdi)
	setne	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %eax
	leal	6(%rcx), %r14d
	cmpl	%r14d, %edx
	jle	.L53
	movslq	%r14d, %r14
	addq	%rbx, %r14
	cmpb	$66, (%r14,%rdi)
	setne	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %eax
	leal	7(%rcx), %r14d
	cmpl	%r14d, %edx
	jle	.L53
	movslq	%r14d, %r14
	addq	%rbx, %r14
	cmpb	$66, (%r14,%rdi)
	setne	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %eax
	leal	8(%rcx), %r14d
	cmpl	%r14d, %edx
	jle	.L53
	movslq	%r14d, %r14
	addq	%rbx, %r14
	cmpb	$66, (%r14,%rdi)
	setne	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %eax
	leal	9(%rcx), %r14d
	cmpl	%r14d, %edx
	jle	.L53
	movslq	%r14d, %r14
	addq	%rbx, %r14
	cmpb	$66, (%r14,%rdi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	10(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L53
	imulq	%r12, %rsi
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$66, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	11(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L53
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$66, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	12(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L53
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$66, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	13(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L53
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$66, (%rdi,%rsi)
	setne	%dil
	addl	$14, %ecx
	movzbl	%dil, %edi
	addl	%edi, %eax
	cmpl	%ecx, %edx
	jle	.L53
	movslq	%ecx, %rcx
	addq	%rbx, %rcx
	cmpb	$66, (%rcx,%rsi)
	setne	%cl
	movzbl	%cl, %ecx
	addl	%ecx, %eax
	.p2align 4,,10
	.p2align 3
.L53:
	addl	$1, %r11d
	addq	%r12, %r13
	cmpl	%r11d, %r9d
	jge	.L31
	addl	$1, %r9d
	cmpl	-76(%rbp), %r9d
	jge	.L33
	movslq	%r9d, %r11
	movq	-72(%rbp), %rsi
	movl	%r9d, -84(%rbp)
	movl	%r9d, %r13d
	imulq	%r12, %r11
	movl	-76(%rbp), %r9d
	pxor	%xmm8, %xmm8
	movdqa	.LC5(%rip), %xmm9
	leaq	16(%rsi), %r15
	pxor	%xmm7, %xmm7
	addq	%rbx, %r11
	.p2align 4,,10
	.p2align 3
.L55:
	testl	%edx, %edx
	jle	.L75
	cmpl	$14, %r10d
	jbe	.L83
	leaq	(%r15,%r11), %rsi
	movq	%r11, %rcx
	pxor	%xmm1, %xmm1
	.p2align 4,,10
	.p2align 3
.L57:
	movdqu	(%rcx), %xmm0
	movdqa	%xmm8, %xmm2
	movdqa	%xmm7, %xmm11
	addq	$16, %rcx
	pcmpeqb	%xmm9, %xmm0
	pandn	%xmm3, %xmm0
	pcmpgtb	%xmm0, %xmm2
	movdqa	%xmm0, %xmm10
	punpcklbw	%xmm2, %xmm10
	punpckhbw	%xmm2, %xmm0
	pcmpgtw	%xmm10, %xmm11
	movdqa	%xmm10, %xmm2
	punpcklwd	%xmm11, %xmm2
	punpckhwd	%xmm11, %xmm10
	paddd	%xmm2, %xmm1
	movdqa	%xmm7, %xmm2
	pcmpgtw	%xmm0, %xmm2
	paddd	%xmm10, %xmm1
	movdqa	%xmm0, %xmm10
	punpcklwd	%xmm2, %xmm10
	punpckhwd	%xmm2, %xmm0
	paddd	%xmm10, %xmm1
	paddd	%xmm0, %xmm1
	cmpq	%rsi, %rcx
	jne	.L57
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ecx
	addl	%ecx, %eax
	cmpl	%r8d, %edx
	je	.L75
	movl	%r8d, %ecx
.L56:
	movslq	%r13d, %r14
	movslq	%ecx, %rdi
	movq	%r14, %rsi
	addq	%rbx, %rdi
	imulq	%r12, %rsi
	cmpb	$82, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	1(%rcx), %edi
	cmpl	%edx, %edi
	jge	.L75
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$82, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	2(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L75
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$82, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	3(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L75
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$82, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	4(%rcx), %edi
	cmpl	%edx, %edi
	jge	.L75
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$82, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	5(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L75
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$82, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	6(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L75
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$82, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	7(%rcx), %edi
	cmpl	%edx, %edi
	jge	.L75
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$82, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	8(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L75
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$82, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	9(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L75
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$82, (%rdi,%rsi)
	setne	%sil
	movzbl	%sil, %esi
	addl	%esi, %eax
	leal	10(%rcx), %esi
	cmpl	%esi, %edx
	jle	.L75
	imulq	%r12, %r14
	movslq	%esi, %rsi
	addq	%rbx, %rsi
	cmpb	$82, (%rsi,%r14)
	setne	%sil
	movzbl	%sil, %esi
	addl	%esi, %eax
	leal	11(%rcx), %esi
	cmpl	%esi, %edx
	jle	.L75
	movslq	%esi, %rsi
	addq	%rbx, %rsi
	cmpb	$82, (%rsi,%r14)
	setne	%sil
	movzbl	%sil, %esi
	addl	%esi, %eax
	leal	12(%rcx), %esi
	cmpl	%esi, %edx
	jle	.L75
	movslq	%esi, %rsi
	addq	%rbx, %rsi
	cmpb	$82, (%rsi,%r14)
	setne	%sil
	movzbl	%sil, %esi
	addl	%esi, %eax
	leal	13(%rcx), %esi
	cmpl	%esi, %edx
	jle	.L75
	movslq	%esi, %rsi
	addq	%rbx, %rsi
	cmpb	$82, (%rsi,%r14)
	setne	%sil
	addl	$14, %ecx
	movzbl	%sil, %esi
	addl	%esi, %eax
	cmpl	%ecx, %edx
	jle	.L75
	movslq	%ecx, %rcx
	addq	%rbx, %rcx
	cmpb	$82, (%rcx,%r14)
	setne	%cl
	movzbl	%cl, %ecx
	addl	%ecx, %eax
	.p2align 4,,10
	.p2align 3
.L75:
	addl	$1, %r13d
	addq	%r12, %r11
	cmpl	%r13d, %r9d
	jne	.L55
	movl	-84(%rbp), %r9d
.L33:
	movl	-80(%rbp), %esi
	cmpl	%eax, %esi
	cmovle	%esi, %eax
	movl	%eax, -80(%rbp)
	cmpl	-92(%rbp), %r9d
	jne	.L76
.L8:
	addq	%r12, -104(%rbp)
	movl	-88(%rbp), %esi
	cmpl	%esi, -108(%rbp)
	jne	.L77
.L7:
	movl	-80(%rbp), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC6(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L100
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L83:
	.cfi_restore_state
	xorl	%ecx, %ecx
	jmp	.L56
.L80:
	xorl	%ecx, %ecx
	jmp	.L10
.L82:
	xorl	%ecx, %ecx
	jmp	.L34
.L98:
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L79:
	movl	$999999999, -80(%rbp)
	jmp	.L7
.L100:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.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
	.align 16
.LC5:
	.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
	.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 %d"
.LC1:
	.string	"%s"
.LC6:
	.string	"%d\n"
	.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	%r15
	pushq	%r14
	leaq	-60(%rbp), %rdx
	leaq	-64(%rbp), %rsi
	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
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %ebx
	movslq	-64(%rbp), %rax
	movq	%rsp, %rcx
	leal	1(%rbx), %r12d
	movl	%eax, -76(%rbp)
	movslq	%r12d, %r12
	imulq	%r12, %rax
	addq	$15, %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L97:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L97
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L98
.L4:
	cmpl	$0, -76(%rbp)
	movq	%rsp, %rbx
	jle	.L5
	movq	%rsp, %r14
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %r15
.L6:
	movq	%r14, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	-64(%rbp), %eax
	addq	%r12, %r14
	movl	%eax, -76(%rbp)
	cmpl	%r13d, %eax
	jg	.L6
.L5:
	movl	-76(%rbp), %esi
	leal	-2(%rsi), %eax
	movl	%eax, -108(%rbp)
	testl	%eax, %eax
	jle	.L79
	movl	-60(%rbp), %edx
	leal	-1(%rsi), %eax
	movl	$999999999, -80(%rbp)
	movl	%eax, -92(%rbp)
	leaq	(%rbx,%r12), %rax
	movdqa	.LC2(%rip), %xmm5
	movq	%rax, -104(%rbp)
	movl	%edx, %eax
	movl	%edx, %r8d
	movdqa	.LC3(%rip), %xmm3
	shrl	$4, %eax
	movl	$0, -88(%rbp)
	leal	-1(%rdx), %r10d
	andl	$-16, %r8d
	subl	$1, %eax
	movdqa	.LC4(%rip), %xmm4
	salq	$4, %rax
	movq	%rax, -72(%rbp)
.L77:
	movl	-88(%rbp), %eax
	movl	%eax, -96(%rbp)
	addl	$1, %eax
	movl	%eax, -88(%rbp)
	cmpl	%eax, -92(%rbp)
	jle	.L8
	movdqa	.LC3(%rip), %xmm6
	movl	%eax, %r9d
	.p2align 4,,10
	.p2align 3
.L76:
	movq	-72(%rbp), %rsi
	movl	%r9d, -84(%rbp)
	movq	%rbx, %r13
	xorl	%eax, %eax
	movl	-96(%rbp), %r9d
	xorl	%r11d, %r11d
	pxor	%xmm8, %xmm8
	pxor	%xmm7, %xmm7
	leaq	16(%rsi), %r15
	.p2align 4,,10
	.p2align 3
.L29:
	testl	%edx, %edx
	jle	.L9
	cmpl	$14, %r10d
	jbe	.L80
	leaq	(%r15,%r13), %rsi
	movq	%r13, %rcx
	pxor	%xmm1, %xmm1
	.p2align 4,,10
	.p2align 3
.L11:
	movdqu	(%rcx), %xmm0
	movdqa	%xmm8, %xmm2
	movdqa	%xmm7, %xmm10
	addq	$16, %rcx
	pcmpeqb	%xmm5, %xmm0
	pandn	%xmm6, %xmm0
	pcmpgtb	%xmm0, %xmm2
	movdqa	%xmm0, %xmm9
	punpcklbw	%xmm2, %xmm9
	punpckhbw	%xmm2, %xmm0
	pcmpgtw	%xmm9, %xmm10
	movdqa	%xmm9, %xmm2
	punpcklwd	%xmm10, %xmm2
	punpckhwd	%xmm10, %xmm9
	paddd	%xmm2, %xmm1
	movdqa	%xmm7, %xmm2
	pcmpgtw	%xmm0, %xmm2
	paddd	%xmm9, %xmm1
	movdqa	%xmm0, %xmm9
	punpcklwd	%xmm2, %xmm9
	punpckhwd	%xmm2, %xmm0
	paddd	%xmm9, %xmm1
	paddd	%xmm0, %xmm1
	cmpq	%rsi, %rcx
	jne	.L11
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ecx
	addl	%ecx, %eax
	cmpl	%r8d, %edx
	je	.L9
	movl	%r8d, %ecx
.L10:
	movslq	%r11d, %r14
	movslq	%ecx, %rdi
	movq	%r14, %rsi
	addq	%rbx, %rdi
	imulq	%r12, %rsi
	cmpb	$87, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	1(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L9
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$87, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	2(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L9
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$87, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	3(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L9
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$87, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	4(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L9
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$87, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	5(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L9
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$87, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	6(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L9
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$87, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	7(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L9
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$87, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	8(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L9
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$87, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	9(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L9
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$87, (%rdi,%rsi)
	setne	%sil
	movzbl	%sil, %esi
	addl	%esi, %eax
	leal	10(%rcx), %esi
	cmpl	%esi, %edx
	jle	.L9
	imulq	%r12, %r14
	movslq	%esi, %rsi
	addq	%rbx, %rsi
	cmpb	$87, (%rsi,%r14)
	setne	%sil
	movzbl	%sil, %esi
	addl	%esi, %eax
	leal	11(%rcx), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	addq	%rbx, %rsi
	cmpb	$87, (%rsi,%r14)
	setne	%sil
	movzbl	%sil, %esi
	addl	%esi, %eax
	leal	12(%rcx), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	addq	%rbx, %rsi
	cmpb	$87, (%rsi,%r14)
	setne	%sil
	movzbl	%sil, %esi
	addl	%esi, %eax
	leal	13(%rcx), %esi
	cmpl	%esi, %edx
	jle	.L9
	movslq	%esi, %rsi
	addq	%rbx, %rsi
	cmpb	$87, (%rsi,%r14)
	setne	%sil
	addl	$14, %ecx
	movzbl	%sil, %esi
	addl	%esi, %eax
	cmpl	%ecx, %edx
	jle	.L9
	movslq	%ecx, %rcx
	addq	%rbx, %rcx
	cmpb	$87, (%rcx,%r14)
	setne	%cl
	movzbl	%cl, %ecx
	addl	%ecx, %eax
	.p2align 4,,10
	.p2align 3
.L9:
	leal	1(%r11), %ecx
	addq	%r12, %r13
	cmpl	%r9d, %r11d
	je	.L99
	movl	%ecx, %r11d
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L99:
	movq	-72(%rbp), %rsi
	movl	-84(%rbp), %r9d
	pxor	%xmm8, %xmm8
	pxor	%xmm7, %xmm7
	movq	-104(%rbp), %r13
	movl	-88(%rbp), %r11d
	leaq	16(%rsi), %r15
	.p2align 4,,10
	.p2align 3
.L31:
	testl	%edx, %edx
	jle	.L53
	cmpl	$14, %r10d
	jbe	.L82
	leaq	(%r15,%r13), %rsi
	movq	%r13, %rcx
	pxor	%xmm1, %xmm1
	.p2align 4,,10
	.p2align 3
.L35:
	movdqu	(%rcx), %xmm0
	movdqa	%xmm8, %xmm2
	movdqa	%xmm7, %xmm10
	addq	$16, %rcx
	pcmpeqb	%xmm4, %xmm0
	pandn	%xmm3, %xmm0
	pcmpgtb	%xmm0, %xmm2
	movdqa	%xmm0, %xmm9
	punpcklbw	%xmm2, %xmm9
	punpckhbw	%xmm2, %xmm0
	pcmpgtw	%xmm9, %xmm10
	movdqa	%xmm9, %xmm2
	punpcklwd	%xmm10, %xmm2
	punpckhwd	%xmm10, %xmm9
	paddd	%xmm2, %xmm1
	movdqa	%xmm7, %xmm2
	pcmpgtw	%xmm0, %xmm2
	paddd	%xmm9, %xmm1
	movdqa	%xmm0, %xmm9
	punpcklwd	%xmm2, %xmm9
	punpckhwd	%xmm2, %xmm0
	paddd	%xmm9, %xmm1
	paddd	%xmm0, %xmm1
	cmpq	%rsi, %rcx
	jne	.L35
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ecx
	addl	%ecx, %eax
	cmpl	%r8d, %edx
	je	.L53
	movl	%r8d, %ecx
.L34:
	movslq	%r11d, %rsi
	movslq	%ecx, %r14
	movq	%rsi, %rdi
	addq	%rbx, %r14
	imulq	%r12, %rdi
	cmpb	$66, (%r14,%rdi)
	setne	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %eax
	leal	1(%rcx), %r14d
	cmpl	%r14d, %edx
	jle	.L53
	movslq	%r14d, %r14
	addq	%rbx, %r14
	cmpb	$66, (%r14,%rdi)
	setne	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %eax
	leal	2(%rcx), %r14d
	cmpl	%r14d, %edx
	jle	.L53
	movslq	%r14d, %r14
	addq	%rbx, %r14
	cmpb	$66, (%r14,%rdi)
	setne	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %eax
	leal	3(%rcx), %r14d
	cmpl	%r14d, %edx
	jle	.L53
	movslq	%r14d, %r14
	addq	%rbx, %r14
	cmpb	$66, (%r14,%rdi)
	setne	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %eax
	leal	4(%rcx), %r14d
	cmpl	%r14d, %edx
	jle	.L53
	movslq	%r14d, %r14
	addq	%rbx, %r14
	cmpb	$66, (%r14,%rdi)
	setne	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %eax
	leal	5(%rcx), %r14d
	cmpl	%r14d, %edx
	jle	.L53
	movslq	%r14d, %r14
	addq	%rbx, %r14
	cmpb	$66, (%r14,%rdi)
	setne	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %eax
	leal	6(%rcx), %r14d
	cmpl	%r14d, %edx
	jle	.L53
	movslq	%r14d, %r14
	addq	%rbx, %r14
	cmpb	$66, (%r14,%rdi)
	setne	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %eax
	leal	7(%rcx), %r14d
	cmpl	%r14d, %edx
	jle	.L53
	movslq	%r14d, %r14
	addq	%rbx, %r14
	cmpb	$66, (%r14,%rdi)
	setne	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %eax
	leal	8(%rcx), %r14d
	cmpl	%r14d, %edx
	jle	.L53
	movslq	%r14d, %r14
	addq	%rbx, %r14
	cmpb	$66, (%r14,%rdi)
	setne	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %eax
	leal	9(%rcx), %r14d
	cmpl	%r14d, %edx
	jle	.L53
	movslq	%r14d, %r14
	addq	%rbx, %r14
	cmpb	$66, (%r14,%rdi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	10(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L53
	imulq	%r12, %rsi
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$66, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	11(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L53
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$66, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	12(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L53
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$66, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	13(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L53
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$66, (%rdi,%rsi)
	setne	%dil
	addl	$14, %ecx
	movzbl	%dil, %edi
	addl	%edi, %eax
	cmpl	%ecx, %edx
	jle	.L53
	movslq	%ecx, %rcx
	addq	%rbx, %rcx
	cmpb	$66, (%rcx,%rsi)
	setne	%cl
	movzbl	%cl, %ecx
	addl	%ecx, %eax
	.p2align 4,,10
	.p2align 3
.L53:
	addl	$1, %r11d
	addq	%r12, %r13
	cmpl	%r11d, %r9d
	jge	.L31
	addl	$1, %r9d
	cmpl	-76(%rbp), %r9d
	jge	.L33
	movslq	%r9d, %r11
	movq	-72(%rbp), %rsi
	movl	%r9d, -84(%rbp)
	movl	%r9d, %r13d
	imulq	%r12, %r11
	movl	-76(%rbp), %r9d
	pxor	%xmm8, %xmm8
	movdqa	.LC5(%rip), %xmm9
	leaq	16(%rsi), %r15
	pxor	%xmm7, %xmm7
	addq	%rbx, %r11
	.p2align 4,,10
	.p2align 3
.L55:
	testl	%edx, %edx
	jle	.L75
	cmpl	$14, %r10d
	jbe	.L83
	leaq	(%r15,%r11), %rsi
	movq	%r11, %rcx
	pxor	%xmm1, %xmm1
	.p2align 4,,10
	.p2align 3
.L57:
	movdqu	(%rcx), %xmm0
	movdqa	%xmm8, %xmm2
	movdqa	%xmm7, %xmm11
	addq	$16, %rcx
	pcmpeqb	%xmm9, %xmm0
	pandn	%xmm3, %xmm0
	pcmpgtb	%xmm0, %xmm2
	movdqa	%xmm0, %xmm10
	punpcklbw	%xmm2, %xmm10
	punpckhbw	%xmm2, %xmm0
	pcmpgtw	%xmm10, %xmm11
	movdqa	%xmm10, %xmm2
	punpcklwd	%xmm11, %xmm2
	punpckhwd	%xmm11, %xmm10
	paddd	%xmm2, %xmm1
	movdqa	%xmm7, %xmm2
	pcmpgtw	%xmm0, %xmm2
	paddd	%xmm10, %xmm1
	movdqa	%xmm0, %xmm10
	punpcklwd	%xmm2, %xmm10
	punpckhwd	%xmm2, %xmm0
	paddd	%xmm10, %xmm1
	paddd	%xmm0, %xmm1
	cmpq	%rsi, %rcx
	jne	.L57
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ecx
	addl	%ecx, %eax
	cmpl	%r8d, %edx
	je	.L75
	movl	%r8d, %ecx
.L56:
	movslq	%r13d, %r14
	movslq	%ecx, %rdi
	movq	%r14, %rsi
	addq	%rbx, %rdi
	imulq	%r12, %rsi
	cmpb	$82, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	1(%rcx), %edi
	cmpl	%edx, %edi
	jge	.L75
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$82, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	2(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L75
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$82, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	3(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L75
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$82, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	4(%rcx), %edi
	cmpl	%edx, %edi
	jge	.L75
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$82, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	5(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L75
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$82, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	6(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L75
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$82, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	7(%rcx), %edi
	cmpl	%edx, %edi
	jge	.L75
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$82, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	8(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L75
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$82, (%rdi,%rsi)
	setne	%dil
	movzbl	%dil, %edi
	addl	%edi, %eax
	leal	9(%rcx), %edi
	cmpl	%edi, %edx
	jle	.L75
	movslq	%edi, %rdi
	addq	%rbx, %rdi
	cmpb	$82, (%rdi,%rsi)
	setne	%sil
	movzbl	%sil, %esi
	addl	%esi, %eax
	leal	10(%rcx), %esi
	cmpl	%esi, %edx
	jle	.L75
	imulq	%r12, %r14
	movslq	%esi, %rsi
	addq	%rbx, %rsi
	cmpb	$82, (%rsi,%r14)
	setne	%sil
	movzbl	%sil, %esi
	addl	%esi, %eax
	leal	11(%rcx), %esi
	cmpl	%esi, %edx
	jle	.L75
	movslq	%esi, %rsi
	addq	%rbx, %rsi
	cmpb	$82, (%rsi,%r14)
	setne	%sil
	movzbl	%sil, %esi
	addl	%esi, %eax
	leal	12(%rcx), %esi
	cmpl	%esi, %edx
	jle	.L75
	movslq	%esi, %rsi
	addq	%rbx, %rsi
	cmpb	$82, (%rsi,%r14)
	setne	%sil
	movzbl	%sil, %esi
	addl	%esi, %eax
	leal	13(%rcx), %esi
	cmpl	%esi, %edx
	jle	.L75
	movslq	%esi, %rsi
	addq	%rbx, %rsi
	cmpb	$82, (%rsi,%r14)
	setne	%sil
	addl	$14, %ecx
	movzbl	%sil, %esi
	addl	%esi, %eax
	cmpl	%ecx, %edx
	jle	.L75
	movslq	%ecx, %rcx
	addq	%rbx, %rcx
	cmpb	$82, (%rcx,%r14)
	setne	%cl
	movzbl	%cl, %ecx
	addl	%ecx, %eax
	.p2align 4,,10
	.p2align 3
.L75:
	addl	$1, %r13d
	addq	%r12, %r11
	cmpl	%r13d, %r9d
	jne	.L55
	movl	-84(%rbp), %r9d
.L33:
	movl	-80(%rbp), %esi
	cmpl	%eax, %esi
	cmovle	%esi, %eax
	movl	%eax, -80(%rbp)
	cmpl	-92(%rbp), %r9d
	jne	.L76
.L8:
	addq	%r12, -104(%rbp)
	movl	-88(%rbp), %esi
	cmpl	%esi, -108(%rbp)
	jne	.L77
.L7:
	movl	-80(%rbp), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC6(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L100
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L83:
	.cfi_restore_state
	xorl	%ecx, %ecx
	jmp	.L56
.L80:
	xorl	%ecx, %ecx
	jmp	.L10
.L82:
	xorl	%ecx, %ecx
	jmp	.L34
.L98:
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L79:
	movl	$999999999, -80(%rbp)
	jmp	.L7
.L100:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.byte	87
	.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
	.align 16
.LC5:
	.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
	.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){
	int n,m,i,j,k,a,b,min=999999999,ans=0;
	scanf("%d %d",&n,&m);
	char map[n][m+1];
	for(i=0;i<n;i++){
		scanf("%s",map[i]);
	}
	
	
	for(a=0;a<=n-3;a++){
		for(b=a+1;b<=n-2;b++){
			
			for(i=0;i<=a;i++){
				for(j=0;j<m;j++){
					if(map[i][j]!='W')ans++;
				}
			}
			
			for(i=a+1;i<=b;i++){
				for(j=0;j<m;j++){
					if(map[i][j]!='B')ans++;
				}
			}
			
			for(i=b+1;i<n;i++){
				for(j=0;j<m;j++){
					if(map[i][j]!='R')ans++;
				}
			}
			
			if(ans<min)min=ans;
			ans=0;
		}
	}
	
	
	
	printf("%d\n",min);
	return 0;
}
4 5
WRWRW
BRWWB
WRWRW
RWBWR
 4 5
WRWRW
BWRWB
WRWRW
RWBWQ
 4 5
WQWRW
BWRXB
RVWRW
WQBWQ
 4 3
WQWRW
BWRXB
RVWRW
RWBWQ
 4 5
WQWRW
BWRXC
RVWRW
WQBWQ
 4 10
WRWQW
BWRXB
RVWRW
RWBWQ
 4 0
WQXRW
BWRXB
VRWRW
RWBWQ
 4 16
WRWQW
BWRXB
RVWRW
RWBWQ
 4 1
WRWRW
BWRWB
VRWRW
QWBWR
 5 1
WRWRW
BWRWB
VRWRW
QWBWR

11
 12
 13
 7
 14
 32
 0
 56
 2
 3

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){
	int n,m,i,j,k,a,b,min=999999999,ans=0;
	scanf("%d %d",&n,&m);
	char map[n][m+1];
	for(i=0;i<n;i++){
		scanf("%s",map[i]);
	}
	
	
	for(a=0;a<=n-3;a++){
		for(b=a+1;b<=n-2;b++){
			
			for(i=0;i<=a;i++){
				for(j=0;j<m;j++){
					if(map[i][j]!='W')ans++;
				}
			}
			
			for(i=a+1;i<=b;i++){
				for(j=0;j<m;j++){
					if(map[i][j]!='B')ans++;
				}
			}
			
			for(i=b+1;i<n;i++){
				for(j=0;j<m;j++){
					if(map[i][j]!='R')ans++;
				}
			}
			
			if(ans<min)min=ans;
			ans=0;
		}
	}
	
	
	
	printf("%d\n",min);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -168(%rbp)
	movl	$999999999, -88(%rbp)
	movl	$0, -84(%rbp)
	leaq	-108(%rbp), %rdx
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-108(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-112(%rbp), %esi
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%ecx, %rbx
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -72(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -128(%rbp)
	movq	$0, -120(%rbp)
	movslq	%esi, %rax
	movq	%rax, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	-128(%rbp), %r8
	movq	-120(%rbp), %r9
	movq	%r9, %rdx
	movq	-144(%rbp), %r10
	movq	-136(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%esi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movslq	%ecx, %rdx
	movslq	%esi, %rax
	imulq	%rdx, %rax
	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)
	movl	$0, -104(%rbp)
	jmp	.L5
.L6:
	movl	-104(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -104(%rbp)
.L5:
	movl	-112(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L6
	movl	$0, -96(%rbp)
	jmp	.L7
.L26:
	movl	-96(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -92(%rbp)
	jmp	.L8
.L25:
	movl	$0, -104(%rbp)
	jmp	.L9
.L13:
	movl	$0, -100(%rbp)
	jmp	.L10
.L12:
	movq	-64(%rbp), %rcx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movl	-104(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$87, %al
	je	.L11
	addl	$1, -84(%rbp)
.L11:
	addl	$1, -100(%rbp)
.L10:
	movl	-108(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L12
	addl	$1, -104(%rbp)
.L9:
	movl	-104(%rbp), %eax
	cmpl	-96(%rbp), %eax
	jle	.L13
	movl	-96(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -104(%rbp)
	jmp	.L14
.L18:
	movl	$0, -100(%rbp)
	jmp	.L15
.L17:
	movq	-64(%rbp), %rcx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movl	-104(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$66, %al
	je	.L16
	addl	$1, -84(%rbp)
.L16:
	addl	$1, -100(%rbp)
.L15:
	movl	-108(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L17
	addl	$1, -104(%rbp)
.L14:
	movl	-104(%rbp), %eax
	cmpl	-92(%rbp), %eax
	jle	.L18
	movl	-92(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -104(%rbp)
	jmp	.L19
.L23:
	movl	$0, -100(%rbp)
	jmp	.L20
.L22:
	movq	-64(%rbp), %rcx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movl	-104(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$82, %al
	je	.L21
	addl	$1, -84(%rbp)
.L21:
	addl	$1, -100(%rbp)
.L20:
	movl	-108(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L22
	addl	$1, -104(%rbp)
.L19:
	movl	-112(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L23
	movl	-84(%rbp), %eax
	cmpl	-88(%rbp), %eax
	jge	.L24
	movl	-84(%rbp), %eax
	movl	%eax, -88(%rbp)
.L24:
	movl	$0, -84(%rbp)
	addl	$1, -92(%rbp)
.L8:
	movl	-112(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -92(%rbp)
	jl	.L25
	addl	$1, -96(%rbp)
.L7:
	movl	-112(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -96(%rbp)
	jl	.L26
	movl	-88(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-168(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	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 %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -168(%rbp)
	movl	$999999999, -88(%rbp)
	movl	$0, -84(%rbp)
	leaq	-108(%rbp), %rdx
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-108(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-112(%rbp), %esi
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -80(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%ecx, %rbx
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -72(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -128(%rbp)
	movq	$0, -120(%rbp)
	movslq	%esi, %rax
	movq	%rax, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	-128(%rbp), %r8
	movq	-120(%rbp), %r9
	movq	%r9, %rdx
	movq	-144(%rbp), %r10
	movq	-136(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%esi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movslq	%ecx, %rdx
	movslq	%esi, %rax
	imulq	%rdx, %rax
	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)
	movl	$0, -104(%rbp)
	jmp	.L5
.L6:
	movl	-104(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -104(%rbp)
.L5:
	movl	-112(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L6
	movl	$0, -96(%rbp)
	jmp	.L7
.L26:
	movl	-96(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -92(%rbp)
	jmp	.L8
.L25:
	movl	$0, -104(%rbp)
	jmp	.L9
.L13:
	movl	$0, -100(%rbp)
	jmp	.L10
.L12:
	movq	-64(%rbp), %rcx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movl	-104(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$87, %al
	je	.L11
	addl	$1, -84(%rbp)
.L11:
	addl	$1, -100(%rbp)
.L10:
	movl	-108(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L12
	addl	$1, -104(%rbp)
.L9:
	movl	-104(%rbp), %eax
	cmpl	-96(%rbp), %eax
	jle	.L13
	movl	-96(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -104(%rbp)
	jmp	.L14
.L18:
	movl	$0, -100(%rbp)
	jmp	.L15
.L17:
	movq	-64(%rbp), %rcx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movl	-104(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$66, %al
	je	.L16
	addl	$1, -84(%rbp)
.L16:
	addl	$1, -100(%rbp)
.L15:
	movl	-108(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L17
	addl	$1, -104(%rbp)
.L14:
	movl	-104(%rbp), %eax
	cmpl	-92(%rbp), %eax
	jle	.L18
	movl	-92(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -104(%rbp)
	jmp	.L19
.L23:
	movl	$0, -100(%rbp)
	jmp	.L20
.L22:
	movq	-64(%rbp), %rcx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movl	-104(%rbp), %eax
	cltq
	imulq	%rbx, %rax
	addq	%rcx, %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$82, %al
	je	.L21
	addl	$1, -84(%rbp)
.L21:
	addl	$1, -100(%rbp)
.L20:
	movl	-108(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L22
	addl	$1, -104(%rbp)
.L19:
	movl	-112(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L23
	movl	-84(%rbp), %eax
	cmpl	-88(%rbp), %eax
	jge	.L24
	movl	-84(%rbp), %eax
	movl	%eax, -88(%rbp)
.L24:
	movl	$0, -84(%rbp)
	addl	$1, -92(%rbp)
.L8:
	movl	-112(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -92(%rbp)
	jl	.L25
	addl	$1, -96(%rbp)
.L7:
	movl	-112(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -96(%rbp)
	jl	.L26
	movl	-88(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-168(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	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:
