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(x, y) ((x) > (y) ? (x) : (y))
int main(){
  while(1){
    int n, k, i, sum = 0, ans = 0, nums[100000];
    scanf("%d%d", &n, &k);
    if(n ==0 && k == 0)return 0;
    for(i = 0;i < n;i++){
      scanf("%d", nums + i);
    }
    for(i = 0;i < k;i++){
      sum += nums[i];
    }
    ans = sum;
    for(i = k;i < n;i++){
      sum -= nums[i - k];
      sum += nums[i];
      ans = max(ans, sum);
    }
    printf("%d\n", ans);
  }
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\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	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2744, %rsp
	.cfi_def_cfa_offset 400112
	leaq	.LC0(%rip), %rbp
	leaq	.LC1(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rax
	leaq	28(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	24(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rbp, %rdi
	movq	%r13, %rdx
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %edi
	testl	%edi, %edi
	jne	.L26
	movslq	28(%rsp), %rcx
	testl	%ecx, %ecx
	je	.L27
	testl	%ecx, %ecx
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L28:
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L17
	movl	%ecx, %edx
	leaq	32(%rsp), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	addq	8(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L9
	movdqa	%xmm0, %xmm1
	movl	%ecx, %edx
	psrldq	$8, %xmm1
	andl	$-4, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %cl
	je	.L7
.L8:
	movslq	%edx, %rsi
	addl	32(%rsp,%rsi,4), %eax
	leal	1(%rdx), %esi
	cmpl	%ecx, %esi
	jge	.L7
	movslq	%esi, %rsi
	addl	$2, %edx
	addl	32(%rsp,%rsi,4), %eax
	cmpl	%edx, %ecx
	jle	.L7
	movslq	%edx, %rdx
	addl	32(%rsp,%rdx,4), %eax
.L7:
	cmpl	%ecx, %edi
	jle	.L18
.L29:
	leal	-1(%rdi), %edx
	leaq	32(%rsp), %rsi
	subl	%ecx, %edx
	leaq	36(%rsp,%rdx,4), %rdi
	movl	%eax, %edx
	.p2align 4,,10
	.p2align 3
.L13:
	subl	(%rsi), %eax
	addl	(%rsi,%rcx,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	addq	$4, %rsi
	cmpq	%rdi, %rsi
	jne	.L13
.L12:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L26:
	jle	.L22
	leaq	32(%rsp), %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %edi
	addq	$4, %r14
	cmpl	%r15d, %edi
	jg	.L6
.L22:
	movslq	28(%rsp), %rcx
	testl	%ecx, %ecx
	jg	.L28
.L16:
	xorl	%eax, %eax
	cmpl	%ecx, %edi
	jg	.L29
	.p2align 4,,10
	.p2align 3
.L18:
	movl	%eax, %edx
	jmp	.L12
.L17:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L8
.L27:
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$400056, %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
.L30:
	.cfi_restore_state
	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	"%d"
.LC2:
	.string	"%d\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	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2744, %rsp
	.cfi_def_cfa_offset 400112
	leaq	.LC0(%rip), %rbp
	leaq	.LC1(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rax
	leaq	28(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	24(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rbp, %rdi
	movq	%r13, %rdx
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %edi
	testl	%edi, %edi
	jne	.L26
	movslq	28(%rsp), %rcx
	testl	%ecx, %ecx
	je	.L27
	testl	%ecx, %ecx
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L28:
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L17
	movl	%ecx, %edx
	leaq	32(%rsp), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	addq	8(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L9
	movdqa	%xmm0, %xmm1
	movl	%ecx, %edx
	psrldq	$8, %xmm1
	andl	$-4, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %cl
	je	.L7
.L8:
	movslq	%edx, %rsi
	addl	32(%rsp,%rsi,4), %eax
	leal	1(%rdx), %esi
	cmpl	%ecx, %esi
	jge	.L7
	movslq	%esi, %rsi
	addl	$2, %edx
	addl	32(%rsp,%rsi,4), %eax
	cmpl	%edx, %ecx
	jle	.L7
	movslq	%edx, %rdx
	addl	32(%rsp,%rdx,4), %eax
.L7:
	cmpl	%ecx, %edi
	jle	.L18
.L29:
	leal	-1(%rdi), %edx
	leaq	32(%rsp), %rsi
	subl	%ecx, %edx
	leaq	36(%rsp,%rdx,4), %rdi
	movl	%eax, %edx
	.p2align 4,,10
	.p2align 3
.L13:
	subl	(%rsi), %eax
	addl	(%rsi,%rcx,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	addq	$4, %rsi
	cmpq	%rdi, %rsi
	jne	.L13
.L12:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L26:
	jle	.L22
	leaq	32(%rsp), %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %edi
	addq	$4, %r14
	cmpl	%r15d, %edi
	jg	.L6
.L22:
	movslq	28(%rsp), %rcx
	testl	%ecx, %ecx
	jg	.L28
.L16:
	xorl	%eax, %eax
	cmpl	%ecx, %edi
	jg	.L29
	.p2align 4,,10
	.p2align 3
.L18:
	movl	%eax, %edx
	jmp	.L12
.L17:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L8
.L27:
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$400056, %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
.L30:
	.cfi_restore_state
	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	"%d"
.LC2:
	.string	"%d\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	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2744, %rsp
	.cfi_def_cfa_offset 400112
	leaq	.LC0(%rip), %rbp
	leaq	.LC1(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rax
	leaq	28(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	24(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rbp, %rdi
	movq	%r13, %rdx
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %edi
	testl	%edi, %edi
	jne	.L26
	movslq	28(%rsp), %rcx
	testl	%ecx, %ecx
	je	.L27
	testl	%ecx, %ecx
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L28:
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L17
	movl	%ecx, %edx
	leaq	32(%rsp), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	addq	8(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L9
	movdqa	%xmm0, %xmm1
	movl	%ecx, %edx
	psrldq	$8, %xmm1
	andl	$-4, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %cl
	je	.L7
.L8:
	movslq	%edx, %rsi
	addl	32(%rsp,%rsi,4), %eax
	leal	1(%rdx), %esi
	cmpl	%ecx, %esi
	jge	.L7
	movslq	%esi, %rsi
	addl	$2, %edx
	addl	32(%rsp,%rsi,4), %eax
	cmpl	%edx, %ecx
	jle	.L7
	movslq	%edx, %rdx
	addl	32(%rsp,%rdx,4), %eax
.L7:
	cmpl	%ecx, %edi
	jle	.L18
.L29:
	leal	-1(%rdi), %edx
	leaq	32(%rsp), %rsi
	subl	%ecx, %edx
	leaq	36(%rsp,%rdx,4), %rdi
	movl	%eax, %edx
	.p2align 4,,10
	.p2align 3
.L13:
	subl	(%rsi), %eax
	addl	(%rsi,%rcx,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	addq	$4, %rsi
	cmpq	%rdi, %rsi
	jne	.L13
.L12:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L26:
	jle	.L22
	leaq	32(%rsp), %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %edi
	addq	$4, %r14
	cmpl	%r15d, %edi
	jg	.L6
.L22:
	movslq	28(%rsp), %rcx
	testl	%ecx, %ecx
	jg	.L28
.L16:
	xorl	%eax, %eax
	cmpl	%ecx, %edi
	jg	.L29
	.p2align 4,,10
	.p2align 3
.L18:
	movl	%eax, %edx
	jmp	.L12
.L17:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L8
.L27:
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$400056, %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
.L30:
	.cfi_restore_state
	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(x, y) ((x) > (y) ? (x) : (y))
int main(){
  while(1){
    int n, k, i, sum = 0, ans = 0, nums[100000];
    scanf("%d%d", &n, &k);
    if(n ==0 && k == 0)return 0;
    for(i = 0;i < n;i++){
      scanf("%d", nums + i);
    }
    for(i = 0;i < k;i++){
      sum += nums[i];
    }
    ans = sum;
    for(i = k;i < n;i++){
      sum -= nums[i - k];
      sum += nums[i];
      ans = max(ans, sum);
    }
    printf("%d\n", ans);
  }
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#define max(x, y) ((x) > (y) ? (x) : (y))
int main(){
  while(1){
    int n, k, i, sum = 0, ans = 0, nums[100000];
    scanf("%d%d", &n, &k);
    if(n ==0 && k == 0)return 0;
    for(i = 0;i < n;i++){
      scanf("%d", nums + i);
    }
    for(i = 0;i < k;i++){
      sum += nums[i];
    }
    ans = sum;
    for(i = k;i < n;i++){
      sum -= nums[i - k];
      sum += nums[i];
      ans = max(ans, sum);
    }
    printf("%d\n", ans);
  }
}```

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>
#define max(x, y) ((x) > (y) ? (x) : (y))
int main(){
  while(1){
    int n, k, i, sum = 0, ans = 0, nums[100000];
    scanf("%d%d", &n, &k);
    if(n ==0 && k == 0)return 0;
    for(i = 0;i < n;i++){
      scanf("%d", nums + i);
    }
    for(i = 0;i < k;i++){
      sum += nums[i];
    }
    ans = sum;
    for(i = k;i < n;i++){
      sum -= nums[i - k];
      sum += nums[i];
      ans = max(ans, sum);
    }
    printf("%d\n", ans);
  }
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\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	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2744, %rsp
	.cfi_def_cfa_offset 400112
	leaq	.LC0(%rip), %rbp
	leaq	.LC1(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rax
	leaq	28(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	24(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rbp, %rdi
	movq	%r13, %rdx
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %edi
	testl	%edi, %edi
	jne	.L26
	movslq	28(%rsp), %rcx
	testl	%ecx, %ecx
	je	.L27
	testl	%ecx, %ecx
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L28:
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L17
	movl	%ecx, %edx
	leaq	32(%rsp), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	addq	8(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L9
	movdqa	%xmm0, %xmm1
	movl	%ecx, %edx
	psrldq	$8, %xmm1
	andl	$-4, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %cl
	je	.L7
.L8:
	movslq	%edx, %rsi
	addl	32(%rsp,%rsi,4), %eax
	leal	1(%rdx), %esi
	cmpl	%ecx, %esi
	jge	.L7
	movslq	%esi, %rsi
	addl	$2, %edx
	addl	32(%rsp,%rsi,4), %eax
	cmpl	%edx, %ecx
	jle	.L7
	movslq	%edx, %rdx
	addl	32(%rsp,%rdx,4), %eax
.L7:
	cmpl	%ecx, %edi
	jle	.L18
.L29:
	leal	-1(%rdi), %edx
	leaq	32(%rsp), %rsi
	subl	%ecx, %edx
	leaq	36(%rsp,%rdx,4), %rdi
	movl	%eax, %edx
	.p2align 4,,10
	.p2align 3
.L13:
	subl	(%rsi), %eax
	addl	(%rsi,%rcx,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	addq	$4, %rsi
	cmpq	%rdi, %rsi
	jne	.L13
.L12:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L26:
	jle	.L22
	leaq	32(%rsp), %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %edi
	addq	$4, %r14
	cmpl	%r15d, %edi
	jg	.L6
.L22:
	movslq	28(%rsp), %rcx
	testl	%ecx, %ecx
	jg	.L28
.L16:
	xorl	%eax, %eax
	cmpl	%ecx, %edi
	jg	.L29
	.p2align 4,,10
	.p2align 3
.L18:
	movl	%eax, %edx
	jmp	.L12
.L17:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L8
.L27:
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$400056, %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
.L30:
	.cfi_restore_state
	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	"%d"
.LC2:
	.string	"%d\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	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2744, %rsp
	.cfi_def_cfa_offset 400112
	leaq	.LC0(%rip), %rbp
	leaq	.LC1(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rax
	leaq	28(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	24(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rbp, %rdi
	movq	%r13, %rdx
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %edi
	testl	%edi, %edi
	jne	.L26
	movslq	28(%rsp), %rcx
	testl	%ecx, %ecx
	je	.L27
	testl	%ecx, %ecx
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L28:
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L17
	movl	%ecx, %edx
	leaq	32(%rsp), %rax
	pxor	%xmm0, %xmm0
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	addq	8(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L9
	movdqa	%xmm0, %xmm1
	movl	%ecx, %edx
	psrldq	$8, %xmm1
	andl	$-4, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	testb	$3, %cl
	je	.L7
.L8:
	movslq	%edx, %rsi
	addl	32(%rsp,%rsi,4), %eax
	leal	1(%rdx), %esi
	cmpl	%ecx, %esi
	jge	.L7
	movslq	%esi, %rsi
	addl	$2, %edx
	addl	32(%rsp,%rsi,4), %eax
	cmpl	%edx, %ecx
	jle	.L7
	movslq	%edx, %rdx
	addl	32(%rsp,%rdx,4), %eax
.L7:
	cmpl	%ecx, %edi
	jle	.L18
.L29:
	leal	-1(%rdi), %edx
	leaq	32(%rsp), %rsi
	subl	%ecx, %edx
	leaq	36(%rsp,%rdx,4), %rdi
	movl	%eax, %edx
	.p2align 4,,10
	.p2align 3
.L13:
	subl	(%rsi), %eax
	addl	(%rsi,%rcx,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	addq	$4, %rsi
	cmpq	%rdi, %rsi
	jne	.L13
.L12:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L26:
	jle	.L22
	leaq	32(%rsp), %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %edi
	addq	$4, %r14
	cmpl	%r15d, %edi
	jg	.L6
.L22:
	movslq	28(%rsp), %rcx
	testl	%ecx, %ecx
	jg	.L28
.L16:
	xorl	%eax, %eax
	cmpl	%ecx, %edi
	jg	.L29
	.p2align 4,,10
	.p2align 3
.L18:
	movl	%eax, %edx
	jmp	.L12
.L17:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L8
.L27:
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$400056, %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
.L30:
	.cfi_restore_state
	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:
```