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

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

    if((PRINT_ENTRY))
    {
        count = (dirlength / sizeof(long));

        for(i = 0; i <= count; ++i)
        {
            value = read_ulong(inptr,byteorder,offset);
            print_tag_address(ENTRY,offset,indent,"@");
            if((PRINT_TAGINFO))
                chpr += printf("%s",tagprefix);
            offset += 4;
            switch(i)
            {
                case 0:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-26.26s",i,"AspectRatio");
                    if((PRINT_VALUE))
                        chpr += printf(" = %#lx",value);

                        print_startvalue();
                        switch(value)
                        {
                        case 0:
                            chpr += printf("3:2");
                            break;
                        case 1:
                            chpr += printf("1:1");
                            break;
                        case 2:
                            chpr += printf("4:3");
                            break;
                        case 7:
                            chpr += printf("16:9");
                            break;
                        case 8:
                            chpr += printf("4:5");
                            break;
                        default:
                            printred("undefined");
                            break;
                        }
                        print_endvalue();

                    break;
                case 1:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-26.26s",i,"CroppedImageWidth");
                    if((PRINT_VALUE))
                        chpr += printf(" = %lu",value);
                    break;
                case 2:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-26.26s",i,"CroppedImageHeight");
                    if((PRINT_VALUE))
                        chpr += printf(" = %lu",value);
                    break;
                case 3:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-26.26s",i,"CroppedImageLeft");
                    if((PRINT_VALUE))
                        chpr += printf(" = %lu",value);
                    break;
                case 4:
                    if((PRINT_TAGINFO))
                        chpr += printf(".%02d_%-26.26s",i,"CroppedImageRight");
                    if((PRINT_VALUE))
                        chpr += printf(" = %lu",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
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 0x1f30f(%rip), %r12     # 0x58180
xorl %edi, %edi
testb $0x4, 0x2(%r12)
je 0x38e8e
leaq 0xf8d8(%rip), %rdi      # 0x4875a
movq %r14, %rsi
xorl %eax, %eax
callq 0x3120
movl %eax, %edi
callq 0x1707a
movl %eax, %r13d
testl $0x4003333, (%r12)      # imm = 0x4003333
movq %r14, 0x10(%rsp)
movq %r15, 0x8(%rsp)
je 0x390cb
shrq $0x3, %r14
incq %r14
movzwl %bx, %eax
movl %eax, (%rsp)
xorl %ebx, %ebx
movq 0x20(%rsp), %rdi
movl (%rsp), %esi
movq %r15, %rdx
callq 0x4707
movq %rax, %rbp
movl $0x4003333, %edi        # imm = 0x4003333
movq %r15, %rsi
movl 0x4(%rsp), %edx
leaq 0x81f9(%rip), %rcx      # 0x410dc
callq 0x55eb
movzwl (%r12), %eax
testl $0x3003, %eax           # imm = 0x3003
je 0x38f0a
leaq 0x819c(%rip), %rdi      # 0x41097
movq 0x18(%rsp), %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
movq (%r12), %rax
cmpl $0x4, %ebx
ja 0x39030
movl %ebx, %ecx
leaq 0x13a1c(%rip), %rdx     # 0x4c93c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
testl $0x3003, %eax           # imm = 0x3003
je 0x38f4e
leaq 0x14f09(%rip), %rdi     # 0x4de40
xorl %esi, %esi
leaq 0x15166(%rip), %rdx     # 0x4e0a6
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
movq (%r12), %rax
testb $0x30, %al
je 0x38f66
leaq 0x12f64(%rip), %rdi     # 0x4bebd
movq %rbp, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
xorl %eax, %eax
callq 0x96fd
cmpq $0x8, %rbp
ja 0x3906f
leaq 0x139d2(%rip), %rcx     # 0x4c950
movslq (%rcx,%rbp,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x14f38(%rip), %rdi     # 0x4dec6
jmp 0x3909f
testl $0x3003, %eax           # imm = 0x3003
je 0x3900f
leaq 0x14e9f(%rip), %rdi     # 0x4de40
movl $0x4, %esi
leaq 0x14f64(%rip), %rdx     # 0x4df11
jmp 0x39001
testl $0x3003, %eax           # imm = 0x3003
je 0x3900f
leaq 0x14e83(%rip), %rdi     # 0x4de40
movl $0x2, %esi
leaq 0x14f24(%rip), %rdx     # 0x4deed
jmp 0x39001
testl $0x3003, %eax           # imm = 0x3003
je 0x3900f
leaq 0x14e67(%rip), %rdi     # 0x4de40
movl $0x3, %esi
leaq 0x14f1b(%rip), %rdx     # 0x4df00
jmp 0x39001
testl $0x3003, %eax           # imm = 0x3003
je 0x3900f
leaq 0x14e4b(%rip), %rdi     # 0x4de40
movl $0x1, %esi
leaq 0x14eda(%rip), %rdx     # 0x4dedb
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
movq (%r12), %rax
testb $0x30, %al
je 0x390b0
leaq 0x80ad(%rip), %rdi      # 0x410cb
movq %rbp, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
jmp 0x390b0
testl $0x3003, %eax           # imm = 0x3003
je 0x39055
leaq 0x14e02(%rip), %rdi     # 0x4de40
movl %ebx, %esi
leaq 0xf97f(%rip), %rdx      # 0x489c6
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
movq (%r12), %rax
testb $0x30, %al
je 0x390b0
leaq 0x14186(%rip), %rdi     # 0x4d1e6
movq %rbp, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x3120
jmp 0x39028
leaq 0xfdf3(%rip), %rdi      # 0x48e69
callq 0x5c26
jmp 0x390a9
leaq 0x14e4a(%rip), %rdi     # 0x4dece
jmp 0x3909f
leaq 0x14e3d(%rip), %rdi     # 0x4deca
jmp 0x3909f
leaq 0x14e3c(%rip), %rdi     # 0x4ded2
jmp 0x3909f
leaq 0x14e38(%rip), %rdi     # 0x4ded7
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
xorl %eax, %eax
callq 0x971e
movl %r13d, %edi
callq 0x1707a
movl %eax, %r13d
incq %rbx
addq $0x4, %r15
cmpq %rbx, %r14
jne 0x38ebd
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