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

#define MAX_N 100
#define MAX_W 10000
#define SELECTED 1
#define DISCARDED 0

typedef struct { int v, w; } item_t;

int main(int argc, char **argv) {
  int n, w, i, j, vs[MAX_N+1][MAX_W+1];
  item_t is[MAX_N+1];

  scanf("%d %d", &n, &w);
  for (i = 1; i <= n; ++i) scanf("%d %d", &is[i].v, &is[i].w);
  for (i = 0; i <= n; ++i) vs[i][0] = 0;
  for (i = 0; i <= w; ++i) vs[0][i] = 0;
  for (i = 1; i <= n; ++i) {
    for (j = 1; j <= w; ++j) {
      if (is[i].w > j || vs[i-1][j] > vs[i-1][j-is[i].w] + is[i].v) {
        vs[i][j] = vs[i-1][j];
        continue;
      }
      vs[i][j] = vs[i-1][j-is[i].w] + is[i].v;
    }
  }
  printf("%d\n", vs[n][w]);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-4038656(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2608, %rsp
	movl	%edi, -4041252(%rbp)
	movq	%rsi, -4041264(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-4041244(%rbp), %rdx
	leaq	-4041248(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -4041240(%rbp)
	jmp	.L2
.L3:
	leaq	-4041232(%rbp), %rdx
	movl	-4041240(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	leaq	-4041232(%rbp), %rcx
	movl	-4041240(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4041240(%rbp)
.L2:
	movl	-4041248(%rbp), %eax
	cmpl	%eax, -4041240(%rbp)
	jle	.L3
	movl	$0, -4041240(%rbp)
	jmp	.L4
.L5:
	movl	-4041240(%rbp), %eax
	cltq
	imulq	$40004, %rax, %rax
	addq	%rbp, %rax
	subq	$4040416, %rax
	movl	$0, (%rax)
	addl	$1, -4041240(%rbp)
.L4:
	movl	-4041248(%rbp), %eax
	cmpl	%eax, -4041240(%rbp)
	jle	.L5
	movl	$0, -4041240(%rbp)
	jmp	.L6
.L7:
	movl	-4041240(%rbp), %eax
	cltq
	movl	$0, -4040416(%rbp,%rax,4)
	addl	$1, -4041240(%rbp)
.L6:
	movl	-4041244(%rbp), %eax
	cmpl	%eax, -4041240(%rbp)
	jle	.L7
	movl	$1, -4041240(%rbp)
	jmp	.L8
.L14:
	movl	$1, -4041236(%rbp)
	jmp	.L9
.L13:
	movl	-4041240(%rbp), %eax
	cltq
	movl	-4041228(%rbp,%rax,8), %eax
	cmpl	%eax, -4041236(%rbp)
	jl	.L10
	movl	-4041240(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4041236(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$10001, %rax, %rax
	addq	%rcx, %rax
	movl	-4040416(%rbp,%rax,4), %edx
	movl	-4041240(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-4041240(%rbp), %eax
	cltq
	movl	-4041228(%rbp,%rax,8), %esi
	movl	-4041236(%rbp), %eax
	subl	%esi, %eax
	movslq	%eax, %rsi
	movslq	%ecx, %rax
	imulq	$10001, %rax, %rax
	addq	%rsi, %rax
	movl	-4040416(%rbp,%rax,4), %ecx
	movl	-4041240(%rbp), %eax
	cltq
	movl	-4041232(%rbp,%rax,8), %eax
	addl	%ecx, %eax
	cmpl	%eax, %edx
	jle	.L11
.L10:
	movl	-4041240(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4041236(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$10001, %rax, %rax
	addq	%rcx, %rax
	movl	-4040416(%rbp,%rax,4), %eax
	movl	-4041236(%rbp), %edx
	movslq	%edx, %rcx
	movl	-4041240(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10001, %rdx, %rdx
	addq	%rcx, %rdx
	movl	%eax, -4040416(%rbp,%rdx,4)
	jmp	.L12
.L11:
	movl	-4041240(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4041240(%rbp), %eax
	cltq
	movl	-4041228(%rbp,%rax,8), %ecx
	movl	-4041236(%rbp), %eax
	subl	%ecx, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$10001, %rax, %rax
	addq	%rcx, %rax
	movl	-4040416(%rbp,%rax,4), %edx
	movl	-4041240(%rbp), %eax
	cltq
	movl	-4041232(%rbp,%rax,8), %eax
	addl	%eax, %edx
	movl	-4041236(%rbp), %eax
	movslq	%eax, %rcx
	movl	-4041240(%rbp), %eax
	cltq
	imulq	$10001, %rax, %rax
	addq	%rcx, %rax
	movl	%edx, -4040416(%rbp,%rax,4)
.L12:
	addl	$1, -4041236(%rbp)
.L9:
	movl	-4041244(%rbp), %eax
	cmpl	%eax, -4041236(%rbp)
	jle	.L13
	addl	$1, -4041240(%rbp)
.L8:
	movl	-4041248(%rbp), %eax
	cmpl	%eax, -4041240(%rbp)
	jle	.L14
	movl	-4041248(%rbp), %eax
	movl	-4041244(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$10001, %rax, %rax
	addq	%rdx, %rax
	movl	-4040416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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
.LC1:
	.string	"%d %d"
.LC4:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	leaq	-4038656(%rsp), %r11
	.cfi_def_cfa 11, 4038712
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2632, %rsp
	.cfi_def_cfa_offset 4041344
	leaq	.LC1(%rip), %r13
	movq	%r13, %rdi
	movq	%fs:40, %rax
	movq	%rax, 4041272(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rdx
	leaq	40(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %r12d
	testl	%r12d, %r12d
	jle	.L2
	leaq	56(%rsp), %rbx
	movl	$1, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	4(%rbx), %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %r12d
	addl	$1, %ebp
	addq	$8, %rbx
	cmpl	%ebp, %r12d
	jge	.L3
.L2:
	testl	%r12d, %r12d
	js	.L39
	movslq	%r12d, %rbx
	leaq	864(%rsp), %rax
	imulq	$40004, %rbx, %rdx
	movq	%rbx, 16(%rsp)
	leaq	40868(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$0, (%rax)
	addq	$40004, %rax
	cmpq	%rdx, %rax
	jne	.L7
.L8:
	movl	44(%rsp), %ebx
	movslq	%ebx, %rax
	movq	%rax, 24(%rsp)
	testl	%ebx, %ebx
	js	.L6
	leaq	4(,%rax,4), %rdx
	leaq	864(%rsp), %rdi
	xorl	%esi, %esi
	call	memset@PLT
.L6:
	testl	%r12d, %r12d
	jle	.L9
	testl	%ebx, %ebx
	jle	.L9
	leaq	868(%rsp), %rax
	leaq	56(%rsp), %r13
	movdqa	.LC2(%rip), %xmm4
	movdqa	.LC3(%rip), %xmm3
	movq	%rax, (%rsp)
	movq	%rax, %rcx
	leal	1(%r12), %eax
	movl	$1, %r14d
	movl	%eax, 8(%rsp)
	leal	1(%rbx), %eax
	movl	$10001, %r12d
	leaq	864(%rsp), %r15
	movl	%eax, 12(%rsp)
	.p2align 4,,10
	.p2align 3
.L11:
	movl	4(%r13), %r10d
	leal	-1(%r14), %edi
	cmpl	$1, %r10d
	jg	.L22
	movl	$1, %eax
	leaq	40004(%rcx), %r9
.L21:
	movslq	%r10d, %r11
	movl	%ebx, %r8d
	leaq	40000(,%r11,4), %rdx
	subl	%eax, %r8d
	cmpq	$8, %rdx
	seta	%sil
	cmpl	%ebx, %eax
	setle	%dl
	testb	%dl, %sil
	je	.L15
	cmpl	$2, %r8d
	jbe	.L15
	addl	$1, %r8d
	movl	$1, %ecx
	cmpl	%ebx, %eax
	movq	%r12, %rdx
	cmovg	%ecx, %r8d
	movslq	%eax, %rcx
	subq	%r11, %rdx
	movd	0(%r13), %xmm2
	addq	%rcx, %rdx
	leaq	(%rcx,%r12), %rsi
	movl	%r8d, %ecx
	salq	$2, %rsi
	pshufd	$0, %xmm2, %xmm2
	leaq	-40004(%r15,%rdx,4), %r11
	shrl	$2, %ecx
	leaq	-40004(%r15,%rsi), %rbp
	xorl	%edx, %edx
	addq	%r15, %rsi
	salq	$4, %rcx
	.p2align 4,,10
	.p2align 3
.L16:
	movdqu	(%r11,%rdx), %xmm1
	movdqu	0(%rbp,%rdx), %xmm5
	paddd	%xmm2, %xmm1
	movdqa	%xmm1, %xmm0
	pcmpgtd	%xmm5, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm5, %xmm0
	por	%xmm1, %xmm0
	movups	%xmm0, (%rsi,%rdx)
	addq	$16, %rdx
	cmpq	%rdx, %rcx
	jne	.L16
	movl	%r8d, %edx
	andl	$-4, %edx
	addl	%edx, %eax
	cmpl	%edx, %r8d
	je	.L18
	movslq	%edi, %rdi
	movslq	%r14d, %rcx
	movl	%eax, %r8d
	movslq	%eax, %rsi
	imulq	$10001, %rdi, %rdi
	subl	%r10d, %r8d
	movl	0(%r13), %edx
	imulq	$10001, %rcx, %rcx
	movslq	%r8d, %r8
	addq	%rdi, %r8
	movl	864(%rsp,%r8,4), %ebp
	leaq	(%rcx,%rsi), %r11
	addq	%rdi, %rsi
	movl	864(%rsp,%rsi,4), %esi
	addl	%edx, %ebp
	cmpl	%esi, %ebp
	movl	%ebp, %r8d
	cmovl	%esi, %r8d
	leal	1(%rax), %esi
	movl	%r8d, 864(%rsp,%r11,4)
	cmpl	%esi, %ebx
	jl	.L18
	movslq	%esi, %r8
	subl	%r10d, %esi
	movslq	%esi, %rsi
	leaq	(%rcx,%r8), %r11
	addq	%rdi, %r8
	addq	%rdi, %rsi
	movl	864(%rsp,%r8,4), %r8d
	movl	864(%rsp,%rsi,4), %ebp
	addl	%edx, %ebp
	cmpl	%r8d, %ebp
	movl	%ebp, %esi
	cmovl	%r8d, %esi
	addl	$2, %eax
	movl	%esi, 864(%rsp,%r11,4)
	cmpl	%eax, %ebx
	jl	.L18
	movslq	%eax, %rsi
	subl	%r10d, %eax
	cltq
	addq	%rsi, %rcx
	addq	%rdi, %rax
	addq	%rsi, %rdi
	addl	864(%rsp,%rax,4), %edx
	movl	864(%rsp,%rdi,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	movl	%edx, 864(%rsp,%rcx,4)
.L18:
	addl	$1, %r14d
	addq	$8, %r13
	addq	$10001, %r12
	movq	%r9, %rcx
	cmpl	8(%rsp), %r14d
	jne	.L11
.L9:
	imulq	$10001, 16(%rsp), %rax
	addq	24(%rsp), %rax
	movl	$1, %edi
	movl	864(%rsp,%rax,4), %edx
	leaq	.LC4(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	4041272(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L40
	addq	$4041288, %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
.L22:
	.cfi_restore_state
	movl	12(%rsp), %eax
	cmpl	%r10d, %eax
	movl	%eax, %r8d
	movl	$1, %eax
	cmovg	%r10d, %r8d
	leal	-1(%r8), %edx
	cmpl	$1, %r8d
	cmovle	%eax, %edx
	cmpl	$4, %r8d
	jle	.L24
	movl	%edx, %esi
	movdqa	.LC0(%rip), %xmm1
	leaq	40004(%rcx), %r9
	xorl	%eax, %eax
	shrl	$2, %esi
	salq	$4, %rsi
	.p2align 4,,10
	.p2align 3
.L13:
	movdqu	(%rcx,%rax), %xmm7
	movdqa	%xmm1, %xmm0
	paddd	%xmm4, %xmm1
	paddd	%xmm3, %xmm0
	movups	%xmm7, (%r9,%rax)
	addq	$16, %rax
	cmpq	%rsi, %rax
	jne	.L13
	movl	%edx, %esi
	pshufd	$255, %xmm0, %xmm0
	andl	$-4, %esi
	movd	%xmm0, %eax
	leal	1(%rsi), %r11d
	cmpl	%esi, %edx
	je	.L14
.L12:
	movslq	%edi, %rsi
	movslq	%r11d, %rax
	imulq	$10001, %rsi, %rsi
	leaq	(%rsi,%rax), %rdx
	movl	864(%rsp,%rdx,4), %ebp
	movslq	%r14d, %rdx
	imulq	$10001, %rdx, %rdx
	addq	%rdx, %rax
	movl	%ebp, 864(%rsp,%rax,4)
	leal	1(%r11), %eax
	cmpl	%eax, %r8d
	jle	.L14
	cltq
	leaq	(%rsi,%rax), %rbp
	addq	%rdx, %rax
	movl	864(%rsp,%rbp,4), %ebp
	movl	%ebp, 864(%rsp,%rax,4)
	leal	2(%r11), %eax
	cmpl	%eax, %r8d
	jle	.L14
	cltq
	addq	%rax, %rsi
	addq	%rax, %rdx
	leal	3(%r11), %eax
	movl	864(%rsp,%rsi,4), %esi
	movl	%esi, 864(%rsp,%rdx,4)
.L14:
	cmpl	%eax, %ebx
	jge	.L21
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L15:
	movq	(%rsp), %r11
	movslq	%eax, %rsi
	movl	0(%r13), %r8d
	leaq	0(,%r12,4), %rdi
	leaq	-10001(%rsi,%r12), %rdx
	subq	%rcx, %r11
	movl	%eax, %ecx
	leaq	(%r15,%rdx,4), %rdx
	subl	%r10d, %ecx
	movslq	%ecx, %r10
	subq	%rsi, %r10
.L20:
	movl	(%rdx,%r10,4), %ecx
	movl	(%rdx), %ebp
	leaq	(%r11,%rdx), %rsi
	addl	%r8d, %ecx
	cmpl	%ebp, %ecx
	cmovl	%ebp, %ecx
	addl	$1, %eax
	addq	$4, %rdx
	movl	%ecx, (%rsi,%rdi)
	cmpl	%ebx, %eax
	jle	.L20
	jmp	.L18
.L24:
	movl	$1, %r11d
	leaq	40004(%rcx), %r9
	jmp	.L12
.L39:
	movslq	%r12d, %rax
	movq	%rax, 16(%rsp)
	jmp	.L8
.L40:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC4:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	leaq	-4038656(%rsp), %r11
	.cfi_def_cfa 11, 4038712
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2632, %rsp
	.cfi_def_cfa_offset 4041344
	leaq	.LC1(%rip), %r13
	movq	%r13, %rdi
	movq	%fs:40, %rax
	movq	%rax, 4041272(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rdx
	leaq	40(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %r12d
	testl	%r12d, %r12d
	jle	.L2
	leaq	56(%rsp), %rbx
	movl	$1, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	4(%rbx), %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %r12d
	addl	$1, %ebp
	addq	$8, %rbx
	cmpl	%ebp, %r12d
	jge	.L3
.L2:
	testl	%r12d, %r12d
	js	.L39
	movslq	%r12d, %rbx
	leaq	864(%rsp), %rax
	imulq	$40004, %rbx, %rdx
	movq	%rbx, 16(%rsp)
	leaq	40868(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$0, (%rax)
	addq	$40004, %rax
	cmpq	%rdx, %rax
	jne	.L7
.L8:
	movl	44(%rsp), %ebx
	movslq	%ebx, %rax
	movq	%rax, 24(%rsp)
	testl	%ebx, %ebx
	js	.L6
	leaq	4(,%rax,4), %rdx
	leaq	864(%rsp), %rdi
	xorl	%esi, %esi
	call	memset@PLT
.L6:
	testl	%r12d, %r12d
	jle	.L9
	testl	%ebx, %ebx
	jle	.L9
	leaq	868(%rsp), %rax
	leaq	56(%rsp), %r13
	movdqa	.LC2(%rip), %xmm4
	movdqa	.LC3(%rip), %xmm3
	movq	%rax, (%rsp)
	movq	%rax, %rcx
	leal	1(%r12), %eax
	movl	$1, %r14d
	movl	%eax, 8(%rsp)
	leal	1(%rbx), %eax
	movl	$10001, %r12d
	leaq	864(%rsp), %r15
	movl	%eax, 12(%rsp)
	.p2align 4,,10
	.p2align 3
.L11:
	movl	4(%r13), %r10d
	leal	-1(%r14), %edi
	cmpl	$1, %r10d
	jg	.L22
	movl	$1, %eax
	leaq	40004(%rcx), %r9
.L21:
	movslq	%r10d, %r11
	movl	%ebx, %r8d
	leaq	40000(,%r11,4), %rdx
	subl	%eax, %r8d
	cmpq	$8, %rdx
	seta	%sil
	cmpl	%ebx, %eax
	setle	%dl
	testb	%dl, %sil
	je	.L15
	cmpl	$2, %r8d
	jbe	.L15
	addl	$1, %r8d
	movl	$1, %ecx
	cmpl	%ebx, %eax
	movq	%r12, %rdx
	cmovg	%ecx, %r8d
	movslq	%eax, %rcx
	subq	%r11, %rdx
	movd	0(%r13), %xmm2
	addq	%rcx, %rdx
	leaq	(%rcx,%r12), %rsi
	movl	%r8d, %ecx
	salq	$2, %rsi
	pshufd	$0, %xmm2, %xmm2
	leaq	-40004(%r15,%rdx,4), %r11
	shrl	$2, %ecx
	leaq	-40004(%r15,%rsi), %rbp
	xorl	%edx, %edx
	addq	%r15, %rsi
	salq	$4, %rcx
	.p2align 4,,10
	.p2align 3
.L16:
	movdqu	(%r11,%rdx), %xmm1
	movdqu	0(%rbp,%rdx), %xmm5
	paddd	%xmm2, %xmm1
	movdqa	%xmm1, %xmm0
	pcmpgtd	%xmm5, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm5, %xmm0
	por	%xmm1, %xmm0
	movups	%xmm0, (%rsi,%rdx)
	addq	$16, %rdx
	cmpq	%rdx, %rcx
	jne	.L16
	movl	%r8d, %edx
	andl	$-4, %edx
	addl	%edx, %eax
	cmpl	%edx, %r8d
	je	.L18
	movslq	%edi, %rdi
	movslq	%r14d, %rcx
	movl	%eax, %r8d
	movslq	%eax, %rsi
	imulq	$10001, %rdi, %rdi
	subl	%r10d, %r8d
	movl	0(%r13), %edx
	imulq	$10001, %rcx, %rcx
	movslq	%r8d, %r8
	addq	%rdi, %r8
	movl	864(%rsp,%r8,4), %ebp
	leaq	(%rcx,%rsi), %r11
	addq	%rdi, %rsi
	movl	864(%rsp,%rsi,4), %esi
	addl	%edx, %ebp
	cmpl	%esi, %ebp
	movl	%ebp, %r8d
	cmovl	%esi, %r8d
	leal	1(%rax), %esi
	movl	%r8d, 864(%rsp,%r11,4)
	cmpl	%esi, %ebx
	jl	.L18
	movslq	%esi, %r8
	subl	%r10d, %esi
	movslq	%esi, %rsi
	leaq	(%rcx,%r8), %r11
	addq	%rdi, %r8
	addq	%rdi, %rsi
	movl	864(%rsp,%r8,4), %r8d
	movl	864(%rsp,%rsi,4), %ebp
	addl	%edx, %ebp
	cmpl	%r8d, %ebp
	movl	%ebp, %esi
	cmovl	%r8d, %esi
	addl	$2, %eax
	movl	%esi, 864(%rsp,%r11,4)
	cmpl	%eax, %ebx
	jl	.L18
	movslq	%eax, %rsi
	subl	%r10d, %eax
	cltq
	addq	%rsi, %rcx
	addq	%rdi, %rax
	addq	%rsi, %rdi
	addl	864(%rsp,%rax,4), %edx
	movl	864(%rsp,%rdi,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	movl	%edx, 864(%rsp,%rcx,4)
.L18:
	addl	$1, %r14d
	addq	$8, %r13
	addq	$10001, %r12
	movq	%r9, %rcx
	cmpl	8(%rsp), %r14d
	jne	.L11
.L9:
	imulq	$10001, 16(%rsp), %rax
	addq	24(%rsp), %rax
	movl	$1, %edi
	movl	864(%rsp,%rax,4), %edx
	leaq	.LC4(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	4041272(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L40
	addq	$4041288, %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
.L22:
	.cfi_restore_state
	movl	12(%rsp), %eax
	cmpl	%r10d, %eax
	movl	%eax, %r8d
	movl	$1, %eax
	cmovg	%r10d, %r8d
	leal	-1(%r8), %edx
	cmpl	$1, %r8d
	cmovle	%eax, %edx
	cmpl	$4, %r8d
	jle	.L24
	movl	%edx, %esi
	movdqa	.LC0(%rip), %xmm1
	leaq	40004(%rcx), %r9
	xorl	%eax, %eax
	shrl	$2, %esi
	salq	$4, %rsi
	.p2align 4,,10
	.p2align 3
.L13:
	movdqu	(%rcx,%rax), %xmm7
	movdqa	%xmm1, %xmm0
	paddd	%xmm4, %xmm1
	paddd	%xmm3, %xmm0
	movups	%xmm7, (%r9,%rax)
	addq	$16, %rax
	cmpq	%rsi, %rax
	jne	.L13
	movl	%edx, %esi
	pshufd	$255, %xmm0, %xmm0
	andl	$-4, %esi
	movd	%xmm0, %eax
	leal	1(%rsi), %r11d
	cmpl	%esi, %edx
	je	.L14
.L12:
	movslq	%edi, %rsi
	movslq	%r11d, %rax
	imulq	$10001, %rsi, %rsi
	leaq	(%rsi,%rax), %rdx
	movl	864(%rsp,%rdx,4), %ebp
	movslq	%r14d, %rdx
	imulq	$10001, %rdx, %rdx
	addq	%rdx, %rax
	movl	%ebp, 864(%rsp,%rax,4)
	leal	1(%r11), %eax
	cmpl	%eax, %r8d
	jle	.L14
	cltq
	leaq	(%rsi,%rax), %rbp
	addq	%rdx, %rax
	movl	864(%rsp,%rbp,4), %ebp
	movl	%ebp, 864(%rsp,%rax,4)
	leal	2(%r11), %eax
	cmpl	%eax, %r8d
	jle	.L14
	cltq
	addq	%rax, %rsi
	addq	%rax, %rdx
	leal	3(%r11), %eax
	movl	864(%rsp,%rsi,4), %esi
	movl	%esi, 864(%rsp,%rdx,4)
.L14:
	cmpl	%eax, %ebx
	jge	.L21
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L15:
	movq	(%rsp), %r11
	movslq	%eax, %rsi
	movl	0(%r13), %r8d
	leaq	0(,%r12,4), %rdi
	leaq	-10001(%rsi,%r12), %rdx
	subq	%rcx, %r11
	movl	%eax, %ecx
	leaq	(%r15,%rdx,4), %rdx
	subl	%r10d, %ecx
	movslq	%ecx, %r10
	subq	%rsi, %r10
.L20:
	movl	(%rdx,%r10,4), %ecx
	movl	(%rdx), %ebp
	leaq	(%r11,%rdx), %rsi
	addl	%r8d, %ecx
	cmpl	%ebp, %ecx
	cmovl	%ebp, %ecx
	addl	$1, %eax
	addq	$4, %rdx
	movl	%ecx, (%rsi,%rdi)
	cmpl	%ebx, %eax
	jle	.L20
	jmp	.L18
.L24:
	movl	$1, %r11d
	leaq	40004(%rcx), %r9
	jmp	.L12
.L39:
	movslq	%r12d, %rax
	movq	%rax, 16(%rsp)
	jmp	.L8
.L40:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.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:

#include <stdio.h>
#include <stdlib.h>

#define MAX_N 100
#define MAX_W 10000
#define SELECTED 1
#define DISCARDED 0

typedef struct { int v, w; } item_t;

int main(int argc, char **argv) {
  int n, w, i, j, vs[MAX_N+1][MAX_W+1];
  item_t is[MAX_N+1];

  scanf("%d %d", &n, &w);
  for (i = 1; i <= n; ++i) scanf("%d %d", &is[i].v, &is[i].w);
  for (i = 0; i <= n; ++i) vs[i][0] = 0;
  for (i = 0; i <= w; ++i) vs[0][i] = 0;
  for (i = 1; i <= n; ++i) {
    for (j = 1; j <= w; ++j) {
      if (is[i].w > j || vs[i-1][j] > vs[i-1][j-is[i].w] + is[i].v) {
        vs[i][j] = vs[i-1][j];
        continue;
      }
      vs[i][j] = vs[i-1][j-is[i].w] + is[i].v;
    }
  }
  printf("%d\n", vs[n][w]);
}

4 5
4 2
5 2
2 1
8 3

13

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

#define MAX_N 100
#define MAX_W 10000
#define SELECTED 1
#define DISCARDED 0

typedef struct { int v, w; } item_t;

int main(int argc, char **argv) {
  int n, w, i, j, vs[MAX_N+1][MAX_W+1];
  item_t is[MAX_N+1];

  scanf("%d %d", &n, &w);
  for (i = 1; i <= n; ++i) scanf("%d %d", &is[i].v, &is[i].w);
  for (i = 0; i <= n; ++i) vs[i][0] = 0;
  for (i = 0; i <= w; ++i) vs[0][i] = 0;
  for (i = 1; i <= n; ++i) {
    for (j = 1; j <= w; ++j) {
      if (is[i].w > j || vs[i-1][j] > vs[i-1][j-is[i].w] + is[i].v) {
        vs[i][j] = vs[i-1][j];
        continue;
      }
      vs[i][j] = vs[i-1][j-is[i].w] + is[i].v;
    }
  }
  printf("%d\n", vs[n][w]);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-4038656(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2608, %rsp
	movl	%edi, -4041252(%rbp)
	movq	%rsi, -4041264(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-4041244(%rbp), %rdx
	leaq	-4041248(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -4041240(%rbp)
	jmp	.L2
.L3:
	leaq	-4041232(%rbp), %rdx
	movl	-4041240(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	leaq	-4041232(%rbp), %rcx
	movl	-4041240(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4041240(%rbp)
.L2:
	movl	-4041248(%rbp), %eax
	cmpl	%eax, -4041240(%rbp)
	jle	.L3
	movl	$0, -4041240(%rbp)
	jmp	.L4
.L5:
	movl	-4041240(%rbp), %eax
	cltq
	imulq	$40004, %rax, %rax
	addq	%rbp, %rax
	subq	$4040416, %rax
	movl	$0, (%rax)
	addl	$1, -4041240(%rbp)
.L4:
	movl	-4041248(%rbp), %eax
	cmpl	%eax, -4041240(%rbp)
	jle	.L5
	movl	$0, -4041240(%rbp)
	jmp	.L6
.L7:
	movl	-4041240(%rbp), %eax
	cltq
	movl	$0, -4040416(%rbp,%rax,4)
	addl	$1, -4041240(%rbp)
.L6:
	movl	-4041244(%rbp), %eax
	cmpl	%eax, -4041240(%rbp)
	jle	.L7
	movl	$1, -4041240(%rbp)
	jmp	.L8
.L14:
	movl	$1, -4041236(%rbp)
	jmp	.L9
.L13:
	movl	-4041240(%rbp), %eax
	cltq
	movl	-4041228(%rbp,%rax,8), %eax
	cmpl	%eax, -4041236(%rbp)
	jl	.L10
	movl	-4041240(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4041236(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$10001, %rax, %rax
	addq	%rcx, %rax
	movl	-4040416(%rbp,%rax,4), %edx
	movl	-4041240(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-4041240(%rbp), %eax
	cltq
	movl	-4041228(%rbp,%rax,8), %esi
	movl	-4041236(%rbp), %eax
	subl	%esi, %eax
	movslq	%eax, %rsi
	movslq	%ecx, %rax
	imulq	$10001, %rax, %rax
	addq	%rsi, %rax
	movl	-4040416(%rbp,%rax,4), %ecx
	movl	-4041240(%rbp), %eax
	cltq
	movl	-4041232(%rbp,%rax,8), %eax
	addl	%ecx, %eax
	cmpl	%eax, %edx
	jle	.L11
.L10:
	movl	-4041240(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4041236(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$10001, %rax, %rax
	addq	%rcx, %rax
	movl	-4040416(%rbp,%rax,4), %eax
	movl	-4041236(%rbp), %edx
	movslq	%edx, %rcx
	movl	-4041240(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10001, %rdx, %rdx
	addq	%rcx, %rdx
	movl	%eax, -4040416(%rbp,%rdx,4)
	jmp	.L12
.L11:
	movl	-4041240(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4041240(%rbp), %eax
	cltq
	movl	-4041228(%rbp,%rax,8), %ecx
	movl	-4041236(%rbp), %eax
	subl	%ecx, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$10001, %rax, %rax
	addq	%rcx, %rax
	movl	-4040416(%rbp,%rax,4), %edx
	movl	-4041240(%rbp), %eax
	cltq
	movl	-4041232(%rbp,%rax,8), %eax
	addl	%eax, %edx
	movl	-4041236(%rbp), %eax
	movslq	%eax, %rcx
	movl	-4041240(%rbp), %eax
	cltq
	imulq	$10001, %rax, %rax
	addq	%rcx, %rax
	movl	%edx, -4040416(%rbp,%rax,4)
.L12:
	addl	$1, -4041236(%rbp)
.L9:
	movl	-4041244(%rbp), %eax
	cmpl	%eax, -4041236(%rbp)
	jle	.L13
	addl	$1, -4041240(%rbp)
.L8:
	movl	-4041248(%rbp), %eax
	cmpl	%eax, -4041240(%rbp)
	jle	.L14
	movl	-4041248(%rbp), %eax
	movl	-4041244(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$10001, %rax, %rax
	addq	%rdx, %rax
	movl	-4040416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-4038656(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2608, %rsp
	movl	%edi, -4041252(%rbp)
	movq	%rsi, -4041264(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-4041244(%rbp), %rdx
	leaq	-4041248(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -4041240(%rbp)
	jmp	.L2
.L3:
	leaq	-4041232(%rbp), %rdx
	movl	-4041240(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	leaq	-4041232(%rbp), %rcx
	movl	-4041240(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4041240(%rbp)
.L2:
	movl	-4041248(%rbp), %eax
	cmpl	%eax, -4041240(%rbp)
	jle	.L3
	movl	$0, -4041240(%rbp)
	jmp	.L4
.L5:
	movl	-4041240(%rbp), %eax
	cltq
	imulq	$40004, %rax, %rax
	addq	%rbp, %rax
	subq	$4040416, %rax
	movl	$0, (%rax)
	addl	$1, -4041240(%rbp)
.L4:
	movl	-4041248(%rbp), %eax
	cmpl	%eax, -4041240(%rbp)
	jle	.L5
	movl	$0, -4041240(%rbp)
	jmp	.L6
.L7:
	movl	-4041240(%rbp), %eax
	cltq
	movl	$0, -4040416(%rbp,%rax,4)
	addl	$1, -4041240(%rbp)
.L6:
	movl	-4041244(%rbp), %eax
	cmpl	%eax, -4041240(%rbp)
	jle	.L7
	movl	$1, -4041240(%rbp)
	jmp	.L8
.L14:
	movl	$1, -4041236(%rbp)
	jmp	.L9
.L13:
	movl	-4041240(%rbp), %eax
	cltq
	movl	-4041228(%rbp,%rax,8), %eax
	cmpl	%eax, -4041236(%rbp)
	jl	.L10
	movl	-4041240(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4041236(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$10001, %rax, %rax
	addq	%rcx, %rax
	movl	-4040416(%rbp,%rax,4), %edx
	movl	-4041240(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-4041240(%rbp), %eax
	cltq
	movl	-4041228(%rbp,%rax,8), %esi
	movl	-4041236(%rbp), %eax
	subl	%esi, %eax
	movslq	%eax, %rsi
	movslq	%ecx, %rax
	imulq	$10001, %rax, %rax
	addq	%rsi, %rax
	movl	-4040416(%rbp,%rax,4), %ecx
	movl	-4041240(%rbp), %eax
	cltq
	movl	-4041232(%rbp,%rax,8), %eax
	addl	%ecx, %eax
	cmpl	%eax, %edx
	jle	.L11
.L10:
	movl	-4041240(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4041236(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$10001, %rax, %rax
	addq	%rcx, %rax
	movl	-4040416(%rbp,%rax,4), %eax
	movl	-4041236(%rbp), %edx
	movslq	%edx, %rcx
	movl	-4041240(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$10001, %rdx, %rdx
	addq	%rcx, %rdx
	movl	%eax, -4040416(%rbp,%rdx,4)
	jmp	.L12
.L11:
	movl	-4041240(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4041240(%rbp), %eax
	cltq
	movl	-4041228(%rbp,%rax,8), %ecx
	movl	-4041236(%rbp), %eax
	subl	%ecx, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$10001, %rax, %rax
	addq	%rcx, %rax
	movl	-4040416(%rbp,%rax,4), %edx
	movl	-4041240(%rbp), %eax
	cltq
	movl	-4041232(%rbp,%rax,8), %eax
	addl	%eax, %edx
	movl	-4041236(%rbp), %eax
	movslq	%eax, %rcx
	movl	-4041240(%rbp), %eax
	cltq
	imulq	$10001, %rax, %rax
	addq	%rcx, %rax
	movl	%edx, -4040416(%rbp,%rax,4)
.L12:
	addl	$1, -4041236(%rbp)
.L9:
	movl	-4041244(%rbp), %eax
	cmpl	%eax, -4041236(%rbp)
	jle	.L13
	addl	$1, -4041240(%rbp)
.L8:
	movl	-4041248(%rbp), %eax
	cmpl	%eax, -4041240(%rbp)
	jle	.L14
	movl	-4041248(%rbp), %eax
	movl	-4041244(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$10001, %rax, %rax
	addq	%rdx, %rax
	movl	-4040416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
