// File: /workspace/github_cpp_makefile_star2_O2/mouda[P]LTE_random_access-simulate/ap.cpp
// Function: alglib_impl::_ialglib_cmv(long, long, double const*, double const*, alglib_impl::ae_complex*, double*, long, alglib_impl::ae_complex, alglib_impl::ae_complex)
void _ialglib_cmv(ae_int_t m, ae_int_t n, const double *a, const double *x, ae_complex *cy, double *dy, ae_int_t stride, ae_complex alpha, ae_complex beta)
{
    ae_int_t i, j;
    const double *pa, *parow, *pb;

    parow = a;
    for(i=0; i<m; i++)
    {
        double v0 = 0, v1 = 0;
        pa = parow;
        pb = x;
        for(j=0; j<n; j++)
        {
            v0 += pa[0]*pb[0];
            v1 += pa[0]*pb[1];
            v0 -= pa[1]*pb[1];
            v1 += pa[1]*pb[0];

            pa  += 2;
            pb  += 2;
        }
        if( cy!=NULL )
        {
            double tx = (beta.x*cy->x-beta.y*cy->y)+(alpha.x*v0-alpha.y*v1);
            double ty = (beta.x*cy->y+beta.y*cy->x)+(alpha.x*v1+alpha.y*v0);
            cy->x = tx;
            cy->y = ty;
            cy+=stride;
        }
        else
        {
            double tx = (beta.x*dy[0]-beta.y*dy[1])+(alpha.x*v0-alpha.y*v1);
            double ty = (beta.x*dy[1]+beta.y*dy[0])+(alpha.x*v1+alpha.y*v0);
            dy[0] = tx;
            dy[1] = ty;
            dy += 2*stride;
        }
        parow += 2*alglib_c_block;
    }
}

// Assembly:
pushq %rbx
movq 0x10(%rsp), %rax
shlq $0x4, %rax
xorl %r10d, %r10d
testq %rsi, %rsi
cmovleq %r10, %rsi
testq %rdi, %rdi
cmovleq %r10, %rdi
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
movapd 0x3fd4(%rip), %xmm4     # 0x301b0
cmpq %rdi, %r10
je 0x2c2c1
xorpd %xmm5, %xmm5
movq %rsi, %r11
xorl %ebx, %ebx
subq $0x1, %r11
jb 0x2c232
movupd (%rcx,%rbx), %xmm6
movsd (%rdx,%rbx), %xmm7
movsd 0x8(%rdx,%rbx), %xmm8
unpcklpd %xmm7, %xmm7            # xmm7 = xmm7[0,0]
mulpd %xmm6, %xmm7
shufpd $0x1, %xmm6, %xmm6      # xmm6 = xmm6[1,0]
addpd %xmm5, %xmm7
movapd %xmm8, %xmm5
xorpd %xmm4, %xmm5
unpcklpd %xmm8, %xmm5            # xmm5 = xmm5[0],xmm8[0]
mulpd %xmm6, %xmm5
addpd %xmm7, %xmm5
addq $0x10, %rbx
jmp 0x2c1ee
movapd %xmm5, %xmm6
unpckhpd %xmm5, %xmm6            # xmm6 = xmm6[1],xmm5[1]
xorpd %xmm4, %xmm6
unpcklpd %xmm5, %xmm6            # xmm6 = xmm6[0],xmm5[0]
mulpd %xmm1, %xmm6
mulpd %xmm0, %xmm5
addpd %xmm6, %xmm5
testq %r8, %r8
je 0x2c282
movupd (%r8), %xmm6
movapd %xmm6, %xmm7
unpckhpd %xmm6, %xmm7            # xmm7 = xmm7[1],xmm6[1]
xorpd %xmm4, %xmm7
unpcklpd %xmm6, %xmm7            # xmm7 = xmm7[0],xmm6[0]
mulpd %xmm3, %xmm7
mulpd %xmm2, %xmm6
addpd %xmm7, %xmm6
addpd %xmm6, %xmm5
movupd %xmm5, (%r8)
addq %rax, %r8
jmp 0x2c2b2
movupd (%r9), %xmm6
movapd %xmm6, %xmm7
unpckhpd %xmm6, %xmm7            # xmm7 = xmm7[1],xmm6[1]
xorpd %xmm4, %xmm7
unpcklpd %xmm6, %xmm7            # xmm7 = xmm7[0],xmm6[0]
mulpd %xmm3, %xmm7
mulpd %xmm2, %xmm6
addpd %xmm7, %xmm6
addpd %xmm6, %xmm5
movupd %xmm5, (%r9)
addq %rax, %r9
xorl %r8d, %r8d
addq $0x180, %rdx            # imm = 0x180
incq %r10
jmp 0x2c1dc
popq %rbx
retq