// File: /workspace/github_c_makefile_star2_O0/hfiguiere[P]exifprobe/print.c
// Function: print_header
int
print_header(struct fileheader *header,unsigned long section_id)
{
    int status = -1;
    int chpr = 0;

    if(header)
    {
        switch(header->probe_magic)
        {
        case JPEG_SOI:
            if(Print_options & section_id)
                chpr += printf("JPEG SOI %#06x",header->file_marker);
            status = 0;
            chpr = newline(chpr);
            break;
        case ORF1_MAGIC:
            status = print_tiff_header(ORF1_MAGIC,header->file_marker,section_id);
            /* no newline                                             */
            break;
        case ORF2_MAGIC:
            status = print_tiff_header(ORF2_MAGIC,header->file_marker,section_id);
            /* no newline                                             */
            break;
        case RW2_MAGIC:
            status = print_tiff_header(RW2_MAGIC,header->file_marker,section_id);
            /* no newline                                             */
            break;
        case TIFF_MAGIC:
            status = print_tiff_header(TIFF_MAGIC,header->file_marker,section_id);
            /* no newline                                             */
            break;
        case PROBE_CIFFMAGIC:
            status = print_ciff_header(header,section_id);
            chpr = newline(chpr);
            break;
        case PROBE_JP2MAGIC:
            status = print_jp2_header(header,section_id);
            chpr = newline(chpr);
            break;
        case PROBE_MRWMAGIC:
            status = print_mrw_header(header,section_id);
            chpr = newline(chpr);
            break;
        case PROBE_RAFMAGIC:
            chpr = printf("FUJIFILMCCD-RAW ");
            chpr = newline(chpr);
            break;
        default:
            if(Print_options & section_id)
                chpr += printf("UNKNOWN HEADER MAGIC %#06lx",header->probe_magic);
            chpr = newline(chpr);
            break;
        }
    }
    else
        fprintf(stderr,"%s: null fileheader to print_header()\n",Progname);
    return(status);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x5807
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
subq $0x1a, %rax
je 0x5752
jmp 0x5601
movq -0x20(%rbp), %rax
subq $0x2a, %rax
je 0x5732
jmp 0x5611
movq -0x20(%rbp), %rax
subq $0x55, %rax
je 0x5712
jmp 0x5621
movq -0x20(%rbp), %rax
subq $0x4655, %rax           # imm = 0x4655
je 0x57ac
jmp 0x5633
movq -0x20(%rbp), %rax
subq $0x4f52, %rax           # imm = 0x4F52
je 0x56d2
jmp 0x5645
movq -0x20(%rbp), %rax
subq $0x5352, %rax           # imm = 0x5352
je 0x56f2
jmp 0x5657
movq -0x20(%rbp), %rax
subq $0xffd8, %rax           # imm = 0xFFD8
je 0x568c
jmp 0x5665
movq -0x20(%rbp), %rax
subq $0x4d524d, %rax         # imm = 0x4D524D
je 0x578f
jmp 0x5677
movq -0x20(%rbp), %rax
subq $0xd0a870a, %rax        # imm = 0xD0A870A
je 0x5772
jmp 0x57ca
leaq 0x71aed(%rip), %rax     # 0x77180
movq (%rax), %rax
andq -0x10(%rbp), %rax
cmpq $0x0, %rax
je 0x56bb
movq -0x8(%rbp), %rax
movzwl (%rax), %esi
leaq 0x5ee12(%rip), %rdi     # 0x644c0
movb $0x0, %al
callq 0x3110
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x18(%rbp), %edi
callq 0x1ef50
movl %eax, -0x18(%rbp)
jmp 0x5805
movq -0x8(%rbp), %rax
movw (%rax), %ax
movq -0x10(%rbp), %rdx
movl $0x4f52, %edi           # imm = 0x4F52
movzwl %ax, %esi
callq 0x5840
movl %eax, -0x14(%rbp)
jmp 0x5805
movq -0x8(%rbp), %rax
movw (%rax), %ax
movq -0x10(%rbp), %rdx
movl $0x5352, %edi           # imm = 0x5352
movzwl %ax, %esi
callq 0x5840
movl %eax, -0x14(%rbp)
jmp 0x5805
movq -0x8(%rbp), %rax
movw (%rax), %ax
movq -0x10(%rbp), %rdx
movl $0x55, %edi
movzwl %ax, %esi
callq 0x5840
movl %eax, -0x14(%rbp)
jmp 0x5805
movq -0x8(%rbp), %rax
movw (%rax), %ax
movq -0x10(%rbp), %rdx
movl $0x2a, %edi
movzwl %ax, %esi
callq 0x5840
movl %eax, -0x14(%rbp)
jmp 0x5805
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2e260
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %edi
callq 0x1ef50
movl %eax, -0x18(%rbp)
jmp 0x5805
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2e730
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %edi
callq 0x1ef50
movl %eax, -0x18(%rbp)
jmp 0x5805
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x35500
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %edi
callq 0x1ef50
movl %eax, -0x18(%rbp)
jmp 0x5805
leaq 0x5e9c6(%rip), %rdi     # 0x64179
movb $0x0, %al
callq 0x3110
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %edi
callq 0x1ef50
movl %eax, -0x18(%rbp)
jmp 0x5805
leaq 0x719af(%rip), %rax     # 0x77180
movq (%rax), %rax
andq -0x10(%rbp), %rax
cmpq $0x0, %rax
je 0x57fa
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x5ece2(%rip), %rdi     # 0x644cf
movb $0x0, %al
callq 0x3110
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %edi
callq 0x1ef50
movl %eax, -0x18(%rbp)
jmp 0x5829
movq 0x717ea(%rip), %rax     # 0x76ff8
movq (%rax), %rdi
leaq 0x72c50(%rip), %rax     # 0x78468
movq (%rax), %rdx
leaq 0x5ecc9(%rip), %rsi     # 0x644eb
movb $0x0, %al
callq 0x3170
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)