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

```c
#include <stdio.h>          // printf(), scanf()
#include <stdlib.h>         // abs()
#include <string.h>         // memset()
#include <stdbool.h>

#define MAX_N 15
#define MAX_S (1 << MAX_N)

const double INF = 1e10;

int n;
int s[MAX_N], l[MAX_N], v[MAX_N];
double dp[MAX_N][MAX_S];
int w[MAX_N][MAX_S];
short prev[MAX_N][MAX_S][2];
int ord[MAX_N];

int
main(int argc, char **argv)
{
	scanf("%d", &n);
	for (int i = 0; i < n; ++i)
		scanf("%d%d%d", &s[i], &l[i], &v[i]);

	memset(prev, -1, sizeof(prev));
	int S = 1;
	for (int i = 0; i < n; i++, S <<= 1)
		w[i][S] = v[i];

	int e = 1 << n;
	for (int k = 0; k < e; ++k)
	{
		S = 1;
		for (int i = 0; i < n; ++i, S <<= 1)
		{
			if (k & S)
				continue;

			int t = k | S;
			for (int j = 0; j < n; ++j)
			{
				if (i == j || w[j][k] == 0)
					continue;

				int d = abs(l[i] - l[j]);
				double x = dp[j][k] + (d * (7 + 2 * w[j][k])) / 200.0;
				if (dp[i][t] == 0 || x < dp[i][t])
				{
					dp[i][t] = x;
					w[i][t] = w[j][k] + v[i];
					prev[i][t][0] = j;
					prev[i][t][1] = k;
				}
			}
		}
	}

	double min = INF;
	int u = 0;
	for (int i = 0; i < n; ++i)
	{
		double y = dp[i][e - 1];
		if (y == 0)
			continue;

		if (y < min)
		{
			min = y;
			u = i;
		}
	}

	ord[0] = u;
	int v = e - 1;
	for (int k = 1; k < n; ++k)
	{
		ord[k] = prev[u][v][0];
		v = prev[u][v][1];
		u = ord[k];
	}

	for (int i = n - 1; i >= 0; --i)
		printf("%d%c", s[ord[i]], (i != 0) ? ' ' : '\n');

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	INF
	.section	.rodata
	.align 8
	.type	INF, @object
	.size	INF, 8
INF:
	.long	536870912
	.long	1107468383
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 60
s:
	.zero	60
	.globl	l
	.align 32
	.type	l, @object
	.size	l, 60
l:
	.zero	60
	.globl	v
	.align 32
	.type	v, @object
	.size	v, 60
v:
	.zero	60
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 3932160
dp:
	.zero	3932160
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 1966080
w:
	.zero	1966080
	.globl	prev
	.align 32
	.type	prev, @object
	.size	prev, 1966080
prev:
	.zero	1966080
	.globl	ord
	.align 32
	.type	ord, @object
	.size	ord, 60
ord:
	.zero	60
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC5:
	.string	"%d%c"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	movl	%edi, -84(%rbp)
	movq	%rsi, -96(%rbp)
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -80(%rbp)
	jmp	.L2
.L3:
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	addq	%rax, %rdx
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	leaq	s(%rip), %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -80(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -80(%rbp)
	jl	.L3
	movl	$1966080, %edx
	movl	$-1, %esi
	leaq	prev(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -76(%rbp)
	movl	$0, -72(%rbp)
	jmp	.L4
.L5:
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-76(%rbp), %edx
	movslq	%edx, %rcx
	movl	-72(%rbp), %edx
	movslq	%edx, %rdx
	salq	$15, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	w(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -72(%rbp)
	sall	-76(%rbp)
.L4:
	movl	n(%rip), %eax
	cmpl	%eax, -72(%rbp)
	jl	.L5
	movl	n(%rip), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	movl	%eax, -36(%rbp)
	movl	$0, -68(%rbp)
	jmp	.L6
.L19:
	movl	$1, -76(%rbp)
	movl	$0, -64(%rbp)
	jmp	.L7
.L18:
	movl	-68(%rbp), %eax
	andl	-76(%rbp), %eax
	testl	%eax, %eax
	jne	.L35
	movl	-68(%rbp), %eax
	orl	-76(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	$0, -60(%rbp)
	jmp	.L10
.L17:
	movl	-64(%rbp), %eax
	cmpl	-60(%rbp), %eax
	je	.L36
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movl	-60(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L36
	movl	-64(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-60(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	l(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movl	-60(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movsd	(%rdx,%rax), %xmm1
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movl	-60(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %eax
	addl	$7, %eax
	imull	-28(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	.LC2(%rip), %xmm2
	divsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -8(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L33
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	je	.L14
.L33:
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	comisd	-8(%rbp), %xmm0
	jbe	.L13
.L14:
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movsd	-8(%rbp), %xmm0
	movsd	%xmm0, (%rdx,%rax)
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movl	-60(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-64(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-60(%rbp), %eax
	movl	%eax, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	prev(%rip), %rax
	movw	%cx, (%rdx,%rax)
	movl	-68(%rbp), %eax
	movl	%eax, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	2+prev(%rip), %rax
	movw	%cx, (%rdx,%rax)
	jmp	.L13
.L36:
	nop
.L13:
	addl	$1, -60(%rbp)
.L10:
	movl	n(%rip), %eax
	cmpl	%eax, -60(%rbp)
	jl	.L17
	jmp	.L9
.L35:
	nop
.L9:
	addl	$1, -64(%rbp)
	sall	-76(%rbp)
.L7:
	movl	n(%rip), %eax
	cmpl	%eax, -64(%rbp)
	jl	.L18
	addl	$1, -68(%rbp)
.L6:
	movl	-68(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L19
	movsd	.LC4(%rip), %xmm0
	movsd	%xmm0, -24(%rbp)
	movl	$0, -56(%rbp)
	movl	$0, -52(%rbp)
	jmp	.L20
.L25:
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-52(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movsd	%xmm0, -16(%rbp)
	pxor	%xmm0, %xmm0
	ucomisd	-16(%rbp), %xmm0
	jp	.L21
	pxor	%xmm0, %xmm0
	ucomisd	-16(%rbp), %xmm0
	je	.L37
.L21:
	movsd	-24(%rbp), %xmm0
	comisd	-16(%rbp), %xmm0
	jbe	.L23
	movsd	-16(%rbp), %xmm0
	movsd	%xmm0, -24(%rbp)
	movl	-52(%rbp), %eax
	movl	%eax, -56(%rbp)
	jmp	.L23
.L37:
	nop
.L23:
	addl	$1, -52(%rbp)
.L20:
	movl	n(%rip), %eax
	cmpl	%eax, -52(%rbp)
	jl	.L25
	movl	-56(%rbp), %eax
	movl	%eax, ord(%rip)
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -48(%rbp)
	movl	$1, -44(%rbp)
	jmp	.L26
.L27:
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movl	-56(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	prev(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	cwtl
	movl	-44(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	ord(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movl	-56(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	2+prev(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	cwtl
	movl	%eax, -48(%rbp)
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ord(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -56(%rbp)
	addl	$1, -44(%rbp)
.L26:
	movl	n(%rip), %eax
	cmpl	%eax, -44(%rbp)
	jl	.L27
	movl	n(%rip), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	jmp	.L28
.L31:
	cmpl	$0, -40(%rbp)
	je	.L29
	movl	$32, %ecx
	jmp	.L30
.L29:
	movl	$10, %ecx
.L30:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ord(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%ecx, %edx
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	subl	$1, -40(%rbp)
.L28:
	cmpl	$0, -40(%rbp)
	jns	.L31
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	0
	.long	1080623104
	.align 8
.LC4:
	.long	536870912
	.long	1107468383
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d%d"
.LC5:
	.string	"%d%c"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebp, %ebp
	xorl	%r13d, %r13d
	leaq	l(%rip), %rbx
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	v(%rip), %rax
	leaq	(%rbx,%rbp), %rdx
	movq	%r12, %rdi
	addl	$1, %r13d
	leaq	(%rax,%rbp), %rcx
	leaq	s(%rip), %rax
	leaq	(%rax,%rbp), %rsi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	cmpl	%r13d, %eax
	jg	.L3
	leaq	prev(%rip), %r11
	movl	$1966080, %edx
	movl	%eax, 28(%rsp)
	movl	%eax, %r14d
	movq	%r11, %rdi
	movl	$-1, %esi
	call	memset@PLT
	movq	%rax, %r11
	testl	%r14d, %r14d
	jle	.L4
	leaq	v(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4+w(%rip)
	cmpl	$1, %r14d
	je	.L5
	movl	4+v(%rip), %eax
	movl	%eax, 131080+w(%rip)
	cmpl	$2, %r14d
	je	.L5
	movl	8+v(%rip), %eax
	movl	%eax, 262160+w(%rip)
	cmpl	$3, %r14d
	je	.L5
	movl	12+v(%rip), %eax
	movl	%eax, 393248+w(%rip)
	cmpl	$4, %r14d
	je	.L5
	movl	16+v(%rip), %eax
	movl	%eax, 524352+w(%rip)
	cmpl	$5, %r14d
	je	.L5
	movl	20+v(%rip), %eax
	movl	%eax, 655488+w(%rip)
	cmpl	$6, %r14d
	je	.L5
	movl	24+v(%rip), %eax
	movl	%eax, 786688+w(%rip)
	cmpl	$7, %r14d
	je	.L5
	movl	28+v(%rip), %eax
	movl	%eax, 918016+w(%rip)
	cmpl	$8, %r14d
	je	.L5
	movl	32+v(%rip), %eax
	movl	%eax, 1049600+w(%rip)
	cmpl	$9, %r14d
	je	.L5
	movl	36+v(%rip), %eax
	movl	%eax, 1181696+w(%rip)
	cmpl	$10, %r14d
	je	.L5
	movl	40+v(%rip), %eax
	movl	%eax, 1314816+w(%rip)
	cmpl	$11, %r14d
	je	.L5
	movl	44+v(%rip), %eax
	movl	%eax, 1449984+w(%rip)
	cmpl	$12, %r14d
	je	.L5
	movl	48+v(%rip), %eax
	movl	%eax, 1589248+w(%rip)
	cmpl	$13, %r14d
	je	.L5
	movl	52+v(%rip), %eax
	movl	%eax, 1736704+w(%rip)
	cmpl	$14, %r14d
	je	.L5
	movl	56+v(%rip), %eax
	movl	%eax, 1900544+w(%rip)
.L5:
	movslq	28(%rsp), %r10
	movl	$1, %eax
	xorl	%r14d, %r14d
	leaq	dp(%rip), %r12
	movq	%r12, 16(%rsp)
	movsd	.LC3(%rip), %xmm3
	pxor	%xmm2, %xmm2
	movl	%r10d, %ecx
	sall	%cl, %eax
	movl	%eax, 24(%rsp)
	leaq	w(%rip), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L27:
	movl	%r14d, %eax
	xorl	%esi, %esi
	movl	$1, %ebp
	sall	$16, %eax
	movl	%eax, 4(%rsp)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L123:
	addq	$1, %rsi
	addl	%ebp, %ebp
	cmpq	%r10, %rsi
	je	.L122
.L7:
	movslq	%esi, %r9
	testl	%r14d, %ebp
	jne	.L123
	movl	%ebp, %eax
	salq	$15, %r9
	movq	16(%rsp), %r8
	movq	8(%rsp), %rdi
	orl	%r14d, %eax
	xorl	%edx, %edx
	cltq
	addq	%rax, %r9
	leaq	0(,%r9,4), %r13
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	%esi, %edx
	je	.L9
	movl	(%rdi), %ecx
	testl	%ecx, %ecx
	je	.L9
	movl	(%rbx,%rsi,4), %eax
	subl	(%rbx,%rdx,4), %eax
	pxor	%xmm0, %xmm0
	movl	%eax, %r15d
	movsd	(%r12,%r9,8), %xmm1
	negl	%r15d
	cmovns	%r15d, %eax
	leal	7(%rcx,%rcx), %r15d
	imull	%r15d, %eax
	ucomisd	%xmm2, %xmm1
	cvtsi2sdl	%eax, %xmm0
	divsd	%xmm3, %xmm0
	addsd	(%r8), %xmm0
	jp	.L28
	je	.L10
.L28:
	comisd	%xmm0, %xmm1
	jbe	.L9
.L10:
	leaq	v(%rip), %rax
	movsd	%xmm0, (%r12,%r9,8)
	addl	(%rax,%rsi,4), %ecx
	leaq	w(%rip), %rax
	movl	%ecx, (%rax,%r9,4)
	movzwl	%dx, %eax
	orl	4(%rsp), %eax
	movl	%eax, (%r11,%r13)
.L9:
	addq	$1, %rdx
	addq	$131072, %rdi
	addq	$262144, %r8
	cmpq	%r10, %rdx
	jne	.L13
	addq	$1, %rsi
	addl	%ebp, %ebp
	cmpq	%r10, %rsi
	jne	.L7
.L122:
	addq	$4, 8(%rsp)
	addl	$1, %r14d
	addq	$8, 16(%rsp)
	cmpl	24(%rsp), %r14d
	jne	.L27
	leal	-1(%r14), %esi
	movsd	.LC0(%rip), %xmm1
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	movslq	%esi, %rsi
	movl	28(%rsp), %edi
	leaq	(%r12,%rsi,8), %rdx
	.p2align 4,,10
	.p2align 3
.L19:
	movsd	(%rdx), %xmm0
	ucomisd	%xmm2, %xmm0
	jp	.L29
	je	.L16
.L29:
	comisd	%xmm0, %xmm1
	minsd	%xmm1, %xmm0
	cmova	%eax, %ecx
	movapd	%xmm0, %xmm1
.L16:
	addl	$1, %eax
	addq	$262144, %rdx
	cmpl	%edi, %eax
	jne	.L19
	movl	28(%rsp), %eax
	movl	%ecx, ord(%rip)
	leal	-1(%rax), %ebx
	cmpl	$1, %eax
	je	.L21
	movl	%eax, %edi
	movslq	%ecx, %rax
	salq	$15, %rax
	addq	%rsi, %rax
	movswl	(%r11,%rax,4), %edx
	movswq	2(%r11,%rax,4), %rcx
	movl	%edx, 4+ord(%rip)
	cmpl	$2, %edi
	je	.L21
	movslq	%edx, %rax
	salq	$15, %rax
	addq	%rcx, %rax
	movswl	(%r11,%rax,4), %edx
	movswl	2(%r11,%rax,4), %eax
	movl	%edx, 8+ord(%rip)
	cmpl	$3, %edi
	je	.L21
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$15, %rax
	addq	%rcx, %rax
	movswq	(%r11,%rax,4), %rdx
	movswq	2(%r11,%rax,4), %rax
	movl	%edx, 12+ord(%rip)
	cmpl	$4, %edi
	je	.L21
	salq	$15, %rdx
	addq	%rax, %rdx
	movswq	(%r11,%rdx,4), %rax
	movswq	2(%r11,%rdx,4), %rdx
	movl	%eax, 16+ord(%rip)
	cmpl	$5, %edi
	je	.L21
	salq	$15, %rax
	addq	%rdx, %rax
	movswl	(%r11,%rax,4), %edx
	movswl	2(%r11,%rax,4), %eax
	movl	%edx, 20+ord(%rip)
	cmpl	$6, %edi
	je	.L21
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$15, %rax
	addq	%rcx, %rax
	movswq	(%r11,%rax,4), %rdx
	movswq	2(%r11,%rax,4), %rax
	movl	%edx, 24+ord(%rip)
	cmpl	$7, %edi
	je	.L21
	salq	$15, %rdx
	addq	%rax, %rdx
	movswl	(%r11,%rdx,4), %eax
	movswq	2(%r11,%rdx,4), %rcx
	movl	%eax, 28+ord(%rip)
	cmpl	$8, %edi
	je	.L21
	movslq	%eax, %rdx
	salq	$15, %rdx
	addq	%rcx, %rdx
	movswl	(%r11,%rdx,4), %eax
	movswq	2(%r11,%rdx,4), %rcx
	movl	%eax, 32+ord(%rip)
	cmpl	$9, %edi
	je	.L21
	movslq	%eax, %rdx
	salq	$15, %rdx
	addq	%rcx, %rdx
	movswl	(%r11,%rdx,4), %eax
	movswq	2(%r11,%rdx,4), %rcx
	movl	%eax, 36+ord(%rip)
	cmpl	$10, %edi
	je	.L21
	movslq	%eax, %rdx
	salq	$15, %rdx
	addq	%rcx, %rdx
	movswl	(%r11,%rdx,4), %eax
	movswq	2(%r11,%rdx,4), %rcx
	movl	%eax, 40+ord(%rip)
	cmpl	$11, %edi
	je	.L21
	movslq	%eax, %rdx
	salq	$15, %rdx
	addq	%rcx, %rdx
	movswl	(%r11,%rdx,4), %eax
	movswq	2(%r11,%rdx,4), %rcx
	movl	%eax, 44+ord(%rip)
	cmpl	$12, %edi
	je	.L21
	movslq	%eax, %rdx
	salq	$15, %rdx
	addq	%rcx, %rdx
	movswq	(%r11,%rdx,4), %rax
	movswq	2(%r11,%rdx,4), %rdx
	movl	%eax, 48+ord(%rip)
	cmpl	$13, %edi
	je	.L21
	salq	$15, %rax
	addq	%rdx, %rax
	movswl	(%r11,%rax,4), %edx
	movswl	2(%r11,%rax,4), %eax
	movl	%edx, 52+ord(%rip)
	cmpl	$15, %edi
	jne	.L21
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$15, %rax
	addq	%rcx, %rax
	movswl	(%r11,%rax,4), %eax
	movl	%eax, 56+ord(%rip)
.L21:
	movslq	%ebx, %rbx
	leaq	ord(%rip), %r12
	leaq	.LC5(%rip), %rbp
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L124:
	movl	$32, %ecx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	subq	$1, %rbx
	testl	%ebx, %ebx
	js	.L119
.L22:
	movslq	(%r12,%rbx,4), %rax
	leaq	s(%rip), %rdi
	movl	(%rdi,%rax,4), %edx
	testl	%ebx, %ebx
	jne	.L124
	movl	$10, %ecx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L119:
	addq	$40, %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
.L2:
	.cfi_restore_state
	movl	$1966080, %edx
	orl	$-1, %esi
	leaq	prev(%rip), %rdi
	call	memset@PLT
.L4:
	movl	$0, ord(%rip)
	jmp	.L119
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	ord
	.bss
	.align 32
	.type	ord, @object
	.size	ord, 60
ord:
	.zero	60
	.globl	prev
	.align 32
	.type	prev, @object
	.size	prev, 1966080
prev:
	.zero	1966080
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 1966080
w:
	.zero	1966080
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 3932160
dp:
	.zero	3932160
	.globl	v
	.align 32
	.type	v, @object
	.size	v, 60
v:
	.zero	60
	.globl	l
	.align 32
	.type	l, @object
	.size	l, 60
l:
	.zero	60
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 60
s:
	.zero	60
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	INF
	.section	.rodata
	.align 8
	.type	INF, @object
	.size	INF, 8
INF:
	.long	536870912
	.long	1107468383
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	536870912
	.long	1107468383
	.align 8
.LC3:
	.long	0
	.long	1080623104
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d%d"
.LC5:
	.string	"%d%c"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebp, %ebp
	xorl	%r13d, %r13d
	leaq	l(%rip), %rbx
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	v(%rip), %rax
	leaq	(%rbx,%rbp), %rdx
	movq	%r12, %rdi
	addl	$1, %r13d
	leaq	(%rax,%rbp), %rcx
	leaq	s(%rip), %rax
	leaq	(%rax,%rbp), %rsi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	cmpl	%r13d, %eax
	jg	.L3
	leaq	prev(%rip), %r11
	movl	$1966080, %edx
	movl	%eax, 28(%rsp)
	movl	%eax, %r14d
	movq	%r11, %rdi
	movl	$-1, %esi
	call	memset@PLT
	movq	%rax, %r11
	testl	%r14d, %r14d
	jle	.L4
	leaq	v(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4+w(%rip)
	cmpl	$1, %r14d
	je	.L5
	movl	4+v(%rip), %eax
	movl	%eax, 131080+w(%rip)
	cmpl	$2, %r14d
	je	.L5
	movl	8+v(%rip), %eax
	movl	%eax, 262160+w(%rip)
	cmpl	$3, %r14d
	je	.L5
	movl	12+v(%rip), %eax
	movl	%eax, 393248+w(%rip)
	cmpl	$4, %r14d
	je	.L5
	movl	16+v(%rip), %eax
	movl	%eax, 524352+w(%rip)
	cmpl	$5, %r14d
	je	.L5
	movl	20+v(%rip), %eax
	movl	%eax, 655488+w(%rip)
	cmpl	$6, %r14d
	je	.L5
	movl	24+v(%rip), %eax
	movl	%eax, 786688+w(%rip)
	cmpl	$7, %r14d
	je	.L5
	movl	28+v(%rip), %eax
	movl	%eax, 918016+w(%rip)
	cmpl	$8, %r14d
	je	.L5
	movl	32+v(%rip), %eax
	movl	%eax, 1049600+w(%rip)
	cmpl	$9, %r14d
	je	.L5
	movl	36+v(%rip), %eax
	movl	%eax, 1181696+w(%rip)
	cmpl	$10, %r14d
	je	.L5
	movl	40+v(%rip), %eax
	movl	%eax, 1314816+w(%rip)
	cmpl	$11, %r14d
	je	.L5
	movl	44+v(%rip), %eax
	movl	%eax, 1449984+w(%rip)
	cmpl	$12, %r14d
	je	.L5
	movl	48+v(%rip), %eax
	movl	%eax, 1589248+w(%rip)
	cmpl	$13, %r14d
	je	.L5
	movl	52+v(%rip), %eax
	movl	%eax, 1736704+w(%rip)
	cmpl	$14, %r14d
	je	.L5
	movl	56+v(%rip), %eax
	movl	%eax, 1900544+w(%rip)
.L5:
	movslq	28(%rsp), %r10
	movl	$1, %eax
	xorl	%r14d, %r14d
	leaq	dp(%rip), %r12
	movq	%r12, 16(%rsp)
	movsd	.LC3(%rip), %xmm3
	pxor	%xmm2, %xmm2
	movl	%r10d, %ecx
	sall	%cl, %eax
	movl	%eax, 24(%rsp)
	leaq	w(%rip), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L27:
	movl	%r14d, %eax
	xorl	%esi, %esi
	movl	$1, %ebp
	sall	$16, %eax
	movl	%eax, 4(%rsp)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L123:
	addq	$1, %rsi
	addl	%ebp, %ebp
	cmpq	%r10, %rsi
	je	.L122
.L7:
	movslq	%esi, %r9
	testl	%r14d, %ebp
	jne	.L123
	movl	%ebp, %eax
	salq	$15, %r9
	movq	16(%rsp), %r8
	movq	8(%rsp), %rdi
	orl	%r14d, %eax
	xorl	%edx, %edx
	cltq
	addq	%rax, %r9
	leaq	0(,%r9,4), %r13
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	%esi, %edx
	je	.L9
	movl	(%rdi), %ecx
	testl	%ecx, %ecx
	je	.L9
	movl	(%rbx,%rsi,4), %eax
	subl	(%rbx,%rdx,4), %eax
	pxor	%xmm0, %xmm0
	movl	%eax, %r15d
	movsd	(%r12,%r9,8), %xmm1
	negl	%r15d
	cmovns	%r15d, %eax
	leal	7(%rcx,%rcx), %r15d
	imull	%r15d, %eax
	ucomisd	%xmm2, %xmm1
	cvtsi2sdl	%eax, %xmm0
	divsd	%xmm3, %xmm0
	addsd	(%r8), %xmm0
	jp	.L28
	je	.L10
.L28:
	comisd	%xmm0, %xmm1
	jbe	.L9
.L10:
	leaq	v(%rip), %rax
	movsd	%xmm0, (%r12,%r9,8)
	addl	(%rax,%rsi,4), %ecx
	leaq	w(%rip), %rax
	movl	%ecx, (%rax,%r9,4)
	movzwl	%dx, %eax
	orl	4(%rsp), %eax
	movl	%eax, (%r11,%r13)
.L9:
	addq	$1, %rdx
	addq	$131072, %rdi
	addq	$262144, %r8
	cmpq	%r10, %rdx
	jne	.L13
	addq	$1, %rsi
	addl	%ebp, %ebp
	cmpq	%r10, %rsi
	jne	.L7
.L122:
	addq	$4, 8(%rsp)
	addl	$1, %r14d
	addq	$8, 16(%rsp)
	cmpl	24(%rsp), %r14d
	jne	.L27
	leal	-1(%r14), %esi
	movsd	.LC0(%rip), %xmm1
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	movslq	%esi, %rsi
	movl	28(%rsp), %edi
	leaq	(%r12,%rsi,8), %rdx
	.p2align 4,,10
	.p2align 3
.L19:
	movsd	(%rdx), %xmm0
	ucomisd	%xmm2, %xmm0
	jp	.L29
	je	.L16
.L29:
	comisd	%xmm0, %xmm1
	minsd	%xmm1, %xmm0
	cmova	%eax, %ecx
	movapd	%xmm0, %xmm1
.L16:
	addl	$1, %eax
	addq	$262144, %rdx
	cmpl	%edi, %eax
	jne	.L19
	movl	28(%rsp), %eax
	movl	%ecx, ord(%rip)
	leal	-1(%rax), %ebx
	cmpl	$1, %eax
	je	.L21
	movl	%eax, %edi
	movslq	%ecx, %rax
	salq	$15, %rax
	addq	%rsi, %rax
	movswl	(%r11,%rax,4), %edx
	movswq	2(%r11,%rax,4), %rcx
	movl	%edx, 4+ord(%rip)
	cmpl	$2, %edi
	je	.L21
	movslq	%edx, %rax
	salq	$15, %rax
	addq	%rcx, %rax
	movswl	(%r11,%rax,4), %edx
	movswl	2(%r11,%rax,4), %eax
	movl	%edx, 8+ord(%rip)
	cmpl	$3, %edi
	je	.L21
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$15, %rax
	addq	%rcx, %rax
	movswq	(%r11,%rax,4), %rdx
	movswq	2(%r11,%rax,4), %rax
	movl	%edx, 12+ord(%rip)
	cmpl	$4, %edi
	je	.L21
	salq	$15, %rdx
	addq	%rax, %rdx
	movswq	(%r11,%rdx,4), %rax
	movswq	2(%r11,%rdx,4), %rdx
	movl	%eax, 16+ord(%rip)
	cmpl	$5, %edi
	je	.L21
	salq	$15, %rax
	addq	%rdx, %rax
	movswl	(%r11,%rax,4), %edx
	movswl	2(%r11,%rax,4), %eax
	movl	%edx, 20+ord(%rip)
	cmpl	$6, %edi
	je	.L21
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$15, %rax
	addq	%rcx, %rax
	movswq	(%r11,%rax,4), %rdx
	movswq	2(%r11,%rax,4), %rax
	movl	%edx, 24+ord(%rip)
	cmpl	$7, %edi
	je	.L21
	salq	$15, %rdx
	addq	%rax, %rdx
	movswl	(%r11,%rdx,4), %eax
	movswq	2(%r11,%rdx,4), %rcx
	movl	%eax, 28+ord(%rip)
	cmpl	$8, %edi
	je	.L21
	movslq	%eax, %rdx
	salq	$15, %rdx
	addq	%rcx, %rdx
	movswl	(%r11,%rdx,4), %eax
	movswq	2(%r11,%rdx,4), %rcx
	movl	%eax, 32+ord(%rip)
	cmpl	$9, %edi
	je	.L21
	movslq	%eax, %rdx
	salq	$15, %rdx
	addq	%rcx, %rdx
	movswl	(%r11,%rdx,4), %eax
	movswq	2(%r11,%rdx,4), %rcx
	movl	%eax, 36+ord(%rip)
	cmpl	$10, %edi
	je	.L21
	movslq	%eax, %rdx
	salq	$15, %rdx
	addq	%rcx, %rdx
	movswl	(%r11,%rdx,4), %eax
	movswq	2(%r11,%rdx,4), %rcx
	movl	%eax, 40+ord(%rip)
	cmpl	$11, %edi
	je	.L21
	movslq	%eax, %rdx
	salq	$15, %rdx
	addq	%rcx, %rdx
	movswl	(%r11,%rdx,4), %eax
	movswq	2(%r11,%rdx,4), %rcx
	movl	%eax, 44+ord(%rip)
	cmpl	$12, %edi
	je	.L21
	movslq	%eax, %rdx
	salq	$15, %rdx
	addq	%rcx, %rdx
	movswq	(%r11,%rdx,4), %rax
	movswq	2(%r11,%rdx,4), %rdx
	movl	%eax, 48+ord(%rip)
	cmpl	$13, %edi
	je	.L21
	salq	$15, %rax
	addq	%rdx, %rax
	movswl	(%r11,%rax,4), %edx
	movswl	2(%r11,%rax,4), %eax
	movl	%edx, 52+ord(%rip)
	cmpl	$15, %edi
	jne	.L21
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$15, %rax
	addq	%rcx, %rax
	movswl	(%r11,%rax,4), %eax
	movl	%eax, 56+ord(%rip)
.L21:
	movslq	%ebx, %rbx
	leaq	ord(%rip), %r12
	leaq	.LC5(%rip), %rbp
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L124:
	movl	$32, %ecx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	subq	$1, %rbx
	testl	%ebx, %ebx
	js	.L119
.L22:
	movslq	(%r12,%rbx,4), %rax
	leaq	s(%rip), %rdi
	movl	(%rdi,%rax,4), %edx
	testl	%ebx, %ebx
	jne	.L124
	movl	$10, %ecx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L119:
	addq	$40, %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
.L2:
	.cfi_restore_state
	movl	$1966080, %edx
	orl	$-1, %esi
	leaq	prev(%rip), %rdi
	call	memset@PLT
.L4:
	movl	$0, ord(%rip)
	jmp	.L119
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	ord
	.bss
	.align 32
	.type	ord, @object
	.size	ord, 60
ord:
	.zero	60
	.globl	prev
	.align 32
	.type	prev, @object
	.size	prev, 1966080
prev:
	.zero	1966080
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 1966080
w:
	.zero	1966080
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 3932160
dp:
	.zero	3932160
	.globl	v
	.align 32
	.type	v, @object
	.size	v, 60
v:
	.zero	60
	.globl	l
	.align 32
	.type	l, @object
	.size	l, 60
l:
	.zero	60
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 60
s:
	.zero	60
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	INF
	.section	.rodata
	.align 8
	.type	INF, @object
	.size	INF, 8
INF:
	.long	536870912
	.long	1107468383
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	536870912
	.long	1107468383
	.align 8
.LC3:
	.long	0
	.long	1080623104
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>          // printf(), scanf()
#include <stdlib.h>         // abs()
#include <string.h>         // memset()
#include <stdbool.h>

#define MAX_N 15
#define MAX_S (1 << MAX_N)

const double INF = 1e10;

int n;
int s[MAX_N], l[MAX_N], v[MAX_N];
double dp[MAX_N][MAX_S];
int w[MAX_N][MAX_S];
short prev[MAX_N][MAX_S][2];
int ord[MAX_N];

int
main(int argc, char **argv)
{
	scanf("%d", &n);
	for (int i = 0; i < n; ++i)
		scanf("%d%d%d", &s[i], &l[i], &v[i]);

	memset(prev, -1, sizeof(prev));
	int S = 1;
	for (int i = 0; i < n; i++, S <<= 1)
		w[i][S] = v[i];

	int e = 1 << n;
	for (int k = 0; k < e; ++k)
	{
		S = 1;
		for (int i = 0; i < n; ++i, S <<= 1)
		{
			if (k & S)
				continue;

			int t = k | S;
			for (int j = 0; j < n; ++j)
			{
				if (i == j || w[j][k] == 0)
					continue;

				int d = abs(l[i] - l[j]);
				double x = dp[j][k] + (d * (7 + 2 * w[j][k])) / 200.0;
				if (dp[i][t] == 0 || x < dp[i][t])
				{
					dp[i][t] = x;
					w[i][t] = w[j][k] + v[i];
					prev[i][t][0] = j;
					prev[i][t][1] = k;
				}
			}
		}
	}

	double min = INF;
	int u = 0;
	for (int i = 0; i < n; ++i)
	{
		double y = dp[i][e - 1];
		if (y == 0)
			continue;

		if (y < min)
		{
			min = y;
			u = i;
		}
	}

	ord[0] = u;
	int v = e - 1;
	for (int k = 1; k < n; ++k)
	{
		ord[k] = prev[u][v][0];
		v = prev[u][v][1];
		u = ord[k];
	}

	for (int i = n - 1; i >= 0; --i)
		printf("%d%c", s[ord[i]], (i != 0) ? ' ' : '\n');

	return 0;
}
5
13 199 1
93 1000 1
37 350 10
27 300 2
99 200 1000
 3
9 100 1
13 200 20
12 300 3
 2
2 100 1
2 200 2
 5
13 199 1
93 1000 1
37 350 10
27 300 2
82 200 1000
 3
9 100 1
13 200 20
19 300 3
 5
13 199 1
93 1000 1
37 350 10
27 300 2
123 200 1100
 3
9 100 0
13 200 20
24 300 3
 3
9 100 0
26 200 20
24 300 3
 5
11 199 0
93 1000 1
37 350 10
27 300 2
123 200 1100
 3
9 100 0
26 30 20
24 300 3

93 37 27 13 99
 9 12 13
 2 2
 93 37 27 13 82
 9 19 13
 93 37 27 13 123
 24 9 13
 24 9 26
 93 37 27 11 123
 24 9 26

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

```c
#include <stdio.h>          // printf(), scanf()
#include <stdlib.h>         // abs()
#include <string.h>         // memset()
#include <stdbool.h>

#define MAX_N 15
#define MAX_S (1 << MAX_N)

const double INF = 1e10;

int n;
int s[MAX_N], l[MAX_N], v[MAX_N];
double dp[MAX_N][MAX_S];
int w[MAX_N][MAX_S];
short prev[MAX_N][MAX_S][2];
int ord[MAX_N];

int
main(int argc, char **argv)
{
	scanf("%d", &n);
	for (int i = 0; i < n; ++i)
		scanf("%d%d%d", &s[i], &l[i], &v[i]);

	memset(prev, -1, sizeof(prev));
	int S = 1;
	for (int i = 0; i < n; i++, S <<= 1)
		w[i][S] = v[i];

	int e = 1 << n;
	for (int k = 0; k < e; ++k)
	{
		S = 1;
		for (int i = 0; i < n; ++i, S <<= 1)
		{
			if (k & S)
				continue;

			int t = k | S;
			for (int j = 0; j < n; ++j)
			{
				if (i == j || w[j][k] == 0)
					continue;

				int d = abs(l[i] - l[j]);
				double x = dp[j][k] + (d * (7 + 2 * w[j][k])) / 200.0;
				if (dp[i][t] == 0 || x < dp[i][t])
				{
					dp[i][t] = x;
					w[i][t] = w[j][k] + v[i];
					prev[i][t][0] = j;
					prev[i][t][1] = k;
				}
			}
		}
	}

	double min = INF;
	int u = 0;
	for (int i = 0; i < n; ++i)
	{
		double y = dp[i][e - 1];
		if (y == 0)
			continue;

		if (y < min)
		{
			min = y;
			u = i;
		}
	}

	ord[0] = u;
	int v = e - 1;
	for (int k = 1; k < n; ++k)
	{
		ord[k] = prev[u][v][0];
		v = prev[u][v][1];
		u = ord[k];
	}

	for (int i = n - 1; i >= 0; --i)
		printf("%d%c", s[ord[i]], (i != 0) ? ' ' : '\n');

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	INF
	.section	.rodata
	.align 8
	.type	INF, @object
	.size	INF, 8
INF:
	.long	536870912
	.long	1107468383
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 60
s:
	.zero	60
	.globl	l
	.align 32
	.type	l, @object
	.size	l, 60
l:
	.zero	60
	.globl	v
	.align 32
	.type	v, @object
	.size	v, 60
v:
	.zero	60
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 3932160
dp:
	.zero	3932160
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 1966080
w:
	.zero	1966080
	.globl	prev
	.align 32
	.type	prev, @object
	.size	prev, 1966080
prev:
	.zero	1966080
	.globl	ord
	.align 32
	.type	ord, @object
	.size	ord, 60
ord:
	.zero	60
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC5:
	.string	"%d%c"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	movl	%edi, -84(%rbp)
	movq	%rsi, -96(%rbp)
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -80(%rbp)
	jmp	.L2
.L3:
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	addq	%rax, %rdx
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	leaq	s(%rip), %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -80(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -80(%rbp)
	jl	.L3
	movl	$1966080, %edx
	movl	$-1, %esi
	leaq	prev(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -76(%rbp)
	movl	$0, -72(%rbp)
	jmp	.L4
.L5:
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-76(%rbp), %edx
	movslq	%edx, %rcx
	movl	-72(%rbp), %edx
	movslq	%edx, %rdx
	salq	$15, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	w(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -72(%rbp)
	sall	-76(%rbp)
.L4:
	movl	n(%rip), %eax
	cmpl	%eax, -72(%rbp)
	jl	.L5
	movl	n(%rip), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	movl	%eax, -36(%rbp)
	movl	$0, -68(%rbp)
	jmp	.L6
.L19:
	movl	$1, -76(%rbp)
	movl	$0, -64(%rbp)
	jmp	.L7
.L18:
	movl	-68(%rbp), %eax
	andl	-76(%rbp), %eax
	testl	%eax, %eax
	jne	.L35
	movl	-68(%rbp), %eax
	orl	-76(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	$0, -60(%rbp)
	jmp	.L10
.L17:
	movl	-64(%rbp), %eax
	cmpl	-60(%rbp), %eax
	je	.L36
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movl	-60(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L36
	movl	-64(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-60(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	l(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movl	-60(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movsd	(%rdx,%rax), %xmm1
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movl	-60(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %eax
	addl	$7, %eax
	imull	-28(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	.LC2(%rip), %xmm2
	divsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -8(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L33
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	je	.L14
.L33:
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	comisd	-8(%rbp), %xmm0
	jbe	.L13
.L14:
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movsd	-8(%rbp), %xmm0
	movsd	%xmm0, (%rdx,%rax)
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movl	-60(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-64(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-60(%rbp), %eax
	movl	%eax, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	prev(%rip), %rax
	movw	%cx, (%rdx,%rax)
	movl	-68(%rbp), %eax
	movl	%eax, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	2+prev(%rip), %rax
	movw	%cx, (%rdx,%rax)
	jmp	.L13
.L36:
	nop
.L13:
	addl	$1, -60(%rbp)
.L10:
	movl	n(%rip), %eax
	cmpl	%eax, -60(%rbp)
	jl	.L17
	jmp	.L9
.L35:
	nop
.L9:
	addl	$1, -64(%rbp)
	sall	-76(%rbp)
.L7:
	movl	n(%rip), %eax
	cmpl	%eax, -64(%rbp)
	jl	.L18
	addl	$1, -68(%rbp)
.L6:
	movl	-68(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L19
	movsd	.LC4(%rip), %xmm0
	movsd	%xmm0, -24(%rbp)
	movl	$0, -56(%rbp)
	movl	$0, -52(%rbp)
	jmp	.L20
.L25:
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-52(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movsd	%xmm0, -16(%rbp)
	pxor	%xmm0, %xmm0
	ucomisd	-16(%rbp), %xmm0
	jp	.L21
	pxor	%xmm0, %xmm0
	ucomisd	-16(%rbp), %xmm0
	je	.L37
.L21:
	movsd	-24(%rbp), %xmm0
	comisd	-16(%rbp), %xmm0
	jbe	.L23
	movsd	-16(%rbp), %xmm0
	movsd	%xmm0, -24(%rbp)
	movl	-52(%rbp), %eax
	movl	%eax, -56(%rbp)
	jmp	.L23
.L37:
	nop
.L23:
	addl	$1, -52(%rbp)
.L20:
	movl	n(%rip), %eax
	cmpl	%eax, -52(%rbp)
	jl	.L25
	movl	-56(%rbp), %eax
	movl	%eax, ord(%rip)
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -48(%rbp)
	movl	$1, -44(%rbp)
	jmp	.L26
.L27:
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movl	-56(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	prev(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	cwtl
	movl	-44(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	ord(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movl	-56(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	2+prev(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	cwtl
	movl	%eax, -48(%rbp)
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ord(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -56(%rbp)
	addl	$1, -44(%rbp)
.L26:
	movl	n(%rip), %eax
	cmpl	%eax, -44(%rbp)
	jl	.L27
	movl	n(%rip), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	jmp	.L28
.L31:
	cmpl	$0, -40(%rbp)
	je	.L29
	movl	$32, %ecx
	jmp	.L30
.L29:
	movl	$10, %ecx
.L30:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ord(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%ecx, %edx
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	subl	$1, -40(%rbp)
.L28:
	cmpl	$0, -40(%rbp)
	jns	.L31
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	0
	.long	1080623104
	.align 8
.LC4:
	.long	536870912
	.long	1107468383
	.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	INF
	.section	.rodata
	.align 8
	.type	INF, @object
	.size	INF, 8
INF:
	.long	536870912
	.long	1107468383
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 60
s:
	.zero	60
	.globl	l
	.align 32
	.type	l, @object
	.size	l, 60
l:
	.zero	60
	.globl	v
	.align 32
	.type	v, @object
	.size	v, 60
v:
	.zero	60
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 3932160
dp:
	.zero	3932160
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 1966080
w:
	.zero	1966080
	.globl	prev
	.align 32
	.type	prev, @object
	.size	prev, 1966080
prev:
	.zero	1966080
	.globl	ord
	.align 32
	.type	ord, @object
	.size	ord, 60
ord:
	.zero	60
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC5:
	.string	"%d%c"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	movl	%edi, -84(%rbp)
	movq	%rsi, -96(%rbp)
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -80(%rbp)
	jmp	.L2
.L3:
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	addq	%rax, %rdx
	movl	-80(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	leaq	s(%rip), %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -80(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -80(%rbp)
	jl	.L3
	movl	$1966080, %edx
	movl	$-1, %esi
	leaq	prev(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, -76(%rbp)
	movl	$0, -72(%rbp)
	jmp	.L4
.L5:
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-76(%rbp), %edx
	movslq	%edx, %rcx
	movl	-72(%rbp), %edx
	movslq	%edx, %rdx
	salq	$15, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	w(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -72(%rbp)
	sall	-76(%rbp)
.L4:
	movl	n(%rip), %eax
	cmpl	%eax, -72(%rbp)
	jl	.L5
	movl	n(%rip), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	movl	%eax, -36(%rbp)
	movl	$0, -68(%rbp)
	jmp	.L6
.L19:
	movl	$1, -76(%rbp)
	movl	$0, -64(%rbp)
	jmp	.L7
.L18:
	movl	-68(%rbp), %eax
	andl	-76(%rbp), %eax
	testl	%eax, %eax
	jne	.L35
	movl	-68(%rbp), %eax
	orl	-76(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	$0, -60(%rbp)
	jmp	.L10
.L17:
	movl	-64(%rbp), %eax
	cmpl	-60(%rbp), %eax
	je	.L36
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movl	-60(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L36
	movl	-64(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	l(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-60(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	l(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, -28(%rbp)
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movl	-60(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movsd	(%rdx,%rax), %xmm1
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movl	-60(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %eax
	addl	$7, %eax
	imull	-28(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	.LC2(%rip), %xmm2
	divsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -8(%rbp)
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jp	.L33
	pxor	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	je	.L14
.L33:
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	comisd	-8(%rbp), %xmm0
	jbe	.L13
.L14:
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movsd	-8(%rbp), %xmm0
	movsd	%xmm0, (%rdx,%rax)
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movl	-60(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-64(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	w(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-60(%rbp), %eax
	movl	%eax, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	prev(%rip), %rax
	movw	%cx, (%rdx,%rax)
	movl	-68(%rbp), %eax
	movl	%eax, %ecx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	2+prev(%rip), %rax
	movw	%cx, (%rdx,%rax)
	jmp	.L13
.L36:
	nop
.L13:
	addl	$1, -60(%rbp)
.L10:
	movl	n(%rip), %eax
	cmpl	%eax, -60(%rbp)
	jl	.L17
	jmp	.L9
.L35:
	nop
.L9:
	addl	$1, -64(%rbp)
	sall	-76(%rbp)
.L7:
	movl	n(%rip), %eax
	cmpl	%eax, -64(%rbp)
	jl	.L18
	addl	$1, -68(%rbp)
.L6:
	movl	-68(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L19
	movsd	.LC4(%rip), %xmm0
	movsd	%xmm0, -24(%rbp)
	movl	$0, -56(%rbp)
	movl	$0, -52(%rbp)
	jmp	.L20
.L25:
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-52(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movsd	(%rdx,%rax), %xmm0
	movsd	%xmm0, -16(%rbp)
	pxor	%xmm0, %xmm0
	ucomisd	-16(%rbp), %xmm0
	jp	.L21
	pxor	%xmm0, %xmm0
	ucomisd	-16(%rbp), %xmm0
	je	.L37
.L21:
	movsd	-24(%rbp), %xmm0
	comisd	-16(%rbp), %xmm0
	jbe	.L23
	movsd	-16(%rbp), %xmm0
	movsd	%xmm0, -24(%rbp)
	movl	-52(%rbp), %eax
	movl	%eax, -56(%rbp)
	jmp	.L23
.L37:
	nop
.L23:
	addl	$1, -52(%rbp)
.L20:
	movl	n(%rip), %eax
	cmpl	%eax, -52(%rbp)
	jl	.L25
	movl	-56(%rbp), %eax
	movl	%eax, ord(%rip)
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -48(%rbp)
	movl	$1, -44(%rbp)
	jmp	.L26
.L27:
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movl	-56(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	prev(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	cwtl
	movl	-44(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	ord(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movl	-56(%rbp), %eax
	cltq
	salq	$15, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	2+prev(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	cwtl
	movl	%eax, -48(%rbp)
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ord(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -56(%rbp)
	addl	$1, -44(%rbp)
.L26:
	movl	n(%rip), %eax
	cmpl	%eax, -44(%rbp)
	jl	.L27
	movl	n(%rip), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	jmp	.L28
.L31:
	cmpl	$0, -40(%rbp)
	je	.L29
	movl	$32, %ecx
	jmp	.L30
.L29:
	movl	$10, %ecx
.L30:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ord(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%ecx, %edx
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	subl	$1, -40(%rbp)
.L28:
	cmpl	$0, -40(%rbp)
	jns	.L31
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	0
	.long	1080623104
	.align 8
.LC4:
	.long	536870912
	.long	1107468383
	.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:
