// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterEmitValueChangeVec32
void fstWriterEmitValueChangeVec32(void *ctx, fstHandle handle,
                                   uint32_t bits, const uint32_t *val) {
        struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
        if (FST_UNLIKELY(bits <= 32))
        {
                fstWriterEmitValueChange32(ctx, handle, bits, val[0]);
        }
        else if(FST_LIKELY(xc))
        {
                int bq = bits / 32;
                int br = bits & 31;
                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 fstWriterEmitValueChangeVec32, 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 = (32 - 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 $0x20, %edx
jbe 0x62bd
testq %r14, %r14
je 0x62d5
cmpl %r12d, 0x58(%r14)
jb 0x62de
movq 0x50(%r14), %rax
movl %r12d, %ecx
shrl $0x5, %ecx
andl $0x1f, %r12d
movl %ecx, %edx
movl (%r15,%rdx,4), %edx
decl %r12d
cmpl $-0x1, %r12d
je 0x6233
btl %r12d, %edx
setb %sil
orb $0x30, %sil
movb %sil, (%rax)
incq %rax
jmp 0x6216
pushq $0x1c
popq %rdx
testq %rcx, %rcx
jle 0x62a7
decq %rcx
movl (%r15,%rcx,4), %esi
movl %edx, %edi
testl %edi, %edi
js 0x6236
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 0x6244
movq 0x50(%r14), %rdx
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4363
movl (%r15), %ecx
movq %r14, %rdi
movl %ebx, %esi
movl %r12d, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6158
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 0x6206
movq 0xfcf1(%rip), %rax      # 0x15ff8
movq (%rax), %rcx
leaq 0xc0df(%rip), %rdi      # 0x123f0
pushq $0x49
popq %rsi
pushq $0x1
popq %rdx
callq 0x2390
movl $0xff, %edi
callq 0x2380