// File: /workspace/github_c_makefile_star2_O2/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
movq %rsi, %rbp
movq %rdi, %r15
xorl %ebx, %ebx
movzwl %dx, %r14d
testq %rsi, %rsi
je 0x7d5a
movq %r15, %rdi
movl %r14d, %esi
movq %r12, %rdx
callq 0x42ba
movq %rax, %r13
movq %r15, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x7cfe
movq %r15, %rdi
callq 0x30b0
testl %eax, %eax
je 0x7d0d
movq %r15, %rdi
callq 0x31b0
xorl %ebx, %ebx
jmp 0x7f17
leaq 0x4f46c(%rip), %rax     # 0x57180
movq (%rax), %rax
movl %eax, %ecx
notl %ecx
testb $0x30, %cl
jne 0x7d36
leaq 0x373c5(%rip), %rdi     # 0x3f0ec
movq %r13, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x3120
jmp 0x7d58
testb $0x10, %al
jne 0x7d47
testb $0x20, %al
je 0x7d5a
leaq 0x3eba0(%rip), %rdi     # 0x468e5
jmp 0x7d4e
leaq 0x42122(%rip), %rdi     # 0x49e70
movq %r13, %rsi
xorl %eax, %eax
callq 0x3120
movl %eax, %ebx
movl %r14d, 0x4(%rsp)
leaq 0x4f41a(%rip), %rax     # 0x57180
testb $0x8, 0x3(%rax)
jne 0x7e30
cmpq $0x6, %rbp
pushq $0x3
popq %r14
cmovbl %ebp, %r14d
movq %rbp, 0x10(%rsp)
leaq (%r12,%rbp,4), %r12
movslq %r14d, %rax
movq %rax, 0x8(%rsp)
leaq (,%rax,4), %rax
subq %rax, %r12
pushq $0x1
popq %rbp
cmpl %r14d, %ebp
jge 0x7ec9
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r15, %rdi
movl 0x4(%rsp), %esi
callq 0x42ba
movq %rax, %r13
movq %r15, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x7f0f
movq %r15, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x7f0f
leaq 0x4f3a1(%rip), %rax     # 0x57180
movq (%rax), %rax
movl %eax, %ecx
notl %ecx
testb $0x30, %cl
jne 0x7e01
leaq 0x379b1(%rip), %rdi     # 0x3f7a3
movq %r13, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x3120
jmp 0x7e23
testb $0x10, %al
jne 0x7e12
testb $0x20, %al
je 0x7e25
leaq 0x379a3(%rip), %rdi     # 0x3f7b3
jmp 0x7e19
leaq 0x37994(%rip), %rdi     # 0x3f7ad
movq %r13, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
incl %ebp
addq $0x4, %r12
jmp 0x7d9b
pushq $0x1
popq %r14
leaq 0x37968(%rip), %r12     # 0x3f7a3
cmpq %rbp, %r14
jae 0x7f17
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r15, %rdi
movl 0x4(%rsp), %esi
callq 0x42ba
movq %rax, %r13
movq %r15, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x7f0f
movq %r15, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x7f0f
leaq 0x4f301(%rip), %rax     # 0x57180
movq (%rax), %rax
movl %eax, %ecx
notl %ecx
testb $0x30, %cl
jne 0x7e9d
movq %r12, %rdi
movq %r13, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x3120
jmp 0x7ebf
testb $0x10, %al
jne 0x7eae
testb $0x20, %al
je 0x7ec1
leaq 0x37907(%rip), %rdi     # 0x3f7b3
jmp 0x7eb5
leaq 0x378f8(%rip), %rdi     # 0x3f7ad
movq %r13, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
incq %r14
jmp 0x7e3b
movq 0x10(%rsp), %r14
cmpq %r14, 0x8(%rsp)
jae 0x7f17
leaq 0x3786f(%rip), %rdi     # 0x3f74b
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
movq %r15, %rdi
movl 0x4(%rsp), %esi
movq %r12, %rdx
callq 0x42ba
movq %rax, %r13
movq %r15, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x7f0f
movq %r15, %rdi
callq 0x30b0
testl %eax, %eax
je 0x7f2c
movq %r15, %rdi
callq 0x31b0
movl %ebx, %edi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x16a4f
leaq 0x4f24d(%rip), %rax     # 0x57180
movq (%rax), %rax
movl %eax, %ecx
notl %ecx
testb $0x30, %cl
jne 0x7f58
leaq 0x37872(%rip), %rdi     # 0x3f7b8
movq %r13, %rsi
movq %r13, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x3120
jmp 0x7f7d
testb $0x10, %al
jne 0x7f69
testb $0x20, %al
je 0x7f7f
leaq 0x3786d(%rip), %rdi     # 0x3f7d4
jmp 0x7f70
leaq 0x37858(%rip), %rdi     # 0x3f7c8
movq %r13, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
leaq 0x4f1fa(%rip), %rax     # 0x57180
testb $0x3, 0x2(%rax)
je 0x7f17
leaq 0x377ca(%rip), %rdi     # 0x3f75d
movq %r12, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
jmp 0x7f17