// File: /workspace/github_cpp_makefile_star2_O2/richardposner[P]BioNetFit2/src/code/Swarm.cpp
// Function: Swarm::setModels(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
void Swarm::setModels(std::string pathPrefix, std::string path, bool overwrite){
	std::vector<string> paths;
	fs::path prefix(pathPrefix);

	if(overwrite)
		this->options.models.clear();

	if  (options.verbosity >= 3) cout<<"Swarm::setModels:  processing model files:"<<path<<endl;
	paths = split_string(path, ",");
	for(unsigned int i=0; i< paths.size(); ++i){
		fs::path path(paths.at(i));
		fs::path abspath = path;
		
		if (!fs::exists(path.string())){
		                abspath = prefix / path;
		}

		setModel(abspath.string(), i, overwrite);
		if (options.verbosity >=3) cout<<"Model["<<i<<"]  :"<<paths.at(i)<<" is added to the list of models.\n" << endl;
	}
	check_model_consistency(options.models);
	//this->options.model = this->options.models.at(0); //set the first model as the basic model for backward comaptibility
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movl %ecx, %ebx
movq %rdx, %r14
movq %rdi, (%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x28dd0
testb %bl, %bl
movq (%rsp), %rcx
je 0x6b596
movq 0x15c0(%rcx), %rax
cmpq %rax, 0x15c8(%rcx)
je 0x6b596
movq %rax, 0x15c8(%rcx)
cmpl $0x3, 0x1614(%rcx)
jb 0x6b5c5
movq 0xfa9f2(%rip), %rdi     # 0x165f98
leaq 0x7122f(%rip), %rsi     # 0xdc7dc
callq 0x289f0
movq %rax, %rdi
movq %r14, %rsi
callq 0x28910
movq %rax, %rdi
callq 0x284a0
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
callq 0x28dd0
leaq 0x6a737(%rip), %rsi     # 0xd5d10
leaq 0x48(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
callq 0x33402
leaq 0xc8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x9e9d4
leaq 0x10(%rsp), %rdi
leaq 0xc8(%rsp), %r15
movq %r15, %rsi
callq 0x6230a
movq %r15, %rdi
callq 0x3355a
leaq 0x48(%rsp), %rdi
callq 0x295a0
leaq 0x68(%rsp), %rdi
callq 0x295a0
xorl %r12d, %r12d
leaq 0xa8(%rsp), %r13
leaq 0x108(%rsp), %rbp
leaq 0xe8(%rsp), %r14
movzbl %bl, %eax
movl %eax, 0xc(%rsp)
movl %r12d, %r12d
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0x6b782
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x85e18
movq %r15, %rdi
movq %rax, %rsi
callq 0x28dd0
movq %r13, %rdi
movq %r15, %rsi
callq 0x28dd0
movq %rbp, %rdi
movq %r15, %rsi
callq 0x28dd0
movq %rbp, %rdi
callq 0x85e39
movl %eax, %ebx
movq %rbp, %rdi
callq 0x295a0
testb %bl, %bl
jne 0x6b6d9
movq %rbp, %rdi
leaq 0x88(%rsp), %rsi
movq %r15, %rdx
callq 0x33467
movq %r13, %rdi
movq %rbp, %rsi
callq 0x28c40
movq %rbp, %rdi
callq 0x295a0
movq %r14, %rdi
movq %r13, %rsi
callq 0x28dd0
movq (%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movl %r12d, %edx
movl 0xc(%rsp), %ecx
callq 0x6b86e
movq %r14, %rdi
callq 0x295a0
cmpl $0x3, 0x1614(%rbx)
jb 0x6b76a
movq 0xfa886(%rip), %rdi     # 0x165f98
leaq 0x71111(%rip), %rsi     # 0xdc82a
callq 0x289f0
movq %rax, %rdi
movq %r12, %rsi
callq 0x286e0
movq %rax, %rdi
leaq 0x70ffa(%rip), %rsi     # 0xdc72d
callq 0x289f0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x85e18
movq %rbx, %rdi
movq %rax, %rsi
callq 0x28910
movq %rax, %rdi
leaq 0x710aa(%rip), %rsi     # 0xdc807
callq 0x289f0
movq %rax, %rdi
callq 0x284a0
movq %r13, %rdi
callq 0x295a0
movq %r15, %rdi
callq 0x295a0
incl %r12d
jmp 0x6b655
movq (%rsp), %rsi
addq $0x15c0, %rsi           # imm = 0x15C0
leaq 0x30(%rsp), %rdi
callq 0x85eaa
leaq 0x30(%rsp), %rdi
callq 0x4e4ca
leaq 0x30(%rsp), %rdi
callq 0x5b3b4
leaq 0x88(%rsp), %rdi
callq 0x295a0
leaq 0x10(%rsp), %rdi
callq 0x3355a
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x5b3b4
jmp 0x6b84f
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x295a0
jmp 0x6b7f5
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x6b84a
jmp 0x6b82d
movq %rax, %rbx
jmp 0x6b85c
jmp 0x6b82d
jmp 0x6b832
movq %rax, %rbx
jmp 0x6b842
jmp 0x6b832
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
jmp 0x6b826
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x295a0
jmp 0x6b835
movq %rax, %rbx
jmp 0x6b84f
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x295a0
leaq 0xc8(%rsp), %rdi
callq 0x295a0
leaq 0x88(%rsp), %rdi
callq 0x295a0
leaq 0x10(%rsp), %rdi
callq 0x3355a
movq %rbx, %rdi
callq 0x292f0