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

```c
#include<stdio.h>
long long int gcd(long long int a, long long int b)
{
	long long int r = a % b;
	while (r > 0)
	{
		a = b;
		b = r;
		r = a % b;
	}
	return b;
}
int main()
{
	long long int n, m;
	scanf("%lld %lld", &n, &m);
	long long int i;
	long long int a[100005];
	for (i = 0; i < n; i++)
	{
		scanf("%lld", &a[i]);
		a[i] /= 2;
	}
	long long int l = a[0];
	for (i = 0; i < n; i++)
		l = l / gcd(l, a[i]) * a[i];
	for (i = 0; i < n; i++)
	{
		if (l / a[i] % 2 == 0)
		{
			printf("0\n");
			return 0;
		}
	}
	printf("%lld\n", (m / l + 1) / 2);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB0:
	.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)
	movq	-24(%rbp), %rax
	cqto
	idivq	-32(%rbp)
	movq	%rdx, -8(%rbp)
	jmp	.L2
.L3:
	movq	-32(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	-24(%rbp), %rax
	cqto
	idivq	-32(%rbp)
	movq	%rdx, -8(%rbp)
.L2:
	cmpq	$0, -8(%rbp)
	jg	.L3
	movq	-32(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	gcd, .-gcd
	.section	.rodata
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"0"
.LC3:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800072(%rbp), %rdx
	leaq	-800080(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -800064(%rbp)
	jmp	.L6
.L7:
	leaq	-800048(%rbp), %rdx
	movq	-800064(%rbp), %rax
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-800064(%rbp), %rax
	movq	-800048(%rbp,%rax,8), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movq	-800064(%rbp), %rax
	movq	%rdx, -800048(%rbp,%rax,8)
	addq	$1, -800064(%rbp)
.L6:
	movq	-800080(%rbp), %rax
	cmpq	%rax, -800064(%rbp)
	jl	.L7
	movq	-800048(%rbp), %rax
	movq	%rax, -800056(%rbp)
	movq	$0, -800064(%rbp)
	jmp	.L8
.L9:
	movq	-800064(%rbp), %rax
	movq	-800048(%rbp,%rax,8), %rdx
	movq	-800056(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
	movq	%rax, %rcx
	movq	-800056(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rax, %rdx
	movq	-800064(%rbp), %rax
	movq	-800048(%rbp,%rax,8), %rax
	imulq	%rdx, %rax
	movq	%rax, -800056(%rbp)
	addq	$1, -800064(%rbp)
.L8:
	movq	-800080(%rbp), %rax
	cmpq	%rax, -800064(%rbp)
	jl	.L9
	movq	$0, -800064(%rbp)
	jmp	.L10
.L13:
	movq	-800064(%rbp), %rax
	movq	-800048(%rbp,%rax,8), %rcx
	movq	-800056(%rbp), %rax
	cqto
	idivq	%rcx
	andl	$1, %eax
	testq	%rax, %rax
	jne	.L11
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L14
.L11:
	addq	$1, -800064(%rbp)
.L10:
	movq	-800080(%rbp), %rax
	cmpq	%rax, -800064(%rbp)
	jl	.L13
	movq	-800072(%rbp), %rax
	cqto
	idivq	-800056(%rbp)
	addq	$1, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L14:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	gcd
	.type	gcd, @function
gcd:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rsi, %rax
	movq	%rdx, %r8
	cqto
	movq	%r8, %rsi
	idivq	%r8
	testq	%rdx, %rdx
	jg	.L3
	movq	%r8, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rsi, %r8
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	gcd, .-gcd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"0"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1352, %rsp
	.cfi_def_cfa_offset 800112
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800056(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	cmpq	$0, (%rsp)
	jle	.L8
	leaq	16(%rsp), %rbx
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %r12
	movq	%rbx, %rbp
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$1, %r13
	call	__isoc99_scanf@PLT
	movq	0(%rbp), %rdx
	movq	(%rsp), %r9
	addq	$8, %rbp
	movq	%rdx, %rax
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	cmpq	%r13, %r9
	jg	.L9
	movq	16(%rsp), %rsi
	testq	%r9, %r9
	jle	.L18
	cmpq	$1, %r9
	je	.L11
	leaq	24(%rsp), %r8
	leaq	(%rbx,%r9,8), %r10
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rsi, %rax
	movq	(%r8), %rdi
	cqto
	idivq	%rdi
	testq	%rdx, %rdx
	jle	.L20
	movq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rdx, %rcx
	cqto
	idivq	%rcx
	movq	%rcx, %rax
	testq	%rdx, %rdx
	jg	.L13
.L12:
	movq	%rsi, %rax
	addq	$8, %r8
	cqto
	idivq	%rcx
	movq	%rax, %rsi
	imulq	%rdi, %rsi
	cmpq	%r10, %r8
	jne	.L14
.L11:
	xorl	%ecx, %ecx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L15:
	addq	$1, %rcx
	cmpq	%rcx, %r9
	je	.L18
.L17:
	movq	%rsi, %rax
	cqto
	idivq	(%rbx,%rcx,8)
	testb	$1, %al
	jne	.L15
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L16
.L8:
	movq	16(%rsp), %rsi
.L18:
	movq	8(%rsp), %rax
	movl	$2, %ecx
	movl	$1, %edi
	cqto
	idivq	%rsi
	leaq	.LC3(%rip), %rsi
	addq	$1, %rax
	cqto
	idivq	%rcx
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L16:
	movq	800056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$800072, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
.L30:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
.L20:
	movq	%rdi, %rcx
	jmp	.L12
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rsi, %rax
	movq	%rdx, %r8
	cqto
	movq	%r8, %rsi
	idivq	%r8
	testq	%rdx, %rdx
	jg	.L3
	movq	%r8, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rsi, %r8
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	gcd, .-gcd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"0"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1352, %rsp
	.cfi_def_cfa_offset 800112
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800056(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	cmpq	$0, (%rsp)
	jle	.L8
	leaq	16(%rsp), %rbx
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %r12
	movq	%rbx, %rbp
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$1, %r13
	call	__isoc99_scanf@PLT
	movq	0(%rbp), %rdx
	movq	(%rsp), %r9
	addq	$8, %rbp
	movq	%rdx, %rax
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	cmpq	%r13, %r9
	jg	.L9
	movq	16(%rsp), %rsi
	testq	%r9, %r9
	jle	.L18
	cmpq	$1, %r9
	je	.L11
	leaq	24(%rsp), %r8
	leaq	(%rbx,%r9,8), %r10
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rsi, %rax
	movq	(%r8), %rdi
	cqto
	idivq	%rdi
	testq	%rdx, %rdx
	jle	.L20
	movq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rdx, %rcx
	cqto
	idivq	%rcx
	movq	%rcx, %rax
	testq	%rdx, %rdx
	jg	.L13
.L12:
	movq	%rsi, %rax
	addq	$8, %r8
	cqto
	idivq	%rcx
	movq	%rax, %rsi
	imulq	%rdi, %rsi
	cmpq	%r10, %r8
	jne	.L14
.L11:
	xorl	%ecx, %ecx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L15:
	addq	$1, %rcx
	cmpq	%rcx, %r9
	je	.L18
.L17:
	movq	%rsi, %rax
	cqto
	idivq	(%rbx,%rcx,8)
	testb	$1, %al
	jne	.L15
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L16
.L8:
	movq	16(%rsp), %rsi
.L18:
	movq	8(%rsp), %rax
	movl	$2, %ecx
	movl	$1, %edi
	cqto
	idivq	%rsi
	leaq	.LC3(%rip), %rsi
	addq	$1, %rax
	cqto
	idivq	%rcx
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L16:
	movq	800056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$800072, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
.L30:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
.L20:
	movq	%rdi, %rcx
	jmp	.L12
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
long long int gcd(long long int a, long long int b)
{
	long long int r = a % b;
	while (r > 0)
	{
		a = b;
		b = r;
		r = a % b;
	}
	return b;
}
int main()
{
	long long int n, m;
	scanf("%lld %lld", &n, &m);
	long long int i;
	long long int a[100005];
	for (i = 0; i < n; i++)
	{
		scanf("%lld", &a[i]);
		a[i] /= 2;
	}
	long long int l = a[0];
	for (i = 0; i < n; i++)
		l = l / gcd(l, a[i]) * a[i];
	for (i = 0; i < n; i++)
	{
		if (l / a[i] % 2 == 0)
		{
			printf("0\n");
			return 0;
		}
	}
	printf("%lld\n", (m / l + 1) / 2);
	return 0;
}
3 000
14 22 40
 2 46
6 10
 2 46
10 10
 2 12
10 10
 2 85
6 10
 3 101
14 2 2
 3 000
14 16 40
 3 010
14 16 40
 3 010
14 16 4
 3 110
14 16 4

0
 2
 5
 1
 3
 7
 0
 0
 0
 0

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

```c
#include<stdio.h>
long long int gcd(long long int a, long long int b)
{
	long long int r = a % b;
	while (r > 0)
	{
		a = b;
		b = r;
		r = a % b;
	}
	return b;
}
int main()
{
	long long int n, m;
	scanf("%lld %lld", &n, &m);
	long long int i;
	long long int a[100005];
	for (i = 0; i < n; i++)
	{
		scanf("%lld", &a[i]);
		a[i] /= 2;
	}
	long long int l = a[0];
	for (i = 0; i < n; i++)
		l = l / gcd(l, a[i]) * a[i];
	for (i = 0; i < n; i++)
	{
		if (l / a[i] % 2 == 0)
		{
			printf("0\n");
			return 0;
		}
	}
	printf("%lld\n", (m / l + 1) / 2);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB0:
	.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)
	movq	-24(%rbp), %rax
	cqto
	idivq	-32(%rbp)
	movq	%rdx, -8(%rbp)
	jmp	.L2
.L3:
	movq	-32(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	-24(%rbp), %rax
	cqto
	idivq	-32(%rbp)
	movq	%rdx, -8(%rbp)
.L2:
	cmpq	$0, -8(%rbp)
	jg	.L3
	movq	-32(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	gcd, .-gcd
	.section	.rodata
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"0"
.LC3:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800072(%rbp), %rdx
	leaq	-800080(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -800064(%rbp)
	jmp	.L6
.L7:
	leaq	-800048(%rbp), %rdx
	movq	-800064(%rbp), %rax
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-800064(%rbp), %rax
	movq	-800048(%rbp,%rax,8), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movq	-800064(%rbp), %rax
	movq	%rdx, -800048(%rbp,%rax,8)
	addq	$1, -800064(%rbp)
.L6:
	movq	-800080(%rbp), %rax
	cmpq	%rax, -800064(%rbp)
	jl	.L7
	movq	-800048(%rbp), %rax
	movq	%rax, -800056(%rbp)
	movq	$0, -800064(%rbp)
	jmp	.L8
.L9:
	movq	-800064(%rbp), %rax
	movq	-800048(%rbp,%rax,8), %rdx
	movq	-800056(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
	movq	%rax, %rcx
	movq	-800056(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rax, %rdx
	movq	-800064(%rbp), %rax
	movq	-800048(%rbp,%rax,8), %rax
	imulq	%rdx, %rax
	movq	%rax, -800056(%rbp)
	addq	$1, -800064(%rbp)
.L8:
	movq	-800080(%rbp), %rax
	cmpq	%rax, -800064(%rbp)
	jl	.L9
	movq	$0, -800064(%rbp)
	jmp	.L10
.L13:
	movq	-800064(%rbp), %rax
	movq	-800048(%rbp,%rax,8), %rcx
	movq	-800056(%rbp), %rax
	cqto
	idivq	%rcx
	andl	$1, %eax
	testq	%rax, %rax
	jne	.L11
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L14
.L11:
	addq	$1, -800064(%rbp)
.L10:
	movq	-800080(%rbp), %rax
	cmpq	%rax, -800064(%rbp)
	jl	.L13
	movq	-800072(%rbp), %rax
	cqto
	idivq	-800056(%rbp)
	addq	$1, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L14:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	gcd
	.type	gcd, @function
gcd:
.LFB0:
	.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)
	movq	-24(%rbp), %rax
	cqto
	idivq	-32(%rbp)
	movq	%rdx, -8(%rbp)
	jmp	.L2
.L3:
	movq	-32(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	-24(%rbp), %rax
	cqto
	idivq	-32(%rbp)
	movq	%rdx, -8(%rbp)
.L2:
	cmpq	$0, -8(%rbp)
	jg	.L3
	movq	-32(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	gcd, .-gcd
	.section	.rodata
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld"
.LC2:
	.string	"0"
.LC3:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800072(%rbp), %rdx
	leaq	-800080(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -800064(%rbp)
	jmp	.L6
.L7:
	leaq	-800048(%rbp), %rdx
	movq	-800064(%rbp), %rax
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-800064(%rbp), %rax
	movq	-800048(%rbp,%rax,8), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movq	-800064(%rbp), %rax
	movq	%rdx, -800048(%rbp,%rax,8)
	addq	$1, -800064(%rbp)
.L6:
	movq	-800080(%rbp), %rax
	cmpq	%rax, -800064(%rbp)
	jl	.L7
	movq	-800048(%rbp), %rax
	movq	%rax, -800056(%rbp)
	movq	$0, -800064(%rbp)
	jmp	.L8
.L9:
	movq	-800064(%rbp), %rax
	movq	-800048(%rbp,%rax,8), %rdx
	movq	-800056(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
	movq	%rax, %rcx
	movq	-800056(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rax, %rdx
	movq	-800064(%rbp), %rax
	movq	-800048(%rbp,%rax,8), %rax
	imulq	%rdx, %rax
	movq	%rax, -800056(%rbp)
	addq	$1, -800064(%rbp)
.L8:
	movq	-800080(%rbp), %rax
	cmpq	%rax, -800064(%rbp)
	jl	.L9
	movq	$0, -800064(%rbp)
	jmp	.L10
.L13:
	movq	-800064(%rbp), %rax
	movq	-800048(%rbp,%rax,8), %rcx
	movq	-800056(%rbp), %rax
	cqto
	idivq	%rcx
	andl	$1, %eax
	testq	%rax, %rax
	jne	.L11
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L14
.L11:
	addq	$1, -800064(%rbp)
.L10:
	movq	-800080(%rbp), %rax
	cmpq	%rax, -800064(%rbp)
	jl	.L13
	movq	-800072(%rbp), %rax
	cqto
	idivq	-800056(%rbp)
	addq	$1, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L14:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
