LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/Funcke[P]cpp_server/lib/request.cpp
// Function: http::Request::add_header_from_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
void Request::add_header_from_string(std::string* raw_header) {
        const std::string delimiter(": ");
        int split_pos = raw_header->find(delimiter);
        std::string key = raw_header->substr(0, split_pos);
        std::string value = raw_header->substr(split_pos + 2, raw_header->size());
        if(key == "Cookie")
            this->add_cookie(&value);
        else
            this->add_header(&key, &value);
        std::cout << key << std::endl;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2687(%rip), %rsi      # 0x505f
leaq -0x78(%rbp), %r15
leaq -0x38(%rbp), %rdx
movq %r15, %rdi
callq 0x254c
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2370
movq %rax, %r15
movslq %r15d, %rcx
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2220
shlq $0x20, %r15
movabsq $0x200000000, %rdx      # imm = 0x200000000
addq %r15, %rdx
sarq $0x20, %rdx
movq 0x8(%r14), %rcx
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0x2220
leaq 0x262d(%rip), %rsi      # 0x5062
leaq -0x38(%rbp), %rdi
callq 0x2ccf
testb %al, %al
je 0x2a50
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x2ace
jmp 0x2a60
leaq -0x38(%rbp), %rsi
leaq -0x58(%rbp), %rdx
movq %rbx, %rdi
callq 0x2bb4
movq 0x5569(%rip), %rdi      # 0x7fd0
leaq -0x38(%rbp), %rsi
callq 0x21d0
movq %rax, %rdi
callq 0x2120
leaq -0x58(%rbp), %rdi
callq 0x20f0
leaq -0x38(%rbp), %rdi
callq 0x20f0
leaq -0x78(%rbp), %rdi
callq 0x20f0
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2ab4
movq %rax, %rbx
jmp 0x2abd
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x20f0
leaq -0x38(%rbp), %rdi
callq 0x20f0
leaq -0x78(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/Funcke[P]cpp_server/lib/request.cpp
// Function: http::Request::add_cookie(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
void Request::add_cookie(std::string* cookie) {
        const std::string delimiter("=");
        int split_pos = cookie->find(delimiter);
        const std::string key = cookie->substr(0, split_pos);
        const std::string value = cookie->substr(split_pos + 1, cookie->size());
        this->cookies[key] = value;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2581(%rip), %rsi      # 0x5069
leaq -0x78(%rbp), %r15
leaq -0x38(%rbp), %rdx
movq %r15, %rdi
callq 0x254c
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2370
movq %rax, %r15
movslq %r15d, %rcx
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2220
shlq $0x20, %r15
movabsq $0x100000000, %rdx      # imm = 0x100000000
addq %r15, %rdx
sarq $0x20, %rdx
movq 0x8(%r14), %rcx
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0x2220
addq $0x90, %rbx
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x2ce0
leaq -0x58(%rbp), %rsi
movq %rax, %rdi
callq 0x2140
leaq -0x58(%rbp), %rdi
callq 0x20f0
leaq -0x38(%rbp), %rdi
callq 0x20f0
leaq -0x78(%rbp), %rdi
callq 0x20f0
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2b99
movq %rax, %rbx
jmp 0x2ba2
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x20f0
leaq -0x38(%rbp), %rdi
callq 0x20f0
leaq -0x78(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O2/Funcke[P]cpp_server/lib/server.cpp
// Function: http::Server::Server(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Server::Server(int port, std::string host) {
        this->network_access.sin_port = htons(port);
        this->network_access.sin_addr.s_addr = inet_addr(host.c_str());
        this->network_access.sin_family = AF_INET;
        this->threadpool = new Threadpool(120);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
rolw $0x8, %si
movw %si, 0xe(%rdi)
movq (%rdx), %rdi
callq 0x2200
movl %eax, 0x10(%rbx)
movw $0x2, 0xc(%rbx)
movl $0xd0, %edi
callq 0x21f0
movq %rax, %r14
pushq $0x78
popq %rsi
movq %rax, %rdi
callq 0x3710
movq %r14, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movl $0xd0, %esi
movq %r14, %rdi
callq 0x2210
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O2/Funcke[P]cpp_server/lib/server.cpp
// Function: http::Server::connect_to_network()
void Server::connect_to_network() {
        //memset(&this->network_access, 0, sizeof(this->network_access));
        this->network_socket = socket( AF_INET, SOCK_STREAM, 0 );
        
        if(bind(this->network_socket, (struct sockaddr*)&this->network_access, sizeof(this->network_access)) > 0) {
            this->abort(-1, "Could not bind server to socket!\n");
        }

        if(listen(this->network_socket, 100) < 0) {
            this->abort(-2, "Connection queue overrun!\n");
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x2070
movl %eax, 0x8(%rbx)
leaq 0xc(%rbx), %rsi
pushq $0x10
popq %rdx
movl %eax, %edi
callq 0x2050
testl %eax, %eax
jg 0x35d6
movl 0x8(%rbx), %edi
pushq $0x64
popq %rsi
callq 0x2250
testl %eax, %eax
js 0x3609
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1aa9(%rip), %rsi      # 0x5086
leaq -0x58(%rbp), %r14
leaq -0x11(%rbp), %rdx
movq %r14, %rdi
callq 0x254c
movq 0x49e4(%rip), %rax      # 0x7fd8
movq (%rax), %rsi
movq (%r14), %rdi
callq 0x2240
movq %r14, %rdi
callq 0x20f0
jmp 0x35be
leaq 0x1a98(%rip), %rsi      # 0x50a8
leaq -0x38(%rbp), %rbx
leaq -0x11(%rbp), %rdx
movq %rbx, %rdi
callq 0x254c
movq 0x49b1(%rip), %rax      # 0x7fd8
movq (%rax), %rsi
movq (%rbx), %rdi
callq 0x2240
movq %rbx, %rdi
callq 0x20f0
jmp 0x35cd
// File: /workspace/github_cpp_makefile_star2_O2/Funcke[P]cpp_server/lib/server.cpp
// Function: http::Server::wait_for_requests()
void Server::wait_for_requests() {
        socklen_t len;
        len = sizeof(this->network_access);
        int connection = accept(this->network_socket, (struct sockaddr*)&this->network_access, &len);
        if(connection < 0) {
            this->abort(-3, "Client could not connect\n");
        }
        HttpRequestLifecycle* lc = new HttpRequestLifecycle(connection);
        this->threadpool->add_job(lc);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq -0x20(%rbp), %rdx
movl $0x10, (%rdx)
movl 0x8(%rdi), %edi
leaq 0xc(%rbx), %rsi
callq 0x20b0
movl %eax, %r14d
testl %eax, %eax
js 0x36c3
movl $0xd0, %edi
callq 0x21f0
movq %rax, %r15
movq %rax, %rdi
movl %r14d, %esi
callq 0x2628
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x3946
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x19f9(%rip), %rsi      # 0x50c3
leaq -0x40(%rbp), %r15
leaq -0x19(%rbp), %rdx
movq %r15, %rdi
callq 0x254c
movq 0x48f7(%rip), %rax      # 0x7fd8
movq (%rax), %rsi
movq (%r15), %rdi
callq 0x2240
movq %r15, %rdi
callq 0x20f0
jmp 0x3695
movq %rax, %rbx
movl $0xd0, %esi
movq %r15, %rdi
callq 0x2210
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O2/Funcke[P]cpp_server/lib/threadpool.cpp
// Function: Threadpool::Threadpool(int)
Threadpool::Threadpool(int size) {
    this->size = size;
    this->terminated = false;
    for(int i = 0; i < size; i++) {
        this->pool.push_back(std::thread(&Threadpool::worker_loop, this));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %r14d
movq %rdi, %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
andq $0x0, 0x20(%rdi)
addq $0x28, %rdi
movq %rdi, -0x38(%rbp)
callq 0x2290
leaq 0x58(%r15), %rdi
movq %rdi, -0x30(%rbp)
callq 0x39ba
andq $0x0, 0xc0(%r15)
leaq 0xb0(%r15), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0xb0(%r15)
movl %r14d, 0xa8(%r15)
movb $0x0, 0xc8(%r15)
xorl %ebx, %ebx
testl %r14d, %r14d
cmovgl %r14d, %ebx
leaq -0x48(%rbp), %r13
leaq -0x40(%rbp), %r14
subl $0x1, %ebx
jb 0x37c7
leaq 0x78(%rip), %rax        # 0x380e
movq %rax, -0x58(%rbp)
andq $0x0, -0x50(%rbp)
movq %r15, -0x40(%rbp)
movq %r13, %rdi
leaq -0x58(%rbp), %rsi
movq %r14, %rdx
callq 0x39da
movq %r12, %rdi
movq %r13, %rsi
callq 0x3e28
movq %r13, %rdi
callq 0x3a58
jmp 0x378a
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x37fd
movq %rax, %rbx
jmp 0x37ec
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x3a58
movq %r12, %rdi
callq 0x3a68
movq -0x30(%rbp), %rdi
callq 0x3afe
movq -0x38(%rbp), %rdi
callq 0x2350
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/Funcke[P]cpp_server/lib/threadpool.cpp
// Function: Threadpool::worker_loop()
void Threadpool::worker_loop() {
    while(1) {
        {
            Job* j;
            std::unique_lock<std::mutex> lock(this->job_mutex);
            this->condition.wait(lock, [this]{ return (this->job_queue.size() != 0 || this->terminated);});
            j = std::move(this->job_queue.front());
            this->job_queue.pop();
            printf("Job read\n");
            lock.unlock();
            j->run();
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
leaq 0x58(%rdi), %r15
leaq -0x38(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3a94
movq %r15, %rdi
callq 0x410c
testq %rax, %rax
jne 0x385c
cmpb $0x0, 0xc8(%rbx)
jne 0x385c
movq %r14, %rdi
movq %r12, %rsi
callq 0x20a0
jmp 0x3839
movq 0x68(%rbx), %rax
movq (%rax), %r13
movq %r15, %rdi
callq 0x42c2
leaq 0x18f9(%rip), %rdi      # 0x516b
callq 0x22e0
movq %r12, %rdi
callq 0x3ab4
movq (%r13), %rax
movq %r13, %rdi
callq *(%rax)
movq %r12, %rdi
callq 0x3ae4
jmp 0x382e
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3ae4
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/Funcke[P]cpp_server/lib/threadpool.cpp
// Function: Threadpool::~Threadpool()
Threadpool::~Threadpool() {
    delete(&(this->job_mutex));
    delete(&(this->condition));
    delete(&(this->job_queue));
    delete(&(this->size));
    delete(&(this->pool));
    delete(&(this->terminated));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
pushq $0x28
popq %rsi
callq 0x2210
leaq 0x28(%r14), %rbx
movq %rbx, %rdi
callq 0x2350
pushq $0x30
popq %rsi
movq %rbx, %rdi
callq 0x2210
leaq 0x58(%r14), %r15
movq %r15, %rdi
callq 0x3afe
pushq $0x50
popq %rsi
movq %r15, %rdi
callq 0x2210
leaq 0xa8(%r14), %rdi
pushq $0x4
popq %rsi
callq 0x2210
leaq 0xb0(%r14), %r12
movq %r12, %rdi
callq 0x3a68
pushq $0x18
popq %rsi
movq %r12, %rdi
callq 0x2210
addq $0xc8, %r14
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x2210
movq %r12, %rdi
callq 0x3a68
movq %r15, %rdi
callq 0x3afe
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2350
nop
// File: /workspace/github_cpp_makefile_star2_O2/Funcke[P]cpp_server/lib/threadpool.cpp
// Function: Threadpool::add_job(Job*)
void Threadpool::add_job(Job* j) {
    std::unique_lock<std::mutex> lock(this->job_mutex);
    this->job_queue.push(j);
    printf("Job added\n");
    lock.unlock();
    this->condition.notify_all();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq -0x28(%rbp), %r14
movq %rsi, (%r14)
leaq -0x20(%rbp), %rdi
movq %rbx, %rsi
callq 0x3a94
leaq 0x58(%rbx), %rdi
movq %r14, %rsi
callq 0x406a
leaq 0x17fa(%rip), %rdi      # 0x5174
callq 0x22e0
leaq -0x20(%rbp), %rdi
callq 0x3ab4
addq $0x28, %rbx
movq %rbx, %rdi
callq 0x2320
leaq -0x20(%rbp), %rdi
callq 0x3ae4
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x20(%rbp), %rdi
callq 0x3ae4
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/main.cpp
// Function: main
int main()
{
  Cart newCart;
  vector<Video> videoList;  //creates an empty vector of Videos called videoList to store movie data from file
    
  if(!importMovieDataFromFile(videoList))  //read in data from CSV
    return 1;  //if the file can't be opened, immediately end the program;

  mainMenu(newCart, videoList);

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
leaq -0x48(%rbp), %rdi
callq 0x5138
xorps %xmm0, %xmm0
leaq -0x20(%rbp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
callq 0x25ec
testb %al, %al
je 0x24c7
xorl %ebx, %ebx
leaq -0x48(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x2e00
jmp 0x24ca
pushq $0x1
popq %rbx
leaq -0x20(%rbp), %rdi
callq 0x2502
leaq -0x38(%rbp), %rdi
callq 0x2502
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x20(%rbp), %rdi
callq 0x2502
leaq -0x38(%rbp), %rdi
callq 0x2502
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: systemPause()
void systemPause()
{
	cin.clear();
	std::cin.ignore(1024, '\n');	// Discart old input
	std::cout << "Press enter to continue...";
	std::cin.get();			// Proceed after new input from user
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x771a(%rip), %rbx      # 0x9fe0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
xorl %esi, %esi
callq 0x2230
pushq $0xa
popq %rdx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
callq 0x2110
movq 0x76e2(%rip), %rdi      # 0x9fd0
leaq 0x377a(%rip), %rsi      # 0x606f
callq 0x2180
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x21b0
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: mainMenu(Cart&, std::vector<Video, std::allocator<Video>>&)
void mainMenu(Cart& newCart, vector<Video> &videoList)
{
	int choiceMain;						//Variable to hold user's menu choice
	do //If choiceMain == 0, the program terminates
	{
		displayMainMenu();  //Display main menu
   		cin >> choiceMain;  //Get user's choice
    		validateMainMenuChoice(choiceMain); //Make sure user enter valid choice
    		mainMenuSwitch(choiceMain, newCart, videoList); //Conduct menu navigation
	}
  	while (choiceMain != 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x71c4(%rip), %r15      # 0x9fe0
leaq -0x24(%rbp), %r12
callq 0x2e59
movq %r15, %rdi
movq %r12, %rsi
callq 0x2100
movq %r12, %rdi
callq 0x2f6b
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2ff7
cmpl $0x0, -0x24(%rbp)
jne 0x2e20
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: displayMainMenu()
void displayMainMenu()
{
	clearScreen();	//Clear screen before displaying menu
	cout << ":::::::::::::::::::\n";
	cout << "::..Welcome to...::\n";
	cout << "::..BawkBuster!..::\n";
	cout << ":::::::::::::::::::\n" << endl;
	cout << "Select One of the Following Options:\n" << endl;
	cout << "	1: Search Movies by Title" << endl;
	cout << "	2: Search Movies by Genre" << endl;
	cout << "	3: Search Movies by Director" << endl;
	cout << "	4: Review Movies in Your Cart" << endl;
	cout << "	5: Check the Rental Price of the Movies in Your Cart" << endl;
	cout << "	6: Checkout\n" << endl;
	cout << "Please Enter a Number between 1 and 6" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
callq 0x28a1
movq 0x7164(%rip), %rbx      # 0x9fd0
leaq 0x33d0(%rip), %r14      # 0x6243
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2180
leaq 0x33d3(%rip), %rsi      # 0x6258
movq %rbx, %rdi
callq 0x2180
leaq 0x33d9(%rip), %rsi      # 0x626d
movq %rbx, %rdi
callq 0x2180
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x33cc(%rip), %rsi      # 0x6282
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x33db(%rip), %rsi      # 0x62a8
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x33df(%rip), %rsi      # 0x62c3
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x33e3(%rip), %rsi      # 0x62de
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x33ea(%rip), %rsi      # 0x62fc
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x33f2(%rip), %rsi      # 0x631b
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x3411(%rip), %rsi      # 0x6351
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x3408(%rip), %rsi      # 0x635f
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x20d0
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: validateMainMenuChoice(int&)
void validateMainMenuChoice(int &choiceMain)
{
	//While the user input is not of the "int" datatype,
	//or the user input is larger than 6 or smaller than 1
	while (!cin || choiceMain > 6 || choiceMain < 1)
	{
		cin.clear();	//Clear bad input flag
		cin.ignore(10000, '\n');	//Discard input
		cout << "Please enter a number between 1 and 6" << endl;
		cin >> choiceMain;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x705d(%rip), %r14      # 0x9fe0
pushq $0xa
popq %r15
movq 0x7042(%rip), %r12      # 0x9fd0
leaq 0x33f0(%rip), %r13      # 0x6385
movq (%r14), %rax
movq -0x18(%rax), %rdi
testb $0x5, 0x20(%r14,%rdi)
jne 0x2fae
movl (%rbx), %eax
addl $-0x7, %eax
cmpl $-0x7, %eax
ja 0x2fe8
addq %r14, %rdi
xorl %esi, %esi
callq 0x2230
movl $0x2710, %esi           # imm = 0x2710
movq %r14, %rdi
movl %r15d, %edx
callq 0x2110
movq %r12, %rdi
movq %r13, %rsi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2100
jmp 0x2f95
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: mainMenuSwitch(int&, Cart&, std::vector<Video, std::allocator<Video>>&)
void mainMenuSwitch(int &choiceMain, Cart& newCart, vector<Video> &videoList)
{
	switch (choiceMain) 
	{
		case 1: titleSearchMain(newCart, videoList);
			break;
		case 2: genreSearchMain(newCart, videoList);
			break;
		case 3: directorSearchMain(newCart, videoList);
			break;
		case 4: moviesInCartMain(newCart);
			break;
		case 5: displayPrice(newCart);
			break;
		case 6: checkOutMain(newCart, choiceMain);
			break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movl (%rdi), %eax
decl %eax
cmpl $0x5, %eax
ja 0x30b7
leaq 0x2fec(%rip), %rcx      # 0x6004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rsi, %rdi
movq %rdx, %rsi
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x30d7
leaq -0x58(%rbp), %rbx
leaq -0x68(%rbp), %r14
movq %r14, %rdi
callq 0x4310
movq %r14, %rdi
callq 0x38fd
leaq -0x58(%rbp), %rdi
jmp 0x30b2
movq %rsi, %rdi
movq %rdx, %rsi
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x352e
movq %rsi, %rdi
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x378d
movq %rsi, %rdi
movq %rdx, %rsi
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x32c0
movq %rdi, %r14
leaq -0x30(%rbp), %rbx
leaq -0x40(%rbp), %r15
movq %r15, %rdi
callq 0x4310
movq %r15, %rdi
movq %r14, %rsi
callq 0x396c
leaq -0x30(%rbp), %rdi
callq 0x2502
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x30c4
movq %rax, %r14
movq %rbx, %rdi
callq 0x2502
movq %r14, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: displayPrice(Cart)
void displayPrice(Cart newCart)
{
	cout << endl << "Current price of the movies in your cart: \n$" << 
	std::fixed << std::setprecision(2) << newCart.getTPrice() << endl;
	systemPause();	//Waits for user input
			//before returning to main menu
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x66c2(%rip), %rdi      # 0x9fd0
callq 0x20d0
leaq 0x2e29(%rip), %rsi      # 0x6743
movq %rax, %rdi
callq 0x2180
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x18(%r14,%rcx), %edx
orl $0x4, %edx
movl %edx, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
movq $0x2, 0x8(%r14,%rax)
movq %rbx, %rdi
callq 0x5174
movq %r14, %rdi
callq 0x2210
movq %rax, %rdi
callq 0x20d0
popq %rbx
popq %r14
popq %rbp
jmp 0x28b9
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: checkOutMain(Cart, int&)
void checkOutMain(Cart newCart, int &choiceMain)
{	
	char readyCheckOut;
	std::cout << "Ready to check out? (Y/N)" << endl;
	std::cin >> readyCheckOut;

	while (!cin || (toupper(readyCheckOut) != 'Y' && toupper(readyCheckOut) != 'N'))
	{
		std::cout << "Please enter 'Y' to proceed to check out, "<<
			"or enter 'N' to return to the main menu." << endl;
		std::cin >> readyCheckOut;
	}
	if (toupper(readyCheckOut) == 'N')
	{
		std::cout << "Returning to main menu..." << endl;
	}
	else if (toupper(readyCheckOut) == 'Y')
	{  //if user wants to check out,
		displayCheckOut(newCart);	//normal check out stuff happens,
		choiceMain = 0; //sets choiceMain = 0; sending termination
	}                 	//signal to mainMenu() to exit while loop                
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, -0x38(%rbp)
movq %rdi, -0x40(%rbp)
movq 0x6644(%rip), %r15      # 0x9fd0
leaq 0x2ddd(%rip), %rsi      # 0x6770
movq %r15, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
movq 0x6636(%rip), %r12      # 0x9fe0
leaq -0x29(%rbp), %r13
leaq 0x2dd5(%rip), %rbx      # 0x678a
leaq 0x2df9(%rip), %r14      # 0x67b5
movq %r12, %rdi
movq %r13, %rsi
callq 0x21d0
movq (%r12), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r12,%rax)
jne 0x39ea
movsbl -0x29(%rbp), %edi
callq 0x2290
cmpl $0x4e, %eax
je 0x3a34
cmpl $0x59, %eax
je 0x3a0a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2180
movq %rax, %rdi
movq %r14, %rsi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
jmp 0x39bc
leaq -0x68(%rbp), %rbx
movq %rbx, %rdi
movq -0x40(%rbp), %rsi
callq 0x4310
movq %rbx, %rdi
callq 0x4180
leaq -0x58(%rbp), %rdi
callq 0x2502
movq -0x38(%rbp), %rax
andl $0x0, (%rax)
jmp 0x3a4f
movq 0x6595(%rip), %rdi      # 0x9fd0
leaq 0x2d9c(%rip), %rsi      # 0x67de
callq 0x2180
movq %rax, %rdi
callq 0x20d0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x2502
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: titleSearchVector(std::vector<Video, std::allocator<Video>> const&, std::vector<Video, std::allocator<Video>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void titleSearchVector(const vector<Video>& videos, vector<Video>& results, string titleIn)  
//takes a const vector of movies to search, a vector of videos to add results to, and a search term.
{
    Video temp;  //creates a temporary video to hold values as we process vector
    int index = 0;
    int size = videos.size();
    for(int i = 0; i < titleIn.size(); i++)
      titleIn.at(i) = toupper(titleIn.at(i));
    while(index < size)
    {
       	temp = videos[index];  //set temp equal to the video at [index]
        std::string tempName = temp.getTitle();
        for (int i = 0; i < tempName.size(); i++)
          tempName.at(i) = toupper(tempName.at(i));
       	if(tempName == titleIn)
    		results.push_back(videos[index]);  //if video is found, add it to results
       	index++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdx, %rbx
movq %rsi, -0x38(%rbp)
movq %rdi, %r14
leaq -0x108(%rbp), %rdi
callq 0x4c88
movq 0x8(%r14), %rax
movq %r14, -0x30(%rbp)
subq (%r14), %rax
movl $0x98, %ecx
cqto
idivq %rcx
movq %rax, %r15
xorl %r14d, %r14d
cmpq %r14, 0x8(%rbx)
jbe 0x3ae6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22b0
movsbl (%rax), %edi
callq 0x2290
movl %eax, %r12d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22b0
movb %r12b, (%rax)
incq %r14
jmp 0x3ab7
movq %rbx, -0x40(%rbp)
xorl %r12d, %r12d
testl %r15d, %r15d
cmovlel %r12d, %r15d
movq %r15, -0x48(%rbp)
leaq -0x108(%rbp), %r15
leaq -0x70(%rbp), %r14
cmpq -0x48(%rbp), %r12
je 0x3ba4
movq %r12, -0x50(%rbp)
imulq $0x98, %r12, %r12
movq -0x30(%rbp), %rax
movq (%rax), %rsi
addq %r12, %rsi
movq %r15, %rdi
callq 0x437e
movq %r14, %rdi
movq %r15, %rbx
movq %r15, %rsi
callq 0x4e74
xorl %r13d, %r13d
cmpq %r13, -0x68(%rbp)
jbe 0x3b6a
movq %r14, %rdi
movq %r13, %rsi
callq 0x22b0
movsbl (%rax), %edi
callq 0x2290
movl %eax, %r15d
movq %r14, %rdi
movq %r13, %rsi
callq 0x22b0
movb %r15b, (%rax)
incq %r13
jmp 0x3b3b
movq %r14, %rdi
movq -0x40(%rbp), %rsi
callq 0x43d0
testb %al, %al
je 0x3b8d
movq -0x30(%rbp), %rax
addq (%rax), %r12
movq -0x38(%rbp), %rdi
movq %r12, %rsi
callq 0x43fc
movq -0x50(%rbp), %r12
incq %r12
movq %r14, %rdi
callq 0x20c0
movq %rbx, %r15
jmp 0x3b03
leaq -0x108(%rbp), %rdi
callq 0x258e
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3bcd
jmp 0x3bc8
jmp 0x3bc8
movq %rax, %rbx
jmp 0x3bd9
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x20c0
leaq -0x108(%rbp), %rdi
callq 0x258e
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: displayGenreSearchMenu()
void displayGenreSearchMenu()
{
	cin.clear();				//Clear bad input flag
	cin.ignore(10000, '\n');	//Discard input
	clearScreen();	//Clear screen before displaying menu
	cout << "Search Movies by: Genre\n" << endl;
	cout << "What genre of movie are you interested in watching?\n" << endl;
	cout << "1: Action" << endl;
	cout << "2: Adventure" << endl;  //split Action and Adventure into separate categories
	cout << "3: Comedy" << endl;
	cout << "4: Romance" << endl;
	cout << "5: Horror" << endl;
	cout << "6: Animation" << endl;
	cout << "7: Other" << endl;
	cout << "0: Return to Main Menu\n" << endl;  //changed 8 to 0 for consistency with title search
	cout << "Please enter a choice between 0 and 7" << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x63e6(%rip), %rbx      # 0x9fe0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
xorl %esi, %esi
callq 0x2230
pushq $0xa
popq %rdx
movl $0x2710, %esi           # imm = 0x2710
movq %rbx, %rdi
callq 0x2110
callq 0x28a1
movq 0x63a9(%rip), %rbx      # 0x9fd0
leaq 0x2860(%rip), %rsi      # 0x648e
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x2862(%rip), %rsi      # 0x64a7
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x2880(%rip), %rsi      # 0x64dc
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x2873(%rip), %rsi      # 0x64e6
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x2869(%rip), %rsi      # 0x64f3
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x285c(%rip), %rsi      # 0x64fd
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x2850(%rip), %rsi      # 0x6508
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x2843(%rip), %rsi      # 0x6512
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x2839(%rip), %rsi      # 0x651f
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x282b(%rip), %rsi      # 0x6528
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x282c(%rip), %rsi      # 0x6540
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x20d0
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: validateGenreMenuChoice(int&)
void validateGenreMenuChoice(int &choiceGenre)
{
	while (!cin || choiceGenre > 7 || choiceGenre < 0)
	{
		cin.clear();
		cin.ignore(10000, '\n');
		cout << "Please enter a choice between 0 and 7" << endl;
		cin >> choiceGenre;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x629e(%rip), %r14      # 0x9fe0
pushq $0xa
popq %r15
movq 0x6283(%rip), %r12      # 0x9fd0
leaq 0x27ec(%rip), %r13      # 0x6540
movq (%r14), %rax
movq -0x18(%rax), %rdi
testb $0x5, 0x20(%r14,%rdi)
jne 0x3d68
cmpl $0x8, (%rbx)
jb 0x3da2
addq %r14, %rdi
xorl %esi, %esi
callq 0x2230
movl $0x2710, %esi           # imm = 0x2710
movq %r14, %rdi
movl %r15d, %edx
callq 0x2110
movq %r12, %rdi
movq %r13, %rsi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2100
jmp 0x3d54
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: genreSearchVector(std::vector<Video, std::allocator<Video>> const&, std::vector<Video, std::allocator<Video>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void genreSearchVector(const vector<Video>& videos, vector<Video>& results, string genreIn)  
//takes a const vector of movies to search, a vector of videos to add results to, and a search term.
{
    Video temp;  //creates a temporary video to hold values as we process vector
    int index = 0;
    int size = videos.size();
    while(index < size)
    {
       	temp = videos[index];  //set temp equal to the video at [index]
       	if(temp.getGenre() == genreIn)
    		results.push_back(videos[index]);  //if video is found, add it to results
       	index++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdx, -0x38(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdi, %r15
leaq -0xf8(%rbp), %r12
movq %r12, %rdi
callq 0x4c88
movq 0x8(%r15), %rax
subq (%r15), %rax
movl $0x98, %ecx
cqto
idivq %rcx
xorl %ebx, %ebx
testl %eax, %eax
cmovlel %ebx, %eax
imulq $0x98, %rax, %rax
movq %rax, -0x40(%rbp)
leaq -0x60(%rbp), %r13
cmpq %rbx, -0x40(%rbp)
je 0x3e5f
movq (%r15), %rsi
addq %rbx, %rsi
movq %r12, %rdi
callq 0x437e
movq %r13, %rdi
movq %r12, %r14
movq %r12, %rsi
callq 0x4e8c
movq %r13, %rdi
movq -0x38(%rbp), %rsi
callq 0x43d0
movl %eax, %r12d
movq %r13, %rdi
callq 0x20c0
testb %r12b, %r12b
movq %r14, %r12
je 0x3e56
movq (%r15), %rsi
addq %rbx, %rsi
movq -0x30(%rbp), %rdi
callq 0x43fc
addq $0x98, %rbx
jmp 0x3e06
leaq -0xf8(%rbp), %rdi
callq 0x258e
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3e7f
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
callq 0x258e
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: displayDirectorSearchMenu()
void displayDirectorSearchMenu()
{
	clearScreen();	//Clear screen before displaying menu
	cout << "Search movies by: Director\n" << endl;
	cout << "Enter the full name of a director,\n"
		<< "or type '0' to return to the main menu." << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x28a1
movq 0x6128(%rip), %rbx      # 0x9fd0
leaq 0x26f6(%rip), %rsi      # 0x65a5
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x26fb(%rip), %rsi      # 0x65c1
movq %rbx, %rdi
callq 0x2180
leaq 0x2710(%rip), %rsi      # 0x65e5
movq %rax, %rdi
callq 0x2180
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x20d0
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: directorSearchVector(std::vector<Video, std::allocator<Video>> const&, std::vector<Video, std::allocator<Video>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void directorSearchVector(const vector<Video>& videos, vector<Video>& results, string directorIn)  
//takes a const vector of movies to search, a vector of videos to add results to, and a search term.
{
    Video temp;  //creates a temporary video to hold values as we process vector
    int index = 0;
    int size = videos.size();
    while(index < size)
    {
       	temp = videos[index];  //set temp equal to the video at [index]
       	if(temp.getDirector() == directorIn)
    		results.push_back(videos[index]);  //if video is found, add it to results
       	index++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdx, -0x38(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdi, %r15
leaq -0xf8(%rbp), %r12
movq %r12, %rdi
callq 0x4c88
movq 0x8(%r15), %rax
subq (%r15), %rax
movl $0x98, %ecx
cqto
idivq %rcx
xorl %ebx, %ebx
testl %eax, %eax
cmovlel %ebx, %eax
imulq $0x98, %rax, %rax
movq %rax, -0x40(%rbp)
leaq -0x60(%rbp), %r13
cmpq %rbx, -0x40(%rbp)
je 0x3f99
movq (%r15), %rsi
addq %rbx, %rsi
movq %r12, %rdi
callq 0x437e
movq %r13, %rdi
movq %r12, %r14
movq %r12, %rsi
callq 0x4ea8
movq %r13, %rdi
movq -0x38(%rbp), %rsi
callq 0x43d0
movl %eax, %r12d
movq %r13, %rdi
callq 0x20c0
testb %r12b, %r12b
movq %r14, %r12
je 0x3f90
movq (%r15), %rsi
addq %rbx, %rsi
movq -0x30(%rbp), %rdi
callq 0x43fc
addq $0x98, %rbx
jmp 0x3f40
leaq -0xf8(%rbp), %rdi
callq 0x258e
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3fb9
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
callq 0x258e
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: displayMoviesInCart(Cart&)
void displayMoviesInCart(Cart& current)
{
	vector<Video> temp = current.getVideos();  //creates a temporary vector and sets it equal to the cart
	clearScreen();	//Clear screen before displaying menu
	if(temp.empty())
		cout << "Your cart is empty!" << endl;
	else
	{
		cout << "Here's what's in your cart:" << endl;
		for (int i = 0; i < current.getNumCart(); i++)  //iterates through cart, displaying the title of each movie
		{
			cout << i+1 << ". " << temp[i].getTitle() << endl;
		}
	}
	//TODO: Show what's in the user's cart
	systemPause();	//Wait for user input
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
callq 0x51ae
callq 0x28a1
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x408f
movq 0x5fc6(%rip), %rdi      # 0x9fd0
leaq 0x26f0(%rip), %rsi      # 0x6701
callq 0x2180
movq %rax, %rdi
callq 0x20d0
xorl %r14d, %r14d
leaq -0x60(%rbp), %r12
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x5154
cltq
cmpq %rax, %r15
jge 0x40aa
leal 0x1(%r15), %esi
movq 0x5f8e(%rip), %rdi      # 0x9fd0
callq 0x2240
movq %rax, %rdi
leaq 0x243a(%rip), %rsi      # 0x648b
callq 0x2180
movq %rax, %r13
movq -0x40(%rbp), %rsi
addq %r14, %rsi
movq %r12, %rdi
callq 0x4e74
movq %r13, %rdi
movq %r12, %rsi
callq 0x2170
movq %rax, %rdi
callq 0x20d0
movq %r12, %rdi
callq 0x20c0
addq $0x98, %r14
incq %r15
jmp 0x4028
movq 0x5f3a(%rip), %rdi      # 0x9fd0
leaq 0x2650(%rip), %rsi      # 0x66ed
callq 0x2180
movq %rax, %rdi
callq 0x20d0
callq 0x28b9
leaq -0x40(%rbp), %rdi
callq 0x2502
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x40d9
jmp 0x40d9
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x20c0
jmp 0x40dc
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x2502
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: validateCartChoice(int)
void validateCartChoice(int choice)
{
	while (!cin || choice > 4 || choice < 1)
	{
		cin.clear(); //clear bad input flag
		cin.ignore(10000, '\n'); //Discard input
		cout << "Please enter a number between 1 and 5" << endl;
		cin >> choice;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq -0x2c(%rbp), %rbx
movl %edi, (%rbx)
movq 0x5ed8(%rip), %r14      # 0x9fe0
pushq $0xa
popq %r15
movq 0x5ebd(%rip), %r12      # 0x9fd0
leaq 0x2603(%rip), %r13      # 0x671d
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r14,%rax)
jne 0x4131
addl $-0x5, %edi
cmpl $-0x5, %edi
ja 0x4171
addq %r14, %rax
movq %rax, %rdi
xorl %esi, %esi
callq 0x2230
movl $0x2710, %esi           # imm = 0x2710
movq %r14, %rdi
movl %r15d, %edx
callq 0x2110
movq %r12, %rdi
movq %r13, %rsi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2100
movl -0x2c(%rbp), %edi
jmp 0x411a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/BawkBusterFunctions.cpp
// Function: displayCheckOut(Cart)
void displayCheckOut(Cart newCart)
{
	cout << "\nThank you for choosing BawkBuster!\n" << endl;
	cout << "Your total price is: $" << std::fixed << std::setprecision(2) 
	<< newCart.getTPrice() << endl;
	cout << "\nAs a Thank You, the Charge Will Be Removed So Your Movies Are Free!" << endl;
	cout << "\nEnjoy Your Movies!" << endl;
	cout << "And Remember!" << endl;
	cout << "Be Kind, Rewind" << endl;
	systemPause();	//Waits for user input
			//before exiting program.
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x5e3c(%rip), %rbx      # 0x9fd0
leaq 0x265d(%rip), %rsi      # 0x67f8
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x266b(%rip), %rsi      # 0x681d
movq %rbx, %rdi
callq 0x2180
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x18(%r15,%rcx), %edx
orl $0x4, %edx
movl %edx, 0x18(%r15,%rcx)
movq -0x18(%rax), %rax
movq $0x2, 0x8(%r15,%rax)
movq %r14, %rdi
callq 0x5174
movq %r15, %rdi
callq 0x2210
movq %rax, %rdi
callq 0x20d0
leaq 0x2632(%rip), %rsi      # 0x6834
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x2660(%rip), %rsi      # 0x6879
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x265d(%rip), %rsi      # 0x688d
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x2654(%rip), %rsi      # 0x689b
movq %rbx, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x28b9
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/Video.cpp
// Function: Video::Video()
Video::Video()  //default constructor with junk values
{
    title = "AAA";
    genre = "OTHER";
    director = "AAA";
    actor = "AAA";
    //price = -100;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
xorl %eax, %eax
movb %al, 0x10(%rdi)
leaq 0x30(%rdi), %rcx
movq %rcx, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
movb %al, 0x30(%rdi)
leaq 0x50(%rdi), %rcx
movq %rcx, 0x40(%rdi)
andq $0x0, 0x48(%rdi)
leaq 0x20(%rdi), %r14
leaq 0x40(%rdi), %r15
movb %al, 0x50(%rdi)
leaq 0x70(%rdi), %rcx
movq %rcx, 0x60(%rdi)
andq $0x0, 0x68(%rdi)
leaq 0x60(%rdi), %r12
movb %al, 0x70(%rdi)
leaq 0x80(%rdi), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x80(%rdi)
andq $0x0, 0x90(%rdi)
leaq 0x1be9(%rip), %rsi      # 0x68ef
callq 0x22a0
leaq 0x1be1(%rip), %rsi      # 0x68f3
movq %r14, %rdi
callq 0x22a0
leaq 0x1bce(%rip), %rsi      # 0x68ef
movq %r15, %rdi
callq 0x22a0
leaq 0x1bbf(%rip), %rsi      # 0x68ef
movq %r12, %rdi
callq 0x22a0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, -0x30(%rbp)
movq %r13, %rdi
callq 0x2502
movq %r12, %rdi
callq 0x20c0
movq %r15, %rdi
callq 0x20c0
movq %r14, %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x20c0
movq -0x30(%rbp), %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/Video.cpp
// Function: Video::Video(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Video::Video(std::string titleIn, std::string genreIn, std::string directorIn, std::string actorIn)
{
    title = titleIn;
    genre = genreIn;
    director = directorIn;
    actor = actorIn;
    //price = PRICE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, -0x40(%rbp)
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rcx, %r14
xorl %eax, %eax
movb %al, 0x10(%rdi)
leaq 0x30(%rdi), %rcx
movq %rcx, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
movq %rdx, %r15
movb %al, 0x30(%rdi)
leaq 0x50(%rdi), %rcx
movq %rcx, 0x40(%rdi)
andq $0x0, 0x48(%rdi)
leaq 0x20(%rdi), %rcx
movq %rcx, -0x30(%rbp)
leaq 0x40(%rdi), %r12
movb %al, 0x50(%rdi)
leaq 0x70(%rdi), %rcx
movq %rcx, 0x60(%rdi)
andq $0x0, 0x68(%rdi)
leaq 0x60(%rdi), %r13
movb %al, 0x70(%rdi)
leaq 0x80(%rdi), %rax
movq %rax, -0x38(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x80(%rdi)
andq $0x0, 0x90(%rdi)
callq 0x20f0
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x20f0
movq %r12, %rdi
movq %r14, %rsi
callq 0x20f0
movq %r13, %rdi
movq -0x40(%rbp), %rsi
callq 0x20f0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x38(%rbp), %rdi
callq 0x2502
movq %r13, %rdi
callq 0x20c0
movq %r12, %rdi
callq 0x20c0
movq -0x30(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x20c0
movq %r14, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/Video.cpp
// Function: Video::printInfo(Video)
void Video::printInfo(Video videoIn)
{
    std::cout << "Title: " << videoIn.getTitle() << std::endl;
    std::cout << "Genre: " << videoIn.getGenre() << std::endl;
    std::cout << "Director: " << videoIn.getDirector() << std::endl;
    std::cout << "Actor: " << videoIn.getActor() << std::endl;
    //std::cout << "Price: " << videoIn.getPrice() << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq 0x50d9(%rip), %rdi      # 0x9fd0
leaq 0x19fb(%rip), %rsi      # 0x68f9
callq 0x2180
movq %rax, %r14
leaq -0x38(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x21e0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2170
movq %rax, %rdi
callq 0x20d0
leaq -0x38(%rbp), %rdi
callq 0x20c0
movq 0x5098(%rip), %rdi      # 0x9fd0
leaq 0x19c2(%rip), %rsi      # 0x6901
callq 0x2180
movq %rax, %r14
leaq 0x20(%rbx), %rsi
movq %r15, %rdi
callq 0x21e0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2170
movq %rax, %rdi
callq 0x20d0
leaq -0x38(%rbp), %rdi
callq 0x20c0
movq 0x505a(%rip), %rdi      # 0x9fd0
leaq 0x198c(%rip), %rsi      # 0x6909
callq 0x2180
movq %rax, %r14
leaq 0x40(%rbx), %rsi
movq %r15, %rdi
callq 0x21e0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2170
movq %rax, %rdi
callq 0x20d0
leaq -0x38(%rbp), %rdi
callq 0x20c0
movq 0x501c(%rip), %rdi      # 0x9fd0
leaq 0x1959(%rip), %rsi      # 0x6914
callq 0x2180
movq %rax, %r14
addq $0x60, %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x21e0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2170
movq %rax, %rdi
callq 0x20d0
leaq -0x38(%rbp), %rdi
callq 0x20c0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4fff
jmp 0x4fff
jmp 0x4fff
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/Video.cpp
// Function: Video::searchTitle(std::vector<Video, std::allocator<Video>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Video::searchTitle(const std::vector<Video>& videos, std::string titleIn)
{
    Video result, temp;
    int index = 0;
    int size = videos.size();
    bool found = false;
    while(index < size && !found)
    {
       temp = videos[index];
       if(temp.getTitle() == titleIn)
       {
          found = true;
          result = videos[index]; 
       }
       index++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rdx, -0x30(%rbp)
movq %rsi, %r14
leaq -0x188(%rbp), %rdi
callq 0x4c88
leaq -0xd0(%rbp), %rdi
callq 0x4c88
movq 0x8(%r14), %rax
subq (%r14), %rax
movl $0x98, %ecx
cqto
idivq %rcx
cltq
movq %rax, -0x38(%rbp)
xorl %ebx, %ebx
leaq -0xf0(%rbp), %r12
xorl %r15d, %r15d
xorl %r13d, %r13d
cmpq -0x38(%rbp), %r15
jge 0x50e2
testb $0x1, %r13b
jne 0x50e2
movq (%r14), %rsi
addq %rbx, %rsi
leaq -0xd0(%rbp), %rdi
callq 0x437e
movq %r12, %rdi
leaq -0xd0(%rbp), %rsi
callq 0x21e0
movq %r12, %rdi
movq -0x30(%rbp), %rsi
callq 0x43d0
movl %eax, %r13d
movq %r12, %rdi
callq 0x20c0
testb %r13b, %r13b
je 0x50d6
movq (%r14), %rsi
addq %rbx, %rsi
leaq -0x188(%rbp), %rdi
callq 0x437e
incq %r15
addq $0x98, %rbx
jmp 0x507b
leaq -0xd0(%rbp), %rdi
callq 0x258e
leaq -0x188(%rbp), %rdi
callq 0x258e
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x5122
jmp 0x5113
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
callq 0x258e
leaq -0x188(%rbp), %rdi
callq 0x258e
movq %rbx, %rdi
callq 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O2/KitchMKelly[P]Team-9-OSU-Hackathon-Winter-2018/Cart.cpp
// Function: Cart::unAddToCart()
void Cart::unAddToCart()
{
	if(numCart == 0)
	{
		std::cout << std::endl <<"Your cart is already empty!" << std::endl;
		std::cin.clear();
		std::cin.ignore(1024, '\n');	// Discart old input
		std::cout << "Press enter to continue...";
		std::cin.get();			// Proceed after new input from user
	}
	else
	{
		std::cout << vidVector[vidVector.size() - 1].getTitle() << " has been removed from your cart." << std::endl;
		vidVector.pop_back();
		numCart--;
		totalPrice -= PRICE;
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
cmpl $0x0, (%rdi)
je 0x526e
movq %rdi, %rbx
movq $-0x98, %rsi
addq 0x18(%rdi), %rsi
leaq -0x30(%rbp), %r14
movq %r14, %rdi
callq 0x4e74
movq 0x4db3(%rip), %rdi      # 0x9fd0
movq %r14, %rsi
callq 0x2170
leaq 0x1720(%rip), %rsi      # 0x694c
movq %rax, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
leaq 0x10(%rbx), %r14
leaq -0x30(%rbp), %rdi
callq 0x20c0
movq %r14, %rdi
callq 0x52f0
decl (%rbx)
movsd 0x8(%rbx), %xmm0
addsd 0x16c8(%rip), %xmm0     # 0x6928
movsd %xmm0, 0x8(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x4d5b(%rip), %rbx      # 0x9fd0
movq %rbx, %rdi
callq 0x20d0
leaq 0x16ac(%rip), %rsi      # 0x6930
movq %rax, %rdi
callq 0x2180
movq %rax, %rdi
callq 0x20d0
movq 0x4d45(%rip), %r14      # 0x9fe0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
xorl %esi, %esi
callq 0x2230
pushq $0xa
popq %rdx
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdi
callq 0x2110
leaq 0xdac(%rip), %rsi       # 0x606f
movq %rbx, %rdi
callq 0x2180
movq %r14, %rdi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x21b0
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2250
nop