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-10 1069: Squid Multiplication
// 2017.8.18 bal4u@uu

#include <stdio.h>
#include <stdlib.h>

#define MAX 32000
unsigned long long odd[MAX+5], even[MAX+5];
int ol, el;

unsigned long long gcd(unsigned long long a, unsigned long long b)
{
	unsigned long long r;
	while (b != 0) r = a % b, a = b, b = r;
	return a;
}

unsigned long long ays_sqrt(unsigned long long a)
{
	unsigned long long x = 0;
	unsigned long long d = 0x80000000ULL;
	if (a >= 0x7fffffffULL * 0x7fffffffULL) return 0x7fffffffULL;
	do {
		if (a >= x * x) x += d; else x -= d;
		d >>= 1;
	} while (d);
	if (a > x * x) x++;
	if (a < x * x) x--;
	return x;
}


int cmp(unsigned long long *a, unsigned long long *b) {
	if (*a < *b) return -1;
	if (*a == *b) return 0;
	return 1;
}

int main()
{
	int n, k, i;
	unsigned long long g, e1, e2, o1;

	while (scanf("%d", &n) && n) {
		k = n*(n + 1) / 2;
		for (ol = el = 0, i = 0; i < k; i++) {
			scanf("%llu", &g);
			if (g & 1) odd[ol++] = g;
			else       even[el++] = g;
		}
		qsort(odd, ol, sizeof(unsigned long long), cmp);
		qsort(even, el, sizeof(unsigned long long), cmp);
		e1 = even[0], e2 = even[1], o1 = odd[0];
		g = gcd(e1, o1), e1 /= g, o1 /= g;
		g = gcd(e2, o1), e2 /= g, o1 /= g;
		g = ays_sqrt(e1 * e2);
		printf("%llu\n%llu", g, even[0]/g);
		for (i = 1; i < n; i++) printf(" %llu", even[i]/g);
		putchar('\n');
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	odd
	.bss
	.align 32
	.type	odd, @object
	.size	odd, 256040
odd:
	.zero	256040
	.globl	even
	.align 32
	.type	even, @object
	.size	even, 256040
even:
	.zero	256040
	.globl	ol
	.align 4
	.type	ol, @object
	.size	ol, 4
ol:
	.zero	4
	.globl	el
	.align 4
	.type	el, @object
	.size	el, 4
el:
	.zero	4
	.text
	.globl	gcd
	.type	gcd, @function
gcd:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	jmp	.L2
.L3:
	movq	-24(%rbp), %rax
	movl	$0, %edx
	divq	-32(%rbp)
	movq	%rdx, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, -32(%rbp)
.L2:
	cmpq	$0, -32(%rbp)
	jne	.L3
	movq	-24(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	gcd, .-gcd
	.globl	ays_sqrt
	.type	ays_sqrt, @function
ays_sqrt:
.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, -24(%rbp)
	movq	$0, -16(%rbp)
	movl	$2147483648, %eax
	movq	%rax, -8(%rbp)
	movabsq	$4611686014132420608, %rax
	cmpq	%rax, -24(%rbp)
	jbe	.L6
	movl	$2147483647, %eax
	jmp	.L7
.L6:
	movq	-16(%rbp), %rax
	imulq	%rax, %rax
	cmpq	%rax, -24(%rbp)
	jb	.L8
	movq	-8(%rbp), %rax
	addq	%rax, -16(%rbp)
	jmp	.L9
.L8:
	movq	-8(%rbp), %rax
	subq	%rax, -16(%rbp)
.L9:
	shrq	-8(%rbp)
	cmpq	$0, -8(%rbp)
	jne	.L6
	movq	-16(%rbp), %rax
	imulq	%rax, %rax
	cmpq	%rax, -24(%rbp)
	jbe	.L10
	addq	$1, -16(%rbp)
.L10:
	movq	-16(%rbp), %rax
	imulq	%rax, %rax
	cmpq	%rax, -24(%rbp)
	jnb	.L11
	subq	$1, -16(%rbp)
.L11:
	movq	-16(%rbp), %rax
.L7:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	ays_sqrt, .-ays_sqrt
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jnb	.L13
	movl	$-1, %eax
	jmp	.L14
.L13:
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jne	.L15
	movl	$0, %eax
	jmp	.L14
.L15:
	movl	$1, %eax
.L14:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%llu"
.LC1:
	.string	"%llu\n%llu"
.LC2:
	.string	" %llu"
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L17
.L25:
	movl	-52(%rbp), %eax
	leal	1(%rax), %edx
	movl	-52(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -44(%rbp)
	movl	$0, el(%rip)
	movl	el(%rip), %eax
	movl	%eax, ol(%rip)
	movl	$0, -48(%rbp)
	jmp	.L18
.L21:
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L19
	movl	ol(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ol(%rip)
	movq	-40(%rbp), %rdx
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	odd(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	jmp	.L20
.L19:
	movl	el(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, el(%rip)
	movq	-40(%rbp), %rdx
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	even(%rip), %rax
	movq	%rdx, (%rcx,%rax)
.L20:
	addl	$1, -48(%rbp)
.L18:
	movl	-48(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L21
	movl	ol(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	odd(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	el(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	even(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movq	even(%rip), %rax
	movq	%rax, -32(%rbp)
	movq	8+even(%rip), %rax
	movq	%rax, -24(%rbp)
	movq	odd(%rip), %rax
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-32(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
	movq	%rax, -40(%rbp)
	movq	-40(%rbp), %rcx
	movq	-32(%rbp), %rax
	movl	$0, %edx
	divq	%rcx
	movq	%rax, -32(%rbp)
	movq	-40(%rbp), %rcx
	movq	-16(%rbp), %rax
	movl	$0, %edx
	divq	%rcx
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
	movq	%rax, -40(%rbp)
	movq	-40(%rbp), %rsi
	movq	-24(%rbp), %rax
	movl	$0, %edx
	divq	%rsi
	movq	%rax, -24(%rbp)
	movq	-40(%rbp), %rcx
	movq	-16(%rbp), %rax
	movl	$0, %edx
	divq	%rcx
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	ays_sqrt
	movq	%rax, -40(%rbp)
	movq	even(%rip), %rax
	movq	-40(%rbp), %rsi
	movl	$0, %edx
	divq	%rsi
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$1, -48(%rbp)
	jmp	.L22
.L23:
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	even(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-40(%rbp), %rdi
	movl	$0, %edx
	divq	%rdi
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -48(%rbp)
.L22:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jl	.L23
	movl	$10, %edi
	call	putchar@PLT
.L17:
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L24
	movl	-52(%rbp), %eax
	testl	%eax, %eax
	jne	.L25
.L24:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB41:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$-1, %eax
	cmpq	%rdx, (%rdi)
	jb	.L1
	setne	%al
	movzbl	%al, %eax
.L1:
	ret
	.cfi_endproc
.LFE41:
	.size	cmp, .-cmp
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB39:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rsi, %rdx
	testq	%rsi, %rsi
	je	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rdx, %r8
	xorl	%edx, %edx
	divq	%r8
	movq	%r8, %rax
	testq	%rdx, %rdx
	jne	.L7
	movq	%r8, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%rdi, %r8
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE39:
	.size	gcd, .-gcd
	.p2align 4
	.globl	ays_sqrt
	.type	ays_sqrt, @function
ays_sqrt:
.LFB40:
	.cfi_startproc
	endbr64
	movabsq	$4611686014132420608, %rdx
	movl	$2147483647, %eax
	cmpq	%rdx, %rdi
	ja	.L10
	movl	$32, %ecx
	movl	$2147483648, %edx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rax, %r8
	leaq	(%rax,%rdx), %rsi
	imulq	%rax, %r8
	subq	%rdx, %rax
	cmpq	%r8, %rdi
	cmovnb	%rsi, %rax
	shrq	%rdx
	subl	$1, %ecx
	jne	.L14
	movq	%rax, %rdx
	imulq	%rax, %rdx
	cmpq	%rdi, %rdx
	jnb	.L15
	addq	$1, %rax
	movq	%rax, %rdx
	imulq	%rax, %rdx
.L15:
	cmpq	%rdx, %rdi
	sbbq	$0, %rax
.L10:
	ret
	.cfi_endproc
.LFE40:
	.size	ays_sqrt, .-ays_sqrt
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%llu"
.LC1:
	.string	"%llu\n%llu"
.LC2:
	.string	" %llu"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	odd(%rip), %r14
	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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	even(%rip), %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L19:
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L35
	movl	28(%rsp), %edx
	testl	%edx, %edx
	je	.L35
	movl	$0, el(%rip)
	leal	1(%rdx), %eax
	movl	$0, ol(%rip)
	imull	%edx, %eax
	movl	%eax, %ebp
	shrl	$31, %ebp
	addl	%eax, %ebp
	sarl	%ebp
	cmpl	$1, %eax
	jle	.L38
	xorl	%r15d, %r15d
	leaq	32(%rsp), %r12
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L53:
	movslq	ol(%rip), %rcx
	addl	$1, %r15d
	leal	1(%rcx), %esi
	movq	%rax, (%r14,%rcx,8)
	movl	%esi, ol(%rip)
	cmpl	%r15d, %ebp
	jle	.L52
.L23:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	32(%rsp), %rax
	testb	$1, %al
	jne	.L53
	movslq	el(%rip), %rcx
	addl	$1, %r15d
	leal	1(%rcx), %esi
	movq	%rax, (%rbx,%rcx,8)
	movl	%esi, el(%rip)
	cmpl	%r15d, %ebp
	jg	.L23
.L52:
	movslq	ol(%rip), %rsi
.L20:
	leaq	cmp(%rip), %rcx
	movl	$8, %edx
	movq	%r14, %rdi
	call	qsort@PLT
	movslq	el(%rip), %rsi
	movl	$8, %edx
	movq	%rbx, %rdi
	leaq	cmp(%rip), %rcx
	call	qsort@PLT
	movq	(%r14), %r8
	movq	(%rbx), %rcx
	movq	8+even(%rip), %r10
	testq	%r8, %r8
	je	.L39
	movq	%r8, %rdx
	movq	%rcx, %rdi
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%rdi, %rax
	movq	%rdx, %rdi
	xorl	%edx, %edx
	divq	%rdi
	testq	%rdx, %rdx
	jne	.L25
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%rdi
	xorl	%edx, %edx
	movq	%rax, %r11
	movq	%rax, %r9
	movq	%r8, %rax
	divq	%rdi
	movq	%rax, %rsi
	cmpq	%rdi, %r8
	jb	.L26
	movq	%r10, %rdi
	.p2align 4,,10
	.p2align 3
.L27:
	movq	%rdi, %rax
	xorl	%edx, %edx
	movq	%rsi, %r8
	divq	%rsi
	movq	%r8, %rdi
	movq	%rdx, %rsi
	testq	%rdx, %rdx
	jne	.L27
	movq	%r10, %rax
	xorl	%edx, %edx
	divq	%r8
	imulq	%rax, %r11
	movq	%r11, %r9
.L26:
	movabsq	$4611686014132420608, %rax
	movl	$2147483647, %r8d
	cmpq	%rax, %r9
	ja	.L28
.L24:
	movl	$32, %esi
	movl	$2147483648, %edx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L31:
	movq	%r8, %rax
	leaq	(%r8,%rdx), %rdi
	imulq	%r8, %rax
	subq	%rdx, %r8
	cmpq	%rax, %r9
	cmovnb	%rdi, %r8
	shrq	%rdx
	subl	$1, %esi
	jne	.L31
	movq	%r8, %rax
	imulq	%r8, %rax
	cmpq	%rax, %r9
	jbe	.L32
	addq	$1, %r8
	movq	%r8, %rax
	imulq	%r8, %rax
.L32:
	cmpq	%rax, %r9
	sbbq	$0, %r8
.L28:
	movq	%rcx, %rax
	xorl	%edx, %edx
	movl	$1, %edi
	movq	%r8, 32(%rsp)
	leaq	.LC1(%rip), %rsi
	movl	$1, %r12d
	leaq	.LC2(%rip), %rbp
	divq	%r8
	movq	%r8, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	$1, 28(%rsp)
	jle	.L34
	.p2align 4,,10
	.p2align 3
.L33:
	movq	(%rbx,%r12,8), %rax
	xorl	%edx, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	addq	$1, %r12
	divq	32(%rsp)
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	%r12d, 28(%rsp)
	jg	.L33
.L34:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	jmp	.L19
.L35:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L54
	addq	$56, %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
.L39:
	.cfi_restore_state
	movl	$1, %r9d
	jmp	.L24
.L38:
	xorl	%esi, %esi
	jmp	.L20
.L54:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE42:
	.size	main, .-main
	.globl	el
	.bss
	.align 4
	.type	el, @object
	.size	el, 4
el:
	.zero	4
	.globl	ol
	.align 4
	.type	ol, @object
	.size	ol, 4
ol:
	.zero	4
	.globl	even
	.align 32
	.type	even, @object
	.size	even, 256040
even:
	.zero	256040
	.globl	odd
	.align 32
	.type	odd, @object
	.size	odd, 256040
odd:
	.zero	256040
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB41:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$-1, %eax
	cmpq	%rdx, (%rdi)
	jb	.L1
	setne	%al
	movzbl	%al, %eax
.L1:
	ret
	.cfi_endproc
.LFE41:
	.size	cmp, .-cmp
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB39:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rsi, %rdx
	testq	%rsi, %rsi
	je	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rdx, %r8
	xorl	%edx, %edx
	divq	%r8
	movq	%r8, %rax
	testq	%rdx, %rdx
	jne	.L7
	movq	%r8, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%rdi, %r8
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE39:
	.size	gcd, .-gcd
	.p2align 4
	.globl	ays_sqrt
	.type	ays_sqrt, @function
ays_sqrt:
.LFB40:
	.cfi_startproc
	endbr64
	movabsq	$4611686014132420608, %rdx
	movl	$2147483647, %eax
	cmpq	%rdx, %rdi
	ja	.L10
	movl	$32, %ecx
	movl	$2147483648, %edx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rax, %r8
	leaq	(%rax,%rdx), %rsi
	imulq	%rax, %r8
	subq	%rdx, %rax
	cmpq	%r8, %rdi
	cmovnb	%rsi, %rax
	shrq	%rdx
	subl	$1, %ecx
	jne	.L14
	movq	%rax, %rdx
	imulq	%rax, %rdx
	cmpq	%rdi, %rdx
	jnb	.L15
	addq	$1, %rax
	movq	%rax, %rdx
	imulq	%rax, %rdx
.L15:
	cmpq	%rdx, %rdi
	sbbq	$0, %rax
.L10:
	ret
	.cfi_endproc
.LFE40:
	.size	ays_sqrt, .-ays_sqrt
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%llu"
.LC1:
	.string	"%llu\n%llu"
.LC2:
	.string	" %llu"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	odd(%rip), %r14
	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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	even(%rip), %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L19:
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L35
	movl	28(%rsp), %edx
	testl	%edx, %edx
	je	.L35
	movl	$0, el(%rip)
	leal	1(%rdx), %eax
	movl	$0, ol(%rip)
	imull	%edx, %eax
	movl	%eax, %ebp
	shrl	$31, %ebp
	addl	%eax, %ebp
	sarl	%ebp
	cmpl	$1, %eax
	jle	.L38
	xorl	%r15d, %r15d
	leaq	32(%rsp), %r12
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L53:
	movslq	ol(%rip), %rcx
	addl	$1, %r15d
	leal	1(%rcx), %esi
	movq	%rax, (%r14,%rcx,8)
	movl	%esi, ol(%rip)
	cmpl	%r15d, %ebp
	jle	.L52
.L23:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	32(%rsp), %rax
	testb	$1, %al
	jne	.L53
	movslq	el(%rip), %rcx
	addl	$1, %r15d
	leal	1(%rcx), %esi
	movq	%rax, (%rbx,%rcx,8)
	movl	%esi, el(%rip)
	cmpl	%r15d, %ebp
	jg	.L23
.L52:
	movslq	ol(%rip), %rsi
.L20:
	leaq	cmp(%rip), %rcx
	movl	$8, %edx
	movq	%r14, %rdi
	call	qsort@PLT
	movslq	el(%rip), %rsi
	movl	$8, %edx
	movq	%rbx, %rdi
	leaq	cmp(%rip), %rcx
	call	qsort@PLT
	movq	(%r14), %r8
	movq	(%rbx), %rcx
	movq	8+even(%rip), %r10
	testq	%r8, %r8
	je	.L39
	movq	%r8, %rdx
	movq	%rcx, %rdi
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%rdi, %rax
	movq	%rdx, %rdi
	xorl	%edx, %edx
	divq	%rdi
	testq	%rdx, %rdx
	jne	.L25
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%rdi
	xorl	%edx, %edx
	movq	%rax, %r11
	movq	%rax, %r9
	movq	%r8, %rax
	divq	%rdi
	movq	%rax, %rsi
	cmpq	%rdi, %r8
	jb	.L26
	movq	%r10, %rdi
	.p2align 4,,10
	.p2align 3
.L27:
	movq	%rdi, %rax
	xorl	%edx, %edx
	movq	%rsi, %r8
	divq	%rsi
	movq	%r8, %rdi
	movq	%rdx, %rsi
	testq	%rdx, %rdx
	jne	.L27
	movq	%r10, %rax
	xorl	%edx, %edx
	divq	%r8
	imulq	%rax, %r11
	movq	%r11, %r9
.L26:
	movabsq	$4611686014132420608, %rax
	movl	$2147483647, %r8d
	cmpq	%rax, %r9
	ja	.L28
.L24:
	movl	$32, %esi
	movl	$2147483648, %edx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L31:
	movq	%r8, %rax
	leaq	(%r8,%rdx), %rdi
	imulq	%r8, %rax
	subq	%rdx, %r8
	cmpq	%rax, %r9
	cmovnb	%rdi, %r8
	shrq	%rdx
	subl	$1, %esi
	jne	.L31
	movq	%r8, %rax
	imulq	%r8, %rax
	cmpq	%rax, %r9
	jbe	.L32
	addq	$1, %r8
	movq	%r8, %rax
	imulq	%r8, %rax
.L32:
	cmpq	%rax, %r9
	sbbq	$0, %r8
.L28:
	movq	%rcx, %rax
	xorl	%edx, %edx
	movl	$1, %edi
	movq	%r8, 32(%rsp)
	leaq	.LC1(%rip), %rsi
	movl	$1, %r12d
	leaq	.LC2(%rip), %rbp
	divq	%r8
	movq	%r8, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	$1, 28(%rsp)
	jle	.L34
	.p2align 4,,10
	.p2align 3
.L33:
	movq	(%rbx,%r12,8), %rax
	xorl	%edx, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	addq	$1, %r12
	divq	32(%rsp)
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	%r12d, 28(%rsp)
	jg	.L33
.L34:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	jmp	.L19
.L35:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L54
	addq	$56, %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
.L39:
	.cfi_restore_state
	movl	$1, %r9d
	jmp	.L24
.L38:
	xorl	%esi, %esi
	jmp	.L20
.L54:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE42:
	.size	main, .-main
	.globl	el
	.bss
	.align 4
	.type	el, @object
	.size	el, 4
el:
	.zero	4
	.globl	ol
	.align 4
	.type	ol, @object
	.size	ol, 4
ol:
	.zero	4
	.globl	even
	.align 32
	.type	even, @object
	.size	even, 256040
even:
	.zero	256040
	.globl	odd
	.align 32
	.type	odd, @object
	.size	odd, 256040
odd:
	.zero	256040
	.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-10 1069: Squid Multiplication
// 2017.8.18 bal4u@uu

#include <stdio.h>
#include <stdlib.h>

#define MAX 32000
unsigned long long odd[MAX+5], even[MAX+5];
int ol, el;

unsigned long long gcd(unsigned long long a, unsigned long long b)
{
	unsigned long long r;
	while (b != 0) r = a % b, a = b, b = r;
	return a;
}

unsigned long long ays_sqrt(unsigned long long a)
{
	unsigned long long x = 0;
	unsigned long long d = 0x80000000ULL;
	if (a >= 0x7fffffffULL * 0x7fffffffULL) return 0x7fffffffULL;
	do {
		if (a >= x * x) x += d; else x -= d;
		d >>= 1;
	} while (d);
	if (a > x * x) x++;
	if (a < x * x) x--;
	return x;
}


int cmp(unsigned long long *a, unsigned long long *b) {
	if (*a < *b) return -1;
	if (*a == *b) return 0;
	return 1;
}

int main()
{
	int n, k, i;
	unsigned long long g, e1, e2, o1;

	while (scanf("%d", &n) && n) {
		k = n*(n + 1) / 2;
		for (ol = el = 0, i = 0; i < k; i++) {
			scanf("%llu", &g);
			if (g & 1) odd[ol++] = g;
			else       even[el++] = g;
		}
		qsort(odd, ol, sizeof(unsigned long long), cmp);
		qsort(even, el, sizeof(unsigned long long), cmp);
		e1 = even[0], e2 = even[1], o1 = odd[0];
		g = gcd(e1, o1), e1 /= g, o1 /= g;
		g = gcd(e2, o1), e2 /= g, o1 /= g;
		g = ays_sqrt(e1 * e2);
		printf("%llu\n%llu", g, even[0]/g);
		for (i = 1; i < n; i++) printf(" %llu", even[i]/g);
		putchar('\n');
	}
	return 0;
}
3
6 10 14 15 27 35
2
30 42 35
0
 3
6 10 14 15 27 35
0
30 42 35
0
 3
6 10 22 15 27 35
0
3 56 35
-1
 3
6 10 26 15 27 35
2
30 42 35
0
 3
6 10 24 15 27 35
0
30 42 8
0
 3
6 10 28 15 31 35
2
30 42 35
0
 3
6 10 26 15 27 35
0
30 42 10
0
 3
6 10 20 15 25 35
0
15 000 10
-1
 3
6 10 18 15 21 35
0
18 68 18
2
 3
6 10 28 15 23 35
0
41 100 10
0

2
3 5 7
6
5 7
 2
3 5 7
 2
3 5 11
 2
3 5 13
6
5 7
 2
3 5 12
 2
3 5 14
6
5 7
 2
3 5 13
 2
3 5 10
 2
3 5 9
 2
3 5 14

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-10 1069: Squid Multiplication
// 2017.8.18 bal4u@uu

#include <stdio.h>
#include <stdlib.h>

#define MAX 32000
unsigned long long odd[MAX+5], even[MAX+5];
int ol, el;

unsigned long long gcd(unsigned long long a, unsigned long long b)
{
	unsigned long long r;
	while (b != 0) r = a % b, a = b, b = r;
	return a;
}

unsigned long long ays_sqrt(unsigned long long a)
{
	unsigned long long x = 0;
	unsigned long long d = 0x80000000ULL;
	if (a >= 0x7fffffffULL * 0x7fffffffULL) return 0x7fffffffULL;
	do {
		if (a >= x * x) x += d; else x -= d;
		d >>= 1;
	} while (d);
	if (a > x * x) x++;
	if (a < x * x) x--;
	return x;
}


int cmp(unsigned long long *a, unsigned long long *b) {
	if (*a < *b) return -1;
	if (*a == *b) return 0;
	return 1;
}

int main()
{
	int n, k, i;
	unsigned long long g, e1, e2, o1;

	while (scanf("%d", &n) && n) {
		k = n*(n + 1) / 2;
		for (ol = el = 0, i = 0; i < k; i++) {
			scanf("%llu", &g);
			if (g & 1) odd[ol++] = g;
			else       even[el++] = g;
		}
		qsort(odd, ol, sizeof(unsigned long long), cmp);
		qsort(even, el, sizeof(unsigned long long), cmp);
		e1 = even[0], e2 = even[1], o1 = odd[0];
		g = gcd(e1, o1), e1 /= g, o1 /= g;
		g = gcd(e2, o1), e2 /= g, o1 /= g;
		g = ays_sqrt(e1 * e2);
		printf("%llu\n%llu", g, even[0]/g);
		for (i = 1; i < n; i++) printf(" %llu", even[i]/g);
		putchar('\n');
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	odd
	.bss
	.align 32
	.type	odd, @object
	.size	odd, 256040
odd:
	.zero	256040
	.globl	even
	.align 32
	.type	even, @object
	.size	even, 256040
even:
	.zero	256040
	.globl	ol
	.align 4
	.type	ol, @object
	.size	ol, 4
ol:
	.zero	4
	.globl	el
	.align 4
	.type	el, @object
	.size	el, 4
el:
	.zero	4
	.text
	.globl	gcd
	.type	gcd, @function
gcd:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	jmp	.L2
.L3:
	movq	-24(%rbp), %rax
	movl	$0, %edx
	divq	-32(%rbp)
	movq	%rdx, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, -32(%rbp)
.L2:
	cmpq	$0, -32(%rbp)
	jne	.L3
	movq	-24(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	gcd, .-gcd
	.globl	ays_sqrt
	.type	ays_sqrt, @function
ays_sqrt:
.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, -24(%rbp)
	movq	$0, -16(%rbp)
	movl	$2147483648, %eax
	movq	%rax, -8(%rbp)
	movabsq	$4611686014132420608, %rax
	cmpq	%rax, -24(%rbp)
	jbe	.L6
	movl	$2147483647, %eax
	jmp	.L7
.L6:
	movq	-16(%rbp), %rax
	imulq	%rax, %rax
	cmpq	%rax, -24(%rbp)
	jb	.L8
	movq	-8(%rbp), %rax
	addq	%rax, -16(%rbp)
	jmp	.L9
.L8:
	movq	-8(%rbp), %rax
	subq	%rax, -16(%rbp)
.L9:
	shrq	-8(%rbp)
	cmpq	$0, -8(%rbp)
	jne	.L6
	movq	-16(%rbp), %rax
	imulq	%rax, %rax
	cmpq	%rax, -24(%rbp)
	jbe	.L10
	addq	$1, -16(%rbp)
.L10:
	movq	-16(%rbp), %rax
	imulq	%rax, %rax
	cmpq	%rax, -24(%rbp)
	jnb	.L11
	subq	$1, -16(%rbp)
.L11:
	movq	-16(%rbp), %rax
.L7:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	ays_sqrt, .-ays_sqrt
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jnb	.L13
	movl	$-1, %eax
	jmp	.L14
.L13:
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jne	.L15
	movl	$0, %eax
	jmp	.L14
.L15:
	movl	$1, %eax
.L14:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%llu"
.LC1:
	.string	"%llu\n%llu"
.LC2:
	.string	" %llu"
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L17
.L25:
	movl	-52(%rbp), %eax
	leal	1(%rax), %edx
	movl	-52(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -44(%rbp)
	movl	$0, el(%rip)
	movl	el(%rip), %eax
	movl	%eax, ol(%rip)
	movl	$0, -48(%rbp)
	jmp	.L18
.L21:
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L19
	movl	ol(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ol(%rip)
	movq	-40(%rbp), %rdx
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	odd(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	jmp	.L20
.L19:
	movl	el(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, el(%rip)
	movq	-40(%rbp), %rdx
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	even(%rip), %rax
	movq	%rdx, (%rcx,%rax)
.L20:
	addl	$1, -48(%rbp)
.L18:
	movl	-48(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L21
	movl	ol(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	odd(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	el(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	even(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movq	even(%rip), %rax
	movq	%rax, -32(%rbp)
	movq	8+even(%rip), %rax
	movq	%rax, -24(%rbp)
	movq	odd(%rip), %rax
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-32(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
	movq	%rax, -40(%rbp)
	movq	-40(%rbp), %rcx
	movq	-32(%rbp), %rax
	movl	$0, %edx
	divq	%rcx
	movq	%rax, -32(%rbp)
	movq	-40(%rbp), %rcx
	movq	-16(%rbp), %rax
	movl	$0, %edx
	divq	%rcx
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
	movq	%rax, -40(%rbp)
	movq	-40(%rbp), %rsi
	movq	-24(%rbp), %rax
	movl	$0, %edx
	divq	%rsi
	movq	%rax, -24(%rbp)
	movq	-40(%rbp), %rcx
	movq	-16(%rbp), %rax
	movl	$0, %edx
	divq	%rcx
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	ays_sqrt
	movq	%rax, -40(%rbp)
	movq	even(%rip), %rax
	movq	-40(%rbp), %rsi
	movl	$0, %edx
	divq	%rsi
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$1, -48(%rbp)
	jmp	.L22
.L23:
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	even(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-40(%rbp), %rdi
	movl	$0, %edx
	divq	%rdi
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -48(%rbp)
.L22:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jl	.L23
	movl	$10, %edi
	call	putchar@PLT
.L17:
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L24
	movl	-52(%rbp), %eax
	testl	%eax, %eax
	jne	.L25
.L24:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	odd
	.bss
	.align 32
	.type	odd, @object
	.size	odd, 256040
odd:
	.zero	256040
	.globl	even
	.align 32
	.type	even, @object
	.size	even, 256040
even:
	.zero	256040
	.globl	ol
	.align 4
	.type	ol, @object
	.size	ol, 4
ol:
	.zero	4
	.globl	el
	.align 4
	.type	el, @object
	.size	el, 4
el:
	.zero	4
	.text
	.globl	gcd
	.type	gcd, @function
gcd:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	jmp	.L2
.L3:
	movq	-24(%rbp), %rax
	movl	$0, %edx
	divq	-32(%rbp)
	movq	%rdx, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, -32(%rbp)
.L2:
	cmpq	$0, -32(%rbp)
	jne	.L3
	movq	-24(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	gcd, .-gcd
	.globl	ays_sqrt
	.type	ays_sqrt, @function
ays_sqrt:
.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, -24(%rbp)
	movq	$0, -16(%rbp)
	movl	$2147483648, %eax
	movq	%rax, -8(%rbp)
	movabsq	$4611686014132420608, %rax
	cmpq	%rax, -24(%rbp)
	jbe	.L6
	movl	$2147483647, %eax
	jmp	.L7
.L6:
	movq	-16(%rbp), %rax
	imulq	%rax, %rax
	cmpq	%rax, -24(%rbp)
	jb	.L8
	movq	-8(%rbp), %rax
	addq	%rax, -16(%rbp)
	jmp	.L9
.L8:
	movq	-8(%rbp), %rax
	subq	%rax, -16(%rbp)
.L9:
	shrq	-8(%rbp)
	cmpq	$0, -8(%rbp)
	jne	.L6
	movq	-16(%rbp), %rax
	imulq	%rax, %rax
	cmpq	%rax, -24(%rbp)
	jbe	.L10
	addq	$1, -16(%rbp)
.L10:
	movq	-16(%rbp), %rax
	imulq	%rax, %rax
	cmpq	%rax, -24(%rbp)
	jnb	.L11
	subq	$1, -16(%rbp)
.L11:
	movq	-16(%rbp), %rax
.L7:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	ays_sqrt, .-ays_sqrt
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jnb	.L13
	movl	$-1, %eax
	jmp	.L14
.L13:
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jne	.L15
	movl	$0, %eax
	jmp	.L14
.L15:
	movl	$1, %eax
.L14:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%llu"
.LC1:
	.string	"%llu\n%llu"
.LC2:
	.string	" %llu"
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L17
.L25:
	movl	-52(%rbp), %eax
	leal	1(%rax), %edx
	movl	-52(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -44(%rbp)
	movl	$0, el(%rip)
	movl	el(%rip), %eax
	movl	%eax, ol(%rip)
	movl	$0, -48(%rbp)
	jmp	.L18
.L21:
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L19
	movl	ol(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, ol(%rip)
	movq	-40(%rbp), %rdx
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	odd(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	jmp	.L20
.L19:
	movl	el(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, el(%rip)
	movq	-40(%rbp), %rdx
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	even(%rip), %rax
	movq	%rdx, (%rcx,%rax)
.L20:
	addl	$1, -48(%rbp)
.L18:
	movl	-48(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L21
	movl	ol(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	odd(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	el(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	even(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movq	even(%rip), %rax
	movq	%rax, -32(%rbp)
	movq	8+even(%rip), %rax
	movq	%rax, -24(%rbp)
	movq	odd(%rip), %rax
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-32(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
	movq	%rax, -40(%rbp)
	movq	-40(%rbp), %rcx
	movq	-32(%rbp), %rax
	movl	$0, %edx
	divq	%rcx
	movq	%rax, -32(%rbp)
	movq	-40(%rbp), %rcx
	movq	-16(%rbp), %rax
	movl	$0, %edx
	divq	%rcx
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
	movq	%rax, -40(%rbp)
	movq	-40(%rbp), %rsi
	movq	-24(%rbp), %rax
	movl	$0, %edx
	divq	%rsi
	movq	%rax, -24(%rbp)
	movq	-40(%rbp), %rcx
	movq	-16(%rbp), %rax
	movl	$0, %edx
	divq	%rcx
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	ays_sqrt
	movq	%rax, -40(%rbp)
	movq	even(%rip), %rax
	movq	-40(%rbp), %rsi
	movl	$0, %edx
	divq	%rsi
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$1, -48(%rbp)
	jmp	.L22
.L23:
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	even(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-40(%rbp), %rdi
	movl	$0, %edx
	divq	%rdi
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -48(%rbp)
.L22:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jl	.L23
	movl	$10, %edi
	call	putchar@PLT
.L17:
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L24
	movl	-52(%rbp), %eax
	testl	%eax, %eax
	jne	.L25
.L24:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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:
