// File: UTAP[P]APHTTP/utils/request.cpp
// Function: Request::deserializeFromFile(Request*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Request::deserializeFromFile(Request *req, string filePath) {
  vector<string> fields = tokenize(readFile(filePath), '\n');
  switch (fields.size()) {
  case 5:
    req->setQuery(fields[4]);
  case 4:
    req->setBody(fields[3]);
  case 3:
    req->setHeaders(fields[2]);
  case 2:
    req->setPath(fields[1]);
  case 1:
    req->setMethod(stoi(fields[0]) == GET ? GET : POST);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x68(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x4200
movq -0x100(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x152d0
jmp 0x132f5
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movl $0xa, %edx
callq 0x159e0
jmp 0x13309
leaq -0x48(%rbp), %rdi
callq 0x4768
leaq -0x68(%rbp), %rdi
callq 0x4768
leaq -0x28(%rbp), %rdi
callq 0x137f0
decq %rax
movq %rax, -0x108(%rbp)
subq $0x4, %rax
ja 0x13506
movq -0x108(%rbp), %rax
leaq 0xe1e6(%rip), %rcx      # 0x2152c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x13372
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x4768
leaq -0x68(%rbp), %rdi
callq 0x4768
jmp 0x13595
movq -0x8(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq -0x28(%rbp), %rdi
movl $0x4, %esi
callq 0x13660
movq %rax, %rsi
leaq -0x98(%rbp), %rdi
callq 0x4200
jmp 0x133aa
movq -0x110(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x12f70
jmp 0x133bf
leaq -0x98(%rbp), %rdi
callq 0x4768
movq -0x8(%rbp), %rax
movq %rax, -0x118(%rbp)
leaq -0x28(%rbp), %rdi
movl $0x3, %esi
callq 0x13660
movq %rax, %rsi
leaq -0xb8(%rbp), %rdi
callq 0x4200
jmp 0x133f5
movq -0x118(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x13050
jmp 0x1340a
leaq -0xb8(%rbp), %rdi
callq 0x4768
movq -0x8(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x28(%rbp), %rdi
movl $0x2, %esi
callq 0x13660
movq %rax, %rsi
leaq -0xd8(%rbp), %rdi
callq 0x4200
jmp 0x13440
movq -0x120(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x12ee0
jmp 0x13455
leaq -0xd8(%rbp), %rdi
callq 0x4768
movq -0x8(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0x13660
movq %rax, %rsi
leaq -0xf8(%rbp), %rdi
callq 0x4200
jmp 0x1348b
movq -0x128(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x106a0
jmp 0x134a0
leaq -0xf8(%rbp), %rdi
callq 0x4768
movq -0x8(%rbp), %rax
movq %rax, -0x140(%rbp)
xorl %eax, %eax
movl %eax, %esi
movq %rsi, -0x138(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x13660
movq -0x138(%rbp), %rsi
movq %rax, %rdi
movl $0xa, %edx
callq 0x13810
movl %eax, -0x12c(%rbp)
jmp 0x134e7
movq -0x140(%rbp), %rdi
movl -0x12c(%rbp), %ecx
movl $0x1, %esi
xorl %eax, %eax
cmpl $0x0, %ecx
cmovel %eax, %esi
callq 0x106e0
leaq -0x28(%rbp), %rdi
callq 0x13680
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x1358c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x4768
jmp 0x1358c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x4768
jmp 0x1358c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x4768
jmp 0x1358c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x4768
leaq -0x28(%rbp), %rdi
callq 0x13680
movq -0x70(%rbp), %rdi
callq 0x46b0
nop