// File: /workspace/github_cpp_makefile_star2_O3/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 0x6c6d8
movb $0x1, %al
leaq 0x9f99(%rip), %rdx      # 0x76590
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
cmpl $0x4, %esi
ja 0x6c71c
movl %esi, %ecx
leaq 0x9f9e(%rip), %rdx      # 0x765b0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
retq
cmpl $0x4, %esi
je 0x6c61b
testl %esi, %esi
jne 0x6c6d8
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x6c61b
cmpb $0x0, (%rcx)
jmp 0x6c71f
testl %esi, %esi
sete %dl
movq (%rdi), %rcx
testq %rcx, %rcx
sete %dil
testb %dil, %dl
jne 0x6c61b
cmpl $0x2, %esi
je 0x6c61b
cmpl $0x1, %esi
jne 0x6c6f2
shrq $0x20, %rcx
je 0x6c61b
jmp 0x6c71c
movsd (%rdi), %xmm0
testl %esi, %esi
jne 0x6c67a
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x6c67a
jnp 0x6c61b
leal -0x3(%rsi), %ecx
cmpl $0x2, %ecx
jb 0x6c61b
cmpl $0x2, %esi
je 0x6c700
cmpl $0x1, %esi
jne 0x6c71c
andpd 0x9f48(%rip), %xmm0     # 0x765e0
movsd 0x83f0(%rip), %xmm1     # 0x74a90
jmp 0x6c712
cmpl $0x7, %esi
jne 0x6c6ca
jmp 0x6c61b
leal -0x1(%rsi), %ecx
cmpl $0x5, %ecx
jb 0x6c61b
testl %esi, %esi
jne 0x6c6d8
cmpb $0x0, (%rdi)
jmp 0x6c71f
cmpl $0x6, %esi
je 0x6c61b
testl %esi, %esi
jne 0x6c6d8
movq (%rdi), %rax
cmpq $0x0, 0x28(%rax)
jmp 0x6c71f
xorl %eax, %eax
retq
cmpq $0x0, (%rdi)
jns 0x6c61b
jmp 0x6c71c
cmpq $0x0, (%rdi)
jne 0x6c71c
jmp 0x6c61b
leal -0x3(%rsi), %ecx
cmpl $0x2, %ecx
jb 0x6c61b
jmp 0x6c71c
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x6c71c
movsd 0x9ede(%rip), %xmm1     # 0x765f0
ucomisd %xmm0, %xmm1
jae 0x6c61b
cmpl $0x5, %esi
sete %al
retq
nop