#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 */
double dd_two_prod(double const, double, double *);
double dd_two_sum(double, double, double *);
int /*<<< orphan*/ pd_fast_renorm(double, double, double, double, double,
                                  double, double *, double *, double *,
                                  double *, double *);
void pd_mul_pd_d(const double *a, double b, double *c) {
  double f0, f1, f2, f3, f4, f5, e;
  f5 = 0.0;
  f4 = dd_two_prod(a[4], b, &e);
  f5 = f5 + e;
  f3 = dd_two_prod(a[3], b, &e);
  f4 = dd_two_sum(f4, e, &e);
  f5 = f5 + e;
  f2 = dd_two_prod(a[2], b, &e);
  f3 = dd_two_sum(f3, e, &e);
  f4 = dd_two_sum(f4, e, &e);
  f5 = f5 + e;
  f1 = dd_two_prod(a[1], b, &e);
  f2 = dd_two_sum(f2, e, &e);
  f3 = dd_two_sum(f3, e, &e);
  f4 = dd_two_sum(f4, e, &e);
  f5 = f5 + e;
  f0 = dd_two_prod(a[0], b, &e);
  f1 = dd_two_sum(f1, e, &e);
  f2 = dd_two_sum(f2, e, &e);
  f3 = dd_two_sum(f3, e, &e);
  f4 = dd_two_sum(f4, e, &e);
  f5 = f5 + e;
  pd_fast_renorm(f0, f1, f2, f3, f4, f5, &c[0], &c[1], &c[2], &c[3], &c[4]);
}


x86 assembly (clang, -O0):
<pd_mul_pd_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <dd_two_prod@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x48(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <dd_two_prod@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x48(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <dd_two_prod@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x48(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <dd_two_prod@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x48(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <dd_two_prod@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x48(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x48(%rbp),%xmm5
mov    -0x18(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x8,%rsi
mov    -0x18(%rbp),%rdx
add    $0x10,%rdx
mov    -0x18(%rbp),%rcx
add    $0x18,%rcx
mov    -0x18(%rbp),%r8
add    $0x20,%r8
call   1050 <pd_fast_renorm@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pd_mul_pd_d>:
push   %r15
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %rsi,%r14
movaps %xmm0,%xmm1
movsd  %xmm0,0x20(%rsp)
mov    %rdi,%r15
movsd  0x20(%rdi),%xmm0
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <dd_two_prod@plt>
movsd  %xmm0,0x10(%rsp)
xorpd  %xmm0,%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x18(%r15),%xmm0
movsd  0x20(%rsp),%xmm1
mov    %rbx,%rdi
call   1030 <dd_two_prod@plt>
movsd  %xmm0,0x38(%rsp)
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0x18(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x10(%r15),%xmm0
movsd  0x20(%rsp),%xmm1
mov    %rbx,%rdi
call   1030 <dd_two_prod@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm1
movsd  0x38(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x8(%rsp),%xmm1
movsd  0x28(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0x18(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%r15),%xmm0
movsd  0x20(%rsp),%xmm1
mov    %rbx,%rdi
call   1030 <dd_two_prod@plt>
movsd  %xmm0,0x38(%rsp)
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm1
movsd  0x30(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x8(%rsp),%xmm1
movsd  0x28(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0x18(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  (%r15),%xmm0
movsd  0x20(%rsp),%xmm1
mov    %rbx,%rdi
call   1030 <dd_two_prod@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm1
movsd  0x38(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,0x38(%rsp)
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm1
movsd  0x30(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <dd_two_sum@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x8(%rsp),%xmm1
movsd  0x28(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <dd_two_sum@plt>
movaps %xmm0,%xmm4
movsd  0x18(%rsp),%xmm5
addsd  0x8(%rsp),%xmm5
lea    0x8(%r14),%rsi
lea    0x10(%r14),%rdx
lea    0x18(%r14),%rcx
lea    0x20(%r14),%r8
movsd  0x20(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x30(%rsp),%xmm3
mov    %r14,%rdi
call   1050 <pd_fast_renorm@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @pd_mul_pd_d(double* %0, double %1, double* %2) {
%4 = alloca double*
%5 = alloca double
%6 = alloca double*
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
store double* %0, double** %4
store double %1, double* %5
store double* %2, double** %6
store double 0.000000e+00, double* %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 4
%16 = load double, double* %15
%17 = load double, double* %5
%18 = call double @dd_two_prod(double %16, double %17, double* %13)
store double %18, double* %11
%19 = load double, double* %12
%20 = load double, double* %13
%21 = fadd double %19, %20
store double %21, double* %12
%22 = load double*, double** %4
%23 = getelementptr inbounds double, double* %22, i64 3
%24 = load double, double* %23
%25 = load double, double* %5
%26 = call double @dd_two_prod(double %24, double %25, double* %13)
store double %26, double* %10
%27 = load double, double* %11
%28 = load double, double* %13
%29 = call double @dd_two_sum(double %27, double %28, double* %13)
store double %29, double* %11
%30 = load double, double* %12
%31 = load double, double* %13
%32 = fadd double %30, %31
store double %32, double* %12
%33 = load double*, double** %4
%34 = getelementptr inbounds double, double* %33, i64 2
%35 = load double, double* %34
%36 = load double, double* %5
%37 = call double @dd_two_prod(double %35, double %36, double* %13)
store double %37, double* %9
%38 = load double, double* %10
%39 = load double, double* %13
%40 = call double @dd_two_sum(double %38, double %39, double* %13)
store double %40, double* %10
%41 = load double, double* %11
%42 = load double, double* %13
%43 = call double @dd_two_sum(double %41, double %42, double* %13)
store double %43, double* %11
%44 = load double, double* %12
%45 = load double, double* %13
%46 = fadd double %44, %45
store double %46, double* %12
%47 = load double*, double** %4
%48 = getelementptr inbounds double, double* %47, i64 1
%49 = load double, double* %48
%50 = load double, double* %5
%51 = call double @dd_two_prod(double %49, double %50, double* %13)
store double %51, double* %8
%52 = load double, double* %9
%53 = load double, double* %13
%54 = call double @dd_two_sum(double %52, double %53, double* %13)
store double %54, double* %9
%55 = load double, double* %10
%56 = load double, double* %13
%57 = call double @dd_two_sum(double %55, double %56, double* %13)
store double %57, double* %10
%58 = load double, double* %11
%59 = load double, double* %13
%60 = call double @dd_two_sum(double %58, double %59, double* %13)
store double %60, double* %11
%61 = load double, double* %12
%62 = load double, double* %13
%63 = fadd double %61, %62
store double %63, double* %12
%64 = load double*, double** %4
%65 = getelementptr inbounds double, double* %64, i64 0
%66 = load double, double* %65
%67 = load double, double* %5
%68 = call double @dd_two_prod(double %66, double %67, double* %13)
store double %68, double* %7
%69 = load double, double* %8
%70 = load double, double* %13
%71 = call double @dd_two_sum(double %69, double %70, double* %13)
store double %71, double* %8
%72 = load double, double* %9
%73 = load double, double* %13
%74 = call double @dd_two_sum(double %72, double %73, double* %13)
store double %74, double* %9
%75 = load double, double* %10
%76 = load double, double* %13
%77 = call double @dd_two_sum(double %75, double %76, double* %13)
store double %77, double* %10
%78 = load double, double* %11
%79 = load double, double* %13
%80 = call double @dd_two_sum(double %78, double %79, double* %13)
store double %80, double* %11
%81 = load double, double* %12
%82 = load double, double* %13
%83 = fadd double %81, %82
store double %83, double* %12
%84 = load double, double* %7
%85 = load double, double* %8
%86 = load double, double* %9
%87 = load double, double* %10
%88 = load double, double* %11
%89 = load double, double* %12
%90 = load double*, double** %6
%91 = getelementptr inbounds double, double* %90, i64 0
%92 = load double*, double** %6
%93 = getelementptr inbounds double, double* %92, i64 1
%94 = load double*, double** %6
%95 = getelementptr inbounds double, double* %94, i64 2
%96 = load double*, double** %6
%97 = getelementptr inbounds double, double* %96, i64 3
%98 = load double*, double** %6
%99 = getelementptr inbounds double, double* %98, i64 4
%100 = call i32 @pd_fast_renorm(double %84, double %85, double %86, double %87, double %88, double %89, double* %91, double* %93, double* %95, double* %97, double* %99)
ret void
}

LLVM IR (-O2):
define void @pd_mul_pd_d(double* nocapture %0, double %1, double* %2) {
%4 = alloca double
%5 = bitcast double* %4 to i8*
%6 = getelementptr inbounds double, double* %0, i64 4
%7 = load double, double* %6
%8 = call double @dd_two_prod(double %7, double %1, double* %4)
%9 = load double, double* %4
%10 = fadd double %9, 0.000000e+00
%11 = getelementptr inbounds double, double* %0, i64 3
%12 = load double, double* %11
%13 = call double @dd_two_prod(double %12, double %1, double* %4)
%14 = load double, double* %4
%15 = call double @dd_two_sum(double %8, double %14, double* %4)
%16 = load double, double* %4
%17 = fadd double %10, %16
%18 = getelementptr inbounds double, double* %0, i64 2
%19 = load double, double* %18
%20 = call double @dd_two_prod(double %19, double %1, double* %4)
%21 = load double, double* %4
%22 = call double @dd_two_sum(double %13, double %21, double* %4)
%23 = load double, double* %4
%24 = call double @dd_two_sum(double %15, double %23, double* %4)
%25 = load double, double* %4
%26 = fadd double %17, %25
%27 = getelementptr inbounds double, double* %0, i64 1
%28 = load double, double* %27
%29 = call double @dd_two_prod(double %28, double %1, double* %4)
%30 = load double, double* %4
%31 = call double @dd_two_sum(double %20, double %30, double* %4)
%32 = load double, double* %4
%33 = call double @dd_two_sum(double %22, double %32, double* %4)
%34 = load double, double* %4
%35 = call double @dd_two_sum(double %24, double %34, double* %4)
%36 = load double, double* %4
%37 = fadd double %26, %36
%38 = load double, double* %0
%39 = call double @dd_two_prod(double %38, double %1, double* %4)
%40 = load double, double* %4
%41 = call double @dd_two_sum(double %29, double %40, double* %4)
%42 = load double, double* %4
%43 = call double @dd_two_sum(double %31, double %42, double* %4)
%44 = load double, double* %4
%45 = call double @dd_two_sum(double %33, double %44, double* %4)
%46 = load double, double* %4
%47 = call double @dd_two_sum(double %35, double %46, double* %4)
%48 = load double, double* %4
%49 = fadd double %37, %48
%50 = getelementptr inbounds double, double* %2, i64 1
%51 = getelementptr inbounds double, double* %2, i64 2
%52 = getelementptr inbounds double, double* %2, i64 3
%53 = getelementptr inbounds double, double* %2, i64 4
%54 = call i32 @pd_fast_renorm(double %39, double %41, double %43, double %45, double %47, double %49, double* %2, double* %50, double* %51, double* %52, double* %53)
ret void
}