// File: /workspace/github_cpp_makefile_star2_O1/TBody[P]atomicpp/atomicpp/ImpuritySpecies.cpp
// Function: atomicpp::ImpuritySpecies::addJSONFiles(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
void ImpuritySpecies::addJSONFiles(const std::string& physics_process, const std::string& filetype_code, const std::string& json_database_path, const int year_fallback /* = 1996*/){
	// # 1. Make the filename std::string expected for the json adas file
	// # 2. Check that this file exists in the JSON_database_path/json_data directory
	// # 3. Add this file to the atomic data .adas_files_dict attribute
	std::string filename;
	std::string year_to_string = std::to_string(year);

	filename = json_database_path + "/" + filetype_code + year_to_string.substr(2,4) + "_" + symbol + ".json";

	if (test_file_exists(filename)) {
		adas_files_dict[physics_process] = filename;
	} else {
		std::printf("%s not found in the specified JSON database\n", filename.c_str());

		std::string filename_fallback;
		std::string year_to_string_fallback = std::to_string(year_fallback);
		filename_fallback = json_database_path + "/" + filetype_code + year_to_string_fallback.substr(2,4) + "_" + symbol + ".json";
		if (test_file_exists(filename_fallback)) {
			std::printf("Warning: Fallback (%s) will be used\n", filename_fallback.c_str());
			adas_files_dict[physics_process] = filename_fallback;
		} else {
			std::printf("Error: Fallback to %s failed\n", year_to_string_fallback.c_str());
			throw std::runtime_error("File not found error (in ImpuritySpecies::addJSONFiles)");
		}
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movl %r8d, %r13d
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x138(%rbp), %rdi
callq 0x4300
movl 0x40(%r14), %esi
leaq -0x198(%rbp), %rdi
callq 0xcec2
leaq 0x17454(%rip), %rdx     # 0x22fae
leaq -0x98(%rbp), %rdi
movq %r12, -0x58(%rbp)
movq %r12, %rsi
callq 0xd007
leaq -0xb8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
movq %r15, %rdx
callq 0xcf5d
leaq -0x78(%rbp), %rdi
leaq -0x198(%rbp), %rsi
movl $0x2, %edx
movl $0x4, %ecx
callq 0x43a0
leaq -0xd8(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
leaq -0x78(%rbp), %rdx
callq 0xcf86
leaq 0x17cab(%rip), %rdx     # 0x23866
leaq -0x118(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x91ba
leaq -0x48(%rbp), %rdi
leaq -0x118(%rbp), %rsi
movq %r14, %rdx
callq 0xcf5d
movl %r13d, %r12d
movq %r15, -0x50(%rbp)
leaq 0x16476(%rip), %rdx     # 0x22065
leaq -0xf8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x91ba
leaq -0x138(%rbp), %r15
leaq -0xf8(%rbp), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x4420
movq %r13, %rdi
callq 0x41a0
leaq -0x48(%rbp), %rdi
callq 0x41a0
leaq -0x118(%rbp), %rdi
callq 0x41a0
leaq -0xd8(%rbp), %rdi
callq 0x41a0
leaq -0x78(%rbp), %rdi
callq 0x41a0
leaq -0xb8(%rbp), %rdi
callq 0x41a0
leaq -0x98(%rbp), %rdi
callq 0x41a0
movq %r15, %rdi
callq 0x5d8c
testb %al, %al
movq %rbx, %r13
movq -0x58(%rbp), %rbx
je 0xbc98
addq $0x58, %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0xd040
leaq -0x138(%rbp), %rsi
movq %rax, %rdi
callq 0x4060
jmp 0xbe34
leaq -0x138(%rbp), %rdi
callq 0x4180
leaq 0x17bbd(%rip), %rdi     # 0x23868
movq %rax, %rsi
xorl %eax, %eax
callq 0x4080
leaq -0xf8(%rbp), %rdi
callq 0x4300
leaq -0x48(%rbp), %rdi
movl %r12d, %esi
callq 0xcec2
leaq 0x172da(%rip), %rdx     # 0x22fae
leaq -0x178(%rbp), %rdi
movq %rbx, %rsi
callq 0xd007
leaq -0x78(%rbp), %rdi
leaq -0x178(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0xcf5d
leaq -0x158(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movl $0x2, %edx
movl $0x4, %ecx
callq 0x43a0
leaq -0x98(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0x158(%rbp), %rdx
callq 0xcf86
leaq 0x17b37(%rip), %rdx     # 0x23866
leaq -0xb8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x91ba
leaq -0xd8(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
movq %r14, %rdx
callq 0xcf5d
leaq 0x16306(%rip), %rdx     # 0x22065
leaq -0x118(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x91ba
leaq -0xf8(%rbp), %rbx
leaq -0x118(%rbp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4420
movq %r15, %rdi
callq 0x41a0
leaq -0xd8(%rbp), %rdi
callq 0x41a0
leaq -0xb8(%rbp), %rdi
callq 0x41a0
leaq -0x98(%rbp), %rdi
callq 0x41a0
leaq -0x158(%rbp), %rdi
callq 0x41a0
leaq -0x78(%rbp), %rdi
callq 0x41a0
leaq -0x178(%rbp), %rdi
callq 0x41a0
movq %rbx, %rdi
callq 0x5d8c
testb %al, %al
je 0xbe5e
leaq -0xf8(%rbp), %rdi
callq 0x4180
leaq 0x17a9e(%rip), %rdi     # 0x23895
movq %rax, %rsi
xorl %eax, %eax
callq 0x4080
addq $0x58, %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0xd040
leaq -0xf8(%rbp), %rsi
movq %rax, %rdi
callq 0x4060
leaq -0x48(%rbp), %rdi
callq 0x41a0
leaq -0xf8(%rbp), %rdi
callq 0x41a0
leaq -0x198(%rbp), %rdi
callq 0x41a0
leaq -0x138(%rbp), %rdi
callq 0x41a0
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x48(%rbp), %rdi
callq 0x4180
leaq 0x17a4c(%rip), %rdi     # 0x238ba
movq %rax, %rsi
xorl %eax, %eax
callq 0x4080
movl $0x10, %edi
callq 0x41b0
movq %rax, %r14
leaq 0x17a4c(%rip), %rsi     # 0x238d8
movq %rax, %rdi
callq 0x4150
movq 0x2f155(%rip), %rsi     # 0x3aff0
movq 0x2f0fe(%rip), %rdx     # 0x3afa0
movq %r14, %rdi
callq 0x4560
movq %rax, %rbx
movq %r14, %rdi
callq 0x4270
jmp 0xbf89
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x41a0
jmp 0xbece
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x41a0
jmp 0xbedf
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x41a0
jmp 0xbef0
movq %rax, %rbx
leaq -0x158(%rbp), %rdi
callq 0x41a0
jmp 0xbf01
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x41a0
leaq -0x178(%rbp), %rdi
callq 0x41a0
jmp 0xbf89
movq %rax, %rbx
jmp 0xbf0a
jmp 0xbf86
movq %rax, %rbx
jmp 0xbf92
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x41a0
jmp 0xbf35
movq %rax, %rbx
leaq -0x118(%rbp), %rdi
callq 0x41a0
jmp 0xbf46
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x41a0
jmp 0xbf57
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x41a0
jmp 0xbf65
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x41a0
leaq -0x98(%rbp), %rdi
jmp 0xbf99
movq %rax, %rbx
jmp 0xbf71
jmp 0xbfa0
movq %rax, %rbx
jmp 0xbfaf
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x41a0
leaq -0xf8(%rbp), %rdi
callq 0x41a0
jmp 0xbfa3
movq %rax, %rbx
leaq -0x198(%rbp), %rdi
callq 0x41a0
leaq -0x138(%rbp), %rdi
callq 0x41a0
movq %rbx, %rdi
callq 0x45a0
nop