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

```c
#include <float.h>
#include <inttypes.h>
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <math.h>
#ifdef __cplusplus
#include <bits/stdc++.h>
#endif

uint32_t nextpint(void){ char c=getchar_unlocked(); while(c<'0'||'9'<c) c=getchar_unlocked(); uint32_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getchar_unlocked(); } return x; }
uint64_t nextplong(void){ char c=getchar_unlocked(); while(c<'0'||'9'<c) c=getchar_unlocked(); uint64_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getchar_unlocked(); } return x; }
void printint(int32_t x){ if(x<0){x=-x; putchar_unlocked('-');}else if(x==0){putchar_unlocked('0');} int d=0; char s[10]; while(x){ s[d]='0'+x%10; x/=10; d++; } for (int i=d-1; i>=0; i--) putchar_unlocked(s[i]); putchar_unlocked('\n'); }
void printlong(int64_t x){ if(x<0){x=-x; putchar_unlocked('-');}else if(x==0){putchar_unlocked('0');} int d=0; char s[20]; while(x){ s[d]='0'+x%10; x/=10; d++; } for (int i=d-1; i>=0; i--) putchar_unlocked(s[i]); putchar_unlocked('\n'); }

int main(void){
	uint32_t t1=nextpint();
	uint32_t t2=nextpint();
	int64_t a1=nextplong();
	int64_t a2=nextplong();
	int64_t b1=nextplong();
	int64_t b2=nextplong();
	int64_t d1=(a1-b1)*t1;
	int64_t d2=(a2-b2)*t2;
	int64_t d=d1+d2;
	if(d==0){
		puts("infinity");
	}else if((d1<0)==(d<0)){
		puts("0");
	}else{
		d1=-d1;
		int64_t ans=d1/d*2+(d1/d*d!=d1);
		printlong(ans);
	}
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	nextpint
	.type	nextpint, @function
nextpint:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	call	getchar_unlocked@PLT
	movb	%al, -5(%rbp)
	jmp	.L2
.L3:
	call	getchar_unlocked@PLT
	movb	%al, -5(%rbp)
.L2:
	cmpb	$47, -5(%rbp)
	jle	.L3
	cmpb	$57, -5(%rbp)
	jg	.L3
	movl	$0, -4(%rbp)
	jmp	.L4
.L6:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movsbl	-5(%rbp), %eax
	addl	%edx, %eax
	subl	$48, %eax
	movl	%eax, -4(%rbp)
	call	getchar_unlocked@PLT
	movb	%al, -5(%rbp)
.L4:
	cmpb	$47, -5(%rbp)
	jle	.L5
	cmpb	$57, -5(%rbp)
	jle	.L6
.L5:
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	nextpint, .-nextpint
	.globl	nextplong
	.type	nextplong, @function
nextplong:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	call	getchar_unlocked@PLT
	movb	%al, -9(%rbp)
	jmp	.L9
.L10:
	call	getchar_unlocked@PLT
	movb	%al, -9(%rbp)
.L9:
	cmpb	$47, -9(%rbp)
	jle	.L10
	cmpb	$57, -9(%rbp)
	jg	.L10
	movq	$0, -8(%rbp)
	jmp	.L11
.L13:
	movq	-8(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	movq	%rax, %rdx
	movsbq	-9(%rbp), %rax
	addq	%rdx, %rax
	subq	$48, %rax
	movq	%rax, -8(%rbp)
	call	getchar_unlocked@PLT
	movb	%al, -9(%rbp)
.L11:
	cmpb	$47, -9(%rbp)
	jle	.L12
	cmpb	$57, -9(%rbp)
	jle	.L13
.L12:
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	nextplong, .-nextplong
	.globl	printint
	.type	printint, @function
printint:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -36(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	cmpl	$0, -36(%rbp)
	jns	.L16
	negl	-36(%rbp)
	movl	$45, %edi
	call	putchar_unlocked@PLT
	jmp	.L17
.L16:
	cmpl	$0, -36(%rbp)
	jne	.L17
	movl	$48, %edi
	call	putchar_unlocked@PLT
.L17:
	movl	$0, -28(%rbp)
	jmp	.L18
.L19:
	movl	-36(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	addl	%eax, %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	%ecx, %eax
	addl	$48, %eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	cltq
	movb	%dl, -18(%rbp,%rax)
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -36(%rbp)
	addl	$1, -28(%rbp)
.L18:
	cmpl	$0, -36(%rbp)
	jne	.L19
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L20
.L21:
	movl	-24(%rbp), %eax
	cltq
	movzbl	-18(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar_unlocked@PLT
	subl	$1, -24(%rbp)
.L20:
	cmpl	$0, -24(%rbp)
	jns	.L21
	movl	$10, %edi
	call	putchar_unlocked@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	printint, .-printint
	.globl	printlong
	.type	printlong, @function
printlong:
.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	%rdi, -56(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	cmpq	$0, -56(%rbp)
	jns	.L24
	negq	-56(%rbp)
	movl	$45, %edi
	call	putchar_unlocked@PLT
	jmp	.L25
.L24:
	cmpq	$0, -56(%rbp)
	jne	.L25
	movl	$48, %edi
	call	putchar_unlocked@PLT
.L25:
	movl	$0, -40(%rbp)
	jmp	.L26
.L27:
	movq	-56(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movl	%edx, %eax
	addl	$48, %eax
	movl	%eax, %edx
	movl	-40(%rbp), %eax
	cltq
	movb	%dl, -32(%rbp,%rax)
	movq	-56(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	movq	%rax, -56(%rbp)
	addl	$1, -40(%rbp)
.L26:
	cmpq	$0, -56(%rbp)
	jne	.L27
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -36(%rbp)
	jmp	.L28
.L29:
	movl	-36(%rbp), %eax
	cltq
	movzbl	-32(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar_unlocked@PLT
	subl	$1, -36(%rbp)
.L28:
	cmpl	$0, -36(%rbp)
	jns	.L29
	movl	$10, %edi
	call	putchar_unlocked@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	printlong, .-printlong
	.section	.rodata
.LC0:
	.string	"infinity"
.LC1:
	.string	"0"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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
	call	nextpint
	movl	%eax, -72(%rbp)
	call	nextpint
	movl	%eax, -68(%rbp)
	call	nextplong
	movq	%rax, -64(%rbp)
	call	nextplong
	movq	%rax, -56(%rbp)
	call	nextplong
	movq	%rax, -48(%rbp)
	call	nextplong
	movq	%rax, -40(%rbp)
	movq	-64(%rbp), %rax
	subq	-48(%rbp), %rax
	movq	%rax, %rdx
	movl	-72(%rbp), %eax
	imulq	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-56(%rbp), %rax
	subq	-40(%rbp), %rax
	movq	%rax, %rdx
	movl	-68(%rbp), %eax
	imulq	%rdx, %rax
	movq	%rax, -24(%rbp)
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -16(%rbp)
	cmpq	$0, -16(%rbp)
	jne	.L32
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L33
.L32:
	movq	-32(%rbp), %rax
	xorq	-16(%rbp), %rax
	testq	%rax, %rax
	js	.L34
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L33
.L34:
	negq	-32(%rbp)
	movq	-32(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	leaq	(%rax,%rax), %rcx
	movq	-32(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	imulq	-16(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	setne	%al
	movzbl	%al, %eax
	addq	%rcx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	printlong
.L33:
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	nextpint
	.type	nextpint, @function
nextpint:
.LFB63:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
	cmpq	%rsi, %rax
	jnb	.L17
	leaq	1(%rax), %rcx
	movq	%rcx, 8(%rdi)
	movzbl	(%rax), %edx
	movl	%edx, %eax
.L3:
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L8
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	1(%rcx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rcx), %edx
	movl	%edx, %ecx
	subl	$48, %ecx
	cmpb	$9, %cl
	jbe	.L9
.L6:
	movq	%rax, %rcx
.L8:
	cmpq	%rsi, %rcx
	jb	.L5
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %edx
	leal	-48(%rdx), %ecx
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
	cmpb	$9, %cl
	ja	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	xorl	%r12d, %r12d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %edx
	leal	-48(%rdx), %eax
	cmpb	$9, %al
	ja	.L1
.L11:
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
.L13:
	leal	(%r12,%r12,4), %ecx
	movsbl	%dl, %edx
	leal	-48(%rdx,%rcx,2), %r12d
	cmpq	%rsi, %rax
	jb	.L10
	call	__uflow@PLT
	movl	%eax, %edx
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L1
	movq	stdin(%rip), %rdi
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L1:
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	movq	%rcx, %rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L17:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %edx
	movq	8(%rdi), %rcx
	movq	16(%rdi), %rsi
	jmp	.L3
	.cfi_endproc
.LFE63:
	.size	nextpint, .-nextpint
	.p2align 4
	.globl	nextplong
	.type	nextplong, @function
nextplong:
.LFB64:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
	cmpq	%rsi, %rax
	jnb	.L33
	leaq	1(%rax), %rcx
	movq	%rcx, 8(%rdi)
	movzbl	(%rax), %edx
	movl	%edx, %eax
.L20:
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L25
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L22:
	leaq	1(%rcx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rcx), %edx
	movl	%edx, %ecx
	subl	$48, %ecx
	cmpb	$9, %cl
	jbe	.L26
.L23:
	movq	%rax, %rcx
.L25:
	cmpq	%rsi, %rcx
	jb	.L22
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %edx
	leal	-48(%rdx), %ecx
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
	cmpb	$9, %cl
	ja	.L23
	.p2align 4,,10
	.p2align 3
.L26:
	xorl	%r12d, %r12d
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L27:
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %edx
	leal	-48(%rdx), %eax
	cmpb	$9, %al
	ja	.L18
.L28:
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
.L30:
	leaq	(%r12,%r12,4), %rcx
	movsbq	%dl, %rdx
	leaq	-48(%rdx,%rcx,2), %r12
	cmpq	%rsi, %rax
	jb	.L27
	call	__uflow@PLT
	movl	%eax, %edx
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L18
	movq	stdin(%rip), %rdi
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L18:
	movq	%r12, %rax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	movq	%rcx, %rax
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L33:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %edx
	movq	8(%rdi), %rcx
	movq	16(%rdi), %rsi
	jmp	.L20
	.cfi_endproc
.LFE64:
	.size	nextplong, .-nextplong
	.p2align 4
	.globl	printint
	.type	printint, @function
printint:
.LFB65:
	.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
	movl	%edi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	stdout(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	48(%rdi), %rdx
	movq	40(%rdi), %rax
	testl	%ebp, %ebp
	js	.L107
	je	.L108
.L37:
	movl	%ebp, %ebx
	movl	$3435973837, %ecx
	imulq	%rcx, %rbx
	shrq	$35, %rbx
	leal	(%rbx,%rbx,4), %eax
	addl	%eax, %eax
	subl	%eax, %ebp
	addl	$48, %ebp
	movb	%bpl, 14(%rsp)
	testl	%ebx, %ebx
	je	.L64
	movl	%ebx, %eax
	imulq	%rcx, %rax
	shrq	$35, %rax
	leal	(%rax,%rax,4), %edx
	addl	%edx, %edx
	subl	%edx, %ebx
	addl	$48, %ebx
	movb	%bl, 15(%rsp)
	testl	%eax, %eax
	je	.L67
	movl	%eax, %edx
	imulq	%rcx, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %esi
	addl	%esi, %esi
	subl	%esi, %eax
	addl	$48, %eax
	movb	%al, 16(%rsp)
	testl	%edx, %edx
	je	.L68
	movl	%edx, %eax
	imulq	%rcx, %rax
	shrq	$35, %rax
	leal	(%rax,%rax,4), %esi
	addl	%esi, %esi
	subl	%esi, %edx
	addl	$48, %edx
	movb	%dl, 17(%rsp)
	testl	%eax, %eax
	je	.L69
	movl	%eax, %edx
	imulq	%rcx, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %esi
	addl	%esi, %esi
	subl	%esi, %eax
	addl	$48, %eax
	movb	%al, 18(%rsp)
	testl	%edx, %edx
	je	.L70
	movl	%edx, %eax
	imulq	%rcx, %rax
	shrq	$35, %rax
	leal	(%rax,%rax,4), %esi
	addl	%esi, %esi
	subl	%esi, %edx
	addl	$48, %edx
	movb	%dl, 19(%rsp)
	testl	%eax, %eax
	je	.L71
	movl	%eax, %edx
	imulq	%rcx, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %esi
	addl	%esi, %esi
	subl	%esi, %eax
	addl	$48, %eax
	movb	%al, 20(%rsp)
	testl	%edx, %edx
	je	.L72
	movl	%edx, %eax
	imulq	%rcx, %rax
	shrq	$35, %rax
	leal	(%rax,%rax,4), %esi
	addl	%esi, %esi
	subl	%esi, %edx
	addl	$48, %edx
	movb	%dl, 21(%rsp)
	testl	%eax, %eax
	je	.L73
	movl	%eax, %edx
	movl	$8, %ebx
	imulq	%rcx, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %eax
	addl	$48, %eax
	movb	%al, 22(%rsp)
	testl	%edx, %edx
	je	.L64
	addl	$48, %edx
	movl	$9, %ebx
	movb	%dl, 23(%rsp)
.L64:
	movslq	%ebx, %rax
	movzbl	14(%rsp,%rax), %edx
	movq	40(%rdi), %rax
	cmpq	%rax, 48(%rdi)
	jbe	.L40
	leaq	1(%rax), %rcx
	movq	%rcx, 40(%rdi)
	movb	%dl, (%rax)
.L41:
	leal	-1(%rbx), %eax
	testl	%ebx, %ebx
	je	.L39
	movq	stdout(%rip), %rdi
	cltq
	movzbl	14(%rsp,%rax), %edx
	movq	40(%rdi), %rax
	cmpq	%rax, 48(%rdi)
	jbe	.L43
	leaq	1(%rax), %rcx
	movq	%rcx, 40(%rdi)
	movb	%dl, (%rax)
.L44:
	leal	-2(%rbx), %eax
	cmpl	$1, %ebx
	je	.L39
	movq	stdout(%rip), %rdi
	cltq
	movzbl	14(%rsp,%rax), %edx
	movq	40(%rdi), %rax
	cmpq	%rax, 48(%rdi)
	jbe	.L45
	leaq	1(%rax), %rcx
	movq	%rcx, 40(%rdi)
	movb	%dl, (%rax)
.L46:
	leal	-3(%rbx), %eax
	cmpl	$2, %ebx
	je	.L39
	movq	stdout(%rip), %rdi
	cltq
	movzbl	14(%rsp,%rax), %edx
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L47
	leaq	1(%rax), %rcx
	movq	%rcx, 40(%rdi)
	movb	%dl, (%rax)
.L48:
	leal	-4(%rbx), %eax
	cmpl	$3, %ebx
	je	.L39
	movq	stdout(%rip), %rdi
	cltq
	movzbl	14(%rsp,%rax), %edx
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L49
	leaq	1(%rax), %rcx
	movq	%rcx, 40(%rdi)
	movb	%dl, (%rax)
.L50:
	leal	-5(%rbx), %eax
	cmpl	$4, %ebx
	je	.L39
	movq	stdout(%rip), %rdi
	cltq
	movzbl	14(%rsp,%rax), %edx
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L51
	leaq	1(%rax), %rcx
	movq	%rcx, 40(%rdi)
	movb	%dl, (%rax)
.L52:
	leal	-6(%rbx), %eax
	cmpl	$5, %ebx
	je	.L39
	movq	stdout(%rip), %rdi
	cltq
	movzbl	14(%rsp,%rax), %edx
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L53
	leaq	1(%rax), %rcx
	movq	%rcx, 40(%rdi)
	movb	%dl, (%rax)
.L54:
	leal	-7(%rbx), %eax
	cmpl	$6, %ebx
	je	.L39
	movq	stdout(%rip), %rdi
	cltq
	movzbl	14(%rsp,%rax), %edx
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L55
	leaq	1(%rax), %rcx
	movq	%rcx, 40(%rdi)
	movb	%dl, (%rax)
.L56:
	leal	-8(%rbx), %r12d
	cmpl	$7, %ebx
	je	.L39
	movq	stdout(%rip), %rdi
	movslq	%r12d, %rax
	movzbl	14(%rsp,%rax), %edx
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L57
	leaq	1(%rax), %rcx
	movq	%rcx, 40(%rdi)
	movb	%dl, (%rax)
.L58:
	testl	%r12d, %r12d
	je	.L39
	movq	stdout(%rip), %rdi
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L109
	leaq	1(%rax), %rdx
	movq	%rdx, 40(%rdi)
	movb	%bpl, (%rax)
.L39:
	movq	stdout(%rip), %rdi
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L110
	leaq	1(%rax), %rdx
	movq	%rdx, 40(%rdi)
	movb	$10, (%rax)
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L104
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L108:
	.cfi_restore_state
	cmpq	%rdx, %rax
	jnb	.L111
	leaq	1(%rax), %rdx
	movq	%rdx, 40(%rdi)
	movb	$48, (%rax)
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L107:
	negl	%ebp
	cmpq	%rdx, %rax
	jnb	.L112
	leaq	1(%rax), %rdx
	movq	%rdx, 40(%rdi)
	movb	$45, (%rax)
	movq	stdout(%rip), %rdi
	jmp	.L37
.L45:
	movzbl	%dl, %esi
	call	__overflow@PLT
	jmp	.L46
	.p2align 4,,10
	.p2align 3
.L110:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L104
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	movl	$10, %esi
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	__overflow@PLT
.L40:
	.cfi_restore_state
	movzbl	%dl, %esi
	call	__overflow@PLT
	jmp	.L41
.L43:
	movzbl	%dl, %esi
	call	__overflow@PLT
	jmp	.L44
.L69:
	movl	$3, %ebx
	jmp	.L64
.L67:
	movl	$1, %ebx
	jmp	.L64
.L47:
	movzbl	%dl, %esi
	call	__overflow@PLT
	jmp	.L48
.L68:
	movl	$2, %ebx
	jmp	.L64
.L112:
	movl	$45, %esi
	call	__overflow@PLT
	movq	stdout(%rip), %rdi
	jmp	.L37
.L49:
	movzbl	%dl, %esi
	call	__overflow@PLT
	jmp	.L50
.L70:
	movl	$4, %ebx
	jmp	.L64
.L51:
	movzbl	%dl, %esi
	call	__overflow@PLT
	jmp	.L52
.L71:
	movl	$5, %ebx
	jmp	.L64
.L72:
	movl	$6, %ebx
	jmp	.L64
.L53:
	movzbl	%dl, %esi
	call	__overflow@PLT
	jmp	.L54
.L111:
	movl	$48, %esi
	call	__overflow@PLT
	jmp	.L39
.L73:
	movl	$7, %ebx
	jmp	.L64
.L55:
	movzbl	%dl, %esi
	call	__overflow@PLT
	jmp	.L56
.L57:
	movzbl	%dl, %esi
	call	__overflow@PLT
	jmp	.L58
.L109:
	movzbl	%bpl, %esi
	call	__overflow@PLT
	jmp	.L39
.L104:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE65:
	.size	printint, .-printint
	.p2align 4
	.globl	printlong
	.type	printlong, @function
printlong:
.LFB66:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 64
	movq	stdout(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	48(%rdi), %rdx
	movq	40(%rdi), %rax
	testq	%rbx, %rbx
	js	.L132
	jne	.L116
	cmpq	%rdx, %rax
	jnb	.L133
	leaq	1(%rax), %rdx
	movq	%rdx, 40(%rdi)
	movb	$48, (%rax)
.L118:
	movq	stdout(%rip), %rdi
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L134
	leaq	1(%rax), %rdx
	movq	%rdx, 40(%rdi)
	movb	$10, (%rax)
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L129
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L132:
	.cfi_restore_state
	negq	%rbx
	cmpq	%rdx, %rax
	jnb	.L135
	leaq	1(%rax), %rdx
	movq	%rdx, 40(%rdi)
	movb	$45, (%rax)
	movq	stdout(%rip), %rdi
.L116:
	movabsq	$-3689348814741910323, %r9
	xorl	%ecx, %ecx
	movq	%rsp, %rsi
	.p2align 4,,10
	.p2align 3
.L119:
	movq	%rbx, %rax
	movslq	%ecx, %r8
	mulq	%r9
	shrq	$3, %rdx
	leaq	(%rdx,%rdx,4), %rax
	addq	%rax, %rax
	subq	%rax, %rbx
	movq	%rcx, %rax
	addl	$48, %ebx
	movb	%bl, (%rsi,%rcx)
	movq	%rdx, %rbx
	addq	$1, %rcx
	testq	%rdx, %rdx
	jne	.L119
	leaq	-1(%rsp,%r8), %rbp
	leaq	(%rsi,%r8), %rbx
	subq	%rax, %rbp
	jmp	.L122
	.p2align 4,,10
	.p2align 3
.L137:
	movq	stdout(%rip), %rdi
.L122:
	movzbl	(%rbx), %esi
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L136
	leaq	1(%rax), %rdx
	movq	%rdx, 40(%rdi)
	movb	%sil, (%rax)
.L121:
	subq	$1, %rbx
	cmpq	%rbx, %rbp
	jne	.L137
	jmp	.L118
	.p2align 4,,10
	.p2align 3
.L136:
	call	__overflow@PLT
	jmp	.L121
	.p2align 4,,10
	.p2align 3
.L134:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L129
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movl	$10, %esi
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	__overflow@PLT
.L135:
	.cfi_restore_state
	movl	$45, %esi
	call	__overflow@PLT
	movq	stdout(%rip), %rdi
	jmp	.L116
.L133:
	movl	$48, %esi
	call	__overflow@PLT
	jmp	.L118
.L129:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE66:
	.size	printlong, .-printlong
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"infinity"
.LC1:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB67:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	nextpint
	movl	%eax, %r13d
	call	nextpint
	movl	%eax, %r12d
	call	nextplong
	movq	%rax, %rbp
	call	nextplong
	movq	%rax, %rbx
	call	nextplong
	movq	%rax, %r14
	call	nextplong
	movq	%rax, %r8
	movq	%rbp, %rax
	subq	%r8, %rbx
	subq	%r14, %rax
	movq	%rbx, %rdx
	imulq	%r13, %rax
	imulq	%r12, %rdx
	movq	%rdx, %rcx
	addq	%rax, %rcx
	je	.L143
	movq	%rax, %rsi
	xorq	%rcx, %rsi
	js	.L141
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L140:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L141:
	.cfi_restore_state
	negq	%rax
	xorl	%edi, %edi
	cqto
	movq	%rax, %rsi
	idivq	%rcx
	movq	%rcx, %rdx
	imulq	%rax, %rdx
	cmpq	%rsi, %rdx
	setne	%dil
	addq	%rax, %rax
	addq	%rax, %rdi
	call	printlong
	jmp	.L140
.L143:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L140
	.cfi_endproc
.LFE67:
	.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	nextpint
	.type	nextpint, @function
nextpint:
.LFB63:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
	cmpq	%rsi, %rax
	jnb	.L17
	leaq	1(%rax), %rcx
	movq	%rcx, 8(%rdi)
	movzbl	(%rax), %edx
	movl	%edx, %eax
.L3:
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L8
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	1(%rcx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rcx), %edx
	movl	%edx, %ecx
	subl	$48, %ecx
	cmpb	$9, %cl
	jbe	.L9
.L6:
	movq	%rax, %rcx
.L8:
	cmpq	%rsi, %rcx
	jb	.L5
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %edx
	leal	-48(%rdx), %ecx
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
	cmpb	$9, %cl
	ja	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	xorl	%r12d, %r12d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %edx
	leal	-48(%rdx), %eax
	cmpb	$9, %al
	ja	.L1
.L11:
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
.L13:
	leal	(%r12,%r12,4), %ecx
	movsbl	%dl, %edx
	leal	-48(%rdx,%rcx,2), %r12d
	cmpq	%rsi, %rax
	jb	.L10
	call	__uflow@PLT
	movl	%eax, %edx
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L1
	movq	stdin(%rip), %rdi
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L1:
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	movq	%rcx, %rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L17:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %edx
	movq	8(%rdi), %rcx
	movq	16(%rdi), %rsi
	jmp	.L3
	.cfi_endproc
.LFE63:
	.size	nextpint, .-nextpint
	.p2align 4
	.globl	nextplong
	.type	nextplong, @function
nextplong:
.LFB64:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
	cmpq	%rsi, %rax
	jnb	.L33
	leaq	1(%rax), %rcx
	movq	%rcx, 8(%rdi)
	movzbl	(%rax), %edx
	movl	%edx, %eax
.L20:
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L25
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L22:
	leaq	1(%rcx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rcx), %edx
	movl	%edx, %ecx
	subl	$48, %ecx
	cmpb	$9, %cl
	jbe	.L26
.L23:
	movq	%rax, %rcx
.L25:
	cmpq	%rsi, %rcx
	jb	.L22
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %edx
	leal	-48(%rdx), %ecx
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
	cmpb	$9, %cl
	ja	.L23
	.p2align 4,,10
	.p2align 3
.L26:
	xorl	%r12d, %r12d
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L27:
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %edx
	leal	-48(%rdx), %eax
	cmpb	$9, %al
	ja	.L18
.L28:
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
.L30:
	leaq	(%r12,%r12,4), %rcx
	movsbq	%dl, %rdx
	leaq	-48(%rdx,%rcx,2), %r12
	cmpq	%rsi, %rax
	jb	.L27
	call	__uflow@PLT
	movl	%eax, %edx
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L18
	movq	stdin(%rip), %rdi
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L18:
	movq	%r12, %rax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	movq	%rcx, %rax
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L33:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %edx
	movq	8(%rdi), %rcx
	movq	16(%rdi), %rsi
	jmp	.L20
	.cfi_endproc
.LFE64:
	.size	nextplong, .-nextplong
	.p2align 4
	.globl	printint
	.type	printint, @function
printint:
.LFB65:
	.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
	movl	%edi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	stdout(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	48(%rdi), %rdx
	movq	40(%rdi), %rax
	testl	%ebp, %ebp
	js	.L107
	je	.L108
.L37:
	movl	%ebp, %ebx
	movl	$3435973837, %ecx
	imulq	%rcx, %rbx
	shrq	$35, %rbx
	leal	(%rbx,%rbx,4), %eax
	addl	%eax, %eax
	subl	%eax, %ebp
	addl	$48, %ebp
	movb	%bpl, 14(%rsp)
	testl	%ebx, %ebx
	je	.L64
	movl	%ebx, %eax
	imulq	%rcx, %rax
	shrq	$35, %rax
	leal	(%rax,%rax,4), %edx
	addl	%edx, %edx
	subl	%edx, %ebx
	addl	$48, %ebx
	movb	%bl, 15(%rsp)
	testl	%eax, %eax
	je	.L67
	movl	%eax, %edx
	imulq	%rcx, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %esi
	addl	%esi, %esi
	subl	%esi, %eax
	addl	$48, %eax
	movb	%al, 16(%rsp)
	testl	%edx, %edx
	je	.L68
	movl	%edx, %eax
	imulq	%rcx, %rax
	shrq	$35, %rax
	leal	(%rax,%rax,4), %esi
	addl	%esi, %esi
	subl	%esi, %edx
	addl	$48, %edx
	movb	%dl, 17(%rsp)
	testl	%eax, %eax
	je	.L69
	movl	%eax, %edx
	imulq	%rcx, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %esi
	addl	%esi, %esi
	subl	%esi, %eax
	addl	$48, %eax
	movb	%al, 18(%rsp)
	testl	%edx, %edx
	je	.L70
	movl	%edx, %eax
	imulq	%rcx, %rax
	shrq	$35, %rax
	leal	(%rax,%rax,4), %esi
	addl	%esi, %esi
	subl	%esi, %edx
	addl	$48, %edx
	movb	%dl, 19(%rsp)
	testl	%eax, %eax
	je	.L71
	movl	%eax, %edx
	imulq	%rcx, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %esi
	addl	%esi, %esi
	subl	%esi, %eax
	addl	$48, %eax
	movb	%al, 20(%rsp)
	testl	%edx, %edx
	je	.L72
	movl	%edx, %eax
	imulq	%rcx, %rax
	shrq	$35, %rax
	leal	(%rax,%rax,4), %esi
	addl	%esi, %esi
	subl	%esi, %edx
	addl	$48, %edx
	movb	%dl, 21(%rsp)
	testl	%eax, %eax
	je	.L73
	movl	%eax, %edx
	movl	$8, %ebx
	imulq	%rcx, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %eax
	addl	$48, %eax
	movb	%al, 22(%rsp)
	testl	%edx, %edx
	je	.L64
	addl	$48, %edx
	movl	$9, %ebx
	movb	%dl, 23(%rsp)
.L64:
	movslq	%ebx, %rax
	movzbl	14(%rsp,%rax), %edx
	movq	40(%rdi), %rax
	cmpq	%rax, 48(%rdi)
	jbe	.L40
	leaq	1(%rax), %rcx
	movq	%rcx, 40(%rdi)
	movb	%dl, (%rax)
.L41:
	leal	-1(%rbx), %eax
	testl	%ebx, %ebx
	je	.L39
	movq	stdout(%rip), %rdi
	cltq
	movzbl	14(%rsp,%rax), %edx
	movq	40(%rdi), %rax
	cmpq	%rax, 48(%rdi)
	jbe	.L43
	leaq	1(%rax), %rcx
	movq	%rcx, 40(%rdi)
	movb	%dl, (%rax)
.L44:
	leal	-2(%rbx), %eax
	cmpl	$1, %ebx
	je	.L39
	movq	stdout(%rip), %rdi
	cltq
	movzbl	14(%rsp,%rax), %edx
	movq	40(%rdi), %rax
	cmpq	%rax, 48(%rdi)
	jbe	.L45
	leaq	1(%rax), %rcx
	movq	%rcx, 40(%rdi)
	movb	%dl, (%rax)
.L46:
	leal	-3(%rbx), %eax
	cmpl	$2, %ebx
	je	.L39
	movq	stdout(%rip), %rdi
	cltq
	movzbl	14(%rsp,%rax), %edx
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L47
	leaq	1(%rax), %rcx
	movq	%rcx, 40(%rdi)
	movb	%dl, (%rax)
.L48:
	leal	-4(%rbx), %eax
	cmpl	$3, %ebx
	je	.L39
	movq	stdout(%rip), %rdi
	cltq
	movzbl	14(%rsp,%rax), %edx
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L49
	leaq	1(%rax), %rcx
	movq	%rcx, 40(%rdi)
	movb	%dl, (%rax)
.L50:
	leal	-5(%rbx), %eax
	cmpl	$4, %ebx
	je	.L39
	movq	stdout(%rip), %rdi
	cltq
	movzbl	14(%rsp,%rax), %edx
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L51
	leaq	1(%rax), %rcx
	movq	%rcx, 40(%rdi)
	movb	%dl, (%rax)
.L52:
	leal	-6(%rbx), %eax
	cmpl	$5, %ebx
	je	.L39
	movq	stdout(%rip), %rdi
	cltq
	movzbl	14(%rsp,%rax), %edx
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L53
	leaq	1(%rax), %rcx
	movq	%rcx, 40(%rdi)
	movb	%dl, (%rax)
.L54:
	leal	-7(%rbx), %eax
	cmpl	$6, %ebx
	je	.L39
	movq	stdout(%rip), %rdi
	cltq
	movzbl	14(%rsp,%rax), %edx
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L55
	leaq	1(%rax), %rcx
	movq	%rcx, 40(%rdi)
	movb	%dl, (%rax)
.L56:
	leal	-8(%rbx), %r12d
	cmpl	$7, %ebx
	je	.L39
	movq	stdout(%rip), %rdi
	movslq	%r12d, %rax
	movzbl	14(%rsp,%rax), %edx
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L57
	leaq	1(%rax), %rcx
	movq	%rcx, 40(%rdi)
	movb	%dl, (%rax)
.L58:
	testl	%r12d, %r12d
	je	.L39
	movq	stdout(%rip), %rdi
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L109
	leaq	1(%rax), %rdx
	movq	%rdx, 40(%rdi)
	movb	%bpl, (%rax)
.L39:
	movq	stdout(%rip), %rdi
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L110
	leaq	1(%rax), %rdx
	movq	%rdx, 40(%rdi)
	movb	$10, (%rax)
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L104
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L108:
	.cfi_restore_state
	cmpq	%rdx, %rax
	jnb	.L111
	leaq	1(%rax), %rdx
	movq	%rdx, 40(%rdi)
	movb	$48, (%rax)
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L107:
	negl	%ebp
	cmpq	%rdx, %rax
	jnb	.L112
	leaq	1(%rax), %rdx
	movq	%rdx, 40(%rdi)
	movb	$45, (%rax)
	movq	stdout(%rip), %rdi
	jmp	.L37
.L45:
	movzbl	%dl, %esi
	call	__overflow@PLT
	jmp	.L46
	.p2align 4,,10
	.p2align 3
.L110:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L104
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	movl	$10, %esi
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	__overflow@PLT
.L40:
	.cfi_restore_state
	movzbl	%dl, %esi
	call	__overflow@PLT
	jmp	.L41
.L43:
	movzbl	%dl, %esi
	call	__overflow@PLT
	jmp	.L44
.L69:
	movl	$3, %ebx
	jmp	.L64
.L67:
	movl	$1, %ebx
	jmp	.L64
.L47:
	movzbl	%dl, %esi
	call	__overflow@PLT
	jmp	.L48
.L68:
	movl	$2, %ebx
	jmp	.L64
.L112:
	movl	$45, %esi
	call	__overflow@PLT
	movq	stdout(%rip), %rdi
	jmp	.L37
.L49:
	movzbl	%dl, %esi
	call	__overflow@PLT
	jmp	.L50
.L70:
	movl	$4, %ebx
	jmp	.L64
.L51:
	movzbl	%dl, %esi
	call	__overflow@PLT
	jmp	.L52
.L71:
	movl	$5, %ebx
	jmp	.L64
.L72:
	movl	$6, %ebx
	jmp	.L64
.L53:
	movzbl	%dl, %esi
	call	__overflow@PLT
	jmp	.L54
.L111:
	movl	$48, %esi
	call	__overflow@PLT
	jmp	.L39
.L73:
	movl	$7, %ebx
	jmp	.L64
.L55:
	movzbl	%dl, %esi
	call	__overflow@PLT
	jmp	.L56
.L57:
	movzbl	%dl, %esi
	call	__overflow@PLT
	jmp	.L58
.L109:
	movzbl	%bpl, %esi
	call	__overflow@PLT
	jmp	.L39
.L104:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE65:
	.size	printint, .-printint
	.p2align 4
	.globl	printlong
	.type	printlong, @function
printlong:
.LFB66:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 64
	movq	stdout(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	48(%rdi), %rdx
	movq	40(%rdi), %rax
	testq	%rbx, %rbx
	js	.L132
	jne	.L116
	cmpq	%rdx, %rax
	jnb	.L133
	leaq	1(%rax), %rdx
	movq	%rdx, 40(%rdi)
	movb	$48, (%rax)
.L118:
	movq	stdout(%rip), %rdi
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L134
	leaq	1(%rax), %rdx
	movq	%rdx, 40(%rdi)
	movb	$10, (%rax)
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L129
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L132:
	.cfi_restore_state
	negq	%rbx
	cmpq	%rdx, %rax
	jnb	.L135
	leaq	1(%rax), %rdx
	movq	%rdx, 40(%rdi)
	movb	$45, (%rax)
	movq	stdout(%rip), %rdi
.L116:
	movabsq	$-3689348814741910323, %r9
	xorl	%ecx, %ecx
	movq	%rsp, %rsi
	.p2align 4,,10
	.p2align 3
.L119:
	movq	%rbx, %rax
	movslq	%ecx, %r8
	mulq	%r9
	shrq	$3, %rdx
	leaq	(%rdx,%rdx,4), %rax
	addq	%rax, %rax
	subq	%rax, %rbx
	movq	%rcx, %rax
	addl	$48, %ebx
	movb	%bl, (%rsi,%rcx)
	movq	%rdx, %rbx
	addq	$1, %rcx
	testq	%rdx, %rdx
	jne	.L119
	leaq	-1(%rsp,%r8), %rbp
	leaq	(%rsi,%r8), %rbx
	subq	%rax, %rbp
	jmp	.L122
	.p2align 4,,10
	.p2align 3
.L137:
	movq	stdout(%rip), %rdi
.L122:
	movzbl	(%rbx), %esi
	movq	40(%rdi), %rax
	cmpq	48(%rdi), %rax
	jnb	.L136
	leaq	1(%rax), %rdx
	movq	%rdx, 40(%rdi)
	movb	%sil, (%rax)
.L121:
	subq	$1, %rbx
	cmpq	%rbx, %rbp
	jne	.L137
	jmp	.L118
	.p2align 4,,10
	.p2align 3
.L136:
	call	__overflow@PLT
	jmp	.L121
	.p2align 4,,10
	.p2align 3
.L134:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L129
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movl	$10, %esi
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	__overflow@PLT
.L135:
	.cfi_restore_state
	movl	$45, %esi
	call	__overflow@PLT
	movq	stdout(%rip), %rdi
	jmp	.L116
.L133:
	movl	$48, %esi
	call	__overflow@PLT
	jmp	.L118
.L129:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE66:
	.size	printlong, .-printlong
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"infinity"
.LC1:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB67:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	nextpint
	movl	%eax, %r13d
	call	nextpint
	movl	%eax, %r12d
	call	nextplong
	movq	%rax, %rbp
	call	nextplong
	movq	%rax, %rbx
	call	nextplong
	movq	%rax, %r14
	call	nextplong
	movq	%rax, %r8
	movq	%rbp, %rax
	subq	%r8, %rbx
	subq	%r14, %rax
	movq	%rbx, %rdx
	imulq	%r13, %rax
	imulq	%r12, %rdx
	movq	%rdx, %rcx
	addq	%rax, %rcx
	je	.L143
	movq	%rax, %rsi
	xorq	%rcx, %rsi
	js	.L141
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L140:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L141:
	.cfi_restore_state
	negq	%rax
	xorl	%edi, %edi
	cqto
	movq	%rax, %rsi
	idivq	%rcx
	movq	%rcx, %rdx
	imulq	%rax, %rdx
	cmpq	%rsi, %rdx
	setne	%dil
	addq	%rax, %rax
	addq	%rax, %rdi
	call	printlong
	jmp	.L140
.L143:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L140
	.cfi_endproc
.LFE67:
	.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 <float.h>
#include <inttypes.h>
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <math.h>
#ifdef __cplusplus
#include <bits/stdc++.h>
#endif

uint32_t nextpint(void){ char c=getchar_unlocked(); while(c<'0'||'9'<c) c=getchar_unlocked(); uint32_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getchar_unlocked(); } return x; }
uint64_t nextplong(void){ char c=getchar_unlocked(); while(c<'0'||'9'<c) c=getchar_unlocked(); uint64_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getchar_unlocked(); } return x; }
void printint(int32_t x){ if(x<0){x=-x; putchar_unlocked('-');}else if(x==0){putchar_unlocked('0');} int d=0; char s[10]; while(x){ s[d]='0'+x%10; x/=10; d++; } for (int i=d-1; i>=0; i--) putchar_unlocked(s[i]); putchar_unlocked('\n'); }
void printlong(int64_t x){ if(x<0){x=-x; putchar_unlocked('-');}else if(x==0){putchar_unlocked('0');} int d=0; char s[20]; while(x){ s[d]='0'+x%10; x/=10; d++; } for (int i=d-1; i>=0; i--) putchar_unlocked(s[i]); putchar_unlocked('\n'); }

int main(void){
	uint32_t t1=nextpint();
	uint32_t t2=nextpint();
	int64_t a1=nextplong();
	int64_t a2=nextplong();
	int64_t b1=nextplong();
	int64_t b2=nextplong();
	int64_t d1=(a1-b1)*t1;
	int64_t d2=(a2-b2)*t2;
	int64_t d=d1+d2;
	if(d==0){
		puts("infinity");
	}else if((d1<0)==(d<0)){
		puts("0");
	}else{
		d1=-d1;
		int64_t ans=d1/d*2+(d1/d*d!=d1);
		printlong(ans);
	}
}

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
 1

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

```c
#include <float.h>
#include <inttypes.h>
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <math.h>
#ifdef __cplusplus
#include <bits/stdc++.h>
#endif

uint32_t nextpint(void){ char c=getchar_unlocked(); while(c<'0'||'9'<c) c=getchar_unlocked(); uint32_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getchar_unlocked(); } return x; }
uint64_t nextplong(void){ char c=getchar_unlocked(); while(c<'0'||'9'<c) c=getchar_unlocked(); uint64_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getchar_unlocked(); } return x; }
void printint(int32_t x){ if(x<0){x=-x; putchar_unlocked('-');}else if(x==0){putchar_unlocked('0');} int d=0; char s[10]; while(x){ s[d]='0'+x%10; x/=10; d++; } for (int i=d-1; i>=0; i--) putchar_unlocked(s[i]); putchar_unlocked('\n'); }
void printlong(int64_t x){ if(x<0){x=-x; putchar_unlocked('-');}else if(x==0){putchar_unlocked('0');} int d=0; char s[20]; while(x){ s[d]='0'+x%10; x/=10; d++; } for (int i=d-1; i>=0; i--) putchar_unlocked(s[i]); putchar_unlocked('\n'); }

int main(void){
	uint32_t t1=nextpint();
	uint32_t t2=nextpint();
	int64_t a1=nextplong();
	int64_t a2=nextplong();
	int64_t b1=nextplong();
	int64_t b2=nextplong();
	int64_t d1=(a1-b1)*t1;
	int64_t d2=(a2-b2)*t2;
	int64_t d=d1+d2;
	if(d==0){
		puts("infinity");
	}else if((d1<0)==(d<0)){
		puts("0");
	}else{
		d1=-d1;
		int64_t ans=d1/d*2+(d1/d*d!=d1);
		printlong(ans);
	}
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	nextpint
	.type	nextpint, @function
nextpint:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	call	getchar_unlocked@PLT
	movb	%al, -5(%rbp)
	jmp	.L2
.L3:
	call	getchar_unlocked@PLT
	movb	%al, -5(%rbp)
.L2:
	cmpb	$47, -5(%rbp)
	jle	.L3
	cmpb	$57, -5(%rbp)
	jg	.L3
	movl	$0, -4(%rbp)
	jmp	.L4
.L6:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movsbl	-5(%rbp), %eax
	addl	%edx, %eax
	subl	$48, %eax
	movl	%eax, -4(%rbp)
	call	getchar_unlocked@PLT
	movb	%al, -5(%rbp)
.L4:
	cmpb	$47, -5(%rbp)
	jle	.L5
	cmpb	$57, -5(%rbp)
	jle	.L6
.L5:
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	nextpint, .-nextpint
	.globl	nextplong
	.type	nextplong, @function
nextplong:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	call	getchar_unlocked@PLT
	movb	%al, -9(%rbp)
	jmp	.L9
.L10:
	call	getchar_unlocked@PLT
	movb	%al, -9(%rbp)
.L9:
	cmpb	$47, -9(%rbp)
	jle	.L10
	cmpb	$57, -9(%rbp)
	jg	.L10
	movq	$0, -8(%rbp)
	jmp	.L11
.L13:
	movq	-8(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	movq	%rax, %rdx
	movsbq	-9(%rbp), %rax
	addq	%rdx, %rax
	subq	$48, %rax
	movq	%rax, -8(%rbp)
	call	getchar_unlocked@PLT
	movb	%al, -9(%rbp)
.L11:
	cmpb	$47, -9(%rbp)
	jle	.L12
	cmpb	$57, -9(%rbp)
	jle	.L13
.L12:
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	nextplong, .-nextplong
	.globl	printint
	.type	printint, @function
printint:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -36(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	cmpl	$0, -36(%rbp)
	jns	.L16
	negl	-36(%rbp)
	movl	$45, %edi
	call	putchar_unlocked@PLT
	jmp	.L17
.L16:
	cmpl	$0, -36(%rbp)
	jne	.L17
	movl	$48, %edi
	call	putchar_unlocked@PLT
.L17:
	movl	$0, -28(%rbp)
	jmp	.L18
.L19:
	movl	-36(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	addl	%eax, %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	%ecx, %eax
	addl	$48, %eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	cltq
	movb	%dl, -18(%rbp,%rax)
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -36(%rbp)
	addl	$1, -28(%rbp)
.L18:
	cmpl	$0, -36(%rbp)
	jne	.L19
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L20
.L21:
	movl	-24(%rbp), %eax
	cltq
	movzbl	-18(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar_unlocked@PLT
	subl	$1, -24(%rbp)
.L20:
	cmpl	$0, -24(%rbp)
	jns	.L21
	movl	$10, %edi
	call	putchar_unlocked@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	printint, .-printint
	.globl	printlong
	.type	printlong, @function
printlong:
.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	%rdi, -56(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	cmpq	$0, -56(%rbp)
	jns	.L24
	negq	-56(%rbp)
	movl	$45, %edi
	call	putchar_unlocked@PLT
	jmp	.L25
.L24:
	cmpq	$0, -56(%rbp)
	jne	.L25
	movl	$48, %edi
	call	putchar_unlocked@PLT
.L25:
	movl	$0, -40(%rbp)
	jmp	.L26
.L27:
	movq	-56(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movl	%edx, %eax
	addl	$48, %eax
	movl	%eax, %edx
	movl	-40(%rbp), %eax
	cltq
	movb	%dl, -32(%rbp,%rax)
	movq	-56(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	movq	%rax, -56(%rbp)
	addl	$1, -40(%rbp)
.L26:
	cmpq	$0, -56(%rbp)
	jne	.L27
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -36(%rbp)
	jmp	.L28
.L29:
	movl	-36(%rbp), %eax
	cltq
	movzbl	-32(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar_unlocked@PLT
	subl	$1, -36(%rbp)
.L28:
	cmpl	$0, -36(%rbp)
	jns	.L29
	movl	$10, %edi
	call	putchar_unlocked@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	printlong, .-printlong
	.section	.rodata
.LC0:
	.string	"infinity"
.LC1:
	.string	"0"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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
	call	nextpint
	movl	%eax, -72(%rbp)
	call	nextpint
	movl	%eax, -68(%rbp)
	call	nextplong
	movq	%rax, -64(%rbp)
	call	nextplong
	movq	%rax, -56(%rbp)
	call	nextplong
	movq	%rax, -48(%rbp)
	call	nextplong
	movq	%rax, -40(%rbp)
	movq	-64(%rbp), %rax
	subq	-48(%rbp), %rax
	movq	%rax, %rdx
	movl	-72(%rbp), %eax
	imulq	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-56(%rbp), %rax
	subq	-40(%rbp), %rax
	movq	%rax, %rdx
	movl	-68(%rbp), %eax
	imulq	%rdx, %rax
	movq	%rax, -24(%rbp)
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -16(%rbp)
	cmpq	$0, -16(%rbp)
	jne	.L32
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L33
.L32:
	movq	-32(%rbp), %rax
	xorq	-16(%rbp), %rax
	testq	%rax, %rax
	js	.L34
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L33
.L34:
	negq	-32(%rbp)
	movq	-32(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	leaq	(%rax,%rax), %rcx
	movq	-32(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	imulq	-16(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	setne	%al
	movzbl	%al, %eax
	addq	%rcx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	printlong
.L33:
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	nextpint
	.type	nextpint, @function
nextpint:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	call	getchar_unlocked@PLT
	movb	%al, -5(%rbp)
	jmp	.L2
.L3:
	call	getchar_unlocked@PLT
	movb	%al, -5(%rbp)
.L2:
	cmpb	$47, -5(%rbp)
	jle	.L3
	cmpb	$57, -5(%rbp)
	jg	.L3
	movl	$0, -4(%rbp)
	jmp	.L4
.L6:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movsbl	-5(%rbp), %eax
	addl	%edx, %eax
	subl	$48, %eax
	movl	%eax, -4(%rbp)
	call	getchar_unlocked@PLT
	movb	%al, -5(%rbp)
.L4:
	cmpb	$47, -5(%rbp)
	jle	.L5
	cmpb	$57, -5(%rbp)
	jle	.L6
.L5:
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	nextpint, .-nextpint
	.globl	nextplong
	.type	nextplong, @function
nextplong:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	call	getchar_unlocked@PLT
	movb	%al, -9(%rbp)
	jmp	.L9
.L10:
	call	getchar_unlocked@PLT
	movb	%al, -9(%rbp)
.L9:
	cmpb	$47, -9(%rbp)
	jle	.L10
	cmpb	$57, -9(%rbp)
	jg	.L10
	movq	$0, -8(%rbp)
	jmp	.L11
.L13:
	movq	-8(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	movq	%rax, %rdx
	movsbq	-9(%rbp), %rax
	addq	%rdx, %rax
	subq	$48, %rax
	movq	%rax, -8(%rbp)
	call	getchar_unlocked@PLT
	movb	%al, -9(%rbp)
.L11:
	cmpb	$47, -9(%rbp)
	jle	.L12
	cmpb	$57, -9(%rbp)
	jle	.L13
.L12:
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	nextplong, .-nextplong
	.globl	printint
	.type	printint, @function
printint:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -36(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	cmpl	$0, -36(%rbp)
	jns	.L16
	negl	-36(%rbp)
	movl	$45, %edi
	call	putchar_unlocked@PLT
	jmp	.L17
.L16:
	cmpl	$0, -36(%rbp)
	jne	.L17
	movl	$48, %edi
	call	putchar_unlocked@PLT
.L17:
	movl	$0, -28(%rbp)
	jmp	.L18
.L19:
	movl	-36(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	addl	%eax, %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	%ecx, %eax
	addl	$48, %eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	cltq
	movb	%dl, -18(%rbp,%rax)
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -36(%rbp)
	addl	$1, -28(%rbp)
.L18:
	cmpl	$0, -36(%rbp)
	jne	.L19
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L20
.L21:
	movl	-24(%rbp), %eax
	cltq
	movzbl	-18(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar_unlocked@PLT
	subl	$1, -24(%rbp)
.L20:
	cmpl	$0, -24(%rbp)
	jns	.L21
	movl	$10, %edi
	call	putchar_unlocked@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	printint, .-printint
	.globl	printlong
	.type	printlong, @function
printlong:
.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	%rdi, -56(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	cmpq	$0, -56(%rbp)
	jns	.L24
	negq	-56(%rbp)
	movl	$45, %edi
	call	putchar_unlocked@PLT
	jmp	.L25
.L24:
	cmpq	$0, -56(%rbp)
	jne	.L25
	movl	$48, %edi
	call	putchar_unlocked@PLT
.L25:
	movl	$0, -40(%rbp)
	jmp	.L26
.L27:
	movq	-56(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movl	%edx, %eax
	addl	$48, %eax
	movl	%eax, %edx
	movl	-40(%rbp), %eax
	cltq
	movb	%dl, -32(%rbp,%rax)
	movq	-56(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	movq	%rax, -56(%rbp)
	addl	$1, -40(%rbp)
.L26:
	cmpq	$0, -56(%rbp)
	jne	.L27
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -36(%rbp)
	jmp	.L28
.L29:
	movl	-36(%rbp), %eax
	cltq
	movzbl	-32(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar_unlocked@PLT
	subl	$1, -36(%rbp)
.L28:
	cmpl	$0, -36(%rbp)
	jns	.L29
	movl	$10, %edi
	call	putchar_unlocked@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	printlong, .-printlong
	.section	.rodata
.LC0:
	.string	"infinity"
.LC1:
	.string	"0"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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
	call	nextpint
	movl	%eax, -72(%rbp)
	call	nextpint
	movl	%eax, -68(%rbp)
	call	nextplong
	movq	%rax, -64(%rbp)
	call	nextplong
	movq	%rax, -56(%rbp)
	call	nextplong
	movq	%rax, -48(%rbp)
	call	nextplong
	movq	%rax, -40(%rbp)
	movq	-64(%rbp), %rax
	subq	-48(%rbp), %rax
	movq	%rax, %rdx
	movl	-72(%rbp), %eax
	imulq	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-56(%rbp), %rax
	subq	-40(%rbp), %rax
	movq	%rax, %rdx
	movl	-68(%rbp), %eax
	imulq	%rdx, %rax
	movq	%rax, -24(%rbp)
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -16(%rbp)
	cmpq	$0, -16(%rbp)
	jne	.L32
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L33
.L32:
	movq	-32(%rbp), %rax
	xorq	-16(%rbp), %rax
	testq	%rax, %rax
	js	.L34
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L33
.L34:
	negq	-32(%rbp)
	movq	-32(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	leaq	(%rax,%rax), %rcx
	movq	-32(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	imulq	-16(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	setne	%al
	movzbl	%al, %eax
	addq	%rcx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	printlong
.L33:
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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:
