// File: /workspace/github_cpp_makefile_star2_O3/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 0x243f9
subq %rax, %r13
shrq $0x4, %r13
testl %r13d, %r13d
jle 0x24422
movq %rdx, %r15
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %ebp, %ebp
movss 0x6d48(%rip), %xmm3     # 0x2b014
movaps 0x6ddd(%rip), %xmm4     # 0x2b0b0
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 0x243eb
cmpb $0x0, 0x88(%rax)
jne 0x243eb
cmpb $0x0, 0x89(%rax)
jne 0x243eb
movq 0x90(%rax), %rcx
movq 0x98(%rax), %rdx
subq %rcx, %rdx
shrq $0x4, %rdx
testl %edx, %edx
jle 0x2439b
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 0x24431
testb $0x1, %sil
movb $0x1, %sil
jne 0x24366
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 0x2433d
testb %sil, %sil
jne 0x243a5
xorps 0x6cb7(%rip), %xmm0     # 0x2b050
jmp 0x243a5
xorl %esi, %esi
movss 0x6c7f(%rip), %xmm0     # 0x2b024
movss %xmm0, 0xc(%rax)
movb %sil, 0x14(%rax)
movq 0x30(%r15), %rcx
movq 0x40(%r15), %rdx
addq $-0x8, %rdx
cmpq %rdx, %rcx
je 0x243c9
movq %rax, (%rcx)
addq $0x8, 0x30(%r15)
jmp 0x243e3
movq %r15, %rdi
movq %r12, %rsi
callq 0x2473c
movaps 0x6cd5(%rip), %xmm4     # 0x2b0b0
movss 0x6c31(%rip), %xmm3     # 0x2b014
movq (%rsp), %rax
movb $0x1, 0x15(%rax)
incq %rbp
cmpq %r13, %rbp
jne 0x242d6
jmp 0x24422
movq 0x20(%rbx), %rax
movl 0x8c(%rax), %eax
cmpl 0x34(%r14), %eax
jae 0x24422
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x233bc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x93a1(%rip), %rdi      # 0x2d7d9
leaq 0x854a(%rip), %rsi      # 0x2c989
leaq 0x93c3(%rip), %rcx      # 0x2d809
movl $0x389, %edx            # imm = 0x389
callq 0x51c0