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>

#define MAX_N 200010
#define MOD 1000000007

int main(){
  int n, k;
  long long max, min;
  long long ans = 0;
  scanf("%d %d", &n, &k);
  max = 0;
  min = 0;
  for (int i = 1; i <= n+1; i++) {
    min = min + i - 1;
    max = max + n - i + 1;
    if (i >= k) {
      ans += max - min + 1;
      ans %= MOD;
    }
  }
  printf("%lld\n", ans);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -16(%rbp)
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$1, -36(%rbp)
	jmp	.L2
.L4:
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	subq	$1, %rax
	movq	%rax, -24(%rbp)
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	addq	$1, %rax
	movq	%rax, -32(%rbp)
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L3
	movq	-32(%rbp), %rax
	subq	-24(%rbp), %rax
	addq	$1, %rax
	addq	%rax, -16(%rbp)
	movq	-16(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
.L3:
	addl	$1, -36(%rbp)
.L2:
	movl	-44(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -36(%rbp)
	jle	.L4
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	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	.L6
	call	__stack_chk_fail@PLT
.L6:
	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
.LC1:
	.string	"%d %d"
.LC5:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC1(%rip), %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r9d
	testl	%r9d, %r9d
	js	.L11
	movl	4(%rsp), %eax
	movslq	%r9d, %r10
	cmpl	$1, %eax
	jle	.L12
	leal	2(%r9), %edx
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	movl	$1, %eax
	leal	-1(%rdx), %r8d
	cmpl	$1, %edx
	cmovle	%eax, %r8d
	cmpl	$5, %edx
	jle	.L13
	pxor	%xmm4, %xmm4
	movl	%r8d, %ecx
	xorl	%eax, %eax
	movdqa	.LC0(%rip), %xmm5
	movq	%r10, %xmm9
	shrl	$2, %ecx
	movdqa	%xmm4, %xmm3
	movdqa	%xmm4, %xmm1
	punpcklqdq	%xmm9, %xmm9
	movdqa	%xmm4, %xmm0
	pxor	%xmm10, %xmm10
	movdqa	.LC2(%rip), %xmm12
	movdqa	.LC3(%rip), %xmm8
	pcmpeqd	%xmm7, %xmm7
	movdqa	.LC4(%rip), %xmm11
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	%xmm5, %xmm2
	movdqa	%xmm10, %xmm14
	paddq	%xmm9, %xmm0
	addl	$1, %eax
	pcmpgtd	%xmm2, %xmm14
	movdqa	%xmm2, %xmm13
	movdqa	%xmm2, %xmm6
	paddq	%xmm9, %xmm1
	paddd	%xmm12, %xmm5
	punpckhdq	%xmm14, %xmm6
	punpckldq	%xmm14, %xmm13
	paddq	%xmm6, %xmm4
	psubq	%xmm6, %xmm1
	movdqa	%xmm2, %xmm6
	paddq	%xmm13, %xmm3
	psubq	%xmm13, %xmm0
	paddq	%xmm7, %xmm3
	paddq	%xmm7, %xmm4
	paddq	%xmm8, %xmm0
	paddq	%xmm8, %xmm1
	paddd	%xmm11, %xmm6
	cmpl	%ecx, %eax
	jne	.L6
	paddq	%xmm1, %xmm0
	paddq	%xmm4, %xmm3
	pshufd	$255, %xmm6, %xmm6
	movl	%r8d, %r11d
	movdqa	%xmm0, %xmm1
	andl	$-4, %r11d
	movd	%xmm6, %esi
	psrldq	$8, %xmm1
	leal	1(%r11), %ebx
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rcx
	movdqa	%xmm3, %xmm0
	psrldq	$8, %xmm0
	paddq	%xmm0, %xmm3
	pshufd	$255, %xmm2, %xmm0
	movq	%xmm3, %rdi
	movd	%xmm0, %eax
	cmpl	%r11d, %r8d
	je	.L7
	movl	%ebx, %eax
.L4:
	movslq	%eax, %rsi
	subq	%rsi, %rcx
	leaq	-1(%rsi,%rdi), %rdi
	leal	1(%rax), %esi
	leaq	1(%rcx,%r10), %rcx
	cmpl	%edx, %esi
	jge	.L7
	movslq	%esi, %r8
	addq	%r10, %rcx
	subq	%r8, %rcx
	leaq	-1(%rdi,%r8), %rdi
	leal	2(%rax), %r8d
	addq	$1, %rcx
	cmpl	%r8d, %edx
	jle	.L14
	movslq	%r8d, %rsi
	addq	%r10, %rcx
	subq	%rsi, %rcx
	leaq	-1(%rdi,%rsi), %rdi
	leal	3(%rax), %esi
	addq	$1, %rcx
	cmpl	%esi, %edx
	jle	.L15
	movslq	%esi, %rdx
	subq	%rdx, %rcx
	leaq	-1(%rdx,%rdi), %rdi
	leal	4(%rax), %edx
	movl	%esi, %eax
	leaq	1(%rcx,%r10), %rcx
	movl	%edx, %esi
.L7:
	cmpl	%eax, %r9d
	jge	.L3
.L11:
	xorl	%edx, %edx
.L2:
	xorl	%eax, %eax
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	movl	$1, %esi
	xorl	%edi, %edi
	xorl	%ecx, %ecx
.L3:
	leal	-1(%rsi), %r11d
	movslq	%esi, %r8
	xorl	%edx, %edx
	movabsq	$-8543223828751151131, %rbx
	subl	%esi, %r11d
	.p2align 4,,10
	.p2align 3
.L8:
	addq	%r10, %rcx
	leaq	-1(%rdi,%r8), %rdi
	subq	%r8, %rcx
	addq	$1, %r8
	addq	$1, %rcx
	movq	%rcx, %rax
	subq	%rdi, %rax
	leaq	1(%rdx,%rax), %rsi
	movq	%rsi, %rax
	imulq	%rbx
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	leal	(%r11,%r8), %eax
	movq	%rsi, %rdx
	cmpl	%eax, %r9d
	jge	.L8
	jmp	.L2
.L15:
	movl	%r8d, %eax
	jmp	.L7
.L13:
	movl	$1, %eax
	xorl	%edi, %edi
	xorl	%ecx, %ecx
	jmp	.L4
.L14:
	movl	%esi, %eax
	movl	%r8d, %esi
	jmp	.L7
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
	.quad	1
	.quad	1
	.align 16
.LC4:
	.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"
.LC5:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC1(%rip), %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r9d
	testl	%r9d, %r9d
	js	.L11
	movl	4(%rsp), %eax
	movslq	%r9d, %r10
	cmpl	$1, %eax
	jle	.L12
	leal	2(%r9), %edx
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	movl	$1, %eax
	leal	-1(%rdx), %r8d
	cmpl	$1, %edx
	cmovle	%eax, %r8d
	cmpl	$5, %edx
	jle	.L13
	pxor	%xmm4, %xmm4
	movl	%r8d, %ecx
	xorl	%eax, %eax
	movdqa	.LC0(%rip), %xmm5
	movq	%r10, %xmm9
	shrl	$2, %ecx
	movdqa	%xmm4, %xmm3
	movdqa	%xmm4, %xmm1
	punpcklqdq	%xmm9, %xmm9
	movdqa	%xmm4, %xmm0
	pxor	%xmm10, %xmm10
	movdqa	.LC2(%rip), %xmm12
	movdqa	.LC3(%rip), %xmm8
	pcmpeqd	%xmm7, %xmm7
	movdqa	.LC4(%rip), %xmm11
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	%xmm5, %xmm2
	movdqa	%xmm10, %xmm14
	paddq	%xmm9, %xmm0
	addl	$1, %eax
	pcmpgtd	%xmm2, %xmm14
	movdqa	%xmm2, %xmm13
	movdqa	%xmm2, %xmm6
	paddq	%xmm9, %xmm1
	paddd	%xmm12, %xmm5
	punpckhdq	%xmm14, %xmm6
	punpckldq	%xmm14, %xmm13
	paddq	%xmm6, %xmm4
	psubq	%xmm6, %xmm1
	movdqa	%xmm2, %xmm6
	paddq	%xmm13, %xmm3
	psubq	%xmm13, %xmm0
	paddq	%xmm7, %xmm3
	paddq	%xmm7, %xmm4
	paddq	%xmm8, %xmm0
	paddq	%xmm8, %xmm1
	paddd	%xmm11, %xmm6
	cmpl	%ecx, %eax
	jne	.L6
	paddq	%xmm1, %xmm0
	paddq	%xmm4, %xmm3
	pshufd	$255, %xmm6, %xmm6
	movl	%r8d, %r11d
	movdqa	%xmm0, %xmm1
	andl	$-4, %r11d
	movd	%xmm6, %esi
	psrldq	$8, %xmm1
	leal	1(%r11), %ebx
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rcx
	movdqa	%xmm3, %xmm0
	psrldq	$8, %xmm0
	paddq	%xmm0, %xmm3
	pshufd	$255, %xmm2, %xmm0
	movq	%xmm3, %rdi
	movd	%xmm0, %eax
	cmpl	%r11d, %r8d
	je	.L7
	movl	%ebx, %eax
.L4:
	movslq	%eax, %rsi
	subq	%rsi, %rcx
	leaq	-1(%rsi,%rdi), %rdi
	leal	1(%rax), %esi
	leaq	1(%rcx,%r10), %rcx
	cmpl	%edx, %esi
	jge	.L7
	movslq	%esi, %r8
	addq	%r10, %rcx
	subq	%r8, %rcx
	leaq	-1(%rdi,%r8), %rdi
	leal	2(%rax), %r8d
	addq	$1, %rcx
	cmpl	%r8d, %edx
	jle	.L14
	movslq	%r8d, %rsi
	addq	%r10, %rcx
	subq	%rsi, %rcx
	leaq	-1(%rdi,%rsi), %rdi
	leal	3(%rax), %esi
	addq	$1, %rcx
	cmpl	%esi, %edx
	jle	.L15
	movslq	%esi, %rdx
	subq	%rdx, %rcx
	leaq	-1(%rdx,%rdi), %rdi
	leal	4(%rax), %edx
	movl	%esi, %eax
	leaq	1(%rcx,%r10), %rcx
	movl	%edx, %esi
.L7:
	cmpl	%eax, %r9d
	jge	.L3
.L11:
	xorl	%edx, %edx
.L2:
	xorl	%eax, %eax
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	movl	$1, %esi
	xorl	%edi, %edi
	xorl	%ecx, %ecx
.L3:
	leal	-1(%rsi), %r11d
	movslq	%esi, %r8
	xorl	%edx, %edx
	movabsq	$-8543223828751151131, %rbx
	subl	%esi, %r11d
	.p2align 4,,10
	.p2align 3
.L8:
	addq	%r10, %rcx
	leaq	-1(%rdi,%r8), %rdi
	subq	%r8, %rcx
	addq	$1, %r8
	addq	$1, %rcx
	movq	%rcx, %rax
	subq	%rdi, %rax
	leaq	1(%rdx,%rax), %rsi
	movq	%rsi, %rax
	imulq	%rbx
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	leal	(%r11,%r8), %eax
	movq	%rsi, %rdx
	cmpl	%eax, %r9d
	jge	.L8
	jmp	.L2
.L15:
	movl	%r8d, %eax
	jmp	.L7
.L13:
	movl	$1, %eax
	xorl	%edi, %edi
	xorl	%ecx, %ecx
	jmp	.L4
.L14:
	movl	%esi, %eax
	movl	%r8d, %esi
	jmp	.L7
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
	.quad	1
	.quad	1
	.align 16
.LC4:
	.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>

#define MAX_N 200010
#define MOD 1000000007

int main(){
  int n, k;
  long long max, min;
  long long ans = 0;
  scanf("%d %d", &n, &k);
  max = 0;
  min = 0;
  for (int i = 1; i <= n+1; i++) {
    min = min + i - 1;
    max = max + n - i + 1;
    if (i >= k) {
      ans += max - min + 1;
      ans %= MOD;
    }
  }
  printf("%lld\n", ans);
  return 0;
}

141421 60408
 206306 200001
 3 1
 10931 60408
 107814 81103
 3981 3277
 6048 4398
 10232 4398
 1001 598
 1001 546

832536804
 7746530
 14
 0
 472847449
 873931631
 747717858
 993609367
 59912595
 72694533

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>

#define MAX_N 200010
#define MOD 1000000007

int main(){
  int n, k;
  long long max, min;
  long long ans = 0;
  scanf("%d %d", &n, &k);
  max = 0;
  min = 0;
  for (int i = 1; i <= n+1; i++) {
    min = min + i - 1;
    max = max + n - i + 1;
    if (i >= k) {
      ans += max - min + 1;
      ans %= MOD;
    }
  }
  printf("%lld\n", ans);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -16(%rbp)
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$1, -36(%rbp)
	jmp	.L2
.L4:
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	subq	$1, %rax
	movq	%rax, -24(%rbp)
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	addq	$1, %rax
	movq	%rax, -32(%rbp)
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L3
	movq	-32(%rbp), %rax
	subq	-24(%rbp), %rax
	addq	$1, %rax
	addq	%rax, -16(%rbp)
	movq	-16(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
.L3:
	addl	$1, -36(%rbp)
.L2:
	movl	-44(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -36(%rbp)
	jle	.L4
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	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	.L6
	call	__stack_chk_fail@PLT
.L6:
	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
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -16(%rbp)
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$1, -36(%rbp)
	jmp	.L2
.L4:
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	subq	$1, %rax
	movq	%rax, -24(%rbp)
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	addq	$1, %rax
	movq	%rax, -32(%rbp)
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L3
	movq	-32(%rbp), %rax
	subq	-24(%rbp), %rax
	addq	$1, %rax
	addq	%rax, -16(%rbp)
	movq	-16(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
.L3:
	addl	$1, -36(%rbp)
.L2:
	movl	-44(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -36(%rbp)
	jle	.L4
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	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	.L6
	call	__stack_chk_fail@PLT
.L6:
	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:
