// File: /workspace/github_c_makefile_star2_O0/stonezwr[P]SpiKL-IP/network.C
// Function: Network::LoadNextSpeech(bool, networkmode_t, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Network::LoadNextSpeech(bool train, networkmode_t networkmode, const string sample_type){
    assert(_lsm_input_layer != NULL);
    assert(_lsm_reservoir_layer != NULL);
    assert(_lsm_output_layer != NULL);

    neuronmode_t neuronmode_input = NORMAL, neuronmode_reservoir = NORMAL, neuronmode_readout = NORMAL;
    // determine the neuron mode by the network mode:
    DetermineNetworkNeuronMode(networkmode, neuronmode_input, neuronmode_reservoir, neuronmode_readout);

    if(train == true) _lsm_output_layer->LSMRemoveTeacherSignal((*_sp_iter)->Class());
    _sp_iter++;

    auto sp_end_ptr = _speeches.end();
    
    if(_sp_iter != sp_end_ptr){
        LoadSpeeches(*_sp_iter, neuronmode_input, neuronmode_reservoir, neuronmode_readout, train);
        return (*_sp_iter)->Index();
    }else{
        LSMNetworkRemoveSpeech();
        return -1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, 0x268(%rax)
je 0x1fbff
jmp 0x1fc1e
leaq 0x15c85(%rip), %rdi     # 0x3588b
leaq 0x1570d(%rip), %rsi     # 0x3531a
movl $0x21c, %edx            # imm = 0x21C
leaq 0x15cfa(%rip), %rcx     # 0x35913
callq 0x4210
movq -0x48(%rbp), %rax
cmpq $0x0, 0x270(%rax)
je 0x1fc2e
jmp 0x1fc4d
leaq 0x15c8c(%rip), %rdi     # 0x358c1
leaq 0x156de(%rip), %rsi     # 0x3531a
movl $0x21d, %edx            # imm = 0x21D
leaq 0x15ccb(%rip), %rcx     # 0x35913
callq 0x4210
movq -0x48(%rbp), %rax
cmpq $0x0, 0x2a8(%rax)
je 0x1fc5d
jmp 0x1fc7c
leaq 0x15c7a(%rip), %rdi     # 0x358de
leaq 0x156af(%rip), %rsi     # 0x3531a
movl $0x21e, %edx            # imm = 0x21E
leaq 0x15c9c(%rip), %rcx     # 0x35913
callq 0x4210
movq -0x48(%rbp), %rdi
movl $0x3, -0x24(%rbp)
movl $0x3, -0x28(%rbp)
movl $0x3, -0x2c(%rbp)
leaq -0x18(%rbp), %rsi
leaq -0x24(%rbp), %rdx
leaq -0x28(%rbp), %rcx
leaq -0x2c(%rbp), %r8
callq 0x211b0
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x1fce5
movq -0x48(%rbp), %rdi
movq 0x2a8(%rdi), %rax
movq %rax, -0x50(%rbp)
addq $0x220, %rdi            # imm = 0x220
callq 0x23d50
movq (%rax), %rdi
callq 0x242f0
movq -0x50(%rbp), %rdi
movl %eax, %esi
callq 0x10b90
movq -0x48(%rbp), %rdi
addq $0x220, %rdi            # imm = 0x220
xorl %esi, %esi
callq 0x24330
movq -0x48(%rbp), %rdi
movq %rax, -0x38(%rbp)
addq $0x208, %rdi            # imm = 0x208
callq 0x23d20
movq -0x48(%rbp), %rdi
movq %rax, -0x40(%rbp)
addq $0x220, %rdi            # imm = 0x220
leaq -0x40(%rbp), %rsi
callq 0x23ce0
testb $0x1, %al
jne 0x1fd29
jmp 0x1fd75
movq -0x48(%rbp), %rdi
addq $0x220, %rdi            # imm = 0x220
callq 0x23d50
movq -0x48(%rbp), %rdi
movq (%rax), %rsi
movl -0x24(%rbp), %edx
movl -0x28(%rbp), %ecx
movl -0x2c(%rbp), %r8d
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %r9d
callq 0x20dc0
movq -0x48(%rbp), %rdi
addq $0x220, %rdi            # imm = 0x220
callq 0x23d50
movq (%rax), %rdi
callq 0x24310
movl %eax, -0x4(%rbp)
jmp 0x1fd85
movq -0x48(%rbp), %rdi
callq 0x20f70
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop