// File: 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
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3b0f0
movq -0x20(%rbp), %rcx
leaq -0xa0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x3, %edx
movl $0x1, %r8d
callq 0x3b400
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
cmpq 0x30891(%rip), %rax     # 0x65820
je 0x34fc5
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
cmpq 0x30397(%rip), %rax     # 0x65340
je 0x34fc5
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
cmpq 0x30385(%rip), %rax     # 0x65348
jne 0x35017
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rax,%rcx,8), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x34f30
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rax,%rcx,8), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x34f30
movq -0x20(%rbp), %rdi
callq 0x3b030
jmp 0x35580
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
cmpq 0x30329(%rip), %rax     # 0x65358
je 0x3504f
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
cmpq 0x30317(%rip), %rax     # 0x65360
jne 0x352e3
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
imulq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x3, -0x58(%rbp)
jne 0x35101
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x38(%rax,%rcx,8), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rdi
movsd 0x227e2(%rip), %xmm0    # 0x57890
callq 0x3cbc0
movsd 0x1ff4d(%rip), %xmm1    # 0x55008
subsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x68(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x20(%rbp), %rdi
movsd 0x227b4(%rip), %xmm0    # 0x57890
callq 0x3cb90
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x68(%rbp), %rcx
movsd %xmm0, 0x8(%rax,%rcx,8)
movq -0x20(%rbp), %rdi
callq 0x3b030
jmp 0x35580
cmpq $0x5, -0x58(%rbp)
jne 0x352e1
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x38(%rax,%rcx,8), %rax
movq %rax, -0x68(%rbp)
movsd 0x2275f(%rip), %xmm0    # 0x57888
movsd %xmm0, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
movq -0x20(%rbp), %rdi
callq 0x3cbc0
movsd %xmm0, -0xd0(%rbp)
movsd 0x2027c(%rip), %xmm0    # 0x553c8
mulsd -0x70(%rbp), %xmm0
movq -0x20(%rbp), %rdi
callq 0x3cbc0
movaps %xmm0, %xmm1
movsd -0xd0(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd 0x20257(%rip), %xmm1    # 0x553c8
divsd %xmm1, %xmm0
movsd 0x1fe8b(%rip), %xmm1    # 0x55008
subsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x68(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x70(%rbp), %xmm0
movq -0x20(%rbp), %rdi
callq 0x3cbc0
movsd %xmm0, -0xc8(%rbp)
movsd 0x20218(%rip), %xmm0    # 0x553c8
mulsd -0x70(%rbp), %xmm0
movq -0x20(%rbp), %rdi
callq 0x3cbc0
movaps %xmm0, %xmm1
movsd -0xc8(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd 0x201f3(%rip), %xmm1    # 0x553c8
divsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x68(%rbp), %rcx
movsd %xmm0, 0x8(%rax,%rcx,8)
movsd -0x70(%rbp), %xmm0
movq -0x20(%rbp), %rdi
callq 0x3cb90
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x68(%rbp), %rcx
movsd %xmm0, 0x10(%rax,%rcx,8)
movsd -0x70(%rbp), %xmm0
movq -0x20(%rbp), %rdi
callq 0x3cb90
movsd %xmm0, -0xc0(%rbp)
movsd 0x20188(%rip), %xmm0    # 0x553c8
mulsd -0x70(%rbp), %xmm0
movq -0x20(%rbp), %rdi
callq 0x3cb90
movaps %xmm0, %xmm1
movsd -0xc0(%rbp), %xmm0
addsd %xmm1, %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x68(%rbp), %rcx
movsd %xmm0, 0x18(%rax,%rcx,8)
movsd -0x70(%rbp), %xmm0
movq -0x20(%rbp), %rdi
callq 0x3cb90
movsd %xmm0, -0xb8(%rbp)
movsd 0x20124(%rip), %xmm0    # 0x553c8
mulsd -0x70(%rbp), %xmm0
movq -0x20(%rbp), %rdi
callq 0x3cb90
movaps %xmm0, %xmm1
movsd -0xb8(%rbp), %xmm0
subsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x68(%rbp), %rcx
movsd %xmm0, 0x20(%rax,%rcx,8)
movq -0x20(%rbp), %rdi
callq 0x3b030
jmp 0x35580
jmp 0x352e3
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
cmpq 0x3006d(%rip), %rax     # 0x65368
jne 0x35577
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rax,%rcx,8), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x34f30
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x38(%rax,%rcx,8), %rax
movq %rax, -0x68(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x60(%rbp), %rcx
shlq %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jg 0x353a4
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x68(%rbp), %rcx
addq -0x40(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x3536a
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x58(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jg 0x3553e
cvtsi2sdq -0x40(%rbp), %xmm0
movq -0x20(%rbp), %rdi
callq 0x3c870
movaps %xmm0, %xmm1
movsd 0x2007d(%rip), %xmm0    # 0x55458
mulsd %xmm1, %xmm0
cvtsi2sdq -0x58(%rbp), %xmm1
divsd %xmm1, %xmm0
movq -0x20(%rbp), %rdi
callq 0x3cbc0
movsd %xmm0, -0xa8(%rbp)
cvtsi2sdq -0x40(%rbp), %xmm0
movq -0x20(%rbp), %rdi
callq 0x3c870
movaps %xmm0, %xmm1
movsd 0x20044(%rip), %xmm0    # 0x55458
mulsd %xmm1, %xmm0
cvtsi2sdq -0x58(%rbp), %xmm1
divsd %xmm1, %xmm0
movq -0x20(%rbp), %rdi
callq 0x3cb90
movsd %xmm0, -0xb0(%rbp)
movsd -0xa8(%rbp), %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x68(%rbp), %rcx
movq -0x40(%rbp), %rdx
shlq %rdx
addq %rdx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0xb0(%rbp), %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x68(%rbp), %rcx
movq -0x40(%rbp), %rdx
shlq %rdx
addq %rdx, %rcx
movsd %xmm0, 0x8(%rax,%rcx,8)
movsd -0xa8(%rbp), %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x68(%rbp), %rcx
movq -0x60(%rbp), %rdx
shlq %rdx
addq %rdx, %rcx
movq -0x40(%rbp), %rdx
shlq %rdx
addq %rdx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0xb0(%rbp), %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x68(%rbp), %rcx
movq -0x60(%rbp), %rdx
shlq %rdx
addq %rdx, %rcx
movq -0x40(%rbp), %rdx
shlq %rdx
addq %rdx, %rcx
movsd %xmm0, 0x8(%rax,%rcx,8)
cmpq $0x0, -0x40(%rbp)
jle 0x3552b
movsd -0xa8(%rbp), %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x68(%rbp), %rcx
movq -0x60(%rbp), %rdx
subq -0x40(%rbp), %rdx
shlq %rdx
addq %rdx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0xb0(%rbp), %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x68(%rbp), %rcx
movq -0x60(%rbp), %rdx
subq -0x40(%rbp), %rdx
shlq %rdx
addq %rdx, %rcx
movsd %xmm0, 0x8(%rax,%rcx,8)
jmp 0x3552d
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x353ac
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
movq -0x68(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rax,%rcx,8), %rcx
movq -0x18(%rbp), %r8
movq -0x20(%rbp), %r9
callq 0x35920
movq -0x20(%rbp), %rdi
callq 0x3b030
jmp 0x35580
movq -0x20(%rbp), %rdi
callq 0x3b030
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)