// File: mahdibohloul[P]SnapTrip/./Business-Logic/Backend.cpp
// Function: Backend::valid_advanced_filter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool Backend::valid_advanced_filter(string type, string quantity, string check_in, string check_out)
{
    if(type != ConstNames::Empty_Str && quantity != ConstNames::Empty_Str && check_in != ConstNames::Empty_Str && check_out != ConstNames::Empty_Str)
    {
        int q = stoi(quantity), in = stoi(check_in), out = stoi(check_out);
        if(valid_advanced_filter_type(type) && q > ConstNames::No_Room && in >= ConstNames::Minimum_Hotel_Reserve && in <= out && out <= ConstNames::Maximum_Hotel_Reserve)
            return true;
        else
            throw Exception(ConstNames::Bad_Request_msg);
    }
    throw Exception(ConstNames::Bad_Request_msg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rsi, -0xe8(%rbp)
movq %rdi, %rax
movq -0xe8(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
movq %rdx, -0xd8(%rbp)
movq %rcx, -0xd0(%rbp)
movq %r8, -0xc8(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xc0(%rbp)
leaq 0x975e2(%rip), %rsi     # 0x1171a0
callq 0x54fc0
testb $0x1, %al
jne 0x7fbcc
jmp 0x7fdef
movq -0xd8(%rbp), %rdi
leaq 0x975c6(%rip), %rsi     # 0x1171a0
callq 0x54fc0
testb $0x1, %al
jne 0x7fbe8
jmp 0x7fdef
movq -0xd0(%rbp), %rdi
leaq 0x975aa(%rip), %rsi     # 0x1171a0
callq 0x54fc0
testb $0x1, %al
jne 0x7fc04
jmp 0x7fdef
movq -0xc8(%rbp), %rdi
leaq 0x9758e(%rip), %rsi     # 0x1171a0
callq 0x54fc0
testb $0x1, %al
jne 0x7fc20
jmp 0x7fdef
movq -0xd8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movq %rsi, -0x108(%rbp)
movl $0xa, %edx
movl %edx, -0xfc(%rbp)
callq 0x74d10
movq -0xd0(%rbp), %rdi
movq -0x108(%rbp), %rsi
movl -0xfc(%rbp), %edx
movl %eax, -0x2c(%rbp)
callq 0x74d10
movq -0xc8(%rbp), %rdi
movq -0x108(%rbp), %rsi
movl -0xfc(%rbp), %edx
movl %eax, -0x30(%rbp)
callq 0x74d10
movq -0xe0(%rbp), %rsi
movl %eax, -0x34(%rbp)
leaq -0x58(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x61d0
movq -0xc0(%rbp), %rdi
movq -0xf8(%rbp), %rsi
callq 0x80290
movb %al, -0xe9(%rbp)
jmp 0x7fcaf
movb -0xe9(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x109(%rbp)
jne 0x7fcc4
jmp 0x7fcfd
xorl %eax, %eax
cmpl $0x0, -0x2c(%rbp)
movb %al, -0x109(%rbp)
jle 0x7fcfd
xorl %eax, %eax
cmpl $0x1, -0x30(%rbp)
movb %al, -0x109(%rbp)
jl 0x7fcfd
movl -0x30(%rbp), %ecx
xorl %eax, %eax
cmpl -0x34(%rbp), %ecx
movb %al, -0x109(%rbp)
jg 0x7fcfd
cmpl $0x1e, -0x34(%rbp)
setle %al
movb %al, -0x109(%rbp)
movb -0x109(%rbp), %al
movb %al, -0x10a(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x6828
movb -0x10a(%rbp), %al
testb $0x1, %al
jne 0x7fd1e
jmp 0x7fd45
movb $0x1, %al
andb $0x1, %al
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x6828
jmp 0x7fe93
movb $0x1, -0x89(%rbp)
movl $0x28, %edi
callq 0x6210
movq %rax, -0x118(%rbp)
leaq 0x9761c(%rip), %rsi     # 0x117380
leaq -0x88(%rbp), %rdi
callq 0x61d0
jmp 0x7fd72
movq -0x118(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xabc90
jmp 0x7fd87
movq -0x118(%rbp), %rdi
movb $0x0, -0x89(%rbp)
leaq 0x87ecc(%rip), %rsi     # 0x107c68
leaq 0x2bf5d(%rip), %rdx     # 0xabd00
callq 0x6710
jmp 0x7fe9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x7fdd3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x6828
testb $0x1, -0x89(%rbp)
jne 0x7fdde
jmp 0x7fdea
movq -0x118(%rbp), %rdi
callq 0x6360
jmp 0x7fe93
movb $0x1, -0xb1(%rbp)
movl $0x28, %edi
callq 0x6210
movq %rax, -0x120(%rbp)
leaq 0x97572(%rip), %rsi     # 0x117380
leaq -0xb0(%rbp), %rdi
callq 0x61d0
jmp 0x7fe1c
movq -0x120(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0xabc90
jmp 0x7fe31
movq -0x120(%rbp), %rdi
movb $0x0, -0xb1(%rbp)
leaq 0x87e22(%rip), %rsi     # 0x107c68
leaq 0x2beb3(%rip), %rdx     # 0xabd00
callq 0x6710
jmp 0x7fe9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x7fe7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x6828
testb $0x1, -0xb1(%rbp)
jne 0x7fe85
jmp 0x7fe91
movq -0x120(%rbp), %rdi
callq 0x6360
jmp 0x7fe93
movq -0x60(%rbp), %rdi
callq 0x6750
nopl (%rax)