// File: /workspace/github_c_makefile_star2_O0/hfiguiere[P]exifprobe/maker_nikon.c
// Function: nikon2_interpret_value
void 
nikon2_interpret_value(struct ifd_entry *entry_ptr)
{
    int chpr = 0;
    
    switch(entry_ptr->tag)
    {
        case 0x0002:    /* CCD Sensitivity (ISO) */
            print_startvalue();
            if(entry_ptr->value & 0xffff)
                chpr += printf("%u",(unsigned short)(entry_ptr->value & 0xffff));
            else if((entry_ptr->value >> 16) & 0xffff)
                chpr += printf("%u",(unsigned short)((entry_ptr->value >> 16) & 0xffff));
            else
                chpr += printf("Auto");
            print_endvalue();
            break;
        case 0x000b:
        case 0x000d:
        case 0x000e:
        case 0x0011:
        case 0x008a:
        case 0x008b:
        case 0x0092:
        case 0x0094:
            /*
            print_startvalue();
            printred("unknown");
            print_endvalue();
            */
            break;
        case 0x0087:    /* Flash Used                                 */
            print_startvalue();
            switch(entry_ptr->value)
            {
                case 0: chpr += printf("did not fire"); break;
                case 8: chpr += printf("fired, commander mode"); break;
                case 9: chpr += printf("fired, TTL mode"); break;
                default: printred("undefined"); break;
            }
            print_endvalue();
            break;
        case 0x0088:    /* Auto Focus Position                    */
#if 0
            print_startvalue();
            /* updated from PHP Metadata Toolkit & exiftool           */
            /* ###%%% don't think these are right:                    */
            /* The two sources conflict.                              */
            /* AFPosition can be tied to metering, which isn't        */
            /* mentioned... There are 4 bytes here that might have    */
            /* significance. Hold off on this. Asterisk the tag.      */
            switch(entry_ptr->value & 0xff)
            {
                case 0:
                    chpr += printf("Single area - ");
                    break;
                case 0x1:
                    chpr += printf("Dynamic area - ");
                    break;
                case 0x2:
                    chpr += printf("Closest subject - ");
                    break;
                default:
                    printred("undefined area -");
                    break;
            }
#endif
            /* It appears that this byte describes autofocus          */
            /* position.                                              */
            /* It is not clear what the other bytes are for.          */
            /* Possibilities are:                                     */
            /*     metering lock to the focus area                    */
            /*     auto vs manual focus area select or "off"          */
            /*     continuous AF vs single AF                         */
            /*     auto focus on closest subject                      */
            /*     actual area used                                   */
            /* ...what *is* "dynamic area"?                           */
            print_startvalue();
            switch((entry_ptr->value >> 8) & 0xff)
            {
                case 0:
                    chpr += printf("Center");
                    break;
                case 0x1:
                    chpr += printf("Top");
                    break;
                case 0x2:
                    chpr += printf("Bottom");
                    break;
                case 0x3:
                    chpr += printf("Left");
                    break;
                case 0x4:
                    chpr += printf("Right");
                    break;
                default:
                    printred("undefined");
                    break;
            }
            print_endvalue();
            break;
        case 0x0089:    /* Shooting Mode */
            print_startvalue();
            switch(entry_ptr->value & 0x3)
            {
                case 0: chpr += printf("single frame"); break;
                case 1: chpr += printf("continuous"); break;
                case 2: chpr += printf("timer"); break;
                case 3: chpr += printf("remote timer?"); break;
                case 4: chpr += printf("remote?"); break;
                default: chpr += printf("(undefined)"); break;
            }
            if(entry_ptr->value & 0x8)
                chpr += printf(", bracketing on");
            else
                chpr += printf(", bracketing off");
            if(entry_ptr->value & 0x20)
                chpr += printf(", WB bracketing on");
            else
                chpr += printf(", WB bracketing off");
            print_endvalue();
            break;
        default:
            break;
    }
    setcharsprinted(chpr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x10(%rbp)
subl $0x2, %eax
je 0x3eb6b
jmp 0x3ead8
movl -0x10(%rbp), %eax
subl $0xb, %eax
je 0x3ec12
jmp 0x3eae6
movl -0x10(%rbp), %eax
addl $-0xd, %eax
subl $0x2, %eax
jb 0x3ec12
jmp 0x3eaf7
movl -0x10(%rbp), %eax
subl $0x11, %eax
je 0x3ec12
jmp 0x3eb05
movl -0x10(%rbp), %eax
subl $0x87, %eax
je 0x3ec17
jmp 0x3eb15
movl -0x10(%rbp), %eax
subl $0x88, %eax
je 0x3eca3
jmp 0x3eb25
movl -0x10(%rbp), %eax
subl $0x89, %eax
je 0x3ed5a
jmp 0x3eb35
movl -0x10(%rbp), %eax
addl $0xffffff76, %eax       # imm = 0xFFFFFF76
subl $0x2, %eax
jb 0x3ec12
jmp 0x3eb48
movl -0x10(%rbp), %eax
subl $0x92, %eax
je 0x3ec12
jmp 0x3eb58
movl -0x10(%rbp), %eax
subl $0x94, %eax
je 0x3ec12
jmp 0x3ee91
movb $0x0, %al
callq 0xb9a0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpq $0x0, %rax
je 0x3ebad
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
andq $0xffff, %rax           # imm = 0xFFFF
movzwl %ax, %esi
leaq 0x28a91(%rip), %rdi     # 0x6762f
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3ec06
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
shrq $0x10, %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpq $0x0, %rax
je 0x3ebf0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
shrq $0x10, %rax
andq $0xffff, %rax           # imm = 0xFFFF
movzwl %ax, %esi
leaq 0x28a4e(%rip), %rdi     # 0x6762f
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3ec04
leaq 0x2f1c3(%rip), %rdi     # 0x6ddba
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3ec06
movb $0x0, %al
callq 0xb9d0
jmp 0x3ee93
jmp 0x3ee93
xorl %eax, %eax
callq 0xb9a0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
testq %rax, %rax
je 0x3ec49
jmp 0x3ec31
movq -0x18(%rbp), %rax
subq $0x8, %rax
je 0x3ec5f
jmp 0x3ec3d
movq -0x18(%rbp), %rax
subq $0x9, %rax
je 0x3ec75
jmp 0x3ec8b
leaq 0x30999(%rip), %rdi     # 0x6f5e9
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3ec97
leaq 0x2dfa0(%rip), %rdi     # 0x6cc06
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3ec97
leaq 0x2dfa0(%rip), %rdi     # 0x6cc1c
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3ec97
leaq 0x2c979(%rip), %rdi     # 0x6b60b
callq 0x6860
movb $0x0, %al
callq 0xb9d0
jmp 0x3ee93
xorl %eax, %eax
callq 0xb9a0
movq -0x8(%rbp), %rax
movzbl 0x11(%rax), %eax
movq %rax, -0x20(%rbp)
subq $0x4, %rax
ja 0x3ed42
movq -0x20(%rbp), %rax
leaq 0x2dadd(%rip), %rcx     # 0x6c7a8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x3183e(%rip), %rdi     # 0x70519
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3ed4e
leaq 0x2e1bb(%rip), %rdi     # 0x6ceac
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3ed4e
leaq 0x2e1b1(%rip), %rdi     # 0x6ceb8
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3ed4e
leaq 0x3118f(%rip), %rdi     # 0x6feac
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3ed4e
leaq 0x31161(%rip), %rdi     # 0x6fe94
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3ed4e
leaq 0x2c8c2(%rip), %rdi     # 0x6b60b
callq 0x6860
movb $0x0, %al
callq 0xb9d0
jmp 0x3ee93
xorl %eax, %eax
callq 0xb9a0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
andl $0x3, %eax
movq %rax, -0x28(%rbp)
subq $0x4, %rax
ja 0x3edfc
movq -0x28(%rbp), %rax
leaq 0x2da0f(%rip), %rcx     # 0x6c794
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2de97(%rip), %rdi     # 0x6cc2c
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3ee10
leaq 0x2c253(%rip), %rdi     # 0x6affe
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3ee10
leaq 0x30881(%rip), %rdi     # 0x6f642
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3ee10
leaq 0x2de62(%rip), %rdi     # 0x6cc39
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3ee10
leaq 0x2de5a(%rip), %rdi     # 0x6cc47
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3ee10
leaq 0x2de4c(%rip), %rdi     # 0x6cc4f
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
andq $0x8, %rax
cmpq $0x0, %rax
je 0x3ee38
leaq 0x2de32(%rip), %rdi     # 0x6cc5b
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3ee4c
leaq 0x2de2c(%rip), %rdi     # 0x6cc6b
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
andq $0x20, %rax
cmpq $0x0, %rax
je 0x3ee74
leaq 0x2de17(%rip), %rdi     # 0x6cc7c
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3ee88
leaq 0x2de14(%rip), %rdi     # 0x6cc8f
movb $0x0, %al
callq 0x3110
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movb $0x0, %al
callq 0xb9d0
jmp 0x3ee93
jmp 0x3ee93
movl -0xc(%rbp), %edi
callq 0x1ff00
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)