#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 num = 20;
  int i;
  while (1) {
    num++;
    for (i = 2; i <= 20; i++) {
      if (num % i)
        break;
    }
    if (i == 21)
      break;
  }
  printf("Desired number: %d\n", num);
  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   $0x14,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
movl   $0x2,-0x18(%rbp)
cmpl   $0x14,-0x18(%rbp)
jg     116f <main+0x5f>
mov    -0x14(%rbp),%eax
cltd
idivl  -0x18(%rbp)
cmp    $0x0,%edx
je     115c <main+0x4c>
jmp    116f <main+0x5f>
jmp    1161 <main+0x51>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113d <main+0x2d>
cmpl   $0x15,-0x18(%rbp)
jne    117e <main+0x6e>
jmp    1183 <main+0x73>
jmp    112d <main+0x1d>
mov    -0x14(%rbp),%esi
lea    0xe73(%rip),%rdi
call   1030 <printf@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    $0x14,%esi
movl   $0x15,0x4(%rsp)
nopl   0x0(%rax,%rax,1)
mov    %esi,%r12d
mov    0x4(%rsp),%eax
mov    %eax,%r8d
mov    %eax,%r9d
mov    %r9,%r13
mov    $0xcccccccd,%eax
imul   %rax,%r13
lea    0x1(%r12),%esi
mov    %r9,%r14
mov    $0xaaaaaaab,%eax
imul   %rax,%r14
imul   $0x24924925,%r9,%rax
shr    $0x20,%rax
mov    %r8d,%ecx
sub    %eax,%ecx
shr    %ecx
add    %eax,%ecx
mov    %r14,%rax
shr    $0x22,%rax
mov    %r13,%r10
shr    $0x22,%r10
mov    %r14,%rdi
shr    $0x21,%rdi
lea    (%rdi,%rdi,2),%edi
mov    %esi,%ebp
and    $0x1,%ebp
neg    %edi
lea    (%r12,%rdi,1),%edx
add    $0x1,%edx
mov    %esi,%edi
and    $0x3,%edi
lea    0x1(%r8),%ebx
mov    %ebx,0x4(%rsp)
or     %ebp,%edx
jne    1130 <main+0x20>
shr    $0x2,%ecx
add    %eax,%eax
lea    (%r10,%r10,4),%ebp
neg    %ebp
test   %edi,%edi
jne    1130 <main+0x20>
lea    0x0(,%rcx,8),%edi
lea    (%rax,%rax,2),%eax
neg    %eax
lea    (%r12,%rbp,1),%edx
add    $0x15,%edx
cmp    $0x14,%edx
jne    1130 <main+0x20>
imul   $0x38e38e39,%r9,%r11
sub    %edi,%ecx
add    %r12d,%eax
add    $0x15,%eax
cmp    $0x14,%eax
jne    1130 <main+0x20>
mov    %r13,%rax
shr    $0x23,%rax
mov    %r11,%rbp
shr    $0x21,%rbp
mov    %esi,%edi
and    $0x7,%edi
add    %r12d,%ecx
add    $0x15,%ecx
cmp    $0x14,%ecx
jne    1130 <main+0x20>
mov    %r8d,%ecx
shr    %ecx
mov    %r9,%rbx
mov    $0xba2e8ba3,%edx
imul   %rdx,%rbx
add    %eax,%eax
lea    0x0(%rbp,%rbp,8),%ebp
neg    %ebp
test   %edi,%edi
jne    1130 <main+0x20>
mov    $0x92492493,%edx
imul   %rdx,%rcx
shr    $0x23,%r14
shr    $0x23,%rbx
lea    (%rax,%rax,4),%eax
neg    %eax
lea    (%r12,%rbp,1),%edx
add    $0x15,%edx
cmp    $0x14,%edx
jne    1130 <main+0x20>
shr    $0x22,%rcx
imul   $0x4ec4ec4f,%r9,%r10
shl    $0x2,%r14d
lea    (%rbx,%rbx,4),%edx
lea    (%rbx,%rdx,2),%edi
neg    %edi
add    %r12d,%eax
add    $0x15,%eax
cmp    $0x14,%eax
jne    1130 <main+0x20>
mov    %ecx,%r15d
shl    $0x4,%r15d
shr    $0x22,%r10
lea    (%r14,%r14,2),%eax
neg    %eax
lea    (%r12,%rdi,1),%edx
add    $0x15,%edx
cmp    $0x14,%edx
jne    1130 <main+0x20>
mov    %r9,%rbx
mov    $0xaf286bcb,%edx
imul   %rdx,%rbx
mov    %r9,%rbp
mov    $0xf0f0f0f1,%edx
imul   %rdx,%rbp
mov    $0x88888889,%edx
imul   %rdx,%r9
mov    %ecx,%r14d
sub    %r15d,%r14d
lea    (%r10,%r10,2),%edx
lea    (%r10,%rdx,4),%edi
neg    %edi
add    %r12d,%eax
add    $0x15,%eax
cmp    $0x14,%eax
jne    1130 <main+0x20>
shr    $0x20,%rbx
shr    $0x24,%rbp
shr    $0x23,%r9
add    %r14d,%ecx
lea    (%r12,%rdi,1),%eax
add    $0x15,%eax
cmp    $0x14,%eax
jne    1130 <main+0x20>
sub    %ebx,%r8d
mov    %ebp,%eax
shl    $0x4,%eax
lea    (%r9,%r9,4),%edx
lea    (%rdx,%rdx,2),%edx
neg    %edx
add    %r12d,%ecx
add    $0x15,%ecx
cmp    $0x14,%ecx
jne    1130 <main+0x20>
shr    %r8d
shr    $0x22,%r11
add    %eax,%ebp
mov    %esi,%eax
and    $0xf,%eax
lea    (%r12,%rdx,1),%ecx
add    $0x15,%ecx
cmp    $0x14,%ecx
jne    1130 <main+0x20>
add    %ebx,%r8d
add    %r11d,%r11d
neg    %ebp
test   %eax,%eax
jne    1130 <main+0x20>
shr    $0x24,%r13
shr    $0x4,%r8d
lea    (%r11,%r11,8),%eax
neg    %eax
lea    (%r12,%rbp,1),%ecx
add    $0x15,%ecx
cmp    $0x14,%ecx
jne    1130 <main+0x20>
shl    $0x2,%r13d
lea    (%r8,%r8,8),%ecx
lea    (%r8,%rcx,2),%ecx
neg    %ecx
add    %r12d,%eax
add    $0x15,%eax
cmp    $0x14,%eax
jne    1130 <main+0x20>
lea    0x0(%r13,%r13,4),%eax
neg    %eax
add    %r12d,%ecx
add    $0x15,%ecx
cmp    $0x14,%ecx
jne    1130 <main+0x20>
add    %r12d,%eax
add    $0x15,%eax
cmp    $0x14,%eax
jne    1130 <main+0x20>
lea    0xc50(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Desired number: %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
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 20, i32* %6
br label %8
8: ; preds = %2, %28
%9 = load i32, i32* %6
%10 = add nsw i32 %9, 1
store i32 %10, i32* %6
store i32 2, i32* %7
br label %11
11: ; preds = %21, %8
%12 = load i32, i32* %7
%13 = icmp sle i32 %12, 20
br i1 %13, label %14, label %24
14: ; preds = %11
%15 = load i32, i32* %6
%16 = load i32, i32* %7
%17 = srem i32 %15, %16
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %14
br label %24
20: ; preds = %14
br label %21
21: ; preds = %20
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
store i32 %23, i32* %7
br label %11
24: ; preds = %19, %11
%25 = load i32, i32* %7
%26 = icmp eq i32 %25, 21
br i1 %26, label %27, label %28
27: ; preds = %24
br label %29
28: ; preds = %24
br label %8
29: ; preds = %27
%30 = load i32, i32* %6
%31 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %30)
ret i32 0
}

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