// File: mahdibohloul[P]SnapTrip/./Models/User/User.cpp
// Function: Database::User::get_ratings_of_hotels(Database::Hotel*, Database::Hotel*)
pair_floats Database::User::get_ratings_of_hotels(Hotel* h1, Hotel* h2)
{
    if(manual_weights.activity)
        return make_pair(get_rating_of_hotel(h1, manual_weights), get_rating_of_hotel(h2, manual_weights));

    else if(ratings.size() < ConstNames::Minimum_Ratings_Number)
        throw Exception(ConstNames::Insufficient_Ratings_msg);

    auto weights = calculate_rating();
    return make_pair(get_rating_of_hotel(h1, weights), get_rating_of_hotel(h2, weights));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x440, %rsp            # imm = 0x440
movq %rdi, -0x3c8(%rbp)
movq %rdi, -0x3c0(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x3b8(%rbp)
testb $0x1, 0x200(%rax)
je 0x6831c
movq -0x3b8(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x3e0(%rbp)
addq $0x170, %rsi            # imm = 0x170
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x3d8(%rbp)
callq 0x69be0
movq -0x3b8(%rbp), %rdi
movq -0x3e0(%rbp), %rsi
movq -0x3d8(%rbp), %rdx
callq 0x685a0
movss %xmm0, -0x3cc(%rbp)
jmp 0x6821d
movq -0x3b8(%rbp), %rsi
movss -0x3cc(%rbp), %xmm0
movss %xmm0, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x3e8(%rbp)
addq $0x170, %rsi            # imm = 0x170
leaq -0x180(%rbp), %rdi
callq 0x69be0
jmp 0x68251
movq -0x3e8(%rbp), %rsi
movq -0x3b8(%rbp), %rdi
leaq -0x180(%rbp), %rdx
callq 0x685a0
movss %xmm0, -0x3ec(%rbp)
jmp 0x68275
movss -0x3ec(%rbp), %xmm0
movss %xmm0, -0xe0(%rbp)
leaq -0x24(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x69df0
movaps %xmm0, -0x400(%rbp)
jmp 0x6829e
movq -0x3c8(%rbp), %rdi
movaps -0x400(%rbp), %xmm0
movlpd %xmm0, -0x20(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x69e20
jmp 0x682bc
leaq -0x180(%rbp), %rdi
callq 0x69380
leaq -0xd0(%rbp), %rdi
callq 0x69380
jmp 0x68579
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
jmp 0x6830b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x69380
leaq -0xd0(%rbp), %rdi
callq 0x69380
jmp 0x68589
movq -0x3b8(%rbp), %rdi
addq $0xf0, %rdi
callq 0x69e50
cmpq $0x5, %rax
jae 0x683ef
movb $0x1, -0x1a1(%rbp)
movl $0x28, %edi
callq 0x6210
movq %rax, -0x408(%rbp)
leaq 0xa7668(%rip), %rsi     # 0x10f9c0
leaq -0x1a0(%rbp), %rdi
callq 0x61d0
jmp 0x68366
movq -0x408(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0xabc90
jmp 0x6837b
movq -0x408(%rbp), %rdi
movb $0x0, -0x1a1(%rbp)
leaq 0x9f8d8(%rip), %rsi     # 0x107c68
leaq 0x43969(%rip), %rdx     # 0xabd00
callq 0x6710
jmp 0x68595
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
jmp 0x683d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x6828
testb $0x1, -0x1a1(%rbp)
jne 0x683de
jmp 0x683ea
movq -0x408(%rbp), %rdi
callq 0x6360
jmp 0x68589
jmp 0x683f1
movq -0x3b8(%rbp), %rsi
leaq -0x250(%rbp), %rdi
movq %rdi, -0x418(%rbp)
callq 0x68610
movq -0x418(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x410(%rbp)
leaq -0x300(%rbp), %rdi
callq 0x69be0
jmp 0x6842b
movq -0x410(%rbp), %rsi
movq -0x3b8(%rbp), %rdi
leaq -0x300(%rbp), %rdx
callq 0x685a0
movss %xmm0, -0x41c(%rbp)
jmp 0x6844f
movss -0x41c(%rbp), %xmm0
movss %xmm0, -0x25c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x428(%rbp)
leaq -0x3b0(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x69be0
jmp 0x6847f
movq -0x428(%rbp), %rsi
movq -0x3b8(%rbp), %rdi
leaq -0x3b0(%rbp), %rdx
callq 0x685a0
movss %xmm0, -0x42c(%rbp)
jmp 0x684a3
movss -0x42c(%rbp), %xmm0
movss %xmm0, -0x304(%rbp)
leaq -0x25c(%rbp), %rdi
leaq -0x304(%rbp), %rsi
callq 0x69df0
movaps %xmm0, -0x440(%rbp)
jmp 0x684cf
movq -0x3c8(%rbp), %rdi
movaps -0x440(%rbp), %xmm0
movlpd %xmm0, -0x258(%rbp)
leaq -0x258(%rbp), %rsi
callq 0x69e20
jmp 0x684f3
leaq -0x3b0(%rbp), %rdi
callq 0x69380
leaq -0x300(%rbp), %rdi
callq 0x69380
leaq -0x250(%rbp), %rdi
callq 0x69380
jmp 0x68579
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
jmp 0x6856b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
jmp 0x6855f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
leaq -0x3b0(%rbp), %rdi
callq 0x69380
leaq -0x300(%rbp), %rdi
callq 0x69380
leaq -0x250(%rbp), %rdi
callq 0x69380
jmp 0x68589
movq -0x3c0(%rbp), %rax
addq $0x440, %rsp            # imm = 0x440
popq %rbp
retq
movq -0xd8(%rbp), %rdi
callq 0x6750
nopw %cs:(%rax,%rax)