// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterEmitValueChangeVec64
void fstWriterEmitValueChangeVec64(void *ctx, fstHandle handle,
                                   uint32_t bits, const uint64_t *val) {
        struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
        if (FST_UNLIKELY(bits <= 64))
        {
                fstWriterEmitValueChange64(ctx, handle, bits, val[0]);
        }
        else if(FST_LIKELY(xc))
        {
                int bq = bits / 64;
                int br = bits & 63;
                int i;
                int w;
                uint32_t v;
                unsigned char* s;
                if (FST_UNLIKELY(bits > xc->outval_alloc_siz))
                {
                        xc->outval_alloc_siz = bits*2 + 1;
                        xc->outval_mem = (unsigned char*)realloc(xc->outval_mem, xc->outval_alloc_siz);
                        if (FST_UNLIKELY(!xc->outval_mem))
                        {
                                fprintf(stderr,
                                        FST_APIMESS "Could not realloc() in fstWriterEmitValueChangeVec64, exiting.\n");
                                exit(255);
                        }
                }
                s = xc->outval_mem;
                {
                        w = bq;
                        v = val[w];
                        for (i = 0; i < br; ++i)
                        {
                                *s++ = '0' + ((v >> (br - i - 1)) & 1);
                        }
                }
                for (w = bq - 1; w >= 0; --w) {
                        v = val[w];
                        for (i = (64 - 4); i >= 0; i -= 4)
                        {
                                s[0] = '0' + ((v >> (i + 3)) & 1);
                                s[1] = '0' + ((v >> (i + 2)) & 1);
                                s[2] = '0' + ((v >> (i + 1)) & 1);
                                s[3] = '0' + ((v >> (i + 0)) & 1);
                                s += 4;
                        }
                }
                fstWriterEmitValueChange(ctx, handle, xc->outval_mem);
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movl %edx, %r12d
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x40, %edx
jbe 0x6413
testq %r14, %r14
je 0x642b
cmpl %r12d, 0x58(%r14)
jb 0x6434
movq 0x50(%r14), %rax
movl %r12d, %ecx
shrl $0x6, %ecx
andl $0x3f, %r12d
movl %ecx, %edx
movl (%r15,%rdx,8), %edx
decl %r12d
cmpl $-0x1, %r12d
je 0x6389
btl %r12d, %edx
setb %sil
orb $0x30, %sil
movb %sil, (%rax)
incq %rax
jmp 0x636c
pushq $0x3c
popq %rdx
testq %rcx, %rcx
jle 0x63fd
decq %rcx
movl (%r15,%rcx,8), %esi
movl %edx, %edi
testl %edi, %edi
js 0x638c
leal 0x3(%rdi), %r8d
movzbl %r8b, %r8d
btl %r8d, %esi
setb %r8b
orb $0x30, %r8b
movb %r8b, (%rax)
leal 0x2(%rdi), %r8d
movzbl %r8b, %r8d
btl %r8d, %esi
setb %r8b
orb $0x30, %r8b
movb %r8b, 0x1(%rax)
leal 0x1(%rdi), %r8d
movzbl %r8b, %r8d
btl %r8d, %esi
setb %r8b
orb $0x30, %r8b
movb %r8b, 0x2(%rax)
btl %edi, %esi
setb %r8b
orb $0x30, %r8b
movb %r8b, 0x3(%rax)
addq $0x4, %rax
addl $-0x4, %edi
jmp 0x639a
movq 0x50(%r14), %rdx
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4363
movq (%r15), %rcx
movq %r14, %rdi
movl %ebx, %esi
movl %r12d, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x618f
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leal 0x1(,%r12,2), %esi
movl %esi, 0x58(%r14)
movq 0x50(%r14), %rdi
callq 0x22c0
movq %rax, 0x50(%r14)
testq %rax, %rax
jne 0x635c
movq 0xfb9b(%rip), %rax      # 0x15ff8
movq (%rax), %rcx
leaq 0xbfd3(%rip), %rdi      # 0x1243a
pushq $0x49
popq %rsi
pushq $0x1
popq %rdx
callq 0x2390
movl $0xff, %edi
callq 0x2380