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 N, A, B, C, D;
char S[271828];

int main(void) {
	int i;
	if (scanf("%d%d%d%d%d", &N, &A, &B, &C, &D) != 5) return 1;
	if (scanf("%271827s", S) != 1) return 1;
	if (A >= B) {
		puts("error!");
		return 2;
	}
	A--; B--; C--; D--;
	if (C == D || S[C] != '.' || S[D] != '.') {
		puts("No");
	} else if (C < D) {
		/* 追い越さなくていいパターン */
		for (i = A; i < C; i++) {
			if (S[i] != '.' && S[i + 1] != '.') {
				puts("No");
				return 0;
			}
		}
		for (i = B; i < D; i++) {
			if (S[i] != '.' && S[i + 1] != '.') {
				puts("No");
				return 0;
			}
		}
	} else {
		/* 追い越すパターン */
		int ok = 0;
		for (i = A; i < C; i++) {
			if (S[i] != '.' && S[i + 1] != '.') {
				puts("No");
				return 0;
			}
		}
		for (i = B - 1; i < D; i++) {
			if (S[i] == '.' && S[i + 1] == '.' && S[i + 2] == '.') {
				ok = 1;
				break;
			}
		}
		if (!ok) {
			puts("No");
			return 0;
		}
	}
	puts("Yes");
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	B
	.align 4
	.type	B, @object
	.size	B, 4
B:
	.zero	4
	.globl	C
	.align 4
	.type	C, @object
	.size	C, 4
C:
	.zero	4
	.globl	D
	.align 4
	.type	D, @object
	.size	D, 4
D:
	.zero	4
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 271828
S:
	.zero	271828
	.section	.rodata
.LC0:
	.string	"%d%d%d%d%d"
.LC1:
	.string	"%271827s"
.LC2:
	.string	"error!"
.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
	subq	$16, %rsp
	leaq	D(%rip), %r9
	leaq	C(%rip), %r8
	leaq	B(%rip), %rax
	movq	%rax, %rcx
	leaq	A(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$5, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	leaq	S(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L4
	movl	$1, %eax
	jmp	.L3
.L4:
	movl	A(%rip), %edx
	movl	B(%rip), %eax
	cmpl	%eax, %edx
	jl	.L5
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$2, %eax
	jmp	.L3
.L5:
	movl	A(%rip), %eax
	subl	$1, %eax
	movl	%eax, A(%rip)
	movl	B(%rip), %eax
	subl	$1, %eax
	movl	%eax, B(%rip)
	movl	C(%rip), %eax
	subl	$1, %eax
	movl	%eax, C(%rip)
	movl	D(%rip), %eax
	subl	$1, %eax
	movl	%eax, D(%rip)
	movl	C(%rip), %edx
	movl	D(%rip), %eax
	cmpl	%eax, %edx
	je	.L6
	movl	C(%rip), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	jne	.L6
	movl	D(%rip), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L7
.L6:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L8
.L7:
	movl	C(%rip), %edx
	movl	D(%rip), %eax
	cmpl	%eax, %edx
	jge	.L9
	movl	A(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L10
.L12:
	movl	-8(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L11
	movl	-8(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L11
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L3
.L11:
	addl	$1, -8(%rbp)
.L10:
	movl	C(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L12
	movl	B(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L13
.L15:
	movl	-8(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L14
	movl	-8(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L14
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L3
.L14:
	addl	$1, -8(%rbp)
.L13:
	movl	D(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L15
	jmp	.L8
.L9:
	movl	$0, -4(%rbp)
	movl	A(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L16
.L18:
	movl	-8(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L17
	movl	-8(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L17
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L3
.L17:
	addl	$1, -8(%rbp)
.L16:
	movl	C(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L18
	movl	B(%rip), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L19
.L22:
	movl	-8(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	jne	.L20
	movl	-8(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	jne	.L20
	movl	-8(%rbp), %eax
	addl	$2, %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	jne	.L20
	movl	$1, -4(%rbp)
	jmp	.L21
.L20:
	addl	$1, -8(%rbp)
.L19:
	movl	D(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L22
.L21:
	cmpl	$0, -4(%rbp)
	jne	.L8
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L3
.L8:
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L3:
	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%d%d"
.LC1:
	.string	"%271827s"
.LC2:
	.string	"error!"
.LC3:
	.string	"No"
.LC4:
	.string	"Yes"
	.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
	xorl	%eax, %eax
	leaq	D(%rip), %r9
	leaq	C(%rip), %r8
	leaq	B(%rip), %rcx
	leaq	A(%rip), %rdx
	leaq	N(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$5, %eax
	je	.L2
.L4:
	movl	$1, %eax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	leaq	S(%rip), %rbx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	subl	$1, %eax
	jne	.L4
	movl	A(%rip), %eax
	movl	B(%rip), %edx
	cmpl	%edx, %eax
	jge	.L25
	movl	C(%rip), %r8d
	movl	D(%rip), %edi
	subl	$1, %eax
	leal	-1(%rdx), %esi
	movl	%eax, A(%rip)
	leal	-1(%r8), %ecx
	leal	-1(%rdi), %r9d
	movl	%esi, B(%rip)
	movl	%ecx, C(%rip)
	movl	%r9d, D(%rip)
	cmpl	%edi, %r8d
	je	.L6
	movslq	%ecx, %r10
	cmpb	$46, (%rbx,%r10)
	je	.L26
.L6:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L8:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	xorl	%eax, %eax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L26:
	.cfi_restore_state
	movslq	%r9d, %r10
	cmpb	$46, (%rbx,%r10)
	jne	.L6
	cltq
	cmpl	%edi, %r8d
	jl	.L9
	leaq	1+S(%rip), %rsi
	jmp	.L10
.L19:
	cmpb	$46, (%rbx,%rax)
	je	.L18
	cmpb	$46, (%rax,%rsi)
	jne	.L16
.L18:
	addq	$1, %rax
.L10:
	cmpl	%eax, %ecx
	jg	.L19
	leal	-2(%rdx), %eax
	leaq	1+S(%rip), %rcx
	cltq
	jmp	.L20
.L21:
	addq	$1, %rax
.L20:
	cmpl	%eax, %r9d
	jle	.L16
	cmpb	$46, (%rbx,%rax)
	jne	.L21
	cmpb	$46, (%rax,%rcx)
	jne	.L21
	leal	2(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$46, (%rbx,%rdx)
	jne	.L21
	jmp	.L8
.L25:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	movl	$2, %eax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	leaq	1+S(%rip), %rdx
	jmp	.L11
.L13:
	cmpb	$46, (%rbx,%rax)
	je	.L12
	cmpb	$46, (%rax,%rdx)
	jne	.L16
.L12:
	addq	$1, %rax
.L11:
	cmpl	%eax, %ecx
	jg	.L13
	movslq	%esi, %rsi
	leaq	1+S(%rip), %rax
	jmp	.L14
.L15:
	addq	$1, %rsi
.L14:
	cmpl	%esi, %r9d
	jle	.L8
	cmpb	$46, (%rbx,%rsi)
	je	.L15
	cmpb	$46, (%rsi,%rax)
	je	.L15
.L16:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 271828
S:
	.zero	271828
	.globl	D
	.align 4
	.type	D, @object
	.size	D, 4
D:
	.zero	4
	.globl	C
	.align 4
	.type	C, @object
	.size	C, 4
C:
	.zero	4
	.globl	B
	.align 4
	.type	B, @object
	.size	B, 4
B:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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%d%d"
.LC1:
	.string	"%271827s"
.LC2:
	.string	"error!"
.LC3:
	.string	"No"
.LC4:
	.string	"Yes"
	.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
	xorl	%eax, %eax
	leaq	D(%rip), %r9
	leaq	C(%rip), %r8
	leaq	B(%rip), %rcx
	leaq	A(%rip), %rdx
	leaq	N(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$5, %eax
	je	.L2
.L4:
	movl	$1, %eax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	leaq	S(%rip), %rbx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	subl	$1, %eax
	jne	.L4
	movl	A(%rip), %eax
	movl	B(%rip), %edx
	cmpl	%edx, %eax
	jge	.L25
	movl	C(%rip), %r8d
	movl	D(%rip), %edi
	subl	$1, %eax
	leal	-1(%rdx), %esi
	movl	%eax, A(%rip)
	leal	-1(%r8), %ecx
	leal	-1(%rdi), %r9d
	movl	%esi, B(%rip)
	movl	%ecx, C(%rip)
	movl	%r9d, D(%rip)
	cmpl	%edi, %r8d
	je	.L6
	movslq	%ecx, %r10
	cmpb	$46, (%rbx,%r10)
	je	.L26
.L6:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L8:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	xorl	%eax, %eax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L26:
	.cfi_restore_state
	movslq	%r9d, %r10
	cmpb	$46, (%rbx,%r10)
	jne	.L6
	cltq
	cmpl	%edi, %r8d
	jl	.L9
	leaq	1+S(%rip), %rsi
	jmp	.L10
.L19:
	cmpb	$46, (%rbx,%rax)
	je	.L18
	cmpb	$46, (%rax,%rsi)
	jne	.L16
.L18:
	addq	$1, %rax
.L10:
	cmpl	%eax, %ecx
	jg	.L19
	leal	-2(%rdx), %eax
	leaq	1+S(%rip), %rcx
	cltq
	jmp	.L20
.L21:
	addq	$1, %rax
.L20:
	cmpl	%eax, %r9d
	jle	.L16
	cmpb	$46, (%rbx,%rax)
	jne	.L21
	cmpb	$46, (%rax,%rcx)
	jne	.L21
	leal	2(%rax), %edx
	movslq	%edx, %rdx
	cmpb	$46, (%rbx,%rdx)
	jne	.L21
	jmp	.L8
.L25:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	movl	$2, %eax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	leaq	1+S(%rip), %rdx
	jmp	.L11
.L13:
	cmpb	$46, (%rbx,%rax)
	je	.L12
	cmpb	$46, (%rax,%rdx)
	jne	.L16
.L12:
	addq	$1, %rax
.L11:
	cmpl	%eax, %ecx
	jg	.L13
	movslq	%esi, %rsi
	leaq	1+S(%rip), %rax
	jmp	.L14
.L15:
	addq	$1, %rsi
.L14:
	cmpl	%esi, %r9d
	jle	.L8
	cmpb	$46, (%rbx,%rsi)
	je	.L15
	cmpb	$46, (%rsi,%rax)
	je	.L15
.L16:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 271828
S:
	.zero	271828
	.globl	D
	.align 4
	.type	D, @object
	.size	D, 4
D:
	.zero	4
	.globl	C
	.align 4
	.type	C, @object
	.size	C, 4
C:
	.zero	4
	.globl	B
	.align 4
	.type	B, @object
	.size	B, 4
B:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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 N, A, B, C, D;
char S[271828];

int main(void) {
	int i;
	if (scanf("%d%d%d%d%d", &N, &A, &B, &C, &D) != 5) return 1;
	if (scanf("%271827s", S) != 1) return 1;
	if (A >= B) {
		puts("error!");
		return 2;
	}
	A--; B--; C--; D--;
	if (C == D || S[C] != '.' || S[D] != '.') {
		puts("No");
	} else if (C < D) {
		/* 追い越さなくていいパターン */
		for (i = A; i < C; i++) {
			if (S[i] != '.' && S[i + 1] != '.') {
				puts("No");
				return 0;
			}
		}
		for (i = B; i < D; i++) {
			if (S[i] != '.' && S[i + 1] != '.') {
				puts("No");
				return 0;
			}
		}
	} else {
		/* 追い越すパターン */
		int ok = 0;
		for (i = A; i < C; i++) {
			if (S[i] != '.' && S[i + 1] != '.') {
				puts("No");
				return 0;
			}
		}
		for (i = B - 1; i < D; i++) {
			if (S[i] == '.' && S[i + 1] == '.' && S[i + 2] == '.') {
				ok = 1;
				break;
			}
		}
		if (!ok) {
			puts("No");
			return 0;
		}
	}
	puts("Yes");
	return 0;
}

9 1 3 7 6
.#..#..
 15 1 3 15 11
...#.#...#.#...
 4 1 3 7 6
.#..#..
 8 1 3 7 6
.#..#..
 15 0 3 15 13
...#.#...#.#...
 15 0 3 15 11
...#.#...#.#...
 1 1 3 7 6
.#..#..
 15 1 3 15 7
...#.#...#.#...
 8 1 4 7 6
.#..#..
 15 0 6 15 13
...#.#...#.#...

No
 Yes
 No
 No
 Yes
 Yes
 No
 No
 No
 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 N, A, B, C, D;
char S[271828];

int main(void) {
	int i;
	if (scanf("%d%d%d%d%d", &N, &A, &B, &C, &D) != 5) return 1;
	if (scanf("%271827s", S) != 1) return 1;
	if (A >= B) {
		puts("error!");
		return 2;
	}
	A--; B--; C--; D--;
	if (C == D || S[C] != '.' || S[D] != '.') {
		puts("No");
	} else if (C < D) {
		/* 追い越さなくていいパターン */
		for (i = A; i < C; i++) {
			if (S[i] != '.' && S[i + 1] != '.') {
				puts("No");
				return 0;
			}
		}
		for (i = B; i < D; i++) {
			if (S[i] != '.' && S[i + 1] != '.') {
				puts("No");
				return 0;
			}
		}
	} else {
		/* 追い越すパターン */
		int ok = 0;
		for (i = A; i < C; i++) {
			if (S[i] != '.' && S[i + 1] != '.') {
				puts("No");
				return 0;
			}
		}
		for (i = B - 1; i < D; i++) {
			if (S[i] == '.' && S[i + 1] == '.' && S[i + 2] == '.') {
				ok = 1;
				break;
			}
		}
		if (!ok) {
			puts("No");
			return 0;
		}
	}
	puts("Yes");
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	B
	.align 4
	.type	B, @object
	.size	B, 4
B:
	.zero	4
	.globl	C
	.align 4
	.type	C, @object
	.size	C, 4
C:
	.zero	4
	.globl	D
	.align 4
	.type	D, @object
	.size	D, 4
D:
	.zero	4
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 271828
S:
	.zero	271828
	.section	.rodata
.LC0:
	.string	"%d%d%d%d%d"
.LC1:
	.string	"%271827s"
.LC2:
	.string	"error!"
.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
	subq	$16, %rsp
	leaq	D(%rip), %r9
	leaq	C(%rip), %r8
	leaq	B(%rip), %rax
	movq	%rax, %rcx
	leaq	A(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$5, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	leaq	S(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L4
	movl	$1, %eax
	jmp	.L3
.L4:
	movl	A(%rip), %edx
	movl	B(%rip), %eax
	cmpl	%eax, %edx
	jl	.L5
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$2, %eax
	jmp	.L3
.L5:
	movl	A(%rip), %eax
	subl	$1, %eax
	movl	%eax, A(%rip)
	movl	B(%rip), %eax
	subl	$1, %eax
	movl	%eax, B(%rip)
	movl	C(%rip), %eax
	subl	$1, %eax
	movl	%eax, C(%rip)
	movl	D(%rip), %eax
	subl	$1, %eax
	movl	%eax, D(%rip)
	movl	C(%rip), %edx
	movl	D(%rip), %eax
	cmpl	%eax, %edx
	je	.L6
	movl	C(%rip), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	jne	.L6
	movl	D(%rip), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L7
.L6:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L8
.L7:
	movl	C(%rip), %edx
	movl	D(%rip), %eax
	cmpl	%eax, %edx
	jge	.L9
	movl	A(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L10
.L12:
	movl	-8(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L11
	movl	-8(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L11
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L3
.L11:
	addl	$1, -8(%rbp)
.L10:
	movl	C(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L12
	movl	B(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L13
.L15:
	movl	-8(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L14
	movl	-8(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L14
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L3
.L14:
	addl	$1, -8(%rbp)
.L13:
	movl	D(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L15
	jmp	.L8
.L9:
	movl	$0, -4(%rbp)
	movl	A(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L16
.L18:
	movl	-8(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L17
	movl	-8(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L17
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L3
.L17:
	addl	$1, -8(%rbp)
.L16:
	movl	C(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L18
	movl	B(%rip), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L19
.L22:
	movl	-8(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	jne	.L20
	movl	-8(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	jne	.L20
	movl	-8(%rbp), %eax
	addl	$2, %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	jne	.L20
	movl	$1, -4(%rbp)
	jmp	.L21
.L20:
	addl	$1, -8(%rbp)
.L19:
	movl	D(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L22
.L21:
	cmpl	$0, -4(%rbp)
	jne	.L8
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L3
.L8:
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L3:
	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
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	A
	.align 4
	.type	A, @object
	.size	A, 4
A:
	.zero	4
	.globl	B
	.align 4
	.type	B, @object
	.size	B, 4
B:
	.zero	4
	.globl	C
	.align 4
	.type	C, @object
	.size	C, 4
C:
	.zero	4
	.globl	D
	.align 4
	.type	D, @object
	.size	D, 4
D:
	.zero	4
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 271828
S:
	.zero	271828
	.section	.rodata
.LC0:
	.string	"%d%d%d%d%d"
.LC1:
	.string	"%271827s"
.LC2:
	.string	"error!"
.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
	subq	$16, %rsp
	leaq	D(%rip), %r9
	leaq	C(%rip), %r8
	leaq	B(%rip), %rax
	movq	%rax, %rcx
	leaq	A(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$5, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	leaq	S(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L4
	movl	$1, %eax
	jmp	.L3
.L4:
	movl	A(%rip), %edx
	movl	B(%rip), %eax
	cmpl	%eax, %edx
	jl	.L5
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$2, %eax
	jmp	.L3
.L5:
	movl	A(%rip), %eax
	subl	$1, %eax
	movl	%eax, A(%rip)
	movl	B(%rip), %eax
	subl	$1, %eax
	movl	%eax, B(%rip)
	movl	C(%rip), %eax
	subl	$1, %eax
	movl	%eax, C(%rip)
	movl	D(%rip), %eax
	subl	$1, %eax
	movl	%eax, D(%rip)
	movl	C(%rip), %edx
	movl	D(%rip), %eax
	cmpl	%eax, %edx
	je	.L6
	movl	C(%rip), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	jne	.L6
	movl	D(%rip), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L7
.L6:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L8
.L7:
	movl	C(%rip), %edx
	movl	D(%rip), %eax
	cmpl	%eax, %edx
	jge	.L9
	movl	A(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L10
.L12:
	movl	-8(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L11
	movl	-8(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L11
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L3
.L11:
	addl	$1, -8(%rbp)
.L10:
	movl	C(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L12
	movl	B(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L13
.L15:
	movl	-8(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L14
	movl	-8(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L14
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L3
.L14:
	addl	$1, -8(%rbp)
.L13:
	movl	D(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L15
	jmp	.L8
.L9:
	movl	$0, -4(%rbp)
	movl	A(%rip), %eax
	movl	%eax, -8(%rbp)
	jmp	.L16
.L18:
	movl	-8(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L17
	movl	-8(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	je	.L17
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L3
.L17:
	addl	$1, -8(%rbp)
.L16:
	movl	C(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L18
	movl	B(%rip), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L19
.L22:
	movl	-8(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	jne	.L20
	movl	-8(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	jne	.L20
	movl	-8(%rbp), %eax
	addl	$2, %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$46, %al
	jne	.L20
	movl	$1, -4(%rbp)
	jmp	.L21
.L20:
	addl	$1, -8(%rbp)
.L19:
	movl	D(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L22
.L21:
	cmpl	$0, -4(%rbp)
	jne	.L8
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L3
.L8:
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L3:
	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:
