// File: /workspace/github_cpp_makefile_star2_O1/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 0xab43(%rip), %rdi      # 0x10530
movq %rbx, %rsi
callq 0x9048
leaq 0xab3c(%rip), %rcx      # 0x10538
cmpq %rcx, %rax
je 0x5c9e
cmpl $0x2, 0x40(%rax)
jl 0x5a82
movq 0xa5be(%rip), %r14      # 0xffd0
leaq 0x6690(%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 0x6679(%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 0xa547(%rip), %r14      # 0xffd0
leaq 0x6643(%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 -0x50(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0xa8bb(%rip), %rsi      # 0x103a0
movq 0xa8bc(%rip), %rdx      # 0x103a8
addq %rsi, %rdx
leaq -0x60(%rbp), %r14
movq %r14, %rdi
callq 0x8092
leaq 0x659f(%rip), %rsi      # 0xc0a1
movq %r14, %rdi
callq 0x3650
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq -0x60(%rbp), %rdi
callq 0x3140
leaq -0x70(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5b3e
movq %rdx, -0x80(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x70(%rbp)
jmp 0x5b45
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x80(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x6910(%rip), %rsi      # 0xc477
callq 0x3650
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5b91
movq %rdx, -0x40(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x30(%rbp)
jmp 0x5b99
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, -0x38(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x40(%rbp), %rdi
callq 0x35f0
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x5bc7
callq 0x3360
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
je 0x5bd5
callq 0x3360
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x5be3
callq 0x3360
movq 0xa81e(%rip), %rdi      # 0x10408
callq 0x9de8
movq %rax, %r14
movq 0xa80f(%rip), %rdi      # 0x10408
callq 0x9de8
movq (%rax), %r15
movq 0xa800(%rip), %rdi      # 0x10408
callq 0x9de8
movq 0x8(%rax), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x90e5
movq %rax, %r15
movq 0xa7e2(%rip), %rdi      # 0x10408
callq 0x9de8
movq 0x8(%rax), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x9282
movq 0xa7c7(%rip), %r14      # 0x10408
movq 0xa758(%rip), %rsi      # 0x103a0
leaq -0xa0(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x3190
leaq -0xa0(%rbp), %rsi
movq %r14, %rdi
callq 0x9df2
leaq -0x90(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5c7c
callq 0x3360
leaq 0xa93d(%rip), %r14      # 0x105c0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x812c
movq %r14, %rdi
movq %rax, %rsi
callq 0x8b72
callq 0xaca1
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 0x5ce9
jmp 0x5cee
movq %rax, %rbx
jmp 0x5cee
movq %rax, %rbx
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
je 0x5ce0
callq 0x3360
jmp 0x5ce0
jmp 0x5cdd
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x5cee
callq 0x3360
movq %rbx, %rdi
callq 0x35c0