// File: /workspace/github_c_makefile_star2_O0/hfiguiere[P]exifprobe/maker_canon.c
// Function: canon_pictureinfo
unsigned long
canon_pictureinfo(FILE *inptr,unsigned short byteorder,char *tagprefix,
                            unsigned long offset,unsigned long dirlength,int indent)
{
    unsigned long count;
    unsigned long end_offset;
    unsigned short value,length;
    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_%-22.22s",i,"Unknown");
                    if((PRINT_VALUE))
                        chpr += printf(" = %u",value);
                    break;
                case 2:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-22.22s",i,"ImageWidth");
                    if((PRINT_VALUE))
                        chpr += printf(" = %u",value);
                    break;
                case 3:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-22.22s",i,"ImageHeight");
                    if((PRINT_VALUE))
                        chpr += printf(" = %u",value);
                    break;
                case 4:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-22.22s",i,"ImageWidthAsShot");
                    if((PRINT_VALUE))
                        chpr += printf(" = %u",value);
                    break;
                case 5:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-22.22s",i,"ImageHeightAsShot");
                    if((PRINT_VALUE))
                        chpr += printf(" = %u",value);
                    break;
                case 22:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-22.22s",i,"AFPointsUsed");
                    if((PRINT_VALUE))
                        chpr += printf(" = %u",value);
                    break;
                default:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-22.22s",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, -0x44(%rbp)
leaq 0x2229b(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40000, %rax          # imm = 0x40000
cmpq $0x0, %rax
je 0x54f57
movq -0x28(%rbp), %rsi
leaq 0x15dba(%rip), %rdi     # 0x6acb9
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movzwl -0x44(%rbp), %eax
cmpq -0x28(%rbp), %rax
je 0x54f55
movl -0x4c(%rbp), %edi
callq 0x1ef50
movl %eax, -0x4c(%rbp)
movq -0x20(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl $0x40000, %edi          # imm = 0x40000
leaq 0xf1a8(%rip), %rcx      # 0x640dc
callq 0x5ed0
movzwl -0x44(%rbp), %esi
movq -0x28(%rbp), %rdx
leaq 0x1a625(%rip), %rdi     # 0x6f56d
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x54f57
movl -0x4c(%rbp), %edi
callq 0x1ef50
movl %eax, -0x4c(%rbp)
leaq 0x22217(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x4003333, %rax        # imm = 0x4003333
cmpq $0x0, %rax
je 0x5531a
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 0x55318
movq -0x8(%rbp), %rdi
movw -0xa(%rbp), %ax
movq -0x20(%rbp), %rdx
movzwl %ax, %esi
callq 0x4480
movw %ax, -0x42(%rbp)
movq -0x20(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl $0x4003333, %edi        # imm = 0x4003333
leaq 0xf105(%rip), %rcx      # 0x640dc
callq 0x5ed0
leaq 0x2219d(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x5500a
movq -0x18(%rbp), %rsi
leaq 0xf09a(%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 $0x15, %eax
ja 0x55299
movq -0x58(%rbp), %rax
leaq 0x19d07(%rip), %rcx     # 0x6ed3c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2213b(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x55072
movl -0x48(%rbp), %esi
leaq 0x1b605(%rip), %rdi     # 0x70663
leaq 0x17e01(%rip), %rdx     # 0x6ce66
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x22107(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x5509e
movzwl -0x42(%rbp), %esi
leaq 0x1259b(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x552ff
leaq 0x220d6(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x550d7
movl -0x48(%rbp), %esi
leaq 0x1b5a0(%rip), %rdi     # 0x70663
leaq 0x1b558(%rip), %rdx     # 0x70622
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x220a2(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x55103
movzwl -0x42(%rbp), %esi
leaq 0x12536(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x552ff
leaq 0x22071(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x5513c
movl -0x48(%rbp), %esi
leaq 0x1b53b(%rip), %rdi     # 0x70663
leaq 0x1b505(%rip), %rdx     # 0x70634
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x2203d(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x55168
movzwl -0x42(%rbp), %esi
leaq 0x124d1(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x552ff
leaq 0x2200c(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x551a1
movl -0x48(%rbp), %esi
leaq 0x1b4d6(%rip), %rdi     # 0x70663
leaq 0x1b61d(%rip), %rdx     # 0x707b1
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x21fd8(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x551cd
movzwl -0x42(%rbp), %esi
leaq 0x1246c(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x552ff
leaq 0x21fa7(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x55206
movl -0x48(%rbp), %esi
leaq 0x1b471(%rip), %rdi     # 0x70663
leaq 0x1b5c9(%rip), %rdx     # 0x707c2
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x21f73(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x55232
movzwl -0x42(%rbp), %esi
leaq 0x12407(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x552ff
leaq 0x21f42(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x5526b
movl -0x48(%rbp), %esi
leaq 0x1b40c(%rip), %rdi     # 0x70663
leaq 0x1b576(%rip), %rdx     # 0x707d4
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x21f0e(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x55297
movzwl -0x42(%rbp), %esi
leaq 0x123a2(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x552ff
leaq 0x21ee0(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x552cd
movl -0x48(%rbp), %esi
leaq 0x1b3aa(%rip), %rdi     # 0x70663
leaq 0x15c71(%rip), %rdx     # 0x6af31
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
leaq 0x21eac(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x552fd
movzwl -0x42(%rbp), %esi
movzwl -0x42(%rbp), %edx
leaq 0x1a636(%rip), %rdi     # 0x6f926
movb $0x0, %al
callq 0x3110
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x552ff
movl -0x4c(%rbp), %edi
callq 0x1ef50
movl %eax, -0x4c(%rbp)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x54f9e
jmp 0x5531a
movl -0x4c(%rbp), %edi
callq 0x1ff00
movq -0x40(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)