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>

int main()
{
  int i,j,k;
  int dp[4001][4];
  for(i=1;i<5;i++)
    for(j=0;j<4001;j++)
      dp[j][i-1] = i==1&&j<=1000?1:0;

  for(i=2;i<=4;i++)
    for(j=0;j<=4000;j++)
      for(k=0;k<=j && k<=1000;k++)
	dp[j][i-1] += dp[j-k][i-2];

  int n;
  while(scanf("%d",&n) != EOF)
    printf("%d\n",dp[n][3]);
    
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC4:
	.string	"%d\n"
.LC5:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-61440(%rsp), %r11
	.cfi_def_cfa 11, 61472
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2608, %rsp
	.cfi_def_cfa_offset 64080
	movdqa	.LC0(%rip), %xmm0
	pxor	%xmm1, %xmm1
	movdqa	.LC1(%rip), %xmm4
	movdqa	.LC2(%rip), %xmm3
	movdqa	.LC3(%rip), %xmm2
	movq	%fs:40, %rax
	movq	%rax, 64040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r9
	movaps	%xmm0, 16(%rsp)
	movl	$4, %eax
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
.L2:
	movd	%eax, %xmm5
	movq	%rax, %rdx
	addq	$1, %rax
	pshufd	$0, %xmm5, %xmm0
	salq	$4, %rdx
	pcmpgtd	%xmm4, %xmm0
	pcmpeqd	%xmm1, %xmm0
	pand	%xmm3, %xmm0
	pand	%xmm2, %xmm0
	movaps	%xmm0, (%r9,%rdx)
	cmpq	$4001, %rax
	jne	.L2
	xorl	%r10d, %r10d
.L6:
	movq	%r9, %r8
	addq	$4, %r9
	xorl	%edi, %edi
	movq	%r9, %rsi
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$1000, %eax
	leaq	-16(%r8), %rcx
	movl	4(%r8), %edx
	cmpl	%eax, %edi
	cmovle	%edi, %eax
	cltq
	salq	$4, %rax
	subq	%rax, %rcx
	movq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L4:
	addl	(%rax), %edx
	subq	$16, %rax
	movl	%edx, (%rsi)
	cmpq	%rcx, %rax
	jne	.L4
	addl	$1, %edi
	addq	$16, %r8
	addq	$16, %rsi
	cmpl	$4001, %edi
	jne	.L8
	addq	$1, %r10
	cmpq	$3, %r10
	jne	.L6
	leaq	12(%rsp), %r12
	leaq	.LC5(%rip), %rbp
	leaq	.LC4(%rip), %rbx
	jmp	.L7
.L9:
	movslq	12(%rsp), %rax
	movq	%rbx, %rsi
	movl	$1, %edi
	salq	$4, %rax
	movl	28(%rsp,%rax), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L7:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L9
	movq	64040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$64048, %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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	0
	.long	0
	.long	0
	.align 16
.LC1:
	.long	1000
	.long	1000
	.long	1000
	.long	1000
	.align 16
.LC2:
	.long	-1
	.long	0
	.long	0
	.long	0
	.align 16
.LC3:
	.long	1
	.long	1
	.long	1
	.long	1
	.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
.LC4:
	.string	"%d\n"
.LC5:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-61440(%rsp), %r11
	.cfi_def_cfa 11, 61472
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2608, %rsp
	.cfi_def_cfa_offset 64080
	movdqa	.LC0(%rip), %xmm0
	pxor	%xmm1, %xmm1
	movdqa	.LC1(%rip), %xmm4
	movdqa	.LC2(%rip), %xmm3
	movdqa	.LC3(%rip), %xmm2
	movq	%fs:40, %rax
	movq	%rax, 64040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r9
	movaps	%xmm0, 16(%rsp)
	movl	$4, %eax
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
.L2:
	movd	%eax, %xmm5
	movq	%rax, %rdx
	addq	$1, %rax
	pshufd	$0, %xmm5, %xmm0
	salq	$4, %rdx
	pcmpgtd	%xmm4, %xmm0
	pcmpeqd	%xmm1, %xmm0
	pand	%xmm3, %xmm0
	pand	%xmm2, %xmm0
	movaps	%xmm0, (%r9,%rdx)
	cmpq	$4001, %rax
	jne	.L2
	xorl	%r10d, %r10d
.L6:
	movq	%r9, %r8
	addq	$4, %r9
	xorl	%edi, %edi
	movq	%r9, %rsi
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$1000, %eax
	leaq	-16(%r8), %rcx
	movl	4(%r8), %edx
	cmpl	%eax, %edi
	cmovle	%edi, %eax
	cltq
	salq	$4, %rax
	subq	%rax, %rcx
	movq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L4:
	addl	(%rax), %edx
	subq	$16, %rax
	movl	%edx, (%rsi)
	cmpq	%rcx, %rax
	jne	.L4
	addl	$1, %edi
	addq	$16, %r8
	addq	$16, %rsi
	cmpl	$4001, %edi
	jne	.L8
	addq	$1, %r10
	cmpq	$3, %r10
	jne	.L6
	leaq	12(%rsp), %r12
	leaq	.LC5(%rip), %rbp
	leaq	.LC4(%rip), %rbx
	jmp	.L7
.L9:
	movslq	12(%rsp), %rax
	movq	%rbx, %rsi
	movl	$1, %edi
	salq	$4, %rax
	movl	28(%rsp,%rax), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L7:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L9
	movq	64040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$64048, %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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	0
	.long	0
	.long	0
	.align 16
.LC1:
	.long	1000
	.long	1000
	.long	1000
	.long	1000
	.align 16
.LC2:
	.long	-1
	.long	0
	.long	0
	.long	0
	.align 16
.LC3:
	.long	1
	.long	1
	.long	1
	.long	1
	.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
.LC4:
	.string	"%d\n"
.LC5:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-61440(%rsp), %r11
	.cfi_def_cfa 11, 61472
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2608, %rsp
	.cfi_def_cfa_offset 64080
	movdqa	.LC0(%rip), %xmm0
	pxor	%xmm1, %xmm1
	movdqa	.LC1(%rip), %xmm4
	movdqa	.LC2(%rip), %xmm3
	movdqa	.LC3(%rip), %xmm2
	movq	%fs:40, %rax
	movq	%rax, 64040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r9
	movaps	%xmm0, 16(%rsp)
	movl	$4, %eax
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
.L2:
	movd	%eax, %xmm5
	movq	%rax, %rdx
	addq	$1, %rax
	pshufd	$0, %xmm5, %xmm0
	salq	$4, %rdx
	pcmpgtd	%xmm4, %xmm0
	pcmpeqd	%xmm1, %xmm0
	pand	%xmm3, %xmm0
	pand	%xmm2, %xmm0
	movaps	%xmm0, (%r9,%rdx)
	cmpq	$4001, %rax
	jne	.L2
	xorl	%r10d, %r10d
.L6:
	movq	%r9, %r8
	addq	$4, %r9
	xorl	%edi, %edi
	movq	%r9, %rsi
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$1000, %eax
	leaq	-16(%r8), %rcx
	movl	4(%r8), %edx
	cmpl	%eax, %edi
	cmovle	%edi, %eax
	cltq
	salq	$4, %rax
	subq	%rax, %rcx
	movq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L4:
	addl	(%rax), %edx
	subq	$16, %rax
	movl	%edx, (%rsi)
	cmpq	%rcx, %rax
	jne	.L4
	addl	$1, %edi
	addq	$16, %r8
	addq	$16, %rsi
	cmpl	$4001, %edi
	jne	.L8
	addq	$1, %r10
	cmpq	$3, %r10
	jne	.L6
	leaq	12(%rsp), %r12
	leaq	.LC5(%rip), %rbp
	leaq	.LC4(%rip), %rbx
	jmp	.L7
.L9:
	movslq	12(%rsp), %rax
	movq	%rbx, %rsi
	movl	$1, %edi
	salq	$4, %rax
	movl	28(%rsp,%rax), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L7:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L9
	movq	64040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$64048, %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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	0
	.long	0
	.long	0
	.align 16
.LC1:
	.long	1000
	.long	1000
	.long	1000
	.long	1000
	.align 16
.LC2:
	.long	-1
	.long	0
	.long	0
	.long	0
	.align 16
.LC3:
	.long	1
	.long	1
	.long	1
	.long	1
	.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>

int main()
{
  int i,j,k;
  int dp[4001][4];
  for(i=1;i<5;i++)
    for(j=0;j<4001;j++)
      dp[j][i-1] = i==1&&j<=1000?1:0;

  for(i=2;i<=4;i++)
    for(j=0;j<=4000;j++)
      for(k=0;k<=j && k<=1000;k++)
	dp[j][i-1] += dp[j-k][i-2];

  int n;
  while(scanf("%d",&n) != EOF)
    printf("%d\n",dp[n][3]);
    
  return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

int main()
{
  int i,j,k;
  int dp[4001][4];
  for(i=1;i<5;i++)
    for(j=0;j<4001;j++)
      dp[j][i-1] = i==1&&j<=1000?1:0;

  for(i=2;i<=4;i++)
    for(j=0;j<=4000;j++)
      for(k=0;k<=j && k<=1000;k++)
	dp[j][i-1] += dp[j-k][i-2];

  int n;
  while(scanf("%d",&n) != EOF)
    printf("%d\n",dp[n][3]);
    
  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
0
35
 2
-1
35
 2
-1
24
 2
-1
43
 2
-1
72
 2
-1
81
 2
-1
61
 2
-1
82
 2
0
82
 2
-1
59

10
1
8436
 10
1001
8436
 10
1001
2925
 10
1001
15180
 10
1001
67525
 10
1001
95284
 10
1001
41664
 10
1001
98770
 10
1
98770
 10
1001
37820

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>

int main()
{
  int i,j,k;
  int dp[4001][4];
  for(i=1;i<5;i++)
    for(j=0;j<4001;j++)
      dp[j][i-1] = i==1&&j<=1000?1:0;

  for(i=2;i<=4;i++)
    for(j=0;j<=4000;j++)
      for(k=0;k<=j && k<=1000;k++)
	dp[j][i-1] += dp[j-k][i-2];

  int n;
  while(scanf("%d",&n) != EOF)
    printf("%d\n",dp[n][3]);
    
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC4:
	.string	"%d\n"
.LC5:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-61440(%rsp), %r11
	.cfi_def_cfa 11, 61472
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2608, %rsp
	.cfi_def_cfa_offset 64080
	movdqa	.LC0(%rip), %xmm0
	pxor	%xmm1, %xmm1
	movdqa	.LC1(%rip), %xmm4
	movdqa	.LC2(%rip), %xmm3
	movdqa	.LC3(%rip), %xmm2
	movq	%fs:40, %rax
	movq	%rax, 64040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r9
	movaps	%xmm0, 16(%rsp)
	movl	$4, %eax
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
.L2:
	movd	%eax, %xmm5
	movq	%rax, %rdx
	addq	$1, %rax
	pshufd	$0, %xmm5, %xmm0
	salq	$4, %rdx
	pcmpgtd	%xmm4, %xmm0
	pcmpeqd	%xmm1, %xmm0
	pand	%xmm3, %xmm0
	pand	%xmm2, %xmm0
	movaps	%xmm0, (%r9,%rdx)
	cmpq	$4001, %rax
	jne	.L2
	xorl	%r10d, %r10d
.L6:
	movq	%r9, %r8
	addq	$4, %r9
	xorl	%edi, %edi
	movq	%r9, %rsi
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$1000, %eax
	leaq	-16(%r8), %rcx
	movl	4(%r8), %edx
	cmpl	%eax, %edi
	cmovle	%edi, %eax
	cltq
	salq	$4, %rax
	subq	%rax, %rcx
	movq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L4:
	addl	(%rax), %edx
	subq	$16, %rax
	movl	%edx, (%rsi)
	cmpq	%rcx, %rax
	jne	.L4
	addl	$1, %edi
	addq	$16, %r8
	addq	$16, %rsi
	cmpl	$4001, %edi
	jne	.L8
	addq	$1, %r10
	cmpq	$3, %r10
	jne	.L6
	leaq	12(%rsp), %r12
	leaq	.LC5(%rip), %rbp
	leaq	.LC4(%rip), %rbx
	jmp	.L7
.L9:
	movslq	12(%rsp), %rax
	movq	%rbx, %rsi
	movl	$1, %edi
	salq	$4, %rax
	movl	28(%rsp,%rax), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L7:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L9
	movq	64040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$64048, %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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	0
	.long	0
	.long	0
	.align 16
.LC1:
	.long	1000
	.long	1000
	.long	1000
	.long	1000
	.align 16
.LC2:
	.long	-1
	.long	0
	.long	0
	.long	0
	.align 16
.LC3:
	.long	1
	.long	1
	.long	1
	.long	1
	.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
.LC4:
	.string	"%d\n"
.LC5:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-61440(%rsp), %r11
	.cfi_def_cfa 11, 61472
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2608, %rsp
	.cfi_def_cfa_offset 64080
	movdqa	.LC0(%rip), %xmm0
	pxor	%xmm1, %xmm1
	movdqa	.LC1(%rip), %xmm4
	movdqa	.LC2(%rip), %xmm3
	movdqa	.LC3(%rip), %xmm2
	movq	%fs:40, %rax
	movq	%rax, 64040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r9
	movaps	%xmm0, 16(%rsp)
	movl	$4, %eax
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
.L2:
	movd	%eax, %xmm5
	movq	%rax, %rdx
	addq	$1, %rax
	pshufd	$0, %xmm5, %xmm0
	salq	$4, %rdx
	pcmpgtd	%xmm4, %xmm0
	pcmpeqd	%xmm1, %xmm0
	pand	%xmm3, %xmm0
	pand	%xmm2, %xmm0
	movaps	%xmm0, (%r9,%rdx)
	cmpq	$4001, %rax
	jne	.L2
	xorl	%r10d, %r10d
.L6:
	movq	%r9, %r8
	addq	$4, %r9
	xorl	%edi, %edi
	movq	%r9, %rsi
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$1000, %eax
	leaq	-16(%r8), %rcx
	movl	4(%r8), %edx
	cmpl	%eax, %edi
	cmovle	%edi, %eax
	cltq
	salq	$4, %rax
	subq	%rax, %rcx
	movq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L4:
	addl	(%rax), %edx
	subq	$16, %rax
	movl	%edx, (%rsi)
	cmpq	%rcx, %rax
	jne	.L4
	addl	$1, %edi
	addq	$16, %r8
	addq	$16, %rsi
	cmpl	$4001, %edi
	jne	.L8
	addq	$1, %r10
	cmpq	$3, %r10
	jne	.L6
	leaq	12(%rsp), %r12
	leaq	.LC5(%rip), %rbp
	leaq	.LC4(%rip), %rbx
	jmp	.L7
.L9:
	movslq	12(%rsp), %rax
	movq	%rbx, %rsi
	movl	$1, %edi
	salq	$4, %rax
	movl	28(%rsp,%rax), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L7:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L9
	movq	64040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$64048, %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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	0
	.long	0
	.long	0
	.align 16
.LC1:
	.long	1000
	.long	1000
	.long	1000
	.long	1000
	.align 16
.LC2:
	.long	-1
	.long	0
	.long	0
	.long	0
	.align 16
.LC3:
	.long	1
	.long	1
	.long	1
	.long	1
	.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:
```