// File: /workspace/github_cpp_makefile_star2_O3/mouda[P]LTE_random_access-simulate/alglibinternal.cpp
// Function: alglib_impl::complexapplyreflectionfromtheright(alglib_impl::ae_matrix*, alglib_impl::ae_complex, alglib_impl::ae_vector*, long, long, long, long, alglib_impl::ae_vector*, alglib_impl::ae_state*)
void complexapplyreflectionfromtheright(/* Complex */ ae_matrix* c,
     ae_complex tau,
     /* Complex */ ae_vector* v,
     ae_int_t m1,
     ae_int_t m2,
     ae_int_t n1,
     ae_int_t n2,
     /* Complex */ ae_vector* work,
     ae_state *_state)
{
    ae_complex t;
    ae_int_t i;
    ae_int_t vm;


    if( (ae_c_eq_d(tau,0)||n1>n2)||m1>m2 )
    {
        return;
    }
    
    /*
     * w := C * v
     */
    vm = n2-n1+1;
    for(i=m1; i<=m2; i++)
    {
        t = ae_v_cdotproduct(&c->ptr.pp_complex[i][n1], 1, "N", &v->ptr.p_complex[1], 1, "N", ae_v_len(n1,n2));
        work->ptr.p_complex[i] = t;
    }
    
    /*
     * C := C - w * conj(v^T)
     */
    ae_v_cmove(&v->ptr.p_complex[1], 1, &v->ptr.p_complex[1], 1, "Conj", ae_v_len(1,vm));
    for(i=m1; i<=m2; i++)
    {
        t = ae_c_mul(work->ptr.p_complex[i],tau);
        ae_v_csubc(&c->ptr.pp_complex[i][n1], 1, &v->ptr.p_complex[1], 1, "N", ae_v_len(n1,n2), t);
    }
    ae_v_cmove(&v->ptr.p_complex[1], 1, &v->ptr.p_complex[1], 1, "Conj", ae_v_len(1,vm));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, 0x8(%rsp)
movq %rdi, %r12
movq 0x90(%rsp), %rbp
xorps %xmm2, %xmm2
movsd %xmm0, 0x40(%rsp)
movsd %xmm1, 0x48(%rsp)
callq 0x2789e
cmpq %r15, %r13
jg 0x18e22
movq %rbx, %rcx
subq %r14, %rcx
jl 0x18e22
testb %al, %al
jne 0x18e22
movq %rcx, 0x10(%rsp)
subq %r13, %r15
movq %rbx, 0x28(%rsp)
movq %r12, 0x38(%rsp)
movq %r15, 0x18(%rsp)
leaq 0x1(%r15), %r12
leaq (,%r13,8), %rbx
movq %r14, %rax
shlq $0x4, %rax
movq %rax, 0x30(%rsp)
movq %r14, 0x20(%rsp)
movq %rbp, %r14
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rax
movq (%rax,%rbx), %rbp
addq 0x30(%rsp), %rbp
movq %r14, %r15
movq 0x8(%rsp), %rax
movq 0x28(%rax), %r14
addq $0x10, %r14
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x2897c
movq %rax, (%rsp)
movl $0x1, %esi
movl $0x1, %r8d
movq %rbp, %rdi
leaq 0x1dfd6(%rip), %rdx     # 0x36ca0
movq %r14, %rcx
movq %r15, %r14
movq %rdx, %r9
callq 0x279da
movq 0x28(%r15), %rax
movsd %xmm0, (%rax,%rbx,2)
movsd %xmm1, 0x8(%rax,%rbx,2)
addq $0x8, %rbx
decq %r12
jne 0x18c80
movq 0x10(%rsp), %rsi
incq %rsi
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rbx
addq $0x10, %rbx
movl $0x1, %edi
movq %rsi, 0x10(%rsp)
callq 0x2897c
leaq 0x1d2cb(%rip), %r8      # 0x35fe6
movl $0x1, %esi
movl $0x1, %ecx
movq %rbx, %rdi
movq %rbx, %rdx
movq %rax, %r9
callq 0x27bab
movq 0x18(%rsp), %r12
incq %r12
shlq $0x3, %r13
movq 0x20(%rsp), %rbp
movq 0x28(%r14), %rax
movsd (%rax,%r13,2), %xmm0
movsd 0x8(%rax,%r13,2), %xmm1
movsd 0x40(%rsp), %xmm2
movsd 0x48(%rsp), %xmm3
callq 0x277cf
movsd %xmm0, 0x18(%rsp)
movsd %xmm1, 0x50(%rsp)
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rax
movq (%rax,%r13), %rbx
addq 0x30(%rsp), %rbx
movq 0x8(%rsp), %rax
movq 0x28(%rax), %r14
addq $0x10, %r14
movq %rbp, %rdi
movq 0x28(%rsp), %rsi
callq 0x2897c
movl $0x1, %esi
movl $0x1, %ecx
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %r14
movq 0x8(%rsp), %rbx
leaq 0x1dee3(%rip), %r8      # 0x36ca0
movq %rax, %r9
movsd 0x18(%rsp), %xmm0
movsd 0x50(%rsp), %xmm1
callq 0x2842b
addq $0x8, %r13
decq %r12
jne 0x18d44
movq 0x28(%rbx), %rbx
addq $0x10, %rbx
movl $0x1, %edi
movq 0x10(%rsp), %rsi
callq 0x2897c
leaq 0x1d1ea(%rip), %r8      # 0x35fe6
movl $0x1, %esi
movl $0x1, %ecx
movq %rbx, %rdi
movq %rbx, %rdx
movq %rax, %r9
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x27bab
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq