// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/RNBasics/json.cpp
// Function: Json::OurReader::parse(char const*, char const*, Json::Value&, bool)
bool OurReader::parse(const char* beginDoc,
                   const char* endDoc,
                   Value& root,
                   bool collectComments) {
  if (!features_.allowComments_) {
    collectComments = false;
  }

  begin_ = beginDoc;
  end_ = endDoc;
  collectComments_ = collectComments;
  current_ = begin_;
  lastValueEnd_ = 0;
  lastValue_ = 0;
  commentsBefore_ = "";
  errors_.clear();
  while (!nodes_.empty())
    nodes_.pop();
  nodes_.push(&root);

  stackDepth_ = 0;
  bool successful = readValue();
  Token token;
  skipCommentTokens(token);
  if (features_.failIfExtra_) {
    if (token.type_ != tokenError && token.type_ != tokenEndOfStream) {
      addError("Extra non-whitespace after JSON value.", token);
      return false;
    }
  }
  if (collectComments_ && !commentsBefore_.empty())
    root.setComment(commentsBefore_, commentAfter);
  if (features_.strictRoot_) {
    if (!root.isArray() && !root.isObject()) {
      // Set error location to start of doc, ideally should be first token found
      // in doc
      token.type_ = tokenError;
      token.start_ = beginDoc;
      token.end_ = endDoc;
      addError(
          "A valid JSON document must be either an array or an object value.",
          token);
      return false;
    }
  }
  return successful;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rdi, %rbx
andb 0x10c(%rdi), %r8b
movq %rsi, %r15
movq %rsi, 0xc0(%rdi)
movq %rdx, 0xc8(%rdi)
movb %r8b, 0x118(%rdi)
movq %rsi, 0xd0(%rdi)
leaq 0xe8(%rdi), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0xd8(%rdi)
leaq 0x3867d(%rip), %rsi     # 0xa9564
movq %r13, %rdi
callq 0x11b80
leaq 0x50(%rbx), %rdi
callq 0x79fc6
movq 0x30(%rbx), %rax
cmpq 0x10(%rbx), %rax
je 0x70f0c
movq %rbx, %rdi
callq 0x7b18a
jmp 0x70ef8
leaq 0x28(%rsp), %rsi
movq %r12, (%rsi)
movq %rbx, %rdi
callq 0x7b1e0
andl $0x0, 0x108(%rbx)
movq %rbx, %rdi
callq 0x7102c
movl %eax, %ebp
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x71430
cmpb $0x1, 0x111(%rbx)
jne 0x70f79
testl $0xffffffef, 0x10(%rsp) # imm = 0xFFFFFFEF
je 0x70f79
leaq 0x3b32f(%rip), %rsi     # 0xac283
leaq 0x28(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x196d0
leaq 0x28(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x7146e
jmp 0x70ff0
cmpb $0x1, 0x118(%rbx)
jne 0x70f9a
cmpq $0x0, 0xf0(%rbx)
je 0x70f9a
pushq $0x2
popq %rdx
movq %r12, %rdi
movq %r13, %rsi
callq 0x6f00a
cmpb $0x1, 0x10d(%rbx)
jne 0x70ffc
movzwl 0x8(%r12), %eax
andl $0xfe, %eax
cmpw $0x6, %ax
je 0x70ffc
movl $0x10, 0x10(%rsp)
movq %r15, 0x18(%rsp)
movq %r14, 0x20(%rsp)
leaq 0x3affb(%rip), %rsi     # 0xabfc8
leaq 0x28(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x196d0
leaq 0x28(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x7146e
leaq 0x28(%rsp), %rdi
callq 0x11270
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x71011
jmp 0x71020
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x11270
jmp 0x71023
movq %rax, %rbx
movq %rbx, %rdi
callq 0x11a80
nop