// File: /workspace/github_cpp_makefile_star2_O2/afborchert[P]fmt/test_suite.cpp
// Function: bool general_testcase<char, int&, double, int&, int&>(bool, bool, int&, bool, int, char const*, int&, double&&, int&, int&)
bool general_testcase(bool implementation_defined,
      bool with_offset, int& offset,
      bool to_string, int string_len,
      const CharT* format, Values&&... values) {
   ++testcases;
   std::basic_ostringstream<CharT> os;
   errno = 0;
   int off1 = 0; int off2 = 0;
   int count1 = 0;
   if (to_string) {
      CharT* buf = new CharT[string_len + 8];
      std::fill_n(buf, string_len + 8, 42);
      count1 = fmt::snprintf(buf, string_len, format, std::forward<Values>(values)...);
      if (count1 > 0) {
	 int i = 0;
	 while (i < string_len) {
	    if (!buf[i]) break;
	    ++i;
	 }
	 if (i < string_len) {
	    for (i = string_len; i < string_len + 8; ++i) {
	       if (buf[i] != 42) {
		  buffer_overrun(format, string_len, i);
		  print_values(1, values...);
		  return false;
	       }
	    }
	    os << buf;
	 }
      }
      delete[] buf;
   } else {
      count1 = fmt::printf(os, format, std::forward<Values>(values)...);
   }
   if (with_offset) off1 = offset;
   int err1 = errno;
   errno = 0;
   int count2 = sprint(nullptr, 0, format, std::forward<Values>(values)...); 
   if (with_offset) off2 = offset;
   int err2 = errno;
   if (count1 < 0 || count2 < 0) {
      if (count1 != count2) {
	 count_mismatch(implementation_defined, format, count1, count2);
	 print_values(1, values...);
	 if (implementation_defined) ++warnings;
	 return false;
      }
      if (err1 != err2) {
	 errno_mismatch(implementation_defined, format, err1, err2);
	 print_values(1, values...);
	 if (implementation_defined) ++warnings;
	 return false;
      }
      ++successful;
      return true;
   }

   /* compare the resulting strings */
   int buflen, len;
   if (to_string) {
      buflen = string_len + 1; len = string_len;
   } else {
      buflen = len = count2 + 1;
   }
   CharT* buf = new CharT[buflen] {};
   sprint(buf, len, format, values...);
   std::basic_string<CharT> osstr(os.str());
   bool ok = compare(buf, osstr.c_str()) == 0;
   if (!ok) {
      diff_analysis(implementation_defined, format, count1, count2,
	 osstr.c_str(), buf);
      if (implementation_defined) ++warnings;
   }
   delete[] buf;
   if (with_offset && off1 != off2) {
      offset_mismatch(format, off1, off2);
      ok = false;
   }
   if (!ok) print_values(1, values...);
   if (ok) ++successful;
   return ok;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %r9, %r12
movl %r8d, %r14d
movl %ecx, %ebp
movq %rdx, 0x30(%rsp)
movl %esi, 0x14(%rsp)
movl %edi, 0x10(%rsp)
movq 0x228(%rsp), %r13
movq 0x218(%rsp), %rbx
movq 0x210(%rsp), %r15
incl 0x29381(%rip)           # 0x4f38c
leaq 0x60(%rsp), %rdi
callq 0x6490
callq 0x6060
movq %rax, 0x18(%rsp)
andl $0x0, (%rax)
movl %ebp, 0x2c(%rsp)
testl %ebp, %ebp
movq %r12, 0x8(%rsp)
movq %r14, 0x20(%rsp)
je 0x260f6
leal 0x8(%r14), %ebx
movslq %ebx, %r13
movq %r13, %rdi
callq 0x6040
movq 0x220(%rsp), %r12
movq %rax, %r15
leaq 0x40(%rsp), %rdx
movl $0x2a, (%rdx)
movq %rax, %rdi
movl %ebx, %esi
callq 0xfb68
movslq 0x20(%rsp), %rbx
movq 0x228(%rsp), %rax
movq %rax, (%rsp)
movq %r15, %rdi
movq %rbx, %rsi
movq 0x8(%rsp), %rdx
movq 0x210(%rsp), %rcx
movq 0x218(%rsp), %r8
movq %r12, %r9
callq 0x263e6
movl %eax, %ebp
testl %eax, %eax
jle 0x260e4
xorl %eax, %eax
movq 0x20(%rsp), %rdx
testl %edx, %edx
movl $0x0, %ecx
cmovgl %edx, %ecx
cmpq %rax, %rcx
je 0x260e4
cmpb $0x0, (%r15,%rax)
leaq 0x1(%rax), %rax
jne 0x260b2
jmp 0x260d2
cmpb $0x2a, (%r15,%rbx)
jne 0x26360
incq %rbx
cmpq %r13, %rbx
jl 0x260c4
leaq 0x60(%rsp), %rdi
movq %r15, %rsi
callq 0x6380
movq %r15, %rdi
callq 0x6460
movq 0x228(%rsp), %r13
jmp 0x26119
leaq 0x60(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movq 0x220(%rsp), %r12
movq %r12, %r8
movq %r13, %r9
callq 0x26578
movl %eax, %ebp
movq 0x8(%rsp), %rdx
movq $0x0, 0x38(%rsp)
movl $0x0, %eax
cmpb $0x0, 0x14(%rsp)
je 0x2613a
movq 0x30(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x28(%rsp)
movq 0x18(%rsp), %rax
movl (%rax), %ebx
andl $0x0, (%rax)
movq %r13, (%rsp)
xorl %edi, %edi
xorl %esi, %esi
movq 0x210(%rsp), %rcx
movq 0x218(%rsp), %r8
movq %r12, %r9
callq 0x26a29
movl %eax, %r15d
cmpb $0x0, 0x14(%rsp)
je 0x2617e
movq 0x30(%rsp), %rax
movl (%rax), %eax
movq %rax, 0x38(%rsp)
movl %r15d, %eax
orl %ebp, %eax
js 0x2627b
movl %ebp, 0x18(%rsp)
movq 0x20(%rsp), %r14
leal 0x1(%r14), %eax
movl %r15d, %r13d
incl %r13d
movl 0x2c(%rsp), %r12d
testb %r12b, %r12b
cmovel %r13d, %eax
movslq %eax, %rbx
movq %rbx, %rdi
callq 0x6040
movq %rax, %rbp
testb %r12b, %r12b
cmovnel %r14d, %r13d
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x6200
movslq %r13d, %rsi
movq 0x228(%rsp), %r13
movq %r13, (%rsp)
movq %rbp, %rdi
movq 0x8(%rsp), %rdx
movq 0x210(%rsp), %rcx
movq 0x218(%rsp), %r8
movq 0x220(%rsp), %r9
callq 0x26a42
leaq 0x68(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x65a0
movq 0x40(%rsp), %r14
movq %rbp, %rdi
movq %r14, %rsi
callq 0x64d0
movl %eax, %ebx
testl %eax, %eax
je 0x2624e
movl 0x10(%rsp), %r12d
movzbl %r12b, %edi
movq 0x8(%rsp), %rsi
movl 0x18(%rsp), %edx
movl %r15d, %ecx
movq %r14, %r8
movq %rbp, %r9
callq 0x67f6
testb %r12b, %r12b
je 0x2624e
incl 0x29142(%rip)           # 0x4f390
movq %rbp, %rdi
callq 0x6460
movq 0x38(%rsp), %rdx
movl 0x28(%rsp), %esi
cmpl %edx, %esi
setne %al
movl 0x14(%rsp), %ecx
andb %al, %cl
cmpb $0x1, %cl
jne 0x2629c
movq 0x8(%rsp), %rdi
callq 0x6af2
jmp 0x262a0
cmpl %r15d, %ebp
jne 0x262d6
movq 0x18(%rsp), %rax
movl (%rax), %ecx
cmpl %ecx, %ebx
jne 0x2631f
incl 0x290f3(%rip)           # 0x4f388
movb $0x1, %bl
jmp 0x26398
testl %ebx, %ebx
je 0x26315
movq 0x210(%rsp), %rax
movl (%rax), %esi
pushq $0x1
popq %rdi
movq 0x218(%rsp), %rdx
movq 0x220(%rsp), %rcx
movq %r13, %r8
callq 0x264f8
xorl %ebx, %ebx
leaq 0x40(%rsp), %rdi
callq 0x61a0
jmp 0x26398
movl 0x10(%rsp), %ebx
movzbl %bl, %edi
movq 0x8(%rsp), %rsi
movl %ebp, %edx
movl %r15d, %ecx
callq 0x6996
movq 0x210(%rsp), %rax
movl (%rax), %esi
pushq $0x1
popq %rdi
movq 0x218(%rsp), %rdx
movq %r12, %rcx
movq %r13, %r8
callq 0x264f8
testb %bl, %bl
jne 0x26358
jmp 0x26396
incl 0x2906d(%rip)           # 0x4f388
movb $0x1, %bl
jmp 0x262c7
movl 0x10(%rsp), %ebp
movzbl %bpl, %edi
movq 0x8(%rsp), %rsi
movl %ebx, %edx
callq 0x6a44
movq 0x210(%rsp), %rax
movl (%rax), %esi
pushq $0x1
popq %rdi
movq 0x218(%rsp), %rdx
movq %r12, %rcx
movq %r13, %r8
callq 0x264f8
testb %bpl, %bpl
je 0x26396
incl 0x29032(%rip)           # 0x4f390
jmp 0x26396
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl %ebx, %edx
callq 0x6932
movq 0x210(%rsp), %rax
movl (%rax), %esi
pushq $0x1
popq %rdi
movq 0x218(%rsp), %rdx
movq %r12, %rcx
movq 0x228(%rsp), %r8
callq 0x264f8
xorl %ebx, %ebx
leaq 0x60(%rsp), %rdi
callq 0x60b0
movl %ebx, %eax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x263c2
jmp 0x263c2
jmp 0x263c2
jmp 0x263c2
jmp 0x263c2
jmp 0x263c2
movq %rax, %rbx
jmp 0x263d4
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x61a0
leaq 0x60(%rsp), %rdi
callq 0x60b0
movq %rbx, %rdi
callq 0x6630