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>

int desc(const void *a, const void *b) {
  return *(long *)b - *(long *)a;
}

int main(){
    int n, i, j, k, work;
    long *a,*b,*sum, SB=0,ans; 

    scanf("%d",&n);

    a = (long*)malloc(sizeof(long)*n);
    b = (long*)malloc(sizeof(long)*n);
    sum = (long *)malloc(sizeof(long)*n);
    
    for(i=0;i<n;i++){
        scanf("%ld %ld",&a[i],&b[i]);
        SB +=b[i];
        sum[i] = a[i] + b[i];
    }
    qsort(sum,n,sizeof(long),desc);
    ans = -SB;
    for(i=0;i<n;i++){
        if(i%2==0){
            ans +=sum[i];
        }
    }
    printf("%ld",ans);
    free(a);
    free(b);
    free(sum);

    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	desc
	.type	desc, @function
desc:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	desc, .-desc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld %ld"
.LC2:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	36(%rsp), %r12
	leaq	0(,%r12,8), %rbp
	movl	%r12d, 28(%rsp)
	movq	%rbp, %rdi
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, 8(%rsp)
	movq	%rax, %r14
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, 16(%rsp)
	movq	%rax, %r13
	call	malloc@PLT
	movl	28(%rsp), %esi
	movq	%rax, %rbp
	testl	%esi, %esi
	jle	.L10
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r14, %rsi
	movq	%r13, %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	0(%r13), %rax
	movl	36(%rsp), %esi
	addq	$8, %r14
	addq	$8, %r13
	addq	%rax, %rbx
	addq	-8(%r14), %rax
	movq	%rax, 0(%rbp,%r15,8)
	addq	$1, %r15
	cmpl	%r15d, %esi
	jg	.L5
	movslq	%esi, %r12
.L4:
	leaq	desc(%rip), %rcx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	negq	%rbx
	movl	$8, %edx
	call	qsort@PLT
	movslq	36(%rsp), %rcx
	movq	%rbx, %rdx
	testl	%ecx, %ecx
	jle	.L6
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	testb	$1, %al
	jne	.L7
	addq	0(%rbp,%rax,8), %rdx
.L7:
	addq	$1, %rax
	cmpq	%rax, %rcx
	jne	.L8
.L6:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rsp), %rdi
	call	free@PLT
	movq	16(%rsp), %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$56, %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
.L10:
	.cfi_restore_state
	xorl	%ebx, %ebx
	jmp	.L4
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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	desc
	.type	desc, @function
desc:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	desc, .-desc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld %ld"
.LC2:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	36(%rsp), %r12
	leaq	0(,%r12,8), %rbp
	movl	%r12d, 28(%rsp)
	movq	%rbp, %rdi
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, 8(%rsp)
	movq	%rax, %r14
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, 16(%rsp)
	movq	%rax, %r13
	call	malloc@PLT
	movl	28(%rsp), %esi
	movq	%rax, %rbp
	testl	%esi, %esi
	jle	.L10
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r14, %rsi
	movq	%r13, %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	0(%r13), %rax
	movl	36(%rsp), %esi
	addq	$8, %r14
	addq	$8, %r13
	addq	%rax, %rbx
	addq	-8(%r14), %rax
	movq	%rax, 0(%rbp,%r15,8)
	addq	$1, %r15
	cmpl	%r15d, %esi
	jg	.L5
	movslq	%esi, %r12
.L4:
	leaq	desc(%rip), %rcx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	negq	%rbx
	movl	$8, %edx
	call	qsort@PLT
	movslq	36(%rsp), %rcx
	movq	%rbx, %rdx
	testl	%ecx, %ecx
	jle	.L6
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	testb	$1, %al
	jne	.L7
	addq	0(%rbp,%rax,8), %rdx
.L7:
	addq	$1, %rax
	cmpq	%rax, %rcx
	jne	.L8
.L6:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rsp), %rdi
	call	free@PLT
	movq	16(%rsp), %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$56, %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
.L10:
	.cfi_restore_state
	xorl	%ebx, %ebx
	jmp	.L4
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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	desc
	.type	desc, @function
desc:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	desc, .-desc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld %ld"
.LC2:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	36(%rsp), %r12
	leaq	0(,%r12,8), %rbp
	movl	%r12d, 28(%rsp)
	movq	%rbp, %rdi
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, 8(%rsp)
	movq	%rax, %r14
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, 16(%rsp)
	movq	%rax, %r13
	call	malloc@PLT
	movl	28(%rsp), %esi
	movq	%rax, %rbp
	testl	%esi, %esi
	jle	.L10
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r14, %rsi
	movq	%r13, %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	0(%r13), %rax
	movl	36(%rsp), %esi
	addq	$8, %r14
	addq	$8, %r13
	addq	%rax, %rbx
	addq	-8(%r14), %rax
	movq	%rax, 0(%rbp,%r15,8)
	addq	$1, %r15
	cmpl	%r15d, %esi
	jg	.L5
	movslq	%esi, %r12
.L4:
	leaq	desc(%rip), %rcx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	negq	%rbx
	movl	$8, %edx
	call	qsort@PLT
	movslq	36(%rsp), %rcx
	movq	%rbx, %rdx
	testl	%ecx, %ecx
	jle	.L6
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	testb	$1, %al
	jne	.L7
	addq	0(%rbp,%rax,8), %rdx
.L7:
	addq	$1, %rax
	cmpq	%rax, %rcx
	jne	.L8
.L6:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rsp), %rdi
	call	free@PLT
	movq	16(%rsp), %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$56, %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
.L10:
	.cfi_restore_state
	xorl	%ebx, %ebx
	jmp	.L4
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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>

int desc(const void *a, const void *b) {
  return *(long *)b - *(long *)a;
}

int main(){
    int n, i, j, k, work;
    long *a,*b,*sum, SB=0,ans; 

    scanf("%d",&n);

    a = (long*)malloc(sizeof(long)*n);
    b = (long*)malloc(sizeof(long)*n);
    sum = (long *)malloc(sizeof(long)*n);
    
    for(i=0;i<n;i++){
        scanf("%ld %ld",&a[i],&b[i]);
        SB +=b[i];
        sum[i] = a[i] + b[i];
    }
    qsort(sum,n,sizeof(long),desc);
    ans = -SB;
    for(i=0;i<n;i++){
        if(i%2==0){
            ans +=sum[i];
        }
    }
    printf("%ld",ans);
    free(a);
    free(b);
    free(sum);

    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>

int desc(const void *a, const void *b) {
  return *(long *)b - *(long *)a;
}

int main(){
    int n, i, j, k, work;
    long *a,*b,*sum, SB=0,ans; 

    scanf("%d",&n);

    a = (long*)malloc(sizeof(long)*n);
    b = (long*)malloc(sizeof(long)*n);
    sum = (long *)malloc(sizeof(long)*n);
    
    for(i=0;i<n;i++){
        scanf("%ld %ld",&a[i],&b[i]);
        SB +=b[i];
        sum[i] = a[i] + b[i];
    }
    qsort(sum,n,sizeof(long),desc);
    ans = -SB;
    for(i=0;i<n;i++){
        if(i%2==0){
            ans +=sum[i];
        }
    }
    printf("%ld",ans);
    free(a);
    free(b);
    free(sum);

    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:

3
20 10
16 20
20 30
 3
10 10
20 34
30 30
 6
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000001
 3
20 10
16 20
20 7
 3
10 10
20 4
30 30
 6
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
2 1000000001
 3
20 2
16 20
20 7
 3
15 10
20 4
30 30
 6
1 1000000000
1 1000000000
1 1000000000
1 1010000000
1 1000000000
2 1000000001
 3
20 2
1 20
20 7

20 6 -2999999997 26 36 -2999999996 29 40 -2999999998 19
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>

int desc(const void *a, const void *b) {
  return *(long *)b - *(long *)a;
}

int main(){
    int n, i, j, k, work;
    long *a,*b,*sum, SB=0,ans; 

    scanf("%d",&n);

    a = (long*)malloc(sizeof(long)*n);
    b = (long*)malloc(sizeof(long)*n);
    sum = (long *)malloc(sizeof(long)*n);
    
    for(i=0;i<n;i++){
        scanf("%ld %ld",&a[i],&b[i]);
        SB +=b[i];
        sum[i] = a[i] + b[i];
    }
    qsort(sum,n,sizeof(long),desc);
    ans = -SB;
    for(i=0;i<n;i++){
        if(i%2==0){
            ans +=sum[i];
        }
    }
    printf("%ld",ans);
    free(a);
    free(b);
    free(sum);

    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	desc
	.type	desc, @function
desc:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	desc, .-desc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld %ld"
.LC2:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	36(%rsp), %r12
	leaq	0(,%r12,8), %rbp
	movl	%r12d, 28(%rsp)
	movq	%rbp, %rdi
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, 8(%rsp)
	movq	%rax, %r14
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, 16(%rsp)
	movq	%rax, %r13
	call	malloc@PLT
	movl	28(%rsp), %esi
	movq	%rax, %rbp
	testl	%esi, %esi
	jle	.L10
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r14, %rsi
	movq	%r13, %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	0(%r13), %rax
	movl	36(%rsp), %esi
	addq	$8, %r14
	addq	$8, %r13
	addq	%rax, %rbx
	addq	-8(%r14), %rax
	movq	%rax, 0(%rbp,%r15,8)
	addq	$1, %r15
	cmpl	%r15d, %esi
	jg	.L5
	movslq	%esi, %r12
.L4:
	leaq	desc(%rip), %rcx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	negq	%rbx
	movl	$8, %edx
	call	qsort@PLT
	movslq	36(%rsp), %rcx
	movq	%rbx, %rdx
	testl	%ecx, %ecx
	jle	.L6
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	testb	$1, %al
	jne	.L7
	addq	0(%rbp,%rax,8), %rdx
.L7:
	addq	$1, %rax
	cmpq	%rax, %rcx
	jne	.L8
.L6:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rsp), %rdi
	call	free@PLT
	movq	16(%rsp), %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$56, %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
.L10:
	.cfi_restore_state
	xorl	%ebx, %ebx
	jmp	.L4
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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	desc
	.type	desc, @function
desc:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	desc, .-desc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld %ld"
.LC2:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	36(%rsp), %r12
	leaq	0(,%r12,8), %rbp
	movl	%r12d, 28(%rsp)
	movq	%rbp, %rdi
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, 8(%rsp)
	movq	%rax, %r14
	call	malloc@PLT
	movq	%rbp, %rdi
	movq	%rax, 16(%rsp)
	movq	%rax, %r13
	call	malloc@PLT
	movl	28(%rsp), %esi
	movq	%rax, %rbp
	testl	%esi, %esi
	jle	.L10
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r14, %rsi
	movq	%r13, %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	0(%r13), %rax
	movl	36(%rsp), %esi
	addq	$8, %r14
	addq	$8, %r13
	addq	%rax, %rbx
	addq	-8(%r14), %rax
	movq	%rax, 0(%rbp,%r15,8)
	addq	$1, %r15
	cmpl	%r15d, %esi
	jg	.L5
	movslq	%esi, %r12
.L4:
	leaq	desc(%rip), %rcx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	negq	%rbx
	movl	$8, %edx
	call	qsort@PLT
	movslq	36(%rsp), %rcx
	movq	%rbx, %rdx
	testl	%ecx, %ecx
	jle	.L6
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	testb	$1, %al
	jne	.L7
	addq	0(%rbp,%rax,8), %rdx
.L7:
	addq	$1, %rax
	cmpq	%rax, %rcx
	jne	.L8
.L6:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rsp), %rdi
	call	free@PLT
	movq	16(%rsp), %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$56, %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
.L10:
	.cfi_restore_state
	xorl	%ebx, %ebx
	jmp	.L4
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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:
```