// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/json.cpp
// Function: Json::BuiltStyledStreamWriter::writeValue(Json::Value const&)
void BuiltStyledStreamWriter::writeValue(Value const& value) {
  switch (value.type()) {
  case nullValue:
    pushValue(nullSymbol_);
    break;
  case intValue:
    pushValue(valueToString(value.asLargestInt()));
    break;
  case uintValue:
    pushValue(valueToString(value.asLargestUInt()));
    break;
  case realValue:
    pushValue(valueToString(value.asDouble(), useSpecialFloats_, precision_));
    break;
  case stringValue:
  {
    // Is NULL is 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 (;;) {
        std::string const& name = *it;
        Value const& childValue = value[name];
        writeCommentBeforeValue(childValue);
        writeWithIndent(valueToQuotedStringN(name.data(), static_cast<unsigned>(name.length())));
        *sout_ << colonSymbol_;
        writeValue(childValue);
        if (++it == members.end()) {
          writeCommentAfterValueOnSameLine(childValue);
          break;
        }
        *sout_ << ",";
        writeCommentAfterValueOnSameLine(childValue);
      }
      unindent();
      writeWithIndent("}");
    }
  } break;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movzwl 0x8(%rsi), %eax
cmpb $0x7, %al
ja 0x881e4
movq %rsi, %r14
movq %rdi, %rbx
movzbl %al, %ecx
leaq 0x39098(%rip), %rdx     # 0xc0f00
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x98(%rbx), %rsi
movq %rbx, %rdi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x88490
cmpb $0x4, %al
sete %cl
movq (%r14), %r14
testq %r14, %r14
setne %bpl
andb %cl, %bpl
cmpb $0x1, %bpl
jne 0x8815d
btl $0x8, %eax
jb 0x8819a
movq %r14, %rdi
callq 0x11260
jmp 0x881a1
movq %r14, %rdi
callq 0x82ef4
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x82a33
movq %rbx, %rdi
movq %r14, %rsi
callq 0x88490
jmp 0x881c9
movq %r14, %rdi
callq 0x830e6
movb 0xd8(%rbx), %al
andb $0x4, %al
shrb $0x2, %al
movl 0xdc(%rbx), %edx
movzbl %al, %esi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x85332
movq %rbx, %rdi
movq %r14, %rsi
callq 0x88490
jmp 0x881c9
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x80cd4
movq (%r15), %rax
leaq 0x18(%rsp), %r12
cmpq 0x8(%r15), %rax
je 0x8815f
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x39af7(%rip), %rsi     # 0xc1a4a
leaq 0x39af1(%rip), %rdx     # 0xc1a4b
callq 0x1ab58
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x88782
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x87f83
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x115c0
leaq 0x28(%rbx), %rdi
movq 0x50(%rbx), %rsi
movq 0x58(%rbx), %rdx
movq %rdi, 0x28(%rsp)
callq 0x111e0
movq 0x30(%rsp), %r15
leaq 0x8(%rsp), %r12
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x841d8
leaq 0x38f84(%rip), %rbp     # 0xc0f40
testq %rax, %rax
je 0x87fc4
movq %rax, %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x87cec
movq (%r15), %rsi
movl 0x8(%r15), %edx
movq %r12, %rdi
callq 0x85ccd
movq %rbx, %rdi
movq %r12, %rsi
callq 0x88782
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x88005
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x115c0
movq 0x8(%rbx), %rdi
movq 0x78(%rbx), %rsi
movq 0x80(%rbx), %rdx
callq 0x116d0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x87e3e
addq $0x20, %r15
movq 0x38(%rsp), %r13
cmpq %r13, %r15
je 0x88047
movq 0x8(%rbx), %rdi
movl $0x1, %edx
leaq 0x368cf(%rip), %rsi     # 0xbe911
callq 0x116d0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x882de
cmpq %r13, %r15
jne 0x87fa3
movq 0x30(%rbx), %rsi
subq 0x58(%rbx), %rsi
movq 0x28(%rsp), %rdi
xorl %edx, %edx
callq 0x111d0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %r14
movq %r14, (%rdi)
leaq 0x399c5(%rip), %rsi     # 0xc1a48
leaq 0x399bf(%rip), %rdx     # 0xc1a49
callq 0x1ab58
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x88782
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x880b3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x115c0
leaq 0x30(%rsp), %rdi
callq 0x89d42
jmp 0x881e4
movq %r14, %rdi
callq 0x82d26
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x82936
movq %rbx, %rdi
movq %r14, %rsi
callq 0x88490
jmp 0x881c9
movq %r14, %rdi
callq 0x8049c
leaq 0x39439(%rip), %rcx     # 0xc1532
leaq 0x39437(%rip), %rsi     # 0xc1537
testb %al, %al
cmovneq %rcx, %rsi
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movzbl %al, %edx
xorq $0x5, %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x1ab58
movq %rbx, %rdi
movq %r14, %rsi
callq 0x88490
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x881d7
jmp 0x881e4
movq %rbx, %rdi
movq %r14, %rsi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x884b6
jmp 0x881a6
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x398d9(%rip), %rsi     # 0xc1a47
leaq 0x398d4(%rip), %rdx     # 0xc1a49
callq 0x1ab58
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x88490
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
jne 0x880a6
jmp 0x880b3
movl (%r14), %eax
addq $0x4, %r14
movl %eax, %edx
addq %r14, %rdx
testb %bpl, %bpl
je 0x881f3
subl %r14d, %edx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x85ccd
movq %rbx, %rdi
movq %r15, %rsi
callq 0x88490
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x881e4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x115c0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x36434(%rip), %rdx     # 0xbe637
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x1ab58
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x88490
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
jne 0x881d7
jmp 0x881e4
jmp 0x88261
jmp 0x882c8
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
jne 0x88296
jmp 0x882d5
movq %rax, %rbx
jmp 0x882d5
jmp 0x88285
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
jne 0x882b9
jmp 0x882cb
jmp 0x882c8
jmp 0x882c8
jmp 0x882c8
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
jne 0x882b9
jmp 0x882cb
jmp 0x882c8
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x88296
jmp 0x882d5
jmp 0x88285
jmp 0x88285
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x882d5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x115c0
jmp 0x882d5
jmp 0x882c8
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x882cb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x115c0
jmp 0x882cb
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x89d42
movq %rbx, %rdi
callq 0x11a70
nop