// File: mahdibohloul[P]SnapTrip/./ORM/ObjectRelational.cpp
// Function: ObjectRelational::get_rating(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void ObjectRelational::get_rating(std::string hotel_id)
{
    if(hotel_id != ConstNames::Empty_Str)
    {
        auto hotel = database->query_in_hotels(hotel_id);
        if(hotel == nullptr)
            throw Exception(ConstNames::Not_Found_msg);
        auto avg_ratings = hotel->get_avg_ratings();
        responding(avg_ratings);
    }
    else
        throw Exception(ConstNames::Bad_Request_msg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rsi, -0x1d0(%rbp)
movq %rdi, %rax
movq -0x1d0(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1c0(%rbp)
leaq 0xa10c3(%rip), %rsi     # 0x115900
callq 0x54fc0
testb $0x1, %al
jne 0x7484b
jmp 0x749f5
movq -0x1c8(%rbp), %rsi
movq -0x1c0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x1e8(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x61d0
movq -0x1e8(%rbp), %rdi
movq -0x1e0(%rbp), %rsi
callq 0x54210
movq %rax, -0x1d8(%rbp)
jmp 0x7488f
leaq -0x38(%rbp), %rdi
callq 0x6828
movq -0x1d8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x74960
movb $0x1, -0x69(%rbp)
movl $0x28, %edi
callq 0x6210
movq %rax, -0x1f0(%rbp)
leaq 0xa1236(%rip), %rsi     # 0x115b00
leaq -0x68(%rbp), %rdi
callq 0x61d0
jmp 0x748d5
movq -0x1f0(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0xabc90
jmp 0x748e7
movq -0x1f0(%rbp), %rdi
movb $0x0, -0x69(%rbp)
leaq 0x9336f(%rip), %rsi     # 0x107c68
leaq 0x37400(%rip), %rdx     # 0xabd00
callq 0x6710
jmp 0x74aab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x6828
jmp 0x74aa2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x74947
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x6828
testb $0x1, -0x69(%rbp)
jne 0x7494f
jmp 0x7495b
movq -0x1f0(%rbp), %rdi
callq 0x6360
jmp 0x74aa2
movq -0x18(%rbp), %rsi
leaq -0x100(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x59250
movq -0x1f8(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x5aaa0
jmp 0x7498c
movq -0x1c0(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x750f0
jmp 0x749a1
leaq -0x190(%rbp), %rdi
callq 0x5a6b0
leaq -0x100(%rbp), %rdi
callq 0x5a6b0
jmp 0x74a99
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x749e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x5a6b0
leaq -0x100(%rbp), %rdi
callq 0x5a6b0
jmp 0x74aa2
movb $0x1, -0x1b1(%rbp)
movl $0x28, %edi
callq 0x6210
movq %rax, -0x200(%rbp)
leaq 0xa10cc(%rip), %rsi     # 0x115ae0
leaq -0x1b0(%rbp), %rdi
callq 0x61d0
jmp 0x74a22
movq -0x200(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0xabc90
jmp 0x74a37
movq -0x200(%rbp), %rdi
movb $0x0, -0x1b1(%rbp)
leaq 0x9321c(%rip), %rsi     # 0x107c68
leaq 0x372ad(%rip), %rdx     # 0xabd00
callq 0x6710
jmp 0x74aab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x74a80
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x6828
testb $0x1, -0x1b1(%rbp)
jne 0x74a8b
jmp 0x74a97
movq -0x200(%rbp), %rdi
callq 0x6360
jmp 0x74aa2
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x6750
nopl (%rax,%rax)