// File: /workspace/github_cpp_makefile_star2_O1/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 0x8092
leaq 0x2261(%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 0x9e83
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x9e8b
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 0x25c5(%rip), %rsi      # 0xc477
leaq 0x25c7(%rip), %rdx      # 0xc480
leaq -0x48(%rbp), %rdi
callq 0x7f00
movq -0x68(%rbp), %rcx
movq -0x60(%rbp), %r8
movq -0x40(%rbp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r13, %rcx
je 0x9ee0
movq -0x58(%rbp), %rsi
cmpq %rsi, %rax
jbe 0x9ef9
movl $0xf, %esi
cmpq %r12, -0x48(%rbp)
je 0x9ef4
movq -0x38(%rbp), %rsi
cmpq %rsi, %rax
jbe 0x9f08
movq -0x48(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x3140
jmp 0x9f15
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 0x9f3f
movq %rsi, -0x88(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x78(%rbp)
jmp 0x9f45
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 0x9f84
callq 0x3360
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x9f96
callq 0x3360
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x9fa4
callq 0x3360
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0x9fb5
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 0x2804(%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 0x27dd(%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 0x27b9(%rip), %rsi      # 0xc7ea
movl $0x1, %edx
movq %rax, %rdi
callq 0x3400
movq 0x60(%rbx), %rax
movq (%rax), %r12
cmpq 0x8(%rax), %r12
je 0xa088
leaq -0x2a8(%rbp), %r14
leaq 0x2791(%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 0xa059
movq 0x5f31(%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 0xa0ea
callq 0x3360
jmp 0xa0ea
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0xa0ff
callq 0x3360
jmp 0xa0ff
jmp 0xa0fc
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
cmpq %r15, %rdi
je 0xa119
callq 0x3360
jmp 0xa119
jmp 0xa116
jmp 0xa116
movq %rax, %rbx
leaq -0x2a8(%rbp), %rdi
callq 0x34f0
movq %rbx, %rdi
callq 0x35c0
nop