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(void)
{
    long long N,M,i,k,l,m,x,y,z,max,n = 0;
    long long a[1000];
    long long b[1000];
    long long c[1000];
    long long d[1000];
    long long e[1000];
    long long f[1000];
    long long g[1000];
    long long h[1000];
    


    scanf("%d %d",&N,&M);
    for(i = 0;i < N;i++){
    	scanf("%lld %lld %lld",&x,&y,&z);
        a[i] = x + y + z;
        b[i] = x + y - z;
        c[i] = x - y + z;
        d[i] = x - y - z;
        e[i] = -x + y + z;
        f[i] = -x + y - z;
        g[i] = -x - y + z;
        h[i] = -x - y - z;
        x = y = z = 0;
    }

    for(k = 0;k < N;k++){
        for(l = k;l < N;l++){
            if(a[l] > a[k]){
                m = a[l];
                a[l] = a[k];
                a[k] = m;
            }
            if(b[l] > b[k]){
                m = b[l];
                b[l] = b[k];
                b[k] = m;
            }
            if(c[l] > c[k]){
                m = c[l];
                c[l] = c[k];
                c[k] = m;
            }
            if(d[l] > d[k]){
                m = d[l];
                d[l] = d[k];
                d[k] = m;
            }
            if(e[l] > e[k]){
                m = e[l];
                e[l] = e[k];
                e[k] = m;
            }
            if(f[l] > f[k]){
                m = f[l];
                f[l] = f[k];
                f[k] = m;
            }
            if(g[l] > g[k]){
                m = g[l];
                g[l] = g[k];
                g[k] = m;
            }
            if(h[l] > h[k]){
                m = h[l];
                h[l] = h[k];
                h[k] = m;
            }
        }
    }
    for(m = 0;m < M;m++){
        n = n + a[m];
    }
    max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + b[m];
    }
    if(n > max)
        max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + c[m];
    }
    if(n > max)
        max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + d[m];
    }
    if(n > max)
        max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + e[m];
    }
    if(n > max)
        max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + f[m];
    }
    if(n > max)
        max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + g[m];
    }
    if(n > max)
        max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + h[m];
    }
    if(n > max)
        max = n;

    printf("%lld",max);

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%lld %lld %lld"
.LC2:
	.string	"%lld"
	.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
	leaq	-61440(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2672, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -64024(%rbp)
	leaq	-64096(%rbp), %rdx
	leaq	-64104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -64064(%rbp)
	jmp	.L2
.L3:
	leaq	-64072(%rbp), %rcx
	leaq	-64080(%rbp), %rdx
	leaq	-64088(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64088(%rbp), %rdx
	movq	-64080(%rbp), %rax
	addq	%rax, %rdx
	movq	-64072(%rbp), %rax
	addq	%rax, %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -64016(%rbp,%rax,8)
	movq	-64088(%rbp), %rdx
	movq	-64080(%rbp), %rax
	addq	%rdx, %rax
	movq	-64072(%rbp), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -56016(%rbp,%rax,8)
	movq	-64088(%rbp), %rax
	movq	-64080(%rbp), %rdx
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-64072(%rbp), %rax
	leaq	(%rcx,%rax), %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -48016(%rbp,%rax,8)
	movq	-64088(%rbp), %rax
	movq	-64080(%rbp), %rdx
	subq	%rdx, %rax
	movq	-64072(%rbp), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -40016(%rbp,%rax,8)
	movq	-64080(%rbp), %rax
	movq	-64088(%rbp), %rdx
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-64072(%rbp), %rax
	leaq	(%rcx,%rax), %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -32016(%rbp,%rax,8)
	movq	-64080(%rbp), %rax
	movq	-64088(%rbp), %rdx
	subq	%rdx, %rax
	movq	-64072(%rbp), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -24016(%rbp,%rax,8)
	movq	-64088(%rbp), %rax
	negq	%rax
	movq	-64080(%rbp), %rdx
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-64072(%rbp), %rax
	leaq	(%rcx,%rax), %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -16016(%rbp,%rax,8)
	movq	-64088(%rbp), %rax
	negq	%rax
	movq	-64080(%rbp), %rdx
	subq	%rdx, %rax
	movq	-64072(%rbp), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -8016(%rbp,%rax,8)
	movq	$0, -64072(%rbp)
	movq	-64072(%rbp), %rax
	movq	%rax, -64080(%rbp)
	movq	-64080(%rbp), %rax
	movq	%rax, -64088(%rbp)
	addq	$1, -64064(%rbp)
.L2:
	movq	-64104(%rbp), %rax
	cmpq	%rax, -64064(%rbp)
	jl	.L3
	movq	$0, -64056(%rbp)
	jmp	.L4
.L15:
	movq	-64056(%rbp), %rax
	movq	%rax, -64048(%rbp)
	jmp	.L5
.L14:
	movq	-64048(%rbp), %rax
	movq	-64016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-64016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L6
	movq	-64048(%rbp), %rax
	movq	-64016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-64016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -64016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -64016(%rbp,%rax,8)
.L6:
	movq	-64048(%rbp), %rax
	movq	-56016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-56016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L7
	movq	-64048(%rbp), %rax
	movq	-56016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-56016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -56016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -56016(%rbp,%rax,8)
.L7:
	movq	-64048(%rbp), %rax
	movq	-48016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-48016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L8
	movq	-64048(%rbp), %rax
	movq	-48016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-48016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -48016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -48016(%rbp,%rax,8)
.L8:
	movq	-64048(%rbp), %rax
	movq	-40016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-40016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L9
	movq	-64048(%rbp), %rax
	movq	-40016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-40016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -40016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -40016(%rbp,%rax,8)
.L9:
	movq	-64048(%rbp), %rax
	movq	-32016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-32016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L10
	movq	-64048(%rbp), %rax
	movq	-32016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-32016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -32016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -32016(%rbp,%rax,8)
.L10:
	movq	-64048(%rbp), %rax
	movq	-24016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-24016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L11
	movq	-64048(%rbp), %rax
	movq	-24016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-24016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -24016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -24016(%rbp,%rax,8)
.L11:
	movq	-64048(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L12
	movq	-64048(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -16016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -16016(%rbp,%rax,8)
.L12:
	movq	-64048(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L13
	movq	-64048(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -8016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -8016(%rbp,%rax,8)
.L13:
	addq	$1, -64048(%rbp)
.L5:
	movq	-64104(%rbp), %rax
	cmpq	%rax, -64048(%rbp)
	jl	.L14
	addq	$1, -64056(%rbp)
.L4:
	movq	-64104(%rbp), %rax
	cmpq	%rax, -64056(%rbp)
	jl	.L15
	movq	$0, -64040(%rbp)
	jmp	.L16
.L17:
	movq	-64040(%rbp), %rax
	movq	-64016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L16:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L17
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L18
.L19:
	movq	-64040(%rbp), %rax
	movq	-56016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L18:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L19
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L20
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L20:
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L21
.L22:
	movq	-64040(%rbp), %rax
	movq	-48016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L21:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L22
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L23
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L23:
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L24
.L25:
	movq	-64040(%rbp), %rax
	movq	-40016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L24:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L25
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L26
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L26:
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L27
.L28:
	movq	-64040(%rbp), %rax
	movq	-32016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L27:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L28
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L29
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L29:
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L30
.L31:
	movq	-64040(%rbp), %rax
	movq	-24016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L30:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L31
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L32
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L32:
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L33
.L34:
	movq	-64040(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L33:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L34
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L35
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L35:
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L36
.L37:
	movq	-64040(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L36:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L37
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L38
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L38:
	movq	-64032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L40
	call	__stack_chk_fail@PLT
.L40:
	leave
	.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 %d"
.LC1:
	.string	"%lld %lld %lld"
.LC2:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-61440(%rsp), %r11
	.cfi_def_cfa 11, 61496
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2696, %rsp
	.cfi_def_cfa_offset 64192
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 64120(%rsp)
	xorl	%eax, %eax
	leaq	80(%rsp), %rdx
	leaq	72(%rsp), %rsi
	call	__isoc99_scanf@PLT
	cmpq	$0, 72(%rsp)
	jle	.L5
	leaq	112(%rsp), %rbx
	xorl	%r14d, %r14d
	leaq	96(%rsp), %rax
	movq	%rbx, 32(%rsp)
	leaq	88(%rsp), %rsi
	leaq	104(%rsp), %r15
	leaq	8112(%rsp), %rbx
	leaq	40112(%rsp), %rbp
	movq	%rbx, 24(%rsp)
	leaq	16112(%rsp), %rbx
	leaq	48112(%rsp), %r12
	movq	%rbx, 16(%rsp)
	leaq	24112(%rsp), %rbx
	leaq	56112(%rsp), %r13
	movq	%rbx, 8(%rsp)
	leaq	32112(%rsp), %rbx
	movq	%rbp, (%rsp)
	movq	%rsi, %rbp
	movq	%rbx, 48(%rsp)
	movq	%r14, %rbx
	movq	%rax, %r14
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	96(%rsp), %rcx
	movq	88(%rsp), %rax
	movq	$0, 96(%rsp)
	movq	104(%rsp), %rdx
	movq	32(%rsp), %r8
	movq	$0, 104(%rsp)
	leaq	(%rax,%rcx), %rsi
	movq	16(%rsp), %r9
	movq	48(%rsp), %r10
	movq	$0, 88(%rsp)
	leaq	(%rsi,%rdx), %rdi
	subq	%rdx, %rsi
	movq	%rdi, (%r8,%rbx,8)
	movq	24(%rsp), %rdi
	movq	%rsi, (%rdi,%rbx,8)
	movq	%rax, %rsi
	subq	%rcx, %rsi
	leaq	(%rdx,%rsi), %rdi
	subq	%rdx, %rsi
	movq	%rdi, (%r9,%rbx,8)
	movq	8(%rsp), %rdi
	movq	%rsi, (%rdi,%rbx,8)
	movq	%rcx, %rsi
	subq	%rax, %rsi
	negq	%rax
	leaq	(%rdx,%rsi), %rdi
	subq	%rcx, %rax
	subq	%rdx, %rsi
	movq	%rdi, (%r10,%rbx,8)
	leaq	(%rdx,%rax), %rcx
	movq	(%rsp), %rdi
	subq	%rdx, %rax
	movq	%rax, 0(%r13,%rbx,8)
	movq	72(%rsp), %rax
	movq	%rsi, (%rdi,%rbx,8)
	movq	%rcx, (%r12,%rbx,8)
	addq	$1, %rbx
	cmpq	%rbx, %rax
	jg	.L2
	movq	%rax, 40(%rsp)
	movq	%rdi, %rbp
	movq	%r10, %rbx
	testq	%rax, %rax
	jle	.L5
	movq	%r13, 48(%rsp)
	movq	%r8, %rdi
	movq	%r10, %r11
	movq	24(%rsp), %r8
	movq	$0, 56(%rsp)
	movq	8(%rsp), %r10
	movq	%r12, %r15
	movq	%rbp, %r14
	.p2align 4,,10
	.p2align 3
.L15:
	movq	48(%rsp), %rax
	movq	%rdi, (%rsp)
	movq	(%rax), %rsi
	movq	56(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L14:
	movq	32(%rsp), %rdi
	movq	(%rsp), %rcx
	movq	(%rdi,%rax,8), %rdx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rdx
	jle	.L6
	movq	%rcx, (%rdi,%rax,8)
	movq	(%rsp), %rdi
	movq	%rdx, (%rdi)
.L6:
	movq	24(%rsp), %rdi
	movq	(%r8), %rcx
	movq	(%rdi,%rax,8), %rdx
	cmpq	%rcx, %rdx
	jle	.L7
	movq	%rcx, (%rdi,%rax,8)
	movq	%rdx, (%r8)
.L7:
	movq	16(%rsp), %rdi
	movq	(%r9), %rcx
	movq	(%rdi,%rax,8), %rdx
	cmpq	%rcx, %rdx
	jle	.L8
	movq	%rcx, (%rdi,%rax,8)
	movq	%rdx, (%r9)
.L8:
	movq	8(%rsp), %rdi
	movq	(%r10), %rcx
	movq	(%rdi,%rax,8), %rdx
	cmpq	%rcx, %rdx
	jle	.L9
	movq	%rcx, (%rdi,%rax,8)
	movq	%rdx, (%r10)
.L9:
	movq	(%rbx,%rax,8), %rdx
	movq	(%r11), %rcx
	cmpq	%rcx, %rdx
	jle	.L10
	movq	%rcx, (%rbx,%rax,8)
	movq	%rdx, (%r11)
.L10:
	movq	0(%rbp,%rax,8), %rdx
	movq	(%r14), %rcx
	cmpq	%rcx, %rdx
	jle	.L11
	movq	%rcx, 0(%rbp,%rax,8)
	movq	%rdx, (%r14)
.L11:
	movq	(%r12,%rax,8), %rdx
	movq	(%r15), %rcx
	cmpq	%rcx, %rdx
	jle	.L12
	movq	%rcx, (%r12,%rax,8)
	movq	%rdx, (%r15)
.L12:
	movq	0(%r13,%rax,8), %rdx
	cmpq	%rsi, %rdx
	jle	.L13
	movq	%rsi, 0(%r13,%rax,8)
	movq	48(%rsp), %rsi
	movq	%rdx, (%rsi)
	movq	%rdx, %rsi
.L13:
	addq	$1, %rax
	cmpq	%rax, 40(%rsp)
	jg	.L14
	movq	(%rsp), %rdi
	addq	$8, %r15
	addq	$8, %r14
	addq	$8, %r11
	addq	$1, 56(%rsp)
	addq	$8, %r10
	addq	$8, %r9
	addq	$8, %r8
	addq	$8, 48(%rsp)
	movq	56(%rsp), %rax
	addq	$8, %rdi
	cmpq	%rax, 40(%rsp)
	jne	.L15
.L5:
	movq	80(%rsp), %rdx
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	testq	%rdx, %rdx
	jle	.L4
	cmpq	$1, %rdx
	je	.L54
	movq	%rdx, %rcx
	leaq	112(%rsp), %rax
	pxor	%xmm0, %xmm0
	shrq	%rcx
	salq	$4, %rcx
	addq	%rax, %rcx
	.p2align 4,,10
	.p2align 3
.L17:
	paddq	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rax, %rcx
	jne	.L17
	movdqa	%xmm0, %xmm1
	movq	%rdx, %rcx
	psrldq	$8, %xmm1
	andq	$-2, %rcx
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rax
	testb	$1, %dl
	je	.L18
.L16:
	addq	112(%rsp,%rcx,8), %rax
	cmpq	$1, %rdx
	je	.L55
.L18:
	movq	%rdx, %rsi
	leaq	8112(%rsp), %rcx
	pxor	%xmm0, %xmm0
	shrq	%rsi
	salq	$4, %rsi
	addq	%rcx, %rsi
	.p2align 4,,10
	.p2align 3
.L20:
	paddq	(%rcx), %xmm0
	addq	$16, %rcx
	cmpq	%rsi, %rcx
	jne	.L20
	movdqa	%xmm0, %xmm1
	movq	%rdx, %rsi
	psrldq	$8, %xmm1
	andq	$-2, %rsi
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rcx
	cmpq	%rdx, %rsi
	je	.L82
.L19:
	addq	8112(%rsp,%rsi,8), %rcx
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	cmpq	$1, %rdx
	je	.L83
.L23:
	leaq	16112(%rsp), %rcx
	pxor	%xmm0, %xmm0
	movq	%rdx, %rsi
	shrq	%rsi
	salq	$4, %rsi
	addq	%rcx, %rsi
	.p2align 4,,10
	.p2align 3
.L27:
	paddq	(%rcx), %xmm0
	addq	$16, %rcx
	cmpq	%rcx, %rsi
	jne	.L27
	movdqa	%xmm0, %xmm1
	movq	%rdx, %rsi
	psrldq	$8, %xmm1
	andq	$-2, %rsi
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rcx
	cmpq	%rdx, %rsi
	je	.L84
.L22:
	addq	16112(%rsp,%rsi,8), %rcx
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	cmpq	$1, %rdx
	je	.L85
.L26:
	leaq	24112(%rsp), %rcx
	pxor	%xmm0, %xmm0
	movq	%rdx, %rsi
	shrq	%rsi
	salq	$4, %rsi
	addq	%rcx, %rsi
	.p2align 4,,10
	.p2align 3
.L32:
	paddq	(%rcx), %xmm0
	addq	$16, %rcx
	cmpq	%rsi, %rcx
	jne	.L32
	movdqa	%xmm0, %xmm1
	movq	%rdx, %rsi
	psrldq	$8, %xmm1
	andq	$-2, %rsi
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rcx
	cmpq	%rdx, %rsi
	je	.L86
.L25:
	addq	24112(%rsp,%rsi,8), %rcx
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	cmpq	$1, %rdx
	je	.L87
.L31:
	leaq	32112(%rsp), %rcx
	pxor	%xmm0, %xmm0
	movq	%rdx, %rsi
	shrq	%rsi
	salq	$4, %rsi
	addq	%rcx, %rsi
	.p2align 4,,10
	.p2align 3
.L37:
	paddq	(%rcx), %xmm0
	addq	$16, %rcx
	cmpq	%rcx, %rsi
	jne	.L37
	movdqa	%xmm0, %xmm1
	movq	%rdx, %rsi
	psrldq	$8, %xmm1
	andq	$-2, %rsi
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rcx
	cmpq	%rdx, %rsi
	je	.L88
.L30:
	addq	32112(%rsp,%rsi,8), %rcx
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	cmpq	$1, %rdx
	je	.L89
.L36:
	leaq	40112(%rsp), %rcx
	pxor	%xmm0, %xmm0
	movq	%rdx, %rsi
	shrq	%rsi
	salq	$4, %rsi
	addq	%rcx, %rsi
	.p2align 4,,10
	.p2align 3
.L42:
	paddq	(%rcx), %xmm0
	addq	$16, %rcx
	cmpq	%rsi, %rcx
	jne	.L42
	movdqa	%xmm0, %xmm1
	movq	%rdx, %rsi
	psrldq	$8, %xmm1
	andq	$-2, %rsi
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rcx
	cmpq	%rdx, %rsi
	je	.L90
.L35:
	addq	40112(%rsp,%rsi,8), %rcx
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	cmpq	$1, %rdx
	je	.L91
.L41:
	leaq	48112(%rsp), %rcx
	pxor	%xmm0, %xmm0
	movq	%rdx, %rsi
	shrq	%rsi
	salq	$4, %rsi
	addq	%rcx, %rsi
	.p2align 4,,10
	.p2align 3
.L47:
	paddq	(%rcx), %xmm0
	addq	$16, %rcx
	cmpq	%rcx, %rsi
	jne	.L47
	movdqa	%xmm0, %xmm1
	movq	%rdx, %rsi
	psrldq	$8, %xmm1
	andq	$-2, %rsi
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rcx
	cmpq	%rdx, %rsi
	je	.L92
.L40:
	addq	48112(%rsp,%rsi,8), %rcx
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	cmpq	$1, %rdx
	je	.L93
.L46:
	leaq	56112(%rsp), %rcx
	pxor	%xmm0, %xmm0
	movq	%rdx, %rsi
	shrq	%rsi
	salq	$4, %rsi
	addq	%rcx, %rsi
	.p2align 4,,10
	.p2align 3
.L50:
	paddq	(%rcx), %xmm0
	addq	$16, %rcx
	cmpq	%rsi, %rcx
	jne	.L50
	movdqa	%xmm0, %xmm1
	movq	%rdx, %rsi
	psrldq	$8, %xmm1
	andq	$-2, %rsi
	andl	$1, %edx
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rcx
	je	.L4
.L45:
	addq	56112(%rsp,%rsi,8), %rcx
.L4:
	cmpq	%rax, %rcx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	cmovge	%rcx, %rax
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	64120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L94
	addq	$64136, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L55:
	.cfi_restore_state
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L85:
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L83:
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L93:
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L91:
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L89:
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L87:
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	.L30
.L82:
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	jmp	.L23
.L92:
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	jmp	.L46
.L90:
	cmpq	%rcx, %rax
	cmovl	%rcx, %rax
	jmp	.L41
.L88:
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	jmp	.L36
.L86:
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	jmp	.L31
.L84:
	cmpq	%rcx, %rax
	cmovl	%rcx, %rax
	jmp	.L26
.L54:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L16
.L94:
	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 %d"
.LC1:
	.string	"%lld %lld %lld"
.LC2:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-61440(%rsp), %r11
	.cfi_def_cfa 11, 61496
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2696, %rsp
	.cfi_def_cfa_offset 64192
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 64120(%rsp)
	xorl	%eax, %eax
	leaq	80(%rsp), %rdx
	leaq	72(%rsp), %rsi
	call	__isoc99_scanf@PLT
	cmpq	$0, 72(%rsp)
	jle	.L5
	leaq	112(%rsp), %rbx
	xorl	%r14d, %r14d
	leaq	96(%rsp), %rax
	movq	%rbx, 32(%rsp)
	leaq	88(%rsp), %rsi
	leaq	104(%rsp), %r15
	leaq	8112(%rsp), %rbx
	leaq	40112(%rsp), %rbp
	movq	%rbx, 24(%rsp)
	leaq	16112(%rsp), %rbx
	leaq	48112(%rsp), %r12
	movq	%rbx, 16(%rsp)
	leaq	24112(%rsp), %rbx
	leaq	56112(%rsp), %r13
	movq	%rbx, 8(%rsp)
	leaq	32112(%rsp), %rbx
	movq	%rbp, (%rsp)
	movq	%rsi, %rbp
	movq	%rbx, 48(%rsp)
	movq	%r14, %rbx
	movq	%rax, %r14
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	96(%rsp), %rcx
	movq	88(%rsp), %rax
	movq	$0, 96(%rsp)
	movq	104(%rsp), %rdx
	movq	32(%rsp), %r8
	movq	$0, 104(%rsp)
	leaq	(%rax,%rcx), %rsi
	movq	16(%rsp), %r9
	movq	48(%rsp), %r10
	movq	$0, 88(%rsp)
	leaq	(%rsi,%rdx), %rdi
	subq	%rdx, %rsi
	movq	%rdi, (%r8,%rbx,8)
	movq	24(%rsp), %rdi
	movq	%rsi, (%rdi,%rbx,8)
	movq	%rax, %rsi
	subq	%rcx, %rsi
	leaq	(%rdx,%rsi), %rdi
	subq	%rdx, %rsi
	movq	%rdi, (%r9,%rbx,8)
	movq	8(%rsp), %rdi
	movq	%rsi, (%rdi,%rbx,8)
	movq	%rcx, %rsi
	subq	%rax, %rsi
	negq	%rax
	leaq	(%rdx,%rsi), %rdi
	subq	%rcx, %rax
	subq	%rdx, %rsi
	movq	%rdi, (%r10,%rbx,8)
	leaq	(%rdx,%rax), %rcx
	movq	(%rsp), %rdi
	subq	%rdx, %rax
	movq	%rax, 0(%r13,%rbx,8)
	movq	72(%rsp), %rax
	movq	%rsi, (%rdi,%rbx,8)
	movq	%rcx, (%r12,%rbx,8)
	addq	$1, %rbx
	cmpq	%rbx, %rax
	jg	.L2
	movq	%rax, 40(%rsp)
	movq	%rdi, %rbp
	movq	%r10, %rbx
	testq	%rax, %rax
	jle	.L5
	movq	%r13, 48(%rsp)
	movq	%r8, %rdi
	movq	%r10, %r11
	movq	24(%rsp), %r8
	movq	$0, 56(%rsp)
	movq	8(%rsp), %r10
	movq	%r12, %r15
	movq	%rbp, %r14
	.p2align 4,,10
	.p2align 3
.L15:
	movq	48(%rsp), %rax
	movq	%rdi, (%rsp)
	movq	(%rax), %rsi
	movq	56(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L14:
	movq	32(%rsp), %rdi
	movq	(%rsp), %rcx
	movq	(%rdi,%rax,8), %rdx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rdx
	jle	.L6
	movq	%rcx, (%rdi,%rax,8)
	movq	(%rsp), %rdi
	movq	%rdx, (%rdi)
.L6:
	movq	24(%rsp), %rdi
	movq	(%r8), %rcx
	movq	(%rdi,%rax,8), %rdx
	cmpq	%rcx, %rdx
	jle	.L7
	movq	%rcx, (%rdi,%rax,8)
	movq	%rdx, (%r8)
.L7:
	movq	16(%rsp), %rdi
	movq	(%r9), %rcx
	movq	(%rdi,%rax,8), %rdx
	cmpq	%rcx, %rdx
	jle	.L8
	movq	%rcx, (%rdi,%rax,8)
	movq	%rdx, (%r9)
.L8:
	movq	8(%rsp), %rdi
	movq	(%r10), %rcx
	movq	(%rdi,%rax,8), %rdx
	cmpq	%rcx, %rdx
	jle	.L9
	movq	%rcx, (%rdi,%rax,8)
	movq	%rdx, (%r10)
.L9:
	movq	(%rbx,%rax,8), %rdx
	movq	(%r11), %rcx
	cmpq	%rcx, %rdx
	jle	.L10
	movq	%rcx, (%rbx,%rax,8)
	movq	%rdx, (%r11)
.L10:
	movq	0(%rbp,%rax,8), %rdx
	movq	(%r14), %rcx
	cmpq	%rcx, %rdx
	jle	.L11
	movq	%rcx, 0(%rbp,%rax,8)
	movq	%rdx, (%r14)
.L11:
	movq	(%r12,%rax,8), %rdx
	movq	(%r15), %rcx
	cmpq	%rcx, %rdx
	jle	.L12
	movq	%rcx, (%r12,%rax,8)
	movq	%rdx, (%r15)
.L12:
	movq	0(%r13,%rax,8), %rdx
	cmpq	%rsi, %rdx
	jle	.L13
	movq	%rsi, 0(%r13,%rax,8)
	movq	48(%rsp), %rsi
	movq	%rdx, (%rsi)
	movq	%rdx, %rsi
.L13:
	addq	$1, %rax
	cmpq	%rax, 40(%rsp)
	jg	.L14
	movq	(%rsp), %rdi
	addq	$8, %r15
	addq	$8, %r14
	addq	$8, %r11
	addq	$1, 56(%rsp)
	addq	$8, %r10
	addq	$8, %r9
	addq	$8, %r8
	addq	$8, 48(%rsp)
	movq	56(%rsp), %rax
	addq	$8, %rdi
	cmpq	%rax, 40(%rsp)
	jne	.L15
.L5:
	movq	80(%rsp), %rdx
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	testq	%rdx, %rdx
	jle	.L4
	cmpq	$1, %rdx
	je	.L54
	movq	%rdx, %rcx
	leaq	112(%rsp), %rax
	pxor	%xmm0, %xmm0
	shrq	%rcx
	salq	$4, %rcx
	addq	%rax, %rcx
	.p2align 4,,10
	.p2align 3
.L17:
	paddq	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rax, %rcx
	jne	.L17
	movdqa	%xmm0, %xmm1
	movq	%rdx, %rcx
	psrldq	$8, %xmm1
	andq	$-2, %rcx
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rax
	testb	$1, %dl
	je	.L18
.L16:
	addq	112(%rsp,%rcx,8), %rax
	cmpq	$1, %rdx
	je	.L55
.L18:
	movq	%rdx, %rsi
	leaq	8112(%rsp), %rcx
	pxor	%xmm0, %xmm0
	shrq	%rsi
	salq	$4, %rsi
	addq	%rcx, %rsi
	.p2align 4,,10
	.p2align 3
.L20:
	paddq	(%rcx), %xmm0
	addq	$16, %rcx
	cmpq	%rsi, %rcx
	jne	.L20
	movdqa	%xmm0, %xmm1
	movq	%rdx, %rsi
	psrldq	$8, %xmm1
	andq	$-2, %rsi
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rcx
	cmpq	%rdx, %rsi
	je	.L82
.L19:
	addq	8112(%rsp,%rsi,8), %rcx
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	cmpq	$1, %rdx
	je	.L83
.L23:
	leaq	16112(%rsp), %rcx
	pxor	%xmm0, %xmm0
	movq	%rdx, %rsi
	shrq	%rsi
	salq	$4, %rsi
	addq	%rcx, %rsi
	.p2align 4,,10
	.p2align 3
.L27:
	paddq	(%rcx), %xmm0
	addq	$16, %rcx
	cmpq	%rcx, %rsi
	jne	.L27
	movdqa	%xmm0, %xmm1
	movq	%rdx, %rsi
	psrldq	$8, %xmm1
	andq	$-2, %rsi
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rcx
	cmpq	%rdx, %rsi
	je	.L84
.L22:
	addq	16112(%rsp,%rsi,8), %rcx
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	cmpq	$1, %rdx
	je	.L85
.L26:
	leaq	24112(%rsp), %rcx
	pxor	%xmm0, %xmm0
	movq	%rdx, %rsi
	shrq	%rsi
	salq	$4, %rsi
	addq	%rcx, %rsi
	.p2align 4,,10
	.p2align 3
.L32:
	paddq	(%rcx), %xmm0
	addq	$16, %rcx
	cmpq	%rsi, %rcx
	jne	.L32
	movdqa	%xmm0, %xmm1
	movq	%rdx, %rsi
	psrldq	$8, %xmm1
	andq	$-2, %rsi
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rcx
	cmpq	%rdx, %rsi
	je	.L86
.L25:
	addq	24112(%rsp,%rsi,8), %rcx
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	cmpq	$1, %rdx
	je	.L87
.L31:
	leaq	32112(%rsp), %rcx
	pxor	%xmm0, %xmm0
	movq	%rdx, %rsi
	shrq	%rsi
	salq	$4, %rsi
	addq	%rcx, %rsi
	.p2align 4,,10
	.p2align 3
.L37:
	paddq	(%rcx), %xmm0
	addq	$16, %rcx
	cmpq	%rcx, %rsi
	jne	.L37
	movdqa	%xmm0, %xmm1
	movq	%rdx, %rsi
	psrldq	$8, %xmm1
	andq	$-2, %rsi
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rcx
	cmpq	%rdx, %rsi
	je	.L88
.L30:
	addq	32112(%rsp,%rsi,8), %rcx
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	cmpq	$1, %rdx
	je	.L89
.L36:
	leaq	40112(%rsp), %rcx
	pxor	%xmm0, %xmm0
	movq	%rdx, %rsi
	shrq	%rsi
	salq	$4, %rsi
	addq	%rcx, %rsi
	.p2align 4,,10
	.p2align 3
.L42:
	paddq	(%rcx), %xmm0
	addq	$16, %rcx
	cmpq	%rsi, %rcx
	jne	.L42
	movdqa	%xmm0, %xmm1
	movq	%rdx, %rsi
	psrldq	$8, %xmm1
	andq	$-2, %rsi
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rcx
	cmpq	%rdx, %rsi
	je	.L90
.L35:
	addq	40112(%rsp,%rsi,8), %rcx
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	cmpq	$1, %rdx
	je	.L91
.L41:
	leaq	48112(%rsp), %rcx
	pxor	%xmm0, %xmm0
	movq	%rdx, %rsi
	shrq	%rsi
	salq	$4, %rsi
	addq	%rcx, %rsi
	.p2align 4,,10
	.p2align 3
.L47:
	paddq	(%rcx), %xmm0
	addq	$16, %rcx
	cmpq	%rcx, %rsi
	jne	.L47
	movdqa	%xmm0, %xmm1
	movq	%rdx, %rsi
	psrldq	$8, %xmm1
	andq	$-2, %rsi
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rcx
	cmpq	%rdx, %rsi
	je	.L92
.L40:
	addq	48112(%rsp,%rsi,8), %rcx
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	cmpq	$1, %rdx
	je	.L93
.L46:
	leaq	56112(%rsp), %rcx
	pxor	%xmm0, %xmm0
	movq	%rdx, %rsi
	shrq	%rsi
	salq	$4, %rsi
	addq	%rcx, %rsi
	.p2align 4,,10
	.p2align 3
.L50:
	paddq	(%rcx), %xmm0
	addq	$16, %rcx
	cmpq	%rsi, %rcx
	jne	.L50
	movdqa	%xmm0, %xmm1
	movq	%rdx, %rsi
	psrldq	$8, %xmm1
	andq	$-2, %rsi
	andl	$1, %edx
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rcx
	je	.L4
.L45:
	addq	56112(%rsp,%rsi,8), %rcx
.L4:
	cmpq	%rax, %rcx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	cmovge	%rcx, %rax
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	64120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L94
	addq	$64136, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L55:
	.cfi_restore_state
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L85:
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L83:
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L93:
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L91:
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L89:
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L87:
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	.L30
.L82:
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	jmp	.L23
.L92:
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	jmp	.L46
.L90:
	cmpq	%rcx, %rax
	cmovl	%rcx, %rax
	jmp	.L41
.L88:
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	jmp	.L36
.L86:
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	jmp	.L31
.L84:
	cmpq	%rcx, %rax
	cmovl	%rcx, %rax
	jmp	.L26
.L54:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L16
.L94:
	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(void)
{
    long long N,M,i,k,l,m,x,y,z,max,n = 0;
    long long a[1000];
    long long b[1000];
    long long c[1000];
    long long d[1000];
    long long e[1000];
    long long f[1000];
    long long g[1000];
    long long h[1000];
    


    scanf("%d %d",&N,&M);
    for(i = 0;i < N;i++){
    	scanf("%lld %lld %lld",&x,&y,&z);
        a[i] = x + y + z;
        b[i] = x + y - z;
        c[i] = x - y + z;
        d[i] = x - y - z;
        e[i] = -x + y + z;
        f[i] = -x + y - z;
        g[i] = -x - y + z;
        h[i] = -x - y - z;
        x = y = z = 0;
    }

    for(k = 0;k < N;k++){
        for(l = k;l < N;l++){
            if(a[l] > a[k]){
                m = a[l];
                a[l] = a[k];
                a[k] = m;
            }
            if(b[l] > b[k]){
                m = b[l];
                b[l] = b[k];
                b[k] = m;
            }
            if(c[l] > c[k]){
                m = c[l];
                c[l] = c[k];
                c[k] = m;
            }
            if(d[l] > d[k]){
                m = d[l];
                d[l] = d[k];
                d[k] = m;
            }
            if(e[l] > e[k]){
                m = e[l];
                e[l] = e[k];
                e[k] = m;
            }
            if(f[l] > f[k]){
                m = f[l];
                f[l] = f[k];
                f[k] = m;
            }
            if(g[l] > g[k]){
                m = g[l];
                g[l] = g[k];
                g[k] = m;
            }
            if(h[l] > h[k]){
                m = h[l];
                h[l] = h[k];
                h[k] = m;
            }
        }
    }
    for(m = 0;m < M;m++){
        n = n + a[m];
    }
    max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + b[m];
    }
    if(n > max)
        max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + c[m];
    }
    if(n > max)
        max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + d[m];
    }
    if(n > max)
        max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + e[m];
    }
    if(n > max)
        max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + f[m];
    }
    if(n > max)
        max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + g[m];
    }
    if(n > max)
        max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + h[m];
    }
    if(n > max)
        max = n;

    printf("%lld",max);

    return 0;
}
5 3
1 -2 3
-4 5 -6
7 -8 -9
-10 19 -12
13 -14 15
 10 5
10 -80 21
23 8 38
-94 28 11
-26 -2 18
-69 72 79
-26 -86 -54
-72 -50 48
21 65 -32
40 -94 87
-62 18 82
 5 3
1 -2 3
-4 5 -6
7 -8 -16
-10 19 -12
13 -14 15
 5 5
1 -2 3
-4 5 -6
7 -8 -16
-10 19 -12
13 -14 15
 10 5
10 -80 21
23 8 10
-94 28 11
-26 -2 18
-69 72 79
-26 -86 -54
-89 -50 48
21 65 -32
40 -94 87
-62 18 82
 5 3
3 0 4
1 5 18
2 6 5
3 5 8
7 7 9
 5 5
1 -2 3
-4 5 -6
7 -8 -16
-10 19 -12
13 -3 15
 10 5
10 -80 21
23 8 10
-94 28 11
-26 -2 18
-69 72 79
-26 -86 -54
-89 -8 48
21 65 -32
40 -94 87
-62 18 82
 5 3
3 0 4
1 5 18
2 6 5
3 5 4
7 7 9
 5 5
1 -2 4
-4 5 -6
7 -8 -16
-10 19 -12
13 -3 15

54 627 57 23 644 63 34 686 60 33
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(void)
{
    long long N,M,i,k,l,m,x,y,z,max,n = 0;
    long long a[1000];
    long long b[1000];
    long long c[1000];
    long long d[1000];
    long long e[1000];
    long long f[1000];
    long long g[1000];
    long long h[1000];
    


    scanf("%d %d",&N,&M);
    for(i = 0;i < N;i++){
    	scanf("%lld %lld %lld",&x,&y,&z);
        a[i] = x + y + z;
        b[i] = x + y - z;
        c[i] = x - y + z;
        d[i] = x - y - z;
        e[i] = -x + y + z;
        f[i] = -x + y - z;
        g[i] = -x - y + z;
        h[i] = -x - y - z;
        x = y = z = 0;
    }

    for(k = 0;k < N;k++){
        for(l = k;l < N;l++){
            if(a[l] > a[k]){
                m = a[l];
                a[l] = a[k];
                a[k] = m;
            }
            if(b[l] > b[k]){
                m = b[l];
                b[l] = b[k];
                b[k] = m;
            }
            if(c[l] > c[k]){
                m = c[l];
                c[l] = c[k];
                c[k] = m;
            }
            if(d[l] > d[k]){
                m = d[l];
                d[l] = d[k];
                d[k] = m;
            }
            if(e[l] > e[k]){
                m = e[l];
                e[l] = e[k];
                e[k] = m;
            }
            if(f[l] > f[k]){
                m = f[l];
                f[l] = f[k];
                f[k] = m;
            }
            if(g[l] > g[k]){
                m = g[l];
                g[l] = g[k];
                g[k] = m;
            }
            if(h[l] > h[k]){
                m = h[l];
                h[l] = h[k];
                h[k] = m;
            }
        }
    }
    for(m = 0;m < M;m++){
        n = n + a[m];
    }
    max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + b[m];
    }
    if(n > max)
        max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + c[m];
    }
    if(n > max)
        max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + d[m];
    }
    if(n > max)
        max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + e[m];
    }
    if(n > max)
        max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + f[m];
    }
    if(n > max)
        max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + g[m];
    }
    if(n > max)
        max = n;
    n = 0;
    for(m = 0;m < M;m++){
        n = n + h[m];
    }
    if(n > max)
        max = n;

    printf("%lld",max);

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%lld %lld %lld"
.LC2:
	.string	"%lld"
	.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
	leaq	-61440(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2672, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -64024(%rbp)
	leaq	-64096(%rbp), %rdx
	leaq	-64104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -64064(%rbp)
	jmp	.L2
.L3:
	leaq	-64072(%rbp), %rcx
	leaq	-64080(%rbp), %rdx
	leaq	-64088(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64088(%rbp), %rdx
	movq	-64080(%rbp), %rax
	addq	%rax, %rdx
	movq	-64072(%rbp), %rax
	addq	%rax, %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -64016(%rbp,%rax,8)
	movq	-64088(%rbp), %rdx
	movq	-64080(%rbp), %rax
	addq	%rdx, %rax
	movq	-64072(%rbp), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -56016(%rbp,%rax,8)
	movq	-64088(%rbp), %rax
	movq	-64080(%rbp), %rdx
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-64072(%rbp), %rax
	leaq	(%rcx,%rax), %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -48016(%rbp,%rax,8)
	movq	-64088(%rbp), %rax
	movq	-64080(%rbp), %rdx
	subq	%rdx, %rax
	movq	-64072(%rbp), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -40016(%rbp,%rax,8)
	movq	-64080(%rbp), %rax
	movq	-64088(%rbp), %rdx
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-64072(%rbp), %rax
	leaq	(%rcx,%rax), %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -32016(%rbp,%rax,8)
	movq	-64080(%rbp), %rax
	movq	-64088(%rbp), %rdx
	subq	%rdx, %rax
	movq	-64072(%rbp), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -24016(%rbp,%rax,8)
	movq	-64088(%rbp), %rax
	negq	%rax
	movq	-64080(%rbp), %rdx
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-64072(%rbp), %rax
	leaq	(%rcx,%rax), %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -16016(%rbp,%rax,8)
	movq	-64088(%rbp), %rax
	negq	%rax
	movq	-64080(%rbp), %rdx
	subq	%rdx, %rax
	movq	-64072(%rbp), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -8016(%rbp,%rax,8)
	movq	$0, -64072(%rbp)
	movq	-64072(%rbp), %rax
	movq	%rax, -64080(%rbp)
	movq	-64080(%rbp), %rax
	movq	%rax, -64088(%rbp)
	addq	$1, -64064(%rbp)
.L2:
	movq	-64104(%rbp), %rax
	cmpq	%rax, -64064(%rbp)
	jl	.L3
	movq	$0, -64056(%rbp)
	jmp	.L4
.L15:
	movq	-64056(%rbp), %rax
	movq	%rax, -64048(%rbp)
	jmp	.L5
.L14:
	movq	-64048(%rbp), %rax
	movq	-64016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-64016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L6
	movq	-64048(%rbp), %rax
	movq	-64016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-64016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -64016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -64016(%rbp,%rax,8)
.L6:
	movq	-64048(%rbp), %rax
	movq	-56016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-56016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L7
	movq	-64048(%rbp), %rax
	movq	-56016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-56016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -56016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -56016(%rbp,%rax,8)
.L7:
	movq	-64048(%rbp), %rax
	movq	-48016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-48016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L8
	movq	-64048(%rbp), %rax
	movq	-48016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-48016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -48016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -48016(%rbp,%rax,8)
.L8:
	movq	-64048(%rbp), %rax
	movq	-40016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-40016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L9
	movq	-64048(%rbp), %rax
	movq	-40016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-40016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -40016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -40016(%rbp,%rax,8)
.L9:
	movq	-64048(%rbp), %rax
	movq	-32016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-32016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L10
	movq	-64048(%rbp), %rax
	movq	-32016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-32016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -32016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -32016(%rbp,%rax,8)
.L10:
	movq	-64048(%rbp), %rax
	movq	-24016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-24016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L11
	movq	-64048(%rbp), %rax
	movq	-24016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-24016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -24016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -24016(%rbp,%rax,8)
.L11:
	movq	-64048(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L12
	movq	-64048(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -16016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -16016(%rbp,%rax,8)
.L12:
	movq	-64048(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L13
	movq	-64048(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -8016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -8016(%rbp,%rax,8)
.L13:
	addq	$1, -64048(%rbp)
.L5:
	movq	-64104(%rbp), %rax
	cmpq	%rax, -64048(%rbp)
	jl	.L14
	addq	$1, -64056(%rbp)
.L4:
	movq	-64104(%rbp), %rax
	cmpq	%rax, -64056(%rbp)
	jl	.L15
	movq	$0, -64040(%rbp)
	jmp	.L16
.L17:
	movq	-64040(%rbp), %rax
	movq	-64016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L16:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L17
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L18
.L19:
	movq	-64040(%rbp), %rax
	movq	-56016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L18:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L19
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L20
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L20:
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L21
.L22:
	movq	-64040(%rbp), %rax
	movq	-48016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L21:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L22
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L23
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L23:
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L24
.L25:
	movq	-64040(%rbp), %rax
	movq	-40016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L24:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L25
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L26
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L26:
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L27
.L28:
	movq	-64040(%rbp), %rax
	movq	-32016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L27:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L28
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L29
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L29:
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L30
.L31:
	movq	-64040(%rbp), %rax
	movq	-24016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L30:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L31
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L32
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L32:
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L33
.L34:
	movq	-64040(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L33:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L34
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L35
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L35:
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L36
.L37:
	movq	-64040(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L36:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L37
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L38
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L38:
	movq	-64032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L40
	call	__stack_chk_fail@PLT
.L40:
	leave
	.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 %d"
.LC1:
	.string	"%lld %lld %lld"
.LC2:
	.string	"%lld"
	.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
	leaq	-61440(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2672, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -64024(%rbp)
	leaq	-64096(%rbp), %rdx
	leaq	-64104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -64064(%rbp)
	jmp	.L2
.L3:
	leaq	-64072(%rbp), %rcx
	leaq	-64080(%rbp), %rdx
	leaq	-64088(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64088(%rbp), %rdx
	movq	-64080(%rbp), %rax
	addq	%rax, %rdx
	movq	-64072(%rbp), %rax
	addq	%rax, %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -64016(%rbp,%rax,8)
	movq	-64088(%rbp), %rdx
	movq	-64080(%rbp), %rax
	addq	%rdx, %rax
	movq	-64072(%rbp), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -56016(%rbp,%rax,8)
	movq	-64088(%rbp), %rax
	movq	-64080(%rbp), %rdx
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-64072(%rbp), %rax
	leaq	(%rcx,%rax), %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -48016(%rbp,%rax,8)
	movq	-64088(%rbp), %rax
	movq	-64080(%rbp), %rdx
	subq	%rdx, %rax
	movq	-64072(%rbp), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -40016(%rbp,%rax,8)
	movq	-64080(%rbp), %rax
	movq	-64088(%rbp), %rdx
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-64072(%rbp), %rax
	leaq	(%rcx,%rax), %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -32016(%rbp,%rax,8)
	movq	-64080(%rbp), %rax
	movq	-64088(%rbp), %rdx
	subq	%rdx, %rax
	movq	-64072(%rbp), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -24016(%rbp,%rax,8)
	movq	-64088(%rbp), %rax
	negq	%rax
	movq	-64080(%rbp), %rdx
	subq	%rdx, %rax
	movq	%rax, %rcx
	movq	-64072(%rbp), %rax
	leaq	(%rcx,%rax), %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -16016(%rbp,%rax,8)
	movq	-64088(%rbp), %rax
	negq	%rax
	movq	-64080(%rbp), %rdx
	subq	%rdx, %rax
	movq	-64072(%rbp), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-64064(%rbp), %rax
	movq	%rdx, -8016(%rbp,%rax,8)
	movq	$0, -64072(%rbp)
	movq	-64072(%rbp), %rax
	movq	%rax, -64080(%rbp)
	movq	-64080(%rbp), %rax
	movq	%rax, -64088(%rbp)
	addq	$1, -64064(%rbp)
.L2:
	movq	-64104(%rbp), %rax
	cmpq	%rax, -64064(%rbp)
	jl	.L3
	movq	$0, -64056(%rbp)
	jmp	.L4
.L15:
	movq	-64056(%rbp), %rax
	movq	%rax, -64048(%rbp)
	jmp	.L5
.L14:
	movq	-64048(%rbp), %rax
	movq	-64016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-64016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L6
	movq	-64048(%rbp), %rax
	movq	-64016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-64016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -64016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -64016(%rbp,%rax,8)
.L6:
	movq	-64048(%rbp), %rax
	movq	-56016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-56016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L7
	movq	-64048(%rbp), %rax
	movq	-56016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-56016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -56016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -56016(%rbp,%rax,8)
.L7:
	movq	-64048(%rbp), %rax
	movq	-48016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-48016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L8
	movq	-64048(%rbp), %rax
	movq	-48016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-48016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -48016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -48016(%rbp,%rax,8)
.L8:
	movq	-64048(%rbp), %rax
	movq	-40016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-40016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L9
	movq	-64048(%rbp), %rax
	movq	-40016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-40016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -40016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -40016(%rbp,%rax,8)
.L9:
	movq	-64048(%rbp), %rax
	movq	-32016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-32016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L10
	movq	-64048(%rbp), %rax
	movq	-32016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-32016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -32016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -32016(%rbp,%rax,8)
.L10:
	movq	-64048(%rbp), %rax
	movq	-24016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-24016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L11
	movq	-64048(%rbp), %rax
	movq	-24016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-24016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -24016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -24016(%rbp,%rax,8)
.L11:
	movq	-64048(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L12
	movq	-64048(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -16016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -16016(%rbp,%rax,8)
.L12:
	movq	-64048(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rdx
	movq	-64056(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	jle	.L13
	movq	-64048(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rax
	movq	%rax, -64040(%rbp)
	movq	-64056(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rdx
	movq	-64048(%rbp), %rax
	movq	%rdx, -8016(%rbp,%rax,8)
	movq	-64056(%rbp), %rax
	movq	-64040(%rbp), %rdx
	movq	%rdx, -8016(%rbp,%rax,8)
.L13:
	addq	$1, -64048(%rbp)
.L5:
	movq	-64104(%rbp), %rax
	cmpq	%rax, -64048(%rbp)
	jl	.L14
	addq	$1, -64056(%rbp)
.L4:
	movq	-64104(%rbp), %rax
	cmpq	%rax, -64056(%rbp)
	jl	.L15
	movq	$0, -64040(%rbp)
	jmp	.L16
.L17:
	movq	-64040(%rbp), %rax
	movq	-64016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L16:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L17
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L18
.L19:
	movq	-64040(%rbp), %rax
	movq	-56016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L18:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L19
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L20
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L20:
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L21
.L22:
	movq	-64040(%rbp), %rax
	movq	-48016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L21:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L22
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L23
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L23:
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L24
.L25:
	movq	-64040(%rbp), %rax
	movq	-40016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L24:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L25
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L26
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L26:
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L27
.L28:
	movq	-64040(%rbp), %rax
	movq	-32016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L27:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L28
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L29
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L29:
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L30
.L31:
	movq	-64040(%rbp), %rax
	movq	-24016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L30:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L31
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L32
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L32:
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L33
.L34:
	movq	-64040(%rbp), %rax
	movq	-16016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L33:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L34
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L35
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L35:
	movq	$0, -64024(%rbp)
	movq	$0, -64040(%rbp)
	jmp	.L36
.L37:
	movq	-64040(%rbp), %rax
	movq	-8016(%rbp,%rax,8), %rax
	addq	%rax, -64024(%rbp)
	addq	$1, -64040(%rbp)
.L36:
	movq	-64096(%rbp), %rax
	cmpq	%rax, -64040(%rbp)
	jl	.L37
	movq	-64024(%rbp), %rax
	cmpq	-64032(%rbp), %rax
	jle	.L38
	movq	-64024(%rbp), %rax
	movq	%rax, -64032(%rbp)
.L38:
	movq	-64032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L40
	call	__stack_chk_fail@PLT
.L40:
	leave
	.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:
