// File: /workspace/github_c_makefile_star2_O1/hfiguiere[P]exifprobe/ciff.c
// Function: print_ciff_header
int
print_ciff_header(struct fileheader *header,unsigned long section_id)
{
    struct ciff_header *ciffheader = NULL;
    unsigned short byteorder = 0;
    int status = -1;
    int chpr = 0;

    if(header)
    {
        byteorder = header->file_marker;
        if(header->ciff_header)
        {
            ciffheader = header->ciff_header;
            if(header->probe_magic == PROBE_CIFFMAGIC)
            {
                if(Print_options & section_id)
                    chpr += printf("CIFF");
                switch(byteorder)
                {
                case TIFF_INTEL:
                case TIFF_MOTOROLA:
                    if(Print_options & section_id)
                    {
                        print_byteorder(byteorder,1);
                        chpr += printf(" \"%s%s\", version %#lx, heap offset = %#lx/%lu",
                                ciffheader->type,ciffheader->subtype,
                                ciffheader->version,ciffheader->headerlength,
                                ciffheader->headerlength);
                    }
                    status = 0;
                    break;
                default:
                    if(Print_options & section_id)
                        chpr += printf("INVALID CIFF BYTEORDER ");
                        print_byteorder(byteorder,1);
                        chpr += printf(" (CIFF type \"%s%s\")",ciffheader->type,
                                                        ciffheader->subtype);
                    break;
                }
            }
            else if(Print_options & section_id)
            {
                    chpr += printf("INVALID CIFF IDENTIFIER ");
                    print_magic(header->probe_magic,4);
                    chpr += printf(" byteorder ");
                    print_byteorder(byteorder,1);
            }
        }
        else
            fprintf(stderr,"%s: null ciffheader to print_ciff_header()\n",Progname);
    }
    else
        fprintf(stderr,"%s: null fileheader to print_ciff_header()\n",Progname);
    chpr = newline(chpr);
    return(status);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x200a6
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0x200ad
movq %rsi, %r15
movzwl (%rbx), %ebp
cmpq $0x1a, 0x8(%rbx)
leaq 0x381dd(%rip), %r12     # 0x58180
movq (%r12), %rax
jne 0x1ffc0
testq %r15, %rax
je 0x20012
leaq 0x25938(%rip), %rdi     # 0x458ed
xorl %eax, %eax
callq 0x3120
movl %eax, %ebx
jmp 0x20014
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testq %r15, %rax
je 0x2005e
leaq 0x28ba1(%rip), %rdi     # 0x48b77
xorl %eax, %eax
callq 0x3120
movl %eax, %r15d
movq 0x8(%rbx), %rdi
movl $0x4, %esi
callq 0x546e
leaq 0x2158b(%rip), %rdi     # 0x41580
xorl %eax, %eax
callq 0x3120
movl %eax, %ebx
addl %r15d, %ebx
movl %ebp, %edi
movl $0x1, %esi
callq 0x53d5
jmp 0x200ba
xorl %ebx, %ebx
cmpl $0x4d4d, %ebp           # imm = 0x4D4D
je 0x20024
cmpl $0x4949, %ebp           # imm = 0x4949
jne 0x20062
testq %r15, (%r12)
je 0x200a1
movl %ebp, %edi
movl $0x1, %esi
callq 0x53d5
leaq 0x10(%r14), %rsi
leaq 0x15(%r14), %rdx
movq 0x8(%r14), %r8
movq 0x20(%r14), %rcx
leaq 0x28ad0(%rip), %rdi     # 0x48b1d
xorl %r14d, %r14d
movq %r8, %r9
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
jmp 0x200ba
xorl %ebx, %ebx
jmp 0x200ba
testq %r15, (%r12)
je 0x20078
leaq 0x28adc(%rip), %rdi     # 0x48b4b
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
movl %ebp, %edi
movl $0x1, %esi
callq 0x53d5
leaq 0x10(%r14), %rsi
addq $0x15, %r14
leaq 0x28ad0(%rip), %rdi     # 0x48b63
movq %r14, %rdx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
jmp 0x200b4
xorl %r14d, %r14d
jmp 0x200ba
callq 0x352c
jmp 0x200b2
callq 0x350a
xorl %ebx, %ebx
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %ebx, %edi
callq 0x16b56
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq