LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/sagardoshi[P]NegotiationsEncounter/src/Negotiator.cpp
// Function: Negotiator::reactToOffer(Inventory*, float)
bool Negotiator::reactToOffer(Inventory* table, float keyValue) {
    map<string, int>::iterator it;
    float sum = 0.0, response = 0.0;

    string item = "";
    int amount = 0;

    // Iterate through items on the table
    for (it = table->inventory.begin(); it != table->inventory.end(); it++) {
        item = it->first;
        amount = it->second;

        // Get negotiator's preferences * base market value * quantity
        if (amount > 0) sum += prefs[item] * economy[item] * amount;
    }

    // Turn that sum into a ratio of the value of free passage for this level
    generosityOfOffer = sum / keyValue;

    // If player offers more than the key's value, automatic acceptance
    if (generosityOfOffer >= 1) return true;
    // If player offers less than half the key's value, automatic rejection
    else if (generosityOfOffer <= 0.5) return false;
    // Offers 50%-100% apply randomness and negotiator's personality
    else {
        // See asterisked comment at bottom of file for method
        response = (amiability * getRandWeight()) + generosityOfOffer;

        if (response > 1) return true;
        else return false;
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movss %xmm0, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2c76(%rip), %rdx      # 0xf3b8
leaq 0x10(%rsp), %rdi
movq %rdx, %rsi
callq 0x290e
movq 0x50(%r14), %r15
addq $0x40, %r14
cmpq %r14, %r15
movq %rbx, 0x30(%rsp)
je 0xc7f0
leaq 0x90(%rbx), %r12
leaq 0x8(%rbx), %r13
xorps %xmm0, %xmm0
movss %xmm0, 0x4(%rsp)
leaq 0x10(%rsp), %rbp
leaq 0x20(%r15), %rsi
movq %rbp, %rdi
callq 0x2140
movl 0x40(%r15), %ebx
testl %ebx, %ebx
jle 0xc7de
movq %r12, %rdi
movq %rbp, %rsi
callq 0xd6d2
movss (%rax), %xmm0
movss %xmm0, 0xc(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x661a
xorps %xmm0, %xmm0
cvtsi2ssl (%rax), %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %ebx, %xmm1
movss 0xc(%rsp), %xmm2
mulss %xmm0, %xmm2
mulss %xmm2, %xmm1
movss 0x4(%rsp), %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x4(%rsp)
movq %r15, %rdi
callq 0x2180
movq %rax, %r15
cmpq %r14, %rax
jne 0xc77e
jmp 0xc7f9
xorps %xmm0, %xmm0
movss %xmm0, 0x4(%rsp)
movss 0x4(%rsp), %xmm1
divss 0x8(%rsp), %xmm1
movq 0x30(%rsp), %rbx
movss %xmm1, 0x8c(%rbx)
movb $0x1, %bpl
ucomiss 0x35ec(%rip), %xmm1     # 0xfe08
jae 0xc85f
movss 0x2a5a(%rip), %xmm0     # 0xf280
ucomiss %xmm1, %xmm0
jae 0xc85d
movss 0x88(%rbx), %xmm0
movss %xmm0, 0x4(%rsp)
callq 0xc6b0
movss 0x4(%rsp), %xmm1
mulss %xmm0, %xmm1
addss 0x8c(%rbx), %xmm1
ucomiss 0x35b1(%rip), %xmm1     # 0xfe08
seta %bpl
jmp 0xc85f
xorl %ebp, %ebp
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xc87b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2210
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc88e
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xc8ad
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2390
nop
// File: /workspace/github_cpp_makefile_star2_O1/sagardoshi[P]NegotiationsEncounter/src/Negotiator.cpp
// Function: Negotiator::handlePrologueRejection(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void Negotiator::handlePrologueRejection(int turnsLeft, string &rejection) {
    switch (turnsLeft) {
        case 2:
            rejection += "Unfortunately, this seems inevitable. Of course she ";
            rejection += "won't accept your clothes\nfor a deal! What were ";
            rejection += "you thinking? But all you can do is keep trying.\n\n";
            rejection += "Two more attempts left to go before she runs out of ";
            rejection += "patience. You can sense it.\n\n";
            break;
        case 1:
            rejection += "You put your clothes back on, humiliated by this ";
            rejection += "ordeal. Is she amused by you?\nDisgusted? You can't ";
            rejection += "tell. There's nothing for it. One more doomed ";
            rejection += "offer to go.\n\nHopefully she won't just ";
            rejection += "squash you where you stand. The odds don't exactly ";
            rejection += "seem\ngood...\n\n";
            break;
        default:
            break;
    }

    cout << rejection;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
cmpl $0x2, %esi
je 0xcc40
cmpl $0x1, %esi
jne 0xcc97
leaq 0x3696(%rip), %rsi      # 0x102a9
movq %rbx, %rdi
callq 0x23d0
leaq 0x3778(%rip), %r14      # 0x1039a
leaq 0x373d(%rip), %r15      # 0x10366
leaq 0x370e(%rip), %r12      # 0x1033e
leaq 0x36d8(%rip), %r13      # 0x1030f
leaq 0x369d(%rip), %rsi      # 0x102db
jmp 0xcc63
leaq 0x3644(%rip), %r14      # 0x1028b
leaq 0x3608(%rip), %r15      # 0x10256
leaq 0x35ce(%rip), %r12      # 0x10223
leaq 0x3596(%rip), %r13      # 0x101f2
leaq 0x355a(%rip), %rsi      # 0x101bd
movq %rbx, %rdi
callq 0x23d0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x23d0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x23d0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x23d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x23d0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x832b(%rip), %rdi      # 0x14fd0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O1/sagardoshi[P]NegotiationsEncounter/src/PlayerCharacter.cpp
// Function: PlayerCharacter::takeBackOffer(Inventory*)
void PlayerCharacter::takeBackOffer(Inventory* table) {
    map<string, int>::iterator it;
    string item = "";
    int amount = 0;

    for (it = table->inventory.begin(); it != table->inventory.end(); it++) {
        item = it->first;
        amount = it->second;
        if (amount > 0) {
            table->inventory[item] = 0; // Take item(s) off table
            inventory[item] += amount;  // Put item(s) back into bag

        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x9d8(%rip), %rdx       # 0xf3b8
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x290e
movq 0x50(%rbx), %r15
leaq 0x40(%rbx), %rbp
cmpq %rbp, %r15
je 0xea4b
addq $0x38, %rbx
addq $0x38, %r14
leaq 0x8(%rsp), %r12
leaq 0x20(%r15), %rsi
movq %r12, %rdi
callq 0x2140
movl 0x40(%r15), %r13d
testl %r13d, %r13d
jle 0xea3b
movq %rbx, %rdi
movq %r12, %rsi
callq 0x661a
movl $0x0, (%rax)
movq %r14, %rdi
movq %r12, %rsi
callq 0x661a
addl %r13d, (%rax)
movq %r15, %rdi
callq 0x2180
movq %rax, %r15
cmpq %rbp, %rax
jne 0xea07
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xea67
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xea95
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2390
nop
// File: /workspace/github_cpp_makefile_star2_O1/nmmmnu[P]HM3/test/test_checkedvalue.cc
// Function: void test_pass<CalcError, (CalcError)0, (CalcError)2>(bool)
void test_pass(bool const success){
	constexpr int n = 5;

	const float dividor	= success ? 1 : 0;
	const auto  expected	= success ? OK : ERR;

	const auto v = test_function<T, OK, ERR>(n, dividor);

	PRINTF_TEST("bool",	v == success		);
	PRINTF_TEST("code()",	v.code() == expected	);

	if (success)
	PRINTF_TEST("get()",	v.get() == n		);

	printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebp
leaq 0xe74(%rip), %r14       # 0x2008
leaq 0xe85(%rip), %r15       # 0x2020
leaq 0xe8b(%rip), %rdx       # 0x202d
leaq 0xe89(%rip), %rbx       # 0x2032
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1030
leaq 0xe7a(%rip), %rdx       # 0x203a
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1030
testl %ebp, %ebp
je 0x121c
movzbl %bpl, %eax
cvtsi2ss %eax, %xmm0
movss 0xe20(%rip), %xmm1      # 0x2004
movaps %xmm1, %xmm2
divss %xmm0, %xmm2
ucomiss %xmm1, %xmm2
leaq 0xe40(%rip), %rax       # 0x2035
cmovneq %rax, %rbx
cmovpq %rax, %rbx
leaq 0xe04(%rip), %rdi       # 0x2008
leaq 0xe15(%rip), %rsi       # 0x2020
leaq 0xe2f(%rip), %rdx       # 0x2041
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1030
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1040
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/kmeans.cpp
// Function: expandVector(vector&)
void expandVector(vector& v) {
	int* new_keys = new int[v.size+1];
	double* new_values = new double[v.size+1];
	for(int i=0; i<v.size; i++) {
		new_keys[i] = v.keys[i];
		new_values[i] = v.values[i];
	}

	if(v.keys != 0)
		delete v.keys;
	if(v.values != 0)
		delete v.values;

	v.size++;
	v.keys = new_keys;
	v.values = new_values;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq (%rdi), %r12
movq $-0x1, %rax
cmpq %rax, %r12
leaq 0x4(,%r12,4), %rdi
cmovlq %rax, %rdi
leaq 0x8(,%r12,8), %r15
cmovlq %rax, %r15
callq 0x1030
movq %rax, %r14
movq %r15, %rdi
callq 0x1030
movq %rax, %r15
testq %r12, %r12
jle 0x12f8
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
xorl %edx, %edx
movl (%rax,%rdx,4), %esi
movl %esi, (%r14,%rdx,4)
movsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, (%r15,%rdx,8)
incq %rdx
cmpq %rdx, %r12
jne 0x12de
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x1306
callq 0x10d0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x1314
callq 0x10d0
incl (%rbx)
movq %r14, 0x8(%rbx)
movq %r15, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/kmeans.cpp
// Function: scalar(vector const&, vector const&)
double scalar(const vector& v1, const vector& v2) {
	double result = 0;
	int i1 = 0, i2 = 0;
	while(i1 < v1.size && i2 < v2.size) {
		if(v1.keys[i1] == v2.keys[i2]) {
			result += v1.values[i1] * v2.values[i2];
			i1++;
			i2++;
		} else if (v1.keys[i1] < v2.keys[i2]) {
			i1++;
		} else {
			i2++;
		}
	}
	return result;
}

// Assembly:
movl (%rdi), %eax
movl (%rsi), %ecx
testl %eax, %eax
setg %dl
testl %ecx, %ecx
setg %r8b
andb %dl, %r8b
xorpd %xmm0, %xmm0
cmpb $0x1, %r8b
jne 0x139b
pushq %rbp
pushq %rbx
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rdi
movq 0x8(%rsi), %r8
movq 0x10(%rsi), %rsi
xorpd %xmm0, %xmm0
xorl %r9d, %r9d
xorl %r10d, %r10d
movslq %r10d, %rbx
movslq %r9d, %r11
movl (%r8,%r11,4), %ebp
cmpl %ebp, (%rdx,%rbx,4)
jne 0x1385
movsd (%rdi,%rbx,8), %xmm1
mulsd (%rsi,%r11,8), %xmm1
addsd %xmm1, %xmm0
incl %r10d
jmp 0x138c
jge 0x138c
incl %r10d
jmp 0x138f
incl %r9d
cmpl %eax, %r10d
jge 0x1399
cmpl %ecx, %r9d
jl 0x1362
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/kmeans.cpp
// Function: distanceSQ(vector const&, vector const&)
double distanceSQ(const vector& v1, const vector& v2) {
	double result = 0;
	int i1 = 0, i2 = 0;
	while(i1 < v1.size && i2 < v2.size) {
		double diff;
		if(v1.keys[i1] == v2.keys[i2]) {
			diff = v1.values[i1] - v2.values[i2];
			i1++;
			i2++;
		} else if (v1.keys[i1] < v2.keys[i2]) {
			diff = v1.values[i1];
			i1++;
		} else {
			diff = v2.values[i2];
			i2++;
		}
		result += diff * diff;
	}
	return result;
}

// Assembly:
movl (%rdi), %eax
movl (%rsi), %ecx
testl %eax, %eax
setg %dl
testl %ecx, %ecx
setg %r8b
andb %dl, %r8b
xorpd %xmm0, %xmm0
cmpb $0x1, %r8b
jne 0x1426
pushq %rbp
pushq %rbx
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rdi
movq 0x8(%rsi), %r8
movq 0x10(%rsi), %rsi
xorpd %xmm0, %xmm0
xorl %r10d, %r10d
xorl %r9d, %r9d
movslq %r9d, %rbx
movslq %r10d, %r11
movl (%r8,%r11,4), %ebp
cmpl %ebp, (%rdx,%rbx,4)
jne 0x13f8
movsd (%rdi,%rbx,8), %xmm1
subsd (%rsi,%r11,8), %xmm1
incl %ebx
incl %r11d
movl %ebx, %r9d
jmp 0x140f
jge 0x1406
movsd (%rdi,%rbx,8), %xmm1
incl %ebx
movl %ebx, %r9d
jmp 0x1412
movsd (%rsi,%r11,8), %xmm1
incl %r11d
movl %r11d, %r10d
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
cmpl %eax, %r9d
jge 0x1424
cmpl %ecx, %r10d
jl 0x13d4
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/kmeans.cpp
// Function: clone(vector&, vector&)
void clone(vector& dest, vector& src) {
	if(dest.keys != 0)
		delete dest.keys;
	if(dest.values != 0)
		delete dest.values;
	dest.size = src.size;
	dest.keys = new int[dest.size];
	dest.values = new double[dest.size];
	for(int i=0; i<dest.size; i++) {
		dest.keys[i] = src.keys[i];
		dest.values[i] = src.values[i];
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x1443
callq 0x10d0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x1451
callq 0x10d0
movslq (%r14), %rax
movl %eax, (%rbx)
leaq (,%rax,4), %rdi
testq %rax, %rax
movq $-0x1, %rcx
cmovsq %rcx, %rdi
leaq (,%rax,8), %r12
cmovsq %rcx, %r12
callq 0x1030
movq %rax, %r15
movq %rax, 0x8(%rbx)
movq %r12, %rdi
callq 0x1030
movq %rax, 0x10(%rbx)
cmpl $0x0, (%rbx)
jle 0x14c6
movq 0x8(%r14), %rcx
movq 0x10(%r14), %rdx
movl (%rbx), %edi
cmpl $0x2, %edi
movl $0x1, %esi
cmovgel %edi, %esi
xorl %edi, %edi
movl (%rcx,%rdi,4), %r8d
movl %r8d, (%r15,%rdi,4)
movsd (%rdx,%rdi,8), %xmm0
movsd %xmm0, (%rax,%rdi,8)
incq %rdi
cmpq %rdi, %rsi
jne 0x14ac
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/kmeans.cpp
// Function: recomputeCentroid(cluster&)
void recomputeCentroid(cluster& cl) {
	vector &centroid = cl.centroid;
	list<vector*> vectors;
	for(int i=0; i<cl.members.size();i++)
		vectors.add(&(cl.members.get(i)->v));

	centroid.size = 0;
	computeCentroid(centroid, vectors);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movabsq $0x200000000, %rax      # imm = 0x200000000
movq %rax, (%rsp)
movl $0x10, %edi
callq 0x1030
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x18(%rbx)
jle 0x1729
xorl %r12d, %r12d
movq %rsp, %r14
leaq 0x10(%rsp), %r15
movq 0x20(%rbx), %rax
movq (%rax,%r12,8), %rax
addq $0x8, %rax
movq %rax, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1d06
incq %r12
movslq 0x18(%rbx), %rax
cmpq %rax, %r12
jl 0x1701
movl $0x0, (%rbx)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x14d2
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1749
callq 0x10d0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x1757
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1769
callq 0x10d0
movq %rbx, %rdi
callq 0x1170
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/kmeans.cpp
// Function: selectSeeds(cluster*, list<article_entry*>&, int)
void selectSeeds(cluster* clusters, entryList &l, int k) {
	int index = 0;
	for(int i=0; i<l.size(); i++) {
		index = i % k;
		cluster &cl = clusters[index];
		article_entry* e = l.get(i);
		cl.members.add(e);
	}
	printf("Computing centroids ");
	for(int i=0; i<k; i++) {
		printf("%d ", i);
		recomputeCentroid(clusters[i]);
	}
	printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rdi, %rbx
cmpl $0x0, (%rsi)
jle 0x17c4
movq %rsi, %r14
xorl %r15d, %r15d
leaq 0x8(%rsp), %r12
movl %r15d, %eax
cltd
idivl %ebp
movq 0x8(%r14), %rax
movq (%rax,%r15,8), %rax
movq %rax, 0x8(%rsp)
leaq (%rdx,%rdx,4), %rax
leaq (%rbx,%rax,8), %rdi
addq $0x18, %rdi
movq %r12, %rsi
callq 0x1d8e
incq %r15
movslq (%r14), %rax
cmpq %rax, %r15
jl 0x1792
leaq 0x1865(%rip), %rdi      # 0x3030
xorl %eax, %eax
callq 0x1040
testl %ebp, %ebp
jle 0x1804
movl %ebp, %r12d
leaq 0x1865(%rip), %r14      # 0x3045
xorl %r15d, %r15d
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x1040
movq %rbx, %rdi
callq 0x16c5
incq %r15
addq $0x28, %rbx
cmpq %r15, %r12
jne 0x17e3
movl $0xa, %edi
callq 0x1100
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/kmeans.cpp
// Function: findBestCluster(cluster*, int, vector&)
cluster& findBestCluster(cluster* clusters, int k, vector& v) {
	int best_cl = 0;
	double best_dist = INFINITY;
	for(int i=0; i<k; i++) {
		double dist = distanceSQ(v, clusters[i].centroid);
		if(dist < best_dist) {
			best_dist = dist;
			best_cl = i;
		}
	}
	return clusters[best_cl];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r12d, %r12d
testl %esi, %esi
jle 0x1873
movq %rdx, %r14
movl %esi, %r13d
movsd 0x17ca(%rip), %xmm0     # 0x3008
movq %rbx, %r15
xorl %ebp, %ebp
movsd %xmm0, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x139c
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
minsd %xmm1, %xmm0
cmoval %ebp, %r12d
incq %rbp
addq $0x28, %r15
cmpq %rbp, %r13
jne 0x1843
movslq %r12d, %r12
leaq (%r12,%r12,4), %rax
leaq (%rbx,%rax,8), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/kmeans.cpp
// Function: calculateRSS(cluster&)
double calculateRSS(cluster& c) {
	double result = 0;
	for (int i=0; i<c.members.size(); i++) {
		result += distanceSQ(c.centroid, c.members.get(i)->v);
	}
	return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movslq 0x18(%rdi), %r14
testq %r14, %r14
jle 0x18db
movq %rdi, %rbx
movq 0x20(%rdi), %r15
xorpd %xmm0, %xmm0
xorl %r12d, %r12d
movsd %xmm0, (%rsp)
movq (%r15,%r12,8), %rsi
addq $0x8, %rsi
movq %rbx, %rdi
callq 0x139c
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd (%rsp), %xmm0
incq %r12
cmpq %r12, %r14
jne 0x18a9
jmp 0x18df
xorpd %xmm0, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/kmeans.cpp
// Function: printRSS(cluster*, int)
double printRSS(cluster* clusters, int n) {
	double result = 0;
	for(int i=0; i<n; i++) {
		double rss = calculateRSS(clusters[i]);
		printf("Cluster %d: RSS = %f Members = %d\n", i, rss, clusters[i].members.size());
		result += rss;
	}
	printf("Total RSS = %f\n", result);
	return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
testl %esi, %esi
jle 0x194c
movq %rdi, %rbx
movl %esi, %r12d
xorpd %xmm0, %xmm0
xorl %r14d, %r14d
leaq 0x173b(%rip), %r15      # 0x3049
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x188a
movsd %xmm0, 0x10(%rsp)
movl 0x18(%rbx), %edx
movq %r15, %rdi
movl %r14d, %esi
movb $0x1, %al
callq 0x1040
movsd 0x8(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
incq %r14
addq $0x28, %rbx
cmpq %r14, %r12
jne 0x190e
jmp 0x1950
xorpd %xmm0, %xmm0
leaq 0x1715(%rip), %rdi      # 0x306c
movsd %xmm0, 0x8(%rsp)
movb $0x1, %al
callq 0x1040
movsd 0x8(%rsp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/kmeans.cpp
// Function: normalize(article_entry*)
void normalize(article_entry* entry) {
	double factor = 0;
	for(int i=0; i<entry->v.size; i++) {
		double d = entry->v.values[i];
		factor += d * d;
	}
	factor = sqrt(factor);
	for (int i=0; i<entry->v.size; i++) {
		entry->v.values[i] = entry->v.values[i] / factor;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movslq 0x8(%rdi), %rax
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
testq %rax, %rax
jle 0x1bfe
movq 0x18(%rbx), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm2
mulsd %xmm2, %xmm2
addsd %xmm2, %xmm0
incq %rdx
cmpq %rdx, %rax
jne 0x1be9
ucomisd %xmm1, %xmm0
jb 0x1c0a
sqrtsd %xmm0, %xmm0
jmp 0x1c0f
callq 0x10a0
movslq 0x8(%rbx), %rax
testq %rax, %rax
jle 0x1c34
movq 0x18(%rbx), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x1c1e
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/kmeans.cpp
// Function: kmeans(list<article_entry*>&)
void kmeans(list<article_entry*> &l) {
	// Normalize vectors
	printf("Normalizing vectors\n");
	for(int i=0; i<l.size(); i++)
		normalize(l.get(i));
	clusterize(CLUSTERS, l);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1463(%rip), %rdi      # 0x30a7
callq 0x1150
cmpl $0x0, (%rbx)
jle 0x1c69
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1bce
incq %r14
movslq (%rbx), %rax
cmpq %rax, %r14
jl 0x1c51
movl $0xa, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1976
nop
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/../common/list.h
// Function: list<iter*>::add(iter* const&)
void add(const T& el) {
		if(s == cap) {
			int new_c = cap << 1;
			T* new_arr = new T[new_c];
			for (int i=0; i<cap; i++)
				new_arr[i] = arr[i];
			delete arr;
			arr = new_arr;
			cap = new_c;
		}
		arr[s] = el;
		s++;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rdi), %r12d
cmpl %r12d, (%rdi)
jne 0x1ce9
leal (%r12,%r12), %ebp
movslq %ebp, %rax
leaq (,%rax,8), %rcx
testl %eax, %eax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x1030
movq %rax, %r15
testl %r12d, %r12d
jle 0x1cd4
movq 0x8(%rbx), %rax
xorl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq %rdx, (%r15,%rcx,8)
incq %rcx
cmpq %rcx, %r12
jne 0x1cc4
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x1ce2
callq 0x10d0
movq %r15, 0x8(%rbx)
movl %ebp, 0x4(%rbx)
movq (%r14), %rax
movq 0x8(%rbx), %rcx
movslq (%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
leal 0x1(%rdx), %eax
movl %eax, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/../common/list.h
// Function: list<article_entry*>::clear()
void clear() {
		s = 0;
		cap = 2;
		delete arr;
		arr = new T[cap];
	}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movabsq $0x200000000, %rax      # imm = 0x200000000
movq %rax, (%rdi)
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x1e35
callq 0x10d0
movslq 0x4(%rbx), %rax
leaq (,%rax,8), %rcx
testq %rax, %rax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x1030
movq %rax, 0x8(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/kmeans_main.cpp
// Function: save(list<article_entry*>&, hash<double>&, char const*)
void save(list<article_entry*> &entries, hash<double> &h, const char* name) {
	article_entry* entry = new article_entry;
	entries.add(entry);
	int size = h.size;
	entry->v.size = size;
	int* keys = new int[size];
	double* values = new double[size];
	for(int i=0; i<size; i++) {
		keys[i] = h.keys[i];
		values[i] = h.data[i];
	}
	int nameLength = strlen(name);
	char* entry_name = new char[nameLength + 1];
	for(int i=0; i<nameLength; i++)
		entry_name[i] = name[i];
	entry_name[nameLength] = 0;
	entry->name = entry_name;
	entry->v.keys = keys;
	entry->v.values = values;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x8(%rsp)
movq %rsi, %r13
movq %rdi, %r14
movl $0x20, %edi
callq 0x10e0
movl $0x0, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1d8e
movslq 0x4(%r13), %rbx
movq (%r15), %rax
movq %rax, (%rsp)
movl %ebx, 0x8(%rax)
leaq (,%rbx,4), %rdi
testq %rbx, %rbx
movq $-0x1, %r12
cmovsq %r12, %rdi
leaq (,%rbx,8), %r15
cmovsq %r12, %r15
callq 0x1030
movq %rax, %r14
movq %r15, %rdi
callq 0x1030
movq %rax, %r15
testq %rbx, %rbx
jle 0x1f0c
movq 0x8(%r13), %rax
movq 0x10(%r13), %rcx
xorl %edx, %edx
movl (%rcx,%rdx,4), %esi
movl %esi, (%r14,%rdx,4)
movsd (%rax,%rdx,8), %xmm0
movsd %xmm0, (%r15,%rdx,8)
incq %rdx
cmpq %rdx, %rbx
jne 0x1ef2
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x1070
movq %rax, %r13
movq %rax, %rbx
shlq $0x20, %rbx
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rbx, %rax
sarq $0x20, %rax
cmovnsq %rax, %r12
movq %r12, %rdi
callq 0x1030
movq %rax, %r12
testl %r13d, %r13d
jle 0x1f5d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movq %r12, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x10c0
sarq $0x20, %rbx
movb $0x0, (%r12,%rbx)
movq (%rsp), %rax
movq %r12, (%rax)
movq 0x10(%rsp), %rax
movq %r14, 0x10(%rax)
movq %r15, 0x18(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/kmeans_main.cpp
// Function: main
int main(int argc, char** argv) {
	setbuf(stdout, NULL);
	if(argc < 2) {
		printf("Not enough arguments\n");
		printf("Usage: %s <input_dir> <output_file>", argv[0]);
		return 1;
	}

	const char* inputPath = argv[1];
	processDirectory(inputPath);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
movq 0x2bdc(%rip), %rax      # 0x4fd0
movq (%rax), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x1110
cmpl $0x1, %ebp
jg 0x242b
leaq 0xd27(%rip), %rdi       # 0x3134
callq 0x1150
movq (%rbx), %rsi
leaq 0xcf4(%rip), %rdi       # 0x3110
xorl %eax, %eax
callq 0x1040
movl $0x1, %r14d
jmp 0x2434
movq 0x8(%rbx), %rdi
callq 0x218b
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/../common/ptree.h
// Function: ptree<int>::get(char const*)
T* ptree<T>::get(const char* str) {
	const char* s = str;
	int state = 0;
	while(*s != '\0' && state >= 0) {
		int c = getIndex(*s);
		state = table[state][c];
		s++;
	}

	if(state == -1 || !flags[state])
		return 0;

	return values + state;
}

// Assembly:
movb (%rsi), %dl
testb %dl, %dl
je 0x246a
movq (%rdi), %rcx
incq %rsi
xorl %eax, %eax
movsbq %dl, %rdx
movl %eax, %eax
movq (%rcx,%rax,8), %rax
movl -0xc0(%rax,%rdx,4), %eax
movb (%rsi), %dl
testb %dl, %dl
je 0x246c
incq %rsi
testl %eax, %eax
jns 0x244a
jmp 0x246c
xorl %eax, %eax
cmpl $-0x1, %eax
je 0x2486
movq 0x10(%rdi), %rcx
cltq
cmpb $0x1, (%rcx,%rax)
jne 0x2486
shlq $0x2, %rax
addq 0x8(%rdi), %rax
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/../common/ptree.h
// Function: ptree<int>::add(char const*, int)
void ptree<T>::add(const char* str, T i) {
	const char* s = str;
	int state = 0;
	while(*s != '\0') {
		int c = getIndex(*s);
		int n_state = table[state][c];
		if(n_state == -1) {
			break;
		}
		state = n_state;
		s++;
	}

	while(*s != '\0') {
		int c = getIndex(*s);
		int n_state = buildState();
		table[state][c] = n_state;
		state = n_state;
		s++;
	}
	values[state] = i;
	flags[state] = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rax
xorl %r12d, %r12d
movsbq (%r15), %rcx
testq %rcx, %rcx
je 0x24d0
movslq %r12d, %r12
movq (%rax,%r12,8), %rdx
movl -0xc0(%rdx,%rcx,4), %ecx
incq %r15
cmpl $-0x1, %ecx
cmovnel %ecx, %r12d
jne 0x24a1
setne %al
movzbl %al, %eax
addq %rax, %r15
decq %r15
movb (%r15), %cl
testb %cl, %cl
je 0x2507
incq %r15
movsbq %cl, %r13
movq %r14, %rdi
callq 0x26fe
movq (%r14), %rcx
movslq %r12d, %rdx
movq (%rcx,%rdx,8), %rcx
movl %eax, -0xc0(%rcx,%r13,4)
movb (%r15), %cl
incq %r15
movl %eax, %r12d
testb %cl, %cl
jne 0x24da
jmp 0x250a
movl %r12d, %eax
movq 0x8(%r14), %rcx
cltq
movl %ebx, (%rcx,%rax,4)
movq 0x10(%r14), %rcx
movb $0x1, (%rcx,%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/../common/hash.h
// Function: hash<double>::insert(int const&, double const&)
void hash<T>::insert(const int& key, const T& el) {
  int index = bin_search(keys, size, key);
  if(index >= 0) {
    this->data[index] = el;
  } else {
    if(size >= cap)
      expand();
    index = -index - 1;
    for (int i = size; i > index; i--) {
      keys[i] = keys[i-1];
      data[i] = data[i-1];
    }
    keys[index] = key;
    data[index] = el;
    size++;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x4(%rdi), %eax
movl %eax, %ecx
testl %eax, %eax
jle 0x2577
movq 0x10(%rbx), %rdx
movl (%r15), %esi
xorl %edi, %edi
movl %eax, %ecx
leal (%rdi,%rcx), %r12d
shrl %r12d
movl (%rdx,%r12,4), %r8d
cmpl %esi, %r8d
je 0x257c
leal 0x1(%r12), %r9d
cmpl %esi, %r8d
cmovgel %edi, %r9d
cmovgl %edi, %r9d
cmovgl %r12d, %ecx
movl %r9d, %edi
cmpl %ecx, %r9d
jl 0x254b
notl %ecx
movl %ecx, %r12d
testl %r12d, %r12d
js 0x2594
movsd (%r14), %xmm0
movq 0x8(%rbx), %rax
movl %r12d, %ecx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x25ed
cmpl (%rbx), %eax
jl 0x25a0
movq %rbx, %rdi
callq 0x288a
notl %r12d
movl 0x4(%rbx), %edx
cmpl %r12d, %edx
jle 0x25cf
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movl %edx, %esi
leal -0x1(%rdx), %edi
movl (%rcx,%rdi,4), %edx
movl %edx, (%rcx,%rsi,4)
movsd (%rax,%rdi,8), %xmm0
movsd %xmm0, (%rax,%rsi,8)
movl %edi, %edx
cmpl %r12d, %edi
jg 0x25b3
movl (%r15), %eax
movq 0x10(%rbx), %rcx
movl %r12d, %edx
movl %eax, (%rcx,%rdx,4)
movsd (%r14), %xmm0
movq 0x8(%rbx), %rax
movsd %xmm0, (%rax,%rdx,8)
incl 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/../common/ptree.h
// Function: ptree<int>::ptree()
ptree<T>::ptree() {
	cap = 1;
	size = 1;
	table = new int*[cap];
	table[0] = new int[SIZE];
	for(int i=0; i<SIZE; i++)
		table[0][i] = -1;
	values = new T[cap];
	values[0] = -1;
	flags = new bool[cap];
	flags[0] = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x18(%rdi)
movl $0x8, %edi
callq 0x1030
movq %rax, %r14
movq %rax, (%rbx)
movslq 0x2aba(%rip), %rax      # 0x50e0
leaq (,%rax,4), %rcx
testq %rax, %rax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x1030
movq %rax, (%r14)
cmpl $0x0, 0x2a95(%rip)      # 0x50e0
jle 0x266f
movl 0x2a8d(%rip), %ecx      # 0x50e0
cmpl $0x2, %ecx
movl $0x1, %edx
cmovgel %ecx, %edx
shlq $0x2, %rdx
movq %rax, %rdi
movl $0xff, %esi
callq 0x1080
movl $0x4, %edi
callq 0x1030
movq %rax, 0x8(%rbx)
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movl $0x1, %edi
callq 0x1030
movq %rax, 0x10(%rbx)
movb $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/../common/ptree.h
// Function: ptree<int>::~ptree()
ptree<T>::~ptree() {
	for(int i=0; i<size; i++)
		delete table[i];
	delete table;
	delete values;
	delete flags;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x1c(%rdi)
jle 0x26c9
xorl %r14d, %r14d
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x26bd
callq 0x10d0
incq %r14
movslq 0x1c(%rbx), %rax
cmpq %rax, %r14
jl 0x26ac
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x26d6
callq 0x10d0
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x26e4
callq 0x10d0
movq 0x10(%rbx), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0x26f9
popq %rbx
popq %r14
jmp 0x10d0
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/../common/ptree.h
// Function: ptree<int>::buildState()
int ptree<T>::buildState() {
	if(size == cap)
		expand();
	if(size == 1423)
		size = size;

	int result = size;
	size++;
	table[result] = new int[SIZE];
	for(int i=0; i<SIZE; i++)
		table[result][i] = -1;
	return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x1c(%rdi), %eax
cmpl 0x18(%rdi), %eax
jne 0x2715
movq %r14, %rdi
callq 0x277c
movslq 0x1c(%r14), %rbx
leal 0x1(%rbx), %eax
movl %eax, 0x1c(%r14)
movslq 0x29b9(%rip), %rax      # 0x50e0
leaq (,%rax,4), %rcx
testq %rax, %rax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x1030
movq (%r14), %rcx
movq %rax, (%rcx,%rbx,8)
cmpl $0x0, 0x2990(%rip)      # 0x50e0
jle 0x2771
movq (%r14), %rax
movq (%rax,%rbx,8), %rax
xorl %ecx, %ecx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
incq %rcx
movslq 0x2974(%rip), %rdx      # 0x50e0
cmpq %rdx, %rcx
jl 0x275b
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/../common/ptree.h
// Function: ptree<int>::expand()
void ptree<T>::expand() {
	int new_cap = cap << 1;
	int** new_table = new int*[new_cap];
	T* new_values = new T[new_cap];
	bool* new_flags = new bool[new_cap];
	for(int i=0; i<cap; i++) {
		new_table[i] = table[i];
		new_values[i] = values[i];
		new_flags[i] = flags[i];
	}
	for(int i=cap; i<new_cap; i++) {
		new_table[i] = 0;
		new_flags[i] = 0;
	}

	delete table;
	delete values;
	delete flags;

	table = new_table;
	values = new_values;
	flags = new_flags;
	cap = new_cap;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x18(%rdi), %r13
leal (,%r13,2), %ebp
movslq %ebp, %rax
testl %eax, %eax
movq $-0x1, %rcx
movq %rax, %r12
cmovsq %rcx, %r12
leaq (,%rax,4), %r15
testl %eax, %eax
cmovsq %rcx, %r15
movq %rax, %rdi
shlq $0x3, %rdi
testl %eax, %eax
cmovsq %rcx, %rdi
callq 0x1030
movq %rax, %r14
movq %r15, %rdi
callq 0x1030
movq %rax, %r15
movq %r12, %rdi
callq 0x1030
movq %rax, %r12
testq %r13, %r13
jle 0x2813
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rdx
xorl %esi, %esi
movq (%rax,%rsi,8), %rdi
movq %rdi, (%r14,%rsi,8)
movl (%rcx,%rsi,4), %edi
movl %edi, (%r15,%rsi,4)
movb (%rdx,%rsi), %dil
movb %dil, (%r12,%rsi)
incq %rsi
cmpq %rsi, %r13
jne 0x27f4
cmpl %ebp, %r13d
jge 0x2843
leaq (%r14,%r13,8), %rdi
leal -0x1(%r13), %eax
leaq 0x8(,%rax,8), %rdx
xorl %esi, %esi
callq 0x1080
movq %r12, %rdi
addq %r13, %rdi
leal -0x1(%r13), %edx
incq %rdx
xorl %esi, %esi
callq 0x1080
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2850
callq 0x10d0
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x285e
callq 0x10d0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x286c
callq 0x10d0
movq %r14, (%rbx)
movq %r15, 0x8(%rbx)
movq %r12, 0x10(%rbx)
movl %ebp, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/kmeans/../common/hash.h
// Function: hash<double>::expand()
void hash<T>::expand() {
  hash<T>& table = *this;
  int new_c = table.cap + 1;
  expand_array(table.keys, table.cap, new_c);
  expand_array(table.data, table.cap, new_c);
  table.cap = new_c;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq (%rdi), %r12
cmpq $-0x1, %r12
leaq 0x4(,%r12,4), %rax
movq $-0x1, %rdi
cmovgeq %rax, %rdi
callq 0x1030
movq %rax, %r14
testq %r12, %r12
jle 0x28d1
movq 0x10(%rbx), %rax
xorl %ecx, %ecx
movl (%rax,%rcx,4), %edx
movl %edx, (%r14,%rcx,4)
incq %rcx
cmpq %rcx, %r12
jne 0x28c2
leaq 0x1(%r12), %r15
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x28e4
callq 0x10d0
leaq (,%r15,8), %rax
cmpl $-0x1, %r12d
movq %r14, 0x10(%rbx)
movslq (%rbx), %r12
movq $-0x1, %rdi
cmovgeq %rax, %rdi
callq 0x1030
movq %rax, %r14
testq %r12, %r12
jle 0x2928
movq 0x8(%rbx), %rax
xorl %ecx, %ecx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%r14,%rcx,8)
incq %rcx
cmpq %rcx, %r12
jne 0x2915
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x2936
callq 0x10d0
movq %r14, 0x8(%rbx)
movl %r15d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH17_SpecializedLibraryFacilities/examples/rand6.cc
// Function: bad_randVec()
vector<unsigned> bad_randVec()
{
	default_random_engine e;    
	uniform_int_distribution<unsigned> u(0,9);
	vector<unsigned> ret;
	for (size_t i = 0; i < 100; ++i)
    	ret.push_back(u(e));
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq -0x38(%rbp), %r14
movq $0x1, (%r14)
movabsq $0x900000000, %rax      # imm = 0x900000000
leaq -0x40(%rbp), %r15
movq %rax, (%r15)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x64, %r13d
leaq -0x2c(%rbp), %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1670
movl %eax, -0x2c(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x135b
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x1366
movq %rbx, %rdi
movq %r12, %rdx
callq 0x17f0
decq %r13
jne 0x1334
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1394
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x10d0
movq %r14, %rdi
callq 0x1120
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH17_SpecializedLibraryFacilities/examples/rand6.cc
// Function: good_randVec()
vector<unsigned> good_randVec()
{
	// because engines and distributions retain state, they usually should be
	// defined as static so that new numbers are generated on each call
	static default_random_engine e;    
	static uniform_int_distribution<unsigned> u(0,9);
	vector<unsigned> ret;
	for (size_t i = 0; i < 100; ++i)
    	ret.push_back(u(e));
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb 0x2d1d(%rip), %al       # 0x40d0
testb %al, %al
je 0x1430
movb 0x2d23(%rip), %al       # 0x40e0
testb %al, %al
je 0x1437
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movl $0x64, %r13d
leaq 0x2cec(%rip), %r14      # 0x40c8
leaq 0x2cf5(%rip), %r15      # 0x40d8
leaq -0x2c(%rbp), %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1670
movl %eax, -0x2c(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x140e
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x1419
movq %rbx, %rdi
movq %r12, %rdx
callq 0x17f0
decq %r13
jne 0x13e7
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1150
jmp 0x13b7
callq 0x117e
jmp 0x13c1
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1455
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x10d0
movq %r14, %rdi
callq 0x1120
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH17_SpecializedLibraryFacilities/examples/rand6.cc
// Function: main
int main()
{
	vector<unsigned> v1(bad_randVec());
	vector<unsigned> v2(bad_randVec());

	// will print equal
	cout << ((v1 == v2) ? "equal" : "not equal") << endl;

	// very unlikely to print equal
	if (good_randVec() == good_randVec())
		cout << "equal!" << endl;
	else
		cout << "not equal" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
leaq -0x58(%rbp), %rdi
callq 0x12ec
leaq -0x40(%rbp), %rdi
callq 0x12ec
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rax
movq %rax, %rdx
subq %rdi, %rdx
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rcx
subq %rsi, %rcx
cmpq %rcx, %rdx
jne 0x14b8
cmpq %rdi, %rax
je 0x14c1
callq 0x10e0
testl %eax, %eax
leaq 0xb5d(%rip), %rax       # 0x2008
leaq 0xb52(%rip), %rbx       # 0x2004
cmoveq %rax, %rbx
jmp 0x14c8
leaq 0xb45(%rip), %rbx       # 0x2004
jmp 0x14c8
leaq 0xb40(%rip), %rbx       # 0x2008
movq %rbx, %rdi
callq 0x1050
movq 0x2b01(%rip), %r14      # 0x3fd8
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x10f0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x10b0
movsbl %al, %esi
movq 0x2ad5(%rip), %rdi      # 0x3fd8
callq 0x1030
movq %rax, %rdi
callq 0x1080
leaq -0x28(%rbp), %rdi
callq 0x139c
leaq -0x70(%rbp), %rdi
callq 0x139c
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rax
movq %rax, %rdx
subq %rdi, %rdx
movq -0x70(%rbp), %rbx
movq -0x68(%rbp), %rcx
subq %rbx, %rcx
cmpq %rcx, %rdx
jne 0x1555
cmpq %rdi, %rax
je 0x155a
movq %rbx, %rsi
callq 0x10e0
testl %eax, %eax
sete %r14b
jmp 0x155d
xorl %r14d, %r14d
jmp 0x155d
movb $0x1, %r14b
testq %rbx, %rbx
je 0x1571
movq -0x60(%rbp), %rsi
subq %rbx, %rsi
movq %rbx, %rdi
callq 0x10d0
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0x1586
movq -0x18(%rbp), %rsi
subq %rdi, %rsi
callq 0x10d0
leaq 0xa81(%rip), %rax       # 0x200e
leaq 0xa70(%rip), %rsi       # 0x2004
testb %r14b, %r14b
cmovneq %rax, %rsi
xorb $0x1, %r14b
movzbl %r14b, %eax
leaq (%rax,%rax,2), %rdx
addq $0x6, %rdx
movq 0x2a26(%rip), %rbx      # 0x3fd8
movq %rbx, %rdi
callq 0x10f0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x10b0
movsbl %al, %esi
movq 0x2a00(%rip), %rdi      # 0x3fd8
callq 0x1030
movq %rax, %rdi
callq 0x1080
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x15fa
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x10d0
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x160f
movq -0x48(%rbp), %rsi
subq %rdi, %rsi
callq 0x10d0
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0x163e
movq -0x18(%rbp), %rsi
subq %rdi, %rsi
callq 0x10d0
jmp 0x163e
jmp 0x163b
movq %rax, %rbx
jmp 0x1653
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x1653
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x10d0
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x1668
movq -0x48(%rbp), %rsi
subq %rdi, %rsi
callq 0x10d0
movq %rbx, %rdi
callq 0x1120
// File: /workspace/github_cpp_makefile_star2_O1/Juan313[P]RockPaperScissor/RPS.cpp
// Function: Rock::fight(Tool*)
int Rock::fight(Tool *comp)
{
	int result;
	//Checks the type used by the computer, adjusts strength
	//accordingly and then stores the difference between
	//player and computer strenght in result.
	if(comp->getType()=='p')
	{
		result = this->getStrength() - 2*comp->getStrength();
	}
	else if(comp->getType()=='s')
	{
                result = 2*this->getStrength() - comp->getStrength();
        }
	else
	{
		result = this->getStrength() - comp->getStrength();
	}
	
	//Checks the value stored in result and changes its value to 
	//1,2,or 3 if the player won, lost, or tied respectivey
	if(result<0)
	result = 2;
	else if(result>0)
	result = 1;
	else
	result = 3;

	return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2a60
cmpb $0x70, %al
jne 0x24d2
movq %rbx, %rdi
callq 0x2a5c
movl %eax, %ebx
movq %r14, %rdi
callq 0x2a5c
addl %eax, %eax
jmp 0x24f6
movq %r14, %rdi
callq 0x2a60
movl %eax, %ebp
movq %rbx, %rdi
callq 0x2a5c
movl %eax, %ebx
cmpb $0x73, %bpl
jne 0x24ee
addl %ebx, %ebx
movq %r14, %rdi
callq 0x2a5c
subl %eax, %ebx
xorl %eax, %eax
testl %ebx, %ebx
sete %al
leal 0x1(%rax,%rax), %ecx
movl $0x2, %eax
cmovnsl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Juan313[P]RockPaperScissor/RPS.cpp
// Function: Paper::fight(Tool*)
int Paper::fight(Tool *comp)
{
    int result;
    //Checks the type used by the computer, adjusts strength
    //accordingly and then stores the difference between
    //player and computer strenght in result.
    if(comp->getType()=='s')
    {
        result = this->getStrength() - 2*comp->getStrength();
    }
    else if(comp->getType()=='r')
    {
        result = 2*this->getStrength() - comp->getStrength();
    }
    else
    {
        result = this->getStrength() - comp->getStrength();
    }
    
    //Checks the value stored in result and changes its value to
    //1,2,or 3 if the player won, lost, or tied respectivey
    if(result<0)
        result = 2;
    else if(result>0)
        result = 1;
    else
        result = 3;
    
    return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2a60
cmpb $0x73, %al
jne 0x2576
movq %rbx, %rdi
callq 0x2a5c
movl %eax, %ebx
movq %r14, %rdi
callq 0x2a5c
addl %eax, %eax
jmp 0x259a
movq %r14, %rdi
callq 0x2a60
movl %eax, %ebp
movq %rbx, %rdi
callq 0x2a5c
movl %eax, %ebx
cmpb $0x72, %bpl
jne 0x2592
addl %ebx, %ebx
movq %r14, %rdi
callq 0x2a5c
subl %eax, %ebx
xorl %eax, %eax
testl %ebx, %ebx
sete %al
leal 0x1(%rax,%rax), %ecx
movl $0x2, %eax
cmovnsl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Juan313[P]RockPaperScissor/RPSGame.cpp
// Function: RPSGame::RPSGame(int, int, int, int, int, int)
RPSGame::RPSGame (int hr, int hp, int hs, int cr, int cp, int cs) {
    human_rock = new Rock(hr);
    human_paper = new Paper(hp);
    human_scissors = new Scissors(hs);
    computer_rock = new Rock(cr);
    computer_paper = new Paper(cp);
    computer_scissors = new Scissors(cs);
    computer_wins = 0;
    human_wins = 0;
    ties = 0;
    last_winner = 0;    // lets AI know its first round
    unsigned seed = time(0);    // seed srand
    srand(seed);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, 0x4(%rsp)
movl %r8d, %r12d
movl %ecx, %r13d
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r14
movl 0x40(%rsp), %eax
movl %eax, (%rsp)
movl $0x10, %edi
callq 0x2170
movq %rax, %rbx
movq %rax, %rdi
movl %r15d, %esi
callq 0x248c
movq %rbx, (%r14)
movl $0x10, %edi
callq 0x2170
movq %rax, %rbx
movq %rax, %rdi
movl %ebp, %esi
callq 0x2530
movq %rbx, 0x8(%r14)
movl $0x10, %edi
callq 0x2170
movq %rax, %rbx
movq %rax, %rdi
movl %r13d, %esi
callq 0x25d4
movq %rbx, 0x10(%r14)
movl $0x10, %edi
callq 0x2170
movq %rax, %rbx
movq %rax, %rdi
movl %r12d, %esi
callq 0x248c
movq %rbx, 0x18(%r14)
movl $0x10, %edi
callq 0x2170
movq %rax, %rbx
movq %rax, %rdi
movl 0x4(%rsp), %esi
callq 0x2530
movq %rbx, 0x20(%r14)
movl $0x10, %edi
callq 0x2170
movq %rax, %rbx
movq %rax, %rdi
movl (%rsp), %esi
callq 0x25d4
movq %rbx, 0x28(%r14)
movq $0x0, 0x30(%r14)
xorl %eax, %eax
movl %eax, 0x38(%r14)
movl %eax, 0x40(%r14)
xorl %edi, %edi
callq 0x2140
movl %eax, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2150
jmp 0x2822
jmp 0x2822
jmp 0x2822
jmp 0x2822
jmp 0x2822
movq %rax, %r14
movl $0x10, %esi
movq %rbx, %rdi
callq 0x2180
movq %r14, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O1/Juan313[P]RockPaperScissor/RPSGame.cpp
// Function: RPSGame::~RPSGame()
RPSGame::~RPSGame() {
  delete human_rock;
  delete human_paper;
  delete human_scissors;
  delete computer_rock;
  delete computer_paper;
  delete computer_scissors;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x284c
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x285b
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x286a
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x2879
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x2888
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x2898
movq (%rdi), %rax
popq %rbx
jmpq *0x8(%rax)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/Juan313[P]RockPaperScissor/RPSGame.cpp
// Function: RPSGame::play(char, char)
int RPSGame::play (char humanChoice, char computerChoice) {
    int result;
    Tool* human;
    Tool* computer;
    
    // Set human choice
    if (humanChoice == 'r') {
        human = human_rock; 
    } else if (humanChoice == 'p') {
        human = human_paper; 
    } else {
        human = human_scissors; 
    }

    // Set computer choice
    if (computerChoice == 'r') {
        computer = computer_rock; 
    } else if (computerChoice == 'p') {
        computer = computer_paper;
    } else {
        computer = computer_scissors;
    }
    
    // Fight
    result = human->fight(computer);
    // Set results
    set_winner(result);
    set_human_last_tool(humanChoice); 
    set_comp_last_tool(computerChoice);

    return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movq %rdi, %rax
cmpl $0x72, %esi
je 0x28bc
cmpl $0x70, %ebp
jne 0x28b8
leaq 0x8(%r14), %rax
jmp 0x28bc
leaq 0x10(%r14), %rax
movq (%rax), %rdi
xorl %eax, %eax
cmpb $0x70, %bl
setne %al
leaq 0x20(,%rax,8), %rax
cmpb $0x72, %bl
movl $0x18, %ecx
cmovneq %rax, %rcx
movq (%r14,%rcx), %rsi
movq (%rdi), %rax
callq *0x10(%rax)
cmpl $0x2, %eax
je 0x28fa
cmpl $0x1, %eax
jne 0x2905
incl 0x30(%r14)
movl $0x1, %ecx
jmp 0x290e
incl 0x34(%r14)
movl $0x2, %ecx
jmp 0x290e
incl 0x38(%r14)
movl $0x3, %ecx
movl %ecx, 0x40(%r14)
movb %bpl, 0x3c(%r14)
movb %bl, 0x3d(%r14)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Juan313[P]RockPaperScissor/RPSGame.cpp
// Function: RPSGame::set_winner(int)
void RPSGame::set_winner (int winner) {
    if (winner == 1) {
        set_human_wins(get_human_wins() + 1);
        set_last_winner(1);
    } else if (winner == 2) {
        set_computer_wins(get_computer_wins() + 1);
        set_last_winner(2);
    } else {
        set_ties(get_ties() + 1);
        set_last_winner(3);         // sets tie
    }
}

// Assembly:
cmpl $0x2, %esi
je 0x2934
cmpl $0x1, %esi
jne 0x293e
incl 0x30(%rdi)
movl $0x1, %eax
jmp 0x2946
incl 0x34(%rdi)
movl $0x2, %eax
jmp 0x2946
incl 0x38(%rdi)
movl $0x3, %eax
movl %eax, 0x40(%rdi)
retq