// File: richardposner[P]BioNetFit2/src/code/Utils.cpp
// Function: trim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, bool)
std::string trim(std::string str, bool ltrim, bool rtrim){
	std::string s =str;
	if(ltrim)  //trim from left
		s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
	if(rtrim)  //trim from right
		 s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end());
//cout<<"string: "<<str <<" len["<< str.size() <<"]is trimed to: "<<s<<" len["<< s.size()<<"]\n.";
	return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0xd0(%rbp)
movb %cl, %al
movb %dl, %cl
movq %rdi, %rdx
movq %rdx, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %cl
movb %cl, -0x11(%rbp)
andb $0x1, %al
movb %al, -0x12(%rbp)
movb $0x0, -0x13(%rbp)
callq 0x2f300
testb $0x1, -0x11(%rbp)
je 0x17d249
movq -0xd0(%rbp), %rdi
callq 0x2fbf0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x68bb0
movq -0xd0(%rbp), %rdi
callq 0x2fbf0
movq -0xd0(%rbp), %rdi
movq %rax, -0x40(%rbp)
callq 0x2fde0
movq %rax, -0x48(%rbp)
movq 0x157dee(%rip), %rdi    # 0x2d4f88
callq 0x17e6f0
movq %rax, -0xd8(%rbp)
jmp 0x17d1a8
movq -0xd8(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x17e6c0
movq %rax, -0xe0(%rbp)
jmp 0x17d1c5
movq -0xe0(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x17e660
movq %rax, -0xe8(%rbp)
jmp 0x17d1ea
movq -0xe8(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x68bb0
movq -0xd0(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x2fb00
movq %rax, -0xf0(%rbp)
jmp 0x17d21f
movq -0xf0(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x17d249
movq -0xd0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
callq 0x311e8
jmp 0x17d389
testb $0x1, -0x12(%rbp)
je 0x17d363
movq -0xd0(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x30f10
movq -0xd0(%rbp), %rsi
leaq -0x98(%rbp), %rdi
callq 0x309b0
movq 0x157d08(%rip), %rdi    # 0x2d4f88
callq 0x17e6f0
movq %rax, -0xf8(%rbp)
jmp 0x17d28e
movq -0xf8(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x17e6c0
movq %rax, -0x100(%rbp)
jmp 0x17d2b1
movq -0x100(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rcx
leaq -0x88(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x17e720
jmp 0x17d2e2
leaq -0x88(%rbp), %rdi
callq 0x17e7a0
movq %rax, -0x108(%rbp)
jmp 0x17d2f7
movq -0x108(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x68bb0
movq -0xd0(%rbp), %rdi
callq 0x2fde0
movq %rax, -0xb8(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x68bb0
movq -0xd0(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0xb0(%rbp), %rdx
callq 0x2fb00
movq %rax, -0x110(%rbp)
jmp 0x17d355
movq -0x110(%rbp), %rax
movq %rax, -0xc0(%rbp)
movb $0x1, -0x13(%rbp)
testb $0x1, -0x13(%rbp)
jne 0x17d379
movq -0xd0(%rbp), %rdi
callq 0x311e8
movq -0xc8(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x30170
nopw %cs:(%rax,%rax)