// File: /workspace/github_c_makefile_star2_O1/hfiguiere[P]exifprobe/maker_canon.c
// Function: canon_focusinfo
unsigned long
canon_focusinfo(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;
    int i;
    int chpr = 0;

    if(PRINT_SECTION)
        chpr += printf(" length %lu",dirlength);
    chpr = newline(chpr);

    /* NOTE that focallength is not treated as a directory; there is  */
    /* no 2-byte count at the beginning.                              */

    end_offset = offset + dirlength;
    count = (dirlength / sizeof(unsigned short));

    for(i = 0; i < count; ++i)
    {
        value = read_ushort(inptr,byteorder,offset);
        print_tag_address(ENTRY,offset,indent,"@");
        if((PRINT_ENTRY))
        {
            if((PRINT_TAGINFO))
                chpr += printf("%s",tagprefix);
        }
        offset += 2;
        switch(i)
        {
            case 0:
                if((PRINT_TAGINFO))
                    chpr += printf(".%02d_%-22.22s",i,"unknown");
                if((PRINT_VALUE))
                    chpr += printf(" = %u",value);
                break;
            case 1:
                if((PRINT_TAGINFO))
                    chpr += printf(".%02d_%-22.22s",i,"FocalLength");
                if((PRINT_VALUE))
                    chpr += printf(" = %u",value);
                break;
            case 2:
                if((PRINT_TAGINFO))
                    chpr += printf(".%02d_%-22.22s",i,"FocalPlaneXSize");
                if((PRINT_VALUE))
                    chpr += printf(" = %u",value);
                break;
            case 3:
                if((PRINT_TAGINFO))
                    chpr += printf(".%02d_%-22.22s",i,"FocalPlaneYSize");
                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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, 0x4(%rsp)
movq %r8, %r14
movq %rcx, %r15
movq %rdx, 0x18(%rsp)
movl %esi, %ebx
movq %rdi, 0x20(%rsp)
leaq 0x20c68(%rip), %r12     # 0x58180
xorl %edi, %edi
testb $0x4, 0x2(%r12)
je 0x37535
leaq 0x111f1(%rip), %rdi     # 0x4871a
movq %r14, %rsi
xorl %eax, %eax
callq 0x3120
movl %eax, %edi
callq 0x16b56
movl %eax, %r13d
cmpq $0x2, %r14
movq %r14, 0x10(%rsp)
movq %r15, 0x8(%rsp)
jae 0x37571
movq 0x10(%rsp), %rbx
addq 0x8(%rsp), %rbx
movl %r13d, %edi
callq 0x17530
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
shrq %r14
movzwl %bx, %eax
movl %eax, (%rsp)
xorl %ebx, %ebx
movq 0x20(%rsp), %rdi
movl (%rsp), %esi
movq %r15, %rdx
callq 0x4574
movl %eax, %ebp
movl $0x4003333, %edi        # imm = 0x4003333
movq %r15, %rsi
movl 0x4(%rsp), %edx
leaq 0x9b3b(%rip), %rcx      # 0x410dc
callq 0x5605
movzwl (%r12), %eax
testl $0x3003, %eax           # imm = 0x3003
je 0x375c8
leaq 0x9ade(%rip), %rdi      # 0x41097
movq 0x18(%rsp), %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
movq (%r12), %rax
cmpl $0x3, %ebx
ja 0x37697
movl %ebx, %ecx
leaq 0x151a6(%rip), %rdx     # 0x4c784
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
testl $0x3003, %eax           # imm = 0x3003
je 0x3765c
leaq 0x168ee(%rip), %rdi     # 0x4dee3
xorl %esi, %esi
leaq 0xe366(%rip), %rdx      # 0x45964
jmp 0x37652
testl $0x3003, %eax           # imm = 0x3003
je 0x3765c
leaq 0x168d5(%rip), %rdi     # 0x4dee3
movl $0x2, %esi
leaq 0x16aa8(%rip), %rdx     # 0x4e0c2
jmp 0x37652
testl $0x3003, %eax           # imm = 0x3003
je 0x3765c
leaq 0x168b9(%rip), %rdi     # 0x4dee3
movl $0x3, %esi
leaq 0x16a9c(%rip), %rdx     # 0x4e0d2
jmp 0x37652
testl $0x3003, %eax           # imm = 0x3003
je 0x3765c
leaq 0x1689d(%rip), %rdi     # 0x4dee3
movl $0x1, %esi
leaq 0x12eb9(%rip), %rdx     # 0x4a50b
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
testb $0x30, (%r12)
je 0x37677
movzwl %bp, %esi
leaq 0xd8ed(%rip), %rdi      # 0x44f5a
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
movl %r13d, %edi
callq 0x16b56
movl %eax, %r13d
incq %rbx
addq $0x2, %r15
cmpq %rbx, %r14
jne 0x3757c
jmp 0x3754d
testl $0x3003, %eax           # imm = 0x3003
je 0x376b8
leaq 0x1683e(%rip), %rdi     # 0x4dee3
movl %ebx, %esi
leaq 0x112d8(%rip), %rdx     # 0x48986
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
testb $0x30, (%r12)
je 0x37677
movzwl %bp, %edx
leaq 0x15add(%rip), %rdi     # 0x4d1a6
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
jmp 0x37674