// File: /workspace/github_c_makefile_star2_O0/hfiguiere[P]exifprobe/maker_olympus.c
// Function: olympus1_offset_makervalue
void
olympus1_offset_makervalue(FILE *inptr,unsigned short byteorder,
    struct ifd_entry *entry_ptr,unsigned long fileoffset_base,
    struct image_summary *summary_entry,char *parent_name,char*prefix,
    int indent,int make,int model,int at_offset)
{
    unsigned long value_offset,max_offset;
    unsigned long dumplength;
    unsigned long count;
    unsigned short marker;
    char *nameoftag;
    char *fulldirname = CNULL;
    int status = 0;
    int chpr = 0;

    if(entry_ptr)
    {
        nameoftag = maker_tagname(entry_ptr->tag,make,model); 
        if((PRINT_LONGNAMES))
        {
            fulldirname = splice(parent_name,".",nameoftag);
            nameoftag = fulldirname;
        }
        value_offset = fileoffset_base + entry_ptr->value;
        count = entry_ptr->count;
        switch(entry_ptr->tag)
        {
            case 0x0209:    /* CameraId                               */
                if(at_offset)
                {
                    print_tag_address(ENTRY,value_offset,indent,prefix);
                    print_makertagid(entry_ptr,MAKERTAGWIDTH," = ",make,model);
                }
                if((PRINT_VALUE))
                    print_ascii(inptr,entry_ptr->count,value_offset);
                break;
            case 0x0100: /* JPEG Thumbnail in TIFF MakerNote          */
                if(at_offset && (PRINT_SECTION))
                {
                    print_tag_address(VALUE_AT_OFFSET,value_offset,indent,prefix);
                    chpr += printf("# Start of JPEG Thumbnail from MakerNote");
                    chpr += printf(" length %lu",count); 
                }
                else if(!at_offset && (PRINT_VALUE))
                {
                    if(!(PRINT_OFFSET))
                        chpr += printf("@%lu:%-9lu",value_offset,entry_ptr->count);
                    else
                        chpr += printf(":%-9lu", entry_ptr->count);
                    if(!(PRINT_VALUE_AT_OFFSET))
                        chpr += printf(" # UNDEFINED");
                }
                if((PRINT_SECTION) || (PRINT_SEGMENT))
                    chpr = newline(chpr);
                marker = read_ushort(inptr,TIFF_MOTOROLA,value_offset);
                setcharsprinted(chpr);
                chpr = 0;
                max_offset = process_jpeg_segments(inptr,value_offset,marker,
                                    count,summary_entry,fulldirname,
                                    prefix,indent+SMALLINDENT);
                if(at_offset)
                {
                    if((PRINT_SECTION))
                    {
                        if((status = jpeg_status(0) == JPEG_EARLY_EOI))
                            chpr = newline(chpr);
                        jpeg_status(status);
                        print_tag_address(VALUE_AT_OFFSET,value_offset + count - 1,
                                                    indent,"-");
                        chpr += printf("# End of JPEG Thumbnail from MakerNote");
                        if((PRINT_ENTRY) && !(PRINT_VALUE))
                            chpr = newline(chpr);
                    }
                }
                print_jpeg_status();
                if(marker && summary_entry)
                { 
                    /* The new one is on the end of the chain         */
                    if((summary_entry = last_summary_entry(summary_entry)))
                    {
                        summary_entry->filesubformat |= FILESUBFMT_MNOTE;
                        summary_entry->datatype = MAKER_IFD;
                        summary_entry->subfiletype = THUMBNAIL_TYPE;
                    }
                }
                /* make certain we're at the end                      */
                clearerr(inptr);
                fseek(inptr,value_offset + count,SEEK_SET);
                break;
            case 0x0f00: /* Data                                      */
                if(at_offset && (PRINT_ENTRY))
                {
                    print_tag_address(ENTRY,value_offset,indent,prefix);
                    print_makertagid(entry_ptr,MAKERTAGWIDTH," : ",make,model);
                    chpr += printf("length %-9lu # UNDEFINED", count);
                }
                else if(!at_offset && (PRINT_VALUE))
                {
                    if(!(PRINT_OFFSET))
                        chpr += printf("@%lu:%-9lu",value_offset,entry_ptr->count);
                    else
                        chpr += printf(":%-9lu", entry_ptr->count);
                    if(!(PRINT_VALUE_AT_OFFSET))
                        chpr += printf(" # UNDEFINED");
                }
                if(Max_undefined == 0)
                {
                    if(chpr)
                        printred(" (not dumped, use -U)");
                }
                else
                {
                    if((Max_undefined == DUMPALL) || (Max_undefined > count))
                        dumplength = count;
                    else 
                        dumplength = Max_undefined;
                    chpr = newline(chpr);
                    hexdump(inptr,value_offset,count,dumplength,12,
                                indent,SUBINDENT);
                    chpr = newline(1);
                }
                /* make certain we're at the end                      */
                fseek(inptr,value_offset + count,SEEK_SET);
                break;
            case 0x2010:    /* Private IFD's all                      */
            case 0x2020:
            case 0x2030:
            case 0x2040:
            case 0x2050:
                if(!at_offset && (PRINT_VALUE))
                {
                    if(!(PRINT_OFFSET))
                        chpr += printf("@%lu",value_offset);
                }
                chpr = newline(chpr);
                max_offset = entry_ptr->value + fileoffset_base + entry_ptr->count;
                max_offset = process_private_ifd(inptr,byteorder,entry_ptr->value,
                                        fileoffset_base,max_offset,entry_ptr->tag,
                                        summary_entry,nameoftag,prefix,
                                        make,model,indent);
                break;
            default:
                print_generic_offset_makervalue(inptr,byteorder,entry_ptr,
                                        fileoffset_base,fulldirname,prefix,indent,
                                        make,model,at_offset);
                break;
        }
        if(fulldirname)
            free(fulldirname);
    }
    setcharsprinted(chpr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movw %si, %ax
movl 0x30(%rbp), %esi
movl 0x28(%rbp), %esi
movl 0x20(%rbp), %esi
movl 0x18(%rbp), %esi
movq 0x10(%rbp), %rsi
movq %rdi, -0x20(%rbp)
movw %ax, -0x22(%rbp)
movq %rdx, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq %r8, -0x40(%rbp)
movq %r9, -0x48(%rbp)
movq $0x0, -0x80(%rbp)
movl $0x0, -0x84(%rbp)
movl $0x0, -0x88(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x4345a
movq -0x30(%rbp), %rax
movw (%rax), %ax
movl 0x20(%rbp), %esi
movl 0x28(%rbp), %edx
movzwl %ax, %edi
callq 0x28160
movq %rax, -0x78(%rbp)
leaq 0x3449e(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x42d0f
movq -0x48(%rbp), %rdi
movq -0x78(%rbp), %rdx
leaq 0x21c64(%rip), %rsi     # 0x64962
callq 0x20960
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x8c(%rbp)
subl $0x100, %eax            # imm = 0x100
je 0x42e31
jmp 0x42d48
movl -0x8c(%rbp), %eax
subl $0x209, %eax            # imm = 0x209
je 0x42dcc
jmp 0x42d57
movl -0x8c(%rbp), %eax
subl $0xf00, %eax            # imm = 0xF00
je 0x43146
jmp 0x42d6a
movl -0x8c(%rbp), %eax
subl $0x2010, %eax           # imm = 0x2010
je 0x4332b
jmp 0x42d7d
movl -0x8c(%rbp), %eax
subl $0x2020, %eax           # imm = 0x2020
je 0x4332b
jmp 0x42d90
movl -0x8c(%rbp), %eax
subl $0x2030, %eax           # imm = 0x2030
je 0x4332b
jmp 0x42da3
movl -0x8c(%rbp), %eax
subl $0x2040, %eax           # imm = 0x2040
je 0x4332b
jmp 0x42db6
movl -0x8c(%rbp), %eax
subl $0x2050, %eax           # imm = 0x2050
je 0x4332b
jmp 0x43409
cmpl $0x0, 0x30(%rbp)
je 0x42e03
movq -0x50(%rbp), %rsi
movl 0x18(%rbp), %edx
movq 0x10(%rbp), %rcx
movl $0x4003333, %edi        # imm = 0x4003333
callq 0x5ed0
movq -0x30(%rbp), %rdi
movl 0x20(%rbp), %ecx
movl 0x28(%rbp), %r8d
movl $0x19, %esi
leaq 0x29f1a(%rip), %rdx     # 0x6cd18
callq 0x23e20
leaq 0x34376(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x42e2c
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x50(%rbp), %rdx
callq 0x8e70
jmp 0x43448
cmpl $0x0, 0x30(%rbp)
je 0x42e9f
leaq 0x34342(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40000, %rax          # imm = 0x40000
cmpq $0x0, %rax
je 0x42e9f
movq -0x50(%rbp), %rsi
movl 0x18(%rbp), %edx
movq 0x10(%rbp), %rcx
movl $0x1000000, %edi        # imm = 0x1000000
callq 0x5ed0
leaq 0x29953(%rip), %rdi     # 0x6c7bc
movb $0x0, %al
callq 0x3110
addl -0x88(%rbp), %eax
movl %eax, -0x88(%rbp)
movq -0x68(%rbp), %rsi
leaq 0x27e32(%rip), %rdi     # 0x6acb9
movb $0x0, %al
callq 0x3110
addl -0x88(%rbp), %eax
movl %eax, -0x88(%rbp)
jmp 0x42f55
cmpl $0x0, 0x30(%rbp)
jne 0x42f53
leaq 0x342d0(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x42f53
leaq 0x342b8(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x300, %rax            # imm = 0x300
cmpq $0x0, %rax
jne 0x42eff
movq -0x50(%rbp), %rsi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x24101(%rip), %rdi     # 0x66feb
movb $0x0, %al
callq 0x3110
addl -0x88(%rbp), %eax
movl %eax, -0x88(%rbp)
jmp 0x42f21
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x240e1(%rip), %rdi     # 0x66fef
movb $0x0, %al
callq 0x3110
addl -0x88(%rbp), %eax
movl %eax, -0x88(%rbp)
leaq 0x34258(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x1000000, %rax        # imm = 0x1000000
cmpq $0x0, %rax
jne 0x42f51
leaq 0x21d93(%rip), %rdi     # 0x64cd1
movb $0x0, %al
callq 0x3110
addl -0x88(%rbp), %eax
movl %eax, -0x88(%rbp)
jmp 0x42f53
jmp 0x42f55
leaq 0x34224(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40000, %rax          # imm = 0x40000
cmpq $0x0, %rax
jne 0x42f81
leaq 0x3420e(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x80000, %rax          # imm = 0x80000
cmpq $0x0, %rax
je 0x42f92
movl -0x88(%rbp), %edi
callq 0x1ef50
movl %eax, -0x88(%rbp)
movq -0x20(%rbp), %rdi
movq -0x50(%rbp), %rdx
movl $0x4d4d, %esi           # imm = 0x4D4D
callq 0x4480
movw %ax, -0x6a(%rbp)
movl -0x88(%rbp), %edi
callq 0x1ff00
movl $0x0, -0x88(%rbp)
movq -0x20(%rbp), %rdi
movq -0x50(%rbp), %rsi
movw -0x6a(%rbp), %dx
movq -0x68(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0x80(%rbp), %r9
movq 0x10(%rbp), %r10
movl 0x18(%rbp), %eax
addl $0x2, %eax
movzwl %dx, %edx
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x17470
movq %rax, -0x58(%rbp)
cmpl $0x0, 0x30(%rbp)
je 0x430cd
leaq 0x3417c(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40000, %rax          # imm = 0x40000
cmpq $0x0, %rax
je 0x430cb
xorl %edi, %edi
callq 0x19930
cmpl $0x1, %eax
sete %al
movb %al, %cl
andb $0x1, %cl
movzbl %cl, %ecx
movl %ecx, -0x84(%rbp)
testb $0x1, %al
jne 0x43038
jmp 0x43049
movl -0x88(%rbp), %edi
callq 0x1ef50
movl %eax, -0x88(%rbp)
movl -0x84(%rbp), %edi
callq 0x19930
movq -0x50(%rbp), %rsi
addq -0x68(%rbp), %rsi
subq $0x1, %rsi
movl 0x18(%rbp), %edx
movl $0x1000000, %edi        # imm = 0x1000000
leaq 0x2108a(%rip), %rcx     # 0x640f9
callq 0x5ed0
leaq 0x2976a(%rip), %rdi     # 0x6c7e5
movb $0x0, %al
callq 0x3110
addl -0x88(%rbp), %eax
movl %eax, -0x88(%rbp)
leaq 0x340eb(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x4003333, %rax        # imm = 0x4003333
cmpq $0x0, %rax
je 0x430c9
leaq 0x340d5(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
jne 0x430c9
movl -0x88(%rbp), %edi
callq 0x1ef50
movl %eax, -0x88(%rbp)
jmp 0x430cb
jmp 0x430cd
movb $0x0, %al
callq 0xba00
movzwl -0x6a(%rbp), %eax
cmpl $0x0, %eax
je 0x43125
cmpq $0x0, -0x40(%rbp)
je 0x43125
movq -0x40(%rbp), %rdi
callq 0x15780
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x43123
movq -0x40(%rbp), %rax
movl 0x18(%rax), %ecx
orl $0x100, %ecx            # imm = 0x100
movl %ecx, 0x18(%rax)
movq -0x40(%rbp), %rax
movl $0x5, 0x118(%rax)
movq -0x40(%rbp), %rax
movl $0x2, 0xc4(%rax)
jmp 0x43125
movq -0x20(%rbp), %rdi
callq 0x31a0
movq -0x20(%rbp), %rdi
movq -0x50(%rbp), %rsi
addq -0x68(%rbp), %rsi
xorl %edx, %edx
callq 0x3200
jmp 0x43448
cmpl $0x0, 0x30(%rbp)
je 0x431b6
leaq 0x3402d(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x4003333, %rax        # imm = 0x4003333
cmpq $0x0, %rax
je 0x431b6
movq -0x50(%rbp), %rsi
movl 0x18(%rbp), %edx
movq 0x10(%rbp), %rcx
movl $0x4003333, %edi        # imm = 0x4003333
callq 0x5ed0
movq -0x30(%rbp), %rdi
movl 0x20(%rbp), %ecx
movl 0x28(%rbp), %r8d
movl $0x19, %esi
leaq 0x25c56(%rip), %rdx     # 0x68de4
callq 0x23e20
movq -0x68(%rbp), %rsi
leaq 0x21b12(%rip), %rdi     # 0x64cb0
movb $0x0, %al
callq 0x3110
addl -0x88(%rbp), %eax
movl %eax, -0x88(%rbp)
jmp 0x4326c
cmpl $0x0, 0x30(%rbp)
jne 0x4326a
leaq 0x33fb9(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x4326a
leaq 0x33fa1(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x300, %rax            # imm = 0x300
cmpq $0x0, %rax
jne 0x43216
movq -0x50(%rbp), %rsi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x23dea(%rip), %rdi     # 0x66feb
movb $0x0, %al
callq 0x3110
addl -0x88(%rbp), %eax
movl %eax, -0x88(%rbp)
jmp 0x43238
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x23dca(%rip), %rdi     # 0x66fef
movb $0x0, %al
callq 0x3110
addl -0x88(%rbp), %eax
movl %eax, -0x88(%rbp)
leaq 0x33f41(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x1000000, %rax        # imm = 0x1000000
cmpq $0x0, %rax
jne 0x43268
leaq 0x21a7c(%rip), %rdi     # 0x64cd1
movb $0x0, %al
callq 0x3110
addl -0x88(%rbp), %eax
movl %eax, -0x88(%rbp)
jmp 0x4326a
jmp 0x4326c
leaq 0x35195(%rip), %rax     # 0x78408
cmpq $0x0, (%rax)
jne 0x43293
cmpl $0x0, -0x88(%rbp)
je 0x4328e
leaq 0x213f6(%rip), %rdi     # 0x6467f
callq 0x6860
jmp 0x43313
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
leaq 0x35169(%rip), %rax     # 0x78408
cmpq %rcx, (%rax)
je 0x432b4
leaq 0x3515d(%rip), %rax     # 0x78408
movq (%rax), %rax
cmpq -0x68(%rbp), %rax
jbe 0x432be
movq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x432cc
leaq 0x35143(%rip), %rax     # 0x78408
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movl -0x88(%rbp), %edi
callq 0x1ef50
movl %eax, -0x88(%rbp)
movq -0x20(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x60(%rbp), %rcx
movl 0x18(%rbp), %r9d
movl $0xc, %r8d
movl $0x2, (%rsp)
callq 0x8aa0
movl $0x1, %edi
callq 0x1ef50
movl %eax, -0x88(%rbp)
movq -0x20(%rbp), %rdi
movq -0x50(%rbp), %rsi
addq -0x68(%rbp), %rsi
xorl %edx, %edx
callq 0x3200
jmp 0x43448
cmpl $0x0, 0x30(%rbp)
jne 0x4337b
leaq 0x33e48(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x4337b
leaq 0x33e34(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x300, %rax            # imm = 0x300
cmpq $0x0, %rax
jne 0x43379
movq -0x50(%rbp), %rsi
leaq 0x27a25(%rip), %rdi     # 0x6ad8b
movb $0x0, %al
callq 0x3110
addl -0x88(%rbp), %eax
movl %eax, -0x88(%rbp)
jmp 0x4337b
movl -0x88(%rbp), %edi
callq 0x1ef50
movl %eax, -0x88(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
addq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
addq 0x8(%rcx), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rdi
movw -0x22(%rbp), %si
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x38(%rbp), %rcx
movq -0x58(%rbp), %r8
movq -0x30(%rbp), %rax
movw (%rax), %r9w
movq -0x40(%rbp), %r15
movq -0x78(%rbp), %r14
movq 0x10(%rbp), %rbx
movl 0x20(%rbp), %r11d
movl 0x28(%rbp), %r10d
movl 0x18(%rbp), %eax
movzwl %si, %esi
movzwl %r9w, %r9d
movq %r15, (%rsp)
movq %r14, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movl %r11d, 0x18(%rsp)
movl %r10d, 0x20(%rsp)
movl %eax, 0x28(%rsp)
callq 0xbd00
movq %rax, -0x58(%rbp)
jmp 0x43448
movq -0x20(%rbp), %rdi
movw -0x22(%rbp), %si
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x80(%rbp), %r8
movq 0x10(%rbp), %r9
movl 0x18(%rbp), %ebx
movl 0x20(%rbp), %r11d
movl 0x28(%rbp), %r10d
movl 0x30(%rbp), %eax
movzwl %si, %esi
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x23f60
cmpq $0x0, -0x80(%rbp)
je 0x43458
movq -0x80(%rbp), %rdi
callq 0x3040
jmp 0x4345a
movl -0x88(%rbp), %edi
callq 0x1ff00
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)