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>
#include <inttypes.h>

#define MOD_BY INT64_C(1000000007)

int64_t add(int64_t a, int64_t b) {
	return (a + b) % MOD_BY;
}

int64_t mul(int64_t a, int64_t b) {
	int64_t r = 0;
	while (b > 0) {
		if (b & 1) r = add(r, a);
		a = add(a, a);
		b >>= 1;
	}
	return r;
}

int main(void) {
	int64_t a, b, x;
	if (scanf("%" PRId64 "%" PRId64 "%" PRId64, &a, &b, &x) != 3) return 1;
	if (x < a) {
		printf("%" PRId64 "\n", x % MOD_BY);
	} else {
		int64_t yoryoku = x - a;
		int64_t koukan = yoryoku / (a - b) + 1;
		printf("%" PRId64 "\n", add(x, mul(b, koukan)));
	}
	return 0;
}

```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	add
	.type	add, @function
add:
.LFB23:
	.cfi_startproc
	endbr64
	movabsq	$-8543223828751151131, %rdx
	addq	%rsi, %rdi
	movq	%rdi, %rax
	imulq	%rdx
	leaq	(%rdx,%rdi), %rax
	movq	%rdi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rdi, %rax
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	add, .-add
	.p2align 4
	.globl	mul
	.type	mul, @function
mul:
.LFB24:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	xorl	%r8d, %r8d
	movq	%rsi, %rdi
	testq	%rsi, %rsi
	jle	.L3
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L6:
	testb	$1, %dil
	je	.L5
	leaq	(%r8,%rcx), %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	subq	%rax, %rsi
	movq	%rsi, %r8
.L5:
	leaq	(%rcx,%rcx), %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rsi
	sarq	%rdi
	movq	%rsi, %rcx
	jne	.L6
.L3:
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE24:
	.size	mul, .-mul
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld%ld%ld"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	%eax, %r8d
	movl	$1, %eax
	cmpl	$3, %r8d
	jne	.L12
	movq	16(%rsp), %r10
	movq	(%rsp), %rdx
	cmpq	%rdx, %r10
	jl	.L27
	movq	8(%rsp), %rcx
	movq	%r10, %rax
	subq	%rdx, %rax
	subq	%rcx, %rdx
	movq	%rdx, %rsi
	cqto
	idivq	%rsi
	xorl	%esi, %esi
	leaq	1(%rax), %r8
	testq	%r8, %r8
	jle	.L15
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L17:
	testb	$1, %r8b
	je	.L16
	leaq	(%rsi,%rcx), %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rdi, %rsi
	subq	%rax, %rsi
.L16:
	leaq	(%rcx,%rcx), %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	sarq	%r8
	movq	%rdi, %rcx
	jne	.L17
.L15:
	leaq	(%r10,%rsi), %rax
	movl	$1000000007, %ecx
.L26:
	cqto
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	idivq	%rcx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
.L12:
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L28
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	movl	$1000000007, %ecx
	movq	%r10, %rax
	jmp	.L26
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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
	.p2align 4
	.globl	add
	.type	add, @function
add:
.LFB23:
	.cfi_startproc
	endbr64
	movabsq	$-8543223828751151131, %rdx
	addq	%rsi, %rdi
	movq	%rdi, %rax
	imulq	%rdx
	leaq	(%rdx,%rdi), %rax
	movq	%rdi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rdi, %rax
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	add, .-add
	.p2align 4
	.globl	mul
	.type	mul, @function
mul:
.LFB24:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	xorl	%r8d, %r8d
	movq	%rsi, %rdi
	testq	%rsi, %rsi
	jle	.L3
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L6:
	testb	$1, %dil
	je	.L5
	leaq	(%r8,%rcx), %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	subq	%rax, %rsi
	movq	%rsi, %r8
.L5:
	leaq	(%rcx,%rcx), %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rsi
	sarq	%rdi
	movq	%rsi, %rcx
	jne	.L6
.L3:
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE24:
	.size	mul, .-mul
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld%ld%ld"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	%eax, %r8d
	movl	$1, %eax
	cmpl	$3, %r8d
	jne	.L12
	movq	16(%rsp), %r10
	movq	(%rsp), %rdx
	cmpq	%rdx, %r10
	jl	.L27
	movq	8(%rsp), %rcx
	movq	%r10, %rax
	subq	%rdx, %rax
	subq	%rcx, %rdx
	movq	%rdx, %rsi
	cqto
	idivq	%rsi
	xorl	%esi, %esi
	leaq	1(%rax), %r8
	testq	%r8, %r8
	jle	.L15
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L17:
	testb	$1, %r8b
	je	.L16
	leaq	(%rsi,%rcx), %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rdi, %rsi
	subq	%rax, %rsi
.L16:
	leaq	(%rcx,%rcx), %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	sarq	%r8
	movq	%rdi, %rcx
	jne	.L17
.L15:
	leaq	(%r10,%rsi), %rax
	movl	$1000000007, %ecx
.L26:
	cqto
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	idivq	%rcx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
.L12:
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L28
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	movl	$1000000007, %ecx
	movq	%r10, %rax
	jmp	.L26
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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
	.p2align 4
	.globl	add
	.type	add, @function
add:
.LFB23:
	.cfi_startproc
	endbr64
	movabsq	$-8543223828751151131, %rdx
	addq	%rsi, %rdi
	movq	%rdi, %rax
	imulq	%rdx
	leaq	(%rdx,%rdi), %rax
	movq	%rdi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rdi, %rax
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	add, .-add
	.p2align 4
	.globl	mul
	.type	mul, @function
mul:
.LFB24:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	xorl	%r8d, %r8d
	movq	%rsi, %rdi
	testq	%rsi, %rsi
	jle	.L3
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L6:
	testb	$1, %dil
	je	.L5
	leaq	(%r8,%rcx), %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	subq	%rax, %rsi
	movq	%rsi, %r8
.L5:
	leaq	(%rcx,%rcx), %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rsi
	sarq	%rdi
	movq	%rsi, %rcx
	jne	.L6
.L3:
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE24:
	.size	mul, .-mul
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld%ld%ld"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	%eax, %r8d
	movl	$1, %eax
	cmpl	$3, %r8d
	jne	.L12
	movq	16(%rsp), %r10
	movq	(%rsp), %rdx
	cmpq	%rdx, %r10
	jl	.L27
	movq	8(%rsp), %rcx
	movq	%r10, %rax
	subq	%rdx, %rax
	subq	%rcx, %rdx
	movq	%rdx, %rsi
	cqto
	idivq	%rsi
	xorl	%esi, %esi
	leaq	1(%rax), %r8
	testq	%r8, %r8
	jle	.L15
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L17:
	testb	$1, %r8b
	je	.L16
	leaq	(%rsi,%rcx), %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rdi, %rsi
	subq	%rax, %rsi
.L16:
	leaq	(%rcx,%rcx), %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	sarq	%r8
	movq	%rdi, %rcx
	jne	.L17
.L15:
	leaq	(%r10,%rsi), %rax
	movl	$1000000007, %ecx
.L26:
	cqto
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	idivq	%rcx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
.L12:
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L28
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	movl	$1000000007, %ecx
	movq	%r10, %rax
	jmp	.L26
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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>
#include <inttypes.h>

#define MOD_BY INT64_C(1000000007)

int64_t add(int64_t a, int64_t b) {
	return (a + b) % MOD_BY;
}

int64_t mul(int64_t a, int64_t b) {
	int64_t r = 0;
	while (b > 0) {
		if (b & 1) r = add(r, a);
		a = add(a, a);
		b >>= 1;
	}
	return r;
}

int main(void) {
	int64_t a, b, x;
	if (scanf("%" PRId64 "%" PRId64 "%" PRId64, &a, &b, &x) != 3) return 1;
	if (x < a) {
		printf("%" PRId64 "\n", x % MOD_BY);
	} else {
		int64_t yoryoku = x - a;
		int64_t koukan = yoryoku / (a - b) + 1;
		printf("%" PRId64 "\n", add(x, mul(b, koukan)));
	}
	return 0;
}

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

```c
#include <stdio.h>
#include <inttypes.h>

#define MOD_BY INT64_C(1000000007)

int64_t add(int64_t a, int64_t b) {
	return (a + b) % MOD_BY;
}

int64_t mul(int64_t a, int64_t b) {
	int64_t r = 0;
	while (b > 0) {
		if (b & 1) r = add(r, a);
		a = add(a, a);
		b >>= 1;
	}
	return r;
}

int main(void) {
	int64_t a, b, x;
	if (scanf("%" PRId64 "%" PRId64 "%" PRId64, &a, &b, &x) != 3) return 1;
	if (x < a) {
		printf("%" PRId64 "\n", x % MOD_BY);
	} else {
		int64_t yoryoku = x - a;
		int64_t koukan = yoryoku / (a - b) + 1;
		printf("%" PRId64 "\n", add(x, mul(b, koukan)));
	}
	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:

82 69 103
 3 2 1
 82 69 114
 3 2 0
 98 69 114
 560118409912468 316250877917599 681260158257385
 5 1 5
 82 69 30
 82 69 73
 82 78 114

241
 1
 321
 0
 183
 29192407
 6
 30
 73
 816

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>
#include <inttypes.h>

#define MOD_BY INT64_C(1000000007)

int64_t add(int64_t a, int64_t b) {
	return (a + b) % MOD_BY;
}

int64_t mul(int64_t a, int64_t b) {
	int64_t r = 0;
	while (b > 0) {
		if (b & 1) r = add(r, a);
		a = add(a, a);
		b >>= 1;
	}
	return r;
}

int main(void) {
	int64_t a, b, x;
	if (scanf("%" PRId64 "%" PRId64 "%" PRId64, &a, &b, &x) != 3) return 1;
	if (x < a) {
		printf("%" PRId64 "\n", x % MOD_BY);
	} else {
		int64_t yoryoku = x - a;
		int64_t koukan = yoryoku / (a - b) + 1;
		printf("%" PRId64 "\n", add(x, mul(b, koukan)));
	}
	return 0;
}

```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	add
	.type	add, @function
add:
.LFB23:
	.cfi_startproc
	endbr64
	movabsq	$-8543223828751151131, %rdx
	addq	%rsi, %rdi
	movq	%rdi, %rax
	imulq	%rdx
	leaq	(%rdx,%rdi), %rax
	movq	%rdi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rdi, %rax
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	add, .-add
	.p2align 4
	.globl	mul
	.type	mul, @function
mul:
.LFB24:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	xorl	%r8d, %r8d
	movq	%rsi, %rdi
	testq	%rsi, %rsi
	jle	.L3
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L6:
	testb	$1, %dil
	je	.L5
	leaq	(%r8,%rcx), %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	subq	%rax, %rsi
	movq	%rsi, %r8
.L5:
	leaq	(%rcx,%rcx), %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rsi
	sarq	%rdi
	movq	%rsi, %rcx
	jne	.L6
.L3:
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE24:
	.size	mul, .-mul
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld%ld%ld"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	%eax, %r8d
	movl	$1, %eax
	cmpl	$3, %r8d
	jne	.L12
	movq	16(%rsp), %r10
	movq	(%rsp), %rdx
	cmpq	%rdx, %r10
	jl	.L27
	movq	8(%rsp), %rcx
	movq	%r10, %rax
	subq	%rdx, %rax
	subq	%rcx, %rdx
	movq	%rdx, %rsi
	cqto
	idivq	%rsi
	xorl	%esi, %esi
	leaq	1(%rax), %r8
	testq	%r8, %r8
	jle	.L15
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L17:
	testb	$1, %r8b
	je	.L16
	leaq	(%rsi,%rcx), %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rdi, %rsi
	subq	%rax, %rsi
.L16:
	leaq	(%rcx,%rcx), %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	sarq	%r8
	movq	%rdi, %rcx
	jne	.L17
.L15:
	leaq	(%r10,%rsi), %rax
	movl	$1000000007, %ecx
.L26:
	cqto
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	idivq	%rcx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
.L12:
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L28
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	movl	$1000000007, %ecx
	movq	%r10, %rax
	jmp	.L26
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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
	.p2align 4
	.globl	add
	.type	add, @function
add:
.LFB23:
	.cfi_startproc
	endbr64
	movabsq	$-8543223828751151131, %rdx
	addq	%rsi, %rdi
	movq	%rdi, %rax
	imulq	%rdx
	leaq	(%rdx,%rdi), %rax
	movq	%rdi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rdi, %rax
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	add, .-add
	.p2align 4
	.globl	mul
	.type	mul, @function
mul:
.LFB24:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	xorl	%r8d, %r8d
	movq	%rsi, %rdi
	testq	%rsi, %rsi
	jle	.L3
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L6:
	testb	$1, %dil
	je	.L5
	leaq	(%r8,%rcx), %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %r8
	sarq	$29, %r8
	subq	%rax, %r8
	imulq	$1000000007, %r8, %rax
	subq	%rax, %rsi
	movq	%rsi, %r8
.L5:
	leaq	(%rcx,%rcx), %rsi
	movq	%rsi, %rax
	imulq	%r9
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rsi
	sarq	%rdi
	movq	%rsi, %rcx
	jne	.L6
.L3:
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE24:
	.size	mul, .-mul
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld%ld%ld"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	%eax, %r8d
	movl	$1, %eax
	cmpl	$3, %r8d
	jne	.L12
	movq	16(%rsp), %r10
	movq	(%rsp), %rdx
	cmpq	%rdx, %r10
	jl	.L27
	movq	8(%rsp), %rcx
	movq	%r10, %rax
	subq	%rdx, %rax
	subq	%rcx, %rdx
	movq	%rdx, %rsi
	cqto
	idivq	%rsi
	xorl	%esi, %esi
	leaq	1(%rax), %r8
	testq	%r8, %r8
	jle	.L15
	movabsq	$-8543223828751151131, %r9
	.p2align 4,,10
	.p2align 3
.L17:
	testb	$1, %r8b
	je	.L16
	leaq	(%rsi,%rcx), %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rdi, %rsi
	subq	%rax, %rsi
.L16:
	leaq	(%rcx,%rcx), %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	sarq	%r8
	movq	%rdi, %rcx
	jne	.L17
.L15:
	leaq	(%r10,%rsi), %rax
	movl	$1000000007, %ecx
.L26:
	cqto
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	idivq	%rcx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
.L12:
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L28
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	movl	$1000000007, %ecx
	movq	%r10, %rax
	jmp	.L26
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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:
```