// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/print_maker.c
// Function: print_scheme
void
print_scheme(FILE *inptr,struct maker_scheme *maker_scheme)
{
    int chpr = 0;

    PUSHCOLOR(HI_BLACK);
    chpr = newline(1);
    chpr += printf("MakerNote Scheme:");
    chpr += printf(" (at offset %lu, length %lu)",maker_scheme->note_fileoffset,
                maker_scheme->note_length);
    chpr = newline(chpr);
    chpr += printf("\tScheme Type = ");
    switch(maker_scheme->scheme_type)
    {
        case PLAIN_IFD_SCHEME:
            chpr += printf("\"Plain IFD\" (%#lx) at offset %lu",maker_scheme->scheme_type,
                        maker_scheme->note_fileoffset);
            chpr = newline(chpr);
            break;
        case HAS_ID_SCHEME:
            chpr += printf("\"ID\" (%#lx)\n",maker_scheme->scheme_type);
            chpr += printf("\tID = \"%s\";",maker_scheme->id[0] ? maker_scheme->id : "(NONE)");
            chpr += printf(" length = %d, at offset %lu\n",maker_scheme->id_length,
                        maker_scheme->note_fileoffset);
            chpr += printf("\tIFD is offset %d from start of section",maker_scheme->ifd_offset);
            chpr = newline(chpr);
            break;
        case HAS_ID_PLUS_TIFFHDR_SCHEME:
            chpr += printf("\"ID plus TIFF header\" (%#lx)\n",maker_scheme->scheme_type);
            chpr += printf("\tID = \"%s\";",maker_scheme->id[0] ? maker_scheme->id : "(NONE)");
            chpr += printf("\tlength = %d, at offset %lu\n",maker_scheme->id_length,
                        maker_scheme->note_fileoffset);
            chpr += printf("\tTIFF header is offset %d from start of section\n",maker_scheme->tiffhdr_offset);
            chpr += printf("\tIFD is offset %d from start of TIFF header",maker_scheme->ifd_offset);
            chpr = newline(chpr);
            break;
        case UNKNOWN_SCHEME:
        default:
            chpr += printf("\"UNKNOWN\" (%#lx)\n",maker_scheme->scheme_type);
            chpr += printf("\tID = \"%s\";",maker_scheme->id[0] ? maker_scheme->id : "(NONE)");
            chpr += printf(" length = %d, at offset %lu",maker_scheme->id_length,
                        maker_scheme->note_fileoffset);
            chpr = newline(chpr);
            break;
    }
    if(maker_scheme->note_byteorder &&
            (maker_scheme->note_byteorder != maker_scheme->tiff_byteorder))
        PUSHCOLOR(HI_RED);

    chpr += printf("\tNote byteorder = ");
    print_byteorder(maker_scheme->note_byteorder,2);
    if(maker_scheme->note_byteorder &&
            (maker_scheme->note_byteorder != maker_scheme->tiff_byteorder))
    {
        chpr += printf(" != ");
        POPCOLOR();
    }
    else
    {
        chpr = newline(chpr);
        chpr += printf("\t");
    }
    chpr += printf("Tiff byteorder = ");
    print_byteorder(maker_scheme->tiff_byteorder,2);
    chpr += newline(chpr);
    switch(maker_scheme->offsets_relative_to)
    {
        case START_OF_TIFFHEADER:
                    chpr += printf("\tOffsets relative to TIFF header at offset %lu",
                                maker_scheme->fileoffset_base);
                    chpr = newline(chpr);
                    break;
        case START_OF_NOTE:
                    PUSHCOLOR(HI_RED);
                    chpr += printf("\tOffsets relative to start of MakerNote");
                    POPCOLOR();
                    chpr += printf(" at offset %lu",maker_scheme->note_fileoffset);
                    chpr += newline(1);
                    break;
        case START_OF_ENTRY:
                    PUSHCOLOR(HI_RED);
                    chpr += printf("\tOffsets relative to start of entry");
                    POPCOLOR();
                    chpr += newline(1);
                    break;
        default: chpr += printf("(UNKNOWN)\n");
                    break;
    }
    chpr += printf("\tNumber of entries = %d",maker_scheme->num_entries);
    chpr = newline(chpr);
    if((maker_scheme->scheme_type != UNKNOWN_SCHEME) && maker_scheme->no_nextifd_offset)
    {
        putchar('\t'); ++chpr;
        PUSHCOLOR(HI_RED);
        chpr += printf("No next IFD offset");
        POPCOLOR();
        chpr += newline(1);
    }
    if(Make_name)
    {
        putchar('\t'); ++chpr;
        chpr += printf("Make = \"%s\"",Make_name);
        chpr += printf("  (maker id = %d)",maker_scheme->make);
        chpr = newline(1);
    }
    if(Model_name)
    {
        putchar('\t'); ++chpr;
        chpr += printf("Model = \"%s\"",Model_name);
        chpr += printf("  (model id = %d)",maker_scheme->model);
        chpr = newline(1);
    }
    if(Software_name)
    {
        putchar('\t'); ++chpr;
        chpr += printf("Software = \"%s\"",Software_name);
        chpr = newline(1);
    }
    putchar('\t'); ++chpr;
    chpr += printf("Note version = %d (tagset = %d)",maker_scheme->note_version,maker_scheme->tagset);

    POPCOLOR();
    chpr = newline(chpr);
    chpr = newline(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
pushq $0x1
popq %rdi
callq 0x160f7
movl %eax, %ebp
leaq 0x2bf52(%rip), %rdi     # 0x44887
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
leaq 0x2bf4c(%rip), %rdi     # 0x44899
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x160f7
movl %eax, %r14d
leaq 0x2bf4f(%rip), %rdi     # 0x448b6
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
addl %r14d, %ebp
movq (%rbx), %rsi
cmpq $0x4, %rsi
je 0x18a17
cmpq $0x2, %rsi
je 0x189aa
cmpq $0x1, %rsi
jne 0x18a95
movq 0x8(%rbx), %rdx
leaq 0x2bf2b(%rip), %rdi     # 0x448c6
pushq $0x1
popq %rsi
xorl %eax, %eax
callq 0x3120
jmp 0x18ae3
leaq 0x2bf36(%rip), %rdi     # 0x448e7
pushq $0x2
popq %rsi
xorl %eax, %eax
callq 0x3120
movl %eax, %r14d
addl %ebp, %r14d
movq 0x18(%rbx), %rax
cmpb $0x0, (%rax)
leaq 0x2bf31(%rip), %rsi     # 0x44900
cmovneq %rax, %rsi
leaq 0x2bf1a(%rip), %rdi     # 0x448f4
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
movl 0x20(%rbx), %esi
movq 0x8(%rbx), %rdx
leaq 0x2bf16(%rip), %rdi     # 0x44907
xorl %eax, %eax
callq 0x3120
movl %eax, %r15d
addl %r14d, %r15d
movl 0x28(%rbx), %esi
leaq 0x2bf1c(%rip), %rdi     # 0x44924
xorl %eax, %eax
callq 0x3120
addl %r15d, %eax
jmp 0x18ae3
leaq 0x2bf2e(%rip), %rdi     # 0x4494c
pushq $0x4
popq %rsi
xorl %eax, %eax
callq 0x3120
movl %eax, %r14d
addl %ebp, %r14d
movq 0x18(%rbx), %rax
cmpb $0x0, (%rax)
leaq 0x2bec4(%rip), %rsi     # 0x44900
cmovneq %rax, %rsi
leaq 0x2bead(%rip), %rdi     # 0x448f4
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
movl 0x20(%rbx), %esi
movq 0x8(%rbx), %rdx
leaq 0x2bf0c(%rip), %rdi     # 0x4496a
xorl %eax, %eax
callq 0x3120
movl %eax, %r15d
addl %r14d, %r15d
movl 0x24(%rbx), %esi
leaq 0x2bf12(%rip), %rdi     # 0x44987
xorl %eax, %eax
callq 0x3120
movl %eax, %r14d
addl %r15d, %r14d
movl 0x28(%rbx), %esi
leaq 0x2bf2c(%rip), %rdi     # 0x449b8
xorl %eax, %eax
callq 0x3120
jmp 0x18ae0
leaq 0x2bf48(%rip), %rdi     # 0x449e4
xorl %eax, %eax
callq 0x3120
movl %eax, %r14d
addl %ebp, %r14d
movq 0x18(%rbx), %rax
cmpb $0x0, (%rax)
leaq 0x2be49(%rip), %rsi     # 0x44900
cmovneq %rax, %rsi
leaq 0x2be32(%rip), %rdi     # 0x448f4
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
movl 0x20(%rbx), %esi
movq 0x8(%rbx), %rdx
leaq 0x2bf1d(%rip), %rdi     # 0x449f6
xorl %eax, %eax
callq 0x3120
addl %r14d, %eax
addl %ebp, %eax
movl %eax, %edi
callq 0x160f7
movl %eax, %r14d
leaq 0x2bf1c(%rip), %rdi     # 0x44a12
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
addl %r14d, %ebp
movzwl 0x52(%rbx), %edi
pushq $0x2
popq %rsi
callq 0x4efd
movzwl 0x52(%rbx), %eax
testw %ax, %ax
je 0x18b1d
cmpw 0x50(%rbx), %ax
jne 0x18b2f
movl %ebp, %edi
callq 0x160f7
movl %eax, %ebp
leaq 0x2d158(%rip), %rdi     # 0x45c85
jmp 0x18b36
leaq 0x2beef(%rip), %rdi     # 0x44a25
xorl %eax, %eax
callq 0x3120
movl %eax, %r14d
leaq 0x2bee3(%rip), %rdi     # 0x44a2a
xorl %eax, %eax
callq 0x3120
movl %eax, %r15d
addl %r14d, %r15d
addl %ebp, %r15d
movzwl 0x50(%rbx), %edi
pushq $0x2
popq %rsi
callq 0x4efd
movl %r15d, %edi
callq 0x160f7
movl %eax, %ebp
addl %r15d, %ebp
movl 0x30(%rbx), %eax
cmpl $0x2, %eax
je 0x18bcc
cmpl $0x1, %eax
je 0x18ba1
testl %eax, %eax
jne 0x18bed
movq 0x48(%rbx), %rsi
leaq 0x2beb0(%rip), %rdi     # 0x44a3c
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x160f7
movl %eax, %r14d
jmp 0x18c01
leaq 0x2bec3(%rip), %rdi     # 0x44a6b
xorl %eax, %eax
callq 0x3120
movl %eax, %r14d
movq 0x8(%rbx), %rsi
leaq 0x2bd1b(%rip), %rdi     # 0x448d8
xorl %eax, %eax
callq 0x3120
movl %eax, %r15d
addl %r14d, %r15d
jmp 0x18bdd
leaq 0x2bec0(%rip), %rdi     # 0x44a93
xorl %eax, %eax
callq 0x3120
movl %eax, %r15d
pushq $0x1
popq %rdi
callq 0x160f7
movl %eax, %r14d
addl %r15d, %r14d
jmp 0x18bfe
leaq 0x2bec3(%rip), %rdi     # 0x44ab7
xorl %eax, %eax
callq 0x3120
movl %eax, %r14d
addl %ebp, %r14d
movl 0x2c(%rbx), %esi
leaq 0x2beb7(%rip), %rdi     # 0x44ac2
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
movl %r14d, %edi
callq 0x160f7
movl %eax, %r14d
cmpq $0x0, (%rbx)
je 0x18c53
cmpl $0x0, 0x34(%rbx)
je 0x18c53
pushq $0x9
popq %rdi
callq 0x3060
leaq 0x2be9f(%rip), %rdi     # 0x44ada
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
pushq $0x1
popq %rdi
callq 0x160f7
addl %eax, %r14d
incl %r14d
leaq 0x3f7d6(%rip), %r15     # 0x58430
cmpq $0x0, (%r15)
je 0x18c95
pushq $0x9
popq %rdi
callq 0x3060
movq (%r15), %rsi
leaq 0x2be7b(%rip), %rdi     # 0x44aed
xorl %eax, %eax
callq 0x3120
movl 0x38(%rbx), %esi
leaq 0x2be76(%rip), %rdi     # 0x44af9
xorl %eax, %eax
callq 0x3120
pushq $0x1
popq %rdi
callq 0x160f7
movl %eax, %r14d
leaq 0x3f79c(%rip), %r15     # 0x58438
cmpq $0x0, (%r15)
je 0x18cd7
pushq $0x9
popq %rdi
callq 0x3060
movq (%r15), %rsi
leaq 0x2be57(%rip), %rdi     # 0x44b0b
xorl %eax, %eax
callq 0x3120
movl 0x3c(%rbx), %esi
leaq 0x2be53(%rip), %rdi     # 0x44b18
xorl %eax, %eax
callq 0x3120
pushq $0x1
popq %rdi
callq 0x160f7
movl %eax, %r14d
leaq 0x3f762(%rip), %r15     # 0x58440
cmpq $0x0, (%r15)
je 0x18d08
pushq $0x9
popq %rdi
callq 0x3060
movq (%r15), %rsi
leaq 0x2be34(%rip), %rdi     # 0x44b2a
xorl %eax, %eax
callq 0x3120
pushq $0x1
popq %rdi
callq 0x160f7
movl %eax, %r14d
pushq $0x9
popq %rdi
callq 0x3060
movl 0x40(%rbx), %esi
movl 0x44(%rbx), %edx
leaq 0x2be1d(%rip), %rdi     # 0x44b3a
xorl %eax, %eax
callq 0x3120
leal (%r14,%rax), %edi
incl %edi
callq 0x160f7
pushq $0x1
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x160f7