#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 main() {
  int i, j = 0;
  printf("---------------------------------------\n");
  while (++i) {
    j += 1;
    if (i == 100) {
      printf("i == 100\n");
      break;
    }
    if (i == 50) {
      printf("i == 50\n");
      continue;
    }
    if (i > 10) {
      if (j == 30) {
        printf("j == 20\n");
        continue;
      }
      printf("--> i == %d  j == %d \n", i, j);
      if (j == 60)
        break;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     11dd <main+0xcd>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x64,-0x8(%rbp)
jne    116c <main+0x5c>
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11dd <main+0xcd>
cmpl   $0x32,-0x8(%rbp)
jne    1189 <main+0x79>
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1134 <main+0x24>
cmpl   $0xa,-0x8(%rbp)
jle    11d8 <main+0xc8>
cmpl   $0x1e,-0xc(%rbp)
jne    11b0 <main+0xa0>
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1134 <main+0x24>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x3c,-0xc(%rbp)
jne    11d3 <main+0xc3>
jmp    11dd <main+0xcd>
jmp    11d8 <main+0xc8>
jmp    1134 <main+0x24>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0c(%rip),%r15
lea    0xefd(%rip),%r12
lea    0xeb7(%rip),%r14
xor    %ebx,%ebx
jmp    1163 <main+0x43>
nopl   (%rax)
mov    %r15,%rdi
mov    $0x32,%ebp
call   1030 <puts@plt>
mov    %ebp,%eax
inc    %ebp
je     11a7 <main+0x87>
add    $0x1,%ebx
cmp    $0x31,%eax
je     1150 <main+0x30>
cmp    $0x63,%eax
je     119b <main+0x7b>
cmp    $0xa,%eax
jl     115d <main+0x3d>
mov    $0x1e,%eax
cmp    $0x1e,%ebx
jne    1186 <main+0x66>
mov    %r12,%rdi
mov    %eax,%ebx
jmp    1158 <main+0x38>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x3c,%ebx
jne    115d <main+0x3d>
jmp    11a7 <main+0x87>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str.4 = [23 x i8] c"--> i == %d j == %d \0A\00"
@str = [40 x i8] c"---------------------------------------\00"
@str.5 = [8 x i8] c"j == 20\00"
@str.6 = [8 x i8] c"i == 50\00"
@str.7 = [9 x i8] c"i == 100\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %14
%3 = phi i32 [ %17, %14 ], [ undef, %0 ]
%4 = phi i32 [ %16, %14 ], [ 0, %0 ]
%5 = phi i32 [ %15, %14 ], [ undef, %0 ]
%6 = add nsw i32 %4, 1
switch i32 %5, label %19 [
i32 99, label %7
i32 49, label %9
]
7: ; preds = %2
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.7, i64 0, i64 0))
br label %26
9: ; preds = %2, %21
%10 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.5, i64 0, i64 0), %21 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.6, i64 0, i64 0), %2 ]
%11 = phi i32 [ %3, %21 ], [ 50, %2 ]
%12 = phi i32 [ 30, %21 ], [ %6, %2 ]
%13 = tail call i32 @puts(i8* dereferenceable(1) %10)
br label %14
14: ; preds = %9, %19, %23
%15 = phi i32 [ %3, %23 ], [ %3, %19 ], [ %11, %9 ]
%16 = phi i32 [ %6, %23 ], [ %6, %19 ], [ %12, %9 ]
%17 = add nsw i32 %15, 1
%18 = icmp eq i32 %17, 0
br i1 %18, label %26, label %2
19: ; preds = %2
%20 = icmp sgt i32 %5, 9
br i1 %20, label %21, label %14
21: ; preds = %19
%22 = icmp eq i32 %6, 30
br i1 %22, label %9, label %23
23: ; preds = %21
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %3, i32 %6)
%25 = icmp eq i32 %6, 60
br i1 %25, label %26, label %14
26: ; preds = %14, %23, %7
ret i32 0
}