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

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

typedef struct {
	int from, to;
	double weight;
} Edge;

typedef struct {
	double x, y, z, r;
} Coord;

Coord coord[ 100 ];
int node[ 100 ];
Edge edge[ 4950 ];

int compare( const void *a, const void *b ) {
	double at = (*(Edge *)a).weight, bt = (*(Edge *)b).weight;

	if ( at < bt )
		return -1;
	if ( at > bt )
		return 1;
	return 0;
}

int find( int x ) {
	if ( node[ x ] == x )
		return x;
	else
		return node[ x ] = find( node[ x ] );
}

void unite( int x, int y ) {
	node[ find( y ) ] = find( x );
}

double kruskal( int v, int e ) {
	int i;
	double sum;

	qsort( edge, e, sizeof(Edge), &compare );

	for ( i = 0; i < v; i++ )
		node[ i ] = i;

	sum = 0.0;
	for ( i = 0; i < e; i++ )
		if ( find( edge[ i ].from ) != find( edge[ i ].to ) ) {
			unite( edge[ i ].from, edge[ i ].to );
			sum += edge[ i ].weight;
		}

	return sum;
}

int main( void ) {
	int i, j;
	int n, cnt;

	while ( scanf( "%d", &n ), n ) {
		for ( i = 0; i < n; i++ )
			scanf( "%lf %lf %lf %lf", &coord[ i ].x, &coord[ i ].y, &coord[ i ].z, &coord[ i ].r );

		cnt = 0;
		for ( i = 0; i < n; i++ )
			for ( j = i + 1; j < n; j++ ) {
				edge[ cnt ].from = i;
				edge[ cnt ].to = j;
				edge[ cnt ].weight = fmax( sqrt( ( coord[ i ].x - coord[ j ].x ) * ( coord[ i ].x - coord[ j ].x ) + ( coord[ i ].y - coord[ j ].y ) * ( coord[ i ].y - coord[ j ].y ) + ( coord[ i ].z - coord[ j ].z ) * ( coord[ i ].z - coord[ j ].z ) ) - coord[ i ].r - coord[ j ].r, 0.0 );
				cnt++;
			}

		printf( "%.3f\n", kruskal( n, n * ( n - 1 ) / 2 ) );
	}

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	coord
	.bss
	.align 32
	.type	coord, @object
	.size	coord, 3200
coord:
	.zero	3200
	.globl	node
	.align 32
	.type	node, @object
	.size	node, 400
node:
	.zero	400
	.globl	edge
	.align 32
	.type	edge, @object
	.size	edge, 79200
edge:
	.zero	79200
	.text
	.globl	compare
	.type	compare, @function
compare:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movsd	8(%rax), %xmm0
	movsd	%xmm0, -16(%rbp)
	movq	-32(%rbp), %rax
	movsd	8(%rax), %xmm0
	movsd	%xmm0, -8(%rbp)
	movsd	-8(%rbp), %xmm0
	comisd	-16(%rbp), %xmm0
	jbe	.L9
	movl	$-1, %eax
	jmp	.L4
.L9:
	movsd	-16(%rbp), %xmm0
	comisd	-8(%rbp), %xmm0
	jbe	.L10
	movl	$1, %eax
	jmp	.L4
.L10:
	movl	$0, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.globl	find
	.type	find, @function
find:
.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
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	node(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jne	.L12
	movl	-4(%rbp), %eax
	jmp	.L13
.L12:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	node(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	find
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	node(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	node(%rip), %rax
	movl	(%rdx,%rax), %eax
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	find, .-find
	.globl	unite
	.type	unite, @function
unite:
.LFB8:
	.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	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	find
	movl	%eax, %ebx
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	find
	movslq	%ebx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	node(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	nop
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	unite, .-unite
	.globl	kruskal
	.type	kruskal, @function
kruskal:
.LFB9:
	.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	$40, %rsp
	.cfi_offset 3, -24
	movl	%edi, -36(%rbp)
	movl	%esi, -40(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	compare(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rsi
	leaq	edge(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -28(%rbp)
	jmp	.L16
.L17:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	node(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L16:
	movl	-28(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L17
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -24(%rbp)
	movl	$0, -28(%rbp)
	jmp	.L18
.L20:
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	edge(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	find
	movl	%eax, %ebx
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+edge(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	find
	cmpl	%eax, %ebx
	je	.L19
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+edge(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	edge(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	unite
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+edge(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movsd	-24(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -24(%rbp)
.L19:
	addl	$1, -28(%rbp)
.L18:
	movl	-28(%rbp), %eax
	cmpl	-40(%rbp), %eax
	jl	.L20
	movsd	-24(%rbp), %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	kruskal, .-kruskal
	.section	.rodata
.LC1:
	.string	"%lf %lf %lf %lf"
.LC2:
	.string	"%.3f\n"
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L23
.L30:
	movl	$0, -20(%rbp)
	jmp	.L24
.L25:
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	leaq	16(%rax), %rdx
	leaq	coord(%rip), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rsi
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	leaq	16(%rax), %rdx
	leaq	coord(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdi
	leaq	coord(%rip), %rax
	addq	%rdi, %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L24:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L25
	movl	$0, -12(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L26
.L29:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L27
.L28:
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	edge(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	4+edge(%rip), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm2
	movapd	%xmm0, %xmm1
	subsd	%xmm2, %xmm1
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm2
	subsd	%xmm2, %xmm0
	mulsd	%xmm0, %xmm1
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	8+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	8+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm3
	movapd	%xmm0, %xmm2
	subsd	%xmm3, %xmm2
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	8+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	8+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm3
	subsd	%xmm3, %xmm0
	mulsd	%xmm2, %xmm0
	addsd	%xmm0, %xmm1
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	16+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	16+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm3
	movapd	%xmm0, %xmm2
	subsd	%xmm3, %xmm2
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	16+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	16+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm3
	subsd	%xmm3, %xmm0
	mulsd	%xmm2, %xmm0
	addsd	%xmm0, %xmm1
	movq	%xmm1, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$5, %rcx
	leaq	24+coord(%rip), %rdx
	movsd	(%rcx,%rdx), %xmm1
	movq	%rax, %xmm0
	subsd	%xmm1, %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	24+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm1
	subsd	%xmm1, %xmm0
	movq	%xmm0, %rax
	pxor	%xmm1, %xmm1
	movq	%rax, %xmm0
	call	fmax@PLT
	movq	%xmm0, %rax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	8+edge(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
	addl	$1, -16(%rbp)
.L27:
	movl	-24(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L28
	addl	$1, -20(%rbp)
.L26:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L29
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	kruskal
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
.L23:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L30
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compare
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movsd	8(%rdi), %xmm1
	movsd	8(%rsi), %xmm0
	movl	$-1, %eax
	comisd	%xmm1, %xmm0
	ja	.L1
	xorl	%eax, %eax
	comisd	%xmm0, %xmm1
	seta	%al
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.p2align 4
	.globl	find
	.type	find, @function
find:
.LFB40:
	.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
	movslq	%edi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	node(%rip), %rbx
	movq	%rbp, %rax
	movl	(%rbx,%rbp,4), %edx
	cmpl	%ebp, %edx
	jne	.L12
	popq	%rbx
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	movslq	%edx, %r12
	movl	(%rbx,%r12,4), %eax
	cmpl	%eax, %edx
	je	.L7
	movslq	%eax, %r13
	movl	(%rbx,%r13,4), %edx
	cmpl	%edx, %eax
	jne	.L13
.L8:
	movl	%edx, (%rbx,%r12,4)
	movl	%edx, %eax
.L7:
	movl	%eax, (%rbx,%rbp,4)
	popq	%rbx
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	movslq	%edx, %r14
	movl	(%rbx,%r14,4), %edi
	cmpl	%edi, %edx
	je	.L9
	call	find
	movl	%eax, (%rbx,%r14,4)
	movl	%eax, %edi
.L9:
	movl	%edi, (%rbx,%r13,4)
	movl	%edi, %edx
	jmp	.L8
	.cfi_endproc
.LFE40:
	.size	find, .-find
	.p2align 4
	.globl	unite
	.type	unite, @function
unite:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	node(%rip), %rcx
	movslq	%esi, %r10
	movl	%edi, %r9d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	movslq	(%rcx,%r10,4), %r8
	cmpl	%r8d, %esi
	jne	.L32
	movslq	%r9d, %rsi
	movl	(%rcx,%rsi,4), %eax
	cmpl	%eax, %r9d
	jne	.L33
.L23:
	movl	%eax, (%rcx,%r8,4)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	movslq	%r8d, %rsi
	movl	(%rcx,%rsi,4), %eax
	cmpl	%eax, %r8d
	je	.L16
	movslq	%eax, %r8
	movl	(%rcx,%r8,4), %edx
	cmpl	%edx, %eax
	jne	.L34
.L17:
	movl	%edx, (%rcx,%rsi,4)
	movl	%edx, %eax
.L16:
	movslq	%r9d, %rsi
	movl	%eax, (%rcx,%r10,4)
	movslq	%eax, %r8
	movl	(%rcx,%rsi,4), %eax
	cmpl	%eax, %r9d
	je	.L23
.L33:
	movslq	%eax, %r9
	movl	(%rcx,%r9,4), %edx
	cmpl	%edx, %eax
	je	.L24
	movslq	%edx, %r10
	movl	(%rcx,%r10,4), %eax
	cmpl	%eax, %edx
	jne	.L35
.L25:
	movl	%eax, (%rcx,%r9,4)
	movl	%eax, %edx
.L24:
	movl	%edx, %eax
	movl	%edx, (%rcx,%rsi,4)
	movl	%eax, (%rcx,%r8,4)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore_state
	movslq	%eax, %r11
	movl	(%rcx,%r11,4), %edx
	cmpl	%edx, %eax
	je	.L26
	movslq	%edx, %rbx
	movl	(%rcx,%rbx,4), %eax
	cmpl	%eax, %edx
	jne	.L36
.L27:
	movl	%eax, (%rcx,%r11,4)
	movl	%eax, %edx
.L26:
	movl	%edx, (%rcx,%r10,4)
	movl	%edx, %eax
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L34:
	movslq	%edx, %r11
	movl	(%rcx,%r11,4), %eax
	cmpl	%eax, %edx
	je	.L18
	movslq	%eax, %rbx
	movl	(%rcx,%rbx,4), %edx
	cmpl	%edx, %eax
	jne	.L37
.L19:
	movl	%edx, (%rcx,%r11,4)
	movl	%edx, %eax
.L18:
	movl	%eax, (%rcx,%r8,4)
	movl	%eax, %edx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L37:
	movslq	%edx, %rbp
	movl	(%rcx,%rbp,4), %eax
	cmpl	%eax, %edx
	je	.L20
	movslq	%eax, %r12
	movl	(%rcx,%r12,4), %edx
	cmpl	%edx, %eax
	je	.L21
	movslq	%edx, %r13
	movl	(%rcx,%r13,4), %edi
	cmpl	%edi, %edx
	je	.L22
	call	find
	movl	%eax, (%rcx,%r13,4)
	movl	%eax, %edi
.L22:
	movl	%edi, (%rcx,%r12,4)
	movl	%edi, %edx
.L21:
	movl	%edx, (%rcx,%rbp,4)
	movl	%edx, %eax
.L20:
	movl	%eax, (%rcx,%rbx,4)
	movl	%eax, %edx
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L36:
	movslq	%eax, %rbp
	movl	(%rcx,%rbp,4), %edx
	cmpl	%edx, %eax
	je	.L28
	movslq	%edx, %r12
	movl	(%rcx,%r12,4), %edi
	cmpl	%edi, %edx
	je	.L29
	movslq	%edi, %r13
	movl	(%rcx,%r13,4), %eax
	cmpl	%eax, %edi
	je	.L30
	movl	%eax, %edi
	call	find
	movl	%eax, (%rcx,%r13,4)
.L30:
	movl	%eax, (%rcx,%r12,4)
	movl	%eax, %edi
.L29:
	movl	%edi, (%rcx,%rbp,4)
	movl	%edi, %edx
.L28:
	movl	%edx, (%rcx,%rbx,4)
	movl	%edx, %eax
	jmp	.L27
	.cfi_endproc
.LFE41:
	.size	unite, .-unite
	.p2align 4
	.globl	kruskal
	.type	kruskal, @function
kruskal:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%esi, %rsi
	movl	$16, %edx
	leaq	compare(%rip), %rcx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%edi, %ebx
	leaq	edge(%rip), %rdi
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	qsort@PLT
	testl	%ebx, %ebx
	jle	.L45
	leal	-1(%rbx), %eax
	cmpl	$2, %eax
	jbe	.L84
	movl	%ebx, %edx
	leaq	node(%rip), %rcx
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC2(%rip), %xmm2
	shrl	$2, %edx
	leaq	16(%rcx), %rsi
	movq	%rcx, %rax
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rsi, %rdx
	.p2align 4,,10
	.p2align 3
.L43:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rax, %rdx
	jne	.L43
	movl	%ebx, %eax
	andl	$-4, %eax
	testb	$3, %bl
	je	.L45
.L42:
	movslq	%eax, %rdx
	movl	%eax, (%rcx,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %ebx
	jle	.L45
	movslq	%edx, %rsi
	addl	$2, %eax
	movl	%edx, (%rcx,%rsi,4)
	cmpl	%eax, %ebx
	jle	.L45
	movslq	%eax, %rdx
	movl	%eax, (%rcx,%rdx,4)
.L45:
	pxor	%xmm0, %xmm0
	testl	%ebp, %ebp
	jle	.L38
	leaq	edge(%rip), %r8
	leal	-1(%rbp), %r11d
	pxor	%xmm0, %xmm0
	salq	$4, %r11
	leaq	16(%r8), %rax
	leaq	node(%rip), %rcx
	addq	%rax, %r11
	.p2align 4,,10
	.p2align 3
.L82:
	movslq	(%r8), %rsi
	movl	(%rcx,%rsi,4), %r9d
	cmpl	%r9d, %esi
	je	.L47
	movslq	%r9d, %r10
	movl	(%rcx,%r10,4), %eax
	cmpl	%eax, %r9d
	je	.L48
	movslq	%eax, %r9
	movl	(%rcx,%r9,4), %edx
	cmpl	%edx, %eax
	je	.L49
	movslq	%edx, %rbx
	movl	(%rcx,%rbx,4), %eax
	cmpl	%eax, %edx
	jne	.L89
.L50:
	movl	%eax, (%rcx,%r9,4)
	movl	%eax, %edx
.L49:
	movl	%edx, (%rcx,%r10,4)
	movl	%edx, %eax
.L48:
	movl	%eax, (%rcx,%rsi,4)
	movl	%eax, %r9d
.L47:
	movslq	4(%r8), %r10
	movslq	(%rcx,%r10,4), %rsi
	cmpl	%esi, %r10d
	je	.L56
	movslq	%esi, %rbx
	movl	(%rcx,%rbx,4), %eax
	cmpl	%eax, %esi
	je	.L57
	movslq	%eax, %rsi
	movl	(%rcx,%rsi,4), %edx
	cmpl	%edx, %eax
	je	.L58
	movslq	%edx, %rbp
	movl	(%rcx,%rbp,4), %eax
	cmpl	%eax, %edx
	jne	.L90
.L59:
	movl	%eax, (%rcx,%rsi,4)
	movl	%eax, %edx
.L58:
	movl	%edx, (%rcx,%rbx,4)
	movl	%edx, %eax
.L57:
	movl	%eax, (%rcx,%r10,4)
	cmpl	%eax, %r9d
	je	.L65
	movslq	4(%r8), %r10
	movl	(%r8), %r9d
	movl	(%rcx,%r10,4), %eax
	movq	%r10, %rsi
	cmpl	%eax, %r10d
	je	.L66
	movslq	%eax, %rbp
	movslq	(%rcx,%rbp,4), %rsi
	cmpl	%esi, %eax
	je	.L67
	movslq	%esi, %rbx
	movl	(%rcx,%rbx,4), %eax
	cmpl	%eax, %esi
	jne	.L91
.L68:
	movl	%eax, (%rcx,%rbp,4)
	movslq	%eax, %rsi
.L67:
	movl	%esi, (%rcx,%r10,4)
.L66:
	movslq	%r9d, %r10
	movl	(%rcx,%r10,4), %eax
	cmpl	%eax, %r9d
	je	.L74
	movslq	%eax, %r9
	movl	(%rcx,%r9,4), %edx
	cmpl	%edx, %eax
	je	.L75
	movslq	%edx, %rbx
	movl	(%rcx,%rbx,4), %eax
	cmpl	%eax, %edx
	jne	.L92
.L76:
	movl	%eax, (%rcx,%r9,4)
	movl	%eax, %edx
.L75:
	movl	%edx, (%rcx,%r10,4)
	movl	%edx, %eax
.L74:
	movl	%eax, (%rcx,%rsi,4)
	addsd	8(%r8), %xmm0
.L65:
	addq	$16, %r8
	cmpq	%r8, %r11
	jne	.L82
.L38:
	addq	$24, %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
.L56:
	.cfi_restore_state
	cmpl	%r9d, %esi
	je	.L65
	movl	(%r8), %r9d
	jmp	.L66
	.p2align 4,,10
	.p2align 3
.L92:
	movslq	%eax, %rbp
	movl	(%rcx,%rbp,4), %edx
	cmpl	%edx, %eax
	je	.L77
	movslq	%edx, %r12
	movl	(%rcx,%r12,4), %eax
	cmpl	%eax, %edx
	jne	.L93
.L78:
	movl	%eax, (%rcx,%rbp,4)
	movl	%eax, %edx
.L77:
	movl	%edx, (%rcx,%rbx,4)
	movl	%edx, %eax
	jmp	.L76
	.p2align 4,,10
	.p2align 3
.L91:
	movslq	%eax, %rsi
	movl	(%rcx,%rsi,4), %edx
	cmpl	%edx, %eax
	je	.L69
	movslq	%edx, %r12
	movl	(%rcx,%r12,4), %eax
	cmpl	%eax, %edx
	jne	.L94
.L70:
	movl	%eax, (%rcx,%rsi,4)
	movl	%eax, %edx
.L69:
	movl	%edx, (%rcx,%rbx,4)
	movl	%edx, %eax
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L90:
	movslq	%eax, %r12
	movl	(%rcx,%r12,4), %edx
	cmpl	%edx, %eax
	je	.L60
	movslq	%edx, %r13
	movl	(%rcx,%r13,4), %eax
	cmpl	%eax, %edx
	jne	.L95
.L61:
	movl	%eax, (%rcx,%r12,4)
	movl	%eax, %edx
.L60:
	movl	%edx, (%rcx,%rbp,4)
	movl	%edx, %eax
	jmp	.L59
	.p2align 4,,10
	.p2align 3
.L89:
	movslq	%eax, %rbp
	movl	(%rcx,%rbp,4), %edx
	cmpl	%edx, %eax
	je	.L51
	movslq	%edx, %r12
	movl	(%rcx,%r12,4), %eax
	cmpl	%eax, %edx
	jne	.L96
.L52:
	movl	%eax, (%rcx,%rbp,4)
	movl	%eax, %edx
.L51:
	movl	%edx, (%rcx,%rbx,4)
	movl	%edx, %eax
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L96:
	movslq	%eax, %r13
	movl	(%rcx,%r13,4), %edx
	cmpl	%edx, %eax
	je	.L53
	movslq	%edx, %r14
	movl	(%rcx,%r14,4), %eax
	cmpl	%eax, %edx
	jne	.L97
.L54:
	movl	%eax, (%rcx,%r13,4)
	movl	%eax, %edx
.L53:
	movl	%edx, (%rcx,%r12,4)
	movl	%edx, %eax
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L95:
	movslq	%eax, %r14
	movl	(%rcx,%r14,4), %edx
	cmpl	%edx, %eax
	je	.L62
	movslq	%edx, %r15
	movl	(%rcx,%r15,4), %eax
	cmpl	%eax, %edx
	jne	.L98
.L63:
	movl	%eax, (%rcx,%r14,4)
	movl	%eax, %edx
.L62:
	movl	%edx, (%rcx,%r13,4)
	movl	%edx, %eax
	jmp	.L61
	.p2align 4,,10
	.p2align 3
.L94:
	movslq	%eax, %r13
	movl	(%rcx,%r13,4), %edx
	cmpl	%edx, %eax
	je	.L71
	movslq	%edx, %r14
	movl	(%rcx,%r14,4), %eax
	cmpl	%eax, %edx
	jne	.L99
.L72:
	movl	%eax, (%rcx,%r13,4)
	movl	%eax, %edx
.L71:
	movl	%edx, (%rcx,%r12,4)
	movl	%edx, %eax
	jmp	.L70
	.p2align 4,,10
	.p2align 3
.L93:
	movslq	%eax, %r13
	movl	(%rcx,%r13,4), %edx
	cmpl	%edx, %eax
	je	.L79
	movslq	%edx, %r14
	movl	(%rcx,%r14,4), %eax
	cmpl	%eax, %edx
	jne	.L100
.L80:
	movl	%eax, (%rcx,%r13,4)
	movl	%eax, %edx
.L79:
	movl	%edx, (%rcx,%r12,4)
	movl	%edx, %eax
	jmp	.L78
.L84:
	xorl	%eax, %eax
	leaq	node(%rip), %rcx
	jmp	.L42
.L100:
	movslq	%eax, %r15
	movl	(%rcx,%r15,4), %edi
	cmpl	%edi, %eax
	je	.L81
	call	find
	movl	%eax, (%rcx,%r15,4)
	movl	%eax, %edi
.L81:
	movl	%edi, (%rcx,%r14,4)
	movl	%edi, %eax
	jmp	.L80
.L99:
	movslq	%eax, %r15
	movl	(%rcx,%r15,4), %edi
	cmpl	%edi, %eax
	je	.L73
	call	find
	movl	%eax, (%rcx,%r15,4)
	movl	%eax, %edi
.L73:
	movl	%edi, (%rcx,%r14,4)
	movl	%edi, %eax
	jmp	.L72
.L98:
	movslq	%eax, %rdx
	movl	(%rcx,%rdx,4), %edi
	movq	%rdx, 8(%rsp)
	cmpl	%edi, %eax
	je	.L64
	call	find
	movq	8(%rsp), %rdx
	movl	%eax, %edi
	movl	%eax, (%rcx,%rdx,4)
.L64:
	movl	%edi, (%rcx,%r15,4)
	movl	%edi, %eax
	jmp	.L63
.L97:
	movslq	%eax, %r15
	movl	(%rcx,%r15,4), %edi
	cmpl	%edi, %eax
	je	.L55
	call	find
	movl	%eax, (%rcx,%r15,4)
	movl	%eax, %edi
.L55:
	movl	%edi, (%rcx,%r14,4)
	movl	%edi, %eax
	jmp	.L54
	.cfi_endproc
.LFE42:
	.size	kruskal, .-kruskal
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%lf %lf %lf %lf"
.LC4:
	.string	"%.3f\n"
.LC5:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB43:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	68(%rsp), %rax
	movq	%rax, 56(%rsp)
	.p2align 4,,10
	.p2align 3
.L102:
	movq	56(%rsp), %rsi
	leaq	.LC5(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	68(%rsp), %ebp
	testl	%ebp, %ebp
	je	.L111
	leaq	coord(%rip), %rbx
	movl	$0, %r12d
	jle	.L124
	.p2align 4,,10
	.p2align 3
.L103:
	leaq	16(%rbx), %rcx
	leaq	8(%rbx), %rdx
	movq	%rbx, %rsi
	xorl	%eax, %eax
	leaq	24(%rbx), %r8
	leaq	.LC3(%rip), %rdi
	addl	$1, %r12d
	addq	$32, %rbx
	call	__isoc99_scanf@PLT
	movl	68(%rsp), %ebp
	pxor	%xmm1, %xmm1
	cmpl	%r12d, %ebp
	jg	.L103
	cmpl	$1, %ebp
	jle	.L124
	leal	-1(%rbp), %eax
	movl	$0, 36(%rsp)
	leaq	32+coord(%rip), %rbx
	xorl	%r13d, %r13d
	movl	%eax, 44(%rsp)
	movq	%rax, 48(%rsp)
	.p2align 4,,10
	.p2align 3
.L110:
	movslq	36(%rsp), %rdx
	movsd	-32(%rbx), %xmm5
	movl	%r13d, 40(%rsp)
	movq	%rbx, %r15
	movsd	-24(%rbx), %xmm6
	movsd	-16(%rbx), %xmm7
	movl	%r13d, 32(%rsp)
	leaq	edge(%rip), %rax
	salq	$4, %rdx
	leal	1(%r13), %r12d
	movsd	%xmm5, 8(%rsp)
	movsd	%xmm6, 16(%rsp)
	leaq	(%rax,%rdx), %r14
	movsd	%xmm7, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L109:
	movd	32(%rsp), %xmm0
	movd	%r12d, %xmm4
	movsd	16(%rsp), %xmm3
	subsd	8(%r15), %xmm3
	movsd	24(%rsp), %xmm2
	punpckldq	%xmm4, %xmm0
	subsd	16(%r15), %xmm2
	movq	%xmm0, (%r14)
	movsd	8(%rsp), %xmm0
	subsd	(%r15), %xmm0
	mulsd	%xmm3, %xmm3
	mulsd	%xmm2, %xmm2
	mulsd	%xmm0, %xmm0
	addsd	%xmm3, %xmm0
	addsd	%xmm2, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L120
	sqrtsd	%xmm0, %xmm0
	subsd	-8(%rbx), %xmm0
	subsd	24(%r15), %xmm0
.L123:
	call	fmax@PLT
	addl	$1, %r12d
	addq	$16, %r14
	addq	$32, %r15
	movsd	%xmm0, -8(%r14)
	cmpl	%r12d, %ebp
	pxor	%xmm1, %xmm1
	jg	.L109
	movl	36(%rsp), %r12d
	addl	44(%rsp), %r12d
	addq	$1, %r13
	addq	$32, %rbx
	subl	40(%rsp), %r12d
	movl	%r12d, 36(%rsp)
	cmpq	%r13, 48(%rsp)
	jne	.L110
.L104:
	movl	44(%rsp), %eax
	movl	%ebp, %edi
	imull	%ebp, %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	call	kruskal
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	jmp	.L102
.L111:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L125
	addq	$88, %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
.L124:
	.cfi_restore_state
	leal	-1(%rbp), %eax
	movl	%eax, 44(%rsp)
	jmp	.L104
.L120:
	call	sqrt@PLT
	pxor	%xmm1, %xmm1
	subsd	-8(%rbx), %xmm0
	subsd	24(%r15), %xmm0
	jmp	.L123
.L125:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE43:
	.size	main, .-main
	.globl	edge
	.bss
	.align 32
	.type	edge, @object
	.size	edge, 79200
edge:
	.zero	79200
	.globl	node
	.align 32
	.type	node, @object
	.size	node, 400
node:
	.zero	400
	.globl	coord
	.align 32
	.type	coord, @object
	.size	coord, 3200
coord:
	.zero	3200
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	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
	.globl	compare
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movsd	8(%rdi), %xmm1
	movsd	8(%rsi), %xmm0
	movl	$-1, %eax
	comisd	%xmm1, %xmm0
	ja	.L1
	xorl	%eax, %eax
	comisd	%xmm0, %xmm1
	seta	%al
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.p2align 4
	.globl	find
	.type	find, @function
find:
.LFB40:
	.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
	movslq	%edi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	node(%rip), %rbx
	movq	%rbp, %rax
	movl	(%rbx,%rbp,4), %edx
	cmpl	%ebp, %edx
	jne	.L12
	popq	%rbx
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	movslq	%edx, %r12
	movl	(%rbx,%r12,4), %eax
	cmpl	%eax, %edx
	je	.L7
	movslq	%eax, %r13
	movl	(%rbx,%r13,4), %edx
	cmpl	%edx, %eax
	jne	.L13
.L8:
	movl	%edx, (%rbx,%r12,4)
	movl	%edx, %eax
.L7:
	movl	%eax, (%rbx,%rbp,4)
	popq	%rbx
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	movslq	%edx, %r14
	movl	(%rbx,%r14,4), %edi
	cmpl	%edi, %edx
	je	.L9
	call	find
	movl	%eax, (%rbx,%r14,4)
	movl	%eax, %edi
.L9:
	movl	%edi, (%rbx,%r13,4)
	movl	%edi, %edx
	jmp	.L8
	.cfi_endproc
.LFE40:
	.size	find, .-find
	.p2align 4
	.globl	unite
	.type	unite, @function
unite:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	node(%rip), %rcx
	movslq	%esi, %r10
	movl	%edi, %r9d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	movslq	(%rcx,%r10,4), %r8
	cmpl	%r8d, %esi
	jne	.L32
	movslq	%r9d, %rsi
	movl	(%rcx,%rsi,4), %eax
	cmpl	%eax, %r9d
	jne	.L33
.L23:
	movl	%eax, (%rcx,%r8,4)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	movslq	%r8d, %rsi
	movl	(%rcx,%rsi,4), %eax
	cmpl	%eax, %r8d
	je	.L16
	movslq	%eax, %r8
	movl	(%rcx,%r8,4), %edx
	cmpl	%edx, %eax
	jne	.L34
.L17:
	movl	%edx, (%rcx,%rsi,4)
	movl	%edx, %eax
.L16:
	movslq	%r9d, %rsi
	movl	%eax, (%rcx,%r10,4)
	movslq	%eax, %r8
	movl	(%rcx,%rsi,4), %eax
	cmpl	%eax, %r9d
	je	.L23
.L33:
	movslq	%eax, %r9
	movl	(%rcx,%r9,4), %edx
	cmpl	%edx, %eax
	je	.L24
	movslq	%edx, %r10
	movl	(%rcx,%r10,4), %eax
	cmpl	%eax, %edx
	jne	.L35
.L25:
	movl	%eax, (%rcx,%r9,4)
	movl	%eax, %edx
.L24:
	movl	%edx, %eax
	movl	%edx, (%rcx,%rsi,4)
	movl	%eax, (%rcx,%r8,4)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore_state
	movslq	%eax, %r11
	movl	(%rcx,%r11,4), %edx
	cmpl	%edx, %eax
	je	.L26
	movslq	%edx, %rbx
	movl	(%rcx,%rbx,4), %eax
	cmpl	%eax, %edx
	jne	.L36
.L27:
	movl	%eax, (%rcx,%r11,4)
	movl	%eax, %edx
.L26:
	movl	%edx, (%rcx,%r10,4)
	movl	%edx, %eax
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L34:
	movslq	%edx, %r11
	movl	(%rcx,%r11,4), %eax
	cmpl	%eax, %edx
	je	.L18
	movslq	%eax, %rbx
	movl	(%rcx,%rbx,4), %edx
	cmpl	%edx, %eax
	jne	.L37
.L19:
	movl	%edx, (%rcx,%r11,4)
	movl	%edx, %eax
.L18:
	movl	%eax, (%rcx,%r8,4)
	movl	%eax, %edx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L37:
	movslq	%edx, %rbp
	movl	(%rcx,%rbp,4), %eax
	cmpl	%eax, %edx
	je	.L20
	movslq	%eax, %r12
	movl	(%rcx,%r12,4), %edx
	cmpl	%edx, %eax
	je	.L21
	movslq	%edx, %r13
	movl	(%rcx,%r13,4), %edi
	cmpl	%edi, %edx
	je	.L22
	call	find
	movl	%eax, (%rcx,%r13,4)
	movl	%eax, %edi
.L22:
	movl	%edi, (%rcx,%r12,4)
	movl	%edi, %edx
.L21:
	movl	%edx, (%rcx,%rbp,4)
	movl	%edx, %eax
.L20:
	movl	%eax, (%rcx,%rbx,4)
	movl	%eax, %edx
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L36:
	movslq	%eax, %rbp
	movl	(%rcx,%rbp,4), %edx
	cmpl	%edx, %eax
	je	.L28
	movslq	%edx, %r12
	movl	(%rcx,%r12,4), %edi
	cmpl	%edi, %edx
	je	.L29
	movslq	%edi, %r13
	movl	(%rcx,%r13,4), %eax
	cmpl	%eax, %edi
	je	.L30
	movl	%eax, %edi
	call	find
	movl	%eax, (%rcx,%r13,4)
.L30:
	movl	%eax, (%rcx,%r12,4)
	movl	%eax, %edi
.L29:
	movl	%edi, (%rcx,%rbp,4)
	movl	%edi, %edx
.L28:
	movl	%edx, (%rcx,%rbx,4)
	movl	%edx, %eax
	jmp	.L27
	.cfi_endproc
.LFE41:
	.size	unite, .-unite
	.p2align 4
	.globl	kruskal
	.type	kruskal, @function
kruskal:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%esi, %rsi
	movl	$16, %edx
	leaq	compare(%rip), %rcx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%edi, %ebx
	leaq	edge(%rip), %rdi
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	qsort@PLT
	testl	%ebx, %ebx
	jle	.L45
	leal	-1(%rbx), %eax
	cmpl	$2, %eax
	jbe	.L84
	movl	%ebx, %edx
	leaq	node(%rip), %rcx
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC2(%rip), %xmm2
	shrl	$2, %edx
	leaq	16(%rcx), %rsi
	movq	%rcx, %rax
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rsi, %rdx
	.p2align 4,,10
	.p2align 3
.L43:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rax, %rdx
	jne	.L43
	movl	%ebx, %eax
	andl	$-4, %eax
	testb	$3, %bl
	je	.L45
.L42:
	movslq	%eax, %rdx
	movl	%eax, (%rcx,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %ebx
	jle	.L45
	movslq	%edx, %rsi
	addl	$2, %eax
	movl	%edx, (%rcx,%rsi,4)
	cmpl	%eax, %ebx
	jle	.L45
	movslq	%eax, %rdx
	movl	%eax, (%rcx,%rdx,4)
.L45:
	pxor	%xmm0, %xmm0
	testl	%ebp, %ebp
	jle	.L38
	leaq	edge(%rip), %r8
	leal	-1(%rbp), %r11d
	pxor	%xmm0, %xmm0
	salq	$4, %r11
	leaq	16(%r8), %rax
	leaq	node(%rip), %rcx
	addq	%rax, %r11
	.p2align 4,,10
	.p2align 3
.L82:
	movslq	(%r8), %rsi
	movl	(%rcx,%rsi,4), %r9d
	cmpl	%r9d, %esi
	je	.L47
	movslq	%r9d, %r10
	movl	(%rcx,%r10,4), %eax
	cmpl	%eax, %r9d
	je	.L48
	movslq	%eax, %r9
	movl	(%rcx,%r9,4), %edx
	cmpl	%edx, %eax
	je	.L49
	movslq	%edx, %rbx
	movl	(%rcx,%rbx,4), %eax
	cmpl	%eax, %edx
	jne	.L89
.L50:
	movl	%eax, (%rcx,%r9,4)
	movl	%eax, %edx
.L49:
	movl	%edx, (%rcx,%r10,4)
	movl	%edx, %eax
.L48:
	movl	%eax, (%rcx,%rsi,4)
	movl	%eax, %r9d
.L47:
	movslq	4(%r8), %r10
	movslq	(%rcx,%r10,4), %rsi
	cmpl	%esi, %r10d
	je	.L56
	movslq	%esi, %rbx
	movl	(%rcx,%rbx,4), %eax
	cmpl	%eax, %esi
	je	.L57
	movslq	%eax, %rsi
	movl	(%rcx,%rsi,4), %edx
	cmpl	%edx, %eax
	je	.L58
	movslq	%edx, %rbp
	movl	(%rcx,%rbp,4), %eax
	cmpl	%eax, %edx
	jne	.L90
.L59:
	movl	%eax, (%rcx,%rsi,4)
	movl	%eax, %edx
.L58:
	movl	%edx, (%rcx,%rbx,4)
	movl	%edx, %eax
.L57:
	movl	%eax, (%rcx,%r10,4)
	cmpl	%eax, %r9d
	je	.L65
	movslq	4(%r8), %r10
	movl	(%r8), %r9d
	movl	(%rcx,%r10,4), %eax
	movq	%r10, %rsi
	cmpl	%eax, %r10d
	je	.L66
	movslq	%eax, %rbp
	movslq	(%rcx,%rbp,4), %rsi
	cmpl	%esi, %eax
	je	.L67
	movslq	%esi, %rbx
	movl	(%rcx,%rbx,4), %eax
	cmpl	%eax, %esi
	jne	.L91
.L68:
	movl	%eax, (%rcx,%rbp,4)
	movslq	%eax, %rsi
.L67:
	movl	%esi, (%rcx,%r10,4)
.L66:
	movslq	%r9d, %r10
	movl	(%rcx,%r10,4), %eax
	cmpl	%eax, %r9d
	je	.L74
	movslq	%eax, %r9
	movl	(%rcx,%r9,4), %edx
	cmpl	%edx, %eax
	je	.L75
	movslq	%edx, %rbx
	movl	(%rcx,%rbx,4), %eax
	cmpl	%eax, %edx
	jne	.L92
.L76:
	movl	%eax, (%rcx,%r9,4)
	movl	%eax, %edx
.L75:
	movl	%edx, (%rcx,%r10,4)
	movl	%edx, %eax
.L74:
	movl	%eax, (%rcx,%rsi,4)
	addsd	8(%r8), %xmm0
.L65:
	addq	$16, %r8
	cmpq	%r8, %r11
	jne	.L82
.L38:
	addq	$24, %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
.L56:
	.cfi_restore_state
	cmpl	%r9d, %esi
	je	.L65
	movl	(%r8), %r9d
	jmp	.L66
	.p2align 4,,10
	.p2align 3
.L92:
	movslq	%eax, %rbp
	movl	(%rcx,%rbp,4), %edx
	cmpl	%edx, %eax
	je	.L77
	movslq	%edx, %r12
	movl	(%rcx,%r12,4), %eax
	cmpl	%eax, %edx
	jne	.L93
.L78:
	movl	%eax, (%rcx,%rbp,4)
	movl	%eax, %edx
.L77:
	movl	%edx, (%rcx,%rbx,4)
	movl	%edx, %eax
	jmp	.L76
	.p2align 4,,10
	.p2align 3
.L91:
	movslq	%eax, %rsi
	movl	(%rcx,%rsi,4), %edx
	cmpl	%edx, %eax
	je	.L69
	movslq	%edx, %r12
	movl	(%rcx,%r12,4), %eax
	cmpl	%eax, %edx
	jne	.L94
.L70:
	movl	%eax, (%rcx,%rsi,4)
	movl	%eax, %edx
.L69:
	movl	%edx, (%rcx,%rbx,4)
	movl	%edx, %eax
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L90:
	movslq	%eax, %r12
	movl	(%rcx,%r12,4), %edx
	cmpl	%edx, %eax
	je	.L60
	movslq	%edx, %r13
	movl	(%rcx,%r13,4), %eax
	cmpl	%eax, %edx
	jne	.L95
.L61:
	movl	%eax, (%rcx,%r12,4)
	movl	%eax, %edx
.L60:
	movl	%edx, (%rcx,%rbp,4)
	movl	%edx, %eax
	jmp	.L59
	.p2align 4,,10
	.p2align 3
.L89:
	movslq	%eax, %rbp
	movl	(%rcx,%rbp,4), %edx
	cmpl	%edx, %eax
	je	.L51
	movslq	%edx, %r12
	movl	(%rcx,%r12,4), %eax
	cmpl	%eax, %edx
	jne	.L96
.L52:
	movl	%eax, (%rcx,%rbp,4)
	movl	%eax, %edx
.L51:
	movl	%edx, (%rcx,%rbx,4)
	movl	%edx, %eax
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L96:
	movslq	%eax, %r13
	movl	(%rcx,%r13,4), %edx
	cmpl	%edx, %eax
	je	.L53
	movslq	%edx, %r14
	movl	(%rcx,%r14,4), %eax
	cmpl	%eax, %edx
	jne	.L97
.L54:
	movl	%eax, (%rcx,%r13,4)
	movl	%eax, %edx
.L53:
	movl	%edx, (%rcx,%r12,4)
	movl	%edx, %eax
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L95:
	movslq	%eax, %r14
	movl	(%rcx,%r14,4), %edx
	cmpl	%edx, %eax
	je	.L62
	movslq	%edx, %r15
	movl	(%rcx,%r15,4), %eax
	cmpl	%eax, %edx
	jne	.L98
.L63:
	movl	%eax, (%rcx,%r14,4)
	movl	%eax, %edx
.L62:
	movl	%edx, (%rcx,%r13,4)
	movl	%edx, %eax
	jmp	.L61
	.p2align 4,,10
	.p2align 3
.L94:
	movslq	%eax, %r13
	movl	(%rcx,%r13,4), %edx
	cmpl	%edx, %eax
	je	.L71
	movslq	%edx, %r14
	movl	(%rcx,%r14,4), %eax
	cmpl	%eax, %edx
	jne	.L99
.L72:
	movl	%eax, (%rcx,%r13,4)
	movl	%eax, %edx
.L71:
	movl	%edx, (%rcx,%r12,4)
	movl	%edx, %eax
	jmp	.L70
	.p2align 4,,10
	.p2align 3
.L93:
	movslq	%eax, %r13
	movl	(%rcx,%r13,4), %edx
	cmpl	%edx, %eax
	je	.L79
	movslq	%edx, %r14
	movl	(%rcx,%r14,4), %eax
	cmpl	%eax, %edx
	jne	.L100
.L80:
	movl	%eax, (%rcx,%r13,4)
	movl	%eax, %edx
.L79:
	movl	%edx, (%rcx,%r12,4)
	movl	%edx, %eax
	jmp	.L78
.L84:
	xorl	%eax, %eax
	leaq	node(%rip), %rcx
	jmp	.L42
.L100:
	movslq	%eax, %r15
	movl	(%rcx,%r15,4), %edi
	cmpl	%edi, %eax
	je	.L81
	call	find
	movl	%eax, (%rcx,%r15,4)
	movl	%eax, %edi
.L81:
	movl	%edi, (%rcx,%r14,4)
	movl	%edi, %eax
	jmp	.L80
.L99:
	movslq	%eax, %r15
	movl	(%rcx,%r15,4), %edi
	cmpl	%edi, %eax
	je	.L73
	call	find
	movl	%eax, (%rcx,%r15,4)
	movl	%eax, %edi
.L73:
	movl	%edi, (%rcx,%r14,4)
	movl	%edi, %eax
	jmp	.L72
.L98:
	movslq	%eax, %rdx
	movl	(%rcx,%rdx,4), %edi
	movq	%rdx, 8(%rsp)
	cmpl	%edi, %eax
	je	.L64
	call	find
	movq	8(%rsp), %rdx
	movl	%eax, %edi
	movl	%eax, (%rcx,%rdx,4)
.L64:
	movl	%edi, (%rcx,%r15,4)
	movl	%edi, %eax
	jmp	.L63
.L97:
	movslq	%eax, %r15
	movl	(%rcx,%r15,4), %edi
	cmpl	%edi, %eax
	je	.L55
	call	find
	movl	%eax, (%rcx,%r15,4)
	movl	%eax, %edi
.L55:
	movl	%edi, (%rcx,%r14,4)
	movl	%edi, %eax
	jmp	.L54
	.cfi_endproc
.LFE42:
	.size	kruskal, .-kruskal
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%lf %lf %lf %lf"
.LC4:
	.string	"%.3f\n"
.LC5:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB43:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	68(%rsp), %rax
	movq	%rax, 56(%rsp)
	.p2align 4,,10
	.p2align 3
.L102:
	movq	56(%rsp), %rsi
	leaq	.LC5(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	68(%rsp), %ebp
	testl	%ebp, %ebp
	je	.L111
	leaq	coord(%rip), %rbx
	movl	$0, %r12d
	jle	.L124
	.p2align 4,,10
	.p2align 3
.L103:
	leaq	16(%rbx), %rcx
	leaq	8(%rbx), %rdx
	movq	%rbx, %rsi
	xorl	%eax, %eax
	leaq	24(%rbx), %r8
	leaq	.LC3(%rip), %rdi
	addl	$1, %r12d
	addq	$32, %rbx
	call	__isoc99_scanf@PLT
	movl	68(%rsp), %ebp
	pxor	%xmm1, %xmm1
	cmpl	%r12d, %ebp
	jg	.L103
	cmpl	$1, %ebp
	jle	.L124
	leal	-1(%rbp), %eax
	movl	$0, 36(%rsp)
	leaq	32+coord(%rip), %rbx
	xorl	%r13d, %r13d
	movl	%eax, 44(%rsp)
	movq	%rax, 48(%rsp)
	.p2align 4,,10
	.p2align 3
.L110:
	movslq	36(%rsp), %rdx
	movsd	-32(%rbx), %xmm5
	movl	%r13d, 40(%rsp)
	movq	%rbx, %r15
	movsd	-24(%rbx), %xmm6
	movsd	-16(%rbx), %xmm7
	movl	%r13d, 32(%rsp)
	leaq	edge(%rip), %rax
	salq	$4, %rdx
	leal	1(%r13), %r12d
	movsd	%xmm5, 8(%rsp)
	movsd	%xmm6, 16(%rsp)
	leaq	(%rax,%rdx), %r14
	movsd	%xmm7, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L109:
	movd	32(%rsp), %xmm0
	movd	%r12d, %xmm4
	movsd	16(%rsp), %xmm3
	subsd	8(%r15), %xmm3
	movsd	24(%rsp), %xmm2
	punpckldq	%xmm4, %xmm0
	subsd	16(%r15), %xmm2
	movq	%xmm0, (%r14)
	movsd	8(%rsp), %xmm0
	subsd	(%r15), %xmm0
	mulsd	%xmm3, %xmm3
	mulsd	%xmm2, %xmm2
	mulsd	%xmm0, %xmm0
	addsd	%xmm3, %xmm0
	addsd	%xmm2, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L120
	sqrtsd	%xmm0, %xmm0
	subsd	-8(%rbx), %xmm0
	subsd	24(%r15), %xmm0
.L123:
	call	fmax@PLT
	addl	$1, %r12d
	addq	$16, %r14
	addq	$32, %r15
	movsd	%xmm0, -8(%r14)
	cmpl	%r12d, %ebp
	pxor	%xmm1, %xmm1
	jg	.L109
	movl	36(%rsp), %r12d
	addl	44(%rsp), %r12d
	addq	$1, %r13
	addq	$32, %rbx
	subl	40(%rsp), %r12d
	movl	%r12d, 36(%rsp)
	cmpq	%r13, 48(%rsp)
	jne	.L110
.L104:
	movl	44(%rsp), %eax
	movl	%ebp, %edi
	imull	%ebp, %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	call	kruskal
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	jmp	.L102
.L111:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L125
	addq	$88, %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
.L124:
	.cfi_restore_state
	leal	-1(%rbp), %eax
	movl	%eax, 44(%rsp)
	jmp	.L104
.L120:
	call	sqrt@PLT
	pxor	%xmm1, %xmm1
	subsd	-8(%rbx), %xmm0
	subsd	24(%r15), %xmm0
	jmp	.L123
.L125:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE43:
	.size	main, .-main
	.globl	edge
	.bss
	.align 32
	.type	edge, @object
	.size	edge, 79200
edge:
	.zero	79200
	.globl	node
	.align 32
	.type	node, @object
	.size	node, 400
node:
	.zero	400
	.globl	coord
	.align 32
	.type	coord, @object
	.size	coord, 3200
coord:
	.zero	3200
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	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:

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

typedef struct {
	int from, to;
	double weight;
} Edge;

typedef struct {
	double x, y, z, r;
} Coord;

Coord coord[ 100 ];
int node[ 100 ];
Edge edge[ 4950 ];

int compare( const void *a, const void *b ) {
	double at = (*(Edge *)a).weight, bt = (*(Edge *)b).weight;

	if ( at < bt )
		return -1;
	if ( at > bt )
		return 1;
	return 0;
}

int find( int x ) {
	if ( node[ x ] == x )
		return x;
	else
		return node[ x ] = find( node[ x ] );
}

void unite( int x, int y ) {
	node[ find( y ) ] = find( x );
}

double kruskal( int v, int e ) {
	int i;
	double sum;

	qsort( edge, e, sizeof(Edge), &compare );

	for ( i = 0; i < v; i++ )
		node[ i ] = i;

	sum = 0.0;
	for ( i = 0; i < e; i++ )
		if ( find( edge[ i ].from ) != find( edge[ i ].to ) ) {
			unite( edge[ i ].from, edge[ i ].to );
			sum += edge[ i ].weight;
		}

	return sum;
}

int main( void ) {
	int i, j;
	int n, cnt;

	while ( scanf( "%d", &n ), n ) {
		for ( i = 0; i < n; i++ )
			scanf( "%lf %lf %lf %lf", &coord[ i ].x, &coord[ i ].y, &coord[ i ].z, &coord[ i ].r );

		cnt = 0;
		for ( i = 0; i < n; i++ )
			for ( j = i + 1; j < n; j++ ) {
				edge[ cnt ].from = i;
				edge[ cnt ].to = j;
				edge[ cnt ].weight = fmax( sqrt( ( coord[ i ].x - coord[ j ].x ) * ( coord[ i ].x - coord[ j ].x ) + ( coord[ i ].y - coord[ j ].y ) * ( coord[ i ].y - coord[ j ].y ) + ( coord[ i ].z - coord[ j ].z ) * ( coord[ i ].z - coord[ j ].z ) ) - coord[ i ].r - coord[ j ].r, 0.0 );
				cnt++;
			}

		printf( "%.3f\n", kruskal( n, n * ( n - 1 ) / 2 ) );
	}

	return 0;
}
3
10.000 10.000 50.000 10.000
40.000 10.000 50.9661040800581 10.000
40.000 40.000 50.000 10.000
2
30.000 30.000 30.000 20.000
40.000 40.000 40.000 20.000
5
5.729 15.143 3.996 25.837
6.013 14.372 4.818 10.671
80.115 63.292 84.477 15.120
64.095 80.924 70.029 14.881
39.472 85.116 71.369 5.553
0
 3
10.000 10.000 50.000 10.000
40.000 10.000 50.9661040800581 10.000
40.000 40.000 50.000 10.000
2
30.000 30.000 30.000 20.000
40.000 40.000 40.000 20.000
5
5.729 15.143 3.996 25.837
6.013 14.372 4.818 10.671
80.115 63.292 84.477 15.120
64.095 80.924 70.029 15.74744436670293
39.472 85.116 71.369 5.553
0
 3
10.000 10.000 50.000 10.000
40.000 10.000 50.9661040800581 10.000
40.000 40.000 50.000 10.000
2
30.000 30.000 30.000 20.000
40.000 40.000 40.000 20.000
5
5.729 15.143 3.996 25.837
6.013 14.372 4.818 10.671
80.115 63.292 84.96291652289682 15.120
64.095 80.924 70.029 15.74744436670293
39.472 85.116 72.06363785181492 5.553
0
 3
10.000 10.000 50.000 10.000
40.000 10.000 50.9661040800581 10.000
40.000 40.000 50.000 10.000
2
30.000 30.000 30.000 20.000
40.000 40.000 40.000 20.000
5
5.729 15.143 3.996 25.837
6.013 14.372 4.818 11.285102790232827
80.115 63.292 84.96291652289682 15.120
64.095 80.924 70.029 15.74744436670293
39.472 85.116 72.67566488438055 5.553
0
 3
10.000 10.000 50.000 10.000
40.000 10.000 50.9661040800581 10.000
40.000 40.000 50.000 10.89540561727416
2
30.000 30.000 30.000 20.000
40.000 40.000 40.000 20.000
5
5.729 15.143 3.996 25.837
6.013 14.372 4.818 11.285102790232827
80.115 63.292 84.96291652289682 15.120
64.095 80.924 70.029 15.74744436670293
39.472 85.116 72.67566488438055 5.553
0
 3
10.000 10.000 50.000 10.000
40.000 10.000 51.219861131766976 10.000
40.000 40.000 50.000 10.89540561727416
2
30.000 30.000 30.787057368701163 20.000
40.000 40.000 40.000 20.000
5
5.729 15.143 3.996 25.837
6.013 14.372 4.818 12.169672589379822
80.115 63.292 84.96291652289682 15.120
64.095 80.924 70.029 15.74744436670293
39.472 85.116 72.67566488438055 5.553
0
 3
10.000 10.000 50.000 10.000
40.000 10.000 51.219861131766976 10.000
40.000 40.000 50.000 10.89540561727416
2
30.000 30.000 30.787057368701163 20.000
40.000 40.897526923182255 40.000 20.000
5
5.729 15.143 4.635408214127903 25.837
6.013 14.372 4.818 12.169672589379822
80.115 63.292 84.96291652289682 15.120
64.095 80.924 70.029 15.74744436670293
39.472 85.116 72.67566488438055 5.553
0
 3
10.000 10.000 50.000 10.000
40.000 10.000 51.219861131766976 10.000
40.000 40.51646067399203 50.000 10.89540561727416
2
30.000 30.000 30.787057368701163 20.128299631926932
40.000 40.897526923182255 40.000 20.000
5
5.729 15.143 4.635408214127903 25.837
6.013 14.372 4.818 12.169672589379822
80.115 63.292 84.96291652289682 15.120
64.095 80.924 70.029 15.74744436670293
39.472 85.116 72.67566488438055 5.553
0
 3
10.000 10.000 50.000 10.000
40.000 10.000 51.219861131766976 10.000
40.000 40.51646067399203 50.343828752057796 10.89540561727416
2
30.571866538226903 30.000 30.787057368701163 20.128299631926932
40.000 40.897526923182255 40.000 20.000
5
5.729 15.143 4.635408214127903 25.837
6.013 14.372 5.37263216776346 12.169672589379822
80.115 63.292 84.96291652289682 15.120
64.095 80.924 70.029 15.74744436670293
39.472 85.116 72.67566488438055 5.553
0
 3
10.428063836405636 10.000 50.000 10.000
40.000 10.000 51.219861131766976 10.000
40.000 40.51646067399203 50.343828752057796 10.89540561727416
2
30.571866538226903 30.000 30.787057368701163 20.128299631926932
40.000 40.897526923182255 40.000 20.000
5
5.729 15.143 4.635408214127903 25.837
6.013 14.372 5.37263216776346 12.169672589379822
80.115 63.292 84.96291652289682 15.120
64.095 80.924 70.029 15.74744436670293
39.472 85.116 72.67566488438055 5.553
0

20.031
0.000
73.834
 20.031
0.000
72.101
 20.031
0.000
72.148
 20.031
0.000
72.205
 19.136
0.000
72.205
 19.154
0.000
72.205
 19.154
0.000
71.823
 19.670
0.000
71.823
 19.658
0.000
71.823
 19.231
0.000
71.823

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

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

typedef struct {
	int from, to;
	double weight;
} Edge;

typedef struct {
	double x, y, z, r;
} Coord;

Coord coord[ 100 ];
int node[ 100 ];
Edge edge[ 4950 ];

int compare( const void *a, const void *b ) {
	double at = (*(Edge *)a).weight, bt = (*(Edge *)b).weight;

	if ( at < bt )
		return -1;
	if ( at > bt )
		return 1;
	return 0;
}

int find( int x ) {
	if ( node[ x ] == x )
		return x;
	else
		return node[ x ] = find( node[ x ] );
}

void unite( int x, int y ) {
	node[ find( y ) ] = find( x );
}

double kruskal( int v, int e ) {
	int i;
	double sum;

	qsort( edge, e, sizeof(Edge), &compare );

	for ( i = 0; i < v; i++ )
		node[ i ] = i;

	sum = 0.0;
	for ( i = 0; i < e; i++ )
		if ( find( edge[ i ].from ) != find( edge[ i ].to ) ) {
			unite( edge[ i ].from, edge[ i ].to );
			sum += edge[ i ].weight;
		}

	return sum;
}

int main( void ) {
	int i, j;
	int n, cnt;

	while ( scanf( "%d", &n ), n ) {
		for ( i = 0; i < n; i++ )
			scanf( "%lf %lf %lf %lf", &coord[ i ].x, &coord[ i ].y, &coord[ i ].z, &coord[ i ].r );

		cnt = 0;
		for ( i = 0; i < n; i++ )
			for ( j = i + 1; j < n; j++ ) {
				edge[ cnt ].from = i;
				edge[ cnt ].to = j;
				edge[ cnt ].weight = fmax( sqrt( ( coord[ i ].x - coord[ j ].x ) * ( coord[ i ].x - coord[ j ].x ) + ( coord[ i ].y - coord[ j ].y ) * ( coord[ i ].y - coord[ j ].y ) + ( coord[ i ].z - coord[ j ].z ) * ( coord[ i ].z - coord[ j ].z ) ) - coord[ i ].r - coord[ j ].r, 0.0 );
				cnt++;
			}

		printf( "%.3f\n", kruskal( n, n * ( n - 1 ) / 2 ) );
	}

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	coord
	.bss
	.align 32
	.type	coord, @object
	.size	coord, 3200
coord:
	.zero	3200
	.globl	node
	.align 32
	.type	node, @object
	.size	node, 400
node:
	.zero	400
	.globl	edge
	.align 32
	.type	edge, @object
	.size	edge, 79200
edge:
	.zero	79200
	.text
	.globl	compare
	.type	compare, @function
compare:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movsd	8(%rax), %xmm0
	movsd	%xmm0, -16(%rbp)
	movq	-32(%rbp), %rax
	movsd	8(%rax), %xmm0
	movsd	%xmm0, -8(%rbp)
	movsd	-8(%rbp), %xmm0
	comisd	-16(%rbp), %xmm0
	jbe	.L9
	movl	$-1, %eax
	jmp	.L4
.L9:
	movsd	-16(%rbp), %xmm0
	comisd	-8(%rbp), %xmm0
	jbe	.L10
	movl	$1, %eax
	jmp	.L4
.L10:
	movl	$0, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.globl	find
	.type	find, @function
find:
.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
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	node(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jne	.L12
	movl	-4(%rbp), %eax
	jmp	.L13
.L12:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	node(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	find
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	node(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	node(%rip), %rax
	movl	(%rdx,%rax), %eax
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	find, .-find
	.globl	unite
	.type	unite, @function
unite:
.LFB8:
	.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	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	find
	movl	%eax, %ebx
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	find
	movslq	%ebx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	node(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	nop
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	unite, .-unite
	.globl	kruskal
	.type	kruskal, @function
kruskal:
.LFB9:
	.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	$40, %rsp
	.cfi_offset 3, -24
	movl	%edi, -36(%rbp)
	movl	%esi, -40(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	compare(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rsi
	leaq	edge(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -28(%rbp)
	jmp	.L16
.L17:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	node(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L16:
	movl	-28(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L17
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -24(%rbp)
	movl	$0, -28(%rbp)
	jmp	.L18
.L20:
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	edge(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	find
	movl	%eax, %ebx
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+edge(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	find
	cmpl	%eax, %ebx
	je	.L19
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+edge(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	edge(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	unite
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+edge(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movsd	-24(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -24(%rbp)
.L19:
	addl	$1, -28(%rbp)
.L18:
	movl	-28(%rbp), %eax
	cmpl	-40(%rbp), %eax
	jl	.L20
	movsd	-24(%rbp), %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	kruskal, .-kruskal
	.section	.rodata
.LC1:
	.string	"%lf %lf %lf %lf"
.LC2:
	.string	"%.3f\n"
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L23
.L30:
	movl	$0, -20(%rbp)
	jmp	.L24
.L25:
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	leaq	16(%rax), %rdx
	leaq	coord(%rip), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rsi
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	leaq	16(%rax), %rdx
	leaq	coord(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdi
	leaq	coord(%rip), %rax
	addq	%rdi, %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L24:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L25
	movl	$0, -12(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L26
.L29:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L27
.L28:
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	edge(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	4+edge(%rip), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm2
	movapd	%xmm0, %xmm1
	subsd	%xmm2, %xmm1
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm2
	subsd	%xmm2, %xmm0
	mulsd	%xmm0, %xmm1
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	8+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	8+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm3
	movapd	%xmm0, %xmm2
	subsd	%xmm3, %xmm2
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	8+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	8+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm3
	subsd	%xmm3, %xmm0
	mulsd	%xmm2, %xmm0
	addsd	%xmm0, %xmm1
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	16+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	16+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm3
	movapd	%xmm0, %xmm2
	subsd	%xmm3, %xmm2
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	16+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	16+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm3
	subsd	%xmm3, %xmm0
	mulsd	%xmm2, %xmm0
	addsd	%xmm0, %xmm1
	movq	%xmm1, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$5, %rcx
	leaq	24+coord(%rip), %rdx
	movsd	(%rcx,%rdx), %xmm1
	movq	%rax, %xmm0
	subsd	%xmm1, %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	24+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm1
	subsd	%xmm1, %xmm0
	movq	%xmm0, %rax
	pxor	%xmm1, %xmm1
	movq	%rax, %xmm0
	call	fmax@PLT
	movq	%xmm0, %rax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	8+edge(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
	addl	$1, -16(%rbp)
.L27:
	movl	-24(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L28
	addl	$1, -20(%rbp)
.L26:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L29
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	kruskal
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
.L23:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L30
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	coord
	.bss
	.align 32
	.type	coord, @object
	.size	coord, 3200
coord:
	.zero	3200
	.globl	node
	.align 32
	.type	node, @object
	.size	node, 400
node:
	.zero	400
	.globl	edge
	.align 32
	.type	edge, @object
	.size	edge, 79200
edge:
	.zero	79200
	.text
	.globl	compare
	.type	compare, @function
compare:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movsd	8(%rax), %xmm0
	movsd	%xmm0, -16(%rbp)
	movq	-32(%rbp), %rax
	movsd	8(%rax), %xmm0
	movsd	%xmm0, -8(%rbp)
	movsd	-8(%rbp), %xmm0
	comisd	-16(%rbp), %xmm0
	jbe	.L9
	movl	$-1, %eax
	jmp	.L4
.L9:
	movsd	-16(%rbp), %xmm0
	comisd	-8(%rbp), %xmm0
	jbe	.L10
	movl	$1, %eax
	jmp	.L4
.L10:
	movl	$0, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare, .-compare
	.globl	find
	.type	find, @function
find:
.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
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	node(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jne	.L12
	movl	-4(%rbp), %eax
	jmp	.L13
.L12:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	node(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	find
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	node(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	node(%rip), %rax
	movl	(%rdx,%rax), %eax
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	find, .-find
	.globl	unite
	.type	unite, @function
unite:
.LFB8:
	.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	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	find
	movl	%eax, %ebx
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	find
	movslq	%ebx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	node(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	nop
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	unite, .-unite
	.globl	kruskal
	.type	kruskal, @function
kruskal:
.LFB9:
	.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	$40, %rsp
	.cfi_offset 3, -24
	movl	%edi, -36(%rbp)
	movl	%esi, -40(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	compare(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rsi
	leaq	edge(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -28(%rbp)
	jmp	.L16
.L17:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	node(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L16:
	movl	-28(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L17
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -24(%rbp)
	movl	$0, -28(%rbp)
	jmp	.L18
.L20:
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	edge(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	find
	movl	%eax, %ebx
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+edge(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	find
	cmpl	%eax, %ebx
	je	.L19
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+edge(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	edge(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	unite
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+edge(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movsd	-24(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -24(%rbp)
.L19:
	addl	$1, -28(%rbp)
.L18:
	movl	-28(%rbp), %eax
	cmpl	-40(%rbp), %eax
	jl	.L20
	movsd	-24(%rbp), %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	kruskal, .-kruskal
	.section	.rodata
.LC1:
	.string	"%lf %lf %lf %lf"
.LC2:
	.string	"%.3f\n"
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L23
.L30:
	movl	$0, -20(%rbp)
	jmp	.L24
.L25:
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	leaq	16(%rax), %rdx
	leaq	coord(%rip), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rsi
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	leaq	16(%rax), %rdx
	leaq	coord(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdi
	leaq	coord(%rip), %rax
	addq	%rdi, %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L24:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L25
	movl	$0, -12(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L26
.L29:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -16(%rbp)
	jmp	.L27
.L28:
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	edge(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	4+edge(%rip), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm2
	movapd	%xmm0, %xmm1
	subsd	%xmm2, %xmm1
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm2
	subsd	%xmm2, %xmm0
	mulsd	%xmm0, %xmm1
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	8+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	8+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm3
	movapd	%xmm0, %xmm2
	subsd	%xmm3, %xmm2
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	8+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	8+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm3
	subsd	%xmm3, %xmm0
	mulsd	%xmm2, %xmm0
	addsd	%xmm0, %xmm1
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	16+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	16+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm3
	movapd	%xmm0, %xmm2
	subsd	%xmm3, %xmm2
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	16+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	16+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm3
	subsd	%xmm3, %xmm0
	mulsd	%xmm2, %xmm0
	addsd	%xmm0, %xmm1
	movq	%xmm1, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$5, %rcx
	leaq	24+coord(%rip), %rdx
	movsd	(%rcx,%rdx), %xmm1
	movq	%rax, %xmm0
	subsd	%xmm1, %xmm0
	movl	-16(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	24+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm1
	subsd	%xmm1, %xmm0
	movq	%xmm0, %rax
	pxor	%xmm1, %xmm1
	movq	%rax, %xmm0
	call	fmax@PLT
	movq	%xmm0, %rax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	8+edge(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -12(%rbp)
	addl	$1, -16(%rbp)
.L27:
	movl	-24(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L28
	addl	$1, -20(%rbp)
.L26:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L29
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	kruskal
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
.L23:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L30
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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:
