// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x34(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xa33b
movq -0x8(%rbp), %rdi
movw -0x12(%rbp), %ax
movq -0x20(%rbp), %rdx
movzwl %ax, %esi
callq 0x4610
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3190
cmpl $0x0, %eax
jne 0xa30d
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
je 0xa323
movq -0x8(%rbp), %rdi
callq 0x31a0
movl -0x34(%rbp), %edi
callq 0x1ff00
jmp 0xa559
movq -0x30(%rbp), %rsi
leaq 0x624e6(%rip), %rdi     # 0x6c814
movb $0x0, %al
callq 0x3110
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
leaq 0x6ce3e(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x8000000, %rax        # imm = 0x8000000
cmpq $0x0, %rax
je 0xa3e5
movl $0x1, -0x24(%rbp)
movslq -0x24(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0xa3e0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movzwl -0x12(%rbp), %esi
callq 0x4610
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3190
cmpl $0x0, %eax
jne 0xa398
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
je 0xa3ae
movq -0x8(%rbp), %rdi
callq 0x31a0
movl -0x34(%rbp), %edi
callq 0x1ff00
jmp 0xa559
movq -0x30(%rbp), %rsi
leaq 0x5a3e6(%rip), %rdi     # 0x6479f
movb $0x0, %al
callq 0x3110
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
jmp 0xa35c
jmp 0xa551
cmpq $0x5, -0x10(%rbp)
jbe 0xa3f7
movl $0x3, %eax
movq %rax, -0x40(%rbp)
jmp 0xa3ff
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl %eax, -0x28(%rbp)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0xa480
movq -0x8(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movzwl -0x12(%rbp), %esi
callq 0x4610
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3190
cmpl $0x0, %eax
jne 0xa447
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
je 0xa45d
movq -0x8(%rbp), %rdi
callq 0x31a0
movl -0x34(%rbp), %edi
callq 0x1ff00
jmp 0xa559
movq -0x30(%rbp), %rsi
leaq 0x5a337(%rip), %rdi     # 0x6479f
movb $0x0, %al
callq 0x3110
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xa40d
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
cmpq %rcx, %rax
jbe 0xa54f
leaq 0x5a273(%rip), %rdi     # 0x6470b
movb $0x0, %al
callq 0x3110
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
subq %rcx, %rax
shlq $0x2, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movw -0x12(%rbp), %ax
movq -0x20(%rbp), %rdx
movzwl %ax, %esi
callq 0x4610
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3190
cmpl $0x0, %eax
jne 0xa4f0
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
je 0xa503
movq -0x8(%rbp), %rdi
callq 0x31a0
movl -0x34(%rbp), %edi
callq 0x1ff00
jmp 0xa559
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq 0x5a292(%rip), %rdi     # 0x647a4
movb $0x0, %al
callq 0x3110
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
leaq 0x6cc5a(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30000, %rax          # imm = 0x30000
cmpq $0x0, %rax
je 0xa54d
movq -0x20(%rbp), %rsi
leaq 0x5a1dd(%rip), %rdi     # 0x6471d
movb $0x0, %al
callq 0x3110
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0xa54f
jmp 0xa551
movl -0x34(%rbp), %edi
callq 0x1ff00
addq $0x40, %rsp
popq %rbp
retq
nop