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

```c
// Aizu Vol-3 0347: Maximization of Relational Expression
// 2017.8.27 bal4u@uu

#include <stdio.h>

#define MAX 1000
#define abs(a) ((a)>=0?(a):-(a))
typedef struct { int i, j, v; } T;
T max[MAX+3], min[MAX+3]; int nmax, nmin;
int a[MAX+3], N;

void first_nmax(int v, int i, int j)
{
	int ii, jj;

	for (ii = 0; ii < nmax; ii++) {
		if (v <= max[ii].v) continue;
		for (jj = nmax-1; jj >= ii; jj--) max[jj+1] = max[jj];
		if (nmax < N) nmax++;
		max[ii].i = i, max[ii].j = j, max[ii].v = v;
		return;
	}
	if (ii == nmax && nmax < N)	max[ii].i = i, max[ii].j = j, max[ii].v = v, nmax++;
}

void first_nmin(int v, int i, int j)
{
	int ii, jj;

	for (ii = 0; ii < nmin; ii++) {
		if (v >= min[ii].v) continue;
		for (jj = nmin-1; jj >= ii; jj--) min[jj+1] = min[jj];
		if (nmin < N) nmin++;
		min[ii].i = i, min[ii].j = j, min[ii].v = v;
		return;
	}
	if (ii == nmin && nmin < N)	min[ii].i = i, min[ii].j = j, min[ii].v = v, nmin++;
}

int main()
{
    int i, j;
    double x, y;

	//memset(max, 0, sizeof(max)), memset(min, 0, sizeof(min));
    scanf("%d", &N);
    for (i = 0; i < N; i++) scanf("%d", a + i);
	max[0].i = min[0].i, max[0].j = min[0].j = 1,
    max[0].v = a[0] + a[1], min[0].v = abs(a[0] - a[1]), nmax = nmin = 1;
    for (i = 2; i < N; i++) for (j = 0; j < i; j++) first_nmax(a[i] + a[j], i, j);
    for (i = 2; i < N; i++) for (j = 0; j < i; j++) first_nmin(abs(a[i] - a[j]), i, j);
    for (i = 0; i < N; i++) {
        if ((min[i].i != max[0].i && min[i].j != max[0].i) &&
            (min[i].i != max[0].j && min[i].j != max[0].j)) break;
	}
	x = (double)max[0].v / (double)min[i].v, x = abs(x);
	for (i = 0; i < N; i++) {
		if ((max[i].i != min[0].i && max[i].j != min[0].i) &&
            (max[i].i != min[0].j && max[i].j != min[0].j)) break;
	}
    y = (double)max[i].v / (double)min[0].v; y = abs(y);
	printf("%.8lf\n", x >= y ? x : y);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	max
	.bss
	.align 32
	.type	max, @object
	.size	max, 12036
max:
	.zero	12036
	.globl	min
	.align 32
	.type	min, @object
	.size	min, 12036
min:
	.zero	12036
	.globl	nmax
	.align 4
	.type	nmax, @object
	.size	nmax, 4
nmax:
	.zero	4
	.globl	nmin
	.align 4
	.type	nmin, @object
	.size	nmin, 4
nmin:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 4012
a:
	.zero	4012
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.text
	.globl	first_nmax
	.type	first_nmax, @function
first_nmax:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L2
.L9:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+max(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L11
	movl	nmax(%rip), %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L5
.L6:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	max(%rip), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movq	%rsi, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	movq	%rax, %rsi
	leaq	max(%rip), %rax
	movq	(%rsi,%rax), %rdi
	movq	%rdi, (%rcx,%rdx)
	movl	8(%rsi,%rax), %eax
	movl	%eax, 8(%rcx,%rdx)
	subl	$1, -4(%rbp)
.L5:
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L6
	movl	nmax(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jge	.L7
	movl	nmax(%rip), %eax
	addl	$1, %eax
	movl	%eax, nmax(%rip)
.L7:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	max(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+max(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+max(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L1
.L11:
	nop
	addl	$1, -8(%rbp)
.L2:
	movl	nmax(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L9
	movl	nmax(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L1
	movl	nmax(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jge	.L1
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	max(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+max(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+max(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	nmax(%rip), %eax
	addl	$1, %eax
	movl	%eax, nmax(%rip)
.L1:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	first_nmax, .-first_nmax
	.globl	first_nmin
	.type	first_nmin, @function
first_nmin:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L13
.L20:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+min(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L22
	movl	nmin(%rip), %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L16
.L17:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	min(%rip), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movq	%rsi, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	movq	%rax, %rsi
	leaq	min(%rip), %rax
	movq	(%rsi,%rax), %rdi
	movq	%rdi, (%rcx,%rdx)
	movl	8(%rsi,%rax), %eax
	movl	%eax, 8(%rcx,%rdx)
	subl	$1, -4(%rbp)
.L16:
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L17
	movl	nmin(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jge	.L18
	movl	nmin(%rip), %eax
	addl	$1, %eax
	movl	%eax, nmin(%rip)
.L18:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	min(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+min(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+min(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L12
.L22:
	nop
	addl	$1, -8(%rbp)
.L13:
	movl	nmin(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L20
	movl	nmin(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L12
	movl	nmin(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jge	.L12
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	min(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+min(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+min(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	nmin(%rip), %eax
	addl	$1, %eax
	movl	%eax, nmin(%rip)
.L12:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	first_nmin, .-first_nmin
	.section	.rodata
.LC0:
	.string	"%d"
.LC3:
	.string	"%.8lf\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -24(%rbp)
	jmp	.L24
.L25:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %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
	addl	$1, -24(%rbp)
.L24:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L25
	movl	min(%rip), %eax
	movl	%eax, max(%rip)
	movl	$1, 4+min(%rip)
	movl	4+min(%rip), %eax
	movl	%eax, 4+max(%rip)
	movl	a(%rip), %edx
	movl	4+a(%rip), %eax
	addl	%edx, %eax
	movl	%eax, 8+max(%rip)
	movl	a(%rip), %eax
	movl	4+a(%rip), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, 8+min(%rip)
	movl	$1, nmin(%rip)
	movl	nmin(%rip), %eax
	movl	%eax, nmax(%rip)
	movl	$2, -24(%rbp)
	jmp	.L26
.L29:
	movl	$0, -20(%rbp)
	jmp	.L27
.L28:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	first_nmax
	addl	$1, -20(%rbp)
.L27:
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L28
	addl	$1, -24(%rbp)
.L26:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L29
	movl	$2, -24(%rbp)
	jmp	.L30
.L33:
	movl	$0, -20(%rbp)
	jmp	.L31
.L32:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %ecx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	first_nmin
	addl	$1, -20(%rbp)
.L31:
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L32
	addl	$1, -24(%rbp)
.L30:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L33
	movl	$0, -24(%rbp)
	jmp	.L34
.L37:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	max(%rip), %eax
	cmpl	%eax, %edx
	je	.L35
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+min(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	max(%rip), %eax
	cmpl	%eax, %edx
	je	.L35
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	4+max(%rip), %eax
	cmpl	%eax, %edx
	je	.L35
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+min(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	4+max(%rip), %eax
	cmpl	%eax, %edx
	jne	.L58
.L35:
	addl	$1, -24(%rbp)
.L34:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L37
	jmp	.L36
.L58:
	nop
.L36:
	movl	8+max(%rip), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+min(%rip), %rax
	movl	(%rdx,%rax), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	-16(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jb	.L55
	movsd	-16(%rbp), %xmm0
	jmp	.L40
.L55:
	movsd	-16(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	xorpd	%xmm1, %xmm0
.L40:
	movsd	%xmm0, -16(%rbp)
	movl	$0, -24(%rbp)
	jmp	.L41
.L44:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	min(%rip), %eax
	cmpl	%eax, %edx
	je	.L42
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+max(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	min(%rip), %eax
	cmpl	%eax, %edx
	je	.L42
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	4+min(%rip), %eax
	cmpl	%eax, %edx
	je	.L42
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+max(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	4+min(%rip), %eax
	cmpl	%eax, %edx
	jne	.L59
.L42:
	addl	$1, -24(%rbp)
.L41:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L44
	jmp	.L43
.L59:
	nop
.L43:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+max(%rip), %rax
	movl	(%rdx,%rax), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	8+min(%rip), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -8(%rbp)
	movsd	-8(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jb	.L56
	movsd	-8(%rbp), %xmm0
	jmp	.L47
.L56:
	movsd	-8(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	xorpd	%xmm1, %xmm0
.L47:
	movsd	%xmm0, -8(%rbp)
	movsd	-16(%rbp), %xmm0
	comisd	-8(%rbp), %xmm0
	jb	.L57
	movq	-16(%rbp), %rax
	jmp	.L50
.L57:
	movq	-8(%rbp), %rax
.L50:
	movq	%rax, %xmm0
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC2:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.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	first_nmax
	.type	first_nmax, @function
first_nmax:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movd	%esi, %xmm0
	movd	%edx, %xmm1
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	punpckldq	%xmm1, %xmm0
	movl	%edi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	nmax(%rip), %ebp
	testl	%ebp, %ebp
	jle	.L2
	leaq	8+max(%rip), %rax
	xorl	%ebx, %ebx
.L4:
	cmpl	%r12d, (%rax)
	jge	.L13
	leal	-1(%rbp), %eax
	leaq	max(%rip), %r13
	cmpl	%ebx, %eax
	jl	.L6
	movl	%ebp, %eax
	movq	%xmm0, 8(%rsp)
	subl	%ebx, %eax
	leal	-1(%rax), %edx
	movslq	%ebp, %rax
	leaq	0(,%rdx,4), %rcx
	movq	%rdx, %rdi
	leaq	(%rax,%rax,2), %rax
	subq	%rcx, %rdi
	salq	$2, %rax
	leaq	3(%rdx,%rdx,2), %rdx
	salq	$2, %rdi
	salq	$2, %rdx
	leaq	-12(%rax,%rdi), %rsi
	addq	%rax, %rdi
	addq	%r13, %rsi
	addq	%r13, %rdi
	call	memmove@PLT
	movq	8(%rsp), %xmm0
.L6:
	cmpl	%ebp, N(%rip)
	jg	.L14
.L7:
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,2), %rax
	salq	$2, %rax
	movl	%r12d, 8(%r13,%rax)
	movq	%xmm0, 0(%r13,%rax)
.L1:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	addl	$1, %ebp
	movl	%ebp, nmax(%rip)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L13:
	addl	$1, %ebx
	addq	$12, %rax
	cmpl	%ebx, %ebp
	jne	.L4
.L5:
	cmpl	%ebp, N(%rip)
	jle	.L1
	movslq	%ebp, %rax
	leaq	max(%rip), %rdx
	addl	$1, %ebp
	leaq	(%rax,%rax,2), %rax
	salq	$2, %rax
	movq	%xmm0, (%rdx,%rax)
	movl	%r12d, 8(%rdx,%rax)
	movl	%ebp, nmax(%rip)
	jmp	.L1
.L2:
	jne	.L1
	jmp	.L5
	.cfi_endproc
.LFE23:
	.size	first_nmax, .-first_nmax
	.p2align 4
	.globl	first_nmin
	.type	first_nmin, @function
first_nmin:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movd	%esi, %xmm0
	movd	%edx, %xmm1
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	punpckldq	%xmm1, %xmm0
	movl	%edi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	nmin(%rip), %ebp
	testl	%ebp, %ebp
	jle	.L16
	leaq	8+min(%rip), %rax
	xorl	%ebx, %ebx
.L18:
	cmpl	%r12d, (%rax)
	jle	.L26
	leal	-1(%rbp), %eax
	leaq	min(%rip), %r13
	cmpl	%ebx, %eax
	jl	.L20
	movl	%ebp, %eax
	movq	%xmm0, 8(%rsp)
	subl	%ebx, %eax
	leal	-1(%rax), %edx
	movslq	%ebp, %rax
	leaq	0(,%rdx,4), %rcx
	movq	%rdx, %rdi
	leaq	(%rax,%rax,2), %rax
	subq	%rcx, %rdi
	salq	$2, %rax
	leaq	3(%rdx,%rdx,2), %rdx
	salq	$2, %rdi
	salq	$2, %rdx
	leaq	-12(%rax,%rdi), %rsi
	addq	%rax, %rdi
	addq	%r13, %rsi
	addq	%r13, %rdi
	call	memmove@PLT
	movq	8(%rsp), %xmm0
.L20:
	cmpl	%ebp, N(%rip)
	jg	.L27
.L21:
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,2), %rax
	salq	$2, %rax
	movl	%r12d, 8(%r13,%rax)
	movq	%xmm0, 0(%r13,%rax)
.L15:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	addl	$1, %ebp
	movl	%ebp, nmin(%rip)
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L26:
	addl	$1, %ebx
	addq	$12, %rax
	cmpl	%ebx, %ebp
	jne	.L18
.L19:
	cmpl	%ebp, N(%rip)
	jle	.L15
	movslq	%ebp, %rax
	leaq	min(%rip), %rdx
	addl	$1, %ebp
	leaq	(%rax,%rax,2), %rax
	salq	$2, %rax
	movq	%xmm0, (%rdx,%rax)
	movl	%r12d, 8(%rdx,%rax)
	movl	%ebp, nmin(%rip)
	jmp	.L15
.L16:
	jne	.L15
	jmp	.L19
	.cfi_endproc
.LFE24:
	.size	first_nmin, .-first_nmin
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC3:
	.string	"%.8lf\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.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	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	N(%rip), %eax
	testl	%eax, %eax
	jle	.L29
	leaq	a(%rip), %rbx
	xorl	%ebp, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L30:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	N(%rip), %eax
	addq	$4, %r12
	cmpl	%ebp, %eax
	jg	.L30
	movl	min(%rip), %edx
	movl	4+a(%rip), %ecx
	movl	$1, 4+min(%rip)
	movl	$1, 4+max(%rip)
	movl	%edx, max(%rip)
	movl	a(%rip), %edx
	movl	$1, nmin(%rip)
	movl	$1, nmax(%rip)
	addl	%edx, %ecx
	subl	4+a(%rip), %edx
	movl	%ecx, 8+max(%rip)
	movl	%edx, %ecx
	negl	%ecx
	cmovns	%ecx, %edx
	movl	%edx, 8+min(%rip)
	cmpl	$2, %eax
	jle	.L34
	leaq	8+a(%rip), %r12
	movl	$2, %r13d
	movq	%r12, %r14
	.p2align 4,,10
	.p2align 3
.L33:
	movl	%r13d, %r15d
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L32:
	movl	(%rbx,%rbp,4), %edi
	movl	%ebp, %edx
	addl	(%r14), %edi
	movl	%r15d, %esi
	call	first_nmax
	addq	$1, %rbp
	cmpq	%rbp, %r13
	jne	.L32
	movl	N(%rip), %eax
	addq	$1, %r13
	addq	$4, %r14
	cmpl	%r13d, %eax
	jg	.L33
	cmpl	$2, %eax
	jle	.L34
	movl	$2, %ebp
	.p2align 4,,10
	.p2align 3
.L36:
	movl	%ebp, %r13d
	xorl	%r14d, %r14d
	.p2align 4,,10
	.p2align 3
.L35:
	movl	(%r12), %eax
	subl	(%rbx,%r14,4), %eax
	movl	%r14d, %edx
	movl	%r13d, %esi
	movl	%eax, %edi
	negl	%edi
	cmovs	%eax, %edi
	addq	$1, %r14
	call	first_nmin
	cmpq	%r14, %rbp
	jne	.L35
	movl	N(%rip), %eax
	addq	$1, %rbp
	addq	$4, %r12
	cmpl	%ebp, %eax
	jg	.L36
.L34:
	pxor	%xmm3, %xmm3
	pxor	%xmm0, %xmm0
	leaq	min(%rip), %r10
	cvtsi2sdl	8+min(%rip), %xmm3
	cvtsi2sdl	8+max(%rip), %xmm0
	testl	%eax, %eax
	jle	.L37
	movl	max(%rip), %r8d
	movl	4+max(%rip), %r9d
	movq	%r10, %rdx
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L41:
	movl	(%rdx), %esi
	cmpl	%r8d, %esi
	je	.L38
	movl	4(%rdx), %edi
	cmpl	%edi, %r8d
	je	.L38
	cmpl	%r9d, %edi
	je	.L38
	cmpl	%r9d, %esi
	jne	.L39
.L38:
	addl	$1, %ecx
	addq	$12, %rdx
	cmpl	%eax, %ecx
	jne	.L41
.L39:
	movslq	%ecx, %rcx
	pxor	%xmm1, %xmm1
	pxor	%xmm2, %xmm2
	leaq	(%rcx,%rcx,2), %rdx
	cvtsi2sdl	8(%r10,%rdx,4), %xmm1
	divsd	%xmm1, %xmm0
	comisd	%xmm2, %xmm0
	jnb	.L50
	xorpd	.LC2(%rip), %xmm0
.L50:
	leaq	max(%rip), %r10
	movl	min(%rip), %r8d
	movl	4+min(%rip), %r9d
	xorl	%ecx, %ecx
	movq	%r10, %rdx
	.p2align 4,,10
	.p2align 3
.L45:
	movl	(%rdx), %esi
	cmpl	%r8d, %esi
	je	.L42
	movl	4(%rdx), %edi
	cmpl	%edi, %r8d
	je	.L42
	cmpl	%r9d, %edi
	je	.L42
	cmpl	%r9d, %esi
	jne	.L43
.L42:
	addl	$1, %ecx
	addq	$12, %rdx
	cmpl	%eax, %ecx
	jl	.L45
.L43:
	movslq	%ecx, %rcx
	pxor	%xmm1, %xmm1
	leaq	(%rcx,%rcx,2), %rax
	cvtsi2sdl	8(%r10,%rax,4), %xmm1
	divsd	%xmm3, %xmm1
	comisd	%xmm2, %xmm1
	jnb	.L46
	xorpd	.LC2(%rip), %xmm1
.L46:
	movapd	%xmm1, %xmm2
	movl	$1, %edi
	movl	$1, %eax
	cmplesd	%xmm0, %xmm2
	leaq	.LC3(%rip), %rsi
	andpd	%xmm2, %xmm0
	andnpd	%xmm1, %xmm2
	orpd	%xmm2, %xmm0
	call	__printf_chk@PLT
	addq	$8, %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
.L29:
	.cfi_restore_state
	movl	min(%rip), %edx
	movl	4+a(%rip), %ecx
	movl	$1, 4+min(%rip)
	movl	$1, 4+max(%rip)
	movl	%edx, max(%rip)
	movl	a(%rip), %edx
	movl	$1, nmin(%rip)
	movl	$1, nmax(%rip)
	addl	%edx, %ecx
	subl	4+a(%rip), %edx
	movl	%ecx, 8+max(%rip)
	movl	%edx, %ecx
	negl	%ecx
	cmovns	%ecx, %edx
	movl	%edx, 8+min(%rip)
	jmp	.L34
.L37:
	divsd	%xmm3, %xmm0
	pxor	%xmm2, %xmm2
	comisd	%xmm2, %xmm0
	movapd	%xmm0, %xmm1
	jnb	.L46
	xorpd	.LC2(%rip), %xmm0
	xorl	%ecx, %ecx
	leaq	max(%rip), %r10
	jmp	.L43
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 4012
a:
	.zero	4012
	.globl	nmin
	.align 4
	.type	nmin, @object
	.size	nmin, 4
nmin:
	.zero	4
	.globl	nmax
	.align 4
	.type	nmax, @object
	.size	nmax, 4
nmax:
	.zero	4
	.globl	min
	.align 32
	.type	min, @object
	.size	min, 12036
min:
	.zero	12036
	.globl	max
	.align 32
	.type	max, @object
	.size	max, 12036
max:
	.zero	12036
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.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	first_nmax
	.type	first_nmax, @function
first_nmax:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movd	%esi, %xmm0
	movd	%edx, %xmm1
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	punpckldq	%xmm1, %xmm0
	movl	%edi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	nmax(%rip), %ebp
	testl	%ebp, %ebp
	jle	.L2
	leaq	8+max(%rip), %rax
	xorl	%ebx, %ebx
.L4:
	cmpl	%r12d, (%rax)
	jge	.L13
	leal	-1(%rbp), %eax
	leaq	max(%rip), %r13
	cmpl	%ebx, %eax
	jl	.L6
	movl	%ebp, %eax
	movq	%xmm0, 8(%rsp)
	subl	%ebx, %eax
	leal	-1(%rax), %edx
	movslq	%ebp, %rax
	leaq	0(,%rdx,4), %rcx
	movq	%rdx, %rdi
	leaq	(%rax,%rax,2), %rax
	subq	%rcx, %rdi
	salq	$2, %rax
	leaq	3(%rdx,%rdx,2), %rdx
	salq	$2, %rdi
	salq	$2, %rdx
	leaq	-12(%rax,%rdi), %rsi
	addq	%rax, %rdi
	addq	%r13, %rsi
	addq	%r13, %rdi
	call	memmove@PLT
	movq	8(%rsp), %xmm0
.L6:
	cmpl	%ebp, N(%rip)
	jg	.L14
.L7:
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,2), %rax
	salq	$2, %rax
	movl	%r12d, 8(%r13,%rax)
	movq	%xmm0, 0(%r13,%rax)
.L1:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	addl	$1, %ebp
	movl	%ebp, nmax(%rip)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L13:
	addl	$1, %ebx
	addq	$12, %rax
	cmpl	%ebx, %ebp
	jne	.L4
.L5:
	cmpl	%ebp, N(%rip)
	jle	.L1
	movslq	%ebp, %rax
	leaq	max(%rip), %rdx
	addl	$1, %ebp
	leaq	(%rax,%rax,2), %rax
	salq	$2, %rax
	movq	%xmm0, (%rdx,%rax)
	movl	%r12d, 8(%rdx,%rax)
	movl	%ebp, nmax(%rip)
	jmp	.L1
.L2:
	jne	.L1
	jmp	.L5
	.cfi_endproc
.LFE23:
	.size	first_nmax, .-first_nmax
	.p2align 4
	.globl	first_nmin
	.type	first_nmin, @function
first_nmin:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movd	%esi, %xmm0
	movd	%edx, %xmm1
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	punpckldq	%xmm1, %xmm0
	movl	%edi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	nmin(%rip), %ebp
	testl	%ebp, %ebp
	jle	.L16
	leaq	8+min(%rip), %rax
	xorl	%ebx, %ebx
.L18:
	cmpl	%r12d, (%rax)
	jle	.L26
	leal	-1(%rbp), %eax
	leaq	min(%rip), %r13
	cmpl	%ebx, %eax
	jl	.L20
	movl	%ebp, %eax
	movq	%xmm0, 8(%rsp)
	subl	%ebx, %eax
	leal	-1(%rax), %edx
	movslq	%ebp, %rax
	leaq	0(,%rdx,4), %rcx
	movq	%rdx, %rdi
	leaq	(%rax,%rax,2), %rax
	subq	%rcx, %rdi
	salq	$2, %rax
	leaq	3(%rdx,%rdx,2), %rdx
	salq	$2, %rdi
	salq	$2, %rdx
	leaq	-12(%rax,%rdi), %rsi
	addq	%rax, %rdi
	addq	%r13, %rsi
	addq	%r13, %rdi
	call	memmove@PLT
	movq	8(%rsp), %xmm0
.L20:
	cmpl	%ebp, N(%rip)
	jg	.L27
.L21:
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,2), %rax
	salq	$2, %rax
	movl	%r12d, 8(%r13,%rax)
	movq	%xmm0, 0(%r13,%rax)
.L15:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	addl	$1, %ebp
	movl	%ebp, nmin(%rip)
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L26:
	addl	$1, %ebx
	addq	$12, %rax
	cmpl	%ebx, %ebp
	jne	.L18
.L19:
	cmpl	%ebp, N(%rip)
	jle	.L15
	movslq	%ebp, %rax
	leaq	min(%rip), %rdx
	addl	$1, %ebp
	leaq	(%rax,%rax,2), %rax
	salq	$2, %rax
	movq	%xmm0, (%rdx,%rax)
	movl	%r12d, 8(%rdx,%rax)
	movl	%ebp, nmin(%rip)
	jmp	.L15
.L16:
	jne	.L15
	jmp	.L19
	.cfi_endproc
.LFE24:
	.size	first_nmin, .-first_nmin
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC3:
	.string	"%.8lf\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.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	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	N(%rip), %eax
	testl	%eax, %eax
	jle	.L29
	leaq	a(%rip), %rbx
	xorl	%ebp, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L30:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	N(%rip), %eax
	addq	$4, %r12
	cmpl	%ebp, %eax
	jg	.L30
	movl	min(%rip), %edx
	movl	4+a(%rip), %ecx
	movl	$1, 4+min(%rip)
	movl	$1, 4+max(%rip)
	movl	%edx, max(%rip)
	movl	a(%rip), %edx
	movl	$1, nmin(%rip)
	movl	$1, nmax(%rip)
	addl	%edx, %ecx
	subl	4+a(%rip), %edx
	movl	%ecx, 8+max(%rip)
	movl	%edx, %ecx
	negl	%ecx
	cmovns	%ecx, %edx
	movl	%edx, 8+min(%rip)
	cmpl	$2, %eax
	jle	.L34
	leaq	8+a(%rip), %r12
	movl	$2, %r13d
	movq	%r12, %r14
	.p2align 4,,10
	.p2align 3
.L33:
	movl	%r13d, %r15d
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L32:
	movl	(%rbx,%rbp,4), %edi
	movl	%ebp, %edx
	addl	(%r14), %edi
	movl	%r15d, %esi
	call	first_nmax
	addq	$1, %rbp
	cmpq	%rbp, %r13
	jne	.L32
	movl	N(%rip), %eax
	addq	$1, %r13
	addq	$4, %r14
	cmpl	%r13d, %eax
	jg	.L33
	cmpl	$2, %eax
	jle	.L34
	movl	$2, %ebp
	.p2align 4,,10
	.p2align 3
.L36:
	movl	%ebp, %r13d
	xorl	%r14d, %r14d
	.p2align 4,,10
	.p2align 3
.L35:
	movl	(%r12), %eax
	subl	(%rbx,%r14,4), %eax
	movl	%r14d, %edx
	movl	%r13d, %esi
	movl	%eax, %edi
	negl	%edi
	cmovs	%eax, %edi
	addq	$1, %r14
	call	first_nmin
	cmpq	%r14, %rbp
	jne	.L35
	movl	N(%rip), %eax
	addq	$1, %rbp
	addq	$4, %r12
	cmpl	%ebp, %eax
	jg	.L36
.L34:
	pxor	%xmm3, %xmm3
	pxor	%xmm0, %xmm0
	leaq	min(%rip), %r10
	cvtsi2sdl	8+min(%rip), %xmm3
	cvtsi2sdl	8+max(%rip), %xmm0
	testl	%eax, %eax
	jle	.L37
	movl	max(%rip), %r8d
	movl	4+max(%rip), %r9d
	movq	%r10, %rdx
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L41:
	movl	(%rdx), %esi
	cmpl	%r8d, %esi
	je	.L38
	movl	4(%rdx), %edi
	cmpl	%edi, %r8d
	je	.L38
	cmpl	%r9d, %edi
	je	.L38
	cmpl	%r9d, %esi
	jne	.L39
.L38:
	addl	$1, %ecx
	addq	$12, %rdx
	cmpl	%eax, %ecx
	jne	.L41
.L39:
	movslq	%ecx, %rcx
	pxor	%xmm1, %xmm1
	pxor	%xmm2, %xmm2
	leaq	(%rcx,%rcx,2), %rdx
	cvtsi2sdl	8(%r10,%rdx,4), %xmm1
	divsd	%xmm1, %xmm0
	comisd	%xmm2, %xmm0
	jnb	.L50
	xorpd	.LC2(%rip), %xmm0
.L50:
	leaq	max(%rip), %r10
	movl	min(%rip), %r8d
	movl	4+min(%rip), %r9d
	xorl	%ecx, %ecx
	movq	%r10, %rdx
	.p2align 4,,10
	.p2align 3
.L45:
	movl	(%rdx), %esi
	cmpl	%r8d, %esi
	je	.L42
	movl	4(%rdx), %edi
	cmpl	%edi, %r8d
	je	.L42
	cmpl	%r9d, %edi
	je	.L42
	cmpl	%r9d, %esi
	jne	.L43
.L42:
	addl	$1, %ecx
	addq	$12, %rdx
	cmpl	%eax, %ecx
	jl	.L45
.L43:
	movslq	%ecx, %rcx
	pxor	%xmm1, %xmm1
	leaq	(%rcx,%rcx,2), %rax
	cvtsi2sdl	8(%r10,%rax,4), %xmm1
	divsd	%xmm3, %xmm1
	comisd	%xmm2, %xmm1
	jnb	.L46
	xorpd	.LC2(%rip), %xmm1
.L46:
	movapd	%xmm1, %xmm2
	movl	$1, %edi
	movl	$1, %eax
	cmplesd	%xmm0, %xmm2
	leaq	.LC3(%rip), %rsi
	andpd	%xmm2, %xmm0
	andnpd	%xmm1, %xmm2
	orpd	%xmm2, %xmm0
	call	__printf_chk@PLT
	addq	$8, %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
.L29:
	.cfi_restore_state
	movl	min(%rip), %edx
	movl	4+a(%rip), %ecx
	movl	$1, 4+min(%rip)
	movl	$1, 4+max(%rip)
	movl	%edx, max(%rip)
	movl	a(%rip), %edx
	movl	$1, nmin(%rip)
	movl	$1, nmax(%rip)
	addl	%edx, %ecx
	subl	4+a(%rip), %edx
	movl	%ecx, 8+max(%rip)
	movl	%edx, %ecx
	negl	%ecx
	cmovns	%ecx, %edx
	movl	%edx, 8+min(%rip)
	jmp	.L34
.L37:
	divsd	%xmm3, %xmm0
	pxor	%xmm2, %xmm2
	comisd	%xmm2, %xmm0
	movapd	%xmm0, %xmm1
	jnb	.L46
	xorpd	.LC2(%rip), %xmm0
	xorl	%ecx, %ecx
	leaq	max(%rip), %r10
	jmp	.L43
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 4012
a:
	.zero	4012
	.globl	nmin
	.align 4
	.type	nmin, @object
	.size	nmin, 4
nmin:
	.zero	4
	.globl	nmax
	.align 4
	.type	nmax, @object
	.size	nmax, 4
nmax:
	.zero	4
	.globl	min
	.align 32
	.type	min, @object
	.size	min, 12036
min:
	.zero	12036
	.globl	max
	.align 32
	.type	max, @object
	.size	max, 12036
max:
	.zero	12036
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.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:

// Aizu Vol-3 0347: Maximization of Relational Expression
// 2017.8.27 bal4u@uu

#include <stdio.h>

#define MAX 1000
#define abs(a) ((a)>=0?(a):-(a))
typedef struct { int i, j, v; } T;
T max[MAX+3], min[MAX+3]; int nmax, nmin;
int a[MAX+3], N;

void first_nmax(int v, int i, int j)
{
	int ii, jj;

	for (ii = 0; ii < nmax; ii++) {
		if (v <= max[ii].v) continue;
		for (jj = nmax-1; jj >= ii; jj--) max[jj+1] = max[jj];
		if (nmax < N) nmax++;
		max[ii].i = i, max[ii].j = j, max[ii].v = v;
		return;
	}
	if (ii == nmax && nmax < N)	max[ii].i = i, max[ii].j = j, max[ii].v = v, nmax++;
}

void first_nmin(int v, int i, int j)
{
	int ii, jj;

	for (ii = 0; ii < nmin; ii++) {
		if (v >= min[ii].v) continue;
		for (jj = nmin-1; jj >= ii; jj--) min[jj+1] = min[jj];
		if (nmin < N) nmin++;
		min[ii].i = i, min[ii].j = j, min[ii].v = v;
		return;
	}
	if (ii == nmin && nmin < N)	min[ii].i = i, min[ii].j = j, min[ii].v = v, nmin++;
}

int main()
{
    int i, j;
    double x, y;

	//memset(max, 0, sizeof(max)), memset(min, 0, sizeof(min));
    scanf("%d", &N);
    for (i = 0; i < N; i++) scanf("%d", a + i);
	max[0].i = min[0].i, max[0].j = min[0].j = 1,
    max[0].v = a[0] + a[1], min[0].v = abs(a[0] - a[1]), nmax = nmin = 1;
    for (i = 2; i < N; i++) for (j = 0; j < i; j++) first_nmax(a[i] + a[j], i, j);
    for (i = 2; i < N; i++) for (j = 0; j < i; j++) first_nmin(abs(a[i] - a[j]), i, j);
    for (i = 0; i < N; i++) {
        if ((min[i].i != max[0].i && min[i].j != max[0].i) &&
            (min[i].i != max[0].j && min[i].j != max[0].j)) break;
	}
	x = (double)max[0].v / (double)min[i].v, x = abs(x);
	for (i = 0; i < N; i++) {
		if ((max[i].i != min[0].i && max[i].j != min[0].i) &&
            (max[i].i != min[0].j && max[i].j != min[0].j)) break;
	}
    y = (double)max[i].v / (double)min[0].v; y = abs(y);
	printf("%.8lf\n", x >= y ? x : y);
    return 0;
}
4
100000 26243 8 1
 6
15 21 36 0 34 5
 4
100000 40706 8 1
 6
15 21 36 0 34 2
 4
100000 71561 8 1
 6
15 3 36 0 34 2
 4
100000 71561 15 1
 6
15 3 36 0 45 2
 4
100000 71561 28 1
 6
15 3 44 0 45 2

18034.71428571
 18.00000000
 20100.85714286
 35.00000000
 24508.71428571
 70.00000000
 12254.35714286
 81.00000000
 6354.11111111
 89.00000000

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

```c
// Aizu Vol-3 0347: Maximization of Relational Expression
// 2017.8.27 bal4u@uu

#include <stdio.h>

#define MAX 1000
#define abs(a) ((a)>=0?(a):-(a))
typedef struct { int i, j, v; } T;
T max[MAX+3], min[MAX+3]; int nmax, nmin;
int a[MAX+3], N;

void first_nmax(int v, int i, int j)
{
	int ii, jj;

	for (ii = 0; ii < nmax; ii++) {
		if (v <= max[ii].v) continue;
		for (jj = nmax-1; jj >= ii; jj--) max[jj+1] = max[jj];
		if (nmax < N) nmax++;
		max[ii].i = i, max[ii].j = j, max[ii].v = v;
		return;
	}
	if (ii == nmax && nmax < N)	max[ii].i = i, max[ii].j = j, max[ii].v = v, nmax++;
}

void first_nmin(int v, int i, int j)
{
	int ii, jj;

	for (ii = 0; ii < nmin; ii++) {
		if (v >= min[ii].v) continue;
		for (jj = nmin-1; jj >= ii; jj--) min[jj+1] = min[jj];
		if (nmin < N) nmin++;
		min[ii].i = i, min[ii].j = j, min[ii].v = v;
		return;
	}
	if (ii == nmin && nmin < N)	min[ii].i = i, min[ii].j = j, min[ii].v = v, nmin++;
}

int main()
{
    int i, j;
    double x, y;

	//memset(max, 0, sizeof(max)), memset(min, 0, sizeof(min));
    scanf("%d", &N);
    for (i = 0; i < N; i++) scanf("%d", a + i);
	max[0].i = min[0].i, max[0].j = min[0].j = 1,
    max[0].v = a[0] + a[1], min[0].v = abs(a[0] - a[1]), nmax = nmin = 1;
    for (i = 2; i < N; i++) for (j = 0; j < i; j++) first_nmax(a[i] + a[j], i, j);
    for (i = 2; i < N; i++) for (j = 0; j < i; j++) first_nmin(abs(a[i] - a[j]), i, j);
    for (i = 0; i < N; i++) {
        if ((min[i].i != max[0].i && min[i].j != max[0].i) &&
            (min[i].i != max[0].j && min[i].j != max[0].j)) break;
	}
	x = (double)max[0].v / (double)min[i].v, x = abs(x);
	for (i = 0; i < N; i++) {
		if ((max[i].i != min[0].i && max[i].j != min[0].i) &&
            (max[i].i != min[0].j && max[i].j != min[0].j)) break;
	}
    y = (double)max[i].v / (double)min[0].v; y = abs(y);
	printf("%.8lf\n", x >= y ? x : y);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	max
	.bss
	.align 32
	.type	max, @object
	.size	max, 12036
max:
	.zero	12036
	.globl	min
	.align 32
	.type	min, @object
	.size	min, 12036
min:
	.zero	12036
	.globl	nmax
	.align 4
	.type	nmax, @object
	.size	nmax, 4
nmax:
	.zero	4
	.globl	nmin
	.align 4
	.type	nmin, @object
	.size	nmin, 4
nmin:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 4012
a:
	.zero	4012
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.text
	.globl	first_nmax
	.type	first_nmax, @function
first_nmax:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L2
.L9:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+max(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L11
	movl	nmax(%rip), %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L5
.L6:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	max(%rip), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movq	%rsi, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	movq	%rax, %rsi
	leaq	max(%rip), %rax
	movq	(%rsi,%rax), %rdi
	movq	%rdi, (%rcx,%rdx)
	movl	8(%rsi,%rax), %eax
	movl	%eax, 8(%rcx,%rdx)
	subl	$1, -4(%rbp)
.L5:
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L6
	movl	nmax(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jge	.L7
	movl	nmax(%rip), %eax
	addl	$1, %eax
	movl	%eax, nmax(%rip)
.L7:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	max(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+max(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+max(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L1
.L11:
	nop
	addl	$1, -8(%rbp)
.L2:
	movl	nmax(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L9
	movl	nmax(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L1
	movl	nmax(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jge	.L1
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	max(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+max(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+max(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	nmax(%rip), %eax
	addl	$1, %eax
	movl	%eax, nmax(%rip)
.L1:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	first_nmax, .-first_nmax
	.globl	first_nmin
	.type	first_nmin, @function
first_nmin:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L13
.L20:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+min(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L22
	movl	nmin(%rip), %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L16
.L17:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	min(%rip), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movq	%rsi, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	movq	%rax, %rsi
	leaq	min(%rip), %rax
	movq	(%rsi,%rax), %rdi
	movq	%rdi, (%rcx,%rdx)
	movl	8(%rsi,%rax), %eax
	movl	%eax, 8(%rcx,%rdx)
	subl	$1, -4(%rbp)
.L16:
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L17
	movl	nmin(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jge	.L18
	movl	nmin(%rip), %eax
	addl	$1, %eax
	movl	%eax, nmin(%rip)
.L18:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	min(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+min(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+min(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L12
.L22:
	nop
	addl	$1, -8(%rbp)
.L13:
	movl	nmin(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L20
	movl	nmin(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L12
	movl	nmin(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jge	.L12
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	min(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+min(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+min(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	nmin(%rip), %eax
	addl	$1, %eax
	movl	%eax, nmin(%rip)
.L12:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	first_nmin, .-first_nmin
	.section	.rodata
.LC0:
	.string	"%d"
.LC3:
	.string	"%.8lf\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -24(%rbp)
	jmp	.L24
.L25:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %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
	addl	$1, -24(%rbp)
.L24:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L25
	movl	min(%rip), %eax
	movl	%eax, max(%rip)
	movl	$1, 4+min(%rip)
	movl	4+min(%rip), %eax
	movl	%eax, 4+max(%rip)
	movl	a(%rip), %edx
	movl	4+a(%rip), %eax
	addl	%edx, %eax
	movl	%eax, 8+max(%rip)
	movl	a(%rip), %eax
	movl	4+a(%rip), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, 8+min(%rip)
	movl	$1, nmin(%rip)
	movl	nmin(%rip), %eax
	movl	%eax, nmax(%rip)
	movl	$2, -24(%rbp)
	jmp	.L26
.L29:
	movl	$0, -20(%rbp)
	jmp	.L27
.L28:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	first_nmax
	addl	$1, -20(%rbp)
.L27:
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L28
	addl	$1, -24(%rbp)
.L26:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L29
	movl	$2, -24(%rbp)
	jmp	.L30
.L33:
	movl	$0, -20(%rbp)
	jmp	.L31
.L32:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %ecx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	first_nmin
	addl	$1, -20(%rbp)
.L31:
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L32
	addl	$1, -24(%rbp)
.L30:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L33
	movl	$0, -24(%rbp)
	jmp	.L34
.L37:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	max(%rip), %eax
	cmpl	%eax, %edx
	je	.L35
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+min(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	max(%rip), %eax
	cmpl	%eax, %edx
	je	.L35
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	4+max(%rip), %eax
	cmpl	%eax, %edx
	je	.L35
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+min(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	4+max(%rip), %eax
	cmpl	%eax, %edx
	jne	.L58
.L35:
	addl	$1, -24(%rbp)
.L34:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L37
	jmp	.L36
.L58:
	nop
.L36:
	movl	8+max(%rip), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+min(%rip), %rax
	movl	(%rdx,%rax), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	-16(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jb	.L55
	movsd	-16(%rbp), %xmm0
	jmp	.L40
.L55:
	movsd	-16(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	xorpd	%xmm1, %xmm0
.L40:
	movsd	%xmm0, -16(%rbp)
	movl	$0, -24(%rbp)
	jmp	.L41
.L44:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	min(%rip), %eax
	cmpl	%eax, %edx
	je	.L42
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+max(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	min(%rip), %eax
	cmpl	%eax, %edx
	je	.L42
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	4+min(%rip), %eax
	cmpl	%eax, %edx
	je	.L42
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+max(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	4+min(%rip), %eax
	cmpl	%eax, %edx
	jne	.L59
.L42:
	addl	$1, -24(%rbp)
.L41:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L44
	jmp	.L43
.L59:
	nop
.L43:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+max(%rip), %rax
	movl	(%rdx,%rax), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	8+min(%rip), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -8(%rbp)
	movsd	-8(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jb	.L56
	movsd	-8(%rbp), %xmm0
	jmp	.L47
.L56:
	movsd	-8(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	xorpd	%xmm1, %xmm0
.L47:
	movsd	%xmm0, -8(%rbp)
	movsd	-16(%rbp), %xmm0
	comisd	-8(%rbp), %xmm0
	jb	.L57
	movq	-16(%rbp), %rax
	jmp	.L50
.L57:
	movq	-8(%rbp), %rax
.L50:
	movq	%rax, %xmm0
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC2:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.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	max
	.bss
	.align 32
	.type	max, @object
	.size	max, 12036
max:
	.zero	12036
	.globl	min
	.align 32
	.type	min, @object
	.size	min, 12036
min:
	.zero	12036
	.globl	nmax
	.align 4
	.type	nmax, @object
	.size	nmax, 4
nmax:
	.zero	4
	.globl	nmin
	.align 4
	.type	nmin, @object
	.size	nmin, 4
nmin:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 4012
a:
	.zero	4012
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.text
	.globl	first_nmax
	.type	first_nmax, @function
first_nmax:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L2
.L9:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+max(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L11
	movl	nmax(%rip), %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L5
.L6:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	max(%rip), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movq	%rsi, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	movq	%rax, %rsi
	leaq	max(%rip), %rax
	movq	(%rsi,%rax), %rdi
	movq	%rdi, (%rcx,%rdx)
	movl	8(%rsi,%rax), %eax
	movl	%eax, 8(%rcx,%rdx)
	subl	$1, -4(%rbp)
.L5:
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L6
	movl	nmax(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jge	.L7
	movl	nmax(%rip), %eax
	addl	$1, %eax
	movl	%eax, nmax(%rip)
.L7:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	max(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+max(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+max(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L1
.L11:
	nop
	addl	$1, -8(%rbp)
.L2:
	movl	nmax(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L9
	movl	nmax(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L1
	movl	nmax(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jge	.L1
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	max(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+max(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+max(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	nmax(%rip), %eax
	addl	$1, %eax
	movl	%eax, nmax(%rip)
.L1:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	first_nmax, .-first_nmax
	.globl	first_nmin
	.type	first_nmin, @function
first_nmin:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L13
.L20:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+min(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L22
	movl	nmin(%rip), %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L16
.L17:
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	min(%rip), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movq	%rsi, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	movq	%rax, %rsi
	leaq	min(%rip), %rax
	movq	(%rsi,%rax), %rdi
	movq	%rdi, (%rcx,%rdx)
	movl	8(%rsi,%rax), %eax
	movl	%eax, 8(%rcx,%rdx)
	subl	$1, -4(%rbp)
.L16:
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L17
	movl	nmin(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jge	.L18
	movl	nmin(%rip), %eax
	addl	$1, %eax
	movl	%eax, nmin(%rip)
.L18:
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	min(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+min(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+min(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L12
.L22:
	nop
	addl	$1, -8(%rbp)
.L13:
	movl	nmin(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L20
	movl	nmin(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L12
	movl	nmin(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jge	.L12
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	min(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+min(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+min(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	nmin(%rip), %eax
	addl	$1, %eax
	movl	%eax, nmin(%rip)
.L12:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	first_nmin, .-first_nmin
	.section	.rodata
.LC0:
	.string	"%d"
.LC3:
	.string	"%.8lf\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -24(%rbp)
	jmp	.L24
.L25:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %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
	addl	$1, -24(%rbp)
.L24:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L25
	movl	min(%rip), %eax
	movl	%eax, max(%rip)
	movl	$1, 4+min(%rip)
	movl	4+min(%rip), %eax
	movl	%eax, 4+max(%rip)
	movl	a(%rip), %edx
	movl	4+a(%rip), %eax
	addl	%edx, %eax
	movl	%eax, 8+max(%rip)
	movl	a(%rip), %eax
	movl	4+a(%rip), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, 8+min(%rip)
	movl	$1, nmin(%rip)
	movl	nmin(%rip), %eax
	movl	%eax, nmax(%rip)
	movl	$2, -24(%rbp)
	jmp	.L26
.L29:
	movl	$0, -20(%rbp)
	jmp	.L27
.L28:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, %ecx
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movl	%ecx, %edi
	call	first_nmax
	addl	$1, -20(%rbp)
.L27:
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L28
	addl	$1, -24(%rbp)
.L26:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L29
	movl	$2, -24(%rbp)
	jmp	.L30
.L33:
	movl	$0, -20(%rbp)
	jmp	.L31
.L32:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %ecx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	first_nmin
	addl	$1, -20(%rbp)
.L31:
	movl	-20(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jl	.L32
	addl	$1, -24(%rbp)
.L30:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L33
	movl	$0, -24(%rbp)
	jmp	.L34
.L37:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	max(%rip), %eax
	cmpl	%eax, %edx
	je	.L35
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+min(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	max(%rip), %eax
	cmpl	%eax, %edx
	je	.L35
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	min(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	4+max(%rip), %eax
	cmpl	%eax, %edx
	je	.L35
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+min(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	4+max(%rip), %eax
	cmpl	%eax, %edx
	jne	.L58
.L35:
	addl	$1, -24(%rbp)
.L34:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L37
	jmp	.L36
.L58:
	nop
.L36:
	movl	8+max(%rip), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+min(%rip), %rax
	movl	(%rdx,%rax), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -16(%rbp)
	movsd	-16(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jb	.L55
	movsd	-16(%rbp), %xmm0
	jmp	.L40
.L55:
	movsd	-16(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	xorpd	%xmm1, %xmm0
.L40:
	movsd	%xmm0, -16(%rbp)
	movl	$0, -24(%rbp)
	jmp	.L41
.L44:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	min(%rip), %eax
	cmpl	%eax, %edx
	je	.L42
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+max(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	min(%rip), %eax
	cmpl	%eax, %edx
	je	.L42
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	max(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	4+min(%rip), %eax
	cmpl	%eax, %edx
	je	.L42
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+max(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	4+min(%rip), %eax
	cmpl	%eax, %edx
	jne	.L59
.L42:
	addl	$1, -24(%rbp)
.L41:
	movl	N(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L44
	jmp	.L43
.L59:
	nop
.L43:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+max(%rip), %rax
	movl	(%rdx,%rax), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	8+min(%rip), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -8(%rbp)
	movsd	-8(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jb	.L56
	movsd	-8(%rbp), %xmm0
	jmp	.L47
.L56:
	movsd	-8(%rbp), %xmm0
	movq	.LC2(%rip), %xmm1
	xorpd	%xmm1, %xmm0
.L47:
	movsd	%xmm0, -8(%rbp)
	movsd	-16(%rbp), %xmm0
	comisd	-8(%rbp), %xmm0
	jb	.L57
	movq	-16(%rbp), %rax
	jmp	.L50
.L57:
	movq	-8(%rbp), %rax
.L50:
	movq	%rax, %xmm0
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC2:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.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:
