int euler_problem_5() {
  int i;
  for (i = 2520;; i += 20) {
    if (i % 11 == 0 && i % 12 == 0 && i % 13 == 0 && i % 14 == 0 &&
        i % 15 == 0 && i % 16 == 0 && i % 17 == 0 && i % 18 == 0 &&
        i % 19 == 0) {
      return i;
    }
  }
}


x86 assembly (clang, -O0):
<euler_problem_5>:
push   %rbp
mov    %rsp,%rbp
movl   $0x9d8,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xb,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11c4 <euler_problem_5+0xc4>
mov    -0x4(%rbp),%eax
mov    $0xc,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11c4 <euler_problem_5+0xc4>
mov    -0x4(%rbp),%eax
mov    $0xd,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11c4 <euler_problem_5+0xc4>
mov    -0x4(%rbp),%eax
mov    $0xe,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11c4 <euler_problem_5+0xc4>
mov    -0x4(%rbp),%eax
mov    $0xf,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11c4 <euler_problem_5+0xc4>
mov    -0x4(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11c4 <euler_problem_5+0xc4>
mov    -0x4(%rbp),%eax
mov    $0x11,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11c4 <euler_problem_5+0xc4>
mov    -0x4(%rbp),%eax
mov    $0x12,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11c4 <euler_problem_5+0xc4>
mov    -0x4(%rbp),%eax
mov    $0x13,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11c4 <euler_problem_5+0xc4>
mov    -0x4(%rbp),%eax
pop    %rbp
ret
jmp    11c9 <euler_problem_5+0xc9>
mov    -0x4(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <euler_problem_5+0xb>

x86 assembly (clang, -O2):
<euler_problem_5>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    $0x9d8,%r12d
mov    $0x9c4,%eax
mov    $0x92492493,%r11d
mov    $0xaaaaaaab,%r14d
mov    $0xba2e8ba3,%r15d
nopw   0x0(%rax,%rax,1)
mov    %r12d,%edx
mov    %eax,%r9d
mov    %r12d,%ecx
mov    %rcx,%r13
mov    $0xaf286bcb,%eax
imul   %rax,%r13
mov    %rcx,%rbx
mov    $0xf0f0f0f1,%eax
imul   %rax,%rbx
mov    %rcx,%r10
mov    $0x88888889,%eax
imul   %rax,%r10
mov    %r12d,%edi
shr    %edi
imul   %r11,%rdi
shr    $0x22,%rdi
mov    %edi,%eax
shl    $0x4,%eax
imul   $0x4ec4ec4f,%rcx,%rsi
shr    $0x22,%rsi
lea    (%rsi,%rsi,2),%ebp
lea    (%rsi,%rbp,4),%r8d
mov    %rcx,%rsi
imul   %r15,%rsi
shr    $0x23,%rsi
lea    (%rsi,%rsi,4),%ebp
lea    (%rsi,%rbp,2),%ebp
mov    %edi,%esi
sub    %eax,%esi
mov    %rcx,%rax
imul   %r14,%rax
shr    $0x23,%rax
shl    $0x2,%eax
lea    (%rax,%rax,2),%eax
neg    %ebp
add    %r9d,%ebp
add    $0x14,%ebp
neg    %eax
add    %r9d,%eax
add    $0x14,%eax
neg    %r8d
or     %ebp,%eax
lea    0x14(%r9),%eax
lea    0x14(%rdx),%r12d
jne    1130 <euler_problem_5+0x30>
shr    $0x20,%r13
shr    $0x24,%rbx
shr    $0x23,%r10
add    %esi,%edi
lea    (%r9,%r8,1),%esi
add    $0x9d8,%esi
cmp    $0x9c4,%esi
jne    1130 <euler_problem_5+0x30>
sub    %r13d,%edx
imul   $0x38e38e39,%rcx,%rcx
mov    %ebx,%esi
shl    $0x4,%esi
lea    (%r10,%r10,4),%ebp
lea    0x0(%rbp,%rbp,2),%ebp
neg    %ebp
add    %r9d,%edi
add    $0x9d8,%edi
cmp    $0x9c4,%edi
jne    1130 <euler_problem_5+0x30>
shr    %edx
shr    $0x22,%rcx
add    %esi,%ebx
mov    %eax,%esi
and    $0xc,%esi
lea    (%r9,%rbp,1),%edi
add    $0x9d8,%edi
cmp    $0x9c4,%edi
jne    1130 <euler_problem_5+0x30>
add    %r13d,%edx
add    %ecx,%ecx
neg    %ebx
test   %esi,%esi
jne    1130 <euler_problem_5+0x30>
shr    $0x4,%edx
lea    (%rcx,%rcx,8),%ecx
neg    %ecx
lea    (%r9,%rbx,1),%esi
add    $0x9d8,%esi
cmp    $0x9c4,%esi
jne    1130 <euler_problem_5+0x30>
lea    (%rdx,%rdx,8),%esi
lea    (%rdx,%rsi,2),%edx
neg    %edx
add    %r9d,%ecx
add    $0x9d8,%ecx
cmp    $0x9c4,%ecx
jne    1130 <euler_problem_5+0x30>
lea    (%r9,%rdx,1),%ecx
add    $0x9d8,%ecx
cmp    $0x9c4,%ecx
jne    1130 <euler_problem_5+0x30>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @euler_problem_5() {
%1 = alloca i32
store i32 2520, i32* %1
br label %2
2: ; preds = %41, %0
%3 = load i32, i32* %1
%4 = srem i32 %3, 11
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %40
6: ; preds = %2
%7 = load i32, i32* %1
%8 = srem i32 %7, 12
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %40
10: ; preds = %6
%11 = load i32, i32* %1
%12 = srem i32 %11, 13
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %40
14: ; preds = %10
%15 = load i32, i32* %1
%16 = srem i32 %15, 14
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %40
18: ; preds = %14
%19 = load i32, i32* %1
%20 = srem i32 %19, 15
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %40
22: ; preds = %18
%23 = load i32, i32* %1
%24 = srem i32 %23, 16
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %40
26: ; preds = %22
%27 = load i32, i32* %1
%28 = srem i32 %27, 17
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %40
30: ; preds = %26
%31 = load i32, i32* %1
%32 = srem i32 %31, 18
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %40
34: ; preds = %30
%35 = load i32, i32* %1
%36 = srem i32 %35, 19
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %34
%39 = load i32, i32* %1
ret i32 %39
40: ; preds = %34, %30, %26, %22, %18, %14, %10, %6, %2
br label %41
41: ; preds = %40
%42 = load i32, i32* %1
%43 = add nsw i32 %42, 20
store i32 %43, i32* %1
br label %2
}

LLVM IR (-O2):
define i32 @euler_problem_5() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 2520, %0 ], [ %28, %1 ]
%3 = urem i32 %2, 11
%4 = urem i32 %2, 12
%5 = or i32 %3, %4
%6 = icmp eq i32 %5, 0
%7 = urem i32 %2, 13
%8 = icmp eq i32 %7, 0
%9 = select i1 %6, i1 %8, i1 false
%10 = urem i32 %2, 14
%11 = icmp eq i32 %10, 0
%12 = select i1 %9, i1 %11, i1 false
%13 = urem i32 %2, 15
%14 = icmp eq i32 %13, 0
%15 = select i1 %12, i1 %14, i1 false
%16 = and i32 %2, 12
%17 = icmp eq i32 %16, 0
%18 = select i1 %15, i1 %17, i1 false
%19 = urem i32 %2, 17
%20 = icmp eq i32 %19, 0
%21 = select i1 %18, i1 %20, i1 false
%22 = urem i32 %2, 18
%23 = icmp eq i32 %22, 0
%24 = select i1 %21, i1 %23, i1 false
%25 = urem i32 %2, 19
%26 = icmp eq i32 %25, 0
%27 = select i1 %24, i1 %26, i1 false
%28 = add nuw nsw i32 %2, 20
br i1 %27, label %29, label %1
29: ; preds = %1
ret i32 %2
}