// File: /workspace/github_cpp_makefile_star2_O1/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 0x4893
testb %al, %al
je 0x52dd
leaq 0xaff6(%rip), %rdi      # 0x101b8
movq %r15, %rsi
callq 0x5ff2
leaq 0xafef(%rip), %rcx      # 0x101c0
cmpq %rcx, %rax
je 0x5318
movq %r14, %rdi
callq 0x4bbb
testb %al, %al
je 0x53ce
movq %rbx, %rdi
callq 0x4bbb
testb %al, %al
je 0x53f5
leaq 0xafb7(%rip), %rdi      # 0x101b8
movq %r15, %rsi
callq 0x575e
movq (%rax), %r15
movq (%r14), %r13
callq 0x2060
movq %rax, %r14
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movl $0x0, (%r14)
leaq 0x10(%rsp), %rbp
movq %r13, %rdi
movq %rbp, %rsi
movl $0xa, %edx
callq 0x2240
cmpq %r13, (%rbp)
je 0x5441
movq %rax, %r12
movslq %r12d, %rax
cmpq %r12, %rax
jne 0x544d
movl (%r14), %eax
cmpl $0x22, %eax
je 0x544d
testl %eax, %eax
jne 0x5269
movl 0xc(%rsp), %eax
movl %eax, (%r14)
movq (%rbx), %rbx
movl (%r14), %ebp
movl $0x0, (%r14)
leaq 0x10(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x2240
cmpq %rbx, (%r13)
je 0x5459
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
leaq -0x80000000(%rax), %rdx
cmpq %rcx, %rdx
jb 0x5465
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x5465
testl %ecx, %ecx
jne 0x52c2
movl %ebp, (%r14)
movq %r15, %rdi
movl %r12d, %esi
movl %eax, %edx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6644
movq 0xacec(%rip), %rbx      # 0xffd0
leaq 0x6022(%rip), %rsi      # 0xb30d
movl $0x10, %edx
movq %rbx, %rdi
callq 0x2220
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2220
leaq 0x6168(%rip), %rsi      # 0xb476
movl $0x10, %edx
jmp 0x542b
leaq 0xaec9(%rip), %rdi      # 0x101e8
movq %r15, %rsi
callq 0x6038
leaq 0xaec2(%rip), %rcx      # 0x101f0
cmpq %rcx, %rax
je 0x53bf
leaq 0xaeaa(%rip), %rdi      # 0x101e8
movq %r15, %rsi
callq 0x57da
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 0x7086
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53a4
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21e0
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53bf
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 0xabfb(%rip), %rbx      # 0xffd0
leaq 0x5fde(%rip), %rsi      # 0xb3ba
movl $0xc, %edx
movq %rbx, %rdi
callq 0x2220
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
jmp 0x541a
movq 0xabd4(%rip), %r14      # 0xffd0
leaq 0x5fc4(%rip), %rsi      # 0xb3c7
movl $0xc, %edx
movq %r14, %rdi
callq 0x2220
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x2220
leaq 0x5f81(%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 0x5e85(%rip), %rdi      # 0xb2cd
callq 0x2120
leaq 0x5e79(%rip), %rdi      # 0xb2cd
callq 0x2250
leaq 0x5e6d(%rip), %rdi      # 0xb2cd
callq 0x2120
leaq 0x5e61(%rip), %rdi      # 0xb2cd
callq 0x2250
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5494
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21e0
jmp 0x5494
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x54cf
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21e0
jmp 0x54cf
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x54cf
movl %ebp, (%r14)
jmp 0x54cf
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x54cf
movl 0xc(%rsp), %eax
movl %eax, (%r14)
movq %rbx, %rdi
callq 0x22e0