#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int EXIT_SUCCESS;
int gcd(int, int);
int lcm(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(void) {
  int m, n;
  printf("½Ð¿é¤J¨â­Ó¼Æ¦r(½Ð¥ÎªÅ¥Õ¹j¶})¡G");
  scanf("%d %d", &m, &n);
  printf("\n³Ì¤j¤½¦]¼Æ¬°¡G%d \n³Ì¤p¤½­¿¼Æ¬°¡G%d", gcd(m, n), lcm(m, n));
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1060 <gcd@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <lcm@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%edx
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e3c(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeb4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1060 <gcd@plt>
mov    %eax,%ebx
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1040 <lcm@plt>
lea    0xeb0(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2e42(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [54 x i8] c"\C2\BD\C3\90\C2\BF\C3\A9\C2\A4J\C2\A8\C3\A2\C2\AD\C3\93\C2\BC\C3\86\C2\A6r(\C2\BD\C3\90\C2\A5\C3\8E\C2\AA\C3\85\C2\A5\C3\95\C2\B9j\C2\B6})\C2\A1G\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [59 x i8] c"\0A\C2\B3\C3\8C\C2\A4j\C2\A4\C2\BD\C2\A6]\C2\BC\C3\86\C2\AC\C2\B0\C2\A1G%d \0A\C2\B3\C3\8C\C2\A4p\C2\A4\C2\BD\C2\AD\C2\BF\C2\BC\C3\86\C2\AC\C2\B0\C2\A1G%d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @gcd(i32 %6, i32 %7)
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @lcm(i32 %9, i32 %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0), i32 %8, i32 %11)
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}

LLVM IR (-O2):
@.str = [54 x i8] c"\C2\BD\C3\90\C2\BF\C3\A9\C2\A4J\C2\A8\C3\A2\C2\AD\C3\93\C2\BC\C3\86\C2\A6r(\C2\BD\C3\90\C2\A5\C3\8E\C2\AA\C3\85\C2\A5\C3\95\C2\B9j\C2\B6})\C2\A1G\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [59 x i8] c"\0A\C2\B3\C3\8C\C2\A4j\C2\A4\C2\BD\C2\A6]\C2\BC\C3\86\C2\AC\C2\B0\C2\A1G%d \0A\C2\B3\C3\8C\C2\A4p\C2\A4\C2\BD\C2\AD\C2\BF\C2\BC\C3\86\C2\AC\C2\B0\C2\A1G%d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @gcd(i32 %7, i32 %8)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = call i32 @lcm(i32 %10, i32 %11)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %12)
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}