// File: /workspace/github_cpp_makefile_star2_O1/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: importMovieDataFromFile(std::vector<Video, std::allocator<Video>>&)
bool importMovieDataFromFile(vector<Video> &videoList)
{
    string title;
    string genre;
    string director;
    string actor;
    
    std::ifstream inputFile("movie-dataset.csv");
    if (!inputFile)  // ifstream object equals 0 if open fails
    {
        cout << "Could not access file" << endl;
        return false;
    }

    while(inputFile) //read through to the end of the file
    {
        getline(inputFile,title,',');  //title = title from file
        getline(inputFile,genre,',');  //genre = genre from file
        getline(inputFile,director,',');  //director = director from file
        getline(inputFile,actor,'\n');  //actor = actor from file

        videoList.push_back(Video(title, genre, director, actor)); 
    }

    inputFile.close();
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3b8, %rsp            # imm = 0x3B8
movq %rdi, -0x138(%rbp)
leaq -0xc0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xa0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x80(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0x60(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x5a1e(%rip), %rsi      # 0x803c
leaq -0x3d8(%rbp), %rdi
movl $0x8, %edx
callq 0x2240
movq -0x3d8(%rbp), %rax
movq -0x18(%rax), %rax
movl -0x3b8(%rbp,%rax), %eax
movl %eax, -0x2c(%rbp)
testb $0x5, %al
je 0x2693
movq 0x8981(%rip), %rbx      # 0xafd0
leaq 0x59f8(%rip), %rsi      # 0x804e
movl $0x15, %edx
movq %rbx, %rdi
callq 0x2180
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq 0x894f(%rip), %rdi      # 0xafd0
callq 0x2030
movq %rax, %rdi
callq 0x20f0
jmp 0x2909
movq -0x3d8(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x3b8(%rbp,%rax)
jne 0x28fd
leaq -0x3d8(%rbp), %r15
leaq -0x130(%rbp), %r14
leaq -0x110(%rbp), %r12
leaq -0xf0(%rbp), %rbx
leaq -0x1d0(%rbp), %r13
movq %r15, %rdi
leaq -0xd0(%rbp), %rsi
movl $0x2c, %edx
callq 0x2250
movq %r15, %rdi
leaq -0xb0(%rbp), %rsi
movl $0x2c, %edx
callq 0x2250
movq %r15, %rdi
leaq -0x90(%rbp), %rsi
movl $0x2c, %edx
callq 0x2250
movq %r15, %rdi
leaq -0x70(%rbp), %rsi
movl $0xa, %edx
callq 0x2250
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x50(%rbp), %rdi
callq 0x5e9e
leaq -0x120(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x5e9e
leaq -0x100(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x5e9e
leaq -0xe0(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x5e9e
movq %r13, %rdi
leaq -0x50(%rbp), %rsi
movq %r14, %rdx
movq %r12, %rcx
movq %rbx, %r8
callq 0x66da
movq -0x138(%rbp), %rdi
movq %r13, %rsi
callq 0x5f38
leaq -0x150(%rbp), %rdi
callq 0x2506
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0x27ff
movq -0x160(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x190(%rbp), %rdi
leaq -0x180(%rbp), %rax
cmpq %rax, %rdi
je 0x2821
movq -0x180(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x1b0(%rbp), %rdi
leaq -0x1a0(%rbp), %rax
cmpq %rax, %rdi
je 0x2843
movq -0x1a0(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x1d0(%rbp), %rdi
leaq -0x1c0(%rbp), %rax
cmpq %rax, %rdi
je 0x2865
movq -0x1c0(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x2887
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x28a9
movq -0x100(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x28cb
movq -0x120(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x28e4
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x3d8(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x3b8(%rbp,%rax)
je 0x26cf
leaq -0x3d8(%rbp), %rdi
callq 0x2040
leaq -0x3d8(%rbp), %rdi
callq 0x2050
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x292e
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x294a
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x296c
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x298e
movq -0xc0(%rbp), %rsi
incq %rsi
callq 0x2160
testb $0x5, -0x2c(%rbp)
sete %al
addq $0x3b8, %rsp            # imm = 0x3B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2a6f
jmp 0x2a60
jmp 0x2a60
movq %rax, %rbx
jmp 0x2a45
movq %rax, %rbx
jmp 0x2a23
movq %rax, %rbx
jmp 0x2a01
movq %rax, %rbx
jmp 0x29df
movq %rax, %rbx
leaq -0x1d0(%rbp), %rdi
callq 0x56c6
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x2a01
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x2a23
movq -0x100(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x2a45
movq -0x120(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x2a63
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
jmp 0x2a63
movq %rax, %rbx
leaq -0x3d8(%rbp), %rdi
callq 0x2050
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x2a88
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x2aa4
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x2ac6
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x2ae8
movq -0xc0(%rbp), %rsi
incq %rsi
callq 0x2160
movq %rbx, %rdi
callq 0x2220