// File: /workspace/github_cpp_makefile_star2_O2/UTAP[P]APHTTP/examples/handlers.cpp
// Function: RandomNumberHandler::callback(Request*)
Response *RandomNumberHandler::callback(Request *req) {
  Response *res = new Response;
  res->setHeader("Content-Type", "text/html");
  string body;
  body += "<!DOCTYPE html>";
  body += "<html>";
  body += "<body style=\"text-align: center;\">";
  body += "<h1>AP HTTP</h1>";
  body += "<p>";
  body += "a random number in [1, 10] is: ";
  body += to_string(rand() % 10 + 1);
  body += "</p>";
  body += "<p>";
  body += "SeddionId: ";
  body += req->getSessionId();
  body += "</p>";
  body += "</body>";
  body += "</html>";
  res->setBody(body);
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rsi, %r14
pushq $0x78
popq %rdi
callq 0x4380
movq %rax, %rbx
movq %rax, %rdi
movl $0xc8, %esi
callq 0x6e8c
leaq 0xb253(%rip), %rsi      # 0x11157
leaq -0xb0(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x41a0
leaq 0xb249(%rip), %rsi      # 0x11164
leaq -0x90(%rbp), %rdi
leaq -0x50(%rbp), %rdx
callq 0x41a0
leaq -0xb0(%rbp), %rsi
leaq -0x90(%rbp), %rdx
movq %rbx, %rdi
callq 0x7d34
leaq -0x90(%rbp), %rdi
callq 0x4638
leaq -0xb0(%rbp), %rdi
callq 0x4638
leaq -0x20(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xb1fe(%rip), %rsi      # 0x1116e
leaq -0x30(%rbp), %rdi
callq 0x45d0
leaq 0xb1fe(%rip), %rsi      # 0x1117e
leaq -0x30(%rbp), %rdi
callq 0x45d0
leaq 0xb1f5(%rip), %rsi      # 0x11185
leaq -0x30(%rbp), %rdi
callq 0x45d0
leaq 0xb208(%rip), %rsi      # 0x111a8
leaq -0x30(%rbp), %rdi
callq 0x45d0
leaq 0xb209(%rip), %rsi      # 0x111b9
leaq -0x30(%rbp), %rdi
callq 0x45d0
leaq 0xb1fd(%rip), %rsi      # 0x111bd
leaq -0x30(%rbp), %rdi
callq 0x45d0
callq 0x4120
pushq $0xa
popq %rcx
cltd
idivl %ecx
leal 0x1(%rdx), %esi
leaq -0x50(%rbp), %rdi
callq 0x66a3
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x45f0
leaq -0x50(%rbp), %rdi
callq 0x4638
leaq 0xb1e0(%rip), %rsi      # 0x111dd
leaq -0x30(%rbp), %rdi
callq 0x45d0
leaq 0xb1ac(%rip), %rsi      # 0x111b9
leaq -0x30(%rbp), %rdi
callq 0x45d0
leaq 0xb1c5(%rip), %rsi      # 0x111e2
leaq -0x30(%rbp), %rdi
callq 0x45d0
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x9072
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x45f0
leaq -0x50(%rbp), %rdi
callq 0x4638
leaq 0xb18e(%rip), %rsi      # 0x111dd
leaq -0x30(%rbp), %rdi
callq 0x45d0
leaq 0xb18f(%rip), %rsi      # 0x111ee
leaq -0x30(%rbp), %rdi
callq 0x45d0
leaq 0xb187(%rip), %rsi      # 0x111f6
leaq -0x30(%rbp), %rdi
callq 0x45d0
leaq -0x70(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x4470
leaq -0x70(%rbp), %rsi
movq %rbx, %rdi
callq 0x7d58
leaq -0x70(%rbp), %rdi
callq 0x4638
leaq -0x30(%rbp), %rdi
callq 0x4638
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
leaq -0x70(%rbp), %rdi
jmp 0x60c6
jmp 0x60bf
jmp 0x60fe
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x4638
jmp 0x6101
jmp 0x60fe
movq %rax, %r14
leaq -0x90(%rbp), %rdi
callq 0x4638
jmp 0x60e3
movq %rax, %r14
leaq -0xb0(%rbp), %rdi
jmp 0x6105
movq %rax, %r14
jmp 0x610a
movq %rax, %r14
movq %rbx, %rdi
callq 0x4330
jmp 0x610a
movq %rax, %r14
leaq -0x30(%rbp), %rdi
callq 0x4638
movq %r14, %rdi
callq 0x4580