// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r15
leaq 0xc8d7(%rip), %rax      # 0x21b78
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
leaq 0x18(%rdi), %rax
movq %rax, 0x10(%rsp)
movq %rax, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
leaq 0x28(%rdi), %r14
leaq 0x38(%rdi), %r13
movq %r13, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movb %al, 0x38(%rdi)
leaq 0xd1e8(%rip), %rdi      # 0x224c0
movl %edx, %esi
callq 0x67ba
testb %al, %al
je 0x1540c
movl $0x0, 0x50(%r15)
movq $0x0, 0x48(%r15)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5250
leaq 0xd2a7(%rip), %rsi      # 0x225b0
leaq 0x18(%rsp), %rdi
leaq 0xc(%rsp), %rcx
movq %rbx, %rdx
callq 0x10494
leaq 0x18(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x54a0
movq (%r12), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x15346
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x53f0
movl 0xc(%rsp), %eax
cmpq $0x3, %rax
ja 0x153ef
leaq 0x3949(%rip), %rcx      # 0x18ca4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xa8, %edi
callq 0x53e0
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xe7b4
jmp 0x153e9
movl $0xd0, %edi
callq 0x53e0
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0xdf94
jmp 0x153e9
movl $0xd0, %edi
callq 0x53e0
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl $0x1, %ecx
movl $0x1, %r8d
callq 0xdf94
jmp 0x153e9
movl $0xa8, %edi
callq 0x53e0
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xb410
movq %r12, 0x48(%r15)
jmp 0x153f3
movq 0x48(%r15), %r12
movq (%r12), %rax
movq %r12, %rdi
callq *0x10(%rax)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x5200
leaq 0xc793(%rip), %rcx      # 0x21bb0
movq %rcx, (%rax)
movl %ebp, 0x8(%rax)
leaq 0xc6d6(%rip), %rsi      # 0x21b00
leaq -0x1837(%rip), %rdx     # 0x13bfa
movq %rax, %rdi
callq 0x56f0
jmp 0x1543b
movq %rax, %r15
movl $0xa8, %esi
jmp 0x1544f
jmp 0x15447
movq %rax, %r15
movl $0xd0, %esi
movq %r12, %rdi
callq 0x53f0
jmp 0x15460
jmp 0x1545d
jmp 0x1545d
movq %rax, %r15
movq (%r14), %rdi
cmpq %r13, %rdi
je 0x15474
movq (%r13), %rsi
incq %rsi
callq 0x53f0
movq (%rbx), %rdi
cmpq 0x10(%rsp), %rdi
je 0x1548e
movq 0x10(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x53f0
movq %r15, %rdi
callq 0x5720