// File: mahdibohloul[P]SnapTrip/./Business-Logic/Backend.cpp
// Function: Backend::fill_sort_info(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&)
Database::User::SortInfo Backend::fill_sort_info(const data_t& data)
{
    auto sort_info = Database::User::SortInfo();
    string property = find_info(ConstNames::Property, data);
    string mode = find_info(ConstNames::Order, data);
    if(!valid_sort_info(property, mode))
        throw Exception(ConstNames::Bad_Request_msg);
    sort_info.property = sort_info.map_sort_property[property];
    sort_info.mode = (mode == ConstNames::Ascending) ? Database::User::SortMode::SM_Ascending : Database::User::SortMode::SM_Descending;
    return sort_info;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0xd0(%rbp)
movq %rdi, %rax
movq %rax, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xc0(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x658d0
movq -0xc0(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq 0x99892(%rip), %rdx     # 0x117c40
leaq -0x40(%rbp), %rdi
callq 0x7bad0
jmp 0x7e3b9
movq -0xc0(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq 0x99895(%rip), %rdx     # 0x117c60
leaq -0x70(%rbp), %rdi
callq 0x7bad0
jmp 0x7e3d6
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x61d0
jmp 0x7e3e8
movq -0xc0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0x7f790
movb %al, -0xd1(%rbp)
jmp 0x7e407
movb -0xd1(%rbp), %al
xorb $-0x1, %al
movb %al, -0xd2(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x6828
movb -0xd2(%rbp), %al
testb $0x1, %al
jne 0x7e430
jmp 0x7e527
movb $0x1, -0xb1(%rbp)
movl $0x28, %edi
callq 0x6210
movq %rax, -0xe0(%rbp)
leaq 0x98f31(%rip), %rsi     # 0x117380
leaq -0xb0(%rbp), %rdi
callq 0x61d0
jmp 0x7e45d
movq -0xe0(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0xabc90
jmp 0x7e472
movq -0xe0(%rbp), %rdi
movb $0x0, -0xb1(%rbp)
leaq 0x897e1(%rip), %rsi     # 0x107c68
leaq 0x2d872(%rip), %rdx     # 0xabd00
callq 0x6710
jmp 0x7e5e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7e5cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7e5a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7e59c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x6828
jmp 0x7e59c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7e50e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x6828
testb $0x1, -0xb1(%rbp)
jne 0x7e519
jmp 0x7e525
movq -0xe0(%rbp), %rdi
callq 0x6360
jmp 0x7e59c
movq -0xd0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x80ce0
movq %rax, -0xe8(%rbp)
jmp 0x7e540
movq -0xd0(%rbp), %rax
movq -0xe8(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x30(%rax)
leaq -0x70(%rbp), %rdi
leaq 0x99842(%rip), %rsi     # 0x117da0
callq 0x55080
movb %al, %sil
movq -0xd0(%rbp), %rax
movl $0x1, %ecx
xorl %edx, %edx
testb $0x1, %sil
cmovnel %edx, %ecx
movl %ecx, 0x34(%rax)
movb $0x1, -0x19(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x6828
leaq -0x40(%rbp), %rdi
callq 0x6828
testb $0x1, -0x19(%rbp)
jne 0x7e5bc
jmp 0x7e5b0
leaq -0x70(%rbp), %rdi
callq 0x6828
leaq -0x40(%rbp), %rdi
callq 0x6828
jmp 0x7e5cc
movq -0xd0(%rbp), %rdi
callq 0x692d0
movq -0xc8(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
movq -0xd0(%rbp), %rdi
callq 0x692d0
movq -0x48(%rbp), %rdi
callq 0x6750
nopw %cs:(%rax,%rax)