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;
int x[51];
long long int dp[51][5050];
int main(){
  int i,j;
  int X;
  scanf("%d %d",&N,&A);X=A;
  for(i=1;i<=N;i++){
    scanf("%d",&x[i]);
    if(X<x[i])X=x[i];
    x[i]-=A;
  }
 
  dp[0][N*X]=1;
  for(i=1;i<=N;i++){
    for(j=0;j<=2*N*X;j++){
      dp[i][j]=dp[i-1][j]+dp[i-1][j-x[i]];
    }
    
  }

 
  
  printf("%lld\n",dp[N][N*X]-1);
  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	x
	.align 32
	.type	x, @object
	.size	x, 204
x:
	.zero	204
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 2060400
dp:
	.zero	2060400
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\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
	subq	$16, %rsp
	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
	movl	A(%rip), %eax
	movl	%eax, -4(%rbp)
	movl	$1, -12(%rbp)
	jmp	.L2
.L4:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jge	.L3
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
.L3:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	A(%rip), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L2:
	movl	N(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L4
	movl	N(%rip), %eax
	imull	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	$1, (%rdx,%rax)
	movl	$1, -12(%rbp)
	jmp	.L5
.L8:
	movl	$0, -8(%rbp)
	jmp	.L6
.L7:
	movl	-12(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$5050, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-12(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rdx
	movslq	%ecx, %rax
	imulq	$5050, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	leaq	(%rsi,%rax), %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movl	-12(%rbp), %eax
	cltq
	imulq	$5050, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L6:
	movl	N(%rip), %eax
	imull	-4(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -8(%rbp)
	jle	.L7
	addl	$1, -12(%rbp)
.L5:
	movl	N(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L8
	movl	N(%rip), %edx
	movl	N(%rip), %eax
	imull	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$5050, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	subq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	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"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	A(%rip), %rdx
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %rdi
	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
	call	__isoc99_scanf@PLT
	movl	N(%rip), %r12d
	movl	A(%rip), %ebp
	testl	%r12d, %r12d
	jle	.L2
	leaq	4+x(%rip), %rbx
	movl	$1, %r14d
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%rbx), %eax
	movl	N(%rip), %r12d
	cmpl	%eax, %ebp
	cmovl	%eax, %ebp
	subl	A(%rip), %eax
	addl	$1, %r14d
	addq	$4, %rbx
	movl	%eax, -4(%rbx)
	cmpl	%r14d, %r12d
	jge	.L3
	imull	%r12d, %ebp
	leaq	dp(%rip), %rsi
	movslq	%ebp, %rax
	movq	%rax, 16(%rsp)
	movq	$1, (%rsi,%rax,8)
	testl	%r12d, %r12d
	jle	.L4
	movl	%ebp, %edi
	addl	%edi, %edi
	movl	%edi, 4(%rsp)
	js	.L4
	leal	1(%rdi), %eax
	leal	1(%r12), %edx
	movl	%r12d, 28(%rsp)
	movq	%rsi, %r9
	movl	%eax, 24(%rsp)
	movl	%edi, %eax
	movl	%edi, %r11d
	movl	$5050, %r13d
	shrl	%eax
	movl	$40400, %ebp
	movl	$1, %r10d
	movq	%rdx, %r12
	leal	-1(%rax), %ebx
	movslq	%edi, %rax
	movq	%rax, %r8
	leaq	8(,%rax,8), %rax
	addq	$1, %rbx
	movq	%rax, 8(%rsp)
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	x(%rip), %rax
	movslq	%r10d, %rdx
	movslq	(%rax,%r10,4), %rcx
	leal	-1(%r10), %eax
	movq	%rcx, %rdi
	leaq	40392(,%rcx,8), %rcx
	testq	%rcx, %rcx
	je	.L13
	cmpl	$1, 4(%rsp)
	jbe	.L13
	movl	%edi, %ecx
	leaq	40400(%r9), %r14
	negl	%ecx
	movslq	%ecx, %rcx
	addq	%r13, %rcx
	leaq	-40400(%rsi,%rcx,8), %r15
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L7:
	movdqu	(%r15,%rcx), %xmm0
	paddq	(%r9,%rcx), %xmm0
	movaps	%xmm0, (%r14,%rcx)
	addq	$16, %rcx
	cmpq	%rbx, %rcx
	jne	.L7
	cmpl	%r11d, 24(%rsp)
	je	.L10
	cltq
	imulq	$5050, %rdx, %rdx
	movl	%r11d, %ecx
	imulq	$5050, %rax, %rax
	subl	%edi, %ecx
	movslq	%ecx, %rcx
	addq	%r8, %rdx
	addq	%rax, %rcx
	addq	%r8, %rax
	movq	(%rsi,%rax,8), %rax
	addq	(%rsi,%rcx,8), %rax
	movq	%rax, (%rsi,%rdx,8)
.L10:
	addq	$1, %r10
	movq	%r14, %r9
	addq	$40400, %rbp
	addq	$5050, %r13
	cmpq	%r12, %r10
	jne	.L6
	movl	28(%rsp), %r12d
.L4:
	movslq	%r12d, %rax
	movl	$1, %edi
	imulq	$5050, %rax, %rax
	addq	16(%rsp), %rax
	movq	(%rsi,%rax,8), %rdx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	subq	$1, %rdx
	call	__printf_chk@PLT
	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
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	movq	8(%rsp), %rax
	movl	$40400, %r14d
	negl	%edi
	subq	%rbp, %r14
	movslq	%edi, %rdi
	leaq	(%rax,%r9), %r15
	movq	%r9, %rax
	.p2align 4,,10
	.p2align 3
.L9:
	movq	(%rax), %rdx
	leaq	(%r14,%rax), %rcx
	addq	(%rax,%rdi,8), %rdx
	addq	$8, %rax
	movq	%rdx, (%rcx,%rbp)
	cmpq	%r15, %rax
	jne	.L9
	leaq	40400(%r9), %r14
	jmp	.L10
.L2:
	imull	%r12d, %ebp
	leaq	dp(%rip), %rsi
	movslq	%ebp, %rax
	movq	%rax, 16(%rsp)
	movq	$1, (%rsi,%rax,8)
	jmp	.L4
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 2060400
dp:
	.zero	2060400
	.globl	x
	.align 32
	.type	x, @object
	.size	x, 204
x:
	.zero	204
	.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"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	A(%rip), %rdx
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %rdi
	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
	call	__isoc99_scanf@PLT
	movl	N(%rip), %r12d
	movl	A(%rip), %ebp
	testl	%r12d, %r12d
	jle	.L2
	leaq	4+x(%rip), %rbx
	movl	$1, %r14d
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%rbx), %eax
	movl	N(%rip), %r12d
	cmpl	%eax, %ebp
	cmovl	%eax, %ebp
	subl	A(%rip), %eax
	addl	$1, %r14d
	addq	$4, %rbx
	movl	%eax, -4(%rbx)
	cmpl	%r14d, %r12d
	jge	.L3
	imull	%r12d, %ebp
	leaq	dp(%rip), %rsi
	movslq	%ebp, %rax
	movq	%rax, 16(%rsp)
	movq	$1, (%rsi,%rax,8)
	testl	%r12d, %r12d
	jle	.L4
	movl	%ebp, %edi
	addl	%edi, %edi
	movl	%edi, 4(%rsp)
	js	.L4
	leal	1(%rdi), %eax
	leal	1(%r12), %edx
	movl	%r12d, 28(%rsp)
	movq	%rsi, %r9
	movl	%eax, 24(%rsp)
	movl	%edi, %eax
	movl	%edi, %r11d
	movl	$5050, %r13d
	shrl	%eax
	movl	$40400, %ebp
	movl	$1, %r10d
	movq	%rdx, %r12
	leal	-1(%rax), %ebx
	movslq	%edi, %rax
	movq	%rax, %r8
	leaq	8(,%rax,8), %rax
	addq	$1, %rbx
	movq	%rax, 8(%rsp)
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	x(%rip), %rax
	movslq	%r10d, %rdx
	movslq	(%rax,%r10,4), %rcx
	leal	-1(%r10), %eax
	movq	%rcx, %rdi
	leaq	40392(,%rcx,8), %rcx
	testq	%rcx, %rcx
	je	.L13
	cmpl	$1, 4(%rsp)
	jbe	.L13
	movl	%edi, %ecx
	leaq	40400(%r9), %r14
	negl	%ecx
	movslq	%ecx, %rcx
	addq	%r13, %rcx
	leaq	-40400(%rsi,%rcx,8), %r15
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L7:
	movdqu	(%r15,%rcx), %xmm0
	paddq	(%r9,%rcx), %xmm0
	movaps	%xmm0, (%r14,%rcx)
	addq	$16, %rcx
	cmpq	%rbx, %rcx
	jne	.L7
	cmpl	%r11d, 24(%rsp)
	je	.L10
	cltq
	imulq	$5050, %rdx, %rdx
	movl	%r11d, %ecx
	imulq	$5050, %rax, %rax
	subl	%edi, %ecx
	movslq	%ecx, %rcx
	addq	%r8, %rdx
	addq	%rax, %rcx
	addq	%r8, %rax
	movq	(%rsi,%rax,8), %rax
	addq	(%rsi,%rcx,8), %rax
	movq	%rax, (%rsi,%rdx,8)
.L10:
	addq	$1, %r10
	movq	%r14, %r9
	addq	$40400, %rbp
	addq	$5050, %r13
	cmpq	%r12, %r10
	jne	.L6
	movl	28(%rsp), %r12d
.L4:
	movslq	%r12d, %rax
	movl	$1, %edi
	imulq	$5050, %rax, %rax
	addq	16(%rsp), %rax
	movq	(%rsi,%rax,8), %rdx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	subq	$1, %rdx
	call	__printf_chk@PLT
	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
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	movq	8(%rsp), %rax
	movl	$40400, %r14d
	negl	%edi
	subq	%rbp, %r14
	movslq	%edi, %rdi
	leaq	(%rax,%r9), %r15
	movq	%r9, %rax
	.p2align 4,,10
	.p2align 3
.L9:
	movq	(%rax), %rdx
	leaq	(%r14,%rax), %rcx
	addq	(%rax,%rdi,8), %rdx
	addq	$8, %rax
	movq	%rdx, (%rcx,%rbp)
	cmpq	%r15, %rax
	jne	.L9
	leaq	40400(%r9), %r14
	jmp	.L10
.L2:
	imull	%r12d, %ebp
	leaq	dp(%rip), %rsi
	movslq	%ebp, %rax
	movq	%rax, 16(%rsp)
	movq	$1, (%rsi,%rax,8)
	jmp	.L4
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 2060400
dp:
	.zero	2060400
	.globl	x
	.align 32
	.type	x, @object
	.size	x, 204
x:
	.zero	204
	.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;
int x[51];
long long int dp[51][5050];
int main(){
  int i,j;
  int X;
  scanf("%d %d",&N,&A);X=A;
  for(i=1;i<=N;i++){
    scanf("%d",&x[i]);
    if(X<x[i])X=x[i];
    x[i]-=A;
  }
 
  dp[0][N*X]=1;
  for(i=1;i<=N;i++){
    for(j=0;j<=2*N*X;j++){
      dp[i][j]=dp[i-1][j]+dp[i-1][j-x[i]];
    }
    
  }

 
  
  printf("%lld\n",dp[N][N*X]-1);
  return 0;
}

4 8
7 12 8 9
 3 8
9 6 9
 33 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 1 3 3 3 3
 8 5
3 6 2 8 7 2 5 9
 3 8
15 6 9
 33 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 1 3 3 3 3 3 3 3 3 3 3 3 1 3 3 3 3
 8 5
3 6 2 8 7 2 5 16
 33 3
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 1 0 3 3 3 3 3 3 3 3 3 3 1 3 3 3 3
 8 5
3 6 2 8 3 2 5 16
 8 8
3 6 2 8 3 2 5 16

3
 1
 4294967295
 25
 0
 2147483647
 17
 1073741823
 7
 9

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;
int x[51];
long long int dp[51][5050];
int main(){
  int i,j;
  int X;
  scanf("%d %d",&N,&A);X=A;
  for(i=1;i<=N;i++){
    scanf("%d",&x[i]);
    if(X<x[i])X=x[i];
    x[i]-=A;
  }
 
  dp[0][N*X]=1;
  for(i=1;i<=N;i++){
    for(j=0;j<=2*N*X;j++){
      dp[i][j]=dp[i-1][j]+dp[i-1][j-x[i]];
    }
    
  }

 
  
  printf("%lld\n",dp[N][N*X]-1);
  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	x
	.align 32
	.type	x, @object
	.size	x, 204
x:
	.zero	204
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 2060400
dp:
	.zero	2060400
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\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
	subq	$16, %rsp
	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
	movl	A(%rip), %eax
	movl	%eax, -4(%rbp)
	movl	$1, -12(%rbp)
	jmp	.L2
.L4:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jge	.L3
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
.L3:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	A(%rip), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L2:
	movl	N(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L4
	movl	N(%rip), %eax
	imull	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	$1, (%rdx,%rax)
	movl	$1, -12(%rbp)
	jmp	.L5
.L8:
	movl	$0, -8(%rbp)
	jmp	.L6
.L7:
	movl	-12(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$5050, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-12(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rdx
	movslq	%ecx, %rax
	imulq	$5050, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	leaq	(%rsi,%rax), %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movl	-12(%rbp), %eax
	cltq
	imulq	$5050, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L6:
	movl	N(%rip), %eax
	imull	-4(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -8(%rbp)
	jle	.L7
	addl	$1, -12(%rbp)
.L5:
	movl	N(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L8
	movl	N(%rip), %edx
	movl	N(%rip), %eax
	imull	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$5050, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	subq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	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	x
	.align 32
	.type	x, @object
	.size	x, 204
x:
	.zero	204
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 2060400
dp:
	.zero	2060400
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\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
	subq	$16, %rsp
	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
	movl	A(%rip), %eax
	movl	%eax, -4(%rbp)
	movl	$1, -12(%rbp)
	jmp	.L2
.L4:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jge	.L3
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
.L3:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	A(%rip), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L2:
	movl	N(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L4
	movl	N(%rip), %eax
	imull	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	$1, (%rdx,%rax)
	movl	$1, -12(%rbp)
	jmp	.L5
.L8:
	movl	$0, -8(%rbp)
	jmp	.L6
.L7:
	movl	-12(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$5050, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-12(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rdx
	movslq	%ecx, %rax
	imulq	$5050, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	leaq	(%rsi,%rax), %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movl	-12(%rbp), %eax
	cltq
	imulq	$5050, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L6:
	movl	N(%rip), %eax
	imull	-4(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -8(%rbp)
	jle	.L7
	addl	$1, -12(%rbp)
.L5:
	movl	N(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L8
	movl	N(%rip), %edx
	movl	N(%rip), %eax
	imull	-4(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$5050, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	subq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	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:
