// 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::state_node_t<state_t>*) const
void recompute_delta(state_node_t<T> *root) const {
        assert(!root->is_goal_);
        assert(!root->is_dead_end_);

        std::deque<state_node_t<T>*> s_queue;
        bool expanding_from_s_queue = true;
        std::deque<action_node_t<T>*> a_queue;
        bool expanding_from_a_queue = false;

        root->delta_ = std::numeric_limits<float>::max();
        root->in_best_policy_ = true;
        s_queue.push_back(root);

        while( !s_queue.empty() || !a_queue.empty() ) {
            // expand from the state queue
            if( expanding_from_s_queue ) {
                while( !s_queue.empty() ) {
                    state_node_t<T> *s_node = s_queue.back();
                    s_queue.pop_back();
                    s_node->in_queue_ = false;
                    recompute_delta(s_node, a_queue);
                }
                expanding_from_s_queue = false;
                expanding_from_a_queue = true;
            }

            // expand from the action queue
            if( expanding_from_a_queue ) {
                while( !a_queue.empty() ) {
                    action_node_t<T> *a_node = a_queue.back();
                    a_queue.pop_back();
                    recompute_delta(a_node, s_queue);
                }
                expanding_from_a_queue = false;
                expanding_from_s_queue = true;
            }
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %rsi, 0x8(%rsp)
cmpb $0x1, 0x88(%rsi)
je 0x23bf6
movq %rsi, %r14
cmpb $0x1, 0x89(%rsi)
je 0x23c15
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0x24450
leaq 0x60(%rsp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0x245b8
movl $0x7f7fffff, 0xc(%r14)  # imm = 0x7F7FFFFF
movb $0x1, 0x14(%r14)
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x23a8a
movq %r14, (%rax)
addq $0x8, 0x40(%rsp)
jmp 0x23a99
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2473c
movl $0x1f8, %r13d           # imm = 0x1F8
leaq 0x10(%rsp), %r14
leaq 0x60(%rsp), %r15
movq 0x40(%rsp), %rax
cmpq 0x20(%rsp), %rax
jne 0x23ac8
movq 0x90(%rsp), %rax
cmpq 0x70(%rsp), %rax
je 0x23bd1
movq 0x40(%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0x23bb9
movq 0x48(%rsp), %rdi
cmpq %rdi, %rax
je 0x23aec
movq -0x8(%rax), %r12
addq $-0x8, %rax
jmp 0x23b27
movq 0x58(%rsp), %rax
movq -0x8(%rax), %rax
movq 0x1f8(%rax), %r12
callq 0x5260
movq 0x58(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x58(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x48(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x50(%rsp)
addq %r13, %rax
movq %rax, 0x40(%rsp)
movb $0x0, 0x15(%r12)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x23f86
jmp 0x23ac8
movq 0x98(%rsp), %rdi
cmpq %rdi, %rax
je 0x23b59
movq -0x8(%rax), %r12
addq $-0x8, %rax
jmp 0x23ba3
movq 0xa8(%rsp), %rax
movq -0x8(%rax), %rax
movq 0x1f8(%rax), %r12
callq 0x5260
movq 0xa8(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0xa8(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x98(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0xa0(%rsp)
addq %r13, %rax
movq %rax, 0x90(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x24286
movq 0x90(%rsp), %rax
cmpq 0x70(%rsp), %rax
jne 0x23b42
jmp 0x23aa9
leaq 0x60(%rsp), %rdi
callq 0x24b2c
leaq 0x10(%rsp), %rdi
callq 0x24b76
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x9a2c(%rip), %rdi      # 0x2d629
leaq 0x8d85(%rip), %rsi      # 0x2c989
leaq 0x9a2e(%rip), %rcx      # 0x2d639
movl $0x321, %edx            # imm = 0x321
callq 0x51c0
leaq 0x9a7e(%rip), %rdi      # 0x2d69a
leaq 0x8d66(%rip), %rsi      # 0x2c989
leaq 0x9a0f(%rip), %rcx      # 0x2d639
movl $0x322, %edx            # imm = 0x322
callq 0x51c0
jmp 0x23c3d
movq %rax, %rbx
jmp 0x23c4a
jmp 0x23c3d
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x24b2c
leaq 0x10(%rsp), %rdi
callq 0x24b76
movq %rbx, %rdi
callq 0x5410