// File: /workspace/github_cpp_makefile_star2_O1/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, -0x80(%rbp)
callq 0x6b2f
movq 0xbade(%rip), %rsi      # 0x10418
leaq -0x230(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
callq 0x3190
leaq -0x230(%rbp), %rdi
callq 0xa12e
movq %rax, -0x78(%rbp)
leaq -0x220(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4972
callq 0x3360
leaq 0xbadf(%rip), %rdi      # 0x10458
leaq 0xbab8(%rip), %rsi      # 0x10438
callq 0x7838
leaq -0xd0(%rbp), %rdi
leaq -0x50(%rbp), %rdx
movq -0x80(%rbp), %rsi
callq 0x3190
leaq 0xbb58(%rip), %r15      # 0x104f8
leaq -0x70(%rbp), %rdx
movq %r15, (%rdx)
leaq -0xd0(%rbp), %rsi
movq %r15, %rdi
callq 0x81ca
leaq -0xc0(%rbp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x49cb
callq 0x3360
leaq -0xd0(%rbp), %rdi
leaq -0x70(%rbp), %rdx
movq -0x80(%rbp), %rsi
callq 0x3190
leaq 0xbac2(%rip), %rdi      # 0x104a8
leaq -0xd0(%rbp), %rsi
callq 0x85e8
movq -0xd0(%rbp), %rdi
cmpq %r13, %rdi
je 0x4a03
callq 0x3360
movq 0xbaae(%rip), %rax      # 0x104b8
cmpq %rax, 0xbac7(%rip)      # 0x104d8
je 0x4b7c
leaq -0x1d0(%rbp), %r12
movq %r13, -0xd0(%rbp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0xd0(%rbp), %rdi
callq 0x8092
leaq 0xba66(%rip), %rdi      # 0x104a8
callq 0x874a
leaq -0x70(%rbp), %rdi
movq -0x80(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x3190
movq -0xc8(%rbp), %rbx
movq -0x68(%rbp), %r14
cmpq %rbx, %r14
movq %rbx, %rdx
cmovbq %r14, %rdx
testq %rdx, %rdx
je 0x4a8a
movq -0x70(%rbp), %rsi
movq -0xd0(%rbp), %rdi
callq 0x33a0
testl %eax, %eax
sete %r13b
jmp 0x4a8d
movb $0x1, %r13b
cmpq %r14, %rbx
sete %bl
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x4aa5
callq 0x3360
andb %bl, %r13b
leaq -0xc0(%rbp), %r13
jne 0x4b0a
movq %r12, %rbx
movq -0xd0(%rbp), %rdi
callq 0x6b2f
movq 0xb951(%rip), %rsi      # 0x10418
movq %rbx, %rdi
leaq -0x70(%rbp), %rdx
callq 0x3190
movq %rbx, %rdi
callq 0xa12e
movq %rax, -0x78(%rbp)
movq -0x1d0(%rbp), %rdi
leaq -0x1c0(%rbp), %rax
cmpq %rax, %rdi
je 0x4af7
callq 0x3360
leaq 0xb95a(%rip), %rdi      # 0x10458
leaq 0xb933(%rip), %rsi      # 0x10438
callq 0x7838
movq -0x78(%rbp), %rdi
callq 0x9de8
movq %rax, %rbx
movq (%rax), %r14
cmpq 0x8(%rbx), %r14
je 0x4b57
movq %r15, %rdi
movq %r14, %rsi
callq 0x87e2
testq %rax, %rax
jne 0x4b51
movq %r15, -0x70(%rbp)
movq %r15, %rdi
movq %r14, %rsi
leaq -0x70(%rbp), %rdx
callq 0x8826
leaq 0xb95f(%rip), %rdi      # 0x104a8
movq %r14, %rsi
callq 0x7838
addq $0x20, %r14
jmp 0x4b19
movq -0xd0(%rbp), %rdi
cmpq %r13, %rdi
je 0x4b68
callq 0x3360
movq 0xb949(%rip), %rax      # 0x104b8
cmpq %rax, 0xb962(%rip)      # 0x104d8
jne 0x4a1e
leaq 0xb8d5(%rip), %rsi      # 0x10458
leaq -0xd0(%rbp), %rdi
callq 0x7b0e
movq 0xb43a(%rip), %rbx      # 0xffd0
leaq 0x792f(%rip), %rsi      # 0xc4cc
movl $0x2a, %edx
movq %rbx, %rdi
callq 0x3400
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3370
movsbl %al, %esi
movq 0xb408(%rip), %rbx      # 0xffd0
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3280
movq -0xa0(%rbp), %rax
cmpq -0xc0(%rbp), %rax
je 0x4ccf
leaq -0x60(%rbp), %r13
leaq -0x70(%rbp), %r14
leaq -0xd0(%rbp), %r15
cmpq -0x98(%rbp), %rax
jne 0x4c17
movq -0x88(%rbp), %rax
movq -0x8(%rax), %rax
movl $0x200, %ecx            # imm = 0x200
addq %rcx, %rax
movq %r13, -0x70(%rbp)
movq -0x20(%rax), %rsi
movq -0x18(%rax), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x8092
movl $0x1, %ecx
movq %r14, %rdi
leaq 0x73cd(%rip), %rsi      # 0xc00a
xorl %edx, %edx
callq 0x35b0
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x33b0
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0xb36c(%rip), %rdi      # 0xffd0
callq 0x3400
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3370
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3280
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x4ca5
callq 0x3360
movq %r15, %rdi
callq 0x7f9a
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x4cbb
callq 0x3360
movq -0xa0(%rbp), %rax
cmpq -0xc0(%rbp), %rax
jne 0x4bfb
leaq 0x73b6(%rip), %r14      # 0xc08c
movq 0xb303(%rip), %r15      # 0xffe0
leaq -0x29(%rbp), %r12
movabsq $0x80100000801, %r13    # imm = 0x80100000801
movl $0x14, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3400
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3370
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3280
movq %r15, %rdi
movq %r12, %rsi
callq 0x3470
movzbl -0x29(%rbp), %eax
leal -0x4e(%rax), %ecx
cmpl $0x2b, %ecx
ja 0x4ceb
btq %rcx, %r13
jae 0x4ceb
andb $0x5f, %al
cmpb $0x4e, %al
je 0x51c2
movq 0xb738(%rip), %rax      # 0x10488
cmpq 0xb711(%rip), %rax      # 0x10468
je 0x511b
leaq -0x70(%rbp), %rbx
leaq -0x110(%rbp), %r12
movq 0xb261(%rip), %r14      # 0xffd0
leaq 0xb84a(%rip), %rcx      # 0x105c0
addq $0x8, %rcx
movq %rcx, -0x78(%rbp)
cmpq 0xb70b(%rip), %rax      # 0x10490
jne 0x4d9a
movq 0xb712(%rip), %rax      # 0x104a0
movq -0x8(%rax), %rax
movl $0x200, %ecx            # imm = 0x200
addq %rcx, %rax
leaq -0x60(%rbp), %rcx
movq %rcx, -0x70(%rbp)
movq -0x20(%rax), %rsi
movq -0x18(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x8092
movl $0x1, %ecx
movq %rbx, %rdi
leaq 0x7246(%rip), %rsi      # 0xc00a
xorl %edx, %edx
callq 0x35b0
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x33b0
leaq -0x100(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x8092
movq %r12, %rdi
leaq 0x766f(%rip), %rsi      # 0xc476
callq 0x3650
movq %r12, %rdi
callq 0xa12e
movq %rax, 0xb5f5(%rip)      # 0x10410
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x4e33
callq 0x3360
movq 0xb5d6(%rip), %rax      # 0x10410
leaq -0xe0(%rbp), %rcx
movq %rcx, -0xf0(%rbp)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq -0xf0(%rbp), %rdi
callq 0x8092
leaq 0xb5f2(%rip), %rdi      # 0x10458
callq 0x7f9a
movl $0x14, %edx
movq %r14, %rdi
leaq 0x767d(%rip), %rsi      # 0xc4f7
callq 0x3400
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %r14, %rdi
callq 0x3400
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3370
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3280
leaq 0xb700(%rip), %rdi      # 0x105c0
leaq -0x50(%rbp), %rsi
callq 0x812c
cmpq -0x78(%rbp), %rax
je 0x4f98
movl $0x12, %edx
movq %r14, %rdi
leaq 0x72b8(%rip), %rsi      # 0xc19a
callq 0x3400
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %r14, %rdi
callq 0x3400
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x7552(%rip), %rsi      # 0xc45b
callq 0x3400
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3370
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3280
leaq -0x160(%rbp), %rax
movq %rax, -0x170(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0x170(%rbp), %rdi
callq 0x8092
leaq -0x170(%rbp), %rdi
callq 0xad94
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0x4f7f
callq 0x3360
movq 0xb502(%rip), %rax      # 0x10488
cmpq 0xb4db(%rip), %rax      # 0x10468
jne 0x50cb
jmp 0x51b8
movq -0x70(%rbp), %rdi
callq 0x3320
testl %eax, %eax
jne 0x5139
movq 0xb460(%rip), %r13      # 0x10410
movq 0xb3e9(%rip), %rsi      # 0x103a0
leaq -0x1f0(%rbp), %r15
movq %r15, %rdi
leaq -0x1b0(%rbp), %rdx
callq 0x3190
movq %r13, %rdi
movq %r15, %rsi
callq 0x9df2
movq -0x1f0(%rbp), %rdi
leaq -0x1e0(%rbp), %rax
cmpq %rax, %rdi
je 0x4ff0
callq 0x3360
leaq -0x140(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0x150(%rbp), %rdi
callq 0x8092
leaq -0x180(%rbp), %rax
movq %rax, -0x190(%rbp)
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x190(%rbp), %r15
movq %r15, %rdi
callq 0x8092
leaq -0x150(%rbp), %rdi
movq %r15, %rsi
callq 0xabde
movq -0x190(%rbp), %rdi
leaq -0x180(%rbp), %rax
cmpq %rax, %rdi
je 0x506a
callq 0x3360
movq -0x150(%rbp), %rdi
leaq -0x140(%rbp), %rax
cmpq %rax, %rdi
je 0x5082
callq 0x3360
leaq -0x120(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0x130(%rbp), %rdi
callq 0x8092
leaq -0x130(%rbp), %rdi
callq 0xad94
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
cmpq %rax, %rdi
je 0x50cb
callq 0x3360
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x50e3
callq 0x3360
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x50f5
callq 0x3360
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x5107
callq 0x3360
movq 0xb37a(%rip), %rax      # 0x10488
cmpq 0xb353(%rip), %rax      # 0x10468
jne 0x4d7e
leaq -0xd0(%rbp), %rdi
callq 0x74ea
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xae90(%rip), %rdi      # 0xffd0
leaq 0x73c5(%rip), %rsi      # 0xc50c
movl $0x12, %edx
callq 0x3400
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0xae70(%rip), %rdi      # 0xffd0
callq 0x3400
movq %rax, %rbx
leaq 0x72eb(%rip), %rsi      # 0xc45a
movl $0x2, %edx
movq %rax, %rdi
callq 0x3400
movq %rbx, %rdi
callq 0x31e0
movq 0xae45(%rip), %rdi      # 0xffd0
leaq 0x738d(%rip), %rsi      # 0xc51f
movl $0x28, %edx
callq 0x3400
movq 0xae2d(%rip), %rdi      # 0xffd0
callq 0x31e0
movq 0xb2d9(%rip), %rax      # 0x10488
cmpq 0xb2b2(%rip), %rax      # 0x10468
jne 0x51c9
movl $0x1, %edi
callq 0x3440
xorl %edi, %edi
callq 0x3440
leaq -0x1a0(%rbp), %r12
leaq -0x200(%rbp), %r13
leaq -0x1b0(%rbp), %rbx
leaq -0x210(%rbp), %r14
leaq 0xb26c(%rip), %r15      # 0x10458
cmpq 0xb29d(%rip), %rax      # 0x10490
jne 0x5208
movq 0xb2a4(%rip), %rax      # 0x104a0
movq -0x8(%rax), %rax
movl $0x200, %ecx            # imm = 0x200
addq %rcx, %rax
movq %r12, -0x1b0(%rbp)
movq -0x20(%rax), %rsi
movq -0x18(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x8092
movq %r13, -0x210(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x8092
movq %r14, %rdi
callq 0xad94
movq -0x210(%rbp), %rdi
cmpq %r13, %rdi
je 0x5255
callq 0x3360
movq %r15, %rdi
callq 0x7f9a
movq -0x1b0(%rbp), %rdi
cmpq %r12, %rdi
je 0x526e
callq 0x3360
movq 0xb213(%rip), %rax      # 0x10488
cmpq 0xb1ec(%rip), %rax      # 0x10468
jne 0x51ec
jmp 0x51b8
movq %rax, %rbx
movq -0x210(%rbp), %rdi
cmpq %r13, %rdi
je 0x52a0
callq 0x3360
jmp 0x52a0
movq %rax, %rbx
movq -0x1b0(%rbp), %rdi
cmpq %r12, %rdi
jne 0x539d
jmp 0x5400
jmp 0x53fd
jmp 0x544a
jmp 0x52eb
movq %rax, %rbx
leaq -0xc0(%rbp), %rax
jmp 0x52d9
jmp 0x52eb
movq %rax, %rbx
leaq -0x220(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x5459
jmp 0x545e
movq %rax, %rbx
jmp 0x545e
jmp 0x53d8
jmp 0x53fd
jmp 0x53fd
movq %rax, %rbx
movq -0x130(%rbp), %rdi
leaq -0x120(%rbp), %rax
jmp 0x5398
movq %rax, %rbx
movq -0x190(%rbp), %rdi
leaq -0x180(%rbp), %rax
cmpq %rax, %rdi
je 0x5338
callq 0x3360
jmp 0x5338
movq %rax, %rbx
movq -0x150(%rbp), %rdi
leaq -0x140(%rbp), %rax
jmp 0x5398
movq %rax, %rbx
movq -0x1f0(%rbp), %rdi
leaq -0x1e0(%rbp), %rax
jmp 0x5398
movq %rax, %rbx
jmp 0x537b
movq %rax, %rbx
movq -0x1d0(%rbp), %rdi
leaq -0x1c0(%rbp), %rax
cmpq %rax, %rdi
je 0x537b
callq 0x3360
leaq -0xc0(%rbp), %r13
jmp 0x544d
movq %rax, %rbx
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0x5400
callq 0x3360
jmp 0x5400
jmp 0x53d8
movq %rax, %rbx
jmp 0x542a
jmp 0x53c2
jmp 0x53af
movq %rax, %rbx
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
jmp 0x540e
movq %rax, %rbx
jmp 0x5418
jmp 0x53fd
jmp 0x544a
jmp 0x544a
jmp 0x544a
jmp 0x53d8
movq %rax, %rbx
jmp 0x53f2
jmp 0x53fd
movq %rax, %rbx
jmp 0x543c
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x53f2
callq 0x3360
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
jne 0x5437
jmp 0x543c
movq %rax, %rbx
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x5418
callq 0x3360
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x542a
callq 0x3360
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x543c
callq 0x3360
leaq -0xd0(%rbp), %rdi
callq 0x74ea
jmp 0x545e
movq %rax, %rbx
movq -0xd0(%rbp), %rdi
cmpq %r13, %rdi
je 0x545e
callq 0x3360
movq %rbx, %rdi
callq 0x35c0