// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %r14
pushq %rbx
movq 0x18(%rsp), %rax
movb (%rdx), %r10b
andb $-0x21, %r10b
cmpb $0x4e, %r10b
setne %r11b
movb (%r9), %r9b
andb $-0x21, %r9b
cmpb $0x4e, %r9b
setne %dl
testq %rax, %rax
setg %bl
andb %dl, %bl
andb %r11b, %bl
xorpd %xmm1, %xmm1
cmpb $0x1, %bl
jne 0x28211
movq %rsi, %r11
shlq $0x4, %r11
movq %r8, %rbx
shlq $0x4, %rbx
xorpd %xmm0, %xmm0
movapd 0xc019(%rip), %xmm2     # 0x341e0
movq %rax, %r14
movsd (%rdi), %xmm3
movsd 0x8(%rdi), %xmm4
movsd (%rcx), %xmm5
movsd 0x8(%rcx), %xmm6
movapd %xmm6, %xmm7
xorpd %xmm2, %xmm7
mulsd %xmm4, %xmm6
mulsd %xmm3, %xmm7
mulsd %xmm5, %xmm3
subsd %xmm6, %xmm3
addsd %xmm3, %xmm0
mulsd %xmm4, %xmm5
subsd %xmm5, %xmm7
addsd %xmm7, %xmm1
addq %r11, %rdi
addq %rbx, %rcx
decq %r14
jne 0x281ca
jmp 0x28215
xorpd %xmm0, %xmm0
cmpb $0x4e, %r10b
jne 0x2827c
cmpb $0x4e, %r9b
je 0x2827c
testq %rax, %rax
jle 0x2827c
movq %rsi, %r11
shlq $0x4, %r11
movq %r8, %rbx
shlq $0x4, %rbx
movq %rax, %r14
movsd (%rdi), %xmm2
movsd 0x8(%rdi), %xmm3
movsd (%rcx), %xmm4
movsd 0x8(%rcx), %xmm5
movapd %xmm3, %xmm6
mulsd %xmm5, %xmm6
movapd %xmm2, %xmm7
mulsd %xmm4, %xmm7
addsd %xmm6, %xmm7
addsd %xmm7, %xmm0
mulsd %xmm4, %xmm3
mulsd %xmm5, %xmm2
subsd %xmm2, %xmm3
addsd %xmm3, %xmm1
addq %r11, %rdi
addq %rbx, %rcx
decq %r14
jne 0x28237
cmpb $0x4e, %r10b
je 0x282e9
cmpb $0x4e, %r9b
setne %dl
testq %rax, %rax
setle %r9b
orb %dl, %r9b
movb $0x1, %dl
jne 0x282e9
movq %rsi, %r9
shlq $0x4, %r9
movq %r8, %r10
shlq $0x4, %r10
movq %rax, %r11
movsd (%rdi), %xmm2
movsd 0x8(%rdi), %xmm3
movsd (%rcx), %xmm4
movsd 0x8(%rcx), %xmm5
movapd %xmm2, %xmm6
mulsd %xmm4, %xmm6
mulsd %xmm3, %xmm4
mulsd %xmm5, %xmm3
addsd %xmm3, %xmm6
addsd %xmm6, %xmm0
mulsd %xmm5, %xmm2
subsd %xmm4, %xmm2
addsd %xmm2, %xmm1
addq %r9, %rdi
addq %r10, %rcx
decq %r11
jne 0x282a8
testq %rax, %rax
setle %r9b
orb %dl, %r9b
jne 0x28346
addq $0x8, %rdi
shlq $0x4, %rsi
addq $0x8, %rcx
shlq $0x4, %r8
movsd -0x8(%rdi), %xmm2
movsd (%rdi), %xmm3
movsd -0x8(%rcx), %xmm4
movsd (%rcx), %xmm5
movapd %xmm2, %xmm6
mulsd %xmm5, %xmm2
mulsd %xmm3, %xmm5
mulsd %xmm4, %xmm6
subsd %xmm5, %xmm6
addsd %xmm6, %xmm0
mulsd %xmm4, %xmm3
addsd %xmm3, %xmm2
addsd %xmm2, %xmm1
addq %rsi, %rdi
addq %r8, %rcx
decq %rax
jne 0x28305
popq %rbx
popq %r14
retq