int main() {
  int i[2];
  union flong {
    float f;
    long l;
  } f[2];
  float g[1];
  float *h;
  i[0] = 123;
  i[1] = 456;
  printf("%d\n", i[0]);
  printf("%d\n", i);
  printf("%d\n", *i);
  printf("%d\n", &i[0]);
  f[0].l = 0x40490fdb;
  f[1].l = 0x40c90fdb;
  printf("%f\n", f[0].f);
  printf("%d\n", f);
  printf("%f\n", (*f).f);
  printf("%d\n", &f[0]);
  *g = (*f).f;
  printf("%f\n", *g);
  h = (float *)malloc(sizeof(float));
  *h = (*f).f;
  printf("%f\n", *h);
  (*f).f = *h * 2;
  printf("%f\n", (*f).f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7b,-0xc(%rbp)
movl   $0x1c8,-0x8(%rbp)
mov    -0xc(%rbp),%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0xc(%rbp),%rsi
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0xc(%rbp),%rsi
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x40490fdb,-0x20(%rbp)
40
movq   $0x40c90fdb,-0x18(%rbp)
40
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe65(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe3c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xe26(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe09(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x30(%rbp)
movss  -0x20(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdd4(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
movss  0xdb9(%rip),%xmm0
mulss  (%rax),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xda8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
movabs $0x1c80000007b,%rax
mov    %rax,0x28(%rsp)
lea    0xee9(%rip),%rbx
mov    %rbx,%rdi
mov    $0x7b,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x28(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x28(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movaps 0xe8e(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0xe9e(%rip),%r14
movsd  0xe8a(%rip),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0x10(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x10(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0xc(%rsp),%xmm0
addss  %xmm0,%xmm0
movss  %xmm0,0x10(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%union.flong = type { i64 }
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i32]
%3 = alloca [2 x %union.flong]
%4 = alloca [1 x float]
%5 = alloca float*
store i32 0, i32* %1
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
store i32 123, i32* %6
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
store i32 456, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%9 = load i32, i32* %8
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %11)
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%14 = load i32, i32* %13
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %16)
%18 = getelementptr inbounds [2 x %union.flong], [2 x %union.flong]* %3, i64 0, i64 0
%19 = bitcast %union.flong* %18 to i64*
store i64 1078530011, i64* %19
%20 = getelementptr inbounds [2 x %union.flong], [2 x %union.flong]* %3, i64 0, i64 1
%21 = bitcast %union.flong* %20 to i64*
store i64 1086918619, i64* %21
%22 = getelementptr inbounds [2 x %union.flong], [2 x %union.flong]* %3, i64 0, i64 0
%23 = bitcast %union.flong* %22 to float*
%24 = load float, float* %23
%25 = fpext float %24 to double
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %25)
%27 = getelementptr inbounds [2 x %union.flong], [2 x %union.flong]* %3, i64 0, i64 0
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %union.flong* %27)
%29 = getelementptr inbounds [2 x %union.flong], [2 x %union.flong]* %3, i64 0, i64 0
%30 = bitcast %union.flong* %29 to float*
%31 = load float, float* %30
%32 = fpext float %31 to double
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %32)
%34 = getelementptr inbounds [2 x %union.flong], [2 x %union.flong]* %3, i64 0, i64 0
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %union.flong* %34)
%36 = getelementptr inbounds [2 x %union.flong], [2 x %union.flong]* %3, i64 0, i64 0
%37 = bitcast %union.flong* %36 to float*
%38 = load float, float* %37
%39 = getelementptr inbounds [1 x float], [1 x float]* %4, i64 0, i64 0
store float %38, float* %39
%40 = getelementptr inbounds [1 x float], [1 x float]* %4, i64 0, i64 0
%41 = load float, float* %40
%42 = fpext float %41 to double
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %42)
%44 = call i8* @malloc(i64 4)
%45 = bitcast i8* %44 to float*
store float* %45, float** %5
%46 = getelementptr inbounds [2 x %union.flong], [2 x %union.flong]* %3, i64 0, i64 0
%47 = bitcast %union.flong* %46 to float*
%48 = load float, float* %47
%49 = load float*, float** %5
store float %48, float* %49
%50 = load float*, float** %5
%51 = load float, float* %50
%52 = fpext float %51 to double
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %52)
%54 = load float*, float** %5
%55 = load float, float* %54
%56 = fmul float %55, 2.000000e+00
%57 = getelementptr inbounds [2 x %union.flong], [2 x %union.flong]* %3, i64 0, i64 0
%58 = bitcast %union.flong* %57 to float*
store float %56, float* %58
%59 = getelementptr inbounds [2 x %union.flong], [2 x %union.flong]* %3, i64 0, i64 0
%60 = bitcast %union.flong* %59 to float*
%61 = load float, float* %60
%62 = fpext float %61 to double
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %62)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca [2 x i32]
%2 = alloca <2 x i64>
%3 = bitcast [2 x i32]* %1 to i8*
%4 = bitcast <2 x i64>* %2 to i8*
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
store i32 123, i32* %5
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 1
store i32 456, i32* %6
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 123)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %5)
%9 = load i32, i32* %5
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %5)
store <2 x i64> <i64 1078530011, i64 1086918619>, <2 x i64>* %2
%12 = bitcast <2 x i64>* %2 to float*
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double 0x400921FB60000000)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), <2 x i64>* %2)
%15 = load float, float* %12
%16 = fpext float %15 to double
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %16)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), <2 x i64>* %2)
%19 = load float, float* %12
%20 = fpext float %19 to double
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %20)
%22 = load float, float* %12
%23 = fpext float %22 to double
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %23)
%25 = fmul float %22, 2.000000e+00
store float %25, float* %12
%26 = fpext float %25 to double
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %26)
ret i32 0
}