#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 *, long, long, ...);
double test_testd2(long i0, long i1, long i2, long i3, long i4, long i5,
                   double d0, double d1, double d2, double d3, double d4,
                   double d5, double d6, double d7, double d8, double d9,
                   double d10, long i6, long i7) {
  printf("%ld %ld %ld\n", i0, i1, i2);
  printf("%ld %ld %ld\n", i3, i4, i5);
  printf("%lf %lf %lf %lf\n", d0, d1, d2, d3);
  printf("%lf %lf %lf %lf\n", d4, d5, d6, d7);
  printf("%lf %lf %lf\n", d8, d9, d10);
  printf("%ld %ld\n", i6, i7);
  return 1.23456;
}


x86 assembly (clang, -O0):
<test_testd2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
movsd  0x20(%rbp),%xmm8
movsd  0x18(%rbp),%xmm8
movsd  0x10(%rbp),%xmm8
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movsd  %xmm0,-0x38(%rbp)
movsd  %xmm1,-0x40(%rbp)
movsd  %xmm2,-0x48(%rbp)
movsd  %xmm3,-0x50(%rbp)
movsd  %xmm4,-0x58(%rbp)
movsd  %xmm5,-0x60(%rbp)
movsd  %xmm6,-0x68(%rbp)
movsd  %xmm7,-0x70(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cvttsd2si -0x38(%rbp),%rsi
cvttsd2si -0x40(%rbp),%rdx
movsd  -0x48(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    0xe52(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
cvttsd2si -0x58(%rbp),%rsi
cvttsd2si -0x60(%rbp),%rdx
movsd  -0x68(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
lea    0xe2e(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
cvttsd2si 0x10(%rbp),%rsi
cvttsd2si 0x18(%rbp),%rdx
movsd  0x20(%rbp),%xmm0
lea    0xe13(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x28(%rbp),%rsi
mov    0x30(%rbp),%rdx
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  0xdd5(%rip),%xmm0
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_testd2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
movsd  %xmm7,0x40(%rsp)
movsd  %xmm6,0x38(%rsp)
movsd  %xmm5,0x30(%rsp)
movsd  %xmm4,0x28(%rsp)
movsd  %xmm3,0x20(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    %r9,%r12
mov    %r8,%r13
mov    %rcx,%rbx
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x98(%rsp),%r15
mov    0xa0(%rsp),%r14
lea    0xe91(%rip),%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1030 <printf@plt>
cvttsd2si 0x8(%rsp),%rsi
cvttsd2si 0x10(%rsp),%rdx
lea    0xe6c(%rip),%rbx
mov    %rbx,%rdi
movsd  0x18(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
cvttsd2si 0x28(%rsp),%rsi
cvttsd2si 0x30(%rsp),%rdx
mov    %rbx,%rdi
movsd  0x38(%rsp),%xmm0
movsd  0x40(%rsp),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
cvttsd2si 0x80(%rsp),%rsi
cvttsd2si 0x88(%rsp),%rdx
lea    0xe1b(%rip),%rdi
movsd  0x90(%rsp),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xdf7(%rip),%rdi
mov    %r15,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
movsd  0xdd6(%rip),%xmm0
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%ld %ld %ld\0A\00"
@.str.1 = [17 x i8] c"%lf %lf %lf %lf\0A\00"
@.str.2 = [13 x i8] c"%lf %lf %lf\0A\00"
@.str.3 = [9 x i8] c"%ld %ld\0A\00"
define double @test_testd2(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, double %6, double %7, double %8, double %9, double %10, double %11, double %12, double %13, double %14, double %15, double %16, i64 %17, i64 %18) {
%20 = alloca i64
%21 = alloca i64
%22 = alloca i64
%23 = alloca i64
%24 = alloca i64
%25 = alloca i64
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = alloca double
%37 = alloca i64
%38 = alloca i64
store i64 %0, i64* %20
store i64 %1, i64* %21
store i64 %2, i64* %22
store i64 %3, i64* %23
store i64 %4, i64* %24
store i64 %5, i64* %25
store double %6, double* %26
store double %7, double* %27
store double %8, double* %28
store double %9, double* %29
store double %10, double* %30
store double %11, double* %31
store double %12, double* %32
store double %13, double* %33
store double %14, double* %34
store double %15, double* %35
store double %16, double* %36
store i64 %17, i64* %37
store i64 %18, i64* %38
%39 = load i64, i64* %20
%40 = load i64, i64* %21
%41 = load i64, i64* %22
%42 = call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 %39, i64 %40, i64 %41)
%43 = load i64, i64* %23
%44 = load i64, i64* %24
%45 = load i64, i64* %25
%46 = call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 %43, i64 %44, i64 %45)
%47 = load double, double* %26
%48 = fptosi double %47 to i64
%49 = load double, double* %27
%50 = fptosi double %49 to i64
%51 = load double, double* %28
%52 = load double, double* %29
%53 = call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i64 %48, i64 %50, double %51, double %52)
%54 = load double, double* %30
%55 = fptosi double %54 to i64
%56 = load double, double* %31
%57 = fptosi double %56 to i64
%58 = load double, double* %32
%59 = load double, double* %33
%60 = call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i64 %55, i64 %57, double %58, double %59)
%61 = load double, double* %34
%62 = fptosi double %61 to i64
%63 = load double, double* %35
%64 = fptosi double %63 to i64
%65 = load double, double* %36
%66 = call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i64 %62, i64 %64, double %65)
%67 = load i64, i64* %37
%68 = load i64, i64* %38
%69 = call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i64 %67, i64 %68)
ret double 1.234560e+00
}

LLVM IR (-O2):
@.str = [13 x i8] c"%ld %ld %ld\0A\00"
@.str.1 = [17 x i8] c"%lf %lf %lf %lf\0A\00"
@.str.2 = [13 x i8] c"%lf %lf %lf\0A\00"
@.str.3 = [9 x i8] c"%ld %ld\0A\00"
define double @test_testd2(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, double %6, double %7, double %8, double %9, double %10, double %11, double %12, double %13, double %14, double %15, double %16, i64 %17, i64 %18) {
%20 = tail call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1, i64 %2)
%21 = tail call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 %3, i64 %4, i64 %5)
%22 = fptosi double %6 to i64
%23 = fptosi double %7 to i64
%24 = tail call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i64 %22, i64 %23, double %8, double %9)
%25 = fptosi double %10 to i64
%26 = fptosi double %11 to i64
%27 = tail call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i64 %25, i64 %26, double %12, double %13)
%28 = fptosi double %14 to i64
%29 = fptosi double %15 to i64
%30 = tail call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i64 %28, i64 %29, double %16)
%31 = tail call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i64 %17, i64 %18)
ret double 1.234560e+00
}