// File: UCBASiCS[P]SPRIGHT/src/experimentinput.cpp
// Function: ExperimentInput::process()
void ExperimentInput::process()
{
    chrono->start("Input");
    neededSamples.clear();
    for (int k = 0; k < config->getSignalLength(); k++)
    {
	   neededSamples.insert(k);
    }

    nonZeroFrequencies.clear();
    generateNonZeroFrequencies();

    for (auto t = neededSamples.cbegin(); t != neededSamples.cend(); ++t) {
        timeSignal[*t] =0;
    }
    
    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 %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0xc8(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x4550
movq -0xc0(%rbp), %rdx
leaq 0xc740(%rip), %rsi      # 0x20c23
leaq -0x28(%rbp), %rdi
callq 0x5a20
jmp 0x144ee
movq -0xc8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xc270
jmp 0x14500
leaq -0x28(%rbp), %rdi
callq 0x4180
leaq -0x29(%rbp), %rdi
callq 0x4310
movq -0xd0(%rbp), %rdi
addq $0x50, %rdi
callq 0x156c0
movl $0x0, -0x40(%rbp)
movq -0xd0(%rbp), %rax
movl -0x40(%rbp), %ecx
movl %ecx, -0xd4(%rbp)
movq 0x10(%rax), %rdi
callq 0xe9a0
movl %eax, %ecx
movl -0xd4(%rbp), %eax
cmpl %ecx, %eax
jge 0x145a5
movq -0xd0(%rbp), %rdi
addq $0x50, %rdi
leaq -0x40(%rbp), %rsi
callq 0x11fe0
movq %rax, -0x50(%rbp)
movb %dl, -0x48(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x14529
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x14597
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4180
leaq -0x29(%rbp), %rdi
callq 0x4310
jmp 0x147ce
movq -0xd0(%rbp), %rdi
addq $0x88, %rdi
callq 0x5d20
movq -0xd0(%rbp), %rdi
callq 0x147e0
movq -0xd0(%rbp), %rdi
addq $0x50, %rdi
callq 0x156e0
movq %rax, -0x58(%rbp)
movq -0xd0(%rbp), %rdi
addq $0x50, %rdi
callq 0x15740
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x15710
testb $0x1, %al
jne 0x145ff
jmp 0x1463f
movq -0xd0(%rbp), %rax
addq $0x18, %rax
movq %rax, -0xe0(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x15770
movq -0xe0(%rbp), %rdi
movq %rax, %rsi
callq 0x120f0
movq %rax, %rdi
xorps %xmm0, %xmm0
callq 0x5e60
leaq -0x58(%rbp), %rdi
callq 0x15790
jmp 0x145d8
movq -0xd0(%rbp), %rdi
callq 0x14ab0
movq -0xd0(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xeb90
testb $0x1, %al
jne 0x14661
jmp 0x1466d
movq -0xd0(%rbp), %rdi
callq 0x14c40
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 0x146a8
jmp 0x14725
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 0x14681
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 0xc4cb(%rip), %rsi      # 0x20c23
leaq -0xb0(%rbp), %rdi
callq 0x5a20
jmp 0x14766
movq -0xf8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0xc340
jmp 0x1477b
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, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x147c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x4180
leaq -0xb1(%rbp), %rdi
callq 0x4310
movq -0x38(%rbp), %rdi
callq 0x4540
nopw (%rax,%rax)