#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(void) {
  int x, y;
  x = 100;
  y = x /= 2;
  assert(x == 50);
  y = x *= 3;
  assert(x == 150);
  y = x <<= 1;
  assert(x == 300);
  y = x >>= 1;
  assert(x == 150);
  y = x += x;
  assert(x == 300);
  y = x ^= 1;
  assert(x == 301);
  y = x -= x;
  assert(x == 0);
  y = x |= 1;
  assert(x == 1);
  y = x &= 2;
  assert(x == 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
cmpl   $0x32,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
imul   $0x3,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
cmpl   $0x96,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
cmpl   $0x12c,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
cmpl   $0x96,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
cmpl   $0x12c,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
xor    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
cmpl   $0x12d,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%ecx
mov    -0x8(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
and    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%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   %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>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 100, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 2
store i32 %5, i32* %2
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 50
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i32, i32* %2
%11 = mul nsw i32 %10, 3
store i32 %11, i32* %2
store i32 %11, i32* %3
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 150
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = load i32, i32* %2
%17 = shl i32 %16, 1
store i32 %17, i32* %2
store i32 %17, i32* %3
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 300
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = load i32, i32* %2
%23 = ashr i32 %22, 1
store i32 %23, i32* %2
store i32 %23, i32* %3
%24 = load i32, i32* %2
%25 = icmp eq i32 %24, 150
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26)
%28 = load i32, i32* %2
%29 = load i32, i32* %2
%30 = add nsw i32 %29, %28
store i32 %30, i32* %2
store i32 %30, i32* %3
%31 = load i32, i32* %2
%32 = icmp eq i32 %31, 300
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
%35 = load i32, i32* %2
%36 = xor i32 %35, 1
store i32 %36, i32* %2
store i32 %36, i32* %3
%37 = load i32, i32* %2
%38 = icmp eq i32 %37, 301
%39 = zext i1 %38 to i32
%40 = call i32 @assert(i32 %39)
%41 = load i32, i32* %2
%42 = load i32, i32* %2
%43 = sub nsw i32 %42, %41
store i32 %43, i32* %2
store i32 %43, i32* %3
%44 = load i32, i32* %2
%45 = icmp eq i32 %44, 0
%46 = zext i1 %45 to i32
%47 = call i32 @assert(i32 %46)
%48 = load i32, i32* %2
%49 = or i32 %48, 1
store i32 %49, i32* %2
store i32 %49, i32* %3
%50 = load i32, i32* %2
%51 = icmp eq i32 %50, 1
%52 = zext i1 %51 to i32
%53 = call i32 @assert(i32 %52)
%54 = load i32, i32* %2
%55 = and i32 %54, 2
store i32 %55, i32* %2
store i32 %55, i32* %3
%56 = load i32, i32* %2
%57 = icmp eq i32 %56, 0
%58 = zext i1 %57 to i32
%59 = call i32 @assert(i32 %58)
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)
ret i32 0
}