// File: 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
movq %rsp, %rbp
subq $0x90, %rsp
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
cmpq $0x0, 0x10(%rbp)
je 0x3a3ed
cmpq $0x0, 0x18(%rbp)
jne 0x3a3f2
jmp 0x3a728
movq 0x10(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq 0x20(%rbp), %rdx
callq 0x3c9f0
cmpq $0x8, %rax
jg 0x3a4fb
movq -0x30(%rbp), %rax
shlq %rax
movq %rax, -0x58(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jg 0x3a4f6
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq %rcx
imulq -0x18(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x18(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jg 0x3a4e3
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x50(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x48(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x50(%rbp), %rcx
movsd 0x8(%rax,%rcx,8), %xmm0
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x48(%rbp), %rcx
movsd %xmm0, 0x8(%rax,%rcx,8)
movq -0x48(%rbp), %rax
addq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x3a466
jmp 0x3a4e5
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x3a420
jmp 0x3a728
movq 0x18(%rbp), %rax
cmpq 0x10(%rbp), %rax
jle 0x3a61b
movq 0x18(%rbp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
movq %rax, -0x68(%rbp)
movq 0x18(%rbp), %rax
subq -0x68(%rbp), %rax
cmpq $0x8, %rax
jl 0x3a566
movq -0x68(%rbp), %rax
movl $0x8, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
je 0x3a566
movq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rax
movl $0x8, %ecx
cqto
idivq %rcx
movq -0x70(%rbp), %rax
movl $0x8, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq 0x18(%rbp), %rax
subq -0x68(%rbp), %rax
cmpq $0x0, %rax
setg %al
movq 0x20(%rbp), %rdx
movzbl %al, %edi
andl $0x1, %edi
leaq 0x1d985(%rip), %rsi     # 0x57f0b
callq 0x3b240
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movq 0x10(%rbp), %r11
movq -0x68(%rbp), %r10
movq 0x20(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x3a3b0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x68(%rbp), %rax
shlq %rax
addq %rax, %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x68(%rbp), %rax
shlq %rax
imulq -0x30(%rbp), %rax
addq %rax, %r8
movq -0x30(%rbp), %r9
movq 0x10(%rbp), %r11
movq 0x18(%rbp), %r10
subq -0x68(%rbp), %r10
movq 0x20(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x3a3b0
jmp 0x3a728
movq 0x10(%rbp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
movq %rax, -0x60(%rbp)
movq 0x10(%rbp), %rax
subq -0x60(%rbp), %rax
cmpq $0x8, %rax
jl 0x3a678
movq -0x60(%rbp), %rax
movl $0x8, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
je 0x3a678
movq -0x60(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x60(%rbp), %rax
movl $0x8, %ecx
cqto
idivq %rcx
movq -0x78(%rbp), %rax
movl $0x8, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq 0x10(%rbp), %rax
subq -0x60(%rbp), %rax
cmpq $0x0, %rax
setg %al
movq 0x20(%rbp), %rdx
movzbl %al, %edi
andl $0x1, %edi
leaq 0x1d873(%rip), %rsi     # 0x57f0b
callq 0x3b240
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movq -0x60(%rbp), %r11
movq 0x18(%rbp), %r10
movq 0x20(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x3a3b0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x60(%rbp), %rax
shlq %rax
imulq -0x18(%rbp), %rax
addq %rax, %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x60(%rbp), %rax
shlq %rax
addq %rax, %r8
movq -0x30(%rbp), %r9
movq 0x10(%rbp), %r11
subq -0x60(%rbp), %r11
movq 0x18(%rbp), %r10
movq 0x20(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x3a3b0
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)