// File: tomfunkhouser[P]gaps/pkgs/RNBasics/json.cpp
// Function: Json::BuiltStyledStreamWriter::writeArrayValue(Json::Value const&)
void BuiltStyledStreamWriter::writeArrayValue(Value const& value) {
  unsigned size = value.size();
  if (size == 0)
    pushValue("[]");
  else {
    bool isMultiLine = (cs_ == CommentStyle::All) || isMultineArray(value);
    if (isMultiLine) {
      writeWithIndent("[");
      indent();
      bool hasChildValue = !childValues_.empty();
      unsigned index = 0;
      for (;;) {
        Value const& childValue = value[index];
        writeCommentBeforeValue(childValue);
        if (hasChildValue)
          writeWithIndent(childValues_[index]);
        else {
          if (!indented_) writeIndent();
          indented_ = true;
          writeValue(childValue);
          indented_ = false;
        }
        if (++index == size) {
          writeCommentAfterValueOnSameLine(childValue);
          break;
        }
        *sout_ << ",";
        writeCommentAfterValueOnSameLine(childValue);
      }
      unindent();
      writeWithIndent("]");
    } else // output on a single line
    {
      assert(childValues_.size() == size);
      *sout_ << "[";
      if (!indentation_.empty()) *sout_ << " ";
      for (unsigned index = 0; index < size; ++index) {
        if (index > 0)
          *sout_ << ", ";
        *sout_ << childValues_[index];
      }
      if (!indentation_.empty()) *sout_ << " ";
      *sout_ << "]";
    }
  }
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xc8(%rsp), %rdi
callq 0xeb340
movl %eax, 0xc4(%rsp)
cmpl $0x0, 0xc4(%rsp)
jne 0xf770f
leaq 0x9f(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x12c30
movq 0x20(%rsp), %rdx
leaq 0x7358c(%rip), %rsi     # 0x16ac10
leaq 0xa0(%rsp), %rdi
callq 0x22830
jmp 0xf7693
movq 0x28(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0xf75d0
jmp 0xf76a7
leaq 0xa0(%rsp), %rdi
callq 0x12430
leaq 0x9f(%rsp), %rdi
callq 0x12760
jmp 0xf7a79
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0xf76fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x12430
leaq 0x9f(%rsp), %rdi
callq 0x12760
jmp 0xf7a81
movq 0x28(%rsp), %rcx
movb $0x1, %al
cmpl $0x2, 0x70(%rcx)
movb %al, 0x1f(%rsp)
je 0xf7736
movq 0x28(%rsp), %rdi
movq 0xc8(%rsp), %rsi
callq 0xf7b70
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
andb $0x1, %al
movb %al, 0x8b(%rsp)
testb $0x1, 0x8b(%rsp)
je 0xf7999
leaq 0x67(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x12c30
movq 0x10(%rsp), %rdx
leaq 0x6f590(%rip), %rsi     # 0x166cfc
leaq 0x68(%rsp), %rdi
callq 0x22830
jmp 0xf7778
movq 0x28(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0xf7a90
jmp 0xf7789
leaq 0x68(%rsp), %rdi
callq 0x12430
leaq 0x67(%rsp), %rdi
callq 0x12760
movq 0x28(%rsp), %rdi
callq 0xf7af0
movq 0x28(%rsp), %rdi
addq $0x10, %rdi
callq 0xfad40
xorb $-0x1, %al
andb $0x1, %al
movb %al, 0x66(%rsp)
movl $0x0, 0x60(%rsp)
movq 0xc8(%rsp), %rdi
movl 0x60(%rsp), %esi
callq 0xf0020
movq 0x28(%rsp), %rdi
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rsi
callq 0xf6a90
testb $0x1, 0x66(%rsp)
je 0xf785a
movq 0x28(%rsp), %rdi
addq $0x10, %rdi
movl 0x60(%rsp), %eax
movl %eax, %esi
callq 0xf9cf0
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0xf7a90
jmp 0xf78ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0xf784b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x12430
leaq 0x67(%rsp), %rdi
callq 0x12760
jmp 0xf7a81
movq 0x28(%rsp), %rax
movb 0xd8(%rax), %al
shrb %al
andb $0x1, %al
testb $0x1, %al
jne 0xf7877
movq 0x28(%rsp), %rdi
callq 0xf6c60
movq 0x28(%rsp), %rdi
movb 0xd8(%rdi), %al
andb $-0x3, %al
orb $0x2, %al
movb %al, 0xd8(%rdi)
movq 0x58(%rsp), %rsi
callq 0xf6cb0
movq 0x28(%rsp), %rax
movb 0xd8(%rax), %cl
andb $-0x3, %cl
orb $0x0, %cl
movb %cl, 0xd8(%rax)
movl 0x60(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x60(%rsp)
cmpl 0xc4(%rsp), %eax
jne 0xf78d2
movq 0x28(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0xf7450
jmp 0xf78fb
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x70007(%rip), %rsi     # 0x1678e9
callq 0x126b0
movq 0x28(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0xf7450
jmp 0xf77c5
movq 0x28(%rsp), %rdi
callq 0xf7b10
leaq 0x37(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x12c30
movq 0x8(%rsp), %rdx
leaq 0x6f407(%rip), %rsi     # 0x166d27
leaq 0x38(%rsp), %rdi
callq 0x22830
jmp 0xf792c
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0xf7a90
jmp 0xf793d
leaq 0x38(%rsp), %rdi
callq 0x12430
leaq 0x37(%rsp), %rdi
callq 0x12760
jmp 0xf7a77
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0xf798a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x12430
leaq 0x37(%rsp), %rdi
callq 0x12760
jmp 0xf7a81
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x6f353(%rip), %rsi     # 0x166cfc
callq 0x126b0
movq 0x28(%rsp), %rdi
addq $0x50, %rdi
callq 0x12ba0
testb $0x1, %al
jne 0xf79d5
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x6fc67(%rip), %rsi     # 0x167637
callq 0x126b0
movl $0x0, 0x30(%rsp)
movl 0x30(%rsp), %eax
cmpl 0xc4(%rsp), %eax
jae 0xf7a3b
cmpl $0x0, 0x30(%rsp)
jbe 0xf7a06
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x73215(%rip), %rsi     # 0x16ac16
callq 0x126b0
movq 0x28(%rsp), %rdi
movq 0x8(%rdi), %rax
movq %rax, (%rsp)
addq $0x10, %rdi
movl 0x30(%rsp), %eax
movl %eax, %esi
callq 0xf9cf0
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x12600
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0xf79dd
movq 0x28(%rsp), %rdi
addq $0x50, %rdi
callq 0x12ba0
testb $0x1, %al
jne 0xf7a62
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x6fbda(%rip), %rsi     # 0x167637
callq 0x126b0
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x6f2b5(%rip), %rsi     # 0x166d27
callq 0x126b0
jmp 0xf7a79
addq $0xd8, %rsp
retq
movq 0x90(%rsp), %rdi
callq 0x12c20
nop