// File: /workspace/github_cpp_makefile_star2_O2/bonetblai[P]mdp-engine/ctp3/../engine/aot.h
// Function: Online::Policy::AOT::aot_t<state_t>::recompute_delta(Online::Policy::AOT::action_node_t<state_t>*, std::deque<Online::Policy::AOT::state_node_t<state_t>*, std::allocator<Online::Policy::AOT::state_node_t<state_t>*>>&) const
void recompute_delta(action_node_t<T> *a_node,
                         std::deque<state_node_t<T>*> &s_queue) const {
        if( a_node->is_leaf() ) {
            // insert tip node into priority queue
            if( a_node->parent_->depth_ < horizon_ ) {
                insert_into_priority_queue(a_node);
            }
        } else {
            for( int i = 0, isz = a_node->children_.size(); i < isz; ++i ) {
                state_node_t<T> *s_node = a_node->children_[i].second;
                if( !s_node->in_queue_ && !s_node->is_goal_ && !s_node->is_dead_end_ ) {
                    float delta = std::numeric_limits<float>::max();
                    bool in_best_policy = false;
                    for( int j = 0, jsz = s_node->parents_.size(); j < jsz; ++j ) {
                        int child_index = s_node->parents_[j].first;
                        action_node_t<T> *parent = s_node->parents_[j].second;
                        assert(parent->children_[child_index].second == s_node);
                        float d = parent->delta_ /
                                  (problem_.discount() * parent->children_[child_index].first);
                        delta = Utils::min(delta, fabsf(d));
                        in_best_policy = in_best_policy || parent->in_best_policy_;
                    }
                    s_node->delta_ = in_best_policy ? delta : -delta;
                    s_node->in_best_policy_ = in_best_policy;
                    s_queue.push_back(s_node);
                    s_node->in_queue_ = true;
                }
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x28(%rsi), %rax
movq 0x30(%rsi), %r13
cmpq %r13, %rax
je 0x1a8b3
movq %rdx, %r15
subq %rax, %r13
shrq $0x4, %r13
xorl %ebp, %ebp
testl %r13d, %r13d
cmovlel %ebp, %r13d
movaps 0x58aa(%rip), %xmm3     # 0x20060
cmpq %r13, %rbp
je 0x1a8dc
movq 0x28(%rbx), %rax
movq %rbp, %rcx
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %rax
movq %rax, (%rsp)
cmpb $0x0, 0x15(%rax)
jne 0x1a8ab
cmpb $0x0, 0x88(%rax)
jne 0x1a8ab
cmpb $0x0, 0x89(%rax)
jne 0x1a8ab
movq 0x90(%rax), %rcx
movq 0x98(%rax), %rdx
subq %rcx, %rdx
shrq $0x4, %rdx
xorl %esi, %esi
testl %edx, %edx
cmovlel %esi, %edx
movq 0x8(%r14), %rdi
shlq $0x4, %rdx
xorl %r8d, %r8d
movss 0x57ee(%rip), %xmm0     # 0x20014
cmpq %rsi, %rdx
je 0x1a87b
movslq (%rcx,%rsi), %r12
movq 0x8(%rcx,%rsi), %r10
movq 0x28(%r10), %r11
shlq $0x4, %r12
cmpq %rax, 0x8(%r11,%r12)
jne 0x1a8eb
movb $0x1, %r9b
testb $0x1, %r8b
jne 0x1a854
movb 0x14(%r10), %r9b
addq %r12, %r11
movss 0xc(%r10), %xmm1
movss (%r11), %xmm2
mulss 0x8(%rdi), %xmm2
divss %xmm2, %xmm1
andps %xmm3, %xmm1
minss %xmm1, %xmm0
addq $0x10, %rsi
movl %r9d, %r8d
jmp 0x1a826
andb $0x1, %r8b
jne 0x1a888
xorps 0x57f8(%rip), %xmm0     # 0x20080
movss %xmm0, 0xc(%rax)
movb %r8b, 0x14(%rax)
movq %r15, %rdi
movq %rsp, %rsi
callq 0x1a484
movq (%rsp), %rax
movb $0x1, 0x15(%rax)
movaps 0x57b5(%rip), %xmm3     # 0x20060
incq %rbp
jmp 0x1a7b6
movq 0x20(%rbx), %rax
movl 0x8c(%rax), %eax
cmpl 0x34(%r14), %eax
jae 0x1a8dc
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1991a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7ed1(%rip), %rdi      # 0x227c3
leaq 0x7050(%rip), %rsi      # 0x21949
leaq 0x7ef3(%rip), %rcx      # 0x227f3
movl $0x389, %edx            # imm = 0x389
callq 0x51b0