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,a[2][100],i,sum=0,max=0,j;
      scanf("%d",&n);
      for(i=0;i<n;i++)
        scanf("%d",&a[0][i]);
      for(i=0;i<n;i++)
        scanf("%d",&a[1][i]);
      for(i=0;i<n;i++){
        sum=0;
        for(j=0;j<n;j++){
          if(j<=i)
            sum+=a[0][j];
          if(j>=i)
            sum+=a[1][j];
        }
        if(max<sum) max=sum;
      }
      printf("%d\n",max);
    }```

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	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%r14, %rdi
	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	$832, %rsp
	.cfi_def_cfa_offset 880
	movq	%fs:40, %rax
	movq	%rax, 824(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	movq	%rbp, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %r12
	cmpl	%ebx, %eax
	jg	.L3
	testl	%eax, %eax
	jle	.L6
	leaq	416(%rsp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	addq	$4, %r13
	cmpl	%r12d, %r8d
	jg	.L4
	testl	%r8d, %r8d
	jle	.L6
	xorl	%r9d, %r9d
	xorl	%edi, %edi
	leal	-1(%r8), %r10d
	.p2align 4,,10
	.p2align 3
.L5:
	cmpl	%edi, %r10d
	movl	%edi, %r11d
	movq	%rbx, %rcx
	cmovle	%r10d, %r11d
	xorl	%esi, %esi
	xorl	%eax, %eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%edx, %esi
.L8:
	addl	-400(%rcx), %eax
	cmpl	%esi, %edi
	jle	.L28
.L7:
	leal	1(%rsi), %edx
	addq	$4, %rcx
	cmpl	%edx, %r11d
	jge	.L19
	cmpl	%edx, %r8d
	jle	.L13
	movl	%r8d, %r11d
	subl	%edx, %r11d
	leal	-1(%r11), %ecx
	cmpl	$2, %ecx
	jbe	.L10
	addl	$101, %esi
	movl	%r11d, %ecx
	pxor	%xmm0, %xmm0
	shrl	$2, %ecx
	movslq	%esi, %rsi
	leal	-1(%rcx), %r12d
	leaq	0(%rbp,%rsi,4), %rsi
	salq	$4, %r12
	leaq	16(%rsi), %rcx
	addq	%rcx, %r12
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L29:
	addq	$16, %rcx
.L11:
	movdqu	(%rsi), %xmm1
	movq	%rcx, %rsi
	paddd	%xmm1, %xmm0
	cmpq	%rcx, %r12
	jne	.L29
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %ecx
	addl	%ecx, %eax
	movl	%r11d, %ecx
	andl	$-4, %ecx
	addl	%ecx, %edx
	cmpl	%ecx, %r11d
	je	.L13
.L10:
	movslq	%edx, %rcx
	addl	416(%rsp,%rcx,4), %eax
	leal	1(%rdx), %ecx
	cmpl	%ecx, %r8d
	jle	.L13
	movslq	%ecx, %rcx
	addl	$2, %edx
	addl	416(%rsp,%rcx,4), %eax
	cmpl	%edx, %r8d
	jle	.L13
	movslq	%edx, %rdx
	addl	416(%rsp,%rdx,4), %eax
.L13:
	cmpl	%eax, %r9d
	cmovl	%eax, %r9d
	addl	$1, %edi
	cmpl	%edi, %r8d
	jne	.L5
.L16:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	824(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$832, %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
.L28:
	.cfi_restore_state
	addl	(%rcx), %eax
	jmp	.L7
.L6:
	xorl	%r9d, %r9d
	jmp	.L16
.L30:
	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	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%r14, %rdi
	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	$832, %rsp
	.cfi_def_cfa_offset 880
	movq	%fs:40, %rax
	movq	%rax, 824(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	movq	%rbp, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %r12
	cmpl	%ebx, %eax
	jg	.L3
	testl	%eax, %eax
	jle	.L6
	leaq	416(%rsp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	addq	$4, %r13
	cmpl	%r12d, %r8d
	jg	.L4
	testl	%r8d, %r8d
	jle	.L6
	xorl	%r9d, %r9d
	xorl	%edi, %edi
	leal	-1(%r8), %r10d
	.p2align 4,,10
	.p2align 3
.L5:
	cmpl	%edi, %r10d
	movl	%edi, %r11d
	movq	%rbx, %rcx
	cmovle	%r10d, %r11d
	xorl	%esi, %esi
	xorl	%eax, %eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%edx, %esi
.L8:
	addl	-400(%rcx), %eax
	cmpl	%esi, %edi
	jle	.L28
.L7:
	leal	1(%rsi), %edx
	addq	$4, %rcx
	cmpl	%edx, %r11d
	jge	.L19
	cmpl	%edx, %r8d
	jle	.L13
	movl	%r8d, %r11d
	subl	%edx, %r11d
	leal	-1(%r11), %ecx
	cmpl	$2, %ecx
	jbe	.L10
	addl	$101, %esi
	movl	%r11d, %ecx
	pxor	%xmm0, %xmm0
	shrl	$2, %ecx
	movslq	%esi, %rsi
	leal	-1(%rcx), %r12d
	leaq	0(%rbp,%rsi,4), %rsi
	salq	$4, %r12
	leaq	16(%rsi), %rcx
	addq	%rcx, %r12
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L29:
	addq	$16, %rcx
.L11:
	movdqu	(%rsi), %xmm1
	movq	%rcx, %rsi
	paddd	%xmm1, %xmm0
	cmpq	%rcx, %r12
	jne	.L29
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %ecx
	addl	%ecx, %eax
	movl	%r11d, %ecx
	andl	$-4, %ecx
	addl	%ecx, %edx
	cmpl	%ecx, %r11d
	je	.L13
.L10:
	movslq	%edx, %rcx
	addl	416(%rsp,%rcx,4), %eax
	leal	1(%rdx), %ecx
	cmpl	%ecx, %r8d
	jle	.L13
	movslq	%ecx, %rcx
	addl	$2, %edx
	addl	416(%rsp,%rcx,4), %eax
	cmpl	%edx, %r8d
	jle	.L13
	movslq	%edx, %rdx
	addl	416(%rsp,%rdx,4), %eax
.L13:
	cmpl	%eax, %r9d
	cmovl	%eax, %r9d
	addl	$1, %edi
	cmpl	%edi, %r8d
	jne	.L5
.L16:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	824(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$832, %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
.L28:
	.cfi_restore_state
	addl	(%rcx), %eax
	jmp	.L7
.L6:
	xorl	%r9d, %r9d
	jmp	.L16
.L30:
	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	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%r14, %rdi
	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	$832, %rsp
	.cfi_def_cfa_offset 880
	movq	%fs:40, %rax
	movq	%rax, 824(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	movq	%rbp, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %r12
	cmpl	%ebx, %eax
	jg	.L3
	testl	%eax, %eax
	jle	.L6
	leaq	416(%rsp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	addq	$4, %r13
	cmpl	%r12d, %r8d
	jg	.L4
	testl	%r8d, %r8d
	jle	.L6
	xorl	%r9d, %r9d
	xorl	%edi, %edi
	leal	-1(%r8), %r10d
	.p2align 4,,10
	.p2align 3
.L5:
	cmpl	%edi, %r10d
	movl	%edi, %r11d
	movq	%rbx, %rcx
	cmovle	%r10d, %r11d
	xorl	%esi, %esi
	xorl	%eax, %eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%edx, %esi
.L8:
	addl	-400(%rcx), %eax
	cmpl	%esi, %edi
	jle	.L28
.L7:
	leal	1(%rsi), %edx
	addq	$4, %rcx
	cmpl	%edx, %r11d
	jge	.L19
	cmpl	%edx, %r8d
	jle	.L13
	movl	%r8d, %r11d
	subl	%edx, %r11d
	leal	-1(%r11), %ecx
	cmpl	$2, %ecx
	jbe	.L10
	addl	$101, %esi
	movl	%r11d, %ecx
	pxor	%xmm0, %xmm0
	shrl	$2, %ecx
	movslq	%esi, %rsi
	leal	-1(%rcx), %r12d
	leaq	0(%rbp,%rsi,4), %rsi
	salq	$4, %r12
	leaq	16(%rsi), %rcx
	addq	%rcx, %r12
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L29:
	addq	$16, %rcx
.L11:
	movdqu	(%rsi), %xmm1
	movq	%rcx, %rsi
	paddd	%xmm1, %xmm0
	cmpq	%rcx, %r12
	jne	.L29
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %ecx
	addl	%ecx, %eax
	movl	%r11d, %ecx
	andl	$-4, %ecx
	addl	%ecx, %edx
	cmpl	%ecx, %r11d
	je	.L13
.L10:
	movslq	%edx, %rcx
	addl	416(%rsp,%rcx,4), %eax
	leal	1(%rdx), %ecx
	cmpl	%ecx, %r8d
	jle	.L13
	movslq	%ecx, %rcx
	addl	$2, %edx
	addl	416(%rsp,%rcx,4), %eax
	cmpl	%edx, %r8d
	jle	.L13
	movslq	%edx, %rdx
	addl	416(%rsp,%rdx,4), %eax
.L13:
	cmpl	%eax, %r9d
	cmovl	%eax, %r9d
	addl	$1, %edi
	cmpl	%edi, %r8d
	jne	.L5
.L16:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	824(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$832, %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
.L28:
	.cfi_restore_state
	addl	(%rcx), %eax
	jmp	.L7
.L6:
	xorl	%r9d, %r9d
	jmp	.L16
.L30:
	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,a[2][100],i,sum=0,max=0,j;
      scanf("%d",&n);
      for(i=0;i<n;i++)
        scanf("%d",&a[0][i]);
      for(i=0;i<n;i++)
        scanf("%d",&a[1][i]);
      for(i=0;i<n;i++){
        sum=0;
        for(j=0;j<n;j++){
          if(j<=i)
            sum+=a[0][j];
          if(j>=i)
            sum+=a[1][j];
        }
        if(max<sum) max=sum;
      }
      printf("%d\n",max);
    }```
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,a[2][100],i,sum=0,max=0,j;
      scanf("%d",&n);
      for(i=0;i<n;i++)
        scanf("%d",&a[0][i]);
      for(i=0;i<n;i++)
        scanf("%d",&a[1][i]);
      for(i=0;i<n;i++){
        sum=0;
        for(j=0;j<n;j++){
          if(j<=i)
            sum+=a[0][j];
          if(j>=i)
            sum+=a[1][j];
        }
        if(max<sum) max=sum;
      }
      printf("%d\n",max);
    }```

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:

5
3 2 2 4 1
1 2 2 2 1

14

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,a[2][100],i,sum=0,max=0,j;
      scanf("%d",&n);
      for(i=0;i<n;i++)
        scanf("%d",&a[0][i]);
      for(i=0;i<n;i++)
        scanf("%d",&a[1][i]);
      for(i=0;i<n;i++){
        sum=0;
        for(j=0;j<n;j++){
          if(j<=i)
            sum+=a[0][j];
          if(j>=i)
            sum+=a[1][j];
        }
        if(max<sum) max=sum;
      }
      printf("%d\n",max);
    }```

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	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%r14, %rdi
	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	$832, %rsp
	.cfi_def_cfa_offset 880
	movq	%fs:40, %rax
	movq	%rax, 824(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	movq	%rbp, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %r12
	cmpl	%ebx, %eax
	jg	.L3
	testl	%eax, %eax
	jle	.L6
	leaq	416(%rsp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	addq	$4, %r13
	cmpl	%r12d, %r8d
	jg	.L4
	testl	%r8d, %r8d
	jle	.L6
	xorl	%r9d, %r9d
	xorl	%edi, %edi
	leal	-1(%r8), %r10d
	.p2align 4,,10
	.p2align 3
.L5:
	cmpl	%edi, %r10d
	movl	%edi, %r11d
	movq	%rbx, %rcx
	cmovle	%r10d, %r11d
	xorl	%esi, %esi
	xorl	%eax, %eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%edx, %esi
.L8:
	addl	-400(%rcx), %eax
	cmpl	%esi, %edi
	jle	.L28
.L7:
	leal	1(%rsi), %edx
	addq	$4, %rcx
	cmpl	%edx, %r11d
	jge	.L19
	cmpl	%edx, %r8d
	jle	.L13
	movl	%r8d, %r11d
	subl	%edx, %r11d
	leal	-1(%r11), %ecx
	cmpl	$2, %ecx
	jbe	.L10
	addl	$101, %esi
	movl	%r11d, %ecx
	pxor	%xmm0, %xmm0
	shrl	$2, %ecx
	movslq	%esi, %rsi
	leal	-1(%rcx), %r12d
	leaq	0(%rbp,%rsi,4), %rsi
	salq	$4, %r12
	leaq	16(%rsi), %rcx
	addq	%rcx, %r12
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L29:
	addq	$16, %rcx
.L11:
	movdqu	(%rsi), %xmm1
	movq	%rcx, %rsi
	paddd	%xmm1, %xmm0
	cmpq	%rcx, %r12
	jne	.L29
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %ecx
	addl	%ecx, %eax
	movl	%r11d, %ecx
	andl	$-4, %ecx
	addl	%ecx, %edx
	cmpl	%ecx, %r11d
	je	.L13
.L10:
	movslq	%edx, %rcx
	addl	416(%rsp,%rcx,4), %eax
	leal	1(%rdx), %ecx
	cmpl	%ecx, %r8d
	jle	.L13
	movslq	%ecx, %rcx
	addl	$2, %edx
	addl	416(%rsp,%rcx,4), %eax
	cmpl	%edx, %r8d
	jle	.L13
	movslq	%edx, %rdx
	addl	416(%rsp,%rdx,4), %eax
.L13:
	cmpl	%eax, %r9d
	cmovl	%eax, %r9d
	addl	$1, %edi
	cmpl	%edi, %r8d
	jne	.L5
.L16:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	824(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$832, %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
.L28:
	.cfi_restore_state
	addl	(%rcx), %eax
	jmp	.L7
.L6:
	xorl	%r9d, %r9d
	jmp	.L16
.L30:
	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	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%r14, %rdi
	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	$832, %rsp
	.cfi_def_cfa_offset 880
	movq	%fs:40, %rax
	movq	%rax, 824(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	movq	%rbp, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %r12
	cmpl	%ebx, %eax
	jg	.L3
	testl	%eax, %eax
	jle	.L6
	leaq	416(%rsp), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	addq	$4, %r13
	cmpl	%r12d, %r8d
	jg	.L4
	testl	%r8d, %r8d
	jle	.L6
	xorl	%r9d, %r9d
	xorl	%edi, %edi
	leal	-1(%r8), %r10d
	.p2align 4,,10
	.p2align 3
.L5:
	cmpl	%edi, %r10d
	movl	%edi, %r11d
	movq	%rbx, %rcx
	cmovle	%r10d, %r11d
	xorl	%esi, %esi
	xorl	%eax, %eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%edx, %esi
.L8:
	addl	-400(%rcx), %eax
	cmpl	%esi, %edi
	jle	.L28
.L7:
	leal	1(%rsi), %edx
	addq	$4, %rcx
	cmpl	%edx, %r11d
	jge	.L19
	cmpl	%edx, %r8d
	jle	.L13
	movl	%r8d, %r11d
	subl	%edx, %r11d
	leal	-1(%r11), %ecx
	cmpl	$2, %ecx
	jbe	.L10
	addl	$101, %esi
	movl	%r11d, %ecx
	pxor	%xmm0, %xmm0
	shrl	$2, %ecx
	movslq	%esi, %rsi
	leal	-1(%rcx), %r12d
	leaq	0(%rbp,%rsi,4), %rsi
	salq	$4, %r12
	leaq	16(%rsi), %rcx
	addq	%rcx, %r12
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L29:
	addq	$16, %rcx
.L11:
	movdqu	(%rsi), %xmm1
	movq	%rcx, %rsi
	paddd	%xmm1, %xmm0
	cmpq	%rcx, %r12
	jne	.L29
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %ecx
	addl	%ecx, %eax
	movl	%r11d, %ecx
	andl	$-4, %ecx
	addl	%ecx, %edx
	cmpl	%ecx, %r11d
	je	.L13
.L10:
	movslq	%edx, %rcx
	addl	416(%rsp,%rcx,4), %eax
	leal	1(%rdx), %ecx
	cmpl	%ecx, %r8d
	jle	.L13
	movslq	%ecx, %rcx
	addl	$2, %edx
	addl	416(%rsp,%rcx,4), %eax
	cmpl	%edx, %r8d
	jle	.L13
	movslq	%edx, %rdx
	addl	416(%rsp,%rdx,4), %eax
.L13:
	cmpl	%eax, %r9d
	cmovl	%eax, %r9d
	addl	$1, %edi
	cmpl	%edi, %r8d
	jne	.L5
.L16:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	824(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$832, %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
.L28:
	.cfi_restore_state
	addl	(%rcx), %eax
	jmp	.L7
.L6:
	xorl	%r9d, %r9d
	jmp	.L16
.L30:
	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:
```