// File: tomfunkhouser[P]gaps/pkgs/RNBasics/json.cpp
// Function: Json::Value::operator[](unsigned int)
Value& Value::operator[](ArrayIndex index) {
  JSON_ASSERT_MESSAGE(
      type_ == nullValue || type_ == arrayValue,
      "in Json::Value::operator[](ArrayIndex): requires arrayValue");
  if (type_ == nullValue)
    *this = Value(arrayValue);
  CZString key(index);
  ObjectValues::iterator it = value_.map_->lower_bound(key);
  if (it != value_.map_->end() && (*it).first == key)
    return (*it).second;

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

// Assembly:
subq $0x298, %rsp            # imm = 0x298
movq %rdi, 0x288(%rsp)
movl %esi, 0x284(%rsp)
movq 0x288(%rsp), %rax
movq %rax, 0x38(%rsp)
movw 0x8(%rax), %ax
andw $0xff, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0xefdd6
movq 0x38(%rsp), %rax
movw 0x8(%rax), %ax
andw $0xff, %ax
movzwl %ax, %eax
cmpl $0x6, %eax
je 0xefdd6
leaq 0x108(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x12980
movq 0x30(%rsp), %rdi
leaq 0x7ac3a(%rip), %rsi     # 0x16a988
callq 0x126b0
jmp 0xefd55
leaq 0xd8(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x12700
jmp 0xefd6c
leaq 0xd8(%rsp), %rdi
callq 0xec480
jmp 0xefd7b
leaq 0xd8(%rsp), %rdi
callq 0x12430
callq 0x12380
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
jmp 0xefdc4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x12430
leaq 0x108(%rsp), %rdi
callq 0x121a0
jmp 0xf0011
movq 0x38(%rsp), %rax
movw 0x8(%rax), %ax
andw $0xff, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
jne 0xefe48
leaq 0xb0(%rsp), %rdi
movq %rdi, 0x28(%rsp)
movl $0x6, %esi
callq 0xecc20
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xe3700
jmp 0xefe13
leaq 0xb0(%rsp), %rdi
callq 0xed680
jmp 0xefe48
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0xed680
jmp 0xf0011
movl 0x284(%rsp), %esi
leaq 0xa0(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xec840
movq 0x38(%rsp), %rax
movq 0x18(%rsp), %rsi
movq (%rax), %rdi
callq 0xfa390
movq %rax, 0x20(%rsp)
jmp 0xefe7a
movq 0x38(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x98(%rsp)
movq (%rax), %rdi
callq 0xfa2a0
movq %rax, 0x90(%rsp)
leaq 0x98(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0xf9f50
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x17(%rsp)
jne 0xefec0
jmp 0xefee1
leaq 0x98(%rsp), %rdi
callq 0xf9f90
movq %rax, %rdi
leaq 0xa0(%rsp), %rsi
callq 0xecb80
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0xefeeb
jmp 0xeff2d
leaq 0x98(%rsp), %rdi
callq 0xf9f90
addq $0x10, %rax
movq %rax, 0x290(%rsp)
movl $0x1, 0x8c(%rsp)
jmp 0xeffe7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
jmp 0xf0004
movq 0xc05ec(%rip), %rdx     # 0x1b0520
leaq 0x50(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0xfa3c0
jmp 0xeff48
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0xfa2d0
movq (%rsp), %rdi
movq 0x40(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0xfa430
movq %rax, 0x8(%rsp)
jmp 0xeff80
movq 0x8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x98(%rsp)
leaq 0x98(%rsp), %rdi
callq 0xf9f90
addq $0x10, %rax
movq %rax, 0x290(%rsp)
movl $0x1, 0x8c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xfa470
jmp 0xeffe7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xfa470
jmp 0xf0004
leaq 0xa0(%rsp), %rdi
callq 0xec9f0
movq 0x290(%rsp), %rax
addq $0x298, %rsp            # imm = 0x298
retq
leaq 0xa0(%rsp), %rdi
callq 0xec9f0
movq 0x100(%rsp), %rdi
callq 0x12c20
nop