// File: /workspace/github_c_makefile_star2_O1/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 0x168f0
movq %rdi, %rbx
cmpl $0x0, 0x10(%rdi)
jle 0x168f0
cmpq $0x0, 0x80(%rbx)
je 0x168f0
leaq 0x418b7(%rip), %r12     # 0x58180
testb $0x3, 0x2(%r12)
je 0x16920
movq 0x90(%rbx), %rsi
leaq 0x2a7fd(%rip), %rcx     # 0x410dc
xorl %r15d, %r15d
movl $0x40c3333, %edi        # imm = 0x40C3333
xorl %edx, %edx
callq 0x5605
jmp 0x16931
xorl %eax, %eax
xorl %ebp, %ebp
testb %al, %al
jne 0x16901
cmpl $0x0, 0x46c49(%rip)     # 0x5d548
je 0x1690b
movl $0xa, %edi
callq 0x3060
movl $0x0, 0x46c33(%rip)     # 0x5d548
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2ed7f(%rip), %rdi     # 0x456a6
xorl %eax, %eax
callq 0x3120
movl %eax, %r15d
leaq 0x46d38(%rip), %rax     # 0x5d670
testb $0x4, (%rax)
je 0x16951
movl 0x10(%rbx), %esi
leaq 0x2ed62(%rip), %rdi     # 0x456a9
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x2ed57(%rip), %rdi     # 0x456af
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x3120
movl %eax, %r14d
addl %r15d, %r14d
movq %rbx, %rdi
callq 0x16b7a
movl $0xfffffff, %eax        # imm = 0xFFFFFFF
andl 0x88(%rbx), %eax
cmpl $0x15b, %eax            # imm = 0x15B
jne 0x1699b
movq 0x98(%rbx), %rsi
leaq 0x31d8b(%rip), %rdi     # 0x4871a
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
jmp 0x169c8
movq %rbx, %rdi
callq 0x16cea
movq %rbx, %rdi
callq 0x16dc8
movq %rbx, %rdi
callq 0x16ea0
movq %rbx, %rdi
callq 0x16ee9
movq %rbx, %rdi
callq 0x16f86
movl $0x1, %ebp
movq 0x88(%rbx), %rax
btl $0x1e, %eax
jb 0x169e8
testl %eax, %eax
js 0x169f3
btl $0x1c, %eax
jae 0x169ff
leaq 0x2ece9(%rip), %rdi     # 0x456cf
jmp 0x169fa
xorl %ebp, %ebp
leaq 0x2ecc7(%rip), %rdi     # 0x456b8
jmp 0x169fa
leaq 0x2ecc8(%rip), %rdi     # 0x456c2
callq 0x5c33
cmpq $0x0, 0x98(%rbx)
je 0x16a7e
testb $0x3, 0x2(%r12)
jne 0x16a2c
movq 0x90(%rbx), %rdx
leaq 0x2ecd1(%rip), %rdi     # 0x456f0
movq %rdx, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
orl 0x46b15(%rip), %r14d    # 0x5d548
je 0x16a3f
movl $0xa, %edi
callq 0x3060
movl $0x0, 0x46aff(%rip)     # 0x5d548
testb $0x3, 0x2(%r12)
je 0x16a95
movq 0x90(%rbx), %rax
movq 0x98(%rbx), %rcx
leaq (%rax,%rcx), %rsi
decq %rsi
leaq 0x2a68c(%rip), %rcx     # 0x410f9
xorl %r15d, %r15d
movl $0x40c3333, %edi        # imm = 0x40C3333
xorl %edx, %edx
callq 0x5605
jmp 0x16aa6
leaq 0x2eca2(%rip), %rdi     # 0x45727
callq 0x5c33
testl %r14d, %r14d
setne %al
jmp 0x168f2
leaq 0x2ec0a(%rip), %rdi     # 0x456a6
xorl %eax, %eax
callq 0x3120
movl %eax, %r15d
leaq 0x2ec2f(%rip), %rdi     # 0x456dc
xorl %eax, %eax
callq 0x3120
movl %eax, %r14d
addl %r15d, %r14d
movq %rbx, %rdi
callq 0x16b7a
cmpq $0x15b, 0x88(%rbx) # imm = 0x15B
je 0x16b18
movq %rbx, %rdi
callq 0x16ea0
testb $0x3, 0x2(%r12)
je 0x16aef
leaq 0x2ded6(%rip), %rdi     # 0x449bc
xorl %eax, %eax
callq 0x3120
jmp 0x16b15
movq 0x90(%rbx), %rax
movq 0x98(%rbx), %rcx
leaq (%rax,%rcx), %rdx
decq %rdx
leaq 0x2ebda(%rip), %rdi     # 0x456e5
movq %rdx, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
testb $0x10, 0x83(%rbx)
je 0x16b32
leaq 0x2ebdc(%rip), %rdi     # 0x45704
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
orl 0x46a0f(%rip), %r14d    # 0x5d548
je 0x16b45
movl $0xa, %edi
callq 0x3060
movl $0x0, 0x469f9(%rip)     # 0x5d548
xorl %eax, %eax
jmp 0x168f4