// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movw $0x0, -0x1a(%rbp)
movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x24(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x2e457
movq -0x8(%rbp), %rax
movw (%rax), %ax
movw %ax, -0x1a(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x2e433
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x1a, 0x8(%rax)
jne 0x2e3d3
leaq 0x48ead(%rip), %rax     # 0x77180
movq (%rax), %rax
andq -0x10(%rbp), %rax
cmpq $0x0, %rax
je 0x2e2f4
leaq 0x39c80(%rip), %rdi     # 0x67f67
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movzwl -0x1a(%rbp), %eax
movl %eax, -0x28(%rbp)
subl $0x4949, %eax           # imm = 0x4949
je 0x2e310
jmp 0x2e304
movl -0x28(%rbp), %eax
subl $0x4d4d, %eax           # imm = 0x4D4D
jne 0x2e377
jmp 0x2e310
leaq 0x48e69(%rip), %rax     # 0x77180
movq (%rax), %rax
andq -0x10(%rbp), %rax
cmpq $0x0, %rax
je 0x2e36e
movl $0x1, %esi
movzwl -0x1a(%rbp), %edi
callq 0x59e0
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
movq -0x18(%rbp), %rdx
addq $0x15, %rdx
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %r8
movq -0x18(%rbp), %rax
movq 0x8(%rax), %r9
leaq 0x3cd67(%rip), %rdi     # 0x6b0c8
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x20(%rbp)
jmp 0x2e3d1
leaq 0x48e02(%rip), %rax     # 0x77180
movq (%rax), %rax
andq -0x10(%rbp), %rax
cmpq $0x0, %rax
je 0x2e39f
leaq 0x3cd64(%rip), %rdi     # 0x6b0f6
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl $0x1, %esi
movzwl -0x1a(%rbp), %edi
callq 0x59e0
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
movq -0x18(%rbp), %rdx
addq $0x15, %rdx
leaq 0x3cd4a(%rip), %rdi     # 0x6b10e
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x2e431
leaq 0x48da6(%rip), %rax     # 0x77180
movq (%rax), %rax
andq -0x10(%rbp), %rax
cmpq $0x0, %rax
je 0x2e42f
leaq 0x3cd34(%rip), %rdi     # 0x6b122
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x4, %esi
callq 0x5ad0
leaq 0x3612c(%rip), %rdi     # 0x64540
movb $0x0, %al
callq 0x3110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl $0x1, %esi
movzwl -0x1a(%rbp), %edi
callq 0x59e0
jmp 0x2e431
jmp 0x2e455
movq 0x48bbe(%rip), %rax     # 0x76ff8
movq (%rax), %rdi
leaq 0x4a024(%rip), %rax     # 0x78468
movq (%rax), %rdx
leaq 0x3cced(%rip), %rsi     # 0x6b13b
movb $0x0, %al
callq 0x3170
jmp 0x2e479
movq 0x48b9a(%rip), %rax     # 0x76ff8
movq (%rax), %rdi
leaq 0x4a000(%rip), %rax     # 0x78468
movq (%rax), %rdx
leaq 0x3ccf5(%rip), %rsi     # 0x6b167
movb $0x0, %al
callq 0x3170
movl -0x24(%rbp), %edi
callq 0x1ef50
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)