// File: /workspace/github_cpp_makefile_star2_O3/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), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq -0xa0(%rbp), %r15
movq %r15, -0x10(%r15)
movq %rax, -0x8(%r15)
movb %al, (%r15)
leaq -0x80(%rbp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq -0x60(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x5a10(%rip), %rsi      # 0x803c
leaq -0x3d8(%rbp), %rdi
movl $0x8, %edx
callq 0x2240
movq -0x3d8(%rbp), %rax
movq -0x18(%rax), %rax
movl -0x3b8(%rbp,%rax), %r13d
testb $0x5, %r13b
je 0x26a1
movq 0x8973(%rip), %rbx      # 0xafd0
leaq 0x59ea(%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 0x8941(%rip), %rdi      # 0xafd0
callq 0x2030
movq %rax, %rdi
callq 0x20f0
jmp 0x2918
movl %r13d, -0x2c(%rbp)
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 0x5f92
leaq -0x120(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x5f92
leaq -0x100(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x5f92
leaq -0xe0(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x5f92
movq %r13, %rdi
leaq -0x50(%rbp), %rsi
movq %r14, %rdx
movq %r12, %rcx
movq %rbx, %r8
callq 0x67da
movq -0x138(%rbp), %rdi
movq %r13, %rsi
callq 0x6030
leaq -0x150(%rbp), %rdi
callq 0x2506
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0x27f8
movq -0x160(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x190(%rbp), %rdi
leaq -0x180(%rbp), %rax
cmpq %rax, %rdi
je 0x281a
movq -0x180(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x1b0(%rbp), %rdi
leaq -0x1a0(%rbp), %rax
cmpq %rax, %rdi
je 0x283c
movq -0x1a0(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x1d0(%rbp), %rdi
leaq -0x1c0(%rbp), %rax
cmpq %rax, %rdi
je 0x285e
movq -0x1c0(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x2880
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x28a2
movq -0x100(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x28c4
movq -0x120(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x28dd
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x3d8(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x3b8(%rbp,%rax)
je 0x26c8
leaq -0x3d8(%rbp), %rdi
leaq -0xc0(%rbp), %r14
leaq -0xa0(%rbp), %r15
leaq -0x80(%rbp), %r12
callq 0x2040
movl -0x2c(%rbp), %r13d
leaq -0x3d8(%rbp), %rdi
callq 0x2050
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x293d
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x90(%rbp), %rdi
cmpq %r12, %rdi
je 0x2955
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xb0(%rbp), %rdi
cmpq %r15, %rdi
je 0x2970
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xd0(%rbp), %rdi
cmpq %r14, %rdi
je 0x298b
movq -0xc0(%rbp), %rsi
incq %rsi
callq 0x2160
testb $0x5, %r13b
sete %al
addq $0x3b8, %rsp            # imm = 0x3B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2a6c
jmp 0x2a5d
jmp 0x2a5d
movq %rax, %rbx
jmp 0x2a42
movq %rax, %rbx
jmp 0x2a20
movq %rax, %rbx
jmp 0x29fe
movq %rax, %rbx
jmp 0x29dc
movq %rax, %rbx
leaq -0x1d0(%rbp), %rdi
callq 0x5798
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x29fe
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x2a20
movq -0x100(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x2a42
movq -0x120(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x2a60
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2160
jmp 0x2a60
movq %rax, %rbx
leaq -0x3d8(%rbp), %rdi
callq 0x2050
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x2a85
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x2aa1
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x2ac3
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x2ae5
movq -0xc0(%rbp), %rsi
incq %rsi
callq 0x2160
movq %rbx, %rdi
callq 0x2220