// File: /workspace/github_cpp_makefile_star2_O1/richardposner[P]BioNetFit2/src/code/Utils.cpp
// Function: readCommandLine(int, char const**, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>>&)
int readCommandLine(int argc, const char *argv[], map<string,vector<string> > &cmdLine){  //razi added
	int i, j=0; string sw; string temp;
	string s;
	for (i=1; i<argc; i++){
		s=argv[i];
		//cout<<"reading command line str["<<i<<"] = "<<s<<endl;
		if (s.substr(0,1).compare("-")==0){  //a new switch is found
			sw=s.substr(1,s.size()-1);
			if (sw.empty()){
				cout<<"Invalid switch:"<< s  <<"  value not specified, quitting .... "<<endl;
				return 0;
			}else{ //now read the options
				//cout<<"switch found:-"<<sw<<endl;

				vector<string> options; options.clear();
				j=1; bool exitflag=false;
				while(!exitflag){
					if ((i+j) < argc){
						temp = argv[i+j];
						//cout<<"checking options["<<j<<"]=" << temp << endl;
						if  (temp.substr(0,1).compare("-")==0){
							//cout<<"This is not an option, it is a new switch, i set to:"<<i+j<< endl;
							i=i+j-1;  //move the pointer to the new switch
							exitflag=true;
						}
						else{  //a valid option
							//cout<<"Option found: "<<argv[i+j]<<"   added to the list of options"<<endl;
							options.push_back(argv[i+j]);
							j++;  //collect other options
						}
					}else{
						//cout<<"Command line reading finished, reached the end while reading the options i+j:"<<i+j<<endl;
						i=i+j-1;  //move the pointer to the new switch
						exitflag=true;
					}
				}
				//if (options.size()>0), cout<<"# "<<options.size() <<"Options were found and added to the list"<<endl;
				cmdLine[sw]=options;
			}
		}else{
			cout<<"invalid format for switch:"<<s<<" Expecting to start with -, quitting .... "<<endl;
			return 0;
		}
	}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdx, 0xc0(%rsp)
movq %rsi, 0x28(%rsp)
leaq 0x70(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0xb0(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x48(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movl $0x1, %ebx
movl %edi, 0x4(%rsp)
cmpl $0x2, %edi
jl 0xbfeff
movl $0x1, %r15d
leaq 0x38(%rsp), %rbx
leaq 0x60(%rsp), %r12
movq %r15, %rbp
movslq %r15d, %rax
movq 0x28(%rsp), %rcx
movq (%rcx,%rax,8), %r15
movq 0x40(%rsp), %r13
movq %r15, %rdi
callq 0x223a0
movq %rbx, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x22fb0
movl $0x1, %ecx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x22a00
movq %r14, %rdi
leaq 0x41a98(%rip), %rsi     # 0x10169a
callq 0x22250
movl %eax, %r15d
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xbfc26
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
testl %r15d, %r15d
jne 0xbfe36
movq 0x40(%rsp), %rcx
decq %rcx
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x22a00
movq %r12, %rdi
movq %r14, %rsi
callq 0x22bb0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
movq %rbp, %r15
je 0xbfc71
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
cmpq $0x0, 0x68(%rsp)
je 0xbfe91
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movq $0x0, 0x90(%rsp)
movq 0x88(%rsp), %rbx
testq %rbx, %rbx
je 0xbfcd7
movl $0x10, %r14d
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0xbfcbb
movq (%r14), %rsi
incq %rsi
callq 0x229c0
leaq 0x20(%r14), %rax
addq $0x10, %r14
cmpq %rbx, %r14
movq %rax, %r14
jne 0xbfca7
movq $0x0, 0x88(%rsp)
movl $0x1, %eax
xorl %ecx, %ecx
leal (%rax,%r15), %ebp
cmpl 0x4(%rsp), %ebp
jge 0xbfdcb
movl %ecx, 0x34(%rsp)
movq %rax, 0x58(%rsp)
movq %r15, %r14
movslq %ebp, %rbx
movq 0x28(%rsp), %rax
movq (%rax,%rbx,8), %r15
movq 0xa8(%rsp), %r13
movq %r15, %rdi
callq 0x223a0
leaq 0xa0(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x22fb0
movl $0x1, %ecx
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x22a00
movq %r13, %rdi
leaq 0x4194a(%rip), %rsi     # 0x10169a
callq 0x22250
movl %eax, %r15d
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xbfd74
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
testl %r15d, %r15d
je 0xbfdd4
movq 0x28(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movq %r13, %rdi
leaq 0x3(%rsp), %rdx
callq 0x31a60
leaq 0x80(%rsp), %rdi
movq %r13, %rsi
callq 0x6a77e
movq %r14, %r15
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xbfdbe
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x58(%rsp), %rax
incl %eax
movl 0x34(%rsp), %ecx
jmp 0xbfde0
decl %ebp
movb $0x1, %cl
movl %ebp, %r15d
jmp 0xbfde0
decl %ebp
movb $0x1, %cl
movl %ebp, %r15d
movq 0x58(%rsp), %rax
testb $0x1, %cl
je 0xbfcde
movq 0xc0(%rsp), %rdi
leaq 0x60(%rsp), %r12
movq %r12, %rsi
callq 0xc0500
leaq 0x80(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x31e38
movq %rbx, %rdi
callq 0x31a9e
incl %r15d
cmpl 0x4(%rsp), %r15d
leaq 0x38(%rsp), %rbx
jl 0xbfbb2
movl $0x1, %ebx
jmp 0xbfeff
movq 0xb6153(%rip), %rdi     # 0x175f90
leaq 0x62081(%rip), %rsi     # 0x121ec5
movl $0x1a, %edx
callq 0x22ab0
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0xb6131(%rip), %rdi     # 0x175f90
callq 0x22ab0
movq %rax, %rbx
leaq 0x62072(%rip), %rsi     # 0x121ee0
movl $0x2a, %edx
movq %rax, %rdi
callq 0x22ab0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x22940
jmp 0xbfeea
movq 0xb60f8(%rip), %rdi     # 0x175f90
leaq 0x61ff0(%rip), %rsi     # 0x121e8f
movl $0xf, %edx
callq 0x22ab0
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0xb60d6(%rip), %rdi     # 0x175f90
callq 0x22ab0
movq %rax, %rbx
leaq 0x61fd6(%rip), %rsi     # 0x121e9f
movl $0x25, %edx
movq %rax, %rdi
callq 0x22ab0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %rbx, %rdi
callq 0x22050
xorl %ebx, %ebx
movq %rax, %rdi
callq 0x22660
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0xbff1b
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0xbff40
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xbff5c
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x229c0
movl %ebx, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xbff76
jmp 0xbff76
jmp 0xbff76
movq %rax, %rbx
jmp 0xbffb2
jmp 0xbffa2
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xbffa5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0xbffa5
jmp 0xbffa2
jmp 0xbffa2
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x31a9e
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0xbffce
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0xbfff3
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xc000f
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x229c0
movq %rbx, %rdi
callq 0x23240