Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
n,k,a[100000],s,S,i;
main(){
	for(;scanf("%d%d",&n,&k),n;){
		s=0;
		S=-1e9;
		for(i=0;i<n;i++){
			scanf("%d",a+i);
			s+=a[i];
			if(i>=k){
				s-=a[i-k];
				if(s>S)
					S=s;
			}
		}
		if(s>S)
			S=s;
		printf("%d\n",S);
	}
	exit(0);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC1(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	k(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	n(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	a(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L12
	movl	$0, s(%rip)
	movl	$-1000000000, S(%rip)
	movl	$0, i(%rip)
	jle	.L8
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L5:
	cltq
	movq	%rbp, %rdi
	leaq	(%rbx,%rax,4), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	i(%rip), %rcx
	movl	s(%rip), %edx
	movq	%rcx, %rax
	addl	(%rbx,%rcx,4), %edx
	movl	k(%rip), %ecx
	movl	%edx, s(%rip)
	cmpl	%ecx, %eax
	jl	.L4
	movl	%eax, %esi
	subl	%ecx, %esi
	movslq	%esi, %rcx
	subl	(%rbx,%rcx,4), %edx
	cmpl	S(%rip), %edx
	movl	%edx, s(%rip)
	jle	.L4
	movl	%edx, S(%rip)
.L4:
	addl	$1, %eax
	cmpl	n(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L5
	movl	S(%rip), %esi
	cmpl	%edx, %esi
	jl	.L3
.L6:
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L8:
	xorl	%edx, %edx
.L3:
	movl	%edx, S(%rip)
	movl	%edx, %esi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	S
	.align 4
	.type	S, @object
	.size	S, 4
S:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 400000
a:
	.zero	400000
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC1(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	k(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	n(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	a(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L12
	movl	$0, s(%rip)
	movl	$-1000000000, S(%rip)
	movl	$0, i(%rip)
	jle	.L8
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L5:
	cltq
	movq	%rbp, %rdi
	leaq	(%rbx,%rax,4), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	i(%rip), %rcx
	movl	s(%rip), %edx
	movq	%rcx, %rax
	addl	(%rbx,%rcx,4), %edx
	movl	k(%rip), %ecx
	movl	%edx, s(%rip)
	cmpl	%ecx, %eax
	jl	.L4
	movl	%eax, %esi
	subl	%ecx, %esi
	movslq	%esi, %rcx
	subl	(%rbx,%rcx,4), %edx
	cmpl	S(%rip), %edx
	movl	%edx, s(%rip)
	jle	.L4
	movl	%edx, S(%rip)
.L4:
	addl	$1, %eax
	cmpl	n(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L5
	movl	S(%rip), %esi
	cmpl	%edx, %esi
	jl	.L3
.L6:
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L8:
	xorl	%edx, %edx
.L3:
	movl	%edx, S(%rip)
	movl	%edx, %esi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	S
	.align 4
	.type	S, @object
	.size	S, 4
S:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 400000
a:
	.zero	400000
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC1(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	k(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	n(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	a(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L12
	movl	$0, s(%rip)
	movl	$-1000000000, S(%rip)
	movl	$0, i(%rip)
	jle	.L8
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L5:
	cltq
	movq	%rbp, %rdi
	leaq	(%rbx,%rax,4), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	i(%rip), %rcx
	movl	s(%rip), %edx
	movq	%rcx, %rax
	addl	(%rbx,%rcx,4), %edx
	movl	k(%rip), %ecx
	movl	%edx, s(%rip)
	cmpl	%ecx, %eax
	jl	.L4
	movl	%eax, %esi
	subl	%ecx, %esi
	movslq	%esi, %rcx
	subl	(%rbx,%rcx,4), %edx
	cmpl	S(%rip), %edx
	movl	%edx, s(%rip)
	jle	.L4
	movl	%edx, S(%rip)
.L4:
	addl	$1, %eax
	cmpl	n(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L5
	movl	S(%rip), %esi
	cmpl	%edx, %esi
	jl	.L3
.L6:
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L8:
	xorl	%edx, %edx
.L3:
	movl	%edx, S(%rip)
	movl	%edx, %esi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	S
	.align 4
	.type	S, @object
	.size	S, 4
S:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 400000
a:
	.zero	400000
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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
n,k,a[100000],s,S,i;
main(){
	for(;scanf("%d%d",&n,&k),n;){
		s=0;
		S=-1e9;
		for(i=0;i<n;i++){
			scanf("%d",a+i);
			s+=a[i];
			if(i>=k){
				s-=a[i-k];
				if(s>S)
					S=s;
			}
		}
		if(s>S)
			S=s;
		printf("%d\n",S);
	}
	exit(0);
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
n,k,a[100000],s,S,i;
main(){
	for(;scanf("%d%d",&n,&k),n;){
		s=0;
		S=-1e9;
		for(i=0;i<n;i++){
			scanf("%d",a+i);
			s+=a[i];
			if(i>=k){
				s-=a[i-k];
				if(s>S)
					S=s;
			}
		}
		if(s>S)
			S=s;
		printf("%d\n",S);
	}
	exit(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:

5 3
2
5
-4
8
3
0 0
 5 3
2
5
-4
12
3
0 0
 5 3
2
5
-4
14
3
0 0
 5 3
2
9
-4
14
1
0 0
 5 3
1
9
-4
2
1
0 0
 5 3
2
8
-4
12
3
0 0
 5 1
2
9
-4
14
1
0 0
 5 3
1
9
-4
13
1
0 0
 5 3
1
2
-4
13
1
0 0
 5 3
2
5
-4
5
3
0 0

9
 13
 15
 19
 7
 16
 14
 18
 11
 6

Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
n,k,a[100000],s,S,i;
main(){
	for(;scanf("%d%d",&n,&k),n;){
		s=0;
		S=-1e9;
		for(i=0;i<n;i++){
			scanf("%d",a+i);
			s+=a[i];
			if(i>=k){
				s-=a[i-k];
				if(s>S)
					S=s;
			}
		}
		if(s>S)
			S=s;
		printf("%d\n",S);
	}
	exit(0);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC1(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	k(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	n(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	a(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L12
	movl	$0, s(%rip)
	movl	$-1000000000, S(%rip)
	movl	$0, i(%rip)
	jle	.L8
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L5:
	cltq
	movq	%rbp, %rdi
	leaq	(%rbx,%rax,4), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	i(%rip), %rcx
	movl	s(%rip), %edx
	movq	%rcx, %rax
	addl	(%rbx,%rcx,4), %edx
	movl	k(%rip), %ecx
	movl	%edx, s(%rip)
	cmpl	%ecx, %eax
	jl	.L4
	movl	%eax, %esi
	subl	%ecx, %esi
	movslq	%esi, %rcx
	subl	(%rbx,%rcx,4), %edx
	cmpl	S(%rip), %edx
	movl	%edx, s(%rip)
	jle	.L4
	movl	%edx, S(%rip)
.L4:
	addl	$1, %eax
	cmpl	n(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L5
	movl	S(%rip), %esi
	cmpl	%edx, %esi
	jl	.L3
.L6:
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L8:
	xorl	%edx, %edx
.L3:
	movl	%edx, S(%rip)
	movl	%edx, %esi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	S
	.align 4
	.type	S, @object
	.size	S, 4
S:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 400000
a:
	.zero	400000
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC1(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	k(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	n(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	a(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L12
	movl	$0, s(%rip)
	movl	$-1000000000, S(%rip)
	movl	$0, i(%rip)
	jle	.L8
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L5:
	cltq
	movq	%rbp, %rdi
	leaq	(%rbx,%rax,4), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	i(%rip), %rcx
	movl	s(%rip), %edx
	movq	%rcx, %rax
	addl	(%rbx,%rcx,4), %edx
	movl	k(%rip), %ecx
	movl	%edx, s(%rip)
	cmpl	%ecx, %eax
	jl	.L4
	movl	%eax, %esi
	subl	%ecx, %esi
	movslq	%esi, %rcx
	subl	(%rbx,%rcx,4), %edx
	cmpl	S(%rip), %edx
	movl	%edx, s(%rip)
	jle	.L4
	movl	%edx, S(%rip)
.L4:
	addl	$1, %eax
	cmpl	n(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L5
	movl	S(%rip), %esi
	cmpl	%edx, %esi
	jl	.L3
.L6:
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L8:
	xorl	%edx, %edx
.L3:
	movl	%edx, S(%rip)
	movl	%edx, %esi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	S
	.align 4
	.type	S, @object
	.size	S, 4
S:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 400000
a:
	.zero	400000
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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:
```