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>
int main()
{
	long long int t1, t2;
	scanf("%lld %lld", &t1, &t2);
	long long int a1, a2;
	scanf("%lld %lld", &a1, &a2);
	long long int b1, b2;
	scanf("%lld %lld", &b1, &b2);
	if (a1 * t1 + a2 * t2 == b1 * t1 + b2 * t2)
	{
		printf("infinity\n");
		return 0;
	}
	if (a1 * t1 + a2 * t2 < b1 * t1 + b2 * t2)
	{
		a1 ^= b1;
		b1 ^= a1;
		a1 ^= b1;
		a2 ^= b2;
		b2 ^= a2;
		a2 ^= b2;
	}
	if (a1 > b1)
	{
		printf("0\n");
		return 0;
	}
	long long int d = a1 * t1 + a2 * t2 - b1 * t1 - b2 * t2;
	long long int ans = 1;
	ans += 2 * (((b1 - a1) * t1 - 1) / d);
	if ((b1 - a1) * t1 % d == 0)ans++;
	printf("%lld\n", ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"infinity"
.LC2:
	.string	"0"
.LC3:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-48(%rbp), %rdx
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-32(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-56(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movq	-48(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, %rcx
	movq	-40(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rsi
	imulq	%rax, %rsi
	movq	-32(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rsi, %rax
	cmpq	%rax, %rcx
	jne	.L2
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L7
.L2:
	movq	-56(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movq	-48(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, %rcx
	movq	-40(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rsi
	imulq	%rax, %rsi
	movq	-32(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rsi, %rax
	cmpq	%rax, %rcx
	jge	.L4
	movq	-56(%rbp), %rdx
	movq	-40(%rbp), %rax
	xorq	%rdx, %rax
	movq	%rax, -56(%rbp)
	movq	-40(%rbp), %rdx
	movq	-56(%rbp), %rax
	xorq	%rdx, %rax
	movq	%rax, -40(%rbp)
	movq	-56(%rbp), %rdx
	movq	-40(%rbp), %rax
	xorq	%rdx, %rax
	movq	%rax, -56(%rbp)
	movq	-48(%rbp), %rdx
	movq	-32(%rbp), %rax
	xorq	%rdx, %rax
	movq	%rax, -48(%rbp)
	movq	-32(%rbp), %rdx
	movq	-48(%rbp), %rax
	xorq	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-48(%rbp), %rdx
	movq	-32(%rbp), %rax
	xorq	%rdx, %rax
	movq	%rax, -48(%rbp)
.L4:
	movq	-56(%rbp), %rdx
	movq	-40(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L5
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L7
.L5:
	movq	-56(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movq	-48(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, %rcx
	movq	-40(%rbp), %rdx
	movq	-72(%rbp), %rax
	imulq	%rdx, %rax
	subq	%rax, %rcx
	movq	-32(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	$1, -24(%rbp)
	movq	-40(%rbp), %rax
	movq	-56(%rbp), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-72(%rbp), %rax
	imulq	%rdx, %rax
	subq	$1, %rax
	cqto
	idivq	-16(%rbp)
	addq	%rax, %rax
	addq	%rax, -24(%rbp)
	movq	-40(%rbp), %rax
	movq	-56(%rbp), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-72(%rbp), %rax
	imulq	%rdx, %rax
	cqto
	idivq	-16(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L6
	addq	$1, -24(%rbp)
.L6:
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L7:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"infinity"
.LC2:
	.string	"0"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rbp, %rdi
	subq	$64, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	leaq	32(%rsp), %rdx
	xorl	%eax, %eax
	leaq	24(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	leaq	48(%rsp), %rdx
	xorl	%eax, %eax
	leaq	40(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rdi
	movq	24(%rsp), %rcx
	movq	32(%rsp), %rbx
	movq	16(%rsp), %rax
	movq	40(%rsp), %rdx
	movq	48(%rsp), %rbp
	movq	%rcx, %r10
	movq	%rdi, %r8
	movq	%rbx, %r11
	imulq	%rdi, %r10
	imulq	%rax, %r11
	imulq	%rdx, %r8
	imulq	%rbp, %rax
	leaq	(%r10,%r11), %rsi
	leaq	(%r8,%rax), %r9
	cmpq	%r9, %rsi
	je	.L11
	jl	.L12
.L4:
	cmpq	%rdx, %rcx
	jg	.L13
	subq	%rcx, %rdx
	subq	%r8, %rsi
	movq	%rdx, %rcx
	subq	%rax, %rsi
	imulq	%rdi, %rcx
	leaq	-1(%rcx), %rax
	cqto
	idivq	%rsi
	movq	%rax, %rdi
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	je	.L6
	leaq	(%rdi,%rdi), %rax
	leaq	1(%rax), %rdx
.L7:
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$64, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	movq	%rcx, %r12
	movq	%rcx, 40(%rsp)
	movq	%r11, %rax
	movq	%rdx, %rcx
	movq	%rdx, 24(%rsp)
	movq	%r10, %r8
	movq	%r9, %rsi
	movq	%r12, %rdx
	movq	%rbx, 48(%rsp)
	movq	%rbp, 32(%rsp)
	jmp	.L4
.L6:
	leaq	1(%rdi), %rdx
	addq	%rdx, %rdx
	jmp	.L7
.L13:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L3
.L11:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L3
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"infinity"
.LC2:
	.string	"0"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rbp, %rdi
	subq	$64, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	leaq	32(%rsp), %rdx
	xorl	%eax, %eax
	leaq	24(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	leaq	48(%rsp), %rdx
	xorl	%eax, %eax
	leaq	40(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rdi
	movq	24(%rsp), %rcx
	movq	32(%rsp), %rbx
	movq	16(%rsp), %rax
	movq	40(%rsp), %rdx
	movq	48(%rsp), %rbp
	movq	%rcx, %r10
	movq	%rdi, %r8
	movq	%rbx, %r11
	imulq	%rdi, %r10
	imulq	%rax, %r11
	imulq	%rdx, %r8
	imulq	%rbp, %rax
	leaq	(%r10,%r11), %rsi
	leaq	(%r8,%rax), %r9
	cmpq	%r9, %rsi
	je	.L11
	jl	.L12
.L4:
	cmpq	%rdx, %rcx
	jg	.L13
	subq	%rcx, %rdx
	subq	%r8, %rsi
	movq	%rdx, %rcx
	subq	%rax, %rsi
	imulq	%rdi, %rcx
	leaq	-1(%rcx), %rax
	cqto
	idivq	%rsi
	movq	%rax, %rdi
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	je	.L6
	leaq	(%rdi,%rdi), %rax
	leaq	1(%rax), %rdx
.L7:
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$64, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	movq	%rcx, %r12
	movq	%rcx, 40(%rsp)
	movq	%r11, %rax
	movq	%rdx, %rcx
	movq	%rdx, 24(%rsp)
	movq	%r10, %r8
	movq	%r9, %rsi
	movq	%r12, %rdx
	movq	%rbx, 48(%rsp)
	movq	%rbp, 32(%rsp)
	jmp	.L4
.L6:
	leaq	1(%rdi), %rdx
	addq	%rdx, %rdx
	jmp	.L7
.L13:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L3
.L11:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L3
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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>
int main()
{
	long long int t1, t2;
	scanf("%lld %lld", &t1, &t2);
	long long int a1, a2;
	scanf("%lld %lld", &a1, &a2);
	long long int b1, b2;
	scanf("%lld %lld", &b1, &b2);
	if (a1 * t1 + a2 * t2 == b1 * t1 + b2 * t2)
	{
		printf("infinity\n");
		return 0;
	}
	if (a1 * t1 + a2 * t2 < b1 * t1 + b2 * t2)
	{
		a1 ^= b1;
		b1 ^= a1;
		a1 ^= b1;
		a2 ^= b2;
		b2 ^= a2;
		a2 ^= b2;
	}
	if (a1 > b1)
	{
		printf("0\n");
		return 0;
	}
	long long int d = a1 * t1 + a2 * t2 - b1 * t1 - b2 * t2;
	long long int ans = 1;
	ans += 2 * (((b1 - a1) * t1 - 1) / d);
	if ((b1 - a1) * t1 % d == 0)ans++;
	printf("%lld\n", ans);
	return 0;
}
1 2
10 10
12 5
 100 1
111 101
102 1
 100 2
100 101
102 1
 1 1
1 20
12 5
 100 2
100 101
102 0
 1 1
2 20
12 5
 100 2
100 111
102 0
 1 1
0 20
12 5
 30901 15700
2647944172 11366428589
5864465524 4464634034
 1 -2
-2 1
1 3

1
 0
 infinity
 5
 200
 4
 19
 8
 23
 6

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>
int main()
{
	long long int t1, t2;
	scanf("%lld %lld", &t1, &t2);
	long long int a1, a2;
	scanf("%lld %lld", &a1, &a2);
	long long int b1, b2;
	scanf("%lld %lld", &b1, &b2);
	if (a1 * t1 + a2 * t2 == b1 * t1 + b2 * t2)
	{
		printf("infinity\n");
		return 0;
	}
	if (a1 * t1 + a2 * t2 < b1 * t1 + b2 * t2)
	{
		a1 ^= b1;
		b1 ^= a1;
		a1 ^= b1;
		a2 ^= b2;
		b2 ^= a2;
		a2 ^= b2;
	}
	if (a1 > b1)
	{
		printf("0\n");
		return 0;
	}
	long long int d = a1 * t1 + a2 * t2 - b1 * t1 - b2 * t2;
	long long int ans = 1;
	ans += 2 * (((b1 - a1) * t1 - 1) / d);
	if ((b1 - a1) * t1 % d == 0)ans++;
	printf("%lld\n", ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"infinity"
.LC2:
	.string	"0"
.LC3:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-48(%rbp), %rdx
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-32(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-56(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movq	-48(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, %rcx
	movq	-40(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rsi
	imulq	%rax, %rsi
	movq	-32(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rsi, %rax
	cmpq	%rax, %rcx
	jne	.L2
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L7
.L2:
	movq	-56(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movq	-48(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, %rcx
	movq	-40(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rsi
	imulq	%rax, %rsi
	movq	-32(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rsi, %rax
	cmpq	%rax, %rcx
	jge	.L4
	movq	-56(%rbp), %rdx
	movq	-40(%rbp), %rax
	xorq	%rdx, %rax
	movq	%rax, -56(%rbp)
	movq	-40(%rbp), %rdx
	movq	-56(%rbp), %rax
	xorq	%rdx, %rax
	movq	%rax, -40(%rbp)
	movq	-56(%rbp), %rdx
	movq	-40(%rbp), %rax
	xorq	%rdx, %rax
	movq	%rax, -56(%rbp)
	movq	-48(%rbp), %rdx
	movq	-32(%rbp), %rax
	xorq	%rdx, %rax
	movq	%rax, -48(%rbp)
	movq	-32(%rbp), %rdx
	movq	-48(%rbp), %rax
	xorq	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-48(%rbp), %rdx
	movq	-32(%rbp), %rax
	xorq	%rdx, %rax
	movq	%rax, -48(%rbp)
.L4:
	movq	-56(%rbp), %rdx
	movq	-40(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L5
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L7
.L5:
	movq	-56(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movq	-48(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, %rcx
	movq	-40(%rbp), %rdx
	movq	-72(%rbp), %rax
	imulq	%rdx, %rax
	subq	%rax, %rcx
	movq	-32(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	$1, -24(%rbp)
	movq	-40(%rbp), %rax
	movq	-56(%rbp), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-72(%rbp), %rax
	imulq	%rdx, %rax
	subq	$1, %rax
	cqto
	idivq	-16(%rbp)
	addq	%rax, %rax
	addq	%rax, -24(%rbp)
	movq	-40(%rbp), %rax
	movq	-56(%rbp), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-72(%rbp), %rax
	imulq	%rdx, %rax
	cqto
	idivq	-16(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L6
	addq	$1, -24(%rbp)
.L6:
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L7:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"infinity"
.LC2:
	.string	"0"
.LC3:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-48(%rbp), %rdx
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-32(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-56(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movq	-48(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, %rcx
	movq	-40(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rsi
	imulq	%rax, %rsi
	movq	-32(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rsi, %rax
	cmpq	%rax, %rcx
	jne	.L2
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L7
.L2:
	movq	-56(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movq	-48(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, %rcx
	movq	-40(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rsi
	imulq	%rax, %rsi
	movq	-32(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rsi, %rax
	cmpq	%rax, %rcx
	jge	.L4
	movq	-56(%rbp), %rdx
	movq	-40(%rbp), %rax
	xorq	%rdx, %rax
	movq	%rax, -56(%rbp)
	movq	-40(%rbp), %rdx
	movq	-56(%rbp), %rax
	xorq	%rdx, %rax
	movq	%rax, -40(%rbp)
	movq	-56(%rbp), %rdx
	movq	-40(%rbp), %rax
	xorq	%rdx, %rax
	movq	%rax, -56(%rbp)
	movq	-48(%rbp), %rdx
	movq	-32(%rbp), %rax
	xorq	%rdx, %rax
	movq	%rax, -48(%rbp)
	movq	-32(%rbp), %rdx
	movq	-48(%rbp), %rax
	xorq	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-48(%rbp), %rdx
	movq	-32(%rbp), %rax
	xorq	%rdx, %rax
	movq	%rax, -48(%rbp)
.L4:
	movq	-56(%rbp), %rdx
	movq	-40(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L5
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L7
.L5:
	movq	-56(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movq	-48(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	addq	%rax, %rcx
	movq	-40(%rbp), %rdx
	movq	-72(%rbp), %rax
	imulq	%rdx, %rax
	subq	%rax, %rcx
	movq	-32(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	$1, -24(%rbp)
	movq	-40(%rbp), %rax
	movq	-56(%rbp), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-72(%rbp), %rax
	imulq	%rdx, %rax
	subq	$1, %rax
	cqto
	idivq	-16(%rbp)
	addq	%rax, %rax
	addq	%rax, -24(%rbp)
	movq	-40(%rbp), %rax
	movq	-56(%rbp), %rcx
	subq	%rcx, %rax
	movq	%rax, %rdx
	movq	-72(%rbp), %rax
	imulq	%rdx, %rax
	cqto
	idivq	-16(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L6
	addq	$1, -24(%rbp)
.L6:
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L7:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
