// File: richardposner[P]BioNetFit2/src/code/Data.cpp
// Function: Data::Data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Swarm*, bool, unsigned int)
Data::Data(std::string path, Swarm * swarm, bool isExp, unsigned int mid) {
	mid_=mid;

	swarm_ = swarm;
	isExp_ = isExp;

//cout<<"Data::Data   AAA-1"<<endl; mypause();
	if (swarm_->options.verbosity >= 4){
		cout << "received dataPath: " << path << endl;
	}
	dataPath = convertToAbsPath(path);
	if (swarm_->options.verbosity >= 4){

		cout << "converted dataPath: " << dataPath << endl;
	}
//cout<<"Data::Data   AAA-2"<<endl; mypause();
	Data::parseData();
//cout<<"Data::Data   AAA-3"<<endl; mypause();

	dataCurrent = &dataOrig_;

	if ( (swarm_->options.objFunc == 4 && isExp)) {
		getColumnAverages();
	}

	if (swarm_->options.divideByInit && !isExp) {
		divideByInit();
		dataCurrent = &dataDividedByInit_;
	}

	if (swarm_->options.logTransformSimData > 0 && !isExp) {
		logTransformData();
		dataCurrent = &dataLogTransformed_;
	}

	if (swarm_->options.standardizeSimData && !isExp) {
		cout << "stand sim" << endl;
		if (swarm_->options.objFunc != 4) {
			getColumnAverages();
		}
		standardizeData();
		dataCurrent = &dataStandardized_;
	}

	if (swarm_->options.standardizeExpData && isExp) {
		cout << "stand exp" << endl;
		if (swarm_->options.objFunc != 4) {
			getColumnAverages();
		}
		standardizeData();
		dataCurrent = &dataStandardized_;
	}
//cout<<"Data::Data   AAA-4"<<endl; mypause();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rsi, -0xb8(%rbp)
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movl %r8d, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x78(%rbp)
addq $0x8, %rdi
movq %rdi, -0xb0(%rbp)
callq 0x8de10
movq -0x78(%rbp), %rdi
addq $0x38, %rdi
movq %rdi, -0xa8(%rbp)
callq 0x8de30
movq -0x78(%rbp), %rdi
addq $0x70, %rdi
movq %rdi, -0xa0(%rbp)
callq 0x2f880
movq -0x78(%rbp), %rdi
addq $0x90, %rdi
movq %rdi, -0x98(%rbp)
callq 0x8de10
movq -0x78(%rbp), %rdi
addq $0xc0, %rdi
movq %rdi, -0x90(%rbp)
callq 0x8de10
movq -0x78(%rbp), %rdi
addq $0xf0, %rdi
movq %rdi, -0x88(%rbp)
callq 0x8de10
movq -0x78(%rbp), %rdi
addq $0x120, %rdi            # imm = 0x120
movq %rdi, -0x80(%rbp)
callq 0x8de10
movq -0x78(%rbp), %rax
movl -0x20(%rbp), %ecx
movl %ecx, 0x68(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x150(%rax)
movb -0x19(%rbp), %cl
andb $0x1, %cl
movb %cl, 0x158(%rax)
movq 0x150(%rax), %rax
cmpl $0x4, 0x1614(%rax)
jb 0x8b8e3
movq 0x2496c6(%rip), %rdi    # 0x2d4f50
leaq 0x14db83(%rip), %rsi    # 0x1d9414
callq 0x2ff50
movq %rax, -0xc0(%rbp)
jmp 0x8b89f
movq -0xb8(%rbp), %rsi
movq -0xc0(%rbp), %rdi
callq 0x2f780
movq %rax, -0xc8(%rbp)
jmp 0x8b8bb
movq -0xc8(%rbp), %rdi
movq 0x2496ff(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0x8b8d0
jmp 0x8b8e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x8bb69
movq -0xb8(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x2f300
jmp 0x8b8f5
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x17c530
jmp 0x8b904
movq -0x78(%rbp), %rdi
addq $0x70, %rdi
leaq -0x50(%rbp), %rsi
callq 0x2fd80
leaq -0x50(%rbp), %rdi
callq 0x311e8
leaq -0x70(%rbp), %rdi
callq 0x311e8
movq -0x78(%rbp), %rax
movq 0x150(%rax), %rax
cmpl $0x4, 0x1614(%rax)
jb 0x8b9a5
movq 0x24960e(%rip), %rdi    # 0x2d4f50
leaq 0x14dadf(%rip), %rsi    # 0x1d9428
callq 0x2ff50
movq %rax, -0xd0(%rbp)
jmp 0x8b957
movq -0xd0(%rbp), %rdi
movq -0x78(%rbp), %rsi
addq $0x70, %rsi
callq 0x2f780
movq %rax, -0xd8(%rbp)
jmp 0x8b974
movq -0xd8(%rbp), %rdi
movq 0x249646(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0x8b989
jmp 0x8b9a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x311e8
jmp 0x8bb69
movq -0x78(%rbp), %rdi
callq 0x8bbd0
jmp 0x8b9b0
movq -0x78(%rbp), %rax
movq %rax, %rcx
addq $0x90, %rcx
movq %rcx, (%rax)
movq 0x150(%rax), %rax
cmpl $0x4, 0x162c(%rax)
jne 0x8b9e4
testb $0x1, -0x19(%rbp)
je 0x8b9e4
movq -0x78(%rbp), %rdi
callq 0x8d070
jmp 0x8b9e2
jmp 0x8b9e4
movq -0x78(%rbp), %rax
movq 0x150(%rax), %rax
testb $0x1, 0x163c(%rax)
je 0x8ba1a
testb $0x1, -0x19(%rbp)
jne 0x8ba1a
movq -0x78(%rbp), %rdi
callq 0x8d220
jmp 0x8ba09
movq -0x78(%rbp), %rax
movq %rax, %rcx
addq $0x120, %rcx            # imm = 0x120
movq %rcx, (%rax)
movq -0x78(%rbp), %rax
movq 0x150(%rax), %rax
cmpl $0x0, 0x1640(%rax)
jle 0x8ba50
testb $0x1, -0x19(%rbp)
jne 0x8ba50
movq -0x78(%rbp), %rdi
callq 0x8d4e0
jmp 0x8ba3f
movq -0x78(%rbp), %rax
movq %rax, %rcx
addq $0xf0, %rcx
movq %rcx, (%rax)
movq -0x78(%rbp), %rax
movq 0x150(%rax), %rax
testb $0x1, 0x1644(%rax)
je 0x8bad8
testb $0x1, -0x19(%rbp)
jne 0x8bad8
movq 0x2494df(%rip), %rdi    # 0x2d4f50
leaq 0x14d9c5(%rip), %rsi    # 0x1d943d
callq 0x2ff50
movq %rax, -0xe0(%rbp)
jmp 0x8ba86
movq -0xe0(%rbp), %rdi
movq 0x249534(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0x8ba9b
movq -0x78(%rbp), %rax
movq 0x150(%rax), %rax
cmpl $0x4, 0x162c(%rax)
je 0x8babc
movq -0x78(%rbp), %rdi
callq 0x8d070
jmp 0x8baba
jmp 0x8babc
movq -0x78(%rbp), %rdi
callq 0x8d790
jmp 0x8bac7
movq -0x78(%rbp), %rax
movq %rax, %rcx
addq $0xc0, %rcx
movq %rcx, (%rax)
movq -0x78(%rbp), %rax
movq 0x150(%rax), %rax
testb $0x1, 0x1645(%rax)
je 0x8bb60
testb $0x1, -0x19(%rbp)
je 0x8bb60
movq 0x249457(%rip), %rdi    # 0x2d4f50
leaq 0x14d947(%rip), %rsi    # 0x1d9447
callq 0x2ff50
movq %rax, -0xe8(%rbp)
jmp 0x8bb0e
movq -0xe8(%rbp), %rdi
movq 0x2494ac(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0x8bb23
movq -0x78(%rbp), %rax
movq 0x150(%rax), %rax
cmpl $0x4, 0x162c(%rax)
je 0x8bb44
movq -0x78(%rbp), %rdi
callq 0x8d070
jmp 0x8bb42
jmp 0x8bb44
movq -0x78(%rbp), %rdi
callq 0x8d790
jmp 0x8bb4f
movq -0x78(%rbp), %rax
movq %rax, %rcx
addq $0xc0, %rcx
movq %rcx, (%rax)
addq $0xf0, %rsp
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x8de50
movq -0x88(%rbp), %rdi
callq 0x8de50
movq -0x90(%rbp), %rdi
callq 0x8de50
movq -0x98(%rbp), %rdi
callq 0x8de50
movq -0xa0(%rbp), %rdi
callq 0x311e8
movq -0xa8(%rbp), %rdi
callq 0x8de70
movq -0xb0(%rbp), %rdi
callq 0x8de50
movq -0x28(%rbp), %rdi
callq 0x30170
nopw %cs:(%rax,%rax)