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>

typedef long long int int64;

const int f=102;
#define POS(i,j) ((i)*f+(j))

int dfs(int v,int64 *g,int *array,int *used){
  used[v]=1;
  array[0]=v;
  if(v==f-1) return 1;
  int i;
  for(i=0;i<f;i++){
    if(!used[i] && g[POS(v,i)]>0){
      int c=dfs(i,g,array+1,used);
      if(c>0) return c+1;
    }
  }
  return 0;
}

int64 calc(int *a,int n){
  int64 *g=(int64 *)calloc(f*f,sizeof(int64));
  int i,j;
  for(i=1;i<=n;i++){
    if(a[i]>=0){
      g[POS(i,f-1)]=a[i];
    } else {
      g[POS(0,i)]=-a[i];
    }
  }
  for(i=1;i<=n;i++){
    for(j=2*i;j<=n;j+=i){
      g[POS(i,j)]=1000000000LL*1000;
    }
  }
  int array[128];
  int used[128]={0};
  int64 ans=0;
  int64 len=dfs(0,g,array,used);
  while(len){
    int64 min=1000000000LL*1000;
    for(i=0;i+1<len;i++){
      int64 t=g[POS(array[i],array[i+1])];
      if(min>t) min=t;
    }
    ans+=min;
    for(i=0;i+1<len;i++){
      int v=array[i];
      int u=array[i+1];
      g[POS(v,u)]-=min;
      g[POS(u,v)]+=min;
    }
    for(i=0;i<f;i++) used[i]=0;
    len=dfs(0,g,array,used);
  }
  free(g);
  return ans;
}

void run(void){
  int n;
  scanf("%d",&n);
  int i;
  int a[101];
  for(i=1;i<=n;i++) scanf("%d",a+i);
  int64 sum=0;
  for(i=1;i<=n;i++) if(a[i]>=0) sum+=a[i];
  int64 ans=sum-calc(a,n);
  printf("%lld\n",ans);
  return;
}

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

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	f
	.section	.rodata
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.long	102
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -20(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	%rcx, -48(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	$1, (%rax)
	movq	-40(%rbp), %rax
	movl	-20(%rbp), %edx
	movl	%edx, (%rax)
	movl	$102, %eax
	subl	$1, %eax
	cmpl	%eax, -20(%rbp)
	jne	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movl	$0, -8(%rbp)
	jmp	.L4
.L6:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jne	.L5
	movl	$102, %eax
	imull	-20(%rbp), %eax
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jle	.L5
	movq	-40(%rbp), %rax
	leaq	4(%rax), %rdi
	movq	-48(%rbp), %rdx
	movq	-32(%rbp), %rsi
	movl	-8(%rbp), %eax
	movq	%rdx, %rcx
	movq	%rdi, %rdx
	movl	%eax, %edi
	call	dfs
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	jle	.L5
	movl	-4(%rbp), %eax
	addl	$1, %eax
	jmp	.L3
.L5:
	addl	$1, -8(%rbp)
.L4:
	movl	$102, %eax
	cmpl	%eax, -8(%rbp)
	jl	.L6
	movl	$0, %eax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dfs, .-dfs
	.globl	calc
	.type	calc, @function
calc:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1120, %rsp
	movq	%rdi, -1112(%rbp)
	movl	%esi, -1116(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$102, %edx
	movl	$102, %eax
	imull	%edx, %eax
	cltq
	movl	$8, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -1056(%rbp)
	movl	$1, -1096(%rbp)
	jmp	.L8
.L11:
	movl	-1096(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-1112(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	js	.L9
	movl	-1096(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-1112(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	$102, %edx
	imull	-1096(%rbp), %edx
	movl	$102, %ecx
	subl	$1, %ecx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-1056(%rbp), %rdx
	addq	%rcx, %rdx
	cltq
	movq	%rax, (%rdx)
	jmp	.L10
.L9:
	movl	-1096(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-1112(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	negl	%eax
	movl	%eax, %ecx
	movl	-1096(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-1056(%rbp), %rax
	addq	%rax, %rdx
	movslq	%ecx, %rax
	movq	%rax, (%rdx)
.L10:
	addl	$1, -1096(%rbp)
.L8:
	movl	-1096(%rbp), %eax
	cmpl	-1116(%rbp), %eax
	jle	.L11
	movl	$1, -1096(%rbp)
	jmp	.L12
.L15:
	movl	-1096(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -1092(%rbp)
	jmp	.L13
.L14:
	movl	$102, %eax
	imull	-1096(%rbp), %eax
	movl	%eax, %edx
	movl	-1092(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-1056(%rbp), %rax
	addq	%rdx, %rax
	movabsq	$1000000000000, %rsi
	movq	%rsi, (%rax)
	movl	-1096(%rbp), %eax
	addl	%eax, -1092(%rbp)
.L13:
	movl	-1092(%rbp), %eax
	cmpl	-1116(%rbp), %eax
	jle	.L14
	addl	$1, -1096(%rbp)
.L12:
	movl	-1096(%rbp), %eax
	cmpl	-1116(%rbp), %eax
	jle	.L15
	leaq	-528(%rbp), %rdx
	movl	$0, %eax
	movl	$64, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$0, -1080(%rbp)
	leaq	-528(%rbp), %rcx
	leaq	-1040(%rbp), %rdx
	movq	-1056(%rbp), %rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	dfs
	cltq
	movq	%rax, -1072(%rbp)
	jmp	.L16
.L24:
	movabsq	$1000000000000, %rax
	movq	%rax, -1064(%rbp)
	movl	$0, -1096(%rbp)
	jmp	.L17
.L19:
	movl	-1096(%rbp), %eax
	cltq
	movl	-1040(%rbp,%rax,4), %eax
	movl	$102, %edx
	imull	%eax, %edx
	movl	-1096(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-1040(%rbp,%rax,4), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-1056(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -1048(%rbp)
	movq	-1064(%rbp), %rax
	cmpq	-1048(%rbp), %rax
	jle	.L18
	movq	-1048(%rbp), %rax
	movq	%rax, -1064(%rbp)
.L18:
	addl	$1, -1096(%rbp)
.L17:
	movl	-1096(%rbp), %eax
	addl	$1, %eax
	cltq
	cmpq	%rax, -1072(%rbp)
	jg	.L19
	movq	-1064(%rbp), %rax
	addq	%rax, -1080(%rbp)
	movl	$0, -1096(%rbp)
	jmp	.L20
.L21:
	movl	-1096(%rbp), %eax
	cltq
	movl	-1040(%rbp,%rax,4), %eax
	movl	%eax, -1088(%rbp)
	movl	-1096(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-1040(%rbp,%rax,4), %eax
	movl	%eax, -1084(%rbp)
	movl	$102, %eax
	imull	-1088(%rbp), %eax
	movl	%eax, %edx
	movl	-1084(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-1056(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	$102, %edx
	movl	%edx, %ecx
	imull	-1088(%rbp), %ecx
	movl	-1084(%rbp), %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-1056(%rbp), %rdx
	addq	%rcx, %rdx
	subq	-1064(%rbp), %rax
	movq	%rax, (%rdx)
	movl	$102, %eax
	imull	-1084(%rbp), %eax
	movl	%eax, %edx
	movl	-1088(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-1056(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rcx
	movl	$102, %eax
	imull	-1084(%rbp), %eax
	movl	%eax, %edx
	movl	-1088(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-1056(%rbp), %rax
	addq	%rdx, %rax
	movq	-1064(%rbp), %rdx
	addq	%rcx, %rdx
	movq	%rdx, (%rax)
	addl	$1, -1096(%rbp)
.L20:
	movl	-1096(%rbp), %eax
	addl	$1, %eax
	cltq
	cmpq	%rax, -1072(%rbp)
	jg	.L21
	movl	$0, -1096(%rbp)
	jmp	.L22
.L23:
	movl	-1096(%rbp), %eax
	cltq
	movl	$0, -528(%rbp,%rax,4)
	addl	$1, -1096(%rbp)
.L22:
	movl	$102, %eax
	cmpl	%eax, -1096(%rbp)
	jl	.L23
	leaq	-528(%rbp), %rcx
	leaq	-1040(%rbp), %rdx
	movq	-1056(%rbp), %rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	dfs
	cltq
	movq	%rax, -1072(%rbp)
.L16:
	cmpq	$0, -1072(%rbp)
	jne	.L24
	movq	-1056(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-1080(%rbp), %rax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	calc, .-calc
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB8:
	.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
	leaq	-440(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -436(%rbp)
	jmp	.L28
.L29:
	movl	-436(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-416(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -436(%rbp)
.L28:
	movl	-440(%rbp), %eax
	cmpl	%eax, -436(%rbp)
	jle	.L29
	movq	$0, -432(%rbp)
	movl	$1, -436(%rbp)
	jmp	.L30
.L32:
	movl	-436(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	testl	%eax, %eax
	js	.L31
	movl	-436(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cltq
	addq	%rax, -432(%rbp)
.L31:
	addl	$1, -436(%rbp)
.L30:
	movl	-440(%rbp), %eax
	cmpl	%eax, -436(%rbp)
	jle	.L32
	movl	-440(%rbp), %edx
	leaq	-416(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	calc
	movq	%rax, %rdx
	movq	-432(%rbp), %rax
	subq	%rdx, %rax
	movq	%rax, -424(%rbp)
	movq	-424(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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
.LFE9:
	.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
	.p2align 4
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB39:
	.cfi_startproc
	endbr64
	movslq	%edi, %rax
	movl	$1, (%rcx,%rax,4)
	movl	$1, %eax
	movl	%edi, (%rdx)
	cmpl	$101, %edi
	je	.L30
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	imull	$102, %edi, %eax
	movq	%rdx, %r15
	xorl	%r11d, %r11d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r10d, %r10d
	leaq	20(%rdx), %rdx
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	%eax, 8(%rsp)
	jmp	.L16
.L3:
	addq	$1, %r10
	addl	$102, %r11d
	cmpq	$102, %r10
	je	.L34
.L16:
	movl	(%rcx,%r10,4), %r8d
	testl	%r8d, %r8d
	jne	.L3
	movl	8(%rsp), %eax
	addl	%r10d, %eax
	cltq
	cmpq	$0, (%rsi,%rax,8)
	jle	.L3
	movl	$1, (%rcx,%r10,4)
	movl	%r10d, 4(%r15)
	cmpq	$101, %r10
	je	.L18
	movq	%r10, (%rsp)
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r15, %r10
	movq	%rcx, %r13
	jmp	.L15
.L5:
	addq	$1, %r8
	addl	$102, %r9d
	cmpq	$102, %r8
	je	.L35
.L15:
	movl	0(%r13,%r8,4), %edi
	testl	%edi, %edi
	jne	.L5
	leal	(%r11,%r8), %eax
	cmpq	$0, (%rsi,%rax,8)
	jle	.L5
	movl	$1, 0(%r13,%r8,4)
	movl	%r8d, 8(%r10)
	cmpq	$101, %r8
	je	.L19
	xorl	%r15d, %r15d
	movl	%r11d, 12(%rsp)
	xorl	%r14d, %r14d
	movl	%r15d, %r11d
	movq	%rsi, %r15
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L7:
	addq	$1, %r14
	addl	$102, %r11d
	cmpq	$102, %r14
	je	.L36
.L14:
	movl	0(%r13,%r14,4), %esi
	testl	%esi, %esi
	jne	.L7
	leal	(%r9,%r14), %eax
	cmpq	$0, (%r15,%rax,8)
	jle	.L7
	movl	$1, 0(%r13,%r14,4)
	movl	%r14d, 12(%r10)
	cmpq	$101, %r14
	je	.L20
	xorl	%ebp, %ebp
	xorl	%ebx, %ebx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$1, %rbx
	addl	$102, %ebp
	cmpq	$102, %rbx
	je	.L7
.L13:
	movl	0(%r13,%rbx,4), %ecx
	testl	%ecx, %ecx
	jne	.L9
	leal	(%r11,%rbx), %eax
	cmpq	$0, (%r15,%rax,8)
	jle	.L9
	movl	$1, 0(%r13,%rbx,4)
	movl	%ebx, 16(%r10)
	cmpq	$101, %rbx
	je	.L21
	xorl	%r12d, %r12d
.L12:
	movl	0(%r13,%r12,4), %eax
	movl	%r12d, %edi
	testl	%eax, %eax
	jne	.L11
	leal	0(%rbp,%r12), %eax
	cmpq	$0, (%r15,%rax,8)
	jg	.L37
.L11:
	addq	$1, %r12
	cmpq	$102, %r12
	je	.L9
	jmp	.L12
.L21:
	movl	$5, %eax
.L1:
	addq	$56, %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
.L20:
	.cfi_restore_state
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	$4, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L36:
	.cfi_restore_state
	addq	$1, %r8
	movl	12(%rsp), %r11d
	movq	%r15, %rsi
	addl	$102, %r9d
	cmpq	$102, %r8
	jne	.L15
.L35:
	movq	%r10, %r15
	movq	(%rsp), %r10
	movq	%r13, %rcx
	addl	$102, %r11d
	addq	$1, %r10
	cmpq	$102, %r10
	jne	.L16
.L34:
	xorl	%eax, %eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	movl	$3, %eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L37:
	movq	%r13, %rcx
	movq	%r15, %rsi
	movq	%r10, 40(%rsp)
	movl	%r11d, 36(%rsp)
	movq	%r8, 24(%rsp)
	movl	%r9d, 32(%rsp)
	movq	%rdx, 16(%rsp)
	call	dfs
	movq	16(%rsp), %rdx
	movl	32(%rsp), %r9d
	testl	%eax, %eax
	movq	24(%rsp), %r8
	movl	36(%rsp), %r11d
	movq	40(%rsp), %r10
	jle	.L11
	addl	$5, %eax
	jmp	.L1
.L18:
	movl	$2, %eax
	jmp	.L1
.L30:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE39:
	.size	dfs, .-dfs
	.p2align 4
	.globl	calc
	.type	calc, @function
calc:
.LFB40:
	.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
	movq	%rdi, %rbp
	movl	$10404, %edi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%esi, %ebx
	movl	$8, %esi
	subq	$1080, %rsp
	.cfi_def_cfa_offset 1136
	movq	%fs:40, %rax
	movq	%rax, 1064(%rsp)
	xorl	%eax, %eax
	call	calloc@PLT
	movq	%rax, %r14
	testl	%ebx, %ebx
	jle	.L46
	leal	-1(%rbx), %r8d
	leal	1(%rbx), %r10d
	movl	$203, %ecx
	movl	$1, %edx
	jmp	.L43
.L85:
	movslq	%ecx, %rsi
	addq	$1, %rdx
	addl	$102, %ecx
	movq	%rax, (%r14,%rsi,8)
	cmpq	%rdx, %r10
	je	.L84
.L43:
	movslq	0(%rbp,%rdx,4), %rax
	testl	%eax, %eax
	jns	.L85
	negl	%eax
	addl	$102, %ecx
	cltq
	movq	%rax, (%r14,%rdx,8)
	addq	$1, %rdx
	cmpq	%rdx, %r10
	jne	.L43
.L84:
	movl	$1, %edi
	movl	$102, %ecx
	movl	$2, %ebp
	movdqa	.LC0(%rip), %xmm0
	leaq	832(%r14), %r12
	movabsq	$1000000000000, %rsi
.L45:
	movl	%ebp, %eax
	cmpl	%ebp, %ebx
	jl	.L49
	cmpq	$1, %rdi
	jne	.L86
	cmpl	%ebp, %ebx
	je	.L50
	movl	%r8d, %edx
	shrl	%edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%r12,%rdx), %r11
	movq	%r12, %rdx
	.p2align 4,,10
	.p2align 3
.L51:
	movups	%xmm0, (%rdx)
	addq	$16, %rdx
	cmpq	%rdx, %r11
	jne	.L51
	movl	%r8d, %edx
	andl	$-2, %edx
	addl	%edx, %eax
	cmpl	%edx, %r8d
	je	.L49
.L50:
	addl	%ecx, %eax
	cltq
	movq	%rsi, (%r14,%rax,8)
.L49:
	addq	$1, %rdi
	addq	$2, %rbp
	addl	$102, %ecx
	subl	$2, %r8d
	addq	$832, %r12
	cmpq	%rdi, %r10
	jne	.L45
.L46:
	leaq	544(%rsp), %r15
	movl	$64, %ecx
	xorl	%eax, %eax
	movl	$0, 32(%rsp)
	movq	%r15, %rdi
	movl	$1, %r12d
	leaq	40(%rsp), %rbp
	rep stosq
	movl	$1, 544(%rsp)
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L54:
	addq	$1, %r12
.L40:
	movl	%r12d, %r13d
	cmpq	$102, %r12
	je	.L87
	movl	(%r15,%r12,4), %esi
	testl	%esi, %esi
	jne	.L54
	cmpq	$0, (%r14,%r12,8)
	jle	.L54
	movl	$1, (%r15,%r12,4)
	movl	%r12d, 36(%rsp)
	cmpq	$101, %r12
	je	.L71
	imull	$102, %r13d, %r13d
	xorl	%ebx, %ebx
	jmp	.L57
	.p2align 4,,10
	.p2align 3
.L56:
	addq	$1, %rbx
	cmpq	$102, %rbx
	je	.L54
.L57:
	movl	(%r15,%rbx,4), %ecx
	movl	%ebx, %edi
	testl	%ecx, %ecx
	jne	.L56
	leal	0(%r13,%rbx), %eax
	cmpq	$0, (%r14,%rax,8)
	jle	.L56
	movq	%r15, %rcx
	movq	%rbp, %rdx
	movq	%r14, %rsi
	call	dfs
	testl	%eax, %eax
	jle	.L56
	addl	$2, %eax
	cltq
.L55:
	leaq	32(%rsp), %rsi
	leaq	40(%rsp), %rbp
	movq	$0, 8(%rsp)
	movq	%rsi, 16(%rsp)
	leaq	36(%rsp), %rsi
	movq	%rsi, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L58:
	movq	16(%rsp), %rdx
	movl	32(%rsp), %ecx
	movq	24(%rsp), %r10
	leaq	(%rdx,%rax,4), %rdi
	movl	%ecx, %r11d
	movabsq	$1000000000000, %rdx
	movq	%r10, %rsi
	.p2align 4,,10
	.p2align 3
.L61:
	imull	$102, %r11d, %eax
	movl	(%r10), %r11d
	addl	%r11d, %eax
	cltq
	movq	(%r14,%rax,8), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	addq	$4, %r10
	cmpq	%r10, %rdi
	jne	.L61
	addq	%rdx, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L63:
	movl	%ecx, %r10d
	movl	(%rsi), %ecx
	addq	$4, %rsi
	imull	$102, %r10d, %eax
	addl	%ecx, %eax
	cltq
	subq	%rdx, (%r14,%rax,8)
	imull	$102, %ecx, %eax
	addl	%r10d, %eax
	cltq
	addq	%rdx, (%r14,%rax,8)
	cmpq	%rsi, %rdi
	jne	.L63
	movl	$51, %ecx
	movq	%r15, %rdi
	xorl	%eax, %eax
	movl	$102, %r12d
	rep stosq
	movl	$0, 32(%rsp)
	movl	$1, %r13d
	movl	$1, 544(%rsp)
	jmp	.L64
	.p2align 4,,10
	.p2align 3
.L65:
	addq	$1, %r13
	addl	$102, %r12d
.L64:
	cmpq	$102, %r13
	je	.L60
	movl	(%r15,%r13,4), %edx
	testl	%edx, %edx
	jne	.L65
	cmpq	$0, (%r14,%r13,8)
	jle	.L65
	movl	$1, (%r15,%r13,4)
	movl	%r13d, 36(%rsp)
	cmpq	$101, %r13
	je	.L72
	xorl	%ebx, %ebx
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L67:
	addq	$1, %rbx
	cmpq	$102, %rbx
	je	.L65
.L68:
	movl	(%r15,%rbx,4), %eax
	movl	%ebx, %edi
	testl	%eax, %eax
	jne	.L67
	leal	(%r12,%rbx), %eax
	cmpq	$0, (%r14,%rax,8)
	jle	.L67
	movq	%r15, %rcx
	movq	%rbp, %rdx
	movq	%r14, %rsi
	call	dfs
	testl	%eax, %eax
	jle	.L67
	addl	$2, %eax
	cltq
	jmp	.L58
.L72:
	movl	$2, %eax
	jmp	.L58
.L71:
	movl	$2, %eax
	jmp	.L55
.L87:
	movq	$0, 8(%rsp)
.L60:
	movq	%r14, %rdi
	call	free@PLT
	movq	1064(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L88
	movq	8(%rsp), %rax
	addq	$1080, %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
.L86:
	.cfi_restore_state
	movslq	%ecx, %rax
	leaq	(%r14,%rax,8), %rdx
	movq	%rbp, %rax
	.p2align 4,,10
	.p2align 3
.L48:
	movq	%rsi, (%rdx,%rax,8)
	addq	%rdi, %rax
	cmpl	%eax, %ebx
	jge	.L48
	jmp	.L49
.L88:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	calc, .-calc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L102
	leaq	20(%rsp), %r12
	movl	$1, %ebx
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L91:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jge	.L91
	testl	%esi, %esi
	jle	.L102
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L103
	movl	%esi, %eax
	pxor	%xmm1, %xmm1
	pxor	%xmm3, %xmm3
	shrl	$2, %eax
	subl	$1, %eax
	salq	$4, %rax
	leaq	36(%rsp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L93:
	movdqu	(%r12), %xmm5
	movdqa	%xmm3, %xmm0
	movdqa	%xmm3, %xmm2
	addq	$16, %r12
	pcmpgtd	%xmm5, %xmm0
	pandn	%xmm5, %xmm0
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm4
	punpckldq	%xmm2, %xmm4
	punpckhdq	%xmm2, %xmm0
	paddq	%xmm4, %xmm1
	paddq	%xmm0, %xmm1
	cmpq	%r12, %rax
	jne	.L93
	movdqa	%xmm1, %xmm0
	movl	%esi, %edx
	psrldq	$8, %xmm0
	andl	$-4, %edx
	paddq	%xmm0, %xmm1
	leal	1(%rdx), %eax
	movq	%xmm1, %rbx
	cmpl	%edx, %esi
	je	.L90
.L92:
	movslq	%eax, %rdx
	movslq	16(%rsp,%rdx,4), %rdx
	movq	%rdx, %rcx
	addq	%rbx, %rdx
	testl	%ecx, %ecx
	cmovns	%rdx, %rbx
	leal	1(%rax), %edx
	cmpl	%edx, %esi
	jl	.L90
	movslq	%edx, %rdx
	movslq	16(%rsp,%rdx,4), %rdx
	movq	%rdx, %rcx
	addq	%rbx, %rdx
	testl	%ecx, %ecx
	cmovns	%rdx, %rbx
	addl	$2, %eax
	cmpl	%eax, %esi
	jl	.L90
	cltq
	movslq	16(%rsp,%rax,4), %rax
	movq	%rax, %rdx
	addq	%rbx, %rax
	testl	%edx, %edx
	cmovns	%rax, %rbx
.L90:
	leaq	16(%rsp), %rdi
	call	calc
	movq	%rbx, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	subq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L107
	addq	$440, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L102:
	.cfi_restore_state
	xorl	%ebx, %ebx
	jmp	.L90
.L103:
	xorl	%ebx, %ebx
	movl	$1, %eax
	jmp	.L92
.L107:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.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
.LFE42:
	.size	main, .-main
	.globl	f
	.section	.rodata
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.long	102
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.quad	1000000000000
	.quad	1000000000000
	.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
	.p2align 4
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB39:
	.cfi_startproc
	endbr64
	movslq	%edi, %rax
	movl	$1, (%rcx,%rax,4)
	movl	$1, %eax
	movl	%edi, (%rdx)
	cmpl	$101, %edi
	je	.L30
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	imull	$102, %edi, %eax
	movq	%rdx, %r15
	xorl	%r11d, %r11d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r10d, %r10d
	leaq	20(%rdx), %rdx
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	%eax, 8(%rsp)
	jmp	.L16
.L3:
	addq	$1, %r10
	addl	$102, %r11d
	cmpq	$102, %r10
	je	.L34
.L16:
	movl	(%rcx,%r10,4), %r8d
	testl	%r8d, %r8d
	jne	.L3
	movl	8(%rsp), %eax
	addl	%r10d, %eax
	cltq
	cmpq	$0, (%rsi,%rax,8)
	jle	.L3
	movl	$1, (%rcx,%r10,4)
	movl	%r10d, 4(%r15)
	cmpq	$101, %r10
	je	.L18
	movq	%r10, (%rsp)
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r15, %r10
	movq	%rcx, %r13
	jmp	.L15
.L5:
	addq	$1, %r8
	addl	$102, %r9d
	cmpq	$102, %r8
	je	.L35
.L15:
	movl	0(%r13,%r8,4), %edi
	testl	%edi, %edi
	jne	.L5
	leal	(%r11,%r8), %eax
	cmpq	$0, (%rsi,%rax,8)
	jle	.L5
	movl	$1, 0(%r13,%r8,4)
	movl	%r8d, 8(%r10)
	cmpq	$101, %r8
	je	.L19
	xorl	%r15d, %r15d
	movl	%r11d, 12(%rsp)
	xorl	%r14d, %r14d
	movl	%r15d, %r11d
	movq	%rsi, %r15
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L7:
	addq	$1, %r14
	addl	$102, %r11d
	cmpq	$102, %r14
	je	.L36
.L14:
	movl	0(%r13,%r14,4), %esi
	testl	%esi, %esi
	jne	.L7
	leal	(%r9,%r14), %eax
	cmpq	$0, (%r15,%rax,8)
	jle	.L7
	movl	$1, 0(%r13,%r14,4)
	movl	%r14d, 12(%r10)
	cmpq	$101, %r14
	je	.L20
	xorl	%ebp, %ebp
	xorl	%ebx, %ebx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$1, %rbx
	addl	$102, %ebp
	cmpq	$102, %rbx
	je	.L7
.L13:
	movl	0(%r13,%rbx,4), %ecx
	testl	%ecx, %ecx
	jne	.L9
	leal	(%r11,%rbx), %eax
	cmpq	$0, (%r15,%rax,8)
	jle	.L9
	movl	$1, 0(%r13,%rbx,4)
	movl	%ebx, 16(%r10)
	cmpq	$101, %rbx
	je	.L21
	xorl	%r12d, %r12d
.L12:
	movl	0(%r13,%r12,4), %eax
	movl	%r12d, %edi
	testl	%eax, %eax
	jne	.L11
	leal	0(%rbp,%r12), %eax
	cmpq	$0, (%r15,%rax,8)
	jg	.L37
.L11:
	addq	$1, %r12
	cmpq	$102, %r12
	je	.L9
	jmp	.L12
.L21:
	movl	$5, %eax
.L1:
	addq	$56, %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
.L20:
	.cfi_restore_state
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	$4, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L36:
	.cfi_restore_state
	addq	$1, %r8
	movl	12(%rsp), %r11d
	movq	%r15, %rsi
	addl	$102, %r9d
	cmpq	$102, %r8
	jne	.L15
.L35:
	movq	%r10, %r15
	movq	(%rsp), %r10
	movq	%r13, %rcx
	addl	$102, %r11d
	addq	$1, %r10
	cmpq	$102, %r10
	jne	.L16
.L34:
	xorl	%eax, %eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	movl	$3, %eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L37:
	movq	%r13, %rcx
	movq	%r15, %rsi
	movq	%r10, 40(%rsp)
	movl	%r11d, 36(%rsp)
	movq	%r8, 24(%rsp)
	movl	%r9d, 32(%rsp)
	movq	%rdx, 16(%rsp)
	call	dfs
	movq	16(%rsp), %rdx
	movl	32(%rsp), %r9d
	testl	%eax, %eax
	movq	24(%rsp), %r8
	movl	36(%rsp), %r11d
	movq	40(%rsp), %r10
	jle	.L11
	addl	$5, %eax
	jmp	.L1
.L18:
	movl	$2, %eax
	jmp	.L1
.L30:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE39:
	.size	dfs, .-dfs
	.p2align 4
	.globl	calc
	.type	calc, @function
calc:
.LFB40:
	.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
	movq	%rdi, %rbp
	movl	$10404, %edi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%esi, %ebx
	movl	$8, %esi
	subq	$1080, %rsp
	.cfi_def_cfa_offset 1136
	movq	%fs:40, %rax
	movq	%rax, 1064(%rsp)
	xorl	%eax, %eax
	call	calloc@PLT
	movq	%rax, %r14
	testl	%ebx, %ebx
	jle	.L46
	leal	-1(%rbx), %r8d
	leal	1(%rbx), %r10d
	movl	$203, %ecx
	movl	$1, %edx
	jmp	.L43
.L85:
	movslq	%ecx, %rsi
	addq	$1, %rdx
	addl	$102, %ecx
	movq	%rax, (%r14,%rsi,8)
	cmpq	%rdx, %r10
	je	.L84
.L43:
	movslq	0(%rbp,%rdx,4), %rax
	testl	%eax, %eax
	jns	.L85
	negl	%eax
	addl	$102, %ecx
	cltq
	movq	%rax, (%r14,%rdx,8)
	addq	$1, %rdx
	cmpq	%rdx, %r10
	jne	.L43
.L84:
	movl	$1, %edi
	movl	$102, %ecx
	movl	$2, %ebp
	movdqa	.LC0(%rip), %xmm0
	leaq	832(%r14), %r12
	movabsq	$1000000000000, %rsi
.L45:
	movl	%ebp, %eax
	cmpl	%ebp, %ebx
	jl	.L49
	cmpq	$1, %rdi
	jne	.L86
	cmpl	%ebp, %ebx
	je	.L50
	movl	%r8d, %edx
	shrl	%edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%r12,%rdx), %r11
	movq	%r12, %rdx
	.p2align 4,,10
	.p2align 3
.L51:
	movups	%xmm0, (%rdx)
	addq	$16, %rdx
	cmpq	%rdx, %r11
	jne	.L51
	movl	%r8d, %edx
	andl	$-2, %edx
	addl	%edx, %eax
	cmpl	%edx, %r8d
	je	.L49
.L50:
	addl	%ecx, %eax
	cltq
	movq	%rsi, (%r14,%rax,8)
.L49:
	addq	$1, %rdi
	addq	$2, %rbp
	addl	$102, %ecx
	subl	$2, %r8d
	addq	$832, %r12
	cmpq	%rdi, %r10
	jne	.L45
.L46:
	leaq	544(%rsp), %r15
	movl	$64, %ecx
	xorl	%eax, %eax
	movl	$0, 32(%rsp)
	movq	%r15, %rdi
	movl	$1, %r12d
	leaq	40(%rsp), %rbp
	rep stosq
	movl	$1, 544(%rsp)
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L54:
	addq	$1, %r12
.L40:
	movl	%r12d, %r13d
	cmpq	$102, %r12
	je	.L87
	movl	(%r15,%r12,4), %esi
	testl	%esi, %esi
	jne	.L54
	cmpq	$0, (%r14,%r12,8)
	jle	.L54
	movl	$1, (%r15,%r12,4)
	movl	%r12d, 36(%rsp)
	cmpq	$101, %r12
	je	.L71
	imull	$102, %r13d, %r13d
	xorl	%ebx, %ebx
	jmp	.L57
	.p2align 4,,10
	.p2align 3
.L56:
	addq	$1, %rbx
	cmpq	$102, %rbx
	je	.L54
.L57:
	movl	(%r15,%rbx,4), %ecx
	movl	%ebx, %edi
	testl	%ecx, %ecx
	jne	.L56
	leal	0(%r13,%rbx), %eax
	cmpq	$0, (%r14,%rax,8)
	jle	.L56
	movq	%r15, %rcx
	movq	%rbp, %rdx
	movq	%r14, %rsi
	call	dfs
	testl	%eax, %eax
	jle	.L56
	addl	$2, %eax
	cltq
.L55:
	leaq	32(%rsp), %rsi
	leaq	40(%rsp), %rbp
	movq	$0, 8(%rsp)
	movq	%rsi, 16(%rsp)
	leaq	36(%rsp), %rsi
	movq	%rsi, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L58:
	movq	16(%rsp), %rdx
	movl	32(%rsp), %ecx
	movq	24(%rsp), %r10
	leaq	(%rdx,%rax,4), %rdi
	movl	%ecx, %r11d
	movabsq	$1000000000000, %rdx
	movq	%r10, %rsi
	.p2align 4,,10
	.p2align 3
.L61:
	imull	$102, %r11d, %eax
	movl	(%r10), %r11d
	addl	%r11d, %eax
	cltq
	movq	(%r14,%rax,8), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	addq	$4, %r10
	cmpq	%r10, %rdi
	jne	.L61
	addq	%rdx, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L63:
	movl	%ecx, %r10d
	movl	(%rsi), %ecx
	addq	$4, %rsi
	imull	$102, %r10d, %eax
	addl	%ecx, %eax
	cltq
	subq	%rdx, (%r14,%rax,8)
	imull	$102, %ecx, %eax
	addl	%r10d, %eax
	cltq
	addq	%rdx, (%r14,%rax,8)
	cmpq	%rsi, %rdi
	jne	.L63
	movl	$51, %ecx
	movq	%r15, %rdi
	xorl	%eax, %eax
	movl	$102, %r12d
	rep stosq
	movl	$0, 32(%rsp)
	movl	$1, %r13d
	movl	$1, 544(%rsp)
	jmp	.L64
	.p2align 4,,10
	.p2align 3
.L65:
	addq	$1, %r13
	addl	$102, %r12d
.L64:
	cmpq	$102, %r13
	je	.L60
	movl	(%r15,%r13,4), %edx
	testl	%edx, %edx
	jne	.L65
	cmpq	$0, (%r14,%r13,8)
	jle	.L65
	movl	$1, (%r15,%r13,4)
	movl	%r13d, 36(%rsp)
	cmpq	$101, %r13
	je	.L72
	xorl	%ebx, %ebx
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L67:
	addq	$1, %rbx
	cmpq	$102, %rbx
	je	.L65
.L68:
	movl	(%r15,%rbx,4), %eax
	movl	%ebx, %edi
	testl	%eax, %eax
	jne	.L67
	leal	(%r12,%rbx), %eax
	cmpq	$0, (%r14,%rax,8)
	jle	.L67
	movq	%r15, %rcx
	movq	%rbp, %rdx
	movq	%r14, %rsi
	call	dfs
	testl	%eax, %eax
	jle	.L67
	addl	$2, %eax
	cltq
	jmp	.L58
.L72:
	movl	$2, %eax
	jmp	.L58
.L71:
	movl	$2, %eax
	jmp	.L55
.L87:
	movq	$0, 8(%rsp)
.L60:
	movq	%r14, %rdi
	call	free@PLT
	movq	1064(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L88
	movq	8(%rsp), %rax
	addq	$1080, %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
.L86:
	.cfi_restore_state
	movslq	%ecx, %rax
	leaq	(%r14,%rax,8), %rdx
	movq	%rbp, %rax
	.p2align 4,,10
	.p2align 3
.L48:
	movq	%rsi, (%rdx,%rax,8)
	addq	%rdi, %rax
	cmpl	%eax, %ebx
	jge	.L48
	jmp	.L49
.L88:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	calc, .-calc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$440, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L102
	leaq	20(%rsp), %r12
	movl	$1, %ebx
	movq	%r12, %rbp
	.p2align 4,,10
	.p2align 3
.L91:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jge	.L91
	testl	%esi, %esi
	jle	.L102
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L103
	movl	%esi, %eax
	pxor	%xmm1, %xmm1
	pxor	%xmm3, %xmm3
	shrl	$2, %eax
	subl	$1, %eax
	salq	$4, %rax
	leaq	36(%rsp,%rax), %rax
	.p2align 4,,10
	.p2align 3
.L93:
	movdqu	(%r12), %xmm5
	movdqa	%xmm3, %xmm0
	movdqa	%xmm3, %xmm2
	addq	$16, %r12
	pcmpgtd	%xmm5, %xmm0
	pandn	%xmm5, %xmm0
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm4
	punpckldq	%xmm2, %xmm4
	punpckhdq	%xmm2, %xmm0
	paddq	%xmm4, %xmm1
	paddq	%xmm0, %xmm1
	cmpq	%r12, %rax
	jne	.L93
	movdqa	%xmm1, %xmm0
	movl	%esi, %edx
	psrldq	$8, %xmm0
	andl	$-4, %edx
	paddq	%xmm0, %xmm1
	leal	1(%rdx), %eax
	movq	%xmm1, %rbx
	cmpl	%edx, %esi
	je	.L90
.L92:
	movslq	%eax, %rdx
	movslq	16(%rsp,%rdx,4), %rdx
	movq	%rdx, %rcx
	addq	%rbx, %rdx
	testl	%ecx, %ecx
	cmovns	%rdx, %rbx
	leal	1(%rax), %edx
	cmpl	%edx, %esi
	jl	.L90
	movslq	%edx, %rdx
	movslq	16(%rsp,%rdx,4), %rdx
	movq	%rdx, %rcx
	addq	%rbx, %rdx
	testl	%ecx, %ecx
	cmovns	%rdx, %rbx
	addl	$2, %eax
	cmpl	%eax, %esi
	jl	.L90
	cltq
	movslq	16(%rsp,%rax,4), %rax
	movq	%rax, %rdx
	addq	%rbx, %rax
	testl	%edx, %edx
	cmovns	%rax, %rbx
.L90:
	leaq	16(%rsp), %rdi
	call	calc
	movq	%rbx, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	subq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L107
	addq	$440, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L102:
	.cfi_restore_state
	xorl	%ebx, %ebx
	jmp	.L90
.L103:
	xorl	%ebx, %ebx
	movl	$1, %eax
	jmp	.L92
.L107:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.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
.LFE42:
	.size	main, .-main
	.globl	f
	.section	.rodata
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.long	102
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.quad	1000000000000
	.quad	1000000000000
	.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>

typedef long long int int64;

const int f=102;
#define POS(i,j) ((i)*f+(j))

int dfs(int v,int64 *g,int *array,int *used){
  used[v]=1;
  array[0]=v;
  if(v==f-1) return 1;
  int i;
  for(i=0;i<f;i++){
    if(!used[i] && g[POS(v,i)]>0){
      int c=dfs(i,g,array+1,used);
      if(c>0) return c+1;
    }
  }
  return 0;
}

int64 calc(int *a,int n){
  int64 *g=(int64 *)calloc(f*f,sizeof(int64));
  int i,j;
  for(i=1;i<=n;i++){
    if(a[i]>=0){
      g[POS(i,f-1)]=a[i];
    } else {
      g[POS(0,i)]=-a[i];
    }
  }
  for(i=1;i<=n;i++){
    for(j=2*i;j<=n;j+=i){
      g[POS(i,j)]=1000000000LL*1000;
    }
  }
  int array[128];
  int used[128]={0};
  int64 ans=0;
  int64 len=dfs(0,g,array,used);
  while(len){
    int64 min=1000000000LL*1000;
    for(i=0;i+1<len;i++){
      int64 t=g[POS(array[i],array[i+1])];
      if(min>t) min=t;
    }
    ans+=min;
    for(i=0;i+1<len;i++){
      int v=array[i];
      int u=array[i+1];
      g[POS(v,u)]-=min;
      g[POS(u,v)]+=min;
    }
    for(i=0;i<f;i++) used[i]=0;
    len=dfs(0,g,array,used);
  }
  free(g);
  return ans;
}

void run(void){
  int n;
  scanf("%d",&n);
  int i;
  int a[101];
  for(i=1;i<=n;i++) scanf("%d",a+i);
  int64 sum=0;
  for(i=1;i<=n;i++) if(a[i]>=0) sum+=a[i];
  int64 ans=sum-calc(a,n);
  printf("%lld\n",ans);
  return;
}

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

6
000 -100 -100 -100 100 -100
 6
1 2 -6 0 5 3
 2
-40 100000
 5
-1 -2 -5 -4 -5
 6
1 2 -6 0 9 3
 2
-64 100000
 6
000 1 -100 -100 100 -100
 2
-64 100100
 6
1 2 -6 0 13 3
 2
-58 100100

100
 8
 99960
 0
 12
 99936
 101
 100036
 16
 100042

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>

typedef long long int int64;

const int f=102;
#define POS(i,j) ((i)*f+(j))

int dfs(int v,int64 *g,int *array,int *used){
  used[v]=1;
  array[0]=v;
  if(v==f-1) return 1;
  int i;
  for(i=0;i<f;i++){
    if(!used[i] && g[POS(v,i)]>0){
      int c=dfs(i,g,array+1,used);
      if(c>0) return c+1;
    }
  }
  return 0;
}

int64 calc(int *a,int n){
  int64 *g=(int64 *)calloc(f*f,sizeof(int64));
  int i,j;
  for(i=1;i<=n;i++){
    if(a[i]>=0){
      g[POS(i,f-1)]=a[i];
    } else {
      g[POS(0,i)]=-a[i];
    }
  }
  for(i=1;i<=n;i++){
    for(j=2*i;j<=n;j+=i){
      g[POS(i,j)]=1000000000LL*1000;
    }
  }
  int array[128];
  int used[128]={0};
  int64 ans=0;
  int64 len=dfs(0,g,array,used);
  while(len){
    int64 min=1000000000LL*1000;
    for(i=0;i+1<len;i++){
      int64 t=g[POS(array[i],array[i+1])];
      if(min>t) min=t;
    }
    ans+=min;
    for(i=0;i+1<len;i++){
      int v=array[i];
      int u=array[i+1];
      g[POS(v,u)]-=min;
      g[POS(u,v)]+=min;
    }
    for(i=0;i<f;i++) used[i]=0;
    len=dfs(0,g,array,used);
  }
  free(g);
  return ans;
}

void run(void){
  int n;
  scanf("%d",&n);
  int i;
  int a[101];
  for(i=1;i<=n;i++) scanf("%d",a+i);
  int64 sum=0;
  for(i=1;i<=n;i++) if(a[i]>=0) sum+=a[i];
  int64 ans=sum-calc(a,n);
  printf("%lld\n",ans);
  return;
}

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

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	f
	.section	.rodata
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.long	102
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -20(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	%rcx, -48(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	$1, (%rax)
	movq	-40(%rbp), %rax
	movl	-20(%rbp), %edx
	movl	%edx, (%rax)
	movl	$102, %eax
	subl	$1, %eax
	cmpl	%eax, -20(%rbp)
	jne	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movl	$0, -8(%rbp)
	jmp	.L4
.L6:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jne	.L5
	movl	$102, %eax
	imull	-20(%rbp), %eax
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jle	.L5
	movq	-40(%rbp), %rax
	leaq	4(%rax), %rdi
	movq	-48(%rbp), %rdx
	movq	-32(%rbp), %rsi
	movl	-8(%rbp), %eax
	movq	%rdx, %rcx
	movq	%rdi, %rdx
	movl	%eax, %edi
	call	dfs
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	jle	.L5
	movl	-4(%rbp), %eax
	addl	$1, %eax
	jmp	.L3
.L5:
	addl	$1, -8(%rbp)
.L4:
	movl	$102, %eax
	cmpl	%eax, -8(%rbp)
	jl	.L6
	movl	$0, %eax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dfs, .-dfs
	.globl	calc
	.type	calc, @function
calc:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1120, %rsp
	movq	%rdi, -1112(%rbp)
	movl	%esi, -1116(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$102, %edx
	movl	$102, %eax
	imull	%edx, %eax
	cltq
	movl	$8, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -1056(%rbp)
	movl	$1, -1096(%rbp)
	jmp	.L8
.L11:
	movl	-1096(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-1112(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	js	.L9
	movl	-1096(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-1112(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	$102, %edx
	imull	-1096(%rbp), %edx
	movl	$102, %ecx
	subl	$1, %ecx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-1056(%rbp), %rdx
	addq	%rcx, %rdx
	cltq
	movq	%rax, (%rdx)
	jmp	.L10
.L9:
	movl	-1096(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-1112(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	negl	%eax
	movl	%eax, %ecx
	movl	-1096(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-1056(%rbp), %rax
	addq	%rax, %rdx
	movslq	%ecx, %rax
	movq	%rax, (%rdx)
.L10:
	addl	$1, -1096(%rbp)
.L8:
	movl	-1096(%rbp), %eax
	cmpl	-1116(%rbp), %eax
	jle	.L11
	movl	$1, -1096(%rbp)
	jmp	.L12
.L15:
	movl	-1096(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -1092(%rbp)
	jmp	.L13
.L14:
	movl	$102, %eax
	imull	-1096(%rbp), %eax
	movl	%eax, %edx
	movl	-1092(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-1056(%rbp), %rax
	addq	%rdx, %rax
	movabsq	$1000000000000, %rsi
	movq	%rsi, (%rax)
	movl	-1096(%rbp), %eax
	addl	%eax, -1092(%rbp)
.L13:
	movl	-1092(%rbp), %eax
	cmpl	-1116(%rbp), %eax
	jle	.L14
	addl	$1, -1096(%rbp)
.L12:
	movl	-1096(%rbp), %eax
	cmpl	-1116(%rbp), %eax
	jle	.L15
	leaq	-528(%rbp), %rdx
	movl	$0, %eax
	movl	$64, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$0, -1080(%rbp)
	leaq	-528(%rbp), %rcx
	leaq	-1040(%rbp), %rdx
	movq	-1056(%rbp), %rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	dfs
	cltq
	movq	%rax, -1072(%rbp)
	jmp	.L16
.L24:
	movabsq	$1000000000000, %rax
	movq	%rax, -1064(%rbp)
	movl	$0, -1096(%rbp)
	jmp	.L17
.L19:
	movl	-1096(%rbp), %eax
	cltq
	movl	-1040(%rbp,%rax,4), %eax
	movl	$102, %edx
	imull	%eax, %edx
	movl	-1096(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-1040(%rbp,%rax,4), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-1056(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -1048(%rbp)
	movq	-1064(%rbp), %rax
	cmpq	-1048(%rbp), %rax
	jle	.L18
	movq	-1048(%rbp), %rax
	movq	%rax, -1064(%rbp)
.L18:
	addl	$1, -1096(%rbp)
.L17:
	movl	-1096(%rbp), %eax
	addl	$1, %eax
	cltq
	cmpq	%rax, -1072(%rbp)
	jg	.L19
	movq	-1064(%rbp), %rax
	addq	%rax, -1080(%rbp)
	movl	$0, -1096(%rbp)
	jmp	.L20
.L21:
	movl	-1096(%rbp), %eax
	cltq
	movl	-1040(%rbp,%rax,4), %eax
	movl	%eax, -1088(%rbp)
	movl	-1096(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-1040(%rbp,%rax,4), %eax
	movl	%eax, -1084(%rbp)
	movl	$102, %eax
	imull	-1088(%rbp), %eax
	movl	%eax, %edx
	movl	-1084(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-1056(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	$102, %edx
	movl	%edx, %ecx
	imull	-1088(%rbp), %ecx
	movl	-1084(%rbp), %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-1056(%rbp), %rdx
	addq	%rcx, %rdx
	subq	-1064(%rbp), %rax
	movq	%rax, (%rdx)
	movl	$102, %eax
	imull	-1084(%rbp), %eax
	movl	%eax, %edx
	movl	-1088(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-1056(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rcx
	movl	$102, %eax
	imull	-1084(%rbp), %eax
	movl	%eax, %edx
	movl	-1088(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-1056(%rbp), %rax
	addq	%rdx, %rax
	movq	-1064(%rbp), %rdx
	addq	%rcx, %rdx
	movq	%rdx, (%rax)
	addl	$1, -1096(%rbp)
.L20:
	movl	-1096(%rbp), %eax
	addl	$1, %eax
	cltq
	cmpq	%rax, -1072(%rbp)
	jg	.L21
	movl	$0, -1096(%rbp)
	jmp	.L22
.L23:
	movl	-1096(%rbp), %eax
	cltq
	movl	$0, -528(%rbp,%rax,4)
	addl	$1, -1096(%rbp)
.L22:
	movl	$102, %eax
	cmpl	%eax, -1096(%rbp)
	jl	.L23
	leaq	-528(%rbp), %rcx
	leaq	-1040(%rbp), %rdx
	movq	-1056(%rbp), %rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	dfs
	cltq
	movq	%rax, -1072(%rbp)
.L16:
	cmpq	$0, -1072(%rbp)
	jne	.L24
	movq	-1056(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-1080(%rbp), %rax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	calc, .-calc
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB8:
	.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
	leaq	-440(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -436(%rbp)
	jmp	.L28
.L29:
	movl	-436(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-416(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -436(%rbp)
.L28:
	movl	-440(%rbp), %eax
	cmpl	%eax, -436(%rbp)
	jle	.L29
	movq	$0, -432(%rbp)
	movl	$1, -436(%rbp)
	jmp	.L30
.L32:
	movl	-436(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	testl	%eax, %eax
	js	.L31
	movl	-436(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cltq
	addq	%rax, -432(%rbp)
.L31:
	addl	$1, -436(%rbp)
.L30:
	movl	-440(%rbp), %eax
	cmpl	%eax, -436(%rbp)
	jle	.L32
	movl	-440(%rbp), %edx
	leaq	-416(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	calc
	movq	%rax, %rdx
	movq	-432(%rbp), %rax
	subq	%rdx, %rax
	movq	%rax, -424(%rbp)
	movq	-424(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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
.LFE9:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	f
	.section	.rodata
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.long	102
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -20(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	%rcx, -48(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	$1, (%rax)
	movq	-40(%rbp), %rax
	movl	-20(%rbp), %edx
	movl	%edx, (%rax)
	movl	$102, %eax
	subl	$1, %eax
	cmpl	%eax, -20(%rbp)
	jne	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movl	$0, -8(%rbp)
	jmp	.L4
.L6:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jne	.L5
	movl	$102, %eax
	imull	-20(%rbp), %eax
	movl	%eax, %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jle	.L5
	movq	-40(%rbp), %rax
	leaq	4(%rax), %rdi
	movq	-48(%rbp), %rdx
	movq	-32(%rbp), %rsi
	movl	-8(%rbp), %eax
	movq	%rdx, %rcx
	movq	%rdi, %rdx
	movl	%eax, %edi
	call	dfs
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	jle	.L5
	movl	-4(%rbp), %eax
	addl	$1, %eax
	jmp	.L3
.L5:
	addl	$1, -8(%rbp)
.L4:
	movl	$102, %eax
	cmpl	%eax, -8(%rbp)
	jl	.L6
	movl	$0, %eax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dfs, .-dfs
	.globl	calc
	.type	calc, @function
calc:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1120, %rsp
	movq	%rdi, -1112(%rbp)
	movl	%esi, -1116(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$102, %edx
	movl	$102, %eax
	imull	%edx, %eax
	cltq
	movl	$8, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -1056(%rbp)
	movl	$1, -1096(%rbp)
	jmp	.L8
.L11:
	movl	-1096(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-1112(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	js	.L9
	movl	-1096(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-1112(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	$102, %edx
	imull	-1096(%rbp), %edx
	movl	$102, %ecx
	subl	$1, %ecx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-1056(%rbp), %rdx
	addq	%rcx, %rdx
	cltq
	movq	%rax, (%rdx)
	jmp	.L10
.L9:
	movl	-1096(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-1112(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	negl	%eax
	movl	%eax, %ecx
	movl	-1096(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-1056(%rbp), %rax
	addq	%rax, %rdx
	movslq	%ecx, %rax
	movq	%rax, (%rdx)
.L10:
	addl	$1, -1096(%rbp)
.L8:
	movl	-1096(%rbp), %eax
	cmpl	-1116(%rbp), %eax
	jle	.L11
	movl	$1, -1096(%rbp)
	jmp	.L12
.L15:
	movl	-1096(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -1092(%rbp)
	jmp	.L13
.L14:
	movl	$102, %eax
	imull	-1096(%rbp), %eax
	movl	%eax, %edx
	movl	-1092(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-1056(%rbp), %rax
	addq	%rdx, %rax
	movabsq	$1000000000000, %rsi
	movq	%rsi, (%rax)
	movl	-1096(%rbp), %eax
	addl	%eax, -1092(%rbp)
.L13:
	movl	-1092(%rbp), %eax
	cmpl	-1116(%rbp), %eax
	jle	.L14
	addl	$1, -1096(%rbp)
.L12:
	movl	-1096(%rbp), %eax
	cmpl	-1116(%rbp), %eax
	jle	.L15
	leaq	-528(%rbp), %rdx
	movl	$0, %eax
	movl	$64, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$0, -1080(%rbp)
	leaq	-528(%rbp), %rcx
	leaq	-1040(%rbp), %rdx
	movq	-1056(%rbp), %rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	dfs
	cltq
	movq	%rax, -1072(%rbp)
	jmp	.L16
.L24:
	movabsq	$1000000000000, %rax
	movq	%rax, -1064(%rbp)
	movl	$0, -1096(%rbp)
	jmp	.L17
.L19:
	movl	-1096(%rbp), %eax
	cltq
	movl	-1040(%rbp,%rax,4), %eax
	movl	$102, %edx
	imull	%eax, %edx
	movl	-1096(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-1040(%rbp,%rax,4), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-1056(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -1048(%rbp)
	movq	-1064(%rbp), %rax
	cmpq	-1048(%rbp), %rax
	jle	.L18
	movq	-1048(%rbp), %rax
	movq	%rax, -1064(%rbp)
.L18:
	addl	$1, -1096(%rbp)
.L17:
	movl	-1096(%rbp), %eax
	addl	$1, %eax
	cltq
	cmpq	%rax, -1072(%rbp)
	jg	.L19
	movq	-1064(%rbp), %rax
	addq	%rax, -1080(%rbp)
	movl	$0, -1096(%rbp)
	jmp	.L20
.L21:
	movl	-1096(%rbp), %eax
	cltq
	movl	-1040(%rbp,%rax,4), %eax
	movl	%eax, -1088(%rbp)
	movl	-1096(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-1040(%rbp,%rax,4), %eax
	movl	%eax, -1084(%rbp)
	movl	$102, %eax
	imull	-1088(%rbp), %eax
	movl	%eax, %edx
	movl	-1084(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-1056(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	$102, %edx
	movl	%edx, %ecx
	imull	-1088(%rbp), %ecx
	movl	-1084(%rbp), %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-1056(%rbp), %rdx
	addq	%rcx, %rdx
	subq	-1064(%rbp), %rax
	movq	%rax, (%rdx)
	movl	$102, %eax
	imull	-1084(%rbp), %eax
	movl	%eax, %edx
	movl	-1088(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-1056(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rcx
	movl	$102, %eax
	imull	-1084(%rbp), %eax
	movl	%eax, %edx
	movl	-1088(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-1056(%rbp), %rax
	addq	%rdx, %rax
	movq	-1064(%rbp), %rdx
	addq	%rcx, %rdx
	movq	%rdx, (%rax)
	addl	$1, -1096(%rbp)
.L20:
	movl	-1096(%rbp), %eax
	addl	$1, %eax
	cltq
	cmpq	%rax, -1072(%rbp)
	jg	.L21
	movl	$0, -1096(%rbp)
	jmp	.L22
.L23:
	movl	-1096(%rbp), %eax
	cltq
	movl	$0, -528(%rbp,%rax,4)
	addl	$1, -1096(%rbp)
.L22:
	movl	$102, %eax
	cmpl	%eax, -1096(%rbp)
	jl	.L23
	leaq	-528(%rbp), %rcx
	leaq	-1040(%rbp), %rdx
	movq	-1056(%rbp), %rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	dfs
	cltq
	movq	%rax, -1072(%rbp)
.L16:
	cmpq	$0, -1072(%rbp)
	jne	.L24
	movq	-1056(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-1080(%rbp), %rax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	calc, .-calc
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB8:
	.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
	leaq	-440(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -436(%rbp)
	jmp	.L28
.L29:
	movl	-436(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-416(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -436(%rbp)
.L28:
	movl	-440(%rbp), %eax
	cmpl	%eax, -436(%rbp)
	jle	.L29
	movq	$0, -432(%rbp)
	movl	$1, -436(%rbp)
	jmp	.L30
.L32:
	movl	-436(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	testl	%eax, %eax
	js	.L31
	movl	-436(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cltq
	addq	%rax, -432(%rbp)
.L31:
	addl	$1, -436(%rbp)
.L30:
	movl	-440(%rbp), %eax
	cmpl	%eax, -436(%rbp)
	jle	.L32
	movl	-440(%rbp), %edx
	leaq	-416(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	calc
	movq	%rax, %rdx
	movq	-432(%rbp), %rax
	subq	%rdx, %rax
	movq	%rax, -424(%rbp)
	movq	-424(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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
.LFE9:
	.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:
