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

```c
#include<stdio.h>
#include<stdlib.h>
#include<limits.h>
#define MIN(a,b) ((a) < (b) ? (a) : (b))
struct node {
  int id;
  int cap;
  struct node *next;
};
struct node **list;
int **flow, *iter, *dist, *prev, *queue;
void Insert(int, int, int);
void Init_bfs(int, int);
int Maxflow_dfs(int, int, int, int);
int main(void)
{
  int i, v, e, s, t, c, maxflow = 0;
  scanf("%d %d", &v, &e);
  list = (struct node**)malloc(sizeof(struct node*) * v);
  flow = (int**)malloc(sizeof(int*) * v);
  iter = (int*)malloc(sizeof(int) * v);
  dist = (int*)malloc(sizeof(int) * v);
  prev = (int*)malloc(sizeof(int) * v);
  queue = (int*)malloc(sizeof(int) * v);
  for (i = 0; i < v; i++) {
    list[i] = NULL;
    flow[i] = (int*)calloc(v, sizeof(int));
  }
  for (i = 0; i < e; i++) {
    scanf("%d %d %d", &s, &t, &c);
    Insert(s, t, c);
  }
  while (1) {
    Init_bfs(0, v);
    if (dist[v-1] < 0) break;
    for (i = 0; i < v; i++) iter[i] = 0;
    while (1) {
      int f = Maxflow_dfs(0, v - 1, v, INT_MAX);
      if (!f) break;
      maxflow += f;
    }
  }
  printf("%d\n", maxflow);
  for (i = 0; i < v; i++) {
    free(list[i]);
    free(flow[i]);
  }
  free(list);
  free(flow);
  free(iter);
  free(dist);
  free(prev);
  free(queue);
}
void Insert(int a, int b, int c)
{
  struct node *p = (struct node*)malloc(sizeof(struct node));
  p->id = b;
  p->cap = c;
  p->next = list[a];
  list[a] = p;
  p = (struct node*)malloc(sizeof(struct node));
  p->id = a;
  p->cap = 0;
  p->next = list[b];
  list[b] = p;
}
void Init_bfs(int s, int size)
{
  struct node *n;
  int i, head = 0, tail = 0;
  for (i = 0; i < size; i++) dist[i] = -1;
  dist[s] = 0;
  queue[tail++] = s;
  while (head != tail) {
    i = queue[head++];
    for (n = list[i]; n != NULL; n = n->next) {
      int v = n->id;
      if (dist[v] < 0 && flow[i][v] < n->cap) {
        dist[v] = dist[i] + 1;
        queue[tail++] = v;
      }
    }
  }
}
int Maxflow_dfs(int s, int t, int size, int f)
{
  struct node *n = list[s];
  if (s == t) return f;
  while (n != NULL && iter[s]) {
    n = n->next;
    iter[s]--;
  }
  for (; n != NULL; n = n->next) {
    int v = n->id;
    iter[s] = v;
    if (dist[s] < dist[v] && flow[s][v] < n->cap) {
      int d = Maxflow_dfs(v, size - 1, size, MIN(f, n->cap - flow[s][v]));
      if (d > 0) {
        flow[s][v] += d;
        flow[v][s] -= d;
        return d;
      }
    }
  }
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	list
	.bss
	.align 8
	.type	list, @object
	.size	list, 8
list:
	.zero	8
	.globl	flow
	.align 8
	.type	flow, @object
	.size	flow, 8
flow:
	.zero	8
	.globl	iter
	.align 8
	.type	iter, @object
	.size	iter, 8
iter:
	.zero	8
	.globl	dist
	.align 8
	.type	dist, @object
	.size	dist, 8
dist:
	.zero	8
	.globl	prev
	.align 8
	.type	prev, @object
	.size	prev, 8
prev:
	.zero	8
	.globl	queue
	.align 8
	.type	queue, @object
	.size	queue, 8
queue:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$0, -32(%rbp)
	leaq	-52(%rbp), %rdx
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-56(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, list(%rip)
	movl	-56(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, flow(%rip)
	movl	-56(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, iter(%rip)
	movl	-56(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, dist(%rip)
	movl	-56(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, prev(%rip)
	movl	-56(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, queue(%rip)
	movl	$0, -36(%rbp)
	jmp	.L2
.L3:
	movq	list(%rip), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	$0, (%rax)
	movl	-56(%rbp), %eax
	cltq
	movq	flow(%rip), %rcx
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	leaq	(%rcx,%rdx), %rbx
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, (%rbx)
	addl	$1, -36(%rbp)
.L2:
	movl	-56(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L3
	movl	$0, -36(%rbp)
	jmp	.L4
.L5:
	leaq	-40(%rbp), %rcx
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %edx
	movl	-44(%rbp), %ecx
	movl	-48(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	Insert
	addl	$1, -36(%rbp)
.L4:
	movl	-52(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L5
.L13:
	movl	-56(%rbp), %eax
	movl	%eax, %esi
	movl	$0, %edi
	call	Init_bfs
	movq	dist(%rip), %rdx
	movl	-56(%rbp), %eax
	cltq
	salq	$2, %rax
	subq	$4, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	js	.L20
	movl	$0, -36(%rbp)
	jmp	.L8
.L9:
	movq	iter(%rip), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	addl	$1, -36(%rbp)
.L8:
	movl	-56(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L9
.L12:
	movl	-56(%rbp), %eax
	movl	-56(%rbp), %edx
	leal	-1(%rdx), %esi
	movl	$2147483647, %ecx
	movl	%eax, %edx
	movl	$0, %edi
	call	Maxflow_dfs
	movl	%eax, -28(%rbp)
	cmpl	$0, -28(%rbp)
	je	.L21
	movl	-28(%rbp), %eax
	addl	%eax, -32(%rbp)
	jmp	.L12
.L21:
	nop
	jmp	.L13
.L20:
	nop
	movl	-32(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -36(%rbp)
	jmp	.L14
.L15:
	movq	list(%rip), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	flow(%rip), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	free@PLT
	addl	$1, -36(%rbp)
.L14:
	movl	-56(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L15
	movq	list(%rip), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	flow(%rip), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	iter(%rip), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	dist(%rip), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	prev(%rip), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	queue(%rip), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	Insert
	.type	Insert, @function
Insert:
.LFB7:
	.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	$16, %edi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	-24(%rbp), %edx
	movl	%edx, (%rax)
	movq	-8(%rbp), %rax
	movl	-28(%rbp), %edx
	movl	%edx, 4(%rax)
	movq	list(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	list(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	movl	$16, %edi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	-20(%rbp), %edx
	movl	%edx, (%rax)
	movq	-8(%rbp), %rax
	movl	$0, 4(%rax)
	movq	list(%rip), %rdx
	movl	-24(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	list(%rip), %rdx
	movl	-24(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Insert, .-Insert
	.globl	Init_bfs
	.type	Init_bfs, @function
Init_bfs:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -36(%rbp)
	movl	%esi, -40(%rbp)
	movl	$0, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -24(%rbp)
	jmp	.L24
.L25:
	movq	dist(%rip), %rdx
	movl	-24(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	$-1, (%rax)
	addl	$1, -24(%rbp)
.L24:
	movl	-24(%rbp), %eax
	cmpl	-40(%rbp), %eax
	jl	.L25
	movq	dist(%rip), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	movq	queue(%rip), %rcx
	movl	-16(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -16(%rbp)
	cltq
	salq	$2, %rax
	leaq	(%rcx,%rax), %rdx
	movl	-36(%rbp), %eax
	movl	%eax, (%rdx)
	jmp	.L26
.L30:
	movq	queue(%rip), %rcx
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -20(%rbp)
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movq	list(%rip), %rdx
	movl	-24(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	jmp	.L27
.L29:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
	movq	dist(%rip), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jns	.L28
	movq	flow(%rip), %rdx
	movl	-24(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L28
	movq	dist(%rip), %rdx
	movl	-24(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movq	dist(%rip), %rcx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	addl	$1, %edx
	movl	%edx, (%rax)
	movq	queue(%rip), %rcx
	movl	-16(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -16(%rbp)
	cltq
	salq	$2, %rax
	leaq	(%rcx,%rax), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rdx)
.L28:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -8(%rbp)
.L27:
	cmpq	$0, -8(%rbp)
	jne	.L29
.L26:
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jne	.L30
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Init_bfs, .-Init_bfs
	.globl	Maxflow_dfs
	.type	Maxflow_dfs, @function
Maxflow_dfs:
.LFB9:
	.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)
	movq	list(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jne	.L34
	movl	-32(%rbp), %eax
	jmp	.L33
.L36:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	iter(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	subl	$1, %edx
	movl	%edx, (%rax)
.L34:
	cmpq	$0, -8(%rbp)
	je	.L37
	movq	iter(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jne	.L36
	jmp	.L37
.L39:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -16(%rbp)
	movq	iter(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rdx)
	movq	dist(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movq	dist(%rip), %rcx
	movl	-16(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L38
	movq	flow(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-16(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L38
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	movq	flow(%rip), %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	addq	%rcx, %rdx
	movq	(%rdx), %rcx
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, %ecx
	movl	-28(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	Maxflow_dfs
	movl	%eax, -12(%rbp)
	cmpl	$0, -12(%rbp)
	jle	.L38
	movq	flow(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-16(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movq	flow(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-16(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-12(%rbp), %edx
	addl	%ecx, %edx
	movl	%edx, (%rax)
	movq	flow(%rip), %rdx
	movl	-16(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movq	flow(%rip), %rcx
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	addq	%rcx, %rdx
	movq	(%rdx), %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	subl	-12(%rbp), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	jmp	.L33
.L38:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -8(%rbp)
.L37:
	cmpq	$0, -8(%rbp)
	jne	.L39
	movl	$0, %eax
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	Maxflow_dfs, .-Maxflow_dfs
	.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	Insert
	.type	Insert, @function
Insert:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	%edx, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movl	%edi, %ebp
	movl	$16, %edi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movslq	%esi, %rbx
	call	malloc@PLT
	movd	%r12d, %xmm1
	movslq	%ebp, %rdx
	movq	list(%rip), %r12
	movd	%ebx, %xmm0
	movl	$16, %edi
	leaq	(%r12,%rdx,8), %rdx
	punpckldq	%xmm1, %xmm0
	movq	(%rdx), %rcx
	movq	%xmm0, (%rax)
	movq	%rcx, 8(%rax)
	movq	%rax, (%rdx)
	call	malloc@PLT
	leaq	(%r12,%rbx,8), %rdx
	movq	(%rdx), %rcx
	movl	%ebp, (%rax)
	movl	$0, 4(%rax)
	movq	%rcx, 8(%rax)
	movq	%rax, (%rdx)
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.size	Insert, .-Insert
	.p2align 4
	.globl	Init_bfs
	.type	Init_bfs, @function
Init_bfs:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movl	%edi, %ebp
	movq	dist(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	testl	%esi, %esi
	jle	.L7
	movslq	%esi, %rdx
	movl	$255, %esi
	salq	$2, %rdx
	call	memset@PLT
	movq	%rax, %rdi
.L7:
	movq	queue(%rip), %rbx
	movslq	%ebp, %rax
	movq	flow(%rip), %r12
	xorl	%r11d, %r11d
	movl	$0, (%rdi,%rax,4)
	movl	$1, %r9d
	movl	%ebp, (%rbx)
	movq	list(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L6:
	movslq	(%rbx,%r11,4), %rdx
	movq	0(%rbp,%rdx,8), %rax
	leaq	0(,%rdx,8), %r10
	testq	%rax, %rax
	je	.L8
	addq	%r12, %r10
	leaq	(%rdi,%rdx,4), %r13
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	.L8
.L10:
	movslq	(%rax), %rdx
	leaq	(%rdi,%rdx,4), %rsi
	movq	%rdx, %rcx
	movl	(%rsi), %r8d
	testl	%r8d, %r8d
	jns	.L9
	movq	(%r10), %r8
	movl	4(%rax), %r14d
	cmpl	%r14d, (%r8,%rdx,4)
	jge	.L9
	movl	0(%r13), %edx
	movq	8(%rax), %rax
	addl	$1, %edx
	movl	%edx, (%rsi)
	movslq	%r9d, %rdx
	addl	$1, %r9d
	movl	%ecx, (%rbx,%rdx,4)
	testq	%rax, %rax
	jne	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$1, %r11
	cmpl	%r11d, %r9d
	jne	.L6
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE41:
	.size	Init_bfs, .-Init_bfs
	.p2align 4
	.globl	Maxflow_dfs
	.type	Maxflow_dfs, @function
Maxflow_dfs:
.LFB42:
	.cfi_startproc
	endbr64
	movl	%ecx, %r8d
	movslq	%edi, %r10
	movq	list(%rip), %rcx
	leaq	0(,%r10,8), %r11
	movl	%r8d, %eax
	addq	%r11, %rcx
	cmpl	%esi, %edi
	je	.L31
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	(%rcx), %rbx
	testq	%rbx, %rbx
	je	.L21
	movq	iter(%rip), %r13
	salq	$2, %r10
	addq	%r10, %r13
	movl	0(%r13), %eax
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L22:
	movq	8(%rbx), %rbx
	subl	$1, %eax
	movl	%eax, 0(%r13)
	testq	%rbx, %rbx
	je	.L21
.L20:
	testl	%eax, %eax
	jne	.L22
	movq	dist(%rip), %r14
	movq	%r10, 40(%rsp)
	leal	-1(%rdx), %esi
	leaq	(%r14,%r10), %r15
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L23:
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	je	.L21
.L24:
	movslq	(%rbx), %rbp
	movl	%ebp, 0(%r13)
	movq	%rbp, %rdi
	movl	(%r14,%rbp,4), %eax
	leaq	0(,%rbp,4), %r12
	cmpl	%eax, (%r15)
	jge	.L23
	movq	flow(%rip), %r9
	movl	4(%rbx), %ecx
	addq	(%r9,%r11), %r12
	movl	(%r12), %eax
	cmpl	%ecx, %eax
	jge	.L23
	subl	%eax, %ecx
	movq	%r9, 32(%rsp)
	cmpl	%r8d, %ecx
	movq	%r11, 24(%rsp)
	cmovg	%r8d, %ecx
	movl	%r8d, 20(%rsp)
	movl	%edx, 16(%rsp)
	movl	%esi, 12(%rsp)
	call	Maxflow_dfs
	movl	12(%rsp), %esi
	movl	16(%rsp), %edx
	testl	%eax, %eax
	movl	20(%rsp), %r8d
	movq	24(%rsp), %r11
	movq	32(%rsp), %r9
	jle	.L23
	movq	40(%rsp), %r10
	addq	(%r9,%rbp,8), %r10
	addl	%eax, (%r12)
	subl	%eax, (%r10)
	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
.L21:
	.cfi_restore_state
	addq	$56, %rsp
	.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
.L31:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE42:
	.size	Maxflow_dfs, .-Maxflow_dfs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rdx
	leaq	36(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	36(%rsp), %rbp
	leaq	0(,%rbp,8), %r12
	leaq	0(,%rbp,4), %r14
	movq	%r12, %rdi
	call	malloc@PLT
	movq	%r12, %rdi
	movq	%rax, list(%rip)
	movq	%rax, %r13
	call	malloc@PLT
	movq	%r14, %rdi
	movq	%rax, flow(%rip)
	movq	%rax, %r12
	call	malloc@PLT
	movq	%r14, %rdi
	movq	%rax, iter(%rip)
	call	malloc@PLT
	movq	%r14, %rdi
	movq	%rax, dist(%rip)
	call	malloc@PLT
	movq	%r14, %rdi
	movq	%rax, prev(%rip)
	call	malloc@PLT
	movq	%rax, queue(%rip)
	testl	%ebp, %ebp
	jle	.L39
	.p2align 4,,10
	.p2align 3
.L38:
	movq	$0, 0(%r13,%rbx,8)
	movl	$4, %esi
	movq	%rbp, %rdi
	call	calloc@PLT
	movq	%rax, (%r12,%rbx,8)
	addq	$1, %rbx
	cmpq	%rbx, %rbp
	jne	.L38
.L39:
	movl	40(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L37
	leaq	44(%rsp), %rax
	xorl	%r12d, %r12d
	leaq	52(%rsp), %r15
	movq	%rax, 8(%rsp)
	leaq	48(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L36:
	movq	8(%rsp), %rsi
	movq	%r14, %rdx
	movq	%r15, %rcx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movslq	48(%rsp), %rbx
	movd	52(%rsp), %xmm1
	movl	$16, %edi
	movl	44(%rsp), %ebp
	movd	%ebx, %xmm0
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, (%rsp)
	call	malloc@PLT
	movq	list(%rip), %r13
	movslq	%ebp, %rcx
	movq	(%rsp), %xmm0
	movl	$16, %edi
	leaq	0(%r13,%rcx,8), %rcx
	movq	%xmm0, (%rax)
	movq	(%rcx), %rsi
	movq	%rsi, 8(%rax)
	movq	%rax, (%rcx)
	call	malloc@PLT
	leaq	0(%r13,%rbx,8), %rdx
	movq	(%rdx), %rcx
	movl	%ebp, (%rax)
	movl	$0, 4(%rax)
	movq	%rcx, 8(%rax)
	movq	%rax, (%rdx)
	cmpl	%r12d, 40(%rsp)
	jg	.L36
.L37:
	movl	$0, 28(%rsp)
	movl	36(%rsp), %r13d
	.p2align 4,,10
	.p2align 3
.L40:
	movl	%r13d, %esi
	xorl	%edi, %edi
	call	Init_bfs
	movslq	36(%rsp), %rax
	movq	dist(%rip), %r12
	movl	-4(%r12,%rax,4), %edx
	movq	%rax, %r13
	testl	%edx, %edx
	js	.L41
	testl	%eax, %eax
	jle	.L42
	movq	iter(%rip), %rdx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L43:
	movl	$0, (%rdx,%rax,4)
	movl	36(%rsp), %r13d
	addq	$1, %rax
	cmpl	%eax, %r13d
	jg	.L43
.L42:
	movq	list(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rsp)
	cmpl	$1, %r13d
	je	.L44
	.p2align 4,,10
	.p2align 3
.L73:
	cmpq	$0, 16(%rsp)
	je	.L40
	movq	iter(%rip), %r15
	movq	16(%rsp), %rbx
	movl	(%r15), %eax
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L49:
	movq	8(%rbx), %rbx
	subl	$1, %eax
	movl	%eax, (%r15)
	testq	%rbx, %rbx
	je	.L72
.L47:
	testl	%eax, %eax
	jne	.L49
	leal	-1(%r13), %esi
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L51:
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	je	.L72
.L48:
	movslq	(%rbx), %rbp
	movl	%ebp, (%r15)
	movq	%rbp, %rdi
	movl	(%r12,%rbp,4), %eax
	leaq	0(,%rbp,4), %r14
	cmpl	%eax, (%r12)
	jge	.L51
	movq	flow(%rip), %r10
	movl	4(%rbx), %ecx
	addq	(%r10), %r14
	movl	(%r14), %eax
	cmpl	%ecx, %eax
	jge	.L51
	subl	%eax, %ecx
	movl	%r13d, %edx
	movq	%r10, 8(%rsp)
	movl	%esi, (%rsp)
	call	Maxflow_dfs
	movl	(%rsp), %esi
	movq	8(%rsp), %r10
	testl	%eax, %eax
	jle	.L51
	movq	(%r10,%rbp,8), %rdx
	addl	%eax, (%r14)
	addl	%eax, 28(%rsp)
	subl	%eax, (%rdx)
	movl	36(%rsp), %r13d
	cmpl	$1, %r13d
	jne	.L73
.L44:
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L72:
	movl	36(%rsp), %r13d
	jmp	.L40
.L41:
	movl	28(%rsp), %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	movl	$1, %edi
	call	__printf_chk@PLT
	movl	36(%rsp), %eax
	testl	%eax, %eax
	jle	.L54
	.p2align 4,,10
	.p2align 3
.L53:
	movq	list(%rip), %rax
	movq	(%rax,%rbx,8), %rdi
	call	free@PLT
	movq	flow(%rip), %rax
	movq	(%rax,%rbx,8), %rdi
	addq	$1, %rbx
	call	free@PLT
	cmpl	%ebx, 36(%rsp)
	jg	.L53
.L54:
	movq	list(%rip), %rdi
	call	free@PLT
	movq	flow(%rip), %rdi
	call	free@PLT
	movq	iter(%rip), %rdi
	call	free@PLT
	movq	dist(%rip), %rdi
	call	free@PLT
	movq	prev(%rip), %rdi
	call	free@PLT
	movq	queue(%rip), %rdi
	call	free@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L74
	addq	$72, %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
.L74:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	queue
	.bss
	.align 8
	.type	queue, @object
	.size	queue, 8
queue:
	.zero	8
	.globl	prev
	.align 8
	.type	prev, @object
	.size	prev, 8
prev:
	.zero	8
	.globl	dist
	.align 8
	.type	dist, @object
	.size	dist, 8
dist:
	.zero	8
	.globl	iter
	.align 8
	.type	iter, @object
	.size	iter, 8
iter:
	.zero	8
	.globl	flow
	.align 8
	.type	flow, @object
	.size	flow, 8
flow:
	.zero	8
	.globl	list
	.align 8
	.type	list, @object
	.size	list, 8
list:
	.zero	8
	.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	Insert
	.type	Insert, @function
Insert:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	%edx, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movl	%edi, %ebp
	movl	$16, %edi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movslq	%esi, %rbx
	call	malloc@PLT
	movd	%r12d, %xmm1
	movslq	%ebp, %rdx
	movq	list(%rip), %r12
	movd	%ebx, %xmm0
	movl	$16, %edi
	leaq	(%r12,%rdx,8), %rdx
	punpckldq	%xmm1, %xmm0
	movq	(%rdx), %rcx
	movq	%xmm0, (%rax)
	movq	%rcx, 8(%rax)
	movq	%rax, (%rdx)
	call	malloc@PLT
	leaq	(%r12,%rbx,8), %rdx
	movq	(%rdx), %rcx
	movl	%ebp, (%rax)
	movl	$0, 4(%rax)
	movq	%rcx, 8(%rax)
	movq	%rax, (%rdx)
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.size	Insert, .-Insert
	.p2align 4
	.globl	Init_bfs
	.type	Init_bfs, @function
Init_bfs:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movl	%edi, %ebp
	movq	dist(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	testl	%esi, %esi
	jle	.L7
	movslq	%esi, %rdx
	movl	$255, %esi
	salq	$2, %rdx
	call	memset@PLT
	movq	%rax, %rdi
.L7:
	movq	queue(%rip), %rbx
	movslq	%ebp, %rax
	movq	flow(%rip), %r12
	xorl	%r11d, %r11d
	movl	$0, (%rdi,%rax,4)
	movl	$1, %r9d
	movl	%ebp, (%rbx)
	movq	list(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L6:
	movslq	(%rbx,%r11,4), %rdx
	movq	0(%rbp,%rdx,8), %rax
	leaq	0(,%rdx,8), %r10
	testq	%rax, %rax
	je	.L8
	addq	%r12, %r10
	leaq	(%rdi,%rdx,4), %r13
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	.L8
.L10:
	movslq	(%rax), %rdx
	leaq	(%rdi,%rdx,4), %rsi
	movq	%rdx, %rcx
	movl	(%rsi), %r8d
	testl	%r8d, %r8d
	jns	.L9
	movq	(%r10), %r8
	movl	4(%rax), %r14d
	cmpl	%r14d, (%r8,%rdx,4)
	jge	.L9
	movl	0(%r13), %edx
	movq	8(%rax), %rax
	addl	$1, %edx
	movl	%edx, (%rsi)
	movslq	%r9d, %rdx
	addl	$1, %r9d
	movl	%ecx, (%rbx,%rdx,4)
	testq	%rax, %rax
	jne	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$1, %r11
	cmpl	%r11d, %r9d
	jne	.L6
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE41:
	.size	Init_bfs, .-Init_bfs
	.p2align 4
	.globl	Maxflow_dfs
	.type	Maxflow_dfs, @function
Maxflow_dfs:
.LFB42:
	.cfi_startproc
	endbr64
	movl	%ecx, %r8d
	movslq	%edi, %r10
	movq	list(%rip), %rcx
	leaq	0(,%r10,8), %r11
	movl	%r8d, %eax
	addq	%r11, %rcx
	cmpl	%esi, %edi
	je	.L31
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	(%rcx), %rbx
	testq	%rbx, %rbx
	je	.L21
	movq	iter(%rip), %r13
	salq	$2, %r10
	addq	%r10, %r13
	movl	0(%r13), %eax
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L22:
	movq	8(%rbx), %rbx
	subl	$1, %eax
	movl	%eax, 0(%r13)
	testq	%rbx, %rbx
	je	.L21
.L20:
	testl	%eax, %eax
	jne	.L22
	movq	dist(%rip), %r14
	movq	%r10, 40(%rsp)
	leal	-1(%rdx), %esi
	leaq	(%r14,%r10), %r15
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L23:
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	je	.L21
.L24:
	movslq	(%rbx), %rbp
	movl	%ebp, 0(%r13)
	movq	%rbp, %rdi
	movl	(%r14,%rbp,4), %eax
	leaq	0(,%rbp,4), %r12
	cmpl	%eax, (%r15)
	jge	.L23
	movq	flow(%rip), %r9
	movl	4(%rbx), %ecx
	addq	(%r9,%r11), %r12
	movl	(%r12), %eax
	cmpl	%ecx, %eax
	jge	.L23
	subl	%eax, %ecx
	movq	%r9, 32(%rsp)
	cmpl	%r8d, %ecx
	movq	%r11, 24(%rsp)
	cmovg	%r8d, %ecx
	movl	%r8d, 20(%rsp)
	movl	%edx, 16(%rsp)
	movl	%esi, 12(%rsp)
	call	Maxflow_dfs
	movl	12(%rsp), %esi
	movl	16(%rsp), %edx
	testl	%eax, %eax
	movl	20(%rsp), %r8d
	movq	24(%rsp), %r11
	movq	32(%rsp), %r9
	jle	.L23
	movq	40(%rsp), %r10
	addq	(%r9,%rbp,8), %r10
	addl	%eax, (%r12)
	subl	%eax, (%r10)
	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
.L21:
	.cfi_restore_state
	addq	$56, %rsp
	.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
.L31:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE42:
	.size	Maxflow_dfs, .-Maxflow_dfs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rdx
	leaq	36(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	36(%rsp), %rbp
	leaq	0(,%rbp,8), %r12
	leaq	0(,%rbp,4), %r14
	movq	%r12, %rdi
	call	malloc@PLT
	movq	%r12, %rdi
	movq	%rax, list(%rip)
	movq	%rax, %r13
	call	malloc@PLT
	movq	%r14, %rdi
	movq	%rax, flow(%rip)
	movq	%rax, %r12
	call	malloc@PLT
	movq	%r14, %rdi
	movq	%rax, iter(%rip)
	call	malloc@PLT
	movq	%r14, %rdi
	movq	%rax, dist(%rip)
	call	malloc@PLT
	movq	%r14, %rdi
	movq	%rax, prev(%rip)
	call	malloc@PLT
	movq	%rax, queue(%rip)
	testl	%ebp, %ebp
	jle	.L39
	.p2align 4,,10
	.p2align 3
.L38:
	movq	$0, 0(%r13,%rbx,8)
	movl	$4, %esi
	movq	%rbp, %rdi
	call	calloc@PLT
	movq	%rax, (%r12,%rbx,8)
	addq	$1, %rbx
	cmpq	%rbx, %rbp
	jne	.L38
.L39:
	movl	40(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L37
	leaq	44(%rsp), %rax
	xorl	%r12d, %r12d
	leaq	52(%rsp), %r15
	movq	%rax, 8(%rsp)
	leaq	48(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L36:
	movq	8(%rsp), %rsi
	movq	%r14, %rdx
	movq	%r15, %rcx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movslq	48(%rsp), %rbx
	movd	52(%rsp), %xmm1
	movl	$16, %edi
	movl	44(%rsp), %ebp
	movd	%ebx, %xmm0
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, (%rsp)
	call	malloc@PLT
	movq	list(%rip), %r13
	movslq	%ebp, %rcx
	movq	(%rsp), %xmm0
	movl	$16, %edi
	leaq	0(%r13,%rcx,8), %rcx
	movq	%xmm0, (%rax)
	movq	(%rcx), %rsi
	movq	%rsi, 8(%rax)
	movq	%rax, (%rcx)
	call	malloc@PLT
	leaq	0(%r13,%rbx,8), %rdx
	movq	(%rdx), %rcx
	movl	%ebp, (%rax)
	movl	$0, 4(%rax)
	movq	%rcx, 8(%rax)
	movq	%rax, (%rdx)
	cmpl	%r12d, 40(%rsp)
	jg	.L36
.L37:
	movl	$0, 28(%rsp)
	movl	36(%rsp), %r13d
	.p2align 4,,10
	.p2align 3
.L40:
	movl	%r13d, %esi
	xorl	%edi, %edi
	call	Init_bfs
	movslq	36(%rsp), %rax
	movq	dist(%rip), %r12
	movl	-4(%r12,%rax,4), %edx
	movq	%rax, %r13
	testl	%edx, %edx
	js	.L41
	testl	%eax, %eax
	jle	.L42
	movq	iter(%rip), %rdx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L43:
	movl	$0, (%rdx,%rax,4)
	movl	36(%rsp), %r13d
	addq	$1, %rax
	cmpl	%eax, %r13d
	jg	.L43
.L42:
	movq	list(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rsp)
	cmpl	$1, %r13d
	je	.L44
	.p2align 4,,10
	.p2align 3
.L73:
	cmpq	$0, 16(%rsp)
	je	.L40
	movq	iter(%rip), %r15
	movq	16(%rsp), %rbx
	movl	(%r15), %eax
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L49:
	movq	8(%rbx), %rbx
	subl	$1, %eax
	movl	%eax, (%r15)
	testq	%rbx, %rbx
	je	.L72
.L47:
	testl	%eax, %eax
	jne	.L49
	leal	-1(%r13), %esi
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L51:
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	je	.L72
.L48:
	movslq	(%rbx), %rbp
	movl	%ebp, (%r15)
	movq	%rbp, %rdi
	movl	(%r12,%rbp,4), %eax
	leaq	0(,%rbp,4), %r14
	cmpl	%eax, (%r12)
	jge	.L51
	movq	flow(%rip), %r10
	movl	4(%rbx), %ecx
	addq	(%r10), %r14
	movl	(%r14), %eax
	cmpl	%ecx, %eax
	jge	.L51
	subl	%eax, %ecx
	movl	%r13d, %edx
	movq	%r10, 8(%rsp)
	movl	%esi, (%rsp)
	call	Maxflow_dfs
	movl	(%rsp), %esi
	movq	8(%rsp), %r10
	testl	%eax, %eax
	jle	.L51
	movq	(%r10,%rbp,8), %rdx
	addl	%eax, (%r14)
	addl	%eax, 28(%rsp)
	subl	%eax, (%rdx)
	movl	36(%rsp), %r13d
	cmpl	$1, %r13d
	jne	.L73
.L44:
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L72:
	movl	36(%rsp), %r13d
	jmp	.L40
.L41:
	movl	28(%rsp), %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	movl	$1, %edi
	call	__printf_chk@PLT
	movl	36(%rsp), %eax
	testl	%eax, %eax
	jle	.L54
	.p2align 4,,10
	.p2align 3
.L53:
	movq	list(%rip), %rax
	movq	(%rax,%rbx,8), %rdi
	call	free@PLT
	movq	flow(%rip), %rax
	movq	(%rax,%rbx,8), %rdi
	addq	$1, %rbx
	call	free@PLT
	cmpl	%ebx, 36(%rsp)
	jg	.L53
.L54:
	movq	list(%rip), %rdi
	call	free@PLT
	movq	flow(%rip), %rdi
	call	free@PLT
	movq	iter(%rip), %rdi
	call	free@PLT
	movq	dist(%rip), %rdi
	call	free@PLT
	movq	prev(%rip), %rdi
	call	free@PLT
	movq	queue(%rip), %rdi
	call	free@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L74
	addq	$72, %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
.L74:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	queue
	.bss
	.align 8
	.type	queue, @object
	.size	queue, 8
queue:
	.zero	8
	.globl	prev
	.align 8
	.type	prev, @object
	.size	prev, 8
prev:
	.zero	8
	.globl	dist
	.align 8
	.type	dist, @object
	.size	dist, 8
dist:
	.zero	8
	.globl	iter
	.align 8
	.type	iter, @object
	.size	iter, 8
iter:
	.zero	8
	.globl	flow
	.align 8
	.type	flow, @object
	.size	flow, 8
flow:
	.zero	8
	.globl	list
	.align 8
	.type	list, @object
	.size	list, 8
list:
	.zero	8
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
#include<stdlib.h>
#include<limits.h>
#define MIN(a,b) ((a) < (b) ? (a) : (b))
struct node {
  int id;
  int cap;
  struct node *next;
};
struct node **list;
int **flow, *iter, *dist, *prev, *queue;
void Insert(int, int, int);
void Init_bfs(int, int);
int Maxflow_dfs(int, int, int, int);
int main(void)
{
  int i, v, e, s, t, c, maxflow = 0;
  scanf("%d %d", &v, &e);
  list = (struct node**)malloc(sizeof(struct node*) * v);
  flow = (int**)malloc(sizeof(int*) * v);
  iter = (int*)malloc(sizeof(int) * v);
  dist = (int*)malloc(sizeof(int) * v);
  prev = (int*)malloc(sizeof(int) * v);
  queue = (int*)malloc(sizeof(int) * v);
  for (i = 0; i < v; i++) {
    list[i] = NULL;
    flow[i] = (int*)calloc(v, sizeof(int));
  }
  for (i = 0; i < e; i++) {
    scanf("%d %d %d", &s, &t, &c);
    Insert(s, t, c);
  }
  while (1) {
    Init_bfs(0, v);
    if (dist[v-1] < 0) break;
    for (i = 0; i < v; i++) iter[i] = 0;
    while (1) {
      int f = Maxflow_dfs(0, v - 1, v, INT_MAX);
      if (!f) break;
      maxflow += f;
    }
  }
  printf("%d\n", maxflow);
  for (i = 0; i < v; i++) {
    free(list[i]);
    free(flow[i]);
  }
  free(list);
  free(flow);
  free(iter);
  free(dist);
  free(prev);
  free(queue);
}
void Insert(int a, int b, int c)
{
  struct node *p = (struct node*)malloc(sizeof(struct node));
  p->id = b;
  p->cap = c;
  p->next = list[a];
  list[a] = p;
  p = (struct node*)malloc(sizeof(struct node));
  p->id = a;
  p->cap = 0;
  p->next = list[b];
  list[b] = p;
}
void Init_bfs(int s, int size)
{
  struct node *n;
  int i, head = 0, tail = 0;
  for (i = 0; i < size; i++) dist[i] = -1;
  dist[s] = 0;
  queue[tail++] = s;
  while (head != tail) {
    i = queue[head++];
    for (n = list[i]; n != NULL; n = n->next) {
      int v = n->id;
      if (dist[v] < 0 && flow[i][v] < n->cap) {
        dist[v] = dist[i] + 1;
        queue[tail++] = v;
      }
    }
  }
}
int Maxflow_dfs(int s, int t, int size, int f)
{
  struct node *n = list[s];
  if (s == t) return f;
  while (n != NULL && iter[s]) {
    n = n->next;
    iter[s]--;
  }
  for (; n != NULL; n = n->next) {
    int v = n->id;
    iter[s] = v;
    if (dist[s] < dist[v] && flow[s][v] < n->cap) {
      int d = Maxflow_dfs(v, size - 1, size, MIN(f, n->cap - flow[s][v]));
      if (d > 0) {
        flow[s][v] += d;
        flow[v][s] -= d;
        return d;
      }
    }
  }
  return 0;
}

4 2
0 1 2
0 2 1
1 2 1
1 3 1
2 3 2
 3 2
1 1 0
0 2 1
1 1 2
1 3 1
2 3 2
 6 2
0 1 2
0 2 1
1 2 1
1 3 1
2 3 2
 6 2
0 1 2
0 2 1
1 2 1
1 3 1
2 3 4
 6 2
0 1 2
0 2 1
1 2 1
1 3 1
2 3 5
 6 2
0 1 0
0 2 1
1 2 1
1 3 1
2 3 5
 6 2
1 1 0
0 2 1
1 2 1
1 3 1
2 3 5
 6 2
1 1 0
0 2 1
1 2 1
1 3 1
2 3 2
 6 2
1 1 0
0 3 1
1 2 1
1 3 1
2 3 2
 6 2
1 1 0
0 3 1
1 2 1
1 3 1
2 3 4

0
 1
 0
 0
 0
 0
 0
 0
 0
 0

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

```c
#include<stdio.h>
#include<stdlib.h>
#include<limits.h>
#define MIN(a,b) ((a) < (b) ? (a) : (b))
struct node {
  int id;
  int cap;
  struct node *next;
};
struct node **list;
int **flow, *iter, *dist, *prev, *queue;
void Insert(int, int, int);
void Init_bfs(int, int);
int Maxflow_dfs(int, int, int, int);
int main(void)
{
  int i, v, e, s, t, c, maxflow = 0;
  scanf("%d %d", &v, &e);
  list = (struct node**)malloc(sizeof(struct node*) * v);
  flow = (int**)malloc(sizeof(int*) * v);
  iter = (int*)malloc(sizeof(int) * v);
  dist = (int*)malloc(sizeof(int) * v);
  prev = (int*)malloc(sizeof(int) * v);
  queue = (int*)malloc(sizeof(int) * v);
  for (i = 0; i < v; i++) {
    list[i] = NULL;
    flow[i] = (int*)calloc(v, sizeof(int));
  }
  for (i = 0; i < e; i++) {
    scanf("%d %d %d", &s, &t, &c);
    Insert(s, t, c);
  }
  while (1) {
    Init_bfs(0, v);
    if (dist[v-1] < 0) break;
    for (i = 0; i < v; i++) iter[i] = 0;
    while (1) {
      int f = Maxflow_dfs(0, v - 1, v, INT_MAX);
      if (!f) break;
      maxflow += f;
    }
  }
  printf("%d\n", maxflow);
  for (i = 0; i < v; i++) {
    free(list[i]);
    free(flow[i]);
  }
  free(list);
  free(flow);
  free(iter);
  free(dist);
  free(prev);
  free(queue);
}
void Insert(int a, int b, int c)
{
  struct node *p = (struct node*)malloc(sizeof(struct node));
  p->id = b;
  p->cap = c;
  p->next = list[a];
  list[a] = p;
  p = (struct node*)malloc(sizeof(struct node));
  p->id = a;
  p->cap = 0;
  p->next = list[b];
  list[b] = p;
}
void Init_bfs(int s, int size)
{
  struct node *n;
  int i, head = 0, tail = 0;
  for (i = 0; i < size; i++) dist[i] = -1;
  dist[s] = 0;
  queue[tail++] = s;
  while (head != tail) {
    i = queue[head++];
    for (n = list[i]; n != NULL; n = n->next) {
      int v = n->id;
      if (dist[v] < 0 && flow[i][v] < n->cap) {
        dist[v] = dist[i] + 1;
        queue[tail++] = v;
      }
    }
  }
}
int Maxflow_dfs(int s, int t, int size, int f)
{
  struct node *n = list[s];
  if (s == t) return f;
  while (n != NULL && iter[s]) {
    n = n->next;
    iter[s]--;
  }
  for (; n != NULL; n = n->next) {
    int v = n->id;
    iter[s] = v;
    if (dist[s] < dist[v] && flow[s][v] < n->cap) {
      int d = Maxflow_dfs(v, size - 1, size, MIN(f, n->cap - flow[s][v]));
      if (d > 0) {
        flow[s][v] += d;
        flow[v][s] -= d;
        return d;
      }
    }
  }
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	list
	.bss
	.align 8
	.type	list, @object
	.size	list, 8
list:
	.zero	8
	.globl	flow
	.align 8
	.type	flow, @object
	.size	flow, 8
flow:
	.zero	8
	.globl	iter
	.align 8
	.type	iter, @object
	.size	iter, 8
iter:
	.zero	8
	.globl	dist
	.align 8
	.type	dist, @object
	.size	dist, 8
dist:
	.zero	8
	.globl	prev
	.align 8
	.type	prev, @object
	.size	prev, 8
prev:
	.zero	8
	.globl	queue
	.align 8
	.type	queue, @object
	.size	queue, 8
queue:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$0, -32(%rbp)
	leaq	-52(%rbp), %rdx
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-56(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, list(%rip)
	movl	-56(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, flow(%rip)
	movl	-56(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, iter(%rip)
	movl	-56(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, dist(%rip)
	movl	-56(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, prev(%rip)
	movl	-56(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, queue(%rip)
	movl	$0, -36(%rbp)
	jmp	.L2
.L3:
	movq	list(%rip), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	$0, (%rax)
	movl	-56(%rbp), %eax
	cltq
	movq	flow(%rip), %rcx
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	leaq	(%rcx,%rdx), %rbx
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, (%rbx)
	addl	$1, -36(%rbp)
.L2:
	movl	-56(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L3
	movl	$0, -36(%rbp)
	jmp	.L4
.L5:
	leaq	-40(%rbp), %rcx
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %edx
	movl	-44(%rbp), %ecx
	movl	-48(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	Insert
	addl	$1, -36(%rbp)
.L4:
	movl	-52(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L5
.L13:
	movl	-56(%rbp), %eax
	movl	%eax, %esi
	movl	$0, %edi
	call	Init_bfs
	movq	dist(%rip), %rdx
	movl	-56(%rbp), %eax
	cltq
	salq	$2, %rax
	subq	$4, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	js	.L20
	movl	$0, -36(%rbp)
	jmp	.L8
.L9:
	movq	iter(%rip), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	addl	$1, -36(%rbp)
.L8:
	movl	-56(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L9
.L12:
	movl	-56(%rbp), %eax
	movl	-56(%rbp), %edx
	leal	-1(%rdx), %esi
	movl	$2147483647, %ecx
	movl	%eax, %edx
	movl	$0, %edi
	call	Maxflow_dfs
	movl	%eax, -28(%rbp)
	cmpl	$0, -28(%rbp)
	je	.L21
	movl	-28(%rbp), %eax
	addl	%eax, -32(%rbp)
	jmp	.L12
.L21:
	nop
	jmp	.L13
.L20:
	nop
	movl	-32(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -36(%rbp)
	jmp	.L14
.L15:
	movq	list(%rip), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	flow(%rip), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	free@PLT
	addl	$1, -36(%rbp)
.L14:
	movl	-56(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L15
	movq	list(%rip), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	flow(%rip), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	iter(%rip), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	dist(%rip), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	prev(%rip), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	queue(%rip), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	Insert
	.type	Insert, @function
Insert:
.LFB7:
	.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	$16, %edi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	-24(%rbp), %edx
	movl	%edx, (%rax)
	movq	-8(%rbp), %rax
	movl	-28(%rbp), %edx
	movl	%edx, 4(%rax)
	movq	list(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	list(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	movl	$16, %edi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	-20(%rbp), %edx
	movl	%edx, (%rax)
	movq	-8(%rbp), %rax
	movl	$0, 4(%rax)
	movq	list(%rip), %rdx
	movl	-24(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	list(%rip), %rdx
	movl	-24(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Insert, .-Insert
	.globl	Init_bfs
	.type	Init_bfs, @function
Init_bfs:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -36(%rbp)
	movl	%esi, -40(%rbp)
	movl	$0, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -24(%rbp)
	jmp	.L24
.L25:
	movq	dist(%rip), %rdx
	movl	-24(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	$-1, (%rax)
	addl	$1, -24(%rbp)
.L24:
	movl	-24(%rbp), %eax
	cmpl	-40(%rbp), %eax
	jl	.L25
	movq	dist(%rip), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	movq	queue(%rip), %rcx
	movl	-16(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -16(%rbp)
	cltq
	salq	$2, %rax
	leaq	(%rcx,%rax), %rdx
	movl	-36(%rbp), %eax
	movl	%eax, (%rdx)
	jmp	.L26
.L30:
	movq	queue(%rip), %rcx
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -20(%rbp)
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movq	list(%rip), %rdx
	movl	-24(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	jmp	.L27
.L29:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
	movq	dist(%rip), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jns	.L28
	movq	flow(%rip), %rdx
	movl	-24(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L28
	movq	dist(%rip), %rdx
	movl	-24(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movq	dist(%rip), %rcx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	addl	$1, %edx
	movl	%edx, (%rax)
	movq	queue(%rip), %rcx
	movl	-16(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -16(%rbp)
	cltq
	salq	$2, %rax
	leaq	(%rcx,%rax), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rdx)
.L28:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -8(%rbp)
.L27:
	cmpq	$0, -8(%rbp)
	jne	.L29
.L26:
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jne	.L30
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Init_bfs, .-Init_bfs
	.globl	Maxflow_dfs
	.type	Maxflow_dfs, @function
Maxflow_dfs:
.LFB9:
	.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)
	movq	list(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jne	.L34
	movl	-32(%rbp), %eax
	jmp	.L33
.L36:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	iter(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	subl	$1, %edx
	movl	%edx, (%rax)
.L34:
	cmpq	$0, -8(%rbp)
	je	.L37
	movq	iter(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jne	.L36
	jmp	.L37
.L39:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -16(%rbp)
	movq	iter(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rdx)
	movq	dist(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movq	dist(%rip), %rcx
	movl	-16(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L38
	movq	flow(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-16(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L38
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	movq	flow(%rip), %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	addq	%rcx, %rdx
	movq	(%rdx), %rcx
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, %ecx
	movl	-28(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	Maxflow_dfs
	movl	%eax, -12(%rbp)
	cmpl	$0, -12(%rbp)
	jle	.L38
	movq	flow(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-16(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movq	flow(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-16(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-12(%rbp), %edx
	addl	%ecx, %edx
	movl	%edx, (%rax)
	movq	flow(%rip), %rdx
	movl	-16(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movq	flow(%rip), %rcx
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	addq	%rcx, %rdx
	movq	(%rdx), %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	subl	-12(%rbp), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	jmp	.L33
.L38:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -8(%rbp)
.L37:
	cmpq	$0, -8(%rbp)
	jne	.L39
	movl	$0, %eax
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	Maxflow_dfs, .-Maxflow_dfs
	.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	list
	.bss
	.align 8
	.type	list, @object
	.size	list, 8
list:
	.zero	8
	.globl	flow
	.align 8
	.type	flow, @object
	.size	flow, 8
flow:
	.zero	8
	.globl	iter
	.align 8
	.type	iter, @object
	.size	iter, 8
iter:
	.zero	8
	.globl	dist
	.align 8
	.type	dist, @object
	.size	dist, 8
dist:
	.zero	8
	.globl	prev
	.align 8
	.type	prev, @object
	.size	prev, 8
prev:
	.zero	8
	.globl	queue
	.align 8
	.type	queue, @object
	.size	queue, 8
queue:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$0, -32(%rbp)
	leaq	-52(%rbp), %rdx
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-56(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, list(%rip)
	movl	-56(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, flow(%rip)
	movl	-56(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, iter(%rip)
	movl	-56(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, dist(%rip)
	movl	-56(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, prev(%rip)
	movl	-56(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, queue(%rip)
	movl	$0, -36(%rbp)
	jmp	.L2
.L3:
	movq	list(%rip), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	$0, (%rax)
	movl	-56(%rbp), %eax
	cltq
	movq	flow(%rip), %rcx
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	leaq	(%rcx,%rdx), %rbx
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, (%rbx)
	addl	$1, -36(%rbp)
.L2:
	movl	-56(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L3
	movl	$0, -36(%rbp)
	jmp	.L4
.L5:
	leaq	-40(%rbp), %rcx
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %edx
	movl	-44(%rbp), %ecx
	movl	-48(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	Insert
	addl	$1, -36(%rbp)
.L4:
	movl	-52(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L5
.L13:
	movl	-56(%rbp), %eax
	movl	%eax, %esi
	movl	$0, %edi
	call	Init_bfs
	movq	dist(%rip), %rdx
	movl	-56(%rbp), %eax
	cltq
	salq	$2, %rax
	subq	$4, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	js	.L20
	movl	$0, -36(%rbp)
	jmp	.L8
.L9:
	movq	iter(%rip), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	addl	$1, -36(%rbp)
.L8:
	movl	-56(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L9
.L12:
	movl	-56(%rbp), %eax
	movl	-56(%rbp), %edx
	leal	-1(%rdx), %esi
	movl	$2147483647, %ecx
	movl	%eax, %edx
	movl	$0, %edi
	call	Maxflow_dfs
	movl	%eax, -28(%rbp)
	cmpl	$0, -28(%rbp)
	je	.L21
	movl	-28(%rbp), %eax
	addl	%eax, -32(%rbp)
	jmp	.L12
.L21:
	nop
	jmp	.L13
.L20:
	nop
	movl	-32(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, -36(%rbp)
	jmp	.L14
.L15:
	movq	list(%rip), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	flow(%rip), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	free@PLT
	addl	$1, -36(%rbp)
.L14:
	movl	-56(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L15
	movq	list(%rip), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	flow(%rip), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	iter(%rip), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	dist(%rip), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	prev(%rip), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	queue(%rip), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	Insert
	.type	Insert, @function
Insert:
.LFB7:
	.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	$16, %edi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	-24(%rbp), %edx
	movl	%edx, (%rax)
	movq	-8(%rbp), %rax
	movl	-28(%rbp), %edx
	movl	%edx, 4(%rax)
	movq	list(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	list(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	movl	$16, %edi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	-20(%rbp), %edx
	movl	%edx, (%rax)
	movq	-8(%rbp), %rax
	movl	$0, 4(%rax)
	movq	list(%rip), %rdx
	movl	-24(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	list(%rip), %rdx
	movl	-24(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rdx)
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Insert, .-Insert
	.globl	Init_bfs
	.type	Init_bfs, @function
Init_bfs:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -36(%rbp)
	movl	%esi, -40(%rbp)
	movl	$0, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -24(%rbp)
	jmp	.L24
.L25:
	movq	dist(%rip), %rdx
	movl	-24(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	$-1, (%rax)
	addl	$1, -24(%rbp)
.L24:
	movl	-24(%rbp), %eax
	cmpl	-40(%rbp), %eax
	jl	.L25
	movq	dist(%rip), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	$0, (%rax)
	movq	queue(%rip), %rcx
	movl	-16(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -16(%rbp)
	cltq
	salq	$2, %rax
	leaq	(%rcx,%rax), %rdx
	movl	-36(%rbp), %eax
	movl	%eax, (%rdx)
	jmp	.L26
.L30:
	movq	queue(%rip), %rcx
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -20(%rbp)
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movq	list(%rip), %rdx
	movl	-24(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	jmp	.L27
.L29:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
	movq	dist(%rip), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jns	.L28
	movq	flow(%rip), %rdx
	movl	-24(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L28
	movq	dist(%rip), %rdx
	movl	-24(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movq	dist(%rip), %rcx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	addl	$1, %edx
	movl	%edx, (%rax)
	movq	queue(%rip), %rcx
	movl	-16(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -16(%rbp)
	cltq
	salq	$2, %rax
	leaq	(%rcx,%rax), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rdx)
.L28:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -8(%rbp)
.L27:
	cmpq	$0, -8(%rbp)
	jne	.L29
.L26:
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jne	.L30
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Init_bfs, .-Init_bfs
	.globl	Maxflow_dfs
	.type	Maxflow_dfs, @function
Maxflow_dfs:
.LFB9:
	.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)
	movq	list(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jne	.L34
	movl	-32(%rbp), %eax
	jmp	.L33
.L36:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	iter(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	subl	$1, %edx
	movl	%edx, (%rax)
.L34:
	cmpq	$0, -8(%rbp)
	je	.L37
	movq	iter(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jne	.L36
	jmp	.L37
.L39:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -16(%rbp)
	movq	iter(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rdx)
	movq	dist(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movq	dist(%rip), %rcx
	movl	-16(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L38
	movq	flow(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-16(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L38
	movq	-8(%rbp), %rax
	movl	4(%rax), %eax
	movq	flow(%rip), %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	addq	%rcx, %rdx
	movq	(%rdx), %rcx
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, %ecx
	movl	-28(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	Maxflow_dfs
	movl	%eax, -12(%rbp)
	cmpl	$0, -12(%rbp)
	jle	.L38
	movq	flow(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-16(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movq	flow(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-16(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	-12(%rbp), %edx
	addl	%ecx, %edx
	movl	%edx, (%rax)
	movq	flow(%rip), %rdx
	movl	-16(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movq	flow(%rip), %rcx
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	addq	%rcx, %rdx
	movq	(%rdx), %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	addq	%rcx, %rdx
	subl	-12(%rbp), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	jmp	.L33
.L38:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -8(%rbp)
.L37:
	cmpq	$0, -8(%rbp)
	jne	.L39
	movl	$0, %eax
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	Maxflow_dfs, .-Maxflow_dfs
	.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:
