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 comp(const void *a, const void *b){
  return *(int*)a - *(int*)b;
}

int main(){
  int n;
  int i;
  int a[128];
  int k = 1;
  
  scanf("%d", &n);
  
  for(i = 0; i < n; i++){
    scanf("%d", &a[i]);
  }
  
  qsort(a, n, sizeof(int), comp);
  
  for(i = n - 1; i > 0; i--){
    if(a[i - 1] < a[i])
      k++;
  }
  
  printf("%d\n", k);
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	comp
	.type	comp, @function
comp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.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
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$552, %rsp
	.cfi_def_cfa_offset 592
	movq	%fs:40, %rax
	movq	%rax, 536(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	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	comp(%rip), %rcx
	movl	$4, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movslq	12(%rsp), %rax
	leal	-1(%rax), %ecx
	testl	%ecx, %ecx
	jle	.L21
	leal	-2(%rax), %edx
	movl	%ecx, %r8d
	cmpl	$2, %edx
	jbe	.L22
	movl	%ecx, %edx
	salq	$2, %rax
	pxor	%xmm2, %xmm2
	shrl	$2, %edx
	leaq	-20(%r12,%rax), %rdi
	leaq	-16(%r12,%rax), %rsi
	xorl	%eax, %eax
	negq	%rdx
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rdi,%rax), %xmm3
	movdqu	(%rsi,%rax), %xmm4
	subq	$16, %rax
	pshufd	$27, %xmm3, %xmm1
	pshufd	$27, %xmm4, %xmm0
	pcmpgtd	%xmm1, %xmm0
	psubd	%xmm0, %xmm2
	cmpq	%rax, %rdx
	jne	.L8
	movdqa	%xmm2, %xmm0
	movl	%ecx, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	paddd	%xmm0, %xmm2
	subl	%eax, %ecx
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %edx
	addl	$1, %edx
	cmpl	%eax, %r8d
	je	.L6
.L7:
	movslq	%ecx, %rax
	leaq	(%r12,%rax,4), %rsi
	cmpl	$2, %ecx
	jle	.L11
	leal	-2(%rcx), %eax
	movl	(%rsi), %esi
	cltq
.L14:
	movl	4(%r12,%rax,4), %edi
	cmpl	%edi, %esi
	jle	.L13
	addl	$1, %edx
.L13:
	movl	(%r12,%rax,4), %esi
	movl	%eax, %ecx
	cmpl	%esi, %edi
	jle	.L19
	addl	$1, %edx
.L19:
	subq	$2, %rax
	leal	1(%rax), %edi
	subl	$1, %edi
	jg	.L14
	movslq	%ecx, %rax
.L11:
	leal	-1(%rcx), %esi
	movslq	%esi, %rdi
	movl	16(%rsp,%rdi,4), %edi
	cmpl	16(%rsp,%rax,4), %edi
	jl	.L35
.L15:
	testl	%esi, %esi
	je	.L6
	leal	-2(%rcx), %eax
	movslq	%eax, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %edi
	jg	.L36
.L16:
	testl	%eax, %eax
	je	.L6
	subl	$3, %ecx
	movslq	%ecx, %rcx
	cmpl	%esi, 16(%rsp,%rcx,4)
	jl	.L37
.L6:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	536(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$552, %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
.L35:
	.cfi_restore_state
	addl	$1, %edx
	jmp	.L15
.L36:
	addl	$1, %edx
	jmp	.L16
.L37:
	addl	$1, %edx
	jmp	.L6
.L21:
	movl	$1, %edx
	jmp	.L6
.L22:
	movl	$1, %edx
	jmp	.L7
.L38:
	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	comp
	.type	comp, @function
comp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.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
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$552, %rsp
	.cfi_def_cfa_offset 592
	movq	%fs:40, %rax
	movq	%rax, 536(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	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	comp(%rip), %rcx
	movl	$4, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movslq	12(%rsp), %rax
	leal	-1(%rax), %ecx
	testl	%ecx, %ecx
	jle	.L21
	leal	-2(%rax), %edx
	movl	%ecx, %r8d
	cmpl	$2, %edx
	jbe	.L22
	movl	%ecx, %edx
	salq	$2, %rax
	pxor	%xmm2, %xmm2
	shrl	$2, %edx
	leaq	-20(%r12,%rax), %rdi
	leaq	-16(%r12,%rax), %rsi
	xorl	%eax, %eax
	negq	%rdx
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rdi,%rax), %xmm3
	movdqu	(%rsi,%rax), %xmm4
	subq	$16, %rax
	pshufd	$27, %xmm3, %xmm1
	pshufd	$27, %xmm4, %xmm0
	pcmpgtd	%xmm1, %xmm0
	psubd	%xmm0, %xmm2
	cmpq	%rax, %rdx
	jne	.L8
	movdqa	%xmm2, %xmm0
	movl	%ecx, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	paddd	%xmm0, %xmm2
	subl	%eax, %ecx
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %edx
	addl	$1, %edx
	cmpl	%eax, %r8d
	je	.L6
.L7:
	movslq	%ecx, %rax
	leaq	(%r12,%rax,4), %rsi
	cmpl	$2, %ecx
	jle	.L11
	leal	-2(%rcx), %eax
	movl	(%rsi), %esi
	cltq
.L14:
	movl	4(%r12,%rax,4), %edi
	cmpl	%edi, %esi
	jle	.L13
	addl	$1, %edx
.L13:
	movl	(%r12,%rax,4), %esi
	movl	%eax, %ecx
	cmpl	%esi, %edi
	jle	.L19
	addl	$1, %edx
.L19:
	subq	$2, %rax
	leal	1(%rax), %edi
	subl	$1, %edi
	jg	.L14
	movslq	%ecx, %rax
.L11:
	leal	-1(%rcx), %esi
	movslq	%esi, %rdi
	movl	16(%rsp,%rdi,4), %edi
	cmpl	16(%rsp,%rax,4), %edi
	jl	.L35
.L15:
	testl	%esi, %esi
	je	.L6
	leal	-2(%rcx), %eax
	movslq	%eax, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %edi
	jg	.L36
.L16:
	testl	%eax, %eax
	je	.L6
	subl	$3, %ecx
	movslq	%ecx, %rcx
	cmpl	%esi, 16(%rsp,%rcx,4)
	jl	.L37
.L6:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	536(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$552, %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
.L35:
	.cfi_restore_state
	addl	$1, %edx
	jmp	.L15
.L36:
	addl	$1, %edx
	jmp	.L16
.L37:
	addl	$1, %edx
	jmp	.L6
.L21:
	movl	$1, %edx
	jmp	.L6
.L22:
	movl	$1, %edx
	jmp	.L7
.L38:
	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	comp
	.type	comp, @function
comp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.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
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$552, %rsp
	.cfi_def_cfa_offset 592
	movq	%fs:40, %rax
	movq	%rax, 536(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	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	comp(%rip), %rcx
	movl	$4, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movslq	12(%rsp), %rax
	leal	-1(%rax), %ecx
	testl	%ecx, %ecx
	jle	.L21
	leal	-2(%rax), %edx
	movl	%ecx, %r8d
	cmpl	$2, %edx
	jbe	.L22
	movl	%ecx, %edx
	salq	$2, %rax
	pxor	%xmm2, %xmm2
	shrl	$2, %edx
	leaq	-20(%r12,%rax), %rdi
	leaq	-16(%r12,%rax), %rsi
	xorl	%eax, %eax
	negq	%rdx
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rdi,%rax), %xmm3
	movdqu	(%rsi,%rax), %xmm4
	subq	$16, %rax
	pshufd	$27, %xmm3, %xmm1
	pshufd	$27, %xmm4, %xmm0
	pcmpgtd	%xmm1, %xmm0
	psubd	%xmm0, %xmm2
	cmpq	%rax, %rdx
	jne	.L8
	movdqa	%xmm2, %xmm0
	movl	%ecx, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	paddd	%xmm0, %xmm2
	subl	%eax, %ecx
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %edx
	addl	$1, %edx
	cmpl	%eax, %r8d
	je	.L6
.L7:
	movslq	%ecx, %rax
	leaq	(%r12,%rax,4), %rsi
	cmpl	$2, %ecx
	jle	.L11
	leal	-2(%rcx), %eax
	movl	(%rsi), %esi
	cltq
.L14:
	movl	4(%r12,%rax,4), %edi
	cmpl	%edi, %esi
	jle	.L13
	addl	$1, %edx
.L13:
	movl	(%r12,%rax,4), %esi
	movl	%eax, %ecx
	cmpl	%esi, %edi
	jle	.L19
	addl	$1, %edx
.L19:
	subq	$2, %rax
	leal	1(%rax), %edi
	subl	$1, %edi
	jg	.L14
	movslq	%ecx, %rax
.L11:
	leal	-1(%rcx), %esi
	movslq	%esi, %rdi
	movl	16(%rsp,%rdi,4), %edi
	cmpl	16(%rsp,%rax,4), %edi
	jl	.L35
.L15:
	testl	%esi, %esi
	je	.L6
	leal	-2(%rcx), %eax
	movslq	%eax, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %edi
	jg	.L36
.L16:
	testl	%eax, %eax
	je	.L6
	subl	$3, %ecx
	movslq	%ecx, %rcx
	cmpl	%esi, 16(%rsp,%rcx,4)
	jl	.L37
.L6:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	536(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$552, %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
.L35:
	.cfi_restore_state
	addl	$1, %edx
	jmp	.L15
.L36:
	addl	$1, %edx
	jmp	.L16
.L37:
	addl	$1, %edx
	jmp	.L6
.L21:
	movl	$1, %edx
	jmp	.L6
.L22:
	movl	$1, %edx
	jmp	.L7
.L38:
	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 comp(const void *a, const void *b){
  return *(int*)a - *(int*)b;
}

int main(){
  int n;
  int i;
  int a[128];
  int k = 1;
  
  scanf("%d", &n);
  
  for(i = 0; i < n; i++){
    scanf("%d", &a[i]);
  }
  
  qsort(a, n, sizeof(int), comp);
  
  for(i = n - 1; i > 0; i--){
    if(a[i - 1] < a[i])
      k++;
  }
  
  printf("%d\n", k);
  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 comp(const void *a, const void *b){
  return *(int*)a - *(int*)b;
}

int main(){
  int n;
  int i;
  int a[128];
  int k = 1;
  
  scanf("%d", &n);
  
  for(i = 0; i < n; i++){
    scanf("%d", &a[i]);
  }
  
  qsort(a, n, sizeof(int), comp);
  
  for(i = n - 1; i > 0; i--){
    if(a[i - 1] < a[i])
      k++;
  }
  
  printf("%d\n", k);
  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:

7
50
30
50
100
50
80
35
 3
29
15
15
 4
10
8
14
6
 3
29
15
14
 7
50
40
91
110
50
34
59
 7
50
40
91
110
3
34
59
 3
1
1
1
 7
50
30
50
100
50
80
59
 4
10
8
16
6
 7
50
40
50
100
50
80
59

5
 2
 4
 3
 6
 7
 1
 5
 4
 5

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 comp(const void *a, const void *b){
  return *(int*)a - *(int*)b;
}

int main(){
  int n;
  int i;
  int a[128];
  int k = 1;
  
  scanf("%d", &n);
  
  for(i = 0; i < n; i++){
    scanf("%d", &a[i]);
  }
  
  qsort(a, n, sizeof(int), comp);
  
  for(i = n - 1; i > 0; i--){
    if(a[i - 1] < a[i])
      k++;
  }
  
  printf("%d\n", k);
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	comp
	.type	comp, @function
comp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.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
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$552, %rsp
	.cfi_def_cfa_offset 592
	movq	%fs:40, %rax
	movq	%rax, 536(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	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	comp(%rip), %rcx
	movl	$4, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movslq	12(%rsp), %rax
	leal	-1(%rax), %ecx
	testl	%ecx, %ecx
	jle	.L21
	leal	-2(%rax), %edx
	movl	%ecx, %r8d
	cmpl	$2, %edx
	jbe	.L22
	movl	%ecx, %edx
	salq	$2, %rax
	pxor	%xmm2, %xmm2
	shrl	$2, %edx
	leaq	-20(%r12,%rax), %rdi
	leaq	-16(%r12,%rax), %rsi
	xorl	%eax, %eax
	negq	%rdx
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rdi,%rax), %xmm3
	movdqu	(%rsi,%rax), %xmm4
	subq	$16, %rax
	pshufd	$27, %xmm3, %xmm1
	pshufd	$27, %xmm4, %xmm0
	pcmpgtd	%xmm1, %xmm0
	psubd	%xmm0, %xmm2
	cmpq	%rax, %rdx
	jne	.L8
	movdqa	%xmm2, %xmm0
	movl	%ecx, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	paddd	%xmm0, %xmm2
	subl	%eax, %ecx
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %edx
	addl	$1, %edx
	cmpl	%eax, %r8d
	je	.L6
.L7:
	movslq	%ecx, %rax
	leaq	(%r12,%rax,4), %rsi
	cmpl	$2, %ecx
	jle	.L11
	leal	-2(%rcx), %eax
	movl	(%rsi), %esi
	cltq
.L14:
	movl	4(%r12,%rax,4), %edi
	cmpl	%edi, %esi
	jle	.L13
	addl	$1, %edx
.L13:
	movl	(%r12,%rax,4), %esi
	movl	%eax, %ecx
	cmpl	%esi, %edi
	jle	.L19
	addl	$1, %edx
.L19:
	subq	$2, %rax
	leal	1(%rax), %edi
	subl	$1, %edi
	jg	.L14
	movslq	%ecx, %rax
.L11:
	leal	-1(%rcx), %esi
	movslq	%esi, %rdi
	movl	16(%rsp,%rdi,4), %edi
	cmpl	16(%rsp,%rax,4), %edi
	jl	.L35
.L15:
	testl	%esi, %esi
	je	.L6
	leal	-2(%rcx), %eax
	movslq	%eax, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %edi
	jg	.L36
.L16:
	testl	%eax, %eax
	je	.L6
	subl	$3, %ecx
	movslq	%ecx, %rcx
	cmpl	%esi, 16(%rsp,%rcx,4)
	jl	.L37
.L6:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	536(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$552, %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
.L35:
	.cfi_restore_state
	addl	$1, %edx
	jmp	.L15
.L36:
	addl	$1, %edx
	jmp	.L16
.L37:
	addl	$1, %edx
	jmp	.L6
.L21:
	movl	$1, %edx
	jmp	.L6
.L22:
	movl	$1, %edx
	jmp	.L7
.L38:
	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	comp
	.type	comp, @function
comp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.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
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$552, %rsp
	.cfi_def_cfa_offset 592
	movq	%fs:40, %rax
	movq	%rax, 536(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	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	comp(%rip), %rcx
	movl	$4, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movslq	12(%rsp), %rax
	leal	-1(%rax), %ecx
	testl	%ecx, %ecx
	jle	.L21
	leal	-2(%rax), %edx
	movl	%ecx, %r8d
	cmpl	$2, %edx
	jbe	.L22
	movl	%ecx, %edx
	salq	$2, %rax
	pxor	%xmm2, %xmm2
	shrl	$2, %edx
	leaq	-20(%r12,%rax), %rdi
	leaq	-16(%r12,%rax), %rsi
	xorl	%eax, %eax
	negq	%rdx
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	(%rdi,%rax), %xmm3
	movdqu	(%rsi,%rax), %xmm4
	subq	$16, %rax
	pshufd	$27, %xmm3, %xmm1
	pshufd	$27, %xmm4, %xmm0
	pcmpgtd	%xmm1, %xmm0
	psubd	%xmm0, %xmm2
	cmpq	%rax, %rdx
	jne	.L8
	movdqa	%xmm2, %xmm0
	movl	%ecx, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	paddd	%xmm0, %xmm2
	subl	%eax, %ecx
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %edx
	addl	$1, %edx
	cmpl	%eax, %r8d
	je	.L6
.L7:
	movslq	%ecx, %rax
	leaq	(%r12,%rax,4), %rsi
	cmpl	$2, %ecx
	jle	.L11
	leal	-2(%rcx), %eax
	movl	(%rsi), %esi
	cltq
.L14:
	movl	4(%r12,%rax,4), %edi
	cmpl	%edi, %esi
	jle	.L13
	addl	$1, %edx
.L13:
	movl	(%r12,%rax,4), %esi
	movl	%eax, %ecx
	cmpl	%esi, %edi
	jle	.L19
	addl	$1, %edx
.L19:
	subq	$2, %rax
	leal	1(%rax), %edi
	subl	$1, %edi
	jg	.L14
	movslq	%ecx, %rax
.L11:
	leal	-1(%rcx), %esi
	movslq	%esi, %rdi
	movl	16(%rsp,%rdi,4), %edi
	cmpl	16(%rsp,%rax,4), %edi
	jl	.L35
.L15:
	testl	%esi, %esi
	je	.L6
	leal	-2(%rcx), %eax
	movslq	%eax, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %edi
	jg	.L36
.L16:
	testl	%eax, %eax
	je	.L6
	subl	$3, %ecx
	movslq	%ecx, %rcx
	cmpl	%esi, 16(%rsp,%rcx,4)
	jl	.L37
.L6:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	536(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$552, %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
.L35:
	.cfi_restore_state
	addl	$1, %edx
	jmp	.L15
.L36:
	addl	$1, %edx
	jmp	.L16
.L37:
	addl	$1, %edx
	jmp	.L6
.L21:
	movl	$1, %edx
	jmp	.L6
.L22:
	movl	$1, %edx
	jmp	.L7
.L38:
	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:
```