LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tbonelaforge[P]gradebook/Student.cpp
// Function: Student::serialize(std::ostream&)
void Student::serialize(ostream& out) {
    out << id << " ";
    out << firstName << " ";
    out << lastName << " ";
    for (int i = 0; i < numPrograms; i++) {
        out << programGrades[i] << " ";
    }
    for (int i = 0; i < numTests; i++) {
        out << testGrades[i] << " ";
    }
    for (int i = 0; i < numFinals; i++) {
        out << finalExamGrade << " ";
    }
    out << finalAverage;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl 0x8(%rax), %esi
callq 0x33e0
movq %rax, %rdi
leaq 0x2bb9(%rip), %rsi      # 0xa327
callq 0x3220
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x10, %rsi
callq 0x3200
movq %rax, %rdi
leaq 0x2b99(%rip), %rsi      # 0xa327
callq 0x3220
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x30, %rsi
callq 0x3200
movq %rax, %rdi
leaq 0x2b79(%rip), %rsi      # 0xa327
callq 0x3220
movl $0x0, -0x14(%rbp)
movq -0x28(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x50(%rcx), %eax
jge 0x77f8
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rdi
movq 0x60(%rax), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x33e0
movq %rax, %rdi
leaq 0x2b3f(%rip), %rsi      # 0xa327
callq 0x3220
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x77ba
movl $0x0, -0x18(%rbp)
movq -0x28(%rbp), %rcx
movl -0x18(%rbp), %eax
cmpl 0x54(%rcx), %eax
jge 0x783d
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rdi
movq 0x68(%rax), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x33e0
movq %rax, %rdi
leaq 0x2afa(%rip), %rsi      # 0xa327
callq 0x3220
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x77ff
movl $0x0, -0x1c(%rbp)
movq -0x28(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x58(%rcx), %eax
jge 0x787a
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rdi
movl 0x70(%rax), %esi
callq 0x33e0
movq %rax, %rdi
leaq 0x2abd(%rip), %rsi      # 0xa327
callq 0x3220
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x7844
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rdi
movss 0x74(%rax), %xmm0
callq 0x31b0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: tbonelaforge[P]gradebook/GradebookPrinter.cpp
// Function: GradebookPrinter::print(std::ostream&)
void GradebookPrinter::print(ostream& out) {
    fillHeaders();
    fillStudentData();
    for (int i = 0; i < numRows; i++) {
        for (int j = 0; j < numColumns; j++) {
            out << centerString(cellContents[i][j], columnWidths[j]);
            if (j < numColumns - 1) {
                out << '|';
            }
        }
        out << endl;
        if (i < numRows - 1) {
            printRowSeparator(out);
            out << endl;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x7f30
movq -0x70(%rbp), %rdi
callq 0x83e0
movl $0x0, -0x14(%rbp)
movq -0x70(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x7c63
movl $0x0, -0x18(%rbp)
movq -0x70(%rbp), %rcx
movl -0x18(%rbp), %eax
cmpl 0xc(%rcx), %eax
jge 0x7c15
movq -0x70(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, -0x80(%rbp)
movq 0x10(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movslq -0x18(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rsi
leaq -0x58(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x30f0
movq -0x70(%rbp), %rax
movq -0x78(%rbp), %rsi
movq 0x18(%rax), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %edx
leaq -0x38(%rbp), %rdi
callq 0x84c0
jmp 0x7b95
movq -0x80(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3200
jmp 0x7ba4
leaq -0x38(%rbp), %rdi
callq 0x3498
leaq -0x58(%rbp), %rdi
callq 0x3498
movq -0x70(%rbp), %rcx
movl -0x18(%rbp), %eax
movl 0xc(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x7c05
movq -0x10(%rbp), %rdi
movl $0x7c, %esi
callq 0x32d0
jmp 0x7c05
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x7bfa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3498
leaq -0x58(%rbp), %rdi
callq 0x3498
jmp 0x7c6c
jmp 0x7c07
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x7b37
movq -0x10(%rbp), %rdi
movq 0x6388(%rip), %rsi      # 0xdfa8
callq 0x3250
movq -0x70(%rbp), %rcx
movl -0x14(%rbp), %eax
movl 0x8(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x7c53
movq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x86e0
movq -0x10(%rbp), %rdi
movq 0x635a(%rip), %rsi      # 0xdfa8
callq 0x3250
jmp 0x7c55
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7b20
addq $0x80, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x33f0
nopw %cs:(%rax,%rax)
// File: tbonelaforge[P]gradebook/GradebookPrinter.cpp
// Function: GradebookPrinter::GradebookPrinter(Gradebook&, bool)
GradebookPrinter::GradebookPrinter(Gradebook& gradebook, bool idMode) : gradebook(gradebook), idMode(idMode) {
    numRows = gradebook.getNumStudents() + 1; // Extra row for table header
    numColumns = gradebook.getNumPrograms() + gradebook.getNumTests() + gradebook.getNumFinals() + 3;
    cellContents = new string*[numRows];
    for (int i = 0; i < numRows; i++) {
        cellContents[i] = new string[numColumns];
    }
    columnWidths = new int[numColumns];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, (%rax)
movb -0x11(%rbp), %cl
andb $0x1, %cl
movb %cl, 0x20(%rax)
movq -0x10(%rbp), %rdi
callq 0x6740
movl %eax, %ecx
movq -0x20(%rbp), %rax
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0x6100
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6110
movl %eax, %ecx
movl -0x28(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6130
movl -0x24(%rbp), %ecx
movl %eax, %edx
movq -0x20(%rbp), %rax
addl %edx, %ecx
addl $0x3, %ecx
movl %ecx, 0xc(%rax)
movslq 0x8(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x18(%rbp)
movq -0x20(%rbp), %rcx
movl -0x18(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x7df0
movq -0x20(%rbp), %rax
movslq 0xc(%rax), %rax
movq %rax, -0x38(%rbp)
movl $0x20, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
addq $0x8, %rdi
setb %al
orb %al, %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rax, (%rcx)
addq $0x8, %rcx
movq %rcx, -0x30(%rbp)
cmpq $0x0, %rax
je 0x7dce
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rdx
shlq $0x5, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x48(%rbp)
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x3350
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
addq $0x20, %rax
cmpq %rcx, %rax
movq %rax, -0x40(%rbp)
jne 0x7dac
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x18(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x7d34
movq -0x20(%rbp), %rax
movslq 0xc(%rax), %rax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: tbonelaforge[P]gradebook/GradebookPrinter.cpp
// Function: GradebookPrinter::~GradebookPrinter()
GradebookPrinter::~GradebookPrinter() {
    for (int i = 0; i < numRows; i++) {
        delete[] cellContents[i];
    }
    delete[] cellContents;
    delete[] columnWidths;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x7ee6
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x7ed6
movq -0x20(%rbp), %rcx
movq %rcx, %rax
addq $-0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rcx), %rdx
movq %rdx, -0x30(%rbp)
shlq $0x5, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, -0x28(%rbp)
je 0x7ec1
movq -0x28(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x40(%rbp)
callq 0x3498
movq -0x20(%rbp), %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x28(%rbp)
jne 0x7e9f
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
shlq $0x5, %rsi
addq $0x8, %rsi
callq 0x3450
jmp 0x7ed8
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x7e4b
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
je 0x7f01
movq -0x48(%rbp), %rdi
callq 0x3320
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
je 0x7f1c
movq -0x50(%rbp), %rdi
callq 0x3320
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: tbonelaforge[P]gradebook/GradebookPrinter.cpp
// Function: GradebookPrinter::fillStudentData()
void GradebookPrinter::fillStudentData() {
    int i = 0;
    Student * student;
    string * studentRow;
    if (idMode) {
        student = gradebook.getHead();
        while (student != NULL) {
            studentRow = cellContents[1 + i];
            fillStudentRow(studentRow, student);
            i += 1;
            student = student->next;
        }
    } else {
        Node * current = gradebook.getIndex();
        while (current != NULL) {
            student = current->student;
            studentRow = cellContents[1 + i];
            fillStudentRow(studentRow, student);
            i += 1;
            current = current->next;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0xc(%rbp)
testb $0x1, 0x20(%rax)
je 0x8456
movq -0x30(%rbp), %rax
movq (%rax), %rdi
callq 0x6760
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8454
movq -0x30(%rbp), %rdi
movq 0x10(%rdi), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x8780
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x8411
jmp 0x84b7
movq -0x30(%rbp), %rax
movq (%rax), %rdi
callq 0x6780
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x84b5
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq 0x10(%rdi), %rax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x8780
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x8466
jmp 0x84b7
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: tbonelaforge[P]gradebook/GradebookPrinter.cpp
// Function: GradebookPrinter::centerString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
string GradebookPrinter::centerString(string data, int columnWidth) {
    int blanksNeeded = columnWidth - data.length();
    int lb = blanksNeeded / 2;
    int rb = blanksNeeded - lb;
    string lbs = "";
    string rbs = "";
    for (int i = 0; i < lb; i++) {
        lbs += " ";
    }
    for (int i = 0; i < rb; i++) {
        rbs += " ";
    }
    return lbs + data + rbs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rsi, -0xd0(%rbp)
movq %rdi, %rax
movq -0xd0(%rbp), %rdi
movq %rax, -0xc8(%rbp)
movq %rax, %rcx
movq %rcx, -0xc0(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0xb4(%rbp)
callq 0x3380
movq %rax, %rcx
movl -0xb4(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
sarl %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %eax
movl -0x1c(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x20(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x3400
movq -0xb0(%rbp), %rdx
leaq 0x1f83(%rip), %rsi      # 0xa4cf
leaq -0x40(%rbp), %rdi
callq 0x9230
jmp 0x8557
leaq -0x41(%rbp), %rdi
callq 0x3270
leaq -0x79(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x3400
movq -0xd8(%rbp), %rdx
leaq 0x1f51(%rip), %rsi      # 0xa4cf
leaq -0x78(%rbp), %rdi
callq 0x9230
jmp 0x8589
leaq -0x79(%rbp), %rdi
callq 0x3270
movl $0x0, -0x80(%rbp)
movl -0x80(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x8605
leaq 0x1d7f(%rip), %rsi      # 0xa327
leaq -0x40(%rbp), %rdi
callq 0x3210
jmp 0x85b3
jmp 0x85b5
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x8599
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x41(%rbp), %rdi
callq 0x3270
jmp 0x86c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x79(%rbp), %rdi
callq 0x3270
jmp 0x86c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x86b7
movl $0x0, -0x84(%rbp)
movl -0x84(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x863f
leaq 0x1d06(%rip), %rsi      # 0xa327
leaq -0x78(%rbp), %rdi
callq 0x3210
jmp 0x862c
jmp 0x862e
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x860f
movq -0xd0(%rbp), %rdx
leaq -0xa8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x9450
jmp 0x8658
movq -0xc8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
leaq -0x78(%rbp), %rdx
callq 0x9400
jmp 0x8671
leaq -0xa8(%rbp), %rdi
callq 0x3498
leaq -0x78(%rbp), %rdi
callq 0x3498
leaq -0x40(%rbp), %rdi
callq 0x3498
movq -0xc0(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x3498
leaq -0x78(%rbp), %rdi
callq 0x3498
leaq -0x40(%rbp), %rdi
callq 0x3498
movq -0x50(%rbp), %rdi
callq 0x33f0
nopw %cs:(%rax,%rax)
// File: tbonelaforge[P]gradebook/GradebookPrinter.cpp
// Function: GradebookPrinter::printRowSeparator(std::ostream&)
void GradebookPrinter::printRowSeparator(ostream& out) {
    for (int j = 0; j < numColumns; j++) {
        for (int k = 0; k < columnWidths[j]; k++) {
            out << '-';
        }
        if (j < numColumns - 1) {
            out << '-';
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x20(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0xc(%rcx), %eax
jge 0x876b
movl $0x0, -0x18(%rbp)
movq -0x20(%rbp), %rcx
movl -0x18(%rbp), %eax
movq 0x18(%rcx), %rcx
movslq -0x14(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x873f
movq -0x10(%rbp), %rdi
movl $0x2d, %esi
callq 0x32d0
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x8712
movq -0x20(%rbp), %rcx
movl -0x14(%rbp), %eax
movl 0xc(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x875e
movq -0x10(%rbp), %rdi
movl $0x2d, %esi
callq 0x32d0
jmp 0x8760
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x86ff
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: tplinderoth[P]introDist/introDist.cpp
// Function: main
int main (int argc, char **argv) {
	int rv = 0;

	if (argc < 2) {
		mainInfo();
	} else {
		rv = distAnalysis(argc, argv);
	}

	return rv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x36fa
callq 0x3720
jmp 0x3709
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x3890
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: tplinderoth[P]introDist/introDist.cpp
// Function: mainInfo()
void mainInfo () {
	int w = 12;
	std::cerr << "\nintroDist [function] [-function_inputs]\n"
	<< "\nFunctions:\n"
	<< std::setw(w) << std::left << "comp2Dist" << std::setw(w) << "Find regions where the genetic distance between an individual and a population is less than expected\n"
	<< std::setw(w) << std::left << "comp3Dist" << std::setw(w) << "Distance between 2 individuals and their respective populations, weighted by distance between the individuals\n"
	<< std::setw(w) << std::left << "avgDist" << std::setw(w) << "Genome-wide distance between populations or an individual and a population\n"
	<< "\n";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl $0xc, -0x4(%rbp)
movq 0x118ba(%rip), %rdi     # 0x14ff0
leaq 0xbe5b(%rip), %rsi      # 0xf598
callq 0x32c0
movq %rax, %rdi
leaq 0xbe76(%rip), %rsi      # 0xf5c2
callq 0x32c0
movq %rax, -0x50(%rbp)
movl -0x4(%rbp), %edi
callq 0x9920
movq -0x50(%rbp), %rdi
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %esi
callq 0x3350
movq %rax, %rdi
leaq 0x61ca(%rip), %rsi      # 0x9940
callq 0x3110
movq %rax, %rdi
leaq 0xb8eb(%rip), %rsi      # 0xf070
callq 0x32c0
movq %rax, -0x48(%rbp)
movl -0x4(%rbp), %edi
callq 0x9920
movq -0x48(%rbp), %rdi
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %esi
callq 0x3350
movq %rax, %rdi
leaq 0xbe20(%rip), %rsi      # 0xf5cf
callq 0x32c0
movq %rax, -0x40(%rbp)
movl -0x4(%rbp), %edi
callq 0x9920
movq -0x40(%rbp), %rdi
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %esi
callq 0x3350
movq %rax, %rdi
leaq 0x6167(%rip), %rsi      # 0x9940
callq 0x3110
movq %rax, %rdi
leaq 0xb892(%rip), %rsi      # 0xf07a
callq 0x32c0
movq %rax, -0x38(%rbp)
movl -0x4(%rbp), %edi
callq 0x9920
movq -0x38(%rbp), %rdi
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %esi
callq 0x3350
movq %rax, %rdi
leaq 0xbe23(%rip), %rsi      # 0xf635
callq 0x32c0
movq %rax, -0x30(%rbp)
movl -0x4(%rbp), %edi
callq 0x9920
movq -0x30(%rbp), %rdi
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %esi
callq 0x3350
movq %rax, %rdi
leaq 0x6104(%rip), %rsi      # 0x9940
callq 0x3110
movq %rax, %rdi
leaq 0xb839(%rip), %rsi      # 0xf084
callq 0x32c0
movq %rax, -0x28(%rbp)
movl -0x4(%rbp), %edi
callq 0x9920
movq -0x28(%rbp), %rdi
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %esi
callq 0x3350
movq %rax, %rdi
leaq 0xbe2f(%rip), %rsi      # 0xf6a4
callq 0x32c0
movq %rax, %rdi
leaq 0xc368(%rip), %rsi      # 0xfbec
callq 0x32c0
addq $0x50, %rsp
popq %rbp
retq
nop
// File: tplinderoth[P]introDist/introDist.cpp
// Function: comp2Dist(std::basic_fstream<char, std::char_traits<char>>&, std::basic_fstream<char, std::char_traits<char>>&, unsigned int, unsigned int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, double const*)
int comp2Dist (std::fstream &freqfile, std::fstream &genofile, unsigned int window, unsigned int step, int useAvg, std::string* genofname, const double* distance) {
	int comp2return = 0;

	switch (useAvg) {
		case 0 :
			std::cerr << "Using window-wide distance between populations\n";
			comp2return = comp2DistReg(freqfile, genofile, window, step);
			break;
		case 1 :
			std::cerr << "Using genome-wide distance between populations\n";
			comp2return = comp2DistPopAvg(freqfile, genofile, window, step, genofname, distance);
			break;
		case 2 :
			std::cerr << "Using genome-wide distance between individual and population 2\n";
			comp2return = comp2DistIndAvg(freqfile, genofile, window, step, genofname, distance);
			break;
		default :
			std::cerr << "Need to specify -useAvg 0, 1, or 2 in call to comp2Dist\n";
			comp2return = -1;
	}

	return comp2return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq %r9, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x30(%rbp)
testl %eax, %eax
je 0x437c
jmp 0x4365
movl -0x30(%rbp), %eax
subl $0x1, %eax
je 0x43aa
jmp 0x436f
movl -0x30(%rbp), %eax
subl $0x2, %eax
je 0x43dd
jmp 0x4410
movq 0x10c6d(%rip), %rdi     # 0x14ff0
leaq 0xb028(%rip), %rsi      # 0xf3b2
callq 0x32c0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
callq 0x6440
movl %eax, -0x2c(%rbp)
jmp 0x442a
movq 0x10c3f(%rip), %rdi     # 0x14ff0
leaq 0xb02a(%rip), %rsi      # 0xf3e2
callq 0x32c0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x28(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0x7050
movl %eax, -0x2c(%rbp)
jmp 0x442a
movq 0x10c0c(%rip), %rdi     # 0x14ff0
leaq 0xb027(%rip), %rsi      # 0xf412
callq 0x32c0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x28(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0x7e90
movl %eax, -0x2c(%rbp)
jmp 0x442a
movq 0x10bd9(%rip), %rdi     # 0x14ff0
leaq 0xb034(%rip), %rsi      # 0xf452
callq 0x32c0
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
movl -0x2c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: tplinderoth[P]introDist/introDist.cpp
// Function: avgDist(std::basic_fstream<char, std::char_traits<char>>&, std::basic_fstream<char, std::char_traits<char>>&, int)
int avgDist (std::fstream &freqfile, std::fstream &genofile, int avgtype) {
	int distreturn = 0;

	switch (avgtype) {
		case 0 :
			std::cerr << "Calculating expected distance between populations\n";
			distreturn = avg2PopDist(freqfile);
			break;
		case 1 :
			std::cerr << "Calculating distance between individual and population\n";
			distreturn = avgIndPopDist(freqfile, genofile);
			break;
		default:
			std::cerr << "Need to specify -distance 0 or 1 in call to -avgDist\n";
			distreturn = -1;
	}

	return distreturn;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
testl %eax, %eax
je 0x50f0
jmp 0x50e6
movl -0x1c(%rbp), %eax
subl $0x1, %eax
je 0x5111
jmp 0x5136
movq 0xfef9(%rip), %rdi      # 0x14ff0
leaq 0xa14c(%rip), %rsi      # 0xf24a
callq 0x32c0
movq -0x8(%rbp), %rdi
callq 0x5ae0
movl %eax, -0x18(%rbp)
jmp 0x5150
movq 0xfed8(%rip), %rdi      # 0x14ff0
leaq 0xa15e(%rip), %rsi      # 0xf27d
callq 0x32c0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5e00
movl %eax, -0x18(%rbp)
jmp 0x5150
movq 0xfeb3(%rip), %rdi      # 0x14ff0
leaq 0xa171(%rip), %rsi      # 0xf2b5
callq 0x32c0
movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF
movl -0x18(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: tplinderoth[P]introDist/introDist.cpp
// Function: expect2PopDist(double, double)
double expect2PopDist (double p1, double p2) {
	/*
	 * expected distance between two populations
	 */

	// expected genotypes under HWE
	double eg1 = 2.0*p1*(1.0-p1) + 2.0*p1*p1;
	double eg2 = 2.0*p2*(1.0-p2) + 2.0*p2*p2;
	return fabs(eg1 - eg2)/2.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd %xmm0, -0x8(%rbp)
movsd %xmm1, -0x10(%rbp)
movsd 0x8ce2(%rip), %xmm0     # 0xf018
mulsd -0x8(%rbp), %xmm0
movsd 0x8cc5(%rip), %xmm2     # 0xf008
subsd -0x8(%rbp), %xmm2
movsd 0x8cc8(%rip), %xmm1     # 0xf018
mulsd -0x8(%rbp), %xmm1
mulsd -0x8(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movsd 0x8ca9(%rip), %xmm0     # 0xf018
mulsd -0x10(%rbp), %xmm0
movsd 0x8c8c(%rip), %xmm2     # 0xf008
subsd -0x10(%rbp), %xmm2
movsd 0x8c8f(%rip), %xmm1     # 0xf018
mulsd -0x10(%rbp), %xmm1
mulsd -0x10(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x18(%rbp), %xmm0
subsd -0x20(%rbp), %xmm0
movaps 0x8c8f(%rip), %xmm1     # 0xf040
pand %xmm1, %xmm0
movsd 0x8c5b(%rip), %xmm1     # 0xf018
divsd %xmm1, %xmm0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: tplinderoth[P]introDist/introDist.cpp
// Function: calc3Dist(double, double, double, double)
double calc3Dist (double g1, double g2, double p1, double p2) {
	/*
	 * this calculates the average, expected distance between (possibly admixed) individuals and their population
	 * weighted by the distance between the distance between the (possibly admixed) individuals
	 *
	 * D_1 = (1-d(i1, i2)) * d({i1,p1}, {i2,p2})
	 *
	 * at site s:
	 * Distance between individuals: d(i1, i2) = |g(i1,s) - g(i2,s)|/2
	 * Average, expected distance between individual and pop: d({i1,p1}, {i1,p2}) = ( E[|g(i1,s) - g(p1,s)|] + E[|g(i2,s) - g(p2,s)|] )/4
	 *
	 * over N sites:
	 * D_N = 1/N * sum_from=1_to=N [ (1-d(i1,i2)) * d({i1,p1}, {i2,p2}) ]
	 */

	// expected genotypes under HWE
	double eg1 = 2.0*p1*(1.0-p1) + 2.0*p1*p1;
	double eg2 = 2.0*p2*(1.0-p2) + 2.0*p2*p2;

	// expected distance between individuals and populations
	double pdist = (fabs(g1-eg1) + fabs(g2-eg2))/4.0;

	// distance between individuals
	double idist = fabs(g1-g2)/2.0;

	// weighted distance statistic
	double d = (1.0-idist)*pdist;

	return (d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd %xmm0, -0x8(%rbp)
movsd %xmm1, -0x10(%rbp)
movsd %xmm2, -0x18(%rbp)
movsd %xmm3, -0x20(%rbp)
movsd 0x62f8(%rip), %xmm0     # 0xf018
mulsd -0x18(%rbp), %xmm0
movsd 0x62db(%rip), %xmm2     # 0xf008
subsd -0x18(%rbp), %xmm2
movsd 0x62de(%rip), %xmm1     # 0xf018
mulsd -0x18(%rbp), %xmm1
mulsd -0x18(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd 0x62bf(%rip), %xmm0     # 0xf018
mulsd -0x20(%rbp), %xmm0
movsd 0x62a2(%rip), %xmm2     # 0xf008
subsd -0x20(%rbp), %xmm2
movsd 0x62a5(%rip), %xmm1     # 0xf018
mulsd -0x20(%rbp), %xmm1
mulsd -0x20(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x8(%rbp), %xmm0
subsd -0x28(%rbp), %xmm0
movaps 0x62a5(%rip), %xmm1     # 0xf040
pand %xmm1, %xmm0
movsd -0x10(%rbp), %xmm1
subsd -0x30(%rbp), %xmm1
movaps 0x6290(%rip), %xmm2     # 0xf040
pand %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd 0x6270(%rip), %xmm1     # 0xf030
divsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x8(%rbp), %xmm0
subsd -0x10(%rbp), %xmm0
movaps 0x6266(%rip), %xmm1     # 0xf040
pand %xmm1, %xmm0
movsd 0x6232(%rip), %xmm1     # 0xf018
divsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
movsd 0x6211(%rip), %xmm0     # 0xf008
subsd -0x40(%rbp), %xmm0
mulsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x48(%rbp), %xmm0
popq %rbp
retq
nopl (%rax)
// File: tplinderoth[P]introDist/generalUtils.cpp
// Function: getCString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
char* getCString (std::string s)
{
	size_t slen = s.length();
	char* cstring = new char[slen + 1];
	s.copy(cstring, slen, 0);
	cstring[slen] = '\0';

	return cstring;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
callq 0x3410
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x1, %rdi
callq 0x3030
movq -0x20(%rbp), %rdi
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x3070
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: tplinderoth[P]introDist/generalUtils.cpp
// Function: getFILE(std::basic_fstream<char, std::char_traits<char>>&, char const*, char const*)
bool getFILE(std::fstream &fp, const char* fname, const char* mode)
{
	int writeFile = 0;
	if (strcmp(mode, "out") == 0)
	{
		writeFile = 1;
		if(writeFile && fexists(fname))
		{
			fprintf(stderr,"File already exists: %s\n",fname);
			return false;
		}

		fp.open(fname, std::ios::out);
	}
	else if (strcmp(mode, "app") == 0)
		fp.open(fname, std::ios::app);
	else if (strcmp(mode, "in") == 0)
		fp.open(fname, std::ios::in);

	if( !fp )
	{
		fprintf(stderr,"Error opening FILE handle for file: %s\n",fname);
		fp.close();
		return false;
	}
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x315a(%rip), %rsi      # 0xfce0
callq 0x33e0
cmpl $0x0, %eax
jne 0xcbe4
movl $0x1, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0xcbd0
movq -0x18(%rbp), %rdi
callq 0xcc90
cmpl $0x0, %eax
je 0xcbd0
movq 0x841e(%rip), %rax      # 0x14fd0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x3124(%rip), %rsi      # 0xfce4
movb $0x0, %al
callq 0x33f0
movb $0x0, -0x1(%rbp)
jmp 0xcc7d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x10, %edx
callq 0x32a0
jmp 0xcc38
movq -0x20(%rbp), %rdi
leaq 0x310e(%rip), %rsi      # 0xfcfd
callq 0x33e0
cmpl $0x0, %eax
jne 0xcc0d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0x32a0
jmp 0xcc36
movq -0x20(%rbp), %rdi
leaq 0x30e9(%rip), %rsi      # 0xfd01
callq 0x33e0
cmpl $0x0, %eax
jne 0xcc34
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x8, %edx
callq 0x32a0
jmp 0xcc36
jmp 0xcc38
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
callq 0x3170
testb $0x1, %al
jne 0xcc4e
jmp 0xcc79
movq 0x837b(%rip), %rax      # 0x14fd0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x30a1(%rip), %rsi      # 0xfd04
movb $0x0, %al
callq 0x33f0
movq -0x10(%rbp), %rdi
callq 0x3050
movb $0x0, -0x1(%rbp)
jmp 0xcc7d
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: tplinderoth[P]introDist/generalUtils.cpp
// Function: readChunk(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, unsigned int*, int*, std::istream&)
bool readChunk (std::vector<std::string>& datavec, unsigned int* chunk, int* end, std::istream& is)
{
	unsigned int i = 0;
	std::string(line);
	size_t cap = 0;

	if (!datavec.empty())
	{
		cap = datavec.capacity();
		datavec.clear();
		if (datavec.capacity() < cap)
			datavec.reserve(cap);
	}
	while (i < *chunk)
	{
		if (getline(is, line))
		{
			datavec.push_back(line);
			++i;
		}
		else if (is.eof())
		{
			datavec.resize(i); // remove empty elements
			*end = 1;
			*chunk = i; // number of lines processed upon returning
			return(true);
		}
		else
		{
			fprintf(stderr, "Failed reading stream in readChunk function\n");
			return(false);
		}
	}
	return(true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x33d0
movq $0x0, -0x58(%rbp)
movq -0x10(%rbp), %rdi
callq 0xd310
testb $0x1, %al
jne 0xcd62
movq -0x10(%rbp), %rdi
callq 0xd350
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
callq 0xd370
movq -0x10(%rbp), %rdi
callq 0xd350
cmpq -0x58(%rbp), %rax
jae 0xcd60
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0xd390
jmp 0xcd44
jmp 0xcd60
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x31b0
jmp 0xce5e
jmp 0xcd62
jmp 0xcd64
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jae 0xce3c
movq -0x28(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x30b0
movq %rax, -0x70(%rbp)
jmp 0xcd86
movq -0x70(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3390
movb %al, -0x71(%rbp)
jmp 0xcd9e
movb -0x71(%rbp), %al
testb $0x1, %al
jne 0xcda7
jmp 0xcdc1
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xd490
jmp 0xcdb6
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xce37
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3500
movb %al, -0x72(%rbp)
jmp 0xcdd9
movb -0x72(%rbp), %al
testb $0x1, %al
jne 0xcde2
jmp 0xce12
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %eax
movl %eax, %esi
callq 0xd500
jmp 0xcdf2
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movb $0x1, -0x1(%rbp)
movl $0x1, -0x68(%rbp)
jmp 0xce47
movq 0x81b7(%rip), %rax      # 0x14fd0
movq (%rax), %rdi
leaq 0x2f09(%rip), %rsi      # 0xfd2c
movb $0x0, %al
callq 0x33f0
movb $0x0, -0x1(%rbp)
movl $0x1, -0x68(%rbp)
jmp 0xce47
jmp 0xcd64
movb $0x1, -0x1(%rbp)
movl $0x1, -0x68(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x31b0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x34c0
nopw (%rax,%rax)
// File: tplinderoth[P]introDist/generalUtils.cpp
// Function: split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
std::vector<std::string> split (const std::string& s, char delim)
{
        std::vector<std::string> elems;
        std::stringstream ss(s);
        std::string sholder;
        while (std::getline(ss, sholder, delim))
        {
                if (!sholder.empty())
                        elems.push_back(sholder);
        }
        return elems;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rdi, -0x1f0(%rbp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, -0x1e8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movb $0x0, -0x12(%rbp)
callq 0xd590
movq -0x10(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movl $0x10, %edi
movl $0x8, %esi
callq 0xd5b0
movl %eax, -0x1d4(%rbp)
jmp 0xcec4
movl -0x1d4(%rbp), %edx
movq -0x1e0(%rbp), %rsi
leaq -0x1a0(%rbp), %rdi
callq 0x3440
jmp 0xcedf
leaq -0x1d0(%rbp), %rdi
callq 0x33d0
movsbl -0x11(%rbp), %edx
leaq -0x1a0(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x3520
movq %rax, -0x1f8(%rbp)
jmp 0xcf0b
movq -0x1f8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3390
movb %al, -0x1f9(%rbp)
jmp 0xcf29
movb -0x1f9(%rbp), %al
testb $0x1, %al
jne 0xcf35
jmp 0xcfa1
leaq -0x1d0(%rbp), %rdi
callq 0x3470
testb $0x1, %al
jne 0xcf9c
movq -0x1f0(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0xd490
jmp 0xcf5a
jmp 0xcf9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a8(%rbp)
movl %eax, -0x1ac(%rbp)
jmp 0xcfdf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a8(%rbp)
movl %eax, -0x1ac(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x31b0
leaq -0x1a0(%rbp), %rdi
callq 0x3210
jmp 0xcfdf
jmp 0xceeb
movb $0x1, -0x12(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x31b0
leaq -0x1a0(%rbp), %rdi
callq 0x3210
testb $0x1, -0x12(%rbp)
jne 0xcfcf
movq -0x1f0(%rbp), %rdi
callq 0xd5d0
movq -0x1e8(%rbp), %rax
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
movq -0x1f0(%rbp), %rdi
callq 0xd5d0
movq -0x1a8(%rbp), %rdi
callq 0x34c0
nopw (%rax,%rax)
// File: tplinderoth[P]introDist/generalUtils.cpp
// Function: AssertStyleException::what() const
const char* AssertStyleException::what() const throw()
{
        std::stringstream message;
        message << "Assert type exception occurred:\n";
        if (_error) message << _error;
        return message.str().c_str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x31f0
jmp 0xd178
leaq -0x180(%rbp), %rdi
leaq 0x2bd3(%rip), %rsi      # 0xfd59
callq 0x32c0
jmp 0xd18d
movq -0x1b8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xd1b6
movq -0x1b8(%rbp), %rax
leaq -0x180(%rbp), %rdi
movq 0x8(%rax), %rsi
callq 0x32c0
jmp 0xd1b4
jmp 0xd1b6
leaq -0x1b0(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x32b0
jmp 0xd1cb
leaq -0x1b0(%rbp), %rdi
callq 0x3140
movq %rax, -0x1c0(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x31b0
leaq -0x190(%rbp), %rdi
callq 0x3210
movq -0x1c0(%rbp), %rax
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
movq %rax, %rdi
callq 0x9bd0
nop
// File: tplinderoth[P]introDist/generalUtils.cpp
// Function: PreConditionException::what() const
const char* PreConditionException::what() const throw()
{
        std::stringstream message;
        message << "Precondition exception occurred:\n";
        if (_error) message << _error;
        return message.str().c_str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x31f0
jmp 0xd278
leaq -0x180(%rbp), %rdi
leaq 0x2af4(%rip), %rsi      # 0xfd7a
callq 0x32c0
jmp 0xd28d
movq -0x1b8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xd2b6
movq -0x1b8(%rbp), %rax
leaq -0x180(%rbp), %rdi
movq 0x8(%rax), %rsi
callq 0x32c0
jmp 0xd2b4
jmp 0xd2b6
leaq -0x1b0(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x32b0
jmp 0xd2cb
leaq -0x1b0(%rbp), %rdi
callq 0x3140
movq %rax, -0x1c0(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x31b0
leaq -0x190(%rbp), %rdi
callq 0x3210
movq -0x1c0(%rbp), %rax
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
movq %rax, %rdi
callq 0x9bd0
nop
// File: tdv[P]boss/boss/examples/construct_destroy/main.cpp
// Function: main
int main()
{
  try
  {
    Boss::Base<MyNs::Impl::Face_1_2_3>::Create(false);
    std::cout << std::endl;
    Boss::Base<MyNs::Impl::Face_1_2_3>::Create(true);
  }
  catch (std::exception const &e)
  {
    std::cerr << "Error: " << e.what() << std::endl;
  }
  return 0;
}

// Assembly:
subq $0x58, %rsp
movl $0x0, 0x54(%rsp)
movb $0x0, 0x47(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x47(%rsp), %rsi
callq 0x173d0
jmp 0x17232
leaq 0x48(%rsp), %rdi
callq 0x174d0
leaq 0xe421d(%rip), %rdi     # 0xfb460
leaq 0x6e856(%rip), %rsi     # 0x85aa0
callq 0x84cb0
jmp 0x17251
movb $0x1, 0x27(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x27(%rsp), %rsi
callq 0x173d0
jmp 0x17267
leaq 0x28(%rsp), %rdi
callq 0x174d0
jmp 0x172f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x17316
movq 0x38(%rsp), %rdi
callq 0x1a5b0
movq %rax, 0x18(%rsp)
leaq 0xe4095(%rip), %rdi     # 0xfb340
leaq 0xa6db6(%rip), %rsi     # 0xbe068
callq 0x861c0
movq %rax, 0x10(%rsp)
jmp 0x172be
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x861c0
movq %rax, 0x8(%rsp)
jmp 0x172e0
movq 0x8(%rsp), %rdi
leaq 0x6e7b4(%rip), %rsi     # 0x85aa0
callq 0x84cb0
jmp 0x172f3
callq 0x1a620
xorl %eax, %eax
addq $0x58, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
callq 0x1a620
jmp 0x17314
jmp 0x17316
movq 0x38(%rsp), %rdi
callq 0xbab10
movq %rax, %rdi
callq 0x174f0
nopl (%rax,%rax)
// File: jBlinden[P]private-codis/ProtocolServer.cpp
// Function: main
int main(int argc, char **argv)
{
  if (argc < 4)
  {
    cout << "usage: ./ProtocolServer ProtocolArgsFile serverDataDir port" << endl;
    return 1;
  }

  srand(time(NULL));

  ServerLog("finished loading data from disk");

  int port = atoi(argv[3]);

  string pArgsFile(argv[1]);
  string serverDataDir(argv[2]);

  StartServer(port, pArgsFile, serverDataDir);
}

// Assembly:
subq $0x108, %rsp            # imm = 0x108
movl $0x0, 0x104(%rsp)
movl %edi, 0x100(%rsp)
movq %rsi, 0xf8(%rsp)
cmpl $0x4, 0x100(%rsp)
jge 0x428d
movq 0x7d76(%rip), %rdi      # 0xbfd8
leaq 0x4e4f(%rip), %rsi      # 0x90b8
callq 0x2250
movq %rax, %rdi
movq 0x7d48(%rip), %rsi      # 0xbfc0
callq 0x22a0
movl $0x1, 0x104(%rsp)
jmp 0x4404
xorl %eax, %eax
movl %eax, %edi
callq 0x2210
movl %eax, %edi
callq 0x2230
leaq 0xd7(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x2420
movq 0x28(%rsp), %rdx
leaq 0x4e39(%rip), %rsi      # 0x90f4
leaq 0xd8(%rsp), %rdi
callq 0x2350
jmp 0x42ca
leaq 0xd8(%rsp), %rdi
callq 0x3d90
jmp 0x42d9
leaq 0xd8(%rsp), %rdi
callq 0x2170
leaq 0xd7(%rsp), %rdi
callq 0x22b0
movq 0xf8(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x23c0
movl %eax, 0xc0(%rsp)
movq 0xf8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
leaq 0x9f(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x2420
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0xa0(%rsp), %rdi
callq 0x2350
jmp 0x4347
leaq 0x9f(%rsp), %rdi
callq 0x22b0
movq 0xf8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x8(%rsp)
leaq 0x77(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x2420
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x78(%rsp), %rdi
callq 0x2350
jmp 0x438a
leaq 0x77(%rsp), %rdi
callq 0x22b0
movl 0xc0(%rsp), %eax
movl %eax, 0x4(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x2110
jmp 0x43b3
leaq 0x30(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x2110
jmp 0x43c4
movl 0x4(%rsp), %edi
leaq 0x50(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x3e30
jmp 0x43d9
leaq 0x30(%rsp), %rdi
callq 0x2170
leaq 0x50(%rsp), %rdi
callq 0x2170
leaq 0x78(%rsp), %rdi
callq 0x2170
leaq 0xa0(%rsp), %rdi
callq 0x2170
movl 0x104(%rsp), %eax
addq $0x108, %rsp            # imm = 0x108
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
jmp 0x444a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x2170
leaq 0xd7(%rsp), %rdi
callq 0x22b0
jmp 0x450d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
leaq 0x9f(%rsp), %rdi
callq 0x22b0
jmp 0x450d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
leaq 0x77(%rsp), %rdi
callq 0x22b0
jmp 0x4500
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
jmp 0x44f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
jmp 0x44ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x2170
leaq 0x50(%rsp), %rdi
callq 0x2170
leaq 0x78(%rsp), %rdi
callq 0x2170
leaq 0xa0(%rsp), %rdi
callq 0x2170
movq 0xc8(%rsp), %rdi
callq 0x2410
nopw (%rax,%rax)
// File: bummelbaerchen[P]e3dc/RscpExampleMain.cpp
// Function: ControlLoadData(SRscpFrameBuffer*, int, int)
int ControlLoadData(SRscpFrameBuffer * frameBuffer,int32_t Power,int32_t Mode ) {
    RscpProtocol protocol;
    SRscpValue rootValue;
    // The root container is create with the TAG ID 0 which is not used by any device.
    protocol.createContainerValue(&rootValue, 0);
    
    // request Power Meter information
    SRscpValue PMContainer;
//    Power = Power*-1;
    protocol.createContainerValue(&PMContainer, TAG_EMS_REQ_SET_POWER);
    protocol.appendValue(&PMContainer, TAG_EMS_REQ_SET_POWER_MODE,Mode);
    if (Mode > 0)
    protocol.appendValue(&PMContainer, TAG_EMS_REQ_SET_POWER_VALUE,Power);
    // append sub-container to root container
    protocol.appendValue(&rootValue, PMContainer);
    // free memory of sub-container as it is now copied to rootValue
    protocol.destroyValueData(PMContainer);
 
    
    
    
    // create buffer frame to send data to the S10
    protocol.createFrameAsBuffer(frameBuffer, rootValue.data, rootValue.length, true); // true to calculate CRC on for transfer
    // the root value object should be destroyed after the data is copied into the frameBuffer and is not needed anymore
    protocol.destroyValueData(rootValue);
    
    return 0;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movl %esi, 0x5c(%rsp)
movl %edx, 0x58(%rsp)
leaq 0x50(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xadf0
movq 0x8(%rsp), %rdi
movl $0x0, 0x3c(%rsp)
leaq 0x41(%rsp), %rsi
leaq 0x3c(%rsp), %rdx
callq 0x8d50
jmp 0x24ce
movl $0x1000030, 0x18(%rsp)  # imm = 0x1000030
leaq 0x50(%rsp), %rdi
leaq 0x1d(%rsp), %rsi
leaq 0x18(%rsp), %rdx
callq 0x8d50
jmp 0x24ec
movl $0x1000031, 0x14(%rsp)  # imm = 0x1000031
leaq 0x50(%rsp), %rdi
leaq 0x1d(%rsp), %rsi
leaq 0x14(%rsp), %rdx
leaq 0x58(%rsp), %rcx
callq 0x8d90
jmp 0x250f
cmpl $0x0, 0x58(%rsp)
jle 0x2555
movl $0x1000032, 0x10(%rsp)  # imm = 0x1000032
leaq 0x50(%rsp), %rdi
leaq 0x1d(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x5c(%rsp), %rcx
callq 0x8d90
jmp 0x2539
jmp 0x2555
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xae10
jmp 0x25bf
leaq 0x50(%rsp), %rdi
leaq 0x41(%rsp), %rsi
leaq 0x1d(%rsp), %rdx
callq 0x8de0
jmp 0x256b
leaq 0x50(%rsp), %rdi
leaq 0x1d(%rsp), %rsi
callq 0x8eb0
jmp 0x257c
movq 0x60(%rsp), %rsi
movq 0x48(%rsp), %rdx
movzwl 0x46(%rsp), %ecx
leaq 0x50(%rsp), %rdi
movl $0x1, %r8d
callq 0xb040
jmp 0x259d
leaq 0x50(%rsp), %rdi
leaq 0x41(%rsp), %rsi
callq 0x8eb0
jmp 0x25ae
leaq 0x50(%rsp), %rdi
callq 0xae10
xorl %eax, %eax
addq $0x68, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x2300
nopl (%rax)
// File: bummelbaerchen[P]e3dc/RscpExampleMain.cpp
// Function: ControlLoadData2(SRscpFrameBuffer*, int)
int ControlLoadData2(SRscpFrameBuffer * frameBuffer,int32_t iPower) {
    RscpProtocol protocol;
    SRscpValue rootValue;
    uint32_t uPower;
    if (iPower < 0) uPower = 0; else if (iPower>e3dc_config.maximumLadeleistung) uPower = e3dc_config.maximumLadeleistung; else uPower = iPower;
    // The root container is create with the TAG ID 0 which is not used by any device.
    protocol.createContainerValue(&rootValue, 0);
    
    // request Power Meter information
    SRscpValue PMContainer;
    protocol.createContainerValue(&PMContainer, TAG_EMS_REQ_SET_POWER_SETTINGS);
    protocol.appendValue(&PMContainer, TAG_EMS_POWER_LIMITS_USED,true);
   protocol.appendValue(&PMContainer, TAG_EMS_MAX_CHARGE_POWER,uPower);
//    protocol.appendValue(&PMContainer, TAG_EMS_MAX_DISCHARGE_POWER,300);
//    protocol.appendValue(&PMContainer, TAG_EMS_DISCHARGE_START_POWER,70);
    // append sub-container to root container
    protocol.appendValue(&rootValue, PMContainer);
    // free memory of sub-container as it is now copied to rootValue
    protocol.destroyValueData(PMContainer);
    
    
    
    
    // create buffer frame to send data to the S10
    protocol.createFrameAsBuffer(frameBuffer, rootValue.data, rootValue.length, true); // true to calculate CRC on for transfer
    // the root value object should be destroyed after the data is copied into the frameBuffer and is not needed anymore
    protocol.destroyValueData(rootValue);
    
    return 0;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movl %esi, 0x5c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xadf0
cmpl $0x0, 0x5c(%rsp)
jge 0x25f8
movl $0x0, 0x3c(%rsp)
jmp 0x261a
movl 0x5c(%rsp), %eax
cmpl 0x241ba(%rip), %eax     # 0x267bc
jle 0x2610
movl 0x241b2(%rip), %eax     # 0x267bc
movl %eax, 0x3c(%rsp)
jmp 0x2618
movl 0x5c(%rsp), %eax
movl %eax, 0x3c(%rsp)
jmp 0x261a
movl $0x0, 0x38(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x41(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x8d50
jmp 0x2638
movl $0x100008c, 0x18(%rsp)  # imm = 0x100008C
leaq 0x50(%rsp), %rdi
leaq 0x1d(%rsp), %rsi
leaq 0x18(%rsp), %rdx
callq 0x8d50
jmp 0x2656
movl $0x1000100, 0x14(%rsp)  # imm = 0x1000100
movb $0x1, 0x13(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x1d(%rsp), %rsi
leaq 0x14(%rsp), %rdx
leaq 0x13(%rsp), %rcx
callq 0x8ee0
jmp 0x267e
movl $0x1000101, 0xc(%rsp)   # imm = 0x1000101
leaq 0x50(%rsp), %rdi
leaq 0x1d(%rsp), %rsi
leaq 0xc(%rsp), %rdx
leaq 0x3c(%rsp), %rcx
callq 0x8f30
jmp 0x26a1
leaq 0x50(%rsp), %rdi
leaq 0x41(%rsp), %rsi
leaq 0x1d(%rsp), %rdx
callq 0x8de0
jmp 0x26b7
leaq 0x50(%rsp), %rdi
leaq 0x1d(%rsp), %rsi
callq 0x8eb0
jmp 0x26c8
movq 0x60(%rsp), %rsi
movq 0x48(%rsp), %rdx
movzwl 0x46(%rsp), %ecx
leaq 0x50(%rsp), %rdi
movl $0x1, %r8d
callq 0xb040
jmp 0x26e9
leaq 0x50(%rsp), %rdi
leaq 0x41(%rsp), %rsi
callq 0x8eb0
jmp 0x26fa
leaq 0x50(%rsp), %rdi
callq 0xae10
xorl %eax, %eax
addq $0x68, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xae10
movq 0x30(%rsp), %rdi
callq 0x2300
nopl (%rax)