// File: /workspace/github_c_makefile_star2_O3/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
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %rdx
je 0x780c
movq %rdx, %r12
xorl %ebx, %ebx
movq %r14, %rdi
movq %rdx, %rsi
xorl %edx, %edx
callq 0x3210
cmpl $-0x1, %eax
je 0x7969
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x17fea
movl %eax, 0x4(%rsp)
movl $0x27, %edi
callq 0x3060
testl %r15d, %r15d
jle 0x7942
movl $0x41, %r12d
movl $0x1, %ebp
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x7947
movq %r14, %rdi
callq 0x3150
testl %eax, %eax
je 0x78ab
movl %eax, %r13d
callq 0x32d0
movq (%rax), %rax
movslq %r13d, %rcx
movzwl (%rax,%rcx,2), %eax
btl $0xe, %eax
jb 0x78cf
cmpl $0x9, %r13d
je 0x78f7
cmpl $0xa, %r13d
jne 0x791b
leaq 0x508f8(%rip), %rax     # 0x58180
movzwl 0x2(%rax), %eax
testl $0x104, %eax            # imm = 0x104
je 0x791b
movl %ebp, %edi
callq 0x1707a
movl %eax, %ebp
movl 0x4(%rsp), %edi
callq 0x5716
jmp 0x7913
leaq 0x508ce(%rip), %rax     # 0x58180
testb $0x40, 0x3(%rax)
jne 0x799b
xorl %r13d, %r13d
leaq 0x39f83(%rip), %rdi     # 0x41849
xorl %eax, %eax
callq 0x3120
jmp 0x792d
testl %r12d, %r12d
jne 0x78eb
andl $0x800, %eax            # imm = 0x800
je 0x78eb
leaq 0x41115(%rip), %rdi     # 0x489f7
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %r13d, %edi
callq 0x3060
incl %ebp
jmp 0x792f
leaq 0x50882(%rip), %rax     # 0x58180
movzwl 0x2(%rax), %eax
testl $0x104, %eax            # imm = 0x104
je 0x791b
movl $0x9, %edi
callq 0x3060
movl $0xa, %r13d
jmp 0x792f
movzbl %r13b, %esi
leaq 0x39f26(%rip), %rdi     # 0x4184c
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
incl %ebx
movl %r13d, %r12d
cmpl %ebx, %r15d
jne 0x7839
movl %r15d, %ebx
jmp 0x7947
movl $0x1, %ebp
movl $0x27, %edi
callq 0x3060
incl %ebp
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
je 0x7983
movq %r14, %rdi
callq 0x31b0
jmp 0x7983
leaq 0x39eaf(%rip), %rdi     # 0x4181f
movq %r12, %rsi
xorl %eax, %eax
callq 0x3120
movl %eax, %edi
callq 0x1707a
movl %eax, %ebp
movl %ebp, %edi
callq 0x17a82
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r15d, %eax
subl %ebx, %eax
incl %ebx
cmpl $0x2, %eax
jl 0x7947
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x7947
movq %r14, %rdi
callq 0x3150
incl %ebx
cmpl %ebx, %r15d
jne 0x79a7
jmp 0x793d