// File: /workspace/github_cpp_makefile_star2_O1/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 $0x68, %rsp
movsd %xmm1, 0x40(%rsp)
movsd %xmm0, 0x38(%rsp)
movq %rcx, (%rsp)
movq %rdx, %r13
movq 0xa0(%rsp), %rbx
testl %esi, %esi
movq %r8, 0x30(%rsp)
movq %rdi, 0x48(%rsp)
je 0x183ec
cmpq (%rsp), %r13
movq %r9, 0x60(%rsp)
jg 0x185b4
movq (%rsp), %rax
movq %rax, %rcx
subq %r13, %rcx
incq %rcx
movq %rcx, 0x28(%rsp)
notq %rax
movq %rax, 0x58(%rsp)
movq %r13, %rax
shlq $0x4, %rax
movq %rax, 0x50(%rsp)
movl $0x1, %r15d
xorl %ebp, %ebp
movq %r13, 0x18(%rsp)
leaq 0x1(%r13), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%r8), %rax
movsd 0x10(%rax,%rbp), %xmm2
movsd 0x18(%rax,%rbp), %xmm3
movsd 0x38(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
callq 0x27f95
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x8(%rsp)
leaq 0x10(%rbp), %r14
movq 0x28(%rbx), %r12
addq %r14, %r12
movq 0x60(%rsp), %r13
movq 0x28(%r13), %rbx
addq %r14, %rbx
movq %r15, %rdi
movq 0x28(%rsp), %rsi
callq 0x2923f
movl $0x1, %esi
movl $0x1, %ecx
movq %r12, %rdi
movq %rbx, %rdx
leaq 0x1eb92(%rip), %r8      # 0x36e5e
movq %rax, %r9
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
callq 0x28647
movsd 0x38(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movq 0xa8(%rsp), %rdi
callq 0x27e7d
movq 0x28(%r13), %rax
movsd 0x10(%rax,%rbp), %xmm2
movsd 0x18(%rax,%rbp), %xmm3
callq 0x27f95
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x8(%rsp)
movq 0xa0(%rsp), %rax
movq 0x28(%rax), %rbx
addq %r14, %rbx
movq 0x30(%rsp), %rax
movq 0x28(%rax), %r12
addq %r14, %r12
movq %r15, %rdi
movq 0x28(%rsp), %rsi
callq 0x2923f
movl $0x1, %esi
movl $0x1, %ecx
movq %rbx, %rdi
movq %r12, %rdx
leaq 0x1eb05(%rip), %r8      # 0x36e5e
movq %rax, %r9
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
callq 0x28a25
movq 0x48(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x18(%rsp), %rdi
movq (%rax,%rdi,8), %rbx
addq 0x50(%rsp), %rbx
addq %rbp, %rbx
movq 0xa0(%rsp), %rax
movq 0x28(%rax), %r12
addq %r14, %r12
movq (%rsp), %rsi
callq 0x2923f
movl $0x1, %esi
movl $0x1, %ecx
movq %rbx, %rdi
movq 0xa0(%rsp), %rbx
movq %r12, %rdx
leaq 0x1f706(%rip), %r8      # 0x37ac4
movq %rax, %r9
callq 0x287ca
movq 0x30(%rsp), %r8
incq %r15
movq 0x58(%rsp), %rax
movq %r14, %rbp
movq 0x20(%rsp), %rcx
movq %rcx, %r13
addq %rcx, %rax
jne 0x18256
jmp 0x185b4
movq %r13, %rcx
subq (%rsp), %rcx
jg 0x185b4
movq %r9, %rbp
leaq (,%r13,8), %rax
movq %rax, 0x8(%rsp)
movl $0x1, %r15d
movl $0x3, %r14d
movq %r13, %rax
shlq $0x4, %rax
movq %rax, (%rsp)
movq %rcx, 0x10(%rsp)
leaq (%r15,%r13), %rax
decq %rax
movq %rax, 0x28(%rsp)
movq 0x28(%r8), %rax
movsd -0x8(%rax,%r14,8), %xmm2
movsd (%rax,%r14,8), %xmm3
movsd 0x38(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
callq 0x27f95
movsd %xmm0, 0x20(%rsp)
movsd %xmm1, 0x18(%rsp)
movq 0xa0(%rsp), %rax
movq 0x28(%rax), %rbx
addq $0x10, %rbx
movq 0x28(%rbp), %r12
addq $0x10, %r12
movl $0x1, %edi
movq %r15, %rsi
callq 0x2923f
movl $0x1, %esi
movl $0x1, %ecx
movq %rbx, %rdi
movq %r12, %rdx
leaq 0x1e9c3(%rip), %r8      # 0x36e5e
movq %rax, %r9
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
callq 0x28647
movsd 0x38(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movq 0xa8(%rsp), %rdi
callq 0x27e7d
movq 0x28(%rbp), %rax
movsd -0x8(%rax,%r14,8), %xmm2
movsd (%rax,%r14,8), %xmm3
callq 0x27f95
movsd %xmm0, 0x20(%rsp)
movsd %xmm1, 0x18(%rsp)
movq 0xa0(%rsp), %rax
movq 0x28(%rax), %rbx
addq $0x10, %rbx
movq 0x30(%rsp), %rax
movq 0x28(%rax), %r12
addq $0x10, %r12
movl $0x1, %edi
movq %r15, %rsi
callq 0x2923f
movl $0x1, %esi
movl $0x1, %ecx
movq %rbx, %rdi
movq %r12, %rdx
leaq 0x1e933(%rip), %r8      # 0x36e5e
movq %rax, %r9
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
callq 0x28a25
movq 0x48(%rsp), %rax
movq 0x38(%rax), %rax
addq 0x8(%rsp), %rax
movq -0x8(%rax,%r15,8), %rbx
addq (%rsp), %rbx
movq 0xa0(%rsp), %rax
movq 0x28(%rax), %r12
addq $0x10, %r12
movq %r13, %rdi
movq 0x28(%rsp), %rsi
callq 0x2923f
movl $0x1, %esi
movl $0x1, %ecx
movq %rbx, %rdi
movq %r12, %rdx
leaq 0x1f53a(%rip), %r8      # 0x37ac4
movq %rax, %r9
callq 0x287ca
movq 0x10(%rsp), %rcx
movq 0x30(%rsp), %r8
leaq (%rcx,%r15), %rax
incq %rax
incq %r15
addq $0x2, %r14
cmpq $0x2, %rax
jne 0x18425
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq