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

```c
#include <stdio.h>

int main()
{
	long long n, s;
	scanf("%lld", &n);
	scanf("%lld", &s);
	if (n == s) {
		printf("%lld\n", n + 1);
		fflush(stdout);
		return 0;
	}
	
	long long b, m, d;
	for (b = 2; b * b <= n; b++) {
		for (m = n, d = 0; m > 0; m /= b) d += m % b;
		if (d == s) {
			printf("%lld\n", b);
			fflush(stdout);
			return 0;
		}
	}
	
	for (d = (b - 1 < s)? b - 1: s; d >= 1; d--) {
		b = (n - (s - d)) / d;
		if (d * b + s - d == n && d < b && s - d < b) {
			printf("%lld\n", b);
			fflush(stdout);
			return 0;
		}
	}
	
	printf("-1\n");
	fflush(stdout);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"-1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rbp
	movq	%rbp, %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	movq	16(%rsp), %rdi
	cmpq	%rdi, %rsi
	je	.L2
	movl	$2, %r8d
	cmpq	$3, %rsi
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rsi, %rax
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L6:
	cqto
	idivq	%r8
	addq	%rdx, %rcx
	testq	%rax, %rax
	jne	.L6
	cmpq	%rcx, %rdi
	je	.L31
	addq	$1, %r8
	movq	%r8, %rax
	imulq	%r8, %rax
	cmpq	%rax, %rsi
	jge	.L3
.L4:
	cmpq	%r8, %rdi
	jl	.L8
	subq	$1, %r8
.L9:
	movq	%rdi, %rcx
	movq	%rsi, %rax
	subq	%r8, %rcx
	subq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rax, %rdx
	imulq	%r8, %rdx
	addq	%rdi, %rdx
	subq	%r8, %rdx
	cmpq	%rsi, %rdx
	jne	.L24
	cmpq	%r8, %rcx
	cmovl	%r8, %rcx
	cmpq	%rax, %rcx
	jl	.L11
	.p2align 4,,10
	.p2align 3
.L24:
	subq	$1, %r8
	je	.L10
	leaq	(%rsi,%r8), %rax
	subq	%rdi, %rax
	cqto
	idivq	%r8
	movq	%rax, %rdx
	imulq	%r8, %rdx
	addq	%rdi, %rdx
	subq	%r8, %rdx
	cmpq	%rsi, %rdx
	jne	.L24
	movq	%rdi, %rdx
	subq	%r8, %rdx
	cmpq	%r8, %rdx
	cmovl	%r8, %rdx
	cmpq	%rax, %rdx
	jge	.L24
.L11:
	movq	%rax, %rdx
.L29:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	jmp	.L5
.L31:
	movl	$1, %edi
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
.L5:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	jmp	.L5
.L8:
	testq	%rdi, %rdi
	jle	.L10
	movq	%rdi, %r8
	jmp	.L9
.L2:
	leaq	1(%rsi), %rdx
	jmp	.L29
.L32:
	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:
```

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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"-1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rbp
	movq	%rbp, %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	movq	16(%rsp), %rdi
	cmpq	%rdi, %rsi
	je	.L2
	movl	$2, %r8d
	cmpq	$3, %rsi
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rsi, %rax
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L6:
	cqto
	idivq	%r8
	addq	%rdx, %rcx
	testq	%rax, %rax
	jne	.L6
	cmpq	%rcx, %rdi
	je	.L31
	addq	$1, %r8
	movq	%r8, %rax
	imulq	%r8, %rax
	cmpq	%rax, %rsi
	jge	.L3
.L4:
	cmpq	%r8, %rdi
	jl	.L8
	subq	$1, %r8
.L9:
	movq	%rdi, %rcx
	movq	%rsi, %rax
	subq	%r8, %rcx
	subq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rax, %rdx
	imulq	%r8, %rdx
	addq	%rdi, %rdx
	subq	%r8, %rdx
	cmpq	%rsi, %rdx
	jne	.L24
	cmpq	%r8, %rcx
	cmovl	%r8, %rcx
	cmpq	%rax, %rcx
	jl	.L11
	.p2align 4,,10
	.p2align 3
.L24:
	subq	$1, %r8
	je	.L10
	leaq	(%rsi,%r8), %rax
	subq	%rdi, %rax
	cqto
	idivq	%r8
	movq	%rax, %rdx
	imulq	%r8, %rdx
	addq	%rdi, %rdx
	subq	%r8, %rdx
	cmpq	%rsi, %rdx
	jne	.L24
	movq	%rdi, %rdx
	subq	%r8, %rdx
	cmpq	%r8, %rdx
	cmovl	%r8, %rdx
	cmpq	%rax, %rdx
	jge	.L24
.L11:
	movq	%rax, %rdx
.L29:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	jmp	.L5
.L31:
	movl	$1, %edi
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
.L5:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	jmp	.L5
.L8:
	testq	%rdi, %rdi
	jle	.L10
	movq	%rdi, %r8
	jmp	.L9
.L2:
	leaq	1(%rsi), %rdx
	jmp	.L29
.L32:
	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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"-1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rbp
	movq	%rbp, %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	movq	16(%rsp), %rdi
	cmpq	%rdi, %rsi
	je	.L2
	movl	$2, %r8d
	cmpq	$3, %rsi
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rsi, %rax
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L6:
	cqto
	idivq	%r8
	addq	%rdx, %rcx
	testq	%rax, %rax
	jne	.L6
	cmpq	%rcx, %rdi
	je	.L31
	addq	$1, %r8
	movq	%r8, %rax
	imulq	%r8, %rax
	cmpq	%rax, %rsi
	jge	.L3
.L4:
	cmpq	%r8, %rdi
	jl	.L8
	subq	$1, %r8
.L9:
	movq	%rdi, %rcx
	movq	%rsi, %rax
	subq	%r8, %rcx
	subq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rax, %rdx
	imulq	%r8, %rdx
	addq	%rdi, %rdx
	subq	%r8, %rdx
	cmpq	%rsi, %rdx
	jne	.L24
	cmpq	%r8, %rcx
	cmovl	%r8, %rcx
	cmpq	%rax, %rcx
	jl	.L11
	.p2align 4,,10
	.p2align 3
.L24:
	subq	$1, %r8
	je	.L10
	leaq	(%rsi,%r8), %rax
	subq	%rdi, %rax
	cqto
	idivq	%r8
	movq	%rax, %rdx
	imulq	%r8, %rdx
	addq	%rdi, %rdx
	subq	%r8, %rdx
	cmpq	%rsi, %rdx
	jne	.L24
	movq	%rdi, %rdx
	subq	%r8, %rdx
	cmpq	%r8, %rdx
	cmovl	%r8, %rdx
	cmpq	%rax, %rdx
	jge	.L24
.L11:
	movq	%rax, %rdx
.L29:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	jmp	.L5
.L31:
	movl	$1, %edi
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
.L5:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	jmp	.L5
.L8:
	testq	%rdi, %rdi
	jle	.L10
	movq	%rdi, %r8
	jmp	.L9
.L2:
	leaq	1(%rsi), %rdx
	jmp	.L29
.L32:
	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:
```
```c
#include <stdio.h>

int main()
{
	long long n, s;
	scanf("%lld", &n);
	scanf("%lld", &s);
	if (n == s) {
		printf("%lld\n", n + 1);
		fflush(stdout);
		return 0;
	}
	
	long long b, m, d;
	for (b = 2; b * b <= n; b++) {
		for (m = n, d = 0; m > 0; m /= b) d += m % b;
		if (d == s) {
			printf("%lld\n", b);
			fflush(stdout);
			return 0;
		}
	}
	
	for (d = (b - 1 < s)? b - 1: s; d >= 1; d--) {
		b = (n - (s - d)) / d;
		if (d * b + s - d == n && d < b && s - d < b) {
			printf("%lld\n", b);
			fflush(stdout);
			return 0;
		}
	}
	
	printf("-1\n");
	fflush(stdout);
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int main()
{
	long long n, s;
	scanf("%lld", &n);
	scanf("%lld", &s);
	if (n == s) {
		printf("%lld\n", n + 1);
		fflush(stdout);
		return 0;
	}
	
	long long b, m, d;
	for (b = 2; b * b <= n; b++) {
		for (m = n, d = 0; m > 0; m /= b) d += m % b;
		if (d == s) {
			printf("%lld\n", b);
			fflush(stdout);
			return 0;
		}
	}
	
	for (d = (b - 1 < s)? b - 1: s; d >= 1; d--) {
		b = (n - (s - d)) / d;
		if (d * b + s - d == n && d < b && s - d < b) {
			printf("%lld\n", b);
			fflush(stdout);
			return 0;
		}
	}
	
	printf("-1\n");
	fflush(stdout);
	return 0;
}```

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.
Optimized Assembly Code:

87654
30

10

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

```c
#include <stdio.h>

int main()
{
	long long n, s;
	scanf("%lld", &n);
	scanf("%lld", &s);
	if (n == s) {
		printf("%lld\n", n + 1);
		fflush(stdout);
		return 0;
	}
	
	long long b, m, d;
	for (b = 2; b * b <= n; b++) {
		for (m = n, d = 0; m > 0; m /= b) d += m % b;
		if (d == s) {
			printf("%lld\n", b);
			fflush(stdout);
			return 0;
		}
	}
	
	for (d = (b - 1 < s)? b - 1: s; d >= 1; d--) {
		b = (n - (s - d)) / d;
		if (d * b + s - d == n && d < b && s - d < b) {
			printf("%lld\n", b);
			fflush(stdout);
			return 0;
		}
	}
	
	printf("-1\n");
	fflush(stdout);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"-1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rbp
	movq	%rbp, %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	movq	16(%rsp), %rdi
	cmpq	%rdi, %rsi
	je	.L2
	movl	$2, %r8d
	cmpq	$3, %rsi
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rsi, %rax
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L6:
	cqto
	idivq	%r8
	addq	%rdx, %rcx
	testq	%rax, %rax
	jne	.L6
	cmpq	%rcx, %rdi
	je	.L31
	addq	$1, %r8
	movq	%r8, %rax
	imulq	%r8, %rax
	cmpq	%rax, %rsi
	jge	.L3
.L4:
	cmpq	%r8, %rdi
	jl	.L8
	subq	$1, %r8
.L9:
	movq	%rdi, %rcx
	movq	%rsi, %rax
	subq	%r8, %rcx
	subq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rax, %rdx
	imulq	%r8, %rdx
	addq	%rdi, %rdx
	subq	%r8, %rdx
	cmpq	%rsi, %rdx
	jne	.L24
	cmpq	%r8, %rcx
	cmovl	%r8, %rcx
	cmpq	%rax, %rcx
	jl	.L11
	.p2align 4,,10
	.p2align 3
.L24:
	subq	$1, %r8
	je	.L10
	leaq	(%rsi,%r8), %rax
	subq	%rdi, %rax
	cqto
	idivq	%r8
	movq	%rax, %rdx
	imulq	%r8, %rdx
	addq	%rdi, %rdx
	subq	%r8, %rdx
	cmpq	%rsi, %rdx
	jne	.L24
	movq	%rdi, %rdx
	subq	%r8, %rdx
	cmpq	%r8, %rdx
	cmovl	%r8, %rdx
	cmpq	%rax, %rdx
	jge	.L24
.L11:
	movq	%rax, %rdx
.L29:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	jmp	.L5
.L31:
	movl	$1, %edi
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
.L5:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	jmp	.L5
.L8:
	testq	%rdi, %rdi
	jle	.L10
	movq	%rdi, %r8
	jmp	.L9
.L2:
	leaq	1(%rsi), %rdx
	jmp	.L29
.L32:
	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:
```

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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"-1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rbp
	movq	%rbp, %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	16(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	movq	16(%rsp), %rdi
	cmpq	%rdi, %rsi
	je	.L2
	movl	$2, %r8d
	cmpq	$3, %rsi
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rsi, %rax
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L6:
	cqto
	idivq	%r8
	addq	%rdx, %rcx
	testq	%rax, %rax
	jne	.L6
	cmpq	%rcx, %rdi
	je	.L31
	addq	$1, %r8
	movq	%r8, %rax
	imulq	%r8, %rax
	cmpq	%rax, %rsi
	jge	.L3
.L4:
	cmpq	%r8, %rdi
	jl	.L8
	subq	$1, %r8
.L9:
	movq	%rdi, %rcx
	movq	%rsi, %rax
	subq	%r8, %rcx
	subq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rax, %rdx
	imulq	%r8, %rdx
	addq	%rdi, %rdx
	subq	%r8, %rdx
	cmpq	%rsi, %rdx
	jne	.L24
	cmpq	%r8, %rcx
	cmovl	%r8, %rcx
	cmpq	%rax, %rcx
	jl	.L11
	.p2align 4,,10
	.p2align 3
.L24:
	subq	$1, %r8
	je	.L10
	leaq	(%rsi,%r8), %rax
	subq	%rdi, %rax
	cqto
	idivq	%r8
	movq	%rax, %rdx
	imulq	%r8, %rdx
	addq	%rdi, %rdx
	subq	%r8, %rdx
	cmpq	%rsi, %rdx
	jne	.L24
	movq	%rdi, %rdx
	subq	%r8, %rdx
	cmpq	%r8, %rdx
	cmovl	%r8, %rdx
	cmpq	%rax, %rdx
	jge	.L24
.L11:
	movq	%rax, %rdx
.L29:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	jmp	.L5
.L31:
	movl	$1, %edi
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
.L5:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	jmp	.L5
.L8:
	testq	%rdi, %rdi
	jle	.L10
	movq	%rdi, %r8
	jmp	.L9
.L2:
	leaq	1(%rsi), %rdx
	jmp	.L29
.L32:
	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:
```