// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq -0xf0(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq -0x100(%rbp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x7dfa
leaq -0xe0(%rbp), %rdi
movq %r14, %rsi
callq 0xf22c
leaq -0x40(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
movl $0xa, %edx
callq 0xf646
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe6bb
callq 0x4310
movq -0x100(%rbp), %rdi
cmpq %r15, %rdi
je 0xe6cc
callq 0x4310
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
decq %rcx
cmpq $0x4, %rcx
ja 0xe850
leaq 0xae5d(%rip), %rdx      # 0x1954c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq -0xb0(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x80(%rax), %rsi
movq 0x88(%rax), %rdx
addq %rsi, %rdx
leaq -0xc0(%rbp), %rdi
callq 0x7dfa
leaq -0xc0(%rbp), %rsi
movq %rbx, %rdi
callq 0xe252
movq -0xc0(%rbp), %rdi
cmpq %r14, %rdi
je 0xe740
callq 0x4310
movq -0x40(%rbp), %rax
leaq -0x90(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x60(%rax), %rsi
movq 0x68(%rax), %rdx
addq %rsi, %rdx
leaq -0xa0(%rbp), %rdi
callq 0x7dfa
leaq -0xa0(%rbp), %rsi
movq %rbx, %rdi
callq 0xe352
movq -0xa0(%rbp), %rdi
cmpq %r14, %rdi
je 0xe786
callq 0x4310
movq -0x40(%rbp), %rax
leaq -0x70(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq -0x80(%rbp), %rdi
callq 0x7dfa
leaq -0x80(%rbp), %rsi
movq %rbx, %rdi
callq 0xe188
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
je 0xe7c0
callq 0x4310
movq -0x40(%rbp), %rax
leaq -0x50(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rdi
callq 0x7dfa
leaq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0x4220
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0xe7fa
callq 0x4310
movq -0x40(%rbp), %rax
movq (%rax), %r15
callq 0x4060
movq %rax, %r14
movl (%rax), %r13d
movl $0x0, (%rax)
leaq -0xe0(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x4460
cmpq %r15, (%r12)
je 0xe86b
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0xe877
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0xe877
testl %ecx, %ecx
jne 0xe846
movl %r13d, (%r14)
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, 0x20(%rbx)
leaq -0x40(%rbp), %rdi
callq 0xe90a
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xad75(%rip), %rdi      # 0x195e7
callq 0x4230
leaq 0xad69(%rip), %rdi      # 0x195e7
callq 0x44a0
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
jmp 0xe8ab
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
jmp 0xe8ab
movq %rax, %rbx
movq -0x80(%rbp), %rdi
jmp 0xe8ab
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0xe8f8
callq 0x4310
jmp 0xe8f8
movq %rax, %rbx
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe8d4
callq 0x4310
jmp 0xe8d4
movq %rax, %rbx
movq -0x100(%rbp), %rdi
cmpq %r15, %rdi
je 0xe901
callq 0x4310
jmp 0xe901
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0xe8f8
movl %r13d, (%r14)
jmp 0xe8f8
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0xe90a
movq %rbx, %rdi
callq 0x45a0
nop