// File: /workspace/github_c_makefile_star2_O0/hfiguiere[P]exifprobe/ciff.c
// Function: process_ciff
unsigned long
process_ciff(FILE *inptr,struct fileheader *header,unsigned long fileoffset_base,
                        unsigned long heaplength,struct image_summary *summary_entry,
                        char *parent_name,int level,int indent)
{
    struct ciff_header *ciffheader;
    unsigned long max_offset = 0UL;
    unsigned short byteorder = 0;
    unsigned long heap_start = 0UL;
    unsigned long offset_table_end = 0UL;

    if(inptr)
    {
        if(header)
        {
            if(header->ciff_header)
            {
                ciffheader = header->ciff_header;
                byteorder = ciffheader->byteorder;
                heap_start = fileoffset_base + ciffheader->headerlength;
                if(heaplength)
                    offset_table_end = fileoffset_base + heaplength;
                else if(fseek(inptr,0L,SEEK_END) == 0)
                    offset_table_end = ftell(inptr);
                if(ferror(inptr) == 0)
                {
                    max_offset = process_ciff_dir(inptr,heap_start,offset_table_end,
                                                    ciffheader->subtype,parent_name,
                                                    summary_entry,byteorder,
                                                    level,indent);
                    if(max_offset > 0L)
                        max_offset += 4;
                }
                else
                    fprintf(stderr,"%s: cannot read offset table\n",Progname);
            }
            else
                fprintf(stderr,"%s: null ciffheader to process_ciff()\n",Progname);
        }
        else
            fprintf(stderr,"%s: null fileheader to process_ciff()\n",Progname);
    }
    else
        fprintf(stderr,"%s: no open file pointer to read Print Image data\n",
                Progname);

    return(max_offset);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq $0x0, -0x40(%rbp)
movw $0x0, -0x42(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x2932c
cmpq $0x0, -0x10(%rbp)
je 0x29308
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x292e4
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movw (%rax), %ax
movw %ax, -0x42(%rbp)
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
addq 0x8(%rcx), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x29235
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x2925b
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x3200
cmpl $0x0, %eax
jne 0x29259
movq -0x8(%rbp), %rdi
callq 0x3180
movq %rax, -0x58(%rbp)
jmp 0x2925b
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
jne 0x292c0
movq -0x8(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x38(%rbp), %rcx
addq $0x15, %rcx
movq -0x30(%rbp), %r8
movq -0x28(%rbp), %r9
movw -0x42(%rbp), %r11w
movl 0x10(%rbp), %r10d
movl 0x18(%rbp), %eax
movzwl %r11w, %r11d
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x29360
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jbe 0x292be
movq -0x40(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x40(%rbp)
jmp 0x292e2
movq 0x4dd31(%rip), %rax     # 0x76ff8
movq (%rax), %rdi
leaq 0x4f197(%rip), %rax     # 0x78468
movq (%rax), %rdx
leaq 0x41968(%rip), %rsi     # 0x6ac43
movb $0x0, %al
callq 0x3170
jmp 0x29306
movq 0x4dd0d(%rip), %rax     # 0x76ff8
movq (%rax), %rdi
leaq 0x4f173(%rip), %rax     # 0x78468
movq (%rax), %rdx
leaq 0x41962(%rip), %rsi     # 0x6ac61
movb $0x0, %al
callq 0x3170
jmp 0x2932a
movq 0x4dce9(%rip), %rax     # 0x76ff8
movq (%rax), %rdi
leaq 0x4f14f(%rip), %rax     # 0x78468
movq (%rax), %rdx
leaq 0x41965(%rip), %rsi     # 0x6ac88
movb $0x0, %al
callq 0x3170
jmp 0x2934e
movq 0x4dcc5(%rip), %rax     # 0x76ff8
movq (%rax), %rdi
leaq 0x4f12b(%rip), %rax     # 0x78468
movq (%rax), %rdx
leaq 0x3e71e(%rip), %rsi     # 0x67a65
movb $0x0, %al
callq 0x3170
movq -0x40(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)