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

    if(count)
    {
        value = read_ushort(inptr,byteorder,offset);
        if(feof(inptr) || ferror(inptr))
        {
            clearerr(inptr);
            setcharsprinted(chpr);
            return;
        }
        if(PRINT_BOTH_VALUE)
            chpr += printf("%#x/%u",value,value);
        else if(PRINT_HEX_VALUE)
            chpr += printf("%#x",value);
        else if(PRINT_DEC_VALUE)
            chpr += printf("%u",value);
    }
    if(PRINT_MULTIVAL_ALL)
    {
        for(i = 1; i < count; ++i,offset += 2L)
        {
            value = read_ushort(inptr,byteorder,HERE);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            if(PRINT_BOTH_VALUE)
                chpr += printf(",%#x/%u",value,value);
            else if(PRINT_HEX_VALUE)
                chpr += printf(",%#x",value);
            else if(PRINT_DEC_VALUE)
                chpr += printf(",%u",value);
        }
    }
    else
    {
#define MAX 5UL
        j = count > MAX + 2 ? MAX : count;
        for(i = 1; i < j; ++i,offset += 2L)
        {
            value = read_ushort(inptr,byteorder,HERE);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            if(PRINT_BOTH_VALUE)
                chpr += printf(",%#x/%u",value,value);
            else if(PRINT_HEX_VALUE)
                chpr += printf(",%#x",value);
            else if(PRINT_DEC_VALUE)
                chpr += printf(",%u",value);
        }
        if((count > j) && (ferror(inptr) == 0))
        {
            chpr += printf(" ... ");
            offset += (unsigned long)(count - j) * 2L;
            value = read_ushort(inptr,byteorder,offset);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            if(PRINT_BOTH_VALUE)
                chpr += printf(",%#x/%u (%lu)",value,value,count);
            else if(PRINT_HEX_VALUE)
                chpr += printf(",%#x (%lu)",value,count);
            else if(PRINT_DEC_VALUE)
                chpr += printf(",%u (%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 0x9769
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 0x96c1
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
je 0x96d7
movq -0x8(%rbp), %rdi
callq 0x31a0
movl -0x30(%rbp), %edi
callq 0x1ff00
jmp 0x9b26
leaq 0x6daa2(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x30, %rax
jne 0x9709
movzwl -0x2a(%rbp), %esi
movzwl -0x2a(%rbp), %edx
leaq 0x663d4(%rip), %rdi     # 0x6face
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x9767
leaq 0x6da70(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x9737
movzwl -0x2a(%rbp), %esi
leaq 0x62181(%rip), %rdi     # 0x6b8a9
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x9765
leaq 0x6da42(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x20, %rax
cmpq $0x0, %rax
je 0x9763
movzwl -0x2a(%rbp), %esi
leaq 0x5ded9(%rip), %rdi     # 0x6762f
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x9765
jmp 0x9767
jmp 0x9769
leaq 0x6da10(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x8000000, %rax        # imm = 0x8000000
cmpq $0x0, %rax
je 0x9891
movl $0x1, -0x24(%rbp)
movslq -0x24(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x988c
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 0x97ca
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
je 0x97e0
movq -0x8(%rbp), %rdi
callq 0x31a0
movl -0x30(%rbp), %edi
callq 0x1ff00
jmp 0x9b26
leaq 0x6d999(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x30, %rax
jne 0x9812
movzwl -0x2a(%rbp), %esi
movzwl -0x2a(%rbp), %edx
leaq 0x5af31(%rip), %rdi     # 0x64734
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x9870
leaq 0x6d967(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x9840
movzwl -0x2a(%rbp), %esi
leaq 0x63fdd(%rip), %rdi     # 0x6d80e
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x986e
leaq 0x6d939(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x20, %rax
cmpq $0x0, %rax
je 0x986c
movzwl -0x2a(%rbp), %esi
leaq 0x5aedd(%rip), %rdi     # 0x6473c
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x986e
jmp 0x9870
jmp 0x9872
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
jmp 0x978a
jmp 0x9b1e
cmpq $0x7, -0x10(%rbp)
jbe 0x98a3
movl $0x5, %eax
movq %rax, -0x38(%rbp)
jmp 0x98ab
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 0x99b9
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 0x98f7
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
je 0x990d
movq -0x8(%rbp), %rdi
callq 0x31a0
movl -0x30(%rbp), %edi
callq 0x1ff00
jmp 0x9b26
leaq 0x6d86c(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x30, %rax
jne 0x993f
movzwl -0x2a(%rbp), %esi
movzwl -0x2a(%rbp), %edx
leaq 0x5ae04(%rip), %rdi     # 0x64734
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x999d
leaq 0x6d83a(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x996d
movzwl -0x2a(%rbp), %esi
leaq 0x63eb0(%rip), %rdi     # 0x6d80e
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x999b
leaq 0x6d80c(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x20, %rax
cmpq $0x0, %rax
je 0x9999
movzwl -0x2a(%rbp), %esi
leaq 0x5adb0(%rip), %rdi     # 0x6473c
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x999b
jmp 0x999d
jmp 0x999f
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
jmp 0x98b9
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x9b1c
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
jne 0x9b1c
leaq 0x5ad28(%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 0x9a3a
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
je 0x9a50
movq -0x8(%rbp), %rdi
callq 0x31a0
movl -0x30(%rbp), %edi
callq 0x1ff00
jmp 0x9b26
leaq 0x6d729(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x30, %rax
jne 0x9a86
movzwl -0x2a(%rbp), %esi
movzwl -0x2a(%rbp), %edx
movq -0x10(%rbp), %rcx
leaq 0x5acc9(%rip), %rdi     # 0x64740
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x9aec
leaq 0x6d6f3(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x9ab8
movzwl -0x2a(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq 0x5aca5(%rip), %rdi     # 0x6474e
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x9aea
leaq 0x6d6c1(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x20, %rax
cmpq $0x0, %rax
je 0x9ae8
movzwl -0x2a(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq 0x5ac7e(%rip), %rdi     # 0x64759
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x9aea
jmp 0x9aec
leaq 0x6d68d(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30000, %rax          # imm = 0x30000
cmpq $0x0, %rax
je 0x9b1a
movq -0x20(%rbp), %rsi
leaq 0x5ac10(%rip), %rdi     # 0x6471d
movb $0x0, %al
callq 0x3110
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x9b1c
jmp 0x9b1e
movl -0x30(%rbp), %edi
callq 0x1ff00
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)