// File: bonetblai[P]mdp-engine/ctp3/../engine/improved_lao.h
// Function: Algorithm::improved_lao_t<state_t>::policy_graph_t::recompute()
void recompute() {
            std::vector<std::pair<T, float> > outcomes;
            size_ = 0;
            tips_.clear();
            nodes_.clear();

            pair_list open;
            for( vector_iterator si = roots_.begin(); si != roots_.end(); ++si ) {
                Hash::data_t *dptr = hash_.data_ptr(*si);
                open.push_back(std::make_pair(*si, dptr));
                dptr->solve();
                dptr->mark();
            }

            while( !open.empty() ) {
                std::pair<T, Hash::data_t*> n = open.front();
                open.pop_front();

                if( problem_.terminal( n.first ) ) {
                    n.second->set_action(Problem::noop);
                    nodes_.push_front(n);
                    ++size_;
                } else {
                    bool unsolved = false;
                    std::pair<Problem::action_t, float> p = hash_.best_q_value(n.first);
                    assert(p.first != Problem::noop);
                    n.second->set_action(p.first);

                    problem_.next(n.first, p.first, outcomes);
                    unsigned osize = outcomes.size();

                    for( unsigned i = 0; i < osize; ++i ) {
                        if( !hash_.solved(outcomes[i].first) ) {
                            unsolved = true;
                            break;
                        }
                    }

                    ++size_;
                    if( !unsolved ) {
                        for( unsigned i = 0; i < osize; ++i ) {
                            Hash::data_t *dptr = hash_.data_ptr(outcomes[i].first);
                            if( !dptr->marked() ) {
                                open.push_back(std::make_pair(outcomes[i].first, dptr));
                                dptr->solve();
                                dptr->mark();
                            }
                        }
                        nodes_.push_front(n);
                    } else {
                        tips_.push_back(n);
                        n.second->set_action(Problem::noop);
                    }
                }
            }

            // unmark nodes
            for( list_iterator si = nodes_.begin(); si != nodes_.end(); ++si )
                si->second->unmark();
            for( list_iterator si = tips_.begin(); si != tips_.end(); ++si )
                si->second->unmark();
        }

// Assembly:
subq $0x258, %rsp            # imm = 0x258
movq %rdi, 0x250(%rsp)
movq 0x250(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x238(%rsp), %rdi
callq 0x1a4a0
movq 0x48(%rsp), %rdi
movq $0x0, 0x10(%rdi)
addq $0x30, %rdi
callq 0x24f40
movq 0x48(%rsp), %rdi
addq $0x48, %rdi
callq 0x24f40
leaq 0x220(%rsp), %rdi
callq 0x24840
movq 0x48(%rsp), %rdi
addq $0x18, %rdi
callq 0x25ca0
movq %rax, 0x218(%rsp)
movq 0x48(%rsp), %rdi
addq $0x18, %rdi
callq 0x25b00
movq %rax, 0x210(%rsp)
leaq 0x218(%rsp), %rdi
leaq 0x210(%rsp), %rsi
callq 0x26220
testb $0x1, %al
jne 0x24984
jmp 0x24a76
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
leaq 0x218(%rsp), %rdi
callq 0x26260
movq 0x38(%rsp), %rdi
movq %rax, %rsi
callq 0x20ca0
movq %rax, 0x40(%rsp)
jmp 0x249b3
movq 0x40(%rsp), %rax
movq %rax, 0x208(%rsp)
leaq 0x218(%rsp), %rdi
callq 0x26260
movq %rax, %rsi
leaq 0x180(%rsp), %rdi
leaq 0x208(%rsp), %rdx
callq 0x262b0
jmp 0x249e7
leaq 0x220(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x26270
jmp 0x249fe
leaq 0x180(%rsp), %rdi
callq 0x21fd0
movq 0x208(%rsp), %rdi
callq 0x22e90
movq 0x208(%rsp), %rdi
callq 0x23090
leaq 0x218(%rsp), %rdi
callq 0x262f0
jmp 0x24950
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x200(%rsp)
movl %eax, 0x1fc(%rsp)
jmp 0x24ee7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x200(%rsp)
movl %eax, 0x1fc(%rsp)
leaq 0x180(%rsp), %rdi
callq 0x21fd0
jmp 0x24ee7
jmp 0x24a78
leaq 0x220(%rsp), %rdi
callq 0x24f20
xorb $-0x1, %al
testb $0x1, %al
jne 0x24a90
jmp 0x24e11
leaq 0x220(%rsp), %rdi
callq 0x26310
movq %rax, %rsi
leaq 0x108(%rsp), %rdi
callq 0x26340
jmp 0x24aaf
leaq 0x220(%rsp), %rdi
callq 0x26380
movq 0x48(%rsp), %rax
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
leaq 0x108(%rsp), %rsi
callq *%rax
movb %al, 0x37(%rsp)
jmp 0x24adb
movb 0x37(%rsp), %al
testb $0x1, %al
jne 0x24ae5
jmp 0x24b40
movq 0x178(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x263b0
jmp 0x24af9
movq 0x48(%rsp), %rdi
addq $0x48, %rdi
leaq 0x108(%rsp), %rsi
callq 0x263d0
jmp 0x24b11
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
jmp 0x24ded
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x200(%rsp)
movl %eax, 0x1fc(%rsp)
jmp 0x24dff
movq 0x48(%rsp), %rax
movb $0x0, 0x107(%rsp)
movq 0x8(%rax), %rdi
leaq 0x108(%rsp), %rsi
callq 0x22eb0
movq %rax, 0x28(%rsp)
jmp 0x24b65
movq 0x28(%rsp), %rax
movq %rax, 0xfc(%rsp)
cmpl $-0x1, 0xfc(%rsp)
je 0x24b7e
jmp 0x24b9d
leaq 0x38f66(%rip), %rdi     # 0x5daeb
leaq 0x38f78(%rip), %rsi     # 0x5db04
movl $0x58, %edx
leaq 0x38f85(%rip), %rcx     # 0x5db1d
callq 0x6220
movq 0x178(%rsp), %rdi
movl 0xfc(%rsp), %esi
callq 0x263b0
jmp 0x24bb3
movq 0x48(%rsp), %rax
movq (%rax), %rdi
movl 0xfc(%rsp), %edx
movq (%rdi), %rax
movq 0x60(%rax), %rax
leaq 0x108(%rsp), %rsi
leaq 0x238(%rsp), %rcx
callq *%rax
jmp 0x24bdd
leaq 0x238(%rsp), %rdi
callq 0x17030
movl %eax, 0xf8(%rsp)
movl $0x0, 0xf4(%rsp)
movl 0xf4(%rsp), %eax
cmpl 0xf8(%rsp), %eax
jae 0x24c6c
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
movl 0xf4(%rsp), %eax
movl %eax, %esi
leaq 0x238(%rsp), %rdi
callq 0x1a4b0
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x26410
movb %al, 0x27(%rsp)
jmp 0x24c43
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0x24c57
jmp 0x24c4d
movb $0x1, 0x107(%rsp)
jmp 0x24c6c
jmp 0x24c59
movl 0xf4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf4(%rsp)
jmp 0x24bfc
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
testb $0x1, 0x107(%rsp)
jne 0x24dbd
movl $0x0, 0xf0(%rsp)
movl 0xf0(%rsp), %eax
cmpl 0xf8(%rsp), %eax
jae 0x24da3
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movl 0xf0(%rsp), %eax
movl %eax, %esi
leaq 0x238(%rsp), %rdi
callq 0x1a4b0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x20ca0
movq %rax, 0x10(%rsp)
jmp 0x24ce2
movq 0x10(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rdi
callq 0x22ea0
testb $0x1, %al
jne 0x24d8b
movl 0xf0(%rsp), %eax
movl %eax, %esi
leaq 0x238(%rsp), %rdi
callq 0x1a4b0
movq %rax, %rsi
leaq 0x70(%rsp), %rdi
leaq 0xe8(%rsp), %rdx
callq 0x262b0
jmp 0x24d31
leaq 0x220(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x26270
jmp 0x24d45
leaq 0x70(%rsp), %rdi
callq 0x21fd0
movq 0xe8(%rsp), %rdi
callq 0x22e90
movq 0xe8(%rsp), %rdi
callq 0x23090
jmp 0x24d8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x200(%rsp)
movl %eax, 0x1fc(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x21fd0
jmp 0x24dff
jmp 0x24d8d
movl 0xf0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf0(%rsp)
jmp 0x24c96
movq 0x48(%rsp), %rdi
addq $0x48, %rdi
leaq 0x108(%rsp), %rsi
callq 0x263d0
jmp 0x24dbb
jmp 0x24deb
movq 0x48(%rsp), %rdi
addq $0x30, %rdi
leaq 0x108(%rsp), %rsi
callq 0x26490
jmp 0x24dd5
movq 0x178(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x263b0
jmp 0x24de9
jmp 0x24deb
jmp 0x24ded
leaq 0x108(%rsp), %rdi
callq 0x21fd0
jmp 0x24a78
leaq 0x108(%rsp), %rdi
callq 0x21fd0
jmp 0x24ee7
movq 0x48(%rsp), %rdi
addq $0x48, %rdi
callq 0x264d0
movq %rax, 0x68(%rsp)
movq 0x48(%rsp), %rdi
addq $0x48, %rdi
callq 0x26520
movq %rax, 0x60(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x26500
testb $0x1, %al
jne 0x24e4c
jmp 0x24e6b
leaq 0x68(%rsp), %rdi
callq 0x26550
movq 0x70(%rax), %rdi
callq 0x215b0
leaq 0x68(%rsp), %rdi
callq 0x26570
jmp 0x24e24
movq 0x48(%rsp), %rdi
addq $0x30, %rdi
callq 0x264d0
movq %rax, 0x58(%rsp)
movq 0x48(%rsp), %rdi
addq $0x30, %rdi
callq 0x26520
movq %rax, 0x50(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x26500
testb $0x1, %al
jne 0x24ea6
jmp 0x24ec5
leaq 0x58(%rsp), %rdi
callq 0x26550
movq 0x70(%rax), %rdi
callq 0x215b0
leaq 0x58(%rsp), %rdi
callq 0x26570
jmp 0x24e7e
leaq 0x220(%rsp), %rdi
callq 0x25630
leaq 0x238(%rsp), %rdi
callq 0x1a510
addq $0x258, %rsp            # imm = 0x258
retq
leaq 0x220(%rsp), %rdi
callq 0x25630
leaq 0x238(%rsp), %rdi
callq 0x1a510
movq 0x200(%rsp), %rdi
callq 0x6520
nop