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>
#include<string.h>

int main(void)
{
	int grid[3][3], a[3], b[3];
	for (int i = 0; i < 3; i++) {
		for (int j = 0; j < 3; j++) {
			scanf("%d", &grid[i][j]);
		}
	}

	a[0] = 0;
	b[0] = grid[0][0] - a[0];
	a[1] = grid[1][0] - b[0];
	b[1] = grid[0][1] - a[0];
	a[2] = grid[2][0] - b[0];
	b[2] = grid[0][2] - a[0];
	
	for (int i = 0; i < 3; i++) {
		for (int j = 0; j < 3; j++) {
			if (grid[i][j] != (a[i] + b[j])) {
				printf("No\n");
				return 0;
			}
		}
	}

	printf("Yes\n");
	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$48, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	leaq	36(%rsp), %r12
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	4(%rbx), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	8(%rbx), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$12, %rbx
	cmpq	%r12, %rbx
	jne	.L2
	movl	4(%rsp), %ecx
	movl	12(%rsp), %eax
	subl	(%rsp), %eax
	movl	24(%rsp), %edx
	movl	8(%rsp), %esi
	subl	(%rsp), %edx
	leal	(%rax,%rcx), %edi
	cmpl	%edi, 16(%rsp)
	jne	.L3
	addl	%esi, %eax
	cmpl	%eax, 20(%rsp)
	jne	.L3
	addl	%edx, %ecx
	cmpl	%ecx, 28(%rsp)
	jne	.L3
	addl	%esi, %edx
	cmpl	%edx, 32(%rsp)
	jne	.L3
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L5:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L3:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L5
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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	"No"
.LC2:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$48, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	leaq	36(%rsp), %r12
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	4(%rbx), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	8(%rbx), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$12, %rbx
	cmpq	%r12, %rbx
	jne	.L2
	movl	4(%rsp), %ecx
	movl	12(%rsp), %eax
	subl	(%rsp), %eax
	movl	24(%rsp), %edx
	movl	8(%rsp), %esi
	subl	(%rsp), %edx
	leal	(%rax,%rcx), %edi
	cmpl	%edi, 16(%rsp)
	jne	.L3
	addl	%esi, %eax
	cmpl	%eax, 20(%rsp)
	jne	.L3
	addl	%edx, %ecx
	cmpl	%ecx, 28(%rsp)
	jne	.L3
	addl	%esi, %edx
	cmpl	%edx, 32(%rsp)
	jne	.L3
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L5:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L3:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L5
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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	"No"
.LC2:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$48, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	leaq	36(%rsp), %r12
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	4(%rbx), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	8(%rbx), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$12, %rbx
	cmpq	%r12, %rbx
	jne	.L2
	movl	4(%rsp), %ecx
	movl	12(%rsp), %eax
	subl	(%rsp), %eax
	movl	24(%rsp), %edx
	movl	8(%rsp), %esi
	subl	(%rsp), %edx
	leal	(%rax,%rcx), %edi
	cmpl	%edi, 16(%rsp)
	jne	.L3
	addl	%esi, %eax
	cmpl	%eax, 20(%rsp)
	jne	.L3
	addl	%edx, %ecx
	cmpl	%ecx, 28(%rsp)
	jne	.L3
	addl	%esi, %edx
	cmpl	%edx, 32(%rsp)
	jne	.L3
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L5:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L3:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L5
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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>
#include<string.h>

int main(void)
{
	int grid[3][3], a[3], b[3];
	for (int i = 0; i < 3; i++) {
		for (int j = 0; j < 3; j++) {
			scanf("%d", &grid[i][j]);
		}
	}

	a[0] = 0;
	b[0] = grid[0][0] - a[0];
	a[1] = grid[1][0] - b[0];
	b[1] = grid[0][1] - a[0];
	a[2] = grid[2][0] - b[0];
	b[2] = grid[0][2] - a[0];
	
	for (int i = 0; i < 3; i++) {
		for (int j = 0; j < 3; j++) {
			if (grid[i][j] != (a[i] + b[j])) {
				printf("No\n");
				return 0;
			}
		}
	}

	printf("Yes\n");
	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>
#include<string.h>

int main(void)
{
	int grid[3][3], a[3], b[3];
	for (int i = 0; i < 3; i++) {
		for (int j = 0; j < 3; j++) {
			scanf("%d", &grid[i][j]);
		}
	}

	a[0] = 0;
	b[0] = grid[0][0] - a[0];
	a[1] = grid[1][0] - b[0];
	b[1] = grid[0][1] - a[0];
	a[2] = grid[2][0] - b[0];
	b[2] = grid[0][2] - a[0];
	
	for (int i = 0; i < 3; i++) {
		for (int j = 0; j < 3; j++) {
			if (grid[i][j] != (a[i] + b[j])) {
				printf("No\n");
				return 0;
			}
		}
	}

	printf("Yes\n");
	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:

1 0 1
4 1 2
1 0 1
 1 8 6
2 9 7
1 7 7
 0 8 8
0 8 8
0 0 8
 2 2 2
2 1 0
2 2 2
 1 0 1
4 1 2
0 0 1
 1 8 6
4 9 7
1 7 7
 0 8 2
0 8 8
0 0 8
 2 2 2
2 1 -1
2 2 2
 1 0 1
4 1 4
0 0 1
 1 8 6
6 9 7
1 7 7

No
 No
 No
 No
 No
 No
 No
 No
 No
 No

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>
#include<string.h>

int main(void)
{
	int grid[3][3], a[3], b[3];
	for (int i = 0; i < 3; i++) {
		for (int j = 0; j < 3; j++) {
			scanf("%d", &grid[i][j]);
		}
	}

	a[0] = 0;
	b[0] = grid[0][0] - a[0];
	a[1] = grid[1][0] - b[0];
	b[1] = grid[0][1] - a[0];
	a[2] = grid[2][0] - b[0];
	b[2] = grid[0][2] - a[0];
	
	for (int i = 0; i < 3; i++) {
		for (int j = 0; j < 3; j++) {
			if (grid[i][j] != (a[i] + b[j])) {
				printf("No\n");
				return 0;
			}
		}
	}

	printf("Yes\n");
	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$48, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	leaq	36(%rsp), %r12
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	4(%rbx), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	8(%rbx), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$12, %rbx
	cmpq	%r12, %rbx
	jne	.L2
	movl	4(%rsp), %ecx
	movl	12(%rsp), %eax
	subl	(%rsp), %eax
	movl	24(%rsp), %edx
	movl	8(%rsp), %esi
	subl	(%rsp), %edx
	leal	(%rax,%rcx), %edi
	cmpl	%edi, 16(%rsp)
	jne	.L3
	addl	%esi, %eax
	cmpl	%eax, 20(%rsp)
	jne	.L3
	addl	%edx, %ecx
	cmpl	%ecx, 28(%rsp)
	jne	.L3
	addl	%esi, %edx
	cmpl	%edx, 32(%rsp)
	jne	.L3
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L5:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L3:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L5
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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	"No"
.LC2:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$48, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	leaq	36(%rsp), %r12
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	4(%rbx), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	8(%rbx), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$12, %rbx
	cmpq	%r12, %rbx
	jne	.L2
	movl	4(%rsp), %ecx
	movl	12(%rsp), %eax
	subl	(%rsp), %eax
	movl	24(%rsp), %edx
	movl	8(%rsp), %esi
	subl	(%rsp), %edx
	leal	(%rax,%rcx), %edi
	cmpl	%edi, 16(%rsp)
	jne	.L3
	addl	%esi, %eax
	cmpl	%eax, 20(%rsp)
	jne	.L3
	addl	%edx, %ecx
	cmpl	%ecx, 28(%rsp)
	jne	.L3
	addl	%esi, %edx
	cmpl	%edx, 32(%rsp)
	jne	.L3
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L5:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L3:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L5
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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:
```