// File: /workspace/github_c_makefile_star2_O1/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, %r14
movq %rdi, %r15
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x831b
movzwl %bp, %esi
movq %r15, %rdi
movq %r12, %rdx
callq 0x46cc
movq %rax, %r13
movq %r15, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x82bf
movq %r15, %rdi
callq 0x30b0
testl %eax, %eax
je 0x82ce
movq %r15, %rdi
callq 0x31b0
xorl %ebx, %ebx
jmp 0x84d4
leaq 0x4feab(%rip), %rax     # 0x58180
movq (%rax), %rax
movl %eax, %ecx
notl %ecx
testb $0x30, %cl
jne 0x82f7
leaq 0x38e04(%rip), %rdi     # 0x410ec
movq %r13, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x3120
jmp 0x8319
testb $0x10, %al
jne 0x8308
testb $0x20, %al
je 0x831b
leaq 0x405ef(%rip), %rdi     # 0x488f5
jmp 0x830f
leaq 0x43b71(%rip), %rdi     # 0x4be80
movq %r13, %rsi
xorl %eax, %eax
callq 0x3120
movl %eax, %ebx
leaq 0x4fe5e(%rip), %rax     # 0x58180
testb $0x8, 0x3(%rax)
jne 0x8445
cmpq $0x6, %r14
movl $0x3, %eax
cmovbl %r14d, %eax
cmpl $0x2, %eax
movl %ebp, 0x8(%rsp)
movq %rax, 0x10(%rsp)
jl 0x83e4
leal -0x1(%rax), %r13d
movzwl %bp, %eax
movl %eax, 0xc(%rsp)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r15, %rdi
movl 0xc(%rsp), %esi
callq 0x46cc
movq %rax, %rbp
movq %r15, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x8438
movq %r15, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x8438
leaq 0x4fdef(%rip), %rax     # 0x58180
movq (%rax), %rax
movl %eax, %ecx
notl %ecx
testb $0x30, %cl
jne 0x83b3
leaq 0x393ff(%rip), %rdi     # 0x417a3
movq %rbp, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x3120
jmp 0x83d5
testb $0x10, %al
jne 0x83c4
testb $0x20, %al
je 0x83d7
leaq 0x393f1(%rip), %rdi     # 0x417b3
jmp 0x83cb
leaq 0x393e2(%rip), %rdi     # 0x417ad
movq %rbp, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
addq $0x4, %r12
decl %r13d
jne 0x8356
movslq 0x10(%rsp), %rax
movq %r14, %r13
subq %rax, %r13
jbe 0x84d4
leaq 0x3934f(%rip), %rdi     # 0x4174b
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
leaq (%r12,%r13,4), %r12
movzwl 0x8(%rsp), %esi
movq %r15, %rdi
movq %r12, %rdx
callq 0x46cc
movq %rax, %r13
movq %r15, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x8438
movq %r15, %rdi
callq 0x30b0
testl %eax, %eax
je 0x84e9
movq %r15, %rdi
callq 0x31b0
jmp 0x84d4
cmpq $0x2, %r14
jb 0x84d4
decq %r14
movzwl %bp, %ebp
leaq 0x39347(%rip), %r12     # 0x417a3
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r15, %rdi
movl %ebp, %esi
callq 0x46cc
movq %rax, %r13
movq %r15, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x8438
movq %r15, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x8438
leaq 0x4fcf3(%rip), %rax     # 0x58180
movq (%rax), %rax
movl %eax, %ecx
notl %ecx
testb $0x30, %cl
jne 0x84ab
movq %r12, %rdi
movq %r13, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x3120
jmp 0x84cd
testb $0x10, %al
jne 0x84bc
testb $0x20, %al
je 0x84cf
leaq 0x392f9(%rip), %rdi     # 0x417b3
jmp 0x84c3
leaq 0x392ea(%rip), %rdi     # 0x417ad
movq %r13, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
decq %r14
jne 0x845c
movl %ebx, %edi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x17530
leaq 0x4fc90(%rip), %rax     # 0x58180
movq (%rax), %rax
movl %eax, %ecx
notl %ecx
testb $0x30, %cl
jne 0x8515
leaq 0x392b5(%rip), %rdi     # 0x417b8
movq %r13, %rsi
movq %r13, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x3120
jmp 0x853a
testb $0x10, %al
jne 0x8526
testb $0x20, %al
je 0x853c
leaq 0x392b0(%rip), %rdi     # 0x417d4
jmp 0x852d
leaq 0x3929b(%rip), %rdi     # 0x417c8
movq %r13, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
leaq 0x4fc3d(%rip), %rax     # 0x58180
testb $0x3, 0x2(%rax)
je 0x84d4
leaq 0x3920d(%rip), %rdi     # 0x4175d
movq %r12, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
jmp 0x84d4