Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<stdlib.h>
#include<math.h>

typedef long long int int64;

#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define ABS(a) ((a)>(0)?(a):-(a))

#define ADD(vertex,length) do{from[len]=(vertex);to[len]=(vertex)+1;val[len]=(length);len++;}while(0)

void run(void){
  int l;
  scanf("%d",&l);
  int from[60];
  int to[60];
  int val[60];
  int len=0;
  int now=1;
  while(l>1){
    ADD(now,0);
    ADD(now,l/2);
    if(l%2!=0){
      from[len]=now;
      to[len]=20;
      val[len]=l-1;
      len++;
    }
    now++;
    l/=2;
  }
  if(now<20){
    from[len]=now;
    to[len]=20;
    val[len]=0;
    len++;
  }
  printf("20 %d\n",len);
  int i;
  for(i=0;i<len;i++){
    printf("%d %d %d\n",from[i],to[i],val[i]);
  }
}

int main(void){
  run();
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"20 %d\n"
.LC2:
	.string	"%d %d %d\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$752, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-752(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -748(%rbp)
	movl	$1, -744(%rbp)
	jmp	.L2
.L4:
	movl	-748(%rbp), %eax
	cltq
	movl	-744(%rbp), %edx
	movl	%edx, -736(%rbp,%rax,4)
	movl	-744(%rbp), %eax
	leal	1(%rax), %edx
	movl	-748(%rbp), %eax
	cltq
	movl	%edx, -496(%rbp,%rax,4)
	movl	-748(%rbp), %eax
	cltq
	movl	$0, -256(%rbp,%rax,4)
	addl	$1, -748(%rbp)
	movl	-748(%rbp), %eax
	cltq
	movl	-744(%rbp), %edx
	movl	%edx, -736(%rbp,%rax,4)
	movl	-744(%rbp), %eax
	leal	1(%rax), %edx
	movl	-748(%rbp), %eax
	cltq
	movl	%edx, -496(%rbp,%rax,4)
	movl	-752(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-748(%rbp), %eax
	cltq
	movl	%edx, -256(%rbp,%rax,4)
	addl	$1, -748(%rbp)
	movl	-752(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	movl	-748(%rbp), %eax
	cltq
	movl	-744(%rbp), %edx
	movl	%edx, -736(%rbp,%rax,4)
	movl	-748(%rbp), %eax
	cltq
	movl	$20, -496(%rbp,%rax,4)
	movl	-752(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-748(%rbp), %eax
	cltq
	movl	%edx, -256(%rbp,%rax,4)
	addl	$1, -748(%rbp)
.L3:
	addl	$1, -744(%rbp)
	movl	-752(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -752(%rbp)
.L2:
	movl	-752(%rbp), %eax
	cmpl	$1, %eax
	jg	.L4
	cmpl	$19, -744(%rbp)
	jg	.L5
	movl	-748(%rbp), %eax
	cltq
	movl	-744(%rbp), %edx
	movl	%edx, -736(%rbp,%rax,4)
	movl	-748(%rbp), %eax
	cltq
	movl	$20, -496(%rbp,%rax,4)
	movl	-748(%rbp), %eax
	cltq
	movl	$0, -256(%rbp,%rax,4)
	addl	$1, -748(%rbp)
.L5:
	movl	-748(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -740(%rbp)
	jmp	.L6
.L7:
	movl	-740(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %ecx
	movl	-740(%rbp), %eax
	cltq
	movl	-496(%rbp,%rax,4), %edx
	movl	-740(%rbp), %eax
	cltq
	movl	-736(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -740(%rbp)
.L6:
	movl	-740(%rbp), %eax
	cmpl	-748(%rbp), %eax
	jl	.L7
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	call	run
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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"
.LC1:
	.string	"20 %d\n"
.LC2:
	.string	"%d %d %d\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB39:
	.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	$760, %rsp
	.cfi_def_cfa_offset 816
	movq	%fs:40, %rax
	movq	%rax, 744(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	$1, %eax
	jle	.L8
	movl	$1, %edx
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r12
	movd	%edx, %xmm2
	leaq	256(%rsp), %r13
	pshufd	$0xe0, %xmm2, %xmm0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L15:
	movslq	%ecx, %rcx
	subl	$1, %esi
	addl	$3, %ebx
	movl	%edi, 16(%rsp,%rcx,4)
	movl	$20, 256(%rsp,%rcx,4)
	movl	%esi, 496(%rsp,%rcx,4)
	cmpl	$1, %eax
	je	.L14
.L4:
	movl	%edx, %edi
	addl	$1, %edx
	movslq	%ebx, %rcx
	movl	%eax, %esi
	movd	%edx, %xmm1
	sarl	%eax
	movl	$0, 496(%rsp,%rcx,4)
	movq	%xmm0, (%r12,%rcx,4)
	pshufd	$0xe0, %xmm1, %xmm0
	movq	%xmm0, 0(%r13,%rcx,4)
	leal	1(%rbx), %ecx
	movslq	%ecx, %rcx
	movl	%eax, 496(%rsp,%rcx,4)
	leal	2(%rbx), %ecx
	testb	$1, %sil
	jne	.L15
	movl	%ecx, %ebx
	cmpl	$1, %eax
	jne	.L4
.L14:
	movl	$1, 12(%rsp)
	cmpl	$19, %edx
	jle	.L16
.L5:
	movl	%ebx, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movslq	%ebx, %rbx
	xorl	%ebp, %ebp
	leaq	496(%rsp), %r15
	leaq	.LC2(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L6:
	movl	0(%r13,%rbp,4), %ecx
	movl	(%r12,%rbp,4), %edx
	movq	%r14, %rsi
	xorl	%eax, %eax
	movl	(%r15,%rbp,4), %r8d
	movl	$1, %edi
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpq	%rbx, %rbp
	jne	.L6
	movq	744(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$760, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movslq	%ebx, %rax
	addl	$1, %ebx
.L2:
	movl	%edx, 16(%rsp,%rax,4)
	movl	$20, 256(%rsp,%rax,4)
	movl	$0, 496(%rsp,%rax,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$1, %ebx
	movl	$1, %edx
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	leaq	256(%rsp), %r13
	jmp	.L2
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.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"
.LC1:
	.string	"20 %d\n"
.LC2:
	.string	"%d %d %d\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB39:
	.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	$760, %rsp
	.cfi_def_cfa_offset 816
	movq	%fs:40, %rax
	movq	%rax, 744(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	$1, %eax
	jle	.L8
	movl	$1, %edx
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r12
	movd	%edx, %xmm2
	leaq	256(%rsp), %r13
	pshufd	$0xe0, %xmm2, %xmm0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L15:
	movslq	%ecx, %rcx
	subl	$1, %esi
	addl	$3, %ebx
	movl	%edi, 16(%rsp,%rcx,4)
	movl	$20, 256(%rsp,%rcx,4)
	movl	%esi, 496(%rsp,%rcx,4)
	cmpl	$1, %eax
	je	.L14
.L4:
	movl	%edx, %edi
	addl	$1, %edx
	movslq	%ebx, %rcx
	movl	%eax, %esi
	movd	%edx, %xmm1
	sarl	%eax
	movl	$0, 496(%rsp,%rcx,4)
	movq	%xmm0, (%r12,%rcx,4)
	pshufd	$0xe0, %xmm1, %xmm0
	movq	%xmm0, 0(%r13,%rcx,4)
	leal	1(%rbx), %ecx
	movslq	%ecx, %rcx
	movl	%eax, 496(%rsp,%rcx,4)
	leal	2(%rbx), %ecx
	testb	$1, %sil
	jne	.L15
	movl	%ecx, %ebx
	cmpl	$1, %eax
	jne	.L4
.L14:
	movl	$1, 12(%rsp)
	cmpl	$19, %edx
	jle	.L16
.L5:
	movl	%ebx, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movslq	%ebx, %rbx
	xorl	%ebp, %ebp
	leaq	496(%rsp), %r15
	leaq	.LC2(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L6:
	movl	0(%r13,%rbp,4), %ecx
	movl	(%r12,%rbp,4), %edx
	movq	%r14, %rsi
	xorl	%eax, %eax
	movl	(%r15,%rbp,4), %r8d
	movl	$1, %edi
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpq	%rbx, %rbp
	jne	.L6
	movq	744(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$760, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movslq	%ebx, %rax
	addl	$1, %ebx
.L2:
	movl	%edx, 16(%rsp,%rax,4)
	movl	$20, 256(%rsp,%rax,4)
	movl	$0, 496(%rsp,%rax,4)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$1, %ebx
	movl	$1, %edx
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	leaq	256(%rsp), %r13
	jmp	.L2
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
#include<stdlib.h>
#include<math.h>

typedef long long int int64;

#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define ABS(a) ((a)>(0)?(a):-(a))

#define ADD(vertex,length) do{from[len]=(vertex);to[len]=(vertex)+1;val[len]=(length);len++;}while(0)

void run(void){
  int l;
  scanf("%d",&l);
  int from[60];
  int to[60];
  int val[60];
  int len=0;
  int now=1;
  while(l>1){
    ADD(now,0);
    ADD(now,l/2);
    if(l%2!=0){
      from[len]=now;
      to[len]=20;
      val[len]=l-1;
      len++;
    }
    now++;
    l/=2;
  }
  if(now<20){
    from[len]=now;
    to[len]=20;
    val[len]=0;
    len++;
  }
  printf("20 %d\n",len);
  int i;
  for(i=0;i<len;i++){
    printf("%d %d %d\n",from[i],to[i],val[i]);
  }
}

int main(void){
  run();
  return 0;
}

4

20 5
1 2 0
1 2 2
2 3 0
2 3 1
3 20 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>
#include<math.h>

typedef long long int int64;

#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define ABS(a) ((a)>(0)?(a):-(a))

#define ADD(vertex,length) do{from[len]=(vertex);to[len]=(vertex)+1;val[len]=(length);len++;}while(0)

void run(void){
  int l;
  scanf("%d",&l);
  int from[60];
  int to[60];
  int val[60];
  int len=0;
  int now=1;
  while(l>1){
    ADD(now,0);
    ADD(now,l/2);
    if(l%2!=0){
      from[len]=now;
      to[len]=20;
      val[len]=l-1;
      len++;
    }
    now++;
    l/=2;
  }
  if(now<20){
    from[len]=now;
    to[len]=20;
    val[len]=0;
    len++;
  }
  printf("20 %d\n",len);
  int i;
  for(i=0;i<len;i++){
    printf("%d %d %d\n",from[i],to[i],val[i]);
  }
}

int main(void){
  run();
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"20 %d\n"
.LC2:
	.string	"%d %d %d\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$752, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-752(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -748(%rbp)
	movl	$1, -744(%rbp)
	jmp	.L2
.L4:
	movl	-748(%rbp), %eax
	cltq
	movl	-744(%rbp), %edx
	movl	%edx, -736(%rbp,%rax,4)
	movl	-744(%rbp), %eax
	leal	1(%rax), %edx
	movl	-748(%rbp), %eax
	cltq
	movl	%edx, -496(%rbp,%rax,4)
	movl	-748(%rbp), %eax
	cltq
	movl	$0, -256(%rbp,%rax,4)
	addl	$1, -748(%rbp)
	movl	-748(%rbp), %eax
	cltq
	movl	-744(%rbp), %edx
	movl	%edx, -736(%rbp,%rax,4)
	movl	-744(%rbp), %eax
	leal	1(%rax), %edx
	movl	-748(%rbp), %eax
	cltq
	movl	%edx, -496(%rbp,%rax,4)
	movl	-752(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-748(%rbp), %eax
	cltq
	movl	%edx, -256(%rbp,%rax,4)
	addl	$1, -748(%rbp)
	movl	-752(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	movl	-748(%rbp), %eax
	cltq
	movl	-744(%rbp), %edx
	movl	%edx, -736(%rbp,%rax,4)
	movl	-748(%rbp), %eax
	cltq
	movl	$20, -496(%rbp,%rax,4)
	movl	-752(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-748(%rbp), %eax
	cltq
	movl	%edx, -256(%rbp,%rax,4)
	addl	$1, -748(%rbp)
.L3:
	addl	$1, -744(%rbp)
	movl	-752(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -752(%rbp)
.L2:
	movl	-752(%rbp), %eax
	cmpl	$1, %eax
	jg	.L4
	cmpl	$19, -744(%rbp)
	jg	.L5
	movl	-748(%rbp), %eax
	cltq
	movl	-744(%rbp), %edx
	movl	%edx, -736(%rbp,%rax,4)
	movl	-748(%rbp), %eax
	cltq
	movl	$20, -496(%rbp,%rax,4)
	movl	-748(%rbp), %eax
	cltq
	movl	$0, -256(%rbp,%rax,4)
	addl	$1, -748(%rbp)
.L5:
	movl	-748(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -740(%rbp)
	jmp	.L6
.L7:
	movl	-740(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %ecx
	movl	-740(%rbp), %eax
	cltq
	movl	-496(%rbp,%rax,4), %edx
	movl	-740(%rbp), %eax
	cltq
	movl	-736(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -740(%rbp)
.L6:
	movl	-740(%rbp), %eax
	cmpl	-748(%rbp), %eax
	jl	.L7
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	call	run
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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"
.LC1:
	.string	"20 %d\n"
.LC2:
	.string	"%d %d %d\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$752, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-752(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -748(%rbp)
	movl	$1, -744(%rbp)
	jmp	.L2
.L4:
	movl	-748(%rbp), %eax
	cltq
	movl	-744(%rbp), %edx
	movl	%edx, -736(%rbp,%rax,4)
	movl	-744(%rbp), %eax
	leal	1(%rax), %edx
	movl	-748(%rbp), %eax
	cltq
	movl	%edx, -496(%rbp,%rax,4)
	movl	-748(%rbp), %eax
	cltq
	movl	$0, -256(%rbp,%rax,4)
	addl	$1, -748(%rbp)
	movl	-748(%rbp), %eax
	cltq
	movl	-744(%rbp), %edx
	movl	%edx, -736(%rbp,%rax,4)
	movl	-744(%rbp), %eax
	leal	1(%rax), %edx
	movl	-748(%rbp), %eax
	cltq
	movl	%edx, -496(%rbp,%rax,4)
	movl	-752(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-748(%rbp), %eax
	cltq
	movl	%edx, -256(%rbp,%rax,4)
	addl	$1, -748(%rbp)
	movl	-752(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	movl	-748(%rbp), %eax
	cltq
	movl	-744(%rbp), %edx
	movl	%edx, -736(%rbp,%rax,4)
	movl	-748(%rbp), %eax
	cltq
	movl	$20, -496(%rbp,%rax,4)
	movl	-752(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-748(%rbp), %eax
	cltq
	movl	%edx, -256(%rbp,%rax,4)
	addl	$1, -748(%rbp)
.L3:
	addl	$1, -744(%rbp)
	movl	-752(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -752(%rbp)
.L2:
	movl	-752(%rbp), %eax
	cmpl	$1, %eax
	jg	.L4
	cmpl	$19, -744(%rbp)
	jg	.L5
	movl	-748(%rbp), %eax
	cltq
	movl	-744(%rbp), %edx
	movl	%edx, -736(%rbp,%rax,4)
	movl	-748(%rbp), %eax
	cltq
	movl	$20, -496(%rbp,%rax,4)
	movl	-748(%rbp), %eax
	cltq
	movl	$0, -256(%rbp,%rax,4)
	addl	$1, -748(%rbp)
.L5:
	movl	-748(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -740(%rbp)
	jmp	.L6
.L7:
	movl	-740(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %ecx
	movl	-740(%rbp), %eax
	cltq
	movl	-496(%rbp,%rax,4), %edx
	movl	-740(%rbp), %eax
	cltq
	movl	-736(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -740(%rbp)
.L6:
	movl	-740(%rbp), %eax
	cmpl	-748(%rbp), %eax
	jl	.L7
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	call	run
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
