// File: /workspace/github_cpp_makefile_star2_O1/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, 0x18(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x8(%rsi), %r15
testq %r15, %r15
je 0x850bb
movq (%rsi), %r13
addq %r13, %r15
movq 0x18(%rsp), %rax
movq (%rax), %rbx
leaq 0x3cb03(%rip), %rbp     # 0xc19ff
movzbl (%r13), %eax
cmpl $0x25, %eax
je 0x84f4a
cmpl $0x2e, %eax
je 0x84f68
cmpl $0x5b, %eax
jne 0x84f73
leaq 0x1(%r13), %r14
cmpb $0x25, 0x1(%r13)
jne 0x85031
movq 0x18(%rsp), %rax
cmpq 0x8(%rax), %rbx
je 0x850a2
movq (%rbx), %rsi
cmpl $0x1, 0x24(%rsi)
jne 0x850a2
movq 0x10(%rsp), %rdi
callq 0x8a02e
jmp 0x850a2
movq 0x18(%rsp), %rax
cmpq 0x8(%rax), %rbx
je 0x84f68
movq (%rbx), %rsi
cmpl $0x2, 0x24(%rsi)
jne 0x84f68
movq 0x10(%rsp), %rdi
callq 0x8a02e
incq %r13
movq %r13, %r12
jmp 0x850af
movq %r13, %r12
cmpq %r15, %r13
je 0x84f9a
movsbl (%r12), %esi
movl $0x3, %edx
movq %rbp, %rdi
callq 0x11670
testq %rax, %rax
jne 0x84f9a
incq %r12
cmpq %r15, %r12
jne 0x84f7b
movq %rbp, %r14
movq %rbx, %rbp
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1ab58
movq 0x48(%rsp), %rsi
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
leaq 0xf(%rsp), %rdx
callq 0x89890
leaq 0x30(%rsp), %r13
movabsq $0x200000000, %rax      # imm = 0x200000000
movq %rax, 0x40(%rsp)
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x8cca6
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
movq %rbp, %rbx
je 0x8500c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x115c0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
movq %r14, %rbp
je 0x850af
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x115c0
jmp 0x850af
cmpq %r15, %r14
leaq 0x30(%rsp), %r12
leaq 0x20(%rsp), %rsi
je 0x85060
xorl %eax, %eax
movb (%r14), %cl
addb $-0x30, %cl
cmpb $0x9, %cl
ja 0x85062
leal (%rax,%rax,4), %eax
movzbl %cl, %ecx
leal (%rcx,%rax,2), %eax
incq %r14
cmpq %r15, %r14
jne 0x85042
jmp 0x85062
xorl %eax, %eax
movq %r12, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movb $0x0, 0x30(%rsp)
movl %eax, 0x40(%rsp)
movl $0x1, 0x44(%rsp)
movq 0x10(%rsp), %rdi
callq 0x8cca6
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x850a2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x115c0
xorl %r12d, %r12d
cmpq %r15, %r14
setne %r12b
addq %r14, %r12
movq %r12, %r13
cmpq %r15, %r12
jne 0x84efc
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x8511e
movq 0x30(%rsp), %rsi
jmp 0x85111
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x850fd
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x115c0
jmp 0x850fd
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x8511e
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x115c0
jmp 0x8511e
movq %rax, %rbx
movq %rbx, %rdi
callq 0x11a70