// File: /workspace/github_c_makefile_star2_O1/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 0x77c9
movq %rdx, %r12
xorl %ebx, %ebx
movq %r14, %rdi
movq %rdx, %rsi
xorl %edx, %edx
callq 0x3210
cmpl $-0x1, %eax
je 0x7930
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x17a98
movl %eax, 0x4(%rsp)
movl $0x27, %edi
callq 0x3060
testl %r15d, %r15d
jle 0x7909
movl $0x41, %r12d
movl $0x1, %ebp
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x790e
movq %r14, %rdi
callq 0x3150
testl %eax, %eax
je 0x7843
movl %eax, %r13d
callq 0x32d0
movq (%rax), %rax
movslq %r13d, %rcx
movzwl (%rax,%rcx,2), %eax
btl $0xe, %eax
jb 0x786a
cmpl $0xa, %r13d
je 0x7892
cmpl $0x9, %r13d
je 0x78be
testl %r13d, %r13d
jne 0x78e2
leaq 0x50936(%rip), %rax     # 0x58180
testb $0x40, 0x3(%rax)
jne 0x7962
xorl %r13d, %r13d
leaq 0x39feb(%rip), %rdi     # 0x41849
xorl %eax, %eax
callq 0x3120
jmp 0x78f4
testl %r12d, %r12d
jne 0x7886
andl $0x800, %eax            # imm = 0x800
je 0x7886
leaq 0x4113a(%rip), %rdi     # 0x489b7
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %r13d, %edi
callq 0x3060
incl %ebp
jmp 0x78f6
leaq 0x508e7(%rip), %rax     # 0x58180
movzwl 0x2(%rax), %eax
testl $0x104, %eax            # imm = 0x104
je 0x78b8
movl %ebp, %edi
callq 0x16b56
movl %eax, %ebp
movl 0x4(%rsp), %edi
callq 0x5730
jmp 0x78da
cmpl $0x9, %r13d
jne 0x78e2
leaq 0x508bb(%rip), %rax     # 0x58180
movzwl 0x2(%rax), %eax
testl $0x104, %eax            # imm = 0x104
je 0x78e2
movl $0x9, %edi
callq 0x3060
movl $0xa, %r13d
jmp 0x78f6
movzbl %r13b, %esi
leaq 0x39f5f(%rip), %rdi     # 0x4184c
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
incl %ebx
movl %r13d, %r12d
cmpl %ebx, %r15d
jne 0x77f6
movl %r15d, %ebx
jmp 0x790e
movl $0x1, %ebp
movl $0x27, %edi
callq 0x3060
incl %ebp
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
je 0x794a
movq %r14, %rdi
callq 0x31b0
jmp 0x794a
leaq 0x39ee8(%rip), %rdi     # 0x4181f
movq %r12, %rsi
xorl %eax, %eax
callq 0x3120
movl %eax, %edi
callq 0x16b56
movl %eax, %ebp
movl %ebp, %edi
callq 0x17530
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 0x790e
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x790e
movq %r14, %rdi
callq 0x3150
incl %ebx
cmpl %ebx, %r15d
jne 0x796e
jmp 0x7904