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>
int MIN(int a,int b){return a<b?a:b;}
int ta[1010],to[1000010],nt[1000010],co[1000010],F[1010];
int MF(int s,int t,int e,int min){
  if(s==t||min==0)return min;
  int i,r;
  F[s]=1;
  for(i=ta[s];i+1;i=nt[i]){
    if(F[to[i]])continue;
    r=MF(to[i],t,e,MIN(min,co[i]));
    co[i]-=r;
    co[(i+e)%(2*e)]+=r;
    if(r)return r;
  }
  return 0;
}
//???????????????
//s??????t???????????§???????±?????????????????????°v????????°e???a??????b????????£???c????????????????????????
int maxf(int s,int t,int v,int e,int *a,int *b,int *c){
  int i,f,r;
  for(i=0;i<v;i++)ta[i]=-1;
  for(i=0;i<e;i++){
    nt[i  ]=ta[to[i+e]=a[i]];
    nt[i+e]=ta[to[i  ]=b[i]];
    co[ta[a[i]]=i  ]=c[i];
    co[ta[b[i]]=i+e]=0;
  }
  for(f=0;r=MF(s,t,e,1000000000);f+=r){
    for(i=0;i<v;i++)F[i]=0;
  }
  return f;
}int main(){
  int n,a[3010],b[3010],c[3010],m,r=0,i;
  scanf("%d",&n);
  for(i=1;i<n;i++){
    scanf("%d",&m);
    if(m){
      a[r  ]=i;
      b[r  ]=n;
      c[r++]=1e9;
    }
  }
  for(i=1;i<n;i++){
    scanf("%d %d %d",&a[r],&b[r],&c[r]);
    r++;
  }
  printf("%d\n",maxf(0,n,n+1,r,a,b,c));
  return 0;
}
    ```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	MIN, .-MIN
	.globl	ta
	.bss
	.align 32
	.type	ta, @object
	.size	ta, 4040
ta:
	.zero	4040
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 4000040
to:
	.zero	4000040
	.globl	nt
	.align 32
	.type	nt, @object
	.size	nt, 4000040
nt:
	.zero	4000040
	.globl	co
	.align 32
	.type	co, @object
	.size	co, 4000040
co:
	.zero	4000040
	.globl	F
	.align 32
	.type	F, @object
	.size	F, 4040
F:
	.zero	4040
	.text
	.globl	MF
	.type	MF, @function
MF:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	je	.L4
	cmpl	$0, -32(%rbp)
	jne	.L5
.L4:
	movl	-32(%rbp), %eax
	jmp	.L6
.L5:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	jmp	.L7
.L10:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L11
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	co(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-32(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	%eax, %edi
	call	MF
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	co(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	-4(%rbp), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	co(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	movl	-28(%rbp), %edx
	leal	(%rdx,%rdx), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	co(%rip), %rdx
	movl	(%rcx,%rdx), %ecx
	movl	-4(%rbp), %edx
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	co(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	cmpl	$0, -4(%rbp)
	je	.L9
	movl	-4(%rbp), %eax
	jmp	.L6
.L11:
	nop
.L9:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nt(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
.L7:
	cmpl	$-1, -8(%rbp)
	jne	.L10
	movl	$0, %eax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	MF, .-MF
	.globl	maxf
	.type	maxf, @function
maxf:
.LFB2:
	.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)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movq	%r8, -40(%rbp)
	movq	%r9, -48(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L13
.L14:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L13:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L14
	movl	$0, -12(%rbp)
	jmp	.L15
.L16:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %ecx
	movl	-32(%rbp), %eax
	addl	%ecx, %eax
	movl	(%rdx), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	to(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	to(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %ecx
	movl	-32(%rbp), %edx
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	16(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rdi
	leaq	ta(%rip), %rsi
	movl	-12(%rbp), %edx
	movl	%edx, (%rdi,%rsi)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	(%rcx), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	co(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-12(%rbp), %ecx
	movl	-32(%rbp), %edx
	leal	(%rcx,%rdx), %esi
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	ta(%rip), %rdx
	movl	%esi, (%rcx,%rdx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	co(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L15:
	movl	-12(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jl	.L16
	movl	$0, -8(%rbp)
	jmp	.L17
.L20:
	movl	$0, -12(%rbp)
	jmp	.L18
.L19:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L18:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L19
	movl	-4(%rbp), %eax
	addl	%eax, -8(%rbp)
.L17:
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$1000000000, %ecx
	movl	%eax, %edi
	call	MF
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	jne	.L20
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	maxf, .-maxf
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-32768(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3392, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -36152(%rbp)
	leaq	-36160(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -36148(%rbp)
	jmp	.L23
.L25:
	leaq	-36156(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-36156(%rbp), %eax
	testl	%eax, %eax
	je	.L24
	movl	-36152(%rbp), %eax
	cltq
	movl	-36148(%rbp), %edx
	movl	%edx, -36144(%rbp,%rax,4)
	movl	-36160(%rbp), %edx
	movl	-36152(%rbp), %eax
	cltq
	movl	%edx, -24096(%rbp,%rax,4)
	movl	-36152(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -36152(%rbp)
	cltq
	movl	$1000000000, -12048(%rbp,%rax,4)
.L24:
	addl	$1, -36148(%rbp)
.L23:
	movl	-36160(%rbp), %eax
	cmpl	%eax, -36148(%rbp)
	jl	.L25
	movl	$1, -36148(%rbp)
	jmp	.L26
.L27:
	leaq	-12048(%rbp), %rdx
	movl	-36152(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-24096(%rbp), %rdx
	movl	-36152(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-36144(%rbp), %rsi
	movl	-36152(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -36152(%rbp)
	addl	$1, -36148(%rbp)
.L26:
	movl	-36160(%rbp), %eax
	cmpl	%eax, -36148(%rbp)
	jl	.L27
	movl	-36160(%rbp), %eax
	leal	1(%rax), %esi
	movl	-36160(%rbp), %eax
	leaq	-24096(%rbp), %r8
	leaq	-36144(%rbp), %rdi
	movl	-36152(%rbp), %edx
	subq	$8, %rsp
	leaq	-12048(%rbp), %rcx
	pushq	%rcx
	movq	%r8, %r9
	movq	%rdi, %r8
	movl	%edx, %ecx
	movl	%esi, %edx
	movl	%eax, %esi
	movl	$0, %edi
	call	maxf
	addq	$16, %rsp
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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
	.type	MF.part.0, @function
MF.part.0:
.LFB27:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edi, %rdi
	leaq	ta(%rip), %rax
	leaq	F(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	(%rax,%rdi,4), %ebx
	movl	$1, (%r15,%rdi,4)
	cmpl	$-1, %ebx
	je	.L6
	movl	%edx, %r14d
	movl	%ecx, %r13d
	leal	(%rdx,%rdx), %r9d
	leaq	to(%rip), %r8
	leaq	co(%rip), %r12
	leaq	nt(%rip), %r10
	.p2align 4,,10
	.p2align 3
.L5:
	movslq	%ebx, %rbp
	movslq	(%r8,%rbp,4), %rax
	movq	%rax, %rdi
	movl	(%r15,%rax,4), %eax
	testl	%eax, %eax
	jne	.L8
	movl	(%r12,%rbp,4), %eax
	movl	%r13d, %ecx
	cmpl	%r13d, %eax
	cmovle	%eax, %ecx
	cmpl	%esi, %edi
	je	.L7
	testl	%ecx, %ecx
	je	.L7
	movl	%r14d, %edx
	movl	%r9d, 12(%rsp)
	movl	%esi, 8(%rsp)
	call	MF.part.0
	movl	12(%rsp), %r9d
	movl	8(%rsp), %esi
	leaq	nt(%rip), %r10
	movl	%eax, %ecx
	movl	(%r12,%rbp,4), %eax
	leaq	to(%rip), %r8
.L7:
	subl	%ecx, %eax
	movl	%eax, (%r12,%rbp,4)
	leal	(%r14,%rbx), %eax
	cltd
	idivl	%r9d
	movslq	%edx, %rdx
	addl	%ecx, (%r12,%rdx,4)
	testl	%ecx, %ecx
	jne	.L1
.L8:
	movl	(%r10,%rbp,4), %ebx
	cmpl	$-1, %ebx
	jne	.L5
.L6:
	xorl	%ecx, %ecx
.L1:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	movl	%ecx, %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
	.cfi_endproc
.LFE27:
	.size	MF.part.0, .-MF.part.0
	.p2align 4
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	MIN, .-MIN
	.p2align 4
	.globl	MF
	.type	MF, @function
MF:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	je	.L19
	testl	%ecx, %ecx
	je	.L19
	jmp	MF.part.0
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%ecx, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	MF, .-MF
	.p2align 4
	.globl	maxf
	.type	maxf, @function
maxf:
.LFB25:
	.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
	movq	%r9, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%ecx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r8, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%edi, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edx, 4(%rsp)
	movq	80(%rsp), %r15
	testl	%edx, %edx
	jle	.L21
	movslq	%edx, %rdx
	movl	$255, %esi
	leaq	ta(%rip), %rdi
	salq	$2, %rdx
	call	memset@PLT
.L21:
	testl	%r13d, %r13d
	jle	.L22
	movslq	%r13d, %rcx
	leaq	co(%rip), %rsi
	movl	%ebx, 8(%rsp)
	leaq	to(%rip), %r9
	leaq	0(,%rcx,4), %rax
	leaq	nt(%rip), %r8
	movl	%ebp, 12(%rsp)
	movq	%rcx, %rbp
	leaq	(%rsi,%rax), %rdx
	leaq	(%r9,%rax), %r10
	leaq	(%r8,%rax), %r11
	leaq	ta(%rip), %rdi
	xorl	%eax, %eax
	movq	%rdx, %rbx
	.p2align 4,,10
	.p2align 3
.L23:
	movslq	(%r12,%rax,4), %rdx
	leal	0(%r13,%rax), %ecx
	movl	%edx, (%r10,%rax,4)
	movl	(%rdi,%rdx,4), %edx
	movl	%edx, (%r8,%rax,4)
	movslq	(%r14,%rax,4), %rdx
	movl	%edx, (%r9,%rax,4)
	movl	(%rdi,%rdx,4), %edx
	movl	%edx, (%r11,%rax,4)
	movslq	(%r12,%rax,4), %rdx
	movl	%eax, (%rdi,%rdx,4)
	movl	(%r15,%rax,4), %edx
	movl	%edx, (%rsi,%rax,4)
	movslq	(%r14,%rax,4), %rdx
	movl	$0, (%rbx,%rax,4)
	addq	$1, %rax
	movl	%ecx, (%rdi,%rdx,4)
	cmpq	%rbp, %rax
	jne	.L23
	movl	8(%rsp), %ebx
	movl	12(%rsp), %ebp
.L22:
	movl	4(%rsp), %eax
	xorl	%r12d, %r12d
	subl	$1, %eax
	leaq	4(,%rax,4), %r15
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L32:
	movl	$1000000000, %ecx
	movl	%r13d, %edx
	movl	%ebp, %esi
	movl	%ebx, %edi
	call	MF.part.0
	movl	%eax, %r14d
	testl	%eax, %eax
	je	.L31
.L27:
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L26
	movq	%r15, %rdx
	xorl	%esi, %esi
	leaq	F(%rip), %rdi
	call	memset@PLT
.L26:
	addl	%r14d, %r12d
.L24:
	cmpl	%ebp, %ebx
	jne	.L32
	movl	$1000000000, %r14d
	jmp	.L27
.L31:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	movl	%r12d, %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
	.cfi_endproc
.LFE25:
	.size	maxf, .-maxf
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-32768(%rsp), %r11
	.cfi_def_cfa 11, 32824
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3416, %rsp
	.cfi_def_cfa_offset 36240
	leaq	.LC0(%rip), %rbp
	movq	%rbp, %rdi
	movq	%fs:40, %rax
	movq	%rax, 36168(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %esi
	cmpl	$1, %esi
	jle	.L41
	movl	$1, %ebx
	xorl	%r13d, %r13d
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L38:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %ecx
	testl	%ecx, %ecx
	jne	.L35
	movl	24(%rsp), %esi
	addl	$1, %ebx
	cmpl	%esi, %ebx
	jl	.L38
.L37:
	cmpl	$1, %esi
	jle	.L42
	leaq	24128(%rsp), %rax
	movslq	%r13d, %r15
	movl	%r13d, %r14d
	movq	%rax, 8(%rsp)
	salq	$2, %r15
	leaq	12080(%rsp), %rbp
	leaq	32(%rsp), %rbx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L39:
	movq	8(%rsp), %rax
	leaq	(%rbx,%r15), %rsi
	leaq	0(%rbp,%r15), %rdx
	movq	%r12, %rdi
	leaq	(%rax,%r15), %rcx
	xorl	%eax, %eax
	addq	$4, %r15
	call	__isoc99_scanf@PLT
	movl	%r14d, %eax
	movl	24(%rsp), %esi
	addl	$1, %r14d
	addl	$2, %eax
	subl	%r13d, %eax
	cmpl	%eax, %esi
	jg	.L39
.L34:
	subq	$8, %rsp
	.cfi_def_cfa_offset 36248
	leal	1(%rsi), %edx
	movq	%rbp, %r9
	movq	%rbx, %r8
	pushq	16(%rsp)
	.cfi_def_cfa_offset 36256
	movl	%r14d, %ecx
	xorl	%edi, %edi
	call	maxf
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rax
	.cfi_def_cfa_offset 36248
	popq	%rdx
	.cfi_def_cfa_offset 36240
	movq	36168(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$36184, %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
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore_state
	movslq	%r13d, %rax
	movl	24(%rsp), %esi
	addl	$1, %r13d
	movl	%ebx, 32(%rsp,%rax,4)
	addl	$1, %ebx
	movl	%esi, 12080(%rsp,%rax,4)
	movl	$1000000000, 24128(%rsp,%rax,4)
	cmpl	%ebx, %esi
	jg	.L38
	jmp	.L37
.L41:
	leaq	24128(%rsp), %rax
	xorl	%r14d, %r14d
	leaq	32(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	12080(%rsp), %rbp
	jmp	.L34
.L42:
	leaq	24128(%rsp), %rax
	movl	%r13d, %r14d
	leaq	32(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	12080(%rsp), %rbp
	jmp	.L34
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	F
	.bss
	.align 32
	.type	F, @object
	.size	F, 4040
F:
	.zero	4040
	.globl	co
	.align 32
	.type	co, @object
	.size	co, 4000040
co:
	.zero	4000040
	.globl	nt
	.align 32
	.type	nt, @object
	.size	nt, 4000040
nt:
	.zero	4000040
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 4000040
to:
	.zero	4000040
	.globl	ta
	.align 32
	.type	ta, @object
	.size	ta, 4040
ta:
	.zero	4040
	.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
	.type	MF.part.0, @function
MF.part.0:
.LFB27:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%edi, %rdi
	leaq	ta(%rip), %rax
	leaq	F(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	(%rax,%rdi,4), %ebx
	movl	$1, (%r15,%rdi,4)
	cmpl	$-1, %ebx
	je	.L6
	movl	%edx, %r14d
	movl	%ecx, %r13d
	leal	(%rdx,%rdx), %r9d
	leaq	to(%rip), %r8
	leaq	co(%rip), %r12
	leaq	nt(%rip), %r10
	.p2align 4,,10
	.p2align 3
.L5:
	movslq	%ebx, %rbp
	movslq	(%r8,%rbp,4), %rax
	movq	%rax, %rdi
	movl	(%r15,%rax,4), %eax
	testl	%eax, %eax
	jne	.L8
	movl	(%r12,%rbp,4), %eax
	movl	%r13d, %ecx
	cmpl	%r13d, %eax
	cmovle	%eax, %ecx
	cmpl	%esi, %edi
	je	.L7
	testl	%ecx, %ecx
	je	.L7
	movl	%r14d, %edx
	movl	%r9d, 12(%rsp)
	movl	%esi, 8(%rsp)
	call	MF.part.0
	movl	12(%rsp), %r9d
	movl	8(%rsp), %esi
	leaq	nt(%rip), %r10
	movl	%eax, %ecx
	movl	(%r12,%rbp,4), %eax
	leaq	to(%rip), %r8
.L7:
	subl	%ecx, %eax
	movl	%eax, (%r12,%rbp,4)
	leal	(%r14,%rbx), %eax
	cltd
	idivl	%r9d
	movslq	%edx, %rdx
	addl	%ecx, (%r12,%rdx,4)
	testl	%ecx, %ecx
	jne	.L1
.L8:
	movl	(%r10,%rbp,4), %ebx
	cmpl	$-1, %ebx
	jne	.L5
.L6:
	xorl	%ecx, %ecx
.L1:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	movl	%ecx, %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
	.cfi_endproc
.LFE27:
	.size	MF.part.0, .-MF.part.0
	.p2align 4
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	MIN, .-MIN
	.p2align 4
	.globl	MF
	.type	MF, @function
MF:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	je	.L19
	testl	%ecx, %ecx
	je	.L19
	jmp	MF.part.0
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%ecx, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	MF, .-MF
	.p2align 4
	.globl	maxf
	.type	maxf, @function
maxf:
.LFB25:
	.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
	movq	%r9, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%ecx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r8, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%edi, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edx, 4(%rsp)
	movq	80(%rsp), %r15
	testl	%edx, %edx
	jle	.L21
	movslq	%edx, %rdx
	movl	$255, %esi
	leaq	ta(%rip), %rdi
	salq	$2, %rdx
	call	memset@PLT
.L21:
	testl	%r13d, %r13d
	jle	.L22
	movslq	%r13d, %rcx
	leaq	co(%rip), %rsi
	movl	%ebx, 8(%rsp)
	leaq	to(%rip), %r9
	leaq	0(,%rcx,4), %rax
	leaq	nt(%rip), %r8
	movl	%ebp, 12(%rsp)
	movq	%rcx, %rbp
	leaq	(%rsi,%rax), %rdx
	leaq	(%r9,%rax), %r10
	leaq	(%r8,%rax), %r11
	leaq	ta(%rip), %rdi
	xorl	%eax, %eax
	movq	%rdx, %rbx
	.p2align 4,,10
	.p2align 3
.L23:
	movslq	(%r12,%rax,4), %rdx
	leal	0(%r13,%rax), %ecx
	movl	%edx, (%r10,%rax,4)
	movl	(%rdi,%rdx,4), %edx
	movl	%edx, (%r8,%rax,4)
	movslq	(%r14,%rax,4), %rdx
	movl	%edx, (%r9,%rax,4)
	movl	(%rdi,%rdx,4), %edx
	movl	%edx, (%r11,%rax,4)
	movslq	(%r12,%rax,4), %rdx
	movl	%eax, (%rdi,%rdx,4)
	movl	(%r15,%rax,4), %edx
	movl	%edx, (%rsi,%rax,4)
	movslq	(%r14,%rax,4), %rdx
	movl	$0, (%rbx,%rax,4)
	addq	$1, %rax
	movl	%ecx, (%rdi,%rdx,4)
	cmpq	%rbp, %rax
	jne	.L23
	movl	8(%rsp), %ebx
	movl	12(%rsp), %ebp
.L22:
	movl	4(%rsp), %eax
	xorl	%r12d, %r12d
	subl	$1, %eax
	leaq	4(,%rax,4), %r15
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L32:
	movl	$1000000000, %ecx
	movl	%r13d, %edx
	movl	%ebp, %esi
	movl	%ebx, %edi
	call	MF.part.0
	movl	%eax, %r14d
	testl	%eax, %eax
	je	.L31
.L27:
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L26
	movq	%r15, %rdx
	xorl	%esi, %esi
	leaq	F(%rip), %rdi
	call	memset@PLT
.L26:
	addl	%r14d, %r12d
.L24:
	cmpl	%ebp, %ebx
	jne	.L32
	movl	$1000000000, %r14d
	jmp	.L27
.L31:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	movl	%r12d, %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
	.cfi_endproc
.LFE25:
	.size	maxf, .-maxf
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-32768(%rsp), %r11
	.cfi_def_cfa 11, 32824
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3416, %rsp
	.cfi_def_cfa_offset 36240
	leaq	.LC0(%rip), %rbp
	movq	%rbp, %rdi
	movq	%fs:40, %rax
	movq	%rax, 36168(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %esi
	cmpl	$1, %esi
	jle	.L41
	movl	$1, %ebx
	xorl	%r13d, %r13d
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L38:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %ecx
	testl	%ecx, %ecx
	jne	.L35
	movl	24(%rsp), %esi
	addl	$1, %ebx
	cmpl	%esi, %ebx
	jl	.L38
.L37:
	cmpl	$1, %esi
	jle	.L42
	leaq	24128(%rsp), %rax
	movslq	%r13d, %r15
	movl	%r13d, %r14d
	movq	%rax, 8(%rsp)
	salq	$2, %r15
	leaq	12080(%rsp), %rbp
	leaq	32(%rsp), %rbx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L39:
	movq	8(%rsp), %rax
	leaq	(%rbx,%r15), %rsi
	leaq	0(%rbp,%r15), %rdx
	movq	%r12, %rdi
	leaq	(%rax,%r15), %rcx
	xorl	%eax, %eax
	addq	$4, %r15
	call	__isoc99_scanf@PLT
	movl	%r14d, %eax
	movl	24(%rsp), %esi
	addl	$1, %r14d
	addl	$2, %eax
	subl	%r13d, %eax
	cmpl	%eax, %esi
	jg	.L39
.L34:
	subq	$8, %rsp
	.cfi_def_cfa_offset 36248
	leal	1(%rsi), %edx
	movq	%rbp, %r9
	movq	%rbx, %r8
	pushq	16(%rsp)
	.cfi_def_cfa_offset 36256
	movl	%r14d, %ecx
	xorl	%edi, %edi
	call	maxf
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rax
	.cfi_def_cfa_offset 36248
	popq	%rdx
	.cfi_def_cfa_offset 36240
	movq	36168(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$36184, %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
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore_state
	movslq	%r13d, %rax
	movl	24(%rsp), %esi
	addl	$1, %r13d
	movl	%ebx, 32(%rsp,%rax,4)
	addl	$1, %ebx
	movl	%esi, 12080(%rsp,%rax,4)
	movl	$1000000000, 24128(%rsp,%rax,4)
	cmpl	%ebx, %esi
	jg	.L38
	jmp	.L37
.L41:
	leaq	24128(%rsp), %rax
	xorl	%r14d, %r14d
	leaq	32(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	12080(%rsp), %rbp
	jmp	.L34
.L42:
	leaq	24128(%rsp), %rax
	movl	%r13d, %r14d
	leaq	32(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	12080(%rsp), %rbp
	jmp	.L34
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	F
	.bss
	.align 32
	.type	F, @object
	.size	F, 4040
F:
	.zero	4040
	.globl	co
	.align 32
	.type	co, @object
	.size	co, 4000040
co:
	.zero	4000040
	.globl	nt
	.align 32
	.type	nt, @object
	.size	nt, 4000040
nt:
	.zero	4000040
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 4000040
to:
	.zero	4000040
	.globl	ta
	.align 32
	.type	ta, @object
	.size	ta, 4040
ta:
	.zero	4040
	.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>
int MIN(int a,int b){return a<b?a:b;}
int ta[1010],to[1000010],nt[1000010],co[1000010],F[1010];
int MF(int s,int t,int e,int min){
  if(s==t||min==0)return min;
  int i,r;
  F[s]=1;
  for(i=ta[s];i+1;i=nt[i]){
    if(F[to[i]])continue;
    r=MF(to[i],t,e,MIN(min,co[i]));
    co[i]-=r;
    co[(i+e)%(2*e)]+=r;
    if(r)return r;
  }
  return 0;
}
//???????????????
//s??????t???????????§???????±?????????????????????°v????????°e???a??????b????????£???c????????????????????????
int maxf(int s,int t,int v,int e,int *a,int *b,int *c){
  int i,f,r;
  for(i=0;i<v;i++)ta[i]=-1;
  for(i=0;i<e;i++){
    nt[i  ]=ta[to[i+e]=a[i]];
    nt[i+e]=ta[to[i  ]=b[i]];
    co[ta[a[i]]=i  ]=c[i];
    co[ta[b[i]]=i+e]=0;
  }
  for(f=0;r=MF(s,t,e,1000000000);f+=r){
    for(i=0;i<v;i++)F[i]=0;
  }
  return f;
}int main(){
  int n,a[3010],b[3010],c[3010],m,r=0,i;
  scanf("%d",&n);
  for(i=1;i<n;i++){
    scanf("%d",&m);
    if(m){
      a[r  ]=i;
      b[r  ]=n;
      c[r++]=1e9;
    }
  }
  for(i=1;i<n;i++){
    scanf("%d %d %d",&a[r],&b[r],&c[r]);
    r++;
  }
  printf("%d\n",maxf(0,n,n+1,r,a,b,c));
  return 0;
}
    
5
2 2 2 2
0 1 4
1 2 1
1 3 1
1 4 1

4

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>
int MIN(int a,int b){return a<b?a:b;}
int ta[1010],to[1000010],nt[1000010],co[1000010],F[1010];
int MF(int s,int t,int e,int min){
  if(s==t||min==0)return min;
  int i,r;
  F[s]=1;
  for(i=ta[s];i+1;i=nt[i]){
    if(F[to[i]])continue;
    r=MF(to[i],t,e,MIN(min,co[i]));
    co[i]-=r;
    co[(i+e)%(2*e)]+=r;
    if(r)return r;
  }
  return 0;
}
//???????????????
//s??????t???????????§???????±?????????????????????°v????????°e???a??????b????????£???c????????????????????????
int maxf(int s,int t,int v,int e,int *a,int *b,int *c){
  int i,f,r;
  for(i=0;i<v;i++)ta[i]=-1;
  for(i=0;i<e;i++){
    nt[i  ]=ta[to[i+e]=a[i]];
    nt[i+e]=ta[to[i  ]=b[i]];
    co[ta[a[i]]=i  ]=c[i];
    co[ta[b[i]]=i+e]=0;
  }
  for(f=0;r=MF(s,t,e,1000000000);f+=r){
    for(i=0;i<v;i++)F[i]=0;
  }
  return f;
}int main(){
  int n,a[3010],b[3010],c[3010],m,r=0,i;
  scanf("%d",&n);
  for(i=1;i<n;i++){
    scanf("%d",&m);
    if(m){
      a[r  ]=i;
      b[r  ]=n;
      c[r++]=1e9;
    }
  }
  for(i=1;i<n;i++){
    scanf("%d %d %d",&a[r],&b[r],&c[r]);
    r++;
  }
  printf("%d\n",maxf(0,n,n+1,r,a,b,c));
  return 0;
}
    ```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	MIN, .-MIN
	.globl	ta
	.bss
	.align 32
	.type	ta, @object
	.size	ta, 4040
ta:
	.zero	4040
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 4000040
to:
	.zero	4000040
	.globl	nt
	.align 32
	.type	nt, @object
	.size	nt, 4000040
nt:
	.zero	4000040
	.globl	co
	.align 32
	.type	co, @object
	.size	co, 4000040
co:
	.zero	4000040
	.globl	F
	.align 32
	.type	F, @object
	.size	F, 4040
F:
	.zero	4040
	.text
	.globl	MF
	.type	MF, @function
MF:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	je	.L4
	cmpl	$0, -32(%rbp)
	jne	.L5
.L4:
	movl	-32(%rbp), %eax
	jmp	.L6
.L5:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	jmp	.L7
.L10:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L11
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	co(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-32(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	%eax, %edi
	call	MF
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	co(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	-4(%rbp), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	co(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	movl	-28(%rbp), %edx
	leal	(%rdx,%rdx), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	co(%rip), %rdx
	movl	(%rcx,%rdx), %ecx
	movl	-4(%rbp), %edx
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	co(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	cmpl	$0, -4(%rbp)
	je	.L9
	movl	-4(%rbp), %eax
	jmp	.L6
.L11:
	nop
.L9:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nt(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
.L7:
	cmpl	$-1, -8(%rbp)
	jne	.L10
	movl	$0, %eax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	MF, .-MF
	.globl	maxf
	.type	maxf, @function
maxf:
.LFB2:
	.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)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movq	%r8, -40(%rbp)
	movq	%r9, -48(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L13
.L14:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L13:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L14
	movl	$0, -12(%rbp)
	jmp	.L15
.L16:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %ecx
	movl	-32(%rbp), %eax
	addl	%ecx, %eax
	movl	(%rdx), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	to(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	to(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %ecx
	movl	-32(%rbp), %edx
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	16(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rdi
	leaq	ta(%rip), %rsi
	movl	-12(%rbp), %edx
	movl	%edx, (%rdi,%rsi)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	(%rcx), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	co(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-12(%rbp), %ecx
	movl	-32(%rbp), %edx
	leal	(%rcx,%rdx), %esi
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	ta(%rip), %rdx
	movl	%esi, (%rcx,%rdx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	co(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L15:
	movl	-12(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jl	.L16
	movl	$0, -8(%rbp)
	jmp	.L17
.L20:
	movl	$0, -12(%rbp)
	jmp	.L18
.L19:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L18:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L19
	movl	-4(%rbp), %eax
	addl	%eax, -8(%rbp)
.L17:
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$1000000000, %ecx
	movl	%eax, %edi
	call	MF
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	jne	.L20
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	maxf, .-maxf
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-32768(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3392, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -36152(%rbp)
	leaq	-36160(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -36148(%rbp)
	jmp	.L23
.L25:
	leaq	-36156(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-36156(%rbp), %eax
	testl	%eax, %eax
	je	.L24
	movl	-36152(%rbp), %eax
	cltq
	movl	-36148(%rbp), %edx
	movl	%edx, -36144(%rbp,%rax,4)
	movl	-36160(%rbp), %edx
	movl	-36152(%rbp), %eax
	cltq
	movl	%edx, -24096(%rbp,%rax,4)
	movl	-36152(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -36152(%rbp)
	cltq
	movl	$1000000000, -12048(%rbp,%rax,4)
.L24:
	addl	$1, -36148(%rbp)
.L23:
	movl	-36160(%rbp), %eax
	cmpl	%eax, -36148(%rbp)
	jl	.L25
	movl	$1, -36148(%rbp)
	jmp	.L26
.L27:
	leaq	-12048(%rbp), %rdx
	movl	-36152(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-24096(%rbp), %rdx
	movl	-36152(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-36144(%rbp), %rsi
	movl	-36152(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -36152(%rbp)
	addl	$1, -36148(%rbp)
.L26:
	movl	-36160(%rbp), %eax
	cmpl	%eax, -36148(%rbp)
	jl	.L27
	movl	-36160(%rbp), %eax
	leal	1(%rax), %esi
	movl	-36160(%rbp), %eax
	leaq	-24096(%rbp), %r8
	leaq	-36144(%rbp), %rdi
	movl	-36152(%rbp), %edx
	subq	$8, %rsp
	leaq	-12048(%rbp), %rcx
	pushq	%rcx
	movq	%r8, %r9
	movq	%rdi, %r8
	movl	%edx, %ecx
	movl	%esi, %edx
	movl	%eax, %esi
	movl	$0, %edi
	call	maxf
	addq	$16, %rsp
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	MIN
	.type	MIN, @function
MIN:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	MIN, .-MIN
	.globl	ta
	.bss
	.align 32
	.type	ta, @object
	.size	ta, 4040
ta:
	.zero	4040
	.globl	to
	.align 32
	.type	to, @object
	.size	to, 4000040
to:
	.zero	4000040
	.globl	nt
	.align 32
	.type	nt, @object
	.size	nt, 4000040
nt:
	.zero	4000040
	.globl	co
	.align 32
	.type	co, @object
	.size	co, 4000040
co:
	.zero	4000040
	.globl	F
	.align 32
	.type	F, @object
	.size	F, 4040
F:
	.zero	4040
	.text
	.globl	MF
	.type	MF, @function
MF:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	je	.L4
	cmpl	$0, -32(%rbp)
	jne	.L5
.L4:
	movl	-32(%rbp), %eax
	jmp	.L6
.L5:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	jmp	.L7
.L10:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L11
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	co(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-32(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	%eax, %edi
	call	MF
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	co(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	-4(%rbp), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	co(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	movl	-28(%rbp), %edx
	leal	(%rdx,%rdx), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	co(%rip), %rdx
	movl	(%rcx,%rdx), %ecx
	movl	-4(%rbp), %edx
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	co(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	cmpl	$0, -4(%rbp)
	je	.L9
	movl	-4(%rbp), %eax
	jmp	.L6
.L11:
	nop
.L9:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	nt(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
.L7:
	cmpl	$-1, -8(%rbp)
	jne	.L10
	movl	$0, %eax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	MF, .-MF
	.globl	maxf
	.type	maxf, @function
maxf:
.LFB2:
	.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)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movq	%r8, -40(%rbp)
	movq	%r9, -48(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L13
.L14:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L13:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L14
	movl	$0, -12(%rbp)
	jmp	.L15
.L16:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %ecx
	movl	-32(%rbp), %eax
	addl	%ecx, %eax
	movl	(%rdx), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	to(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	to(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	to(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %ecx
	movl	-32(%rbp), %edx
	addl	%edx, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	nt(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	16(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rdi
	leaq	ta(%rip), %rsi
	movl	-12(%rbp), %edx
	movl	%edx, (%rdi,%rsi)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	(%rcx), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	co(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-12(%rbp), %ecx
	movl	-32(%rbp), %edx
	leal	(%rcx,%rdx), %esi
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	ta(%rip), %rdx
	movl	%esi, (%rcx,%rdx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ta(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	co(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L15:
	movl	-12(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jl	.L16
	movl	$0, -8(%rbp)
	jmp	.L17
.L20:
	movl	$0, -12(%rbp)
	jmp	.L18
.L19:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	F(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L18:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L19
	movl	-4(%rbp), %eax
	addl	%eax, -8(%rbp)
.L17:
	movl	-32(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %eax
	movl	$1000000000, %ecx
	movl	%eax, %edi
	call	MF
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	jne	.L20
	movl	-8(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	maxf, .-maxf
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-32768(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3392, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -36152(%rbp)
	leaq	-36160(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -36148(%rbp)
	jmp	.L23
.L25:
	leaq	-36156(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-36156(%rbp), %eax
	testl	%eax, %eax
	je	.L24
	movl	-36152(%rbp), %eax
	cltq
	movl	-36148(%rbp), %edx
	movl	%edx, -36144(%rbp,%rax,4)
	movl	-36160(%rbp), %edx
	movl	-36152(%rbp), %eax
	cltq
	movl	%edx, -24096(%rbp,%rax,4)
	movl	-36152(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -36152(%rbp)
	cltq
	movl	$1000000000, -12048(%rbp,%rax,4)
.L24:
	addl	$1, -36148(%rbp)
.L23:
	movl	-36160(%rbp), %eax
	cmpl	%eax, -36148(%rbp)
	jl	.L25
	movl	$1, -36148(%rbp)
	jmp	.L26
.L27:
	leaq	-12048(%rbp), %rdx
	movl	-36152(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-24096(%rbp), %rdx
	movl	-36152(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-36144(%rbp), %rsi
	movl	-36152(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -36152(%rbp)
	addl	$1, -36148(%rbp)
.L26:
	movl	-36160(%rbp), %eax
	cmpl	%eax, -36148(%rbp)
	jl	.L27
	movl	-36160(%rbp), %eax
	leal	1(%rax), %esi
	movl	-36160(%rbp), %eax
	leaq	-24096(%rbp), %r8
	leaq	-36144(%rbp), %rdi
	movl	-36152(%rbp), %edx
	subq	$8, %rsp
	leaq	-12048(%rbp), %rcx
	pushq	%rcx
	movq	%r8, %r9
	movq	%rdi, %r8
	movl	%edx, %ecx
	movl	%esi, %edx
	movl	%eax, %esi
	movl	$0, %edi
	call	maxf
	addq	$16, %rsp
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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:
