// File: /workspace/github_c_makefile_star2_O3/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, %rbp
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %r15
testq %rsi, %rsi
je 0x8670
movzwl %r12w, %r13d
movq %r15, %rdi
movl %r13d, %esi
movq %rbp, %rdx
callq 0x4707
movq %rax, %rbx
movq %r15, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x8661
movq %r15, %rdi
callq 0x30b0
testl %eax, %eax
je 0x875f
movq %r15, %rdi
callq 0x31b0
xorl %ebx, %ebx
jmp 0x874a
leaq 0x4fb09(%rip), %rax     # 0x58180
xorl %ebx, %ebx
testb $0x8, 0x3(%rax)
jne 0x874a
movq %rbp, 0x8(%rsp)
cmpq $0x6, %r14
movl $0x3, %eax
cmovbl %r14d, %eax
cmpl $0x2, %eax
movl %r12d, 0x4(%rsp)
movq %rax, 0x10(%rsp)
jl 0x86ed
leal -0x1(%rax), %ebp
movzwl %r12w, %r13d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r15, %rdi
movl %r13d, %esi
callq 0x4707
movq %rax, %r12
movq %r15, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x8742
movq %r15, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x8742
leaq 0x39102(%rip), %rdi     # 0x417df
movq %r12, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
decl %ebp
jne 0x86ab
movslq 0x10(%rsp), %rax
movq %r14, %r12
subq %rax, %r12
jbe 0x874a
leaq 0x3904a(%rip), %rdi     # 0x4174b
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
movq 0x8(%rsp), %rax
leaq (%rax,%r12,4), %r12
movzwl 0x4(%rsp), %esi
movq %r15, %rdi
movq %r12, %rdx
callq 0x4707
movq %rax, %r13
movq %r15, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x8742
movq %r15, %rdi
callq 0x30b0
testl %eax, %eax
je 0x87d7
movq %r15, %rdi
callq 0x31b0
movl %ebx, %edi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x17a82
leaq 0x41952(%rip), %rdi     # 0x4a0b8
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3120
movl %eax, %ebx
leaq 0x4fa07(%rip), %rax     # 0x58180
testb $0x8, 0x3(%rax)
je 0x8683
cmpq $0x1, %r14
je 0x874a
decq %r14
leaq 0x3904c(%rip), %r12     # 0x417df
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r15, %rdi
movl %r13d, %esi
callq 0x4707
movq %rax, %rbp
movq %r15, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x8742
movq %r15, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x8742
movq %r12, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
decq %r14
jne 0x8793
jmp 0x874a
leaq 0x39006(%rip), %rdi     # 0x417e4
movq %r13, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
leaq 0x4f98c(%rip), %rax     # 0x58180
testb $0x3, 0x2(%rax)
je 0x874a
leaq 0x38f58(%rip), %rdi     # 0x4175d
movq %r12, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
jmp 0x874a