// File: /workspace/github_cpp_makefile_star2_O1/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 0x2c44
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 0x303a
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 0x3034
cmpl $-0x1, %eax
jne 0x2cfb
callq 0x2040
cmpl $0x0, (%rax)
je 0x2da5
movq %rax, %r15
movl (%rax), %edi
callq 0x2080
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
movq %rax, %rsi
callq 0x3dc2
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 0x2fcb
jmp 0x3034
cmpb $0x53, (%r14)
je 0x3034
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x237f(%rip), %rdx      # 0x50a3
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x3172
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 0x3e7a
leaq 0x2349(%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 0x2dff
movq %rdx, 0x80(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x90(%rsp)
jmp 0x2e07
leaq 0x20(%rsp), %rdi
leaq 0x60(%rsp), %rdx
movq %r14, %rsi
callq 0x3dc2
leaq 0x22d8(%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 0x2fd2
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2fd9
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 0x2289(%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 0x2e59
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x2e5f
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 0x2eb0
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x2eb7
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 0x21dd(%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 0x2f0a
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x2f12
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 0x2f55
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2120
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2f6c
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2120
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x2f88
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2120
movq 0x80(%rsp), %rdi
cmpq %r13, %rdi
je 0x2fa5
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2120
movq 0xa0(%rsp), %rdi
cmpq %r15, %rdi
je 0x2fc2
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x2120
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3034
movq 0x10(%rsp), %rsi
jmp 0x302c
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 0x3019
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2120
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3034
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 0x306d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2120
jmp 0x306d
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x316a
movq 0x30(%rsp), %rsi
jmp 0x314a
jmp 0x3167
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x30ad
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2120
jmp 0x30ad
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x30cc
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2120
jmp 0x30cc
movq %r12, %r14
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x30f0
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2120
jmp 0x30f0
movq %r12, %r14
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r13, %rdi
je 0x3115
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2120
jmp 0x3115
movq %r12, %r14
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
cmpq %r15, %rdi
je 0x313c
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x2120
jmp 0x313c
jmp 0x3136
movq %r12, %r14
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x316a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2120
jmp 0x316a
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x3145
jmp 0x316a
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2200