// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNBasics/json.cpp
// Function: Json::Path::makePath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<Json::PathArgument const*, std::allocator<Json::PathArgument const*>> const&)
void Path::makePath(const std::string& path, const InArgs& in) {
  const char* current = path.c_str();
  const char* end = current + path.length();
  InArgs::const_iterator itInArg = in.begin();
  while (current != end) {
    if (*current == '[') {
      ++current;
      if (*current == '%')
        addPathInArg(path, in, itInArg, PathArgument::kindIndex);
      else {
        ArrayIndex index = 0;
        for (; current != end && *current >= '0' && *current <= '9'; ++current)
          index = index * 10 + ArrayIndex(*current - '0');
        args_.push_back(index);
      }
      if (current == end || *current++ != ']')
        invalidPath(path, int(current - path.c_str()));
    } else if (*current == '%') {
      addPathInArg(path, in, itInArg, PathArgument::kindKey);
      ++current;
    } else if (*current == '.') {
      ++current;
    } else {
      const char* beginName = current;
      while (current != end && !strchr("[.", *current))
        ++current;
      args_.push_back(std::string(beginName, current));
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movq 0x8(%rsi), %r13
testq %r13, %r13
je 0x830d3
movq (%rsi), %r12
addq %r12, %r13
movq 0x10(%rsp), %rax
movq (%rax), %r15
leaq 0x28(%rsp), %rbx
leaq 0x18(%rsp), %r14
movq %r15, 0x40(%rsp)
movzbl (%r12), %eax
cmpl $0x25, %eax
je 0x82f63
cmpl $0x2e, %eax
je 0x82f81
cmpl $0x5b, %eax
jne 0x82f8c
movq %r14, %r15
movq %rbx, %r14
leaq 0x1(%r12), %rbx
cmpb $0x25, 0x1(%r12)
jne 0x82fcb
movq 0x10(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq 0x8(%rax), %rcx
je 0x83030
movq (%rcx), %rsi
cmpl $0x1, 0x24(%rsi)
jne 0x83030
movq 0x8(%rsp), %rdi
callq 0x87e44
jmp 0x83030
movq 0x10(%rsp), %rax
cmpq 0x8(%rax), %r15
je 0x82f81
movq (%r15), %rsi
cmpl $0x2, 0x24(%rsi)
jne 0x82f81
movq 0x8(%rsp), %rdi
callq 0x87e44
incq %r12
movq %r12, %rbp
jmp 0x830c7
movq %r12, %rbp
cmpq %r13, %r12
je 0x8304c
leaq 0x1(%r12), %rbp
testb %al, %al
je 0x83049
movzbl %al, %eax
cmpl $0x2e, %eax
je 0x83049
cmpl $0x5b, %eax
je 0x83049
cmpq %r13, %rbp
je 0x8304c
movb (%rbp), %al
incq %rbp
jmp 0x82f9d
xorl %eax, %eax
cmpq %r13, %rbx
je 0x82fea
movb (%rbx), %cl
addb $-0x30, %cl
cmpb $0x9, %cl
ja 0x82fea
leal (%rax,%rax,4), %eax
movzbl %cl, %ecx
leal (%rcx,%rax,2), %eax
incq %rbx
jmp 0x82fcd
movq %r14, %r12
movq %r14, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movb $0x0, 0x28(%rsp)
movl %eax, 0x38(%rsp)
movl $0x1, 0x3c(%rsp)
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x8aab6
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x83030
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x115c0
xorl %ebp, %ebp
cmpq %r13, %rbx
setne %bpl
addq %rbx, %rbp
movq %r14, %rbx
movq %r15, %r14
movq 0x40(%rsp), %r15
jmp 0x830c7
decq %rbp
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x1a88c
movq 0x48(%rsp), %rsi
movq %r14, %rdi
leaq 0x7(%rsp), %rdx
callq 0x8768c
movabsq $0x200000000, %rax      # imm = 0x200000000
movq %rax, 0x38(%rsp)
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x8aab6
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x830ab
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x115c0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x830c7
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x115c0
movq %rbp, %r12
cmpq %r13, %rbp
jne 0x82f08
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x83139
movq 0x28(%rsp), %rsi
jmp 0x8312c
movq %rbx, %rcx
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %rcx, %rdi
je 0x83118
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x115c0
jmp 0x83118
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x83139
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x115c0
jmp 0x83139
movq %rax, %rbx
movq %rbx, %rdi
callq 0x11a60
nop