Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
#define bit(n,m)((n>>m)&1)
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
int downll(const void*a, const void*b){return*(ll*)a<*(ll*)b?1:*(ll*)a>*(ll*)b?-1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}
void sortdown(ll*a,int n){qsort(a,n,sizeof(ll),downll);}

ll n;
ll a[200010];
ll s[200010];
#define kukan(l,r)(s[r]-s[l])

ll bs(ll l,ll r,ll sum){
	//[l,m)の和がsum以下となる最大のmを返す
	ll ok=l,ng=r;
	while(ng-ok>1){
		ll m=(ok+ng)/2;
		if(kukan(l,m)>sum)ng=m;
		else ok=m;
	}
	return ok;
}

ll ans=INF;
int main(){
	scanf("%lld",&n);
	rep(i,0,n)scanf("%lld",a+i);
	rep(i,0,n)s[i+1]=s[i]+a[i];
	rep(i2,2,n-1){
		ll i1=bs(0,i2,kukan(0,i2)/2);
		if(i2-i1>=2&&kukan(0,i1)<kukan(i1+1,i2))i1++;
		ll i3=bs(i2,n,kukan(i2,n)/2);
		if(n-i3>=2&&kukan(i2,i3)<kukan(i3+1,n))i3++;
		ll tmax=max(max(max(kukan(0,i1),kukan(i1,i2)),kukan(i2,i3)),kukan(i3,n));
		ll tmin=min(min(min(kukan(0,i1),kukan(i1,i2)),kukan(i2,i3)),kukan(i3,n));
		ans=min(ans,tmax-tmin);
//		printf("%lld %lld %lld ",i1,i2,i3);
//		printf("%lld %lld %lld %lld ",kukan(0,i1),kukan(i1,i2),kukan(i2,i3),kukan(i3,n));
//		printf("%lld %lld\n",tmax,tmin);
	}
	printf("%lld\n",ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	upll
	.type	upll, @function
upll:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L2
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upll, .-upll
	.globl	downll
	.type	downll, @function
downll:
.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L6
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L7
	movl	$-1, %eax
	jmp	.L10
.L7:
	movl	$0, %eax
	jmp	.L10
.L6:
	movl	$1, %eax
.L10:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	downll, .-downll
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	sortup, .-sortup
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	downll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	sortdown, .-sortdown
	.globl	n
	.bss
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1600080
a:
	.zero	1600080
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 1600080
s:
	.zero	1600080
	.text
	.globl	bs
	.type	bs, @function
bs:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	-40(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, -16(%rbp)
	jmp	.L14
.L16:
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-40(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	cmpq	%rax, -56(%rbp)
	jge	.L15
	movq	-8(%rbp), %rax
	movq	%rax, -16(%rbp)
	jmp	.L14
.L15:
	movq	-8(%rbp), %rax
	movq	%rax, -24(%rbp)
.L14:
	movq	-16(%rbp), %rax
	subq	-24(%rbp), %rax
	cmpq	$1, %rax
	jg	.L16
	movq	-24(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	bs, .-bs
	.globl	ans
	.data
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.quad	4611686016279904256
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -56(%rbp)
	jmp	.L19
.L20:
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -56(%rbp)
.L19:
	movq	n(%rip), %rax
	cmpq	%rax, -56(%rbp)
	jl	.L20
	movq	$0, -48(%rbp)
	jmp	.L21
.L22:
	movq	-48(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movq	-48(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-48(%rbp), %rax
	addq	$1, %rax
	addq	%rdx, %rcx
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addq	$1, -48(%rbp)
.L21:
	movq	n(%rip), %rax
	cmpq	%rax, -48(%rbp)
	jl	.L22
	movq	$2, -40(%rbp)
	jmp	.L23
.L26:
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	s(%rip), %rdx
	subq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	bs
	movq	%rax, -32(%rbp)
	movq	-40(%rbp), %rax
	subq	-32(%rbp), %rax
	cmpq	$1, %rax
	jle	.L24
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	s(%rip), %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-32(%rbp), %rdx
	addq	$1, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	cmpq	%rax, %rsi
	jge	.L24
	addq	$1, -32(%rbp)
.L24:
	movq	n(%rip), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-40(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movq	n(%rip), %rcx
	movq	-40(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	bs
	movq	%rax, -24(%rbp)
	movq	n(%rip), %rax
	subq	-24(%rbp), %rax
	cmpq	$1, %rax
	jle	.L25
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-40(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	movq	n(%rip), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-24(%rbp), %rdx
	addq	$1, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	cmpq	%rax, %rsi
	jge	.L25
	addq	$1, -24(%rbp)
.L25:
	movq	n(%rip), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-24(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	s(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	-40(%rbp), %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	s(%rip), %rcx
	movq	(%rsi,%rcx), %rsi
	subq	%rsi, %rax
	movq	%rax, %rcx
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rsi
	leaq	s(%rip), %rax
	movq	(%rsi,%rax), %rax
	movq	-32(%rbp), %rsi
	leaq	0(,%rsi,8), %rdi
	leaq	s(%rip), %rsi
	movq	(%rdi,%rsi), %rdi
	subq	%rdi, %rax
	movq	%rax, %rsi
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdi
	leaq	s(%rip), %rax
	movq	(%rdi,%rax), %rax
	movq	s(%rip), %rdi
	subq	%rdi, %rax
	cmpq	%rax, %rsi
	cmovge	%rsi, %rax
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	n(%rip), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-24(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	s(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	-40(%rbp), %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	s(%rip), %rcx
	movq	(%rsi,%rcx), %rsi
	subq	%rsi, %rax
	movq	%rax, %rcx
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rsi
	leaq	s(%rip), %rax
	movq	(%rsi,%rax), %rax
	movq	-32(%rbp), %rsi
	leaq	0(,%rsi,8), %rdi
	leaq	s(%rip), %rsi
	movq	(%rdi,%rsi), %rdi
	subq	%rdi, %rax
	movq	%rax, %rsi
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdi
	leaq	s(%rip), %rax
	movq	(%rdi,%rax), %rax
	movq	s(%rip), %rdi
	subq	%rdi, %rax
	cmpq	%rax, %rsi
	cmovle	%rsi, %rax
	cmpq	%rax, %rcx
	cmovle	%rcx, %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	subq	-8(%rbp), %rax
	movq	%rax, %rdx
	movq	ans(%rip), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, ans(%rip)
	addq	$1, -40(%rbp)
.L23:
	movq	n(%rip), %rax
	subq	$1, %rax
	cmpq	%rax, -40(%rbp)
	jl	.L26
	movq	ans(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	upll
	.type	upll, @function
upll:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	upll, .-upll
	.p2align 4
	.globl	downll
	.type	downll, @function
downll:
.LFB52:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jl	.L5
	setg	%al
	movzbl	%al, %eax
	negl	%eax
.L5:
	ret
	.cfi_endproc
.LFE52:
	.size	downll, .-downll
	.p2align 4
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB53:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE53:
	.size	sortup, .-sortup
	.p2align 4
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.LFB54:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	downll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE54:
	.size	sortdown, .-sortdown
	.p2align 4
	.globl	bs
	.type	bs, @function
bs:
.LFB55:
	.cfi_startproc
	endbr64
	movq	%rdi, %r8
	leaq	s(%rip), %r9
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L13:
	leaq	(%rsi,%r8), %rcx
	movq	%rcx, %rax
	shrq	$63, %rax
	addq	%rcx, %rax
	sarq	%rax
	movq	(%r9,%rax,8), %rcx
	subq	(%r9,%rdi,8), %rcx
	cmpq	%rdx, %rcx
	cmovle	%rax, %r8
	cmovg	%rax, %rsi
.L12:
	movq	%rsi, %rax
	subq	%r8, %rax
	cmpq	$1, %rax
	jg	.L13
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE55:
	.size	bs, .-bs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__isoc99_scanf@PLT
	movq	n(%rip), %r12
	testq	%r12, %r12
	jle	.L16
	leaq	a(%rip), %rbp
	xorl	%ebx, %ebx
	movq	%rbp, %r12
	.p2align 4,,10
	.p2align 3
.L17:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	n(%rip), %rax
	addq	$8, %r12
	cmpq	%rbx, %rax
	jg	.L17
	testq	%rax, %rax
	jle	.L33
	movq	s(%rip), %rdx
	xorl	%r12d, %r12d
	leaq	s(%rip), %r9
	.p2align 4,,10
	.p2align 3
.L18:
	movq	0(%rbp,%r12,8), %rcx
	addq	$1, %r12
	addq	%rcx, %rdx
	movq	%rdx, (%r9,%r12,8)
	cmpq	%r12, %rax
	jne	.L18
.L16:
	leaq	-1(%r12), %rax
	movq	ans(%rip), %r15
	movq	%rax, 8(%rsp)
	cmpq	$2, %rax
	jle	.L19
	leaq	s(%rip), %r9
	movq	s(%rip), %rbx
	movl	$2, %r13d
	movq	(%r9,%r12,8), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L32:
	movq	(%r9,%r13,8), %r11
	movq	%rbx, %rcx
	movq	%r13, %rdi
	xorl	%esi, %esi
	movq	%r11, %rax
	subq	%rbx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	sarq	%rdx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L22:
	leaq	(%rdi,%rsi), %r8
	movq	%r8, %rax
	shrq	$63, %rax
	addq	%r8, %rax
	sarq	%rax
	movq	(%r9,%rax,8), %r10
	movq	%r10, %r8
	subq	%rbx, %r8
	cmpq	%r8, %rdx
	cmovge	%r10, %rcx
	cmovge	%rax, %rsi
	cmovl	%rax, %rdi
.L21:
	movq	%rdi, %rax
	subq	%rsi, %rax
	cmpq	$1, %rax
	jg	.L22
	movq	%r13, %rax
	movq	%rcx, %r14
	subq	%rsi, %rax
	subq	%rbx, %r14
	cmpq	$1, %rax
	jle	.L40
	movq	8(%r9,%rsi,8), %rax
	movq	%r11, %rbp
	subq	%rax, %rbp
	cmpq	%r14, %rbp
	jle	.L40
	subq	%rbx, %rax
	movq	%rax, %r14
.L24:
	movq	(%rsp), %rax
	movq	%r11, %r10
	movq	%r12, %rdi
	movq	%r13, %rsi
	subq	%r11, %rax
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rax, %rcx
	sarq	%rcx
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L28:
	leaq	(%rdi,%rsi), %rdx
	movq	%rdx, %rax
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	movq	(%r9,%rax,8), %r8
	movq	%r8, %rdx
	subq	%r11, %rdx
	cmpq	%rdx, %rcx
	cmovge	%r8, %r10
	cmovge	%rax, %rsi
	cmovl	%rax, %rdi
.L27:
	movq	%rdi, %rax
	subq	%rsi, %rax
	cmpq	$1, %rax
	jg	.L28
	movq	(%rsp), %rcx
	movq	%r12, %rax
	movq	%r10, %rdx
	subq	%rsi, %rax
	subq	%r11, %rdx
	subq	%r10, %rcx
	cmpq	$1, %rax
	jle	.L30
	movq	(%rsp), %rdi
	movq	8(%r9,%rsi,8), %rax
	movq	%rdi, %rcx
	subq	%rax, %rcx
	cmpq	%rdx, %rcx
	jg	.L31
	movq	%rdi, %rcx
	subq	%r10, %rcx
.L30:
	cmpq	%r14, %rbp
	movq	%r14, %rax
	cmovge	%rbp, %rax
	cmpq	%rcx, %rax
	cmovl	%rcx, %rax
	cmpq	%rdx, %rax
	cmovl	%rdx, %rax
	cmpq	%r14, %rbp
	cmovg	%r14, %rbp
	cmpq	%rcx, %rbp
	cmovg	%rcx, %rbp
	cmpq	%rdx, %rbp
	cmovg	%rdx, %rbp
	subq	%rbp, %rax
	cmpq	%rax, %r15
	cmovg	%rax, %r15
	addq	$1, %r13
	cmpq	8(%rsp), %r13
	jne	.L32
	movq	%r15, ans(%rip)
.L19:
	movq	%r15, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L40:
	.cfi_restore_state
	movq	%r11, %rbp
	subq	%rcx, %rbp
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L31:
	subq	%r11, %rax
	movq	%rax, %rdx
	jmp	.L30
.L33:
	movq	%rax, %r12
	jmp	.L16
	.cfi_endproc
.LFE56:
	.size	main, .-main
	.globl	ans
	.data
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.quad	4611686016279904256
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 1600080
s:
	.zero	1600080
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1600080
a:
	.zero	1600080
	.globl	n
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.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	upll
	.type	upll, @function
upll:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	upll, .-upll
	.p2align 4
	.globl	downll
	.type	downll, @function
downll:
.LFB52:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jl	.L5
	setg	%al
	movzbl	%al, %eax
	negl	%eax
.L5:
	ret
	.cfi_endproc
.LFE52:
	.size	downll, .-downll
	.p2align 4
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB53:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE53:
	.size	sortup, .-sortup
	.p2align 4
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.LFB54:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	downll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE54:
	.size	sortdown, .-sortdown
	.p2align 4
	.globl	bs
	.type	bs, @function
bs:
.LFB55:
	.cfi_startproc
	endbr64
	movq	%rdi, %r8
	leaq	s(%rip), %r9
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L13:
	leaq	(%rsi,%r8), %rcx
	movq	%rcx, %rax
	shrq	$63, %rax
	addq	%rcx, %rax
	sarq	%rax
	movq	(%r9,%rax,8), %rcx
	subq	(%r9,%rdi,8), %rcx
	cmpq	%rdx, %rcx
	cmovle	%rax, %r8
	cmovg	%rax, %rsi
.L12:
	movq	%rsi, %rax
	subq	%r8, %rax
	cmpq	$1, %rax
	jg	.L13
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE55:
	.size	bs, .-bs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__isoc99_scanf@PLT
	movq	n(%rip), %r12
	testq	%r12, %r12
	jle	.L16
	leaq	a(%rip), %rbp
	xorl	%ebx, %ebx
	movq	%rbp, %r12
	.p2align 4,,10
	.p2align 3
.L17:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	n(%rip), %rax
	addq	$8, %r12
	cmpq	%rbx, %rax
	jg	.L17
	testq	%rax, %rax
	jle	.L33
	movq	s(%rip), %rdx
	xorl	%r12d, %r12d
	leaq	s(%rip), %r9
	.p2align 4,,10
	.p2align 3
.L18:
	movq	0(%rbp,%r12,8), %rcx
	addq	$1, %r12
	addq	%rcx, %rdx
	movq	%rdx, (%r9,%r12,8)
	cmpq	%r12, %rax
	jne	.L18
.L16:
	leaq	-1(%r12), %rax
	movq	ans(%rip), %r15
	movq	%rax, 8(%rsp)
	cmpq	$2, %rax
	jle	.L19
	leaq	s(%rip), %r9
	movq	s(%rip), %rbx
	movl	$2, %r13d
	movq	(%r9,%r12,8), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L32:
	movq	(%r9,%r13,8), %r11
	movq	%rbx, %rcx
	movq	%r13, %rdi
	xorl	%esi, %esi
	movq	%r11, %rax
	subq	%rbx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	sarq	%rdx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L22:
	leaq	(%rdi,%rsi), %r8
	movq	%r8, %rax
	shrq	$63, %rax
	addq	%r8, %rax
	sarq	%rax
	movq	(%r9,%rax,8), %r10
	movq	%r10, %r8
	subq	%rbx, %r8
	cmpq	%r8, %rdx
	cmovge	%r10, %rcx
	cmovge	%rax, %rsi
	cmovl	%rax, %rdi
.L21:
	movq	%rdi, %rax
	subq	%rsi, %rax
	cmpq	$1, %rax
	jg	.L22
	movq	%r13, %rax
	movq	%rcx, %r14
	subq	%rsi, %rax
	subq	%rbx, %r14
	cmpq	$1, %rax
	jle	.L40
	movq	8(%r9,%rsi,8), %rax
	movq	%r11, %rbp
	subq	%rax, %rbp
	cmpq	%r14, %rbp
	jle	.L40
	subq	%rbx, %rax
	movq	%rax, %r14
.L24:
	movq	(%rsp), %rax
	movq	%r11, %r10
	movq	%r12, %rdi
	movq	%r13, %rsi
	subq	%r11, %rax
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rax, %rcx
	sarq	%rcx
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L28:
	leaq	(%rdi,%rsi), %rdx
	movq	%rdx, %rax
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	movq	(%r9,%rax,8), %r8
	movq	%r8, %rdx
	subq	%r11, %rdx
	cmpq	%rdx, %rcx
	cmovge	%r8, %r10
	cmovge	%rax, %rsi
	cmovl	%rax, %rdi
.L27:
	movq	%rdi, %rax
	subq	%rsi, %rax
	cmpq	$1, %rax
	jg	.L28
	movq	(%rsp), %rcx
	movq	%r12, %rax
	movq	%r10, %rdx
	subq	%rsi, %rax
	subq	%r11, %rdx
	subq	%r10, %rcx
	cmpq	$1, %rax
	jle	.L30
	movq	(%rsp), %rdi
	movq	8(%r9,%rsi,8), %rax
	movq	%rdi, %rcx
	subq	%rax, %rcx
	cmpq	%rdx, %rcx
	jg	.L31
	movq	%rdi, %rcx
	subq	%r10, %rcx
.L30:
	cmpq	%r14, %rbp
	movq	%r14, %rax
	cmovge	%rbp, %rax
	cmpq	%rcx, %rax
	cmovl	%rcx, %rax
	cmpq	%rdx, %rax
	cmovl	%rdx, %rax
	cmpq	%r14, %rbp
	cmovg	%r14, %rbp
	cmpq	%rcx, %rbp
	cmovg	%rcx, %rbp
	cmpq	%rdx, %rbp
	cmovg	%rdx, %rbp
	subq	%rbp, %rax
	cmpq	%rax, %r15
	cmovg	%rax, %r15
	addq	$1, %r13
	cmpq	8(%rsp), %r13
	jne	.L32
	movq	%r15, ans(%rip)
.L19:
	movq	%r15, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L40:
	.cfi_restore_state
	movq	%r11, %rbp
	subq	%rcx, %rbp
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L31:
	subq	%r11, %rax
	movq	%rax, %rdx
	jmp	.L30
.L33:
	movq	%rax, %r12
	jmp	.L16
	.cfi_endproc
.LFE56:
	.size	main, .-main
	.globl	ans
	.data
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.quad	4611686016279904256
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 1600080
s:
	.zero	1600080
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1600080
a:
	.zero	1600080
	.globl	n
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
#define bit(n,m)((n>>m)&1)
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
int downll(const void*a, const void*b){return*(ll*)a<*(ll*)b?1:*(ll*)a>*(ll*)b?-1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}
void sortdown(ll*a,int n){qsort(a,n,sizeof(ll),downll);}

ll n;
ll a[200010];
ll s[200010];
#define kukan(l,r)(s[r]-s[l])

ll bs(ll l,ll r,ll sum){
	//[l,m)の和がsum以下となる最大のmを返す
	ll ok=l,ng=r;
	while(ng-ok>1){
		ll m=(ok+ng)/2;
		if(kukan(l,m)>sum)ng=m;
		else ok=m;
	}
	return ok;
}

ll ans=INF;
int main(){
	scanf("%lld",&n);
	rep(i,0,n)scanf("%lld",a+i);
	rep(i,0,n)s[i+1]=s[i]+a[i];
	rep(i2,2,n-1){
		ll i1=bs(0,i2,kukan(0,i2)/2);
		if(i2-i1>=2&&kukan(0,i1)<kukan(i1+1,i2))i1++;
		ll i3=bs(i2,n,kukan(i2,n)/2);
		if(n-i3>=2&&kukan(i2,i3)<kukan(i3+1,n))i3++;
		ll tmax=max(max(max(kukan(0,i1),kukan(i1,i2)),kukan(i2,i3)),kukan(i3,n));
		ll tmin=min(min(min(kukan(0,i1),kukan(i1,i2)),kukan(i2,i3)),kukan(i3,n));
		ans=min(ans,tmax-tmin);
//		printf("%lld %lld %lld ",i1,i2,i3);
//		printf("%lld %lld %lld %lld ",kukan(0,i1),kukan(i1,i2),kukan(i2,i3),kukan(i3,n));
//		printf("%lld %lld\n",tmax,tmin);
	}
	printf("%lld\n",ans);
	return 0;
}
10
10 71 113 33 6 47 23 25 52 64
 7
1 2 3 1100000000 4 5 6
 5
3 2 4 2 2
 10
10 102 113 33 6 47 23 25 52 64
 7
1 2 3 1100000000 4 5 2
 10
10 102 113 60 6 47 23 25 52 64
 5
5 2 4 2 1
 10
10 102 113 60 6 47 23 25 52 118
 7
1 2 3 1100000000 1 20 2
 5
4 3 4 2 1

53
 1099999994
 2
 22
 1099999996
 29
 3
 58
 1099999997
 1

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
#define bit(n,m)((n>>m)&1)
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
int downll(const void*a, const void*b){return*(ll*)a<*(ll*)b?1:*(ll*)a>*(ll*)b?-1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}
void sortdown(ll*a,int n){qsort(a,n,sizeof(ll),downll);}

ll n;
ll a[200010];
ll s[200010];
#define kukan(l,r)(s[r]-s[l])

ll bs(ll l,ll r,ll sum){
	//[l,m)の和がsum以下となる最大のmを返す
	ll ok=l,ng=r;
	while(ng-ok>1){
		ll m=(ok+ng)/2;
		if(kukan(l,m)>sum)ng=m;
		else ok=m;
	}
	return ok;
}

ll ans=INF;
int main(){
	scanf("%lld",&n);
	rep(i,0,n)scanf("%lld",a+i);
	rep(i,0,n)s[i+1]=s[i]+a[i];
	rep(i2,2,n-1){
		ll i1=bs(0,i2,kukan(0,i2)/2);
		if(i2-i1>=2&&kukan(0,i1)<kukan(i1+1,i2))i1++;
		ll i3=bs(i2,n,kukan(i2,n)/2);
		if(n-i3>=2&&kukan(i2,i3)<kukan(i3+1,n))i3++;
		ll tmax=max(max(max(kukan(0,i1),kukan(i1,i2)),kukan(i2,i3)),kukan(i3,n));
		ll tmin=min(min(min(kukan(0,i1),kukan(i1,i2)),kukan(i2,i3)),kukan(i3,n));
		ans=min(ans,tmax-tmin);
//		printf("%lld %lld %lld ",i1,i2,i3);
//		printf("%lld %lld %lld %lld ",kukan(0,i1),kukan(i1,i2),kukan(i2,i3),kukan(i3,n));
//		printf("%lld %lld\n",tmax,tmin);
	}
	printf("%lld\n",ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	upll
	.type	upll, @function
upll:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L2
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upll, .-upll
	.globl	downll
	.type	downll, @function
downll:
.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L6
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L7
	movl	$-1, %eax
	jmp	.L10
.L7:
	movl	$0, %eax
	jmp	.L10
.L6:
	movl	$1, %eax
.L10:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	downll, .-downll
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	sortup, .-sortup
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	downll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	sortdown, .-sortdown
	.globl	n
	.bss
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1600080
a:
	.zero	1600080
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 1600080
s:
	.zero	1600080
	.text
	.globl	bs
	.type	bs, @function
bs:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	-40(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, -16(%rbp)
	jmp	.L14
.L16:
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-40(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	cmpq	%rax, -56(%rbp)
	jge	.L15
	movq	-8(%rbp), %rax
	movq	%rax, -16(%rbp)
	jmp	.L14
.L15:
	movq	-8(%rbp), %rax
	movq	%rax, -24(%rbp)
.L14:
	movq	-16(%rbp), %rax
	subq	-24(%rbp), %rax
	cmpq	$1, %rax
	jg	.L16
	movq	-24(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	bs, .-bs
	.globl	ans
	.data
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.quad	4611686016279904256
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -56(%rbp)
	jmp	.L19
.L20:
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -56(%rbp)
.L19:
	movq	n(%rip), %rax
	cmpq	%rax, -56(%rbp)
	jl	.L20
	movq	$0, -48(%rbp)
	jmp	.L21
.L22:
	movq	-48(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movq	-48(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-48(%rbp), %rax
	addq	$1, %rax
	addq	%rdx, %rcx
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addq	$1, -48(%rbp)
.L21:
	movq	n(%rip), %rax
	cmpq	%rax, -48(%rbp)
	jl	.L22
	movq	$2, -40(%rbp)
	jmp	.L23
.L26:
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	s(%rip), %rdx
	subq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	bs
	movq	%rax, -32(%rbp)
	movq	-40(%rbp), %rax
	subq	-32(%rbp), %rax
	cmpq	$1, %rax
	jle	.L24
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	s(%rip), %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-32(%rbp), %rdx
	addq	$1, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	cmpq	%rax, %rsi
	jge	.L24
	addq	$1, -32(%rbp)
.L24:
	movq	n(%rip), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-40(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movq	n(%rip), %rcx
	movq	-40(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	bs
	movq	%rax, -24(%rbp)
	movq	n(%rip), %rax
	subq	-24(%rbp), %rax
	cmpq	$1, %rax
	jle	.L25
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-40(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	movq	n(%rip), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-24(%rbp), %rdx
	addq	$1, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	cmpq	%rax, %rsi
	jge	.L25
	addq	$1, -24(%rbp)
.L25:
	movq	n(%rip), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-24(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	s(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	-40(%rbp), %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	s(%rip), %rcx
	movq	(%rsi,%rcx), %rsi
	subq	%rsi, %rax
	movq	%rax, %rcx
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rsi
	leaq	s(%rip), %rax
	movq	(%rsi,%rax), %rax
	movq	-32(%rbp), %rsi
	leaq	0(,%rsi,8), %rdi
	leaq	s(%rip), %rsi
	movq	(%rdi,%rsi), %rdi
	subq	%rdi, %rax
	movq	%rax, %rsi
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdi
	leaq	s(%rip), %rax
	movq	(%rdi,%rax), %rax
	movq	s(%rip), %rdi
	subq	%rdi, %rax
	cmpq	%rax, %rsi
	cmovge	%rsi, %rax
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	n(%rip), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-24(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	s(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	-40(%rbp), %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	s(%rip), %rcx
	movq	(%rsi,%rcx), %rsi
	subq	%rsi, %rax
	movq	%rax, %rcx
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rsi
	leaq	s(%rip), %rax
	movq	(%rsi,%rax), %rax
	movq	-32(%rbp), %rsi
	leaq	0(,%rsi,8), %rdi
	leaq	s(%rip), %rsi
	movq	(%rdi,%rsi), %rdi
	subq	%rdi, %rax
	movq	%rax, %rsi
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdi
	leaq	s(%rip), %rax
	movq	(%rdi,%rax), %rax
	movq	s(%rip), %rdi
	subq	%rdi, %rax
	cmpq	%rax, %rsi
	cmovle	%rsi, %rax
	cmpq	%rax, %rcx
	cmovle	%rcx, %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	subq	-8(%rbp), %rax
	movq	%rax, %rdx
	movq	ans(%rip), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, ans(%rip)
	addq	$1, -40(%rbp)
.L23:
	movq	n(%rip), %rax
	subq	$1, %rax
	cmpq	%rax, -40(%rbp)
	jl	.L26
	movq	ans(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	upll
	.type	upll, @function
upll:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L2
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upll, .-upll
	.globl	downll
	.type	downll, @function
downll:
.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L6
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L7
	movl	$-1, %eax
	jmp	.L10
.L7:
	movl	$0, %eax
	jmp	.L10
.L6:
	movl	$1, %eax
.L10:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	downll, .-downll
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	sortup, .-sortup
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	downll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	sortdown, .-sortdown
	.globl	n
	.bss
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 1600080
a:
	.zero	1600080
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 1600080
s:
	.zero	1600080
	.text
	.globl	bs
	.type	bs, @function
bs:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	-40(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, -16(%rbp)
	jmp	.L14
.L16:
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-40(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	cmpq	%rax, -56(%rbp)
	jge	.L15
	movq	-8(%rbp), %rax
	movq	%rax, -16(%rbp)
	jmp	.L14
.L15:
	movq	-8(%rbp), %rax
	movq	%rax, -24(%rbp)
.L14:
	movq	-16(%rbp), %rax
	subq	-24(%rbp), %rax
	cmpq	$1, %rax
	jg	.L16
	movq	-24(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	bs, .-bs
	.globl	ans
	.data
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.quad	4611686016279904256
	.section	.rodata
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -56(%rbp)
	jmp	.L19
.L20:
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -56(%rbp)
.L19:
	movq	n(%rip), %rax
	cmpq	%rax, -56(%rbp)
	jl	.L20
	movq	$0, -48(%rbp)
	jmp	.L21
.L22:
	movq	-48(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movq	-48(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-48(%rbp), %rax
	addq	$1, %rax
	addq	%rdx, %rcx
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addq	$1, -48(%rbp)
.L21:
	movq	n(%rip), %rax
	cmpq	%rax, -48(%rbp)
	jl	.L22
	movq	$2, -40(%rbp)
	jmp	.L23
.L26:
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	s(%rip), %rdx
	subq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	bs
	movq	%rax, -32(%rbp)
	movq	-40(%rbp), %rax
	subq	-32(%rbp), %rax
	cmpq	$1, %rax
	jle	.L24
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	s(%rip), %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-32(%rbp), %rdx
	addq	$1, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	cmpq	%rax, %rsi
	jge	.L24
	addq	$1, -32(%rbp)
.L24:
	movq	n(%rip), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-40(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movq	n(%rip), %rcx
	movq	-40(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	bs
	movq	%rax, -24(%rbp)
	movq	n(%rip), %rax
	subq	-24(%rbp), %rax
	cmpq	$1, %rax
	jle	.L25
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-40(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	movq	n(%rip), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-24(%rbp), %rdx
	addq	$1, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	cmpq	%rax, %rsi
	jge	.L25
	addq	$1, -24(%rbp)
.L25:
	movq	n(%rip), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-24(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	s(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	-40(%rbp), %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	s(%rip), %rcx
	movq	(%rsi,%rcx), %rsi
	subq	%rsi, %rax
	movq	%rax, %rcx
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rsi
	leaq	s(%rip), %rax
	movq	(%rsi,%rax), %rax
	movq	-32(%rbp), %rsi
	leaq	0(,%rsi,8), %rdi
	leaq	s(%rip), %rsi
	movq	(%rdi,%rsi), %rdi
	subq	%rdi, %rax
	movq	%rax, %rsi
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdi
	leaq	s(%rip), %rax
	movq	(%rdi,%rax), %rax
	movq	s(%rip), %rdi
	subq	%rdi, %rax
	cmpq	%rax, %rsi
	cmovge	%rsi, %rax
	cmpq	%rax, %rcx
	cmovge	%rcx, %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	n(%rip), %rax
	leaq	0(,%rax,8), %rdx
	leaq	s(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-24(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	s(%rip), %rdx
	movq	(%rcx,%rdx), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	s(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	-40(%rbp), %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	s(%rip), %rcx
	movq	(%rsi,%rcx), %rsi
	subq	%rsi, %rax
	movq	%rax, %rcx
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rsi
	leaq	s(%rip), %rax
	movq	(%rsi,%rax), %rax
	movq	-32(%rbp), %rsi
	leaq	0(,%rsi,8), %rdi
	leaq	s(%rip), %rsi
	movq	(%rdi,%rsi), %rdi
	subq	%rdi, %rax
	movq	%rax, %rsi
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdi
	leaq	s(%rip), %rax
	movq	(%rdi,%rax), %rax
	movq	s(%rip), %rdi
	subq	%rdi, %rax
	cmpq	%rax, %rsi
	cmovle	%rsi, %rax
	cmpq	%rax, %rcx
	cmovle	%rcx, %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	subq	-8(%rbp), %rax
	movq	%rax, %rdx
	movq	ans(%rip), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, ans(%rip)
	addq	$1, -40(%rbp)
.L23:
	movq	n(%rip), %rax
	subq	$1, %rax
	cmpq	%rax, -40(%rbp)
	jl	.L26
	movq	ans(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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:
