#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 main(int argc, char *argv[]) {
  int found = 0;
  int target = 20;
  int i = 0;
  while (!found) {
    found = 1;
    for (i = 1; i <= 20; ++i) {
      if (target % i > 0) {
        found = 0;
        break;
      }
    }
    if (!found) {
      ++target;
    }
  }
  printf("Solution: %d\n", target);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x14,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x0,-0x14(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1151 <main+0x41>
jmp    11b0 <main+0xa0>
movl   $0x1,-0x14(%rbp)
movl   $0x1,-0x1c(%rbp)
cmpl   $0x14,-0x1c(%rbp)
jg     1198 <main+0x88>
mov    -0x18(%rbp),%eax
cltd
idivl  -0x1c(%rbp)
cmp    $0x0,%edx
jle    1185 <main+0x75>
movl   $0x0,-0x14(%rbp)
jmp    1198 <main+0x88>
jmp    118a <main+0x7a>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    115f <main+0x4f>
cmpl   $0x0,-0x14(%rbp)
jne    11ab <main+0x9b>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113b <main+0x2b>
mov    -0x18(%rbp),%esi
lea    0xe46(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x14,%esi
mov    $0x3,%ecx
nopw   0x0(%rax,%rax,1)
lea    -0x1(%rcx),%edi
mov    %esi,%eax
xor    %edx,%edx
div    %edi
test   %edx,%edx
jne    1150 <main+0x40>
cmp    $0x15,%ecx
je     1159 <main+0x49>
mov    %esi,%eax
xor    %edx,%edx
div    %ecx
add    $0x2,%ecx
test   %edx,%edx
je     1120 <main+0x10>
add    $0xfffffffc,%ecx
cmp    $0x13,%ecx
setb   %al
jmp    1152 <main+0x42>
nopw   0x0(%rax,%rax,1)
mov    $0x1,%al
movzbl %al,%eax
add    %eax,%esi
jmp    1115 <main+0x5>
push   %rax
add    $0xfffffffe,%ecx
cmp    $0x13,%ecx
adc    $0x0,%esi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"Solution: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %18, %2
%4 = phi i32 [ 20, %2 ], [ %21, %18 ]
br label %5
5: ; preds = %13, %3
%6 = phi i32 [ 1, %3 ], [ %11, %13 ]
%7 = add nuw nsw i32 %6, 1
%8 = urem i32 %4, %7
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %18
10: ; preds = %5
%11 = add nuw nsw i32 %6, 2
%12 = icmp eq i32 %11, 21
br i1 %12, label %22, label %13
13: ; preds = %10
%14 = urem i32 %4, %11
%15 = icmp eq i32 %14, 0
br i1 %15, label %5, label %16
16: ; preds = %13
%17 = icmp ult i32 %6, 19
br label %18
18: ; preds = %5, %16
%19 = phi i1 [ %17, %16 ], [ true, %5 ]
%20 = zext i1 %19 to i32
%21 = add nuw nsw i32 %4, %20
br label %3
22: ; preds = %10
%23 = icmp ult i32 %6, 19
%24 = zext i1 %23 to i32
%25 = add nuw nsw i32 %4, %24
%26 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %25)
ret i32 0
}