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>
#include <stdlib.h>

int cmp( const void *p, const void *q ) {
  return *(int*)p - *(int*)q;
}

int main(void){

  int k,n,h[100005],d[100005],min=1000000000;
  scanf("%d %d",&n,&k);
  for(int i=0;i<n;i++){
    scanf("%d",&h[i]);
  }
  qsort(h, n, sizeof(int),cmp);
  for(int i=0;i<n-k+1;i++){
    d[i]=h[i+k-1]-h[i];
    if(min>d[i]) min=d[i];
  }
  printf("%d\n",min);
  return 0;
  }```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1376, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1000000000, -800076(%rbp)
	leaq	-800084(%rbp), %rdx
	leaq	-800080(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800072(%rbp)
	jmp	.L4
.L5:
	leaq	-800064(%rbp), %rdx
	movl	-800072(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800072(%rbp)
.L4:
	movl	-800080(%rbp), %eax
	cmpl	%eax, -800072(%rbp)
	jl	.L5
	movl	-800080(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-800064(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -800068(%rbp)
	jmp	.L6
.L8:
	movl	-800084(%rbp), %edx
	movl	-800068(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	cltq
	movl	-800064(%rbp,%rax,4), %edx
	movl	-800068(%rbp), %eax
	cltq
	movl	-800064(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-800068(%rbp), %eax
	cltq
	movl	%edx, -400032(%rbp,%rax,4)
	movl	-800068(%rbp), %eax
	cltq
	movl	-400032(%rbp,%rax,4), %eax
	cmpl	%eax, -800076(%rbp)
	jle	.L7
	movl	-800068(%rbp), %eax
	cltq
	movl	-400032(%rbp,%rax,4), %eax
	movl	%eax, -800076(%rbp)
.L7:
	addl	$1, -800068(%rbp)
.L6:
	movl	-800080(%rbp), %eax
	movl	-800084(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -800068(%rbp)
	jle	.L8
	movl	-800076(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.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	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397352
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2744, %rsp
	.cfi_def_cfa_offset 400096
	leaq	.LC1(%rip), %rdi
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	8(%rsp), %rdx
	leaq	16(%rsp), %r12
	movq	%r12, %rbp
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	testl	%esi, %esi
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L5
.L4:
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	8(%rsp), %esi
	movl	12(%rsp), %ecx
	subl	%esi, %ecx
	js	.L12
	leal	1(%rcx), %r8d
	cmpl	$2, %ecx
	jle	.L13
	movl	%r8d, %edx
	movslq	%esi, %rax
	movdqa	.LC0(%rip), %xmm0
	shrl	$2, %edx
	leaq	-4(%r12,%rax,4), %rdi
	xorl	%eax, %eax
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rdi,%rax), %xmm2
	psubd	(%r12,%rax), %xmm2
	addq	$16, %rax
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm1, %xmm0
	cmpq	%rdx, %rax
	jne	.L8
	movdqa	%xmm0, %xmm2
	movl	%r8d, %eax
	psrldq	$8, %xmm2
	andl	$-4, %eax
	andl	$3, %r8d
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movd	%xmm1, %edx
	je	.L6
.L7:
	leal	-1(%rax,%rsi), %edi
	movslq	%eax, %r8
	movslq	%edi, %rdi
	movl	16(%rsp,%rdi,4), %edi
	subl	16(%rsp,%r8,4), %edi
	cmpl	%edi, %edx
	cmovg	%edi, %edx
	leal	1(%rax), %edi
	cmpl	%ecx, %edi
	jg	.L6
	leal	-1(%rdi,%rsi), %r8d
	movslq	%edi, %rdi
	movslq	%r8d, %r8
	movl	16(%rsp,%r8,4), %r8d
	subl	16(%rsp,%rdi,4), %r8d
	cmpl	%r8d, %edx
	cmovg	%r8d, %edx
	addl	$2, %eax
	cmpl	%eax, %ecx
	jl	.L6
	leal	-1(%rsi,%rax), %ecx
	cltq
	movslq	%ecx, %rcx
	movl	16(%rsp,%rcx,4), %ecx
	subl	16(%rsp,%rax,4), %ecx
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
.L6:
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$400056, %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
.L12:
	.cfi_restore_state
	movl	$1000000000, %edx
	jmp	.L6
.L13:
	xorl	%eax, %eax
	movl	$1000000000, %edx
	jmp	.L7
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.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	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397352
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2744, %rsp
	.cfi_def_cfa_offset 400096
	leaq	.LC1(%rip), %rdi
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	8(%rsp), %rdx
	leaq	16(%rsp), %r12
	movq	%r12, %rbp
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	testl	%esi, %esi
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L5
.L4:
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	8(%rsp), %esi
	movl	12(%rsp), %ecx
	subl	%esi, %ecx
	js	.L12
	leal	1(%rcx), %r8d
	cmpl	$2, %ecx
	jle	.L13
	movl	%r8d, %edx
	movslq	%esi, %rax
	movdqa	.LC0(%rip), %xmm0
	shrl	$2, %edx
	leaq	-4(%r12,%rax,4), %rdi
	xorl	%eax, %eax
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rdi,%rax), %xmm2
	psubd	(%r12,%rax), %xmm2
	addq	$16, %rax
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm1, %xmm0
	cmpq	%rdx, %rax
	jne	.L8
	movdqa	%xmm0, %xmm2
	movl	%r8d, %eax
	psrldq	$8, %xmm2
	andl	$-4, %eax
	andl	$3, %r8d
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movd	%xmm1, %edx
	je	.L6
.L7:
	leal	-1(%rax,%rsi), %edi
	movslq	%eax, %r8
	movslq	%edi, %rdi
	movl	16(%rsp,%rdi,4), %edi
	subl	16(%rsp,%r8,4), %edi
	cmpl	%edi, %edx
	cmovg	%edi, %edx
	leal	1(%rax), %edi
	cmpl	%ecx, %edi
	jg	.L6
	leal	-1(%rdi,%rsi), %r8d
	movslq	%edi, %rdi
	movslq	%r8d, %r8
	movl	16(%rsp,%r8,4), %r8d
	subl	16(%rsp,%rdi,4), %r8d
	cmpl	%r8d, %edx
	cmovg	%r8d, %edx
	addl	$2, %eax
	cmpl	%eax, %ecx
	jl	.L6
	leal	-1(%rsi,%rax), %ecx
	cltq
	movslq	%ecx, %rcx
	movl	16(%rsp,%rcx,4), %ecx
	subl	16(%rsp,%rax,4), %ecx
	cmpl	%ecx, %edx
	cmovg	%ecx, %edx
.L6:
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$400056, %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
.L12:
	.cfi_restore_state
	movl	$1000000000, %edx
	jmp	.L6
.L13:
	xorl	%eax, %eax
	movl	$1000000000, %edx
	jmp	.L7
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.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>
#include <stdlib.h>

int cmp( const void *p, const void *q ) {
  return *(int*)p - *(int*)q;
}

int main(void){

  int k,n,h[100005],d[100005],min=1000000000;
  scanf("%d %d",&n,&k);
  for(int i=0;i<n;i++){
    scanf("%d",&h[i]);
  }
  qsort(h, n, sizeof(int),cmp);
  for(int i=0;i<n-k+1;i++){
    d[i]=h[i+k-1]-h[i];
    if(min>d[i]) min=d[i];
  }
  printf("%d\n",min);
  return 0;
  }
5 3
5
7
10
7
7
 5 3
5
7
10
0
7
 5 3
8
7
10
0
7
 3 3
5
7
10
7
7
 5 3
0
15
11
15
12
 5 3
10
21
10
0
6
 3 3
10
7
1
1
5
 5 3
10
21
19
0
6
 4 3
10
21
19
0
6
 3 3
5
7
0
1
7

0
 2
 1
 5
 3
 4
 9
 10
 11
 7

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>
#include <stdlib.h>

int cmp( const void *p, const void *q ) {
  return *(int*)p - *(int*)q;
}

int main(void){

  int k,n,h[100005],d[100005],min=1000000000;
  scanf("%d %d",&n,&k);
  for(int i=0;i<n;i++){
    scanf("%d",&h[i]);
  }
  qsort(h, n, sizeof(int),cmp);
  for(int i=0;i<n-k+1;i++){
    d[i]=h[i+k-1]-h[i];
    if(min>d[i]) min=d[i];
  }
  printf("%d\n",min);
  return 0;
  }```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1376, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1000000000, -800076(%rbp)
	leaq	-800084(%rbp), %rdx
	leaq	-800080(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800072(%rbp)
	jmp	.L4
.L5:
	leaq	-800064(%rbp), %rdx
	movl	-800072(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800072(%rbp)
.L4:
	movl	-800080(%rbp), %eax
	cmpl	%eax, -800072(%rbp)
	jl	.L5
	movl	-800080(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-800064(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -800068(%rbp)
	jmp	.L6
.L8:
	movl	-800084(%rbp), %edx
	movl	-800068(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	cltq
	movl	-800064(%rbp,%rax,4), %edx
	movl	-800068(%rbp), %eax
	cltq
	movl	-800064(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-800068(%rbp), %eax
	cltq
	movl	%edx, -400032(%rbp,%rax,4)
	movl	-800068(%rbp), %eax
	cltq
	movl	-400032(%rbp,%rax,4), %eax
	cmpl	%eax, -800076(%rbp)
	jle	.L7
	movl	-800068(%rbp), %eax
	cltq
	movl	-400032(%rbp,%rax,4), %eax
	movl	%eax, -800076(%rbp)
.L7:
	addl	$1, -800068(%rbp)
.L6:
	movl	-800080(%rbp), %eax
	movl	-800084(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -800068(%rbp)
	jle	.L8
	movl	-800076(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1376, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1000000000, -800076(%rbp)
	leaq	-800084(%rbp), %rdx
	leaq	-800080(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800072(%rbp)
	jmp	.L4
.L5:
	leaq	-800064(%rbp), %rdx
	movl	-800072(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800072(%rbp)
.L4:
	movl	-800080(%rbp), %eax
	cmpl	%eax, -800072(%rbp)
	jl	.L5
	movl	-800080(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-800064(%rbp), %rax
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -800068(%rbp)
	jmp	.L6
.L8:
	movl	-800084(%rbp), %edx
	movl	-800068(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	cltq
	movl	-800064(%rbp,%rax,4), %edx
	movl	-800068(%rbp), %eax
	cltq
	movl	-800064(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-800068(%rbp), %eax
	cltq
	movl	%edx, -400032(%rbp,%rax,4)
	movl	-800068(%rbp), %eax
	cltq
	movl	-400032(%rbp,%rax,4), %eax
	cmpl	%eax, -800076(%rbp)
	jle	.L7
	movl	-800068(%rbp), %eax
	cltq
	movl	-400032(%rbp,%rax,4), %eax
	movl	%eax, -800076(%rbp)
.L7:
	addl	$1, -800068(%rbp)
.L6:
	movl	-800080(%rbp), %eax
	movl	-800084(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -800068(%rbp)
	jle	.L8
	movl	-800076(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
