// File: /workspace/github_cpp_makefile_star2_O2/parth-shel[P]xpac/client.cpp
// Function: install_package(char const*)
static bool install_package(const char * pkg_name){
	//Getting the package from the server itself:
	get_from_server("GPKG-",pkg_name);

	//Working on the dependencies:
	metadata * package = metadata::get_package(metadata_path.c_str());

	//Pushing the install path onto the stack:
	dep_list.push(install_path);

	//Initializing the bfs queue:
	marked.insert(std::string(pkg_name));
	bfs_queue.push(std::string(pkg_name));
	
	while(!bfs_queue.empty()){

		std::string next = bfs_queue.front();
		bfs_queue.pop();


		if(next.compare(std::string(pkg_name)) != 0){
			get_from_server("GPKG-",next.c_str());
			package = metadata::get_package(metadata_path.c_str());
			dep_list.push(install_path);
		}

		std::vector<std::string> * curr_dep_list = package->get_dep_list();

		for(auto itr = curr_dep_list->begin(); itr!=curr_dep_list->end(); itr++){
			auto found = marked.find(*itr);
			if(found == marked.end()){	//Not found
				marked.insert(*itr);
				bfs_queue.push(*itr);
			}
		}

	}

	//Finally installing everything in the stack:
	return install_all_packages();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, -0x40(%rbp)
callq 0x590d
movq 0xb201(%rip), %rsi      # 0xf428
leaq -0xf0(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
callq 0x3180
leaq -0xf0(%rbp), %rdi
callq 0x8728
movq %rax, -0x38(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x36a8
leaq 0xb20b(%rip), %rdi      # 0xf468
leaq 0xb1e4(%rip), %rsi      # 0xf448
callq 0x640e
leaq -0xb0(%rbp), %rdi
leaq -0x60(%rbp), %rdx
movq -0x40(%rbp), %rsi
callq 0x3180
leaq 0xb284(%rip), %rdi      # 0xf508
leaq -0xb0(%rbp), %rsi
callq 0x6dfe
leaq -0xb0(%rbp), %rdi
callq 0x36a8
leaq -0xb0(%rbp), %rdi
leaq -0x60(%rbp), %rdx
movq -0x40(%rbp), %rsi
callq 0x3180
leaq 0xb201(%rip), %rdi      # 0xf4b8
leaq -0xb0(%rbp), %rsi
callq 0x7262
leaq -0xb0(%rbp), %rdi
callq 0x36a8
leaq 0xb1e2(%rip), %r12      # 0xf4b8
leaq -0x60(%rbp), %r13
leaq 0xb227(%rip), %rbx      # 0xf508
movq 0xb1e0(%rip), %rsi      # 0xf4c8
cmpq %rsi, 0xb1f9(%rip)      # 0xf4e8
je 0x43de
leaq -0xb0(%rbp), %r15
movq %r15, %rdi
callq 0x34a0
movq %r12, %rdi
callq 0x7318
movq %r13, %rdi
movq -0x40(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0x3180
movq %r15, %rdi
movq %r13, %rsi
callq 0x3030
movl %eax, %r15d
movq %r13, %r14
movq %r13, %rdi
callq 0x36a8
testl %r15d, %r15d
leaq -0x1b0(%rbp), %r15
je 0x4389
movq -0xb0(%rbp), %rdi
callq 0x590d
movq 0xb0d1(%rip), %rsi      # 0xf428
movq %r15, %rdi
movq %r14, %rdx
callq 0x3180
movq %r15, %rdi
callq 0x8728
movq %rax, -0x38(%rbp)
movq %r15, %rdi
callq 0x36a8
leaq 0xb0eb(%rip), %rdi      # 0xf468
leaq 0xb0c4(%rip), %rsi      # 0xf448
callq 0x640e
movq -0x38(%rbp), %rdi
callq 0x856c
movq %rax, %r15
movq (%rax), %r13
cmpq 0x8(%r15), %r13
je 0x43ca
movq %rbx, %rdi
movq %r13, %rsi
callq 0x7398
testq %rax, %rax
jne 0x43c4
movq %rbx, %rdi
movq %r13, %rsi
callq 0x73c6
movq %r12, %rdi
movq %r13, %rsi
callq 0x640e
addq $0x20, %r13
jmp 0x4398
leaq -0xb0(%rbp), %rdi
callq 0x36a8
movq %r14, %r13
jmp 0x42e1
leaq 0xb083(%rip), %rsi      # 0xf468
leaq -0xb0(%rbp), %rdi
callq 0x673a
movq 0xabd8(%rip), %rdi      # 0xefd0
leaq 0x60cd(%rip), %rsi      # 0xa4cc
callq 0x3370
movq %rax, %rdi
callq 0x31f0
leaq -0x60(%rbp), %rbx
leaq 0x5bf3(%rip), %r14      # 0xa00a
leaq -0xd0(%rbp), %r15
movq 0xabab(%rip), %r12      # 0xefd0
leaq -0xb0(%rbp), %r13
movq -0x80(%rbp), %rsi
cmpq -0xa0(%rbp), %rsi
je 0x44a5
cmpq -0x78(%rbp), %rsi
jne 0x444f
movq -0x68(%rbp), %rax
movq -0x8(%rax), %rsi
movl $0x200, %eax            # imm = 0x200
addq %rax, %rsi
addq $-0x20, %rsi
movq %rbx, %rdi
callq 0x34a0
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3690
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x33a0
movq %r12, %rdi
movq %r15, %rsi
callq 0x3340
movq %rax, %rdi
callq 0x31f0
movq %r15, %rdi
callq 0x36a8
movq %r13, %rdi
callq 0x6c48
movq %rbx, %rdi
callq 0x36a8
jmp 0x442c
movq 0xab24(%rip), %rbx      # 0xefd0
leaq 0x5bd9(%rip), %r14      # 0xa08c
movq 0xab26(%rip), %r15      # 0xefe0
leaq -0x29(%rbp), %r12
movabsq $0x80100000801, %r13    # imm = 0x80100000801
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3370
movq %rax, %rdi
callq 0x31f0
movq %r15, %rdi
movq %r12, %rsi
callq 0x3460
movzbl -0x29(%rbp), %eax
leal -0x4e(%rax), %ecx
cmpl $0x2b, %ecx
ja 0x44c8
btq %rcx, %r13
jae 0x44c8
andb $0x5f, %al
cmpb $0x4e, %al
je 0x4851
leaq -0xd0(%rbp), %r15
leaq 0xb0c0(%rip), %rax      # 0xf5d0
addq $0x8, %rax
movq %rax, -0x38(%rbp)
leaq -0x1f0(%rbp), %r12
leaq -0x1d0(%rbp), %rbx
movq 0xaf6b(%rip), %rsi      # 0xf498
cmpq 0xaf44(%rip), %rsi      # 0xf478
je 0x4755
cmpq 0xaf5f(%rip), %rsi      # 0xf4a0
jne 0x4556
movq 0xaf66(%rip), %rax      # 0xf4b0
movq -0x8(%rax), %rsi
movl $0x200, %eax            # imm = 0x200
addq %rax, %rsi
addq $-0x20, %rsi
leaq -0x60(%rbp), %r14
movq %r14, %rdi
callq 0x34a0
movq %r14, %rdi
leaq 0x5a9a(%rip), %rsi      # 0xa00a
xorl %edx, %edx
callq 0x3690
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x33a0
leaq -0x230(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
leaq 0x5edb(%rip), %rdx      # 0xa476
callq 0x5e5c
movq %r14, %rdi
callq 0x8728
movq %rax, 0xae71(%rip)      # 0xf420
movq %r14, %rdi
callq 0x36a8
movq 0xae62(%rip), %rsi      # 0xf420
addq $0x40, %rsi
leaq -0x110(%rbp), %rdi
callq 0x34a0
leaq 0xae93(%rip), %rdi      # 0xf468
callq 0x6c48
movq 0xa9ef(%rip), %rdi      # 0xefd0
leaq 0x5f0f(%rip), %rsi      # 0xa4f7
callq 0x3370
movq %rax, %rdi
movq %r15, %rsi
callq 0x3340
movq %rax, %rdi
callq 0x31f0
leaq 0xafc9(%rip), %rdi      # 0xf5d0
movq %r15, %rsi
callq 0x6d4a
cmpq -0x38(%rbp), %rax
je 0x4689
movq 0xa9b4(%rip), %rdi      # 0xefd0
leaq 0x5b77(%rip), %rsi      # 0xa19a
callq 0x3370
movq %rax, %rdi
movq %r15, %rsi
callq 0x3340
movq %rax, %rdi
leaq 0x5e1e(%rip), %rsi      # 0xa45b
callq 0x3370
movq %rax, %rdi
callq 0x31f0
leaq -0x190(%rbp), %rdi
movq %r15, %rsi
callq 0x34a0
leaq -0x190(%rbp), %r14
movq %r14, %rdi
callq 0x9038
movq %r14, %rdi
callq 0x36a8
movq 0xae21(%rip), %rax      # 0xf498
cmpq 0xadfa(%rip), %rax      # 0xf478
jne 0x4733
jmp 0x4849
movq -0x60(%rbp), %rdi
callq 0x3310
testl %eax, %eax
jne 0x4773
movq 0xad7f(%rip), %r14      # 0xf420
movq 0xad08(%rip), %rsi      # 0xf3b0
movq %r12, %rdi
leaq -0x170(%rbp), %rdx
callq 0x3180
movq %r14, %rdi
movq %r12, %rsi
callq 0x8576
movq %r12, %rdi
callq 0x36a8
leaq -0x150(%rbp), %rdi
movq %r15, %rsi
callq 0x34a0
movq %rbx, %r13
movq %rbx, %rdi
leaq -0x110(%rbp), %rsi
callq 0x34a0
leaq -0x150(%rbp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x8eb0
movq %r13, %rdi
callq 0x36a8
movq %r14, %rdi
callq 0x36a8
leaq -0x130(%rbp), %rdi
movq %r15, %rsi
callq 0x34a0
leaq -0x130(%rbp), %r14
movq %r14, %rdi
callq 0x9038
movq %r14, %rdi
callq 0x36a8
leaq -0x110(%rbp), %rdi
callq 0x36a8
movq %r15, %rdi
callq 0x36a8
leaq -0x60(%rbp), %rdi
callq 0x36a8
jmp 0x4526
leaq -0xb0(%rbp), %rdi
callq 0x600e
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xa856(%rip), %rdi      # 0xefd0
leaq 0x5d8b(%rip), %rsi      # 0xa50c
callq 0x3370
leaq -0xd0(%rbp), %rsi
movq %rax, %rdi
callq 0x3340
leaq 0x5cbe(%rip), %rsi      # 0xa45a
movq %rax, %rdi
callq 0x3370
movq %rax, %rdi
callq 0x31f0
movq 0xa81d(%rip), %rdi      # 0xefd0
leaq 0x5d65(%rip), %rsi      # 0xa51f
callq 0x3370
movq %rax, %rdi
callq 0x31f0
movl $0x200, %r13d           # imm = 0x200
leaq -0x170(%rbp), %rbx
leaq -0x210(%rbp), %r14
leaq -0xd0(%rbp), %r15
leaq 0xac7f(%rip), %r12      # 0xf468
movq 0xaca8(%rip), %rsi      # 0xf498
cmpq 0xac81(%rip), %rsi      # 0xf478
je 0x4849
cmpq 0xaca0(%rip), %rsi      # 0xf4a0
jne 0x4810
movq 0xaca7(%rip), %rax      # 0xf4b0
movq -0x8(%rax), %rsi
addq %r13, %rsi
addq $-0x20, %rsi
movq %rbx, %rdi
callq 0x34a0
movq %r14, %rdi
movq %r15, %rsi
callq 0x34a0
movq %r14, %rdi
callq 0x9038
movq %r14, %rdi
callq 0x36a8
movq %r12, %rdi
callq 0x6c48
movq %rbx, %rdi
callq 0x36a8
jmp 0x47e9
pushq $0x1
popq %rdi
callq 0x3410
xorl %edi, %edi
callq 0x3410
movq %rax, %rbx
leaq -0x210(%rbp), %rdi
callq 0x36a8
jmp 0x486c
movq %rax, %rbx
leaq -0x170(%rbp), %rdi
jmp 0x48ea
jmp 0x493c
jmp 0x496e
jmp 0x4897
jmp 0x496e
jmp 0x4897
movq %rax, %rbx
leaq -0xf0(%rbp), %rdi
jmp 0x4978
movq %rax, %rbx
jmp 0x497d
jmp 0x4917
jmp 0x493c
movq %rax, %rbx
jmp 0x48d7
movq %rax, %rbx
leaq -0x1f0(%rbp), %rdi
jmp 0x48ea
jmp 0x493c
movq %rax, %rbx
leaq -0x130(%rbp), %rdi
jmp 0x48ea
movq %rax, %rbx
leaq -0x1d0(%rbp), %rdi
callq 0x36a8
leaq -0x150(%rbp), %rdi
jmp 0x48ea
movq %rax, %rbx
leaq -0x190(%rbp), %rdi
callq 0x36a8
jmp 0x493f
jmp 0x496e
movq %rax, %rbx
leaq -0x1b0(%rbp), %rdi
jmp 0x492c
jmp 0x4917
jmp 0x491c
jmp 0x4937
movq %rax, %rbx
leaq -0x230(%rbp), %rdi
jmp 0x4946
jmp 0x4937
jmp 0x493c
jmp 0x4917
movq %rax, %rbx
jmp 0x4960
movq %rax, %rbx
jmp 0x4957
jmp 0x496e
jmp 0x496e
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x36a8
jmp 0x4971
jmp 0x493c
jmp 0x496e
movq %rax, %rbx
jmp 0x494b
movq %rax, %rbx
leaq -0x110(%rbp), %rdi
callq 0x36a8
leaq -0xd0(%rbp), %rdi
callq 0x36a8
leaq -0x60(%rbp), %rdi
callq 0x36a8
leaq -0xb0(%rbp), %rdi
callq 0x600e
jmp 0x497d
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x36a8
movq %rbx, %rdi
callq 0x35c0