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

```c
#pragma GCC optimize("Ofast")
#include <stdio.h>
#include <stdlib.h>
__attribute__((always_inline)) __inline__
long long max(long long x,long long y) {
	return ((y-x>>64-1)&(x^y))^y;
}
typedef struct {int w,s,v;}node;
int cmp(const void *a,const void *b){
	return (((node*)a)->w+((node*)a)->s)-(((node*)b)->w+((node*)b)->s);
}
node b[1005];
long long dp[20005],ans;
int main(n)
{
	scanf("%d",&n);
	for (int i=0;i<n;i++)
		scanf("%d%d%d",&b[i].w,&b[i].s,&b[i].v);
	qsort(b,n,sizeof(node),cmp);
	for (int i=0;i<n;i++) for (int j=b[i].s;j>=0;j--)
		dp[j+b[i].w]=max(dp[j+b[i].w],dp[j]+b[i].v);
	for (int i=0;i<=20000;i++) ans=max(ans,dp[i]);
	printf("%lld\n",ans);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	addl	4(%rdi), %eax
	subl	4(%rsi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE40:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	b(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	movq	%r12, %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	8(%rbx), %rcx
	leaq	4(%rbx), %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	addq	$12, %rbx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	%ebp, %eax
	jg	.L5
.L4:
	movslq	%eax, %rsi
	leaq	cmp(%rip), %rcx
	movl	$12, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L10
	subl	$1, %eax
	leaq	b(%rip), %r9
	leaq	dp(%rip), %rbx
	leaq	(%rax,%rax,2), %rdx
	leaq	12(%r9), %rax
	leaq	(%rax,%rdx,4), %r10
	leaq	-8(%rbx), %r11
	.p2align 4,,10
	.p2align 3
.L9:
	movl	4(%r9), %eax
	testl	%eax, %eax
	js	.L12
	movslq	(%r9), %rdi
	movslq	8(%r9), %r8
	addl	%edi, %eax
	leaq	(%r11,%rdi,8), %rbp
	negq	%rdi
	cltq
	leaq	(%rbx,%rax,8), %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	movq	(%rdx,%rdi,8), %rsi
	movq	(%rdx), %rcx
	subq	$8, %rdx
	addq	%r8, %rsi
	movq	%rsi, %rax
	subq	8(%rdx), %rax
	xorq	%rsi, %rcx
	sarq	$63, %rax
	andq	%rcx, %rax
	xorq	%rsi, %rax
	movq	%rax, 8(%rdx)
	cmpq	%rdx, %rbp
	jne	.L11
.L12:
	addq	$12, %r9
	cmpq	%r9, %r10
	jne	.L9
.L10:
	leaq	dp(%rip), %rcx
	movq	ans(%rip), %rdx
	leaq	160008(%rcx), %rdi
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rcx), %rsi
	addq	$8, %rcx
	movq	%rsi, %rax
	subq	%rdx, %rax
	xorq	%rsi, %rdx
	sarq	$63, %rax
	andq	%rdx, %rax
	xorq	%rsi, %rax
	movq	%rax, %rdx
	cmpq	%rcx, %rdi
	jne	.L7
	movq	%rax, ans(%rip)
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$24, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 160040
dp:
	.zero	160040
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 12060
b:
	.zero	12060
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	addl	4(%rdi), %eax
	subl	4(%rsi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE40:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	b(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	movq	%r12, %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	8(%rbx), %rcx
	leaq	4(%rbx), %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	addq	$12, %rbx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	%ebp, %eax
	jg	.L5
.L4:
	movslq	%eax, %rsi
	leaq	cmp(%rip), %rcx
	movl	$12, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L10
	subl	$1, %eax
	leaq	b(%rip), %r9
	leaq	dp(%rip), %rbx
	leaq	(%rax,%rax,2), %rdx
	leaq	12(%r9), %rax
	leaq	(%rax,%rdx,4), %r10
	leaq	-8(%rbx), %r11
	.p2align 4,,10
	.p2align 3
.L9:
	movl	4(%r9), %eax
	testl	%eax, %eax
	js	.L12
	movslq	(%r9), %rdi
	movslq	8(%r9), %r8
	addl	%edi, %eax
	leaq	(%r11,%rdi,8), %rbp
	negq	%rdi
	cltq
	leaq	(%rbx,%rax,8), %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	movq	(%rdx,%rdi,8), %rsi
	movq	(%rdx), %rcx
	subq	$8, %rdx
	addq	%r8, %rsi
	movq	%rsi, %rax
	subq	8(%rdx), %rax
	xorq	%rsi, %rcx
	sarq	$63, %rax
	andq	%rcx, %rax
	xorq	%rsi, %rax
	movq	%rax, 8(%rdx)
	cmpq	%rdx, %rbp
	jne	.L11
.L12:
	addq	$12, %r9
	cmpq	%r9, %r10
	jne	.L9
.L10:
	leaq	dp(%rip), %rcx
	movq	ans(%rip), %rdx
	leaq	160008(%rcx), %rdi
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rcx), %rsi
	addq	$8, %rcx
	movq	%rsi, %rax
	subq	%rdx, %rax
	xorq	%rsi, %rdx
	sarq	$63, %rax
	andq	%rdx, %rax
	xorq	%rsi, %rax
	movq	%rax, %rdx
	cmpq	%rcx, %rdi
	jne	.L7
	movq	%rax, ans(%rip)
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$24, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 160040
dp:
	.zero	160040
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 12060
b:
	.zero	12060
	.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
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	addl	4(%rdi), %eax
	subl	4(%rsi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE40:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	b(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	movq	%r12, %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	8(%rbx), %rcx
	leaq	4(%rbx), %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	addq	$12, %rbx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	%ebp, %eax
	jg	.L5
.L4:
	movslq	%eax, %rsi
	leaq	cmp(%rip), %rcx
	movl	$12, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L10
	subl	$1, %eax
	leaq	b(%rip), %r9
	leaq	dp(%rip), %rbx
	leaq	(%rax,%rax,2), %rdx
	leaq	12(%r9), %rax
	leaq	(%rax,%rdx,4), %r10
	leaq	-8(%rbx), %r11
	.p2align 4,,10
	.p2align 3
.L9:
	movl	4(%r9), %eax
	testl	%eax, %eax
	js	.L12
	movslq	(%r9), %rdi
	movslq	8(%r9), %r8
	addl	%edi, %eax
	leaq	(%r11,%rdi,8), %rbp
	negq	%rdi
	cltq
	leaq	(%rbx,%rax,8), %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	movq	(%rdx,%rdi,8), %rsi
	movq	(%rdx), %rcx
	subq	$8, %rdx
	addq	%r8, %rsi
	movq	%rsi, %rax
	subq	8(%rdx), %rax
	xorq	%rsi, %rcx
	sarq	$63, %rax
	andq	%rcx, %rax
	xorq	%rsi, %rax
	movq	%rax, 8(%rdx)
	cmpq	%rdx, %rbp
	jne	.L11
.L12:
	addq	$12, %r9
	cmpq	%r9, %r10
	jne	.L9
.L10:
	leaq	dp(%rip), %rcx
	movq	ans(%rip), %rdx
	leaq	160008(%rcx), %rdi
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rcx), %rsi
	addq	$8, %rcx
	movq	%rsi, %rax
	subq	%rdx, %rax
	xorq	%rsi, %rdx
	sarq	$63, %rax
	andq	%rdx, %rax
	xorq	%rsi, %rax
	movq	%rax, %rdx
	cmpq	%rcx, %rdi
	jne	.L7
	movq	%rax, ans(%rip)
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$24, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 160040
dp:
	.zero	160040
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 12060
b:
	.zero	12060
	.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:
```
```c
#pragma GCC optimize("Ofast")
#include <stdio.h>
#include <stdlib.h>
__attribute__((always_inline)) __inline__
long long max(long long x,long long y) {
	return ((y-x>>64-1)&(x^y))^y;
}
typedef struct {int w,s,v;}node;
int cmp(const void *a,const void *b){
	return (((node*)a)->w+((node*)a)->s)-(((node*)b)->w+((node*)b)->s);
}
node b[1005];
long long dp[20005],ans;
int main(n)
{
	scanf("%d",&n);
	for (int i=0;i<n;i++)
		scanf("%d%d%d",&b[i].w,&b[i].s,&b[i].v);
	qsort(b,n,sizeof(node),cmp);
	for (int i=0;i<n;i++) for (int j=b[i].s;j>=0;j--)
		dp[j+b[i].w]=max(dp[j+b[i].w],dp[j]+b[i].v);
	for (int i=0;i<=20000;i++) ans=max(ans,dp[i]);
	printf("%lld\n",ans);
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#pragma GCC optimize("Ofast")
#include <stdio.h>
#include <stdlib.h>
__attribute__((always_inline)) __inline__
long long max(long long x,long long y) {
	return ((y-x>>64-1)&(x^y))^y;
}
typedef struct {int w,s,v;}node;
int cmp(const void *a,const void *b){
	return (((node*)a)->w+((node*)a)->s)-(((node*)b)->w+((node*)b)->s);
}
node b[1005];
long long dp[20005],ans;
int main(n)
{
	scanf("%d",&n);
	for (int i=0;i<n;i++)
		scanf("%d%d%d",&b[i].w,&b[i].s,&b[i].v);
	qsort(b,n,sizeof(node),cmp);
	for (int i=0;i<n;i++) for (int j=b[i].s;j>=0;j--)
		dp[j+b[i].w]=max(dp[j+b[i].w],dp[j]+b[i].v);
	for (int i=0;i<=20000;i++) ans=max(ans,dp[i]);
	printf("%lld\n",ans);
	return 0;
}```

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.
Optimized Assembly Code:

5
1 10000 1000000001
1 10000 1000000000
1 10000 1000000000
1 10000 1000000000
1 10000 1000000000
 3
2 2 20
2 1 30
3 1 47
 4
1 2 10
3 1 10
2 4 15
1 6 10
 8
9 5 7
6 2 7
5 7 3
7 8 8
1 8 6
3 3 3
4 1 7
4 5 5
 4
1 2 10
3 1 10
2 4 29
1 6 10
 4
1 2 10
3 1 10
2 4 3
1 6 10
 8
9 5 7
0 2 7
5 7 3
7 8 8
1 8 6
3 2 3
4 1 7
4 8 5
 5
1 11000 1000000001
1 10100 1000000000
1 10000 1000000000
1 00000 1000000000
1 00000 1000000000
 4
2 2 10
3 2 10
2 4 3
1 6 10
 8
4 5 7
0 2 7
5 7 3
5 8 8
1 8 6
3 2 3
4 1 7
4 8 5

5000000001
 50
 45
 22
 59
 33
 29
 4000000001
 30
 31

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

```c
#pragma GCC optimize("Ofast")
#include <stdio.h>
#include <stdlib.h>
__attribute__((always_inline)) __inline__
long long max(long long x,long long y) {
	return ((y-x>>64-1)&(x^y))^y;
}
typedef struct {int w,s,v;}node;
int cmp(const void *a,const void *b){
	return (((node*)a)->w+((node*)a)->s)-(((node*)b)->w+((node*)b)->s);
}
node b[1005];
long long dp[20005],ans;
int main(n)
{
	scanf("%d",&n);
	for (int i=0;i<n;i++)
		scanf("%d%d%d",&b[i].w,&b[i].s,&b[i].v);
	qsort(b,n,sizeof(node),cmp);
	for (int i=0;i<n;i++) for (int j=b[i].s;j>=0;j--)
		dp[j+b[i].w]=max(dp[j+b[i].w],dp[j]+b[i].v);
	for (int i=0;i<=20000;i++) ans=max(ans,dp[i]);
	printf("%lld\n",ans);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	addl	4(%rdi), %eax
	subl	4(%rsi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE40:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	b(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	movq	%r12, %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	8(%rbx), %rcx
	leaq	4(%rbx), %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	addq	$12, %rbx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	%ebp, %eax
	jg	.L5
.L4:
	movslq	%eax, %rsi
	leaq	cmp(%rip), %rcx
	movl	$12, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L10
	subl	$1, %eax
	leaq	b(%rip), %r9
	leaq	dp(%rip), %rbx
	leaq	(%rax,%rax,2), %rdx
	leaq	12(%r9), %rax
	leaq	(%rax,%rdx,4), %r10
	leaq	-8(%rbx), %r11
	.p2align 4,,10
	.p2align 3
.L9:
	movl	4(%r9), %eax
	testl	%eax, %eax
	js	.L12
	movslq	(%r9), %rdi
	movslq	8(%r9), %r8
	addl	%edi, %eax
	leaq	(%r11,%rdi,8), %rbp
	negq	%rdi
	cltq
	leaq	(%rbx,%rax,8), %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	movq	(%rdx,%rdi,8), %rsi
	movq	(%rdx), %rcx
	subq	$8, %rdx
	addq	%r8, %rsi
	movq	%rsi, %rax
	subq	8(%rdx), %rax
	xorq	%rsi, %rcx
	sarq	$63, %rax
	andq	%rcx, %rax
	xorq	%rsi, %rax
	movq	%rax, 8(%rdx)
	cmpq	%rdx, %rbp
	jne	.L11
.L12:
	addq	$12, %r9
	cmpq	%r9, %r10
	jne	.L9
.L10:
	leaq	dp(%rip), %rcx
	movq	ans(%rip), %rdx
	leaq	160008(%rcx), %rdi
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rcx), %rsi
	addq	$8, %rcx
	movq	%rsi, %rax
	subq	%rdx, %rax
	xorq	%rsi, %rdx
	sarq	$63, %rax
	andq	%rdx, %rax
	xorq	%rsi, %rax
	movq	%rax, %rdx
	cmpq	%rcx, %rdi
	jne	.L7
	movq	%rax, ans(%rip)
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$24, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 160040
dp:
	.zero	160040
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 12060
b:
	.zero	12060
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	addl	4(%rdi), %eax
	subl	4(%rsi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE40:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	b(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	movq	%r12, %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	8(%rbx), %rcx
	leaq	4(%rbx), %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	addq	$12, %rbx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	%ebp, %eax
	jg	.L5
.L4:
	movslq	%eax, %rsi
	leaq	cmp(%rip), %rcx
	movl	$12, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L10
	subl	$1, %eax
	leaq	b(%rip), %r9
	leaq	dp(%rip), %rbx
	leaq	(%rax,%rax,2), %rdx
	leaq	12(%r9), %rax
	leaq	(%rax,%rdx,4), %r10
	leaq	-8(%rbx), %r11
	.p2align 4,,10
	.p2align 3
.L9:
	movl	4(%r9), %eax
	testl	%eax, %eax
	js	.L12
	movslq	(%r9), %rdi
	movslq	8(%r9), %r8
	addl	%edi, %eax
	leaq	(%r11,%rdi,8), %rbp
	negq	%rdi
	cltq
	leaq	(%rbx,%rax,8), %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	movq	(%rdx,%rdi,8), %rsi
	movq	(%rdx), %rcx
	subq	$8, %rdx
	addq	%r8, %rsi
	movq	%rsi, %rax
	subq	8(%rdx), %rax
	xorq	%rsi, %rcx
	sarq	$63, %rax
	andq	%rcx, %rax
	xorq	%rsi, %rax
	movq	%rax, 8(%rdx)
	cmpq	%rdx, %rbp
	jne	.L11
.L12:
	addq	$12, %r9
	cmpq	%r9, %r10
	jne	.L9
.L10:
	leaq	dp(%rip), %rcx
	movq	ans(%rip), %rdx
	leaq	160008(%rcx), %rdi
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rcx), %rsi
	addq	$8, %rcx
	movq	%rsi, %rax
	subq	%rdx, %rax
	xorq	%rsi, %rdx
	sarq	$63, %rax
	andq	%rdx, %rax
	xorq	%rsi, %rax
	movq	%rax, %rdx
	cmpq	%rcx, %rdi
	jne	.L7
	movq	%rax, ans(%rip)
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$24, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	ans
	.bss
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 160040
dp:
	.zero	160040
	.globl	b
	.align 32
	.type	b, @object
	.size	b, 12060
b:
	.zero	12060
	.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:
```