#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 /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  scanf("%d %d", &a, &b);
  int i;
  for (i = (a > b ? a : b); (i % a != 0 || i % b != 0); i++) {
  }
  printf("%d\n", i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    115a <main+0x3a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1160 <main+0x40>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    $0x1,%al
cmp    $0x0,%edx
mov    %al,-0x15(%rbp)
jne    118b <main+0x6b>
mov    -0x10(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    119b <main+0x7b>
jmp    11ae <main+0x8e>
jmp    11a0 <main+0x80>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1166 <main+0x46>
mov    -0x10(%rbp),%esi
lea    0xe4e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%edi
cmp    %edi,%ecx
mov    %edi,%esi
cmovg  %ecx,%esi
jmp    1153 <main+0x33>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%esi
mov    %esi,%eax
cltd
idiv   %ecx
test   %edx,%edx
jne    1150 <main+0x30>
mov    %esi,%eax
cltd
idiv   %edi
test   %edx,%edx
jne    1150 <main+0x30>
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = load i32, i32* %2
br label %13
11: ; preds = %0
%12 = load i32, i32* %3
br label %13
13: ; preds = %11, %9
%14 = phi i32 [ %10, %9 ], [ %12, %11 ]
store i32 %14, i32* %4
br label %15
15: ; preds = %28, %13
%16 = load i32, i32* %4
%17 = load i32, i32* %2
%18 = srem i32 %16, %17
%19 = icmp ne i32 %18, 0
br i1 %19, label %25, label %20
20: ; preds = %15
%21 = load i32, i32* %4
%22 = load i32, i32* %3
%23 = srem i32 %21, %22
%24 = icmp ne i32 %23, 0
br label %25
25: ; preds = %20, %15
%26 = phi i1 [ true, %15 ], [ %24, %20 ]
br i1 %26, label %27, label %31
27: ; preds = %25
br label %28
28: ; preds = %27
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 1
store i32 %30, i32* %4
br label %15
31: ; preds = %25
%32 = load i32, i32* %4
%33 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %32)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = icmp sgt i32 %6, %7
%9 = select i1 %8, i32 %6, i32 %7
br label %10
10: ; preds = %17, %0
%11 = phi i32 [ %9, %0 ], [ %18, %17 ]
%12 = srem i32 %11, %6
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = srem i32 %11, %7
%16 = icmp eq i32 %15, 0
br i1 %16, label %19, label %17
17: ; preds = %10, %14
%18 = add nsw i32 %11, 1
br label %10
19: ; preds = %14
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}