// File: /workspace/github_c_makefile_star2_O1/hfiguiere[P]exifprobe/misc.c
// Function: print_imageformat
void
print_imageformat(struct image_summary *entry)
{
    int chpr = 0;

    if(entry)
    {
        switch(entry->imageformat & ~IMGFMT_MISMARKED)
        {
        case IMGFMT_TIFF:
            if(entry->fileformat == FILEFMT_ORF1)
            {
                chpr += printf(" ORF1 16bps");
                /* ###%%% this is the wrong place to do this          */
                entry->imagesubformat = IMGSUBFMT_CFA;
            }
            else if(entry->fileformat == FILEFMT_ORF2)
            {
                chpr += printf(" ORF2 12bps");
                entry->imagesubformat = IMGSUBFMT_CFA;
            }
            else if(entry->fileformat == FILEFMT_RW2)
            {
                chpr += printf(" RW2");
                entry->imagesubformat = IMGSUBFMT_CFA;
            }
            else
                chpr += printf(" TIFF");
            break;
        case IMGFMT_JPEG:
            if(entry->imagesubformat == IMGSUBFMT_JPEGTABLES)
                chpr += printf("JPEGTables");
            else
                chpr += printf(" JPEG");
            if(entry->imageformat & IMGFMT_MISMARKED)
                chpr += printf("*");
            break;
        case IMGFMT_JPEG2000:
            chpr += printf(" JPEG2000");
            break;
        case IMGFMT_CRW:
            chpr += printf(" CRW");
            break;
        case IMGFMT_MRW:
            chpr += printf(" MRW");
            chpr += printf(" %d/%d",entry->bps[0],entry->sample_size);
            break;
        case IMGFMT_RAF:
            chpr += printf(" RAF");
            break;
        case IMGFMT_X3F:
            chpr += printf(" X3F");
            break;
        default:
            chpr += printf(" UNKNOWN format");
            break;
        }
    }
    setcharsprinted(chpr);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x16bed
movq %rdi, %rbx
movq $-0x10000001, %rax      # imm = 0xEFFFFFFF
andq 0x80(%rdi), %rax
cmpq $0xffd7, %rax           # imm = 0xFFD7
jle 0x16bf4
cmpq $0xd0a8709, %rax        # imm = 0xD0A8709
jg 0x16c15
cmpq $0xffd8, %rax           # imm = 0xFFD8
je 0x16c40
cmpq $0x4d524d, %rax         # imm = 0x4D524D
jne 0x16c37
leaq 0x2ede8(%rip), %rdi     # 0x459a7
xorl %eax, %eax
callq 0x3120
movl %eax, %r14d
movl 0xd0(%rbx), %esi
movl 0x110(%rbx), %edx
leaq 0x2edd0(%rip), %rdi     # 0x459ac
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
addl %r14d, %ebp
jmp 0x16c91
xorl %ebp, %ebp
jmp 0x16c91
cmpq $0x1a, %rax
je 0x16c2e
cmpq $0x2a, %rax
je 0x16c9c
cmpq $0x4655, %rax           # imm = 0x4655
jne 0x16c37
leaq 0x2eda0(%rip), %rdi     # 0x459b3
jmp 0x16c88
cmpq $0xd0a870a, %rax        # imm = 0xD0A870A
je 0x16c81
cmpq $0x62564f46, %rax       # imm = 0x62564F46
jne 0x16c37
leaq 0x2ed8c(%rip), %rdi     # 0x459b8
jmp 0x16c88
leaq 0x2ed6d(%rip), %rdi     # 0x459a2
jmp 0x16c88
leaq 0x2ed7f(%rip), %rdi     # 0x459bd
jmp 0x16c88
cmpq $0x15b, 0x88(%rbx) # imm = 0x15B
leaq 0x2be75(%rip), %rax     # 0x42ac7
leaq 0x2edc7(%rip), %rdi     # 0x45a20
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
testb $0x10, 0x83(%rbx)
je 0x16c91
leaq 0x2ace3(%rip), %rdi     # 0x41959
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
jmp 0x16c91
leaq 0x2ed10(%rip), %rdi     # 0x45998
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
addl %ebp, 0x468b1(%rip)     # 0x5d548
popq %rbx
popq %r14
popq %rbp
retq
movl 0x14(%rbx), %eax
cmpl $0x55, %eax
je 0x16cc4
cmpl $0x5352, %eax           # imm = 0x5352
je 0x16cbb
cmpl $0x4f52, %eax           # imm = 0x4F52
jne 0x16ce1
leaq 0x2ecc2(%rip), %rdi     # 0x4597b
jmp 0x16ccb
leaq 0x2ecc5(%rip), %rdi     # 0x45987
jmp 0x16ccb
leaq 0x2ecc8(%rip), %rdi     # 0x45993
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
movq $0x18023, 0x88(%rbx) # imm = 0x18023
jmp 0x16c91
leaq 0x2e5f6(%rip), %rdi     # 0x452de
jmp 0x16c88