// File: /workspace/github_c_makefile_star2_O0/stonezwr[P]SpiKL-IP/speech.C
// Function: Speech::CollectFreq(synapsetype_t, std::vector<double, std::allocator<double>>&, int)
void Speech::CollectFreq(synapsetype_t syn_t, vector<double>& fs, int end_t){
    vector<Channel*> tmp;
    vector<Channel*> & channels = syn_t == INPUT_SYN ? _channels : 
        syn_t == RESERVOIR_SYN ? _rChannels :
        syn_t == READOUT_SYN ? _oChannels : tmp;

    if(channels.empty()){
        cout<<"In Speech::CollectFreq(), you are reading: "<<syn_t<<" channels.\n "
            <<"Is the synapse type undefined or the channels are empty ?"<<endl;
        assert(!channels.empty());
    }
    if(end_t == 0){
        cout<<"The ending time of the speech is zero!!"<<endl;
        assert(end_t != 0);
    }
    for(size_t i = 0; i < channels.size(); ++i){
        assert(channels[i]);
        fs.push_back(((double)(channels[i]->SizeSpikeT()))/end_t);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x85d0
cmpl $0x1, -0xc(%rbp)
jne 0x835a
movq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x839c
cmpl $0x0, -0xc(%rbp)
jne 0x836e
movq -0x68(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x78(%rbp)
jmp 0x8394
cmpl $0x2, -0xc(%rbp)
jne 0x8382
movq -0x68(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x80(%rbp)
jmp 0x838c
leaq -0x38(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x838c
movq -0x80(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x8d00
testb $0x1, %al
jne 0x83b6
jmp 0x8485
movq 0x44c0b(%rip), %rdi     # 0x4cfc8
leaq 0x2c004(%rip), %rsi     # 0x343c8
callq 0x4360
movq %rax, -0x88(%rbp)
jmp 0x83d2
movq -0x88(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x46c0
movq %rax, -0x90(%rbp)
jmp 0x83ea
movq -0x90(%rbp), %rdi
leaq 0x2bffc(%rip), %rsi     # 0x343f4
callq 0x4360
movq %rax, -0x98(%rbp)
jmp 0x8406
movq -0x98(%rbp), %rdi
leaq 0x2bfed(%rip), %rsi     # 0x34401
callq 0x4360
movq %rax, -0xa0(%rbp)
jmp 0x8422
movq -0xa0(%rbp), %rdi
movq 0x44b88(%rip), %rsi     # 0x4cfb8
callq 0x43b0
jmp 0x8437
movq -0x40(%rbp), %rdi
callq 0x8d00
xorb $-0x1, %al
testb $0x1, %al
jne 0x8448
jmp 0x844a
jmp 0x8483
leaq 0x2bfea(%rip), %rdi     # 0x3443b
leaq 0x2bc96(%rip), %rsi     # 0x340ee
movl $0xb1, %edx
leaq 0x2bfe9(%rip), %rcx     # 0x3444d
callq 0x4210
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x8660
jmp 0x85bf
jmp 0x8485
cmpl $0x0, -0x1c(%rbp)
jne 0x84e5
movq 0x44b36(%rip), %rdi     # 0x4cfc8
leaq 0x2bff3(%rip), %rsi     # 0x3448c
callq 0x4360
movq %rax, -0xa8(%rbp)
jmp 0x84a7
movq -0xa8(%rbp), %rdi
movq 0x44b03(%rip), %rsi     # 0x4cfb8
callq 0x43b0
jmp 0x84bc
cmpl $0x0, -0x1c(%rbp)
je 0x84c4
jmp 0x84e3
leaq 0x2bfe9(%rip), %rdi     # 0x344b4
leaq 0x2bc1c(%rip), %rsi     # 0x340ee
movl $0xb5, %edx
leaq 0x2bf6f(%rip), %rcx     # 0x3444d
callq 0x4210
jmp 0x84e5
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x40(%rbp), %rdi
callq 0x8860
movq %rax, %rcx
movq -0xb0(%rbp), %rax
cmpq %rcx, %rax
jae 0x85ad
movq -0x40(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x88a0
cmpq $0x0, (%rax)
je 0x8529
jmp 0x8548
leaq 0x2be3a(%rip), %rdi     # 0x3436a
leaq 0x2bbb7(%rip), %rsi     # 0x340ee
movl $0xb8, %edx
leaq 0x2bf0a(%rip), %rcx     # 0x3444d
callq 0x4210
movq -0x18(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x40(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x88a0
movq (%rax), %rdi
callq 0x8970
movl %eax, -0xb4(%rbp)
jmp 0x8570
movq -0xc0(%rbp), %rdi
movl -0xb4(%rbp), %eax
cvtsi2sd %eax, %xmm0
cvtsi2sdl -0x1c(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
leaq -0x60(%rbp), %rsi
callq 0x8d40
jmp 0x859a
jmp 0x859c
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x84ed
leaq -0x38(%rbp), %rdi
callq 0x8660
addq $0xc0, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x46d0
nopl (%rax,%rax)