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>
#include<string.h>
 
int main()
{
  int N, K,p[200000];
  double max, tmp, p2[200000];
  
  scanf("%d %d", &N, &K);
  
  for(int i=0;i<N;i++)
  {
      scanf("%d", &p[i]);
      p2[i] = (1 + p[i])/2.0;
  }
  
  max=0.0;
  for(int i=0;i<K;i++)
  {
    max += p2[i];
  }
  
  tmp = max;
  for(int i=K;i<N;i++)
  {
	tmp -= p2[i-K];
    tmp += p2[i];
 
    if (tmp > max) max=tmp;
  }
  
  printf("%lf", max);
  
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d"
.LC4:
	.string	"%lf"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-2396160(%rsp), %r11
	.cfi_def_cfa 11, 2396200
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3880, %rsp
	.cfi_def_cfa_offset 2400080
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 2400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r13
	leaq	800016(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	movl	-4(%rbp), %eax
	pxor	%xmm0, %xmm0
	movl	8(%rsp), %edx
	addl	$1, %eax
	cvtsi2sdl	%eax, %xmm0
	mulsd	.LC3(%rip), %xmm0
	movsd	%xmm0, (%r12,%rbx,8)
	addq	$1, %rbx
	cmpl	%ebx, %edx
	jg	.L3
.L2:
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L13
	cmpl	$1, %ecx
	je	.L14
	movl	%ecx, %esi
	leaq	800016(%rsp), %rax
	pxor	%xmm0, %xmm0
	shrl	%esi
	subl	$1, %esi
	salq	$4, %rsi
	leaq	800032(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movsd	(%rax), %xmm1
	addq	$16, %rax
	addsd	%xmm1, %xmm0
	movsd	-8(%rax), %xmm1
	addsd	%xmm1, %xmm0
	cmpq	%rsi, %rax
	jne	.L6
	movl	%ecx, %eax
	andl	$-2, %eax
	testb	$1, %cl
	je	.L4
.L5:
	cltq
	addsd	800016(%rsp,%rax,8), %xmm0
.L4:
	cmpl	%edx, %ecx
	jge	.L15
	subl	%ecx, %edx
	leaq	800016(%rsp), %rax
	movapd	%xmm0, %xmm1
	subl	$1, %edx
	leaq	800024(%rsp,%rdx,8), %rsi
	movslq	%ecx, %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	subsd	(%rax), %xmm0
	addsd	(%rax,%rdx,8), %xmm0
	addq	$8, %rax
	movapd	%xmm0, %xmm2
	maxsd	%xmm1, %xmm2
	movapd	%xmm2, %xmm1
	cmpq	%rsi, %rax
	jne	.L11
.L9:
	movapd	%xmm1, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	2400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$2400040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	pxor	%xmm0, %xmm0
	jmp	.L4
.L15:
	movapd	%xmm0, %xmm1
	jmp	.L9
.L14:
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	jmp	.L5
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC3:
	.long	0
	.long	1071644672
	.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
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d"
.LC4:
	.string	"%lf"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-2396160(%rsp), %r11
	.cfi_def_cfa 11, 2396200
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3880, %rsp
	.cfi_def_cfa_offset 2400080
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 2400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r13
	leaq	800016(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	movl	-4(%rbp), %eax
	pxor	%xmm0, %xmm0
	movl	8(%rsp), %edx
	addl	$1, %eax
	cvtsi2sdl	%eax, %xmm0
	mulsd	.LC3(%rip), %xmm0
	movsd	%xmm0, (%r12,%rbx,8)
	addq	$1, %rbx
	cmpl	%ebx, %edx
	jg	.L3
.L2:
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L13
	cmpl	$1, %ecx
	je	.L14
	movl	%ecx, %esi
	leaq	800016(%rsp), %rax
	pxor	%xmm0, %xmm0
	shrl	%esi
	subl	$1, %esi
	salq	$4, %rsi
	leaq	800032(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movsd	(%rax), %xmm1
	addq	$16, %rax
	addsd	%xmm1, %xmm0
	movsd	-8(%rax), %xmm1
	addsd	%xmm1, %xmm0
	cmpq	%rsi, %rax
	jne	.L6
	movl	%ecx, %eax
	andl	$-2, %eax
	testb	$1, %cl
	je	.L4
.L5:
	cltq
	addsd	800016(%rsp,%rax,8), %xmm0
.L4:
	cmpl	%edx, %ecx
	jge	.L15
	subl	%ecx, %edx
	leaq	800016(%rsp), %rax
	movapd	%xmm0, %xmm1
	subl	$1, %edx
	leaq	800024(%rsp,%rdx,8), %rsi
	movslq	%ecx, %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	subsd	(%rax), %xmm0
	addsd	(%rax,%rdx,8), %xmm0
	addq	$8, %rax
	movapd	%xmm0, %xmm2
	maxsd	%xmm1, %xmm2
	movapd	%xmm2, %xmm1
	cmpq	%rsi, %rax
	jne	.L11
.L9:
	movapd	%xmm1, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	2400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$2400040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	pxor	%xmm0, %xmm0
	jmp	.L4
.L15:
	movapd	%xmm0, %xmm1
	jmp	.L9
.L14:
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	jmp	.L5
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC3:
	.long	0
	.long	1071644672
	.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
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d"
.LC4:
	.string	"%lf"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-2396160(%rsp), %r11
	.cfi_def_cfa 11, 2396200
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3880, %rsp
	.cfi_def_cfa_offset 2400080
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 2400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r13
	leaq	800016(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	movl	-4(%rbp), %eax
	pxor	%xmm0, %xmm0
	movl	8(%rsp), %edx
	addl	$1, %eax
	cvtsi2sdl	%eax, %xmm0
	mulsd	.LC3(%rip), %xmm0
	movsd	%xmm0, (%r12,%rbx,8)
	addq	$1, %rbx
	cmpl	%ebx, %edx
	jg	.L3
.L2:
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L13
	cmpl	$1, %ecx
	je	.L14
	movl	%ecx, %esi
	leaq	800016(%rsp), %rax
	pxor	%xmm0, %xmm0
	shrl	%esi
	subl	$1, %esi
	salq	$4, %rsi
	leaq	800032(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movsd	(%rax), %xmm1
	addq	$16, %rax
	addsd	%xmm1, %xmm0
	movsd	-8(%rax), %xmm1
	addsd	%xmm1, %xmm0
	cmpq	%rsi, %rax
	jne	.L6
	movl	%ecx, %eax
	andl	$-2, %eax
	testb	$1, %cl
	je	.L4
.L5:
	cltq
	addsd	800016(%rsp,%rax,8), %xmm0
.L4:
	cmpl	%edx, %ecx
	jge	.L15
	subl	%ecx, %edx
	leaq	800016(%rsp), %rax
	movapd	%xmm0, %xmm1
	subl	$1, %edx
	leaq	800024(%rsp,%rdx,8), %rsi
	movslq	%ecx, %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	subsd	(%rax), %xmm0
	addsd	(%rax,%rdx,8), %xmm0
	addq	$8, %rax
	movapd	%xmm0, %xmm2
	maxsd	%xmm1, %xmm2
	movapd	%xmm2, %xmm1
	cmpq	%rsi, %rax
	jne	.L11
.L9:
	movapd	%xmm1, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	2400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$2400040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	pxor	%xmm0, %xmm0
	jmp	.L4
.L15:
	movapd	%xmm0, %xmm1
	jmp	.L9
.L14:
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	jmp	.L5
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC3:
	.long	0
	.long	1071644672
	.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>
#include<string.h>
 
int main()
{
  int N, K,p[200000];
  double max, tmp, p2[200000];
  
  scanf("%d %d", &N, &K);
  
  for(int i=0;i<N;i++)
  {
      scanf("%d", &p[i]);
      p2[i] = (1 + p[i])/2.0;
  }
  
  max=0.0;
  for(int i=0;i<K;i++)
  {
    max += p2[i];
  }
  
  tmp = max;
  for(int i=K;i<N;i++)
  {
	tmp -= p2[i-K];
    tmp += p2[i];
 
    if (tmp > max) max=tmp;
  }
  
  printf("%lf", 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>
#include<string.h>
 
int main()
{
  int N, K,p[200000];
  double max, tmp, p2[200000];
  
  scanf("%d %d", &N, &K);
  
  for(int i=0;i<N;i++)
  {
      scanf("%d", &p[i]);
      p2[i] = (1 + p[i])/2.0;
  }
  
  max=0.0;
  for(int i=0;i<K;i++)
  {
    max += p2[i];
  }
  
  tmp = max;
  for(int i=K;i<N;i++)
  {
	tmp -= p2[i-K];
    tmp += p2[i];
 
    if (tmp > max) max=tmp;
  }
  
  printf("%lf", 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:

10 4
17 21 13 12 15 20 10 13 17 11
 3 1
6 6 6 6
 10 4
15 21 13 12 15 20 10 13 17 11
 3 1
11 6 6 6
 1 1
15 6 6 6
 10 4
17 13 13 14 15 20 10 13 17 11
 3 0
6 6 6 6
 10 4
15 21 13 12 15 29 10 13 17 11
 10 4
27 13 13 14 15 20 10 13 17 11
 10 4
15 21 13 12 15 29 10 13 22 11

33.500000 3.500000 32.500000 6.000000 8.000000 33.000000 0.000000 36.500000 35.500000 39.000000
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>
#include<string.h>
 
int main()
{
  int N, K,p[200000];
  double max, tmp, p2[200000];
  
  scanf("%d %d", &N, &K);
  
  for(int i=0;i<N;i++)
  {
      scanf("%d", &p[i]);
      p2[i] = (1 + p[i])/2.0;
  }
  
  max=0.0;
  for(int i=0;i<K;i++)
  {
    max += p2[i];
  }
  
  tmp = max;
  for(int i=K;i<N;i++)
  {
	tmp -= p2[i-K];
    tmp += p2[i];
 
    if (tmp > max) max=tmp;
  }
  
  printf("%lf", max);
  
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d"
.LC4:
	.string	"%lf"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-2396160(%rsp), %r11
	.cfi_def_cfa 11, 2396200
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3880, %rsp
	.cfi_def_cfa_offset 2400080
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 2400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r13
	leaq	800016(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	movl	-4(%rbp), %eax
	pxor	%xmm0, %xmm0
	movl	8(%rsp), %edx
	addl	$1, %eax
	cvtsi2sdl	%eax, %xmm0
	mulsd	.LC3(%rip), %xmm0
	movsd	%xmm0, (%r12,%rbx,8)
	addq	$1, %rbx
	cmpl	%ebx, %edx
	jg	.L3
.L2:
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L13
	cmpl	$1, %ecx
	je	.L14
	movl	%ecx, %esi
	leaq	800016(%rsp), %rax
	pxor	%xmm0, %xmm0
	shrl	%esi
	subl	$1, %esi
	salq	$4, %rsi
	leaq	800032(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movsd	(%rax), %xmm1
	addq	$16, %rax
	addsd	%xmm1, %xmm0
	movsd	-8(%rax), %xmm1
	addsd	%xmm1, %xmm0
	cmpq	%rsi, %rax
	jne	.L6
	movl	%ecx, %eax
	andl	$-2, %eax
	testb	$1, %cl
	je	.L4
.L5:
	cltq
	addsd	800016(%rsp,%rax,8), %xmm0
.L4:
	cmpl	%edx, %ecx
	jge	.L15
	subl	%ecx, %edx
	leaq	800016(%rsp), %rax
	movapd	%xmm0, %xmm1
	subl	$1, %edx
	leaq	800024(%rsp,%rdx,8), %rsi
	movslq	%ecx, %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	subsd	(%rax), %xmm0
	addsd	(%rax,%rdx,8), %xmm0
	addq	$8, %rax
	movapd	%xmm0, %xmm2
	maxsd	%xmm1, %xmm2
	movapd	%xmm2, %xmm1
	cmpq	%rsi, %rax
	jne	.L11
.L9:
	movapd	%xmm1, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	2400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$2400040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	pxor	%xmm0, %xmm0
	jmp	.L4
.L15:
	movapd	%xmm0, %xmm1
	jmp	.L9
.L14:
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	jmp	.L5
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC3:
	.long	0
	.long	1071644672
	.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
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d"
.LC4:
	.string	"%lf"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-2396160(%rsp), %r11
	.cfi_def_cfa 11, 2396200
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3880, %rsp
	.cfi_def_cfa_offset 2400080
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 2400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	testl	%edx, %edx
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r13
	leaq	800016(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	movl	-4(%rbp), %eax
	pxor	%xmm0, %xmm0
	movl	8(%rsp), %edx
	addl	$1, %eax
	cvtsi2sdl	%eax, %xmm0
	mulsd	.LC3(%rip), %xmm0
	movsd	%xmm0, (%r12,%rbx,8)
	addq	$1, %rbx
	cmpl	%ebx, %edx
	jg	.L3
.L2:
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L13
	cmpl	$1, %ecx
	je	.L14
	movl	%ecx, %esi
	leaq	800016(%rsp), %rax
	pxor	%xmm0, %xmm0
	shrl	%esi
	subl	$1, %esi
	salq	$4, %rsi
	leaq	800032(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movsd	(%rax), %xmm1
	addq	$16, %rax
	addsd	%xmm1, %xmm0
	movsd	-8(%rax), %xmm1
	addsd	%xmm1, %xmm0
	cmpq	%rsi, %rax
	jne	.L6
	movl	%ecx, %eax
	andl	$-2, %eax
	testb	$1, %cl
	je	.L4
.L5:
	cltq
	addsd	800016(%rsp,%rax,8), %xmm0
.L4:
	cmpl	%edx, %ecx
	jge	.L15
	subl	%ecx, %edx
	leaq	800016(%rsp), %rax
	movapd	%xmm0, %xmm1
	subl	$1, %edx
	leaq	800024(%rsp,%rdx,8), %rsi
	movslq	%ecx, %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	subsd	(%rax), %xmm0
	addsd	(%rax,%rdx,8), %xmm0
	addq	$8, %rax
	movapd	%xmm0, %xmm2
	maxsd	%xmm1, %xmm2
	movapd	%xmm2, %xmm1
	cmpq	%rsi, %rax
	jne	.L11
.L9:
	movapd	%xmm1, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	2400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$2400040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	pxor	%xmm0, %xmm0
	jmp	.L4
.L15:
	movapd	%xmm0, %xmm1
	jmp	.L9
.L14:
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	jmp	.L5
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC3:
	.long	0
	.long	1071644672
	.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:
```