#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*/ getchar();
int /*<<< orphan*/ printf(char *, long);
int main() {
  long number = 2520;
  bool evenlyDivisible = false;
  int i;
  while (1) {
    evenlyDivisible = true;
    for (i = 1; i <= 20 && evenlyDivisible == true; i++) {
      if (number % i != 0) {
        evenlyDivisible = false;
        break;
      }
    }
    if (evenlyDivisible)
      break;
    number++;
  }
  printf("%ld", number);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x9d8,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
xor    %eax,%eax
cmpl   $0x14,-0x18(%rbp)
mov    %al,-0x19(%rbp)
jg     1165 <main+0x45>
cmpl   $0x1,-0x14(%rbp)
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1175 <main+0x55>
jmp    11ab <main+0x8b>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cqto
idiv   %rcx
cmp    $0x0,%rdx
je     1198 <main+0x78>
movl   $0x0,-0x14(%rbp)
jmp    11ab <main+0x8b>
jmp    119d <main+0x7d>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    114c <main+0x2c>
cmpl   $0x0,-0x14(%rbp)
je     11ba <main+0x9a>
jmp    11cb <main+0xab>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    113e <main+0x1e>
mov    -0x10(%rbp),%rsi
lea    0xe2a(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

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