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 main(){
    int N;
    scanf("%d", &N);

    int i,j;
    int x[100+1] = {0};
    for( i = 1; i <= N; i++ ){
        scanf("%d", &x[i]);
    }

    int E;
    int ans;
    for( i = 1; i <= 100; i++ ){
        E = 0;
        for( j = 1; j <= N; j++ ){
            E += (x[j]-i)*(x[j]-i);
        }
        //printf("%d\n", E);
        if( i == 1 ){
            ans = E;
        }
        else{
            if( E < ans ) ans = E;
        }
    }


    printf("%d\n", ans);
    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	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rdi
	movl	$50, %ecx
	xorl	%eax, %eax
	rep stosq
	movl	12(%rsp), %r8d
	movl	$0, (%rdi)
	testl	%r8d, %r8d
	jle	.L2
	leaq	20(%rsp), %rbp
	movl	$1, %ebx
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	addq	$4, %rbp
	cmpl	%ebx, %r8d
	jge	.L3
.L2:
	movl	%r8d, %eax
	movl	%r8d, %r10d
	leal	-1(%r8), %r9d
	movl	$1, %edx
	shrl	$2, %eax
	andl	$-4, %r10d
	subl	$1, %eax
	leal	1(%r10), %r11d
	salq	$4, %rax
	leaq	36(%rsp,%rax), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	testl	%r8d, %r8d
	jle	.L11
	cmpl	$2, %r9d
	jbe	.L13
	movd	%edx, %xmm4
	leaq	20(%rsp), %rax
	pxor	%xmm2, %xmm2
	pshufd	$0, %xmm4, %xmm3
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%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	%r11d, %ecx
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	cmpl	%r8d, %r10d
	je	.L11
.L5:
	movslq	%ecx, %rdi
	movl	16(%rsp,%rdi,4), %edi
	subl	%edx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	leal	1(%rcx), %edi
	cmpl	%edi, %r8d
	jl	.L11
	movslq	%edi, %rdi
	addl	$2, %ecx
	movl	16(%rsp,%rdi,4), %edi
	subl	%edx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	cmpl	%ecx, %r8d
	jl	.L11
	movslq	%ecx, %rcx
	movl	16(%rsp,%rcx,4), %ecx
	subl	%edx, %ecx
	imull	%ecx, %ecx
	addl	%ecx, %eax
.L11:
	addl	$1, %edx
	cmpl	$2, %edx
	je	.L14
	cmpl	%eax, %r12d
	cmovg	%eax, %r12d
	cmpl	$101, %edx
	jne	.L4
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$440, %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
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	movl	%eax, %r12d
	jmp	.L4
.L13:
	xorl	%eax, %eax
	movl	$1, %ecx
	jmp	.L5
.L19:
	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	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rdi
	movl	$50, %ecx
	xorl	%eax, %eax
	rep stosq
	movl	12(%rsp), %r8d
	movl	$0, (%rdi)
	testl	%r8d, %r8d
	jle	.L2
	leaq	20(%rsp), %rbp
	movl	$1, %ebx
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	addq	$4, %rbp
	cmpl	%ebx, %r8d
	jge	.L3
.L2:
	movl	%r8d, %eax
	movl	%r8d, %r10d
	leal	-1(%r8), %r9d
	movl	$1, %edx
	shrl	$2, %eax
	andl	$-4, %r10d
	subl	$1, %eax
	leal	1(%r10), %r11d
	salq	$4, %rax
	leaq	36(%rsp,%rax), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	testl	%r8d, %r8d
	jle	.L11
	cmpl	$2, %r9d
	jbe	.L13
	movd	%edx, %xmm4
	leaq	20(%rsp), %rax
	pxor	%xmm2, %xmm2
	pshufd	$0, %xmm4, %xmm3
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%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	%r11d, %ecx
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	cmpl	%r8d, %r10d
	je	.L11
.L5:
	movslq	%ecx, %rdi
	movl	16(%rsp,%rdi,4), %edi
	subl	%edx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	leal	1(%rcx), %edi
	cmpl	%edi, %r8d
	jl	.L11
	movslq	%edi, %rdi
	addl	$2, %ecx
	movl	16(%rsp,%rdi,4), %edi
	subl	%edx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	cmpl	%ecx, %r8d
	jl	.L11
	movslq	%ecx, %rcx
	movl	16(%rsp,%rcx,4), %ecx
	subl	%edx, %ecx
	imull	%ecx, %ecx
	addl	%ecx, %eax
.L11:
	addl	$1, %edx
	cmpl	$2, %edx
	je	.L14
	cmpl	%eax, %r12d
	cmovg	%eax, %r12d
	cmpl	$101, %edx
	jne	.L4
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$440, %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
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	movl	%eax, %r12d
	jmp	.L4
.L13:
	xorl	%eax, %eax
	movl	$1, %ecx
	jmp	.L5
.L19:
	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	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rdi
	movl	$50, %ecx
	xorl	%eax, %eax
	rep stosq
	movl	12(%rsp), %r8d
	movl	$0, (%rdi)
	testl	%r8d, %r8d
	jle	.L2
	leaq	20(%rsp), %rbp
	movl	$1, %ebx
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	addq	$4, %rbp
	cmpl	%ebx, %r8d
	jge	.L3
.L2:
	movl	%r8d, %eax
	movl	%r8d, %r10d
	leal	-1(%r8), %r9d
	movl	$1, %edx
	shrl	$2, %eax
	andl	$-4, %r10d
	subl	$1, %eax
	leal	1(%r10), %r11d
	salq	$4, %rax
	leaq	36(%rsp,%rax), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	testl	%r8d, %r8d
	jle	.L11
	cmpl	$2, %r9d
	jbe	.L13
	movd	%edx, %xmm4
	leaq	20(%rsp), %rax
	pxor	%xmm2, %xmm2
	pshufd	$0, %xmm4, %xmm3
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%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	%r11d, %ecx
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	cmpl	%r8d, %r10d
	je	.L11
.L5:
	movslq	%ecx, %rdi
	movl	16(%rsp,%rdi,4), %edi
	subl	%edx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	leal	1(%rcx), %edi
	cmpl	%edi, %r8d
	jl	.L11
	movslq	%edi, %rdi
	addl	$2, %ecx
	movl	16(%rsp,%rdi,4), %edi
	subl	%edx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	cmpl	%ecx, %r8d
	jl	.L11
	movslq	%ecx, %rcx
	movl	16(%rsp,%rcx,4), %ecx
	subl	%edx, %ecx
	imull	%ecx, %ecx
	addl	%ecx, %eax
.L11:
	addl	$1, %edx
	cmpl	$2, %edx
	je	.L14
	cmpl	%eax, %r12d
	cmovg	%eax, %r12d
	cmpl	$101, %edx
	jne	.L4
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$440, %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
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	movl	%eax, %r12d
	jmp	.L4
.L13:
	xorl	%eax, %eax
	movl	$1, %ecx
	jmp	.L5
.L19:
	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>

int main(){
    int N;
    scanf("%d", &N);

    int i,j;
    int x[100+1] = {0};
    for( i = 1; i <= N; i++ ){
        scanf("%d", &x[i]);
    }

    int E;
    int ans;
    for( i = 1; i <= 100; i++ ){
        E = 0;
        for( j = 1; j <= N; j++ ){
            E += (x[j]-i)*(x[j]-i);
        }
        //printf("%d\n", E);
        if( i == 1 ){
            ans = E;
        }
        else{
            if( E < ans ) ans = E;
        }
    }


    printf("%d\n", ans);
    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 main(){
    int N;
    scanf("%d", &N);

    int i,j;
    int x[100+1] = {0};
    for( i = 1; i <= N; i++ ){
        scanf("%d", &x[i]);
    }

    int E;
    int ans;
    for( i = 1; i <= 100; i++ ){
        E = 0;
        for( j = 1; j <= N; j++ ){
            E += (x[j]-i)*(x[j]-i);
        }
        //printf("%d\n", E);
        if( i == 1 ){
            ans = E;
        }
        else{
            if( E < ans ) ans = E;
        }
    }


    printf("%d\n", ans);
    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:

7
14 14 3 13 56 2 37
 2
0 4
 7
14 14 3 13 56 2 0
 2
0 1
 7
14 14 3 12 56 2 0
 7
19 14 3 12 56 2 0
 7
19 14 3 24 56 2 0
 7
11 14 3 24 56 2 0
 7
11 14 3 24 56 1 0
 7
11 14 3 33 56 1 0

2319
 8
 2225
 1
 2229
 2245
 2293
 2314
 2343
 2563

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 main(){
    int N;
    scanf("%d", &N);

    int i,j;
    int x[100+1] = {0};
    for( i = 1; i <= N; i++ ){
        scanf("%d", &x[i]);
    }

    int E;
    int ans;
    for( i = 1; i <= 100; i++ ){
        E = 0;
        for( j = 1; j <= N; j++ ){
            E += (x[j]-i)*(x[j]-i);
        }
        //printf("%d\n", E);
        if( i == 1 ){
            ans = E;
        }
        else{
            if( E < ans ) ans = E;
        }
    }


    printf("%d\n", ans);
    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	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rdi
	movl	$50, %ecx
	xorl	%eax, %eax
	rep stosq
	movl	12(%rsp), %r8d
	movl	$0, (%rdi)
	testl	%r8d, %r8d
	jle	.L2
	leaq	20(%rsp), %rbp
	movl	$1, %ebx
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	addq	$4, %rbp
	cmpl	%ebx, %r8d
	jge	.L3
.L2:
	movl	%r8d, %eax
	movl	%r8d, %r10d
	leal	-1(%r8), %r9d
	movl	$1, %edx
	shrl	$2, %eax
	andl	$-4, %r10d
	subl	$1, %eax
	leal	1(%r10), %r11d
	salq	$4, %rax
	leaq	36(%rsp,%rax), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	testl	%r8d, %r8d
	jle	.L11
	cmpl	$2, %r9d
	jbe	.L13
	movd	%edx, %xmm4
	leaq	20(%rsp), %rax
	pxor	%xmm2, %xmm2
	pshufd	$0, %xmm4, %xmm3
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%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	%r11d, %ecx
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	cmpl	%r8d, %r10d
	je	.L11
.L5:
	movslq	%ecx, %rdi
	movl	16(%rsp,%rdi,4), %edi
	subl	%edx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	leal	1(%rcx), %edi
	cmpl	%edi, %r8d
	jl	.L11
	movslq	%edi, %rdi
	addl	$2, %ecx
	movl	16(%rsp,%rdi,4), %edi
	subl	%edx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	cmpl	%ecx, %r8d
	jl	.L11
	movslq	%ecx, %rcx
	movl	16(%rsp,%rcx,4), %ecx
	subl	%edx, %ecx
	imull	%ecx, %ecx
	addl	%ecx, %eax
.L11:
	addl	$1, %edx
	cmpl	$2, %edx
	je	.L14
	cmpl	%eax, %r12d
	cmovg	%eax, %r12d
	cmpl	$101, %edx
	jne	.L4
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$440, %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
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	movl	%eax, %r12d
	jmp	.L4
.L13:
	xorl	%eax, %eax
	movl	$1, %ecx
	jmp	.L5
.L19:
	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	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rdi
	movl	$50, %ecx
	xorl	%eax, %eax
	rep stosq
	movl	12(%rsp), %r8d
	movl	$0, (%rdi)
	testl	%r8d, %r8d
	jle	.L2
	leaq	20(%rsp), %rbp
	movl	$1, %ebx
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	addq	$4, %rbp
	cmpl	%ebx, %r8d
	jge	.L3
.L2:
	movl	%r8d, %eax
	movl	%r8d, %r10d
	leal	-1(%r8), %r9d
	movl	$1, %edx
	shrl	$2, %eax
	andl	$-4, %r10d
	subl	$1, %eax
	leal	1(%r10), %r11d
	salq	$4, %rax
	leaq	36(%rsp,%rax), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	testl	%r8d, %r8d
	jle	.L11
	cmpl	$2, %r9d
	jbe	.L13
	movd	%edx, %xmm4
	leaq	20(%rsp), %rax
	pxor	%xmm2, %xmm2
	pshufd	$0, %xmm4, %xmm3
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	(%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	%r11d, %ecx
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %eax
	cmpl	%r8d, %r10d
	je	.L11
.L5:
	movslq	%ecx, %rdi
	movl	16(%rsp,%rdi,4), %edi
	subl	%edx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	leal	1(%rcx), %edi
	cmpl	%edi, %r8d
	jl	.L11
	movslq	%edi, %rdi
	addl	$2, %ecx
	movl	16(%rsp,%rdi,4), %edi
	subl	%edx, %edi
	imull	%edi, %edi
	addl	%edi, %eax
	cmpl	%ecx, %r8d
	jl	.L11
	movslq	%ecx, %rcx
	movl	16(%rsp,%rcx,4), %ecx
	subl	%edx, %ecx
	imull	%ecx, %ecx
	addl	%ecx, %eax
.L11:
	addl	$1, %edx
	cmpl	$2, %edx
	je	.L14
	cmpl	%eax, %r12d
	cmovg	%eax, %r12d
	cmpl	$101, %edx
	jne	.L4
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$440, %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
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	movl	%eax, %r12d
	jmp	.L4
.L13:
	xorl	%eax, %eax
	movl	$1, %ecx
	jmp	.L5
.L19:
	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:
```