// File: /workspace/github_cpp_makefile_star2_O3/ChaohuiYu[P]BPlusTree/commands.cpp
// Function: rangeQueryRecords(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void rangeQueryRecords(const string& relationName, const string& key1, const string& key2) {
    if (!isRelationExist(relationName)) {
        cout << "Error: Relation " << relationName << " doesn't exist.\n";
        return;
    }

    if (isRelationInRelationInt(relationName)) {
        if (!is_number(key1)) {
            cout << "Error: Key1 " << key1 << " is not a number.\n";
            return;
        }
        if (!is_number(key2)) {
            cout << "Error: Key2 " << key2 << " is not a number.\n";
            return;
        }
        relationNameToRelationInt[relationName]->rangeQueryRid(stoi(key1), stoi(key2));
    }
    else if (isRelationInRelationStr(relationName)) {
        relationNameToRelationStr[relationName]->rangeQueryRid(key1.substr(1, 10), key2.substr(1, 10));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x4853
testb %al, %al
je 0x529c
leaq 0xb036(%rip), %rdi      # 0x101b8
movq %r15, %rsi
callq 0x5fae
leaq 0xb02f(%rip), %rcx      # 0x101c0
cmpq %rcx, %rax
je 0x52d7
movq %r14, %rdi
callq 0x4b7b
testb %al, %al
je 0x538d
movq %rbx, %rdi
callq 0x4b7b
testb %al, %al
je 0x53b4
leaq 0xaff7(%rip), %rdi      # 0x101b8
movq %r15, %rsi
callq 0x571a
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq (%r14), %r13
callq 0x2060
movq %rax, %r14
movl (%rax), %r15d
movl $0x0, (%rax)
leaq 0x10(%rsp), %rbp
movq %r13, %rdi
movq %rbp, %rsi
movl $0xa, %edx
callq 0x2240
cmpq %r13, (%rbp)
je 0x5400
movq %rax, %r12
movslq %r12d, %rax
cmpq %r12, %rax
jne 0x540c
movl (%r14), %ebp
cmpl $0x22, %ebp
je 0x540c
testl %ebp, %ebp
jne 0x5229
movl %r15d, (%r14)
movl %r15d, %ebp
movq (%rbx), %rbx
movl $0x0, (%r14)
leaq 0x10(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x2240
cmpq %rbx, (%r13)
je 0x5418
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
leaq -0x80000000(%rax), %rdx
cmpq %rcx, %rdx
jb 0x5424
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x5424
testl %ecx, %ecx
jne 0x527f
movl %ebp, (%r14)
movq 0x8(%rsp), %rdi
movl %r12d, %esi
movl %eax, %edx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6600
movq 0xad2d(%rip), %rbx      # 0xffd0
leaq 0x6063(%rip), %rsi      # 0xb30d
movl $0x10, %edx
movq %rbx, %rdi
callq 0x2220
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2220
leaq 0x61a9(%rip), %rsi      # 0xb476
movl $0x10, %edx
jmp 0x53ea
leaq 0xaf0a(%rip), %rdi      # 0x101e8
movq %r15, %rsi
callq 0x5ff4
leaq 0xaf03(%rip), %rcx      # 0x101f0
cmpq %rcx, %rax
je 0x537e
leaq 0xaeeb(%rip), %rdi      # 0x101e8
movq %r15, %rsi
callq 0x5796
movq (%rax), %r15
leaq 0x38(%rsp), %rdi
movl $0x1, %edx
movl $0xa, %ecx
movq %r14, %rsi
callq 0x2200
leaq 0x18(%rsp), %rdi
movl $0x1, %edx
movl $0xa, %ecx
movq %rbx, %rsi
callq 0x2200
leaq 0x38(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movq %r15, %rdi
callq 0x7044
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5363
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21e0
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x537e
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21e0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xac3c(%rip), %rbx      # 0xffd0
leaq 0x601f(%rip), %rsi      # 0xb3ba
movl $0xc, %edx
movq %rbx, %rdi
callq 0x2220
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
jmp 0x53d9
movq 0xac15(%rip), %r14      # 0xffd0
leaq 0x6005(%rip), %rsi      # 0xb3c7
movl $0xc, %edx
movq %r14, %rdi
callq 0x2220
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x2220
leaq 0x5fc2(%rip), %rsi      # 0xb3a7
movl $0x12, %edx
movq %rax, %rdi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
leaq 0x5ec6(%rip), %rdi      # 0xb2cd
callq 0x2120
leaq 0x5eba(%rip), %rdi      # 0xb2cd
callq 0x2250
leaq 0x5eae(%rip), %rdi      # 0xb2cd
callq 0x2120
leaq 0x5ea2(%rip), %rdi      # 0xb2cd
callq 0x2250
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5453
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21e0
jmp 0x5453
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x548a
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21e0
jmp 0x548a
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x548a
movl %ebp, (%r14)
jmp 0x548a
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x548a
movl %r15d, (%r14)
movq %rbx, %rdi
callq 0x22e0