LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/misc.c
// Function: print_imagesize
void
print_imagesize(struct image_summary *entry)
{
    int chpr = 0;
    char *maybeshort = NULLSTRING;

    if(entry)
    {
        if(entry->imagesubformat & IMGSUBFMT_JPEG_EARLY_EOI)
            maybeshort = "<= ";
        chpr += printf(" image [%ldx%ld",entry->pixel_width,entry->pixel_height);
        if(entry->subfiletype == PRIMARY_TYPE)
        {
            if((entry->primary_width > entry->pixel_width) ||
                       (entry->primary_height > entry->pixel_height)) 
            {
                chpr += printf("<=%ldx%ld",entry->primary_width,entry->primary_height);
            }
        }
        chpr += printf("] length %s%lu",maybeshort,entry->length);
    }
    setcharsprinted(chpr);
}

// Assembly:
testq %rdi, %rdi
je 0x16498
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
btl $0x1d, 0x88(%rdi)
leaq 0x2f85f(%rip), %rax     # 0x45c86
leaq 0x2da62(%rip), %rbx     # 0x43e90
cmovaeq %rax, %rbx
movq 0x70(%rdi), %rsi
movq 0x78(%rdi), %rdx
leaq 0x2da53(%rip), %rdi     # 0x43e94
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
cmpl $0x1, 0xc4(%r14)
jne 0x16478
movq 0x60(%r14), %rsi
movq 0x68(%r14), %rdx
cmpq 0x70(%r14), %rsi
ja 0x16468
cmpq 0x78(%r14), %rdx
jbe 0x16478
leaq 0x2da35(%rip), %rdi     # 0x43ea4
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movq 0x98(%r14), %rdx
leaq 0x2da28(%rip), %rdi     # 0x43eae
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3120
addl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x1649a
xorl %eax, %eax
addl %eax, 0x460a8(%rip)     # 0x5c548
retq
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/misc.c
// Function: print_location
void
print_location(struct image_summary *entry)
{
    char *space = NULL;
    int chpr = 0;

    if(entry)
    {
        space = " (";
        if((entry->fileformat == FILEFMT_TIFF) || 
                    entry->filesubformat & FILESUBFMT_TIFFUSED ||
                                            entry->filesubformatAPPN[1])
        {
            if(entry->ifdnum >= 0)
                chpr += printf("%sIFD %d",space,entry->ifdnum),space = " ";
            if(entry->subifdnum >= 0)
                chpr += printf("%sSubIFD %d",space,entry->subifdnum),space = " ";
            /* could use filesubformat here?                          */
            if(entry->datatype == MAKER_IFD)
                chpr += printf("%sMakerNote",space),space = " ";
            if(entry->datatype == MAKER_SUBIFD)
                chpr += printf("%sMakerNote SubIFD",space),space = " ";
        }
        else if(entry->fileformat == FILEFMT_JPEG)
        {
            if(entry->filesubformatAPPN[0])
            {
                chpr += printf("%sAPP0",space),space = " ";
                if(entry->filesubformat & FILESUBFMT_JFXX)
                    chpr += printf("%sJFXX",space),space = " ";
            }
        }
        if(chpr)
            chpr += printf(")");
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x165aa
movq %rdi, %rbx
movl 0x14(%rdi), %eax
cmpl $0x2a, %eax
je 0x164cd
movzwl 0x18(%rbx), %ecx
testw $0x3ff, %cx             # imm = 0x3FF
jne 0x164cd
cmpl $0x0, 0x20(%rbx)
je 0x16570
movl 0x11c(%rbx), %edx
testl %edx, %edx
js 0x164f7
leaq 0x2d9df(%rip), %rdi     # 0x43ebd
leaq 0x28d23(%rip), %rsi     # 0x3f208
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
leaq 0x28ca1(%rip), %rsi     # 0x3f196
jmp 0x16500
xorl %ebp, %ebp
leaq 0x28d08(%rip), %rsi     # 0x3f208
movl 0x120(%rbx), %edx
testl %edx, %edx
js 0x16521
leaq 0x2d9b5(%rip), %rdi     # 0x43ec6
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x28c75(%rip), %rsi     # 0x3f196
movl 0x118(%rbx), %eax
cmpl $0x5, %eax
jne 0x16549
leaq 0x2d99f(%rip), %rdi     # 0x43ed2
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl 0x118(%rbx), %eax
leaq 0x28c4d(%rip), %rsi     # 0x3f196
cmpl $0x6, %eax
jne 0x1655e
leaq 0x2d989(%rip), %rdi     # 0x43ede
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
testl %ebp, %ebp
je 0x165aa
pushq $0x29
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3060
cmpl $0xffd8, %eax           # imm = 0xFFD8
jne 0x165aa
cmpl $0x0, 0x1c(%rbx)
je 0x165aa
leaq 0x2d336(%rip), %rdi     # 0x438ba
leaq 0x28c7d(%rip), %rsi     # 0x3f208
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
testb $0x20, 0x19(%rbx)
je 0x1655e
leaq 0x2d327(%rip), %rdi     # 0x438c8
leaq 0x28bee(%rip), %rsi     # 0x3f196
jmp 0x16555
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/misc.c
// Function: print_jp2c_compression
void
print_jp2c_compression(struct image_summary *entry)
{
    char *transform;
    char *quantization;
    int chpr = 0;

    transform = quantization = NULLSTRING;
    if(entry)
    {
        if((entry->compression & 0xff) == 1)
            transform = "5/3 reversible";
        else
            transform = "9/7 irreversible";
        switch((entry->compression & 0xff00) >> 8)
        {
            case 0:
                quantization = "no quantization";
                break;
            case 1:
                quantization = "implicit quantization";
                break;
            case 2:
                quantization = "explicit quantization";
                break;
            default:
                quantization = "unknown quantization";
                break;
        }
    }
    chpr += printf(" (%s compression with %s)",transform,quantization);
    setcharsprinted(chpr);
}

// Assembly:
testq %rdi, %rdi
je 0x16cb9
movl 0xc8(%rdi), %eax
cmpb $0x1, %al
leaq 0x304de(%rip), %rcx     # 0x4716f
leaq 0x304e9(%rip), %rsi     # 0x47181
cmoveq %rcx, %rsi
shrl $0x8, %eax
testb %al, %al
je 0x16cce
movzbl %al, %eax
cmpl $0x2, %eax
je 0x16cc5
cmpl $0x1, %eax
jne 0x16cd7
leaq 0x2d0e0(%rip), %rdx     # 0x43d97
jmp 0x16cde
leaq 0x2efc6(%rip), %rsi     # 0x45c86
movq %rsi, %rdx
jmp 0x16cde
leaq 0x2d0e1(%rip), %rdx     # 0x43dad
jmp 0x16cde
leaq 0x2d0b2(%rip), %rdx     # 0x43d87
jmp 0x16cde
leaq 0x2d0e5(%rip), %rdx     # 0x43dc3
pushq %rax
leaq 0x2d0f2(%rip), %rdi     # 0x43dd8
xorl %eax, %eax
callq 0x3120
addl %eax, 0x45855(%rip)     # 0x5c548
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/misc.c
// Function: print_crw_compression
void
print_crw_compression(struct image_summary *entry)
{
    char *compression;
    int chpr = 0;

    compression = NULLSTRING;
    if(entry)
    {
        switch(entry->compression)
        {
            case 0: compression = "uncompressed"; break;
            case 1: compression = "compressed"; break;
            default: break;
        }
    }
    chpr += printf(" %s",compression);
    setcharsprinted(chpr);
}

// Assembly:
testq %rdi, %rdi
je 0x16d24
movl 0xc8(%rdi), %eax
cmpl $0x1, %eax
leaq 0x2ceba(%rip), %rcx     # 0x43bc4
leaq 0x2ef75(%rip), %rdx     # 0x45c86
cmoveq %rcx, %rdx
testl %eax, %eax
leaq 0x2ccaf(%rip), %rsi     # 0x439cd
cmovneq %rdx, %rsi
jmp 0x16d2b
leaq 0x2ef5b(%rip), %rsi     # 0x45c86
pushq %rax
leaq 0x28363(%rip), %rdi     # 0x3f096
xorl %eax, %eax
callq 0x3120
addl %eax, 0x45808(%rip)     # 0x5c548
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/misc.c
// Function: print_raf_compression
void
print_raf_compression(struct image_summary *entry)
{
    char *compression;
    int chpr = 0;

    compression = NULLSTRING;
    if(entry)
    {
        switch(entry->compression)
        {
            case 0: compression = "uncompressed"; break;
            case 1: compression = "uncompressed (with secondary)"; break;
            default: break;
        }
    }
    chpr += printf(" %s",compression);
    setcharsprinted(chpr);
}

// Assembly:
testq %rdi, %rdi
je 0x16d71
movl 0xc8(%rdi), %eax
cmpl $0x1, %eax
leaq 0x2d09b(%rip), %rcx     # 0x43df2
leaq 0x2ef28(%rip), %rdx     # 0x45c86
cmoveq %rcx, %rdx
testl %eax, %eax
leaq 0x2cc62(%rip), %rsi     # 0x439cd
cmovneq %rdx, %rsi
jmp 0x16d78
leaq 0x2ef0e(%rip), %rsi     # 0x45c86
pushq %rax
leaq 0x28316(%rip), %rdi     # 0x3f096
xorl %eax, %eax
callq 0x3120
addl %eax, 0x457bb(%rip)     # 0x5c548
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/misc.c
// Function: print_x3f_compression
void
print_x3f_compression(struct image_summary *entry)
{
    char *compression;
    int chpr = 0;

    compression = NULLSTRING;
    if(entry)
    {
        switch(entry->imagesubformat)
        {
            case IMGSUBFMT_HUFF_COMPRESSED_RGB: compression = "Huffman compressed"; break;
            case IMGSUBFMT_JPEG_COMPRESSED_RGB: compression = "Jpeg compressed"; break;
            case IMGSUBFMT_X3F_COMPRESSED: compression = "compressed"; break;
            case IMGSUBFMT_RGB: compression = "uncompressed"; break;
            default: break;
        }
    }
    chpr += printf(" %s",compression);
    setcharsprinted(chpr);
}

// Assembly:
leaq 0x2eef0(%rip), %rsi     # 0x45c86
testq %rdi, %rdi
je 0x16de4
movq 0x88(%rdi), %rax
cmpq $0x10002, %rax          # imm = 0x10002
je 0x16ddd
cmpq $0x20004, %rax          # imm = 0x20004
je 0x16dcb
cmpq $0x20002, %rax          # imm = 0x20002
je 0x16dd4
cmpq $0x20001, %rax          # imm = 0x20001
jne 0x16de4
leaq 0x2d047(%rip), %rsi     # 0x43e10
jmp 0x16de4
leaq 0x2cdf2(%rip), %rsi     # 0x43bc4
jmp 0x16de4
leaq 0x2d048(%rip), %rsi     # 0x43e23
jmp 0x16de4
leaq 0x2cbe9(%rip), %rsi     # 0x439cd
pushq %rax
leaq 0x282aa(%rip), %rdi     # 0x3f096
xorl %eax, %eax
callq 0x3120
addl %eax, 0x4574f(%rip)     # 0x5c548
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/misc.c
// Function: sum_strip_bytecounts
unsigned long
sum_strip_bytecounts(FILE *inptr,unsigned short byteorder,unsigned long offset,
    unsigned long count,unsigned short value_type)
{
    int i;
    unsigned long sum = 0L;

    if(count)
    {
        /* Some use SHORT, some use LONG. If anyone uses some other   */
        /* type, just ignore 'em.                                     */
        if(value_type == SHORT)
        {
            sum = read_ushort(inptr,byteorder,offset);
            for(i = 1; i < count; ++i)
                sum += read_ushort(inptr,byteorder,HERE);
        }
        else if(value_type == LONG)
        {
            sum = read_ulong(inptr,byteorder,offset);
            for(i = 1; i < count; ++i)
                sum += read_ulong(inptr,byteorder,HERE);
        }
    }
    return(sum);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rcx, %rcx
je 0x16e4e
movq %rcx, %rbx
movq %rdi, %r14
cmpw $0x4, %r8w
je 0x16e5f
movzwl %r8w, %eax
cmpl $0x3, %eax
jne 0x16e4e
movzwl %si, %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x416a
movzwl %ax, %r15d
decq %rbx
subq $0x1, %rbx
jb 0x16e51
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r14, %rdi
movl %ebp, %esi
callq 0x416a
movzwl %ax, %eax
addq %rax, %r15
jmp 0x16e31
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movzwl %si, %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x42ba
movq %rax, %r15
decq %rbx
subq $0x1, %rbx
jb 0x16e51
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r14, %rdi
movl %ebp, %esi
callq 0x42ba
addq %rax, %r15
jmp 0x16e72
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/misc.c
// Function: clear_memory
void
clear_memory()
{
    if(Make_name)
        free(Make_name);
    if(Model_name)
        free(Model_name);
    if(Software_name)
        free(Software_name);
    Make_name = Model_name = Software_name = (char *)0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x4154b(%rip), %rbx     # 0x58430
movq (%rbx), %rdi
callq 0x3050
leaq 0x41544(%rip), %r14     # 0x58438
movq (%r14), %rdi
callq 0x3050
leaq 0x4153d(%rip), %r15     # 0x58440
movq (%r15), %rdi
callq 0x3050
andq $0x0, (%r15)
andq $0x0, (%r14)
andq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/misc.c
// Function: splice
char *
splice(char *string1,char *sep,char *string2)
{
    char splicebuf[1024];
    char *result = NULL;

    if(string1 == NULL)
        sep = string1 = NULLSTRING;
    if(string2 == NULL)
        string2 = NULLSTRING;
    snprintf(splicebuf,1024,"%s%s%s",string1,sep,string2);
    result = strdup(splicebuf);
    return(result);
}

// Assembly:
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rsi, %r8
movq %rdi, %rcx
testq %rdi, %rdi
leaq 0x2ed51(%rip), %r9      # 0x45c86
cmoveq %r9, %rcx
cmoveq %r9, %r8
testq %rdx, %rdx
cmovneq %rdx, %r9
leaq 0x2cfb5(%rip), %rdx     # 0x43f00
movq %rsp, %rbx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3130
movq %rbx, %rdi
callq 0x32b0
addq $0x400, %rsp            # imm = 0x400
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/print_maker.c
// Function: print_makertagid
void
print_makertagid(struct ifd_entry *entry_ptr,int width, char *sep,
                                                int make,int model)
{
    char *nameoftag;
    int chpr = 0;

    if(entry_ptr)
    {
        if((PRINT_TAGNAME))
        {
            nameoftag = maker_tagname(entry_ptr->tag,make,model);
            chpr = printf("%-*.*s",width,width,nameoftag);
        }
        else if(PRINT_HEX_TAGNO)
            chpr = printf("<%#06x>",entry_ptr->tag & 0xffff);
        else if(PRINT_DEC_TAGNO)
            chpr = printf("<%5u>",entry_ptr->tag & 0xffff);
        if(PRINT_VALUE)
            chpr += printf("%s",sep ? sep : " = ");
    }
    setcharsprinted(chpr);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x1853c
movq %rdx, %rbx
leaq 0x3ec63(%rip), %r14     # 0x57180
movq (%r14), %rax
btl $0xc, %eax
jb 0x18540
testb $0x1, %al
jne 0x18566
xorl %ebp, %ebp
testb $0x2, %al
je 0x18579
movzwl (%rdi), %esi
leaq 0x270e1(%rip), %rdi     # 0x3f61b
jmp 0x18570
xorl %ebp, %ebp
jmp 0x1859d
movl %esi, %ebp
movzwl (%rdi), %edi
movl %ecx, %esi
movl %r8d, %edx
callq 0x1b2e4
leaq 0x2e58b(%rip), %rdi     # 0x46ae1
movl %ebp, %esi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x3120
jmp 0x18577
movzwl (%rdi), %esi
leaq 0x270a3(%rip), %rdi     # 0x3f613
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
testb $0x30, (%r14)
je 0x1859d
testq %rbx, %rbx
leaq 0x2ffcf(%rip), %rsi     # 0x48558
cmovneq %rbx, %rsi
leaq 0x26b03(%rip), %rdi     # 0x3f097
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x16a4f
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/print_maker.c
// Function: print_camera_makes
void
print_camera_makes()
{
    struct camera_name *maker_id;
    char *pattern,*model_pattern;
    int chpr = 0;

    chpr = newline(0);
    chpr += printf("Camera Makes:");
    chpr = newline(chpr);

    if(Camera_name_pattern)
    {
        pattern = Camera_name_pattern;
        if((model_pattern = strchr(pattern,'+')))
            *model_pattern++ = '\0';
        else
            model_pattern = NULL;

        /* 'Camera_make' is a global parameter                        */
        for(maker_id = Camera_make; maker_id && maker_id->name; ++maker_id)
        {
            if(pattern)
            {
                if(*pattern == '-')
                {
                    chpr += printf("\t%-32.32s [%d]",maker_id->name,maker_id->id);
                    chpr = newline(chpr);
                }
                else
                {
                    if((*pattern) && !STRCASESTR(maker_id->name,pattern))
                        continue;
                    chpr += printf("\t%-32.32s [%d]",maker_id->name,maker_id->id);
                    chpr = newline(chpr);
                    if(model_pattern)
                    {
                        if(*model_pattern)
                            print_camera_models(maker_id->model,model_pattern);
                        else
                            print_camera_models(maker_id->model,NULL);
                    }
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %edi, %edi
callq 0x160f7
movl %eax, %ebx
leaq 0x2bdfe(%rip), %rdi     # 0x44b5a
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
movl %ebx, %edi
callq 0x160f7
movl %eax, %ebp
leaq 0x3f6eb(%rip), %rax     # 0x58460
movq (%rax), %rbx
testq %rbx, %rbx
je 0x18e31
pushq $0x2b
popq %rsi
movq %rbx, %rdi
callq 0x3110
testq %rax, %rax
je 0x18d9c
movq %rax, %r14
incq %r14
movb $0x0, (%rax)
jmp 0x18d9f
xorl %r14d, %r14d
leaq 0x3f3fa(%rip), %r13     # 0x581a0
addq $0x10, %r13
leaq 0x2bdb7(%rip), %r15     # 0x44b68
movq -0x10(%r13), %r12
testq %r12, %r12
je 0x18e31
movzbl (%rbx), %eax
testl %eax, %eax
je 0x18df4
cmpl $0x2d, %eax
jne 0x18de4
movl -0x4(%r13), %edx
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x160f7
movl %eax, %ebp
jmp 0x18e2b
movq %r12, %rdi
movq %rbx, %rsi
callq 0x18e40
testq %rax, %rax
je 0x18e2b
movl -0x4(%r13), %edx
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x160f7
movl %eax, %ebp
testq %r14, %r14
je 0x18e2b
cmpb $0x0, (%r14)
movq (%r13), %rdi
je 0x18e24
movq %r14, %rsi
jmp 0x18e26
xorl %esi, %esi
callq 0x18eab
addq $0x18, %r13
jmp 0x18db1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/print_maker.c
// Function: fake_strcasestr
char *
fake_strcasestr(char *string,char *pattern)
{
    char *match = CNULL;
    int plen,slen;

    if(string && pattern)
    {
        plen = strlen(pattern);
        if(plen == 0)
            match = string;
        else
        {
            slen = strlen(string);
            while(plen <= slen)
            {
                if(strncasecmp(string,pattern,plen) == 0)
                {
                    match = string;
                    break;
                }
                ++string;
                --slen;
            }
        }
    }
    return(match);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x18e9c
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x3100
movq %rax, %r15
testl %r15d, %r15d
je 0x18e9e
movq %rbx, %rdi
callq 0x3100
movq %rax, %r12
movslq %r15d, %r13
cmpl %r15d, %r12d
jl 0x18e9c
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x31f0
testl %eax, %eax
je 0x18e9e
incq %rbx
decl %r12d
jmp 0x18e7d
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/print_maker.c
// Function: print_camera_models
void
print_camera_models(struct camera_id *model_names,char *pattern)
{
    struct camera_id *maker_id;
    int chpr = 0;

    chpr = newline(0);
    for(maker_id = model_names ; maker_id && maker_id->name; ++maker_id)
    {
        if(pattern)
        {
            if(STRCASESTR(maker_id->name,pattern))
            {
                chpr += printf("\t\t%-32.32s ",maker_id->name);
                chpr += printf("\t[%2d,%d]",maker_id->id,
                                maker_id->noteversion);
                chpr = newline(chpr);
            }
        }
        else
        {
            chpr += printf("\t\t%-32.32s ",maker_id->name);
            chpr += printf("\t[%2d,%d]",maker_id->id,
                                maker_id->noteversion);
            chpr = newline(chpr);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %edi, %edi
callq 0x160f7
movl %eax, %ebp
leaq 0x2bcab(%rip), %r15     # 0x44b77
leaq 0x2bcb0(%rip), %r12     # 0x44b83
testq %r14, %r14
je 0x18f27
movq (%r14), %r13
testq %r13, %r13
je 0x18f27
testq %rbx, %rbx
je 0x18ef5
movq %r13, %rdi
movq %rbx, %rsi
callq 0x18e40
testq %rax, %rax
je 0x18f21
movq %r15, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl 0xc(%r14), %esi
movl 0x10(%r14), %edx
movq %r12, %rdi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x160f7
movl %eax, %ebp
addq $0x18, %r14
jmp 0x18ed3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/maker_generic.c
// Function: maker_number
int
maker_number(char *make)
{
    struct camera_name *maker_id;
    int number = NO_MAKE;

    if(make)
    {
        /* 'Camera_make' is a global parameter                            */
        for(maker_id = Camera_make; maker_id && maker_id->name; ++maker_id)
        {
            if(strncasecmp(make,maker_id->name,maker_id->namelen) == 0)
            {
                number = maker_id->id;
                break;
            }
        }
    }
    return(number);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x1a5ad
movq %rdi, %r14
leaq 0x3dc15(%rip), %r15     # 0x581a0
movq (%r15), %rsi
testq %rsi, %rsi
je 0x1a5ad
movslq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x31f0
testl %eax, %eax
je 0x1a5a9
addq $0x18, %r15
jmp 0x1a58b
movl 0xc(%r15), %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/maker_generic.c
// Function: check_printable
char *
check_printable(char *id, int maxlen)
{
    static char buffer[MAX_IDLEN];
    char *idval,*bufval;
    int i = 0;

    memset(buffer,'\0',MAX_IDLEN);
    if(maxlen > MAX_IDLEN)
        maxlen = MAX_IDLEN;
    bufval = buffer;

    for(idval = id; idval && (i < maxlen - 1); ++idval,++bufval,++i)
        if(!isprint(*idval))
        {
            *bufval = '\0';
            break;
        }
        else
            *bufval = *idval;
    return(buffer);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
andq $0x0, 0x41528(%rip)     # 0x5c5e0
cmpl $0x18, %esi
pushq $0x18
popq %rbp
cmovll %esi, %ebp
movaps %xmm0, 0x41508(%rip)    # 0x5c5d0
decl %ebp
xorl %r14d, %r14d
leaq 0x414fc(%rip), %r15     # 0x5c5d0
movq %rbx, %r12
addq %r14, %r12
je 0x1b103
cmpl %ebp, %r14d
jge 0x1b103
callq 0x32d0
movq (%rax), %rcx
movsbq (%r12), %rax
testb $0x40, 0x1(%rcx,%rax,2)
je 0x1b0fe
movb %al, (%r14,%r15)
incq %r14
jmp 0x1b0d4
movb $0x0, (%r14,%r15)
leaq 0x414c6(%rip), %rax     # 0x5c5d0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/maker_generic.c
// Function: valid_tiffhdr
unsigned short
valid_tiffhdr(FILE *inptr,unsigned long offset,int print_marker)
{
    struct fileheader *header;
    unsigned short marker = 0;
    int chpr = 0;

    if(inptr && offset)
    {
        if(print_marker)
            chpr = printf(" read at offset %lu ",offset);
        header = read_imageheader(inptr,offset);
        if(header)
        {
            if(print_marker)
                chpr += printf(" %#x ",header->file_marker);
            switch(header->probe_magic)
            {
                case TIFF_MAGIC:
                    marker = header->file_marker;
                    break;
                default:
                    marker = 0;
                    break;
            }
        }
    }
    setcharsprinted(chpr);
    return(marker);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
xorl %r12d, %r12d
orb %al, %cl
movl $0x0, %ebx
jne 0x1b191
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
testl %edx, %edx
je 0x1b154
leaq 0x2a8f8(%rip), %rdi     # 0x45a3e
movq %r14, %rsi
xorl %eax, %eax
callq 0x3120
movl %eax, %ebx
jmp 0x1b156
xorl %ebx, %ebx
movq %r15, %rdi
movq %r14, %rsi
callq 0x3d98
testq %rax, %rax
je 0x1b18e
movq %rax, %r14
testl %ebp, %ebp
je 0x1b181
movzwl (%r14), %esi
leaq 0x280f4(%rip), %rdi     # 0x4326c
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
cmpq $0x2a, 0x8(%r14)
jne 0x1b18e
movzwl (%r14), %r12d
jmp 0x1b191
xorl %r12d, %r12d
movl %ebx, %edi
callq 0x16a4f
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/maker_generic.c
// Function: invalid_ifd_entry
int
invalid_ifd_entry(FILE *inptr,unsigned long offset,unsigned long segment_size,
                    int nentries,unsigned short byteorder)
{
    struct ifd_entry *entry_ptr;
    int invalid = 0;

    if(inptr && offset && byteorder)
    {
        /* Read an entry at the given offset and see if has a valid   */
        /* type, and non-zero count.                                  */
        entry_ptr = read_ifd_entry(inptr,byteorder,offset);
        if((entry_ptr->value_type == 0) || (entry_ptr->value_type > DOUBLE) ||
            ferror(inptr) || feof(inptr))
                ++invalid;
        else if(entry_ptr->count == 0)
                ++invalid;
        
        /* If there is more than one entry, and the first appears     */
        /* valid, check the second entry.                             */
        /* If there is only one entry, and it appears valid, make     */
        /* sure that it's size fits within the note. This size check  */
        /* can fail on multi-entry notes when moronic makers write a  */
        /* thumbnail offset, then write the thumbnail outside the     */
        /* note...so we don't check size for multi.                   */
        if(nentries > 1)
        {
            if(invalid == 0)    /* double check                           */
            {
                entry_ptr = read_ifd_entry(inptr,byteorder,HERE);
                if((entry_ptr->value_type == 0) || (entry_ptr->value_type > DOUBLE) ||
                    ferror(inptr) || feof(inptr))
                        ++invalid;
                else if(entry_ptr->count == 0)
                        ++invalid;
            }
        }
        else if(entry_ptr->count > segment_size)
            ++invalid;
    }
    else
        ++invalid;
    return(invalid);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testl %r8d, %r8d
sete %al
orb %cl, %al
jne 0x1b25f
movq %rdx, %r15
movq %rsi, %rdx
movq %rdi, %r14
movzwl %r8w, %r12d
movl %r12d, %esi
callq 0x476a
movq %rax, %r13
movzwl 0x2(%rax), %eax
addl $-0xd, %eax
pushq $0x1
popq %rbx
cmpw $-0xc, %ax
jb 0x1b20d
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x1b20d
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
je 0x1b27c
xorl %eax, %eax
cmpl $0x2, %ebp
jl 0x1b264
pushq $0x1
popq %rbx
testb %al, %al
je 0x1b26b
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r14, %rdi
movl %r12d, %esi
callq 0x476a
movq %rax, %r15
movzwl 0x2(%rax), %eax
addl $-0xd, %eax
cmpw $-0xc, %ax
jb 0x1b26b
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x1b26b
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x1b26b
xorl %ebx, %ebx
cmpq $0x0, 0x8(%r15)
sete %bl
jmp 0x1b26b
pushq $0x1
popq %rbx
jmp 0x1b26b
cmpq 0x8(%r13), %r15
adcl $0x0, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
cmpq $0x0, 0x8(%r13)
setne %al
sete %bl
jmp 0x1b20f
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/options.c
// Function: env_options
void
env_options()
{
    char *argv[MAXARGV];
    char *envopts;
    int argc;

    envopts = getenv("EXIFPROBE_OPTIONS");
    if(envopts && *envopts)
    {
        char *argstr = calloc(strlen(envopts) + 3, 1);
        strcpy(argstr, "e ");
        strcat(argstr, envopts);
        optind = 0;
        /* make an argument vector                                    */
        argc = vector(argstr, argv, " \t", 0, MAXARGV);
        (void)process_options(argc,argv);
        optind = 1;
        free(argstr);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x800, %rsp            # imm = 0x800
leaq 0x2a385(%rip), %rdi     # 0x45c72
callq 0x3030
testq %rax, %rax
je 0x1b96d
movq %rax, %r14
cmpb $0x0, (%rax)
je 0x1b96d
movq %r14, %rdi
callq 0x3100
leaq 0x3(%rax), %rdi
pushq $0x1
popq %rsi
callq 0x3170
movq %rax, %rbx
movw $0x2065, (%rax)         # imm = 0x2065
movb $0x0, 0x2(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x3270
movq 0x3b69f(%rip), %r15     # 0x56fd0
andl $0x0, (%r15)
leaq 0x2a348(%rip), %rdx     # 0x45c84
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
movl $0x100, %r8d            # imm = 0x100
xorl %eax, %eax
callq 0x262d0
movl %eax, %edi
movq %r14, %rsi
callq 0x1b418
movl $0x1, (%r15)
movq %rbx, %rdi
callq 0x3050
addq $0x800, %rsp            # imm = 0x800
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/options.c
// Function: print_version
void
print_version()
{
    printf("\tProgram: '%s' version %s",Progname,Program_version);
    if(PATCHLEVEL > 0)
        printf(" patchlevel %d",PATCHLEVEL);
    (void)putchar('\n');
    if(Comptime)
        printf("\tCompiled: %s\n",Comptime);
    printf("\t%s\n",Copyright);
    printf("\t\t(open source; see LICENSE.EXIFPROBE)\n");
}

// Assembly:
pushq %rax
leaq 0x3c883(%rip), %rax     # 0x58468
movq (%rax), %rsi
movq 0x3c7f9(%rip), %rdx     # 0x583e8
leaq 0x2a0b3(%rip), %rdi     # 0x45ca9
xorl %eax, %eax
callq 0x3120
pushq $0xa
popq %rdi
callq 0x3060
leaq 0x3c7ec(%rip), %rax     # 0x583f8
movq (%rax), %rsi
testq %rsi, %rsi
je 0x1bc22
leaq 0x2a0a8(%rip), %rdi     # 0x45cc3
xorl %eax, %eax
callq 0x3120
movq 0x3c7b7(%rip), %rsi     # 0x583e0
leaq 0x2a0a2(%rip), %rdi     # 0x45cd2
xorl %eax, %eax
callq 0x3120
leaq 0x2a91d(%rip), %rdi     # 0x4655b
popq %rax
jmp 0x30a0
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/ciff.c
// Function: read_ciff_direntry
struct ciff_direntry *
read_ciff_direntry(FILE *inptr,struct ciff_direntry *entry,unsigned short byteorder,unsigned long offset)
{
    if(inptr)
    {
        if(entry == NULL)
            entry = (struct ciff_direntry *)malloc(sizeof(struct ciff_direntry));
        if(entry)
        {
            memset(entry,0,sizeof(struct ciff_direntry));
            entry->type = read_ushort(inptr,byteorder,offset);
            entry->length = read_ulong(inptr,byteorder,offset + 2);
            entry->offset = read_ulong(inptr,byteorder,offset + 6);
        }
    }
    return(entry);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rdi, %rdi
je 0x1c41d
movq %rcx, %r14
movl %edx, %ebp
movq %rdi, %r15
testq %rbx, %rbx
jne 0x1c3d8
pushq $0x18
popq %rdi
callq 0x31e0
movq %rax, %rbx
testq %rax, %rax
je 0x1c42b
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movzwl %bp, %ebp
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x416a
movw %ax, (%rbx)
leaq 0x2(%r14), %rdx
movq %r15, %rdi
movl %ebp, %esi
callq 0x42ba
movq %rax, 0x8(%rbx)
addq $0x6, %r14
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x42ba
movq %rax, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x1c41d
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/ciff.c
// Function: print_ciff_value
void
print_ciff_value(FILE *inptr,struct ciff_direntry *entry, unsigned short byteorder,
                            unsigned long fileoffset_base,unsigned long entry_offset,
                            char *dirname,struct image_summary *summary_entry,
                            int level,int indent)
{
    unsigned short location;
    unsigned long max_dir_offset = 0;
    int chpr = 0;

    location = entry->type & CIFF_LOCATIONMASK;
    if(location == CIFF_INREC)
    {
        /* chpr += printf("INREC"); */
        max_dir_offset = process_ciff_direntry(inptr,CIFF_INREC,byteorder,entry,
                                        entry_offset,dirname,summary_entry,level,
                                        indent);
    }
    else if(PRINT_SECTION)
    {
        if(PRINT_BOTH_OFFSET)
            chpr += printf("@%#lx=%lu",entry->offset + fileoffset_base,
                    entry->offset + fileoffset_base);
        else if(PRINT_HEX_OFFSET)
            chpr += printf("@%#lx",entry->offset + fileoffset_base);
        else /* default to decimal offset if nothing is selected      */
            chpr += printf("@%lu",entry->offset + fileoffset_base);

        if(fileoffset_base && (PRINT_ENTRY_RELOFFSET))
            chpr += printf(" (%lu) ",entry->offset);
        chpr = newline(chpr);
    }
    setcharsprinted(chpr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movzwl (%rsi), %eax
andl $0xc000, %eax           # imm = 0xC000
cmpw $0x4000, %ax            # imm = 0x4000
jne 0x1eab5
movl 0x40(%rsp), %eax
movl 0x38(%rsp), %r10d
subq $0x8, %rsp
movzwl %dx, %edx
movl $0x4000, %esi           # imm = 0x4000
movq %rbx, %rcx
pushq %rax
pushq %r10
pushq 0x48(%rsp)
callq 0x1c42f
addq $0x20, %rsp
xorl %edi, %edi
jmp 0x1eb3e
leaq 0x386c4(%rip), %r15     # 0x57180
movq (%r15), %rax
xorl %edi, %edi
btl $0x12, %eax
jae 0x1eb3e
movq %rcx, %r14
movl %eax, %ecx
notl %ecx
testw $0x300, %cx             # imm = 0x300
jne 0x1eaef
movq 0x10(%rbx), %rdx
addq %r14, %rdx
leaq 0x2472a(%rip), %rdi     # 0x4320d
movq %rdx, %rsi
xorl %eax, %eax
callq 0x3120
jmp 0x1eb13
movq 0x10(%rbx), %rsi
addq %r14, %rsi
btl $0x8, %eax
jb 0x1eb05
leaq 0x27cd9(%rip), %rdi     # 0x467dc
jmp 0x1eb0c
leaq 0x2470e(%rip), %rdi     # 0x4321a
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
testq %r14, %r14
je 0x1eb35
testb $0x4, 0x3(%r15)
je 0x1eb35
movq 0x10(%rbx), %rsi
leaq 0x20ac4(%rip), %rdi     # 0x3f5f0
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x160f7
movl %eax, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x16a4f
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/ciff.c
// Function: print_ciffinrecdata
unsigned long
print_ciffinrecdata(FILE *inptr,unsigned short byteorder,char *tagname,
                                unsigned long offset,unsigned long dirlength,
                                unsigned short data_format,int indent)
{
    unsigned long end_offset = 0UL;
    unsigned short count;
    int chpr = 0;

    if(inptr)
    {
        end_offset = offset + dirlength;
        if((PRINT_VALUE))
        {
            count = dirlength;
            chpr = count;
            switch(data_format)
            {
                case 0x1000:    /* DC_USHORT                          */
                            print_ushort(inptr,count/2,byteorder,offset);
                            break;
                case 0x1800:    /* DC_UINT32:                         */
                            print_ulong(inptr,count/4,byteorder,offset);
                            break;
                case 0x0800:    /* DC_ASCII:                          */
                            print_ascii(inptr,count,offset); 
                            break;
                case 0x0000:    /* DC_BYTE:                           */
                            print_ubytes(inptr,count,offset);
                            break;
                default:
                            chpr += printf("(data format %#x)",data_format);
                            break;
            }
            setcharsprinted(chpr);
        }
    }
    return(end_offset);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1f17d
leaq (%r8,%rcx), %rbx
leaq 0x38038(%rip), %rax     # 0x57180
testb $0x30, (%rax)
je 0x1f1cb
movzwl %r8w, %ebp
movzwl %r9w, %eax
movl %eax, %edx
roll $0x15, %edx
cmpl $0x3, %edx
ja 0x1f1b2
leaq 0x274ee(%rip), %rax     # 0x46654
movslq (%rax,%rdx,4), %rdx
addq %rax, %rdx
jmpq *%rdx
movzwl %r8w, %esi
movq %rcx, %rdx
callq 0x73b2
jmp 0x1f1c4
xorl %ebx, %ebx
jmp 0x1f1cb
movl %ebp, %eax
shrl %eax
movzwl %si, %edx
movq %rax, %rsi
callq 0x7790
jmp 0x1f1c4
movl %ebp, %eax
shrl $0x2, %eax
movzwl %si, %edx
movq %rax, %rsi
callq 0x7caf
jmp 0x1f1c4
movzwl %r8w, %esi
movq %rcx, %rdx
callq 0x71a9
jmp 0x1f1c4
leaq 0x27755(%rip), %rdi     # 0x4690e
movl %eax, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x16a4f
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/ciff.c
// Function: is_compressed_crw
int
is_compressed_crw(FILE *inptr,unsigned long start_offset,unsigned long imagelength)
{
    int is_compressed = 0;
    int maxcheck = 16384;   /* 0x4000                                 */
    int count = 0;
    int ch,lastch;

    if((inptr) && (fseek(inptr,start_offset + 512,SEEK_SET) != -1))
    {
        if(imagelength < maxcheck)
            maxcheck = imagelength;
        lastch = 0;
        while(((ch = fgetc(inptr)) != EOF) && (count++ < maxcheck))
        {
            if(lastch == 0xff)
            {
                is_compressed = 1;
                if(ch)
                {
                    is_compressed = 0;
                    break;
                }
            }
            lastch = ch;
        }
    }
    return(is_compressed);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1f24a
movq %rdx, %r14
movq %rdi, %rbx
addq $0x200, %rsi            # imm = 0x200
xorl %ebp, %ebp
xorl %edx, %edx
callq 0x3210
cmpl $-0x1, %eax
je 0x1f24c
movl $0x4000, %r15d          # imm = 0x4000
cmpq %r15, %r14
cmovbq %r14, %r15
xorl %r14d, %r14d
pushq $0x1
popq %r12
xorl %r13d, %r13d
xorl %eax, %eax
movl %eax, %ebp
movq %rbx, %rdi
callq 0x3150
cmpl $-0x1, %eax
je 0x1f245
cmpl %r14d, %r15d
je 0x1f245
incl %r14d
cmpl $0xff, %ebp
movl %eax, %ebp
jne 0x1f21b
xorl %ebp, %ebp
movl %r12d, %r13d
testl %eax, %eax
je 0x1f219
jmp 0x1f24c
movl %r13d, %ebp
jmp 0x1f24c
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/ciff.c
// Function: read_ciffheader
struct ciff_header *
read_ciffheader(FILE *inptr,unsigned short byteorder,unsigned long offset)
{
    static struct ciff_header header;
    struct ciff_header *headerptr = NULL;
    unsigned char *string;

    memset(&header,0,sizeof(struct ciff_header));
    if(inptr)
    {
        header.byteorder = read_ushort(inptr,byteorder,offset);
        header.headerlength = read_ulong(inptr,byteorder,HERE);
        string = read_bytes(inptr,4,HERE);
        if(string)
        {
            strncpy(header.type,(char *)string,4);
            string = read_bytes(inptr,4,HERE);
            if(string)
                strncpy(header.subtype,(char *)string,4);
        }
        header.version = read_ulong(inptr,byteorder,HERE);
        header.reserved1 = read_ulong(inptr,byteorder,HERE);
        header.reserved2 = read_ulong(inptr,byteorder,HERE);
        if((header.byteorder == byteorder) &&
                (strncmp(header.type,"HEAP",4) == 0) &&
                                    (header.headerlength > 0))
        {
            headerptr = &header;
        }
    }
    return(headerptr);
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x3d2a7(%rip)    # 0x5c698
movups %xmm0, 0x3d290(%rip)    # 0x5c688
movups %xmm0, 0x3d279(%rip)    # 0x5c678
andq $0x0, 0x3d2a1(%rip)     # 0x5c6a8
testq %rdi, %rdi
je 0x1f505
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movzwl %si, %ebp
movl %ebp, %esi
callq 0x416a
movw %ax, 0x3d250(%rip)      # 0x5c678
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rbx, %rdi
movl %ebp, %esi
callq 0x42ba
movq %rax, 0x3d242(%rip)     # 0x5c680
pushq $0x4
popq %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rbx, %rdi
callq 0x4410
testq %rax, %rax
je 0x1f490
leaq 0x3d22e(%rip), %rdi     # 0x5c688
pushq $0x4
popq %r14
movq %rax, %rsi
movq %r14, %rdx
callq 0x3080
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4410
testq %rax, %rax
je 0x1f490
leaq 0x3d208(%rip), %rdi     # 0x5c68d
pushq $0x4
popq %rdx
movq %rax, %rsi
callq 0x3080
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rbx, %rdi
movl %ebp, %esi
callq 0x42ba
movq %rax, 0x3d1f2(%rip)     # 0x5c698
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rbx, %rdi
movl %ebp, %esi
callq 0x42ba
movq %rax, 0x3d1e4(%rip)     # 0x5c6a0
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rbx, %rdi
movl %ebp, %esi
callq 0x42ba
movq %rax, 0x3d1d6(%rip)     # 0x5c6a8
cmpw %bp, 0x3d19f(%rip)      # 0x5c678
popq %rbx
popq %r14
popq %rbp
jne 0x1f505
leaq 0x3d192(%rip), %rcx     # 0x5c678
movq 0x3d193(%rip), %rax     # 0x5c680
testq %rax, %rax
cmoveq %rax, %rcx
xorl %eax, %eax
cmpl $0x50414548, 0x3d188(%rip) # imm = 0x50414548
cmoveq %rcx, %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/jp2000.c
// Function: read_jp2box
struct jp2box *
read_jp2box(FILE *inptr,unsigned long offset)
{
    static struct jp2box box;
    struct jp2box *newbox = NULL; 

    if(inptr)
    {
        box.boxoffset = offset;
        box.lbox = read_ulong(inptr,TIFF_MOTOROLA,offset);
        if(!feof(inptr) && !(ferror(inptr)))
        {
            box.tbox = read_ulong(inptr,TIFF_MOTOROLA,HERE);
            if(!feof(inptr) && !(ferror(inptr)))
            {
                if(box.lbox == 1)
                {
#if 0
                    box.boxlength = read_ulong64(inptr,TIFF_MOTOROLA,HERE);
                    box.dataoffset = 16;
#else
                    PUSHCOLOR(RED);
                    printf("%s: cannot read 64 bit sizes/offsets yet",Progname);
                    POPCOLOR();
                    newbox = NULL;
#endif
                }
                else
                {
                    box.boxlength = box.lbox;
                    box.dataoffset = 8;
                }
                newbox = &box;
            }
            else
                newbox = NULL;
        }
        else
            newbox = NULL;
    }
    return(newbox);
}

// Assembly:
testq %rdi, %rdi
je 0x1f579
pushq %rbx
movq %rsi, %rdx
movq %rdi, %rbx
movq %rsi, 0x3d1ad(%rip)     # 0x5c6c8
movl $0x4d4d, %esi           # imm = 0x4D4D
callq 0x42ba
movq %rax, 0x3d184(%rip)     # 0x5c6b0
movq %rbx, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x1f575
movq %rbx, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x1f575
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rbx, %rdi
movl $0x4d4d, %esi           # imm = 0x4D4D
callq 0x42ba
movq %rax, 0x3d15b(%rip)     # 0x5c6b8
movq %rbx, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x1f575
movq %rbx, %rdi
callq 0x30b0
testl %eax, %eax
je 0x1f57c
xorl %eax, %eax
popq %rbx
retq
xorl %eax, %eax
retq
movq 0x3d12d(%rip), %rax     # 0x5c6b0
cmpq $0x1, %rax
jne 0x1f5aa
leaq 0x38ed8(%rip), %rax     # 0x58468
movq (%rax), %rsi
leaq 0x27646(%rip), %rdi     # 0x46be0
xorl %eax, %eax
callq 0x3120
leaq 0x3d108(%rip), %rax     # 0x5c6b0
jmp 0x1f577
movq %rax, 0x3d11f(%rip)     # 0x5c6d0
leaq 0x3d0f8(%rip), %rax     # 0x5c6b0
movq $0x8, 0x3d0fd(%rip) # 0x5c6c0
jmp 0x1f577
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/jp2000.c
// Function: print_jp2_header
int
print_jp2_header(struct fileheader *fileheader,unsigned long section_id)
{
    struct jp2_header jp2header;
    int status = -1;
    int chpr = 0;

    if(Print_options & section_id)
    {
        if(fileheader && (fileheader->probe_magic == PROBE_JP2MAGIC))
        {
            jp2header = fileheader->jp2_header;
            if(jp2header.magic == PROBE_JP2MAGIC)
            {
                /* Ok, I'm convinced...                               */
                print_jp2type(jp2header.type,0);
                chpr += printf(" <%#lx> magic %#lx, length %lu",jp2header.type,
                                            jp2header.magic,jp2header.length);
                chpr = newline(chpr);
                status = 0;
            }
            else 
                chpr += printf(" NOT A JP2 HEADER");
        }
        else
            chpr += printf(" NOT A JP2 HEADER");
    }
    chpr = newline(chpr);
    return(status);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x37baf(%rip), %rax     # 0x57180
pushq $-0x1
popq %rbx
testq %rsi, (%rax)
je 0x1f63a
testq %rdi, %rdi
je 0x1f628
cmpq $0xd0a870a, 0x8(%rdi)   # imm = 0xD0A870A
jne 0x1f628
cmpq $0xd0a870a, 0x28(%rdi)  # imm = 0xD0A870A
jne 0x1f628
movq 0x18(%rdi), %r14
movq 0x20(%rdi), %r15
xorl %ebx, %ebx
movq %r15, %rdi
xorl %esi, %esi
callq 0x1f649
leaq 0x275fc(%rip), %rdi     # 0x46c09
movl $0xd0a870a, %edx        # imm = 0xD0A870A
movq %r15, %rsi
movq %r14, %rcx
xorl %eax, %eax
callq 0x3120
movl %eax, %edi
callq 0x160f7
jmp 0x1f636
leaq 0x275f9(%rip), %rdi     # 0x46c28
xorl %eax, %eax
callq 0x3120
movl %eax, %edi
jmp 0x1f63c
xorl %edi, %edi
callq 0x160f7
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/jp2000.c
// Function: print_jp2type
void
print_jp2type(unsigned long type,int atend)
{
    int i;
    char *p;
    int chpr = 0;

    p = (char *)&type + 3;

    if(!(LIST_MODE))
    {
        putchar('[');
        ++chpr;
    }
    /* 'atend' declares that the output marks the last byte of the    */
    /* box; this is indicated by prepending a '/' to the box name     */
    if(atend)
    {
        putchar('/');
        ++chpr;
    }
    for(i = 0; i < 4; ++i,--p)
    {
        if(isascii(*p) && isprint(*p))
        {
            putchar(*p);
            ++chpr;
        }
        else if(*p)
            chpr += printf("\\%03u",*p & 0xff);
        else
            chpr += printf("\\0");
    }
    if(!(LIST_MODE))
    {
        putchar(']');
        ++chpr;
    }
    setcharsprinted(chpr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, (%rsp)
leaq 0x37b1f(%rip), %rax     # 0x57180
movzwl 0x2(%rax), %eax
testw $0x104, %ax             # imm = 0x104
je 0x1f678
pushq $0x5b
popq %rdi
callq 0x3060
pushq $0x1
popq %rbx
jmp 0x1f67a
xorl %ebx, %ebx
testl %ebp, %ebp
je 0x1f688
pushq $0x2f
popq %rdi
callq 0x3060
incl %ebx
pushq $0x3
popq %r13
leaq 0x201b6(%rip), %r14     # 0x3f849
leaq 0x275cf(%rip), %r15     # 0x46c69
cmpl $-0x1, %r13d
je 0x1f6ed
movsbl (%rsp,%r13), %ebp
testl %ebp, %ebp
js 0x1f6c1
movslq %ebp, %r12
callq 0x32d0
movq (%rax), %rax
testb $0x40, 0x1(%rax,%r12,2)
jne 0x1f6d3
testb %bpl, %bpl
je 0x1f6e1
movzbl %bpl, %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
jmp 0x1f6dc
movl %ebp, %edi
callq 0x3060
incl %ebx
decq %r13
jmp 0x1f69a
movq %r14, %rdi
xorl %eax, %eax
callq 0x3120
jmp 0x1f6cf
leaq 0x37a8c(%rip), %rax     # 0x57180
movzwl 0x2(%rax), %eax
testw $0x104, %ax             # imm = 0x104
je 0x1f708
pushq $0x5d
popq %rdi
callq 0x3060
incl %ebx
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x16a4f
// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/jp2000.c
// Function: print_jp2box
void
print_jp2box(FILE *inptr,struct jp2box *box,int indent)
{
    unsigned long boxlength = 0UL;
    int chpr = 0;

    if(box)
    {
        if(box->boxlength == 0UL)
            box->boxlength = get_filesize(inptr) - box->boxoffset;
        else
            boxlength = box->boxlength;
        if(PRINT_SECTION)
        {
            print_tag_address(SECTION,box->boxoffset,indent,"@");
            print_jp2type(box->tbox,0);
            chpr += printf(" <%#lx>",box->tbox);
            chpr += printf(" length %lu",boxlength);
            /* Indicate that this is lastbox                          */
            if(box->boxlength == 0UL)
                chpr += printf(" (0)");
            chpr += printf(" data offset %lu",box->dataoffset);
        }
    }
    chpr = newline(chpr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %r15d, %r15d
testq %rsi, %rsi
je 0x1f7d4
movl %edx, %ebp
movq %rsi, %rbx
movq 0x20(%rsi), %r14
testq %r14, %r14
jne 0x1f74b
callq 0x4c6d
subq 0x18(%rbx), %rax
movq %rax, 0x20(%rbx)
leaq 0x37a2e(%rip), %rax     # 0x57180
testb $0x4, 0x2(%rax)
je 0x1f7d4
movq 0x18(%rbx), %rsi
leaq 0x1f979(%rip), %rcx     # 0x3f0dc
movl $0x40000, %edi          # imm = 0x40000
movl %ebp, %edx
callq 0x5100
movq 0x8(%rbx), %rdi
xorl %esi, %esi
callq 0x1f649
movq 0x8(%rbx), %rsi
leaq 0x274b5(%rip), %rdi     # 0x46c3a
xorl %eax, %eax
callq 0x3120
movl %eax, %r15d
leaq 0x26f74(%rip), %rdi     # 0x4670a
movq %r14, %rsi
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
addl %r15d, %ebp
cmpq $0x0, 0x20(%rbx)
jne 0x1f7bc
leaq 0x2748f(%rip), %rdi     # 0x46c42
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movq 0x10(%rbx), %rsi
leaq 0x27480(%rip), %rdi     # 0x46c47
xorl %eax, %eax
callq 0x3120
movl %eax, %r15d
addl %ebp, %r15d
movl %r15d, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x160f7