// File: /workspace/github_c_makefile_star2_O2/Matthias-Wandel[P]imgcomp/src/exif.c
// Function: PrintFormatNumber
void PrintFormatNumber(void * ValuePtr, int Format, int ByteCount)
{
    int s,n;

    for(n=0;n<16;n++){
        switch(Format){
            case FMT_SBYTE:
            case FMT_BYTE:      printf("%02x",*(uchar *)ValuePtr); s=1;  break;
            case FMT_USHORT:    printf("%d",Get16u(ValuePtr)); s=2;      break;
            case FMT_ULONG:     
            case FMT_SLONG:     printf("%d",Get32s(ValuePtr)); s=4;      break;
            case FMT_SSHORT:    printf("%hd",(signed short)Get16u(ValuePtr)); s=2; break;
            case FMT_URATIONAL:
                printf("%u/%u",Get32s(ValuePtr), Get32s(4+(char *)ValuePtr)); 
                s = 8;
                break;

            case FMT_SRATIONAL: 
                printf("%d/%d",Get32s(ValuePtr), Get32s(4+(char *)ValuePtr)); 
                s = 8;
                break;

            case FMT_SINGLE:    printf("%f",(double)*(float *)ValuePtr); s=8; break;
            case FMT_DOUBLE:    printf("%f",*(double *)ValuePtr);        s=8; break;
            default: 
                printf("Unknown format %d:", Format);
                return;
        }
        ByteCount -= s;
        if (ByteCount <= 0) break;
        printf(", ");
        ValuePtr = (void *)((char *)ValuePtr + s);

    }
    if (n >= 16) printf("...");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %r14
pushq $0x10
popq %rbx
movq %rsi, (%rsp)
leal -0x1(%rsi), %r13d
leaq 0x5878(%rip), %r12      # 0xcc30
subl $0x1, %ebx
jb 0x74e4
cmpl $0xb, %r13d
ja 0x750f
movslq (%r12,%r13,4), %rax
addq %r12, %rax
jmpq *%rax
movzbl (%r14), %esi
leaq 0x5a59(%rip), %rdi      # 0xce38
xorl %eax, %eax
callq 0x3170
pushq $0x1
jmp 0x74c4
movq %r14, %rdi
callq 0x7318
leaq 0x7288(%rip), %rdi      # 0xe684
movl %eax, %esi
xorl %eax, %eax
callq 0x3170
pushq $0x4
jmp 0x74c4
cmpl $0x0, 0xd119(%rip)      # 0x1452c
je 0x74a0
movzwl (%r14), %eax
rolw $0x8, %ax
movzwl %ax, %esi
jmp 0x74a4
cvtss2sd (%r14), %xmm0
jmp 0x7448
cmpl $0x0, 0xd0f8(%rip)      # 0x1452c
je 0x74ad
movzwl (%r14), %eax
rolw $0x8, %ax
movzwl %ax, %eax
jmp 0x74b1
movsd (%r14), %xmm0
leaq 0x5025(%rip), %rdi      # 0xc474
movb $0x1, %al
callq 0x3170
jmp 0x749c
movq %r14, %rdi
callq 0x7318
movl %eax, %r15d
leaq 0x4(%r14), %rdi
callq 0x7318
leaq 0x59ce(%rip), %rdi      # 0xce41
jmp 0x7490
movq %r14, %rdi
callq 0x7318
movl %eax, %r15d
leaq 0x4(%r14), %rdi
callq 0x7318
leaq 0x59b7(%rip), %rdi      # 0xce47
movl %r15d, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x3170
pushq $0x8
jmp 0x74c4
movzwl (%r14), %esi
leaq 0x71d9(%rip), %rdi      # 0xe684
jmp 0x74bb
movzwl (%r14), %eax
movswl %ax, %esi
leaq 0x5982(%rip), %rdi      # 0xce3d
xorl %eax, %eax
callq 0x3170
pushq $0x2
popq %r15
subl %r15d, %ebp
jle 0x7500
leaq 0x598e(%rip), %rdi      # 0xce60
xorl %eax, %eax
callq 0x3170
movl %r15d, %eax
addq %rax, %r14
jmp 0x73b8
leaq 0x5978(%rip), %rdi      # 0xce63
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3170
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5937(%rip), %rdi      # 0xce4d
movq (%rsp), %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3170