// File: /workspace/github_c_makefile_star2_O0/zpole[P]IICV/vl/mathop_sse2.c
// Function: vl_kernel_l2_sse2_d
VL_EXPORT T
VL_XCAT(_vl_kernel_l2_sse2_, SFX)
(vl_size dimension, T const * X, T const * Y)
{
  T const * X_end = X + dimension ;
  T const * X_vec_end = X_end - VSIZE + 1 ;
  T acc ;
  VTYPE vacc = VSTZ() ;
  vl_bool dataAligned = VALIGNED(X) & VALIGNED(Y) ;

  if (dataAligned) {
    while (X < X_vec_end) {
      VTYPE a = *(VTYPE*)X ;
      VTYPE b = *(VTYPE*)Y ;
      vacc = VADD(vacc, VMUL(a,b)) ;
      X += VSIZE ;
      Y += VSIZE ;
    }
  } else {
    while (X < X_vec_end) {
      VTYPE a = VLDU(X) ;
      VTYPE b = VLDU(Y) ;
      vacc = VADD(vacc, VMUL(a,b)) ;
      X += VSIZE ;
      Y += VSIZE ;
    }
  }

  acc = VL_XCAT(_vl_vhsum_sse2_, SFX)(vacc) ;

  while (X < X_end) {
    T a = *X++ ;
    T b = *Y++ ;
    acc += a * b ;
  }
  return acc ;
}

// Assembly:
subq $0x148, %rsp            # imm = 0x148
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq %rdx, 0x88(%rsp)
movq 0x90(%rsp), %rax
movq 0x98(%rsp), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
addq $-0x8, %rax
movq %rax, 0x78(%rsp)
xorps %xmm0, %xmm0
movapd %xmm0, 0xa0(%rsp)
movapd 0xa0(%rsp), %xmm0
movapd %xmm0, 0x60(%rsp)
movq 0x90(%rsp), %rax
andq $0xf, %rax
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movq 0x88(%rsp), %rcx
andq $0xf, %rcx
cmpq $0x0, %rcx
setne %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %ecx
andl %ecx, %eax
movl %eax, 0x5c(%rsp)
cmpl $0x0, 0x5c(%rsp)
je 0x407c9
jmp 0x40700
movq 0x90(%rsp), %rax
cmpq 0x78(%rsp), %rax
jae 0x407c4
movq 0x90(%rsp), %rax
movapd (%rax), %xmm0
movapd %xmm0, 0x40(%rsp)
movq 0x88(%rsp), %rax
movapd (%rax), %xmm0
movapd %xmm0, 0x30(%rsp)
movapd 0x60(%rsp), %xmm1
movapd 0x40(%rsp), %xmm2
movapd 0x30(%rsp), %xmm0
movapd %xmm2, 0xe0(%rsp)
movapd %xmm0, 0xd0(%rsp)
movapd 0xe0(%rsp), %xmm0
mulpd 0xd0(%rsp), %xmm0
movapd %xmm1, 0x120(%rsp)
movapd %xmm0, 0x110(%rsp)
movapd 0x120(%rsp), %xmm0
addpd 0x110(%rsp), %xmm0
movapd %xmm0, 0x60(%rsp)
movq 0x90(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x90(%rsp)
movq 0x88(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x88(%rsp)
jmp 0x40700
jmp 0x408b1
jmp 0x407cb
movq 0x90(%rsp), %rax
cmpq 0x78(%rsp), %rax
jae 0x408af
movq 0x90(%rsp), %rax
movq %rax, 0x140(%rsp)
movq 0x140(%rsp), %rax
movupd (%rax), %xmm0
movapd %xmm0, 0x20(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x138(%rsp)
movq 0x138(%rsp), %rax
movupd (%rax), %xmm0
movapd %xmm0, 0x10(%rsp)
movapd 0x60(%rsp), %xmm1
movapd 0x20(%rsp), %xmm2
movapd 0x10(%rsp), %xmm0
movapd %xmm2, 0xc0(%rsp)
movapd %xmm0, 0xb0(%rsp)
movapd 0xc0(%rsp), %xmm0
mulpd 0xb0(%rsp), %xmm0
movapd %xmm1, 0x100(%rsp)
movapd %xmm0, 0xf0(%rsp)
movapd 0x100(%rsp), %xmm0
addpd 0xf0(%rsp), %xmm0
movapd %xmm0, 0x60(%rsp)
movq 0x90(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x90(%rsp)
movq 0x88(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x88(%rsp)
jmp 0x407cb
jmp 0x408b1
movapd 0x60(%rsp), %xmm0
callq 0x3f280
movsd %xmm0, 0x70(%rsp)
movq 0x90(%rsp), %rax
cmpq 0x80(%rsp), %rax
jae 0x40936
movq 0x90(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x90(%rsp)
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x88(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x88(%rsp)
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movsd 0x8(%rsp), %xmm0
movsd (%rsp), %xmm2
movsd 0x70(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x70(%rsp)
jmp 0x408c2
movsd 0x70(%rsp), %xmm0
addq $0x148, %rsp            # imm = 0x148
retq
nopw %cs:(%rax,%rax)