// File: /workspace/github_cpp_makefile_star2_O1/zeeev[P]DASVC/bamtools/src/third_party/jsoncpp/json_value.cpp
// Function: Json::Value::Value(Json::Value const&)
Value::Value( const Value &other )
   : type_( other.type_ )
   , comments_( 0 )
# ifdef JSON_VALUE_USE_INTERNAL_MAP
   , itemIsUsed_( 0 )
#endif
{
   switch ( type_ )
   {
   case nullValue:
   case intValue:
   case uintValue:
   case realValue:
   case booleanValue:
      value_ = other.value_;
      break;
   case stringValue:
      if ( other.value_.string_ )
      {
         value_.string_ = duplicateStringValue( other.value_.string_ );
         allocated_ = true;
      }
      else
         value_.string_ = 0;
      break;
#ifndef JSON_VALUE_USE_INTERNAL_MAP
   case arrayValue:
   case objectValue:
      value_.map_ = new ObjectValues( *other.value_.map_ );
      break;
#else
   case arrayValue:
      value_.array_ = arrayAllocator()->newArrayCopy( *other.value_.array_ );
      break;
   case objectValue:
      value_.map_ = mapAllocator()->newMapCopy( *other.value_.map_ );
      break;
#endif
   default:
      JSON_ASSERT_UNREACHABLE;
   }
   if ( other.comments_ )
   {
      comments_ = new CommentInfo[numberOfCommentPlacement];
      for ( int comment =0; comment < numberOfCommentPlacement; ++comment )
      {
         const CommentInfo &otherComment = other.comments_[comment];
         if ( otherComment.comment_ )
            comments_[comment].setComment( otherComment.comment_ );
      }
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x8(%rsi), %eax
movzbl %al, %eax
movzbl 0x9(%rdi), %ebp
shll $0x8, %ebp
orl %eax, %ebp
movw %bp, 0x8(%rdi)
movq $0x0, 0x10(%rdi)
cmpb $0x7, %al
ja 0x6c268
movl $0x2f, %ecx
btl %eax, %ecx
jae 0x6c1f5
movq (%rbx), %rax
movq %rax, (%r14)
jmp 0x6c268
movl $0xc0, %ecx
btl %eax, %ecx
jae 0x6c21c
movl $0x30, %edi
callq 0x275c0
movq %rax, %r15
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x6e0ba
movq %r15, (%r14)
jmp 0x6c268
movq (%rbx), %r15
testq %r15, %r15
je 0x6c261
movq %r15, %rdi
callq 0x272f0
movq %rax, %r12
leal 0x1(%rax), %edi
callq 0x277b0
movq %rax, %r13
movl %r12d, %r12d
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x274c0
movb $0x0, (%r13,%r12)
movq %r13, (%r14)
orl $0x100, %ebp            # imm = 0x100
movw %bp, 0x8(%r14)
jmp 0x6c268
movq $0x0, (%r14)
cmpq $0x0, 0x10(%rbx)
je 0x6c2cd
movl $0x20, %edi
callq 0x27030
movq %rax, %r15
movq $0x3, (%rax)
leaq 0x8(%rax), %rbp
xorl %r13d, %r13d
movq %rbp, %r12
movq %r12, %rdi
callq 0x6bce4
addq $-0x8, %r13
addq $0x8, %r12
cmpq $-0x18, %r13
jne 0x6c28d
movq %rbp, 0x10(%r14)
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r15), %rsi
testq %rsi, %rsi
je 0x6c2c3
movq 0x10(%r14), %rdi
addq %r15, %rdi
callq 0x6bcfa
addq $0x8, %r15
cmpq $0x18, %r15
jne 0x6c2aa
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x27560
jmp 0x6c30b
movq %rax, %rbx
testq %r13, %r13
je 0x6c303
negq %r13
leaq (%r15,%r13), %rdi
callq 0x6bcec
addq $-0x8, %r13
jne 0x6c2f4
movq %r15, %rdi
callq 0x27760
movq %rbx, %rdi
callq 0x27b20
movq %rax, %rdi
callq 0x2e1ed
nop