// File: 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
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdx, -0x198(%rbp)
movq %rsi, -0x188(%rbp)
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x190(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x448b0
movq -0x188(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x43ef0
jmp 0xeb922
testb $0x1, -0x19(%rbp)
je 0xeb955
movq -0x190(%rbp), %rdi
addq $0x14c0, %rdi           # imm = 0x14C0
addq $0x100, %rdi            # imm = 0x100
callq 0xb2070
jmp 0xeb955
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xebdf3
movq -0x190(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xeb9c5
movq 0x1e95e4(%rip), %rdi    # 0x2d4f50
leaq 0xf57d9(%rip), %rsi     # 0x1e114c
callq 0x2ff50
movq %rax, -0x1a0(%rbp)
jmp 0xeb981
movq -0x198(%rbp), %rsi
movq -0x1a0(%rbp), %rdi
callq 0x2f780
movq %rax, -0x1a8(%rbp)
jmp 0xeb99d
movq -0x1a8(%rbp), %rdi
movq 0x1e961d(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xeb9b2
jmp 0xeb9c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xebdea
movq -0x198(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x2f300
jmp 0xeb9da
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x30a70
movq -0x1b0(%rbp), %rdx
leaq 0xeec15(%rip), %rsi     # 0x1da610
leaq -0xc0(%rbp), %rdi
callq 0x44470
jmp 0xeba09
leaq -0x80(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
callq 0x17ce70
jmp 0xeba22
leaq -0x38(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xd1b80
leaq -0x80(%rbp), %rdi
callq 0x448d0
leaq -0xc0(%rbp), %rdi
callq 0x311e8
leaq -0xc1(%rbp), %rdi
callq 0x311c0
leaq -0xa0(%rbp), %rdi
callq 0x311e8
movl $0x0, -0xc8(%rbp)
movl -0xc8(%rbp), %eax
movq %rax, -0x1b8(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x44960
movq %rax, %rcx
movq -0x1b8(%rbp), %rax
cmpq %rcx, %rax
jae 0xebd81
movl -0xc8(%rbp), %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x1216f0
movq %rax, -0x1c0(%rbp)
jmp 0xebaa9
movq -0x1c0(%rbp), %rsi
leaq -0xe8(%rbp), %rdi
callq 0x43ef0
jmp 0xebabe
leaq -0x108(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x4c010
jmp 0xebad3
leaq -0xe8(%rbp), %rdi
callq 0x44560
movq %rax, -0x1c8(%rbp)
jmp 0xebae8
movq -0x1c8(%rbp), %rsi
leaq -0x128(%rbp), %rdi
callq 0x121760
jmp 0xebafd
leaq -0x128(%rbp), %rdi
callq 0x121730
movb %al, -0x1c9(%rbp)
jmp 0xebb11
movb -0x1c9(%rbp), %al
xorb $-0x1, %al
movb %al, -0x1ca(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x44570
movb -0x1ca(%rbp), %al
testb $0x1, %al
jne 0xebb3a
jmp 0xebbf9
leaq -0x148(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0xe8(%rbp), %rdx
callq 0x44600
jmp 0xebb53
leaq -0x108(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x121790
leaq -0x148(%rbp), %rdi
callq 0x44570
jmp 0xebbf9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xebb9d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x311e8
leaq -0xc1(%rbp), %rdi
callq 0x311c0
leaq -0xa0(%rbp), %rdi
callq 0x311e8
jmp 0xebdea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xebd73
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xebd67
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x44570
jmp 0xebd67
leaq -0x108(%rbp), %rdi
callq 0x44560
movq %rax, -0x1d8(%rbp)
jmp 0xebc0e
movq -0x1d8(%rbp), %rsi
leaq -0x168(%rbp), %rdi
callq 0x2f300
jmp 0xebc23
movq -0x190(%rbp), %rdi
movl -0xc8(%rbp), %edx
movzbl -0x19(%rbp), %ecx
andl $0x1, %ecx
leaq -0x168(%rbp), %rsi
callq 0xebe10
jmp 0xebc45
leaq -0x168(%rbp), %rdi
callq 0x311e8
movq -0x190(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xebd3b
movq 0x1e92e4(%rip), %rdi    # 0x2d4f50
leaq 0xf5527(%rip), %rsi     # 0x1e119a
callq 0x2ff50
movq %rax, -0x1e0(%rbp)
jmp 0xebc81
movq -0x1e0(%rbp), %rdi
movl -0xc8(%rbp), %esi
callq 0x30640
movq %rax, -0x1e8(%rbp)
jmp 0xebc9c
movq -0x1e8(%rbp), %rdi
leaq 0xf53f3(%rip), %rsi     # 0x1e109d
callq 0x2ff50
movq %rax, -0x1f0(%rbp)
jmp 0xebcb8
movl -0xc8(%rbp), %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x1216f0
movq %rax, -0x1f8(%rbp)
jmp 0xebcd2
movq -0x1f8(%rbp), %rsi
movq -0x1f0(%rbp), %rdi
callq 0x2f780
movq %rax, -0x200(%rbp)
jmp 0xebcee
movq -0x200(%rbp), %rdi
leaq 0xf547b(%rip), %rsi     # 0x1e1177
callq 0x2ff50
movq %rax, -0x208(%rbp)
jmp 0xebd0a
movq -0x208(%rbp), %rdi
movq 0x1e92b0(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xebd1f
jmp 0xebd3b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x311e8
jmp 0xebd67
leaq -0x108(%rbp), %rdi
callq 0x44570
leaq -0xe8(%rbp), %rdi
callq 0x44570
movl -0xc8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc8(%rbp)
jmp 0xeba66
leaq -0x108(%rbp), %rdi
callq 0x44570
leaq -0xe8(%rbp), %rdi
callq 0x44570
jmp 0xebdea
movq -0x190(%rbp), %rsi
addq $0x15c0, %rsi           # imm = 0x15C0
leaq -0x180(%rbp), %rdi
callq 0x121940
jmp 0xebd9d
leaq -0x180(%rbp), %rdi
callq 0x9bfd0
jmp 0xebdab
leaq -0x180(%rbp), %rdi
callq 0xb23a0
leaq -0x58(%rbp), %rdi
callq 0x44570
leaq -0x38(%rbp), %rdi
callq 0x448d0
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x180(%rbp), %rdi
callq 0xb23a0
leaq -0x58(%rbp), %rdi
callq 0x44570
leaq -0x38(%rbp), %rdi
callq 0x448d0
movq -0x60(%rbp), %rdi
callq 0x30170
nopw %cs:(%rax,%rax)