// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
incl 0x80(%rdi)
movl %edx, %ebp
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rcx
movaps %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
movq %rdi, 0x20(%rsp)
movq 0x8(%rdi), %rdi
movq (%rdi), %rax
movq %rsi, 0x28(%rsp)
callq *0x60(%rax)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
sarq $0x3, %rax
movabsq $-0x1111111111111111, %rbx # imm = 0xEEEEEEEEEEEEEEEF
imulq %rax, %rbx
testl %ebx, %ebx
jle 0x2abf4
movl %ebp, 0x18(%rsp)
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
xorps %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
movb $0x1, %r12b
leaq 0x50(%rsp), %r13
xorl %r14d, %r14d
movq 0x30(%rsp), %rsi
movss 0x70(%rsi,%r14), %xmm0
movss %xmm0, 0x1c(%rsp)
addq %r14, %rsi
movq 0x28(%rsp), %rax
movl 0x70(%rax), %ebp
xorl %eax, %eax
leaq 0x54(%rsp), %rcx
movq %rax, 0x40(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rcx)
movups %xmm0, 0x20(%rcx)
movups %xmm0, 0x10(%rcx)
movups %xmm0, (%rcx)
movb $0x1, 0xac(%rsp)
movq %rax, 0xb0(%rsp)
movq %r13, %rdi
callq 0xd546
incl %ebp
movl %ebp, 0xc0(%rsp)
movq 0x20(%rsp), %rdi
movq %r13, %r15
movq %r13, %rsi
callq 0x2ac7c
movq %rax, %rbp
movabsq $0x100000000, %rax      # imm = 0x100000000
testq %rax, %rbp
setne %r13b
cmpb $0x0, 0xac(%rsp)
jne 0x2abaa
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x2abaa
callq 0x6340
movd %ebp, %xmm0
movss 0x1c(%rsp), %xmm1
mulss %xmm0, %xmm1
movss 0xc(%rsp), %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0xc(%rsp)
andb %r13b, %r12b
addq $0x78, %r14
decq %rbx
movq %r15, %r13
jne 0x2ab0f
xorl %eax, %eax
testb %r12b, %r12b
movq 0x10(%rsp), %rcx
cmoveq %rax, %rcx
movq %rcx, 0x10(%rsp)
movl 0x18(%rsp), %ebp
jmp 0x2abfd
xorps %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
movq (%rdi), %rax
movq 0x28(%rsp), %rsi
movl %ebp, %edx
callq *0x48(%rax)
addss 0xc(%rsp), %xmm0
movd %xmm0, %eax
movq 0x10(%rsp), %rbx
orq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xe35c
movq %rbx, %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2ac46
movq %rax, %rbx
jmp 0x2ac6a
movq %rax, %rbx
cmpb $0x0, 0xac(%rsp)
jne 0x2ac6a
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x2ac6a
callq 0x6340
leaq 0x30(%rsp), %rdi
callq 0xe35c
movq %rbx, %rdi
callq 0x6410