// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/print.c
// Function: print_ascii
int
print_ascii(FILE *inptr,unsigned long count,unsigned long offset)
{
    int remaining;
    int nread;
    int ch,lastch;
    int chpr = 0;
    int indent = 0;

    remaining = count;
    nread = 0;
    if((offset != HERE) && (fseek(inptr,offset,SEEK_SET) == -1))
    {
        chpr += printf(" seek failed to offset %lu to print ascii",offset);
        chpr = newline(chpr);
    }
    else
    {
        indent = charsprinted();
        lastch = 'A';
        (void)putchar('\'');
        chpr++;
        while((remaining > 0) && !feof(inptr))
        {
            ch = fgetc(inptr);
            ++nread;
            --remaining;
            if(ch && isprint(ch))
            {
                if(isdigit(ch) && (lastch == '\0'))
                    chpr += printf("00");
                (void)putchar(ch);
                chpr++;
            }
            else if(ch == '\0')
            {
                if((PRINT_ASCII_IGNORE_LENGTH))
                {
                    /* read it but don't print any more               */
                    while((remaining-- > 0) && !feof(inptr))
                    {
                        ch = fgetc(inptr);
                        ++nread;
                    }
                    break;
                }
                chpr += printf("\\0");
            }
            else if((ch == '\n') && !(LIST_MODE))
            {
                chpr = newline(chpr);
                putindent(indent);
            }
            else if((ch == '\011') && !(LIST_MODE))
            {
                putchar(ch);
                ++ch;
            }
            else
                chpr += printf("\\%03o",(unsigned int)(ch & 0xff));
            lastch = ch;
        }
        (void)putchar('\'');
        chpr++;
        if(ferror(inptr))
            clearerr(inptr);
    }
    setcharsprinted(chpr);
    return(nread);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %r14
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %rdx
je 0x71e2
movq %rdx, %r12
xorl %ebx, %ebx
movq %r14, %rdi
movq %rdx, %rsi
xorl %edx, %edx
callq 0x3210
cmpl $-0x1, %eax
je 0x734b
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x16f6e
movl %eax, 0xc(%rsp)
pushq $0x27
popq %rdi
callq 0x3060
pushq $0x1
popq %rax
movl %eax, 0x8(%rsp)
movq %r15, 0x10(%rsp)
xorl %ebx, %ebx
movl %r13d, %ebp
testl %r15d, %r15d
jle 0x7327
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x7327
movq %r14, %rdi
callq 0x3150
testl %eax, %eax
sete %r13b
je 0x72bb
movl %eax, %r12d
callq 0x32d0
movq (%rax), %rax
movslq %r12d, %rcx
movzwl (%rax,%rcx,2), %eax
btl $0xe, %eax
jb 0x72e2
cmpl $0x9, %r12d
jne 0x727a
leaq 0x4ff21(%rip), %rax     # 0x57180
movzwl 0x2(%rax), %eax
testw $0x104, %ax             # imm = 0x104
je 0x72a7
pushq $0x9
popq %rdi
callq 0x3060
decl %r15d
incl %ebx
xorl %ebp, %ebp
jmp 0x7209
cmpl $0xa, %r12d
jne 0x72a7
leaq 0x4fef9(%rip), %rax     # 0x57180
movzwl 0x2(%rax), %eax
testw $0x104, %ax             # imm = 0x104
je 0x72a7
movl 0x8(%rsp), %edi
callq 0x160f7
movl %eax, %ebp
movl 0xc(%rsp), %edi
callq 0x521b
jmp 0x7319
movzbl %r12b, %esi
leaq 0x3859a(%rip), %rdi     # 0x3f84c
xorl %eax, %eax
callq 0x3120
jmp 0x72da
leaq 0x4febe(%rip), %rax     # 0x57180
testb $0x40, 0x3(%rax)
jne 0x737d
leaq 0x38576(%rip), %rdi     # 0x3f849
xorl %eax, %eax
callq 0x3120
movl 0x8(%rsp), %ebp
addl %eax, %ebp
jmp 0x7319
btl $0xb, %eax
setae %al
notb %bpl
orb %al, %bpl
testb $0x1, %bpl
jne 0x730b
leaq 0x3f6ab(%rip), %rdi     # 0x469a7
xorl %eax, %eax
callq 0x3120
movl 0x8(%rsp), %ebp
addl %eax, %ebp
jmp 0x730f
movl 0x8(%rsp), %ebp
movl %r12d, %edi
callq 0x3060
incl %ebp
movl %ebp, 0x8(%rsp)
decl %r15d
incl %ebx
jmp 0x7206
movl 0x8(%rsp), %ebp
pushq $0x27
popq %rdi
callq 0x3060
incl %ebp
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
je 0x7365
movq %r14, %rdi
callq 0x31b0
jmp 0x7365
leaq 0x384cd(%rip), %rdi     # 0x3f81f
movq %r12, %rsi
xorl %eax, %eax
callq 0x3120
movl %eax, %edi
callq 0x160f7
movl %eax, %ebp
movl %ebp, %edi
callq 0x16a4f
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
decl %r15d
incl %ebx
movl 0x8(%rsp), %ebp
testl %r15d, %r15d
jle 0x73a6
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x732b
movq %r14, %rdi
callq 0x3150
incl %ebx
decl %r15d
jmp 0x7386
movq 0x10(%rsp), %rax
movl %eax, %ebx
jmp 0x732b