// File: /workspace/github_c_makefile_star2_O2/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 0x1f38f
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0x1f3ac
movq %rsi, %r15
movzwl (%rbx), %ebp
cmpq $0x1a, 0x8(%rbx)
leaq 0x37ef0(%rip), %r12     # 0x57180
movq (%r12), %rax
jne 0x1f2ad
testq %r15, %rax
je 0x1f2f9
leaq 0x2464b(%rip), %rdi     # 0x438ed
xorl %eax, %eax
callq 0x3120
movl %eax, %ebx
jmp 0x1f2fb
pushq $-0x1
popq %r14
testq %r15, %rax
je 0x1f346
leaq 0x278a6(%rip), %rdi     # 0x46b67
xorl %eax, %eax
callq 0x3120
movl %eax, %r15d
movq 0x8(%rbx), %rdi
pushq $0x4
popq %rsi
callq 0x4f9c
leaq 0x202a2(%rip), %rdi     # 0x3f580
xorl %eax, %eax
callq 0x3120
movl %eax, %ebx
addl %r15d, %ebx
pushq $0x1
popq %rsi
movl %ebp, %edi
callq 0x4efd
jmp 0x1f3d4
xorl %ebx, %ebx
cmpl $0x4d4d, %ebp           # imm = 0x4D4D
je 0x1f30b
cmpl $0x4949, %ebp           # imm = 0x4949
jne 0x1f34d
testq %r15, (%r12)
je 0x1f38a
pushq $0x1
popq %rsi
movl %ebp, %edi
callq 0x4efd
leaq 0x10(%r14), %rsi
leaq 0x15(%r14), %rdx
movq 0x8(%r14), %r8
movq 0x20(%r14), %rcx
leaq 0x277db(%rip), %rdi     # 0x46b0d
xorl %r14d, %r14d
movq %r8, %r9
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
jmp 0x1f3d4
xorl %ebx, %ebx
jmp 0x1f3d4
testq %r15, (%r12)
je 0x1f363
leaq 0x277e1(%rip), %rdi     # 0x46b3b
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
pushq $0x1
popq %rsi
movl %ebp, %edi
callq 0x4efd
leaq 0x10(%r14), %rsi
addq $0x15, %r14
leaq 0x277d7(%rip), %rdi     # 0x46b53
movq %r14, %rdx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
jmp 0x1f3d0
xorl %r14d, %r14d
jmp 0x1f3d4
movq 0x37c62(%rip), %rax     # 0x56ff8
movq (%rax), %rdi
leaq 0x390c8(%rip), %rax     # 0x58468
movq (%rax), %rdx
leaq 0x27802(%rip), %rsi     # 0x46bac
jmp 0x1f3c7
movq 0x37c45(%rip), %rax     # 0x56ff8
movq (%rax), %rdi
leaq 0x390ab(%rip), %rax     # 0x58468
movq (%rax), %rdx
leaq 0x277b9(%rip), %rsi     # 0x46b80
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x3180
pushq $-0x1
popq %r14
movl %ebx, %edi
callq 0x160f7
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq