#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 *, unsigned long long);
int main() {
  const unsigned long long kBegin = 1;
  const unsigned long long kEnd = 20;
  unsigned long long i, k;
  for (i = kBegin;; ++i) {
    for (k = kEnd; k >= kBegin; --k) {
      if (i % k == 0)
        continue;
      break;
    }
    if (k == kBegin - 1)
      break;
  }
  printf("Smallest multiple is %lld\n", i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
movq   $0x14,-0x18(%rbp)
movq   $0x1,-0x20(%rbp)
movq   $0x14,-0x28(%rbp)
cmpq   $0x1,-0x28(%rbp)
jb     117b <main+0x6b>
mov    -0x20(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x28(%rbp)
cmp    $0x0,%rdx
jne    1165 <main+0x55>
jmp    116a <main+0x5a>
jmp    117b <main+0x6b>
mov    -0x28(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x28(%rbp)
jmp    113f <main+0x2f>
cmpq   $0x0,-0x28(%rbp)
jne    118b <main+0x7b>
jmp    11a1 <main+0x91>
jmp    1190 <main+0x80>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1137 <main+0x27>
mov    -0x20(%rbp),%rsi
lea    0xe54(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    $0x1,%eax
mov    %rax,(%rsp)
xor    %edx,%edx
nopl   0x0(%rax)
mov    (%rsp),%rdi
mov    %rdx,%rsi
mov    %rdi,%rax
movabs $0xaaaaaaaaaaaaaaab,%rcx
aa aa aa
mul    %rcx
mov    %rdx,%r9
mov    %rdi,%rax
movabs $0xcccccccccccccccd,%rcx
cc cc cc
mul    %rcx
mov    %rdx,%r11
mov    %rdx,%rbx
mov    %rdi,%rax
movabs $0x2492492492492493,%rcx
49 92 24
mul    %rcx
mov    %rdx,0x8(%rsp)
mov    %rdi,%rax
movabs $0xe38e38e38e38e38f,%rcx
38 8e e3
mul    %rcx
mov    %rdx,%rbp
mov    %rdi,%rax
movabs $0x2e8ba2e8ba2e8ba3,%rcx
a2 8b 2e
mul    %rcx
mov    %rdx,%r14
mov    %rdi,%rax
movabs $0x4ec4ec4ec4ec4ec5,%rcx
ec c4 4e
mul    %rcx
mov    %rdx,%r15
shr    $0x2,%rbx
mov    %rdi,%rax
shr    %rax
movabs $0x4924924924924925,%rcx
92 24 49
mul    %rcx
mov    %rdx,%r8
mov    %rdi,%rax
movabs $0x8888888888888889,%rcx
88 88 88
mul    %rcx
mov    %rdx,%r12
mov    %rdi,%rax
movabs $0xf0f0f0f0f0f0f0f1,%rcx
f0 f0 f0
mul    %rcx
mov    %rdx,%r13
shr    $0x4,%r13
mov    %rbp,%r10
shr    $0x4,%r10
mov    %rdi,%rax
movabs $0xd79435e50d79435f,%rcx
35 94 d7
mul    %rcx
shr    $0x4,%rdx
lea    (%rdx,%rdx,8),%rax
lea    (%rdx,%rax,2),%rax
mov    %rbx,%rcx
mov    %rbx,0x10(%rsp)
and    $0xfffffffffffffffc,%rcx
lea    (%rcx,%rcx,4),%rcx
neg    %rcx
add    %rsi,%rcx
add    $0x1,%rcx
neg    %rax
add    %rsi,%rax
add    $0x1,%rax
or     %rcx,%rax
lea    0x1(%rsi),%rdx
lea    0x1(%rdi),%rax
mov    %rax,(%rsp)
jne    1130 <main+0x20>
shr    %r8
mov    %r13,%rbx
shl    $0x4,%rbx
lea    (%r10,%r10,8),%rax
add    %rax,%rax
add    $0xffffffffffffffff,%rax
cmp    %rsi,%rax
jne    1130 <main+0x20>
mov    %r8,%rcx
shl    $0x4,%rcx
mov    %edx,%eax
and    $0xf,%eax
add    %r13,%rbx
add    $0xffffffffffffffff,%rbx
cmp    %rsi,%rbx
jne    1130 <main+0x20>
sub    %r8,%rcx
shr    $0x3,%r12
test   %rax,%rax
jne    1130 <main+0x20>
not    %r8
add    %rcx,%r8
lea    (%r12,%r12,4),%rax
lea    (%rax,%rax,2),%rax
add    $0xffffffffffffffff,%rax
cmp    %rsi,%rax
jne    1130 <main+0x20>
shr    $0x2,%r15
cmp    %rsi,%r8
jne    1130 <main+0x20>
mov    %r9,%rax
shr    $0x3,%rax
lea    (%r15,%r15,2),%rcx
lea    (%r15,%rcx,4),%rcx
add    $0xffffffffffffffff,%rcx
cmp    %rsi,%rcx
jne    1130 <main+0x20>
shr    %r14
lea    (%rax,%rax,2),%rax
lea    -0x1(,%rax,4),%rax
ff
cmp    %rsi,%rax
jne    1130 <main+0x20>
sub    0x8(%rsp),%rdi
shr    $0x3,%r11
lea    (%r14,%r14,4),%rax
lea    (%r14,%rax,2),%rax
add    $0xffffffffffffffff,%rax
cmp    %rsi,%rax
jne    1130 <main+0x20>
shr    %rdi
shr    $0x3,%rbp
lea    (%r11,%r11,4),%rax
add    %rax,%rax
add    $0xffffffffffffffff,%rax
cmp    %rsi,%rax
jne    1130 <main+0x20>
add    0x8(%rsp),%rdi
mov    %edx,%eax
and    $0x7,%eax
lea    -0x1(,%rbp,8),%rcx
ff
add    %rbp,%rcx
cmp    %rsi,%rcx
jne    1130 <main+0x20>
shr    $0x2,%rdi
test   %rax,%rax
jne    1130 <main+0x20>
mov    %r9,%rax
shr    $0x2,%rax
mov    %rdi,%rcx
not    %rcx
lea    (%rcx,%rdi,8),%rcx
cmp    %rsi,%rcx
jne    1130 <main+0x20>
lea    (%rax,%rax,2),%rax
add    %rax,%rax
add    $0xffffffffffffffff,%rax
cmp    %rsi,%rax
jne    1130 <main+0x20>
mov    %edx,%eax
and    $0x3,%eax
mov    0x10(%rsp),%rcx
lea    (%rcx,%rcx,4),%rcx
add    $0xffffffffffffffff,%rcx
cmp    %rsi,%rcx
jne    1130 <main+0x20>
shr    %r9
test   %rax,%rax
jne    1130 <main+0x20>
mov    %edx,%eax
and    $0x1,%eax
lea    (%r9,%r9,2),%rcx
add    $0xffffffffffffffff,%rcx
cmp    %rsi,%rcx
jne    1130 <main+0x20>
test   %rax,%rax
jne    1130 <main+0x20>
lea    0xc2d(%rip),%rdi
mov    %rdx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [27 x i8] c"Smallest multiple is %lld\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ 1, %0 ], [ %58, %1 ]
%3 = urem i64 %2, 20
%4 = urem i64 %2, 19
%5 = or i64 %3, %4
%6 = icmp eq i64 %5, 0
%7 = urem i64 %2, 18
%8 = icmp eq i64 %7, 0
%9 = select i1 %6, i1 %8, i1 false
%10 = urem i64 %2, 17
%11 = icmp eq i64 %10, 0
%12 = select i1 %9, i1 %11, i1 false
%13 = and i64 %2, 15
%14 = icmp eq i64 %13, 0
%15 = select i1 %12, i1 %14, i1 false
%16 = urem i64 %2, 15
%17 = icmp eq i64 %16, 0
%18 = select i1 %15, i1 %17, i1 false
%19 = urem i64 %2, 14
%20 = icmp eq i64 %19, 0
%21 = select i1 %18, i1 %20, i1 false
%22 = urem i64 %2, 13
%23 = icmp eq i64 %22, 0
%24 = select i1 %21, i1 %23, i1 false
%25 = urem i64 %2, 12
%26 = icmp eq i64 %25, 0
%27 = select i1 %24, i1 %26, i1 false
%28 = urem i64 %2, 11
%29 = icmp eq i64 %28, 0
%30 = select i1 %27, i1 %29, i1 false
%31 = urem i64 %2, 10
%32 = icmp eq i64 %31, 0
%33 = select i1 %30, i1 %32, i1 false
%34 = urem i64 %2, 9
%35 = icmp eq i64 %34, 0
%36 = select i1 %33, i1 %35, i1 false
%37 = and i64 %2, 7
%38 = icmp eq i64 %37, 0
%39 = select i1 %36, i1 %38, i1 false
%40 = urem i64 %2, 7
%41 = icmp eq i64 %40, 0
%42 = select i1 %39, i1 %41, i1 false
%43 = urem i64 %2, 6
%44 = icmp eq i64 %43, 0
%45 = select i1 %42, i1 %44, i1 false
%46 = urem i64 %2, 5
%47 = icmp eq i64 %46, 0
%48 = select i1 %45, i1 %47, i1 false
%49 = and i64 %2, 3
%50 = icmp eq i64 %49, 0
%51 = select i1 %48, i1 %50, i1 false
%52 = urem i64 %2, 3
%53 = icmp eq i64 %52, 0
%54 = select i1 %51, i1 %53, i1 false
%55 = and i64 %2, 1
%56 = icmp eq i64 %55, 0
%57 = select i1 %54, i1 %56, i1 false
%58 = add i64 %2, 1
br i1 %57, label %59, label %1
59: ; preds = %1
%60 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i64 %2)
ret i32 0
}