// File: zeeev[P]DASVC/bamtools/src/third_party/jsoncpp/json_value.cpp
// Function: Json::Value::asUInt() const
Value::UInt 
Value::asUInt() const
{
   switch ( type_ )
   {
   case nullValue:
      return 0;
   case intValue:
      JSON_ASSERT_MESSAGE( value_.int_ >= 0, "Negative integer can not be converted to unsigned integer" );
      return value_.int_;
   case uintValue:
      return value_.uint_;
   case realValue:
      JSON_ASSERT_MESSAGE( value_.real_ >= 0  &&  value_.real_ <= maxUInt,  "Real out of unsigned integer range" );
      return UInt( value_.real_ );
   case booleanValue:
      return value_.bool_ ? 1 : 0;
   case stringValue:
   case arrayValue:
   case objectValue:
      JSON_ASSERT_MESSAGE( false, "Type is not convertible to uint" );
   default:
      JSON_ASSERT_UNREACHABLE;
   }
   return 0; // unreachable;
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, 0xc8(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x30(%rsp)
movzbl 0x8(%rax), %eax
movzwl %ax, %ecx
movq %rcx, 0x38(%rsp)
subw $0x7, %ax
ja 0x122b3c
movq 0x38(%rsp), %rax
leaq 0x12192(%rip), %rcx     # 0x1349e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq $0x0, 0xd0(%rsp)
jmp 0x122ba2
movq 0x30(%rsp), %rax
cmpq $0x0, (%rax)
jge 0x122957
movb $0x1, 0x93(%rsp)
movl $0x10, %edi
callq 0x863c0
movq %rax, 0x20(%rsp)
leaq 0xa7(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x86da0
movq 0x28(%rsp), %rdx
leaq 0x1227d(%rip), %rsi     # 0x134b29
leaq 0xa8(%rsp), %rdi
callq 0x86a00
jmp 0x1228bb
movq 0x20(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x86c20
jmp 0x1228cf
movq 0x20(%rsp), %rdi
movb $0x0, 0x93(%rsp)
movq 0x4270d(%rip), %rsi     # 0x164ff0
movq 0x4269e(%rip), %rdx     # 0x164f88
callq 0x86d20
jmp 0x122bc7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x12292f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x86f68
jmp 0x12292d
jmp 0x12292f
leaq 0xa7(%rsp), %rdi
callq 0x867b0
testb $0x1, 0x93(%rsp)
jne 0x122948
jmp 0x122952
movq 0x20(%rsp), %rdi
callq 0x86550
jmp 0x122bb2
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xd0(%rsp)
jmp 0x122ba2
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xd0(%rsp)
jmp 0x122ba2
movq 0x30(%rsp), %rax
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x1229aa
movq 0x30(%rsp), %rax
movsd 0x120e0(%rip), %xmm0    # 0x134a80
ucomisd (%rax), %xmm0
jae 0x122a72
movb $0x1, 0x6e(%rsp)
movl $0x10, %edi
callq 0x863c0
movq %rax, 0x10(%rsp)
leaq 0x6f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x86da0
movq 0x18(%rsp), %rdx
leaq 0x1218a(%rip), %rsi     # 0x134b63
leaq 0x70(%rsp), %rdi
callq 0x86a00
jmp 0x1229e5
movq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x86c20
jmp 0x1229f6
movq 0x10(%rsp), %rdi
movb $0x0, 0x6e(%rsp)
movq 0x425e9(%rip), %rsi     # 0x164ff0
movq 0x4257a(%rip), %rdx     # 0x164f88
callq 0x86d20
jmp 0x122bc7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x122a50
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x86f68
jmp 0x122a4e
jmp 0x122a50
leaq 0x6f(%rsp), %rdi
callq 0x867b0
testb $0x1, 0x6e(%rsp)
jne 0x122a63
jmp 0x122a6d
movq 0x10(%rsp), %rdi
callq 0x86550
jmp 0x122bb2
movq 0x30(%rsp), %rax
movsd (%rax), %xmm0
movsd 0xf7c5(%rip), %xmm2     # 0x132248
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rcx
cvttsd2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, 0xd0(%rsp)
jmp 0x122ba2
movq 0x30(%rsp), %rax
movb (%rax), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cltq
movq %rax, 0xd0(%rsp)
jmp 0x122ba2
movb $0x1, 0x46(%rsp)
movl $0x10, %edi
callq 0x863c0
movq %rax, (%rsp)
leaq 0x47(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x86da0
movq 0x8(%rsp), %rdx
leaq 0x12087(%rip), %rsi     # 0x134b86
leaq 0x48(%rsp), %rdi
callq 0x86a00
jmp 0x122b0b
movq (%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x86c20
jmp 0x122b1b
movq (%rsp), %rdi
movb $0x0, 0x46(%rsp)
movq 0x424c5(%rip), %rsi     # 0x164ff0
movq 0x42456(%rip), %rdx     # 0x164f88
callq 0x86d20
jmp 0x122bc7
jmp 0x122b3e
movq $0x0, 0xd0(%rsp)
jmp 0x122ba2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x122b84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x86f68
jmp 0x122b82
jmp 0x122b84
leaq 0x47(%rsp), %rdi
callq 0x867b0
testb $0x1, 0x46(%rsp)
jne 0x122b97
jmp 0x122ba0
movq (%rsp), %rdi
callq 0x86550
jmp 0x122bb2
movq 0xd0(%rsp), %rax
addq $0xd8, %rsp
retq
movq 0x98(%rsp), %rdi
callq 0x86d80
movq %rax, %rdi
callq 0x91290
nopw (%rax,%rax)