// File: /workspace/github_c_makefile_star2_O3/stonezwr[P]SpiKL-IP/network.C
// Function: Network::AddNeuronGroup(char*, int, bool, double)
void Network::AddNeuronGroup(char * name, int num, bool excitatory, double v_mem){
    assert(num >= 1);
    for(list<Neuron*>::iterator iter = _individualNeurons.begin(); iter != _individualNeurons.end(); iter++)
        assert(strcmp((*iter)->Name(),name) != 0);

    assert(_groupNeurons.find(string(name)) == _groupNeurons.end());

    NeuronGroup * neuronGroup = new NeuronGroup(name, num, this, excitatory, v_mem);
    _groupNeurons[string(name)] = neuronGroup;

    string name_str(name);
    if(name_str.substr(0, 6) == "hidden")   _hidden_layer_names.push_back(name_str);
   
    for(Neuron * neuron = neuronGroup->First(); neuron != NULL; neuron = neuronGroup->Next()){
        _allNeurons.push_back(neuron);
        if(strcmp(name,"input") == 0)
            _inputNeurons.push_back(neuron);
        if(strcmp(name,"output") == 0)
            _outputNeurons.push_back(neuron);
    }
    if(excitatory == true) for(Neuron * neuron = neuronGroup->First(); neuron != NULL; neuron = neuronGroup->Next()){
        _allExcitatoryNeurons.push_back(neuron);
        neuron->SetExcitatory();
    }
    else for(Neuron * neuron = neuronGroup->First(); neuron != NULL; neuron = neuronGroup->Next()) _allInhibitoryNeurons.push_back(neuron);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movsd %xmm0, 0x28(%rsp)
movl %ecx, 0x4(%rsp)
testl %edx, %edx
jle 0xd289
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movq %rdi, %r14
movq (%r14), %r14
cmpq %rbx, %r14
je 0xcfda
movq 0x10(%r14), %rdi
callq 0x6ec8
movq %rax, %rdi
movq %r15, %rsi
callq 0x33f0
testl %eax, %eax
jne 0xcf9b
leaq 0xb3ee(%rip), %rdi      # 0x183b0
leaq 0xb409(%rip), %rsi      # 0x183d2
leaq 0xb47b(%rip), %rcx      # 0x1844b
movl $0x57, %edx
callq 0x31b0
leaq 0x8(%rsp), %rdi
leaq 0x38(%rsp), %rdx
movq %r15, %rsi
callq 0xa7e4
leaq 0x18(%rbx), %r12
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x1182c
testq %rax, %rax
jne 0xd2a8
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd021
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32f0
movl $0xa0, %edi
callq 0x32e0
movq %rax, %r14
movzbl 0x4(%rsp), %r8d
movq %rax, %rdi
movq %r15, %rsi
movl %ebp, %edx
movq %rbx, %rcx
movsd 0x28(%rsp), %xmm0
callq 0x847e
leaq 0x8(%rsp), %rdi
leaq 0x38(%rsp), %rdx
movq %r15, %rsi
callq 0xa7e4
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x11928
movq %r14, (%rax)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xd088
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32f0
leaq 0x8(%rsp), %rdi
leaq 0x38(%rsp), %rdx
movq %r15, %rsi
callq 0xa7e4
leaq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x6, %ecx
xorl %edx, %edx
callq 0x3310
leaq 0xb3cc(%rip), %rsi      # 0x18483
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x3100
movl %eax, %ebp
movq (%r12), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0xd0e1
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x32f0
testl %ebp, %ebp
jne 0xd0f6
leaq 0x278(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x113aa
movq %r14, %rdi
callq 0x8fe4
movq %rax, %r13
leaq 0x88(%rbx), %r12
leaq 0xd0(%rbx), %rax
movq %rax, 0x28(%rsp)
leaq 0xe8(%rbx), %rax
movq %rax, 0x30(%rsp)
leaq 0xb363(%rip), %rbp      # 0x1848a
testq %r13, %r13
je 0xd1c6
movl $0x18, %edi
callq 0x32e0
movq %r13, 0x10(%rax)
movq %rax, %rdi
movq %r12, %rsi
callq 0x3060
incq 0x98(%rbx)
movq %r15, %rdi
leaq 0xa18a(%rip), %rsi      # 0x172e4
callq 0x33f0
testl %eax, %eax
jne 0xd185
movl $0x18, %edi
callq 0x32e0
movq %r13, 0x10(%rax)
movq %rax, %rdi
movq 0x28(%rsp), %rsi
callq 0x3060
incq 0xe0(%rbx)
movq %r15, %rdi
movq %rbp, %rsi
callq 0x33f0
testl %eax, %eax
jne 0xd1b6
movl $0x18, %edi
callq 0x32e0
movq %r13, 0x10(%rax)
movq %rax, %rdi
movq 0x30(%rsp), %rsi
callq 0x3060
incq 0xf8(%rbx)
movq %r14, %rdi
callq 0x902a
movq %rax, %r13
jmp 0xd127
cmpb $0x0, 0x4(%rsp)
je 0xd21a
movq %r14, %rdi
callq 0x8fe4
movq %rax, %r12
leaq 0xa0(%rbx), %r15
testq %r12, %r12
je 0xd25e
movl $0x18, %edi
callq 0x32e0
movq %r12, 0x10(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x3060
incq 0xb0(%rbx)
movb $0x1, 0x110(%r12)
movq %r14, %rdi
callq 0x902a
movq %rax, %r12
jmp 0xd1df
movq %r14, %rdi
callq 0x8fe4
movq %rax, %r12
leaq 0xb8(%rbx), %r15
testq %r12, %r12
je 0xd25e
movl $0x18, %edi
callq 0x32e0
movq %r12, 0x10(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x3060
incq 0xc8(%rbx)
movq %r14, %rdi
callq 0x902a
movq %rax, %r12
jmp 0xd22c
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xd27a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32f0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb1b2(%rip), %rdi      # 0x18442
leaq 0xb13b(%rip), %rsi      # 0x183d2
leaq 0xb1ad(%rip), %rcx      # 0x1844b
movl $0x55, %edx
callq 0x31b0
leaq 0xb15b(%rip), %rdi      # 0x1840a
leaq 0xb11c(%rip), %rsi      # 0x183d2
leaq 0xb18e(%rip), %rcx      # 0x1844b
movl $0x59, %edx
callq 0x31b0
jmp 0xd2fb
jmp 0xd2fb
jmp 0xd2fb
jmp 0xd2fb
jmp 0xd2fb
jmp 0xd2f2
jmp 0xd2fb
jmp 0xd2f2
movq %rax, %rbx
movl $0xa0, %esi
movq %r14, %rdi
jmp 0xd315
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0xd308
movq %rax, %rbx
jmp 0xd31a
jmp 0xd2fb
jmp 0xd2fb
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xd31a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32f0
movq %rbx, %rdi
callq 0x3570