// File: /workspace/github_cpp_makefile_star2_O1/MatthewZMD[P]TetrisDual/interface.cc
// Function: Interface::cmdInterpreter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, unsigned int)
std::string Interface::cmdInterpreter(const std::string& cmd, const std::vector<std::string>& cmdList, unsigned i){
    if(cmd.size() == 0 && cmdList.size() > 1){
        // Matched more than 1 command
        return "";
    }
    std::vector<std::string> newList;
    // Loop through the command
    for(unsigned l = 0; l < cmdList.size(); ++l){
        if(cmdList.at(l).size() > i && cmd.at(0) == cmdList.at(l).at(i)){
            newList.emplace_back(cmdList.at(l));
        }
    }
    if(newList.size() == 0){
        // Cannot find any match string
        return "";
    } else if (newList.size() == 1){
        return newList.at(0);
    } else {
        return cmdInterpreter(cmd.substr(1), newList, i + 1);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r8d, 0xc(%rsp)
movq %rcx, %r12
movq %rdx, %r15
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdx)
jne 0x688c
movq 0x8(%r12), %rax
subq (%r12), %rax
cmpq $0x21, %rax
jb 0x688c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xd26d(%rip), %rdx      # 0x13ae9
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x5fae
jmp 0x69b4
movq %rsi, 0x30(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq (%r12), %rsi
cmpq %rsi, 0x8(%r12)
je 0x6908
movl 0xc(%rsp), %r14d
movl $0x1, %ebp
xorl %eax, %eax
leaq 0x10(%rsp), %r13
shlq $0x5, %rax
cmpq %r14, 0x8(%rsi,%rax)
jbe 0x68ef
movq 0x8(%r15), %rdx
testq %rdx, %rdx
je 0x69c6
addq %rax, %rsi
movq (%r15), %rax
movb (%rax), %al
movq (%rsi), %rcx
cmpb (%rcx,%r14), %al
jne 0x68ef
movq %r13, %rdi
callq 0x7344
movl %ebp, %eax
movq (%r12), %rsi
movq 0x8(%r12), %rcx
subq %rsi, %rcx
sarq $0x5, %rcx
incl %ebp
cmpq %rax, %rcx
ja 0x68be
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
je 0x693c
cmpq $0x1, %rcx
jne 0x6957
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x6230
jmp 0x69aa
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xd19f(%rip), %rdx      # 0x13ae9
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x5fae
jmp 0x69aa
leaq 0x38(%rsp), %rdi
movl $0x1, %edx
movq %r15, %rsi
movq $-0x1, %rcx
callq 0x52f0
movl 0xc(%rsp), %r8d
incl %r8d
leaq 0x38(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
movq 0x30(%rsp), %rsi
callq 0x683c
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x69aa
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x52e0
leaq 0x10(%rsp), %rdi
callq 0x630c
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc8a5(%rip), %rdi      # 0x13272
xorl %esi, %esi
xorl %eax, %eax
callq 0x5410
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6a01
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x52e0
jmp 0x6a01
jmp 0x69fe
jmp 0x69fe
jmp 0x69fe
jmp 0x69fe
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x630c
movq %rbx, %rdi
callq 0x54e0
nop