#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 i;
  int j;
  for (i = 20;; i += 20) {
    for (j = 1; j <= 20; j++) {
      if (!(i % j))
        continue;
      else
        break;
    }
    if (j > 20) {
      printf("answer: %d\n", i);
      return 0;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x14,-0xc(%rbp)
jg     115f <main+0x4f>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    114c <main+0x3c>
jmp    1151 <main+0x41>
jmp    115f <main+0x4f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
cmpl   $0x14,-0xc(%rbp)
jle    1180 <main+0x70>
mov    -0x8(%rbp),%esi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret
jmp    1185 <main+0x75>
mov    -0x8(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x14,%r12d
xor    %esi,%esi
mov    $0xba2e8ba3,%r15d
nopl   0x0(%rax)
mov    %r12d,%r11d
mov    %esi,%r10d
mov    %r12d,%r9d
lea    0x14(%r10),%esi
mov    %r12d,%edx
shr    %edx
mov    %r9,%r14
mov    $0xaaaaaaab,%eax
imul   %rax,%r14
imul   $0x24924925,%r9,%rcx
shr    $0x20,%rcx
mov    %r12d,%edi
sub    %ecx,%edi
shr    %edi
add    %ecx,%edi
shr    $0x2,%edi
lea    0x0(,%rdi,8),%ecx
sub    %edi,%ecx
add    $0xffffffec,%ecx
mov    %r14,%rdi
shr    $0x22,%rdi
add    %edi,%edi
lea    (%rdi,%rdi,2),%edi
mov    %r14,%rax
shr    $0x21,%rax
lea    (%rax,%rax,2),%eax
neg    %eax
add    %r10d,%eax
add    $0x14,%eax
neg    %edi
add    %r10d,%edi
add    $0x14,%edi
lea    0x14(%r11),%r12d
or     %eax,%edi
jne    1130 <main+0x20>
mov    $0x92492493,%eax
imul   %rax,%rdx
imul   $0x38e38e39,%r9,%r13
mov    %esi,%ebp
and    $0x4,%ebp
cmp    %r10d,%ecx
jne    1130 <main+0x20>
shr    $0x22,%rdx
mov    %r9,%rbx
imul   %r15,%rbx
mov    %r13,%rdi
shr    $0x21,%rdi
test   %ebp,%ebp
jne    1130 <main+0x20>
mov    %edx,%ecx
shl    $0x4,%ecx
shr    $0x23,%rbx
lea    (%rdi,%rdi,8),%eax
add    $0xffffffec,%eax
cmp    %r10d,%eax
jne    1130 <main+0x20>
sub    %edx,%ecx
imul   $0x4ec4ec4f,%r9,%r8
shr    $0x23,%r14
lea    (%rbx,%rbx,4),%eax
lea    (%rbx,%rax,2),%eax
add    $0xffffffec,%eax
cmp    %r10d,%eax
jne    1130 <main+0x20>
sub    %edx,%ecx
shr    $0x22,%r8
lea    (%r14,%r14,2),%eax
lea    -0x14(,%rax,4),%eax
cmp    %r10d,%eax
jne    1130 <main+0x20>
mov    %r9,%rax
mov    $0xaf286bcb,%edx
imul   %rdx,%rax
mov    %r9,%rdx
mov    $0x88888889,%edi
imul   %rdi,%rdx
add    $0xffffffec,%ecx
lea    (%r8,%r8,2),%edi
lea    (%r8,%rdi,4),%edi
add    $0xffffffec,%edi
cmp    %r10d,%edi
jne    1130 <main+0x20>
shr    $0x20,%rax
mov    $0xf0f0f0f1,%edi
imul   %rdi,%r9
shr    $0x23,%rdx
cmp    %r10d,%ecx
jne    1130 <main+0x20>
sub    %eax,%r11d
shr    $0x24,%r9
lea    (%rdx,%rdx,4),%ecx
lea    (%rcx,%rcx,2),%ecx
add    $0xffffffec,%ecx
mov    %esi,%edx
and    $0xc,%edx
cmp    %r10d,%ecx
jne    1130 <main+0x20>
shr    %r11d
mov    %r9d,%ecx
shl    $0x4,%ecx
test   %edx,%edx
jne    1130 <main+0x20>
add    %eax,%r11d
shr    $0x22,%r13
lea    (%r9,%rcx,1),%eax
add    $0xffffffec,%eax
cmp    %r10d,%eax
jne    1130 <main+0x20>
shr    $0x4,%r11d
lea    0x0(%r13,%r13,8),%eax
add    %eax,%eax
add    $0xffffffec,%eax
cmp    %r10d,%eax
jne    1130 <main+0x20>
lea    (%r11,%r11,8),%eax
lea    (%r11,%rax,2),%eax
add    $0xffffffec,%eax
cmp    %r10d,%eax
jne    1130 <main+0x20>
lea    0xd17(%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 = [12 x i8] c"answer: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 20, i32* %2
br label %4
4: ; preds = %25, %0
store i32 1, i32* %3
br label %5
5: ; preds = %15, %4
%6 = load i32, i32* %3
%7 = icmp sle i32 %6, 20
br i1 %7, label %8, label %18
8: ; preds = %5
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = srem i32 %9, %10
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %8
br label %15
14: ; preds = %8
br label %18
15: ; preds = %13
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %5
18: ; preds = %14, %5
%19 = load i32, i32* %3
%20 = icmp sgt i32 %19, 20
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = load i32, i32* %2
%23 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %22)
ret i32 0
24: ; preds = %18
br label %25
25: ; preds = %24
%26 = load i32, i32* %2
%27 = add nsw i32 %26, 20
store i32 %27, i32* %2
br label %4
}

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