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 N,K,T[100005],i,j,t,r;
int main()
{
	for(;scanf("%d%d",&N,&K),N+K;)
	{
		for(i=0;i<N;i++)
			scanf("%d",&T[i]);
		for(i=t=0;i<K;i++)t+=T[i];
		for(i=K,r=t;i<N;i++)
		{
			t=t-T[i-K]+T[i];
			r=r>t?r:t;
		}
		printf("%d\n",r);
	}
	return 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:
.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
	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	T(%rip), %rbx
	leaq	4(%rbx), %r15
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rsi
	xorl	%eax, %eax
	movq	%r14, %rdx
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movl	N(%rip), %ecx
	movslq	K(%rip), %rsi
	movl	%ecx, %eax
	addl	%esi, %eax
	je	.L20
	movl	$0, i(%rip)
	testl	%ecx, %ecx
	jle	.L3
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	cltq
	movq	%rbp, %rdi
	leaq	(%rbx,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	movl	N(%rip), %ecx
	addl	$1, %eax
	movl	%eax, i(%rip)
	cmpl	%ecx, %eax
	jl	.L4
	movslq	K(%rip), %rsi
.L3:
	movl	$0, t(%rip)
	testl	%esi, %esi
	jle	.L12
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L13
	movl	%esi, %edx
	leaq	T(%rip), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	leaq	16(%rax), %rdi
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rdi, %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L7
	movdqa	%xmm0, %xmm1
	movl	%esi, %edx
	psrldq	$8, %xmm1
	andl	$-4, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %sil
	je	.L8
.L6:
	movslq	%edx, %rdi
	addl	(%rbx,%rdi,4), %eax
	leal	1(%rdx), %edi
	cmpl	%esi, %edi
	jge	.L8
	movslq	%edi, %rdi
	addl	$2, %edx
	addl	(%rbx,%rdi,4), %eax
	cmpl	%edx, %esi
	jle	.L8
	movslq	%edx, %rdx
	addl	(%rbx,%rdx,4), %eax
.L8:
	movl	%eax, t(%rip)
	movl	%esi, i(%rip)
	movl	%eax, r(%rip)
	cmpl	%esi, %ecx
	jle	.L14
.L21:
	leal	-1(%rcx), %edi
	leaq	T(%rip), %rdx
	movl	%eax, %r8d
	subl	%esi, %edi
	leaq	(%r15,%rdi,4), %rdi
	.p2align 4,,10
	.p2align 3
.L10:
	subl	(%rdx), %eax
	addl	(%rdx,%rsi,4), %eax
	cmpl	%eax, %r8d
	cmovl	%eax, %r8d
	addq	$4, %rdx
	cmpq	%rdi, %rdx
	jne	.L10
	movl	%eax, t(%rip)
	movl	%r8d, r(%rip)
	movl	%ecx, i(%rip)
.L9:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$8, %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
.L12:
	.cfi_restore_state
	xorl	%eax, %eax
	movl	%esi, i(%rip)
	movl	%eax, r(%rip)
	cmpl	%esi, %ecx
	jg	.L21
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%eax, %r8d
	jmp	.L9
.L13:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L6
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	r
	.bss
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	T
	.align 32
	.type	T, @object
	.size	T, 400020
T:
	.zero	400020
	.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:
.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
	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	T(%rip), %rbx
	leaq	4(%rbx), %r15
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rsi
	xorl	%eax, %eax
	movq	%r14, %rdx
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movl	N(%rip), %ecx
	movslq	K(%rip), %rsi
	movl	%ecx, %eax
	addl	%esi, %eax
	je	.L20
	movl	$0, i(%rip)
	testl	%ecx, %ecx
	jle	.L3
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	cltq
	movq	%rbp, %rdi
	leaq	(%rbx,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	movl	N(%rip), %ecx
	addl	$1, %eax
	movl	%eax, i(%rip)
	cmpl	%ecx, %eax
	jl	.L4
	movslq	K(%rip), %rsi
.L3:
	movl	$0, t(%rip)
	testl	%esi, %esi
	jle	.L12
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L13
	movl	%esi, %edx
	leaq	T(%rip), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	leaq	16(%rax), %rdi
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rdi, %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L7
	movdqa	%xmm0, %xmm1
	movl	%esi, %edx
	psrldq	$8, %xmm1
	andl	$-4, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %sil
	je	.L8
.L6:
	movslq	%edx, %rdi
	addl	(%rbx,%rdi,4), %eax
	leal	1(%rdx), %edi
	cmpl	%esi, %edi
	jge	.L8
	movslq	%edi, %rdi
	addl	$2, %edx
	addl	(%rbx,%rdi,4), %eax
	cmpl	%edx, %esi
	jle	.L8
	movslq	%edx, %rdx
	addl	(%rbx,%rdx,4), %eax
.L8:
	movl	%eax, t(%rip)
	movl	%esi, i(%rip)
	movl	%eax, r(%rip)
	cmpl	%esi, %ecx
	jle	.L14
.L21:
	leal	-1(%rcx), %edi
	leaq	T(%rip), %rdx
	movl	%eax, %r8d
	subl	%esi, %edi
	leaq	(%r15,%rdi,4), %rdi
	.p2align 4,,10
	.p2align 3
.L10:
	subl	(%rdx), %eax
	addl	(%rdx,%rsi,4), %eax
	cmpl	%eax, %r8d
	cmovl	%eax, %r8d
	addq	$4, %rdx
	cmpq	%rdi, %rdx
	jne	.L10
	movl	%eax, t(%rip)
	movl	%r8d, r(%rip)
	movl	%ecx, i(%rip)
.L9:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$8, %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
.L12:
	.cfi_restore_state
	xorl	%eax, %eax
	movl	%esi, i(%rip)
	movl	%eax, r(%rip)
	cmpl	%esi, %ecx
	jg	.L21
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%eax, %r8d
	jmp	.L9
.L13:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L6
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	r
	.bss
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	T
	.align 32
	.type	T, @object
	.size	T, 400020
T:
	.zero	400020
	.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:
.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
	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	T(%rip), %rbx
	leaq	4(%rbx), %r15
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rsi
	xorl	%eax, %eax
	movq	%r14, %rdx
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movl	N(%rip), %ecx
	movslq	K(%rip), %rsi
	movl	%ecx, %eax
	addl	%esi, %eax
	je	.L20
	movl	$0, i(%rip)
	testl	%ecx, %ecx
	jle	.L3
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	cltq
	movq	%rbp, %rdi
	leaq	(%rbx,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	movl	N(%rip), %ecx
	addl	$1, %eax
	movl	%eax, i(%rip)
	cmpl	%ecx, %eax
	jl	.L4
	movslq	K(%rip), %rsi
.L3:
	movl	$0, t(%rip)
	testl	%esi, %esi
	jle	.L12
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L13
	movl	%esi, %edx
	leaq	T(%rip), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	leaq	16(%rax), %rdi
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rdi, %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L7
	movdqa	%xmm0, %xmm1
	movl	%esi, %edx
	psrldq	$8, %xmm1
	andl	$-4, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %sil
	je	.L8
.L6:
	movslq	%edx, %rdi
	addl	(%rbx,%rdi,4), %eax
	leal	1(%rdx), %edi
	cmpl	%esi, %edi
	jge	.L8
	movslq	%edi, %rdi
	addl	$2, %edx
	addl	(%rbx,%rdi,4), %eax
	cmpl	%edx, %esi
	jle	.L8
	movslq	%edx, %rdx
	addl	(%rbx,%rdx,4), %eax
.L8:
	movl	%eax, t(%rip)
	movl	%esi, i(%rip)
	movl	%eax, r(%rip)
	cmpl	%esi, %ecx
	jle	.L14
.L21:
	leal	-1(%rcx), %edi
	leaq	T(%rip), %rdx
	movl	%eax, %r8d
	subl	%esi, %edi
	leaq	(%r15,%rdi,4), %rdi
	.p2align 4,,10
	.p2align 3
.L10:
	subl	(%rdx), %eax
	addl	(%rdx,%rsi,4), %eax
	cmpl	%eax, %r8d
	cmovl	%eax, %r8d
	addq	$4, %rdx
	cmpq	%rdi, %rdx
	jne	.L10
	movl	%eax, t(%rip)
	movl	%r8d, r(%rip)
	movl	%ecx, i(%rip)
.L9:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$8, %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
.L12:
	.cfi_restore_state
	xorl	%eax, %eax
	movl	%esi, i(%rip)
	movl	%eax, r(%rip)
	cmpl	%esi, %ecx
	jg	.L21
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%eax, %r8d
	jmp	.L9
.L13:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L6
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	r
	.bss
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	T
	.align 32
	.type	T, @object
	.size	T, 400020
T:
	.zero	400020
	.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
#include<stdio.h>

int N,K,T[100005],i,j,t,r;
int main()
{
	for(;scanf("%d%d",&N,&K),N+K;)
	{
		for(i=0;i<N;i++)
			scanf("%d",&T[i]);
		for(i=t=0;i<K;i++)t+=T[i];
		for(i=K,r=t;i<N;i++)
		{
			t=t-T[i-K]+T[i];
			r=r>t?r:t;
		}
		printf("%d\n",r);
	}
	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 N,K,T[100005],i,j,t,r;
int main()
{
	for(;scanf("%d%d",&N,&K),N+K;)
	{
		for(i=0;i<N;i++)
			scanf("%d",&T[i]);
		for(i=t=0;i<K;i++)t+=T[i];
		for(i=K,r=t;i<N;i++)
		{
			t=t-T[i-K]+T[i];
			r=r>t?r:t;
		}
		printf("%d\n",r);
	}
	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:

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

int N,K,T[100005],i,j,t,r;
int main()
{
	for(;scanf("%d%d",&N,&K),N+K;)
	{
		for(i=0;i<N;i++)
			scanf("%d",&T[i]);
		for(i=t=0;i<K;i++)t+=T[i];
		for(i=K,r=t;i<N;i++)
		{
			t=t-T[i-K]+T[i];
			r=r>t?r:t;
		}
		printf("%d\n",r);
	}
	return 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:
.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
	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	T(%rip), %rbx
	leaq	4(%rbx), %r15
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rsi
	xorl	%eax, %eax
	movq	%r14, %rdx
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movl	N(%rip), %ecx
	movslq	K(%rip), %rsi
	movl	%ecx, %eax
	addl	%esi, %eax
	je	.L20
	movl	$0, i(%rip)
	testl	%ecx, %ecx
	jle	.L3
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	cltq
	movq	%rbp, %rdi
	leaq	(%rbx,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	movl	N(%rip), %ecx
	addl	$1, %eax
	movl	%eax, i(%rip)
	cmpl	%ecx, %eax
	jl	.L4
	movslq	K(%rip), %rsi
.L3:
	movl	$0, t(%rip)
	testl	%esi, %esi
	jle	.L12
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L13
	movl	%esi, %edx
	leaq	T(%rip), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	leaq	16(%rax), %rdi
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rdi, %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L7
	movdqa	%xmm0, %xmm1
	movl	%esi, %edx
	psrldq	$8, %xmm1
	andl	$-4, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %sil
	je	.L8
.L6:
	movslq	%edx, %rdi
	addl	(%rbx,%rdi,4), %eax
	leal	1(%rdx), %edi
	cmpl	%esi, %edi
	jge	.L8
	movslq	%edi, %rdi
	addl	$2, %edx
	addl	(%rbx,%rdi,4), %eax
	cmpl	%edx, %esi
	jle	.L8
	movslq	%edx, %rdx
	addl	(%rbx,%rdx,4), %eax
.L8:
	movl	%eax, t(%rip)
	movl	%esi, i(%rip)
	movl	%eax, r(%rip)
	cmpl	%esi, %ecx
	jle	.L14
.L21:
	leal	-1(%rcx), %edi
	leaq	T(%rip), %rdx
	movl	%eax, %r8d
	subl	%esi, %edi
	leaq	(%r15,%rdi,4), %rdi
	.p2align 4,,10
	.p2align 3
.L10:
	subl	(%rdx), %eax
	addl	(%rdx,%rsi,4), %eax
	cmpl	%eax, %r8d
	cmovl	%eax, %r8d
	addq	$4, %rdx
	cmpq	%rdi, %rdx
	jne	.L10
	movl	%eax, t(%rip)
	movl	%r8d, r(%rip)
	movl	%ecx, i(%rip)
.L9:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$8, %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
.L12:
	.cfi_restore_state
	xorl	%eax, %eax
	movl	%esi, i(%rip)
	movl	%eax, r(%rip)
	cmpl	%esi, %ecx
	jg	.L21
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%eax, %r8d
	jmp	.L9
.L13:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L6
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	r
	.bss
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	T
	.align 32
	.type	T, @object
	.size	T, 400020
T:
	.zero	400020
	.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:
.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
	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	T(%rip), %rbx
	leaq	4(%rbx), %r15
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rsi
	xorl	%eax, %eax
	movq	%r14, %rdx
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movl	N(%rip), %ecx
	movslq	K(%rip), %rsi
	movl	%ecx, %eax
	addl	%esi, %eax
	je	.L20
	movl	$0, i(%rip)
	testl	%ecx, %ecx
	jle	.L3
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	cltq
	movq	%rbp, %rdi
	leaq	(%rbx,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	movl	N(%rip), %ecx
	addl	$1, %eax
	movl	%eax, i(%rip)
	cmpl	%ecx, %eax
	jl	.L4
	movslq	K(%rip), %rsi
.L3:
	movl	$0, t(%rip)
	testl	%esi, %esi
	jle	.L12
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L13
	movl	%esi, %edx
	leaq	T(%rip), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	leaq	16(%rax), %rdi
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rdi, %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L7
	movdqa	%xmm0, %xmm1
	movl	%esi, %edx
	psrldq	$8, %xmm1
	andl	$-4, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %sil
	je	.L8
.L6:
	movslq	%edx, %rdi
	addl	(%rbx,%rdi,4), %eax
	leal	1(%rdx), %edi
	cmpl	%esi, %edi
	jge	.L8
	movslq	%edi, %rdi
	addl	$2, %edx
	addl	(%rbx,%rdi,4), %eax
	cmpl	%edx, %esi
	jle	.L8
	movslq	%edx, %rdx
	addl	(%rbx,%rdx,4), %eax
.L8:
	movl	%eax, t(%rip)
	movl	%esi, i(%rip)
	movl	%eax, r(%rip)
	cmpl	%esi, %ecx
	jle	.L14
.L21:
	leal	-1(%rcx), %edi
	leaq	T(%rip), %rdx
	movl	%eax, %r8d
	subl	%esi, %edi
	leaq	(%r15,%rdi,4), %rdi
	.p2align 4,,10
	.p2align 3
.L10:
	subl	(%rdx), %eax
	addl	(%rdx,%rsi,4), %eax
	cmpl	%eax, %r8d
	cmovl	%eax, %r8d
	addq	$4, %rdx
	cmpq	%rdi, %rdx
	jne	.L10
	movl	%eax, t(%rip)
	movl	%r8d, r(%rip)
	movl	%ecx, i(%rip)
.L9:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$8, %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
.L12:
	.cfi_restore_state
	xorl	%eax, %eax
	movl	%esi, i(%rip)
	movl	%eax, r(%rip)
	cmpl	%esi, %ecx
	jg	.L21
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%eax, %r8d
	jmp	.L9
.L13:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L6
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	r
	.bss
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	T
	.align 32
	.type	T, @object
	.size	T, 400020
T:
	.zero	400020
	.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:
```