// File: /workspace/github_cpp_makefile_star2_O1/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 0x7e12
leaq -0xe0(%rbp), %rdi
movq %r14, %rsi
callq 0xf2e8
leaq -0x40(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
movl $0xa, %edx
callq 0xf702
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe749
callq 0x4310
movq -0x100(%rbp), %rdi
cmpq %r15, %rdi
je 0xe75a
callq 0x4310
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
decq %rcx
cmpq $0x4, %rcx
ja 0xe8de
leaq 0xadcf(%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 0x7e12
leaq -0xc0(%rbp), %rsi
movq %rbx, %rdi
callq 0xe2e0
movq -0xc0(%rbp), %rdi
cmpq %r14, %rdi
je 0xe7ce
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 0x7e12
leaq -0xa0(%rbp), %rsi
movq %rbx, %rdi
callq 0xe3e0
movq -0xa0(%rbp), %rdi
cmpq %r14, %rdi
je 0xe814
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 0x7e12
leaq -0x80(%rbp), %rsi
movq %rbx, %rdi
callq 0xe216
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
je 0xe84e
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 0x7e12
leaq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0x4220
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0xe888
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 0xe8f9
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0xe905
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0xe905
testl %ecx, %ecx
jne 0xe8d4
movl %r13d, (%r14)
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, 0x20(%rbx)
leaq -0x40(%rbp), %rdi
callq 0xe998
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xace7(%rip), %rdi      # 0x195e7
callq 0x4230
leaq 0xacdb(%rip), %rdi      # 0x195e7
callq 0x44a0
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
jmp 0xe939
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
jmp 0xe939
movq %rax, %rbx
movq -0x80(%rbp), %rdi
jmp 0xe939
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0xe986
callq 0x4310
jmp 0xe986
movq %rax, %rbx
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe962
callq 0x4310
jmp 0xe962
movq %rax, %rbx
movq -0x100(%rbp), %rdi
cmpq %r15, %rdi
je 0xe98f
callq 0x4310
jmp 0xe98f
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0xe986
movl %r13d, (%r14)
jmp 0xe986
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0xe998
movq %rbx, %rdi
callq 0x45a0
nop