// File: /workspace/github_cpp_makefile_star2_O3/bonetblai[P]mdp-engine/ctp3/../engine/utils.h
// Function: Utils::tokenize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<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>>>>>&, char)
inline void tokenize(const std::string &parameter_str, std::multimap<std::string, std::string> &parameters, char separator = ',') {
    for( size_t i = 0; i < parameter_str.size(); ++i ) {
        size_t first = i;
        int nesting_level = 0;
        while( i < parameter_str.size() ) {
            if( (parameter_str[i] == separator) && (nesting_level == 0) ) {
                break;
            } else if( parameter_str[i] == ')' ) {
                assert(nesting_level > 0);
                --nesting_level;
            } else if( parameter_str[i] == '(' ) {
                ++nesting_level;
            }
            ++i;
        }
        assert(nesting_level == 0);
        std::string par = parameter_str.substr(first, i - first);
        //std::cout << "parameter=|" << par << "|" << std::endl;
        size_t equal = par.find_first_of("=");
        assert(equal != std::string::npos);
        std::string key = par.substr(0, equal);
        std::string value = par.substr(equal + 1);
        //std::cout << "key=|" << key << "|, value=|" << value << "|" << std::endl;
        parameters.insert(std::make_pair(key, value));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, (%rsp)
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x79c8
movl %edx, %ebx
movq %rdi, %r15
xorl %edx, %edx
leaq 0x48(%rsp), %r12
leaq 0x1(%rdx), %r13
cmpq %r13, %rax
cmovaq %rax, %r13
movq (%r15), %rcx
movq %rdx, %rax
xorl %esi, %esi
movb (%rcx,%rax), %r8b
cmpb %bl, %r8b
jne 0x7893
testl %esi, %esi
je 0x78c4
cmpb $0x29, %r8b
jne 0x78a7
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
testl %esi, %esi
jg 0x78b1
jmp 0x79da
xorl %edi, %edi
cmpb $0x28, %r8b
sete %dil
addl %edi, %esi
incq %rax
cmpq %rax, %r13
jne 0x7886
testl %esi, %esi
je 0x78c7
jmp 0x7a18
movq %rax, %r13
movq %r13, %rcx
subq %rdx, %rcx
movq %r12, %rdi
movq %r15, %rsi
callq 0x52b0
movl $0x1, %ecx
movq %r12, %rdi
leaq 0x23957(%rip), %rsi     # 0x2b23e
xorl %edx, %edx
callq 0x5390
cmpq $-0x1, %rax
je 0x79f9
movq %rax, %rbp
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x52b0
incq %rbp
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq $-0x1, %rcx
callq 0x52b0
leaq 0x68(%rsp), %rbp
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0xd5fe
movq (%rsp), %rdi
movq %rbp, %rsi
callq 0xd41c
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x7965
callq 0x5260
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x7979
callq 0x5260
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x798d
callq 0x5260
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x79a1
callq 0x5260
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x79b5
callq 0x5260
incq %r13
movq 0x8(%r15), %rax
movq %r13, %rdx
cmpq %rax, %r13
jb 0x7873
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x23d15(%rip), %rdi     # 0x2b6f6
leaq 0x23d20(%rip), %rsi     # 0x2b708
leaq 0x23d2b(%rip), %rcx     # 0x2b71a
movl $0x62, %edx
callq 0x51c0
leaq 0x23d88(%rip), %rdi     # 0x2b788
leaq 0x23d01(%rip), %rsi     # 0x2b708
leaq 0x23d0c(%rip), %rcx     # 0x2b71a
movl $0x6d, %edx
callq 0x51c0
leaq 0x23d56(%rip), %rdi     # 0x2b775
leaq 0x23ce2(%rip), %rsi     # 0x2b708
leaq 0x23ced(%rip), %rcx     # 0x2b71a
movl $0x69, %edx
callq 0x51c0
movq %rax, %rbx
jmp 0x7a7b
movq %rax, %rbx
jmp 0x7a67
movq %rax, %rbx
jmp 0x7a53
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0xd35c
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x7a67
callq 0x5260
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x7a7b
callq 0x5260
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x7a8f
callq 0x5260
movq %rbx, %rdi
callq 0x5410
nop