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 <limits.h>

typedef long long ll;

int a[2005];
int b[2005];
ll c[2005];
ll dist[1005];
int negative[1005];

int main(){

	int N,M;

	scanf("%d %d",&N,&M);

	int i,j;

	for(i=0;i<M;i++){
		scanf("%d %d %lld",&a[i],&b[i],&c[i]);
		a[i]--;
		b[i]--;
		c[i]=-c[i];
	}

	for(i=0;i<N;i++){
		dist[i]=LLONG_MAX;
	}
	dist[0]=0ll;

	for(i=0;i<N;i++){
		for(j=0;j<M;j++){
			if(dist[a[j]]==LLONG_MAX){continue;}
			if(dist[b[j]]>dist[a[j]]+c[j]){
				dist[b[j]]=dist[a[j]]+c[j];
			}
		}
	}

	ll ans=dist[N-1];

	for(i=0;i<N;i++){
		for(j=0;j<M;j++){
			if(dist[a[j]]==LLONG_MAX){continue;}
			if(dist[b[j]]>dist[a[j]]+c[j]){
				dist[b[j]]=dist[a[j]]+c[j];
				negative[b[j]]=1;
			}
			if(negative[a[j]]==1){
				negative[b[j]]=1;
			}
		}
	}

	if(negative[N-1]==1){
	printf("inf\n");
	}
	else{
	printf("%lld\n",-ans);
	}

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 8020
a:
	.zero	8020
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 8020
b:
	.zero	8020
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 16040
c:
	.zero	16040
	.globl	dist
	.align 32
	.type	dist, @object
	.size	dist, 8040
dist:
	.zero	8040
	.globl	negative
	.align 32
	.type	negative, @object
	.size	negative, 4020
negative:
	.zero	4020
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %d %lld"
.LC2:
	.string	"inf"
.LC3:
	.string	"%lld\n"
	.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
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -24(%rbp)
	jmp	.L2
.L3:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	c(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	addq	%rax, %rdx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	leaq	a(%rip), %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	c(%rip), %rax
	movq	(%rdx,%rax), %rax
	negq	%rax
	movq	%rax, %rcx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	c(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addl	$1, -24(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L3
	movl	$0, -24(%rbp)
	jmp	.L4
.L5:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movabsq	$9223372036854775807, %rdi
	movq	%rdi, (%rdx,%rax)
	addl	$1, -24(%rbp)
.L4:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L5
	movq	$0, dist(%rip)
	movl	$0, -24(%rbp)
	jmp	.L6
.L11:
	movl	$0, -20(%rbp)
	jmp	.L7
.L10:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rax
	movabsq	$9223372036854775807, %rdx
	cmpq	%rdx, %rax
	je	.L23
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	dist(%rip), %rdx
	movq	(%rcx,%rdx), %rsi
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	c(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	addq	%rsi, %rdx
	cmpq	%rdx, %rax
	jle	.L9
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	c(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	addq	%rsi, %rcx
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	jmp	.L9
.L23:
	nop
.L9:
	addl	$1, -20(%rbp)
.L7:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L10
	addl	$1, -24(%rbp)
.L6:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L11
	movl	-32(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, -16(%rbp)
	movl	$0, -24(%rbp)
	jmp	.L12
.L18:
	movl	$0, -20(%rbp)
	jmp	.L13
.L17:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rax
	movabsq	$9223372036854775807, %rdx
	cmpq	%rdx, %rax
	je	.L24
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	dist(%rip), %rdx
	movq	(%rcx,%rdx), %rsi
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	c(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	addq	%rsi, %rdx
	cmpq	%rdx, %rax
	jle	.L16
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	c(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	addq	%rsi, %rcx
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	negative(%rip), %rax
	movl	$1, (%rdx,%rax)
.L16:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	negative(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L15
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	negative(%rip), %rax
	movl	$1, (%rdx,%rax)
	jmp	.L15
.L24:
	nop
.L15:
	addl	$1, -20(%rbp)
.L13:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L17
	addl	$1, -24(%rbp)
.L12:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L18
	movl	-32(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	negative(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L19
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L20
.L19:
	movq	-16(%rbp), %rax
	negq	%rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L20:
	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
.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	"%d %d %lld"
.LC3:
	.string	"inf"
.LC4:
	.string	"%lld\n"
	.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
	leaq	.LC0(%rip), %rdi
	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
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	a(%rip), %r12
	leaq	b(%rip), %rbp
	xorl	%r13d, %r13d
	leaq	c(%rip), %rbx
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rcx
	movq	%rbp, %rdx
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	subl	$1, (%r12)
	addq	$4, %r12
	subl	$1, 0(%rbp)
	addq	$4, %rbp
	negq	(%rbx)
	addq	$8, %rbx
	cmpl	%r13d, %eax
	jg	.L3
.L2:
	movl	(%rsp), %ebp
	leal	-1(%rbp), %r13d
	testl	%ebp, %ebp
	jle	.L4
	cmpl	$1, %ebp
	je	.L24
	movl	%ebp, %esi
	leaq	dist(%rip), %rcx
	movdqa	.LC2(%rip), %xmm0
	shrl	%esi
	leaq	16(%rcx), %rdi
	movq	%rcx, %rdx
	subl	$1, %esi
	salq	$4, %rsi
	addq	%rdi, %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movaps	%xmm0, (%rdx)
	addq	$16, %rdx
	cmpq	%rsi, %rdx
	jne	.L6
	movl	%ebp, %edx
	andl	$-2, %edx
	testb	$1, %bpl
	je	.L7
.L5:
	movabsq	$9223372036854775807, %rbx
	movslq	%edx, %rdx
	movq	%rbx, (%rcx,%rdx,8)
.L7:
	movq	$0, dist(%rip)
	xorl	%ebx, %ebx
	leaq	a(%rip), %r8
	movslq	%eax, %rdi
	leaq	b(%rip), %r11
	leaq	c(%rip), %r10
	movabsq	$9223372036854775807, %r9
	testl	%eax, %eax
	jle	.L35
	.p2align 4,,10
	.p2align 3
.L20:
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	(%r8,%rax,4), %rdx
	movq	(%rcx,%rdx,8), %rdx
	cmpq	%r9, %rdx
	je	.L8
	movslq	(%r11,%rax,4), %rsi
	addq	(%r10,%rax,8), %rdx
	cmpq	%rdx, (%rcx,%rsi,8)
	jle	.L8
	movq	%rdx, (%rcx,%rsi,8)
.L8:
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L9
	addl	$1, %ebx
	cmpl	%ebp, %ebx
	jne	.L20
	movslq	%r13d, %r13
	xorl	%r12d, %r12d
	leaq	negative(%rip), %r9
	movabsq	$9223372036854775807, %r10
	movq	(%rcx,%r13,8), %r14
	leaq	b(%rip), %rbx
	leaq	c(%rip), %r11
	.p2align 4,,10
	.p2align 3
.L22:
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L15:
	movslq	(%r8,%rax,4), %rsi
	movq	(%rcx,%rsi,8), %rdx
	cmpq	%r10, %rdx
	je	.L12
	movslq	(%rbx,%rax,4), %r15
	addq	(%r11,%rax,8), %rdx
	cmpq	%rdx, (%rcx,%r15,8)
	jle	.L13
	movq	%rdx, (%rcx,%r15,8)
	movl	$1, (%r9,%r15,4)
.L13:
	cmpl	$1, (%r9,%rsi,4)
	jne	.L12
	movl	$1, (%r9,%r15,4)
.L12:
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L15
	addl	$1, %r12d
	cmpl	%ebp, %r12d
	jne	.L22
.L19:
	cmpl	$1, (%r9,%r13,4)
	je	.L36
	movq	%r14, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	negq	%rdx
	call	__printf_chk@PLT
.L18:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L37
	addq	$24, %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
.L36:
	.cfi_restore_state
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L18
.L35:
	movslq	%r13d, %r13
	leaq	negative(%rip), %r9
	movq	(%rcx,%r13,8), %r14
	jmp	.L19
.L4:
	movslq	%r13d, %r13
	leaq	dist(%rip), %rax
	movq	$0, dist(%rip)
	leaq	negative(%rip), %r9
	movq	(%rax,%r13,8), %r14
	jmp	.L19
.L24:
	xorl	%edx, %edx
	leaq	dist(%rip), %rcx
	jmp	.L5
.L37:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	negative
	.bss
	.align 32
	.type	negative, @object
	.size	negative, 4020
negative:
	.zero	4020
	.globl	dist
	.align 32
	.type	dist, @object
	.size	dist, 8040
dist:
	.zero	8040
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 16040
c:
	.zero	16040
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 8020
b:
	.zero	8020
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 8020
a:
	.zero	8020
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	9223372036854775807
	.quad	9223372036854775807
	.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 %d %lld"
.LC3:
	.string	"inf"
.LC4:
	.string	"%lld\n"
	.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
	leaq	.LC0(%rip), %rdi
	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
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	a(%rip), %r12
	leaq	b(%rip), %rbp
	xorl	%r13d, %r13d
	leaq	c(%rip), %rbx
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rcx
	movq	%rbp, %rdx
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	subl	$1, (%r12)
	addq	$4, %r12
	subl	$1, 0(%rbp)
	addq	$4, %rbp
	negq	(%rbx)
	addq	$8, %rbx
	cmpl	%r13d, %eax
	jg	.L3
.L2:
	movl	(%rsp), %ebp
	leal	-1(%rbp), %r13d
	testl	%ebp, %ebp
	jle	.L4
	cmpl	$1, %ebp
	je	.L24
	movl	%ebp, %esi
	leaq	dist(%rip), %rcx
	movdqa	.LC2(%rip), %xmm0
	shrl	%esi
	leaq	16(%rcx), %rdi
	movq	%rcx, %rdx
	subl	$1, %esi
	salq	$4, %rsi
	addq	%rdi, %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movaps	%xmm0, (%rdx)
	addq	$16, %rdx
	cmpq	%rsi, %rdx
	jne	.L6
	movl	%ebp, %edx
	andl	$-2, %edx
	testb	$1, %bpl
	je	.L7
.L5:
	movabsq	$9223372036854775807, %rbx
	movslq	%edx, %rdx
	movq	%rbx, (%rcx,%rdx,8)
.L7:
	movq	$0, dist(%rip)
	xorl	%ebx, %ebx
	leaq	a(%rip), %r8
	movslq	%eax, %rdi
	leaq	b(%rip), %r11
	leaq	c(%rip), %r10
	movabsq	$9223372036854775807, %r9
	testl	%eax, %eax
	jle	.L35
	.p2align 4,,10
	.p2align 3
.L20:
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	(%r8,%rax,4), %rdx
	movq	(%rcx,%rdx,8), %rdx
	cmpq	%r9, %rdx
	je	.L8
	movslq	(%r11,%rax,4), %rsi
	addq	(%r10,%rax,8), %rdx
	cmpq	%rdx, (%rcx,%rsi,8)
	jle	.L8
	movq	%rdx, (%rcx,%rsi,8)
.L8:
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L9
	addl	$1, %ebx
	cmpl	%ebp, %ebx
	jne	.L20
	movslq	%r13d, %r13
	xorl	%r12d, %r12d
	leaq	negative(%rip), %r9
	movabsq	$9223372036854775807, %r10
	movq	(%rcx,%r13,8), %r14
	leaq	b(%rip), %rbx
	leaq	c(%rip), %r11
	.p2align 4,,10
	.p2align 3
.L22:
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L15:
	movslq	(%r8,%rax,4), %rsi
	movq	(%rcx,%rsi,8), %rdx
	cmpq	%r10, %rdx
	je	.L12
	movslq	(%rbx,%rax,4), %r15
	addq	(%r11,%rax,8), %rdx
	cmpq	%rdx, (%rcx,%r15,8)
	jle	.L13
	movq	%rdx, (%rcx,%r15,8)
	movl	$1, (%r9,%r15,4)
.L13:
	cmpl	$1, (%r9,%rsi,4)
	jne	.L12
	movl	$1, (%r9,%r15,4)
.L12:
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L15
	addl	$1, %r12d
	cmpl	%ebp, %r12d
	jne	.L22
.L19:
	cmpl	$1, (%r9,%r13,4)
	je	.L36
	movq	%r14, %rdx
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	negq	%rdx
	call	__printf_chk@PLT
.L18:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L37
	addq	$24, %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
.L36:
	.cfi_restore_state
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L18
.L35:
	movslq	%r13d, %r13
	leaq	negative(%rip), %r9
	movq	(%rcx,%r13,8), %r14
	jmp	.L19
.L4:
	movslq	%r13d, %r13
	leaq	dist(%rip), %rax
	movq	$0, dist(%rip)
	leaq	negative(%rip), %r9
	movq	(%rax,%r13,8), %r14
	jmp	.L19
.L24:
	xorl	%edx, %edx
	leaq	dist(%rip), %rcx
	jmp	.L5
.L37:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	negative
	.bss
	.align 32
	.type	negative, @object
	.size	negative, 4020
negative:
	.zero	4020
	.globl	dist
	.align 32
	.type	dist, @object
	.size	dist, 8040
dist:
	.zero	8040
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 16040
c:
	.zero	16040
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 8020
b:
	.zero	8020
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 8020
a:
	.zero	8020
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	9223372036854775807
	.quad	9223372036854775807
	.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 <limits.h>

typedef long long ll;

int a[2005];
int b[2005];
ll c[2005];
ll dist[1005];
int negative[1005];

int main(){

	int N,M;

	scanf("%d %d",&N,&M);

	int i,j;

	for(i=0;i<M;i++){
		scanf("%d %d %lld",&a[i],&b[i],&c[i]);
		a[i]--;
		b[i]--;
		c[i]=-c[i];
	}

	for(i=0;i<N;i++){
		dist[i]=LLONG_MAX;
	}
	dist[0]=0ll;

	for(i=0;i<N;i++){
		for(j=0;j<M;j++){
			if(dist[a[j]]==LLONG_MAX){continue;}
			if(dist[b[j]]>dist[a[j]]+c[j]){
				dist[b[j]]=dist[a[j]]+c[j];
			}
		}
	}

	ll ans=dist[N-1];

	for(i=0;i<N;i++){
		for(j=0;j<M;j++){
			if(dist[a[j]]==LLONG_MAX){continue;}
			if(dist[b[j]]>dist[a[j]]+c[j]){
				dist[b[j]]=dist[a[j]]+c[j];
				negative[b[j]]=1;
			}
			if(negative[a[j]]==1){
				negative[b[j]]=1;
			}
		}
	}

	if(negative[N-1]==1){
	printf("inf\n");
	}
	else{
	printf("%lld\n",-ans);
	}

	return 0;
}
3 3
1 2 4
2 2 3
1 3 5
 6 5
1 2 -1000000000
2 3 -1000000000
3 5 -1000000000
4 5 -1000000000
5 6 -1000000000
 6 5
1 2 -1000000000
2 3 -798288204
3 5 -1000000000
4 5 -1000000000
5 6 -1000000000
 2 2
1 2 2
2 1 1
 6 5
1 2 -1000000000
2 3 -798288204
3 5 -672240474
4 5 -1000000000
5 6 -1000000000
 6 5
1 2 -1000000000
2 3 -798288204
3 5 -672240474
4 5 -378110944
1 6 -1000000000
 6 5
1 2 -1000000000
3 6 -798288204
3 1 -544098556
4 5 -372194891
1 6 -1131281113
 6 5
1 2 -1000000000
3 6 -798288204
3 1 -544098556
4 5 -372194891
1 6 -7948408
 6 5
1 2 -1000000000
2 3 -798288204
3 5 -908858863
4 5 -378110944
5 6 -1000000000
 6 5
1 2 -1000000000
3 6 -798288204
3 1 -544098556
4 5 -372194891
1 6 -678095

5
 -4000000000
 -3798288204
 inf
 -3470528678
 -1000000000
 -1131281113
 -7948408
 -3707147067
 -678095

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 <limits.h>

typedef long long ll;

int a[2005];
int b[2005];
ll c[2005];
ll dist[1005];
int negative[1005];

int main(){

	int N,M;

	scanf("%d %d",&N,&M);

	int i,j;

	for(i=0;i<M;i++){
		scanf("%d %d %lld",&a[i],&b[i],&c[i]);
		a[i]--;
		b[i]--;
		c[i]=-c[i];
	}

	for(i=0;i<N;i++){
		dist[i]=LLONG_MAX;
	}
	dist[0]=0ll;

	for(i=0;i<N;i++){
		for(j=0;j<M;j++){
			if(dist[a[j]]==LLONG_MAX){continue;}
			if(dist[b[j]]>dist[a[j]]+c[j]){
				dist[b[j]]=dist[a[j]]+c[j];
			}
		}
	}

	ll ans=dist[N-1];

	for(i=0;i<N;i++){
		for(j=0;j<M;j++){
			if(dist[a[j]]==LLONG_MAX){continue;}
			if(dist[b[j]]>dist[a[j]]+c[j]){
				dist[b[j]]=dist[a[j]]+c[j];
				negative[b[j]]=1;
			}
			if(negative[a[j]]==1){
				negative[b[j]]=1;
			}
		}
	}

	if(negative[N-1]==1){
	printf("inf\n");
	}
	else{
	printf("%lld\n",-ans);
	}

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 8020
a:
	.zero	8020
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 8020
b:
	.zero	8020
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 16040
c:
	.zero	16040
	.globl	dist
	.align 32
	.type	dist, @object
	.size	dist, 8040
dist:
	.zero	8040
	.globl	negative
	.align 32
	.type	negative, @object
	.size	negative, 4020
negative:
	.zero	4020
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %d %lld"
.LC2:
	.string	"inf"
.LC3:
	.string	"%lld\n"
	.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
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -24(%rbp)
	jmp	.L2
.L3:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	c(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	addq	%rax, %rdx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	leaq	a(%rip), %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	c(%rip), %rax
	movq	(%rdx,%rax), %rax
	negq	%rax
	movq	%rax, %rcx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	c(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addl	$1, -24(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L3
	movl	$0, -24(%rbp)
	jmp	.L4
.L5:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movabsq	$9223372036854775807, %rdi
	movq	%rdi, (%rdx,%rax)
	addl	$1, -24(%rbp)
.L4:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L5
	movq	$0, dist(%rip)
	movl	$0, -24(%rbp)
	jmp	.L6
.L11:
	movl	$0, -20(%rbp)
	jmp	.L7
.L10:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rax
	movabsq	$9223372036854775807, %rdx
	cmpq	%rdx, %rax
	je	.L23
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	dist(%rip), %rdx
	movq	(%rcx,%rdx), %rsi
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	c(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	addq	%rsi, %rdx
	cmpq	%rdx, %rax
	jle	.L9
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	c(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	addq	%rsi, %rcx
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	jmp	.L9
.L23:
	nop
.L9:
	addl	$1, -20(%rbp)
.L7:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L10
	addl	$1, -24(%rbp)
.L6:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L11
	movl	-32(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, -16(%rbp)
	movl	$0, -24(%rbp)
	jmp	.L12
.L18:
	movl	$0, -20(%rbp)
	jmp	.L13
.L17:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rax
	movabsq	$9223372036854775807, %rdx
	cmpq	%rdx, %rax
	je	.L24
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	dist(%rip), %rdx
	movq	(%rcx,%rdx), %rsi
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	c(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	addq	%rsi, %rdx
	cmpq	%rdx, %rax
	jle	.L16
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	c(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	addq	%rsi, %rcx
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	negative(%rip), %rax
	movl	$1, (%rdx,%rax)
.L16:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	negative(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L15
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	negative(%rip), %rax
	movl	$1, (%rdx,%rax)
	jmp	.L15
.L24:
	nop
.L15:
	addl	$1, -20(%rbp)
.L13:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L17
	addl	$1, -24(%rbp)
.L12:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L18
	movl	-32(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	negative(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L19
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L20
.L19:
	movq	-16(%rbp), %rax
	negq	%rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L20:
	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
.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
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 8020
a:
	.zero	8020
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 8020
b:
	.zero	8020
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 16040
c:
	.zero	16040
	.globl	dist
	.align 32
	.type	dist, @object
	.size	dist, 8040
dist:
	.zero	8040
	.globl	negative
	.align 32
	.type	negative, @object
	.size	negative, 4020
negative:
	.zero	4020
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %d %lld"
.LC2:
	.string	"inf"
.LC3:
	.string	"%lld\n"
	.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
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -24(%rbp)
	jmp	.L2
.L3:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	c(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	addq	%rax, %rdx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	leaq	a(%rip), %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	c(%rip), %rax
	movq	(%rdx,%rax), %rax
	negq	%rax
	movq	%rax, %rcx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	c(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addl	$1, -24(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L3
	movl	$0, -24(%rbp)
	jmp	.L4
.L5:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movabsq	$9223372036854775807, %rdi
	movq	%rdi, (%rdx,%rax)
	addl	$1, -24(%rbp)
.L4:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L5
	movq	$0, dist(%rip)
	movl	$0, -24(%rbp)
	jmp	.L6
.L11:
	movl	$0, -20(%rbp)
	jmp	.L7
.L10:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rax
	movabsq	$9223372036854775807, %rdx
	cmpq	%rdx, %rax
	je	.L23
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	dist(%rip), %rdx
	movq	(%rcx,%rdx), %rsi
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	c(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	addq	%rsi, %rdx
	cmpq	%rdx, %rax
	jle	.L9
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	c(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	addq	%rsi, %rcx
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	jmp	.L9
.L23:
	nop
.L9:
	addl	$1, -20(%rbp)
.L7:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L10
	addl	$1, -24(%rbp)
.L6:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L11
	movl	-32(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, -16(%rbp)
	movl	$0, -24(%rbp)
	jmp	.L12
.L18:
	movl	$0, -20(%rbp)
	jmp	.L13
.L17:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rax
	movabsq	$9223372036854775807, %rdx
	cmpq	%rdx, %rax
	je	.L24
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	dist(%rip), %rdx
	movq	(%rcx,%rdx), %rsi
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	c(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	addq	%rsi, %rdx
	cmpq	%rdx, %rax
	jle	.L16
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	c(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	addq	%rsi, %rcx
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dist(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	negative(%rip), %rax
	movl	$1, (%rdx,%rax)
.L16:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	negative(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L15
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	b(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	negative(%rip), %rax
	movl	$1, (%rdx,%rax)
	jmp	.L15
.L24:
	nop
.L15:
	addl	$1, -20(%rbp)
.L13:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L17
	addl	$1, -24(%rbp)
.L12:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L18
	movl	-32(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	negative(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L19
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L20
.L19:
	movq	-16(%rbp), %rax
	negq	%rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L20:
	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
.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:
