// File: /workspace/github_c_makefile_star2_O0/hfiguiere[P]exifprobe/ciff.c
// Function: print_ciff_taginfo
void
print_ciff_taginfo(struct ciff_direntry *entry,unsigned long fileoffset_base)
{
    char *nameoftag = NULL;
    int tagwidth = CIFFTAGWIDTH;
    unsigned short tag,format,location;
    int chpr = 0;

    if(entry && (PRINT_ENTRY))
    {
        tag = entry->type & CIFF_TYPEMASK;
        format = entry->type & CIFF_FORMATMASK;
        location = entry->type & CIFF_LOCATIONMASK;
        if(PRINT_BOTH_TAGNO)
            chpr += printf("<%#06x=%5u> ",tag,tag);
        else if(PRINT_DEC_TAGNO)
            chpr += printf("<%5u> ",tag);
        else if(PRINT_HEX_TAGNO)
            chpr += printf("<%#06x> ",tag);
        if((PRINT_TAGNAME))
        {
            nameoftag = cifftagname(tag);
            if(nameoftag)
            {
                chpr += printf("%-*.*s",tagwidth,tagwidth,nameoftag);
                free(nameoftag);
            }
        }
        if(PRINT_TYPE)
        {
            chpr += printf(" [%#06x ",format);
            switch(format)
            {
                case 0x0000: chpr += printf("BYTE  "); break;
                case 0x0800: chpr += printf("ASCII "); break;
                case 0x1000: chpr += printf("SHORT "); break;
                case 0x1800: chpr += printf("LONG  "); break;
                case 0x2000: chpr += printf("STRUCT"); break;
                case 0x2800: chpr += printf("SUBDIR"); break;
                case 0x3000: chpr += printf("SUBDIR"); break;
                case 0x3800:
                default:
                    chpr += printf("UNDEFINED");
                    break;
            }
            switch(location)
            {
                case 0x0000: chpr += printf(" INHEAP %10lu %10lu",entry->length,entry->offset); break;
                case 0x4000: chpr += printf(" INREC  %10lu %10lu",entry->length,entry->offset); break;
                case 0x8000: chpr += printf(" X8000  %10lu %10lu",entry->length,entry->offset); break;
                case 0xc000: chpr += printf(" XC000  %10lu %10lu",entry->length,entry->offset); break;
                default:
                    chpr += printf(" UNKNOWNLOC");
                    break;
            }
            chpr += printf("] ");
        }
        /* ###%%% should be done immediately before value is printed; */
        /* not here                                                   */
        if(PRINT_VALUE)
            chpr += printf(" = "); 
    }
    setcharsprinted(chpr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x17, -0x1c(%rbp)
movl $0x0, -0x28(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x2d637
leaq 0x49ef8(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x4003333, %rax        # imm = 0x4003333
cmpq $0x0, %rax
je 0x2d637
movq -0x8(%rbp), %rax
movzwl (%rax), %eax
andl $0x3fff, %eax           # imm = 0x3FFF
movw %ax, -0x1e(%rbp)
movq -0x8(%rbp), %rax
movzwl (%rax), %eax
andl $0x3800, %eax           # imm = 0x3800
movw %ax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movzwl (%rax), %eax
andl $0xc000, %eax           # imm = 0xC000
movw %ax, -0x22(%rbp)
leaq 0x49eae(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3, %rax
cmpq $0x3, %rax
jne 0x2d2fd
movzwl -0x1e(%rbp), %esi
movzwl -0x1e(%rbp), %edx
leaq 0x372f3(%rip), %rdi     # 0x645e1
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x2d35b
leaq 0x49e7c(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x2, %rax
cmpq $0x0, %rax
je 0x2d32b
movzwl -0x1e(%rbp), %esi
leaq 0x372d2(%rip), %rdi     # 0x645ee
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x2d359
leaq 0x49e4e(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x2d357
movzwl -0x1e(%rbp), %esi
leaq 0x372ab(%rip), %rdi     # 0x645f5
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x2d359
jmp 0x2d35b
leaq 0x49e1e(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x1000, %rax           # imm = 0x1000
cmpq $0x0, %rax
je 0x2d3ae
movzwl -0x1e(%rbp), %edi
callq 0x10a70
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2d3ac
movl -0x1c(%rbp), %esi
movl -0x1c(%rbp), %edx
movq -0x18(%rbp), %rcx
leaq 0x3dd06(%rip), %rdi     # 0x6b09c
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3040
jmp 0x2d3ae
leaq 0x49dcb(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x2000, %rax           # imm = 0x2000
cmpq $0x0, %rax
je 0x2d60d
movzwl -0x20(%rbp), %esi
leaq 0x3d9cf(%rip), %rdi     # 0x6ada2
xorl %eax, %eax
callq 0x3110
movl %eax, %ecx
movl -0x28(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x28(%rbp)
movzwl -0x20(%rbp), %eax
movl %eax, -0x2c(%rbp)
testl %eax, %eax
je 0x2d460
jmp 0x2d3f1
movl -0x2c(%rbp), %eax
subl $0x800, %eax            # imm = 0x800
je 0x2d479
jmp 0x2d3fd
movl -0x2c(%rbp), %eax
subl $0x1000, %eax           # imm = 0x1000
je 0x2d492
jmp 0x2d40d
movl -0x2c(%rbp), %eax
subl $0x1800, %eax           # imm = 0x1800
je 0x2d4a8
jmp 0x2d41d
movl -0x2c(%rbp), %eax
subl $0x2000, %eax           # imm = 0x2000
je 0x2d4be
jmp 0x2d42d
movl -0x2c(%rbp), %eax
subl $0x2800, %eax           # imm = 0x2800
je 0x2d4d4
jmp 0x2d43d
movl -0x2c(%rbp), %eax
subl $0x3000, %eax           # imm = 0x3000
je 0x2d4ea
jmp 0x2d44d
movl -0x2c(%rbp), %eax
subl $0x3800, %eax           # imm = 0x3800
je 0x2d500
jmp 0x2d502
leaq 0x3d944(%rip), %rdi     # 0x6adab
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x2d516
leaq 0x3d932(%rip), %rdi     # 0x6adb2
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x2d516
leaq 0x3d920(%rip), %rdi     # 0x6adb9
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x2d516
leaq 0x3d911(%rip), %rdi     # 0x6adc0
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x2d516
leaq 0x3d902(%rip), %rdi     # 0x6adc7
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x2d516
leaq 0x3d8f3(%rip), %rdi     # 0x6adce
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x2d516
leaq 0x3d8dd(%rip), %rdi     # 0x6adce
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x2d516
jmp 0x2d502
leaq 0x377cb(%rip), %rdi     # 0x64cd4
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movzwl -0x22(%rbp), %eax
movl %eax, -0x30(%rbp)
testl %eax, %eax
je 0x2d54a
jmp 0x2d523
movl -0x30(%rbp), %eax
subl $0x4000, %eax           # imm = 0x4000
je 0x2d573
jmp 0x2d52f
movl -0x30(%rbp), %eax
subl $0x8000, %eax           # imm = 0x8000
je 0x2d599
jmp 0x2d53b
movl -0x30(%rbp), %eax
subl $0xc000, %eax           # imm = 0xC000
je 0x2d5bf
jmp 0x2d5e5
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x3d874(%rip), %rdi     # 0x6add5
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x2d5f9
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x3d85f(%rip), %rdi     # 0x6ade9
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x2d5f9
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x3d84d(%rip), %rdi     # 0x6adfd
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x2d5f9
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0x3d83b(%rip), %rdi     # 0x6ae11
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x2d5f9
leaq 0x3d839(%rip), %rdi     # 0x6ae25
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x3b7ac(%rip), %rdi     # 0x68dac
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x49b6c(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x2d635
leaq 0x3f6f0(%rip), %rdi     # 0x6cd18
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x2d637
movl -0x28(%rbp), %edi
callq 0x1ff00
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)