// File: /workspace/github_cpp_makefile_star2_O3/TBody[P]atomicpp/atomicpp/RateCoefficient.cpp
// Function: atomicpp::RateCoefficient::RateCoefficient(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
RateCoefficient::RateCoefficient(const std::string& filename){
	// # Create an instance of RateCoefficient by reading an OpenADAS JSON file

	json data_dict = retrieveFromJSON(filename);

	atomic_number   = data_dict["charge"];
	element         = data_dict["element"];
	adf11_file      = filename;

	std::vector<std::vector< std::vector<double> > > log_rate = data_dict["log_coeff"];
	std::vector<double> log_temp = data_dict["log_temperature"];
	std::vector<double> log_dens = data_dict["log_density"];
	// Doing this as a two-step process - since the first is casting JSON data into the stated type.
	// The second copies the value to the corresponding RateCoefficient attribute

	for(int k=0; k<atomic_number; ++k){
		interpolator.push_back(BivariateBSpline(log_temp, log_dens, log_rate[k]));
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq %r14, %rdi
callq 0x4300
leaq 0x28(%rbx), %r15
movq %r15, %rdi
callq 0x4300
movq %rbx, -0x30(%rbp)
leaq 0x48(%rbx), %rdi
movq %rdi, -0x48(%rbp)
callq 0x11416
leaq -0xc0(%rbp), %rdi
movq %r13, %rsi
movq %r14, -0x58(%rbp)
movq %r15, -0x50(%rbp)
callq 0x4480
leaq -0x40(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x5c50
leaq -0xc0(%rbp), %rdi
callq 0x41a0
leaq 0x12fef(%rip), %rsi     # 0x23fb8
leaq -0x40(%rbp), %rdi
callq 0xcad2
movq %rax, %rdi
callq 0xcc32
movq -0x30(%rbp), %rcx
movl %eax, (%rcx)
leaq 0x12fd8(%rip), %rsi     # 0x23fbf
leaq -0x40(%rbp), %rdi
callq 0xcad2
leaq -0x150(%rbp), %rdi
movq %rax, %rsi
callq 0xcc1a
leaq -0x150(%rbp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4420
movq %rbx, %rdi
callq 0x41a0
movq %r15, %rdi
movq %r13, %rsi
callq 0x4060
leaq 0x12f9c(%rip), %rsi     # 0x23fc7
leaq -0x40(%rbp), %rdi
callq 0xcad2
leaq -0xa0(%rbp), %rdi
movq %rax, %rsi
callq 0x11420
leaq 0x12f87(%rip), %rsi     # 0x23fd1
leaq -0x40(%rbp), %rdi
callq 0xcad2
leaq -0x88(%rbp), %rdi
movq %rax, %rsi
callq 0x11438
leaq 0x12f78(%rip), %rsi     # 0x23fe1
leaq -0x40(%rbp), %rdi
callq 0xcad2
leaq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x11438
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jle 0x110ee
xorl %r13d, %r13d
leaq -0xa0(%rbp), %rbx
leaq -0x150(%rbp), %r14
leaq -0x88(%rbp), %r15
leaq -0x70(%rbp), %r12
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1145a
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rax, %rcx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x19eb4
movq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0x11450
movq %r14, %rdi
callq 0x103e0
incq %r13
movq -0x30(%rbp), %rax
movslq (%rax), %rax
cmpq %rax, %r13
jl 0x110a3
leaq -0x70(%rbp), %rdi
callq 0x53c6
leaq -0x88(%rbp), %rdi
callq 0x53c6
leaq -0xa0(%rbp), %rdi
callq 0x1146c
leaq -0x40(%rbp), %rdi
callq 0x5e92
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
leaq -0xc0(%rbp), %rdi
callq 0x41a0
jmp 0x11191
movq %rax, %r12
jmp 0x11191
movq %rax, %r12
jmp 0x11170
movq %rax, %r12
jmp 0x1117c
jmp 0x1114e
jmp 0x1114e
movq %rax, %r12
jmp 0x11188
movq %rax, %r12
jmp 0x11167
movq %rax, %r12
leaq -0x150(%rbp), %rdi
callq 0x103e0
leaq -0x70(%rbp), %rdi
callq 0x53c6
leaq -0x88(%rbp), %rdi
callq 0x53c6
leaq -0xa0(%rbp), %rdi
callq 0x1146c
leaq -0x40(%rbp), %rdi
callq 0x5e92
movq -0x48(%rbp), %rdi
callq 0x1030a
movq -0x50(%rbp), %rdi
callq 0x41a0
movq -0x58(%rbp), %rdi
callq 0x41a0
movq %r12, %rdi
callq 0x45a0