// File: richardposner[P]BioNetFit2/src/code/Pheromones.cpp
// Function: Pheromones::deserializeSwarmMessage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Pheromones::swarmMessage Pheromones::deserializeSwarmMessage(std::string sm) {


	swarmMessage smessage;

	//char ch = sm.back();
	//cout << "Last character @" << ch << "@" << endl;
	if(sm.empty()){
	//if(ch=='\0')
		//sm.back() = '\n';
    	sm="\n";

	    if (swarm_->options.verbosity>=3) {

			cout << "String empty" << endl;
	    }
	}else{

		//cout << "last character is not empty, erasing" << endl;
		//sm.erase(sm.size()-1);
		//ch = sm.back();
		//cout << "new last character @" << ch << "@"<< endl;
	}


	if (swarm_->options.verbosity>=3) {

		cout << "serializing message start SM: " << sm << endl;
	}

	{
	std::stringstream iss;
	iss.str(sm);
	boost::archive::text_iarchive ia(iss);
	if (swarm_->options.verbosity>=3) {
		cout << "done serializing message" << endl;
	}
	ia >> smessage;
	}
	return smessage;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
movq %rdx, -0x240(%rbp)
movq %rdi, -0x258(%rbp)
movq %rdi, %rax
movq %rax, -0x250(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x248(%rbp)
movb $0x0, -0x19(%rbp)
callq 0xd0800
movq -0x240(%rbp), %rdi
callq 0x2f700
testb $0x1, %al
jne 0xcedc5
jmp 0xcee34
movq -0x240(%rbp), %rdi
leaq 0x10c5dc(%rip), %rsi    # 0x1db3af
callq 0x2f9d0
jmp 0xcedda
movq -0x248(%rbp), %rax
movq 0x50(%rax), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xcee32
movq 0x20615b(%rip), %rdi    # 0x2d4f50
leaq 0x10f8c7(%rip), %rsi    # 0x1de6c3
callq 0x2ff50
movq %rax, -0x260(%rbp)
jmp 0xcee0a
movq -0x260(%rbp), %rdi
movq 0x2061b0(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xcee1f
jmp 0xcee32
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xcefa5
jmp 0xcee36
jmp 0xcee36
movq -0x248(%rbp), %rax
movq 0x50(%rax), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xcee99
movq 0x2060ff(%rip), %rdi    # 0x2d4f50
leaq 0x10f878(%rip), %rsi    # 0x1de6d0
callq 0x2ff50
movq %rax, -0x268(%rbp)
jmp 0xcee66
movq -0x240(%rbp), %rsi
movq -0x268(%rbp), %rdi
callq 0x2f780
movq %rax, -0x270(%rbp)
jmp 0xcee82
movq -0x270(%rbp), %rdi
movq 0x206138(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xcee97
jmp 0xcee99
leaq -0x1b8(%rbp), %rdi
callq 0x2f790
jmp 0xceea7
movq -0x240(%rbp), %rsi
leaq -0x1b8(%rbp), %rdi
callq 0x30140
jmp 0xceebc
leaq -0x238(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
xorl %edx, %edx
callq 0xb3890
jmp 0xceed3
movq -0x248(%rbp), %rax
movq 0x50(%rax), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xcef42
movq 0x206062(%rip), %rdi    # 0x2d4f50
leaq 0x10f7fa(%rip), %rsi    # 0x1de6ef
callq 0x2ff50
movq %rax, -0x278(%rbp)
jmp 0xcef03
movq -0x278(%rbp), %rdi
movq 0x2060b7(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xcef18
jmp 0xcef42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xcef7b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x238(%rbp), %rdi
callq 0xb39f0
jmp 0xcef7b
movq -0x258(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0xd10d0
jmp 0xcef57
leaq -0x238(%rbp), %rdi
callq 0xb39f0
leaq -0x1b8(%rbp), %rdi
callq 0x2f940
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0xcef95
jmp 0xcef89
leaq -0x1b8(%rbp), %rdi
callq 0x2f940
jmp 0xcefa5
movq -0x258(%rbp), %rdi
callq 0xc1f00
movq -0x250(%rbp), %rax
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
movq -0x258(%rbp), %rdi
callq 0xc1f00
movq -0x28(%rbp), %rdi
callq 0x30170
nopw (%rax,%rax)