// File: /workspace/github_cpp_makefile_star2_O3/metopa[P]HTTP_Server/src/requests/CRequest.cpp
// Function: CRequest::parse()
void CRequest::parse() {
	clock_m = high_resolution_clock::now();
	try {
		parser_m.parse( inputMsg_m );
		switch ( parser_m.getType() ) {
			case RT_GET:
				generator_m = new CGetGenerator( parser_m.getResource() );
				break;
			case RT_HEAD:
				generator_m = new CHeadGenerator( parser_m.getResource() );
				break;
			case RT_OPTIONS:
				generator_m = new COptionsGenerator( parser_m.getResource() );
				break;
			default:
				generator_m = new CErrorGenerator( 501 ); //Not Implemented
		}
	}
	catch ( RequestParserException& e ) {
		Log.ger<>( DEBUG_REQUEST, e );
		if ( parser_m.getType() == RT_UNSUPPORTED )
			generator_m = new CErrorGenerator( 501 ); //Not Implemented
		else
			generator_m = new CErrorGenerator( 400 ); //Bad Request
	}

	catch ( MethodProhibitedException& e ) {
		Log.ger<>( DEBUG_REQUEST, e );
		generator_m = new CErrorGenerator( 405 ); //Method Not Allowed
	}

	catch ( FileNotFoundException& e ) {
		Log.ger<>( DEBUG_REQUEST, e );
		generator_m = new CErrorGenerator( 404 ); //Not Found
	}

	catch ( FileErrorException& e ) {
		Log.ger<>( DEBUG_REQUEST, e );
		generator_m = new CErrorGenerator( 409 ); //Conflict
	}

	catch ( PermissionDeniedException& e ) {
		Log.ger<>( DEBUG_REQUEST, e );
		generator_m = new CErrorGenerator( 403 ); //Forbidden
	}

	catch ( ServiceUnavailableException& e ) {
		Log.ger<>( DEBUG_REQUEST, e );
		generator_m = new CErrorGenerator( 503 ); //Service unavailable
	}

	catch ( InternalErrorException& e ) {
		Log.ger<>( DEBUG_REQUEST, e );
		generator_m = new CErrorGenerator( 500 ); //Internal Server Error
	}

	catch ( GeneralException& e ) {
		Log.ger<GeneralException&>( CRITICAL, e );
		generator_m = new CErrorGenerator( 500 ); //Internal Server Error
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x5080
movq %rax, 0x48(%rbx)
leaq 0x50(%rbx), %r15
leaq 0x8(%rbx), %rsi
movq %r15, %rdi
callq 0x14d22
movq %r15, %rdi
callq 0x14ff4
movl (%rax), %eax
testl %eax, %eax
je 0x13e59
cmpl $0x1, %eax
je 0x13e37
cmpl $0x2, %eax
jne 0x13e94
movl $0x58, %edi
callq 0x53e0
movq %rax, %r13
movq %r15, %rdi
callq 0x14ff8
movq %r13, %rdi
movq %rax, %rsi
callq 0x16124
jmp 0x13eae
movl $0x58, %edi
callq 0x53e0
movq %rax, %r13
movq %r15, %rdi
callq 0x14ff8
movq %r13, %rdi
movq %rax, %rsi
callq 0x15dc0
jmp 0x13eae
movl $0x58, %edi
callq 0x53e0
movq %rax, %r13
movq %r15, %rdi
callq 0x14ff8
movq %r13, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x15284
leaq 0xdd86(%rip), %rax      # 0x21c08
addq $0x10, %rax
movq %rax, (%r13)
movl $0xc8, 0x50(%r13)
jmp 0x13eae
movl $0x58, %edi
callq 0x53e0
movq %rax, %r13
movq %rax, %rdi
movl $0x1f5, %esi            # imm = 0x1F5
callq 0x155a8
movq %r13, 0x98(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x13ec5
jmp 0x13ec5
jmp 0x13ec5
movq %rdx, %r12
movq %rax, %r14
movl $0x58, %esi
movq %r13, %rdi
callq 0x53f0
jmp 0x13ee0
movq %rdx, %r12
movq %rax, %r14
cmpl $0x8, %r12d
jne 0x13f32
movq %r14, %rdi
callq 0x51e0
leaq 0xe6cb(%rip), %rdi      # 0x225c0
movl $0x7, %esi
movq %rax, %rdx
callq 0x14a58
movq %r15, %rdi
callq 0x14ff4
cmpl $0x3, (%rax)
jne 0x13fb4
movl $0x58, %edi
callq 0x53e0
movq %rax, %r15
movq %rax, %rdi
movl $0x1f5, %esi            # imm = 0x1F5
callq 0x155a8
jmp 0x14111
cmpl $0x7, %r12d
jne 0x13f73
movq %r14, %rdi
callq 0x51e0
leaq 0xe679(%rip), %rdi      # 0x225c0
movl $0x7, %esi
movq %rax, %rdx
callq 0x14958
movl $0x58, %edi
callq 0x53e0
movq %rax, %r15
movq %rax, %rdi
movl $0x195, %esi            # imm = 0x195
callq 0x155a8
jmp 0x14111
cmpl $0x6, %r12d
jne 0x13fd3
movq %r14, %rdi
callq 0x51e0
leaq 0xe638(%rip), %rdi      # 0x225c0
movl $0x7, %esi
movq %rax, %rdx
callq 0x14858
movl $0x58, %edi
callq 0x53e0
movq %rax, %r15
movq %rax, %rdi
movl $0x194, %esi            # imm = 0x194
callq 0x155a8
jmp 0x14111
movl $0x58, %edi
callq 0x53e0
movq %rax, %r15
movq %rax, %rdi
movl $0x190, %esi            # imm = 0x190
callq 0x155a8
jmp 0x14111
cmpl $0x5, %r12d
jne 0x14014
movq %r14, %rdi
callq 0x51e0
leaq 0xe5d8(%rip), %rdi      # 0x225c0
movl $0x7, %esi
movq %rax, %rdx
callq 0x14758
movl $0x58, %edi
callq 0x53e0
movq %rax, %r15
movq %rax, %rdi
movl $0x199, %esi            # imm = 0x199
callq 0x155a8
jmp 0x14111
cmpl $0x4, %r12d
jne 0x14055
movq %r14, %rdi
callq 0x51e0
leaq 0xe597(%rip), %rdi      # 0x225c0
movl $0x7, %esi
movq %rax, %rdx
callq 0x14658
movl $0x58, %edi
callq 0x53e0
movq %rax, %r15
movq %rax, %rdi
movl $0x193, %esi            # imm = 0x193
callq 0x155a8
jmp 0x14111
cmpl $0x3, %r12d
jne 0x14093
movq %r14, %rdi
callq 0x51e0
leaq 0xe556(%rip), %rdi      # 0x225c0
movl $0x7, %esi
movq %rax, %rdx
callq 0x14558
movl $0x58, %edi
callq 0x53e0
movq %rax, %r15
movq %rax, %rdi
movl $0x1f7, %esi            # imm = 0x1F7
callq 0x155a8
jmp 0x14111
cmpl $0x2, %r12d
jne 0x140d1
movq %r14, %rdi
callq 0x51e0
leaq 0xe518(%rip), %rdi      # 0x225c0
movl $0x7, %esi
movq %rax, %rdx
callq 0x14458
movl $0x58, %edi
callq 0x53e0
movq %rax, %r15
movq %rax, %rdi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x155a8
jmp 0x14111
cmpl $0x1, %r12d
jne 0x1420f
movq %r14, %rdi
callq 0x51e0
leaq 0xe4d6(%rip), %rdi      # 0x225c0
movl $0x1, %esi
movq %rax, %rdx
callq 0x14358
movl $0x58, %edi
callq 0x53e0
movq %rax, %r15
movq %rax, %rdi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x155a8
movq %r15, 0x98(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x56a0
movq %rax, %r14
movl $0x58, %esi
movq %r15, %rdi
callq 0x53f0
jmp 0x1414d
movq %rax, %r14
movl $0x58, %esi
movq %r15, %rdi
callq 0x53f0
jmp 0x1415a
movq %rax, %r14
callq 0x56a0
jmp 0x1420f
movq %rax, %r14
callq 0x56a0
jmp 0x1420f
movq %rax, %r14
movl $0x58, %esi
movq %r15, %rdi
callq 0x53f0
jmp 0x14179
movq %rax, %r14
callq 0x56a0
jmp 0x1420f
movq %rax, %r14
movl $0x58, %esi
movq %r15, %rdi
callq 0x53f0
jmp 0x14198
movq %rax, %r14
callq 0x56a0
jmp 0x1420f
movq %rax, %r14
movl $0x58, %esi
movq %r15, %rdi
callq 0x53f0
jmp 0x141b4
movq %rax, %r14
callq 0x56a0
jmp 0x1420f
movq %rax, %r14
movl $0x58, %esi
movq %r15, %rdi
callq 0x53f0
jmp 0x141d2
jmp 0x141eb
movq %rax, %r14
callq 0x56a0
jmp 0x1420f
movq %rax, %r14
movl $0x58, %esi
movq %r15, %rdi
callq 0x53f0
jmp 0x14200
movq %rax, %r14
movl $0x58, %esi
movq %r15, %rdi
callq 0x53f0
jmp 0x1420a
movq %rax, %r14
callq 0x56a0
jmp 0x1420f
movq %rax, %r14
callq 0x56a0
movq %r14, %rdi
callq 0x5720
movq %rax, %rdi
callq 0x7cac
nop