#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
mov    -0x10(%rbp),%ecx
and    $0xffffffff,%ecx
mov    -0x14(%rbp),%edx
xor    %edx,%ecx
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%esi
and    %esi,%edx
xor    %edx,%ecx
or     %ecx,%eax
mov    -0x20(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe81(%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
mov    0x20(%rsp),%ecx
xor    0x1c(%rsp),%ecx
mov    0x18(%rsp),%edx
and    0x14(%rsp),%edx
or     0x10(%rsp),%eax
xor    %ecx,%edx
or     %edx,%eax
mov    %eax,0xc(%rsp)
mov    0xc(%rsp),%esi
lea    0xe89(%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 = load volatile i32, i32* %4
%11 = and i32 -1, %10
%12 = load volatile i32, i32* %5
%13 = xor i32 %11, %12
%14 = load volatile i32, i32* %6
%15 = load volatile i32, i32* %7
%16 = and i32 %14, %15
%17 = xor i32 %13, %16
%18 = or i32 %9, %17
%19 = load volatile i32, i32* %8
%20 = or 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 = xor i32 %17, %16
%19 = load volatile i32, i32* %5
%20 = load volatile i32, i32* %6
%21 = and i32 %20, %19
%22 = xor i32 %18, %21
%23 = load volatile i32, i32* %7
%24 = or i32 %23, %15
%25 = or i32 %24, %22
store volatile i32 %25, i32* %2
%26 = load volatile i32, i32* %2
%27 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %26)
ret i32 0
}