// File: /workspace/github_cpp_makefile_star2_O3/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
leaq 0x18c48(%rip), %rsi     # 0x3d12b
movl $0x4, %ecx
movq $-0x1, %rdx
movq %rdi, %r15
movq %r14, %rdi
callq 0x22e90
movq 0x8(%r14), %rcx
incq %rax
cmpq %rax, %rcx
jb 0x246fd
movq %rax, 0x8(%r14)
leaq 0xa8(%rsp), %rdi
movl $0x8, %edx
movq %r14, %rsi
xorl %ebp, %ebp
movq (%r14), %rcx
movb %bpl, (%rcx,%rax)
callq 0x22fd0
addq $0x58, %r15
leaq 0x58(%rsp), %rax
leaq 0x78(%rsp), %rbx
leaq 0x68(%rsp), %r13
leaq 0x88(%rsp), %r12
movq %r15, 0x40(%rsp)
leaq 0x48(%rsp), %r15
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb %bpl, (%rax)
leaq 0xa8(%rsp), %rdi
movl $0x26, %edx
movq %r15, %rsi
callq 0x23240
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x246b6
leaq 0x10(%rsp), %rcx
leaq 0x30(%rsp), %rax
leaq 0x1b457(%rip), %rsi     # 0x3f9ef
movq %r15, %rdi
xorl %edx, %edx
movq %rcx, (%rsp)
movl $0x1, %ecx
movq %rax, 0x20(%rsp)
movq %rbp, 0x28(%rsp)
movq %rbp, 0x8(%rsp)
movb %bpl, 0x30(%rsp)
movb %bpl, 0x10(%rsp)
callq 0x23110
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 0x245f3
callq 0x22130
cmpq $-0x1, %r14
je 0x2462d
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 0x2462d
callq 0x22130
movq %r13, %rdi
movq %rsp, %rsi
callq 0x23000
leaq 0x20(%rsp), %rsi
movq %r12, %rdi
callq 0x23000
movq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x23320
movq %rax, %rdi
movq %r13, %rsi
callq 0x22620
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x24677
callq 0x22130
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x24686
callq 0x22130
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x24699
callq 0x22130
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x24560
callq 0x22130
jmp 0x24560
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x246ca
callq 0x22130
movq 0x2872f(%rip), %rsi     # 0x4ce00
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 0x18e83(%rip), %rdi     # 0x3d587
leaq 0x19652(%rip), %rsi     # 0x3dd5d
movq %rax, %rdx
xorl %eax, %eax
callq 0x22c20
jmp 0x2474c
movq 0x88(%rsp), %rdi
movq %rax, %r14
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x24739
callq 0x22130
jmp 0x24739
movq %rax, %r14
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2474f
callq 0x22130
jmp 0x2474f
jmp 0x2474c
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x24762
callq 0x22130
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2477b
callq 0x22130
jmp 0x2477b
movq %rax, %r14
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x2478f
callq 0x22130
movq 0x2866a(%rip), %rsi     # 0x4ce00
leaq 0xa8(%rsp), %rdi
callq 0x22aa0
leaq 0x120(%rsp), %rdi
callq 0x21510
movq %r14, %rdi
callq 0x23160