// File: /workspace/github_c_makefile_star2_O1/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 0x1fbae(%rip), %r12     # 0x58180
xorl %edi, %edi
testb $0x4, 0x2(%r12)
je 0x385ef
leaq 0x10137(%rip), %rdi     # 0x4871a
movq %r14, %rsi
xorl %eax, %eax
callq 0x3120
movl %eax, %edi
callq 0x16b56
movl %eax, %r13d
testl $0x4003333, (%r12)      # imm = 0x4003333
movq %r14, 0x10(%rsp)
movq %r15, 0x8(%rsp)
je 0x38826
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 0x46cc
movq %rax, %rbp
movl $0x4003333, %edi        # imm = 0x4003333
movq %r15, %rsi
movl 0x4(%rsp), %edx
leaq 0x8a98(%rip), %rcx      # 0x410dc
callq 0x5605
movzwl (%r12), %eax
testl $0x3003, %eax           # imm = 0x3003
je 0x3866b
leaq 0x8a3b(%rip), %rdi      # 0x41097
movq 0x18(%rsp), %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
movq (%r12), %rax
cmpl $0x4, %ebx
ja 0x3878c
movl %ebx, %ecx
leaq 0x1427b(%rip), %rdx     # 0x4c8fc
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
testl $0x3003, %eax           # imm = 0x3003
je 0x386ab
leaq 0x15768(%rip), %rdi     # 0x4de00
xorl %esi, %esi
leaq 0x159c5(%rip), %rdx     # 0x4e066
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
testb $0x30, (%r12)
je 0x386c6
leaq 0x137c4(%rip), %rdi     # 0x4be7d
movq %rbp, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
xorl %eax, %eax
callq 0x95d2
cmpq $0x8, %rbp
ja 0x387ca
leaq 0x14232(%rip), %rcx     # 0x4c910
movslq (%rcx,%rbp,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x15798(%rip), %rdi     # 0x4de86
jmp 0x387fa
testl $0x3003, %eax           # imm = 0x3003
je 0x3876b
leaq 0x156ff(%rip), %rdi     # 0x4de00
movl $0x4, %esi
leaq 0x157c4(%rip), %rdx     # 0x4ded1
jmp 0x38761
testl $0x3003, %eax           # imm = 0x3003
je 0x3876b
leaq 0x156e3(%rip), %rdi     # 0x4de00
movl $0x2, %esi
leaq 0x15784(%rip), %rdx     # 0x4dead
jmp 0x38761
testl $0x3003, %eax           # imm = 0x3003
je 0x3876b
leaq 0x156c7(%rip), %rdi     # 0x4de00
movl $0x3, %esi
leaq 0x1577b(%rip), %rdx     # 0x4dec0
jmp 0x38761
testl $0x3003, %eax           # imm = 0x3003
je 0x3876b
leaq 0x156ab(%rip), %rdi     # 0x4de00
movl $0x1, %esi
leaq 0x1573a(%rip), %rdx     # 0x4de9b
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
testb $0x30, (%r12)
je 0x3880b
leaq 0x894e(%rip), %rdi      # 0x410cb
movq %rbp, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
jmp 0x3880b
testl $0x3003, %eax           # imm = 0x3003
je 0x387ad
leaq 0x15666(%rip), %rdi     # 0x4de00
movl %ebx, %esi
leaq 0x101e3(%rip), %rdx     # 0x48986
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
testb $0x30, (%r12)
je 0x3880b
leaq 0x149eb(%rip), %rdi     # 0x4d1a6
movq %rbp, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x3120
jmp 0x38787
leaq 0x10658(%rip), %rdi     # 0x48e29
callq 0x5c33
jmp 0x38804
leaq 0x156af(%rip), %rdi     # 0x4de8e
jmp 0x387fa
leaq 0x156a2(%rip), %rdi     # 0x4de8a
jmp 0x387fa
leaq 0x156a1(%rip), %rdi     # 0x4de92
jmp 0x387fa
leaq 0x1569d(%rip), %rdi     # 0x4de97
xorl %eax, %eax
callq 0x3120
addl %eax, %r13d
xorl %eax, %eax
callq 0x95f3
movl %r13d, %edi
callq 0x16b56
movl %eax, %r13d
incq %rbx
addq $0x4, %r15
cmpq %rbx, %r14
jne 0x3861e
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