// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2e8, %rsp            # imm = 0x2E8
movq %rsi, %r14
movq %rdi, 0x50(%rsp)
leaq 0xe0(%rsp), %rdi
callq 0x4330
leaq 0xd0(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x68(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movq %rax, 0x40(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
cmpq %rax, 0x8(%r14)
je 0x1eab8
movq (%r14), %rsi
leaq 0xe0(%rsp), %rdi
movl $0x8, %edx
callq 0x41c0
leaq 0x158(%rsp), %rdi
callq 0x40b0
testb %al, %al
je 0x1eb35
movq 0xe0(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x100(%rsp,%rax)
jne 0x1eab8
leaq (%rsp,%rax), %rdi
addq $0xe0, %rdi
addq $0x18, 0x50(%rsp)
leaq 0xc0(%rsp), %r13
leaq 0x8(%rsp), %rbp
leaq 0x98(%rsp), %r12
leaq 0x78(%rsp), %rbx
movl $0xa, %esi
callq 0x42a0
movsbl %al, %edx
leaq 0xe0(%rsp), %rdi
movq %r13, %rsi
callq 0x4570
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x1ddbe(%rip), %rsi     # 0x3c680
leaq 0x1ddb8(%rip), %rdx     # 0x3c681
callq 0x6512
movq %r13, %rdi
movq %rbp, %rsi
leaq 0x30(%rsp), %rdx
movl $0x1, %ecx
callq 0x21994
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1e8ff
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x30(%rsp), %r14
movq 0x38(%rsp), %rax
subq %r14, %rax
cmpq $0x40, %rax
jne 0x1ea97
leaq 0xa8(%rsp), %rax
movq %rax, 0x98(%rsp)
movq %r12, %r15
movq %r12, %rdi
leaq 0x1dd4d(%rip), %rsi     # 0x3c680
leaq 0x1dd47(%rip), %rdx     # 0x3c681
callq 0x6512
movq %rbp, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21d86
leaq 0x58(%rsp), %rdi
movq %rbp, %rsi
callq 0x4370
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1e976
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x1e99b
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x30(%rsp), %r14
movq 0x38(%rsp), %rdx
subq %r14, %rdx
sarq $0x5, %rdx
cmpq $0x1, %rdx
jbe 0x1eb22
leaq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
movq %rbx, %r15
movq %rbx, %rdi
leaq 0x1dcb0(%rip), %rsi     # 0x3c680
leaq 0x1dcaa(%rip), %rdx     # 0x3c681
callq 0x6512
addq $0x20, %r14
movq %rbp, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21d86
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x4380
movsd %xmm0, 0xb8(%rsp)
leaq 0x18(%rsp), %rax
cmpq %rax, %r14
je 0x1ea1e
movq 0x18(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x42e0
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x1ea40
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0x647c
movsd 0xb8(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x50(%rsp), %rdi
movq %rbp, %rsi
callq 0x2012e
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1ea97
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0xe0(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %rdi
addq $0xe0, %rdi
cmpl $0x0, 0x20(%rdi)
je 0x1e891
leaq 0x30(%rsp), %rdi
callq 0x6412
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x1eade
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x1eb03
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0xe0(%rsp), %rdi
callq 0x40c0
addq $0x2e8, %rsp            # imm = 0x2E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c800(%rip), %rdi     # 0x3b329
movl $0x1, %esi
xorl %eax, %eax
callq 0x4440
movq 0x3d14b4(%rip), %rdi    # 0x3efff0
leaq 0x1d7ef(%rip), %rsi     # 0x3c332
movl $0x1c, %edx
callq 0x4340
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x3d1495(%rip), %rdi    # 0x3efff0
callq 0x4340
movq %rax, %rdi
callq 0x4150
xorl %edi, %edi
callq 0x4360
jmp 0x1ebdf
movq %rax, %r14
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x1ebe2
movq 0xa8(%rsp), %rsi
jmp 0x1ebd5
jmp 0x1ebdf
jmp 0x1ebdf
jmp 0x1ebdf
jmp 0x1ebdf
movq %rax, %r14
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x1ebe2
movq 0x88(%rsp), %rsi
jmp 0x1ebd5
jmp 0x1ebbe
jmp 0x1ebdf
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1ebe2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x1ebe2
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x6412
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x1ec08
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x1ec2d
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0xe0(%rsp), %rdi
callq 0x40c0
movq %r14, %rdi
callq 0x4550