LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/unordered_dense/./unordered_dense.h
// Function: ankerl::unordered_dense::v4_1_2::bucket_type::standard ankerl::unordered_dense::v4_1_2::detail::table<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>, ankerl::unordered_dense::v4_1_2::bucket_type::standard, false>::next_while_less<unsigned int>(unsigned int const&) const
[[nodiscard]] constexpr auto mixed_hash(K const& key) const -> uint64_t {
        if constexpr (is_detected_v<detect_avalanching, Hash>) {
            // we know that the hash is good because is_avalanching.
            if constexpr (sizeof(decltype(m_hash(key))) < sizeof(uint64_t)) {
                // 32bit hash and is_avalanching => multiply with a constant to avalanche bits upwards
                return m_hash(key) * UINT64_C(0x9ddfea08eb382d69);
            } else {
                // 64bit and is_avalanching => only use the hash itself.
                return m_hash(key);
            }
        } else {
            // not is_avalanching => apply wyhash
            return wyhash::hash(m_hash(key));
        }
    }

// Assembly:
movl (%rsi), %eax
movabsq $-0x61c8864680b583eb, %rcx # imm = 0x9E3779B97F4A7C15
mulq %rcx
xorq %rax, %rdx
movzbl %dl, %eax
movb 0x36(%rdi), %cl
shrq %cl, %rdx
orl $0x100, %eax            # imm = 0x100
movq 0x18(%rdi), %rcx
movq 0x20(%rdi), %rsi
xorl %edi, %edi
movl %edx, %edx
cmpl (%rcx,%rdx,8), %eax
jae 0x17f2
addl $0x100, %eax            # imm = 0x100
incl %edx
cmpq %rdx, %rsi
cmovel %edi, %edx
jmp 0x17dc
shlq $0x20, %rdx
movl %eax, %eax
orq %rdx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/unordered_dense/./unordered_dense.h
// Function: ankerl::unordered_dense::v4_1_2::detail::table<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>, ankerl::unordered_dense::v4_1_2::bucket_type::standard, false>::place_and_shift_up(ankerl::unordered_dense::v4_1_2::bucket_type::standard, unsigned int)
void place_and_shift_up(Bucket bucket, value_idx_type place) {
        while (0 != at(m_buckets, place).m_dist_and_fingerprint) {
            bucket = std::exchange(at(m_buckets, place), bucket);
            bucket.m_dist_and_fingerprint = dist_inc(bucket.m_dist_and_fingerprint);
            place = next(place);
        }
        at(m_buckets, place) = bucket;
    }

// Assembly:
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
xorl %ecx, %ecx
movl %esi, %r9d
movq 0x18(%rdi), %r8
movl %edx, %edx
cmpl $0x0, (%r8,%rdx,8)
movl %r9d, %r9d
je 0x183e
movq (%r8,%rdx,8), %r10
andq %rax, %rsi
orq %rsi, %r9
movq %r9, (%r8,%rdx,8)
incl %edx
cmpq %rdx, 0x20(%rdi)
leal 0x100(%r10), %r9d
cmovel %ecx, %edx
movq %r10, %rsi
jmp 0x180b
andq %rax, %rsi
orq %rsi, %r9
movq %r9, (%r8,%rdx,8)
retq
// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/unordered_dense/./unordered_dense.h
// Function: std::pair<__gnu_cxx::__normal_iterator<std::pair<unsigned int, unsigned int>*, std::vector<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>>, bool> ankerl::unordered_dense::v4_1_2::detail::table<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>, ankerl::unordered_dense::v4_1_2::bucket_type::standard, false>::do_try_emplace<unsigned int>(unsigned int&&)
auto do_try_emplace(K&& key, Args&&... args) -> std::pair<iterator, bool> {
        if (ANKERL_UNORDERED_DENSE_UNLIKELY(is_full())) {
            increase_size();
        }

        auto hash = mixed_hash(key);
        auto dist_and_fingerprint = dist_and_fingerprint_from_hash(hash);
        auto bucket_idx = bucket_idx_from_hash(hash);

        while (true) {
            auto* bucket = &at(m_buckets, bucket_idx);
            if (dist_and_fingerprint == bucket->m_dist_and_fingerprint) {
                if (m_equal(key, get_key(m_values[bucket->m_value_idx]))) {
                    return {begin() + static_cast<difference_type>(bucket->m_value_idx), false};
                }
            } else if (dist_and_fingerprint > bucket->m_dist_and_fingerprint) {
                return do_place_element(dist_and_fingerprint, bucket_idx, std::forward<K>(key), std::forward<Args>(args)...);
            }
            dist_and_fingerprint = dist_inc(dist_and_fingerprint);
            bucket_idx = next(bucket_idx);
        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r8
movq 0x8(%rdi), %rax
subq %r8, %rax
sarq $0x3, %rax
cmpq 0x28(%rdi), %rax
jae 0x1902
movl (%rbx), %edi
movabsq $-0x61c8864680b583eb, %rcx # imm = 0x9E3779B97F4A7C15
movq %rdi, %rax
mulq %rcx
xorq %rax, %rdx
movzbl %dl, %esi
movb 0x36(%r14), %cl
shrq %cl, %rdx
orl $0x100, %esi            # imm = 0x100
movq 0x18(%r14), %rax
movq 0x20(%r14), %rcx
xorl %r9d, %r9d
movl %edx, %edx
cmpl (%rax,%rdx,8), %esi
jne 0x18d4
movl 0x4(%rax,%rdx,8), %r10d
cmpl (%r8,%r10,8), %edi
jne 0x18d6
jmp 0x18e7
ja 0x18ef
addl $0x100, %esi            # imm = 0x100
incl %edx
cmpq %rdx, %rcx
cmovel %r9d, %edx
jmp 0x18c0
leaq (%r8,%r10,8), %rax
xorl %edx, %edx
jmp 0x18fa
movq %r14, %rdi
movq %rbx, %rcx
callq 0x1942
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x1910
movq (%r14), %r8
jmp 0x1890
nop
// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/unordered_dense/./unordered_dense.h
// Function: ankerl::unordered_dense::v4_1_2::detail::table<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>, ankerl::unordered_dense::v4_1_2::bucket_type::standard, false>::increase_size()
void increase_size() {
        if (ANKERL_UNORDERED_DENSE_UNLIKELY(m_max_bucket_capacity == max_bucket_count())) {
            on_error_bucket_overflow();
        }
        --m_shifts;
        deallocate_buckets();
        allocate_buckets_from_shift();
        clear_and_fill_buckets_from_values();
    }

// Assembly:
pushq %rbx
movabsq $0x100000000, %rax      # imm = 0x100000000
cmpq %rax, 0x28(%rdi)
je 0x193d
movq %rdi, %rbx
decb 0x36(%rdi)
callq 0x160a
movq %rbx, %rdi
callq 0x1632
movq %rbx, %rdi
popq %rbx
jmp 0x16ae
callq 0x19a9
// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/unordered_dense/./unordered_dense.h
// Function: std::pair<__gnu_cxx::__normal_iterator<std::pair<unsigned int, unsigned int>*, std::vector<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>>, bool> ankerl::unordered_dense::v4_1_2::detail::table<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>, ankerl::unordered_dense::v4_1_2::bucket_type::standard, false>::do_place_element<unsigned int>(unsigned int, unsigned int, unsigned int&&)
auto do_place_element(dist_and_fingerprint_type dist_and_fingerprint, value_idx_type bucket_idx, K&& key, Args&&... args)
        -> std::pair<iterator, bool> {

        // emplace the new value. If that throws an exception, no harm done; index is still in a valid state
        m_values.emplace_back(std::piecewise_construct,
                              std::forward_as_tuple(std::forward<K>(key)),
                              std::forward_as_tuple(std::forward<Args>(args)...));

        // place element and shift up until we find an empty spot
        auto value_idx = static_cast<value_idx_type>(m_values.size() - 1);
        place_and_shift_up({dist_and_fingerprint, value_idx}, bucket_idx);
        return {begin() + static_cast<difference_type>(value_idx), true};
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x10(%rsp), %rdx
movq %rcx, (%rdx)
leaq 0x795(%rip), %rsi       # 0x20f8
leaq 0xf(%rsp), %rcx
callq 0x19f0
movq 0x8(%rbx), %r15
subq (%rbx), %r15
shrq $0x3, %r15
decl %r15d
movq %r15, %rax
shlq $0x20, %rax
movl %r14d, %esi
orq %rax, %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x17fc
shlq $0x3, %r15
addq (%rbx), %r15
movq %r15, %rax
movb $0x1, %dl
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/bowbowbow[P]CollaborativeFiltering/recommender.cpp
// Function: InputReader::InputReader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
InputReader(string filename) {
        fin.open(filename);
        if(!fin) {
            cout << filename << " file could not be opened\n";
            exit(0);
        }
        parse();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
callq 0x2170
leaq 0x208(%rbx), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x228(%rbx)
movups %xmm0, 0x218(%rbx)
movups %xmm0, 0x208(%rbx)
pushq $0x8
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2100
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rbx,%rax)
jne 0x2785
movq %rbx, %rdi
callq 0x2b66
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x484c(%rip), %rdi      # 0x6fd8
movq %r15, %rsi
callq 0x2120
leaq 0x18fe(%rip), %rsi      # 0x4099
movq %rax, %rdi
callq 0x2140
xorl %edi, %edi
callq 0x2180
movq %rax, %r15
leaq 0x220(%rbx), %rdi
callq 0x3946
movq %r14, %rdi
callq 0x28f0
movq %rbx, %rdi
callq 0x2030
movq %r15, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O2/bowbowbow[P]CollaborativeFiltering/recommender.cpp
// Function: CF::CF(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>)
CF(MAT userToItem) {
        this->userToItem = userToItem;
        
        userSize = (int)userToItem.size()-1;
        itemSize = (int)userToItem.back().size()-1;
        average = vector<double> (userSize+1, 0.0);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x30(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
andq $0x0, 0x40(%rdi)
callq 0x325e
movq 0x8(%r15), %rcx
movq %rcx, %rax
subq (%r15), %rax
pushq $0x18
popq %rsi
cqto
idivq %rsi
leal -0x1(%rax), %edx
movl %edx, 0x4c(%rbx)
movq -0x10(%rcx), %rdx
subq -0x18(%rcx), %rdx
shrq $0x3, %rdx
decl %edx
movl %edx, 0x48(%rbx)
movslq %eax, %rsi
leaq -0x30(%rbp), %rdx
andq $0x0, (%rdx)
leaq -0x48(%rbp), %rdi
leaq -0x21(%rbp), %rcx
callq 0x2cee
leaq -0x48(%rbp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3634
movq %rbx, %rdi
callq 0x2f82
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28c8
movq %rax, %r15
leaq 0x18(%rbx), %r12
movq %r14, %rdi
callq 0x2f82
movq %r12, %rdi
callq 0x28f0
movq %rbx, %rdi
callq 0x28f0
movq %r15, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O2/bowbowbow[P]CollaborativeFiltering/recommender.cpp
// Function: OutputPrinter::OutputPrinter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
OutputPrinter(string filename) {
        this->filename = filename;
        fout.open(filename);
        if(!fout) {
            cout << filename << " file could not be writed\n";
            exit(0);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
callq 0x2210
leaq 0x200(%rbx), %r14
leaq 0x210(%rbx), %rax
movq %rax, 0x200(%rbx)
andq $0x0, 0x208(%rbx)
movb $0x0, 0x210(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x20c0
pushq $0x10
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2090
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rbx,%rax)
jne 0x29af
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x4622(%rip), %rdi      # 0x6fd8
movq %r15, %rsi
callq 0x2120
leaq 0x173a(%rip), %rsi      # 0x40ff
movq %rax, %rdi
callq 0x2140
xorl %edi, %edi
callq 0x2180
movq %rax, %r15
movq %r14, %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x21c0
movq %r15, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O2/bowbowbow[P]CollaborativeFiltering/recommender.cpp
// Function: CF::predict(int, int)
int predict(int user, int item) {
        double top = 0;
        double bottom = 0;
        
        // given untrained items
        if(item > itemSize) {
            return 3;
        }
        
        for(int i=1;i<=itemSize; i++) {
            if(userToItem[user][i] == EMPTY) continue;
            
            bottom += abs(itemToItem[item][i]);
            top += itemToItem[item][i]*userToItem[user][i];
        }
        
        if(bottom == 0) {
            return 3;
        }
        
        double rating = top/bottom;
        // return rating;
        return rating+0.5;
    }

// Assembly:
movl 0x48(%rdi), %ecx
movl $0x3, %eax
cmpl %edx, %ecx
jl 0x2a8b
pushq %rbp
movq %rsp, %rbp
movslq %esi, %rsi
imulq $0x18, %rsi, %rsi
addq (%rdi), %rsi
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq 0x18(%rdi), %rdx
xorl %edi, %edi
testl %ecx, %ecx
cmovlel %edi, %ecx
xorpd %xmm0, %xmm0
movsd 0x15dc(%rip), %xmm2     # 0x4008
movapd 0x15ec(%rip), %xmm3     # 0x4020
xorpd %xmm1, %xmm1
cmpq %rdi, %rcx
je 0x2a6e
movq (%rsi), %r8
movsd 0x8(%r8,%rdi,8), %xmm4
ucomisd %xmm2, %xmm4
jne 0x2a4f
jnp 0x2a69
movq (%rdx), %r8
movsd 0x8(%r8,%rdi,8), %xmm5
mulsd %xmm5, %xmm4
andpd %xmm3, %xmm5
addsd %xmm5, %xmm1
addsd %xmm4, %xmm0
incq %rdi
jmp 0x2a38
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x2a7a
jnp 0x2a8a
divsd %xmm1, %xmm0
addsd 0x158a(%rip), %xmm0     # 0x4010
cvttsd2si %xmm0, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/bowbowbow[P]CollaborativeFiltering/recommender.cpp
// Function: InputReader::parse()
void parse() {
        int maxUser = 0, maxItem = 0;
        
        int user, item, rating, timeStamp;
        while(!fin.eof()) {
            fin >> user >> item >> rating >> timeStamp;
            
            input.push_back({user, item, rating});
            
            maxUser = max(maxUser, user);
            maxItem = max(maxItem, item);
        }
        input.pop_back();
        
        userToItem = vector<vector<double> > (maxUser+1, vector<double> (maxItem+1, EMPTY));
        for(int i=0;i<input.size();i++) {
            user = input[i].user, item = input[i].item, rating = input[i].rating;
            userToItem[user][item]= rating;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq 0x220(%rdi), %r12
xorl %r14d, %r14d
leaq -0x50(%rbp), %r13
xorl %r15d, %r15d
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x20(%rbx,%rax)
jne 0x2bfc
movq %rbx, %rdi
leaq -0x30(%rbp), %rsi
callq 0x20d0
movq %rax, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x20d0
movq %rax, %rdi
leaq -0x38(%rbp), %rsi
callq 0x20d0
movq %rax, %rdi
leaq -0x54(%rbp), %rsi
callq 0x20d0
movl -0x30(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x48(%rbp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x2dae
movl -0x30(%rbp), %eax
cmpl %eax, %r14d
cmovlel %eax, %r14d
movl -0x2c(%rbp), %eax
cmpl %eax, %r15d
cmovlel %eax, %r15d
jmp 0x2b8b
addq $-0xc, 0x228(%rbx)
incl %r15d
movabsq $-0x4000000000000000, %rax # imm = 0xC000000000000000
leaq -0x60(%rbp), %rdx
movq %rax, (%rdx)
leaq -0x78(%rbp), %r12
leaq -0x32(%rbp), %rcx
movq %r12, %rdi
movq %r15, %rsi
callq 0x2cee
incl %r14d
leaq -0x50(%rbp), %rdi
leaq -0x31(%rbp), %rcx
movq %r14, %rsi
movq %r12, %rdx
callq 0x2d4e
leaq 0x208(%rbx), %rdi
leaq -0x50(%rbp), %r14
movq %r14, %rsi
callq 0x31f2
movq %r14, %rdi
callq 0x28f0
leaq -0x78(%rbp), %rdi
callq 0x2f82
movq 0x228(%rbx), %rax
movq 0x208(%rbx), %rcx
movq 0x220(%rbx), %rsi
subq %rsi, %rax
pushq $0xc
popq %rdi
cqto
idivq %rdi
addq $0x8, %rsi
subq $0x1, %rax
jb 0x2cbc
movslq -0x8(%rsi), %rdx
movl %edx, -0x30(%rbp)
movslq -0x4(%rsi), %rdi
movl %edi, -0x2c(%rbp)
movl (%rsi), %r8d
movl %r8d, -0x38(%rbp)
cvtsi2sd %r8d, %xmm0
imulq $0x18, %rdx, %rdx
movq (%rcx,%rdx), %rdx
movsd %xmm0, (%rdx,%rdi,8)
addq $0xc, %rsi
jmp 0x2c89
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x2f82
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/rm_filehandle.h
// Function: RM_FileHandle::cleanFileHandle()
RC RM_FileHandle::cleanFileHandle(){
    this->fileName = NULL;
    this->bufType = NULL;
    this->bitmap = NULL;
    this->fileID = 0;
    this->pageID = 0;
    this->index = 0;
    this->recordSize = 0;
    this->attrNum = 0;
    this->priKeyNum = 0;
    this->attrType.clear();
    this->attrLength.clear();
    this->isNull.clear();
    this->tagSize = 0;
    this->recordNumForEachPage = 0;
    this->recordNumForAllPages = 0;
    this->bitmapSize = 0;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andq $0x0, 0x80(%rdi)
andq $0x0, 0x70(%rdi)
andl $0x0, 0x78(%rdi)
andl $0x0, 0x88(%rdi)
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq 0x18(%rdi), %rax
cmpq %rax, 0x20(%rdi)
je 0x24f1
movq %rax, 0x20(%rdi)
movq 0x30(%rdi), %rax
cmpq %rax, 0x38(%rdi)
je 0x24ff
movq %rax, 0x38(%rdi)
movq 0x48(%rdi), %rax
cmpq %rax, 0x50(%rdi)
je 0x250d
movq %rax, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/rm_filehandle.h
// Function: RM_FileHandle::init()
RC RM_FileHandle::init() {
    this->recordSize = 0;
    this->recordNumForEachPage = 0;
    this->tagSize = 0;
    this->recordNumForAllPages = 0;
    this->bitmapSize = 0;
    this->bitmap = 0;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andl $0x0, 0xc(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rdi)
andq $0x0, 0x70(%rdi)
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/rm_filehandle.h
// Function: RM_FileHandle::getRec(RID const&, RM_Record&)
RC RM_FileHandle::getRec(const RID &rid, RM_Record &rec){
    rid.getPageNum(this->pageID);
    this->bufType = bpm->getPage(this->fileID,
                                 this->pageID,
                                 this->index);
    BufType b = this->bufType;
    int tagID ;
    rid.getSlotNum(tagID);

    int tagInt = tagID / 32;
    int tagBit = tagID % 32;
    unsigned int &tagBlock = b[PAGE_INT_NUM-1-tagInt];

    // check bit correct
    if ((tagBlock & (1 << tagBit)) == 0) {
        // cout << "error delete" << endl;
        return 108;
    }
    //cout << "get record : " << this->pageID << ", " << tagID << endl;
    //cout << "size of buttype : " << b[0] << endl;
    char *rcd = (char *)(b + this->recordSize * tagID);
    //cout << string(rcd) << endl;
    char data[this->recordSize];
    strncpy(data, rcd, this->recordSize);
    rec.setData(data);
    rec.rid = rid;

    bpm->access(this->index);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl (%rsi), %edx
movl %edx, 0x78(%rdi)
movq 0x98(%rdi), %rdi
movl 0x8(%rbx), %esi
leaq 0x88(%rbx), %rcx
callq 0x3b76
movq %rax, %rcx
movq %rax, 0x80(%rbx)
movl 0x4(%r15), %esi
pushq $-0x20
popq %rdi
movl %esi, %eax
cltd
idivl %edi
cltq
movl 0x1ffc(%rcx,%rax,4), %eax
btl %esi, %eax
jae 0x260a
movq %rsp, %r13
movl 0xc(%rbx), %eax
imull %eax, %esi
movslq %esi, %rdx
leaq (%rcx,%rdx,4), %rsi
movq %rsp, %r12
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
movslq 0xc(%rbx), %rdx
movq %r12, %rdi
callq 0x20c0
movq %r14, %rdi
movq %r12, %rsi
callq 0x3be8
movq (%r15), %rax
movq %rax, 0x8(%r14)
movq 0x98(%rbx), %rdi
movl 0x88(%rbx), %esi
callq 0x3c30
xorl %eax, %eax
movq %r13, %rsp
jmp 0x260d
pushq $0x6c
popq %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/rm_filehandle.h
// Function: RM_FileHandle::deleteRec(RID const&)
RC RM_FileHandle::deleteRec(const RID &rid) {
    rid.getPageNum(this->pageID);
    this->bufType = bpm->getPage(this->fileID,
                                 this->pageID,
                                 this->index);
    BufType b = this->bufType;
    int tagID ;
    rid.getSlotNum(tagID);

    int tagInt = tagID / 32;
    int tagBit = tagID % 32;
    unsigned int &tagBlock = b[PAGE_INT_NUM-1-tagInt];

    // check bit correct
    if ((tagBlock & (1 << tagBit)) == 0) {
        cout << "error delete" << endl;
        return 108;
    }

    cout << ">>> delete record : (" << fileID << ", " << pageID << ", " << tagID << ")" << endl;
    tagBlock &= ~(1 << tagBit);

    bpm->markDirty(index);

    /* fresh table info with page index 0
     */
    this->bufType = this->bpm->getPage(this->fileID,
                                 0,
                                 this->index);
    b = this->bufType;
    --recordNumForAllPages;
    b[3] = recordNumForAllPages;
    this->bpm->markDirty(this->index);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %rbx
movl (%rsi), %edx
movl %edx, 0x78(%rdi)
movq 0x98(%rdi), %rdi
movl 0x8(%rbx), %esi
leaq 0x88(%rbx), %rcx
movq %rcx, -0x30(%rbp)
callq 0x3b76
movq %rax, %r15
movq %rax, 0x80(%rbx)
movl 0x4(%r12), %r12d
pushq $-0x20
popq %rcx
movl %r12d, %eax
cltd
idivl %ecx
movslq %eax, %r14
movl 0x1ffc(%r15,%r14,4), %eax
pushq $0x1
popq %r13
movl %r12d, %ecx
shll %cl, %r13d
movq 0x56f7(%rip), %rdi      # 0x7fd8
btl %r12d, %eax
jae 0x29a8
leaq 0x2792(%rip), %rsi      # 0x5084
callq 0x2170
movl 0x8(%rbx), %esi
movq %rax, %rdi
callq 0x2260
leaq 0x2a31(%rip), %rsi      # 0x533a
movq %rax, %rdi
callq 0x2170
movl 0x78(%rbx), %esi
movq %rax, %rdi
callq 0x2260
movq %rax, %rdi
leaq 0x2a14(%rip), %rsi      # 0x533a
callq 0x2170
movq %rax, %rdi
movl %r12d, %esi
callq 0x2260
leaq 0x271f(%rip), %rsi      # 0x505c
movq %rax, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x20b0
notl %r13d
andl %r13d, 0x1ffc(%r15,%r14,4)
movq 0x98(%rbx), %rdi
movl 0x88(%rbx), %esi
callq 0x3c52
movq 0x98(%rbx), %rdi
movl 0x8(%rbx), %esi
xorl %r15d, %r15d
xorl %edx, %edx
movq -0x30(%rbp), %rcx
callq 0x3b76
movq %rax, 0x80(%rbx)
movl 0x68(%rbx), %ecx
decl %ecx
movl %ecx, 0x68(%rbx)
movl %ecx, 0xc(%rax)
movq 0x98(%rbx), %rdi
movl 0x88(%rbx), %esi
callq 0x3c52
jmp 0x29c0
leaq 0x26c8(%rip), %rsi      # 0x5077
callq 0x2170
movq %rax, %rdi
callq 0x20b0
pushq $0x6c
popq %r15
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/rm_filehandle.h
// Function: RM_FileHandle::updateRec(RM_Record const&)
RC RM_FileHandle::updateRec(const RM_Record &rec) {
    rec.rid.getPageNum(this->pageID);
    this->bufType = bpm->getPage(this->fileID,
                                 this->pageID,
                                 this->index);
    BufType b = this->bufType;
    int tagID ;
    rec.rid.getSlotNum(tagID);

    char *rcd = (char *)(b + recordSize * tagID);
    rec.getData(rcd);
    cout << ">>> update record : (" << fileID << ", " << pageID << ", " << tagID << ") " 
         << string(rcd) << endl;

    bpm->markDirty(index);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r12
movq %rdi, %rbx
movl 0x8(%rsi), %edx
movl %edx, 0x78(%rdi)
movq 0x98(%rdi), %rdi
movl 0x8(%rbx), %esi
leaq 0x88(%rbx), %rcx
callq 0x3b76
movq %rax, 0x80(%rbx)
movslq 0xc(%r12), %r15
movslq 0xc(%rbx), %rcx
imulq %r15, %rcx
leaq (%rax,%rcx,4), %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x3ca4
movq 0x55ab(%rip), %rdi      # 0x7fd8
leaq 0x2666(%rip), %rsi      # 0x509a
callq 0x2170
movl 0x8(%rbx), %esi
movq %rax, %rdi
callq 0x2260
leaq 0x28ef(%rip), %r12      # 0x533a
movq %rax, %rdi
movq %r12, %rsi
callq 0x2170
movl 0x78(%rbx), %esi
movq %rax, %rdi
callq 0x2260
movq %rax, %rdi
movq %r12, %rsi
callq 0x2170
movq %rax, %rdi
movl %r15d, %esi
callq 0x2260
leaq 0x25f6(%rip), %rsi      # 0x5074
movq %rax, %rdi
callq 0x2170
movq %rax, %r15
leaq -0x48(%rbp), %r12
leaq -0x21(%rbp), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x3c68
movq %r15, %rdi
movq %r12, %rsi
callq 0x2150
movq %rax, %rdi
callq 0x20b0
leaq -0x48(%rbp), %rdi
callq 0x20a0
movq 0x98(%rbx), %rdi
movl 0x88(%rbx), %esi
callq 0x3c52
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/rm.h
// Function: RecordManager::closeFile(RM_FileHandle&)
RC RecordManager::closeFile(RM_FileHandle &fileHandle) {
    if (fileHandle.fileName == NULL){
        cout << "close file error." << endl;
        return 104;
    }

    bpm->close();
    pfm->closeFile(fileHandle.fileID);
    fileHandle.cleanFileHandle();
    cout << ">>> close file sucessfully." << endl;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpq $0x0, (%rsi)
je 0x3182
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
callq 0x3f54
movq (%r14), %rdi
movl 0x8(%rbx), %esi
callq 0x3f80
movq %rbx, %rdi
callq 0x24bc
xorl %ebx, %ebx
leaq 0x20ac(%rip), %rsi      # 0x522c
jmp 0x318c
pushq $0x68
popq %rbx
leaq 0x208e(%rip), %rsi      # 0x521a
movq 0x4e45(%rip), %rdi      # 0x7fd8
callq 0x2170
movq %rax, %rdi
callq 0x20b0
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/rm.h
// Function: RecordManager::parseTableStruct[abi:cxx11](char const*)
map<string, string> RecordManager::parseTableStruct(const char *table) {
    string identifier = "";
    vector<string> strList;
    int idx, len = sizeof(table);
    while (idx < len) {
        if ((table[idx] == ' ') || (table[idx] == ',')) {
            if (identifier != "")
                strList.push_back(identifier);
            identifier = "";
        }
        else {
            identifier += table[idx];
        }
        idx ++;
    }
    map<string, string> tableStruct;
    for (idx = 0; idx < strList.size(); ++idx) {
      //  tableStruct.insert(map<string, string>::value_type(strList[idx], strList[++idx])); 
    }

    return tableStruct;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rdi, -0x30(%rbp)
leaq 0x1fb2(%rip), %r15      # 0x5179
leaq -0x70(%rbp), %r12
leaq -0x50(%rbp), %r13
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x3c68
xorps %xmm0, %xmm0
movaps %xmm0, (%r13)
andq $0x0, 0x10(%r13)
xorl %ebx, %ebx
cmpq $0x7, %rbx
ja 0x3238
movzbl (%r14,%rbx), %eax
cmpl $0x2c, %eax
je 0x3201
cmpl $0x20, %eax
jne 0x3228
movq %r12, %rdi
movq %r15, %rsi
callq 0x3ede
testb %al, %al
je 0x321b
movq %r13, %rdi
movq %r12, %rsi
callq 0x3eec
movq %r12, %rdi
movq %r15, %rsi
callq 0x22c0
jmp 0x3233
movsbl %al, %esi
movq %r12, %rdi
callq 0x2130
incq %rbx
jmp 0x31ec
movq -0x30(%rbp), %rbx
leaq 0x8(%rbx), %rax
andl $0x0, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
andq $0x0, 0x28(%rbx)
leaq -0x50(%rbp), %rdi
callq 0x3f28
leaq -0x70(%rbp), %rdi
callq 0x20a0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x3f28
leaq -0x70(%rbp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/rm.h
// Function: RecordManager::destroyFile(char const*)
RC RecordManager::destroyFile(const char *fileName) {
    //cout << "remove :" << fileName << endl;
    if (remove(fileName) == 0) {
        cout << ">>> destroy file " << fileName << " sucessful." << endl;
        return 0;
    }
    else{
        cout << "error remove" << endl;
        return 102;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rsi, %rdi
callq 0x22a0
movq 0x4d28(%rip), %rdi      # 0x7fd8
testl %eax, %eax
je 0x32c5
leaq 0x1e78(%rip), %rsi      # 0x5133
callq 0x2170
pushq $0x66
popq %rbx
jmp 0x32ed
leaq 0x1e49(%rip), %rsi      # 0x5115
callq 0x2170
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2170
leaq 0x1e44(%rip), %rsi      # 0x5127
movq %rax, %rdi
callq 0x2170
xorl %ebx, %ebx
movq %rax, %rdi
callq 0x20b0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/rm_filescan.h
// Function: RM_FileScan::openScan(RM_FileHandle&, int, int, int, int, void*)
RC RM_FileScan::openScan(RM_FileHandle &fileHandle,
                         AttrType      attrType,
                         int           attrLength,
                         int           attrOffset,  
                         CompOp        compOp,
                         void          *value) {
  fh = &fileHandle;
  if (fh->fileName == NULL) {
    cout << "scan file error with file not open." << endl;
    return 106;
  }
  if ((attrOffset+attrLength) >= fh->recordSize) {
    cout << "scan record error with size invalid." << endl;
    return 107;
  }

  this->rid = RID(1, 0);
  this->recordScanNum = 0;
  this->attrType = attrType;
  this->attrLength = attrLength;
  this->attrOffset = attrOffset;
  this->compOp = compOp;
  this->value = value;
  cout << "Open scan" << endl;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, (%rdi)
cmpq $0x0, (%rsi)
je 0x335d
leal (%r8,%rcx), %eax
cmpl 0xc(%rsi), %eax
jge 0x3369
movq $0x1, 0x34(%rdi)
andl $0x0, 0x30(%rdi)
movq 0x10(%rbp), %rax
movl %edx, 0x8(%rdi)
movl %ecx, 0xc(%rdi)
movl %r8d, 0x10(%rdi)
movl %r9d, 0x14(%rdi)
movq %rax, 0x18(%rdi)
xorl %ebx, %ebx
leaq 0x1f36(%rip), %rsi      # 0x5291
jmp 0x3373
pushq $0x6a
popq %rbx
leaq 0x1ee1(%rip), %rsi      # 0x5248
jmp 0x3373
pushq $0x6b
popq %rbx
leaq 0x1ef9(%rip), %rsi      # 0x526c
movq 0x4c5e(%rip), %rdi      # 0x7fd8
callq 0x2170
movq %rax, %rdi
callq 0x20b0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/rm_filescan.h
// Function: RM_FileScan::incRID()
RC RM_FileScan::incRID() {
  if ((this->rid.slotNum+1) < this->fh->recordNumForEachPage) {
    this->rid.slotNum ++;
  }
  else{
    this->rid.pageNum ++;
    this->rid.slotNum = 0;
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x38(%rdi), %eax
incl %eax
movq (%rdi), %rcx
cmpl 0x64(%rcx), %eax
jl 0x3718
incl 0x34(%rdi)
xorl %eax, %eax
movl %eax, 0x38(%rdi)
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/../bufmanager/BufPageManager.h
// Function: BufPageManager::getPage(int, int, int&)
BufType getPage(int fileID, int pageID, int& index) {
		index = hash->findIndex(fileID, pageID);
		if (index != -1) {
			access(index);
			return addr[index];
		} else {
			BufType b = fetchPage(fileID, pageID, index);
			fileManager->readPage(fileID, pageID, b, 0);
			return b;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x40b0
movl %eax, (%r14)
movq %rbx, %rdi
cmpl $-0x1, %eax
je 0x3bb5
movl %eax, %esi
callq 0x3c30
movq 0x28(%rbx), %rax
movslq (%r14), %rcx
movq (%rax,%rcx,8), %r14
jmp 0x3bdb
movl %r12d, %esi
movl %r15d, %edx
movq %r14, %rcx
callq 0x40f6
movq %rax, %r14
movq 0x8(%rbx), %rdi
movl %r12d, %esi
movl %r15d, %edx
movq %rax, %rcx
xorl %r8d, %r8d
callq 0x41a8
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/rm_record.h
// Function: RM_Record::setData(char const*)
RC setData(const char *pData) {
        if (this->data != NULL) {
            delete [] this->data;
            this->data = NULL;
        }
        if (pData == NULL)
            return 0;
        int len = strlen(pData);
        this->data = new char[len];
        strcpy(this->data, pData);
        return 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3c06
callq 0x21d0
andq $0x0, (%r14)
testq %rbx, %rbx
je 0x3c29
movq %rbx, %rdi
callq 0x2090
movslq %eax, %rdi
callq 0x2030
movq %rax, (%r14)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2160
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/rm_record.h
// Function: RM_Record::getData(char*) const
RC getData(char *pData) const{
        if (data == NULL) {
            cout << "Error with record, get data func" << endl;
        }
    	strcpy(pData, data);
    	return 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq (%rdi), %rsi
testq %rsi, %rsi
jne 0x3cd7
movq %rdi, %r14
movq 0x4318(%rip), %rdi      # 0x7fd8
leaq 0x1676(%rip), %rsi      # 0x533d
callq 0x2170
movq %rax, %rdi
callq 0x20b0
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x2160
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/../bufmanager/BufPageManager.h
// Function: BufPageManager::BufPageManager(FileManager*)
BufPageManager(FileManager* fm) {
		int c = CAP;
		int m = MOD;
		last = -1;
		fileManager = fm;
		//bpl = new MyLinkList(CAP, MAX_FILE_NUM);
		dirty = new bool[CAP];
		addr = new BufType[CAP];
		hash = new MyHashMap(c, m);
	    replace = new FindReplace(c);
		for (int i = 0; i < CAP; ++ i) {
			dirty[i] = false;
			addr[i] = NULL;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
orl $-0x1, (%rdi)
movq %rsi, 0x8(%rdi)
movl $0xea60, %edi           # imm = 0xEA60
callq 0x2030
movq %rax, 0x20(%rbx)
movl $0x75300, %edi          # imm = 0x75300
callq 0x2030
movq %rax, 0x28(%rbx)
pushq $0x18
popq %rdi
callq 0x2190
movq %rax, %r14
movq %rax, %rdi
movl $0xea60, %esi           # imm = 0xEA60
movl $0xea60, %edx           # imm = 0xEA60
callq 0x4508
movq %r14, 0x10(%rbx)
pushq $0x10
popq %rdi
callq 0x2190
movq %rax, %r14
movq %rax, %rdi
movl $0xea60, %esi           # imm = 0xEA60
callq 0x459a
movq %r14, 0x18(%rbx)
xorl %eax, %eax
cmpq $0xea60, %rax           # imm = 0xEA60
je 0x3e10
movq 0x20(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movq 0x28(%rbx), %rcx
andq $0x0, (%rcx,%rax,8)
incq %rax
jmp 0x3df2
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
pushq $0x10
jmp 0x3e21
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x21a0
movq %rbx, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/../bufmanager/../fileio/FileManager.h
// Function: FileManager::openFile(char const*, int&)
bool openFile(const char* name, int& fileID) {
		fileID = fm->findLeftOne();
		fm->setBit(fileID, 0);
		_openFile(name, fileID);
		return true;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x200(%rdi), %rdi
callq 0x46e0
movl %eax, (%rbx)
movq 0x200(%r15), %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x472a
movl (%rbx), %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x4764
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/../bufmanager/../fileio/FileManager.h
// Function: FileManager::writePage(int, int, unsigned int*, int)
int writePage(int fileID, int pageID, BufType buf, int off) {
		int f = fd[fileID];
		off_t offset = pageID;
		offset = (offset << PAGE_SIZE_IDX);
		off_t error = lseek(f, offset, SEEK_SET);
		if (error != offset) {
			return -1;
		}
		BufType b = buf + off;
		error = write(f, (void*) b, PAGE_SIZE);
		return 0;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r12d
movq %rcx, %r15
movslq %esi, %rax
movl (%rdi,%rax,4), %r14d
movslq %edx, %r13
shlq $0xd, %r13
xorl %ebx, %ebx
movl %r14d, %edi
movq %r13, %rsi
xorl %edx, %edx
callq 0x22b0
cmpq %r13, %rax
jne 0x3eca
movslq %r12d, %rax
leaq (%r15,%rax,4), %rsi
movl $0x2000, %edx           # imm = 0x2000
movl %r14d, %edi
callq 0x2060
jmp 0x3ecd
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/../bufmanager/../fileio/FileManager.h
// Function: FileManager::closeFile(int)
int closeFile(int fileID) {
		fm->setBit(fileID, 1);
		int f = fd[fileID];
		close(f);
		return 0;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq 0x200(%rdi), %rdi
pushq $0x1
popq %rdx
callq 0x472a
movslq %ebx, %rax
movl (%r14,%rax,4), %edi
callq 0x22d0
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/rm_record.h
// Function: RM_Record::clean()
RC clean() {
        if (this->data != NULL) {
            delete [] this->data;
            this->data = NULL;
        }
        return 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3fdc
callq 0x21d0
andq $0x0, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/../bufmanager/../utils/MyHashMap.h
// Function: MyHashMap::findIndex(int, int)
int findIndex(int k1, int k2) {
		int h = hash(k1, k2);
		int p = list->getFirst(h);
		while (!list->isHead(p)) {
			if (a[p].key1 == k1 && a[p].key2 == k2) {
				/*
				list.del(p);
				list.insertFirst(p);
				*/
				return p;
			}
			p = list->next(p);
		}
		return -1;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edx, %ecx
leal (%rcx,%rsi), %eax
cltd
idivl 0x4(%rdi)
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rdi
movq 0x8(%rax), %r8
movl (%rax), %r9d
addl %r9d, %edx
movslq %edx, %r10
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl (%r8,%r10,8), %eax
cmpl %eax, %r9d
jle 0x40f2
movslq %eax, %r10
cmpl %esi, (%rdi,%r10,8)
jne 0x40d7
cmpl %ecx, 0x4(%rdi,%r10,8)
jne 0x40d7
jmp 0x40f4
movl %edx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/../bufmanager/BufPageManager.h
// Function: BufPageManager::fetchPage(int, int, int&)
BufType fetchPage(int typeID, int pageID, int& index) {
		BufType b;
		index = replace->find();
		b = addr[index];
		if (b == NULL) {
			b = allocMem();
			addr[index] = b;
		} else {
			if (dirty[index]) {
				int k1, k2;
				hash->getKeys(index, k1, k2);
				fileManager->writePage(k1, k2, b, 0);
				dirty[index] = false;
			}
		}
		hash->replace(index, typeID, pageID);
		return b;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movl %edx, -0x30(%rbp)
movl %esi, -0x2c(%rbp)
movq %rdi, %r15
movq 0x18(%rdi), %rdi
callq 0x4208
movl %eax, %r13d
movq %rbx, -0x38(%rbp)
movl %eax, (%rbx)
movq 0x28(%r15), %rbx
movslq %eax, %r14
movq (%rbx,%r14,8), %r12
testq %r12, %r12
je 0x4172
movq 0x20(%r15), %rax
cmpb $0x1, (%rax,%r14)
jne 0x4183
movq 0x8(%r15), %rdi
movq 0x10(%r15), %rax
movq 0x10(%rax), %rax
movl (%rax,%r14,8), %esi
movl 0x4(%rax,%r14,8), %edx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x3e7e
movq 0x20(%r15), %rax
movq -0x38(%rbp), %rcx
movslq (%rcx), %r13
movb $0x0, (%rax,%r13)
jmp 0x4183
movl $0x2000, %edi           # imm = 0x2000
callq 0x2030
movq %rax, %r12
movq %rax, (%rbx,%r14,8)
movq 0x10(%r15), %rdi
movl %r13d, %esi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
callq 0x423e
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/../bufmanager/FindReplace.h
// Function: FindReplace::find()
int find() {
		int index = list->getFirst(0);
		list->del(index);
		list->insert(0, index);
		return index;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x8(%rdi), %rax
movslq (%rdi), %rcx
movl (%rax,%rcx,8), %r14d
movl %r14d, %esi
callq 0x4284
movq (%rbx), %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0x42ae
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/../bufmanager/../utils/MyHashMap.h
// Function: MyHashMap::replace(int, int, int)
void replace(int index, int k1, int k2) {
		int h = hash(k1, k2);
		//cout << h << endl;
		list->insertFirst(h, index);
		a[index].key1 = k1;
		a[index].key2 = k2;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r12
leal (%rbx,%r14), %eax
cltd
idivl 0x4(%rdi)
movq 0x8(%rdi), %rdi
movl %edx, %esi
movl %r15d, %edx
callq 0x42f6
movq 0x10(%r12), %rax
movslq %r15d, %rcx
movl %r14d, (%rax,%rcx,8)
movl %ebx, 0x4(%rax,%rcx,8)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/../bufmanager/../utils/MyLinkList.h
// Function: MyLinkList::del(int)
void del(int index) {
		if (a[index].prev == index) {
			return;
		}
		link(a[index].prev, a[index].next);
		a[index].prev = index;
		a[index].next = index;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rax
movslq %esi, %rcx
movl 0x4(%rax,%rcx,8), %edx
cmpl %ecx, %edx
je 0x42ac
movslq %edx, %rsi
movslq (%rax,%rcx,8), %rdi
movl %edi, (%rax,%rsi,8)
movl %edx, 0x4(%rax,%rdi,8)
movl %ecx, 0x4(%rax,%rcx,8)
movl %ecx, (%rax,%rcx,8)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/../bufmanager/../utils/MyLinkList.h
// Function: MyLinkList::insert(int, int)
void insert(int listID, int ele) {
		del(ele);
		int node = listID + cap;
		int prev = a[node].prev;
		link(prev, ele);
		link(ele, node);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
movl %edx, %esi
callq 0x4284
movslq (%r15), %rax
movslq %r14d, %rcx
addq %rax, %rcx
movq 0x8(%r15), %rax
movslq 0x4(%rax,%rcx,8), %rdx
movl %ebx, (%rax,%rdx,8)
movslq %ebx, %rsi
movl %edx, 0x4(%rax,%rsi,8)
movl %ecx, (%rax,%rsi,8)
movl %esi, 0x4(%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/../bufmanager/../utils/MyLinkList.h
// Function: MyLinkList::insertFirst(int, int)
void insertFirst(int listID, int ele) {
		del(ele);
		int node = listID + cap;
		int next = a[node].next;
		link(node, ele);
		link(ele, next);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
movl %edx, %esi
callq 0x4284
movslq (%r15), %rax
movslq %r14d, %rcx
addq %rax, %rcx
movq 0x8(%r15), %rax
movslq (%rax,%rcx,8), %rdx
movl %ebx, (%rax,%rcx,8)
movslq %ebx, %rsi
movl %ecx, 0x4(%rax,%rsi,8)
movl %edx, (%rax,%rsi,8)
movl %esi, 0x4(%rax,%rdx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/../bufmanager/../utils/MyBitMap.h
// Function: MyBitMap::MyBitMap(int, unsigned int)
MyBitMap(int cap, uint k) {
		size = (cap >> BIAS);
		data = new uint[size];
		uint fill = 0;
		if (k == 1) {
			fill = 0xffffffff;
		}
		for (int i = 0; i < size; ++ i) {
			data[i] = fill;
		}
		init();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
sarl $0x5, %r15d
movl %r15d, 0x8(%rdi)
leaq (,%r15,4), %rax
testl %r15d, %r15d
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x2030
movq %rax, (%rbx)
xorl %ecx, %ecx
cmpl $0x1, %r14d
sete %cl
negl %ecx
movslq %r15d, %rdx
xorl %esi, %esi
cmpq %rdx, %rsi
jge 0x43a0
movl %ecx, (%rax,%rsi,4)
incq %rsi
jmp 0x4393
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x43b2
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/../bufmanager/../utils/MyBitMap.h
// Function: MyBitMap::init()
void init() {
		rootLevel = 0;
		int s = size;
		rootIndex = 0;
		while (s > LEAF_BIT) {
			int wordNum = (s >> BIAS);
			//cout << rootIndex << " " << s << " " << wordNum << endl;
			for (int i = 0; i < wordNum; ++ i) {
				uint w = 0;
				//cout << "---------------------------------------" << endl;
				for (int j = 0; j < LEAF_BIT; ++ j) {
					//cout << i << endl;
					uint k = (1 << j);
					uint c = childWord(rootIndex, s, i, j);
					if (c != 0) {
						w += k;
					}
				}
				inner[rootIndex + i] = w;
			}
			rootLevel ++;
			rootIndex += wordNum;
			s = wordNum;
		}
		rootBit = s;
		int i = 0;
		uint w = 0;
		for (int j = 0; j < rootBit; ++ j) {
			uint k = (1 << j);
			uint c = childWord(rootIndex, s, i, j);
			if (c != 0) {
				w += k;
			}
		}
		inner[rootIndex] = w;
		innerMask = getMask(BIAS);
		rootMask = getMask(s);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
andl $0x0, 0x10(%rdi)
movl 0x8(%rdi), %r14d
leaq 0x18(%rdi), %rdx
xorl %edi, %edi
pushq $0x1
popq %rax
movl %edi, 0x14(%rbx)
cmpl $0x21, %r14d
jl 0x445c
movl %r14d, %esi
shrl $0x5, %esi
negl %r14d
xorl %edi, %edi
xorl %r8d, %r8d
cmpq %rsi, %r8
je 0x444c
movslq 0x14(%rbx), %r9
leal (%r9,%r14), %r10d
movq (%rbx), %r11
addq %rdi, %r11
xorl %ecx, %ecx
xorl %r15d, %r15d
cmpq $0x20, %rcx
je 0x4438
leal (%r10,%rcx), %r12d
testl %r9d, %r9d
movslq %r12d, %r12
leaq (%rdx,%r12,4), %r12
cmoveq %r11, %r12
movl %eax, %r13d
shll %cl, %r13d
movl (%r12), %r12d
testl %r12d, %r12d
cmovel %r12d, %r13d
addl %r13d, %r15d
incq %rcx
addq $0x4, %r11
jmp 0x4403
addq %r8, %r9
movl %r15d, (%rdx,%r9,4)
incq %r8
addl $0x20, %r14d
subq $-0x80, %rdi
jmp 0x43eb
incl 0x10(%rbx)
movl 0x14(%rbx), %edi
addl %esi, %edi
movl %esi, %r14d
jmp 0x43d4
movl %r14d, 0xc(%rbx)
movq (%rbx), %rdx
movl %edi, %ecx
subl %r14d, %ecx
movslq %ecx, %r8
xorl %ecx, %ecx
testl %r14d, %r14d
movl $0x0, %esi
cmovgl %r14d, %esi
leaq (%rbx,%r8,4), %r8
addq $0x18, %r8
xorl %r9d, %r9d
cmpq %rcx, %rsi
je 0x44b2
testl %edi, %edi
movq %r8, %r10
cmoveq %rdx, %r10
movl %eax, %r11d
shll %cl, %r11d
movl (%r10), %r10d
testl %r10d, %r10d
cmovel %r10d, %r11d
addl %r11d, %r9d
incq %rcx
addq $0x4, %rdx
addq $0x4, %r8
jmp 0x4484
movslq %edi, %rax
movl %r9d, 0x18(%rbx,%rax,4)
pushq $0x5
popq %rdi
callq 0x44e6
movl %eax, 0x124(%rbx)
movl %r14d, %edi
callq 0x44e6
movl %eax, 0x128(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/../bufmanager/../utils/MyBitMap.h
// Function: MyBitMap::getMask(int)
static uint getMask(int k) {
		uint s = 0;
		for (int i = 0; i < k; ++ i) {
			s += (1 << i);
		}
		return s;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
testl %edi, %edi
cmovlel %eax, %edi
movl $0x1, %edx
xorl %ecx, %ecx
cmpl %ecx, %edi
je 0x4506
movl %edx, %esi
shll %cl, %esi
addl %esi, %eax
incl %ecx
jmp 0x44f8
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/./rcdmana/../bufmanager/../utils/MyHashMap.h
// Function: MyHashMap::MyHashMap(int, int)
MyHashMap(int c, int m) {
		CAP_ = c;
		MOD_ = m;
		a = new DataNode[c];
		for (int i = 0; i < CAP_; ++ i) {
			a[i].key1 = -1;
			a[i].key2 = -1;
		}
		list = new MyLinkList(CAP_, MOD_);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movl %esi, %eax
shlq $0x3, %rax
xorl %r12d, %r12d
testl %esi, %esi
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
movl $0x0, %r13d
cmovgl %esi, %r13d
callq 0x2030
movq %rax, 0x10(%rbx)
cmpq %r12, %r13
je 0x4558
orq $-0x1, (%rax,%r12,8)
incq %r12
jmp 0x4549
pushq $0x10
popq %rdi
callq 0x2190
movq %rax, %r12
movq %rax, %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x4606
movq %r12, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x10
popq %rsi
movq %r12, %rdi
callq 0x21a0
movq %rbx, %rdi
callq 0x2270