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 {
	double x, y, z, r;
} Coord;

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

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 ] );
}

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

	while ( scanf( "%d", &n ), n ) {
		int cnt;
		double sum;

		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++;
			}
		qsort( edge, cnt, sizeof(Edge), &compare );

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

		sum = 0.0;
		for ( i = 0; n && i < cnt; i++ ) {
			int set1 = find( edge[ i ].from ), set2 = find( edge[ i ].to );

			if ( set1 != set2 ) {
				node[ set2 ] = set1;
				sum += edge[ i ].weight;
				n--;
			}
		}

		printf( "%.3f\n", sum );
	}

	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
	.section	.rodata
.LC0:
	.string	"%lf %lf %lf %lf"
.LC2:
	.string	"%.3f\n"
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L15
.L28:
	movl	$0, -36(%rbp)
	jmp	.L16
.L17:
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	leaq	16(%rax), %rdx
	leaq	coord(%rip), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rsi
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	leaq	16(%rax), %rdx
	leaq	coord(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdi
	leaq	coord(%rip), %rax
	addq	%rdi, %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -36(%rbp)
.L16:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L17
	movl	$0, -28(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L18
.L21:
	movl	-36(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L19
.L20:
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	edge(%rip), %rdx
	movl	-36(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	4+edge(%rip), %rdx
	movl	-32(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-32(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm2
	movapd	%xmm0, %xmm1
	subsd	%xmm2, %xmm1
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-32(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm2
	subsd	%xmm2, %xmm0
	mulsd	%xmm0, %xmm1
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	8+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-32(%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	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	8+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-32(%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	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	16+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-32(%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	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	16+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-32(%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	-36(%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	-32(%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	-28(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	8+edge(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
	addl	$1, -32(%rbp)
.L19:
	movl	-40(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L20
	addl	$1, -36(%rbp)
.L18:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L21
	movl	-28(%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, -36(%rbp)
	jmp	.L22
.L23:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	node(%rip), %rdx
	movl	-36(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -36(%rbp)
.L22:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L23
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -16(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L24
.L27:
	movl	-36(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	edge(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	find
	movl	%eax, -24(%rbp)
	movl	-36(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+edge(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	find
	movl	%eax, -20(%rbp)
	movl	-24(%rbp), %eax
	cmpl	-20(%rbp), %eax
	je	.L25
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	node(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-36(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+edge(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movsd	-16(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
.L25:
	addl	$1, -36(%rbp)
.L24:
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	je	.L26
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L27
.L26:
	movq	-16(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
.L15:
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	jne	.L28
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.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:
.LFB41:
	.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
.L15:
	movq	56(%rsp), %rsi
	leaq	.LC5(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	68(%rsp), %eax
	testl	%eax, %eax
	je	.L49
	leaq	coord(%rip), %rbx
	movl	$0, %r12d
	jle	.L17
	.p2align 4,,10
	.p2align 3
.L16:
	leaq	16(%rbx), %rcx
	leaq	8(%rbx), %rdx
	movq	%rbx, %rsi
	xorl	%eax, %eax
	leaq	24(%rbx), %r8
	leaq	.LC2(%rip), %rdi
	addl	$1, %r12d
	addq	$32, %rbx
	call	__isoc99_scanf@PLT
	movl	68(%rsp), %ebp
	cmpl	%r12d, %ebp
	jg	.L16
	testl	%ebp, %ebp
	jle	.L17
	cmpl	$1, %ebp
	je	.L55
	leal	-1(%rbp), %eax
	movl	$0, 36(%rsp)
	xorl	%r14d, %r14d
	pxor	%xmm1, %xmm1
	movl	%eax, 52(%rsp)
	leaq	32+coord(%rip), %rbx
	movq	%rax, 40(%rsp)
	.p2align 4,,10
	.p2align 3
.L24:
	movslq	36(%rsp), %rdx
	movsd	-32(%rbx), %xmm5
	movl	%r14d, 48(%rsp)
	movq	%rbx, %r15
	movsd	-24(%rbx), %xmm6
	movsd	-16(%rbx), %xmm7
	movl	%r14d, 32(%rsp)
	leaq	edge(%rip), %rax
	salq	$4, %rdx
	leal	1(%r14), %r12d
	movsd	%xmm5, 8(%rsp)
	movsd	%xmm6, 16(%rsp)
	leaq	(%rax,%rdx), %r13
	movsd	%xmm7, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L23:
	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, 0(%r13)
	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	.L70
	sqrtsd	%xmm0, %xmm0
	subsd	-8(%rbx), %xmm0
	subsd	24(%r15), %xmm0
	movsd	%xmm1, (%rsp)
.L76:
	call	fmax@PLT
	addl	$1, %r12d
	addq	$16, %r13
	addq	$32, %r15
	movsd	%xmm0, -8(%r13)
	cmpl	%r12d, %ebp
	movsd	(%rsp), %xmm1
	jg	.L23
	movl	36(%rsp), %r12d
	addl	52(%rsp), %r12d
	addq	$1, %r14
	addq	$32, %rbx
	subl	48(%rsp), %r12d
	movl	%r12d, 36(%rsp)
	cmpq	%r14, 40(%rsp)
	jne	.L24
	movl	%r12d, %ebx
.L18:
	movslq	%ebx, %rsi
	movl	$16, %edx
	movsd	%xmm1, (%rsp)
	leaq	edge(%rip), %rdi
	leaq	compare(%rip), %rcx
	call	qsort@PLT
	movl	68(%rsp), %esi
	testl	%ebx, %ebx
	movsd	(%rsp), %xmm1
	setg	%dil
	testl	%esi, %esi
	jle	.L77
.L51:
	testl	%esi, %esi
	movl	$1, %r8d
	cmovg	%esi, %r8d
	cmpl	$3, %esi
	jle	.L56
	movl	%r8d, %edx
	leaq	node(%rip), %rcx
	movdqa	.LC0(%rip), %xmm0
	shrl	$2, %edx
	leaq	16(%rcx), %r9
	movq	%rcx, %rax
	subl	$1, %edx
	salq	$4, %rdx
	addq	%r9, %rdx
	.p2align 4,,10
	.p2align 3
.L26:
	movdqa	%xmm0, %xmm2
	addq	$16, %rax
	paddd	.LC3(%rip), %xmm0
	movaps	%xmm2, -16(%rax)
	cmpq	%rax, %rdx
	jne	.L26
	movl	%r8d, %eax
	andl	$-4, %eax
	andl	$3, %r8d
	je	.L53
.L25:
	movslq	%eax, %rdx
	movl	%eax, (%rcx,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %esi
	jle	.L53
	movslq	%edx, %r8
	addl	$2, %eax
	movl	%edx, (%rcx,%r8,4)
	cmpl	%esi, %eax
	jge	.L53
	movslq	%eax, %rdx
	movl	%eax, (%rcx,%rdx,4)
.L53:
	movl	36(%rsp), %r11d
	leaq	edge(%rip), %r8
	movapd	%xmm1, %xmm0
	xorl	%r9d, %r9d
	leaq	node(%rip), %rcx
	testb	%dil, %dil
	je	.L52
	.p2align 4,,10
	.p2align 3
.L47:
	movslq	(%r8), %r10
	movl	(%rcx,%r10,4), %esi
	cmpl	%esi, %r10d
	je	.L30
	movslq	%esi, %rbx
	movl	(%rcx,%rbx,4), %eax
	cmpl	%eax, %esi
	je	.L31
	movslq	%eax, %rsi
	movl	(%rcx,%rsi,4), %edx
	cmpl	%edx, %eax
	je	.L32
	movslq	%edx, %rbp
	movl	(%rcx,%rbp,4), %eax
	cmpl	%eax, %edx
	je	.L33
	movslq	%eax, %r12
	movl	(%rcx,%r12,4), %edx
	cmpl	%edx, %eax
	je	.L34
	movslq	%edx, %r13
	movl	(%rcx,%r13,4), %eax
	cmpl	%eax, %edx
	je	.L35
	movslq	%eax, %r14
	movl	(%rcx,%r14,4), %edx
	cmpl	%edx, %eax
	jne	.L78
.L36:
	movl	%edx, (%rcx,%r13,4)
.L35:
	movl	%edx, (%rcx,%r12,4)
.L34:
	movl	%edx, (%rcx,%rbp,4)
	movl	%edx, %eax
.L33:
	movl	%eax, (%rcx,%rsi,4)
	movl	%eax, %edx
.L32:
	movl	%edx, (%rcx,%rbx,4)
	movl	%edx, %eax
.L31:
	movl	%eax, (%rcx,%r10,4)
	movl	%eax, %esi
.L30:
	movslq	4(%r8), %r10
	movslq	(%rcx,%r10,4), %rax
	cmpl	%eax, %r10d
	je	.L38
	movslq	%eax, %rbx
	movl	(%rcx,%rbx,4), %edx
	cmpl	%edx, %eax
	je	.L39
	movslq	%edx, %rbp
	movl	(%rcx,%rbp,4), %eax
	cmpl	%eax, %edx
	je	.L40
	movslq	%eax, %r12
	movl	(%rcx,%r12,4), %edx
	cmpl	%edx, %eax
	je	.L41
	movslq	%edx, %r13
	movl	(%rcx,%r13,4), %eax
	cmpl	%eax, %edx
	je	.L42
	movslq	%eax, %r14
	movl	(%rcx,%r14,4), %edx
	cmpl	%edx, %eax
	je	.L43
	movslq	%edx, %r15
	movl	(%rcx,%r15,4), %eax
	cmpl	%eax, %edx
	jne	.L79
.L44:
	movl	%eax, (%rcx,%r14,4)
.L43:
	movl	%eax, (%rcx,%r13,4)
.L42:
	movl	%eax, (%rcx,%r12,4)
	movl	%eax, %edx
.L41:
	movl	%edx, (%rcx,%rbp,4)
	movl	%edx, %eax
.L40:
	movl	%eax, (%rcx,%rbx,4)
	movl	%eax, %edx
.L39:
	movl	%edx, (%rcx,%r10,4)
	movslq	%edx, %rax
.L38:
	movl	68(%rsp), %edx
	cmpl	%esi, %eax
	je	.L46
	subl	$1, %edx
	movl	%esi, (%rcx,%rax,4)
	addsd	8(%r8), %xmm0
	movl	%edx, 68(%rsp)
.L46:
	addl	$1, %r9d
	addq	$16, %r8
	testl	%edx, %edx
	je	.L29
	cmpl	%r9d, %r11d
	jg	.L47
.L29:
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	movl	$1, %eax
	call	__printf_chk@PLT
	jmp	.L15
.L49:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L80
	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
.L17:
	.cfi_restore_state
	xorl	%esi, %esi
	leaq	compare(%rip), %rcx
	movl	$16, %edx
	leaq	edge(%rip), %rdi
	call	qsort@PLT
	movl	68(%rsp), %esi
	pxor	%xmm1, %xmm1
	testl	%esi, %esi
	jle	.L52
	movl	$0, 36(%rsp)
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
	jmp	.L51
.L52:
	movapd	%xmm1, %xmm0
	jmp	.L29
.L77:
	setne	%al
	andl	%eax, %edi
	jmp	.L53
.L55:
	movl	$0, 36(%rsp)
	pxor	%xmm1, %xmm1
	movl	36(%rsp), %ebx
	jmp	.L18
.L56:
	xorl	%eax, %eax
	leaq	node(%rip), %rcx
	jmp	.L25
.L79:
	movslq	%eax, %rdx
	movl	(%rcx,%rdx,4), %edi
	movq	%rdx, (%rsp)
	cmpl	%edi, %eax
	je	.L45
	call	find
	movq	(%rsp), %rdx
	movl	%eax, %edi
	movl	%eax, (%rcx,%rdx,4)
.L45:
	movl	%edi, (%rcx,%r15,4)
	movl	%edi, %eax
	jmp	.L44
.L78:
	movslq	%edx, %r15
	movl	(%rcx,%r15,4), %edi
	cmpl	%edi, %edx
	je	.L37
	call	find
	movl	%eax, (%rcx,%r15,4)
	movl	%eax, %edi
.L37:
	movl	%edi, (%rcx,%r14,4)
	movl	%edi, %edx
	jmp	.L36
.L70:
	movsd	%xmm1, (%rsp)
	call	sqrt@PLT
	movsd	(%rsp), %xmm1
	subsd	-8(%rbx), %xmm0
	subsd	24(%r15), %xmm0
	jmp	.L76
.L80:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.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
.LC3:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.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:
.LFB41:
	.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
.L15:
	movq	56(%rsp), %rsi
	leaq	.LC5(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	68(%rsp), %eax
	testl	%eax, %eax
	je	.L49
	leaq	coord(%rip), %rbx
	movl	$0, %r12d
	jle	.L17
	.p2align 4,,10
	.p2align 3
.L16:
	leaq	16(%rbx), %rcx
	leaq	8(%rbx), %rdx
	movq	%rbx, %rsi
	xorl	%eax, %eax
	leaq	24(%rbx), %r8
	leaq	.LC2(%rip), %rdi
	addl	$1, %r12d
	addq	$32, %rbx
	call	__isoc99_scanf@PLT
	movl	68(%rsp), %ebp
	cmpl	%r12d, %ebp
	jg	.L16
	testl	%ebp, %ebp
	jle	.L17
	cmpl	$1, %ebp
	je	.L55
	leal	-1(%rbp), %eax
	movl	$0, 36(%rsp)
	xorl	%r14d, %r14d
	pxor	%xmm1, %xmm1
	movl	%eax, 52(%rsp)
	leaq	32+coord(%rip), %rbx
	movq	%rax, 40(%rsp)
	.p2align 4,,10
	.p2align 3
.L24:
	movslq	36(%rsp), %rdx
	movsd	-32(%rbx), %xmm5
	movl	%r14d, 48(%rsp)
	movq	%rbx, %r15
	movsd	-24(%rbx), %xmm6
	movsd	-16(%rbx), %xmm7
	movl	%r14d, 32(%rsp)
	leaq	edge(%rip), %rax
	salq	$4, %rdx
	leal	1(%r14), %r12d
	movsd	%xmm5, 8(%rsp)
	movsd	%xmm6, 16(%rsp)
	leaq	(%rax,%rdx), %r13
	movsd	%xmm7, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L23:
	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, 0(%r13)
	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	.L70
	sqrtsd	%xmm0, %xmm0
	subsd	-8(%rbx), %xmm0
	subsd	24(%r15), %xmm0
	movsd	%xmm1, (%rsp)
.L76:
	call	fmax@PLT
	addl	$1, %r12d
	addq	$16, %r13
	addq	$32, %r15
	movsd	%xmm0, -8(%r13)
	cmpl	%r12d, %ebp
	movsd	(%rsp), %xmm1
	jg	.L23
	movl	36(%rsp), %r12d
	addl	52(%rsp), %r12d
	addq	$1, %r14
	addq	$32, %rbx
	subl	48(%rsp), %r12d
	movl	%r12d, 36(%rsp)
	cmpq	%r14, 40(%rsp)
	jne	.L24
	movl	%r12d, %ebx
.L18:
	movslq	%ebx, %rsi
	movl	$16, %edx
	movsd	%xmm1, (%rsp)
	leaq	edge(%rip), %rdi
	leaq	compare(%rip), %rcx
	call	qsort@PLT
	movl	68(%rsp), %esi
	testl	%ebx, %ebx
	movsd	(%rsp), %xmm1
	setg	%dil
	testl	%esi, %esi
	jle	.L77
.L51:
	testl	%esi, %esi
	movl	$1, %r8d
	cmovg	%esi, %r8d
	cmpl	$3, %esi
	jle	.L56
	movl	%r8d, %edx
	leaq	node(%rip), %rcx
	movdqa	.LC0(%rip), %xmm0
	shrl	$2, %edx
	leaq	16(%rcx), %r9
	movq	%rcx, %rax
	subl	$1, %edx
	salq	$4, %rdx
	addq	%r9, %rdx
	.p2align 4,,10
	.p2align 3
.L26:
	movdqa	%xmm0, %xmm2
	addq	$16, %rax
	paddd	.LC3(%rip), %xmm0
	movaps	%xmm2, -16(%rax)
	cmpq	%rax, %rdx
	jne	.L26
	movl	%r8d, %eax
	andl	$-4, %eax
	andl	$3, %r8d
	je	.L53
.L25:
	movslq	%eax, %rdx
	movl	%eax, (%rcx,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %esi
	jle	.L53
	movslq	%edx, %r8
	addl	$2, %eax
	movl	%edx, (%rcx,%r8,4)
	cmpl	%esi, %eax
	jge	.L53
	movslq	%eax, %rdx
	movl	%eax, (%rcx,%rdx,4)
.L53:
	movl	36(%rsp), %r11d
	leaq	edge(%rip), %r8
	movapd	%xmm1, %xmm0
	xorl	%r9d, %r9d
	leaq	node(%rip), %rcx
	testb	%dil, %dil
	je	.L52
	.p2align 4,,10
	.p2align 3
.L47:
	movslq	(%r8), %r10
	movl	(%rcx,%r10,4), %esi
	cmpl	%esi, %r10d
	je	.L30
	movslq	%esi, %rbx
	movl	(%rcx,%rbx,4), %eax
	cmpl	%eax, %esi
	je	.L31
	movslq	%eax, %rsi
	movl	(%rcx,%rsi,4), %edx
	cmpl	%edx, %eax
	je	.L32
	movslq	%edx, %rbp
	movl	(%rcx,%rbp,4), %eax
	cmpl	%eax, %edx
	je	.L33
	movslq	%eax, %r12
	movl	(%rcx,%r12,4), %edx
	cmpl	%edx, %eax
	je	.L34
	movslq	%edx, %r13
	movl	(%rcx,%r13,4), %eax
	cmpl	%eax, %edx
	je	.L35
	movslq	%eax, %r14
	movl	(%rcx,%r14,4), %edx
	cmpl	%edx, %eax
	jne	.L78
.L36:
	movl	%edx, (%rcx,%r13,4)
.L35:
	movl	%edx, (%rcx,%r12,4)
.L34:
	movl	%edx, (%rcx,%rbp,4)
	movl	%edx, %eax
.L33:
	movl	%eax, (%rcx,%rsi,4)
	movl	%eax, %edx
.L32:
	movl	%edx, (%rcx,%rbx,4)
	movl	%edx, %eax
.L31:
	movl	%eax, (%rcx,%r10,4)
	movl	%eax, %esi
.L30:
	movslq	4(%r8), %r10
	movslq	(%rcx,%r10,4), %rax
	cmpl	%eax, %r10d
	je	.L38
	movslq	%eax, %rbx
	movl	(%rcx,%rbx,4), %edx
	cmpl	%edx, %eax
	je	.L39
	movslq	%edx, %rbp
	movl	(%rcx,%rbp,4), %eax
	cmpl	%eax, %edx
	je	.L40
	movslq	%eax, %r12
	movl	(%rcx,%r12,4), %edx
	cmpl	%edx, %eax
	je	.L41
	movslq	%edx, %r13
	movl	(%rcx,%r13,4), %eax
	cmpl	%eax, %edx
	je	.L42
	movslq	%eax, %r14
	movl	(%rcx,%r14,4), %edx
	cmpl	%edx, %eax
	je	.L43
	movslq	%edx, %r15
	movl	(%rcx,%r15,4), %eax
	cmpl	%eax, %edx
	jne	.L79
.L44:
	movl	%eax, (%rcx,%r14,4)
.L43:
	movl	%eax, (%rcx,%r13,4)
.L42:
	movl	%eax, (%rcx,%r12,4)
	movl	%eax, %edx
.L41:
	movl	%edx, (%rcx,%rbp,4)
	movl	%edx, %eax
.L40:
	movl	%eax, (%rcx,%rbx,4)
	movl	%eax, %edx
.L39:
	movl	%edx, (%rcx,%r10,4)
	movslq	%edx, %rax
.L38:
	movl	68(%rsp), %edx
	cmpl	%esi, %eax
	je	.L46
	subl	$1, %edx
	movl	%esi, (%rcx,%rax,4)
	addsd	8(%r8), %xmm0
	movl	%edx, 68(%rsp)
.L46:
	addl	$1, %r9d
	addq	$16, %r8
	testl	%edx, %edx
	je	.L29
	cmpl	%r9d, %r11d
	jg	.L47
.L29:
	leaq	.LC4(%rip), %rsi
	movl	$1, %edi
	movl	$1, %eax
	call	__printf_chk@PLT
	jmp	.L15
.L49:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L80
	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
.L17:
	.cfi_restore_state
	xorl	%esi, %esi
	leaq	compare(%rip), %rcx
	movl	$16, %edx
	leaq	edge(%rip), %rdi
	call	qsort@PLT
	movl	68(%rsp), %esi
	pxor	%xmm1, %xmm1
	testl	%esi, %esi
	jle	.L52
	movl	$0, 36(%rsp)
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
	jmp	.L51
.L52:
	movapd	%xmm1, %xmm0
	jmp	.L29
.L77:
	setne	%al
	andl	%eax, %edi
	jmp	.L53
.L55:
	movl	$0, 36(%rsp)
	pxor	%xmm1, %xmm1
	movl	36(%rsp), %ebx
	jmp	.L18
.L56:
	xorl	%eax, %eax
	leaq	node(%rip), %rcx
	jmp	.L25
.L79:
	movslq	%eax, %rdx
	movl	(%rcx,%rdx,4), %edi
	movq	%rdx, (%rsp)
	cmpl	%edi, %eax
	je	.L45
	call	find
	movq	(%rsp), %rdx
	movl	%eax, %edi
	movl	%eax, (%rcx,%rdx,4)
.L45:
	movl	%edi, (%rcx,%r15,4)
	movl	%edi, %eax
	jmp	.L44
.L78:
	movslq	%edx, %r15
	movl	(%rcx,%r15,4), %edi
	cmpl	%edi, %edx
	je	.L37
	call	find
	movl	%eax, (%rcx,%r15,4)
	movl	%eax, %edi
.L37:
	movl	%edi, (%rcx,%r14,4)
	movl	%edi, %edx
	jmp	.L36
.L70:
	movsd	%xmm1, (%rsp)
	call	sqrt@PLT
	movsd	(%rsp), %xmm1
	subsd	-8(%rbx), %xmm0
	subsd	24(%r15), %xmm0
	jmp	.L76
.L80:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.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
.LC3:
	.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 {
	double x, y, z, r;
} Coord;

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

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 ] );
}

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

	while ( scanf( "%d", &n ), n ) {
		int cnt;
		double sum;

		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++;
			}
		qsort( edge, cnt, sizeof(Edge), &compare );

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

		sum = 0.0;
		for ( i = 0; n && i < cnt; i++ ) {
			int set1 = find( edge[ i ].from ), set2 = find( edge[ i ].to );

			if ( set1 != set2 ) {
				node[ set2 ] = set1;
				sum += edge[ i ].weight;
				n--;
			}
		}

		printf( "%.3f\n", sum );
	}

	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 {
	double x, y, z, r;
} Coord;

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

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 ] );
}

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

	while ( scanf( "%d", &n ), n ) {
		int cnt;
		double sum;

		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++;
			}
		qsort( edge, cnt, sizeof(Edge), &compare );

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

		sum = 0.0;
		for ( i = 0; n && i < cnt; i++ ) {
			int set1 = find( edge[ i ].from ), set2 = find( edge[ i ].to );

			if ( set1 != set2 ) {
				node[ set2 ] = set1;
				sum += edge[ i ].weight;
				n--;
			}
		}

		printf( "%.3f\n", sum );
	}

	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
	.section	.rodata
.LC0:
	.string	"%lf %lf %lf %lf"
.LC2:
	.string	"%.3f\n"
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L15
.L28:
	movl	$0, -36(%rbp)
	jmp	.L16
.L17:
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	leaq	16(%rax), %rdx
	leaq	coord(%rip), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rsi
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	leaq	16(%rax), %rdx
	leaq	coord(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdi
	leaq	coord(%rip), %rax
	addq	%rdi, %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -36(%rbp)
.L16:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L17
	movl	$0, -28(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L18
.L21:
	movl	-36(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L19
.L20:
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	edge(%rip), %rdx
	movl	-36(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	4+edge(%rip), %rdx
	movl	-32(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-32(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm2
	movapd	%xmm0, %xmm1
	subsd	%xmm2, %xmm1
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-32(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm2
	subsd	%xmm2, %xmm0
	mulsd	%xmm0, %xmm1
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	8+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-32(%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	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	8+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-32(%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	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	16+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-32(%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	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	16+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-32(%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	-36(%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	-32(%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	-28(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	8+edge(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
	addl	$1, -32(%rbp)
.L19:
	movl	-40(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L20
	addl	$1, -36(%rbp)
.L18:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L21
	movl	-28(%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, -36(%rbp)
	jmp	.L22
.L23:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	node(%rip), %rdx
	movl	-36(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -36(%rbp)
.L22:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L23
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -16(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L24
.L27:
	movl	-36(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	edge(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	find
	movl	%eax, -24(%rbp)
	movl	-36(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+edge(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	find
	movl	%eax, -20(%rbp)
	movl	-24(%rbp), %eax
	cmpl	-20(%rbp), %eax
	je	.L25
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	node(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-36(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+edge(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movsd	-16(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
.L25:
	addl	$1, -36(%rbp)
.L24:
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	je	.L26
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L27
.L26:
	movq	-16(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
.L15:
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	jne	.L28
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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
	.section	.rodata
.LC0:
	.string	"%lf %lf %lf %lf"
.LC2:
	.string	"%.3f\n"
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L15
.L28:
	movl	$0, -36(%rbp)
	jmp	.L16
.L17:
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	leaq	16(%rax), %rdx
	leaq	coord(%rip), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rsi
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	leaq	16(%rax), %rdx
	leaq	coord(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdi
	leaq	coord(%rip), %rax
	addq	%rdi, %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -36(%rbp)
.L16:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L17
	movl	$0, -28(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L18
.L21:
	movl	-36(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L19
.L20:
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	edge(%rip), %rdx
	movl	-36(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	4+edge(%rip), %rdx
	movl	-32(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-32(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm2
	movapd	%xmm0, %xmm1
	subsd	%xmm2, %xmm1
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-32(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm2
	subsd	%xmm2, %xmm0
	mulsd	%xmm0, %xmm1
	movl	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	8+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-32(%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	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	8+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-32(%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	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	16+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-32(%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	-36(%rbp), %eax
	cltq
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	16+coord(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movl	-32(%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	-36(%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	-32(%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	-28(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	8+edge(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
	addl	$1, -32(%rbp)
.L19:
	movl	-40(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L20
	addl	$1, -36(%rbp)
.L18:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L21
	movl	-28(%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, -36(%rbp)
	jmp	.L22
.L23:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	node(%rip), %rdx
	movl	-36(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -36(%rbp)
.L22:
	movl	-40(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L23
	pxor	%xmm0, %xmm0
	movsd	%xmm0, -16(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L24
.L27:
	movl	-36(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	edge(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	find
	movl	%eax, -24(%rbp)
	movl	-36(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+edge(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	find
	movl	%eax, -20(%rbp)
	movl	-24(%rbp), %eax
	cmpl	-20(%rbp), %eax
	je	.L25
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	node(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-36(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+edge(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movsd	-16(%rbp), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
.L25:
	addl	$1, -36(%rbp)
.L24:
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	je	.L26
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L27
.L26:
	movq	-16(%rbp), %rax
	movq	%rax, %xmm0
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
.L15:
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	jne	.L28
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
