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 asc(const void *a, const void *b) {
  int *A = (int *)a;
  int *B = (int*)b;
  if (*A > *B) return 1;
  if (*A < *B) return -1;
  return 0;
}
int main()
{
    int n,a[100000],pair[100000],i,j = 0,k;

    scanf("%d",&n);
    for (i = 0; i < n; i++)scanf("%d",&a[i]);
    qsort(a,n,sizeof(int),asc);

    long long cnt = 1;
    for (i = 0; i < n - 1; i++)
    {
        if(a[i] == a[i + 1])cnt++;
        else {
            if(2 <= cnt && cnt < 4){
                pair[j] = a[i];
                cnt = 1;
                j++;
            }
            else if(4 <= cnt)
            {
                pair[j] = a[i];
                j++;
                pair[j] = a[i];
                j++;
                cnt = 1;
            }
            
        }
    }
    if(2 <= cnt && cnt < 4){pair[j] = a[i];cnt = 1;j++;}else if(4 <= cnt){pair[j] = a[i];j++;pair[j] = a[i];j++;cnt = 1;}
    if(j < 2)
    {
        printf("0");
    }
    else
    {
        printf("%lld",(long long)pair[j - 1] * (long long)pair[j - 2]);
    }
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	asc
	.type	asc, @function
asc:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	asc, .-asc
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.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	$1328, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -800028(%rbp)
	leaq	-800036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800032(%rbp)
	jmp	.L6
.L7:
	leaq	-800016(%rbp), %rdx
	movl	-800032(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800032(%rbp)
.L6:
	movl	-800036(%rbp), %eax
	cmpl	%eax, -800032(%rbp)
	jl	.L7
	movl	-800036(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-800016(%rbp), %rax
	leaq	asc(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$1, -800024(%rbp)
	movl	$0, -800032(%rbp)
	jmp	.L8
.L12:
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800032(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-800016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L9
	addq	$1, -800024(%rbp)
	jmp	.L10
.L9:
	cmpq	$1, -800024(%rbp)
	jle	.L11
	cmpq	$3, -800024(%rbp)
	jg	.L11
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800028(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	movq	$1, -800024(%rbp)
	addl	$1, -800028(%rbp)
	jmp	.L10
.L11:
	cmpq	$3, -800024(%rbp)
	jle	.L10
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800028(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	addl	$1, -800028(%rbp)
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800028(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	addl	$1, -800028(%rbp)
	movq	$1, -800024(%rbp)
.L10:
	addl	$1, -800032(%rbp)
.L8:
	movl	-800036(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -800032(%rbp)
	jl	.L12
	cmpq	$1, -800024(%rbp)
	jle	.L13
	cmpq	$3, -800024(%rbp)
	jg	.L13
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800028(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	movq	$1, -800024(%rbp)
	addl	$1, -800028(%rbp)
	jmp	.L14
.L13:
	cmpq	$3, -800024(%rbp)
	jle	.L14
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800028(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	addl	$1, -800028(%rbp)
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800028(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	addl	$1, -800028(%rbp)
	movq	$1, -800024(%rbp)
.L14:
	cmpl	$1, -800028(%rbp)
	jg	.L15
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L16
.L15:
	movl	-800028(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-800028(%rbp), %eax
	subl	$2, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cltq
	imulq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L16:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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	asc
	.type	asc, @function
asc:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, (%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	asc, .-asc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.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	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1320, %rsp
	.cfi_def_cfa_offset 800080
	leaq	.LC0(%rip), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r13
	movq	%r13, %rbp
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	testl	%esi, %esi
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L7
.L6:
	leaq	asc(%rip), %rcx
	movl	$4, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	12(%rsp), %ecx
	cmpl	$1, %ecx
	jle	.L8
	subl	$2, %ecx
	movl	16(%rsp), %eax
	leaq	20(%rsp), %rdx
	xorl	%edi, %edi
	leaq	24(%rsp,%rcx,4), %r9
	movl	$1, %ecx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	leaq	-2(%rcx), %r8
	cmpq	$1, %r8
	jbe	.L23
	cmpq	$3, %rcx
	jle	.L10
	movslq	%edi, %rcx
	addl	$2, %edi
	movq	%xmm0, 400016(%rsp,%rcx,4)
	movl	$1, %ecx
.L10:
	addq	$4, %rdx
	cmpq	%rdx, %r9
	je	.L24
.L12:
	movd	%eax, %xmm1
	movl	%eax, %esi
	movl	(%rdx), %eax
	pshufd	$0xe0, %xmm1, %xmm0
	cmpl	%esi, %eax
	jne	.L9
	addq	$4, %rdx
	addq	$1, %rcx
	cmpq	%rdx, %r9
	jne	.L12
.L24:
	movd	%eax, %xmm2
	leaq	-2(%rcx), %rdx
	pshufd	$0xe0, %xmm2, %xmm0
	cmpq	$1, %rdx
	jbe	.L25
	cmpq	$3, %rcx
	jle	.L14
	movslq	%edi, %rax
	addl	$2, %edi
	movq	%xmm0, 400016(%rsp,%rax,4)
.L15:
	leal	-1(%rdi), %eax
	subl	$2, %edi
	leaq	.LC1(%rip), %rsi
	cltq
	movslq	%edi, %rdi
	movslq	400016(%rsp,%rax,4), %rdx
	movslq	400016(%rsp,%rdi,4), %rax
	movl	$1, %edi
	imulq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L16:
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$800040, %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
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	movslq	%edi, %rcx
	addl	$1, %edi
	movd	%xmm1, 400016(%rsp,%rcx,4)
	movl	$1, %ecx
	jmp	.L10
.L25:
	movslq	%edi, %rdx
	addl	$1, %edi
	movl	%eax, 400016(%rsp,%rdx,4)
.L14:
	cmpl	$1, %edi
	jg	.L15
.L8:
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L16
.L26:
	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
	.file	"temp.c"
	.text
	.p2align 4
	.globl	asc
	.type	asc, @function
asc:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, (%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	asc, .-asc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.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	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1320, %rsp
	.cfi_def_cfa_offset 800080
	leaq	.LC0(%rip), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r13
	movq	%r13, %rbp
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	testl	%esi, %esi
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rsi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L7
.L6:
	leaq	asc(%rip), %rcx
	movl	$4, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	12(%rsp), %ecx
	cmpl	$1, %ecx
	jle	.L8
	subl	$2, %ecx
	movl	16(%rsp), %eax
	leaq	20(%rsp), %rdx
	xorl	%edi, %edi
	leaq	24(%rsp,%rcx,4), %r9
	movl	$1, %ecx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	leaq	-2(%rcx), %r8
	cmpq	$1, %r8
	jbe	.L23
	cmpq	$3, %rcx
	jle	.L10
	movslq	%edi, %rcx
	addl	$2, %edi
	movq	%xmm0, 400016(%rsp,%rcx,4)
	movl	$1, %ecx
.L10:
	addq	$4, %rdx
	cmpq	%rdx, %r9
	je	.L24
.L12:
	movd	%eax, %xmm1
	movl	%eax, %esi
	movl	(%rdx), %eax
	pshufd	$0xe0, %xmm1, %xmm0
	cmpl	%esi, %eax
	jne	.L9
	addq	$4, %rdx
	addq	$1, %rcx
	cmpq	%rdx, %r9
	jne	.L12
.L24:
	movd	%eax, %xmm2
	leaq	-2(%rcx), %rdx
	pshufd	$0xe0, %xmm2, %xmm0
	cmpq	$1, %rdx
	jbe	.L25
	cmpq	$3, %rcx
	jle	.L14
	movslq	%edi, %rax
	addl	$2, %edi
	movq	%xmm0, 400016(%rsp,%rax,4)
.L15:
	leal	-1(%rdi), %eax
	subl	$2, %edi
	leaq	.LC1(%rip), %rsi
	cltq
	movslq	%edi, %rdi
	movslq	400016(%rsp,%rax,4), %rdx
	movslq	400016(%rsp,%rdi,4), %rax
	movl	$1, %edi
	imulq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L16:
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$800040, %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
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	movslq	%edi, %rcx
	addl	$1, %edi
	movd	%xmm1, 400016(%rsp,%rcx,4)
	movl	$1, %ecx
	jmp	.L10
.L25:
	movslq	%edi, %rdx
	addl	$1, %edi
	movl	%eax, 400016(%rsp,%rdx,4)
.L14:
	cmpl	$1, %edi
	jg	.L15
.L8:
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L16
.L26:
	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:

#include <stdio.h>
#include <stdlib.h>

int asc(const void *a, const void *b) {
  int *A = (int *)a;
  int *B = (int*)b;
  if (*A > *B) return 1;
  if (*A < *B) return -1;
  return 0;
}
int main()
{
    int n,a[100000],pair[100000],i,j = 0,k;

    scanf("%d",&n);
    for (i = 0; i < n; i++)scanf("%d",&a[i]);
    qsort(a,n,sizeof(int),asc);

    long long cnt = 1;
    for (i = 0; i < n - 1; i++)
    {
        if(a[i] == a[i + 1])cnt++;
        else {
            if(2 <= cnt && cnt < 4){
                pair[j] = a[i];
                cnt = 1;
                j++;
            }
            else if(4 <= cnt)
            {
                pair[j] = a[i];
                j++;
                pair[j] = a[i];
                j++;
                cnt = 1;
            }
            
        }
    }
    if(2 <= cnt && cnt < 4){pair[j] = a[i];cnt = 1;j++;}else if(4 <= cnt){pair[j] = a[i];j++;pair[j] = a[i];j++;cnt = 1;}
    if(j < 2)
    {
        printf("0");
    }
    else
    {
        printf("%lld",(long long)pair[j - 1] * (long long)pair[j - 2]);
    }
}
6
3 1 2 4 2 1

2
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 asc(const void *a, const void *b) {
  int *A = (int *)a;
  int *B = (int*)b;
  if (*A > *B) return 1;
  if (*A < *B) return -1;
  return 0;
}
int main()
{
    int n,a[100000],pair[100000],i,j = 0,k;

    scanf("%d",&n);
    for (i = 0; i < n; i++)scanf("%d",&a[i]);
    qsort(a,n,sizeof(int),asc);

    long long cnt = 1;
    for (i = 0; i < n - 1; i++)
    {
        if(a[i] == a[i + 1])cnt++;
        else {
            if(2 <= cnt && cnt < 4){
                pair[j] = a[i];
                cnt = 1;
                j++;
            }
            else if(4 <= cnt)
            {
                pair[j] = a[i];
                j++;
                pair[j] = a[i];
                j++;
                cnt = 1;
            }
            
        }
    }
    if(2 <= cnt && cnt < 4){pair[j] = a[i];cnt = 1;j++;}else if(4 <= cnt){pair[j] = a[i];j++;pair[j] = a[i];j++;cnt = 1;}
    if(j < 2)
    {
        printf("0");
    }
    else
    {
        printf("%lld",(long long)pair[j - 1] * (long long)pair[j - 2]);
    }
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	asc
	.type	asc, @function
asc:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	asc, .-asc
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.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	$1328, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -800028(%rbp)
	leaq	-800036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800032(%rbp)
	jmp	.L6
.L7:
	leaq	-800016(%rbp), %rdx
	movl	-800032(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800032(%rbp)
.L6:
	movl	-800036(%rbp), %eax
	cmpl	%eax, -800032(%rbp)
	jl	.L7
	movl	-800036(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-800016(%rbp), %rax
	leaq	asc(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$1, -800024(%rbp)
	movl	$0, -800032(%rbp)
	jmp	.L8
.L12:
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800032(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-800016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L9
	addq	$1, -800024(%rbp)
	jmp	.L10
.L9:
	cmpq	$1, -800024(%rbp)
	jle	.L11
	cmpq	$3, -800024(%rbp)
	jg	.L11
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800028(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	movq	$1, -800024(%rbp)
	addl	$1, -800028(%rbp)
	jmp	.L10
.L11:
	cmpq	$3, -800024(%rbp)
	jle	.L10
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800028(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	addl	$1, -800028(%rbp)
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800028(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	addl	$1, -800028(%rbp)
	movq	$1, -800024(%rbp)
.L10:
	addl	$1, -800032(%rbp)
.L8:
	movl	-800036(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -800032(%rbp)
	jl	.L12
	cmpq	$1, -800024(%rbp)
	jle	.L13
	cmpq	$3, -800024(%rbp)
	jg	.L13
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800028(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	movq	$1, -800024(%rbp)
	addl	$1, -800028(%rbp)
	jmp	.L14
.L13:
	cmpq	$3, -800024(%rbp)
	jle	.L14
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800028(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	addl	$1, -800028(%rbp)
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800028(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	addl	$1, -800028(%rbp)
	movq	$1, -800024(%rbp)
.L14:
	cmpl	$1, -800028(%rbp)
	jg	.L15
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L16
.L15:
	movl	-800028(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-800028(%rbp), %eax
	subl	$2, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cltq
	imulq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L16:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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	asc
	.type	asc, @function
asc:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	asc, .-asc
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.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	$1328, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -800028(%rbp)
	leaq	-800036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800032(%rbp)
	jmp	.L6
.L7:
	leaq	-800016(%rbp), %rdx
	movl	-800032(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800032(%rbp)
.L6:
	movl	-800036(%rbp), %eax
	cmpl	%eax, -800032(%rbp)
	jl	.L7
	movl	-800036(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-800016(%rbp), %rax
	leaq	asc(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$1, -800024(%rbp)
	movl	$0, -800032(%rbp)
	jmp	.L8
.L12:
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800032(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-800016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L9
	addq	$1, -800024(%rbp)
	jmp	.L10
.L9:
	cmpq	$1, -800024(%rbp)
	jle	.L11
	cmpq	$3, -800024(%rbp)
	jg	.L11
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800028(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	movq	$1, -800024(%rbp)
	addl	$1, -800028(%rbp)
	jmp	.L10
.L11:
	cmpq	$3, -800024(%rbp)
	jle	.L10
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800028(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	addl	$1, -800028(%rbp)
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800028(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	addl	$1, -800028(%rbp)
	movq	$1, -800024(%rbp)
.L10:
	addl	$1, -800032(%rbp)
.L8:
	movl	-800036(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -800032(%rbp)
	jl	.L12
	cmpq	$1, -800024(%rbp)
	jle	.L13
	cmpq	$3, -800024(%rbp)
	jg	.L13
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800028(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	movq	$1, -800024(%rbp)
	addl	$1, -800028(%rbp)
	jmp	.L14
.L13:
	cmpq	$3, -800024(%rbp)
	jle	.L14
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800028(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	addl	$1, -800028(%rbp)
	movl	-800032(%rbp), %eax
	cltq
	movl	-800016(%rbp,%rax,4), %edx
	movl	-800028(%rbp), %eax
	cltq
	movl	%edx, -400016(%rbp,%rax,4)
	addl	$1, -800028(%rbp)
	movq	$1, -800024(%rbp)
.L14:
	cmpl	$1, -800028(%rbp)
	jg	.L15
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L16
.L15:
	movl	-800028(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-800028(%rbp), %eax
	subl	$2, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cltq
	imulq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L16:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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:
