#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 *, double const);
void pd_write_doubles(const double *x) {
  printf("  thumb = %21.14e", x[0]);
  printf("  index = %21.14e\n", x[1]);
  printf("  middle = %21.14e\n", x[2]);
  printf("  ring = %21.14e", x[3]);
  printf("   pink = %21.14e\n", x[4]);
}


x86 assembly (clang, -O0):
<pd_write_doubles>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pd_write_doubles>:
push   %rbx
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
movsd  0x8(%rbx),%xmm0
lea    0xee2(%rip),%rdi
call   1030 <printf@plt>
movsd  0x10(%rbx),%xmm0
lea    0xee4(%rip),%rdi
call   1030 <printf@plt>
movsd  0x18(%rbx),%xmm0
lea    0xee7(%rip),%rdi
call   1030 <printf@plt>
movsd  0x20(%rbx),%xmm0
lea    0xee7(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c" thumb = %21.14e\00"
@.str.1 = [19 x i8] c" index = %21.14e\0A\00"
@.str.2 = [20 x i8] c" middle = %21.14e\0A\00"
@.str.3 = [17 x i8] c" ring = %21.14e\00"
@.str.4 = [19 x i8] c" pink = %21.14e\0A\00"
define void @pd_write_doubles(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), double %5)
%7 = load double*, double** %2
%8 = getelementptr inbounds double, double* %7, i64 1
%9 = load double, double* %8
%10 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), double %9)
%11 = load double*, double** %2
%12 = getelementptr inbounds double, double* %11, i64 2
%13 = load double, double* %12
%14 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), double %13)
%15 = load double*, double** %2
%16 = getelementptr inbounds double, double* %15, i64 3
%17 = load double, double* %16
%18 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), double %17)
%19 = load double*, double** %2
%20 = getelementptr inbounds double, double* %19, i64 4
%21 = load double, double* %20
%22 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), double %21)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c" thumb = %21.14e\00"
@.str.1 = [19 x i8] c" index = %21.14e\0A\00"
@.str.2 = [20 x i8] c" middle = %21.14e\0A\00"
@.str.3 = [17 x i8] c" ring = %21.14e\00"
@.str.4 = [19 x i8] c" pink = %21.14e\0A\00"
define void @pd_write_doubles(double* nocapture %0) {
%2 = load double, double* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), double %2)
%4 = getelementptr inbounds double, double* %0, i64 1
%5 = load double, double* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), double %5)
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), double %8)
%10 = getelementptr inbounds double, double* %0, i64 3
%11 = load double, double* %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), double %11)
%13 = getelementptr inbounds double, double* %0, i64 4
%14 = load double, double* %13
%15 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), double %14)
ret void
}