// File: /workspace/github_cpp_makefile_star2_O1/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
cmpq 0x30(%rsi), %rax
je 0x2623f
movq 0x30(%rbx), %r13
subq %rax, %r13
shrq $0x4, %r13
testl %r13d, %r13d
jle 0x26268
movq %rdx, %r15
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %ebp, %ebp
movss 0x6f07(%rip), %xmm3     # 0x2d014
movaps 0x6f8c(%rip), %xmm4     # 0x2d0a0
movaps 0x6f25(%rip), %xmm5     # 0x2d040
movq %rsp, %r12
movq 0x28(%rbx), %rax
movq %rbp, %rcx
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %rax
movq %rax, (%rsp)
cmpb $0x0, 0x15(%rax)
jne 0x26231
cmpb $0x0, 0x88(%rax)
jne 0x26231
cmpb $0x0, 0x89(%rax)
jne 0x26231
movq 0x90(%rax), %rcx
movq 0x98(%rax), %rdx
subq %rcx, %rdx
shrq $0x4, %rdx
testl %edx, %edx
jle 0x261d7
movq 0x8(%r14), %rdi
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
shlq $0x4, %rdx
xorl %r8d, %r8d
movaps %xmm3, %xmm0
xorl %esi, %esi
movslq (%rcx,%r8), %r11
movq 0x8(%rcx,%r8), %r9
movq 0x28(%r9), %r10
shlq $0x4, %r11
cmpq %rax, 0x8(%r10,%r11)
jne 0x26277
testb $0x1, %sil
movb $0x1, %sil
jne 0x261ae
movb 0x14(%r9), %sil
addq %r11, %r10
movss 0xc(%r9), %xmm1
movss (%r10), %xmm2
mulss 0x8(%rdi), %xmm2
divss %xmm2, %xmm1
andps %xmm4, %xmm1
minss %xmm1, %xmm0
addq $0x10, %r8
cmpq %r8, %rdx
jne 0x26185
jmp 0x261dc
xorl %esi, %esi
movaps %xmm3, %xmm0
testb %sil, %sil
jne 0x261e4
xorps %xmm5, %xmm0
movss %xmm0, 0xc(%rax)
movb %sil, 0x14(%rax)
movq 0x30(%r15), %rcx
movq 0x40(%r15), %rdx
addq $-0x8, %rdx
cmpq %rdx, %rcx
je 0x26208
movq %rax, (%rcx)
addq $0x8, 0x30(%r15)
jmp 0x26229
movq %r15, %rdi
movq %r12, %rsi
callq 0x26582
movaps 0x6e26(%rip), %xmm5     # 0x2d040
movaps 0x6e7f(%rip), %xmm4     # 0x2d0a0
movss 0x6deb(%rip), %xmm3     # 0x2d014
movq (%rsp), %rax
movb $0x1, 0x15(%rax)
incq %rbp
cmpq %r13, %rbp
jne 0x2611e
jmp 0x26268
movq 0x20(%rbx), %rax
movl 0x8c(%rax), %eax
cmpl 0x34(%r14), %eax
jae 0x26268
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x25192
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x95d2(%rip), %rdi      # 0x2f850
leaq 0x8760(%rip), %rsi      # 0x2e9e5
leaq 0x95f4(%rip), %rcx      # 0x2f880
movl $0x389, %edx            # imm = 0x389
callq 0x61c0