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

#define MOD_BY 1000000007

int add(int a, int b) {
	return a + b - MOD_BY * (a + b >= MOD_BY);
}

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

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

int inv(int a) {
	return pou(a, MOD_BY - 2);
}

int dexibu(int a, int b) {
	return mul(a, inv(b));
}

int kaizyou_cache_max = 0;
int* kaizyou_cache = NULL;

int kaizyou(int a) {
	if (a > kaizyou_cache_max) {
		int i;
		kaizyou_cache = realloc(kaizyou_cache, sizeof(int) * (a + 1));
		if (kaizyou_cache == NULL) exit(2);
		for (i = kaizyou_cache_max + 1; i <= a; i++) {
			kaizyou_cache[i] = mul(kaizyou_cache[i - 1], i);
		}
		kaizyou_cache_max = a;
	}
	return kaizyou_cache[a];
}

int main(void) {
	int X, Y;
	int a, b;
	kaizyou_cache = malloc(sizeof(int));
	if (kaizyou_cache == NULL) return 2;
	kaizyou_cache[0] = 1;
	if (scanf("%d%d", &X, &Y) != 2) return 1;
	a = 2 * X - Y;
	b = 2 * Y - X;
	if (a < 0 || b < 0 || a % 3 != 0 || b % 3 != 0) {
		puts("0");
		return 0;
	}
	a /= 3;
	b /= 3;
	printf("%d\n", dexibu(kaizyou(a + b), mul(kaizyou(a), kaizyou(b))));
	return 0;
}

/*

    a + 2 * b = X
2 * a +     b = Y

b = (2 * X - Y) / 3
a = (2 * Y - X) / 3

*/

/*

999999 333333

*/
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	add
	.type	add, @function
add:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	-4(%rbp), %ecx
	movl	-8(%rbp), %edx
	addl	%ecx, %edx
	cmpl	$1000000006, %edx
	jle	.L2
	movl	$1000000007, %edx
	jmp	.L3
.L2:
	movl	$0, %edx
.L3:
	subl	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	add, .-add
	.globl	mul
	.type	mul, @function
mul:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L6
.L8:
	movl	-24(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L7
	movl	-20(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -4(%rbp)
.L7:
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -20(%rbp)
	sarl	-24(%rbp)
.L6:
	cmpl	$0, -24(%rbp)
	jg	.L8
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	mul, .-mul
	.globl	pou
	.type	pou, @function
pou:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$1, -4(%rbp)
	jmp	.L11
.L13:
	movl	-24(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L12
	movl	-20(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, -4(%rbp)
.L12:
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, -20(%rbp)
	sarl	-24(%rbp)
.L11:
	cmpl	$0, -24(%rbp)
	jg	.L13
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	pou, .-pou
	.globl	inv
	.type	inv, @function
inv:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	$1000000005, %esi
	movl	%eax, %edi
	call	pou
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	inv, .-inv
	.globl	dexibu
	.type	dexibu, @function
dexibu:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, %edi
	call	inv
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	dexibu, .-dexibu
	.globl	kaizyou_cache_max
	.bss
	.align 4
	.type	kaizyou_cache_max, @object
	.size	kaizyou_cache_max, 4
kaizyou_cache_max:
	.zero	4
	.globl	kaizyou_cache
	.align 8
	.type	kaizyou_cache, @object
	.size	kaizyou_cache, 8
kaizyou_cache:
	.zero	8
	.text
	.globl	kaizyou
	.type	kaizyou, @function
kaizyou:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movl	%edi, -36(%rbp)
	movl	kaizyou_cache_max(%rip), %eax
	cmpl	%eax, -36(%rbp)
	jle	.L20
	movl	-36(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	kaizyou_cache(%rip), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	realloc@PLT
	movq	%rax, kaizyou_cache(%rip)
	movq	kaizyou_cache(%rip), %rax
	testq	%rax, %rax
	jne	.L21
	movl	$2, %edi
	call	exit@PLT
.L21:
	movl	kaizyou_cache_max(%rip), %eax
	addl	$1, %eax
	movl	%eax, -20(%rbp)
	jmp	.L22
.L23:
	movq	kaizyou_cache(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	subq	$4, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movq	kaizyou_cache(%rip), %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	leaq	(%rcx,%rdx), %rbx
	movl	-20(%rbp), %edx
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, (%rbx)
	addl	$1, -20(%rbp)
.L22:
	movl	-20(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jle	.L23
	movl	-36(%rbp), %eax
	movl	%eax, kaizyou_cache_max(%rip)
.L20:
	movq	kaizyou_cache(%rip), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	kaizyou, .-kaizyou
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$4, %edi
	call	malloc@PLT
	movq	%rax, kaizyou_cache(%rip)
	movq	kaizyou_cache(%rip), %rax
	testq	%rax, %rax
	jne	.L26
	movl	$2, %eax
	jmp	.L31
.L26:
	movq	kaizyou_cache(%rip), %rax
	movl	$1, (%rax)
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L28
	movl	$1, %eax
	jmp	.L31
.L28:
	movl	-40(%rbp), %eax
	addl	%eax, %eax
	movl	-36(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -32(%rbp)
	movl	-36(%rbp), %eax
	addl	%eax, %eax
	movl	-40(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -28(%rbp)
	cmpl	$0, -32(%rbp)
	js	.L29
	cmpl	$0, -28(%rbp)
	js	.L29
	movl	-32(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	jne	.L29
	movl	-28(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	je	.L30
.L29:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L31
.L30:
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -32(%rbp)
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, %edi
	call	kaizyou
	movl	%eax, %ebx
	movl	-32(%rbp), %eax
	movl	%eax, %edi
	call	kaizyou
	movl	%ebx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, %ebx
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edi
	call	kaizyou
	movl	%ebx, %esi
	movl	%eax, %edi
	call	dexibu
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L31:
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.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	add
	.type	add, @function
add:
.LFB39:
	.cfi_startproc
	endbr64
	leal	(%rdi,%rsi), %eax
	leal	-1000000007(%rax), %edx
	cmpl	$1000000006, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	add, .-add
	.p2align 4
	.globl	mul
	.type	mul, @function
mul:
.LFB40:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	testl	%esi, %esi
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	testb	$1, %sil
	je	.L6
	addl	%edi, %eax
	leal	-1000000007(%rax), %edx
	cmpl	$1000000006, %eax
	cmovg	%edx, %eax
.L6:
	addl	%edi, %edi
	cmpl	$1000000006, %edi
	leal	-1000000007(%rdi), %edx
	cmovg	%edx, %edi
	sarl	%esi
	jne	.L9
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	ret
	.cfi_endproc
.LFE40:
	.size	mul, .-mul
	.p2align 4
	.globl	pou
	.type	pou, @function
pou:
.LFB41:
	.cfi_startproc
	endbr64
	movl	$1, %r8d
	testl	%esi, %esi
	jle	.L15
	.p2align 4,,10
	.p2align 3
.L28:
	testb	$1, %sil
	jne	.L41
	testl	%edi, %edi
	jle	.L31
.L23:
	movl	%edi, %eax
	movl	%edi, %edx
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L27:
	testb	$1, %dl
	je	.L24
	addl	%eax, %edi
	leal	-1000000007(%rdi), %ecx
	cmpl	$1000000006, %edi
	cmovg	%ecx, %edi
.L24:
	addl	%eax, %eax
	cmpl	$1000000006, %eax
	leal	-1000000007(%rax), %ecx
	cmovg	%ecx, %eax
	sarl	%edx
	jne	.L27
	sarl	%esi
	jne	.L28
.L15:
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L41:
	testl	%edi, %edi
	jle	.L30
	movl	%r8d, %eax
	movl	%edi, %edx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L22:
	testb	$1, %dl
	je	.L19
	addl	%eax, %r8d
	leal	-1000000007(%r8), %ecx
	cmpl	$1000000006, %r8d
	cmovg	%ecx, %r8d
.L19:
	addl	%eax, %eax
	cmpl	$1000000006, %eax
	leal	-1000000007(%rax), %ecx
	cmovg	%ecx, %eax
	sarl	%edx
	jne	.L22
	jmp	.L23
.L31:
	xorl	%edi, %edi
	sarl	%esi
	jne	.L28
	jmp	.L15
.L30:
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	sarl	%esi
	jne	.L28
	jmp	.L15
	.cfi_endproc
.LFE41:
	.size	pou, .-pou
	.p2align 4
	.globl	inv
	.type	inv, @function
inv:
.LFB42:
	.cfi_startproc
	endbr64
	movl	$1000000005, %esi
	jmp	pou
	.cfi_endproc
.LFE42:
	.size	inv, .-inv
	.p2align 4
	.globl	dexibu
	.type	dexibu, @function
dexibu:
.LFB43:
	.cfi_startproc
	endbr64
	movl	%edi, %r9d
	movl	%esi, %edi
	movl	$1000000005, %esi
	call	pou
	xorl	%r8d, %r8d
	testl	%eax, %eax
	jle	.L43
	.p2align 4,,10
	.p2align 3
.L48:
	testb	$1, %al
	je	.L45
	addl	%r9d, %r8d
	leal	-1000000007(%r8), %edx
	cmpl	$1000000006, %r8d
	cmovg	%edx, %r8d
.L45:
	addl	%r9d, %r9d
	cmpl	$1000000006, %r9d
	leal	-1000000007(%r9), %edx
	cmovg	%edx, %r9d
	sarl	%eax
	jne	.L48
.L43:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE43:
	.size	dexibu, .-dexibu
	.p2align 4
	.globl	kaizyou
	.type	kaizyou, @function
kaizyou:
.LFB44:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movslq	%edi, %rbx
	cmpl	%ebx, kaizyou_cache_max(%rip)
	movq	kaizyou_cache(%rip), %r8
	jl	.L80
	movl	(%r8,%rbx,4), %eax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L80:
	.cfi_restore_state
	leal	1(%rbx), %esi
	movq	%r8, %rdi
	movslq	%esi, %rsi
	salq	$2, %rsi
	call	realloc@PLT
	movq	%rax, kaizyou_cache(%rip)
	movq	%rax, %r8
	testq	%rax, %rax
	je	.L81
	movl	kaizyou_cache_max(%rip), %eax
	leal	1(%rax), %edi
	cmpl	%edi, %ebx
	jl	.L62
	testl	%edi, %edi
	jg	.L58
	xorl	%ecx, %ecx
	testl	%ebx, %ebx
	movl	$1, %esi
	cmovle	%ebx, %ecx
	movl	%ecx, %edx
	subl	%eax, %edx
	cmpl	%ecx, %eax
	cmovl	%edx, %esi
	subl	$1, %edx
	cmpl	$2, %edx
	jbe	.L59
	cmpl	%ecx, %eax
	jge	.L59
	movl	%esi, %edx
	movd	%eax, %xmm5
	movslq	%edi, %rax
	movdqa	.LC1(%rip), %xmm4
	pshufd	$0, %xmm5, %xmm0
	shrl	$2, %edx
	leaq	(%r8,%rax,4), %rax
	pxor	%xmm2, %xmm2
	salq	$4, %rdx
	paddd	.LC0(%rip), %xmm0
	movdqa	.LC2(%rip), %xmm3
	addq	%rax, %rdx
	.p2align 4,,10
	.p2align 3
.L61:
	movdqa	%xmm0, %xmm1
	movups	%xmm2, (%rax)
	addq	$16, %rax
	paddd	%xmm4, %xmm0
	paddd	%xmm3, %xmm1
	cmpq	%rdx, %rax
	jne	.L61
	movl	%esi, %edx
	pshufd	$255, %xmm1, %xmm1
	andl	$-4, %edx
	movd	%xmm1, %eax
	addl	%edx, %edi
	cmpl	%edx, %esi
	je	.L73
.L59:
	movslq	%edi, %rax
	movl	$0, (%r8,%rax,4)
	leaq	0(,%rax,4), %rdx
	leal	1(%rdi), %eax
	cmpl	%ecx, %eax
	jg	.L73
	movl	$0, 4(%r8,%rdx)
	leal	2(%rdi), %eax
	cmpl	%ecx, %eax
	jg	.L73
	movl	$0, 8(%r8,%rdx)
	addl	$3, %edi
.L63:
	cmpl	%edi, %ebx
	jl	.L62
.L58:
	movslq	%edi, %rdi
	.p2align 4,,10
	.p2align 3
.L69:
	movl	-4(%r8,%rdi,4), %eax
	movl	%edi, %edx
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L68:
	testb	$1, %dl
	je	.L64
	addl	%eax, %ecx
	leal	-1000000007(%rcx), %esi
	cmpl	$1000000006, %ecx
	cmovg	%esi, %ecx
.L64:
	addl	%eax, %eax
	cmpl	$1000000006, %eax
	leal	-1000000007(%rax), %esi
	cmovg	%esi, %eax
	sarl	%edx
	jne	.L68
	movl	%ecx, (%r8,%rdi,4)
	addq	$1, %rdi
	cmpl	%edi, %ebx
	jge	.L69
.L62:
	movl	%ebx, kaizyou_cache_max(%rip)
	movl	(%r8,%rbx,4), %eax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L73:
	.cfi_restore_state
	movl	%eax, %edi
	jmp	.L63
.L81:
	movl	$2, %edi
	call	exit@PLT
	.cfi_endproc
.LFE44:
	.size	kaizyou, .-kaizyou
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%d%d"
.LC4:
	.string	"0"
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB45:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$4, %edi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	malloc@PLT
	movq	%rax, kaizyou_cache(%rip)
	testq	%rax, %rax
	je	.L93
	movl	$1, (%rax)
	leaq	20(%rsp), %rdx
	leaq	16(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rdi
	movl	$1, %r13d
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	jne	.L82
	movl	16(%rsp), %edx
	movl	20(%rsp), %ecx
	leal	(%rdx,%rdx), %eax
	subl	%ecx, %eax
	addl	%ecx, %ecx
	subl	%edx, %ecx
	movl	%eax, %ebx
	orl	%ecx, %ebx
	js	.L84
	movl	$3, %esi
	cltd
	idivl	%esi
	movl	%eax, %r14d
	movl	%ecx, %eax
	movl	%edx, %r13d
	cltd
	idivl	%esi
	movl	%eax, %r12d
	orl	%edx, %r13d
	je	.L85
.L84:
	leaq	.LC4(%rip), %rdi
	xorl	%r13d, %r13d
	call	puts@PLT
.L82:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L105
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movl	%r13d, %eax
	popq	%rbx
	.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
.L85:
	.cfi_restore_state
	movl	%eax, %edi
	call	kaizyou
	movl	%r14d, %edi
	movl	%eax, %ebx
	call	kaizyou
	xorl	%esi, %esi
	movl	%eax, %ecx
	testl	%ebx, %ebx
	jle	.L86
	movl	$1000000007, %edi
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L91:
	testb	$1, %bl
	je	.L87
	addl	%ecx, %esi
	movl	%edx, %eax
	cmpl	$1000000006, %esi
	cmovg	%edi, %eax
	subl	%eax, %esi
.L87:
	addl	%ecx, %ecx
	cmpl	$1000000006, %ecx
	jle	.L104
	subl	$1000000007, %ecx
.L104:
	sarl	%ebx
	jne	.L91
.L86:
	leal	(%r14,%r12), %edi
	movl	%esi, 12(%rsp)
	call	kaizyou
	movl	12(%rsp), %esi
	movl	%eax, %edi
	call	dexibu
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L82
.L105:
	call	__stack_chk_fail@PLT
.L93:
	movl	$2, %r13d
	jmp	.L82
	.cfi_endproc
.LFE45:
	.size	main, .-main
	.globl	kaizyou_cache
	.bss
	.align 8
	.type	kaizyou_cache, @object
	.size	kaizyou_cache, 8
kaizyou_cache:
	.zero	8
	.globl	kaizyou_cache_max
	.align 4
	.type	kaizyou_cache_max, @object
	.size	kaizyou_cache_max, 4
kaizyou_cache_max:
	.zero	4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC1:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.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	add
	.type	add, @function
add:
.LFB39:
	.cfi_startproc
	endbr64
	leal	(%rdi,%rsi), %eax
	leal	-1000000007(%rax), %edx
	cmpl	$1000000006, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	add, .-add
	.p2align 4
	.globl	mul
	.type	mul, @function
mul:
.LFB40:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	testl	%esi, %esi
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	testb	$1, %sil
	je	.L6
	addl	%edi, %eax
	leal	-1000000007(%rax), %edx
	cmpl	$1000000006, %eax
	cmovg	%edx, %eax
.L6:
	addl	%edi, %edi
	cmpl	$1000000006, %edi
	leal	-1000000007(%rdi), %edx
	cmovg	%edx, %edi
	sarl	%esi
	jne	.L9
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	ret
	.cfi_endproc
.LFE40:
	.size	mul, .-mul
	.p2align 4
	.globl	pou
	.type	pou, @function
pou:
.LFB41:
	.cfi_startproc
	endbr64
	movl	$1, %r8d
	testl	%esi, %esi
	jle	.L15
	.p2align 4,,10
	.p2align 3
.L28:
	testb	$1, %sil
	jne	.L41
	testl	%edi, %edi
	jle	.L31
.L23:
	movl	%edi, %eax
	movl	%edi, %edx
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L27:
	testb	$1, %dl
	je	.L24
	addl	%eax, %edi
	leal	-1000000007(%rdi), %ecx
	cmpl	$1000000006, %edi
	cmovg	%ecx, %edi
.L24:
	addl	%eax, %eax
	cmpl	$1000000006, %eax
	leal	-1000000007(%rax), %ecx
	cmovg	%ecx, %eax
	sarl	%edx
	jne	.L27
	sarl	%esi
	jne	.L28
.L15:
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L41:
	testl	%edi, %edi
	jle	.L30
	movl	%r8d, %eax
	movl	%edi, %edx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L22:
	testb	$1, %dl
	je	.L19
	addl	%eax, %r8d
	leal	-1000000007(%r8), %ecx
	cmpl	$1000000006, %r8d
	cmovg	%ecx, %r8d
.L19:
	addl	%eax, %eax
	cmpl	$1000000006, %eax
	leal	-1000000007(%rax), %ecx
	cmovg	%ecx, %eax
	sarl	%edx
	jne	.L22
	jmp	.L23
.L31:
	xorl	%edi, %edi
	sarl	%esi
	jne	.L28
	jmp	.L15
.L30:
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	sarl	%esi
	jne	.L28
	jmp	.L15
	.cfi_endproc
.LFE41:
	.size	pou, .-pou
	.p2align 4
	.globl	inv
	.type	inv, @function
inv:
.LFB42:
	.cfi_startproc
	endbr64
	movl	$1000000005, %esi
	jmp	pou
	.cfi_endproc
.LFE42:
	.size	inv, .-inv
	.p2align 4
	.globl	dexibu
	.type	dexibu, @function
dexibu:
.LFB43:
	.cfi_startproc
	endbr64
	movl	%edi, %r9d
	movl	%esi, %edi
	movl	$1000000005, %esi
	call	pou
	xorl	%r8d, %r8d
	testl	%eax, %eax
	jle	.L43
	.p2align 4,,10
	.p2align 3
.L48:
	testb	$1, %al
	je	.L45
	addl	%r9d, %r8d
	leal	-1000000007(%r8), %edx
	cmpl	$1000000006, %r8d
	cmovg	%edx, %r8d
.L45:
	addl	%r9d, %r9d
	cmpl	$1000000006, %r9d
	leal	-1000000007(%r9), %edx
	cmovg	%edx, %r9d
	sarl	%eax
	jne	.L48
.L43:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE43:
	.size	dexibu, .-dexibu
	.p2align 4
	.globl	kaizyou
	.type	kaizyou, @function
kaizyou:
.LFB44:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movslq	%edi, %rbx
	cmpl	%ebx, kaizyou_cache_max(%rip)
	movq	kaizyou_cache(%rip), %r8
	jl	.L80
	movl	(%r8,%rbx,4), %eax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L80:
	.cfi_restore_state
	leal	1(%rbx), %esi
	movq	%r8, %rdi
	movslq	%esi, %rsi
	salq	$2, %rsi
	call	realloc@PLT
	movq	%rax, kaizyou_cache(%rip)
	movq	%rax, %r8
	testq	%rax, %rax
	je	.L81
	movl	kaizyou_cache_max(%rip), %eax
	leal	1(%rax), %edi
	cmpl	%edi, %ebx
	jl	.L62
	testl	%edi, %edi
	jg	.L58
	xorl	%ecx, %ecx
	testl	%ebx, %ebx
	movl	$1, %esi
	cmovle	%ebx, %ecx
	movl	%ecx, %edx
	subl	%eax, %edx
	cmpl	%ecx, %eax
	cmovl	%edx, %esi
	subl	$1, %edx
	cmpl	$2, %edx
	jbe	.L59
	cmpl	%ecx, %eax
	jge	.L59
	movl	%esi, %edx
	movd	%eax, %xmm5
	movslq	%edi, %rax
	movdqa	.LC1(%rip), %xmm4
	pshufd	$0, %xmm5, %xmm0
	shrl	$2, %edx
	leaq	(%r8,%rax,4), %rax
	pxor	%xmm2, %xmm2
	salq	$4, %rdx
	paddd	.LC0(%rip), %xmm0
	movdqa	.LC2(%rip), %xmm3
	addq	%rax, %rdx
	.p2align 4,,10
	.p2align 3
.L61:
	movdqa	%xmm0, %xmm1
	movups	%xmm2, (%rax)
	addq	$16, %rax
	paddd	%xmm4, %xmm0
	paddd	%xmm3, %xmm1
	cmpq	%rdx, %rax
	jne	.L61
	movl	%esi, %edx
	pshufd	$255, %xmm1, %xmm1
	andl	$-4, %edx
	movd	%xmm1, %eax
	addl	%edx, %edi
	cmpl	%edx, %esi
	je	.L73
.L59:
	movslq	%edi, %rax
	movl	$0, (%r8,%rax,4)
	leaq	0(,%rax,4), %rdx
	leal	1(%rdi), %eax
	cmpl	%ecx, %eax
	jg	.L73
	movl	$0, 4(%r8,%rdx)
	leal	2(%rdi), %eax
	cmpl	%ecx, %eax
	jg	.L73
	movl	$0, 8(%r8,%rdx)
	addl	$3, %edi
.L63:
	cmpl	%edi, %ebx
	jl	.L62
.L58:
	movslq	%edi, %rdi
	.p2align 4,,10
	.p2align 3
.L69:
	movl	-4(%r8,%rdi,4), %eax
	movl	%edi, %edx
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L68:
	testb	$1, %dl
	je	.L64
	addl	%eax, %ecx
	leal	-1000000007(%rcx), %esi
	cmpl	$1000000006, %ecx
	cmovg	%esi, %ecx
.L64:
	addl	%eax, %eax
	cmpl	$1000000006, %eax
	leal	-1000000007(%rax), %esi
	cmovg	%esi, %eax
	sarl	%edx
	jne	.L68
	movl	%ecx, (%r8,%rdi,4)
	addq	$1, %rdi
	cmpl	%edi, %ebx
	jge	.L69
.L62:
	movl	%ebx, kaizyou_cache_max(%rip)
	movl	(%r8,%rbx,4), %eax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L73:
	.cfi_restore_state
	movl	%eax, %edi
	jmp	.L63
.L81:
	movl	$2, %edi
	call	exit@PLT
	.cfi_endproc
.LFE44:
	.size	kaizyou, .-kaizyou
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%d%d"
.LC4:
	.string	"0"
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB45:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$4, %edi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	malloc@PLT
	movq	%rax, kaizyou_cache(%rip)
	testq	%rax, %rax
	je	.L93
	movl	$1, (%rax)
	leaq	20(%rsp), %rdx
	leaq	16(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rdi
	movl	$1, %r13d
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	jne	.L82
	movl	16(%rsp), %edx
	movl	20(%rsp), %ecx
	leal	(%rdx,%rdx), %eax
	subl	%ecx, %eax
	addl	%ecx, %ecx
	subl	%edx, %ecx
	movl	%eax, %ebx
	orl	%ecx, %ebx
	js	.L84
	movl	$3, %esi
	cltd
	idivl	%esi
	movl	%eax, %r14d
	movl	%ecx, %eax
	movl	%edx, %r13d
	cltd
	idivl	%esi
	movl	%eax, %r12d
	orl	%edx, %r13d
	je	.L85
.L84:
	leaq	.LC4(%rip), %rdi
	xorl	%r13d, %r13d
	call	puts@PLT
.L82:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L105
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movl	%r13d, %eax
	popq	%rbx
	.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
.L85:
	.cfi_restore_state
	movl	%eax, %edi
	call	kaizyou
	movl	%r14d, %edi
	movl	%eax, %ebx
	call	kaizyou
	xorl	%esi, %esi
	movl	%eax, %ecx
	testl	%ebx, %ebx
	jle	.L86
	movl	$1000000007, %edi
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L91:
	testb	$1, %bl
	je	.L87
	addl	%ecx, %esi
	movl	%edx, %eax
	cmpl	$1000000006, %esi
	cmovg	%edi, %eax
	subl	%eax, %esi
.L87:
	addl	%ecx, %ecx
	cmpl	$1000000006, %ecx
	jle	.L104
	subl	$1000000007, %ecx
.L104:
	sarl	%ebx
	jne	.L91
.L86:
	leal	(%r14,%r12), %edi
	movl	%esi, 12(%rsp)
	call	kaizyou
	movl	12(%rsp), %esi
	movl	%eax, %edi
	call	dexibu
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L82
.L105:
	call	__stack_chk_fail@PLT
.L93:
	movl	$2, %r13d
	jmp	.L82
	.cfi_endproc
.LFE45:
	.size	main, .-main
	.globl	kaizyou_cache
	.bss
	.align 8
	.type	kaizyou_cache, @object
	.size	kaizyou_cache, 8
kaizyou_cache:
	.zero	8
	.globl	kaizyou_cache_max
	.align 4
	.type	kaizyou_cache_max, @object
	.size	kaizyou_cache_max, 4
kaizyou_cache_max:
	.zero	4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC1:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.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>
#include <stdlib.h>

#define MOD_BY 1000000007

int add(int a, int b) {
	return a + b - MOD_BY * (a + b >= MOD_BY);
}

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

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

int inv(int a) {
	return pou(a, MOD_BY - 2);
}

int dexibu(int a, int b) {
	return mul(a, inv(b));
}

int kaizyou_cache_max = 0;
int* kaizyou_cache = NULL;

int kaizyou(int a) {
	if (a > kaizyou_cache_max) {
		int i;
		kaizyou_cache = realloc(kaizyou_cache, sizeof(int) * (a + 1));
		if (kaizyou_cache == NULL) exit(2);
		for (i = kaizyou_cache_max + 1; i <= a; i++) {
			kaizyou_cache[i] = mul(kaizyou_cache[i - 1], i);
		}
		kaizyou_cache_max = a;
	}
	return kaizyou_cache[a];
}

int main(void) {
	int X, Y;
	int a, b;
	kaizyou_cache = malloc(sizeof(int));
	if (kaizyou_cache == NULL) return 2;
	kaizyou_cache[0] = 1;
	if (scanf("%d%d", &X, &Y) != 2) return 1;
	a = 2 * X - Y;
	b = 2 * Y - X;
	if (a < 0 || b < 0 || a % 3 != 0 || b % 3 != 0) {
		puts("0");
		return 0;
	}
	a /= 3;
	b /= 3;
	printf("%d\n", dexibu(kaizyou(a + b), mul(kaizyou(a), kaizyou(b))));
	return 0;
}

/*

    a + 2 * b = X
2 * a +     b = Y

b = (2 * X - Y) / 3
a = (2 * Y - X) / 3

*/

/*

999999 333333

*/

728601 999999
 2 0
 123395 134890
 1 2
 1279413 999999
 432914 823357
 266891 229081
 524173 402356
 502635 840600
 419854 442868

197453690
 0
 905248722
 1
 825914746
 239466801
 837883095
 660181343
 416438521
 590672876

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

#define MOD_BY 1000000007

int add(int a, int b) {
	return a + b - MOD_BY * (a + b >= MOD_BY);
}

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

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

int inv(int a) {
	return pou(a, MOD_BY - 2);
}

int dexibu(int a, int b) {
	return mul(a, inv(b));
}

int kaizyou_cache_max = 0;
int* kaizyou_cache = NULL;

int kaizyou(int a) {
	if (a > kaizyou_cache_max) {
		int i;
		kaizyou_cache = realloc(kaizyou_cache, sizeof(int) * (a + 1));
		if (kaizyou_cache == NULL) exit(2);
		for (i = kaizyou_cache_max + 1; i <= a; i++) {
			kaizyou_cache[i] = mul(kaizyou_cache[i - 1], i);
		}
		kaizyou_cache_max = a;
	}
	return kaizyou_cache[a];
}

int main(void) {
	int X, Y;
	int a, b;
	kaizyou_cache = malloc(sizeof(int));
	if (kaizyou_cache == NULL) return 2;
	kaizyou_cache[0] = 1;
	if (scanf("%d%d", &X, &Y) != 2) return 1;
	a = 2 * X - Y;
	b = 2 * Y - X;
	if (a < 0 || b < 0 || a % 3 != 0 || b % 3 != 0) {
		puts("0");
		return 0;
	}
	a /= 3;
	b /= 3;
	printf("%d\n", dexibu(kaizyou(a + b), mul(kaizyou(a), kaizyou(b))));
	return 0;
}

/*

    a + 2 * b = X
2 * a +     b = Y

b = (2 * X - Y) / 3
a = (2 * Y - X) / 3

*/

/*

999999 333333

*/
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	add
	.type	add, @function
add:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	-4(%rbp), %ecx
	movl	-8(%rbp), %edx
	addl	%ecx, %edx
	cmpl	$1000000006, %edx
	jle	.L2
	movl	$1000000007, %edx
	jmp	.L3
.L2:
	movl	$0, %edx
.L3:
	subl	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	add, .-add
	.globl	mul
	.type	mul, @function
mul:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L6
.L8:
	movl	-24(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L7
	movl	-20(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -4(%rbp)
.L7:
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -20(%rbp)
	sarl	-24(%rbp)
.L6:
	cmpl	$0, -24(%rbp)
	jg	.L8
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	mul, .-mul
	.globl	pou
	.type	pou, @function
pou:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$1, -4(%rbp)
	jmp	.L11
.L13:
	movl	-24(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L12
	movl	-20(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, -4(%rbp)
.L12:
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, -20(%rbp)
	sarl	-24(%rbp)
.L11:
	cmpl	$0, -24(%rbp)
	jg	.L13
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	pou, .-pou
	.globl	inv
	.type	inv, @function
inv:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	$1000000005, %esi
	movl	%eax, %edi
	call	pou
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	inv, .-inv
	.globl	dexibu
	.type	dexibu, @function
dexibu:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, %edi
	call	inv
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	dexibu, .-dexibu
	.globl	kaizyou_cache_max
	.bss
	.align 4
	.type	kaizyou_cache_max, @object
	.size	kaizyou_cache_max, 4
kaizyou_cache_max:
	.zero	4
	.globl	kaizyou_cache
	.align 8
	.type	kaizyou_cache, @object
	.size	kaizyou_cache, 8
kaizyou_cache:
	.zero	8
	.text
	.globl	kaizyou
	.type	kaizyou, @function
kaizyou:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movl	%edi, -36(%rbp)
	movl	kaizyou_cache_max(%rip), %eax
	cmpl	%eax, -36(%rbp)
	jle	.L20
	movl	-36(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	kaizyou_cache(%rip), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	realloc@PLT
	movq	%rax, kaizyou_cache(%rip)
	movq	kaizyou_cache(%rip), %rax
	testq	%rax, %rax
	jne	.L21
	movl	$2, %edi
	call	exit@PLT
.L21:
	movl	kaizyou_cache_max(%rip), %eax
	addl	$1, %eax
	movl	%eax, -20(%rbp)
	jmp	.L22
.L23:
	movq	kaizyou_cache(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	subq	$4, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movq	kaizyou_cache(%rip), %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	leaq	(%rcx,%rdx), %rbx
	movl	-20(%rbp), %edx
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, (%rbx)
	addl	$1, -20(%rbp)
.L22:
	movl	-20(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jle	.L23
	movl	-36(%rbp), %eax
	movl	%eax, kaizyou_cache_max(%rip)
.L20:
	movq	kaizyou_cache(%rip), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	kaizyou, .-kaizyou
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$4, %edi
	call	malloc@PLT
	movq	%rax, kaizyou_cache(%rip)
	movq	kaizyou_cache(%rip), %rax
	testq	%rax, %rax
	jne	.L26
	movl	$2, %eax
	jmp	.L31
.L26:
	movq	kaizyou_cache(%rip), %rax
	movl	$1, (%rax)
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L28
	movl	$1, %eax
	jmp	.L31
.L28:
	movl	-40(%rbp), %eax
	addl	%eax, %eax
	movl	-36(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -32(%rbp)
	movl	-36(%rbp), %eax
	addl	%eax, %eax
	movl	-40(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -28(%rbp)
	cmpl	$0, -32(%rbp)
	js	.L29
	cmpl	$0, -28(%rbp)
	js	.L29
	movl	-32(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	jne	.L29
	movl	-28(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	je	.L30
.L29:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L31
.L30:
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -32(%rbp)
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, %edi
	call	kaizyou
	movl	%eax, %ebx
	movl	-32(%rbp), %eax
	movl	%eax, %edi
	call	kaizyou
	movl	%ebx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, %ebx
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edi
	call	kaizyou
	movl	%ebx, %esi
	movl	%eax, %edi
	call	dexibu
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L31:
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.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	add
	.type	add, @function
add:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	-4(%rbp), %ecx
	movl	-8(%rbp), %edx
	addl	%ecx, %edx
	cmpl	$1000000006, %edx
	jle	.L2
	movl	$1000000007, %edx
	jmp	.L3
.L2:
	movl	$0, %edx
.L3:
	subl	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	add, .-add
	.globl	mul
	.type	mul, @function
mul:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L6
.L8:
	movl	-24(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L7
	movl	-20(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -4(%rbp)
.L7:
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	add
	movl	%eax, -20(%rbp)
	sarl	-24(%rbp)
.L6:
	cmpl	$0, -24(%rbp)
	jg	.L8
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	mul, .-mul
	.globl	pou
	.type	pou, @function
pou:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$1, -4(%rbp)
	jmp	.L11
.L13:
	movl	-24(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L12
	movl	-20(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, -4(%rbp)
.L12:
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, -20(%rbp)
	sarl	-24(%rbp)
.L11:
	cmpl	$0, -24(%rbp)
	jg	.L13
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	pou, .-pou
	.globl	inv
	.type	inv, @function
inv:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	movl	$1000000005, %esi
	movl	%eax, %edi
	call	pou
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	inv, .-inv
	.globl	dexibu
	.type	dexibu, @function
dexibu:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, %edi
	call	inv
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	dexibu, .-dexibu
	.globl	kaizyou_cache_max
	.bss
	.align 4
	.type	kaizyou_cache_max, @object
	.size	kaizyou_cache_max, 4
kaizyou_cache_max:
	.zero	4
	.globl	kaizyou_cache
	.align 8
	.type	kaizyou_cache, @object
	.size	kaizyou_cache, 8
kaizyou_cache:
	.zero	8
	.text
	.globl	kaizyou
	.type	kaizyou, @function
kaizyou:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movl	%edi, -36(%rbp)
	movl	kaizyou_cache_max(%rip), %eax
	cmpl	%eax, -36(%rbp)
	jle	.L20
	movl	-36(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	kaizyou_cache(%rip), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	realloc@PLT
	movq	%rax, kaizyou_cache(%rip)
	movq	kaizyou_cache(%rip), %rax
	testq	%rax, %rax
	jne	.L21
	movl	$2, %edi
	call	exit@PLT
.L21:
	movl	kaizyou_cache_max(%rip), %eax
	addl	$1, %eax
	movl	%eax, -20(%rbp)
	jmp	.L22
.L23:
	movq	kaizyou_cache(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$2, %rax
	subq	$4, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movq	kaizyou_cache(%rip), %rcx
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	salq	$2, %rdx
	leaq	(%rcx,%rdx), %rbx
	movl	-20(%rbp), %edx
	movl	%edx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, (%rbx)
	addl	$1, -20(%rbp)
.L22:
	movl	-20(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jle	.L23
	movl	-36(%rbp), %eax
	movl	%eax, kaizyou_cache_max(%rip)
.L20:
	movq	kaizyou_cache(%rip), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	kaizyou, .-kaizyou
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"0"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$4, %edi
	call	malloc@PLT
	movq	%rax, kaizyou_cache(%rip)
	movq	kaizyou_cache(%rip), %rax
	testq	%rax, %rax
	jne	.L26
	movl	$2, %eax
	jmp	.L31
.L26:
	movq	kaizyou_cache(%rip), %rax
	movl	$1, (%rax)
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L28
	movl	$1, %eax
	jmp	.L31
.L28:
	movl	-40(%rbp), %eax
	addl	%eax, %eax
	movl	-36(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -32(%rbp)
	movl	-36(%rbp), %eax
	addl	%eax, %eax
	movl	-40(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -28(%rbp)
	cmpl	$0, -32(%rbp)
	js	.L29
	cmpl	$0, -28(%rbp)
	js	.L29
	movl	-32(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	jne	.L29
	movl	-28(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	je	.L30
.L29:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L31
.L30:
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -32(%rbp)
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, %edi
	call	kaizyou
	movl	%eax, %ebx
	movl	-32(%rbp), %eax
	movl	%eax, %edi
	call	kaizyou
	movl	%ebx, %esi
	movl	%eax, %edi
	call	mul
	movl	%eax, %ebx
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edi
	call	kaizyou
	movl	%ebx, %esi
	movl	%eax, %edi
	call	dexibu
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L31:
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.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:
