LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/API.cc
// Function: API::dropTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Response API::dropTable(const std::string &tableName) {
    if (!cm.hasTable(tableName + ".table")) {
        return Response("Table does not exist");
    }
    cm.dropTable(tableName+".table");

    std::string dbName = tableName + ".db";
    // Record Manager clear database
    // 传入数据库文件名(dbName)
    rm.RecordManagerTableDetete(dbName);
    return Response();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %r12
movq %r12, %rdi
callq 0x8766
leaq 0xf6de(%rip), %rsi      # 0x14051
movq %r12, %rdi
callq 0x34f0
leaq -0x48(%rbp), %rsi
movq %r14, %rdi
callq 0xdd18
movl %eax, %r12d
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x4998
callq 0x3270
testb %r12b, %r12b
je 0x4a56
leaq -0x48(%rbp), %r12
movq %r13, (%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x8766
leaq 0xf68f(%rip), %rsi      # 0x14051
movq %r12, %rdi
callq 0x34f0
leaq -0x48(%rbp), %rsi
movq %r14, %rdi
callq 0xe0be
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x49e4
callq 0x3270
movq %r13, (%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x8766
leaq 0xf6bd(%rip), %rsi      # 0x140be
movq %r12, %rdi
callq 0x34f0
leaq -0x58(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x8766
addq $0x30, %r14
leaq -0x68(%rbp), %rsi
movq %r14, %rdi
callq 0x11c30
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x4a43
callq 0x3270
movq %rbx, %rdi
callq 0x13488
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
jne 0x4a92
jmp 0x4a97
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xf5f3(%rip), %rsi      # 0x14058
leaq 0xf600(%rip), %rdx      # 0x1406c
leaq -0x88(%rbp), %r14
movq %r14, %rdi
callq 0x8800
movq %rbx, %rdi
movq %r14, %rsi
callq 0x134ae
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x4a97
callq 0x3270
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x4ada
callq 0x3270
jmp 0x4ada
jmp 0x4ad7
jmp 0x4ad7
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
jne 0x4ae3
jmp 0x4ae8
jmp 0x4ad7
jmp 0x4ad7
jmp 0x4ad7
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x4ae8
callq 0x3270
movq %rbx, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/./CatalogManager.h
// Function: IndexTableManager::IndexTableManager()
IndexTableManager()
    {
        std::ifstream fin("index.catalog");
        mp.clear();
        if (!fin) return;
        std::string indexName, tableName;
        int attrIndex;
        while (fin >> indexName >> tableName >> attrIndex) {
            mp[indexName] = make_pair(tableName, attrIndex);
        }
        fin.close();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
movl $0x0, 0x8(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
leaq 0xc701(%rip), %rsi      # 0x14214
leaq -0x2a0(%rbp), %rdi
movl $0x8, %edx
callq 0x34c0
movq %rbx, %rdi
callq 0x7d44
movq -0x2a0(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x280(%rbp,%rax)
jne 0x7c35
leaq -0x60(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x40(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x88(%rbp), %r13
leaq -0x70(%rbp), %r15
leaq -0x98(%rbp), %r14
leaq -0x2a0(%rbp), %rdi
movq %r15, %rsi
callq 0x3360
movq %rax, %rdi
leaq -0x50(%rbp), %rsi
callq 0x3360
movq %rax, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x3180
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x7c05
movq %r13, -0x98(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x8766
movl -0x2c(%rbp), %eax
movl %eax, -0x78(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7cb6
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
callq 0x3340
movl -0x78(%rbp), %eax
movl %eax, 0x20(%r12)
movq -0x98(%rbp), %rdi
cmpq %r13, %rdi
je 0x7b75
callq 0x3270
jmp 0x7b75
leaq -0x2a0(%rbp), %rdi
callq 0x3080
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x7c23
callq 0x3270
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x7c35
callq 0x3270
leaq -0x2a0(%rbp), %rdi
callq 0x3090
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7c72
movq %rax, %r14
jmp 0x7ca5
movq %rax, %r14
movq -0x98(%rbp), %rdi
cmpq %r13, %rdi
je 0x7c75
callq 0x3270
jmp 0x7c75
jmp 0x7c72
movq %rax, %r14
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x7c87
callq 0x3270
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x7c99
callq 0x3270
leaq -0x2a0(%rbp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x8198
movq %r14, %rdi
callq 0x3480
nop
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/./CatalogManager.h
// Function: IndexTableManager::~IndexTableManager()
~IndexTableManager()
    {
        std::ofstream fout("index.catalog");
        for (auto &x : mp) {
            fout << x.first << " " << x.second.first << " " << x.second.second << std::endl;
        }
        fout.close();
        mp.clear();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
leaq 0xc046(%rip), %rsi      # 0x14214
leaq -0x230(%rbp), %rdi
movl $0x10, %edx
callq 0x32e0
movq 0x18(%rbx), %r14
movq %rbx, -0x30(%rbp)
addq $0x8, %rbx
cmpq %rbx, %r14
je 0x8292
leaq -0x230(%rbp), %r15
leaq 0xc41b(%rip), %r12      # 0x1461d
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq %r15, %rdi
callq 0x3310
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x3310
movq 0x40(%r14), %rsi
movq 0x48(%r14), %rdx
movq %r13, %rdi
callq 0x3310
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x3310
movl 0x60(%r14), %esi
movq %r13, %rdi
callq 0x3470
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r13, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31c0
movq %r14, %rdi
callq 0x31d0
movq %rax, %r14
cmpq %rbx, %rax
jne 0x8202
leaq -0x230(%rbp), %rdi
callq 0x33a0
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x7d44
movq 0x12d0f(%rip), %rax     # 0x1afc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x228(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x230(%rbp,%rcx)
callq 0x3220
leaq -0x138(%rbp), %rdi
callq 0x30d0
movq %rbx, %rdi
callq 0x8198
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x82fc
movq %rax, %rdi
callq 0x7d35
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/bufferManager.cpp
// Function: BFM::BufferManagerWrite(Block const&)
void BFM::BufferManagerWrite(const Block &b)
{
    FILE *fp = fopen(b.fileName.c_str(), "rb");
    FILE *outFile;
    if (fp==NULL){
        outFile = fopen(b.fileName.c_str(), "wb");
    }
    else{
        fclose(fp);
        outFile = fopen(b.fileName.c_str(), "rb+");
    }
    if(outFile==NULL){
        cerr<<"ERROR: Open file "<<b.fileName<<" failed.\n";
        return;
    }
    fseek(outFile, b.offset, SEEK_SET);
    fwrite(&b.data, 1, BLOCKSIZE, outFile);
    fclose(outFile);

    tag T = make_pair(b.fileName, b.offset);
    tableIter tmp = table.find(T);
    if (tmp!=table.end()){ //in the buffer, which means not new written
        bufferIter victim = tmp->second;
        table.erase(table.find(T)); //remove from table
        buffer.erase(victim); //remove from buffer
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq 0x1000(%rsi), %rdi
leaq 0xab35(%rip), %rsi      # 0x14297
callq 0x3330
testq %rax, %rax
je 0x977d
movq %rax, %rdi
callq 0x3290
leaq 0xab3e(%rip), %rsi      # 0x142b9
jmp 0x9784
leaq 0xab32(%rip), %rsi      # 0x142b6
movq 0x1000(%rbx), %rdi
callq 0x3330
testq %rax, %rax
je 0x9860
movq %rax, %r14
movq 0x1020(%rbx), %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x32f0
movl $0x1, %esi
movl $0x1000, %edx           # imm = 0x1000
movq %rbx, %rdi
movq %r14, %rcx
callq 0x3500
movq %r14, %rdi
callq 0x3290
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x1000(%rbx), %rsi
movq 0x1008(%rbx), %rdx
addq %rsi, %rdx
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0x8766
movq 0x1020(%rbx), %rax
movq %rax, 0x20(%r14)
leaq 0x11aaf(%rip), %rdi     # 0x1b2b0
movq %r14, %rsi
callq 0x9c06
leaq 0x11aa8(%rip), %rcx     # 0x1b2b8
cmpq %rcx, %rax
je 0x9847
movq 0x48(%rax), %rbx
leaq 0x11a90(%rip), %rdi     # 0x1b2b0
leaq -0x40(%rbp), %rsi
callq 0x9c06
leaq 0x11a80(%rip), %rdi     # 0x1b2b0
movq %rax, %rsi
callq 0x9f86
leaq 0x11aa1(%rip), %rdi     # 0x1b2e0
movq %rbx, %rsi
callq 0x9cca
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x9855
callq 0x3270
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x11789(%rip), %r14     # 0x1aff0
leaq 0xaa2c(%rip), %rsi      # 0x1429a
movl $0x11, %edx
movq %r14, %rdi
callq 0x3310
movq 0x1000(%rbx), %rsi
movq 0x1008(%rbx), %rdx
movq %r14, %rdi
callq 0x3310
leaq 0xaa14(%rip), %rsi      # 0x142ac
movl $0x9, %edx
movq %rax, %rdi
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3310
jmp 0x98b1
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x98c2
callq 0x3270
movq %rbx, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/bufferManager.cpp
// Function: BFM::BufferManagerFlush()
void BFM::BufferManagerFlush()
{
    for (bufferIter T = buffer.begin(); T!=buffer.end();){
        BufferManagerWrite(*T++);
    }
    buffer.clear();
    table.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x119ec(%rip), %rsi     # 0x1b2e0
leaq 0x119e5(%rip), %rbx     # 0x1b2e0
cmpq %rbx, %rsi
je 0x9914
movq (%rsi), %r14
addq $0x10, %rsi
callq 0x9744
movq %r14, %rsi
cmpq %rbx, %r14
jne 0x9900
movq %rbx, %rdi
callq 0x9bba
movq %rbx, 0x119c5(%rip)     # 0x1b2e8
movq %rbx, 0x119b6(%rip)     # 0x1b2e0
movq $0x0, 0x119bb(%rip) # 0x1b2f0
leaq 0x11974(%rip), %rdi     # 0x1b2b0
popq %rbx
popq %r14
popq %rbp
jmp 0x9fc6
nop
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/bufferManager.cpp
// Function: BFM::deleteFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void BFM::deleteFile(const string &fileName)
{
    tableIter tIt = table.lower_bound(make_pair(fileName,0));
    for (; tIt!=table.end() && tIt->first.first==fileName; ){
        BufferManagerWrite(*(tIt++->second));
    }
    cout << remove(fileName.c_str()) << " " <<fileName<<endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
leaq -0x40(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x50(%rbp), %r14
movq %r14, %rdi
callq 0x8766
movl $0x0, 0x20(%r14)
leaq -0x68(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq (%r14), %rax
cmpq %r15, %rax
je 0x999e
movq %rax, -0x78(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x99a5
movups (%r15), %xmm0
movups %xmm0, (%rcx)
movq -0x48(%rbp), %rax
movq %rax, -0x70(%rbp)
movq %r15, -0x50(%rbp)
xorl %eax, %eax
movq %rax, -0x48(%rbp)
movb $0x0, -0x40(%rbp)
movq %rax, -0x58(%rbp)
movq 0x118fa(%rip), %r13     # 0x1b2c0
leaq 0x118eb(%rip), %r14     # 0x1b2b8
testq %r13, %r13
je 0x99ff
leaq 0x118d7(%rip), %r15     # 0x1b2b0
leaq -0x78(%rbp), %r12
leaq 0x20(%r13), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x9c7c
testb %al, %al
cmoveq %r13, %r14
movzbl %al, %eax
movq 0x10(%r13,%rax,8), %r13
testq %r13, %r13
jne 0x99dd
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x9a11
callq 0x3270
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x9a23
callq 0x3270
leaq 0x1188e(%rip), %r12     # 0x1b2b8
cmpq %r12, %r14
je 0x9a6e
movq 0x28(%r14), %rdx
cmpq 0x8(%rbx), %rdx
jne 0x9a6e
testq %rdx, %rdx
je 0x9a4e
movq (%rbx), %rsi
movq 0x20(%r14), %rdi
callq 0x32b0
testl %eax, %eax
jne 0x9a6e
movq %r14, %rdi
callq 0x31d0
movq %rax, %r15
movq 0x48(%r14), %rsi
addq $0x10, %rsi
callq 0x9744
movq %r15, %r14
cmpq %r12, %r15
jne 0x9a2f
movq (%rbx), %rdi
callq 0x34a0
movq 0x1154b(%rip), %rdi     # 0x1afc8
movl %eax, %esi
callq 0x3470
movq %rax, %r14
leaq 0xab8f(%rip), %rsi      # 0x1461d
movl $0x1, %edx
movq %rax, %rdi
callq 0x3310
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x3310
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31c0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x9af8
callq 0x3270
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x9b0a
callq 0x3270
movq %rbx, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/indexManager.cc
// Function: isFileExist(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool isFileExist(const string &fileName) {
    ifstream f(fileName.c_str());
    if (f.good()) {
        f.close();
        return true;
    } else {
        f.close();
        return false;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq (%rdi), %rsi
leaq -0x218(%rbp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x34c0
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl -0x1f8(%rbp,%rax), %r14d
movq %rbx, %rdi
callq 0x3080
testl %r14d, %r14d
sete %bl
leaq -0x218(%rbp), %rdi
callq 0x3090
movl %ebx, %eax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x218(%rbp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/indexManager.cc
// Function: writeContent(_IO_FILE*, long, void const*, int)
void writeContent(FILE *file, long offset, const void *p, int n) {
    if (!fseek(file, offset, SEEK_SET)) {
        if (fwrite((const void *)p, sizeof(char), n, file) != n) {
            throw "bad write -- indexManager.writeContent";
        }
    } else {
        throw "bad seek -- indexManager.writeContent";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r15d
movq %rdx, %r14
movq %rdi, %rbx
xorl %edx, %edx
callq 0x32f0
testl %eax, %eax
jne 0xa0b7
movslq %r15d, %r15
movl $0x1, %esi
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x3500
cmpq %r15, %rax
jne 0xa0ca
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x3130
leaq 0xa231(%rip), %rcx      # 0x142f9
jmp 0xa0db
movl $0x8, %edi
callq 0x3130
leaq 0xa1f7(%rip), %rcx      # 0x142d2
movq %rcx, (%rax)
movq 0x10ecb(%rip), %rsi     # 0x1afb0
movq %rax, %rdi
xorl %edx, %edx
callq 0x3460
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/indexManager.cc
// Function: badRes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Response badRes(const string &info) {
    Response res;
    res.succeed = false;
    res.info = info;
    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x13488
movb $0x0, (%rbx)
leaq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x3150
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x78ca
movq %r14, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/indexManager.cc
// Function: build(std::vector<std::pair<element, long>, std::allocator<std::pair<element, long>>> const&)
map <element, long> build(const vector < pair <element, long> > &v) {
    map <element, long> mp;
    for (auto o : v) 
        mp[o.first] = o.second;
    return mp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
movl $0x0, 0x8(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
movq (%rsi), %r12
movq 0x8(%rsi), %r13
cmpq %r13, %r12
je 0xa73a
leaq -0x48(%rbp), %r14
movq (%r12), %rax
movq %rax, -0x60(%rbp)
movq %r14, -0x58(%rbp)
movq 0x8(%r12), %rsi
movq 0x10(%r12), %rdx
addq %rsi, %rdx
leaq -0x58(%rbp), %rdi
callq 0x8766
movl 0x28(%r12), %eax
movl %eax, -0x38(%rbp)
movq 0x30(%r12), %r15
movq %r15, -0x30(%rbp)
movq %rbx, %rdi
leaq -0x60(%rbp), %rsi
callq 0xc894
movq %r15, (%rax)
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0xa731
callq 0x3270
addq $0x38, %r12
cmpq %r13, %r12
jne 0xa6e1
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0xa762
movq %rax, %r15
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0xa762
callq 0x3270
movq %rbx, %rdi
callq 0xcbce
movq %r15, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/indexManager.cc
// Function: BT::newNode()
BTNode newNode() {
        FILE *file = fopen(name.c_str(), "rb");
        fseek(file, 0, SEEK_END);
        long off = ftell(file);
        fclose(file);
        BTNode res;
        res.offset = off;
        return res;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10ba6(%rip), %rdi     # 0x1b330
leaq 0x9b06(%rip), %rsi      # 0x14297
callq 0x3330
movq %rax, %r15
xorl %r12d, %r12d
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x32f0
movq %r15, %rdi
callq 0x3030
movq %rax, %r14
movq %r15, %rdi
callq 0x3290
leaq 0x238(%rbx), %r13
leaq 0x250(%rbx), %r15
movq %r15, %rdi
callq 0x13164
addq $-0x30, %r12
addq $0x30, %r15
cmpq $-0xd80, %r12           # imm = 0xF280
jne 0xa7cc
movq %r14, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
testq %r12, %r12
je 0xa81e
subq %r12, %r13
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0xa814
callq 0x3270
addq $-0x30, %r13
addq $0x30, %r12
jne 0xa806
movq %rbx, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/indexManager.cc
// Function: BT::setRoot(long)
void setRoot(long offset) {
        BFM bfm;
        bfm.BufferManagerFlush();
        FILE *file = fopen(name.c_str(), "r+b");
        writeContent(file, 0, &offset, sizeof(long));
        fclose(file);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq -0x20(%rbp), %rbx
movq %rdi, (%rbx)
leaq -0x11(%rbp), %rdi
callq 0x98e6
movq 0x10ae8(%rip), %rdi     # 0x1b330
leaq 0x9adb(%rip), %rsi      # 0x1432a
callq 0x3330
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movl $0x8, %ecx
callq 0xa073
movq %r14, %rdi
callq 0x3290
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/indexManager.cc
// Function: BT::build(std::vector<std::pair<element, long>, std::allocator<std::pair<element, long>>> const&)
BTNode *build(const vector < pair <element, long> > &v) {
        C = pool;
        C->n = 0;
        C->isLeaf = C->isRoot = 1;
        return C;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x10acb(%rip), %rax     # 0x1b350
movq %rax, 0xc116bc4(%rip)   # 0xc121450
movl $0x0, 0x10abe(%rip)     # 0x1b354
movw $0x101, 0x10ab1(%rip)   # imm = 0x101
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/indexManager.cc
// Function: BT::save(BTNode const&)
BTNode save(const BTNode &p) {
        bfm->BufferManagerFlush();
        FILE *file = fopen(name.c_str(), "r+b");
        writeContent(file, p.offset, &p, sizeof(p));
        fclose(file);
        return BTNode();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10a6f(%rip), %rdi     # 0x1b328
callq 0x98e6
movq 0x10a6b(%rip), %rdi     # 0x1b330
leaq 0x9a5e(%rip), %rsi      # 0x1432a
callq 0x3330
movq %rax, %r15
movq 0x8(%r14), %rsi
movq %rax, %rdi
movq %r14, %rdx
movl $0xfd0, %ecx            # imm = 0xFD0
callq 0xa073
movq %r15, %rdi
callq 0x3290
xorl %r15d, %r15d
movl $0xfd0, %edx            # imm = 0xFD0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3160
leaq 0x238(%rbx), %r12
movq %rbx, %r14
addq $0x250, %r14            # imm = 0x250
movq %r14, %rdi
callq 0x13164
addq $-0x30, %r15
addq $0x30, %r14
cmpq $-0xd80, %r15           # imm = 0xF280
jne 0xa913
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
testq %r15, %r15
je 0xa95c
subq %r15, %r12
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0xa952
callq 0x3270
addq $-0x30, %r12
addq $0x30, %r15
jne 0xa943
movq %rbx, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/indexManager.cc
// Function: IndexManager::create(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&, Table&, AttrType const&)
Response IndexManager::create(const string &indexName, const string &dbName, Table &table, const AttrType &attr) {
    if (DEBUG) cout << "IndexManagerCreate begin" << endl;
    Response res;
    if (isFileExist(getIndexFileName(indexName))) {
        if (DEBUG) cout << "if" << endl;
        return badRes(info_index_exist);
    } else {
        if (DEBUG) cout << "else" << endl;
        save();
        currentFile = getIndexFileName(indexName);
        mp = build(getRecord(bfm, dbName, table, attr));
        save();
        return goodRes();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r9, %r12
movq %r8, %r13
movq %rcx, -0x40(%rbp)
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x13488
leaq -0x70(%rbp), %rdi
movq %r15, %rsi
callq 0xa13f
movq %r13, -0x30(%rbp)
movq %r12, -0x38(%rbp)
leaq -0x70(%rbp), %rdi
callq 0xa000
movl %eax, %r12d
leaq -0x60(%rbp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0xbb35
callq 0x3270
testb %r12b, %r12b
je 0xbb4e
leaq 0xf7c7(%rip), %rsi      # 0x1b308
movq %rbx, %rdi
callq 0xa2f7
jmp 0xbc24
movq %r14, %rdi
callq 0xb95e
leaq -0x70(%rbp), %rdi
movq %r15, %rsi
callq 0xa13f
leaq 0x38(%r14), %rdi
leaq -0x70(%rbp), %r15
movq %r15, %rsi
callq 0x3340
movq (%r15), %rdi
cmpq %r13, %rdi
je 0xbb7f
callq 0x3270
movq (%r14), %rsi
leaq -0x88(%rbp), %rdi
movq -0x40(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %r8
callq 0xa34f
leaq -0x70(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xa6a0
leaq 0x8(%r14), %rdi
callq 0xccba
movq -0x60(%rbp), %rax
testq %rax, %rax
je 0xbbfc
leaq 0x10(%r14), %rcx
leaq -0x68(%rbp), %rdx
movl (%rdx), %esi
movl %esi, 0x10(%r14)
movq %rax, 0x18(%r14)
movq 0x10(%rdx), %rsi
movq %rsi, 0x20(%r14)
movq 0x18(%rdx), %rsi
movq %rsi, 0x28(%r14)
movq %rcx, 0x8(%rax)
movq 0x20(%rdx), %rax
movq %rax, 0x30(%r14)
xorl %eax, %eax
movq %rax, 0x8(%rdx)
movq %rdx, 0x10(%rdx)
movq %rdx, 0x18(%rdx)
movq %rax, 0x20(%rdx)
leaq -0x70(%rbp), %rdi
callq 0xcbce
leaq -0x88(%rbp), %rdi
callq 0xc844
movq %r14, %rdi
callq 0xb95e
movq %rbx, %rdi
callq 0x13488
movb $0x1, (%rbx)
leaq -0xa0(%rbp), %r14
movq %r14, %rdi
callq 0x7926
movq -0x20(%r14), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0xbc48
callq 0x3270
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0xc844
jmp 0xbc8e
jmp 0xbc8b
jmp 0xbc8b
movq %rax, %rbx
leaq -0x60(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbc8e
callq 0x3270
jmp 0xbc8e
jmp 0xbc8b
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x78ca
movq %rbx, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/indexManager.cc
// Function: IndexManager::drop(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Response IndexManager::drop(const std::string &indexName) {
    string name = getIndexFileName(indexName);
    if (!isFileExist(name)) {
        return badRes("No such index. -- IndexManager::drop");
    } else {
        bfm.deleteFile(name);
        currentFile = "";
        return goodRes();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x58(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0xa13f
movq %r15, %rdi
callq 0xa000
testb %al, %al
je 0xbd05
movq (%r14), %rdi
leaq -0x58(%rbp), %rsi
callq 0x9946
movq 0x40(%r14), %rdx
addq $0x38, %r14
leaq 0x85ca(%rip), %rcx      # 0x142b5
movq %r14, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x3400
movq %rbx, %rdi
callq 0x13488
movb $0x1, (%rbx)
jmp 0xbd3e
leaq -0x28(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x861a(%rip), %rsi      # 0x1432e
leaq 0x8637(%rip), %rdx      # 0x14352
leaq -0x38(%rbp), %rdi
callq 0x8800
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0xa2f7
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0xbd3e
callq 0x3270
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbd50
callq 0x3270
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0xbd76
callq 0x3270
jmp 0xbd76
jmp 0xbd73
movq %rax, %rbx
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbd88
callq 0x3270
movq %rbx, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/indexManager.cc
// Function: IndexManager::insert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, element const&, long)
Response IndexManager::insert(const string &indexName, const element &e, long offset) {
    string name = getIndexFileName(indexName);
    if (!isFileExist(name)) return badRes("No such Index. -- IndexManager::insert");
    if (name != currentFile) {
        save();
        currentFile = name;
        load();
    }
    if (mp.count(e)) return badRes("Element exist. -- IndexManager::insert");
    mp[e] = offset;
    return goodRes();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r14
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq -0x68(%rbp), %r13
movq %r13, %rdi
movq %rdx, %rsi
callq 0xa13f
movq %r13, %rdi
callq 0xa000
testb %al, %al
je 0xbe54
leaq 0x38(%r12), %r13
movq -0x60(%rbp), %rdx
cmpq 0x40(%r12), %rdx
jne 0xbdf2
testq %rdx, %rdx
je 0xbe0e
movq (%r13), %rsi
movq -0x68(%rbp), %rdi
callq 0x32b0
testl %eax, %eax
je 0xbe0e
movq %r12, %rdi
callq 0xb95e
leaq -0x68(%rbp), %rsi
movq %r13, %rdi
callq 0x3150
movq %r12, %rdi
callq 0xbf02
leaq 0x8(%r12), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0xdb46
addq $0x10, %r12
cmpq %r12, %rax
je 0xbe8f
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x8544(%rip), %rsi      # 0x1437a
leaq 0x8563(%rip), %rdx      # 0x143a0
leaq -0x48(%rbp), %rdi
callq 0x8800
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0xa2f7
jmp 0xbe7f
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x84f0(%rip), %rsi      # 0x14353
leaq 0x850f(%rip), %rdx      # 0x14379
leaq -0x48(%rbp), %rdi
callq 0x8800
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0xa2f7
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0xbea8
callq 0x3270
jmp 0xbea8
movq %r13, %rdi
movq %r15, %rsi
callq 0xc894
movq %r14, (%rax)
movq %rbx, %rdi
callq 0x13488
movb $0x1, (%rbx)
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbeba
callq 0x3270
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xbed0
jmp 0xbee5
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0xbee8
callq 0x3270
jmp 0xbee8
jmp 0xbee5
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbefa
callq 0x3270
movq %rbx, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/indexManager.cc
// Function: IndexManager::erase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, element const&)
Response IndexManager::erase(const string &indexName, const element &e) {
    string name = getIndexFileName(indexName);
    if (!isFileExist(name)) return badRes("No such Index. -- IndexManager::erase");
    if (name != currentFile) {
        save();
        currentFile = name;
        load();
    }
    if (!mp.count(e)) return badRes("No such element. -- IndexManager::erase");
    mp.erase(e);
    return goodRes();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq -0x60(%rbp), %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0xa13f
movq %r12, %rdi
callq 0xa000
testb %al, %al
je 0xc290
leaq 0x38(%r15), %r12
movq -0x58(%rbp), %rdx
cmpq 0x40(%r15), %rdx
jne 0xc239
testq %rdx, %rdx
je 0xc255
movq (%r12), %rsi
movq -0x60(%rbp), %rdi
callq 0x32b0
testl %eax, %eax
je 0xc255
movq %r15, %rdi
callq 0xb95e
leaq -0x60(%rbp), %rsi
movq %r12, %rdi
callq 0x3150
movq %r15, %rdi
callq 0xbf02
leaq 0x8(%r15), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0xdb46
addq $0x10, %r15
cmpq %r15, %rax
je 0xc2bd
movq %r12, %rdi
movq %r14, %rsi
callq 0xdbae
movq %r12, %rdi
movq %rax, %rsi
callq 0xdc74
movq %rbx, %rdi
callq 0x13488
movb $0x1, (%rbx)
jmp 0xc2f6
leaq -0x30(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x8102(%rip), %rsi      # 0x143a1
leaq 0x8120(%rip), %rdx      # 0x143c6
leaq -0x40(%rbp), %rdi
callq 0x8800
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0xa2f7
jmp 0xc2e8
leaq -0x30(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x80fb(%rip), %rsi      # 0x143c7
leaq 0x811b(%rip), %rdx      # 0x143ee
leaq -0x40(%rbp), %rdi
callq 0x8800
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0xa2f7
movq -0x40(%rbp), %rdi
cmpq %r14, %rdi
je 0xc2f6
callq 0x3270
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc308
callq 0x3270
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc31c
jmp 0xc331
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r14, %rdi
je 0xc334
callq 0x3270
jmp 0xc334
jmp 0xc331
movq %rax, %rbx
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc346
callq 0x3270
movq %rbx, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/indexManager.cc
// Function: IndexManager::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, element const&)
long IndexManager::find(const std::string &indexName, const element &e) {
    string name = getIndexFileName(indexName);
    if (!isFileExist(name)) return -1;
    if (name != currentFile) {
        save();
        currentFile = name;
        load();
    }
    if (!mp.count(e)) return -1;
    return mp[e];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rdi, %r15
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0xa13f
movq %r14, %rdi
callq 0xa000
movq $-0x1, %r14
testb %al, %al
je 0xc3e8
leaq 0x38(%r15), %r12
movq -0x38(%rbp), %rdx
cmpq 0x40(%r15), %rdx
jne 0xc3a6
testq %rdx, %rdx
je 0xc3c2
movq (%r12), %rsi
movq -0x40(%rbp), %rdi
callq 0x32b0
testl %eax, %eax
je 0xc3c2
movq %r15, %rdi
callq 0xb95e
leaq -0x40(%rbp), %rsi
movq %r12, %rdi
callq 0x3150
movq %r15, %rdi
callq 0xbf02
leaq 0x8(%r15), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0xdb46
addq $0x10, %r15
cmpq %r15, %rax
je 0xc3e8
movq %r12, %rdi
movq %rbx, %rsi
callq 0xc894
movq (%rax), %r14
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc3fa
callq 0x3270
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc41f
callq 0x3270
movq %rbx, %rdi
callq 0x3480
nop
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/indexManager.cc
// Function: IndexManager::greater(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, element const&)
set <long> IndexManager::greater(const std::string &indexName, const element &e) {
    string name = getIndexFileName(indexName);
    if (!isFileExist(name)) return set <long> ();
    if (name != currentFile) {
        save();
        currentFile = name;
        load();
    }
    set <long> res;
    for (auto it = mp.upper_bound(e); it != mp.end(); it++) {
        res.insert(it->second);
    }
    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x48(%rbp), %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0xa13f
movq %r12, %rdi
callq 0xa000
testb %al, %al
je 0xc516
leaq 0x38(%r14), %r12
movq -0x40(%rbp), %rdx
cmpq 0x40(%r14), %rdx
jne 0xc485
testq %rdx, %rdx
je 0xc4a1
movq (%r12), %rsi
movq -0x48(%rbp), %rdi
callq 0x32b0
testl %eax, %eax
je 0xc4a1
movq %r14, %rdi
callq 0xb95e
leaq -0x48(%rbp), %rsi
movq %r12, %rdi
callq 0x3150
movq %r14, %rdi
callq 0xbf02
leaq 0x8(%rbx), %rax
movl $0x0, 0x8(%rbx)
xorl %ecx, %ecx
movq %rcx, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
movq %rcx, 0x28(%rbx)
movq 0x18(%r14), %r13
addq $0x10, %r14
movq %r14, %r12
testq %r13, %r13
je 0xc4f2
movq %r14, %r12
leaq 0x20(%r13), %rsi
movq %r15, %rdi
callq 0x132bc
testb %al, %al
cmovneq %r13, %r12
xorb $0x1, %al
movzbl %al, %eax
movq 0x10(%r13,%rax,8), %r13
testq %r13, %r13
jne 0xc4d1
cmpq %r14, %r12
je 0xc538
leaq 0x50(%r12), %rsi
movq %rbx, %rdi
callq 0x8d7e
movq %r12, %rdi
callq 0x31d0
movq %rax, %r12
cmpq %r14, %rax
jne 0xc4f7
jmp 0xc538
leaq 0x8(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, (%rbx)
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
movq $0x0, 0x28(%rbx)
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc54a
callq 0x3270
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0xc56e
jmp 0xc563
movq %rax, %r14
movq %rbx, %rdi
callq 0x8454
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc580
callq 0x3270
movq %r14, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/indexManager.cc
// Function: IndexManager::less(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, element const&)
set <long> IndexManager::less(const std::string &indexName, const element &e) {
    string name = getIndexFileName(indexName);
    if (!isFileExist(name)) return set <long> ();
    if (name != currentFile) {
        save();
        currentFile = name;
        load();
    }
    set <long> res;
    for (auto it = mp.begin(); it != mp.end() && it->first < e; it++) {
        res.insert(it->second);
    }
    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq -0x40(%rbp), %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0xa13f
movq %r12, %rdi
callq 0xa000
testb %al, %al
je 0xc659
leaq 0x38(%r15), %r12
movq -0x38(%rbp), %rdx
cmpq 0x40(%r15), %rdx
jne 0xc5e3
testq %rdx, %rdx
je 0xc5ff
movq (%r12), %rsi
movq -0x40(%rbp), %rdi
callq 0x32b0
testl %eax, %eax
je 0xc5ff
movq %r15, %rdi
callq 0xb95e
leaq -0x40(%rbp), %rsi
movq %r12, %rdi
callq 0x3150
movq %r15, %rdi
callq 0xbf02
leaq 0x8(%rbx), %rax
movl $0x0, 0x8(%rbx)
xorl %ecx, %ecx
movq %rcx, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
movq %rcx, 0x28(%rbx)
movq 0x20(%r15), %r12
addq $0x10, %r15
cmpq %r15, %r12
je 0xc67b
leaq 0x20(%r12), %rdi
movq %r14, %rsi
callq 0x132bc
testb %al, %al
je 0xc67b
leaq 0x50(%r12), %rsi
movq %rbx, %rdi
callq 0x8d7e
movq %r12, %rdi
callq 0x31d0
movq %rax, %r12
cmpq %r15, %rax
jne 0xc629
jmp 0xc67b
leaq 0x8(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, (%rbx)
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
movq $0x0, 0x28(%rbx)
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc68d
callq 0x3270
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0xc6af
jmp 0xc6a4
movq %rax, %r14
movq %rbx, %rdi
callq 0x8454
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc6c1
callq 0x3270
movq %r14, %rdi
callq 0x3480
nop
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/indexManager.cc
// Function: IndexManager::inRange(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, element const&, element const&)
set <long> IndexManager::inRange(const std::string &indexName, const element &lhs, const element &rhs) {
    string name = getIndexFileName(indexName);
    if (!isFileExist(name)) return set <long> ();
    if (name != currentFile) {
        save();
        currentFile = name;
        load();
    }
    set <long> res;
    for (auto it = mp.lower_bound(lhs); it != mp.end() && it->first <= rhs; it++) {
        res.insert(it->second);
    }
    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r14
movq %rcx, %r12
movq %rsi, %r15
movq %rdi, %rbx
leaq -0x50(%rbp), %r13
movq %r13, %rdi
movq %rdx, %rsi
callq 0xa13f
movq %r13, %rdi
callq 0xa000
testb %al, %al
je 0xc7d0
leaq 0x38(%r15), %r13
movq -0x48(%rbp), %rdx
cmpq 0x40(%r15), %rdx
jne 0xc72a
testq %rdx, %rdx
je 0xc746
movq (%r13), %rsi
movq -0x50(%rbp), %rdi
callq 0x32b0
testl %eax, %eax
je 0xc746
movq %r15, %rdi
callq 0xb95e
leaq -0x50(%rbp), %rsi
movq %r13, %rdi
callq 0x3150
movq %r15, %rdi
callq 0xbf02
movq %r14, -0x30(%rbp)
leaq 0x8(%rbx), %rax
movl $0x0, 0x8(%rbx)
xorl %ecx, %ecx
movq %rcx, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
movq %rcx, 0x28(%rbx)
movq 0x18(%r15), %r14
addq $0x10, %r15
movq %r15, %r13
testq %r14, %r14
je 0xc799
movq %r15, %r13
leaq 0x20(%r14), %rdi
movq %r12, %rsi
callq 0x132bc
testb %al, %al
cmoveq %r14, %r13
movzbl %al, %eax
movq 0x10(%r14,%rax,8), %r14
testq %r14, %r14
jne 0xc77a
cmpq %r15, %r13
movq -0x30(%rbp), %r14
je 0xc7f2
leaq 0x20(%r13), %rdi
movq %r14, %rsi
callq 0x1344e
testb %al, %al
je 0xc7f2
leaq 0x50(%r13), %rsi
movq %rbx, %rdi
callq 0x8d7e
movq %r13, %rdi
callq 0x31d0
movq %rax, %r13
cmpq %r15, %rax
jne 0xc7a2
jmp 0xc7f2
leaq 0x8(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, (%rbx)
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
movq $0x0, 0x28(%rbx)
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc804
callq 0x3270
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0xc82a
jmp 0xc81f
jmp 0xc81f
movq %rax, %r14
movq %rbx, %rdi
callq 0x8454
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc83c
callq 0x3270
movq %r14, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/CatalogManager.cc
// Function: CatalogManager::hasTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool CatalogManager::hasTable(const std::string &tableName) {
    std::ifstream fin((tableName).c_str());
    if (!fin) return false;
    std::string header;
    fin >> header;
    fin.close();
    return tableName == header;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
movq %rsi, %rbx
movq (%rsi), %rsi
leaq -0x238(%rbp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x34c0
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x218(%rbp,%rax)
je 0xdd55
xorl %ebx, %ebx
jmp 0xddbb
leaq -0x20(%rbp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq -0x238(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3360
leaq -0x238(%rbp), %rdi
callq 0x3080
movq 0x8(%rbx), %rdx
cmpq -0x28(%rbp), %rdx
jne 0xdda7
testq %rdx, %rdx
je 0xddab
movq -0x30(%rbp), %rsi
movq (%rbx), %rdi
callq 0x32b0
testl %eax, %eax
sete %bl
jmp 0xddad
xorl %ebx, %ebx
jmp 0xddad
movb $0x1, %bl
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0xddbb
callq 0x3270
leaq -0x238(%rbp), %rdi
callq 0x3090
movl %ebx, %eax
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0xdde6
callq 0x3270
leaq -0x238(%rbp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/CatalogManager.cc
// Function: CatalogManager::createTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<AttrType, std::allocator<AttrType>> const&)
Table CatalogManager::createTable(const std::string &tableName, const std::vector<AttrType> &attrs) {
    assert(!hasTable(tableName));
    Table nt(tableName, attrs);
    nt.write();
    return nt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
movq %rdx, %rsi
callq 0xdd18
testb %al, %al
jne 0xde3d
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x12bd0
movq %rbx, %rdi
callq 0x12cc6
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x65ac(%rip), %rdi      # 0x143f0
leaq 0x65ba(%rip), %rsi      # 0x14405
leaq 0x65c5(%rip), %rcx      # 0x14417
movl $0x17, %edx
callq 0x31a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x78f8
movq %r14, %rdi
callq 0x3480
nop
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/filter.cc
// Function: Filter::test(std::vector<element, std::allocator<element>> const&) const
bool Filter::test(const std::vector<element> &data) const {
    for (size_t i = 0; i < rules.size(); ++ i) {
        const Rule &rule = rules[i];
        assert((size_t)rule.index < data.size());
        switch (rule.type) {
            case 0:
                if (!(data[rule.index] <  rule.val)) return false;
                break;
            case 1:
                if (!(data[rule.index] <= rule.val)) return false;
                break;
            case 2:
                if (!(data[rule.index] == rule.val)) return false;
                break;
            case 3:
                if (!(data[rule.index] >= rule.val)) return false;
                break;
            case 4:
                if (!(data[rule.index] >  rule.val)) return false;
                break;
            case 5:
                if (!(data[rule.index] != rule.val)) return false;
                break;
            default: 
                assert(false);
        }
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %rsi
cmpq %rsi, 0x8(%rdi)
sete %r15b
je 0xeec1
movq %rdi, %r14
movl $0x8, %r12d
xorl %r13d, %r13d
movslq -0x8(%rsi,%r12), %rax
movq (%rbx), %rdi
movq 0x8(%rbx), %rcx
subq %rdi, %rcx
sarq $0x4, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
cmpq %rax, %rcx
jbe 0xeed7
movl -0x4(%rsi,%r12), %ecx
cmpq $0x5, %rcx
ja 0xeef6
leaq 0x5730(%rip), %rdx      # 0x14538
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
addq %rax, %rdi
addq %r12, %rsi
callq 0x132bc
jmp 0xee8d
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
addq %rax, %rdi
addq %r12, %rsi
callq 0x133f6
jmp 0xee8d
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
addq %rax, %rdi
addq %r12, %rsi
callq 0x13346
jmp 0xee8d
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
addq %rax, %rdi
addq %r12, %rsi
callq 0x13422
jmp 0xee8d
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
addq %rax, %rdi
addq %r12, %rsi
callq 0x1344e
jmp 0xee8d
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
addq %rax, %rdi
addq %r12, %rsi
callq 0x1347a
testb %al, %al
je 0xeec1
incq %r13
movq (%r14), %rsi
movq 0x8(%r14), %rax
subq %rsi, %rax
sarq $0x3, %rax
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rax
addq $0x38, %r12
cmpq %rax, %r13
setae %r15b
jb 0xedc8
andb $0x1, %r15b
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5672(%rip), %rdi      # 0x14550
leaq 0x568c(%rip), %rsi      # 0x14571
leaq 0x568f(%rip), %rcx      # 0x1457b
movl $0x12, %edx
callq 0x31a0
leaq 0x5282(%rip), %rdi      # 0x1417f
leaq 0x566d(%rip), %rsi      # 0x14571
leaq 0x5670(%rip), %rcx      # 0x1457b
movl $0x27, %edx
callq 0x31a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/zimpha[P]MiniSQL/interpreter.cc
// Function: Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool Interpreter::process(std::string line) {
    static std::string cmd;
    for (size_t i = 0; i < line.length(); ++ i) {
        if (line[i] == ';') {
            std::string now(cmd);
            cmd = "";
            if (parse(now)) return true;
        }
        else cmd += line[i];
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, -0x50(%rbp)
movb 0xc112256(%rip), %al    # 0xc121488
testb %al, %al
je 0xf32b
cmpq $0x0, 0x8(%rbx)
setne %r15b
je 0xf315
xorl %r12d, %r12d
leaq -0x70(%rbp), %r13
movq (%rbx), %rax
movb (%rax,%r12), %al
cmpb $0x3b, %al
jne 0xf2f5
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq 0xc1121fa(%rip), %rsi   # 0xc121468
movq 0xc1121fb(%rip), %rdx   # 0xc121470
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x8766
movq 0xc1121e8(%rip), %rdx   # 0xc121470
leaq 0xc1121d9(%rip), %rdi   # 0xc121468
xorl %esi, %esi
leaq 0x501d(%rip), %rcx      # 0x142b5
xorl %r8d, %r8d
callq 0x3400
leaq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x8766
movq -0x50(%rbp), %rdi
movq %r13, %rsi
callq 0xf36a
movl %eax, %r14d
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xf2dc
callq 0x3270
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xf2ee
callq 0x3270
testb %r14b, %r14b
je 0xf304
jmp 0xf315
movsbl %al, %esi
leaq 0xc112169(%rip), %rdi   # 0xc121468
callq 0x3230
incq %r12
cmpq 0x8(%rbx), %r12
setb %r15b
jb 0xf250
andb $0x1, %r15b
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3695
jmp 0xf23a
movq %rax, %rbx
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xf34f
callq 0x3270
jmp 0xf34f
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xf361
callq 0x3270
movq %rbx, %rdi
callq 0x3480
nop