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

    if(count)
    {
        value = read_ulong(inptr,byteorder,offset);
        if(feof(inptr) || ferror(inptr))
        {
            clearerr(inptr);
            setcharsprinted(chpr);
            return;
        }
        if(PRINT_BOTH_VALUE)
            chpr += printf("%#lx/%lu",value,value);
        else if(PRINT_HEX_VALUE)
            chpr += printf("%#lx",value);
        else if(PRINT_DEC_VALUE)
            chpr += printf("%lu",value);
    }
    if(PRINT_MULTIVAL_ALL)
    {
        for(i = 1; i < count; ++i,offset += 4L)
        {
            value = read_ulong(inptr,byteorder,HERE);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            if(PRINT_BOTH_VALUE)
                chpr += printf(",%#lx/%lu",value,value);
            else if(PRINT_HEX_VALUE)
                chpr += printf(",%#lx",value);
            else if(PRINT_DEC_VALUE)
                chpr += printf(",%lu",value);
        }
    }
    else
    {
#define MAX 3UL
        j = count > MAX + 2 ? MAX : count;
        for(i = 1; i < j; ++i,offset += 4L)
        {
            value = read_ulong(inptr,byteorder,HERE);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            if(PRINT_BOTH_VALUE)
                chpr += printf(",%#lx/%lu",value,value);
            else if(PRINT_HEX_VALUE)
                chpr += printf(",%#lx",value);
            else if(PRINT_DEC_VALUE)
                chpr += printf(",%lu",value);
        }
        if(count > j)
        {
            chpr += printf(" ... ");
            offset += (unsigned long)(count - j) * 4L;
            value = read_ulong(inptr,byteorder,offset);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            if(PRINT_BOTH_VALUE)
                chpr += printf(",%#lx/%lu (%lu)",value,value,count);
            else if(PRINT_HEX_VALUE)
                chpr += printf(",%#lx (%lu)",value,count);
            else if(PRINT_DEC_VALUE)
                chpr += printf(",%lu (%lu)",value,count);
            if(PRINT_ADDRESS)
                chpr += printf(" -> @%lu",offset);
        }
#undef MAX
    }
    setcharsprinted(chpr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0x8360
movzwl %bp, %r13d
movq %r14, %rdi
movl %r13d, %esi
movq %r12, %rdx
callq 0x4707
movq %rax, %r15
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x8351
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
je 0x849a
movq %r14, %rdi
callq 0x31b0
xorl %ebp, %ebp
jmp 0x8485
movl %ebp, 0x4(%rsp)
leaq 0x4fe15(%rip), %rax     # 0x58180
xorl %ebp, %ebp
testb $0x8, 0x3(%rax)
jne 0x8485
cmpq $0x6, %rbx
movl $0x3, %eax
movq %rbx, 0x8(%rsp)
cmovbl %ebx, %eax
cmpl $0x2, %eax
movq %rax, 0x10(%rsp)
jl 0x842b
leal -0x1(%rax), %ebx
movzwl 0x4(%rsp), %r13d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r14, %rdi
movl %r13d, %esi
callq 0x4707
movq %rax, %r15
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x847d
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x847d
leaq 0x4fda7(%rip), %rax     # 0x58180
movq (%rax), %rax
movl %eax, %ecx
notl %ecx
testb $0x30, %cl
jne 0x83fb
leaq 0x393b7(%rip), %rdi     # 0x417a3
movq %r15, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3120
jmp 0x841d
testb $0x10, %al
jne 0x840c
testb $0x20, %al
je 0x841f
leaq 0x393a9(%rip), %rdi     # 0x417b3
jmp 0x8413
leaq 0x3939a(%rip), %rdi     # 0x417ad
movq %r15, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
addq $0x4, %r12
decl %ebx
jne 0x839f
movslq 0x10(%rsp), %rax
movq 0x8(%rsp), %rbx
subq %rax, %rbx
jbe 0x8485
leaq 0x3930a(%rip), %rdi     # 0x4174b
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq (%r12,%rbx,4), %r12
movzwl 0x4(%rsp), %esi
movq %r14, %rdi
movq %r12, %rdx
callq 0x4707
movq %rax, %r15
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x847d
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
je 0x8598
movq %r14, %rdi
callq 0x31b0
movl %ebp, %edi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x17a82
leaq 0x4fcdf(%rip), %rax     # 0x58180
movq (%rax), %rax
movl %eax, %ecx
notl %ecx
testb $0x30, %cl
movl %ebp, 0x4(%rsp)
jne 0x84c7
leaq 0x38c34(%rip), %rdi     # 0x410ec
movq %r15, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3120
jmp 0x84eb
testb $0x10, %al
jne 0x84da
xorl %ebp, %ebp
testb $0x20, %al
je 0x84ed
leaq 0x4045d(%rip), %rdi     # 0x48935
jmp 0x84e1
leaq 0x439df(%rip), %rdi     # 0x4bec0
movq %r15, %rsi
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
leaq 0x4fc8c(%rip), %rax     # 0x58180
testb $0x8, 0x3(%rax)
je 0x8377
cmpq $0x1, %rbx
je 0x8485
decq %rbx
leaq 0x39295(%rip), %r15     # 0x417a3
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r14, %rdi
movl %r13d, %esi
callq 0x4707
movq %rax, %r12
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x847d
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x847d
leaq 0x4fc38(%rip), %rax     # 0x58180
movq (%rax), %rax
movl %eax, %ecx
notl %ecx
testb $0x30, %cl
jne 0x8566
movq %r15, %rdi
movq %r12, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x3120
jmp 0x8588
testb $0x10, %al
jne 0x8577
testb $0x20, %al
je 0x858a
leaq 0x3923e(%rip), %rdi     # 0x417b3
jmp 0x857e
leaq 0x3922f(%rip), %rdi     # 0x417ad
movq %r12, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
decq %rbx
jne 0x850e
jmp 0x8485
leaq 0x4fbe1(%rip), %rbx     # 0x58180
movq (%rbx), %rax
movl %eax, %ecx
notl %ecx
testb $0x30, %cl
jne 0x85c6
leaq 0x39206(%rip), %rdi     # 0x417b8
movq %r15, %rsi
movq %r15, %rdx
movq 0x8(%rsp), %rcx
xorl %eax, %eax
callq 0x3120
jmp 0x85ed
testb $0x10, %al
jne 0x85d7
testb $0x20, %al
je 0x85ef
leaq 0x391ff(%rip), %rdi     # 0x417d4
jmp 0x85de
leaq 0x391ea(%rip), %rdi     # 0x417c8
movq %r15, %rsi
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
testb $0x3, 0x2(%rbx)
je 0x8485
leaq 0x3915d(%rip), %rdi     # 0x4175d
movq %r12, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
jmp 0x8485