// File: bonetblai[P]mdp-engine/ctp3/../engine/uct.h
// Function: Online::Policy::UCT::uct_t<state_t>::operator()(state_t const&) const
virtual Problem::action_t operator()(const T &s) const {
        if( base_policy_ == 0 ) {
            std::cout << Utils::error() << "(base) policy must be specified for uct() policy!" << std::endl;
            exit(1);
        }

        ++policy_t<T>::decisions_;
        if( horizon_ == 0 ) {
            return (*base_policy_)(s);
        } else {
            table_.clear();
            for( unsigned i = 0; i < width_; ++i )
                search_tree(s, 0);
            typename hash_t<T>::iterator it = table_.find(std::make_pair(0, s));
            assert(it != table_.end());
            Problem::action_t action = select_action(s, it->second, 0, false, random_ties_);
            assert(problem_.applicable(s, action));
            return action;
        }
    }

// Assembly:
subq $0x198, %rsp            # imm = 0x198
movq %rdi, 0x188(%rsp)
movq %rsi, 0x180(%rsp)
movq 0x188(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x28(%rax)
jne 0x3d941
leaq 0x160(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x1e8e0
movq 0x28(%rsp), %rsi
movq 0x45703(%rip), %rdi     # 0x82fd0
callq 0x62f0
movq %rax, 0x30(%rsp)
jmp 0x3d8d9
movq 0x30(%rsp), %rdi
leaq 0x20c1b(%rip), %rsi     # 0x5e500
callq 0x6330
movq %rax, 0x20(%rsp)
jmp 0x3d8f1
movq 0x20(%rsp), %rdi
movq 0x456bb(%rip), %rsi     # 0x82fb8
callq 0x6370
jmp 0x3d904
leaq 0x160(%rsp), %rdi
callq 0x61f0
movl $0x1, %edi
callq 0x63e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
leaq 0x160(%rsp), %rdi
callq 0x61f0
jmp 0x3db81
movq 0x38(%rsp), %rax
movl 0x20(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x20(%rax)
cmpl $0x0, 0x34(%rax)
jne 0x3d978
movq 0x38(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x180(%rsp), %rsi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, 0x194(%rsp)
jmp 0x3db72
movq 0x38(%rsp), %rdi
addq $0x40, %rdi
addq $0x8, %rdi
callq 0x3ede0
movl $0x0, 0x150(%rsp)
movq 0x38(%rsp), %rcx
movl 0x150(%rsp), %eax
cmpl 0x30(%rcx), %eax
jae 0x3d9cd
movq 0x38(%rsp), %rdi
movq 0x180(%rsp), %rsi
xorl %edx, %edx
callq 0x3edf0
movl 0x150(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x150(%rsp)
jmp 0x3d995
movq 0x38(%rsp), %rax
addq $0x48, %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x54(%rsp)
movq 0x180(%rsp), %rdx
leaq 0x58(%rsp), %rdi
movq %rdi, 0x18(%rsp)
leaq 0x54(%rsp), %rsi
callq 0x3f570
movq 0x18(%rsp), %rsi
leaq 0xd0(%rsp), %rdi
callq 0x3f5b0
jmp 0x3da13
movq 0x10(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x3f540
movq %rax, 0x8(%rsp)
jmp 0x3da2c
movq 0x8(%rsp), %rax
movq %rax, 0x148(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x3e930
leaq 0x58(%rsp), %rdi
callq 0x3f5f0
movq 0x38(%rsp), %rdi
addq $0x40, %rdi
callq 0x3f630
movq %rax, 0x48(%rsp)
leaq 0x148(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x3f610
testb $0x1, %al
jne 0x3da7b
jmp 0x3da7d
jmp 0x3dae2
leaq 0x20aae(%rip), %rdi     # 0x5e532
leaq 0x20aba(%rip), %rsi     # 0x5e545
movl $0x9f, %edx
leaq 0x20abe(%rip), %rcx     # 0x5e555
callq 0x6220
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
jmp 0x3dad3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x3e930
leaq 0x58(%rsp), %rdi
callq 0x3f5f0
jmp 0x3db81
movq 0x180(%rsp), %rax
movq %rax, (%rsp)
leaq 0x148(%rsp), %rdi
callq 0x3fa60
movq (%rsp), %rsi
movq 0x38(%rsp), %rdi
movq %rax, %rdx
addq $0x78, %rdx
movb 0x3c(%rdi), %al
xorl %r8d, %r8d
andb $0x1, %al
movl %r8d, %ecx
movzbl %al, %r9d
callq 0x3f660
movl %eax, %ecx
movq 0x38(%rsp), %rax
movl %ecx, 0x44(%rsp)
movq 0x8(%rax), %rdi
movq 0x180(%rsp), %rsi
movl 0x44(%rsp), %edx
movq (%rdi), %rax
callq *0x30(%rax)
testb $0x1, %al
jne 0x3db46
jmp 0x3db48
jmp 0x3db67
leaq 0x20a6f(%rip), %rdi     # 0x5e5be
leaq 0x209ef(%rip), %rsi     # 0x5e545
movl $0xa1, %edx
leaq 0x209f3(%rip), %rcx     # 0x5e555
callq 0x6220
movl 0x44(%rsp), %eax
movl %eax, 0x194(%rsp)
movl 0x194(%rsp), %eax
addq $0x198, %rsp            # imm = 0x198
retq
movq 0x158(%rsp), %rdi
callq 0x6520
nop