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<stdlib.h>
 
int main(void){
    int N, K, max, tmp;
    int* p;
 
    scanf("%d %d",&N, &K);
 
    p=(int*)malloc(N*sizeof(int));
 
    for(int i=0; i<N; i++){
        scanf("%d",p+i);
    }
 
    for(int i=1; i<N; i++){
        p[i]=p[i]+p[i-1];
    }
    max=p[K-1];
    for(int i=1; i<N-K+1; i++){
        tmp=p[i+K-1]-p[i-1];
        if(max<tmp)
            max=tmp;
    }
    printf("%f",(max+K)/2.);
 
 
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC3:
	.string	"%f"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movslq	(%rsp), %rdi
	movq	%rdi, %r14
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rax, %r12
	testl	%r14d, %r14d
	jle	.L5
	movq	%rax, %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r14d
	addq	$4, %rbp
	cmpl	%ebx, %r14d
	jg	.L3
	cmpl	$1, %r14d
	jle	.L5
	leal	-2(%r14), %ecx
	movl	(%r12), %edx
	leaq	4(%r12), %rax
	leaq	8(%r12,%rcx,4), %rcx
	.p2align 4,,10
	.p2align 3
.L4:
	addl	(%rax), %edx
	addq	$4, %rax
	movl	%edx, -4(%rax)
	cmpq	%rax, %rcx
	jne	.L4
.L5:
	movslq	4(%rsp), %rdx
	movq	%rdx, %rsi
	salq	$2, %rdx
	subl	%esi, %r14d
	movl	-4(%r12,%rdx), %eax
	testl	%r14d, %r14d
	jle	.L6
	leal	-1(%r14), %ecx
	cmpl	$2, %ecx
	jbe	.L11
	movl	%r14d, %ecx
	movd	%eax, %xmm4
	addq	%r12, %rdx
	xorl	%eax, %eax
	shrl	$2, %ecx
	pshufd	$0, %xmm4, %xmm2
	salq	$4, %rcx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rdx,%rax), %xmm0
	movdqu	(%r12,%rax), %xmm3
	addq	$16, %rax
	psubd	%xmm3, %xmm0
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rcx, %rax
	jne	.L8
	movdqa	%xmm2, %xmm1
	movl	%r14d, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	movdqa	%xmm1, %xmm0
	leal	1(%rcx), %edx
	pcmpgtd	%xmm2, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %eax
	cmpl	%r14d, %ecx
	je	.L6
.L7:
	leal	(%rsi,%rdx), %ecx
	movslq	%edx, %r8
	movslq	%ecx, %rcx
	leaq	0(,%r8,4), %rdi
	movl	-4(%r12,%rcx,4), %ecx
	subl	-4(%r12,%r8,4), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	leal	1(%rdx), %ecx
	cmpl	%ecx, %r14d
	jl	.L6
	addl	%esi, %ecx
	movslq	%ecx, %rcx
	movl	-4(%r12,%rcx,4), %ecx
	subl	(%r12,%r8,4), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	addl	$2, %edx
	cmpl	%edx, %r14d
	jl	.L6
	addl	%esi, %edx
	movslq	%edx, %rdx
	movl	-4(%r12,%rdx,4), %edx
	subl	4(%r12,%rdi), %edx
	cmpl	%edx, %eax
	cmovl	%edx, %eax
.L6:
	addl	%esi, %eax
	pxor	%xmm0, %xmm0
	movl	$1, %edi
	cvtsi2sdl	%eax, %xmm0
	leaq	.LC3(%rip), %rsi
	movl	$1, %eax
	mulsd	.LC2(%rip), %xmm0
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	movl	$1, %edx
	jmp	.L7
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.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
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC3:
	.string	"%f"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movslq	(%rsp), %rdi
	movq	%rdi, %r14
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rax, %r12
	testl	%r14d, %r14d
	jle	.L5
	movq	%rax, %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r14d
	addq	$4, %rbp
	cmpl	%ebx, %r14d
	jg	.L3
	cmpl	$1, %r14d
	jle	.L5
	leal	-2(%r14), %ecx
	movl	(%r12), %edx
	leaq	4(%r12), %rax
	leaq	8(%r12,%rcx,4), %rcx
	.p2align 4,,10
	.p2align 3
.L4:
	addl	(%rax), %edx
	addq	$4, %rax
	movl	%edx, -4(%rax)
	cmpq	%rax, %rcx
	jne	.L4
.L5:
	movslq	4(%rsp), %rdx
	movq	%rdx, %rsi
	salq	$2, %rdx
	subl	%esi, %r14d
	movl	-4(%r12,%rdx), %eax
	testl	%r14d, %r14d
	jle	.L6
	leal	-1(%r14), %ecx
	cmpl	$2, %ecx
	jbe	.L11
	movl	%r14d, %ecx
	movd	%eax, %xmm4
	addq	%r12, %rdx
	xorl	%eax, %eax
	shrl	$2, %ecx
	pshufd	$0, %xmm4, %xmm2
	salq	$4, %rcx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rdx,%rax), %xmm0
	movdqu	(%r12,%rax), %xmm3
	addq	$16, %rax
	psubd	%xmm3, %xmm0
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rcx, %rax
	jne	.L8
	movdqa	%xmm2, %xmm1
	movl	%r14d, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	movdqa	%xmm1, %xmm0
	leal	1(%rcx), %edx
	pcmpgtd	%xmm2, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %eax
	cmpl	%r14d, %ecx
	je	.L6
.L7:
	leal	(%rsi,%rdx), %ecx
	movslq	%edx, %r8
	movslq	%ecx, %rcx
	leaq	0(,%r8,4), %rdi
	movl	-4(%r12,%rcx,4), %ecx
	subl	-4(%r12,%r8,4), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	leal	1(%rdx), %ecx
	cmpl	%ecx, %r14d
	jl	.L6
	addl	%esi, %ecx
	movslq	%ecx, %rcx
	movl	-4(%r12,%rcx,4), %ecx
	subl	(%r12,%r8,4), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	addl	$2, %edx
	cmpl	%edx, %r14d
	jl	.L6
	addl	%esi, %edx
	movslq	%edx, %rdx
	movl	-4(%r12,%rdx,4), %edx
	subl	4(%r12,%rdi), %edx
	cmpl	%edx, %eax
	cmovl	%edx, %eax
.L6:
	addl	%esi, %eax
	pxor	%xmm0, %xmm0
	movl	$1, %edi
	cvtsi2sdl	%eax, %xmm0
	leaq	.LC3(%rip), %rsi
	movl	$1, %eax
	mulsd	.LC2(%rip), %xmm0
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	movl	$1, %edx
	jmp	.L7
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.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
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC3:
	.string	"%f"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movslq	(%rsp), %rdi
	movq	%rdi, %r14
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rax, %r12
	testl	%r14d, %r14d
	jle	.L5
	movq	%rax, %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r14d
	addq	$4, %rbp
	cmpl	%ebx, %r14d
	jg	.L3
	cmpl	$1, %r14d
	jle	.L5
	leal	-2(%r14), %ecx
	movl	(%r12), %edx
	leaq	4(%r12), %rax
	leaq	8(%r12,%rcx,4), %rcx
	.p2align 4,,10
	.p2align 3
.L4:
	addl	(%rax), %edx
	addq	$4, %rax
	movl	%edx, -4(%rax)
	cmpq	%rax, %rcx
	jne	.L4
.L5:
	movslq	4(%rsp), %rdx
	movq	%rdx, %rsi
	salq	$2, %rdx
	subl	%esi, %r14d
	movl	-4(%r12,%rdx), %eax
	testl	%r14d, %r14d
	jle	.L6
	leal	-1(%r14), %ecx
	cmpl	$2, %ecx
	jbe	.L11
	movl	%r14d, %ecx
	movd	%eax, %xmm4
	addq	%r12, %rdx
	xorl	%eax, %eax
	shrl	$2, %ecx
	pshufd	$0, %xmm4, %xmm2
	salq	$4, %rcx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rdx,%rax), %xmm0
	movdqu	(%r12,%rax), %xmm3
	addq	$16, %rax
	psubd	%xmm3, %xmm0
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rcx, %rax
	jne	.L8
	movdqa	%xmm2, %xmm1
	movl	%r14d, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	movdqa	%xmm1, %xmm0
	leal	1(%rcx), %edx
	pcmpgtd	%xmm2, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %eax
	cmpl	%r14d, %ecx
	je	.L6
.L7:
	leal	(%rsi,%rdx), %ecx
	movslq	%edx, %r8
	movslq	%ecx, %rcx
	leaq	0(,%r8,4), %rdi
	movl	-4(%r12,%rcx,4), %ecx
	subl	-4(%r12,%r8,4), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	leal	1(%rdx), %ecx
	cmpl	%ecx, %r14d
	jl	.L6
	addl	%esi, %ecx
	movslq	%ecx, %rcx
	movl	-4(%r12,%rcx,4), %ecx
	subl	(%r12,%r8,4), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	addl	$2, %edx
	cmpl	%edx, %r14d
	jl	.L6
	addl	%esi, %edx
	movslq	%edx, %rdx
	movl	-4(%r12,%rdx,4), %edx
	subl	4(%r12,%rdi), %edx
	cmpl	%edx, %eax
	cmovl	%edx, %eax
.L6:
	addl	%esi, %eax
	pxor	%xmm0, %xmm0
	movl	$1, %edi
	cvtsi2sdl	%eax, %xmm0
	leaq	.LC3(%rip), %rsi
	movl	$1, %eax
	mulsd	.LC2(%rip), %xmm0
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	movl	$1, %edx
	jmp	.L7
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.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<stdlib.h>
 
int main(void){
    int N, K, max, tmp;
    int* p;
 
    scanf("%d %d",&N, &K);
 
    p=(int*)malloc(N*sizeof(int));
 
    for(int i=0; i<N; i++){
        scanf("%d",p+i);
    }
 
    for(int i=1; i<N; i++){
        p[i]=p[i]+p[i-1];
    }
    max=p[K-1];
    for(int i=1; i<N-K+1; i++){
        tmp=p[i+K-1]-p[i-1];
        if(max<tmp)
            max=tmp;
    }
    printf("%f",(max+K)/2.);
 
 
    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<stdlib.h>
 
int main(void){
    int N, K, max, tmp;
    int* p;
 
    scanf("%d %d",&N, &K);
 
    p=(int*)malloc(N*sizeof(int));
 
    for(int i=0; i<N; i++){
        scanf("%d",p+i);
    }
 
    for(int i=1; i<N; i++){
        p[i]=p[i]+p[i-1];
    }
    max=p[K-1];
    for(int i=1; i<N-K+1; i++){
        tmp=p[i+K-1]-p[i-1];
        if(max<tmp)
            max=tmp;
    }
    printf("%f",(max+K)/2.);
 
 
    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<stdlib.h>
 
int main(void){
    int N, K, max, tmp;
    int* p;
 
    scanf("%d %d",&N, &K);
 
    p=(int*)malloc(N*sizeof(int));
 
    for(int i=0; i<N; i++){
        scanf("%d",p+i);
    }
 
    for(int i=1; i<N; i++){
        p[i]=p[i]+p[i-1];
    }
    max=p[K-1];
    for(int i=1; i<N-K+1; i++){
        tmp=p[i+K-1]-p[i-1];
        if(max<tmp)
            max=tmp;
    }
    printf("%f",(max+K)/2.);
 
 
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC3:
	.string	"%f"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movslq	(%rsp), %rdi
	movq	%rdi, %r14
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rax, %r12
	testl	%r14d, %r14d
	jle	.L5
	movq	%rax, %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r14d
	addq	$4, %rbp
	cmpl	%ebx, %r14d
	jg	.L3
	cmpl	$1, %r14d
	jle	.L5
	leal	-2(%r14), %ecx
	movl	(%r12), %edx
	leaq	4(%r12), %rax
	leaq	8(%r12,%rcx,4), %rcx
	.p2align 4,,10
	.p2align 3
.L4:
	addl	(%rax), %edx
	addq	$4, %rax
	movl	%edx, -4(%rax)
	cmpq	%rax, %rcx
	jne	.L4
.L5:
	movslq	4(%rsp), %rdx
	movq	%rdx, %rsi
	salq	$2, %rdx
	subl	%esi, %r14d
	movl	-4(%r12,%rdx), %eax
	testl	%r14d, %r14d
	jle	.L6
	leal	-1(%r14), %ecx
	cmpl	$2, %ecx
	jbe	.L11
	movl	%r14d, %ecx
	movd	%eax, %xmm4
	addq	%r12, %rdx
	xorl	%eax, %eax
	shrl	$2, %ecx
	pshufd	$0, %xmm4, %xmm2
	salq	$4, %rcx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rdx,%rax), %xmm0
	movdqu	(%r12,%rax), %xmm3
	addq	$16, %rax
	psubd	%xmm3, %xmm0
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rcx, %rax
	jne	.L8
	movdqa	%xmm2, %xmm1
	movl	%r14d, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	movdqa	%xmm1, %xmm0
	leal	1(%rcx), %edx
	pcmpgtd	%xmm2, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %eax
	cmpl	%r14d, %ecx
	je	.L6
.L7:
	leal	(%rsi,%rdx), %ecx
	movslq	%edx, %r8
	movslq	%ecx, %rcx
	leaq	0(,%r8,4), %rdi
	movl	-4(%r12,%rcx,4), %ecx
	subl	-4(%r12,%r8,4), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	leal	1(%rdx), %ecx
	cmpl	%ecx, %r14d
	jl	.L6
	addl	%esi, %ecx
	movslq	%ecx, %rcx
	movl	-4(%r12,%rcx,4), %ecx
	subl	(%r12,%r8,4), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	addl	$2, %edx
	cmpl	%edx, %r14d
	jl	.L6
	addl	%esi, %edx
	movslq	%edx, %rdx
	movl	-4(%r12,%rdx,4), %edx
	subl	4(%r12,%rdi), %edx
	cmpl	%edx, %eax
	cmovl	%edx, %eax
.L6:
	addl	%esi, %eax
	pxor	%xmm0, %xmm0
	movl	$1, %edi
	cvtsi2sdl	%eax, %xmm0
	leaq	.LC3(%rip), %rsi
	movl	$1, %eax
	mulsd	.LC2(%rip), %xmm0
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	movl	$1, %edx
	jmp	.L7
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.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
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC3:
	.string	"%f"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movslq	(%rsp), %rdi
	movq	%rdi, %r14
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rax, %r12
	testl	%r14d, %r14d
	jle	.L5
	movq	%rax, %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r14d
	addq	$4, %rbp
	cmpl	%ebx, %r14d
	jg	.L3
	cmpl	$1, %r14d
	jle	.L5
	leal	-2(%r14), %ecx
	movl	(%r12), %edx
	leaq	4(%r12), %rax
	leaq	8(%r12,%rcx,4), %rcx
	.p2align 4,,10
	.p2align 3
.L4:
	addl	(%rax), %edx
	addq	$4, %rax
	movl	%edx, -4(%rax)
	cmpq	%rax, %rcx
	jne	.L4
.L5:
	movslq	4(%rsp), %rdx
	movq	%rdx, %rsi
	salq	$2, %rdx
	subl	%esi, %r14d
	movl	-4(%r12,%rdx), %eax
	testl	%r14d, %r14d
	jle	.L6
	leal	-1(%r14), %ecx
	cmpl	$2, %ecx
	jbe	.L11
	movl	%r14d, %ecx
	movd	%eax, %xmm4
	addq	%r12, %rdx
	xorl	%eax, %eax
	shrl	$2, %ecx
	pshufd	$0, %xmm4, %xmm2
	salq	$4, %rcx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rdx,%rax), %xmm0
	movdqu	(%r12,%rax), %xmm3
	addq	$16, %rax
	psubd	%xmm3, %xmm0
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rcx, %rax
	jne	.L8
	movdqa	%xmm2, %xmm1
	movl	%r14d, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	movdqa	%xmm1, %xmm0
	leal	1(%rcx), %edx
	pcmpgtd	%xmm2, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %eax
	cmpl	%r14d, %ecx
	je	.L6
.L7:
	leal	(%rsi,%rdx), %ecx
	movslq	%edx, %r8
	movslq	%ecx, %rcx
	leaq	0(,%r8,4), %rdi
	movl	-4(%r12,%rcx,4), %ecx
	subl	-4(%r12,%r8,4), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	leal	1(%rdx), %ecx
	cmpl	%ecx, %r14d
	jl	.L6
	addl	%esi, %ecx
	movslq	%ecx, %rcx
	movl	-4(%r12,%rcx,4), %ecx
	subl	(%r12,%r8,4), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	addl	$2, %edx
	cmpl	%edx, %r14d
	jl	.L6
	addl	%esi, %edx
	movslq	%edx, %rdx
	movl	-4(%r12,%rdx,4), %edx
	subl	4(%r12,%rdi), %edx
	cmpl	%edx, %eax
	cmovl	%edx, %eax
.L6:
	addl	%esi, %eax
	pxor	%xmm0, %xmm0
	movl	$1, %edi
	cvtsi2sdl	%eax, %xmm0
	leaq	.LC3(%rip), %rsi
	movl	$1, %eax
	mulsd	.LC2(%rip), %xmm0
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	movl	$1, %edx
	jmp	.L7
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.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:
```