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>
#define M 100000000
int main(){
  int n,m,min,mi,i,j,k,s;
  int d[10][10];
  while(scanf("%d",&n),n){
    min=M;
    for(i=m=0;i<100;i++)d[i/10][i%10]=M;
    while(n--){
      scanf("%d %d %d",&i,&j,&k);
      d[i][j]=d[j][i]=k;
      d[i][i]=d[j][j]=0;
      if(m<i)m=i;
      if(m<j)m=j;
    }
    m++;
    for(k=0;k<m;k++){
      for(i=0;i<m;i++){
	for(j=0;j<m;j++){
	  if(d[i][j]>d[i][k]+d[k][j])d[i][j]=d[i][k]+d[k][j];
	}
      }
    }
    for(i=0;i<m;i++){
      for(j=s=0;j<m;j++){
	if(d[i][j]==M)continue;
	s+=d[i][j];
      }
      if(min>s){
	min=s;
	mi=i;
      }
    }
    printf("%d %d\n",mi,min);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d\n"
.LC2:
	.string	"%d"
	.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	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L22:
	movl	$100000000, -428(%rbp)
	movl	$0, -432(%rbp)
	movl	-432(%rbp), %eax
	movl	%eax, -444(%rbp)
	jmp	.L3
.L4:
	movl	-444(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%edx, %esi
	subl	%eax, %esi
	movl	-444(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %edi
	sarl	$31, %edi
	subl	%edi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movslq	%edx, %rcx
	movslq	%esi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	$100000000, -416(%rbp,%rax,4)
	movl	-444(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -444(%rbp)
.L3:
	movl	-444(%rbp), %eax
	cmpl	$99, %eax
	jle	.L4
	jmp	.L5
.L7:
	leaq	-436(%rbp), %rcx
	leaq	-440(%rbp), %rdx
	leaq	-444(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-440(%rbp), %edx
	movl	-444(%rbp), %ecx
	movl	-436(%rbp), %esi
	movslq	%ecx, %r8
	movslq	%edx, %rdi
	movq	%rdi, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rax, %rax
	addq	%r8, %rax
	movl	%esi, -416(%rbp,%rax,4)
	movl	-444(%rbp), %esi
	movl	-440(%rbp), %edi
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %edx
	movslq	%edi, %rdi
	movslq	%esi, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	%edx, -416(%rbp,%rax,4)
	movl	-440(%rbp), %edx
	movl	-440(%rbp), %ecx
	movslq	%ecx, %rdi
	movslq	%edx, %rsi
	movq	%rsi, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	$0, -416(%rbp,%rax,4)
	movl	-444(%rbp), %esi
	movl	-444(%rbp), %edi
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %edx
	movslq	%edi, %rdi
	movslq	%esi, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	%edx, -416(%rbp,%rax,4)
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jge	.L6
	movl	-444(%rbp), %eax
	movl	%eax, -432(%rbp)
.L6:
	movl	-440(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jge	.L5
	movl	-440(%rbp), %eax
	movl	%eax, -432(%rbp)
.L5:
	movl	-448(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -448(%rbp)
	testl	%eax, %eax
	jne	.L7
	addl	$1, -432(%rbp)
	movl	$0, -436(%rbp)
	jmp	.L8
.L14:
	movl	$0, -444(%rbp)
	jmp	.L9
.L13:
	movl	$0, -440(%rbp)
	jmp	.L10
.L12:
	movl	-444(%rbp), %eax
	movl	-440(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %ecx
	movl	-444(%rbp), %eax
	movl	-436(%rbp), %edx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-416(%rbp,%rax,4), %esi
	movl	-436(%rbp), %eax
	movl	-440(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	-416(%rbp,%rax,4), %eax
	addl	%esi, %eax
	cmpl	%eax, %ecx
	jle	.L11
	movl	-444(%rbp), %eax
	movl	-436(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %esi
	movl	-436(%rbp), %eax
	movl	-440(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %ecx
	movl	-444(%rbp), %eax
	movl	-440(%rbp), %edx
	addl	%esi, %ecx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%ecx, -416(%rbp,%rax,4)
.L11:
	movl	-440(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -440(%rbp)
.L10:
	movl	-440(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jg	.L12
	movl	-444(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -444(%rbp)
.L9:
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jg	.L13
	movl	-436(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -436(%rbp)
.L8:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jg	.L14
	movl	$0, -444(%rbp)
	jmp	.L15
.L21:
	movl	$0, -420(%rbp)
	movl	-420(%rbp), %eax
	movl	%eax, -440(%rbp)
	jmp	.L16
.L19:
	movl	-444(%rbp), %eax
	movl	-440(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %eax
	cmpl	$100000000, %eax
	je	.L25
	movl	-444(%rbp), %eax
	movl	-440(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %eax
	addl	%eax, -420(%rbp)
	jmp	.L18
.L25:
	nop
.L18:
	movl	-440(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -440(%rbp)
.L16:
	movl	-440(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jg	.L19
	movl	-428(%rbp), %eax
	cmpl	-420(%rbp), %eax
	jle	.L20
	movl	-420(%rbp), %eax
	movl	%eax, -428(%rbp)
	movl	-444(%rbp), %eax
	movl	%eax, -424(%rbp)
.L20:
	movl	-444(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -444(%rbp)
.L15:
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jg	.L21
	movl	-428(%rbp), %edx
	movl	-424(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-448(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-448(%rbp), %eax
	testl	%eax, %eax
	jne	.L22
	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
.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 %d"
.LC2:
	.string	"%d %d\n"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$552, %rsp
	.cfi_def_cfa_offset 608
	movq	%fs:40, %rax
	movq	%rax, 536(%rsp)
	xorl	%eax, %eax
	leaq	112(%rsp), %rax
	movq	%rax, 104(%rsp)
.L2:
	movq	104(%rsp), %rsi
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	112(%rsp), %edi
	testl	%edi, %edi
	je	.L67
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%edx, %eax
	movl	$3435973837, %ebx
	movl	%edx, %ecx
	addl	$1, %edx
	imulq	%rbx, %rax
	shrq	$35, %rax
	leal	(%rax,%rax,4), %esi
	cltq
	addl	%esi, %esi
	leaq	(%rax,%rax,4), %rax
	subl	%esi, %ecx
	movslq	%ecx, %rcx
	leaq	(%rcx,%rax,2), %rax
	movl	$100000000, 128(%rsp,%rax,4)
	cmpl	$100, %edx
	jne	.L3
	subl	$1, %edi
	leaq	124(%rsp), %r14
	leaq	120(%rsp), %r13
	xorl	%ebx, %ebx
	movl	%edi, 112(%rsp)
	leaq	116(%rsp), %r12
	leaq	.LC0(%rip), %rbp
	movl	$100, 116(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	120(%rsp), %rdi
	movslq	116(%rsp), %rsi
	movl	124(%rsp), %r9d
	leaq	(%rdi,%rdi,4), %rcx
	movq	%rdi, %rax
	addq	%rcx, %rcx
	leaq	(%rcx,%rsi), %rdx
	addq	%rdi, %rcx
	movl	%r9d, 128(%rsp,%rdx,4)
	leaq	(%rsi,%rsi,4), %rdx
	addq	%rdx, %rdx
	leaq	(%rdx,%rdi), %r10
	addq	%rsi, %rdx
	cmpl	%esi, %edi
	cmovl	%esi, %eax
	movl	%r9d, 128(%rsp,%r10,4)
	movl	$0, 128(%rsp,%rcx,4)
	movl	$0, 128(%rsp,%rdx,4)
	cmpl	%eax, %ebx
	cmovl	%eax, %ebx
	movl	112(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 112(%rsp)
	testl	%eax, %eax
	jne	.L4
	leaq	128(%rsp), %rcx
	xorl	%r11d, %r11d
	movq	$0, 72(%rsp)
	movq	%rcx, %rax
	movq	%rcx, 88(%rsp)
	negq	%rax
	movq	%rax, 80(%rsp)
	movslq	%ebx, %rax
	movq	%rax, 32(%rsp)
	leaq	4(,%rax,4), %rax
	movq	%rax, 8(%rsp)
	leal	1(%rbx), %eax
	movl	%eax, %edx
	movl	%eax, 20(%rsp)
	andl	$-4, %eax
	shrl	$2, %edx
	movl	%eax, %r10d
	leal	1(%rax), %esi
	movl	%edx, 16(%rsp)
	movl	$4, %edx
	leal	2(%rax), %eax
	subq	%rcx, %rdx
	movl	%esi, 96(%rsp)
	movslq	%eax, %rbp
	movq	%rdx, 40(%rsp)
	movslq	%r10d, %rdx
	movq	%rdx, 48(%rsp)
	movslq	%esi, %rdx
	movq	%rdx, 56(%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	72(%rsp), %rsi
	movq	80(%rsp), %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	movq	48(%rsp), %r12
	movq	88(%rsp), %rax
	leaq	(%rsi,%rsi,4), %rsi
	subq	$4, %rdi
	addq	%rsi, %rsi
	movq	%rdi, 24(%rsp)
	leaq	(%rax,%r11), %rdx
	movq	%rsi, 64(%rsp)
	addq	%rsi, %r12
	addq	56(%rsp), %rsi
	movq	%rsi, %r13
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%rsi, %r9
.L9:
	movq	40(%rsp), %rdi
	movq	8(%rsp), %r14
	leaq	(%r8,%r11), %r15
	movslq	%r9d, %rsi
	addq	%rdx, %rdi
	cmpq	%r8, %rdi
	setle	%dil
	addq	%r8, %r14
	cmpq	%r14, %r15
	setge	%r14b
	orb	%dil, %r14b
	je	.L5
	movq	24(%rsp), %rdi
	addq	%rax, %rdi
	cmpq	$8, %rdi
	seta	%r14b
	cmpl	$2, %ebx
	seta	%dil
	testb	%dil, %r14b
	je	.L5
	movd	(%rdx), %xmm4
	movdqu	(%rcx), %xmm2
	movdqu	(%rax), %xmm5
	cmpl	$1, 16(%rsp)
	pshufd	$0, %xmm4, %xmm3
	paddd	%xmm3, %xmm2
	movdqa	%xmm5, %xmm1
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm5, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movups	%xmm0, (%rax)
	jbe	.L6
	movdqu	16(%rcx), %xmm2
	movdqu	16(%rax), %xmm6
	paddd	%xmm3, %xmm2
	movdqa	%xmm6, %xmm1
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm6, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movups	%xmm0, 16(%rax)
.L6:
	cmpl	%r10d, 20(%rsp)
	je	.L8
	movq	48(%rsp), %rdi
	leaq	(%rsi,%rsi,4), %rsi
	addq	%rsi, %rsi
	leaq	(%rsi,%rdi), %r14
	movl	128(%rsp,%r12,4), %edi
	addl	(%rdx), %edi
	movl	128(%rsp,%r14,4), %r15d
	cmpl	%r15d, %edi
	cmovg	%r15d, %edi
	movl	%edi, 128(%rsp,%r14,4)
	cmpl	%r10d, %ebx
	jle	.L8
	movq	56(%rsp), %rdi
	leaq	(%rsi,%rdi), %r14
	movl	128(%rsp,%r13,4), %edi
	addl	(%rdx), %edi
	movl	128(%rsp,%r14,4), %r15d
	cmpl	%r15d, %edi
	cmovg	%r15d, %edi
	movl	%edi, 128(%rsp,%r14,4)
	cmpl	96(%rsp), %ebx
	jle	.L8
	movq	64(%rsp), %rdi
	addq	%rbp, %rsi
	movl	128(%rsp,%rsi,4), %r14d
	addq	%rbp, %rdi
	movl	128(%rsp,%rdi,4), %edi
	addl	(%rdx), %edi
	cmpl	%r14d, %edi
	cmovg	%r14d, %edi
	movl	%edi, 128(%rsp,%rsi,4)
.L8:
	leaq	1(%r9), %rsi
	addq	$40, %r8
	addq	$40, %rax
	addq	$40, %rdx
	cmpq	32(%rsp), %r9
	jne	.L21
	addq	$1, 72(%rsp)
	addq	$40, %rcx
	addq	$4, %r11
	subq	$40, 80(%rsp)
	cmpq	8(%rsp), %r11
	jne	.L10
	movl	20(%rsp), %r11d
	movl	16(%rsp), %ebp
	xorl	%edi, %edi
	movl	$100000000, %r8d
	movl	100(%rsp), %r12d
	movq	88(%rsp), %r9
	movl	%r11d, 120(%rsp)
	movl	%r11d, 116(%rsp)
	movl	%r11d, 124(%rsp)
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L23:
	movl	%eax, %edi
.L19:
	cmpl	$2, %ebx
	jle	.L22
	movdqu	(%r9), %xmm0
	movdqu	(%r9), %xmm7
	pcmpeqd	.LC1(%rip), %xmm0
	pandn	%xmm7, %xmm0
	cmpl	$1, %ebp
	jbe	.L12
	movdqu	16(%r9), %xmm1
	movdqu	16(%r9), %xmm7
	pcmpeqd	.LC1(%rip), %xmm1
	pandn	%xmm7, %xmm1
	paddd	%xmm1, %xmm0
.L12:
	movdqa	%xmm0, %xmm1
	movl	%r10d, %edx
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%r10d, %r11d
	je	.L13
.L11:
	movslq	%edi, %rcx
	movslq	%edx, %rsi
	leaq	(%rcx,%rcx,4), %rcx
	addq	%rcx, %rcx
	addq	%rcx, %rsi
	movl	128(%rsp,%rsi,4), %esi
	leal	(%rax,%rsi), %r13d
	cmpl	$100000000, %esi
	cmovne	%r13d, %eax
	leal	1(%rdx), %r13d
	cmpl	%edx, %ebx
	jle	.L13
	movslq	%r13d, %rsi
	addq	%rcx, %rsi
	movl	128(%rsp,%rsi,4), %esi
	cmpl	$100000000, %esi
	leal	(%rax,%rsi), %r14d
	cmovne	%r14d, %eax
	addl	$2, %edx
	cmpl	%r13d, %ebx
	jle	.L13
	movslq	%edx, %rdx
	addq	%rdx, %rcx
	movl	128(%rsp,%rcx,4), %edx
	leal	(%rax,%rdx), %ecx
	cmpl	$100000000, %edx
	cmovne	%ecx, %eax
.L13:
	cmpl	%eax, %r8d
	jle	.L18
	movl	%edi, %r12d
	movl	%eax, %r8d
.L18:
	leal	1(%rdi), %eax
	addq	$40, %r9
	cmpl	%ebx, %edi
	jne	.L23
	movl	%r12d, %edx
	movl	%r8d, %ecx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	movl	%r12d, 100(%rsp)
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rax), %edi
	movl	(%rcx), %esi
	addl	(%rdx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, (%rax)
	testl	%ebx, %ebx
	je	.L8
	movl	4(%rax), %edi
	movl	(%rdx), %esi
	addl	4(%rcx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, 4(%rax)
	cmpl	$1, %ebx
	je	.L8
	movl	8(%rax), %edi
	movl	(%rdx), %esi
	addl	8(%rcx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, 8(%rax)
	cmpl	$2, %ebx
	je	.L8
	movl	12(%rax), %edi
	movl	12(%rcx), %esi
	addl	(%rdx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, 12(%rax)
	cmpl	$3, %ebx
	je	.L8
	movl	16(%rax), %edi
	movl	16(%rcx), %esi
	addl	(%rdx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, 16(%rax)
	cmpl	$4, %ebx
	je	.L8
	movl	20(%rax), %edi
	movl	20(%rcx), %esi
	addl	(%rdx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, 20(%rax)
	cmpl	$5, %ebx
	je	.L8
	movl	24(%rax), %edi
	movl	24(%rcx), %esi
	addl	(%rdx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, 24(%rax)
	cmpl	$6, %ebx
	je	.L8
	movl	28(%rax), %edi
	movl	28(%rcx), %esi
	addl	(%rdx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, 28(%rax)
	cmpl	$7, %ebx
	je	.L8
	movl	32(%rax), %edi
	movl	32(%rcx), %esi
	addl	(%rdx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, 32(%rax)
	cmpl	$8, %ebx
	je	.L8
	movl	36(%rax), %edi
	movl	(%rdx), %esi
	addl	36(%rcx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, 36(%rax)
	jmp	.L8
.L22:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L11
.L67:
	movq	536(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L68
	addq	$552, %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
.L68:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	100000000
	.long	100000000
	.long	100000000
	.long	100000000
	.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 %d"
.LC2:
	.string	"%d %d\n"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$552, %rsp
	.cfi_def_cfa_offset 608
	movq	%fs:40, %rax
	movq	%rax, 536(%rsp)
	xorl	%eax, %eax
	leaq	112(%rsp), %rax
	movq	%rax, 104(%rsp)
.L2:
	movq	104(%rsp), %rsi
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	112(%rsp), %edi
	testl	%edi, %edi
	je	.L67
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%edx, %eax
	movl	$3435973837, %ebx
	movl	%edx, %ecx
	addl	$1, %edx
	imulq	%rbx, %rax
	shrq	$35, %rax
	leal	(%rax,%rax,4), %esi
	cltq
	addl	%esi, %esi
	leaq	(%rax,%rax,4), %rax
	subl	%esi, %ecx
	movslq	%ecx, %rcx
	leaq	(%rcx,%rax,2), %rax
	movl	$100000000, 128(%rsp,%rax,4)
	cmpl	$100, %edx
	jne	.L3
	subl	$1, %edi
	leaq	124(%rsp), %r14
	leaq	120(%rsp), %r13
	xorl	%ebx, %ebx
	movl	%edi, 112(%rsp)
	leaq	116(%rsp), %r12
	leaq	.LC0(%rip), %rbp
	movl	$100, 116(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	120(%rsp), %rdi
	movslq	116(%rsp), %rsi
	movl	124(%rsp), %r9d
	leaq	(%rdi,%rdi,4), %rcx
	movq	%rdi, %rax
	addq	%rcx, %rcx
	leaq	(%rcx,%rsi), %rdx
	addq	%rdi, %rcx
	movl	%r9d, 128(%rsp,%rdx,4)
	leaq	(%rsi,%rsi,4), %rdx
	addq	%rdx, %rdx
	leaq	(%rdx,%rdi), %r10
	addq	%rsi, %rdx
	cmpl	%esi, %edi
	cmovl	%esi, %eax
	movl	%r9d, 128(%rsp,%r10,4)
	movl	$0, 128(%rsp,%rcx,4)
	movl	$0, 128(%rsp,%rdx,4)
	cmpl	%eax, %ebx
	cmovl	%eax, %ebx
	movl	112(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 112(%rsp)
	testl	%eax, %eax
	jne	.L4
	leaq	128(%rsp), %rcx
	xorl	%r11d, %r11d
	movq	$0, 72(%rsp)
	movq	%rcx, %rax
	movq	%rcx, 88(%rsp)
	negq	%rax
	movq	%rax, 80(%rsp)
	movslq	%ebx, %rax
	movq	%rax, 32(%rsp)
	leaq	4(,%rax,4), %rax
	movq	%rax, 8(%rsp)
	leal	1(%rbx), %eax
	movl	%eax, %edx
	movl	%eax, 20(%rsp)
	andl	$-4, %eax
	shrl	$2, %edx
	movl	%eax, %r10d
	leal	1(%rax), %esi
	movl	%edx, 16(%rsp)
	movl	$4, %edx
	leal	2(%rax), %eax
	subq	%rcx, %rdx
	movl	%esi, 96(%rsp)
	movslq	%eax, %rbp
	movq	%rdx, 40(%rsp)
	movslq	%r10d, %rdx
	movq	%rdx, 48(%rsp)
	movslq	%esi, %rdx
	movq	%rdx, 56(%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	72(%rsp), %rsi
	movq	80(%rsp), %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	movq	48(%rsp), %r12
	movq	88(%rsp), %rax
	leaq	(%rsi,%rsi,4), %rsi
	subq	$4, %rdi
	addq	%rsi, %rsi
	movq	%rdi, 24(%rsp)
	leaq	(%rax,%r11), %rdx
	movq	%rsi, 64(%rsp)
	addq	%rsi, %r12
	addq	56(%rsp), %rsi
	movq	%rsi, %r13
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%rsi, %r9
.L9:
	movq	40(%rsp), %rdi
	movq	8(%rsp), %r14
	leaq	(%r8,%r11), %r15
	movslq	%r9d, %rsi
	addq	%rdx, %rdi
	cmpq	%r8, %rdi
	setle	%dil
	addq	%r8, %r14
	cmpq	%r14, %r15
	setge	%r14b
	orb	%dil, %r14b
	je	.L5
	movq	24(%rsp), %rdi
	addq	%rax, %rdi
	cmpq	$8, %rdi
	seta	%r14b
	cmpl	$2, %ebx
	seta	%dil
	testb	%dil, %r14b
	je	.L5
	movd	(%rdx), %xmm4
	movdqu	(%rcx), %xmm2
	movdqu	(%rax), %xmm5
	cmpl	$1, 16(%rsp)
	pshufd	$0, %xmm4, %xmm3
	paddd	%xmm3, %xmm2
	movdqa	%xmm5, %xmm1
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm5, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movups	%xmm0, (%rax)
	jbe	.L6
	movdqu	16(%rcx), %xmm2
	movdqu	16(%rax), %xmm6
	paddd	%xmm3, %xmm2
	movdqa	%xmm6, %xmm1
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm6, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movups	%xmm0, 16(%rax)
.L6:
	cmpl	%r10d, 20(%rsp)
	je	.L8
	movq	48(%rsp), %rdi
	leaq	(%rsi,%rsi,4), %rsi
	addq	%rsi, %rsi
	leaq	(%rsi,%rdi), %r14
	movl	128(%rsp,%r12,4), %edi
	addl	(%rdx), %edi
	movl	128(%rsp,%r14,4), %r15d
	cmpl	%r15d, %edi
	cmovg	%r15d, %edi
	movl	%edi, 128(%rsp,%r14,4)
	cmpl	%r10d, %ebx
	jle	.L8
	movq	56(%rsp), %rdi
	leaq	(%rsi,%rdi), %r14
	movl	128(%rsp,%r13,4), %edi
	addl	(%rdx), %edi
	movl	128(%rsp,%r14,4), %r15d
	cmpl	%r15d, %edi
	cmovg	%r15d, %edi
	movl	%edi, 128(%rsp,%r14,4)
	cmpl	96(%rsp), %ebx
	jle	.L8
	movq	64(%rsp), %rdi
	addq	%rbp, %rsi
	movl	128(%rsp,%rsi,4), %r14d
	addq	%rbp, %rdi
	movl	128(%rsp,%rdi,4), %edi
	addl	(%rdx), %edi
	cmpl	%r14d, %edi
	cmovg	%r14d, %edi
	movl	%edi, 128(%rsp,%rsi,4)
.L8:
	leaq	1(%r9), %rsi
	addq	$40, %r8
	addq	$40, %rax
	addq	$40, %rdx
	cmpq	32(%rsp), %r9
	jne	.L21
	addq	$1, 72(%rsp)
	addq	$40, %rcx
	addq	$4, %r11
	subq	$40, 80(%rsp)
	cmpq	8(%rsp), %r11
	jne	.L10
	movl	20(%rsp), %r11d
	movl	16(%rsp), %ebp
	xorl	%edi, %edi
	movl	$100000000, %r8d
	movl	100(%rsp), %r12d
	movq	88(%rsp), %r9
	movl	%r11d, 120(%rsp)
	movl	%r11d, 116(%rsp)
	movl	%r11d, 124(%rsp)
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L23:
	movl	%eax, %edi
.L19:
	cmpl	$2, %ebx
	jle	.L22
	movdqu	(%r9), %xmm0
	movdqu	(%r9), %xmm7
	pcmpeqd	.LC1(%rip), %xmm0
	pandn	%xmm7, %xmm0
	cmpl	$1, %ebp
	jbe	.L12
	movdqu	16(%r9), %xmm1
	movdqu	16(%r9), %xmm7
	pcmpeqd	.LC1(%rip), %xmm1
	pandn	%xmm7, %xmm1
	paddd	%xmm1, %xmm0
.L12:
	movdqa	%xmm0, %xmm1
	movl	%r10d, %edx
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	%r10d, %r11d
	je	.L13
.L11:
	movslq	%edi, %rcx
	movslq	%edx, %rsi
	leaq	(%rcx,%rcx,4), %rcx
	addq	%rcx, %rcx
	addq	%rcx, %rsi
	movl	128(%rsp,%rsi,4), %esi
	leal	(%rax,%rsi), %r13d
	cmpl	$100000000, %esi
	cmovne	%r13d, %eax
	leal	1(%rdx), %r13d
	cmpl	%edx, %ebx
	jle	.L13
	movslq	%r13d, %rsi
	addq	%rcx, %rsi
	movl	128(%rsp,%rsi,4), %esi
	cmpl	$100000000, %esi
	leal	(%rax,%rsi), %r14d
	cmovne	%r14d, %eax
	addl	$2, %edx
	cmpl	%r13d, %ebx
	jle	.L13
	movslq	%edx, %rdx
	addq	%rdx, %rcx
	movl	128(%rsp,%rcx,4), %edx
	leal	(%rax,%rdx), %ecx
	cmpl	$100000000, %edx
	cmovne	%ecx, %eax
.L13:
	cmpl	%eax, %r8d
	jle	.L18
	movl	%edi, %r12d
	movl	%eax, %r8d
.L18:
	leal	1(%rdi), %eax
	addq	$40, %r9
	cmpl	%ebx, %edi
	jne	.L23
	movl	%r12d, %edx
	movl	%r8d, %ecx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	movl	%r12d, 100(%rsp)
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rax), %edi
	movl	(%rcx), %esi
	addl	(%rdx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, (%rax)
	testl	%ebx, %ebx
	je	.L8
	movl	4(%rax), %edi
	movl	(%rdx), %esi
	addl	4(%rcx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, 4(%rax)
	cmpl	$1, %ebx
	je	.L8
	movl	8(%rax), %edi
	movl	(%rdx), %esi
	addl	8(%rcx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, 8(%rax)
	cmpl	$2, %ebx
	je	.L8
	movl	12(%rax), %edi
	movl	12(%rcx), %esi
	addl	(%rdx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, 12(%rax)
	cmpl	$3, %ebx
	je	.L8
	movl	16(%rax), %edi
	movl	16(%rcx), %esi
	addl	(%rdx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, 16(%rax)
	cmpl	$4, %ebx
	je	.L8
	movl	20(%rax), %edi
	movl	20(%rcx), %esi
	addl	(%rdx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, 20(%rax)
	cmpl	$5, %ebx
	je	.L8
	movl	24(%rax), %edi
	movl	24(%rcx), %esi
	addl	(%rdx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, 24(%rax)
	cmpl	$6, %ebx
	je	.L8
	movl	28(%rax), %edi
	movl	28(%rcx), %esi
	addl	(%rdx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, 28(%rax)
	cmpl	$7, %ebx
	je	.L8
	movl	32(%rax), %edi
	movl	32(%rcx), %esi
	addl	(%rdx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, 32(%rax)
	cmpl	$8, %ebx
	je	.L8
	movl	36(%rax), %edi
	movl	(%rdx), %esi
	addl	36(%rcx), %esi
	cmpl	%edi, %esi
	cmovg	%edi, %esi
	movl	%esi, 36(%rax)
	jmp	.L8
.L22:
	xorl	%eax, %eax
	xorl	%edx, %edx
	jmp	.L11
.L67:
	movq	536(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L68
	addq	$552, %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
.L68:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	100000000
	.long	100000000
	.long	100000000
	.long	100000000
	.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>
#define M 100000000
int main(){
  int n,m,min,mi,i,j,k,s;
  int d[10][10];
  while(scanf("%d",&n),n){
    min=M;
    for(i=m=0;i<100;i++)d[i/10][i%10]=M;
    while(n--){
      scanf("%d %d %d",&i,&j,&k);
      d[i][j]=d[j][i]=k;
      d[i][i]=d[j][j]=0;
      if(m<i)m=i;
      if(m<j)m=j;
    }
    m++;
    for(k=0;k<m;k++){
      for(i=0;i<m;i++){
	for(j=0;j<m;j++){
	  if(d[i][j]>d[i][k]+d[k][j])d[i][j]=d[i][k]+d[k][j];
	}
      }
    }
    for(i=0;i<m;i++){
      for(j=s=0;j<m;j++){
	if(d[i][j]==M)continue;
	s+=d[i][j];
      }
      if(min>s){
	min=s;
	mi=i;
      }
    }
    printf("%d %d\n",mi,min);
  }
  return 0;
}
6
0 1 80
1 2 20
0 2 60
2 3 50
3 4 66
1 4 90
2
0 1 1
1 2 1
0
 6
0 1 80
1 2 20
0 2 60
2 3 50
3 4 66
0 4 90
2
0 1 1
1 2 1
0
 6
0 1 80
1 2 20
0 2 60
2 2 50
3 4 66
0 4 90
2
0 1 1
1 2 1
0
 6
0 1 80
1 2 20
0 2 60
2 2 50
3 4 66
1 4 90
2
0 1 1
1 2 1
0
 6
0 1 80
1 2 20
0 2 60
2 2 50
3 4 66
1 4 90
2
0 1 1
1 0 1
0
 6
0 1 80
1 2 28
0 2 60
2 2 50
3 4 66
1 4 90
2
0 1 1
1 0 1
0
 6
0 1 80
1 3 20
0 2 60
2 3 50
3 4 60
1 4 90
2
0 1 1
1 2 1
0
 6
0 1 80
1 2 20
0 2 60
2 3 50
2 4 66
1 4 90
2
0 1 1
1 2 1
0
 6
0 1 80
1 2 20
0 2 60
2 3 50
3 2 66
0 4 90
2
0 1 1
1 2 1
0
 6
0 0 80
1 2 20
0 2 60
2 3 50
3 4 66
1 4 90
2
0 1 1
1 1 1
0

2 240
1 2
 2 246
1 2
 0 386
1 2
 1 346
1 2
 1 346
0 1
 1 354
0 1
 3 230
1 2
 2 196
1 2
 2 296
1 2
 2 240
0 1

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>
#define M 100000000
int main(){
  int n,m,min,mi,i,j,k,s;
  int d[10][10];
  while(scanf("%d",&n),n){
    min=M;
    for(i=m=0;i<100;i++)d[i/10][i%10]=M;
    while(n--){
      scanf("%d %d %d",&i,&j,&k);
      d[i][j]=d[j][i]=k;
      d[i][i]=d[j][j]=0;
      if(m<i)m=i;
      if(m<j)m=j;
    }
    m++;
    for(k=0;k<m;k++){
      for(i=0;i<m;i++){
	for(j=0;j<m;j++){
	  if(d[i][j]>d[i][k]+d[k][j])d[i][j]=d[i][k]+d[k][j];
	}
      }
    }
    for(i=0;i<m;i++){
      for(j=s=0;j<m;j++){
	if(d[i][j]==M)continue;
	s+=d[i][j];
      }
      if(min>s){
	min=s;
	mi=i;
      }
    }
    printf("%d %d\n",mi,min);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d\n"
.LC2:
	.string	"%d"
	.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	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L22:
	movl	$100000000, -428(%rbp)
	movl	$0, -432(%rbp)
	movl	-432(%rbp), %eax
	movl	%eax, -444(%rbp)
	jmp	.L3
.L4:
	movl	-444(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%edx, %esi
	subl	%eax, %esi
	movl	-444(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %edi
	sarl	$31, %edi
	subl	%edi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movslq	%edx, %rcx
	movslq	%esi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	$100000000, -416(%rbp,%rax,4)
	movl	-444(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -444(%rbp)
.L3:
	movl	-444(%rbp), %eax
	cmpl	$99, %eax
	jle	.L4
	jmp	.L5
.L7:
	leaq	-436(%rbp), %rcx
	leaq	-440(%rbp), %rdx
	leaq	-444(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-440(%rbp), %edx
	movl	-444(%rbp), %ecx
	movl	-436(%rbp), %esi
	movslq	%ecx, %r8
	movslq	%edx, %rdi
	movq	%rdi, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rax, %rax
	addq	%r8, %rax
	movl	%esi, -416(%rbp,%rax,4)
	movl	-444(%rbp), %esi
	movl	-440(%rbp), %edi
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %edx
	movslq	%edi, %rdi
	movslq	%esi, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	%edx, -416(%rbp,%rax,4)
	movl	-440(%rbp), %edx
	movl	-440(%rbp), %ecx
	movslq	%ecx, %rdi
	movslq	%edx, %rsi
	movq	%rsi, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	$0, -416(%rbp,%rax,4)
	movl	-444(%rbp), %esi
	movl	-444(%rbp), %edi
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %edx
	movslq	%edi, %rdi
	movslq	%esi, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	%edx, -416(%rbp,%rax,4)
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jge	.L6
	movl	-444(%rbp), %eax
	movl	%eax, -432(%rbp)
.L6:
	movl	-440(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jge	.L5
	movl	-440(%rbp), %eax
	movl	%eax, -432(%rbp)
.L5:
	movl	-448(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -448(%rbp)
	testl	%eax, %eax
	jne	.L7
	addl	$1, -432(%rbp)
	movl	$0, -436(%rbp)
	jmp	.L8
.L14:
	movl	$0, -444(%rbp)
	jmp	.L9
.L13:
	movl	$0, -440(%rbp)
	jmp	.L10
.L12:
	movl	-444(%rbp), %eax
	movl	-440(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %ecx
	movl	-444(%rbp), %eax
	movl	-436(%rbp), %edx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-416(%rbp,%rax,4), %esi
	movl	-436(%rbp), %eax
	movl	-440(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	-416(%rbp,%rax,4), %eax
	addl	%esi, %eax
	cmpl	%eax, %ecx
	jle	.L11
	movl	-444(%rbp), %eax
	movl	-436(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %esi
	movl	-436(%rbp), %eax
	movl	-440(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %ecx
	movl	-444(%rbp), %eax
	movl	-440(%rbp), %edx
	addl	%esi, %ecx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%ecx, -416(%rbp,%rax,4)
.L11:
	movl	-440(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -440(%rbp)
.L10:
	movl	-440(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jg	.L12
	movl	-444(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -444(%rbp)
.L9:
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jg	.L13
	movl	-436(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -436(%rbp)
.L8:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jg	.L14
	movl	$0, -444(%rbp)
	jmp	.L15
.L21:
	movl	$0, -420(%rbp)
	movl	-420(%rbp), %eax
	movl	%eax, -440(%rbp)
	jmp	.L16
.L19:
	movl	-444(%rbp), %eax
	movl	-440(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %eax
	cmpl	$100000000, %eax
	je	.L25
	movl	-444(%rbp), %eax
	movl	-440(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %eax
	addl	%eax, -420(%rbp)
	jmp	.L18
.L25:
	nop
.L18:
	movl	-440(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -440(%rbp)
.L16:
	movl	-440(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jg	.L19
	movl	-428(%rbp), %eax
	cmpl	-420(%rbp), %eax
	jle	.L20
	movl	-420(%rbp), %eax
	movl	%eax, -428(%rbp)
	movl	-444(%rbp), %eax
	movl	%eax, -424(%rbp)
.L20:
	movl	-444(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -444(%rbp)
.L15:
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jg	.L21
	movl	-428(%rbp), %edx
	movl	-424(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-448(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-448(%rbp), %eax
	testl	%eax, %eax
	jne	.L22
	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
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d\n"
.LC2:
	.string	"%d"
	.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	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L22:
	movl	$100000000, -428(%rbp)
	movl	$0, -432(%rbp)
	movl	-432(%rbp), %eax
	movl	%eax, -444(%rbp)
	jmp	.L3
.L4:
	movl	-444(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%edx, %esi
	subl	%eax, %esi
	movl	-444(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %edi
	sarl	$31, %edi
	subl	%edi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	movslq	%edx, %rcx
	movslq	%esi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	$100000000, -416(%rbp,%rax,4)
	movl	-444(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -444(%rbp)
.L3:
	movl	-444(%rbp), %eax
	cmpl	$99, %eax
	jle	.L4
	jmp	.L5
.L7:
	leaq	-436(%rbp), %rcx
	leaq	-440(%rbp), %rdx
	leaq	-444(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-440(%rbp), %edx
	movl	-444(%rbp), %ecx
	movl	-436(%rbp), %esi
	movslq	%ecx, %r8
	movslq	%edx, %rdi
	movq	%rdi, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rax, %rax
	addq	%r8, %rax
	movl	%esi, -416(%rbp,%rax,4)
	movl	-444(%rbp), %esi
	movl	-440(%rbp), %edi
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %edx
	movslq	%edi, %rdi
	movslq	%esi, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	%edx, -416(%rbp,%rax,4)
	movl	-440(%rbp), %edx
	movl	-440(%rbp), %ecx
	movslq	%ecx, %rdi
	movslq	%edx, %rsi
	movq	%rsi, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	$0, -416(%rbp,%rax,4)
	movl	-444(%rbp), %esi
	movl	-444(%rbp), %edi
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %edx
	movslq	%edi, %rdi
	movslq	%esi, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	%edx, -416(%rbp,%rax,4)
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jge	.L6
	movl	-444(%rbp), %eax
	movl	%eax, -432(%rbp)
.L6:
	movl	-440(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jge	.L5
	movl	-440(%rbp), %eax
	movl	%eax, -432(%rbp)
.L5:
	movl	-448(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -448(%rbp)
	testl	%eax, %eax
	jne	.L7
	addl	$1, -432(%rbp)
	movl	$0, -436(%rbp)
	jmp	.L8
.L14:
	movl	$0, -444(%rbp)
	jmp	.L9
.L13:
	movl	$0, -440(%rbp)
	jmp	.L10
.L12:
	movl	-444(%rbp), %eax
	movl	-440(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %ecx
	movl	-444(%rbp), %eax
	movl	-436(%rbp), %edx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	-416(%rbp,%rax,4), %esi
	movl	-436(%rbp), %eax
	movl	-440(%rbp), %edx
	movslq	%edx, %rdi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdi, %rax
	movl	-416(%rbp,%rax,4), %eax
	addl	%esi, %eax
	cmpl	%eax, %ecx
	jle	.L11
	movl	-444(%rbp), %eax
	movl	-436(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %esi
	movl	-436(%rbp), %eax
	movl	-440(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %ecx
	movl	-444(%rbp), %eax
	movl	-440(%rbp), %edx
	addl	%esi, %ecx
	movslq	%edx, %rsi
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	movl	%ecx, -416(%rbp,%rax,4)
.L11:
	movl	-440(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -440(%rbp)
.L10:
	movl	-440(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jg	.L12
	movl	-444(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -444(%rbp)
.L9:
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jg	.L13
	movl	-436(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -436(%rbp)
.L8:
	movl	-436(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jg	.L14
	movl	$0, -444(%rbp)
	jmp	.L15
.L21:
	movl	$0, -420(%rbp)
	movl	-420(%rbp), %eax
	movl	%eax, -440(%rbp)
	jmp	.L16
.L19:
	movl	-444(%rbp), %eax
	movl	-440(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %eax
	cmpl	$100000000, %eax
	je	.L25
	movl	-444(%rbp), %eax
	movl	-440(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	movl	-416(%rbp,%rax,4), %eax
	addl	%eax, -420(%rbp)
	jmp	.L18
.L25:
	nop
.L18:
	movl	-440(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -440(%rbp)
.L16:
	movl	-440(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jg	.L19
	movl	-428(%rbp), %eax
	cmpl	-420(%rbp), %eax
	jle	.L20
	movl	-420(%rbp), %eax
	movl	%eax, -428(%rbp)
	movl	-444(%rbp), %eax
	movl	%eax, -424(%rbp)
.L20:
	movl	-444(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -444(%rbp)
.L15:
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jg	.L21
	movl	-428(%rbp), %edx
	movl	-424(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-448(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-448(%rbp), %eax
	testl	%eax, %eax
	jne	.L22
	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
.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:
