// File: /workspace/github_cpp_makefile_star2_O3/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
sete %dl
xorpd %xmm1, %xmm1
cmpb $0x4e, %r10b
jne 0x27a6f
cmpb $0x4e, %r9b
je 0x27b42
testq %rax, %rax
jle 0x27ba2
movq %rsi, %r9
shlq $0x4, %r9
movq %r8, %r10
shlq $0x4, %r10
movapd 0xb789(%rip), %xmm0     # 0x331b0
movq %rax, %r11
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 %r9, %rdi
addq %r10, %rcx
decq %r11
jne 0x27a2a
jmp 0x27b42
cmpb $0x4e, %r9b
je 0x27ae1
testq %rax, %rax
jle 0x27ba2
movq %rsi, %rdx
shlq $0x4, %rdx
movq %r8, %r10
shlq $0x4, %r10
movapd 0xb71c(%rip), %xmm0     # 0x331b0
movq %rax, %r11
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 %rdx, %rdi
addq %r10, %rcx
decq %r11
jne 0x27a97
cmpb $0x4e, %r9b
jne 0x27ba2
testq %rax, %rax
jle 0x27ba2
movq %rsi, %rdx
shlq $0x4, %rdx
movq %r8, %r9
shlq $0x4, %r9
movapd 0xb6b0(%rip), %xmm0     # 0x331b0
movq %rax, %r10
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 %rdx, %rdi
addq %r9, %rcx
decq %r10
jne 0x27b03
xorl %edx, %edx
testq %rax, %rax
setle %r9b
xorb $0x1, %dl
orb %r9b, %dl
jne 0x27ba2
addq $0x8, %rdi
shlq $0x4, %rsi
shlq $0x4, %r8
movapd 0xb64b(%rip), %xmm0     # 0x331b0
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 %rsi, %rdi
addq %r8, %rcx
decq %rax
jne 0x27b65
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
retq