// File: mbourand[P]webserv/srcs/Utils/Types_parser.cpp
// Function: parse_types_file(HashTable*, char const*)
bool	parse_types_file(HashTable *file_formatname, const char *src)
{
	std::ifstream inputFileStream(src);
	if (!inputFileStream.is_open())
		return (false);
	while (!inputFileStream.eof()) {
		std::string line;
		std::string formatname;
		std::getline(inputFileStream, line);
		std::stringstream currentline(line);
		currentline >> formatname;
		if (formatname[0] == '#')
			continue;
		if (formatname.size() && (formatname.size() != line.size()))
		{
			for (int i = 0; i < (std::count(line.begin(), line.end(), ' ') + 1); i++)
			{
				std::string occurrence;
				currentline >> occurrence;
				if (occurrence.size())
					file_formatname->Insert(occurrence, formatname);
			}
		}
	}
	inputFileStream.close();
	return (true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x490, %rsp            # imm = 0x490
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x220(%rbp), %rdi
movq %rdi, -0x448(%rbp)
movl $0x8, %edx
callq 0x9b80
movq -0x448(%rbp), %rdi
callq 0x99f0
movb %al, -0x439(%rbp)
jmp 0x2de83
movb -0x439(%rbp), %al
testb $0x1, %al
jne 0x2deb9
jmp 0x2de8f
movb $0x0, -0x1(%rbp)
movl $0x1, -0x230(%rbp)
jmp 0x2e1bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
jmp 0x2e1d5
jmp 0x2debb
movq -0x220(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x220(%rbp,%rax), %rdi
callq 0x9b90
movb %al, -0x449(%rbp)
jmp 0x2dedb
movb -0x449(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x2deec
jmp 0x2e19f
leaq -0x250(%rbp), %rdi
movq %rdi, -0x458(%rbp)
callq 0x98c0
leaq -0x270(%rbp), %rdi
callq 0x98c0
movq -0x458(%rbp), %rsi
leaq -0x220(%rbp), %rdi
callq 0x9130
jmp 0x2df20
movl $0x10, %edi
movl $0x8, %esi
callq 0x14730
movl %eax, -0x45c(%rbp)
jmp 0x2df37
movl -0x45c(%rbp), %edx
leaq -0x3f8(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x99d0
jmp 0x2df52
leaq -0x3f8(%rbp), %rdi
leaq -0x270(%rbp), %rsi
callq 0x9820
jmp 0x2df67
xorl %eax, %eax
movl %eax, %esi
leaq -0x270(%rbp), %rdi
callq 0x9c70
movq %rax, -0x468(%rbp)
jmp 0x2df80
movq -0x468(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x2dfcc
movl $0x2, -0x230(%rbp)
jmp 0x2e13f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
jmp 0x2e185
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
jmp 0x2e179
leaq -0x270(%rbp), %rdi
callq 0x9480
cmpq $0x0, %rax
je 0x2e135
leaq -0x270(%rbp), %rdi
callq 0x9480
movq %rax, -0x470(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x9480
movq %rax, %rcx
movq -0x470(%rbp), %rax
cmpq %rcx, %rax
je 0x2e135
movl $0x0, -0x3fc(%rbp)
movslq -0x3fc(%rbp), %rax
movq %rax, -0x488(%rbp)
leaq -0x250(%rbp), %rdi
movq %rdi, -0x480(%rbp)
callq 0x95b0
movq -0x480(%rbp), %rdi
movq %rax, -0x408(%rbp)
callq 0x9400
movq %rax, -0x410(%rbp)
movb $0x20, -0x411(%rbp)
movq -0x408(%rbp), %rdi
movq -0x410(%rbp), %rsi
leaq -0x411(%rbp), %rdx
callq 0x2e1f0
movq %rax, -0x478(%rbp)
jmp 0x2e083
movq -0x488(%rbp), %rax
movq -0x478(%rbp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jge 0x2e133
leaq -0x438(%rbp), %rdi
movq %rdi, -0x490(%rbp)
callq 0x98c0
movq -0x490(%rbp), %rsi
leaq -0x3f8(%rbp), %rdi
callq 0x9820
jmp 0x2e0c6
leaq -0x438(%rbp), %rdi
callq 0x9480
cmpq $0x0, %rax
je 0x2e113
movq -0x10(%rbp), %rdi
leaq -0x438(%rbp), %rsi
leaq -0x270(%rbp), %rdx
callq 0x26100
jmp 0x2e0f1
jmp 0x2e113
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
leaq -0x438(%rbp), %rdi
callq 0x9c98
jmp 0x2e179
leaq -0x438(%rbp), %rdi
callq 0x9c98
movl -0x3fc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3fc(%rbp)
jmp 0x2e01e
jmp 0x2e135
movl $0x0, -0x230(%rbp)
leaq -0x3f8(%rbp), %rdi
callq 0x94e0
leaq -0x270(%rbp), %rdi
callq 0x9c98
leaq -0x250(%rbp), %rdi
callq 0x9c98
movl -0x230(%rbp), %eax
testl %eax, %eax
je 0x2e174
jmp 0x2e16f
jmp 0x2debb
jmp 0x2debb
leaq -0x3f8(%rbp), %rdi
callq 0x94e0
leaq -0x270(%rbp), %rdi
callq 0x9c98
leaq -0x250(%rbp), %rdi
callq 0x9c98
jmp 0x2e1d5
leaq -0x220(%rbp), %rdi
callq 0x9150
jmp 0x2e1ad
movb $0x1, -0x1(%rbp)
movl $0x1, -0x230(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x91d0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x490, %rsp            # imm = 0x490
popq %rbp
retq
leaq -0x220(%rbp), %rdi
callq 0x91d0
movq -0x228(%rbp), %rdi
callq 0x9af0
nopl (%rax)