// File: mbourand[P]webserv/srcs/Config/ConfigContext.cpp
// Function: ConfigContext::set_cgi_dir_default()
void ConfigContext::set_cgi_dir_default()
{
	if (_params.find("cgi_dir") == _params.end())
		_params["cgi_dir"].push_back("/cgi-bin/");
	else
	{
		_params["cgi_dir"].front() = ft::simplify_path(_params["cgi_dir"].front());
		if (!ft::is_directory(_params["cgi_dir"].front().c_str()))
			throw std::invalid_argument("cgi_dir parameter is not a folder in config");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x170(%rbp)
addq $0x20, %rax
movq %rax, -0x168(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x9b10
movq -0x160(%rbp), %rdx
leaq 0x1f63e(%rip), %rsi     # 0x6a6d1
leaq -0x30(%rbp), %rdi
callq 0xa780
jmp 0x4b09e
movq -0x168(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x4d850
movq %rax, -0x178(%rbp)
jmp 0x4b0b7
movq -0x170(%rbp), %rdi
movq -0x178(%rbp), %rax
movq %rax, -0x10(%rbp)
addq $0x20, %rdi
callq 0x4d880
movq %rax, -0x50(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4da50
movb %al, -0x179(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x9c98
leaq -0x31(%rbp), %rdi
callq 0x9700
movb -0x179(%rbp), %al
testb $0x1, %al
jne 0x4b10a
jmp 0x4b267
movq -0x170(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x190(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x9b10
movq -0x188(%rbp), %rdx
leaq 0x1f597(%rip), %rsi     # 0x6a6d1
leaq -0x70(%rbp), %rdi
callq 0xa780
jmp 0x4b145
movq -0x190(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4da80
movq %rax, -0x198(%rbp)
jmp 0x4b15e
leaq -0x99(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x9b10
movq -0x1a0(%rbp), %rdx
leaq 0x2215a(%rip), %rsi     # 0x6d2d9
leaq -0x98(%rbp), %rdi
callq 0xa780
jmp 0x4b18d
movq -0x198(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x13930
jmp 0x4b1a2
leaq -0x98(%rbp), %rdi
callq 0x9c98
leaq -0x99(%rbp), %rdi
callq 0x9700
leaq -0x70(%rbp), %rdi
callq 0x9c98
leaq -0x71(%rbp), %rdi
callq 0x9700
jmp 0x4b5e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4b1f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x9c98
leaq -0x31(%rbp), %rdi
callq 0x9700
jmp 0x4b5eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4b259
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4b250
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4b244
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x9c98
leaq -0x99(%rbp), %rdi
callq 0x9700
leaq -0x70(%rbp), %rdi
callq 0x9c98
leaq -0x71(%rbp), %rdi
callq 0x9700
jmp 0x4b5eb
movq -0x170(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x1b0(%rbp)
leaq -0xe1(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
callq 0x9b10
movq -0x1a8(%rbp), %rdx
leaq 0x1f437(%rip), %rsi     # 0x6a6d1
leaq -0xe0(%rbp), %rdi
callq 0xa780
jmp 0x4b2a8
movq -0x1b0(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x4da80
movq %rax, -0x1b8(%rbp)
jmp 0x4b2c4
movq -0x1b8(%rbp), %rdi
callq 0xcd40
movq %rax, %rsi
leaq -0xc0(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x32290
jmp 0x4b2e5
movq -0x170(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x1c8(%rbp)
leaq -0x109(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x9b10
movq -0x1c0(%rbp), %rdx
leaq 0x1f3b9(%rip), %rsi     # 0x6a6d1
leaq -0x108(%rbp), %rdi
callq 0xa780
jmp 0x4b326
movq -0x1c8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x4da80
movq %rax, -0x1d0(%rbp)
jmp 0x4b342
movq -0x1d0(%rbp), %rdi
callq 0xcd40
movq %rax, %rdi
leaq -0xc0(%rbp), %rsi
movq %rsi, -0x1e8(%rbp)
callq 0x97e0
leaq -0x108(%rbp), %rdi
callq 0x9c98
leaq -0x109(%rbp), %rdi
callq 0x9700
movq -0x1e8(%rbp), %rdi
callq 0x9c98
leaq -0xe0(%rbp), %rdi
callq 0x9c98
leaq -0xe1(%rbp), %rdi
callq 0x9700
movq -0x170(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x1e0(%rbp)
leaq -0x151(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x9b10
movq -0x1d8(%rbp), %rdx
leaq 0x1f2fe(%rip), %rsi     # 0x6a6d1
leaq -0x150(%rbp), %rdi
callq 0xa780
jmp 0x4b3e1
movq -0x1e0(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x4da80
movq %rax, -0x1f0(%rbp)
jmp 0x4b3fd
movq -0x1f0(%rbp), %rdi
callq 0xcd40
movq %rax, %rdi
callq 0x92b0
movq %rax, -0x200(%rbp)
leaq -0x152(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x9b10
movq -0x200(%rbp), %rsi
movq -0x1f8(%rbp), %rdx
leaq -0x130(%rbp), %rdi
callq 0xa780
jmp 0x4b447
leaq -0x130(%rbp), %rdi
callq 0x31db0
movb %al, -0x201(%rbp)
jmp 0x4b45b
movb -0x201(%rbp), %al
xorb $-0x1, %al
movb %al, -0x202(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x9c98
leaq -0x152(%rbp), %rdi
callq 0x9700
leaq -0x150(%rbp), %rdi
callq 0x9c98
leaq -0x151(%rbp), %rdi
callq 0x9700
movb -0x202(%rbp), %al
testb $0x1, %al
jne 0x4b4a8
jmp 0x4b5e0
movl $0x10, %edi
callq 0x9340
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x210(%rbp)
leaq 0x21e1d(%rip), %rsi     # 0x6d2e3
callq 0x9be0
jmp 0x4b4cd
movq -0x210(%rbp), %rdi
movq 0x43aed(%rip), %rsi     # 0x8efc8
movq 0x43ad6(%rip), %rdx     # 0x8efb8
callq 0x9aa0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4b54d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4b541
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4b529
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x9c98
leaq -0x109(%rbp), %rdi
callq 0x9700
leaq -0xc0(%rbp), %rdi
callq 0x9c98
leaq -0xe0(%rbp), %rdi
callq 0x9c98
leaq -0xe1(%rbp), %rdi
callq 0x9700
jmp 0x4b5eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4b5b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4b5ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4b5a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x9c98
leaq -0x152(%rbp), %rdi
callq 0x9700
leaq -0x150(%rbp), %rdi
callq 0x9c98
leaq -0x151(%rbp), %rdi
callq 0x9700
jmp 0x4b5eb
movq -0x210(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0x94c0
jmp 0x4b5eb
jmp 0x4b5e2
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x9af0
nopw %cs:(%rax,%rax)