// File: 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
subq $0x2d0, %rsp            # imm = 0x2D0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x280(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x44e0
movq -0x280(%rbp), %rax
movl 0x40(%rax), %esi
leaq -0x68(%rbp), %rdi
callq 0x13420
jmp 0x11698
movq -0x20(%rbp), %rsi
leaq 0x25a8a(%rip), %rdx     # 0x3712d
leaq -0x138(%rbp), %rdi
callq 0x13660
jmp 0x116b1
movq -0x18(%rbp), %rdx
leaq -0x118(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x13540
jmp 0x116ca
leaq -0x158(%rbp), %rdi
leaq -0x68(%rbp), %rsi
movl $0x2, %edx
movl $0x4, %ecx
callq 0x43d0
jmp 0x116e6
leaq -0xf8(%rbp), %rdi
leaq -0x118(%rbp), %rsi
leaq -0x158(%rbp), %rdx
callq 0x13590
jmp 0x11702
leaq 0x262dd(%rip), %rdx     # 0x379e6
leaq -0xd8(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0xcd10
jmp 0x1171e
movq -0x280(%rbp), %rdx
leaq -0xb8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x13540
jmp 0x1173a
leaq 0x24914(%rip), %rdx     # 0x36055
leaq -0x98(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0xcd10
jmp 0x11756
leaq -0x48(%rbp), %rdi
movq %rdi, -0x290(%rbp)
leaq -0x98(%rbp), %rsi
movq %rsi, -0x298(%rbp)
callq 0x4470
movq -0x298(%rbp), %rdi
callq 0x4220
leaq -0xb8(%rbp), %rdi
callq 0x4220
leaq -0xd8(%rbp), %rdi
callq 0x4220
leaq -0xf8(%rbp), %rdi
callq 0x4220
leaq -0x158(%rbp), %rdi
callq 0x4220
leaq -0x118(%rbp), %rdi
callq 0x4220
leaq -0x138(%rbp), %rdi
callq 0x4220
movq -0x290(%rbp), %rdi
callq 0x6e50
movb %al, -0x281(%rbp)
jmp 0x117dc
movb -0x281(%rbp), %al
testb $0x1, %al
jne 0x117eb
jmp 0x118e3
movq -0x280(%rbp), %rdi
addq $0x58, %rdi
movq -0x10(%rbp), %rsi
callq 0x136e0
movq %rax, -0x2a0(%rbp)
jmp 0x11808
movq -0x2a0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x4060
jmp 0x1181a
jmp 0x11c40
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x11c64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x11c5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x118d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x118c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x118ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x118ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x118a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x4220
leaq -0xd8(%rbp), %rdi
callq 0x4220
leaq -0xf8(%rbp), %rdi
callq 0x4220
leaq -0x158(%rbp), %rdi
callq 0x4220
leaq -0x118(%rbp), %rdi
callq 0x4220
leaq -0x138(%rbp), %rdi
callq 0x4220
jmp 0x11c5b
leaq -0x48(%rbp), %rdi
callq 0x4180
movq %rax, %rsi
leaq 0x260f2(%rip), %rdi     # 0x379e8
xorl %eax, %eax
callq 0x4080
jmp 0x118ff
leaq -0x178(%rbp), %rdi
callq 0x44e0
movl -0x24(%rbp), %esi
leaq -0x198(%rbp), %rdi
callq 0x13420
jmp 0x1191c
movq -0x20(%rbp), %rsi
leaq 0x25806(%rip), %rdx     # 0x3712d
leaq -0x258(%rbp), %rdi
callq 0x13660
jmp 0x11935
movq -0x18(%rbp), %rdx
leaq -0x238(%rbp), %rdi
leaq -0x258(%rbp), %rsi
callq 0x13540
jmp 0x1194e
leaq -0x278(%rbp), %rdi
leaq -0x198(%rbp), %rsi
movl $0x2, %edx
movl $0x4, %ecx
callq 0x43d0
jmp 0x1196d
leaq -0x218(%rbp), %rdi
leaq -0x238(%rbp), %rsi
leaq -0x278(%rbp), %rdx
callq 0x13590
jmp 0x11989
leaq 0x26056(%rip), %rdx     # 0x379e6
leaq -0x1f8(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0xcd10
jmp 0x119a5
movq -0x280(%rbp), %rdx
leaq -0x1d8(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x13540
jmp 0x119c1
leaq 0x2468d(%rip), %rdx     # 0x36055
leaq -0x1b8(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0xcd10
jmp 0x119dd
leaq -0x178(%rbp), %rdi
movq %rdi, -0x2b0(%rbp)
leaq -0x1b8(%rbp), %rsi
movq %rsi, -0x2b8(%rbp)
callq 0x4470
movq -0x2b8(%rbp), %rdi
callq 0x4220
leaq -0x1d8(%rbp), %rdi
callq 0x4220
leaq -0x1f8(%rbp), %rdi
callq 0x4220
leaq -0x218(%rbp), %rdi
callq 0x4220
leaq -0x278(%rbp), %rdi
callq 0x4220
leaq -0x238(%rbp), %rdi
callq 0x4220
leaq -0x258(%rbp), %rdi
callq 0x4220
movq -0x2b0(%rbp), %rdi
callq 0x6e50
movb %al, -0x2a1(%rbp)
jmp 0x11a66
movb -0x2a1(%rbp), %al
testb $0x1, %al
jne 0x11a75
jmp 0x11b8f
leaq -0x178(%rbp), %rdi
callq 0x4180
movq %rax, %rsi
leaq 0x25f8a(%rip), %rdi     # 0x37a15
xorl %eax, %eax
callq 0x4080
jmp 0x11a94
movq -0x280(%rbp), %rdi
addq $0x58, %rdi
movq -0x10(%rbp), %rsi
callq 0x136e0
movq %rax, -0x2c0(%rbp)
jmp 0x11ab1
movq -0x2c0(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x4060
jmp 0x11ac6
jmp 0x11c0c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x11c32
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x11c26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x11b7e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x11b72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x11b66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x11b5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x11b4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x4220
leaq -0x1f8(%rbp), %rdi
callq 0x4220
leaq -0x218(%rbp), %rdi
callq 0x4220
leaq -0x278(%rbp), %rdi
callq 0x4220
leaq -0x238(%rbp), %rdi
callq 0x4220
leaq -0x258(%rbp), %rdi
callq 0x4220
jmp 0x11c26
leaq -0x198(%rbp), %rdi
callq 0x4180
movq %rax, %rsi
leaq 0x25e95(%rip), %rdi     # 0x37a3a
xorl %eax, %eax
callq 0x4080
jmp 0x11bae
movl $0x10, %edi
callq 0x41b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x2c8(%rbp)
leaq 0x25e8c(%rip), %rsi     # 0x37a58
callq 0x4160
jmp 0x11bd3
movq -0x2c8(%rbp), %rdi
movq 0x3d40f(%rip), %rsi     # 0x4eff0
movq 0x3d3b8(%rip), %rdx     # 0x4efa0
callq 0x45b0
jmp 0x11c76
movq -0x2c8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
callq 0x42b0
jmp 0x11c26
leaq -0x198(%rbp), %rdi
callq 0x4220
leaq -0x178(%rbp), %rdi
callq 0x4220
jmp 0x11c40
leaq -0x198(%rbp), %rdi
callq 0x4220
leaq -0x178(%rbp), %rdi
callq 0x4220
jmp 0x11c5b
leaq -0x68(%rbp), %rdi
callq 0x4220
leaq -0x48(%rbp), %rdi
callq 0x4220
addq $0x2d0, %rsp            # imm = 0x2D0
popq %rbp
retq
leaq -0x68(%rbp), %rdi
callq 0x4220
leaq -0x48(%rbp), %rdi
callq 0x4220
movq -0x70(%rbp), %rdi
callq 0x45e0
nopw %cs:(%rax,%rax)