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<limits.h>
int main(void)
{
	int n,x[101],min=101,max=-101,min2=INT_MAX,g,i,j;
	scanf("%d", &n);
	for(i=0; i<n; i++){
		scanf("%d", &x[i]);
		if(min>x[i])
		min=x[i];
		if(max<x[i])
		max=x[i];
	}
	for(i=min; i<=max; i++){
		g=0;
		for(j=0; j<n; j++){
			g+=abs(x[j]-i)*abs(x[j]-i);
		}
		if(min2>g){
			min2=g;
		}
	}
	printf("%d\n", min2);
	
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.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
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$440, %rsp
	.cfi_def_cfa_offset 496
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%r15d, %r15d
	movl	$-101, %r14d
	movl	$101, %ebx
	movq	%rbp, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r12), %eax
	movl	12(%rsp), %ecx
	cmpl	%eax, %ebx
	cmovg	%eax, %ebx
	cmpl	%eax, %r14d
	cmovl	%eax, %r14d
	addl	$1, %r15d
	addq	$4, %r12
	cmpl	%r15d, %ecx
	jg	.L3
	cmpl	%ebx, %r14d
	jl	.L2
	movl	%ecx, %eax
	movl	%ecx, %r10d
	leal	1(%r14), %r8d
	movl	$2147483647, %r9d
	shrl	$2, %eax
	leal	-1(%rcx), %r11d
	andl	$-4, %r10d
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%rbp,%rax), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jle	.L10
	cmpl	$2, %r11d
	jbe	.L12
	movd	%ebx, %xmm4
	movq	%rbp, %rax
	pxor	%xmm2, %xmm2
	pshufd	$0, %xmm4, %xmm3
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	(%rax), %xmm0
	addq	$16, %rax
	psubd	%xmm3, %xmm0
	movdqa	%xmm0, %xmm1
	pmuludq	%xmm0, %xmm1
	psrlq	$32, %xmm0
	pmuludq	%xmm0, %xmm0
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm0, %xmm0
	punpckldq	%xmm0, %xmm1
	paddd	%xmm1, %xmm2
	cmpq	%rsi, %rax
	jne	.L6
	movdqa	%xmm2, %xmm0
	movl	%r10d, %edx
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	cmpl	%r10d, %ecx
	je	.L10
.L5:
	movslq	%edx, %rdi
	movl	16(%rsp,%rdi,4), %edi
	subl	%ebx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	leal	1(%rdx), %edi
	cmpl	%edi, %ecx
	jle	.L10
	movslq	%edi, %rdi
	addl	$2, %edx
	movl	16(%rsp,%rdi,4), %edi
	subl	%ebx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	cmpl	%edx, %ecx
	jle	.L10
	movslq	%edx, %rdx
	movl	16(%rsp,%rdx,4), %edx
	subl	%ebx, %edx
	imull	%edx, %edx
	addl	%edx, %eax
.L10:
	cmpl	%eax, %r9d
	cmovg	%eax, %r9d
	addl	$1, %ebx
	cmpl	%r8d, %ebx
	jne	.L4
.L8:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$440, %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
.L12:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L5
.L2:
	movl	$2147483647, %r9d
	jmp	.L8
.L17:
	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"
.LC1:
	.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
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$440, %rsp
	.cfi_def_cfa_offset 496
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%r15d, %r15d
	movl	$-101, %r14d
	movl	$101, %ebx
	movq	%rbp, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r12), %eax
	movl	12(%rsp), %ecx
	cmpl	%eax, %ebx
	cmovg	%eax, %ebx
	cmpl	%eax, %r14d
	cmovl	%eax, %r14d
	addl	$1, %r15d
	addq	$4, %r12
	cmpl	%r15d, %ecx
	jg	.L3
	cmpl	%ebx, %r14d
	jl	.L2
	movl	%ecx, %eax
	movl	%ecx, %r10d
	leal	1(%r14), %r8d
	movl	$2147483647, %r9d
	shrl	$2, %eax
	leal	-1(%rcx), %r11d
	andl	$-4, %r10d
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%rbp,%rax), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jle	.L10
	cmpl	$2, %r11d
	jbe	.L12
	movd	%ebx, %xmm4
	movq	%rbp, %rax
	pxor	%xmm2, %xmm2
	pshufd	$0, %xmm4, %xmm3
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	(%rax), %xmm0
	addq	$16, %rax
	psubd	%xmm3, %xmm0
	movdqa	%xmm0, %xmm1
	pmuludq	%xmm0, %xmm1
	psrlq	$32, %xmm0
	pmuludq	%xmm0, %xmm0
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm0, %xmm0
	punpckldq	%xmm0, %xmm1
	paddd	%xmm1, %xmm2
	cmpq	%rsi, %rax
	jne	.L6
	movdqa	%xmm2, %xmm0
	movl	%r10d, %edx
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	cmpl	%r10d, %ecx
	je	.L10
.L5:
	movslq	%edx, %rdi
	movl	16(%rsp,%rdi,4), %edi
	subl	%ebx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	leal	1(%rdx), %edi
	cmpl	%edi, %ecx
	jle	.L10
	movslq	%edi, %rdi
	addl	$2, %edx
	movl	16(%rsp,%rdi,4), %edi
	subl	%ebx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	cmpl	%edx, %ecx
	jle	.L10
	movslq	%edx, %rdx
	movl	16(%rsp,%rdx,4), %edx
	subl	%ebx, %edx
	imull	%edx, %edx
	addl	%edx, %eax
.L10:
	cmpl	%eax, %r9d
	cmovg	%eax, %r9d
	addl	$1, %ebx
	cmpl	%r8d, %ebx
	jne	.L4
.L8:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$440, %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
.L12:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L5
.L2:
	movl	$2147483647, %r9d
	jmp	.L8
.L17:
	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"
.LC1:
	.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
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$440, %rsp
	.cfi_def_cfa_offset 496
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%r15d, %r15d
	movl	$-101, %r14d
	movl	$101, %ebx
	movq	%rbp, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r12), %eax
	movl	12(%rsp), %ecx
	cmpl	%eax, %ebx
	cmovg	%eax, %ebx
	cmpl	%eax, %r14d
	cmovl	%eax, %r14d
	addl	$1, %r15d
	addq	$4, %r12
	cmpl	%r15d, %ecx
	jg	.L3
	cmpl	%ebx, %r14d
	jl	.L2
	movl	%ecx, %eax
	movl	%ecx, %r10d
	leal	1(%r14), %r8d
	movl	$2147483647, %r9d
	shrl	$2, %eax
	leal	-1(%rcx), %r11d
	andl	$-4, %r10d
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%rbp,%rax), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jle	.L10
	cmpl	$2, %r11d
	jbe	.L12
	movd	%ebx, %xmm4
	movq	%rbp, %rax
	pxor	%xmm2, %xmm2
	pshufd	$0, %xmm4, %xmm3
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	(%rax), %xmm0
	addq	$16, %rax
	psubd	%xmm3, %xmm0
	movdqa	%xmm0, %xmm1
	pmuludq	%xmm0, %xmm1
	psrlq	$32, %xmm0
	pmuludq	%xmm0, %xmm0
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm0, %xmm0
	punpckldq	%xmm0, %xmm1
	paddd	%xmm1, %xmm2
	cmpq	%rsi, %rax
	jne	.L6
	movdqa	%xmm2, %xmm0
	movl	%r10d, %edx
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	cmpl	%r10d, %ecx
	je	.L10
.L5:
	movslq	%edx, %rdi
	movl	16(%rsp,%rdi,4), %edi
	subl	%ebx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	leal	1(%rdx), %edi
	cmpl	%edi, %ecx
	jle	.L10
	movslq	%edi, %rdi
	addl	$2, %edx
	movl	16(%rsp,%rdi,4), %edi
	subl	%ebx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	cmpl	%edx, %ecx
	jle	.L10
	movslq	%edx, %rdx
	movl	16(%rsp,%rdx,4), %edx
	subl	%ebx, %edx
	imull	%edx, %edx
	addl	%edx, %eax
.L10:
	cmpl	%eax, %r9d
	cmovg	%eax, %r9d
	addl	$1, %ebx
	cmpl	%r8d, %ebx
	jne	.L4
.L8:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$440, %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
.L12:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L5
.L2:
	movl	$2147483647, %r9d
	jmp	.L8
.L17:
	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>
#include<limits.h>
int main(void)
{
	int n,x[101],min=101,max=-101,min2=INT_MAX,g,i,j;
	scanf("%d", &n);
	for(i=0; i<n; i++){
		scanf("%d", &x[i]);
		if(min>x[i])
		min=x[i];
		if(max<x[i])
		max=x[i];
	}
	for(i=min; i<=max; i++){
		g=0;
		for(j=0; j<n; j++){
			g+=abs(x[j]-i)*abs(x[j]-i);
		}
		if(min2>g){
			min2=g;
		}
	}
	printf("%d\n", min2);
	
	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<limits.h>
int main(void)
{
	int n,x[101],min=101,max=-101,min2=INT_MAX,g,i,j;
	scanf("%d", &n);
	for(i=0; i<n; i++){
		scanf("%d", &x[i]);
		if(min>x[i])
		min=x[i];
		if(max<x[i])
		max=x[i];
	}
	for(i=min; i<=max; i++){
		g=0;
		for(j=0; j<n; j++){
			g+=abs(x[j]-i)*abs(x[j]-i);
		}
		if(min2>g){
			min2=g;
		}
	}
	printf("%d\n", min2);
	
	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:

2
5 8
 3
1 1 6
 3
4 3 5
 4
-100 -45 -100 -100
 2
5 11
 3
1 1 8
 3
3 3 5
 3
0 1 8
 3
3 0 5
 2
10 6

5
 17
 2
 2269
 18
 33
 3
 38
 13
 8

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<limits.h>
int main(void)
{
	int n,x[101],min=101,max=-101,min2=INT_MAX,g,i,j;
	scanf("%d", &n);
	for(i=0; i<n; i++){
		scanf("%d", &x[i]);
		if(min>x[i])
		min=x[i];
		if(max<x[i])
		max=x[i];
	}
	for(i=min; i<=max; i++){
		g=0;
		for(j=0; j<n; j++){
			g+=abs(x[j]-i)*abs(x[j]-i);
		}
		if(min2>g){
			min2=g;
		}
	}
	printf("%d\n", min2);
	
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.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
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$440, %rsp
	.cfi_def_cfa_offset 496
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%r15d, %r15d
	movl	$-101, %r14d
	movl	$101, %ebx
	movq	%rbp, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r12), %eax
	movl	12(%rsp), %ecx
	cmpl	%eax, %ebx
	cmovg	%eax, %ebx
	cmpl	%eax, %r14d
	cmovl	%eax, %r14d
	addl	$1, %r15d
	addq	$4, %r12
	cmpl	%r15d, %ecx
	jg	.L3
	cmpl	%ebx, %r14d
	jl	.L2
	movl	%ecx, %eax
	movl	%ecx, %r10d
	leal	1(%r14), %r8d
	movl	$2147483647, %r9d
	shrl	$2, %eax
	leal	-1(%rcx), %r11d
	andl	$-4, %r10d
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%rbp,%rax), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jle	.L10
	cmpl	$2, %r11d
	jbe	.L12
	movd	%ebx, %xmm4
	movq	%rbp, %rax
	pxor	%xmm2, %xmm2
	pshufd	$0, %xmm4, %xmm3
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	(%rax), %xmm0
	addq	$16, %rax
	psubd	%xmm3, %xmm0
	movdqa	%xmm0, %xmm1
	pmuludq	%xmm0, %xmm1
	psrlq	$32, %xmm0
	pmuludq	%xmm0, %xmm0
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm0, %xmm0
	punpckldq	%xmm0, %xmm1
	paddd	%xmm1, %xmm2
	cmpq	%rsi, %rax
	jne	.L6
	movdqa	%xmm2, %xmm0
	movl	%r10d, %edx
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	cmpl	%r10d, %ecx
	je	.L10
.L5:
	movslq	%edx, %rdi
	movl	16(%rsp,%rdi,4), %edi
	subl	%ebx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	leal	1(%rdx), %edi
	cmpl	%edi, %ecx
	jle	.L10
	movslq	%edi, %rdi
	addl	$2, %edx
	movl	16(%rsp,%rdi,4), %edi
	subl	%ebx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	cmpl	%edx, %ecx
	jle	.L10
	movslq	%edx, %rdx
	movl	16(%rsp,%rdx,4), %edx
	subl	%ebx, %edx
	imull	%edx, %edx
	addl	%edx, %eax
.L10:
	cmpl	%eax, %r9d
	cmovg	%eax, %r9d
	addl	$1, %ebx
	cmpl	%r8d, %ebx
	jne	.L4
.L8:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$440, %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
.L12:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L5
.L2:
	movl	$2147483647, %r9d
	jmp	.L8
.L17:
	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"
.LC1:
	.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
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$440, %rsp
	.cfi_def_cfa_offset 496
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%r15d, %r15d
	movl	$-101, %r14d
	movl	$101, %ebx
	movq	%rbp, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r12), %eax
	movl	12(%rsp), %ecx
	cmpl	%eax, %ebx
	cmovg	%eax, %ebx
	cmpl	%eax, %r14d
	cmovl	%eax, %r14d
	addl	$1, %r15d
	addq	$4, %r12
	cmpl	%r15d, %ecx
	jg	.L3
	cmpl	%ebx, %r14d
	jl	.L2
	movl	%ecx, %eax
	movl	%ecx, %r10d
	leal	1(%r14), %r8d
	movl	$2147483647, %r9d
	shrl	$2, %eax
	leal	-1(%rcx), %r11d
	andl	$-4, %r10d
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%rbp,%rax), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jle	.L10
	cmpl	$2, %r11d
	jbe	.L12
	movd	%ebx, %xmm4
	movq	%rbp, %rax
	pxor	%xmm2, %xmm2
	pshufd	$0, %xmm4, %xmm3
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	(%rax), %xmm0
	addq	$16, %rax
	psubd	%xmm3, %xmm0
	movdqa	%xmm0, %xmm1
	pmuludq	%xmm0, %xmm1
	psrlq	$32, %xmm0
	pmuludq	%xmm0, %xmm0
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm0, %xmm0
	punpckldq	%xmm0, %xmm1
	paddd	%xmm1, %xmm2
	cmpq	%rsi, %rax
	jne	.L6
	movdqa	%xmm2, %xmm0
	movl	%r10d, %edx
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	cmpl	%r10d, %ecx
	je	.L10
.L5:
	movslq	%edx, %rdi
	movl	16(%rsp,%rdi,4), %edi
	subl	%ebx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	leal	1(%rdx), %edi
	cmpl	%edi, %ecx
	jle	.L10
	movslq	%edi, %rdi
	addl	$2, %edx
	movl	16(%rsp,%rdi,4), %edi
	subl	%ebx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	cmpl	%edx, %ecx
	jle	.L10
	movslq	%edx, %rdx
	movl	16(%rsp,%rdx,4), %edx
	subl	%ebx, %edx
	imull	%edx, %edx
	addl	%edx, %eax
.L10:
	cmpl	%eax, %r9d
	cmovg	%eax, %r9d
	addl	$1, %ebx
	cmpl	%r8d, %ebx
	jne	.L4
.L8:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$440, %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
.L12:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L5
.L2:
	movl	$2147483647, %r9d
	jmp	.L8
.L17:
	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:
```