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

    if(count)
    {
        value = (short)read_ushort(inptr,byteorder,offset);
        if(feof(inptr) || ferror(inptr))
        {
            clearerr(inptr);
            setcharsprinted(chpr);
            return;
        }
        chpr += printf("%d",value);
    }
    if(PRINT_MULTIVAL_ALL)
    {
        for(i = 1; i < count; ++i,offset += 2L)
        {
            value = (short)read_ushort(inptr,byteorder,HERE);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            chpr += printf(",%d",value);
        }
    }
    else
    {
#define MAX 5UL
        j = count > MAX + 2 ? MAX : count;
        for(i = 1; i < j; ++i,offset += 2L)
        {
            value = (short)read_ushort(inptr,byteorder,HERE);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            chpr += printf(",%d",value);
        }
        if(count > j)
        {
            chpr += printf(" ... ");
            offset += (unsigned long)(count - j) * 2L;
            value = (short)read_ushort(inptr,byteorder,offset);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            chpr += printf(",%d (%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, -0x30(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x9bbb
movq -0x8(%rbp), %rdi
movw -0x12(%rbp), %ax
movq -0x20(%rbp), %rdx
movzwl %ax, %esi
callq 0x4480
movw %ax, -0x2a(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3190
cmpl $0x0, %eax
jne 0x9b8d
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
je 0x9ba3
movq -0x8(%rbp), %rdi
callq 0x31a0
movl -0x30(%rbp), %edi
callq 0x1ff00
jmp 0x9de4
movswl -0x2a(%rbp), %esi
leaq 0x5e14b(%rip), %rdi     # 0x67cf9
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
leaq 0x6d5be(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x8000000, %rax        # imm = 0x8000000
cmpq $0x0, %rax
je 0x9c65
movl $0x1, -0x24(%rbp)
movslq -0x24(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x9c60
movq -0x8(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movzwl -0x12(%rbp), %esi
callq 0x4480
movw %ax, -0x2a(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3190
cmpl $0x0, %eax
jne 0x9c18
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
je 0x9c2e
movq -0x8(%rbp), %rdi
callq 0x31a0
movl -0x30(%rbp), %edi
callq 0x1ff00
jmp 0x9de4
movswl -0x2a(%rbp), %esi
leaq 0x5aaed(%rip), %rdi     # 0x64726
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
jmp 0x9bdc
jmp 0x9ddc
cmpq $0x7, -0x10(%rbp)
jbe 0x9c77
movl $0x5, %eax
movq %rax, -0x38(%rbp)
jmp 0x9c7f
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl %eax, -0x28(%rbp)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x9d0c
movq -0x8(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movzwl -0x12(%rbp), %esi
callq 0x4480
movw %ax, -0x2a(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3190
cmpl $0x0, %eax
jne 0x9cc7
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
je 0x9cdd
movq -0x8(%rbp), %rdi
callq 0x31a0
movl -0x30(%rbp), %edi
callq 0x1ff00
jmp 0x9de4
movswl -0x2a(%rbp), %esi
leaq 0x5aa3e(%rip), %rdi     # 0x64726
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
jmp 0x9c8d
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x9dda
leaq 0x5a9e7(%rip), %rdi     # 0x6470b
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
subq %rcx, %rax
shlq %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 0x4480
movw %ax, -0x2a(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3190
cmpl $0x0, %eax
jne 0x9d7b
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
je 0x9d8e
movq -0x8(%rbp), %rdi
callq 0x31a0
movl -0x30(%rbp), %edi
callq 0x1ff00
jmp 0x9de4
movswl -0x2a(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq 0x5a98d(%rip), %rdi     # 0x6472a
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
leaq 0x6d3cf(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30000, %rax          # imm = 0x30000
cmpq $0x0, %rax
je 0x9dd8
movq -0x20(%rbp), %rsi
leaq 0x5a952(%rip), %rdi     # 0x6471d
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x9dda
jmp 0x9ddc
movl -0x30(%rbp), %edi
callq 0x1ff00
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)