// File: cjlin1[P]liblinear/blas/ddot.c
// Function: ddot_
double ddot_(int *n, double *sx, int *incx, double *sy, int *incy)
{
  long int i, m, nn, iincx, iincy;
  double stemp;
  long int ix, iy;

  /* forms the dot product of two vectors.
     uses unrolled loops for increments equal to one.
     jack dongarra, linpack, 3/11/78.
     modified 12/3/93, array(1) declarations changed to array(*) */

  /* Dereference inputs */
  nn = *n;
  iincx = *incx;
  iincy = *incy;

  stemp = 0.0;
  if (nn > 0)
  {
    if (iincx == 1 && iincy == 1) /* code for both increments equal to 1 */
    {
      m = nn-4;
      for (i = 0; i < m; i += 5)
        stemp += sx[i] * sy[i] + sx[i+1] * sy[i+1] + sx[i+2] * sy[i+2] +
                 sx[i+3] * sy[i+3] + sx[i+4] * sy[i+4];

      for ( ; i < nn; i++)        /* clean-up loop */
        stemp += sx[i] * sy[i];
    }
    else /* code for unequal increments or equal increments not equal to 1 */
    {
      ix = 0;
      iy = 0;
      if (iincx < 0)
        ix = (1 - nn) * iincx;
      if (iincy < 0)
        iy = (1 - nn) * iincy;
      for (i = 0; i < nn; i++)
      {
        stemp += sx[ix] * sy[iy];
        ix += iincx;
        iy += iincy;
      }
    }
  }

  return stemp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movslq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movslq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movslq (%rax), %rax
movq %rax, -0x50(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
cmpq $0x0, -0x40(%rbp)
jle 0x11dee
cmpq $0x1, -0x48(%rbp)
jne 0x11d44
cmpq $0x1, -0x50(%rbp)
jne 0x11d44
movq -0x40(%rbp), %rax
subq $0x4, %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jge 0x11cf9
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movsd 0x8(%rax,%rcx,8), %xmm0
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
mulsd 0x8(%rax,%rcx,8), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movsd 0x10(%rax,%rcx,8), %xmm0
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movsd 0x10(%rax,%rcx,8), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movsd 0x18(%rax,%rcx,8), %xmm1
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movsd 0x18(%rax,%rcx,8), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movsd 0x20(%rax,%rcx,8), %xmm0
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movsd 0x20(%rax,%rcx,8), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x30(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x30(%rbp)
jmp 0x11c26
jmp 0x11cfb
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
jge 0x11d3f
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x58(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x11cfb
jmp 0x11dec
movq $0x0, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
cmpq $0x0, -0x48(%rbp)
jge 0x11d6d
movl $0x1, %eax
subq -0x40(%rbp), %rax
imulq -0x48(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x50(%rbp)
jge 0x11d86
movl $0x1, %eax
subq -0x40(%rbp), %rax
imulq -0x50(%rbp), %rax
movq %rax, -0x68(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
jge 0x11dea
movq -0x10(%rbp), %rax
movq -0x60(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x20(%rbp), %rax
movq -0x68(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x58(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x48(%rbp), %rax
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rax
addq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x11d8e
jmp 0x11dec
jmp 0x11dee
movsd -0x58(%rbp), %xmm0
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop