// File: /workspace/github_cpp_makefile_star2_O1/isaacbrodsky[P]K-means-plus-plus/k-means-multi.cpp
// Function: Cluster_set::Read_control_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Cluster_set::Read_control_data(string sControlFilename) {

	// local variables
	string sTitle;
	bool bNot_done;
	unsigned int uRandomSeed;

	// initialize loop flag
	bNot_done = true;

	// declare an input stream to read the data
	ifstream strInput_stream;

	// open the input stream to read the key
	strInput_stream.open(sControlFilename.c_str());

	// check if the file was OK
	if (strInput_stream.is_open()){
		while(bNot_done){ // read to the end of the control file

			strInput_stream >> sTitle; // read the control label
			if (strInput_stream.fail() // Check for failed read
				|| sTitle == "#EOF") { // read the end of file label
				bNot_done =  false;
			} // if
			else if (sTitle == "#k-count"){ // read the count of neighbors
				strInput_stream >> iK_count;
			} // if
			else if (sTitle == "#input-filename"){ // read the input filename
				strInput_stream >> sIn_file;
			} // if
			else if (sTitle == "#output-filename"){ // read the output filename
				strInput_stream >> sOut_file;
			} // if
			else if (sTitle == "#use-labels"){ // read the use-labels flag
				strInput_stream >> bUseLabels;
			} // if
			else if (sTitle == "#tolerance"){ // read the stopping criteria
				strInput_stream >> fTolerance;
			} // if
			else if (sTitle == "#plus-plus"){ // control k-means++ initialization
				strInput_stream >> bUsePlusPlus;
			} // if
			else if (sTitle == "#plus-plus-random-seed"){ // Specify k-means++ random seed
				strInput_stream >> uRandomSeed;
				mtRandom.seed(uRandomSeed);
			} // if
			else if (sTitle == "#plus-plus-threads"){ // Specify k-means++ number of threads
				strInput_stream >> iNumPlusPlusThreads;
			} // if
			else if (sTitle == "#num-threads"){ // Number of parallel threads
				strInput_stream >> iNumThreads;
			} // if
			else{
				cout << "Unrecognized directive in control file." << endl;
			}
		} // while read control file
	} // if control file open
	else { // print error message
		cout << "Error reading the file " << sControlFilename << endl << endl;
	}

	strInput_stream.close();  // close filestream

	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x60(%rsp), %rdi
callq 0x3320
movq (%r14), %rsi
leaq 0x60(%rsp), %rdi
movl $0x8, %edx
callq 0x31b0
leaq 0xd8(%rsp), %rdi
callq 0x3070
testb %al, %al
je 0x3f34
leaq 0x1434(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x1430(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0xa1(%rbx), %rax
movq %rax, 0x20(%rsp)
leaq 0x78(%rbx), %rax
movq %rax, 0x18(%rsp)
leaq 0xa0(%rbx), %rax
movq %rax, 0x28(%rsp)
leaq 0x58(%rbx), %rax
movq %rax, 0x30(%rsp)
leaq 0x38(%rbx), %rax
movq %rax, 0x38(%rsp)
leaq 0x30(%rbx), %rbp
movb $0x1, %r14b
leaq 0x60(%rsp), %r15
leaq 0x40(%rsp), %r12
leaq 0x4378(%rip), %r13      # 0x80d7
movq %r15, %rdi
movq %r12, %rsi
callq 0x3340
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x80(%rsp,%rax)
je 0x3d8b
xorl %r14d, %r14d
testb $0x1, %r14b
jne 0x3d5f
jmp 0x3fb3
movq %r12, %rdi
movq %r13, %rsi
callq 0x30a0
testl %eax, %eax
je 0x3d7d
movq %r12, %rdi
leaq 0x4338(%rip), %rsi      # 0x80dc
callq 0x30a0
movq %rbp, %rsi
testl %eax, %eax
je 0x3eab
movq %r12, %rdi
leaq 0x4327(%rip), %rsi      # 0x80e5
callq 0x30a0
movq 0x38(%rsp), %rsi
testl %eax, %eax
je 0x3eb8
movq %r12, %rdi
leaq 0x431b(%rip), %rsi      # 0x80f5
callq 0x30a0
movq 0x30(%rsp), %rsi
testl %eax, %eax
je 0x3eb8
movq %r12, %rdi
leaq 0x4310(%rip), %rsi      # 0x8106
callq 0x30a0
movq 0x28(%rsp), %rsi
testl %eax, %eax
je 0x3ec5
movq %r12, %rdi
leaq 0x4300(%rip), %rsi      # 0x8112
callq 0x30a0
testl %eax, %eax
je 0x3ed2
movq %r12, %rdi
leaq 0x42f4(%rip), %rsi      # 0x811d
callq 0x30a0
movq 0x20(%rsp), %rsi
testl %eax, %eax
je 0x3ec5
movq %r12, %rdi
leaq 0x42e3(%rip), %rsi      # 0x8128
callq 0x30a0
testl %eax, %eax
je 0x3ee4
movq %r12, %rdi
leaq 0x42e3(%rip), %rsi      # 0x813f
callq 0x30a0
movq 0x10(%rsp), %rsi
testl %eax, %eax
je 0x3eab
movq %r12, %rdi
leaq 0x42de(%rip), %rsi      # 0x8152
callq 0x30a0
movq 0x8(%rsp), %rsi
testl %eax, %eax
je 0x3eab
movl $0x27, %edx
movq 0x8132(%rip), %rdi      # 0xbfc0
leaq 0x42ca(%rip), %rsi      # 0x815f
callq 0x3330
movq 0x811f(%rip), %rdi      # 0xbfc0
callq 0x3120
jmp 0x3d80
movq %r15, %rdi
callq 0x31a0
jmp 0x3d80
movq %r15, %rdi
callq 0x3340
jmp 0x3d80
movq %r15, %rdi
callq 0x3260
jmp 0x3d80
movq %r15, %rdi
movq 0x18(%rsp), %rsi
callq 0x3480
jmp 0x3d80
movq %r15, %rdi
leaq 0x4(%rsp), %rsi
callq 0x3440
movl 0x4(%rsp), %ecx
movq %rcx, 0xa8(%rbx)
movl $0x16, %eax
movq %rcx, %rdx
shrq $0x1e, %rdx
xorl %ecx, %edx
imull $0x6c078965, %edx, %ecx # imm = 0x6C078965
addl %eax, %ecx
addl $-0x15, %ecx
movq %rcx, (%rbx,%rax,8)
incq %rax
cmpq $0x285, %rax            # imm = 0x285
jne 0x3f01
movq $0x270, 0x1428(%rbx) # imm = 0x270
jmp 0x3d80
movq 0x8085(%rip), %rdi      # 0xbfc0
leaq 0x4245(%rip), %rsi      # 0x8187
movl $0x17, %edx
callq 0x3330
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x8066(%rip), %rdi      # 0xbfc0
callq 0x3330
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31e0
leaq 0x60(%rsp), %rdi
callq 0x3050
leaq 0x60(%rsp), %rdi
callq 0x3080
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x3fe3
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x32f0
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x4009
jmp 0x3ffc
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x3080
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x4025
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x32f0
movq %rbx, %rdi
callq 0x3450
nop