#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 */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  volatile uint32_t a = 0xffffffff, b = 0, c = 0xffffffef, d = 0xfeffffef,
                    e = 0xffffffe7, f = 0xffffffef, g = 0xfeffffff;
  b = a ^ 0xffffffff ^ c ^ d ^ e;
  uint32_t tmp = c ^ g;
  uint32_t tmp2 = b ^ tmp;
  uint32_t other_root = tmp ^ f;
  printf("%u\n", tmp2 + other_root);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0xffffffef,-0x10(%rbp)
movl   $0xfeffffef,-0x14(%rbp)
movl   $0xffffffe7,-0x18(%rbp)
movl   $0xffffffef,-0x1c(%rbp)
movl   $0xfeffffff,-0x20(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    -0x10(%rbp),%ecx
xor    %ecx,%eax
mov    -0x14(%rbp),%ecx
xor    %ecx,%eax
mov    -0x18(%rbp),%ecx
xor    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x20(%rbp),%ecx
xor    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x1c(%rbp),%ecx
xor    %ecx,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%esi
add    -0x2c(%rbp),%esi
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movl   $0xffffffff,0x24(%rsp)
ff
movl   $0x0,0x10(%rsp)
movl   $0xffffffef,0xc(%rsp)
ff
movl   $0xfeffffef,0x20(%rsp)
fe
movl   $0xffffffe7,0x1c(%rsp)
ff
movl   $0xffffffef,0x18(%rsp)
ff
movl   $0xfeffffff,0x14(%rsp)
fe
mov    0x24(%rsp),%eax
xor    0xc(%rsp),%eax
xor    0x20(%rsp),%eax
xor    0x1c(%rsp),%eax
not    %eax
mov    %eax,0x10(%rsp)
mov    0xc(%rsp),%esi
xor    0x14(%rsp),%esi
mov    0x10(%rsp),%eax
xor    %esi,%eax
xor    0x18(%rsp),%esi
add    %eax,%esi
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
store volatile i32 -1, i32* %2
store volatile i32 0, i32* %3
store volatile i32 -17, i32* %4
store volatile i32 -16777233, i32* %5
store volatile i32 -25, i32* %6
store volatile i32 -17, i32* %7
store volatile i32 -16777217, i32* %8
%12 = load volatile i32, i32* %2
%13 = xor i32 %12, -1
%14 = load volatile i32, i32* %4
%15 = xor i32 %13, %14
%16 = load volatile i32, i32* %5
%17 = xor i32 %15, %16
%18 = load volatile i32, i32* %6
%19 = xor i32 %17, %18
store volatile i32 %19, i32* %3
%20 = load volatile i32, i32* %4
%21 = load volatile i32, i32* %8
%22 = xor i32 %20, %21
store i32 %22, i32* %9
%23 = load volatile i32, i32* %3
%24 = load i32, i32* %9
%25 = xor i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %9
%27 = load volatile i32, i32* %7
%28 = xor i32 %26, %27
store i32 %28, i32* %11
%29 = load i32, i32* %10
%30 = load i32, i32* %11
%31 = add nsw i32 %29, %30
%32 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %31)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = bitcast i32* %1 to i8*
store volatile i32 -1, i32* %1
%9 = bitcast i32* %2 to i8*
store volatile i32 0, i32* %2
%10 = bitcast i32* %3 to i8*
store volatile i32 -17, i32* %3
%11 = bitcast i32* %4 to i8*
store volatile i32 -16777233, i32* %4
%12 = bitcast i32* %5 to i8*
store volatile i32 -25, i32* %5
%13 = bitcast i32* %6 to i8*
store volatile i32 -17, i32* %6
%14 = bitcast i32* %7 to i8*
store volatile i32 -16777217, i32* %7
%15 = load volatile i32, i32* %1
%16 = load volatile i32, i32* %3
%17 = load volatile i32, i32* %4
%18 = load volatile i32, i32* %5
%19 = xor i32 %15, %16
%20 = xor i32 %19, %17
%21 = xor i32 %20, %18
%22 = xor i32 %21, -1
store volatile i32 %22, i32* %2
%23 = load volatile i32, i32* %3
%24 = load volatile i32, i32* %7
%25 = xor i32 %24, %23
%26 = load volatile i32, i32* %2
%27 = xor i32 %26, %25
%28 = load volatile i32, i32* %6
%29 = xor i32 %28, %25
%30 = add nsw i32 %29, %27
%31 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %30)
ret i32 0
}