// File: /workspace/github_cpp_makefile_star2_O2/nwieder[P]SSTS/src/Input/Standard_Ipt.cpp
// Function: nw::Standard_Ipt::alloc_Events()
void Standard_Ipt::alloc_Events(){
	cout << "alloc Events... ";

//	create Reaction Event Voxel Vector
	vector<_Voxel*> re_vvc = vvc; 	// reaction event voxel vector
	re_vvc.pop_back();				// doesn't contain the border voxel!

//	add all Reaction Events to the Event vector
	for (long i = 0; i < (long)xgd.xml_rct_evt_list.size(); i++){
		xml_Rct_Evt* cxe = xgd.xml_rct_evt_list[i];
		_Event* tre = 	new Reaction_Evt(cxe->xml_id, cxe->xml_name, cxe->xml_k,
						build_sc_vector(cxe), build_vxl_vec(cxe), rg);
		evc.push_back(tre);
	}

//	add all Subunit Switch Reaction Events to the Event vector
	for (long i = 0; i < (long)xgd.xml_suSwitch_rct_evt_list.size(); i++){
		xml_SuSwitch_Rct_Evt* cxe = xgd.xml_suSwitch_rct_evt_list[i];
		_Event* tsusre = 	new SubUnitSwitch_Rct_Evt(cxe->xml_id, cxe->xml_name, cxe->xml_k,
							build_sc_vector(cxe), cxe->xml_actSu_id, cxe->xml_channel_id,
							build_vxl_vec(cxe), rg);
		evc.push_back(tsusre);
	}

//	add all Channel Flux Reaction Events to the Event vector
	for (long i = 0; i < (long)xgd.xml_chFlux_rct_evt_list.size(); i++){
		xml_ChFlux_Rct_Evt* cxe = xgd.xml_chFlux_rct_evt_list[i];
		_Event* tcre = 	new ChFlux_Rct_Evt(cxe->xml_id, cxe->xml_name, cxe->xml_k,
						build_sc_vector(cxe), cxe->xml_channel_id, build_vxl_vec(cxe), rg);
		evc.push_back(tcre);
	}

//	add all Diffusion Events to the Event vector
	for (long i = 0; i < (long)xgd.xml_dif_evt_list.size(); i++){
		xml_Dif_Evt* cxe = xgd.xml_dif_evt_list[i];
		_Event* tde =	new Diffusion_Evt(cxe->xml_id, cxe->xml_name, cxe->xml_k,
						build_vxl_vec(cxe), cxe->xml_diff_spc,rg);
		evc.push_back(tde);
	}

//	output
	info_path << "*** State change vectors ***" << endl;
	for (long i = 0; i < (long)evc.size(); i++){
		info_path<< evc.at(i)->get_id() << " :" << evc.at(i)->get_name() << " sc_vec: \t";
		for (int j = 0; j < (int)evc.at(i)->get_sc_vec().size(); j++)
			info_path<< evc.at(i)->get_sc_vec().at(j) << "," ;
		info_path<< endl;
	}

	cout << "DONE" << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, %r14
movq 0x26a61(%rip), %rdi     # 0x2efc8
leaq 0x16156(%rip), %rsi     # 0x1e6c4
callq 0x4240
leaq 0x468(%r14), %rsi
leaq 0x98(%rsp), %rbx
movq %rbx, %rdi
callq 0x92fa
addq $-0x8, 0x8(%rbx)
movq %r14, 0x28(%rsp)
addq $0x450, %r14            # imm = 0x450
xorl %r15d, %r15d
leaq 0x188(%rsp), %rbp
leaq 0x110(%rsp), %rbx
leaq 0xf8(%rsp), %r12
movq 0x28(%rsp), %rcx
movq 0xc8(%rcx), %rax
movq 0xd0(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r15
jge 0x86a6
movq (%rax,%r15,8), %r13
movq %r13, 0x40(%rsp)
movl $0xb8, %edi
callq 0x4260
movq %rax, 0x8(%rsp)
movq %r15, 0x30(%rsp)
movq (%r13), %rax
movq %rax, 0x18(%rsp)
leaq 0x8(%r13), %rsi
movq %rbp, %r15
movq %rbp, %rdi
callq 0x4380
movsd 0x28(%r13), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
movq 0x28(%rsp), %rbp
movq %rbp, %rsi
leaq 0x40(%rsp), %rdx
callq 0x8ce6
movq %r13, 0x38(%rsp)
movq %r12, %rdi
movq %rbp, %rsi
leaq 0x38(%rsp), %rdx
callq 0x8dc2
movq 0x448(%rbp), %r9
movq 0x8(%rsp), %r13
movq %r13, %rdi
movq 0x18(%rsp), %rsi
movq %r15, %rbp
movq %r15, %rdx
movsd 0x10(%rsp), %xmm0
movq %rbx, %rcx
movq %r12, %r8
callq 0x9348
movq %r12, %rdi
callq 0xa324
movq %rbx, %rdi
callq 0x4b54
movq %rbp, %rdi
callq 0x4568
movq %r13, 0x20(%rsp)
movq %r14, %rdi
leaq 0x20(%rsp), %rsi
callq 0x942e
movq 0x30(%rsp), %r15
incq %r15
jmp 0x85b6
xorl %edx, %edx
leaq 0x168(%rsp), %rbx
leaq 0xe0(%rsp), %r13
movq 0x28(%rsp), %r12
movq 0xf8(%r12), %rax
movq 0x100(%r12), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rdx
jge 0x87c5
movq %rdx, 0x10(%rsp)
movq (%rax,%rdx,8), %rbp
movl $0xd0, %edi
callq 0x4260
movq %rax, 0x8(%rsp)
movq (%rbp), %rax
movq %rax, 0x18(%rsp)
leaq 0x8(%rbp), %rsi
movq %rbx, %rdi
callq 0x4380
movsd 0x28(%rbp), %xmm0
movsd %xmm0, 0x30(%rsp)
movq %rbp, 0x20(%rsp)
movq %r13, %rdi
movq %r12, %rsi
leaq 0x20(%rsp), %rdx
callq 0x8ce6
movq 0x78(%rbp), %r15
movq 0x80(%rbp), %rax
movq %rax, 0x60(%rsp)
movq %rbp, 0x38(%rsp)
leaq 0x80(%rsp), %rdi
movq %r12, %rsi
leaq 0x38(%rsp), %rdx
callq 0x8dc2
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq 0x18(%rsp), %rsi
movq %rbx, %rdx
movsd 0x30(%rsp), %xmm0
movq %r13, %rcx
movq %r15, %r8
movq 0x60(%rsp), %r9
pushq 0x448(%r12)
leaq 0x88(%rsp), %r15
pushq %r15
callq 0x944c
popq %rax
popq %rcx
movq %r15, %rdi
callq 0xa324
movq %r13, %rdi
callq 0x4b54
movq %rbx, %rdi
callq 0x4568
movq %rbp, 0x40(%rsp)
movq %r14, %rdi
leaq 0x40(%rsp), %rsi
callq 0x942e
movq 0x10(%rsp), %rdx
incq %rdx
jmp 0x86bd
xorl %edx, %edx
leaq 0x148(%rsp), %rbx
leaq 0xc8(%rsp), %r15
movq 0x110(%r12), %rax
movq 0x118(%r12), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rdx
jge 0x88cd
movq %rdx, 0x10(%rsp)
movq (%rax,%rdx,8), %rbp
movl $0xc0, %edi
callq 0x4260
movq %rax, 0x8(%rsp)
movq (%rbp), %rax
movq %rax, 0x18(%rsp)
leaq 0x8(%rbp), %rsi
movq %rbx, %rdi
callq 0x4380
movsd 0x28(%rbp), %xmm0
movsd %xmm0, 0x30(%rsp)
movq %rbp, 0x20(%rsp)
movq %r15, %rdi
movq %r12, %rsi
leaq 0x20(%rsp), %rdx
callq 0x8ce6
movq 0x78(%rbp), %r13
movq %rbp, 0x38(%rsp)
leaq 0x68(%rsp), %rdi
movq %r12, %rsi
leaq 0x38(%rsp), %rdx
callq 0x8dc2
subq $0x8, %rsp
movq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
movsd 0x38(%rsp), %xmm0
movq %r15, %rcx
movq %r13, %r8
leaq 0x70(%rsp), %r13
movq %r13, %r9
pushq 0x448(%r12)
callq 0x953e
popq %rax
popq %rcx
movq %r13, %rdi
callq 0xa324
movq %r15, %rdi
callq 0x4b54
movq %rbx, %rdi
callq 0x4568
movq %rbp, 0x40(%rsp)
movq %r14, %rdi
leaq 0x40(%rsp), %rsi
callq 0x942e
movq 0x10(%rsp), %rdx
incq %rdx
jmp 0x87d7
xorl %r13d, %r13d
leaq 0x128(%rsp), %r15
leaq 0xb0(%rsp), %rbp
movq 0xe0(%r12), %rax
movq 0xe8(%r12), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r13
jge 0x89ad
movq (%rax,%r13,8), %rbx
movl $0xc0, %edi
callq 0x4260
movq %rax, 0x8(%rsp)
movq %r13, 0x18(%rsp)
movq (%rbx), %r13
leaq 0x8(%rbx), %rsi
movq %r15, %r12
movq %r15, %rdi
callq 0x4380
movsd 0x28(%rbx), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, 0x20(%rsp)
movq %rbp, %rdi
movq 0x28(%rsp), %r15
movq %r15, %rsi
leaq 0x20(%rsp), %rdx
callq 0x8dc2
movq 0x48(%rbx), %r8
movq 0x448(%r15), %r9
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %r15
movq %r12, %rdx
movsd 0x10(%rsp), %xmm0
movq %rbp, %rcx
callq 0x9624
movq %rbp, %rdi
callq 0xa324
movq %r15, %rdi
callq 0x4568
movq %rbx, 0x40(%rsp)
movq %r14, %rdi
leaq 0x40(%rsp), %rsi
callq 0x942e
movq 0x28(%rsp), %r12
movq 0x18(%rsp), %r13
incq %r13
jmp 0x88e0
leaq 0x248(%r12), %r15
leaq 0x15d19(%rip), %rsi     # 0x1e6d5
movq %r15, %rdi
callq 0x4240
movq %rax, %rdi
callq 0x4100
xorl %r12d, %r12d
leaq 0x40(%rsp), %rbp
movq 0x28(%rsp), %rcx
movq 0x458(%rcx), %rax
subq 0x450(%rcx), %rax
sarq $0x3, %rax
cmpq %rax, %r12
jge 0x8af5
movq %r14, %rdi
movq %r12, %rsi
callq 0x970e
movq (%rax), %rax
movq 0x8(%rax), %rsi
movq %r15, %rdi
callq 0x4230
movq %rax, %rdi
leaq 0x15cda(%rip), %rsi     # 0x1e6f2
callq 0x4240
movq %rax, %rbx
movq %r14, %rdi
movq %r12, %rsi
callq 0x970e
movq (%rax), %rsi
addq $0x10, %rsi
movq %rbp, %rdi
callq 0x4380
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x4210
movq %rax, %rdi
leaq 0x15ca6(%rip), %rsi     # 0x1e6f5
callq 0x4240
movq %rbp, %rdi
callq 0x4568
xorl %ebx, %ebx
movq %r14, %rdi
movq %r12, %rsi
callq 0x970e
movq (%rax), %rsi
addq $0x38, %rsi
movq %rbp, %rdi
callq 0x525c
movq 0x48(%rsp), %rax
subq 0x40(%rsp), %rax
shrq $0x3, %rax
movslq %eax, %r13
movq %rbp, %rdi
callq 0x4b54
cmpq %r13, %rbx
jge 0x8ae5
movq %r14, %rdi
movq %r12, %rsi
callq 0x970e
movq (%rax), %rsi
addq $0x38, %rsi
movq %rbp, %rdi
callq 0x525c
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x4ae8
movq (%rax), %rsi
movq %r15, %rdi
callq 0x4230
movq %rax, %rdi
leaq 0x15924(%rip), %rsi     # 0x1e3f4
callq 0x4240
movq %rbp, %rdi
callq 0x4b54
incq %rbx
jmp 0x8a5e
movq %r15, %rdi
callq 0x4100
incq %r12
jmp 0x89d4
movq 0x264cc(%rip), %rdi     # 0x2efc8
leaq 0x159e6(%rip), %rsi     # 0x1e4e9
callq 0x4240
movq %rax, %rdi
callq 0x4100
leaq 0x98(%rsp), %rdi
callq 0xa324
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8c41
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0xa324
jmp 0x8b49
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x4568
jmp 0x8b93
movq %rax, %rbx
jmp 0x8b93
movq %rax, %rbx
jmp 0x8b74
movq %rax, %rbx
jmp 0x8b93
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0xa324
leaq 0xc8(%rsp), %rdi
callq 0x4b54
jmp 0x8b86
movq %rax, %rbx
leaq 0x148(%rsp), %rdi
callq 0x4568
movl $0xc0, %esi
jmp 0x8c18
movq %rax, %rbx
jmp 0x8bd3
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0xa324
jmp 0x8bb4
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x4b54
jmp 0x8bc6
movq %rax, %rbx
leaq 0x168(%rsp), %rdi
callq 0x4568
movl $0xd0, %esi
jmp 0x8c18
movq %rax, %rbx
jmp 0x8bf4
movq %rax, %rbx
jmp 0x8c13
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0xa324
leaq 0x110(%rsp), %rdi
callq 0x4b54
jmp 0x8c06
movq %rax, %rbx
leaq 0x188(%rsp), %rdi
callq 0x4568
movl $0xb8, %esi
movq 0x8(%rsp), %rdi
callq 0x4270
jmp 0x8c53
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x4568
jmp 0x8c53
jmp 0x8c41
jmp 0x8c41
jmp 0x8c41
jmp 0x8c41
jmp 0x8c41
jmp 0x8c41
jmp 0x8c41
movq %rax, %rbx
jmp 0x8c53
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x4b54
leaq 0x98(%rsp), %rdi
callq 0xa324
movq %rbx, %rdi
callq 0x44f0