#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 *, unsigned long);
int main() {
  unsigned long t;
  int mod;
  for (t = 20; t < -1; t += 20) {
    for (mod = 3; mod < 20; mod++) {
      if ((t % mod) != 0) {
        break;
      } else if (mod == 19) {
        printf("%ld", t);
        return 0;
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x14,-0x10(%rbp)
cmpq   $0xffffffffffffffff,-0x10(%rbp)
jae    11b3 <main+0xa3>
movl   $0x3,-0x14(%rbp)
cmpl   $0x14,-0x14(%rbp)
jge    119d <main+0x8d>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
xor    %edx,%edx
div    %rcx
cmp    $0x0,%rdx
je     115f <main+0x4f>
jmp    119d <main+0x8d>
cmpl   $0x13,-0x14(%rbp)
jne    1185 <main+0x75>
mov    -0x10(%rbp),%rsi
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11ba <main+0xaa>
jmp    118a <main+0x7a>
jmp    118f <main+0x7f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1139 <main+0x29>
jmp    11a2 <main+0x92>
mov    -0x10(%rbp),%rax
add    $0x14,%rax
mov    %rax,-0x10(%rbp)
jmp    1127 <main+0x17>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%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,%ebp
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbp,%rax
movabs $0xd79435e50d79435f,%rcx
35 94 d7
mul    %rcx
mov    %rdx,%r13
mov    %rbp,%rax
movabs $0xe38e38e38e38e38f,%rcx
38 8e e3
mul    %rcx
mov    %rdx,%r9
mov    %rbp,%rax
movabs $0xf0f0f0f0f0f0f0f1,%rcx
f0 f0 f0
mul    %rcx
mov    %rdx,%r11
mov    %rbp,%rax
movabs $0x8888888888888889,%rcx
88 88 88
mul    %rcx
mov    %rdx,%r10
mov    %rdi,%rsi
mov    %rbp,%rax
shr    %rax
movabs $0x4924924924924925,%rcx
92 24 49
mul    %rcx
mov    %rdx,%r12
mov    %rbp,%rax
movabs $0x4ec4ec4ec4ec4ec5,%rcx
ec c4 4e
mul    %rcx
mov    %rdx,%r14
mov    %rbp,%rax
movabs $0xaaaaaaaaaaaaaaab,%rcx
aa aa aa
mul    %rcx
mov    %rdx,%r8
mov    %rbp,%rax
movabs $0x2e8ba2e8ba2e8ba3,%rcx
a2 8b 2e
mul    %rcx
mov    %rdx,%r15
mov    %rbp,%rax
movabs $0xcccccccccccccccd,%rcx
cc cc cc
mul    %rcx
mov    %rdx,%rbx
mov    %rbp,%rax
movabs $0x2492492492492493,%rcx
49 92 24
mul    %rcx
mov    %rbp,%rcx
sub    %rdx,%rcx
shr    %rcx
add    %rdx,%rcx
shr    $0x2,%rcx
lea    0x0(,%rcx,8),%rax
sub    %rcx,%rax
mov    %r8,%rdx
shr    $0x2,%rdx
mov    %rbx,%rcx
shr    $0x2,%rcx
lea    (%rcx,%rcx,4),%rcx
mov    %r8,%rdi
shr    %rdi
lea    (%rdi,%rdi,2),%rdi
neg    %rdi
add    %rsi,%rdi
add    $0x14,%rdi
neg    %rcx
add    %rsi,%rcx
add    $0x14,%rcx
add    $0x14,%rbp
or     %rdi,%rcx
lea    0x14(%rsi),%rdi
jne    1130 <main+0x20>
add    $0xffffffffffffffec,%rax
lea    (%rdx,%rdx,2),%rcx
add    %rcx,%rcx
add    $0xffffffffffffffec,%rcx
cmp    %rsi,%rcx
jne    1130 <main+0x20>
mov    %edi,%edx
and    $0x4,%edx
cmp    %rsi,%rax
jne    1130 <main+0x20>
mov    %r9,%rax
shr    $0x3,%rax
test   %rdx,%rdx
jne    1130 <main+0x20>
shr    %r12
shr    $0x3,%rbx
lea    (%rax,%rax,8),%rax
add    $0xffffffffffffffec,%rax
cmp    %rsi,%rax
jne    1130 <main+0x20>
mov    %r12,%rax
shl    $0x4,%rax
shr    %r15
lea    (%rbx,%rbx,4),%rcx
add    %rcx,%rcx
add    $0xffffffffffffffec,%rcx
cmp    %rsi,%rcx
jne    1130 <main+0x20>
sub    %r12,%rax
shr    $0x3,%r8
lea    (%r15,%r15,4),%rcx
lea    (%r15,%rcx,2),%rcx
add    $0xffffffffffffffec,%rcx
cmp    %rsi,%rcx
jne    1130 <main+0x20>
sub    %r12,%rax
shr    $0x2,%r14
lea    (%r8,%r8,2),%rcx
lea    -0x14(,%rcx,4),%rcx
ff
cmp    %rsi,%rcx
jne    1130 <main+0x20>
add    $0xffffffffffffffec,%rax
lea    (%r14,%r14,2),%rcx
lea    (%r14,%rcx,4),%rcx
add    $0xffffffffffffffec,%rcx
cmp    %rsi,%rcx
jne    1130 <main+0x20>
shr    $0x3,%r10
cmp    %rsi,%rax
jne    1130 <main+0x20>
shr    $0x4,%r11
mov    %edi,%eax
and    $0xc,%eax
lea    (%r10,%r10,4),%rcx
lea    (%rcx,%rcx,2),%rcx
add    $0xffffffffffffffec,%rcx
cmp    %rsi,%rcx
jne    1130 <main+0x20>
mov    %r11,%rdx
shl    $0x4,%rdx
test   %rax,%rax
jne    1130 <main+0x20>
shr    $0x4,%r9
lea    (%r11,%rdx,1),%rax
add    $0xffffffffffffffec,%rax
cmp    %rsi,%rax
jne    1130 <main+0x20>
shr    $0x4,%r13
lea    (%r9,%r9,8),%rax
add    %rax,%rax
add    $0xffffffffffffffec,%rax
cmp    %rsi,%rax
jne    1130 <main+0x20>
lea    0x0(,%r13,8),%rax
add    %r13,%rax
lea    -0x14(,%rax,2),%rax
ff
add    %r13,%rax
cmp    %rsi,%rax
jne    1130 <main+0x20>
mov    %rdi,%rsi
lea    0xc65(%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 = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i32
store i32 0, i32* %1
store i64 20, i64* %2
br label %4
4: ; preds = %30, %0
%5 = load i64, i64* %2
%6 = icmp ult i64 %5, -1
br i1 %6, label %7, label %33
7: ; preds = %4
store i32 3, i32* %3
br label %8
8: ; preds = %26, %7
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 20
br i1 %10, label %11, label %29
11: ; preds = %8
%12 = load i64, i64* %2
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = urem i64 %12, %14
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %11
br label %29
18: ; preds = %11
%19 = load i32, i32* %3
%20 = icmp eq i32 %19, 19
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = load i64, i64* %2
%23 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %22)
store i32 0, i32* %1
br label %34
24: ; preds = %18
br label %25
25: ; preds = %24
br label %26
26: ; preds = %25
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 1
store i32 %28, i32* %3
br label %8
29: ; preds = %17, %8
br label %30
30: ; preds = %29
%31 = load i64, i64* %2
%32 = add i64 %31, 20
store i64 %32, i64* %2
br label %4
33: ; preds = %4
store i32 0, i32* %1
br label %34
34: ; preds = %33, %21
%35 = load i32, i32* %1
ret i32 %35
}

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