// File: /workspace/github_cpp_makefile_star2_O3/parth-shel[P]xpac/metadata.cpp
// Function: metadata::write_package(metadata*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void metadata::write_package(metadata * package, std::string filepath){
	std::ofstream file_object;
	filepath = filepath + "/." + package->pkg_name + std::string(".metadata");	//Filename consists of package name and a metadata
	file_object.open(filepath.c_str(),std::ios::out | std::ios::trunc);
	file_object << package->pkg_name << "\n" << package->pkg_ver << "\n" << package->pkg_id << "\n";
	for(auto&& itr = package->dep_list->begin(); itr!=package->dep_list->end(); itr++)
					file_object<< *itr << "\n";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x2a8(%rbp), %rdi
callq 0x35a0
leaq -0x98(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %rdi
callq 0x80a2
leaq 0x2271(%rip), %rsi      # 0xc0a1
leaq -0xa8(%rbp), %rdi
callq 0x3650
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq -0xa8(%rbp), %rdi
callq 0x3140
leaq -0x58(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9e73
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x9e7b
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, -0x60(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x25d5(%rip), %rsi      # 0xc477
leaq 0x25d7(%rip), %rdx      # 0xc480
leaq -0x48(%rbp), %rdi
callq 0x7f0c
movq -0x68(%rbp), %rcx
movq -0x60(%rbp), %r8
movq -0x40(%rbp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r13, %rcx
je 0x9ed0
movq -0x58(%rbp), %rdi
movq -0x48(%rbp), %rsi
cmpq %rdi, %rax
jbe 0x9eec
movl $0xf, %edi
cmpq %r12, %rsi
je 0x9ee7
movq -0x38(%rbp), %rdi
cmpq %rdi, %rax
jbe 0x9ef7
leaq -0x68(%rbp), %rdi
callq 0x3140
jmp 0x9f04
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x33d0
movq %r13, %r12
leaq -0x78(%rbp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
movq %r15, %r13
cmpq %rcx, %rsi
je 0x9f2e
movq %rsi, -0x88(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x78(%rbp)
jmp 0x9f34
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0x80(%rbp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq -0x88(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3450
movq (%r15), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x9f73
callq 0x3360
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x9f85
callq 0x3360
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x9f93
callq 0x3360
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0x9fa4
callq 0x3360
movq (%r14), %rsi
leaq -0x2a8(%rbp), %rdi
movl $0x30, %edx
callq 0x3070
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq -0x2a8(%rbp), %rdi
callq 0x3400
movq %rax, %r14
leaq 0x2815(%rip), %rsi      # 0xc7ea
movl $0x1, %edx
movq %rax, %rdi
callq 0x3400
movq 0x40(%rbx), %rsi
movq 0x48(%rbx), %rdx
movq %r14, %rdi
callq 0x3400
movq %rax, %r14
leaq 0x27ee(%rip), %rsi      # 0xc7ea
movl $0x1, %edx
movq %rax, %rdi
callq 0x3400
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq %r14, %rdi
callq 0x3400
leaq 0x27ca(%rip), %rsi      # 0xc7ea
movl $0x1, %edx
movq %rax, %rdi
callq 0x3400
movq 0x60(%rbx), %rax
movq (%rax), %r12
cmpq 0x8(%rax), %r12
je 0xa077
leaq -0x2a8(%rbp), %r14
leaq 0x27a2(%rip), %r15      # 0xc7ea
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r14, %rdi
callq 0x3400
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x3400
addq $0x20, %r12
movq 0x60(%rbx), %rax
cmpq 0x8(%rax), %r12
jne 0xa048
movq 0x5f42(%rip), %rax      # 0xffc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x2a0(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x2a8(%rbp,%rcx)
callq 0x3310
leaq -0x1b0(%rbp), %rdi
callq 0x3160
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xa0d9
callq 0x3360
jmp 0xa0d9
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0xa0ee
callq 0x3360
jmp 0xa0ee
jmp 0xa0eb
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
cmpq %r15, %rdi
je 0xa108
callq 0x3360
jmp 0xa108
jmp 0xa105
jmp 0xa105
movq %rax, %rbx
leaq -0x2a8(%rbp), %rdi
callq 0x34f0
movq %rbx, %rdi
callq 0x35c0