#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 volatile);
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 ^ f ^ g;
  printf("%u\n", b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%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    -0x1c(%rbp),%ecx
xor    %ecx,%eax
mov    -0x20(%rbp),%ecx
xor    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movl   $0xffffffff,0x24(%rsp)
ff
movl   $0x0,0xc(%rsp)
movl   $0xffffffef,0x20(%rsp)
ff
movl   $0xfeffffef,0x1c(%rsp)
fe
movl   $0xffffffe7,0x18(%rsp)
ff
movl   $0xffffffef,0x14(%rsp)
ff
movl   $0xfeffffff,0x10(%rsp)
fe
mov    0x24(%rsp),%eax
xor    0x20(%rsp),%eax
xor    0x1c(%rsp),%eax
xor    0x18(%rsp),%eax
xor    0x14(%rsp),%eax
xor    0x10(%rsp),%eax
not    %eax
mov    %eax,0xc(%rsp)
mov    0xc(%rsp),%esi
lea    0xe8b(%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
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
%9 = load volatile i32, i32* %2
%10 = xor i32 %9, -1
%11 = load volatile i32, i32* %4
%12 = xor i32 %10, %11
%13 = load volatile i32, i32* %5
%14 = xor i32 %12, %13
%15 = load volatile i32, i32* %6
%16 = xor i32 %14, %15
%17 = load volatile i32, i32* %7
%18 = xor i32 %16, %17
%19 = load volatile i32, i32* %8
%20 = xor i32 %18, %19
store volatile i32 %20, i32* %3
%21 = load volatile i32, i32* %3
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %21)
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 = load volatile i32, i32* %6
%20 = load volatile i32, i32* %7
%21 = xor i32 %15, %16
%22 = xor i32 %21, %17
%23 = xor i32 %22, %18
%24 = xor i32 %23, %19
%25 = xor i32 %24, %20
%26 = xor i32 %25, -1
store volatile i32 %26, i32* %2
%27 = load volatile i32, i32* %2
%28 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %27)
ret i32 0
}