// File: /workspace/github_cpp_makefile_star2_O2/mouda[P]LTE_random_access-simulate/alglibinternal.cpp
// Function: alglib_impl::ftbase_ftbaseprecomputeplanrec(alglib_impl::ftplan*, long, long, alglib_impl::ae_state*)
static void ftbase_ftbaseprecomputeplanrec(ftplan* plan,
     ae_int_t entryoffset,
     ae_int_t stackptr,
     ae_state *_state)
{
    ae_frame _frame_block;
    ae_int_t i;
    ae_int_t n1;
    ae_int_t n2;
    ae_int_t n;
    ae_int_t m;
    ae_int_t offs;
    double v;
    ae_vector emptyarray;
    double bx;
    double by;

    ae_frame_make(_state, &_frame_block);
    ae_vector_init(&emptyarray, 0, DT_REAL, _state, ae_true);

    if( (plan->plan.ptr.p_int[entryoffset+3]==ftbase_fftcooleytukeyplan||plan->plan.ptr.p_int[entryoffset+3]==ftbase_fftrealcooleytukeyplan)||plan->plan.ptr.p_int[entryoffset+3]==ftbase_fhtcooleytukeyplan )
    {
        ftbase_ftbaseprecomputeplanrec(plan, plan->plan.ptr.p_int[entryoffset+5], stackptr, _state);
        ftbase_ftbaseprecomputeplanrec(plan, plan->plan.ptr.p_int[entryoffset+6], stackptr, _state);
        ae_frame_leave(_state);
        return;
    }
    if( plan->plan.ptr.p_int[entryoffset+3]==ftbase_fftcodeletplan||plan->plan.ptr.p_int[entryoffset+3]==ftbase_fhtcodeletplan )
    {
        n1 = plan->plan.ptr.p_int[entryoffset+1];
        n2 = plan->plan.ptr.p_int[entryoffset+2];
        n = n1*n2;
        if( n==3 )
        {
            offs = plan->plan.ptr.p_int[entryoffset+7];
            plan->precomputed.ptr.p_double[offs+0] = ae_cos(2*ae_pi/3, _state)-1;
            plan->precomputed.ptr.p_double[offs+1] = ae_sin(2*ae_pi/3, _state);
            ae_frame_leave(_state);
            return;
        }
        if( n==5 )
        {
            offs = plan->plan.ptr.p_int[entryoffset+7];
            v = 2*ae_pi/5;
            plan->precomputed.ptr.p_double[offs+0] = (ae_cos(v, _state)+ae_cos(2*v, _state))/2-1;
            plan->precomputed.ptr.p_double[offs+1] = (ae_cos(v, _state)-ae_cos(2*v, _state))/2;
            plan->precomputed.ptr.p_double[offs+2] = -ae_sin(v, _state);
            plan->precomputed.ptr.p_double[offs+3] = -(ae_sin(v, _state)+ae_sin(2*v, _state));
            plan->precomputed.ptr.p_double[offs+4] = ae_sin(v, _state)-ae_sin(2*v, _state);
            ae_frame_leave(_state);
            return;
        }
    }
    if( plan->plan.ptr.p_int[entryoffset+3]==ftbase_fftbluesteinplan )
    {
        ftbase_ftbaseprecomputeplanrec(plan, plan->plan.ptr.p_int[entryoffset+5], stackptr, _state);
        n = plan->plan.ptr.p_int[entryoffset+1];
        m = plan->plan.ptr.p_int[entryoffset+4];
        offs = plan->plan.ptr.p_int[entryoffset+7];
        for(i=0; i<=2*m-1; i++)
        {
            plan->precomputed.ptr.p_double[offs+i] = 0;
        }
        for(i=0; i<=n-1; i++)
        {
            bx = ae_cos(ae_pi*ae_sqr(i, _state)/n, _state);
            by = ae_sin(ae_pi*ae_sqr(i, _state)/n, _state);
            plan->precomputed.ptr.p_double[offs+2*i+0] = bx;
            plan->precomputed.ptr.p_double[offs+2*i+1] = by;
            plan->precomputed.ptr.p_double[offs+2*m+2*i+0] = bx;
            plan->precomputed.ptr.p_double[offs+2*m+2*i+1] = by;
            if( i>0 )
            {
                plan->precomputed.ptr.p_double[offs+2*(m-i)+0] = bx;
                plan->precomputed.ptr.p_double[offs+2*(m-i)+1] = by;
            }
        }
        ftbaseexecuteplanrec(&plan->precomputed, offs, plan, plan->plan.ptr.p_int[entryoffset+5], stackptr, _state);
        ae_frame_leave(_state);
        return;
    }
    ae_frame_leave(_state);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x40(%rsp), %rsi
movq %rdx, %rdi
callq 0x23815
leaq 0x58(%rsp), %rdi
pushq $0x3
popq %rdx
pushq $0x1
popq %r8
xorl %esi, %esi
movq %r15, %rcx
callq 0x239a5
movq 0x28(%r14), %rax
movq 0x18(%rax,%rbx,8), %rcx
cmpq $0x5, %rcx
ja 0x210de
pushq $0x29
popq %rdx
btq %rcx, %rdx
jae 0x20dc8
movq 0x28(%rax,%rbx,8), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x20d46
movq 0x28(%r14), %rax
movq 0x30(%rax,%rbx,8), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x20d46
jmp 0x210de
pushq $0x14
popq %rdx
btq %rcx, %rdx
jae 0x20e35
movq 0x10(%rax,%rbx,8), %rcx
imulq 0x8(%rax,%rbx,8), %rcx
cmpq $0x5, %rcx
je 0x20fc2
cmpq $0x3, %rcx
jne 0x210de
movq 0x38(%rax,%rbx,8), %rbx
movsd 0x11ce3(%rip), %xmm0    # 0x32ae0
movq %r15, %rdi
callq 0x24532
addsd 0xf3f3(%rip), %xmm0     # 0x30200
movq 0x58(%r14), %rax
movsd %xmm0, (%rax,%rbx,8)
movsd 0x11cc2(%rip), %xmm0    # 0x32ae0
movq %r15, %rdi
callq 0x2452d
movq 0x58(%r14), %rax
movsd %xmm0, 0x8(%rax,%rbx,8)
jmp 0x210de
movq 0x28(%rax,%rbx,8), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x20d46
movq 0x28(%r14), %rax
movq 0x8(%rax,%rbx,8), %rdi
movq 0x20(%rax,%rbx,8), %r12
movq 0x38(%rax,%rbx,8), %rsi
leaq (%r12,%r12), %rcx
xorl %eax, %eax
testq %rcx, %rcx
cmovgq %rcx, %rax
movq %rsi, %rcx
subq $0x1, %rax
jb 0x20e7c
movq 0x58(%r14), %rdx
andq $0x0, (%rdx,%rcx,8)
incq %rcx
jmp 0x20e68
movq %rbx, 0x18(%rsp)
movq %r15, 0x8(%rsp)
cvtsi2sd %rdi, %xmm0
movsd %xmm0, (%rsp)
xorl %ebp, %ebp
testq %rdi, %rdi
cmovleq %rbp, %rdi
movq %rdi, 0x28(%rsp)
movq %rsi, 0x10(%rsp)
leaq (,%rsi,8), %r15
shlq $0x4, %r12
movq %r12, %r13
xorl %ebx, %ebx
movq %r14, 0x20(%rsp)
cmpq %rbx, 0x28(%rsp)
je 0x20f93
cvtsi2sd %rbx, %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x2441f
movsd 0xf5ac(%rip), %xmm1     # 0x30490
mulsd %xmm1, %xmm0
divsd (%rsp), %xmm0
movq %r14, %rdi
callq 0x24532
movsd %xmm0, 0x30(%rsp)
movsd 0x38(%rsp), %xmm0
movq %r14, %rdi
callq 0x2441f
mulsd 0xf57f(%rip), %xmm0     # 0x30490
divsd (%rsp), %xmm0
movq %r14, %rdi
movq 0x20(%rsp), %r14
callq 0x2452d
movsd 0x30(%rsp), %xmm1
movq 0x58(%r14), %rax
addq %r15, %rax
movsd %xmm1, (%rbp,%rax)
movq 0x58(%r14), %rax
addq %r15, %rax
movsd %xmm0, 0x8(%rbp,%rax)
movq 0x58(%r14), %rax
addq %r15, %rax
movsd %xmm1, (%r13,%rax)
movq 0x58(%r14), %rax
addq %r15, %rax
movsd %xmm0, 0x8(%r13,%rax)
testq %rbx, %rbx
je 0x20f7f
movq 0x58(%r14), %rax
addq %r15, %rax
movsd %xmm1, (%r12,%rax)
movq 0x58(%r14), %rax
addq %r15, %rax
movsd %xmm0, 0x8(%r12,%rax)
incq %rbx
addq $0x10, %rbp
addq $0x10, %r13
addq $-0x10, %r12
jmp 0x20eb9
leaq 0x30(%r14), %rdi
movq 0x28(%r14), %rax
movq 0x18(%rsp), %rcx
movq 0x28(%rax,%rcx,8), %rcx
movq 0x10(%rsp), %rsi
movq %r14, %rdx
xorl %r8d, %r8d
movq 0x8(%rsp), %r15
movq %r15, %r9
callq 0x21380
jmp 0x210de
movq 0x38(%rax,%rbx,8), %rbx
movsd 0x11b01(%rip), %xmm0    # 0x32ad0
movq %r15, %rdi
callq 0x24532
movsd %xmm0, (%rsp)
movsd 0x11af4(%rip), %xmm0    # 0x32ad8
movq %r15, %rdi
callq 0x24532
addsd (%rsp), %xmm0
mulsd 0xf48f(%rip), %xmm0     # 0x30488
addsd 0xf1ff(%rip), %xmm0     # 0x30200
movq 0x58(%r14), %rax
movsd %xmm0, (%rax,%rbx,8)
movsd 0x11abe(%rip), %xmm0    # 0x32ad0
movq %r15, %rdi
callq 0x24532
movsd %xmm0, (%rsp)
movsd 0x11ab1(%rip), %xmm0    # 0x32ad8
movq %r15, %rdi
callq 0x24532
movsd (%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0xf448(%rip), %xmm1     # 0x30488
movq 0x58(%r14), %rax
movsd %xmm1, 0x8(%rax,%rbx,8)
movsd 0x11a7e(%rip), %xmm0    # 0x32ad0
movq %r15, %rdi
callq 0x2452d
xorps 0xf14f(%rip), %xmm0     # 0x301b0
movq 0x58(%r14), %rax
movlps %xmm0, 0x10(%rax,%rbx,8)
movsd 0x11a5e(%rip), %xmm0    # 0x32ad0
movq %r15, %rdi
callq 0x2452d
movsd %xmm0, (%rsp)
movsd 0x11a51(%rip), %xmm0    # 0x32ad8
movq %r15, %rdi
callq 0x2452d
addsd (%rsp), %xmm0
xorpd 0xf114(%rip), %xmm0     # 0x301b0
movq 0x58(%r14), %rax
movlpd %xmm0, 0x18(%rax,%rbx,8)
movsd 0x11a22(%rip), %xmm0    # 0x32ad0
movq %r15, %rdi
callq 0x2452d
movsd %xmm0, (%rsp)
movsd 0x11a15(%rip), %xmm0    # 0x32ad8
movq %r15, %rdi
callq 0x2452d
movsd (%rsp), %xmm1
subsd %xmm0, %xmm1
movq 0x58(%r14), %rax
movsd %xmm1, 0x20(%rax,%rbx,8)
movq %r15, %rdi
callq 0x237b6
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq