// File: atfrank[P]PCASA/lib/CASA.cpp
// Function: CASA::loadRefFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void CASA::loadRefFile(const std::string freffile)
{
	std::ifstream refFile;
	std::istream* refinp;
	std::string line, key;
	std::vector<std::string> s;
	double refsasa;
	if (freffile.length() > 0){
		refFile.open(freffile.c_str(), std::ios::in);
		refinp=&refFile;
		if (refFile.is_open()) {
			while (refinp->good() && !(refinp->eof()))
			{
				getline(*refinp, line);
				Misc::splitStr(line, " ", s, true);
				if (s.size() ==  2){
					key = Misc::trim(s.at(0));				
					refsasa = atof(Misc::trim(s.at(1)).c_str());
					this->refSASA.insert(std::pair<std::string,double>(key,refsasa));	
				}
			}
		}
		else {
			std::cerr << "Error: Unable to open file: " << freffile << std::endl;	
			exit(0);		                
		}
	}
}

// Assembly:
subq $0x3f8, %rsp            # imm = 0x3F8
movq %rsi, 0x70(%rsp)
movq %rdi, 0x3f0(%rsp)
movq %rsi, 0x3e8(%rsp)
movq 0x3f0(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x1e0(%rsp), %rdi
callq 0x54c0
leaq 0x1b8(%rsp), %rdi
callq 0x5600
leaq 0x198(%rsp), %rdi
callq 0x5600
leaq 0x180(%rsp), %rdi
callq 0x77e0
movq 0x70(%rsp), %rdi
callq 0x5630
cmpq $0x0, %rax
jbe 0x3694b
movq 0x70(%rsp), %rdi
callq 0x51a0
movq %rax, %rsi
leaq 0x1e0(%rsp), %rdi
movl $0x8, %edx
callq 0x5260
jmp 0x36502
leaq 0x1e0(%rsp), %rdi
movq %rdi, 0x1d8(%rsp)
callq 0x5690
movb %al, 0x67(%rsp)
jmp 0x3651d
movb 0x67(%rsp), %al
testb $0x1, %al
jne 0x3652a
jmp 0x36901
jmp 0x3652c
movq 0x1d8(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x56e0
movb %al, 0x66(%rsp)
jmp 0x36549
movb 0x66(%rsp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x65(%rsp)
jne 0x3655a
jmp 0x36581
movq 0x1d8(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x5760
movb %al, 0x64(%rsp)
jmp 0x36577
movb 0x64(%rsp), %al
xorb $-0x1, %al
movb %al, 0x65(%rsp)
movb 0x65(%rsp), %al
testb $0x1, %al
jne 0x3658e
jmp 0x368ff
movq 0x1d8(%rsp), %rdi
leaq 0x1b8(%rsp), %rsi
callq 0x50c0
jmp 0x365a5
leaq 0x147(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x5730
movq 0x58(%rsp), %rdx
leaq 0x45fd5(%rip), %rsi     # 0x7c598
leaq 0x148(%rsp), %rdi
callq 0x7900
jmp 0x365d2
leaq 0x1b8(%rsp), %rdi
leaq 0x148(%rsp), %rsi
leaq 0x180(%rsp), %rdx
movl $0x1, %ecx
callq 0x3d840
jmp 0x365f6
leaq 0x148(%rsp), %rdi
callq 0x5250
leaq 0x147(%rsp), %rdi
callq 0x5480
leaq 0x180(%rsp), %rdi
callq 0x78e0
cmpq $0x2, %rax
jne 0x368fa
xorl %eax, %eax
movl %eax, %esi
leaq 0x180(%rsp), %rdi
callq 0x79c0
movq %rax, 0x50(%rsp)
jmp 0x3663f
leaq 0xff(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x5730
movq 0x48(%rsp), %rdx
leaq 0x45f3b(%rip), %rsi     # 0x7c598
leaq 0x100(%rsp), %rdi
callq 0x7900
jmp 0x3666c
movq 0x50(%rsp), %rsi
leaq 0x120(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0x3dee0
jmp 0x36688
leaq 0x198(%rsp), %rdi
leaq 0x120(%rsp), %rsi
movq %rsi, 0x38(%rsp)
callq 0x5510
movq 0x38(%rsp), %rdi
callq 0x5250
leaq 0x100(%rsp), %rdi
callq 0x5250
leaq 0xff(%rsp), %rdi
callq 0x5480
leaq 0x180(%rsp), %rdi
movl $0x1, %esi
callq 0x79c0
movq %rax, 0x40(%rsp)
jmp 0x366df
leaq 0xb7(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x5730
movq 0x30(%rsp), %rdx
leaq 0x45e9b(%rip), %rsi     # 0x7c598
leaq 0xb8(%rsp), %rdi
callq 0x7900
jmp 0x3670c
movq 0x40(%rsp), %rsi
leaq 0xd8(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
callq 0x3dee0
jmp 0x36728
leaq 0xd8(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x51a0
movq %rax, %rdi
callq 0x5530
movq 0x20(%rsp), %rdi
movsd %xmm0, 0x178(%rsp)
callq 0x5250
leaq 0xb8(%rsp), %rdi
callq 0x5250
leaq 0xb7(%rsp), %rdi
callq 0x5480
movq 0x68(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x28(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x198(%rsp), %rsi
leaq 0x178(%rsp), %rdx
callq 0x38b40
jmp 0x3679c
movq 0x28(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x386b0
movb %dl, 0x17(%rsp)
movq %rax, 0x18(%rsp)
jmp 0x367b9
movb 0x17(%rsp), %al
movq 0x18(%rsp), %rcx
movq %rcx, 0x78(%rsp)
movb %al, 0x80(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x38790
jmp 0x368fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
jmp 0x36987
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
jmp 0x36830
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
leaq 0x148(%rsp), %rdi
callq 0x5250
leaq 0x147(%rsp), %rdi
callq 0x5480
jmp 0x36987
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
jmp 0x36879
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
leaq 0x100(%rsp), %rdi
callq 0x5250
leaq 0xff(%rsp), %rdi
callq 0x5480
jmp 0x36987
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
jmp 0x368c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x5250
leaq 0xb7(%rsp), %rdi
callq 0x5480
jmp 0x36987
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x170(%rsp)
movl %eax, 0x16c(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x38790
jmp 0x36987
jmp 0x3652c
jmp 0x36949
movq 0x4046e8(%rip), %rdi    # 0x43aff0
leaq 0x459b1(%rip), %rsi     # 0x7c2c0
callq 0x53f0
movq %rax, 0x8(%rsp)
jmp 0x3691b
movq 0x70(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x5390
movq %rax, (%rsp)
jmp 0x36930
movq (%rsp), %rdi
movq 0x40466d(%rip), %rsi    # 0x43afa8
callq 0x5460
jmp 0x36942
xorl %edi, %edi
callq 0x5500
jmp 0x3694b
leaq 0x180(%rsp), %rdi
callq 0x7ab0
leaq 0x198(%rsp), %rdi
callq 0x5250
leaq 0x1b8(%rsp), %rdi
callq 0x5250
leaq 0x1e0(%rsp), %rdi
callq 0x5120
addq $0x3f8, %rsp            # imm = 0x3F8
retq
leaq 0x180(%rsp), %rdi
callq 0x7ab0
leaq 0x198(%rsp), %rdi
callq 0x5250
leaq 0x1b8(%rsp), %rdi
callq 0x5250
leaq 0x1e0(%rsp), %rdi
callq 0x5120
movq 0x170(%rsp), %rdi
callq 0x5720
nopl (%rax,%rax)