// File: tomfunkhouser[P]gaps/pkgs/RNBasics/json.cpp
// Function: Json::Value::asString[abi:cxx11]() const
std::string Value::asString() const {
  switch (type_) {
  case nullValue:
    return "";
  case stringValue:
  {
    if (value_.string_ == 0) return "";
    unsigned this_len;
    char const* this_str;
    decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str);
    return std::string(this_str, this_len);
  }
  case booleanValue:
    return value_.bool_ ? "true" : "false";
  case intValue:
    return valueToString(value_.int_);
  case uintValue:
    return valueToString(value_.uint_);
  case realValue:
    return valueToString(value_.real_);
  default:
    JSON_FAIL_MESSAGE("Type is not convertible to string");
  }
}

// Assembly:
subq $0x238, %rsp            # imm = 0x238
movq %rdi, 0x40(%rsp)
movq %rdi, %rax
movq %rax, 0x48(%rsp)
movq %rdi, 0x230(%rsp)
movq %rsi, 0x228(%rsp)
movq 0x228(%rsp), %rax
movq %rax, 0x50(%rsp)
movzbl 0x8(%rax), %eax
movzwl %ax, %ecx
movq %rcx, 0x58(%rsp)
subw $0x5, %ax
ja 0xe3127
movq 0x58(%rsp), %rax
leaq 0x86cad(%rip), %rcx     # 0x169b90
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x227(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x12c30
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rdx
leaq 0x846f0(%rip), %rsi     # 0x1675ff
callq 0x22830
jmp 0xe2f16
leaq 0x227(%rsp), %rdi
callq 0x12760
jmp 0xe31bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x227(%rsp), %rdi
callq 0x12760
jmp 0xe31c9
movq 0x50(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xe2fbb
leaq 0x213(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x12c30
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rdx
leaq 0x84683(%rip), %rsi     # 0x1675ff
callq 0x22830
jmp 0xe2f83
leaq 0x213(%rsp), %rdi
callq 0x12760
jmp 0xe31bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x213(%rsp), %rdi
callq 0x12760
jmp 0xe31c9
movq 0x50(%rsp), %rax
movzwl 0x8(%rax), %edi
shrl $0x8, %edi
andl $0x1, %edi
movq (%rax), %rsi
leaq 0x20c(%rsp), %rdx
leaq 0x200(%rsp), %rcx
callq 0xed560
movq 0x200(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x20c(%rsp), %eax
movq %rax, 0x20(%rsp)
leaq 0x1ff(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x12c30
movq 0x40(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
callq 0x127f0
jmp 0xe3028
leaq 0x1ff(%rsp), %rdi
callq 0x12760
jmp 0xe31bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x1ff(%rsp), %rdi
callq 0x12760
jmp 0xe31c9
movq 0x50(%rsp), %rax
movb (%rax), %dl
leaq 0x87684(%rip), %rcx     # 0x16a6f2
leaq 0x87682(%rip), %rax     # 0x16a6f7
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x8(%rsp)
leaq 0x1fe(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x12c30
movq 0x40(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x22830
jmp 0xe30a9
leaq 0x1fe(%rsp), %rdi
callq 0x12760
jmp 0xe31bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x1fe(%rsp), %rdi
callq 0x12760
jmp 0xe31c9
movq 0x40(%rsp), %rdi
movq 0x50(%rsp), %rax
movq (%rax), %rsi
callq 0xedfd0
jmp 0xe31bc
movq 0x40(%rsp), %rdi
movq 0x50(%rsp), %rax
movq (%rax), %rsi
callq 0xee0e0
jmp 0xe31bc
movq 0x40(%rsp), %rdi
movq 0x50(%rsp), %rax
movsd (%rax), %xmm0
callq 0xee180
jmp 0xe31bc
leaq 0x80(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x12980
movq (%rsp), %rdi
leaq 0x875ba(%rip), %rsi     # 0x16a6fd
callq 0x126b0
jmp 0xe314a
leaq 0x60(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x12700
jmp 0xe315e
leaq 0x60(%rsp), %rdi
callq 0xec480
jmp 0xe316a
leaq 0x60(%rsp), %rdi
callq 0x12430
callq 0x12380
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0xe31ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x12430
leaq 0x80(%rsp), %rdi
callq 0x121a0
jmp 0xe31c9
movq 0x48(%rsp), %rax
addq $0x238, %rsp            # imm = 0x238
retq
movq 0x218(%rsp), %rdi
callq 0x12c20
nopw %cs:(%rax,%rax)