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>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#include<stdbool.h>
typedef long long ll;
#define elif else if
#define mod 1000000007

ll maxx(ll a, ll b)
{
	return (a>b)?a:b;
}
int main(void)
{
	ll n;
	scanf("%lld",&n);
	ll arr[n][3];
	for(ll i = 0;i<n;i++)
	{
		scanf("%lld %lld %lld",&arr[i][0],&arr[i][1],&arr[i][2]);
	}

	ll dp[n][3],ans;
	memset(dp,0,sizeof(dp));
	dp[0][0] = arr[0][0];
	dp[0][1] = arr[0][1];
	dp[0][2] = arr[0][2];
	for(ll i = 1;i<n;i++)
	{
		dp[i][0] = arr[i][0] + maxx(dp[i-1][1],dp[i-1][2]);
		dp[i][1] = arr[i][1] + maxx(dp[i-1][0],dp[i-1][2]);
		dp[i][2] = arr[i][2] + maxx(dp[i-1][1],dp[i-1][0]);
	}
	// ans = maxx
	ans = maxx(dp[n-1][0],maxx(dp[n-1][1],dp[n-1][2]));
	printf("%lld\n",ans);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	maxx
	.type	maxx, @function
maxx:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	maxx, .-maxx
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld %lld %lld"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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	$136, %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, -168(%rbp)
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rcx
	leaq	-1(%rcx), %rax
	movq	%rax, -96(%rbp)
	movq	%rcx, %rax
	movq	%rax, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	-144(%rbp), %r10
	movq	-136(%rbp), %r11
	imulq	$192, %r11, %rdx
	imulq	$0, %r10, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$192, %eax
	mulq	%r10
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movq	%rcx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rcx, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movq	-160(%rbp), %r8
	movq	-152(%rbp), %r9
	imulq	$192, %r9, %rdx
	imulq	$0, %r8, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$192, %eax
	mulq	%r8
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movq	%rcx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L4:
	cmpq	%rdx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L6
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -88(%rbp)
	movq	$0, -112(%rbp)
	jmp	.L7
.L8:
	movq	-112(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	16(%rax), %rdx
	movq	-88(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-112(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	8(%rax), %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movq	-112(%rbp), %rsi
	movq	%rsi, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	salq	$3, %rax
	movq	-88(%rbp), %rsi
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -112(%rbp)
.L7:
	movq	-120(%rbp), %rax
	cmpq	%rax, -112(%rbp)
	jl	.L8
	movq	-120(%rbp), %rcx
	leaq	-1(%rcx), %rax
	movq	%rax, -80(%rbp)
	movq	%rcx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	imulq	$192, %r15, %rdx
	imulq	$0, %r14, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$192, %eax
	mulq	%r14
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movq	%rcx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rcx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	imulq	$192, %r13, %rdx
	imulq	$0, %r12, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$192, %eax
	mulq	%r12
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movq	%rcx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rsi
	andq	$-4096, %rsi
	movq	%rsp, %rdx
	subq	%rsi, %rdx
.L9:
	cmpq	%rdx, %rsp
	je	.L10
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L9
.L10:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L11
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L11:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -72(%rbp)
	movq	%rcx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	movq	-72(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	-88(%rbp), %rax
	movq	(%rax), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-88(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	-88(%rbp), %rax
	movq	16(%rax), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, 16(%rax)
	movq	$1, -104(%rbp)
	jmp	.L12
.L13:
	movq	-88(%rbp), %rcx
	movq	-104(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movq	(%rax), %rbx
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-72(%rbp), %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	addq	$16, %rax
	movq	(%rax), %rdx
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	maxx
	leaq	(%rbx,%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	-104(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	movq	%rcx, (%rax)
	movq	-88(%rbp), %rcx
	movq	-104(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	(%rax), %rbx
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-72(%rbp), %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	addq	$16, %rax
	movq	(%rax), %rdx
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	maxx
	leaq	(%rbx,%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	-104(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	addq	$8, %rax
	movq	%rcx, (%rax)
	movq	-88(%rbp), %rcx
	movq	-104(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	addq	$16, %rax
	movq	(%rax), %rbx
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-72(%rbp), %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movq	(%rax), %rdx
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	maxx
	leaq	(%rbx,%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	-104(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	addq	$16, %rax
	movq	%rcx, (%rax)
	addq	$1, -104(%rbp)
.L12:
	movq	-120(%rbp), %rax
	cmpq	%rax, -104(%rbp)
	jl	.L13
	movq	-120(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-72(%rbp), %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	addq	$16, %rax
	movq	(%rax), %rdx
	movq	-120(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	maxx
	movq	%rax, %rdx
	movq	-120(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	maxx
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-168(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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
	.p2align 4
	.globl	maxx
	.type	maxx, @function
maxx:
.LFB51:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovge	%rsi, %rax
	ret
	.cfi_endproc
.LFE51:
	.size	maxx, .-maxx
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld %lld %lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %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
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %r12
	movq	%rsp, %rcx
	leaq	(%r12,%r12,2), %rax
	leaq	15(,%rax,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L5
.L30:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L30
.L5:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L31
.L6:
	leaq	7(%rsp), %rbx
	movq	%rbx, %rax
	andq	$-8, %rbx
	shrq	$3, %rax
	movq	%rax, -72(%rbp)
	testq	%r12, %r12
	jle	.L7
	movq	%rbx, %r13
	xorl	%r14d, %r14d
	leaq	.LC1(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	16(%r13), %rcx
	leaq	8(%r13), %rdx
	movq	%r13, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addq	$1, %r14
	addq	$24, %r13
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %r12
	cmpq	%r14, %r12
	jg	.L8
.L7:
	leaq	(%r12,%r12,2), %rdx
	movq	%rsp, %rsi
	leaq	-1(%r12), %r13
	salq	$3, %rdx
	leaq	15(%rdx), %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L10
.L32:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L32
.L10:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L33
.L11:
	leaq	7(%rsp), %rdi
	xorl	%esi, %esi
	movq	%rdi, %r15
	andq	$-8, %rdi
	call	memset@PLT
	shrq	$3, %r15
	movq	%rax, %rdi
	movq	-72(%rbp), %rax
	movdqu	0(,%rax,8), %xmm0
	movq	16(,%rax,8), %rdx
	movups	%xmm0, 0(,%r15,8)
	movq	%rdx, 16(,%r15,8)
	cmpq	$1, %r12
	jle	.L16
	cmpq	$3, %r12
	jle	.L18
	leaq	-4(%r12), %r8
	movhlps	%xmm0, %xmm1
	movq	%xmm0, %r11
	movl	$1, %r10d
	andq	$-2, %r8
	movq	%xmm1, %rax
	leaq	24(%rbx), %r9
	leaq	24(%rdi), %rsi
	addq	$3, %r8
.L14:
	cmpq	%rdx, %rax
	movq	%rdx, %rcx
	cmovge	%rax, %rcx
	addq	(%r9), %rcx
	cmpq	%rdx, %r11
	cmovge	%r11, %rdx
	addq	8(%r9), %rdx
	cmpq	%r11, %rax
	movq	%rcx, (%rsi)
	cmovl	%r11, %rax
	addq	16(%r9), %rax
	movq	%rdx, 8(%rsi)
	cmpq	%rax, %rdx
	movq	%rax, %r11
	movq	%rax, 16(%rsi)
	cmovge	%rdx, %r11
	addq	24(%r9), %r11
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	addq	32(%r9), %rax
	cmpq	%rdx, %rcx
	movq	%r11, 24(%rsi)
	cmovl	%rdx, %rcx
	addq	$2, %r10
	addq	40(%r9), %rcx
	movq	%rax, 32(%rsi)
	movq	%rcx, 40(%rsi)
	movq	%rcx, %rdx
	addq	$48, %r9
	addq	$48, %rsi
	cmpq	%r8, %r10
	jne	.L14
.L13:
	imulq	$24, %r8, %rcx
	addq	%rcx, %rbx
	addq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L15:
	movq	-8(%rcx), %rdx
	movq	-16(%rcx), %rsi
	movq	%rdx, %rax
	cmpq	%rdx, %rsi
	cmovge	%rsi, %rax
	addq	(%rbx), %rax
	movq	%rax, (%rcx)
	movq	-24(%rcx), %rax
	cmpq	%rdx, %rax
	cmovge	%rax, %rdx
	addq	8(%rbx), %rdx
	cmpq	%rsi, %rax
	cmovl	%rsi, %rax
	addq	$1, %r8
	addq	16(%rbx), %rax
	movq	%rdx, 8(%rcx)
	movq	%rax, 16(%rcx)
	addq	$24, %rbx
	addq	$24, %rcx
	cmpq	%r8, %r12
	jg	.L15
.L16:
	leaq	0(%r13,%r13,2), %rax
	leaq	.LC2(%rip), %rsi
	leaq	(%rdi,%rax,8), %rax
	movl	$1, %edi
	movq	16(%rax), %rdx
	movq	8(%rax), %rcx
	movq	(%rax), %rax
	cmpq	%rcx, %rdx
	cmovl	%rcx, %rdx
	cmpq	%rax, %rdx
	cmovl	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L34
	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
.L33:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L11
.L31:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L6
.L18:
	movl	$1, %r8d
	jmp	.L13
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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
	.p2align 4
	.globl	maxx
	.type	maxx, @function
maxx:
.LFB51:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovge	%rsi, %rax
	ret
	.cfi_endproc
.LFE51:
	.size	maxx, .-maxx
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld %lld %lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %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
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %r12
	movq	%rsp, %rcx
	leaq	(%r12,%r12,2), %rax
	leaq	15(,%rax,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L5
.L30:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L30
.L5:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L31
.L6:
	leaq	7(%rsp), %rbx
	movq	%rbx, %rax
	andq	$-8, %rbx
	shrq	$3, %rax
	movq	%rax, -72(%rbp)
	testq	%r12, %r12
	jle	.L7
	movq	%rbx, %r13
	xorl	%r14d, %r14d
	leaq	.LC1(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	16(%r13), %rcx
	leaq	8(%r13), %rdx
	movq	%r13, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addq	$1, %r14
	addq	$24, %r13
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %r12
	cmpq	%r14, %r12
	jg	.L8
.L7:
	leaq	(%r12,%r12,2), %rdx
	movq	%rsp, %rsi
	leaq	-1(%r12), %r13
	salq	$3, %rdx
	leaq	15(%rdx), %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L10
.L32:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L32
.L10:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L33
.L11:
	leaq	7(%rsp), %rdi
	xorl	%esi, %esi
	movq	%rdi, %r15
	andq	$-8, %rdi
	call	memset@PLT
	shrq	$3, %r15
	movq	%rax, %rdi
	movq	-72(%rbp), %rax
	movdqu	0(,%rax,8), %xmm0
	movq	16(,%rax,8), %rdx
	movups	%xmm0, 0(,%r15,8)
	movq	%rdx, 16(,%r15,8)
	cmpq	$1, %r12
	jle	.L16
	cmpq	$3, %r12
	jle	.L18
	leaq	-4(%r12), %r8
	movhlps	%xmm0, %xmm1
	movq	%xmm0, %r11
	movl	$1, %r10d
	andq	$-2, %r8
	movq	%xmm1, %rax
	leaq	24(%rbx), %r9
	leaq	24(%rdi), %rsi
	addq	$3, %r8
.L14:
	cmpq	%rdx, %rax
	movq	%rdx, %rcx
	cmovge	%rax, %rcx
	addq	(%r9), %rcx
	cmpq	%rdx, %r11
	cmovge	%r11, %rdx
	addq	8(%r9), %rdx
	cmpq	%r11, %rax
	movq	%rcx, (%rsi)
	cmovl	%r11, %rax
	addq	16(%r9), %rax
	movq	%rdx, 8(%rsi)
	cmpq	%rax, %rdx
	movq	%rax, %r11
	movq	%rax, 16(%rsi)
	cmovge	%rdx, %r11
	addq	24(%r9), %r11
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	addq	32(%r9), %rax
	cmpq	%rdx, %rcx
	movq	%r11, 24(%rsi)
	cmovl	%rdx, %rcx
	addq	$2, %r10
	addq	40(%r9), %rcx
	movq	%rax, 32(%rsi)
	movq	%rcx, 40(%rsi)
	movq	%rcx, %rdx
	addq	$48, %r9
	addq	$48, %rsi
	cmpq	%r8, %r10
	jne	.L14
.L13:
	imulq	$24, %r8, %rcx
	addq	%rcx, %rbx
	addq	%rdi, %rcx
	.p2align 4,,10
	.p2align 3
.L15:
	movq	-8(%rcx), %rdx
	movq	-16(%rcx), %rsi
	movq	%rdx, %rax
	cmpq	%rdx, %rsi
	cmovge	%rsi, %rax
	addq	(%rbx), %rax
	movq	%rax, (%rcx)
	movq	-24(%rcx), %rax
	cmpq	%rdx, %rax
	cmovge	%rax, %rdx
	addq	8(%rbx), %rdx
	cmpq	%rsi, %rax
	cmovl	%rsi, %rax
	addq	$1, %r8
	addq	16(%rbx), %rax
	movq	%rdx, 8(%rcx)
	movq	%rax, 16(%rcx)
	addq	$24, %rbx
	addq	$24, %rcx
	cmpq	%r8, %r12
	jg	.L15
.L16:
	leaq	0(%r13,%r13,2), %rax
	leaq	.LC2(%rip), %rsi
	leaq	(%rdi,%rax,8), %rax
	movl	$1, %edi
	movq	16(%rax), %rdx
	movq	8(%rax), %rcx
	movq	(%rax), %rax
	cmpq	%rcx, %rdx
	cmovl	%rcx, %rdx
	cmpq	%rax, %rdx
	cmovl	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L34
	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
.L33:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L11
.L31:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L6
.L18:
	movl	$1, %r8d
	jmp	.L13
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#include<stdbool.h>
typedef long long ll;
#define elif else if
#define mod 1000000007

ll maxx(ll a, ll b)
{
	return (a>b)?a:b;
}
int main(void)
{
	ll n;
	scanf("%lld",&n);
	ll arr[n][3];
	for(ll i = 0;i<n;i++)
	{
		scanf("%lld %lld %lld",&arr[i][0],&arr[i][1],&arr[i][2]);
	}

	ll dp[n][3],ans;
	memset(dp,0,sizeof(dp));
	dp[0][0] = arr[0][0];
	dp[0][1] = arr[0][1];
	dp[0][2] = arr[0][2];
	for(ll i = 1;i<n;i++)
	{
		dp[i][0] = arr[i][0] + maxx(dp[i-1][1],dp[i-1][2]);
		dp[i][1] = arr[i][1] + maxx(dp[i-1][0],dp[i-1][2]);
		dp[i][2] = arr[i][2] + maxx(dp[i-1][1],dp[i-1][0]);
	}
	// ans = maxx
	ans = maxx(dp[n-1][0],maxx(dp[n-1][1],dp[n-1][2]));
	printf("%lld\n",ans);
	return 0;
}

3
1 40 70
20 50 80
30 60 90
 1
100 16 1
 7
6 7 8
8 8 3
2 5 2
7 8 6
4 6 8
2 3 4
7 7 1
 1
000 16 1
 7
6 7 14
8 8 3
2 5 2
7 8 6
4 6 8
2 3 4
7 7 1
 3
1 40 34
20 50 80
30 35 90
 3
1 76 34
20 50 80
30 35 90
 1
000 25 2
 7
5 7 14
7 8 3
2 5 2
7 8 6
4 6 8
2 3 4
7 7 1
 3
0 94 34
20 50 80
30 35 90

210
 100
 46
 16
 52
 174
 191
 25
 51
 209

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>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#include<stdbool.h>
typedef long long ll;
#define elif else if
#define mod 1000000007

ll maxx(ll a, ll b)
{
	return (a>b)?a:b;
}
int main(void)
{
	ll n;
	scanf("%lld",&n);
	ll arr[n][3];
	for(ll i = 0;i<n;i++)
	{
		scanf("%lld %lld %lld",&arr[i][0],&arr[i][1],&arr[i][2]);
	}

	ll dp[n][3],ans;
	memset(dp,0,sizeof(dp));
	dp[0][0] = arr[0][0];
	dp[0][1] = arr[0][1];
	dp[0][2] = arr[0][2];
	for(ll i = 1;i<n;i++)
	{
		dp[i][0] = arr[i][0] + maxx(dp[i-1][1],dp[i-1][2]);
		dp[i][1] = arr[i][1] + maxx(dp[i-1][0],dp[i-1][2]);
		dp[i][2] = arr[i][2] + maxx(dp[i-1][1],dp[i-1][0]);
	}
	// ans = maxx
	ans = maxx(dp[n-1][0],maxx(dp[n-1][1],dp[n-1][2]));
	printf("%lld\n",ans);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	maxx
	.type	maxx, @function
maxx:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	maxx, .-maxx
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld %lld %lld"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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	$136, %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, -168(%rbp)
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rcx
	leaq	-1(%rcx), %rax
	movq	%rax, -96(%rbp)
	movq	%rcx, %rax
	movq	%rax, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	-144(%rbp), %r10
	movq	-136(%rbp), %r11
	imulq	$192, %r11, %rdx
	imulq	$0, %r10, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$192, %eax
	mulq	%r10
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movq	%rcx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rcx, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movq	-160(%rbp), %r8
	movq	-152(%rbp), %r9
	imulq	$192, %r9, %rdx
	imulq	$0, %r8, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$192, %eax
	mulq	%r8
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movq	%rcx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L4:
	cmpq	%rdx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L6
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -88(%rbp)
	movq	$0, -112(%rbp)
	jmp	.L7
.L8:
	movq	-112(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	16(%rax), %rdx
	movq	-88(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-112(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	8(%rax), %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movq	-112(%rbp), %rsi
	movq	%rsi, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	salq	$3, %rax
	movq	-88(%rbp), %rsi
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -112(%rbp)
.L7:
	movq	-120(%rbp), %rax
	cmpq	%rax, -112(%rbp)
	jl	.L8
	movq	-120(%rbp), %rcx
	leaq	-1(%rcx), %rax
	movq	%rax, -80(%rbp)
	movq	%rcx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	imulq	$192, %r15, %rdx
	imulq	$0, %r14, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$192, %eax
	mulq	%r14
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movq	%rcx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rcx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	imulq	$192, %r13, %rdx
	imulq	$0, %r12, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$192, %eax
	mulq	%r12
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movq	%rcx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rsi
	andq	$-4096, %rsi
	movq	%rsp, %rdx
	subq	%rsi, %rdx
.L9:
	cmpq	%rdx, %rsp
	je	.L10
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L9
.L10:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L11
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L11:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -72(%rbp)
	movq	%rcx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	movq	-72(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	-88(%rbp), %rax
	movq	(%rax), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-88(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	-88(%rbp), %rax
	movq	16(%rax), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, 16(%rax)
	movq	$1, -104(%rbp)
	jmp	.L12
.L13:
	movq	-88(%rbp), %rcx
	movq	-104(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movq	(%rax), %rbx
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-72(%rbp), %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	addq	$16, %rax
	movq	(%rax), %rdx
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	maxx
	leaq	(%rbx,%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	-104(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	movq	%rcx, (%rax)
	movq	-88(%rbp), %rcx
	movq	-104(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	(%rax), %rbx
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-72(%rbp), %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	addq	$16, %rax
	movq	(%rax), %rdx
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	maxx
	leaq	(%rbx,%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	-104(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	addq	$8, %rax
	movq	%rcx, (%rax)
	movq	-88(%rbp), %rcx
	movq	-104(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	addq	$16, %rax
	movq	(%rax), %rbx
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-72(%rbp), %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movq	(%rax), %rdx
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	maxx
	leaq	(%rbx,%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	-104(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	addq	$16, %rax
	movq	%rcx, (%rax)
	addq	$1, -104(%rbp)
.L12:
	movq	-120(%rbp), %rax
	cmpq	%rax, -104(%rbp)
	jl	.L13
	movq	-120(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-72(%rbp), %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	addq	$16, %rax
	movq	(%rax), %rdx
	movq	-120(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	maxx
	movq	%rax, %rdx
	movq	-120(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	maxx
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-168(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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
	.globl	maxx
	.type	maxx, @function
maxx:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	maxx, .-maxx
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld %lld %lld"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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	$136, %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, -168(%rbp)
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rcx
	leaq	-1(%rcx), %rax
	movq	%rax, -96(%rbp)
	movq	%rcx, %rax
	movq	%rax, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	-144(%rbp), %r10
	movq	-136(%rbp), %r11
	imulq	$192, %r11, %rdx
	imulq	$0, %r10, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$192, %eax
	mulq	%r10
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movq	%rcx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rcx, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movq	-160(%rbp), %r8
	movq	-152(%rbp), %r9
	imulq	$192, %r9, %rdx
	imulq	$0, %r8, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$192, %eax
	mulq	%r8
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movq	%rcx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L4:
	cmpq	%rdx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L6
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -88(%rbp)
	movq	$0, -112(%rbp)
	jmp	.L7
.L8:
	movq	-112(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	16(%rax), %rdx
	movq	-88(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-112(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	8(%rax), %rdx
	movq	-88(%rbp), %rax
	addq	%rax, %rdx
	movq	-112(%rbp), %rsi
	movq	%rsi, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	salq	$3, %rax
	movq	-88(%rbp), %rsi
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -112(%rbp)
.L7:
	movq	-120(%rbp), %rax
	cmpq	%rax, -112(%rbp)
	jl	.L8
	movq	-120(%rbp), %rcx
	leaq	-1(%rcx), %rax
	movq	%rax, -80(%rbp)
	movq	%rcx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	imulq	$192, %r15, %rdx
	imulq	$0, %r14, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$192, %eax
	mulq	%r14
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movq	%rcx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rcx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	imulq	$192, %r13, %rdx
	imulq	$0, %r12, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$192, %eax
	mulq	%r12
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movq	%rcx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rsi
	andq	$-4096, %rsi
	movq	%rsp, %rdx
	subq	%rsi, %rdx
.L9:
	cmpq	%rdx, %rsp
	je	.L10
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L9
.L10:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L11
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L11:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -72(%rbp)
	movq	%rcx, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	movq	-72(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movq	-88(%rbp), %rax
	movq	(%rax), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-88(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	-88(%rbp), %rax
	movq	16(%rax), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, 16(%rax)
	movq	$1, -104(%rbp)
	jmp	.L12
.L13:
	movq	-88(%rbp), %rcx
	movq	-104(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movq	(%rax), %rbx
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-72(%rbp), %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	addq	$16, %rax
	movq	(%rax), %rdx
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	maxx
	leaq	(%rbx,%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	-104(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	movq	%rcx, (%rax)
	movq	-88(%rbp), %rcx
	movq	-104(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	(%rax), %rbx
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-72(%rbp), %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	addq	$16, %rax
	movq	(%rax), %rdx
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	maxx
	leaq	(%rbx,%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	-104(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	addq	$8, %rax
	movq	%rcx, (%rax)
	movq	-88(%rbp), %rcx
	movq	-104(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	addq	$16, %rax
	movq	(%rax), %rbx
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-72(%rbp), %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movq	(%rax), %rdx
	movq	-104(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	maxx
	leaq	(%rbx,%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	-104(%rbp), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	addq	$16, %rax
	movq	%rcx, (%rax)
	addq	$1, -104(%rbp)
.L12:
	movq	-120(%rbp), %rax
	cmpq	%rax, -104(%rbp)
	jl	.L13
	movq	-120(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-72(%rbp), %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	addq	$16, %rax
	movq	(%rax), %rdx
	movq	-120(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	maxx
	movq	%rax, %rdx
	movq	-120(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-72(%rbp), %rsi
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	maxx
	movq	%rax, -64(%rbp)
	movq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-168(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
