// File: /workspace/github_c_makefile_star2_O3/stonezwr[P]SpiKL-IP/neuron.C
// Function: NeuronGroup::LSMLoadSpeech(Speech*, int*, neuronmode_t, channelmode_t)
void NeuronGroup::LSMLoadSpeech(Speech * speech, int * n_channel, neuronmode_t neuronmode, channelmode_t channelmode){
    assert(speech);
    if(_neurons.size() != speech->NumChannels(channelmode)){
        if(!(channelmode == RESERVOIRCHANNEL && (speech->NumChannels(channelmode) == 0))){
            cout<<"channelmode: "<<channelmode<<" has "<<speech->NumChannels(channelmode)<<" channels!"<<endl;
            assert(channelmode == RESERVOIRCHANNEL && speech->NumChannels(channelmode) == 0);
        }
        if(channelmode == RESERVOIRCHANNEL)
            speech->SetNumChannel(_neurons.size(), RESERVOIRCHANNEL);
        else
            assert(0); // your code should never go here
    }
    if(neuronmode == DEACTIVATED)
        *n_channel = 0;
    else
        *n_channel = speech->NumChannels(channelmode);

    // assign the channel ptr to each neuron:
    for(int i = 0; i < _neurons.size(); i++){
        _neurons[i]->LSMSetChannel(speech->GetChannel(i,channelmode),channelmode);
    }
    LSMSetNeurons(neuronmode);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x93c7
movl %r8d, %ebp
movl %ecx, %ebx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movq 0x30(%rdi), %r13
subq 0x28(%rdi), %r13
sarq $0x3, %r13
movq %rsi, %rdi
movl %r8d, %esi
callq 0x4da0
cltq
cmpq %rax, %r13
je 0x9335
cmpl $0x1, %ebp
jne 0x93e6
movq %r14, %rdi
movl $0x1, %esi
callq 0x4da0
testl %eax, %eax
je 0x931c
movq 0x17d57(%rip), %r13     # 0x20fd0
leaq 0xeb40(%rip), %rsi      # 0x17dc0
movl $0xd, %edx
movq %r13, %rdi
callq 0x3340
movq %r13, %rdi
movl $0x1, %esi
callq 0x3560
movq %rax, %r13
leaq 0xeb2a(%rip), %rsi      # 0x17dce
movl $0x5, %edx
movq %rax, %rdi
callq 0x3340
movq %r14, %rdi
movl $0x1, %esi
callq 0x4da0
movq %r13, %rdi
movl %eax, %esi
callq 0x3560
movq %rax, %r13
leaq 0xeb02(%rip), %rsi      # 0x17dd4
movl $0xa, %edx
movq %rax, %rdi
callq 0x3340
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x32b0
movsbl %al, %esi
movq %r13, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31e0
movq %r14, %rdi
movl $0x1, %esi
callq 0x4da0
testl %eax, %eax
jne 0x9455
movq 0x30(%r15), %rsi
subq 0x28(%r15), %rsi
shrq $0x3, %rsi
movq %r14, %rdi
movl $0x1, %edx
callq 0x4a04
testl %ebx, %ebx
je 0x9345
movq %r14, %rdi
movl %ebp, %esi
callq 0x4da0
jmp 0x9347
xorl %eax, %eax
movl %eax, (%r12)
movq 0x28(%r15), %rax
movq 0x30(%r15), %rcx
cmpq %rax, %rcx
je 0x9393
xorl %r12d, %r12d
movq (%rax,%r12,8), %r13
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x4b32
movq %r13, %rdi
movq %rax, %rsi
movl %ebp, %edx
callq 0x782e
incq %r12
movq 0x28(%r15), %rax
movq 0x30(%r15), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r12, %rdx
ja 0x935b
cmpq %rax, %rcx
je 0x93b8
subq %rax, %rcx
sarq $0x3, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %edx, %edx
movq (%rax,%rdx,8), %rsi
movl %ebx, 0x8(%rsi)
incq %rdx
cmpq %rdx, %rcx
jne 0x93a9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe99d(%rip), %rdi      # 0x17d6b
leaq 0xe3b4(%rip), %rsi      # 0x17789
leaq 0xe996(%rip), %rcx      # 0x17d72
movl $0x3ab, %edx            # imm = 0x3AB
callq 0x31b0
movq 0x17be3(%rip), %rbx     # 0x20fd0
leaq 0xe9cc(%rip), %rsi      # 0x17dc0
movl $0xd, %edx
movq %rbx, %rdi
callq 0x3340
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3560
movq %rax, %rbx
leaq 0xe9b9(%rip), %rsi      # 0x17dce
movl $0x5, %edx
movq %rax, %rdi
callq 0x3340
movq %r14, %rdi
movl %ebp, %esi
callq 0x4da0
movq %rbx, %rdi
movl %eax, %esi
callq 0x3560
movq %rax, %rbx
leaq 0xe994(%rip), %rsi      # 0x17dd4
movl $0xa, %edx
movq %rax, %rdi
callq 0x3340
movq %rbx, %rdi
callq 0x3160
leaq 0xe983(%rip), %rdi      # 0x17ddf
leaq 0xe326(%rip), %rsi      # 0x17789
leaq 0xe908(%rip), %rcx      # 0x17d72
movl $0x3af, %edx            # imm = 0x3AF
callq 0x31b0