// File: /workspace/github_c_makefile_star2_O0/hfiguiere[P]exifprobe/print.c
// Function: print_tiff_header
int
print_tiff_header(unsigned short magic,unsigned short byteorder,unsigned long section_id)
{
    char *name = CNULL;
    int status = -1;
    int chpr = 0;

    if(Print_options & section_id)
    {
        switch(magic)
        {
            case TIFF_MAGIC: name = "TIFF"; break;
            case ORF1_MAGIC: name = "ORF1"; break;
            case ORF2_MAGIC: name = "ORF2"; break;
            case RW2_MAGIC:  name = "RW2"; break;
            default: break;
        }

        if(name)
        {
            chpr += printf("%s",name);
            switch(byteorder)
            {
                case TIFF_INTEL:
                case TIFF_MOTOROLA:
                    print_byteorder(byteorder,1);
                    print_magic((unsigned long)magic,2);
                    status = 0;
                    break;
                default:
                    chpr += printf("INVALID %s BYTEORDER ",name);
                    print_byteorder(byteorder,1);
                    print_magic((unsigned long)magic,2);
                    break;
            }
        }
        else
        {
            chpr += printf("INVALID TIFF IDENTIFIER, byteorder ");
            print_byteorder(byteorder,1);
            print_magic((unsigned long)magic,2);
        }
    }
    else
        status = 0;

    setcharsprinted(chpr);
    return(status);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %si, %ax
movw %di, %cx
movw %cx, -0x2(%rbp)
movw %ax, -0x4(%rbp)
movq %rdx, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x20(%rbp)
leaq 0x71909(%rip), %rax     # 0x77180
movq (%rax), %rax
andq -0x10(%rbp), %rax
cmpq $0x0, %rax
je 0x59c4
movzwl -0x2(%rbp), %eax
movl %eax, -0x24(%rbp)
subl $0x2a, %eax
je 0x58b8
jmp 0x5896
movl -0x24(%rbp), %eax
subl $0x55, %eax
je 0x58df
jmp 0x58a0
movl -0x24(%rbp), %eax
subl $0x4f52, %eax           # imm = 0x4F52
je 0x58c5
jmp 0x58ac
movl -0x24(%rbp), %eax
subl $0x5352, %eax           # imm = 0x5352
je 0x58d2
jmp 0x58ec
leaq 0x620f2(%rip), %rax     # 0x679b1
movq %rax, -0x18(%rbp)
jmp 0x58ee
leaq 0x5e806(%rip), %rax     # 0x640d2
movq %rax, -0x18(%rbp)
jmp 0x58ee
leaq 0x5e7fe(%rip), %rax     # 0x640d7
movq %rax, -0x18(%rbp)
jmp 0x58ee
leaq 0x62728(%rip), %rax     # 0x6800e
movq %rax, -0x18(%rbp)
jmp 0x58ee
jmp 0x58ee
cmpq $0x0, -0x18(%rbp)
je 0x5990
movq -0x18(%rbp), %rsi
leaq 0x5e793(%rip), %rdi     # 0x64097
xorl %eax, %eax
callq 0x3110
movl %eax, %ecx
movl -0x20(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x20(%rbp)
movzwl -0x4(%rbp), %eax
movl %eax, -0x28(%rbp)
subl $0x4949, %eax           # imm = 0x4949
je 0x5931
jmp 0x5925
movl -0x28(%rbp), %eax
subl $0x4d4d, %eax           # imm = 0x4D4D
jne 0x5958
jmp 0x5931
movl $0x1, %esi
movzwl -0x4(%rbp), %edi
callq 0x59e0
movzwl -0x2(%rbp), %eax
movl %eax, %edi
movl $0x2, %esi
callq 0x5ad0
movl $0x0, -0x1c(%rbp)
jmp 0x598e
movq -0x18(%rbp), %rsi
leaq 0x5ebaf(%rip), %rdi     # 0x64512
movb $0x0, %al
callq 0x3110
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl $0x1, %esi
movzwl -0x4(%rbp), %edi
callq 0x59e0
movzwl -0x2(%rbp), %eax
movl %eax, %edi
movl $0x2, %esi
callq 0x5ad0
jmp 0x59c2
leaq 0x5eb91(%rip), %rdi     # 0x64528
movb $0x0, %al
callq 0x3110
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl $0x1, %esi
movzwl -0x4(%rbp), %edi
callq 0x59e0
movzwl -0x2(%rbp), %eax
movl %eax, %edi
movl $0x2, %esi
callq 0x5ad0
jmp 0x59cb
movl $0x0, -0x1c(%rbp)
movl -0x20(%rbp), %edi
callq 0x1ff00
movl -0x1c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)