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

```c
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <math.h>
#define Max(a, b) ((a) > (b) ? (a) : (b))
#define Min(a, b) ((a) > (b) ? (b) : (a))
#define abs(x) ((x) > 0 ? (x) : -(x))
#define REP(i, n) for(int i = 0; i < n; i++)
#define INF 1000000000000 //10^12
#define MOD 1000000007 //10^9 + 7
typedef long long ll;

int dsc(const void *a, const void *b){
  ll A = *(ll *)a, B = *(ll *)b;
  if(A > B) return -1;
  if(A < B) return  1;
  return 0;
}

int
main(int argc, char *argv[])
{
  int n; ll a[300000];
  scanf("%d", &n);
  REP(i, 3 * n) scanf("%lld", &a[i]);

  qsort(a, 3 * n, sizeof(ll), dsc);

  int k = 0; ll ans = 0;
  while(k < n){
    ans += a[2 * k + 1];
    k++;
  }
  printf("%lld\n", ans);
  return 0;
}
  
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	dsc
	.type	dsc, @function
dsc:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setl	%al
	movzbl	%al, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	dsc, .-dsc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-2396160(%rsp), %r11
	.cfi_def_cfa 11, 2396200
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3880, %rsp
	.cfi_def_cfa_offset 2400080
	leaq	.LC0(%rip), %rdi
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 2400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r12
	movq	%r12, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	leal	(%rax,%rax,2), %esi
	testl	%esi, %esi
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$8, %rbp
	leal	(%rax,%rax,2), %esi
	cmpl	%ebx, %esi
	jg	.L7
.L6:
	movslq	%esi, %rsi
	leaq	dsc(%rip), %rcx
	movl	$8, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L14
	leal	-1(%rsi), %ecx
	cmpl	$1, %ecx
	jbe	.L15
	movl	%ecx, %edx
	leaq	24(%rsp), %rax
	pxor	%xmm1, %xmm1
	shrl	%edx
	subl	$1, %edx
	salq	$5, %rdx
	leaq	56(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L10:
	movdqu	(%rax), %xmm0
	movdqu	16(%rax), %xmm2
	addq	$32, %rax
	punpcklqdq	%xmm2, %xmm0
	paddq	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L10
	movdqa	%xmm1, %xmm0
	andl	$-2, %ecx
	psrldq	$8, %xmm0
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rdx
.L9:
	leal	(%rcx,%rcx), %eax
	addl	$1, %ecx
	leal	1(%rax), %edi
	movslq	%edi, %rdi
	addq	16(%rsp,%rdi,8), %rdx
	cmpl	%esi, %ecx
	jge	.L8
	addl	$3, %eax
	cltq
	addq	16(%rsp,%rax,8), %rdx
.L8:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	2400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$2400040, %rsp
	.cfi_remember_state
	.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
.L14:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L8
.L15:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L9
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	dsc
	.type	dsc, @function
dsc:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setl	%al
	movzbl	%al, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	dsc, .-dsc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-2396160(%rsp), %r11
	.cfi_def_cfa 11, 2396200
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3880, %rsp
	.cfi_def_cfa_offset 2400080
	leaq	.LC0(%rip), %rdi
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 2400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r12
	movq	%r12, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	leal	(%rax,%rax,2), %esi
	testl	%esi, %esi
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$8, %rbp
	leal	(%rax,%rax,2), %esi
	cmpl	%ebx, %esi
	jg	.L7
.L6:
	movslq	%esi, %rsi
	leaq	dsc(%rip), %rcx
	movl	$8, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L14
	leal	-1(%rsi), %ecx
	cmpl	$1, %ecx
	jbe	.L15
	movl	%ecx, %edx
	leaq	24(%rsp), %rax
	pxor	%xmm1, %xmm1
	shrl	%edx
	subl	$1, %edx
	salq	$5, %rdx
	leaq	56(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L10:
	movdqu	(%rax), %xmm0
	movdqu	16(%rax), %xmm2
	addq	$32, %rax
	punpcklqdq	%xmm2, %xmm0
	paddq	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L10
	movdqa	%xmm1, %xmm0
	andl	$-2, %ecx
	psrldq	$8, %xmm0
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rdx
.L9:
	leal	(%rcx,%rcx), %eax
	addl	$1, %ecx
	leal	1(%rax), %edi
	movslq	%edi, %rdi
	addq	16(%rsp,%rdi,8), %rdx
	cmpl	%esi, %ecx
	jge	.L8
	addl	$3, %eax
	cltq
	addq	16(%rsp,%rax,8), %rdx
.L8:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	2400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$2400040, %rsp
	.cfi_remember_state
	.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
.L14:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L8
.L15:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L9
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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:
```
rule
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	dsc
	.type	dsc, @function
dsc:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setl	%al
	movzbl	%al, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	dsc, .-dsc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-2396160(%rsp), %r11
	.cfi_def_cfa 11, 2396200
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3880, %rsp
	.cfi_def_cfa_offset 2400080
	leaq	.LC0(%rip), %rdi
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 2400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r12
	movq	%r12, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	leal	(%rax,%rax,2), %esi
	testl	%esi, %esi
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$8, %rbp
	leal	(%rax,%rax,2), %esi
	cmpl	%ebx, %esi
	jg	.L7
.L6:
	movslq	%esi, %rsi
	leaq	dsc(%rip), %rcx
	movl	$8, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L14
	leal	-1(%rsi), %ecx
	cmpl	$1, %ecx
	jbe	.L15
	movl	%ecx, %edx
	leaq	24(%rsp), %rax
	pxor	%xmm1, %xmm1
	shrl	%edx
	subl	$1, %edx
	salq	$5, %rdx
	leaq	56(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L10:
	movdqu	(%rax), %xmm0
	movdqu	16(%rax), %xmm2
	addq	$32, %rax
	punpcklqdq	%xmm2, %xmm0
	paddq	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L10
	movdqa	%xmm1, %xmm0
	andl	$-2, %ecx
	psrldq	$8, %xmm0
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rdx
.L9:
	leal	(%rcx,%rcx), %eax
	addl	$1, %ecx
	leal	1(%rax), %edi
	movslq	%edi, %rdi
	addq	16(%rsp,%rdi,8), %rdx
	cmpl	%esi, %ecx
	jge	.L8
	addl	$3, %eax
	cltq
	addq	16(%rsp,%rax,8), %rdx
.L8:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	2400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$2400040, %rsp
	.cfi_remember_state
	.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
.L14:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L8
.L15:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L9
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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:
```
```c
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <math.h>
#define Max(a, b) ((a) > (b) ? (a) : (b))
#define Min(a, b) ((a) > (b) ? (b) : (a))
#define abs(x) ((x) > 0 ? (x) : -(x))
#define REP(i, n) for(int i = 0; i < n; i++)
#define INF 1000000000000 //10^12
#define MOD 1000000007 //10^9 + 7
typedef long long ll;

int dsc(const void *a, const void *b){
  ll A = *(ll *)a, B = *(ll *)b;
  if(A > B) return -1;
  if(A < B) return  1;
  return 0;
}

int
main(int argc, char *argv[])
{
  int n; ll a[300000];
  scanf("%d", &n);
  REP(i, 3 * n) scanf("%lld", &a[i]);

  qsort(a, 3 * n, sizeof(ll), dsc);

  int k = 0; ll ans = 0;
  while(k < n){
    ans += a[2 * k + 1];
    k++;
  }
  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
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <math.h>
#define Max(a, b) ((a) > (b) ? (a) : (b))
#define Min(a, b) ((a) > (b) ? (b) : (a))
#define abs(x) ((x) > 0 ? (x) : -(x))
#define REP(i, n) for(int i = 0; i < n; i++)
#define INF 1000000000000 //10^12
#define MOD 1000000007 //10^9 + 7
typedef long long ll;

int dsc(const void *a, const void *b){
  ll A = *(ll *)a, B = *(ll *)b;
  if(A > B) return -1;
  if(A < B) return  1;
  return 0;
}

int
main(int argc, char *argv[])
{
  int n; ll a[300000];
  scanf("%d", &n);
  REP(i, 3 * n) scanf("%lld", &a[i]);

  qsort(a, 3 * n, sizeof(ll), dsc);

  int k = 0; ll ans = 0;
  while(k < n){
    ans += a[2 * k + 1];
    k++;
  }
  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:

2
2 2 8 5 1 5
 10
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1100000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000
 10
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1100000000 1000100000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000
 2
0 4 8 5 1 5
 2
0 7 8 5 1 5
 2
0 7 8 9 1 5
 10
1000000000 1000000000 1000000000 0000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1100000000 0000100000 1000000000 1000000000 1000000000 1000000000 1000000000 1100100000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000
 10
1000000000 1000000000 1000000000 0000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000010 1000000000 1000000000 1000010000 1000000000 1000000000 1100000000 0000100000 1000000000 1000000000 1000000000 1000000000 1000000000 1100100000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000
 2
1 4 8 9 1 2
 2
1 4 8 4 1 2

7
 10000000000
 10000100000
 9
 12
 13
 10100000000
 10100000010
 10
 6

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

```c
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <math.h>
#define Max(a, b) ((a) > (b) ? (a) : (b))
#define Min(a, b) ((a) > (b) ? (b) : (a))
#define abs(x) ((x) > 0 ? (x) : -(x))
#define REP(i, n) for(int i = 0; i < n; i++)
#define INF 1000000000000 //10^12
#define MOD 1000000007 //10^9 + 7
typedef long long ll;

int dsc(const void *a, const void *b){
  ll A = *(ll *)a, B = *(ll *)b;
  if(A > B) return -1;
  if(A < B) return  1;
  return 0;
}

int
main(int argc, char *argv[])
{
  int n; ll a[300000];
  scanf("%d", &n);
  REP(i, 3 * n) scanf("%lld", &a[i]);

  qsort(a, 3 * n, sizeof(ll), dsc);

  int k = 0; ll ans = 0;
  while(k < n){
    ans += a[2 * k + 1];
    k++;
  }
  printf("%lld\n", ans);
  return 0;
}
  
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	dsc
	.type	dsc, @function
dsc:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setl	%al
	movzbl	%al, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	dsc, .-dsc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-2396160(%rsp), %r11
	.cfi_def_cfa 11, 2396200
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3880, %rsp
	.cfi_def_cfa_offset 2400080
	leaq	.LC0(%rip), %rdi
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 2400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r12
	movq	%r12, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	leal	(%rax,%rax,2), %esi
	testl	%esi, %esi
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$8, %rbp
	leal	(%rax,%rax,2), %esi
	cmpl	%ebx, %esi
	jg	.L7
.L6:
	movslq	%esi, %rsi
	leaq	dsc(%rip), %rcx
	movl	$8, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L14
	leal	-1(%rsi), %ecx
	cmpl	$1, %ecx
	jbe	.L15
	movl	%ecx, %edx
	leaq	24(%rsp), %rax
	pxor	%xmm1, %xmm1
	shrl	%edx
	subl	$1, %edx
	salq	$5, %rdx
	leaq	56(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L10:
	movdqu	(%rax), %xmm0
	movdqu	16(%rax), %xmm2
	addq	$32, %rax
	punpcklqdq	%xmm2, %xmm0
	paddq	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L10
	movdqa	%xmm1, %xmm0
	andl	$-2, %ecx
	psrldq	$8, %xmm0
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rdx
.L9:
	leal	(%rcx,%rcx), %eax
	addl	$1, %ecx
	leal	1(%rax), %edi
	movslq	%edi, %rdi
	addq	16(%rsp,%rdi,8), %rdx
	cmpl	%esi, %ecx
	jge	.L8
	addl	$3, %eax
	cltq
	addq	16(%rsp,%rax,8), %rdx
.L8:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	2400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$2400040, %rsp
	.cfi_remember_state
	.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
.L14:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L8
.L15:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L9
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	dsc
	.type	dsc, @function
dsc:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setl	%al
	movzbl	%al, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	dsc, .-dsc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-2396160(%rsp), %r11
	.cfi_def_cfa 11, 2396200
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3880, %rsp
	.cfi_def_cfa_offset 2400080
	leaq	.LC0(%rip), %rdi
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 2400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r12
	movq	%r12, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	leal	(%rax,%rax,2), %esi
	testl	%esi, %esi
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$8, %rbp
	leal	(%rax,%rax,2), %esi
	cmpl	%ebx, %esi
	jg	.L7
.L6:
	movslq	%esi, %rsi
	leaq	dsc(%rip), %rcx
	movl	$8, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	12(%rsp), %esi
	testl	%esi, %esi
	jle	.L14
	leal	-1(%rsi), %ecx
	cmpl	$1, %ecx
	jbe	.L15
	movl	%ecx, %edx
	leaq	24(%rsp), %rax
	pxor	%xmm1, %xmm1
	shrl	%edx
	subl	$1, %edx
	salq	$5, %rdx
	leaq	56(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L10:
	movdqu	(%rax), %xmm0
	movdqu	16(%rax), %xmm2
	addq	$32, %rax
	punpcklqdq	%xmm2, %xmm0
	paddq	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L10
	movdqa	%xmm1, %xmm0
	andl	$-2, %ecx
	psrldq	$8, %xmm0
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rdx
.L9:
	leal	(%rcx,%rcx), %eax
	addl	$1, %ecx
	leal	1(%rax), %edi
	movslq	%edi, %rdi
	addq	16(%rsp,%rdi,8), %rdx
	cmpl	%esi, %ecx
	jge	.L8
	addl	$3, %eax
	cltq
	addq	16(%rsp,%rax,8), %rdx
.L8:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	2400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$2400040, %rsp
	.cfi_remember_state
	.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
.L14:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L8
.L15:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L9
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.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:
```