// File: /workspace/github_cpp_makefile_star2_O1/nwieder[P]SSTS/src/System/Gillespie_Sys.cpp
// Function: nw::Gillespie_Sys::system_output()
inline void Gillespie_Sys::system_output(){
//	print system state with a fixed time step dt (recording interval)
	if (rec_time >= rec_interval){
//			run through output voxel vector
			for(size_t k = 0; k < ovid.size(); ++k){
//				run through output species id vector
				for(size_t i = 0; i < osid.size(); ++i){
					data_output_file<<	vxl_vec->at(ovid[k])->get_state_vec()
										->at(osid[i])->get_n_molecules() << ",";
				}
			}
		if (this->output_mode == 2){
			data_output_file << curr_time << ",";
		}
		opcntr++;
		rec_time -= rec_interval;
	}

//	check if the channel state changed and if so log the open and close times
	if(	vxl_vec->at(0)->get_state_vec()->at(vxl_vec->at(0)
		->get_state_vec()->size()-1)->get_n_molecules() != channel_state){
//		update current channel state
		channel_state = vxl_vec->at(0)->get_state_vec()->at(vxl_vec->at(0)
						->get_state_vec()->size() - 1)->get_n_molecules();
//		write current system time to oc_log.e
		oc_log_file << curr_time << ",";
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movsd 0x40(%rdi), %xmm0
ucomisd 0x30(%rdi), %xmm0
jb 0xf9be
movq 0xee0(%rbx), %rax
cmpq 0xed8(%rbx), %rax
je 0xf97f
leaq 0x690(%rbx), %r14
xorl %r12d, %r12d
leaq 0x14b39(%rip), %r15     # 0x243f4
movq 0xec0(%rbx), %rax
cmpq %rax, 0xec8(%rbx)
je 0xf961
xorl %r13d, %r13d
movq 0xed8(%rbx), %rcx
movq 0xef8(%rbx), %rdx
movq (%rcx,%r12,8), %rsi
movq (%rdx), %rcx
movq 0x8(%rdx), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rsi, %rdx
jbe 0xfa86
movq (%rcx,%rsi,8), %rcx
movq (%rax,%r13,8), %rsi
movq 0x28(%rcx), %rax
movq 0x30(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rsi, %rdx
jbe 0xfa86
movq (%rax,%rsi,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x4270
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x42f0
incq %r13
movq 0xec0(%rbx), %rax
movq 0xec8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r13
jb 0xf8d2
incq %r12
movq 0xee0(%rbx), %rax
subq 0xed8(%rbx), %rax
sarq $0x3, %rax
cmpq %rax, %r12
jb 0xf8bb
cmpq $0x2, 0x8(%rbx)
jne 0xf9ab
leaq 0x690(%rbx), %rdi
movsd 0x38(%rbx), %xmm0
callq 0x4480
leaq 0x14a56(%rip), %rsi     # 0x243f4
movl $0x1, %edx
movq %rax, %rdi
callq 0x42f0
incq 0x18(%rbx)
movsd 0x40(%rbx), %xmm0
subsd 0x30(%rbx), %xmm0
movsd %xmm0, 0x40(%rbx)
movq 0xef8(%rbx), %rcx
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0xfa75
movq (%rax), %rcx
movq 0x28(%rcx), %rax
movq 0x30(%rcx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rax, %rcx
je 0xfa82
movq -0x8(%rax,%rdx,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
cmpq 0x20(%rbx), %rax
jne 0xfa0b
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0xef8(%rbx), %rcx
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0xfa75
movq (%rax), %rcx
movq 0x28(%rcx), %rax
movq 0x30(%rcx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rax, %rcx
je 0xfa82
movq -0x8(%rax,%rdx,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, 0x20(%rbx)
movsd 0x38(%rbx), %xmm0
addq $0xa90, %rbx            # imm = 0xA90
movq %rbx, %rdi
callq 0x4480
leaq 0x14995(%rip), %rsi     # 0x243f4
movl $0x1, %edx
movq %rax, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x42f0
leaq 0x145c7(%rip), %rdi     # 0x24043
xorl %esi, %esi
xorl %edx, %edx
jmp 0xfa8d
leaq -0x1(%rdx), %rsi
leaq 0x145b6(%rip), %rdi     # 0x24043
xorl %eax, %eax
callq 0x4430