// File: /workspace/github_c_makefile_star2_O3/hfiguiere[P]exifprobe/print.c
// Function: print_ubytes
void
print_ubytes(FILE *inptr,unsigned long count,unsigned long offset)
{
    int i,j;
    unsigned short byte;
    int chpr = 0;

    if(count)
    {
        byte = read_ubyte(inptr,offset);
        if(feof(inptr) || ferror(inptr))
        {
            clearerr(inptr);
            setcharsprinted(chpr);
            return;
        }
        chpr += printf("%02x",(unsigned int)byte & 0xff);
    }
    if(PRINT_MULTIVAL_ALL)
    {
        for(i = 1; i < count; ++i,offset += 2L)
        {
            byte = read_ubyte(inptr,HERE);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            chpr += printf(",%02x",(unsigned int)byte & 0xff);
        }
    }
    else
    {
#define MAX 10UL
        j = count > MAX + 2 ? MAX : count;
        for(i = 1; i < j; ++i)
        {
            byte = read_ubyte(inptr,HERE);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            chpr += printf(",%02x",(unsigned int)byte & 0xff);
        }
        if((count > j) && (ferror(inptr) == 0))
        {
            chpr += printf(" ... ");
            offset += (unsigned long)(count - 1);
            byte = read_ubyte(inptr,offset);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            chpr += printf(",%02x (%lu)",(unsigned int)byte & 0xff,count);
            if(PRINT_ADDRESS)
                chpr += printf(" -> @%lu",offset);
        }
#undef MAX
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0x7a26
movq %r14, %rdi
movq %r15, %rsi
callq 0x4d48
movl %eax, %ebp
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x7a09
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
je 0x7b13
movq %r14, %rdi
callq 0x31b0
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x17a82
leaq 0x50753(%rip), %rax     # 0x58180
xorl %ebp, %ebp
testb $0x8, 0x3(%rax)
jne 0x7b85
movq %r15, (%rsp)
cmpq $0xd, %rbx
movl $0xa, %r12d
cmovbl %ebx, %r12d
cmpl $0x2, %r12d
jl 0x7a9f
leal -0x1(%r12), %r15d
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r14, %rdi
callq 0x4d48
movl %eax, %r13d
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x7b94
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x7b94
movzbl %r13b, %esi
leaq 0x39cb4(%rip), %rdi     # 0x41745
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
decl %r15d
jne 0x7a56
movslq %r12d, %rax
cmpq %rbx, %rax
movq (%rsp), %r15
jae 0x7b85
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x7b85
leaq 0x39c85(%rip), %rdi     # 0x4174b
xorl %eax, %eax
callq 0x3120
movl %eax, %r12d
addq %rbx, %r15
decq %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x4d48
movl %eax, %r13d
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x7b00
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
je 0x7ba3
addl %ebp, %r12d
movq %r14, %rdi
callq 0x31b0
movl %r12d, %edi
jmp 0x7a13
movzbl %bpl, %esi
leaq 0x39c28(%rip), %rdi     # 0x41746
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
leaq 0x50652(%rip), %rax     # 0x58180
testb $0x8, 0x3(%rax)
je 0x7a39
cmpq $0x1, %rbx
je 0x7b85
decq %rbx
leaq 0x39bfd(%rip), %r15     # 0x41745
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r14, %rdi
callq 0x4d48
movl %eax, %r12d
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x7b94
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x7b94
movzbl %r12b, %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
decq %rbx
jne 0x7b48
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x31b0
movl %ebp, %edi
jmp 0x7a13
movzbl %r13b, %esi
leaq 0x39ba3(%rip), %rdi     # 0x41751
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3120
leaq 0x505c1(%rip), %rax     # 0x58180
testb $0x3, 0x2(%rax)
je 0x7b85
leaq 0x39b91(%rip), %rdi     # 0x4175d
movq %r15, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3120