// File: halfflat[P]tinyopt/test/googletest/googletest/src/gtest.cc
// Function: testing::internal::JsonUnitTestResultPrinter::OutputJsonTestResult(std::ostream*, testing::TestResult const&)
void JsonUnitTestResultPrinter::OutputJsonTestResult(::std::ostream* stream,
                                                     const TestResult& result) {
  const std::string kIndent = Indent(10);

  int failures = 0;
  for (int i = 0; i < result.total_part_count(); ++i) {
    const TestPartResult& part = result.GetTestPartResult(i);
    if (part.failed()) {
      *stream << ",\n";
      if (++failures == 1) {
        *stream << kIndent << "\""
                << "failures"
                << "\": [\n";
      }
      const std::string location =
          internal::FormatCompilerIndependentFileLocation(part.file_name(),
                                                          part.line_number());
      const std::string message = EscapeJson(location + "\n" + part.message());
      *stream << kIndent << "  {\n"
              << kIndent << "    \"failure\": \"" << message << "\",\n"
              << kIndent << "    \"type\": \"\"\n"
              << kIndent << "  }";
    }
  }

  if (failures > 0) *stream << "\n" << kIndent << "]";
  *stream << "\n" << Indent(8) << "}";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
movl $0xa, %esi
callq 0x96b40
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0xf4(%rbp)
movq -0x10(%rbp), %rdi
callq 0x88580
movl %eax, %ecx
movl -0xf4(%rbp), %eax
cmpl %ecx, %eax
jge 0x97757
movq -0x10(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0x88520
movq %rax, -0x100(%rbp)
jmp 0x97456
movq -0x100(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0xa7700
movb %al, -0x101(%rbp)
jmp 0x97472
movb -0x101(%rbp), %al
testb $0x1, %al
jne 0x97481
jmp 0x97747
movq -0x8(%rbp), %rdi
leaq 0x37c43(%rip), %rsi     # 0xcf0cf
callq 0x10720
jmp 0x97493
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
cmpl $0x1, %eax
jne 0x97517
movq -0x8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x10680
movq %rax, -0x110(%rbp)
jmp 0x974b7
movq -0x110(%rbp), %rdi
leaq 0x37c07(%rip), %rsi     # 0xcf0cc
callq 0x10720
movq %rax, -0x118(%rbp)
jmp 0x974d3
movq -0x118(%rbp), %rdi
leaq 0x38480(%rip), %rsi     # 0xcf961
callq 0x10720
movq %rax, -0x120(%rbp)
jmp 0x974ef
movq -0x120(%rbp), %rdi
leaq 0x37b8e(%rip), %rsi     # 0xcf08b
callq 0x10720
jmp 0x97504
jmp 0x97517
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x97839
movq -0x40(%rbp), %rdi
callq 0xa4860
movq %rax, -0x128(%rbp)
jmp 0x97529
movq -0x40(%rbp), %rdi
callq 0xa48b0
movl %eax, -0x12c(%rbp)
jmp 0x9753a
movl -0x12c(%rbp), %edx
movq -0x128(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x7d6e0
jmp 0x97552
leaq 0x33e9d(%rip), %rdx     # 0xcb3f6
leaq -0xd0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x3c8f0
jmp 0x9756b
movq -0x40(%rbp), %rdi
callq 0xa48e0
movq %rax, -0x138(%rbp)
jmp 0x9757d
movq -0x138(%rbp), %rdx
leaq -0xb0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0xa2b40
jmp 0x97599
leaq -0x90(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x949b0
jmp 0x975ae
leaq -0xb0(%rbp), %rdi
callq 0x10fc8
leaq -0xd0(%rbp), %rdi
callq 0x10fc8
movq -0x8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x10680
movq %rax, -0x140(%rbp)
jmp 0x975dc
movq -0x140(%rbp), %rdi
leaq 0x37ace(%rip), %rsi     # 0xcf0b8
callq 0x10720
movq %rax, -0x148(%rbp)
jmp 0x975f8
movq -0x148(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x10680
movq %rax, -0x150(%rbp)
jmp 0x97611
movq -0x150(%rbp), %rdi
leaq 0x37a9e(%rip), %rsi     # 0xcf0bd
callq 0x10720
movq %rax, -0x158(%rbp)
jmp 0x9762d
movq -0x158(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x10680
movq %rax, -0x160(%rbp)
jmp 0x97649
movq -0x160(%rbp), %rdi
leaq 0x37a77(%rip), %rsi     # 0xcf0ce
callq 0x10720
movq %rax, -0x168(%rbp)
jmp 0x97665
movq -0x168(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x10680
movq %rax, -0x170(%rbp)
jmp 0x9767e
movq -0x170(%rbp), %rdi
leaq 0x37a46(%rip), %rsi     # 0xcf0d2
callq 0x10720
movq %rax, -0x178(%rbp)
jmp 0x9769a
movq -0x178(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x10680
movq %rax, -0x180(%rbp)
jmp 0x976b3
movq -0x180(%rbp), %rdi
leaq 0x37a21(%rip), %rsi     # 0xcf0e2
callq 0x10720
jmp 0x976c8
leaq -0x90(%rbp), %rdi
callq 0x10fc8
leaq -0x70(%rbp), %rdi
callq 0x10fc8
jmp 0x97747
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x97739
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x97713
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x10fc8
leaq -0xd0(%rbp), %rdi
callq 0x10fc8
jmp 0x97739
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x10fc8
leaq -0x70(%rbp), %rdi
callq 0x10fc8
jmp 0x97839
jmp 0x97749
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x9741f
cmpl $0x0, -0x34(%rbp)
jle 0x977a6
movq -0x8(%rbp), %rdi
leaq 0x33c8e(%rip), %rsi     # 0xcb3f6
callq 0x10720
movq %rax, -0x188(%rbp)
jmp 0x97776
movq -0x188(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x10680
movq %rax, -0x190(%rbp)
jmp 0x9778f
movq -0x190(%rbp), %rdi
leaq 0x36673(%rip), %rsi     # 0xcde10
callq 0x10720
jmp 0x977a4
jmp 0x977a6
movq -0x8(%rbp), %rdi
leaq 0x33c45(%rip), %rsi     # 0xcb3f6
callq 0x10720
movq %rax, -0x198(%rbp)
jmp 0x977bf
leaq -0xf0(%rbp), %rdi
movl $0x8, %esi
callq 0x96b40
jmp 0x977d2
movq -0x198(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x10680
movq %rax, -0x1a0(%rbp)
jmp 0x977ee
movq -0x1a0(%rbp), %rdi
leaq 0x378e8(%rip), %rsi     # 0xcf0e4
callq 0x10720
jmp 0x97803
leaq -0xf0(%rbp), %rdi
callq 0x10fc8
leaq -0x30(%rbp), %rdi
callq 0x10fc8
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x10fc8
leaq -0x30(%rbp), %rdi
callq 0x10fc8
movq -0x48(%rbp), %rdi
callq 0x10e00
nopl (%rax,%rax)