// File: afborchert[P]fmt/test_suite.cpp
// Function: bool special_testcase<char, void*>(int, char const*, char const*, void*&&)
bool special_testcase(int expected_count,
      const CharT* expected_string,
      const CharT* format, Values&&... values) {
   ++testcases;
   bool ok = true;
   std::basic_ostringstream<CharT> os;
   auto count = fmt::printf(os, format, std::forward<Values>(values)...);
   if ((count < 0 || expected_count < 0) && count != expected_count) {
      print("special test for \"%s\" fails,", format);
      print(" fmt returns %d but we expected %d\n", count, expected_count);
      print_values(1, values...);
      return false;
   }
   if (count != expected_count) {
      ok = false;
   }
   std::basic_string<CharT> fmt_str(os.str());
   std::basic_string<CharT> expected_str(expected_string);
   if (fmt_str != expected_str) {
      ok = false;
   }
   if (ok) {
      ++successful; return true;
   } else {
      print("special test for \"%s\" fails:\n", format);
      if (count != expected_count) {
	 print("   fmt returns:           %d\n", count);
	 print("   expected return value: %d\n", expected_count);
      }
      print("   fmt delivers:          \"%s\"\n", fmt_str);
      print("   expected:              \"%s\"\n", expected_str);
      print_values(1, values...);
      return false;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp            # imm = 0x220
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl 0x867ac(%rip), %eax     # 0x954bc
incl %eax
movl %eax, 0x867a4(%rip)     # 0x954bc
movb $0x1, -0x21(%rbp)
leaq -0x1a0(%rbp), %rdi
movq %rdi, -0x208(%rbp)
callq 0x8640
movq -0x208(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x70260
movl %eax, -0x200(%rbp)
jmp 0xed4b
movl -0x200(%rbp), %eax
movl %eax, -0x1a4(%rbp)
cmpl $0x0, -0x1a4(%rbp)
jl 0xed66
cmpl $0x0, -0x8(%rbp)
jge 0xedd9
movl -0x1a4(%rbp), %eax
cmpl -0x8(%rbp), %eax
je 0xedd9
leaq 0x68373(%rip), %rdi     # 0x770eb
leaq -0x18(%rbp), %rsi
callq 0xd250
jmp 0xed83
leaq 0x6837e(%rip), %rdi     # 0x77108
leaq -0x1a4(%rbp), %rsi
leaq -0x8(%rbp), %rdx
callq 0xd3b0
jmp 0xed9c
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movl $0x1, %edi
callq 0x70970
jmp 0xedaf
movb $0x0, -0x1(%rbp)
movl $0x1, -0x1b8(%rbp)
jmp 0xef86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1b0(%rbp)
movl %eax, -0x1b4(%rbp)
jmp 0xefa0
movl -0x1a4(%rbp), %eax
cmpl -0x8(%rbp), %eax
je 0xede8
movb $0x0, -0x21(%rbp)
leaq -0x1d8(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x8460
jmp 0xedfd
movq -0x10(%rbp), %rax
movq %rax, -0x218(%rbp)
leaq -0x1f9(%rbp), %rdi
movq %rdi, -0x210(%rbp)
callq 0x8810
movq -0x218(%rbp), %rsi
movq -0x210(%rbp), %rdx
leaq -0x1f8(%rbp), %rdi
callq 0x114b0
jmp 0xee37
leaq -0x1f9(%rbp), %rdi
callq 0x84d0
leaq -0x1d8(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x709f0
testb $0x1, %al
jne 0xee5c
jmp 0xee85
movb $0x0, -0x21(%rbp)
jmp 0xee85
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1b0(%rbp)
movl %eax, -0x1b4(%rbp)
leaq -0x1f9(%rbp), %rdi
callq 0x84d0
jmp 0xef78
testb $0x1, -0x21(%rbp)
je 0xeead
movl 0x86627(%rip), %eax     # 0x954b8
addl $0x1, %eax
movl %eax, 0x8661e(%rip)     # 0x954b8
movb $0x1, -0x1(%rbp)
movl $0x1, -0x1b8(%rbp)
jmp 0xef5e
leaq 0x68278(%rip), %rdi     # 0x7712c
leaq -0x18(%rbp), %rsi
callq 0xd250
jmp 0xeebf
movl -0x1a4(%rbp), %eax
cmpl -0x8(%rbp), %eax
je 0xef13
leaq 0x68279(%rip), %rdi     # 0x7714a
leaq -0x1a4(%rbp), %rsi
callq 0x70a20
jmp 0xeedf
leaq 0x68282(%rip), %rdi     # 0x77168
leaq -0x8(%rbp), %rsi
callq 0x70a20
jmp 0xeef1
jmp 0xef13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1b0(%rbp)
movl %eax, -0x1b4(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x8220
jmp 0xef78
leaq 0x6826c(%rip), %rdi     # 0x77186
leaq -0x1d8(%rbp), %rsi
callq 0x70a50
jmp 0xef28
leaq 0x68277(%rip), %rdi     # 0x771a6
leaq -0x1f8(%rbp), %rsi
callq 0x70a50
jmp 0xef3d
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movl $0x1, %edi
callq 0x70970
jmp 0xef50
movb $0x0, -0x1(%rbp)
movl $0x1, -0x1b8(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x8220
leaq -0x1d8(%rbp), %rdi
callq 0x8220
jmp 0xef86
leaq -0x1d8(%rbp), %rdi
callq 0x8220
jmp 0xefa0
leaq -0x1a0(%rbp), %rdi
callq 0x80c0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
leaq -0x1a0(%rbp), %rdi
callq 0x80c0
movq -0x1b0(%rbp), %rdi
callq 0x8800
nopl (%rax,%rax)