// File: /workspace/github_cpp_makefile_star2_O1/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 0xc8cb(%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 0xd1e4(%rip), %rdi      # 0x224c8
movl %edx, %esi
callq 0x684e
testb %al, %al
je 0x15412
movl $0x0, 0x50(%r15)
movq $0x0, 0x48(%r15)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5250
leaq 0xd2a3(%rip), %rsi      # 0x225b8
leaq 0x18(%rsp), %rdi
leaq 0xc(%rsp), %rcx
movq %rbx, %rdx
callq 0x10514
leaq 0x18(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x54a0
movq (%r12), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x15352
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x53f0
movl 0xc(%rsp), %eax
cmpq $0x3, %rax
ja 0x153f9
leaq 0x393d(%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 0xe834
jmp 0x153f5
movl $0xd0, %edi
callq 0x53e0
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0xe014
jmp 0x153f5
movl $0xd0, %edi
callq 0x53e0
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl $0x1, %ecx
movl $0x1, %r8d
callq 0xe014
jmp 0x153f5
movl $0xa8, %edi
callq 0x53e0
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xb4f0
movq %r12, 0x48(%r15)
movq 0x48(%r15), %rdi
movq (%rdi), %rax
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 0xc78d(%rip), %rcx      # 0x21bb0
movq %rcx, (%rax)
movl %ebp, 0x8(%rax)
leaq 0xc6d0(%rip), %rsi      # 0x21b00
leaq -0x181f(%rip), %rdx     # 0x13c18
movq %rax, %rdi
callq 0x5700
jmp 0x15441
movq %rax, %r15
movl $0xa8, %esi
jmp 0x15455
jmp 0x1544d
movq %rax, %r15
movl $0xd0, %esi
movq %r12, %rdi
callq 0x53f0
jmp 0x15466
jmp 0x15463
jmp 0x15463
movq %rax, %r15
movq (%r14), %rdi
cmpq %r13, %rdi
je 0x1547a
movq (%r13), %rsi
incq %rsi
callq 0x53f0
movq (%rbx), %rdi
cmpq 0x10(%rsp), %rdi
je 0x15494
movq 0x10(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x53f0
movq %r15, %rdi
callq 0x5730