#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 INT_MAX;
int /*<<< orphan*/ printf(char *, int);
void main(void) {
  int i, j;
  for (i = 2520; i < INT_MAX; ++i) {
    for (j = 1; j < 21; ++j) {
      if (i % j != 0)
        break;
      if (j == 20) {
        printf("%d\n", i);
        return;
      }
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x9d8,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ebf(%rip),%rcx
cmp    (%rcx),%eax
jge    119b <main+0x8b>
movl   $0x1,-0x8(%rbp)
cmpl   $0x15,-0x8(%rbp)
jge    1188 <main+0x78>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
je     1157 <main+0x47>
jmp    1188 <main+0x78>
cmpl   $0x14,-0x8(%rbp)
jne    1175 <main+0x65>
mov    -0x4(%rbp),%esi
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
jmp    119b <main+0x8b>
jmp    117a <main+0x6a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1138 <main+0x28>
jmp    118d <main+0x7d>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <main+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    0x2ec7(%rip),%rax
mov    (%rax),%r13d
cmp    $0x9d9,%r13d
jl     13d4 <main+0x2c4>
mov    $0x9d8,%esi
mov    $0xcccccccd,%r11d
mov    $0xaf286bcb,%r8d
mov    $0xf0f0f0f1,%r9d
mov    $0x88888889,%r10d
mov    $0x92492493,%r14d
mov    $0xaaaaaaab,%r12d
mov    $0xba2e8ba3,%r15d
jmp    117c <main+0x6c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%esi
cmp    %esi,%r13d
je     13d4 <main+0x2c4>
mov    %esi,%edi
mov    %rdi,%rbx
imul   %r12,%rbx
mov    %rbx,%rcx
shr    $0x21,%rcx
lea    (%rcx,%rcx,2),%ecx
mov    %esi,%edx
and    $0x1,%edx
mov    %esi,%ebp
sub    %ecx,%ebp
or     %edx,%ebp
jne    1170 <main+0x60>
mov    %esi,%ecx
and    $0x3,%ecx
jne    1170 <main+0x60>
mov    %rdi,%rdx
imul   %r11,%rdx
mov    %rdx,%rcx
shr    $0x22,%rcx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
add    %esi,%ecx
add    $0x9d8,%ecx
cmp    $0x9d8,%ecx
jne    1170 <main+0x60>
mov    %rbx,%rcx
shr    $0x22,%rcx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
add    %esi,%ecx
add    $0x9d8,%ecx
cmp    $0x9d8,%ecx
jne    1170 <main+0x60>
imul   $0x24924925,%rdi,%rcx
shr    $0x20,%rcx
mov    %esi,%ebp
sub    %ecx,%ebp
shr    %ebp
add    %ecx,%ebp
shr    $0x2,%ebp
lea    0x0(,%rbp,8),%ecx
sub    %ecx,%ebp
lea    (%rsi,%rbp,1),%ecx
add    $0x9d8,%ecx
cmp    $0x9d8,%ecx
jne    1170 <main+0x60>
mov    %esi,%ecx
and    $0x7,%ecx
jne    1170 <main+0x60>
imul   $0x38e38e39,%rdi,%rbp
mov    %rbp,%rcx
shr    $0x21,%rcx
lea    (%rcx,%rcx,8),%ecx
neg    %ecx
add    %esi,%ecx
add    $0x9d8,%ecx
cmp    $0x9d8,%ecx
jne    1170 <main+0x60>
mov    %rdx,%rcx
shr    $0x23,%rcx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
add    %esi,%ecx
add    $0x9d8,%ecx
cmp    $0x9d8,%ecx
jne    1170 <main+0x60>
mov    %rdi,%rcx
imul   %r15,%rcx
shr    $0x23,%rcx
lea    (%rcx,%rcx,4),%eax
lea    (%rcx,%rax,2),%eax
neg    %eax
add    %esi,%eax
add    $0x9d8,%eax
cmp    $0x9d8,%eax
jne    1170 <main+0x60>
shr    $0x23,%rbx
shl    $0x2,%ebx
lea    (%rbx,%rbx,2),%eax
neg    %eax
add    %esi,%eax
add    $0x9d8,%eax
cmp    $0x9d8,%eax
jne    1170 <main+0x60>
imul   $0x4ec4ec4f,%rdi,%rax
shr    $0x22,%rax
lea    (%rax,%rax,2),%ecx
lea    (%rax,%rcx,4),%eax
neg    %eax
add    %esi,%eax
add    $0x9d8,%eax
cmp    $0x9d8,%eax
jne    1170 <main+0x60>
mov    %esi,%eax
shr    %eax
imul   %r14,%rax
shr    $0x22,%rax
mov    %eax,%ecx
shl    $0x4,%ecx
mov    %eax,%ebx
sub    %ecx,%ebx
add    %eax,%ebx
lea    (%rsi,%rbx,1),%eax
add    $0x9d8,%eax
cmp    $0x9d8,%eax
jne    1170 <main+0x60>
mov    %rdi,%rax
imul   %r10,%rax
shr    $0x23,%rax
lea    (%rax,%rax,4),%eax
lea    (%rax,%rax,2),%eax
neg    %eax
add    %esi,%eax
add    $0x9d8,%eax
cmp    $0x9d8,%eax
jne    1170 <main+0x60>
mov    %esi,%eax
and    $0xf,%eax
jne    1170 <main+0x60>
mov    %rdi,%rax
imul   %r9,%rax
shr    $0x24,%rax
mov    %eax,%ecx
shl    $0x4,%ecx
add    %eax,%ecx
neg    %ecx
lea    (%rsi,%rcx,1),%eax
add    $0x9d8,%eax
cmp    $0x9d8,%eax
jne    1170 <main+0x60>
shr    $0x22,%rbp
add    %ebp,%ebp
lea    0x0(%rbp,%rbp,8),%eax
neg    %eax
add    %esi,%eax
add    $0x9d8,%eax
cmp    $0x9d8,%eax
jne    1170 <main+0x60>
imul   %r8,%rdi
shr    $0x20,%rdi
mov    %esi,%eax
sub    %edi,%eax
shr    %eax
add    %edi,%eax
shr    $0x4,%eax
lea    (%rax,%rax,8),%ecx
lea    (%rax,%rcx,2),%eax
neg    %eax
add    %esi,%eax
add    $0x9d8,%eax
cmp    $0x9d8,%eax
jne    1170 <main+0x60>
shr    $0x24,%rdx
shl    $0x2,%edx
lea    (%rdx,%rdx,4),%eax
neg    %eax
add    %esi,%eax
add    $0x9d8,%eax
cmp    $0x9d8,%eax
jne    1170 <main+0x60>
lea    0xc3b(%rip),%rdi
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <printf@plt>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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