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 max(a, b) ((a)>(b) ? (a) : (b))

int main(){
  int n, w_max, w[101], v[101];
  scanf("%d %d", &n, &w_max);
  for(int i=0; i<n; i++) scanf("%d %d", &w[i], &v[i]);

  long int dp[100001] = {0};

  for(int i=0; i<n; i++){
    for(int j=w_max; j>=w[i]; j--){
      dp[j] = max(dp[j], dp[j-w[i]]+v[i]);
    }
  }
     

  printf("%ld\n", dp[w_max]);
	
  
  return 0;
}
    
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%ld\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
	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	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2152, %rsp
	.cfi_def_cfa_offset 800928
	leaq	.LC0(%rip), %r15
	movq	%r15, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800856(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%r12d, %r12d
	leaq	432(%rsp), %rbx
	movq	%rbp, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%rbx,%r12,4), %rdx
	movq	%r13, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r14d
	addq	$1, %r12
	addq	$4, %r13
	cmpl	%r12d, %r14d
	jg	.L3
	leaq	848(%rsp), %rcx
	movl	$800008, %edx
	xorl	%esi, %esi
	movq	%rcx, %rdi
	call	memset@PLT
	movl	12(%rsp), %r11d
	testl	%r14d, %r14d
	jle	.L18
	movslq	%r11d, %r12
	movslq	%r14d, %r10
	xorl	%r9d, %r9d
	leaq	(%rax,%r12,8), %r13
	leaq	-8(%r13), %r14
	.p2align 4,,10
	.p2align 3
.L6:
	movl	0(%rbp,%r9,4), %eax
	cmpl	%r11d, %eax
	jg	.L8
	movl	%r11d, %esi
	movq	%r14, %rdi
	movslq	(%rbx,%r9,4), %r8
	subl	%eax, %esi
	movl	%esi, %eax
	movslq	%esi, %rsi
	salq	$3, %rax
	subq	%r12, %rsi
	subq	%rax, %rdi
	movq	%r13, %rax
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rax,%rsi,8), %rdx
	movq	(%rax), %rcx
	addq	%r8, %rdx
	cmpq	%rcx, %rdx
	cmovl	%rcx, %rdx
	subq	$8, %rax
	movq	%rdx, 8(%rax)
	cmpq	%rax, %rdi
	jne	.L7
.L8:
	addq	$1, %r9
	cmpq	%r10, %r9
	jne	.L6
.L4:
	movq	848(%rsp,%r12,8), %rdx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	800856(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$800872, %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
.L2:
	.cfi_restore_state
	leaq	848(%rsp), %rdi
	movl	$800008, %edx
	xorl	%esi, %esi
	call	memset@PLT
	movslq	12(%rsp), %r12
	jmp	.L4
.L18:
	movslq	%r11d, %r12
	jmp	.L4
.L19:
	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:
```

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	"%ld\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
	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	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2152, %rsp
	.cfi_def_cfa_offset 800928
	leaq	.LC0(%rip), %r15
	movq	%r15, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800856(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%r12d, %r12d
	leaq	432(%rsp), %rbx
	movq	%rbp, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%rbx,%r12,4), %rdx
	movq	%r13, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r14d
	addq	$1, %r12
	addq	$4, %r13
	cmpl	%r12d, %r14d
	jg	.L3
	leaq	848(%rsp), %rcx
	movl	$800008, %edx
	xorl	%esi, %esi
	movq	%rcx, %rdi
	call	memset@PLT
	movl	12(%rsp), %r11d
	testl	%r14d, %r14d
	jle	.L18
	movslq	%r11d, %r12
	movslq	%r14d, %r10
	xorl	%r9d, %r9d
	leaq	(%rax,%r12,8), %r13
	leaq	-8(%r13), %r14
	.p2align 4,,10
	.p2align 3
.L6:
	movl	0(%rbp,%r9,4), %eax
	cmpl	%r11d, %eax
	jg	.L8
	movl	%r11d, %esi
	movq	%r14, %rdi
	movslq	(%rbx,%r9,4), %r8
	subl	%eax, %esi
	movl	%esi, %eax
	movslq	%esi, %rsi
	salq	$3, %rax
	subq	%r12, %rsi
	subq	%rax, %rdi
	movq	%r13, %rax
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rax,%rsi,8), %rdx
	movq	(%rax), %rcx
	addq	%r8, %rdx
	cmpq	%rcx, %rdx
	cmovl	%rcx, %rdx
	subq	$8, %rax
	movq	%rdx, 8(%rax)
	cmpq	%rax, %rdi
	jne	.L7
.L8:
	addq	$1, %r9
	cmpq	%r10, %r9
	jne	.L6
.L4:
	movq	848(%rsp,%r12,8), %rdx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	800856(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$800872, %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
.L2:
	.cfi_restore_state
	leaq	848(%rsp), %rdi
	movl	$800008, %edx
	xorl	%esi, %esi
	call	memset@PLT
	movslq	12(%rsp), %r12
	jmp	.L4
.L18:
	movslq	%r11d, %r12
	jmp	.L4
.L19:
	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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%ld\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
	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	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2152, %rsp
	.cfi_def_cfa_offset 800928
	leaq	.LC0(%rip), %r15
	movq	%r15, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800856(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%r12d, %r12d
	leaq	432(%rsp), %rbx
	movq	%rbp, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%rbx,%r12,4), %rdx
	movq	%r13, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r14d
	addq	$1, %r12
	addq	$4, %r13
	cmpl	%r12d, %r14d
	jg	.L3
	leaq	848(%rsp), %rcx
	movl	$800008, %edx
	xorl	%esi, %esi
	movq	%rcx, %rdi
	call	memset@PLT
	movl	12(%rsp), %r11d
	testl	%r14d, %r14d
	jle	.L18
	movslq	%r11d, %r12
	movslq	%r14d, %r10
	xorl	%r9d, %r9d
	leaq	(%rax,%r12,8), %r13
	leaq	-8(%r13), %r14
	.p2align 4,,10
	.p2align 3
.L6:
	movl	0(%rbp,%r9,4), %eax
	cmpl	%r11d, %eax
	jg	.L8
	movl	%r11d, %esi
	movq	%r14, %rdi
	movslq	(%rbx,%r9,4), %r8
	subl	%eax, %esi
	movl	%esi, %eax
	movslq	%esi, %rsi
	salq	$3, %rax
	subq	%r12, %rsi
	subq	%rax, %rdi
	movq	%r13, %rax
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rax,%rsi,8), %rdx
	movq	(%rax), %rcx
	addq	%r8, %rdx
	cmpq	%rcx, %rdx
	cmovl	%rcx, %rdx
	subq	$8, %rax
	movq	%rdx, 8(%rax)
	cmpq	%rax, %rdi
	jne	.L7
.L8:
	addq	$1, %r9
	cmpq	%r10, %r9
	jne	.L6
.L4:
	movq	848(%rsp,%r12,8), %rdx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	800856(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$800872, %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
.L2:
	.cfi_restore_state
	leaq	848(%rsp), %rdi
	movl	$800008, %edx
	xorl	%esi, %esi
	call	memset@PLT
	movslq	12(%rsp), %r12
	jmp	.L4
.L18:
	movslq	%r11d, %r12
	jmp	.L4
.L19:
	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:
```
```c
#include <stdio.h>
#define max(a, b) ((a)>(b) ? (a) : (b))

int main(){
  int n, w_max, w[101], v[101];
  scanf("%d %d", &n, &w_max);
  for(int i=0; i<n; i++) scanf("%d %d", &w[i], &v[i]);

  long int dp[100001] = {0};

  for(int i=0; i<n; i++){
    for(int j=w_max; j>=w[i]; j--){
      dp[j] = max(dp[j], dp[j-w[i]]+v[i]);
    }
  }
     

  printf("%ld\n", dp[w_max]);
	
  
  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 max(a, b) ((a)>(b) ? (a) : (b))

int main(){
  int n, w_max, w[101], v[101];
  scanf("%d %d", &n, &w_max);
  for(int i=0; i<n; i++) scanf("%d %d", &w[i], &v[i]);

  long int dp[100001] = {0};

  for(int i=0; i<n; i++){
    for(int j=w_max; j>=w[i]; j--){
      dp[j] = max(dp[j], dp[j-w[i]]+v[i]);
    }
  }
     

  printf("%ld\n", dp[w_max]);
	
  
  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:

3 8
3 30
4 50
5 60

90

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 max(a, b) ((a)>(b) ? (a) : (b))

int main(){
  int n, w_max, w[101], v[101];
  scanf("%d %d", &n, &w_max);
  for(int i=0; i<n; i++) scanf("%d %d", &w[i], &v[i]);

  long int dp[100001] = {0};

  for(int i=0; i<n; i++){
    for(int j=w_max; j>=w[i]; j--){
      dp[j] = max(dp[j], dp[j-w[i]]+v[i]);
    }
  }
     

  printf("%ld\n", dp[w_max]);
	
  
  return 0;
}
    
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%ld\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
	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	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2152, %rsp
	.cfi_def_cfa_offset 800928
	leaq	.LC0(%rip), %r15
	movq	%r15, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800856(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%r12d, %r12d
	leaq	432(%rsp), %rbx
	movq	%rbp, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%rbx,%r12,4), %rdx
	movq	%r13, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r14d
	addq	$1, %r12
	addq	$4, %r13
	cmpl	%r12d, %r14d
	jg	.L3
	leaq	848(%rsp), %rcx
	movl	$800008, %edx
	xorl	%esi, %esi
	movq	%rcx, %rdi
	call	memset@PLT
	movl	12(%rsp), %r11d
	testl	%r14d, %r14d
	jle	.L18
	movslq	%r11d, %r12
	movslq	%r14d, %r10
	xorl	%r9d, %r9d
	leaq	(%rax,%r12,8), %r13
	leaq	-8(%r13), %r14
	.p2align 4,,10
	.p2align 3
.L6:
	movl	0(%rbp,%r9,4), %eax
	cmpl	%r11d, %eax
	jg	.L8
	movl	%r11d, %esi
	movq	%r14, %rdi
	movslq	(%rbx,%r9,4), %r8
	subl	%eax, %esi
	movl	%esi, %eax
	movslq	%esi, %rsi
	salq	$3, %rax
	subq	%r12, %rsi
	subq	%rax, %rdi
	movq	%r13, %rax
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rax,%rsi,8), %rdx
	movq	(%rax), %rcx
	addq	%r8, %rdx
	cmpq	%rcx, %rdx
	cmovl	%rcx, %rdx
	subq	$8, %rax
	movq	%rdx, 8(%rax)
	cmpq	%rax, %rdi
	jne	.L7
.L8:
	addq	$1, %r9
	cmpq	%r10, %r9
	jne	.L6
.L4:
	movq	848(%rsp,%r12,8), %rdx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	800856(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$800872, %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
.L2:
	.cfi_restore_state
	leaq	848(%rsp), %rdi
	movl	$800008, %edx
	xorl	%esi, %esi
	call	memset@PLT
	movslq	12(%rsp), %r12
	jmp	.L4
.L18:
	movslq	%r11d, %r12
	jmp	.L4
.L19:
	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:
```

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	"%ld\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
	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	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2152, %rsp
	.cfi_def_cfa_offset 800928
	leaq	.LC0(%rip), %r15
	movq	%r15, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800856(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%r12d, %r12d
	leaq	432(%rsp), %rbx
	movq	%rbp, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%rbx,%r12,4), %rdx
	movq	%r13, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r14d
	addq	$1, %r12
	addq	$4, %r13
	cmpl	%r12d, %r14d
	jg	.L3
	leaq	848(%rsp), %rcx
	movl	$800008, %edx
	xorl	%esi, %esi
	movq	%rcx, %rdi
	call	memset@PLT
	movl	12(%rsp), %r11d
	testl	%r14d, %r14d
	jle	.L18
	movslq	%r11d, %r12
	movslq	%r14d, %r10
	xorl	%r9d, %r9d
	leaq	(%rax,%r12,8), %r13
	leaq	-8(%r13), %r14
	.p2align 4,,10
	.p2align 3
.L6:
	movl	0(%rbp,%r9,4), %eax
	cmpl	%r11d, %eax
	jg	.L8
	movl	%r11d, %esi
	movq	%r14, %rdi
	movslq	(%rbx,%r9,4), %r8
	subl	%eax, %esi
	movl	%esi, %eax
	movslq	%esi, %rsi
	salq	$3, %rax
	subq	%r12, %rsi
	subq	%rax, %rdi
	movq	%r13, %rax
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rax,%rsi,8), %rdx
	movq	(%rax), %rcx
	addq	%r8, %rdx
	cmpq	%rcx, %rdx
	cmovl	%rcx, %rdx
	subq	$8, %rax
	movq	%rdx, 8(%rax)
	cmpq	%rax, %rdi
	jne	.L7
.L8:
	addq	$1, %r9
	cmpq	%r10, %r9
	jne	.L6
.L4:
	movq	848(%rsp,%r12,8), %rdx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	800856(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$800872, %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
.L2:
	.cfi_restore_state
	leaq	848(%rsp), %rdi
	movl	$800008, %edx
	xorl	%esi, %esi
	call	memset@PLT
	movslq	12(%rsp), %r12
	jmp	.L4
.L18:
	movslq	%r11d, %r12
	jmp	.L4
.L19:
	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:
```