// File: /workspace/github_c_makefile_star2_O3/hfiguiere[P]exifprobe/misc.c
// Function: print_image_summary_entry
int
print_image_summary_entry(struct image_summary *entry,char *prefix)
{
    int chpr = 0;
    int image_found = 0;

    if(entry && (entry->entry_lock > 0) && (entry->imageformat != IMGFMT_NOIMAGE))
    {
        /* Make shell comments out of these if addresses are not      */
        /* printed                                                    */
        if(!(PRINT_ADDRESS))
            chpr += printf("# ");
        else
            print_tag_address(SECTION|ENTRY|SEGMENT,entry->offset,0,"@");
        if(Debug & 0x4)
            chpr += printf("#%d: ",entry->entry_lock);
        chpr += printf("Start of");
        print_imageformat(entry);
        if((entry->imagesubformat & ~IMGSUBFMT_ERRORMASK) != IMGSUBFMT_JPEGTABLES)
        {
            print_imagesubformat(entry);
            print_imagecompression(entry); 
            print_imagesubtype(entry); 
            print_imagesize(entry);
            print_location(entry);
            ++image_found;
        }
        else
            chpr += printf(" length %lu",entry->length);

        if(entry->imagesubformat & IMGSUBFMT_NO_JPEG)
        {
            printred(" (NO SOI)");
            image_found = 0;
        }
        else if(entry->imagesubformat & IMGSUBFMT_JPEGFAILED)
            printred(" (CORRUPTED)");
        else if(entry->imagesubformat & IMGSUBFMT_TRUNCATED)
            printred(" (TRUNCATED)");
        if(entry->length > 0)
        {
            if((PRINT_ADDRESS) == 0)   /* print_tag_address didn't do it     */
                chpr += printf(" at offset %#lx/%lu",entry->offset,entry->offset);
            chpr = newline(chpr);

            if((PRINT_ADDRESS) == 0)
                chpr += printf("# ");
            else
                print_tag_address(SECTION|ENTRY|SEGMENT,
                                            entry->offset + entry->length - 1,
                                            0,"-");
            chpr += printf("  End of");
            print_imageformat(entry); 
            if(entry->imagesubformat != IMGSUBFMT_JPEGTABLES)
            {
                print_imagesubtype(entry);
                if((PRINT_ADDRESS) == 0)   /* print_tag_address didn't do it     */
                    chpr += printf(" image data at offset %#lx/%lu",
                                                    entry->offset + entry->length - 1,
                                                    entry->offset + entry->length - 1);
                else
                    chpr += printf(" image data");
            }
            if(entry->imageformat & IMGFMT_MISMARKED)
            {
                PUSHCOLOR(RED);
                chpr += printf(" *uncompressed data marked as JPEG");
                POPCOLOR();
            }
            chpr = newline(chpr);
        }
        else
        {
            printred(" (no image)");
            image_found = 0;
        }
    }
    
    chpr = newline(chpr);
    return(image_found);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x16e14
movq %rdi, %rbx
cmpl $0x0, 0x10(%rdi)
jle 0x16e14
cmpq $0x0, 0x80(%rbx)
je 0x16e14
leaq 0x41393(%rip), %r12     # 0x58180
testb $0x3, 0x2(%r12)
je 0x16e44
movq 0x90(%rbx), %rsi
leaq 0x2a2d9(%rip), %rcx     # 0x410dc
xorl %r15d, %r15d
movl $0x40c3333, %edi        # imm = 0x40C3333
xorl %edx, %edx
callq 0x55eb
jmp 0x16e55
xorl %eax, %eax
xorl %ebp, %ebp
testb %al, %al
jne 0x16e25
cmpl $0x0, 0x46725(%rip)     # 0x5d548
je 0x16e2f
movl $0xa, %edi
callq 0x3060
movl $0x0, 0x4670f(%rip)     # 0x5d548
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2e89f(%rip), %rdi     # 0x456ea
xorl %eax, %eax
callq 0x3120
movl %eax, %r15d
leaq 0x46814(%rip), %rax     # 0x5d670
testb $0x4, (%rax)
je 0x16e75
movl 0x10(%rbx), %esi
leaq 0x2e882(%rip), %rdi     # 0x456ed
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x2e877(%rip), %rdi     # 0x456f3
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x3120
movl %eax, %r14d
addl %r15d, %r14d
movq %rbx, %rdi
callq 0x1709e
movl $0xfffffff, %eax        # imm = 0xFFFFFFF
andl 0x88(%rbx), %eax
cmpl $0x15b, %eax            # imm = 0x15B
jne 0x16ebf
movq 0x98(%rbx), %rsi
leaq 0x318a7(%rip), %rdi     # 0x4875a
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
jmp 0x16eec
movq %rbx, %rdi
callq 0x1720e
movq %rbx, %rdi
callq 0x172ec
movq %rbx, %rdi
callq 0x173c4
movq %rbx, %rdi
callq 0x1740d
movq %rbx, %rdi
callq 0x174a6
movl $0x1, %ebp
movq 0x88(%rbx), %rax
btl $0x1e, %eax
jb 0x16f0c
testl %eax, %eax
js 0x16f17
btl $0x1c, %eax
jae 0x16f23
leaq 0x2e809(%rip), %rdi     # 0x45713
jmp 0x16f1e
xorl %ebp, %ebp
leaq 0x2e7e7(%rip), %rdi     # 0x456fc
jmp 0x16f1e
leaq 0x2e7e8(%rip), %rdi     # 0x45706
callq 0x5c26
cmpq $0x0, 0x98(%rbx)
je 0x16fa2
testb $0x3, 0x2(%r12)
jne 0x16f50
movq 0x90(%rbx), %rdx
leaq 0x2e7f1(%rip), %rdi     # 0x45734
movq %rdx, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
orl 0x465f1(%rip), %r14d    # 0x5d548
je 0x16f63
movl $0xa, %edi
callq 0x3060
movl $0x0, 0x465db(%rip)     # 0x5d548
testb $0x3, 0x2(%r12)
je 0x16fb9
movq 0x90(%rbx), %rax
movq 0x98(%rbx), %rcx
leaq (%rax,%rcx), %rsi
decq %rsi
leaq 0x2a168(%rip), %rcx     # 0x410f9
xorl %r15d, %r15d
movl $0x40c3333, %edi        # imm = 0x40C3333
xorl %edx, %edx
callq 0x55eb
jmp 0x16fca
leaq 0x2e7c2(%rip), %rdi     # 0x4576b
callq 0x5c26
testl %r14d, %r14d
setne %al
jmp 0x16e16
leaq 0x2e72a(%rip), %rdi     # 0x456ea
xorl %eax, %eax
callq 0x3120
movl %eax, %r15d
leaq 0x2e74f(%rip), %rdi     # 0x45720
xorl %eax, %eax
callq 0x3120
movl %eax, %r14d
addl %r15d, %r14d
movq %rbx, %rdi
callq 0x1709e
cmpq $0x15b, 0x88(%rbx) # imm = 0x15B
je 0x1703c
movq %rbx, %rdi
callq 0x173c4
testb $0x3, 0x2(%r12)
je 0x17013
leaq 0x2d9f6(%rip), %rdi     # 0x44a00
xorl %eax, %eax
callq 0x3120
jmp 0x17039
movq 0x90(%rbx), %rax
movq 0x98(%rbx), %rcx
leaq (%rax,%rcx), %rdx
decq %rdx
leaq 0x2e6fa(%rip), %rdi     # 0x45729
movq %rdx, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
testb $0x10, 0x83(%rbx)
je 0x17056
leaq 0x2e6fc(%rip), %rdi     # 0x45748
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
orl 0x464eb(%rip), %r14d    # 0x5d548
je 0x17069
movl $0xa, %edi
callq 0x3060
movl $0x0, 0x464d5(%rip)     # 0x5d548
xorl %eax, %eax
jmp 0x16e18