int main(void) {
  volatile int j = 0x7fffffff;
  volatile int i = 1;
  volatile int k = j + i;
  k = i + j;
  j++;
  j = 0x7fffffff - 100;
  j += (1 << 10);
  j = (-0x7fffffff - 1);
  i = -1;
  k = i + j;
  k = j + i;
  j = (-0x7fffffff - 1) + 100;
  j += -(1 << 10);
  volatile long int m = 0x7fffffffffffffffL;
  volatile long int n = 1;
  volatile long int o = m + n;
  o = n + m;
  m++;
  m = 0x7fffffffffffffffL - 100;
  m += (1 << 10);
  m = (-0x7fffffffffffffffL - 1L);
  n = -1;
  o = m + n;
  o = n + m;
  m = (-0x7fffffffffffffffL - 1L) + 100;
  m += -(1 << 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x7fffffff,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
movl   $0x7fffff9b,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x400,%eax
mov    %eax,-0x8(%rbp)
movl   $0x80000000,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
movl   $0x80000064,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xfffffc00,%eax
mov    %eax,-0x8(%rbp)
movabs $0x7fffffffffffffff,%rax
ff ff 7f
mov    %rax,-0x18(%rbp)
movq   $0x1,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
movabs $0x7fffffffffffff9b,%rax
ff ff 7f
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x400,%rax
mov    %rax,-0x18(%rbp)
movabs $0x8000000000000000,%rax
mov    %rax,-0x18(%rbp)
movq   $0xffffffffffffffff,-0x20(%rbp)
ff
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
movabs $0x8000000000000064,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0xfffffffffffffc00,%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movl   $0x7fffffff,-0x28(%rsp)
7f
movl   $0x1,-0x24(%rsp)
mov    -0x28(%rsp),%eax
add    -0x24(%rsp),%eax
mov    %eax,-0x14(%rsp)
mov    -0x24(%rsp),%eax
add    -0x28(%rsp),%eax
mov    %eax,-0x14(%rsp)
addl   $0x1,-0x28(%rsp)
movl   $0x7fffff9b,-0x28(%rsp)
7f
addl   $0x400,-0x28(%rsp)
movl   $0x80000000,-0x28(%rsp)
80
movl   $0xffffffff,-0x24(%rsp)
ff
mov    -0x24(%rsp),%eax
add    -0x28(%rsp),%eax
mov    %eax,-0x14(%rsp)
mov    -0x28(%rsp),%eax
add    -0x24(%rsp),%eax
mov    %eax,-0x14(%rsp)
movl   $0x80000064,-0x28(%rsp)
80
addl   $0xfffffc00,-0x28(%rsp)
ff
movabs $0x7fffffffffffff9b,%rax
ff ff 7f
lea    0x64(%rax),%rcx
mov    %rcx,-0x20(%rsp)
movq   $0x1,-0x10(%rsp)
mov    -0x20(%rsp),%rcx
add    -0x10(%rsp),%rcx
mov    %rcx,-0x8(%rsp)
mov    -0x10(%rsp),%rcx
add    -0x20(%rsp),%rcx
mov    %rcx,-0x8(%rsp)
addq   $0x1,-0x20(%rsp)
mov    %rax,-0x20(%rsp)
addq   $0x400,-0x20(%rsp)
lea    0x65(%rax),%rcx
mov    %rcx,-0x20(%rsp)
movq   $0xffffffffffffffff,-0x10(%rsp)
ff ff
mov    -0x20(%rsp),%rcx
add    -0x10(%rsp),%rcx
mov    %rcx,-0x8(%rsp)
mov    -0x10(%rsp),%rcx
add    -0x20(%rsp),%rcx
mov    %rcx,-0x8(%rsp)
add    $0xc9,%rax
mov    %rax,-0x20(%rsp)
addq   $0xfffffffffffffc00,-0x20(%rsp)
ff ff
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i32 0, i32* %1
store volatile i32 2147483647, i32* %2
store volatile i32 1, i32* %3
%8 = load volatile i32, i32* %2
%9 = load volatile i32, i32* %3
%10 = add nsw i32 %8, %9
store volatile i32 %10, i32* %4
%11 = load volatile i32, i32* %3
%12 = load volatile i32, i32* %2
%13 = add nsw i32 %11, %12
store volatile i32 %13, i32* %4
%14 = load volatile i32, i32* %2
%15 = add nsw i32 %14, 1
store volatile i32 %15, i32* %2
store volatile i32 2147483547, i32* %2
%16 = load volatile i32, i32* %2
%17 = add nsw i32 %16, 1024
store volatile i32 %17, i32* %2
store volatile i32 -2147483648, i32* %2
store volatile i32 -1, i32* %3
%18 = load volatile i32, i32* %3
%19 = load volatile i32, i32* %2
%20 = add nsw i32 %18, %19
store volatile i32 %20, i32* %4
%21 = load volatile i32, i32* %2
%22 = load volatile i32, i32* %3
%23 = add nsw i32 %21, %22
store volatile i32 %23, i32* %4
store volatile i32 -2147483548, i32* %2
%24 = load volatile i32, i32* %2
%25 = add nsw i32 %24, -1024
store volatile i32 %25, i32* %2
store volatile i64 9223372036854775807, i64* %5
store volatile i64 1, i64* %6
%26 = load volatile i64, i64* %5
%27 = load volatile i64, i64* %6
%28 = add nsw i64 %26, %27
store volatile i64 %28, i64* %7
%29 = load volatile i64, i64* %6
%30 = load volatile i64, i64* %5
%31 = add nsw i64 %29, %30
store volatile i64 %31, i64* %7
%32 = load volatile i64, i64* %5
%33 = add nsw i64 %32, 1
store volatile i64 %33, i64* %5
store volatile i64 9223372036854775707, i64* %5
%34 = load volatile i64, i64* %5
%35 = add nsw i64 %34, 1024
store volatile i64 %35, i64* %5
store volatile i64 -9223372036854775808, i64* %5
store volatile i64 -1, i64* %6
%36 = load volatile i64, i64* %5
%37 = load volatile i64, i64* %6
%38 = add nsw i64 %36, %37
store volatile i64 %38, i64* %7
%39 = load volatile i64, i64* %6
%40 = load volatile i64, i64* %5
%41 = add nsw i64 %39, %40
store volatile i64 %41, i64* %7
store volatile i64 -9223372036854775708, i64* %5
%42 = load volatile i64, i64* %5
%43 = add nsw i64 %42, -1024
store volatile i64 %43, i64* %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = bitcast i32* %1 to i8*
store volatile i32 2147483647, i32* %1
%8 = bitcast i32* %2 to i8*
store volatile i32 1, i32* %2
%9 = bitcast i32* %3 to i8*
%10 = load volatile i32, i32* %1
%11 = load volatile i32, i32* %2
%12 = add nsw i32 %11, %10
store volatile i32 %12, i32* %3
%13 = load volatile i32, i32* %2
%14 = load volatile i32, i32* %1
%15 = add nsw i32 %14, %13
store volatile i32 %15, i32* %3
%16 = load volatile i32, i32* %1
%17 = add nsw i32 %16, 1
store volatile i32 %17, i32* %1
store volatile i32 2147483547, i32* %1
%18 = load volatile i32, i32* %1
%19 = add nsw i32 %18, 1024
store volatile i32 %19, i32* %1
store volatile i32 -2147483648, i32* %1
store volatile i32 -1, i32* %2
%20 = load volatile i32, i32* %2
%21 = load volatile i32, i32* %1
%22 = add nsw i32 %21, %20
store volatile i32 %22, i32* %3
%23 = load volatile i32, i32* %1
%24 = load volatile i32, i32* %2
%25 = add nsw i32 %24, %23
store volatile i32 %25, i32* %3
store volatile i32 -2147483548, i32* %1
%26 = load volatile i32, i32* %1
%27 = add nsw i32 %26, -1024
store volatile i32 %27, i32* %1
%28 = bitcast i64* %4 to i8*
store volatile i64 9223372036854775807, i64* %4
%29 = bitcast i64* %5 to i8*
store volatile i64 1, i64* %5
%30 = bitcast i64* %6 to i8*
%31 = load volatile i64, i64* %4
%32 = load volatile i64, i64* %5
%33 = add nsw i64 %32, %31
store volatile i64 %33, i64* %6
%34 = load volatile i64, i64* %5
%35 = load volatile i64, i64* %4
%36 = add nsw i64 %35, %34
store volatile i64 %36, i64* %6
%37 = load volatile i64, i64* %4
%38 = add nsw i64 %37, 1
store volatile i64 %38, i64* %4
store volatile i64 9223372036854775707, i64* %4
%39 = load volatile i64, i64* %4
%40 = add nsw i64 %39, 1024
store volatile i64 %40, i64* %4
store volatile i64 -9223372036854775808, i64* %4
store volatile i64 -1, i64* %5
%41 = load volatile i64, i64* %4
%42 = load volatile i64, i64* %5
%43 = add nsw i64 %42, %41
store volatile i64 %43, i64* %6
%44 = load volatile i64, i64* %5
%45 = load volatile i64, i64* %4
%46 = add nsw i64 %45, %44
store volatile i64 %46, i64* %6
store volatile i64 -9223372036854775708, i64* %4
%47 = load volatile i64, i64* %4
%48 = add nsw i64 %47, -1024
store volatile i64 %48, i64* %4
ret i32 0
}