// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdx, %rbx
leaq 0x20(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
andq $0x0, 0x10(%rax)
movq %rsi, %r15
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
movq 0x8(%rdi), %rdi
callq 0xcf18
movq %rax, %r13
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0xa4d8
leaq 0x38(%rsp), %rsi
movq %r13, 0x70(%rsi)
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0xe788
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x8e90
movb $0x1, 0x5(%r13)
leaq 0xb0(%rsp), %rbp
movq %rbx, 0x18(%rsp)
cmpq %r15, 0x20(%rsp)
je 0xe417
movq 0x28(%rsp), %rsi
addq $0x10, %rsi
movq %r12, %rdi
callq 0xe794
movq %rbx, %rdi
movq %r12, %rsi
callq 0xe7bc
movq %r15, %rdi
callq 0xe9be
movq 0xa8(%rsp), %rax
cmpb $0x0, 0x4(%rax)
je 0xe453
movl 0x10(%rax), %edx
cmpl $-0x1, %edx
je 0xe3ad
movq (%r14), %rdi
movq (%rdi), %rax
movq %r12, %rsi
movq %rsp, %rcx
callq *0x60(%rax)
movq 0x8(%rsp), %rax
subq (%rsp), %rax
cqto
pushq $0x78
popq %rcx
idivq %rcx
movl %eax, %eax
imulq $0x78, %rax, %rbx
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0xe400
movq 0x8(%r14), %rdi
movq (%rsp), %rsi
addq %r12, %rsi
callq 0xcf18
movq %rax, %r13
cmpb $0x0, 0x5(%rax)
jne 0xe3a7
movq (%rsp), %rsi
addq %r12, %rsi
movq %rbp, %rdi
callq 0xa4d8
movq %r13, 0x120(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0xe788
movq %rbp, %rdi
callq 0x8e90
movb $0x1, 0x5(%r13)
addq $0x78, %r12
jmp 0xe356
movq 0x8(%r14), %rdi
movq %r12, %rsi
callq 0xd74c
movq (%r14), %rdi
movq (%rdi), %r8
movq %r12, %rsi
movl %eax, %edx
movq %rsp, %rcx
callq *0x60(%r8)
movq 0x8(%rsp), %rax
subq (%rsp), %rax
cqto
pushq $0x78
popq %rcx
idivq %rcx
movl %eax, %eax
imulq $0x78, %rax, %rbx
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0xe400
movq 0x8(%r14), %rdi
movq (%rsp), %rsi
addq %r12, %rsi
callq 0xe9c8
addq $0x78, %r12
jmp 0xe3e5
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x8e90
movq 0x18(%rsp), %rbx
jmp 0xe2e0
movq %rbx, %rax
movq (%rax), %rax
cmpq %rbx, %rax
je 0xe42f
movq 0x80(%rax), %rcx
movb $0x0, 0x5(%rcx)
jmp 0xe41a
movq %rsp, %rdi
callq 0xb53c
leaq 0x20(%rsp), %rdi
callq 0xe98e
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12741(%rip), %rdi     # 0x20b9b
leaq 0x126ce(%rip), %rsi     # 0x20b2f
leaq 0x12746(%rip), %rcx     # 0x20bae
movl $0x8a, %edx
callq 0x51b0
jmp 0xe497
jmp 0xe47a
jmp 0xe47a
jmp 0xe497
movq %rax, %rbx
jmp 0xe4a4
jmp 0xe497
jmp 0xe497
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x8e90
jmp 0xe49a
jmp 0xe497
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x8e90
movq %rsp, %rdi
callq 0xb53c
leaq 0x20(%rsp), %rdi
callq 0xe98e
movq %rbx, %rdi
callq 0x5410