// File: /workspace/github_cpp_makefile_star2_O1/alfanick[P]rest-cpp/src/rest/request.cpp
// Function: REST::Request::parse_query_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void Request::parse_query_string(std::string &query) {
  query.erase(query.find_last_not_of(" \n\r\t")+1);
  std::istringstream query_stream(query);
  std::string pair;
  while (std::getline(query_stream, pair, '&')) {
    std::string name, value;
    size_t value_position = pair.find("=");

    name = pair.substr(0, value_position);
    if (value_position != std::string::npos)
      value = pair.substr(value_position+1, pair.size() - value_position-1);

    parameters[Utils::uri_decode(name)] = Utils::uri_decode(value);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rsi, %r14
movq %rdi, %r15
leaq 0x19c1d(%rip), %rsi     # 0x3e12b
movl $0x4, %ecx
movq %r14, %rdi
movq $-0x1, %rdx
callq 0x22e90
incq %rax
movq 0x8(%r14), %rcx
cmpq %rax, %rcx
jb 0x24725
movq %rax, 0x8(%r14)
movq (%r14), %rcx
xorl %ebp, %ebp
movb %bpl, (%rcx,%rax)
leaq 0xa8(%rsp), %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x22fe0
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb %bpl, (%rax)
leaq 0x78(%rsp), %rbx
addq $0x58, %r15
movq %r15, 0x40(%rsp)
leaq 0x48(%rsp), %r15
leaq 0x68(%rsp), %r13
leaq 0x88(%rsp), %r12
leaq 0xa8(%rsp), %rdi
movq %r15, %rsi
movl $0x26, %edx
callq 0x23250
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x246de
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %rbp, 0x28(%rsp)
movb %bpl, 0x30(%rsp)
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rbp, 0x8(%rsp)
movb %bpl, 0x10(%rsp)
movl $0x1, %ecx
movq %r15, %rdi
leaq 0x1c40a(%rip), %rsi     # 0x409ef
xorl %edx, %edx
callq 0x23120
movq %rax, %r14
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x22330
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0x22620
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2461b
callq 0x22130
cmpq $-0x1, %r14
je 0x24655
leaq 0x1(%r14), %rdx
notq %r14
addq 0x50(%rsp), %r14
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x22330
movq %rsp, %rdi
movq %r13, %rsi
callq 0x22620
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x24655
callq 0x22130
movq %r13, %rdi
movq %rsp, %rsi
callq 0x23010
movq %r12, %rdi
leaq 0x20(%rsp), %rsi
callq 0x23010
movq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x23330
movq %rax, %rdi
movq %r13, %rsi
callq 0x22620
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x2469f
callq 0x22130
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x246ae
callq 0x22130
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x246c1
callq 0x22130
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x24588
callq 0x22130
jmp 0x24588
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x246f2
callq 0x22130
movq 0x29707(%rip), %rsi     # 0x4de00
leaq 0xa8(%rsp), %rdi
callq 0x22aa0
leaq 0x120(%rsp), %rdi
callq 0x21510
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x19e5b(%rip), %rdi     # 0x3e587
leaq 0x1a62a(%rip), %rsi     # 0x3ed5d
movq %rax, %rdx
xorl %eax, %eax
callq 0x22c20
jmp 0x24774
movq %rax, %r14
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x24761
callq 0x22130
jmp 0x24761
movq %rax, %r14
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x24777
callq 0x22130
jmp 0x24777
jmp 0x24774
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2478a
callq 0x22130
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x247a3
callq 0x22130
jmp 0x247a3
movq %rax, %r14
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x247b7
callq 0x22130
movq 0x29642(%rip), %rsi     # 0x4de00
leaq 0xa8(%rsp), %rdi
callq 0x22aa0
leaq 0x120(%rsp), %rdi
callq 0x21510
movq %r14, %rdi
callq 0x23170