#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*/ assert(int);
int main() {
  int i = 0;
  int j = 0;
  for (; i != 6; i = i * 2) {
    j = 1;
    if (i == 0) {
      i = 3;
      continue;
    }
    j = 2;
  }
  assert(i == 6);
  assert(j == 1);
  i = 0;
  j = 0;
  while (i != 6) {
    j = 1;
    if (i == 0) {
      i = 6;
      continue;
    }
    j = 2;
  }
  assert(i == 6);
  assert(j == 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x6,-0x8(%rbp)
je     1169 <main+0x59>
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1154 <main+0x44>
movl   $0x3,-0x8(%rbp)
jmp    115b <main+0x4b>
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
cmpl   $0x6,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x1,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x6,-0x8(%rbp)
je     11cc <main+0xbc>
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    11c0 <main+0xb0>
movl   $0x6,-0x8(%rbp)
jmp    1199 <main+0x89>
movl   $0x2,-0xc(%rbp)
jmp    1199 <main+0x89>
cmpl   $0x6,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x1,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
xor    %ebx,%ebx
test   %eax,%eax
jne    1130 <main+0x20>
nopl   0x0(%rax)
mov    $0x1,%ebx
mov    $0x3,%eax
add    %eax,%eax
test   %eax,%eax
je     1120 <main+0x10>
cmp    $0x6,%eax
je     1142 <main+0x32>
mov    $0x2,%ebx
add    %eax,%eax
test   %eax,%eax
jne    1130 <main+0x20>
jmp    1120 <main+0x10>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %edi,%edi
cmp    $0x1,%ebx
sete   %dil
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %5, %0
%2 = phi i32 [ 0, %0 ], [ %8, %5 ]
%3 = phi i32 [ 0, %0 ], [ %7, %5 ]
switch i32 %2, label %4 [
i32 6, label %9
i32 0, label %5
]
4: ; preds = %1
br label %5
5: ; preds = %1, %4
%6 = phi i32 [ %2, %4 ], [ 3, %1 ]
%7 = phi i32 [ 2, %4 ], [ 1, %1 ]
%8 = shl nsw i32 %6, 1
br label %1
9: ; preds = %1
%10 = tail call i32 @assert(i32 1)
%11 = icmp eq i32 %3, 1
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
%14 = tail call i32 @assert(i32 1)
%15 = tail call i32 @assert(i32 1)
ret i32 0
}