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 <string.h>
#include <stdlib.h>
#include <math.h>
#define MAX(X, Y) (((X) > (Y))? (X) : (Y))
#define MIN(X, Y) (((X) < (Y))? (X) : (Y))
int compare_int(const void *a, const void *b){
  return *(long int*)b - *(long int*)a; // 大きい順
}
// 公約数
long int gcd(long int a, long int b){
  if(b == 0){
    return a;
  }else{
    return gcd(b, a % b);
  }
}
// 最小公倍数 = a * b / 最大公約数
// 公倍数
long int lcm(long int a, long int b){
  return a * b / gcd(a, b);
}



// min
int main(void){
  long long int n, m;
  long long int num;
  long long int ans = 1;

  scanf("%lld%lld", &n, &m);

  if(n - m > 1 || m - n > 1){
    printf("0\n");
    return 0;
  }else if(n == m){
    for(long int i = n; i > 0; i--){
      ans *= i;
      while(ans > 1000000007){
	ans -= 1000000007;
      }
    }
    for(long int i = m; i > 0; i--){
      ans *= i;
      while(ans > 1000000007){
	ans -= 1000000007;
      }
    }
    ans = ans * 2;
      while(ans > 1000000007){
	ans -= 1000000007;
      }
  }else{
    for(long int i = n; i > 0; i--){
      ans *= i;
      while(ans > 1000000007){
	ans -= 1000000007;
      }
    }
    for(long int i = m; i > 0; i--){
      ans *= i;
      while(ans > 1000000007){
	ans -= 1000000007;
      }
    }    
  }
  
  
  printf("%lld\n", ans);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	compare_int
	.type	compare_int, @function
compare_int:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %edx
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare_int, .-compare_int
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	cmpq	$0, -16(%rbp)
	jne	.L4
	movq	-8(%rbp), %rax
	jmp	.L5
.L4:
	movq	-8(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	gcd, .-gcd
	.globl	lcm
	.type	lcm, @function
lcm:
.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	$24, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	imulq	-32(%rbp), %rax
	movq	%rax, %rbx
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
	movq	%rax, %rcx
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	lcm, .-lcm
	.section	.rodata
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"0"
.LC2:
	.string	"%lld\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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$1, -48(%rbp)
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	movq	-56(%rbp), %rdx
	subq	%rdx, %rax
	cmpq	$1, %rax
	jg	.L9
	movq	-56(%rbp), %rax
	movq	-64(%rbp), %rdx
	subq	%rdx, %rax
	cmpq	$1, %rax
	jle	.L10
.L9:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L32
.L10:
	movq	-64(%rbp), %rdx
	movq	-56(%rbp), %rax
	cmpq	%rax, %rdx
	jne	.L12
	movq	-64(%rbp), %rax
	movq	%rax, -40(%rbp)
	jmp	.L13
.L16:
	movq	-48(%rbp), %rax
	imulq	-40(%rbp), %rax
	movq	%rax, -48(%rbp)
	jmp	.L14
.L15:
	subq	$1000000007, -48(%rbp)
.L14:
	cmpq	$1000000007, -48(%rbp)
	jg	.L15
	subq	$1, -40(%rbp)
.L13:
	cmpq	$0, -40(%rbp)
	jg	.L16
	movq	-56(%rbp), %rax
	movq	%rax, -32(%rbp)
	jmp	.L17
.L20:
	movq	-48(%rbp), %rax
	imulq	-32(%rbp), %rax
	movq	%rax, -48(%rbp)
	jmp	.L18
.L19:
	subq	$1000000007, -48(%rbp)
.L18:
	cmpq	$1000000007, -48(%rbp)
	jg	.L19
	subq	$1, -32(%rbp)
.L17:
	cmpq	$0, -32(%rbp)
	jg	.L20
	salq	-48(%rbp)
	jmp	.L21
.L22:
	subq	$1000000007, -48(%rbp)
.L21:
	cmpq	$1000000007, -48(%rbp)
	jg	.L22
	jmp	.L23
.L12:
	movq	-64(%rbp), %rax
	movq	%rax, -24(%rbp)
	jmp	.L24
.L27:
	movq	-48(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, -48(%rbp)
	jmp	.L25
.L26:
	subq	$1000000007, -48(%rbp)
.L25:
	cmpq	$1000000007, -48(%rbp)
	jg	.L26
	subq	$1, -24(%rbp)
.L24:
	cmpq	$0, -24(%rbp)
	jg	.L27
	movq	-56(%rbp), %rax
	movq	%rax, -16(%rbp)
	jmp	.L28
.L31:
	movq	-48(%rbp), %rax
	imulq	-16(%rbp), %rax
	movq	%rax, -48(%rbp)
	jmp	.L29
.L30:
	subq	$1000000007, -48(%rbp)
.L29:
	cmpq	$1000000007, -48(%rbp)
	jg	.L30
	subq	$1, -16(%rbp)
.L28:
	cmpq	$0, -16(%rbp)
	jg	.L31
.L23:
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L32:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	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	compare_int
	.type	compare_int, @function
compare_int:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	compare_int, .-compare_int
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB52:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rsi, %r8
	testq	%rsi, %rsi
	jne	.L4
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rdx, %r8
.L4:
	cqto
	idivq	%r8
	movq	%r8, %rax
	testq	%rdx, %rdx
	jne	.L12
	movq	%r8, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rdi, %r8
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE52:
	.size	gcd, .-gcd
	.p2align 4
	.globl	lcm
	.type	lcm, @function
lcm:
.LFB53:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	movq	%rdi, %rax
	imulq	%rsi, %rcx
	testq	%rsi, %rsi
	jne	.L14
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rdx, %rsi
.L14:
	cqto
	idivq	%rsi
	movq	%rsi, %rax
	testq	%rdx, %rdx
	jne	.L16
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE53:
	.size	lcm, .-lcm
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"0"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB54:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rcx
	movq	16(%rsp), %rax
	movq	%rcx, %rdx
	subq	%rax, %rdx
	cmpq	$1, %rdx
	jg	.L20
	movq	%rax, %rdx
	subq	%rcx, %rdx
	cmpq	$1, %rdx
	jg	.L20
	cmpq	%rax, %rcx
	je	.L23
	movl	$1, %edx
	testq	%rcx, %rcx
	jle	.L25
	.p2align 4,,10
	.p2align 3
.L24:
	imulq	%rcx, %rdx
	cmpq	$1000000007, %rdx
	jle	.L33
	.p2align 4,,10
	.p2align 3
.L34:
	subq	$1000000007, %rdx
	cmpq	$1000000007, %rdx
	jg	.L34
.L33:
	subq	$1, %rcx
	jne	.L24
.L25:
	testq	%rax, %rax
	jle	.L26
	.p2align 4,,10
	.p2align 3
.L37:
	imulq	%rax, %rdx
	cmpq	$1000000007, %rdx
	jle	.L35
	.p2align 4,,10
	.p2align 3
.L36:
	subq	$1000000007, %rdx
	cmpq	$1000000007, %rdx
	jg	.L36
.L35:
	subq	$1, %rax
	jne	.L37
.L26:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L22
.L20:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L22:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L51
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	testq	%rax, %rax
	jle	.L40
	movq	%rax, %rcx
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L29:
	imulq	%rcx, %rdx
	cmpq	$1000000007, %rdx
	jle	.L27
	.p2align 4,,10
	.p2align 3
.L28:
	subq	$1000000007, %rdx
	cmpq	$1000000007, %rdx
	jg	.L28
.L27:
	subq	$1, %rcx
	jne	.L29
	.p2align 4,,10
	.p2align 3
.L32:
	imulq	%rax, %rdx
	cmpq	$1000000007, %rdx
	jle	.L30
	.p2align 4,,10
	.p2align 3
.L31:
	subq	$1000000007, %rdx
	cmpq	$1000000007, %rdx
	jg	.L31
.L30:
	subq	$1, %rax
	jne	.L32
	addq	%rdx, %rdx
	cmpq	$1000000007, %rdx
	jle	.L26
	subq	$1000000007, %rdx
	jmp	.L26
.L40:
	movl	$2, %edx
	jmp	.L26
.L51:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE54:
	.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	compare_int
	.type	compare_int, @function
compare_int:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	compare_int, .-compare_int
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB52:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rsi, %r8
	testq	%rsi, %rsi
	jne	.L4
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rdx, %r8
.L4:
	cqto
	idivq	%r8
	movq	%r8, %rax
	testq	%rdx, %rdx
	jne	.L12
	movq	%r8, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rdi, %r8
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE52:
	.size	gcd, .-gcd
	.p2align 4
	.globl	lcm
	.type	lcm, @function
lcm:
.LFB53:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	movq	%rdi, %rax
	imulq	%rsi, %rcx
	testq	%rsi, %rsi
	jne	.L14
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rdx, %rsi
.L14:
	cqto
	idivq	%rsi
	movq	%rsi, %rax
	testq	%rdx, %rdx
	jne	.L16
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE53:
	.size	lcm, .-lcm
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"0"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB54:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rcx
	movq	16(%rsp), %rax
	movq	%rcx, %rdx
	subq	%rax, %rdx
	cmpq	$1, %rdx
	jg	.L20
	movq	%rax, %rdx
	subq	%rcx, %rdx
	cmpq	$1, %rdx
	jg	.L20
	cmpq	%rax, %rcx
	je	.L23
	movl	$1, %edx
	testq	%rcx, %rcx
	jle	.L25
	.p2align 4,,10
	.p2align 3
.L24:
	imulq	%rcx, %rdx
	cmpq	$1000000007, %rdx
	jle	.L33
	.p2align 4,,10
	.p2align 3
.L34:
	subq	$1000000007, %rdx
	cmpq	$1000000007, %rdx
	jg	.L34
.L33:
	subq	$1, %rcx
	jne	.L24
.L25:
	testq	%rax, %rax
	jle	.L26
	.p2align 4,,10
	.p2align 3
.L37:
	imulq	%rax, %rdx
	cmpq	$1000000007, %rdx
	jle	.L35
	.p2align 4,,10
	.p2align 3
.L36:
	subq	$1000000007, %rdx
	cmpq	$1000000007, %rdx
	jg	.L36
.L35:
	subq	$1, %rax
	jne	.L37
.L26:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L22
.L20:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L22:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L51
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	testq	%rax, %rax
	jle	.L40
	movq	%rax, %rcx
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L29:
	imulq	%rcx, %rdx
	cmpq	$1000000007, %rdx
	jle	.L27
	.p2align 4,,10
	.p2align 3
.L28:
	subq	$1000000007, %rdx
	cmpq	$1000000007, %rdx
	jg	.L28
.L27:
	subq	$1, %rcx
	jne	.L29
	.p2align 4,,10
	.p2align 3
.L32:
	imulq	%rax, %rdx
	cmpq	$1000000007, %rdx
	jle	.L30
	.p2align 4,,10
	.p2align 3
.L31:
	subq	$1000000007, %rdx
	cmpq	$1000000007, %rdx
	jg	.L31
.L30:
	subq	$1, %rax
	jne	.L32
	addq	%rdx, %rdx
	cmpq	$1000000007, %rdx
	jle	.L26
	subq	$1000000007, %rdx
	jmp	.L26
.L40:
	movl	$2, %edx
	jmp	.L26
.L51:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE54:
	.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 <string.h>
#include <stdlib.h>
#include <math.h>
#define MAX(X, Y) (((X) > (Y))? (X) : (Y))
#define MIN(X, Y) (((X) < (Y))? (X) : (Y))
int compare_int(const void *a, const void *b){
  return *(long int*)b - *(long int*)a; // 大きい順
}
// 公約数
long int gcd(long int a, long int b){
  if(b == 0){
    return a;
  }else{
    return gcd(b, a % b);
  }
}
// 最小公倍数 = a * b / 最大公約数
// 公倍数
long int lcm(long int a, long int b){
  return a * b / gcd(a, b);
}



// min
int main(void){
  long long int n, m;
  long long int num;
  long long int ans = 1;

  scanf("%lld%lld", &n, &m);

  if(n - m > 1 || m - n > 1){
    printf("0\n");
    return 0;
  }else if(n == m){
    for(long int i = n; i > 0; i--){
      ans *= i;
      while(ans > 1000000007){
	ans -= 1000000007;
      }
    }
    for(long int i = m; i > 0; i--){
      ans *= i;
      while(ans > 1000000007){
	ans -= 1000000007;
      }
    }
    ans = ans * 2;
      while(ans > 1000000007){
	ans -= 1000000007;
      }
  }else{
    for(long int i = n; i > 0; i--){
      ans *= i;
      while(ans > 1000000007){
	ans -= 1000000007;
      }
    }
    for(long int i = m; i > 0; i--){
      ans *= i;
      while(ans > 1000000007){
	ans -= 1000000007;
      }
    }    
  }
  
  
  printf("%lld\n", ans);
  return 0;
}

2 2

8

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 <string.h>
#include <stdlib.h>
#include <math.h>
#define MAX(X, Y) (((X) > (Y))? (X) : (Y))
#define MIN(X, Y) (((X) < (Y))? (X) : (Y))
int compare_int(const void *a, const void *b){
  return *(long int*)b - *(long int*)a; // 大きい順
}
// 公約数
long int gcd(long int a, long int b){
  if(b == 0){
    return a;
  }else{
    return gcd(b, a % b);
  }
}
// 最小公倍数 = a * b / 最大公約数
// 公倍数
long int lcm(long int a, long int b){
  return a * b / gcd(a, b);
}



// min
int main(void){
  long long int n, m;
  long long int num;
  long long int ans = 1;

  scanf("%lld%lld", &n, &m);

  if(n - m > 1 || m - n > 1){
    printf("0\n");
    return 0;
  }else if(n == m){
    for(long int i = n; i > 0; i--){
      ans *= i;
      while(ans > 1000000007){
	ans -= 1000000007;
      }
    }
    for(long int i = m; i > 0; i--){
      ans *= i;
      while(ans > 1000000007){
	ans -= 1000000007;
      }
    }
    ans = ans * 2;
      while(ans > 1000000007){
	ans -= 1000000007;
      }
  }else{
    for(long int i = n; i > 0; i--){
      ans *= i;
      while(ans > 1000000007){
	ans -= 1000000007;
      }
    }
    for(long int i = m; i > 0; i--){
      ans *= i;
      while(ans > 1000000007){
	ans -= 1000000007;
      }
    }    
  }
  
  
  printf("%lld\n", ans);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	compare_int
	.type	compare_int, @function
compare_int:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %edx
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare_int, .-compare_int
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	cmpq	$0, -16(%rbp)
	jne	.L4
	movq	-8(%rbp), %rax
	jmp	.L5
.L4:
	movq	-8(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	gcd, .-gcd
	.globl	lcm
	.type	lcm, @function
lcm:
.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	$24, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	imulq	-32(%rbp), %rax
	movq	%rax, %rbx
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
	movq	%rax, %rcx
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	lcm, .-lcm
	.section	.rodata
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"0"
.LC2:
	.string	"%lld\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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$1, -48(%rbp)
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	movq	-56(%rbp), %rdx
	subq	%rdx, %rax
	cmpq	$1, %rax
	jg	.L9
	movq	-56(%rbp), %rax
	movq	-64(%rbp), %rdx
	subq	%rdx, %rax
	cmpq	$1, %rax
	jle	.L10
.L9:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L32
.L10:
	movq	-64(%rbp), %rdx
	movq	-56(%rbp), %rax
	cmpq	%rax, %rdx
	jne	.L12
	movq	-64(%rbp), %rax
	movq	%rax, -40(%rbp)
	jmp	.L13
.L16:
	movq	-48(%rbp), %rax
	imulq	-40(%rbp), %rax
	movq	%rax, -48(%rbp)
	jmp	.L14
.L15:
	subq	$1000000007, -48(%rbp)
.L14:
	cmpq	$1000000007, -48(%rbp)
	jg	.L15
	subq	$1, -40(%rbp)
.L13:
	cmpq	$0, -40(%rbp)
	jg	.L16
	movq	-56(%rbp), %rax
	movq	%rax, -32(%rbp)
	jmp	.L17
.L20:
	movq	-48(%rbp), %rax
	imulq	-32(%rbp), %rax
	movq	%rax, -48(%rbp)
	jmp	.L18
.L19:
	subq	$1000000007, -48(%rbp)
.L18:
	cmpq	$1000000007, -48(%rbp)
	jg	.L19
	subq	$1, -32(%rbp)
.L17:
	cmpq	$0, -32(%rbp)
	jg	.L20
	salq	-48(%rbp)
	jmp	.L21
.L22:
	subq	$1000000007, -48(%rbp)
.L21:
	cmpq	$1000000007, -48(%rbp)
	jg	.L22
	jmp	.L23
.L12:
	movq	-64(%rbp), %rax
	movq	%rax, -24(%rbp)
	jmp	.L24
.L27:
	movq	-48(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, -48(%rbp)
	jmp	.L25
.L26:
	subq	$1000000007, -48(%rbp)
.L25:
	cmpq	$1000000007, -48(%rbp)
	jg	.L26
	subq	$1, -24(%rbp)
.L24:
	cmpq	$0, -24(%rbp)
	jg	.L27
	movq	-56(%rbp), %rax
	movq	%rax, -16(%rbp)
	jmp	.L28
.L31:
	movq	-48(%rbp), %rax
	imulq	-16(%rbp), %rax
	movq	%rax, -48(%rbp)
	jmp	.L29
.L30:
	subq	$1000000007, -48(%rbp)
.L29:
	cmpq	$1000000007, -48(%rbp)
	jg	.L30
	subq	$1, -16(%rbp)
.L28:
	cmpq	$0, -16(%rbp)
	jg	.L31
.L23:
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L32:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	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.
val
	.file	"temp.c"
	.text
	.globl	compare_int
	.type	compare_int, @function
compare_int:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %edx
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	compare_int, .-compare_int
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	cmpq	$0, -16(%rbp)
	jne	.L4
	movq	-8(%rbp), %rax
	jmp	.L5
.L4:
	movq	-8(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	gcd, .-gcd
	.globl	lcm
	.type	lcm, @function
lcm:
.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	$24, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	imulq	-32(%rbp), %rax
	movq	%rax, %rbx
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
	movq	%rax, %rcx
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	lcm, .-lcm
	.section	.rodata
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"0"
.LC2:
	.string	"%lld\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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$1, -48(%rbp)
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	movq	-56(%rbp), %rdx
	subq	%rdx, %rax
	cmpq	$1, %rax
	jg	.L9
	movq	-56(%rbp), %rax
	movq	-64(%rbp), %rdx
	subq	%rdx, %rax
	cmpq	$1, %rax
	jle	.L10
.L9:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L32
.L10:
	movq	-64(%rbp), %rdx
	movq	-56(%rbp), %rax
	cmpq	%rax, %rdx
	jne	.L12
	movq	-64(%rbp), %rax
	movq	%rax, -40(%rbp)
	jmp	.L13
.L16:
	movq	-48(%rbp), %rax
	imulq	-40(%rbp), %rax
	movq	%rax, -48(%rbp)
	jmp	.L14
.L15:
	subq	$1000000007, -48(%rbp)
.L14:
	cmpq	$1000000007, -48(%rbp)
	jg	.L15
	subq	$1, -40(%rbp)
.L13:
	cmpq	$0, -40(%rbp)
	jg	.L16
	movq	-56(%rbp), %rax
	movq	%rax, -32(%rbp)
	jmp	.L17
.L20:
	movq	-48(%rbp), %rax
	imulq	-32(%rbp), %rax
	movq	%rax, -48(%rbp)
	jmp	.L18
.L19:
	subq	$1000000007, -48(%rbp)
.L18:
	cmpq	$1000000007, -48(%rbp)
	jg	.L19
	subq	$1, -32(%rbp)
.L17:
	cmpq	$0, -32(%rbp)
	jg	.L20
	salq	-48(%rbp)
	jmp	.L21
.L22:
	subq	$1000000007, -48(%rbp)
.L21:
	cmpq	$1000000007, -48(%rbp)
	jg	.L22
	jmp	.L23
.L12:
	movq	-64(%rbp), %rax
	movq	%rax, -24(%rbp)
	jmp	.L24
.L27:
	movq	-48(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, -48(%rbp)
	jmp	.L25
.L26:
	subq	$1000000007, -48(%rbp)
.L25:
	cmpq	$1000000007, -48(%rbp)
	jg	.L26
	subq	$1, -24(%rbp)
.L24:
	cmpq	$0, -24(%rbp)
	jg	.L27
	movq	-56(%rbp), %rax
	movq	%rax, -16(%rbp)
	jmp	.L28
.L31:
	movq	-48(%rbp), %rax
	imulq	-16(%rbp), %rax
	movq	%rax, -48(%rbp)
	jmp	.L29
.L30:
	subq	$1000000007, -48(%rbp)
.L29:
	cmpq	$1000000007, -48(%rbp)
	jg	.L30
	subq	$1, -16(%rbp)
.L28:
	cmpq	$0, -16(%rbp)
	jg	.L31
.L23:
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L32:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	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:
