// File: UTAP[P]APHTTP/examples/handlers.cpp
// Function: LoginHandler::callback(Request*)
Response *LoginHandler::callback(Request *req) {
  string username = req->getBodyParam("username");
  string password = req->getBodyParam("password");
  if (username == "root")
    throw Server::Exception("Remote root access has been disabled.");
  cout << "username: " << username << ",\tpassword: " << password << endl;
  Response *res = Response::redirect("/rand");
  res->setSessionId("SID");
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0x51(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x46c0
movq -0x138(%rbp), %rdx
leaq 0x18472(%rip), %rsi     # 0x211fe
leaq -0x50(%rbp), %rdi
callq 0x4550
jmp 0x8d97
movq -0x140(%rbp), %rsi
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rdx
callq 0x105d0
jmp 0x8dad
leaq -0x50(%rbp), %rdi
callq 0x4768
leaq -0x51(%rbp), %rdi
callq 0x4440
movq -0x10(%rbp), %rax
movq %rax, -0x150(%rbp)
leaq -0xa9(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x46c0
movq -0x148(%rbp), %rdx
leaq 0x1841c(%rip), %rsi     # 0x21207
leaq -0xa8(%rbp), %rdi
callq 0x4550
jmp 0x8df9
movq -0x150(%rbp), %rsi
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rdx
callq 0x105d0
jmp 0x8e15
leaq -0xa8(%rbp), %rdi
callq 0x4768
leaq -0xa9(%rbp), %rdi
callq 0x4440
leaq 0x183dc(%rip), %rsi     # 0x21210
leaq -0x30(%rbp), %rdi
callq 0x99e0
movb %al, -0x151(%rbp)
jmp 0x8e45
movb -0x151(%rbp), %al
testb $0x1, %al
jne 0x8e54
jmp 0x8f9d
movb $0x1, -0xd2(%rbp)
movl $0x28, %edi
callq 0x4250
movq %rax, -0x168(%rbp)
leaq -0xd1(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x46c0
movq -0x160(%rbp), %rdx
leaq 0x18388(%rip), %rsi     # 0x21215
leaq -0xd0(%rbp), %rdi
callq 0x4550
jmp 0x8e9b
movq -0x168(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x1b360
jmp 0x8eb0
movq -0x168(%rbp), %rdi
movb $0x0, -0xd2(%rbp)
leaq 0x23c03(%rip), %rsi     # 0x2cac8
leaq 0xb44(%rip), %rdx       # 0x9a10
callq 0x4680
jmp 0x91aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x8ef9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x4768
leaq -0x51(%rbp), %rdi
callq 0x4440
jmp 0x91a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x8f2d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x4768
leaq -0xa9(%rbp), %rdi
callq 0x4440
jmp 0x9198
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x918c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x8f75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x4768
leaq -0xd1(%rbp), %rdi
callq 0x4440
testb $0x1, -0xd2(%rbp)
jne 0x8f8c
jmp 0x8f98
movq -0x168(%rbp), %rdi
callq 0x4310
jmp 0x918c
movq 0x24024(%rip), %rdi     # 0x2cfc8
leaq 0x18290(%rip), %rsi     # 0x2123b
callq 0x43e0
movq %rax, -0x170(%rbp)
jmp 0x8fb9
movq -0x170(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x4370
movq %rax, -0x178(%rbp)
jmp 0x8fd2
movq -0x178(%rbp), %rdi
leaq 0x18266(%rip), %rsi     # 0x21246
callq 0x43e0
movq %rax, -0x180(%rbp)
jmp 0x8fee
movq -0x180(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x4370
movq %rax, -0x188(%rbp)
jmp 0x900a
movq -0x188(%rbp), %rdi
movq 0x23f90(%rip), %rsi     # 0x2cfa8
callq 0x4430
jmp 0x901f
leaq -0x101(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x46c0
movq -0x190(%rbp), %rdx
leaq 0x180bf(%rip), %rsi     # 0x210ff
leaq -0x100(%rbp), %rdi
callq 0x4550
jmp 0x904e
leaq -0x100(%rbp), %rdi
callq 0xced0
movq %rax, -0x198(%rbp)
jmp 0x9063
leaq -0x100(%rbp), %rdi
callq 0x4768
leaq -0x101(%rbp), %rdi
callq 0x4440
movq -0x198(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0x1a8(%rbp)
leaq -0x129(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x46c0
movq -0x1a0(%rbp), %rdx
leaq 0x1819b(%rip), %rsi     # 0x21253
leaq -0x128(%rbp), %rdi
callq 0x4550
jmp 0x90c6
movq -0x1a8(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0xcda0
jmp 0x90db
leaq -0x128(%rbp), %rdi
callq 0x4768
leaq -0x129(%rbp), %rdi
callq 0x4440
movq -0xe0(%rbp), %rax
movq %rax, -0x1b0(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x4768
leaq -0x30(%rbp), %rdi
callq 0x4768
movq -0x1b0(%rbp), %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x914c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x4768
leaq -0x101(%rbp), %rdi
callq 0x4440
jmp 0x918c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x9180
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x4768
leaq -0x129(%rbp), %rdi
callq 0x4440
leaq -0x88(%rbp), %rdi
callq 0x4768
leaq -0x30(%rbp), %rdi
callq 0x4768
movq -0x60(%rbp), %rdi
callq 0x46b0
nopw (%rax,%rax)