// File: bonetblai[P]mdp-engine/ctp3/../engine/base_policies.h
// Function: Online::Policy::base_greedy_t<state_t>::operator()(state_t const&) const
virtual Problem::action_t operator()(const T &s) const {
        typename Hash::generic_hash_map_t<T, Problem::action_t>::const_iterator it = caching_ ? cache_.find(s) : cache_.end();
        if( it == cache_.end() ) {
            ++policy_t<T>::decisions_;
            std::vector<std::pair<T, float> > outcomes;
            std::vector<Problem::action_t> best_actions;
            int nactions = problem_.number_actions(s);
            float best_value = std::numeric_limits<float>::max();
            best_actions.reserve(random_ties_ ? nactions : 1);
            for( Problem::action_t a = 0; a < nactions; ++a ) {
                if( problem_.applicable(s, a) ) {
                    float value = optimistic_ ? std::numeric_limits<float>::max() : 0;
                    problem_.next(s, a, outcomes);
                    for( size_t i = 0, isz = outcomes.size(); i < isz; ++i ) {
                        float hval = heuristic_ == 0 ? 0 : heuristic_->value(outcomes[i].first);
                        if( optimistic_ )
                            value = hval < value ? hval : value;
                        else
                            value += outcomes[i].second * hval;
                    }
                    value += problem_.cost(s, a);

                    if( value <= best_value ) {
                        if( value < best_value ) {
                            best_value = value;
                            best_actions.clear();
                        }
                        if( random_ties_ || best_actions.empty() )
                            best_actions.push_back(a);
                    }
                }
            }
            policy_t<T>::heuristic_time_ = heuristic_ == 0 ? 0 : heuristic_->eval_time();
            Problem::action_t action = best_actions[Random::random(best_actions.size())];
            if( caching_ ) cache_.insert(std::make_pair(s, action));
            return action;
        } else {
            //std::cout << "BASE: cached result: state=" << s << ", action=" << it->second << std::endl;
            return it->second;
        }
    }

// Assembly:
subq $0x178, %rsp            # imm = 0x178
movq %rdi, 0x168(%rsp)
movq %rsi, 0x160(%rsp)
movq 0x168(%rsp), %rax
movq %rax, 0x50(%rsp)
testb $0x1, 0x32(%rax)
je 0x36f0a
movq 0x50(%rsp), %rdi
addq $0x38, %rdi
movq 0x160(%rsp), %rsi
callq 0x382a0
movq %rax, 0x150(%rsp)
jmp 0x36f20
movq 0x50(%rsp), %rdi
addq $0x38, %rdi
callq 0x382d0
movq %rax, 0x150(%rsp)
leaq 0x158(%rsp), %rdi
leaq 0x150(%rsp), %rsi
callq 0x38300
movq 0x50(%rsp), %rdi
addq $0x38, %rdi
callq 0x382d0
movq %rax, 0x148(%rsp)
leaq 0x158(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x38330
testb $0x1, %al
jne 0x36f69
jmp 0x37454
movq 0x50(%rsp), %rax
movl 0x20(%rax), %ecx
incl %ecx
movl %ecx, 0x20(%rax)
leaq 0x130(%rsp), %rdi
callq 0x1a4a0
leaq 0x118(%rsp), %rdi
callq 0xe840
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x160(%rsp), %rsi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movl %eax, 0x4c(%rsp)
jmp 0x36fb0
movl 0x4c(%rsp), %eax
movl %eax, 0x114(%rsp)
callq 0x23160
movq 0x50(%rsp), %rax
movss %xmm0, 0x100(%rsp)
testb $0x1, 0x31(%rax)
je 0x36fe1
movl 0x114(%rsp), %eax
movl %eax, 0x48(%rsp)
jmp 0x36fec
movl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0x36fec
movl 0x48(%rsp), %eax
movslq %eax, %rsi
leaq 0x118(%rsp), %rdi
callq 0x163b0
jmp 0x37002
movl $0x0, 0xfc(%rsp)
movl 0xfc(%rsp), %eax
cmpl 0x114(%rsp), %eax
jge 0x37307
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x160(%rsp), %rsi
movl 0xfc(%rsp), %edx
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
movb %al, 0x47(%rsp)
jmp 0x37048
movb 0x47(%rsp), %al
testb $0x1, %al
jne 0x37055
jmp 0x372ef
movq 0x50(%rsp), %rax
movb 0x30(%rax), %al
movb %al, 0x3b(%rsp)
callq 0x23160
movb 0x3b(%rsp), %al
testb $0x1, %al
xorps %xmm1, %xmm1
movss %xmm1, 0x3c(%rsp)
movss %xmm0, 0x40(%rsp)
jne 0x37089
movss 0x3c(%rsp), %xmm0
movss %xmm0, 0x40(%rsp)
movq 0x50(%rsp), %rax
movss 0x40(%rsp), %xmm0
movss %xmm0, 0xf8(%rsp)
movq 0x8(%rax), %rdi
movq 0x160(%rsp), %rsi
movl 0xfc(%rsp), %edx
movq (%rdi), %rax
movq 0x60(%rax), %rax
leaq 0x130(%rsp), %rcx
callq *%rax
jmp 0x370c3
movq $0x0, 0xf0(%rsp)
leaq 0x130(%rsp), %rdi
callq 0x17030
movq %rax, 0xe8(%rsp)
movq 0xf0(%rsp), %rax
cmpq 0xe8(%rsp), %rax
jae 0x37226
movq 0x50(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x37111
xorps %xmm0, %xmm0
movss %xmm0, 0x34(%rsp)
jmp 0x3715b
movq 0x50(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0xf0(%rsp), %rsi
leaq 0x130(%rsp), %rdi
callq 0x1a4b0
movq 0x28(%rsp), %rdi
movq %rax, %rsi
movq (%rdi), %rax
movq 0x20(%rax), %rax
callq *%rax
movss %xmm0, 0x30(%rsp)
jmp 0x3714d
movss 0x30(%rsp), %xmm0
movss %xmm0, 0x34(%rsp)
jmp 0x3715b
movq 0x50(%rsp), %rax
movss 0x34(%rsp), %xmm0
movss %xmm0, 0xe4(%rsp)
testb $0x1, 0x30(%rax)
je 0x371d6
movss 0xe4(%rsp), %xmm1
movss 0xf8(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x3719d
movss 0xe4(%rsp), %xmm0
movss %xmm0, 0x24(%rsp)
jmp 0x371ac
movss 0xf8(%rsp), %xmm0
movss %xmm0, 0x24(%rsp)
movss 0x24(%rsp), %xmm0
movss %xmm0, 0xf8(%rsp)
jmp 0x3720b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
jmp 0x37438
movq 0xf0(%rsp), %rsi
leaq 0x130(%rsp), %rdi
callq 0x1a4b0
movss 0x70(%rax), %xmm0
mulss 0xe4(%rsp), %xmm0
addss 0xf8(%rsp), %xmm0
movss %xmm0, 0xf8(%rsp)
jmp 0x3720d
movq 0xf0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xf0(%rsp)
jmp 0x370e4
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x160(%rsp), %rsi
movl 0xfc(%rsp), %edx
movq (%rdi), %rax
movq 0x48(%rax), %rax
callq *%rax
movss %xmm0, 0x20(%rsp)
jmp 0x3724f
movss 0x20(%rsp), %xmm0
addss 0xf8(%rsp), %xmm0
movss %xmm0, 0xf8(%rsp)
movss 0xf8(%rsp), %xmm1
movss 0x100(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jb 0x372ed
movss 0xf8(%rsp), %xmm1
movss 0x100(%rsp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x372b4
movss 0xf8(%rsp), %xmm0
movss %xmm0, 0x100(%rsp)
leaq 0x118(%rsp), %rdi
callq 0x38350
movq 0x50(%rsp), %rax
testb $0x1, 0x31(%rax)
jne 0x372d2
leaq 0x118(%rsp), %rdi
callq 0x1a320
testb $0x1, %al
jne 0x372d2
jmp 0x372eb
leaq 0x118(%rsp), %rdi
leaq 0xfc(%rsp), %rsi
callq 0xedb0
jmp 0x372e9
jmp 0x372eb
jmp 0x372ed
jmp 0x372ef
jmp 0x372f1
movl 0xfc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xfc(%rsp)
jmp 0x3700d
movq 0x50(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x3731e
xorps %xmm0, %xmm0
movss %xmm0, 0x1c(%rsp)
jmp 0x37332
movq 0x50(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x35c40
movss %xmm0, 0x1c(%rsp)
movq 0x50(%rsp), %rax
movss 0x1c(%rsp), %xmm0
movss %xmm0, 0x1c(%rax)
leaq 0x118(%rsp), %rdi
callq 0xdcb0
movl %eax, %edi
callq 0x1a370
movl %eax, 0x18(%rsp)
jmp 0x3735c
movl 0x18(%rsp), %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x118(%rsp), %rdi
callq 0xdcf0
movq %rax, %rcx
movq 0x50(%rsp), %rax
movl (%rcx), %ecx
movl %ecx, 0xe0(%rsp)
testb $0x1, 0x32(%rax)
je 0x3740e
movq 0x50(%rsp), %rax
addq $0x38, %rax
movq %rax, 0x10(%rsp)
movq 0x160(%rsp), %rsi
leaq 0x68(%rsp), %rdi
leaq 0xe0(%rsp), %rdx
callq 0x383c0
jmp 0x373b6
movq 0x10(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x38370
movb %dl, 0x7(%rsp)
movq %rax, 0x8(%rsp)
jmp 0x373d0
movb 0x7(%rsp), %al
movq 0x8(%rsp), %rcx
movq %rcx, 0x58(%rsp)
movb %al, 0x60(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x38400
jmp 0x3740e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x108(%rsp)
movl %eax, 0x104(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x38400
jmp 0x37438
movl 0xe0(%rsp), %eax
movl %eax, 0x174(%rsp)
leaq 0x118(%rsp), %rdi
callq 0xdfb0
leaq 0x130(%rsp), %rdi
callq 0x1a510
jmp 0x3746b
leaq 0x118(%rsp), %rdi
callq 0xdfb0
leaq 0x130(%rsp), %rdi
callq 0x1a510
jmp 0x3747a
leaq 0x158(%rsp), %rdi
callq 0x38410
movl 0x70(%rax), %eax
movl %eax, 0x174(%rsp)
movl 0x174(%rsp), %eax
addq $0x178, %rsp            # imm = 0x178
retq
movq 0x108(%rsp), %rdi
callq 0x6520
nopw (%rax,%rax)