// File: /workspace/github_cpp_makefile_star2_O3/stevedonovan[P]outstreams/instream.cpp
// Function: stream::Reader::formatted_read(char const*, char const*, char const*, ...)
Reader& Reader::formatted_read(const char *ctype, const char *def, const char *fmt, ...) {
    if (fail()) return *this;
    va_list ap;
    va_start(ap,fmt);
    if (fmt == nullptr) {
         fmt = def;
    }
    int res = read_fmt(fmt,ap);
    if (res == EOF) {
        if (errno != 0) { // we remain in hope
            set_error(strerror(errno),errno);
        } else { // but invariably it just means EOF
            set_error("EOF reading " + std::string(ctype),EOF);
        }
    } else
    if (res != 1 && *ctype != 'S') {
         std::string chars;
         (*this)(chars,"%5s");
         set_error("error reading " + std::string(ctype) + " at '" + chars + "'",1);
    }
    pos += fpos;
    va_end(ap);
    return *this;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rdi, %rbx
movq %r9, 0x108(%rsp)
testb %al, %al
je 0x2c3e
movaps %xmm0, 0x110(%rsp)
movaps %xmm1, 0x120(%rsp)
movaps %xmm2, 0x130(%rsp)
movaps %xmm3, 0x140(%rsp)
movaps %xmm4, 0x150(%rsp)
movaps %xmm5, 0x160(%rsp)
movaps %xmm6, 0x170(%rsp)
movaps %xmm7, 0x180(%rsp)
movq %r8, 0x100(%rsp)
cmpl $0x0, 0x1c(%rdi)
jne 0x3033
movq %rsi, %r14
leaq 0xe0(%rsp), %rsi
leaq 0xc0(%rsp), %rax
movq %rsi, 0x10(%rax)
leaq 0x1d0(%rsp), %rsi
movq %rsi, 0x8(%rax)
movabsq $0x3000000020, %rsi     # imm = 0x3000000020
movq %rsi, (%rax)
testq %rcx, %rcx
cmovneq %rcx, %rdx
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq *0x8(%rcx)
cmpl $0x1, %eax
je 0x302d
cmpl $-0x1, %eax
jne 0x2cf4
callq 0x2040
movl (%rax), %edi
testl %edi, %edi
je 0x2d9e
movq %rax, %r15
callq 0x2080
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
movq %rax, %rsi
callq 0x3dba
movl (%r15), %ebp
leaq 0x20(%rbx), %rdi
movq %rsp, %rsi
callq 0x20a0
movl %ebp, 0x1c(%rbx)
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x2fc4
jmp 0x302d
cmpb $0x53, (%r14)
je 0x302d
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x2386(%rip), %rdx      # 0x50a3
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x316c
leaq 0xb0(%rsp), %r15
movq %r15, -0x10(%r15)
movq %r14, %rdi
callq 0x2090
leaq (%rax,%r14), %rdx
leaq 0xa0(%rsp), %rdi
movq %r14, %rsi
callq 0x3e72
leaq 0x2350(%rip), %rcx      # 0x50a7
leaq 0xa0(%rsp), %rdi
movl $0xe, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x2140
leaq 0x90(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2df8
movq %rdx, 0x80(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x90(%rsp)
jmp 0x2e00
leaq 0x20(%rsp), %rdi
leaq 0x60(%rsp), %rdx
movq %r14, %rsi
callq 0x3dba
leaq 0x22df(%rip), %rcx      # 0x5096
leaq 0x20(%rsp), %rdi
movl $0xc, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x2140
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2fcb
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2fd2
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x80(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2290(%rip), %rsi      # 0x50b6
callq 0x2220
leaq 0x50(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2e52
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x2e58
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x40(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x2070
leaq 0x70(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2ea9
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x2eb0
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq %r12, %r14
movq 0x8(%rax), %rdx
leaq 0x60(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x21e4(%rip), %rsi      # 0x50ba
callq 0x2220
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2f03
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x2f0b
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x20(%rbx), %rdi
callq 0x20a0
movl $0x1, 0x1c(%rbx)
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x2f4e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2120
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2f65
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2120
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x2f81
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2120
movq 0x80(%rsp), %rdi
cmpq %r13, %rdi
je 0x2f9e
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2120
movq 0xa0(%rsp), %rdi
cmpq %r15, %rdi
je 0x2fbb
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x2120
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x302d
movq 0x10(%rsp), %rsi
jmp 0x3025
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x20(%rbx), %rdi
callq 0x20a0
movl $0xffffffff, 0x1c(%rbx) # imm = 0xFFFFFFFF
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3012
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2120
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x302d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2120
movl 0x14(%rbx), %eax
addl %eax, 0x18(%rbx)
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3066
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2120
jmp 0x3066
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3163
movq 0x30(%rsp), %rsi
jmp 0x3143
jmp 0x3160
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x30a6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2120
jmp 0x30a6
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x30c5
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2120
jmp 0x30c5
movq %r12, %r14
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x30e9
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2120
jmp 0x30e9
movq %r12, %r14
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r13, %rdi
je 0x310e
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2120
jmp 0x310e
movq %r12, %r14
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
cmpq %r15, %rdi
je 0x3135
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x2120
jmp 0x3135
jmp 0x312f
movq %r12, %r14
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3163
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2120
jmp 0x3163
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x313e
jmp 0x3163
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2200
nop