#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*/ assert(int);
int /*<<< orphan*/ bzero(unsigned int *, int);
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int, unsigned int,
                          unsigned int);
int main() {
  long double *d;
  unsigned int x[4];
  assert(sizeof(long double) == 4 * sizeof(unsigned int));
  d = (long double *)x;
  bzero(x, sizeof(long double));
  *d = 3.14159;
  printf("long double data: %8.8X %8.8X %8.8X %8.8X\n", x[0], x[1], x[2], x[3]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1040 <assert@plt>
lea    -0x20(%rbp),%rdi
mov    %rdi,-0x10(%rbp)
mov    $0x10,%esi
call   1050 <bzero@plt>
mov    -0x10(%rbp),%rax
fldl   0xe9b(%rip)
fstpt  (%rax)
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    $0x1,%edi
call   1040 <assert@plt>
mov    %rsp,%rdi
mov    $0x10,%esi
call   1050 <bzero@plt>
fldl   0xeaf(%rip)
fstpt  (%rsp)
mov    0x8(%rsp),%ecx
mov    0xc(%rsp),%r8d
lea    0xea4(%rip),%rdi
mov    $0xdc337000,%esi
mov    $0xc90fcf80,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [43 x i8] c"long double data: %8.8X %8.8X %8.8X %8.8X\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca x86_fp80*
%3 = alloca [4 x i32]
store i32 0, i32* %1
%4 = call i32 @assert(i32 1)
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%6 = bitcast i32* %5 to x86_fp80*
store x86_fp80* %6, x86_fp80** %2
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%8 = call i32 @bzero(i32* %7, i32 16)
%9 = load x86_fp80*, x86_fp80** %2
store x86_fp80 0xK4000C90FCF80DC337000, x86_fp80* %9
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%11 = load i32, i32* %10
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 1
%13 = load i32, i32* %12
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 2
%15 = load i32, i32* %14
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 3
%17 = load i32, i32* %16
%18 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %13, i32 %15, i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [43 x i8] c"long double data: %8.8X %8.8X %8.8X %8.8X\0A\00"
define i32 @main() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = tail call i32 @assert(i32 1)
%4 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%5 = bitcast [4 x i32]* %1 to x86_fp80*
%6 = call i32 @bzero(i32* %4, i32 16)
store x86_fp80 0xK4000C90FCF80DC337000, x86_fp80* %5
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 2
%8 = load i32, i32* %7
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 3
%10 = load i32, i32* %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 -600608768, i32 -921710720, i32 %8, i32 %10)
ret i32 0
}