// File: /workspace/github_cpp_makefile_star2_O2/bonetblai[P]mdp-engine/ctp3/../engine/dispatcher.h
// Function: Dispatcher::dispatcher_t<state_t>::create_request(Problem::problem_t<state_t> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void dispatcher_t<T>::create_request(const Problem::problem_t<T> &problem, const std::string &type, const std::string &request) {
    if( (type != "algorithm") && (type != "heuristic") && (type != "policy") ) {
        std::cout << Utils::error() << "dispatcher: create-request: invalid '" << type << "=" << request << "'" << std::endl;
        return;
    }

    // parse request
    std::string name;
    std::string parameter_str;
    std::multimap<std::string, std::string> parameters;
    Utils::split_request(request, name, parameter_str);
    Utils::tokenize(parameter_str, parameters);

    // algorithms
    if( type == "algorithm" ) {
        if( fetch_algorithm(request) != 0 ) {
#ifdef DEBUG
            std::cout << "dispatcher: create-request: found algorithm '" << request << "'" << std::endl;
#endif
            return;
        }
        std::cout << "dispatcher: create-request: creating: type=" << type << ", request=" << request << std::endl;

        Algorithm::algorithm_t<T> *algorithm = 0;
        if( name == "hdp" )
            algorithm = new Algorithm::hdp_t<T>(problem);
        else if( name == "improved-lao" )
            algorithm = new Algorithm::improved_lao_t<T>(problem);
        else if( name == "ldfs" )
            algorithm = new Algorithm::ldfs_t<T>(problem);
        else if( name == "ldfs-plus" )
            algorithm = new Algorithm::ldfs_plus_t<T>(problem);
        else if( (name == "standard-lrtdp") || (name == "lrtdp") )
            algorithm = new Algorithm::standard_lrtdp_t<T>(problem);
        else if( name == "uniform-lrtdp" )
            algorithm = new Algorithm::uniform_lrtdp_t<T>(problem);
        else if( name == "bounded-lrtdp" )
            algorithm = new Algorithm::bounded_lrtdp_t<T>(problem);
        else if( name == "plain-check" )
            algorithm = new Algorithm::plain_check_t<T>(problem);
        else if( (name == "simple-a*" ) || (name == "simple-astar") )
            algorithm = new Algorithm::simple_astar_t<T>(problem);
        else if( name == "value-iteration" )
            algorithm = new Algorithm::value_iteration_t<T>(problem);

        if( algorithm != 0 ) {
            algorithm->set_parameters(parameters, *this);
            algorithms_.insert(std::make_pair(request, algorithm));
            return;
        }
    }

    // heuristics
    if( type == "heuristic" ) {
        if( fetch_heuristic(request) != 0 ) {
#ifdef DEBUG
            std::cout << "dispatcher: create-request: found heuristic '" << request << "'" << std::endl;
#endif
            return;
        }
        std::cout << "dispatcher: create-request: creating: type=" << type << ", request=" << request << std::endl;

        Heuristic::heuristic_t<T> *heuristic = 0;
        if( name == "zero" )
            heuristic = new Heuristic::zero_heuristic_t<T>(problem);
        else if( name == "min-min" )
            heuristic = new Heuristic::min_min_heuristic_t<T>(problem);
        else if( name == "optimal" )
            heuristic = new Heuristic::optimal_heuristic_t<T>(problem);
        else if( name == "scaled" )
            heuristic = new Heuristic::scaled_heuristic_t<T>(problem);

        if( heuristic != 0 ) {
            heuristic->set_parameters(parameters, *this);
            heuristics_.insert(std::make_pair(request, heuristic));
            return;
        }
    }

    // policies
    if( type == "policy" ) {
        if( fetch_policy(request) != 0 ) {
#ifdef DEBUG
            std::cout << "dispatcher: create-request: found policy '" << request << "'" << std::endl;
#endif
            return;
        }
        std::cout << "dispatcher: create-request: creating: type=" << type << ", request=" << request << std::endl;

        Online::Policy::policy_t<T> *policy = 0;
        if( name == "optimal" )
            policy = new Online::Policy::optimal_policy_t<T>(problem);
        else if( name == "greedy" )
            policy = new Online::Policy::base_greedy_t<T>(problem);
        else if( name == "random" )
            policy = new Online::Policy::random_t<T>(problem);
        else if( name == "rollout" )
            policy = new Online::Policy::Rollout::nested_rollout_t<T>(problem);
        else if( name == "uct" )
            policy = new Online::Policy::UCT::uct_t<T>(problem);
        else if( name == "aot" )
            policy = new Online::Policy::AOT::aot_t<T>(problem);
        else if( name == "aot-gh" )
            assert(0);
        else if( name == "aot-path" )
            assert(0);
        else if( name == "finite-horizon-lrtdp" )
            policy = new Online::Policy::RTDP::finite_horizon_lrtdp_t<T>(problem);

        if( policy != 0 ) {
            policy->set_parameters(parameters, *this);
            policies_.insert(std::make_pair(request, policy));
            return;
        }
    }

    // if this far, request is not recognized
    std::cout << Utils::error() << "dispatcher: create-request: unrecognized: type=" << type << ", request=" << request << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
leaq 0x1941e(%rip), %rsi     # 0x2023d
movq %rdx, %rdi
callq 0xc1a1
testb %al, %al
je 0x6eca
leaq 0x1996c(%rip), %rsi     # 0x207a2
movq %r12, %rdi
callq 0xc1a1
testb %al, %al
je 0x6eca
leaq 0x193fa(%rip), %rsi     # 0x20247
movq %r12, %rdi
callq 0xc1a1
testb %al, %al
je 0x6eca
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0xc1ab
movq 0x2e16b(%rip), %rdi     # 0x34fd8
movq %r14, %rsi
callq 0x5250
leaq 0x19930(%rip), %rsi     # 0x207ac
movq %rax, %rdi
callq 0x5290
movq %rax, %rdi
movq %r12, %rsi
callq 0x5250
leaq 0x19368(%rip), %rsi     # 0x201fe
movq %rax, %rdi
callq 0x5290
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5250
leaq 0x19920(%rip), %rsi     # 0x207d0
movq %rax, %rdi
callq 0x5290
movq %rax, %rdi
callq 0x5130
leaq 0x48(%rsp), %rdi
jmp 0x769f
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x88(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq 0x50(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movq %rsp, %rsi
leaq 0x78(%rsp), %rdx
movq %rbx, %rdi
callq 0xc1df
leaq 0x78(%rsp), %rdi
leaq 0x48(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x6c2e
leaq 0x1930b(%rip), %rsi     # 0x2023d
movq %r12, %rdi
callq 0x6357
testb %al, %al
je 0x7256
movq %r14, %rdi
movq %rbx, %rsi
callq 0x775e
testq %rax, %rax
jne 0x7688
movq 0x2e07b(%rip), %rdi     # 0x34fd8
leaq 0x1986e(%rip), %rsi     # 0x207d2
callq 0x5290
movq %rax, %rdi
movq %r12, %rsi
callq 0x5250
leaq 0x19883(%rip), %rsi     # 0x207fe
movq %rax, %rdi
callq 0x5290
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5250
movq %rax, %rdi
callq 0x5130
leaq 0x1986c(%rip), %rsi     # 0x20809
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x6fde
pushq $0x20
popq %rdi
callq 0x52a0
movq %rax, %r12
movq %r15, 0x8(%rax)
andq $0x0, 0x10(%rax)
movl 0x2e2f9(%rip), %eax     # 0x352bc
movl %eax, 0x18(%r12)
leaq 0x2d161(%rip), %rax     # 0x34130
movq %rax, (%r12)
andl $0x0, 0x1c(%r12)
jmp 0x70a3
leaq 0x19828(%rip), %rsi     # 0x2080d
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x701c
pushq $0x20
popq %rdi
callq 0x52a0
movq %rax, %r12
movq %r15, 0x8(%rax)
andq $0x0, 0x10(%rax)
movl 0x2e2b1(%rip), %eax     # 0x352bc
movl %eax, 0x18(%r12)
leaq 0x2d1d9(%rip), %rax     # 0x341f0
jmp 0x709f
leaq 0x197f7(%rip), %rsi     # 0x2081a
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x705d
pushq $0x28
popq %rdi
callq 0x52a0
movq %rax, %r12
movq %r15, 0x8(%rax)
andq $0x0, 0x10(%rax)
movl 0x2e273(%rip), %eax     # 0x352bc
movl %eax, 0x18(%r12)
andq $0x0, 0x1c(%r12)
leaq 0x2d1f5(%rip), %rax     # 0x34250
jmp 0x709f
leaq 0x197bb(%rip), %rsi     # 0x2081f
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x70dc
pushq $0x28
popq %rdi
callq 0x52a0
movq %rax, %r12
movq %r15, 0x8(%rax)
andq $0x0, 0x10(%rax)
movl 0x2e232(%rip), %eax     # 0x352bc
movl %eax, 0x18(%r12)
movq $0x1, 0x1c(%r12)
leaq 0x2d229(%rip), %rax     # 0x342c8
movq %rax, (%r12)
movq (%r12), %rax
leaq 0x48(%rsp), %rsi
movq %r12, %rdi
movq %r14, %rdx
callq *0x20(%rax)
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x5370
leaq 0x20(%rsp), %rsi
movq %r12, 0x20(%rsi)
addq $0x8, %r14
movq %r14, %rdi
callq 0x127cc
jmp 0x767e
leaq 0x19746(%rip), %rsi     # 0x20829
movq %rsp, %rdi
callq 0x6357
testb %al, %al
jne 0x7102
leaq 0x19758(%rip), %rsi     # 0x2084e
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x711a
pushq $0x30
popq %rdi
callq 0x52a0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0xc2b0
jmp 0x70a3
leaq 0x19717(%rip), %rsi     # 0x20838
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x7148
pushq $0x30
popq %rdi
callq 0x52a0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0xc2d8
jmp 0x70a3
leaq 0x196f7(%rip), %rsi     # 0x20846
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x7176
pushq $0x30
popq %rdi
callq 0x52a0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0xc300
jmp 0x70a3
leaq 0x196d7(%rip), %rsi     # 0x20854
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x71b4
pushq $0x20
popq %rdi
callq 0x52a0
movq %rax, %r12
movq %r15, 0x8(%rax)
andq $0x0, 0x10(%rax)
movl 0x2e119(%rip), %eax     # 0x352bc
movl %eax, 0x18(%r12)
leaq 0x2d2b1(%rip), %rax     # 0x34460
jmp 0x709f
leaq 0x196a5(%rip), %rsi     # 0x20860
movq %rsp, %rdi
callq 0x6357
testb %al, %al
jne 0x71da
leaq 0x1969c(%rip), %rsi     # 0x2086a
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x7205
pushq $0x20
popq %rdi
callq 0x52a0
movq %rax, %r12
movq %r15, 0x8(%rax)
andq $0x0, 0x10(%rax)
movl 0x2e0c8(%rip), %eax     # 0x352bc
movl %eax, 0x18(%r12)
leaq 0x2d2c0(%rip), %rax     # 0x344c0
jmp 0x709f
leaq 0x1966b(%rip), %rsi     # 0x20877
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x7256
pushq $0x28
popq %rdi
callq 0x52a0
movq %rax, %r12
movq %r15, 0x8(%rax)
andq $0x0, 0x10(%rax)
movl 0x2e08a(%rip), %eax     # 0x352bc
movl %eax, 0x18(%r12)
leaq 0x2d2e2(%rip), %rax     # 0x34520
movq %rax, (%r12)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x1c(%r12)
jmp 0x70a3
leaq 0x19545(%rip), %rsi     # 0x207a2
movq %r12, %rdi
callq 0x6357
testb %al, %al
je 0x73d0
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc328
testq %rax, %rax
jne 0x7688
movq 0x2dd50(%rip), %rdi     # 0x34fd8
leaq 0x19543(%rip), %rsi     # 0x207d2
callq 0x5290
movq %rax, %rdi
movq %r12, %rsi
callq 0x5250
leaq 0x19558(%rip), %rsi     # 0x207fe
movq %rax, %rdi
callq 0x5290
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5250
movq %rax, %rdi
callq 0x5130
leaq 0x195bf(%rip), %rsi     # 0x20887
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x72fc
pushq $0x20
popq %rdi
callq 0x52a0
movq %rax, %r12
movq %r15, 0x8(%rax)
andq $0x0, 0x10(%rax)
andl $0x0, 0x18(%rax)
leaq 0x2d28d(%rip), %rax     # 0x34580
movq %rax, (%r12)
jmp 0x7397
leaq 0x19589(%rip), %rsi     # 0x2088c
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x7327
pushq $0x30
popq %rdi
callq 0x52a0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0xc348
jmp 0x7397
leaq 0x19566(%rip), %rsi     # 0x20894
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x7352
pushq $0x30
popq %rdi
callq 0x52a0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0xc3be
jmp 0x7397
leaq 0x19543(%rip), %rsi     # 0x2089c
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x73d0
pushq $0x30
popq %rdi
callq 0x52a0
movq %rax, %r12
movq %r15, 0x8(%rax)
andq $0x0, 0x10(%rax)
andl $0x0, 0x18(%rax)
leaq 0x2d43c(%rip), %rax     # 0x347c0
movq %rax, (%r12)
andq $0x0, 0x20(%r12)
movl $0x3f800000, 0x28(%r12) # imm = 0x3F800000
movq (%r12), %rax
leaq 0x48(%rsp), %rsi
movq %r12, %rdi
movq %r14, %rdx
callq *0x38(%rax)
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x5370
leaq 0x20(%rsp), %rsi
movq %r12, 0x20(%rsi)
addq $0x38, %r14
movq %r14, %rdi
callq 0xbdc6
jmp 0x767e
leaq 0x18e70(%rip), %rsi     # 0x20247
movq %r12, %rdi
callq 0x6357
testb %al, %al
je 0x7627
movq %r14, %rdi
movq %rbx, %rsi
callq 0x777e
testq %rax, %rax
jne 0x7688
movq 0x2dbd6(%rip), %rdi     # 0x34fd8
leaq 0x193c9(%rip), %rsi     # 0x207d2
callq 0x5290
movq %rax, %rdi
movq %r12, %rsi
callq 0x5250
leaq 0x193de(%rip), %rsi     # 0x207fe
movq %rax, %rdi
callq 0x5290
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5250
movq %rax, %rdi
callq 0x5130
leaq 0x19452(%rip), %rsi     # 0x20894
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x7469
pushq $0x38
popq %rdi
callq 0x52a0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0xc434
jmp 0x75f1
leaq 0x198b6(%rip), %rsi     # 0x20d26
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x7497
pushq $0x70
popq %rdi
callq 0x52a0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0xc4ae
jmp 0x75f1
leaq 0x19405(%rip), %rsi     # 0x208a3
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x74dd
pushq $0x28
popq %rdi
callq 0x52a0
movq %rax, %r12
movq %r15, 0x8(%rax)
movl 0x2de01(%rip), %eax     # 0x352c0
movl %eax, 0x10(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x14(%r12)
leaq 0x2ca84(%rip), %rax     # 0x33f58
movq %rax, (%r12)
jmp 0x75f1
leaq 0x193c6(%rip), %rsi     # 0x208aa
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x753b
pushq $0x58
popq %rdi
callq 0x52a0
movq %rax, %r12
movq %r15, 0x8(%rax)
movl 0x2ddbb(%rip), %eax     # 0x352c0
movl %eax, 0x10(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x14(%r12)
andq $0x0, 0x28(%r12)
leaq 0x2d420(%rip), %rax     # 0x34940
movq %rax, (%r12)
movups %xmm0, 0x30(%r12)
movups %xmm0, 0x40(%r12)
andl $0x0, 0x50(%r12)
jmp 0x75f1
leaq 0x19370(%rip), %rsi     # 0x208b2
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x756b
movl $0x80, %edi
callq 0x52a0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0xc4f6
jmp 0x75f1
leaq 0x19344(%rip), %rsi     # 0x208b6
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x7598
movl $0x1b8, %edi            # imm = 0x1B8
callq 0x52a0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0xc548
jmp 0x75f1
leaq 0x1931b(%rip), %rsi     # 0x208ba
movq %rsp, %rdi
callq 0x6357
testb %al, %al
jne 0x76b3
leaq 0x193b0(%rip), %rsi     # 0x20966
movq %rsp, %rdi
callq 0x6357
testb %al, %al
jne 0x76d2
leaq 0x193a2(%rip), %rsi     # 0x2096f
movq %rsp, %rdi
callq 0x6357
testb %al, %al
je 0x7627
movl $0x88, %edi
callq 0x52a0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0xc666
movq (%r12), %rax
leaq 0x48(%rsp), %rsi
movq %r12, %rdi
movq %r14, %rdx
callq *0x38(%rax)
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x5370
leaq 0x20(%rsp), %rsi
movq %r12, 0x20(%rsi)
addq $0x68, %r14
movq %r14, %rdi
callq 0xbfb4
jmp 0x767e
leaq 0x20(%rsp), %rdi
callq 0xc1ab
movq 0x2d9a0(%rip), %rdi     # 0x34fd8
leaq 0x20(%rsp), %rsi
callq 0x5250
leaq 0x1933b(%rip), %rsi     # 0x20984
movq %rax, %rdi
callq 0x5290
movq %rax, %rdi
movq %r12, %rsi
callq 0x5250
leaq 0x1919b(%rip), %rsi     # 0x207fe
movq %rax, %rdi
callq 0x5290
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5250
movq %rax, %rdi
callq 0x5130
leaq 0x20(%rsp), %rdi
callq 0x5120
leaq 0x48(%rsp), %rdi
callq 0xb9c0
leaq 0x78(%rsp), %rdi
callq 0x5120
movq %rsp, %rdi
callq 0x5120
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x19990(%rip), %rdi     # 0x2104a
leaq 0x19200(%rip), %rsi     # 0x208c1
leaq 0x19210(%rip), %rcx     # 0x208d8
movl $0x104, %edx            # imm = 0x104
callq 0x51b0
leaq 0x19971(%rip), %rdi     # 0x2104a
leaq 0x191e1(%rip), %rsi     # 0x208c1
leaq 0x191f1(%rip), %rcx     # 0x208d8
movl $0x106, %edx            # imm = 0x106
callq 0x51b0
jmp 0x76fd
jmp 0x76fd
jmp 0x76fd
jmp 0x76fd
jmp 0x76fd
jmp 0x76fd
movq %rax, %rbx
movq %r12, %rdi
callq 0x5270
jmp 0x773a
jmp 0x771e
jmp 0x7737
jmp 0x771e
jmp 0x7737
jmp 0x7737
jmp 0x7737
jmp 0x7737
jmp 0x771e
jmp 0x7737
jmp 0x7737
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5120
jmp 0x773a
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x7751
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xb9c0
leaq 0x78(%rsp), %rdi
callq 0x5120
movq %rsp, %rdi
callq 0x5120
movq %rbx, %rdi
callq 0x5410