// File: /workspace/github_c_makefile_star2_O3/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 0x17111
movq %rdi, %rbx
movq $-0x10000001, %rax      # imm = 0xEFFFFFFF
andq 0x80(%rdi), %rax
cmpq $0xffd7, %rax           # imm = 0xFFD7
jle 0x17118
cmpq $0xd0a8709, %rax        # imm = 0xD0A8709
jg 0x17139
cmpq $0xffd8, %rax           # imm = 0xFFD8
je 0x17164
cmpq $0x4d524d, %rax         # imm = 0x4D524D
jne 0x1715b
leaq 0x2e908(%rip), %rdi     # 0x459eb
xorl %eax, %eax
callq 0x3120
movl %eax, %r14d
movl 0xd0(%rbx), %esi
movl 0x110(%rbx), %edx
leaq 0x2e8f0(%rip), %rdi     # 0x459f0
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
addl %r14d, %ebp
jmp 0x171b5
xorl %ebp, %ebp
jmp 0x171b5
cmpq $0x1a, %rax
je 0x17152
cmpq $0x2a, %rax
je 0x171c0
cmpq $0x4655, %rax           # imm = 0x4655
jne 0x1715b
leaq 0x2e8c0(%rip), %rdi     # 0x459f7
jmp 0x171ac
cmpq $0xd0a870a, %rax        # imm = 0xD0A870A
je 0x171a5
cmpq $0x62564f46, %rax       # imm = 0x62564F46
jne 0x1715b
leaq 0x2e8ac(%rip), %rdi     # 0x459fc
jmp 0x171ac
leaq 0x2e88d(%rip), %rdi     # 0x459e6
jmp 0x171ac
leaq 0x2e89f(%rip), %rdi     # 0x45a01
jmp 0x171ac
cmpq $0x15b, 0x88(%rbx) # imm = 0x15B
leaq 0x2b951(%rip), %rax     # 0x42ac7
leaq 0x2e8e7(%rip), %rdi     # 0x45a64
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
testb $0x10, 0x83(%rbx)
je 0x171b5
leaq 0x2a7bf(%rip), %rdi     # 0x41959
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
jmp 0x171b5
leaq 0x2e830(%rip), %rdi     # 0x459dc
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
addl %ebp, 0x4638d(%rip)     # 0x5d548
popq %rbx
popq %r14
popq %rbp
retq
movl 0x14(%rbx), %eax
cmpl $0x55, %eax
je 0x171e8
cmpl $0x5352, %eax           # imm = 0x5352
je 0x171df
cmpl $0x4f52, %eax           # imm = 0x4F52
jne 0x17205
leaq 0x2e7e2(%rip), %rdi     # 0x459bf
jmp 0x171ef
leaq 0x2e7e5(%rip), %rdi     # 0x459cb
jmp 0x171ef
leaq 0x2e7e8(%rip), %rdi     # 0x459d7
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
movq $0x18023, 0x88(%rbx) # imm = 0x18023
jmp 0x171b5
leaq 0x2e116(%rip), %rdi     # 0x45322
jmp 0x171ac