// File: /workspace/github_cpp_makefile_star2_O2/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 $0x28, %rsp
movq %r9, %rbx
movq %r8, %r12
movq %rcx, %r15
movq %rdx, 0x8(%rsp)
movq %rdi, %rbp
movq 0x68(%rsp), %r14
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x235c3
movq %rdi, 0x20(%rsp)
testq %r14, %r14
je 0x235c3
movq %rsi, (%rsp)
movq %r14, %rsi
movq 0x70(%rsp), %rdx
movq %rdi, %r13
callq 0x244a0
cmpq $0x8, %rax
jle 0x23572
movq %r12, 0x18(%rsp)
cmpq %r13, %r14
jle 0x234cb
movq %r14, %rax
cqto
pushq $0x2
popq %rcx
idivq %rcx
movq %rax, %r13
movq %r14, %rsi
subq %rax, %rsi
cmpq $0x8, %rsi
jl 0x23457
movq %r13, %rax
cqto
pushq $0x8
popq %rcx
idivq %rcx
testq %rdx, %rdx
je 0x23457
subq %rdx, %r13
addq $0x8, %r13
subq %r13, %r14
movq %r14, %rsi
movq %rsi, 0x10(%rsp)
xorl %edi, %edi
testq %rsi, %rsi
setg %dil
leaq 0xfd43(%rip), %rsi      # 0x331af
movq 0x70(%rsp), %r12
movq %r12, %rdx
callq 0x238ca
subq $0x8, %rsp
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rcx
movq 0x20(%rsp), %r14
movq %r14, %r8
movq %rbx, %r9
pushq %r12
pushq %r13
movq 0x38(%rsp), %r12
pushq %r12
callq 0x233b4
movq %r12, %rdi
movq 0x20(%rsp), %rsi
addq $0x20, %rsp
addq %r13, %rsi
imulq %rbx, %r13
addq %r13, %r14
movq %r14, %r12
movq 0x10(%rsp), %r14
jmp 0x233eb
movq %r13, %rax
cqto
pushq $0x2
popq %rsi
idivq %rsi
movq %rax, %r12
movq %r13, %r8
subq %rax, %r8
cmpq $0x8, %r8
jl 0x23502
movq %r12, %rax
cqto
pushq $0x8
popq %rsi
idivq %rsi
testq %rdx, %rdx
je 0x23502
subq %rdx, %r12
addq $0x8, %r12
subq %r12, %r13
movq %r13, %r8
movq %r8, 0x10(%rsp)
xorl %edi, %edi
testq %r8, %r8
setg %dil
leaq 0xfc98(%rip), %rsi      # 0x331af
movq 0x70(%rsp), %rdx
callq 0x238ca
subq $0x8, %rsp
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rcx
movq 0x20(%rsp), %r13
movq %r13, %r8
movq %rbx, %r9
pushq 0x78(%rsp)
pushq %r14
pushq %r12
callq 0x233b4
movq 0x20(%rsp), %rsi
addq $0x20, %rsp
movq %r12, %rax
imulq 0x8(%rsp), %rax
addq %rax, %rsi
addq %r12, %r13
movq %r13, %r12
movq 0x10(%rsp), %rdi
jmp 0x233dd
xorl %eax, %eax
testq %r14, %r14
cmovleq %rax, %r14
testq %r13, %r13
cmovleq %rax, %r13
movq (%rsp), %r10
cmpq %r13, %rax
je 0x235c3
leaq (%rax,%r12), %rcx
movq %rax, %rdx
imulq 0x8(%rsp), %rdx
addq %r10, %rdx
movq %r14, %rsi
subq $0x1, %rsi
jb 0x235be
movq 0x28(%rbp), %rdi
movsd (%rdi,%rdx,8), %xmm0
movq 0x28(%r15), %rdi
movsd %xmm0, (%rdi,%rcx,8)
addq %rbx, %rcx
incq %rdx
jmp 0x2359e
incq %rax
jmp 0x23586
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop