// File: tomfunkhouser[P]gaps/pkgs/RNBasics/json.cpp
// Function: Json::StyledWriter::writeValue(Json::Value const&)
void StyledWriter::writeValue(const Value& value) {
  switch (value.type()) {
  case nullValue:
    pushValue("null");
    break;
  case intValue:
    pushValue(valueToString(value.asLargestInt()));
    break;
  case uintValue:
    pushValue(valueToString(value.asLargestUInt()));
    break;
  case realValue:
    pushValue(valueToString(value.asDouble()));
    break;
  case stringValue:
  {
    // Is NULL possible for value.string_?
    char const* str;
    char const* end;
    bool ok = value.getString(&str, &end);
    if (ok) pushValue(valueToQuotedStringN(str, static_cast<unsigned>(end-str)));
    else pushValue("");
    break;
  }
  case booleanValue:
    pushValue(valueToString(value.asBool()));
    break;
  case arrayValue:
    writeArrayValue(value);
    break;
  case objectValue: {
    Value::Members members(value.getMemberNames());
    if (members.empty())
      pushValue("{}");
    else {
      writeWithIndent("{");
      indent();
      Value::Members::iterator it = members.begin();
      for (;;) {
        const std::string& name = *it;
        const Value& childValue = value[name];
        writeCommentBeforeValue(childValue);
        writeWithIndent(valueToQuotedString(name.c_str()));
        document_ += " : ";
        writeValue(childValue);
        if (++it == members.end()) {
          writeCommentAfterValueOnSameLine(childValue);
          break;
        }
        document_ += ',';
        writeCommentAfterValueOnSameLine(childValue);
      }
      unindent();
      writeWithIndent("}");
    }
  } break;
  }
}

// Assembly:
subq $0x268, %rsp            # imm = 0x268
movq %rdi, 0x260(%rsp)
movq %rsi, 0x258(%rsp)
movq 0x260(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x258(%rsp), %rdi
callq 0xed7d0
movl %eax, %ecx
movq %rcx, 0x68(%rsp)
subl $0x7, %eax
ja 0xf498c
movq 0x68(%rsp), %rax
leaq 0x75e6f(%rip), %rcx     # 0x16a06c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x237(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x12c30
movq 0x58(%rsp), %rdx
leaq 0x769a9(%rip), %rsi     # 0x16abcd
leaq 0x238(%rsp), %rdi
callq 0x22830
jmp 0xf4233
movq 0x60(%rsp), %rdi
leaq 0x238(%rsp), %rsi
callq 0xf4b40
jmp 0xf4247
leaq 0x238(%rsp), %rdi
callq 0x12430
leaq 0x237(%rsp), %rdi
callq 0x12760
jmp 0xf498c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
jmp 0xf429d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
leaq 0x238(%rsp), %rdi
callq 0x12430
leaq 0x237(%rsp), %rdi
callq 0x12760
jmp 0xf4994
movq 0x258(%rsp), %rdi
callq 0xef040
movq %rax, %rsi
leaq 0x200(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0xedfd0
movq 0x60(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0xf4b40
jmp 0xf42e2
leaq 0x200(%rsp), %rdi
callq 0x12430
jmp 0xf498c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
leaq 0x200(%rsp), %rdi
callq 0x12430
jmp 0xf4994
movq 0x258(%rsp), %rdi
callq 0xef050
movq %rax, %rsi
leaq 0x1e0(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0xee0e0
movq 0x60(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0xf4b40
jmp 0xf434d
leaq 0x1e0(%rsp), %rdi
callq 0x12430
jmp 0xf498c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
leaq 0x1e0(%rsp), %rdi
callq 0x12430
jmp 0xf4994
movq 0x258(%rsp), %rdi
callq 0xef060
leaq 0x1c0(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0xee180
movq 0x60(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0xf4b40
jmp 0xf43b5
leaq 0x1c0(%rsp), %rdi
callq 0x12430
jmp 0xf498c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
leaq 0x1c0(%rsp), %rdi
callq 0x12430
jmp 0xf4994
movq 0x258(%rsp), %rdi
leaq 0x1b8(%rsp), %rsi
leaq 0x1b0(%rsp), %rdx
callq 0xedf30
andb $0x1, %al
movb %al, 0x1af(%rsp)
testb $0x1, 0x1af(%rsp)
je 0xf448b
movq 0x1b8(%rsp), %rsi
movl 0x1b0(%rsp), %edx
movl %esi, %eax
subl %eax, %edx
leaq 0x188(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0xf3a00
movq 0x60(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0xf4b40
jmp 0xf4453
leaq 0x188(%rsp), %rdi
callq 0x12430
jmp 0xf4531
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x12430
jmp 0xf4994
leaq 0x167(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x12c30
movq 0x30(%rsp), %rdx
leaq 0x73156(%rip), %rsi     # 0x1675ff
leaq 0x168(%rsp), %rdi
callq 0x22830
jmp 0xf44b8
movq 0x60(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0xf4b40
jmp 0xf44cc
leaq 0x168(%rsp), %rdi
callq 0x12430
leaq 0x167(%rsp), %rdi
callq 0x12760
jmp 0xf4531
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
jmp 0xf451f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
leaq 0x168(%rsp), %rdi
callq 0x12430
leaq 0x167(%rsp), %rdi
callq 0x12760
jmp 0xf4994
jmp 0xf498c
movq 0x258(%rsp), %rdi
callq 0xe9f30
movzbl %al, %esi
leaq 0x140(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0xf2cb0
movq 0x60(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xf4b40
jmp 0xf4569
leaq 0x140(%rsp), %rdi
callq 0x12430
jmp 0xf498c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x12430
jmp 0xf4994
movq 0x60(%rsp), %rdi
movq 0x258(%rsp), %rsi
callq 0xf4b90
jmp 0xf498c
movq 0x258(%rsp), %rsi
leaq 0x128(%rsp), %rdi
callq 0xeafb0
leaq 0x128(%rsp), %rdi
callq 0xfad40
testb $0x1, %al
jne 0xf45e3
jmp 0xf468c
leaq 0x107(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x12c30
movq 0x20(%rsp), %rdx
leaq 0x76606(%rip), %rsi     # 0x16ac07
leaq 0x108(%rsp), %rdi
callq 0x22830
jmp 0xf4610
movq 0x60(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0xf4b40
jmp 0xf4624
leaq 0x108(%rsp), %rdi
callq 0x12430
leaq 0x107(%rsp), %rdi
callq 0x12760
jmp 0xf496e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
jmp 0xf467a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
leaq 0x108(%rsp), %rdi
callq 0x12430
leaq 0x107(%rsp), %rdi
callq 0x12760
jmp 0xf497d
leaq 0xdf(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x12c30
movq 0x18(%rsp), %rdx
leaq 0x76560(%rip), %rsi     # 0x16ac0a
leaq 0xe0(%rsp), %rdi
callq 0x22830
jmp 0xf46b9
movq 0x60(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0xf4f40
jmp 0xf46cd
leaq 0xe0(%rsp), %rdi
callq 0x12430
leaq 0xdf(%rsp), %rdi
callq 0x12760
movq 0x60(%rsp), %rdi
callq 0xf4f80
jmp 0xf46f3
leaq 0x128(%rsp), %rdi
callq 0xfac70
movq %rax, 0xd0(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0xfad10
movq %rax, 0xc8(%rsp)
movq 0x258(%rsp), %rdi
movq 0xc8(%rsp), %rsi
callq 0xeb2b0
movq %rax, 0x10(%rsp)
jmp 0xf4739
movq 0x60(%rsp), %rdi
movq 0x10(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0xc0(%rsp), %rsi
callq 0xf4000
jmp 0xf475a
movq 0xc8(%rsp), %rdi
callq 0x12280
movq %rax, %rsi
leaq 0xa0(%rsp), %rdi
callq 0xf2d50
jmp 0xf4779
movq 0x60(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0xf4f40
jmp 0xf478d
leaq 0xa0(%rsp), %rdi
callq 0x12430
movq 0x60(%rsp), %rdi
addq $0x20, %rdi
leaq 0x76462(%rip), %rsi     # 0x16ac0c
callq 0x12670
jmp 0xf47b1
movq 0x60(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0xf41b0
jmp 0xf47c5
leaq 0xd0(%rsp), %rdi
callq 0xfad20
movq %rax, 0x8(%rsp)
leaq 0x128(%rsp), %rdi
callq 0xface0
movq 0x8(%rsp), %rdi
movq %rax, 0x98(%rsp)
leaq 0x98(%rsp), %rsi
callq 0xfad90
testb $0x1, %al
jne 0xf4807
jmp 0xf48a8
movq 0x60(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0xf49b0
jmp 0xf481b
jmp 0xf48d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
jmp 0xf4857
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
leaq 0xe0(%rsp), %rdi
callq 0x12430
leaq 0xdf(%rsp), %rdi
callq 0x12760
jmp 0xf497d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
jmp 0xf497d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x12430
jmp 0xf497d
movq 0x60(%rsp), %rdi
addq $0x20, %rdi
movl $0x2c, %esi
callq 0x12450
jmp 0xf48bd
movq 0x60(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0xf49b0
jmp 0xf48d1
jmp 0xf4708
movq 0x60(%rsp), %rdi
callq 0xf5030
jmp 0xf48e2
leaq 0x77(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x12c30
movq (%rsp), %rdx
leaq 0x7630d(%rip), %rsi     # 0x16ac08
leaq 0x78(%rsp), %rdi
callq 0x22830
jmp 0xf4907
movq 0x60(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xf4f40
jmp 0xf4918
leaq 0x78(%rsp), %rdi
callq 0x12430
leaq 0x77(%rsp), %rdi
callq 0x12760
jmp 0xf496e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
jmp 0xf4962
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x228(%rsp)
movl %eax, 0x224(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x12430
leaq 0x77(%rsp), %rdi
callq 0x12760
jmp 0xf497d
leaq 0x128(%rsp), %rdi
callq 0xf9da0
jmp 0xf498c
leaq 0x128(%rsp), %rdi
callq 0xf9da0
jmp 0xf4994
addq $0x268, %rsp            # imm = 0x268
retq
movq 0x228(%rsp), %rdi
callq 0x12c20
nopw %cs:(%rax,%rax)