// File: /workspace/github_c_makefile_star2_O2/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
xorl %r14d, %r14d
testq %rdi, %rdi
je 0x16035
movq %rdi, %rbx
cmpl $0x0, 0x10(%rdi)
jle 0x16035
cmpq $0x0, 0x80(%rbx)
movl $0x0, %ebp
je 0x16037
leaq 0x412c5(%rip), %r12     # 0x57180
testb $0x3, 0x2(%r12)
je 0x15ee2
movq 0x90(%rbx), %rsi
leaq 0x2920b(%rip), %rcx     # 0x3f0dc
xorl %r15d, %r15d
movl $0x40c3333, %edi        # imm = 0x40C3333
xorl %edx, %edx
callq 0x5100
jmp 0x15ef3
leaq 0x2d7bd(%rip), %rdi     # 0x436a6
xorl %eax, %eax
callq 0x3120
movl %eax, %r15d
leaq 0x46776(%rip), %rax     # 0x5c670
testb $0x4, (%rax)
je 0x15f13
movl 0x10(%rbx), %esi
leaq 0x2d7a0(%rip), %rdi     # 0x436a9
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x2d795(%rip), %rdi     # 0x436af
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x3120
movl %eax, %r14d
addl %r15d, %r14d
movq %rbx, %rdi
callq 0x16116
movl $0xfffffff, %eax        # imm = 0xFFFFFFF
andl 0x88(%rbx), %eax
cmpl $0x15b, %eax            # imm = 0x15B
jne 0x15f5d
movq 0x98(%rbx), %rsi
leaq 0x307b9(%rip), %rdi     # 0x4670a
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
jmp 0x15f88
movq %rbx, %rdi
callq 0x16296
movq %rbx, %rdi
callq 0x16362
movq %rbx, %rdi
callq 0x163bf
movq %rbx, %rdi
callq 0x16408
movq %rbx, %rdi
callq 0x164a1
pushq $0x1
popq %rbp
movq 0x88(%rbx), %rax
btl $0x1e, %eax
jb 0x15fa8
testl %eax, %eax
js 0x15fb3
btl $0x1c, %eax
jae 0x15fbf
leaq 0x2d729(%rip), %rdi     # 0x436cf
jmp 0x15fba
xorl %ebp, %ebp
leaq 0x2d707(%rip), %rdi     # 0x436b8
jmp 0x15fba
leaq 0x2d708(%rip), %rdi     # 0x436c2
callq 0x56e2
cmpq $0x0, 0x98(%rbx)
je 0x16029
testb $0x3, 0x2(%r12)
jne 0x15fec
movq 0x90(%rbx), %rdx
leaq 0x2d711(%rip), %rdi     # 0x436f0
movq %rdx, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
movl %r14d, %edi
callq 0x160f7
testb $0x3, 0x2(%r12)
je 0x1604a
movq 0x90(%rbx), %rax
movq 0x98(%rbx), %rcx
leaq (%rax,%rcx), %rsi
decq %rsi
leaq 0x290e1(%rip), %rcx     # 0x3f0f9
xorl %r15d, %r15d
movl $0x40c3333, %edi        # imm = 0x40C3333
xorl %edx, %edx
callq 0x5100
jmp 0x1605b
leaq 0x2d6f7(%rip), %rdi     # 0x43727
callq 0x56e2
xorl %ebp, %ebp
movl %r14d, %edi
callq 0x160f7
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2d655(%rip), %rdi     # 0x436a6
xorl %eax, %eax
callq 0x3120
movl %eax, %r15d
leaq 0x2d67a(%rip), %rdi     # 0x436dc
xorl %eax, %eax
callq 0x3120
movl %eax, %r14d
addl %r15d, %r14d
movq %rbx, %rdi
callq 0x16116
cmpq $0x15b, 0x88(%rbx) # imm = 0x15B
je 0x160cd
movq %rbx, %rdi
callq 0x163bf
testb $0x3, 0x2(%r12)
je 0x160a4
leaq 0x2c921(%rip), %rdi     # 0x429bc
xorl %eax, %eax
callq 0x3120
jmp 0x160ca
movq 0x90(%rbx), %rax
movq 0x98(%rbx), %rcx
leaq (%rax,%rcx), %rdx
decq %rdx
leaq 0x2d625(%rip), %rdi     # 0x436e5
movq %rdx, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
testb $0x10, 0x83(%rbx)
je 0x160e7
leaq 0x2d627(%rip), %rdi     # 0x43704
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
movl %r14d, %edi
callq 0x160f7
xorl %r14d, %r14d
jmp 0x16037