// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
leaq 0xab46(%rip), %rdi      # 0x10530
movq %rbx, %rsi
callq 0x9014
leaq 0xab3f(%rip), %rcx      # 0x10538
cmpq %rcx, %rax
je 0x5c9a
cmpl $0x2, 0x40(%rax)
jl 0x5a7f
movq 0xa5c1(%rip), %r14      # 0xffd0
leaq 0x6693(%rip), %rsi      # 0xc0a9
movl $0xe, %edx
movq %r14, %rdi
callq 0x3400
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x3400
movq %rax, %rbx
leaq 0x667c(%rip), %rsi      # 0xc0b8
movl $0x1a, %edx
movq %rax, %rdi
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
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3280
movq 0xa54a(%rip), %r14      # 0xffd0
leaq 0x6646(%rip), %rsi      # 0xc0d3
movl $0x9, %edx
movq %r14, %rdi
callq 0x3400
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x3400
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3370
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3280
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0xa8be(%rip), %rsi      # 0x103a0
movq 0xa8bf(%rip), %rdx      # 0x103a8
addq %rsi, %rdx
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0x80a2
leaq 0x65a2(%rip), %rsi      # 0xc0a1
movq %r14, %rdi
callq 0x3650
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq -0x40(%rbp), %rdi
callq 0x3140
leaq -0x50(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5b3b
movq %rdx, -0x60(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x50(%rbp)
jmp 0x5b42
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x60(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x6913(%rip), %rsi      # 0xc477
callq 0x3650
leaq -0x70(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdi
je 0x5b8e
movq %rdi, -0x80(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x70(%rbp)
jmp 0x5b99
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq %r12, %rdi
movq 0x8(%rax), %rdx
movq %rdx, -0x78(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x35f0
movq -0x80(%rbp), %rdi
cmpq %r12, %rdi
je 0x5bc3
callq 0x3360
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x5bd1
callq 0x3360
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x5bdf
callq 0x3360
movq 0xa822(%rip), %rdi      # 0x10408
callq 0x9dd8
movq %rax, %r14
movq 0xa813(%rip), %rdi      # 0x10408
callq 0x9dd8
movq (%rax), %r15
movq 0xa804(%rip), %rdi      # 0x10408
callq 0x9dd8
movq 0x8(%rax), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x90b1
movq %rax, %r15
movq 0xa7e6(%rip), %rdi      # 0x10408
callq 0x9dd8
movq 0x8(%rax), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x925e
movq 0xa7cb(%rip), %r14      # 0x10408
movq 0xa75c(%rip), %rsi      # 0x103a0
leaq -0xa0(%rbp), %rdi
leaq -0x80(%rbp), %rdx
callq 0x3190
leaq -0xa0(%rbp), %rsi
movq %r14, %rdi
callq 0x9de2
leaq -0x90(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5c78
callq 0x3360
leaq 0xa941(%rip), %r14      # 0x105c0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8140
movq %r14, %rdi
movq %rax, %rsi
callq 0x8b52
callq 0xac89
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x90(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x5ce5
jmp 0x5cea
movq %rax, %rbx
jmp 0x5cea
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x5cdc
callq 0x3360
jmp 0x5cdc
jmp 0x5cd9
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x5cea
callq 0x3360
movq %rbx, %rdi
callq 0x35c0