// File: /workspace/github_c_makefile_star2_O2/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 0x161ae
movq %rdi, %rbx
movq $-0x10000001, %rax      # imm = 0xEFFFFFFF
andq 0x80(%rdi), %rax
cmpq $0x1a, %rax
je 0x16231
cmpq $0x62564f46, %rax       # imm = 0x62564F46
je 0x1624c
cmpq $0x4655, %rax           # imm = 0x4655
je 0x16243
cmpq $0xffd8, %rax           # imm = 0xFFD8
je 0x161b5
cmpq $0x4d524d, %rax         # imm = 0x4D524D
je 0x161ff
cmpq $0xd0a870a, %rax        # imm = 0xD0A870A
je 0x161f6
cmpq $0x2a, %rax
jne 0x1623a
movl 0x14(%rbx), %eax
cmpl $0x55, %eax
je 0x16270
cmpl $0x5352, %eax           # imm = 0x5352
je 0x16267
cmpl $0x4f52, %eax           # imm = 0x4F52
jne 0x1628d
leaq 0x2d7d2(%rip), %rdi     # 0x4397b
jmp 0x16277
xorl %ebp, %ebp
jmp 0x1625c
cmpq $0x15b, 0x88(%rbx) # imm = 0x15B
leaq 0x2a900(%rip), %rax     # 0x40ac7
leaq 0x2d852(%rip), %rdi     # 0x43a20
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
testb $0x10, 0x83(%rbx)
je 0x1625c
leaq 0x2976e(%rip), %rdi     # 0x3f959
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
jmp 0x1625c
leaq 0x2d79b(%rip), %rdi     # 0x43998
jmp 0x16253
leaq 0x2d7a1(%rip), %rdi     # 0x439a7
xorl %eax, %eax
callq 0x3120
movl %eax, %r14d
movl 0xd0(%rbx), %esi
movl 0x110(%rbx), %edx
leaq 0x2d789(%rip), %rdi     # 0x439ac
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
addl %r14d, %ebp
jmp 0x1625c
leaq 0x2d76a(%rip), %rdi     # 0x439a2
jmp 0x16253
leaq 0x2d77c(%rip), %rdi     # 0x439bd
jmp 0x16253
leaq 0x2d769(%rip), %rdi     # 0x439b3
jmp 0x16253
leaq 0x2d765(%rip), %rdi     # 0x439b8
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
addl %ebp, 0x462e6(%rip)     # 0x5c548
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x2d719(%rip), %rdi     # 0x43987
jmp 0x16277
leaq 0x2d71c(%rip), %rdi     # 0x43993
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
movq $0x18023, 0x88(%rbx) # imm = 0x18023
jmp 0x1625c
leaq 0x2d04a(%rip), %rdi     # 0x432de
jmp 0x16253