// File: /workspace/github_cpp_makefile_star2_O1/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 $0x198, %rsp            # imm = 0x198
movq %rdi, %rbx
movq 0x28331(%rip), %rdi     # 0x32fc8
leaq 0x19a26(%rip), %rsi     # 0x246c4
movl $0x10, %edx
callq 0x42f0
leaq 0x468(%rbx), %rsi
leaq 0x180(%rsp), %r14
movq %r14, %rdi
callq 0xbf38
addq $-0x8, 0x8(%r14)
movq 0xc8(%rbx), %rax
movq 0xd0(%rbx), %rcx
subq %rax, %rcx
testq %rcx, %rcx
jle 0xae49
leaq 0x450(%rbx), %rcx
movq %rcx, 0x10(%rsp)
xorl %r12d, %r12d
leaq 0x168(%rsp), %r15
movq (%rax,%r12,8), %r13
movq %r13, 0x20(%rsp)
movl $0xb8, %edi
callq 0x42b0
movq %rax, %r14
movq (%r13), %rbp
leaq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x8(%r13), %rsi
movq 0x10(%r13), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %rdi
callq 0xd022
movsd 0x28(%r13), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x108(%rsp), %rdi
movq %rbx, %rsi
leaq 0x20(%rsp), %rdx
callq 0xb8d8
movq %r13, 0x40(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
leaq 0x40(%rsp), %rdx
callq 0xb9d6
movq 0x448(%rbx), %r9
movq %r14, %rdi
movq %rbp, %rsi
leaq 0xa8(%rsp), %rdx
movsd 0x8(%rsp), %xmm0
leaq 0x108(%rsp), %rcx
movq %r15, %r8
callq 0xbfb8
movq 0x168(%rsp), %rdi
testq %rdi, %rdi
je 0xadb5
movq 0x178(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq 0x108(%rsp), %rdi
testq %rdi, %rdi
je 0xadd2
movq 0x118(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0xadf7
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x42c0
movq %r14, 0x18(%rsp)
movq 0x458(%rbx), %rsi
cmpq 0x460(%rbx), %rsi
je 0xae19
movq %r14, (%rsi)
addq $0x8, 0x458(%rbx)
jmp 0xae28
movq 0x10(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0xd1ee
incq %r12
movq 0xc8(%rbx), %rax
movq 0xd0(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r12
jl 0xacf5
movq 0xf8(%rbx), %rax
movq 0x100(%rbx), %rcx
subq %rax, %rcx
testq %rcx, %rcx
jle 0xaffc
leaq 0x450(%rbx), %rcx
movq %rcx, 0xc8(%rsp)
xorl %edx, %edx
leaq 0x150(%rsp), %r15
movq %rdx, 0x10(%rsp)
movq (%rax,%rdx,8), %r14
movl $0xd0, %edi
callq 0x42b0
movq %rax, 0x8(%rsp)
movq (%r14), %rbp
leaq 0x98(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rdi
callq 0xd022
movsd 0x28(%r14), %xmm0
movsd %xmm0, 0xd0(%rsp)
movq %r14, 0x18(%rsp)
leaq 0xf0(%rsp), %rdi
movq %rbx, %rsi
leaq 0x18(%rsp), %rdx
callq 0xb8d8
movq 0x78(%r14), %r12
movq 0x80(%r14), %r13
movq %r14, 0x40(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
leaq 0x40(%rsp), %rdx
callq 0xb9d6
movq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
leaq 0x88(%rsp), %rdx
movsd 0xd0(%rsp), %xmm0
leaq 0xf0(%rsp), %rcx
movq %r12, %r8
movq %r13, %r9
pushq 0x448(%rbx)
pushq %r15
callq 0xc0f8
addq $0x10, %rsp
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0xaf60
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0xaf7d
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0xafa2
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x42c0
movq %r14, 0x20(%rsp)
movq 0x458(%rbx), %rsi
cmpq 0x460(%rbx), %rsi
je 0xafc4
movq %r14, (%rsi)
addq $0x8, 0x458(%rbx)
jmp 0xafd6
movq 0xc8(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0xd1ee
movq 0x10(%rsp), %rdx
incq %rdx
movq 0xf8(%rbx), %rax
movq 0x100(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rdx
jl 0xae7c
movq 0x110(%rbx), %rax
movq 0x118(%rbx), %rcx
subq %rax, %rcx
testq %rcx, %rcx
jle 0xb179
leaq 0x450(%rbx), %rcx
movq %rcx, 0x10(%rsp)
xorl %r13d, %r13d
movq (%rax,%r13,8), %r15
movl $0xc0, %edi
callq 0x42b0
movq %rax, %r14
movq (%r15), %rbp
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x8(%r15), %rsi
movq 0x10(%r15), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %rdi
callq 0xd022
movsd 0x28(%r15), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r15, 0x18(%rsp)
leaq 0xd8(%rsp), %rdi
movq %rbx, %rsi
leaq 0x18(%rsp), %rdx
callq 0xb8d8
movq 0x78(%r15), %r12
movq %r15, 0x40(%rsp)
leaq 0x138(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
leaq 0x40(%rsp), %rdx
callq 0xb9d6
subq $0x8, %rsp
movq %r14, %rdi
movq %rbp, %rsi
leaq 0x70(%rsp), %rdx
movsd 0x10(%rsp), %xmm0
leaq 0xe0(%rsp), %rcx
movq %r12, %r8
movq %r15, %r9
pushq 0x448(%rbx)
callq 0xc248
addq $0x10, %rsp
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0xb0ee
movq 0x148(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0xb10b
movq 0xe8(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0xb127
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42c0
movq %r14, 0x20(%rsp)
movq 0x458(%rbx), %rsi
cmpq 0x460(%rbx), %rsi
je 0xb149
movq %r14, (%rsi)
addq $0x8, 0x458(%rbx)
jmp 0xb158
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0xd1ee
incq %r13
movq 0x110(%rbx), %rax
movq 0x118(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r13
jl 0xb025
movq 0xe0(%rbx), %rax
movq 0xe8(%rbx), %rcx
subq %rax, %rcx
testq %rcx, %rcx
jle 0xb2b1
leaq 0x450(%rbx), %rcx
movq %rcx, 0x10(%rsp)
xorl %ebp, %ebp
leaq 0x120(%rsp), %r13
movq (%rax,%rbp,8), %r12
movl $0xc0, %edi
callq 0x42b0
movq %rax, %r14
movq (%r12), %r15
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x8(%r12), %rsi
movq 0x10(%r12), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0xd022
movsd 0x28(%r12), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r12, 0x18(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
leaq 0x18(%rsp), %rdx
callq 0xb9d6
movq 0x48(%r12), %r8
movq 0x448(%rbx), %r9
movq %r14, %rdi
movq %r15, %rsi
leaq 0x48(%rsp), %rdx
movsd 0x8(%rsp), %xmm0
movq %r13, %rcx
callq 0xc38c
movq 0x120(%rsp), %rdi
testq %rdi, %rdi
je 0xb243
movq 0x130(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xb25f
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42c0
movq %r14, 0x20(%rsp)
movq 0x458(%rbx), %rsi
cmpq 0x460(%rbx), %rsi
je 0xb281
movq %r14, (%rsi)
addq $0x8, 0x458(%rbx)
jmp 0xb290
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0xd1ee
incq %rbp
movq 0xe0(%rbx), %rax
movq 0xe8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rbp
jl 0xb1a9
leaq 0x248(%rbx), %rdi
leaq 0x19416(%rip), %rsi     # 0x246d5
movl $0x1c, %edx
movq %rdi, 0x8(%rsp)
callq 0x42f0
movq 0x8(%rsp), %rcx
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x4280
movsbl %al, %esi
movq 0x8(%rsp), %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4190
movq 0x450(%rbx), %rax
movq 0x458(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
testq %rdx, %rdx
jle 0xb52d
xorl %r15d, %r15d
leaq 0x20(%rsp), %r13
cmpq %r15, %rdx
jbe 0xb5e6
movq (%rax,%r15,8), %rax
movq 0x8(%rax), %rsi
movq 0x8(%rsp), %rdi
callq 0x4270
movq %rax, %rbp
movl $0x2, %edx
movq %rax, %rdi
leaq 0x193a3(%rip), %rsi     # 0x246f2
callq 0x42f0
movq 0x450(%rbx), %rax
movq 0x458(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r15, %rdx
jbe 0xb5d5
movq (%rax,%r15,8), %rax
leaq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0xd022
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rbp, %rdi
callq 0x42f0
movl $0xa, %edx
movq %rax, %rdi
leaq 0x19341(%rip), %rsi     # 0x246f5
callq 0x42f0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xb3d5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42c0
movq 0x450(%rbx), %rax
movq 0x458(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r15, %rdx
jbe 0xb5a2
xorl %ebp, %ebp
movq (%rax,%r15,8), %rsi
addq $0x38, %rsi
movq %r13, %rdi
callq 0x65fa
movq 0x20(%rsp), %r12
movq 0x28(%rsp), %r14
testq %r12, %r12
je 0xb424
movq 0x30(%rsp), %rsi
subq %r12, %rsi
movq %r12, %rdi
callq 0x42c0
subq %r12, %r14
shrq $0x3, %r14
movslq %r14d, %rax
cmpq %rax, %rbp
jge 0xb4de
movq 0x450(%rbx), %rax
movq 0x458(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r15, %rdx
jbe 0xb5c4
movq (%rax,%r15,8), %rsi
addq $0x38, %rsi
movq %r13, %rdi
callq 0x65fa
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rbp, %rdx
jbe 0xb5b3
movq (%rax,%rbp,8), %rsi
movq 0x8(%rsp), %rdi
callq 0x4270
movl $0x1, %edx
movq %rax, %rdi
leaq 0x18f58(%rip), %rsi     # 0x243f4
callq 0x42f0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xb4b8
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
incq %rbp
movq 0x450(%rbx), %rax
movq 0x458(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r15, %rdx
ja 0xb3f5
jmp 0xb5a2
movq 0x8(%rsp), %rcx
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x4280
movsbl %al, %esi
movq 0x8(%rsp), %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4190
incq %r15
movq 0x450(%rbx), %rax
movq 0x458(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rdx, %r15
jl 0xb322
movq 0x27a94(%rip), %rbx     # 0x32fc8
leaq 0x18fae(%rip), %rsi     # 0x244e9
movl $0x4, %edx
movq %rbx, %rdi
callq 0x42f0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x4280
movsbl %al, %esi
movq 0x27a62(%rip), %rdi     # 0x32fc8
callq 0x4040
movq %rax, %rdi
callq 0x4190
movq 0x180(%rsp), %rdi
testq %rdi, %rdi
je 0xb590
movq 0x190(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18a9a(%rip), %rdi     # 0x24043
movq %r15, %rsi
xorl %eax, %eax
callq 0x4430
leaq 0x18a89(%rip), %rdi     # 0x24043
movq %rbp, %rsi
xorl %eax, %eax
callq 0x4430
leaq 0x18a78(%rip), %rdi     # 0x24043
movq %r15, %rsi
xorl %eax, %eax
callq 0x4430
leaq 0x18a67(%rip), %rdi     # 0x24043
movq %r15, %rsi
xorl %eax, %eax
callq 0x4430
leaq 0x18a56(%rip), %rdi     # 0x24043
movq %r15, %rsi
xorl %eax, %eax
callq 0x4430
jmp 0xb7f1
jmp 0xb7f1
jmp 0xb7f1
jmp 0xb7f1
movq %rax, %rbx
jmp 0xb6be
movq %rax, %rbx
jmp 0xb638
movq %rax, %rbx
movq 0x120(%rsp), %rdi
testq %rdi, %rdi
je 0xb638
movq 0x130(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xb654
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42c0
jmp 0xb6be
movq %rax, %rbx
jmp 0xb6be
movq %rax, %rbx
jmp 0xb6a2
movq %rax, %rbx
jmp 0xb685
movq %rax, %rbx
movq 0x138(%rsp), %rdi
testq %rdi, %rdi
je 0xb685
movq 0x148(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0xb6a2
movq 0xe8(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0xb6be
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42c0
movl $0xc0, %esi
jmp 0xb7be
movq %rax, %rbx
jmp 0xb739
movq %rax, %rbx
jmp 0xb714
movq %rax, %rbx
jmp 0xb6f7
movq %rax, %rbx
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0xb6f7
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0xb714
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0xb739
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x42c0
movl $0xd0, %esi
movq 0x8(%rsp), %rdi
jmp 0xb80b
movq %rax, %rbx
jmp 0xb7b9
movq %rax, %rbx
jmp 0xb794
movq %rax, %rbx
jmp 0xb777
movq %rax, %rbx
movq 0x168(%rsp), %rdi
testq %rdi, %rdi
je 0xb777
movq 0x178(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq 0x108(%rsp), %rdi
testq %rdi, %rdi
je 0xb794
movq 0x118(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0xb7b9
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x42c0
movl $0xb8, %esi
movq %r14, %rdi
jmp 0xb80b
jmp 0xb7f1
jmp 0xb7f1
jmp 0xb7f1
jmp 0xb7f1
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xb810
movq 0x30(%rsp), %rsi
incq %rsi
jmp 0xb80b
jmp 0xb7f1
jmp 0xb7f1
jmp 0xb7f6
jmp 0xb7f1
jmp 0xb7f1
movq %rax, %rbx
jmp 0xb810
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xb810
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq 0x180(%rsp), %rdi
testq %rdi, %rdi
je 0xb82d
movq 0x190(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq %rbx, %rdi
callq 0x4510
nop