#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, const char *argv[]) {
  int i;
  for (i = 0; i < 12; i++) {
    if (i % 3 == 0) {
      continue;
    }
    printf("checking i = %d\n", i);
    if (i + 90 == i * i) {
      break;
    }
  }
  printf("The answer is %d.\n", 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   $0x0,-0x14(%rbp)
cmpl   $0xc,-0x14(%rbp)
jge    118c <main+0x7c>
mov    -0x14(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1150 <main+0x40>
jmp    117e <main+0x6e>
mov    -0x14(%rbp),%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x5a,%eax
mov    -0x14(%rbp),%ecx
imul   -0x14(%rbp),%ecx
cmp    %ecx,%eax
jne    1179 <main+0x69>
jmp    118c <main+0x7c>
jmp    117e <main+0x6e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
mov    -0x14(%rbp),%esi
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
jmp    1128 <main+0x18>
nop
add    $0x1,%ebx
cmp    $0xc,%ebx
je     1155 <main+0x45>
movzbl %bl,%eax
imul   $0xab,%eax,%ecx
shr    $0x9,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
add    %cl,%al
je     1120 <main+0x10>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0x5a(%rbx),%eax
mov    %ebx,%ecx
imul   %ebx,%ecx
cmp    %ecx,%eax
jne    1120 <main+0x10>
jmp    115a <main+0x4a>
mov    $0xc,%ebx
lea    0xeb0(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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