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


x86 assembly (clang, -O0):
<da_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    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm0
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm0
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  0x48(%rax),%xmm0
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<da_write_doubles>:
push   %rbx
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
movsd  0x8(%rbx),%xmm0
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
movsd  0x10(%rbx),%xmm0
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
movsd  0x18(%rbx),%xmm0
lea    0xeee(%rip),%rdi
call   1030 <printf@plt>
movsd  0x20(%rbx),%xmm0
lea    0xef3(%rip),%rdi
call   1030 <printf@plt>
movsd  0x28(%rbx),%xmm0
lea    0xef7(%rip),%rdi
call   1030 <printf@plt>
movsd  0x30(%rbx),%xmm0
lea    0xefc(%rip),%rdi
call   1030 <printf@plt>
movsd  0x38(%rbx),%xmm0
lea    0xf00(%rip),%rdi
call   1030 <printf@plt>
movsd  0x40(%rbx),%xmm0
lea    0xf05(%rip),%rdi
call   1030 <printf@plt>
movsd  0x48(%rbx),%xmm0
lea    0xf09(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c" R thumb = %21.14e\00"
@.str.1 = [22 x i8] c" R index = %21.14e\0A\00"
@.str.2 = [21 x i8] c" R middle = %21.14e\00"
@.str.3 = [22 x i8] c" R ring = %21.14e\0A\00"
@.str.4 = [21 x i8] c" R pink = %21.14e\00"
@.str.5 = [22 x i8] c" L thumb = %21.14e\0A\00"
@.str.6 = [21 x i8] c" L index = %21.14e\00"
@.str.7 = [22 x i8] c" L middle = %21.14e\0A\00"
@.str.8 = [21 x i8] c" L ring = %21.14e\00"
@.str.9 = [22 x i8] c" L pink = %21.14e\0A\00"
define void @da_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 ([21 x i8], [21 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 ([22 x i8], [22 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 ([21 x i8], [21 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 ([22 x i8], [22 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 ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), double %21)
%23 = load double*, double** %2
%24 = getelementptr inbounds double, double* %23, i64 5
%25 = load double, double* %24
%26 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), double %25)
%27 = load double*, double** %2
%28 = getelementptr inbounds double, double* %27, i64 6
%29 = load double, double* %28
%30 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), double %29)
%31 = load double*, double** %2
%32 = getelementptr inbounds double, double* %31, i64 7
%33 = load double, double* %32
%34 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), double %33)
%35 = load double*, double** %2
%36 = getelementptr inbounds double, double* %35, i64 8
%37 = load double, double* %36
%38 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), double %37)
%39 = load double*, double** %2
%40 = getelementptr inbounds double, double* %39, i64 9
%41 = load double, double* %40
%42 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), double %41)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c" R thumb = %21.14e\00"
@.str.1 = [22 x i8] c" R index = %21.14e\0A\00"
@.str.2 = [21 x i8] c" R middle = %21.14e\00"
@.str.3 = [22 x i8] c" R ring = %21.14e\0A\00"
@.str.4 = [21 x i8] c" R pink = %21.14e\00"
@.str.5 = [22 x i8] c" L thumb = %21.14e\0A\00"
@.str.6 = [21 x i8] c" L index = %21.14e\00"
@.str.7 = [22 x i8] c" L middle = %21.14e\0A\00"
@.str.8 = [21 x i8] c" L ring = %21.14e\00"
@.str.9 = [22 x i8] c" L pink = %21.14e\0A\00"
define void @da_write_doubles(double* nocapture %0) {
%2 = load double, double* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 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 ([22 x i8], [22 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 ([21 x i8], [21 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 ([22 x i8], [22 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 ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), double %14)
%16 = getelementptr inbounds double, double* %0, i64 5
%17 = load double, double* %16
%18 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), double %17)
%19 = getelementptr inbounds double, double* %0, i64 6
%20 = load double, double* %19
%21 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), double %20)
%22 = getelementptr inbounds double, double* %0, i64 7
%23 = load double, double* %22
%24 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), double %23)
%25 = getelementptr inbounds double, double* %0, i64 8
%26 = load double, double* %25
%27 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), double %26)
%28 = getelementptr inbounds double, double* %0, i64 9
%29 = load double, double* %28
%30 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), double %29)
ret void
}