// File: mahdibohloul[P]SnapTrip/./Business-Logic/Backend.cpp
// Function: Backend::fill_filter_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::FilterInfo Backend::fill_filter_info(const data_t& data)
{
    Database::User::FilterInfo filter_info = Database::User::FilterInfo();
    string min_star = find_info(ConstNames::Min_Star, data);
    string max_star = find_info(ConstNames::Max_Star, data);
    string min_price = find_info(ConstNames::Min_Price, data);
    string max_price = find_info(ConstNames::Max_Price, data);
    string type = find_info(ConstNames::Type, data);
    string quantity = find_info(ConstNames::Quantity, data);
    string check_in = find_info(ConstNames::Check_In, data);
    string check_out = find_info(ConstNames::Check_Out, data);
    string city = find_info(ConstNames::City, data);
    if(city != ConstNames::Empty_Str)
    {
        filter_info.city = city;
        filter_info.mode = Database::User::FilterMode::City;
    }
    else if(valid_hotel_star(min_star, max_star))
    {
        filter_info.min_star = stoi(min_star);
        filter_info.max_star = stoi(max_star);
        filter_info.mode = Database::User::FilterMode::StarRange;
    }
    else if(valid_price_range(min_price, max_price))
    {
        filter_info.min_price = stold(min_price);
        filter_info.max_price = stold(max_price);
        filter_info.mode = Database::User::FilterMode::AvgPrice;
    }
    else if(valid_advanced_filter(type, quantity, check_in, check_out))
    {
        filter_info.type = filter_info.m_room_type[type];
        filter_info.quantity = stoi(quantity);
        filter_info.check_in = stoi(check_in);
        filter_info.check_out = stoi(check_out);
        filter_info.mode = Database::User::FilterMode::Advanced;
    }
    return filter_info;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movq %rdi, -0x268(%rbp)
movq %rdi, %rax
movq %rax, -0x260(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x258(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x655e0
movq -0x258(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq 0x9a282(%rip), %rdx     # 0x1178c0
leaq -0x40(%rbp), %rdi
callq 0x7bad0
jmp 0x7d649
movq -0x258(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq 0x9a285(%rip), %rdx     # 0x1178e0
leaq -0x70(%rbp), %rdi
callq 0x7bad0
jmp 0x7d666
movq -0x258(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq 0x9a288(%rip), %rdx     # 0x117900
leaq -0x90(%rbp), %rdi
callq 0x7bad0
jmp 0x7d686
movq -0x258(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq 0x9a288(%rip), %rdx     # 0x117920
leaq -0xb0(%rbp), %rdi
callq 0x7bad0
jmp 0x7d6a6
movq -0x258(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq 0x9a308(%rip), %rdx     # 0x1179c0
leaq -0xd0(%rbp), %rdi
callq 0x7bad0
jmp 0x7d6c6
movq -0x258(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq 0x9a308(%rip), %rdx     # 0x1179e0
leaq -0xf0(%rbp), %rdi
callq 0x7bad0
jmp 0x7d6e6
movq -0x258(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq 0x9a308(%rip), %rdx     # 0x117a00
leaq -0x110(%rbp), %rdi
callq 0x7bad0
jmp 0x7d706
movq -0x258(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq 0x9a308(%rip), %rdx     # 0x117a20
leaq -0x130(%rbp), %rdi
callq 0x7bad0
jmp 0x7d726
movq -0x258(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq 0x9a108(%rip), %rdx     # 0x117840
leaq -0x150(%rbp), %rdi
callq 0x7bad0
jmp 0x7d746
leaq -0x150(%rbp), %rdi
leaq 0x99a4c(%rip), %rsi     # 0x1171a0
callq 0x54fc0
testb $0x1, %al
jne 0x7d762
jmp 0x7d838
movq -0x268(%rbp), %rdi
addq $0x38, %rdi
leaq -0x150(%rbp), %rsi
callq 0x6060
jmp 0x7d77b
movq -0x268(%rbp), %rax
movl $0x1, 0x30(%rax)
jmp 0x7dc3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7dd34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7dd0d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7dd04
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7dcf8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7dcec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7dce0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7dcd4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7dcc8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7dcbc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7dcb0
leaq -0x170(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x61d0
jmp 0x7d84a
leaq -0x190(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x61d0
jmp 0x7d85c
movq -0x258(%rbp), %rdi
leaq -0x170(%rbp), %rsi
leaq -0x190(%rbp), %rdx
callq 0x7f890
movb %al, -0x269(%rbp)
jmp 0x7d87e
leaq -0x190(%rbp), %rdi
callq 0x6828
leaq -0x170(%rbp), %rdi
callq 0x6828
movb -0x269(%rbp), %al
testb $0x1, %al
jne 0x7d8a5
jmp 0x7d93c
xorl %eax, %eax
movl %eax, %esi
leaq -0x40(%rbp), %rdi
movl $0xa, %edx
callq 0x74d10
movl %eax, -0x270(%rbp)
jmp 0x7d8bf
movq -0x268(%rbp), %rax
movl -0x270(%rbp), %ecx
movl %ecx, 0x58(%rax)
xorl %eax, %eax
movl %eax, %esi
leaq -0x70(%rbp), %rdi
movl $0xa, %edx
callq 0x74d10
movl %eax, -0x274(%rbp)
jmp 0x7d8e9
movq -0x268(%rbp), %rax
movl -0x274(%rbp), %ecx
movl %ecx, 0x5c(%rax)
movl $0x2, 0x30(%rax)
jmp 0x7dc3c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7d92b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x6828
leaq -0x170(%rbp), %rdi
callq 0x6828
jmp 0x7dcb0
leaq -0x1b0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x61d0
jmp 0x7d951
leaq -0x1d0(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x61d0
jmp 0x7d966
movq -0x258(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
leaq -0x1d0(%rbp), %rdx
callq 0x7f9d0
movb %al, -0x275(%rbp)
jmp 0x7d988
leaq -0x1d0(%rbp), %rdi
callq 0x6828
leaq -0x1b0(%rbp), %rdi
callq 0x6828
movb -0x275(%rbp), %al
testb $0x1, %al
jne 0x7d9af
jmp 0x7da42
xorl %eax, %eax
movl %eax, %esi
leaq -0x90(%rbp), %rdi
callq 0x74cd0
fstpt -0x280(%rbp)
jmp 0x7d9c7
movq -0x268(%rbp), %rax
fldt -0x280(%rbp)
fstpt 0x60(%rax)
xorl %eax, %eax
movl %eax, %esi
leaq -0xb0(%rbp), %rdi
callq 0x74cd0
fstpt -0x28c(%rbp)
jmp 0x7d9ef
movq -0x268(%rbp), %rax
fldt -0x28c(%rbp)
fstpt 0x70(%rax)
movl $0x3, 0x30(%rax)
jmp 0x7dc3a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7da31
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x6828
leaq -0x1b0(%rbp), %rdi
callq 0x6828
jmp 0x7dcb0
leaq -0x1f0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x61d0
jmp 0x7da57
leaq -0x210(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x61d0
jmp 0x7da6c
leaq -0x230(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x61d0
jmp 0x7da81
leaq -0x250(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x61d0
jmp 0x7da96
movq -0x258(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
leaq -0x210(%rbp), %rdx
leaq -0x230(%rbp), %rcx
leaq -0x250(%rbp), %r8
callq 0x7fb60
movb %al, -0x28d(%rbp)
jmp 0x7dac6
leaq -0x250(%rbp), %rdi
callq 0x6828
leaq -0x230(%rbp), %rdi
callq 0x6828
leaq -0x210(%rbp), %rdi
callq 0x6828
leaq -0x1f0(%rbp), %rdi
callq 0x6828
movb -0x28d(%rbp), %al
testb $0x1, %al
jne 0x7db05
jmp 0x7dc38
movq -0x268(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x80dc0
movq %rax, -0x298(%rbp)
jmp 0x7db21
movq -0x268(%rbp), %rax
movq -0x298(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x80(%rax)
xorl %eax, %eax
movl %eax, %esi
leaq -0xf0(%rbp), %rdi
movl $0xa, %edx
callq 0x74d10
movl %eax, -0x29c(%rbp)
jmp 0x7db54
movq -0x268(%rbp), %rax
movl -0x29c(%rbp), %ecx
movl %ecx, 0x84(%rax)
xorl %eax, %eax
movl %eax, %esi
leaq -0x110(%rbp), %rdi
movl $0xa, %edx
callq 0x74d10
movl %eax, -0x2a0(%rbp)
jmp 0x7db84
movq -0x268(%rbp), %rax
movl -0x2a0(%rbp), %ecx
movl %ecx, 0x88(%rax)
xorl %eax, %eax
movl %eax, %esi
leaq -0x130(%rbp), %rdi
movl $0xa, %edx
callq 0x74d10
movl %eax, -0x2a4(%rbp)
jmp 0x7dbb4
movq -0x268(%rbp), %rax
movl -0x2a4(%rbp), %ecx
movl %ecx, 0x8c(%rax)
movl $0x4, 0x30(%rax)
jmp 0x7dc38
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7dc2a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7dc1e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x7dc12
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x6828
leaq -0x230(%rbp), %rdi
callq 0x6828
leaq -0x210(%rbp), %rdi
callq 0x6828
leaq -0x1f0(%rbp), %rdi
callq 0x6828
jmp 0x7dcb0
jmp 0x7dc3a
jmp 0x7dc3c
jmp 0x7dc3e
movb $0x1, -0x19(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x6828
leaq -0x130(%rbp), %rdi
callq 0x6828
leaq -0x110(%rbp), %rdi
callq 0x6828
leaq -0xf0(%rbp), %rdi
callq 0x6828
leaq -0xd0(%rbp), %rdi
callq 0x6828
leaq -0xb0(%rbp), %rdi
callq 0x6828
leaq -0x90(%rbp), %rdi
callq 0x6828
leaq -0x70(%rbp), %rdi
callq 0x6828
leaq -0x40(%rbp), %rdi
callq 0x6828
testb $0x1, -0x19(%rbp)
jne 0x7dd24
jmp 0x7dd18
leaq -0x150(%rbp), %rdi
callq 0x6828
leaq -0x130(%rbp), %rdi
callq 0x6828
leaq -0x110(%rbp), %rdi
callq 0x6828
leaq -0xf0(%rbp), %rdi
callq 0x6828
leaq -0xd0(%rbp), %rdi
callq 0x6828
leaq -0xb0(%rbp), %rdi
callq 0x6828
leaq -0x90(%rbp), %rdi
callq 0x6828
leaq -0x70(%rbp), %rdi
callq 0x6828
leaq -0x40(%rbp), %rdi
callq 0x6828
jmp 0x7dd34
movq -0x268(%rbp), %rdi
callq 0x80b90
movq -0x260(%rbp), %rax
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
movq -0x268(%rbp), %rdi
callq 0x80b90
movq -0x48(%rbp), %rdi
callq 0x6750
nopl (%rax)