// File: mahdibohloul[P]SnapTrip/./Business-Logic/Backend.cpp
// Function: Backend::command_processor(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>>>>)
void Backend::command_processor(data_t command_data)
{
    if(!command_data.empty())
    {
        object_relational = ObjectRelational::get_instance();
        auto command_itr = command_data.begin();
        if(*command_itr != ConstNames::POST_METHOD && *command_itr != ConstNames::GET_METHOD && *command_itr != ConstNames::DELETE_METHOD)
            throw Exception(ConstNames::Bad_Request_msg);
        request_method method = func_method_map[*command_itr];
        command_data.erase(command_itr);
        (this->*method)(command_data);
    }
    else
        throw Exception(ConstNames::Bad_Request_msg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rsi, -0xc0(%rbp)
movq %rdi, %rax
movq -0xc0(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xb0(%rbp)
callq 0x80940
testb $0x1, %al
jne 0x784a7
callq 0x73250
movq -0xb8(%rbp), %rdi
movq %rax, %rcx
movq -0xb0(%rbp), %rax
movq %rcx, (%rax)
callq 0x80980
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x809b0
movq %rax, %rdi
leaq 0x9f088(%rip), %rsi     # 0x117320
callq 0x54fc0
testb $0x1, %al
jne 0x782a6
jmp 0x78380
leaq -0x18(%rbp), %rdi
callq 0x809b0
movq %rax, %rdi
leaq 0x9f087(%rip), %rsi     # 0x117340
callq 0x54fc0
testb $0x1, %al
jne 0x782c7
jmp 0x78380
leaq -0x18(%rbp), %rdi
callq 0x809b0
movq %rax, %rdi
leaq 0x9f086(%rip), %rsi     # 0x117360
callq 0x54fc0
testb $0x1, %al
jne 0x782e8
jmp 0x78380
movb $0x1, -0x45(%rbp)
movl $0x28, %edi
callq 0x6210
movq %rax, -0xc8(%rbp)
leaq 0x9f07c(%rip), %rsi     # 0x117380
leaq -0x38(%rbp), %rdi
callq 0x61d0
jmp 0x7830f
movq -0xc8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xabc90
jmp 0x78321
movq -0xc8(%rbp), %rdi
movb $0x0, -0x45(%rbp)
leaq 0x8f935(%rip), %rsi     # 0x107c68
leaq 0x339c6(%rip), %rdx     # 0xabd00
callq 0x6710
jmp 0x7855d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x78367
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x6828
testb $0x1, -0x45(%rbp)
jne 0x7836f
jmp 0x7837b
movq -0xc8(%rbp), %rdi
callq 0x6360
jmp 0x78554
movq -0xb0(%rbp), %rax
addq $0x20, %rax
movq %rax, -0xe8(%rbp)
leaq -0x18(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x809b0
movq -0xe8(%rbp), %rdi
movq %rax, %rsi
callq 0x809d0
movq -0xe0(%rbp), %rsi
movq %rax, %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
movq %rcx, -0x50(%rbp)
movq %rax, -0x58(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x80b20
movq -0xb8(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x80ab0
movq -0xb0(%rbp), %rcx
movq %rax, -0x68(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x50(%rbp), %rdx
addq %rdx, %rcx
movq %rcx, -0xd0(%rbp)
andq $0x1, %rax
cmpq $0x0, %rax
je 0x78433
movq -0xd8(%rbp), %rcx
movq -0xd0(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rcx
movq (%rax,%rcx), %rax
movq %rax, -0xf0(%rbp)
jmp 0x78441
movq -0xd8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0xb8(%rbp), %rsi
movq -0xf0(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0x80(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x72990
movq -0xd0(%rbp), %rdi
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rax
callq *%rax
jmp 0x7847f
leaq -0x80(%rbp), %rdi
callq 0x72a80
jmp 0x7854b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x72a80
jmp 0x78554
movb $0x1, -0xa1(%rbp)
movl $0x28, %edi
callq 0x6210
movq %rax, -0x108(%rbp)
leaq 0x9eeba(%rip), %rsi     # 0x117380
leaq -0xa0(%rbp), %rdi
callq 0x61d0
jmp 0x784d4
movq -0x108(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xabc90
jmp 0x784e9
movq -0x108(%rbp), %rdi
movb $0x0, -0xa1(%rbp)
leaq 0x8f76a(%rip), %rsi     # 0x107c68
leaq 0x337fb(%rip), %rdx     # 0xabd00
callq 0x6710
jmp 0x7855d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x78532
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x6828
testb $0x1, -0xa1(%rbp)
jne 0x7853d
jmp 0x78549
movq -0x108(%rbp), %rdi
callq 0x6360
jmp 0x78554
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x6750
nopl (%rax)