#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 */

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(void) {
  union {
    float f;
    int i;
  } value;
  value.f = 2.0;
  do {
    int result = (*(int *)(&value));
    if (result != 0x40000000) {
      fprintf(stderr, "DEREF("
                      "int"
                      ", "
                      "&value"
                      ") did not result in "
                      "0x40000000"
                      ".\n");
      return 1;
    }
  } while (0);
  ;
  float *float_pointer = &value.f;
  do {
    int result = (*(int *)(float_pointer));
    if (result != 0x40000000) {
      fprintf(stderr, "DEREF("
                      "int"
                      ", "
                      "float_pointer"
                      ") did not result in "
                      "0x40000000"
                      ".\n");
      return 1;
    }
  } while (0);
  ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x40000000,-0xc(%rbp)
je     1160 <main+0x50>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    11b0 <main+0xa0>
jmp    1165 <main+0x55>
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x40000000,-0x1c(%rbp)
je     11a4 <main+0x94>
mov    0x2e56(%rip),%rax
mov    (%rax),%edi
lea    0xea3(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    11b0 <main+0xa0>
jmp    11a9 <main+0x99>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%union.anon = type { float }
@stderr = global i32 0
@.str = [50 x i8] c"DEREF(int, &value) did not result in 0x40000000.\0A\00"
@.str.1 = [57 x i8] c"DEREF(int, float_pointer) did not result in 0x40000000.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %union.anon
%3 = alloca i32
%4 = alloca float*
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast %union.anon* %2 to float*
store float 2.000000e+00, float* %6
br label %7
7: ; preds = %0
%8 = bitcast %union.anon* %2 to i32*
%9 = load i32, i32* %8
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 1073741824
br i1 %11, label %12, label %15
12: ; preds = %7
%13 = load i32, i32* @stderr
%14 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %1
br label %29
15: ; preds = %7
br label %16
16: ; preds = %15
%17 = bitcast %union.anon* %2 to float*
store float* %17, float** %4
br label %18
18: ; preds = %16
%19 = load float*, float** %4
%20 = bitcast float* %19 to i32*
%21 = load i32, i32* %20
store i32 %21, i32* %5
%22 = load i32, i32* %5
%23 = icmp ne i32 %22, 1073741824
br i1 %23, label %24, label %27
24: ; preds = %18
%25 = load i32, i32* @stderr
%26 = call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %1
br label %29
27: ; preds = %18
br label %28
28: ; preds = %27
store i32 0, i32* %1
br label %29
29: ; preds = %28, %24, %12
%30 = load i32, i32* %1
ret i32 %30
}

LLVM IR (-O2):
@stderr = global i32 0
define i32 @main() {
ret i32 0
}