// File: tomfunkhouser[P]gaps/pkgs/RNBasics/json.cpp
// Function: Json::FastWriter::writeValue(Json::Value const&)
void FastWriter::writeValue(const Value& value) {
  switch (value.type()) {
  case nullValue:
    if (!dropNullPlaceholders_)
      document_ += "null";
    break;
  case intValue:
    document_ += valueToString(value.asLargestInt());
    break;
  case uintValue:
    document_ += valueToString(value.asLargestUInt());
    break;
  case realValue:
    document_ += 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) document_ += valueToQuotedStringN(str, static_cast<unsigned>(end-str));
    break;
  }
  case booleanValue:
    document_ += valueToString(value.asBool());
    break;
  case arrayValue: {
    document_ += '[';
    ArrayIndex size = value.size();
    for (ArrayIndex index = 0; index < size; ++index) {
      if (index > 0)
        document_ += ',';
      writeValue(value[index]);
    }
    document_ += ']';
  } break;
  case objectValue: {
    Value::Members members(value.getMemberNames());
    document_ += '{';
    for (Value::Members::iterator it = members.begin(); it != members.end();
         ++it) {
      const std::string& name = *it;
      if (it != members.begin())
        document_ += ',';
      document_ += valueToQuotedStringN(name.data(), static_cast<unsigned>(name.length()));
      document_ += yamlCompatiblityEnabled_ ? ": " : ":";
      writeValue(value[name]);
    }
    document_ += '}';
  } break;
  }
}

// Assembly:
subq $0x188, %rsp            # imm = 0x188
movq %rdi, 0x180(%rsp)
movq %rsi, 0x178(%rsp)
movq 0x180(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x178(%rsp), %rdi
callq 0xed7d0
movl %eax, %ecx
movq %rcx, 0x48(%rsp)
subl $0x7, %eax
ja 0xf39e5
movq 0x48(%rsp), %rax
leaq 0x76b7f(%rip), %rcx     # 0x16a04c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x40(%rsp), %rax
testb $0x1, 0x29(%rax)
jne 0xf34f6
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
leaq 0x776dc(%rip), %rsi     # 0x16abcd
callq 0x12670
jmp 0xf39e5
movq 0x178(%rsp), %rdi
callq 0xef040
movq %rax, %rsi
leaq 0x158(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0xedfd0
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
addq $0x8, %rdi
callq 0x12910
jmp 0xf3532
leaq 0x158(%rsp), %rdi
callq 0x12430
jmp 0xf39e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0x158(%rsp), %rdi
callq 0x12430
jmp 0xf39ed
movq 0x178(%rsp), %rdi
callq 0xef050
movq %rax, %rsi
leaq 0x128(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xee0e0
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
addq $0x8, %rdi
callq 0x12910
jmp 0xf35a1
leaq 0x128(%rsp), %rdi
callq 0x12430
jmp 0xf39e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x12430
jmp 0xf39ed
movq 0x178(%rsp), %rdi
callq 0xef060
leaq 0x108(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0xee180
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
addq $0x8, %rdi
callq 0x12910
jmp 0xf360d
leaq 0x108(%rsp), %rdi
callq 0x12430
jmp 0xf39e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0x108(%rsp), %rdi
callq 0x12430
jmp 0xf39ed
movq 0x178(%rsp), %rdi
leaq 0x100(%rsp), %rsi
leaq 0xf8(%rsp), %rdx
callq 0xedf30
andb $0x1, %al
movb %al, 0xf7(%rsp)
testb $0x1, 0xf7(%rsp)
je 0xf36e4
movq 0x100(%rsp), %rsi
movl 0xf8(%rsp), %edx
movl %esi, %eax
subl %eax, %edx
leaq 0xd0(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xf3a00
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rsi
addq $0x8, %rdi
callq 0x12910
jmp 0xf36af
leaq 0xd0(%rsp), %rdi
callq 0x12430
jmp 0xf36e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x12430
jmp 0xf39ed
jmp 0xf39e5
movq 0x178(%rsp), %rdi
callq 0xe9f30
movzbl %al, %esi
leaq 0xb0(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xf2cb0
movq 0x40(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x8, %rdi
callq 0x12910
jmp 0xf3720
leaq 0xb0(%rsp), %rdi
callq 0x12430
jmp 0xf39e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x12430
jmp 0xf39ed
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
movl $0x5b, %esi
callq 0x12450
movq 0x178(%rsp), %rdi
callq 0xeb340
movl %eax, 0xac(%rsp)
movl $0x0, 0xa8(%rsp)
movl 0xa8(%rsp), %eax
cmpl 0xac(%rsp), %eax
jae 0xf37eb
cmpl $0x0, 0xa8(%rsp)
jbe 0xf37b7
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
movl $0x2c, %esi
callq 0x12450
movq 0x178(%rsp), %rdi
movl 0xa8(%rsp), %esi
callq 0xf0020
movq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0xf3480
movl 0xa8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xa8(%rsp)
jmp 0xf378a
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
movl $0x5d, %esi
callq 0x12450
jmp 0xf39e5
movq 0x178(%rsp), %rsi
leaq 0x90(%rsp), %rdi
callq 0xeafb0
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
movl $0x7b, %esi
callq 0x12450
jmp 0xf382d
leaq 0x90(%rsp), %rdi
callq 0xfac70
movq %rax, 0x88(%rsp)
leaq 0x90(%rsp), %rdi
callq 0xface0
movq %rax, 0x80(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0xfaca0
testb $0x1, %al
jne 0xf3875
jmp 0xf39b2
leaq 0x88(%rsp), %rdi
callq 0xfad10
movq %rax, 0x78(%rsp)
leaq 0x90(%rsp), %rdi
callq 0xfac70
movq %rax, 0x70(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xfaca0
testb $0x1, %al
jne 0xf38b1
jmp 0xf38e1
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
movl $0x2c, %esi
callq 0x12450
jmp 0xf38c6
jmp 0xf38e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
jmp 0xf39d6
movq 0x78(%rsp), %rdi
callq 0x12930
movq %rax, 0x10(%rsp)
movq 0x78(%rsp), %rdi
callq 0x12a90
movq 0x10(%rsp), %rsi
movl %eax, %edx
leaq 0x50(%rsp), %rdi
callq 0xf3a00
jmp 0xf390d
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
leaq 0x50(%rsp), %rsi
callq 0x12910
jmp 0xf3922
leaq 0x50(%rsp), %rdi
callq 0x12430
movq 0x40(%rsp), %rdi
movb 0x28(%rdi), %cl
leaq 0x772d2(%rip), %rax     # 0x16ac0d
leaq 0x772c3(%rip), %rsi     # 0x16ac05
testb $0x1, %cl
cmovneq %rax, %rsi
addq $0x8, %rdi
callq 0x12670
jmp 0xf3954
movq 0x178(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0xeb2b0
movq %rax, 0x8(%rsp)
jmp 0xf396d
movq 0x8(%rsp), %rsi
movq 0x40(%rsp), %rdi
callq 0xf3480
jmp 0xf397e
jmp 0xf3980
leaq 0x88(%rsp), %rdi
callq 0xfad20
jmp 0xf3842
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x12430
jmp 0xf39d6
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
movl $0x7d, %esi
callq 0x12450
jmp 0xf39c7
leaq 0x90(%rsp), %rdi
callq 0xf9da0
jmp 0xf39e5
leaq 0x90(%rsp), %rdi
callq 0xf9da0
jmp 0xf39ed
addq $0x188, %rsp            # imm = 0x188
retq
movq 0x150(%rsp), %rdi
callq 0x12c20
nopw (%rax,%rax)