// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/third_party/jsoncpp/json_value.cpp
// Function: Json::Value::isConvertibleTo(Json::ValueType) const
bool 
Value::isConvertibleTo( ValueType other ) const
{
   switch ( type_ )
   {
   case nullValue:
      return true;
   case intValue:
      return ( other == nullValue  &&  value_.int_ == 0 )
             || other == intValue
             || ( other == uintValue  && value_.int_ >= 0 )
             || other == realValue
             || other == stringValue
             || other == booleanValue;
   case uintValue:
      return ( other == nullValue  &&  value_.uint_ == 0 )
             || ( other == intValue  && value_.uint_ <= (unsigned)maxInt )
             || other == uintValue
             || other == realValue
             || other == stringValue
             || other == booleanValue;
   case realValue:
      return ( other == nullValue  &&  value_.real_ == 0.0 )
             || ( other == intValue  &&  value_.real_ >= minInt  &&  value_.real_ <= maxInt )
             || ( other == uintValue  &&  value_.real_ >= 0  &&  value_.real_ <= maxUInt )
             || other == realValue
             || other == stringValue
             || other == booleanValue;
   case booleanValue:
      return ( other == nullValue  &&  value_.bool_ == false )
             || other == intValue
             || other == uintValue
             || other == realValue
             || other == stringValue
             || other == booleanValue;
   case stringValue:
      return other == stringValue
             || ( other == nullValue  &&  (!value_.string_  ||  value_.string_[0] == 0) );
   case arrayValue:
      return other == arrayValue
             ||  ( other == nullValue  &&  value_.map_->size() == 0 );
   case objectValue:
      return other == objectValue
             ||  ( other == nullValue  &&  value_.map_->size() == 0 );
   default:
      JSON_ASSERT_UNREACHABLE;
   }
   return false; // unreachable;
}

// Assembly:
movzbl 0x8(%rdi), %ecx
cmpq $0x7, %rcx
ja 0x6d1c0
movb $0x1, %al
leaq 0x9491(%rip), %rdx      # 0x76570
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
cmpl $0x4, %esi
ja 0x6d204
movl %esi, %ecx
leaq 0x9496(%rip), %rdx      # 0x76590
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
retq
cmpl $0x4, %esi
je 0x6d103
testl %esi, %esi
jne 0x6d1c0
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x6d103
cmpb $0x0, (%rcx)
jmp 0x6d207
testl %esi, %esi
sete %dl
movq (%rdi), %rcx
testq %rcx, %rcx
sete %dil
testb %dil, %dl
jne 0x6d103
cmpl $0x2, %esi
je 0x6d103
cmpl $0x1, %esi
jne 0x6d1da
shrq $0x20, %rcx
je 0x6d103
jmp 0x6d204
movsd (%rdi), %xmm0
testl %esi, %esi
jne 0x6d162
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x6d162
jnp 0x6d103
leal -0x3(%rsi), %ecx
cmpl $0x2, %ecx
jb 0x6d103
cmpl $0x2, %esi
je 0x6d1e8
cmpl $0x1, %esi
jne 0x6d204
andpd 0x9440(%rip), %xmm0     # 0x765c0
movsd 0x7880(%rip), %xmm1     # 0x74a08
jmp 0x6d1fa
cmpl $0x7, %esi
jne 0x6d1b2
jmp 0x6d103
leal -0x1(%rsi), %ecx
cmpl $0x5, %ecx
jb 0x6d103
testl %esi, %esi
jne 0x6d1c0
cmpb $0x0, (%rdi)
jmp 0x6d207
cmpl $0x6, %esi
je 0x6d103
testl %esi, %esi
jne 0x6d1c0
movq (%rdi), %rax
cmpq $0x0, 0x28(%rax)
jmp 0x6d207
xorl %eax, %eax
retq
cmpq $0x0, (%rdi)
jns 0x6d103
jmp 0x6d204
cmpq $0x0, (%rdi)
jne 0x6d204
jmp 0x6d103
leal -0x3(%rsi), %ecx
cmpl $0x2, %ecx
jb 0x6d103
jmp 0x6d204
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x6d204
movsd 0x93d6(%rip), %xmm1     # 0x765d0
ucomisd %xmm0, %xmm1
jae 0x6d103
cmpl $0x5, %esi
sete %al
retq
nop