// File: /workspace/github_c_makefile_star2_O2/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 0x20024(%rip), %r12     # 0x57180
xorl %edi, %edi
testb $0x4, 0x2(%r12)
je 0x37179
leaq 0xf59d(%rip), %rdi      # 0x4670a
movq %r14, %rsi
xorl %eax, %eax
callq 0x3120
movl %eax, %edi
callq 0x160f7
movl %eax, %r13d
testl $0x4003333, (%r12)      # imm = 0x4003333
je 0x373b3
movq %r14, 0x10(%rsp)
shrq $0x3, %r14
incq %r14
movzwl %bx, %eax
movl %eax, (%rsp)
xorl %ebx, %ebx
movq %r15, 0x8(%rsp)
cmpq %rbx, %r14
je 0x373a9
movq 0x20(%rsp), %rdi
movl (%rsp), %esi
movq %r15, %rdx
callq 0x42ba
movq %rax, %rbp
movl $0x4003333, %edi        # imm = 0x4003333
movq %r15, %rsi
movl 0x4(%rsp), %edx
leaq 0x7f05(%rip), %rcx      # 0x3f0dc
callq 0x5100
movzwl (%r12), %eax
testw $0x3003, %ax            # imm = 0x3003
je 0x371fd
leaq 0x7ea9(%rip), %rdi      # 0x3f097
movq 0x18(%rsp), %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
movq (%r12), %rax
cmpl $0x4, %ebx
ja 0x37313
movl %ebx, %ecx
leaq 0x136d9(%rip), %rdx     # 0x4a8ec
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
testw $0x3003, %ax            # imm = 0x3003
je 0x37240
leaq 0x14bc7(%rip), %rdi     # 0x4bdf0
xorl %esi, %esi
leaq 0x14e24(%rip), %rdx     # 0x4c056
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
movq (%r12), %rax
testb $0x30, %al
je 0x37258
leaq 0x12c22(%rip), %rdi     # 0x49e6d
movq %rbp, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
xorl %eax, %eax
callq 0x8f81
cmpq $0x8, %rbp
ja 0x37351
leaq 0x13690(%rip), %rcx     # 0x4a900
movslq (%rcx,%rbp,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x14bf6(%rip), %rdi     # 0x4be76
jmp 0x37381
testw $0x3003, %ax            # imm = 0x3003
je 0x372f5
leaq 0x14b5e(%rip), %rdi     # 0x4bdf0
pushq $0x4
popq %rsi
leaq 0x14c25(%rip), %rdx     # 0x4bec1
jmp 0x372e7
testw $0x3003, %ax            # imm = 0x3003
je 0x372f5
leaq 0x14b45(%rip), %rdi     # 0x4bdf0
pushq $0x2
popq %rsi
leaq 0x14be8(%rip), %rdx     # 0x4be9d
jmp 0x372e7
testw $0x3003, %ax            # imm = 0x3003
je 0x372f5
leaq 0x14b2c(%rip), %rdi     # 0x4bdf0
pushq $0x3
popq %rsi
leaq 0x14be2(%rip), %rdx     # 0x4beb0
jmp 0x372e7
testw $0x3003, %ax            # imm = 0x3003
je 0x372f5
leaq 0x14b13(%rip), %rdi     # 0x4bdf0
pushq $0x1
popq %rsi
leaq 0x14ba4(%rip), %rdx     # 0x4be8b
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
movq (%r12), %rax
testb $0x30, %al
je 0x37392
leaq 0x7dc7(%rip), %rdi      # 0x3f0cb
movq %rbp, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
jmp 0x37392
testw $0x3003, %ax            # imm = 0x3003
je 0x37337
leaq 0x14ad0(%rip), %rdi     # 0x4bdf0
movl %ebx, %esi
leaq 0xf64d(%rip), %rdx      # 0x46976
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
movq (%r12), %rax
testb $0x30, %al
je 0x37392
leaq 0x13e54(%rip), %rdi     # 0x4b196
movq %rbp, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x3120
jmp 0x3730e
leaq 0xfac1(%rip), %rdi      # 0x46e19
callq 0x56e2
jmp 0x3738b
leaq 0x14b18(%rip), %rdi     # 0x4be7e
jmp 0x37381
leaq 0x14b0b(%rip), %rdi     # 0x4be7a
jmp 0x37381
leaq 0x14b0a(%rip), %rdi     # 0x4be82
jmp 0x37381
leaq 0x14b06(%rip), %rdi     # 0x4be87
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
xorl %eax, %eax
callq 0x8fa0
movl %r13d, %edi
callq 0x160f7
movl %eax, %r13d
incq %rbx
addq $0x4, %r15
jmp 0x371a8
movq 0x10(%rsp), %r14
movq 0x8(%rsp), %r15
addq %r15, %r14
movl %r13d, %edi
callq 0x16a4f
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq