// File: /workspace/github_cpp_makefile_star2_O2/parth-shel[P]xpac/client.cpp
// Function: remove_package(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void remove_package(std::string pkg_name){
	auto find = indegree_map.find(pkg_name);
	if(find != indegree_map.end()){
		if(find->second>1){
			std::cout<<"Cannot delete "<<pkg_name<<" as it breaks a dependency"<<std::endl;
		}
		else{
			std::cout<<"Removing "<<pkg_name<<std::endl;
			//Removing relevant metadata files:
			remove(std::string(metadata_dir + "/." + pkg_name + ".metadata").c_str());
			//Deleting it from the dependency list of base, if applicable:
			base->get_dep_list()->erase(std::remove(base->get_dep_list()->begin(), base->get_dep_list()->end(), pkg_name), base->get_dep_list()->end());
			//Rewriting base's metadata:
			metadata::write_package(base, metadata_dir.c_str());
			//Removing package from list of all installed packages:
			user_installed_list.erase(user_installed_list.find(pkg_name));
			//Rewriting the user installed packages list:
			rewrite_installed_packages();
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0xa813(%rip), %rdi      # 0xf540
movq %rbx, %rsi
callq 0x7bb0
leaq 0xa80c(%rip), %rcx      # 0xf548
cmpq %rcx, %rax
je 0x4ec8
cmpl $0x2, 0x40(%rax)
jl 0x4d8d
movq 0xa27e(%rip), %rdi      # 0xefd0
leaq 0x5350(%rip), %rsi      # 0xa0a9
callq 0x3370
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3340
leaq 0x5348(%rip), %rsi      # 0xa0b8
movq %rax, %rdi
callq 0x3370
movq %rax, %rdi
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x31f0
movq 0xa23c(%rip), %rdi      # 0xefd0
leaq 0x5338(%rip), %rsi      # 0xa0d3
callq 0x3370
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3340
movq %rax, %rdi
callq 0x31f0
leaq 0xa5f6(%rip), %rsi      # 0xf3b0
leaq 0x52e0(%rip), %rdx      # 0xa0a1
leaq -0x78(%rbp), %r14
movq %r14, %rdi
callq 0x5e5c
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x5f53
leaq 0x5694(%rip), %rdx      # 0xa477
leaq -0x98(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x5f2a
leaq -0x98(%rbp), %r14
movq (%r14), %rdi
callq 0x35f0
movq %r14, %rdi
callq 0x36a8
leaq -0x58(%rbp), %rdi
callq 0x36a8
leaq -0x78(%rbp), %rdi
callq 0x36a8
movq 0xa5f5(%rip), %rdi      # 0xf418
callq 0x856c
movq %rax, %r14
movq 0xa5e6(%rip), %rdi      # 0xf418
callq 0x856c
movq (%rax), %r15
movq 0xa5d7(%rip), %rdi      # 0xf418
callq 0x856c
movq 0x8(%rax), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x7c3a
movq %rax, %r15
movq 0xa5b9(%rip), %rdi      # 0xf418
callq 0x856c
movq 0x8(%rax), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x6004
movq 0xa59e(%rip), %r14      # 0xf418
movq 0xa52f(%rip), %rsi      # 0xf3b0
leaq -0x38(%rbp), %rdi
leaq -0x98(%rbp), %rdx
callq 0x3180
leaq -0x38(%rbp), %rsi
movq %r14, %rdi
callq 0x8576
leaq -0x38(%rbp), %rdi
callq 0x36a8
leaq 0xa723(%rip), %r14      # 0xf5d0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6d4a
movq %r14, %rdi
movq %rax, %rsi
callq 0x76ba
callq 0x8f5c
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
jmp 0x4ef9
movq %rax, %rbx
jmp 0x4efe
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x36a8
jmp 0x4ef5
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x36a8
movq %rbx, %rdi
callq 0x35c0