LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/FileManager.cpp
// Function: cleanFiles(char const*)
int cleanFiles(const char *dir) { // clean file(s)
    char dir_name[512];
    DIR *dirp;
    struct dirent *dp;
    struct stat dir_stat;
    int tmp;

    // if can't access, nothing to do
    if ( 0 != access(dir, F_OK) ) {
        return 0;
    }

    // if can't get direcrtory stat, fail
    if ( 0 > stat(dir, &dir_stat) ) {
        perror("get directory stat error");
        return -1;
    }

    if ( S_ISREG(dir_stat.st_mode) ) { // files
        remove(dir);
    } else if ( S_ISDIR(dir_stat.st_mode) ) { // folder
        dirp = opendir(dir);
        while ( (dp=readdir(dirp)) != NULL ) {
            if ( (0 == strcmp(".", dp->d_name)) || (0 == strcmp("..", dp->d_name)) ) { // Ignore . & ..
                continue;
            }
            sprintf(dir_name, "%s/%s", dir, dp->d_name);
            if ((tmp = cleanFiles(dir_name)) != 0) {
                return tmp;
            }
        }
        closedir(dirp);
        rmdir(dir); // remove empty folder
    } else {
        perror("unknow file type!");
        return -1;    
    }
    
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movq %rdi, %r14
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x5670
testl %eax, %eax
jne 0x18982
movq %rsp, %rsi
movq %r14, %rdi
callq 0x5350
testl %eax, %eax
js 0x18968
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rsp), %eax
cmpl $0x4000, %eax           # imm = 0x4000
je 0x188d3
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x18971
movq %r14, %rdi
callq 0x5700
jmp 0x18982
movq %r14, %rdi
callq 0x55a0
movq %rax, %r15
movq %rax, %rdi
callq 0x55b0
testq %rax, %rax
je 0x18956
movq %rax, %r13
leaq 0x24e95(%rip), %r12     # 0x3d78a
leaq 0x90(%rsp), %rbp
addq $0x13, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x5520
testl %eax, %eax
je 0x18946
leaq 0x24e72(%rip), %rdi     # 0x3d789
movq %r13, %rsi
callq 0x5520
testl %eax, %eax
je 0x18946
movq %rbp, %rdi
leaq 0x28e7a(%rip), %rsi     # 0x417a7
movq %r14, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x50f0
movq %rbp, %rdi
callq 0x18873
testl %eax, %eax
jne 0x1897d
movq %r15, %rdi
callq 0x55b0
movq %rax, %r13
testq %rax, %rax
jne 0x188fd
movq %r15, %rdi
callq 0x5620
movq %r14, %rdi
callq 0x51d0
jmp 0x18982
leaq 0x28e1f(%rip), %rdi     # 0x4178e
jmp 0x18978
leaq 0x28e35(%rip), %rdi     # 0x417ad
callq 0x5320
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/FileManager.cpp
// Function: checkFile(char const*)
int checkFile(const char *filename) { // file exists? 1: exist, 0: null, -1: error
    struct stat dir_stat;
    if ( 0 != access(filename, F_OK) ) return 0;
    if ( 0 > stat(filename, &dir_stat) ) return -1;
    if ( S_ISREG(dir_stat.st_mode) ) return 1;
    return -1;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %r14
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x5670
testl %eax, %eax
jne 0x18a06
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x5350
testl %eax, %eax
js 0x18a01
movl $0xf000, %eax           # imm = 0xF000
andl 0x20(%rsp), %eax
xorl %ecx, %ecx
cmpl $0x8000, %eax           # imm = 0x8000
sete %cl
leal -0x1(,%rcx,2), %ebx
jmp 0x18a06
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x98, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Hash.cpp
// Function: Hash::find(int, int)
int Hash::find(int fileID, int pageID) {
    int id = hash(fileID, pageID);
    while (flag[id] && bpm->check(fileID, pageID, table[id]) == false) {
        id++;
    }
    if (flag[id] == false) return -1;
    return table[id];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %ebp
movl $0x3ffff, %eax          # imm = 0x3FFFF
leal (%r14,%rax), %ecx
testl %edx, %edx
cmovnsl %edx, %ecx
movq %rdi, %rbx
movl $0xfffc0000, %edx       # imm = 0xFFFC0000
andl %edx, %ecx
movl %r14d, %esi
subl %ecx, %esi
imull $0x83, %esi, %ecx
addl %ebp, %ecx
addl %ecx, %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
andl %edx, %eax
subl %eax, %ecx
movslq %ecx, %r15
cmpb $0x1, 0x80000(%rdi,%r15)
jne 0x18a8c
movq 0xc0000(%rbx), %rdi
movzwl (%rbx,%r15,2), %ecx
movl %ebp, %esi
movl %r14d, %edx
callq 0x6906
testb %al, %al
jne 0x18a8c
leaq 0x1(%r15), %rax
cmpb $0x1, 0x80001(%rbx,%r15)
movq %rax, %r15
je 0x18a5e
jmp 0x18a8f
movq %r15, %rax
cmpb $0x0, 0x80000(%rbx,%rax)
je 0x18a9f
movzwl (%rbx,%rax,2), %eax
jmp 0x18aa4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Hash.cpp
// Function: Hash::add(int, int, int)
void Hash::add(int fileID, int pageID, int index) {
    int id = hash(fileID, pageID);
    while (flag[id]) id++;
    flag[id] = true;
    table[id] = (uint16_t)index;
}

// Assembly:
movl $0x3ffff, %eax          # imm = 0x3FFFF
leal (%rdx,%rax), %r8d
testl %edx, %edx
cmovnsl %edx, %r8d
movl $0xfffc0000, %r9d       # imm = 0xFFFC0000
andl %r9d, %r8d
subl %r8d, %edx
imull $0x83, %edx, %edx
addl %esi, %edx
addl %edx, %eax
testl %edx, %edx
cmovnsl %edx, %eax
andl %r9d, %eax
subl %eax, %edx
movslq %edx, %rax
cmpb $0x0, 0x80000(%rdi,%rax)
leaq 0x1(%rax), %rax
jne 0x18ae2
movb $0x1, 0x7ffff(%rdi,%rax)
movw %cx, -0x2(%rdi,%rax,2)
retq
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Hash.cpp
// Function: Hash::del(int, int)
void Hash::del(int fileID, int pageID) {
    int id = hash(fileID, pageID);
    while (flag[id] && bpm->check(fileID, pageID, table[id]) == false) {
        id++;
    }
    if (flag[id]) flag[id] = false, table[id] = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %ebp
movl $0x3ffff, %eax          # imm = 0x3FFFF
leal (%r14,%rax), %ecx
testl %edx, %edx
cmovnsl %edx, %ecx
movq %rdi, %rbx
movl $0xfffc0000, %edx       # imm = 0xFFFC0000
andl %edx, %ecx
movl %r14d, %esi
subl %ecx, %esi
imull $0x83, %esi, %ecx
addl %ebp, %ecx
addl %ecx, %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
andl %edx, %eax
subl %eax, %ecx
movslq %ecx, %r15
cmpb $0x1, 0x80000(%rdi,%r15)
jne 0x18b76
movq 0xc0000(%rbx), %rdi
movzwl (%rbx,%r15,2), %ecx
movl %ebp, %esi
movl %r14d, %edx
callq 0x6906
testb %al, %al
jne 0x18b76
leaq 0x1(%r15), %rax
cmpb $0x1, 0x80001(%rbx,%r15)
movq %rax, %r15
je 0x18b48
jmp 0x18b79
movq %r15, %rax
cmpb $0x1, 0x80000(%rbx,%rax)
jne 0x18b91
movb $0x0, 0x80000(%rbx,%rax)
movw $0x0, (%rbx,%rax,2)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Index.cpp
// Function: Index::insertRecord(Anys*, int, int)
void Index::insertRecord(Anys* info, int record_id, int now_index) {

    BtreeNode* now = Index::convert_buf_to_BtreeNode(now_index);

    //BtreeNode *now = Index::convert_buf_to_BtreeNode(index);
    //cout << "insert" << now->index << " "  << now->record_cnt;
    //cout << " " << (*info)[0].anyCast<int>() << " " << record_id << endl;
    int i = 0;
    vector<BtreeRecord>::iterator it;
    for (it = now->record.begin(); it!=now->record.end(); it++)
    {
        if (it->key > *info) {
            break;
        }
        if (it->key == *info && it->record_id > record_id) {
            break;
        }
        i ++;
    }

    if (now->is_leaf) {
        now->record.insert(it, BtreeRecord(record_id, *info));
        now->record_cnt++;
        now->child.push_back(-1);
        Index::convert_BtreeNode_to_buf(now);
        overflow_upstream(now->index);
        return;
    }
    else {
        Index::convert_BtreeNode_to_buf(now);
        Index::insertRecord(info, record_id, now->child[i]);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r13
movq %rdi, 0x8(%rsp)
movq %r13, %rdi
movl %ecx, %esi
callq 0x19bd2
movq %rax, %r14
movq 0x50(%rax), %r12
cmpq 0x58(%rax), %r12
je 0x1af00
xorl %ebx, %ebx
leaq 0x8(%r12), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x9be2
testb %al, %al
jne 0x1aef7
movq %r13, %rdi
movq %r15, %rsi
callq 0x9abe
testb %al, %al
je 0x1aeeb
cmpl %ebp, (%r12)
jg 0x1aef7
incl %ebx
addq $0x20, %r12
cmpq 0x58(%r14), %r12
jne 0x1aec2
movl %ebx, %ebx
movq 0x8(%rsp), %r13
jmp 0x1af02
xorl %ebx, %ebx
cmpb $0x1, 0x68(%r14)
je 0x1af1d
movq %r13, %rdi
movq %r14, %rsi
callq 0x1a022
movq 0x20(%r14), %rax
movl (%rax,%rbx,4), %ecx
jmp 0x1aea9
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0xa450
leaq 0x30(%rsp), %r15
movl %ebp, -0x8(%r15)
movq %r15, %rdi
movq %r13, %rsi
callq 0xa450
leaq 0x50(%r14), %rdi
leaq 0x28(%rsp), %rdx
movq %r12, %rsi
callq 0x1ddf8
movq %r15, %rdi
callq 0xa564
leaq 0x10(%rsp), %rdi
callq 0xa564
incl 0x1c(%r14)
movl $0xffffffff, 0x28(%rsp) # imm = 0xFFFFFFFF
movq 0x28(%r14), %rsi
cmpq 0x30(%r14), %rsi
movq 0x8(%rsp), %rbx
je 0x1af8f
movl $0xffffffff, (%rsi)     # imm = 0xFFFFFFFF
addq $0x4, %rsi
movq %rsi, 0x28(%r14)
jmp 0x1afa0
movq %r14, %rdi
addq $0x20, %rdi
leaq 0x28(%rsp), %rdx
callq 0x1d2b4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a022
movl 0x18(%r14), %esi
movq %rbx, %rdi
callq 0x1ab3e
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0xa564
jmp 0x1afd6
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xa564
movq %rbx, %rdi
callq 0x56e0
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/./BtreeNode.h
// Function: BtreeNode::BtreeNode()
BtreeNode() {
        this->is_leaf = true;
        this->fa_index = -1;
        this->record_cnt = 0;
        this->record.clear();
        this->child.clear();
        this->child.push_back(-1);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movq $0x0, 0x60(%rdi)
movb $0x1, 0x68(%rdi)
movl $0xffffffff, 0x6c(%rdi) # imm = 0xFFFFFFFF
movl $0x0, 0x1c(%rdi)
movq 0x50(%rdi), %r14
movq 0x58(%rdi), %r15
cmpq %r14, %r15
je 0x1cd44
movq %r14, %r12
leaq 0x8(%r12), %rdi
callq 0xa564
addq $0x20, %r12
cmpq %r15, %r12
jne 0x1cd2d
movq %r14, 0x58(%rbx)
movq 0x20(%rbx), %rax
cmpq %rax, 0x28(%rbx)
je 0x1cd52
movq %rax, 0x28(%rbx)
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
movq 0x28(%rbx), %rsi
cmpq 0x30(%rbx), %rsi
je 0x1cd74
movl $0xffffffff, (%rsi)     # imm = 0xFFFFFFFF
addq $0x4, %rsi
movq %rsi, 0x28(%rbx)
jmp 0x1cd8d
leaq 0x20(%rbx), %r14
leaq 0x50(%rbx), %r13
leaq 0x30(%rbx), %r15
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
callq 0x1d2b4
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r12
movq %r13, %rdi
callq 0x1cebc
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x1cdbb
movq 0x48(%rbx), %rsi
subq %rdi, %rsi
callq 0x53a0
movq %r14, %rdi
movq %r15, %rsi
callq 0x5b19
movq %r12, %rdi
callq 0x56e0
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Key.cpp
// Function: ForeignKey::toJson[abi:cxx11]()
json ForeignKey::toJson() {
    json j;
    j["data"] = Key::toJson();
    j["sid"] = p->table->table_id;
    return j;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
callq 0xd52a
movq %rbx, %rdi
callq 0xd52a
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x1e356
leaq 0x23885(%rip), %rsi     # 0x41906
movq %rbx, %rdi
callq 0x8fa0
movq %rax, %r15
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0xd52a
movb (%r15), %al
movb (%r12), %cl
movb %cl, (%r15)
movb %al, (%r12)
leaq 0x18(%rsp), %r13
movq 0x8(%r15), %rax
movq (%r13), %rcx
movq %rcx, 0x8(%r15)
movq %rax, (%r13)
movq %r15, %rdi
callq 0xd52a
movq %r12, %rdi
callq 0xd52a
movzbl -0x8(%r13), %esi
movq %r13, %rdi
callq 0xd5cc
movq 0x50(%r14), %rax
movq 0x48(%rax), %rax
movq %rsp, %r14
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movl 0x50(%rax), %eax
movb $0x6, (%r14)
movq %rax, 0x8(%r14)
movq %r14, %rdi
callq 0xd52a
movq %r14, %rdi
callq 0xd52a
leaq 0x1f5dd(%rip), %rsi     # 0x3d6ef
movq %rbx, %rdi
callq 0x8fa0
movq %rax, %r14
leaq 0x8(%rsp), %r15
movq %rsp, %r12
movq %r12, %rdi
callq 0xd52a
movb (%r14), %al
movb (%r12), %cl
movb %cl, (%r14)
movb %al, (%r12)
movq 0x8(%r14), %rax
movq 0x8(%r12), %rcx
movq %rcx, 0x8(%r14)
movq %rax, 0x8(%r12)
movq %r14, %rdi
callq 0xd52a
movq %r12, %rdi
callq 0xd52a
movzbl (%r12), %esi
movq %r15, %rdi
callq 0xd5cc
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rsp, %rdi
jmp 0x1e18b
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x915e
jmp 0x1e195
movq %rax, %r14
movq %rbx, %rdi
callq 0x915e
movq %r14, %rdi
callq 0x56e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/MemPool.cpp
// Function: MemPool::access(int)
void MemPool::access(int index) {

    if (index == head) {
        return;
    } else if (index == tail) {
        tail = pool[index].pre;
    } else {
        link(pool[index].pre, pool[index].next);
    }
    link(index, head);
    head = index;
}

// Assembly:
movl 0x80004(%rdi), %eax
cmpl %esi, %eax
je 0x1e776
movslq %eax, %rcx
movslq %esi, %rdx
movl (%rdi,%rdx,8), %r8d
cmpl %esi, 0x80008(%rdi)
jne 0x1e755
leaq 0x80008(%rdi), %r9
jmp 0x1e766
movslq %r8d, %r9
movslq 0x4(%rdi,%rdx,8), %r10
movl %r10d, 0x4(%rdi,%r9,8)
leaq (%rdi,%r10,8), %r9
movl %r8d, (%r9)
movl %eax, 0x4(%rdi,%rdx,8)
movl %esi, (%rdi,%rcx,8)
movl %esi, 0x80004(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/MemPool.cpp
// Function: MemPool::alloc()
int MemPool::alloc() {
    if (num == 0) {
        head = tail = num;
        return num++;
    } 
    if (num < MAX_BUF_NUM) {
        link(num, head);
        head = num;
        return num++;
    }
    access(tail);
    return head;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movslq 0x80000(%rdi), %rax
testq %rax, %rax
je 0x1e7ae
cmpl $0xffff, %eax           # imm = 0xFFFF
jg 0x1e7c5
movslq 0x80004(%rbx), %rcx
movl %ecx, 0x4(%rbx,%rax,8)
movl %eax, (%rbx,%rcx,8)
movl %eax, 0x80004(%rbx)
leal 0x1(%rax), %ecx
movl %ecx, 0x80000(%rbx)
jmp 0x1e7d9
movl $0x0, 0x80008(%rbx)
movq $0x1, 0x80000(%rbx)
jmp 0x1e7d9
movl 0x80008(%rbx), %esi
movq %rbx, %rdi
callq 0x1e730
movl 0x80004(%rbx), %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Print.cpp
// Function: lenLimit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned int)
string lenLimit(string str, uint len) {
    if (str.length() > len) 
        return str.substr(0, len-2) + ".."; 
    else 
        return str + string(len - str.length(), ' ');
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, %esi
subq 0x8(%r14), %rsi
jae 0x1e839
movl %edx, %ecx
addl $-0x2, %ecx
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x53d0
leaq 0x1ef7a(%rip), %rsi     # 0x3d789
movq %r15, %rdi
callq 0x5780
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x1e884
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x1e88a
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq %rsp, %rdi
movl $0x20, %edx
callq 0x5460
movq (%r14), %rcx
movq 0x8(%r14), %r8
movq %rsp, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5420
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x1e8c9
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x1e8cf
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e8bc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53a0
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rdi
cmpq %r15, %rdi
jne 0x1e8af
jmp 0x1e8bc
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
jne 0x1e915
jmp 0x1e922
movq %rax, %rbx
jmp 0x1e922
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e922
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53a0
movq %rbx, %rdi
callq 0x56e0
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Print.cpp
// Function: Type2Str[abi:cxx11](enumType)
string Type2Str(enumType ty) {
    switch (ty) {
    case INT: return "INT";
    case CHAR: return "CHAR";
    case VARCHAR: return "VARCHAR";
    case DATE: return "DATE";
    case DECIMAL: return "DECIMAL";
    default: return "";
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
cmpl $0x4, %esi
ja 0x1e9a7
movl %esi, %eax
leaq 0x22fe1(%rip), %rcx     # 0x41924
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x22ff9(%rip), %rsi     # 0x4194c
leaq 0x22ff5(%rip), %rdx     # 0x4194f
jmp 0x1e99a
leaq 0x22ff5(%rip), %rsi     # 0x41958
leaq 0x22ff5(%rip), %rdx     # 0x4195f
jmp 0x1e99a
leaq 0x22fdd(%rip), %rsi     # 0x41950
leaq 0x22fdd(%rip), %rdx     # 0x41957
jmp 0x1e99a
leaq 0x238ad(%rip), %rsi     # 0x42230
leaq 0x238aa(%rip), %rdx     # 0x42234
jmp 0x1e99a
leaq 0x22fc0(%rip), %rsi     # 0x41953
leaq 0x22fbd(%rip), %rdx     # 0x41957
movq %rbx, %rdi
callq 0xaccc
movq %rbx, %rax
popq %rbx
retq
leaq 0x25952(%rip), %rdx     # 0x44300
movq %rbx, %rdi
movq %rdx, %rsi
jmp 0x1e99d
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Print.cpp
// Function: Aggr2Str[abi:cxx11](enumAggr)
string Aggr2Str(enumAggr ty) {
    switch (ty) {
    case AG_COUNT: return "COUNT()";
    case AG_MIN: return "MIN()";
    case AG_MAX: return "MAX()";
    case AG_SUM: return "SUM()";
    case AG_AVG: return "AVG()";
    default: return "";
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
cmpl $0x4, %esi
ja 0x1ea33
movl %esi, %eax
leaq 0x22f69(%rip), %rcx     # 0x41938
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x22f81(%rip), %rsi     # 0x41960
leaq 0x22f81(%rip), %rdx     # 0x41967
jmp 0x1ea26
leaq 0x22f8b(%rip), %rsi     # 0x4197a
leaq 0x22f89(%rip), %rdx     # 0x4197f
jmp 0x1ea26
leaq 0x22f6f(%rip), %rsi     # 0x4196e
leaq 0x22f6d(%rip), %rdx     # 0x41973
jmp 0x1ea26
leaq 0x22f65(%rip), %rsi     # 0x41974
leaq 0x22f63(%rip), %rdx     # 0x41979
jmp 0x1ea26
leaq 0x22f49(%rip), %rsi     # 0x41968
leaq 0x22f47(%rip), %rdx     # 0x4196d
movq %rbx, %rdi
callq 0xaccc
movq %rbx, %rax
popq %rbx
retq
leaq 0x258c6(%rip), %rdx     # 0x44300
movq %rbx, %rdi
movq %rdx, %rsi
jmp 0x1ea29
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Table.cpp
// Function: Table::Pointer::next()
bool Table::Pointer::next() {
    pid++;
    if (!s->sel) {
        if (pid % s->record_onepg == 0) {
            buf = s->bpm->getPage(s->main_file, pid / s->record_onepg);
        }
        while ((uint)pid < s->record_num && !exist(buf, pid % s->record_onepg)) {
            pid++;
            if (pid % s->record_onepg == 0) {
                buf = s->bpm->getPage(s->main_file, pid / s->record_onepg);
            }
        }
    }
    return pid < s->record_num;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %eax
incl %eax
movl %eax, 0x8(%rdi)
movq (%rdi), %rcx
cmpl $0x0, 0x9fb0(%rcx)
je 0x20061
movl 0x8(%rbx), %eax
movq (%rbx), %rcx
cmpl 0x9fa0(%rcx), %eax
setb %al
popq %rbx
retq
xorl %edx, %edx
divl 0x9fac(%rcx)
testl %edx, %edx
jne 0x20082
movq 0x48(%rcx), %rdi
movl 0x9fa4(%rcx), %esi
movl %eax, %edx
callq 0x6768
movq %rax, 0x10(%rbx)
movl 0x8(%rbx), %ecx
movq (%rbx), %rsi
cmpl 0x9fa0(%rsi), %ecx
jae 0x20050
movq 0x10(%rbx), %r8
movl 0x9fac(%rsi), %edi
movl %ecx, %eax
xorl %edx, %edx
divl %edi
movl %edx, %eax
shrl $0x3, %eax
movzbl (%r8,%rax), %eax
andl $0x7, %edx
btl %edx, %eax
jb 0x20050
incl %ecx
movl %ecx, 0x8(%rbx)
movl %ecx, %eax
xorl %edx, %edx
divl %edi
testl %edx, %edx
jne 0x20082
movq 0x48(%rsi), %rdi
movl 0x9fa4(%rsi), %esi
jmp 0x20077
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Table.cpp
// Function: Table::Pointer::get()
Anys Table::Pointer::get() {
    if (s->sel) return s->data[pid];
    BufType _buf = buf + (s->record_onepg - 1) / 8 + 1 + s->record_size * (pid % s->record_onepg);
    Anys as; Any a;
    for (uint i = 0; i < s->col_num; i++) {
        s->fetch(_buf, s->col_ty[i].ty, s->col_ty[i].size(), a);
        as.push_back(a);
    }
    return as;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rcx
cmpl $0x0, 0x9fb0(%rcx)
je 0x20140
movl 0x8(%r14), %eax
leaq (%rax,%rax,2), %rsi
shlq $0x3, %rsi
addq 0x9fb8(%rcx), %rsi
movq %rbx, %rdi
callq 0xa450
jmp 0x20242
movl 0x9fac(%rcx), %esi
leal -0x1(%rsi), %edi
shrl $0x3, %edi
addq 0x10(%r14), %rdi
movl 0x8(%r14), %eax
xorl %r8d, %r8d
xorl %edx, %edx
divl %esi
imull 0x9fa8(%rcx), %edx
leaq (%rdx,%rdi), %rax
incq %rax
movq %rax, 0x10(%rsp)
movq %r8, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %r8, (%rsp)
movq (%r14), %rdi
cmpl $0x0, 0x54(%rdi)
je 0x20233
movl $0x80, %r15d
xorl %r12d, %r12d
leaq 0x217f3(%rip), %r13     # 0x4198c
movl -0x4(%rdi,%r15), %edx
cmpq $0x4, %rdx
ja 0x201ca
movslq (%r13,%rdx,4), %rax
addq %r13, %rax
jmpq *%rax
movl $0x4, %ebp
jmp 0x201cf
movl $0x10, %ebp
jmp 0x201cf
movzbl (%rdi,%r15), %ebp
jmp 0x201cf
movl $0x8, %ebp
jmp 0x201cf
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x10(%rsp), %rsi
movl %ebp, %ecx
movq %rsp, %r8
xorl %r9d, %r9d
callq 0x21f2c
movl %ebp, %eax
addq %rax, 0x10(%rsp)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x201f9
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x201fb
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0xa1bc
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2021d
movq (%rdi), %rax
callq *0x8(%rax)
incq %r12
movq (%r14), %rdi
movl 0x54(%rdi), %eax
addq $0x38, %r15
cmpq %rax, %r12
jb 0x20199
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x20242
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2026c
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x2026c
movq %rax, %r14
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2027b
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0xa564
movq %r14, %rdi
callq 0x56e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Table.cpp
// Function: Table::~Table()
Table::~Table() {
    if (sel == false) {
        fm->closeFile(main_file);
        if (p_key) delete p_key;
        for (uint i = 0; i < f_key.size(); i++) delete f_key[i];
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x9fb0(%rdi)
jne 0x212eb
movq 0x40(%rbx), %rdi
movl 0x9fa4(%rbx), %esi
callq 0x1836a
movq 0x758(%rbx), %rdi
testq %rdi, %rdi
je 0x212a7
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x760(%rbx), %rax
cmpq %rax, 0x768(%rbx)
je 0x212eb
movl $0x1, %ebp
xorl %ecx, %ecx
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0x212cd
movq (%rdi), %rax
callq *0x10(%rax)
movl %ebp, %ecx
movq 0x760(%rbx), %rax
movq 0x768(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x212be
leaq 0x9fd0(%rbx), %rdi
callq 0xa564
leaq 0x9fb8(%rbx), %rdi
callq 0x28798
movl $0x9f90, %r14d          # imm = 0x9F90
movq -0x10(%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x2131f
movq (%rbx,%r14), %rsi
subq %rdi, %rsi
callq 0x53a0
movq -0x40(%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x21336
movq -0x30(%rbx,%r14), %rsi
subq %rdi, %rsi
callq 0x53a0
movq -0x58(%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x2134d
movq -0x48(%rbx,%r14), %rsi
subq %rdi, %rsi
callq 0x53a0
addq $-0x98, %r14
cmpq $0x790, %r14            # imm = 0x790
jne 0x21309
movq 0x780(%rbx), %rdi
testq %rdi, %rdi
je 0x21378
movq 0x790(%rbx), %rsi
subq %rdi, %rsi
callq 0x53a0
movq 0x760(%rbx), %rdi
testq %rdi, %rdi
je 0x21393
movq 0x770(%rbx), %rsi
subq %rdi, %rsi
callq 0x53a0
movl $0x700, %r14d           # imm = 0x700
movq 0x50(%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x213a9
movq (%rdi), %rax
callq *0x8(%rax)
addq $-0x38, %r14
jne 0x21399
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rdi
callq 0x697a
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Table.cpp
// Function: Table::createColumn(Type)
int Table::createColumn(Type ty) {
    if (record_num > 0 && ty.beNull() == false) return -1;
    col_ty[col_num++] = ty;
    rebuild(1, col_num);
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x9fa0(%rdi)
je 0x2183c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0x1, (%rsi)
jne 0x2189c
movl 0x54(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x54(%rbx)
imulq $0x38, %rax, %rax
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movups 0x20(%rsi), %xmm2
movups %xmm2, 0x78(%rbx,%rax)
movups %xmm1, 0x68(%rbx,%rax)
movups %xmm0, 0x58(%rbx,%rax)
movq $0x0, 0x88(%rbx,%rax)
movq 0x30(%rsi), %rdi
testq %rdi, %rdi
je 0x2188a
leaq (%rbx,%rax), %r14
addq $0x58, %r14
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, 0x30(%r14)
movl 0x54(%rbx), %edx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x234e6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Table.cpp
// Function: Table::getStr(unsigned char*, unsigned int)
char* Table::getStr(BufType buf, uint size) {
    char* str = new char[size + 1];
    memcpy(str, buf, size);
    str[size] = '\0';
    return str;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
leal 0x1(%rbx), %edi
callq 0x5040
movq %rax, %r15
movl %ebx, %ebx
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x5310
movb $0x0, (%r15,%rbx)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Table.cpp
// Function: Table::insert(Any&, enumType, unsigned int, unsigned char*&)
void Table::insert(Any& val, enumType ty, uint size, BufType& buf) {
    if (val.isNull()) {
        for (uint i = 0; i < size; i++) {
            *(uint8_t*)buf = 255;
            buf += 1;
        }
    }
    else {
        switch (ty) {
        case INT: 
            *(int*)buf = *val.anyCast<int>(); 
            break;
        case CHAR: 
            memcpy(buf, *val.anyCast<char*>(), strlen(*val.anyCast<char*>()));
            break; 
        case VARCHAR: 
            *(uint64_t*)buf = db->storeVarchar(*val.anyCast<char*>());
            break;
        case DATE: 
            *(uint32_t*)buf = *val.anyCast<uint32_t>(); 
            break;
        case DECIMAL: 
            *(long double*)buf = *val.anyCast<long double>(); 
            break;
        }
        buf += size;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movq (%rsi), %r14
testq %r14, %r14
je 0x21e35
cmpl $0x4, %edx
ja 0x21f17
movl %edx, %eax
leaq 0x1fbac(%rip), %rcx     # 0x419c8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x3187c(%rip), %rsi     # 0x536a8
leaq 0x3189d(%rip), %rdx     # 0x536d0
jmp 0x21eb2
testl %ebp, %ebp
je 0x21f1c
movq (%rbx), %rax
movb $-0x1, (%rax)
incq (%rbx)
decl %ebp
jne 0x21e3d
jmp 0x21f1c
leaq 0x31852(%rip), %rsi     # 0x536a8
leaq 0x3188b(%rip), %rdx     # 0x536e8
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x5430
fldt 0x10(%rax)
movq (%rbx), %rax
fstpt (%rax)
jmp 0x21f17
movq 0x38(%rdi), %r15
leaq 0x31829(%rip), %rsi     # 0x536a8
leaq 0x31832(%rip), %rdx     # 0x536b8
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x5430
movq 0x8(%rax), %rsi
movq %r15, %rdi
callq 0x77ae
movq (%rbx), %rcx
movq %rax, (%rcx)
jmp 0x21f17
leaq 0x317fd(%rip), %rsi     # 0x536a8
leaq 0x3184e(%rip), %rdx     # 0x53700
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x5430
movl 0x8(%rax), %eax
movq (%rbx), %rcx
movl %eax, (%rcx)
jmp 0x21f17
movq (%rbx), %rax
movq %rax, (%rsp)
leaq 0x317d4(%rip), %r12     # 0x536a8
leaq 0x317dd(%rip), %r13     # 0x536b8
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x5430
movq 0x8(%rax), %r15
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x5430
movq 0x8(%rax), %rdi
callq 0x51f0
movq (%rsp), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x5310
movl %ebp, %eax
addq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Table.cpp
// Function: Table::fetchWithOffset(unsigned char*&, enumType, unsigned int, Any&, unsigned int)
void Table::fetchWithOffset(BufType& buf, enumType ty, uint size, Any& val, uint offset) {
    buf += offset;
    BufType temp = buf;
    bool flag = true;
    for (uint i = 0; i < size; i++) {
        if (*(uint8_t*)buf != 255) {
            flag = false;
            break;
        }
        buf += 1;
    }
    buf = temp;
    if (flag) val = Any();
    else{
        switch (ty) {
        case INT: 
            val = *(int*)buf; 
            break;
        case CHAR:
            val = getStr(buf, size);
            break;
        case VARCHAR: 
            val = db->getVarchar(*(uint64_t*)buf); 
            break;
        case DATE: 
            val = *(uint32_t*)buf; 
            break;
        case DECIMAL: 
            val = *(long double*)buf; 
            break;
        }
    }
    buf -= offset;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rsi, %rbx
movq (%rsi), %rax
movl %r9d, %ebp
leaq (%rax,%rbp), %r15
movq %r15, (%rsi)
testl %ecx, %ecx
je 0x21f67
movl %ecx, %r12d
addq %rbp, %rax
incq %rax
cmpb $-0x1, -0x1(%rax)
jne 0x21f83
movq %rax, (%rbx)
incq %rax
decl %ecx
jne 0x21f57
movq %r15, (%rbx)
movq $0x0, (%r14)
subq %rbp, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, (%rbx)
cmpl $0x4, %edx
ja 0x21f71
movl %edx, %eax
leaq 0x1fa48(%rip), %rcx     # 0x419dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
movq %r15, %rsi
callq 0x287da
jmp 0x21f71
movq %r14, %rdi
movq %r15, %rsi
callq 0x28862
jmp 0x21f71
movq 0x38(%rdi), %rdi
movq (%r15), %rsi
callq 0x76da
movq %rax, %r12
movl $0x10, %edi
callq 0x5390
movq %rax, %r15
leaq 0x31a76(%rip), %rax     # 0x53a50
movq %rax, (%r15)
movq %r12, 0x8(%r15)
jmp 0x2202f
movq %r14, %rdi
movq %r15, %rsi
callq 0x2881e
jmp 0x21f71
leal 0x1(%r12), %edi
callq 0x5040
movq %rax, %r13
movl %r12d, %r12d
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x5310
movb $0x0, (%r13,%r12)
movl $0x10, %edi
callq 0x5390
movq %rax, %r15
leaq 0x31a28(%rip), %rax     # 0x53a50
movq %rax, (%r15)
movq %r13, 0x8(%r15)
movq (%r14), %rdi
testq %rdi, %rdi
je 0x2203d
movq (%rdi), %rax
callq *0x8(%rax)
movq %r15, (%r14)
jmp 0x21f71
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Table.cpp
// Function: Table::constraintRow(Any*, unsigned int, bool)
int Table::constraintRow(Any* data, uint record_id, bool ck_unique) {
    for (uint i = 0; i < col_num; i++) {
        if (col_ty[i].beNull() == false && data[i].isNull()) return -1;
    }
    if (p_key != nullptr && constraintRowKey(data, p_key)) return -3;
    for (auto it: f_key) if (constraintRowKey(data, it)) return -4;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x54(%rdi), %eax
testq %rax, %rax
setne %cl
je 0x222d7
leaq 0x58(%r14), %rdx
movq %rax, %rsi
negq %rsi
movl $0x1, %edi
cmpb $0x0, (%rdx)
jne 0x222b0
cmpq $0x0, -0x8(%rbx,%rdi,8)
je 0x222cc
cmpq %rax, %rdi
setb %cl
addq $0x38, %rdx
leaq (%rsi,%rdi), %r8
incq %r8
incq %rdi
cmpq $0x1, %r8
jne 0x222a3
jmp 0x222d7
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
testb $0x1, %cl
jne 0x2233b
movq 0x758(%r14), %rdx
testq %rdx, %rdx
je 0x222f8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x25ce6
movl $0xfffffffd, %r13d      # imm = 0xFFFFFFFD
testl %eax, %eax
jne 0x2233b
movq 0x760(%r14), %r15
movq 0x768(%r14), %r12
xorl %r13d, %r13d
cmpq %r12, %r15
je 0x2233b
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl $0xfffffffc, %ebp       # imm = 0xFFFFFFFC
movq (%r15), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x25ce6
testl %eax, %eax
cmovnel %ebp, %r13d
jne 0x2233b
addq $0x8, %r15
cmpq %r12, %r15
jne 0x22319
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Table.cpp
// Function: Table::queryRecord(int, Any*&)
int Table::queryRecord(const int record_id, Any* &data) {
    BufType buf = bpm->getPage(main_file, record_id / record_onepg);
    if (exist(buf, record_id % record_onepg)) {
        buf += (record_onepg - 1) / 8 + 1;
        buf += record_size * (record_id % record_onepg);
        data = new Any[col_num];
        memset(data, 0, col_num * sizeof(Any));
        for (uint i = 0; i < col_num; i++) {
            fetch(buf, col_ty[i].ty, col_ty[i].size(), data[i]);
        }
        return 0;
    } else return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movl %esi, %ebp
movq %rdi, %r14
movq 0x48(%rdi), %rdi
movl 0x9fa4(%r14), %esi
movl %ebp, %eax
xorl %edx, %edx
divl 0x9fac(%r14)
movl %eax, %edx
callq 0x6768
movq %rax, %rcx
movq %rax, 0x8(%rsp)
movl 0x9fac(%r14), %esi
movl %ebp, %eax
xorl %edx, %edx
divl %esi
movl %edx, %eax
shrl $0x3, %eax
movzbl (%rcx,%rax), %eax
movl %edx, %edi
andl $0x7, %edi
btl %edi, %eax
jae 0x22e8d
decl %esi
shrl $0x3, %esi
leaq (%rcx,%rsi), %rax
addq %rsi, %rcx
incq %rcx
movq %rcx, 0x8(%rsp)
imull 0x9fa8(%r14), %edx
addq %rdx, %rax
incq %rax
movq %rax, 0x8(%rsp)
movl 0x54(%r14), %ebx
leaq (,%rbx,8), %r15
leaq 0x8(,%rbx,8), %rdi
callq 0x5040
leaq 0x8(%rax), %r12
movq %rbx, (%rax)
testq %rbx, %rbx
je 0x22de2
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x5240
movq 0x10(%rsp), %rax
movq %r12, (%rax)
xorl %ebp, %ebp
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x5240
cmpl $0x0, 0x54(%r14)
je 0x22e92
leaq 0x80(%r14), %r13
xorl %r15d, %r15d
xorl %ebx, %ebx
xorl %ebp, %ebp
movl -0x4(%r13), %edx
cmpq $0x4, %rdx
ja 0x22e4b
leaq 0x1ebf5(%rip), %rcx     # 0x41a18
movslq (%rcx,%rdx,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x4, %r12d
jmp 0x22e51
movl $0x10, %r12d
jmp 0x22e51
movzbl (%r13), %r12d
jmp 0x22e51
movl $0x8, %r12d
jmp 0x22e51
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq 0x10(%rsp), %rax
movq (%rax), %r8
addq %r15, %r8
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
movl %r12d, %ecx
xorl %r9d, %r9d
callq 0x21f2c
movl %r12d, %eax
addq %rax, 0x8(%rsp)
incq %rbx
movl 0x54(%r14), %eax
addq $0x38, %r13
addq $0x8, %r15
cmpq %rax, %rbx
jb 0x22e12
jmp 0x22e92
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Table.cpp
// Function: Table::queryRecord(int)
Anys Table::queryRecord(const int record_id) {
    if (sel) return this->data[record_id];
    Anys data;
    BufType buf = bpm->getPage(main_file, record_id / record_onepg);
    if (exist(buf, record_id % record_onepg)) {
        buf += (record_onepg - 1) / 8 + 1;
        buf += record_size * (record_id % record_onepg);
        Any any;
        for (uint i = 0; i < col_num; i++) {
            fetch(buf, col_ty[i].ty, col_ty[i].size(), any);
            data.push_back(any);
        }
    }
    return data;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, 0x9fb0(%rsi)
je 0x22eef
movslq %ebp, %rax
leaq (%rax,%rax,2), %rsi
shlq $0x3, %rsi
addq 0x9fb8(%r14), %rsi
movq %rbx, %rdi
callq 0xa450
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq 0x48(%r14), %rdi
movl 0x9fa4(%r14), %esi
movl %ebp, %eax
xorl %edx, %edx
divl 0x9fac(%r14)
movl %eax, %edx
callq 0x6768
movq %rax, %rcx
movq %rax, 0x8(%rsp)
movl 0x9fac(%r14), %esi
movl %ebp, %eax
xorl %edx, %edx
divl %esi
movl %edx, %eax
shrl $0x3, %eax
movzbl (%rcx,%rax), %eax
movl %edx, %edi
andl $0x7, %edi
btl %edi, %eax
jae 0x22edd
decl %esi
shrl $0x3, %esi
leaq (%rcx,%rsi), %rax
addq %rsi, %rcx
incq %rcx
movq %rcx, 0x8(%rsp)
imull 0x9fa8(%r14), %edx
addq %rdx, %rax
incq %rax
movq %rax, 0x8(%rsp)
movq $0x0, (%rsp)
cmpl $0x0, 0x54(%r14)
je 0x23026
leaq 0x80(%r14), %r15
xorl %r12d, %r12d
leaq 0x1ea9f(%rip), %r13     # 0x41a2c
movl -0x4(%r15), %edx
cmpq $0x4, %rdx
ja 0x22fbc
movslq (%r13,%rdx,4), %rax
addq %r13, %rax
jmpq *%rax
movl $0x4, %ebp
jmp 0x22fc1
movl $0x10, %ebp
jmp 0x22fc1
movzbl (%r15), %ebp
jmp 0x22fc1
movl $0x8, %ebp
jmp 0x22fc1
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
movl %ebp, %ecx
movq %rsp, %r8
xorl %r9d, %r9d
callq 0x21f2c
movl %ebp, %eax
addq %rax, 0x8(%rsp)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x22fee
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x22ff0
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0xa1bc
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x23012
movq (%rdi), %rax
callq *0x8(%rax)
incq %r12
movl 0x54(%r14), %eax
addq $0x38, %r15
cmpq %rax, %r12
jb 0x22f8d
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x22edd
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x22edd
movq %rax, %r14
jmp 0x2306a
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2305b
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x2305b
movq %rax, %r14
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2306a
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0xa564
movq %r14, %rdi
callq 0x56e0
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Table.cpp
// Function: Table::findIndex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Table::findIndex(std::string s) {
    for (uint i = 0; i < index_num; i++) 
        if (s == std::string(this->index[i].name)) 
            return i;
    return -1;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x0, 0x798(%rdi)
je 0x23480
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x18(%rsp), %rbx
leaq 0x7a8(%rdi), %r12
xorl %ebp, %ebp
movq %rbx, 0x8(%rsp)
movq %r12, %rdi
callq 0x51f0
leaq (%rax,%r12), %rdx
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0xaccc
movq 0x8(%r14), %rdx
cmpq 0x10(%rsp), %rdx
jne 0x2342f
testq %rdx, %rdx
je 0x23434
movq 0x8(%rsp), %rsi
movq (%r14), %rdi
callq 0x53c0
testl %eax, %eax
sete %r13b
jmp 0x23437
xorl %r13d, %r13d
jmp 0x23437
movb $0x1, %r13b
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2344e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x53a0
testb %r13b, %r13b
jne 0x23470
incq %rbp
movl 0x798(%r15), %eax
addq $0x98, %r12
cmpq %rax, %rbp
jb 0x233ec
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x23472
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Table.cpp
// Function: Table::genOffset(unsigned int)
uint Table::genOffset(uint index) {
    uint ans = 0;
    for (uint i = 0; i < index; i++) {
        ans += this->col_ty[i].size();
    }
    return ans;
}

// Assembly:
testl %esi, %esi
je 0x234e2
movl %esi, %eax
imulq $0x38, %rax, %rcx
xorl %edx, %edx
leaq 0x1e5bf(%rip), %rsi     # 0x41a54
xorl %eax, %eax
movl 0x7c(%rdi,%rdx), %r8d
cmpq $0x4, %r8
ja 0x234cf
movslq (%rsi,%r8,4), %r8
addq %rsi, %r8
jmpq *%r8
movl $0x4, %r8d
jmp 0x234d5
movl $0x10, %r8d
jmp 0x234d5
movzbl 0x80(%rdi,%rdx), %r8d
jmp 0x234d5
movl $0x8, %r8d
jmp 0x234d5
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
addl %r8d, %eax
addq $0x38, %rdx
cmpq %rdx, %rcx
jne 0x23497
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Table.cpp
// Function: Table::removePrimaryKey()
int Table::removePrimaryKey() {
    if (p_key == nullptr) return -1;
    for (auto it: p_key->f) it->p = nullptr;
    for (auto col: p_key->v) col_ty[col].key = enumKeyType::Common;
    int index_id = p_key_index;
    removeIndex(index_id);
    delete p_key;
    p_key = nullptr;
    return 0;
}

// Assembly:
movq 0x758(%rdi), %rax
testq %rax, %rax
je 0x23de1
pushq %rbx
movq %rdi, %rbx
movq 0x50(%rax), %rcx
movq 0x58(%rax), %rdx
cmpq %rdx, %rcx
je 0x23d8a
movq (%rcx), %rsi
movq $0x0, 0x50(%rsi)
addq $0x8, %rcx
jmp 0x23d74
movq 0x30(%rax), %rcx
movq 0x38(%rax), %rax
cmpq %rax, %rcx
je 0x23db2
leaq 0x58(%rbx), %rdx
movl (%rcx), %esi
imulq $0x38, %rsi, %rsi
movl $0x2, 0x2c(%rdx,%rsi)
addq $0x4, %rcx
cmpq %rax, %rcx
jne 0x23d9b
movl 0x778(%rbx), %esi
movq %rbx, %rdi
callq 0x21942
movq 0x758(%rbx), %rdi
testq %rdi, %rdi
je 0x23dd2
movq (%rdi), %rax
callq *0x10(%rax)
movq $0x0, 0x758(%rbx)
xorl %eax, %eax
popq %rbx
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Table.cpp
// Function: Table::modifyColumn(unsigned int, Type)
int Table::modifyColumn(uint col_id, Type ty) {
    switch (col_ty[col_id].ty) {
    case INT: 
    case DATE: 
    case DECIMAL:
        if (ty.ty != col_ty[col_id].ty) return -1;
        break;
    case CHAR:
    case VARCHAR:
        if (ty.ty == CHAR || ty.ty == VARCHAR) {
            if (col_ty[col_id].char_len > ty.char_len) return -2;
        } else return -1;
        break;
    }
    Type tmp = col_ty[col_id];
    col_ty[col_id] = ty;
    col_ty[col_id].key = tmp.key;
    if (constraintCol(col_id)) {
        col_ty[col_id] = tmp;
        return -3;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r14
movl %esi, %eax
imulq $0x38, %rax, %rax
leaq (%rdi,%rax), %r13
addq $0x58, %r13
movl 0x24(%r13), %eax
cmpl $0x4, %eax
ja 0x23fb3
movl $0x19, %ecx
btl %eax, %ecx
jae 0x23f8a
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
cmpl %eax, 0x24(%r15)
je 0x23fb3
jmp 0x24088
movl 0x24(%r15), %eax
decl %eax
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
cmpl $0x1, %eax
ja 0x24088
movb 0x28(%r13), %al
movl $0xfffffffe, %r12d      # imm = 0xFFFFFFFE
cmpb 0x28(%r15), %al
ja 0x24088
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups 0x1c(%r13), %xmm2
movups %xmm2, 0x1c(%rsp)
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl 0x2c(%r13), %r12d
movq 0x30(%r13), %rdi
testq %rdi, %rdi
je 0x23fe8
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, %rbx
jmp 0x23fea
xorl %ebx, %ebx
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm2, 0x20(%r13)
movups %xmm1, 0x10(%r13)
movups %xmm0, (%r13)
movq $0x0, 0x30(%r13)
movq 0x30(%r15), %rdi
testq %rdi, %rdi
je 0x24022
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, 0x30(%r13)
movl %r12d, 0x2c(%r13)
movq %r14, %rdi
movl %ebp, %esi
callq 0x240b4
testl %eax, %eax
je 0x24077
movups 0x1c(%rsp), %xmm0
movups %xmm0, 0x1c(%r13)
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movups %xmm1, 0x10(%r13)
movups %xmm0, (%r13)
movl %r12d, 0x2c(%r13)
movq $0x0, 0x30(%r13)
movl $0xfffffffd, %r12d      # imm = 0xFFFFFFFD
testq %rbx, %rbx
je 0x2407a
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq %rax, 0x30(%r13)
jmp 0x2407a
xorl %r12d, %r12d
testq %rbx, %rbx
je 0x24088
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movl %r12d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
testq %rbx, %rbx
je 0x240ab
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq %r14, %rdi
callq 0x56e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Table.cpp
// Function: Table::constraintCol(unsigned int)
int Table::constraintCol(uint col_id) {
    if (col_ty[col_id].beNull() == false) {
        Pointer p(this);
        while (p.next()) if (p.get()[col_id].isNull()) return -1;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %esi, %r15d
imulq $0x38, %r15, %rax
cmpb $0x0, 0x58(%rdi,%rax)
je 0x240dd
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %rbx
movq %rdi, (%rbx)
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
movq %rsp, %r14
movq %rbx, %rdi
callq 0x20038
testb %al, %al
je 0x240ce
movl %eax, %ebp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20100
movq (%rsp), %rax
movq (%rax,%r15,8), %r12
movq %r14, %rdi
callq 0xa564
testq %r12, %r12
jne 0x240ef
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %bpl, %bpl
je 0x240ce
jmp 0x240d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Table.cpp
// Function: Table::createPrimaryKey(PrimaryKey*)
int Table::createPrimaryKey(PrimaryKey* pk) {
    if (p_key) return -1;
    if (constraintKey(pk)) return -2;
    p_key = new PrimaryKey(this);
    p_key->v_size = pk->v_size;
    p_key->name = pk->name;
    p_key->v.clear();
    for (auto i: pk->v)p_key->v.push_back(i);
    p_key->table = pk->table;
    updateColumns();
    if (p_key_index != -1) removeIndex(p_key_index);
    p_key_index = createIndex(p_key->v, "pk");
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq $0x0, 0x758(%rdi)
jne 0x242cb
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2431a
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
testl %eax, %eax
jne 0x242cb
movl $0x68, %edi
callq 0x5390
movl $0x0, 0x8(%rax)
leaq 0x10(%rax), %rdi
leaq 0x20(%rax), %rcx
movq %rcx, 0x10(%rax)
xorl %ecx, %ecx
movq %rcx, 0x18(%rax)
movb $0x0, 0x20(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movq %rcx, 0x40(%rax)
movq %rbx, 0x48(%rax)
leaq 0x2fab8(%rip), %rdx     # 0x53c58
movq %rdx, (%rax)
movups %xmm0, 0x50(%rax)
movq %rcx, 0x60(%rax)
movq %rax, 0x758(%rbx)
movl 0x8(%r14), %ecx
movl %ecx, 0x8(%rax)
leaq 0x10(%r14), %rsi
callq 0x5230
movq 0x758(%rbx), %rax
movq 0x30(%rax), %rcx
cmpq %rcx, 0x38(%rax)
je 0x241d7
movq %rcx, 0x38(%rax)
movq 0x30(%r14), %r12
movq 0x38(%r14), %r13
cmpq %r13, %r12
je 0x24223
leaq 0xc(%rsp), %r15
movl (%r12), %eax
movl %eax, 0xc(%rsp)
movq 0x758(%rbx), %rdi
movq 0x38(%rdi), %rsi
cmpq 0x40(%rdi), %rsi
je 0x2420e
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x38(%rdi)
jmp 0x2421a
addq $0x30, %rdi
movq %r15, %rdx
callq 0x1d780
addq $0x4, %r12
cmpq %r13, %r12
jne 0x241e9
movq 0x48(%r14), %rax
movq 0x758(%rbx), %rcx
movq %rax, 0x48(%rcx)
movq %rbx, %rdi
callq 0x218a4
movl 0x778(%rbx), %esi
cmpl $-0x1, %esi
je 0x2424d
movq %rbx, %rdi
callq 0x21942
movq 0x758(%rbx), %rsi
addq $0x30, %rsi
leaq 0x10(%rsp), %rdi
callq 0x1cc60
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1d9a9(%rip), %rsi     # 0x41c1b
leaq 0x1d9a4(%rip), %rdx     # 0x41c1d
leaq 0x28(%rsp), %rdi
callq 0xaccc
leaq 0x10(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x21a1e
movl %eax, 0x778(%rbx)
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x242b2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x53a0
movq 0x10(%rsp), %rdi
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x242cb
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x53a0
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x242fb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0x242fb
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x24312
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x53a0
movq %rbx, %rdi
callq 0x56e0