#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(void) {
  int sm_mult = 20;
  int max = 20;
  int found = false;
  while (found == false) {
    printf("%d\n", sm_mult);
    for (int i = 2; i <= max + 1; i += 1) {
      if (i == max + 1) {
        found = true;
      } else if (sm_mult % i == 0) {
        continue;
      } else {
        break;
      }
    }
    if (found == false) {
      sm_mult += 20;
    }
  }
  printf("%d\n", sm_mult);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    11c7 <main+0xb7>
mov    -0x8(%rbp),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
movl   $0x2,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jg     11af <main+0x9f>
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jne    1182 <main+0x72>
movl   $0x1,-0x10(%rbp)
jmp    119c <main+0x8c>
mov    -0x8(%rbp),%eax
cltd
idivl  -0x14(%rbp)
cmp    $0x0,%edx
jne    1197 <main+0x87>
jmp    11a1 <main+0x91>
jmp    11af <main+0x9f>
jmp    11a1 <main+0x91>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1154 <main+0x44>
cmpl   $0x0,-0x10(%rbp)
jne    11c2 <main+0xb2>
mov    -0x8(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
mov    -0x8(%rbp),%esi
lea    0xe2f(%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,%r15d
jmp    1134 <main+0x24>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x14,%r15d
mov    %r15d,%r13d
mov    %r13,%r14
mov    $0xaaaaaaab,%eax
imul   %rax,%r14
imul   $0x24924925,%r13,%rax
shr    $0x20,%rax
mov    %r15d,%ebx
sub    %eax,%ebx
shr    %ebx
add    %eax,%ebx
shr    $0x2,%ebx
mov    %r14,%r12
shr    $0x22,%r12
add    %r12d,%r12d
mov    %r14,%rax
shr    $0x21,%rax
lea    (%rax,%rax,2),%ebp
lea    0xe8b(%rip),%rdi
mov    %r15d,%esi
call   1030 <printf@plt>
mov    %r13,%r9
mov    $0xcccccccd,%eax
imul   %rax,%r9
mov    %r9,%rax
shr    $0x22,%rax
lea    (%rax,%rax,4),%ecx
mov    %r15d,%eax
sub    %ecx,%eax
cmp    %ebp,%r15d
jne    1130 <main+0x20>
lea    0x0(,%rbx,8),%edx
lea    (%r12,%r12,2),%ecx
neg    %ecx
test   %eax,%eax
jne    1130 <main+0x20>
imul   $0x38e38e39,%r13,%r8
sub    %edx,%ebx
lea    (%r15,%rcx,1),%eax
add    $0x14,%eax
cmp    $0x14,%eax
jne    1130 <main+0x20>
mov    %r8,%rax
shr    $0x21,%rax
mov    %r9,%rdi
shr    $0x23,%rdi
mov    %r15d,%ecx
and    $0x4,%ecx
lea    (%r15,%rbx,1),%edx
add    $0x14,%edx
cmp    $0x14,%edx
jne    1130 <main+0x20>
mov    %r15d,%edx
shr    %edx
mov    %r13,%rsi
mov    $0xba2e8ba3,%ebp
imul   %rbp,%rsi
lea    (%rax,%rax,8),%eax
neg    %eax
add    %edi,%edi
test   %ecx,%ecx
jne    1130 <main+0x20>
mov    $0x92492493,%ecx
imul   %rcx,%rdx
shr    $0x23,%r14
shr    $0x23,%rsi
lea    (%rdi,%rdi,4),%edi
mov    %r15d,%ecx
sub    %edi,%ecx
add    %r15d,%eax
add    $0x14,%eax
cmp    $0x14,%eax
jne    1130 <main+0x20>
shr    $0x22,%rdx
imul   $0x4ec4ec4f,%r13,%rbx
shl    $0x2,%r14d
lea    (%rsi,%rsi,4),%eax
lea    (%rsi,%rax,2),%eax
neg    %eax
test   %ecx,%ecx
jne    1130 <main+0x20>
mov    %edx,%ebp
shl    $0x4,%ebp
shr    $0x22,%rbx
lea    (%r14,%r14,2),%ecx
neg    %ecx
add    %r15d,%eax
add    $0x14,%eax
cmp    $0x14,%eax
jne    1130 <main+0x20>
mov    %r13,%rdi
mov    $0xaf286bcb,%eax
imul   %rax,%rdi
mov    %r13,%rsi
mov    $0xf0f0f0f1,%eax
imul   %rax,%rsi
mov    $0x88888889,%eax
imul   %rax,%r13
mov    %edx,%eax
sub    %ebp,%eax
lea    (%rbx,%rbx,2),%ebp
lea    (%rbx,%rbp,4),%ebp
neg    %ebp
add    %r15d,%ecx
add    $0x14,%ecx
cmp    $0x14,%ecx
jne    1130 <main+0x20>
shr    $0x20,%rdi
shr    $0x24,%rsi
shr    $0x23,%r13
add    %eax,%edx
lea    (%r15,%rbp,1),%eax
add    $0x14,%eax
cmp    $0x14,%eax
jne    1130 <main+0x20>
mov    %r15d,%ebx
sub    %edi,%ebx
mov    %esi,%eax
shl    $0x4,%eax
lea    0x0(%r13,%r13,4),%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
add    %r15d,%edx
add    $0x14,%edx
cmp    $0x14,%edx
jne    1130 <main+0x20>
shr    %ebx
shr    $0x22,%r8
add    %eax,%esi
mov    %r15d,%eax
and    $0xc,%eax
add    %r15d,%ecx
add    $0x14,%ecx
cmp    $0x14,%ecx
jne    1130 <main+0x20>
add    %edi,%ebx
add    %r8d,%r8d
neg    %esi
test   %eax,%eax
jne    1130 <main+0x20>
shr    $0x4,%ebx
shr    $0x24,%r9
lea    (%r8,%r8,8),%eax
neg    %eax
lea    (%r15,%rsi,1),%ecx
add    $0x14,%ecx
cmp    $0x14,%ecx
jne    1130 <main+0x20>
lea    (%rbx,%rbx,8),%ecx
lea    (%rbx,%rcx,2),%ecx
neg    %ecx
shl    $0x2,%r9d
add    %r15d,%eax
add    $0x14,%eax
cmp    $0x14,%eax
jne    1130 <main+0x20>
lea    (%r9,%r9,4),%edx
mov    %r15d,%eax
sub    %edx,%eax
add    %r15d,%ecx
add    $0x14,%ecx
cmp    $0x14,%ecx
jne    1130 <main+0x20>
test   %eax,%eax
jne    1130 <main+0x20>
lea    0xc88(%rip),%rdi
mov    %r15d,%esi
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 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 20, i32* %2
store i32 20, i32* %3
store i32 0, i32* %4
br label %6
6: ; preds = %40, %0
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %41
9: ; preds = %6
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
store i32 2, i32* %5
br label %12
12: ; preds = %31, %9
%13 = load i32, i32* %5
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
%16 = icmp sle i32 %13, %15
br i1 %16, label %17, label %34
17: ; preds = %12
%18 = load i32, i32* %5
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
%21 = icmp eq i32 %18, %20
br i1 %21, label %22, label %23
22: ; preds = %17
store i32 1, i32* %4
br label %30
23: ; preds = %17
%24 = load i32, i32* %2
%25 = load i32, i32* %5
%26 = srem i32 %24, %25
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %23
br label %31
29: ; preds = %23
br label %34
30: ; preds = %22
br label %31
31: ; preds = %30, %28
%32 = load i32, i32* %5
%33 = add nsw i32 %32, 1
store i32 %33, i32* %5
br label %12
34: ; preds = %29, %12
%35 = load i32, i32* %4
%36 = icmp eq i32 %35, 0
br i1 %36, label %37, label %40
37: ; preds = %34
%38 = load i32, i32* %2
%39 = add nsw i32 %38, 20
store i32 %39, i32* %2
br label %40
40: ; preds = %37, %34
br label %6
41: ; preds = %6
%42 = load i32, i32* %2
%43 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %42)
ret i32 0
}

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