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<stdlib.h>
#include<math.h>

int main(void){
    int dp[200][200],d,n,t[200],a[200],b[200],c[200],i,j,k,flag,ans;
    scanf("%d%d",&d,&n);
    for(i=0; i<d; i++){
        scanf("%d",&t[i]);
    }
    for(i=0; i<n; i++){
        scanf("%d%d%d",&a[i],&b[i],&c[i]);
        if(t[0]>=a[i] && t[0]<=b[i]){
            dp[0][i]=0;
        }else{
            dp[0][i]=-1;
        }
    }
    for(i=1; i<d; i++){
        for(j=0; j<n; j++){
            // dp[i][j]????±??????????
            if(t[i]>=a[j] && t[i]<=b[j]){
                flag=0;
                for(k=0; k<n; k++){
                    if(flag==0){
                        if(dp[i-1][k]!=-1){
                            dp[i][j] = dp[i-1][k] + abs(c[j]-c[k]);
                            flag=1;
                        }
                    }else{
                        if(dp[i-1][k]!=-1){
                        ans = dp[i-1][k] + abs(c[j]-c[k]);
                            if(ans>dp[i][j]){
                                dp[i][j]=ans;
                            }
                        }
                    }
                }
            }else{
                dp[i][j] = -1;
            }
        }
    }
    d--;
    ans=dp[d][0];
    for(i=1; i<n; i++){
        if(ans<dp[d][i]){
            ans=dp[d][i];
        }
    }
    printf("%d\n",ans);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d%d"
.LC3:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-159744(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3504, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-163240(%rbp), %rdx
	leaq	-163244(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -163236(%rbp)
	jmp	.L2
.L3:
	leaq	-163216(%rbp), %rdx
	movl	-163236(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -163236(%rbp)
.L2:
	movl	-163244(%rbp), %eax
	cmpl	%eax, -163236(%rbp)
	jl	.L3
	movl	$0, -163236(%rbp)
	jmp	.L4
.L7:
	leaq	-160816(%rbp), %rdx
	movl	-163236(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-161616(%rbp), %rdx
	movl	-163236(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-162416(%rbp), %rsi
	movl	-163236(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-163216(%rbp), %edx
	movl	-163236(%rbp), %eax
	cltq
	movl	-162416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jl	.L5
	movl	-163216(%rbp), %edx
	movl	-163236(%rbp), %eax
	cltq
	movl	-161616(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jg	.L5
	movl	-163236(%rbp), %eax
	cltq
	movl	$0, -160016(%rbp,%rax,4)
	jmp	.L6
.L5:
	movl	-163236(%rbp), %eax
	cltq
	movl	$-1, -160016(%rbp,%rax,4)
.L6:
	addl	$1, -163236(%rbp)
.L4:
	movl	-163240(%rbp), %eax
	cmpl	%eax, -163236(%rbp)
	jl	.L7
	movl	$1, -163236(%rbp)
	jmp	.L8
.L17:
	movl	$0, -163232(%rbp)
	jmp	.L9
.L16:
	movl	-163236(%rbp), %eax
	cltq
	movl	-163216(%rbp,%rax,4), %edx
	movl	-163232(%rbp), %eax
	cltq
	movl	-162416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jl	.L10
	movl	-163236(%rbp), %eax
	cltq
	movl	-163216(%rbp,%rax,4), %edx
	movl	-163232(%rbp), %eax
	cltq
	movl	-161616(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jg	.L10
	movl	$0, -163224(%rbp)
	movl	$0, -163228(%rbp)
	jmp	.L11
.L14:
	cmpl	$0, -163224(%rbp)
	jne	.L12
	movl	-163236(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-163228(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L13
	movl	-163236(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-163228(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %ecx
	movl	-163232(%rbp), %eax
	cltq
	movl	-160816(%rbp,%rax,4), %edx
	movl	-163228(%rbp), %eax
	cltq
	movl	-160816(%rbp,%rax,4), %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%eax, %ecx
	movl	-163232(%rbp), %eax
	movslq	%eax, %rsi
	movl	-163236(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	movl	%ecx, -160016(%rbp,%rax,4)
	movl	$1, -163224(%rbp)
	jmp	.L13
.L12:
	movl	-163236(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-163228(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L13
	movl	-163236(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-163228(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %ecx
	movl	-163232(%rbp), %eax
	cltq
	movl	-160816(%rbp,%rax,4), %edx
	movl	-163228(%rbp), %eax
	cltq
	movl	-160816(%rbp,%rax,4), %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%ecx, %eax
	movl	%eax, -163220(%rbp)
	movl	-163232(%rbp), %eax
	movslq	%eax, %rcx
	movl	-163236(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	cmpl	%eax, -163220(%rbp)
	jle	.L13
	movl	-163232(%rbp), %eax
	movslq	%eax, %rcx
	movl	-163236(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-163220(%rbp), %eax
	movl	%eax, -160016(%rbp,%rdx,4)
.L13:
	addl	$1, -163228(%rbp)
.L11:
	movl	-163240(%rbp), %eax
	cmpl	%eax, -163228(%rbp)
	jl	.L14
	jmp	.L15
.L10:
	movl	-163232(%rbp), %eax
	movslq	%eax, %rcx
	movl	-163236(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	$-1, -160016(%rbp,%rax,4)
.L15:
	addl	$1, -163232(%rbp)
.L9:
	movl	-163240(%rbp), %eax
	cmpl	%eax, -163232(%rbp)
	jl	.L16
	addl	$1, -163236(%rbp)
.L8:
	movl	-163244(%rbp), %eax
	cmpl	%eax, -163236(%rbp)
	jl	.L17
	movl	-163244(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -163244(%rbp)
	movl	-163244(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$5, %rax
	addq	%rbp, %rax
	subq	$160016, %rax
	movl	(%rax), %eax
	movl	%eax, -163220(%rbp)
	movl	$1, -163236(%rbp)
	jmp	.L18
.L20:
	movl	-163244(%rbp), %eax
	movl	-163236(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	cmpl	%eax, -163220(%rbp)
	jge	.L19
	movl	-163244(%rbp), %eax
	movl	-163236(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	movl	%eax, -163220(%rbp)
.L19:
	addl	$1, -163236(%rbp)
.L18:
	movl	-163240(%rbp), %eax
	cmpl	%eax, -163236(%rbp)
	jl	.L20
	movl	-163220(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"%d"
.LC2:
	.string	"%d%d%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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	-159744(%rsp), %r11
	.cfi_def_cfa 11, 159800
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3528, %rsp
	.cfi_def_cfa_offset 163328
	leaq	.LC0(%rip), %rdi
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 163256(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rdx
	leaq	40(%rsp), %rsi
	leaq	48(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %edx
	testl	%edx, %edx
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	cmpl	%ebx, 40(%rsp)
	jg	.L5
.L6:
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L48
	leaq	848(%rsp), %rbx
	leaq	3248(%rsp), %rax
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	movq	%rax, 8(%rsp)
	movq	%rbx, %rax
	leaq	2448(%rsp), %rbp
	movl	%r15d, %ebx
	leaq	1648(%rsp), %r12
	leaq	.LC2(%rip), %r13
	movq	%rax, %r15
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%r12,%r14), %rdx
	leaq	0(%rbp,%r14), %rcx
	movq	%r13, %rdi
	xorl	%eax, %eax
	leaq	(%r15,%r14), %rsi
	call	__isoc99_scanf@PLT
	movl	48(%rsp), %edx
	movl	$-1, %eax
	cmpl	(%r15,%r14), %edx
	jl	.L7
	xorl	%eax, %eax
	cmpl	(%r12,%r14), %edx
	setg	%al
	negl	%eax
.L7:
	movq	8(%rsp), %rdi
	movl	44(%rsp), %r8d
	addl	$1, %ebx
	movl	%eax, (%rdi,%r14)
	addq	$4, %r14
	cmpl	%ebx, %r8d
	jg	.L3
	movl	40(%rsp), %eax
	movq	%r15, %rbx
	movl	%eax, 28(%rsp)
	cmpl	$1, %eax
	jle	.L8
	testl	%r8d, %r8d
	jle	.L8
	subl	$2, %eax
	movq	%rdi, (%rsp)
	leaq	52(%rsp), %r13
	movslq	%r8d, %r10
	leaq	56(%rsp,%rax,4), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	(%rsp), %rax
	movl	0(%r13), %edi
	movq	%rax, %r11
	addq	$800, %rax
	movq	%rax, (%rsp)
	movq	%rax, %rcx
	xorl	%eax, %eax
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L11:
	movl	$-1, (%rcx)
.L14:
	addq	$1, %rax
	addq	$4, %rcx
	cmpq	%r10, %rax
	je	.L49
.L18:
	cmpl	(%rbx,%rax,4), %edi
	jl	.L11
	movq	%r11, %r9
	xorl	%esi, %esi
	cmpl	(%r12,%rax,4), %edi
	jg	.L11
.L13:
	movl	(%r9), %r14d
	leal	1(%rsi), %edx
	cmpl	$-1, %r14d
	je	.L50
	movl	0(%rbp,%rax,4), %r9d
	movl	%r9d, %r15d
	subl	2448(%rsp,%rsi,4), %r15d
	movl	%r15d, %esi
	negl	%esi
	cmovs	%r15d, %esi
	addl	%r14d, %esi
	movl	%esi, (%rcx)
	cmpl	%edx, %r8d
	jle	.L14
	movslq	%edx, %rdx
.L17:
	movl	(%r11,%rdx,4), %r14d
	cmpl	$-1, %r14d
	je	.L16
	movl	%r9d, %r15d
	subl	0(%rbp,%rdx,4), %r15d
	movl	%r15d, %esi
	negl	%esi
	cmovs	%r15d, %esi
	addl	%r14d, %esi
	cmpl	%esi, (%rcx)
	jge	.L16
	movl	%esi, (%rcx)
.L16:
	addq	$1, %rdx
	cmpl	%edx, %r8d
	jg	.L17
	addq	$1, %rax
	addq	$4, %rcx
	cmpq	%r10, %rax
	jne	.L18
	.p2align 4,,10
	.p2align 3
.L49:
	addq	$4, %r13
	cmpq	16(%rsp), %r13
	jne	.L10
.L8:
	movl	28(%rsp), %ebx
	leal	-1(%rbx), %eax
	movslq	%eax, %rsi
	movl	%eax, 40(%rsp)
	leaq	(%rsi,%rsi,4), %rax
	leaq	(%rax,%rax,4), %rax
	salq	$5, %rax
	movl	3248(%rsp,%rax), %edx
	cmpl	$1, %r8d
	jle	.L19
	leal	-2(%r8), %eax
	leal	-1(%r8), %edi
	cmpl	$2, %eax
	jbe	.L29
	movd	%edx, %xmm3
	movslq	%ebx, %rdx
	movq	8(%rsp), %rbx
	leaq	(%rdx,%rdx,4), %rax
	pshufd	$0, %xmm3, %xmm2
	leaq	(%rax,%rax,4), %rax
	salq	$5, %rax
	leaq	-796(%rbx,%rax), %rdx
	movl	%edi, %eax
	shrl	$2, %eax
	leal	-1(%rax), %ecx
	leaq	16(%rdx), %rax
	salq	$4, %rcx
	addq	%rax, %rcx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L51:
	addq	$16, %rax
.L21:
	movdqu	(%rdx), %xmm0
	movq	%rax, %rdx
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rax, %rcx
	jne	.L51
	movdqa	%xmm2, %xmm1
	movl	%edi, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	movdqa	%xmm1, %xmm0
	leal	1(%rax), %ecx
	pcmpgtd	%xmm2, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %edx
	cmpl	%edi, %eax
	je	.L19
.L20:
	leaq	(%rsi,%rsi,4), %rdi
	movslq	%ecx, %rax
	leaq	(%rdi,%rdi,4), %rdi
	leaq	(%rax,%rdi,8), %rax
	movl	3248(%rsp,%rax,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	leal	1(%rcx), %eax
	cmpl	%eax, %r8d
	jle	.L19
	movslq	%eax, %rdi
	imulq	$200, %rsi, %rax
	leaq	(%rax,%rdi), %rsi
	movl	3248(%rsp,%rsi,4), %esi
	cmpl	%esi, %edx
	cmovl	%esi, %edx
	addl	$2, %ecx
	cmpl	%ecx, %r8d
	jle	.L19
	movslq	%ecx, %rcx
	addq	%rcx, %rax
	movl	3248(%rsp,%rax,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
.L19:
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	163256(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L52
	addq	$163272, %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
.L50:
	.cfi_restore_state
	addq	$4, %r9
	cmpl	%edx, %r8d
	je	.L14
	movslq	%edx, %rsi
	jmp	.L13
.L48:
	movl	40(%rsp), %eax
	subl	$1, %eax
	movl	%eax, 40(%rsp)
	cltq
	imulq	$800, %rax, %rax
	movl	3248(%rsp,%rax), %edx
	jmp	.L19
.L29:
	movl	$1, %ecx
	jmp	.L20
.L52:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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	"%d"
.LC2:
	.string	"%d%d%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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	-159744(%rsp), %r11
	.cfi_def_cfa 11, 159800
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3528, %rsp
	.cfi_def_cfa_offset 163328
	leaq	.LC0(%rip), %rdi
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 163256(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rdx
	leaq	40(%rsp), %rsi
	leaq	48(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %edx
	testl	%edx, %edx
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	cmpl	%ebx, 40(%rsp)
	jg	.L5
.L6:
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L48
	leaq	848(%rsp), %rbx
	leaq	3248(%rsp), %rax
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	movq	%rax, 8(%rsp)
	movq	%rbx, %rax
	leaq	2448(%rsp), %rbp
	movl	%r15d, %ebx
	leaq	1648(%rsp), %r12
	leaq	.LC2(%rip), %r13
	movq	%rax, %r15
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	(%r12,%r14), %rdx
	leaq	0(%rbp,%r14), %rcx
	movq	%r13, %rdi
	xorl	%eax, %eax
	leaq	(%r15,%r14), %rsi
	call	__isoc99_scanf@PLT
	movl	48(%rsp), %edx
	movl	$-1, %eax
	cmpl	(%r15,%r14), %edx
	jl	.L7
	xorl	%eax, %eax
	cmpl	(%r12,%r14), %edx
	setg	%al
	negl	%eax
.L7:
	movq	8(%rsp), %rdi
	movl	44(%rsp), %r8d
	addl	$1, %ebx
	movl	%eax, (%rdi,%r14)
	addq	$4, %r14
	cmpl	%ebx, %r8d
	jg	.L3
	movl	40(%rsp), %eax
	movq	%r15, %rbx
	movl	%eax, 28(%rsp)
	cmpl	$1, %eax
	jle	.L8
	testl	%r8d, %r8d
	jle	.L8
	subl	$2, %eax
	movq	%rdi, (%rsp)
	leaq	52(%rsp), %r13
	movslq	%r8d, %r10
	leaq	56(%rsp,%rax,4), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	(%rsp), %rax
	movl	0(%r13), %edi
	movq	%rax, %r11
	addq	$800, %rax
	movq	%rax, (%rsp)
	movq	%rax, %rcx
	xorl	%eax, %eax
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L11:
	movl	$-1, (%rcx)
.L14:
	addq	$1, %rax
	addq	$4, %rcx
	cmpq	%r10, %rax
	je	.L49
.L18:
	cmpl	(%rbx,%rax,4), %edi
	jl	.L11
	movq	%r11, %r9
	xorl	%esi, %esi
	cmpl	(%r12,%rax,4), %edi
	jg	.L11
.L13:
	movl	(%r9), %r14d
	leal	1(%rsi), %edx
	cmpl	$-1, %r14d
	je	.L50
	movl	0(%rbp,%rax,4), %r9d
	movl	%r9d, %r15d
	subl	2448(%rsp,%rsi,4), %r15d
	movl	%r15d, %esi
	negl	%esi
	cmovs	%r15d, %esi
	addl	%r14d, %esi
	movl	%esi, (%rcx)
	cmpl	%edx, %r8d
	jle	.L14
	movslq	%edx, %rdx
.L17:
	movl	(%r11,%rdx,4), %r14d
	cmpl	$-1, %r14d
	je	.L16
	movl	%r9d, %r15d
	subl	0(%rbp,%rdx,4), %r15d
	movl	%r15d, %esi
	negl	%esi
	cmovs	%r15d, %esi
	addl	%r14d, %esi
	cmpl	%esi, (%rcx)
	jge	.L16
	movl	%esi, (%rcx)
.L16:
	addq	$1, %rdx
	cmpl	%edx, %r8d
	jg	.L17
	addq	$1, %rax
	addq	$4, %rcx
	cmpq	%r10, %rax
	jne	.L18
	.p2align 4,,10
	.p2align 3
.L49:
	addq	$4, %r13
	cmpq	16(%rsp), %r13
	jne	.L10
.L8:
	movl	28(%rsp), %ebx
	leal	-1(%rbx), %eax
	movslq	%eax, %rsi
	movl	%eax, 40(%rsp)
	leaq	(%rsi,%rsi,4), %rax
	leaq	(%rax,%rax,4), %rax
	salq	$5, %rax
	movl	3248(%rsp,%rax), %edx
	cmpl	$1, %r8d
	jle	.L19
	leal	-2(%r8), %eax
	leal	-1(%r8), %edi
	cmpl	$2, %eax
	jbe	.L29
	movd	%edx, %xmm3
	movslq	%ebx, %rdx
	movq	8(%rsp), %rbx
	leaq	(%rdx,%rdx,4), %rax
	pshufd	$0, %xmm3, %xmm2
	leaq	(%rax,%rax,4), %rax
	salq	$5, %rax
	leaq	-796(%rbx,%rax), %rdx
	movl	%edi, %eax
	shrl	$2, %eax
	leal	-1(%rax), %ecx
	leaq	16(%rdx), %rax
	salq	$4, %rcx
	addq	%rax, %rcx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L51:
	addq	$16, %rax
.L21:
	movdqu	(%rdx), %xmm0
	movq	%rax, %rdx
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rax, %rcx
	jne	.L51
	movdqa	%xmm2, %xmm1
	movl	%edi, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	movdqa	%xmm1, %xmm0
	leal	1(%rax), %ecx
	pcmpgtd	%xmm2, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %edx
	cmpl	%edi, %eax
	je	.L19
.L20:
	leaq	(%rsi,%rsi,4), %rdi
	movslq	%ecx, %rax
	leaq	(%rdi,%rdi,4), %rdi
	leaq	(%rax,%rdi,8), %rax
	movl	3248(%rsp,%rax,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	leal	1(%rcx), %eax
	cmpl	%eax, %r8d
	jle	.L19
	movslq	%eax, %rdi
	imulq	$200, %rsi, %rax
	leaq	(%rax,%rdi), %rsi
	movl	3248(%rsp,%rsi,4), %esi
	cmpl	%esi, %edx
	cmovl	%esi, %edx
	addl	$2, %ecx
	cmpl	%ecx, %r8d
	jle	.L19
	movslq	%ecx, %rcx
	addq	%rcx, %rax
	movl	3248(%rsp,%rax,4), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
.L19:
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	163256(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L52
	addq	$163272, %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
.L50:
	.cfi_restore_state
	addq	$4, %r9
	cmpl	%edx, %r8d
	je	.L14
	movslq	%edx, %rsi
	jmp	.L13
.L48:
	movl	40(%rsp), %eax
	subl	$1, %eax
	movl	%eax, 40(%rsp)
	cltq
	imulq	$800, %rax, %rax
	movl	3248(%rsp,%rax), %edx
	jmp	.L19
.L29:
	movl	$1, %ecx
	jmp	.L20
.L52:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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<stdlib.h>
#include<math.h>

int main(void){
    int dp[200][200],d,n,t[200],a[200],b[200],c[200],i,j,k,flag,ans;
    scanf("%d%d",&d,&n);
    for(i=0; i<d; i++){
        scanf("%d",&t[i]);
    }
    for(i=0; i<n; i++){
        scanf("%d%d%d",&a[i],&b[i],&c[i]);
        if(t[0]>=a[i] && t[0]<=b[i]){
            dp[0][i]=0;
        }else{
            dp[0][i]=-1;
        }
    }
    for(i=1; i<d; i++){
        for(j=0; j<n; j++){
            // dp[i][j]????±??????????
            if(t[i]>=a[j] && t[i]<=b[j]){
                flag=0;
                for(k=0; k<n; k++){
                    if(flag==0){
                        if(dp[i-1][k]!=-1){
                            dp[i][j] = dp[i-1][k] + abs(c[j]-c[k]);
                            flag=1;
                        }
                    }else{
                        if(dp[i-1][k]!=-1){
                        ans = dp[i-1][k] + abs(c[j]-c[k]);
                            if(ans>dp[i][j]){
                                dp[i][j]=ans;
                            }
                        }
                    }
                }
            }else{
                dp[i][j] = -1;
            }
        }
    }
    d--;
    ans=dp[d][0];
    for(i=1; i<n; i++){
        if(ans<dp[d][i]){
            ans=dp[d][i];
        }
    }
    printf("%d\n",ans);
    return 0;
}
3 4
34
27
35
20 25 30
23 29 90
21 35 60
28 33 40
 3 4
31
27
35
20 25 30
35 29 90
21 35 60
28 33 40
 3 4
34
40
35
20 25 30
23 29 90
21 69 60
28 33 40
 3 4
31
27
35
20 25 30
23 29 90
21 35 60
28 48 40
 3 4
31
27
35
20 25 30
35 29 90
21 35 69
28 33 40
 3 4
31
27
35
20 25 30
23 29 90
21 35 60
28 48 25
 3 4
34
27
35
20 25 30
23 29 90
21 69 60
12 33 7
 3 4
31
27
35
20 25 30
43 29 90
21 35 60
28 48 25
 3 4
34
27
35
20 25 30
23 29 90
21 69 60
12 33 9
 3 4
34
40
44
38 25 30
24 29 11
21 69 60
28 43 40

60
 20
 0
 100
 29
 130
 106
 70
 102
 40

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<stdlib.h>
#include<math.h>

int main(void){
    int dp[200][200],d,n,t[200],a[200],b[200],c[200],i,j,k,flag,ans;
    scanf("%d%d",&d,&n);
    for(i=0; i<d; i++){
        scanf("%d",&t[i]);
    }
    for(i=0; i<n; i++){
        scanf("%d%d%d",&a[i],&b[i],&c[i]);
        if(t[0]>=a[i] && t[0]<=b[i]){
            dp[0][i]=0;
        }else{
            dp[0][i]=-1;
        }
    }
    for(i=1; i<d; i++){
        for(j=0; j<n; j++){
            // dp[i][j]????±??????????
            if(t[i]>=a[j] && t[i]<=b[j]){
                flag=0;
                for(k=0; k<n; k++){
                    if(flag==0){
                        if(dp[i-1][k]!=-1){
                            dp[i][j] = dp[i-1][k] + abs(c[j]-c[k]);
                            flag=1;
                        }
                    }else{
                        if(dp[i-1][k]!=-1){
                        ans = dp[i-1][k] + abs(c[j]-c[k]);
                            if(ans>dp[i][j]){
                                dp[i][j]=ans;
                            }
                        }
                    }
                }
            }else{
                dp[i][j] = -1;
            }
        }
    }
    d--;
    ans=dp[d][0];
    for(i=1; i<n; i++){
        if(ans<dp[d][i]){
            ans=dp[d][i];
        }
    }
    printf("%d\n",ans);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d%d"
.LC3:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-159744(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3504, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-163240(%rbp), %rdx
	leaq	-163244(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -163236(%rbp)
	jmp	.L2
.L3:
	leaq	-163216(%rbp), %rdx
	movl	-163236(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -163236(%rbp)
.L2:
	movl	-163244(%rbp), %eax
	cmpl	%eax, -163236(%rbp)
	jl	.L3
	movl	$0, -163236(%rbp)
	jmp	.L4
.L7:
	leaq	-160816(%rbp), %rdx
	movl	-163236(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-161616(%rbp), %rdx
	movl	-163236(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-162416(%rbp), %rsi
	movl	-163236(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-163216(%rbp), %edx
	movl	-163236(%rbp), %eax
	cltq
	movl	-162416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jl	.L5
	movl	-163216(%rbp), %edx
	movl	-163236(%rbp), %eax
	cltq
	movl	-161616(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jg	.L5
	movl	-163236(%rbp), %eax
	cltq
	movl	$0, -160016(%rbp,%rax,4)
	jmp	.L6
.L5:
	movl	-163236(%rbp), %eax
	cltq
	movl	$-1, -160016(%rbp,%rax,4)
.L6:
	addl	$1, -163236(%rbp)
.L4:
	movl	-163240(%rbp), %eax
	cmpl	%eax, -163236(%rbp)
	jl	.L7
	movl	$1, -163236(%rbp)
	jmp	.L8
.L17:
	movl	$0, -163232(%rbp)
	jmp	.L9
.L16:
	movl	-163236(%rbp), %eax
	cltq
	movl	-163216(%rbp,%rax,4), %edx
	movl	-163232(%rbp), %eax
	cltq
	movl	-162416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jl	.L10
	movl	-163236(%rbp), %eax
	cltq
	movl	-163216(%rbp,%rax,4), %edx
	movl	-163232(%rbp), %eax
	cltq
	movl	-161616(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jg	.L10
	movl	$0, -163224(%rbp)
	movl	$0, -163228(%rbp)
	jmp	.L11
.L14:
	cmpl	$0, -163224(%rbp)
	jne	.L12
	movl	-163236(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-163228(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L13
	movl	-163236(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-163228(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %ecx
	movl	-163232(%rbp), %eax
	cltq
	movl	-160816(%rbp,%rax,4), %edx
	movl	-163228(%rbp), %eax
	cltq
	movl	-160816(%rbp,%rax,4), %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%eax, %ecx
	movl	-163232(%rbp), %eax
	movslq	%eax, %rsi
	movl	-163236(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	movl	%ecx, -160016(%rbp,%rax,4)
	movl	$1, -163224(%rbp)
	jmp	.L13
.L12:
	movl	-163236(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-163228(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L13
	movl	-163236(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-163228(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %ecx
	movl	-163232(%rbp), %eax
	cltq
	movl	-160816(%rbp,%rax,4), %edx
	movl	-163228(%rbp), %eax
	cltq
	movl	-160816(%rbp,%rax,4), %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%ecx, %eax
	movl	%eax, -163220(%rbp)
	movl	-163232(%rbp), %eax
	movslq	%eax, %rcx
	movl	-163236(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	cmpl	%eax, -163220(%rbp)
	jle	.L13
	movl	-163232(%rbp), %eax
	movslq	%eax, %rcx
	movl	-163236(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-163220(%rbp), %eax
	movl	%eax, -160016(%rbp,%rdx,4)
.L13:
	addl	$1, -163228(%rbp)
.L11:
	movl	-163240(%rbp), %eax
	cmpl	%eax, -163228(%rbp)
	jl	.L14
	jmp	.L15
.L10:
	movl	-163232(%rbp), %eax
	movslq	%eax, %rcx
	movl	-163236(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	$-1, -160016(%rbp,%rax,4)
.L15:
	addl	$1, -163232(%rbp)
.L9:
	movl	-163240(%rbp), %eax
	cmpl	%eax, -163232(%rbp)
	jl	.L16
	addl	$1, -163236(%rbp)
.L8:
	movl	-163244(%rbp), %eax
	cmpl	%eax, -163236(%rbp)
	jl	.L17
	movl	-163244(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -163244(%rbp)
	movl	-163244(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$5, %rax
	addq	%rbp, %rax
	subq	$160016, %rax
	movl	(%rax), %eax
	movl	%eax, -163220(%rbp)
	movl	$1, -163236(%rbp)
	jmp	.L18
.L20:
	movl	-163244(%rbp), %eax
	movl	-163236(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	cmpl	%eax, -163220(%rbp)
	jge	.L19
	movl	-163244(%rbp), %eax
	movl	-163236(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	movl	%eax, -163220(%rbp)
.L19:
	addl	$1, -163236(%rbp)
.L18:
	movl	-163240(%rbp), %eax
	cmpl	%eax, -163236(%rbp)
	jl	.L20
	movl	-163220(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"%d"
.LC2:
	.string	"%d%d%d"
.LC3:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-159744(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3504, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-163240(%rbp), %rdx
	leaq	-163244(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -163236(%rbp)
	jmp	.L2
.L3:
	leaq	-163216(%rbp), %rdx
	movl	-163236(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -163236(%rbp)
.L2:
	movl	-163244(%rbp), %eax
	cmpl	%eax, -163236(%rbp)
	jl	.L3
	movl	$0, -163236(%rbp)
	jmp	.L4
.L7:
	leaq	-160816(%rbp), %rdx
	movl	-163236(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-161616(%rbp), %rdx
	movl	-163236(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-162416(%rbp), %rsi
	movl	-163236(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-163216(%rbp), %edx
	movl	-163236(%rbp), %eax
	cltq
	movl	-162416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jl	.L5
	movl	-163216(%rbp), %edx
	movl	-163236(%rbp), %eax
	cltq
	movl	-161616(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jg	.L5
	movl	-163236(%rbp), %eax
	cltq
	movl	$0, -160016(%rbp,%rax,4)
	jmp	.L6
.L5:
	movl	-163236(%rbp), %eax
	cltq
	movl	$-1, -160016(%rbp,%rax,4)
.L6:
	addl	$1, -163236(%rbp)
.L4:
	movl	-163240(%rbp), %eax
	cmpl	%eax, -163236(%rbp)
	jl	.L7
	movl	$1, -163236(%rbp)
	jmp	.L8
.L17:
	movl	$0, -163232(%rbp)
	jmp	.L9
.L16:
	movl	-163236(%rbp), %eax
	cltq
	movl	-163216(%rbp,%rax,4), %edx
	movl	-163232(%rbp), %eax
	cltq
	movl	-162416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jl	.L10
	movl	-163236(%rbp), %eax
	cltq
	movl	-163216(%rbp,%rax,4), %edx
	movl	-163232(%rbp), %eax
	cltq
	movl	-161616(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jg	.L10
	movl	$0, -163224(%rbp)
	movl	$0, -163228(%rbp)
	jmp	.L11
.L14:
	cmpl	$0, -163224(%rbp)
	jne	.L12
	movl	-163236(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-163228(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L13
	movl	-163236(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-163228(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %ecx
	movl	-163232(%rbp), %eax
	cltq
	movl	-160816(%rbp,%rax,4), %edx
	movl	-163228(%rbp), %eax
	cltq
	movl	-160816(%rbp,%rax,4), %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%eax, %ecx
	movl	-163232(%rbp), %eax
	movslq	%eax, %rsi
	movl	-163236(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rsi, %rax
	movl	%ecx, -160016(%rbp,%rax,4)
	movl	$1, -163224(%rbp)
	jmp	.L13
.L12:
	movl	-163236(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-163228(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L13
	movl	-163236(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-163228(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %ecx
	movl	-163232(%rbp), %eax
	cltq
	movl	-160816(%rbp,%rax,4), %edx
	movl	-163228(%rbp), %eax
	cltq
	movl	-160816(%rbp,%rax,4), %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%ecx, %eax
	movl	%eax, -163220(%rbp)
	movl	-163232(%rbp), %eax
	movslq	%eax, %rcx
	movl	-163236(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	cmpl	%eax, -163220(%rbp)
	jle	.L13
	movl	-163232(%rbp), %eax
	movslq	%eax, %rcx
	movl	-163236(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-163220(%rbp), %eax
	movl	%eax, -160016(%rbp,%rdx,4)
.L13:
	addl	$1, -163228(%rbp)
.L11:
	movl	-163240(%rbp), %eax
	cmpl	%eax, -163228(%rbp)
	jl	.L14
	jmp	.L15
.L10:
	movl	-163232(%rbp), %eax
	movslq	%eax, %rcx
	movl	-163236(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	$-1, -160016(%rbp,%rax,4)
.L15:
	addl	$1, -163232(%rbp)
.L9:
	movl	-163240(%rbp), %eax
	cmpl	%eax, -163232(%rbp)
	jl	.L16
	addl	$1, -163236(%rbp)
.L8:
	movl	-163244(%rbp), %eax
	cmpl	%eax, -163236(%rbp)
	jl	.L17
	movl	-163244(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -163244(%rbp)
	movl	-163244(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$5, %rax
	addq	%rbp, %rax
	subq	$160016, %rax
	movl	(%rax), %eax
	movl	%eax, -163220(%rbp)
	movl	$1, -163236(%rbp)
	jmp	.L18
.L20:
	movl	-163244(%rbp), %eax
	movl	-163236(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	cmpl	%eax, -163220(%rbp)
	jge	.L19
	movl	-163244(%rbp), %eax
	movl	-163236(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movl	-160016(%rbp,%rax,4), %eax
	movl	%eax, -163220(%rbp)
.L19:
	addl	$1, -163236(%rbp)
.L18:
	movl	-163240(%rbp), %eax
	cmpl	%eax, -163236(%rbp)
	jl	.L20
	movl	-163220(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
