LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/ExternalModules/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>::~basic_json()
~basic_json()
    {
        assert_invariant();

        switch (m_type)
        {
            case value_t::object:
            {
                AllocatorType<object_t> alloc;
                alloc.destroy(m_value.object);
                alloc.deallocate(m_value.object, 1);
                break;
            }

            case value_t::array:
            {
                AllocatorType<array_t> alloc;
                alloc.destroy(m_value.array);
                alloc.deallocate(m_value.array, 1);
                break;
            }

            case value_t::string:
            {
                AllocatorType<string_t> alloc;
                alloc.destroy(m_value.string);
                alloc.deallocate(m_value.string, 1);
                break;
            }

            default:
            {
                // all other types need no specific destructor
                break;
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x5fb0
movzbl (%rbx), %eax
cmpl $0x3, %eax
je 0x5ef1
cmpl $0x2, %eax
je 0x5ec0
cmpl $0x1, %eax
jne 0x5f20
leaq -0x13(%rbp), %r14
movq %r14, %rdi
callq 0x6054
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x605e
movq 0x8(%rbx), %rsi
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x606c
movq %r14, %rdi
callq 0x607a
jmp 0x5f20
leaq -0x12(%rbp), %r14
movq %r14, %rdi
callq 0x6080
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x608a
movq 0x8(%rbx), %rsi
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x6098
movq %r14, %rdi
callq 0x60a6
jmp 0x5f20
leaq -0x11(%rbp), %r14
movq %r14, %rdi
callq 0x60ac
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x60b6
movq 0x8(%rbx), %rsi
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x60c4
movq %r14, %rdi
callq 0x60d2
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/ExternalModules/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>::lexer::lexer(std::istream&)
explicit lexer(std::istream& s)
            : m_stream(&s), m_line_buffer()
        {
            // immediately abort if stream is erroneous
            if (s.fail())
            {
                JSON_THROW(std::invalid_argument("stream error"));
            }

            // fill buffer
            fill_line_buffer();

            // skip UTF-8 byte-order mark
            if (m_line_buffer.size() >= 3 and m_line_buffer.substr(0, 3) == "\xEF\xBB\xBF")
            {
                m_line_buffer[0] = ' ';
                m_line_buffer[1] = ' ';
                m_line_buffer[2] = ' ';
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r12
movq %rdi, %r15
movq %rsi, (%rdi)
leaq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0x4300
leaq 0x28(%r15), %r14
movq %r14, %rdi
callq 0x4300
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%r15)
movups %xmm0, 0x48(%r15)
andq $0x0, 0x68(%r15)
movl $0xf, 0x70(%r15)
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
callq 0x4030
testb %al, %al
jne 0x70ed
movq %r15, %rdi
xorl %esi, %esi
callq 0x7164
movq %rbx, %rdi
callq 0x4240
cmpq $0x3, %rax
jb 0x70e0
leaq -0x40(%rbp), %rdi
pushq $0x3
popq %rcx
movq %rbx, %rsi
xorl %edx, %edx
callq 0x43a0
leaq 0x1a7e6(%rip), %rsi     # 0x2187e
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0x73cb
movl %eax, %r15d
movq %r14, %rdi
callq 0x41a0
testb %r15b, %r15b
je 0x70e0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4640
movb $0x20, %r14b
movb %r14b, (%rax)
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x4640
movb %r14b, (%rax)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x4640
movb %r14b, (%rax)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x41b0
movq %rax, %r12
leaq 0x1a772(%rip), %rsi     # 0x21871
movq %rax, %rdi
callq 0x45e0
movq 0x32eca(%rip), %rsi     # 0x39fd8
movq 0x32eab(%rip), %rdx     # 0x39fc0
movq %r12, %rdi
callq 0x4560
jmp 0x712c
movq %rax, %r15
movq %r12, %rdi
callq 0x4270
jmp 0x712f
movq %rax, %r15
movq %r14, %rdi
callq 0x41a0
movq %rbx, %rdi
callq 0x41a0
movq %r15, %rdi
callq 0x45a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/ImpuritySpecies.cpp
// Function: atomicpp::ImpuritySpecies::makeRateCoefficients()
void ImpuritySpecies::makeRateCoefficients(){
	// # Calls the RateCoefficient constructor method for each entry in the .adas_files_dict
	// # Generates a dictionary smart pointer to RateCoefficient objects as .rate_coefficients
	// See http://umich.edu/~eecs381/handouts/C++11_smart_ptrs.pdf for information on smart pointers (memory-managed)

	for (auto& kv : get_adas_files_dict()) {
		std::string physics_process = kv.first;
		std::string filename = kv.second;
		// Make a new RateCoefficient object by calling the RateCoefficient constructor on 'filename'
		// Create a smart pointer 'RC' that points to this object
		std::shared_ptr<RateCoefficient> RC(new RateCoefficient(filename));
		// Add 'RC' to the rate_coefficients attribute of ImpuritySpecies
		// (n.b. this is a std::map from a std::string 'physics_process' to a smart pointer which points to a RateCoefficient object)
		rate_coefficients[physics_process] = RC;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %r15
leaq -0xc0(%rbp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xbeb2
movq %rbx, %rdi
callq 0xcb78
leaq -0x50(%rbp), %r14
movq %rax, (%r14)
movq %rbx, %rdi
callq 0xcb82
leaq -0x38(%rbp), %rcx
movq %rax, (%rcx)
addq $0x88, %r15
movq %r15, -0x30(%rbp)
leaq -0x90(%rbp), %r12
leaq -0x70(%rbp), %r13
leaq -0x48(%rbp), %r15
movq %r14, %rdi
leaq -0x38(%rbp), %rsi
callq 0xcb8c
testb %al, %al
je 0xbe43
movq %r14, %rdi
callq 0xcb9c
movq %rax, %rbx
movq %r12, %rdi
movq %rax, %rsi
callq 0x4480
addq $0x20, %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4480
pushq $0x60
popq %rdi
callq 0x4380
movq %rax, %rbx
movq %rax, %rdi
movq %r13, %rsi
callq 0x10bdc
movq %r15, %rdi
movq %rbx, %rsi
callq 0xce54
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0xce5e
movq %rax, %rdi
movq %r15, %rsi
callq 0xcf1c
movq %r15, %rdi
callq 0x5398
movq %r13, %rdi
callq 0x41a0
movq %r12, %rdi
callq 0x41a0
movq %r14, %rdi
callq 0xcbf4
jmp 0xbdad
leaq -0xc0(%rbp), %rdi
callq 0x5700
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0xbe9e
movq %rax, %r14
movq %rbx, %rdi
callq 0x4330
jmp 0xbe89
movq %rax, %r14
leaq -0x48(%rbp), %rdi
callq 0x5398
jmp 0xbe89
movq %rax, %r14
jmp 0xbe92
movq %rax, %r14
leaq -0x70(%rbp), %rdi
callq 0x41a0
leaq -0x90(%rbp), %rdi
callq 0x41a0
leaq -0xc0(%rbp), %rdi
callq 0x5700
movq %r14, %rdi
callq 0x45a0
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/ExternalModules/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::iter_impl(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>*)
explicit iter_impl(pointer object) noexcept
            : m_object(object)
        {
            assert(m_object != nullptr);

            switch (m_object->m_type)
            {
                case basic_json::value_t::object:
                {
                    m_it.object_iterator = typename object_t::iterator();
                    break;
                }

                case basic_json::value_t::array:
                {
                    m_it.array_iterator = typename array_t::iterator();
                    break;
                }

                default:
                {
                    m_it.primitive_iterator = primitive_iterator_t();
                    break;
                }
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsi, (%rdi)
leaq 0x8(%rdi), %r14
movq %r14, %rdi
callq 0xe48c
movq (%rbx), %rax
testq %rax, %rax
je 0xe3fb
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0xe3c6
cmpl $0x1, %eax
jne 0xe3db
leaq -0x18(%rbp), %rbx
movq %rbx, %rdi
callq 0xe4ba
movq (%rbx), %rax
movq %rax, (%r14)
jmp 0xe3f2
leaq -0x18(%rbp), %r14
movq %r14, %rdi
callq 0xe4c4
movq (%r14), %rax
movq %rax, 0x10(%rbx)
jmp 0xe3f2
leaq -0x18(%rbp), %r14
andq $0x0, (%r14)
movq %r14, %rdi
callq 0xe4ce
movq (%r14), %rax
movq %rax, 0x18(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1450e(%rip), %rdi     # 0x22910
leaq 0x12dec(%rip), %rsi     # 0x211f5
leaq 0x14514(%rip), %rcx     # 0x22924
movl $0x22ab, %edx           # imm = 0x22AB
callq 0x4210
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/ExternalModules/json.hpp
// Function: void nlohmann::detail::from_json<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>, int, 0>(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer> const&, int&)
void from_json(const BasicJsonType& j, ArithmeticType& val)
{
    switch (static_cast<value_t>(j))
    {
        case value_t::number_unsigned:
        {
            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
            break;
        }
        case value_t::number_integer:
        {
            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
            break;
        }
        case value_t::number_float:
        {
            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
            break;
        }
        case value_t::boolean:
        {
            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>());
            break;
        }
        default:
        {
            JSON_THROW(std::domain_error("type must be number, but is " + j.type_name()));
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0xebce
movzbl %al, %eax
addl $-0x4, %eax
cmpl $0x3, %eax
ja 0xeb43
leaq 0x13c36(%rip), %rcx     # 0x22734
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
callq 0xebfa
movzbl (%rax), %eax
jmp 0xeb36
movq %r14, %rdi
callq 0xebd6
jmp 0xeb34
movq %r14, %rdi
callq 0xebee
cvttsd2si (%rax), %eax
jmp 0xeb36
movq %r14, %rdi
callq 0xebe2
movl (%rax), %eax
movl %eax, (%rbx)
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x41b0
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x9ad2
leaq 0x1428e(%rip), %rsi     # 0x22def
leaq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x8fbe
movb $0x1, %r15b
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x4410
xorl %r15d, %r15d
movq 0x2b401(%rip), %rsi     # 0x39f88
movq 0x2b40a(%rip), %rdx     # 0x39f98
movq %rbx, %rdi
callq 0x4560
movq %rax, %r14
leaq -0x58(%rbp), %rdi
callq 0x41a0
jmp 0xebaa
movq %rax, %r14
movb $0x1, %r15b
leaq -0x38(%rbp), %rdi
callq 0x41a0
testb %r15b, %r15b
jne 0xebbd
jmp 0xebc5
movq %rax, %r14
movq %rbx, %rdi
callq 0x4270
movq %r14, %rdi
callq 0x45a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/ExternalModules/json.hpp
// Function: void nlohmann::detail::get_arithmetic_value<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>, double, 0>(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer> const&, double&)
void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val)
{
    switch (static_cast<value_t>(j))
    {
        case value_t::number_unsigned:
        {
            val = static_cast<ArithmeticType>(
                      *j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
            break;
        }
        case value_t::number_integer:
        {
            val = static_cast<ArithmeticType>(
                      *j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
            break;
        }
        case value_t::number_float:
        {
            val = static_cast<ArithmeticType>(
                      *j.template get_ptr<const typename BasicJsonType::number_float_t*>());
            break;
        }
        default:
        {
            JSON_THROW(
                std::domain_error("type must be number, but is " + j.type_name()));
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0xebce
cmpb $0x5, %al
je 0xee90
movzbl %al, %eax
cmpl $0x7, %eax
je 0xee82
cmpl $0x6, %eax
jne 0xeeac
movq %r14, %rdi
callq 0xebd6
movsd (%rax), %xmm1
unpcklps 0x138e4(%rip), %xmm1    # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x138ec(%rip), %xmm1    # 0x22760
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
jmp 0xee9d
movq %r14, %rdi
callq 0xebee
movsd (%rax), %xmm0
jmp 0xee9d
movq %r14, %rdi
callq 0xebe2
cvtsi2sdq (%rax), %xmm0
movsd %xmm0, (%rbx)
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x41b0
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x9ad2
leaq 0x13f25(%rip), %rsi     # 0x22def
leaq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x8fbe
movb $0x1, %r15b
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x4410
xorl %r15d, %r15d
movq 0x2b098(%rip), %rsi     # 0x39f88
movq 0x2b0a1(%rip), %rdx     # 0x39f98
movq %rbx, %rdi
callq 0x4560
movq %rax, %r14
leaq -0x58(%rbp), %rdi
callq 0x41a0
jmp 0xef13
movq %rax, %r14
movb $0x1, %r15b
leaq -0x38(%rbp), %rdi
callq 0x41a0
testb %r15b, %r15b
jne 0xef26
jmp 0xef2e
movq %rax, %r14
movq %rbx, %rdi
callq 0x4270
movq %r14, %rdi
callq 0x45a0
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/RateCoefficient.cpp
// Function: atomicpp::RateCoefficient::RateCoefficient(std::shared_ptr<atomicpp::RateCoefficient>)
RateCoefficient::RateCoefficient(const std::shared_ptr<RateCoefficient> source_RC){
	// # Create an instance of a blank RateCoefficient by copying from another RateCoefficient object

	atomic_number   = source_RC->get_atomic_number();
	element         = source_RC->get_element();
	adf11_file      = source_RC->get_adf11_file();

	interpolator = source_RC->get_interpolator();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r12
movq %rdi, %r13
leaq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0x4300
leaq 0x28(%r13), %r14
movq %r14, %rdi
callq 0x4300
leaq 0x48(%r13), %r15
movq %r15, %rdi
callq 0x11090
movq %r12, %rdi
callq 0x538e
movq %rax, %rdi
callq 0x10f3a
movl %eax, (%r13)
movq %r12, %rdi
callq 0x538e
leaq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x10f42
leaq -0x48(%rbp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4420
movq %r13, %rdi
callq 0x41a0
movq %r12, %rdi
callq 0x538e
leaq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x10f5e
movq %r14, %rdi
movq %r13, %rsi
callq 0x4420
movq %r13, %rdi
callq 0x41a0
movq %r12, %rdi
callq 0x538e
leaq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x10f7a
leaq -0x48(%rbp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x11124
movq %rbx, %rdi
callq 0xffe0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10f17
jmp 0x10f17
movq %rax, %r12
movq %r15, %rdi
callq 0xffe0
movq %r14, %rdi
callq 0x41a0
movq %rbx, %rdi
callq 0x41a0
movq %r12, %rdi
callq 0x45a0
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/RateCoefficient.cpp
// Function: atomicpp::RateCoefficient::call0D(int, double, double)
double RateCoefficient::call0D(const int k, const double eval_Te, const double eval_Ne){

	double eval_log_Te = log10(eval_Te);
	double eval_log_Ne = log10(eval_Ne);

	double eval_log_rate = interpolator[k].call0D(eval_log_Te, eval_log_Ne);

	return pow(10, eval_log_rate);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd %xmm1, -0x18(%rbp)
movl %esi, %ebx
movq %rdi, %r14
callq 0x41c0
movsd %xmm0, -0x20(%rbp)
movsd -0x18(%rbp), %xmm0
callq 0x41c0
movsd %xmm0, -0x18(%rbp)
addq $0x48, %r14
movslq %ebx, %rsi
movq %r14, %rdi
callq 0x1113c
movq %rax, %rdi
movsd -0x20(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
callq 0x1ba1c
movaps %xmm0, %xmm1
movsd 0x11fc0(%rip), %xmm0    # 0x22fb0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x4590
nop
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/ExternalModules/json.hpp
// Function: void nlohmann::detail::from_json<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>, std::vector<std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>, std::allocator<std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>>>, 0>(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer> const&, std::vector<std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>, std::allocator<std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>>>&)
void from_json(const BasicJsonType& j, CompatibleArrayType& arr)
{
    if (j.is_null())
    {
        JSON_THROW(std::domain_error("type must be array, but is " + j.type_name()));
    }

    // when T == BasicJsonType, do not check if value_t is correct
    if (not std::is_same<typename CompatibleArrayType::value_type, BasicJsonType>::value)
    {
        if (not j.is_array())
        {
            JSON_THROW(std::domain_error("type must be array, but is " + j.type_name()));
        }
    }
    from_json_array_impl(j, arr, priority_tag<1> {});
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x99fc
testb %al, %al
jne 0x11345
movq %r14, %rdi
callq 0xa550
testb %al, %al
je 0x1139a
movq %r14, %rdi
movq %rbx, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1142a
pushq $0x10
popq %rdi
callq 0x41b0
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x9ad2
leaq 0x11c8a(%rip), %rsi     # 0x22fed
leaq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x8fbe
movb $0x1, %r15b
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x4410
xorl %r15d, %r15d
movq 0x28bff(%rip), %rsi     # 0x39f88
movq 0x28c08(%rip), %rdx     # 0x39f98
movq %rbx, %rdi
callq 0x4560
jmp 0x113ed
pushq $0x10
popq %rdi
callq 0x41b0
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x9ad2
leaq 0x11c35(%rip), %rsi     # 0x22fed
leaq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x8fbe
movb $0x1, %r15b
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x4410
xorl %r15d, %r15d
movq 0x28baa(%rip), %rsi     # 0x39f88
movq 0x28bb3(%rip), %rdx     # 0x39f98
movq %rbx, %rdi
callq 0x4560
jmp 0x113f1
jmp 0x113ff
movq %rax, %r14
leaq -0x58(%rbp), %rdi
callq 0x41a0
jmp 0x11405
movq %rax, %r14
movb $0x1, %r15b
leaq -0x38(%rbp), %rdi
callq 0x41a0
testb %r15b, %r15b
jne 0x1141a
jmp 0x11422
jmp 0x11417
movq %rax, %r14
movq %rbx, %rdi
callq 0x4270
movq %r14, %rdi
callq 0x45a0
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/ExternalModules/json.hpp
// Function: decltype(fp0.reserve(std::declval<std::vector<std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>, std::allocator<std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>>>::size_type>()), (void)()) nlohmann::detail::from_json_array_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>, std::vector<std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>, std::allocator<std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>>>>(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer> const&, std::vector<std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>, std::allocator<std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>>>&, nlohmann::detail::priority_tag<1u>)
auto from_json_array_impl(const BasicJsonType& j, CompatibleArrayType& arr, priority_tag<1>)
-> decltype(
    arr.reserve(std::declval<typename CompatibleArrayType::size_type>()),
    void())
{
    using std::begin;
    using std::end;

    arr.reserve(j.size());
    std::transform(
        j.begin(), j.end(), std::inserter(arr, end(arr)), [](const BasicJsonType & i)
    {
        // get<BasicJsonType>() returns *this, this won't call a from_json
        // method when value_type is BasicJsonType
        return i.template get<typename CompatibleArrayType::value_type>();
    });
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1155a
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1149e
leaq -0x60(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x11636
leaq -0x40(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x1164e
movq %rbx, %rdi
callq 0x1168f
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11666
movq %rdx, %rcx
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x1158f
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/ExternalModules/json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer> const>::set_begin()
void set_begin() noexcept
        {
            assert(m_object != nullptr);

            switch (m_object->m_type)
            {
                case basic_json::value_t::object:
                {
                    m_it.object_iterator = m_object->m_value.object->begin();
                    break;
                }

                case basic_json::value_t::array:
                {
                    m_it.array_iterator = m_object->m_value.array->begin();
                    break;
                }

                case basic_json::value_t::null:
                {
                    // set to end so begin()==end() is true: null is empty
                    m_it.primitive_iterator.set_end();
                    break;
                }

                default:
                {
                    m_it.primitive_iterator.set_begin();
                    break;
                }
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rax
testq %rax, %rax
je 0x13dc1
movq %rdi, %rbx
movzbl (%rax), %ecx
testl %ecx, %ecx
je 0x13d9d
cmpl $0x2, %ecx
je 0x13d89
cmpl $0x1, %ecx
jne 0x13daf
movq 0x8(%rax), %rdi
callq 0x13de0
movq %rax, 0x8(%rbx)
jmp 0x13d96
movq 0x8(%rax), %rdi
callq 0xa7b0
movq %rax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
addq $0x18, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xe4ee
addq $0x18, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x13dea
leaq 0xeb48(%rip), %rdi      # 0x22910
leaq 0xd426(%rip), %rsi      # 0x211f5
leaq 0xf8fc(%rip), %rcx      # 0x236d2
movl $0x22f9, %edx           # imm = 0x22F9
callq 0x4210
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/Spline/BilinearSpline.cpp
// Function: atomicpp::BilinearSpline::BilinearSpline(std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>>&, std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&)
BilinearSpline::BilinearSpline(
	std::vector<double>& _x_values,
	std::vector<double>& _y_values,
	std::vector< std::vector<double> > & _z_values
	){
	x_values = _x_values;
	y_values = _y_values;
	z_values = _z_values;

	//Doesn't require initialisation
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, -0x30(%rbp)
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
callq 0x12366
leaq 0x18(%rbx), %r14
movq %r14, %rdi
callq 0x12366
leaq 0x30(%rbx), %r12
movq %r12, %rdi
callq 0x11c9c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x15448
movq %r14, %rdi
movq %r13, %rsi
callq 0x15448
movq %r12, %rdi
movq -0x30(%rbp), %rsi
callq 0x155ae
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r12, %rdi
callq 0x100f2
movq %r14, %rdi
callq 0x53a6
movq %rbx, %rdi
callq 0x53a6
movq %r15, %rdi
callq 0x45a0
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/Spline/BilinearSpline.cpp
// Function: atomicpp::BilinearSpline::call0D_shared(std::pair<int, double>, std::pair<int, double>)
double BilinearSpline::call0D_shared(const std::pair<int, double> x_interp, const std::pair<int, double> y_interp){

	int low_x = x_interp.first;
	int low_y = y_interp.first;

	double x = x_interp.second;
	double y = y_interp.second;

	// // Construct the simple interpolation grid
	// // Find weightings based on linear distance
	// // w01 ------ w11    y
	// //  | \     / |      |
	// //  |  w(x,y) |    --/--x
	// //  | /     \ |      |
	// // w00 ------ w10

	double eval_coeff =
	 (z_values[low_x+0][low_y+0]*(1-y) + z_values[low_x+0][low_y+1]*y)*(1-x)
	+(z_values[low_x+1][low_y+0]*(1-y) + z_values[low_x+1][low_y+1]*y)*x;

	return eval_coeff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movsd %xmm1, -0x38(%rbp)
movl %edx, %r14d
movsd %xmm0, -0x40(%rbp)
movq %rdi, %rbx
addq $0x30, %rbx
movslq %esi, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x15754
movslq %r14d, %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x537c
movsd 0xbd53(%rip), %xmm0     # 0x21008
subsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd (%rax), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, -0x28(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x15754
leal 0x1(%r14), %ecx
movslq %ecx, %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x537c
movsd (%rax), %xmm0
mulsd -0x38(%rbp), %xmm0
addsd -0x28(%rbp), %xmm0
movsd 0xbd09(%rip), %xmm1     # 0x21008
subsd -0x40(%rbp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, -0x28(%rbp)
incl %r15d
movslq %r15d, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x15754
movq %rax, %rdi
movq %r14, %rsi
callq 0x537c
movsd -0x30(%rbp), %xmm0
mulsd (%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x15754
movq %rax, %rdi
movq %r12, %rsi
callq 0x537c
movsd -0x38(%rbp), %xmm0
mulsd (%rax), %xmm0
addsd -0x30(%rbp), %xmm0
mulsd -0x40(%rbp), %xmm0
addsd -0x28(%rbp), %xmm0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/Spline/BicubicSpline.cpp
// Function: atomicpp::BicubicSpline::call0D_shared(std::pair<int, double>, std::pair<int, double>)
double BicubicSpline::call0D_shared(const std::pair<int, double> x_interp, const std::pair<int, double> y_interp){

	int low_x = x_interp.first;
	int low_y = y_interp.first;

	double x = x_interp.second;
	double y = y_interp.second;

	// // Construct the simple interpolation grid
	// // Find weightings based on linear distance
	// // w01 ------ w11    y
	// //  | \     / |      |
	// //  |  w(x,y) |    --/--x
	// //  | /     \ |      |
	// // w00 ------ w10

	grid_matrix alpha_sub = alpha_coeff[low_x][low_y];

	double x_vector[4] = {1, x, x*x, x*x*x}; //Row vector
	double y_vector[4] = {1, y, y*y, y*y*y}; //Column vector

	double return_value = 0.0;
	for(int i=0; i<4; ++i){
		for(int j=0; j<4; ++j){
			return_value += x_vector[i] * alpha_sub[i][j] * y_vector[j];
		}
	}

	return return_value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movsd %xmm1, -0x20(%rbp)
movl %edx, %ebx
movsd %xmm0, -0x28(%rbp)
addq $0x48, %rdi
movslq %esi, %rsi
callq 0x17d6c
movslq %ebx, %rsi
movq %rax, %rdi
callq 0x110d4
leaq -0x88(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x148c4
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, -0x70(%rbp)
movsd -0x28(%rbp), %xmm1
movsd %xmm1, -0x68(%rbp)
movapd %xmm1, %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
mulsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movq %rax, -0x50(%rbp)
movsd -0x20(%rbp), %xmm1
movsd %xmm1, -0x48(%rbp)
movapd %xmm1, %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
mulsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
xorpd %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
xorl %r14d, %r14d
cmpq $0x4, %r14
je 0x1731d
movsd -0x70(%rbp,%r14,8), %xmm0
movsd %xmm0, -0x28(%rbp)
xorl %r15d, %r15d
cmpq $0x4, %r15
je 0x17318
movq %rbx, %rdi
movq %r14, %rsi
callq 0x15754
movq %rax, %rdi
movq %r15, %rsi
callq 0x537c
movsd (%rax), %xmm0
mulsd -0x28(%rbp), %xmm0
mulsd -0x50(%rbp,%r15,8), %xmm0
movsd -0x20(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x20(%rbp)
incq %r15
jmp 0x172d9
incq %r14
jmp 0x172c4
leaq -0x88(%rbp), %rdi
callq 0x100f2
movsd -0x20(%rbp), %xmm0
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/Spline/BivariateBSpline.cpp
// Function: atomicpp::BivariateBSpline::bispeu(std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&, double const&, double const&)
double BivariateBSpline::bispeu(const std::vector<double>& tx,const std::vector<double>& ty,const std::vector<double>& c,const double& x,const double& y){
  // z = bispeu(tx,ty,c,kx,ky,x,y)

  int nx = tx.size();
  int ny = ty.size();
  int kx = 3;
  int ky = 3;

  double z = fpbisp(tx, nx, ty, ny, c, kx, ky, x, y);

  return z;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r14
movq %r8, -0x30(%rbp)
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rsi, %rdi
callq 0x126f4
leaq -0x40(%rbp), %rbx
movl %eax, (%rbx)
movq %r12, %rdi
callq 0x126f4
leaq -0x3c(%rbp), %r8
movl %eax, (%r8)
pushq $0x3
popq %rax
leaq -0x38(%rbp), %rdi
movl %eax, (%rdi)
leaq -0x34(%rbp), %r10
movl %eax, (%r10)
movq %r13, %rsi
movq %rbx, %rdx
movq %r12, %rcx
movq %r15, %r9
pushq %r14
pushq -0x30(%rbp)
pushq %r10
pushq %rdi
callq 0x1c4b0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/Spline/BivariateBSpline.cpp
// Function: atomicpp::BivariateBSpline::fpgivs(double, double&, double&, double&)
void BivariateBSpline::fpgivs(const double piv, double& ww, double& cos, double& sin){
  //  subroutine fpgivs calculates the parameters of a given
  //  transformation .

  double dd;
  if(abs(piv)>=ww){
    dd = abs(piv)*sqrt(1+(ww/piv)*(ww/piv));
  } else {
    dd = ww*sqrt(1+(piv/ww)*(piv/ww));
  }
  cos = ww/dd;
  sin = piv/dd;
  ww = dd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movsd %xmm0, -0x20(%rbp)
callq 0x1c9d1
movapd %xmm0, %xmm1
movsd (%r14), %xmm0
ucomisd %xmm0, %xmm1
jae 0x1be9d
movsd -0x20(%rbp), %xmm1
divsd %xmm0, %xmm1
mulsd %xmm1, %xmm1
addsd 0x5171(%rip), %xmm1     # 0x21008
movapd %xmm0, %xmm2
jmp 0x1bec1
movsd -0x20(%rbp), %xmm0
callq 0x1c9d1
movsd (%r14), %xmm2
movapd %xmm2, %xmm1
divsd -0x20(%rbp), %xmm1
mulsd %xmm1, %xmm1
addsd 0x5147(%rip), %xmm1     # 0x21008
sqrtsd %xmm1, %xmm1
mulsd %xmm0, %xmm1
divsd %xmm1, %xmm2
movsd %xmm2, (%r15)
movsd -0x20(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rbx)
movsd %xmm1, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/Spline/BivariateBSpline.cpp
// Function: atomicpp::BivariateBSpline::fpback(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>> const&, std::vector<double, std::allocator<double>> const&, int, int, std::vector<double, std::allocator<double>>&, int)
void BivariateBSpline::fpback(const std::vector<std::vector<double>>& a, const std::vector<double>& z, const int n, const int k, std::vector<double>& C, const int nest){
  //No shift version of fpback - overloaded

  // std::cout << "fpback called" << std::endl;

  C.at(n-1) = z.at(n-1)/a.at(n-1).at(0);
  
  int i = n-1;
  double store;

  if(i!=0){
    for(int j=2; j <= n; ++j){
      store = z.at(i-1);
      int i1 = k-1;

      if(j <= k-1){
        i1 = j-1;
      }
      int m = i;
      for(int l=1; l <= i1; ++l){
        m = m+1;
        store = store - C.at(m-1)*a.at(i-1).at(l);
      }
      C.at(i-1) = store/a.at(i-1).at(0);
      i -= 1;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %rbx
movl %r8d, -0x34(%rbp)
movq %rdx, %rdi
movq %rsi, %r14
movq %rcx, -0x40(%rbp)
leal -0x1(%rcx), %eax
movslq %eax, %r12
movq %rdx, -0x50(%rbp)
movq %r12, %rsi
callq 0x1c9de
movsd (%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movq %r14, -0x48(%rbp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x1ca00
movq %rax, %rdi
xorl %esi, %esi
callq 0x1c9de
movsd -0x30(%rbp), %xmm0
divsd (%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movq %rbx, %r13
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1c982
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%rax)
testl %r12d, %r12d
je 0x1c1f6
movslq -0x40(%rbp), %r12
decq %r12
pushq $0x2
popq %rbx
cmpl -0x40(%rbp), %ebx
jg 0x1c1f6
leaq -0x1(%r12), %r14
movq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x1c9de
movsd (%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x34(%rbp), %eax
cmpl %eax, %ebx
movl %ebx, -0x38(%rbp)
cmovll %ebx, %eax
movslq %eax, %rbx
xorl %esi, %esi
leaq 0x1(%rsi), %r15
cmpq %rbx, %r15
jge 0x1c1b1
addq %r12, %rsi
movq %r13, %rdi
callq 0x1c982
movsd (%rax), %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0x1ca00
movq %rax, %rdi
movq %r15, %rsi
callq 0x1c9de
movsd -0x58(%rbp), %xmm1
mulsd (%rax), %xmm1
movsd -0x30(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movq %r15, %rsi
jmp 0x1c161
movq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0x1ca00
movq %rax, %rdi
xorl %esi, %esi
callq 0x1c9de
movsd -0x30(%rbp), %xmm0
divsd (%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x1c982
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x38(%rbp), %ebx
incl %ebx
movq %r14, %r12
jmp 0x1c12e
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/RateEquations.cpp
// Function: atomicpp::RateEquations::calculateStoppingTimeConstantFactor(double)
void RateEquations::calculateStoppingTimeConstantFactor(const double coulomb_logarithm){
	//Stangeby "The Plasma Boundary of Magnetic Fusion Devices" (2000), eqn 6.35
	tau_s_ii_CF = ( 1.47e13 * mz * sqrt(1/mi) ) / ( (1 + mi/mz) * coulomb_logarithm );
	//s is 'stopping'
	//ii is 'ion ion'
	//CF stands for 'Constant Factor'
	collision_frequency_s_ii_CF = 1/tau_s_ii_CF;
	//Use the collision frequency instead of the characteristic time, since multiplication is faster than division
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movsd 0x38(%rdi), %xmm2
mulsd 0x5b91(%rip), %xmm2     # 0x24060
movsd 0x2b31(%rip), %xmm3     # 0x21008
movapd %xmm3, %xmm1
divsd 0x48(%rdi), %xmm1
movapd %xmm0, %xmm4
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x1e4f4
sqrtsd %xmm1, %xmm0
jmp 0x1e519
movapd %xmm1, %xmm0
movsd %xmm2, -0x18(%rbp)
movsd %xmm4, -0x10(%rbp)
callq 0x42b0
movsd -0x10(%rbp), %xmm4
movsd 0x2af4(%rip), %xmm3     # 0x21008
movsd -0x18(%rbp), %xmm2
mulsd %xmm0, %xmm2
movsd 0x48(%rbx), %xmm0
divsd 0x38(%rbx), %xmm0
addsd %xmm3, %xmm0
mulsd %xmm4, %xmm0
divsd %xmm0, %xmm2
movsd %xmm2, 0x50(%rbx)
divsd %xmm2, %xmm3
movsd %xmm3, 0x58(%rbx)
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/RateEquations.cpp
// Function: atomicpp::RateEquations::calculateIonIonDragFactor(double, double)
double RateEquations::calculateIonIonDragFactor(const double Ti, const double Ni){
	//Stangeby "The Plasma Boundary of Magnetic Fusion Devices" (2000), eqn 6.35
	double collision_frequency_ii_PF = collision_frequency_s_ii_CF * Ni/(Ti*sqrt(Ti));
	//ii is 'ion ion'
	//PF stands for 'Point Factor' -- i.e. this factor is constant for a single location point at a single time
	return collision_frequency_ii_PF;
	//collision_frequency_s_ii on Impurity^k+ = collision_frequency_ii_PF * k*k where k is the impurity change
}

// Assembly:
mulsd 0x58(%rdi), %xmm1
movapd %xmm0, %xmm2
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
jb 0x1e585
sqrtsd %xmm2, %xmm0
jmp 0x1e5af
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movapd %xmm2, %xmm0
movsd %xmm1, -0x10(%rbp)
movsd %xmm2, -0x8(%rbp)
callq 0x42b0
movsd -0x8(%rbp), %xmm2
movsd -0x10(%rbp), %xmm1
addq $0x10, %rsp
popq %rbp
mulsd %xmm2, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/RateEquations.cpp
// Function: atomicpp::RateEquations::resetDerivatives()
void RateEquations::resetDerivatives(){
	Pcool                    = 0.0;
	Prad                     = 0.0;
	dNe                      = 0.0;
	F_i                      = 0.0;
	dNn                      = 0.0;
	F_n                      = 0.0;
	
	for(int k = 0; k<= Z; ++k){
		dNzk[k] = 0.0;
		F_zk[k] = 0.0;
		dNzk_correction[k] = 0.0;
		F_zk_correction[k] = 0.0;
	};
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x70(%rdi), %rax
movq %rax, -0x30(%rbp)
leaq 0x88(%rdi), %r15
leaq 0xa0(%rdi), %r12
leaq 0xb8(%rdi), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0xd0(%rdi)
movups %xmm0, 0xe0(%rdi)
xorl %r14d, %r14d
movslq 0x34(%rbx), %rax
cmpq %rax, %r14
jg 0x1e801
movq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x537c
andq $0x0, (%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0x537c
andq $0x0, (%rax)
movq %r12, %rdi
movq %r14, %rsi
callq 0x537c
andq $0x0, (%rax)
movq %r13, %rdi
movq %r14, %rsi
callq 0x537c
andq $0x0, (%rax)
incq %r14
jmp 0x1e7b6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/RateEquations.cpp
// Function: atomicpp::RateEquations::calculateIonIonDrag(double, double, double, std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&)
void RateEquations::calculateIonIonDrag(
	const double Ne,
	const double Te,
	const double Vi,
	const std::vector<double>& Nzk,
	const std::vector<double>& Vzk
	){
	
	//Assume that Te = Ti (isothermal), Ne = Ni (quasi-neutrality for Z=1 dominant ion)
	double collision_frequency_ii_PF = calculateIonIonDragFactor(Te, Ne);
	//ii is 'ion ion'
	//PF is 'Point Factor' -- i.e. a constant value shared for this point

	for(int k=1; k <= Z; ++k){//Don't consider the ground state -- not an ion so must be treated separately
		if(Nzk[k] > Nthres){
			double collision_frequency_s_ii = collision_frequency_ii_PF * k*k;
			double IonIonDrag_FF = mz * amu_to_kg * ((Vi+1) - Vzk[k]) * collision_frequency_s_ii;
			F_zk[k] += IonIonDrag_FF; //Calculate the force on the impurity ion due to ion-ion drag
			F_i     -= IonIonDrag_FF; //Calculate the force on the dominant ion due to ion-ion drag
		};
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movsd %xmm2, -0x30(%rbp)
movaps %xmm0, %xmm2
movq %rdi, %r15
movapd %xmm1, %xmm0
movaps %xmm2, %xmm1
callq 0x1e56c
movsd -0x30(%rbp), %xmm1
addsd 0x1121(%rip), %xmm1     # 0x21008
movsd %xmm1, -0x30(%rbp)
movsd %xmm0, -0x40(%rbp)
leaq 0x88(%r15), %r12
pushq $0x1
popq %r13
movslq 0x34(%r15), %rax
cmpq %rax, %r13
jg 0x1ffa7
movq %r14, %rdi
movq %r13, %rsi
callq 0x17efc
movsd (%rax), %xmm0
ucomisd 0x40(%r15), %xmm0
jbe 0x1ff9f
cvtsi2sd %r13d, %xmm0
movsd -0x40(%rbp), %xmm1
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, -0x38(%rbp)
movsd 0x38(%r15), %xmm0
mulsd 0x4133(%rip), %xmm0     # 0x24078
movsd %xmm0, -0x48(%rbp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x17efc
movsd -0x30(%rbp), %xmm0
subsd (%rax), %xmm0
mulsd -0x48(%rbp), %xmm0
mulsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x537c
movsd (%rax), %xmm0
movsd -0x38(%rbp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movsd 0xd8(%r15), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0xd8(%r15)
incq %r13
jmp 0x1fefc
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/RateEquations.cpp
// Function: atomicpp::RateEquations::calculateIonNeutralDrag(double, double, std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&)
void RateEquations::calculateIonNeutralDrag(
	const double Nn,
	const double Vn,
	const std::vector<double>& Nzk,
	const std::vector<double>& Vzk
	){

	// Hard sphere's approximation
	// Radius of Carbon and Hydrogen atoms are ~ 50pm
	// a12 radius = a1+a2 = 100pm = 100e-12 = 1e-10
	// a12^2 = 1e-20
	// The cross-section (from Lieberman & Lichtenberg, 1994, Principles of Plasma Discharges & Materials Processing, eqn 3.1.4) is
	double sigma = M_PI * 1e-20;

	for(int k=0; k <= Z; ++k){//Don't consider the ground state -- not an ion so must be treated separately
		if(Nzk[k] > Nthres){
			double velocity_shear = Vn - Vzk[k];
			double IonNeutralDrag_FF = mz * amu_to_kg * Nn * sigma * (velocity_shear*velocity_shear);
			F_zk[k] += IonNeutralDrag_FF; //Calculate the force on the impurity ion due to ion-neutral drag
			F_n     -= IonNeutralDrag_FF; //Calculate the force on the dominant neutral due to ion-neutral drag
		};
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movsd %xmm1, -0x38(%rbp)
movsd %xmm0, -0x30(%rbp)
movq %rdi, %r15
leaq 0x88(%rdi), %r12
xorl %r13d, %r13d
movslq 0x34(%r15), %rax
cmpq %rax, %r13
jg 0x2007e
movq %r14, %rdi
movq %r13, %rsi
callq 0x17efc
movsd (%rax), %xmm0
ucomisd 0x40(%r15), %xmm0
jbe 0x20076
movq %rbx, %rdi
movq %r13, %rsi
callq 0x17efc
movsd -0x38(%rbp), %xmm1
subsd (%rax), %xmm1
movsd 0x38(%r15), %xmm0
mulsd 0x404e(%rip), %xmm0     # 0x24078
mulsd -0x30(%rbp), %xmm0
mulsd 0x4049(%rip), %xmm0     # 0x24080
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, -0x40(%rbp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x537c
movsd (%rax), %xmm0
movsd -0x40(%rbp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movsd 0xe8(%r15), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0xe8(%r15)
incq %r13
jmp 0x1ffe4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/RateEquations.cpp
// Function: atomicpp::RateEquations::calculateChargeExchangePowerEquation(double, std::vector<double, std::allocator<double>> const&, double, double)
void RateEquations::calculateChargeExchangePowerEquation(
	const double Nn,
	const std::vector<double>& Nzk,
	const double Te,
	const double Ne
	){
	//Calculate the power - doesn't need as high precision since everything is positive
	
	std::shared_ptr<RateCoefficient> cx_power_coefficient = rate_coefficients["cx_power"];
	for(int k=0; k < Z; ++k){
		double cx_power_coefficient_evaluated = cx_power_coefficient->call0D(k, Te, Ne);
		double cx_power_rate = cx_power_coefficient_evaluated * Nn * Nzk[k+1];
		Prad  += cx_power_rate;
		Pcool += cx_power_rate;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movsd %xmm2, -0x40(%rbp)
movsd %xmm1, -0x38(%rbp)
movq %rsi, %rbx
movsd %xmm0, -0x30(%rbp)
movq %rdi, %r14
leaq -0x21(%rbp), %r15
movq %r15, %rdi
callq 0x4540
leaq 0x250c(%rip), %rsi      # 0x227d7
leaq -0x78(%rbp), %rdi
movq %r15, %rdx
callq 0x4160
leaq -0x78(%rbp), %rsi
movq %r14, %rdi
callq 0xcf52
leaq -0x58(%rbp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0xcf48
leaq -0x78(%rbp), %rdi
callq 0x41a0
leaq -0x21(%rbp), %rdi
callq 0x58aa
xorl %r12d, %r12d
movslq 0x34(%r14), %rax
cmpq %rax, %r12
jge 0x2036c
movq %r15, %rdi
callq 0x538e
movq %rax, %rdi
movl %r12d, %esi
movsd -0x38(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
callq 0x10f96
mulsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
incq %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x17efc
movsd -0x48(%rbp), %xmm1
mulsd (%rax), %xmm1
movsd 0x68(%r14), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x68(%r14)
addsd 0x60(%r14), %xmm1
movsd %xmm1, 0x60(%r14)
jmp 0x20307
leaq -0x58(%rbp), %rdi
callq 0x5398
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x41a0
jmp 0x20393
movq %rax, %rbx
leaq -0x21(%rbp), %rdi
callq 0x58aa
jmp 0x203aa
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x5398
movq %rbx, %rdi
callq 0x45a0
// File: /workspace/github_cpp_makefile_star2_O2/TBody[P]atomicpp/atomicpp/RateEquations.cpp
// Function: atomicpp::RateEquations::makeDerivativeStruct()
DerivStruct RateEquations::makeDerivativeStruct(){
	DerivStruct derivative_struct;

	derivative_struct.Pcool = Pcool;
	derivative_struct.Prad  = Prad;
	derivative_struct.dNzk  = dNzk;
	derivative_struct.F_zk  = F_zk;
	derivative_struct.dNe   = dNe;
	derivative_struct.F_i   = F_i;
	derivative_struct.dNn   = dNn;
	derivative_struct.F_n   = F_n;

	return derivative_struct;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2082a
movsd 0x60(%r14), %xmm0
movsd %xmm0, (%rbx)
movsd 0x68(%r14), %xmm0
movsd %xmm0, 0x8(%rbx)
leaq 0x70(%r14), %rsi
leaq 0x10(%rbx), %rdi
callq 0x15448
leaq 0x88(%r14), %rsi
leaq 0x28(%rbx), %rdi
callq 0x15448
movsd 0xd0(%r14), %xmm0
movsd %xmm0, 0x40(%rbx)
movsd 0xd8(%r14), %xmm0
movsd %xmm0, 0x48(%rbx)
movsd 0xe0(%r14), %xmm0
movsd %xmm0, 0x50(%rbx)
movsd 0xe8(%r14), %xmm0
movsd %xmm0, 0x58(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x53e8
movq %r14, %rdi
callq 0x45a0
nop