// File: UCBASiCS[P]SPRIGHT/src/customizedinput.cpp
// Function: CustomizedInput::convertFileToTimeSignal()
void CustomizedInput::convertFileToTimeSignal()
{
    std::string line;
    std::ifstream file(config->getInputFile());
    ffast_complex temp;

    for(int i=0; i < config->getSignalLength(); i++) {
        if(neededSamples.count(i) > 0 && getline(file,line)) {
            (std::istringstream) line >> temp;
            timeSignal[i] = temp;
        }
        else if (neededSamples.count(i) == 0 && file.ignore(256,'\n'))
        {}
        else {
            std::cerr << "Error while reading input" << std::endl;
            exit(EXIT_FAILURE);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x430, %rsp            # imm = 0x430
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x3e8(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4410
movq -0x3e8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xf8b0
movq %rax, -0x3e0(%rbp)
jmp 0x118cc
movq -0x3e0(%rbp), %rsi
leaq -0x230(%rbp), %rdi
movl $0x8, %edx
callq 0x4580
jmp 0x118e6
leaq -0x250(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x7dd0
jmp 0x118fa
movl $0x0, -0x254(%rbp)
movq -0x3e8(%rbp), %rax
movl -0x254(%rbp), %ecx
movl %ecx, -0x3f0(%rbp)
movq 0x10(%rax), %rdi
callq 0xe9a0
movl %eax, -0x3ec(%rbp)
jmp 0x11928
movl -0x3f0(%rbp), %eax
movl -0x3ec(%rbp), %ecx
cmpl %ecx, %eax
jge 0x11b48
movq -0x3e8(%rbp), %rdi
addq $0x50, %rdi
leaq -0x254(%rbp), %rsi
callq 0x12060
movq %rax, -0x3f8(%rbp)
jmp 0x1195c
movq -0x3f8(%rbp), %rax
cmpq $0x0, %rax
jbe 0x11a7d
leaq -0x230(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x4060
movq %rax, -0x400(%rbp)
jmp 0x11986
movq -0x400(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x43c0
movb %al, -0x401(%rbp)
jmp 0x119a4
movb -0x401(%rbp), %al
testb $0x1, %al
jne 0x119b3
jmp 0x11a7d
leaq -0x3d8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
movl $0x8, %edx
callq 0x4500
jmp 0x119ca
leaq -0x3d8(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x120c0
jmp 0x119df
leaq -0x3d8(%rbp), %rdi
callq 0x4120
movq -0x3e8(%rbp), %rdi
addq $0x18, %rdi
leaq -0x254(%rbp), %rsi
callq 0x120f0
movq %rax, -0x410(%rbp)
jmp 0x11a0b
movq -0x410(%rbp), %rax
movq -0x250(%rbp), %rcx
movq %rcx, (%rax)
movq -0x248(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x11b32
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x11b72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x11b66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x3d8(%rbp), %rdi
callq 0x4120
jmp 0x11b66
movq -0x3e8(%rbp), %rdi
addq $0x50, %rdi
leaq -0x254(%rbp), %rsi
callq 0x12060
movq %rax, -0x418(%rbp)
jmp 0x11a9d
movq -0x418(%rbp), %rax
cmpq $0x0, %rax
jne 0x11af5
leaq -0x230(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
movl $0xa, %edx
callq 0x4190
movq %rax, -0x420(%rbp)
jmp 0x11ac9
movq -0x420(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x43c0
movb %al, -0x421(%rbp)
jmp 0x11ae7
movb -0x421(%rbp), %al
testb $0x1, %al
jne 0x11af3
jmp 0x11af5
jmp 0x11b30
movq 0x1e4ec(%rip), %rdi     # 0x2ffe8
leaq 0xf126(%rip), %rsi      # 0x20c29
callq 0x42b0
movq %rax, -0x430(%rbp)
jmp 0x11b11
movq -0x430(%rbp), %rdi
movq 0x1e491(%rip), %rsi     # 0x2ffb0
callq 0x42f0
jmp 0x11b26
movl $0x1, %edi
callq 0x4390
jmp 0x11b32
jmp 0x11b34
movl -0x254(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x254(%rbp)
jmp 0x11904
leaq -0x230(%rbp), %rdi
callq 0x4080
leaq -0x28(%rbp), %rdi
callq 0x4180
addq $0x430, %rsp            # imm = 0x430
popq %rbp
retq
leaq -0x230(%rbp), %rdi
callq 0x4080
leaq -0x28(%rbp), %rdi
callq 0x4180
movq -0x238(%rbp), %rdi
callq 0x4540
nopw (%rax,%rax)