// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %r14
movl $0x78, %edi
callq 0x4350
movq %rax, %r13
movq %rax, %rdi
movl $0xc8, %esi
callq 0x82ca
leaq -0xb8(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x1213e(%rip), %rsi     # 0x19175
leaq 0x12143(%rip), %rdx     # 0x19181
leaq -0xc8(%rbp), %rdi
callq 0x6f56
leaq -0x98(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x12125(%rip), %rsi     # 0x19182
leaq 0x12127(%rip), %rdx     # 0x1918b
leaq -0xa8(%rbp), %rdi
callq 0x6f56
leaq -0xc8(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
movq %r13, %rdi
callq 0xa3f0
movq -0xa8(%rbp), %rdi
cmpq %r12, %rdi
je 0x7097
callq 0x4310
movq -0xc8(%rbp), %rdi
cmpq %r15, %rdi
je 0x70a8
callq 0x4310
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x120ca(%rip), %rsi     # 0x1918c
leaq -0x48(%rbp), %rdi
callq 0x45f0
leaq 0x120ca(%rip), %rsi     # 0x1919c
leaq -0x48(%rbp), %rdi
callq 0x45f0
leaq 0x120c1(%rip), %rsi     # 0x191a3
leaq -0x48(%rbp), %rdi
callq 0x45f0
leaq 0x120d4(%rip), %rsi     # 0x191c6
leaq -0x48(%rbp), %rdi
callq 0x45f0
leaq 0x120d5(%rip), %rsi     # 0x191d7
leaq -0x48(%rbp), %rdi
callq 0x45f0
leaq 0x120c9(%rip), %rsi     # 0x191db
leaq -0x48(%rbp), %rdi
callq 0x45f0
movq %r14, %rbx
callq 0x4100
cltq
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rcx
addl %edx, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
negl %ecx
leal (%rax,%rcx), %r14d
incl %r14d
movl %r14d, %r15d
negl %r15d
cmovsl %r14d, %r15d
cmpl $0xa, %r15d
movl $0x2, %r12d
sbbl $0x0, %r12d
shrl $0x1f, %r14d
leal (%r12,%r14), %esi
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x68(%rbp), %rdi
movl $0x2d, %edx
callq 0x43d0
movl %r14d, %edi
addq -0x68(%rbp), %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x7cb1
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0x4130
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %r15
cmpq %r15, %rdi
movq %rbx, %r14
je 0x71b5
callq 0x4310
leaq 0x1203f(%rip), %rsi     # 0x191fb
leaq -0x48(%rbp), %rdi
callq 0x45f0
leaq 0x1200b(%rip), %rsi     # 0x191d7
leaq -0x48(%rbp), %rdi
callq 0x45f0
leaq 0x12024(%rip), %rsi     # 0x19200
leaq -0x48(%rbp), %rdi
callq 0x45f0
leaq -0x68(%rbp), %rdi
movq %r14, %rsi
callq 0xb760
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0x4130
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x7210
callq 0x4310
leaq 0x11fe4(%rip), %rsi     # 0x191fb
leaq -0x48(%rbp), %rdi
callq 0x45f0
leaq 0x11fe5(%rip), %rsi     # 0x1920c
leaq -0x48(%rbp), %rdi
callq 0x45f0
leaq 0x11fdd(%rip), %rsi     # 0x19214
leaq -0x48(%rbp), %rdi
callq 0x45f0
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x7dfa
leaq -0x88(%rbp), %rsi
movq %r13, %rdi
callq 0xa414
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x727f
callq 0x4310
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x7291
callq 0x4310
movq %r13, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x88(%rbp), %rdi
jmp 0x72b9
movq %rax, %r14
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
jne 0x72d2
jmp 0x730d
jmp 0x730a
movq %rax, %r14
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x730d
callq 0x4310
jmp 0x730d
jmp 0x730a
movq %rax, %r14
movq -0xa8(%rbp), %rdi
cmpq %r12, %rdi
je 0x72f4
callq 0x4310
jmp 0x72f4
movq %rax, %r14
movq -0xc8(%rbp), %rdi
cmpq %r15, %rdi
jne 0x731a
jmp 0x731f
movq %rax, %r14
movq %r13, %rdi
jmp 0x731a
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x731f
callq 0x4310
movq %r14, %rdi
callq 0x45a0
nop