LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: MITRECND[P]snugglefish/src/file.cpp
// Function: snugglefish::file::create(unsigned int)
bool file::create(mode_t filemode){

    if (this->bufferparam > 0){
        this->buffersize = this->bufferparam;
        this->buffer = (char*) malloc(buffersize);
    }
    this->fd = ::open(this->filename, O_RDWR | O_CREAT, filemode);
    this->readonly = false;

    if (this->fd <= 0){
        cerr << "Unable to Create File: " << filename << " -- Error: " << strerror(errno) << endl;
        throw runtime_error("Creating File");
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, 0x38(%rax)
jbe 0x17d8e
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, 0x28(%rax)
movq 0x28(%rax), %rdi
callq 0xe440
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movl -0xc(%rbp), %edx
movl $0x42, %esi
movb $0x0, %al
callq 0xe240
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0xc(%rax)
movb $0x0, 0x8(%rax)
cmpl $0x0, 0xc(%rax)
jg 0x17e67
movq 0x9226(%rip), %rdi      # 0x20fe8
leaq 0x2997(%rip), %rsi      # 0x1a760
callq 0xe2f0
movq %rax, %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rsi
callq 0xe2f0
movq %rax, %rdi
leaq 0x22c1(%rip), %rsi      # 0x1a0a8
callq 0xe2f0
movq %rax, -0x38(%rbp)
callq 0xe050
movl (%rax), %edi
callq 0xe0d0
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0xe2f0
movq %rax, %rdi
movq 0x917e(%rip), %rsi      # 0x20f90
callq 0xe340
movl $0x10, %edi
callq 0xe170
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
leaq 0x2946(%rip), %rsi      # 0x1a778
callq 0xe100
jmp 0x17e39
movq -0x30(%rbp), %rdi
movq 0x91ac(%rip), %rsi      # 0x20ff0
movq 0x915d(%rip), %rdx      # 0x20fa8
callq 0xe5b0
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0xe230
jmp 0x17e71
movb $0x1, %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0xe5d0
nopw (%rax,%rax)
// File: MITRECND[P]snugglefish/src/file.cpp
// Function: snugglefish::file::get_size()
const size_t file::get_size(){
    struct stat st;
    size_t filesize = 0;
    if (stat(this->filename, &st) == 0){
       filesize = st.st_size;
    }else{
        throw runtime_error("Statting File");
    } 

    return filesize;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, -0xa0(%rbp)
movq (%rax), %rdi
leaq -0x98(%rbp), %rsi
callq 0xe2e0
cmpl $0x0, %eax
jne 0x1808f
movq -0x68(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0x180ee
movl $0x10, %edi
callq 0xe170
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xb8(%rbp)
leaq 0x27c9(%rip), %rsi      # 0x1a876
callq 0xe100
jmp 0x180b4
movq -0xb8(%rbp), %rdi
movq 0x8f2e(%rip), %rsi      # 0x20ff0
movq 0x8edf(%rip), %rdx      # 0x20fa8
callq 0xe5b0
movq -0xb8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
callq 0xe230
jmp 0x180fe
movq -0xa0(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
movq -0xa8(%rbp), %rdi
callq 0xe5d0
nopw (%rax,%rax)
// File: MITRECND[P]snugglefish/src/file.cpp
// Function: snugglefish::file::mmap()
uint8_t* file::mmap(){
    //Open the file first 
    if (this->fd == 0)
        this->open('r');

    if (!this->size)
        return NULL;

    this->mmapFile = (uint8_t*) ::mmap(NULL, this->size, PROT_READ, MAP_SHARED, this->fd, 0);

    if(this->mmapFile == MAP_FAILED){
        cerr << "Error Loading Map for File : " << this->filename<< " -- Error: " << strerror(errno) << endl;
        throw runtime_error("Loading Map");
    }

    return this->mmapFile;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, 0xc(%rax)
jne 0x18138
movq -0x28(%rbp), %rdi
movl $0x72, %esi
callq 0x17e80
movq -0x28(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x18150
movq $0x0, -0x8(%rbp)
jmp 0x18244
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rsi
movl 0xc(%rax), %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, %ecx
movq %r9, %rdi
movl %ecx, %edx
callq 0xe5f0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq $-0x1, %rcx
cmpq %rcx, 0x10(%rax)
jne 0x18238
movq 0x8e55(%rip), %rdi      # 0x20fe8
leaq 0x262b(%rip), %rsi      # 0x1a7c5
callq 0xe2f0
movq %rax, %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rsi
callq 0xe2f0
movq %rax, %rdi
leaq 0x1ef0(%rip), %rsi      # 0x1a0a8
callq 0xe2f0
movq %rax, -0x38(%rbp)
callq 0xe050
movl (%rax), %edi
callq 0xe0d0
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0xe2f0
movq %rax, %rdi
movq 0x8dad(%rip), %rsi      # 0x20f90
callq 0xe340
movl $0x10, %edi
callq 0xe170
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
leaq 0x25e0(%rip), %rsi      # 0x1a7e3
callq 0xe100
jmp 0x1820a
movq -0x30(%rbp), %rdi
movq 0x8ddb(%rip), %rsi      # 0x20ff0
movq 0x8d8c(%rip), %rdx      # 0x20fa8
callq 0xe5b0
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0xe230
jmp 0x1824e
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0xe5d0
nopw (%rax,%rax)
// File: MITRECND[P]snugglefish/src/file.cpp
// Function: snugglefish::file::flush()
bool file::flush(){
    if(this->readonly){
        return true;
    }

    if (this->bufferused){
        lseek(this->fd, 0, SEEK_END);
        this->real_write(this->fd, (uint8_t*) this->buffer, this->bufferused * sizeof(char));
        this->bufferused = 0;
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
testb $0x1, 0x8(%rax)
je 0x18280
movb $0x1, -0x1(%rbp)
jmp 0x182c8
movq -0x18(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x182c4
movq -0x18(%rbp), %rax
movl 0xc(%rax), %edi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0xe630
movq -0x18(%rbp), %rdi
movl 0xc(%rdi), %esi
movq 0x20(%rdi), %rdx
movq 0x30(%rdi), %rcx
shlq $0x0, %rcx
callq 0x182e0
movq -0x18(%rbp), %rax
movq $0x0, 0x30(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: MITRECND[P]snugglefish/src/file.cpp
// Function: snugglefish::file::real_write(int, unsigned char*, unsigned long)
bool file::real_write(int fd, uint8_t* data, size_t length){
        ssize_t written = ::write(fd, data, length); 
        if (written == -1){//TODO what if partial write?
            cerr << "Unable to write to file: " << this->filename << " -- Error: " << strerror(errno) << endl;
            throw runtime_error("Write Error");
        }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xe0e0
movq %rax, -0x28(%rbp)
cmpq $-0x1, -0x28(%rbp)
jne 0x183ca
movq 0x8cc3(%rip), %rdi      # 0x20fe8
leaq 0x24e5(%rip), %rsi      # 0x1a811
callq 0xe2f0
movq %rax, %rdi
movq -0x40(%rbp), %rax
movq (%rax), %rsi
callq 0xe2f0
movq %rax, %rdi
leaq 0x1d5e(%rip), %rsi      # 0x1a0a8
callq 0xe2f0
movq %rax, -0x50(%rbp)
callq 0xe050
movl (%rax), %edi
callq 0xe0d0
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0xe2f0
movq %rax, %rdi
movq 0x8c1b(%rip), %rsi      # 0x20f90
callq 0xe340
movl $0x10, %edi
callq 0xe170
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x48(%rbp)
leaq 0x2496(%rip), %rsi      # 0x1a82b
callq 0xe100
jmp 0x1839c
movq -0x48(%rbp), %rdi
movq 0x8c49(%rip), %rsi      # 0x20ff0
movq 0x8bfa(%rip), %rdx      # 0x20fa8
callq 0xe5b0
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0xe230
jmp 0x183d4
movb $0x1, %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0xe5d0
nopl (%rax)
// File: MITRECND[P]snugglefish/src/file.cpp
// Function: snugglefish::file::write(unsigned char*, unsigned long)
bool file::write(uint8_t * data, size_t length){
    if (this->readonly){
        throw runtime_error("Write command on read-only file");
    }

    if((this->bufferused + (length)) > this->buffersize) {
        this->flush();

        if (length < this->buffersize){
            memcpy(this->buffer, data, length);
            this->bufferused = length;
        }else{  
            //Data being passed in is larger than buffer, write out directly
            //Seek to the end of the file first
            lseek(this->fd, 0, SEEK_END);
            this->real_write(this->fd, data, length);
        }
    }else{ // just buffer it up
        memcpy(this->buffer + this->bufferused, data, length);
        this->bufferused += length;
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
testb $0x1, 0x8(%rax)
je 0x18455
movl $0x10, %edi
callq 0xe170
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
leaq 0x241a(%rip), %rsi      # 0x1a837
callq 0xe100
jmp 0x18424
movq -0x38(%rbp), %rdi
movq 0x8bc1(%rip), %rsi      # 0x20ff0
movq 0x8b72(%rip), %rdx      # 0x20fa8
callq 0xe5b0
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0xe230
jmp 0x184ff
movq -0x30(%rbp), %rcx
movq 0x30(%rcx), %rax
addq -0x18(%rbp), %rax
cmpq 0x28(%rcx), %rax
jbe 0x184cc
movq -0x30(%rbp), %rdi
callq 0x18260
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
cmpq 0x28(%rcx), %rax
jae 0x184a1
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xe290
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x30(%rax)
jmp 0x184ca
movq -0x30(%rbp), %rax
movl 0xc(%rax), %edi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0xe630
movq -0x30(%rbp), %rdi
movl 0xc(%rdi), %esi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x182e0
jmp 0x184f5
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rdi
addq 0x30(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xe290
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
movb $0x1, %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0xe5d0
nopl (%rax,%rax)
// File: MITRECND[P]snugglefish/src/file.cpp
// Function: snugglefish::file::write_at(int, unsigned char*, unsigned long)
bool file::write_at(int32_t location, uint8_t * data, size_t length){
    if (this->readonly){
        throw runtime_error("Write command on reaodnly file");
    }

    //Flush before writing at locations
    flush();
    lseek(this->fd, location, SEEK_SET);
    this->real_write(this->fd, data, length * sizeof(uint8_t));

    return true;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
testb $0x1, 0x8(%rax)
je 0x18585
movl $0x10, %edi
callq 0xe170
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
leaq 0x2307(%rip), %rsi      # 0x1a857
callq 0xe100
jmp 0x18557
movq -0x40(%rbp), %rdi
movq 0x8a8e(%rip), %rsi      # 0x20ff0
movq 0x8a3f(%rip), %rdx      # 0x20fa8
callq 0xe5b0
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0xe230
jmp 0x185c2
movq -0x38(%rbp), %rdi
callq 0x18260
movq -0x38(%rbp), %rax
movl 0xc(%rax), %edi
movslq -0xc(%rbp), %rsi
xorl %edx, %edx
callq 0xe630
movq -0x38(%rbp), %rdi
movl 0xc(%rdi), %esi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
shlq $0x0, %rcx
callq 0x182e0
movb $0x1, %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0xe5d0
nopl (%rax,%rax)
// File: MITRECND[P]snugglefish/src/file.cpp
// Function: snugglefish::file::exists()
const bool file::exists(){
    struct stat st;
    if(stat(this->filename, &st) == 0){
        return true;
    }else{
        return false;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xe2e0
cmpl $0x0, %eax
jne 0x1867d
movb $0x1, -0x1(%rbp)
jmp 0x18681
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xa0, %rsp
popq %rbp
retq
nop
// File: MITRECND[P]snugglefish/src/indexSet.cpp
// Function: snugglefish::indexSet::~indexSet()
indexSet::~indexSet(){
    if (this->indexFile){
        this->indexFile->close();
        delete this->indexFile;
    }

    if (this->nGramFile){
        this->nGramFile->close();
        delete this->nGramFile;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, (%rax)
je 0x18792
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x17bd0
jmp 0x18768
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x18790
movq -0x18(%rbp), %rdi
callq 0x17b50
movq -0x18(%rbp), %rdi
movl $0x40, %esi
callq 0xe310
jmp 0x18792
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x187d7
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x17bd0
jmp 0x187ac
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x187d5
movq -0x20(%rbp), %rdi
callq 0x17b50
movq -0x20(%rbp), %rdi
movl $0x40, %esi
callq 0xe310
jmp 0x187d7
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0xe1d0
addq $0x20, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x105e0
nopw %cs:(%rax,%rax)
// File: MITRECND[P]snugglefish/src/indexSet.cpp
// Function: snugglefish::indexSet::close()
void indexSet::close(){
    if (this->indexFile){
        this->indexFile->close();
        delete this->indexFile;
        this->indexFile = NULL;
    }
    if (this->nGramFile){
        this->nGramFile->close();
        delete this->nGramFile;
        this->nGramFile = NULL;
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, (%rax)
je 0x18859
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x17bd0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x1884e
movq -0x18(%rbp), %rdi
callq 0x17b50
movq -0x18(%rbp), %rdi
movl $0x40, %esi
callq 0xe310
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x188a6
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x17bd0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x1889a
movq -0x20(%rbp), %rdi
callq 0x17b50
movq -0x20(%rbp), %rdi
movl $0x40, %esi
callq 0xe310
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: MITRECND[P]snugglefish/src/indexSet.cpp
// Function: snugglefish::indexSet::addNGrams(unsigned int, std::__cxx11::list<unsigned int, std::allocator<unsigned int>>*)
void indexSet::addNGrams(uint32_t ngram, list<ngram_t_fidtype>* files){
    if (!writable || !nGramFile){
        //TODO
    }

    uint32_t size = files->size();
    uint64_t off =  offset;
    uint32_t difference = sizeof(ngram_t_fidtype) * size;

    if (!size){
        off = 0;
    }

    //Pre-emptively add the index information, i.e, offset, numFiles
    addIndexData(off, size);

    while(size > 0){
        nGramFile->write((uint8_t*) (&(files->front())), sizeof(ngram_t_fidtype));
        files->pop_front();
        size--;
    } 

    offset =  offset + difference;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
testb $0x1, 0x48(%rax)
je 0x1907c
movq -0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x1907e
jmp 0x1907e
movq -0x18(%rbp), %rdi
callq 0x15a20
movq %rax, %rcx
movq -0x38(%rbp), %rax
movl %ecx, -0x1c(%rbp)
movq 0x60(%rax), %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
shlq $0x2, %rax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x190b1
movq $0x0, -0x28(%rbp)
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x19000
cmpl $0x0, -0x1c(%rbp)
jbe 0x19101
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x191f0
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x183e0
movq -0x18(%rbp), %rdi
callq 0x19220
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x190c1
movq -0x38(%rbp), %rax
movq 0x60(%rax), %rcx
movl -0x2c(%rbp), %edx
addq %rdx, %rcx
movq %rcx, 0x60(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: MITRECND[P]snugglefish/src/indexSet.cpp
// Function: snugglefish::indexSet::updateNumFiles(unsigned int)
void indexSet::updateNumFiles(ngram_t_numfiles count){
    if (!writable || !indexFile){
        //TODO
    }
    //TODO cleanup offset
    indexFile->write_at(INDEX_HEADER_SIZE - INDEX_HEADER_NUM_FILES_FIELD, (uint8_t*) (&count), INDEX_HEADER_NUM_FILES_FIELD);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
testb $0x1, 0x48(%rax)
je 0x19147
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x19149
jmp 0x19149
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl $0x6, %esi
leaq -0xc(%rbp), %rdx
movl $0x4, %ecx
callq 0x18510
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: MITRECND[P]snugglefish/src/indexSet.cpp
// Function: snugglefish::indexSet::getNGrams(unsigned long, unsigned long*)
ngram_t_fidtype* indexSet::getNGrams(uint64_t ngram, size_t* count){
    index_entry* index_table = (index_entry*) (indexEntries + (ngram * (INDEX_ENTRY_SIZE)));
    *count = index_table->num_files;
    ngram_t_fidtype* ptr = (ngram_t_fidtype*) (nGramMap + index_table->offset);

    return ptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
imulq $0xc, -0x10(%rbp), %rdx
addq %rdx, %rcx
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %ecx
movl %ecx, %edx
movq -0x18(%rbp), %rcx
movq %rdx, (%rcx)
movq 0x18(%rax), %rax
movq -0x20(%rbp), %rcx
addq (%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: MITRECND[P]snugglefish/src/smFile.cpp
// Function: snugglefish::smFile::flush()
bool smFile::flush(){
    if (this->readonly)
        return true;

    file::flush();
    write_at((int32_t) FILID_NUM_FILES_OFFSET, (uint8_t*) &numFiles, (size_t) NUM_FILES_FIELD);

    return true;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
testb $0x1, 0x8(%rax)
je 0x19310
movb $0x1, -0x1(%rbp)
jmp 0x19337
movq -0x18(%rbp), %rdi
callq 0x18260
movq -0x18(%rbp), %rdi
movq %rdi, %rdx
addq $0x4c, %rdx
movl $0xc, %esi
movl $0x4, %ecx
callq 0x18510
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: MITRECND[P]snugglefish/src/smFile.cpp
// Function: snugglefish::smFile::create(unsigned short)
void smFile::create(ngram_t_fnlength maxfnLength){
    if (this->exists()){
        cerr << "Unable to create file: " << this->filename << " -- Already Exists" << endl;
        throw runtime_error("Creating File");
    }

    //Create the File
    file::create();
    
    this->endian_check = ENDIAN_CHECK;
    this->version = VERSION;
    this->maxFileNameLength = maxfnLength;
    
    ngram_t_indexcount four_byte_zero = this->numIndexFiles = 0;
    ngram_t_fidtype eight_byte_zero = this->numFiles = 0;

    //Write standard header
    write((uint8_t*) (&(this->endian_check)), ENDIAN_CHECK_FIELD);
    write((uint8_t*) (&(this->version)), VERSION_FIELD);
    write((uint8_t*) (&(this->ngramLength)), NGRAM_SIZE_FIELD);
    write((uint8_t*) (&(this->maxFileNameLength)), MAX_FILENAME_LENGTH_FIELD);
    write((uint8_t*) &four_byte_zero, NUM_INDEX_FILES_FIELD);
    write((uint8_t*) &eight_byte_zero, NUM_FILES_FIELD);

    fileBuffer = (char*) malloc((maxFileNameLength + 1)* sizeof(char));

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
callq 0x18650
testb $0x1, %al
jne 0x19379
jmp 0x1940c
movq 0x7c68(%rip), %rdi      # 0x20fe8
leaq 0x1566(%rip), %rsi      # 0x1a8ed
callq 0xe2f0
movq %rax, %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
callq 0xe2f0
movq %rax, %rdi
leaq 0x1560(%rip), %rsi      # 0x1a905
callq 0xe2f0
movq %rax, %rdi
movq 0x7bdc(%rip), %rsi      # 0x20f90
callq 0xe340
movl $0x10, %edi
callq 0xe170
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
leaq 0x13a4(%rip), %rsi      # 0x1a778
callq 0xe100
jmp 0x193db
movq -0x38(%rbp), %rdi
movq 0x7c0a(%rip), %rsi      # 0x20ff0
movq 0x7bbb(%rip), %rdx      # 0x20fa8
callq 0xe5b0
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0xe230
jmp 0x194e9
movq -0x30(%rbp), %rdi
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x17d50
movq -0x30(%rbp), %rdi
movl $0x1234567, 0x40(%rdi)  # imm = 0x1234567
movb $0x1, 0x44(%rdi)
movw -0xa(%rbp), %ax
movw %ax, 0x46(%rdi)
movl $0x0, 0x48(%rdi)
movl $0x0, -0x20(%rbp)
movl $0x0, 0x4c(%rdi)
movl $0x0, -0x24(%rbp)
movq %rdi, %rsi
addq $0x40, %rsi
movl $0x4, %edx
callq 0x183e0
movq -0x30(%rbp), %rdi
movq %rdi, %rsi
addq $0x44, %rsi
movl $0x1, %edx
callq 0x183e0
movq -0x30(%rbp), %rdi
movq %rdi, %rsi
addq $0x45, %rsi
movl $0x1, %edx
callq 0x183e0
movq -0x30(%rbp), %rdi
movq %rdi, %rsi
addq $0x46, %rsi
movl $0x2, %edx
callq 0x183e0
movq -0x30(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x4, %edx
callq 0x183e0
movq -0x30(%rbp), %rdi
leaq -0x24(%rbp), %rsi
movl $0x4, %edx
callq 0x183e0
movq -0x30(%rbp), %rax
movzwl 0x46(%rax), %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x0, %rdi
callq 0xe440
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x50(%rax)
addq $0x40, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0xe5d0
nopw %cs:(%rax,%rax)
// File: MITRECND[P]snugglefish/src/smFile.cpp
// Function: snugglefish::smFile::open(char)
void smFile::open(char readwrite){
    file::open(readwrite);

    ngram_t_size ngramL;

    read((uint8_t*) (&(this->endian_check)), ENDIAN_CHECK_FIELD);

    if (this->endian_check != ENDIAN_CHECK){
       throw runtime_error("Endian Mismatch"); 
    }

    read((uint8_t*) (&(this->version)), VERSION_FIELD);
    read((uint8_t*) (&ngramL), NGRAM_SIZE_FIELD);

    if (this->ngramLength != ngramL){
       throw runtime_error("N Gram Length Mismatch"); 
    }  

    read((uint8_t*) (&(this->maxFileNameLength)), MAX_FILENAME_LENGTH_FIELD);
    read((uint8_t*) (&(this->numIndexFiles)), NUM_INDEX_FILES_FIELD);
    read((uint8_t*) (&(this->numFiles)), NUM_FILES_FIELD);

    fileBuffer = (char*) malloc((maxFileNameLength + 1)* sizeof(char));

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movsbl -0x9(%rbp), %esi
callq 0x17e80
movq -0x28(%rbp), %rdi
movq %rdi, %rsi
addq $0x40, %rsi
movl $0x4, %edx
callq 0x185d0
movq -0x28(%rbp), %rax
cmpl $0x1234567, 0x40(%rax)  # imm = 0x1234567
je 0x19598
movl $0x10, %edi
callq 0xe170
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
leaq 0x13b8(%rip), %rsi      # 0x1a918
callq 0xe100
jmp 0x19567
movq -0x30(%rbp), %rdi
movq 0x7a7e(%rip), %rsi      # 0x20ff0
movq 0x7a2f(%rip), %rdx      # 0x20fa8
callq 0xe5b0
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0xe230
jmp 0x19686
movq -0x28(%rbp), %rdi
movq %rdi, %rsi
addq $0x44, %rsi
movl $0x1, %edx
callq 0x185d0
movq -0x28(%rbp), %rdi
leaq -0xa(%rbp), %rsi
movl $0x1, %edx
callq 0x185d0
movq -0x28(%rbp), %rax
movzbl 0x45(%rax), %eax
movzbl -0xa(%rbp), %ecx
cmpl %ecx, %eax
je 0x1961f
movl $0x10, %edi
callq 0xe170
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
leaq 0x133e(%rip), %rsi      # 0x1a928
callq 0xe100
jmp 0x195f1
movq -0x38(%rbp), %rdi
movq 0x79f4(%rip), %rsi      # 0x20ff0
movq 0x79a5(%rip), %rdx      # 0x20fa8
callq 0xe5b0
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0xe230
jmp 0x19686
movq -0x28(%rbp), %rdi
movq %rdi, %rsi
addq $0x46, %rsi
movl $0x2, %edx
callq 0x185d0
movq -0x28(%rbp), %rdi
movq %rdi, %rsi
addq $0x48, %rsi
movl $0x4, %edx
callq 0x185d0
movq -0x28(%rbp), %rdi
movq %rdi, %rsi
addq $0x4c, %rsi
movl $0x4, %edx
callq 0x185d0
movq -0x28(%rbp), %rax
movzwl 0x46(%rax), %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x0, %rdi
callq 0xe440
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x50(%rax)
addq $0x40, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0xe5d0
nop
// File: MITRECND[P]snugglefish/src/smFile.cpp
// Function: snugglefish::smFile::addFileId(char const*)
void smFile::addFileId(const char * fileName){
    strncpy(fileBuffer, fileName, maxFileNameLength);
    write((uint8_t*) fileBuffer, maxFileNameLength * sizeof(char));

    numFiles++;
    //Writing of the numFiles to the file is delayed until a flush
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x50(%rax), %rdi
movq -0x10(%rbp), %rsi
movzwl 0x46(%rax), %eax
movl %eax, %edx
callq 0xe180
movq -0x18(%rbp), %rdi
movq 0x50(%rdi), %rsi
movzwl 0x46(%rdi), %eax
movl %eax, %edx
shlq $0x0, %rdx
callq 0x183e0
movq -0x18(%rbp), %rax
movl 0x4c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4c(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: iZhangHui[P]CppPrimer/CH17_SpecializedLibraryFacilities/examples/manips11.cc
// Function: main
int main()
{
	double pi = 3.14;
	cout << pi << " " 
#ifdef HEX_MANIPS
	     << hexfloat << pi    // no workaround for this missing manipulator
#endif
	     << defaultfloat << " " << pi << endl;
	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movsd 0xe31(%rip), %xmm0      # 0x2008
movsd %xmm0, -0x10(%rbp)
movsd -0x10(%rbp), %xmm0
movq 0x2df0(%rip), %rdi      # 0x3fd8
callq 0x1070
movq %rax, %rdi
leaq 0xe19(%rip), %rsi       # 0x2010
callq 0x1040
movq %rax, %rdi
leaq 0x3a(%rip), %rsi        # 0x1240
callq 0x1050
movq %rax, %rdi
leaq 0xdfb(%rip), %rsi       # 0x2010
callq 0x1040
movq %rax, %rdi
movsd -0x10(%rbp), %xmm0
callq 0x1070
movq %rax, %rdi
movq 0x2d97(%rip), %rsi      # 0x3fc8
callq 0x1050
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: emilisb[P]OOP-4/src/main.cpp
// Function: benchmarkInsert(unsigned long)
void benchmarkInsert(size_t size) {
    vector<int> vec;
    std::vector<int> stdvec;
    Timer t;

    std::cout << "Benchmark: inserting " << size << " elements" << std::endl;

    t.start();

    for (int i = 0; i < size; i++) {
        vec.push_back(i);
    }

    std::cout << "My vector: << " << t.duration() << " ms" << std::endl;

    t.start();

    for (int i = 0; i < size; i++) {
        stdvec.push_back(i);
    }

    std::cout << "STD vector: << " << t.duration() << " ms" << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x2b00
leaq -0x40(%rbp), %rdi
callq 0x2b80
leaq -0x48(%rbp), %rdi
callq 0x2ba0
jmp 0x240c
movq 0x5bb5(%rip), %rdi      # 0x7fc8
leaq 0x2c26(%rip), %rsi      # 0x5040
callq 0x2170
movq %rax, -0x68(%rbp)
jmp 0x2425
movq -0x68(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x2060
movq %rax, -0x70(%rbp)
jmp 0x2438
movq -0x70(%rbp), %rdi
leaq 0x2c13(%rip), %rsi      # 0x5056
callq 0x2170
movq %rax, -0x78(%rbp)
jmp 0x244e
movq -0x78(%rbp), %rdi
movq 0x5b5f(%rip), %rsi      # 0x7fb8
callq 0x21a0
jmp 0x2460
leaq -0x48(%rbp), %rdi
callq 0x47a0
jmp 0x246b
movl $0x0, -0x58(%rbp)
movslq -0x58(%rbp), %rax
cmpq -0x8(%rbp), %rax
jae 0x24bb
leaq -0x28(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x2bc0
jmp 0x248b
jmp 0x248d
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x2472
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x2cc0
leaq -0x28(%rbp), %rdi
callq 0x2d20
jmp 0x25fa
movq 0x5b06(%rip), %rdi      # 0x7fc8
leaq 0x2b97(%rip), %rsi      # 0x5060
callq 0x2170
movq %rax, -0x80(%rbp)
jmp 0x24d4
leaq -0x48(%rbp), %rdi
callq 0x47e0
movl %eax, -0x84(%rbp)
jmp 0x24e5
movl -0x84(%rbp), %esi
movq -0x80(%rbp), %rdi
callq 0x2250
movq %rax, -0x90(%rbp)
jmp 0x24fd
movq -0x90(%rbp), %rdi
leaq 0x2b64(%rip), %rsi      # 0x506f
callq 0x2170
movq %rax, -0x98(%rbp)
jmp 0x2519
movq -0x98(%rbp), %rdi
movq 0x5a91(%rip), %rsi      # 0x7fb8
callq 0x21a0
jmp 0x252e
leaq -0x48(%rbp), %rdi
callq 0x47a0
jmp 0x2539
movl $0x0, -0x5c(%rbp)
movslq -0x5c(%rbp), %rax
cmpq -0x8(%rbp), %rax
jae 0x2566
leaq -0x40(%rbp), %rdi
leaq -0x5c(%rbp), %rsi
callq 0x2c50
jmp 0x2559
jmp 0x255b
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x2540
movq 0x5a5b(%rip), %rdi      # 0x7fc8
leaq 0x2aff(%rip), %rsi      # 0x5073
callq 0x2170
movq %rax, -0xa0(%rbp)
jmp 0x2582
leaq -0x48(%rbp), %rdi
callq 0x47e0
movl %eax, -0xa4(%rbp)
jmp 0x2593
movl -0xa4(%rbp), %esi
movq -0xa0(%rbp), %rdi
callq 0x2250
movq %rax, -0xb0(%rbp)
jmp 0x25ae
movq -0xb0(%rbp), %rdi
leaq 0x2ab3(%rip), %rsi      # 0x506f
callq 0x2170
movq %rax, -0xb8(%rbp)
jmp 0x25ca
movq -0xb8(%rbp), %rdi
movq 0x59e0(%rip), %rsi      # 0x7fb8
callq 0x21a0
jmp 0x25df
leaq -0x40(%rbp), %rdi
callq 0x2cc0
leaq -0x28(%rbp), %rdi
callq 0x2d20
addq $0xc0, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x2260
nopw %cs:(%rax,%rax)
// File: emilisb[P]OOP-4/src/vector.h
// Function: vector<int, std::allocator<int>>::push_back(int const&)
void push_back(const T& item) {
        if (size() == capacity()) {
            reallocate(capacity() + 1);
        }
        _allocator.construct(end(), item);
        ++_size;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x2e00
movq -0x20(%rbp), %rdi
movq %rax, -0x18(%rbp)
callq 0x2e20
movq %rax, %rcx
movq -0x18(%rbp), %rax
cmpq %rcx, %rax
jne 0x2c0f
movq -0x20(%rbp), %rdi
callq 0x2e20
movq -0x20(%rbp), %rdi
movq %rax, %rsi
addq $0x1, %rsi
callq 0x3790
movq -0x20(%rbp), %rdi
movq %rdi, %rax
addq $0x18, %rax
movq %rax, -0x28(%rbp)
callq 0x38b0
movq -0x28(%rbp), %rdi
movq %rax, %rsi
movq -0x10(%rbp), %rdx
callq 0x3890
movq -0x20(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: emilisb[P]OOP-4/src/vector.h
// Function: vector<int, std::allocator<int>>::~vector()
~vector() {
        // Make sure our data is not nullptr (used in unit tests to prevent double deconstruction)
        if (_data != nullptr) {
            for (size_type i = 0; i < size(); i++) {
                _allocator.destroy(&_data[i]);
            }
            _allocator.deallocate(_data, capacity());
            _data = nullptr;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, 0x10(%rax)
je 0x2dd9
movq $0x0, -0x10(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x2e00
movq %rax, -0x20(%rbp)
jmp 0x2d5e
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq %rcx, %rax
jae 0x2d98
movq -0x18(%rbp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x3600
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x2d47
movq -0x18(%rbp), %rdi
movq %rdi, %rax
addq $0x18, %rax
movq %rax, -0x40(%rbp)
movq 0x10(%rdi), %rax
movq %rax, -0x38(%rbp)
callq 0x2e20
movq %rax, -0x30(%rbp)
jmp 0x2dba
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdi
callq 0x3610
jmp 0x2dcd
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0x35b0
addq $0x40, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x3520
nopw %cs:(%rax,%rax)
nop
// File: emilisb[P]OOP-4/src/vector.h
// Function: vector<TestObject, std::allocator<TestObject>>::erase(TestObject const*, TestObject const*)
iterator erase(const_iterator first, const_iterator last) {
        const difference_type startIndex = first - begin();
        const difference_type endIndex = last - begin();
        
        for (difference_type i = 0; i < endIndex - startIndex; i++) {
            _allocator.destroy(&_data[startIndex + i]);
            _allocator.construct(&_data[startIndex + i], _data[endIndex + i]);
        }
        
        _size -= endIndex - startIndex;
        iterator it = &_data[startIndex];
        
        return it;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
callq 0x31c0
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
sarq $0x5, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x31c0
movq %rax, %rcx
movq -0x40(%rbp), %rax
subq %rcx, %rax
sarq $0x5, %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
subq -0x20(%rbp), %rcx
cmpq %rcx, %rax
jge 0x318e
movq -0x50(%rbp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movq 0x10(%rax), %rsi
movq -0x20(%rbp), %rax
addq -0x30(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rsi
callq 0x41a0
movq -0x50(%rbp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movq 0x10(%rax), %rsi
movq -0x20(%rbp), %rcx
addq -0x30(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rsi
movq 0x10(%rax), %rdx
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdx
callq 0x4770
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x3116
movq -0x50(%rbp), %rax
movq -0x28(%rbp), %rdx
subq -0x20(%rbp), %rdx
movq (%rax), %rcx
subq %rdx, %rcx
movq %rcx, (%rax)
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
// File: emilisb[P]OOP-4/src/vector.h
// Function: vector<int, std::allocator<int>>::reallocate(unsigned long)
void reallocate(size_type minSize) {
        const size_type newCapacity = calculateGrowth(minSize);

        T* newData = _allocator.allocate(newCapacity);
        for (size_type i = 0; i < _size; i++) {
            _allocator.construct(&newData[i], std::move(_data[i]));
            _allocator.destroy(&_data[i]);
        }
        _allocator.deallocate(_data, capacity());

        _data = newData;
        _capacity = newCapacity;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x10(%rbp), %rsi
callq 0x38e0
movq -0x30(%rbp), %rdi
movq %rax, -0x18(%rbp)
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x3550
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
cmpq (%rcx), %rax
jae 0x383e
movq -0x30(%rbp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rsi
movq 0x10(%rax), %rdx
movq -0x28(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdx
callq 0x39d0
movq -0x30(%rbp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movq 0x10(%rax), %rsi
movq -0x28(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x3600
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x37d6
movq -0x30(%rbp), %rdi
movq %rdi, %rax
addq $0x18, %rax
movq %rax, -0x40(%rbp)
movq 0x10(%rdi), %rax
movq %rax, -0x38(%rbp)
callq 0x2e20
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %rax, %rdx
callq 0x3610
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: emilisb[P]OOP-4/src/vector.h
// Function: vector<int, std::allocator<int>>::calculateGrowth(unsigned long) const
size_type calculateGrowth(size_type newSize) const {
        if (capacity() > max_size() - capacity() / 2) {
            return newSize;
        }

        const size_type geometric = capacity() * 1.5;

        if (geometric < newSize) {
            return newSize;
        }

        return geometric;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0x2e20
movq -0x38(%rbp), %rdi
movq %rax, -0x28(%rbp)
callq 0x39f0
movq -0x38(%rbp), %rdi
movq %rax, -0x30(%rbp)
callq 0x2e20
movq -0x30(%rbp), %rcx
movq %rax, %rdx
movq -0x28(%rbp), %rax
shrq %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x393a
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x39bc
movq -0x38(%rbp), %rdi
callq 0x2e20
movq %rax, %xmm0
movaps 0x16c1(%rip), %xmm1     # 0x5010
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x16c5(%rip), %xmm1     # 0x5020
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x16be(%rip), %xmm1     # 0x5030
mulsd %xmm1, %xmm0
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movsd 0x16ab(%rip), %xmm1     # 0x5038
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x39b4
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x39bc
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Albuso0[P]support/support.cpp
// Function: Support::estimate() const
double Support::estimate() const
{
    if ( pmin < Ratio / n ) // const
    {
        double result = 0.0;
        for ( const auto & pair : fin )
                result += getCoeff(pair.first) * pair.second;
        return result;
    }
    else
        return estimate_plug();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movsd 0x8(%rax), %xmm1
movsd 0x18(%rax), %xmm0
cvtsi2sdl 0x20(%rax), %xmm2
divsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x25b0
movq -0x40(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, -0x18(%rbp)
addq $0x28, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3790
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x37c0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x37f0
testb $0x1, %al
jne 0x2562
jmp 0x25a4
leaq -0x28(%rbp), %rdi
callq 0x3830
movq -0x40(%rbp), %rdi
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl (%rax), %esi
callq 0x25d0
movq -0x38(%rbp), %rax
cvtsi2sdl 0x4(%rax), %xmm2
movsd -0x18(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3850
jmp 0x254f
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x25be
movq -0x40(%rbp), %rdi
callq 0x27e0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: Albuso0[P]support/support.cpp
// Function: Support::getCoeff(int) const
double Support::getCoeff( int N ) const
{
    if ( N == 0 ) return 0;
    if ( N > L ) return 1;

    double A = ( Ratio + n*pmin ) / ( Ratio - n*pmin );
    ChebMore cheb(L, 1, -A); // polynomial of cos L arccos(t-A)
    std::vector<double> a = cheb.expand(); // Expand: cos L arccos(x-A)=sum_i a[i]*x^i
    double amp = cheb.evaluate(0); // cos L arccos(-A)

    double result = -a[N]/amp;
    double s = 2 / ( Ratio - n * pmin );
    for ( int i = 1; i <= N; ++i )
        result *= i * s;

    return (1+result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x2600
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x27bd
movq -0x90(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x10(%rcx), %eax
jle 0x2621
movsd 0x6a09(%rip), %xmm0     # 0x9020
movsd %xmm0, -0x8(%rbp)
jmp 0x27bd
movq -0x90(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd 0x18(%rax), %xmm1
cvtsi2sdl 0x20(%rax), %xmm2
mulsd %xmm0, %xmm2
movaps %xmm2, %xmm0
addsd %xmm1, %xmm0
subsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movl 0x10(%rax), %esi
movaps 0x69b7(%rip), %xmm0     # 0x9010
movsd -0x20(%rbp), %xmm1
pxor %xmm0, %xmm1
leaq -0x40(%rbp), %rdi
movq %rdi, -0x98(%rbp)
movsd 0x69ab(%rip), %xmm0     # 0x9020
callq 0x3870
movq -0x98(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x6170
jmp 0x268c
leaq -0x40(%rbp), %rdi
xorps %xmm0, %xmm0
callq 0x6350
movsd %xmm0, -0xa0(%rbp)
jmp 0x26a2
movsd -0xa0(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movslq -0x14(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x38c0
movq %rax, %rcx
movq -0x90(%rbp), %rax
movsd (%rcx), %xmm0
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
divsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd 0x18(%rax), %xmm0
cvtsi2sdl 0x20(%rax), %xmm1
movsd 0x8(%rax), %xmm2
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x6907(%rip), %xmm0     # 0x9028
divsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movl $0x1, -0x84(%rbp)
movl -0x84(%rbp), %eax
cmpl -0x14(%rbp), %eax
jg 0x278c
cvtsi2sdl -0x84(%rbp), %xmm0
mulsd -0x80(%rbp), %xmm0
mulsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x2734
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x27b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x38e0
jmp 0x27b2
movsd 0x688c(%rip), %xmm0     # 0x9020
addsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x38e0
leaq -0x40(%rbp), %rdi
callq 0x3940
jmp 0x27bd
leaq -0x40(%rbp), %rdi
callq 0x3940
jmp 0x27cb
movsd -0x8(%rbp), %xmm0
addq $0xa0, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x22e0
nopw %cs:(%rax,%rax)
// File: Albuso0[P]support/support.cpp
// Function: Support::estimate_plug() const
double Support::estimate_plug() const
{
    double result = 0.0;
    for ( const auto & pair : fin )
        result += pair.second;
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, -0x10(%rbp)
addq $0x28, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3790
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x37c0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x37f0
testb $0x1, %al
jne 0x282d
jmp 0x2858
leaq -0x20(%rbp), %rdi
callq 0x3830
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cvtsi2sdl 0x4(%rax), %xmm0
addsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x3850
jmp 0x281a
movsd -0x10(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Albuso0[P]support/support.cpp
// Function: Support::coverage_TG() const
double Support::coverage_TG() const
{
    double n1 = 0;
    for ( const auto & pair : fin )
        if ( pair.first == 1 )
        {
            n1 = pair.second;
            break;
        }
    return (1 - n1/n);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x10(%rbp)
addq $0x28, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3790
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x37c0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x37f0
testb $0x1, %al
jne 0x28c1
jmp 0x28f4
leaq -0x20(%rbp), %rdi
callq 0x3830
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x28e7
movq -0x30(%rbp), %rax
cvtsi2sdl 0x4(%rax), %xmm0
movsd %xmm0, -0x10(%rbp)
jmp 0x28f4
jmp 0x28e9
leaq -0x20(%rbp), %rdi
callq 0x3850
jmp 0x28ae
movq -0x38(%rbp), %rax
movsd -0x10(%rbp), %xmm1
cvtsi2sdl 0x20(%rax), %xmm0
divsd %xmm0, %xmm1
movsd 0x6712(%rip), %xmm0     # 0x9020
subsd %xmm1, %xmm0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Albuso0[P]support/support.cpp
// Function: Support::estimate_J1() const
double Support::estimate_J1() const
{
    double f1 = 0;
    for ( const auto & pair : fin )
        if ( pair.first == 1 )
        {
            f1 = pair.second;
            break;
        }
    return ( estimate_plug() + (n-1.0)/n*f1 );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x10(%rbp)
addq $0x28, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3790
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x37c0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x37f0
testb $0x1, %al
jne 0x29b1
jmp 0x29e4
leaq -0x20(%rbp), %rdi
callq 0x3830
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x29d7
movq -0x30(%rbp), %rax
cvtsi2sdl 0x4(%rax), %xmm0
movsd %xmm0, -0x10(%rbp)
jmp 0x29e4
jmp 0x29d9
leaq -0x20(%rbp), %rdi
callq 0x3850
jmp 0x299e
movq -0x38(%rbp), %rdi
callq 0x27e0
movq -0x38(%rbp), %rax
movaps %xmm0, %xmm1
cvtsi2sdl 0x20(%rax), %xmm0
movsd 0x661f(%rip), %xmm2     # 0x9020
subsd %xmm2, %xmm0
cvtsi2sdl 0x20(%rax), %xmm2
divsd %xmm2, %xmm0
movsd -0x10(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Albuso0[P]support/support.cpp
// Function: Support::estimate_Chao1() const
double Support::estimate_Chao1() const 
{
    double f1 = 0;
    double f2 = 0;
    for ( const auto & pair : fin )
        if ( pair.first == 1 )
        {
            f1 = pair.second;
            break;
        }
    for ( const auto & pair : fin )
        if ( pair.first == 2 )
        {
            f2 = pair.second;
            break;
        }
    return estimate_plug()+f1*(f1-1)/(2*(f2+1));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x10(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x18(%rbp)
addq $0x28, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3790
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x37c0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x37f0
testb $0x1, %al
jne 0x2a89
jmp 0x2abc
leaq -0x28(%rbp), %rdi
callq 0x3830
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x2aaf
movq -0x38(%rbp), %rax
cvtsi2sdl 0x4(%rax), %xmm0
movsd %xmm0, -0x10(%rbp)
jmp 0x2abc
jmp 0x2ab1
leaq -0x28(%rbp), %rdi
callq 0x3850
jmp 0x2a76
movq -0x60(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x3790
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x37c0
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x37f0
testb $0x1, %al
jne 0x2af5
jmp 0x2b28
leaq -0x48(%rbp), %rdi
callq 0x3830
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x2b1b
movq -0x58(%rbp), %rax
cvtsi2sdl 0x4(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x2b28
jmp 0x2b1d
leaq -0x48(%rbp), %rdi
callq 0x3850
jmp 0x2ae2
movq -0x60(%rbp), %rdi
callq 0x27e0
movsd -0x10(%rbp), %xmm1
movsd -0x10(%rbp), %xmm2
movsd 0x64dd(%rip), %xmm3     # 0x9020
subsd %xmm3, %xmm2
mulsd %xmm2, %xmm1
movsd 0x64cd(%rip), %xmm3     # 0x9020
addsd -0x18(%rbp), %xmm3
movsd 0x64c8(%rip), %xmm2     # 0x9028
mulsd %xmm3, %xmm2
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)