// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r14
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
cmpl $0x1, %esi
je 0x629b
testl %r15d, %r15d
jne 0x628a
addq $0x18, %r14
jmp 0x629b
addq $0x30, %r14
cmpl $0x2, %r15d
leaq 0x10(%rsp), %rax
cmovneq %rax, %r14
movq (%r14), %rax
movq 0x8(%r14), %rcx
cmpq %rcx, %rax
jne 0x6333
movq 0x1ad1e(%rip), %r12     # 0x20fd0
leaq 0x11131(%rip), %rsi     # 0x173ea
movl $0x2b, %edx
movq %r12, %rdi
callq 0x3340
movq %r12, %rdi
movl %r15d, %esi
callq 0x3560
movq %rax, %r15
leaq 0x1113b(%rip), %rsi     # 0x17416
movl $0xc, %edx
movq %rax, %rdi
callq 0x3340
leaq 0x11134(%rip), %rsi     # 0x17423
movl $0x39, %edx
movq %r15, %rdi
callq 0x3340
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x32b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31e0
movq (%r14), %rax
movq 0x8(%r14), %rcx
cmpq %rcx, %rax
je 0x6423
testl %ebp, %ebp
je 0x63e1
cmpq %rax, %rcx
je 0x63b5
cvtsi2sd %ebp, %xmm1
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
movsd %xmm1, (%rsp)
movq (%rax,%r12,8), %rax
testq %rax, %rax
je 0x63c2
movq 0x20(%rax), %rcx
subq 0x18(%rax), %rcx
shrq $0x2, %rcx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x638f
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x639f
movq %rbx, %rdi
movq %r15, %rdx
callq 0x6974
movsd (%rsp), %xmm1
incq %r12
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r12
jb 0x6351
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10fc3(%rip), %rdi     # 0x1738c
leaq 0x10d40(%rip), %rsi     # 0x17110
leaq 0x11098(%rip), %rcx     # 0x1746f
movl $0xb8, %edx
callq 0x31b0
movq 0x1abe8(%rip), %rbx     # 0x20fd0
leaq 0x110bf(%rip), %rsi     # 0x174ae
movl $0x27, %edx
movq %rbx, %rdi
callq 0x3340
movq %rbx, %rdi
callq 0x3160
leaq 0x110cb(%rip), %rdi     # 0x174d6
leaq 0x10cfe(%rip), %rsi     # 0x17110
leaq 0x11056(%rip), %rcx     # 0x1746f
movl $0xb5, %edx
callq 0x31b0
leaq 0x11033(%rip), %rdi     # 0x1745d
leaq 0x10cdf(%rip), %rsi     # 0x17110
leaq 0x11037(%rip), %rcx     # 0x1746f
movl $0xb1, %edx
callq 0x31b0