// File: bonetblai[P]mdp-engine/ctp3/../engine/hdp.h
// Function: Algorithm::hdp_t<state_t>::solve(state_t const&, Problem::hash_t<state_t>&) const
virtual void solve(const T &s, Problem::hash_t<T> &hash) const {
        reset_stats(hash);
        Heuristic::wrapper_t<T> eval_function(heuristic_);
        hash.set_eval_function(&eval_function);

        std::list<Hash::data_t*> stack, visited;
        Hash::data_t *dptr = hash.data_ptr(s);
        size_t trials = 0;
        while( !dptr->solved() ) {
            size_t index = 0;
            hdp(s, hash, dptr, index, stack, visited);
            assert(stack.empty());
            while( !visited.empty() ) {
                visited.front()->unmark();
                assert(visited.front()->scc_low() == std::numeric_limits<unsigned>::max());
                assert(visited.front()->scc_idx() == std::numeric_limits<unsigned>::max());
                visited.pop_front();
            }
            ++trials;
        }
        hash.set_eval_function(0);
    }

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0xb0(%rsp), %rdi
movq %rdi, 0x28(%rsp)
movq 0xa0(%rsp), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rsi
leaq 0x90(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x20c30
movq 0x30(%rsp), %rsi
movq 0xa0(%rsp), %rdi
callq 0x20c70
jmp 0x1fe6c
leaq 0x68(%rsp), %rdi
callq 0x20c90
leaq 0x50(%rsp), %rdi
callq 0x20c90
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
callq 0x20ca0
movq %rax, 0x20(%rsp)
jmp 0x1fe9c
movq 0x20(%rsp), %rax
movq %rax, 0x48(%rsp)
movq $0x0, 0x40(%rsp)
movq 0x48(%rsp), %rdi
callq 0x20d90
movb %al, 0x1f(%rsp)
jmp 0x1febf
movb 0x1f(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1fece
jmp 0x2006b
movq 0x28(%rsp), %rdi
movq $0x0, 0x38(%rsp)
movq 0xa8(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x48(%rsp), %rcx
movq %rsp, %rax
leaq 0x50(%rsp), %r8
movq %r8, (%rax)
leaq 0x38(%rsp), %r8
leaq 0x68(%rsp), %r9
callq 0x20da0
jmp 0x1ff0d
leaq 0x68(%rsp), %rdi
callq 0x21560
testb $0x1, %al
jne 0x1ff1d
jmp 0x1ff1f
jmp 0x1ff84
leaq 0x3daa6(%rip), %rdi     # 0x5d9cc
leaq 0x3daad(%rip), %rsi     # 0x5d9da
movl $0x5d, %edx
leaq 0x3dab1(%rip), %rcx     # 0x5d9ea
callq 0x6220
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x200a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x21620
leaq 0x68(%rsp), %rdi
callq 0x21620
jmp 0x200a7
jmp 0x1ff86
leaq 0x50(%rsp), %rdi
callq 0x21560
xorb $-0x1, %al
testb $0x1, %al
jne 0x1ff9b
jmp 0x20058
leaq 0x50(%rsp), %rdi
callq 0x21580
movq (%rax), %rdi
callq 0x215b0
jmp 0x1ffaf
leaq 0x50(%rsp), %rdi
callq 0x21580
movq (%rax), %rdi
callq 0x215c0
movq %rax, 0x10(%rsp)
jmp 0x1ffc8
callq 0x215d0
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, %ecx
cmpq %rcx, %rax
jne 0x1ffdd
jmp 0x1fffc
leaq 0x3da69(%rip), %rdi     # 0x5da4d
leaq 0x3d9ef(%rip), %rsi     # 0x5d9da
movl $0x60, %edx
leaq 0x3d9f3(%rip), %rcx     # 0x5d9ea
callq 0x6220
leaq 0x50(%rsp), %rdi
callq 0x21580
movq (%rax), %rdi
callq 0x215e0
movq %rax, 0x8(%rsp)
jmp 0x20015
callq 0x215d0
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, %ecx
cmpq %rcx, %rax
jne 0x2002a
jmp 0x20049
leaq 0x3da5f(%rip), %rdi     # 0x5da90
leaq 0x3d9a2(%rip), %rsi     # 0x5d9da
movl $0x61, %edx
leaq 0x3d9a6(%rip), %rcx     # 0x5d9ea
callq 0x6220
leaq 0x50(%rsp), %rdi
callq 0x215f0
jmp 0x1ff86
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x1feaf
movq 0xa0(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x20c70
jmp 0x2007e
leaq 0x50(%rsp), %rdi
callq 0x21620
leaq 0x68(%rsp), %rdi
callq 0x21620
leaq 0x90(%rsp), %rdi
callq 0x21630
addq $0xb8, %rsp
retq
leaq 0x90(%rsp), %rdi
callq 0x21630
movq 0x88(%rsp), %rdi
callq 0x6520
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)