// File: mouda[P]LTE_random_access-simulate/alglibinternal.cpp
// Function: alglib_impl::ftbasegeneraterealfhtplan(long, alglib_impl::ftplan*, alglib_impl::ae_state*)
void ftbasegeneraterealfhtplan(ae_int_t n, ftplan* plan, ae_state *_state)
{
    ae_int_t planarraysize;
    ae_int_t plansize;
    ae_int_t precomputedsize;
    ae_int_t tmpmemsize;
    ae_int_t stackmemsize;
    ae_int_t stackptr;

    _ftplan_clear(plan);

    planarraysize = 1;
    plansize = 0;
    precomputedsize = 0;
    stackmemsize = 0;
    stackptr = 0;
    tmpmemsize = n;
    ae_vector_set_length(&plan->plan, planarraysize, _state);
    ftbase_ftbasegenerateplanrec(n, ftbase_ftbaserfhttask, plan, &plansize, &precomputedsize, &planarraysize, &tmpmemsize, &stackmemsize, stackptr, _state);
    ae_assert(stackptr==0, "Internal error in FTBaseGenerateRealFHTPlan: stack ptr!", _state);
    ae_vector_set_length(&plan->stackbuf, ae_maxint(stackmemsize, 1, _state), _state);
    ae_vector_set_length(&plan->tmpbuf, ae_maxint(tmpmemsize, 1, _state), _state);
    ae_vector_set_length(&plan->precomputed, ae_maxint(precomputedsize, 1, _state), _state);
    stackptr = 0;
    ftbase_ftbaseprecomputeplanrec(plan, 0, stackptr, _state);
    ae_assert(stackptr==0, "Internal error in FTBaseGenerateRealFHTPlan: stack ptr!", _state);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x88, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x345f0
movq $0x1, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x3b620
movq -0x10(%rbp), %rdi
movq 0x2fb93(%rip), %rsi     # 0x65330
movq -0x18(%rbp), %rdx
movq -0x50(%rbp), %r10
movq -0x20(%rbp), %rax
leaq -0x30(%rbp), %rcx
leaq -0x38(%rbp), %r8
leaq -0x28(%rbp), %r9
leaq -0x40(%rbp), %rbx
leaq -0x48(%rbp), %r11
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x34640
cmpq $0x0, -0x50(%rbp)
sete %al
movq -0x20(%rbp), %rdx
movzbl %al, %edi
andl $0x1, %edi
leaq 0x226cf(%rip), %rsi     # 0x57ebd
callq 0x3b240
movq -0x18(%rbp), %rax
addq $0x90, %rax
movq %rax, -0x68(%rbp)
movq -0x48(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x1, %esi
callq 0x3c9f0
movq -0x68(%rbp), %rdi
movq %rax, %rsi
movq -0x20(%rbp), %rdx
callq 0x3b620
movq -0x18(%rbp), %rax
addq $0x60, %rax
movq %rax, -0x60(%rbp)
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x1, %esi
callq 0x3c9f0
movq -0x60(%rbp), %rdi
movq %rax, %rsi
movq -0x20(%rbp), %rdx
callq 0x3b620
movq -0x18(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x1, %esi
callq 0x3c9f0
movq -0x58(%rbp), %rdi
movq %rax, %rsi
movq -0x20(%rbp), %rdx
callq 0x3b620
movq $0x0, -0x50(%rbp)
movq -0x18(%rbp), %rdi
movq -0x50(%rbp), %rdx
movq -0x20(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
callq 0x34f30
cmpq $0x0, -0x50(%rbp)
sete %al
movq -0x20(%rbp), %rdx
movzbl %al, %edi
andl $0x1, %edi
leaq 0x22608(%rip), %rsi     # 0x57ebd
callq 0x3b240
addq $0x88, %rsp
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)