// File: /workspace/github_c_makefile_star2_O0/hfiguiere[P]exifprobe/x3f.c
// Function: print_x3f_header
int
print_x3f_header(FILE *inptr,struct fileheader *header,unsigned long section_id)
{
    struct x3f_header *x3fheader = NULL;
    int status = -1;
    int chpr = 0;
    int i;

    if(header)
    {
        if(header->x3f_header)
        {
            x3fheader = header->x3f_header;
            if(header->probe_magic == PROBE_X3FMAGIC)
            {
                if(Print_options & section_id)
                {
                    chpr += printf("%4.4s (%#06lx) version %2u.%-2u, id ",
                                            (char *)&(x3fheader->magic),
                                                    x3fheader->magic,
                                                    x3fheader->version_major,
                                                    x3fheader->version_minor);
                    chpr += printf("%#02x ",x3fheader->unique_id[0] & 0xff);
                    for(i = 0; i < 16; ++i)
                        chpr += printf("%02x ",x3fheader->unique_id[i] & 0xff);
                    chpr = newline(chpr);
                    if(x3fheader->version_minor >= 1)
                    {
                        print_tag_address(ENTRY,24,MEDIUMINDENT,"@");
                        if((PRINT_TAGINFO))
                        {
                            if((PRINT_LONGNAMES))
                                chpr += printf("X3f.Header.");
                            chpr += printf("MarkBits");
                            if((PRINT_VALUE))
                            {
                                putindent(X3FTAGWIDTH - 8);
                                chpr += printf(" = ");
                            }
                        }
                        if((PRINT_VALUE))
                            chpr += printf("%#06lx",x3fheader->mark_bits);
                        chpr = newline(chpr);
                    }
                    print_tag_address(ENTRY,28,MEDIUMINDENT,"@");
                    if((PRINT_TAGINFO))
                    {
                        if((PRINT_LONGNAMES))
                            chpr += printf("X3f.Header.");
                        chpr += printf("ImageWidth");
                        if((PRINT_VALUE))
                        {
                            putindent(X3FTAGWIDTH - 10);
                            chpr += printf(" = ");
                        }
                    }
                    if((PRINT_VALUE))
                        chpr += printf("%lu",x3fheader->image_width);
                    chpr = newline(chpr);
                    print_tag_address(ENTRY,32,MEDIUMINDENT,"@");
                    if((PRINT_TAGINFO))
                    {
                        if((PRINT_LONGNAMES))
                            chpr += printf("X3f.Header.");
                        chpr += printf("ImageHeight");
                        if((PRINT_VALUE))
                        {
                            putindent(X3FTAGWIDTH - 11);
                            chpr += printf(" = ");
                        }
                    }
                    if((PRINT_VALUE))
                        chpr += printf("%lu",x3fheader->image_height);
                    chpr = newline(chpr);
                    print_tag_address(ENTRY,36,MEDIUMINDENT,"@");
                    if((PRINT_TAGINFO))
                    {
                        if((PRINT_LONGNAMES))
                            chpr += printf("X3f.Header.");
                        chpr += printf("ImageRotation");
                        if((PRINT_VALUE))
                        {
                            putindent(X3FTAGWIDTH - 13);
                            chpr += printf(" = ");
                        }
                    }
                    if((PRINT_VALUE))
                        chpr += printf("%lu",x3fheader->image_rotation);
                    chpr = newline(chpr);
                    if(x3fheader->version_minor >= 1)
                    {
                        print_tag_address(ENTRY,40,MEDIUMINDENT,"@");
                        if((PRINT_TAGINFO))
                        {
                            if((PRINT_LONGNAMES))
                                chpr += printf("X3f.Header.");
                            chpr += printf("WhiteBalance");
                            if((PRINT_VALUE))
                            {
                                putindent(X3FTAGWIDTH - 12);
                                chpr += printf(" = ");
                            }
                        }
                        if((PRINT_VALUE))
                            show_string(x3fheader->white_balance,32,0);
                        chpr = newline(chpr);
                        print_tag_address(ENTRY,72,MEDIUMINDENT,"@");
                        if((PRINT_TAGINFO))
                        {
                            if((PRINT_LONGNAMES))
                                chpr += printf("X3f.Header.");
                            chpr += printf("ExtendedDataTypes");
                            if((PRINT_VALUE))
                            {
                                putindent(X3FTAGWIDTH - 17);
                                chpr += printf(" = ");
                            }
                        }
                        if((PRINT_VALUE))
                            print_ubytes(inptr,32,72);
                        chpr = newline(chpr);
                        print_tag_address(ENTRY,104,MEDIUMINDENT,"@");
                        if((PRINT_TAGINFO))
                        {
                            if((PRINT_LONGNAMES))
                                chpr += printf("X3f.Header.");
                            chpr += printf("ExtendedDataValues");
                            if((PRINT_VALUE))
                            {
                                putindent(X3FTAGWIDTH - 19);
                                chpr += printf(" = ");
                            }
                        }
                        if((PRINT_VALUE))
                            print_ulong(inptr,32,TIFF_INTEL,104);
                        chpr = newline(chpr);
                    }
                    print_tag_address(SECTION,104 + 128 - 1,0,"@");
                    chpr += printf("</END OF HEADER>");
                    chpr = newline(chpr);
                }
                status = 0;
            }
            else if(Print_options & section_id)
            {
                    chpr += printf("INVALID X3F IDENTIFIER ");
                    print_magic(header->probe_magic,4);
            }
        }
        else
            fprintf(stderr,"%s: null x3fheader to print_x3f_header()\n",Progname);
    }
    else
        fprintf(stderr,"%s: null fileheader to print_x3f_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 %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movl $0xffffffff, -0x24(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3a9a9
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x3a985
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x62564f46, 0x8(%rax)  # imm = 0x62564F46
jne 0x3a947
leaq 0x3cf37(%rip), %rax     # 0x77180
movq (%rax), %rax
andq -0x18(%rbp), %rax
cmpq $0x0, %rax
je 0x3a93e
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movq -0x20(%rbp), %rax
movzwl 0xa(%rax), %ecx
movq -0x20(%rbp), %rax
movzwl 0x8(%rax), %r8d
leaq 0x31ec3(%rip), %rdi     # 0x6c140
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movsbl 0xc(%rax), %esi
andl $0xff, %esi
leaq 0x31ec6(%rip), %rdi     # 0x6c165
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
cmpl $0x10, -0x2c(%rbp)
jge 0x3a2eb
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movsbl 0xc(%rax,%rcx), %esi
andl $0xff, %esi
leaq 0x2a702(%rip), %rdi     # 0x649d5
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3a2b3
movl -0x28(%rbp), %edi
callq 0x1ef50
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzwl 0x8(%rax), %eax
cmpl $0x1, %eax
jl 0x3a3e3
movl $0x4003333, %edi        # imm = 0x4003333
movl $0x18, %esi
movl $0x4, %edx
leaq 0x29dbf(%rip), %rcx     # 0x640dc
callq 0x5ed0
leaq 0x3ce57(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x3a3a8
leaq 0x3ce41(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x3a360
leaq 0x31e19(%rip), %rdi     # 0x6c16c
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x31e11(%rip), %rdi     # 0x6c178
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x3ce05(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x3a3a6
movl $0xa, %edi
callq 0x60e0
leaq 0x3297f(%rip), %rdi     # 0x6cd18
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x3a3a8
leaq 0x3cdd1(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x3a3d8
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rsi
leaq 0x2a119(%rip), %rdi     # 0x644e4
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %edi
callq 0x1ef50
movl %eax, -0x28(%rbp)
movl $0x4003333, %edi        # imm = 0x4003333
movl $0x1c, %esi
movl $0x4, %edx
leaq 0x29ce3(%rip), %rcx     # 0x640dc
callq 0x5ed0
leaq 0x3cd7b(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x3a484
leaq 0x3cd65(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x3a43c
leaq 0x31d3d(%rip), %rdi     # 0x6c16c
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x361df(%rip), %rdi     # 0x70622
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x3cd29(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x3a482
movl $0x8, %edi
callq 0x60e0
leaq 0x328a3(%rip), %rdi     # 0x6cd18
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x3a484
leaq 0x3ccf5(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x3a4b4
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rsi
leaq 0x309f9(%rip), %rdi     # 0x6aea0
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %edi
callq 0x1ef50
movl %eax, -0x28(%rbp)
movl $0x4003333, %edi        # imm = 0x4003333
movl $0x20, %esi
movl $0x4, %edx
leaq 0x29c07(%rip), %rcx     # 0x640dc
callq 0x5ed0
leaq 0x3cc9f(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x3a560
leaq 0x3cc89(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x3a518
leaq 0x31c61(%rip), %rdi     # 0x6c16c
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x36115(%rip), %rdi     # 0x70634
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x3cc4d(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x3a55e
movl $0x7, %edi
callq 0x60e0
leaq 0x327c7(%rip), %rdi     # 0x6cd18
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x3a560
leaq 0x3cc19(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x3a590
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rsi
leaq 0x3091d(%rip), %rdi     # 0x6aea0
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %edi
callq 0x1ef50
movl %eax, -0x28(%rbp)
movl $0x4003333, %edi        # imm = 0x4003333
movl $0x24, %esi
movl $0x4, %edx
leaq 0x29b2b(%rip), %rcx     # 0x640dc
callq 0x5ed0
leaq 0x3cbc3(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x3a63c
leaq 0x3cbad(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x3a5f4
leaq 0x31b85(%rip), %rdi     # 0x6c16c
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x31b86(%rip), %rdi     # 0x6c181
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x3cb71(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x3a63a
movl $0x5, %edi
callq 0x60e0
leaq 0x326eb(%rip), %rdi     # 0x6cd18
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x3a63c
leaq 0x3cb3d(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x3a66c
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rsi
leaq 0x30841(%rip), %rdi     # 0x6aea0
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %edi
callq 0x1ef50
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzwl 0x8(%rax), %eax
cmpl $0x1, %eax
jl 0x3a907
movl $0x4003333, %edi        # imm = 0x4003333
movl $0x28, %esi
movl $0x4, %edx
leaq 0x29a3e(%rip), %rcx     # 0x640dc
callq 0x5ed0
leaq 0x3cad6(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x3a729
leaq 0x3cac0(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x3a6e1
leaq 0x31a98(%rip), %rdi     # 0x6c16c
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x2b30b(%rip), %rdi     # 0x659f3
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x3ca84(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x3a727
movl $0x6, %edi
callq 0x60e0
leaq 0x325fe(%rip), %rdi     # 0x6cd18
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x3a729
leaq 0x3ca50(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x3a751
movq -0x20(%rbp), %rdi
addq $0x40, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0xb600
movl -0x28(%rbp), %edi
callq 0x1ef50
movl %eax, -0x28(%rbp)
movl $0x4003333, %edi        # imm = 0x4003333
movl $0x48, %esi
movl $0x4, %edx
leaq 0x2996a(%rip), %rcx     # 0x640dc
callq 0x5ed0
leaq 0x3ca02(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x3a7fd
leaq 0x3c9ec(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x3a7b5
leaq 0x319c4(%rip), %rdi     # 0x6c16c
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x319d3(%rip), %rdi     # 0x6c18f
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x3c9b0(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x3a7fb
movl $0x1, %edi
callq 0x60e0
leaq 0x3252a(%rip), %rdi     # 0x6cd18
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x3a7fd
leaq 0x3c97c(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x3a824
movq -0x8(%rbp), %rdi
movl $0x20, %esi
movl $0x48, %edx
callq 0x9110
movl -0x28(%rbp), %edi
callq 0x1ef50
movl %eax, -0x28(%rbp)
movl $0x4003333, %edi        # imm = 0x4003333
movl $0x68, %esi
movl $0x4, %edx
leaq 0x29897(%rip), %rcx     # 0x640dc
callq 0x5ed0
leaq 0x3c92f(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x3a8d0
leaq 0x3c919(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x3a888
leaq 0x318f1(%rip), %rdi     # 0x6c16c
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x31912(%rip), %rdi     # 0x6c1a1
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x3c8dd(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x3a8ce
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x60e0
leaq 0x32457(%rip), %rdi     # 0x6cd18
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x3a8d0
leaq 0x3c8a9(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x3a8fc
movq -0x8(%rbp), %rdi
movl $0x20, %esi
movl $0x4949, %edx           # imm = 0x4949
movl $0x68, %ecx
callq 0x9df0
movl -0x28(%rbp), %edi
callq 0x1ef50
movl %eax, -0x28(%rbp)
movl $0x40000, %edi          # imm = 0x40000
movl $0xe7, %esi
xorl %edx, %edx
leaq 0x297c2(%rip), %rcx     # 0x640dc
callq 0x5ed0
leaq 0x3188e(%rip), %rdi     # 0x6c1b4
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %edi
callq 0x1ef50
movl %eax, -0x28(%rbp)
movl $0x0, -0x24(%rbp)
jmp 0x3a983
leaq 0x3c832(%rip), %rax     # 0x77180
movq (%rax), %rax
andq -0x18(%rbp), %rax
cmpq $0x0, %rax
je 0x3a981
leaq 0x31863(%rip), %rdi     # 0x6c1c5
movb $0x0, %al
callq 0x3110
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x4, %esi
callq 0x5ad0
jmp 0x3a983
jmp 0x3a9a7
movq 0x3c66c(%rip), %rax     # 0x76ff8
movq (%rax), %rdi
leaq 0x3dad2(%rip), %rax     # 0x78468
movq (%rax), %rdx
leaq 0x3183d(%rip), %rsi     # 0x6c1dd
movb $0x0, %al
callq 0x3170
jmp 0x3a9cb
movq 0x3c648(%rip), %rax     # 0x76ff8
movq (%rax), %rdi
leaq 0x3daae(%rip), %rax     # 0x78468
movq (%rax), %rdx
leaq 0x31843(%rip), %rsi     # 0x6c207
movb $0x0, %al
callq 0x3170
movl -0x28(%rbp), %edi
callq 0x1ef50
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop