// File: /workspace/github_c_makefile_star2_O0/stonezwr[P]SpiKL-IP/network.C
// Function: Network::LoadSpeeches(Speech*, neuronmode_t, neuronmode_t, neuronmode_t, bool)
void Network::LoadSpeeches(Speech      * sp,
        neuronmode_t neuronmode_input,
        neuronmode_t neuronmode_reservoir,
        neuronmode_t neuronmode_readout,
        bool train
        )
{
    // assign the speech ptr here!
    assert(sp);
    _sp = sp;

    assert(_lsm_input_layer);
    _lsm_input_layer->LSMLoadSpeech(sp,&_lsm_input,neuronmode_input,INPUTCHANNEL);

    assert(_lsm_reservoir_layer);
    _lsm_reservoir_layer->LSMLoadSpeech(sp,&_lsm_reservoir,neuronmode_reservoir,RESERVOIRCHANNEL);
    
    // just set the neuron mode of the output neurons
    assert(_lsm_output_layer);
    _lsm_output_layer->LSMSetNeurons(neuronmode_readout);

    // if train the readout
    if(train == true){
        if(neuronmode_readout == NORMAL){ // original Yong's rule
            _lsm_output_layer->LSMSetTeacherSignal(sp->Class());
        }     
        else	  
			assert(0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %r9b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
andb $0x1, %al
movb %al, -0x1d(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x20df3
jmp 0x20e12
leaq 0x14e13(%rip), %rdi     # 0x35c0d
leaq 0x14519(%rip), %rsi     # 0x3531a
movl $0x1bc, %edx            # imm = 0x1BC
leaq 0x1497f(%rip), %rcx     # 0x3578c
callq 0x4210
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x260(%rax)
cmpq $0x0, 0x268(%rax)
je 0x20e2d
jmp 0x20e4c
leaq 0x149ad(%rip), %rdi     # 0x357e1
leaq 0x144df(%rip), %rsi     # 0x3531a
movl $0x1bf, %edx            # imm = 0x1BF
leaq 0x14945(%rip), %rcx     # 0x3578c
callq 0x4210
movq -0x28(%rbp), %rdx
movq 0x268(%rdx), %rdi
movq -0x10(%rbp), %rsi
addq $0x2b0, %rdx            # imm = 0x2B0
movl -0x14(%rbp), %ecx
xorl %r8d, %r8d
callq 0xf660
movq -0x28(%rbp), %rax
cmpq $0x0, 0x270(%rax)
je 0x20e7d
jmp 0x20e9c
leaq 0x1496e(%rip), %rdi     # 0x357f2
leaq 0x1448f(%rip), %rsi     # 0x3531a
movl $0x1c2, %edx            # imm = 0x1C2
leaq 0x148f5(%rip), %rcx     # 0x3578c
callq 0x4210
movq -0x28(%rbp), %rdx
movq 0x270(%rdx), %rdi
movq -0x10(%rbp), %rsi
addq $0x2b4, %rdx            # imm = 0x2B4
movl -0x18(%rbp), %ecx
movl $0x1, %r8d
callq 0xf660
movq -0x28(%rbp), %rax
cmpq $0x0, 0x2a8(%rax)
je 0x20ed0
jmp 0x20eef
leaq 0x14944(%rip), %rdi     # 0x3581b
leaq 0x1443c(%rip), %rsi     # 0x3531a
movl $0x1c6, %edx            # imm = 0x1C6
leaq 0x148a2(%rip), %rcx     # 0x3578c
callq 0x4210
movq -0x28(%rbp), %rax
movq 0x2a8(%rax), %rdi
movl -0x1c(%rbp), %esi
callq 0xf8a0
movb -0x1d(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x20f5b
cmpl $0x3, -0x1c(%rbp)
jne 0x20f3a
movq -0x28(%rbp), %rax
movq 0x2a8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x242f0
movq -0x30(%rbp), %rdi
movl %eax, %esi
callq 0x10aa0
jmp 0x20f59
leaq 0x143d7(%rip), %rdi     # 0x35318
leaq 0x143d2(%rip), %rsi     # 0x3531a
movl $0x1cf, %edx            # imm = 0x1CF
leaq 0x14838(%rip), %rcx     # 0x3578c
callq 0x4210
jmp 0x20f5b
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)