// File: tomfunkhouser[P]gaps/pkgs/RNBasics/json.cpp
// Function: Json::Value::resolveReference(char const*)
Value& Value::resolveReference(const char* key) {
  JSON_ASSERT_MESSAGE(
      type_ == nullValue || type_ == objectValue,
      "in Json::Value::resolveReference(): requires objectValue");
  if (type_ == nullValue)
    *this = Value(objectValue);
  CZString actualKey(
      key, static_cast<unsigned>(strlen(key)), CZString::noDuplication); // NOTE!
  ObjectValues::iterator it = value_.map_->lower_bound(actualKey);
  if (it != value_.map_->end() && (*it).first == actualKey)
    return (*it).second;

  ObjectValues::value_type defaultValue(actualKey, nullRef);
  it = value_.map_->insert(it, defaultValue);
  Value& value = (*it).second;
  return value;
}

// Assembly:
subq $0x2a8, %rsp            # imm = 0x2A8
movq %rdi, 0x298(%rsp)
movq %rsi, 0x290(%rsp)
movq 0x298(%rsp), %rax
movq %rax, 0x40(%rsp)
movw 0x8(%rax), %ax
andw $0xff, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0xf0407
movq 0x40(%rsp), %rax
movw 0x8(%rax), %ax
andw $0xff, %ax
movzwl %ax, %eax
cmpl $0x7, %eax
je 0xf0407
leaq 0x118(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x12980
movq 0x38(%rsp), %rdi
leaq 0x7a70c(%rip), %rsi     # 0x16aa8b
callq 0x126b0
jmp 0xf0386
leaq 0xe8(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0x12700
jmp 0xf039d
leaq 0xe8(%rsp), %rdi
callq 0xec480
jmp 0xf03ac
leaq 0xe8(%rsp), %rdi
callq 0x12430
callq 0x12380
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0xf03f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x12430
leaq 0x118(%rsp), %rdi
callq 0x121a0
jmp 0xf0660
movq 0x40(%rsp), %rax
movw 0x8(%rax), %ax
andw $0xff, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
jne 0xf0479
leaq 0xc0(%rsp), %rdi
movq %rdi, 0x30(%rsp)
movl $0x7, %esi
callq 0xecc20
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0xe3700
jmp 0xf0444
leaq 0xc0(%rsp), %rdi
callq 0xed680
jmp 0xf0479
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0xed680
jmp 0xf0660
movq 0x290(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x122b0
movq 0x18(%rsp), %rsi
movl %eax, %edx
leaq 0xb0(%rsp), %rdi
movq %rdi, 0x20(%rsp)
xorl %ecx, %ecx
callq 0xec860
movq 0x40(%rsp), %rax
movq 0x20(%rsp), %rsi
movq (%rax), %rdi
callq 0xfa390
movq %rax, 0x28(%rsp)
jmp 0xf04bf
movq 0x40(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0xa8(%rsp)
movq (%rax), %rdi
callq 0xfa2a0
movq %rax, 0xa0(%rsp)
leaq 0xa8(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0xf9f50
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x17(%rsp)
jne 0xf0505
jmp 0xf0526
leaq 0xa8(%rsp), %rdi
callq 0xf9f90
movq %rax, %rdi
leaq 0xb0(%rsp), %rsi
callq 0xecb80
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0xf0530
jmp 0xf0572
leaq 0xa8(%rsp), %rdi
callq 0xf9f90
addq $0x10, %rax
movq %rax, 0x2a0(%rsp)
movl $0x1, 0x9c(%rsp)
jmp 0xf0636
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0xf0653
movq 0xbffa7(%rip), %rdx     # 0x1b0520
leaq 0x60(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0xfa3c0
jmp 0xf058d
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
leaq 0x50(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0xfa2d0
movq (%rsp), %rdi
movq 0x50(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0xfa430
movq %rax, 0x8(%rsp)
jmp 0xf05c5
movq 0x8(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0xa8(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0xf9f90
addq $0x10, %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x2a0(%rsp)
movl $0x1, 0x9c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0xfa470
jmp 0xf0636
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0xfa470
jmp 0xf0653
leaq 0xb0(%rsp), %rdi
callq 0xec9f0
movq 0x2a0(%rsp), %rax
addq $0x2a8, %rsp            # imm = 0x2A8
retq
leaq 0xb0(%rsp), %rdi
callq 0xec9f0
movq 0x110(%rsp), %rdi
callq 0x12c20
nopl (%rax)