// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x9193
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4f20
movw %ax, -0x22(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3190
cmpl $0x0, %eax
jne 0x915f
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
je 0x9175
movq -0x8(%rbp), %rdi
callq 0x31a0
movl -0x28(%rbp), %edi
callq 0x1ff00
jmp 0x93b7
movzwl -0x22(%rbp), %esi
andl $0xff, %esi
leaq 0x5b580(%rip), %rdi     # 0x64706
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x6dfe6(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x8000000, %rax        # imm = 0x8000000
cmpq $0x0, %rax
je 0x923f
movl $0x1, -0x1c(%rbp)
movslq -0x1c(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x923a
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f20
movw %ax, -0x22(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3190
cmpl $0x0, %eax
jne 0x91ec
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
je 0x9202
movq -0x8(%rbp), %rdi
callq 0x31a0
movl -0x28(%rbp), %edi
callq 0x1ff00
jmp 0x93b7
movzwl -0x22(%rbp), %esi
andl $0xff, %esi
leaq 0x5b4f2(%rip), %rdi     # 0x64705
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
jmp 0x91b4
jmp 0x93b7
cmpq $0xc, -0x10(%rbp)
jbe 0x9251
movl $0xa, %eax
movq %rax, -0x30(%rbp)
jmp 0x9259
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl %eax, -0x20(%rbp)
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x92dc
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f20
movw %ax, -0x22(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3190
cmpl $0x0, %eax
jne 0x929d
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
je 0x92b3
movq -0x8(%rbp), %rdi
callq 0x31a0
movl -0x28(%rbp), %edi
callq 0x1ff00
jmp 0x93b7
movzwl -0x22(%rbp), %esi
andl $0xff, %esi
leaq 0x5b441(%rip), %rdi     # 0x64705
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x9267
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x93b5
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
jne 0x93b5
leaq 0x5b405(%rip), %rdi     # 0x6470b
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
subq $0x1, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4f20
movw %ax, -0x22(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3190
cmpl $0x0, %eax
jne 0x9350
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
je 0x9363
movq -0x8(%rbp), %rdi
callq 0x31a0
movl -0x28(%rbp), %edi
callq 0x1ff00
jmp 0x93b7
movzwl -0x22(%rbp), %esi
andl $0xff, %esi
movq -0x10(%rbp), %rdx
leaq 0x5b399(%rip), %rdi     # 0x64711
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x6ddf4(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30000, %rax          # imm = 0x30000
cmpq $0x0, %rax
je 0x93b3
movq -0x18(%rbp), %rsi
leaq 0x5b377(%rip), %rdi     # 0x6471d
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x93b5
jmp 0x93b7
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)