main() {
  int x = 1;
  x += 18;
  printf(x);
  x -= 18;
  printf(x);
  x *= 2;
  printf(x);
  x /= 2;
  printf(x);
  x %= 2;
  printf(x);
  x = 100;
  x <<= 1;
  printf(x);
  x >>= 1;
  printf(x);
  x &= x;
  printf(x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x12,%eax
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
sub    $0x12,%eax
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x64,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 1, i32* %1
%2 = load i32, i32* %1
%3 = add nsw i32 %2, 18
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = call i32 (i8*, ...) @printf(i8* %6)
%8 = load i32, i32* %1
%9 = sub nsw i32 %8, 18
store i32 %9, i32* %1
%10 = load i32, i32* %1
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i8*
%13 = call i32 (i8*, ...) @printf(i8* %12)
%14 = load i32, i32* %1
%15 = mul nsw i32 %14, 2
store i32 %15, i32* %1
%16 = load i32, i32* %1
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i8*
%19 = call i32 (i8*, ...) @printf(i8* %18)
%20 = load i32, i32* %1
%21 = sdiv i32 %20, 2
store i32 %21, i32* %1
%22 = load i32, i32* %1
%23 = sext i32 %22 to i64
%24 = inttoptr i64 %23 to i8*
%25 = call i32 (i8*, ...) @printf(i8* %24)
%26 = load i32, i32* %1
%27 = srem i32 %26, 2
store i32 %27, i32* %1
%28 = load i32, i32* %1
%29 = sext i32 %28 to i64
%30 = inttoptr i64 %29 to i8*
%31 = call i32 (i8*, ...) @printf(i8* %30)
store i32 100, i32* %1
%32 = load i32, i32* %1
%33 = shl i32 %32, 1
store i32 %33, i32* %1
%34 = load i32, i32* %1
%35 = sext i32 %34 to i64
%36 = inttoptr i64 %35 to i8*
%37 = call i32 (i8*, ...) @printf(i8* %36)
%38 = load i32, i32* %1
%39 = ashr i32 %38, 1
store i32 %39, i32* %1
%40 = load i32, i32* %1
%41 = sext i32 %40 to i64
%42 = inttoptr i64 %41 to i8*
%43 = call i32 (i8*, ...) @printf(i8* %42)
%44 = load i32, i32* %1
%45 = load i32, i32* %1
%46 = and i32 %45, %44
store i32 %46, i32* %1
%47 = load i32, i32* %1
%48 = sext i32 %47 to i64
%49 = inttoptr i64 %48 to i8*
%50 = call i32 (i8*, ...) @printf(i8* %49)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 19 to i8*))
%2 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 1 to i8*))
%3 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 2 to i8*))
%4 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 1 to i8*))
%5 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 1 to i8*))
%6 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 200 to i8*))
%7 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 100 to i8*))
%8 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 100 to i8*))
ret i32 0
}