// File: /workspace/github_c_makefile_star2_O0/hfiguiere[P]exifprobe/x3f.c
// Function: process_x3f
unsigned long
process_x3f(FILE *inptr,struct fileheader *header,unsigned long fileoffset_base,
                                        struct image_summary *summary_entry,
                                        char *parent_name,int level,int indent)
{
    struct x3f_header *x3fheader;
    unsigned long max_offset = 0UL;
    unsigned short byteorder = 0;
    unsigned long directory_pointer = 0UL;

    if(inptr)
    {
        if(header)
        {
            if(header->x3f_header)
            {
                x3fheader = header->x3f_header;
                /* X3F is always little-endian; nonetheless, pass it  */
                /* as an argument to lower-level functions. Just set  */
                /* it here.                                           */
                byteorder = TIFF_INTEL;
                if(fseek(inptr,-4L,SEEK_END) == 0)
                    directory_pointer = ftell(inptr);
                if(ferror(inptr) == 0)
                {
                    max_offset = process_x3f_dir(inptr,byteorder,x3fheader,
                                                    directory_pointer,summary_entry,
                                                    parent_name,level,indent);
                    if(max_offset > 0L)
                        max_offset += 4;
                }
                else
                    fprintf(stderr,"%s: cannot read directory offset\n",Progname);
            }
            else
                fprintf(stderr,"%s: null x3fheader to process_x3f()\n",Progname);
        }
        else
            fprintf(stderr,"%s: null fileheader to process_x3f()\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 $0x60, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq $0x0, -0x40(%rbp)
movw $0x0, -0x42(%rbp)
movq $0x0, -0x50(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3ab39
cmpq $0x0, -0x10(%rbp)
je 0x3ab15
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x3aaf1
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x38(%rbp)
movw $0x4949, -0x42(%rbp)    # imm = 0x4949
movq -0x8(%rbp), %rdi
movq $-0x4, %rsi
movl $0x2, %edx
callq 0x3200
cmpl $0x0, %eax
jne 0x3aa77
movq -0x8(%rbp), %rdi
callq 0x3180
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
jne 0x3aacd
movq -0x8(%rbp), %rdi
movw -0x42(%rbp), %si
movq -0x38(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
movl -0x2c(%rbp), %r10d
movl 0x10(%rbp), %eax
movzwl %si, %esi
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x3ab70
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jbe 0x3aacb
movq -0x40(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x40(%rbp)
jmp 0x3aaef
movq 0x3c524(%rip), %rax     # 0x76ff8
movq (%rax), %rdi
leaq 0x3d98a(%rip), %rax     # 0x78468
movq (%rax), %rdx
leaq 0x3174a(%rip), %rsi     # 0x6c232
movb $0x0, %al
callq 0x3170
jmp 0x3ab13
movq 0x3c500(%rip), %rax     # 0x76ff8
movq (%rax), %rdi
leaq 0x3d966(%rip), %rax     # 0x78468
movq (%rax), %rdx
leaq 0x31748(%rip), %rsi     # 0x6c254
movb $0x0, %al
callq 0x3170
jmp 0x3ab37
movq 0x3c4dc(%rip), %rax     # 0x76ff8
movq (%rax), %rdi
leaq 0x3d942(%rip), %rax     # 0x78468
movq (%rax), %rdx
leaq 0x31749(%rip), %rsi     # 0x6c279
movb $0x0, %al
callq 0x3170
jmp 0x3ab5b
movq 0x3c4b8(%rip), %rax     # 0x76ff8
movq (%rax), %rdi
leaq 0x3d91e(%rip), %rax     # 0x78468
movq (%rax), %rdx
leaq 0x2cf11(%rip), %rsi     # 0x67a65
movb $0x0, %al
callq 0x3170
movq -0x40(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)