// File: /workspace/github_cpp_makefile_star2_O1/mouda[P]LTE_random_access-simulate/alglibinternal.cpp
// Function: alglib_impl::ftbase_fftirltrec(alglib_impl::ae_vector*, long, long, alglib_impl::ae_vector*, long, long, long, long, alglib_impl::ae_state*)
static void ftbase_fftirltrec(/* 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 m1;
    ae_int_t n1;


    if( m==0||n==0 )
    {
        return;
    }
    if( ae_maxint(m, n, _state)<=8 )
    {
        for(i=0; i<=m-1; i++)
        {
            idx1 = bstart+i;
            idx2 = astart+i*astride;
            for(j=0; j<=n-1; j++)
            {
                b->ptr.p_double[idx1] = a->ptr.p_double[idx2];
                idx1 = idx1+bstride;
                idx2 = idx2+1;
            }
        }
        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_fftirltrec(a, astart, astride, b, bstart, bstride, m, n1, _state);
        ftbase_fftirltrec(a, astart+n1, astride, b, bstart+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_fftirltrec(a, astart, astride, b, bstart, bstride, m1, n, _state);
        ftbase_fftirltrec(a, astart+m1*astride, astride, b, bstart+m1, bstride, m-m1, n, _state);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r15
movq %rdx, 0x20(%rsp)
movq %rsi, %rbx
movq %rdi, %r12
movq 0x78(%rsp), %r14
movq 0x70(%rsp), %r13
movq %rdi, 0x30(%rsp)
movq %r9, 0x10(%rsp)
movq %r8, %rbp
movq %r13, 0x18(%rsp)
testq %r13, %r13
je 0x254d5
testq %r14, %r14
je 0x254d5
movq %r13, %rdi
movq %r14, %rsi
movq 0x80(%rsp), %rdx
callq 0x2660b
cmpq $0x8, %rax
jle 0x2548b
cmpq %r13, %r14
jle 0x253d7
movq %r14, %rax
movq %r14, %r13
shrq $0x3f, %r13
addq %r14, %r13
sarq %r13
subq %r13, %rax
cmpq $0x8, %rax
jl 0x2535d
leaq 0x7(%r13), %rcx
testq %r13, %r13
cmovnsq %r13, %rcx
andq $-0x8, %rcx
movq %r13, %rax
subq %rcx, %rax
je 0x2535d
subq %rax, %r13
addq $0x8, %r13
xorl %edi, %edi
subq %r13, %r14
movq %r14, 0x8(%rsp)
setg %dil
leaq 0x11cc5(%rip), %rsi     # 0x37037
movq 0x80(%rsp), %rdx
callq 0x2581c
subq $0x8, %rsp
movq %r12, %rdi
movq %rbx, %rsi
movq 0x28(%rsp), %rdx
movq %r15, %rcx
movq %rbp, %r8
movq 0x18(%rsp), %r14
movq %r14, %r9
pushq 0x88(%rsp)
pushq %r13
movq %r15, %r12
movq 0x30(%rsp), %r15
pushq %r15
callq 0x252b6
addq $0x20, %rsp
addq %r13, %rbx
imulq %r14, %r13
addq %r13, %rbp
movq %r15, %r13
movq 0x8(%rsp), %r14
movq %r12, %r15
movq 0x30(%rsp), %r12
jmp 0x252ee
movq %r13, %rdx
shrq $0x3f, %rdx
addq %r13, %rdx
sarq %rdx
movq %r13, %rax
subq %rdx, %rax
cmpq $0x8, %rax
jl 0x2540e
leaq 0x7(%rdx), %rcx
testq %rdx, %rdx
cmovnsq %rdx, %rcx
andq $-0x8, %rcx
movq %rdx, %rax
subq %rcx, %rax
je 0x2540e
subq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rsp)
xorl %edi, %edi
subq %rdx, %r13
movq %r13, 0x18(%rsp)
setg %dil
leaq 0x11c0f(%rip), %rsi     # 0x37037
movq 0x80(%rsp), %rdx
callq 0x2581c
subq $0x8, %rsp
movq %r12, %rdi
movq %rbx, 0x30(%rsp)
movq %rbx, %rsi
movq 0x28(%rsp), %r13
movq %r13, %rdx
movq %r15, %rcx
movq %rbp, %r8
movq 0x18(%rsp), %r9
pushq 0x88(%rsp)
pushq %r14
pushq 0x20(%rsp)
callq 0x252b6
movq 0x28(%rsp), %r8
addq $0x20, %rsp
movq %r8, %rbx
imulq %r13, %rbx
movq 0x18(%rsp), %r13
addq 0x28(%rsp), %rbx
addq %rbp, %r8
jmp 0x252e6
testq %r13, %r13
movq 0x10(%rsp), %r8
jle 0x254d5
xorl %eax, %eax
testq %r14, %r14
jle 0x254cd
movq %rax, %rcx
imulq 0x20(%rsp), %rcx
addq %rbx, %rcx
leaq (%rax,%rbp), %rdx
movq %r14, %rsi
movq 0x28(%r12), %rdi
movsd (%rdi,%rcx,8), %xmm0
movq 0x28(%r15), %rdi
movsd %xmm0, (%rdi,%rdx,8)
addq %r8, %rdx
incq %rcx
decq %rsi
jne 0x254af
incq %rax
cmpq %r13, %rax
jne 0x25497
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq