// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x32(%rdi)
jne 0x1ab0e
leaq 0x38(%rbx), %rdi
movq %r14, %rsi
callq 0x1b1dc
testq %rax, %rax
je 0x1ab0e
movl 0x78(%rax), %ebp
jmp 0x1adaa
incl 0x20(%rbx)
xorl %eax, %eax
movq %rax, 0x40(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq %rax, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x10(%rax)
movl %eax, %ebp
cmpb $0x0, 0x31(%rbx)
cltq
movl $0x1, %esi
cmovneq %rax, %rsi
leaq 0x10(%rsp), %rdi
callq 0xbe32
movl $0x0, 0x50(%rsp)
testl %ebp, %ebp
jle 0x1acdf
xorl %edx, %edx
movss 0x104a8(%rip), %xmm0    # 0x2b014
leaq 0x30(%rsp), %r15
movss %xmm0, 0xc(%rsp)
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x30(%rax)
testb %al, %al
je 0x1ac5d
movb 0x30(%rbx), %r12b
movq 0x8(%rbx), %rdi
movl 0x50(%rsp), %edx
movq (%rdi), %rax
movq %r14, %rsi
movq %r15, %rcx
callq *0x60(%rax)
movss 0x10468(%rip), %xmm1    # 0x2b014
testb %r12b, %r12b
jne 0x1abb4
xorps %xmm1, %xmm1
movq 0x38(%rsp), %r13
subq 0x30(%rsp), %r13
je 0x1ac2a
sarq $0x3, %r13
movabsq $-0x1111111111111111, %rax # imm = 0xEEEEEEEEEEEEEEEF
imulq %rax, %r13
cmpq $0x1, %r13
adcq $0x0, %r13
xorl %r12d, %r12d
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x1ac02
movss %xmm1, 0x8(%rsp)
movq 0x30(%rsp), %rsi
addq %r12, %rsi
movq (%rdi), %rax
callq *0x20(%rax)
movss 0x8(%rsp), %xmm1
jmp 0x1ac05
xorps %xmm0, %xmm0
cmpb $0x1, 0x30(%rbx)
jne 0x1ac11
minss %xmm0, %xmm1
jmp 0x1ac21
movq 0x30(%rsp), %rax
mulss 0x70(%rax,%r12), %xmm0
addss %xmm0, %xmm1
addq $0x78, %r12
decq %r13
jne 0x1abdd
movss %xmm1, 0x8(%rsp)
movq 0x8(%rbx), %rdi
movl 0x50(%rsp), %edx
movq (%rdi), %rax
movq %r14, %rsi
callq *0x48(%rax)
addss 0x8(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
movss %xmm0, 0x8(%rsp)
ucomiss %xmm1, %xmm0
jbe 0x1ac65
movaps %xmm1, %xmm0
jmp 0x1acb4
movss 0xc(%rsp), %xmm0
jmp 0x1acb4
movq 0x18(%rsp), %rax
jae 0x1ac7d
movq 0x10(%rsp), %rsi
cmpq %rsi, %rax
je 0x1ac88
movq %rsi, 0x18(%rsp)
jmp 0x1ac8b
movq %rax, %rsi
movss %xmm1, 0x8(%rsp)
jmp 0x1ac8b
movq %rax, %rsi
cmpb $0x0, 0x31(%rbx)
jne 0x1ac98
cmpq %rsi, 0x10(%rsp)
jne 0x1acae
cmpq 0x20(%rsp), %rsi
je 0x1acc8
movl 0x50(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
movss 0x8(%rsp), %xmm0
movl 0x50(%rsp), %edx
incl %edx
movl %edx, 0x50(%rsp)
cmpl %ebp, %edx
jl 0x1ab71
jmp 0x1acdf
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0xa316
movss 0x8(%rsp), %xmm0
jmp 0x1acb4
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x1acef
movss 0x10(%rax), %xmm0
jmp 0x1acf2
xorps %xmm0, %xmm0
movss %xmm0, 0x1c(%rbx)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r15
subq %rdi, %r15
shrq $0x2, %r15
cmpl $0x1, %r15d
je 0x1ad28
testl %r15d, %r15d
je 0x1adbe
callq 0x5200
xorl %edx, %edx
divl %r15d
movq 0x10(%rsp), %rdi
jmp 0x1ad2a
xorl %edx, %edx
movl (%rdi,%rdx,4), %ebp
cmpb $0x1, 0x32(%rbx)
jne 0x1ad9b
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %rdi
movups %xmm0, 0x34(%rdi)
movups %xmm0, 0x24(%rdi)
movups %xmm0, 0x14(%rdi)
movups %xmm0, 0x4(%rdi)
xorl %eax, %eax
movq %rax, 0x44(%rdi)
movb $0x1, 0x5c(%rdi)
movq %rax, 0x60(%rdi)
movq %r14, %rsi
callq 0xc30a
addq $0x38, %rbx
leaq 0x50(%rsp), %rsi
movl %ebp, 0x70(%rsi)
movq %rbx, %rdi
callq 0x1b2c2
cmpb $0x0, 0xac(%rsp)
jne 0x1ad91
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x1ad91
callq 0x5340
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1ada0
callq 0x5260
leaq 0x30(%rsp), %rdi
callq 0xd12e
movl %ebp, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10856(%rip), %rdi     # 0x2b61b
leaq 0x10857(%rip), %rsi     # 0x2b623
leaq 0x10863(%rip), %rcx     # 0x2b636
movl $0x3a, %edx
callq 0x51c0
movq %rax, %rbx
cmpb $0x0, 0xac(%rsp)
jne 0x1ae0b
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x1ae0b
callq 0x5340
jmp 0x1ae0b
jmp 0x1ae08
jmp 0x1ae08
jmp 0x1ae08
jmp 0x1ae08
jmp 0x1ae08
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1ae1a
callq 0x5260
leaq 0x30(%rsp), %rdi
callq 0xd12e
movq %rbx, %rdi
callq 0x5410