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

```c
// Aizu Vol-1 0180: Demolition of Bridges
// 2017.8.9

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

#define INF 0x77777777
#define MAX 100
#define EMAX 500
int n;
typedef struct { int b, c; } ND;
ND d[MAX + 2][MAX + 2];
int w[MAX + 2];
int visited[MAX];

int qsize;
typedef struct { int a, b, c; } QUE;
QUE que[EMAX + 1];

#define PARENT(i) ((i)/2)
#define LEFT(i)   ((i)<<1)
#define RIGHT(i)  (((i)<<1)+1)

static void min_heapify(int i)
{
	int l, r, smallest;

	l = LEFT(i), r = RIGHT(i);
	if (l < qsize && que[l].c < que[i].c) smallest = l; else smallest = i;
	if (r < qsize && que[r].c < que[smallest].c) smallest = r;
	if (smallest != i) {
		QUE t;
		memcpy(&t, que + i, sizeof(QUE)), memcpy(que + i, que + smallest, sizeof(QUE));
		memcpy(que + smallest, &t, sizeof(QUE));
		min_heapify(smallest);
	}
}

int deq(QUE *q)
{
	if (qsize == 0) return -1;
	memcpy(q, &que[0], sizeof(QUE));
	memcpy(que, que + --qsize, sizeof(QUE));
	min_heapify(0);
	return 1;
}

void enq(QUE *q)
{
	int i;

	i = qsize++;
	memcpy(que + i, q, sizeof(QUE));
	while (i > 0 && que[PARENT(i)].c > que[i].c) {
		QUE t;
		memcpy(&t, que + i, sizeof(QUE)), memcpy(que + i, que + PARENT(i), sizeof(QUE));
		memcpy(que + PARENT(i), &t, sizeof(QUE));
		i = PARENT(i);
	}
}


int main()
{
	int m, a, b, c;
	int i, k, ans;
	QUE q;

	while (1) {
		scanf("%d%d", &n, &m); if (!n) return 0;
		memset(w, 0, sizeof(w));
		for (i = 0; i < m; i++) {
			scanf("%d%d%d", &a, &b, &c);
			d[a][w[a]].b = b, d[a][w[a]++].c = c;
			d[b][w[b]].b = a, d[b][w[b]++].c = c;
		}
		memset(visited, 0, sizeof(visited));
		ans = 0, visited[0] = 1, k = 1, qsize = 0;
		for (i = 0; i < w[0]; i++) q.a = 0, q.b = d[0][i].b, q.c = d[0][i].c, enq(&q);
		while (k < n) {
			do deq(&q);
			while (visited[q.a] && visited[q.b]);
			k++;
			a = visited[q.a] ? q.b : q.a;
			visited[a] = 1, ans += q.c;
			for (i = 0; i < w[a]; i++) {
				b = d[a][i].b;
				if (!visited[b]) q.a = a, q.b = b, q.c = d[a][i].c, enq(&q);
			}

		}
		printf("%d\n", ans);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 83232
d:
	.zero	83232
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 408
w:
	.zero	408
	.globl	visited
	.align 32
	.type	visited, @object
	.size	visited, 400
visited:
	.zero	400
	.globl	qsize
	.align 4
	.type	qsize, @object
	.size	qsize, 4
qsize:
	.zero	4
	.globl	que
	.align 32
	.type	que, @object
	.size	que, 6012
que:
	.zero	6012
	.text
	.type	min_heapify, @function
min_heapify:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -36(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	-36(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -28(%rbp)
	movl	-36(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movl	%eax, -24(%rbp)
	movl	qsize(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L2
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+que(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+que(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jge	.L2
	movl	-28(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L3
.L2:
	movl	-36(%rbp), %eax
	movl	%eax, -32(%rbp)
.L3:
	movl	qsize(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L4
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+que(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+que(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jge	.L4
	movl	-24(%rbp), %eax
	movl	%eax, -32(%rbp)
.L4:
	movl	-32(%rbp), %eax
	cmpl	-36(%rbp), %eax
	je	.L7
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-20(%rbp), %rax
	movl	$12, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	addq	%rdx, %rax
	movl	$12, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-20(%rbp), %rax
	movl	$12, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcpy@PLT
	movl	-32(%rbp), %eax
	movl	%eax, %edi
	call	min_heapify
.L7:
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	min_heapify, .-min_heapify
	.globl	deq
	.type	deq, @function
deq:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	qsize(%rip), %eax
	testl	%eax, %eax
	jne	.L9
	movl	$-1, %eax
	jmp	.L10
.L9:
	movq	-8(%rbp), %rax
	movl	$12, %edx
	leaq	que(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	qsize(%rip), %eax
	subl	$1, %eax
	movl	%eax, qsize(%rip)
	movl	qsize(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	addq	%rdx, %rax
	movl	$12, %edx
	movq	%rax, %rsi
	leaq	que(%rip), %rax
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	$0, %edi
	call	min_heapify
	movl	$1, %eax
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	deq, .-deq
	.globl	enq
	.type	enq, @function
enq:
.LFB8:
	.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
	movq	%rdi, -40(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	qsize(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, qsize(%rip)
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-40(%rbp), %rax
	movl	$12, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcpy@PLT
	jmp	.L12
.L14:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-20(%rbp), %rax
	movl	$12, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	-24(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	addq	%rdx, %rax
	movl	$12, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	-24(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-20(%rbp), %rax
	movl	$12, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcpy@PLT
	movl	-24(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -24(%rbp)
.L12:
	cmpl	$0, -24(%rbp)
	jle	.L16
	movl	-24(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+que(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+que(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jg	.L14
.L16:
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	enq, .-enq
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L32:
	leaq	-48(%rbp), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jne	.L18
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	jmp	.L34
.L18:
	movl	$408, %edx
	movl	$0, %esi
	leaq	w(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -32(%rbp)
	jmp	.L20
.L21:
	leaq	-36(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %edx
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	w(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movl	-40(%rbp), %eax
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	$102, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	d(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-44(%rbp), %esi
	movl	-44(%rbp), %edx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	w(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rdi
	leaq	w(%rip), %rdx
	movl	%ecx, (%rdi,%rdx)
	movl	-36(%rbp), %edx
	movslq	%eax, %rcx
	movslq	%esi, %rax
	imulq	$102, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	4+d(%rip), %rax
	movl	%edx, (%rcx,%rax)
	movl	-40(%rbp), %edx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	w(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movl	-44(%rbp), %eax
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	$102, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	d(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-40(%rbp), %esi
	movl	-40(%rbp), %edx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	w(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rdi
	leaq	w(%rip), %rdx
	movl	%ecx, (%rdi,%rdx)
	movl	-36(%rbp), %edx
	movslq	%eax, %rcx
	movslq	%esi, %rax
	imulq	$102, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	4+d(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addl	$1, -32(%rbp)
.L20:
	movl	-48(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L21
	movl	$400, %edx
	movl	$0, %esi
	leaq	visited(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -24(%rbp)
	movl	$1, visited(%rip)
	movl	$1, -28(%rbp)
	movl	$0, qsize(%rip)
	movl	$0, -32(%rbp)
	jmp	.L22
.L23:
	movl	$0, -20(%rbp)
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
	leaq	-20(%rbp), %rax
	movq	%rax, %rdi
	call	enq
	addl	$1, -32(%rbp)
.L22:
	movl	w(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L23
	jmp	.L24
.L26:
	leaq	-20(%rbp), %rax
	movq	%rax, %rdi
	call	deq
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L25
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L26
.L25:
	addl	$1, -28(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L27
	movl	-16(%rbp), %eax
	jmp	.L28
.L27:
	movl	-20(%rbp), %eax
.L28:
	movl	%eax, -44(%rbp)
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-12(%rbp), %eax
	addl	%eax, -24(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L29
.L31:
	movl	-44(%rbp), %eax
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -40(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L30
	movl	-44(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-44(%rbp), %eax
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	4+d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
	leaq	-20(%rbp), %rax
	movq	%rax, %rdi
	call	enq
.L30:
	addl	$1, -32(%rbp)
.L29:
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L31
.L24:
	movl	n(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L26
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L32
.L34:
	call	__stack_chk_fail@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.type	min_heapify.constprop.0, @function
min_heapify.constprop.0:
.LFB56:
	.cfi_startproc
	movl	qsize(%rip), %r8d
	xorl	%ecx, %ecx
	leaq	que(%rip), %rsi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%edi, %r9
	movslq	%ecx, %rdx
	leaq	(%rdx,%rdx,2), %r10
	leaq	(%r9,%r9,2), %r11
	movl	8(%rsi,%r10,4), %r10d
	cmpl	%r10d, 8(%rsi,%r11,4)
	jge	.L2
	cmpl	%r8d, %eax
	jl	.L9
	movl	%edi, %eax
.L3:
	cmpl	%eax, %ecx
	je	.L1
	leaq	(%rdx,%rdx,2), %rdx
	leaq	(%rsi,%rdx,4), %rcx
	movslq	%eax, %rdx
	leaq	(%rdx,%rdx,2), %rdx
	movq	(%rcx), %r9
	movl	8(%rcx), %edi
	leaq	(%rsi,%rdx,4), %rdx
	movq	(%rdx), %r10
	movq	%r10, (%rcx)
	movl	8(%rdx), %r10d
	movl	%r10d, 8(%rcx)
	movl	%eax, %ecx
	movq	%r9, (%rdx)
	movl	%edi, 8(%rdx)
.L5:
	leal	(%rcx,%rcx), %edi
	leal	1(%rdi), %eax
	cmpl	%r8d, %edi
	jl	.L10
.L2:
	cmpl	%r8d, %eax
	jge	.L1
	movslq	%ecx, %rdx
	movslq	%eax, %rdi
	leaq	(%rdi,%rdi,2), %rdi
	leaq	(%rdx,%rdx,2), %r9
	movl	8(%rsi,%rdi,4), %edi
	cmpl	%edi, 8(%rsi,%r9,4)
	jg	.L3
.L1:
	ret
.L9:
	movslq	%eax, %r10
	imulq	$12, %r9, %r9
	imulq	$12, %r10, %r10
	movl	8(%rsi,%r9), %r11d
	cmpl	%r11d, 8(%rsi,%r10)
	cmovge	%edi, %eax
	jmp	.L3
	.cfi_endproc
.LFE56:
	.size	min_heapify.constprop.0, .-min_heapify.constprop.0
	.p2align 4
	.globl	deq
	.type	deq, @function
deq:
.LFB52:
	.cfi_startproc
	endbr64
	movl	qsize(%rip), %edx
	movl	$-1, %eax
	testl	%edx, %edx
	jne	.L14
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	movq	que(%rip), %rax
	movq	%rax, (%rdi)
	movl	8+que(%rip), %eax
	movl	%eax, 8(%rdi)
	movl	qsize(%rip), %eax
	subl	$1, %eax
	movl	%eax, qsize(%rip)
	cltq
	leaq	(%rax,%rax,2), %rdx
	leaq	que(%rip), %rax
	leaq	(%rax,%rdx,4), %rax
	movq	(%rax), %rdx
	movq	%rdx, que(%rip)
	movl	8(%rax), %eax
	movl	%eax, 8+que(%rip)
	call	min_heapify.constprop.0
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE52:
	.size	deq, .-deq
	.p2align 4
	.globl	enq
	.type	enq, @function
enq:
.LFB53:
	.cfi_startproc
	endbr64
	movl	qsize(%rip), %ecx
	leaq	que(%rip), %rsi
	leal	1(%rcx), %eax
	movl	%eax, qsize(%rip)
	movslq	%ecx, %rax
	movq	(%rdi), %rdx
	leaq	(%rax,%rax,2), %rax
	leaq	(%rsi,%rax,4), %rax
	movq	%rdx, (%rax)
	movl	8(%rdi), %edx
	movl	%edx, 8(%rax)
	testl	%ecx, %ecx
	jg	.L16
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L18:
	movq	(%rdx), %r9
	movq	(%rax), %r8
	movl	8(%rax), %edi
	movq	%r9, (%rax)
	movl	8(%rdx), %r9d
	movl	%r9d, 8(%rax)
	movq	%r8, (%rdx)
	movl	%edi, 8(%rdx)
	testl	%ecx, %ecx
	je	.L15
.L16:
	movslq	%ecx, %rax
	sarl	%ecx
	movslq	%ecx, %rdx
	leaq	(%rax,%rax,2), %rax
	leaq	(%rdx,%rdx,2), %rdx
	leaq	(%rsi,%rax,4), %rax
	leaq	(%rsi,%rdx,4), %rdx
	movl	8(%rax), %edi
	cmpl	%edi, 8(%rdx)
	jg	.L18
.L15:
	ret
.L23:
	ret
	.cfi_endproc
.LFE53:
	.size	enq, .-enq
	.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:
.LFB54:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	d(%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
	leaq	w(%rip), %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L40:
	movq	8(%rsp), %rdx
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r10d
	testl	%r10d, %r10d
	je	.L62
	movl	24(%rsp), %r9d
	xorl	%eax, %eax
	movl	$51, %ecx
	movq	%rbx, %rdi
	rep stosq
	testl	%r9d, %r9d
	jle	.L63
	xorl	%r14d, %r14d
	leaq	36(%rsp), %r13
	leaq	32(%rsp), %r12
	leaq	28(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%r13, %rcx
	movq	%r12, %rdx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rdx
	movd	36(%rsp), %xmm2
	movd	32(%rsp), %xmm0
	movslq	(%rbx,%rdx,4), %rax
	punpckldq	%xmm2, %xmm0
	leal	1(%rax), %ecx
	movl	%ecx, (%rbx,%rdx,4)
	imulq	$102, %rdx, %rdx
	addq	%rdx, %rax
	movq	%xmm0, (%r15,%rax,8)
	movslq	32(%rsp), %rax
	movd	28(%rsp), %xmm0
	movslq	(%rbx,%rax,4), %rdx
	punpckldq	%xmm2, %xmm0
	leal	1(%rdx), %ecx
	movl	%ecx, (%rbx,%rax,4)
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	movq	%xmm0, (%r15,%rdx,8)
	cmpl	%r14d, 24(%rsp)
	jg	.L26
	leaq	visited(%rip), %r14
	movl	(%rbx), %r8d
	xorl	%eax, %eax
	xorl	%r10d, %r10d
	movl	$50, %ecx
	movq	%r14, %rdi
	movl	$0, qsize(%rip)
	leaq	4+d(%rip), %rbp
	rep stosq
	leaq	40(%rsp), %r11
	movl	$1, visited(%rip)
	testl	%r8d, %r8d
	jle	.L27
	.p2align 4,,10
	.p2align 3
.L28:
	movl	(%r15,%r10,8), %eax
	movq	%r11, %rdi
	movl	$0, 40(%rsp)
	movl	%eax, 44(%rsp)
	movl	0(%rbp,%r10,8), %eax
	addq	$1, %r10
	movl	%eax, 48(%rsp)
	call	enq
	cmpl	%r10d, (%rbx)
	jg	.L28
.L27:
	cmpl	$1, n(%rip)
	movl	$2, (%rsp)
	leaq	que(%rip), %r13
	leaq	40(%rsp), %r12
	movl	$0, 4(%rsp)
	jle	.L30
	.p2align 4,,10
	.p2align 3
.L34:
	movl	qsize(%rip), %ebp
	testl	%ebp, %ebp
	je	.L31
	movq	0(%r13), %rax
	movq	%rax, 40(%rsp)
	movl	8+que(%rip), %eax
	movl	%eax, 48(%rsp)
	leal	-1(%rbp), %eax
	movl	%eax, qsize(%rip)
	cltq
	leaq	(%rax,%rax,2), %rax
	leaq	0(%r13,%rax,4), %rax
	movq	(%rax), %rdx
	movq	%rdx, 0(%r13)
	movl	8(%rax), %eax
	movl	%eax, 8+que(%rip)
	call	min_heapify.constprop.0
.L31:
	movslq	40(%rsp), %rax
	movl	(%r14,%rax,4), %edi
	movq	%rax, %rdx
	testl	%edi, %edi
	je	.L32
	movslq	44(%rsp), %rax
	movl	(%r14,%rax,4), %esi
	movq	%rax, %rdx
	testl	%esi, %esi
	je	.L32
	testl	%ebp, %ebp
	jne	.L34
.L35:
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L32:
	movl	(%rbx,%rax,4), %edi
	movl	48(%rsp), %esi
	movl	%edx, 28(%rsp)
	xorl	%r11d, %r11d
	addl	%esi, 4(%rsp)
	movl	(%rsp), %r10d
	movl	$1, (%r14,%rax,4)
	testl	%edi, %edi
	jle	.L39
	.p2align 4,,10
	.p2align 3
.L36:
	imulq	$102, %rax, %rsi
	movslq	%r11d, %rcx
	movd	%edx, %xmm0
	addq	%rcx, %rsi
	movslq	(%r15,%rsi,8), %rcx
	movd	%ecx, %xmm1
	movl	%ecx, 32(%rsp)
	movl	(%r14,%rcx,4), %ecx
	punpckldq	%xmm1, %xmm0
	testl	%ecx, %ecx
	je	.L64
	addl	$1, %r11d
	cmpl	%edi, %r11d
	jl	.L36
.L39:
	addl	$1, (%rsp)
	cmpl	%r10d, n(%rip)
	jg	.L34
.L30:
	movl	4(%rsp), %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L64:
	movl	4(%r15,%rsi,8), %eax
	movq	%r12, %rdi
	movq	%xmm0, 40(%rsp)
	addl	$1, %r11d
	movl	%eax, 48(%rsp)
	call	enq
	movslq	28(%rsp), %rax
	movl	(%rbx,%rax,4), %edi
	movq	%rax, %rdx
	cmpl	%edi, %r11d
	jl	.L36
	addl	$1, (%rsp)
	cmpl	%r10d, n(%rip)
	jg	.L34
	jmp	.L30
.L62:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L65
	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
.L63:
	.cfi_restore_state
	leaq	visited(%rip), %r14
	movl	$50, %ecx
	movl	$0, qsize(%rip)
	movq	%r14, %rdi
	rep stosq
	movl	$1, visited(%rip)
	jmp	.L27
.L65:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE54:
	.size	main, .-main
	.globl	que
	.bss
	.align 32
	.type	que, @object
	.size	que, 6012
que:
	.zero	6012
	.globl	qsize
	.align 4
	.type	qsize, @object
	.size	qsize, 4
qsize:
	.zero	4
	.globl	visited
	.align 32
	.type	visited, @object
	.size	visited, 400
visited:
	.zero	400
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 408
w:
	.zero	408
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 83232
d:
	.zero	83232
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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	min_heapify.constprop.0, @function
min_heapify.constprop.0:
.LFB56:
	.cfi_startproc
	movl	qsize(%rip), %r8d
	xorl	%ecx, %ecx
	leaq	que(%rip), %rsi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%edi, %r9
	movslq	%ecx, %rdx
	leaq	(%rdx,%rdx,2), %r10
	leaq	(%r9,%r9,2), %r11
	movl	8(%rsi,%r10,4), %r10d
	cmpl	%r10d, 8(%rsi,%r11,4)
	jge	.L2
	cmpl	%r8d, %eax
	jl	.L9
	movl	%edi, %eax
.L3:
	cmpl	%eax, %ecx
	je	.L1
	leaq	(%rdx,%rdx,2), %rdx
	leaq	(%rsi,%rdx,4), %rcx
	movslq	%eax, %rdx
	leaq	(%rdx,%rdx,2), %rdx
	movq	(%rcx), %r9
	movl	8(%rcx), %edi
	leaq	(%rsi,%rdx,4), %rdx
	movq	(%rdx), %r10
	movq	%r10, (%rcx)
	movl	8(%rdx), %r10d
	movl	%r10d, 8(%rcx)
	movl	%eax, %ecx
	movq	%r9, (%rdx)
	movl	%edi, 8(%rdx)
.L5:
	leal	(%rcx,%rcx), %edi
	leal	1(%rdi), %eax
	cmpl	%r8d, %edi
	jl	.L10
.L2:
	cmpl	%r8d, %eax
	jge	.L1
	movslq	%ecx, %rdx
	movslq	%eax, %rdi
	leaq	(%rdi,%rdi,2), %rdi
	leaq	(%rdx,%rdx,2), %r9
	movl	8(%rsi,%rdi,4), %edi
	cmpl	%edi, 8(%rsi,%r9,4)
	jg	.L3
.L1:
	ret
.L9:
	movslq	%eax, %r10
	imulq	$12, %r9, %r9
	imulq	$12, %r10, %r10
	movl	8(%rsi,%r9), %r11d
	cmpl	%r11d, 8(%rsi,%r10)
	cmovge	%edi, %eax
	jmp	.L3
	.cfi_endproc
.LFE56:
	.size	min_heapify.constprop.0, .-min_heapify.constprop.0
	.p2align 4
	.globl	deq
	.type	deq, @function
deq:
.LFB52:
	.cfi_startproc
	endbr64
	movl	qsize(%rip), %edx
	movl	$-1, %eax
	testl	%edx, %edx
	jne	.L14
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	movq	que(%rip), %rax
	movq	%rax, (%rdi)
	movl	8+que(%rip), %eax
	movl	%eax, 8(%rdi)
	movl	qsize(%rip), %eax
	subl	$1, %eax
	movl	%eax, qsize(%rip)
	cltq
	leaq	(%rax,%rax,2), %rdx
	leaq	que(%rip), %rax
	leaq	(%rax,%rdx,4), %rax
	movq	(%rax), %rdx
	movq	%rdx, que(%rip)
	movl	8(%rax), %eax
	movl	%eax, 8+que(%rip)
	call	min_heapify.constprop.0
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE52:
	.size	deq, .-deq
	.p2align 4
	.globl	enq
	.type	enq, @function
enq:
.LFB53:
	.cfi_startproc
	endbr64
	movl	qsize(%rip), %ecx
	leaq	que(%rip), %rsi
	leal	1(%rcx), %eax
	movl	%eax, qsize(%rip)
	movslq	%ecx, %rax
	movq	(%rdi), %rdx
	leaq	(%rax,%rax,2), %rax
	leaq	(%rsi,%rax,4), %rax
	movq	%rdx, (%rax)
	movl	8(%rdi), %edx
	movl	%edx, 8(%rax)
	testl	%ecx, %ecx
	jg	.L16
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L18:
	movq	(%rdx), %r9
	movq	(%rax), %r8
	movl	8(%rax), %edi
	movq	%r9, (%rax)
	movl	8(%rdx), %r9d
	movl	%r9d, 8(%rax)
	movq	%r8, (%rdx)
	movl	%edi, 8(%rdx)
	testl	%ecx, %ecx
	je	.L15
.L16:
	movslq	%ecx, %rax
	sarl	%ecx
	movslq	%ecx, %rdx
	leaq	(%rax,%rax,2), %rax
	leaq	(%rdx,%rdx,2), %rdx
	leaq	(%rsi,%rax,4), %rax
	leaq	(%rsi,%rdx,4), %rdx
	movl	8(%rax), %edi
	cmpl	%edi, 8(%rdx)
	jg	.L18
.L15:
	ret
.L23:
	ret
	.cfi_endproc
.LFE53:
	.size	enq, .-enq
	.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:
.LFB54:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	d(%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
	leaq	w(%rip), %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L40:
	movq	8(%rsp), %rdx
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r10d
	testl	%r10d, %r10d
	je	.L62
	movl	24(%rsp), %r9d
	xorl	%eax, %eax
	movl	$51, %ecx
	movq	%rbx, %rdi
	rep stosq
	testl	%r9d, %r9d
	jle	.L63
	xorl	%r14d, %r14d
	leaq	36(%rsp), %r13
	leaq	32(%rsp), %r12
	leaq	28(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%r13, %rcx
	movq	%r12, %rdx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rdx
	movd	36(%rsp), %xmm2
	movd	32(%rsp), %xmm0
	movslq	(%rbx,%rdx,4), %rax
	punpckldq	%xmm2, %xmm0
	leal	1(%rax), %ecx
	movl	%ecx, (%rbx,%rdx,4)
	imulq	$102, %rdx, %rdx
	addq	%rdx, %rax
	movq	%xmm0, (%r15,%rax,8)
	movslq	32(%rsp), %rax
	movd	28(%rsp), %xmm0
	movslq	(%rbx,%rax,4), %rdx
	punpckldq	%xmm2, %xmm0
	leal	1(%rdx), %ecx
	movl	%ecx, (%rbx,%rax,4)
	imulq	$102, %rax, %rax
	addq	%rax, %rdx
	movq	%xmm0, (%r15,%rdx,8)
	cmpl	%r14d, 24(%rsp)
	jg	.L26
	leaq	visited(%rip), %r14
	movl	(%rbx), %r8d
	xorl	%eax, %eax
	xorl	%r10d, %r10d
	movl	$50, %ecx
	movq	%r14, %rdi
	movl	$0, qsize(%rip)
	leaq	4+d(%rip), %rbp
	rep stosq
	leaq	40(%rsp), %r11
	movl	$1, visited(%rip)
	testl	%r8d, %r8d
	jle	.L27
	.p2align 4,,10
	.p2align 3
.L28:
	movl	(%r15,%r10,8), %eax
	movq	%r11, %rdi
	movl	$0, 40(%rsp)
	movl	%eax, 44(%rsp)
	movl	0(%rbp,%r10,8), %eax
	addq	$1, %r10
	movl	%eax, 48(%rsp)
	call	enq
	cmpl	%r10d, (%rbx)
	jg	.L28
.L27:
	cmpl	$1, n(%rip)
	movl	$2, (%rsp)
	leaq	que(%rip), %r13
	leaq	40(%rsp), %r12
	movl	$0, 4(%rsp)
	jle	.L30
	.p2align 4,,10
	.p2align 3
.L34:
	movl	qsize(%rip), %ebp
	testl	%ebp, %ebp
	je	.L31
	movq	0(%r13), %rax
	movq	%rax, 40(%rsp)
	movl	8+que(%rip), %eax
	movl	%eax, 48(%rsp)
	leal	-1(%rbp), %eax
	movl	%eax, qsize(%rip)
	cltq
	leaq	(%rax,%rax,2), %rax
	leaq	0(%r13,%rax,4), %rax
	movq	(%rax), %rdx
	movq	%rdx, 0(%r13)
	movl	8(%rax), %eax
	movl	%eax, 8+que(%rip)
	call	min_heapify.constprop.0
.L31:
	movslq	40(%rsp), %rax
	movl	(%r14,%rax,4), %edi
	movq	%rax, %rdx
	testl	%edi, %edi
	je	.L32
	movslq	44(%rsp), %rax
	movl	(%r14,%rax,4), %esi
	movq	%rax, %rdx
	testl	%esi, %esi
	je	.L32
	testl	%ebp, %ebp
	jne	.L34
.L35:
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L32:
	movl	(%rbx,%rax,4), %edi
	movl	48(%rsp), %esi
	movl	%edx, 28(%rsp)
	xorl	%r11d, %r11d
	addl	%esi, 4(%rsp)
	movl	(%rsp), %r10d
	movl	$1, (%r14,%rax,4)
	testl	%edi, %edi
	jle	.L39
	.p2align 4,,10
	.p2align 3
.L36:
	imulq	$102, %rax, %rsi
	movslq	%r11d, %rcx
	movd	%edx, %xmm0
	addq	%rcx, %rsi
	movslq	(%r15,%rsi,8), %rcx
	movd	%ecx, %xmm1
	movl	%ecx, 32(%rsp)
	movl	(%r14,%rcx,4), %ecx
	punpckldq	%xmm1, %xmm0
	testl	%ecx, %ecx
	je	.L64
	addl	$1, %r11d
	cmpl	%edi, %r11d
	jl	.L36
.L39:
	addl	$1, (%rsp)
	cmpl	%r10d, n(%rip)
	jg	.L34
.L30:
	movl	4(%rsp), %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L64:
	movl	4(%r15,%rsi,8), %eax
	movq	%r12, %rdi
	movq	%xmm0, 40(%rsp)
	addl	$1, %r11d
	movl	%eax, 48(%rsp)
	call	enq
	movslq	28(%rsp), %rax
	movl	(%rbx,%rax,4), %edi
	movq	%rax, %rdx
	cmpl	%edi, %r11d
	jl	.L36
	addl	$1, (%rsp)
	cmpl	%r10d, n(%rip)
	jg	.L34
	jmp	.L30
.L62:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L65
	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
.L63:
	.cfi_restore_state
	leaq	visited(%rip), %r14
	movl	$50, %ecx
	movl	$0, qsize(%rip)
	movq	%r14, %rdi
	rep stosq
	movl	$1, visited(%rip)
	jmp	.L27
.L65:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE54:
	.size	main, .-main
	.globl	que
	.bss
	.align 32
	.type	que, @object
	.size	que, 6012
que:
	.zero	6012
	.globl	qsize
	.align 4
	.type	qsize, @object
	.size	qsize, 4
qsize:
	.zero	4
	.globl	visited
	.align 32
	.type	visited, @object
	.size	visited, 400
visited:
	.zero	400
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 408
w:
	.zero	408
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 83232
d:
	.zero	83232
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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:

// Aizu Vol-1 0180: Demolition of Bridges
// 2017.8.9

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

#define INF 0x77777777
#define MAX 100
#define EMAX 500
int n;
typedef struct { int b, c; } ND;
ND d[MAX + 2][MAX + 2];
int w[MAX + 2];
int visited[MAX];

int qsize;
typedef struct { int a, b, c; } QUE;
QUE que[EMAX + 1];

#define PARENT(i) ((i)/2)
#define LEFT(i)   ((i)<<1)
#define RIGHT(i)  (((i)<<1)+1)

static void min_heapify(int i)
{
	int l, r, smallest;

	l = LEFT(i), r = RIGHT(i);
	if (l < qsize && que[l].c < que[i].c) smallest = l; else smallest = i;
	if (r < qsize && que[r].c < que[smallest].c) smallest = r;
	if (smallest != i) {
		QUE t;
		memcpy(&t, que + i, sizeof(QUE)), memcpy(que + i, que + smallest, sizeof(QUE));
		memcpy(que + smallest, &t, sizeof(QUE));
		min_heapify(smallest);
	}
}

int deq(QUE *q)
{
	if (qsize == 0) return -1;
	memcpy(q, &que[0], sizeof(QUE));
	memcpy(que, que + --qsize, sizeof(QUE));
	min_heapify(0);
	return 1;
}

void enq(QUE *q)
{
	int i;

	i = qsize++;
	memcpy(que + i, q, sizeof(QUE));
	while (i > 0 && que[PARENT(i)].c > que[i].c) {
		QUE t;
		memcpy(&t, que + i, sizeof(QUE)), memcpy(que + i, que + PARENT(i), sizeof(QUE));
		memcpy(que + PARENT(i), &t, sizeof(QUE));
		i = PARENT(i);
	}
}


int main()
{
	int m, a, b, c;
	int i, k, ans;
	QUE q;

	while (1) {
		scanf("%d%d", &n, &m); if (!n) return 0;
		memset(w, 0, sizeof(w));
		for (i = 0; i < m; i++) {
			scanf("%d%d%d", &a, &b, &c);
			d[a][w[a]].b = b, d[a][w[a]++].c = c;
			d[b][w[b]].b = a, d[b][w[b]++].c = c;
		}
		memset(visited, 0, sizeof(visited));
		ans = 0, visited[0] = 1, k = 1, qsize = 0;
		for (i = 0; i < w[0]; i++) q.a = 0, q.b = d[0][i].b, q.c = d[0][i].c, enq(&q);
		while (k < n) {
			do deq(&q);
			while (visited[q.a] && visited[q.b]);
			k++;
			a = visited[q.a] ? q.b : q.a;
			visited[a] = 1, ans += q.c;
			for (i = 0; i < w[a]; i++) {
				b = d[a][i].b;
				if (!visited[b]) q.a = a, q.b = b, q.c = d[a][i].c, enq(&q);
			}

		}
		printf("%d\n", ans);
	}
	return 0;
}
5 6
0 2 1
2 1 3
2 3 8
1 3 1
3 4 5
1 4 4
3 3
1 2 3
2 0 3
0 1 3
0 0
 5 6
0 2 1
2 1 3
2 3 8
1 3 3
3 4 5
1 4 4
3 3
1 2 3
2 0 3
0 1 3
0 0
 5 6
0 2 1
2 1 3
2 3 8
1 3 0
3 4 5
1 4 4
3 3
1 2 3
2 0 3
0 1 3
0 0
 5 6
0 2 1
2 1 3
2 3 6
0 3 1
3 4 8
1 3 4
3 3
1 2 3
2 0 3
0 1 3
0 0
 5 6
0 2 1
2 1 3
2 3 8
1 3 2
3 4 5
1 4 4
3 3
1 2 3
2 0 4
0 1 3
0 0
 5 6
0 2 1
2 1 3
2 3 8
1 3 1
3 4 2
1 4 4
3 3
1 2 3
2 0 3
0 1 3
0 0
 5 6
0 2 1
2 1 3
2 3 6
0 3 1
3 4 8
1 3 4
3 3
1 2 3
2 0 3
0 1 1
0 0
 5 6
0 1 1
2 1 3
2 3 8
1 3 2
3 4 5
1 4 5
3 3
1 2 2
2 0 4
0 1 3
0 0
 5 6
0 2 1
2 1 3
2 3 6
0 3 1
3 4 8
1 3 4
3 3
1 2 3
2 0 3
0 1 0
0 0
 5 6
0 2 1
2 1 3
2 3 6
0 3 2
3 4 8
1 3 4
3 3
1 2 3
2 0 3
0 1 1
0 0

9
6
 11
6
 8
6
 13
6
 10
6
 7
6
 13
4
 11
5
 13
3
 14
4

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

```c
// Aizu Vol-1 0180: Demolition of Bridges
// 2017.8.9

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

#define INF 0x77777777
#define MAX 100
#define EMAX 500
int n;
typedef struct { int b, c; } ND;
ND d[MAX + 2][MAX + 2];
int w[MAX + 2];
int visited[MAX];

int qsize;
typedef struct { int a, b, c; } QUE;
QUE que[EMAX + 1];

#define PARENT(i) ((i)/2)
#define LEFT(i)   ((i)<<1)
#define RIGHT(i)  (((i)<<1)+1)

static void min_heapify(int i)
{
	int l, r, smallest;

	l = LEFT(i), r = RIGHT(i);
	if (l < qsize && que[l].c < que[i].c) smallest = l; else smallest = i;
	if (r < qsize && que[r].c < que[smallest].c) smallest = r;
	if (smallest != i) {
		QUE t;
		memcpy(&t, que + i, sizeof(QUE)), memcpy(que + i, que + smallest, sizeof(QUE));
		memcpy(que + smallest, &t, sizeof(QUE));
		min_heapify(smallest);
	}
}

int deq(QUE *q)
{
	if (qsize == 0) return -1;
	memcpy(q, &que[0], sizeof(QUE));
	memcpy(que, que + --qsize, sizeof(QUE));
	min_heapify(0);
	return 1;
}

void enq(QUE *q)
{
	int i;

	i = qsize++;
	memcpy(que + i, q, sizeof(QUE));
	while (i > 0 && que[PARENT(i)].c > que[i].c) {
		QUE t;
		memcpy(&t, que + i, sizeof(QUE)), memcpy(que + i, que + PARENT(i), sizeof(QUE));
		memcpy(que + PARENT(i), &t, sizeof(QUE));
		i = PARENT(i);
	}
}


int main()
{
	int m, a, b, c;
	int i, k, ans;
	QUE q;

	while (1) {
		scanf("%d%d", &n, &m); if (!n) return 0;
		memset(w, 0, sizeof(w));
		for (i = 0; i < m; i++) {
			scanf("%d%d%d", &a, &b, &c);
			d[a][w[a]].b = b, d[a][w[a]++].c = c;
			d[b][w[b]].b = a, d[b][w[b]++].c = c;
		}
		memset(visited, 0, sizeof(visited));
		ans = 0, visited[0] = 1, k = 1, qsize = 0;
		for (i = 0; i < w[0]; i++) q.a = 0, q.b = d[0][i].b, q.c = d[0][i].c, enq(&q);
		while (k < n) {
			do deq(&q);
			while (visited[q.a] && visited[q.b]);
			k++;
			a = visited[q.a] ? q.b : q.a;
			visited[a] = 1, ans += q.c;
			for (i = 0; i < w[a]; i++) {
				b = d[a][i].b;
				if (!visited[b]) q.a = a, q.b = b, q.c = d[a][i].c, enq(&q);
			}

		}
		printf("%d\n", ans);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 83232
d:
	.zero	83232
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 408
w:
	.zero	408
	.globl	visited
	.align 32
	.type	visited, @object
	.size	visited, 400
visited:
	.zero	400
	.globl	qsize
	.align 4
	.type	qsize, @object
	.size	qsize, 4
qsize:
	.zero	4
	.globl	que
	.align 32
	.type	que, @object
	.size	que, 6012
que:
	.zero	6012
	.text
	.type	min_heapify, @function
min_heapify:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -36(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	-36(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -28(%rbp)
	movl	-36(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movl	%eax, -24(%rbp)
	movl	qsize(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L2
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+que(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+que(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jge	.L2
	movl	-28(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L3
.L2:
	movl	-36(%rbp), %eax
	movl	%eax, -32(%rbp)
.L3:
	movl	qsize(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L4
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+que(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+que(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jge	.L4
	movl	-24(%rbp), %eax
	movl	%eax, -32(%rbp)
.L4:
	movl	-32(%rbp), %eax
	cmpl	-36(%rbp), %eax
	je	.L7
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-20(%rbp), %rax
	movl	$12, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	addq	%rdx, %rax
	movl	$12, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-20(%rbp), %rax
	movl	$12, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcpy@PLT
	movl	-32(%rbp), %eax
	movl	%eax, %edi
	call	min_heapify
.L7:
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	min_heapify, .-min_heapify
	.globl	deq
	.type	deq, @function
deq:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	qsize(%rip), %eax
	testl	%eax, %eax
	jne	.L9
	movl	$-1, %eax
	jmp	.L10
.L9:
	movq	-8(%rbp), %rax
	movl	$12, %edx
	leaq	que(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	qsize(%rip), %eax
	subl	$1, %eax
	movl	%eax, qsize(%rip)
	movl	qsize(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	addq	%rdx, %rax
	movl	$12, %edx
	movq	%rax, %rsi
	leaq	que(%rip), %rax
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	$0, %edi
	call	min_heapify
	movl	$1, %eax
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	deq, .-deq
	.globl	enq
	.type	enq, @function
enq:
.LFB8:
	.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
	movq	%rdi, -40(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	qsize(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, qsize(%rip)
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-40(%rbp), %rax
	movl	$12, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcpy@PLT
	jmp	.L12
.L14:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-20(%rbp), %rax
	movl	$12, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	-24(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	addq	%rdx, %rax
	movl	$12, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	-24(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-20(%rbp), %rax
	movl	$12, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcpy@PLT
	movl	-24(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -24(%rbp)
.L12:
	cmpl	$0, -24(%rbp)
	jle	.L16
	movl	-24(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+que(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+que(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jg	.L14
.L16:
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	enq, .-enq
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L32:
	leaq	-48(%rbp), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jne	.L18
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	jmp	.L34
.L18:
	movl	$408, %edx
	movl	$0, %esi
	leaq	w(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -32(%rbp)
	jmp	.L20
.L21:
	leaq	-36(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %edx
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	w(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movl	-40(%rbp), %eax
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	$102, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	d(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-44(%rbp), %esi
	movl	-44(%rbp), %edx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	w(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rdi
	leaq	w(%rip), %rdx
	movl	%ecx, (%rdi,%rdx)
	movl	-36(%rbp), %edx
	movslq	%eax, %rcx
	movslq	%esi, %rax
	imulq	$102, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	4+d(%rip), %rax
	movl	%edx, (%rcx,%rax)
	movl	-40(%rbp), %edx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	w(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movl	-44(%rbp), %eax
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	$102, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	d(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-40(%rbp), %esi
	movl	-40(%rbp), %edx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	w(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rdi
	leaq	w(%rip), %rdx
	movl	%ecx, (%rdi,%rdx)
	movl	-36(%rbp), %edx
	movslq	%eax, %rcx
	movslq	%esi, %rax
	imulq	$102, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	4+d(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addl	$1, -32(%rbp)
.L20:
	movl	-48(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L21
	movl	$400, %edx
	movl	$0, %esi
	leaq	visited(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -24(%rbp)
	movl	$1, visited(%rip)
	movl	$1, -28(%rbp)
	movl	$0, qsize(%rip)
	movl	$0, -32(%rbp)
	jmp	.L22
.L23:
	movl	$0, -20(%rbp)
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
	leaq	-20(%rbp), %rax
	movq	%rax, %rdi
	call	enq
	addl	$1, -32(%rbp)
.L22:
	movl	w(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L23
	jmp	.L24
.L26:
	leaq	-20(%rbp), %rax
	movq	%rax, %rdi
	call	deq
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L25
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L26
.L25:
	addl	$1, -28(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L27
	movl	-16(%rbp), %eax
	jmp	.L28
.L27:
	movl	-20(%rbp), %eax
.L28:
	movl	%eax, -44(%rbp)
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-12(%rbp), %eax
	addl	%eax, -24(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L29
.L31:
	movl	-44(%rbp), %eax
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -40(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L30
	movl	-44(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-44(%rbp), %eax
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	4+d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
	leaq	-20(%rbp), %rax
	movq	%rax, %rdi
	call	enq
.L30:
	addl	$1, -32(%rbp)
.L29:
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L31
.L24:
	movl	n(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L26
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L32
.L34:
	call	__stack_chk_fail@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 83232
d:
	.zero	83232
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 408
w:
	.zero	408
	.globl	visited
	.align 32
	.type	visited, @object
	.size	visited, 400
visited:
	.zero	400
	.globl	qsize
	.align 4
	.type	qsize, @object
	.size	qsize, 4
qsize:
	.zero	4
	.globl	que
	.align 32
	.type	que, @object
	.size	que, 6012
que:
	.zero	6012
	.text
	.type	min_heapify, @function
min_heapify:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -36(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	-36(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -28(%rbp)
	movl	-36(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movl	%eax, -24(%rbp)
	movl	qsize(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L2
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+que(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+que(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jge	.L2
	movl	-28(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L3
.L2:
	movl	-36(%rbp), %eax
	movl	%eax, -32(%rbp)
.L3:
	movl	qsize(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L4
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+que(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+que(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jge	.L4
	movl	-24(%rbp), %eax
	movl	%eax, -32(%rbp)
.L4:
	movl	-32(%rbp), %eax
	cmpl	-36(%rbp), %eax
	je	.L7
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-20(%rbp), %rax
	movl	$12, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	addq	%rdx, %rax
	movl	$12, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-20(%rbp), %rax
	movl	$12, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcpy@PLT
	movl	-32(%rbp), %eax
	movl	%eax, %edi
	call	min_heapify
.L7:
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	min_heapify, .-min_heapify
	.globl	deq
	.type	deq, @function
deq:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	qsize(%rip), %eax
	testl	%eax, %eax
	jne	.L9
	movl	$-1, %eax
	jmp	.L10
.L9:
	movq	-8(%rbp), %rax
	movl	$12, %edx
	leaq	que(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	qsize(%rip), %eax
	subl	$1, %eax
	movl	%eax, qsize(%rip)
	movl	qsize(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	addq	%rdx, %rax
	movl	$12, %edx
	movq	%rax, %rsi
	leaq	que(%rip), %rax
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	$0, %edi
	call	min_heapify
	movl	$1, %eax
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	deq, .-deq
	.globl	enq
	.type	enq, @function
enq:
.LFB8:
	.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
	movq	%rdi, -40(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	qsize(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, qsize(%rip)
	movl	%eax, -24(%rbp)
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movq	-40(%rbp), %rax
	movl	$12, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcpy@PLT
	jmp	.L12
.L14:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-20(%rbp), %rax
	movl	$12, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	-24(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	addq	%rdx, %rax
	movl	$12, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	-24(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	que(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-20(%rbp), %rax
	movl	$12, %edx
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcpy@PLT
	movl	-24(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -24(%rbp)
.L12:
	cmpl	$0, -24(%rbp)
	jle	.L16
	movl	-24(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+que(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+que(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jg	.L14
.L16:
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	enq, .-enq
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L32:
	leaq	-48(%rbp), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jne	.L18
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	jmp	.L34
.L18:
	movl	$408, %edx
	movl	$0, %esi
	leaq	w(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -32(%rbp)
	jmp	.L20
.L21:
	leaq	-36(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %edx
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	w(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movl	-40(%rbp), %eax
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	$102, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	d(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-44(%rbp), %esi
	movl	-44(%rbp), %edx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	w(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rdi
	leaq	w(%rip), %rdx
	movl	%ecx, (%rdi,%rdx)
	movl	-36(%rbp), %edx
	movslq	%eax, %rcx
	movslq	%esi, %rax
	imulq	$102, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	4+d(%rip), %rax
	movl	%edx, (%rcx,%rax)
	movl	-40(%rbp), %edx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	w(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movl	-44(%rbp), %eax
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	$102, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	d(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-40(%rbp), %esi
	movl	-40(%rbp), %edx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	w(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %ecx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rdi
	leaq	w(%rip), %rdx
	movl	%ecx, (%rdi,%rdx)
	movl	-36(%rbp), %edx
	movslq	%eax, %rcx
	movslq	%esi, %rax
	imulq	$102, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	4+d(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addl	$1, -32(%rbp)
.L20:
	movl	-48(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L21
	movl	$400, %edx
	movl	$0, %esi
	leaq	visited(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -24(%rbp)
	movl	$1, visited(%rip)
	movl	$1, -28(%rbp)
	movl	$0, qsize(%rip)
	movl	$0, -32(%rbp)
	jmp	.L22
.L23:
	movl	$0, -20(%rbp)
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
	leaq	-20(%rbp), %rax
	movq	%rax, %rdi
	call	enq
	addl	$1, -32(%rbp)
.L22:
	movl	w(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L23
	jmp	.L24
.L26:
	leaq	-20(%rbp), %rax
	movq	%rax, %rdi
	call	deq
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L25
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L26
.L25:
	addl	$1, -28(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L27
	movl	-16(%rbp), %eax
	jmp	.L28
.L27:
	movl	-20(%rbp), %eax
.L28:
	movl	%eax, -44(%rbp)
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-12(%rbp), %eax
	addl	%eax, -24(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L29
.L31:
	movl	-44(%rbp), %eax
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -40(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L30
	movl	-44(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-44(%rbp), %eax
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$102, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	4+d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
	leaq	-20(%rbp), %rax
	movq	%rax, %rdi
	call	enq
.L30:
	addl	$1, -32(%rbp)
.L29:
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L31
.L24:
	movl	n(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L26
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L32
.L34:
	call	__stack_chk_fail@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
