// File: /workspace/github_c_makefile_star2_O3/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 0x203db(%rip), %r12     # 0x58180
xorl %edi, %edi
testb $0x4, 0x2(%r12)
je 0x37dc2
leaq 0x109a4(%rip), %rdi     # 0x4875a
movq %r14, %rsi
xorl %eax, %eax
callq 0x3120
movl %eax, %edi
callq 0x1707a
movl %eax, %r13d
cmpq $0x2, %r14
movq %r14, 0x10(%rsp)
movq %r15, 0x8(%rsp)
jae 0x37dfe
movq 0x10(%rsp), %rbx
addq 0x8(%rsp), %rbx
movl %r13d, %edi
callq 0x17a82
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 0x45af
movl %eax, %ebp
movl $0x4003333, %edi        # imm = 0x4003333
movq %r15, %rsi
movl 0x4(%rsp), %edx
leaq 0x92ae(%rip), %rcx      # 0x410dc
callq 0x55eb
movzwl (%r12), %eax
testl $0x3003, %eax           # imm = 0x3003
je 0x37e55
leaq 0x9251(%rip), %rdi      # 0x41097
movq 0x18(%rsp), %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
movq (%r12), %rax
cmpl $0x3, %ebx
ja 0x37f25
movl %ebx, %ecx
leaq 0x14959(%rip), %rdx     # 0x4c7c4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
testl $0x3003, %eax           # imm = 0x3003
je 0x37eed
leaq 0x160a1(%rip), %rdi     # 0x4df23
xorl %esi, %esi
leaq 0xdb1d(%rip), %rdx      # 0x459a8
jmp 0x37edf
testl $0x3003, %eax           # imm = 0x3003
je 0x37eed
leaq 0x16088(%rip), %rdi     # 0x4df23
movl $0x2, %esi
leaq 0x1625b(%rip), %rdx     # 0x4e102
jmp 0x37edf
testl $0x3003, %eax           # imm = 0x3003
je 0x37eed
leaq 0x1606c(%rip), %rdi     # 0x4df23
movl $0x3, %esi
leaq 0x1624f(%rip), %rdx     # 0x4e112
jmp 0x37edf
testl $0x3003, %eax           # imm = 0x3003
je 0x37eed
leaq 0x16050(%rip), %rdi     # 0x4df23
movl $0x1, %esi
leaq 0x1266c(%rip), %rdx     # 0x4a54b
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
movq (%r12), %rax
testb $0x30, %al
je 0x37f05
movzwl %bp, %esi
leaq 0xd0a3(%rip), %rdi      # 0x44f9e
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
movl %r13d, %edi
callq 0x1707a
movl %eax, %r13d
incq %rbx
addq $0x2, %r15
cmpq %rbx, %r14
jne 0x37e09
jmp 0x37dda
testl $0x3003, %eax           # imm = 0x3003
je 0x37f4a
leaq 0x15ff0(%rip), %rdi     # 0x4df23
movl %ebx, %esi
leaq 0x10a8a(%rip), %rdx     # 0x489c6
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
movq (%r12), %rax
testb $0x30, %al
je 0x37f05
movzwl %bp, %edx
leaq 0x1528e(%rip), %rdi     # 0x4d1e6
movl %edx, %esi
xorl %eax, %eax
callq 0x3120
jmp 0x37f02