// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/print.c
// Function: print_srational
void
print_srational(FILE *inptr,unsigned long count,unsigned short byteorder,
                unsigned long offset)
{
    int i,j;
    long num,denom;
    int chpr = 0;

    if(count)
    {
        num = (long)read_ulong(inptr,byteorder,offset);
        if(feof(inptr) || ferror(inptr))
        {
            clearerr(inptr);
            setcharsprinted(chpr);
            return;
        }
        denom = (long)read_ulong(inptr,byteorder,HERE);
        if(feof(inptr) || ferror(inptr))
        {
            clearerr(inptr);
            setcharsprinted(chpr);
            return;
        }
        if(PRINT_RAW_VALUES)
            chpr += printf("%ld/%ld = ",num,denom);
        if(num == 0UL)
            chpr += printf("0");
        else
            chpr += printf("%g",(double)((double)num/(double)denom));
    }
    if(PRINT_MULTIVAL_ALL)
    {
        for(i = 1; i < count; ++i)
        {
            num = (long)read_ulong(inptr,byteorder,HERE);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            denom = (long)read_ulong(inptr,byteorder,HERE);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            if(PRINT_RAW_VALUES)
                chpr += printf("%ld/%ld = ",num,denom);
            if(num == 0UL)
                chpr += printf(",0");
            else
                chpr += printf(",%g",(double)((double)num/(double)denom));
        }
    }
    else
    {
#define MAX 3UL
        j = count > MAX + 2 ? MAX : count;
        for(i = 1; i < j; ++i)
        {
            num = (long)read_ulong(inptr,byteorder,HERE);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            denom = (long)read_ulong(inptr,byteorder,HERE);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            if(PRINT_RAW_VALUES)
                chpr += printf("%ld/%ld = ",num,denom);
            if(num == 0UL)
                chpr += printf(",0");
            else
                chpr += printf(",%g",(double)((double)num/(double)denom));
        }
        if(count > j)
        {
            chpr += printf(" ... ");
            offset += (unsigned long)(count - j) * 8UL;
            fseek(inptr,offset,SEEK_SET);
            num = (long)read_ulong(inptr,byteorder,HERE);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            denom = (long)read_ulong(inptr,byteorder,HERE);
            if(feof(inptr) || ferror(inptr))
            {
                clearerr(inptr);
                setcharsprinted(chpr);
                return;
            }
            if(PRINT_RAW_VALUES)
                chpr += printf("%ld/%ld = ",num,denom);
            if(num == 0UL)
                chpr += printf(",0 (%lu)",count);
            else
                chpr += printf(",%g (%lu)",(double)((double)num/(double)denom),count);
            if(PRINT_ADDRESS)
                chpr += printf(" -> @%lu",offset);
        }
#undef MAX
    }
    setcharsprinted(chpr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdi, %r14
movzwl %dx, %r15d
movq %rsi, (%rsp)
testq %rsi, %rsi
je 0x86e4
movq %r14, %rdi
movl %r15d, %esi
movq %rbx, %rdx
callq 0x42ba
movq %rax, %r13
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x86d5
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x86d5
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r14, %rdi
movl %r15d, %esi
callq 0x42ba
movq %rax, %rbp
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x86d5
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
je 0x895a
movq %r14, %rdi
callq 0x31b0
xorl %ebp, %ebp
jmp 0x8945
xorl %ebp, %ebp
leaq 0x4ea93(%rip), %rax     # 0x57180
testb $0x8, 0x3(%rax)
jne 0x87de
movq %rbx, 0x10(%rsp)
movq (%rsp), %rax
cmpq $0x6, %rax
pushq $0x3
popq %rcx
cmovbl %eax, %ecx
movl %ecx, 0xc(%rsp)
pushq $0x1
popq %rbx
cmpl 0xc(%rsp), %ebx
jge 0x88af
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r14, %rdi
movl %r15d, %esi
callq 0x42ba
movq %rax, %r13
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x893d
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x893d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r14, %rdi
movl %r15d, %esi
callq 0x42ba
movq %rax, %r12
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x893d
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x893d
leaq 0x4e9f8(%rip), %rax     # 0x57180
testb $0x2, 0x3(%rax)
je 0x87a4
leaq 0x3707f(%rip), %rdi     # 0x3f814
movq %r13, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
testq %r13, %r13
je 0x87c7
cvtsi2sd %r13, %xmm0
cvtsi2sd %r12, %xmm1
divsd %xmm1, %xmm0
leaq 0x3703f(%rip), %rdi     # 0x3f7fd
movb $0x1, %al
callq 0x3120
jmp 0x87d5
leaq 0x3702c(%rip), %rdi     # 0x3f7fa
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
incl %ebx
jmp 0x8711
pushq $0x1
popq %rbx
cmpq (%rsp), %rbx
jae 0x8945
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r14, %rdi
movl %r15d, %esi
callq 0x42ba
movq %rax, %r12
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x893d
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x893d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r14, %rdi
movl %r15d, %esi
callq 0x42ba
movq %rax, %r13
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x893d
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x893d
leaq 0x4e928(%rip), %rax     # 0x57180
testb $0x2, 0x3(%rax)
je 0x8874
leaq 0x36faf(%rip), %rdi     # 0x3f814
movq %r12, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
testq %r12, %r12
je 0x8897
cvtsi2sd %r12, %xmm0
cvtsi2sd %r13, %xmm1
divsd %xmm1, %xmm0
leaq 0x36f6f(%rip), %rdi     # 0x3f7fd
movb $0x1, %al
callq 0x3120
jmp 0x88a5
leaq 0x36f5c(%rip), %rdi     # 0x3f7fa
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
incq %rbx
jmp 0x87e1
movslq 0xc(%rsp), %rax
movq (%rsp), %rbx
subq %rax, %rbx
jbe 0x8945
leaq 0x36e83(%rip), %rdi     # 0x3f74b
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movq 0x10(%rsp), %rax
leaq (%rax,%rbx,8), %r12
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x3210
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r14, %rdi
movl %r15d, %esi
callq 0x42ba
movq %rax, %r13
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x893d
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x893d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r14, %rdi
movl %r15d, %esi
callq 0x42ba
movq %rax, %r15
movq %r14, %rdi
callq 0x31a0
testl %eax, %eax
jne 0x893d
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
je 0x89bc
movq %r14, %rdi
callq 0x31b0
movl %ebp, %edi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x16a4f
leaq 0x4e81f(%rip), %rax     # 0x57180
xorl %r12d, %r12d
testb $0x2, 0x3(%rax)
je 0x8981
leaq 0x36ea3(%rip), %rdi     # 0x3f814
movq %r13, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x3120
movl %eax, %r12d
testq %r13, %r13
je 0x89a4
cvtsi2sd %r13, %xmm0
cvtsi2sd %rbp, %xmm1
divsd %xmm1, %xmm0
leaq 0x3e82d(%rip), %rdi     # 0x471c8
movb $0x1, %al
callq 0x3120
jmp 0x89b2
leaq 0x37278(%rip), %rdi     # 0x3fc23
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
addl %r12d, %ebp
jmp 0x86e6
leaq 0x4e7bd(%rip), %rax     # 0x57180
testb $0x2, 0x3(%rax)
je 0x89df
leaq 0x36e44(%rip), %rdi     # 0x3f814
movq %r13, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
testq %r13, %r13
je 0x8a06
cvtsi2sd %r13, %xmm0
cvtsi2sd %r15, %xmm1
divsd %xmm1, %xmm0
leaq 0x36e11(%rip), %rdi     # 0x3f80a
movq (%rsp), %rsi
movb $0x1, %al
callq 0x3120
jmp 0x8a18
leaq 0x36df4(%rip), %rdi     # 0x3f801
movq (%rsp), %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
leaq 0x4e75f(%rip), %rax     # 0x57180
testb $0x3, 0x2(%rax)
je 0x8945
leaq 0x36d2b(%rip), %rdi     # 0x3f75d
movq %r12, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
jmp 0x8945