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>

#define N 50
#define X 50

int main() {
	static long long dp[N + 1][N * X + 1];
	int n, a, h, i, j;
	long long cnt;

	scanf("%d%d", &n, &a);
	dp[0][0] = 1;
	for (h = 1; h <= n; h++) {
		int x;

		scanf("%d", &x);
		for (i = h; i > 0; i--)
			for (j = x; j <= i * X; j++)
				dp[i][j] += dp[i - 1][j - x];
	}
	cnt = 0;
	for (i = 1; i <= n; i++)
		cnt += dp[i][i * a];
	printf("%lld\n", cnt);
	return 0;
}
```

Assembly Code:

```assembly
	.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	.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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rdx
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	movq	$1, dp.0(%rip)
	testl	%eax, %eax
	jle	.L14
	leaq	36(%rsp), %rax
	movl	$2501, %r12d
	movl	$1, %ebp
	movq	%rax, 8(%rsp)
	leaq	dp.0(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movslq	36(%rsp), %rax
	imull	$50, %ebp, %r8d
	movl	%ebp, %esi
	leaq	20000(,%rax,8), %rdx
	leaq	(%rax,%r12), %r11
	movq	%rax, %r10
	subl	%eax, %r8d
	testq	%rdx, %rdx
	leaq	(%rbx,%r11,8), %rcx
	setne	%r14b
	negq	%rax
	leaq	0(,%rax,8), %r13
	movq	%r13, %rax
	subq	$20008, %r13
	subq	%rbx, %rax
	subq	$20008, %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%r8,%r10), %edx
	movslq	%esi, %rax
	subl	$1, %esi
	cmpl	%edx, %r10d
	jg	.L10
	cmpl	$1, %r8d
	jbe	.L7
	testb	%r14b, %r14b
	je	.L7
	leal	1(%r8), %r15d
	leaq	0(%r13,%rcx), %r9
	xorl	%edx, %edx
	movl	%r15d, %edi
	shrl	%edi
	salq	$4, %rdi
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rcx,%rdx), %xmm0
	movdqu	(%r9,%rdx), %xmm1
	paddq	%xmm1, %xmm0
	movups	%xmm0, (%rcx,%rdx)
	addq	$16, %rdx
	cmpq	%rdi, %rdx
	jne	.L8
	movl	%r15d, %edx
	andl	$-2, %edx
	leal	(%r10,%rdx), %edi
	cmpl	%edx, %r15d
	je	.L10
	imulq	$2501, %rax, %rax
	movslq	%edi, %rdi
	addq	%rdi, %rax
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	$2501, %rdx, %rdx
	addq	%rdi, %rdx
	movq	(%rbx,%rdx,8), %rdx
	addq	%rdx, (%rbx,%rax,8)
.L10:
	subq	$20008, %rcx
	subl	$50, %r8d
	subq	$2501, %r11
	testl	%esi, %esi
	jne	.L5
	movl	28(%rsp), %edx
	addl	$1, %ebp
	addq	$2501, %r12
	cmpl	%ebp, %edx
	jge	.L2
	testl	%edx, %edx
	jle	.L14
	movslq	32(%rsp), %rax
	cmpl	$1, %eax
	jne	.L36
	subl	$1, %edx
	leaq	20016+dp.0(%rip), %rax
	xorl	%r8d, %r8d
	imulq	$20016, %rdx, %rdx
	leaq	40032(%rbx,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L18:
	addq	(%rax), %r8
	addq	$20016, %rax
	cmpq	%rdx, %rax
	jne	.L18
.L3:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L37
	addq	$56, %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
.L7:
	.cfi_restore_state
	movl	%r8d, %eax
	leaq	8+dp.0(%rip), %rdi
	addq	%r11, %rax
	leaq	(%rdi,%rax,8), %r15
	movq	(%rsp), %rax
	movq	%rbx, %rdi
	subq	%rcx, %rdi
	leaq	(%rax,%rcx), %r9
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	(%rdi,%rax), %rdx
	movq	(%rdx,%r9), %rdx
	addq	%rdx, (%rax)
	addq	$8, %rax
	cmpq	%r15, %rax
	jne	.L12
	jmp	.L10
.L36:
	leaq	20008(,%rax,8), %rsi
	addl	$1, %edx
	xorl	%r8d, %r8d
	movl	$1, %eax
	leaq	-20008(%rbx,%rsi), %rcx
.L16:
	addl	$1, %eax
	addq	20008(%rcx), %r8
	addq	%rsi, %rcx
	cmpl	%edx, %eax
	jne	.L16
	jmp	.L3
.L14:
	xorl	%r8d, %r8d
	jmp	.L3
.L37:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.local	dp.0
	.comm	dp.0,1020408,32
	.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%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	.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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rdx
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	movq	$1, dp.0(%rip)
	testl	%eax, %eax
	jle	.L14
	leaq	36(%rsp), %rax
	movl	$2501, %r12d
	movl	$1, %ebp
	movq	%rax, 8(%rsp)
	leaq	dp.0(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movslq	36(%rsp), %rax
	imull	$50, %ebp, %r8d
	movl	%ebp, %esi
	leaq	20000(,%rax,8), %rdx
	leaq	(%rax,%r12), %r11
	movq	%rax, %r10
	subl	%eax, %r8d
	testq	%rdx, %rdx
	leaq	(%rbx,%r11,8), %rcx
	setne	%r14b
	negq	%rax
	leaq	0(,%rax,8), %r13
	movq	%r13, %rax
	subq	$20008, %r13
	subq	%rbx, %rax
	subq	$20008, %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%r8,%r10), %edx
	movslq	%esi, %rax
	subl	$1, %esi
	cmpl	%edx, %r10d
	jg	.L10
	cmpl	$1, %r8d
	jbe	.L7
	testb	%r14b, %r14b
	je	.L7
	leal	1(%r8), %r15d
	leaq	0(%r13,%rcx), %r9
	xorl	%edx, %edx
	movl	%r15d, %edi
	shrl	%edi
	salq	$4, %rdi
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rcx,%rdx), %xmm0
	movdqu	(%r9,%rdx), %xmm1
	paddq	%xmm1, %xmm0
	movups	%xmm0, (%rcx,%rdx)
	addq	$16, %rdx
	cmpq	%rdi, %rdx
	jne	.L8
	movl	%r15d, %edx
	andl	$-2, %edx
	leal	(%r10,%rdx), %edi
	cmpl	%edx, %r15d
	je	.L10
	imulq	$2501, %rax, %rax
	movslq	%edi, %rdi
	addq	%rdi, %rax
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	$2501, %rdx, %rdx
	addq	%rdi, %rdx
	movq	(%rbx,%rdx,8), %rdx
	addq	%rdx, (%rbx,%rax,8)
.L10:
	subq	$20008, %rcx
	subl	$50, %r8d
	subq	$2501, %r11
	testl	%esi, %esi
	jne	.L5
	movl	28(%rsp), %edx
	addl	$1, %ebp
	addq	$2501, %r12
	cmpl	%ebp, %edx
	jge	.L2
	testl	%edx, %edx
	jle	.L14
	movslq	32(%rsp), %rax
	cmpl	$1, %eax
	jne	.L36
	subl	$1, %edx
	leaq	20016+dp.0(%rip), %rax
	xorl	%r8d, %r8d
	imulq	$20016, %rdx, %rdx
	leaq	40032(%rbx,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L18:
	addq	(%rax), %r8
	addq	$20016, %rax
	cmpq	%rdx, %rax
	jne	.L18
.L3:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L37
	addq	$56, %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
.L7:
	.cfi_restore_state
	movl	%r8d, %eax
	leaq	8+dp.0(%rip), %rdi
	addq	%r11, %rax
	leaq	(%rdi,%rax,8), %r15
	movq	(%rsp), %rax
	movq	%rbx, %rdi
	subq	%rcx, %rdi
	leaq	(%rax,%rcx), %r9
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	(%rdi,%rax), %rdx
	movq	(%rdx,%r9), %rdx
	addq	%rdx, (%rax)
	addq	$8, %rax
	cmpq	%r15, %rax
	jne	.L12
	jmp	.L10
.L36:
	leaq	20008(,%rax,8), %rsi
	addl	$1, %edx
	xorl	%r8d, %r8d
	movl	$1, %eax
	leaq	-20008(%rbx,%rsi), %rcx
.L16:
	addl	$1, %eax
	addq	20008(%rcx), %r8
	addq	%rsi, %rcx
	cmpl	%edx, %eax
	jne	.L16
	jmp	.L3
.L14:
	xorl	%r8d, %r8d
	jmp	.L3
.L37:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.local	dp.0
	.comm	dp.0,1020408,32
	.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%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	.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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rdx
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	movq	$1, dp.0(%rip)
	testl	%eax, %eax
	jle	.L14
	leaq	36(%rsp), %rax
	movl	$2501, %r12d
	movl	$1, %ebp
	movq	%rax, 8(%rsp)
	leaq	dp.0(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movslq	36(%rsp), %rax
	imull	$50, %ebp, %r8d
	movl	%ebp, %esi
	leaq	20000(,%rax,8), %rdx
	leaq	(%rax,%r12), %r11
	movq	%rax, %r10
	subl	%eax, %r8d
	testq	%rdx, %rdx
	leaq	(%rbx,%r11,8), %rcx
	setne	%r14b
	negq	%rax
	leaq	0(,%rax,8), %r13
	movq	%r13, %rax
	subq	$20008, %r13
	subq	%rbx, %rax
	subq	$20008, %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%r8,%r10), %edx
	movslq	%esi, %rax
	subl	$1, %esi
	cmpl	%edx, %r10d
	jg	.L10
	cmpl	$1, %r8d
	jbe	.L7
	testb	%r14b, %r14b
	je	.L7
	leal	1(%r8), %r15d
	leaq	0(%r13,%rcx), %r9
	xorl	%edx, %edx
	movl	%r15d, %edi
	shrl	%edi
	salq	$4, %rdi
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rcx,%rdx), %xmm0
	movdqu	(%r9,%rdx), %xmm1
	paddq	%xmm1, %xmm0
	movups	%xmm0, (%rcx,%rdx)
	addq	$16, %rdx
	cmpq	%rdi, %rdx
	jne	.L8
	movl	%r15d, %edx
	andl	$-2, %edx
	leal	(%r10,%rdx), %edi
	cmpl	%edx, %r15d
	je	.L10
	imulq	$2501, %rax, %rax
	movslq	%edi, %rdi
	addq	%rdi, %rax
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	$2501, %rdx, %rdx
	addq	%rdi, %rdx
	movq	(%rbx,%rdx,8), %rdx
	addq	%rdx, (%rbx,%rax,8)
.L10:
	subq	$20008, %rcx
	subl	$50, %r8d
	subq	$2501, %r11
	testl	%esi, %esi
	jne	.L5
	movl	28(%rsp), %edx
	addl	$1, %ebp
	addq	$2501, %r12
	cmpl	%ebp, %edx
	jge	.L2
	testl	%edx, %edx
	jle	.L14
	movslq	32(%rsp), %rax
	cmpl	$1, %eax
	jne	.L36
	subl	$1, %edx
	leaq	20016+dp.0(%rip), %rax
	xorl	%r8d, %r8d
	imulq	$20016, %rdx, %rdx
	leaq	40032(%rbx,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L18:
	addq	(%rax), %r8
	addq	$20016, %rax
	cmpq	%rdx, %rax
	jne	.L18
.L3:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L37
	addq	$56, %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
.L7:
	.cfi_restore_state
	movl	%r8d, %eax
	leaq	8+dp.0(%rip), %rdi
	addq	%r11, %rax
	leaq	(%rdi,%rax,8), %r15
	movq	(%rsp), %rax
	movq	%rbx, %rdi
	subq	%rcx, %rdi
	leaq	(%rax,%rcx), %r9
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	(%rdi,%rax), %rdx
	movq	(%rdx,%r9), %rdx
	addq	%rdx, (%rax)
	addq	$8, %rax
	cmpq	%r15, %rax
	jne	.L12
	jmp	.L10
.L36:
	leaq	20008(,%rax,8), %rsi
	addl	$1, %edx
	xorl	%r8d, %r8d
	movl	$1, %eax
	leaq	-20008(%rbx,%rsi), %rcx
.L16:
	addl	$1, %eax
	addq	20008(%rcx), %r8
	addq	%rsi, %rcx
	cmpl	%edx, %eax
	jne	.L16
	jmp	.L3
.L14:
	xorl	%r8d, %r8d
	jmp	.L3
.L37:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.local	dp.0
	.comm	dp.0,1020408,32
	.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>

#define N 50
#define X 50

int main() {
	static long long dp[N + 1][N * X + 1];
	int n, a, h, i, j;
	long long cnt;

	scanf("%d%d", &n, &a);
	dp[0][0] = 1;
	for (h = 1; h <= n; h++) {
		int x;

		scanf("%d", &x);
		for (i = h; i > 0; i--)
			for (j = x; j <= i * X; j++)
				dp[i][j] += dp[i - 1][j - x];
	}
	cnt = 0;
	for (i = 1; i <= n; i++)
		cnt += dp[i][i * a];
	printf("%lld\n", cnt);
	return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

#define N 50
#define X 50

int main() {
	static long long dp[N + 1][N * X + 1];
	int n, a, h, i, j;
	long long cnt;

	scanf("%d%d", &n, &a);
	dp[0][0] = 1;
	for (h = 1; h <= n; h++) {
		int x;

		scanf("%d", &x);
		for (i = h; i > 0; i--)
			for (j = x; j <= i * X; j++)
				dp[i][j] += dp[i - 1][j - x];
	}
	cnt = 0;
	for (i = 1; i <= n; i++)
		cnt += dp[i][i * a];
	printf("%lld\n", cnt);
	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:

4 8
7 9 8 9

5

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>

#define N 50
#define X 50

int main() {
	static long long dp[N + 1][N * X + 1];
	int n, a, h, i, j;
	long long cnt;

	scanf("%d%d", &n, &a);
	dp[0][0] = 1;
	for (h = 1; h <= n; h++) {
		int x;

		scanf("%d", &x);
		for (i = h; i > 0; i--)
			for (j = x; j <= i * X; j++)
				dp[i][j] += dp[i - 1][j - x];
	}
	cnt = 0;
	for (i = 1; i <= n; i++)
		cnt += dp[i][i * a];
	printf("%lld\n", cnt);
	return 0;
}
```

Assembly Code:

```assembly
	.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	.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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rdx
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	movq	$1, dp.0(%rip)
	testl	%eax, %eax
	jle	.L14
	leaq	36(%rsp), %rax
	movl	$2501, %r12d
	movl	$1, %ebp
	movq	%rax, 8(%rsp)
	leaq	dp.0(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movslq	36(%rsp), %rax
	imull	$50, %ebp, %r8d
	movl	%ebp, %esi
	leaq	20000(,%rax,8), %rdx
	leaq	(%rax,%r12), %r11
	movq	%rax, %r10
	subl	%eax, %r8d
	testq	%rdx, %rdx
	leaq	(%rbx,%r11,8), %rcx
	setne	%r14b
	negq	%rax
	leaq	0(,%rax,8), %r13
	movq	%r13, %rax
	subq	$20008, %r13
	subq	%rbx, %rax
	subq	$20008, %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%r8,%r10), %edx
	movslq	%esi, %rax
	subl	$1, %esi
	cmpl	%edx, %r10d
	jg	.L10
	cmpl	$1, %r8d
	jbe	.L7
	testb	%r14b, %r14b
	je	.L7
	leal	1(%r8), %r15d
	leaq	0(%r13,%rcx), %r9
	xorl	%edx, %edx
	movl	%r15d, %edi
	shrl	%edi
	salq	$4, %rdi
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rcx,%rdx), %xmm0
	movdqu	(%r9,%rdx), %xmm1
	paddq	%xmm1, %xmm0
	movups	%xmm0, (%rcx,%rdx)
	addq	$16, %rdx
	cmpq	%rdi, %rdx
	jne	.L8
	movl	%r15d, %edx
	andl	$-2, %edx
	leal	(%r10,%rdx), %edi
	cmpl	%edx, %r15d
	je	.L10
	imulq	$2501, %rax, %rax
	movslq	%edi, %rdi
	addq	%rdi, %rax
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	$2501, %rdx, %rdx
	addq	%rdi, %rdx
	movq	(%rbx,%rdx,8), %rdx
	addq	%rdx, (%rbx,%rax,8)
.L10:
	subq	$20008, %rcx
	subl	$50, %r8d
	subq	$2501, %r11
	testl	%esi, %esi
	jne	.L5
	movl	28(%rsp), %edx
	addl	$1, %ebp
	addq	$2501, %r12
	cmpl	%ebp, %edx
	jge	.L2
	testl	%edx, %edx
	jle	.L14
	movslq	32(%rsp), %rax
	cmpl	$1, %eax
	jne	.L36
	subl	$1, %edx
	leaq	20016+dp.0(%rip), %rax
	xorl	%r8d, %r8d
	imulq	$20016, %rdx, %rdx
	leaq	40032(%rbx,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L18:
	addq	(%rax), %r8
	addq	$20016, %rax
	cmpq	%rdx, %rax
	jne	.L18
.L3:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L37
	addq	$56, %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
.L7:
	.cfi_restore_state
	movl	%r8d, %eax
	leaq	8+dp.0(%rip), %rdi
	addq	%r11, %rax
	leaq	(%rdi,%rax,8), %r15
	movq	(%rsp), %rax
	movq	%rbx, %rdi
	subq	%rcx, %rdi
	leaq	(%rax,%rcx), %r9
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	(%rdi,%rax), %rdx
	movq	(%rdx,%r9), %rdx
	addq	%rdx, (%rax)
	addq	$8, %rax
	cmpq	%r15, %rax
	jne	.L12
	jmp	.L10
.L36:
	leaq	20008(,%rax,8), %rsi
	addl	$1, %edx
	xorl	%r8d, %r8d
	movl	$1, %eax
	leaq	-20008(%rbx,%rsi), %rcx
.L16:
	addl	$1, %eax
	addq	20008(%rcx), %r8
	addq	%rsi, %rcx
	cmpl	%edx, %eax
	jne	.L16
	jmp	.L3
.L14:
	xorl	%r8d, %r8d
	jmp	.L3
.L37:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.local	dp.0
	.comm	dp.0,1020408,32
	.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%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	.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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rdx
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	movq	$1, dp.0(%rip)
	testl	%eax, %eax
	jle	.L14
	leaq	36(%rsp), %rax
	movl	$2501, %r12d
	movl	$1, %ebp
	movq	%rax, 8(%rsp)
	leaq	dp.0(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movslq	36(%rsp), %rax
	imull	$50, %ebp, %r8d
	movl	%ebp, %esi
	leaq	20000(,%rax,8), %rdx
	leaq	(%rax,%r12), %r11
	movq	%rax, %r10
	subl	%eax, %r8d
	testq	%rdx, %rdx
	leaq	(%rbx,%r11,8), %rcx
	setne	%r14b
	negq	%rax
	leaq	0(,%rax,8), %r13
	movq	%r13, %rax
	subq	$20008, %r13
	subq	%rbx, %rax
	subq	$20008, %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%r8,%r10), %edx
	movslq	%esi, %rax
	subl	$1, %esi
	cmpl	%edx, %r10d
	jg	.L10
	cmpl	$1, %r8d
	jbe	.L7
	testb	%r14b, %r14b
	je	.L7
	leal	1(%r8), %r15d
	leaq	0(%r13,%rcx), %r9
	xorl	%edx, %edx
	movl	%r15d, %edi
	shrl	%edi
	salq	$4, %rdi
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rcx,%rdx), %xmm0
	movdqu	(%r9,%rdx), %xmm1
	paddq	%xmm1, %xmm0
	movups	%xmm0, (%rcx,%rdx)
	addq	$16, %rdx
	cmpq	%rdi, %rdx
	jne	.L8
	movl	%r15d, %edx
	andl	$-2, %edx
	leal	(%r10,%rdx), %edi
	cmpl	%edx, %r15d
	je	.L10
	imulq	$2501, %rax, %rax
	movslq	%edi, %rdi
	addq	%rdi, %rax
	movslq	%edx, %rdi
	movslq	%esi, %rdx
	imulq	$2501, %rdx, %rdx
	addq	%rdi, %rdx
	movq	(%rbx,%rdx,8), %rdx
	addq	%rdx, (%rbx,%rax,8)
.L10:
	subq	$20008, %rcx
	subl	$50, %r8d
	subq	$2501, %r11
	testl	%esi, %esi
	jne	.L5
	movl	28(%rsp), %edx
	addl	$1, %ebp
	addq	$2501, %r12
	cmpl	%ebp, %edx
	jge	.L2
	testl	%edx, %edx
	jle	.L14
	movslq	32(%rsp), %rax
	cmpl	$1, %eax
	jne	.L36
	subl	$1, %edx
	leaq	20016+dp.0(%rip), %rax
	xorl	%r8d, %r8d
	imulq	$20016, %rdx, %rdx
	leaq	40032(%rbx,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L18:
	addq	(%rax), %r8
	addq	$20016, %rax
	cmpq	%rdx, %rax
	jne	.L18
.L3:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L37
	addq	$56, %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
.L7:
	.cfi_restore_state
	movl	%r8d, %eax
	leaq	8+dp.0(%rip), %rdi
	addq	%r11, %rax
	leaq	(%rdi,%rax,8), %r15
	movq	(%rsp), %rax
	movq	%rbx, %rdi
	subq	%rcx, %rdi
	leaq	(%rax,%rcx), %r9
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	(%rdi,%rax), %rdx
	movq	(%rdx,%r9), %rdx
	addq	%rdx, (%rax)
	addq	$8, %rax
	cmpq	%r15, %rax
	jne	.L12
	jmp	.L10
.L36:
	leaq	20008(,%rax,8), %rsi
	addl	$1, %edx
	xorl	%r8d, %r8d
	movl	$1, %eax
	leaq	-20008(%rbx,%rsi), %rcx
.L16:
	addl	$1, %eax
	addq	20008(%rcx), %r8
	addq	%rsi, %rcx
	cmpl	%edx, %eax
	jne	.L16
	jmp	.L3
.L14:
	xorl	%r8d, %r8d
	jmp	.L3
.L37:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.local	dp.0
	.comm	dp.0,1020408,32
	.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:
```