// File: zeeev[P]DASVC/bamtools/src/third_party/jsoncpp/json_value.cpp
// Function: Json::Value::asInt() const
Value::Int 
Value::asInt() const
{
   switch ( type_ )
   {
   case nullValue:
      return 0;
   case intValue:
      return value_.int_;
   case uintValue:
      JSON_ASSERT_MESSAGE( value_.uint_ < (unsigned)maxInt, "integer out of signed integer range" );
      return value_.uint_;
   case realValue:
      JSON_ASSERT_MESSAGE( value_.real_ >= minInt  &&  value_.real_ <= maxInt, "Real out of signed integer range" );
      return Int( value_.real_ );
   case booleanValue:
      return value_.bool_ ? 1 : 0;
   case stringValue:
   case arrayValue:
   case objectValue:
      JSON_ASSERT_MESSAGE( false, "Type is not convertible to int" );
   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 0x122780
movq 0x38(%rsp), %rax
leaq 0x12512(%rip), %rcx     # 0x1349c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq $0x0, 0xd0(%rsp)
jmp 0x1227e6
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xd0(%rsp)
jmp 0x1227e6
movq 0x30(%rsp), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, (%rax)
jb 0x1225d0
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 0x125a0(%rip), %rsi     # 0x134ac5
leaq 0xa8(%rsp), %rdi
callq 0x86a00
jmp 0x122534
movq 0x20(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x86c20
jmp 0x122548
movq 0x20(%rsp), %rdi
movb $0x0, 0x93(%rsp)
movq 0x42a94(%rip), %rsi     # 0x164ff0
movq 0x42a25(%rip), %rdx     # 0x164f88
callq 0x86d20
jmp 0x12280b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x1225a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x86f68
jmp 0x1225a6
jmp 0x1225a8
leaq 0xa7(%rsp), %rdi
callq 0x867b0
testb $0x1, 0x93(%rsp)
jne 0x1225c1
jmp 0x1225cb
movq 0x20(%rsp), %rdi
callq 0x86550
jmp 0x1227f6
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xd0(%rsp)
jmp 0x1227e6
movq 0x30(%rsp), %rax
movsd (%rax), %xmm0
movsd 0x12482(%rip), %xmm1    # 0x134a78
ucomisd %xmm1, %xmm0
jb 0x122613
movq 0x30(%rsp), %rax
movsd 0xfc3f(%rip), %xmm0     # 0x132248
ucomisd (%rax), %xmm0
jae 0x1226db
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 0x124a7(%rip), %rsi     # 0x134ae9
leaq 0x70(%rsp), %rdi
callq 0x86a00
jmp 0x12264e
movq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x86c20
jmp 0x12265f
movq 0x10(%rsp), %rdi
movb $0x0, 0x6e(%rsp)
movq 0x42980(%rip), %rsi     # 0x164ff0
movq 0x42911(%rip), %rdx     # 0x164f88
callq 0x86d20
jmp 0x12280b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x1226b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x86f68
jmp 0x1226b7
jmp 0x1226b9
leaq 0x6f(%rsp), %rdi
callq 0x867b0
testb $0x1, 0x6e(%rsp)
jne 0x1226cc
jmp 0x1226d6
movq 0x10(%rsp), %rdi
callq 0x86550
jmp 0x1227f6
movq 0x30(%rsp), %rax
cvttsd2si (%rax), %rax
movq %rax, 0xd0(%rsp)
jmp 0x1227e6
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 0x1227e6
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 0x123c7(%rip), %rsi     # 0x134b0a
leaq 0x48(%rsp), %rdi
callq 0x86a00
jmp 0x12274f
movq (%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x86c20
jmp 0x12275f
movq (%rsp), %rdi
movb $0x0, 0x46(%rsp)
movq 0x42881(%rip), %rsi     # 0x164ff0
movq 0x42812(%rip), %rdx     # 0x164f88
callq 0x86d20
jmp 0x12280b
jmp 0x122782
movq $0x0, 0xd0(%rsp)
jmp 0x1227e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x1227c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x86f68
jmp 0x1227c6
jmp 0x1227c8
leaq 0x47(%rsp), %rdi
callq 0x867b0
testb $0x1, 0x46(%rsp)
jne 0x1227db
jmp 0x1227e4
movq (%rsp), %rdi
callq 0x86550
jmp 0x1227f6
movq 0xd0(%rsp), %rax
addq $0xd8, %rsp
retq
movq 0x98(%rsp), %rdi
callq 0x86d80
movq %rax, %rdi
callq 0x91290
nopl (%rax,%rax)