// File: 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
movq %rsp, %rbp
subq $0x3a0, %rsp            # imm = 0x3A0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x270(%rbp)
movq 0x5026f(%rip), %rdi     # 0x5dfd0
leaq 0x37934(%rip), %rsi     # 0x4569c
callq 0x5300
movq -0x270(%rbp), %rsi
addq $0x468, %rsi            # imm = 0x468
leaq -0x20(%rbp), %rdi
callq 0xfb80
leaq -0x20(%rbp), %rdi
callq 0xfc70
movq $0x0, -0x28(%rbp)
movq -0x270(%rbp), %rdi
movq -0x28(%rbp), %rax
movq %rax, -0x278(%rbp)
addq $0x30, %rdi
addq $0x98, %rdi
callq 0xef30
movq %rax, %rcx
movq -0x278(%rbp), %rax
cmpq %rcx, %rax
jge 0xdf89
movq -0x270(%rbp), %rdi
addq $0xc8, %rdi
movq -0x28(%rbp), %rsi
callq 0xef50
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movl $0xb8, %edi
callq 0x5320
movq %rax, -0x280(%rbp)
jmp 0xddfb
movb $0x1, -0xa1(%rbp)
movq -0x30(%rbp), %rsi
movq (%rsi), %rax
movq %rax, -0x288(%rbp)
addq $0x8, %rsi
leaq -0x68(%rbp), %rdi
callq 0x5130
jmp 0xde1f
movq -0x270(%rbp), %rsi
movq -0x30(%rbp), %rax
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0x290(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0xea90
jmp 0xde46
movq -0x270(%rbp), %rsi
movq -0x30(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x98(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
callq 0xec20
jmp 0xde6d
movsd -0x290(%rbp), %xmm0
movq -0x288(%rbp), %rsi
movq -0x280(%rbp), %rdi
movq -0x270(%rbp), %rax
movq 0x448(%rax), %r9
leaq -0x68(%rbp), %rdx
leaq -0x80(%rbp), %rcx
leaq -0x98(%rbp), %r8
callq 0xfca0
jmp 0xdea7
movb $0x0, -0xa1(%rbp)
leaq -0x98(%rbp), %rdi
callq 0xf130
leaq -0x80(%rbp), %rdi
callq 0x61a0
leaq -0x68(%rbp), %rdi
callq 0x5768
movq -0x280(%rbp), %rax
movq -0x270(%rbp), %rdi
movq %rax, -0x38(%rbp)
addq $0x450, %rdi            # imm = 0x450
leaq -0x38(%rbp), %rsi
callq 0xfe10
jmp 0xdef0
jmp 0xdef2
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xdd95
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xe96f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xdf68
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xdf5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xdf56
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x98(%rbp), %rdi
callq 0xf130
leaq -0x80(%rbp), %rdi
callq 0x61a0
leaq -0x68(%rbp), %rdi
callq 0x5768
testb $0x1, -0xa1(%rbp)
jne 0xdf73
jmp 0xdf84
movq -0x280(%rbp), %rdi
movl $0xb8, %esi
callq 0x5330
jmp 0xe96f
movq $0x0, -0xb0(%rbp)
movq -0x270(%rbp), %rdi
movq -0xb0(%rbp), %rax
movq %rax, -0x298(%rbp)
addq $0x30, %rdi
addq $0xc8, %rdi
callq 0xefb0
movq %rax, %rcx
movq -0x298(%rbp), %rax
cmpq %rcx, %rax
jge 0xe1e8
movq -0x270(%rbp), %rdi
addq $0xf8, %rdi
movq -0xb0(%rbp), %rsi
callq 0xefd0
movq (%rax), %rax
movq %rax, -0xb8(%rbp)
movl $0xd0, %edi
callq 0x5320
movq %rax, -0x2a0(%rbp)
jmp 0xe003
movb $0x1, -0x121(%rbp)
movq -0xb8(%rbp), %rsi
movq (%rsi), %rax
movq %rax, -0x2a8(%rbp)
addq $0x8, %rsi
leaq -0xe0(%rbp), %rdi
callq 0x5130
jmp 0xe02d
movq -0x270(%rbp), %rsi
movq -0xb8(%rbp), %rax
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0x2b0(%rbp)
movq %rax, -0x100(%rbp)
leaq -0xf8(%rbp), %rdi
leaq -0x100(%rbp), %rdx
callq 0xea90
jmp 0xe064
movq -0x270(%rbp), %rsi
movq -0xb8(%rbp), %rax
movq 0x78(%rax), %rcx
movq %rcx, -0x2c0(%rbp)
movq 0x80(%rax), %rcx
movq %rcx, -0x2b8(%rbp)
movq %rax, -0x120(%rbp)
leaq -0x118(%rbp), %rdi
leaq -0x120(%rbp), %rdx
callq 0xec20
jmp 0xe0a7
movq -0x2b8(%rbp), %r9
movq -0x2c0(%rbp), %r8
movsd -0x2b0(%rbp), %xmm0
movq -0x2a8(%rbp), %rsi
movq -0x2a0(%rbp), %rdi
movq -0x270(%rbp), %rax
movq 0x448(%rax), %rcx
movq %rsp, %rax
movq %rcx, 0x8(%rax)
leaq -0x118(%rbp), %rcx
movq %rcx, (%rax)
leaq -0xe0(%rbp), %rdx
leaq -0xf8(%rbp), %rcx
callq 0xfe80
jmp 0xe0ff
movb $0x0, -0x121(%rbp)
leaq -0x118(%rbp), %rdi
callq 0xf130
leaq -0xf8(%rbp), %rdi
callq 0x61a0
leaq -0xe0(%rbp), %rdi
callq 0x5768
movq -0x2a0(%rbp), %rax
movq -0x270(%rbp), %rdi
movq %rax, -0xc0(%rbp)
addq $0x450, %rdi            # imm = 0x450
leaq -0xc0(%rbp), %rsi
callq 0xfe10
jmp 0xe154
jmp 0xe156
movq -0xb0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb0(%rbp)
jmp 0xdf94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xe1c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xe1bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xe1af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x118(%rbp), %rdi
callq 0xf130
leaq -0xf8(%rbp), %rdi
callq 0x61a0
leaq -0xe0(%rbp), %rdi
callq 0x5768
testb $0x1, -0x121(%rbp)
jne 0xe1d2
jmp 0xe1e3
movq -0x2a0(%rbp), %rdi
movl $0xd0, %esi
callq 0x5330
jmp 0xe96f
movq $0x0, -0x130(%rbp)
movq -0x270(%rbp), %rdi
movq -0x130(%rbp), %rax
movq %rax, -0x2c8(%rbp)
addq $0x30, %rdi
addq $0xe0, %rdi
callq 0xf010
movq %rax, %rcx
movq -0x2c8(%rbp), %rax
cmpq %rcx, %rax
jge 0xe42e
movq -0x270(%rbp), %rdi
addq $0x110, %rdi            # imm = 0x110
movq -0x130(%rbp), %rsi
callq 0xf030
movq (%rax), %rax
movq %rax, -0x138(%rbp)
movl $0xc0, %edi
callq 0x5320
movq %rax, -0x2d0(%rbp)
jmp 0xe262
movb $0x1, -0x1a1(%rbp)
movq -0x138(%rbp), %rsi
movq (%rsi), %rax
movq %rax, -0x2d8(%rbp)
addq $0x8, %rsi
leaq -0x160(%rbp), %rdi
callq 0x5130
jmp 0xe28c
movq -0x270(%rbp), %rsi
movq -0x138(%rbp), %rax
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0x2e0(%rbp)
movq %rax, -0x180(%rbp)
leaq -0x178(%rbp), %rdi
leaq -0x180(%rbp), %rdx
callq 0xea90
jmp 0xe2c3
movq -0x270(%rbp), %rsi
movq -0x138(%rbp), %rax
movq 0x78(%rax), %rcx
movq %rcx, -0x2e8(%rbp)
movq %rax, -0x1a0(%rbp)
leaq -0x198(%rbp), %rdi
leaq -0x1a0(%rbp), %rdx
callq 0xec20
jmp 0xe2f8
movq -0x2e8(%rbp), %r8
movsd -0x2e0(%rbp), %xmm0
movq -0x2d8(%rbp), %rsi
movq -0x2d0(%rbp), %rdi
movq -0x270(%rbp), %rax
movq 0x448(%rax), %rcx
movq %rsp, %rax
movq %rcx, (%rax)
leaq -0x160(%rbp), %rdx
leaq -0x178(%rbp), %rcx
leaq -0x198(%rbp), %r9
callq 0x10000
jmp 0xe345
movb $0x0, -0x1a1(%rbp)
leaq -0x198(%rbp), %rdi
callq 0xf130
leaq -0x178(%rbp), %rdi
callq 0x61a0
leaq -0x160(%rbp), %rdi
callq 0x5768
movq -0x2d0(%rbp), %rax
movq -0x270(%rbp), %rdi
movq %rax, -0x140(%rbp)
addq $0x450, %rdi            # imm = 0x450
leaq -0x140(%rbp), %rsi
callq 0xfe10
jmp 0xe39a
jmp 0xe39c
movq -0x130(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x130(%rbp)
jmp 0xe1f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xe40d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xe401
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xe3f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x198(%rbp), %rdi
callq 0xf130
leaq -0x178(%rbp), %rdi
callq 0x61a0
leaq -0x160(%rbp), %rdi
callq 0x5768
testb $0x1, -0x1a1(%rbp)
jne 0xe418
jmp 0xe429
movq -0x2d0(%rbp), %rdi
movl $0xc0, %esi
callq 0x5330
jmp 0xe96f
movq $0x0, -0x1b0(%rbp)
movq -0x270(%rbp), %rdi
movq -0x1b0(%rbp), %rax
movq %rax, -0x2f0(%rbp)
addq $0x30, %rdi
addq $0xb0, %rdi
callq 0xf070
movq %rax, %rcx
movq -0x2f0(%rbp), %rax
cmpq %rcx, %rax
jge 0xe610
movq -0x270(%rbp), %rdi
addq $0xe0, %rdi
movq -0x1b0(%rbp), %rsi
callq 0xf090
movq (%rax), %rax
movq %rax, -0x1b8(%rbp)
movl $0xc0, %edi
callq 0x5320
movq %rax, -0x2f8(%rbp)
jmp 0xe4a8
movb $0x1, -0x201(%rbp)
movq -0x1b8(%rbp), %rsi
movq (%rsi), %rax
movq %rax, -0x300(%rbp)
addq $0x8, %rsi
leaq -0x1e0(%rbp), %rdi
callq 0x5130
jmp 0xe4d2
movq -0x270(%rbp), %rsi
movq -0x1b8(%rbp), %rax
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0x308(%rbp)
movq %rax, -0x200(%rbp)
leaq -0x1f8(%rbp), %rdi
leaq -0x200(%rbp), %rdx
callq 0xec20
jmp 0xe509
movsd -0x308(%rbp), %xmm0
movq -0x300(%rbp), %rsi
movq -0x2f8(%rbp), %rdi
movq -0x270(%rbp), %rax
movq -0x1b8(%rbp), %rcx
movq 0x48(%rcx), %r8
movq 0x448(%rax), %r9
leaq -0x1e0(%rbp), %rdx
leaq -0x1f8(%rbp), %rcx
callq 0x10170
jmp 0xe54d
movb $0x0, -0x201(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0xf130
leaq -0x1e0(%rbp), %rdi
callq 0x5768
movq -0x2f8(%rbp), %rax
movq -0x270(%rbp), %rdi
movq %rax, -0x1c0(%rbp)
addq $0x450, %rdi            # imm = 0x450
leaq -0x1c0(%rbp), %rsi
callq 0xfe10
jmp 0xe596
jmp 0xe598
movq -0x1b0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1b0(%rbp)
jmp 0xe439
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xe5ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xe5e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0xf130
leaq -0x1e0(%rbp), %rdi
callq 0x5768
testb $0x1, -0x201(%rbp)
jne 0xe5fa
jmp 0xe60b
movq -0x2f8(%rbp), %rdi
movl $0xc0, %esi
callq 0x5330
jmp 0xe96f
movq -0x270(%rbp), %rdi
addq $0x248, %rdi            # imm = 0x248
leaq 0x37088(%rip), %rsi     # 0x456ad
callq 0x5300
movq %rax, -0x310(%rbp)
jmp 0xe633
movq -0x310(%rbp), %rdi
movq 0x4f95f(%rip), %rsi     # 0x5dfa0
callq 0x5340
jmp 0xe648
movq $0x0, -0x210(%rbp)
movq -0x270(%rbp), %rdi
movq -0x210(%rbp), %rax
movq %rax, -0x318(%rbp)
addq $0x450, %rdi            # imm = 0x450
callq 0x7b50
movq %rax, %rcx
movq -0x318(%rbp), %rax
cmpq %rcx, %rax
jge 0xe92c
movq -0x270(%rbp), %rdi
movq %rdi, %rax
addq $0x248, %rax            # imm = 0x248
movq %rax, -0x328(%rbp)
addq $0x450, %rdi            # imm = 0x450
movq -0x210(%rbp), %rsi
callq 0x102d0
movq %rax, -0x320(%rbp)
jmp 0xe6ba
movq -0x320(%rbp), %rax
movq (%rax), %rdi
callq 0x10310
movq %rax, -0x330(%rbp)
jmp 0xe6d2
movq -0x330(%rbp), %rsi
movq -0x328(%rbp), %rdi
callq 0x56a0
movq %rax, -0x338(%rbp)
jmp 0xe6ee
movq -0x338(%rbp), %rdi
leaq 0x36fce(%rip), %rsi     # 0x456ca
callq 0x5300
movq %rax, -0x340(%rbp)
jmp 0xe70a
movq -0x270(%rbp), %rdi
addq $0x450, %rdi            # imm = 0x450
movq -0x210(%rbp), %rsi
callq 0x102d0
movq %rax, -0x348(%rbp)
jmp 0xe72d
movq -0x348(%rbp), %rax
movq (%rax), %rsi
leaq -0x230(%rbp), %rdi
callq 0x10330
jmp 0xe745
movq -0x340(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x52c0
movq %rax, -0x350(%rbp)
jmp 0xe761
movq -0x350(%rbp), %rdi
leaq 0x36f5e(%rip), %rsi     # 0x456cd
callq 0x5300
jmp 0xe776
leaq -0x230(%rbp), %rdi
callq 0x5768
movl $0x0, -0x234(%rbp)
movq -0x270(%rbp), %rdi
movl -0x234(%rbp), %eax
movl %eax, -0x35c(%rbp)
addq $0x450, %rdi            # imm = 0x450
movq -0x210(%rbp), %rsi
callq 0x102d0
movq %rax, -0x358(%rbp)
jmp 0xe7bb
movq -0x358(%rbp), %rax
movq (%rax), %rsi
leaq -0x250(%rbp), %rdi
callq 0x10360
jmp 0xe7d3
leaq -0x250(%rbp), %rdi
callq 0x6d10
movl %eax, -0x360(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x61a0
movl -0x360(%rbp), %ecx
movl -0x35c(%rbp), %eax
cmpl %ecx, %eax
jge 0xe8f7
movq -0x270(%rbp), %rdi
movq %rdi, %rax
addq $0x248, %rax            # imm = 0x248
movq %rax, -0x370(%rbp)
addq $0x450, %rdi            # imm = 0x450
movq -0x210(%rbp), %rsi
callq 0x102d0
movq %rax, -0x368(%rbp)
jmp 0xe838
movq -0x368(%rbp), %rax
movq (%rax), %rsi
leaq -0x268(%rbp), %rdi
callq 0x10360
jmp 0xe850
movslq -0x234(%rbp), %rsi
leaq -0x268(%rbp), %rdi
callq 0x60d0
movq %rax, -0x378(%rbp)
jmp 0xe86c
movq -0x370(%rbp), %rdi
movq -0x378(%rbp), %rax
movq (%rax), %rsi
callq 0x56a0
movq %rax, -0x380(%rbp)
jmp 0xe88b
movq -0x380(%rbp), %rdi
leaq 0x36b33(%rip), %rsi     # 0x453cc
callq 0x5300
jmp 0xe8a0
leaq -0x268(%rbp), %rdi
callq 0x61a0
movl -0x234(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x234(%rbp)
jmp 0xe78c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x5768
jmp 0xe96f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x61a0
jmp 0xe96f
movq -0x270(%rbp), %rdi
addq $0x248, %rdi            # imm = 0x248
movq 0x4f694(%rip), %rsi     # 0x5dfa0
callq 0x5340
jmp 0xe913
jmp 0xe915
movq -0x210(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x210(%rbp)
jmp 0xe653
movq 0x4f69d(%rip), %rdi     # 0x5dfd0
leaq 0x36b87(%rip), %rsi     # 0x454c1
callq 0x5300
movq %rax, -0x388(%rbp)
jmp 0xe948
movq -0x388(%rbp), %rdi
movq 0x4f64a(%rip), %rsi     # 0x5dfa0
callq 0x5340
jmp 0xe95d
leaq -0x20(%rbp), %rdi
callq 0xf130
addq $0x3a0, %rsp            # imm = 0x3A0
popq %rbp
retq
leaq -0x20(%rbp), %rdi
callq 0xf130
movq -0x40(%rbp), %rdi
callq 0x5650
nopw %cs:(%rax,%rax)