// File: /workspace/github_c_makefile_star2_O2/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 0x7403
movq %r14, %rdi
movq %r15, %rsi
callq 0x48de
movl %eax, %ebp
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x73f4
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
je 0x74de
movq %r14, %rdi
callq 0x31b0
xorl %edi, %edi
jmp 0x74cb
xorl %ebp, %ebp
leaq 0x4fd74(%rip), %rax     # 0x57180
testb $0x8, 0x3(%rax)
jne 0x7470
movq %r15, (%rsp)
cmpq $0xd, %rbx
pushq $0xa
popq %r15
cmovbl %ebx, %r15d
pushq $0x1
popq %r12
cmpl %r15d, %r12d
jge 0x74f7
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r14, %rdi
callq 0x48de
movl %eax, %r13d
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x74c1
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x74c1
movzbl %r13b, %esi
leaq 0x382e3(%rip), %rdi     # 0x3f745
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
incl %r12d
jmp 0x7426
pushq $0x1
popq %r13
leaq 0x382ca(%rip), %r15     # 0x3f745
cmpq %rbx, %r13
jae 0x750b
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r14, %rdi
callq 0x48de
movl %eax, %r12d
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x74c1
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x74c1
movzbl %r12b, %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
incq %r13
jmp 0x747b
movq %r14, %rdi
callq 0x31b0
movl %ebp, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x16a4f
movzbl %bpl, %esi
leaq 0x3825d(%rip), %rdi     # 0x3f746
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
jmp 0x7405
movslq %r15d, %rax
cmpq %rbx, %rax
jae 0x750b
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
je 0x751a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3822a(%rip), %rdi     # 0x3f74b
xorl %eax, %eax
callq 0x3120
movl %eax, %r12d
movq (%rsp), %rax
leaq (%rbx,%rax), %r15
decq %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x48de
movl %eax, %r13d
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x755c
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
je 0x756f
addl %ebp, %r12d
movq %r14, %rdi
callq 0x31b0
movl %r12d, %edi
jmp 0x74cb
movzbl %r13b, %esi
leaq 0x381d7(%rip), %rdi     # 0x3f751
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3120
leaq 0x4fbf5(%rip), %rax     # 0x57180
testb $0x3, 0x2(%rax)
je 0x750b
leaq 0x381c1(%rip), %rdi     # 0x3f75d
movq %r15, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3120