// File: UCBASiCS[P]SPRIGHT/src/experimentinput.cpp
// Function: ExperimentInput::process(std::vector<int, std::allocator<int>>)
void ExperimentInput::process(std::vector<int> delays)
{

    chrono->start("Input");
    findNeededSamples(delays);

    generateNonZeroFrequencies();
    

    // frequencyToTimeUsingFFT(delays);
    frequencyToTime();
        

    if (config->isNoisy())
    {
        addNoise();
    }

    for (auto t = neededSamples.cbegin(); t != neededSamples.cend(); ++t)
    {
        timeSignal[*t] /= sqrt((ffast_complex)config->getSignalLengthOriginal());
    }


    
    chrono->stop("Input");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rsi, -0xd8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0xc8(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x4550
movq -0xc0(%rbp), %rdx
leaq 0xbde5(%rip), %rsi      # 0x20c23
leaq -0x30(%rbp), %rdi
callq 0x5a20
jmp 0x14e49
movq -0xc8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xc270
jmp 0x14e5b
leaq -0x30(%rbp), %rdi
callq 0x4180
leaq -0x31(%rbp), %rdi
callq 0x4310
movq -0xd8(%rbp), %rsi
leaq -0x60(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0xa090
movq -0xd0(%rbp), %rdi
movq -0xe0(%rbp), %rsi
callq 0x150a0
jmp 0x14e99
leaq -0x60(%rbp), %rdi
callq 0x5ad0
movq -0xd0(%rbp), %rdi
callq 0x147e0
movq -0xd0(%rbp), %rdi
callq 0x14ab0
movq -0xd0(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xeb90
testb $0x1, %al
jne 0x14ed0
jmp 0x14f29
movq -0xd0(%rbp), %rdi
callq 0x14c40
jmp 0x14f29
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x14f01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x4180
leaq -0x31(%rbp), %rdi
callq 0x4310
jmp 0x1508a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5ad0
jmp 0x1508a
movq -0xd0(%rbp), %rdi
addq $0x50, %rdi
callq 0x156e0
movq %rax, -0x68(%rbp)
movq -0xd0(%rbp), %rdi
addq $0x50, %rdi
callq 0x15740
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x15710
testb $0x1, %al
jne 0x14f64
jmp 0x14fe1
movq -0xd0(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xf890
cvtsi2sd %eax, %xmm0
leaq -0x90(%rbp), %rdi
xorps %xmm1, %xmm1
callq 0x7dd0
leaq -0x90(%rbp), %rdi
callq 0x157c0
movq -0xd0(%rbp), %rax
movsd %xmm0, -0x80(%rbp)
movsd %xmm1, -0x78(%rbp)
addq $0x18, %rax
movq %rax, -0xe8(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x15770
movq -0xe8(%rbp), %rdi
movq %rax, %rsi
callq 0x120f0
movq %rax, %rdi
leaq -0x80(%rbp), %rsi
callq 0x15820
leaq -0x68(%rbp), %rdi
callq 0x15790
jmp 0x14f3d
movq -0xd0(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xf8(%rbp)
leaq -0xb1(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x4550
movq -0xf0(%rbp), %rdx
leaq 0xbc0f(%rip), %rsi      # 0x20c23
leaq -0xb0(%rbp), %rdi
callq 0x5a20
jmp 0x15022
movq -0xf8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0xc340
jmp 0x15037
leaq -0xb0(%rbp), %rdi
callq 0x4180
leaq -0xb1(%rbp), %rdi
callq 0x4310
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1507e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x4180
leaq -0xb1(%rbp), %rdi
callq 0x4310
movq -0x40(%rbp), %rdi
callq 0x4540
nopw %cs:(%rax,%rax)