// File: /workspace/github_cpp_makefile_star2_O2/momohatt[P]seccampDB/utils.cpp
// Function: parse_query(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Query parse_query(string input) {
    Query q = Query();
    vector<string> fields = words(input);

    if (fields[0] == "set") {
        assert(fields.size() == 3);
        q.cmd = Query::Set;
        q.arg1 = fields[1];
        q.arg2 = stoi(fields[2]);
    } else if (fields[0] == "get") {
        assert(fields.size() == 2);
        q.cmd = Query::Get;
        q.arg1 = fields[1];
    } else if (fields[0] == "del") {
        assert(fields.size() == 2);
        q.cmd = Query::Del;
        q.arg1 = fields[1];
    } else if (fields[0] == "begin") {
        assert(fields.size() == 1);
        q.cmd = Query::Begin;
    } else if (fields[0] == "commit") {
        assert(fields.size() == 1);
        q.cmd = Query::Commit;
    } else if (fields[0] == "abort") {
        assert(fields.size() == 2);
        q.cmd = Query::Abort;
    } else if (fields[0] == "keys") {
        assert(fields.size() == 1);
        q.cmd = Query::Keys;
    } else {
        q.cmd = Query::Unknown;
    }
    return q;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
callq 0x3bc4
movq %rsp, %rdi
movq %r14, %rsi
callq 0x372c
movq (%rsp), %rdi
leaq 0x7701(%rip), %rsi      # 0xb004
callq 0x3bf1
testb %al, %al
je 0x3949
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x60, %rax
jne 0x3a93
andl $0x0, (%rbx)
addq $0x20, %rsi
leaq 0x8(%rbx), %rdi
callq 0x3170
movq (%rsp), %rdi
addq $0x40, %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x3bfe
movl %eax, 0x28(%rbx)
jmp 0x39b3
movq (%rsp), %rdi
leaq 0x76eb(%rip), %rsi      # 0xb03f
callq 0x3bf1
testb %al, %al
je 0x3977
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x40, %rax
jne 0x3aaf
pushq $0x1
jmp 0x39a3
movq (%rsp), %rdi
leaq 0x76d4(%rip), %rsi      # 0xb056
callq 0x3bf1
testb %al, %al
je 0x39c6
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x40, %rax
jne 0x3ac8
pushq $0x2
popq %rax
movl %eax, (%rbx)
addq $0x20, %rsi
leaq 0x8(%rbx), %rdi
callq 0x3170
movq %rsp, %rdi
callq 0x3ba2
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq (%rsp), %rdi
leaq 0x7689(%rip), %rsi      # 0xb05a
callq 0x3bf1
testb %al, %al
je 0x39f5
movq 0x8(%rsp), %rax
subq (%rsp), %rax
cmpq $0x20, %rax
jne 0x3ae1
movl $0x3, (%rbx)
jmp 0x39b3
movq (%rsp), %rdi
leaq 0x7673(%rip), %rsi      # 0xb073
callq 0x3bf1
testb %al, %al
je 0x3a24
movq 0x8(%rsp), %rax
subq (%rsp), %rax
cmpq $0x20, %rax
jne 0x3afa
movl $0x4, (%rbx)
jmp 0x39b3
movq (%rsp), %rdi
leaq 0x764b(%rip), %rsi      # 0xb07a
callq 0x3bf1
testb %al, %al
je 0x3a56
movq 0x8(%rsp), %rax
subq (%rsp), %rax
cmpq $0x40, %rax
jne 0x3b13
movl $0x5, (%rbx)
jmp 0x39b3
movq (%rsp), %rdi
leaq 0x761f(%rip), %rsi      # 0xb080
callq 0x3bf1
testb %al, %al
je 0x3a88
movq 0x8(%rsp), %rax
subq (%rsp), %rax
cmpq $0x20, %rax
jne 0x3b2c
movl $0x6, (%rbx)
jmp 0x39b3
movl $0x7, (%rbx)
jmp 0x39b3
leaq 0x756e(%rip), %rdi      # 0xb008
leaq 0x757a(%rip), %rsi      # 0xb01b
leaq 0x757d(%rip), %rcx      # 0xb025
pushq $0x31
jmp 0x3b43
leaq 0x758d(%rip), %rdi      # 0xb043
leaq 0x755e(%rip), %rsi      # 0xb01b
leaq 0x7561(%rip), %rcx      # 0xb025
pushq $0x36
jmp 0x3b43
leaq 0x7574(%rip), %rdi      # 0xb043
leaq 0x7545(%rip), %rsi      # 0xb01b
leaq 0x7548(%rip), %rcx      # 0xb025
pushq $0x3a
jmp 0x3b43
leaq 0x7578(%rip), %rdi      # 0xb060
leaq 0x752c(%rip), %rsi      # 0xb01b
leaq 0x752f(%rip), %rcx      # 0xb025
pushq $0x3e
jmp 0x3b43
leaq 0x755f(%rip), %rdi      # 0xb060
leaq 0x7513(%rip), %rsi      # 0xb01b
leaq 0x7516(%rip), %rcx      # 0xb025
pushq $0x41
jmp 0x3b43
leaq 0x7529(%rip), %rdi      # 0xb043
leaq 0x74fa(%rip), %rsi      # 0xb01b
leaq 0x74fd(%rip), %rcx      # 0xb025
pushq $0x44
jmp 0x3b43
leaq 0x752d(%rip), %rdi      # 0xb060
leaq 0x74e1(%rip), %rsi      # 0xb01b
leaq 0x74e4(%rip), %rcx      # 0xb025
pushq $0x47
popq %rdx
callq 0x31b0
movq %rax, %r14
jmp 0x3b59
movq %rax, %r14
movq %rsp, %rdi
callq 0x3ba2
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x3498
movq %r14, %rdi
callq 0x3410