#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 *, long);
main() {
  long int num, div;
  div = 0;
  for (num = 1; div < 21; num++) {
    for (div = 1; div <= 20; div++) {
      if (num % div != 0) {
        break;
      }
    }
    if (div == 21)
      break;
  }
  printf("The solution is: %li\n", num);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x1,-0x10(%rbp)
cmpq   $0x15,-0x18(%rbp)
jge    11a2 <main+0x92>
movq   $0x1,-0x18(%rbp)
cmpq   $0x14,-0x18(%rbp)
jg     117c <main+0x6c>
mov    -0x10(%rbp),%rax
cqto
idivq  -0x18(%rbp)
cmp    $0x0,%rdx
je     1166 <main+0x56>
jmp    117c <main+0x6c>
jmp    116b <main+0x5b>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1142 <main+0x32>
cmpq   $0x15,-0x18(%rbp)
jne    118c <main+0x7c>
jmp    11a2 <main+0x92>
jmp    1191 <main+0x81>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    112f <main+0x1f>
mov    -0x10(%rbp),%rsi
lea    0xe53(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%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,%ecx
xor    %r8d,%r8d
cs nopw 0x0(%rax,%rax,1)
mov    %rcx,%rax
movabs $0xcccccccccccccccd,%rdx
cc cc cc
mul    %rdx
mov    %rdx,(%rsp)
mov    %rcx,%rax
movabs $0xd79435e50d79435f,%rdx
35 94 d7
mul    %rdx
mov    %rdx,0x8(%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,%r14
mov    %r8,%rsi
mov    %rcx,%rax
movabs $0x8888888888888889,%rdx
88 88 88
mul    %rdx
mov    %rdx,0x10(%rsp)
mov    %rcx,%rax
shr    %rax
movabs $0x4924924924924925,%rdx
92 24 49
mul    %rdx
mov    %rdx,%rbx
mov    %rcx,%rax
movabs $0x4ec4ec4ec4ec4ec5,%rdx
ec c4 4e
mul    %rdx
mov    %rdx,%r15
mov    %rcx,%rax
movabs $0xaaaaaaaaaaaaaaab,%rdx
aa aa aa
mul    %rdx
mov    %rdx,%r11
mov    %rcx,%rax
movabs $0x2e8ba2e8ba2e8ba3,%rdx
a2 8b 2e
mul    %rdx
mov    %rdx,%r12
add    $0x1,%r8
mov    %rcx,%rax
movabs $0x2492492492492493,%rdx
49 92 24
mul    %rdx
mov    %rcx,%rax
sub    %rdx,%rax
mov    %r11,%rdi
shr    %rdi
lea    (%rdi,%rdi,2),%rdi
mov    %r8d,%ebp
and    $0x1,%ebp
neg    %rdi
add    %rsi,%rdi
add    $0x1,%rdi
mov    %r8d,%r13d
and    $0x3,%r13d
add    $0x1,%rcx
or     %rbp,%rdi
jne    1130 <main+0x20>
shr    %rax
mov    (%rsp),%r9
shr    $0x2,%r9
test   %r13,%r13
jne    1130 <main+0x20>
add    %rdx,%rax
mov    %r11,%rdx
shr    $0x2,%rdx
lea    (%r9,%r9,4),%rdi
add    $0xffffffffffffffff,%rdi
cmp    %rsi,%rdi
jne    1130 <main+0x20>
shr    $0x2,%rax
lea    (%rdx,%rdx,2),%rdx
add    %rdx,%rdx
add    $0xffffffffffffffff,%rdx
cmp    %rsi,%rdx
jne    1130 <main+0x20>
mov    %r8d,%edx
and    $0x7,%edx
mov    %rax,%rdi
not    %rdi
lea    (%rdi,%rax,8),%rax
cmp    %rsi,%rax
jne    1130 <main+0x20>
mov    %r10,%rbp
shr    $0x3,%rbp
test   %rdx,%rdx
jne    1130 <main+0x20>
mov    (%rsp),%rax
shr    $0x3,%rax
lea    -0x1(,%rbp,8),%rdx
ff
add    %rbp,%rdx
cmp    %rsi,%rdx
jne    1130 <main+0x20>
shr    %rbx
shr    %r12
lea    (%rax,%rax,4),%rax
add    %rax,%rax
add    $0xffffffffffffffff,%rax
cmp    %rsi,%rax
jne    1130 <main+0x20>
mov    %rbx,%rax
shl    $0x4,%rax
shr    $0x3,%r11
lea    (%r12,%r12,4),%rdx
lea    (%r12,%rdx,2),%rdx
add    $0xffffffffffffffff,%rdx
cmp    %rsi,%rdx
jne    1130 <main+0x20>
sub    %rbx,%rax
shr    $0x2,%r15
lea    (%r11,%r11,2),%rdx
lea    -0x1(,%rdx,4),%rdx
ff
cmp    %rsi,%rdx
jne    1130 <main+0x20>
not    %rbx
add    %rax,%rbx
lea    (%r15,%r15,2),%rax
lea    (%r15,%rax,4),%rax
add    $0xffffffffffffffff,%rax
cmp    %rsi,%rax
jne    1130 <main+0x20>
shrq   $0x3,0x10(%rsp)
cmp    %rsi,%rbx
jne    1130 <main+0x20>
shr    $0x4,%r14
mov    %r8d,%eax
and    $0xf,%eax
mov    0x10(%rsp),%rdx
lea    (%rdx,%rdx,4),%rdx
lea    (%rdx,%rdx,2),%rdx
add    $0xffffffffffffffff,%rdx
cmp    %rsi,%rdx
jne    1130 <main+0x20>
mov    %r14,%rdx
shl    $0x4,%rdx
test   %rax,%rax
jne    1130 <main+0x20>
shr    $0x4,%r10
lea    (%r14,%rdx,1),%rax
add    $0xffffffffffffffff,%rax
cmp    %rsi,%rax
jne    1130 <main+0x20>
shrq   $0x4,0x8(%rsp)
lea    (%r10,%r10,8),%rax
add    %rax,%rax
add    $0xffffffffffffffff,%rax
cmp    %rsi,%rax
jne    1130 <main+0x20>
shrq   $0x4,(%rsp)
mov    0x8(%rsp),%rdx
lea    (%rdx,%rdx,8),%rax
lea    (%rdx,%rax,2),%rax
add    $0xffffffffffffffff,%rax
cmp    %rsi,%rax
jne    1130 <main+0x20>
mov    (%rsp),%rax
lea    (%rax,%rax,4),%rax
lea    -0x1(,%rax,4),%rax
ff
cmp    %rsi,%rax
jne    1130 <main+0x20>
lea    0xc24(%rip),%rdi
mov    %r8,%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 = [22 x i8] c"The solution is: %li\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %3
store i64 1, i64* %2
br label %4
4: ; preds = %26, %0
%5 = load i64, i64* %3
%6 = icmp slt i64 %5, 21
br i1 %6, label %7, label %29
7: ; preds = %4
store i64 1, i64* %3
br label %8
8: ; preds = %18, %7
%9 = load i64, i64* %3
%10 = icmp sle i64 %9, 20
br i1 %10, label %11, label %21
11: ; preds = %8
%12 = load i64, i64* %2
%13 = load i64, i64* %3
%14 = srem i64 %12, %13
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %11
br label %21
17: ; preds = %11
br label %18
18: ; preds = %17
%19 = load i64, i64* %3
%20 = add nsw i64 %19, 1
store i64 %20, i64* %3
br label %8
21: ; preds = %16, %8
%22 = load i64, i64* %3
%23 = icmp eq i64 %22, 21
br i1 %23, label %24, label %25
24: ; preds = %21
br label %29
25: ; preds = %21
br label %26
26: ; preds = %25
%27 = load i64, i64* %2
%28 = add nsw i64 %27, 1
store i64 %28, i64* %2
br label %4
29: ; preds = %24, %4
%30 = load i64, i64* %2
%31 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 %30)
%32 = load i32, i32* %1
ret i32 %32
}

LLVM IR (-O2):
@.str = [22 x i8] c"The solution is: %li\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ 1, %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 ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 %2)
ret i32 0
}