#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_sum(double const, double const, double *);
int /*<<< orphan*/ pd_fast_renorm(double, double, double, double, double,
                                  double, double *, double *, double *,
                                  double *, double *);
void pd_add(const double *a, const double *b, double *c) {
  double f0, f1, f2, f3, f4, f5, e;
  f5 = 0.0;
  f4 = dd_two_sum(a[4], b[4], &e);
  f5 = f5 + e;
  f3 = dd_two_sum(a[3], b[3], &e);
  f4 = dd_two_sum(f4, e, &e);
  f5 = f5 + e;
  f2 = dd_two_sum(a[2], b[2], &e);
  f3 = dd_two_sum(f3, e, &e);
  f4 = dd_two_sum(f4, e, &e);
  f5 = f5 + e;
  f1 = dd_two_sum(a[1], b[1], &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_sum(a[0], b[0], &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_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <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  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <dd_two_sum@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <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
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <dd_two_sum@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <dd_two_sum@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <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
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <dd_two_sum@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <dd_two_sum@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <dd_two_sum@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <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
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <dd_two_sum@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <dd_two_sum@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <dd_two_sum@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <dd_two_sum@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    -0x50(%rbp),%rdi
call   1030 <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   1040 <pd_fast_renorm@plt>
add    $0x50,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @pd_add(double* nocapture %0, double* nocapture %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 = getelementptr inbounds double, double* %1, i64 4
%9 = load double, double* %8
%10 = call double @dd_two_sum(double %7, double %9, double* %4)
%11 = load double, double* %4
%12 = fadd double %11, 0.000000e+00
%13 = getelementptr inbounds double, double* %0, i64 3
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %1, i64 3
%16 = load double, double* %15
%17 = call double @dd_two_sum(double %14, double %16, double* %4)
%18 = load double, double* %4
%19 = call double @dd_two_sum(double %10, double %18, double* %4)
%20 = load double, double* %4
%21 = fadd double %12, %20
%22 = getelementptr inbounds double, double* %0, i64 2
%23 = load double, double* %22
%24 = getelementptr inbounds double, double* %1, i64 2
%25 = load double, double* %24
%26 = call double @dd_two_sum(double %23, double %25, double* %4)
%27 = load double, double* %4
%28 = call double @dd_two_sum(double %17, double %27, double* %4)
%29 = load double, double* %4
%30 = call double @dd_two_sum(double %19, double %29, double* %4)
%31 = load double, double* %4
%32 = fadd double %21, %31
%33 = getelementptr inbounds double, double* %0, i64 1
%34 = load double, double* %33
%35 = getelementptr inbounds double, double* %1, i64 1
%36 = load double, double* %35
%37 = call double @dd_two_sum(double %34, double %36, double* %4)
%38 = load double, double* %4
%39 = call double @dd_two_sum(double %26, double %38, double* %4)
%40 = load double, double* %4
%41 = call double @dd_two_sum(double %28, double %40, double* %4)
%42 = load double, double* %4
%43 = call double @dd_two_sum(double %30, double %42, double* %4)
%44 = load double, double* %4
%45 = fadd double %32, %44
%46 = load double, double* %0
%47 = load double, double* %1
%48 = call double @dd_two_sum(double %46, double %47, double* %4)
%49 = load double, double* %4
%50 = call double @dd_two_sum(double %37, double %49, double* %4)
%51 = load double, double* %4
%52 = call double @dd_two_sum(double %39, double %51, double* %4)
%53 = load double, double* %4
%54 = call double @dd_two_sum(double %41, double %53, double* %4)
%55 = load double, double* %4
%56 = call double @dd_two_sum(double %43, double %55, double* %4)
%57 = load double, double* %4
%58 = fadd double %45, %57
%59 = getelementptr inbounds double, double* %2, i64 1
%60 = getelementptr inbounds double, double* %2, i64 2
%61 = getelementptr inbounds double, double* %2, i64 3
%62 = getelementptr inbounds double, double* %2, i64 4
%63 = call i32 @pd_fast_renorm(double %48, double %50, double %52, double %54, double %56, double %58, double* %2, double* %59, double* %60, double* %61, double* %62)
ret void
}