#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 i, j, k;
  i = 2520;
  for (;;) {
    i++;
    k = 0;
    for (j = 2; j <= 20; j++) {
      k = k + (i % j);
    }
    if (k == 0) {
      printf("%d", i);
      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   $0x9d8,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x2,-0x18(%rbp)
cmpl   $0x14,-0x18(%rbp)
jg     1171 <main+0x61>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
cltd
idivl  -0x18(%rbp)
mov    -0x20(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1144 <main+0x34>
cmpl   $0x0,-0x1c(%rbp)
jne    1192 <main+0x82>
mov    -0x14(%rbp),%esi
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    112d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x9d8,%esi
mov    $0xffff7622,%r13d
mov    $0x9d9,%r10d
mov    $0x92492493,%r11d
mov    $0xaaaaaaab,%r14d
mov    $0xba2e8ba3,%r15d
mov    $0xcccccccd,%r12d
movdqa 0xeb4(%rip),%xmm0
nopl   0x0(%rax)
mov    %r10d,%ebp
imul   $0x38e38e39,%rbp,%r9
mov    %rbp,%rdx
mov    %rbp,%rbx
mov    %rbp,%rax
mov    $0xaf286bcb,%ecx
imul   %rcx,%rax
shr    $0x20,%rax
mov    %r10d,%r8d
sub    %eax,%r8d
shr    %r8d
add    %eax,%r8d
shr    $0x4,%r8d
lea    (%r8,%r8,8),%eax
lea    (%r8,%rax,2),%eax
add    %r13d,%eax
mov    %r9,%rdi
shr    $0x22,%rdi
lea    (%rdi,%rdi,8),%edi
lea    (%rax,%rdi,2),%eax
mov    $0xf0f0f0f1,%ecx
imul   %rcx,%rdx
shr    $0x24,%rdx
mov    %edx,%edi
shl    $0x4,%edi
add    %edx,%edi
imul   $0x4ec4ec4f,%rbp,%rcx
add    %eax,%edi
mov    $0x88888889,%eax
imul   %rax,%rbx
shr    $0x23,%rbx
lea    (%rbx,%rbx,4),%eax
lea    (%rax,%rax,2),%eax
add    %edi,%eax
mov    %r10d,%edx
shr    %edx
imul   %r11,%rdx
shr    $0x22,%rdx
mov    %edx,%edi
shl    $0x4,%edi
sub    %edx,%edi
sub    %edx,%edi
mov    %rbp,%rdx
add    %eax,%edi
shr    $0x22,%rcx
lea    (%rcx,%rcx,2),%eax
lea    (%rcx,%rax,4),%eax
mov    %rbp,%rcx
add    %edi,%eax
imul   %r14,%rdx
mov    %rdx,%rdi
shr    $0x23,%rdi
lea    (%rdi,%rdi,2),%edi
lea    (%rax,%rdi,4),%eax
imul   %r15,%rcx
shr    $0x23,%rcx
lea    (%rcx,%rcx,4),%edi
lea    (%rcx,%rdi,2),%ecx
mov    %rbp,%rbx
add    %eax,%ecx
imul   %r12,%rbx
mov    %rbx,%rax
shr    $0x23,%rax
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
imul   $0x24924925,%rbp,%rcx
shr    $0x21,%r9
lea    (%r9,%r9,8),%edi
add    %eax,%edi
shr    $0x20,%rcx
mov    %r10d,%eax
sub    %ecx,%eax
shr    %eax
add    %ecx,%eax
shr    $0x2,%eax
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
add    %edi,%ecx
mov    %rdx,%rax
shr    $0x22,%rax
lea    (%rax,%rax,2),%eax
lea    (%rcx,%rax,2),%eax
add    $0x1,%esi
shr    $0x22,%rbx
lea    (%rbx,%rbx,4),%ecx
add    %eax,%ecx
shr    $0x21,%rdx
lea    (%rdx,%rdx,2),%eax
add    %ecx,%eax
movd   %esi,%xmm1
pshufd $0x0,%xmm1,%xmm1
pand   %xmm0,%xmm1
pshufd $0xee,%xmm1,%xmm2
paddd  %xmm1,%xmm2
pshufd $0x55,%xmm2,%xmm1
paddd  %xmm2,%xmm1
movd   %xmm1,%ecx
sub    %ecx,%eax
mov    %rsi,%rcx
imul   %r12,%rcx
shr    $0x24,%rcx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
mov    %esi,%edx
sub    %ecx,%edx
add    $0xfffffff2,%r13d
add    $0x1,%r10d
cmp    %edx,%eax
jne    1150 <main+0x40>
lea    0xd48(%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 = [3 x i8] c"%d\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 2520, i32* %6
br label %9
9: ; preds = %30, %2
%10 = load i32, i32* %6
%11 = add nsw i32 %10, 1
store i32 %11, i32* %6
store i32 0, i32* %8
store i32 2, i32* %7
br label %12
12: ; preds = %21, %9
%13 = load i32, i32* %7
%14 = icmp sle i32 %13, 20
br i1 %14, label %15, label %24
15: ; preds = %12
%16 = load i32, i32* %8
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = srem i32 %17, %18
%20 = add nsw i32 %16, %19
store i32 %20, i32* %8
br label %21
21: ; preds = %15
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
store i32 %23, i32* %7
br label %12
24: ; preds = %12
%25 = load i32, i32* %8
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %30
27: ; preds = %24
%28 = load i32, i32* %6
%29 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %28)
ret i32 0
30: ; preds = %24
br label %9
}

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