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 n,m,q,i,j,d[510][510]={};
  int s[510][510]={};
  scanf("%d %d %d",&n,&m,&q);
  while(m--){
    scanf("%d %d",&i,&j);
    d[i][j]++;
  }
  for(i=505;i--;){
    for(j=1;j<505;j++)s[i][j]=d[i][j]-s[i+1][j-1]+s[i+1][j]+s[i][j-1];
  }
  while(q--){
    scanf("%d %d",&i,&j);
    printf("%d\n",s[i][j]);
  }
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.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	-2080768(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2080816(%rbp), %rax
	movl	$1040400, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-1040416(%rbp), %rax
	movl	$1040400, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-2080828(%rbp), %rcx
	leaq	-2080832(%rbp), %rdx
	leaq	-2080836(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L3:
	leaq	-2080820(%rbp), %rdx
	leaq	-2080824(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2080824(%rbp), %edx
	movl	-2080820(%rbp), %ecx
	movslq	%ecx, %rdi
	movslq	%edx, %rsi
	movq	%rsi, %rax
	salq	$8, %rax
	subq	%rsi, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	-2080816(%rbp,%rax,4), %eax
	leal	1(%rax), %esi
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	%esi, -2080816(%rbp,%rax,4)
.L2:
	movl	-2080832(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -2080832(%rbp)
	testl	%eax, %eax
	jne	.L3
	movl	$505, -2080824(%rbp)
	jmp	.L4
.L7:
	movl	$1, -2080820(%rbp)
	jmp	.L5
.L6:
	movl	-2080824(%rbp), %eax
	movl	-2080820(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-2080816(%rbp,%rax,4), %ecx
	movl	-2080824(%rbp), %eax
	leal	1(%rax), %edx
	movl	-2080820(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-1040416(%rbp,%rax,4), %eax
	movl	%ecx, %esi
	subl	%eax, %esi
	movl	-2080824(%rbp), %eax
	leal	1(%rax), %edx
	movl	-2080820(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-1040416(%rbp,%rax,4), %eax
	addl	%eax, %esi
	movl	-2080824(%rbp), %eax
	movl	-2080820(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-1040416(%rbp,%rax,4), %ecx
	movl	-2080824(%rbp), %eax
	movl	-2080820(%rbp), %edx
	addl	%esi, %ecx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%ecx, -1040416(%rbp,%rax,4)
	movl	-2080820(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -2080820(%rbp)
.L5:
	movl	-2080820(%rbp), %eax
	cmpl	$504, %eax
	jle	.L6
.L4:
	movl	-2080824(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -2080824(%rbp)
	testl	%eax, %eax
	jne	.L7
	jmp	.L8
.L9:
	leaq	-2080820(%rbp), %rdx
	leaq	-2080824(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2080824(%rbp), %eax
	movl	-2080820(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-1040416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	movl	-2080828(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -2080828(%rbp)
	testl	%eax, %eax
	jne	.L9
	movl	$0, %eax
	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 %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-2080768(%rsp), %r11
	.cfi_def_cfa 11, 2080808
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$88, %rsp
	.cfi_def_cfa_offset 2080896
	movl	$1040400, %edx
	xorl	%esi, %esi
	leaq	.LC1(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 2080840(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rdi
	leaq	28(%rsp), %r12
	call	memset@PLT
	leaq	1040432(%rsp), %rdi
	movl	$1040400, %edx
	xorl	%esi, %esi
	call	memset@PLT
	leaq	16(%rsp), %rdx
	xorl	%eax, %eax
	leaq	20(%rsp), %rcx
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %eax
	leaq	24(%rsp), %rbp
	leal	-1(%rax), %edx
	movl	%edx, 16(%rsp)
	testl	%eax, %eax
	je	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	24(%rsp), %rdx
	movslq	28(%rsp), %rcx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	leaq	(%rcx,%rax,2), %rax
	addl	$1, 32(%rsp,%rax,4)
	movl	16(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 16(%rsp)
	testl	%eax, %eax
	jne	.L2
.L4:
	movl	$504, 24(%rsp)
	leaq	2070636(%rsp), %r10
	leaq	1030212(%rsp), %r8
	movl	$1028160, %edi
	movq	$-1030200, %r9
	.p2align 4,,10
	.p2align 3
.L3:
	movl	-2044(%r10), %esi
	leaq	-2016(%r8), %rcx
	movq	%r10, %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rcx), %eax
	subl	-4(%rdx), %eax
	addq	$4, %rcx
	addl	(%rdx), %eax
	addl	%eax, %esi
	leaq	(%r9,%rdx), %rax
	addq	$4, %rdx
	movl	%esi, (%rax,%rdi)
	cmpq	%rcx, %r8
	jne	.L5
	subq	$2040, %rdi
	subq	$2040, %r10
	addq	$2040, %r9
	subq	$2040, %r8
	cmpq	$-2040, %rdi
	jne	.L3
	movl	20(%rsp), %eax
	leaq	28(%rsp), %r12
	leaq	24(%rsp), %rbp
	movl	$505, 28(%rsp)
	movl	$-1, 24(%rsp)
	leaq	.LC1(%rip), %rbx
	leaq	.LC2(%rip), %r13
	leal	-1(%rax), %edx
	movl	%edx, 20(%rsp)
	testl	%eax, %eax
	je	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	24(%rsp), %rdx
	movslq	28(%rsp), %rcx
	movq	%r13, %rsi
	movl	$1, %edi
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	leaq	(%rcx,%rax,2), %rax
	movl	1040432(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	20(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 20(%rsp)
	testl	%eax, %eax
	jne	.L6
.L7:
	movq	2080840(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$2080856, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	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	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-2080768(%rsp), %r11
	.cfi_def_cfa 11, 2080808
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$88, %rsp
	.cfi_def_cfa_offset 2080896
	movl	$1040400, %edx
	xorl	%esi, %esi
	leaq	.LC1(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 2080840(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rdi
	leaq	28(%rsp), %r12
	call	memset@PLT
	leaq	1040432(%rsp), %rdi
	movl	$1040400, %edx
	xorl	%esi, %esi
	call	memset@PLT
	leaq	16(%rsp), %rdx
	xorl	%eax, %eax
	leaq	20(%rsp), %rcx
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %eax
	leaq	24(%rsp), %rbp
	leal	-1(%rax), %edx
	movl	%edx, 16(%rsp)
	testl	%eax, %eax
	je	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	24(%rsp), %rdx
	movslq	28(%rsp), %rcx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	leaq	(%rcx,%rax,2), %rax
	addl	$1, 32(%rsp,%rax,4)
	movl	16(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 16(%rsp)
	testl	%eax, %eax
	jne	.L2
.L4:
	movl	$504, 24(%rsp)
	leaq	2070636(%rsp), %r10
	leaq	1030212(%rsp), %r8
	movl	$1028160, %edi
	movq	$-1030200, %r9
	.p2align 4,,10
	.p2align 3
.L3:
	movl	-2044(%r10), %esi
	leaq	-2016(%r8), %rcx
	movq	%r10, %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rcx), %eax
	subl	-4(%rdx), %eax
	addq	$4, %rcx
	addl	(%rdx), %eax
	addl	%eax, %esi
	leaq	(%r9,%rdx), %rax
	addq	$4, %rdx
	movl	%esi, (%rax,%rdi)
	cmpq	%rcx, %r8
	jne	.L5
	subq	$2040, %rdi
	subq	$2040, %r10
	addq	$2040, %r9
	subq	$2040, %r8
	cmpq	$-2040, %rdi
	jne	.L3
	movl	20(%rsp), %eax
	leaq	28(%rsp), %r12
	leaq	24(%rsp), %rbp
	movl	$505, 28(%rsp)
	movl	$-1, 24(%rsp)
	leaq	.LC1(%rip), %rbx
	leaq	.LC2(%rip), %r13
	leal	-1(%rax), %edx
	movl	%edx, 20(%rsp)
	testl	%eax, %eax
	je	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	24(%rsp), %rdx
	movslq	28(%rsp), %rcx
	movq	%r13, %rsi
	movl	$1, %edi
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	leaq	(%rcx,%rax,2), %rax
	movl	1040432(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	20(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 20(%rsp)
	testl	%eax, %eax
	jne	.L6
.L7:
	movq	2080840(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$2080856, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	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 n,m,q,i,j,d[510][510]={};
  int s[510][510]={};
  scanf("%d %d %d",&n,&m,&q);
  while(m--){
    scanf("%d %d",&i,&j);
    d[i][j]++;
  }
  for(i=505;i--;){
    for(j=1;j<505;j++)s[i][j]=d[i][j]-s[i+1][j-1]+s[i+1][j]+s[i][j-1];
  }
  while(q--){
    scanf("%d %d",&i,&j);
    printf("%d\n",s[i][j]);
  }
  return 0;
}

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

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

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 n,m,q,i,j,d[510][510]={};
  int s[510][510]={};
  scanf("%d %d %d",&n,&m,&q);
  while(m--){
    scanf("%d %d",&i,&j);
    d[i][j]++;
  }
  for(i=505;i--;){
    for(j=1;j<505;j++)s[i][j]=d[i][j]-s[i+1][j-1]+s[i+1][j]+s[i][j-1];
  }
  while(q--){
    scanf("%d %d",&i,&j);
    printf("%d\n",s[i][j]);
  }
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.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	-2080768(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2080816(%rbp), %rax
	movl	$1040400, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-1040416(%rbp), %rax
	movl	$1040400, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-2080828(%rbp), %rcx
	leaq	-2080832(%rbp), %rdx
	leaq	-2080836(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L3:
	leaq	-2080820(%rbp), %rdx
	leaq	-2080824(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2080824(%rbp), %edx
	movl	-2080820(%rbp), %ecx
	movslq	%ecx, %rdi
	movslq	%edx, %rsi
	movq	%rsi, %rax
	salq	$8, %rax
	subq	%rsi, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	-2080816(%rbp,%rax,4), %eax
	leal	1(%rax), %esi
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	%esi, -2080816(%rbp,%rax,4)
.L2:
	movl	-2080832(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -2080832(%rbp)
	testl	%eax, %eax
	jne	.L3
	movl	$505, -2080824(%rbp)
	jmp	.L4
.L7:
	movl	$1, -2080820(%rbp)
	jmp	.L5
.L6:
	movl	-2080824(%rbp), %eax
	movl	-2080820(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-2080816(%rbp,%rax,4), %ecx
	movl	-2080824(%rbp), %eax
	leal	1(%rax), %edx
	movl	-2080820(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-1040416(%rbp,%rax,4), %eax
	movl	%ecx, %esi
	subl	%eax, %esi
	movl	-2080824(%rbp), %eax
	leal	1(%rax), %edx
	movl	-2080820(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-1040416(%rbp,%rax,4), %eax
	addl	%eax, %esi
	movl	-2080824(%rbp), %eax
	movl	-2080820(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-1040416(%rbp,%rax,4), %ecx
	movl	-2080824(%rbp), %eax
	movl	-2080820(%rbp), %edx
	addl	%esi, %ecx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%ecx, -1040416(%rbp,%rax,4)
	movl	-2080820(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -2080820(%rbp)
.L5:
	movl	-2080820(%rbp), %eax
	cmpl	$504, %eax
	jle	.L6
.L4:
	movl	-2080824(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -2080824(%rbp)
	testl	%eax, %eax
	jne	.L7
	jmp	.L8
.L9:
	leaq	-2080820(%rbp), %rdx
	leaq	-2080824(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2080824(%rbp), %eax
	movl	-2080820(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-1040416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	movl	-2080828(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -2080828(%rbp)
	testl	%eax, %eax
	jne	.L9
	movl	$0, %eax
	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 %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.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	-2080768(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-2080816(%rbp), %rax
	movl	$1040400, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-1040416(%rbp), %rax
	movl	$1040400, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-2080828(%rbp), %rcx
	leaq	-2080832(%rbp), %rdx
	leaq	-2080836(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L3:
	leaq	-2080820(%rbp), %rdx
	leaq	-2080824(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2080824(%rbp), %edx
	movl	-2080820(%rbp), %ecx
	movslq	%ecx, %rdi
	movslq	%edx, %rsi
	movq	%rsi, %rax
	salq	$8, %rax
	subq	%rsi, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	-2080816(%rbp,%rax,4), %eax
	leal	1(%rax), %esi
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	%esi, -2080816(%rbp,%rax,4)
.L2:
	movl	-2080832(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -2080832(%rbp)
	testl	%eax, %eax
	jne	.L3
	movl	$505, -2080824(%rbp)
	jmp	.L4
.L7:
	movl	$1, -2080820(%rbp)
	jmp	.L5
.L6:
	movl	-2080824(%rbp), %eax
	movl	-2080820(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-2080816(%rbp,%rax,4), %ecx
	movl	-2080824(%rbp), %eax
	leal	1(%rax), %edx
	movl	-2080820(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-1040416(%rbp,%rax,4), %eax
	movl	%ecx, %esi
	subl	%eax, %esi
	movl	-2080824(%rbp), %eax
	leal	1(%rax), %edx
	movl	-2080820(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-1040416(%rbp,%rax,4), %eax
	addl	%eax, %esi
	movl	-2080824(%rbp), %eax
	movl	-2080820(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-1040416(%rbp,%rax,4), %ecx
	movl	-2080824(%rbp), %eax
	movl	-2080820(%rbp), %edx
	addl	%esi, %ecx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%ecx, -1040416(%rbp,%rax,4)
	movl	-2080820(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -2080820(%rbp)
.L5:
	movl	-2080820(%rbp), %eax
	cmpl	$504, %eax
	jle	.L6
.L4:
	movl	-2080824(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -2080824(%rbp)
	testl	%eax, %eax
	jne	.L7
	jmp	.L8
.L9:
	leaq	-2080820(%rbp), %rdx
	leaq	-2080824(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-2080824(%rbp), %eax
	movl	-2080820(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$8, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-1040416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	movl	-2080828(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -2080828(%rbp)
	testl	%eax, %eax
	jne	.L9
	movl	$0, %eax
	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:
