// File: /workspace/github_cpp_makefile_star2_O1/nwieder[P]SSTS/src/System/Gillespie_Sys.cpp
// Function: nw::Gillespie_Sys::build_dep_graph()
void Gillespie_Sys::build_dep_graph(){

	try{
//		temporary vectors
		vector<long> sc_a, sc_b;

//		find dependency relations based on state change vectors
		for (size_t i = 0; i < evt_vec->size(); ++i){
			sc_a = evt_vec->at(i)->get_sc_vec();
			for (size_t j = 0; j < evt_vec->size(); ++j){
				sc_b = evt_vec->at(j)->get_sc_vec();
				if(evt_vec->at(i) != evt_vec->at(j)){
					for (size_t k = 0; k < sc_a.size(); ++k){
						if(sc_a.at(k) != 0 && sc_b.at(k) < 0 ){
							evt_vec->at(i)->add_dep_list(evt_vec->at(j));
							break;
						}
					}
				}
			}
		}
	}

	catch(exception& e){
		cout << "System::build_dep_graph()" << e.what();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, (%rsp)
movq 0xef0(%rdi), %rax
movq 0x8(%rax), %rcx
cmpq (%rax), %rcx
je 0xeb54
xorl %esi, %esi
xorl %ebp, %ebp
xorl %ebx, %ebx
xorl %r12d, %r12d
xorl %r13d, %r13d
movq (%rax), %rcx
movq 0x8(%rax), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rsi, %rdx
jbe 0xebd5
movq %rsi, 0x38(%rsp)
movq (%rcx,%rsi,8), %rsi
addq $0x38, %rsi
leaq 0x10(%rsp), %rdi
callq 0x65fa
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x20(%rsp), %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %r13, %r13
je 0xe9b0
subq %r13, %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0x42c0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xe9c7
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq %r14, 0x8(%rsp)
movq (%rsp), %rax
movq 0xef0(%rax), %rax
movq 0x8(%rax), %rcx
cmpq (%rax), %rcx
je 0xeb20
movq 0x30(%rsp), %r12
subq %r15, %r12
sarq $0x3, %r12
cmpq $0x1, %r12
adcq $0x0, %r12
xorl %r13d, %r13d
movq %r15, 0x28(%rsp)
movq (%rax), %rcx
movq 0x8(%rax), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %r13, %rdx
jbe 0xeba7
movq (%rcx,%r13,8), %rsi
addq $0x38, %rsi
leaq 0x10(%rsp), %rdi
callq 0x65fa
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x18(%rsp), %r14
movq 0x20(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rbx, %rbx
je 0xea61
subq %rbx, %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x42c0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xea78
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x42c0
movq (%rsp), %rax
movq 0xef0(%rax), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movq 0x38(%rsp), %rsi
cmpq %rsi, %rdx
movq 0x40(%rsp), %rbx
movq %r15, %rbp
jbe 0xebb8
cmpq %r13, %rdx
movq 0x28(%rsp), %r15
jbe 0xebbf
movq (%rax,%rsi,8), %rdi
cmpq %r15, 0x30(%rsp)
sete %cl
movq (%rax,%r13,8), %rsi
cmpq %rsi, %rdi
sete %al
orb %cl, %al
jne 0xeafe
subq %rbx, %r14
sarq $0x3, %r14
xorl %eax, %eax
cmpq $0x0, (%r15,%rax,8)
je 0xeaef
cmpq %rax, %r14
jbe 0xeb93
cmpq $0x0, (%rbx,%rax,8)
js 0xeaf9
incq %rax
cmpq %rax, %r12
jne 0xead8
jmp 0xeafe
callq 0xfa94
incq %r13
movq (%rsp), %rax
movq 0xef0(%rax), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x3, %rcx
cmpq %rcx, %r13
jb 0xea00
movq 0x38(%rsp), %rsi
incq %rsi
movq (%rsp), %rax
movq 0xef0(%rax), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x3, %rcx
movq 0x8(%rsp), %r14
movq %r14, %r12
movq %r15, %r13
cmpq %rcx, %rsi
jb 0xe94a
jmp 0xeb5e
xorl %r15d, %r15d
xorl %r14d, %r14d
xorl %ebx, %ebx
xorl %ebp, %ebp
testq %rbx, %rbx
je 0xeb71
subq %rbx, %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x42c0
testq %r15, %r15
je 0xeb84
subq %r15, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x42c0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x154a9(%rip), %rdi     # 0x24043
movq %rax, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4430
leaq 0x15495(%rip), %rdi     # 0x24043
movq %r13, %rsi
xorl %eax, %eax
callq 0x4430
movq 0x28(%rsp), %r15
jmp 0xebc2
movq %r13, %rsi
leaq 0x1547a(%rip), %rdi     # 0x24043
xorl %eax, %eax
movq 0x8(%rsp), %r12
callq 0x4430
leaq 0x15467(%rip), %rdi     # 0x24043
xorl %eax, %eax
callq 0x4430
jmp 0xebe5
movq %rdx, %r14
movq %rax, (%rsp)
jmp 0xec0f
jmp 0xec00
jmp 0xec00
jmp 0xec00
movq %rdx, %r14
movq %rax, (%rsp)
movq %r15, %r13
jmp 0xec0f
movq %rdx, %r14
movq %rax, (%rsp)
movq %r15, %r13
movq 0x8(%rsp), %r12
testq %rbx, %rbx
je 0xec22
subq %rbx, %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x42c0
testq %r13, %r13
je 0xec35
subq %r13, %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0x42c0
cmpl $0x1, %r14d
jne 0xec8a
movq (%rsp), %rdi
callq 0x4100
movq %rax, %rbx
movq 0x2437a(%rip), %rdi     # 0x32fc8
leaq 0x15e62(%rip), %rsi     # 0x24ab7
movl $0x19, %edx
callq 0x42f0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0x24359(%rip), %rdi     # 0x32fc8
movq %rax, %rsi
callq 0x4290
callq 0x44a0
jmp 0xeb84
movq %rax, (%rsp)
callq 0x44a0
movq (%rsp), %rdi
callq 0x4510
movq %rax, %rdi
callq 0x6d6b
nop