#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 x = 2;
  int y = 3;
  int n = 0;
  int m = 24;
  int z;
  assert((x && y) == 1);
  z = x & y;
  assert(z == 2);
  assert((x || y) == 1);
  assert((x || 1) == 1);
  z = x | y;
  assert(z == 3);
  z = x ^ y;
  assert(z == 1);
  assert(!x == 0);
  z = !n;
  assert(z == 1);
  z = ~x;
  assert(z == -3);
  z = x << y;
  assert(z == 16);
  z = m >> x;
  assert(z == 6);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x18,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x19(%rbp)
je     1154 <main+0x44>
cmpl   $0x0,-0xc(%rbp)
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x2,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x1a(%rbp)
jne    119f <main+0x8f>
cmpl   $0x0,-0xc(%rbp)
setne  %al
mov    %al,-0x1a(%rbp)
mov    -0x1a(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x1b(%rbp)
jne    11d0 <main+0xc0>
mov    $0x1,%al
mov    %al,-0x1b(%rbp)
jmp    11d0 <main+0xc0>
mov    -0x1b(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x1,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x1,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0xfffffffd,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x10,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x6,-0x18(%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
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>
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>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%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
%6 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
store i32 3, i32* %3
store i32 0, i32* %4
store i32 24, i32* %5
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 0
br label %12
12: ; preds = %9, %0
%13 = phi i1 [ false, %0 ], [ %11, %9 ]
%14 = zext i1 %13 to i32
%15 = icmp eq i32 %14, 1
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = and i32 %18, %19
store i32 %20, i32* %6
%21 = load i32, i32* %6
%22 = icmp eq i32 %21, 2
%23 = zext i1 %22 to i32
%24 = call i32 @assert(i32 %23)
%25 = load i32, i32* %2
%26 = icmp ne i32 %25, 0
br i1 %26, label %30, label %27
27: ; preds = %12
%28 = load i32, i32* %3
%29 = icmp ne i32 %28, 0
br label %30
30: ; preds = %27, %12
%31 = phi i1 [ true, %12 ], [ %29, %27 ]
%32 = zext i1 %31 to i32
%33 = icmp eq i32 %32, 1
%34 = zext i1 %33 to i32
%35 = call i32 @assert(i32 %34)
%36 = load i32, i32* %2
%37 = icmp ne i32 %36, 0
br i1 %37, label %39, label %38
38: ; preds = %30
br label %39
39: ; preds = %38, %30
%40 = phi i1 [ true, %30 ], [ true, %38 ]
%41 = zext i1 %40 to i32
%42 = icmp eq i32 %41, 1
%43 = zext i1 %42 to i32
%44 = call i32 @assert(i32 %43)
%45 = load i32, i32* %2
%46 = load i32, i32* %3
%47 = or i32 %45, %46
store i32 %47, i32* %6
%48 = load i32, i32* %6
%49 = icmp eq i32 %48, 3
%50 = zext i1 %49 to i32
%51 = call i32 @assert(i32 %50)
%52 = load i32, i32* %2
%53 = load i32, i32* %3
%54 = xor i32 %52, %53
store i32 %54, i32* %6
%55 = load i32, i32* %6
%56 = icmp eq i32 %55, 1
%57 = zext i1 %56 to i32
%58 = call i32 @assert(i32 %57)
%59 = load i32, i32* %2
%60 = icmp ne i32 %59, 0
%61 = xor i1 %60, true
%62 = zext i1 %61 to i32
%63 = icmp eq i32 %62, 0
%64 = zext i1 %63 to i32
%65 = call i32 @assert(i32 %64)
%66 = load i32, i32* %4
%67 = icmp ne i32 %66, 0
%68 = xor i1 %67, true
%69 = zext i1 %68 to i32
store i32 %69, i32* %6
%70 = load i32, i32* %6
%71 = icmp eq i32 %70, 1
%72 = zext i1 %71 to i32
%73 = call i32 @assert(i32 %72)
%74 = load i32, i32* %2
%75 = xor i32 %74, -1
store i32 %75, i32* %6
%76 = load i32, i32* %6
%77 = icmp eq i32 %76, -3
%78 = zext i1 %77 to i32
%79 = call i32 @assert(i32 %78)
%80 = load i32, i32* %2
%81 = load i32, i32* %3
%82 = shl i32 %80, %81
store i32 %82, i32* %6
%83 = load i32, i32* %6
%84 = icmp eq i32 %83, 16
%85 = zext i1 %84 to i32
%86 = call i32 @assert(i32 %85)
%87 = load i32, i32* %5
%88 = load i32, i32* %2
%89 = ashr i32 %87, %88
store i32 %89, i32* %6
%90 = load i32, i32* %6
%91 = icmp eq i32 %90, 6
%92 = zext i1 %91 to i32
%93 = call i32 @assert(i32 %92)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
%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 1)
%8 = tail call i32 @assert(i32 1)
%9 = tail call i32 @assert(i32 1)
%10 = tail call i32 @assert(i32 1)
%11 = tail call i32 @assert(i32 1)
ret i32 0
}