LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/kelvinabrokwa[P]bottleneck/bottleneckDist.cpp
// Function: main
int main(int argc, char* argv[])
{
    // must pass in two args, one for each persdia file, so #argc = 1 + 2
    // may also want to pass in max_gen later
    if (argc < 3 || argc > 4) {
        cout
            << endl
            << "Must pass in filename1 and filename2"
            << endl
            << "to find the distance between diagrams."
            << endl;
        return -1;
    }

    // file names
    char* file1 = argv[1];
    char* file2 = argv[2];

    CBottleneckDistance d;

    double max_gen = 1;

    // compute the distance between persistence diagrams
    double distance = d.Distance(file1, file2, max_gen);

    cout << distance << endl;

    return 0;
}

// Assembly:
pushq %rbx
subq $0xc0, %rsp
addl $-0x5, %edi
cmpl $-0x3, %edi
ja 0x1b71
movq 0x549f(%rip), %rdi      # 0x6fd8
callq 0x1080
leaq 0x2576(%rip), %rsi      # 0x40bb
movq %rax, %rdi
callq 0x10d0
movq %rax, %rdi
callq 0x1080
leaq 0x2584(%rip), %rsi      # 0x40e0
movq %rax, %rdi
callq 0x10d0
movq %rax, %rdi
callq 0x1080
pushq $-0x1
popq %rax
jmp 0x1bed
movq 0x8(%rsi), %rax
movq 0x10(%rsi), %rdx
leaq 0x5218(%rip), %rcx      # 0x6d98
leaq 0x8(%rsp), %rdi
movq %rcx, (%rdi)
andw $0x0, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movups %xmm0, 0x78(%rdi)
movups %xmm0, 0x88(%rdi)
movups %xmm0, 0x98(%rdi)
movups %xmm0, 0xa8(%rdi)
movsd 0x2453(%rip), %xmm0     # 0x4018
movq %rax, %rsi
callq 0x1acc
movq 0x5404(%rip), %rdi      # 0x6fd8
callq 0x1120
movq %rax, %rdi
callq 0x1080
leaq 0x8(%rsp), %rdi
callq 0x1348
xorl %eax, %eax
addq $0xc0, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1348
movq %rbx, %rdi
callq 0x1150
nop
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH04_Expressions/examples/vec_init.cc
// Function: main
int main()
{
    
    vector<int> ivec;                // empty vector
    int cnt = 10;
    // add elements 10 . . . 1 to ivec
    while (cnt > 0)
        ivec.push_back(cnt--);       // int postfix decrement

    auto iter = ivec.begin();
    // prints 10 9 8 . . . 1 
    while (iter != ivec.end())
        cout << *iter++ << endl; // iterator postfix increment

	vector<int> vec2(10, 0);  // ten elements initially all 0
    cnt = vec2.size();
    // assign values from size . . . 1 to the elements in vec2
    for(vector<int>::size_type ix = 0; 
                    ix != vec2.size(); ++ix, --cnt)   
        vec2[ix] = cnt;

    iter = vec2.begin();
    // prints 10 9 8 . . . 1 
    while (iter != vec2.end())
        cout << *iter++ << endl; // iterator postfix increment

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %rbx
andq $0x0, 0x10(%rbx)
movaps %xmm0, (%rbx)
pushq $0xa
popq %rax
leaq -0x38(%rbp), %r14
movl %eax, %r15d
subl $0x1, %r15d
jb 0x127b
movl %eax, -0x38(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x13f6
movl %r15d, %eax
jmp 0x1262
movq -0x60(%rbp), %r14
movq 0x2d52(%rip), %rbx      # 0x3fd8
cmpq -0x58(%rbp), %r14
je 0x12a5
movl (%r14), %esi
movq %rbx, %rdi
callq 0x10e0
addq $0x4, %r14
movq %rax, %rdi
callq 0x1060
jmp 0x1286
leaq -0x3c(%rbp), %rdx
andl $0x0, (%rdx)
leaq -0x38(%rbp), %rdi
pushq $0xa
popq %rsi
leaq -0x19(%rbp), %rcx
callq 0x134a
movq -0x38(%rbp), %r14
movq -0x30(%rbp), %rax
subq %r14, %rax
sarq $0x2, %rax
xorl %ecx, %ecx
movl %eax, %edx
cmpq %rcx, %rax
je 0x12df
movl %edx, (%r14,%rcx,4)
incq %rcx
decl %edx
jmp 0x12cf
movq 0x2cf2(%rip), %rbx      # 0x3fd8
cmpq -0x30(%rbp), %r14
je 0x1305
movl (%r14), %esi
movq %rbx, %rdi
callq 0x10e0
addq $0x4, %r14
movq %rax, %rdi
callq 0x1060
jmp 0x12e6
leaq -0x38(%rbp), %rdi
callq 0x13b8
leaq -0x60(%rbp), %rdi
callq 0x13b8
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1336
jmp 0x1336
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x13b8
jmp 0x1339
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x13b8
movq %rbx, %rdi
callq 0x10f0
// File: /workspace/github_cpp_makefile_star2_O2/biotomas[P]ipasir/app/genipafolio/genipafolio.cpp
// Function: loadFormula(std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&, char const*)
bool loadFormula(vector<vector<int> >& clauses, const char* filename) {
	FILE* f = fopen(filename, "r");
	if (f == NULL) {
		return false;
	}
	int c = 0;
	bool neg = false;
	vector<int> cls;
	while (c != EOF) {
		c = fgetc(f);
		// comment or problem definition line
		if (c == 'c' || c == 'p') {
			// skip this line
			while(c != '\n') {
				c = fgetc(f);
			}
			continue;
		}
		// whitespace
		if (isspace(c)) {
			continue;
		}
		// negative
		if (c == '-') {
			neg = true;
			continue;
		}
		// number
		if (isdigit(c)) {
			int num = c - '0';
			c = fgetc(f);
			while (isdigit(c)) {
				num = num*10 + (c-'0');
				c = fgetc(f);
			}
			if (neg) {
				num *= -1;
			}
			neg = false;
			if (num != 0) {
				cls.push_back(num);
			} else {
				clauses.push_back(vector<int>(cls));
				cls.clear();
			}
		}
	}
	fclose(f);
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rax
movq %rdi, %r14
leaq 0x10640(%rip), %rsi     # 0x119d7
movq %rax, %rdi
callq 0x11a0
movq %rax, %rbx
testq %rax, %rax
je 0x14ad
movq %r14, 0x28(%rsp)
leaq 0x10(%rsp), %r15
andq $0x0, 0x10(%r15)
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
xorl %ebp, %ebp
pushq $0xa
popq %r12
xorl %r13d, %r13d
movq %rbx, %rdi
cmpl $-0x1, %ebp
je 0x149e
callq 0x1230
movl %eax, %ebp
cmpl $0x70, %eax
je 0x1411
cmpl $0x63, %ebp
je 0x1411
movl %ebp, %edi
callq 0x1040
testl %eax, %eax
jne 0x13ca
cmpl $0x2d, %ebp
sete %r14b
je 0x145e
movl %ebp, %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x13ca
jmp 0x1420
movq %rbx, %rdi
callq 0x1230
movl %eax, %ebp
cmpl $0xa, %ebp
jne 0x1407
movl %r12d, %ebp
jmp 0x13ca
imull $0xa, %eax, %eax
addl %ecx, %eax
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
callq 0x1230
movl %eax, %ebp
leal -0x30(%rbp), %ecx
movl 0xc(%rsp), %eax
cmpl $0x9, %ecx
jbe 0x141b
testb $0x1, %r13b
je 0x1446
negl %eax
movl %eax, 0xc(%rsp)
leaq 0x30(%rsp), %r13
testl %eax, %eax
je 0x146b
movq %r15, %rdi
leaq 0xc(%rsp), %rsi
callq 0x1726
jmp 0x1463
pushq $0x2d
popq %rax
movl %eax, %ebp
movl %r14d, %r13d
jmp 0x13ca
movq %r13, %rdi
movq %r15, %rsi
callq 0x1744
movq 0x28(%rsp), %rdi
movq %r13, %rsi
callq 0x19d2
movq %r13, %rdi
callq 0x1836
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x1463
movq %rax, 0x18(%rsp)
jmp 0x1463
callq 0x1140
leaq 0x10(%rsp), %rdi
callq 0x1836
testq %rbx, %rbx
setne %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x1836
jmp 0x14d6
jmp 0x14d3
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1836
movq %rbx, %rdi
callq 0x1260
// File: /workspace/github_cpp_makefile_star2_O2/biotomas[P]ipasir/app/genipafolio/genipafolio.cpp
// Function: solverThread(void*)
void* solverThread(void* solver) {
	int res = ipasir_solve(solver);
	printf("c [genipafolio] solver stopped, res = %d\n", res);
	if (res != 0) {
		result = res;
	}
	return NULL;
}

// Assembly:
pushq %rbx
callq 0x1ce5
movl %eax, %ebx
leaq 0xdb06(%rip), %rdi      # 0xf004
movl %eax, %esi
xorl %eax, %eax
callq 0x1030
testl %ebx, %ebx
je 0x1511
movl %ebx, 0x14c4b(%rip)     # 0x1615c
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/ostafen[P]Fast-Insertion-Sort/src/test.cpp
// Function: compare(int*, int*, int)
bool compare(int *A, int *B, int size)
{
    for (int i = 0; i < size; i++)
    {
        if (A[i] != B[i])
        {
            return false;
        }
    }
    return true;
}

// Assembly:
xorl %r8d, %r8d
testl %edx, %edx
movl $0x0, %eax
cmovgl %edx, %eax
movq %r8, %rcx
cmpq %r8, %rax
je 0x238f
movl (%rdi,%rcx,4), %r9d
leaq 0x1(%rcx), %r8
cmpl (%rsi,%rcx,4), %r9d
je 0x2379
movslq %edx, %rax
cmpq %rax, %rcx
setge %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/illmat[P]MemCrawl/maps.cpp
// Function: getRegions(std::vector<scanRegion, std::allocator<scanRegion>>&, int)
int getRegions(std::vector<scanRegion> &regions, pid_t pid)
{
    std::stringstream path;
    path << "/proc/" << pid << "/maps";
    std::cout << "path:" << path.str() << std::endl;
    FILE *fp;
    char *line = NULL;
    size_t len = 0;
    ssize_t read;

    fp = fopen(path.str().c_str(), "r");
    if (fp == NULL)
    {
        std::cout << "unable to open file" << std::endl;
        return 1;
    }

    scanRegion lineBuffer;
    char readable, writeable;

    while ((read = getline(&line, &len, fp)) != -1)
    {
        if (sscanf(line, "%lx-%lx %c%c", &lineBuffer.startRegion, &lineBuffer.endRegion, &readable, &writeable) >= 4)
        {
            if ((readable == 'r') && (writeable == 'w'))
            {
                regions.push_back(lineBuffer);
            }
        }

    }
    fclose(fp);
    free(line);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movl %esi, %ebx
movq %rdi, -0x40(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x2120
leaq -0x1e0(%rbp), %rdi
leaq 0xebd(%rip), %rsi       # 0x4159
callq 0x21d0
movq %rax, %rdi
movl %ebx, %esi
callq 0x22f0
leaq 0xeae(%rip), %rsi       # 0x4160
movq %rax, %rdi
callq 0x21d0
movq 0x3d0f(%rip), %rdi      # 0x6fd0
leaq 0xe9e(%rip), %rsi       # 0x4166
callq 0x21d0
movq %rax, %r14
leaq -0x1d8(%rbp), %rbx
leaq -0x68(%rbp), %rdi
movq %rbx, %rsi
callq 0x2290
leaq -0x68(%rbp), %rsi
movq %r14, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20d0
leaq -0x68(%rbp), %rdi
callq 0x20b0
andq $0x0, -0x38(%rbp)
andq $0x0, -0x48(%rbp)
leaq -0x68(%rbp), %rdi
movq %rbx, %rsi
callq 0x2290
leaq -0x68(%rbp), %rbx
movq (%rbx), %rdi
leaq 0xe48(%rip), %rsi       # 0x416c
callq 0x2220
movq %rax, %r14
movq %rbx, %rdi
callq 0x20b0
testq %r14, %r14
je 0x33b1
leaq -0x48(%rbp), %r13
leaq -0x68(%rbp), %r15
leaq -0x2a(%rbp), %rbx
leaq -0x29(%rbp), %r12
leaq -0x38(%rbp), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x2260
cmpq $-0x1, %rax
je 0x339c
movq -0x38(%rbp), %rdi
leaq 0xe19(%rip), %rsi       # 0x4182
movq %r15, %rdx
leaq -0x60(%rbp), %rcx
movq %rbx, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0x21c0
cmpl $0x4, %eax
jl 0x3349
cmpb $0x72, -0x2a(%rbp)
jne 0x3349
cmpb $0x77, -0x29(%rbp)
jne 0x3349
movq -0x40(%rbp), %rdi
movq %r15, %rsi
callq 0x341c
jmp 0x3349
movq %r14, %rdi
callq 0x21e0
movq -0x38(%rbp), %rdi
callq 0x2230
xorl %ebx, %ebx
jmp 0x33cf
movq 0x3c18(%rip), %rdi      # 0x6fd0
leaq 0xdaf(%rip), %rsi       # 0x416e
callq 0x21d0
movq %rax, %rdi
callq 0x20d0
pushq $0x1
popq %rbx
leaq -0x1f0(%rbp), %rdi
callq 0x2140
movl %ebx, %eax
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3405
jmp 0x3405
jmp 0x3405
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x20b0
jmp 0x3408
jmp 0x3405
movq %rax, %rbx
leaq -0x1f0(%rbp), %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x2300
// File: /workspace/github_cpp_makefile_star2_O2/illmat[P]MemCrawl/menu.cpp
// Function: string2int(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int string2int( const std::string& a )
{
    // Convert a string representation of a number into a floating point value.
    // Throws an int if the string contains anything but whitespace and a valid
    // numeric representation.
    //
    int result;
    std::string s( a );

    // Get rid of any trailing whitespace
    s.erase( s.find_last_not_of( " \f\n\r\t\v" ) + 1 );

    // Read it into the target type
    std::istringstream ss( s );
    ss >> result;

    // Check to see that there is nothing left over
    if (!ss.eof())
        throw 1;

    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, %rsi
leaq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0x2270
leaq 0xc2d(%rip), %rsi       # 0x41a9
pushq $-0x1
popq %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2320
leaq 0x1(%rax), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2050
leaq -0x1b8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
pushq $0x8
popq %rdx
callq 0x22d0
leaq -0x1b8(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x2100
movq -0x1b8(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x198(%rbp,%rax)
je 0x35f8
movl -0x14(%rbp), %ebx
leaq -0x1b8(%rbp), %rdi
callq 0x20c0
leaq -0x38(%rbp), %rdi
callq 0x20b0
movl %ebx, %eax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x4
popq %rdi
callq 0x20e0
movl $0x1, (%rax)
movq 0x39ab(%rip), %rsi      # 0x6fb8
movq %rax, %rdi
xorl %edx, %edx
callq 0x22e0
jmp 0x3619
movq %rax, %rbx
jmp 0x362d
movq %rax, %rbx
leaq -0x1b8(%rbp), %rdi
callq 0x20c0
leaq -0x38(%rbp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x2300
nop
// File: /workspace/github_cpp_makefile_star2_O2/illmat[P]MemCrawl/myPtrace.cpp
// Function: attach(int)
int attach(pid_t pid)
{
    int status;
    if(ptrace(PTRACE_ATTACH, pid, NULL, NULL))
    {
        perror("PTRACE_ATTACH");
        return 1;
    }
    std::cout << "attached to " << pid << std::endl << "wait for child" << std::endl;
    wait(&status);
    std::cout << "Status: " << status << std::endl;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %r15d
xorl %ebx, %ebx
pushq $0x10
popq %rdi
movl %r15d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x2180
testq %rax, %rax
jne 0x36e0
movq 0x3964(%rip), %r14      # 0x6fd0
leaq 0xb4b(%rip), %rsi       # 0x41be
movq %r14, %rdi
callq 0x21d0
movq %rax, %rdi
movl %r15d, %esi
callq 0x22f0
movq %rax, %rdi
callq 0x20d0
leaq 0xb36(%rip), %rsi       # 0x41cb
movq %rax, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20d0
leaq -0x1c(%rbp), %r15
movq %r15, %rdi
callq 0x2250
leaq 0xb22(%rip), %rsi       # 0x41da
movq %r14, %rdi
callq 0x21d0
movl (%r15), %esi
movq %rax, %rdi
callq 0x22f0
movq %rax, %rdi
callq 0x20d0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xac9(%rip), %rdi       # 0x41b0
callq 0x2170
pushq $0x1
popq %rbx
jmp 0x36d3
// File: /workspace/github_cpp_makefile_star2_O2/illmat[P]MemCrawl/myPtrace.cpp
// Function: detach(int)
int detach(pid_t pid)
{
    if(ptrace(PTRACE_DETACH, pid, NULL, NULL))
    {
        perror("PTRACE_DETACH");
        return 1;
    }
    std::cout << "detached from " << pid << std::endl;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %r14d
xorl %ebx, %ebx
pushq $0x11
popq %rdi
movl %r14d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x2180
testq %rax, %rax
jne 0x3740
movq 0x38b6(%rip), %rdi      # 0x6fd0
leaq 0xad0(%rip), %rsi       # 0x41f1
callq 0x21d0
movq %rax, %rdi
movl %r14d, %esi
callq 0x22f0
movq %rax, %rdi
callq 0x20d0
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xa9c(%rip), %rdi       # 0x41e3
callq 0x2170
pushq $0x1
popq %rbx
jmp 0x3739
// File: /workspace/github_cpp_makefile_star2_O2/illmat[P]MemCrawl/myPtrace.cpp
// Function: peek(int, unsigned long, long&)
int peek(pid_t pid, unsigned long addr, long &buffer)
{
    errno = 0;
    if(((buffer = ptrace(PTRACE_PEEKDATA, pid, (void *)addr, NULL)) == -1) && errno)
    {
        perror("PTRACE_PEEKDATA");
        if(ptrace(PTRACE_DETACH, pid, NULL, NULL))
            perror("PTRACE_DETACH");
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r13
movl %edi, %ebx
callq 0x2030
movq %rax, %r15
andl $0x0, (%rax)
xorl %r14d, %r14d
pushq $0x2
popq %rdi
movl %ebx, %esi
movq %r13, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x2180
movq %rax, (%r12)
cmpq $-0x1, %rax
jne 0x3796
cmpl $0x0, (%r15)
jne 0x37a8
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa51(%rip), %rdi       # 0x4200
callq 0x2170
pushq $0x11
popq %rdi
movl %ebx, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x2180
pushq $0x1
popq %r14
testq %rax, %rax
je 0x3796
leaq 0xa0f(%rip), %rdi       # 0x41e3
callq 0x2170
jmp 0x3796
// File: /workspace/github_cpp_makefile_star2_O2/illmat[P]MemCrawl/myPtrace.cpp
// Function: poke(int, unsigned long, long)
int poke(pid_t pid, unsigned long addr, long buffer)
{
    errno = 0;
    if (ptrace(PTRACE_POKEDATA, pid, (void *)addr, buffer) == -1 && errno)
    {
        perror("PTRACE_POKE");
        return 1;
    }
    std::cout << "successfully wrote " << buffer << " to " << std::hex << "0x" << addr << std::dec << std::endl;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movl %edi, %r13d
callq 0x2030
movq %rax, %r12
andl $0x0, (%rax)
xorl %ebx, %ebx
pushq $0x5
popq %rdi
movl %r13d, %esi
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x2180
cmpq $-0x1, %rax
jne 0x3823
cmpl $0x0, (%r12)
jne 0x38ad
movq 0x37a6(%rip), %rdi      # 0x6fd0
leaq 0x9eb(%rip), %rsi       # 0x421c
callq 0x21d0
movq %rax, %rdi
movq %r15, %rsi
callq 0x21b0
leaq 0x97e(%rip), %rsi       # 0x41c6
movq %rax, %rdi
callq 0x21d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x9c4(%rip), %rsi       # 0x4230
movq %rax, %rdi
callq 0x21d0
movq %rax, %rdi
movq %r14, %rsi
callq 0x2110
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
callq 0x20d0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x95c(%rip), %rdi       # 0x4210
callq 0x2170
pushq $0x1
popq %rbx
jmp 0x389c
nop
// File: /workspace/github_cpp_makefile_star2_O2/illmat[P]MemCrawl/print.cpp
// Function: printHelp()
void printHelp() {
    std::cout << "MemCrawl options: " << std::endl;
    std::cout << "help:\t\tprints this help screen" << std::endl;
    std::cout << "list:\t\tprints a list of all entries" << std::endl;
    std::cout << "update:\t\tupdates all entries" << std::endl;
    std::cout << "ulist:\t\tupdates and lists all entries" << std::endl;
    std::cout << "info:\t\tprints info about scan regions" << std::endl;
    std::cout << "set <number>:\tsets all entries to <number>" << std::endl;
    std::cout << "reset:\t\tresets all entries" << std::endl;
    std::cout << "pid:\t\tchange to pid" << std::endl;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x35cc(%rip), %rbx      # 0x6fd0
leaq 0x843(%rip), %rsi       # 0x424e
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20d0
leaq 0x83f(%rip), %rsi       # 0x4261
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20d0
leaq 0x847(%rip), %rsi       # 0x4280
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20d0
leaq 0x854(%rip), %rsi       # 0x42a4
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20d0
leaq 0x85a(%rip), %rsi       # 0x42c1
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20d0
leaq 0x869(%rip), %rsi       # 0x42e7
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20d0
leaq 0x878(%rip), %rsi       # 0x430d
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20d0
leaq 0x88c(%rip), %rsi       # 0x4338
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20d0
leaq 0x890(%rip), %rsi       # 0x4353
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x20d0
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/illmat[P]MemCrawl/scan.cpp
// Function: scanIntInit(std::vector<scanRegion, std::allocator<scanRegion>>, std::vector<scanResult, std::allocator<scanResult>>&, int, int)
int scanIntInit(std::vector<scanRegion> regions, std::vector<scanResult> &results, pid_t pid, int scanValue)
{
    unsigned long startAddr = 0, endAddr = 0;
    long buffer = 0;

    if (attach(pid) != 0)
    {
        return 1;
    }
    for (unsigned int x=0; x<regions.size(); x++)
    {
        scanResult result;
        startAddr = regions[x].startRegion;
        endAddr = regions[x].endRegion;

        while (startAddr < endAddr)
        {

            if (peek(pid, startAddr, buffer) != 0)
            {
                return 1;
            }
            if (buffer == scanValue)
            {
                result.addr = startAddr;
                result.value = buffer;
                results.push_back(result);
            }
            startAddr += sizeof(unsigned long);

         }

    }


    detach(pid);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %r14d
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r13
andq $0x0, -0x38(%rbp)
movl %edx, %edi
callq 0x3640
pushq $0x1
popq %rcx
testl %eax, %eax
jne 0x3b8a
movq %r15, -0x48(%rbp)
movl %r14d, -0x2c(%rbp)
movslq %r14d, %r12
xorl %r14d, %r14d
movq %r13, -0x40(%rbp)
movl %r14d, %r14d
movq (%r13), %rax
movq 0x8(%r13), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %r14, %rcx
jbe 0x3b9b
movq %r14, %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %r13
movq 0x8(%rax,%rcx), %r15
cmpq %r15, %r13
jae 0x3b7e
movl %ebx, %edi
movq %r13, %rsi
leaq -0x38(%rbp), %rdx
callq 0x3751
testl %eax, %eax
jne 0x3b87
cmpq %r12, -0x38(%rbp)
jne 0x3b78
movq %r13, -0x58(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x3d92
addq $0x8, %r13
jmp 0x3b44
incl %r14d
movq -0x40(%rbp), %r13
jmp 0x3b1d
pushq $0x1
popq %rcx
movl %ecx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebx, %edi
callq 0x36f1
xorl %ecx, %ecx
jmp 0x3b8a
// File: /workspace/github_cpp_makefile_star2_O2/illmat[P]MemCrawl/scan.cpp
// Function: scanIntResults(std::vector<scanResult, std::allocator<scanResult>>&, int, int)
int scanIntResults(std::vector<scanResult> &results, pid_t pid, int scanValue)
{
    long buffer = 0;
    scanResult result;
    std::vector<scanResult> newResults;

    if (attach(pid) != 0)
    {
        return 1;
    }
    for (unsigned int x=0; x<results.size(); x++)
    {
        if (peek(pid, results[x].addr, buffer) != 0)
        {
            return 1;
        }
        if (buffer == scanValue)
        {
            result.addr = results[x].addr;
            result.value = buffer;
            newResults.push_back(result);
        }

    }

    results = newResults;
    detach(pid);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, -0x2c(%rbp)
movl %esi, %ebx
movq %rdi, %r15
andq $0x0, -0x38(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
andq $0x0, -0x40(%rbp)
movl %esi, %edi
callq 0x3640
pushq $0x1
popq %r14
testl %eax, %eax
jne 0x3c5b
movslq -0x2c(%rbp), %r14
xorl %r12d, %r12d
movl %r12d, %r12d
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %r12, %rcx
jbe 0x3c3f
movq %r12, %r13
shlq $0x4, %r13
movq (%rax,%r13), %rsi
movl %ebx, %edi
leaq -0x38(%rbp), %rdx
callq 0x3751
testl %eax, %eax
jne 0x3c57
cmpq %r14, -0x38(%rbp)
jne 0x3c3a
movq (%r15), %rax
movq (%rax,%r13), %rax
movq %rax, -0x60(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3d92
incl %r12d
jmp 0x3be6
leaq -0x50(%rbp), %rsi
movq %r15, %rdi
callq 0x3db6
xorl %r14d, %r14d
movl %ebx, %edi
callq 0x36f1
jmp 0x3c5b
pushq $0x1
popq %r14
leaq -0x50(%rbp), %rdi
callq 0x30a2
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3c78
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x30a2
movq %rbx, %rdi
callq 0x2300
// File: /workspace/github_cpp_makefile_star2_O2/illmat[P]MemCrawl/scan.cpp
// Function: updateIntResults(std::vector<scanResult, std::allocator<scanResult>>&, int)
int updateIntResults(std::vector<scanResult> &results, pid_t pid)
{
    long buffer = 0;

    if (attach(pid) != 0)
    {
        return 1;
    }
    for (unsigned int x=0; x<results.size(); x++)
    {
        if (peek(pid, results[x].addr, buffer) != 0)
        {
            return 1;
        }
        else {
            results[x].value = buffer;
        }
    }

    detach(pid);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r15
andq $0x0, -0x30(%rbp)
movl %esi, %edi
callq 0x3640
pushq $0x1
popq %rcx
testl %eax, %eax
jne 0x3d06
movq (%r15), %rax
xorl %r14d, %r14d
leaq -0x30(%rbp), %r12
movl %r14d, %r14d
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %r14, %rcx
jbe 0x3cf8
movq %r14, %r13
shlq $0x4, %r13
movq (%rax,%r13), %rsi
movl %ebx, %edi
movq %r12, %rdx
callq 0x3751
testl %eax, %eax
jne 0x3d03
movl -0x30(%rbp), %ecx
movq (%r15), %rax
movl %ecx, 0x8(%rax,%r13)
incl %r14d
jmp 0x3cbc
movl %ebx, %edi
callq 0x36f1
xorl %ecx, %ecx
jmp 0x3d06
pushq $0x1
popq %rcx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/illmat[P]MemCrawl/scan.cpp
// Function: setInt(std::vector<scanResult, std::allocator<scanResult>>&, int, int)
int setInt(std::vector<scanResult> &results, pid_t pid, int value)
{
    if (attach(pid) != 0)
    {
        return 1;
    }
    for (unsigned int x=0; x<results.size(); x++)
    {
        if (poke(pid, results[x].addr, value) != 0)
        {
            return 1;
        }
    }

    detach(pid);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r12d
movl %esi, %r14d
movq %rdi, %r15
movl %esi, %edi
callq 0x3640
pushq $0x1
popq %rbx
testl %eax, %eax
jne 0x3d81
movslq %r12d, %r12
xorl %ecx, %ecx
movl %ecx, %r13d
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %r13, %rcx
jbe 0x3d77
movq %r13, %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rsi
movl %r14d, %edi
movq %r12, %rdx
callq 0x37db
leal 0x1(%r13), %ecx
testl %eax, %eax
je 0x3d41
jmp 0x3d81
movl %r14d, %edi
callq 0x36f1
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/danfai[P]dboc/main.cpp
// Function: printHelp()
void printHelp() {
    std::cout
        << "Usage: dboc -o <OUTFILE> <INFILE>" << std::endl
        << "Parameter:" << std::endl
        << "  -o <OUTFILE> Specifies the file, where we should output the source code" << std::endl
        << "  <INFILE> Specifies the input file" << std::endl;
    /**
     * accept dboc -d <DIRECTORY> <SOURCE> ...
     * DIRECTORY is target directory
     * SOURCE is the source file, where each source file will be compiled to `basedir SOURCE`/dbo_`filename SOURCE`.cpp
     **/
}

// Assembly:
pushq %rax
movq 0x4b4c(%rip), %rdi      # 0x6fb0
leaq 0x1b99(%rip), %rsi      # 0x4004
callq 0x2190
movq %rax, %rdi
callq 0x2100
leaq 0x1ba7(%rip), %rsi      # 0x4026
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
callq 0x2100
leaq 0x1b9b(%rip), %rsi      # 0x4031
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
callq 0x2100
leaq 0x1bce(%rip), %rsi      # 0x407b
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
popq %rax
jmp 0x2100
// File: /workspace/github_cpp_makefile_star2_O2/danfai[P]dboc/stringtokenizer.cpp
// Function: StringTokenizer::getString[abi:cxx11]()
std::string StringTokenizer::getString()
{
    if (this->end)
        throw InvalidLineException();
    if (line[pos] == ' ') { ++pos;
        return ""; }
    int oldpos = pos;
    for(; line[pos] != '\0'; ++pos) {
        if (line[pos] == ' ') {
            ++pos;
            std::string b = line.substr(oldpos, pos-oldpos-1);
            return b;
        }
    }
    this->end = true;
    return line.substr(oldpos);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
cmpl $0x0, 0x24(%rsi)
jne 0x2983
movq %rdi, %rbx
movl 0x20(%rsi), %eax
movq (%rsi), %rcx
movb (%rcx,%rax), %r9b
cmpb $0x20, %r9b
jne 0x2935
incl %eax
movl %eax, 0x20(%rsi)
leaq 0x17b5(%rip), %rsi      # 0x40db
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x26be
jmp 0x297a
movslq %eax, %rdx
leal 0x1(%rdx), %r8d
xorl %edi, %edi
testb %r9b, %r9b
je 0x2968
movzbl %r9b, %r9d
cmpl $0x20, %r9d
je 0x295d
leal (%r8,%rdi), %r9d
movl %r9d, 0x20(%rsi)
movb (%rcx,%r9), %r9b
incl %edi
jmp 0x293e
addl %edi, %eax
incl %eax
movl %eax, 0x20(%rsi)
movl %edi, %ecx
jmp 0x2972
movl $0x1, 0x24(%rsi)
pushq $-0x1
popq %rcx
movq %rbx, %rdi
callq 0x21c0
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
pushq $0x8
popq %rdi
callq 0x2110
leaq 0x43ce(%rip), %rcx      # 0x6d60
movq %rcx, (%rax)
leaq 0x439c(%rip), %rsi      # 0x6d38
movq 0x4635(%rip), %rdx      # 0x6fd8
movq %rax, %rdi
callq 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/danfai[P]dboc/parser.cpp
// Function: Parser::Parser(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Parser::Parser(std::string inFile)
{
    std::ifstream in(inFile);

    std::string line;
    while(std::getline(in, line)) {
        if(line.size() > 0)
            parseLine(line);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x40(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x2290
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x40(%rsp), %r14
movq %rsp, %r15
leaq 0x20(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x2060
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2a54
cmpq $0x0, 0x8(%rsp)
je 0x2a13
movq %r12, %rdi
movq %r15, %rsi
callq 0x2220
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2aae
movq %r12, %rdi
callq 0x20f0
jmp 0x2a13
movq %rsp, %rdi
callq 0x20f0
leaq 0x40(%rsp), %rdi
callq 0x2090
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
jmp 0x2a9e
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x20f0
jmp 0x2a8c
movq %rax, %r14
movq %rsp, %rdi
callq 0x20f0
leaq 0x40(%rsp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x26fa
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O2/danfai[P]dboc/parser.cpp
// Function: Parser::getType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Field::Type Parser::getType(std::string token)
{
    switch(token.at(0)) {
        case 'b': return Field::b;
        case 'c': return Field::c;
        case 'd': return Field::d;
        case 'e': return Field::e;
        case 'f': return Field::f;
        case 'i': return Field::i;
        case 'l': return Field::l;
        case 'p': return Field::p;
        default:
                  if(token == "ss")
                      return Field::ss;
                  else if(token == "Wdt")
                      return Field::Wdt;
                  else if(token == "Ws")
                      return Field::Ws;
    }
    return Field::INVALID;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x2300
movb (%rax), %al
addb $-0x62, %al
cmpb $0xf, %al
jae 0x2ddd
movzbl %al, %eax
movl $0x449f, %ecx           # imm = 0x449F
btl %eax, %ecx
jae 0x2ddd
leaq 0x1610(%rip), %rcx      # 0x43e8
movl (%rcx,%rax,4), %eax
jmp 0x2e21
leaq 0x1446(%rip), %rsi      # 0x422a
movq %rbx, %rdi
callq 0x3356
testb %al, %al
je 0x2df4
pushq $0x8
jmp 0x2e09
leaq 0x1432(%rip), %rsi      # 0x422d
movq %rbx, %rdi
callq 0x3356
testb %al, %al
je 0x2e0c
pushq $0x9
popq %rax
jmp 0x2e21
leaq 0x141e(%rip), %rsi      # 0x4231
movq %rbx, %rdi
callq 0x3356
movzbl %al, %eax
xorl $0xb, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/danfai[P]dboc/./entry.h
// Function: Field::getIncludes(std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<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>>>>&)
void getIncludes(std::set<std::string> &s) {
            switch(type) {
                case Field::c:
                case Field::p:
                    s.insert("class " + additionalType + ";");
                    break;
                case Field::ss:
                    s.insert("#include <string>");
                    break;
                case Field::Wdt:
                    s.insert("#include <Wt/WDateTime>");
                    s.insert("#include <Wt/Dbo/WtSqlTraits>");
                    break;
                case Field::Ws:
                    s.insert("#include <Wt/WString>");
                    break;
                default:
                    // built-in types
                    break;
            }
        }

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl (%rdi), %eax
decl %eax
cmpl $0x9, %eax
ja 0x3513
movq %rsi, %rbx
leaq 0xd86(%rip), %rcx       # 0x419c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rdi, %rdx
addq $0x8, %rdx
leaq 0xe4a(%rip), %rsi       # 0x4277
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x3382
leaq 0xe7e(%rip), %rdx       # 0x42bf
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x3363
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x36b2
leaq 0x8(%rsp), %rdi
callq 0x20f0
leaq 0x28(%rsp), %rdi
jmp 0x350e
leaq 0xea5(%rip), %rsi       # 0x431b
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x26be
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x36b2
jmp 0x3509
leaq 0xe92(%rip), %rsi       # 0x432d
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x26be
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x36b2
leaq 0x8(%rsp), %rdi
callq 0x20f0
leaq 0xe7d(%rip), %rsi       # 0x4345
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x26be
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x36b2
jmp 0x3509
leaq 0xe76(%rip), %rsi       # 0x4363
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x26be
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x36b2
leaq 0x8(%rsp), %rdi
callq 0x20f0
addq $0x48, %rsp
popq %rbx
popq %r14
retq
jmp 0x3523
jmp 0x3531
jmp 0x3523
jmp 0x3523
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x354d
jmp 0x3531
jmp 0x3531
movq %rax, %rbx
jmp 0x3552
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20f0
jmp 0x3548
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O2/danfai[P]dboc/./entry.h
// Function: Field::getFieldName(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&)
void getFieldName(std::ostringstream &oss) {
            oss << "    ";
            //TODO: Check for relation
            switch(type) {
                case Field::b:
                    oss << "bool";
                    break;
                case Field::e:
                case Field::c:
                    oss << additionalType;
                    break;
                case Field::d:
                    oss << "double";
                    break;
                case Field::f:
                    oss << "float";
                    break;
                case Field::i:
                    oss << "int";
                    break;
                case Field::l:
                    oss << "long";
                    break;
                case Field::p:
                    oss << "Wt::Dbo::ptr<" << additionalType << ">";
                    break;
                case Field::ss:
                    oss << "std::string";
                    break;
                case Field::Wdt:
                    oss << "Wt::WDateTime";
                    break;
                case Field::Ws:
                    oss << "Wt::WString";
                    break;
                default:
                    // I dont know
                    break;
            }
            oss  << " " << fieldName << ";" << std::endl;
        }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xe0e(%rip), %rsi       # 0x4379
movq %r14, %rdi
callq 0x2190
movl (%rbx), %eax
cmpq $0xa, %rax
ja 0x3612
leaq 0xc3e(%rip), %rcx       # 0x41c4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x2180
jmp 0x3612
leaq 0xde6(%rip), %rsi       # 0x438a
jmp 0x360a
leaq 0xe06(%rip), %rsi       # 0x43b3
jmp 0x360a
leaq 0xdc8(%rip), %rsi       # 0x437e
jmp 0x360a
leaq 0xdc4(%rip), %rsi       # 0x4383
jmp 0x360a
leaq 0xdd1(%rip), %rsi       # 0x4399
movq %r14, %rdi
callq 0x2190
leaq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x2180
leaq 0xa41(%rip), %rsi       # 0x4024
movq %rax, %rdi
jmp 0x360d
leaq 0xda1(%rip), %rsi       # 0x4390
jmp 0x360a
leaq 0xd9c(%rip), %rsi       # 0x4394
jmp 0x360a
leaq 0xdc0(%rip), %rsi       # 0x43c1
jmp 0x360a
leaq 0xd9d(%rip), %rsi       # 0x43a7
movq %r14, %rdi
callq 0x2190
leaq 0xd63(%rip), %rsi       # 0x437c
movq %r14, %rdi
callq 0x2190
addq $0x30, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2180
leaq 0xc88(%rip), %rsi       # 0x42bf
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2100
// File: /workspace/github_cpp_makefile_star2_O2/Juve45[P]batstat/main.cpp
// Function: checkdir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool checkdir(string str) {
	DIR* dir = opendir(str.c_str());
	if (dir) {
		closedir(dir);
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdi
callq 0x3420
movq %rax, %rbx
testq %rax, %rax
je 0x38da
movq %rbx, %rdi
callq 0x3480
testq %rbx, %rbx
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Juve45[P]batstat/main.cpp
// Function: getBatteryInfo()
BatteryStatus getBatteryInfo() {
	float currentPower, currentEnergy;
	if(checkfile(powerPath + "_now")) { // Unit is Watts
		ifstream powNow(powerPath + "_now");
		ifstream enNow(energyPath + "_now");
		powNow >> currentPower;
		enNow >> currentEnergy;
	} else { 
			ifstream currNow(currentPath + "_now");
			ifstream chgNow(chargePath + "_now");
			
			currNow >> currentPower;
			chgNow >> currentEnergy;
		/*if(checkfile(voltagePath + "_now")) { // Unit is Watts
			float voltage;
			ifstream volNow(voltagePath + "_now");
			volNow >> voltage;
			if(voltage == 0) voltage = 1;
			currentPower *= voltage / 1000000;
			currentEnergy *= voltage / 1000000;
		} else { // Unit is Amps, no voltage to be subtracted 
		}*/
		// TODO: fix voltage bug -> create class which handles energy and power readings 
		// in every scenario.
	} 
	return BatteryStatus(currentPower, currentEnergy);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
leaq 0x16ae6(%rip), %rsi     # 0x1a3e0
leaq 0xbd21(%rip), %rdx      # 0xf622
leaq -0x440(%rbp), %rbx
movq %rbx, %rdi
callq 0x4763
movq %rbx, %rdi
callq 0x4731
movl %eax, %ebx
leaq -0x440(%rbp), %rdi
callq 0x3598
testb %bl, %bl
je 0x39c1
leaq 0x16aab(%rip), %rsi     # 0x1a3e0
leaq 0xbce6(%rip), %rdx      # 0xf622
leaq -0x238(%rbp), %rbx
movq %rbx, %rdi
callq 0x4763
leaq -0x440(%rbp), %rdi
pushq $0x8
popq %rdx
movq %rbx, %rsi
callq 0x3490
leaq -0x238(%rbp), %rdi
callq 0x3598
leaq 0x16a50(%rip), %rsi     # 0x1a3c0
leaq 0xbcab(%rip), %rdx      # 0xf622
leaq -0x30(%rbp), %rdi
callq 0x4763
leaq -0x238(%rbp), %rdi
leaq -0x30(%rbp), %rsi
pushq $0x8
popq %rdx
callq 0x3490
leaq -0x30(%rbp), %rdi
callq 0x3598
leaq -0x440(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x3580
leaq -0x238(%rbp), %rdi
leaq -0xc(%rbp), %rsi
callq 0x3580
jmp 0x3a4f
leaq 0x16a78(%rip), %rsi     # 0x1a440
leaq 0xbc53(%rip), %rdx      # 0xf622
leaq -0x238(%rbp), %rbx
movq %rbx, %rdi
callq 0x4763
leaq -0x440(%rbp), %rdi
pushq $0x8
popq %rdx
movq %rbx, %rsi
callq 0x3490
leaq -0x238(%rbp), %rdi
callq 0x3598
leaq 0x169fd(%rip), %rsi     # 0x1a400
leaq 0xbc18(%rip), %rdx      # 0xf622
leaq -0x30(%rbp), %rdi
callq 0x4763
leaq -0x238(%rbp), %rdi
leaq -0x30(%rbp), %rsi
pushq $0x8
popq %rdx
callq 0x3490
leaq -0x30(%rbp), %rdi
callq 0x3598
leaq -0x440(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x3580
leaq -0x238(%rbp), %rdi
leaq -0xc(%rbp), %rsi
callq 0x3580
leaq -0x238(%rbp), %rdi
callq 0x30b0
leaq -0x440(%rbp), %rdi
callq 0x30b0
movss -0xc(%rbp), %xmm1
movss -0x10(%rbp), %xmm0
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %rbp
retq
jmp 0x3a80
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x3598
jmp 0x3ab4
jmp 0x3a90
movq %rax, %rbx
jmp 0x3ab4
jmp 0x3a97
movq %rax, %rbx
leaq -0x238(%rbp), %rdi
jmp 0x3acc
jmp 0x3aa5
movq %rax, %rbx
leaq -0x238(%rbp), %rdi
callq 0x30b0
leaq -0x440(%rbp), %rdi
callq 0x30b0
jmp 0x3ad1
movq %rax, %rbx
leaq -0x440(%rbp), %rdi
callq 0x3598
movq %rbx, %rdi
callq 0x3520
// File: /workspace/github_cpp_makefile_star2_O2/Juve45[P]batstat/main.cpp
// Function: refreshValues()
void refreshValues()
{		
	auto batInit = getBatteryInfo();
	currentEnergy = batInit.energy;
	currentPower = batInit.power;

	ifstream st(Path + "status");
	timeNow = time(NULL);
	//timeElapsed = timeElapsed + timeNow - lastTime;
	timeElapsed += refreshRate;
	lastTime = timeNow;
	st >> status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
callq 0x38e7
movss %xmm0, 0x162ea(%rip)    # 0x1a35c
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm0, 0x162e2(%rip)    # 0x1a360
leaq 0x162fb(%rip), %rsi     # 0x1a380
leaq 0xb61b(%rip), %rdx      # 0xf6a7
leaq -0x28(%rbp), %rbx
movq %rbx, %rdi
callq 0x4763
leaq -0x230(%rbp), %rdi
pushq $0x8
popq %rdx
movq %rbx, %rsi
callq 0x3490
leaq -0x28(%rbp), %rdi
callq 0x3598
xorl %edi, %edi
callq 0x32d0
movl %eax, 0x162b0(%rip)     # 0x1a370
movl 0x16212(%rip), %ecx     # 0x1a2d8
addl %ecx, 0x162a8(%rip)     # 0x1a374
movl %eax, 0x162a6(%rip)     # 0x1a378
leaq 0x162c7(%rip), %rsi     # 0x1a3a0
leaq -0x230(%rbp), %rdi
callq 0x33b0
leaq -0x230(%rbp), %rdi
callq 0x30b0
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x230(%rbp), %rdi
callq 0x30b0
jmp 0x4118
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x3598
movq %rbx, %rdi
callq 0x3520
// File: /workspace/github_cpp_makefile_star2_O2/Juve45[P]batstat/main.cpp
// Function: keyListenerFunction()
void keyListenerFunction()
{
	int ch = 0;
	while((ch = wgetch(mainwin)) != 'q')
	{
		if(ch == 27)
			break;

		switch ( ch ) {

		case KEY_UP:
			if (logIndex > 0)
				--logIndex;
			newPrint();
			break;

		case KEY_DOWN:
			if (logIndex + 1 < logCache.size())
				++logIndex;
			newPrint();
			break;
		}
	}
	quit = 1;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x15ead(%rip), %rdi     # 0x1a468
callq 0x3100
cmpl $0x102, %eax            # imm = 0x102
je 0x45da
cmpl $0x103, %eax            # imm = 0x103
je 0x45fd
cmpl $0x1b, %eax
je 0x4616
cmpl $0x71, %eax
jne 0x45b4
jmp 0x4616
movslq 0x15d9b(%rip), %rax     # 0x1a37c
incq %rax
movq 0x15e8d(%rip), %rcx     # 0x1a478
subq 0x15e7e(%rip), %rcx     # 0x1a470
sarq $0x5, %rcx
cmpq %rax, %rcx
ja 0x4609
jmp 0x460f
movl 0x15d79(%rip), %eax     # 0x1a37c
testl %eax, %eax
jle 0x460f
decl %eax
movl %eax, 0x15d6d(%rip)     # 0x1a37c
callq 0x4120
jmp 0x45b4
movb $0x1, 0x15e44(%rip)     # 0x1a461
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Juve45[P]batstat/main.cpp
// Function: coreFunction()
void coreFunction() {
	lastTime = time(NULL);
	// sleep(1);
	while(!quit) {
		refreshValues();
		newPrint();
		if(timeElapsed % (LOG_P * refreshRate) == 0)
			addLog();
		sleep(refreshRate);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %edi, %edi
callq 0x32d0
movl %eax, 0x15d48(%rip)     # 0x1a378
cmpb $0x0, 0x15e2a(%rip)     # 0x1a461
jne 0x4671
callq 0x4059
callq 0x4120
movl 0x15d2b(%rip), %eax     # 0x1a374
movl 0x15c89(%rip), %edi     # 0x1a2d8
movl 0x15c87(%rip), %ecx     # 0x1a2dc
imull %edi, %ecx
cltd
idivl %ecx
testl %edx, %edx
jne 0x466a
callq 0x44fa
movl 0x15c6e(%rip), %edi     # 0x1a2d8
callq 0x3240
jmp 0x4630
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Juve45[P]batstat/main.cpp
// Function: main
int main() {

	init();
	thread keyListener(keyListenerFunction);
	thread core(coreFunction);
	thread *p;
	keyListener.join();
	//core.join();
	//terminate();
	//delete p;
	core.detach();
	erase();
	delwin(mainwin);
	endwin();
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
callq 0x3d17
leaq -0xd8(%rip), %rsi       # 0x45b0
leaq -0x18(%rbp), %rdi
callq 0x499c
leaq -0x79(%rip), %rsi       # 0x461f
leaq -0x10(%rbp), %rdi
callq 0x499c
leaq -0x18(%rbp), %rdi
callq 0x34f0
leaq -0x10(%rbp), %rdi
callq 0x3510
callq 0x3340
movq 0x15da9(%rip), %rdi     # 0x1a468
callq 0x3050
callq 0x3370
leaq -0x10(%rbp), %rdi
callq 0x4a0a
leaq -0x18(%rbp), %rdi
callq 0x4a0a
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
jmp 0x46f5
movq %rax, %rbx
leaq -0x10(%rbp), %rdi
callq 0x4a0a
leaq -0x18(%rbp), %rdi
callq 0x4a0a
movq %rbx, %rdi
callq 0x3520
// File: /workspace/github_cpp_makefile_star2_O2/Juve45[P]batstat/main.cpp
// Function: checkfile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
inline bool checkfile (const std::string& name) {
    if (FILE *file = fopen(name.c_str(), "r")) {
        fclose(file);
        return true;
    } else {
        return false;
    }   
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdi
leaq 0xbf42(%rip), %rsi      # 0x10683
callq 0x3380
movq %rax, %rbx
testq %rax, %rax
je 0x4756
movq %rbx, %rdi
callq 0x32f0
testq %rbx, %rbx
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Juve45[P]batstat/./include/nlohmann/json.hpp
// Function: nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&)
basic_json(basic_json&& other) noexcept
        : json_base_class_t(std::forward<json_base_class_t>(other)),
          m_data(std::move(other.m_data))
    {
        // check that passed value is valid
        other.assert_invariant(false);

        // invalidate payload
        other.m_data.m_type = value_t::null;
        other.m_data.m_value = {};

        set_parents();
        assert_invariant();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movq %rsi, %rdi
xorl %esi, %esi
callq 0x4a28
movb $0x0, (%rbx)
andq $0x0, 0x8(%rbx)
pushq $0x1
popq %rsi
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x4a28
// File: /workspace/github_cpp_makefile_star2_O2/Juve45[P]batstat/./include/nlohmann/json.hpp
// Function: nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get()
char_int_type get()
    {
        ++position.chars_read_total;
        ++position.chars_read_current_line;

        if (next_unget)
        {
            // just reset the next_unget variable and work with current
            next_unget = false;
        }
        else
        {
            current = ia.get_character();
        }

        if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
        {
            token_string.push_back(char_traits<char_type>::to_char_type(current));
        }

        if (current == '\n')
        {
            ++position.lines_read;
            position.chars_read_current_line = 0;
        }

        return current;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
incq 0x20(%rdi)
incq 0x28(%rdi)
cmpb $0x1, 0x18(%rdi)
jne 0x6b20
movb $0x0, 0x18(%rbx)
movl 0x14(%rbx), %eax
jmp 0x6b2b
movq %rbx, %rdi
callq 0x6bc4
movl %eax, 0x14(%rbx)
cmpl $-0x1, %eax
je 0x6b5a
leaq 0x38(%rbx), %rdi
leaq -0x9(%rbp), %rsi
movb %al, (%rsi)
callq 0x6c02
movl 0x14(%rbx), %eax
cmpl $0xa, %eax
jne 0x6b53
incq 0x30(%rbx)
andq $0x0, 0x28(%rbx)
pushq $0xa
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
pushq $-0x1
jmp 0x6b52