// File: /workspace/github_cpp_makefile_star2_O2/mouda[P]LTE_random_access-simulate/alglibinternal.cpp
// Function: alglib_impl::hermitianrank2update(alglib_impl::ae_matrix*, bool, long, long, alglib_impl::ae_vector*, alglib_impl::ae_vector*, alglib_impl::ae_vector*, alglib_impl::ae_complex, alglib_impl::ae_state*)
void hermitianrank2update(/* Complex */ ae_matrix* a,
     ae_bool isupper,
     ae_int_t i1,
     ae_int_t i2,
     /* Complex */ ae_vector* x,
     /* Complex */ ae_vector* y,
     /* Complex */ ae_vector* t,
     ae_complex alpha,
     ae_state *_state)
{
    ae_int_t i;
    ae_int_t tp1;
    ae_int_t tp2;
    ae_complex v;


    if( isupper )
    {
        for(i=i1; i<=i2; i++)
        {
            tp1 = i+1-i1;
            tp2 = i2-i1+1;
            v = ae_c_mul(alpha,x->ptr.p_complex[i+1-i1]);
            ae_v_cmovec(&t->ptr.p_complex[tp1], 1, &y->ptr.p_complex[tp1], 1, "Conj", ae_v_len(tp1,tp2), v);
            v = ae_c_mul(ae_c_conj(alpha, _state),y->ptr.p_complex[i+1-i1]);
            ae_v_caddc(&t->ptr.p_complex[tp1], 1, &x->ptr.p_complex[tp1], 1, "Conj", ae_v_len(tp1,tp2), v);
            ae_v_cadd(&a->ptr.pp_complex[i][i], 1, &t->ptr.p_complex[tp1], 1, "N", ae_v_len(i,i2));
        }
    }
    else
    {
        for(i=i1; i<=i2; i++)
        {
            tp1 = 1;
            tp2 = i+1-i1;
            v = ae_c_mul(alpha,x->ptr.p_complex[i+1-i1]);
            ae_v_cmovec(&t->ptr.p_complex[tp1], 1, &y->ptr.p_complex[tp1], 1, "Conj", ae_v_len(tp1,tp2), v);
            v = ae_c_mul(ae_c_conj(alpha, _state),y->ptr.p_complex[i+1-i1]);
            ae_v_caddc(&t->ptr.p_complex[tp1], 1, &x->ptr.p_complex[tp1], 1, "Conj", ae_v_len(tp1,tp2), v);
            ae_v_cadd(&a->ptr.pp_complex[i][i1], 1, &t->ptr.p_complex[tp1], 1, "N", ae_v_len(i1,i));
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movsd %xmm1, 0x38(%rsp)
movsd %xmm0, 0x30(%rsp)
movq %r9, 0x58(%rsp)
movq %r8, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq %rdi, 0x50(%rsp)
testl %esi, %esi
movq %rdx, 0x60(%rsp)
je 0x16cb0
movq 0x20(%rsp), %rax
subq %rdx, %rax
incq %rax
movq %rax, 0x40(%rsp)
leaq (,%rdx,8), %rax
movq %rax, 0x70(%rsp)
shlq $0x4, %rdx
movq %rdx, 0x68(%rsp)
xorl %ebp, %ebp
xorl %r15d, %r15d
movq 0x60(%rsp), %rax
leaq (%rax,%rbp), %rdx
cmpq 0x20(%rsp), %rdx
jg 0x16e68
leaq 0x1(%rbp), %r12
movq %r12, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq 0x28(%rax), %rax
movsd 0x10(%rax,%r15), %xmm2
movsd 0x18(%rax,%r15), %xmm3
movsd 0x30(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movq %rbp, 0x48(%rsp)
movq %rdx, 0x18(%rsp)
callq 0x2596d
movsd %xmm0, (%rsp)
movsd %xmm1, 0x8(%rsp)
leaq 0x10(%r15), %r13
movq 0xb0(%rsp), %rax
movq 0x28(%rax), %rbx
addq %r13, %rbx
movq 0x58(%rsp), %rbp
movq 0x28(%rbp), %r14
addq %r13, %r14
movq %r12, %rdi
movq 0x40(%rsp), %r12
movq %r12, %rsi
callq 0x26b4d
movq %rbx, %rdi
pushq $0x1
popq %rcx
movq %rcx, %rsi
movq %r14, %rdx
leaq 0x1c428(%rip), %r8      # 0x32fd6
movq %rax, %r9
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
callq 0x25fdb
movsd 0x30(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movq 0xb8(%rsp), %rdi
callq 0x25873
movq 0x28(%rbp), %rax
movsd 0x10(%rax,%r15), %xmm2
movsd 0x18(%rax,%r15), %xmm3
callq 0x2596d
movsd %xmm0, (%rsp)
movsd %xmm1, 0x8(%rsp)
movq 0xb0(%rsp), %rax
movq 0x28(%rax), %rbx
addq %r13, %rbx
movq 0x28(%rsp), %rax
movq 0x28(%rax), %r14
addq %r13, %r14
movq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0x26b4d
movq %rbx, %rdi
pushq $0x1
popq %rcx
movq %rcx, %rsi
movq %r14, %rdx
movq %rcx, %r12
leaq 0x1c399(%rip), %r8      # 0x32fd6
movq %rax, %r9
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
callq 0x26349
movq 0x50(%rsp), %rax
movq 0x38(%rax), %rax
addq 0x70(%rsp), %rax
movq 0x48(%rsp), %rcx
movq (%rax,%rcx,8), %rbx
addq 0x68(%rsp), %rbx
addq %r15, %rbx
movq 0xb0(%rsp), %rax
movq 0x28(%rax), %r14
addq %r13, %r14
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x26b4d
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r12, %rcx
leaq 0x1cf94(%rip), %r8      # 0x33c34
movq %rax, %r9
callq 0x2616a
movq %r13, %r15
jmp 0x16b12
leaq (,%rdx,8), %rax
movq %rax, 0x8(%rsp)
pushq $0x3
popq %rcx
xorl %r15d, %r15d
movq %rdx, %rax
shlq $0x4, %rax
movq %rax, 0x40(%rsp)
pushq $0x1
popq %rbp
leaq (%rdx,%r15), %r12
cmpq 0x20(%rsp), %r12
jg 0x16e68
leaq 0x1(%r15), %r13
movq 0x28(%rsp), %rax
movq 0x28(%rax), %rax
movsd -0x8(%rax,%rcx,8), %xmm2
movsd (%rax,%rcx,8), %xmm3
movsd 0x30(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movq %r15, 0x48(%rsp)
movq %rcx, 0x18(%rsp)
callq 0x2596d
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, (%rsp)
movq 0xb0(%rsp), %rax
movq 0x28(%rax), %rbx
addq $0x10, %rbx
movq 0x58(%rsp), %r15
movq 0x28(%r15), %r14
addq $0x10, %r14
movq %rbp, %rdi
movq %r13, %rsi
callq 0x26b4d
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %rbp, %rcx
leaq 0x1c27c(%rip), %r8      # 0x32fd6
movq %rax, %r9
movsd 0x10(%rsp), %xmm0
movsd (%rsp), %xmm1
callq 0x25fdb
movsd 0x30(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movq 0xb8(%rsp), %rdi
callq 0x25873
movq 0x28(%r15), %rax
movq 0x18(%rsp), %rcx
movsd -0x8(%rax,%rcx,8), %xmm2
movq 0x18(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm3
callq 0x2596d
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, (%rsp)
movq 0xb0(%rsp), %rax
movq 0x28(%rax), %rbx
addq $0x10, %rbx
movq 0x28(%rsp), %rax
movq 0x28(%rax), %r14
addq $0x10, %r14
movq %rbp, %rdi
movq %r13, %r15
movq %r13, %rsi
callq 0x26b4d
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %rbp, %rcx
leaq 0x1c1e9(%rip), %r8      # 0x32fd6
movq %rax, %r9
movsd 0x10(%rsp), %xmm0
movsd (%rsp), %xmm1
callq 0x26349
movq 0x50(%rsp), %rax
movq 0x38(%rax), %rax
addq 0x8(%rsp), %rax
movq 0x48(%rsp), %rcx
movq (%rax,%rcx,8), %rbx
addq 0x40(%rsp), %rbx
movq 0xb0(%rsp), %rax
movq 0x28(%rax), %r14
addq $0x10, %r14
movq 0x60(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x26b4d
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %rbp, %rcx
leaq 0x1cde5(%rip), %r8      # 0x33c34
movq %rax, %r9
callq 0x2616a
movq 0x18(%rsp), %rcx
addq $0x2, %rcx
movq %r13, %rdx
jmp 0x16cd2
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq