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 a,b,N,i,ren = 0;
    scanf("%d",&N);
    
    for(i = 0;i < N;i ++){
        scanf("%d %d",&a,&b);
        if((a < 1 || a > 6) || (b < 1 || a > 6)) return 0;
        if(a == b){
            ren ++;
        }else{
            ren = 0;
        }
        if(ren == 3){
            printf("Yes\n");
            return 0;
        }
    }
    printf("No\n");
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.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
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -12(%rbp)
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L2
.L9:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	jle	.L3
	movl	-28(%rbp), %eax
	cmpl	$6, %eax
	jg	.L3
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jle	.L3
	movl	-28(%rbp), %eax
	cmpl	$6, %eax
	jle	.L4
.L3:
	movl	$0, %eax
	jmp	.L10
.L4:
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L6
	addl	$1, -12(%rbp)
	jmp	.L7
.L6:
	movl	$0, -12(%rbp)
.L7:
	cmpl	$3, -12(%rbp)
	jne	.L8
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L10
.L8:
	addl	$1, -16(%rbp)
.L2:
	movl	-20(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L9
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L10:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"Yes"
.LC3:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebp, %ebp
	leaq	16(%rsp), %r14
	leaq	12(%rsp), %r13
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L7:
	xorl	%ebp, %ebp
.L4:
	addl	$1, %ebx
	cmpl	%ebx, 20(%rsp)
	jle	.L2
.L5:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	leal	-1(%rax), %edx
	cmpl	$5, %edx
	ja	.L3
	movl	16(%rsp), %edx
	testl	%edx, %edx
	jle	.L3
	cmpl	%edx, %eax
	jne	.L7
	addl	$1, %ebp
	cmpl	$3, %ebp
	jne	.L4
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L3
.L11:
	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"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"Yes"
.LC3:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebp, %ebp
	leaq	16(%rsp), %r14
	leaq	12(%rsp), %r13
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L7:
	xorl	%ebp, %ebp
.L4:
	addl	$1, %ebx
	cmpl	%ebx, 20(%rsp)
	jle	.L2
.L5:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	leal	-1(%rax), %edx
	cmpl	$5, %edx
	ja	.L3
	movl	16(%rsp), %edx
	testl	%edx, %edx
	jle	.L3
	cmpl	%edx, %eax
	jne	.L7
	addl	$1, %ebp
	cmpl	$3, %ebp
	jne	.L4
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L3
.L11:
	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(void){
    int a,b,N,i,ren = 0;
    scanf("%d",&N);
    
    for(i = 0;i < N;i ++){
        scanf("%d %d",&a,&b);
        if((a < 1 || a > 6) || (b < 1 || a > 6)) return 0;
        if(a == b){
            ren ++;
        }else{
            ren = 0;
        }
        if(ren == 3){
            printf("Yes\n");
            return 0;
        }
    }
    printf("No\n");
    return 0;
}

5
1 2
6 6
4 4
3 3
3 3
 5
1 2
2 2
3 4
5 5
6 6
 6
1 1
2 2
3 3
4 4
5 5
10 6
 5
1 2
6 6
4 1
3 3
3 2
 5
1 2
2 2
3 4
9 5
6 6
 6
1 0
2 2
3 3
4 4
5 5
10 6
 5
1 0
6 6
4 1
3 3
3 2
 5
1 2
2 2
3 4
9 5
0 6
 6
1 0
2 2
3 3
4 4
5 5
10 10
 5
1 0
6 6
4 1
3 0
3 2

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(void){
    int a,b,N,i,ren = 0;
    scanf("%d",&N);
    
    for(i = 0;i < N;i ++){
        scanf("%d %d",&a,&b);
        if((a < 1 || a > 6) || (b < 1 || a > 6)) return 0;
        if(a == b){
            ren ++;
        }else{
            ren = 0;
        }
        if(ren == 3){
            printf("Yes\n");
            return 0;
        }
    }
    printf("No\n");
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.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
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -12(%rbp)
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L2
.L9:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	jle	.L3
	movl	-28(%rbp), %eax
	cmpl	$6, %eax
	jg	.L3
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jle	.L3
	movl	-28(%rbp), %eax
	cmpl	$6, %eax
	jle	.L4
.L3:
	movl	$0, %eax
	jmp	.L10
.L4:
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L6
	addl	$1, -12(%rbp)
	jmp	.L7
.L6:
	movl	$0, -12(%rbp)
.L7:
	cmpl	$3, -12(%rbp)
	jne	.L8
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L10
.L8:
	addl	$1, -16(%rbp)
.L2:
	movl	-20(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L9
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L10:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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"
.LC1:
	.string	"%d %d"
.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
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -12(%rbp)
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L2
.L9:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	jle	.L3
	movl	-28(%rbp), %eax
	cmpl	$6, %eax
	jg	.L3
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jle	.L3
	movl	-28(%rbp), %eax
	cmpl	$6, %eax
	jle	.L4
.L3:
	movl	$0, %eax
	jmp	.L10
.L4:
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L6
	addl	$1, -12(%rbp)
	jmp	.L7
.L6:
	movl	$0, -12(%rbp)
.L7:
	cmpl	$3, -12(%rbp)
	jne	.L8
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L10
.L8:
	addl	$1, -16(%rbp)
.L2:
	movl	-20(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L9
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L10:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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:
