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>
#include <string.h>
#include <math.h>
#include <stdbool.h>
typedef long long ll;
#define rep(i,n) for(ll i=0; i<(ll)(n); i++)
#define max(l,r) ((l)>(r)?l:r)
#define min(l,r) ((l)<(r)?l:r)
typedef struct{int first, second, pi, pj;} P;
int upcmpllp(const void *a, const void *b){
    if(((P*)a)->first != ((P*)b)->first) 
        return (((P*)a)->first > ((P*)b)->first?1:-1);
    else
        return (((P*)a)->second == ((P*)b)->second ? 0 : (((P*)a)->second > ((P*)b)->second ? 1 : -1));
}
void sort_up(P *a, int n){ qsort(a, n, sizeof(P), upcmpllp); }

int main(){
    int n;
    scanf("%d", &n);
    int x[55], y[55];
    P diff[2525];
    rep(i, n) scanf("%d%d", &x[i], &y[i]);

    int ans = 55;
    int idx = 0;
    for(int i = 0; i < n; i++){
        for (int j = 0; j < n; j++){
            if(i == j) continue;
            diff[idx].first = x[j] - x[i];
            diff[idx].second = y[j] - y[i];
            diff[idx].pi = i;
            diff[idx].pj = j;
            idx++;
        }
    }
    sort_up(diff, idx);
    int ch[55];
    rep(i, n) ch[i] = 1;
    rep(i, idx){
        ch[diff[i].pj] = 0;
        if(i+1 < idx 
           && diff[i].first == diff[i+1].first
           && diff[i].second == diff[i+1].second){
        }else{
            int tmp = 0;
            rep(j, n) tmp += ch[j];
            ans = min(ans, tmp);
            rep(j, n) ch[j] = 1;
        }
    }
    if(n == 1) ans = 1;
    printf("%d\n", ans);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	upcmpllp
	.type	upcmpllp, @function
upcmpllp:
.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), %eax
	cmpl	%eax, %edx
	je	.L2
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L3
	movl	$1, %eax
	jmp	.L5
.L3:
	movl	$-1, %eax
	jmp	.L5
.L2:
	movq	-8(%rbp), %rax
	movl	4(%rax), %edx
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	je	.L6
	movq	-8(%rbp), %rax
	movl	4(%rax), %edx
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jle	.L7
	movl	$1, %eax
	jmp	.L5
.L7:
	movl	$-1, %eax
	jmp	.L5
.L6:
	movl	$0, %eax
.L5:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upcmpllp, .-upcmpllp
	.globl	sort_up
	.type	sort_up, @function
sort_up:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upcmpllp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sort_up, .-sort_up
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-40960(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$192, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-41152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -41128(%rbp)
	jmp	.L12
.L13:
	leaq	-40864(%rbp), %rdx
	movq	-41128(%rbp), %rax
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-41088(%rbp), %rcx
	movq	-41128(%rbp), %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -41128(%rbp)
.L12:
	movl	-41152(%rbp), %eax
	cltq
	cmpq	%rax, -41128(%rbp)
	jl	.L13
	movl	$55, -41148(%rbp)
	movl	$0, -41144(%rbp)
	movl	$0, -41140(%rbp)
	jmp	.L14
.L19:
	movl	$0, -41136(%rbp)
	jmp	.L15
.L18:
	movl	-41140(%rbp), %eax
	cmpl	-41136(%rbp), %eax
	je	.L33
	movl	-41136(%rbp), %eax
	cltq
	movl	-41088(%rbp,%rax,4), %edx
	movl	-41140(%rbp), %eax
	cltq
	movl	-41088(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-41144(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40416, %rax
	movl	%edx, (%rax)
	movl	-41136(%rbp), %eax
	cltq
	movl	-40864(%rbp,%rax,4), %edx
	movl	-41140(%rbp), %eax
	cltq
	movl	-40864(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-41144(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40412, %rax
	movl	%edx, (%rax)
	movl	-41144(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rbp, %rax
	leaq	-40408(%rax), %rdx
	movl	-41140(%rbp), %eax
	movl	%eax, (%rdx)
	movl	-41144(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rbp, %rax
	leaq	-40404(%rax), %rdx
	movl	-41136(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -41144(%rbp)
	jmp	.L17
.L33:
	nop
.L17:
	addl	$1, -41136(%rbp)
.L15:
	movl	-41152(%rbp), %eax
	cmpl	%eax, -41136(%rbp)
	jl	.L18
	addl	$1, -41140(%rbp)
.L14:
	movl	-41152(%rbp), %eax
	cmpl	%eax, -41140(%rbp)
	jl	.L19
	movl	-41144(%rbp), %edx
	leaq	-40416(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	sort_up
	movq	$0, -41120(%rbp)
	jmp	.L20
.L21:
	movq	-41120(%rbp), %rax
	movl	$1, -40640(%rbp,%rax,4)
	addq	$1, -41120(%rbp)
.L20:
	movl	-41152(%rbp), %eax
	cltq
	cmpq	%rax, -41120(%rbp)
	jl	.L21
	movq	$0, -41112(%rbp)
	jmp	.L22
.L29:
	movq	-41112(%rbp), %rax
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40404, %rax
	movl	(%rax), %eax
	cltq
	movl	$0, -40640(%rbp,%rax,4)
	movq	-41112(%rbp), %rax
	leaq	1(%rax), %rdx
	movl	-41144(%rbp), %eax
	cltq
	cmpq	%rax, %rdx
	jge	.L23
	movq	-41112(%rbp), %rax
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40416, %rax
	movl	(%rax), %edx
	movq	-41112(%rbp), %rax
	addq	$1, %rax
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40416, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jne	.L23
	movq	-41112(%rbp), %rax
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40412, %rax
	movl	(%rax), %edx
	movq	-41112(%rbp), %rax
	addq	$1, %rax
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40412, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	je	.L24
.L23:
	movl	$0, -41132(%rbp)
	movq	$0, -41104(%rbp)
	jmp	.L25
.L26:
	movq	-41104(%rbp), %rax
	movl	-40640(%rbp,%rax,4), %eax
	addl	%eax, -41132(%rbp)
	addq	$1, -41104(%rbp)
.L25:
	movl	-41152(%rbp), %eax
	cltq
	cmpq	%rax, -41104(%rbp)
	jl	.L26
	movl	-41148(%rbp), %edx
	movl	-41132(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -41148(%rbp)
	movq	$0, -41096(%rbp)
	jmp	.L27
.L28:
	movq	-41096(%rbp), %rax
	movl	$1, -40640(%rbp,%rax,4)
	addq	$1, -41096(%rbp)
.L27:
	movl	-41152(%rbp), %eax
	cltq
	cmpq	%rax, -41096(%rbp)
	jl	.L28
.L24:
	addq	$1, -41112(%rbp)
.L22:
	movl	-41144(%rbp), %eax
	cltq
	cmpq	%rax, -41112(%rbp)
	jl	.L29
	movl	-41152(%rbp), %eax
	cmpl	$1, %eax
	jne	.L30
	movl	$1, -41148(%rbp)
.L30:
	movl	-41148(%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	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	upcmpllp
	.type	upcmpllp, @function
upcmpllp:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	je	.L2
.L7:
	setg	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	movl	4(%rsi), %edx
	xorl	%eax, %eax
	cmpl	%edx, 4(%rdi)
	jne	.L7
	ret
	.cfi_endproc
.LFE51:
	.size	upcmpllp, .-upcmpllp
	.p2align 4
	.globl	sort_up
	.type	sort_up, @function
sort_up:
.LFB52:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upcmpllp(%rip), %rcx
	movl	$16, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE52:
	.size	sort_up, .-sort_up
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-40960(%rsp), %r11
	.cfi_def_cfa 11, 41008
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$144, %rsp
	.cfi_def_cfa_offset 41152
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 41096(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	leaq	16(%rsp), %r13
	xorl	%ebx, %ebx
	leaq	240(%rsp), %r12
	movq	%r13, %r14
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	leaq	(%r12,%rbx,4), %rdx
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rdi
	addq	$1, %rbx
	addq	$4, %r14
	movq	%rdi, %r10
	cmpq	%rbx, %rdi
	jg	.L13
	testl	%edi, %edi
	jle	.L12
	movq	%r13, %r9
	movq	%r12, %r8
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	leaq	688(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L15:
	cmpl	%eax, %esi
	je	.L14
	movl	0(%r13,%rax,4), %edx
	subl	(%r9), %edx
	movd	%esi, %xmm1
	movd	%eax, %xmm4
	movd	%edx, %xmm0
	movl	(%r12,%rax,4), %edx
	subl	(%r8), %edx
	movslq	%ebx, %rcx
	movd	%edx, %xmm3
	punpckldq	%xmm4, %xmm1
	salq	$4, %rcx
	addl	$1, %ebx
	punpckldq	%xmm3, %xmm0
	punpcklqdq	%xmm1, %xmm0
	movaps	%xmm0, 0(%rbp,%rcx)
.L14:
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L15
	addl	$1, %esi
	addq	$4, %r9
	addq	$4, %r8
	cmpl	%esi, %r10d
	jne	.L16
	movslq	%ebx, %r12
	leaq	upcmpllp(%rip), %rcx
	movl	$16, %edx
	movq	%rbp, %rdi
	movq	%r12, %rsi
	call	qsort@PLT
	movslq	12(%rsp), %rcx
	movq	%rcx, %r9
	testq	%rcx, %rcx
	jle	.L17
.L38:
	testq	%rcx, %rcx
	movl	$1, %eax
	cmovg	%rcx, %rax
	cmpq	$3, %rcx
	jle	.L48
	movdqa	.LC2(%rip), %xmm0
	movq	%rax, %rdx
	shrq	$2, %rdx
	movaps	%xmm0, 464(%rsp)
	cmpq	$1, %rdx
	je	.L19
	movaps	%xmm0, 480(%rsp)
	cmpq	$2, %rdx
	je	.L19
	movaps	%xmm0, 496(%rsp)
	cmpq	$3, %rdx
	je	.L19
	movaps	%xmm0, 512(%rsp)
	cmpq	$4, %rdx
	je	.L19
	movaps	%xmm0, 528(%rsp)
	cmpq	$5, %rdx
	je	.L19
	movaps	%xmm0, 544(%rsp)
	cmpq	$6, %rdx
	je	.L19
	movaps	%xmm0, 560(%rsp)
	cmpq	$7, %rdx
	je	.L19
	movaps	%xmm0, 576(%rsp)
	cmpq	$8, %rdx
	je	.L19
	movaps	%xmm0, 592(%rsp)
	cmpq	$9, %rdx
	je	.L19
	movaps	%xmm0, 608(%rsp)
	cmpq	$10, %rdx
	je	.L19
	movaps	%xmm0, 624(%rsp)
	cmpq	$11, %rdx
	je	.L19
	movaps	%xmm0, 640(%rsp)
	cmpq	$12, %rdx
	je	.L19
	movaps	%xmm0, 656(%rsp)
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%rax, %rdx
	andq	$-4, %rdx
	testb	$3, %al
	je	.L17
.L18:
	movl	$1, 464(%rsp,%rdx,4)
	leaq	1(%rdx), %rax
	cmpq	%rax, %rcx
	jle	.L17
	movl	$1, 464(%rsp,%rax,4)
	addq	$2, %rdx
	cmpq	%rdx, %rcx
	jle	.L17
	movl	$1, 464(%rsp,%rdx,4)
.L17:
	testl	%ebx, %ebx
	je	.L49
	movq	%rcx, %rdi
	movq	%rcx, %rdx
	movdqa	.LC2(%rip), %xmm1
	xorl	%esi, %esi
	andq	$-4, %rdi
	leaq	-1(%rcx), %r10
	shrq	$2, %rdx
	movl	$55, %r8d
	leaq	1(%rdi), %r11
	.p2align 4,,10
	.p2align 3
.L34:
	movslq	12(%rbp), %rax
	addq	$1, %rsi
	movl	$0, 464(%rsp,%rax,4)
	cmpq	%r12, %rsi
	jge	.L22
	movl	16(%rbp), %eax
	cmpl	%eax, 0(%rbp)
	jne	.L22
	movl	20(%rbp), %eax
	cmpl	%eax, 4(%rbp)
	jne	.L22
	addq	$16, %rbp
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L22:
	testq	%rcx, %rcx
	jle	.L160
	cmpq	$2, %r10
	jbe	.L27
	movdqa	464(%rsp), %xmm0
	cmpq	$1, %rdx
	jbe	.L28
	paddd	480(%rsp), %xmm0
	cmpq	$2, %rdx
	je	.L28
	paddd	496(%rsp), %xmm0
	cmpq	$3, %rdx
	je	.L28
	paddd	512(%rsp), %xmm0
	cmpq	$4, %rdx
	je	.L28
	paddd	528(%rsp), %xmm0
	cmpq	$5, %rdx
	je	.L28
	paddd	544(%rsp), %xmm0
	cmpq	$6, %rdx
	je	.L28
	paddd	560(%rsp), %xmm0
	cmpq	$7, %rdx
	je	.L28
	paddd	576(%rsp), %xmm0
	cmpq	$8, %rdx
	je	.L28
	paddd	592(%rsp), %xmm0
	cmpq	$9, %rdx
	je	.L28
	paddd	608(%rsp), %xmm0
	cmpq	$10, %rdx
	je	.L28
	paddd	624(%rsp), %xmm0
	cmpq	$11, %rdx
	je	.L28
	paddd	640(%rsp), %xmm0
	cmpq	$12, %rdx
	je	.L28
	paddd	656(%rsp), %xmm0
	.p2align 4,,10
	.p2align 3
.L28:
	movdqa	%xmm0, %xmm2
	psrldq	$8, %xmm2
	paddd	%xmm2, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	paddd	%xmm2, %xmm0
	movd	%xmm0, %eax
	cmpq	%rdi, %rcx
	je	.L158
	addl	464(%rsp,%rdi,4), %eax
	movq	%r11, %rbx
	cmpq	%r11, %rcx
	jle	.L158
.L44:
	addl	464(%rsp,%rbx,4), %eax
	addq	$1, %rbx
	cmpq	%rbx, %rcx
	jle	.L31
	addl	464(%rsp,%rbx,4), %eax
.L31:
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	cmpq	$2, %r10
	jbe	.L161
.L40:
	movaps	%xmm1, 464(%rsp)
	cmpq	$1, %rdx
	jbe	.L33
	movaps	%xmm1, 480(%rsp)
	cmpq	$2, %rdx
	je	.L33
	movaps	%xmm1, 496(%rsp)
	cmpq	$3, %rdx
	je	.L33
	movaps	%xmm1, 512(%rsp)
	cmpq	$4, %rdx
	je	.L33
	movaps	%xmm1, 528(%rsp)
	cmpq	$5, %rdx
	je	.L33
	movaps	%xmm1, 544(%rsp)
	cmpq	$6, %rdx
	je	.L33
	movaps	%xmm1, 560(%rsp)
	cmpq	$7, %rdx
	je	.L33
	movaps	%xmm1, 576(%rsp)
	cmpq	$8, %rdx
	je	.L33
	movaps	%xmm1, 592(%rsp)
	cmpq	$9, %rdx
	je	.L33
	movaps	%xmm1, 608(%rsp)
	cmpq	$10, %rdx
	je	.L33
	movaps	%xmm1, 624(%rsp)
	cmpq	$11, %rdx
	je	.L33
	movaps	%xmm1, 640(%rsp)
	cmpq	$12, %rdx
	je	.L33
	movaps	%xmm1, 656(%rsp)
	.p2align 4,,10
	.p2align 3
.L33:
	cmpq	%rdi, %rcx
	je	.L37
	movq	%rdi, %rax
.L43:
	movl	$1, 464(%rsp,%rax,4)
	addq	$1, %rax
	cmpq	%rax, %rcx
	jle	.L37
.L41:
	movl	$1, 464(%rsp,%rax,4)
	addq	$1, %rax
	cmpq	%rcx, %rax
	jge	.L37
	movl	$1, 464(%rsp,%rax,4)
.L37:
	addq	$16, %rbp
	cmpq	%r12, %rsi
	jne	.L34
.L21:
	cmpl	$1, %r9d
	movl	$1, %eax
	cmove	%eax, %r8d
.L35:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	movq	41096(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L162
	addq	$41104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L158:
	.cfi_restore_state
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	jmp	.L40
.L160:
	xorl	%eax, %eax
	testl	%r8d, %r8d
	cmovg	%eax, %r8d
	jmp	.L37
.L27:
	movl	464(%rsp), %eax
	movl	$1, %ebx
	cmpq	$1, %rcx
	jne	.L44
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	xorl	%eax, %eax
	jmp	.L43
.L161:
	movl	$1, 464(%rsp)
	movl	$1, %eax
	jmp	.L41
.L12:
	leaq	688(%rsp), %rbp
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	leaq	upcmpllp(%rip), %rcx
	movl	$16, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movslq	12(%rsp), %rcx
	movl	$55, %r8d
	movq	%rcx, %r9
	testq	%rcx, %rcx
	jg	.L38
	jmp	.L35
.L49:
	movl	$55, %r8d
	jmp	.L21
.L48:
	xorl	%edx, %edx
	jmp	.L18
.L162:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.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	upcmpllp
	.type	upcmpllp, @function
upcmpllp:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	je	.L2
.L7:
	setg	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	movl	4(%rsi), %edx
	xorl	%eax, %eax
	cmpl	%edx, 4(%rdi)
	jne	.L7
	ret
	.cfi_endproc
.LFE51:
	.size	upcmpllp, .-upcmpllp
	.p2align 4
	.globl	sort_up
	.type	sort_up, @function
sort_up:
.LFB52:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upcmpllp(%rip), %rcx
	movl	$16, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE52:
	.size	sort_up, .-sort_up
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-40960(%rsp), %r11
	.cfi_def_cfa 11, 41008
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$144, %rsp
	.cfi_def_cfa_offset 41152
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 41096(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	leaq	16(%rsp), %r13
	xorl	%ebx, %ebx
	leaq	240(%rsp), %r12
	movq	%r13, %r14
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	leaq	(%r12,%rbx,4), %rdx
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rdi
	addq	$1, %rbx
	addq	$4, %r14
	movq	%rdi, %r10
	cmpq	%rbx, %rdi
	jg	.L13
	testl	%edi, %edi
	jle	.L12
	movq	%r13, %r9
	movq	%r12, %r8
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	leaq	688(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L15:
	cmpl	%eax, %esi
	je	.L14
	movl	0(%r13,%rax,4), %edx
	subl	(%r9), %edx
	movd	%esi, %xmm1
	movd	%eax, %xmm4
	movd	%edx, %xmm0
	movl	(%r12,%rax,4), %edx
	subl	(%r8), %edx
	movslq	%ebx, %rcx
	movd	%edx, %xmm3
	punpckldq	%xmm4, %xmm1
	salq	$4, %rcx
	addl	$1, %ebx
	punpckldq	%xmm3, %xmm0
	punpcklqdq	%xmm1, %xmm0
	movaps	%xmm0, 0(%rbp,%rcx)
.L14:
	addq	$1, %rax
	cmpq	%rdi, %rax
	jne	.L15
	addl	$1, %esi
	addq	$4, %r9
	addq	$4, %r8
	cmpl	%esi, %r10d
	jne	.L16
	movslq	%ebx, %r12
	leaq	upcmpllp(%rip), %rcx
	movl	$16, %edx
	movq	%rbp, %rdi
	movq	%r12, %rsi
	call	qsort@PLT
	movslq	12(%rsp), %rcx
	movq	%rcx, %r9
	testq	%rcx, %rcx
	jle	.L17
.L38:
	testq	%rcx, %rcx
	movl	$1, %eax
	cmovg	%rcx, %rax
	cmpq	$3, %rcx
	jle	.L48
	movdqa	.LC2(%rip), %xmm0
	movq	%rax, %rdx
	shrq	$2, %rdx
	movaps	%xmm0, 464(%rsp)
	cmpq	$1, %rdx
	je	.L19
	movaps	%xmm0, 480(%rsp)
	cmpq	$2, %rdx
	je	.L19
	movaps	%xmm0, 496(%rsp)
	cmpq	$3, %rdx
	je	.L19
	movaps	%xmm0, 512(%rsp)
	cmpq	$4, %rdx
	je	.L19
	movaps	%xmm0, 528(%rsp)
	cmpq	$5, %rdx
	je	.L19
	movaps	%xmm0, 544(%rsp)
	cmpq	$6, %rdx
	je	.L19
	movaps	%xmm0, 560(%rsp)
	cmpq	$7, %rdx
	je	.L19
	movaps	%xmm0, 576(%rsp)
	cmpq	$8, %rdx
	je	.L19
	movaps	%xmm0, 592(%rsp)
	cmpq	$9, %rdx
	je	.L19
	movaps	%xmm0, 608(%rsp)
	cmpq	$10, %rdx
	je	.L19
	movaps	%xmm0, 624(%rsp)
	cmpq	$11, %rdx
	je	.L19
	movaps	%xmm0, 640(%rsp)
	cmpq	$12, %rdx
	je	.L19
	movaps	%xmm0, 656(%rsp)
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%rax, %rdx
	andq	$-4, %rdx
	testb	$3, %al
	je	.L17
.L18:
	movl	$1, 464(%rsp,%rdx,4)
	leaq	1(%rdx), %rax
	cmpq	%rax, %rcx
	jle	.L17
	movl	$1, 464(%rsp,%rax,4)
	addq	$2, %rdx
	cmpq	%rdx, %rcx
	jle	.L17
	movl	$1, 464(%rsp,%rdx,4)
.L17:
	testl	%ebx, %ebx
	je	.L49
	movq	%rcx, %rdi
	movq	%rcx, %rdx
	movdqa	.LC2(%rip), %xmm1
	xorl	%esi, %esi
	andq	$-4, %rdi
	leaq	-1(%rcx), %r10
	shrq	$2, %rdx
	movl	$55, %r8d
	leaq	1(%rdi), %r11
	.p2align 4,,10
	.p2align 3
.L34:
	movslq	12(%rbp), %rax
	addq	$1, %rsi
	movl	$0, 464(%rsp,%rax,4)
	cmpq	%r12, %rsi
	jge	.L22
	movl	16(%rbp), %eax
	cmpl	%eax, 0(%rbp)
	jne	.L22
	movl	20(%rbp), %eax
	cmpl	%eax, 4(%rbp)
	jne	.L22
	addq	$16, %rbp
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L22:
	testq	%rcx, %rcx
	jle	.L160
	cmpq	$2, %r10
	jbe	.L27
	movdqa	464(%rsp), %xmm0
	cmpq	$1, %rdx
	jbe	.L28
	paddd	480(%rsp), %xmm0
	cmpq	$2, %rdx
	je	.L28
	paddd	496(%rsp), %xmm0
	cmpq	$3, %rdx
	je	.L28
	paddd	512(%rsp), %xmm0
	cmpq	$4, %rdx
	je	.L28
	paddd	528(%rsp), %xmm0
	cmpq	$5, %rdx
	je	.L28
	paddd	544(%rsp), %xmm0
	cmpq	$6, %rdx
	je	.L28
	paddd	560(%rsp), %xmm0
	cmpq	$7, %rdx
	je	.L28
	paddd	576(%rsp), %xmm0
	cmpq	$8, %rdx
	je	.L28
	paddd	592(%rsp), %xmm0
	cmpq	$9, %rdx
	je	.L28
	paddd	608(%rsp), %xmm0
	cmpq	$10, %rdx
	je	.L28
	paddd	624(%rsp), %xmm0
	cmpq	$11, %rdx
	je	.L28
	paddd	640(%rsp), %xmm0
	cmpq	$12, %rdx
	je	.L28
	paddd	656(%rsp), %xmm0
	.p2align 4,,10
	.p2align 3
.L28:
	movdqa	%xmm0, %xmm2
	psrldq	$8, %xmm2
	paddd	%xmm2, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	paddd	%xmm2, %xmm0
	movd	%xmm0, %eax
	cmpq	%rdi, %rcx
	je	.L158
	addl	464(%rsp,%rdi,4), %eax
	movq	%r11, %rbx
	cmpq	%r11, %rcx
	jle	.L158
.L44:
	addl	464(%rsp,%rbx,4), %eax
	addq	$1, %rbx
	cmpq	%rbx, %rcx
	jle	.L31
	addl	464(%rsp,%rbx,4), %eax
.L31:
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	cmpq	$2, %r10
	jbe	.L161
.L40:
	movaps	%xmm1, 464(%rsp)
	cmpq	$1, %rdx
	jbe	.L33
	movaps	%xmm1, 480(%rsp)
	cmpq	$2, %rdx
	je	.L33
	movaps	%xmm1, 496(%rsp)
	cmpq	$3, %rdx
	je	.L33
	movaps	%xmm1, 512(%rsp)
	cmpq	$4, %rdx
	je	.L33
	movaps	%xmm1, 528(%rsp)
	cmpq	$5, %rdx
	je	.L33
	movaps	%xmm1, 544(%rsp)
	cmpq	$6, %rdx
	je	.L33
	movaps	%xmm1, 560(%rsp)
	cmpq	$7, %rdx
	je	.L33
	movaps	%xmm1, 576(%rsp)
	cmpq	$8, %rdx
	je	.L33
	movaps	%xmm1, 592(%rsp)
	cmpq	$9, %rdx
	je	.L33
	movaps	%xmm1, 608(%rsp)
	cmpq	$10, %rdx
	je	.L33
	movaps	%xmm1, 624(%rsp)
	cmpq	$11, %rdx
	je	.L33
	movaps	%xmm1, 640(%rsp)
	cmpq	$12, %rdx
	je	.L33
	movaps	%xmm1, 656(%rsp)
	.p2align 4,,10
	.p2align 3
.L33:
	cmpq	%rdi, %rcx
	je	.L37
	movq	%rdi, %rax
.L43:
	movl	$1, 464(%rsp,%rax,4)
	addq	$1, %rax
	cmpq	%rax, %rcx
	jle	.L37
.L41:
	movl	$1, 464(%rsp,%rax,4)
	addq	$1, %rax
	cmpq	%rcx, %rax
	jge	.L37
	movl	$1, 464(%rsp,%rax,4)
.L37:
	addq	$16, %rbp
	cmpq	%r12, %rsi
	jne	.L34
.L21:
	cmpl	$1, %r9d
	movl	$1, %eax
	cmove	%eax, %r8d
.L35:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	movq	41096(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L162
	addq	$41104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L158:
	.cfi_restore_state
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	jmp	.L40
.L160:
	xorl	%eax, %eax
	testl	%r8d, %r8d
	cmovg	%eax, %r8d
	jmp	.L37
.L27:
	movl	464(%rsp), %eax
	movl	$1, %ebx
	cmpq	$1, %rcx
	jne	.L44
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	xorl	%eax, %eax
	jmp	.L43
.L161:
	movl	$1, 464(%rsp)
	movl	$1, %eax
	jmp	.L41
.L12:
	leaq	688(%rsp), %rbp
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	leaq	upcmpllp(%rip), %rcx
	movl	$16, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movslq	12(%rsp), %rcx
	movl	$55, %r8d
	movq	%rcx, %r9
	testq	%rcx, %rcx
	jg	.L38
	jmp	.L35
.L49:
	movl	$55, %r8d
	jmp	.L21
.L48:
	xorl	%edx, %edx
	jmp	.L18
.L162:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.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>
#include <string.h>
#include <math.h>
#include <stdbool.h>
typedef long long ll;
#define rep(i,n) for(ll i=0; i<(ll)(n); i++)
#define max(l,r) ((l)>(r)?l:r)
#define min(l,r) ((l)<(r)?l:r)
typedef struct{int first, second, pi, pj;} P;
int upcmpllp(const void *a, const void *b){
    if(((P*)a)->first != ((P*)b)->first) 
        return (((P*)a)->first > ((P*)b)->first?1:-1);
    else
        return (((P*)a)->second == ((P*)b)->second ? 0 : (((P*)a)->second > ((P*)b)->second ? 1 : -1));
}
void sort_up(P *a, int n){ qsort(a, n, sizeof(P), upcmpllp); }

int main(){
    int n;
    scanf("%d", &n);
    int x[55], y[55];
    P diff[2525];
    rep(i, n) scanf("%d%d", &x[i], &y[i]);

    int ans = 55;
    int idx = 0;
    for(int i = 0; i < n; i++){
        for (int j = 0; j < n; j++){
            if(i == j) continue;
            diff[idx].first = x[j] - x[i];
            diff[idx].second = y[j] - y[i];
            diff[idx].pi = i;
            diff[idx].pj = j;
            idx++;
        }
    }
    sort_up(diff, idx);
    int ch[55];
    rep(i, n) ch[i] = 1;
    rep(i, idx){
        ch[diff[i].pj] = 0;
        if(i+1 < idx 
           && diff[i].first == diff[i+1].first
           && diff[i].second == diff[i+1].second){
        }else{
            int tmp = 0;
            rep(j, n) tmp += ch[j];
            ans = min(ans, tmp);
            rep(j, n) ch[j] = 1;
        }
    }
    if(n == 1) ans = 1;
    printf("%d\n", ans);
}
3
1 4
4 6
11 8
 2
1 2
2 2
 4
1 1
1 4
2 1
2 2
 3
1 4
4 6
11 3
 3
0 4
4 6
11 3
 3
-1 4
4 6
11 3
 3
-2 4
4 6
11 3
 3
-2 4
5 6
11 3
 3
-2 4
5 6
11 4
 3
-1 4
5 6
11 4

2
 1
 3
 2
 2
 2
 2
 2
 2
 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>
#include <string.h>
#include <math.h>
#include <stdbool.h>
typedef long long ll;
#define rep(i,n) for(ll i=0; i<(ll)(n); i++)
#define max(l,r) ((l)>(r)?l:r)
#define min(l,r) ((l)<(r)?l:r)
typedef struct{int first, second, pi, pj;} P;
int upcmpllp(const void *a, const void *b){
    if(((P*)a)->first != ((P*)b)->first) 
        return (((P*)a)->first > ((P*)b)->first?1:-1);
    else
        return (((P*)a)->second == ((P*)b)->second ? 0 : (((P*)a)->second > ((P*)b)->second ? 1 : -1));
}
void sort_up(P *a, int n){ qsort(a, n, sizeof(P), upcmpllp); }

int main(){
    int n;
    scanf("%d", &n);
    int x[55], y[55];
    P diff[2525];
    rep(i, n) scanf("%d%d", &x[i], &y[i]);

    int ans = 55;
    int idx = 0;
    for(int i = 0; i < n; i++){
        for (int j = 0; j < n; j++){
            if(i == j) continue;
            diff[idx].first = x[j] - x[i];
            diff[idx].second = y[j] - y[i];
            diff[idx].pi = i;
            diff[idx].pj = j;
            idx++;
        }
    }
    sort_up(diff, idx);
    int ch[55];
    rep(i, n) ch[i] = 1;
    rep(i, idx){
        ch[diff[i].pj] = 0;
        if(i+1 < idx 
           && diff[i].first == diff[i+1].first
           && diff[i].second == diff[i+1].second){
        }else{
            int tmp = 0;
            rep(j, n) tmp += ch[j];
            ans = min(ans, tmp);
            rep(j, n) ch[j] = 1;
        }
    }
    if(n == 1) ans = 1;
    printf("%d\n", ans);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	upcmpllp
	.type	upcmpllp, @function
upcmpllp:
.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), %eax
	cmpl	%eax, %edx
	je	.L2
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L3
	movl	$1, %eax
	jmp	.L5
.L3:
	movl	$-1, %eax
	jmp	.L5
.L2:
	movq	-8(%rbp), %rax
	movl	4(%rax), %edx
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	je	.L6
	movq	-8(%rbp), %rax
	movl	4(%rax), %edx
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jle	.L7
	movl	$1, %eax
	jmp	.L5
.L7:
	movl	$-1, %eax
	jmp	.L5
.L6:
	movl	$0, %eax
.L5:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upcmpllp, .-upcmpllp
	.globl	sort_up
	.type	sort_up, @function
sort_up:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upcmpllp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sort_up, .-sort_up
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-40960(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$192, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-41152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -41128(%rbp)
	jmp	.L12
.L13:
	leaq	-40864(%rbp), %rdx
	movq	-41128(%rbp), %rax
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-41088(%rbp), %rcx
	movq	-41128(%rbp), %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -41128(%rbp)
.L12:
	movl	-41152(%rbp), %eax
	cltq
	cmpq	%rax, -41128(%rbp)
	jl	.L13
	movl	$55, -41148(%rbp)
	movl	$0, -41144(%rbp)
	movl	$0, -41140(%rbp)
	jmp	.L14
.L19:
	movl	$0, -41136(%rbp)
	jmp	.L15
.L18:
	movl	-41140(%rbp), %eax
	cmpl	-41136(%rbp), %eax
	je	.L33
	movl	-41136(%rbp), %eax
	cltq
	movl	-41088(%rbp,%rax,4), %edx
	movl	-41140(%rbp), %eax
	cltq
	movl	-41088(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-41144(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40416, %rax
	movl	%edx, (%rax)
	movl	-41136(%rbp), %eax
	cltq
	movl	-40864(%rbp,%rax,4), %edx
	movl	-41140(%rbp), %eax
	cltq
	movl	-40864(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-41144(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40412, %rax
	movl	%edx, (%rax)
	movl	-41144(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rbp, %rax
	leaq	-40408(%rax), %rdx
	movl	-41140(%rbp), %eax
	movl	%eax, (%rdx)
	movl	-41144(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rbp, %rax
	leaq	-40404(%rax), %rdx
	movl	-41136(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -41144(%rbp)
	jmp	.L17
.L33:
	nop
.L17:
	addl	$1, -41136(%rbp)
.L15:
	movl	-41152(%rbp), %eax
	cmpl	%eax, -41136(%rbp)
	jl	.L18
	addl	$1, -41140(%rbp)
.L14:
	movl	-41152(%rbp), %eax
	cmpl	%eax, -41140(%rbp)
	jl	.L19
	movl	-41144(%rbp), %edx
	leaq	-40416(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	sort_up
	movq	$0, -41120(%rbp)
	jmp	.L20
.L21:
	movq	-41120(%rbp), %rax
	movl	$1, -40640(%rbp,%rax,4)
	addq	$1, -41120(%rbp)
.L20:
	movl	-41152(%rbp), %eax
	cltq
	cmpq	%rax, -41120(%rbp)
	jl	.L21
	movq	$0, -41112(%rbp)
	jmp	.L22
.L29:
	movq	-41112(%rbp), %rax
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40404, %rax
	movl	(%rax), %eax
	cltq
	movl	$0, -40640(%rbp,%rax,4)
	movq	-41112(%rbp), %rax
	leaq	1(%rax), %rdx
	movl	-41144(%rbp), %eax
	cltq
	cmpq	%rax, %rdx
	jge	.L23
	movq	-41112(%rbp), %rax
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40416, %rax
	movl	(%rax), %edx
	movq	-41112(%rbp), %rax
	addq	$1, %rax
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40416, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jne	.L23
	movq	-41112(%rbp), %rax
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40412, %rax
	movl	(%rax), %edx
	movq	-41112(%rbp), %rax
	addq	$1, %rax
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40412, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	je	.L24
.L23:
	movl	$0, -41132(%rbp)
	movq	$0, -41104(%rbp)
	jmp	.L25
.L26:
	movq	-41104(%rbp), %rax
	movl	-40640(%rbp,%rax,4), %eax
	addl	%eax, -41132(%rbp)
	addq	$1, -41104(%rbp)
.L25:
	movl	-41152(%rbp), %eax
	cltq
	cmpq	%rax, -41104(%rbp)
	jl	.L26
	movl	-41148(%rbp), %edx
	movl	-41132(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -41148(%rbp)
	movq	$0, -41096(%rbp)
	jmp	.L27
.L28:
	movq	-41096(%rbp), %rax
	movl	$1, -40640(%rbp,%rax,4)
	addq	$1, -41096(%rbp)
.L27:
	movl	-41152(%rbp), %eax
	cltq
	cmpq	%rax, -41096(%rbp)
	jl	.L28
.L24:
	addq	$1, -41112(%rbp)
.L22:
	movl	-41144(%rbp), %eax
	cltq
	cmpq	%rax, -41112(%rbp)
	jl	.L29
	movl	-41152(%rbp), %eax
	cmpl	$1, %eax
	jne	.L30
	movl	$1, -41148(%rbp)
.L30:
	movl	-41148(%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	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	upcmpllp
	.type	upcmpllp, @function
upcmpllp:
.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), %eax
	cmpl	%eax, %edx
	je	.L2
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L3
	movl	$1, %eax
	jmp	.L5
.L3:
	movl	$-1, %eax
	jmp	.L5
.L2:
	movq	-8(%rbp), %rax
	movl	4(%rax), %edx
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	je	.L6
	movq	-8(%rbp), %rax
	movl	4(%rax), %edx
	movq	-16(%rbp), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jle	.L7
	movl	$1, %eax
	jmp	.L5
.L7:
	movl	$-1, %eax
	jmp	.L5
.L6:
	movl	$0, %eax
.L5:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upcmpllp, .-upcmpllp
	.globl	sort_up
	.type	sort_up, @function
sort_up:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upcmpllp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sort_up, .-sort_up
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-40960(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$192, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-41152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -41128(%rbp)
	jmp	.L12
.L13:
	leaq	-40864(%rbp), %rdx
	movq	-41128(%rbp), %rax
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-41088(%rbp), %rcx
	movq	-41128(%rbp), %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -41128(%rbp)
.L12:
	movl	-41152(%rbp), %eax
	cltq
	cmpq	%rax, -41128(%rbp)
	jl	.L13
	movl	$55, -41148(%rbp)
	movl	$0, -41144(%rbp)
	movl	$0, -41140(%rbp)
	jmp	.L14
.L19:
	movl	$0, -41136(%rbp)
	jmp	.L15
.L18:
	movl	-41140(%rbp), %eax
	cmpl	-41136(%rbp), %eax
	je	.L33
	movl	-41136(%rbp), %eax
	cltq
	movl	-41088(%rbp,%rax,4), %edx
	movl	-41140(%rbp), %eax
	cltq
	movl	-41088(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-41144(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40416, %rax
	movl	%edx, (%rax)
	movl	-41136(%rbp), %eax
	cltq
	movl	-40864(%rbp,%rax,4), %edx
	movl	-41140(%rbp), %eax
	cltq
	movl	-40864(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-41144(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40412, %rax
	movl	%edx, (%rax)
	movl	-41144(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rbp, %rax
	leaq	-40408(%rax), %rdx
	movl	-41140(%rbp), %eax
	movl	%eax, (%rdx)
	movl	-41144(%rbp), %eax
	cltq
	salq	$4, %rax
	addq	%rbp, %rax
	leaq	-40404(%rax), %rdx
	movl	-41136(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -41144(%rbp)
	jmp	.L17
.L33:
	nop
.L17:
	addl	$1, -41136(%rbp)
.L15:
	movl	-41152(%rbp), %eax
	cmpl	%eax, -41136(%rbp)
	jl	.L18
	addl	$1, -41140(%rbp)
.L14:
	movl	-41152(%rbp), %eax
	cmpl	%eax, -41140(%rbp)
	jl	.L19
	movl	-41144(%rbp), %edx
	leaq	-40416(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	sort_up
	movq	$0, -41120(%rbp)
	jmp	.L20
.L21:
	movq	-41120(%rbp), %rax
	movl	$1, -40640(%rbp,%rax,4)
	addq	$1, -41120(%rbp)
.L20:
	movl	-41152(%rbp), %eax
	cltq
	cmpq	%rax, -41120(%rbp)
	jl	.L21
	movq	$0, -41112(%rbp)
	jmp	.L22
.L29:
	movq	-41112(%rbp), %rax
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40404, %rax
	movl	(%rax), %eax
	cltq
	movl	$0, -40640(%rbp,%rax,4)
	movq	-41112(%rbp), %rax
	leaq	1(%rax), %rdx
	movl	-41144(%rbp), %eax
	cltq
	cmpq	%rax, %rdx
	jge	.L23
	movq	-41112(%rbp), %rax
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40416, %rax
	movl	(%rax), %edx
	movq	-41112(%rbp), %rax
	addq	$1, %rax
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40416, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jne	.L23
	movq	-41112(%rbp), %rax
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40412, %rax
	movl	(%rax), %edx
	movq	-41112(%rbp), %rax
	addq	$1, %rax
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$40412, %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	je	.L24
.L23:
	movl	$0, -41132(%rbp)
	movq	$0, -41104(%rbp)
	jmp	.L25
.L26:
	movq	-41104(%rbp), %rax
	movl	-40640(%rbp,%rax,4), %eax
	addl	%eax, -41132(%rbp)
	addq	$1, -41104(%rbp)
.L25:
	movl	-41152(%rbp), %eax
	cltq
	cmpq	%rax, -41104(%rbp)
	jl	.L26
	movl	-41148(%rbp), %edx
	movl	-41132(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -41148(%rbp)
	movq	$0, -41096(%rbp)
	jmp	.L27
.L28:
	movq	-41096(%rbp), %rax
	movl	$1, -40640(%rbp,%rax,4)
	addq	$1, -41096(%rbp)
.L27:
	movl	-41152(%rbp), %eax
	cltq
	cmpq	%rax, -41096(%rbp)
	jl	.L28
.L24:
	addq	$1, -41112(%rbp)
.L22:
	movl	-41144(%rbp), %eax
	cltq
	cmpq	%rax, -41112(%rbp)
	jl	.L29
	movl	-41152(%rbp), %eax
	cmpl	$1, %eax
	jne	.L30
	movl	$1, -41148(%rbp)
.L30:
	movl	-41148(%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	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
