// File: afborchert[P]fmt/./printf.hpp
// Function: int fmt::printf<char, std::char_traits<char>, char const*&>(std::basic_ostream<char, std::char_traits<char>>&, char const*, char const*&)
inline int printf(std::basic_ostream<CharT, Traits>& out,
      const CharT* format, Values&&... values) {
   impl::counting_ostream<CharT, Traits> cout(out);
   if (cout.getloc() != std::locale::classic()) {
      cout.imbue(std::locale(cout.getloc(), new impl::suppress_grouping()));
   }
   std::tuple<Values&...> tuple(values...);
   impl::integer nof_args = 0;
   while (format) {
      auto fseg = impl::parse_format_segment(format, nof_args);
      if (!fseg.valid) return -1;
      nof_args += fseg.nof_args;
      if (fseg.endp > fseg.beginp) {
	 cout.write(fseg.beginp, fseg.endp - fseg.beginp);
	 if (!cout) return -1;
      }
      if (fseg.value_index >= 0) {
	 if (fseg.conversion == 'n') {
	    if (impl::set_value(tuple, fseg.value_index,
		  cout.get_count()) < 0) {
	       return -1;
	    }
	 } else {
	    if (fseg.width_index >= 0) {
	       fseg.width = impl::get_value(tuple, fseg.width_index);
	    }
	    if (fseg.precision_index >= 0) {
	       fseg.precision = impl::get_value(tuple, fseg.precision_index);
	    }
	    impl::format_saver<CharT, Traits> fsaver(cout);
	    cout.setf(fseg.fmtflags);
	    cout.setf(fseg.base == 8? std::ios_base::oct  :
		      fseg.base == 10? std::ios_base::dec :
		      fseg.base == 16? std::ios_base::hex :
		      std::ios_base::fmtflags(0), std::ios_base::basefield);
	    if (fseg.width > 0) {
	       cout.width(fseg.width);
	    }
	    if ((fseg.flags & impl::precision) && fseg.precision >= 0) {
	       cout.precision(fseg.precision);
	    }
	    if (fseg.flags & impl::grouping_flag) {
	       cout.imbue(std::locale(cout.getloc(),
		  new impl::thousands_grouping()));
	    }
	    if (!process_value(tuple, fseg.value_index, cout, fseg)) {
	       return -1;
	    }
	 }
      }
      format = fseg.nextp;
   }
   return cout.get_count();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3e0, %rsp            # imm = 0x3E0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x180(%rbp), %rdi
callq 0x10190
movq -0x180(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x180(%rbp,%rax), %rsi
leaq -0x188(%rbp), %rdi
callq 0x102f0
jmp 0xfab8
callq 0x8650
movq %rax, -0x360(%rbp)
jmp 0xfac6
movq -0x360(%rbp), %rsi
leaq -0x188(%rbp), %rdi
callq 0x10330
movb %al, -0x361(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x86a0
movb -0x361(%rbp), %al
testb $0x1, %al
jne 0xfafa
jmp 0xfc54
movq -0x180(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x180(%rbp,%rax), %rsi
movq %rsi, -0x370(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x102f0
jmp 0xfb22
movl $0x18, %edi
callq 0x8420
movq %rax, -0x378(%rbp)
jmp 0xfb35
movq -0x378(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
callq 0x10360
jmp 0xfb51
movq -0x378(%rbp), %rdx
leaq -0x1a8(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x103a0
jmp 0xfb6d
movq -0x370(%rbp), %rsi
leaq -0x1a0(%rbp), %rdi
leaq -0x1a8(%rbp), %rdx
callq 0x80d0
jmp 0xfb89
leaq -0x1a0(%rbp), %rdi
callq 0x86a0
leaq -0x1a8(%rbp), %rdi
callq 0x86a0
leaq -0x1b0(%rbp), %rdi
callq 0x86a0
jmp 0xfc54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x190(%rbp)
movl %eax, -0x194(%rbp)
jmp 0x10170
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x190(%rbp)
movl %eax, -0x194(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x86a0
jmp 0x10170
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x190(%rbp)
movl %eax, -0x194(%rbp)
jmp 0xfc43
movq -0x378(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x190(%rbp)
movl %eax, -0x194(%rbp)
movl $0x18, %esi
callq 0x8450
jmp 0xfc43
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x190(%rbp)
movl %eax, -0x194(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x86a0
leaq -0x1b0(%rbp), %rdi
callq 0x86a0
jmp 0x10170
movq -0x20(%rbp), %rsi
leaq -0x1b8(%rbp), %rdi
callq 0x104b0
movq $0x0, -0x1c0(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1012f
movq -0x18(%rbp), %rsi
movq -0x1c0(%rbp), %rdx
leaq -0x228(%rbp), %rdi
callq 0x104e0
jmp 0xfc93
testb $0x1, -0x228(%rbp)
jne 0xfcb2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x22c(%rbp)
jmp 0x10158
movzwl -0x1f8(%rbp), %eax
addq -0x1c0(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq -0x218(%rbp), %rax
cmpq -0x220(%rbp), %rax
jbe 0xfd3a
movq -0x220(%rbp), %rsi
movq -0x218(%rbp), %rdx
subq %rsi, %rdx
leaq -0x180(%rbp), %rdi
callq 0x8600
jmp 0xfcf6
movq -0x180(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x180(%rbp,%rax), %rdi
callq 0x81b0
movb %al, -0x379(%rbp)
jmp 0xfd16
movb -0x379(%rbp), %al
testb $0x1, %al
jne 0xfd22
jmp 0xfd38
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x22c(%rbp)
jmp 0x10158
jmp 0xfd3a
cmpq $0x0, -0x1d0(%rbp)
jl 0x1011f
movsbl -0x1c8(%rbp), %eax
cmpl $0x6e, %eax
jne 0xfdc2
movq -0x1d0(%rbp), %rax
movq %rax, -0x390(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x10e20
movq %rax, -0x388(%rbp)
jmp 0xfd77
movq -0x388(%rbp), %rdx
movq -0x390(%rbp), %rsi
leaq -0x1b8(%rbp), %rdi
callq 0x10db0
movq %rax, -0x398(%rbp)
jmp 0xfd9a
movq -0x398(%rbp), %rax
cmpq $0x0, %rax
jge 0xfdbd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x22c(%rbp)
jmp 0x10158
jmp 0x1011d
cmpq $0x0, -0x1e0(%rbp)
jl 0xfdf6
movq -0x1e0(%rbp), %rsi
leaq -0x1b8(%rbp), %rdi
callq 0x10e40
movq %rax, -0x3a0(%rbp)
jmp 0xfde8
movq -0x3a0(%rbp), %rax
movq %rax, -0x1f0(%rbp)
cmpq $0x0, -0x1d8(%rbp)
jl 0xfe2a
movq -0x1d8(%rbp), %rsi
leaq -0x1b8(%rbp), %rdi
callq 0x10e40
movq %rax, -0x3a8(%rbp)
jmp 0xfe1c
movq -0x3a8(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq -0x180(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x180(%rbp,%rax), %rsi
leaq -0x340(%rbp), %rdi
callq 0x10e90
jmp 0xfe4b
movq -0x180(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x180(%rbp,%rax), %rdi
movl -0x208(%rbp), %esi
callq 0x10ef0
jmp 0xfe6b
movq -0x180(%rbp), %rcx
leaq -0x180(%rbp), %rax
addq -0x18(%rcx), %rax
movq %rax, -0x3b0(%rbp)
cmpq $0x8, -0x200(%rbp)
jne 0xfe9b
movl $0x40, %eax
movl %eax, -0x3b4(%rbp)
jmp 0xfed9
cmpq $0xa, -0x200(%rbp)
jne 0xfeb2
movl $0x2, %eax
movl %eax, -0x3b8(%rbp)
jmp 0xfecd
movq -0x200(%rbp), %rdx
xorl %eax, %eax
movl $0x8, %ecx
cmpq $0x10, %rdx
cmovel %ecx, %eax
movl %eax, -0x3b8(%rbp)
movl -0x3b8(%rbp), %eax
movl %eax, -0x3b4(%rbp)
movq -0x3b0(%rbp), %rdi
movl -0x3b4(%rbp), %esi
movl $0x4a, %edx
callq 0xd430
jmp 0xfef2
cmpq $0x0, -0x1f0(%rbp)
jle 0xff36
movq -0x180(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x180(%rbp,%rax), %rdi
movq -0x1f0(%rbp), %rsi
callq 0x10f20
jmp 0xff1d
jmp 0xff36
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x190(%rbp)
movl %eax, -0x194(%rbp)
jmp 0x1010f
movzwl -0x204(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0xff74
cmpq $0x0, -0x1e8(%rbp)
jl 0xff74
movq -0x180(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x180(%rbp,%rax), %rdi
movq -0x1e8(%rbp), %rsi
callq 0x10f50
jmp 0xff72
jmp 0xff74
movzwl -0x204(%rbp), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x100a3
movq -0x180(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x180(%rbp,%rax), %rsi
movq %rsi, -0x3c0(%rbp)
leaq -0x358(%rbp), %rdi
callq 0x102f0
jmp 0xffb1
movl $0x18, %edi
callq 0x8420
movq %rax, -0x3c8(%rbp)
jmp 0xffc4
movq -0x3c8(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
callq 0x10f80
jmp 0xffe0
movq -0x3c8(%rbp), %rdx
leaq -0x350(%rbp), %rdi
leaq -0x358(%rbp), %rsi
callq 0x10fc0
jmp 0xfffc
movq -0x3c0(%rbp), %rsi
leaq -0x348(%rbp), %rdi
leaq -0x350(%rbp), %rdx
callq 0x80d0
jmp 0x10018
leaq -0x348(%rbp), %rdi
callq 0x86a0
leaq -0x350(%rbp), %rdi
callq 0x86a0
leaq -0x358(%rbp), %rdi
callq 0x86a0
jmp 0x100a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x190(%rbp)
movl %eax, -0x194(%rbp)
jmp 0x10095
movq -0x3c8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x190(%rbp)
movl %eax, -0x194(%rbp)
movl $0x18, %esi
callq 0x8450
jmp 0x10095
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x190(%rbp)
movl %eax, -0x194(%rbp)
leaq -0x350(%rbp), %rdi
callq 0x86a0
leaq -0x358(%rbp), %rdi
callq 0x86a0
jmp 0x1010f
movq -0x1d0(%rbp), %rsi
leaq -0x1b8(%rbp), %rdi
leaq -0x180(%rbp), %rdx
leaq -0x228(%rbp), %rcx
callq 0x110d0
movb %al, -0x3c9(%rbp)
jmp 0x100cc
movb -0x3c9(%rbp), %al
testb $0x1, %al
jne 0x100eb
jmp 0x100d8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x22c(%rbp)
jmp 0x100f5
movl $0x0, -0x22c(%rbp)
leaq -0x340(%rbp), %rdi
callq 0x11140
movl -0x22c(%rbp), %eax
testl %eax, %eax
jne 0x10158
jmp 0x1010d
jmp 0x1011d
leaq -0x340(%rbp), %rdi
callq 0x11140
jmp 0x10170
jmp 0x1011f
movq -0x210(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xfc6f
leaq -0x180(%rbp), %rdi
callq 0x10e20
movq %rax, -0x3d8(%rbp)
jmp 0x10144
movq -0x3d8(%rbp), %rax
movl %eax, -0x4(%rbp)
movl $0x1, -0x22c(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x11180
movl -0x4(%rbp), %eax
addq $0x3e0, %rsp            # imm = 0x3E0
popq %rbp
retq
leaq -0x180(%rbp), %rdi
callq 0x11180
movq -0x190(%rbp), %rdi
callq 0x8800
nopl (%rax,%rax)