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>
#include<math.h>
#define NUM 1000000007

/*
int koyaku(int a,int b){
  if(a>b){
    if(a%b==0) return b;
    return koyaku(b,a-b);}
  else{
    if(b%a==0) return a;
    return koyaku(a,b-a);}
    }
*/

int koyaku(int a,int b){
  if(b==0) return a;
  return koyaku(b,a%b);
}

/*
long int power(int a){ //2**a%NUM
  if(a<30) return (long int)pow(2,a);
  long int tmp=(long int)pow(2,30)%NUM;
  return ((int)pow(tmp,a/30)%NUM)*(int)pow(2,a%30);}
*/

long int power2(int a,long int b){
  if(b==1) return (long int)a;
  if(b%2==0){
    long int tmp=power2(a,b/2)%NUM;
    return (tmp*tmp)%NUM;}
  else{
    return (power2(a,b-1)*a)%NUM;}
}
  

long int disco(int h,int w,int t){
  if(t==1){
    long int sum=0;
    sum+=power2(2,h);
    //printf("%ld\n",sum);
    sum+=power2(2,w);
    //printf("%d\n",NUM);
    sum+=power2(2,koyaku(h,w));
    //printf("%ld\n",sum);
    return (sum-3)%NUM;}

  else{
    long int koyaht=koyaku(h,t);
    long int koyawt=koyaku(w,t);
    return (long int)power2(disco(h/koyaht,w/koyawt,1),koyaht*koyawt)%NUM;}
}

int main(){
  int h,w,t;
  scanf("%d%d%d",&h,&w,&t);
  long int sum=disco(h,w,t);
  printf("%ld\n",sum);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	koyaku
	.type	koyaku, @function
koyaku:
.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
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	cmpl	$0, -8(%rbp)
	jne	.L2
	movl	-4(%rbp), %eax
	jmp	.L3
.L2:
	movl	-4(%rbp), %eax
	cltd
	idivl	-8(%rbp)
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	koyaku
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	koyaku, .-koyaku
	.globl	power2
	.type	power2, @function
power2:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movq	%rsi, -32(%rbp)
	cmpq	$1, -32(%rbp)
	jne	.L5
	movl	-20(%rbp), %eax
	cltq
	jmp	.L6
.L5:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	jne	.L7
	movq	-32(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movl	-20(%rbp), %eax
	movq	%rdx, %rsi
	movl	%eax, %edi
	call	power2
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	%rax, %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	jmp	.L6
.L7:
	movq	-32(%rbp), %rax
	leaq	-1(%rax), %rdx
	movl	-20(%rbp), %eax
	movq	%rdx, %rsi
	movl	%eax, %edi
	call	power2
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rdx, %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	power2, .-power2
	.globl	disco
	.type	disco, @function
disco:
.LFB8:
	.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	$56, %rsp
	.cfi_offset 3, -24
	movl	%edi, -52(%rbp)
	movl	%esi, -56(%rbp)
	movl	%edx, -60(%rbp)
	cmpl	$1, -60(%rbp)
	jne	.L9
	movq	$0, -24(%rbp)
	movl	-52(%rbp), %eax
	cltq
	movq	%rax, %rsi
	movl	$2, %edi
	call	power2
	addq	%rax, -24(%rbp)
	movl	-56(%rbp), %eax
	cltq
	movq	%rax, %rsi
	movl	$2, %edi
	call	power2
	addq	%rax, -24(%rbp)
	movl	-56(%rbp), %edx
	movl	-52(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	koyaku
	cltq
	movq	%rax, %rsi
	movl	$2, %edi
	call	power2
	addq	%rax, -24(%rbp)
	movq	-24(%rbp), %rax
	leaq	-3(%rax), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	jmp	.L10
.L9:
	movl	-60(%rbp), %edx
	movl	-52(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	koyaku
	cltq
	movq	%rax, -40(%rbp)
	movl	-60(%rbp), %edx
	movl	-56(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	koyaku
	cltq
	movq	%rax, -32(%rbp)
	movq	-40(%rbp), %rax
	imulq	-32(%rbp), %rax
	movq	%rax, %rbx
	movl	-56(%rbp), %eax
	cltq
	cqto
	idivq	-32(%rbp)
	movl	%eax, %ecx
	movl	-52(%rbp), %eax
	cltq
	cqto
	idivq	-40(%rbp)
	movl	$1, %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	disco
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	power2
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
.L10:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	disco, .-disco
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-20(%rbp), %rcx
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	disco
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	koyaku
	.type	koyaku, @function
koyaku:
.LFB39:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	movl	%esi, %r8d
	testl	%esi, %esi
	jne	.L2
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%edx, %r8d
.L2:
	cltd
	idivl	%r8d
	movl	%r8d, %eax
	testl	%edx, %edx
	jne	.L11
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	movl	%edi, %r8d
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	koyaku, .-koyaku
	.p2align 4
	.globl	power2
	.type	power2, @function
power2:
.LFB40:
	.cfi_startproc
	endbr64
	cmpq	$1, %rsi
	je	.L45
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rsi, %rcx
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	testb	$1, %sil
	jne	.L15
	shrq	$63, %rsi
	addq	%rcx, %rsi
	sarq	%rsi
	cmpq	$1, %rsi
	je	.L46
	testb	$1, %sil
	je	.L47
	movslq	%edi, %rbx
	leaq	-1(%rsi), %rax
	movq	%rbx, %rdx
	cmpq	$2, %rsi
	je	.L22
	testb	$1, %al
	jne	.L23
	movq	%rax, %rsi
	shrq	$63, %rsi
	addq	%rax, %rsi
	sarq	%rsi
	call	power2
	movabsq	$-8543223828751151131, %rcx
	movq	%rax, %rdi
	imulq	%rcx
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	subq	%rax, %rdi
	movq	%rdi, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%rcx
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	movq	%rsi, %rdx
	subq	%rax, %rdx
.L22:
	movq	%rdx, %rsi
	movabsq	$-8543223828751151131, %rdx
	imulq	%rbx, %rsi
	movq	%rsi, %rax
	imulq	%rdx
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rsi, %rcx
	subq	%rax, %rcx
.L17:
	imulq	%rcx, %rcx
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L15:
	movslq	%edi, %rbx
	leaq	-1(%rsi), %rax
	movq	%rbx, %rdx
	cmpq	$2, %rsi
	je	.L24
	testb	$1, %al
	jne	.L25
	movq	%rax, %rsi
	shrq	$63, %rsi
	addq	%rax, %rsi
	sarq	%rsi
	cmpq	$1, %rsi
	je	.L48
	testb	$1, %sil
	jne	.L28
	testq	%rax, %rax
	leaq	2(%rcx), %rsi
	cmovns	%rax, %rsi
	sarq	$2, %rsi
	call	power2
	movabsq	$-8543223828751151131, %rcx
	movq	%rax, %rdi
	imulq	%rcx
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	subq	%rax, %rdi
	movq	%rdi, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%rcx
.L42:
	leaq	(%rdx,%rsi), %rcx
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rsi
	movq	%rsi, %rcx
.L27:
	imulq	%rcx, %rcx
	jmp	.L43
	.p2align 4,,10
	.p2align 3
.L25:
	leaq	-2(%rsi), %rax
	cmpq	$3, %rsi
	je	.L29
	testb	$1, %al
	jne	.L30
	movq	%rax, %rsi
	shrq	$63, %rsi
	addq	%rax, %rsi
	sarq	%rsi
	call	power2
	movabsq	$-8543223828751151131, %rcx
	movq	%rax, %rdi
	imulq	%rcx
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	subq	%rax, %rdi
	movq	%rdi, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%rcx
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	movq	%rsi, %rdx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdx
.L29:
	imulq	%rbx, %rdx
	movq	%rdx, %rcx
.L43:
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
.L24:
	movq	%rdx, %rcx
	imulq	%rbx, %rcx
.L44:
	movq	%rcx, %rax
	addq	$16, %rsp
	.cfi_def_cfa_offset 16
	movabsq	$-8543223828751151131, %rdx
	imulq	%rdx
	popq	%rbx
	.cfi_def_cfa_offset 8
	leaq	(%rdx,%rcx), %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L45:
	.cfi_restore 3
	movslq	%edi, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L47:
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -16
	testq	%rcx, %rcx
	leaq	3(%rcx), %rsi
	cmovns	%rcx, %rsi
	sarq	$2, %rsi
	cmpq	$1, %rsi
	je	.L49
	testb	$1, %sil
	jne	.L21
	testq	%rcx, %rcx
	leaq	7(%rcx), %rsi
	cmovns	%rcx, %rsi
	sarq	$3, %rsi
	call	power2
	movabsq	$-8543223828751151131, %rcx
	movq	%rax, %rsi
	imulq	%rcx
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rdi
	sarq	$29, %rdi
	subq	%rax, %rdi
	imulq	$1000000007, %rdi, %rax
	movq	%rsi, %rdi
	subq	%rax, %rdi
	imulq	%rdi, %rdi
	movq	%rdi, %rax
	imulq	%rcx
.L41:
	leaq	(%rdx,%rdi), %rsi
	movq	%rdi, %rax
	movabsq	$-8543223828751151131, %rdx
	sarq	$63, %rax
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	subq	%rax, %rdi
	movq	%rdi, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%rdx
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rsi
	movq	%rsi, %rcx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L46:
	movabsq	$-8543223828751151131, %rdx
	movslq	%edi, %rdi
	movq	%rdi, %rax
	imulq	%rdx
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rcx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L30:
	leaq	-3(%rsi), %rsi
	call	power2
	movabsq	$-8543223828751151131, %rdx
	imulq	%rbx, %rax
	movq	%rax, %rcx
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L21:
	subq	$1, %rsi
	movl	%edi, 12(%rsp)
	call	power2
	movslq	12(%rsp), %rdi
	imulq	%rax, %rdi
.L40:
	movabsq	$-8543223828751151131, %rdx
	movq	%rdi, %rax
	imulq	%rdx
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L23:
	subq	$2, %rsi
	call	power2
	movabsq	$-8543223828751151131, %rdx
	imulq	%rbx, %rax
	movq	%rax, %rcx
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	movq	%rcx, %rdx
	subq	%rax, %rdx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L28:
	subq	$1, %rsi
	call	power2
	movabsq	$-8543223828751151131, %rdx
	imulq	%rbx, %rax
	movq	%rax, %rsi
	imulq	%rdx
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L49:
	movslq	%edi, %rdi
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L48:
	movabsq	$-8543223828751151131, %rdx
	movq	%rbx, %rax
	imulq	%rdx
	movq	%rbx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rbx), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rbx, %rcx
	subq	%rax, %rcx
	jmp	.L27
	.cfi_endproc
.LFE40:
	.size	power2, .-power2
	.p2align 4
	.globl	disco
	.type	disco, @function
disco:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movslq	%edi, %r10
	movslq	%esi, %r9
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%r10, %r8
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	cmpl	$1, %edx
	je	.L110
	movl	%edx, %ecx
	movl	%edx, %esi
	testl	%edx, %edx
	jne	.L62
	jmp	.L111
	.p2align 4,,10
	.p2align 3
.L112:
	movl	%edx, %esi
.L62:
	movl	%r8d, %eax
	movl	%esi, %r8d
	cltd
	idivl	%esi
	testl	%edx, %edx
	jne	.L112
	movslq	%esi, %r8
	movl	%r9d, %esi
	.p2align 4,,10
	.p2align 3
.L80:
	movl	%esi, %eax
	movl	%ecx, %edi
	cltd
	movslq	%edi, %rsi
	idivl	%ecx
	movl	%edx, %ecx
	testl	%edx, %edx
	jne	.L80
	movq	%r10, %rax
	cqto
	idivq	%r8
	imulq	%rsi, %r8
	movq	%rax, %r10
	movl	%eax, %ebx
	movslq	%eax, %rbp
	movq	%r9, %rax
	cqto
	idivq	%rsi
	movq	%rax, %r9
	movl	%eax, %r11d
	cmpl	$1, %r10d
	je	.L87
	andl	$1, %r10d
	je	.L113
	leaq	-1(%rbp), %rsi
	movl	$2, %edi
	call	power2
	movabsq	$-8543223828751151131, %rdx
	leaq	(%rax,%rax), %rcx
	movq	%rcx, %rax
	imulq	%rdx
.L107:
	leaq	(%rdx,%rcx), %r10
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$29, %r10
	subq	%rax, %r10
	imulq	$1000000007, %r10, %rax
	subq	%rax, %rcx
	movq	%rcx, %r10
.L65:
	movslq	%r9d, %rsi
	cmpl	$1, %r9d
	je	.L88
	testb	$1, %r9b
	jne	.L67
	movq	%rsi, %rax
	movl	$2, %edi
	shrq	$63, %rax
	addq	%rax, %rsi
	sarq	%rsi
	call	power2
	movabsq	$-8543223828751151131, %rsi
	movq	%rax, %rdi
	imulq	%rsi
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rcx
	imulq	%rdi, %rcx
	movq	%rcx, %rax
	imulq	%rsi
	leaq	(%rdx,%rcx), %rax
	movq	%rcx, %rdx
	sarq	$29, %rax
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	addq	%rcx, %r10
	testl	%r9d, %r9d
	jne	.L73
	jmp	.L114
	.p2align 4,,10
	.p2align 3
.L91:
	movl	%edx, %r11d
.L73:
	movl	%ebx, %eax
	movl	%r11d, %ebx
	cltd
	idivl	%r11d
	testl	%edx, %edx
	jne	.L91
	movslq	%r11d, %rbp
.L68:
	movl	$2, %edx
	cmpq	$1, %rbp
	je	.L70
	andl	$1, %r11d
	jne	.L71
	movq	%rbp, %rsi
	movl	$2, %edi
	shrq	$63, %rsi
	addq	%rbp, %rsi
	sarq	%rsi
	call	power2
	movabsq	$-8543223828751151131, %rcx
	movq	%rax, %rdi
	imulq	%rcx
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	subq	%rax, %rdi
	movq	%rdi, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%rcx
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	movq	%rsi, %rdx
.L70:
	leaq	-3(%r10,%rdx), %rcx
	movabsq	$-8543223828751151131, %r10
	movq	%rcx, %rax
	imulq	%r10
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r9
	sarq	$29, %r9
	subq	%rax, %r9
	imulq	$1000000007, %r9, %rax
	subq	%rax, %rcx
	movq	%rcx, %r9
	movl	%ecx, %edi
	cmpq	$1, %r8
	je	.L50
	testb	$1, %r8b
	jne	.L74
	movq	%r8, %rsi
	shrq	$63, %rsi
	addq	%r8, %rsi
	sarq	%rsi
	cmpq	$1, %rsi
	je	.L75
	testb	$1, %sil
	je	.L115
	subq	$1, %rsi
	call	power2
	movq	%r9, %rcx
	imulq	%rax, %rcx
.L108:
	movq	%rcx, %rax
	imulq	%r10
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %r9
.L75:
	movq	%r9, %rcx
.L77:
	imulq	%r9, %rcx
.L109:
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r9
	sarq	$29, %r9
	subq	%rax, %r9
	imulq	$1000000007, %r9, %rax
	subq	%rax, %rcx
	movq	%rcx, %r9
.L50:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movq	%r9, %rax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L113:
	.cfi_restore_state
	movq	%rbp, %rsi
	movl	$2, %edi
	shrq	$63, %rsi
	addq	%rbp, %rsi
	sarq	%rsi
	call	power2
	movabsq	$-8543223828751151131, %rsi
	movq	%rax, %rdi
	imulq	%rsi
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rcx
	imulq	%rdi, %rcx
	movq	%rcx, %rax
	imulq	%rsi
	jmp	.L107
	.p2align 4,,10
	.p2align 3
.L74:
	leaq	-1(%r8), %rax
	cmpq	$2, %r8
	je	.L77
	testb	$1, %al
	jne	.L78
	movq	%rax, %rsi
	shrq	$63, %rsi
	addq	%rax, %rsi
	sarq	%rsi
	call	power2
	movq	%rax, %rcx
	imulq	%r10
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rcx, %rsi
	subq	%rax, %rsi
	imulq	%rsi, %rsi
	movq	%rsi, %rax
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rsi, %rcx
	subq	%rax, %rcx
	jmp	.L77
	.p2align 4,,10
	.p2align 3
.L67:
	subq	$1, %rsi
	movl	$2, %edi
	call	power2
	movabsq	$-8543223828751151131, %rdx
	leaq	(%rax,%rax), %rcx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
.L63:
	addq	%rdx, %r10
	jmp	.L73
	.p2align 4,,10
	.p2align 3
.L71:
	leaq	-1(%rbp), %rsi
	movl	$2, %edi
	call	power2
	movabsq	$-8543223828751151131, %rdx
	leaq	(%rax,%rax), %rcx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	jmp	.L70
	.p2align 4,,10
	.p2align 3
.L110:
	movl	$2, %r11d
	cmpq	$1, %r10
	je	.L52
	testb	$1, %r10b
	jne	.L53
	movq	%r10, %rsi
	movl	$2, %edi
	shrq	$63, %rsi
	addq	%r10, %rsi
	sarq	%rsi
	call	power2
	movabsq	$-8543223828751151131, %rsi
	movq	%rax, %rdi
	imulq	%rsi
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rcx
	imulq	%rdi, %rcx
	movq	%rcx, %rax
	imulq	%rsi
.L106:
	leaq	(%rdx,%rcx), %r11
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$29, %r11
	subq	%rax, %r11
	imulq	$1000000007, %r11, %rax
	subq	%rax, %rcx
	movq	%rcx, %r11
.L52:
	movslq	%r9d, %rax
	cmpl	$1, %r9d
	je	.L82
	testb	$1, %r9b
	jne	.L55
	movq	%rax, %rsi
	movl	$2, %edi
	shrq	$63, %rsi
	addq	%rax, %rsi
	sarq	%rsi
	call	power2
	movabsq	$-8543223828751151131, %rsi
	movq	%rax, %rdi
	imulq	%rsi
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rcx
	imulq	%rdi, %rcx
	movq	%rcx, %rax
	imulq	%rsi
	leaq	(%rdx,%rcx), %rax
	movq	%rcx, %rdx
	sarq	$29, %rax
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	addq	%rcx, %r11
	testl	%r9d, %r9d
	jne	.L61
	jmp	.L116
	.p2align 4,,10
	.p2align 3
.L85:
	movl	%edx, %r9d
.L61:
	movl	%r8d, %eax
	movl	%r9d, %r8d
	cltd
	idivl	%r9d
	testl	%edx, %edx
	jne	.L85
	movslq	%r9d, %r10
.L56:
	movl	$2, %eax
	cmpq	$1, %r10
	je	.L58
	andl	$1, %r9d
	jne	.L59
	movq	%r10, %rsi
	movl	$2, %edi
	shrq	$63, %rsi
	addq	%r10, %rsi
	sarq	%rsi
	call	power2
	movabsq	$-8543223828751151131, %rcx
	movq	%rax, %rdi
	imulq	%rcx
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	subq	%rax, %rdi
	movq	%rdi, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%rcx
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rsi, %rax
	subq	%rdx, %rax
.L58:
	leaq	-3(%r11,%rax), %rcx
	jmp	.L109
	.p2align 4,,10
	.p2align 3
.L78:
	leaq	-2(%r8), %rsi
	call	power2
	imulq	%r9, %rax
	movq	%rax, %rsi
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rsi
	movq	%rsi, %rcx
	jmp	.L77
	.p2align 4,,10
	.p2align 3
.L115:
	testq	%r8, %r8
	leaq	3(%r8), %rsi
	cmovns	%r8, %rsi
	sarq	$2, %rsi
	call	power2
	movq	%rax, %rsi
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rsi, %rcx
	subq	%rax, %rcx
	imulq	%rcx, %rcx
	jmp	.L108
	.p2align 4,,10
	.p2align 3
.L114:
	movl	%ebx, %r11d
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L111:
	movslq	%r9d, %r8
	movl	$1, %r11d
	movl	$1, %ebx
	movl	$2, %edx
	imulq	%r10, %r8
	movl	$2, %r10d
	jmp	.L63
	.p2align 4,,10
	.p2align 3
.L55:
	leaq	-1(%rax), %rsi
	movl	$2, %edi
	call	power2
	movabsq	$-8543223828751151131, %rdx
	leaq	(%rax,%rax), %rcx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
.L54:
	addq	%rax, %r11
	jmp	.L61
	.p2align 4,,10
	.p2align 3
.L59:
	leaq	-1(%r10), %rsi
	movl	$2, %edi
	call	power2
	movabsq	$-8543223828751151131, %rdx
	leaq	(%rax,%rax), %rcx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L53:
	leaq	-1(%r10), %rsi
	movl	$2, %edi
	call	power2
	movabsq	$-8543223828751151131, %rdx
	leaq	(%rax,%rax), %rcx
	movq	%rcx, %rax
	imulq	%rdx
	jmp	.L106
	.p2align 4,,10
	.p2align 3
.L88:
	movl	$1, %r11d
	movl	$2, %edx
	jmp	.L63
.L87:
	movl	$1, %ebx
	movl	$2, %r10d
	jmp	.L65
.L82:
	movl	$2, %eax
	jmp	.L54
.L116:
	movl	%r8d, %r9d
	jmp	.L56
	.cfi_endproc
.LFE41:
	.size	disco, .-disco
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.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	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %edx
	movl	16(%rsp), %esi
	movl	12(%rsp), %edi
	call	disco
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L120
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L120:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE42:
	.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	koyaku
	.type	koyaku, @function
koyaku:
.LFB39:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	movl	%esi, %r8d
	testl	%esi, %esi
	jne	.L2
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%edx, %r8d
.L2:
	cltd
	idivl	%r8d
	movl	%r8d, %eax
	testl	%edx, %edx
	jne	.L11
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	movl	%edi, %r8d
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	koyaku, .-koyaku
	.p2align 4
	.globl	power2
	.type	power2, @function
power2:
.LFB40:
	.cfi_startproc
	endbr64
	cmpq	$1, %rsi
	je	.L45
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rsi, %rcx
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	testb	$1, %sil
	jne	.L15
	shrq	$63, %rsi
	addq	%rcx, %rsi
	sarq	%rsi
	cmpq	$1, %rsi
	je	.L46
	testb	$1, %sil
	je	.L47
	movslq	%edi, %rbx
	leaq	-1(%rsi), %rax
	movq	%rbx, %rdx
	cmpq	$2, %rsi
	je	.L22
	testb	$1, %al
	jne	.L23
	movq	%rax, %rsi
	shrq	$63, %rsi
	addq	%rax, %rsi
	sarq	%rsi
	call	power2
	movabsq	$-8543223828751151131, %rcx
	movq	%rax, %rdi
	imulq	%rcx
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	subq	%rax, %rdi
	movq	%rdi, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%rcx
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	movq	%rsi, %rdx
	subq	%rax, %rdx
.L22:
	movq	%rdx, %rsi
	movabsq	$-8543223828751151131, %rdx
	imulq	%rbx, %rsi
	movq	%rsi, %rax
	imulq	%rdx
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rsi, %rcx
	subq	%rax, %rcx
.L17:
	imulq	%rcx, %rcx
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L15:
	movslq	%edi, %rbx
	leaq	-1(%rsi), %rax
	movq	%rbx, %rdx
	cmpq	$2, %rsi
	je	.L24
	testb	$1, %al
	jne	.L25
	movq	%rax, %rsi
	shrq	$63, %rsi
	addq	%rax, %rsi
	sarq	%rsi
	cmpq	$1, %rsi
	je	.L48
	testb	$1, %sil
	jne	.L28
	testq	%rax, %rax
	leaq	2(%rcx), %rsi
	cmovns	%rax, %rsi
	sarq	$2, %rsi
	call	power2
	movabsq	$-8543223828751151131, %rcx
	movq	%rax, %rdi
	imulq	%rcx
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	subq	%rax, %rdi
	movq	%rdi, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%rcx
.L42:
	leaq	(%rdx,%rsi), %rcx
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rsi
	movq	%rsi, %rcx
.L27:
	imulq	%rcx, %rcx
	jmp	.L43
	.p2align 4,,10
	.p2align 3
.L25:
	leaq	-2(%rsi), %rax
	cmpq	$3, %rsi
	je	.L29
	testb	$1, %al
	jne	.L30
	movq	%rax, %rsi
	shrq	$63, %rsi
	addq	%rax, %rsi
	sarq	%rsi
	call	power2
	movabsq	$-8543223828751151131, %rcx
	movq	%rax, %rdi
	imulq	%rcx
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	subq	%rax, %rdi
	movq	%rdi, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%rcx
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	movq	%rsi, %rdx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdx
.L29:
	imulq	%rbx, %rdx
	movq	%rdx, %rcx
.L43:
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
.L24:
	movq	%rdx, %rcx
	imulq	%rbx, %rcx
.L44:
	movq	%rcx, %rax
	addq	$16, %rsp
	.cfi_def_cfa_offset 16
	movabsq	$-8543223828751151131, %rdx
	imulq	%rdx
	popq	%rbx
	.cfi_def_cfa_offset 8
	leaq	(%rdx,%rcx), %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L45:
	.cfi_restore 3
	movslq	%edi, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L47:
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -16
	testq	%rcx, %rcx
	leaq	3(%rcx), %rsi
	cmovns	%rcx, %rsi
	sarq	$2, %rsi
	cmpq	$1, %rsi
	je	.L49
	testb	$1, %sil
	jne	.L21
	testq	%rcx, %rcx
	leaq	7(%rcx), %rsi
	cmovns	%rcx, %rsi
	sarq	$3, %rsi
	call	power2
	movabsq	$-8543223828751151131, %rcx
	movq	%rax, %rsi
	imulq	%rcx
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rdi
	sarq	$29, %rdi
	subq	%rax, %rdi
	imulq	$1000000007, %rdi, %rax
	movq	%rsi, %rdi
	subq	%rax, %rdi
	imulq	%rdi, %rdi
	movq	%rdi, %rax
	imulq	%rcx
.L41:
	leaq	(%rdx,%rdi), %rsi
	movq	%rdi, %rax
	movabsq	$-8543223828751151131, %rdx
	sarq	$63, %rax
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	subq	%rax, %rdi
	movq	%rdi, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%rdx
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rsi
	movq	%rsi, %rcx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L46:
	movabsq	$-8543223828751151131, %rdx
	movslq	%edi, %rdi
	movq	%rdi, %rax
	imulq	%rdx
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rcx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L30:
	leaq	-3(%rsi), %rsi
	call	power2
	movabsq	$-8543223828751151131, %rdx
	imulq	%rbx, %rax
	movq	%rax, %rcx
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L21:
	subq	$1, %rsi
	movl	%edi, 12(%rsp)
	call	power2
	movslq	12(%rsp), %rdi
	imulq	%rax, %rdi
.L40:
	movabsq	$-8543223828751151131, %rdx
	movq	%rdi, %rax
	imulq	%rdx
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L23:
	subq	$2, %rsi
	call	power2
	movabsq	$-8543223828751151131, %rdx
	imulq	%rbx, %rax
	movq	%rax, %rcx
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	movq	%rcx, %rdx
	subq	%rax, %rdx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L28:
	subq	$1, %rsi
	call	power2
	movabsq	$-8543223828751151131, %rdx
	imulq	%rbx, %rax
	movq	%rax, %rsi
	imulq	%rdx
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L49:
	movslq	%edi, %rdi
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L48:
	movabsq	$-8543223828751151131, %rdx
	movq	%rbx, %rax
	imulq	%rdx
	movq	%rbx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rbx), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rbx, %rcx
	subq	%rax, %rcx
	jmp	.L27
	.cfi_endproc
.LFE40:
	.size	power2, .-power2
	.p2align 4
	.globl	disco
	.type	disco, @function
disco:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movslq	%edi, %r10
	movslq	%esi, %r9
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%r10, %r8
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	cmpl	$1, %edx
	je	.L110
	movl	%edx, %ecx
	movl	%edx, %esi
	testl	%edx, %edx
	jne	.L62
	jmp	.L111
	.p2align 4,,10
	.p2align 3
.L112:
	movl	%edx, %esi
.L62:
	movl	%r8d, %eax
	movl	%esi, %r8d
	cltd
	idivl	%esi
	testl	%edx, %edx
	jne	.L112
	movslq	%esi, %r8
	movl	%r9d, %esi
	.p2align 4,,10
	.p2align 3
.L80:
	movl	%esi, %eax
	movl	%ecx, %edi
	cltd
	movslq	%edi, %rsi
	idivl	%ecx
	movl	%edx, %ecx
	testl	%edx, %edx
	jne	.L80
	movq	%r10, %rax
	cqto
	idivq	%r8
	imulq	%rsi, %r8
	movq	%rax, %r10
	movl	%eax, %ebx
	movslq	%eax, %rbp
	movq	%r9, %rax
	cqto
	idivq	%rsi
	movq	%rax, %r9
	movl	%eax, %r11d
	cmpl	$1, %r10d
	je	.L87
	andl	$1, %r10d
	je	.L113
	leaq	-1(%rbp), %rsi
	movl	$2, %edi
	call	power2
	movabsq	$-8543223828751151131, %rdx
	leaq	(%rax,%rax), %rcx
	movq	%rcx, %rax
	imulq	%rdx
.L107:
	leaq	(%rdx,%rcx), %r10
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$29, %r10
	subq	%rax, %r10
	imulq	$1000000007, %r10, %rax
	subq	%rax, %rcx
	movq	%rcx, %r10
.L65:
	movslq	%r9d, %rsi
	cmpl	$1, %r9d
	je	.L88
	testb	$1, %r9b
	jne	.L67
	movq	%rsi, %rax
	movl	$2, %edi
	shrq	$63, %rax
	addq	%rax, %rsi
	sarq	%rsi
	call	power2
	movabsq	$-8543223828751151131, %rsi
	movq	%rax, %rdi
	imulq	%rsi
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rcx
	imulq	%rdi, %rcx
	movq	%rcx, %rax
	imulq	%rsi
	leaq	(%rdx,%rcx), %rax
	movq	%rcx, %rdx
	sarq	$29, %rax
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	addq	%rcx, %r10
	testl	%r9d, %r9d
	jne	.L73
	jmp	.L114
	.p2align 4,,10
	.p2align 3
.L91:
	movl	%edx, %r11d
.L73:
	movl	%ebx, %eax
	movl	%r11d, %ebx
	cltd
	idivl	%r11d
	testl	%edx, %edx
	jne	.L91
	movslq	%r11d, %rbp
.L68:
	movl	$2, %edx
	cmpq	$1, %rbp
	je	.L70
	andl	$1, %r11d
	jne	.L71
	movq	%rbp, %rsi
	movl	$2, %edi
	shrq	$63, %rsi
	addq	%rbp, %rsi
	sarq	%rsi
	call	power2
	movabsq	$-8543223828751151131, %rcx
	movq	%rax, %rdi
	imulq	%rcx
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	subq	%rax, %rdi
	movq	%rdi, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%rcx
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rsi
	movq	%rsi, %rdx
.L70:
	leaq	-3(%r10,%rdx), %rcx
	movabsq	$-8543223828751151131, %r10
	movq	%rcx, %rax
	imulq	%r10
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r9
	sarq	$29, %r9
	subq	%rax, %r9
	imulq	$1000000007, %r9, %rax
	subq	%rax, %rcx
	movq	%rcx, %r9
	movl	%ecx, %edi
	cmpq	$1, %r8
	je	.L50
	testb	$1, %r8b
	jne	.L74
	movq	%r8, %rsi
	shrq	$63, %rsi
	addq	%r8, %rsi
	sarq	%rsi
	cmpq	$1, %rsi
	je	.L75
	testb	$1, %sil
	je	.L115
	subq	$1, %rsi
	call	power2
	movq	%r9, %rcx
	imulq	%rax, %rcx
.L108:
	movq	%rcx, %rax
	imulq	%r10
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %r9
.L75:
	movq	%r9, %rcx
.L77:
	imulq	%r9, %rcx
.L109:
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %r9
	sarq	$29, %r9
	subq	%rax, %r9
	imulq	$1000000007, %r9, %rax
	subq	%rax, %rcx
	movq	%rcx, %r9
.L50:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movq	%r9, %rax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L113:
	.cfi_restore_state
	movq	%rbp, %rsi
	movl	$2, %edi
	shrq	$63, %rsi
	addq	%rbp, %rsi
	sarq	%rsi
	call	power2
	movabsq	$-8543223828751151131, %rsi
	movq	%rax, %rdi
	imulq	%rsi
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rcx
	imulq	%rdi, %rcx
	movq	%rcx, %rax
	imulq	%rsi
	jmp	.L107
	.p2align 4,,10
	.p2align 3
.L74:
	leaq	-1(%r8), %rax
	cmpq	$2, %r8
	je	.L77
	testb	$1, %al
	jne	.L78
	movq	%rax, %rsi
	shrq	$63, %rsi
	addq	%rax, %rsi
	sarq	%rsi
	call	power2
	movq	%rax, %rcx
	imulq	%r10
	movq	%rcx, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rcx), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rcx, %rsi
	subq	%rax, %rsi
	imulq	%rsi, %rsi
	movq	%rsi, %rax
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rsi, %rcx
	subq	%rax, %rcx
	jmp	.L77
	.p2align 4,,10
	.p2align 3
.L67:
	subq	$1, %rsi
	movl	$2, %edi
	call	power2
	movabsq	$-8543223828751151131, %rdx
	leaq	(%rax,%rax), %rcx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
.L63:
	addq	%rdx, %r10
	jmp	.L73
	.p2align 4,,10
	.p2align 3
.L71:
	leaq	-1(%rbp), %rsi
	movl	$2, %edi
	call	power2
	movabsq	$-8543223828751151131, %rdx
	leaq	(%rax,%rax), %rcx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	jmp	.L70
	.p2align 4,,10
	.p2align 3
.L110:
	movl	$2, %r11d
	cmpq	$1, %r10
	je	.L52
	testb	$1, %r10b
	jne	.L53
	movq	%r10, %rsi
	movl	$2, %edi
	shrq	$63, %rsi
	addq	%r10, %rsi
	sarq	%rsi
	call	power2
	movabsq	$-8543223828751151131, %rsi
	movq	%rax, %rdi
	imulq	%rsi
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rcx
	imulq	%rdi, %rcx
	movq	%rcx, %rax
	imulq	%rsi
.L106:
	leaq	(%rdx,%rcx), %r11
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$29, %r11
	subq	%rax, %r11
	imulq	$1000000007, %r11, %rax
	subq	%rax, %rcx
	movq	%rcx, %r11
.L52:
	movslq	%r9d, %rax
	cmpl	$1, %r9d
	je	.L82
	testb	$1, %r9b
	jne	.L55
	movq	%rax, %rsi
	movl	$2, %edi
	shrq	$63, %rsi
	addq	%rax, %rsi
	sarq	%rsi
	call	power2
	movabsq	$-8543223828751151131, %rsi
	movq	%rax, %rdi
	imulq	%rsi
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rdi
	movq	%rdi, %rcx
	imulq	%rdi, %rcx
	movq	%rcx, %rax
	imulq	%rsi
	leaq	(%rdx,%rcx), %rax
	movq	%rcx, %rdx
	sarq	$29, %rax
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rax
	subq	%rax, %rcx
	addq	%rcx, %r11
	testl	%r9d, %r9d
	jne	.L61
	jmp	.L116
	.p2align 4,,10
	.p2align 3
.L85:
	movl	%edx, %r9d
.L61:
	movl	%r8d, %eax
	movl	%r9d, %r8d
	cltd
	idivl	%r9d
	testl	%edx, %edx
	jne	.L85
	movslq	%r9d, %r10
.L56:
	movl	$2, %eax
	cmpq	$1, %r10
	je	.L58
	andl	$1, %r9d
	jne	.L59
	movq	%r10, %rsi
	movl	$2, %edi
	shrq	$63, %rsi
	addq	%r10, %rsi
	sarq	%rsi
	call	power2
	movabsq	$-8543223828751151131, %rcx
	movq	%rax, %rdi
	imulq	%rcx
	movq	%rdi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rdi), %rsi
	sarq	$29, %rsi
	subq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	subq	%rax, %rdi
	movq	%rdi, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%rcx
	leaq	(%rdx,%rsi), %rax
	movq	%rsi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rsi, %rax
	subq	%rdx, %rax
.L58:
	leaq	-3(%r11,%rax), %rcx
	jmp	.L109
	.p2align 4,,10
	.p2align 3
.L78:
	leaq	-2(%r8), %rsi
	call	power2
	imulq	%r9, %rax
	movq	%rax, %rsi
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	subq	%rax, %rsi
	movq	%rsi, %rcx
	jmp	.L77
	.p2align 4,,10
	.p2align 3
.L115:
	testq	%r8, %r8
	leaq	3(%r8), %rsi
	cmovns	%r8, %rsi
	sarq	$2, %rsi
	call	power2
	movq	%rax, %rsi
	imulq	%r10
	movq	%rsi, %rax
	sarq	$63, %rax
	leaq	(%rdx,%rsi), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%rsi, %rcx
	subq	%rax, %rcx
	imulq	%rcx, %rcx
	jmp	.L108
	.p2align 4,,10
	.p2align 3
.L114:
	movl	%ebx, %r11d
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L111:
	movslq	%r9d, %r8
	movl	$1, %r11d
	movl	$1, %ebx
	movl	$2, %edx
	imulq	%r10, %r8
	movl	$2, %r10d
	jmp	.L63
	.p2align 4,,10
	.p2align 3
.L55:
	leaq	-1(%rax), %rsi
	movl	$2, %edi
	call	power2
	movabsq	$-8543223828751151131, %rdx
	leaq	(%rax,%rax), %rcx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
.L54:
	addq	%rax, %r11
	jmp	.L61
	.p2align 4,,10
	.p2align 3
.L59:
	leaq	-1(%r10), %rsi
	movl	$2, %edi
	call	power2
	movabsq	$-8543223828751151131, %rdx
	leaq	(%rax,%rax), %rcx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L53:
	leaq	-1(%r10), %rsi
	movl	$2, %edi
	call	power2
	movabsq	$-8543223828751151131, %rdx
	leaq	(%rax,%rax), %rcx
	movq	%rcx, %rax
	imulq	%rdx
	jmp	.L106
	.p2align 4,,10
	.p2align 3
.L88:
	movl	$1, %r11d
	movl	$2, %edx
	jmp	.L63
.L87:
	movl	$1, %ebx
	movl	$2, %r10d
	jmp	.L65
.L82:
	movl	$2, %eax
	jmp	.L54
.L116:
	movl	%r8d, %r9d
	jmp	.L56
	.cfi_endproc
.LFE41:
	.size	disco, .-disco
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.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	20(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %edx
	movl	16(%rsp), %esi
	movl	12(%rsp), %edi
	call	disco
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L120
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L120:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE42:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define NUM 1000000007

/*
int koyaku(int a,int b){
  if(a>b){
    if(a%b==0) return b;
    return koyaku(b,a-b);}
  else{
    if(b%a==0) return a;
    return koyaku(a,b-a);}
    }
*/

int koyaku(int a,int b){
  if(b==0) return a;
  return koyaku(b,a%b);
}

/*
long int power(int a){ //2**a%NUM
  if(a<30) return (long int)pow(2,a);
  long int tmp=(long int)pow(2,30)%NUM;
  return ((int)pow(tmp,a/30)%NUM)*(int)pow(2,a%30);}
*/

long int power2(int a,long int b){
  if(b==1) return (long int)a;
  if(b%2==0){
    long int tmp=power2(a,b/2)%NUM;
    return (tmp*tmp)%NUM;}
  else{
    return (power2(a,b-1)*a)%NUM;}
}
  

long int disco(int h,int w,int t){
  if(t==1){
    long int sum=0;
    sum+=power2(2,h);
    //printf("%ld\n",sum);
    sum+=power2(2,w);
    //printf("%d\n",NUM);
    sum+=power2(2,koyaku(h,w));
    //printf("%ld\n",sum);
    return (sum-3)%NUM;}

  else{
    long int koyaht=koyaku(h,t);
    long int koyawt=koyaku(w,t);
    return (long int)power2(disco(h/koyaht,w/koyawt,1),koyaht*koyawt)%NUM;}
}

int main(){
  int h,w,t;
  scanf("%d%d%d",&h,&w,&t);
  long int sum=disco(h,w,t);
  printf("%ld\n",sum);
  return 0;
}

869 80 1001
 328 80 1001
 328 102 1011
 328 102 1111
 279 102 1111
 25 102 1111
 25 122 1111
 25 63 1111
 25 89 1111
 1486 120 1001

540377089
 238803603
 261361566
 647647330
 58769
 939039550
 991048692
 324726435
 313816333
 960152848

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>
#include<math.h>
#define NUM 1000000007

/*
int koyaku(int a,int b){
  if(a>b){
    if(a%b==0) return b;
    return koyaku(b,a-b);}
  else{
    if(b%a==0) return a;
    return koyaku(a,b-a);}
    }
*/

int koyaku(int a,int b){
  if(b==0) return a;
  return koyaku(b,a%b);
}

/*
long int power(int a){ //2**a%NUM
  if(a<30) return (long int)pow(2,a);
  long int tmp=(long int)pow(2,30)%NUM;
  return ((int)pow(tmp,a/30)%NUM)*(int)pow(2,a%30);}
*/

long int power2(int a,long int b){
  if(b==1) return (long int)a;
  if(b%2==0){
    long int tmp=power2(a,b/2)%NUM;
    return (tmp*tmp)%NUM;}
  else{
    return (power2(a,b-1)*a)%NUM;}
}
  

long int disco(int h,int w,int t){
  if(t==1){
    long int sum=0;
    sum+=power2(2,h);
    //printf("%ld\n",sum);
    sum+=power2(2,w);
    //printf("%d\n",NUM);
    sum+=power2(2,koyaku(h,w));
    //printf("%ld\n",sum);
    return (sum-3)%NUM;}

  else{
    long int koyaht=koyaku(h,t);
    long int koyawt=koyaku(w,t);
    return (long int)power2(disco(h/koyaht,w/koyawt,1),koyaht*koyawt)%NUM;}
}

int main(){
  int h,w,t;
  scanf("%d%d%d",&h,&w,&t);
  long int sum=disco(h,w,t);
  printf("%ld\n",sum);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	koyaku
	.type	koyaku, @function
koyaku:
.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
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	cmpl	$0, -8(%rbp)
	jne	.L2
	movl	-4(%rbp), %eax
	jmp	.L3
.L2:
	movl	-4(%rbp), %eax
	cltd
	idivl	-8(%rbp)
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	koyaku
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	koyaku, .-koyaku
	.globl	power2
	.type	power2, @function
power2:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movq	%rsi, -32(%rbp)
	cmpq	$1, -32(%rbp)
	jne	.L5
	movl	-20(%rbp), %eax
	cltq
	jmp	.L6
.L5:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	jne	.L7
	movq	-32(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movl	-20(%rbp), %eax
	movq	%rdx, %rsi
	movl	%eax, %edi
	call	power2
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	%rax, %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	jmp	.L6
.L7:
	movq	-32(%rbp), %rax
	leaq	-1(%rax), %rdx
	movl	-20(%rbp), %eax
	movq	%rdx, %rsi
	movl	%eax, %edi
	call	power2
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rdx, %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	power2, .-power2
	.globl	disco
	.type	disco, @function
disco:
.LFB8:
	.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	$56, %rsp
	.cfi_offset 3, -24
	movl	%edi, -52(%rbp)
	movl	%esi, -56(%rbp)
	movl	%edx, -60(%rbp)
	cmpl	$1, -60(%rbp)
	jne	.L9
	movq	$0, -24(%rbp)
	movl	-52(%rbp), %eax
	cltq
	movq	%rax, %rsi
	movl	$2, %edi
	call	power2
	addq	%rax, -24(%rbp)
	movl	-56(%rbp), %eax
	cltq
	movq	%rax, %rsi
	movl	$2, %edi
	call	power2
	addq	%rax, -24(%rbp)
	movl	-56(%rbp), %edx
	movl	-52(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	koyaku
	cltq
	movq	%rax, %rsi
	movl	$2, %edi
	call	power2
	addq	%rax, -24(%rbp)
	movq	-24(%rbp), %rax
	leaq	-3(%rax), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	jmp	.L10
.L9:
	movl	-60(%rbp), %edx
	movl	-52(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	koyaku
	cltq
	movq	%rax, -40(%rbp)
	movl	-60(%rbp), %edx
	movl	-56(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	koyaku
	cltq
	movq	%rax, -32(%rbp)
	movq	-40(%rbp), %rax
	imulq	-32(%rbp), %rax
	movq	%rax, %rbx
	movl	-56(%rbp), %eax
	cltq
	cqto
	idivq	-32(%rbp)
	movl	%eax, %ecx
	movl	-52(%rbp), %eax
	cltq
	cqto
	idivq	-40(%rbp)
	movl	$1, %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	disco
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	power2
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
.L10:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	disco, .-disco
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-20(%rbp), %rcx
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	disco
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	koyaku
	.type	koyaku, @function
koyaku:
.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
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	cmpl	$0, -8(%rbp)
	jne	.L2
	movl	-4(%rbp), %eax
	jmp	.L3
.L2:
	movl	-4(%rbp), %eax
	cltd
	idivl	-8(%rbp)
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	koyaku
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	koyaku, .-koyaku
	.globl	power2
	.type	power2, @function
power2:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movq	%rsi, -32(%rbp)
	cmpq	$1, -32(%rbp)
	jne	.L5
	movl	-20(%rbp), %eax
	cltq
	jmp	.L6
.L5:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	jne	.L7
	movq	-32(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movl	-20(%rbp), %eax
	movq	%rdx, %rsi
	movl	%eax, %edi
	call	power2
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	imulq	%rax, %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	jmp	.L6
.L7:
	movq	-32(%rbp), %rax
	leaq	-1(%rax), %rdx
	movl	-20(%rbp), %eax
	movq	%rdx, %rsi
	movl	%eax, %edi
	call	power2
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rdx, %rax
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	power2, .-power2
	.globl	disco
	.type	disco, @function
disco:
.LFB8:
	.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	$56, %rsp
	.cfi_offset 3, -24
	movl	%edi, -52(%rbp)
	movl	%esi, -56(%rbp)
	movl	%edx, -60(%rbp)
	cmpl	$1, -60(%rbp)
	jne	.L9
	movq	$0, -24(%rbp)
	movl	-52(%rbp), %eax
	cltq
	movq	%rax, %rsi
	movl	$2, %edi
	call	power2
	addq	%rax, -24(%rbp)
	movl	-56(%rbp), %eax
	cltq
	movq	%rax, %rsi
	movl	$2, %edi
	call	power2
	addq	%rax, -24(%rbp)
	movl	-56(%rbp), %edx
	movl	-52(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	koyaku
	cltq
	movq	%rax, %rsi
	movl	$2, %edi
	call	power2
	addq	%rax, -24(%rbp)
	movq	-24(%rbp), %rax
	leaq	-3(%rax), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	jmp	.L10
.L9:
	movl	-60(%rbp), %edx
	movl	-52(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	koyaku
	cltq
	movq	%rax, -40(%rbp)
	movl	-60(%rbp), %edx
	movl	-56(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	koyaku
	cltq
	movq	%rax, -32(%rbp)
	movq	-40(%rbp), %rax
	imulq	-32(%rbp), %rax
	movq	%rax, %rbx
	movl	-56(%rbp), %eax
	cltq
	cqto
	idivq	-32(%rbp)
	movl	%eax, %ecx
	movl	-52(%rbp), %eax
	cltq
	cqto
	idivq	-40(%rbp)
	movl	$1, %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	disco
	movq	%rbx, %rsi
	movl	%eax, %edi
	call	power2
	movq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
.L10:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	disco, .-disco
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-20(%rbp), %rcx
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %ecx
	movl	-28(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	disco
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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:
