LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/camargodev[P]n-tile-puzzle/src/StateManager.cpp
// Function: StateManager::produceNextPackedStates(unsigned long)
vector<PackedState> StateManager :: produceNextPackedStates(PackedState state) {
    vector<PackedState> neighbors;
    int blankPosition = getBlankTilePosition(state);
    short numberOfTiles = getNumberOfTiles(state);
    vector<int> neighborsPositions = getNeighborsPositions(numberOfTiles, blankPosition);
    for (auto neighboorPosition : neighborsPositions) {
        PackedState neighbor = swapValuesByPositions(state, blankPosition, neighboorPosition);
        neighbors.insert(neighbors.begin(), neighbor);
    }
    return neighbors;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x305a
movl %eax, %ebp
movq 0x8(%r15), %rax
movq %rax, %rcx
shlq $0x38, %rcx
shlq $0x34, %rax
orq %rcx, %rax
andq %r14, %rax
cmpq $0x1, %rax
pushq $0x4
popq %rdx
sbbl $0x0, %edx
leaq 0x10(%rsp), %rdi
movl %ebp, %ecx
callq 0x336e
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %r12
cmpq %r12, %r13
je 0x332f
movl (%r13), %ecx
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x325e
movq %rax, 0x8(%rsp)
movq (%rbx), %rsi
movq %rbx, %rdi
leaq 0x8(%rsp), %rdx
callq 0x36b2
addq $0x4, %r13
jmp 0x32fe
leaq 0x10(%rsp), %rdi
callq 0x3d7c
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x335d
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x3d7c
movq %rbx, %rdi
callq 0x3d6e
movq %r14, %rdi
callq 0x2340
nop
// File: /workspace/github_cpp_makefile_star2_O2/camargodev[P]n-tile-puzzle/src/StateManager.cpp
// Function: StateManager::getNeighborsPositions(short, int)
vector<int> StateManager :: getNeighborsPositions(short numberOfTiles, int blankPosition) {
    vector<int> neighbors;
    if (blankPosition < numberOfTiles*(numberOfTiles-1))
        neighbors.insert(neighbors.begin(), blankPosition+numberOfTiles);
    if ((blankPosition+1) % numberOfTiles != 0)
        neighbors.insert(neighbors.begin(), blankPosition+1);
    if (blankPosition % numberOfTiles != 0)
        neighbors.insert(neighbors.begin(), blankPosition-1);
    if (blankPosition > numberOfTiles-1)
        neighbors.insert(neighbors.begin(), blankPosition-numberOfTiles);
    return neighbors;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %ecx, %r14d
movl %edx, %r15d
movq %rdi, %rbx
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
movups %xmm0, (%rdi)
leal -0x1(%r15), %eax
imull %edx, %eax
cmpl %ecx, %eax
jle 0x33ab
leal (%r15,%r14), %eax
leaq 0xc(%rsp), %rdx
movl %eax, (%rdx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3f0e
leal 0x1(%r14), %ecx
movl %ecx, %eax
cltd
idivl %r15d
testl %edx, %edx
je 0x33cb
movq (%rbx), %rsi
leaq 0xc(%rsp), %rdx
movl %ecx, (%rdx)
movq %rbx, %rdi
callq 0x3f0e
movl %r14d, %eax
cltd
idivl %r15d
testl %edx, %edx
je 0x33ec
movq (%rbx), %rsi
leal -0x1(%r14), %eax
leaq 0xc(%rsp), %rdx
movl %eax, (%rdx)
movq %rbx, %rdi
callq 0x3f0e
subl %r15d, %r14d
jl 0x3404
movq (%rbx), %rsi
leaq 0xc(%rsp), %rdx
movl %r14d, (%rdx)
movq %rbx, %rdi
callq 0x3f0e
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x3417
jmp 0x3417
jmp 0x3417
movq %rax, %r14
movq %rbx, %rdi
callq 0x3d7c
movq %r14, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O2/camargodev[P]n-tile-puzzle/src/StateManager.cpp
// Function: getValueAtPosition(unsigned long, int)
int getValueAtPosition(PackedState state, int position) {
    uint64_t maskToGetNeighborValue = 15;
    maskToGetNeighborValue = maskToGetNeighborValue << 4*position;
    uint64_t neighborValue = state & maskToGetNeighborValue;
    neighborValue = neighborValue >> 4*(position);
    return (int) neighborValue;
}

// Assembly:
leal (,%rsi,4), %ecx
pushq $0xf
popq %rax
shlq %cl, %rax
andq %rdi, %rax
shrq %cl, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/camargodev[P]n-tile-puzzle/src/StateManager.cpp
// Function: StateManager::calculateNeighborHeuristic(State, int, int)
int StateManager :: calculateNeighborHeuristic(State state, int blankPosition, int newPosition) {
    int valAtNewPosition = getValueAtPosition(state.value, newPosition);
    int expectedPosition = heuristicCalculator.getExpectedPositionForNumber(valAtNewPosition);
    int diffToSubtract = heuristicCalculator.calculateDistanceBeetwenPositions(newPosition, expectedPosition);
    int diffToAdd = heuristicCalculator.calculateDistanceBeetwenPositions(blankPosition, expectedPosition);
    return state.heuristic - diffToSubtract + diffToAdd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %r14d
movl %ecx, %ebp
movq %rdx, %rbx
leal (,%r14,4), %ecx
pushq $0xf
popq %rax
shlq %cl, %rax
movq %rdi, %r15
andq %rax, %rsi
shrq %cl, %rsi
addq $0x10, %r15
movq %r15, %rdi
callq 0x2ca8
movl %eax, %r12d
movq %r15, %rdi
movl %r14d, %esi
movl %eax, %edx
callq 0x2cb2
movl %eax, %r14d
movq %r15, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x2cb2
movzbl %bl, %ecx
subl %r14d, %ecx
addl %ecx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/camargodev[P]n-tile-puzzle/src/Result.cpp
// Function: Result::printResult()
void Result :: printResult() {
    string strResult = "\n";
    this->averageHeuristicValue = this->totalHValue/max(this->counter, 1);
    strResult += to_string(this->expandedNodes) + ",";
    strResult += to_string(this->optimalSolutionLenght) + ",";
    strResult += to_string(this->duration) + ",";
    strResult += to_string(this->averageHeuristicValue) + ",";
    strResult += to_string(this->initialHeuristicValue);
    cout << strResult;
    // cout << "\nXXX: " << averageHeuristicValue;
    // cout << "\nCounter: " << counter;
}

// Assembly:
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
leaq 0x3cf3(%rip), %rsi      # 0x8050
leaq 0x40(%rsp), %rdi
movq %rsp, %rdx
callq 0x2080
movl 0x8(%rbx), %eax
cmpl $0x2, %eax
pushq $0x1
popq %rcx
cmovgel %eax, %ecx
cvtsi2sd %ecx, %xmm0
movsd 0x30(%rbx), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rbx)
movl (%rbx), %esi
leaq 0x20(%rsp), %rdi
callq 0x477b
leaq 0x3cd5(%rip), %rdx      # 0x8070
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x2973
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
callq 0x23a0
movq %rsp, %rdi
callq 0x20b0
leaq 0x20(%rsp), %rdi
callq 0x20b0
movswl 0xc(%rbx), %esi
leaq 0x20(%rsp), %rdi
callq 0x477b
leaq 0x3c94(%rip), %rdx      # 0x8070
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x2973
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
callq 0x23a0
movq %rsp, %rdi
callq 0x20b0
leaq 0x20(%rsp), %rdi
callq 0x20b0
movss 0x10(%rbx), %xmm0
leaq 0x20(%rsp), %rdi
callq 0x47d4
leaq 0x3c52(%rip), %rdx      # 0x8070
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x2973
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
callq 0x23a0
movq %rsp, %rdi
callq 0x20b0
leaq 0x20(%rsp), %rdi
callq 0x20b0
movsd 0x18(%rbx), %xmm0
leaq 0x20(%rsp), %rdi
callq 0x47f9
leaq 0x3c10(%rip), %rdx      # 0x8070
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x2973
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
callq 0x23a0
movq %rsp, %rdi
callq 0x20b0
leaq 0x20(%rsp), %rdi
callq 0x20b0
movswl 0x20(%rbx), %esi
movq %rsp, %rdi
callq 0x477b
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
callq 0x23a0
movq %rsp, %rdi
callq 0x20b0
movq 0x8b1c(%rip), %rdi      # 0xcfd0
leaq 0x40(%rsp), %rsi
callq 0x21b0
leaq 0x40(%rsp), %rdi
callq 0x20b0
addq $0x60, %rsp
popq %rbx
retq
jmp 0x4508
movq %rax, %rbx
movq %rsp, %rdi
jmp 0x4501
jmp 0x4508
jmp 0x44ec
jmp 0x44f9
jmp 0x4508
jmp 0x44ec
jmp 0x44f9
jmp 0x4508
jmp 0x44ec
jmp 0x44f9
jmp 0x4508
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20b0
jmp 0x44fc
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x20b0
jmp 0x450b
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x2340
nop
// File: /workspace/github_cpp_makefile_star2_O2/camargodev[P]n-tile-puzzle/src/InputReader.cpp
// Function: InputReader::split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const&)
const vector<string> InputReader :: split(const string& input, const char& delimiter) {
	string buffer{""};
	vector<string> parts;
	
	for(auto character : input) {
		if(character != delimiter) {
            buffer += character; 
        } else if(character == delimiter && buffer != "") { 
            parts.push_back(buffer); 
            buffer = ""; 
        }
	}
	if(buffer != "") 
        parts.push_back(buffer);
	
	return parts;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r14
movq %rdx, %r13
movq %rdi, %rbx
leaq 0x35ff(%rip), %r15      # 0x8051
leaq 0x18(%rsp), %r12
leaq 0xf(%rsp), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x2080
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rbx)
movq %rbx, 0x10(%rsp)
movups %xmm0, (%rbx)
movq (%r13), %rbp
movq 0x8(%r13), %r13
xorl %ebx, %ebx
cmpq %rbx, %r13
je 0x4ac8
movb (%rbp,%rbx), %al
cmpb (%r14), %al
jne 0x4ab8
movq %r12, %rdi
movq %r15, %rsi
callq 0x5100
testb %al, %al
je 0x4ac3
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x510a
movq %r12, %rdi
movq %r15, %rsi
callq 0x2380
jmp 0x4ac3
movsbl %al, %esi
movq %r12, %rdi
callq 0x2190
incq %rbx
jmp 0x4a81
leaq 0x3582(%rip), %rsi      # 0x8051
leaq 0x18(%rsp), %rdi
callq 0x5100
testb %al, %al
je 0x4aec
leaq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x510a
leaq 0x18(%rsp), %rdi
callq 0x20b0
movq 0x10(%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4b0c
movq %rax, %r14
movq 0x10(%rsp), %rdi
callq 0x5136
leaq 0x18(%rsp), %rdi
callq 0x20b0
movq %r14, %rdi
callq 0x2340
nop
// File: /workspace/github_cpp_makefile_star2_O2/camargodev[P]n-tile-puzzle/src/InputReader.cpp
// Function: InputReader::getAlgorithmId(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int InputReader :: getAlgorithmId(const string& algorithm) {
    if (algorithm == "-bfs")
        return BFS_ID;
    if (algorithm == "-gbfs")
        return GREEDY_ID;
    if (algorithm == "-astar")
        return ASTAR_ID;
    if (algorithm == "-idfs")
        return IDFS_ID;
    if (algorithm == "-idastar")
        return IDASTAR_ID;
    return INVALID_ID;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
leaq 0x3659(%rip), %rsi      # 0x8190
movq %rbx, %rdi
callq 0x5157
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
jne 0x4b8b
leaq 0x3647(%rip), %rsi      # 0x8195
movq %rbx, %rdi
callq 0x5157
testb %al, %al
je 0x4b5e
pushq $0x1
jmp 0x4b8a
leaq 0x3636(%rip), %rsi      # 0x819b
movq %rbx, %rdi
callq 0x5157
testb %al, %al
je 0x4b75
pushq $0x2
jmp 0x4b8a
leaq 0x3626(%rip), %rsi      # 0x81a2
movq %rbx, %rdi
callq 0x5157
testb %al, %al
je 0x4b8d
pushq $0x3
popq %rax
popq %rbx
retq
leaq 0x3614(%rip), %rsi      # 0x81a8
movq %rbx, %rdi
callq 0x5157
movzbl %al, %eax
decl %eax
orl $0x4, %eax
jmp 0x4b8b
// File: /workspace/github_cpp_makefile_star2_O2/camargodev[P]n-tile-puzzle/src/InputReader.cpp
// Function: InputReader::parseStatesToString[abi:cxx11](int, char**, bool)
const string InputReader :: parseStatesToString(int argc, char** argv, bool isTxt) {
    string stringStates;
    if(isTxt){
        ifstream ifs(argv[argc-1]);
        stringStates.assign( (istreambuf_iterator<char>(ifs) ),
                (istreambuf_iterator<char>()    ) );
    }
    else{
        stringStates = "";
        for (int i = ALGORITHM_INDEX+1; i < argc-1; i++) {
            stringStates = stringStates + argv[i] + " ";
        }
        stringStates = stringStates + argv[argc-1];
    }    
    return stringStates;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rcx, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movl %edx, %r12d
movb $0x0, 0x10(%rdi)
testl %r8d, %r8d
je 0x4c1a
movslq %r12d, %rax
movq -0x8(%r14,%rax,8), %rsi
leaq 0x20(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x2360
movq 0x20(%rsp), %rax
movq -0x18(%rax), %rax
movq 0x108(%rsp,%rax), %rsi
pushq $-0x1
popq %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
movl %edx, %r8d
callq 0x5164
leaq 0x20(%rsp), %rdi
callq 0x2040
jmp 0x4caf
movq %rsi, %r15
leaq 0x342d(%rip), %rsi      # 0x8051
movq %rbx, %rdi
callq 0x2380
movslq (%r15), %rbp
decl %r12d
movslq %r12d, %r12
incq %rbp
movq %rsp, %r15
leaq 0x20(%rsp), %r13
cmpq %r12, %rbp
jge 0x4c86
movq (%r14,%rbp,8), %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x481c
movq %r13, %rdi
movq %r15, %rsi
leaq 0x33ed(%rip), %rdx      # 0x804e
callq 0x2973
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2230
movq %r13, %rdi
callq 0x20b0
movq %r15, %rdi
callq 0x20b0
incq %rbp
jmp 0x4c40
movq (%r14,%r12,8), %rdx
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x481c
leaq 0x20(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2230
movq %r14, %rdi
callq 0x20b0
movq %rbx, %rax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4ce6
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x2040
jmp 0x4ce9
jmp 0x4ce6
jmp 0x4ce6
movq %rax, %r14
movq %rsp, %rdi
callq 0x20b0
jmp 0x4ce9
movq %rax, %r14
movq %rbx, %rdi
callq 0x20b0
movq %r14, %rdi
callq 0x2340
nop
// File: /workspace/github_cpp_makefile_star2_O2/camargodev[P]n-tile-puzzle/src/InputReader.cpp
// Function: InputReader::getStateFromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
const UnpackedState InputReader :: getStateFromString(string str) {
    vector<string> values = split(str, ' ');
    UnpackedState state;
    Line stateLine;
    int numOfTiles = sqrt(values.size()); 
    int counter = 1;
    for (auto value : values) {
        stateLine.push_back(stoi(value));
        if (counter == numOfTiles) {
            state.push_back(stateLine);
            counter = 0;
            stateLine.clear();
        }
        counter++;
    }
    return state;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r13
leaq 0x48(%rsp), %r14
movb $0x20, (%r14)
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %r14, %rcx
callq 0x4a34
movq (%r12), %r15
movq 0x8(%r12), %rbx
movq %rbx, %rax
subq %r15, %rax
sarq $0x5, %rax
movq %rax, %xmm0
punpckldq 0x342c(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x3434(%rip), %xmm0     # 0x8180
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
andq $0x0, 0x10(%r13)
leaq 0x10(%rsp), %r12
andq $0x0, 0x10(%r12)
movq %r13, 0x8(%rsp)
movupd %xmm0, (%r13)
sqrtsd %xmm1, %xmm1
cvttsd2si %xmm1, %ebp
movapd %xmm0, (%r12)
pushq $0x1
popq %r13
cmpq %rbx, %r15
je 0x4def
movq %r14, %rdi
movq %r15, %rsi
callq 0x2270
movq %r14, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x519a
movw %ax, 0x6(%rsp)
movq %r12, %rdi
leaq 0x6(%rsp), %rsi
callq 0x57cc
cmpl %ebp, %r13d
jne 0x4dde
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x51b6
movq 0x10(%rsp), %rax
xorl %r13d, %r13d
cmpq %rax, 0x18(%rsp)
je 0x4dde
movq %rax, 0x18(%rsp)
incl %r13d
movq %r14, %rdi
callq 0x20b0
addq $0x20, %r15
jmp 0x4d89
leaq 0x10(%rsp), %rdi
callq 0x2ba8
leaq 0x30(%rsp), %rdi
callq 0x5136
movq 0x8(%rsp), %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4e1e
movq %rax, %r14
jmp 0x4e2b
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x20b0
leaq 0x10(%rsp), %rdi
callq 0x2ba8
movq 0x8(%rsp), %rdi
callq 0x29ec
leaq 0x30(%rsp), %rdi
callq 0x5136
movq %r14, %rdi
callq 0x2340
nop
// File: /workspace/github_cpp_makefile_star2_O2/camargodev[P]n-tile-puzzle/src/InputReader.cpp
// Function: InputReader::parseStates(int, char**, bool)
vector<UnpackedState> InputReader :: parseStates(int argc, char** argv, bool isTxt) {
    string input = parseStatesToString(argc, argv, isTxt);
    vector<string> strStates;
    if(isTxt){
        strStates = split(input, '\n');
    }
    else{
        strStates = split(input, ',');
    }
    vector<UnpackedState> states;
    for (auto state : strStates) 
        states.push_back(getStateFromString(state));
    return states;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %r8d, %ebp
movq %rdi, %rbx
leaq 0x58(%rsp), %rdi
callq 0x4ba6
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
leaq 0x40(%rsp), %rcx
testl %ebp, %ebp
je 0x4eaa
movb $0xa, (%rcx)
leaq 0x20(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0x4a34
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x51e2
jmp 0x4ec9
movb $0x2c, (%rcx)
leaq 0x20(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0x4a34
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x51e2
leaq 0x20(%rsp), %rdi
callq 0x5136
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq (%rsp), %r14
movq 0x8(%rsp), %rbp
leaq 0x20(%rsp), %r15
leaq 0x78(%rsp), %r12
leaq 0x40(%rsp), %r13
cmpq %rbp, %r14
je 0x4f45
movq %r15, %rdi
movq %r14, %rsi
callq 0x2270
movq %r12, %rdi
movq %r15, %rsi
callq 0x2270
movq %r13, %rdi
movq %r12, %rdx
callq 0x4cfa
movq %rbx, %rdi
movq %r13, %rsi
callq 0x52a2
movq %r13, %rdi
callq 0x29ec
movq %r12, %rdi
callq 0x20b0
movq %r15, %rdi
callq 0x20b0
addq $0x20, %r14
jmp 0x4ef6
movq %rsp, %rdi
callq 0x5136
leaq 0x58(%rsp), %rdi
callq 0x20b0
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4f6e
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x5136
jmp 0x4fbc
jmp 0x4f7f
movq %rax, %r14
jmp 0x4fbc
movq %rax, %r14
jmp 0x4fb4
movq %rax, %r14
jmp 0x4faa
movq %rax, %r14
jmp 0x4fa0
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x29ec
leaq 0x78(%rsp), %rdi
callq 0x20b0
leaq 0x20(%rsp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x2a0e
movq %rsp, %rdi
callq 0x5136
leaq 0x58(%rsp), %rdi
callq 0x20b0
movq %r14, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O2/camargodev[P]n-tile-puzzle/src/InputReader.cpp
// Function: InputReader::parseInput(int, char**)
Input InputReader :: parseInput(int argc, char** argv) {
    Input input;

    string teste = "";
    teste = teste + argv[argc-1];
    std::size_t found = teste.find(".txt");
    bool isTxt = false;
    if(found!=std::string::npos){
        isTxt = true;
    }

    input.algorithm = getAlgorithmId(argv[ALGORITHM_INDEX]);
    input.states = parseStates(argc, argv, isTxt);
    return input;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x3050(%rip), %rsi      # 0x8051
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x2080
movslq %ebp, %rax
movq -0x8(%r14,%rax,8), %rdx
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x481c
leaq 0x28(%rsp), %r12
leaq 0x8(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x2230
movq %r13, %rdi
callq 0x20b0
leaq 0x3166(%rip), %rsi      # 0x81b1
movq %r12, %rdi
xorl %edx, %edx
callq 0x23b0
movq %rax, %r12
movslq (%r15), %rax
movq (%r14,%rax,8), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x2080
xorl %r13d, %r13d
cmpq $-0x1, %r12
setne %r13b
leaq 0x8(%rsp), %r12
movq %r12, %rsi
callq 0x4b2c
movl %eax, 0x18(%rbx)
movq %r12, %rdi
callq 0x20b0
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movl %ebp, %edx
movq %r14, %rcx
movl %r13d, %r8d
callq 0x4e52
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5bb8
movq %r14, %rdi
callq 0x2a0e
leaq 0x28(%rsp), %rdi
callq 0x20b0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x50de
jmp 0x50de
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x20b0
jmp 0x50f0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2a0e
movq %r14, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O2/camargodev[P]n-tile-puzzle/src/algorithms/IDFS.cpp
// Function: IDFS::depthLimitedSearch(unsigned long, unsigned long, int)
IDFS::Solution IDFS :: depthLimitedSearch(PackedState state, PackedState parent, int depthLimit){
    IDFS::Solution solution;
    StateManager stateManager;

    if (stateManager.isGoalState(state)){
        solution.isSolution = true;
        solution.cost = 0;
        return solution;
    }
    
    if(depthLimit > 0){
        this->result->increaseExpandedNodes();
        for (auto successorState : stateManager.produceNextPackedStates(state)) {
            if(successorState != parent){
                solution = depthLimitedSearch(successorState, state, depthLimit-1);
                if(solution.isSolution == true){
                    solution.cost++;
                    return solution;
                }
            }            
        }
    }  

    solution.isSolution = false;
    return solution;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %r15d
movq %rdx, %r14
movq %rdi, 0x8(%rsp)
leaq 0x30(%rsp), %rdi
andw $0x0, (%rdi)
movq $0xf, 0x8(%rdi)
movq %rsi, 0x10(%rsp)
callq 0x2dec
testb %al, %al
je 0x73d9
movb $0x1, %r15b
xorl %r13d, %r13d
jmp 0x745d
testl %r15d, %r15d
jle 0x745a
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x42ec
leaq 0x18(%rsp), %r13
leaq 0x30(%rsp), %rsi
movq %r13, %rdi
movq 0x10(%rsp), %rdx
callq 0x329a
movq (%r13), %r12
movq 0x8(%r13), %rbx
decl %r15d
cmpq %rbx, %r12
je 0x744b
movq (%r12), %rsi
cmpq %r14, %rsi
je 0x7445
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
movl %r15d, %ebp
movl %r15d, %ecx
callq 0x7396
movl %eax, %r15d
movq %rdx, %r13
andb $0x1, %al
movzbl %al, %eax
addq %rax, %r13
testb %al, %al
jne 0x744e
movl %ebp, %r15d
addq $0x8, %r12
jmp 0x740d
xorl %r15d, %r15d
leaq 0x18(%rsp), %rdi
callq 0x3d6e
jmp 0x745d
xorl %r15d, %r15d
movl %r15d, %eax
movq %r13, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3d6e
movq %rbx, %rdi
callq 0x2340
nop
// File: /workspace/github_cpp_makefile_star2_O2/camargodev[P]n-tile-puzzle/src/algorithms/IDFS.cpp
// Function: IDFS::execute(unsigned long)
Result IDFS :: execute(PackedState initialState){

    StateManager stateManager;

    this->result->startCountingTime();
    this->result->setInitialHeuristicValue(stateManager.calculateHeuristic(initialState));
    
    int depthLimit = 0;
    IDFS::Solution solution;

    while(true){
        solution = depthLimitedSearch(initialState, 0, depthLimit);
        if (solution.isSolution == true) {
            this->result->setOptimalSolutionLenght(solution.cost);
            this->result->stopCountingTime();
            return *(this->result);
        }
        depthLimit++;
    }

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r15
leaq 0x8(%rsp), %r12
andw $0x0, (%r12)
movq %rsi, %r14
movq %rdi, %rbx
movq $0xf, 0x8(%r12)
movq (%rsi), %rdi
callq 0x4316
movq (%r14), %r13
movq %r12, %rdi
movq %r15, %rsi
callq 0x34a2
movq %r13, %rdi
movl %eax, %esi
callq 0x432c
xorl %r12d, %r12d
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movl %r12d, %ecx
callq 0x7396
incl %r12d
testb $0x1, %al
je 0x74d5
movq (%r14), %rdi
movl %edx, %esi
callq 0x4326
movq (%r14), %rdi
callq 0x42f4
movq (%r14), %rax
movq 0x30(%rax), %rcx
movq %rcx, 0x30(%rbx)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/camargodev[P]n-tile-puzzle/src/algorithms/IDAStar.cpp
// Function: IDAStar::buildNode(State, int)
Node IDAStar :: buildNode(State state, int cost) {
    Node node;
    node.state = state;
    node.cost = cost;
    node.index = -1;
    return node;
}

// Assembly:
movq %rdi, %rax
movq %rdx, (%rdi)
movq %rcx, 0x8(%rdi)
movb %r8b, 0x10(%rdi)
orl $-0x1, 0x14(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/camargodev[P]n-tile-puzzle/src/algorithms/IDAStar.cpp
// Function: IDAStar::execute(unsigned long)
Result IDAStar :: execute(PackedState initialState){
    StateManager stateManager;
    unsigned long long int fLimit = stateManager.calculateHeuristic(initialState);
    
    this->result->startCountingTime();
    this->result->setInitialHeuristicValue(fLimit);
    this->result->increaseTotalHeuristicValue(fLimit);

    State initial;
    initial.value = initialState;
    initial.heuristic = fLimit;
    initial.parentBlankPos = -1;
    Node initialNode = IDAStar::buildInitialNode(initial);
    
    IDAStar::Solution solution;

    while(fLimit != ULLONG_MAX){
        solution = recursiveSearch(initialNode, 0, fLimit);
        if(solution.isSolution == true){
            this->result->setOptimalSolutionLenght(solution.cost);
            this->result->stopCountingTime();
            return *(this->result);
        }
        fLimit = solution.limit;
    }

    this->result->setOptimalSolutionLenght(INT_MAX);
    return *(this->result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x50(%rsp), %rdi
andw $0x0, (%rdi)
movq $0xf, 0x8(%rdi)
movq %rdx, %rsi
callq 0x34a2
movslq %eax, %r12
movq (%r14), %rdi
callq 0x4316
movq (%r14), %rdi
movl %r12d, %esi
callq 0x432c
movq (%r14), %rdi
movl %r12d, %esi
callq 0x4332
movzbl %r12b, %ebp
orl $0xff00, %ebp           # imm = 0xFF00
leaq 0x38(%rsp), %r13
cmpq $-0x1, %r12
je 0x784e
movq %r15, 0x20(%rsp)
movq %rbp, 0x28(%rsp)
movb $0x0, 0x30(%rsp)
orl $-0x1, 0x34(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r13, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl %r12d, %ecx
callq 0x758c
movq 0x48(%rsp), %r12
testb $0x1, 0x38(%rsp)
je 0x77ee
movq 0x40(%rsp), %rsi
movq (%r14), %rdi
callq 0x4326
movq (%r14), %rdi
callq 0x42f4
jmp 0x785b
movq (%r14), %rdi
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
callq 0x4326
movq (%r14), %rax
movq 0x30(%rax), %rcx
movq %rcx, 0x30(%rbx)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/brc7[P]DiversitySampling/src/SequenceMinHash.cpp
// Function: SequenceMinHash::getHash(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int*)
void SequenceMinHash::getHash(size_t k, const std::string& sequence, int* hashes){
    // getHash(size_t k, std::string& sequence, int* hashes)
    // hashes had better be pre-allocated to _numhashes!!
    // I do this because this is faster in a loop 
    #pragma omp parallel for 
    for (int n=0; n < _numhashes; n++) {

        unsigned int hashed_value;
        unsigned int minhashed_value;

        minhashed_value = std::numeric_limits<unsigned int>::max(); 
        hashes[n] = 0; 

        const char* seq = sequence.c_str(); 
        int len = sequence.length(); 

        // for each kmer in the sequence
        for (int start = 0; (start + k + 1) < len; start++){
            hashed_value = MurmurHash(seq + start, sizeof(char)*k, n); 

            if (hashed_value < minhashed_value){
                minhashed_value = hashed_value;
                hashes[n] = MurmurHash(seq + start, sizeof(char)*k, n*3); 
                // proxy for returning the string itself
            }
        }

    }
    return; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, 0x20(%rsp)
movq %rsi, %r15
movq %rdi, 0x28(%rsp)
leaq 0x1(%rsi), %rax
movq %rax, 0x18(%rsp)
xorl %r13d, %r13d
movq 0x28(%rsp), %rax
movslq (%rax), %rax
cmpq %rax, %r13
jge 0x2539
movq 0x10(%rsp), %rax
andl $0x0, (%rax,%r13,4)
movq 0x20(%rsp), %rax
movq (%rax), %rbp
movslq 0x8(%rax), %rax
movq %rax, 0x30(%rsp)
leal (%r13,%r13,2), %eax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %r12
pushq $-0x1
popq %rbx
cmpq 0x30(%rsp), %r12
jae 0x2534
movq %rbp, %rdi
movl %r15d, %esi
movl %r13d, %edx
callq 0x2ab0
cmpl %ebx, %eax
jae 0x252c
movl %eax, %r14d
movq %rbp, %rdi
movl %r15d, %esi
movl 0xc(%rsp), %edx
callq 0x2ab0
movq 0x10(%rsp), %rcx
movl %eax, (%rcx,%r13,4)
movl %r14d, %ebx
incq %rbp
incq %r12
jmp 0x24f5
incq %r13
jmp 0x24bc
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/brc7[P]DiversitySampling/src/io.cpp
// Function: SequenceFeaturesPE(std::istream&, std::istream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool SequenceFeaturesPE(std::istream& in1, std::istream& in2, std::string& sequence, std::string& chunk1, std::string& chunk2, std::string fastWhat){
    bool success1 = SequenceFeatures(in2, sequence, chunk2, fastWhat); 
    bool success2 = SequenceFeatures(in1, sequence, chunk1, fastWhat); 

    if (!success1){
        std::cerr<<"Error reading first "<<fastWhat<<" file"<<std::endl; 
        return false; 
    }
    if (!success2){
        std::cerr<<"Error reading second "<<fastWhat<<" file"<<std::endl; 
        return false; 
    }
    return (success1 && success2); 

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %rbx
movq %r8, %r15
movq %rcx, (%rsp)
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbp
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %r9, %rsi
callq 0x21e0
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2548
movl %eax, %r15d
leaq 0x28(%rsp), %rdi
callq 0x20b0
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x21e0
movq %rbp, %rdi
movq %r13, %rsi
movq (%rsp), %rdx
movq %r14, %rcx
callq 0x2548
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x20b0
andb %r15b, %bpl
jne 0x2973
leaq 0x1845(%rip), %rax      # 0x417c
leaq 0x1823(%rip), %rsi      # 0x4161
testb %r15b, %r15b
cmovneq %rax, %rsi
movq 0x46a4(%rip), %rdi      # 0x6ff0
callq 0x2150
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2140
leaq 0x1813(%rip), %rsi      # 0x4176
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x20c0
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2986
movq %rax, %rbx
movq %r14, %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/brc7[P]DiversitySampling/src/io.cpp
// Function: SequenceFeaturesI(std::istream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool SequenceFeaturesI(std::istream& in, std::string& sequence, std::string& chunk, std::string fastWhat){
    bool success = SequenceFeatures(in, sequence, chunk, fastWhat); 

    // now tack on another few lines for the second chunk of the interleaved file! 
    int chunksize = 0; 
    int linesread = 0; 
    if (fastWhat == "fasta") {
        chunksize = 2;
    } else if (fastWhat == "fastq") {
        chunksize = 4;
    }
    std::string buffer;
    while((linesread < chunksize) && (in)){
        std::getline(in, buffer); 
        linesread++; 
        chunk += buffer; 
        chunk += "\n"; 
    }
    return success; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
leaq 0x28(%rsp), %r13
movq %r13, %rdi
movq %rcx, %rsi
callq 0x21e0
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x2548
movl %eax, %ebp
leaq 0x28(%rsp), %rdi
callq 0x20b0
leaq 0x161d(%rip), %rsi      # 0x4004
movq %r15, %rdi
callq 0x2aa1
testb %al, %al
je 0x29f9
pushq $0x2
popq %r13
jmp 0x2a10
leaq 0x1cff(%rip), %rsi      # 0x46ff
movq %r15, %rdi
callq 0x2aa1
movzbl %al, %r13d
shll $0x2, %r13d
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
incl %r13d
leaq 0x8(%rsp), %r15
leaq 0x1686(%rip), %r12      # 0x40b6
decl %r13d
je 0x2a67
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r14,%rax)
jne 0x2a67
movq %r14, %rdi
movq %r15, %rsi
callq 0x2060
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22a0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2270
jmp 0x2a30
leaq 0x8(%rsp), %rdi
callq 0x20b0
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x2a94
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/brc7[P]DiversitySampling/src/RACE.cpp
// Function: RACE::add(int*)
void RACE::add(int *hashes){
	/* 
	Input: A set of R integer hash values, one hash value for each ACE repetition
	*/
	#pragma omp parallel for
	for (size_t r = 0; r < _R; r++){
		size_t index = hashes[r] % _range; 
		_sketch[r*_range + index] = _sketch[r*_range + index] + 1; 
	}
}

// Assembly:
movq (%rdi), %rcx
movq 0x8(%rdi), %r8
movq 0x10(%rdi), %rdi
xorl %r9d, %r9d
cmpq %rcx, %r9
jae 0x2c01
movslq (%rsi,%r9,4), %rax
xorl %edx, %edx
divq %r8
movq %r8, %rax
imulq %r9, %rax
leaq (%rdi,%rax,4), %rax
incl (%rax,%rdx,4)
incq %r9
jmp 0x2be0
retq
// File: /workspace/github_cpp_makefile_star2_O2/brc7[P]DiversitySampling/src/RACE.cpp
// Function: RACE::query_and_add(int*)
double RACE::query_and_add(int *hashes){
	/* 
	Input: A set of R integer hash values, one hash value for each ACE repetition
	Performs: Update to RACE array
	Returns: query value of RACE array 
	*/
	double mean = 0; 
	for (size_t r = 0; r < _R; r++){
		size_t index = hashes[r] % _range; 
		mean = mean + _sketch[r*_range + index]; 
		_sketch[r*_range + index] = _sketch[r*_range + index] + 1; 
	}
	mean = mean / _R; 
	return mean; 
}

// Assembly:
movq (%rdi), %rcx
movq 0x8(%rdi), %r8
movq 0x10(%rdi), %rdi
xorpd %xmm0, %xmm0
xorl %r9d, %r9d
cmpq %r9, %rcx
je 0x2c46
movslq (%rsi,%r9,4), %rax
xorl %edx, %edx
divq %r8
movq %r8, %rax
imulq %r9, %rax
leaq (%rdi,%rax,4), %rax
movl (%rax,%rdx,4), %r10d
cvtsi2sd %r10, %xmm1
addsd %xmm1, %xmm0
incl %r10d
movl %r10d, (%rax,%rdx,4)
incq %r9
jmp 0x2c14
movq %rcx, %xmm1
punpckldq 0x154d(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1555(%rip), %xmm1     # 0x41b0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/brc7[P]DiversitySampling/src/RACE.cpp
// Function: RACE::query(int*)
double RACE::query(int *hashes){

	double mean = 0; 
	for (size_t r = 0; r < _R; r++){
		size_t index = hashes[r] % _range;
		mean = mean + _sketch[r*_range + index]; 
	}
	mean = mean / _R; 
	return mean; 
}

// Assembly:
movq (%rdi), %rcx
movq 0x8(%rdi), %r8
movq 0x10(%rdi), %rdi
xorpd %xmm0, %xmm0
xorl %r9d, %r9d
cmpq %r9, %rcx
je 0x2cd8
movslq (%rsi,%r9,4), %rax
xorl %edx, %edx
divq %r8
movq %r8, %rax
imulq %r9, %rax
leaq (%rdi,%rax,4), %rax
movl (%rax,%rdx,4), %eax
cvtsi2sd %rax, %xmm1
addsd %xmm1, %xmm0
incq %r9
jmp 0x2cae
movq %rcx, %xmm1
punpckldq 0x14bb(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x14c3(%rip), %xmm1     # 0x41b0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/brc7[P]DiversitySampling/src/RACE.cpp
// Function: RACE::serialize(std::ostream&)
void RACE::serialize(std::ostream &out){
	/*
	Input: A BINARY ostream out. You can open a binary output stream
	with the flag: std::ios::binary | std::ios::out
	Format: (Big Endian) 
	magic_number (uint8_t); file_version_number (uint8_t); R (uint64_t); range (uint64_t);
	Then every element in the sketch, as a uint32_t
	*/

	// 0. Determine if system is big-endian or little-endian 
	// 1. Write magic numbers and parameters to file 
	// 2. For each element in sketch, cast element to standard-sized element 
	// 3. Depending on (1), bitflip so that it is big-endian (network order)
	// 4. Write to stream 

	// 1. Determine if system is big-endian or little-endian
	uint32_t n = 1; 
	bool is_little_endian = *(uint8_t*)(&n);

	// 0. Write magic number and file version. Dont worry about endianness, as these are bytes 
	out.write(reinterpret_cast <const char *>(&magic_number), sizeof(uint8_t));
	out.write(reinterpret_cast <const char *>(&file_version_number), sizeof(uint8_t));

	// 0. Write the parameters to the file 
	uint64_t sketch_param = _R; 
	if (is_little_endian)
		sketch_param = __builtin_bswap64(sketch_param);
    out.write(reinterpret_cast <char *>(&sketch_param), sizeof(uint64_t));
	
	sketch_param = _range; 
	if (is_little_endian)
		sketch_param = __builtin_bswap64(sketch_param);
    out.write(reinterpret_cast <char *>(&sketch_param), sizeof(uint64_t));

	// 2. For each element in sketch
	for (size_t r = 0; r < _R; r++){
		for (size_t i = 0; i < _range; i++){
			// 2. Cast element to standard-sized element
			uint32_t value = _sketch[r*_range + i];
			// 3. Depending on (1), bitflip so that it is big-endian (network order)
			if (is_little_endian)
				value = __builtin_bswap32(value);
			// 4. Write to stream 
			out.write(reinterpret_cast <char *>(&value), sizeof(uint32_t));
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rdi), %rsi
pushq $0x1
popq %r15
movq %rbx, %rdi
movq %r15, %rdx
callq 0x21d0
leaq 0x19(%r14), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x21d0
movq (%r14), %rax
bswapq %rax
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
pushq $0x8
popq %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x21d0
movq 0x8(%r14), %rax
bswapq %rax
movq %rax, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x21d0
xorl %r13d, %r13d
leaq 0x4(%rsp), %r15
pushq $0x4
popq %r12
xorl %eax, %eax
cmpq (%r14), %rax
jae 0x2ddb
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
movq 0x8(%r14), %rax
cmpq %rax, %rbp
jae 0x2dcd
imulq %r13, %rax
addq 0x10(%r14), %rax
movl (%rax,%rbp,4), %eax
bswapl %eax
movl %eax, 0x4(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x21d0
incq %rbp
jmp 0x2da0
movq 0x8(%rsp), %rax
incq %rax
addq $0x4, %r13
jmp 0x2d94
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/brc7[P]DiversitySampling/src/RACE.cpp
// Function: RACE::deserialize(std::istream&)
void RACE::deserialize(std::istream& in){
  	/*   
	Input: A BINARY istream in. You can open a binary input stream
	with the flag: std::ios::binary | std::ios::in

	beware: frees sketch
	*/

	// 0. Determine if system is little-endian
	uint32_t n = 1;
	bool is_little_endian = *(uint8_t*)(&n);

	uint8_t magic, version;
	uint64_t R, range;

	in.read(reinterpret_cast<char *>(&magic), sizeof(uint8_t)); 
	in.read(reinterpret_cast<char *>(&version), sizeof(uint8_t)); 
	
	if (magic != magic_number)
		return;

	in.read(reinterpret_cast<char *>(&R), sizeof(uint64_t));
	in.read(reinterpret_cast<char *>(&range), sizeof(uint64_t));

	// fix endian-ness of parameters
	if (is_little_endian){
		R = __builtin_bswap64(R); 
		range = __builtin_bswap64(range);
	}

	_R = R; _range = range; 
	uint32_t* recovered_sketch = new uint32_t[_R*_range]; 

	// now read the sketch into recovered_sketch
	in.read(reinterpret_cast <char *>(recovered_sketch), _R*_range*sizeof(uint32_t));

	delete[] _sketch;
	_sketch = new unsigned int[_R *_range];

	for (size_t r = 0; r < _R; r++){
		for (size_t i = 0; i < _range; i++){
			uint32_t value = recovered_sketch[r*_range + i];
			// 3. Depending on (1), bitflip so that it is big-endian (network order)
			if (is_little_endian)
				value = __builtin_bswap32(value);
			// 4. Save to our sketch 
			_sketch[r*_range + i] = value;
		}
	}
	delete[] recovered_sketch; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x7(%rsp), %r14
pushq $0x1
popq %r12
movq %rsi, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x21b0
leaq 0x6(%rsp), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x21b0
movb (%r14), %al
cmpb 0x18(%rbx), %al
jne 0x2f23
movabsq $0x3fffffffffffffff, %rbp # imm = 0x3FFFFFFFFFFFFFFF
leaq 0x10(%rsp), %r14
pushq $0x8
popq %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x21b0
leaq 0x8(%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x21b0
movq (%r14), %rax
bswapq %rax
movq %rax, (%r14)
movq (%r13), %r12
bswapq %r12
movq %r12, (%r13)
movq %rax, (%rbx)
movq %r12, 0x8(%rbx)
imulq %rax, %r12
movq %r12, %rax
shrq $0x3e, %rax
shlq $0x2, %r12
xorl %edi, %edi
negq %rax
sbbq %rdi, %rdi
orq %r12, %rdi
callq 0x2030
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x21b0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x2ebe
callq 0x21c0
movq (%rbx), %r15
movq 0x8(%rbx), %r12
movq %r12, %rax
imulq %r15, %rax
leaq (,%rax,4), %rcx
cmpq %rbp, %rax
pushq $-0x1
popq %rdi
cmovbeq %rcx, %rdi
callq 0x2030
movq %rax, 0x10(%rbx)
leaq (,%r12,4), %rcx
xorl %edx, %edx
movq %r14, %rsi
cmpq %r15, %rdx
je 0x2f1b
xorl %edi, %edi
cmpq %rdi, %r12
je 0x2f10
movl (%rsi,%rdi,4), %r8d
bswapl %r8d
movl %r8d, (%rax,%rdi,4)
incq %rdi
jmp 0x2efb
incq %rdx
addq %rcx, %rax
addq %rcx, %rsi
jmp 0x2ef4
movq %r14, %rdi
callq 0x21c0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/brc7[P]DiversitySampling/src/RACE.cpp
// Function: RACE::pprint(std::ostream&, int, bool)
void RACE::pprint(std::ostream& out, int width, bool format){
	for (size_t r = 0; r < _R; r++){
		if (format)
			out << std::string((width+1)*_range + 1, '-') << std::endl; 
		for (size_t i = 0; i < _range; i++)
			out << '|' << std::setw(width) << _sketch[r*_range + i];
		out << '|' << std::endl; 
	}
	if (format)
		out << std::string((width+1)*_range + 1, '-') << std::endl; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, 0x4(%rsp)
movq %rsi, %rbx
movq %rdi, %r15
leal 0x1(%rdx), %eax
cltq
movq %rax, 0x8(%rsp)
movslq %edx, %r14
xorl %r12d, %r12d
leaq 0x10(%rsp), %r13
xorl %ebp, %ebp
cmpq (%r15), %rbp
jae 0x300f
cmpb $0x0, 0x4(%rsp)
je 0x2fae
movq 0x8(%r15), %rsi
imulq 0x8(%rsp), %rsi
incq %rsi
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r13, %rdi
pushq $0x2d
popq %rdx
callq 0x2180
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2140
movq %rax, %rdi
callq 0x20c0
movq %r13, %rdi
callq 0x20b0
movq %rbp, 0x30(%rsp)
xorl %ebp, %ebp
movq 0x8(%r15), %r13
movq %rbx, %rdi
pushq $0x7c
popq %rsi
callq 0x2190
cmpq %r13, %rbp
jae 0x2ff1
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq %r14, 0x10(%rax,%rcx)
movq 0x8(%r15), %rcx
imulq %r12, %rcx
addq 0x10(%r15), %rcx
movl (%rcx,%rbp,4), %esi
movq %rax, %rdi
callq 0x2100
incq %rbp
jmp 0x2fb5
movq %rax, %rdi
callq 0x20c0
movq 0x30(%rsp), %rbp
incq %rbp
addq $0x4, %r12
leaq 0x10(%rsp), %r13
jmp 0x2f61
cmpb $0x0, 0x4(%rsp)
je 0x3057
movq 0x8(%rsp), %rsi
imulq 0x8(%r15), %rsi
incq %rsi
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
movq %rax, (%rdi)
pushq $0x2d
popq %rdx
callq 0x2180
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20c0
leaq 0x10(%rsp), %rdi
callq 0x20b0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x306a
jmp 0x306f
movq %rax, %rbx
jmp 0x307c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/test/emtest.cc
// Function: viterbiTest1::test_method()
BOOST_AUTO_TEST_CASE(viterbiTest1)
{
    map<string, flt_type> vocab;
    string str1("a"); string str2("bc");
    vocab[str1] = -1.0;
    vocab[str2] = -2.0;
    string sentence("abc");
    int maxlen = 2;
    vector<string> correct_path;
    correct_path.push_back(str1);
    correct_path.push_back(str2);
    viterbiChecks(vocab, maxlen, sentence, correct_path, -3.0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xa8, %rsp
leaq -0xa8(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x2a04b(%rip), %rsi     # 0x53f2c
leaq -0x80(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x5160
leaq 0x29d03(%rip), %rsi     # 0x53bf8
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x5160
leaq -0xb0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x1b338
movabsq $-0x4010000000000000, %rcx # imm = 0xBFF0000000000000
movq %rcx, (%rax)
leaq -0xb0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x1b338
movabsq $-0x4000000000000000, %rcx # imm = 0xC000000000000000
movq %rcx, (%rax)
leaq 0x29cb4(%rip), %rsi     # 0x53bf7
leaq -0x60(%rbp), %rdi
leaq -0x20(%rbp), %rdx
callq 0x5160
xorps %xmm0, %xmm0
leaq -0x20(%rbp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq -0x80(%rbp), %rsi
callq 0x9670
leaq -0x20(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x9670
leaq -0xb0(%rbp), %rdi
pushq $0x2
popq %rsi
leaq -0x60(%rbp), %rdx
leaq -0x20(%rbp), %rcx
movsd 0x29bc1(%rip), %xmm0    # 0x53b50
pushq $0x1
popq %r8
callq 0x295d8
leaq -0x20(%rbp), %rdi
callq 0x9574
leaq -0x60(%rbp), %rdi
callq 0x57b8
leaq -0x40(%rbp), %rdi
callq 0x57b8
leaq -0x80(%rbp), %rdi
callq 0x57b8
leaq -0xb0(%rbp), %rdi
callq 0x1bba4
addq $0xa8, %rsp
popq %rbx
popq %rbp
retq
jmp 0x29fde
movq %rax, %rbx
jmp 0x2a001
movq %rax, %rbx
jmp 0x2a00a
movq %rax, %rbx
jmp 0x29ff8
movq %rax, %rbx
leaq -0x20(%rbp), %rdi
callq 0x9574
leaq -0x60(%rbp), %rdi
callq 0x57b8
leaq -0x40(%rbp), %rdi
callq 0x57b8
leaq -0x80(%rbp), %rdi
callq 0x57b8
leaq -0xb0(%rbp), %rdi
callq 0x1bba4
movq %rbx, %rdi
callq 0x56b0
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/test/emtest.cc
// Function: viterbiTest2::test_method()
BOOST_AUTO_TEST_CASE(viterbiTest2)
{
    map<string, flt_type> vocab;
    string str1("a"); string str2("bc");
    string str3("ab"); string str4("c");
    vocab[str1] = -1.0;
    vocab[str2] = -2.0;
    vocab[str3] = 0.0;
    vocab[str4] = 0.0;
    string sentence("abc");
    int maxlen = 2;
    vector<string> correct_path;
    correct_path.push_back(str3);
    correct_path.push_back(str4);
    viterbiChecks(vocab, maxlen, sentence, correct_path, 0.0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xe8, %rsp
leaq -0x88(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x29ba5(%rip), %rsi     # 0x53f2c
leaq -0xf0(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
callq 0x5160
leaq 0x29857(%rip), %rsi     # 0x53bf8
leaq -0xd0(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x5160
leaq 0x29850(%rip), %rsi     # 0x53c08
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x5160
leaq 0x2982d(%rip), %rsi     # 0x53bf9
leaq -0x40(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
callq 0x5160
leaq -0x90(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x1b338
movabsq $-0x4010000000000000, %rcx # imm = 0xBFF0000000000000
movq %rcx, (%rax)
leaq -0x90(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x1b338
movabsq $-0x4000000000000000, %rcx # imm = 0xC000000000000000
movq %rcx, (%rax)
leaq -0x90(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x1b338
andq $0x0, (%rax)
leaq -0x90(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x1b338
andq $0x0, (%rax)
leaq 0x297ac(%rip), %rsi     # 0x53bf7
leaq -0xb0(%rbp), %rdi
leaq -0x20(%rbp), %rdx
callq 0x5160
xorps %xmm0, %xmm0
leaq -0x20(%rbp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq -0x60(%rbp), %rsi
callq 0x9670
leaq -0x20(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x9670
leaq -0x90(%rbp), %rdi
pushq $0x2
popq %rsi
leaq -0xb0(%rbp), %rdx
leaq -0x20(%rbp), %rcx
pushq $0x1
popq %r8
xorps %xmm0, %xmm0
callq 0x295d8
leaq -0x20(%rbp), %rdi
callq 0x9574
leaq -0xb0(%rbp), %rdi
callq 0x57b8
leaq -0x40(%rbp), %rdi
callq 0x57b8
leaq -0x60(%rbp), %rdi
callq 0x57b8
leaq -0xd0(%rbp), %rdi
callq 0x57b8
leaq -0xf0(%rbp), %rdi
callq 0x57b8
leaq -0x90(%rbp), %rdi
callq 0x1bba4
addq $0xe8, %rsp
popq %rbx
popq %rbp
retq
jmp 0x2a526
movq %rax, %rbx
jmp 0x2a532
movq %rax, %rbx
jmp 0x2a53b
movq %rax, %rbx
jmp 0x2a547
movq %rax, %rbx
jmp 0x2a553
movq %rax, %rbx
leaq -0x20(%rbp), %rdi
callq 0x9574
leaq -0xb0(%rbp), %rdi
callq 0x57b8
jmp 0x2a529
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x57b8
leaq -0x60(%rbp), %rdi
callq 0x57b8
leaq -0xd0(%rbp), %rdi
callq 0x57b8
leaq -0xf0(%rbp), %rdi
callq 0x57b8
leaq -0x90(%rbp), %rdi
callq 0x1bba4
movq %rbx, %rdi
callq 0x56b0