#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, j, k;
  int x;
  if (x) {
  }
  if (x) {
    assert(x != 0);
    i = 5;
    j = 10;
  } else {
    assert(x == 0);
    i = 7;
    j = 10;
  }
  assert(i == 5);
  assert(i == 7);
  assert(i != 0);
  assert(j == 10);
  if (j)
    k = 7;
  else
    k = 8;
  assert(k == 7);
  switch (x) {
  case 5:
    k = 3 + x;
    assert(x == 5);
    break;
  case 6:
    k = 2 + x;
    assert(x == 6);
    break;
  default:
    k = 8;
    assert(x != 5);
    assert(x != 6);
  }
  assert(k == 8);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     112e <main+0x1e>
jmp    112e <main+0x1e>
cmpl   $0x0,-0x14(%rbp)
je     115c <main+0x4c>
cmpl   $0x0,-0x14(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x5,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
jmp    117b <main+0x6b>
cmpl   $0x0,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x7,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
cmpl   $0x5,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x7,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0xa,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0xc(%rbp)
je     11d5 <main+0xc5>
movl   $0x7,-0x10(%rbp)
jmp    11dc <main+0xcc>
movl   $0x8,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x7,%eax
sete   %al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
sub    $0x5,%eax
je     1212 <main+0x102>
jmp    1201 <main+0xf1>
mov    -0x18(%rbp),%eax
sub    $0x6,%eax
je     1231 <main+0x121>
jmp    1250 <main+0x140>
mov    -0x14(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x5,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
jmp    1279 <main+0x169>
mov    -0x14(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x6,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
jmp    1279 <main+0x169>
movl   $0x8,-0x10(%rbp)
cmpl   $0x5,-0x14(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x6,-0x14(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x8,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = load i32, i32* %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %0
br label %9
9: ; preds = %8, %0
%10 = load i32, i32* %5
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %9
%13 = load i32, i32* %5
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
store i32 5, i32* %2
store i32 10, i32* %3
br label %22
17: ; preds = %9
%18 = load i32, i32* %5
%19 = icmp eq i32 %18, 0
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
store i32 7, i32* %2
store i32 10, i32* %3
br label %22
22: ; preds = %17, %12
%23 = load i32, i32* %2
%24 = icmp eq i32 %23, 5
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = load i32, i32* %2
%28 = icmp eq i32 %27, 7
%29 = zext i1 %28 to i32
%30 = call i32 @assert(i32 %29)
%31 = load i32, i32* %2
%32 = icmp ne i32 %31, 0
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
%35 = load i32, i32* %3
%36 = icmp eq i32 %35, 10
%37 = zext i1 %36 to i32
%38 = call i32 @assert(i32 %37)
%39 = load i32, i32* %3
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %42
41: ; preds = %22
store i32 7, i32* %4
br label %43
42: ; preds = %22
store i32 8, i32* %4
br label %43
43: ; preds = %42, %41
%44 = load i32, i32* %4
%45 = icmp eq i32 %44, 7
%46 = zext i1 %45 to i32
%47 = call i32 @assert(i32 %46)
%48 = load i32, i32* %5
switch i32 %48, label %63 [
i32 5, label %49
i32 6, label %56
]
49: ; preds = %43
%50 = load i32, i32* %5
%51 = add nsw i32 3, %50
store i32 %51, i32* %4
%52 = load i32, i32* %5
%53 = icmp eq i32 %52, 5
%54 = zext i1 %53 to i32
%55 = call i32 @assert(i32 %54)
br label %72
56: ; preds = %43
%57 = load i32, i32* %5
%58 = add nsw i32 2, %57
store i32 %58, i32* %4
%59 = load i32, i32* %5
%60 = icmp eq i32 %59, 6
%61 = zext i1 %60 to i32
%62 = call i32 @assert(i32 %61)
br label %72
63: ; preds = %43
store i32 8, i32* %4
%64 = load i32, i32* %5
%65 = icmp ne i32 %64, 5
%66 = zext i1 %65 to i32
%67 = call i32 @assert(i32 %66)
%68 = load i32, i32* %5
%69 = icmp ne i32 %68, 6
%70 = zext i1 %69 to i32
%71 = call i32 @assert(i32 %70)
br label %72
72: ; preds = %63, %56, %49
%73 = load i32, i32* %4
%74 = icmp eq i32 %73, 8
%75 = zext i1 %74 to i32
%76 = call i32 @assert(i32 %75)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
%2 = tail call i32 @assert(i32 0)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 1)
%5 = tail call i32 @assert(i32 1)
%6 = tail call i32 @assert(i32 1)
%7 = tail call i32 @assert(i32 0)
%8 = tail call i32 @assert(i32 0)
ret i32 0
}