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

int UF[100000];

int func(int c){
    if(c != UF[c]){
        UF[c] = func(UF[c]);
    }
    return UF[c];
}

void u(int a, int b){
    UF[func(a)] = UF[func(b)];
}

int cmp_0(const void *a, const void *b){
    return (*(int(*)[3])a)[0] - (*(int(*)[3])b)[0];
}

int cmp_1(const void *a, const void *b){
    return (*(int(*)[3])a)[1] - (*(int(*)[3])b)[1];
}

int main(void){

    int N;
    int cities[100000][3], roads[200000][3];

    scanf("%d", &N);

    int x[N], y[N];

    for(int i = 0; i < N; i++){
        scanf("%d%d", &x[i], &y[i]);
        cities[i][0] = x[i];
        cities[i][1] = y[i];
        cities[i][2] = i;
    }

    qsort(cities, N, sizeof(int[3]), cmp_0);

    for(int i = 0; i < N-1; i++){
        roads[i][0] = cities[i+1][0]-cities[i][0];
        roads[i][1] = cities[i][2];
        roads[i][2] = cities[i+1][2];
    }

    qsort(cities, N, sizeof(int[3]), cmp_1);

    for(int i = 0; i < N-1; i++){
        roads[i+N-1][0] = cities[i+1][1] - cities[i][1];
        roads[i+N-1][1] = cities[i][2];
        roads[i+N-1][2] = cities[i+1][2];
    }

    qsort(roads, 2*N-2, sizeof(int[3]), cmp_0);

    for(int i = 0; i < 100000; i++){
        UF[i] = i;
    }

    int cost = 0;
    int X, Y;

    for(int i = 0; i < 2 * N - 2; i++){
        X = roads[i][1];
        Y = roads[i][2];
        if(func(X) != func(Y)){
            u(X, Y);
            cost += roads[i][0];
        }
    }

    printf("%d\n", cost);

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	UF
	.bss
	.align 32
	.type	UF, @object
	.size	UF, 400000
UF:
	.zero	400000
	.text
	.globl	func
	.type	func, @function
func:
.LFB6:
	.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
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	UF(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	je	.L2
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	UF(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	func
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	UF(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L2:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	UF(%rip), %rax
	movl	(%rdx,%rax), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	func, .-func
	.globl	u
	.type	u, @function
u:
.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	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	func
	movl	%eax, %ebx
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	func
	movl	%eax, %edx
	movslq	%ebx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	UF(%rip), %rax
	movl	(%rcx,%rax), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	UF(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	nop
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	u, .-u
	.globl	cmp_0
	.type	cmp_0, @function
cmp_0:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	cmp_0, .-cmp_0
	.globl	cmp_1
	.type	cmp_1, @function
cmp_1:
.LFB9:
	.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	4(%rax), %edx
	movq	-16(%rbp), %rax
	movl	4(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	cmp_1, .-cmp_1
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	leaq	-3596288(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3856, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %r12
	leaq	-3600116(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-3600116(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -3600080(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -3600144(%rbp)
	movq	$0, -3600136(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -3600160(%rbp)
	movq	$0, -3600152(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L10:
	cmpq	%rdx, %rsp
	je	.L11
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L10
.L11:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L12
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L12:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -3600072(%rbp)
	movl	-3600116(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -3600064(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -3600176(%rbp)
	movq	$0, -3600168(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L13:
	cmpq	%rdx, %rsp
	je	.L14
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L13
.L14:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L15
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L15:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -3600056(%rbp)
	movl	$0, -3600112(%rbp)
	jmp	.L16
.L17:
	movl	-3600112(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-3600056(%rbp), %rax
	addq	%rax, %rdx
	movl	-3600112(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-3600072(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-3600072(%rbp), %rax
	movl	-3600112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-3600112(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600016, %rax
	movl	%edx, (%rax)
	movq	-3600056(%rbp), %rax
	movl	-3600112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-3600112(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600012, %rax
	movl	%edx, (%rax)
	movl	-3600112(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	leaq	-3600008(%rax), %rdx
	movl	-3600112(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -3600112(%rbp)
.L16:
	movl	-3600116(%rbp), %eax
	cmpl	%eax, -3600112(%rbp)
	jl	.L17
	movl	-3600116(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-3600048(%rbp), %rax
	leaq	cmp_0(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -3600108(%rbp)
	jmp	.L18
.L19:
	movl	-3600108(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600016, %rax
	movl	(%rax), %ecx
	movl	-3600108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600016, %rax
	movl	(%rax), %eax
	subl	%eax, %ecx
	movl	-3600108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400016, %rax
	movl	%ecx, (%rax)
	movl	-3600108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600008, %rax
	movl	(%rax), %edx
	movl	-3600108(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400012, %rax
	movl	%edx, (%rax)
	movl	-3600108(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600008, %rax
	movl	(%rax), %edx
	movl	-3600108(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400008, %rax
	movl	%edx, (%rax)
	addl	$1, -3600108(%rbp)
.L18:
	movl	-3600116(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -3600108(%rbp)
	jl	.L19
	movl	-3600116(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-3600048(%rbp), %rax
	leaq	cmp_1(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -3600104(%rbp)
	jmp	.L20
.L21:
	movl	-3600104(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600012, %rax
	movl	(%rax), %ecx
	movl	-3600104(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600012, %rax
	movl	(%rax), %edx
	movl	-3600116(%rbp), %esi
	movl	-3600104(%rbp), %eax
	addl	%esi, %eax
	subl	$1, %eax
	subl	%edx, %ecx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400016, %rax
	movl	%ecx, (%rax)
	movl	-3600116(%rbp), %edx
	movl	-3600104(%rbp), %eax
	addl	%edx, %eax
	leal	-1(%rax), %ecx
	movl	-3600104(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600008, %rax
	movl	(%rax), %edx
	movslq	%ecx, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400012, %rax
	movl	%edx, (%rax)
	movl	-3600104(%rbp), %eax
	addl	$1, %eax
	movl	-3600116(%rbp), %ecx
	movl	-3600104(%rbp), %edx
	addl	%ecx, %edx
	leal	-1(%rdx), %ecx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600008, %rax
	movl	(%rax), %edx
	movslq	%ecx, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400008, %rax
	movl	%edx, (%rax)
	addl	$1, -3600104(%rbp)
.L20:
	movl	-3600116(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -3600104(%rbp)
	jl	.L21
	movl	-3600116(%rbp), %eax
	subl	$1, %eax
	addl	%eax, %eax
	movslq	%eax, %rsi
	leaq	-2400048(%rbp), %rax
	leaq	cmp_0(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -3600100(%rbp)
	jmp	.L22
.L23:
	movl	-3600100(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	UF(%rip), %rdx
	movl	-3600100(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -3600100(%rbp)
.L22:
	cmpl	$99999, -3600100(%rbp)
	jle	.L23
	movl	$0, -3600096(%rbp)
	movl	$0, -3600092(%rbp)
	jmp	.L24
.L26:
	movl	-3600092(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400012, %rax
	movl	(%rax), %eax
	movl	%eax, -3600088(%rbp)
	movl	-3600092(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400008, %rax
	movl	(%rax), %eax
	movl	%eax, -3600084(%rbp)
	movl	-3600088(%rbp), %eax
	movl	%eax, %edi
	call	func
	movl	%eax, %ebx
	movl	-3600084(%rbp), %eax
	movl	%eax, %edi
	call	func
	cmpl	%eax, %ebx
	je	.L25
	movl	-3600084(%rbp), %edx
	movl	-3600088(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	u
	movl	-3600092(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400016, %rax
	movl	(%rax), %eax
	addl	%eax, -3600096(%rbp)
.L25:
	addl	$1, -3600092(%rbp)
.L24:
	movl	-3600116(%rbp), %eax
	subl	$1, %eax
	addl	%eax, %eax
	cmpl	%eax, -3600092(%rbp)
	jl	.L26
	movl	-3600096(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%r12, %rsp
	movq	-40(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp_0
	.type	cmp_0, @function
cmp_0:
.LFB53:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE53:
	.size	cmp_0, .-cmp_0
	.p2align 4
	.globl	cmp_1
	.type	cmp_1, @function
cmp_1:
.LFB54:
	.cfi_startproc
	endbr64
	movl	4(%rdi), %eax
	subl	4(%rsi), %eax
	ret
	.cfi_endproc
.LFE54:
	.size	cmp_1, .-cmp_1
	.p2align 4
	.globl	func
	.type	func, @function
func:
.LFB51:
	.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
	movslq	%edi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	UF(%rip), %rbx
	movq	%rbp, %rax
	movl	(%rbx,%rbp,4), %edx
	cmpl	%ebp, %edx
	jne	.L11
	popq	%rbx
	.cfi_remember_state
	.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
.L11:
	.cfi_restore_state
	movslq	%edx, %r12
	movl	(%rbx,%r12,4), %eax
	cmpl	%eax, %edx
	je	.L6
	movslq	%eax, %r13
	movl	(%rbx,%r13,4), %edx
	cmpl	%edx, %eax
	jne	.L12
.L7:
	movl	%edx, (%rbx,%r12,4)
	movl	%edx, %eax
.L6:
	movl	%eax, (%rbx,%rbp,4)
	popq	%rbx
	.cfi_remember_state
	.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
.L12:
	.cfi_restore_state
	movslq	%edx, %r14
	movl	(%rbx,%r14,4), %edi
	cmpl	%edi, %edx
	je	.L8
	call	func
	movl	%eax, (%rbx,%r14,4)
	movl	%eax, %edi
.L8:
	movl	%edi, (%rbx,%r13,4)
	movl	%edi, %edx
	jmp	.L7
	.cfi_endproc
.LFE51:
	.size	func, .-func
	.p2align 4
	.globl	u
	.type	u, @function
u:
.LFB52:
	.cfi_startproc
	endbr64
	leaq	UF(%rip), %rcx
	movslq	%esi, %r10
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%edi, %r9d
	movslq	(%rcx,%r10,4), %r8
	cmpl	%r8d, %esi
	jne	.L23
	movslq	%r9d, %rsi
	movslq	(%rcx,%rsi,4), %rax
	cmpl	%eax, %r9d
	jne	.L24
.L18:
	movl	(%rcx,%r8,4), %edx
	movl	%edx, (%rcx,%rax,4)
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	movslq	%r8d, %rsi
	movl	(%rcx,%rsi,4), %eax
	cmpl	%eax, %r8d
	je	.L15
	movslq	%eax, %r8
	movl	(%rcx,%r8,4), %edx
	cmpl	%edx, %eax
	jne	.L25
.L16:
	movl	%edx, (%rcx,%rsi,4)
	movl	%edx, %eax
.L15:
	movslq	%r9d, %rsi
	movl	%eax, (%rcx,%r10,4)
	movslq	%eax, %r8
	movslq	(%rcx,%rsi,4), %rax
	cmpl	%eax, %r9d
	je	.L18
.L24:
	movslq	%eax, %r10
	movl	(%rcx,%r10,4), %edx
	cmpl	%edx, %eax
	je	.L19
	movslq	%edx, %r11
	movl	(%rcx,%r11,4), %r9d
	cmpl	%r9d, %edx
	jne	.L26
.L20:
	movl	%r9d, (%rcx,%r10,4)
	movl	%r9d, %edx
.L19:
	movl	%edx, (%rcx,%rsi,4)
	movslq	%edx, %rax
	movl	(%rcx,%r8,4), %edx
	movl	%edx, (%rcx,%rax,4)
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	movslq	%r9d, %rbx
	movl	(%rcx,%rbx,4), %edi
	cmpl	%edi, %r9d
	je	.L21
	call	func
	movl	%eax, (%rcx,%rbx,4)
	movl	%eax, %edi
.L21:
	movl	%edi, (%rcx,%r11,4)
	movl	%edi, %r9d
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L25:
	movslq	%edx, %r11
	movl	(%rcx,%r11,4), %edi
	cmpl	%edi, %edx
	je	.L17
	call	func
	movl	%eax, (%rcx,%r11,4)
	movl	%eax, %edi
.L17:
	movl	%edi, (%rcx,%r8,4)
	movl	%edi, %edx
	jmp	.L16
	.cfi_endproc
.LFE52:
	.size	u, .-u
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d"
.LC4:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	leaq	-3596288(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3768, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	leaq	-3600068(%rbp), %rsi
	call	__isoc99_scanf@PLT
	movslq	-3600068(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,4), %rdx
	movq	%rsi, %rax
	movq	%rdx, %r8
	movq	%rdx, %rcx
	andq	$-4096, %r8
	andq	$-16, %rcx
	subq	%r8, %rdi
	cmpq	%rdi, %rsp
	je	.L29
.L91:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L91
.L29:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L92
.L30:
	movq	%rdx, %rcx
	movq	%rsp, %rdi
	andq	$-4096, %rdx
	movq	%rsp, %r12
	andq	$-16, %rcx
	subq	%rdx, %rdi
.L31:
	cmpq	%rdi, %rsp
	je	.L32
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L31
.L92:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L30
.L32:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L93
.L33:
	testl	%eax, %eax
	leaq	-3600064(%rbp), %rax
	movq	%rsp, %r13
	movq	%rax, -3600088(%rbp)
	jle	.L34
	movq	%rax, %rbx
	xorl	%r14d, %r14d
	leaq	.LC2(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L35:
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$4, %r12
	addq	$4, %r13
	addq	$12, %rbx
	movd	-4(%r12), %xmm0
	movd	-4(%r13), %xmm4
	movl	%r14d, -4(%rbx)
	addl	$1, %r14d
	punpckldq	%xmm4, %xmm0
	movq	%xmm0, -12(%rbx)
	movl	-3600068(%rbp), %eax
	cmpl	%r14d, %eax
	jg	.L35
	movslq	%eax, %rsi
.L34:
	movq	-3600088(%rbp), %rdi
	leaq	cmp_0(%rip), %r13
	movl	$12, %edx
	movq	%r13, %rcx
	call	qsort@PLT
	movl	-3600068(%rbp), %r8d
	leal	-1(%r8), %edi
	testl	%edi, %edi
	jle	.L94
	cmpl	$3, %r8d
	jle	.L70
	leal	-4(%r8), %esi
	leaq	-2400064(%rbp), %r12
	xorl	%ecx, %ecx
	movd	-3600056(%rbp), %xmm2
	andl	$-2, %esi
	movl	-3600064(%rbp), %r9d
	leaq	-3600052(%rbp), %rax
	movq	%r12, %rdx
	addl	$2, %esi
.L40:
	movl	(%rax), %r10d
	movd	8(%rax), %xmm1
	addl	$2, %ecx
	addq	$24, %rax
	addq	$24, %rdx
	movl	%r10d, %ebx
	movdqa	%xmm1, %xmm3
	subl	%r9d, %ebx
	movl	-12(%rax), %r9d
	movd	%ebx, %xmm0
	movl	%r9d, %r11d
	punpckldq	%xmm2, %xmm0
	subl	%r10d, %r11d
	movd	%r11d, %xmm7
	punpckldq	%xmm7, %xmm3
	punpcklqdq	%xmm3, %xmm0
	movups	%xmm0, -24(%rdx)
	movd	-4(%rax), %xmm2
	punpckldq	%xmm2, %xmm1
	movq	%xmm1, -8(%rdx)
	cmpl	%esi, %ecx
	jne	.L40
.L39:
	movslq	%esi, %rcx
	movq	-3600088(%rbp), %rax
	imulq	$12, %rcx, %rcx
	addq	%rcx, %rax
	addq	%r12, %rcx
	.p2align 4,,10
	.p2align 3
.L41:
	movl	12(%rax), %edx
	movd	8(%rax), %xmm5
	addl	$1, %esi
	addq	$12, %rax
	subl	-12(%rax), %edx
	addq	$12, %rcx
	movd	%edx, %xmm0
	punpckldq	%xmm5, %xmm0
	movq	%xmm0, -12(%rcx)
	movl	8(%rax), %edx
	movl	%edx, -4(%rcx)
	cmpl	%edi, %esi
	jl	.L41
.L42:
	movq	-3600088(%rbp), %rdi
	movslq	%r8d, %rsi
	movl	$12, %edx
	leaq	cmp_1(%rip), %rcx
	call	qsort@PLT
	movl	-3600068(%rbp), %eax
	leal	-1(%rax), %edi
	testl	%edi, %edi
	jle	.L38
	cmpl	$3, %eax
	jle	.L71
	movslq	%eax, %r8
	subl	$4, %eax
	movd	-3600056(%rbp), %xmm2
	movl	-3600060(%rbp), %r9d
	andl	$-2, %eax
	leaq	(%r8,%r8,2), %rcx
	leaq	-3600048(%rbp), %rdx
	leal	2(%rax), %esi
	leaq	(%r12,%rcx,4), %rcx
	xorl	%eax, %eax
.L45:
	movl	(%rdx), %r10d
	movd	4(%rdx), %xmm1
	addl	$2, %eax
	addq	$24, %rdx
	addq	$24, %rcx
	movl	%r10d, %ebx
	movdqa	%xmm1, %xmm3
	subl	%r9d, %ebx
	movl	-12(%rdx), %r9d
	movd	%ebx, %xmm0
	movl	%r9d, %r11d
	punpckldq	%xmm2, %xmm0
	subl	%r10d, %r11d
	movd	%r11d, %xmm7
	punpckldq	%xmm7, %xmm3
	punpcklqdq	%xmm3, %xmm0
	movups	%xmm0, -36(%rcx)
	movd	-8(%rdx), %xmm2
	punpckldq	%xmm2, %xmm1
	movq	%xmm1, -20(%rcx)
	cmpl	%esi, %eax
	jne	.L45
.L44:
	movslq	%esi, %rdx
	imulq	$12, %rdx, %rax
	addq	%r8, %rdx
	addq	-3600088(%rbp), %rax
	imulq	$12, %rdx, %rdx
	leaq	-12(%rdx,%r12), %rcx
	.p2align 4,,10
	.p2align 3
.L46:
	movl	16(%rax), %edx
	movd	8(%rax), %xmm6
	addl	$1, %esi
	addq	$12, %rax
	subl	-8(%rax), %edx
	addq	$12, %rcx
	movd	%edx, %xmm0
	punpckldq	%xmm6, %xmm0
	movq	%xmm0, -12(%rcx)
	movl	8(%rax), %edx
	movl	%edx, -4(%rcx)
	cmpl	%edi, %esi
	jl	.L46
.L38:
	leal	(%rdi,%rdi), %esi
	movq	%r13, %rcx
	movl	$12, %edx
	movq	%r12, %rdi
	movslq	%esi, %rsi
	call	qsort@PLT
	leaq	UF(%rip), %rcx
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC3(%rip), %xmm2
	movq	%rcx, %rax
	leaq	400000(%rcx), %rdx
	.p2align 4,,10
	.p2align 3
.L43:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L43
	cmpl	$1, -3600068(%rbp)
	jle	.L72
	movq	%r12, %r8
	xorl	%r11d, %r11d
	xorl	%r13d, %r13d
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L96:
	movslq	%r15d, %r14
	movl	(%rcx,%r14,4), %eax
	cmpl	%eax, %r15d
	je	.L54
	movslq	%eax, %r15
	movl	(%rcx,%r15,4), %edi
	cmpl	%edi, %eax
	je	.L55
	movslq	%edi, %rdx
	movl	(%rcx,%rdx,4), %eax
	cmpl	%eax, %edi
	je	.L56
	movslq	%eax, %rdi
	movq	%rdi, -3600088(%rbp)
	movl	(%rcx,%rdi,4), %edi
	cmpl	%edi, %eax
	je	.L57
	movq	%rdx, -3600096(%rbp)
	call	func
	movq	-3600088(%rbp), %rdi
	movq	-3600096(%rbp), %rdx
	movl	%eax, (%rcx,%rdi,4)
.L57:
	movq	-3600088(%rbp), %rax
	movl	(%rcx,%rax,4), %eax
	movl	%eax, (%rcx,%rdx,4)
.L56:
	movl	(%rcx,%rdx,4), %edi
	movl	%edi, (%rcx,%r15,4)
.L55:
	movl	%edi, (%rcx,%r14,4)
	movl	%edi, %eax
.L54:
	movl	%eax, (%rcx,%r12,4)
	cmpl	%eax, %esi
	je	.L58
	cmpl	%eax, %r10d
	je	.L95
	movslq	%eax, %r15
	movl	(%rcx,%r15,4), %edx
	cmpl	%eax, %edx
	je	.L61
	movslq	%edx, %rsi
	movl	(%rcx,%rsi,4), %eax
	cmpl	%eax, %edx
	je	.L62
	movslq	%eax, %r10
	movl	(%rcx,%r10,4), %edi
	cmpl	%edi, %eax
	je	.L63
	call	func
	movl	%eax, (%rcx,%r10,4)
.L63:
	movl	(%rcx,%r10,4), %eax
	movl	%eax, (%rcx,%rsi,4)
.L62:
	movl	(%rcx,%rsi,4), %eax
	movl	%eax, (%rcx,%r15,4)
.L61:
	movl	%eax, (%rcx,%r12,4)
	movl	(%rcx,%rbx,4), %esi
	movslq	%eax, %r15
.L60:
	movslq	%esi, %r12
	cmpl	%esi, %r9d
	je	.L64
	movl	(%rcx,%r12,4), %eax
	cmpl	%esi, %eax
	je	.L65
	movslq	%eax, %rsi
	movl	(%rcx,%rsi,4), %edx
	cmpl	%edx, %eax
	je	.L66
	movslq	%edx, %r9
	movl	(%rcx,%r9,4), %edi
	cmpl	%edi, %edx
	je	.L67
	call	func
	movl	%eax, (%rcx,%r9,4)
.L67:
	movl	(%rcx,%r9,4), %eax
	movl	%eax, (%rcx,%rsi,4)
.L66:
	movl	(%rcx,%rsi,4), %esi
	movl	%esi, (%rcx,%r12,4)
	movslq	%esi, %r12
.L65:
	movl	%esi, (%rcx,%rbx,4)
.L64:
	movl	(%rcx,%r15,4), %eax
	addl	(%r8), %r13d
	movl	%eax, (%rcx,%r12,4)
.L58:
	movl	-3600068(%rbp), %eax
	addl	$1, %r11d
	addq	$12, %r8
	leal	-2(%rax,%rax), %eax
	cmpl	%r11d, %eax
	jle	.L47
.L68:
	movslq	4(%r8), %rbx
	movl	8(%r8), %r10d
	movl	(%rcx,%rbx,4), %esi
	movq	%rbx, %r9
	cmpl	%esi, %ebx
	je	.L48
	movslq	%esi, %r12
	movl	(%rcx,%r12,4), %eax
	cmpl	%eax, %esi
	je	.L49
	movslq	%eax, %rsi
	movl	(%rcx,%rsi,4), %edx
	cmpl	%edx, %eax
	je	.L50
	movslq	%edx, %r14
	movl	(%rcx,%r14,4), %eax
	cmpl	%eax, %edx
	je	.L51
	movslq	%eax, %r15
	movl	(%rcx,%r15,4), %edi
	cmpl	%edi, %eax
	je	.L52
	call	func
	movl	%eax, (%rcx,%r15,4)
.L52:
	movl	(%rcx,%r15,4), %eax
	movl	%eax, (%rcx,%r14,4)
.L51:
	movl	(%rcx,%r14,4), %edx
	movl	%edx, (%rcx,%rsi,4)
.L50:
	movl	%edx, (%rcx,%r12,4)
	movl	%edx, %eax
.L49:
	movl	%eax, (%rcx,%rbx,4)
	movl	%eax, %esi
.L48:
	movslq	%r10d, %r12
	movslq	(%rcx,%r12,4), %r15
	cmpl	%r15d, %r10d
	jne	.L96
	cmpl	%esi, %r15d
	je	.L58
	jmp	.L60
.L72:
	xorl	%r13d, %r13d
.L47:
	xorl	%eax, %eax
	movl	%r13d, %edx
	movl	$1, %edi
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L97
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L94:
	.cfi_restore_state
	leaq	-2400064(%rbp), %r12
	jmp	.L42
.L71:
	xorl	%esi, %esi
	movslq	%eax, %r8
	jmp	.L44
.L70:
	xorl	%esi, %esi
	leaq	-2400064(%rbp), %r12
	jmp	.L39
.L93:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L33
.L97:
	call	__stack_chk_fail@PLT
.L95:
	movl	(%rcx,%rbx,4), %esi
	movslq	%r10d, %r15
	jmp	.L60
	.cfi_endproc
.LFE55:
	.size	main, .-main
	.globl	UF
	.bss
	.align 32
	.type	UF, @object
	.size	UF, 400000
UF:
	.zero	400000
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp_0
	.type	cmp_0, @function
cmp_0:
.LFB53:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE53:
	.size	cmp_0, .-cmp_0
	.p2align 4
	.globl	cmp_1
	.type	cmp_1, @function
cmp_1:
.LFB54:
	.cfi_startproc
	endbr64
	movl	4(%rdi), %eax
	subl	4(%rsi), %eax
	ret
	.cfi_endproc
.LFE54:
	.size	cmp_1, .-cmp_1
	.p2align 4
	.globl	func
	.type	func, @function
func:
.LFB51:
	.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
	movslq	%edi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	UF(%rip), %rbx
	movq	%rbp, %rax
	movl	(%rbx,%rbp,4), %edx
	cmpl	%ebp, %edx
	jne	.L11
	popq	%rbx
	.cfi_remember_state
	.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
.L11:
	.cfi_restore_state
	movslq	%edx, %r12
	movl	(%rbx,%r12,4), %eax
	cmpl	%eax, %edx
	je	.L6
	movslq	%eax, %r13
	movl	(%rbx,%r13,4), %edx
	cmpl	%edx, %eax
	jne	.L12
.L7:
	movl	%edx, (%rbx,%r12,4)
	movl	%edx, %eax
.L6:
	movl	%eax, (%rbx,%rbp,4)
	popq	%rbx
	.cfi_remember_state
	.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
.L12:
	.cfi_restore_state
	movslq	%edx, %r14
	movl	(%rbx,%r14,4), %edi
	cmpl	%edi, %edx
	je	.L8
	call	func
	movl	%eax, (%rbx,%r14,4)
	movl	%eax, %edi
.L8:
	movl	%edi, (%rbx,%r13,4)
	movl	%edi, %edx
	jmp	.L7
	.cfi_endproc
.LFE51:
	.size	func, .-func
	.p2align 4
	.globl	u
	.type	u, @function
u:
.LFB52:
	.cfi_startproc
	endbr64
	leaq	UF(%rip), %rcx
	movslq	%esi, %r10
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%edi, %r9d
	movslq	(%rcx,%r10,4), %r8
	cmpl	%r8d, %esi
	jne	.L23
	movslq	%r9d, %rsi
	movslq	(%rcx,%rsi,4), %rax
	cmpl	%eax, %r9d
	jne	.L24
.L18:
	movl	(%rcx,%r8,4), %edx
	movl	%edx, (%rcx,%rax,4)
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	movslq	%r8d, %rsi
	movl	(%rcx,%rsi,4), %eax
	cmpl	%eax, %r8d
	je	.L15
	movslq	%eax, %r8
	movl	(%rcx,%r8,4), %edx
	cmpl	%edx, %eax
	jne	.L25
.L16:
	movl	%edx, (%rcx,%rsi,4)
	movl	%edx, %eax
.L15:
	movslq	%r9d, %rsi
	movl	%eax, (%rcx,%r10,4)
	movslq	%eax, %r8
	movslq	(%rcx,%rsi,4), %rax
	cmpl	%eax, %r9d
	je	.L18
.L24:
	movslq	%eax, %r10
	movl	(%rcx,%r10,4), %edx
	cmpl	%edx, %eax
	je	.L19
	movslq	%edx, %r11
	movl	(%rcx,%r11,4), %r9d
	cmpl	%r9d, %edx
	jne	.L26
.L20:
	movl	%r9d, (%rcx,%r10,4)
	movl	%r9d, %edx
.L19:
	movl	%edx, (%rcx,%rsi,4)
	movslq	%edx, %rax
	movl	(%rcx,%r8,4), %edx
	movl	%edx, (%rcx,%rax,4)
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	movslq	%r9d, %rbx
	movl	(%rcx,%rbx,4), %edi
	cmpl	%edi, %r9d
	je	.L21
	call	func
	movl	%eax, (%rcx,%rbx,4)
	movl	%eax, %edi
.L21:
	movl	%edi, (%rcx,%r11,4)
	movl	%edi, %r9d
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L25:
	movslq	%edx, %r11
	movl	(%rcx,%r11,4), %edi
	cmpl	%edi, %edx
	je	.L17
	call	func
	movl	%eax, (%rcx,%r11,4)
	movl	%eax, %edi
.L17:
	movl	%edi, (%rcx,%r8,4)
	movl	%edi, %edx
	jmp	.L16
	.cfi_endproc
.LFE52:
	.size	u, .-u
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d"
.LC4:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	leaq	-3596288(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3768, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	leaq	-3600068(%rbp), %rsi
	call	__isoc99_scanf@PLT
	movslq	-3600068(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,4), %rdx
	movq	%rsi, %rax
	movq	%rdx, %r8
	movq	%rdx, %rcx
	andq	$-4096, %r8
	andq	$-16, %rcx
	subq	%r8, %rdi
	cmpq	%rdi, %rsp
	je	.L29
.L91:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L91
.L29:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L92
.L30:
	movq	%rdx, %rcx
	movq	%rsp, %rdi
	andq	$-4096, %rdx
	movq	%rsp, %r12
	andq	$-16, %rcx
	subq	%rdx, %rdi
.L31:
	cmpq	%rdi, %rsp
	je	.L32
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L31
.L92:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L30
.L32:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L93
.L33:
	testl	%eax, %eax
	leaq	-3600064(%rbp), %rax
	movq	%rsp, %r13
	movq	%rax, -3600088(%rbp)
	jle	.L34
	movq	%rax, %rbx
	xorl	%r14d, %r14d
	leaq	.LC2(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L35:
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$4, %r12
	addq	$4, %r13
	addq	$12, %rbx
	movd	-4(%r12), %xmm0
	movd	-4(%r13), %xmm4
	movl	%r14d, -4(%rbx)
	addl	$1, %r14d
	punpckldq	%xmm4, %xmm0
	movq	%xmm0, -12(%rbx)
	movl	-3600068(%rbp), %eax
	cmpl	%r14d, %eax
	jg	.L35
	movslq	%eax, %rsi
.L34:
	movq	-3600088(%rbp), %rdi
	leaq	cmp_0(%rip), %r13
	movl	$12, %edx
	movq	%r13, %rcx
	call	qsort@PLT
	movl	-3600068(%rbp), %r8d
	leal	-1(%r8), %edi
	testl	%edi, %edi
	jle	.L94
	cmpl	$3, %r8d
	jle	.L70
	leal	-4(%r8), %esi
	leaq	-2400064(%rbp), %r12
	xorl	%ecx, %ecx
	movd	-3600056(%rbp), %xmm2
	andl	$-2, %esi
	movl	-3600064(%rbp), %r9d
	leaq	-3600052(%rbp), %rax
	movq	%r12, %rdx
	addl	$2, %esi
.L40:
	movl	(%rax), %r10d
	movd	8(%rax), %xmm1
	addl	$2, %ecx
	addq	$24, %rax
	addq	$24, %rdx
	movl	%r10d, %ebx
	movdqa	%xmm1, %xmm3
	subl	%r9d, %ebx
	movl	-12(%rax), %r9d
	movd	%ebx, %xmm0
	movl	%r9d, %r11d
	punpckldq	%xmm2, %xmm0
	subl	%r10d, %r11d
	movd	%r11d, %xmm7
	punpckldq	%xmm7, %xmm3
	punpcklqdq	%xmm3, %xmm0
	movups	%xmm0, -24(%rdx)
	movd	-4(%rax), %xmm2
	punpckldq	%xmm2, %xmm1
	movq	%xmm1, -8(%rdx)
	cmpl	%esi, %ecx
	jne	.L40
.L39:
	movslq	%esi, %rcx
	movq	-3600088(%rbp), %rax
	imulq	$12, %rcx, %rcx
	addq	%rcx, %rax
	addq	%r12, %rcx
	.p2align 4,,10
	.p2align 3
.L41:
	movl	12(%rax), %edx
	movd	8(%rax), %xmm5
	addl	$1, %esi
	addq	$12, %rax
	subl	-12(%rax), %edx
	addq	$12, %rcx
	movd	%edx, %xmm0
	punpckldq	%xmm5, %xmm0
	movq	%xmm0, -12(%rcx)
	movl	8(%rax), %edx
	movl	%edx, -4(%rcx)
	cmpl	%edi, %esi
	jl	.L41
.L42:
	movq	-3600088(%rbp), %rdi
	movslq	%r8d, %rsi
	movl	$12, %edx
	leaq	cmp_1(%rip), %rcx
	call	qsort@PLT
	movl	-3600068(%rbp), %eax
	leal	-1(%rax), %edi
	testl	%edi, %edi
	jle	.L38
	cmpl	$3, %eax
	jle	.L71
	movslq	%eax, %r8
	subl	$4, %eax
	movd	-3600056(%rbp), %xmm2
	movl	-3600060(%rbp), %r9d
	andl	$-2, %eax
	leaq	(%r8,%r8,2), %rcx
	leaq	-3600048(%rbp), %rdx
	leal	2(%rax), %esi
	leaq	(%r12,%rcx,4), %rcx
	xorl	%eax, %eax
.L45:
	movl	(%rdx), %r10d
	movd	4(%rdx), %xmm1
	addl	$2, %eax
	addq	$24, %rdx
	addq	$24, %rcx
	movl	%r10d, %ebx
	movdqa	%xmm1, %xmm3
	subl	%r9d, %ebx
	movl	-12(%rdx), %r9d
	movd	%ebx, %xmm0
	movl	%r9d, %r11d
	punpckldq	%xmm2, %xmm0
	subl	%r10d, %r11d
	movd	%r11d, %xmm7
	punpckldq	%xmm7, %xmm3
	punpcklqdq	%xmm3, %xmm0
	movups	%xmm0, -36(%rcx)
	movd	-8(%rdx), %xmm2
	punpckldq	%xmm2, %xmm1
	movq	%xmm1, -20(%rcx)
	cmpl	%esi, %eax
	jne	.L45
.L44:
	movslq	%esi, %rdx
	imulq	$12, %rdx, %rax
	addq	%r8, %rdx
	addq	-3600088(%rbp), %rax
	imulq	$12, %rdx, %rdx
	leaq	-12(%rdx,%r12), %rcx
	.p2align 4,,10
	.p2align 3
.L46:
	movl	16(%rax), %edx
	movd	8(%rax), %xmm6
	addl	$1, %esi
	addq	$12, %rax
	subl	-8(%rax), %edx
	addq	$12, %rcx
	movd	%edx, %xmm0
	punpckldq	%xmm6, %xmm0
	movq	%xmm0, -12(%rcx)
	movl	8(%rax), %edx
	movl	%edx, -4(%rcx)
	cmpl	%edi, %esi
	jl	.L46
.L38:
	leal	(%rdi,%rdi), %esi
	movq	%r13, %rcx
	movl	$12, %edx
	movq	%r12, %rdi
	movslq	%esi, %rsi
	call	qsort@PLT
	leaq	UF(%rip), %rcx
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC3(%rip), %xmm2
	movq	%rcx, %rax
	leaq	400000(%rcx), %rdx
	.p2align 4,,10
	.p2align 3
.L43:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L43
	cmpl	$1, -3600068(%rbp)
	jle	.L72
	movq	%r12, %r8
	xorl	%r11d, %r11d
	xorl	%r13d, %r13d
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L96:
	movslq	%r15d, %r14
	movl	(%rcx,%r14,4), %eax
	cmpl	%eax, %r15d
	je	.L54
	movslq	%eax, %r15
	movl	(%rcx,%r15,4), %edi
	cmpl	%edi, %eax
	je	.L55
	movslq	%edi, %rdx
	movl	(%rcx,%rdx,4), %eax
	cmpl	%eax, %edi
	je	.L56
	movslq	%eax, %rdi
	movq	%rdi, -3600088(%rbp)
	movl	(%rcx,%rdi,4), %edi
	cmpl	%edi, %eax
	je	.L57
	movq	%rdx, -3600096(%rbp)
	call	func
	movq	-3600088(%rbp), %rdi
	movq	-3600096(%rbp), %rdx
	movl	%eax, (%rcx,%rdi,4)
.L57:
	movq	-3600088(%rbp), %rax
	movl	(%rcx,%rax,4), %eax
	movl	%eax, (%rcx,%rdx,4)
.L56:
	movl	(%rcx,%rdx,4), %edi
	movl	%edi, (%rcx,%r15,4)
.L55:
	movl	%edi, (%rcx,%r14,4)
	movl	%edi, %eax
.L54:
	movl	%eax, (%rcx,%r12,4)
	cmpl	%eax, %esi
	je	.L58
	cmpl	%eax, %r10d
	je	.L95
	movslq	%eax, %r15
	movl	(%rcx,%r15,4), %edx
	cmpl	%eax, %edx
	je	.L61
	movslq	%edx, %rsi
	movl	(%rcx,%rsi,4), %eax
	cmpl	%eax, %edx
	je	.L62
	movslq	%eax, %r10
	movl	(%rcx,%r10,4), %edi
	cmpl	%edi, %eax
	je	.L63
	call	func
	movl	%eax, (%rcx,%r10,4)
.L63:
	movl	(%rcx,%r10,4), %eax
	movl	%eax, (%rcx,%rsi,4)
.L62:
	movl	(%rcx,%rsi,4), %eax
	movl	%eax, (%rcx,%r15,4)
.L61:
	movl	%eax, (%rcx,%r12,4)
	movl	(%rcx,%rbx,4), %esi
	movslq	%eax, %r15
.L60:
	movslq	%esi, %r12
	cmpl	%esi, %r9d
	je	.L64
	movl	(%rcx,%r12,4), %eax
	cmpl	%esi, %eax
	je	.L65
	movslq	%eax, %rsi
	movl	(%rcx,%rsi,4), %edx
	cmpl	%edx, %eax
	je	.L66
	movslq	%edx, %r9
	movl	(%rcx,%r9,4), %edi
	cmpl	%edi, %edx
	je	.L67
	call	func
	movl	%eax, (%rcx,%r9,4)
.L67:
	movl	(%rcx,%r9,4), %eax
	movl	%eax, (%rcx,%rsi,4)
.L66:
	movl	(%rcx,%rsi,4), %esi
	movl	%esi, (%rcx,%r12,4)
	movslq	%esi, %r12
.L65:
	movl	%esi, (%rcx,%rbx,4)
.L64:
	movl	(%rcx,%r15,4), %eax
	addl	(%r8), %r13d
	movl	%eax, (%rcx,%r12,4)
.L58:
	movl	-3600068(%rbp), %eax
	addl	$1, %r11d
	addq	$12, %r8
	leal	-2(%rax,%rax), %eax
	cmpl	%r11d, %eax
	jle	.L47
.L68:
	movslq	4(%r8), %rbx
	movl	8(%r8), %r10d
	movl	(%rcx,%rbx,4), %esi
	movq	%rbx, %r9
	cmpl	%esi, %ebx
	je	.L48
	movslq	%esi, %r12
	movl	(%rcx,%r12,4), %eax
	cmpl	%eax, %esi
	je	.L49
	movslq	%eax, %rsi
	movl	(%rcx,%rsi,4), %edx
	cmpl	%edx, %eax
	je	.L50
	movslq	%edx, %r14
	movl	(%rcx,%r14,4), %eax
	cmpl	%eax, %edx
	je	.L51
	movslq	%eax, %r15
	movl	(%rcx,%r15,4), %edi
	cmpl	%edi, %eax
	je	.L52
	call	func
	movl	%eax, (%rcx,%r15,4)
.L52:
	movl	(%rcx,%r15,4), %eax
	movl	%eax, (%rcx,%r14,4)
.L51:
	movl	(%rcx,%r14,4), %edx
	movl	%edx, (%rcx,%rsi,4)
.L50:
	movl	%edx, (%rcx,%r12,4)
	movl	%edx, %eax
.L49:
	movl	%eax, (%rcx,%rbx,4)
	movl	%eax, %esi
.L48:
	movslq	%r10d, %r12
	movslq	(%rcx,%r12,4), %r15
	cmpl	%r15d, %r10d
	jne	.L96
	cmpl	%esi, %r15d
	je	.L58
	jmp	.L60
.L72:
	xorl	%r13d, %r13d
.L47:
	xorl	%eax, %eax
	movl	%r13d, %edx
	movl	$1, %edi
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L97
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L94:
	.cfi_restore_state
	leaq	-2400064(%rbp), %r12
	jmp	.L42
.L71:
	xorl	%esi, %esi
	movslq	%eax, %r8
	jmp	.L44
.L70:
	xorl	%esi, %esi
	leaq	-2400064(%rbp), %r12
	jmp	.L39
.L93:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L33
.L97:
	call	__stack_chk_fail@PLT
.L95:
	movl	(%rcx,%rbx,4), %esi
	movslq	%r10d, %r15
	jmp	.L60
	.cfi_endproc
.LFE55:
	.size	main, .-main
	.globl	UF
	.bss
	.align 32
	.type	UF, @object
	.size	UF, 400000
UF:
	.zero	400000
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.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 <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>

int UF[100000];

int func(int c){
    if(c != UF[c]){
        UF[c] = func(UF[c]);
    }
    return UF[c];
}

void u(int a, int b){
    UF[func(a)] = UF[func(b)];
}

int cmp_0(const void *a, const void *b){
    return (*(int(*)[3])a)[0] - (*(int(*)[3])b)[0];
}

int cmp_1(const void *a, const void *b){
    return (*(int(*)[3])a)[1] - (*(int(*)[3])b)[1];
}

int main(void){

    int N;
    int cities[100000][3], roads[200000][3];

    scanf("%d", &N);

    int x[N], y[N];

    for(int i = 0; i < N; i++){
        scanf("%d%d", &x[i], &y[i]);
        cities[i][0] = x[i];
        cities[i][1] = y[i];
        cities[i][2] = i;
    }

    qsort(cities, N, sizeof(int[3]), cmp_0);

    for(int i = 0; i < N-1; i++){
        roads[i][0] = cities[i+1][0]-cities[i][0];
        roads[i][1] = cities[i][2];
        roads[i][2] = cities[i+1][2];
    }

    qsort(cities, N, sizeof(int[3]), cmp_1);

    for(int i = 0; i < N-1; i++){
        roads[i+N-1][0] = cities[i+1][1] - cities[i][1];
        roads[i+N-1][1] = cities[i][2];
        roads[i+N-1][2] = cities[i+1][2];
    }

    qsort(roads, 2*N-2, sizeof(int[3]), cmp_0);

    for(int i = 0; i < 100000; i++){
        UF[i] = i;
    }

    int cost = 0;
    int X, Y;

    for(int i = 0; i < 2 * N - 2; i++){
        X = roads[i][1];
        Y = roads[i][2];
        if(func(X) != func(Y)){
            u(X, Y);
            cost += roads[i][0];
        }
    }

    printf("%d\n", cost);

    return 0;
}
3
1 5
3 9
7 8

3

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

int UF[100000];

int func(int c){
    if(c != UF[c]){
        UF[c] = func(UF[c]);
    }
    return UF[c];
}

void u(int a, int b){
    UF[func(a)] = UF[func(b)];
}

int cmp_0(const void *a, const void *b){
    return (*(int(*)[3])a)[0] - (*(int(*)[3])b)[0];
}

int cmp_1(const void *a, const void *b){
    return (*(int(*)[3])a)[1] - (*(int(*)[3])b)[1];
}

int main(void){

    int N;
    int cities[100000][3], roads[200000][3];

    scanf("%d", &N);

    int x[N], y[N];

    for(int i = 0; i < N; i++){
        scanf("%d%d", &x[i], &y[i]);
        cities[i][0] = x[i];
        cities[i][1] = y[i];
        cities[i][2] = i;
    }

    qsort(cities, N, sizeof(int[3]), cmp_0);

    for(int i = 0; i < N-1; i++){
        roads[i][0] = cities[i+1][0]-cities[i][0];
        roads[i][1] = cities[i][2];
        roads[i][2] = cities[i+1][2];
    }

    qsort(cities, N, sizeof(int[3]), cmp_1);

    for(int i = 0; i < N-1; i++){
        roads[i+N-1][0] = cities[i+1][1] - cities[i][1];
        roads[i+N-1][1] = cities[i][2];
        roads[i+N-1][2] = cities[i+1][2];
    }

    qsort(roads, 2*N-2, sizeof(int[3]), cmp_0);

    for(int i = 0; i < 100000; i++){
        UF[i] = i;
    }

    int cost = 0;
    int X, Y;

    for(int i = 0; i < 2 * N - 2; i++){
        X = roads[i][1];
        Y = roads[i][2];
        if(func(X) != func(Y)){
            u(X, Y);
            cost += roads[i][0];
        }
    }

    printf("%d\n", cost);

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	UF
	.bss
	.align 32
	.type	UF, @object
	.size	UF, 400000
UF:
	.zero	400000
	.text
	.globl	func
	.type	func, @function
func:
.LFB6:
	.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
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	UF(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	je	.L2
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	UF(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	func
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	UF(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L2:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	UF(%rip), %rax
	movl	(%rdx,%rax), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	func, .-func
	.globl	u
	.type	u, @function
u:
.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	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	func
	movl	%eax, %ebx
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	func
	movl	%eax, %edx
	movslq	%ebx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	UF(%rip), %rax
	movl	(%rcx,%rax), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	UF(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	nop
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	u, .-u
	.globl	cmp_0
	.type	cmp_0, @function
cmp_0:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	cmp_0, .-cmp_0
	.globl	cmp_1
	.type	cmp_1, @function
cmp_1:
.LFB9:
	.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	4(%rax), %edx
	movq	-16(%rbp), %rax
	movl	4(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	cmp_1, .-cmp_1
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	leaq	-3596288(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3856, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %r12
	leaq	-3600116(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-3600116(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -3600080(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -3600144(%rbp)
	movq	$0, -3600136(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -3600160(%rbp)
	movq	$0, -3600152(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L10:
	cmpq	%rdx, %rsp
	je	.L11
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L10
.L11:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L12
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L12:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -3600072(%rbp)
	movl	-3600116(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -3600064(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -3600176(%rbp)
	movq	$0, -3600168(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L13:
	cmpq	%rdx, %rsp
	je	.L14
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L13
.L14:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L15
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L15:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -3600056(%rbp)
	movl	$0, -3600112(%rbp)
	jmp	.L16
.L17:
	movl	-3600112(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-3600056(%rbp), %rax
	addq	%rax, %rdx
	movl	-3600112(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-3600072(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-3600072(%rbp), %rax
	movl	-3600112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-3600112(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600016, %rax
	movl	%edx, (%rax)
	movq	-3600056(%rbp), %rax
	movl	-3600112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-3600112(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600012, %rax
	movl	%edx, (%rax)
	movl	-3600112(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	leaq	-3600008(%rax), %rdx
	movl	-3600112(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -3600112(%rbp)
.L16:
	movl	-3600116(%rbp), %eax
	cmpl	%eax, -3600112(%rbp)
	jl	.L17
	movl	-3600116(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-3600048(%rbp), %rax
	leaq	cmp_0(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -3600108(%rbp)
	jmp	.L18
.L19:
	movl	-3600108(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600016, %rax
	movl	(%rax), %ecx
	movl	-3600108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600016, %rax
	movl	(%rax), %eax
	subl	%eax, %ecx
	movl	-3600108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400016, %rax
	movl	%ecx, (%rax)
	movl	-3600108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600008, %rax
	movl	(%rax), %edx
	movl	-3600108(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400012, %rax
	movl	%edx, (%rax)
	movl	-3600108(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600008, %rax
	movl	(%rax), %edx
	movl	-3600108(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400008, %rax
	movl	%edx, (%rax)
	addl	$1, -3600108(%rbp)
.L18:
	movl	-3600116(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -3600108(%rbp)
	jl	.L19
	movl	-3600116(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-3600048(%rbp), %rax
	leaq	cmp_1(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -3600104(%rbp)
	jmp	.L20
.L21:
	movl	-3600104(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600012, %rax
	movl	(%rax), %ecx
	movl	-3600104(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600012, %rax
	movl	(%rax), %edx
	movl	-3600116(%rbp), %esi
	movl	-3600104(%rbp), %eax
	addl	%esi, %eax
	subl	$1, %eax
	subl	%edx, %ecx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400016, %rax
	movl	%ecx, (%rax)
	movl	-3600116(%rbp), %edx
	movl	-3600104(%rbp), %eax
	addl	%edx, %eax
	leal	-1(%rax), %ecx
	movl	-3600104(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600008, %rax
	movl	(%rax), %edx
	movslq	%ecx, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400012, %rax
	movl	%edx, (%rax)
	movl	-3600104(%rbp), %eax
	addl	$1, %eax
	movl	-3600116(%rbp), %ecx
	movl	-3600104(%rbp), %edx
	addl	%ecx, %edx
	leal	-1(%rdx), %ecx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600008, %rax
	movl	(%rax), %edx
	movslq	%ecx, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400008, %rax
	movl	%edx, (%rax)
	addl	$1, -3600104(%rbp)
.L20:
	movl	-3600116(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -3600104(%rbp)
	jl	.L21
	movl	-3600116(%rbp), %eax
	subl	$1, %eax
	addl	%eax, %eax
	movslq	%eax, %rsi
	leaq	-2400048(%rbp), %rax
	leaq	cmp_0(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -3600100(%rbp)
	jmp	.L22
.L23:
	movl	-3600100(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	UF(%rip), %rdx
	movl	-3600100(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -3600100(%rbp)
.L22:
	cmpl	$99999, -3600100(%rbp)
	jle	.L23
	movl	$0, -3600096(%rbp)
	movl	$0, -3600092(%rbp)
	jmp	.L24
.L26:
	movl	-3600092(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400012, %rax
	movl	(%rax), %eax
	movl	%eax, -3600088(%rbp)
	movl	-3600092(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400008, %rax
	movl	(%rax), %eax
	movl	%eax, -3600084(%rbp)
	movl	-3600088(%rbp), %eax
	movl	%eax, %edi
	call	func
	movl	%eax, %ebx
	movl	-3600084(%rbp), %eax
	movl	%eax, %edi
	call	func
	cmpl	%eax, %ebx
	je	.L25
	movl	-3600084(%rbp), %edx
	movl	-3600088(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	u
	movl	-3600092(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400016, %rax
	movl	(%rax), %eax
	addl	%eax, -3600096(%rbp)
.L25:
	addl	$1, -3600092(%rbp)
.L24:
	movl	-3600116(%rbp), %eax
	subl	$1, %eax
	addl	%eax, %eax
	cmpl	%eax, -3600092(%rbp)
	jl	.L26
	movl	-3600096(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%r12, %rsp
	movq	-40(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	UF
	.bss
	.align 32
	.type	UF, @object
	.size	UF, 400000
UF:
	.zero	400000
	.text
	.globl	func
	.type	func, @function
func:
.LFB6:
	.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
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	UF(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	je	.L2
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	UF(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	func
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	UF(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L2:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	UF(%rip), %rax
	movl	(%rdx,%rax), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	func, .-func
	.globl	u
	.type	u, @function
u:
.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	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, %edi
	call	func
	movl	%eax, %ebx
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	func
	movl	%eax, %edx
	movslq	%ebx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	UF(%rip), %rax
	movl	(%rcx,%rax), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	UF(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	nop
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	u, .-u
	.globl	cmp_0
	.type	cmp_0, @function
cmp_0:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	cmp_0, .-cmp_0
	.globl	cmp_1
	.type	cmp_1, @function
cmp_1:
.LFB9:
	.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	4(%rax), %edx
	movq	-16(%rbp), %rax
	movl	4(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	cmp_1, .-cmp_1
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	leaq	-3596288(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3856, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %r12
	leaq	-3600116(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-3600116(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -3600080(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -3600144(%rbp)
	movq	$0, -3600136(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -3600160(%rbp)
	movq	$0, -3600152(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L10:
	cmpq	%rdx, %rsp
	je	.L11
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L10
.L11:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L12
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L12:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -3600072(%rbp)
	movl	-3600116(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -3600064(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -3600176(%rbp)
	movq	$0, -3600168(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L13:
	cmpq	%rdx, %rsp
	je	.L14
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L13
.L14:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L15
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L15:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -3600056(%rbp)
	movl	$0, -3600112(%rbp)
	jmp	.L16
.L17:
	movl	-3600112(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-3600056(%rbp), %rax
	addq	%rax, %rdx
	movl	-3600112(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-3600072(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-3600072(%rbp), %rax
	movl	-3600112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-3600112(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600016, %rax
	movl	%edx, (%rax)
	movq	-3600056(%rbp), %rax
	movl	-3600112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-3600112(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600012, %rax
	movl	%edx, (%rax)
	movl	-3600112(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	leaq	-3600008(%rax), %rdx
	movl	-3600112(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -3600112(%rbp)
.L16:
	movl	-3600116(%rbp), %eax
	cmpl	%eax, -3600112(%rbp)
	jl	.L17
	movl	-3600116(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-3600048(%rbp), %rax
	leaq	cmp_0(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -3600108(%rbp)
	jmp	.L18
.L19:
	movl	-3600108(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600016, %rax
	movl	(%rax), %ecx
	movl	-3600108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600016, %rax
	movl	(%rax), %eax
	subl	%eax, %ecx
	movl	-3600108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400016, %rax
	movl	%ecx, (%rax)
	movl	-3600108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600008, %rax
	movl	(%rax), %edx
	movl	-3600108(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400012, %rax
	movl	%edx, (%rax)
	movl	-3600108(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600008, %rax
	movl	(%rax), %edx
	movl	-3600108(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400008, %rax
	movl	%edx, (%rax)
	addl	$1, -3600108(%rbp)
.L18:
	movl	-3600116(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -3600108(%rbp)
	jl	.L19
	movl	-3600116(%rbp), %eax
	movslq	%eax, %rsi
	leaq	-3600048(%rbp), %rax
	leaq	cmp_1(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -3600104(%rbp)
	jmp	.L20
.L21:
	movl	-3600104(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600012, %rax
	movl	(%rax), %ecx
	movl	-3600104(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600012, %rax
	movl	(%rax), %edx
	movl	-3600116(%rbp), %esi
	movl	-3600104(%rbp), %eax
	addl	%esi, %eax
	subl	$1, %eax
	subl	%edx, %ecx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400016, %rax
	movl	%ecx, (%rax)
	movl	-3600116(%rbp), %edx
	movl	-3600104(%rbp), %eax
	addl	%edx, %eax
	leal	-1(%rax), %ecx
	movl	-3600104(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600008, %rax
	movl	(%rax), %edx
	movslq	%ecx, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400012, %rax
	movl	%edx, (%rax)
	movl	-3600104(%rbp), %eax
	addl	$1, %eax
	movl	-3600116(%rbp), %ecx
	movl	-3600104(%rbp), %edx
	addl	%ecx, %edx
	leal	-1(%rdx), %ecx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$3600008, %rax
	movl	(%rax), %edx
	movslq	%ecx, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400008, %rax
	movl	%edx, (%rax)
	addl	$1, -3600104(%rbp)
.L20:
	movl	-3600116(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -3600104(%rbp)
	jl	.L21
	movl	-3600116(%rbp), %eax
	subl	$1, %eax
	addl	%eax, %eax
	movslq	%eax, %rsi
	leaq	-2400048(%rbp), %rax
	leaq	cmp_0(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -3600100(%rbp)
	jmp	.L22
.L23:
	movl	-3600100(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	UF(%rip), %rdx
	movl	-3600100(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -3600100(%rbp)
.L22:
	cmpl	$99999, -3600100(%rbp)
	jle	.L23
	movl	$0, -3600096(%rbp)
	movl	$0, -3600092(%rbp)
	jmp	.L24
.L26:
	movl	-3600092(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400012, %rax
	movl	(%rax), %eax
	movl	%eax, -3600088(%rbp)
	movl	-3600092(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400008, %rax
	movl	(%rax), %eax
	movl	%eax, -3600084(%rbp)
	movl	-3600088(%rbp), %eax
	movl	%eax, %edi
	call	func
	movl	%eax, %ebx
	movl	-3600084(%rbp), %eax
	movl	%eax, %edi
	call	func
	cmpl	%eax, %ebx
	je	.L25
	movl	-3600084(%rbp), %edx
	movl	-3600088(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	u
	movl	-3600092(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-32(%rax), %rax
	addq	%rbp, %rax
	subq	$2400016, %rax
	movl	(%rax), %eax
	addl	%eax, -3600096(%rbp)
.L25:
	addl	$1, -3600092(%rbp)
.L24:
	movl	-3600116(%rbp), %eax
	subl	$1, %eax
	addl	%eax, %eax
	cmpl	%eax, -3600092(%rbp)
	jl	.L26
	movl	-3600096(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%r12, %rsp
	movq	-40(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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:
