// File: /workspace/github_c_makefile_star2_O0/hfiguiere[P]exifprobe/misc.c
// Function: print_fileformat
void
print_fileformat(struct image_summary *entry)
{
    struct maker_scheme *scheme;
    char *sep,*camera_name;
    int chpr = 0;
    int filesubformat_shown = 0;
    int with_filesubformat = 0;
    int vendor_filesubformat = 0;
    int has_appn[16];
    int i;

    print_filename();
    if((PRINT_LONGNAMES))
        chpr += printf("FileFormat = ");
    else
        chpr += printf("File Format = ");

    if(entry)
    {
        memset(has_appn,0,sizeof(has_appn));
        print_filetype(entry->fileformat,0);
        if(entry->filesubformat & FILESUBFMT_TIFFEP)
            chpr += printf("EP");

        if(entry->fileformat == FILEFMT_TIFF)
            filesubformat_shown |= FILESUBFMT_TIFF;
        if(entry->filesubformat & FILESUBFMT_TIFFEP)
            filesubformat_shown |= FILESUBFMT_TIFFEP;

        sep = "/";
        for( ; entry; entry = entry->next_entry)
        {
            if((entry->filesubformat & (FILESUBFMT_TIFF|FILESUBFMT_TIFFOLD)) &&
                        !(filesubformat_shown & (FILESUBFMT_TIFF|FILESUBFMT_TIFFOLD)))
                chpr += printf("%sTIFF",sep);
            if((entry->filesubformat & FILESUBFMT_JPEG) &&
                        !(filesubformat_shown & FILESUBFMT_JPEG))
                chpr += printf("%sJPEG",sep);
            if((entry->filesubformat & FILESUBFMT_GEOTIFF) &&
                        !(filesubformat_shown & FILESUBFMT_GEOTIFF))
                chpr += printf("%sGEOTIFF",sep);
            if((entry->filesubformat & FILESUBFMT_TIFFEP) &&
                        !(filesubformat_shown & FILESUBFMT_TIFFEP))
                chpr += printf("%sEP",sep);
            if((entry->filesubformat & FILESUBFMT_APPN) &&
                        !(filesubformat_shown & FILESUBFMT_APPN))
            {
                if(entry->filesubformatAPPN[0])
                {
                    chpr += printf("%sAPP0",sep);
                    if(entry->filesubformat & FILESUBFMT_JFIF)
                        chpr += printf("%sJFIF",sep);
                    if(entry->filesubformat & FILESUBFMT_JFXX)
                        chpr += printf("%sJFXX",sep);
                }
                if(entry->filesubformatAPPN[1])
                {
                    chpr += printf("%sAPP1",sep);
                    if(entry->filesubformat & (FILESUBFMT_TIFF|FILESUBFMT_TIFFOLD))
                    {
                        entry->filesubformat &= ~(FILESUBFMT_TIFF|FILESUBFMT_TIFFOLD);
                        chpr += printf("%sTIFF",sep);
                    }
                    if(entry->filesubformat & FILESUBFMT_EXIF)
                    {
                        entry->filesubformat &= ~FILESUBFMT_EXIF;
                        chpr += printf("%sEXIF",sep);
                    }
                }
                if(entry->filesubformatAPPN[2])
                {
                    chpr += printf("%sAPP2",sep);
                    if(entry->filesubformat & FILESUBFMT_FPIX)
                    {
                        entry->filesubformat &= ~FILESUBFMT_FPIX;
                        chpr += printf("%sFPIX",sep);
                    }
                }
                for(i = 3; i < 16; ++i)
                {
                    if(entry->filesubformatAPPN[i])
                        has_appn[i] = entry->filesubformatAPPN[i];
                }
            }
            if((entry->filesubformat & FILESUBFMT_CIFF) &&
                        !(filesubformat_shown & FILESUBFMT_CIFF))
                chpr += printf("%sCIFF",sep);
            if((entry->filesubformat & FILESUBFMT_EXIF) &&
                        !(filesubformat_shown & FILESUBFMT_EXIF))
                chpr += printf("%sEXIF",sep);
            if((entry->filesubformat & FILESUBFMT_FPIX) &&
                        !(filesubformat_shown & FILESUBFMT_FPIX))
                chpr += printf("%sFPIX",sep);

            filesubformat_shown |= entry->filesubformat;

            if(entry->filesubformat & FILESUBFMT_NEF)
                vendor_filesubformat |= FILESUBFMT_NEF;
            if(entry->filesubformat & FILESUBFMT_CR2)
                vendor_filesubformat |= FILESUBFMT_CR2;
            if(entry->filesubformat & FILESUBFMT_DNG)
                vendor_filesubformat |= FILESUBFMT_DNG;
            if(entry->filesubformat & FILESUBFMT_MNOTE)
                with_filesubformat |= FILESUBFMT_MNOTE;
            if(entry->filesubformat & FILESUBFMT_MNSUBIFD)
                with_filesubformat |= FILESUBFMT_MNSUBIFD;
        }
        for(i = 3; i < 16; ++i)
        {
            if(has_appn[i])
                chpr += printf("%sAPP%d",sep,i);
        }
        if(vendor_filesubformat & FILESUBFMT_NEF)
                chpr += printf(" [NEF]");
        if(vendor_filesubformat & FILESUBFMT_CR2)
                chpr += printf(" [CR2]");
        if(vendor_filesubformat & FILESUBFMT_DNG)
                chpr += printf(" [DNG]");
        if(with_filesubformat)
            chpr += printf(" #");
        if(with_filesubformat & FILESUBFMT_MNOTE)
        {
            chpr += printf(" with MakerNote");
            scheme = retrieve_makerscheme();
            if(scheme->make)
            {
                camera_name = find_camera_name(scheme->make);
                if(scheme->scheme_type != UNKNOWN_SCHEME)
                    printf(" (%s [%d])",camera_name,scheme->note_version);
                else
                    printf(" (%s - unknown makernote format)",camera_name);
            }
            if(with_filesubformat & FILESUBFMT_MNSUBIFD)
                chpr += printf(" and MakerNote-SubIFD");
        }
    }
    else
        chpr += printf("unknown");
    chpr = newline(chpr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
callq 0x20a30
leaq 0x57919(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x1f88a
leaq 0x4867d(%rip), %rdi     # 0x67ef8
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x1f89e
leaq 0x48675(%rip), %rdi     # 0x67f06
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1fe63
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x3130
movq -0x8(%rbp), %rax
movslq 0x14(%rax), %rdi
xorl %esi, %esi
callq 0x5b20
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x1f8eb
leaq 0x48653(%rip), %rdi     # 0x67f31
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x2a, 0x14(%rax)
jne 0x1f8fe
movl -0x28(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x1f916
movl -0x28(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x28(%rbp)
leaq 0x485f8(%rip), %rax     # 0x67f15
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1fd02
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x1f95e
movl -0x28(%rbp), %eax
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x1f95e
movq -0x18(%rbp), %rsi
leaq 0x485c6(%rip), %rdi     # 0x67f17
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x1f990
movl -0x28(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x1f990
movq -0x18(%rbp), %rsi
leaq 0x4859b(%rip), %rdi     # 0x67f1e
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x1f9c6
movl -0x28(%rbp), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x1f9c6
movq -0x18(%rbp), %rsi
leaq 0x4856c(%rip), %rdi     # 0x67f25
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x1f9f8
movl -0x28(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x1f9f8
movq -0x18(%rbp), %rsi
leaq 0x48544(%rip), %rdi     # 0x67f2f
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
je 0x1fbc0
movl -0x28(%rbp), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
jne 0x1fbc0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
je 0x1fa94
movq -0x18(%rbp), %rsi
leaq 0x48501(%rip), %rdi     # 0x67f34
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
je 0x1fa69
movq -0x18(%rbp), %rsi
leaq 0x484df(%rip), %rdi     # 0x67f3b
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x1fa92
movq -0x18(%rbp), %rsi
leaq 0x484bd(%rip), %rdi     # 0x67f42
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x1fa94
movq -0x8(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x1fb24
movq -0x18(%rbp), %rsi
leaq 0x4849c(%rip), %rdi     # 0x67f49
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x1faee
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
andl $-0x4, %ecx
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rsi
leaq 0x48436(%rip), %rdi     # 0x67f17
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x1fb22
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
andl $-0x11, %ecx
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rsi
leaq 0x4843b(%rip), %rdi     # 0x67f50
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x1fb24
movq -0x8(%rbp), %rax
cmpl $0x0, 0x24(%rax)
je 0x1fb81
movq -0x18(%rbp), %rsi
leaq 0x4841e(%rip), %rdi     # 0x67f57
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
je 0x1fb7f
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
andl $0xffffbfff, %ecx       # imm = 0xFFFFBFFF
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rsi
leaq 0x483ec(%rip), %rdi     # 0x67f5e
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x1fb81
movl $0x3, -0x74(%rbp)
cmpl $0x10, -0x74(%rbp)
jge 0x1fbbe
movq -0x8(%rbp), %rax
movslq -0x74(%rbp), %rcx
cmpl $0x0, 0x1c(%rax,%rcx,4)
je 0x1fbb1
movq -0x8(%rbp), %rax
movslq -0x74(%rbp), %rcx
movl 0x1c(%rax,%rcx,4), %ecx
movslq -0x74(%rbp), %rax
movl %ecx, -0x70(%rbp,%rax,4)
jmp 0x1fbb3
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x1fb88
jmp 0x1fbc0
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x1fbf6
movl -0x28(%rbp), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
jne 0x1fbf6
movq -0x18(%rbp), %rsi
leaq 0x4837c(%rip), %rdi     # 0x67f65
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x1fc28
movl -0x28(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x1fc28
movq -0x18(%rbp), %rsi
leaq 0x48335(%rip), %rdi     # 0x67f50
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
je 0x1fc5e
movl -0x28(%rbp), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
jne 0x1fc5e
movq -0x18(%rbp), %rsi
leaq 0x4830d(%rip), %rdi     # 0x67f5e
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
orl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x1fc83
movl -0x30(%rbp), %eax
orl $0x20, %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x1fc9b
movl -0x30(%rbp), %eax
orl $0x40, %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1fcb7
movl -0x30(%rbp), %eax
orl $0x80, %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x1fcd3
movl -0x2c(%rbp), %eax
orl $0x100, %eax            # imm = 0x100
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x1fcef
movl -0x2c(%rbp), %eax
orl $0x200, %eax            # imm = 0x200
movl %eax, -0x2c(%rbp)
jmp 0x1fcf1
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x1f921
movl $0x3, -0x74(%rbp)
cmpl $0x10, -0x74(%rbp)
jge 0x1fd42
movslq -0x74(%rbp), %rax
cmpl $0x0, -0x70(%rbp,%rax,4)
je 0x1fd35
movq -0x18(%rbp), %rsi
movl -0x74(%rbp), %edx
leaq 0x48244(%rip), %rdi     # 0x67f6c
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x1fd37
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x1fd09
movl -0x30(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x1fd61
leaq 0x48220(%rip), %rdi     # 0x67f74
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x30(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x1fd80
leaq 0x48208(%rip), %rdi     # 0x67f7b
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x30(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1fda1
leaq 0x481ee(%rip), %rdi     # 0x67f82
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x1fdbb
leaq 0x481db(%rip), %rdi     # 0x67f89
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x2c(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x1fe61
leaq 0x481b9(%rip), %rdi     # 0x67f8c
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movb $0x0, %al
callq 0x28130
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0x1fe3e
movq -0x10(%rbp), %rax
movl 0x38(%rax), %edi
callq 0x1fe90
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1fe2a
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x40(%rax), %edx
leaq 0x4817b(%rip), %rdi     # 0x67f9c
movb $0x0, %al
callq 0x3110
jmp 0x1fe3c
movq -0x20(%rbp), %rsi
leaq 0x48172(%rip), %rdi     # 0x67fa7
movb $0x0, %al
callq 0x3110
jmp 0x1fe3e
movl -0x2c(%rbp), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x1fe5f
leaq 0x48176(%rip), %rdi     # 0x67fc8
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x1fe61
jmp 0x1fe77
leaq 0x48174(%rip), %rdi     # 0x67fde
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edi
callq 0x1ef50
movl %eax, -0x24(%rbp)
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)