// File: /workspace/github_cpp_makefile_star2_O2/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 $0x48, %rsp
movq %r9, (%rsp)
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, 0x28(%rsp)
movq %rdi, 0x20(%rsp)
xorps %xmm2, %xmm2
movsd %xmm0, 0x38(%rsp)
movsd %xmm1, 0x40(%rsp)
callq 0x25a3c
movq %r14, 0x30(%rsp)
cmpq %r14, %r12
jg 0x17a4f
cmpq (%rsp), %rbx
jg 0x17a4f
testb %al, %al
jne 0x17a4f
movq %rbx, %r15
shlq $0x4, %r15
movq %rbx, %r14
leaq 0x8(%r15), %rbx
movq %r14, 0x18(%rsp)
cmpq (%rsp), %r14
jg 0x17905
xorps %xmm0, %xmm0
callq 0x25861
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rax
movsd %xmm0, -0x8(%rax,%rbx)
movsd %xmm1, (%rax,%rbx)
incq %r14
addq $0x10, %rbx
jmp 0x178d7
pushq $0x3
popq %r13
movq %r12, %r14
cmpq 0x30(%rsp), %r14
jg 0x179aa
movq 0x28(%rsp), %rax
movq 0x28(%rax), %rax
leaq 0x1(%r14), %rbx
movsd -0x8(%rax,%r13,8), %xmm0
movsd (%rax,%r13,8), %xmm1
movq 0x88(%rsp), %rdi
callq 0x25873
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x8(%rsp)
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rbp
addq %r15, %rbp
movq 0x20(%rsp), %rax
movq 0x38(%rax), %rax
movq (%rax,%r14,8), %r14
addq %r15, %r14
movq 0x18(%rsp), %rdi
movq (%rsp), %rsi
callq 0x26b4d
movq %rbp, %rdi
pushq $0x1
popq %rcx
movq %rcx, %rsi
movq %r14, %rdx
leaq 0x1c2aa(%rip), %r8      # 0x33c34
movq %rax, %r9
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
callq 0x26349
addq $0x2, %r13
movq %rbx, %r14
jmp 0x1790c
pushq $0x3
popq %r13
movq 0x18(%rsp), %rbx
cmpq 0x30(%rsp), %r12
jg 0x17a4f
movq 0x28(%rsp), %rax
movq 0x28(%rax), %rax
movsd -0x8(%rax,%r13,8), %xmm0
movsd (%rax,%r13,8), %xmm1
movsd 0x38(%rsp), %xmm2
movsd 0x40(%rsp), %xmm3
callq 0x2596d
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq 0x38(%rax), %rax
movq (%rax,%r12,8), %r14
addq %r15, %r14
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rbp
addq %r15, %rbp
movq %rbx, %rdi
movq (%rsp), %rsi
callq 0x26b4d
movq %r14, %rdi
pushq $0x1
popq %rcx
movq %rcx, %rsi
movq %rbp, %rdx
leaq 0x1c205(%rip), %r8      # 0x33c34
movq %rax, %r9
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
callq 0x265a9
incq %r12
addq $0x2, %r13
jmp 0x179b3
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq