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

    if(count)
    {
        value = (long)read_ulong(inptr,byteorder,offset);
        if(feof(inptr) || ferror(inptr))
        {
            clearerr(inptr);
            setcharsprinted(chpr);
            return;
        }
        chpr += printf("%ld",value);
    }
    if(PRINT_MULTIVAL_ALL)
    {
        for(i = 1; i < count; ++i,offset += 4L)
        {
            value = (long)read_ulong(inptr,byteorder,HERE);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            chpr += printf(",%ld",value);
        }
    }
    else
    {
#define MAX 3UL
        j = count > MAX + 2 ? MAX : count;
        for(i = 1; i < j; ++i)
        {
            value = (long)read_ulong(inptr,byteorder,HERE);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            chpr += printf(",%ld",value);
        }
        if(count > j)
        {
            chpr += printf(" ... ");
            offset += (unsigned long)(count - j) * 4L;
            value = (long)read_ulong(inptr,byteorder,offset);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            chpr += printf(",%ld (%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, %r14
movq %rdi, %r15
movzwl %dx, %ebp
movq %rsi, 0x8(%rsp)
testq %rsi, %rsi
je 0x8000
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x42ba
movq %rax, %rbx
movq %r15, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x7ff1
movq %r15, %rdi
callq 0x30b0
testl %eax, %eax
je 0x80d4
movq %r15, %rdi
callq 0x31b0
xorl %ebx, %ebx
jmp 0x8142
xorl %ebx, %ebx
leaq 0x4f177(%rip), %rax     # 0x57180
testb $0x8, 0x3(%rax)
jne 0x807c
movq %r14, 0x10(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x6, %rax
pushq $0x3
popq %r13
cmovbl %eax, %r13d
pushq $0x1
popq %r14
cmpl %r13d, %r14d
jge 0x80ec
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r15, %rdi
movl %ebp, %esi
callq 0x42ba
movq %rax, %r12
movq %r15, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x813a
movq %r15, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x813a
leaq 0x37774(%rip), %rdi     # 0x3f7df
movq %r12, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
incl %r14d
jmp 0x8029
pushq $0x1
popq %r14
leaq 0x37758(%rip), %r12     # 0x3f7df
cmpq 0x8(%rsp), %r14
jae 0x8142
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r15, %rdi
movl %ebp, %esi
callq 0x42ba
movq %rax, %r13
movq %r15, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x813a
movq %r15, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x813a
movq %r12, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
incq %r14
jmp 0x8087
leaq 0x3ff8d(%rip), %rdi     # 0x48068
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3120
movl %eax, %ebx
jmp 0x8002
movslq %r13d, %rax
movq 0x8(%rsp), %r14
subq %rax, %r14
jbe 0x8142
leaq 0x3764b(%rip), %rdi     # 0x3f74b
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
movq 0x10(%rsp), %rax
leaq (%rax,%r14,4), %r12
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x42ba
movq %rax, %r13
movq %r15, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x813a
movq %r15, %rdi
callq 0x30b0
testl %eax, %eax
je 0x8157
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 0x37686(%rip), %rdi     # 0x3f7e4
movq %r13, %rsi
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
leaq 0x4f00a(%rip), %rax     # 0x57180
testb $0x3, 0x2(%rax)
je 0x8142
leaq 0x375da(%rip), %rdi     # 0x3f75d
movq %r12, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
jmp 0x8142