// File: /workspace/github_cpp_makefile_star2_O2/mouda[P]LTE_random_access-simulate/ap.cpp
// Function: alglib_impl::ae_v_cdotproduct(alglib_impl::ae_complex const*, long, char const*, alglib_impl::ae_complex const*, long, char const*, long)
ae_complex ae_v_cdotproduct(const ae_complex *v0, ae_int_t stride0, const char *conj0, const ae_complex *v1, ae_int_t stride1, const char *conj1, ae_int_t n)
{
    double rx = 0, ry = 0; 
    ae_int_t i;
    ae_bool bconj0 = !((conj0[0]=='N') || (conj0[0]=='n'));
    ae_bool bconj1 = !((conj1[0]=='N') || (conj1[0]=='n'));
    ae_complex result;
    if( bconj0 && bconj1 )
    {
        double v0x, v0y, v1x, v1y;
        for(i=0; i<n; i++, v0+=stride0, v1+=stride1)
        {
            v0x = v0->x;
            v0y = -v0->y;
            v1x = v1->x;
            v1y = -v1->y;
            rx += v0x*v1x-v0y*v1y;
            ry += v0x*v1y+v0y*v1x;
        }
    }
    if( !bconj0 && bconj1 )
    {
        double v0x, v0y, v1x, v1y;
        for(i=0; i<n; i++, v0+=stride0, v1+=stride1)
        {
            v0x = v0->x;
            v0y = v0->y;
            v1x = v1->x;
            v1y = -v1->y;
            rx += v0x*v1x-v0y*v1y;
            ry += v0x*v1y+v0y*v1x;
        }
    }
    if( bconj0 && !bconj1 )
    {
        double v0x, v0y, v1x, v1y;
        for(i=0; i<n; i++, v0+=stride0, v1+=stride1)
        {
            v0x = v0->x;
            v0y = -v0->y;
            v1x = v1->x;
            v1y = v1->y;
            rx += v0x*v1x-v0y*v1y;
            ry += v0x*v1y+v0y*v1x;
        }
    }
    if( !bconj0 && !bconj1 )
    {
        double v0x, v0y, v1x, v1y;
        for(i=0; i<n; i++, v0+=stride0, v1+=stride1)
        {
            v0x = v0->x;
            v0y = v0->y;
            v1x = v1->x;
            v1y = v1->y;
            rx += v0x*v1x-v0y*v1y;
            ry += v0x*v1y+v0y*v1x;
        }
    }
    result.x = rx;
    result.y = ry;
    return result;
}

// Assembly:
movq 0x8(%rsp), %rax
movb (%rdx), %r10b
andb $-0x21, %r10b
movb (%r9), %r9b
andb $-0x21, %r9b
cmpb $0x4e, %r9b
setne %dl
xorpd %xmm1, %xmm1
cmpb $0x4e, %r10b
jne 0x25c0d
cmpb $0x4e, %r9b
je 0x25cdc
xorl %r9d, %r9d
testq %rax, %rax
cmovgq %rax, %r9
movq %r8, %r10
shlq $0x4, %r10
movq %rsi, %r11
shlq $0x4, %r11
movapd 0xa5ea(%rip), %xmm0     # 0x301b0
subq $0x1, %r9
jb 0x25cdc
movupd (%rcx), %xmm2
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
xorpd %xmm0, %xmm3
movsd (%rdi), %xmm4
movsd 0x8(%rdi), %xmm5
unpcklpd %xmm5, %xmm5            # xmm5 = xmm5[0,0]
mulpd %xmm2, %xmm5
unpcklpd %xmm4, %xmm4            # xmm4 = xmm4[0,0]
unpcklpd %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0]
mulpd %xmm4, %xmm3
addpd %xmm5, %xmm3
addpd %xmm3, %xmm1
addq %r10, %rcx
addq %r11, %rdi
jmp 0x25bc6
cmpb $0x4e, %r9b
je 0x25c7b
xorl %edx, %edx
testq %rax, %rax
cmovgq %rax, %rdx
movq %r8, %r10
shlq $0x4, %r10
movq %rsi, %r11
shlq $0x4, %r11
movapd 0xa57e(%rip), %xmm0     # 0x301b0
subq $0x1, %rdx
jb 0x25c75
movupd (%rcx), %xmm2
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
xorpd %xmm0, %xmm3
movsd (%rdi), %xmm4
movsd 0x8(%rdi), %xmm5
unpcklpd %xmm5, %xmm5            # xmm5 = xmm5[0,0]
mulpd %xmm2, %xmm5
unpcklpd %xmm4, %xmm4            # xmm4 = xmm4[0,0]
unpcklpd %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0]
mulpd %xmm4, %xmm3
subpd %xmm5, %xmm3
addpd %xmm3, %xmm1
addq %r10, %rcx
addq %r11, %rdi
jmp 0x25c32
cmpb $0x4e, %r9b
jne 0x25ce0
xorl %edx, %edx
testq %rax, %rax
cmovgq %rax, %rdx
movq %r8, %r9
shlq $0x4, %r9
movq %rsi, %r10
shlq $0x4, %r10
movapd 0xa516(%rip), %xmm0     # 0x301b0
subq $0x1, %rdx
jb 0x25cda
movsd (%rdi), %xmm2
movsd 0x8(%rdi), %xmm3
movapd %xmm3, %xmm4
xorpd %xmm0, %xmm4
movupd (%rcx), %xmm5
unpcklpd %xmm3, %xmm4            # xmm4 = xmm4[0],xmm3[0]
mulpd %xmm5, %xmm4
shufpd $0x1, %xmm5, %xmm5      # xmm5 = xmm5[1,0]
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm5, %xmm2
addpd %xmm4, %xmm2
addpd %xmm2, %xmm1
addq %r9, %rcx
addq %r10, %rdi
jmp 0x25c9a
movb $0x1, %dl
testb %dl, %dl
je 0x25ce9
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
retq
xorl %edx, %edx
testq %rax, %rax
cmovgq %rax, %rdx
shlq $0x4, %r8
addq $0x8, %rdi
shlq $0x4, %rsi
movapd 0xa4aa(%rip), %xmm0     # 0x301b0
subq $0x1, %rdx
jb 0x25ce0
movsd -0x8(%rdi), %xmm2
movsd (%rdi), %xmm3
movapd %xmm3, %xmm4
xorpd %xmm0, %xmm4
movupd (%rcx), %xmm5
unpcklpd %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0]
mulpd %xmm5, %xmm3
shufpd $0x1, %xmm5, %xmm5      # xmm5 = xmm5[1,0]
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm5, %xmm2
addpd %xmm3, %xmm2
addpd %xmm2, %xmm1
addq %r8, %rcx
addq %rsi, %rdi
jmp 0x25d06