// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/mrw.c
// Function: process_rif
unsigned long
process_rif(FILE *inptr,unsigned long offset,unsigned long blocklength,
            struct image_summary *summary_entry,int indent)
{
    unsigned long end_offset;
    unsigned short saturation,contrast;
    unsigned short sharpness,white_balance;
    unsigned short subject_program,iso;
    unsigned short color_mode,color_filter,bw_filter;
    unsigned short unknown;
    double fvalue;
    int chpr = 0;

    end_offset = offset + blocklength;

    chpr = newline(chpr);
    unknown = read_ubyte(inptr,offset);
    if((PRINT_ENTRY))
    {
        print_tag_address(ENTRY,offset,indent + 4,"@");
        if((PRINT_TAGINFO))
        {
            if((PRINT_LONGNAMES))
                chpr += printf("%s","MRW.RIF.");
            chpr += printf("%-*.*s",SHORTNAMEWIDTH,SHORTNAMEWIDTH,"unknown");
        }
        if((PRINT_VALUE))
            chpr += printf(" = %u",unknown);
        chpr = newline(chpr);
    }
    ++offset;
    saturation = read_ubyte(inptr,offset);
    if((PRINT_ENTRY))
    {
        print_tag_address(ENTRY,offset,indent + 4,"@");
        if((PRINT_TAGINFO))
        {
            if((PRINT_LONGNAMES))
                chpr += printf("%s","MRW.RIF.");
            chpr += printf("%-*.*s",SHORTNAMEWIDTH,SHORTNAMEWIDTH,"Saturation");
        }
        if((PRINT_VALUE))
            chpr += printf(" = %u",saturation);
        chpr = newline(chpr);
    }
    ++offset;
    contrast = read_ubyte(inptr,offset);
    if((PRINT_ENTRY))
    {
        print_tag_address(ENTRY,offset,indent + 4,"@");
        if((PRINT_TAGINFO))
        {
            if((PRINT_LONGNAMES))
                chpr += printf("%s","MRW.RIF.");
            chpr += printf("%-*.*s",SHORTNAMEWIDTH,SHORTNAMEWIDTH,"Contrast");
        }
        if((PRINT_VALUE))
            chpr += printf(" = %u",contrast);
        chpr = newline(chpr);
    }
    ++offset;
    sharpness = read_ubyte(inptr,offset);
    if((PRINT_ENTRY))
    {
        print_tag_address(ENTRY,offset,indent + 4,"@");
        if((PRINT_TAGINFO))
        {
            if((PRINT_LONGNAMES))
                chpr += printf("%s","MRW.RIF.");
            chpr += printf("%-*.*s",SHORTNAMEWIDTH,SHORTNAMEWIDTH,"Sharpness");
        }
        if((PRINT_VALUE))
            chpr += printf(" = %u",sharpness);
        chpr = newline(chpr);
    }
    ++offset;
    white_balance = read_ubyte(inptr,offset);
    if((PRINT_ENTRY))
    {
        print_tag_address(ENTRY,offset,indent + 4,"@");
        if((PRINT_TAGINFO))
        {
            if((PRINT_LONGNAMES))
                chpr += printf("%s","MRW.RIF.");
            chpr += printf("%-*.*s",SHORTNAMEWIDTH,SHORTNAMEWIDTH,"WhiteBalance");
        }
        if((PRINT_VALUE))
            chpr += printf(" = %u/%#x",white_balance,white_balance);
        chpr = newline(chpr);
    }
    ++offset;
    subject_program = read_ubyte(inptr,offset);
    if((PRINT_ENTRY))
    {
        print_tag_address(ENTRY,offset,indent + 4,"@");
        {
            if((PRINT_LONGNAMES))
                chpr += printf("%s","MRW.RIF.");
            chpr += printf("%-*.*s",SHORTNAMEWIDTH,SHORTNAMEWIDTH,"SubjectProgram");
        }
        if((PRINT_VALUE))
            chpr += printf(" = %u",subject_program);
        chpr = newline(chpr);
    }
    ++offset;
    iso = read_ubyte(inptr,offset);
    if((PRINT_ENTRY))
    {
        print_tag_address(ENTRY,offset,indent + 4,"@");
        if((PRINT_TAGINFO))
        {
            if((PRINT_LONGNAMES))
                chpr += printf("%s","MRW.RIF.");
            chpr += printf("%-*.*s",SHORTNAMEWIDTH,SHORTNAMEWIDTH,"CCDSensitivity");
        }
        if((PRINT_VALUE))
        {
            if(PRINT_RAW_VALUES)
                chpr += printf(" = %u",iso);
            fvalue = ((double)iso/8.0) - 1.0;
            chpr += printf(" = %.3g APEX",fvalue);
            fvalue = pow(2.0,fvalue) * 3.125;
            chpr += printf(" = %.3g ISO",fvalue);
        }
        chpr = newline(chpr);
    }
    ++offset;
    color_mode = read_ubyte(inptr,offset);
    if((PRINT_ENTRY))
    {
        print_tag_address(ENTRY,offset,indent + 4,"@");
        if((PRINT_TAGINFO))
        {
            if((PRINT_LONGNAMES))
                chpr += printf("%s","MRW.RIF.");
            chpr += printf("%-*.*s",SHORTNAMEWIDTH,SHORTNAMEWIDTH,"ColorMode");
        }
        if((PRINT_VALUE))
            chpr += printf(" = %u/%#x",color_mode,color_mode);
        chpr = newline(chpr);
    }
    ++offset;
    color_filter = read_ubyte(inptr,offset);
    if((PRINT_ENTRY))
    {
        print_tag_address(ENTRY,offset,indent + 4,"@");
        if((PRINT_TAGINFO))
        {
            if((PRINT_LONGNAMES))
                chpr += printf("%s","MRW.RIF.");
            chpr += printf("%-*.*s",SHORTNAMEWIDTH,SHORTNAMEWIDTH,"ColorFilter");
        }
        if((PRINT_VALUE))
            chpr += printf(" = %u/%#x",color_filter,color_filter);
        chpr = newline(chpr);
    }
    ++offset;
    bw_filter = read_ubyte(inptr,offset);
    if((PRINT_ENTRY))
    {
        print_tag_address(ENTRY,offset,indent + 4,"@");
        if((PRINT_TAGINFO))
        {
            if((PRINT_LONGNAMES))
                chpr += printf("%s","MRW.RIF.");
            chpr += printf("%-*.*s",SHORTNAMEWIDTH,SHORTNAMEWIDTH,"BWFilter");
        }
        if((PRINT_VALUE))
            chpr += printf(" = %u/%#x",bw_filter,bw_filter);
        chpr = newline(chpr);
    }
    ++offset;
    /* Remaining values are unknown                                   */
    return(end_offset);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebx
movq %rdx, 0x10(%rsp)
movq %rsi, %r14
movq %rdi, %r12
xorl %edi, %edi
callq 0x160f7
movl %eax, %ebp
movq %r12, %rdi
movq %r14, %rsi
callq 0x48de
leaq 0x31538(%rip), %r15     # 0x57180
testl $0x4003333, (%r15)      # imm = 0x4003333
movq %rbx, (%rsp)
je 0x25cd3
movl %eax, %r13d
leal 0x4(%rbx), %edx
leaq 0x1947a(%rip), %rcx     # 0x3f0dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %r14, %rsi
callq 0x5100
movq (%r15), %rax
testw $0x3003, %ax            # imm = 0x3003
je 0x25cb2
testb $0x40, %al
je 0x25c93
leaq 0x19414(%rip), %rdi     # 0x3f097
leaq 0x2191b(%rip), %rsi     # 0x475a5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x20e47(%rip), %rdi     # 0x46ae1
leaq 0x1dcc3(%rip), %rcx     # 0x43964
pushq $0x14
popq %rdx
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movq (%r15), %rax
testb $0x30, %al
je 0x25cca
movzwl %r13w, %esi
leaq 0x1d299(%rip), %rdi     # 0x42f5a
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x160f7
movl %eax, %ebp
leaq 0x1(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x48de
testl $0x4003333, (%r15)      # imm = 0x4003333
je 0x25d71
movl %eax, %r13d
movq (%rsp), %rax
leal 0x4(%rax), %edx
leaq 0x193dc(%rip), %rcx     # 0x3f0dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
callq 0x5100
movq (%r15), %rax
testw $0x3003, %ax            # imm = 0x3003
je 0x25d50
testb $0x40, %al
je 0x25d31
leaq 0x19376(%rip), %rdi     # 0x3f097
leaq 0x2187d(%rip), %rsi     # 0x475a5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x20da9(%rip), %rdi     # 0x46ae1
leaq 0x22fda(%rip), %rcx     # 0x48d19
pushq $0x14
popq %rdx
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movq (%r15), %rax
testb $0x30, %al
je 0x25d68
movzwl %r13w, %esi
leaq 0x1d1fb(%rip), %rdi     # 0x42f5a
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x160f7
movl %eax, %ebp
leaq 0x2(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x48de
testl $0x4003333, (%r15)      # imm = 0x4003333
je 0x25e0f
movl %eax, %r13d
movq (%rsp), %rax
leal 0x4(%rax), %edx
leaq 0x1933e(%rip), %rcx     # 0x3f0dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
callq 0x5100
movq (%r15), %rax
testw $0x3003, %ax            # imm = 0x3003
je 0x25dee
testb $0x40, %al
je 0x25dcf
leaq 0x192d8(%rip), %rdi     # 0x3f097
leaq 0x217df(%rip), %rsi     # 0x475a5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x20d0b(%rip), %rdi     # 0x46ae1
leaq 0x1b45f(%rip), %rcx     # 0x4123c
pushq $0x14
popq %rdx
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movq (%r15), %rax
testb $0x30, %al
je 0x25e06
movzwl %r13w, %esi
leaq 0x1d15d(%rip), %rdi     # 0x42f5a
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x160f7
movl %eax, %ebp
leaq 0x3(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x48de
testl $0x4003333, (%r15)      # imm = 0x4003333
je 0x25ead
movl %eax, %r13d
movq (%rsp), %rax
leal 0x4(%rax), %edx
leaq 0x192a0(%rip), %rcx     # 0x3f0dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
callq 0x5100
movq (%r15), %rax
testw $0x3003, %ax            # imm = 0x3003
je 0x25e8c
testb $0x40, %al
je 0x25e6d
leaq 0x1923a(%rip), %rdi     # 0x3f097
leaq 0x21741(%rip), %rsi     # 0x475a5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x20c6d(%rip), %rdi     # 0x46ae1
leaq 0x1b60a(%rip), %rcx     # 0x41485
pushq $0x14
popq %rdx
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movq (%r15), %rax
testb $0x30, %al
je 0x25ea4
movzwl %r13w, %esi
leaq 0x1d0bf(%rip), %rdi     # 0x42f5a
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x160f7
movl %eax, %ebp
leaq 0x4(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x48de
testl $0x4003333, (%r15)      # imm = 0x4003333
je 0x25f4d
movl %eax, %r13d
movq (%rsp), %rax
leal 0x4(%rax), %edx
leaq 0x19202(%rip), %rcx     # 0x3f0dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
callq 0x5100
movq (%r15), %rax
testw $0x3003, %ax            # imm = 0x3003
je 0x25f2a
testb $0x40, %al
je 0x25f0b
leaq 0x1919c(%rip), %rdi     # 0x3f097
leaq 0x216a3(%rip), %rsi     # 0x475a5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x20bcf(%rip), %rdi     # 0x46ae1
leaq 0x1b2d2(%rip), %rcx     # 0x411eb
pushq $0x14
popq %rdx
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movq (%r15), %rax
testb $0x30, %al
je 0x25f44
movzwl %r13w, %edx
leaq 0x21675(%rip), %rdi     # 0x475ae
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x160f7
movl %eax, %ebp
leaq 0x5(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x48de
testl $0x4003333, (%r15)      # imm = 0x4003333
je 0x25fe1
movl %eax, %r13d
movq (%rsp), %rax
leal 0x4(%rax), %edx
leaq 0x19166(%rip), %rcx     # 0x3f0dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
callq 0x5100
testb $0x40, (%r15)
je 0x25fa0
leaq 0x19107(%rip), %rdi     # 0x3f097
leaq 0x2160e(%rip), %rsi     # 0x475a5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x20b3a(%rip), %rdi     # 0x46ae1
leaq 0x2160a(%rip), %rcx     # 0x475b8
pushq $0x14
popq %rdx
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
movl %eax, %ebx
addl %ebp, %ebx
testb $0x30, (%r15)
je 0x25fd8
movzwl %r13w, %esi
leaq 0x1cf8b(%rip), %rdi     # 0x42f5a
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
movl %ebx, %edi
callq 0x160f7
movl %eax, %ebp
leaq 0x6(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x48de
testl $0x4003333, (%r15)      # imm = 0x4003333
je 0x260d8
movl %eax, %r13d
movq (%rsp), %rax
leal 0x4(%rax), %edx
leaq 0x190ce(%rip), %rcx     # 0x3f0dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
callq 0x5100
movq (%r15), %rax
testw $0x3003, %ax            # imm = 0x3003
je 0x2605e
testb $0x40, %al
je 0x2603f
leaq 0x19068(%rip), %rdi     # 0x3f097
leaq 0x2156f(%rip), %rsi     # 0x475a5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x20a9b(%rip), %rdi     # 0x46ae1
leaq 0x2157a(%rip), %rcx     # 0x475c7
pushq $0x14
popq %rdx
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movq (%r15), %rax
testb $0x30, %al
je 0x260cf
btl $0x19, %eax
movzwl %r13w, %ebx
jae 0x2607e
leaq 0x1cee7(%rip), %rdi     # 0x42f5a
movl %ebx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
cvtsi2sd %ebx, %xmm0
mulsd 0x2128e(%rip), %xmm0    # 0x47318
addsd 0x2128e(%rip), %xmm0    # 0x47320
movsd %xmm0, 0x8(%rsp)
leaq 0x21537(%rip), %rdi     # 0x475d6
movb $0x1, %al
callq 0x3120
movl %eax, %ebx
addl %ebp, %ebx
movsd 0x8(%rsp), %xmm0
callq 0x3040
mulsd 0x2126b(%rip), %xmm0    # 0x47328
leaq 0x2151f(%rip), %rdi     # 0x475e3
movb $0x1, %al
callq 0x3120
movl %eax, %ebp
addl %ebx, %ebp
movl %ebp, %edi
callq 0x160f7
movl %eax, %ebp
leaq 0x7(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x48de
testl $0x4003333, (%r15)      # imm = 0x4003333
je 0x26178
movl %eax, %r13d
movq (%rsp), %rax
leal 0x4(%rax), %edx
leaq 0x18fd7(%rip), %rcx     # 0x3f0dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
callq 0x5100
movq (%r15), %rax
testw $0x3003, %ax            # imm = 0x3003
je 0x26155
testb $0x40, %al
je 0x26136
leaq 0x18f71(%rip), %rdi     # 0x3f097
leaq 0x21478(%rip), %rsi     # 0x475a5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x209a4(%rip), %rdi     # 0x46ae1
leaq 0x214ab(%rip), %rcx     # 0x475ef
pushq $0x14
popq %rdx
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movq (%r15), %rax
testb $0x30, %al
je 0x2616f
movzwl %r13w, %edx
leaq 0x2144a(%rip), %rdi     # 0x475ae
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x160f7
movl %eax, %ebp
leaq 0x8(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x48de
testl $0x4003333, (%r15)      # imm = 0x4003333
je 0x26218
movl %eax, %r13d
movq (%rsp), %rax
leal 0x4(%rax), %edx
leaq 0x18f37(%rip), %rcx     # 0x3f0dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
callq 0x5100
movq (%r15), %rax
testw $0x3003, %ax            # imm = 0x3003
je 0x261f5
testb $0x40, %al
je 0x261d6
leaq 0x18ed1(%rip), %rdi     # 0x3f097
leaq 0x213d8(%rip), %rsi     # 0x475a5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x20904(%rip), %rdi     # 0x46ae1
leaq 0x21415(%rip), %rcx     # 0x475f9
pushq $0x14
popq %rdx
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movq (%r15), %rax
testb $0x30, %al
je 0x2620f
movzwl %r13w, %edx
leaq 0x213aa(%rip), %rdi     # 0x475ae
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x160f7
movl %eax, %ebp
leaq 0x9(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x48de
testl $0x4003333, (%r15)      # imm = 0x4003333
je 0x262b6
movl %eax, %r12d
movq (%rsp), %rdx
addl $0x4, %edx
leaq 0x18e97(%rip), %rcx     # 0x3f0dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
callq 0x5100
movq (%r15), %rax
testw $0x3003, %ax            # imm = 0x3003
je 0x26295
testb $0x40, %al
je 0x26276
leaq 0x18e31(%rip), %rdi     # 0x3f097
leaq 0x21338(%rip), %rsi     # 0x475a5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x20864(%rip), %rdi     # 0x46ae1
leaq 0x21381(%rip), %rcx     # 0x47605
pushq $0x14
popq %rdx
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movq (%r15), %rax
testb $0x30, %al
je 0x262af
movzwl %r12w, %edx
leaq 0x2130a(%rip), %rdi     # 0x475ae
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x160f7
movq 0x10(%rsp), %rax
addq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)