// File: enbock[P]Warp10Server/warp10server/src/WebService.cpp
// Function: Warp10::WebService::onRequest(u::Object*)
void WebService::onRequest(Object* arg)
{
	Network::WebEvent* event  = ((Network::WebEvent*)arg);
	WebConnection* connection = ((WebConnection*)event->connection);

	connection->removeEventListener(
		WebEvent::REQUEST,
		Callback(this, cb_cast(&WebService::onRequest))
	);
	
	trace(
		this->className() + "::onRequest: Incoming request: " 
		+ "Method: '" + event->request.method
		+ "'\tResource: '" + event->request.resource + "'"
	);

	event->destroy();

	// DUMMY
	u::Network::Event close(u::Network::Event::CLOSE);
	connection->dispatchEvent(&close);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x288(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x280(%rbp)
movq $0x0, -0x80(%rbp)
movq $0x49, -0x88(%rbp)
movq -0x88(%rbp), %rdx
movq -0x80(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
leaq -0x78(%rbp), %rdi
movq %rdi, -0x278(%rbp)
callq 0x410a10
movq -0x280(%rbp), %rdi
movq -0x278(%rbp), %rdx
movq $0x667890, %rsi         # imm = 0x667890
callq 0x4126f0
jmp 0x40900c
leaq -0x78(%rbp), %rdi
callq 0x407e40
movq $0x668c60, %rdi         # imm = 0x668C60
leaq 0x1d206e(%rip), %rsi    # 0x5db091
callq 0x49dd60
movq %rax, -0x290(%rbp)
movb $0x0, -0x1b1(%rbp)
movb $0x0, -0x1b2(%rbp)
movb $0x0, -0x1b3(%rbp)
movb $0x0, -0x1b4(%rbp)
movb $0x0, -0x1b5(%rbp)
movb $0x0, -0x1b6(%rbp)
movb $0x0, -0x1b8(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0x40906b
jmp 0x40915e
movq -0x288(%rbp), %rsi
movq (%rsi), %rax
movq 0x8(%rax), %rax
leaq -0x1b0(%rbp), %rdi
callq *%rax
movb $0x1, -0x1b1(%rbp)
leaq -0x178(%rbp), %rsi
leaq 0x1d23b3(%rip), %rdx    # 0x5db44a
leaq -0x158(%rbp), %rdi
callq 0x405d00
jmp 0x4090a5
movb $0x1, -0x1b2(%rbp)
leaq 0x1d23b7(%rip), %rdx    # 0x5db46a
leaq -0x138(%rbp), %rdi
leaq -0x158(%rbp), %rsi
callq 0x405d00
jmp 0x4090c8
movb $0x1, -0x1b3(%rbp)
movq -0x18(%rbp), %rdx
addq $0xc0, %rdx
leaq -0x118(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x409520
jmp 0x4090ef
movb $0x1, -0x1b4(%rbp)
leaq 0x1d2377(%rip), %rdx    # 0x5db474
leaq -0xf8(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x405d00
jmp 0x409112
movb $0x1, -0x1b5(%rbp)
movq -0x18(%rbp), %rdx
addq $0x118, %rdx            # imm = 0x118
leaq -0xd8(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x409520
jmp 0x409139
movb $0x1, -0x1b6(%rbp)
leaq 0x1d232b(%rip), %rdx    # 0x5db472
leaq -0xb8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x405d00
jmp 0x40915c
jmp 0x409196
leaq -0x1b7(%rbp), %rdi
movq %rdi, -0x298(%rbp)
callq 0x435b90
movq -0x298(%rbp), %rdx
movb $0x1, -0x1b8(%rbp)
leaq 0x1f781c(%rip), %rsi    # 0x6009a2
leaq -0xb8(%rbp), %rdi
callq 0x407e60
jmp 0x409194
jmp 0x409196
movq -0x290(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x4b05e0
movq %rax, -0x2a0(%rbp)
jmp 0x4091b2
movq -0x2a0(%rbp), %rdi
leaq 0x1d1f10(%rip), %rsi    # 0x5db0d0
callq 0x49dd60
movq %rax, -0x2a8(%rbp)
jmp 0x4091ce
movq -0x2a8(%rbp), %rdi
movq $0x49d640, %rsi         # imm = 0x49D640
callq 0x49c850
jmp 0x4091e3
leaq -0xb8(%rbp), %rdi
callq 0x4adc60
testb $0x1, -0x1b8(%rbp)
jne 0x4091fa
jmp 0x409206
leaq -0x1b7(%rbp), %rdi
callq 0x435bb0
testb $0x1, -0x1b6(%rbp)
jne 0x409211
jmp 0x40921d
leaq -0xd8(%rbp), %rdi
callq 0x4adc60
testb $0x1, -0x1b5(%rbp)
jne 0x409228
jmp 0x409234
leaq -0xf8(%rbp), %rdi
callq 0x4adc60
testb $0x1, -0x1b4(%rbp)
jne 0x40923f
jmp 0x40924b
leaq -0x118(%rbp), %rdi
callq 0x4adc60
testb $0x1, -0x1b3(%rbp)
jne 0x409256
jmp 0x409262
leaq -0x138(%rbp), %rdi
callq 0x4adc60
testb $0x1, -0x1b2(%rbp)
jne 0x40926d
jmp 0x409279
leaq -0x158(%rbp), %rdi
callq 0x4adc60
testb $0x1, -0x1b1(%rbp)
jne 0x409284
jmp 0x409290
leaq -0x1b0(%rbp), %rdi
callq 0x405650
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
movq $0x667c28, %rsi         # imm = 0x667C28
leaq -0x270(%rbp), %rdi
movq %rdi, -0x2b0(%rbp)
callq 0x41fd30
movq -0x2b0(%rbp), %rsi
movq -0x20(%rbp), %rdi
callq 0x412820
jmp 0x4092c8
leaq -0x270(%rbp), %rdi
callq 0x41fee0
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x407e40
jmp 0x409480
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x409449
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x409430
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x409417
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x4093fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x4093e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x4093cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x4093b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x4adc60
testb $0x1, -0x1b8(%rbp)
jne 0x4093be
jmp 0x4093ca
leaq -0x1b7(%rbp), %rdi
callq 0x435bb0
jmp 0x4093cc
testb $0x1, -0x1b6(%rbp)
jne 0x4093d7
jmp 0x4093e3
leaq -0xd8(%rbp), %rdi
callq 0x4adc60
jmp 0x4093e5
testb $0x1, -0x1b5(%rbp)
jne 0x4093f0
jmp 0x4093fc
leaq -0xf8(%rbp), %rdi
callq 0x4adc60
jmp 0x4093fe
testb $0x1, -0x1b4(%rbp)
jne 0x409409
jmp 0x409415
leaq -0x118(%rbp), %rdi
callq 0x4adc60
jmp 0x409417
testb $0x1, -0x1b3(%rbp)
jne 0x409422
jmp 0x40942e
leaq -0x138(%rbp), %rdi
callq 0x4adc60
jmp 0x409430
testb $0x1, -0x1b2(%rbp)
jne 0x40943b
jmp 0x409447
leaq -0x158(%rbp), %rdi
callq 0x4adc60
jmp 0x409449
testb $0x1, -0x1b1(%rbp)
jne 0x409454
jmp 0x409460
leaq -0x1b0(%rbp), %rdi
callq 0x405650
jmp 0x409480
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x270(%rbp), %rdi
callq 0x41fee0
movq -0x90(%rbp), %rdi
callq 0x4deb40
nopl (%rax)