// File: /workspace/github_c_makefile_star2_O1/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
subq $0x18, %rsp
movl %ecx, 0xc(%rsp)
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, 0x10(%rsp)
leaq 0xf719(%rip), %rsi      # 0x178ff
movq %rdx, %rdi
callq 0x33f0
movl %eax, %r15d
testl %eax, %eax
je 0x822d
leaq 0x116d4(%rip), %rsi     # 0x198d0
movq %r12, %rdi
callq 0x33f0
movl $0x18, %r14d
testl %eax, %eax
je 0x8233
leaq 0x1011b(%rip), %rdi     # 0x18330
leaq 0xf4cd(%rip), %rsi      # 0x176e9
leaq 0xf757(%rip), %rcx      # 0x1797a
movl $0x263, %edx            # imm = 0x263
callq 0x31b0
movl $0x30, %r14d
movq 0x10(%rsp), %rax
movq (%rax,%r14), %rbp
cmpq 0x8(%rax,%r14), %rbp
movl 0xc(%rsp), %r12d
je 0x8357
movq (%rbp), %rdi
testl %r15d, %r15d
je 0x825c
callq 0xc3e2
jmp 0x8261
callq 0xc3de
testq %rax, %rax
je 0x838c
movq 0x10(%rax), %r13
testq %r13, %r13
je 0x83ab
cmpb %r12b, (%r13)
jne 0x8343
testl %r15d, %r15d
je 0x82ac
movq 0x10(%rsp), %rax
movq 0x10(%rax), %r12
testq %r12, %r12
je 0x82fd
movq %r12, %rdi
callq 0x3150
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x3340
jmp 0x8314
movq %r13, %rdi
callq 0x3150
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x3340
movl $0x1, %edx
movq %rbx, %rdi
leaq 0xed5f(%rip), %rsi      # 0x17030
callq 0x3340
movq 0x10(%rsp), %rax
movq 0x10(%rax), %r13
testq %r13, %r13
jne 0x832d
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x3550
jmp 0x8343
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x3550
movl 0xc(%rsp), %r12d
movl $0x1, %edx
movq %rbx, %rdi
leaq 0xed08(%rip), %rsi      # 0x17030
callq 0x3340
movq %r13, %rdi
callq 0x3150
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x3340
addq $0x8, %rbp
movq 0x10(%rsp), %rax
cmpq 0x8(%rax,%r14), %rbp
jne 0x824c
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x31e0
leaq 0xf623(%rip), %rdi      # 0x179b6
leaq 0xf34f(%rip), %rsi      # 0x176e9
leaq 0xf5d9(%rip), %rcx      # 0x1797a
movl $0x268, %edx            # imm = 0x268
callq 0x31b0
leaq 0xf5c3(%rip), %rdi      # 0x17975
leaq 0xf330(%rip), %rsi      # 0x176e9
leaq 0xf5ba(%rip), %rcx      # 0x1797a
movl $0x269, %edx            # imm = 0x269
callq 0x31b0