// File: /workspace/github_c_makefile_star2_O3/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 0x20669
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0x20670
movq %rsi, %r15
movzwl (%rbx), %ebp
cmpq $0x1a, 0x8(%rbx)
leaq 0x37c1a(%rip), %r12     # 0x58180
movq (%r12), %rax
jne 0x20583
testq %r15, %rax
je 0x205d5
leaq 0x253b9(%rip), %rdi     # 0x45931
xorl %eax, %eax
callq 0x3120
movl %eax, %ebx
jmp 0x205d7
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testq %r15, %rax
je 0x20621
leaq 0x2861e(%rip), %rdi     # 0x48bb7
xorl %eax, %eax
callq 0x3120
movl %eax, %r15d
movq 0x8(%rbx), %rdi
movl $0x4, %esi
callq 0x5454
leaq 0x20fc8(%rip), %rdi     # 0x41580
xorl %eax, %eax
callq 0x3120
movl %eax, %ebx
addl %r15d, %ebx
movl %ebp, %edi
movl $0x1, %esi
callq 0x538a
jmp 0x2067d
xorl %ebx, %ebx
cmpl $0x4d4d, %ebp           # imm = 0x4D4D
je 0x205e7
cmpl $0x4949, %ebp           # imm = 0x4949
jne 0x20625
testq %r15, (%r12)
je 0x20664
movl %ebp, %edi
movl $0x1, %esi
callq 0x538a
leaq 0x10(%r14), %rsi
leaq 0x15(%r14), %rdx
movq 0x8(%r14), %r8
movq 0x20(%r14), %rcx
leaq 0x2854d(%rip), %rdi     # 0x48b5d
xorl %r14d, %r14d
movq %r8, %r9
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
jmp 0x2067d
xorl %ebx, %ebx
jmp 0x2067d
testq %r15, (%r12)
je 0x2063b
leaq 0x28559(%rip), %rdi     # 0x48b8b
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
movl %ebp, %edi
movl $0x1, %esi
callq 0x538a
leaq 0x10(%r14), %rsi
addq $0x15, %r14
leaq 0x2854d(%rip), %rdi     # 0x48ba3
movq %r14, %rdx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
jmp 0x20677
xorl %r14d, %r14d
jmp 0x2067d
callq 0x352c
jmp 0x20675
callq 0x350a
xorl %ebx, %ebx
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %ebx, %edi
callq 0x1707a
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq