// File: /workspace/github_c_makefile_star2_O0/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstExtractRvatDataFromFrame
static char *fstExtractRvatDataFromFrame(struct fstReaderContext *xc, fstHandle facidx, char *buf)
{
if(facidx >= xc->rvat_frame_maxhandle)
        {
        return(NULL);
        }

if(xc->signal_lens[facidx] == 1)
        {
        buf[0] = (char)xc->rvat_frame_data[xc->rvat_sig_offs[facidx]];
        buf[1] = 0;
        }
        else
        {
        if(xc->signal_typs[facidx] != FST_VT_VCD_REAL)
                {
                memcpy(buf, xc->rvat_frame_data + xc->rvat_sig_offs[facidx], xc->signal_lens[facidx]);
                buf[xc->signal_lens[facidx]] = 0;
                }
                else
                {
                double d;
                unsigned char *clone_d = (unsigned char *)&d;
                unsigned char *srcdata = xc->rvat_frame_data + xc->rvat_sig_offs[facidx];

                if(xc->double_endian_match)
                        {
                        memcpy(clone_d, srcdata, 8);
                        }
                        else
                        {
                        int j;

                        for(j=0;j<8;j++)
                                {
                                clone_d[j] = srcdata[7-j];
                                }
                        }

                sprintf((char *)buf, "%.16g", d);
                }
        }

return(buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpq 0x1e8(%rcx), %rax
jb 0x11ed0
movq $0x0, -0x8(%rbp)
jmp 0x12020
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movl -0x14(%rbp), %ecx
cmpl $0x1, (%rax,%rcx,4)
jne 0x11f13
movq -0x10(%rbp), %rax
movq 0x1e0(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x210(%rcx), %rcx
movl -0x14(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rax
movb $0x0, 0x1(%rax)
jmp 0x12018
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x14(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x3, %eax
je 0x11f7a
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x1e0(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x210(%rax), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,4), %eax
addq %rax, %rsi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, %edx
callq 0x2250
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rcx
movl -0x14(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
movb $0x0, (%rax,%rcx)
jmp 0x12016
leaq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x1e0(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x210(%rcx), %rcx
movl -0x14(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movb 0x7a(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x11fc8
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
jmp 0x11fff
movl $0x0, -0x3c(%rbp)
cmpl $0x8, -0x3c(%rbp)
jge 0x11ffd
movq -0x38(%rbp), %rax
movl $0x7, %ecx
subl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %dl
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x11fcf
jmp 0x11fff
movq -0x20(%rbp), %rdi
movsd -0x28(%rbp), %xmm0
leaq 0x19355(%rip), %rsi     # 0x2b364
movb $0x1, %al
callq 0x2370
jmp 0x12018
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)