// File: mbourand[P]webserv/srcs/Config/ConfigContext.cpp
// Function: ConfigContext::parse_uploads_exts(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void ConfigContext::parse_uploads_exts(const std::string& directive_value)
{
	std::list<std::string> words = ft::split(directive_value, " \t\n");
	for (std::list<std::string>::iterator it = words.begin(); it != words.end(); it++)
	{
		if ((*it)[0] != '.')
		{
			if (*it == "all")
			{
				_uploads_exts.clear();
				_uploads_exts.push_back("all");
			}
			else if (*it == "none")
				_uploads_exts.clear();
			else
				throw std::invalid_argument("Extension doesn't start with '.' for uploads_exts in config");
			return;
		}
		_uploads_exts.push_back(*it);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x9b10
movq -0xa8(%rbp), %rdx
leaq 0x22160(%rip), %rsi     # 0x6bc67
leaq -0x48(%rbp), %rdi
callq 0xa780
jmp 0x49b12
movq -0xb0(%rbp), %rsi
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0x2f910
jmp 0x49b28
leaq -0x48(%rbp), %rdi
callq 0x9c98
leaq -0x49(%rbp), %rdi
callq 0x9700
leaq -0x28(%rbp), %rdi
callq 0xcc30
movq %rax, -0x68(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xccb0
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x14110
testb $0x1, %al
jne 0x49b6a
jmp 0x49db2
leaq -0x68(%rbp), %rdi
callq 0xd8f0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x9c70
movq %rax, -0xc0(%rbp)
jmp 0x49b88
movq -0xc0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
je 0x49d6b
leaq -0x68(%rbp), %rdi
callq 0xd8f0
movq %rax, %rdi
leaq 0x235db(%rip), %rsi     # 0x6d189
callq 0xdf50
movb %al, -0xc1(%rbp)
jmp 0x49bbb
movb -0xc1(%rbp), %al
testb $0x1, %al
jne 0x49bca
jmp 0x49cbe
movq -0xb8(%rbp), %rdi
addq $0xf8, %rdi
movq %rdi, -0xd8(%rbp)
callq 0x161a0
leaq -0x91(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x9b10
movq -0xd0(%rbp), %rdx
leaq 0x23584(%rip), %rsi     # 0x6d189
leaq -0x90(%rbp), %rdi
callq 0xa780
jmp 0x49c13
movq -0xd8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x13930
jmp 0x49c28
leaq -0x90(%rbp), %rdi
callq 0x9c98
leaq -0x91(%rbp), %rdi
callq 0x9700
jmp 0x49d5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x49c68
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x9c98
leaq -0x49(%rbp), %rdi
callq 0x9700
jmp 0x49dd7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x49dce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x49cad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x9c98
leaq -0x91(%rbp), %rdi
callq 0x9700
jmp 0x49dce
leaq -0x68(%rbp), %rdi
callq 0xd8f0
movq %rax, %rdi
leaq 0x234bc(%rip), %rsi     # 0x6d18d
callq 0xdf50
movb %al, -0xd9(%rbp)
jmp 0x49cde
movb -0xd9(%rbp), %al
testb $0x1, %al
jne 0x49cea
jmp 0x49cff
movq -0xb8(%rbp), %rdi
addq $0xf8, %rdi
callq 0x161a0
jmp 0x49d5d
movl $0x10, %edi
callq 0x9340
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xe8(%rbp)
leaq 0x23475(%rip), %rsi     # 0x6d192
callq 0x9be0
jmp 0x49d24
movq -0xe8(%rbp), %rdi
movq 0x45296(%rip), %rsi     # 0x8efc8
movq 0x4527f(%rip), %rdx     # 0x8efb8
callq 0x9aa0
jmp 0x49de0
movq -0xe8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
callq 0x94c0
jmp 0x49dce
jmp 0x49d5f
movl $0x1, -0x98(%rbp)
jmp 0x49dbc
movq -0xb8(%rbp), %rax
addq $0xf8, %rax
movq %rax, -0xf0(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xd8f0
movq -0xf0(%rbp), %rdi
movq %rax, %rsi
callq 0x4db90
jmp 0x49d99
jmp 0x49d9b
leaq -0x68(%rbp), %rdi
xorl %esi, %esi
callq 0x142e0
movq %rax, -0xa0(%rbp)
jmp 0x49b47
movl $0x0, -0x98(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xceb0
addq $0xf0, %rsp
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0xceb0
movq -0x58(%rbp), %rdi
callq 0x9af0