// File: /workspace/github_c_makefile_star2_O0/hfiguiere[P]exifprobe/ciff.c
// Function: print_ciffinrecdata
unsigned long
print_ciffinrecdata(FILE *inptr,unsigned short byteorder,char *tagname,
                                unsigned long offset,unsigned long dirlength,
                                unsigned short data_format,int indent)
{
    unsigned long end_offset = 0UL;
    unsigned short count;
    int chpr = 0;

    if(inptr)
    {
        end_offset = offset + dirlength;
        if((PRINT_VALUE))
        {
            count = dirlength;
            chpr = count;
            switch(data_format)
            {
                case 0x1000:    /* DC_USHORT                          */
                            print_ushort(inptr,count/2,byteorder,offset);
                            break;
                case 0x1800:    /* DC_UINT32:                         */
                            print_ulong(inptr,count/4,byteorder,offset);
                            break;
                case 0x0800:    /* DC_ASCII:                          */
                            print_ascii(inptr,count,offset); 
                            break;
                case 0x0000:    /* DC_BYTE:                           */
                            print_ubytes(inptr,count,offset);
                            break;
                default:
                            chpr += printf("(data format %#x)",data_format);
                            break;
            }
            setcharsprinted(chpr);
        }
    }
    return(end_offset);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movw %r9w, %ax
movl 0x10(%rbp), %r9d
movq %rdi, -0x8(%rbp)
movw %si, -0xa(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movw %ax, -0x2a(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x0, -0x40(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x2e170
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq 0x490fb(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x2e16e
movw -0x28(%rbp), %ax
movw %ax, -0x3a(%rbp)
movzwl -0x3a(%rbp), %eax
movl %eax, -0x40(%rbp)
movzwl -0x2a(%rbp), %eax
movl %eax, -0x44(%rbp)
testl %eax, %eax
je 0x2e139
jmp 0x2e0b6
movl -0x44(%rbp), %eax
subl $0x800, %eax            # imm = 0x800
je 0x2e124
jmp 0x2e0c2
movl -0x44(%rbp), %eax
subl $0x1000, %eax           # imm = 0x1000
je 0x2e0da
jmp 0x2e0ce
movl -0x44(%rbp), %eax
subl $0x1800, %eax           # imm = 0x1800
je 0x2e0ff
jmp 0x2e14e
movq -0x8(%rbp), %rdi
movzwl -0x3a(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movslq %eax, %rsi
movw -0xa(%rbp), %ax
movq -0x20(%rbp), %rcx
movzwl %ax, %edx
callq 0x9660
jmp 0x2e166
movq -0x8(%rbp), %rdi
movzwl -0x3a(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movslq %eax, %rsi
movw -0xa(%rbp), %ax
movq -0x20(%rbp), %rcx
movzwl %ax, %edx
callq 0x9df0
jmp 0x2e166
movq -0x8(%rbp), %rdi
movzwl -0x3a(%rbp), %eax
movl %eax, %esi
movq -0x20(%rbp), %rdx
callq 0x8e70
jmp 0x2e166
movq -0x8(%rbp), %rdi
movzwl -0x3a(%rbp), %eax
movl %eax, %esi
movq -0x20(%rbp), %rdx
callq 0x9110
jmp 0x2e166
movzwl -0x2a(%rbp), %esi
leaq 0x3cd70(%rip), %rdi     # 0x6aec9
movb $0x0, %al
callq 0x3110
addl -0x40(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %edi
callq 0x1ff00
jmp 0x2e170
movq -0x38(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)