Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
//Number 1209

#include <stdio.h>
#define MAX 300

int main(void)
{
  int n, i, j;
  int coin[18];
  int count[MAX+1] = {0};
      
  for(i=1; i<18; i++)   //square coin
    coin[i] = i*i;
  
  count[0] = 1;
  
  for(i=1; i<18; i++)
    {
      for(j=coin[i]; j<MAX+1; j++)
	{
	  count[j] += count[j-coin[i]];
	}
    }

  while(1)
    {
      scanf("%d", &n);
      if(n==0)
	break;
      
      printf("%d\n", count[n]);
    }

  return 0;
}

  ```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC4:
	.string	"%d"
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$150, %ecx
	movl	$300, %r10d
	movl	$301, %r8d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$1312, %rsp
	.cfi_def_cfa_offset 1344
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 1304(%rsp)
	xorl	%eax, %eax
	leaq	96(%rsp), %rsi
	leaq	88(%rsp), %r9
	movl	$289, 84(%rsp)
	movq	%rsi, %rdi
	movups	%xmm0, 20(%rsp)
	movdqa	.LC1(%rip), %xmm0
	leaq	100(%rsp), %r11
	movups	%xmm0, 36(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movups	%xmm0, 52(%rsp)
	movdqa	.LC3(%rip), %xmm0
	rep stosq
	movl	$1, 96(%rsp)
	movups	%xmm0, 68(%rsp)
	movl	$0, (%rdi)
	leaq	20(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%rdi), %ecx
	cmpl	$300, %ecx
	jg	.L2
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L3
	cmpl	$300, %ecx
	je	.L3
	movl	%r10d, %eax
	movl	%r8d, %r12d
	subl	%ecx, %eax
	subl	%ecx, %r12d
	cmpl	$2, %eax
	jbe	.L4
	movl	%r12d, %ebx
	movslq	%ecx, %rbp
	xorl	%eax, %eax
	shrl	$2, %ebx
	leaq	(%rsi,%rbp,4), %rdx
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movdqu	(%rdx,%rax), %xmm0
	paddd	(%rsi,%rax), %xmm0
	movups	%xmm0, (%rdx,%rax)
	addq	$16, %rax
	cmpq	%rbx, %rax
	jne	.L5
	movl	%r12d, %edx
	andl	$-4, %edx
	leal	(%rdx,%rcx), %eax
	cmpl	%edx, %r12d
	je	.L2
	movl	%r8d, %r12d
	subl	%eax, %r12d
	cmpl	$300, %eax
	je	.L7
.L14:
	addq	%rdx, %rbp
	movq	96(%rsp,%rdx,4), %xmm1
	movl	%r12d, %edx
	leaq	(%rsi,%rbp,4), %rbx
	andl	$-2, %edx
	movq	(%rbx), %xmm0
	addl	%edx, %eax
	paddd	%xmm1, %xmm0
	movq	%xmm0, (%rbx)
	cmpl	%edx, %r12d
	je	.L2
.L7:
	movslq	%eax, %rdx
	subl	%ecx, %eax
	cltq
	movl	96(%rsp,%rax,4), %eax
	addl	%eax, 96(%rsp,%rdx,4)
.L2:
	addq	$4, %rdi
	cmpq	%rdi, %r9
	jne	.L11
	leaq	12(%rsp), %rbp
	leaq	.LC4(%rip), %rbx
	leaq	.LC5(%rip), %r12
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L31:
	movl	96(%rsp,%rax,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L13:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rax
	testl	%eax, %eax
	jne	.L31
	movq	1304(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$1312, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	movl	%r10d, %ebx
	movslq	%ecx, %rbp
	subl	%ecx, %ebx
	leaq	0(,%rbp,4), %rdx
	leaq	(%rbx,%rbp), %rcx
	leaq	(%rsi,%rdx), %rax
	leaq	(%r11,%rcx,4), %rbx
	movq	%rdx, %rcx
	negq	%rcx
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rax,%rcx), %edx
	addl	%edx, (%rax)
	addq	$4, %rax
	cmpq	%rax, %rbx
	jne	.L9
	jmp	.L2
.L4:
	movl	%ecx, %eax
	xorl	%edx, %edx
	movslq	%ecx, %rbp
	jmp	.L14
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	4
	.long	9
	.long	16
	.align 16
.LC1:
	.long	25
	.long	36
	.long	49
	.long	64
	.align 16
.LC2:
	.long	81
	.long	100
	.long	121
	.long	144
	.align 16
.LC3:
	.long	169
	.long	196
	.long	225
	.long	256
	.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
.LC4:
	.string	"%d"
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$150, %ecx
	movl	$300, %r10d
	movl	$301, %r8d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$1312, %rsp
	.cfi_def_cfa_offset 1344
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 1304(%rsp)
	xorl	%eax, %eax
	leaq	96(%rsp), %rsi
	leaq	88(%rsp), %r9
	movl	$289, 84(%rsp)
	movq	%rsi, %rdi
	movups	%xmm0, 20(%rsp)
	movdqa	.LC1(%rip), %xmm0
	leaq	100(%rsp), %r11
	movups	%xmm0, 36(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movups	%xmm0, 52(%rsp)
	movdqa	.LC3(%rip), %xmm0
	rep stosq
	movl	$1, 96(%rsp)
	movups	%xmm0, 68(%rsp)
	movl	$0, (%rdi)
	leaq	20(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%rdi), %ecx
	cmpl	$300, %ecx
	jg	.L2
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L3
	cmpl	$300, %ecx
	je	.L3
	movl	%r10d, %eax
	movl	%r8d, %r12d
	subl	%ecx, %eax
	subl	%ecx, %r12d
	cmpl	$2, %eax
	jbe	.L4
	movl	%r12d, %ebx
	movslq	%ecx, %rbp
	xorl	%eax, %eax
	shrl	$2, %ebx
	leaq	(%rsi,%rbp,4), %rdx
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movdqu	(%rdx,%rax), %xmm0
	paddd	(%rsi,%rax), %xmm0
	movups	%xmm0, (%rdx,%rax)
	addq	$16, %rax
	cmpq	%rbx, %rax
	jne	.L5
	movl	%r12d, %edx
	andl	$-4, %edx
	leal	(%rdx,%rcx), %eax
	cmpl	%edx, %r12d
	je	.L2
	movl	%r8d, %r12d
	subl	%eax, %r12d
	cmpl	$300, %eax
	je	.L7
.L14:
	addq	%rdx, %rbp
	movq	96(%rsp,%rdx,4), %xmm1
	movl	%r12d, %edx
	leaq	(%rsi,%rbp,4), %rbx
	andl	$-2, %edx
	movq	(%rbx), %xmm0
	addl	%edx, %eax
	paddd	%xmm1, %xmm0
	movq	%xmm0, (%rbx)
	cmpl	%edx, %r12d
	je	.L2
.L7:
	movslq	%eax, %rdx
	subl	%ecx, %eax
	cltq
	movl	96(%rsp,%rax,4), %eax
	addl	%eax, 96(%rsp,%rdx,4)
.L2:
	addq	$4, %rdi
	cmpq	%rdi, %r9
	jne	.L11
	leaq	12(%rsp), %rbp
	leaq	.LC4(%rip), %rbx
	leaq	.LC5(%rip), %r12
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L31:
	movl	96(%rsp,%rax,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L13:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rax
	testl	%eax, %eax
	jne	.L31
	movq	1304(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$1312, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	movl	%r10d, %ebx
	movslq	%ecx, %rbp
	subl	%ecx, %ebx
	leaq	0(,%rbp,4), %rdx
	leaq	(%rbx,%rbp), %rcx
	leaq	(%rsi,%rdx), %rax
	leaq	(%r11,%rcx,4), %rbx
	movq	%rdx, %rcx
	negq	%rcx
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rax,%rcx), %edx
	addl	%edx, (%rax)
	addq	$4, %rax
	cmpq	%rax, %rbx
	jne	.L9
	jmp	.L2
.L4:
	movl	%ecx, %eax
	xorl	%edx, %edx
	movslq	%ecx, %rbp
	jmp	.L14
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	4
	.long	9
	.long	16
	.align 16
.LC1:
	.long	25
	.long	36
	.long	49
	.long	64
	.align 16
.LC2:
	.long	81
	.long	100
	.long	121
	.long	144
	.align 16
.LC3:
	.long	169
	.long	196
	.long	225
	.long	256
	.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
.LC4:
	.string	"%d"
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$150, %ecx
	movl	$300, %r10d
	movl	$301, %r8d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$1312, %rsp
	.cfi_def_cfa_offset 1344
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 1304(%rsp)
	xorl	%eax, %eax
	leaq	96(%rsp), %rsi
	leaq	88(%rsp), %r9
	movl	$289, 84(%rsp)
	movq	%rsi, %rdi
	movups	%xmm0, 20(%rsp)
	movdqa	.LC1(%rip), %xmm0
	leaq	100(%rsp), %r11
	movups	%xmm0, 36(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movups	%xmm0, 52(%rsp)
	movdqa	.LC3(%rip), %xmm0
	rep stosq
	movl	$1, 96(%rsp)
	movups	%xmm0, 68(%rsp)
	movl	$0, (%rdi)
	leaq	20(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%rdi), %ecx
	cmpl	$300, %ecx
	jg	.L2
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L3
	cmpl	$300, %ecx
	je	.L3
	movl	%r10d, %eax
	movl	%r8d, %r12d
	subl	%ecx, %eax
	subl	%ecx, %r12d
	cmpl	$2, %eax
	jbe	.L4
	movl	%r12d, %ebx
	movslq	%ecx, %rbp
	xorl	%eax, %eax
	shrl	$2, %ebx
	leaq	(%rsi,%rbp,4), %rdx
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movdqu	(%rdx,%rax), %xmm0
	paddd	(%rsi,%rax), %xmm0
	movups	%xmm0, (%rdx,%rax)
	addq	$16, %rax
	cmpq	%rbx, %rax
	jne	.L5
	movl	%r12d, %edx
	andl	$-4, %edx
	leal	(%rdx,%rcx), %eax
	cmpl	%edx, %r12d
	je	.L2
	movl	%r8d, %r12d
	subl	%eax, %r12d
	cmpl	$300, %eax
	je	.L7
.L14:
	addq	%rdx, %rbp
	movq	96(%rsp,%rdx,4), %xmm1
	movl	%r12d, %edx
	leaq	(%rsi,%rbp,4), %rbx
	andl	$-2, %edx
	movq	(%rbx), %xmm0
	addl	%edx, %eax
	paddd	%xmm1, %xmm0
	movq	%xmm0, (%rbx)
	cmpl	%edx, %r12d
	je	.L2
.L7:
	movslq	%eax, %rdx
	subl	%ecx, %eax
	cltq
	movl	96(%rsp,%rax,4), %eax
	addl	%eax, 96(%rsp,%rdx,4)
.L2:
	addq	$4, %rdi
	cmpq	%rdi, %r9
	jne	.L11
	leaq	12(%rsp), %rbp
	leaq	.LC4(%rip), %rbx
	leaq	.LC5(%rip), %r12
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L31:
	movl	96(%rsp,%rax,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L13:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rax
	testl	%eax, %eax
	jne	.L31
	movq	1304(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$1312, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	movl	%r10d, %ebx
	movslq	%ecx, %rbp
	subl	%ecx, %ebx
	leaq	0(,%rbp,4), %rdx
	leaq	(%rbx,%rbp), %rcx
	leaq	(%rsi,%rdx), %rax
	leaq	(%r11,%rcx,4), %rbx
	movq	%rdx, %rcx
	negq	%rcx
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rax,%rcx), %edx
	addl	%edx, (%rax)
	addq	$4, %rax
	cmpq	%rax, %rbx
	jne	.L9
	jmp	.L2
.L4:
	movl	%ecx, %eax
	xorl	%edx, %edx
	movslq	%ecx, %rbp
	jmp	.L14
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	4
	.long	9
	.long	16
	.align 16
.LC1:
	.long	25
	.long	36
	.long	49
	.long	64
	.align 16
.LC2:
	.long	81
	.long	100
	.long	121
	.long	144
	.align 16
.LC3:
	.long	169
	.long	196
	.long	225
	.long	256
	.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
//Number 1209

#include <stdio.h>
#define MAX 300

int main(void)
{
  int n, i, j;
  int coin[18];
  int count[MAX+1] = {0};
      
  for(i=1; i<18; i++)   //square coin
    coin[i] = i*i;
  
  count[0] = 1;
  
  for(i=1; i<18; i++)
    {
      for(j=coin[i]; j<MAX+1; j++)
	{
	  count[j] += count[j-coin[i]];
	}
    }

  while(1)
    {
      scanf("%d", &n);
      if(n==0)
	break;
      
      printf("%d\n", count[n]);
    }

  return 0;
}

  ```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
//Number 1209

#include <stdio.h>
#define MAX 300

int main(void)
{
  int n, i, j;
  int coin[18];
  int count[MAX+1] = {0};
      
  for(i=1; i<18; i++)   //square coin
    coin[i] = i*i;
  
  count[0] = 1;
  
  for(i=1; i<18; i++)
    {
      for(j=coin[i]; j<MAX+1; j++)
	{
	  count[j] += count[j-coin[i]];
	}
    }

  while(1)
    {
      scanf("%d", &n);
      if(n==0)
	break;
      
      printf("%d\n", count[n]);
    }

  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
10
12
0
 2
11
3
0
 2
16
3
0
 2
14
3
0
 2
10
39
0
 2
11
6
0
 2
17
39
0
 2
4
1
0
 2
2
6
0
 2
17
37
0

1
4
5
 1
4
1
 1
8
1
 1
6
1
 1
4
50
 1
4
2
 1
9
50
 1
2
1
 1
1
2
 1
9
46

Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
//Number 1209

#include <stdio.h>
#define MAX 300

int main(void)
{
  int n, i, j;
  int coin[18];
  int count[MAX+1] = {0};
      
  for(i=1; i<18; i++)   //square coin
    coin[i] = i*i;
  
  count[0] = 1;
  
  for(i=1; i<18; i++)
    {
      for(j=coin[i]; j<MAX+1; j++)
	{
	  count[j] += count[j-coin[i]];
	}
    }

  while(1)
    {
      scanf("%d", &n);
      if(n==0)
	break;
      
      printf("%d\n", count[n]);
    }

  return 0;
}

  ```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC4:
	.string	"%d"
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$150, %ecx
	movl	$300, %r10d
	movl	$301, %r8d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$1312, %rsp
	.cfi_def_cfa_offset 1344
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 1304(%rsp)
	xorl	%eax, %eax
	leaq	96(%rsp), %rsi
	leaq	88(%rsp), %r9
	movl	$289, 84(%rsp)
	movq	%rsi, %rdi
	movups	%xmm0, 20(%rsp)
	movdqa	.LC1(%rip), %xmm0
	leaq	100(%rsp), %r11
	movups	%xmm0, 36(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movups	%xmm0, 52(%rsp)
	movdqa	.LC3(%rip), %xmm0
	rep stosq
	movl	$1, 96(%rsp)
	movups	%xmm0, 68(%rsp)
	movl	$0, (%rdi)
	leaq	20(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%rdi), %ecx
	cmpl	$300, %ecx
	jg	.L2
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L3
	cmpl	$300, %ecx
	je	.L3
	movl	%r10d, %eax
	movl	%r8d, %r12d
	subl	%ecx, %eax
	subl	%ecx, %r12d
	cmpl	$2, %eax
	jbe	.L4
	movl	%r12d, %ebx
	movslq	%ecx, %rbp
	xorl	%eax, %eax
	shrl	$2, %ebx
	leaq	(%rsi,%rbp,4), %rdx
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movdqu	(%rdx,%rax), %xmm0
	paddd	(%rsi,%rax), %xmm0
	movups	%xmm0, (%rdx,%rax)
	addq	$16, %rax
	cmpq	%rbx, %rax
	jne	.L5
	movl	%r12d, %edx
	andl	$-4, %edx
	leal	(%rdx,%rcx), %eax
	cmpl	%edx, %r12d
	je	.L2
	movl	%r8d, %r12d
	subl	%eax, %r12d
	cmpl	$300, %eax
	je	.L7
.L14:
	addq	%rdx, %rbp
	movq	96(%rsp,%rdx,4), %xmm1
	movl	%r12d, %edx
	leaq	(%rsi,%rbp,4), %rbx
	andl	$-2, %edx
	movq	(%rbx), %xmm0
	addl	%edx, %eax
	paddd	%xmm1, %xmm0
	movq	%xmm0, (%rbx)
	cmpl	%edx, %r12d
	je	.L2
.L7:
	movslq	%eax, %rdx
	subl	%ecx, %eax
	cltq
	movl	96(%rsp,%rax,4), %eax
	addl	%eax, 96(%rsp,%rdx,4)
.L2:
	addq	$4, %rdi
	cmpq	%rdi, %r9
	jne	.L11
	leaq	12(%rsp), %rbp
	leaq	.LC4(%rip), %rbx
	leaq	.LC5(%rip), %r12
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L31:
	movl	96(%rsp,%rax,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L13:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rax
	testl	%eax, %eax
	jne	.L31
	movq	1304(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$1312, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	movl	%r10d, %ebx
	movslq	%ecx, %rbp
	subl	%ecx, %ebx
	leaq	0(,%rbp,4), %rdx
	leaq	(%rbx,%rbp), %rcx
	leaq	(%rsi,%rdx), %rax
	leaq	(%r11,%rcx,4), %rbx
	movq	%rdx, %rcx
	negq	%rcx
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rax,%rcx), %edx
	addl	%edx, (%rax)
	addq	$4, %rax
	cmpq	%rax, %rbx
	jne	.L9
	jmp	.L2
.L4:
	movl	%ecx, %eax
	xorl	%edx, %edx
	movslq	%ecx, %rbp
	jmp	.L14
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	4
	.long	9
	.long	16
	.align 16
.LC1:
	.long	25
	.long	36
	.long	49
	.long	64
	.align 16
.LC2:
	.long	81
	.long	100
	.long	121
	.long	144
	.align 16
.LC3:
	.long	169
	.long	196
	.long	225
	.long	256
	.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
.LC4:
	.string	"%d"
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$150, %ecx
	movl	$300, %r10d
	movl	$301, %r8d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$1312, %rsp
	.cfi_def_cfa_offset 1344
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 1304(%rsp)
	xorl	%eax, %eax
	leaq	96(%rsp), %rsi
	leaq	88(%rsp), %r9
	movl	$289, 84(%rsp)
	movq	%rsi, %rdi
	movups	%xmm0, 20(%rsp)
	movdqa	.LC1(%rip), %xmm0
	leaq	100(%rsp), %r11
	movups	%xmm0, 36(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movups	%xmm0, 52(%rsp)
	movdqa	.LC3(%rip), %xmm0
	rep stosq
	movl	$1, 96(%rsp)
	movups	%xmm0, 68(%rsp)
	movl	$0, (%rdi)
	leaq	20(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%rdi), %ecx
	cmpl	$300, %ecx
	jg	.L2
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L3
	cmpl	$300, %ecx
	je	.L3
	movl	%r10d, %eax
	movl	%r8d, %r12d
	subl	%ecx, %eax
	subl	%ecx, %r12d
	cmpl	$2, %eax
	jbe	.L4
	movl	%r12d, %ebx
	movslq	%ecx, %rbp
	xorl	%eax, %eax
	shrl	$2, %ebx
	leaq	(%rsi,%rbp,4), %rdx
	salq	$4, %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movdqu	(%rdx,%rax), %xmm0
	paddd	(%rsi,%rax), %xmm0
	movups	%xmm0, (%rdx,%rax)
	addq	$16, %rax
	cmpq	%rbx, %rax
	jne	.L5
	movl	%r12d, %edx
	andl	$-4, %edx
	leal	(%rdx,%rcx), %eax
	cmpl	%edx, %r12d
	je	.L2
	movl	%r8d, %r12d
	subl	%eax, %r12d
	cmpl	$300, %eax
	je	.L7
.L14:
	addq	%rdx, %rbp
	movq	96(%rsp,%rdx,4), %xmm1
	movl	%r12d, %edx
	leaq	(%rsi,%rbp,4), %rbx
	andl	$-2, %edx
	movq	(%rbx), %xmm0
	addl	%edx, %eax
	paddd	%xmm1, %xmm0
	movq	%xmm0, (%rbx)
	cmpl	%edx, %r12d
	je	.L2
.L7:
	movslq	%eax, %rdx
	subl	%ecx, %eax
	cltq
	movl	96(%rsp,%rax,4), %eax
	addl	%eax, 96(%rsp,%rdx,4)
.L2:
	addq	$4, %rdi
	cmpq	%rdi, %r9
	jne	.L11
	leaq	12(%rsp), %rbp
	leaq	.LC4(%rip), %rbx
	leaq	.LC5(%rip), %r12
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L31:
	movl	96(%rsp,%rax,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L13:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rax
	testl	%eax, %eax
	jne	.L31
	movq	1304(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$1312, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	movl	%r10d, %ebx
	movslq	%ecx, %rbp
	subl	%ecx, %ebx
	leaq	0(,%rbp,4), %rdx
	leaq	(%rbx,%rbp), %rcx
	leaq	(%rsi,%rdx), %rax
	leaq	(%r11,%rcx,4), %rbx
	movq	%rdx, %rcx
	negq	%rcx
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rax,%rcx), %edx
	addl	%edx, (%rax)
	addq	$4, %rax
	cmpq	%rax, %rbx
	jne	.L9
	jmp	.L2
.L4:
	movl	%ecx, %eax
	xorl	%edx, %edx
	movslq	%ecx, %rbp
	jmp	.L14
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	4
	.long	9
	.long	16
	.align 16
.LC1:
	.long	25
	.long	36
	.long	49
	.long	64
	.align 16
.LC2:
	.long	81
	.long	100
	.long	121
	.long	144
	.align 16
.LC3:
	.long	169
	.long	196
	.long	225
	.long	256
	.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:
```