LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/speech.C
// Function: Speech::ClearChannel(channelmode_t)
void Speech::ClearChannel(channelmode_t channelmode){
    if(_channel_map.find(channelmode) == _channel_map.end()){
        cout<<"Invalid channel type: "<<channelmode<<endl;
        exit(EXIT_FAILURE);
    }

    for(size_t i = 0; i < _channel_map[channelmode]->size(); ++i){
        Channel * channel = (*_channel_map[channelmode])[i]; 
        assert(channel);
        channel->Clear();
    }

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %r14
addq $0x48, %r14
leaq 0xc(%rsp), %rsi
movl %ebx, (%rsi)
movq %r14, %rdi
callq 0x57d0
testq %rax, %rax
je 0x45dc
xorl %r13d, %r13d
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movl %ebx, 0x8(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x5316
movq (%rax), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x3, %rcx
cmpq %rcx, %r13
jae 0x45b1
movl %ebx, 0x4(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x5316
movq (%rax), %rax
movq (%rax), %rax
movq (%rax,%r13,8), %rdi
testq %rdi, %rdi
je 0x45bf
callq 0x3bd8
incq %r13
jmp 0x4567
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1021e(%rip), %rdi     # 0x147e4
leaq 0xfb23(%rip), %rsi      # 0x140f0
leaq 0xfbbd(%rip), %rcx      # 0x14191
pushq $0x42
popq %rdx
callq 0x31b0
movq 0x1b9e5(%rip), %rdi     # 0x1ffc8
leaq 0xfb90(%rip), %rsi      # 0x1417a
callq 0x32a0
movq %rax, %rdi
movl %ebx, %esi
callq 0x3530
movq %rax, %rdi
callq 0x3160
pushq $0x1
popq %rdi
callq 0x3330
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/speech.C
// Function: Speech::Info()
void Speech::Info(){
    cout<<"# of input channels = "<<_channels.size()<<endl;
    for(int i = 0; i < _channels.size(); i++) cout<<_channels[i]->SizeSpikeT()<<"\t";
    cout<<endl;
    cout<<"# of reservoir channels = "<<_rChannels.size()<<endl;
    for(int i = 0; i < _rChannels.size(); i++) cout<<_rChannels[i]->SizeSpikeT()<<"\t";
    cout<<endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x1b912(%rip), %r14     # 0x1ffc8
leaq 0xfb53(%rip), %rsi      # 0x14210
movq %r14, %rdi
callq 0x32a0
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x31d0
movq %rax, %rdi
callq 0x3160
xorl %r12d, %r12d
leaq 0xf946(%rip), %r15      # 0x14030
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
jbe 0x4725
movq (%rax,%r12,8), %rax
movq 0x20(%rax), %rsi
subq 0x18(%rax), %rsi
shrq $0x2, %rsi
movq %r14, %rdi
callq 0x3530
movq %rax, %rdi
movq %r15, %rsi
callq 0x32a0
incq %r12
jmp 0x46ea
movq 0x1b89c(%rip), %r14     # 0x1ffc8
movq %r14, %rdi
callq 0x3160
leaq 0xfaec(%rip), %rsi      # 0x14227
movq %r14, %rdi
callq 0x32a0
movq 0x20(%rbx), %rsi
subq 0x18(%rbx), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x31d0
movq %rax, %rdi
callq 0x3160
xorl %r12d, %r12d
leaq 0xf8c7(%rip), %r15      # 0x14030
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
jbe 0x47a5
movq (%rax,%r12,8), %rax
movq 0x20(%rax), %rsi
subq 0x18(%rax), %rsi
shrq $0x2, %rsi
movq %r14, %rdi
callq 0x3530
movq %rax, %rdi
movq %r15, %rsi
callq 0x32a0
incq %r12
jmp 0x4769
movq 0x1b81c(%rip), %rdi     # 0x1ffc8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3160
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/speech.C
// Function: Speech::PrintSpikesPerChannels(std::vector<Channel*, std::allocator<Channel*>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Speech::PrintSpikesPerChannels(const vector<Channel*>& channels, const string & filename){
    ofstream f_out(filename.c_str());
    if(!f_out.is_open()){
        cout<<"Cannot open file : "<<filename<<" for dumping the spikes!"<<endl;
        assert(f_out.is_open());
    }
    f_out<<"-1\t-1"<<endl;
    for(int i = 0; i < channels.size(); i++){ 
        channels[i]->Print(f_out);
    }
    f_out<<"-1\t-1"<<endl;
    f_out.close();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdx, %r15
movq %rsi, %rbx
movq (%rdx), %rsi
movq %rsp, %rdi
pushq $0x10
popq %rdx
callq 0x32f0
leaq 0x70(%rsp), %r14
movq %r14, %rdi
callq 0x30a0
testb %al, %al
jne 0x482e
movq 0x1b7d4(%rip), %rdi     # 0x1ffc8
leaq 0xfa47(%rip), %rsi      # 0x14242
callq 0x32a0
movq %rax, %rdi
movq %r15, %rsi
callq 0x3250
leaq 0xfa44(%rip), %rsi      # 0x14256
movq %rax, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x3160
movq %r14, %rdi
callq 0x30a0
testb %al, %al
je 0x48a3
leaq 0xfa89(%rip), %rsi      # 0x142be
movq %rsp, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x3160
xorl %r15d, %r15d
movq %rsp, %r14
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
jbe 0x486f
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0x3be8
incq %r15
jmp 0x484b
leaq 0xfa48(%rip), %rsi      # 0x142be
movq %rsp, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x3160
movq %rsp, %rdi
callq 0x33e0
movq %rsp, %rdi
callq 0x3420
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
retq
leaq 0xf7d2(%rip), %rdi      # 0x1407c
leaq 0xf83f(%rip), %rsi      # 0x140f0
leaq 0xf9b7(%rip), %rcx      # 0x1426f
pushq $0x63
popq %rdx
callq 0x31b0
jmp 0x48c2
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3420
movq %rbx, %rdi
callq 0x3540
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/speech.C
// Function: Speech::PrintSpikeFreq(char const*, std::basic_ofstream<char, std::char_traits<char>>&)
int Speech::PrintSpikeFreq(const char * type, ofstream & f_out){
    assert(type);
    bool f;
    if(strcmp(type, "input") == 0) f = false;
    else if(strcmp(type, "reservoir") == 0) f = true;
    else assert(0);

    if(!f){
        SpikeFreq(f_out, _channels);	
    }
    else{
        SpikeFreq(f_out, _rChannels);
    }
    return _class;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x4cd3
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xf62e(%rip), %rsi      # 0x142c4
movq %r15, %rdi
callq 0x33d0
movq %rbx, %rdx
testl %eax, %eax
je 0x4cbc
leaq 0xf64d(%rip), %rsi      # 0x142f9
movq %r15, %rdi
callq 0x33d0
testl %eax, %eax
jne 0x4cf0
leaq 0x18(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4d10
movl 0x80(%rbx), %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0xf657(%rip), %rdi      # 0x14331
leaq 0xf40f(%rip), %rsi      # 0x140f0
leaq 0xf64e(%rip), %rcx      # 0x14336
pushq $0x7e
popq %rdx
callq 0x31b0
leaq 0x106b9(%rip), %rdi     # 0x153b0
leaq 0xf3f2(%rip), %rsi      # 0x140f0
leaq 0xf631(%rip), %rcx      # 0x14336
movl $0x82, %edx
callq 0x31b0
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/speech.C
// Function: Speech::SpikeFreq(std::basic_ofstream<char, std::char_traits<char>>&, std::vector<Channel*, std::allocator<Channel*>> const&)
void Speech::SpikeFreq(ofstream & f_out, const vector<Channel*> & channels){
    // find out the stop time for each speech:
    int stop_t = EndTime();

    for(int i = 0; i < channels.size(); i++){ 
        //f_out<<(double)channels[i]->SizeSpikeT()/stop_t<<"\t";
        f_out<<channels[i]->SizeSpikeT()<<"\t";
    }
    f_out<<endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
callq 0x4d7c
xorl %r12d, %r12d
leaq 0xf303(%rip), %r15      # 0x14030
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
jbe 0x4d68
movq (%rax,%r12,8), %rax
movq 0x20(%rax), %rsi
subq 0x18(%rax), %rsi
shrq $0x2, %rsi
movq %rbx, %rdi
callq 0x3530
movq %rax, %rdi
movq %r15, %rsi
callq 0x32a0
incq %r12
jmp 0x4d2d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3160
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/speech.C
// Function: Speech::EndTime()
int Speech::EndTime(){
    int stop_t = INT_MIN;
    for(int i = 0; i < _channels.size(); i++){
        assert(_channels[i]);
        stop_t = max(stop_t, _channels[i]->LastSpikeT());
    }
    if(stop_t == INT_MIN){
        cout<<"The speech:  "<<_index<<" contains "<<_channels.size()<<" input channels."<<endl;
        assert(stop_t != INT_MIN);
    }
    return stop_t;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movl $0x80000000, %eax       # imm = 0x80000000
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x4dbf
movq (%rcx,%rsi,8), %rdi
testq %rdi, %rdi
je 0x4dc7
movq 0x20(%rdi), %r8
cmpq %r8, 0x18(%rdi)
je 0x4db3
movl -0x4(%r8), %edi
jmp 0x4db5
xorl %edi, %edi
cmpl %edi, %eax
cmovlel %edi, %eax
incq %rsi
jmp 0x4d95
movl %eax, %ecx
negl %ecx
jo 0x4de6
popq %rbx
retq
leaq 0xf59d(%rip), %rdi      # 0x1436b
leaq 0xf31b(%rip), %rsi      # 0x140f0
leaq 0xf59c(%rip), %rcx      # 0x14378
movl $0x9d, %edx
callq 0x31b0
movq 0x1b1db(%rip), %rdi     # 0x1ffc8
leaq 0xf59a(%rip), %rsi      # 0x1438e
callq 0x32a0
movl 0x84(%rbx), %esi
movq %rax, %rdi
callq 0x3530
leaq 0xf58e(%rip), %rsi      # 0x1439c
movq %rax, %rdi
callq 0x32a0
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x31d0
leaq 0xf577(%rip), %rsi      # 0x143a7
movq %rax, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x3160
leaq 0xf571(%rip), %rdi      # 0x143b8
leaq 0xf2a2(%rip), %rsi      # 0x140f0
leaq 0xf523(%rip), %rcx      # 0x14378
movl $0xa2, %edx
callq 0x31b0
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/speech.C
// Function: Speech::CollectFreq(synapsetype_t, std::vector<double, std::allocator<double>>&, int)
void Speech::CollectFreq(synapsetype_t syn_t, vector<double>& fs, int end_t){
    vector<Channel*> tmp;
    vector<Channel*> & channels = syn_t == INPUT_SYN ? _channels : 
        syn_t == RESERVOIR_SYN ? _rChannels :
        syn_t == READOUT_SYN ? _oChannels : tmp;

    if(channels.empty()){
        cout<<"In Speech::CollectFreq(), you are reading: "<<syn_t<<" channels.\n "
            <<"Is the synapse type undefined or the channels are empty ?"<<endl;
        assert(!channels.empty());
    }
    if(end_t == 0){
        cout<<"The ending time of the speech is zero!!"<<endl;
        assert(end_t != 0);
    }
    for(size_t i = 0; i < channels.size(); ++i){
        assert(channels[i]);
        fs.push_back(((double)(channels[i]->SizeSpikeT()))/end_t);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r14
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
cmpl $0x1, %esi
je 0x4ea8
testl %r15d, %r15d
jne 0x4e97
addq $0x18, %r14
jmp 0x4ea8
addq $0x30, %r14
cmpl $0x2, %r15d
leaq 0x10(%rsp), %rax
cmovneq %rax, %r14
movq (%r14), %rax
movq 0x8(%r14), %rcx
cmpq %rcx, %rax
jne 0x4f08
movq 0x1b10d(%rip), %rdi     # 0x1ffc8
leaq 0xf508(%rip), %rsi      # 0x143ca
callq 0x32a0
movq %rax, %rdi
movl %r15d, %esi
callq 0x3530
leaq 0xf51d(%rip), %rsi      # 0x143f6
movq %rax, %rdi
callq 0x32a0
leaq 0xf51b(%rip), %rsi      # 0x14403
movq %rax, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x3160
movq (%r14), %rax
movq 0x8(%r14), %rcx
cmpq %rcx, %rax
je 0x4fd8
testl %ebp, %ebp
je 0x4f9e
cvtsi2sd %ebp, %xmm0
movsd %xmm0, (%rsp)
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r12
jae 0x4f68
movq (%rax,%r12,8), %rax
testq %rax, %rax
je 0x4f7f
movq 0x20(%rax), %rcx
subq 0x18(%rax), %rcx
shrq $0x2, %rcx
cvtsi2sd %ecx, %xmm0
divsd (%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x57ee
incq %r12
movq (%r14), %rax
movq 0x8(%r14), %rcx
jmp 0x4f21
leaq 0x10(%rsp), %rdi
callq 0x52e2
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf3e6(%rip), %rdi      # 0x1436c
leaq 0xf163(%rip), %rsi      # 0x140f0
leaq 0xf4bb(%rip), %rcx      # 0x1444f
movl $0xb8, %edx
callq 0x31b0
movq 0x1b023(%rip), %rdi     # 0x1ffc8
leaq 0xf4e2(%rip), %rsi      # 0x1448e
callq 0x32a0
movq %rax, %rdi
callq 0x3160
leaq 0xf4f6(%rip), %rdi      # 0x144b6
leaq 0xf129(%rip), %rsi      # 0x140f0
leaq 0xf481(%rip), %rcx      # 0x1444f
movl $0xb5, %edx
callq 0x31b0
leaq 0xf45e(%rip), %rdi      # 0x1443d
leaq 0xf10a(%rip), %rsi      # 0x140f0
leaq 0xf462(%rip), %rcx      # 0x1444f
movl $0xb1, %edx
callq 0x31b0
jmp 0x4ff9
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x52e2
movq %rbx, %rdi
callq 0x3540
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/neuron.C
// Function: Neuron::GetSpikeTimes(std::vector<int, std::allocator<int>>&)
void Neuron::GetSpikeTimes(vector<int>& times){
    if((_name[0] == 'o' || _name[0] == 'h') || !_fire_timings.empty()){
        times = _fire_timings;
    }
    else{
        if(_lsm_channel == NULL){
            times = vector<int>();
        }
        else
            _lsm_channel->GetAllSpikes(times);
    }
}

// Assembly:
movq %rsi, %rcx
movq %rdi, %rax
movq 0x10(%rdi), %rdx
movzbl (%rdx), %edx
cmpl $0x68, %edx
je 0x655d
cmpl $0x6f, %edx
je 0x655d
movq 0x88(%rax), %rdx
cmpq 0x90(%rax), %rdx
je 0x656e
addq $0x88, %rax
movq %rcx, %rdi
movq %rax, %rsi
jmp 0x8ca4
movq 0x210(%rax), %rsi
testq %rsi, %rsi
je 0x6586
addq $0x18, %rsi
movq %rcx, %rdi
jmp 0x8ca4
pushq %rbx
subq $0x20, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq %rcx, %rdi
movq %rbx, %rsi
callq 0x93ce
movq %rbx, %rdi
callq 0x520c
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/neuron.C
// Function: Neuron::CollectPreSynAct(double&, double&, int&)
void Neuron::CollectPreSynAct(double& p_n, double& avg_i_n, int& max_i_n){
    if(_presyn_act.empty()){
        cout<<"Do you forget to record the pre-synaptic firing activities??\n"
            <<"Or do you mistakenly clear the vector<bool> _presyn_act ?"<<endl;
        assert(!_presyn_act.empty());
    }

    int sum_intvl = 0, cnt_f = 0, max_i = 0;
    int start = -1;
    for(int i = 0; i < _presyn_act.size(); ++i){
        if(_presyn_act[i]){
            ++cnt_f;
            max_i = max(max_i, i - start - 1);
            sum_intvl += i - start - 1;
            start = i;
        }
    }
    max_i = max(max_i, (int)_presyn_act.size() - start - 1);
    sum_intvl += _presyn_act.size() - start - 1;

    p_n = ((double)cnt_f)/((double)_presyn_act.size());
    avg_i_n = ((double)sum_intvl)/(cnt_f+1);
    max_i_n = max_i;
    // clear the presynaptic neuron activity vector after visiting it!
    _presyn_act.clear();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
movq 0x60(%rdi), %rax
movq 0x70(%rdi), %rcx
movl 0x78(%rdi), %edx
cmpq %rcx, %rax
sete %sil
testl %edx, %edx
sete %dil
testb %dil, %sil
je 0x667d
movq 0x19994(%rip), %rdi     # 0x1ffc8
leaq 0xe204(%rip), %rsi      # 0x1483f
callq 0x32a0
leaq 0xe236(%rip), %rsi      # 0x1487d
movq %rax, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x3160
movq 0x60(%r14), %rax
movq 0x70(%r14), %rcx
movl 0x78(%r14), %edx
cmpq %rcx, %rax
sete %sil
testl %edx, %edx
sete %dil
andb %sil, %dil
cmpb $0x1, %dil
je 0x673f
leaq 0x60(%r14), %rsi
movq %rsi, 0x20(%rsp)
pushq $-0x1
popq %r15
xorl %ebp, %ebp
xorl %ebx, %ebx
xorl %r13d, %r13d
xorl %r12d, %r12d
subq %rax, %rcx
movl %edx, %edx
leaq (%rdx,%rcx,8), %rcx
cmpq %rbp, %rcx
jbe 0x66df
movq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x8d6e
testq %rdx, (%rax)
je 0x66ce
incl %r12d
leal -0x1(%rbp), %eax
subl %r15d, %eax
cmpl %eax, %ebx
cmovlel %eax, %ebx
addl %ebp, %r13d
decl %r13d
subl %r15d, %r13d
movl %ebp, %r15d
incq %rbp
movq 0x60(%r14), %rax
movq 0x70(%r14), %rcx
movl 0x78(%r14), %edx
jmp 0x6694
notl %r15d
addl %ecx, %r15d
cmpl %r15d, %ebx
cmovlel %r15d, %ebx
addl %r13d, %r15d
cvtsi2sd %r12d, %xmm0
cvtsi2sd %rcx, %xmm1
cvtsi2sd %r15d, %xmm2
divsd %xmm1, %xmm0
incl %r12d
cvtsi2sd %r12d, %xmm1
movq 0x8(%rsp), %rcx
movsd %xmm0, (%rcx)
divsd %xmm1, %xmm2
movq 0x10(%rsp), %rcx
movsd %xmm2, (%rcx)
movq 0x18(%rsp), %rcx
movl %ebx, (%rcx)
movq %rax, 0x70(%r14)
andl $0x0, 0x78(%r14)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe171(%rip), %rdi      # 0x148b7
leaq 0xe01c(%rip), %rsi      # 0x14769
leaq 0xe178(%rip), %rcx      # 0x148cc
movl $0x1c9, %edx            # imm = 0x1C9
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/neuron.C
// Function: Neuron::WriteOutputWeights(std::basic_ofstream<char, std::char_traits<char>>&, int&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Neuron::WriteOutputWeights(ofstream& f_out, int& index, const string& post_g){
    for(Synapse* synapse : _outputSyns){
        assert(synapse);
        string post_name(synapse->PostNeuron()->Name());

        if(post_name.substr(0, post_g.length()) != post_g)   continue;
        f_out<<index++<<"\t"<<_name<<"\t"<<synapse->PostNeuron()->Name()<<"\t"
             <<synapse->Weight()<<endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %rbx
movq %rdx, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rdi), %r14
movq %rdi, 0x8(%rsp)
movq 0x20(%rdi), %rax
movq %rax, 0x20(%rsp)
leaq 0x28(%rsp), %r13
leaq 0x48(%rsp), %rbp
cmpq 0x20(%rsp), %r14
je 0x6886
movq (%r14), %r12
testq %r12, %r12
je 0x6895
movq %r12, %rdi
callq 0xa8a4
movq 0x10(%rax), %rsi
movq %r13, %rdi
movq %rbp, %rdx
callq 0x8d8c
movq 0x8(%rbx), %rcx
movq %rbp, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x32e0
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x8dc7
movl %eax, %r15d
movq %rbp, %rdi
callq 0x3150
testb %r15b, %r15b
jne 0x6875
movq 0x18(%rsp), %rcx
movl (%rcx), %esi
leal 0x1(%rsi), %eax
movl %eax, (%rcx)
movq 0x10(%rsp), %rdi
callq 0x3530
movq %rax, %rdi
leaq 0xd81d(%rip), %rsi      # 0x14030
callq 0x32a0
movq 0x8(%rsp), %rcx
movq 0x10(%rcx), %rsi
movq %rax, %rdi
callq 0x32a0
movq %rax, %rdi
leaq 0xd7fd(%rip), %rsi      # 0x14030
callq 0x32a0
movq %rax, %r15
movq %r12, %rdi
callq 0xa8a4
movq 0x10(%rax), %rsi
movq %r15, %rdi
callq 0x32a0
movq %rax, %rdi
leaq 0xd7d7(%rip), %rsi      # 0x14030
callq 0x32a0
movsd 0x38(%r12), %xmm0
movq %rax, %rdi
callq 0x34d0
movq %rax, %rdi
callq 0x3160
movq %r13, %rdi
callq 0x3150
addq $0x8, %r14
jmp 0x6795
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xfda6(%rip), %rdi      # 0x16642
leaq 0xdec6(%rip), %rsi      # 0x14769
leaq 0xe05b(%rip), %rcx      # 0x14905
movl $0x207, %edx            # imm = 0x207
callq 0x31b0
jmp 0x68b6
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3150
movq %rbx, %rdi
callq 0x3540
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/neuron.C
// Function: Neuron::DisableOutputSyn(synapsetype_t)
void Neuron::DisableOutputSyn(synapsetype_t syn_t){
    for(Synapse* synapse : _outputSyns){
        bool flag = syn_t == INPUT_SYN ? synapse->IsInputSyn() :
            syn_t == READOUT_SYN ? synapse->IsReadoutSyn() : 
            syn_t == RESERVOIR_SYN ? synapse->IsLiquidSyn() : false;
        if(flag){
            synapse->DisableStatus(true);
        }
    }

}

// erase the ptr of the input syns given the name of the presynaptic neuron
void Neuron::LSMDeleteInputSynapse(char * pre_name){
    Neuron * pre;
    for(auto iter = _inputSyns.begin(); iter != _inputSyns.end(); ){
        pre = (*iter)->PreNeuron();
        assert(pre != NULL);
        //cout<<pre->Name()<<endl;
        if(strcmp(pre->Name(),pre_name) == 0){
            iter = _inputSyns.erase(iter);
            break;
        }
        else
            iter++;	       
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq 0x18(%rdi), %r15
movq 0x20(%rdi), %r12
cmpq %r12, %r15
je 0x691e
movq (%r15), %r14
testl %ebx, %ebx
je 0x6915
cmpl $0x2, %ebx
je 0x68fe
cmpl $0x1, %ebx
jne 0x690f
movq %r14, %rdi
callq 0xa780
jmp 0x6906
movq %r14, %rdi
callq 0xa75a
testb %al, %al
je 0x690f
movb $0x1, 0x13(%r14)
addq $0x8, %r15
jmp 0x68de
cmpb $0x1, 0x12(%r14)
je 0x690a
jmp 0x690f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/neuron.C
// Function: Neuron::RMZeroSyns(synapsetype_t, char const*)
int Neuron::RMZeroSyns(synapsetype_t syn_t, const char * t){
    bool f;
    int cnt = 0;
    if(strcmp(t, "in") == 0)  f = false;
    else if(strcmp(t, "out") == 0)  f = true;
    else assert(0);
    vector<Synapse*>& syns = !f ? _inputSyns : _outputSyns;

    for(auto iter = syns.begin(); iter != syns.end(); ){
        assert(*iter);
        bool flag = syn_t == INPUT_SYN ? (*iter)->IsInputSyn() :
            syn_t == READOUT_SYN ? (*iter)->IsReadoutSyn() : 
            syn_t == RESERVOIR_SYN ? (*iter)->IsLiquidSyn() : false;
        flag &= (*iter)->IsWeightZero();
        if(flag){
            (*iter)->DisableStatus(true); 
            iter = syns.erase(iter);
            cnt++;
        }
        else
            iter++;	       
    }
    return cnt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r15
cmpb $0x69, (%rdx)
jne 0x69cd
cmpb $0x6e, 0x1(%rdx)
jne 0x69cd
cmpb $0x0, 0x2(%rdx)
je 0x6a63
leaq 0xff7c(%rip), %rsi      # 0x16950
movq %rdx, %rdi
callq 0x33d0
testl %eax, %eax
jne 0x6a89
pushq $0x18
popq %rax
leaq (%r15,%rax), %r14
movq (%r15,%rax), %r15
xorl %ebp, %ebp
cmpq 0x8(%r14), %r15
je 0x6a56
movq (%r15), %rdi
testq %rdi, %rdi
je 0x6a6a
testl %ebx, %ebx
je 0x6a1b
cmpl $0x2, %ebx
je 0x6a14
cmpl $0x1, %ebx
jne 0x6a20
callq 0xa780
jmp 0x6a19
callq 0xa75a
jmp 0x6a22
movb 0x12(%rdi), %al
jmp 0x6a22
xorl %eax, %eax
testb %al, %al
je 0x6a3a
movq (%r15), %rax
movsd 0x38(%rax), %xmm0
ucomisd 0xdcaa(%rip), %xmm0     # 0x146e0
jne 0x6a3a
jnp 0x6a40
addq $0x8, %r15
jmp 0x69f1
movb $0x1, 0x13(%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x8dd2
movq %rax, %r15
incl %ebp
jmp 0x69f1
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x30
jmp 0x69e6
leaq 0xdf45(%rip), %rdi      # 0x149b6
leaq 0xdcf1(%rip), %rsi      # 0x14769
leaq 0xdf03(%rip), %rcx      # 0x14982
movl $0x239, %edx            # imm = 0x239
callq 0x31b0
leaq 0xe920(%rip), %rdi      # 0x153b0
leaq 0xdcd2(%rip), %rsi      # 0x14769
leaq 0xdee4(%rip), %rcx      # 0x14982
movl $0x235, %edx            # imm = 0x235
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/neuron.C
// Function: Neuron::DeleteSyn(char const*, char)
void Neuron::DeleteSyn(const char * t, const char s){
    bool f;
    if(strcmp(t, "in") == 0)  f = false;
    else if(strcmp(t, "out") == 0)  f = true;
    else assert(0);
    vector<Synapse*>& syns = !f ? _inputSyns : _outputSyns;

    // delete all the input synapses starts with 's':
    for(auto it=syns.begin();it != syns.end(); ){
        Neuron * pre = (*it)->PreNeuron();  assert(pre);
        char * pre_name = pre->Name();  assert(pre_name);
        if(pre_name[0] == s)   it = syns.erase(it);
        else ++it;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rdi, %r15
cmpb $0x69, (%rsi)
jne 0x6ac3
cmpb $0x6e, 0x1(%rsi)
jne 0x6ac3
cmpb $0x0, 0x2(%rsi)
je 0x6b24
leaq 0xfe86(%rip), %rax      # 0x16950
movq %rsi, %rdi
movq %rax, %rsi
callq 0x33d0
testl %eax, %eax
jne 0x6b66
pushq $0x18
popq %rax
leaq (%r15,%rax), %r14
movq (%r15,%rax), %r15
cmpq 0x8(%r14), %r15
je 0x6b1e
movq (%r15), %rdi
callq 0xa8a0
testq %rax, %rax
je 0x6b28
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x6b47
cmpb %bl, (%rax)
jne 0x6b18
movq %r14, %rdi
movq %r15, %rsi
callq 0x8dd2
movq %rax, %r15
jmp 0x6ae8
addq $0x8, %r15
jmp 0x6ae8
popq %rbx
popq %r14
popq %r15
retq
pushq $0x30
jmp 0x6adf
leaq 0xdebe(%rip), %rdi      # 0x149ed
leaq 0xdc33(%rip), %rsi      # 0x14769
leaq 0xde7f(%rip), %rcx      # 0x149bc
movl $0x255, %edx            # imm = 0x255
callq 0x31b0
leaq 0xdea3(%rip), %rdi      # 0x149f1
leaq 0xdc14(%rip), %rsi      # 0x14769
leaq 0xde60(%rip), %rcx      # 0x149bc
movl $0x256, %edx            # imm = 0x256
callq 0x31b0
leaq 0xe843(%rip), %rdi      # 0x153b0
leaq 0xdbf5(%rip), %rsi      # 0x14769
leaq 0xde41(%rip), %rcx      # 0x149bc
movl $0x250, %edx            # imm = 0x250
callq 0x31b0
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/neuron.C
// Function: Neuron::PrintSyn(std::basic_ofstream<char, std::char_traits<char>>&, char const*, char)
void Neuron::PrintSyn(ofstream& f_out, const char * t, const char s){
    bool f;
    if(strcmp(t, "in") == 0)  f = false;
    else if(strcmp(t, "out") == 0)  f = true;
    else assert(0);
    vector<Synapse*>& syns = !f ? _inputSyns : _outputSyns;

    // print all the input synapses starts with 's':
    for(auto it=syns.begin();it != syns.end(); ++it){
        Neuron * neu = !f ? (*it)->PreNeuron() : (*it)->PostNeuron();  assert(neu);
        char * name = neu->Name();  assert(name);
        if(name[0] == s){
            if(!f)
                f_out<<name<<"\t"<<_name;
            else
                f_out<<_name<<"\t"<<name;
        }   
    }
    f_out<<endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rsi, (%rsp)
movq %rdi, %r15
cmpb $0x69, (%rdx)
jne 0x6baf
cmpb $0x6e, 0x1(%rdx)
jne 0x6baf
cmpb $0x0, 0x2(%rdx)
je 0x6c7b
leaq 0xfd9a(%rip), %rsi      # 0x16950
movq %rdx, %rdi
callq 0x33d0
testl %eax, %eax
jne 0x6cc4
pushq $0x18
popq %rbp
xorl %r12d, %r12d
movq (%r15,%rbp), %r14
cmpq 0x8(%r15,%rbp), %r14
je 0x6c64
movq (%r14), %rdi
testb %r12b, %r12b
je 0x6bea
callq 0xa8a0
jmp 0x6bef
callq 0xa8a4
testq %rax, %rax
je 0x6c86
movq 0x10(%rax), %r13
testq %r13, %r13
je 0x6ca5
cmpb %bl, (%r13)
jne 0x6c5b
testb %r12b, %r12b
je 0x6c34
movq (%rsp), %rdi
movq %r13, %rsi
callq 0x32a0
movq %rax, %rdi
leaq 0xd40a(%rip), %rsi      # 0x14030
callq 0x32a0
movq 0x10(%r15), %rsi
movq %rax, %rdi
jmp 0x6c56
movq 0x10(%r15), %rsi
movq (%rsp), %rdi
callq 0x32a0
movq %rax, %rdi
leaq 0xd3e5(%rip), %rsi      # 0x14030
callq 0x32a0
movq %rax, %rdi
movq %r13, %rsi
callq 0x32a0
addq $0x8, %r14
jmp 0x6bd0
movq (%rsp), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3160
pushq $0x30
popq %rbp
movb $0x1, %r12b
jmp 0x6bcc
leaq 0xdda9(%rip), %rdi      # 0x14a36
leaq 0xdad5(%rip), %rsi      # 0x14769
leaq 0xdd5f(%rip), %rcx      # 0x149fa
movl $0x268, %edx            # imm = 0x268
callq 0x31b0
leaq 0xdd49(%rip), %rdi      # 0x149f5
leaq 0xdab6(%rip), %rsi      # 0x14769
leaq 0xdd40(%rip), %rcx      # 0x149fa
movl $0x269, %edx            # imm = 0x269
callq 0x31b0
leaq 0xe6e5(%rip), %rdi      # 0x153b0
leaq 0xda97(%rip), %rsi      # 0x14769
leaq 0xdd21(%rip), %rcx      # 0x149fa
movl $0x263, %edx            # imm = 0x263
callq 0x31b0
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/neuron.C
// Function: Neuron::GetInputSynSqSum(double)
double Neuron::GetInputSynSqSum(double weight_limit){
    if(_inputsyn_sq_sum == -1){
        double sum = 0;
        for(auto it = _inputSyns.begin(); it != _inputSyns.end(); ++it){
            double weight = (*it)->Weight();
            sum += (weight/weight_limit)*(weight/weight_limit);
        }
        _inputsyn_sq_sum = _inputSyns.empty() ? 0 : sum/_inputSyns.size();
    }
    return _inputsyn_sq_sum;
}

// Assembly:
movsd 0x1e0(%rdi), %xmm1
ucomisd 0xd9a0(%rip), %xmm1     # 0x146b8
jne 0x6d88
jp 0x6d88
movq 0x30(%rdi), %rcx
movq 0x38(%rdi), %rax
xorpd %xmm2, %xmm2
movq %rcx, %rdx
cmpq %rax, %rdx
je 0x6d4a
movq (%rdx), %rsi
movsd 0x38(%rsi), %xmm1
divsd %xmm0, %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm2
addq $0x8, %rdx
jmp 0x6d2b
xorpd %xmm1, %xmm1
subq %rcx, %rax
je 0x6d80
sarq $0x3, %rax
movq %rax, %xmm0
punpckldq 0xd8cc(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xd8d4(%rip), %xmm0     # 0x14640
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd %xmm1, %xmm2
movapd %xmm2, %xmm1
movsd %xmm1, 0x1e0(%rdi)
movapd %xmm1, %xmm0
retq
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/neuron.C
// Function: BiasNeuron::LSMNextTimeStep(int, _IO_FILE*, bool, int)
void BiasNeuron::LSMNextTimeStep(int t, FILE * Foutp, bool train, int end_time){
    assert(_mode == NORMAL);
    _fired = false;
    if(t % _dummy_freq == 0){
        HandleFiringActivity(true, t, train);
        _fired = true;
        ++_f_count;
        assert(t > (_fire_timings.empty() ? -1 : _fire_timings.back()));
        _fire_timings.push_back(t);
    }  
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, 0x4(%rsp)
cmpl $0x3, 0x8(%rdi)
jne 0x6e30
movl %esi, %ebp
movq %rdi, %rbx
movb $0x0, 0x130(%rdi)
movl %esi, %eax
cltd
idivl 0x21c(%rdi)
testl %edx, %edx
jne 0x6e29
movzbl %cl, %ecx
pushq $0x1
popq %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x8bbe
movb $0x1, 0x130(%rbx)
incl 0x12c(%rbx)
movq 0x90(%rbx), %rax
cmpq %rax, 0x88(%rbx)
je 0x6e0e
movl -0x4(%rax), %eax
jmp 0x6e11
pushq $-0x1
popq %rax
cmpl %ebp, %eax
jge 0x6e4f
addq $0x88, %rbx
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x3d58
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xdc03(%rip), %rdi      # 0x14a3a
leaq 0xd92b(%rip), %rsi      # 0x14769
leaq 0xdc05(%rip), %rcx      # 0x14a4a
movl $0x297, %edx            # imm = 0x297
callq 0x31b0
leaq 0xd8db(%rip), %rdi      # 0x14731
leaq 0xd90c(%rip), %rsi      # 0x14769
leaq 0xdbe6(%rip), %rcx      # 0x14a4a
movl $0x29d, %edx            # imm = 0x29D
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/neuron.C
// Function: NeuronGroup::Collect4State(int&, int&, int&, int&, int&, int&, int&, int&, int&)
void NeuronGroup::Collect4State(int& ep_max, int& ep_min, int& ip_max, int& ip_min, 
        int& en_max, int& en_min, int& in_max, int& in_min, int& pre_active_max)
{
    for(size_t i = 0; i < _neurons.size(); ++i){
        assert(_neurons[i]);
        ep_max = max(ep_max, _neurons[i]->GetEPMax()), ep_min = min(ep_min, _neurons[i]->GetEPMin());
        en_max = max(en_max, _neurons[i]->GetENMax()), en_min = min(en_min, _neurons[i]->GetENMin());
        ip_max = max(ip_max, _neurons[i]->GetIPMax()), ip_min = min(ip_min, _neurons[i]->GetIPMin());
        in_max = max(in_max, _neurons[i]->GetINMax()), in_min = min(in_min, _neurons[i]->GetINMin());
        pre_active_max = max(pre_active_max, _neurons[i]->GetPreActiveMax());
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x58(%rsp), %rax
movq 0x50(%rsp), %r10
movq 0x48(%rsp), %r11
movq 0x40(%rsp), %rbx
movq 0x28(%rdi), %r14
movq 0x30(%rdi), %rdi
subq %r14, %rdi
sarq $0x3, %rdi
xorl %r15d, %r15d
cmpq %rdi, %r15
jae 0x7dd1
movq (%r14,%r15,8), %r12
testq %r12, %r12
je 0x7de0
movl 0x144(%r12), %ebp
movl (%rsi), %r13d
cmpl %ebp, %r13d
cmovgl %r13d, %ebp
movl %ebp, (%rsi)
movl 0x148(%r12), %ebp
movl (%rdx), %r13d
cmpl %r13d, %ebp
cmovll %ebp, %r13d
movl %r13d, (%rdx)
movl 0x14c(%r12), %ebp
movl (%r9), %r13d
cmpl %ebp, %r13d
cmovgl %r13d, %ebp
movl %ebp, (%r9)
movl 0x150(%r12), %ebp
movl (%rbx), %r13d
cmpl %r13d, %ebp
cmovll %ebp, %r13d
movl %r13d, (%rbx)
movl 0x154(%r12), %ebp
movl (%rcx), %r13d
cmpl %ebp, %r13d
cmovgl %r13d, %ebp
movl %ebp, (%rcx)
movl 0x158(%r12), %ebp
movl (%r8), %r13d
cmpl %r13d, %ebp
cmovll %ebp, %r13d
movl %r13d, (%r8)
movl 0x15c(%r12), %ebp
movl (%r11), %r13d
cmpl %ebp, %r13d
cmovgl %r13d, %ebp
movl %ebp, (%r11)
movl 0x160(%r12), %ebp
movl (%r10), %r13d
cmpl %r13d, %ebp
cmovll %ebp, %r13d
movl %r13d, (%r10)
movl 0x164(%r12), %ebp
movl (%rax), %r12d
cmpl %ebp, %r12d
cmovgl %r12d, %ebp
movl %ebp, (%rax)
incq %r15
jmp 0x7cf9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd021(%rip), %rdi      # 0x14e08
leaq 0xc97b(%rip), %rsi      # 0x14769
leaq 0xd01f(%rip), %rcx      # 0x14e14
movl $0x3ce, %edx            # imm = 0x3CE
callq 0x31b0
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/neuron.C
// Function: NeuronGroup::CollectPreSynAct(double&, double&, int&)
void NeuronGroup::CollectPreSynAct(double & p_r, double & avg_i_r, int & max_i_r){
    double p_n = 0.0, avg_i_n = 0.0;
    int max_i_n = 0;
    for(size_t i = 0; i < _neurons.size(); ++i){
        assert(_neurons[i]);
        _neurons[i]->CollectPreSynAct(p_n, avg_i_n, max_i_n);
        p_r += p_n,  avg_i_r += avg_i_n, max_i_r = max(max_i_r, max_i_n);
    }
    p_r = _neurons.empty() ? 0 : p_r/((double)_neurons.size());
    avg_i_r = _neurons.empty() ? 0 : avg_i_r/((double)_neurons.size());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
leaq 0x10(%rsp), %rax
andq $0x0, (%rax)
leaq 0x8(%rsp), %rax
andq $0x0, (%rax)
leaq 0x4(%rsp), %r13
andl $0x0, (%r13)
xorl %ebp, %ebp
movq 0x28(%r12), %rcx
movq 0x30(%r12), %rdx
movq %rdx, %rax
subq %rcx, %rax
sarq $0x3, %rax
cmpq %rax, %rbp
jae 0x7ea2
movq (%rcx,%rbp,8), %rdi
testq %rdi, %rdi
je 0x7efb
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %r13, %rcx
callq 0x65f0
movsd 0x10(%rsp), %xmm0
addsd (%r14), %xmm0
movsd %xmm0, (%r14)
movsd 0x8(%rsp), %xmm0
addsd (%rbx), %xmm0
movsd %xmm0, (%rbx)
movl (%r15), %eax
movl 0x4(%rsp), %ecx
cmpl %ecx, %eax
cmovgl %eax, %ecx
movl %ecx, (%r15)
incq %rbp
jmp 0x7e38
cmpq %rdx, %rcx
je 0x7ee0
movq %rax, %xmm0
punpckldq 0xc77c(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xc784(%rip), %xmm0     # 0x14640
movsd (%r14), %xmm1
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2            # xmm2 = xmm2[1],xmm0[1]
addsd %xmm0, %xmm2
divsd %xmm2, %xmm1
movsd %xmm1, (%r14)
movsd (%rbx), %xmm0
divsd %xmm2, %xmm0
jmp 0x7ee8
andq $0x0, (%r14)
xorpd %xmm0, %xmm0
movsd %xmm0, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcf06(%rip), %rdi      # 0x14e08
leaq 0xc860(%rip), %rsi      # 0x14769
leaq 0xcf63(%rip), %rcx      # 0x14e73
movl $0x3dd, %edx            # imm = 0x3DD
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/neuron.C
// Function: NeuronGroup::MaxFireCount()
int NeuronGroup::MaxFireCount(){
    int max_count = -1;
    for(int i = 0; i < _neurons.size(); ++i){
        assert(_neurons[i]);
        max_count = max(_neurons[i]->FireCount(), max_count);
    }
    return max_count;
}

// Assembly:
pushq %rax
movq 0x28(%rdi), %rcx
movq 0x30(%rdi), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
pushq $-0x1
popq %rax
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x80fb
movq (%rcx,%rsi,8), %rdi
testq %rdi, %rdi
je 0x80fd
movl 0x12c(%rdi), %edi
cmpl %eax, %edi
cmovgl %edi, %eax
incq %rsi
jmp 0x80dd
popq %rcx
retq
leaq 0xcd04(%rip), %rdi      # 0x14e08
leaq 0xc65e(%rip), %rsi      # 0x14769
leaq 0xcddc(%rip), %rcx      # 0x14eee
movl $0x3fe, %edx            # imm = 0x3FE
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/neuron.C
// Function: NeuronGroup::WriteSynWeightsToFile(std::basic_ofstream<char, std::char_traits<char>>&, int&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void NeuronGroup::WriteSynWeightsToFile(ofstream& f_out, int& index, const string& post_g){
    for(Neuron* neuron : _neurons){
        assert(neuron);
        neuron->WriteOutputWeights(f_out, index, post_g);
    }
    if(_b_neuron)   _b_neuron->WriteOutputWeights(f_out, index, post_g);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq 0x28(%rdi), %r13
movq 0x30(%rdi), %rbp
cmpq %rbp, %r13
je 0x815d
movq (%r13), %rdi
testq %rdi, %rdi
je 0x8192
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x675e
addq $0x8, %r13
jmp 0x813b
movq 0x48(%r12), %rdi
testq %rdi, %rdi
je 0x8183
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x675e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcd75(%rip), %rdi      # 0x14f0e
leaq 0xc5c9(%rip), %rsi      # 0x14769
leaq 0xcd6e(%rip), %rcx      # 0x14f15
movl $0x407, %edx            # imm = 0x407
callq 0x31b0
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/neuron.C
// Function: NeuronGroup::LSMSetTeacherSignal(int)
void NeuronGroup::LSMSetTeacherSignal(int index){
    assert((index >= 0)&&(index < _neurons.size()));
    for(int i = 0; i < _neurons.size(); i++) _neurons[i]->SetTeacherSignal(-1);
    _neurons[index]->SetTeacherSignal(1);
    //  cout<<"Teacher Signal Set!!!"<<endl;
}

// Assembly:
pushq %rax
testl %esi, %esi
js 0x8672
movl %esi, %eax
movq 0x28(%rdi), %rcx
movq 0x30(%rdi), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rax, %rdx
jbe 0x8672
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x8662
movq (%rcx,%rsi,8), %rdi
orl $-0x1, 0x114(%rdi)
incq %rsi
jmp 0x864d
movq (%rcx,%rax,8), %rax
movl $0x1, 0x114(%rax)
popq %rax
retq
leaq 0xc68a(%rip), %rdi      # 0x14d03
leaq 0xc0e9(%rip), %rsi      # 0x14769
leaq 0xc9e6(%rip), %rcx      # 0x1506d
movl $0x448, %edx            # imm = 0x448
callq 0x31b0
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/neuron.C
// Function: NeuronGroup::LSMRemoveTeacherSignal(int)
void NeuronGroup::LSMRemoveTeacherSignal(int index){
    assert((index >= 0)&&(index < _neurons.size()));
    //  _neurons[index]->SetTeacherSignal(0);
    for(int i = 0; i < _neurons.size(); i++) _neurons[i]->SetTeacherSignal(0);
    //  cout<<"Teacher Sginal Removed..."<<endl;
}

// Assembly:
pushq %rax
testl %esi, %esi
js 0x86c6
movl %esi, %edx
movq 0x28(%rdi), %rax
movq 0x30(%rdi), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rdx, %rcx
jbe 0x86c6
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x86c4
movq (%rax,%rdx,8), %rsi
andl $0x0, 0x114(%rsi)
incq %rdx
jmp 0x86af
popq %rax
retq
leaq 0xc636(%rip), %rdi      # 0x14d03
leaq 0xc095(%rip), %rsi      # 0x14769
leaq 0xc9bd(%rip), %rcx      # 0x15098
movl $0x44f, %edx            # imm = 0x44F
callq 0x31b0
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/neuron.C
// Function: NeuronGroup::PrintResSyn(std::basic_ofstream<char, std::char_traits<char>>&)
void NeuronGroup::PrintResSyn(ofstream & f_out){
    assert(f_out.is_open());
    for(size_t i = 0; i < _neurons.size(); ++i){
        _neurons[i]->PrintSyn(f_out,"in", 'r');
        _neurons[i]->PrintSyn(f_out,"out", 'r');
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x70(%rsi), %rdi
callq 0x30a0
testb %al, %al
je 0x8802
xorl %r13d, %r13d
leaq 0xc1d5(%rip), %r15      # 0x1497f
pushq $0x72
popq %rbp
leaq 0xe19c(%rip), %r12      # 0x16950
movq 0x28(%r14), %rax
movq 0x30(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r13
jae 0x87f3
movq (%rax,%r13,8), %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x6b86
movq 0x28(%r14), %rax
movq (%rax,%r13,8), %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x6b86
incq %r13
jmp 0x87b4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb873(%rip), %rdi      # 0x1407c
leaq 0xbf59(%rip), %rsi      # 0x14769
leaq 0xc8af(%rip), %rcx      # 0x150c6
movl $0x466, %edx            # imm = 0x466
callq 0x31b0
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/neuron.C
// Function: NeuronGroup::RemoveZeroSyns(synapsetype_t)
void NeuronGroup::RemoveZeroSyns(synapsetype_t syn_type){
    int cnt = 0;
    for(size_t i = 0; i < _neurons.size(); ++i){
        assert(_neurons[i]);
        cnt += _neurons[i]->RMZeroSyns(syn_type, "in");
        cnt += _neurons[i]->RMZeroSyns(syn_type, "out");
    }
    cout<<"The number of zero-out synapses: "<<cnt/2<<endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r15
xorl %r14d, %r14d
leaq 0xe114(%rip), %r13      # 0x16950
xorl %r12d, %r12d
movq 0x28(%r15), %rax
movq 0x30(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r12
jae 0x888c
movq (%rax,%r12,8), %rdi
testq %rdi, %rdi
je 0x88c8
movl %ebx, %esi
leaq 0xc11a(%rip), %rdx      # 0x1497f
callq 0x69ac
movl %eax, %ebp
addl %r14d, %ebp
movq 0x28(%r15), %rax
movq (%rax,%r12,8), %rdi
movl %ebx, %esi
movq %r13, %rdx
callq 0x69ac
movl %eax, %r14d
addl %ebp, %r14d
incq %r12
jmp 0x883f
movq 0x17735(%rip), %rdi     # 0x1ffc8
leaq 0xc886(%rip), %rsi      # 0x15120
callq 0x32a0
movq %rax, %rdi
pushq $0x2
popq %rcx
movl %r14d, %eax
cltd
idivl %ecx
movl %eax, %esi
callq 0x3530
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3160
leaq 0xc539(%rip), %rdi      # 0x14e08
leaq 0xbe93(%rip), %rsi      # 0x14769
leaq 0xc813(%rip), %rcx      # 0x150f0
movl $0x471, %edx            # imm = 0x471
callq 0x31b0
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/neuron.C
// Function: Neuron::HandleFiringActivity(bool, int, bool)
inline void Neuron::HandleFiringActivity(bool isInput, int time, bool train){

    for(Synapse * synapse : _outputSyns){
        // need to get rid of the deactivated neuron !
        if(synapse->PostNeuron()->LSMCheckNeuronMode(DEACTIVATED) == true)  continue;

        // need to get rid of the deactivated synapse !
        if(synapse->DisableStatus())  continue;
    
        synapse->LSMDeliverSpike();  
		if(isInput){
			if(_name[0] != 'i'&&_mode == READCHANNEL){
				if(synapse->IsReadoutSyn())
					synapse->LSMActivate(_network, true, train);
			}
		}
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x18(%rdi), %r13
movq 0x20(%rdi), %r15
movzbl %cl, %ebp
cmpq %r15, %r13
je 0x8c3a
movq (%r13), %r12
movq %r12, %rdi
callq 0xa8a4
cmpl $0x0, 0x8(%rax)
je 0x8c34
cmpb $0x0, 0x13(%r12)
jne 0x8c34
movq %r12, %rdi
callq 0xa8b2
testb %bl, %bl
je 0x8c34
movq 0x10(%r14), %rax
cmpb $0x69, (%rax)
je 0x8c34
cmpl $0x1, 0x8(%r14)
jne 0x8c34
movq %r12, %rdi
callq 0xa75a
testb %al, %al
je 0x8c34
movq 0x120(%r14), %rsi
movq %r12, %rdi
pushq $0x1
popq %rdx
movl %ebp, %ecx
callq 0xa90a
addq $0x8, %r13
jmp 0x8bd9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/synapse.C
// Function: Synapse::IsReadoutSyn()
bool Synapse::IsReadoutSyn(){
    char * name_post = _post->Name();
    // if the post neuron is the readout/hidden neuron:
    if((name_post[0] == 'o' && name_post[6] == '_') || (name_post[0] == 'h' && name_post[6] == '_')){
        return true;
    }
    else{
        return false;
    }
}

// Assembly:
pushq %rax
movq 0x8(%rdi), %rdi
callq 0x5d1a
movq %rax, %rcx
movzbl (%rax), %eax
cmpl $0x68, %eax
je 0xa774
cmpl $0x6f, %eax
jne 0xa77c
movb $0x1, %al
cmpb $0x5f, 0x6(%rcx)
je 0xa77e
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/synapse.C
// Function: Synapse::IsInputSyn()
bool Synapse::IsInputSyn(){
    char * name_pre = _pre->Name();

    if((name_pre[0] == 'i')&&(name_pre[5] == '_'))
        return true;
    else
        return false;
}

// Assembly:
pushq %rax
movq (%rdi), %rdi
callq 0x5d1a
cmpb $0x69, (%rax)
jne 0xa799
movq %rax, %rcx
movb $0x1, %al
cmpb $0x5f, 0x5(%rcx)
je 0xa79b
xorl %eax, %eax
popq %rcx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/synapse.C
// Function: Synapse::IsValid()
bool Synapse::IsValid(){
    assert(_pre && _post); 
    return !(_pre->LSMCheckNeuronMode(DEACTIVATED) ||
            _post->LSMCheckNeuronMode(DEACTIVATED) ||
            _disable);
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0xa7c4
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0xa7c4
cmpl $0x0, 0x8(%rax)
je 0xa7c1
cmpl $0x0, 0x8(%rcx)
je 0xa7c1
movb 0x13(%rdi), %al
xorb $0x1, %al
retq
xorl %eax, %eax
retq
pushq %rax
leaq 0xaafc(%rip), %rdi      # 0x152c8
leaq 0xaa59(%rip), %rsi      # 0x1522c
leaq 0xaafc(%rip), %rcx      # 0x152d6
pushq $0x4d
popq %rdx
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/synapse.C
// Function: Synapse::LSMLearn(int, int)
void Synapse::LSMLearn(int t, int iteration){
    assert((_fixed==false)&&(_lsm_active==true));
    _lsm_active = false;

    int iter = iteration + 1;

    if(iteration <= 50) iter = 1;
    else if(iteration <= 100) iter = 2;
    else if(iteration <= 150) iter = 4;
    else if(iteration <= 200) iter = 8;
    else if(iteration <= 250) iter = 16;
    else if(iteration <= 300) iter = 32;
    else iter = iteration/4; 

    double weight_old = _lsm_weight;
    _lsm_c = _post->GetCalciumPre();
	int signal=_post->GetTeacherSignal();
    if(_lsm_c>LSM_CAL_MID){
        if((_lsm_c < LSM_CAL_MID+LSM_CAL_BOUND)){
            _lsm_weight += LSM_DELTA_POT/( 1 + iteration/ITER_SEARCH_CONV);
        }
    }else{
        if((_lsm_c > LSM_CAL_MID-LSM_CAL_BOUND)){ 
            _lsm_weight -= LSM_DELTA_DEP/( 1+ iteration/ITER_SEARCH_CONV);
        }
    }
    CheckReadoutWeightOutBound();
}

// Assembly:
cmpb $0x0, 0x11(%rdi)
jne 0xa882
cmpb $0x0, 0x14(%rdi)
je 0xa882
movb $0x0, 0x14(%rdi)
movq 0x8(%rdi), %rax
movsd 0x180(%rax), %xmm0
movsd %xmm0, 0x30(%rdi)
ucomisd 0xa9dd(%rip), %xmm0     # 0x151f0
jbe 0xa845
movsd 0xa9f3(%rip), %xmm1     # 0x15210
ucomisd %xmm0, %xmm1
jbe 0xa9ba
cvtsi2sd %edx, %xmm1
divsd 0xa9cd(%rip), %xmm1     # 0x15200
addsd 0x9e5d(%rip), %xmm1     # 0x14698
movsd 0xa9d5(%rip), %xmm0     # 0x15218
jmp 0xa86f
ucomisd 0xa9ab(%rip), %xmm0     # 0x151f8
jbe 0xa9ba
cvtsi2sd %edx, %xmm1
divsd 0xa9a1(%rip), %xmm1     # 0x15200
addsd 0x9e31(%rip), %xmm1     # 0x14698
movsd 0xa999(%rip), %xmm0     # 0x15208
divsd %xmm1, %xmm0
addsd 0x38(%rdi), %xmm0
movsd %xmm0, 0x38(%rdi)
jmp 0xa9ba
pushq %rax
leaq 0xaa64(%rip), %rdi      # 0x152ee
leaq 0xa99b(%rip), %rsi      # 0x1522c
leaq 0xaa7b(%rip), %rcx      # 0x15313
pushq $0x55
popq %rdx
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/synapse.C
// Function: Synapse::LSMActivate(Network*, bool, bool)
void Synapse::LSMActivate(Network * network, bool need_learning, bool train){
    if(_lsm_active)
        cout<<_pre->Name()<<"\t"<<_post->Name()<<endl;

    assert(_lsm_active == false);
    // 1. Add the synapses for firing processing

    //network->LSMAddActiveSyn(this);

    // 2. For the readout synapses, if we are using stdp training in reservoir/input,
    //  just ignore the learning in the readout:
    //  But Make sure that we are going to train this readout synapse if not:
    if(need_learning == true && _fixed == false && train == true){
        network->LSMAddActiveLearnSyn(this);
        // 3. Mark the readout synapse active state:
        _lsm_active = true;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movb 0x14(%rdi), %al
cmpb $0x1, %al
jne 0xa96c
movq (%rbx), %rdi
callq 0x5d1a
movq 0x15695(%rip), %rdi     # 0x1ffc8
movq %rax, %rsi
callq 0x32a0
leaq 0x96ee(%rip), %rsi      # 0x14030
movq %rax, %rdi
callq 0x32a0
movq %rax, %r12
movq 0x8(%rbx), %rdi
callq 0x5d1a
movq %r12, %rdi
movq %rax, %rsi
callq 0x32a0
movq %rax, %rdi
callq 0x3160
movb 0x14(%rbx), %al
testb %al, %al
jne 0xa99b
cmpb $0x0, 0x11(%rbx)
sete %al
andb %r15b, %bpl
andb %al, %bpl
cmpb $0x1, %bpl
jne 0xa992
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa9fc
movb $0x1, 0x14(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa992(%rip), %rdi      # 0x15334
leaq 0xa883(%rip), %rsi      # 0x1522c
leaq 0xa999(%rip), %rcx      # 0x15349
movl $0xac, %edx
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/network.C
// Function: Network::CheckExistence(char*)
bool Network::CheckExistence(char * name){
    for(list<Neuron*>::iterator iter = _individualNeurons.begin(); iter != _individualNeurons.end(); iter++)
        if(strcmp((*iter)->Name(),name) == 0) return true;

    if(_groupNeurons.find(string(name)) != _groupNeurons.end()) return true;

    return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rdi, %r15
movq (%r15), %r15
cmpq %rbx, %r15
je 0xb058
movq 0x10(%r15), %rdi
callq 0x5d1a
movq %rax, %rdi
movq %r14, %rsi
callq 0x33d0
testl %eax, %eax
jne 0xb034
movb $0x1, %bl
jmp 0xb08c
addq $0x18, %rbx
leaq 0x10(%rsp), %r15
leaq 0xf(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x8d8c
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf0d6
testq %rax, %rax
setne %bl
leaq 0x10(%rsp), %rdi
callq 0x3150
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3150
movq %rbx, %rdi
callq 0x3540
nop