// File: /workspace/github_cpp_makefile_star2_O1/mbourand[P]webserv/srcs/Utils/Credentials.cpp
// Function: Credentials::Parse_user_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void						Credentials::Parse_user_file(const std::string &path)
{
	Authentication_file		user_file;
	struct stat 			stats;

	if (lstat(path.c_str(), &stats) < 0 || !S_ISREG(stats.st_mode) || user_file.last_modified == stats.st_mtime)
		return ;
	std::ifstream 			inputFileStream(path.c_str());
	if (!inputFileStream.is_open())
		return ;
	std::string				line;
	while (!inputFileStream.eof()) {
		std::getline(inputFileStream, line);
		if (!line.empty())
			user_file.content.push_back(base64_encode(line.c_str(), line.size()));
	}
	user_file.file_path = path;
	user_file.last_modified = stats.st_mtime;
	m_credentials.push_back(user_file);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x328, %rsp            # imm = 0x328
movq %rsi, %r15
movq %rdi, 0x28(%rsp)
leaq 0x60(%rsp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb $0x0, (%r14)
leaq 0x70(%rsp), %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rax, 0x10(%rbx)
movq (%rsi), %rdi
leaq 0x90(%rsp), %rsi
callq 0x78e0
testl %eax, %eax
js 0x17511
movl $0xf000, %eax           # imm = 0xF000
andl 0xa8(%rsp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x17511
movq 0xe8(%rsp), %rax
cmpq %rax, 0x88(%rsp)
je 0x17511
movq %rax, 0x20(%rsp)
movq (%r15), %rsi
leaq 0x120(%rsp), %rdi
movl $0x8, %edx
callq 0x7870
leaq 0x198(%rsp), %rdi
callq 0x7130
testb %al, %al
je 0x17504
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x120(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x140(%rsp,%rax)
jne 0x174b2
leaq (%rsp,%rax), %rdi
addq $0x120, %rdi            # imm = 0x120
leaq 0x120(%rsp), %r12
movq %rsp, %r13
leaq 0x30(%rsp), %rbp
movl $0xa, %esi
callq 0x7490
movsbl %al, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x7890
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
je 0x17495
movq (%rsp), %rsi
movq %rbp, %rdi
callq 0x1338c
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x16cac
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x17495
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
movq 0x120(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %rdi
addq $0x120, %rdi            # imm = 0x120
testb $0x2, 0x20(%rdi)
je 0x17440
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0x72c0
movq 0x28(%rsp), %r15
leaq 0x50(%rsp), %rsi
movq 0x20(%rsp), %rax
movq %rax, 0x38(%rsi)
movq %r15, %rdi
callq 0x17cf6
movq %rax, %rdi
movq %r15, %rsi
callq 0x7090
incq 0x10(%r15)
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x17504
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x120(%rsp), %rdi
callq 0x7150
movq %rbx, %rdi
callq 0x1696a
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x17530
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x74b0
addq $0x328, %rsp            # imm = 0x328
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1756c
movq %rax, %rbx
jmp 0x17597
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x1756f
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x74b0
jmp 0x1756f
jmp 0x1756c
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1758a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74b0
leaq 0x120(%rsp), %rdi
callq 0x7150
leaq 0x50(%rsp), %rdi
callq 0x1779a
movq %rbx, %rdi
callq 0x7810
nop