// File: /workspace/github_cpp_makefile_star2_O1/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 0x6cdb0
movb $0x1, %al
leaq 0xa929(%rip), %rdx      # 0x77590
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
cmpl $0x4, %esi
ja 0x6cdee
movl %esi, %ecx
leaq 0xa92e(%rip), %rdx      # 0x775b0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
retq
cmpl $0x4, %esi
je 0x6cc8b
testl %esi, %esi
jne 0x6cdb0
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x6cc8b
cmpb $0x0, (%rcx)
jmp 0x6cdf1
testl %esi, %esi
sete %dl
movq (%rdi), %rcx
testq %rcx, %rcx
sete %dil
testb %dil, %dl
jne 0x6cc8b
cmpl $0x2, %esi
je 0x6cc8b
cmpl $0x1, %esi
jne 0x6cde2
shrq $0x20, %rcx
sete %cl
leal -0x3(%rsi), %edx
cmpl $0x2, %edx
setb %dl
orb %cl, %dl
jne 0x6cc8b
jmp 0x6cdee
movsd (%rdi), %xmm0
testl %esi, %esi
jne 0x6ccf8
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x6ccf8
jnp 0x6cc8b
leal -0x3(%rsi), %ecx
cmpl $0x2, %ecx
jb 0x6cc8b
cmpl $0x2, %esi
je 0x6cd3e
cmpl $0x1, %esi
jne 0x6cdee
movapd 0xa8ca(%rip), %xmm1     # 0x775e0
andpd %xmm0, %xmm1
movsd 0x8d56(%rip), %xmm2     # 0x75a78
ucomisd %xmm1, %xmm2
jae 0x6cc8b
cmpl $0x2, %ecx
jb 0x6cc8b
cmpl $0x2, %esi
jne 0x6cdee
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x6cde5
cmpl $0x4, %esi
je 0x6cc8b
movsd 0xa893(%rip), %xmm1     # 0x775f0
ucomisd %xmm0, %xmm1
jb 0x6cdee
jmp 0x6cc8b
cmpl $0x7, %esi
jne 0x6cda2
jmp 0x6cc8b
leal -0x1(%rsi), %ecx
cmpl $0x5, %ecx
jb 0x6cc8b
testl %esi, %esi
jne 0x6cdb0
cmpb $0x0, (%rdi)
je 0x6cc8b
addl $-0x2, %esi
cmpl $0x4, %esi
setb %al
retq
cmpl $0x6, %esi
je 0x6cc8b
testl %esi, %esi
jne 0x6cdb0
movq (%rdi), %rax
cmpq $0x0, 0x28(%rax)
jmp 0x6cdf1
xorl %eax, %eax
retq
cmpq $0x0, (%rdi)
je 0x6cc8b
leal -0x3(%rsi), %ecx
cmpl $0x2, %ecx
jb 0x6cc8b
cmpl $0x2, %esi
jne 0x6cdee
cmpl $0x4, %esi
je 0x6cc8b
cmpq $0x0, (%rdi)
js 0x6cdee
jmp 0x6cc8b
leal -0x3(%rsi), %ecx
cmpl $0x2, %ecx
jb 0x6cc8b
cmpl $0x5, %esi
sete %al
retq
nop