#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 short);
int main(int argc, char *argv[]) {
  register unsigned short int i;
  for (i = 1; i < 1716; i++) {
    if (i % 13 == 12 && i % 12 == 4 && i % 11 == 10) {
      printf("%u\n", i);
      return 0;
    }
  }
  return 1;
}


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)
movw   $0x1,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
cmp    $0x6b4,%eax
jge    11ac <main+0x9c>
movzwl -0x12(%rbp),%eax
mov    $0xd,%ecx
cltd
idiv   %ecx
cmp    $0xc,%edx
jne    1196 <main+0x86>
movzwl -0x12(%rbp),%eax
mov    $0xc,%ecx
cltd
idiv   %ecx
cmp    $0x4,%edx
jne    1196 <main+0x86>
movzwl -0x12(%rbp),%eax
mov    $0xb,%ecx
cltd
idiv   %ecx
cmp    $0xa,%edx
jne    1196 <main+0x86>
lea    0xe7f(%rip),%rdi
movzwl -0x12(%rbp),%esi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11b3 <main+0xa3>
jmp    119b <main+0x8b>
mov    -0x12(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x12(%rbp)
jmp    112c <main+0x1c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%ax
jmp    112e <main+0x1e>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%eax
movzwl %ax,%ecx
cmp    $0x6b4,%ecx
je     1196 <main+0x86>
movzwl %ax,%esi
imul   $0x4ec5,%esi,%ecx
shr    $0x12,%ecx
lea    (%rcx,%rcx,2),%edx
lea    (%rcx,%rdx,4),%ecx
mov    %eax,%edx
sub    %ecx,%edx
cmp    $0xc,%dx
jne    1120 <main+0x10>
imul   $0xaaab,%esi,%ecx
shr    $0x11,%ecx
and    $0xfffffffc,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
add    %eax,%ecx
add    $0xfffffffd,%ecx
cmp    $0x1,%cx
jne    1120 <main+0x10>
imul   $0xba2f,%esi,%ecx
shr    $0x13,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,2),%ecx
neg    %ecx
add    %eax,%ecx
add    $0xfffffff7,%ecx
cmp    $0x1,%cx
jne    1120 <main+0x10>
push   %rax
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %15
%4 = phi i16 [ 1, %2 ], [ %16, %15 ]
%5 = urem i16 %4, 13
%6 = icmp eq i16 %5, 12
%7 = urem i16 %4, 12
%8 = icmp eq i16 %7, 4
%9 = and i1 %6, %8
%10 = urem i16 %4, 11
%11 = icmp eq i16 %10, 10
%12 = select i1 %9, i1 %11, i1 false
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16 zeroext %4)
br label %18
15: ; preds = %3
%16 = add nuw nsw i16 %4, 1
%17 = icmp eq i16 %16, 1716
br i1 %17, label %18, label %3
18: ; preds = %15, %13
%19 = phi i32 [ 0, %13 ], [ 1, %15 ]
ret i32 %19
}