// File: /workspace/github_c_makefile_star2_O1/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 0x16b56
movl %eax, %ebp
movq %r12, %rdi
movq %r14, %rsi
callq 0x4d44
leaq 0x3175a(%rip), %r15     # 0x58180
testl $0x4003333, (%r15)      # imm = 0x4003333
movq %rbx, (%rsp)
je 0x26aba
movl %eax, %r13d
leal 0x4(%rbx), %edx
leaq 0x1a698(%rip), %rcx     # 0x410dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %r14, %rsi
callq 0x5605
movq (%r15), %rax
testl $0x3003, %eax           # imm = 0x3003
je 0x26a97
testb $0x40, %al
je 0x26a76
leaq 0x1a631(%rip), %rdi     # 0x41097
leaq 0x22b48(%rip), %rsi     # 0x495b5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x22074(%rip), %rdi     # 0x48af1
leaq 0x1eee0(%rip), %rcx     # 0x45964
movl $0x14, %esi
movl $0x14, %edx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
testb $0x30, (%r15)
je 0x26ab1
movzwl %r13w, %esi
leaq 0x1e4b2(%rip), %rdi     # 0x44f5a
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x16b56
movl %eax, %ebp
leaq 0x1(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4d44
testl $0x4003333, (%r15)      # imm = 0x4003333
je 0x26b5d
movl %eax, %r13d
movq (%rsp), %rax
leal 0x4(%rax), %edx
leaq 0x1a5f5(%rip), %rcx     # 0x410dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
callq 0x5605
movq (%r15), %rax
testl $0x3003, %eax           # imm = 0x3003
je 0x26b3a
testb $0x40, %al
je 0x26b19
leaq 0x1a58e(%rip), %rdi     # 0x41097
leaq 0x22aa5(%rip), %rsi     # 0x495b5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x21fd1(%rip), %rdi     # 0x48af1
leaq 0x24202(%rip), %rcx     # 0x4ad29
movl $0x14, %esi
movl $0x14, %edx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
testb $0x30, (%r15)
je 0x26b54
movzwl %r13w, %esi
leaq 0x1e40f(%rip), %rdi     # 0x44f5a
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x16b56
movl %eax, %ebp
leaq 0x2(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4d44
testl $0x4003333, (%r15)      # imm = 0x4003333
je 0x26c00
movl %eax, %r13d
movq (%rsp), %rax
leal 0x4(%rax), %edx
leaq 0x1a552(%rip), %rcx     # 0x410dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
callq 0x5605
movq (%r15), %rax
testl $0x3003, %eax           # imm = 0x3003
je 0x26bdd
testb $0x40, %al
je 0x26bbc
leaq 0x1a4eb(%rip), %rdi     # 0x41097
leaq 0x22a02(%rip), %rsi     # 0x495b5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x21f2e(%rip), %rdi     # 0x48af1
leaq 0x1c672(%rip), %rcx     # 0x4323c
movl $0x14, %esi
movl $0x14, %edx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
testb $0x30, (%r15)
je 0x26bf7
movzwl %r13w, %esi
leaq 0x1e36c(%rip), %rdi     # 0x44f5a
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x16b56
movl %eax, %ebp
leaq 0x3(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4d44
testl $0x4003333, (%r15)      # imm = 0x4003333
je 0x26ca3
movl %eax, %r13d
movq (%rsp), %rax
leal 0x4(%rax), %edx
leaq 0x1a4af(%rip), %rcx     # 0x410dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
callq 0x5605
movq (%r15), %rax
testl $0x3003, %eax           # imm = 0x3003
je 0x26c80
testb $0x40, %al
je 0x26c5f
leaq 0x1a448(%rip), %rdi     # 0x41097
leaq 0x2295f(%rip), %rsi     # 0x495b5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x21e8b(%rip), %rdi     # 0x48af1
leaq 0x1c818(%rip), %rcx     # 0x43485
movl $0x14, %esi
movl $0x14, %edx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
testb $0x30, (%r15)
je 0x26c9a
movzwl %r13w, %esi
leaq 0x1e2c9(%rip), %rdi     # 0x44f5a
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x16b56
movl %eax, %ebp
leaq 0x4(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4d44
testl $0x4003333, (%r15)      # imm = 0x4003333
je 0x26d48
movl %eax, %r13d
movq (%rsp), %rax
leal 0x4(%rax), %edx
leaq 0x1a40c(%rip), %rcx     # 0x410dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
callq 0x5605
movq (%r15), %rax
testl $0x3003, %eax           # imm = 0x3003
je 0x26d23
testb $0x40, %al
je 0x26d02
leaq 0x1a3a5(%rip), %rdi     # 0x41097
leaq 0x228bc(%rip), %rsi     # 0x495b5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x21de8(%rip), %rdi     # 0x48af1
leaq 0x1c4db(%rip), %rcx     # 0x431eb
movl $0x14, %esi
movl $0x14, %edx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
testb $0x30, (%r15)
je 0x26d3f
movzwl %r13w, %edx
leaq 0x2288a(%rip), %rdi     # 0x495be
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x16b56
movl %eax, %ebp
leaq 0x5(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4d44
testl $0x4003333, (%r15)      # imm = 0x4003333
je 0x26de5
movl %eax, %r13d
movq (%rsp), %rax
leal 0x4(%rax), %edx
leaq 0x1a367(%rip), %rcx     # 0x410dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
callq 0x5605
testb $0x40, (%r15)
je 0x26d9f
leaq 0x1a308(%rip), %rdi     # 0x41097
leaq 0x2281f(%rip), %rsi     # 0x495b5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x21d4b(%rip), %rdi     # 0x48af1
leaq 0x2281b(%rip), %rcx     # 0x495c8
movl $0x14, %esi
movl $0x14, %edx
xorl %eax, %eax
callq 0x3120
movl %eax, %ebx
addl %ebp, %ebx
testb $0x30, (%r15)
je 0x26ddc
movzwl %r13w, %esi
leaq 0x1e187(%rip), %rdi     # 0x44f5a
xorl %eax, %eax
callq 0x3120
addl %eax, %ebx
movl %ebx, %edi
callq 0x16b56
movl %eax, %ebp
leaq 0x6(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4d44
testl $0x4003333, (%r15)      # imm = 0x4003333
je 0x26ee2
movl %eax, %r13d
movq (%rsp), %rax
leal 0x4(%rax), %edx
leaq 0x1a2ca(%rip), %rcx     # 0x410dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
callq 0x5605
movq (%r15), %rax
testl $0x3003, %eax           # imm = 0x3003
je 0x26e65
testb $0x40, %al
je 0x26e44
leaq 0x1a263(%rip), %rdi     # 0x41097
leaq 0x2277a(%rip), %rsi     # 0x495b5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x21ca6(%rip), %rdi     # 0x48af1
leaq 0x22785(%rip), %rcx     # 0x495d7
movl $0x14, %esi
movl $0x14, %edx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movq (%r15), %rax
testb $0x30, %al
je 0x26ed9
btl $0x19, %eax
movzwl %r13w, %ebx
jae 0x26e88
leaq 0x1e0dd(%rip), %rdi     # 0x44f5a
movl %ebx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
cvtsi2sd %ebx, %xmm0
mulsd 0x22494(%rip), %xmm0    # 0x49328
addsd 0x22494(%rip), %xmm0    # 0x49330
movsd %xmm0, 0x8(%rsp)
leaq 0x2273d(%rip), %rdi     # 0x495e6
movb $0x1, %al
callq 0x3120
movl %eax, %ebx
addl %ebp, %ebx
movsd 0x8(%rsp), %xmm0
callq 0x3040
mulsd 0x22471(%rip), %xmm0    # 0x49338
leaq 0x22725(%rip), %rdi     # 0x495f3
movb $0x1, %al
callq 0x3120
movl %eax, %ebp
addl %ebx, %ebp
movl %ebp, %edi
callq 0x16b56
movl %eax, %ebp
leaq 0x7(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4d44
testl $0x4003333, (%r15)      # imm = 0x4003333
je 0x26f87
movl %eax, %r13d
movq (%rsp), %rax
leal 0x4(%rax), %edx
leaq 0x1a1cd(%rip), %rcx     # 0x410dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
callq 0x5605
movq (%r15), %rax
testl $0x3003, %eax           # imm = 0x3003
je 0x26f62
testb $0x40, %al
je 0x26f41
leaq 0x1a166(%rip), %rdi     # 0x41097
leaq 0x2267d(%rip), %rsi     # 0x495b5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x21ba9(%rip), %rdi     # 0x48af1
leaq 0x226b0(%rip), %rcx     # 0x495ff
movl $0x14, %esi
movl $0x14, %edx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
testb $0x30, (%r15)
je 0x26f7e
movzwl %r13w, %edx
leaq 0x2264b(%rip), %rdi     # 0x495be
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x16b56
movl %eax, %ebp
leaq 0x8(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4d44
testl $0x4003333, (%r15)      # imm = 0x4003333
je 0x2702c
movl %eax, %r13d
movq (%rsp), %rax
leal 0x4(%rax), %edx
leaq 0x1a128(%rip), %rcx     # 0x410dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
callq 0x5605
movq (%r15), %rax
testl $0x3003, %eax           # imm = 0x3003
je 0x27007
testb $0x40, %al
je 0x26fe6
leaq 0x1a0c1(%rip), %rdi     # 0x41097
leaq 0x225d8(%rip), %rsi     # 0x495b5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x21b04(%rip), %rdi     # 0x48af1
leaq 0x22615(%rip), %rcx     # 0x49609
movl $0x14, %esi
movl $0x14, %edx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
testb $0x30, (%r15)
je 0x27023
movzwl %r13w, %edx
leaq 0x225a6(%rip), %rdi     # 0x495be
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x16b56
movl %eax, %ebp
leaq 0x9(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4d44
testl $0x4003333, (%r15)      # imm = 0x4003333
je 0x270cf
movl %eax, %r12d
movq (%rsp), %rdx
addl $0x4, %edx
leaq 0x1a083(%rip), %rcx     # 0x410dc
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
callq 0x5605
movq (%r15), %rax
testl $0x3003, %eax           # imm = 0x3003
je 0x270ac
testb $0x40, %al
je 0x2708b
leaq 0x1a01c(%rip), %rdi     # 0x41097
leaq 0x22533(%rip), %rsi     # 0x495b5
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x21a5f(%rip), %rdi     # 0x48af1
leaq 0x2257c(%rip), %rcx     # 0x49615
movl $0x14, %esi
movl $0x14, %edx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
testb $0x30, (%r15)
je 0x270c8
movzwl %r12w, %edx
leaq 0x22501(%rip), %rdi     # 0x495be
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x16b56
movq 0x10(%rsp), %rax
addq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop