#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 EXIT_SUCCESS;
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 if i = %d \n", i);
    if (i + 90 == i * i) {
      break;
    }
  }
  printf("The Answer is %d. \n", i);
  int n = 0;
  do {
    printf("%d. Sam is cool \n", n);
    n++;
  } while (n < 12);
  return EXIT_SUCCESS;
}


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    0xe7f(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0xc,-0x18(%rbp)
jl     11a2 <main+0x92>
mov    0x2e15(%rip),%rax
mov    (%rax),%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    0xeb4(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0xeba(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
call   1030 <printf@plt>
mov    0x2dd1(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [21 x i8] c"Checking if i = %d \0A\00"
@.str.1 = [20 x i8] c"The Answer is %d. \0A\00"
@.str.2 = [18 x i8] c"%d. Sam is cool \0A\00"
@EXIT_SUCCESS = global i32 0
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 ([21 x i8], [21 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 ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%19 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 0)
%20 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 1)
%21 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 2)
%22 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 3)
%23 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 4)
%24 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 5)
%25 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 6)
%26 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 7)
%27 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 8)
%28 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 9)
%29 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 10)
%30 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 11)
%31 = load i32, i32* @EXIT_SUCCESS
ret i32 %31
}