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 h, w, n;
	scanf("%d %d %d", &h, &w, &n);
	int sr, sc;
	scanf("%d %d", &sr, &sc);
	char s[200005], t[200005];
	scanf("%s%s", s, t);
	int z;
	z = sr;
	int i;
	for (i = 0; i < n; i++)
	{
		if (s[i] == 'U')
			z--;
		if (z < 1)
		{
			printf("NO\n");
			return 0;
		}
		if (t[i] == 'D' && z < h)
			z++;
	}
	z = sr;
	for (i = 0; i < n; i++)
	{
		if (s[i] == 'D')
			z++;
		if (z > h)
		{
			printf("NO\n");
			return 0;
		}
		if (t[i] == 'U' && z > 1)
			z--;
	}
	z = sc;
	for (i = 0; i < n; i++)
	{
		if (s[i] == 'L')
			z--;
		if (z < 1)
		{
			printf("NO\n");
			return 0;
		}
		if (t[i] == 'R' && z < w)
			z++;
	}
	z = sc;
	for (i = 0; i < n; i++)
	{
		if (s[i] == 'R')
			z++;
		if (z > w)
		{
			printf("NO\n");
			return 0;
		}
		if (t[i] == 'L' && z > 1)
			z--;
	}
	printf("YES\n");
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%s%s"
.LC3:
	.string	"NO"
.LC4:
	.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
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2752, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400052(%rbp), %rcx
	leaq	-400056(%rbp), %rdx
	leaq	-400060(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-400044(%rbp), %rdx
	leaq	-400048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-200016(%rbp), %rdx
	leaq	-400032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-400048(%rbp), %eax
	movl	%eax, -400040(%rbp)
	movl	$0, -400036(%rbp)
	jmp	.L2
.L7:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-400032(%rbp,%rax), %eax
	cmpb	$85, %al
	jne	.L3
	subl	$1, -400040(%rbp)
.L3:
	cmpl	$0, -400040(%rbp)
	jg	.L4
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L23
.L4:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$68, %al
	jne	.L6
	movl	-400060(%rbp), %eax
	cmpl	%eax, -400040(%rbp)
	jge	.L6
	addl	$1, -400040(%rbp)
.L6:
	addl	$1, -400036(%rbp)
.L2:
	movl	-400052(%rbp), %eax
	cmpl	%eax, -400036(%rbp)
	jl	.L7
	movl	-400048(%rbp), %eax
	movl	%eax, -400040(%rbp)
	movl	$0, -400036(%rbp)
	jmp	.L8
.L12:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-400032(%rbp,%rax), %eax
	cmpb	$68, %al
	jne	.L9
	addl	$1, -400040(%rbp)
.L9:
	movl	-400060(%rbp), %eax
	cmpl	%eax, -400040(%rbp)
	jle	.L10
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L23
.L10:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$85, %al
	jne	.L11
	cmpl	$1, -400040(%rbp)
	jle	.L11
	subl	$1, -400040(%rbp)
.L11:
	addl	$1, -400036(%rbp)
.L8:
	movl	-400052(%rbp), %eax
	cmpl	%eax, -400036(%rbp)
	jl	.L12
	movl	-400044(%rbp), %eax
	movl	%eax, -400040(%rbp)
	movl	$0, -400036(%rbp)
	jmp	.L13
.L17:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-400032(%rbp,%rax), %eax
	cmpb	$76, %al
	jne	.L14
	subl	$1, -400040(%rbp)
.L14:
	cmpl	$0, -400040(%rbp)
	jg	.L15
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L23
.L15:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$82, %al
	jne	.L16
	movl	-400056(%rbp), %eax
	cmpl	%eax, -400040(%rbp)
	jge	.L16
	addl	$1, -400040(%rbp)
.L16:
	addl	$1, -400036(%rbp)
.L13:
	movl	-400052(%rbp), %eax
	cmpl	%eax, -400036(%rbp)
	jl	.L17
	movl	-400044(%rbp), %eax
	movl	%eax, -400040(%rbp)
	movl	$0, -400036(%rbp)
	jmp	.L18
.L22:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-400032(%rbp,%rax), %eax
	cmpb	$82, %al
	jne	.L19
	addl	$1, -400040(%rbp)
.L19:
	movl	-400056(%rbp), %eax
	cmpl	%eax, -400040(%rbp)
	jle	.L20
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L23
.L20:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$76, %al
	jne	.L21
	cmpl	$1, -400040(%rbp)
	jle	.L21
	subl	$1, -400040(%rbp)
.L21:
	addl	$1, -400036(%rbp)
.L18:
	movl	-400052(%rbp), %eax
	cmpl	%eax, -400036(%rbp)
	jl	.L22
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L23:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	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	"%d %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%s%s"
.LC3:
	.string	"NO"
.LC4:
	.string	"YES"
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397336
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2760, %rsp
	.cfi_def_cfa_offset 400096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 400056(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	leaq	200048(%rsp), %rbp
	leaq	32(%rsp), %rbx
	call	__isoc99_scanf@PLT
	leaq	28(%rsp), %rdx
	leaq	24(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	movq	%rbp, %rdx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rsi
	movl	24(%rsp), %ecx
	testl	%esi, %esi
	jle	.L2
	movl	12(%rsp), %r8d
	movl	%ecx, %edx
	xorl	%eax, %eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	cmpb	$68, 0(%rbp,%rax)
	jne	.L6
	xorl	%edi, %edi
	cmpl	%edx, %r8d
	setg	%dil
	addl	%edi, %edx
.L6:
	addq	$1, %rax
	cmpq	%rsi, %rax
	je	.L38
.L7:
	xorl	%edi, %edi
	cmpb	$85, (%rbx,%rax)
	sete	%dil
	subl	%edi, %edx
	testl	%edx, %edx
	jg	.L4
.L9:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L5:
	movq	400056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L39
	addq	$400072, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L38:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L41:
	cmpb	$85, 0(%rbp,%rax)
	jne	.L10
	cmpl	$1, %ecx
	setg	%dl
	cmpb	$1, %dl
	adcl	$-1, %ecx
.L10:
	addq	$1, %rax
	cmpq	%rsi, %rax
	je	.L40
.L11:
	xorl	%edx, %edx
	cmpb	$68, (%rbx,%rax)
	sete	%dl
	addl	%edx, %ecx
	cmpl	%ecx, %r8d
	jge	.L41
	jmp	.L9
.L40:
	movl	28(%rsp), %ecx
	movl	16(%rsp), %r8d
	xorl	%eax, %eax
	movl	%ecx, %edx
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L43:
	cmpb	$82, 0(%rbp,%rax)
	jne	.L14
	xorl	%edi, %edi
	cmpl	%edx, %r8d
	setg	%dil
	addl	%edi, %edx
.L14:
	addq	$1, %rax
	cmpq	%rsi, %rax
	je	.L42
.L15:
	xorl	%edi, %edi
	cmpb	$76, (%rbx,%rax)
	sete	%dil
	subl	%edi, %edx
	testl	%edx, %edx
	jg	.L43
	jmp	.L9
.L42:
	xorl	%eax, %eax
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L44:
	cmpb	$76, 0(%rbp,%rax)
	jne	.L17
	cmpl	$1, %ecx
	setg	%dl
	cmpb	$1, %dl
	adcl	$-1, %ecx
.L17:
	addq	$1, %rax
	cmpq	%rsi, %rax
	je	.L2
.L18:
	xorl	%edx, %edx
	cmpb	$82, (%rbx,%rax)
	sete	%dl
	addl	%edx, %ecx
	cmpl	%ecx, %r8d
	jge	.L44
	jmp	.L9
.L2:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L5
.L39:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%s%s"
.LC3:
	.string	"NO"
.LC4:
	.string	"YES"
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397336
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2760, %rsp
	.cfi_def_cfa_offset 400096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 400056(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	leaq	200048(%rsp), %rbp
	leaq	32(%rsp), %rbx
	call	__isoc99_scanf@PLT
	leaq	28(%rsp), %rdx
	leaq	24(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	movq	%rbp, %rdx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rdi
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rsi
	movl	24(%rsp), %ecx
	testl	%esi, %esi
	jle	.L2
	movl	12(%rsp), %r8d
	movl	%ecx, %edx
	xorl	%eax, %eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	cmpb	$68, 0(%rbp,%rax)
	jne	.L6
	xorl	%edi, %edi
	cmpl	%edx, %r8d
	setg	%dil
	addl	%edi, %edx
.L6:
	addq	$1, %rax
	cmpq	%rsi, %rax
	je	.L38
.L7:
	xorl	%edi, %edi
	cmpb	$85, (%rbx,%rax)
	sete	%dil
	subl	%edi, %edx
	testl	%edx, %edx
	jg	.L4
.L9:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L5:
	movq	400056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L39
	addq	$400072, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L38:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L41:
	cmpb	$85, 0(%rbp,%rax)
	jne	.L10
	cmpl	$1, %ecx
	setg	%dl
	cmpb	$1, %dl
	adcl	$-1, %ecx
.L10:
	addq	$1, %rax
	cmpq	%rsi, %rax
	je	.L40
.L11:
	xorl	%edx, %edx
	cmpb	$68, (%rbx,%rax)
	sete	%dl
	addl	%edx, %ecx
	cmpl	%ecx, %r8d
	jge	.L41
	jmp	.L9
.L40:
	movl	28(%rsp), %ecx
	movl	16(%rsp), %r8d
	xorl	%eax, %eax
	movl	%ecx, %edx
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L43:
	cmpb	$82, 0(%rbp,%rax)
	jne	.L14
	xorl	%edi, %edi
	cmpl	%edx, %r8d
	setg	%dil
	addl	%edi, %edx
.L14:
	addq	$1, %rax
	cmpq	%rsi, %rax
	je	.L42
.L15:
	xorl	%edi, %edi
	cmpb	$76, (%rbx,%rax)
	sete	%dil
	subl	%edi, %edx
	testl	%edx, %edx
	jg	.L43
	jmp	.L9
.L42:
	xorl	%eax, %eax
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L44:
	cmpb	$76, 0(%rbp,%rax)
	jne	.L17
	cmpl	$1, %ecx
	setg	%dl
	cmpb	$1, %dl
	adcl	$-1, %ecx
.L17:
	addq	$1, %rax
	cmpq	%rsi, %rax
	je	.L2
.L18:
	xorl	%edx, %edx
	cmpb	$82, (%rbx,%rax)
	sete	%dl
	addl	%edx, %ecx
	cmpl	%ecx, %r8d
	jge	.L44
	jmp	.L9
.L2:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L5
.L39:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
int main()
{
	int h, w, n;
	scanf("%d %d %d", &h, &w, &n);
	int sr, sc;
	scanf("%d %d", &sr, &sc);
	char s[200005], t[200005];
	scanf("%s%s", s, t);
	int z;
	z = sr;
	int i;
	for (i = 0; i < n; i++)
	{
		if (s[i] == 'U')
			z--;
		if (z < 1)
		{
			printf("NO\n");
			return 0;
		}
		if (t[i] == 'D' && z < h)
			z++;
	}
	z = sr;
	for (i = 0; i < n; i++)
	{
		if (s[i] == 'D')
			z++;
		if (z > h)
		{
			printf("NO\n");
			return 0;
		}
		if (t[i] == 'U' && z > 1)
			z--;
	}
	z = sc;
	for (i = 0; i < n; i++)
	{
		if (s[i] == 'L')
			z--;
		if (z < 1)
		{
			printf("NO\n");
			return 0;
		}
		if (t[i] == 'R' && z < w)
			z++;
	}
	z = sc;
	for (i = 0; i < n; i++)
	{
		if (s[i] == 'R')
			z++;
		if (z > w)
		{
			printf("NO\n");
			return 0;
		}
		if (t[i] == 'L' && z > 1)
			z--;
	}
	printf("YES\n");
	return 0;
}
2 3 3
2 2
RLR
LUD
 4 3 5
2 2
UDRRR
LLDTD
 2 6 11
2 1
RLDRRUDDLRL
URRDRLLDLRD
 2 6 3
2 2
RLR
LUD
 4 1 5
2 2
UDRRR
LLDTD
 4 1 5
0 2
UDRRR
LLDTD
 4 1 5
0 2
UDRRR
DTDLL
 1 1 5
0 2
UDRRR
DTDLL
 1 1 5
-1 2
UDRRR
DTDLL
 1 1 4
-1 2
UDRRR
DTDLL

YES
 NO
 NO
 YES
 NO
 NO
 NO
 NO
 NO
 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 h, w, n;
	scanf("%d %d %d", &h, &w, &n);
	int sr, sc;
	scanf("%d %d", &sr, &sc);
	char s[200005], t[200005];
	scanf("%s%s", s, t);
	int z;
	z = sr;
	int i;
	for (i = 0; i < n; i++)
	{
		if (s[i] == 'U')
			z--;
		if (z < 1)
		{
			printf("NO\n");
			return 0;
		}
		if (t[i] == 'D' && z < h)
			z++;
	}
	z = sr;
	for (i = 0; i < n; i++)
	{
		if (s[i] == 'D')
			z++;
		if (z > h)
		{
			printf("NO\n");
			return 0;
		}
		if (t[i] == 'U' && z > 1)
			z--;
	}
	z = sc;
	for (i = 0; i < n; i++)
	{
		if (s[i] == 'L')
			z--;
		if (z < 1)
		{
			printf("NO\n");
			return 0;
		}
		if (t[i] == 'R' && z < w)
			z++;
	}
	z = sc;
	for (i = 0; i < n; i++)
	{
		if (s[i] == 'R')
			z++;
		if (z > w)
		{
			printf("NO\n");
			return 0;
		}
		if (t[i] == 'L' && z > 1)
			z--;
	}
	printf("YES\n");
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%s%s"
.LC3:
	.string	"NO"
.LC4:
	.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
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2752, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400052(%rbp), %rcx
	leaq	-400056(%rbp), %rdx
	leaq	-400060(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-400044(%rbp), %rdx
	leaq	-400048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-200016(%rbp), %rdx
	leaq	-400032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-400048(%rbp), %eax
	movl	%eax, -400040(%rbp)
	movl	$0, -400036(%rbp)
	jmp	.L2
.L7:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-400032(%rbp,%rax), %eax
	cmpb	$85, %al
	jne	.L3
	subl	$1, -400040(%rbp)
.L3:
	cmpl	$0, -400040(%rbp)
	jg	.L4
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L23
.L4:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$68, %al
	jne	.L6
	movl	-400060(%rbp), %eax
	cmpl	%eax, -400040(%rbp)
	jge	.L6
	addl	$1, -400040(%rbp)
.L6:
	addl	$1, -400036(%rbp)
.L2:
	movl	-400052(%rbp), %eax
	cmpl	%eax, -400036(%rbp)
	jl	.L7
	movl	-400048(%rbp), %eax
	movl	%eax, -400040(%rbp)
	movl	$0, -400036(%rbp)
	jmp	.L8
.L12:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-400032(%rbp,%rax), %eax
	cmpb	$68, %al
	jne	.L9
	addl	$1, -400040(%rbp)
.L9:
	movl	-400060(%rbp), %eax
	cmpl	%eax, -400040(%rbp)
	jle	.L10
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L23
.L10:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$85, %al
	jne	.L11
	cmpl	$1, -400040(%rbp)
	jle	.L11
	subl	$1, -400040(%rbp)
.L11:
	addl	$1, -400036(%rbp)
.L8:
	movl	-400052(%rbp), %eax
	cmpl	%eax, -400036(%rbp)
	jl	.L12
	movl	-400044(%rbp), %eax
	movl	%eax, -400040(%rbp)
	movl	$0, -400036(%rbp)
	jmp	.L13
.L17:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-400032(%rbp,%rax), %eax
	cmpb	$76, %al
	jne	.L14
	subl	$1, -400040(%rbp)
.L14:
	cmpl	$0, -400040(%rbp)
	jg	.L15
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L23
.L15:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$82, %al
	jne	.L16
	movl	-400056(%rbp), %eax
	cmpl	%eax, -400040(%rbp)
	jge	.L16
	addl	$1, -400040(%rbp)
.L16:
	addl	$1, -400036(%rbp)
.L13:
	movl	-400052(%rbp), %eax
	cmpl	%eax, -400036(%rbp)
	jl	.L17
	movl	-400044(%rbp), %eax
	movl	%eax, -400040(%rbp)
	movl	$0, -400036(%rbp)
	jmp	.L18
.L22:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-400032(%rbp,%rax), %eax
	cmpb	$82, %al
	jne	.L19
	addl	$1, -400040(%rbp)
.L19:
	movl	-400056(%rbp), %eax
	cmpl	%eax, -400040(%rbp)
	jle	.L20
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L23
.L20:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$76, %al
	jne	.L21
	cmpl	$1, -400040(%rbp)
	jle	.L21
	subl	$1, -400040(%rbp)
.L21:
	addl	$1, -400036(%rbp)
.L18:
	movl	-400052(%rbp), %eax
	cmpl	%eax, -400036(%rbp)
	jl	.L22
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L23:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	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	"%d %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%s%s"
.LC3:
	.string	"NO"
.LC4:
	.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
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2752, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400052(%rbp), %rcx
	leaq	-400056(%rbp), %rdx
	leaq	-400060(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-400044(%rbp), %rdx
	leaq	-400048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-200016(%rbp), %rdx
	leaq	-400032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-400048(%rbp), %eax
	movl	%eax, -400040(%rbp)
	movl	$0, -400036(%rbp)
	jmp	.L2
.L7:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-400032(%rbp,%rax), %eax
	cmpb	$85, %al
	jne	.L3
	subl	$1, -400040(%rbp)
.L3:
	cmpl	$0, -400040(%rbp)
	jg	.L4
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L23
.L4:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$68, %al
	jne	.L6
	movl	-400060(%rbp), %eax
	cmpl	%eax, -400040(%rbp)
	jge	.L6
	addl	$1, -400040(%rbp)
.L6:
	addl	$1, -400036(%rbp)
.L2:
	movl	-400052(%rbp), %eax
	cmpl	%eax, -400036(%rbp)
	jl	.L7
	movl	-400048(%rbp), %eax
	movl	%eax, -400040(%rbp)
	movl	$0, -400036(%rbp)
	jmp	.L8
.L12:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-400032(%rbp,%rax), %eax
	cmpb	$68, %al
	jne	.L9
	addl	$1, -400040(%rbp)
.L9:
	movl	-400060(%rbp), %eax
	cmpl	%eax, -400040(%rbp)
	jle	.L10
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L23
.L10:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$85, %al
	jne	.L11
	cmpl	$1, -400040(%rbp)
	jle	.L11
	subl	$1, -400040(%rbp)
.L11:
	addl	$1, -400036(%rbp)
.L8:
	movl	-400052(%rbp), %eax
	cmpl	%eax, -400036(%rbp)
	jl	.L12
	movl	-400044(%rbp), %eax
	movl	%eax, -400040(%rbp)
	movl	$0, -400036(%rbp)
	jmp	.L13
.L17:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-400032(%rbp,%rax), %eax
	cmpb	$76, %al
	jne	.L14
	subl	$1, -400040(%rbp)
.L14:
	cmpl	$0, -400040(%rbp)
	jg	.L15
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L23
.L15:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$82, %al
	jne	.L16
	movl	-400056(%rbp), %eax
	cmpl	%eax, -400040(%rbp)
	jge	.L16
	addl	$1, -400040(%rbp)
.L16:
	addl	$1, -400036(%rbp)
.L13:
	movl	-400052(%rbp), %eax
	cmpl	%eax, -400036(%rbp)
	jl	.L17
	movl	-400044(%rbp), %eax
	movl	%eax, -400040(%rbp)
	movl	$0, -400036(%rbp)
	jmp	.L18
.L22:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-400032(%rbp,%rax), %eax
	cmpb	$82, %al
	jne	.L19
	addl	$1, -400040(%rbp)
.L19:
	movl	-400056(%rbp), %eax
	cmpl	%eax, -400040(%rbp)
	jle	.L20
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L23
.L20:
	movl	-400036(%rbp), %eax
	cltq
	movzbl	-200016(%rbp,%rax), %eax
	cmpb	$76, %al
	jne	.L21
	cmpl	$1, -400040(%rbp)
	jle	.L21
	subl	$1, -400040(%rbp)
.L21:
	addl	$1, -400036(%rbp)
.L18:
	movl	-400052(%rbp), %eax
	cmpl	%eax, -400036(%rbp)
	jl	.L22
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L23:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	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:
