// File: /workspace/github_c_makefile_star2_O0/hfiguiere[P]exifprobe/maker_canon.c
// Function: canon_sensorinfo
unsigned long
canon_sensorinfo(FILE *inptr,unsigned short byteorder,char *tagprefix,
                        unsigned long offset,unsigned long dirlength,int indent)
{
    unsigned long count;
    unsigned long end_offset;
    unsigned short length,value;
    int i;
    int chpr = 0;

    end_offset = offset + dirlength;
    length = read_ushort(inptr,byteorder,offset);
    if(PRINT_SECTION)
    {
        chpr += printf(" length %lu",dirlength);
        if(length != dirlength)
        {
            chpr = newline(chpr);
            PUSHCOLOR(RED);
            print_tag_address(SECTION,offset,indent,"@");
            chpr += printf("# WARNING: length %u from segment does not match length %lu from directory",
                        length,dirlength);
            POPCOLOR();
        }
    }
    chpr = newline(chpr);

    if((PRINT_ENTRY))
    {
        offset += 2;
        count = (dirlength / sizeof(unsigned short)) - 1;

        for(i = 1; i <= count; ++i)
        {
            value = read_ushort(inptr,byteorder,offset);
            print_tag_address(ENTRY,offset,indent,"@");
            if((PRINT_TAGINFO))
                chpr += printf("%s",tagprefix);
            offset += 2;
            switch(i)
            {
                case 1:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-26.26s",i,"SensorWidth");
                    if((PRINT_VALUE))
                        chpr += printf(" = %u",value);
                    break;
                case 2:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-26.26s",i,"SensorHeight");
                    if((PRINT_VALUE))
                        chpr += printf(" = %u",value);
                    break;
                case 3:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-26.26s",i,"Unknown");
                    if((PRINT_VALUE))
                        chpr += printf(" = %u",value);
                    break;
                case 4:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-26.26s",i,"Unknown");
                    if((PRINT_VALUE))
                        chpr += printf(" = %u",value);
                    break;
                case 5:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-26.26s",i,"SensorLeftBorder");
                    if((PRINT_VALUE))
                        chpr += printf(" = %u",value);
                    break;
                case 6:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-26.26s",i,"SensorTopBorder");
                    if((PRINT_VALUE))
                        chpr += printf(" = %u",value);
                    break;
                case 7:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-26.26s",i,"SensorRightBorder");
                    if((PRINT_VALUE))
                        chpr += printf(" = %u",value);
                    break;
                case 8:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-26.26s",i,"SensorBottomBorder");
                    if((PRINT_VALUE))
                        chpr += printf(" = %u",value);
                    break;
                case 9:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-26.26s",i,"BlackMaskLeftBorder");
                    if((PRINT_VALUE))
                        chpr += printf(" = %u",value);
                    break;
                case 10:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-26.26s",i,"BlackMaskTopBorder");
                    if((PRINT_VALUE))
                        chpr += printf(" = %u",value);
                    break;
                case 11:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-26.26s",i,"BlackMaskRightBorder");
                    if((PRINT_VALUE))
                        chpr += printf(" = %u",value);
                    break;
                case 12:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-26.26s",i,"BlackMaskBottomBorder");
                    if((PRINT_VALUE))
                        chpr += printf(" = %u",value);
                    break;
                default:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-26.26s",i,"Undefined");
                    if((PRINT_VALUE))
                        chpr += printf(" = %#x%u",value,value);
                    break;
            }
            chpr = newline(chpr);
        }
    }
    setcharsprinted(chpr);
    return(end_offset);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movw -0xa(%rbp), %ax
movq -0x20(%rbp), %rdx
movzwl %ax, %esi
callq 0x4480
movw %ax, -0x42(%rbp)
leaq 0x2299b(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40000, %rax          # imm = 0x40000
cmpq $0x0, %rax
je 0x54857
movq -0x28(%rbp), %rsi
leaq 0x164ba(%rip), %rdi     # 0x6acb9
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movzwl -0x42(%rbp), %eax
cmpq -0x28(%rbp), %rax
je 0x54855
movl -0x4c(%rbp), %edi
callq 0x1ef50
movl %eax, -0x4c(%rbp)
movq -0x20(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl $0x40000, %edi          # imm = 0x40000
leaq 0xf8a8(%rip), %rcx      # 0x640dc
callq 0x5ed0
movzwl -0x42(%rbp), %esi
movq -0x28(%rbp), %rdx
leaq 0x1ad25(%rip), %rdi     # 0x6f56d
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x54857
movl -0x4c(%rbp), %edi
callq 0x1ef50
movl %eax, -0x4c(%rbp)
leaq 0x22917(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x4003333, %rax        # imm = 0x4003333
cmpq $0x0, %rax
je 0x54e78
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
shrq %rax
subq $0x1, %rax
movq %rax, -0x38(%rbp)
movl $0x1, -0x48(%rbp)
movslq -0x48(%rbp), %rax
cmpq -0x38(%rbp), %rax
ja 0x54e76
movq -0x8(%rbp), %rdi
movw -0xa(%rbp), %ax
movq -0x20(%rbp), %rdx
movzwl %ax, %esi
callq 0x4480
movw %ax, -0x44(%rbp)
movq -0x20(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl $0x4003333, %edi        # imm = 0x4003333
leaq 0xf805(%rip), %rcx      # 0x640dc
callq 0x5ed0
leaq 0x2289d(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x5490a
movq -0x18(%rbp), %rsi
leaq 0xf79a(%rip), %rdi      # 0x64097
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movl -0x48(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x58(%rbp)
subl $0xb, %eax
ja 0x54df7
movq -0x58(%rbp), %rax
leaq 0x1a3d7(%rip), %rcx     # 0x6ed0c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2283b(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x54972
movl -0x48(%rbp), %esi
leaq 0x1bc22(%rip), %rdi     # 0x70580
leaq 0x10637(%rip), %rdx     # 0x64f9c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x22807(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x5499e
movzwl -0x44(%rbp), %esi
leaq 0x12c9b(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x54e5d
leaq 0x227d6(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x549d7
movl -0x48(%rbp), %esi
leaq 0x1bbbd(%rip), %rdi     # 0x70580
leaq 0x105de(%rip), %rdx     # 0x64fa8
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x227a2(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x54a03
movzwl -0x44(%rbp), %esi
leaq 0x12c36(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x54e5d
leaq 0x22771(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x54a3c
movl -0x48(%rbp), %esi
leaq 0x1bb58(%rip), %rdi     # 0x70580
leaq 0x18437(%rip), %rdx     # 0x6ce66
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x2273d(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x54a68
movzwl -0x44(%rbp), %esi
leaq 0x12bd1(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x54e5d
leaq 0x2270c(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x54aa1
movl -0x48(%rbp), %esi
leaq 0x1baf3(%rip), %rdi     # 0x70580
leaq 0x183d2(%rip), %rdx     # 0x6ce66
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x226d8(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x54acd
movzwl -0x44(%rbp), %esi
leaq 0x12b6c(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x54e5d
leaq 0x226a7(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x54b06
movl -0x48(%rbp), %esi
leaq 0x1ba8e(%rip), %rdi     # 0x70580
leaq 0x104cc(%rip), %rdx     # 0x64fc5
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x22673(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x54b32
movzwl -0x44(%rbp), %esi
leaq 0x12b07(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x54e5d
leaq 0x22642(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x54b6b
movl -0x48(%rbp), %esi
leaq 0x1ba29(%rip), %rdi     # 0x70580
leaq 0x10457(%rip), %rdx     # 0x64fb5
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x2260e(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x54b97
movzwl -0x44(%rbp), %esi
leaq 0x12aa2(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x54e5d
leaq 0x225dd(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x54bd0
movl -0x48(%rbp), %esi
leaq 0x1b9c4(%rip), %rdi     # 0x70580
leaq 0x1b9cc(%rip), %rdx     # 0x7058f
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x225a9(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x54bfc
movzwl -0x44(%rbp), %esi
leaq 0x12a3d(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x54e5d
leaq 0x22578(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x54c35
movl -0x48(%rbp), %esi
leaq 0x1b95f(%rip), %rdi     # 0x70580
leaq 0x1b979(%rip), %rdx     # 0x705a1
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x22544(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x54c61
movzwl -0x44(%rbp), %esi
leaq 0x129d8(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x54e5d
leaq 0x22513(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x54c9a
movl -0x48(%rbp), %esi
leaq 0x1b8fa(%rip), %rdi     # 0x70580
leaq 0x1b927(%rip), %rdx     # 0x705b4
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x224df(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x54cc6
movzwl -0x44(%rbp), %esi
leaq 0x12973(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x54e5d
leaq 0x224ae(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x54cff
movl -0x48(%rbp), %esi
leaq 0x1b895(%rip), %rdi     # 0x70580
leaq 0x1b8d6(%rip), %rdx     # 0x705c8
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x2247a(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x54d2b
movzwl -0x44(%rbp), %esi
leaq 0x1290e(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x54e5d
leaq 0x22449(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x54d64
movl -0x48(%rbp), %esi
leaq 0x1b830(%rip), %rdi     # 0x70580
leaq 0x1b884(%rip), %rdx     # 0x705db
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x22415(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x54d90
movzwl -0x44(%rbp), %esi
leaq 0x128a9(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x54e5d
leaq 0x223e4(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x54dc9
movl -0x48(%rbp), %esi
leaq 0x1b7cb(%rip), %rdi     # 0x70580
leaq 0x1b834(%rip), %rdx     # 0x705f0
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x223b0(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x54df5
movzwl -0x44(%rbp), %esi
leaq 0x12844(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x54e5d
leaq 0x22382(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x54e2b
movl -0x48(%rbp), %esi
leaq 0x1b769(%rip), %rdi     # 0x70580
leaq 0x16113(%rip), %rdx     # 0x6af31
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x2234e(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x54e5b
movzwl -0x44(%rbp), %esi
movzwl -0x44(%rbp), %edx
leaq 0x1aad8(%rip), %rdi     # 0x6f926
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x54e5d
movl -0x4c(%rbp), %edi
callq 0x1ef50
movl %eax, -0x4c(%rbp)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x5489e
jmp 0x54e78
movl -0x4c(%rbp), %edi
callq 0x1ff00
movq -0x40(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)