// File: zeeev[P]DASVC/bamtools/src/third_party/jsoncpp/json_reader.cpp
// Function: Json::Reader::parse(char const*, char const*, Json::Value&, bool)
bool 
Reader::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 );
   
   bool successful = readValue();
   Token token;
   skipCommentTokens( token );
   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:
subq $0xa8, %rsp
movb %r8b, %al
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq %rdx, 0x88(%rsp)
movq %rcx, 0x80(%rsp)
andb $0x1, %al
movb %al, 0x7f(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x10(%rsp)
testb $0x1, 0x108(%rax)
jne 0x11677b
movb $0x0, 0x7f(%rsp)
movq 0x10(%rsp), %rdi
movq 0x90(%rsp), %rax
movq %rax, 0xc0(%rdi)
movq 0x88(%rsp), %rax
movq %rax, 0xc8(%rdi)
movb 0x7f(%rsp), %al
andb $0x1, %al
movb %al, 0x10a(%rdi)
movq 0xc0(%rdi), %rax
movq %rax, 0xd0(%rdi)
movq $0x0, 0xd8(%rdi)
movq $0x0, 0xe0(%rdi)
addq $0xe8, %rdi
leaq 0x1e497(%rip), %rsi     # 0x134c73
callq 0x869f0
movq 0x10(%rsp), %rdi
addq $0x50, %rdi
callq 0x11a5d0
movq 0x10(%rsp), %rdi
callq 0x11a610
xorb $-0x1, %al
testb $0x1, %al
jne 0x116801
jmp 0x11680d
movq 0x10(%rsp), %rdi
callq 0x11a630
jmp 0x1167ef
movq 0x10(%rsp), %rdi
movq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x70(%rsp), %rsi
callq 0x11a640
movq 0x10(%rsp), %rdi
callq 0x116a70
movq 0x10(%rsp), %rdi
andb $0x1, %al
movb %al, 0x6f(%rsp)
leaq 0x50(%rsp), %rsi
callq 0x116e00
movq 0x10(%rsp), %rax
testb $0x1, 0x10a(%rax)
je 0x116889
movq 0x10(%rsp), %rdi
addq $0xe8, %rdi
callq 0x86c90
testb $0x1, %al
jne 0x116889
movq 0x10(%rsp), %rsi
movq 0x80(%rsp), %rdi
addq $0xe8, %rsi
movl $0x2, %edx
callq 0x124830
movq 0x10(%rsp), %rax
testb $0x1, 0x109(%rax)
je 0x116982
movq 0x80(%rsp), %rdi
callq 0x123350
testb $0x1, %al
jne 0x116980
movq 0x80(%rsp), %rdi
callq 0x1233a0
testb $0x1, %al
jne 0x116980
movl $0xd, 0x50(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0x2f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x86da0
movq 0x8(%rsp), %rdx
leaq 0x1dd76(%rip), %rsi     # 0x134678
leaq 0x30(%rsp), %rdi
callq 0x86a00
jmp 0x11690e
movq 0x10(%rsp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq 0x30(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x116e50
jmp 0x116928
leaq 0x30(%rsp), %rdi
callq 0x86f68
jmp 0x116934
leaq 0x2f(%rsp), %rdi
callq 0x867b0
movb $0x0, 0xa7(%rsp)
jmp 0x11698f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
jmp 0x116974
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x86f68
jmp 0x116972
jmp 0x116974
leaq 0x2f(%rsp), %rdi
callq 0x867b0
jmp 0x1169a0
jmp 0x116982
movb 0x6f(%rsp), %al
andb $0x1, %al
movb %al, 0xa7(%rsp)
movb 0xa7(%rsp), %al
andb $0x1, %al
addq $0xa8, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x86d80
movq %rax, %rdi
callq 0x91290
nopw %cs:(%rax,%rax)