// File: 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 %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
callq 0x60a0
movq -0x68(%rbp), %rsi
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, 0x48(%rsi)
movq %rsi, %rdi
addq $0x50, %rdi
addq $0x8, %rsi
callq 0x27800
jmp 0x262de
movq -0x68(%rbp), %rdi
addq $0x50, %rdi
callq 0x27cb0
movq %rax, -0x70(%rbp)
jmp 0x262f1
movq -0x70(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x74(%rbp)
testl %eax, %eax
je 0x26330
jmp 0x26300
movl -0x74(%rbp), %eax
subl $0x1, %eax
je 0x2639b
jmp 0x2630e
movl -0x74(%rbp), %eax
subl $0x2, %eax
je 0x26412
jmp 0x26483
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x264dd
movl $0x58, %edi
callq 0x64d0
movq %rax, -0x80(%rbp)
jmp 0x26340
movq -0x68(%rbp), %rdi
addq $0x50, %rdi
callq 0x27cc0
movq %rax, -0x88(%rbp)
jmp 0x26356
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdi
callq 0x26cb0
jmp 0x26368
movq -0x68(%rbp), %rax
movq -0x80(%rbp), %rcx
movq %rcx, 0x98(%rax)
jmp 0x264bb
movq -0x80(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x58, %esi
callq 0x64e0
jmp 0x264dd
movl $0x58, %edi
callq 0x64d0
movq %rax, -0x90(%rbp)
jmp 0x263ae
movq -0x68(%rbp), %rdi
addq $0x50, %rdi
callq 0x27cc0
movq %rax, -0x98(%rbp)
jmp 0x263c4
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdi
callq 0x28ed0
jmp 0x263d9
movq -0x68(%rbp), %rax
movq -0x90(%rbp), %rcx
movq %rcx, 0x98(%rax)
jmp 0x264bb
movq -0x90(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x58, %esi
callq 0x64e0
jmp 0x264dd
movl $0x58, %edi
callq 0x64d0
movq %rax, -0xa0(%rbp)
jmp 0x26425
movq -0x68(%rbp), %rdi
addq $0x50, %rdi
callq 0x27cc0
movq %rax, -0xa8(%rbp)
jmp 0x2643b
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdi
callq 0x29210
jmp 0x26450
movq -0x68(%rbp), %rax
movq -0xa0(%rbp), %rcx
movq %rcx, 0x98(%rax)
jmp 0x264bb
movq -0xa0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x58, %esi
callq 0x64e0
jmp 0x264dd
movl $0x58, %edi
callq 0x64d0
movq %rax, -0xb0(%rbp)
jmp 0x26496
movq -0xb0(%rbp), %rdi
movl $0x1f5, %esi            # imm = 0x1F5
callq 0x28520
jmp 0x264a9
movq -0x68(%rbp), %rax
movq -0xb0(%rbp), %rcx
movq %rcx, 0x98(%rax)
jmp 0x26ac0
movq -0xb0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x58, %esi
callq 0x64e0
movl -0x1c(%rbp), %eax
movl %eax, -0xb4(%rbp)
movl $0x8, %ecx
cmpl %ecx, %eax
jne 0x2657a
movq -0x18(%rbp), %rdi
callq 0x6230
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdx
leaq 0x191d5(%rip), %rdi     # 0x3f6e0
movl $0x7, %esi
callq 0x27240
jmp 0x26517
movq -0x68(%rbp), %rdi
addq $0x50, %rdi
callq 0x27cb0
movq %rax, -0xc0(%rbp)
jmp 0x2652d
movq -0xc0(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x26a62
movl $0x58, %edi
callq 0x64d0
movq %rax, -0xc8(%rbp)
jmp 0x26550
movq -0xc8(%rbp), %rdi
movl $0x1f5, %esi            # imm = 0x1F5
callq 0x28520
jmp 0x26563
movq -0x68(%rbp), %rax
movq -0xc8(%rbp), %rcx
movq %rcx, 0x98(%rax)
jmp 0x26abb
movl -0xb4(%rbp), %eax
movl $0x7, %ecx
cmpl %ecx, %eax
jne 0x265ef
movq -0x18(%rbp), %rdi
callq 0x6230
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdx
leaq 0x1913f(%rip), %rdi     # 0x3f6e0
movl $0x7, %esi
callq 0x27180
jmp 0x265ad
movl $0x58, %edi
callq 0x64d0
movq %rax, -0xd0(%rbp)
jmp 0x265c0
movq -0xd0(%rbp), %rdi
movl $0x195, %esi            # imm = 0x195
callq 0x28520
jmp 0x265d3
movq -0x68(%rbp), %rax
movq -0xd0(%rbp), %rcx
movq %rcx, 0x98(%rax)
callq 0x6880
jmp 0x26ac0
movl -0xb4(%rbp), %eax
movl $0x6, %ecx
cmpl %ecx, %eax
jne 0x26664
movq -0x18(%rbp), %rdi
callq 0x6230
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdx
leaq 0x190ca(%rip), %rdi     # 0x3f6e0
movl $0x7, %esi
callq 0x270c0
jmp 0x26622
movl $0x58, %edi
callq 0x64d0
movq %rax, -0xd8(%rbp)
jmp 0x26635
movq -0xd8(%rbp), %rdi
movl $0x194, %esi            # imm = 0x194
callq 0x28520
jmp 0x26648
movq -0x68(%rbp), %rax
movq -0xd8(%rbp), %rcx
movq %rcx, 0x98(%rax)
callq 0x6880
jmp 0x26ac0
movl -0xb4(%rbp), %eax
movl $0x5, %ecx
cmpl %ecx, %eax
jne 0x266d9
movq -0x18(%rbp), %rdi
callq 0x6230
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdx
leaq 0x19055(%rip), %rdi     # 0x3f6e0
movl $0x7, %esi
callq 0x27000
jmp 0x26697
movl $0x58, %edi
callq 0x64d0
movq %rax, -0xe0(%rbp)
jmp 0x266aa
movq -0xe0(%rbp), %rdi
movl $0x199, %esi            # imm = 0x199
callq 0x28520
jmp 0x266bd
movq -0x68(%rbp), %rax
movq -0xe0(%rbp), %rcx
movq %rcx, 0x98(%rax)
callq 0x6880
jmp 0x26ac0
movl -0xb4(%rbp), %eax
movl $0x4, %ecx
cmpl %ecx, %eax
jne 0x2674e
movq -0x18(%rbp), %rdi
callq 0x6230
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdx
leaq 0x18fe0(%rip), %rdi     # 0x3f6e0
movl $0x7, %esi
callq 0x26f40
jmp 0x2670c
movl $0x58, %edi
callq 0x64d0
movq %rax, -0xe8(%rbp)
jmp 0x2671f
movq -0xe8(%rbp), %rdi
movl $0x193, %esi            # imm = 0x193
callq 0x28520
jmp 0x26732
movq -0x68(%rbp), %rax
movq -0xe8(%rbp), %rcx
movq %rcx, 0x98(%rax)
callq 0x6880
jmp 0x26ac0
movl -0xb4(%rbp), %eax
movl $0x3, %ecx
cmpl %ecx, %eax
jne 0x267c3
movq -0x18(%rbp), %rdi
callq 0x6230
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdx
leaq 0x18f6b(%rip), %rdi     # 0x3f6e0
movl $0x7, %esi
callq 0x26e80
jmp 0x26781
movl $0x58, %edi
callq 0x64d0
movq %rax, -0xf0(%rbp)
jmp 0x26794
movq -0xf0(%rbp), %rdi
movl $0x1f7, %esi            # imm = 0x1F7
callq 0x28520
jmp 0x267a7
movq -0x68(%rbp), %rax
movq -0xf0(%rbp), %rcx
movq %rcx, 0x98(%rax)
callq 0x6880
jmp 0x26ac0
movl -0xb4(%rbp), %eax
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0x26838
movq -0x18(%rbp), %rdi
callq 0x6230
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdx
leaq 0x18ef6(%rip), %rdi     # 0x3f6e0
movl $0x7, %esi
callq 0x26dc0
jmp 0x267f6
movl $0x58, %edi
callq 0x64d0
movq %rax, -0xf8(%rbp)
jmp 0x26809
movq -0xf8(%rbp), %rdi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x28520
jmp 0x2681c
movq -0x68(%rbp), %rax
movq -0xf8(%rbp), %rcx
movq %rcx, 0x98(%rax)
callq 0x6880
jmp 0x26ac0
movl -0xb4(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x26ad2
movq -0x18(%rbp), %rdi
callq 0x6230
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdx
leaq 0x18e7d(%rip), %rdi     # 0x3f6e0
movl $0x1, %esi
callq 0x26d00
jmp 0x2686f
movl $0x58, %edi
callq 0x64d0
movq %rax, -0x100(%rbp)
jmp 0x26882
movq -0x100(%rbp), %rdi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x28520
jmp 0x26895
movq -0x68(%rbp), %rax
movq -0x100(%rbp), %rcx
movq %rcx, 0x98(%rax)
callq 0x6880
jmp 0x26ac0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x268dc
movq -0x100(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x58, %esi
callq 0x64e0
callq 0x6880
jmp 0x268e3
jmp 0x26ad2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x26913
movq -0xf8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x58, %esi
callq 0x64e0
callq 0x6880
jmp 0x2691a
jmp 0x26ad2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x2694a
movq -0xf0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x58, %esi
callq 0x64e0
callq 0x6880
jmp 0x26951
jmp 0x26ad2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x26981
movq -0xe8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x58, %esi
callq 0x64e0
callq 0x6880
jmp 0x26988
jmp 0x26ad2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x269b8
movq -0xe0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x58, %esi
callq 0x64e0
callq 0x6880
jmp 0x269bf
jmp 0x26ad2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x269ef
movq -0xd8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x58, %esi
callq 0x64e0
callq 0x6880
jmp 0x269f6
jmp 0x26ad2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x26a26
movq -0xd0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x58, %esi
callq 0x64e0
callq 0x6880
jmp 0x26a2d
jmp 0x26ad2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x26ac9
movq -0xc8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x58, %esi
callq 0x64e0
jmp 0x26ac9
movl $0x58, %edi
callq 0x64d0
movq %rax, -0x108(%rbp)
jmp 0x26a75
movq -0x108(%rbp), %rdi
movl $0x190, %esi            # imm = 0x190
callq 0x28520
jmp 0x26a88
movq -0x68(%rbp), %rax
movq -0x108(%rbp), %rcx
movq %rcx, 0x98(%rax)
jmp 0x26abb
movq -0x108(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x58, %esi
callq 0x64e0
jmp 0x26ac9
callq 0x6880
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
callq 0x6880
jmp 0x26ad0
jmp 0x26ad2
movq -0x18(%rbp), %rdi
callq 0x6920
movq %rax, %rdi
callq 0xb060
nopw %cs:(%rax,%rax)