// File: bonetblai[P]mdp-engine/ctp3/../engine/aot.h
// Function: Online::Policy::AOT::aot_t<state_t>::expand(Online::Policy::AOT::state_node_t<state_t>*, std::vector<Online::Policy::AOT::node_t<state_t>*, std::allocator<Online::Policy::AOT::node_t<state_t>*>>&) const
void expand(state_node_t<T> *s_node,
                std::vector<node_t<T>*> &nodes_to_propagate) const {
        assert(s_node->is_leaf());
        assert(!s_node->is_goal_);
        assert(!s_node->is_dead_end_);
        s_node->children_.reserve(problem_.number_actions(s_node->state_));
        for( Problem::action_t a = 0; a < problem_.number_actions(s_node->state_); ++a ) {
            if( problem_.applicable(s_node->state_, a) ) {
                // create node for this action
                ++num_nodes_;
                action_node_t<T> *a_node = new action_node_t<T>(a);
                a_node->action_cost_ = problem_.cost(s_node->state_, a);
                a_node->parent_ = s_node;
                s_node->children_.push_back(a_node);

                // expand node
                if( !delayed_evaluation_ ) {
                    expand(a_node, nodes_to_propagate, false);
                } else {
                    // instead of full-width expansion to calculate value,
                    // estimate by sampling states and applying rollouts
                    // of base policy
                    float eval = evaluate(s_node->state_, a, 1+s_node->depth_);
                    a_node->value_ = a_node->action_cost_ + problem_.discount() * eval;
                    a_node->nsamples_ = delayed_evaluation_nsamples_ * leaf_nsamples_;
                }
            }
        }
        nodes_to_propagate.push_back(s_node);
    }

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x58(%rsp), %rdi
callq 0x46ec0
testb $0x1, %al
jne 0x4e52d
jmp 0x4e52f
jmp 0x4e54e
leaq 0x1167e(%rip), %rdi     # 0x5fbb4
leaq 0x10438(%rip), %rsi     # 0x5e975
movl $0x29d, %edx            # imm = 0x29D
leaq 0x1167d(%rip), %rcx     # 0x5fbc6
callq 0x6220
movq 0x58(%rsp), %rax
movb 0x88(%rax), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x4e561
jmp 0x4e563
jmp 0x4e582
leaq 0x1118a(%rip), %rdi     # 0x5f6f4
leaq 0x10404(%rip), %rsi     # 0x5e975
movl $0x29e, %edx            # imm = 0x29E
leaq 0x11649(%rip), %rcx     # 0x5fbc6
callq 0x6220
movq 0x58(%rsp), %rax
movb 0x89(%rax), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x4e595
jmp 0x4e597
jmp 0x4e5b6
leaq 0x111eb(%rip), %rdi     # 0x5f789
leaq 0x103d0(%rip), %rsi     # 0x5e975
movl $0x29f, %edx            # imm = 0x29F
leaq 0x11615(%rip), %rcx     # 0x5fbc6
callq 0x6220
movq 0x20(%rsp), %rax
movq 0x58(%rsp), %rcx
addq $0xa8, %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rdi
movq 0x58(%rsp), %rsi
addq $0x18, %rsi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x18(%rsp), %rdi
movslq %eax, %rsi
callq 0x4e7d0
movl $0x0, 0x4c(%rsp)
movq 0x20(%rsp), %rax
movl 0x4c(%rsp), %ecx
movl %ecx, 0x14(%rsp)
movq 0x8(%rax), %rdi
movq 0x58(%rsp), %rsi
addq $0x18, %rsi
movq (%rdi), %rax
callq *0x10(%rax)
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x4e799
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x58(%rsp), %rsi
addq $0x18, %rsi
movl 0x4c(%rsp), %edx
movq (%rdi), %rax
callq *0x30(%rax)
testb $0x1, %al
jne 0x4e647
jmp 0x4e787
movq 0x20(%rsp), %rax
movl 0x50(%rax), %ecx
incl %ecx
movl %ecx, 0x50(%rax)
movl $0x40, %edi
callq 0x6340
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movl 0x4c(%rsp), %esi
callq 0x4e8e0
jmp 0x4e674
movq 0x20(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x40(%rsp)
movq 0x8(%rax), %rdi
movq 0x58(%rsp), %rsi
addq $0x18, %rsi
movl 0x4c(%rsp), %edx
movq (%rdi), %rax
callq *0x48(%rax)
movq 0x40(%rsp), %rax
movss %xmm0, 0x1c(%rax)
movq 0x58(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x58(%rsp), %rdi
addq $0xa8, %rdi
leaq 0x40(%rsp), %rsi
callq 0x4e930
movq 0x20(%rsp), %rax
testb $0x1, 0x3d(%rax)
jne 0x4e70b
movq 0x20(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x50(%rsp), %rdx
xorl %ecx, %ecx
callq 0x4e9a0
jmp 0x4e785
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
callq 0x6310
jmp 0x4e7b7
movq 0x20(%rsp), %rdi
movq 0x58(%rsp), %rsi
addq $0x18, %rsi
movl 0x4c(%rsp), %edx
movq 0x58(%rsp), %rax
movl 0x8c(%rax), %ecx
addl $0x1, %ecx
callq 0x4f000
movq 0x20(%rsp), %rax
movss %xmm0, 0x30(%rsp)
movq 0x40(%rsp), %rcx
movss 0x1c(%rcx), %xmm0
movss %xmm0, 0x4(%rsp)
movq 0x8(%rax), %rdi
callq 0x28980
movq 0x20(%rsp), %rax
movaps %xmm0, %xmm1
movss 0x4(%rsp), %xmm0
mulss 0x30(%rsp), %xmm1
addss %xmm1, %xmm0
movq 0x40(%rsp), %rcx
movss %xmm0, 0x8(%rcx)
movl 0x48(%rax), %ecx
imull 0x44(%rax), %ecx
movq 0x40(%rsp), %rax
movl %ecx, 0x10(%rax)
jmp 0x4e787
jmp 0x4e789
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x4e5f4
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x28(%rsp), %rsi
callq 0x4f130
addq $0x68, %rsp
retq
movq 0x38(%rsp), %rdi
callq 0x6520
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)