// File: parth-shel[P]xpac/metadata.cpp
// Function: metadata::get_package(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
metadata * metadata::get_package(std::string filepath){
	std::ifstream file_object;
	file_object.open(filepath.c_str(),std::ios::in | std::ios::binary);
	metadata * new_package = new metadata();
	std::string next_line;

	//Reading the name and the package id of the package to be read:
	getline(file_object,next_line);
	new_package->pkg_name = next_line;
	getline(file_object,next_line);
	new_package->pkg_ver = next_line;
	getline(file_object,next_line);
	new_package->pkg_id = next_line;

	while(getline(file_object,next_line)){
		if(next_line.compare(std::string("")))	new_package->dep_list->push_back(next_line);	//Should not push empty strings
	}

	file_object.close();
	return new_package;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2c0, %rsp            # imm = 0x2C0
movq %rdi, -0x280(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x4480
movq -0x280(%rbp), %rdi
callq 0x41c0
movq %rax, -0x278(%rbp)
movl $0x8, %edi
movl $0x4, %esi
callq 0x95c0
movl %eax, -0x270(%rbp)
jmp 0x11bcc
movl -0x270(%rbp), %edx
movq -0x278(%rbp), %rsi
leaq -0x210(%rbp), %rdi
callq 0x42d0
jmp 0x11be7
movl $0x70, %edi
callq 0x4410
movq %rax, -0x288(%rbp)
jmp 0x11bfa
movq -0x288(%rbp), %rdi
callq 0x11f10
jmp 0x11c08
movq -0x288(%rbp), %rax
movq %rax, -0x228(%rbp)
leaq -0x248(%rbp), %rdi
movq %rdi, -0x290(%rbp)
callq 0x4580
movq -0x290(%rbp), %rsi
leaq -0x210(%rbp), %rdi
callq 0x40e0
jmp 0x11c3e
movq -0x228(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x4050
jmp 0x11c53
leaq -0x210(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x40e0
jmp 0x11c68
movq -0x228(%rbp), %rdi
addq $0x40, %rdi
leaq -0x248(%rbp), %rsi
callq 0x4050
jmp 0x11c81
leaq -0x210(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x40e0
jmp 0x11c96
movq -0x228(%rbp), %rdi
addq $0x20, %rdi
leaq -0x248(%rbp), %rsi
callq 0x4050
jmp 0x11caf
jmp 0x11cb1
leaq -0x210(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x40e0
movq %rax, -0x298(%rbp)
jmp 0x11ccd
movq -0x298(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x4500
movb %al, -0x299(%rbp)
jmp 0x11ceb
movb -0x299(%rbp), %al
testb $0x1, %al
jne 0x11cfa
jmp 0x11e1f
leaq -0x269(%rbp), %rdi
movq %rdi, -0x2a8(%rbp)
callq 0x46e0
movq -0x2a8(%rbp), %rdx
leaq 0x3ae8(%rip), %rsi      # 0x15803
leaq -0x268(%rbp), %rdi
callq 0x4560
jmp 0x11d29
leaq -0x248(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x4040
movl %eax, -0x2ac(%rbp)
jmp 0x11d44
leaq -0x268(%rbp), %rdi
callq 0x47e8
leaq -0x269(%rbp), %rdi
callq 0x4460
movl -0x2ac(%rbp), %eax
cmpl $0x0, %eax
je 0x11e1a
movq -0x228(%rbp), %rax
movq 0x60(%rax), %rdi
leaq -0x248(%rbp), %rsi
callq 0x9510
jmp 0x11d84
jmp 0x11e1a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
jmp 0x11e6f
movq -0x288(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
callq 0x43f0
jmp 0x11e6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
jmp 0x11e63
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
jmp 0x11e0c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x218(%rbp)
movl %eax, -0x21c(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x47e8
leaq -0x269(%rbp), %rdi
callq 0x4460
jmp 0x11e63
jmp 0x11cb1
leaq -0x210(%rbp), %rdi
callq 0x4100
jmp 0x11e2d
movq -0x228(%rbp), %rax
movq %rax, -0x2b8(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x47e8
leaq -0x210(%rbp), %rdi
callq 0x4140
movq -0x2b8(%rbp), %rax
addq $0x2c0, %rsp            # imm = 0x2C0
popq %rbp
retq
leaq -0x248(%rbp), %rdi
callq 0x47e8
leaq -0x210(%rbp), %rdi
callq 0x4140
movq -0x218(%rbp), %rdi
callq 0x46d0
nopw (%rax,%rax)