// File: bonetblai[P]mdp-engine/ctp3/../engine/improved_lao.h
// Function: Algorithm::improved_lao_t<state_t>::policy_graph_t::postorder_dfs(state_t const&, std::__cxx11::list<std::pair<state_t, Hash::data_t*>, std::allocator<std::pair<state_t, Hash::data_t*>>>&)
void postorder_dfs(const T &s, pair_list &visited) {
            pair_list open;

            std::vector<std::pair<T, float> > outcomes;
            Hash::data_t *dptr = hash_.data_ptr(s);
            open.push_back(std::make_pair(s, dptr ));
            dptr->mark();

            while( !open.empty() ) {
                std::pair<T, Hash::data_t*> n = open.back();
                visited.push_front(n);
                open.pop_back();
                assert(n.second->solved());

                if( n.second->action() != Problem::noop ) {
                    problem_.next(n.first, n.second->action(), outcomes);
                    unsigned osize = outcomes.size();
                    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->mark();
                        }
                    }
                } else {
                    std::pair<Problem::action_t, float> p = hash_.best_q_value(n.first);
                    problem_.next(n.first, p.first, outcomes);
                    unsigned osize = outcomes.size();
                    for( unsigned i = 0; i < osize; ++i )
                        hash_.solve(outcomes[i].first);
                }
            }

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

// Assembly:
subq $0x248, %rsp            # imm = 0x248
movq %rdi, 0x240(%rsp)
movq %rsi, 0x238(%rsp)
movq %rdx, 0x230(%rsp)
movq 0x240(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x218(%rsp), %rdi
callq 0x24840
leaq 0x200(%rsp), %rdi
callq 0x1a4a0
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x238(%rsp), %rsi
callq 0x20ca0
movq %rax, 0x48(%rsp)
jmp 0x24fd3
movq 0x48(%rsp), %rax
movq %rax, 0x1f8(%rsp)
movq 0x238(%rsp), %rsi
leaq 0x170(%rsp), %rdi
leaq 0x1f8(%rsp), %rdx
callq 0x21f90
jmp 0x24fff
leaq 0x218(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x26270
jmp 0x25016
leaq 0x170(%rsp), %rdi
callq 0x21fd0
movq 0x1f8(%rsp), %rdi
callq 0x23090
leaq 0x218(%rsp), %rdi
callq 0x24f20
xorb $-0x1, %al
testb $0x1, %al
jne 0x25048
jmp 0x2537b
leaq 0x218(%rsp), %rdi
callq 0x26d40
movq %rax, %rsi
leaq 0xf8(%rsp), %rdi
callq 0x26340
jmp 0x25067
movq 0x230(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x263d0
jmp 0x2507e
leaq 0x218(%rsp), %rdi
callq 0x26d80
movq 0x168(%rsp), %rdi
callq 0x20d90
testb $0x1, %al
jne 0x2509e
jmp 0x250a0
jmp 0x25117
leaq 0x38ac9(%rip), %rdi     # 0x5db70
leaq 0x38a56(%rip), %rsi     # 0x5db04
movl $0x8a, %edx
leaq 0x38ac9(%rip), %rcx     # 0x5db83
callq 0x6220
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0x253f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
leaq 0x170(%rsp), %rdi
callq 0x21fd0
jmp 0x253f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0x2536c
movq 0x168(%rsp), %rdi
callq 0x26dc0
movl %eax, 0x3c(%rsp)
jmp 0x2512a
movl 0x3c(%rsp), %eax
cmpl $-0x1, %eax
je 0x252a8
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x28(%rsp)
leaq 0xf8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x168(%rsp), %rdi
callq 0x26dc0
movl %eax, 0x38(%rsp)
jmp 0x25164
movl 0x38(%rsp), %edx
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdi
movq (%rdi), %rax
movq 0x60(%rax), %rax
leaq 0x200(%rsp), %rcx
callq *%rax
jmp 0x25185
leaq 0x200(%rsp), %rdi
callq 0x17030
movl %eax, 0xf4(%rsp)
movl $0x0, 0xf0(%rsp)
movl 0xf0(%rsp), %eax
cmpl 0xf4(%rsp), %eax
jae 0x252a3
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
movl 0xf0(%rsp), %eax
movl %eax, %esi
leaq 0x200(%rsp), %rdi
callq 0x1a4b0
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x20ca0
movq %rax, 0x20(%rsp)
jmp 0x251f0
movq 0x20(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rdi
callq 0x22ea0
testb $0x1, %al
jne 0x2528b
movl 0xf0(%rsp), %eax
movl %eax, %esi
leaq 0x200(%rsp), %rdi
callq 0x1a4b0
movq %rax, %rsi
leaq 0x70(%rsp), %rdi
leaq 0xe8(%rsp), %rdx
callq 0x262b0
jmp 0x2523b
leaq 0x218(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x26270
jmp 0x2524f
leaq 0x70(%rsp), %rdi
callq 0x21fd0
movq 0xe8(%rsp), %rdi
callq 0x23090
jmp 0x2528b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x21fd0
jmp 0x2536c
jmp 0x2528d
movl 0xf0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf0(%rsp)
jmp 0x251a4
jmp 0x2535a
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x22eb0
movq %rax, 0x10(%rsp)
jmp 0x252c5
movq 0x40(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x68(%rsp)
movq (%rax), %rdi
movl 0x68(%rsp), %edx
movq (%rdi), %rax
movq 0x60(%rax), %rax
leaq 0xf8(%rsp), %rsi
leaq 0x200(%rsp), %rcx
callq *%rax
jmp 0x252f6
leaq 0x200(%rsp), %rdi
callq 0x17030
movl %eax, 0x64(%rsp)
movl $0x0, 0x60(%rsp)
movl 0x60(%rsp), %eax
cmpl 0x64(%rsp), %eax
jae 0x25358
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movl 0x60(%rsp), %eax
movl %eax, %esi
leaq 0x200(%rsp), %rdi
callq 0x1a4b0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x26dd0
jmp 0x25349
jmp 0x2534b
movl 0x60(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x60(%rsp)
jmp 0x2530f
jmp 0x2535a
leaq 0xf8(%rsp), %rdi
callq 0x21fd0
jmp 0x25030
leaq 0xf8(%rsp), %rdi
callq 0x21fd0
jmp 0x253f5
movq 0x230(%rsp), %rdi
callq 0x264d0
movq %rax, 0x58(%rsp)
movq 0x230(%rsp), %rdi
callq 0x26520
movq %rax, 0x50(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x26500
testb $0x1, %al
jne 0x253b4
jmp 0x253d3
leaq 0x58(%rsp), %rdi
callq 0x26550
movq 0x70(%rax), %rdi
callq 0x215b0
leaq 0x58(%rsp), %rdi
callq 0x26570
jmp 0x2538d
leaq 0x200(%rsp), %rdi
callq 0x1a510
leaq 0x218(%rsp), %rdi
callq 0x25630
addq $0x248, %rsp            # imm = 0x248
retq
leaq 0x200(%rsp), %rdi
callq 0x1a510
leaq 0x218(%rsp), %rdi
callq 0x25630
movq 0x1f0(%rsp), %rdi
callq 0x6520
nopl (%rax)