// File: /workspace/github_cpp_makefile_star2_O1/mouda[P]LTE_random_access-simulate/alglibinternal.cpp
// Function: alglib_impl::ftbase_ffticltrec(alglib_impl::ae_vector*, long, long, alglib_impl::ae_vector*, long, long, long, long, alglib_impl::ae_state*)
static void ftbase_ffticltrec(/* Real    */ ae_vector* a,
     ae_int_t astart,
     ae_int_t astride,
     /* Real    */ ae_vector* b,
     ae_int_t bstart,
     ae_int_t bstride,
     ae_int_t m,
     ae_int_t n,
     ae_state *_state)
{
    ae_int_t i;
    ae_int_t j;
    ae_int_t idx1;
    ae_int_t idx2;
    ae_int_t m2;
    ae_int_t m1;
    ae_int_t n1;


    if( m==0||n==0 )
    {
        return;
    }
    if( ae_maxint(m, n, _state)<=8 )
    {
        m2 = 2*bstride;
        for(i=0; i<=m-1; i++)
        {
            idx1 = bstart+2*i;
            idx2 = astart+2*i*astride;
            for(j=0; j<=n-1; j++)
            {
                b->ptr.p_double[idx1+0] = a->ptr.p_double[idx2+0];
                b->ptr.p_double[idx1+1] = a->ptr.p_double[idx2+1];
                idx1 = idx1+m2;
                idx2 = idx2+2;
            }
        }
        return;
    }
    if( n>m )
    {
        
        /*
         * New partition:
         *
         * "A^T -> B" becomes "(A1 A2)^T -> ( B1 )
         *                                  ( B2 )
         */
        n1 = n/2;
        if( n-n1>=8&&n1%8!=0 )
        {
            n1 = n1+(8-n1%8);
        }
        ae_assert(n-n1>0, "Assertion failed", _state);
        ftbase_ffticltrec(a, astart, astride, b, bstart, bstride, m, n1, _state);
        ftbase_ffticltrec(a, astart+2*n1, astride, b, bstart+2*n1*bstride, bstride, m, n-n1, _state);
    }
    else
    {
        
        /*
         * New partition:
         *
         * "A^T -> B" becomes "( A1 )^T -> ( B1 B2 )
         *                     ( A2 )
         */
        m1 = m/2;
        if( m-m1>=8&&m1%8!=0 )
        {
            m1 = m1+(8-m1%8);
        }
        ae_assert(m-m1>0, "Assertion failed", _state);
        ftbase_ffticltrec(a, astart, astride, b, bstart, bstride, m1, n, _state);
        ftbase_ffticltrec(a, astart+2*m1*astride, astride, b, bstart+2*m1, bstride, m-m1, n, _state);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movq %r8, %rbp
movq %rcx, %r15
movq %rdx, 0x8(%rsp)
movq %rdi, %r13
movq 0x68(%rsp), %rax
movq %rax, (%rsp)
movq 0x60(%rsp), %rdi
movq %r9, 0x20(%rsp)
movq %rsi, %rbx
movq %rdi, 0x10(%rsp)
testq %rdi, %rdi
je 0x252a7
cmpq $0x0, (%rsp)
je 0x252a7
movq (%rsp), %rsi
movq 0x70(%rsp), %rdx
movq %rdi, %r12
callq 0x2660b
cmpq $0x8, %rax
jle 0x2523a
movq %rbp, 0x18(%rsp)
cmpq %r12, (%rsp)
jle 0x25196
movq (%rsp), %rax
movq %rax, %rbp
shrq $0x3f, %rbp
addq %rax, %rbp
sarq %rbp
subq %rbp, %rax
cmpq $0x8, %rax
jl 0x2512b
leaq 0x7(%rbp), %rcx
testq %rbp, %rbp
cmovnsq %rbp, %rcx
andq $-0x8, %rcx
movq %rbp, %rax
subq %rcx, %rax
je 0x2512b
subq %rax, %rbp
addq $0x8, %rbp
xorl %edi, %edi
subq %rbp, (%rsp)
setg %dil
leaq 0x11efb(%rip), %rsi     # 0x37037
movq 0x70(%rsp), %rdx
callq 0x2581c
subq $0x8, %rsp
movq %r13, %rdi
movq %rbx, %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rcx
movq 0x20(%rsp), %r12
movq %r12, %r8
movq %r14, %r9
pushq 0x78(%rsp)
pushq %rbp
movq 0x28(%rsp), %r14
pushq %r14
callq 0x2507b
movq %r14, %rdi
movq 0x40(%rsp), %r14
addq $0x20, %rsp
leaq (%rbx,%rbp,2), %rbx
addq %rbp, %rbp
imulq %r14, %rbp
addq %rbp, %r12
movq %r12, %rbp
jmp 0x250b5
movq %r12, %rbp
shrq $0x3f, %rbp
addq %r12, %rbp
sarq %rbp
movq %r12, %rax
subq %rbp, %rax
cmpq $0x8, %rax
jl 0x251cd
leaq 0x7(%rbp), %rcx
testq %rbp, %rbp
cmovnsq %rbp, %rcx
andq $-0x8, %rcx
movq %rbp, %rax
subq %rcx, %rax
je 0x251cd
subq %rax, %rbp
addq $0x8, %rbp
xorl %edi, %edi
subq %rbp, %r12
movq %r12, 0x10(%rsp)
setg %dil
leaq 0x11e55(%rip), %rsi     # 0x37037
movq 0x70(%rsp), %rdx
callq 0x2581c
subq $0x8, %rsp
movq %r13, %rdi
movq %rbx, %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rcx
movq 0x20(%rsp), %r12
movq %r12, %r8
movq %r14, %r9
pushq 0x78(%rsp)
pushq 0x10(%rsp)
pushq %rbp
callq 0x2507b
movq 0x30(%rsp), %rdi
addq $0x20, %rsp
leaq (,%rbp,2), %rsi
imulq 0x8(%rsp), %rsi
addq %rbx, %rsi
leaq (%r12,%rbp,2), %rbp
jmp 0x250ad
testq %r12, %r12
jle 0x252a7
shlq $0x3, %rbx
shlq $0x4, 0x8(%rsp)
shlq $0x3, %rbp
shlq $0x4, %r14
xorl %eax, %eax
cmpq $0x0, (%rsp)
jle 0x25296
movq (%rsp), %rcx
movq %rbp, %rdx
movq %rbx, %rsi
movq 0x28(%r13), %rdi
movsd (%rdi,%rsi), %xmm0
movq 0x28(%r15), %rdi
movsd %xmm0, (%rdi,%rdx)
movq 0x28(%r13), %rdi
movsd 0x8(%rdi,%rsi), %xmm0
movq 0x28(%r15), %rdi
movsd %xmm0, 0x8(%rdi,%rdx)
addq $0x10, %rsi
addq %r14, %rdx
decq %rcx
jne 0x25264
incq %rax
addq 0x8(%rsp), %rbx
addq $0x10, %rbp
cmpq %r12, %rax
jne 0x25253
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq