// File: /workspace/github_cpp_makefile_star2_O2/parth-shel[P]xpac/client.cpp
// Function: calculate_differences()
void calculate_differences() {
	std::string to_update_string;
	std::vector<std::string> updates;
	for(auto key_itr = user_installed_list.begin(); key_itr!=user_installed_list.end(); key_itr++) {
		if(key_itr->second.compare(universe_list.find(key_itr->first)->second) != 0) {
			to_update_string += key_itr->first + " " + key_itr->second + " -> " + universe_list.find(key_itr->first)->second + "\n";
			updates.push_back(key_itr->first);
		}
	}
	std::cout<<"Updates available: "<<std::endl;
	if(to_update_string.compare("") == 0) {
		std::cout<<"None!"<<std::endl;
	}
	else {
		std::cout<<to_update_string;
	}
	
	//Writing all the updates to the file
	std::fstream file;
	file.open(update_file, std::ios::out | std::ios::trunc);

	// Simply appending to file
	for(auto itr = updates.begin(); itr!=updates.end(); itr++)
		file << *itr <<"\n";
	file.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
leaq 0xb9aa(%rip), %rax      # 0xf5d0
movq 0x18(%rax), %r14
addq $0x8, %rax
movq %rax, -0x48(%rbp)
leaq -0xf0(%rbp), %r15
cmpq -0x48(%rbp), %r14
je 0x3d57
leaq 0x20(%r14), %r12
leaq 0xb932(%rip), %rdi      # 0xf580
movq %r12, %rsi
callq 0x6d4a
leaq 0x40(%r14), %rbx
addq $0x40, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3030
movq %r14, -0x50(%rbp)
testl %eax, %eax
je 0x3d46
movq %r15, %r13
movq %r15, %rdi
movq %r12, %rsi
leaq 0x6870(%rip), %rdx      # 0xa4f5
callq 0x5e5c
leaq -0xb0(%rbp), %r14
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x5f53
leaq -0x90(%rbp), %rdi
movq %r14, %rsi
leaq 0x637e(%rip), %rdx      # 0xa02e
callq 0x5f2a
leaq 0xb8c4(%rip), %rdi      # 0xf580
movq %r12, %rsi
callq 0x6d4a
leaq -0xd0(%rbp), %rbx
addq $0x40, %rax
movq %rbx, %rdi
leaq -0x90(%rbp), %rsi
movq %rax, %rdx
callq 0x5f53
leaq -0x300(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
leaq 0x6ad5(%rip), %rdx      # 0xa7ca
callq 0x5f2a
leaq -0x70(%rbp), %rdi
movq %r14, %rsi
callq 0x3670
movq %r14, %rdi
callq 0x36a8
leaq -0xd0(%rbp), %rdi
callq 0x36a8
leaq -0x90(%rbp), %rdi
callq 0x36a8
leaq -0xb0(%rbp), %rdi
callq 0x36a8
movq %r15, %rdi
callq 0x36a8
leaq -0x40(%rbp), %rdi
movq %r12, %rsi
callq 0x5f7c
movq -0x50(%rbp), %rdi
callq 0x32a0
movq %rax, %r14
jmp 0x3c39
movq 0xb272(%rip), %rdi      # 0xefd0
leaq 0x62ce(%rip), %rsi      # 0xa033
callq 0x3370
movq %rax, %rdi
callq 0x31f0
leaq 0x6a52(%rip), %rsi      # 0xa7cb
leaq -0x70(%rbp), %rdi
callq 0x3140
testl %eax, %eax
je 0x3d98
movq 0xb243(%rip), %rdi      # 0xefd0
leaq -0x70(%rbp), %rsi
callq 0x3340
jmp 0x3db3
movq 0xb231(%rip), %rdi      # 0xefd0
leaq 0x62a1(%rip), %rsi      # 0xa047
callq 0x3370
movq %rax, %rdi
callq 0x31f0
leaq -0x300(%rbp), %rdi
callq 0x3400
leaq 0xb62a(%rip), %rsi      # 0xf3f0
leaq -0x300(%rbp), %rdi
pushq $0x30
popq %rdx
callq 0x3490
movq -0x40(%rbp), %rbx
leaq -0x2f0(%rbp), %r14
leaq 0x69e3(%rip), %r15      # 0xa7ca
cmpq -0x38(%rbp), %rbx
je 0x3e09
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3340
movq %rax, %rdi
movq %r15, %rsi
callq 0x3370
addq $0x20, %rbx
jmp 0x3de7
leaq -0x300(%rbp), %rdi
callq 0x3070
leaq -0x300(%rbp), %rdi
callq 0x30d0
leaq -0x40(%rbp), %rdi
callq 0x5fb8
leaq -0x70(%rbp), %rdi
callq 0x36a8
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3eb5
jmp 0x3ea4
jmp 0x3eb5
jmp 0x3eb5
jmp 0x3eb5
movq %rax, %rbx
jmp 0x3e96
movq %rax, %rbx
jmp 0x3e6d
movq %rax, %rbx
jmp 0x3e8a
movq %rax, %rbx
leaq -0x300(%rbp), %rdi
callq 0x36a8
leaq -0xd0(%rbp), %rdi
callq 0x36a8
jmp 0x3e7e
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x36a8
leaq -0xb0(%rbp), %rdi
callq 0x36a8
leaq -0xf0(%rbp), %rdi
callq 0x36a8
jmp 0x3eb8
movq %rax, %rbx
leaq -0x300(%rbp), %rdi
callq 0x30d0
jmp 0x3eb8
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x5fb8
leaq -0x70(%rbp), %rdi
callq 0x36a8
movq %rbx, %rdi
callq 0x35c0