Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<stdlib.h>
int main() {
	int N;
	int man = 0, dis = 0;
	scanf("%d", &N);
	int *T = (int *)malloc(sizeof(int)*N);
	int *X = (int *)malloc(sizeof(int)*N);
	int *Y = (int *)malloc(sizeof(int)*N);
	T[0] = 0, X[0] = 0, Y[0] = 0;
	for (int i = 1; i < N+1; i++)
	{
		scanf("%d%d%d", &T[i], &X[i], &Y[i]);
	}
	for (int i = 1; i < N+1; i++)
	{
		man = abs(X[i] - X[i - 1]) + abs(Y[i] - Y[i - 1]);
		dis = T[i] - T[i - 1];
		//man = 4;
		//dis = 5;
		if (man > dis || (dis - man >= 0 && (dis - man) % 2 == 1))
		{
			puts("No");
			return 0;
		}
	}
	puts("Yes");
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rbp
	movq	%rbp, %r13
	salq	$2, %rbp
	movq	%rbp, %rdi
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, %r12
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, %rbx
	movq	%rax, (%rsp)
	call	malloc@PLT
	movl	$0, (%r12)
	movq	%rax, 8(%rsp)
	movl	$0, (%rbx)
	movl	$0, (%rax)
	testl	%r13d, %r13d
	jle	.L2
	leaq	4(%r12), %rbp
	leaq	4(%rbx), %rbx
	movl	$1, %r13d
	leaq	4(%rax), %r15
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rcx
	movq	%rbx, %rdx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	addq	$4, %rbp
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %r9d
	addq	$4, %r15
	cmpl	%r13d, %r9d
	jge	.L3
	testl	%r9d, %r9d
	jle	.L2
	movq	8(%rsp), %rax
	movl	(%r12), %r8d
	movl	$1, %edx
	movl	(%rax), %edi
	movq	(%rsp), %rax
	movl	(%rax), %esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L13:
	subl	%eax, %ecx
	andl	$1, %ecx
	jne	.L4
	addq	$1, %rdx
	cmpl	%edx, %r9d
	jl	.L2
.L7:
	movq	(%rsp), %rbx
	movl	%esi, %eax
	movl	%edi, %r11d
	movl	(%rbx,%rdx,4), %esi
	movq	8(%rsp), %rbx
	movl	%esi, %ecx
	movl	(%rbx,%rdx,4), %edi
	subl	%eax, %ecx
	movl	%ecx, %eax
	movl	%edi, %r10d
	negl	%eax
	cmovs	%ecx, %eax
	subl	%r11d, %r10d
	movl	%r10d, %ecx
	negl	%ecx
	cmovs	%r10d, %ecx
	movl	%r8d, %r10d
	movl	(%r12,%rdx,4), %r8d
	addl	%ecx, %eax
	movl	%r8d, %ecx
	subl	%r10d, %ecx
	cmpl	%ecx, %eax
	jle	.L13
.L4:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L6:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L6
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rbp
	movq	%rbp, %r13
	salq	$2, %rbp
	movq	%rbp, %rdi
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, %r12
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, %rbx
	movq	%rax, (%rsp)
	call	malloc@PLT
	movl	$0, (%r12)
	movq	%rax, 8(%rsp)
	movl	$0, (%rbx)
	movl	$0, (%rax)
	testl	%r13d, %r13d
	jle	.L2
	leaq	4(%r12), %rbp
	leaq	4(%rbx), %rbx
	movl	$1, %r13d
	leaq	4(%rax), %r15
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rcx
	movq	%rbx, %rdx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	addq	$4, %rbp
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %r9d
	addq	$4, %r15
	cmpl	%r13d, %r9d
	jge	.L3
	testl	%r9d, %r9d
	jle	.L2
	movq	8(%rsp), %rax
	movl	(%r12), %r8d
	movl	$1, %edx
	movl	(%rax), %edi
	movq	(%rsp), %rax
	movl	(%rax), %esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L13:
	subl	%eax, %ecx
	andl	$1, %ecx
	jne	.L4
	addq	$1, %rdx
	cmpl	%edx, %r9d
	jl	.L2
.L7:
	movq	(%rsp), %rbx
	movl	%esi, %eax
	movl	%edi, %r11d
	movl	(%rbx,%rdx,4), %esi
	movq	8(%rsp), %rbx
	movl	%esi, %ecx
	movl	(%rbx,%rdx,4), %edi
	subl	%eax, %ecx
	movl	%ecx, %eax
	movl	%edi, %r10d
	negl	%eax
	cmovs	%ecx, %eax
	subl	%r11d, %r10d
	movl	%r10d, %ecx
	negl	%ecx
	cmovs	%r10d, %ecx
	movl	%r8d, %r10d
	movl	(%r12,%rdx,4), %r8d
	addl	%ecx, %eax
	movl	%r8d, %ecx
	subl	%r10d, %ecx
	cmpl	%ecx, %eax
	jle	.L13
.L4:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L6:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L6
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rbp
	movq	%rbp, %r13
	salq	$2, %rbp
	movq	%rbp, %rdi
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, %r12
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, %rbx
	movq	%rax, (%rsp)
	call	malloc@PLT
	movl	$0, (%r12)
	movq	%rax, 8(%rsp)
	movl	$0, (%rbx)
	movl	$0, (%rax)
	testl	%r13d, %r13d
	jle	.L2
	leaq	4(%r12), %rbp
	leaq	4(%rbx), %rbx
	movl	$1, %r13d
	leaq	4(%rax), %r15
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rcx
	movq	%rbx, %rdx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	addq	$4, %rbp
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %r9d
	addq	$4, %r15
	cmpl	%r13d, %r9d
	jge	.L3
	testl	%r9d, %r9d
	jle	.L2
	movq	8(%rsp), %rax
	movl	(%r12), %r8d
	movl	$1, %edx
	movl	(%rax), %edi
	movq	(%rsp), %rax
	movl	(%rax), %esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L13:
	subl	%eax, %ecx
	andl	$1, %ecx
	jne	.L4
	addq	$1, %rdx
	cmpl	%edx, %r9d
	jl	.L2
.L7:
	movq	(%rsp), %rbx
	movl	%esi, %eax
	movl	%edi, %r11d
	movl	(%rbx,%rdx,4), %esi
	movq	8(%rsp), %rbx
	movl	%esi, %ecx
	movl	(%rbx,%rdx,4), %edi
	subl	%eax, %ecx
	movl	%ecx, %eax
	movl	%edi, %r10d
	negl	%eax
	cmovs	%ecx, %eax
	subl	%r11d, %r10d
	movl	%r10d, %ecx
	negl	%ecx
	cmovs	%r10d, %ecx
	movl	%r8d, %r10d
	movl	(%r12,%rdx,4), %r8d
	addl	%ecx, %eax
	movl	%r8d, %ecx
	subl	%r10d, %ecx
	cmpl	%ecx, %eax
	jle	.L13
.L4:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L6:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L6
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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:
```
```c
#include<stdio.h>
#include<stdlib.h>
int main() {
	int N;
	int man = 0, dis = 0;
	scanf("%d", &N);
	int *T = (int *)malloc(sizeof(int)*N);
	int *X = (int *)malloc(sizeof(int)*N);
	int *Y = (int *)malloc(sizeof(int)*N);
	T[0] = 0, X[0] = 0, Y[0] = 0;
	for (int i = 1; i < N+1; i++)
	{
		scanf("%d%d%d", &T[i], &X[i], &Y[i]);
	}
	for (int i = 1; i < N+1; i++)
	{
		man = abs(X[i] - X[i - 1]) + abs(Y[i] - Y[i - 1]);
		dis = T[i] - T[i - 1];
		//man = 4;
		//dis = 5;
		if (man > dis || (dis - man >= 0 && (dis - man) % 2 == 1))
		{
			puts("No");
			return 0;
		}
	}
	puts("Yes");
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<stdlib.h>
int main() {
	int N;
	int man = 0, dis = 0;
	scanf("%d", &N);
	int *T = (int *)malloc(sizeof(int)*N);
	int *X = (int *)malloc(sizeof(int)*N);
	int *Y = (int *)malloc(sizeof(int)*N);
	T[0] = 0, X[0] = 0, Y[0] = 0;
	for (int i = 1; i < N+1; i++)
	{
		scanf("%d%d%d", &T[i], &X[i], &Y[i]);
	}
	for (int i = 1; i < N+1; i++)
	{
		man = abs(X[i] - X[i - 1]) + abs(Y[i] - Y[i - 1]);
		dis = T[i] - T[i - 1];
		//man = 4;
		//dis = 5;
		if (man > dis || (dis - man >= 0 && (dis - man) % 2 == 1))
		{
			puts("No");
			return 0;
		}
	}
	puts("Yes");
	return 0;
}```

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.
Optimized Assembly Code:

2
3 1 2
6 1 1

Yes

Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<stdlib.h>
int main() {
	int N;
	int man = 0, dis = 0;
	scanf("%d", &N);
	int *T = (int *)malloc(sizeof(int)*N);
	int *X = (int *)malloc(sizeof(int)*N);
	int *Y = (int *)malloc(sizeof(int)*N);
	T[0] = 0, X[0] = 0, Y[0] = 0;
	for (int i = 1; i < N+1; i++)
	{
		scanf("%d%d%d", &T[i], &X[i], &Y[i]);
	}
	for (int i = 1; i < N+1; i++)
	{
		man = abs(X[i] - X[i - 1]) + abs(Y[i] - Y[i - 1]);
		dis = T[i] - T[i - 1];
		//man = 4;
		//dis = 5;
		if (man > dis || (dis - man >= 0 && (dis - man) % 2 == 1))
		{
			puts("No");
			return 0;
		}
	}
	puts("Yes");
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rbp
	movq	%rbp, %r13
	salq	$2, %rbp
	movq	%rbp, %rdi
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, %r12
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, %rbx
	movq	%rax, (%rsp)
	call	malloc@PLT
	movl	$0, (%r12)
	movq	%rax, 8(%rsp)
	movl	$0, (%rbx)
	movl	$0, (%rax)
	testl	%r13d, %r13d
	jle	.L2
	leaq	4(%r12), %rbp
	leaq	4(%rbx), %rbx
	movl	$1, %r13d
	leaq	4(%rax), %r15
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rcx
	movq	%rbx, %rdx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	addq	$4, %rbp
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %r9d
	addq	$4, %r15
	cmpl	%r13d, %r9d
	jge	.L3
	testl	%r9d, %r9d
	jle	.L2
	movq	8(%rsp), %rax
	movl	(%r12), %r8d
	movl	$1, %edx
	movl	(%rax), %edi
	movq	(%rsp), %rax
	movl	(%rax), %esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L13:
	subl	%eax, %ecx
	andl	$1, %ecx
	jne	.L4
	addq	$1, %rdx
	cmpl	%edx, %r9d
	jl	.L2
.L7:
	movq	(%rsp), %rbx
	movl	%esi, %eax
	movl	%edi, %r11d
	movl	(%rbx,%rdx,4), %esi
	movq	8(%rsp), %rbx
	movl	%esi, %ecx
	movl	(%rbx,%rdx,4), %edi
	subl	%eax, %ecx
	movl	%ecx, %eax
	movl	%edi, %r10d
	negl	%eax
	cmovs	%ecx, %eax
	subl	%r11d, %r10d
	movl	%r10d, %ecx
	negl	%ecx
	cmovs	%r10d, %ecx
	movl	%r8d, %r10d
	movl	(%r12,%rdx,4), %r8d
	addl	%ecx, %eax
	movl	%r8d, %ecx
	subl	%r10d, %ecx
	cmpl	%ecx, %eax
	jle	.L13
.L4:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L6:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L6
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rbp
	movq	%rbp, %r13
	salq	$2, %rbp
	movq	%rbp, %rdi
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, %r12
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, %rbx
	movq	%rax, (%rsp)
	call	malloc@PLT
	movl	$0, (%r12)
	movq	%rax, 8(%rsp)
	movl	$0, (%rbx)
	movl	$0, (%rax)
	testl	%r13d, %r13d
	jle	.L2
	leaq	4(%r12), %rbp
	leaq	4(%rbx), %rbx
	movl	$1, %r13d
	leaq	4(%rax), %r15
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rcx
	movq	%rbx, %rdx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	addq	$4, %rbp
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %r9d
	addq	$4, %r15
	cmpl	%r13d, %r9d
	jge	.L3
	testl	%r9d, %r9d
	jle	.L2
	movq	8(%rsp), %rax
	movl	(%r12), %r8d
	movl	$1, %edx
	movl	(%rax), %edi
	movq	(%rsp), %rax
	movl	(%rax), %esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L13:
	subl	%eax, %ecx
	andl	$1, %ecx
	jne	.L4
	addq	$1, %rdx
	cmpl	%edx, %r9d
	jl	.L2
.L7:
	movq	(%rsp), %rbx
	movl	%esi, %eax
	movl	%edi, %r11d
	movl	(%rbx,%rdx,4), %esi
	movq	8(%rsp), %rbx
	movl	%esi, %ecx
	movl	(%rbx,%rdx,4), %edi
	subl	%eax, %ecx
	movl	%ecx, %eax
	movl	%edi, %r10d
	negl	%eax
	cmovs	%ecx, %eax
	subl	%r11d, %r10d
	movl	%r10d, %ecx
	negl	%ecx
	cmovs	%r10d, %ecx
	movl	%r8d, %r10d
	movl	(%r12,%rdx,4), %r8d
	addl	%ecx, %eax
	movl	%r8d, %ecx
	subl	%r10d, %ecx
	cmpl	%ecx, %eax
	jle	.L13
.L4:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L6:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L6
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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:
```