// File: /workspace/github_cpp_makefile_star2_O3/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 0xfe14
movq 0xed8(%rbx), %rcx
movq 0xee0(%rbx), %rdx
cmpq %rcx, %rdx
je 0xfdd5
leaq 0x690(%rbx), %r14
movq 0xec0(%rbx), %rax
movq 0xec8(%rbx), %rsi
xorl %r12d, %r12d
leaq 0x14706(%rip), %r15     # 0x24414
cmpq %rax, %rsi
je 0xfdbc
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 0xfedc
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 0xfedc
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), %rsi
movq %rsi, %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r13
jb 0xfd1a
movq 0xed8(%rbx), %rcx
movq 0xee0(%rbx), %rdx
jmp 0xfdbf
movq %rax, %rsi
incq %r12
movq %rdx, %rdi
subq %rcx, %rdi
sarq $0x3, %rdi
cmpq %rdi, %r12
jb 0xfd0e
cmpq $0x2, 0x8(%rbx)
jne 0xfe01
leaq 0x690(%rbx), %rdi
movsd 0x38(%rbx), %xmm0
callq 0x4480
leaq 0x14620(%rip), %rsi     # 0x24414
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 0xfecb
movq (%rax), %rcx
movq 0x28(%rcx), %rax
movq 0x30(%rcx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rax, %rcx
je 0xfed8
movq -0x8(%rax,%rdx,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
cmpq 0x20(%rbx), %rax
jne 0xfe61
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0xef8(%rbx), %rcx
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0xfecb
movq (%rax), %rcx
movq 0x28(%rcx), %rax
movq 0x30(%rcx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rax, %rcx
je 0xfed8
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 0x1455f(%rip), %rsi     # 0x24414
movl $0x1, %edx
movq %rax, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x42f0
leaq 0x14171(%rip), %rdi     # 0x24043
xorl %esi, %esi
xorl %edx, %edx
jmp 0xfee3
leaq -0x1(%rdx), %rsi
leaq 0x14160(%rip), %rdi     # 0x24043
xorl %eax, %eax
callq 0x4430