// 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::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 0x259f7
cmpb $0x1, 0x89(%rsi)
je 0x25a16
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 0x26296
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 0x263fe
movq 0x8(%rsp), %rax
movl $0x7f7fffff, 0xc(%rax)  # imm = 0x7F7FFFFF
movb $0x1, 0x14(%rax)
movq 0x40(%rsp), %rcx
movq 0x50(%rsp), %rdx
addq $-0x8, %rdx
cmpq %rdx, %rcx
je 0x2587a
movq %rax, (%rcx)
addq $0x8, 0x40(%rsp)
jmp 0x25889
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x26582
movl $0x200, %r13d           # imm = 0x200
leaq 0x10(%rsp), %r14
leaq 0x60(%rsp), %r15
movq 0x40(%rsp), %rax
cmpq 0x20(%rsp), %rax
jne 0x258b8
movq 0x90(%rsp), %rax
cmpq 0x70(%rsp), %rax
je 0x259d2
movq 0x40(%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0x259ba
movq 0x48(%rsp), %rdi
movq %rax, %rcx
cmpq %rdi, %rax
jne 0x258e1
movq 0x58(%rsp), %rcx
movq -0x8(%rcx), %rcx
addq %r13, %rcx
movq -0x8(%rcx), %r12
cmpq %rdi, %rax
je 0x258f0
addq $-0x8, %rax
jmp 0x2591e
callq 0x6260
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 $0x1f8, %rax            # imm = 0x1F8
movq %rax, 0x40(%rsp)
movb $0x0, 0x15(%r12)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x25d7e
jmp 0x258b8
movq 0x98(%rsp), %rdi
movq %rax, %rcx
cmpq %rdi, %rax
jne 0x2595b
movq 0xa8(%rsp), %rcx
movq -0x8(%rcx), %rcx
addq %r13, %rcx
movq -0x8(%rcx), %r12
cmpq %rdi, %rax
je 0x2596a
addq $-0x8, %rax
jmp 0x259a4
callq 0x6260
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 $0x1f8, %rax            # imm = 0x1F8
movq %rax, 0x90(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x260c6
movq 0x90(%rsp), %rax
cmpq 0x70(%rsp), %rax
jne 0x2593c
jmp 0x25899
leaq 0x60(%rsp), %rdi
callq 0x26972
leaq 0x10(%rsp), %rdi
callq 0x269b6
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x9c87(%rip), %rdi      # 0x2f685
leaq 0x8fe0(%rip), %rsi      # 0x2e9e5
leaq 0x9c89(%rip), %rcx      # 0x2f695
movl $0x321, %edx            # imm = 0x321
callq 0x61c0
leaq 0x9cd9(%rip), %rdi      # 0x2f6f6
leaq 0x8fc1(%rip), %rsi      # 0x2e9e5
leaq 0x9c6a(%rip), %rcx      # 0x2f695
movl $0x322, %edx            # imm = 0x322
callq 0x61c0
jmp 0x25a3e
movq %rax, %rbx
jmp 0x25a4b
jmp 0x25a3e
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x26972
leaq 0x10(%rsp), %rdi
callq 0x269b6
movq %rbx, %rdi
callq 0x6410
nop