// File: /workspace/github_c_makefile_star2_O0/stonezwr[P]SpiKL-IP/network.C
// Function: Network::LoadNextSpeechTrainCV(networkmode_t)
int Network::LoadNextSpeechTrainCV(networkmode_t networkmode){
    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); 

    _lsm_output_layer->LSMRemoveTeacherSignal((*_cv_train_sp_iter)->Class());
    _cv_train_sp_iter++;
    assert(!_CVspeeches.empty());
    if(_cv_train_sp_iter != _CVspeeches[_train_fold_ind].end()){
        LoadSpeeches(*_cv_train_sp_iter, neuronmode_input, neuronmode_reservoir, neuronmode_readout,true);
        return (*_cv_train_sp_iter)->Index();
    }else{
        ++_train_fold_ind;
        if(_train_fold_ind == _fold_ind)  ++_train_fold_ind;

        if(_train_fold_ind < _fold){
            _cv_train_sp_iter = _CVspeeches[_train_fold_ind].begin();
            if(_cv_train_sp_iter != _CVspeeches[_train_fold_ind].end()){
                LoadSpeeches(*_cv_train_sp_iter, neuronmode_input, neuronmode_reservoir,neuronmode_readout, true);
                return (*_cv_train_sp_iter)->Index();
            }else{
                assert(0);
                return -1;
            }
        }else{
            LSMNetworkRemoveSpeech();
            return -1;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, 0x268(%rax)
je 0x20313
jmp 0x20332
leaq 0x15571(%rip), %rdi     # 0x3588b
leaq 0x14ff9(%rip), %rsi     # 0x3531a
movl $0x25a, %edx            # imm = 0x25A
leaq 0x156fa(%rip), %rcx     # 0x35a27
callq 0x4210
movq -0x48(%rbp), %rax
cmpq $0x0, 0x270(%rax)
je 0x20342
jmp 0x20361
leaq 0x15578(%rip), %rdi     # 0x358c1
leaq 0x14fca(%rip), %rsi     # 0x3531a
movl $0x25b, %edx            # imm = 0x25B
leaq 0x156cb(%rip), %rcx     # 0x35a27
callq 0x4210
movq -0x48(%rbp), %rax
cmpq $0x0, 0x2a8(%rax)
je 0x20371
jmp 0x20390
leaq 0x15566(%rip), %rdi     # 0x358de
leaq 0x14f9b(%rip), %rsi     # 0x3531a
movl $0x25c, %edx            # imm = 0x25C
leaq 0x1569c(%rip), %rcx     # 0x35a27
callq 0x4210
movq -0x48(%rbp), %rdi
movl $0x3, -0x18(%rbp)
movl $0x3, -0x1c(%rbp)
movl $0x3, -0x20(%rbp)
leaq -0x14(%rbp), %rsi
leaq -0x18(%rbp), %rdx
leaq -0x1c(%rbp), %rcx
leaq -0x20(%rbp), %r8
callq 0x211b0
movq -0x48(%rbp), %rdi
movq 0x2a8(%rdi), %rax
movq %rax, -0x50(%rbp)
addq $0x250, %rdi            # imm = 0x250
callq 0x23d50
movq (%rax), %rdi
callq 0x242f0
movq -0x50(%rbp), %rdi
movl %eax, %esi
callq 0x10b90
movq -0x48(%rbp), %rdi
addq $0x250, %rdi            # imm = 0x250
xorl %esi, %esi
callq 0x24330
movq -0x48(%rbp), %rdi
movq %rax, -0x28(%rbp)
addq $0x238, %rdi            # imm = 0x238
callq 0x24370
xorb $-0x1, %al
testb $0x1, %al
jne 0x2041a
jmp 0x2041c
jmp 0x2043b
leaq 0x155c4(%rip), %rdi     # 0x359e7
leaq 0x14ef0(%rip), %rsi     # 0x3531a
movl $0x264, %edx            # imm = 0x264
leaq 0x155f1(%rip), %rcx     # 0x35a27
callq 0x4210
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x250, %rcx            # imm = 0x250
movq %rcx, -0x58(%rbp)
movq %rax, %rdi
addq $0x238, %rdi            # imm = 0x238
movslq 0x230(%rax), %rsi
callq 0x243b0
movq %rax, %rdi
callq 0x23d20
movq -0x58(%rbp), %rdi
movq %rax, -0x30(%rbp)
leaq -0x30(%rbp), %rsi
callq 0x23ce0
testb $0x1, %al
jne 0x20482
jmp 0x204ce
movq -0x48(%rbp), %rdi
addq $0x250, %rdi            # imm = 0x250
callq 0x23d50
movq -0x48(%rbp), %rdi
movq (%rax), %rsi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
movl -0x20(%rbp), %r8d
movl $0x1, %r9d
callq 0x20dc0
movq -0x48(%rbp), %rdi
addq $0x250, %rdi            # imm = 0x250
callq 0x23d50
movq (%rax), %rdi
callq 0x24310
movl %eax, -0x4(%rbp)
jmp 0x2060b
movq -0x48(%rbp), %rcx
movl 0x230(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x230(%rcx)
movl 0x230(%rcx), %eax
cmpl 0x22c(%rcx), %eax
jne 0x20502
movq -0x48(%rbp), %rax
movl 0x230(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x230(%rax)
movq -0x48(%rbp), %rcx
movl 0x230(%rcx), %eax
cmpl 0x228(%rcx), %eax
jge 0x205fb
movq -0x48(%rbp), %rax
movq %rax, %rdi
addq $0x238, %rdi            # imm = 0x238
movslq 0x230(%rax), %rsi
callq 0x243b0
movq %rax, %rdi
callq 0x23cb0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq %rcx, 0x250(%rax)
movq %rax, %rcx
addq $0x250, %rcx            # imm = 0x250
movq %rcx, -0x60(%rbp)
movq %rax, %rdi
addq $0x238, %rdi            # imm = 0x238
movslq 0x230(%rax), %rsi
callq 0x243b0
movq %rax, %rdi
callq 0x23d20
movq -0x60(%rbp), %rdi
movq %rax, -0x40(%rbp)
leaq -0x40(%rbp), %rsi
callq 0x23ce0
testb $0x1, %al
jne 0x20593
jmp 0x205dc
movq -0x48(%rbp), %rdi
addq $0x250, %rdi            # imm = 0x250
callq 0x23d50
movq -0x48(%rbp), %rdi
movq (%rax), %rsi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
movl -0x20(%rbp), %r8d
movl $0x1, %r9d
callq 0x20dc0
movq -0x48(%rbp), %rdi
addq $0x250, %rdi            # imm = 0x250
callq 0x23d50
movq (%rax), %rdi
callq 0x24310
movl %eax, -0x4(%rbp)
jmp 0x2060b
leaq 0x14d35(%rip), %rdi     # 0x35318
leaq 0x14d30(%rip), %rsi     # 0x3531a
movl $0x272, %edx            # imm = 0x272
leaq 0x15431(%rip), %rcx     # 0x35a27
callq 0x4210
movq -0x48(%rbp), %rdi
callq 0x20f70
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)