// File: /workspace/github_cpp_makefile_star2_O1/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 0x14d42
movq %r15, %rdi
callq 0x15000
movl (%rax), %eax
testl %eax, %eax
je 0x13e79
cmpl $0x1, %eax
je 0x13e57
cmpl $0x2, %eax
jne 0x13eb4
movl $0x58, %edi
callq 0x53e0
movq %rax, %r13
movq %r15, %rdi
callq 0x15004
movq %r13, %rdi
movq %rax, %rsi
callq 0x16124
jmp 0x13ece
movl $0x58, %edi
callq 0x53e0
movq %rax, %r13
movq %r15, %rdi
callq 0x15004
movq %r13, %rdi
movq %rax, %rsi
callq 0x15dc0
jmp 0x13ece
movl $0x58, %edi
callq 0x53e0
movq %rax, %r13
movq %r15, %rdi
callq 0x15004
movq %r13, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x15290
leaq 0xdd66(%rip), %rax      # 0x21c08
addq $0x10, %rax
movq %rax, (%r13)
movl $0xc8, 0x50(%r13)
jmp 0x13ece
movl $0x58, %edi
callq 0x53e0
movq %rax, %r13
movq %rax, %rdi
movl $0x1f5, %esi            # imm = 0x1F5
callq 0x155ac
movq %r13, 0x98(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x13ee5
jmp 0x13ee5
jmp 0x13ee5
movq %rdx, %r12
movq %rax, %r14
movl $0x58, %esi
movq %r13, %rdi
callq 0x53f0
jmp 0x13f00
movq %rdx, %r12
movq %rax, %r14
cmpl $0x8, %r12d
jne 0x13f52
movq %r14, %rdi
callq 0x51e0
leaq 0xe6b3(%rip), %rdi      # 0x225c8
movl $0x7, %esi
movq %rax, %rdx
callq 0x14a78
movq %r15, %rdi
callq 0x15000
cmpl $0x3, (%rax)
jne 0x13fd4
movl $0x58, %edi
callq 0x53e0
movq %rax, %r15
movq %rax, %rdi
movl $0x1f5, %esi            # imm = 0x1F5
callq 0x155ac
jmp 0x14131
cmpl $0x7, %r12d
jne 0x13f93
movq %r14, %rdi
callq 0x51e0
leaq 0xe661(%rip), %rdi      # 0x225c8
movl $0x7, %esi
movq %rax, %rdx
callq 0x14978
movl $0x58, %edi
callq 0x53e0
movq %rax, %r15
movq %rax, %rdi
movl $0x195, %esi            # imm = 0x195
callq 0x155ac
jmp 0x14131
cmpl $0x6, %r12d
jne 0x13ff3
movq %r14, %rdi
callq 0x51e0
leaq 0xe620(%rip), %rdi      # 0x225c8
movl $0x7, %esi
movq %rax, %rdx
callq 0x14878
movl $0x58, %edi
callq 0x53e0
movq %rax, %r15
movq %rax, %rdi
movl $0x194, %esi            # imm = 0x194
callq 0x155ac
jmp 0x14131
movl $0x58, %edi
callq 0x53e0
movq %rax, %r15
movq %rax, %rdi
movl $0x190, %esi            # imm = 0x190
callq 0x155ac
jmp 0x14131
cmpl $0x5, %r12d
jne 0x14034
movq %r14, %rdi
callq 0x51e0
leaq 0xe5c0(%rip), %rdi      # 0x225c8
movl $0x7, %esi
movq %rax, %rdx
callq 0x14778
movl $0x58, %edi
callq 0x53e0
movq %rax, %r15
movq %rax, %rdi
movl $0x199, %esi            # imm = 0x199
callq 0x155ac
jmp 0x14131
cmpl $0x4, %r12d
jne 0x14075
movq %r14, %rdi
callq 0x51e0
leaq 0xe57f(%rip), %rdi      # 0x225c8
movl $0x7, %esi
movq %rax, %rdx
callq 0x14678
movl $0x58, %edi
callq 0x53e0
movq %rax, %r15
movq %rax, %rdi
movl $0x193, %esi            # imm = 0x193
callq 0x155ac
jmp 0x14131
cmpl $0x3, %r12d
jne 0x140b3
movq %r14, %rdi
callq 0x51e0
leaq 0xe53e(%rip), %rdi      # 0x225c8
movl $0x7, %esi
movq %rax, %rdx
callq 0x14578
movl $0x58, %edi
callq 0x53e0
movq %rax, %r15
movq %rax, %rdi
movl $0x1f7, %esi            # imm = 0x1F7
callq 0x155ac
jmp 0x14131
cmpl $0x2, %r12d
jne 0x140f1
movq %r14, %rdi
callq 0x51e0
leaq 0xe500(%rip), %rdi      # 0x225c8
movl $0x7, %esi
movq %rax, %rdx
callq 0x14478
movl $0x58, %edi
callq 0x53e0
movq %rax, %r15
movq %rax, %rdi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x155ac
jmp 0x14131
cmpl $0x1, %r12d
jne 0x1422f
movq %r14, %rdi
callq 0x51e0
leaq 0xe4be(%rip), %rdi      # 0x225c8
movl $0x1, %esi
movq %rax, %rdx
callq 0x14378
movl $0x58, %edi
callq 0x53e0
movq %rax, %r15
movq %rax, %rdi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x155ac
movq %r15, 0x98(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x56b0
movq %rax, %r14
movl $0x58, %esi
movq %r15, %rdi
callq 0x53f0
jmp 0x1416d
movq %rax, %r14
movl $0x58, %esi
movq %r15, %rdi
callq 0x53f0
jmp 0x1417a
movq %rax, %r14
callq 0x56b0
jmp 0x1422f
movq %rax, %r14
callq 0x56b0
jmp 0x1422f
movq %rax, %r14
movl $0x58, %esi
movq %r15, %rdi
callq 0x53f0
jmp 0x14199
movq %rax, %r14
callq 0x56b0
jmp 0x1422f
movq %rax, %r14
movl $0x58, %esi
movq %r15, %rdi
callq 0x53f0
jmp 0x141b8
movq %rax, %r14
callq 0x56b0
jmp 0x1422f
movq %rax, %r14
movl $0x58, %esi
movq %r15, %rdi
callq 0x53f0
jmp 0x141d4
movq %rax, %r14
callq 0x56b0
jmp 0x1422f
movq %rax, %r14
movl $0x58, %esi
movq %r15, %rdi
callq 0x53f0
jmp 0x141f2
jmp 0x1420b
movq %rax, %r14
callq 0x56b0
jmp 0x1422f
movq %rax, %r14
movl $0x58, %esi
movq %r15, %rdi
callq 0x53f0
jmp 0x14220
movq %rax, %r14
movl $0x58, %esi
movq %r15, %rdi
callq 0x53f0
jmp 0x1422a
movq %rax, %r14
callq 0x56b0
jmp 0x1422f
movq %rax, %r14
callq 0x56b0
movq %r14, %rdi
callq 0x5730
movq %rax, %rdi
callq 0x7db2
nop