// File: /workspace/github_c_makefile_star2_O3/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 %esi, %ebx
cmpl $0xc, %esi
ja 0x7da7
movl $0x1f7a, %eax           # imm = 0x1F7A
btl %ebx, %eax
jae 0x7da7
movl %edx, %ebp
movq %rdi, %r14
movl $0x10, %r15d
decl %ebx
leaq 0x501e(%rip), %r12      # 0xcc60
cmpl $0xa, %ebx
ja 0x7d17
movslq (%r12,%rbx,4), %rax
addq %r12, %rax
jmpq *%rax
movzbl (%r14), %esi
leaq 0x5209(%rip), %rdi      # 0xce68
xorl %eax, %eax
callq 0x3170
movl $0x1, %r13d
jmp 0x7d5a
movq %r14, %rdi
callq 0x7b8c
leaq 0x6a34(%rip), %rdi      # 0xe6b4
movl %eax, %esi
xorl %eax, %eax
callq 0x3170
movl $0x4, %r13d
jmp 0x7d5a
cmpl $0x0, 0xc881(%rip)      # 0x1451c
je 0x7d32
movzwl (%r14), %eax
rolw $0x8, %ax
movzwl %ax, %eax
jmp 0x7d36
movq %r14, %rdi
callq 0x7b8c
movl %eax, %r13d
leaq 0x4(%r14), %rdi
callq 0x7b8c
leaq 0x51ab(%rip), %rdi      # 0xce77
jmp 0x7d09
cmpl $0x0, 0xc847(%rip)      # 0x1451c
je 0x7d42
movzwl (%r14), %eax
rolw $0x8, %ax
movzwl %ax, %esi
jmp 0x7d46
xorps %xmm0, %xmm0
cvtss2sd (%r14), %xmm0
jmp 0x7d1c
movq %r14, %rdi
callq 0x7b8c
movl %eax, %r13d
leaq 0x4(%r14), %rdi
callq 0x7b8c
leaq 0x5168(%rip), %rdi      # 0xce71
movl %r13d, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x3170
jmp 0x7d2a
movsd (%r14), %xmm0
leaq 0x4751(%rip), %rdi      # 0xc474
movb $0x1, %al
callq 0x3170
movl $0x8, %r13d
jmp 0x7d5a
movzwl (%r14), %eax
movswl %ax, %esi
leaq 0x512d(%rip), %rdi      # 0xce6d
jmp 0x7d4d
movzwl (%r14), %esi
leaq 0x6967(%rip), %rdi      # 0xe6b4
xorl %eax, %eax
callq 0x3170
movl $0x2, %r13d
subl %r13d, %ebp
jle 0x7d98
leaq 0x512a(%rip), %rdi      # 0xce90
xorl %eax, %eax
callq 0x3170
movl %r13d, %eax
addq %rax, %r14
decl %r15d
jne 0x7c42
leaq 0x5110(%rip), %rdi      # 0xce93
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 0x50cf(%rip), %rdi      # 0xce7d
movl %ebx, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3170