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 <math.h>
long long llmax(long long a, long long b){return a>b?a:b;}
int assort(const void *a, const void *b){return *(int*)a-*(int*)b;}
int main(void){
    int n;
    long long tmp=0,ans=0;
    scanf("%d",&n);
    int a[n];
    for (int i=0; i<n; i++){
        scanf("%d",&a[i]);
    }
    qsort (a,n,sizeof(int),assort);
    if  (n%2==0){
        for(int i=0; i<n/2; i++){
            ans-=a[i];
            ans+=a[n/2+i];
        }
        for (int i=1; i<n/2; i++){
            ans-=a[i-1];
            ans+=a[n/2+i];
        }
    } else {
        for (int i=0; i<=n/2; i++){
            ans-=a[i];
        }
        for (int i=0; i<=n/2-2; i++){
            ans-=a[i];
        }
        for (int i=n/2+1; i<n; i++){
            ans+=a[i]*2;
        }
        for (int i=0; i<n/2; i++){
            tmp-=a[i]*2;
        }
        for (int i=n/2; i<n; i++){
            tmp+=a[i];
        }
        for (int i=n/2+2; i<n; i++){
            tmp+=a[i];
        }
    }
    printf("%lld\n",llmax(ans,tmp));
	return 0 ;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	llmax
	.type	llmax, @function
llmax:
.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	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	llmax, .-llmax
	.globl	assort
	.type	assort, @function
assort:
.LFB7:
	.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
.LFE7:
	.size	assort, .-assort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-128(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -124(%rbp)
	jmp	.L9
.L10:
	movl	-124(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -124(%rbp)
.L9:
	movl	-128(%rbp), %eax
	cmpl	%eax, -124(%rbp)
	jl	.L10
	movl	-128(%rbp), %eax
	movslq	%eax, %rsi
	movq	-64(%rbp), %rax
	leaq	assort(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-128(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L11
	movl	$0, -120(%rbp)
	jmp	.L12
.L13:
	movq	-64(%rbp), %rax
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	subq	%rax, -80(%rbp)
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-120(%rbp), %eax
	addl	%eax, %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	addq	%rax, -80(%rbp)
	addl	$1, -120(%rbp)
.L12:
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -120(%rbp)
	jl	.L13
	movl	$1, -116(%rbp)
	jmp	.L14
.L15:
	movl	-116(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	subq	%rax, -80(%rbp)
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-116(%rbp), %eax
	addl	%eax, %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	addq	%rax, -80(%rbp)
	addl	$1, -116(%rbp)
.L14:
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -116(%rbp)
	jl	.L15
	jmp	.L16
.L11:
	movl	$0, -112(%rbp)
	jmp	.L17
.L18:
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	subq	%rax, -80(%rbp)
	addl	$1, -112(%rbp)
.L17:
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -112(%rbp)
	jle	.L18
	movl	$0, -108(%rbp)
	jmp	.L19
.L20:
	movq	-64(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	subq	%rax, -80(%rbp)
	addl	$1, -108(%rbp)
.L19:
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	subl	$1, %eax
	cmpl	%eax, -108(%rbp)
	jl	.L20
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	addl	$1, %eax
	movl	%eax, -104(%rbp)
	jmp	.L21
.L22:
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, %eax
	cltq
	addq	%rax, -80(%rbp)
	addl	$1, -104(%rbp)
.L21:
	movl	-128(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L22
	movl	$0, -100(%rbp)
	jmp	.L23
.L24:
	movq	-64(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, %eax
	cltq
	subq	%rax, -88(%rbp)
	addl	$1, -100(%rbp)
.L23:
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -100(%rbp)
	jl	.L24
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -96(%rbp)
	jmp	.L25
.L26:
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	addq	%rax, -88(%rbp)
	addl	$1, -96(%rbp)
.L25:
	movl	-128(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L26
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	addl	$2, %eax
	movl	%eax, -92(%rbp)
	jmp	.L27
.L28:
	movq	-64(%rbp), %rax
	movl	-92(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	addq	%rax, -88(%rbp)
	addl	$1, -92(%rbp)
.L27:
	movl	-128(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L28
.L16:
	movq	-88(%rbp), %rdx
	movq	-80(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	llmax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	assort
	.type	assort, @function
assort:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE40:
	.size	assort, .-assort
	.p2align 4
	.globl	llmax
	.type	llmax, @function
llmax:
.LFB39:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovge	%rsi, %rax
	ret
	.cfi_endproc
.LFE39:
	.size	llmax, .-llmax
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-44(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,4), %rdx
	movq	%rsi, %rax
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L6
.L76:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L76
.L6:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L77
.L7:
	movq	%rsp, %r13
	testl	%eax, %eax
	jle	.L8
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	addq	$4, %r12
	cmpl	%ebx, %eax
	jg	.L9
	movslq	%eax, %rsi
.L8:
	leaq	assort(%rip), %rcx
	movl	$4, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	-44(%rbp), %edi
	movl	$2, %ecx
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testb	$1, %dil
	je	.L10
	xorl	%ecx, %ecx
	cmpl	$-1, %edi
	jl	.L12
	xorl	%esi, %esi
	testl	%eax, %eax
	cmovns	%eax, %esi
	addl	$1, %esi
	cmpl	$5, %edi
	jle	.L57
	movl	%esi, %ecx
	pxor	%xmm1, %xmm1
	pxor	%xmm4, %xmm4
	movq	%r13, %rdx
	shrl	$2, %ecx
	salq	$4, %rcx
	addq	%r13, %rcx
	.p2align 4,,10
	.p2align 3
.L24:
	movdqu	(%rdx), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rdx
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm0
	psubq	%xmm3, %xmm1
	psubq	%xmm0, %xmm1
	cmpq	%rcx, %rdx
	jne	.L24
	movdqa	%xmm1, %xmm0
	movl	%esi, %edx
	psrldq	$8, %xmm0
	andl	$-4, %edx
	andb	$3, %sil
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rcx
	je	.L12
.L23:
	movslq	%edx, %rsi
	leaq	0(%r13,%rsi,4), %rsi
	movslq	(%rsi), %r8
	subq	%r8, %rcx
	leal	1(%rdx), %r8d
	cmpl	%r8d, %eax
	jl	.L12
	movslq	4(%rsi), %r8
	addl	$2, %edx
	subq	%r8, %rcx
	cmpl	%edx, %eax
	jl	.L12
	movslq	8(%rsi), %rdx
	leal	-1(%rax), %r8d
	subq	%rdx, %rcx
.L27:
	leal	-2(%rax), %edx
	cmpl	$2, %edx
	jbe	.L58
	movl	%r8d, %esi
	pxor	%xmm1, %xmm1
	pxor	%xmm4, %xmm4
	movq	%r13, %rdx
	shrl	$2, %esi
	salq	$4, %rsi
	addq	%r13, %rsi
	.p2align 4,,10
	.p2align 3
.L30:
	movdqu	(%rdx), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rdx
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm0
	psubq	%xmm3, %xmm1
	psubq	%xmm0, %xmm1
	cmpq	%rdx, %rsi
	jne	.L30
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rdx
	addq	%rdx, %rcx
	movl	%r8d, %edx
	andl	$-4, %edx
	testb	$3, %r8b
	je	.L28
.L29:
	movslq	%edx, %rsi
	leaq	0(%r13,%rsi,4), %rsi
	movslq	(%rsi), %r9
	subq	%r9, %rcx
	leal	1(%rdx), %r9d
	cmpl	%r9d, %r8d
	jle	.L28
	movslq	4(%rsi), %r9
	addl	$2, %edx
	subq	%r9, %rcx
	cmpl	%edx, %r8d
	jle	.L28
	movslq	8(%rsi), %rdx
	subq	%rdx, %rcx
.L28:
	leal	1(%rax), %r8d
	cmpl	%r8d, %edi
	jle	.L33
	movl	%edi, %edx
	subl	%eax, %edx
	leal	-1(%rdx), %r9d
	subl	$2, %edx
	cmpl	$2, %edx
	jbe	.L34
	movl	%r9d, %esi
	pxor	%xmm1, %xmm1
	pxor	%xmm4, %xmm4
	movslq	%r8d, %rdx
	shrl	$2, %esi
	leaq	0(%r13,%rdx,4), %rdx
	salq	$4, %rsi
	addq	%rdx, %rsi
	.p2align 4,,10
	.p2align 3
.L35:
	movdqu	(%rdx), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rdx
	pslld	$1, %xmm0
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm0
	paddq	%xmm3, %xmm1
	paddq	%xmm0, %xmm1
	cmpq	%rsi, %rdx
	jne	.L35
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rdx
	addq	%rdx, %rcx
	movl	%r9d, %edx
	andl	$-4, %edx
	addl	%edx, %r8d
	cmpl	%edx, %r9d
	je	.L33
.L34:
	movslq	%r8d, %rdx
	leaq	0(%r13,%rdx,4), %rsi
	movl	(%rsi), %ebx
	leal	(%rbx,%rbx), %edx
	movslq	%edx, %rdx
	addq	%rdx, %rcx
	leal	1(%r8), %edx
	cmpl	%edx, %edi
	jle	.L33
	movl	4(%rsi), %ebx
	addl	$2, %r8d
	leal	(%rbx,%rbx), %edx
	movslq	%edx, %rdx
	addq	%rdx, %rcx
	cmpl	%r8d, %edi
	jle	.L33
	movl	8(%rsi), %edx
	addl	%edx, %edx
	movslq	%edx, %rdx
	addq	%rdx, %rcx
.L33:
	cmpl	$1, %edi
	jle	.L59
	cmpl	$7, %edi
	jle	.L60
	movl	%eax, %esi
	pxor	%xmm1, %xmm1
	pxor	%xmm4, %xmm4
	movq	%r13, %rdx
	shrl	$2, %esi
	salq	$4, %rsi
	addq	%r13, %rsi
	.p2align 4,,10
	.p2align 3
.L40:
	movdqu	(%rdx), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rdx
	pslld	$1, %xmm0
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm0
	psubq	%xmm3, %xmm1
	psubq	%xmm0, %xmm1
	cmpq	%rdx, %rsi
	jne	.L40
	movdqa	%xmm1, %xmm0
	movl	%eax, %r8d
	psrldq	$8, %xmm0
	andl	$-4, %r8d
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rdx
	testb	$3, %al
	je	.L38
.L39:
	movslq	%r8d, %rsi
	leaq	0(%r13,%rsi,4), %r9
	movl	(%r9), %ebx
	leal	(%rbx,%rbx), %esi
	movslq	%esi, %rsi
	subq	%rsi, %rdx
	leal	1(%r8), %esi
	cmpl	%esi, %eax
	jle	.L38
	movl	4(%r9), %ebx
	addl	$2, %r8d
	leal	(%rbx,%rbx), %esi
	movslq	%esi, %rsi
	subq	%rsi, %rdx
	cmpl	%r8d, %eax
	jle	.L38
	movl	8(%r9), %esi
	addl	%esi, %esi
	movslq	%esi, %rsi
	subq	%rsi, %rdx
.L38:
	cmpl	%eax, %edi
	jle	.L43
	movl	%edi, %r9d
	subl	%eax, %r9d
	leal	-1(%r9), %esi
	cmpl	$2, %esi
	jbe	.L61
	movl	%r9d, %r8d
	pxor	%xmm1, %xmm1
	pxor	%xmm4, %xmm4
	movslq	%eax, %rsi
	shrl	$2, %r8d
	leaq	0(%r13,%rsi,4), %rsi
	salq	$4, %r8
	addq	%rsi, %r8
	.p2align 4,,10
	.p2align 3
.L45:
	movdqu	(%rsi), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rsi
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm0
	paddq	%xmm3, %xmm1
	paddq	%xmm0, %xmm1
	cmpq	%rsi, %r8
	jne	.L45
	movdqa	%xmm1, %xmm0
	movl	%r9d, %r8d
	psrldq	$8, %xmm0
	andl	$-4, %r8d
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rsi
	addq	%rsi, %rdx
	leal	(%r8,%rax), %esi
	cmpl	%r8d, %r9d
	je	.L43
.L44:
	movslq	%esi, %r8
	leaq	0(%r13,%r8,4), %r8
	movslq	(%r8), %r9
	addq	%r9, %rdx
	leal	1(%rsi), %r9d
	cmpl	%r9d, %edi
	jle	.L43
	movslq	4(%r8), %r9
	addl	$2, %esi
	addq	%r9, %rdx
	cmpl	%esi, %edi
	jle	.L43
	movslq	8(%r8), %rsi
	addq	%rsi, %rdx
.L43:
	leal	2(%rax), %r8d
	cmpl	%r8d, %edi
	jle	.L18
	movl	%edi, %esi
	subl	%eax, %esi
	leal	-2(%rsi), %r9d
	subl	$3, %esi
	cmpl	$2, %esi
	jbe	.L48
	movl	%r9d, %esi
	pxor	%xmm1, %xmm1
	pxor	%xmm4, %xmm4
	movslq	%r8d, %rax
	shrl	$2, %esi
	leaq	0(%r13,%rax,4), %rax
	salq	$4, %rsi
	addq	%rax, %rsi
	.p2align 4,,10
	.p2align 3
.L49:
	movdqu	(%rax), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rax
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm0
	paddq	%xmm3, %xmm1
	paddq	%xmm0, %xmm1
	cmpq	%rax, %rsi
	jne	.L49
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rax
	addq	%rax, %rdx
	movl	%r9d, %eax
	andl	$-4, %eax
	addl	%eax, %r8d
	cmpl	%eax, %r9d
	je	.L18
.L48:
	movslq	%r8d, %rax
	leaq	0(%r13,%rax,4), %rax
	movslq	(%rax), %rsi
	addq	%rsi, %rdx
	leal	1(%r8), %esi
	cmpl	%esi, %edi
	jle	.L18
	movslq	4(%rax), %rsi
	addl	$2, %r8d
	addq	%rsi, %rdx
	cmpl	%r8d, %edi
	jle	.L18
	movslq	8(%rax), %rax
	addq	%rax, %rdx
.L18:
	cmpq	%rcx, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	cmovl	%rcx, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L78
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L10:
	.cfi_restore_state
	cmpl	$1, %edi
	jle	.L53
	cmpl	$7, %edi
	jle	.L54
	movl	%eax, %ecx
	pxor	%xmm3, %xmm3
	pxor	%xmm6, %xmm6
	movslq	%eax, %rdx
	shrl	$2, %ecx
	leaq	0(%r13,%rdx,4), %rsi
	movdqa	%xmm3, %xmm2
	xorl	%edx, %edx
	salq	$4, %rcx
	.p2align 4,,10
	.p2align 3
.L15:
	movdqu	0(%r13,%rdx), %xmm1
	movdqa	%xmm6, %xmm5
	movdqu	(%rsi,%rdx), %xmm0
	addq	$16, %rdx
	pcmpgtd	%xmm1, %xmm5
	movdqa	%xmm1, %xmm4
	movdqa	%xmm0, %xmm7
	punpckldq	%xmm5, %xmm4
	punpckhdq	%xmm5, %xmm1
	psubq	%xmm4, %xmm2
	movdqa	%xmm6, %xmm4
	psubq	%xmm1, %xmm3
	pcmpgtd	%xmm0, %xmm4
	punpckldq	%xmm4, %xmm7
	punpckhdq	%xmm4, %xmm0
	paddq	%xmm7, %xmm2
	paddq	%xmm0, %xmm3
	cmpq	%rdx, %rcx
	jne	.L15
	paddq	%xmm3, %xmm2
	movl	%eax, %edx
	movdqa	%xmm2, %xmm0
	andl	$-4, %edx
	psrldq	$8, %xmm0
	paddq	%xmm0, %xmm2
	movq	%xmm2, %rcx
	testb	$3, %al
	je	.L13
.L14:
	movslq	%edx, %rsi
	leaq	0(%r13,%rsi,4), %r8
	movslq	(%r8), %rsi
	subq	%rsi, %rcx
	leal	(%rdx,%rax), %esi
	movslq	%esi, %rsi
	movslq	0(%r13,%rsi,4), %rsi
	addq	%rsi, %rcx
	leal	1(%rdx), %esi
	cmpl	%eax, %esi
	jge	.L13
	addl	%eax, %esi
	movslq	4(%r8), %r9
	addl	$2, %edx
	movslq	%esi, %rsi
	movslq	0(%r13,%rsi,4), %rsi
	subq	%r9, %rcx
	addq	%rsi, %rcx
	cmpl	%eax, %edx
	jge	.L13
	addl	%eax, %edx
	movslq	8(%r8), %rsi
	movslq	%edx, %rdx
	movslq	0(%r13,%rdx,4), %rdx
	subq	%rsi, %rcx
	addq	%rdx, %rcx
.L13:
	cmpl	$3, %edi
	jle	.L55
	leal	-1(%rax), %r8d
	cmpl	$9, %edi
	jle	.L56
	leal	1(%rax), %edx
	pxor	%xmm2, %xmm2
	pxor	%xmm6, %xmm6
	movl	%r8d, %esi
	movslq	%edx, %rdx
	shrl	$2, %esi
	movdqa	%xmm2, %xmm3
	leaq	0(%r13,%rdx,4), %rdi
	salq	$4, %rsi
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L20:
	movdqu	0(%r13,%rdx), %xmm1
	movdqa	%xmm6, %xmm5
	movdqu	(%rdi,%rdx), %xmm0
	addq	$16, %rdx
	pcmpgtd	%xmm1, %xmm5
	movdqa	%xmm1, %xmm4
	movdqa	%xmm0, %xmm7
	punpckldq	%xmm5, %xmm4
	punpckhdq	%xmm5, %xmm1
	psubq	%xmm4, %xmm3
	movdqa	%xmm6, %xmm4
	psubq	%xmm1, %xmm2
	pcmpgtd	%xmm0, %xmm4
	punpckldq	%xmm4, %xmm7
	punpckhdq	%xmm4, %xmm0
	paddq	%xmm7, %xmm3
	paddq	%xmm0, %xmm2
	cmpq	%rdx, %rsi
	jne	.L20
	paddq	%xmm3, %xmm2
	movl	%r8d, %esi
	movdqa	%xmm2, %xmm0
	andl	$-4, %esi
	psrldq	$8, %xmm0
	paddq	%xmm0, %xmm2
	movq	%xmm2, %rdx
	addq	%rdx, %rcx
	leal	1(%rsi), %edx
	cmpl	%r8d, %esi
	je	.L55
.L19:
	movslq	%edx, %rsi
	leaq	0(%r13,%rsi,4), %rdi
	movslq	-4(%rdi), %rsi
	subq	%rsi, %rcx
	leal	(%rax,%rdx), %esi
	movslq	%esi, %rsi
	movslq	0(%r13,%rsi,4), %rsi
	addq	%rsi, %rcx
	leal	1(%rdx), %esi
	cmpl	%esi, %eax
	jle	.L55
	addl	%eax, %esi
	movslq	(%rdi), %r8
	addl	$2, %edx
	movslq	%esi, %rsi
	movslq	0(%r13,%rsi,4), %rsi
	subq	%r8, %rcx
	addq	%rsi, %rcx
	cmpl	%eax, %edx
	jge	.L55
	addl	%eax, %edx
	movslq	4(%rdi), %rsi
	movslq	%edx, %rdx
	movslq	0(%r13,%rdx,4), %rax
	subq	%rsi, %rcx
	addq	%rax, %rcx
.L55:
	xorl	%edx, %edx
	jmp	.L18
.L12:
	leal	-1(%rax), %r8d
	testl	%r8d, %r8d
	jg	.L27
	jmp	.L28
.L77:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L7
.L53:
	xorl	%ecx, %ecx
	jmp	.L13
.L59:
	xorl	%edx, %edx
	jmp	.L38
.L60:
	xorl	%r8d, %r8d
	xorl	%edx, %edx
	jmp	.L39
.L61:
	movl	%eax, %esi
	jmp	.L44
.L54:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L14
.L56:
	movl	$1, %edx
	jmp	.L19
.L57:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L23
.L58:
	xorl	%edx, %edx
	jmp	.L29
.L78:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	assort
	.type	assort, @function
assort:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE40:
	.size	assort, .-assort
	.p2align 4
	.globl	llmax
	.type	llmax, @function
llmax:
.LFB39:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovge	%rsi, %rax
	ret
	.cfi_endproc
.LFE39:
	.size	llmax, .-llmax
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r14
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-44(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	15(,%rsi,4), %rdx
	movq	%rsi, %rax
	movq	%rdx, %rcx
	andq	$-4096, %rdx
	subq	%rdx, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L6
.L76:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L76
.L6:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L77
.L7:
	movq	%rsp, %r13
	testl	%eax, %eax
	jle	.L8
	movq	%r13, %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	addq	$4, %r12
	cmpl	%ebx, %eax
	jg	.L9
	movslq	%eax, %rsi
.L8:
	leaq	assort(%rip), %rcx
	movl	$4, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movl	-44(%rbp), %edi
	movl	$2, %ecx
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testb	$1, %dil
	je	.L10
	xorl	%ecx, %ecx
	cmpl	$-1, %edi
	jl	.L12
	xorl	%esi, %esi
	testl	%eax, %eax
	cmovns	%eax, %esi
	addl	$1, %esi
	cmpl	$5, %edi
	jle	.L57
	movl	%esi, %ecx
	pxor	%xmm1, %xmm1
	pxor	%xmm4, %xmm4
	movq	%r13, %rdx
	shrl	$2, %ecx
	salq	$4, %rcx
	addq	%r13, %rcx
	.p2align 4,,10
	.p2align 3
.L24:
	movdqu	(%rdx), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rdx
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm0
	psubq	%xmm3, %xmm1
	psubq	%xmm0, %xmm1
	cmpq	%rcx, %rdx
	jne	.L24
	movdqa	%xmm1, %xmm0
	movl	%esi, %edx
	psrldq	$8, %xmm0
	andl	$-4, %edx
	andb	$3, %sil
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rcx
	je	.L12
.L23:
	movslq	%edx, %rsi
	leaq	0(%r13,%rsi,4), %rsi
	movslq	(%rsi), %r8
	subq	%r8, %rcx
	leal	1(%rdx), %r8d
	cmpl	%r8d, %eax
	jl	.L12
	movslq	4(%rsi), %r8
	addl	$2, %edx
	subq	%r8, %rcx
	cmpl	%edx, %eax
	jl	.L12
	movslq	8(%rsi), %rdx
	leal	-1(%rax), %r8d
	subq	%rdx, %rcx
.L27:
	leal	-2(%rax), %edx
	cmpl	$2, %edx
	jbe	.L58
	movl	%r8d, %esi
	pxor	%xmm1, %xmm1
	pxor	%xmm4, %xmm4
	movq	%r13, %rdx
	shrl	$2, %esi
	salq	$4, %rsi
	addq	%r13, %rsi
	.p2align 4,,10
	.p2align 3
.L30:
	movdqu	(%rdx), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rdx
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm0
	psubq	%xmm3, %xmm1
	psubq	%xmm0, %xmm1
	cmpq	%rdx, %rsi
	jne	.L30
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rdx
	addq	%rdx, %rcx
	movl	%r8d, %edx
	andl	$-4, %edx
	testb	$3, %r8b
	je	.L28
.L29:
	movslq	%edx, %rsi
	leaq	0(%r13,%rsi,4), %rsi
	movslq	(%rsi), %r9
	subq	%r9, %rcx
	leal	1(%rdx), %r9d
	cmpl	%r9d, %r8d
	jle	.L28
	movslq	4(%rsi), %r9
	addl	$2, %edx
	subq	%r9, %rcx
	cmpl	%edx, %r8d
	jle	.L28
	movslq	8(%rsi), %rdx
	subq	%rdx, %rcx
.L28:
	leal	1(%rax), %r8d
	cmpl	%r8d, %edi
	jle	.L33
	movl	%edi, %edx
	subl	%eax, %edx
	leal	-1(%rdx), %r9d
	subl	$2, %edx
	cmpl	$2, %edx
	jbe	.L34
	movl	%r9d, %esi
	pxor	%xmm1, %xmm1
	pxor	%xmm4, %xmm4
	movslq	%r8d, %rdx
	shrl	$2, %esi
	leaq	0(%r13,%rdx,4), %rdx
	salq	$4, %rsi
	addq	%rdx, %rsi
	.p2align 4,,10
	.p2align 3
.L35:
	movdqu	(%rdx), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rdx
	pslld	$1, %xmm0
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm0
	paddq	%xmm3, %xmm1
	paddq	%xmm0, %xmm1
	cmpq	%rsi, %rdx
	jne	.L35
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rdx
	addq	%rdx, %rcx
	movl	%r9d, %edx
	andl	$-4, %edx
	addl	%edx, %r8d
	cmpl	%edx, %r9d
	je	.L33
.L34:
	movslq	%r8d, %rdx
	leaq	0(%r13,%rdx,4), %rsi
	movl	(%rsi), %ebx
	leal	(%rbx,%rbx), %edx
	movslq	%edx, %rdx
	addq	%rdx, %rcx
	leal	1(%r8), %edx
	cmpl	%edx, %edi
	jle	.L33
	movl	4(%rsi), %ebx
	addl	$2, %r8d
	leal	(%rbx,%rbx), %edx
	movslq	%edx, %rdx
	addq	%rdx, %rcx
	cmpl	%r8d, %edi
	jle	.L33
	movl	8(%rsi), %edx
	addl	%edx, %edx
	movslq	%edx, %rdx
	addq	%rdx, %rcx
.L33:
	cmpl	$1, %edi
	jle	.L59
	cmpl	$7, %edi
	jle	.L60
	movl	%eax, %esi
	pxor	%xmm1, %xmm1
	pxor	%xmm4, %xmm4
	movq	%r13, %rdx
	shrl	$2, %esi
	salq	$4, %rsi
	addq	%r13, %rsi
	.p2align 4,,10
	.p2align 3
.L40:
	movdqu	(%rdx), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rdx
	pslld	$1, %xmm0
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm0
	psubq	%xmm3, %xmm1
	psubq	%xmm0, %xmm1
	cmpq	%rdx, %rsi
	jne	.L40
	movdqa	%xmm1, %xmm0
	movl	%eax, %r8d
	psrldq	$8, %xmm0
	andl	$-4, %r8d
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rdx
	testb	$3, %al
	je	.L38
.L39:
	movslq	%r8d, %rsi
	leaq	0(%r13,%rsi,4), %r9
	movl	(%r9), %ebx
	leal	(%rbx,%rbx), %esi
	movslq	%esi, %rsi
	subq	%rsi, %rdx
	leal	1(%r8), %esi
	cmpl	%esi, %eax
	jle	.L38
	movl	4(%r9), %ebx
	addl	$2, %r8d
	leal	(%rbx,%rbx), %esi
	movslq	%esi, %rsi
	subq	%rsi, %rdx
	cmpl	%r8d, %eax
	jle	.L38
	movl	8(%r9), %esi
	addl	%esi, %esi
	movslq	%esi, %rsi
	subq	%rsi, %rdx
.L38:
	cmpl	%eax, %edi
	jle	.L43
	movl	%edi, %r9d
	subl	%eax, %r9d
	leal	-1(%r9), %esi
	cmpl	$2, %esi
	jbe	.L61
	movl	%r9d, %r8d
	pxor	%xmm1, %xmm1
	pxor	%xmm4, %xmm4
	movslq	%eax, %rsi
	shrl	$2, %r8d
	leaq	0(%r13,%rsi,4), %rsi
	salq	$4, %r8
	addq	%rsi, %r8
	.p2align 4,,10
	.p2align 3
.L45:
	movdqu	(%rsi), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rsi
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm0
	paddq	%xmm3, %xmm1
	paddq	%xmm0, %xmm1
	cmpq	%rsi, %r8
	jne	.L45
	movdqa	%xmm1, %xmm0
	movl	%r9d, %r8d
	psrldq	$8, %xmm0
	andl	$-4, %r8d
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rsi
	addq	%rsi, %rdx
	leal	(%r8,%rax), %esi
	cmpl	%r8d, %r9d
	je	.L43
.L44:
	movslq	%esi, %r8
	leaq	0(%r13,%r8,4), %r8
	movslq	(%r8), %r9
	addq	%r9, %rdx
	leal	1(%rsi), %r9d
	cmpl	%r9d, %edi
	jle	.L43
	movslq	4(%r8), %r9
	addl	$2, %esi
	addq	%r9, %rdx
	cmpl	%esi, %edi
	jle	.L43
	movslq	8(%r8), %rsi
	addq	%rsi, %rdx
.L43:
	leal	2(%rax), %r8d
	cmpl	%r8d, %edi
	jle	.L18
	movl	%edi, %esi
	subl	%eax, %esi
	leal	-2(%rsi), %r9d
	subl	$3, %esi
	cmpl	$2, %esi
	jbe	.L48
	movl	%r9d, %esi
	pxor	%xmm1, %xmm1
	pxor	%xmm4, %xmm4
	movslq	%r8d, %rax
	shrl	$2, %esi
	leaq	0(%r13,%rax,4), %rax
	salq	$4, %rsi
	addq	%rax, %rsi
	.p2align 4,,10
	.p2align 3
.L49:
	movdqu	(%rax), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rax
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm0
	paddq	%xmm3, %xmm1
	paddq	%xmm0, %xmm1
	cmpq	%rax, %rsi
	jne	.L49
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rax
	addq	%rax, %rdx
	movl	%r9d, %eax
	andl	$-4, %eax
	addl	%eax, %r8d
	cmpl	%eax, %r9d
	je	.L18
.L48:
	movslq	%r8d, %rax
	leaq	0(%r13,%rax,4), %rax
	movslq	(%rax), %rsi
	addq	%rsi, %rdx
	leal	1(%r8), %esi
	cmpl	%esi, %edi
	jle	.L18
	movslq	4(%rax), %rsi
	addl	$2, %r8d
	addq	%rsi, %rdx
	cmpl	%r8d, %edi
	jle	.L18
	movslq	8(%rax), %rax
	addq	%rax, %rdx
.L18:
	cmpq	%rcx, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	cmovl	%rcx, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L78
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L10:
	.cfi_restore_state
	cmpl	$1, %edi
	jle	.L53
	cmpl	$7, %edi
	jle	.L54
	movl	%eax, %ecx
	pxor	%xmm3, %xmm3
	pxor	%xmm6, %xmm6
	movslq	%eax, %rdx
	shrl	$2, %ecx
	leaq	0(%r13,%rdx,4), %rsi
	movdqa	%xmm3, %xmm2
	xorl	%edx, %edx
	salq	$4, %rcx
	.p2align 4,,10
	.p2align 3
.L15:
	movdqu	0(%r13,%rdx), %xmm1
	movdqa	%xmm6, %xmm5
	movdqu	(%rsi,%rdx), %xmm0
	addq	$16, %rdx
	pcmpgtd	%xmm1, %xmm5
	movdqa	%xmm1, %xmm4
	movdqa	%xmm0, %xmm7
	punpckldq	%xmm5, %xmm4
	punpckhdq	%xmm5, %xmm1
	psubq	%xmm4, %xmm2
	movdqa	%xmm6, %xmm4
	psubq	%xmm1, %xmm3
	pcmpgtd	%xmm0, %xmm4
	punpckldq	%xmm4, %xmm7
	punpckhdq	%xmm4, %xmm0
	paddq	%xmm7, %xmm2
	paddq	%xmm0, %xmm3
	cmpq	%rdx, %rcx
	jne	.L15
	paddq	%xmm3, %xmm2
	movl	%eax, %edx
	movdqa	%xmm2, %xmm0
	andl	$-4, %edx
	psrldq	$8, %xmm0
	paddq	%xmm0, %xmm2
	movq	%xmm2, %rcx
	testb	$3, %al
	je	.L13
.L14:
	movslq	%edx, %rsi
	leaq	0(%r13,%rsi,4), %r8
	movslq	(%r8), %rsi
	subq	%rsi, %rcx
	leal	(%rdx,%rax), %esi
	movslq	%esi, %rsi
	movslq	0(%r13,%rsi,4), %rsi
	addq	%rsi, %rcx
	leal	1(%rdx), %esi
	cmpl	%eax, %esi
	jge	.L13
	addl	%eax, %esi
	movslq	4(%r8), %r9
	addl	$2, %edx
	movslq	%esi, %rsi
	movslq	0(%r13,%rsi,4), %rsi
	subq	%r9, %rcx
	addq	%rsi, %rcx
	cmpl	%eax, %edx
	jge	.L13
	addl	%eax, %edx
	movslq	8(%r8), %rsi
	movslq	%edx, %rdx
	movslq	0(%r13,%rdx,4), %rdx
	subq	%rsi, %rcx
	addq	%rdx, %rcx
.L13:
	cmpl	$3, %edi
	jle	.L55
	leal	-1(%rax), %r8d
	cmpl	$9, %edi
	jle	.L56
	leal	1(%rax), %edx
	pxor	%xmm2, %xmm2
	pxor	%xmm6, %xmm6
	movl	%r8d, %esi
	movslq	%edx, %rdx
	shrl	$2, %esi
	movdqa	%xmm2, %xmm3
	leaq	0(%r13,%rdx,4), %rdi
	salq	$4, %rsi
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L20:
	movdqu	0(%r13,%rdx), %xmm1
	movdqa	%xmm6, %xmm5
	movdqu	(%rdi,%rdx), %xmm0
	addq	$16, %rdx
	pcmpgtd	%xmm1, %xmm5
	movdqa	%xmm1, %xmm4
	movdqa	%xmm0, %xmm7
	punpckldq	%xmm5, %xmm4
	punpckhdq	%xmm5, %xmm1
	psubq	%xmm4, %xmm3
	movdqa	%xmm6, %xmm4
	psubq	%xmm1, %xmm2
	pcmpgtd	%xmm0, %xmm4
	punpckldq	%xmm4, %xmm7
	punpckhdq	%xmm4, %xmm0
	paddq	%xmm7, %xmm3
	paddq	%xmm0, %xmm2
	cmpq	%rdx, %rsi
	jne	.L20
	paddq	%xmm3, %xmm2
	movl	%r8d, %esi
	movdqa	%xmm2, %xmm0
	andl	$-4, %esi
	psrldq	$8, %xmm0
	paddq	%xmm0, %xmm2
	movq	%xmm2, %rdx
	addq	%rdx, %rcx
	leal	1(%rsi), %edx
	cmpl	%r8d, %esi
	je	.L55
.L19:
	movslq	%edx, %rsi
	leaq	0(%r13,%rsi,4), %rdi
	movslq	-4(%rdi), %rsi
	subq	%rsi, %rcx
	leal	(%rax,%rdx), %esi
	movslq	%esi, %rsi
	movslq	0(%r13,%rsi,4), %rsi
	addq	%rsi, %rcx
	leal	1(%rdx), %esi
	cmpl	%esi, %eax
	jle	.L55
	addl	%eax, %esi
	movslq	(%rdi), %r8
	addl	$2, %edx
	movslq	%esi, %rsi
	movslq	0(%r13,%rsi,4), %rsi
	subq	%r8, %rcx
	addq	%rsi, %rcx
	cmpl	%eax, %edx
	jge	.L55
	addl	%eax, %edx
	movslq	4(%rdi), %rsi
	movslq	%edx, %rdx
	movslq	0(%r13,%rdx,4), %rax
	subq	%rsi, %rcx
	addq	%rax, %rcx
.L55:
	xorl	%edx, %edx
	jmp	.L18
.L12:
	leal	-1(%rax), %r8d
	testl	%r8d, %r8d
	jg	.L27
	jmp	.L28
.L77:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L7
.L53:
	xorl	%ecx, %ecx
	jmp	.L13
.L59:
	xorl	%edx, %edx
	jmp	.L38
.L60:
	xorl	%r8d, %r8d
	xorl	%edx, %edx
	jmp	.L39
.L61:
	movl	%eax, %esi
	jmp	.L44
.L54:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L14
.L56:
	movl	$1, %edx
	jmp	.L19
.L57:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L23
.L58:
	xorl	%edx, %edx
	jmp	.L29
.L78:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
long long llmax(long long a, long long b){return a>b?a:b;}
int assort(const void *a, const void *b){return *(int*)a-*(int*)b;}
int main(void){
    int n;
    long long tmp=0,ans=0;
    scanf("%d",&n);
    int a[n];
    for (int i=0; i<n; i++){
        scanf("%d",&a[i]);
    }
    qsort (a,n,sizeof(int),assort);
    if  (n%2==0){
        for(int i=0; i<n/2; i++){
            ans-=a[i];
            ans+=a[n/2+i];
        }
        for (int i=1; i<n/2; i++){
            ans-=a[i-1];
            ans+=a[n/2+i];
        }
    } else {
        for (int i=0; i<=n/2; i++){
            ans-=a[i];
        }
        for (int i=0; i<=n/2-2; i++){
            ans-=a[i];
        }
        for (int i=n/2+1; i<n; i++){
            ans+=a[i]*2;
        }
        for (int i=0; i<n/2; i++){
            tmp-=a[i]*2;
        }
        for (int i=n/2; i<n; i++){
            tmp+=a[i];
        }
        for (int i=n/2+2; i<n; i++){
            tmp+=a[i];
        }
    }
    printf("%lld\n",llmax(ans,tmp));
	return 0 ;
}
3
5
6
1
 6
6
1
4
1
5
9
 5
6
8
1
1
3
 3
5
3
1
 6
6
1
4
1
1
9
 5
6
4
1
1
3
 3
0
3
1
 6
6
1
7
1
1
9
 5
6
4
1
2
3
 3
0
0
1

9
 27
 22
 6
 29
 15
 5
 33
 13
 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 <math.h>
long long llmax(long long a, long long b){return a>b?a:b;}
int assort(const void *a, const void *b){return *(int*)a-*(int*)b;}
int main(void){
    int n;
    long long tmp=0,ans=0;
    scanf("%d",&n);
    int a[n];
    for (int i=0; i<n; i++){
        scanf("%d",&a[i]);
    }
    qsort (a,n,sizeof(int),assort);
    if  (n%2==0){
        for(int i=0; i<n/2; i++){
            ans-=a[i];
            ans+=a[n/2+i];
        }
        for (int i=1; i<n/2; i++){
            ans-=a[i-1];
            ans+=a[n/2+i];
        }
    } else {
        for (int i=0; i<=n/2; i++){
            ans-=a[i];
        }
        for (int i=0; i<=n/2-2; i++){
            ans-=a[i];
        }
        for (int i=n/2+1; i<n; i++){
            ans+=a[i]*2;
        }
        for (int i=0; i<n/2; i++){
            tmp-=a[i]*2;
        }
        for (int i=n/2; i<n; i++){
            tmp+=a[i];
        }
        for (int i=n/2+2; i<n; i++){
            tmp+=a[i];
        }
    }
    printf("%lld\n",llmax(ans,tmp));
	return 0 ;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	llmax
	.type	llmax, @function
llmax:
.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	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	llmax, .-llmax
	.globl	assort
	.type	assort, @function
assort:
.LFB7:
	.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
.LFE7:
	.size	assort, .-assort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-128(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -124(%rbp)
	jmp	.L9
.L10:
	movl	-124(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -124(%rbp)
.L9:
	movl	-128(%rbp), %eax
	cmpl	%eax, -124(%rbp)
	jl	.L10
	movl	-128(%rbp), %eax
	movslq	%eax, %rsi
	movq	-64(%rbp), %rax
	leaq	assort(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-128(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L11
	movl	$0, -120(%rbp)
	jmp	.L12
.L13:
	movq	-64(%rbp), %rax
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	subq	%rax, -80(%rbp)
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-120(%rbp), %eax
	addl	%eax, %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	addq	%rax, -80(%rbp)
	addl	$1, -120(%rbp)
.L12:
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -120(%rbp)
	jl	.L13
	movl	$1, -116(%rbp)
	jmp	.L14
.L15:
	movl	-116(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	subq	%rax, -80(%rbp)
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-116(%rbp), %eax
	addl	%eax, %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	addq	%rax, -80(%rbp)
	addl	$1, -116(%rbp)
.L14:
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -116(%rbp)
	jl	.L15
	jmp	.L16
.L11:
	movl	$0, -112(%rbp)
	jmp	.L17
.L18:
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	subq	%rax, -80(%rbp)
	addl	$1, -112(%rbp)
.L17:
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -112(%rbp)
	jle	.L18
	movl	$0, -108(%rbp)
	jmp	.L19
.L20:
	movq	-64(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	subq	%rax, -80(%rbp)
	addl	$1, -108(%rbp)
.L19:
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	subl	$1, %eax
	cmpl	%eax, -108(%rbp)
	jl	.L20
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	addl	$1, %eax
	movl	%eax, -104(%rbp)
	jmp	.L21
.L22:
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, %eax
	cltq
	addq	%rax, -80(%rbp)
	addl	$1, -104(%rbp)
.L21:
	movl	-128(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L22
	movl	$0, -100(%rbp)
	jmp	.L23
.L24:
	movq	-64(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, %eax
	cltq
	subq	%rax, -88(%rbp)
	addl	$1, -100(%rbp)
.L23:
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -100(%rbp)
	jl	.L24
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -96(%rbp)
	jmp	.L25
.L26:
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	addq	%rax, -88(%rbp)
	addl	$1, -96(%rbp)
.L25:
	movl	-128(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L26
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	addl	$2, %eax
	movl	%eax, -92(%rbp)
	jmp	.L27
.L28:
	movq	-64(%rbp), %rax
	movl	-92(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	addq	%rax, -88(%rbp)
	addl	$1, -92(%rbp)
.L27:
	movl	-128(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L28
.L16:
	movq	-88(%rbp), %rdx
	movq	-80(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	llmax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	llmax
	.type	llmax, @function
llmax:
.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	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	llmax, .-llmax
	.globl	assort
	.type	assort, @function
assort:
.LFB7:
	.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
.LFE7:
	.size	assort, .-assort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-128(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -124(%rbp)
	jmp	.L9
.L10:
	movl	-124(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -124(%rbp)
.L9:
	movl	-128(%rbp), %eax
	cmpl	%eax, -124(%rbp)
	jl	.L10
	movl	-128(%rbp), %eax
	movslq	%eax, %rsi
	movq	-64(%rbp), %rax
	leaq	assort(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-128(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L11
	movl	$0, -120(%rbp)
	jmp	.L12
.L13:
	movq	-64(%rbp), %rax
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	subq	%rax, -80(%rbp)
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-120(%rbp), %eax
	addl	%eax, %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	addq	%rax, -80(%rbp)
	addl	$1, -120(%rbp)
.L12:
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -120(%rbp)
	jl	.L13
	movl	$1, -116(%rbp)
	jmp	.L14
.L15:
	movl	-116(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	subq	%rax, -80(%rbp)
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-116(%rbp), %eax
	addl	%eax, %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	addq	%rax, -80(%rbp)
	addl	$1, -116(%rbp)
.L14:
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -116(%rbp)
	jl	.L15
	jmp	.L16
.L11:
	movl	$0, -112(%rbp)
	jmp	.L17
.L18:
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	subq	%rax, -80(%rbp)
	addl	$1, -112(%rbp)
.L17:
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -112(%rbp)
	jle	.L18
	movl	$0, -108(%rbp)
	jmp	.L19
.L20:
	movq	-64(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	subq	%rax, -80(%rbp)
	addl	$1, -108(%rbp)
.L19:
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	subl	$1, %eax
	cmpl	%eax, -108(%rbp)
	jl	.L20
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	addl	$1, %eax
	movl	%eax, -104(%rbp)
	jmp	.L21
.L22:
	movq	-64(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, %eax
	cltq
	addq	%rax, -80(%rbp)
	addl	$1, -104(%rbp)
.L21:
	movl	-128(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L22
	movl	$0, -100(%rbp)
	jmp	.L23
.L24:
	movq	-64(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, %eax
	cltq
	subq	%rax, -88(%rbp)
	addl	$1, -100(%rbp)
.L23:
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cmpl	%eax, -100(%rbp)
	jl	.L24
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -96(%rbp)
	jmp	.L25
.L26:
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	addq	%rax, -88(%rbp)
	addl	$1, -96(%rbp)
.L25:
	movl	-128(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L26
	movl	-128(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	addl	$2, %eax
	movl	%eax, -92(%rbp)
	jmp	.L27
.L28:
	movq	-64(%rbp), %rax
	movl	-92(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	addq	%rax, -88(%rbp)
	addl	$1, -92(%rbp)
.L27:
	movl	-128(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L28
.L16:
	movq	-88(%rbp), %rdx
	movq	-80(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	llmax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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:
