// File: /workspace/github_c_makefile_star2_O1/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, (%rsp)
movq $0x0, 0x10(%rsp)
cmpl $0x1, %esi
je 0x624a
testl %r15d, %r15d
jne 0x623b
addq $0x18, %r14
jmp 0x624a
addq $0x30, %r14
cmpl $0x2, %r15d
movq %rsp, %rax
cmovneq %rax, %r14
movq (%r14), %rax
cmpq 0x8(%r14), %rax
jne 0x62dd
movq 0x1ad72(%rip), %rdi     # 0x20fd0
leaq 0x11165(%rip), %rsi     # 0x173ca
movl $0x2b, %edx
callq 0x3340
movq 0x1ad5a(%rip), %rdi     # 0x20fd0
movl %r15d, %esi
callq 0x3560
movq %rax, %r15
leaq 0x1116e(%rip), %rsi     # 0x173f6
movl $0xc, %edx
movq %rax, %rdi
callq 0x3340
leaq 0x11167(%rip), %rsi     # 0x17403
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
cmpq 0x8(%r14), %rax
je 0x63eb
testl %ebp, %ebp
je 0x63a8
movq (%r14), %rax
cmpq %rax, 0x8(%r14)
je 0x6366
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movsd %xmm0, 0x20(%rsp)
xorl %r12d, %r12d
leaq 0x28(%rsp), %r15
cmpq $0x0, (%rax,%r12,8)
je 0x6389
movq (%rax,%r12,8), %rax
movq 0x20(%rax), %rcx
subq 0x18(%rax), %rcx
shrq $0x2, %rcx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
divsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x6345
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x6350
movq %rbx, %rdi
movq %r15, %rdx
callq 0x6938
incq %r12
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r12
jb 0x6303
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x637c
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x32f0
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10fdc(%rip), %rdi     # 0x1736c
leaq 0x10d59(%rip), %rsi     # 0x170f0
leaq 0x110b1(%rip), %rcx     # 0x1744f
movl $0xb8, %edx
callq 0x31b0
movq 0x1ac21(%rip), %rdi     # 0x20fd0
leaq 0x110d8(%rip), %rsi     # 0x1748e
movl $0x27, %edx
callq 0x3340
movq 0x1ac09(%rip), %rdi     # 0x20fd0
callq 0x3160
leaq 0x110e3(%rip), %rdi     # 0x174b6
leaq 0x10d16(%rip), %rsi     # 0x170f0
leaq 0x1106e(%rip), %rcx     # 0x1744f
movl $0xb5, %edx
callq 0x31b0
leaq 0x1104b(%rip), %rdi     # 0x1743d
leaq 0x10cf7(%rip), %rsi     # 0x170f0
leaq 0x1104f(%rip), %rcx     # 0x1744f
movl $0xb1, %edx
callq 0x31b0
jmp 0x640c
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6425
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x32f0
movq %rbx, %rdi
callq 0x3570
nop