// File: /workspace/github_cpp_makefile_star2_O3/afborchert[P]fmt/test_suite.cpp
// Function: bool general_testcase<wchar_t>(bool, bool, int&, bool, int, wchar_t const*)
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 $0x1218, %rsp           # imm = 0x1218
movq %r9, %r15
movl %r8d, %ebp
movl %ecx, %ebx
movq %rdx, 0x8(%rsp)
movl %esi, %r13d
movl %edi, %r12d
incl 0x1f099(%rip)           # 0x5632c
leaq 0x98(%rsp), %rdi
callq 0x6290
callq 0x6060
movq %rax, 0x10(%rsp)
movl $0x0, (%rax)
movl %ebx, 0x28(%rsp)
testl %ebx, %ebx
movl %r12d, 0x4(%rsp)
je 0x37432
leal 0x8(%rbp), %ebx
leaq (,%rbx,4), %rax
cmpl $-0x8, %ebp
movq $-0x1, %rdi
cmovgeq %rax, %rdi
callq 0x6040
movq %rax, %r12
cmpl $-0x7, %ebp
jl 0x373f3
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
leaq (%rbx,%rcx), %rax
andq %rax, %rcx
andl $0x3, %eax
negq %rax
addq %rcx, %rax
addq $0x4, %rax
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
xorl %ecx, %ecx
movdqa 0xde13(%rip), %xmm1     # 0x45130
movdqa 0xde1b(%rip), %xmm2     # 0x45140
movdqa 0xdd23(%rip), %xmm3     # 0x45050
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rcx, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %edx
notl %edx
testb $0x1, %dl
je 0x3737f
movl $0x2a, (%r12,%rcx,4)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x37396
movl $0x2a, 0x4(%r12,%rcx,4)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %edx
testb $0x1, %dl
je 0x373d3
movl $0x2a, 0x8(%r12,%rcx,4)
pextrw $0x4, %xmm5, %edx
testb $0x1, %dl
je 0x373e6
movl $0x2a, 0xc(%r12,%rcx,4)
addq $0x4, %rcx
cmpq %rcx, %rax
jne 0x37335
movslq %ebp, %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x377fb
movl %eax, (%rsp)
testl %eax, %eax
setle %al
testl %ebp, %ebp
setle %cl
orb %al, %cl
jne 0x37523
movl %ebp, %eax
xorl %ecx, %ecx
cmpl $0x0, (%r12,%rcx,4)
je 0x374ee
incq %rcx
cmpq %rcx, %rax
jne 0x3741a
jmp 0x37523
leaq 0x210(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0xf356
testq %r15, %r15
je 0x37498
leaq 0x30(%rsp), %rbx
leaq 0x210(%rsp), %r14
movq %r15, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xf4bc
cmpb $0x1, 0x30(%rsp)
jne 0x374a4
cmpw $0x0, 0x60(%rsp)
jne 0x374a4
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
subq %rsi, %rdx
sarq $0x2, %rdx
movq %r14, %rdi
callq 0x65c0
movq 0x48(%rsp), %rsi
testq %rsi, %rsi
jne 0x3745c
movl 0x260(%rsp), %eax
movl %eax, (%rsp)
jmp 0x374ab
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
leaq 0x1dd96(%rip), %rax     # 0x55248
leaq 0x268(%rsp), %rbx
movq %rax, -0x58(%rbx)
leaq 0x1ddab(%rip), %rax     # 0x55270
movq %rax, (%rbx)
movq 0x1eaf1(%rip), %rax     # 0x55fc0
addq $0x10, %rax
movq %rax, -0x50(%rbx)
leaq 0x250(%rsp), %rdi
callq 0x6460
movq %rbx, %rdi
callq 0x6100
jmp 0x3752b
leaq (%r12,%rax,4), %rdx
xorl %ecx, %ecx
cmpl $0x2a, (%rdx,%rcx,4)
jne 0x37720
incq %rcx
leal (%rcx,%rax), %esi
cmpl %esi, %ebx
jg 0x374f4
movq %r12, %rdi
callq 0x62a0
leaq 0x98(%rsp), %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x6130
movq %r12, %rdi
callq 0x63f0
movq 0x10(%rsp), %r14
movq 0x8(%rsp), %r12
xorl %eax, %eax
movl $0x0, %ecx
movl %r13d, 0x10(%rsp)
testb %r13b, %r13b
je 0x3754a
movl (%r12), %ecx
movl %ecx, 0x1c(%rsp)
movl (%r14), %r13d
movl $0x0, 0x8(%rsp)
movl %eax, (%r14)
leaq 0x210(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdx
xorl %eax, %eax
callq 0x64b0
movl %eax, %ebx
cmpb $0x0, 0x10(%rsp)
je 0x37584
movl (%r12), %eax
movl %eax, 0x8(%rsp)
movl %ebx, %eax
movl (%rsp), %edx
orl %edx, %eax
js 0x3766e
movq %rbp, %rsi
movq %r15, 0x20(%rsp)
leal 0x1(%rbp), %eax
movl %ebx, %ebp
incl %ebp
movl 0x28(%rsp), %r12d
testb %r12b, %r12b
cmovel %ebp, %eax
cltq
leaq (,%rax,4), %rcx
testl %eax, %eax
movq $-0x1, %r15
cmovnsq %rcx, %r15
movq %r15, %rdi
movq %rsi, %r14
callq 0x6040
movq %rax, %r13
testb %r12b, %r12b
cmovnel %r14d, %ebp
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x61d0
movslq %ebp, %rsi
movq %r13, %rdi
movq 0x20(%rsp), %rdx
callq 0x37a0f
leaq 0xa0(%rsp), %rsi
leaq 0x210(%rsp), %rdi
callq 0x60d0
movq 0x210(%rsp), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x63c0
testl %eax, %eax
je 0x3768f
movl %eax, %r15d
movl 0x4(%rsp), %r14d
movzbl %r14b, %edi
movq 0x20(%rsp), %rsi
movl (%rsp), %edx
movl %ebx, %ecx
movq %rbp, %r8
movq %r13, %r9
callq 0x67ef
testb %r14b, %r14b
je 0x3764c
incl 0x1ece4(%rip)           # 0x56330
movq %r13, %rdi
callq 0x63f0
movl 0x8(%rsp), %edx
movl 0x1c(%rsp), %esi
cmpl %edx, %esi
setne %al
testb %al, 0x10(%rsp)
jne 0x376af
testl %r15d, %r15d
jne 0x376b9
jmp 0x376bd
cmpl %ebx, %edx
jne 0x376ed
movl (%r14), %ecx
cmpl %ecx, %r13d
movl 0x4(%rsp), %ebx
jne 0x37706
incl 0x1eca0(%rip)           # 0x56328
movb $0x1, %bl
jmp 0x37753
movq %r13, %rdi
callq 0x63f0
movl 0x8(%rsp), %edx
movl 0x1c(%rsp), %esi
cmpl %edx, %esi
setne %al
movl 0x10(%rsp), %ecx
andb %al, %cl
cmpb $0x1, %cl
jne 0x376bd
movq 0x20(%rsp), %rdi
callq 0x6af6
xorl %ebx, %ebx
jmp 0x376c5
incl 0x1ec65(%rip)           # 0x56328
movb $0x1, %bl
leaq 0x220(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37753
movq 0x220(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x6340
jmp 0x37753
movl 0x4(%rsp), %ebp
movzbl %bpl, %edi
movq %r15, %rsi
movl %ebx, %ecx
callq 0x6977
testb %bpl, %bpl
jne 0x37718
jmp 0x37751
movzbl %bl, %edi
movq %r15, %rsi
movl %r13d, %edx
callq 0x6a3d
testb %bl, %bl
je 0x37751
incl 0x1ec12(%rip)           # 0x56330
jmp 0x37751
movl %eax, %esi
addl %ecx, %esi
leaq 0x210(%rsp), %rdx
movq %r15, (%rdx)
leaq 0x30(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x2c(%rsp), %r8
movl %esi, (%r8)
movq 0x1e893(%rip), %rdi     # 0x55fd8
leaq 0xecdc(%rip), %rsi      # 0x46428
callq 0x110d9
xorl %ebx, %ebx
movq 0x1e836(%rip), %rsi     # 0x55f90
leaq 0x98(%rsp), %rdi
callq 0x6110
leaq 0x108(%rsp), %rdi
callq 0x6100
movl %ebx, %eax
addq $0x1218, %rsp           # imm = 0x1218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x377bd
jmp 0x377bd
jmp 0x377bd
jmp 0x377bd
jmp 0x377bd
movq %rax, %rbx
leaq 0x220(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x377d2
movq 0x220(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x6340
jmp 0x377d2
movq %rax, %rbx
jmp 0x377d2
movq %rax, %rbx
leaq 0x210(%rsp), %rdi
callq 0xfa1c
movq 0x1e7b7(%rip), %rsi     # 0x55f90
leaq 0x98(%rsp), %rdi
callq 0x6110
leaq 0x108(%rsp), %rdi
callq 0x6100
movq %rbx, %rdi
callq 0x6580