#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*/ _inner_vec2_daxpy_sse(double *, double const *,
                                         double const *, double const *, int,
                                         double, int, int);
int /*<<< orphan*/ _inner_vec_daxpy_sse(double *, double const *,
                                        double const *, int, double, int, int);
void _dmvec_daxpy_sse(double *Yc, const double *Aroot, const double *Xc,
                      double alpha, int ldA, int incX, int nRE, int nC,
                      int oddStart) {
  register int j, k;
  register double *y0;
  register const double *x0, *a0, *a1, *a2, *a3;
  const double *Ac;
  Ac = Aroot;
  for (j = 0; j < nC - 3; j += 4) {
    x0 = Xc;
    y0 = Yc;
    a0 = Ac;
    a1 = a0 + ldA;
    a2 = a1 + ldA;
    a3 = a2 + ldA;
    _inner_vec2_daxpy_sse(y0, a0, a1, x0, incX, alpha, nRE, oddStart);
    x0 += 2 * incX;
    _inner_vec2_daxpy_sse(y0, a2, a3, x0, incX, alpha, nRE, oddStart);
    Ac += 4 * ldA;
    Xc += 4 * incX;
  }
  if (j == nC)
    return;
  if (j < nC - 1) {
    x0 = Xc;
    y0 = Yc;
    a0 = Ac;
    a1 = a0 + ldA;
    _inner_vec2_daxpy_sse(y0, a0, a1, x0, incX, alpha, nRE, oddStart);
    Xc += 2 * incX;
    Ac += 2 * ldA;
    j += 2;
  }
  if (j < nC) {
    x0 = Xc;
    y0 = Yc;
    a0 = Ac;
    _inner_vec_daxpy_sse(y0, a0, x0, incX, alpha, nRE, oddStart);
    Xc += incX;
    Ac += ldA;
    j++;
  }
}


x86 assembly (clang, -O0):
<_dmvec_daxpy_sse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8d,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x70(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    0x10(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    1264 <_dmvec_daxpy_sse+0x144>
mov    -0x18(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x70(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movslq -0x24(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
movslq -0x24(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
movslq -0x24(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x58(%rbp),%rdx
mov    -0x48(%rbp),%rcx
mov    -0x28(%rbp),%r8d
movsd  -0x20(%rbp),%xmm0
mov    -0x2c(%rbp),%r9d
mov    0x18(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <_inner_vec2_daxpy_sse@plt>
mov    -0x28(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x48(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x48(%rbp),%rcx
mov    -0x28(%rbp),%r8d
movsd  -0x20(%rbp),%xmm0
mov    -0x2c(%rbp),%r9d
mov    0x18(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <_inner_vec2_daxpy_sse@plt>
mov    -0x24(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x70(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x70(%rbp)
mov    -0x28(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x30(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x30(%rbp)
jmp    115c <_dmvec_daxpy_sse+0x3c>
mov    -0x30(%rbp),%eax
cmp    0x10(%rbp),%eax
jne    1275 <_dmvec_daxpy_sse+0x155>
jmp    138a <_dmvec_daxpy_sse+0x26a>
mov    -0x30(%rbp),%eax
mov    0x10(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1312 <_dmvec_daxpy_sse+0x1f2>
mov    -0x18(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x70(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movslq -0x24(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x58(%rbp),%rdx
mov    -0x48(%rbp),%rcx
mov    -0x28(%rbp),%r8d
movsd  -0x20(%rbp),%xmm0
mov    -0x2c(%rbp),%r9d
mov    0x18(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <_inner_vec2_daxpy_sse@plt>
mov    -0x28(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x24(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x70(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x70(%rbp)
mov    -0x30(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    138a <_dmvec_daxpy_sse+0x26a>
mov    -0x18(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x70(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x28(%rbp),%ecx
movsd  -0x20(%rbp),%xmm0
mov    -0x2c(%rbp),%r8d
mov    0x18(%rbp),%r9d
call   1040 <_inner_vec_daxpy_sse@plt>
mov    -0x28(%rbp),%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x24(%rbp),%ecx
mov    -0x70(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x70(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dmvec_daxpy_sse>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %rdx,%rbx
mov    %rsi,%r12
mov    0xb8(%rsp),%r8d
mov    0xb0(%rsp),%eax
xor    %ebp,%ebp
cmp    $0x4,%eax
mov    %rax,0x30(%rsp)
mov    %ecx,0x28(%rsp)
mov    %r8d,0x14(%rsp)
jl     1267 <_dmvec_daxpy_sse+0x147>
add    $0xfffffffd,%eax
mov    %eax,0x2c(%rsp)
movslq %ecx,%rcx
lea    (%r15,%r15,1),%eax
movslq %eax,%r9
lea    0x0(,%rcx,4),%eax
movslq %eax,%rdx
lea    0x0(,%r15,4),%eax
cltq
lea    0x0(,%rcx,8),%rsi
shl    $0x3,%rdx
mov    %rdx,0x50(%rsp)
mov    %rsi,0x40(%rsp)
lea    (%rsi,%rsi,2),%rdx
mov    %rdx,0x38(%rsp)
shl    $0x4,%rcx
mov    %rcx,0x60(%rsp)
shl    $0x3,%rax
mov    %rax,0x48(%rsp)
shl    $0x3,%r9
mov    %r9,0x58(%rsp)
xor    %ebp,%ebp
movsd  %xmm0,0x18(%rsp)
nopl   0x0(%rax)
mov    %ebp,0x20(%rsp)
mov    0x40(%rsp),%rax
lea    (%r12,%rax,1),%rdx
mov    0x60(%rsp),%rax
add    %r12,%rax
mov    %rax,0x70(%rsp)
mov    0x38(%rsp),%rax
lea    (%r12,%rax,1),%rax
mov    %rax,0x68(%rsp)
mov    0x14(%rsp),%ebp
mov    %ebp,(%rsp)
mov    %rdi,%r13
mov    %r12,%rsi
mov    %rbx,%rcx
mov    %r15d,%r8d
movsd  0x18(%rsp),%xmm0
mov    %r14d,%r9d
call   1030 <_inner_vec2_daxpy_sse@plt>
mov    0x58(%rsp),%rax
lea    (%rbx,%rax,1),%rcx
mov    %ebp,(%rsp)
mov    0x20(%rsp),%ebp
mov    %r13,%rdi
mov    0x70(%rsp),%rsi
mov    0x68(%rsp),%rdx
mov    %r15d,%r8d
movsd  0x18(%rsp),%xmm0
mov    %r14d,%r9d
call   1030 <_inner_vec2_daxpy_sse@plt>
mov    %r13,%rdi
movsd  0x18(%rsp),%xmm0
add    $0x4,%ebp
add    0x50(%rsp),%r12
add    0x48(%rsp),%rbx
cmp    0x2c(%rsp),%ebp
jl     11d0 <_dmvec_daxpy_sse+0xb0>
mov    0x30(%rsp),%rcx
cmp    %ecx,%ebp
mov    0x14(%rsp),%r9d
je     1306 <_dmvec_daxpy_sse+0x1e6>
lea    -0x1(%rcx),%eax
cmp    %eax,%ebp
jge    12e3 <_dmvec_daxpy_sse+0x1c3>
mov    0x28(%rsp),%r13d
movslq %r13d,%rax
lea    (%r12,%rax,8),%rdx
mov    %r9d,(%rsp)
mov    %rdi,0x20(%rsp)
mov    0x20(%rsp),%rdi
mov    %r12,%rsi
mov    %rbx,%rcx
mov    %r15d,%r8d
movsd  %xmm0,0x18(%rsp)
movsd  0x18(%rsp),%xmm0
mov    %r14d,%r9d
call   1030 <_inner_vec2_daxpy_sse@plt>
mov    0x14(%rsp),%r9d
mov    0x30(%rsp),%rcx
mov    0x20(%rsp),%rdi
movsd  0x18(%rsp),%xmm0
lea    (%r15,%r15,1),%eax
cltq
lea    (%rbx,%rax,8),%rbx
add    %r13d,%r13d
movslq %r13d,%rax
lea    (%r12,%rax,8),%r12
or     $0x2,%ebp
cmp    %ecx,%ebp
jge    1306 <_dmvec_daxpy_sse+0x1e6>
mov    %r12,%rsi
mov    %rbx,%rdx
mov    %r15d,%ecx
mov    %r14d,%r8d
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <_inner_vec_daxpy_sse@plt>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @_dmvec_daxpy_sse(double* %0, double* %1, double* %2, double %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca double*
%22 = alloca double*
%23 = alloca double*
%24 = alloca double*
%25 = alloca double*
%26 = alloca double*
%27 = alloca double*
store double* %0, double** %10
store double* %1, double** %11
store double* %2, double** %12
store double %3, double* %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
%28 = load double*, double** %11
store double* %28, double** %27
store i32 0, i32* %19
br label %29
29: ; preds = %83, %9
%30 = load i32, i32* %19
%31 = load i32, i32* %17
%32 = sub nsw i32 %31, 3
%33 = icmp slt i32 %30, %32
br i1 %33, label %34, label %86
34: ; preds = %29
%35 = load double*, double** %12
store double* %35, double** %22
%36 = load double*, double** %10
store double* %36, double** %21
%37 = load double*, double** %27
store double* %37, double** %23
%38 = load double*, double** %23
%39 = load i32, i32* %14
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds double, double* %38, i64 %40
store double* %41, double** %24
%42 = load double*, double** %24
%43 = load i32, i32* %14
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds double, double* %42, i64 %44
store double* %45, double** %25
%46 = load double*, double** %25
%47 = load i32, i32* %14
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds double, double* %46, i64 %48
store double* %49, double** %26
%50 = load double*, double** %21
%51 = load double*, double** %23
%52 = load double*, double** %24
%53 = load double*, double** %22
%54 = load i32, i32* %15
%55 = load double, double* %13
%56 = load i32, i32* %16
%57 = load i32, i32* %18
%58 = call i32 @_inner_vec2_daxpy_sse(double* %50, double* %51, double* %52, double* %53, i32 %54, double %55, i32 %56, i32 %57)
%59 = load i32, i32* %15
%60 = mul nsw i32 2, %59
%61 = load double*, double** %22
%62 = sext i32 %60 to i64
%63 = getelementptr inbounds double, double* %61, i64 %62
store double* %63, double** %22
%64 = load double*, double** %21
%65 = load double*, double** %25
%66 = load double*, double** %26
%67 = load double*, double** %22
%68 = load i32, i32* %15
%69 = load double, double* %13
%70 = load i32, i32* %16
%71 = load i32, i32* %18
%72 = call i32 @_inner_vec2_daxpy_sse(double* %64, double* %65, double* %66, double* %67, i32 %68, double %69, i32 %70, i32 %71)
%73 = load i32, i32* %14
%74 = mul nsw i32 4, %73
%75 = load double*, double** %27
%76 = sext i32 %74 to i64
%77 = getelementptr inbounds double, double* %75, i64 %76
store double* %77, double** %27
%78 = load i32, i32* %15
%79 = mul nsw i32 4, %78
%80 = load double*, double** %12
%81 = sext i32 %79 to i64
%82 = getelementptr inbounds double, double* %80, i64 %81
store double* %82, double** %12
br label %83
83: ; preds = %34
%84 = load i32, i32* %19
%85 = add nsw i32 %84, 4
store i32 %85, i32* %19
br label %29
86: ; preds = %29
%87 = load i32, i32* %19
%88 = load i32, i32* %17
%89 = icmp eq i32 %87, %88
br i1 %89, label %90, label %91
90: ; preds = %86
br label %151
91: ; preds = %86
%92 = load i32, i32* %19
%93 = load i32, i32* %17
%94 = sub nsw i32 %93, 1
%95 = icmp slt i32 %92, %94
br i1 %95, label %96, label %125
96: ; preds = %91
%97 = load double*, double** %12
store double* %97, double** %22
%98 = load double*, double** %10
store double* %98, double** %21
%99 = load double*, double** %27
store double* %99, double** %23
%100 = load double*, double** %23
%101 = load i32, i32* %14
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds double, double* %100, i64 %102
store double* %103, double** %24
%104 = load double*, double** %21
%105 = load double*, double** %23
%106 = load double*, double** %24
%107 = load double*, double** %22
%108 = load i32, i32* %15
%109 = load double, double* %13
%110 = load i32, i32* %16
%111 = load i32, i32* %18
%112 = call i32 @_inner_vec2_daxpy_sse(double* %104, double* %105, double* %106, double* %107, i32 %108, double %109, i32 %110, i32 %111)
%113 = load i32, i32* %15
%114 = mul nsw i32 2, %113
%115 = load double*, double** %12
%116 = sext i32 %114 to i64
%117 = getelementptr inbounds double, double* %115, i64 %116
store double* %117, double** %12
%118 = load i32, i32* %14
%119 = mul nsw i32 2, %118
%120 = load double*, double** %27
%121 = sext i32 %119 to i64
%122 = getelementptr inbounds double, double* %120, i64 %121
store double* %122, double** %27
%123 = load i32, i32* %19
%124 = add nsw i32 %123, 2
store i32 %124, i32* %19
br label %125
125: ; preds = %96, %91
%126 = load i32, i32* %19
%127 = load i32, i32* %17
%128 = icmp slt i32 %126, %127
br i1 %128, label %129, label %151
129: ; preds = %125
%130 = load double*, double** %12
store double* %130, double** %22
%131 = load double*, double** %10
store double* %131, double** %21
%132 = load double*, double** %27
store double* %132, double** %23
%133 = load double*, double** %21
%134 = load double*, double** %23
%135 = load double*, double** %22
%136 = load i32, i32* %15
%137 = load double, double* %13
%138 = load i32, i32* %16
%139 = load i32, i32* %18
%140 = call i32 @_inner_vec_daxpy_sse(double* %133, double* %134, double* %135, i32 %136, double %137, i32 %138, i32 %139)
%141 = load i32, i32* %15
%142 = load double*, double** %12
%143 = sext i32 %141 to i64
%144 = getelementptr inbounds double, double* %142, i64 %143
store double* %144, double** %12
%145 = load i32, i32* %14
%146 = load double*, double** %27
%147 = sext i32 %145 to i64
%148 = getelementptr inbounds double, double* %146, i64 %147
store double* %148, double** %27
%149 = load i32, i32* %19
%150 = add nsw i32 %149, 1
store i32 %150, i32* %19
br label %151
151: ; preds = %90, %129, %125
ret void
}

LLVM IR (-O2):
define void @_dmvec_daxpy_sse(double* %0, double* %1, double* %2, double %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = add nsw i32 %7, -3
%11 = icmp sgt i32 %7, 3
br i1 %11, label %12, label %34
12: ; preds = %9
%13 = sext i32 %4 to i64
%14 = shl nsw i32 %5, 1
%15 = sext i32 %14 to i64
%16 = shl nsw i32 %4, 2
%17 = sext i32 %16 to i64
%18 = shl nsw i32 %5, 2
%19 = sext i32 %18 to i64
br label %20
20: ; preds = %12, %20
%21 = phi double* [ %1, %12 ], [ %30, %20 ]
%22 = phi double* [ %2, %12 ], [ %31, %20 ]
%23 = phi i32 [ 0, %12 ], [ %32, %20 ]
%24 = getelementptr inbounds double, double* %21, i64 %13
%25 = getelementptr inbounds double, double* %24, i64 %13
%26 = getelementptr inbounds double, double* %25, i64 %13
%27 = tail call i32 @_inner_vec2_daxpy_sse(double* %0, double* %21, double* %24, double* %22, i32 %5, double %3, i32 %6, i32 %8)
%28 = getelementptr inbounds double, double* %22, i64 %15
%29 = tail call i32 @_inner_vec2_daxpy_sse(double* %0, double* %25, double* %26, double* %28, i32 %5, double %3, i32 %6, i32 %8)
%30 = getelementptr inbounds double, double* %21, i64 %17
%31 = getelementptr inbounds double, double* %22, i64 %19
%32 = add nuw nsw i32 %23, 4
%33 = icmp slt i32 %32, %10
br i1 %33, label %20, label %34
34: ; preds = %20, %9
%35 = phi i32 [ 0, %9 ], [ %32, %20 ]
%36 = phi double* [ %2, %9 ], [ %31, %20 ]
%37 = phi double* [ %1, %9 ], [ %30, %20 ]
%38 = icmp eq i32 %35, %7
br i1 %38, label %60, label %39
39: ; preds = %34
%40 = add nsw i32 %7, -1
%41 = icmp slt i32 %35, %40
br i1 %41, label %42, label %53
42: ; preds = %39
%43 = sext i32 %4 to i64
%44 = getelementptr inbounds double, double* %37, i64 %43
%45 = tail call i32 @_inner_vec2_daxpy_sse(double* %0, double* %37, double* %44, double* %36, i32 %5, double %3, i32 %6, i32 %8)
%46 = shl nsw i32 %5, 1
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds double, double* %36, i64 %47
%49 = shl nsw i32 %4, 1
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds double, double* %37, i64 %50
%52 = or i32 %35, 2
br label %53
53: ; preds = %42, %39
%54 = phi i32 [ %52, %42 ], [ %35, %39 ]
%55 = phi double* [ %48, %42 ], [ %36, %39 ]
%56 = phi double* [ %51, %42 ], [ %37, %39 ]
%57 = icmp slt i32 %54, %7
br i1 %57, label %58, label %60
58: ; preds = %53
%59 = tail call i32 @_inner_vec_daxpy_sse(double* %0, double* %56, double* %55, i32 %5, double %3, i32 %6, i32 %8)
br label %60
60: ; preds = %53, %58, %34
ret void
}