LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/network.C
// Function: Network::PrintSpikeCount(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Network::PrintSpikeCount(string layer){
    NeuronGroup * ng = SearchForNeuronGroup(layer.c_str());
    assert(ng);
#ifdef CV
    assert(*_cv_test_sp_iter);
    ng->PrintSpikeCount((*_cv_test_sp_iter)->Class());
#else
    assert(*_sp_iter);
    ng->PrintSpikeCount((*_sp_iter)->Class());
#endif

}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rsi
callq 0xbcc0
testq %rax, %rax
je 0xd59d
movq 0x220(%rbx), %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0xd5bc
movl 0x80(%rcx), %esi
movq %rax, %rdi
popq %rbx
jmp 0x84f2
leaq 0x91dd(%rip), %rdi      # 0x16781
leaq 0x7e07(%rip), %rsi      # 0x153b2
leaq 0x85fe(%rip), %rcx      # 0x15bb0
movl $0x2f7, %edx            # imm = 0x2F7
callq 0x31b0
leaq 0x8613(%rip), %rdi      # 0x15bd6
leaq 0x7de8(%rip), %rsi      # 0x153b2
leaq 0x85df(%rip), %rcx      # 0x15bb0
movl $0x2fc, %edx            # imm = 0x2FC
callq 0x31b0
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/network.C
// Function: Network::DetermineSynType(char const*, synapsetype_t&, char const*)
void Network::DetermineSynType(const char * syn_type, synapsetype_t & ret_syn_type, const char * func_name){
    if(strcmp(syn_type, "reservoir") == 0){
        // Write reservoir syns into the file
        ret_syn_type = RESERVOIR_SYN;
    }else if(strcmp(syn_type, "readout") == 0){
        ret_syn_type = READOUT_SYN;
    }else if(strcmp(syn_type, "input") == 0){
        ret_syn_type = INPUT_SYN;
    }else{
        cout<<"In Network::"<<func_name<<", undefined synapse type: "<<syn_type<<endl;
        exit(EXIT_FAILURE);
    } 
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x6716(%rip), %rsi      # 0x142f9
movq %rbx, %rdi
callq 0x33d0
testl %eax, %eax
je 0xdc19
leaq 0x8d56(%rip), %rsi      # 0x1694c
movq %rbx, %rdi
callq 0x33d0
testl %eax, %eax
je 0xdc1d
leaq 0x66bb(%rip), %rsi      # 0x142c4
movq %rbx, %rdi
callq 0x33d0
testl %eax, %eax
jne 0xdc29
pushq $0x1
jmp 0xdc1f
xorl %eax, %eax
jmp 0xdc20
pushq $0x2
popq %rax
movl %eax, (%r14)
popq %rbx
popq %r14
popq %r15
retq
movq 0x12398(%rip), %rdi     # 0x1ffc8
leaq 0x83d3(%rip), %rsi      # 0x1600a
callq 0x32a0
movq %rax, %rdi
movq %r15, %rsi
callq 0x32a0
leaq 0x83c9(%rip), %rsi      # 0x16017
movq %rax, %rdi
callq 0x32a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x32a0
movq %rax, %rdi
callq 0x3160
pushq $0x1
popq %rdi
callq 0x3330
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/network.C
// Function: Network::NormalizeContinuousWeights(char const*)
void Network::NormalizeContinuousWeights(const char * syn_type){
    synapsetype_t  tar_syn_type = INVALID;
    DetermineSynType(syn_type, tar_syn_type, "NormalizeContinuousWeights()");
    assert(tar_syn_type != INVALID);
    vector<Synapse*> tmp;

    vector<Synapse*> & synapses = tar_syn_type == RESERVOIR_SYN ? _rsynapses : 
        (tar_syn_type == READOUT_SYN ? _rosynapses : tmp);
    assert(!synapses.empty()); 

    // right now the function should be run for reservoir synapses!
    double g_sum = 0.0;
    for(size_t i = 0; i < synapses.size(); ++i){
        assert(synapses[i]);
        double w = synapses[i]->Weight();
        g_sum += w*w;
    }

    // normalize the weight:
    assert(g_sum > 0);
    g_sum = sqrt(g_sum);
    for(size_t i = 0; i < synapses.size(); ++i){
        // compute the normalized weight:
        double new_w = synapses[i]->Weight()/g_sum;
        // set the new weight:
        synapses[i]->Weight(new_w);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
movl $0x3, (%r14)
leaq 0x83a1(%rip), %rcx      # 0x16032
movq %r14, %rdx
callq 0xdbce
movl (%r14), %eax
cmpl $0x3, %eax
je 0xdda2
leaq 0x10(%rsp), %rcx
andq $0x0, 0x10(%rcx)
xorpd %xmm0, %xmm0
leaq 0x118(%rbx), %rdx
leaq 0x130(%rbx), %r14
leaq 0x120(%rbx), %rsi
addq $0x138, %rbx            # imm = 0x138
cmpl $0x2, %eax
cmovneq %rcx, %r14
movapd %xmm0, (%rcx)
leaq 0x18(%rsp), %r15
cmoveq %rbx, %r15
testl %eax, %eax
cmoveq %rdx, %r14
movq (%r14), %rax
cmoveq %rsi, %r15
movq (%r15), %rcx
cmpq %rcx, %rax
je 0xddc1
subq %rax, %rcx
sarq $0x3, %rcx
xorpd %xmm0, %xmm0
xorl %edx, %edx
cmpq %rdx, %rcx
je 0xdd29
movq (%rax,%rdx,8), %rsi
testq %rsi, %rsi
je 0xdd83
movsd 0x38(%rsi), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rdx
jmp 0xdd09
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xdde0
jb 0xdd3f
sqrtsd %xmm0, %xmm0
jmp 0xdd44
callq 0x3210
movq (%r15), %rax
movq (%r14), %rcx
subq %rcx, %rax
sarq $0x3, %rax
xorl %edx, %edx
cmpq %rdx, %rax
je 0xdd6f
movq (%rcx,%rdx,8), %rsi
movsd 0x38(%rsi), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x38(%rsi)
incq %rdx
jmp 0xdd53
leaq 0x10(%rsp), %rdi
callq 0x9226
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x8326(%rip), %rdi      # 0x160b0
leaq 0x7621(%rip), %rsi      # 0x153b2
leaq 0x82cf(%rip), %rcx      # 0x16067
movl $0x3aa, %edx            # imm = 0x3AA
callq 0x31b0
leaq 0x82a6(%rip), %rdi      # 0x1604f
leaq 0x7602(%rip), %rsi      # 0x153b2
leaq 0x82b0(%rip), %rcx      # 0x16067
movl $0x3a0, %edx            # imm = 0x3A0
callq 0x31b0
leaq 0x82d6(%rip), %rdi      # 0x1609e
leaq 0x75e3(%rip), %rsi      # 0x153b2
leaq 0x8291(%rip), %rcx      # 0x16067
movl $0x3a5, %edx            # imm = 0x3A5
callq 0x31b0
leaq 0x82d5(%rip), %rdi      # 0x160bc
leaq 0x75c4(%rip), %rsi      # 0x153b2
leaq 0x8272(%rip), %rcx      # 0x16067
movl $0x3b0, %edx            # imm = 0x3B0
callq 0x31b0
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/network.C
// Function: Network::RemoveZeroWeights(char const*)
void Network::RemoveZeroWeights(const char * type){
    synapsetype_t  syn_type = INVALID;
    DetermineSynType(type, syn_type, "RemoveZeroWeights()");
    assert(syn_type != INVALID);

    if(syn_type == RESERVOIR_SYN){
        NeuronGroup * reservoir = SearchForNeuronGroup("reservoir");
        reservoir->RemoveZeroSyns(syn_type);
    }
    else if(syn_type == READOUT_SYN){
        NeuronGroup * output = SearchForNeuronGroup("output");
        if(!output){
            cout<<"In Network::RemoveZeroWeights(), no 'output' layer is found!!"<<endl;
            assert(output);
        }
        output->RemoveZeroSyns(syn_type);
    }
    else{
        assert(0); // your code shoule never go here.
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4(%rsp), %r14
movl $0x3, (%r14)
leaq 0x82ac(%rip), %rcx      # 0x160c6
movq %r14, %rdx
callq 0xdbce
movl (%r14), %eax
testl %eax, %eax
je 0xde4a
cmpl $0x2, %eax
jne 0xde6a
leaq 0x7635(%rip), %rsi      # 0x1546a
movq %rbx, %rdi
callq 0xbcc0
testq %rax, %rax
je 0xdead
pushq $0x2
popq %rsi
movq %rax, %rdi
jmp 0xde5e
leaq 0x64a8(%rip), %rsi      # 0x142f9
movq %rbx, %rdi
callq 0xbcc0
movq %rax, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8822
cmpl $0x3, %eax
jne 0xde8e
leaq 0x8524(%rip), %rdi      # 0x1639a
leaq 0x7535(%rip), %rsi      # 0x153b2
leaq 0x8256(%rip), %rcx      # 0x160da
movl $0x3be, %edx            # imm = 0x3BE
callq 0x31b0
leaq 0x751b(%rip), %rdi      # 0x153b0
leaq 0x7516(%rip), %rsi      # 0x153b2
leaq 0x8237(%rip), %rcx      # 0x160da
movl $0x3cd, %edx            # imm = 0x3CD
callq 0x31b0
movq 0x12114(%rip), %rdi     # 0x1ffc8
leaq 0x824d(%rip), %rsi      # 0x16108
callq 0x32a0
movq %rax, %rdi
callq 0x3160
leaq 0x759b(%rip), %rdi      # 0x1546a
leaq 0x74dc(%rip), %rsi      # 0x153b2
leaq 0x81fd(%rip), %rcx      # 0x160da
movl $0x3c8, %edx            # imm = 0x3C8
callq 0x31b0
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/network.C
// Function: Network::WriteSynWeightsToFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char*)
void Network::WriteSynWeightsToFile(const string& pre_g, const string& post_g, char * filename){
    NeuronGroup * pre = SearchForNeuronGroup(pre_g.c_str());
    NeuronGroup * post = SearchForNeuronGroup(post_g.c_str());
    if(pre == NULL){
        cout<<"Warning::Cannot find neuron group named: "<<pre_g
            <<" for writing the weights"<<endl;
        return;
    }
    if(post == NULL){
        cout<<"Warning::Cannot find neuron group named: "<<post_g
            <<" for writing the weights"<<endl;
        return;
    }
    ofstream f_out(filename);
    if(!f_out.is_open()){
        cout<<"WriteSynWeightsToFile(), cannot open the file : "<<filename<<endl;
        exit(EXIT_FAILURE);
    }

    int index = 0;
    pre->WriteSynWeightsToFile(f_out, index, post_g);
    f_out.close();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
movq (%rsi), %rsi
callq 0xbcc0
movq %rax, %r15
movq (%rbx), %rsi
movq %r13, %rdi
callq 0xbcc0
testq %r15, %r15
je 0xe182
testq %rax, %rax
je 0xe19d
leaq 0x10(%rsp), %rdi
pushq $0x10
popq %rdx
movq %r14, %rsi
callq 0x32f0
leaq 0x80(%rsp), %rdi
callq 0x30a0
testb %al, %al
je 0xe1e2
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
movq %rbx, %rcx
callq 0x811c
leaq 0x10(%rsp), %rdi
callq 0x33e0
leaq 0x10(%rsp), %rdi
callq 0x3420
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x11e3f(%rip), %rdi     # 0x1ffc8
leaq 0x8062(%rip), %rsi      # 0x161f2
callq 0x32a0
movq %rax, %rdi
movq %r12, %rsi
jmp 0xe1b6
movq 0x11e24(%rip), %rdi     # 0x1ffc8
leaq 0x8047(%rip), %rsi      # 0x161f2
callq 0x32a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3250
leaq 0x805a(%rip), %rsi      # 0x1621c
movq %rax, %rdi
callq 0x32a0
movq %rax, %rdi
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3160
movq 0x11ddf(%rip), %rdi     # 0x1ffc8
leaq 0x8045(%rip), %rsi      # 0x16235
callq 0x32a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x32a0
movq %rax, %rdi
callq 0x3160
pushq $0x1
popq %rdi
callq 0x3330
jmp 0xe212
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3420
movq %rbx, %rdi
callq 0x3540
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/network.C
// Function: Network::LoadSynWeightsFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Network::LoadSynWeightsFromFile(const string& filename)
{
    ifstream f_in(filename);
    if(!f_in.is_open()){
        cout<<"In Network::LoadSynWeightsFromFile(), cannot open the file: "<<filename<<endl;
        assert(0);
    }
    int index;
    string pre;
    string post; 
    double weight;
    while(f_in>>index>>pre>>post>>weight){
        assert(_synapses_map.find(pre) != _synapses_map.end());
        assert(_synapses_map[pre].find(post) != _synapses_map[pre].end());
        _synapses_map[pre][post]->Weight(weight);
    }
   
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x50(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x34e0
leaq 0xc8(%rsp), %rdi
callq 0x30a0
testb %al, %al
je 0xe3a8
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
leaq 0x20(%rsp), %rdx
movq %rdx, -0x10(%rdx)
andq $0x0, -0x8(%rdx)
movb %cl, (%rax)
movb %cl, (%rdx)
addq $0x50, %rbx
leaq 0xc(%rsp), %r15
leaq 0x30(%rsp), %r12
leaq 0x10(%rsp), %r13
movq %rsp, %rbp
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0x31a0
movq %rax, %rdi
movq %r12, %rsi
callq 0x3380
movq %rax, %rdi
movq %r13, %rsi
callq 0x3380
movq %rax, %rdi
movq %rbp, %rsi
callq 0x31c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xe33a
movq %rbx, %rdi
movq %r12, %rsi
callq 0x98b4
testq %rax, %rax
je 0xe36a
movq %rbx, %rdi
movq %r12, %rsi
callq 0x99a0
movq %rax, %rdi
movq %r13, %rsi
callq 0x9eec
movq %rax, %r14
movq %rbx, %rdi
movq %r12, %rsi
callq 0x99a0
testq %r14, %r14
je 0xe389
movq %rbx, %rdi
movq %r12, %rsi
callq 0x99a0
movq %rax, %rdi
movq %r13, %rsi
callq 0x9fbc
movq (%rax), %rax
movsd (%rsp), %xmm0
movsd %xmm0, 0x38(%rax)
jmp 0xe299
leaq 0x10(%rsp), %rdi
callq 0x3150
leaq 0x30(%rsp), %rdi
callq 0x3150
leaq 0x50(%rsp), %rdi
callq 0x30d0
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7f67(%rip), %rdi      # 0x162d8
leaq 0x703a(%rip), %rsi      # 0x153b2
leaq 0x7f24(%rip), %rcx      # 0x162a3
movl $0x411, %edx            # imm = 0x411
callq 0x31b0
leaq 0x7f77(%rip), %rdi      # 0x16307
leaq 0x701b(%rip), %rsi      # 0x153b2
leaq 0x7f05(%rip), %rcx      # 0x162a3
movl $0x412, %edx            # imm = 0x412
callq 0x31b0
movq 0x11c19(%rip), %rdi     # 0x1ffc8
leaq 0x7eb0(%rip), %rsi      # 0x16266
callq 0x32a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x3250
movq %rax, %rdi
callq 0x3160
leaq 0x6fdb(%rip), %rdi      # 0x153b0
leaq 0x6fd6(%rip), %rsi      # 0x153b2
leaq 0x7ec0(%rip), %rcx      # 0x162a3
movl $0x40a, %edx            # imm = 0x40A
callq 0x31b0
movq %rax, %rbx
jmp 0xe40f
jmp 0xe3f8
jmp 0xe3f8
jmp 0xe3f8
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3150
leaq 0x30(%rsp), %rdi
callq 0x3150
leaq 0x50(%rsp), %rdi
callq 0x30d0
movq %rbx, %rdi
callq 0x3540
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/./util.h
// Function: std::vector<int, std::allocator<int>> operator+<int>(std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&)
std::vector<T> operator+(const std::vector<T>& a, const std::vector<T>& b)
{
    if(a.empty())   return b;
    if(b.empty())   return a;
    assert(a.size() == b.size());
    std::vector<T> res;
    res.reserve(a.size());
    std::transform(a.begin(), a.end(), b.begin(), std::back_inserter(res), std::plus<T>());
    return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rsi
cmpq %rsi, %rax
je 0xeacc
movq (%r14), %rcx
movq 0x8(%r14), %rdx
cmpq %rdx, %rcx
je 0xeac9
subq %rax, %rsi
subq %rcx, %rdx
cmpq %rdx, %rsi
jne 0xeae0
sarq $0x2, %rsi
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq %rbx, %rdi
callq 0xfce8
movq (%r15), %rdi
movq 0x8(%r15), %rsi
movq (%r14), %rdx
movq %rbx, %rcx
callq 0xfd7e
jmp 0xead7
movq %r15, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xeeac
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x7a2c(%rip), %rdi      # 0x16513
leaq 0x7a3a(%rip), %rsi      # 0x16528
leaq 0x7a3c(%rip), %rcx      # 0x16531
pushq $0x45
popq %rdx
callq 0x31b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x520c
movq %r14, %rdi
callq 0x3540
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/parser.C
// Function: Parser::ParseNeuronGroup(char*, int, char*, double)
void Parser::ParseNeuronGroup(char * name, int num, char * e_i, double v_mem){
	cout<<std::string(name)<<endl;
    assert(_network->CheckExistence(name) == false);
    assert(num > 1);
    assert((strcmp(e_i,"excitatory")==0)||(strcmp(e_i,"inhibitory")==0));
    bool excitatory;
    if(strcmp(e_i,"excitatory") == 0) excitatory = true;
    else excitatory = false;
    _network->AddNeuronGroup(name, num, excitatory, v_mem);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movsd %xmm0, 0x10(%rsp)
movq %rcx, %r12
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x18(%rsp), %r13
leaq 0xf(%rsp), %rdx
movq %r13, %rdi
callq 0x8d8c
movq 0xfb4a(%rip), %rdi      # 0x1ffc8
movq %r13, %rsi
callq 0x3250
movq %rax, %rdi
callq 0x3160
leaq 0x18(%rsp), %rdi
callq 0x3150
movq (%r15), %rdi
movq %r14, %rsi
callq 0xb022
testb %al, %al
jne 0x104fd
cmpl $0x1, %ebx
jle 0x10516
leaq 0x466b(%rip), %rsi      # 0x14b1e
movq %r12, %rdi
callq 0x33d0
movl %eax, %ebp
testl %eax, %eax
je 0x104d4
leaq 0x4661(%rip), %rsi      # 0x14b29
movq %r12, %rdi
callq 0x33d0
testl %eax, %eax
jne 0x1052f
xorl %ecx, %ecx
testl %ebp, %ebp
sete %cl
movq (%r15), %rdi
movq %r14, %rsi
movl %ebx, %edx
movsd 0x10(%rsp), %xmm0
callq 0xb210
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x61cf(%rip), %rdi      # 0x166d3
leaq 0x6094(%rip), %rsi      # 0x1659f
leaq 0x61e9(%rip), %rcx      # 0x166fb
pushq $0x71
jmp 0x10546
leaq 0x6219(%rip), %rdi      # 0x16736
leaq 0x607b(%rip), %rsi      # 0x1659f
leaq 0x61d0(%rip), %rcx      # 0x166fb
pushq $0x72
jmp 0x10546
leaq 0x6208(%rip), %rdi      # 0x1673e
leaq 0x6062(%rip), %rsi      # 0x1659f
leaq 0x61b7(%rip), %rcx      # 0x166fb
pushq $0x73
popq %rdx
callq 0x31b0
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3150
movq %rbx, %rdi
callq 0x3540
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/parser.C
// Function: Parser::ParseLSMSynapse(char*, char*, int, int, int, int, char*)
void Parser::ParseLSMSynapse(char * from, char * to, int fromN, int toN, int value, int random, char * fixed_learning){
    bool fixed;
    if(strcmp(fixed_learning,"fixed") == 0) fixed = true;
    else if(strcmp(fixed_learning,"learning") == 0) fixed = false;
    else{
        cout<<fixed_learning<<endl;
        assert(0);
    }
    _network->LSMAddSynapse(from, to, fromN, toN, value, random, fixed);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, 0x4(%rsp)
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq 0x48(%rsp), %rdi
leaq 0x5025(%rip), %rsi      # 0x155b2
callq 0x33d0
movl %eax, %ebx
testl %eax, %eax
je 0x105ad
leaq 0x61dc(%rip), %rsi      # 0x1677b
movq 0x48(%rsp), %rdi
callq 0x33d0
testl %eax, %eax
jne 0x105e6
movl 0x40(%rsp), %eax
xorl %r10d, %r10d
testl %ebx, %ebx
sete %r10b
movq (%r13), %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %r14d, %ecx
movl %ebp, %r8d
movl 0x4(%rsp), %r9d
pushq %r10
pushq %rax
callq 0xbbca
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xf9db(%rip), %rdi      # 0x1ffc8
movq 0x48(%rsp), %rsi
callq 0x32a0
movq %rax, %rdi
callq 0x3160
leaq 0x4daa(%rip), %rdi      # 0x153b0
leaq 0x5f92(%rip), %rsi      # 0x1659f
leaq 0x6170(%rip), %rcx      # 0x16784
movl $0x81, %edx
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/simulator.C
// Function: Simulator::InitializeFile(char const*)
void Simulator::InitializeFile(const char * filename){
    FILE * Foutp = fopen(filename,"w");
    assert(Foutp != NULL);
    fprintf(Foutp,"%d\t%d\n",-1,-1);
    fclose(Foutp);
}

// Assembly:
pushq %rbx
movq %rsi, %rdi
leaq 0x5c28(%rip), %rsi      # 0x16973
callq 0x3320
testq %rax, %rax
je 0x10d77
movq %rax, %rbx
leaq 0x5c51(%rip), %rsi      # 0x169b0
pushq $-0x1
popq %rcx
movq %rax, %rdi
movl %ecx, %edx
xorl %eax, %eax
callq 0x33f0
movq %rbx, %rdi
popq %rbx
jmp 0x32b0
leaq 0x5bf7(%rip), %rdi      # 0x16975
leaq 0x5abf(%rip), %rsi      # 0x16844
leaq 0x5bf7(%rip), %rcx      # 0x16983
pushq $0x6a
popq %rdx
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/readout.C
// Function: Readout::SetRefer(int)
void Readout::SetRefer(int flag){ // To set the reference array according the application
    if(flag == 0){
        for (int i = 0; i < 26; ++i)
        {
            if(i < 2) 
                refer.push_back(i);
            else if(i == 2)
                refer.push_back(10);
            else if(i < 12)
                refer.push_back(refer[i-1] + 1);
            else if(i == 12)
                refer.push_back(2);
            else if(i == 13)
                refer.push_back(20);
            else if(i < 19)
                refer.push_back(refer[i-1] + 1);
            else if(i == 19)
                refer.push_back(3);
            else
                refer.push_back(refer[i-1] + 1);
        }
        // for (int i = 0; i < 26; ++i)
        // {
        // 	cout<<refer[i]<<endl;
        // }
    }
    // refer = {0, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 23, 24, 25, 3, 4, 5, 6, 7, 8, 9};
    else{
        for (int i = 0; i < CLS; ++i)
        {
            refer.push_back(i);
        }
        //	refer = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
    }     


}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
addq $0x8, %rbx
xorl %eax, %eax
leaq 0xc(%rsp), %r14
testl %esi, %esi
je 0x10e95
movl %eax, 0xc(%rsp)
cmpl $0x1a, %eax
jge 0x10f1d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3d58
movl 0xc(%rsp), %eax
incl %eax
jmp 0x10e75
leaq 0x8(%rsp), %r15
movl %eax, 0xc(%rsp)
cmpl $0x1a, %eax
jge 0x10f1d
cmpl $0x1, %eax
jg 0x10eb5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3d58
jmp 0x10f01
cmpl $0x2, %eax
jne 0x10ec4
movl $0xa, 0x8(%rsp)
jmp 0x10ef6
movl %eax, %ecx
cmpl $0xb, %eax
ja 0x10eda
movq (%rbx), %rax
movl -0x4(%rax,%rcx,4), %eax
incl %eax
movl %eax, 0x8(%rsp)
jmp 0x10ef6
cmpl $0xd, %eax
je 0x10eee
cmpl $0xc, %eax
jne 0x10f09
movl $0x2, 0x8(%rsp)
jmp 0x10ef6
movl $0x14, 0x8(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x402a
movl 0xc(%rsp), %eax
incl %eax
jmp 0x10e9a
cmpl $0x12, %eax
jbe 0x10ecb
cmpl $0x13, %eax
jne 0x10ecb
movl $0x3, 0x8(%rsp)
jmp 0x10ef6
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/readout.C
// Function: Readout::LoadData(char*)
void Readout::LoadData(char * filename){ //Load the data from the file of speech results into multidata 
    ifstream f_in(filename);
    if(f_in.is_open() == false){
        cout<<"Cannot open file: "<<filename<<endl;
        exit(-1);
    }
    // string neuron_idx, t;

    // while(f_in>>neuron_index>>t){
    // 	int neuron_index = atoi(neuron_idx.c_str());
    // 	int time_f = atoi(t.c_str());
    multidata1.clear();
    multidata2.clear();
    int neuron_index, time_f;
    int count = 1;
    while(f_in>>neuron_index>>time_f){
        if(!(neuron_index >= -1 && neuron_index <= 25)){
            cout<<neuron_index<<"\t"<<time_f<<"\t"<<count<<endl;
            cout<<"The neuron index is possily out of bound!\n Exit!"<<endl;
            exit(EXIT_FAILURE);
        }

        assert(neuron_index >= -1 && neuron_index <= 25);
        multidata1.push_back(neuron_index);
        multidata2.push_back(time_f);
        count++;
    }
    f_in.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x35a0
leaq 0x88(%rsp), %rdi
callq 0x30a0
testb %al, %al
je 0x1106e
movq 0x28(%r14), %rax
cmpq %rax, 0x30(%r14)
je 0x10f6f
movq %rax, 0x30(%r14)
movq 0x40(%r14), %rax
cmpq %rax, 0x48(%r14)
je 0x10f7d
movq %rax, 0x48(%r14)
leaq 0x28(%r14), %r15
addq $0x40, %r14
pushq $0x1
popq %rbx
leaq 0x10(%rsp), %r12
leaq 0xc(%rsp), %r13
leaq 0x8(%rsp), %rbp
movq %r12, %rdi
movq %r13, %rsi
callq 0x31a0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x31a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x10fe1
movl 0xc(%rsp), %esi
leal 0x1(%rsi), %eax
cmpl $0x1b, %eax
jae 0x11007
movq %r15, %rdi
movq %r13, %rsi
callq 0x3d58
movq %r14, %rdi
movq %rbp, %rsi
callq 0x3d58
incl %ebx
jmp 0x10f97
leaq 0x10(%rsp), %rdi
callq 0x3090
leaq 0x10(%rsp), %rdi
callq 0x30d0
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xefba(%rip), %rdi      # 0x1ffc8
callq 0x3530
leaq 0x3016(%rip), %rsi      # 0x14030
movq %rax, %rdi
callq 0x32a0
movl 0x8(%rsp), %esi
movq %rax, %rdi
callq 0x3530
leaq 0x2ffb(%rip), %rsi      # 0x14030
movq %rax, %rdi
callq 0x32a0
movq %rax, %rdi
movl %ebx, %esi
callq 0x3530
movq %rax, %rdi
callq 0x3160
movq 0xef72(%rip), %rdi      # 0x1ffc8
leaq 0x598d(%rip), %rsi      # 0x169ea
callq 0x32a0
movq %rax, %rdi
callq 0x3160
pushq $0x1
jmp 0x11096
movq 0xef53(%rip), %rdi      # 0x1ffc8
leaq 0x595b(%rip), %rsi      # 0x169d7
callq 0x32a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x32a0
movq %rax, %rdi
callq 0x3160
pushq $-0x1
popq %rdi
callq 0x3330
jmp 0x110a0
jmp 0x110a0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x30d0
movq %rbx, %rdi
callq 0x3540
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/readout.C
// Function: Readout::FindVal(std::vector<int, std::allocator<int>> const&, int)
int val){  //Find a specific value in the vector and return the indices of that value
    vector<int> v_out;
    for (size_t i = 0; i < v.size(); ++i)
    {
        if(v[i] == val){
            //cout<<v[i]<<"\t"<<val<<endl;
            v_out.push_back(i);
        }
    }
    return v_out;	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rdi, %rbx
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %r12d, %r12d
leaq 0xc(%rsp), %r15
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rcx, %r12
jae 0x1110b
cmpl %ebp, (%rax,%r12,4)
jne 0x11106
movl %r12d, 0xc(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x402a
incq %r12
jmp 0x110dd
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x520c
movq %r14, %rdi
callq 0x3540
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/util.C
// Function: Timer::Report(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Timer::Report(std::string str){
    timeval tmp;
    gettimeofday(&tmp, &m_zone);
    if(is_started){
        std::cout<<"Total time spent in "<<str<<" : "<<(tmp.tv_sec - m_cur.tv_sec) + double((tmp.tv_usec - m_cur.tv_usec)*1e-6)<<" seconds"<<std::endl;
    }
    else{
        std::cerr<<"Warning: the util Timer is not STARTED! Start the timer...."<<std::endl;
        Start();
        return;
    }
    m_cur = tmp;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x30(%rdi), %rsi
leaq 0x8(%rsp), %rdi
callq 0x34f0
cmpb $0x1, 0x38(%rbx)
jne 0x11228
movq 0xee1e(%rip), %rdi      # 0x1ffc8
leaq 0x58a7(%rip), %rsi      # 0x16a58
callq 0x32a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x3250
leaq 0x522d(%rip), %rsi      # 0x163f5
movq %rax, %rdi
callq 0x32a0
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rdx
subq 0x10(%rbx), %rcx
cvtsi2sd %rcx, %xmm1
subq 0x18(%rbx), %rdx
cvtsi2sd %rdx, %xmm0
mulsd 0x5854(%rip), %xmm0     # 0x16a48
addsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x34d0
leaq 0x5866(%rip), %rsi      # 0x16a6d
movq %rax, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x3160
movups 0x8(%rsp), %xmm0
movups %xmm0, 0x10(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq 0xedc1(%rip), %rdi      # 0x1fff0
leaq 0x5840(%rip), %rsi      # 0x16a76
callq 0x32a0
movq %rax, %rdi
callq 0x3160
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x11164
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/util.C
// Function: Timer::End(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Timer::End(std::string str){
    timeval tmp;
    gettimeofday(&tmp, &m_zone);
    if(is_started && !str.empty()){
        std::cout<<"Total time spent in "<<str<<" : "<<(tmp.tv_sec - m_start.tv_sec) + double((tmp.tv_usec - m_start.tv_usec)*1e-6)<<" seconds"<<std::endl;
    }
    else if(!is_started){
        std::cerr<<"Warning: the util Timer is not STARTED! Start the timer...."<<std::endl;
        Start();
        return;
    }  
    m_cur = tmp;
    m_end = tmp;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x30(%rdi), %rsi
leaq 0x8(%rsp), %rdi
callq 0x34f0
cmpb $0x1, 0x38(%rbx)
jne 0x1130b
cmpq $0x0, 0x8(%r14)
je 0x112f1
movq 0xed43(%rip), %rdi      # 0x1ffc8
leaq 0x57cc(%rip), %rsi      # 0x16a58
callq 0x32a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x3250
leaq 0x5152(%rip), %rsi      # 0x163f5
movq %rax, %rdi
callq 0x32a0
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rdx
subq (%rbx), %rcx
cvtsi2sd %rcx, %xmm1
subq 0x8(%rbx), %rdx
cvtsi2sd %rdx, %xmm0
mulsd 0x577a(%rip), %xmm0     # 0x16a48
addsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x34d0
leaq 0x578c(%rip), %rsi      # 0x16a6d
movq %rax, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x3160
movups 0x8(%rsp), %xmm0
movups %xmm0, 0x10(%rbx)
movups 0x8(%rsp), %xmm0
movups %xmm0, 0x20(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq 0xecde(%rip), %rdi      # 0x1fff0
leaq 0x575d(%rip), %rsi      # 0x16a76
callq 0x32a0
movq %rax, %rdi
callq 0x3160
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x11164
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/util.C
// Function: UnionFind::root(int)
int UnionFind::root(int ind){
    assert(exist(ind));
    while(ind != _id[ind]){
        _id[ind] = _id[_id[ind]]; // path compression
        ind = _id[ind];
    }
    return ind;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x1143e
testb %al, %al
je 0x11421
movq 0x20(%r14), %rax
movslq %ebx, %rcx
movslq (%rax,%rcx,4), %rdx
cmpl %edx, %ecx
je 0x11417
movl (%rax,%rdx,4), %ebx
movl %ebx, (%rax,%rcx,4)
jmp 0x11404
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x568a(%rip), %rdi      # 0x16ab2
leaq 0x568e(%rip), %rsi      # 0x16abd
leaq 0x568e(%rip), %rcx      # 0x16ac4
pushq $0x3f
popq %rdx
callq 0x31b0
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/util.C
// Function: UnionFind::exist(int)
bool UnionFind::exist(int ind){
    if(ind >= _n){
        std::cout<<"Warning: UnionFind::exist() index "<<ind<<" out of bound "<<_n<<std::endl;
        return -1;
    }
    return (_sz[ind] != -1);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
cmpl %esi, (%rdi)
jle 0x1145a
movslq %ebp, %rax
movq 0x8(%rbx), %rcx
cmpl $-0x1, (%rcx,%rax,4)
setne %al
jmp 0x1149a
movq 0xeb67(%rip), %rdi      # 0x1ffc8
leaq 0x56a0(%rip), %rsi      # 0x16b08
callq 0x32a0
movq %rax, %rdi
movl %ebp, %esi
callq 0x3530
leaq 0x567b(%rip), %rsi      # 0x16af9
movq %rax, %rdi
callq 0x32a0
movl (%rbx), %esi
movq %rax, %rdi
callq 0x3530
movq %rax, %rdi
callq 0x3160
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/util.C
// Function: UnionFind::individual(int)
bool UnionFind::individual(int ind){
    if(ind >= _n){
        std::cout<<"Warning: UnionFind:: index "<<ind<<" out of bound "<<_n<<std::endl;
        return false;
    }
    return _sz[ind] == 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
cmpl %esi, (%rdi)
jle 0x114be
movslq %ebp, %rax
movq 0x8(%rbx), %rcx
cmpl $0x1, (%rcx,%rax,4)
sete %al
jmp 0x114fe
movq 0xeb03(%rip), %rdi      # 0x1ffc8
leaq 0x5611(%rip), %rsi      # 0x16add
callq 0x32a0
movq %rax, %rdi
movl %ebp, %esi
callq 0x3530
leaq 0x5617(%rip), %rsi      # 0x16af9
movq %rax, %rdi
callq 0x32a0
movl (%rbx), %esi
movq %rax, %rdi
callq 0x3530
movq %rax, %rdi
callq 0x3160
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/util.C
// Function: UnionFind::add(int)
void UnionFind::add(int ind){
    if(ind >= _n){
        std::cout<<"Warning: UnionFind::add, index: "<<ind<<" out of bound "<<_n<<std::endl;
        return;
    }
    if(exist(ind))  return;
    _id[ind] = ind;
    _sz[ind] = 1;
    _count++;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
cmpl %esi, (%rdi)
jle 0x1153f
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1143e
testb %al, %al
jne 0x11538
movslq %ebp, %rax
movq 0x20(%rbx), %rcx
movl %ebp, (%rcx,%rax,4)
movq 0x8(%rbx), %rcx
movl $0x1, (%rcx,%rax,4)
incl 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0xea82(%rip), %rdi      # 0x1ffc8
leaq 0x55de(%rip), %rsi      # 0x16b2b
callq 0x32a0
movq %rax, %rdi
movl %ebp, %esi
callq 0x3530
leaq 0x5596(%rip), %rsi      # 0x16af9
movq %rax, %rdi
callq 0x32a0
movl (%rbx), %esi
movq %rax, %rdi
callq 0x3530
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3160
nop
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/util.C
// Function: UnionFind::unite(int, int)
void UnionFind::unite(int p, int q){
    int i = root(p);
    int j = root(q);
    if(_sz[i] >= _sz[j]){
        _sz[i] += _sz[j]; _id[j] = i; // always merge the smaller to the larger one
    }
    else{
        _sz[j] += _sz[i]; _id[i] = j;
    } 
    _count--;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rdi, %rbx
callq 0x113ee
movl %eax, %r14d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x113ee
movslq %r14d, %rcx
movq 0x8(%rbx), %rdx
movl (%rdx,%rcx,4), %esi
cltq
movl (%rdx,%rax,4), %edi
cmpl %edi, %esi
movq %rcx, %r8
cmovlq %rax, %r8
leal (%rdi,%rsi), %esi
movq %rax, %rdi
cmovlq %rcx, %rdi
cmovgel %ecx, %eax
movl %esi, (%rdx,%r8,4)
movq 0x20(%rbx), %rcx
movl %eax, (%rcx,%rdi,4)
decl 0x4(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/util.C
// Function: MakeDirs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void MakeDirs(std::string dir){
    struct stat sb;
    std::string base = ".";
    std::stringstream iss(dir);
    std::string sub_dir;
    // decode the string:
    while(std::getline(iss, sub_dir, '/')){
        std::string cmd;
        std::string path = base + "/" + sub_dir;
        if(stat(path.c_str(), &sb) != 0){
            cmd = "mkdir " + path;
            std::cout<<"Creating path: "<<path<<std::endl;
            int i = system(cmd.c_str());
        }
        base = base + "/" + sub_dir;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
movq %rdi, %rbx
leaq 0x5250(%rip), %rsi      # 0x16ab0
leaq 0x40(%rsp), %rdi
leaq 0xc0(%rsp), %rdx
callq 0x8d8c
leaq 0xc0(%rsp), %rdi
pushq $0x18
popq %rdx
movq %rbx, %rsi
callq 0x34a0
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x20(%rsp), %r14
leaq 0x2a7a(%rip), %r15      # 0x1431c
leaq 0xa0(%rsp), %r12
leaq 0x40(%rsp), %r13
leaq 0x60(%rsp), %rbx
leaq 0x80(%rsp), %rbp
leaq 0xc0(%rsp), %rdi
movq %r14, %rsi
pushq $0x2f
popq %rdx
callq 0x35b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x119cf
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
andq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x1223b
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1221c
movq %r12, %rdi
callq 0x3150
movq 0x60(%rsp), %rdi
leaq 0x248(%rsp), %rsi
callq 0x3260
testl %eax, %eax
je 0x11983
movq %r12, %rdi
leaq 0x5213(%rip), %rsi      # 0x16b4c
movq %rbx, %rdx
callq 0x12273
movq %rsp, %rdi
movq %r12, %rsi
callq 0x3350
movq %r12, %rdi
callq 0x3150
movq 0xe66d(%rip), %rdi      # 0x1ffc8
leaq 0x51f1(%rip), %rsi      # 0x16b53
callq 0x32a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3250
movq %rax, %rdi
callq 0x3160
movq (%rsp), %rdi
callq 0x3230
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x1223b
movq %r12, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x1221c
movq %r13, %rdi
movq %r12, %rsi
callq 0x3350
movq %r12, %rdi
callq 0x3150
movq %rbp, %rdi
callq 0x3150
movq %rbx, %rdi
callq 0x3150
movq %rsp, %rdi
callq 0x3150
jmp 0x118bc
leaq 0x20(%rsp), %rdi
callq 0x3150
leaq 0xc0(%rsp), %rdi
callq 0x31f0
leaq 0x40(%rsp), %rdi
callq 0x3150
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x11a62
jmp 0x11a36
jmp 0x11a36
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
jmp 0x11a3e
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x3150
jmp 0x11a39
jmp 0x11a36
movq %rax, %rbx
jmp 0x11a43
movq %rax, %rbx
jmp 0x11a4b
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x3150
movq %rsp, %rdi
callq 0x3150
leaq 0x20(%rsp), %rdi
callq 0x3150
leaq 0xc0(%rsp), %rdi
callq 0x31f0
leaq 0x40(%rsp), %rdi
callq 0x3150
movq %rbx, %rdi
callq 0x3540
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/util.C
// Function: file_finder(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void file_finder(const std::string& path, std::vector<std::string>& filenames, const std::string& suffix){
    DIR *dir;
    struct dirent *ent; 
    struct stat st;

    dir = opendir(path.c_str());
    while((ent = readdir(dir)) != NULL){
        std::string file_name = ent->d_name;
        std::string full_file_name = path + "/" + file_name;
        if(file_name[0] == '.') continue;
    
        if(stat(full_file_name.c_str(), &st) == -1) continue;

        bool is_directory = (st.st_mode & S_IFDIR) != 0;

        if(is_directory)    file_finder(full_file_name, filenames, suffix);
    
        if(file_name.length() >= suffix.length() && file_name.substr(file_name.length() - suffix.length()) == suffix)
            filenames.push_back(file_name);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdx, %rbx
movq %rsi, 0x8(%rsp)
movq %rdi, %r15
movq (%rdi), %rdi
callq 0x3430
movq %rax, %r12
leaq 0x18(%rsp), %r13
leaq 0x38(%rsp), %rbp
leaq 0x58(%rsp), %r14
movq %rbx, 0x10(%rsp)
movq %r12, %rdi
callq 0x3440
testq %rax, %rax
je 0x11c3e
addq $0x13, %rax
movq %r13, %rdi
movq %rax, %rsi
movq %rbp, %rdx
callq 0x8d8c
movq %r14, %rdi
movq %r15, %rsi
leaq 0x278a(%rip), %rdx      # 0x1431c
callq 0x1223b
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1221c
movq %r14, %rdi
callq 0x3150
movq 0x18(%rsp), %rax
cmpb $0x2e, (%rax)
je 0x11c29
movq 0x38(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x3260
cmpl $-0x1, %eax
je 0x11c29
testb $0x40, 0x91(%rsp)
je 0x11be5
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0x11b27
movq 0x20(%rsp), %rdx
subq 0x8(%rbx), %rdx
jb 0x11c29
movq %r14, %rdi
movq %r13, %rsi
pushq $-0x1
popq %rcx
callq 0x32e0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9505
movl %eax, %ebx
movq %r14, %rdi
callq 0x3150
testb %bl, %bl
movq 0x10(%rsp), %rbx
je 0x11c29
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0xe93a
movq %rbp, %rdi
callq 0x3150
movq %r13, %rdi
callq 0x3150
jmp 0x11b62
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11c52
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0x11c64
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x3150
jmp 0x11c6e
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3150
movq %rbx, %rdi
callq 0x3540
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/util.C
// Function: GetSpeechIndexClass(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int&, int&)
void GetSpeechIndexClass(std::string filename, int& cls, int& index){
    size_t pos = filename.find_last_of("_");
    if(pos == std::string::npos){
        std::cout<<"Invalid spike response filename: "<<filename<<std::endl;
        exit(EXIT_FAILURE);
    }
    cls = std::stoi(filename.substr(pos + 1));
    
    filename = filename.substr(0, pos);
    pos = filename.find_last_of("_");
    if(pos == std::string::npos){
        std::cout<<"Invalid spike response filename: "<<filename<<std::endl;
        std::cout<<"Cannot find the index before the class id!"<<std::endl;
        exit(EXIT_FAILURE);
    }
    index = std::stoi(filename.substr(pos + 1));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x2692(%rip), %rsi      # 0x1432f
pushq $-0x1
popq %rdx
callq 0x3280
cmpq $-0x1, %rax
je 0x11d5b
movq %rax, %r15
leaq 0x1(%rax), %rdx
movq %rsp, %r13
pushq $-0x1
popq %rcx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x32e0
pushq $0xa
popq %rdx
movq %r13, %rdi
xorl %esi, %esi
callq 0x122e9
movl %eax, (%r12)
movq %rsp, %rdi
callq 0x3150
movq %rsp, %r12
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0x32e0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3350
movq %r12, %rdi
callq 0x3150
leaq 0x2622(%rip), %rsi      # 0x1432f
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x3280
cmpq $-0x1, %rax
je 0x11d7b
incq %rax
movq %rsp, %r15
pushq $-0x1
popq %rcx
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x32e0
pushq $0xa
popq %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x122e9
movl %eax, (%r14)
movq %rsp, %rdi
callq 0x3150
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0xe266(%rip), %rdi      # 0x1ffc8
leaq 0x4e1c(%rip), %rsi      # 0x16b85
callq 0x32a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3250
jmp 0x11db3
movq 0xe246(%rip), %r14      # 0x1ffc8
leaq 0x4dfc(%rip), %rsi      # 0x16b85
movq %r14, %rdi
callq 0x32a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3250
movq %rax, %rdi
callq 0x3160
leaq 0x4dfc(%rip), %rsi      # 0x16ba7
movq %r14, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x3160
pushq $0x1
popq %rdi
callq 0x3330
jmp 0x11dc5
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3150
movq %rbx, %rdi
callq 0x3540
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/util.C
// Function: ReadMnistLabel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<int, std::allocator<int>>&)
int ReadMnistLabel(std::string filename, std::vector<int> &mat){
    std::ifstream file(filename.c_str(), std::ios::binary);
    if(!file.is_open()){
        std::cout<<"Cannot open the file: "<<filename<<std::endl;
        exit(EXIT_FAILURE);
    }
    int magic_number = 0;
    int number_of_images = 0;
    file.read((char*) &magic_number, sizeof(magic_number));
    magic_number = ReverseInt(magic_number);
    file.read((char*) &number_of_images,sizeof(number_of_images));
    number_of_images = ReverseInt(number_of_images);

    for(int i = 0; i < number_of_images; ++i){
        unsigned char temp = 0;
        file.read((char*) &temp, sizeof(temp));
        mat.push_back(temp);
    }
    return mat.size();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rsi
leaq 0x10(%rsp), %rdi
pushq $0x4
popq %rdx
callq 0x35a0
leaq 0x88(%rsp), %rdi
callq 0x30a0
testb %al, %al
je 0x1214d
leaq 0x8(%rsp), %rsi
andl $0x0, (%rsi)
andl $0x0, 0x4(%rsp)
leaq 0x10(%rsp), %rdi
pushq $0x4
popq %rdx
callq 0x3370
movl 0x8(%rsp), %eax
bswapl %eax
movl %eax, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x4(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x3370
movl 0x4(%rsp), %eax
bswapl %eax
movl %eax, 0x4(%rsp)
xorl %ebp, %ebp
leaq 0x10(%rsp), %r14
leaq 0x3(%rsp), %r15
pushq $0x1
popq %r12
leaq 0xc(%rsp), %r13
cmpl %eax, %ebp
jge 0x12123
movb $0x0, 0x3(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3370
movzbl 0x3(%rsp), %eax
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x402a
incl %ebp
movl 0x4(%rsp), %eax
jmp 0x120f0
movq 0x8(%rbx), %r14
subq (%rbx), %r14
shrq $0x2, %r14
leaq 0x10(%rsp), %rdi
callq 0x30d0
movl %r14d, %eax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xde74(%rip), %rdi      # 0x1ffc8
leaq 0x4a77(%rip), %rsi      # 0x16bd2
callq 0x32a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x3250
movq %rax, %rdi
callq 0x3160
pushq $0x1
popq %rdi
callq 0x3330
jmp 0x12181
jmp 0x12181
jmp 0x12181
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x30d0
movq %rbx, %rdi
callq 0x3540
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/util.C
// Function: ReadMnistData(std::vector<std::vector<std::vector<float, std::allocator<float>>, std::allocator<std::vector<float, std::allocator<float>>>>, std::allocator<std::vector<std::vector<float, std::allocator<float>>, std::allocator<std::vector<float, std::allocator<float>>>>>>&, std::vector<int, std::allocator<int>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
int  ReadMnistData(Matrices& x, std::vector<int>& y, std::string xpath, std::string ypath, int nums)
{
    //* read MNIST image
    int len = ReadMnistSample(xpath, x, nums);
    //* read MNIST label
    int t = ReadMnistLabel(ypath, y);
    return t;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %r8d, %ebp
movq %rcx, %r15
movq %rsi, %r14
movq %rdi, %r12
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x33c0
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x11ddd
leaq 0x20(%rsp), %rdi
callq 0x3150
movq %rsp, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x33c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1205f
movl %eax, %ebp
movq %rsp, %rdi
callq 0x3150
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x12209
movq %rax, %r14
movq %rbx, %rdi
callq 0x3150
movq %r14, %rdi
callq 0x3540
// File: /workspace/github_c_makefile_star2_O2/stonezwr[P]SpiKL-IP/main.C
// Function: ParallelSim(void*)
void * ParallelSim(void * NTPargptr){

    NTParg * arg = (NTParg *)NTPargptr;
    Network * network = arg->network;
    long tid = arg->tid;
    delete arg;

    Simulator simulator(network);

    (network)->AnalogToSpike();   // application for speech
    simulator.LSMRun(tid);
    cout<<"Thread "<<tid<<" done!"<<endl;
    pthread_exit(NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq (%rdi), %rbx
movq 0x8(%rdi), %r14
pushq $0x10
popq %rsi
callq 0x32d0
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x108b4
movq %r14, %rdi
callq 0xd4fa
movq %r15, %rdi
movq %rbx, %rsi
callq 0x10922
movq 0xd49c(%rip), %rdi      # 0x1ffc8
leaq 0x40ec(%rip), %rsi      # 0x16c1f
callq 0x32a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3590
leaq 0x40dd(%rip), %rsi      # 0x16c27
movq %rax, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x3160
xorl %edi, %edi
callq 0x3550
// File: /workspace/github_c_makefile_star2_O2/josch[P]stride/splitstr.c
// Function: SplitString
int SplitString(char *Buffer, char **Fields, int MaxField)
{
  int FieldCnt, SymbCnt, FieldFlag, BuffLen;
  static char LocalBuffer[BUFSZ];


  FieldCnt =0; FieldFlag = 0;
  BuffLen = (int)strlen(Buffer) - 1;

  strcpy(LocalBuffer,Buffer);

  for(SymbCnt=0; SymbCnt<BuffLen; SymbCnt++) {
    if( (isspace(LocalBuffer[SymbCnt])) && FieldFlag == 0 && SymbCnt != BuffLen-1 ) continue;
    if( (!isspace(LocalBuffer[SymbCnt])) && FieldFlag == 1 && SymbCnt == BuffLen-1 ) {
      LocalBuffer[SymbCnt+1] = '\0';
      return(FieldCnt);
    }
    else
    if( (isspace(LocalBuffer[SymbCnt])) && FieldFlag == 1 ) {
      LocalBuffer[SymbCnt] = '\0';
      FieldFlag = 0;
      if( FieldCnt == MaxField ) return(FieldCnt);
    }
    else
    if( (!isspace(LocalBuffer[SymbCnt])) && FieldFlag == 0 ) {
      FieldFlag = 1;
      Fields[FieldCnt] = LocalBuffer+SymbCnt;
      FieldCnt++;
    }
  }
  
     return(FieldCnt);
 }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, 0x4(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, %r13
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
callq 0x20b0
movq %rax, %r15
leaq 0x1da76(%rip), %r12     # 0x20bc0
movq %r12, %rdi
movq %r13, %rsi
callq 0x2070
leal (%rbx,%r15), %ebp
cmpl $0x2, %r15d
pushq $0x1
popq %rax
movq %r15, 0x8(%rsp)
cmovll %eax, %r15d
decl %r15d
xorl %r14d, %r14d
xorl %r13d, %r13d
xorl %ebx, %ebx
cmpq %r14, %r15
je 0x3234
callq 0x22a0
movq (%rax), %rax
movsbq (%r14,%r12), %rcx
movzwl (%rax,%rcx,2), %ecx
xorl %eax, %eax
cmpq %r14, %rbp
je 0x31a3
movl %ecx, %edx
andl $0x2000, %edx           # imm = 0x2000
je 0x31a3
testl %ebx, %ebx
je 0x320e
cmpq %r14, %rbp
setne %dl
movl %ecx, %esi
shrl $0xd, %esi
andl $0x1, %esi
cmpl $0x1, %ebx
setne %dil
orb %dl, %dil
orb %sil, %dil
je 0x3218
leaq (%r12,%r14), %rdx
cmpl $0x1, %ebx
sete %sil
movl %ecx, %edi
shrl $0xd, %edi
andb %sil, %dil
cmpb $0x1, %dil
jne 0x31e5
movb $0x0, (%rdx)
cmpl 0x4(%rsp), %r13d
jne 0x320e
jmp 0x322d
btl $0xd, %ecx
setae %al
testl %ebx, %ebx
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x320c
movslq %r13d, %r13
movq 0x10(%rsp), %rax
movq %rdx, (%rax,%r13,8)
incl %r13d
pushq $0x1
popq %rax
jmp 0x320e
movl %ebx, %eax
incq %r14
movl %eax, %ebx
jmp 0x3174
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
movq 0x8(%rsp), %rcx
addl %ecx, %eax
incl %eax
movb $0x0, (%rax,%r12)
jmp 0x3234
movl 0x4(%rsp), %eax
movl %eax, %r13d
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop