#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*/ printf(char *, ...);
void pvalue(char *str, long double x) {
  union {
    long double f;
    unsigned int i[3];
  } u;
  int k;
  printf("%s ", str);
  u.f = x;
  for (k = 0; k < 3; k++)
    printf("%08x ", u.i[k]);
  printf("\n");
}


x86 assembly (clang, -O0):
<pvalue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x10(%rbp)
mov    %rdi,-0x8(%rbp)
fstpt  -0x20(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
fldt   -0x20(%rbp)
fstpt  -0x30(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x34(%rbp)
jge    116f <pvalue+0x5f>
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1141 <pvalue+0x31>
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pvalue>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rdi,%rsi
fldt   0x50(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fstpt  (%rsp)
mov    (%rsp),%rbx
lea    0xebe(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
fldt   0x14(%rsp)
fstpt  0x20(%rsp)
lea    0xeac(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
shr    $0x20,%rbx
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x28(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
add    $0x38,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

LLVM IR (-O0):
%union.anon = type { x86_fp80 }
@.str = [4 x i8] c"%s \00"
@.str.1 = [6 x i8] c"%08x \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @pvalue(i8* %0, x86_fp80 %1) {
%3 = alloca i8*
%4 = alloca x86_fp80
%5 = alloca %union.anon
%6 = alloca i32
store i8* %0, i8** %3
store x86_fp80 %1, x86_fp80* %4
%7 = load i8*, i8** %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load x86_fp80, x86_fp80* %4
%10 = bitcast %union.anon* %5 to x86_fp80*
store x86_fp80 %9, x86_fp80* %10
store i32 0, i32* %6
br label %11
11: ; preds = %21, %2
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 3
br i1 %13, label %14, label %24
14: ; preds = %11
%15 = bitcast %union.anon* %5 to [3 x i32]*
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %15, i64 0, i64 %17
%19 = load i32, i32* %18
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %14
%22 = load i32, i32* %6
%23 = add nsw i32 %22, 1
store i32 %23, i32* %6
br label %11
24: ; preds = %11
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
@.str.1 = [6 x i8] c"%08x \00"
define void @pvalue(i8* %0, x86_fp80 %1) {
%3 = alloca [12 x i8]
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = bitcast [12 x i8]* %3 to x86_fp80*
store x86_fp80 %1, x86_fp80* %6
%7 = bitcast x86_fp80 %1 to i80
%8 = trunc i80 %7 to i32
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = lshr i80 %7, 32
%11 = trunc i80 %10 to i32
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 8
%14 = bitcast i8* %13 to i32*
%15 = load i32, i32* %14
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = tail call i32 @putchar(i32 10)
ret void
}