// File: metopa[P]HTTP_Server/src/requests/response_generators/CAbstractGenerator.cpp
// Function: CAbstractGenerator::CAbstractGenerator(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, EMethodType)
CAbstractGenerator::CAbstractGenerator( const string& resource, EMethodType method ) {
	if ( !config.checkMethod( method ) )
		throw MethodProhibitedException( method );
	code_m = 0;
	content_m = nullptr;
	resource_m = resource;
	EFileType ft;
	realPath_m = pathResolver.resolve( resource_m, ft );
	switch ( ft ) {
		case FT_REGULAR:
			content_m = new CFileContent( resource_m, realPath_m );
			break;
		case FT_DIRECTORY:
			content_m = new CDirContent( resource_m, realPath_m );
			break;
		case FT_EXECUTABLE:
			content_m = new CExternalContent( resource_m, realPath_m, false );
			break;
		case FT_SCRIPT:
			content_m = new CExternalContent( resource_m, realPath_m, true );
			break;
	}

	content_m->load();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x60(%rbp)
leaq 0x16afb(%rip), %rax     # 0x3eb50
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, -0x68(%rbp)
callq 0x6730
movq -0x60(%rbp), %rdi
addq $0x28, %rdi
movq %rdi, -0x58(%rbp)
callq 0x6730
movl -0x14(%rbp), %esi
leaq 0x17560(%rip), %rdi     # 0x3f5e0
callq 0x84b0
movb %al, -0x49(%rbp)
jmp 0x2808a
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x280f9
jmp 0x28093
movl $0x10, %edi
callq 0x6280
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x70(%rbp)
leaq -0x14(%rbp), %rsi
callq 0x28430
jmp 0x280b2
movq -0x70(%rbp), %rdi
leaq 0x16a43(%rip), %rsi     # 0x3eb00
leaq 0x3ac(%rip), %rdx       # 0x28470
callq 0x68e0
jmp 0x28356
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x2833b
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x63b0
jmp 0x2833b
movq -0x60(%rbp), %rdi
movl $0x0, 0x50(%rdi)
movq $0x0, 0x48(%rdi)
movq -0x10(%rbp), %rsi
addq $0x8, %rdi
callq 0x6070
jmp 0x2811b
movq -0x60(%rbp), %rdx
addq $0x8, %rdx
leaq 0x175a6(%rip), %rsi     # 0x3f6d0
leaq -0x48(%rbp), %rdi
leaq -0x28(%rbp), %rcx
callq 0x1f620
jmp 0x28139
movq -0x60(%rbp), %rdi
addq $0x28, %rdi
leaq -0x48(%rbp), %rsi
movq %rsi, -0x80(%rbp)
callq 0x6600
movq -0x80(%rbp), %rdi
callq 0x6310
movl -0x28(%rbp), %eax
movq %rax, -0x78(%rbp)
subq $0x3, %rax
ja 0x2831f
movq -0x78(%rbp), %rax
leaq 0x4b31(%rip), %rcx      # 0x2cca4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xa8, %edi
callq 0x64d0
movq %rax, -0x88(%rbp)
jmp 0x2818f
movq -0x88(%rbp), %rdi
movq -0x60(%rbp), %rdx
movq %rdx, %rsi
addq $0x8, %rsi
addq $0x28, %rdx
callq 0x1cfe0
jmp 0x281ac
movq -0x60(%rbp), %rax
movq -0x88(%rbp), %rcx
movq %rcx, 0x48(%rax)
jmp 0x2831f
movq -0x88(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0xa8, %esi
callq 0x64e0
jmp 0x2833b
movl $0xa8, %edi
callq 0x64d0
movq %rax, -0x90(%rbp)
jmp 0x281f5
movq -0x90(%rbp), %rdi
movq -0x60(%rbp), %rdx
movq %rdx, %rsi
addq $0x8, %rsi
addq $0x28, %rdx
callq 0x15c10
jmp 0x28212
movq -0x60(%rbp), %rax
movq -0x90(%rbp), %rcx
movq %rcx, 0x48(%rax)
jmp 0x2831f
movq -0x90(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0xa8, %esi
callq 0x64e0
jmp 0x2833b
movl $0xd0, %edi
callq 0x64d0
movq %rax, -0x98(%rbp)
jmp 0x2825b
movq -0x98(%rbp), %rdi
movq -0x60(%rbp), %rdx
movq %rdx, %rsi
addq $0x8, %rsi
addq $0x28, %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x1c0d0
jmp 0x28280
movq -0x60(%rbp), %rax
movq -0x98(%rbp), %rcx
movq %rcx, 0x48(%rax)
jmp 0x2831f
movq -0x98(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0xd0, %esi
callq 0x64e0
jmp 0x2833b
movl $0xd0, %edi
callq 0x64d0
movq %rax, -0xa0(%rbp)
jmp 0x282c9
movq -0xa0(%rbp), %rdi
movq -0x60(%rbp), %rdx
movq %rdx, %rsi
addq $0x8, %rsi
addq $0x28, %rdx
movl $0x1, %r8d
movl %r8d, %ecx
callq 0x1c0d0
jmp 0x282ef
movq -0x60(%rbp), %rax
movq -0xa0(%rbp), %rcx
movq %rcx, 0x48(%rax)
jmp 0x2831f
movq -0xa0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0xd0, %esi
callq 0x64e0
jmp 0x2833b
movq -0x60(%rbp), %rax
movq 0x48(%rax), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
jmp 0x28332
addq $0xa0, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x6310
movq -0x68(%rbp), %rdi
callq 0x6310
movq -0x20(%rbp), %rdi
callq 0x6920
nopw %cs:(%rax,%rax)