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>


void quick_sorts(int *x, int left, int right){
    if(left >=right)return;
    int i = left,j = right, pivot = x[i];
    while(x[i]>pivot)i++;
    while(x[j]<pivot)j--;
    while(i < j){
        int tmp = x[i];
        x[i] = x[j];
        x[j] = tmp;
        i++;
        j--;
        while(x[i]>pivot)i++;
        while(x[j]<pivot)j--;
    }
    quick_sorts(x,left,i-1);
    quick_sorts(x,j+1,right);
}

int main(){
    int N;
    scanf("%d%*c",&N);
    int *L = (int *)malloc(N * sizeof(int));
    char *s = (char *)malloc(11 * N * sizeof(char));
    char *ms = s;
    fgets(s,11 * N,stdin);
    for(int i = 0; i < N; i++){
        for(int j = 0; j < 11; j++){
            if(s[j] == ' '||s[j] == '\n'){
                s[j] = '\0';
                L[i] = atoi(s);
                s = &s[j+1];
                break;
            }
        }
    }

    quick_sorts(L,0,N-1);
    int count = 0;
    for(int i = 0;i < N; i++){
        for(int j = 0;j < i; j++){
            for(int k = 0; k < j; k++){
                if(L[i]!=L[j]&&L[j]!=L[k]&&L[k]!=L[i]&&L[k]<L[j]+L[i]){
                    count++;
                }
            }
        }
    }
    free(L);
    free(ms);
    printf("%d\n",count);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	quick_sorts
	.type	quick_sorts, @function
quick_sorts:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jge	.L14
	movl	-28(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	jmp	.L4
.L5:
	addl	$1, -16(%rbp)
.L4:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L5
	jmp	.L6
.L7:
	subl	$1, -12(%rbp)
.L6:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L7
	jmp	.L8
.L13:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -16(%rbp)
	subl	$1, -12(%rbp)
	jmp	.L9
.L10:
	addl	$1, -16(%rbp)
.L9:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L10
	jmp	.L11
.L12:
	subl	$1, -12(%rbp)
.L11:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L12
.L8:
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L13
	movl	-16(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quick_sorts
	movl	-12(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %edx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quick_sorts
	jmp	.L1
.L14:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	quick_sorts, .-quick_sorts
	.section	.rodata
.LC0:
	.string	"%d%*c"
.LC1:
	.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
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-76(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-76(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -40(%rbp)
	movl	-76(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	cltq
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -48(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	stdin(%rip), %rcx
	movl	-76(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	leal	(%rax,%rdx), %esi
	movq	-48(%rbp), %rax
	movq	%rcx, %rdx
	movq	%rax, %rdi
	call	fgets@PLT
	movl	$0, -72(%rbp)
	jmp	.L16
.L22:
	movl	$0, -68(%rbp)
	jmp	.L17
.L21:
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$32, %al
	je	.L18
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$10, %al
	jne	.L19
.L18:
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movb	$0, (%rax)
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	leaq	(%rdx,%rax), %rbx
	movq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movl	%eax, (%rbx)
	movl	-68(%rbp), %eax
	cltq
	addq	$1, %rax
	addq	%rax, -48(%rbp)
	jmp	.L20
.L19:
	addl	$1, -68(%rbp)
.L17:
	cmpl	$10, -68(%rbp)
	jle	.L21
.L20:
	addl	$1, -72(%rbp)
.L16:
	movl	-76(%rbp), %eax
	cmpl	%eax, -72(%rbp)
	jl	.L22
	movl	-76(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-40(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	quick_sorts
	movl	$0, -64(%rbp)
	movl	$0, -60(%rbp)
	jmp	.L23
.L29:
	movl	$0, -56(%rbp)
	jmp	.L24
.L28:
	movl	$0, -52(%rbp)
	jmp	.L25
.L27:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-56(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	je	.L26
	movl	-56(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-52(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	je	.L26
	movl	-52(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	je	.L26
	movl	-52(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-56(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %ecx
	movl	-60(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rsi
	movq	-40(%rbp), %rdx
	addq	%rsi, %rdx
	movl	(%rdx), %edx
	addl	%ecx, %edx
	cmpl	%edx, %eax
	jge	.L26
	addl	$1, -64(%rbp)
.L26:
	addl	$1, -52(%rbp)
.L25:
	movl	-52(%rbp), %eax
	cmpl	-56(%rbp), %eax
	jl	.L27
	addl	$1, -56(%rbp)
.L24:
	movl	-56(%rbp), %eax
	cmpl	-60(%rbp), %eax
	jl	.L28
	addl	$1, -60(%rbp)
.L23:
	movl	-76(%rbp), %eax
	cmpl	%eax, -60(%rbp)
	jl	.L29
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	-64(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	movq	-8(%rbp), %rbx
	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	quick_sorts
	.type	quick_sorts, @function
quick_sorts:
.LFB39:
	.cfi_startproc
	endbr64
	cmpl	%edx, %esi
	jge	.L21
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movslq	%edx, %rax
	movl	%esi, %r9d
	movl	%edx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	(%rdi,%rax,4), %rbp
	movslq	%r9d, %rax
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rdi, %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	movl	(%rbx,%rax,4), %ecx
	movl	0(%rbp), %edx
	cmpl	%edx, %ecx
	jle	.L14
.L25:
	leal	-1(%r13), %eax
	cltq
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%eax, %esi
	subq	$1, %rax
	movl	4(%rbx,%rax,4), %edx
	cmpl	%ecx, %edx
	jl	.L4
.L3:
	cmpl	%r9d, %esi
	jle	.L5
	movl	%ecx, %r11d
	movl	%r9d, %edi
	movslq	%r9d, %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movslq	%esi, %r8
	movl	%edx, (%rbx,%rax,4)
	leal	1(%rdi), %edx
	movl	%r11d, (%rbx,%r8,4)
	leaq	0(,%r8,4), %r10
	leal	-1(%rsi), %r11d
	cmpl	4(%rbx,%rax,4), %ecx
	jge	.L15
	leal	2(%rdi), %eax
	cltq
	.p2align 4,,10
	.p2align 3
.L7:
	leal	-1(%rax), %r8d
	movl	%eax, %edi
	addq	$1, %rax
	cmpl	%ecx, -4(%rbx,%rax,4)
	jg	.L7
.L6:
	movl	-4(%rbx,%r10), %edx
	cmpl	%edx, %ecx
	jle	.L16
	leal	-2(%rsi), %eax
	cltq
	.p2align 4,,10
	.p2align 3
.L9:
	leal	1(%rax), %r12d
	movl	%eax, %esi
	subq	$1, %rax
	movl	4(%rbx,%rax,4), %edx
	cmpl	%ecx, %edx
	jl	.L9
.L8:
	cmpl	%esi, %edi
	jge	.L10
	movslq	%edi, %rax
	movl	(%rbx,%rax,4), %r11d
	jmp	.L11
.L5:
	leal	-1(%r9), %r8d
	leal	1(%rsi), %r12d
	.p2align 4,,10
	.p2align 3
.L10:
	movl	%r8d, %edx
	movl	%r9d, %esi
	movq	%rbx, %rdi
	call	quick_sorts
	cmpl	%r12d, %r13d
	jle	.L1
	movl	%r12d, %r9d
	movl	0(%rbp), %edx
	movslq	%r9d, %rax
	movl	(%rbx,%rax,4), %ecx
	cmpl	%edx, %ecx
	jg	.L25
.L14:
	movl	%r13d, %esi
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L16:
	movl	%esi, %r12d
	movl	%r11d, %esi
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%edi, %r8d
	movl	%edx, %edi
	jmp	.L6
.L1:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	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
.L21:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	ret
	.cfi_endproc
.LFE39:
	.size	quick_sorts, .-quick_sorts
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%*c"
.LC1:
	.string	"%d\n"
	.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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rdi
	movq	%rdi, %rbx
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rax, %rbp
	leal	(%rbx,%rbx,4), %eax
	leal	(%rbx,%rax,2), %r12d
	movslq	%r12d, %rdi
	call	malloc@PLT
	movq	stdin(%rip), %rcx
	movl	%r12d, %edx
	movq	$-1, %rsi
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	movq	%rax, %rbx
	xorl	%r12d, %r12d
	call	__fgets_chk@PLT
	movl	20(%rsp), %edx
	testl	%edx, %edx
	jle	.L28
	.p2align 4,,10
	.p2align 3
.L27:
	movzbl	(%rbx), %eax
	cmpb	$32, %al
	je	.L69
	cmpb	$10, %al
	je	.L69
	movzbl	1(%rbx), %eax
	cmpb	$32, %al
	je	.L73
	cmpb	$10, %al
	je	.L73
	movzbl	2(%rbx), %eax
	cmpb	$32, %al
	je	.L74
	cmpb	$10, %al
	je	.L74
	movzbl	3(%rbx), %eax
	cmpb	$32, %al
	je	.L75
	cmpb	$10, %al
	je	.L75
	movzbl	4(%rbx), %eax
	cmpb	$32, %al
	je	.L76
	cmpb	$10, %al
	je	.L76
	movzbl	5(%rbx), %eax
	cmpb	$32, %al
	je	.L77
	cmpb	$10, %al
	je	.L77
	movzbl	6(%rbx), %eax
	cmpb	$32, %al
	je	.L78
	cmpb	$10, %al
	je	.L78
	movzbl	7(%rbx), %eax
	cmpb	$32, %al
	je	.L79
	cmpb	$10, %al
	je	.L79
	movzbl	8(%rbx), %eax
	cmpb	$32, %al
	je	.L80
	cmpb	$10, %al
	je	.L80
	movzbl	9(%rbx), %eax
	cmpb	$32, %al
	je	.L81
	cmpb	$10, %al
	je	.L81
	movzbl	10(%rbx), %eax
	cmpb	$32, %al
	je	.L82
	cmpb	$10, %al
	je	.L82
.L48:
	addq	$1, %r12
	cmpl	%r12d, %edx
	jg	.L27
.L28:
	subl	$1, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	quick_sorts
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L70
	movslq	%eax, %r15
	movl	$1, %r13d
	leaq	16(%rbp), %r14
	xorl	%r12d, %r12d
	pxor	%xmm4, %xmm4
	cmpl	$1, %eax
	je	.L50
	.p2align 4,,10
	.p2align 3
.L65:
	movl	%r13d, %r10d
	cmpl	$1, %r13d
	je	.L63
	movl	0(%rbp,%r13,4), %r8d
	xorl	%esi, %esi
	movl	$1, %ecx
	movd	%r8d, %xmm7
	pshufd	$0, %xmm7, %xmm7
	.p2align 4,,10
	.p2align 3
.L66:
	movl	4(%rbp,%rsi,4), %edi
	leal	(%r8,%rdi), %r9d
	cmpl	%edi, %r8d
	je	.L56
	cmpq	$2, %rsi
	jbe	.L71
	movl	%ecx, %edx
	movd	%edi, %xmm5
	pxor	%xmm3, %xmm3
	movq	%rbp, %rax
	shrl	$2, %edx
	pshufd	$0, %xmm5, %xmm6
	movd	%r9d, %xmm5
	subl	$1, %edx
	pshufd	$0, %xmm5, %xmm5
	salq	$4, %rdx
	addq	%r14, %rdx
	.p2align 4,,10
	.p2align 3
.L54:
	movdqu	(%rax), %xmm1
	addq	$16, %rax
	movdqa	%xmm1, %xmm0
	movdqa	%xmm1, %xmm2
	pcmpeqd	%xmm7, %xmm0
	pcmpeqd	%xmm6, %xmm2
	pcmpeqd	%xmm4, %xmm0
	pcmpeqd	%xmm4, %xmm2
	pand	%xmm2, %xmm0
	movdqa	%xmm5, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pand	%xmm2, %xmm0
	psubd	%xmm0, %xmm3
	cmpq	%rax, %rdx
	jne	.L54
	movdqa	%xmm3, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm3
	movdqa	%xmm3, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm3
	movd	%xmm3, %eax
	addl	%eax, %r12d
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L56
.L53:
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %r11
	movl	0(%rbp,%rdx,4), %edx
	cmpl	%edx, %r8d
	je	.L58
	cmpl	%edx, %edi
	je	.L58
	cmpl	%r9d, %edx
	setl	%dl
	movzbl	%dl, %edx
	addl	%edx, %r12d
.L58:
	leal	1(%rax), %ebx
	movl	%esi, %edx
	cmpl	%esi, %eax
	jge	.L56
	movl	4(%rbp,%r11), %eax
	cmpl	%eax, %r8d
	je	.L59
	cmpl	%eax, %edi
	je	.L59
	cmpl	%eax, %r9d
	setg	%al
	movzbl	%al, %eax
	addl	%eax, %r12d
.L59:
	cmpl	%edx, %ebx
	jge	.L56
	movl	8(%rbp,%r11), %eax
	cmpl	%eax, %edi
	je	.L56
	cmpl	%eax, %r8d
	je	.L56
	cmpl	%eax, %r9d
	setg	%al
	movzbl	%al, %eax
	addl	%eax, %r12d
	.p2align 4,,10
	.p2align 3
.L56:
	addl	$1, %ecx
	addq	$1, %rsi
	cmpl	%r10d, %ecx
	jne	.L66
.L63:
	addq	$1, %r13
	cmpq	%r15, %r13
	jne	.L65
.L50:
	movq	%rbp, %rdi
	call	free@PLT
	movq	8(%rsp), %rdi
	call	free@PLT
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L111
	addq	$40, %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
.L71:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L53
.L69:
	movq	%rbx, %rax
	xorl	%r13d, %r13d
.L29:
	movb	$0, (%rax)
	movl	$10, %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	leaq	1(%rbx,%r13), %rbx
	call	strtol@PLT
	movl	20(%rsp), %edx
	movl	%eax, 0(%rbp,%r12,4)
	jmp	.L48
.L74:
	leaq	2(%rbx), %rax
	movl	$2, %r13d
	jmp	.L29
.L73:
	leaq	1(%rbx), %rax
	movl	$1, %r13d
	jmp	.L29
.L76:
	leaq	4(%rbx), %rax
	movl	$4, %r13d
	jmp	.L29
.L75:
	leaq	3(%rbx), %rax
	movl	$3, %r13d
	jmp	.L29
.L77:
	leaq	5(%rbx), %rax
	movl	$5, %r13d
	jmp	.L29
.L78:
	leaq	6(%rbx), %rax
	movl	$6, %r13d
	jmp	.L29
.L80:
	leaq	8(%rbx), %rax
	movl	$8, %r13d
	jmp	.L29
.L79:
	leaq	7(%rbx), %rax
	movl	$7, %r13d
	jmp	.L29
.L81:
	leaq	9(%rbx), %rax
	movl	$9, %r13d
	jmp	.L29
.L82:
	leaq	10(%rbx), %rax
	movl	$10, %r13d
	jmp	.L29
.L70:
	xorl	%r12d, %r12d
	jmp	.L50
.L111:
	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	quick_sorts
	.type	quick_sorts, @function
quick_sorts:
.LFB39:
	.cfi_startproc
	endbr64
	cmpl	%edx, %esi
	jge	.L21
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movslq	%edx, %rax
	movl	%esi, %r9d
	movl	%edx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	(%rdi,%rax,4), %rbp
	movslq	%r9d, %rax
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rdi, %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	movl	(%rbx,%rax,4), %ecx
	movl	0(%rbp), %edx
	cmpl	%edx, %ecx
	jle	.L14
.L25:
	leal	-1(%r13), %eax
	cltq
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%eax, %esi
	subq	$1, %rax
	movl	4(%rbx,%rax,4), %edx
	cmpl	%ecx, %edx
	jl	.L4
.L3:
	cmpl	%r9d, %esi
	jle	.L5
	movl	%ecx, %r11d
	movl	%r9d, %edi
	movslq	%r9d, %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movslq	%esi, %r8
	movl	%edx, (%rbx,%rax,4)
	leal	1(%rdi), %edx
	movl	%r11d, (%rbx,%r8,4)
	leaq	0(,%r8,4), %r10
	leal	-1(%rsi), %r11d
	cmpl	4(%rbx,%rax,4), %ecx
	jge	.L15
	leal	2(%rdi), %eax
	cltq
	.p2align 4,,10
	.p2align 3
.L7:
	leal	-1(%rax), %r8d
	movl	%eax, %edi
	addq	$1, %rax
	cmpl	%ecx, -4(%rbx,%rax,4)
	jg	.L7
.L6:
	movl	-4(%rbx,%r10), %edx
	cmpl	%edx, %ecx
	jle	.L16
	leal	-2(%rsi), %eax
	cltq
	.p2align 4,,10
	.p2align 3
.L9:
	leal	1(%rax), %r12d
	movl	%eax, %esi
	subq	$1, %rax
	movl	4(%rbx,%rax,4), %edx
	cmpl	%ecx, %edx
	jl	.L9
.L8:
	cmpl	%esi, %edi
	jge	.L10
	movslq	%edi, %rax
	movl	(%rbx,%rax,4), %r11d
	jmp	.L11
.L5:
	leal	-1(%r9), %r8d
	leal	1(%rsi), %r12d
	.p2align 4,,10
	.p2align 3
.L10:
	movl	%r8d, %edx
	movl	%r9d, %esi
	movq	%rbx, %rdi
	call	quick_sorts
	cmpl	%r12d, %r13d
	jle	.L1
	movl	%r12d, %r9d
	movl	0(%rbp), %edx
	movslq	%r9d, %rax
	movl	(%rbx,%rax,4), %ecx
	cmpl	%edx, %ecx
	jg	.L25
.L14:
	movl	%r13d, %esi
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L16:
	movl	%esi, %r12d
	movl	%r11d, %esi
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%edi, %r8d
	movl	%edx, %edi
	jmp	.L6
.L1:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	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
.L21:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	ret
	.cfi_endproc
.LFE39:
	.size	quick_sorts, .-quick_sorts
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%*c"
.LC1:
	.string	"%d\n"
	.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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rdi
	movq	%rdi, %rbx
	salq	$2, %rdi
	call	malloc@PLT
	movq	%rax, %rbp
	leal	(%rbx,%rbx,4), %eax
	leal	(%rbx,%rax,2), %r12d
	movslq	%r12d, %rdi
	call	malloc@PLT
	movq	stdin(%rip), %rcx
	movl	%r12d, %edx
	movq	$-1, %rsi
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	movq	%rax, %rbx
	xorl	%r12d, %r12d
	call	__fgets_chk@PLT
	movl	20(%rsp), %edx
	testl	%edx, %edx
	jle	.L28
	.p2align 4,,10
	.p2align 3
.L27:
	movzbl	(%rbx), %eax
	cmpb	$32, %al
	je	.L69
	cmpb	$10, %al
	je	.L69
	movzbl	1(%rbx), %eax
	cmpb	$32, %al
	je	.L73
	cmpb	$10, %al
	je	.L73
	movzbl	2(%rbx), %eax
	cmpb	$32, %al
	je	.L74
	cmpb	$10, %al
	je	.L74
	movzbl	3(%rbx), %eax
	cmpb	$32, %al
	je	.L75
	cmpb	$10, %al
	je	.L75
	movzbl	4(%rbx), %eax
	cmpb	$32, %al
	je	.L76
	cmpb	$10, %al
	je	.L76
	movzbl	5(%rbx), %eax
	cmpb	$32, %al
	je	.L77
	cmpb	$10, %al
	je	.L77
	movzbl	6(%rbx), %eax
	cmpb	$32, %al
	je	.L78
	cmpb	$10, %al
	je	.L78
	movzbl	7(%rbx), %eax
	cmpb	$32, %al
	je	.L79
	cmpb	$10, %al
	je	.L79
	movzbl	8(%rbx), %eax
	cmpb	$32, %al
	je	.L80
	cmpb	$10, %al
	je	.L80
	movzbl	9(%rbx), %eax
	cmpb	$32, %al
	je	.L81
	cmpb	$10, %al
	je	.L81
	movzbl	10(%rbx), %eax
	cmpb	$32, %al
	je	.L82
	cmpb	$10, %al
	je	.L82
.L48:
	addq	$1, %r12
	cmpl	%r12d, %edx
	jg	.L27
.L28:
	subl	$1, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	quick_sorts
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L70
	movslq	%eax, %r15
	movl	$1, %r13d
	leaq	16(%rbp), %r14
	xorl	%r12d, %r12d
	pxor	%xmm4, %xmm4
	cmpl	$1, %eax
	je	.L50
	.p2align 4,,10
	.p2align 3
.L65:
	movl	%r13d, %r10d
	cmpl	$1, %r13d
	je	.L63
	movl	0(%rbp,%r13,4), %r8d
	xorl	%esi, %esi
	movl	$1, %ecx
	movd	%r8d, %xmm7
	pshufd	$0, %xmm7, %xmm7
	.p2align 4,,10
	.p2align 3
.L66:
	movl	4(%rbp,%rsi,4), %edi
	leal	(%r8,%rdi), %r9d
	cmpl	%edi, %r8d
	je	.L56
	cmpq	$2, %rsi
	jbe	.L71
	movl	%ecx, %edx
	movd	%edi, %xmm5
	pxor	%xmm3, %xmm3
	movq	%rbp, %rax
	shrl	$2, %edx
	pshufd	$0, %xmm5, %xmm6
	movd	%r9d, %xmm5
	subl	$1, %edx
	pshufd	$0, %xmm5, %xmm5
	salq	$4, %rdx
	addq	%r14, %rdx
	.p2align 4,,10
	.p2align 3
.L54:
	movdqu	(%rax), %xmm1
	addq	$16, %rax
	movdqa	%xmm1, %xmm0
	movdqa	%xmm1, %xmm2
	pcmpeqd	%xmm7, %xmm0
	pcmpeqd	%xmm6, %xmm2
	pcmpeqd	%xmm4, %xmm0
	pcmpeqd	%xmm4, %xmm2
	pand	%xmm2, %xmm0
	movdqa	%xmm5, %xmm2
	pcmpgtd	%xmm1, %xmm2
	pand	%xmm2, %xmm0
	psubd	%xmm0, %xmm3
	cmpq	%rax, %rdx
	jne	.L54
	movdqa	%xmm3, %xmm0
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm3
	movdqa	%xmm3, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm3
	movd	%xmm3, %eax
	addl	%eax, %r12d
	movl	%ecx, %eax
	andl	$-4, %eax
	testb	$3, %cl
	je	.L56
.L53:
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %r11
	movl	0(%rbp,%rdx,4), %edx
	cmpl	%edx, %r8d
	je	.L58
	cmpl	%edx, %edi
	je	.L58
	cmpl	%r9d, %edx
	setl	%dl
	movzbl	%dl, %edx
	addl	%edx, %r12d
.L58:
	leal	1(%rax), %ebx
	movl	%esi, %edx
	cmpl	%esi, %eax
	jge	.L56
	movl	4(%rbp,%r11), %eax
	cmpl	%eax, %r8d
	je	.L59
	cmpl	%eax, %edi
	je	.L59
	cmpl	%eax, %r9d
	setg	%al
	movzbl	%al, %eax
	addl	%eax, %r12d
.L59:
	cmpl	%edx, %ebx
	jge	.L56
	movl	8(%rbp,%r11), %eax
	cmpl	%eax, %edi
	je	.L56
	cmpl	%eax, %r8d
	je	.L56
	cmpl	%eax, %r9d
	setg	%al
	movzbl	%al, %eax
	addl	%eax, %r12d
	.p2align 4,,10
	.p2align 3
.L56:
	addl	$1, %ecx
	addq	$1, %rsi
	cmpl	%r10d, %ecx
	jne	.L66
.L63:
	addq	$1, %r13
	cmpq	%r15, %r13
	jne	.L65
.L50:
	movq	%rbp, %rdi
	call	free@PLT
	movq	8(%rsp), %rdi
	call	free@PLT
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L111
	addq	$40, %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
.L71:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L53
.L69:
	movq	%rbx, %rax
	xorl	%r13d, %r13d
.L29:
	movb	$0, (%rax)
	movl	$10, %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	leaq	1(%rbx,%r13), %rbx
	call	strtol@PLT
	movl	20(%rsp), %edx
	movl	%eax, 0(%rbp,%r12,4)
	jmp	.L48
.L74:
	leaq	2(%rbx), %rax
	movl	$2, %r13d
	jmp	.L29
.L73:
	leaq	1(%rbx), %rax
	movl	$1, %r13d
	jmp	.L29
.L76:
	leaq	4(%rbx), %rax
	movl	$4, %r13d
	jmp	.L29
.L75:
	leaq	3(%rbx), %rax
	movl	$3, %r13d
	jmp	.L29
.L77:
	leaq	5(%rbx), %rax
	movl	$5, %r13d
	jmp	.L29
.L78:
	leaq	6(%rbx), %rax
	movl	$6, %r13d
	jmp	.L29
.L80:
	leaq	8(%rbx), %rax
	movl	$8, %r13d
	jmp	.L29
.L79:
	leaq	7(%rbx), %rax
	movl	$7, %r13d
	jmp	.L29
.L81:
	leaq	9(%rbx), %rax
	movl	$9, %r13d
	jmp	.L29
.L82:
	leaq	10(%rbx), %rax
	movl	$10, %r13d
	jmp	.L29
.L70:
	xorl	%r12d, %r12d
	jmp	.L50
.L111:
	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>


void quick_sorts(int *x, int left, int right){
    if(left >=right)return;
    int i = left,j = right, pivot = x[i];
    while(x[i]>pivot)i++;
    while(x[j]<pivot)j--;
    while(i < j){
        int tmp = x[i];
        x[i] = x[j];
        x[j] = tmp;
        i++;
        j--;
        while(x[i]>pivot)i++;
        while(x[j]<pivot)j--;
    }
    quick_sorts(x,left,i-1);
    quick_sorts(x,j+1,right);
}

int main(){
    int N;
    scanf("%d%*c",&N);
    int *L = (int *)malloc(N * sizeof(int));
    char *s = (char *)malloc(11 * N * sizeof(char));
    char *ms = s;
    fgets(s,11 * N,stdin);
    for(int i = 0; i < N; i++){
        for(int j = 0; j < 11; j++){
            if(s[j] == ' '||s[j] == '\n'){
                s[j] = '\0';
                L[i] = atoi(s);
                s = &s[j+1];
                break;
            }
        }
    }

    quick_sorts(L,0,N-1);
    int count = 0;
    for(int i = 0;i < N; i++){
        for(int j = 0;j < i; j++){
            for(int k = 0; k < j; k++){
                if(L[i]!=L[j]&&L[j]!=L[k]&&L[k]!=L[i]&&L[k]<L[j]+L[i]){
                    count++;
                }
            }
        }
    }
    free(L);
    free(ms);
    printf("%d\n",count);
    return 0;
}

2
1 0
 10
9 4 8 1 9 6 10 6 6 8
 6
4 5 8 3 3 5
 5
4 4 3 7 5
 10
9 4 16 1 9 6 10 6 6 8
 6
4 5 6 3 3 5
 5
4 0 3 7 5
 10
9 7 16 1 9 6 10 6 6 8
 5
4 -1 0 7 5
 10
9 7 13 2 9 6 10 6 6 8

0
 48
 6
 5
 36
 12
 3
 40
 1
 63

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>


void quick_sorts(int *x, int left, int right){
    if(left >=right)return;
    int i = left,j = right, pivot = x[i];
    while(x[i]>pivot)i++;
    while(x[j]<pivot)j--;
    while(i < j){
        int tmp = x[i];
        x[i] = x[j];
        x[j] = tmp;
        i++;
        j--;
        while(x[i]>pivot)i++;
        while(x[j]<pivot)j--;
    }
    quick_sorts(x,left,i-1);
    quick_sorts(x,j+1,right);
}

int main(){
    int N;
    scanf("%d%*c",&N);
    int *L = (int *)malloc(N * sizeof(int));
    char *s = (char *)malloc(11 * N * sizeof(char));
    char *ms = s;
    fgets(s,11 * N,stdin);
    for(int i = 0; i < N; i++){
        for(int j = 0; j < 11; j++){
            if(s[j] == ' '||s[j] == '\n'){
                s[j] = '\0';
                L[i] = atoi(s);
                s = &s[j+1];
                break;
            }
        }
    }

    quick_sorts(L,0,N-1);
    int count = 0;
    for(int i = 0;i < N; i++){
        for(int j = 0;j < i; j++){
            for(int k = 0; k < j; k++){
                if(L[i]!=L[j]&&L[j]!=L[k]&&L[k]!=L[i]&&L[k]<L[j]+L[i]){
                    count++;
                }
            }
        }
    }
    free(L);
    free(ms);
    printf("%d\n",count);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	quick_sorts
	.type	quick_sorts, @function
quick_sorts:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jge	.L14
	movl	-28(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	jmp	.L4
.L5:
	addl	$1, -16(%rbp)
.L4:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L5
	jmp	.L6
.L7:
	subl	$1, -12(%rbp)
.L6:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L7
	jmp	.L8
.L13:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -16(%rbp)
	subl	$1, -12(%rbp)
	jmp	.L9
.L10:
	addl	$1, -16(%rbp)
.L9:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L10
	jmp	.L11
.L12:
	subl	$1, -12(%rbp)
.L11:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L12
.L8:
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L13
	movl	-16(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quick_sorts
	movl	-12(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %edx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quick_sorts
	jmp	.L1
.L14:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	quick_sorts, .-quick_sorts
	.section	.rodata
.LC0:
	.string	"%d%*c"
.LC1:
	.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
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-76(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-76(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -40(%rbp)
	movl	-76(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	cltq
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -48(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	stdin(%rip), %rcx
	movl	-76(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	leal	(%rax,%rdx), %esi
	movq	-48(%rbp), %rax
	movq	%rcx, %rdx
	movq	%rax, %rdi
	call	fgets@PLT
	movl	$0, -72(%rbp)
	jmp	.L16
.L22:
	movl	$0, -68(%rbp)
	jmp	.L17
.L21:
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$32, %al
	je	.L18
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$10, %al
	jne	.L19
.L18:
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movb	$0, (%rax)
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	leaq	(%rdx,%rax), %rbx
	movq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movl	%eax, (%rbx)
	movl	-68(%rbp), %eax
	cltq
	addq	$1, %rax
	addq	%rax, -48(%rbp)
	jmp	.L20
.L19:
	addl	$1, -68(%rbp)
.L17:
	cmpl	$10, -68(%rbp)
	jle	.L21
.L20:
	addl	$1, -72(%rbp)
.L16:
	movl	-76(%rbp), %eax
	cmpl	%eax, -72(%rbp)
	jl	.L22
	movl	-76(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-40(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	quick_sorts
	movl	$0, -64(%rbp)
	movl	$0, -60(%rbp)
	jmp	.L23
.L29:
	movl	$0, -56(%rbp)
	jmp	.L24
.L28:
	movl	$0, -52(%rbp)
	jmp	.L25
.L27:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-56(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	je	.L26
	movl	-56(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-52(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	je	.L26
	movl	-52(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	je	.L26
	movl	-52(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-56(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %ecx
	movl	-60(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rsi
	movq	-40(%rbp), %rdx
	addq	%rsi, %rdx
	movl	(%rdx), %edx
	addl	%ecx, %edx
	cmpl	%edx, %eax
	jge	.L26
	addl	$1, -64(%rbp)
.L26:
	addl	$1, -52(%rbp)
.L25:
	movl	-52(%rbp), %eax
	cmpl	-56(%rbp), %eax
	jl	.L27
	addl	$1, -56(%rbp)
.L24:
	movl	-56(%rbp), %eax
	cmpl	-60(%rbp), %eax
	jl	.L28
	addl	$1, -60(%rbp)
.L23:
	movl	-76(%rbp), %eax
	cmpl	%eax, -60(%rbp)
	jl	.L29
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	-64(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	movq	-8(%rbp), %rbx
	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	quick_sorts
	.type	quick_sorts, @function
quick_sorts:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jge	.L14
	movl	-28(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	jmp	.L4
.L5:
	addl	$1, -16(%rbp)
.L4:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L5
	jmp	.L6
.L7:
	subl	$1, -12(%rbp)
.L6:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L7
	jmp	.L8
.L13:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -16(%rbp)
	subl	$1, -12(%rbp)
	jmp	.L9
.L10:
	addl	$1, -16(%rbp)
.L9:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L10
	jmp	.L11
.L12:
	subl	$1, -12(%rbp)
.L11:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L12
.L8:
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L13
	movl	-16(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quick_sorts
	movl	-12(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %edx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quick_sorts
	jmp	.L1
.L14:
	nop
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	quick_sorts, .-quick_sorts
	.section	.rodata
.LC0:
	.string	"%d%*c"
.LC1:
	.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
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-76(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-76(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -40(%rbp)
	movl	-76(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	cltq
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -48(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	stdin(%rip), %rcx
	movl	-76(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	leal	(%rax,%rdx), %esi
	movq	-48(%rbp), %rax
	movq	%rcx, %rdx
	movq	%rax, %rdi
	call	fgets@PLT
	movl	$0, -72(%rbp)
	jmp	.L16
.L22:
	movl	$0, -68(%rbp)
	jmp	.L17
.L21:
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$32, %al
	je	.L18
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$10, %al
	jne	.L19
.L18:
	movl	-68(%rbp), %eax
	movslq	%eax, %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movb	$0, (%rax)
	movl	-72(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	leaq	(%rdx,%rax), %rbx
	movq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movl	%eax, (%rbx)
	movl	-68(%rbp), %eax
	cltq
	addq	$1, %rax
	addq	%rax, -48(%rbp)
	jmp	.L20
.L19:
	addl	$1, -68(%rbp)
.L17:
	cmpl	$10, -68(%rbp)
	jle	.L21
.L20:
	addl	$1, -72(%rbp)
.L16:
	movl	-76(%rbp), %eax
	cmpl	%eax, -72(%rbp)
	jl	.L22
	movl	-76(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-40(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	quick_sorts
	movl	$0, -64(%rbp)
	movl	$0, -60(%rbp)
	jmp	.L23
.L29:
	movl	$0, -56(%rbp)
	jmp	.L24
.L28:
	movl	$0, -52(%rbp)
	jmp	.L25
.L27:
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-56(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	je	.L26
	movl	-56(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-52(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	je	.L26
	movl	-52(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-60(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-40(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	je	.L26
	movl	-52(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	-56(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rdx), %ecx
	movl	-60(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rsi
	movq	-40(%rbp), %rdx
	addq	%rsi, %rdx
	movl	(%rdx), %edx
	addl	%ecx, %edx
	cmpl	%edx, %eax
	jge	.L26
	addl	$1, -64(%rbp)
.L26:
	addl	$1, -52(%rbp)
.L25:
	movl	-52(%rbp), %eax
	cmpl	-56(%rbp), %eax
	jl	.L27
	addl	$1, -56(%rbp)
.L24:
	movl	-56(%rbp), %eax
	cmpl	-60(%rbp), %eax
	jl	.L28
	addl	$1, -60(%rbp)
.L23:
	movl	-76(%rbp), %eax
	cmpl	%eax, -60(%rbp)
	jl	.L29
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	-64(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	movq	-8(%rbp), %rbx
	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:
