// File: /workspace/github_c_makefile_star2_O1/stonezwr[P]SpiKL-IP/network.C
// Function: Network::LSMTransientSim(networkmode_t, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Network::LSMTransientSim(networkmode_t networkmode, int  tid, const string sample_type){
    int count = 0;
	int IP_iter;
#ifdef	SPIKL_IP
	IP_iter=5;
#else
	IP_iter=1;
#endif
    LSMClearSignals();
    int info = this->LoadFirstSpeech(false, networkmode, sample_type);
    while(info != -1){
        count++;
		int iter_count=0;
		while(iter_count!=IP_iter){
			iter_count++;
			if(iter_count==IP_iter)
				SearchForNeuronGroup("reservoir")->SetGenerateTransient(true);
			else
				SearchForNeuronGroup("reservoir")->SetGenerateTransient(false);
				
			int time = 0, end_time = this->SpeechEndTime();
		
			while(!LSMEndOfSpeech(networkmode, end_time)){
				LSMNextTimeStep(++time,false,1, end_time, NULL);
			}
			if(iter_count==IP_iter&&tid == 0){
					SpeechPrint(info, "reservoir"); // dump the reservoir response for quick simulation
			}
			LSMClearSignalsIP();
			if(iter_count!=IP_iter)
				info=LoadSpeechAgain(false, networkmode, sample_type);
		}
		LSMClearSignals();
		info = LoadNextSpeech(false, networkmode, sample_type);
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rcx, %rbx
movl %edx, 0x8(%rsp)
movl %esi, %r14d
movq %rdi, %r15
callq 0xe448
leaq 0x88(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rbx), %rsi
movq %rbx, 0x10(%rsp)
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %rdi
callq 0xb78c
movq %r15, %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0xe4bc
movl %eax, %ebp
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0xe218
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x32f0
cmpl $-0x1, %ebp
je 0xe3c7
leaq 0x68(%rsp), %r12
xorl %ebx, %ebx
movl %ebp, 0xc(%rsp)
movq %r12, %r13
incl %ebx
xorl %ebp, %ebp
cmpl $0x5, %ebx
sete %bpl
movq %r15, %rdi
leaq 0x90b5(%rip), %rsi      # 0x172f9
callq 0xdf10
movq %rax, %rdi
movl %ebp, %esi
callq 0xa5c2
movq %r15, %rdi
callq 0xe554
movl %eax, %r12d
movl $0x1, %ebp
testl %r14d, %r14d
sete %cl
movl 0x2b0(%r15), %eax
testl %eax, %eax
setg %dl
testb %dl, %cl
jne 0xe293
cmpl $0x2, %r14d
je 0xe2ae
testl %eax, %eax
setg %al
cmpl $0x0, 0x2b4(%r15)
setg %cl
orb %al, %cl
je 0xe2ae
movq %r15, %rdi
movl %ebp, %esi
xorl %edx, %edx
movl $0x1, %ecx
movl %r12d, %r8d
xorl %r9d, %r9d
callq 0xe62a
incl %ebp
jmp 0xe263
movl %ebx, %eax
xorl $0x5, %eax
orl 0x8(%rsp), %eax
movq %r13, %r12
leaq 0x18(%rsp), %r13
movl 0xc(%rsp), %ebp
jne 0xe30e
leaq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %r13, %rdi
leaq 0x9020(%rip), %rsi      # 0x172f9
leaq 0x9022(%rip), %rdx      # 0x17302
callq 0xb190
movq %r15, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0xe716
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xe30e
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x32f0
movq %r15, %rdi
callq 0xebf6
cmpl $0x5, %ebx
je 0xe35f
movq %r12, 0x58(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rdi
callq 0xb78c
movq %r15, %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0xec6a
movl %eax, %ebp
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0xe35f
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x32f0
cmpl $0x5, %ebx
jne 0xe228
movq %r15, %rdi
callq 0xe448
leaq 0x48(%rsp), %rbx
movq %rbx, 0x38(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0xb78c
movq %r15, %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0xed80
movl %eax, %ebp
movq 0x38(%rsp), %rdi
cmpq %rbx, %rdi
je 0xe3b9
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x32f0
movl $0x0, %ebx
cmpl $-0x1, %ebp
jne 0xe228
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0xe43f
movq 0x88(%rsp), %rsi
jmp 0xe437
movq %rax, %rbx
jmp 0xe43f
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0xe43f
movq 0x28(%rsp), %rsi
jmp 0xe437
movq %rbx, %rcx
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %rcx, %rdi
je 0xe43f
movq 0x48(%rsp), %rsi
jmp 0xe437
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0xe43f
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x32f0
movq %rbx, %rdi
callq 0x3570
nop