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>

int main()
{
	int i, u, v, w, N, M, dist[101][101] = {}, a[1001], b[1001], c[1001];
	scanf("%d %d", &N, &M);
	for (i = 1; i <= M; i++) {
		scanf("%d %d", &u, &w);
		scanf("%d", &(dist[u][w]));
		dist[w][u] = dist[u][w];
		a[i] = u;
		b[i] = w;
		c[i] = dist[u][w];
	}
	for (u = 1; u < N; u++) {
		for (w = u + 1; w <= N; w++) {
			if (dist[u][w] == 0) {
				dist[u][w] = 1 << 29;
				dist[w][u] = 1 << 29;
			}
		}
	}
	
	for (v = 1; v <= N; v++) {
		for (u = 1; u < N; u++) {
			for (w = u + 1; w <= N; w++) {
				if (dist[u][v] + dist[v][w] < dist[u][w]) {
					dist[u][w] = dist[u][v] + dist[v][w];
					dist[w][u] = dist[u][v] + dist[v][w];
				}
			}
		}
	}
	
	int sum = 0;
	for (i = 1; i <= M; i++) {
		u = a[i];
		w = b[i];
		for (v = 1; v <= N; v++) if (c[i] == abs(dist[v][u] - dist[v][w])) break;
		if (v > N) sum++;
	}
	printf("%d\n", sum);
	fflush(stdout);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.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	-49152(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3744, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40816(%rbp), %rax
	movl	$40804, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-52880(%rbp), %rdx
	leaq	-52884(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -52876(%rbp)
	jmp	.L2
.L3:
	leaq	-52888(%rbp), %rdx
	leaq	-52892(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	leaq	-40816(%rbp), %rcx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	movl	-52888(%rbp), %esi
	movl	-52892(%rbp), %edi
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r8
	addq	%r8, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %ecx
	movslq	%edi, %rdi
	movslq	%esi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	movl	%ecx, -40816(%rbp,%rax,4)
	movl	-52892(%rbp), %edx
	movl	-52876(%rbp), %eax
	cltq
	movl	%edx, -52864(%rbp,%rax,4)
	movl	-52888(%rbp), %edx
	movl	-52876(%rbp), %eax
	cltq
	movl	%edx, -48848(%rbp,%rax,4)
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %edx
	movl	-52876(%rbp), %eax
	cltq
	movl	%edx, -44832(%rbp,%rax,4)
	addl	$1, -52876(%rbp)
.L2:
	movl	-52880(%rbp), %eax
	cmpl	%eax, -52876(%rbp)
	jle	.L3
	movl	$1, -52892(%rbp)
	jmp	.L4
.L8:
	movl	-52892(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52888(%rbp)
	jmp	.L5
.L7:
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L6
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$536870912, -40816(%rbp,%rax,4)
	movl	-52888(%rbp), %eax
	movl	-52892(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$536870912, -40816(%rbp,%rax,4)
.L6:
	movl	-52888(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52888(%rbp)
.L5:
	movl	-52888(%rbp), %edx
	movl	-52884(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L7
	movl	-52892(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52892(%rbp)
.L4:
	movl	-52892(%rbp), %edx
	movl	-52884(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L8
	movl	$1, -52872(%rbp)
	jmp	.L9
.L15:
	movl	$1, -52892(%rbp)
	jmp	.L10
.L14:
	movl	-52892(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52888(%rbp)
	jmp	.L11
.L13:
	movl	-52892(%rbp), %eax
	movl	-52872(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %ecx
	movl	-52888(%rbp), %eax
	movslq	%eax, %rsi
	movl	-52872(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-40816(%rbp,%rax,4), %eax
	addl	%eax, %ecx
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-40816(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jge	.L12
	movl	-52892(%rbp), %eax
	movl	-52872(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %esi
	movl	-52888(%rbp), %eax
	movslq	%eax, %rcx
	movl	-52872(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %ecx
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	addl	%esi, %ecx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -40816(%rbp,%rax,4)
	movl	-52892(%rbp), %eax
	movl	-52872(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %esi
	movl	-52888(%rbp), %eax
	movslq	%eax, %rcx
	movl	-52872(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %ecx
	movl	-52888(%rbp), %eax
	movl	-52892(%rbp), %edx
	addl	%esi, %ecx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -40816(%rbp,%rax,4)
.L12:
	movl	-52888(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52888(%rbp)
.L11:
	movl	-52888(%rbp), %edx
	movl	-52884(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L13
	movl	-52892(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52892(%rbp)
.L10:
	movl	-52892(%rbp), %edx
	movl	-52884(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L14
	addl	$1, -52872(%rbp)
.L9:
	movl	-52884(%rbp), %eax
	cmpl	%eax, -52872(%rbp)
	jle	.L15
	movl	$0, -52868(%rbp)
	movl	$1, -52876(%rbp)
	jmp	.L16
.L22:
	movl	-52876(%rbp), %eax
	cltq
	movl	-52864(%rbp,%rax,4), %eax
	movl	%eax, -52892(%rbp)
	movl	-52876(%rbp), %eax
	cltq
	movl	-48848(%rbp,%rax,4), %eax
	movl	%eax, -52888(%rbp)
	movl	$1, -52872(%rbp)
	jmp	.L17
.L20:
	movl	-52876(%rbp), %eax
	cltq
	movl	-44832(%rbp,%rax,4), %ecx
	movl	-52892(%rbp), %eax
	movslq	%eax, %rsi
	movl	-52872(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-40816(%rbp,%rax,4), %esi
	movl	-52888(%rbp), %eax
	movslq	%eax, %rdi
	movl	-52872(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r8
	addq	%r8, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	movl	-40816(%rbp,%rax,4), %edx
	movl	%esi, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	cmpl	%eax, %ecx
	je	.L25
	addl	$1, -52872(%rbp)
.L17:
	movl	-52884(%rbp), %eax
	cmpl	%eax, -52872(%rbp)
	jle	.L20
	jmp	.L19
.L25:
	nop
.L19:
	movl	-52884(%rbp), %eax
	cmpl	%eax, -52872(%rbp)
	jle	.L21
	addl	$1, -52868(%rbp)
.L21:
	addl	$1, -52876(%rbp)
.L16:
	movl	-52880(%rbp), %eax
	cmpl	%eax, -52876(%rbp)
	jle	.L22
	movl	-52868(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	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\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	-49152(%rsp), %r11
	.cfi_def_cfa 11, 49208
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3784, %rsp
	.cfi_def_cfa_offset 52992
	xorl	%esi, %esi
	movl	$40804, %edx
	leaq	.LC0(%rip), %rbx
	movl	%ecx, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 52920(%rsp)
	xorl	%eax, %eax
	leaq	12112(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, 32(%rsp)
	call	memset@PLT
	xorl	%eax, %eax
	leaq	60(%rsp), %rdx
	movq	%rbx, %rdi
	leaq	56(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %eax
	movl	8(%rsp), %ecx
	testl	%eax, %eax
	movl	%eax, 44(%rsp)
	jle	.L2
	leaq	64(%rsp), %r9
	leaq	4080(%rsp), %r8
	movl	%ecx, 24(%rsp)
	movl	$1, %r15d
	movq	%r9, 8(%rsp)
	leaq	52(%rsp), %r14
	leaq	8096(%rsp), %rbp
	movq	%r8, 16(%rsp)
	movq	%rbp, %rax
	leaq	48(%rsp), %r13
	movq	%r15, %rbp
	leaq	.LC1(%rip), %r12
	movq	%rax, %r15
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	48(%rsp), %rax
	movq	32(%rsp), %rsi
	movq	%r12, %rdi
	leaq	(%rax,%rax,4), %rdx
	leaq	(%rdx,%rdx,4), %rdx
	leaq	(%rax,%rdx,4), %rax
	movslq	52(%rsp), %rdx
	addq	%rdx, %rax
	leaq	(%rsi,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	48(%rsp), %rax
	movslq	52(%rsp), %rdx
	leaq	(%rax,%rax,4), %rsi
	leaq	(%rdx,%rdx,4), %r9
	movq	%rdx, %rdi
	movq	%rax, %r8
	leaq	(%rsi,%rsi,4), %rsi
	leaq	(%r9,%r9,4), %r9
	leaq	(%rax,%rsi,4), %rsi
	addq	%rdx, %rsi
	leaq	(%rdx,%r9,4), %rdx
	movl	12112(%rsp,%rsi,4), %esi
	addq	%rdx, %rax
	movl	%esi, 12112(%rsp,%rax,4)
	movq	8(%rsp), %rax
	movl	%esi, (%r15,%rbp,4)
	movl	%r8d, (%rax,%rbp,4)
	movq	16(%rsp), %rax
	movl	%edi, (%rax,%rbp,4)
	movl	60(%rsp), %eax
	addq	$1, %rbp
	cmpl	%ebp, %eax
	jge	.L3
	movl	%eax, 44(%rsp)
	movl	24(%rsp), %ecx
.L2:
	movl	56(%rsp), %r11d
	movl	$1, 48(%rsp)
	cmpl	$1, %r11d
	jle	.L4
	movl	$102, %r9d
	leaq	12524(%rsp), %r8
	leal	1(%r11), %ebx
	movl	$1, %edi
	leaq	12120(%rsp), %r10
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$1, %edi
	cmpl	%r11d, %edi
	jg	.L5
	movl	%r11d, %eax
	leaq	400(%r8), %rdx
	subl	%edi, %eax
	addq	%r9, %rax
	leaq	(%r10,%rax,4), %rsi
	movq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%rax), %ebp
	testl	%ebp, %ebp
	jne	.L6
	movl	$536870912, (%rax)
	movl	$536870912, (%rdx)
.L6:
	addq	$4, %rax
	addq	$404, %rdx
	cmpq	%rsi, %rax
	jne	.L7
	addq	$408, %r8
	addq	$102, %r9
	cmpl	%r11d, %edi
	jne	.L9
	movl	%ebx, 52(%rsp)
	movl	%r11d, 48(%rsp)
.L10:
	leaq	12116(%rsp), %r14
	movl	$1, 8(%rsp)
	leal	1(%r11), %ebp
	movl	$101, %r15d
	movq	%r14, 24(%rsp)
	leaq	12520(%rsp), %rax
	movq	%rbp, %r13
	movq	%rax, 16(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L17:
	cmpl	$1, %r11d
	jle	.L27
	movq	24(%rsp), %rdi
	movq	16(%rsp), %rbx
	movl	$2, %r9d
	leaq	12524(%rsp), %r10
	leaq	-1(%r15), %r12
	.p2align 4,,10
	.p2align 3
.L16:
	movl	%r9d, %ecx
	cmpl	%r9d, %r11d
	jl	.L13
	movl	%r11d, %edx
	leaq	(%r12,%r9), %rax
	leaq	400(%r10), %rsi
	movq	%r10, %rcx
	subl	%r9d, %edx
	addq	%rdx, %rax
	leaq	(%r14,%rax,4), %r8
	movq	%rbx, %rax
	.p2align 4,,10
	.p2align 3
.L15:
	movl	4(%rax), %edx
	addl	404(%rdi), %edx
	cmpl	(%rcx), %edx
	jge	.L14
	movl	%edx, (%rcx)
	movl	4(%rax), %edx
	addl	404(%rdi), %edx
	movl	%edx, (%rsi)
.L14:
	addq	$4, %rax
	addq	$4, %rcx
	addq	$404, %rsi
	cmpq	%r8, %rax
	jne	.L15
	movl	%r13d, %ecx
.L13:
	addq	$1, %r9
	addq	$4, %rbx
	addq	$408, %r10
	addq	$404, %rdi
	cmpq	%rbp, %r9
	jne	.L16
	addl	$1, 8(%rsp)
	movl	8(%rsp), %ebx
	addq	$101, %r15
	movl	$1, %eax
	addq	$404, 16(%rsp)
	addq	$4, 24(%rsp)
	cmpl	%r11d, %ebx
	jle	.L17
	movl	%r11d, %edx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L27:
	movl	$1, %edx
.L12:
	movl	%edx, 48(%rsp)
	testb	%al, %al
	je	.L11
	movl	%ecx, 52(%rsp)
.L11:
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L28
	movq	32(%rsp), %r14
	leal	1(%rax), %r13d
	movl	$1, %r10d
	xorl	%r12d, %r12d
	leaq	64(%rsp), %r9
	leaq	4080(%rsp), %r8
	.p2align 4,,10
	.p2align 3
.L24:
	movl	(%r9,%r10,4), %ebx
	movl	(%r8,%r10,4), %ebp
	testl	%r11d, %r11d
	jle	.L20
	movslq	%ebx, %rax
	movslq	%ebp, %rsi
	movl	$1, %ecx
	movl	8096(%rsp,%r10,4), %edi
	leaq	(%r14,%rax,4), %rdx
	subq	%rax, %rsi
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L45:
	addl	$1, %ecx
	addq	$404, %rdx
	cmpl	%r11d, %ecx
	jg	.L20
.L22:
	movl	404(%rdx), %eax
	subl	404(%rdx,%rsi,4), %eax
	movl	%eax, %r15d
	negl	%r15d
	cmovns	%r15d, %eax
	cmpl	%eax, %edi
	jne	.L45
	cmpl	%ecx, %r11d
	jl	.L20
.L23:
	addq	$1, %r10
	cmpq	%r13, %r10
	jne	.L24
	movl	%ebp, 52(%rsp)
	movl	%ebx, 48(%rsp)
.L19:
	movl	$1, %edi
	xorl	%eax, %eax
	movl	%r12d, %edx
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	52920(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L46
	addq	$52936, %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
.L20:
	.cfi_restore_state
	addl	$1, %r12d
	jmp	.L23
.L5:
	addq	$408, %r8
	addq	$102, %r9
	jmp	.L9
.L4:
	jne	.L11
	jmp	.L10
.L28:
	xorl	%r12d, %r12d
	jmp	.L19
.L46:
	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\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	-49152(%rsp), %r11
	.cfi_def_cfa 11, 49208
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3784, %rsp
	.cfi_def_cfa_offset 52992
	xorl	%esi, %esi
	movl	$40804, %edx
	leaq	.LC0(%rip), %rbx
	movl	%ecx, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 52920(%rsp)
	xorl	%eax, %eax
	leaq	12112(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, 32(%rsp)
	call	memset@PLT
	xorl	%eax, %eax
	leaq	60(%rsp), %rdx
	movq	%rbx, %rdi
	leaq	56(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %eax
	movl	8(%rsp), %ecx
	testl	%eax, %eax
	movl	%eax, 44(%rsp)
	jle	.L2
	leaq	64(%rsp), %r9
	leaq	4080(%rsp), %r8
	movl	%ecx, 24(%rsp)
	movl	$1, %r15d
	movq	%r9, 8(%rsp)
	leaq	52(%rsp), %r14
	leaq	8096(%rsp), %rbp
	movq	%r8, 16(%rsp)
	movq	%rbp, %rax
	leaq	48(%rsp), %r13
	movq	%r15, %rbp
	leaq	.LC1(%rip), %r12
	movq	%rax, %r15
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	48(%rsp), %rax
	movq	32(%rsp), %rsi
	movq	%r12, %rdi
	leaq	(%rax,%rax,4), %rdx
	leaq	(%rdx,%rdx,4), %rdx
	leaq	(%rax,%rdx,4), %rax
	movslq	52(%rsp), %rdx
	addq	%rdx, %rax
	leaq	(%rsi,%rax,4), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	48(%rsp), %rax
	movslq	52(%rsp), %rdx
	leaq	(%rax,%rax,4), %rsi
	leaq	(%rdx,%rdx,4), %r9
	movq	%rdx, %rdi
	movq	%rax, %r8
	leaq	(%rsi,%rsi,4), %rsi
	leaq	(%r9,%r9,4), %r9
	leaq	(%rax,%rsi,4), %rsi
	addq	%rdx, %rsi
	leaq	(%rdx,%r9,4), %rdx
	movl	12112(%rsp,%rsi,4), %esi
	addq	%rdx, %rax
	movl	%esi, 12112(%rsp,%rax,4)
	movq	8(%rsp), %rax
	movl	%esi, (%r15,%rbp,4)
	movl	%r8d, (%rax,%rbp,4)
	movq	16(%rsp), %rax
	movl	%edi, (%rax,%rbp,4)
	movl	60(%rsp), %eax
	addq	$1, %rbp
	cmpl	%ebp, %eax
	jge	.L3
	movl	%eax, 44(%rsp)
	movl	24(%rsp), %ecx
.L2:
	movl	56(%rsp), %r11d
	movl	$1, 48(%rsp)
	cmpl	$1, %r11d
	jle	.L4
	movl	$102, %r9d
	leaq	12524(%rsp), %r8
	leal	1(%r11), %ebx
	movl	$1, %edi
	leaq	12120(%rsp), %r10
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$1, %edi
	cmpl	%r11d, %edi
	jg	.L5
	movl	%r11d, %eax
	leaq	400(%r8), %rdx
	subl	%edi, %eax
	addq	%r9, %rax
	leaq	(%r10,%rax,4), %rsi
	movq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%rax), %ebp
	testl	%ebp, %ebp
	jne	.L6
	movl	$536870912, (%rax)
	movl	$536870912, (%rdx)
.L6:
	addq	$4, %rax
	addq	$404, %rdx
	cmpq	%rsi, %rax
	jne	.L7
	addq	$408, %r8
	addq	$102, %r9
	cmpl	%r11d, %edi
	jne	.L9
	movl	%ebx, 52(%rsp)
	movl	%r11d, 48(%rsp)
.L10:
	leaq	12116(%rsp), %r14
	movl	$1, 8(%rsp)
	leal	1(%r11), %ebp
	movl	$101, %r15d
	movq	%r14, 24(%rsp)
	leaq	12520(%rsp), %rax
	movq	%rbp, %r13
	movq	%rax, 16(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L17:
	cmpl	$1, %r11d
	jle	.L27
	movq	24(%rsp), %rdi
	movq	16(%rsp), %rbx
	movl	$2, %r9d
	leaq	12524(%rsp), %r10
	leaq	-1(%r15), %r12
	.p2align 4,,10
	.p2align 3
.L16:
	movl	%r9d, %ecx
	cmpl	%r9d, %r11d
	jl	.L13
	movl	%r11d, %edx
	leaq	(%r12,%r9), %rax
	leaq	400(%r10), %rsi
	movq	%r10, %rcx
	subl	%r9d, %edx
	addq	%rdx, %rax
	leaq	(%r14,%rax,4), %r8
	movq	%rbx, %rax
	.p2align 4,,10
	.p2align 3
.L15:
	movl	4(%rax), %edx
	addl	404(%rdi), %edx
	cmpl	(%rcx), %edx
	jge	.L14
	movl	%edx, (%rcx)
	movl	4(%rax), %edx
	addl	404(%rdi), %edx
	movl	%edx, (%rsi)
.L14:
	addq	$4, %rax
	addq	$4, %rcx
	addq	$404, %rsi
	cmpq	%r8, %rax
	jne	.L15
	movl	%r13d, %ecx
.L13:
	addq	$1, %r9
	addq	$4, %rbx
	addq	$408, %r10
	addq	$404, %rdi
	cmpq	%rbp, %r9
	jne	.L16
	addl	$1, 8(%rsp)
	movl	8(%rsp), %ebx
	addq	$101, %r15
	movl	$1, %eax
	addq	$404, 16(%rsp)
	addq	$4, 24(%rsp)
	cmpl	%r11d, %ebx
	jle	.L17
	movl	%r11d, %edx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L27:
	movl	$1, %edx
.L12:
	movl	%edx, 48(%rsp)
	testb	%al, %al
	je	.L11
	movl	%ecx, 52(%rsp)
.L11:
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L28
	movq	32(%rsp), %r14
	leal	1(%rax), %r13d
	movl	$1, %r10d
	xorl	%r12d, %r12d
	leaq	64(%rsp), %r9
	leaq	4080(%rsp), %r8
	.p2align 4,,10
	.p2align 3
.L24:
	movl	(%r9,%r10,4), %ebx
	movl	(%r8,%r10,4), %ebp
	testl	%r11d, %r11d
	jle	.L20
	movslq	%ebx, %rax
	movslq	%ebp, %rsi
	movl	$1, %ecx
	movl	8096(%rsp,%r10,4), %edi
	leaq	(%r14,%rax,4), %rdx
	subq	%rax, %rsi
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L45:
	addl	$1, %ecx
	addq	$404, %rdx
	cmpl	%r11d, %ecx
	jg	.L20
.L22:
	movl	404(%rdx), %eax
	subl	404(%rdx,%rsi,4), %eax
	movl	%eax, %r15d
	negl	%r15d
	cmovns	%r15d, %eax
	cmpl	%eax, %edi
	jne	.L45
	cmpl	%ecx, %r11d
	jl	.L20
.L23:
	addq	$1, %r10
	cmpq	%r13, %r10
	jne	.L24
	movl	%ebp, 52(%rsp)
	movl	%ebx, 48(%rsp)
.L19:
	movl	$1, %edi
	xorl	%eax, %eax
	movl	%r12d, %edx
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	52920(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L46
	addq	$52936, %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
.L20:
	.cfi_restore_state
	addl	$1, %r12d
	jmp	.L23
.L5:
	addq	$408, %r8
	addq	$102, %r9
	jmp	.L9
.L4:
	jne	.L11
	jmp	.L10
.L28:
	xorl	%r12d, %r12d
	jmp	.L19
.L46:
	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>

int main()
{
	int i, u, v, w, N, M, dist[101][101] = {}, a[1001], b[1001], c[1001];
	scanf("%d %d", &N, &M);
	for (i = 1; i <= M; i++) {
		scanf("%d %d", &u, &w);
		scanf("%d", &(dist[u][w]));
		dist[w][u] = dist[u][w];
		a[i] = u;
		b[i] = w;
		c[i] = dist[u][w];
	}
	for (u = 1; u < N; u++) {
		for (w = u + 1; w <= N; w++) {
			if (dist[u][w] == 0) {
				dist[u][w] = 1 << 29;
				dist[w][u] = 1 << 29;
			}
		}
	}
	
	for (v = 1; v <= N; v++) {
		for (u = 1; u < N; u++) {
			for (w = u + 1; w <= N; w++) {
				if (dist[u][v] + dist[v][w] < dist[u][w]) {
					dist[u][w] = dist[u][v] + dist[v][w];
					dist[w][u] = dist[u][v] + dist[v][w];
				}
			}
		}
	}
	
	int sum = 0;
	for (i = 1; i <= M; i++) {
		u = a[i];
		w = b[i];
		for (v = 1; v <= N; v++) if (c[i] == abs(dist[v][u] - dist[v][w])) break;
		if (v > N) sum++;
	}
	printf("%d\n", sum);
	fflush(stdout);
	return 0;
}
3 3
1 2 2
1 3 1
2 3 3
 4 3
1 2 1
1 3 1
2 3 3
 3 2
1 2 2
2 3 1
 3 2
1 3 2
2 3 1
 3 2
1 3 2
2 0 1
 3 2
1 2 2
2 0 1
 3 2
2 2 2
2 0 1
 3 2
1 1 1
2 3 1
 3 3
1 2 2
1 3 1
2 3 0
 3 2
1 3 2
2 1 1

0
 1
 0
 0
 0
 0
 1
 1
 1
 0

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>

int main()
{
	int i, u, v, w, N, M, dist[101][101] = {}, a[1001], b[1001], c[1001];
	scanf("%d %d", &N, &M);
	for (i = 1; i <= M; i++) {
		scanf("%d %d", &u, &w);
		scanf("%d", &(dist[u][w]));
		dist[w][u] = dist[u][w];
		a[i] = u;
		b[i] = w;
		c[i] = dist[u][w];
	}
	for (u = 1; u < N; u++) {
		for (w = u + 1; w <= N; w++) {
			if (dist[u][w] == 0) {
				dist[u][w] = 1 << 29;
				dist[w][u] = 1 << 29;
			}
		}
	}
	
	for (v = 1; v <= N; v++) {
		for (u = 1; u < N; u++) {
			for (w = u + 1; w <= N; w++) {
				if (dist[u][v] + dist[v][w] < dist[u][w]) {
					dist[u][w] = dist[u][v] + dist[v][w];
					dist[w][u] = dist[u][v] + dist[v][w];
				}
			}
		}
	}
	
	int sum = 0;
	for (i = 1; i <= M; i++) {
		u = a[i];
		w = b[i];
		for (v = 1; v <= N; v++) if (c[i] == abs(dist[v][u] - dist[v][w])) break;
		if (v > N) sum++;
	}
	printf("%d\n", sum);
	fflush(stdout);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.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	-49152(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3744, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40816(%rbp), %rax
	movl	$40804, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-52880(%rbp), %rdx
	leaq	-52884(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -52876(%rbp)
	jmp	.L2
.L3:
	leaq	-52888(%rbp), %rdx
	leaq	-52892(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	leaq	-40816(%rbp), %rcx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	movl	-52888(%rbp), %esi
	movl	-52892(%rbp), %edi
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r8
	addq	%r8, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %ecx
	movslq	%edi, %rdi
	movslq	%esi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	movl	%ecx, -40816(%rbp,%rax,4)
	movl	-52892(%rbp), %edx
	movl	-52876(%rbp), %eax
	cltq
	movl	%edx, -52864(%rbp,%rax,4)
	movl	-52888(%rbp), %edx
	movl	-52876(%rbp), %eax
	cltq
	movl	%edx, -48848(%rbp,%rax,4)
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %edx
	movl	-52876(%rbp), %eax
	cltq
	movl	%edx, -44832(%rbp,%rax,4)
	addl	$1, -52876(%rbp)
.L2:
	movl	-52880(%rbp), %eax
	cmpl	%eax, -52876(%rbp)
	jle	.L3
	movl	$1, -52892(%rbp)
	jmp	.L4
.L8:
	movl	-52892(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52888(%rbp)
	jmp	.L5
.L7:
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L6
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$536870912, -40816(%rbp,%rax,4)
	movl	-52888(%rbp), %eax
	movl	-52892(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$536870912, -40816(%rbp,%rax,4)
.L6:
	movl	-52888(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52888(%rbp)
.L5:
	movl	-52888(%rbp), %edx
	movl	-52884(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L7
	movl	-52892(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52892(%rbp)
.L4:
	movl	-52892(%rbp), %edx
	movl	-52884(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L8
	movl	$1, -52872(%rbp)
	jmp	.L9
.L15:
	movl	$1, -52892(%rbp)
	jmp	.L10
.L14:
	movl	-52892(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52888(%rbp)
	jmp	.L11
.L13:
	movl	-52892(%rbp), %eax
	movl	-52872(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %ecx
	movl	-52888(%rbp), %eax
	movslq	%eax, %rsi
	movl	-52872(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-40816(%rbp,%rax,4), %eax
	addl	%eax, %ecx
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-40816(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jge	.L12
	movl	-52892(%rbp), %eax
	movl	-52872(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %esi
	movl	-52888(%rbp), %eax
	movslq	%eax, %rcx
	movl	-52872(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %ecx
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	addl	%esi, %ecx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -40816(%rbp,%rax,4)
	movl	-52892(%rbp), %eax
	movl	-52872(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %esi
	movl	-52888(%rbp), %eax
	movslq	%eax, %rcx
	movl	-52872(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %ecx
	movl	-52888(%rbp), %eax
	movl	-52892(%rbp), %edx
	addl	%esi, %ecx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -40816(%rbp,%rax,4)
.L12:
	movl	-52888(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52888(%rbp)
.L11:
	movl	-52888(%rbp), %edx
	movl	-52884(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L13
	movl	-52892(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52892(%rbp)
.L10:
	movl	-52892(%rbp), %edx
	movl	-52884(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L14
	addl	$1, -52872(%rbp)
.L9:
	movl	-52884(%rbp), %eax
	cmpl	%eax, -52872(%rbp)
	jle	.L15
	movl	$0, -52868(%rbp)
	movl	$1, -52876(%rbp)
	jmp	.L16
.L22:
	movl	-52876(%rbp), %eax
	cltq
	movl	-52864(%rbp,%rax,4), %eax
	movl	%eax, -52892(%rbp)
	movl	-52876(%rbp), %eax
	cltq
	movl	-48848(%rbp,%rax,4), %eax
	movl	%eax, -52888(%rbp)
	movl	$1, -52872(%rbp)
	jmp	.L17
.L20:
	movl	-52876(%rbp), %eax
	cltq
	movl	-44832(%rbp,%rax,4), %ecx
	movl	-52892(%rbp), %eax
	movslq	%eax, %rsi
	movl	-52872(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-40816(%rbp,%rax,4), %esi
	movl	-52888(%rbp), %eax
	movslq	%eax, %rdi
	movl	-52872(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r8
	addq	%r8, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	movl	-40816(%rbp,%rax,4), %edx
	movl	%esi, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	cmpl	%eax, %ecx
	je	.L25
	addl	$1, -52872(%rbp)
.L17:
	movl	-52884(%rbp), %eax
	cmpl	%eax, -52872(%rbp)
	jle	.L20
	jmp	.L19
.L25:
	nop
.L19:
	movl	-52884(%rbp), %eax
	cmpl	%eax, -52872(%rbp)
	jle	.L21
	addl	$1, -52868(%rbp)
.L21:
	addl	$1, -52876(%rbp)
.L16:
	movl	-52880(%rbp), %eax
	cmpl	%eax, -52876(%rbp)
	jle	.L22
	movl	-52868(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	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\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	-49152(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3744, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40816(%rbp), %rax
	movl	$40804, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-52880(%rbp), %rdx
	leaq	-52884(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -52876(%rbp)
	jmp	.L2
.L3:
	leaq	-52888(%rbp), %rdx
	leaq	-52892(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	leaq	-40816(%rbp), %rcx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	movl	-52888(%rbp), %esi
	movl	-52892(%rbp), %edi
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r8
	addq	%r8, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %ecx
	movslq	%edi, %rdi
	movslq	%esi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	movl	%ecx, -40816(%rbp,%rax,4)
	movl	-52892(%rbp), %edx
	movl	-52876(%rbp), %eax
	cltq
	movl	%edx, -52864(%rbp,%rax,4)
	movl	-52888(%rbp), %edx
	movl	-52876(%rbp), %eax
	cltq
	movl	%edx, -48848(%rbp,%rax,4)
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %edx
	movl	-52876(%rbp), %eax
	cltq
	movl	%edx, -44832(%rbp,%rax,4)
	addl	$1, -52876(%rbp)
.L2:
	movl	-52880(%rbp), %eax
	cmpl	%eax, -52876(%rbp)
	jle	.L3
	movl	$1, -52892(%rbp)
	jmp	.L4
.L8:
	movl	-52892(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52888(%rbp)
	jmp	.L5
.L7:
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L6
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$536870912, -40816(%rbp,%rax,4)
	movl	-52888(%rbp), %eax
	movl	-52892(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$536870912, -40816(%rbp,%rax,4)
.L6:
	movl	-52888(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52888(%rbp)
.L5:
	movl	-52888(%rbp), %edx
	movl	-52884(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L7
	movl	-52892(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52892(%rbp)
.L4:
	movl	-52892(%rbp), %edx
	movl	-52884(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L8
	movl	$1, -52872(%rbp)
	jmp	.L9
.L15:
	movl	$1, -52892(%rbp)
	jmp	.L10
.L14:
	movl	-52892(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52888(%rbp)
	jmp	.L11
.L13:
	movl	-52892(%rbp), %eax
	movl	-52872(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %ecx
	movl	-52888(%rbp), %eax
	movslq	%eax, %rsi
	movl	-52872(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-40816(%rbp,%rax,4), %eax
	addl	%eax, %ecx
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-40816(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jge	.L12
	movl	-52892(%rbp), %eax
	movl	-52872(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %esi
	movl	-52888(%rbp), %eax
	movslq	%eax, %rcx
	movl	-52872(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %ecx
	movl	-52892(%rbp), %eax
	movl	-52888(%rbp), %edx
	addl	%esi, %ecx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -40816(%rbp,%rax,4)
	movl	-52892(%rbp), %eax
	movl	-52872(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %esi
	movl	-52888(%rbp), %eax
	movslq	%eax, %rcx
	movl	-52872(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-40816(%rbp,%rax,4), %ecx
	movl	-52888(%rbp), %eax
	movl	-52892(%rbp), %edx
	addl	%esi, %ecx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -40816(%rbp,%rax,4)
.L12:
	movl	-52888(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52888(%rbp)
.L11:
	movl	-52888(%rbp), %edx
	movl	-52884(%rbp), %eax
	cmpl	%eax, %edx
	jle	.L13
	movl	-52892(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -52892(%rbp)
.L10:
	movl	-52892(%rbp), %edx
	movl	-52884(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L14
	addl	$1, -52872(%rbp)
.L9:
	movl	-52884(%rbp), %eax
	cmpl	%eax, -52872(%rbp)
	jle	.L15
	movl	$0, -52868(%rbp)
	movl	$1, -52876(%rbp)
	jmp	.L16
.L22:
	movl	-52876(%rbp), %eax
	cltq
	movl	-52864(%rbp,%rax,4), %eax
	movl	%eax, -52892(%rbp)
	movl	-52876(%rbp), %eax
	cltq
	movl	-48848(%rbp,%rax,4), %eax
	movl	%eax, -52888(%rbp)
	movl	$1, -52872(%rbp)
	jmp	.L17
.L20:
	movl	-52876(%rbp), %eax
	cltq
	movl	-44832(%rbp,%rax,4), %ecx
	movl	-52892(%rbp), %eax
	movslq	%eax, %rsi
	movl	-52872(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-40816(%rbp,%rax,4), %esi
	movl	-52888(%rbp), %eax
	movslq	%eax, %rdi
	movl	-52872(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r8
	addq	%r8, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	movl	-40816(%rbp,%rax,4), %edx
	movl	%esi, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	cmpl	%eax, %ecx
	je	.L25
	addl	$1, -52872(%rbp)
.L17:
	movl	-52884(%rbp), %eax
	cmpl	%eax, -52872(%rbp)
	jle	.L20
	jmp	.L19
.L25:
	nop
.L19:
	movl	-52884(%rbp), %eax
	cmpl	%eax, -52872(%rbp)
	jle	.L21
	addl	$1, -52868(%rbp)
.L21:
	addl	$1, -52876(%rbp)
.L16:
	movl	-52880(%rbp), %eax
	cmpl	%eax, -52876(%rbp)
	jle	.L22
	movl	-52868(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	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:
