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

```c
#include<stdio.h>

int main()
{
    int n,i,j,sum=0,max=0;

    scanf("%d",&n);
    int ara[2*n],ara2[n];


    for(i=0; i<2*n; i++)
    {
        scanf("%d",&ara[i]);
    }

  /*  for(i=0; i<2*n; i++)
    {
        printf("%d",ara[i]);
    }
*/

for(i=0; i<n; i++)
  {
      sum=0;

      for(j=0; j<2*n;)
      {
          if(j==i)
          {sum+=ara[j];
              j=j+n;}
          else
          {
              sum+=ara[j];
              j++;
          }

      }
      ara2[i]=sum;
  }

  for(i=0; i<n; i++)
  {
      if(ara2[i]>=max)max=ara2[i];
  }

      printf("%d",max);

}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movl	$0, -96(%rbp)
	movl	$0, -92(%rbp)
	leaq	-108(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-108(%rbp), %eax
	addl	%eax, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -128(%rbp)
	movq	$0, -120(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -104(%rbp)
	jmp	.L8
.L9:
	movl	-104(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -104(%rbp)
.L8:
	movl	-108(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -104(%rbp)
	jl	.L9
	movl	$0, -104(%rbp)
	jmp	.L10
.L14:
	movl	$0, -96(%rbp)
	movl	$0, -100(%rbp)
	jmp	.L11
.L13:
	movl	-100(%rbp), %eax
	cmpl	-104(%rbp), %eax
	jne	.L12
	movq	-80(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, -96(%rbp)
	movl	-108(%rbp), %eax
	addl	%eax, -100(%rbp)
	jmp	.L11
.L12:
	movq	-80(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, -96(%rbp)
	addl	$1, -100(%rbp)
.L11:
	movl	-108(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -100(%rbp)
	jl	.L13
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	-96(%rbp), %ecx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -104(%rbp)
.L10:
	movl	-108(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L14
	movl	$0, -104(%rbp)
	jmp	.L15
.L17:
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, -92(%rbp)
	jg	.L16
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -92(%rbp)
.L16:
	addl	$1, -104(%rbp)
.L15:
	movl	-108(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L17
	movl	-92(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	%rbx, %rsp
	movl	$0, %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	.LC0(%rip), %r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %r8d
	movq	%rsp, %rcx
	leal	(%r8,%r8), %esi
	movslq	%esi, %rax
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L36:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L36
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L37
.L4:
	movslq	%r8d, %rax
	movq	%rsp, %rcx
	movq	%rsp, %r12
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rcx
.L5:
	cmpq	%rcx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L37:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L38
.L7:
	movq	%rsp, %rbx
	testl	%esi, %esi
	jle	.L8
	movq	%r12, %r15
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %r8d
	addq	$4, %r15
	leal	(%r8,%r8), %esi
	cmpl	%r13d, %esi
	jg	.L9
.L8:
	testl	%r8d, %r8d
	jle	.L22
	leal	-1(%r8), %r10d
	movl	%r8d, %r9d
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L11:
	xorl	%edx, %edx
	xorl	%eax, %eax
	testl	%esi, %esi
	jle	.L14
	.p2align 4,,10
	.p2align 3
.L15:
	movslq	%eax, %rdi
	addl	(%r12,%rdi,4), %edx
	cmpl	%ecx, %eax
	je	.L39
	addl	$1, %eax
	cmpl	%esi, %eax
	jl	.L15
.L14:
	movl	%edx, (%rbx,%rcx,4)
	addq	$1, %rcx
	cmpq	%r9, %rcx
	jne	.L11
	cmpl	$2, %r10d
	jbe	.L24
	movl	%r8d, %edx
	movq	%rbx, %rax
	pxor	%xmm2, %xmm2
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%rbx,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L18:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L18
	movdqa	%xmm2, %xmm0
	movl	%r8d, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %edx
	testb	$3, %r8b
	je	.L10
.L17:
	movslq	%eax, %rcx
	leaq	(%rbx,%rcx,4), %rcx
	movl	(%rcx), %esi
	cmpl	%esi, %edx
	cmovl	%esi, %edx
	leal	1(%rax), %esi
	cmpl	%r8d, %esi
	jge	.L10
	movl	4(%rcx), %esi
	cmpl	%esi, %edx
	cmovl	%esi, %edx
	addl	$2, %eax
	cmpl	%eax, %r8d
	jle	.L10
	movl	8(%rcx), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
.L10:
	xorl	%eax, %eax
	movq	%r14, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L40
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L39:
	.cfi_restore_state
	addl	%r8d, %eax
	cmpl	%esi, %eax
	jl	.L15
	jmp	.L14
.L22:
	xorl	%edx, %edx
	jmp	.L10
.L24:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L17
.L38:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L40:
	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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	.LC0(%rip), %r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %r8d
	movq	%rsp, %rcx
	leal	(%r8,%r8), %esi
	movslq	%esi, %rax
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L36:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L36
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L37
.L4:
	movslq	%r8d, %rax
	movq	%rsp, %rcx
	movq	%rsp, %r12
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rcx
.L5:
	cmpq	%rcx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L37:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L38
.L7:
	movq	%rsp, %rbx
	testl	%esi, %esi
	jle	.L8
	movq	%r12, %r15
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %r8d
	addq	$4, %r15
	leal	(%r8,%r8), %esi
	cmpl	%r13d, %esi
	jg	.L9
.L8:
	testl	%r8d, %r8d
	jle	.L22
	leal	-1(%r8), %r10d
	movl	%r8d, %r9d
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L11:
	xorl	%edx, %edx
	xorl	%eax, %eax
	testl	%esi, %esi
	jle	.L14
	.p2align 4,,10
	.p2align 3
.L15:
	movslq	%eax, %rdi
	addl	(%r12,%rdi,4), %edx
	cmpl	%ecx, %eax
	je	.L39
	addl	$1, %eax
	cmpl	%esi, %eax
	jl	.L15
.L14:
	movl	%edx, (%rbx,%rcx,4)
	addq	$1, %rcx
	cmpq	%r9, %rcx
	jne	.L11
	cmpl	$2, %r10d
	jbe	.L24
	movl	%r8d, %edx
	movq	%rbx, %rax
	pxor	%xmm2, %xmm2
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%rbx,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L18:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L18
	movdqa	%xmm2, %xmm0
	movl	%r8d, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %edx
	testb	$3, %r8b
	je	.L10
.L17:
	movslq	%eax, %rcx
	leaq	(%rbx,%rcx,4), %rcx
	movl	(%rcx), %esi
	cmpl	%esi, %edx
	cmovl	%esi, %edx
	leal	1(%rax), %esi
	cmpl	%r8d, %esi
	jge	.L10
	movl	4(%rcx), %esi
	cmpl	%esi, %edx
	cmovl	%esi, %edx
	addl	$2, %eax
	cmpl	%eax, %r8d
	jle	.L10
	movl	8(%rcx), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
.L10:
	xorl	%eax, %eax
	movq	%r14, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L40
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L39:
	.cfi_restore_state
	addl	%r8d, %eax
	cmpl	%esi, %eax
	jl	.L15
	jmp	.L14
.L22:
	xorl	%edx, %edx
	jmp	.L10
.L24:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L17
.L38:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L40:
	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:

#include<stdio.h>

int main()
{
    int n,i,j,sum=0,max=0;

    scanf("%d",&n);
    int ara[2*n],ara2[n];


    for(i=0; i<2*n; i++)
    {
        scanf("%d",&ara[i]);
    }

  /*  for(i=0; i<2*n; i++)
    {
        printf("%d",ara[i]);
    }
*/

for(i=0; i<n; i++)
  {
      sum=0;

      for(j=0; j<2*n;)
      {
          if(j==i)
          {sum+=ara[j];
              j=j+n;}
          else
          {
              sum+=ara[j];
              j++;
          }

      }
      ara2[i]=sum;
  }

  for(i=0; i<n; i++)
  {
      if(ara2[i]>=max)max=ara2[i];
  }

      printf("%d",max);

}
5
3 2 2 4 1
1 2 2 2 1

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

```c
#include<stdio.h>

int main()
{
    int n,i,j,sum=0,max=0;

    scanf("%d",&n);
    int ara[2*n],ara2[n];


    for(i=0; i<2*n; i++)
    {
        scanf("%d",&ara[i]);
    }

  /*  for(i=0; i<2*n; i++)
    {
        printf("%d",ara[i]);
    }
*/

for(i=0; i<n; i++)
  {
      sum=0;

      for(j=0; j<2*n;)
      {
          if(j==i)
          {sum+=ara[j];
              j=j+n;}
          else
          {
              sum+=ara[j];
              j++;
          }

      }
      ara2[i]=sum;
  }

  for(i=0; i<n; i++)
  {
      if(ara2[i]>=max)max=ara2[i];
  }

      printf("%d",max);

}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movl	$0, -96(%rbp)
	movl	$0, -92(%rbp)
	leaq	-108(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-108(%rbp), %eax
	addl	%eax, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -128(%rbp)
	movq	$0, -120(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -104(%rbp)
	jmp	.L8
.L9:
	movl	-104(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -104(%rbp)
.L8:
	movl	-108(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -104(%rbp)
	jl	.L9
	movl	$0, -104(%rbp)
	jmp	.L10
.L14:
	movl	$0, -96(%rbp)
	movl	$0, -100(%rbp)
	jmp	.L11
.L13:
	movl	-100(%rbp), %eax
	cmpl	-104(%rbp), %eax
	jne	.L12
	movq	-80(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, -96(%rbp)
	movl	-108(%rbp), %eax
	addl	%eax, -100(%rbp)
	jmp	.L11
.L12:
	movq	-80(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, -96(%rbp)
	addl	$1, -100(%rbp)
.L11:
	movl	-108(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -100(%rbp)
	jl	.L13
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	-96(%rbp), %ecx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -104(%rbp)
.L10:
	movl	-108(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L14
	movl	$0, -104(%rbp)
	jmp	.L15
.L17:
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, -92(%rbp)
	jg	.L16
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -92(%rbp)
.L16:
	addl	$1, -104(%rbp)
.L15:
	movl	-108(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L17
	movl	-92(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	%rbx, %rsp
	movl	$0, %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movl	$0, -96(%rbp)
	movl	$0, -92(%rbp)
	leaq	-108(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-108(%rbp), %eax
	addl	%eax, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -128(%rbp)
	movq	$0, -120(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -104(%rbp)
	jmp	.L8
.L9:
	movl	-104(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -104(%rbp)
.L8:
	movl	-108(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -104(%rbp)
	jl	.L9
	movl	$0, -104(%rbp)
	jmp	.L10
.L14:
	movl	$0, -96(%rbp)
	movl	$0, -100(%rbp)
	jmp	.L11
.L13:
	movl	-100(%rbp), %eax
	cmpl	-104(%rbp), %eax
	jne	.L12
	movq	-80(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, -96(%rbp)
	movl	-108(%rbp), %eax
	addl	%eax, -100(%rbp)
	jmp	.L11
.L12:
	movq	-80(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, -96(%rbp)
	addl	$1, -100(%rbp)
.L11:
	movl	-108(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -100(%rbp)
	jl	.L13
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	-96(%rbp), %ecx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -104(%rbp)
.L10:
	movl	-108(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L14
	movl	$0, -104(%rbp)
	jmp	.L15
.L17:
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, -92(%rbp)
	jg	.L16
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -92(%rbp)
.L16:
	addl	$1, -104(%rbp)
.L15:
	movl	-108(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L17
	movl	-92(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	%rbx, %rsp
	movl	$0, %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
