// File: /workspace/github_cpp_makefile_star2_O1/mouda[P]LTE_random_access-simulate/alglibinternal.cpp
// Function: alglib_impl::complexapplyreflectionfromtheleft(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 complexapplyreflectionfromtheleft(/* 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^T * conj(v)
     */
    vm = m2-m1+1;
    for(i=n1; i<=n2; i++)
    {
        work->ptr.p_complex[i] = ae_complex_from_d(0);
    }
    for(i=m1; i<=m2; i++)
    {
        t = ae_c_conj(v->ptr.p_complex[i+1-m1], _state);
        ae_v_caddc(&work->ptr.p_complex[n1], 1, &c->ptr.pp_complex[i][n1], 1, "N", ae_v_len(n1,n2), t);
    }
    
    /*
     * C := C - tau * v * w^T
     */
    for(i=m1; i<=m2; i++)
    {
        t = ae_c_mul(v->ptr.p_complex[i-m1+1],tau);
        ae_v_csubc(&c->ptr.pp_complex[i][n1], 1, &work->ptr.p_complex[n1], 1, "N", ae_v_len(n1,n2), t);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %rbx
movq %r8, %rbp
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r13
xorps %xmm2, %xmm2
movsd %xmm0, 0x48(%rsp)
movsd %xmm1, 0x50(%rsp)
callq 0x28050
cmpq %r14, %r12
jg 0x19280
cmpq %rbx, %rbp
jg 0x19280
testb %al, %al
jne 0x19280
movq %r13, 0x38(%rsp)
movq %r15, 0x18(%rsp)
movq %r14, (%rsp)
movq %rbx, %r14
incq %rbx
movq %rbp, %rax
shlq $0x4, %rax
movq %rax, %r13
leaq 0x8(%rax), %r15
xorps %xmm0, %xmm0
callq 0x27e6b
movq 0x90(%rsp), %rax
movq 0x28(%rax), %rax
movsd %xmm0, -0x8(%rax,%r15)
movsd %xmm1, (%rax,%r15)
decq %rbx
addq $0x10, %r15
cmpq %rbx, %rbp
jne 0x190c9
cmpq (%rsp), %r12
movq %r14, 0x28(%rsp)
movq %rbp, 0x30(%rsp)
movq 0x18(%rsp), %rcx
movq 0x98(%rsp), %r14
movq %r13, 0x20(%rsp)
jg 0x191cc
movq (%rsp), %rax
incq %rax
movq %rax, 0x40(%rsp)
movl $0x3, %ebp
movq %r12, %r13
movq 0x28(%rcx), %rax
leaq 0x1(%r13), %rbx
movsd -0x8(%rax,%rbp,8), %xmm0
movsd (%rax,%rbp,8), %xmm1
movq %r14, %rdi
callq 0x27e7d
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x8(%rsp)
movq 0x90(%rsp), %rax
movq 0x28(%rax), %r15
movq 0x20(%rsp), %rcx
addq %rcx, %r15
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rax
movq (%rax,%r13,8), %r13
addq %rcx, %r13
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x2923f
movl $0x1, %esi
movl $0x1, %ecx
movq %r15, %rdi
movq %r13, %rdx
leaq 0x1e923(%rip), %r8      # 0x37ac4
movq %rax, %r9
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
callq 0x28a25
movq 0x18(%rsp), %rcx
addq $0x2, %rbp
movq %rbx, %r13
cmpq %rbx, 0x40(%rsp)
jne 0x19130
movq (%rsp), %rbx
cmpq %rbx, %r12
movq 0x20(%rsp), %r14
jg 0x19280
incq %rbx
movl $0x3, %ebp
movq 0x28(%rcx), %rax
movsd -0x8(%rax,%rbp,8), %xmm0
movsd (%rax,%rbp,8), %xmm1
movsd 0x48(%rsp), %xmm2
movsd 0x50(%rsp), %xmm3
callq 0x27f95
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x8(%rsp)
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rax
movq (%rax,%r12,8), %r15
addq %r14, %r15
movq 0x90(%rsp), %rax
movq 0x28(%rax), %r13
addq %r14, %r13
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x2923f
movl $0x1, %esi
movl $0x1, %ecx
movq %r15, %rdi
movq %r13, %rdx
leaq 0x1e86d(%rip), %r8      # 0x37ac4
movq %rax, %r9
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
callq 0x28cd6
movq 0x18(%rsp), %rcx
incq %r12
addq $0x2, %rbp
cmpq %r12, %rbx
jne 0x191e6
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq