// File: bonetblai[P]mdp-engine/ctp3/../engine/online_rtdp.h
// Function: Online::Policy::RTDP::finite_horizon_lrtdp_t<state_t>::q_value(Online::Policy::RTDP::node_t<state_t> const&, int) const
std::pair<float, bool> q_value(const node_t<T> &node, Problem::action_t a) const {
        ++total_number_expansions_;
        float qvalue = 0;
        bool all_children_labeled = true;
        std::vector<std::pair<T, float> > outcomes;
        problem_.next(node.state(), a, outcomes);
        for( int i = 0, isz = outcomes.size(); i < isz; ++i ) {
            const T &state = outcomes[i].first;
            float prob = outcomes[i].second;
            node_t<T> next_node(state, 1 + node.depth());
            std::pair<float, bool> p = value(next_node);
            qvalue += prob * p.first;
            all_children_labeled = all_children_labeled && p.second;
        }
        qvalue += problem_.cost(node.state(), a);
        return std::make_pair(qvalue, all_children_labeled);
    }

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movq %rdi, 0x128(%rsp)
movq %rsi, 0x120(%rsp)
movl %edx, 0x11c(%rsp)
movq 0x128(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0x80(%rax), %ecx
incl %ecx
movl %ecx, 0x80(%rax)
movl $0x0, 0x118(%rsp)
movb $0x1, 0x117(%rsp)
leaq 0xf8(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x1a4a0
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x120(%rsp), %rdi
callq 0x54f00
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rcx
movq %rax, %rsi
movl 0x11c(%rsp), %edx
movq (%rdi), %rax
movq 0x60(%rax), %rax
callq *%rax
jmp 0x57378
movl $0x0, 0xe8(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x17030
movl %eax, 0xe4(%rsp)
movl 0xe8(%rsp), %eax
cmpl 0xe4(%rsp), %eax
jge 0x574ef
movslq 0xe8(%rsp), %rsi
leaq 0xf8(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x1a4b0
movq 0x20(%rsp), %rdi
movq %rax, 0xd8(%rsp)
movslq 0xe8(%rsp), %rsi
callq 0x1a4b0
movss 0x70(%rax), %xmm0
movss %xmm0, 0xd4(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x120(%rsp), %rdi
callq 0x56420
movl %eax, 0x34(%rsp)
jmp 0x5740d
movq 0x28(%rsp), %rsi
movl 0x34(%rsp), %edx
incl %edx
leaq 0x58(%rsp), %rdi
callq 0x53fe0
jmp 0x57424
movq 0x38(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x57630
movq %rax, 0x18(%rsp)
jmp 0x5743a
movq 0x18(%rsp), %rax
movl %eax, %ecx
movl %ecx, 0x50(%rsp)
shrq $0x20, %rax
movb %al, 0x54(%rsp)
movss 0xd4(%rsp), %xmm0
mulss 0x50(%rsp), %xmm0
addss 0x118(%rsp), %xmm0
movss %xmm0, 0x118(%rsp)
xorl %eax, %eax
testb $0x1, 0x117(%rsp)
movb %al, 0x17(%rsp)
je 0x57486
movb 0x54(%rsp), %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
movb %al, 0x117(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x53c50
movl 0xe8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xe8(%rsp)
jmp 0x57397
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
jmp 0x57596
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x53c50
jmp 0x57596
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x120(%rsp), %rdi
callq 0x54f00
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movl 0x11c(%rsp), %edx
movq (%rdi), %rax
movq 0x48(%rax), %rax
callq *%rax
movss %xmm0, 0x10(%rsp)
jmp 0x5752a
movss 0x10(%rsp), %xmm1
movss 0x118(%rsp), %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x118(%rsp)
leaq 0x118(%rsp), %rdi
leaq 0x117(%rsp), %rsi
callq 0x57790
movq %rax, (%rsp)
jmp 0x57561
movq (%rsp), %rax
movl %eax, %ecx
movl %ecx, 0x130(%rsp)
shrq $0x20, %rax
movb %al, 0x134(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x1a510
movq 0x130(%rsp), %rax
addq $0x138, %rsp            # imm = 0x138
retq
leaq 0xf8(%rsp), %rdi
callq 0x1a510
movq 0xf0(%rsp), %rdi
callq 0x6520