LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterSetSourceStem_2
static void fstWriterSetSourceStem_2(void *ctx, const char *path, unsigned int line, unsigned int use_realpath, int typ)
{
struct fstWriterContext *xc = (struct fstWriterContext *)ctx;

if(xc && path && path[0])
        {
        uint64_t sidx = 0;
        int slen = strlen(path);
#ifndef _WAVE_HAVE_JUDY
        const uint32_t hashmask = FST_PATH_HASHMASK;
        const unsigned char *path2 = (const unsigned char *)path;
	PPvoid_t pv;
#else
        char *path2 = (char *)alloca(slen + 1); /* judy lacks const qualifier in its JudyHSIns definition */
	PPvoid_t pv;
        strcpy(path2, path);
#endif

        pv = JudyHSIns(&(xc->path_array), path2, slen, NULL);
        if(*pv)
                {
                sidx = (intptr_t)(*pv);
                }
                else
                {
                char *rp = NULL;

                sidx = ++xc->path_array_count;
                *pv = (void *)(intptr_t)(xc->path_array_count);

                if(use_realpath)
                        {
                        rp = fstRealpath(
#ifndef _WAVE_HAVE_JUDY
                                (const char *)
#endif
                                path2, NULL);
                        }

                fstWriterSetAttrGeneric(xc, rp ? rp :
#ifndef _WAVE_HAVE_JUDY
                        (const char *)
#endif
                        path2, FST_MT_PATHNAME, sidx);

                if(rp)
                        {
                        free(rp);
                        }
                }

        fstWriterSetAttrDoubleArgGeneric(xc, typ, sidx, line);
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x53ff
movq %rsi, %r13
cmpb $0x0, (%rsi)
je 0x53ff
movl %edx, %r15d
movq %rdi, %r14
movq %r13, %rdi
callq 0x2130
leaq 0x120(%r14), %rdi
movq %r13, %rsi
movl %eax, %edx
movl $0xffff, %ecx           # imm = 0xFFFF
callq 0xaeb8
movq (%rax), %r12
testq %r12, %r12
jne 0x53bd
movl 0x128(%r14), %r12d
incl %r12d
movl %r12d, 0x128(%r14)
movq %r12, (%rax)
pushq $0x3
popq %rdx
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rcx
callq 0x5428
leaq -0x33(%rbp), %rax
movq %r12, %rcx
cmpq $0x80, %rcx
jb 0x53e1
movq %rcx, %rdx
shrq $0x7, %rdx
orb $-0x80, %cl
movb %cl, (%rax)
incq %rax
movq %rdx, %rcx
jmp 0x53c4
movl %r15d, %r8d
movb %cl, (%rax)
testq %r12, %r12
je 0x53ef
movb $0x0, 0x1(%rax)
leaq -0x33(%rbp), %rcx
movq %r14, %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0x5ac6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterSetAttrGeneric
static void fstWriterSetAttrGeneric(void *ctx, const char *comm, int typ, uint64_t arg)
{
struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
if(xc && comm)
        {
        char *s = strdup(comm);
        char *sf = s;

        while(*s)
                {
                if((*s == '\n') || (*s == '\r')) *s = ' ';
                s++;
                }

        fstWriterSetAttrBegin(xc, FST_AT_MISC, typ, sf, arg);
        free(sf);
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x5472
movl %edx, %r14d
movq %rdi, %r15
movq %rsi, %rdi
callq 0x23a0
movq %rax, %r12
movzbl (%rax), %ecx
cmpl $0xa, %ecx
je 0x546a
cmpl $0xd, %ecx
je 0x546a
testl %ecx, %ecx
jne 0x546d
jmp 0x547b
movb $0x20, (%rax)
incq %rax
jmp 0x5457
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
xorl %esi, %esi
movl %r14d, %edx
movq %r12, %rcx
movq %rbx, %r8
callq 0x5ac6
movq %r12, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterSetTimescale
void fstWriterSetTimescale(void *ctx, int ts)
{
struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
if(xc)
        {
        off_t fpos = ftello(xc->handle);
        fstWriterFseeko(xc, xc->handle, FST_HDR_OFFS_TIMESCALE, SEEK_SET);
        fputc(ts & 255, xc->handle);
        fflush(xc->handle);
        fstWriterFseeko(xc, xc->handle, fpos, SEEK_SET);
        }
}

// Assembly:
testq %rdi, %rdi
je 0x551e
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x20b0
movq %rax, %r15
movq (%rbx), %rsi
pushq $0x49
popq %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x421c
movzbl %r14b, %edi
movq (%rbx), %rsi
callq 0x21c0
movq (%rbx), %rdi
callq 0x2280
movq (%rbx), %rsi
movq %rbx, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x421c
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterSetTimescaleFromString
void fstWriterSetTimescaleFromString(void *ctx, const char *s)
{
struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
if(xc && s)
        {
        int mat = 0;
        int seconds_exp = -9;
        int tv = atoi(s);
        const char *pnt = s;

        while(*pnt)
                {
                switch(*pnt)
                        {
                        case 'm': seconds_exp =  -3; mat = 1; break;
                        case 'u': seconds_exp =  -6; mat = 1; break;
                        case 'n': seconds_exp =  -9; mat = 1; break;
                        case 'p': seconds_exp = -12; mat = 1; break;
                        case 'f': seconds_exp = -15; mat = 1; break;
                        case 'a': seconds_exp = -18; mat = 1; break;
                        case 'z': seconds_exp = -21; mat = 1; break;
                        case 's': seconds_exp =   0; mat = 1; break;
                        default: break;
                        }

                if(mat) break;
                pnt++;
                }

        if(tv == 10)
                {
                seconds_exp++;
                }
        else
        if(tv == 100)
                {
                seconds_exp+=2;
                }

        fstWriterSetTimescale(ctx, seconds_exp);
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x5573
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2360
leaq 0xcbad(%rip), %rcx      # 0x120f8
movzbl (%r14), %edx
leal -0x6d(%rdx), %esi
cmpl $0xd, %esi
ja 0x5560
movslq (%rcx,%rsi,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
testl %edx, %edx
je 0x5578
cmpl $0x61, %edx
je 0x5594
cmpl $0x66, %edx
je 0x5590
incq %r14
jmp 0x554b
popq %rbx
popq %r14
popq %rbp
retq
pushq $-0x9
jmp 0x5596
pushq $-0x6
jmp 0x5596
xorl %esi, %esi
jmp 0x5597
pushq $-0x3
jmp 0x5596
pushq $-0xc
jmp 0x5596
pushq $-0x15
jmp 0x5596
pushq $-0xf
jmp 0x5596
pushq $-0x12
popq %rsi
cmpl $0x64, %eax
je 0x55a5
cmpl $0xa, %eax
jne 0x55a8
incl %esi
jmp 0x55a8
addl $0x2, %esi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x54c0
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterSetTimezero
void fstWriterSetTimezero(void *ctx, int64_t tim)
{
struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
if(xc)
        {
        off_t fpos = ftello(xc->handle);
        fstWriterFseeko(xc, xc->handle, FST_HDR_OFFS_TIMEZERO, SEEK_SET);
        fstWriterUint64(xc->handle, (xc->timezero = tim));
        fflush(xc->handle);
        fstWriterFseeko(xc, xc->handle, fpos, SEEK_SET);
        }
}

// Assembly:
testq %rdi, %rdi
je 0x5617
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x20b0
movq %rax, %r15
movq (%rbx), %rsi
movl $0x142, %edx            # imm = 0x142
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x421c
movq (%rbx), %rdi
movq %r14, 0x78(%rbx)
movq %r14, %rsi
callq 0x502a
movq (%rbx), %rdi
callq 0x2280
movq (%rbx), %rsi
movq %rbx, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x421c
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterSetParallelMode
void fstWriterSetParallelMode(void *ctx, int enable)
{
struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
if(xc)
        {
        xc->parallel_was_enabled |= xc->parallel_enabled; /* make sticky */
        xc->parallel_enabled = (enable != 0);
#ifndef FST_WRITER_PARALLEL
        if(xc->parallel_enabled)
                {
                fprintf(stderr, FST_APIMESS "fstWriterSetParallelMode(), FST_WRITER_PARALLEL not enabled during compile, exiting.\n");
                exit(255);
                }
#endif
        }
}

// Assembly:
testq %rdi, %rdi
je 0x568d
movb 0xe9(%rdi), %al
leal (%rax,%rax), %ecx
andb $-0x80, %cl
testl %esi, %esi
setne %dl
shlb $0x6, %dl
andb $-0x41, %al
orb %dl, %al
orb %cl, %al
movb %al, 0xe9(%rdi)
testl %esi, %esi
jne 0x568e
retq
pushq %rbp
movq %rsp, %rbp
movq 0x1095f(%rip), %rax     # 0x15ff8
movq (%rax), %rcx
leaq 0xcc9c(%rip), %rdi      # 0x1233f
pushq $0x5f
popq %rsi
pushq $0x1
popq %rdx
callq 0x2390
movl $0xff, %edi
callq 0x2380
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterSetScope
void fstWriterSetScope(void *ctx, enum fstScopeType scopetype,
                const char *scopename, const char *scopecomp)
{
struct fstWriterContext *xc = (struct fstWriterContext *)ctx;

if(xc)
        {
        fputc(FST_ST_VCD_SCOPE, xc->hier_handle);
        if(/*(scopetype < FST_ST_VCD_MODULE) ||*/ (scopetype > FST_ST_MAX)) { scopetype = FST_ST_VCD_MODULE; }
        fputc(scopetype, xc->hier_handle);
        fprintf(xc->hier_handle, "%s%c%s%c",
                scopename ? scopename : "", 0,
                scopecomp ? scopecomp : "", 0);

        if(scopename)
                {
                xc->hier_file_len += strlen(scopename);
                }
        if(scopecomp)
                {
                xc->hier_file_len += strlen(scopecomp);
                }

        xc->hier_file_len += 4; /* FST_ST_VCD_SCOPE + scopetype + two string terminating zeros */
        xc->numscopes++;
        }
}

// Assembly:
testq %rdi, %rdi
je 0x5a9e
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
movl $0xfe, %edi
callq 0x21c0
xorl %eax, %eax
cmpl $0x16, %r12d
cmovael %eax, %r12d
movq 0x8(%rbx), %rsi
movl %r12d, %edi
callq 0x21c0
testq %r15, %r15
leaq 0xce7a(%rip), %r8       # 0x128b5
movq %r15, %rdx
cmoveq %r8, %rdx
movq 0x8(%rbx), %rdi
testq %r14, %r14
cmovneq %r14, %r8
leaq 0xc94b(%rip), %rsi      # 0x1239f
xorl %ecx, %ecx
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x2210
testq %r15, %r15
je 0x5a71
movq %r15, %rdi
callq 0x2130
addq %rax, 0x38(%rbx)
testq %r14, %r14
je 0x5a84
movq %r14, %rdi
callq 0x2130
addq 0x38(%rbx), %rax
jmp 0x5a88
movq 0x38(%rbx), %rax
addq $0x4, %rax
movq %rax, 0x38(%rbx)
incl 0xb8(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterSetAttrBegin
void fstWriterSetAttrBegin(void *ctx, enum fstAttrType attrtype, int subtype,
                const char *attrname, uint64_t arg)
{
struct fstWriterContext *xc = (struct fstWriterContext *)ctx;

if(xc)
        {
        fputc(FST_ST_GEN_ATTRBEGIN, xc->hier_handle);
        if(/*(attrtype < FST_AT_MISC) ||*/ (attrtype > FST_AT_MAX)) { attrtype = FST_AT_MISC; subtype = FST_MT_UNKNOWN; }
        fputc(attrtype, xc->hier_handle);

        switch(attrtype)
                {
                case FST_AT_ARRAY:      if((subtype < FST_AR_NONE) || (subtype > FST_AR_MAX)) subtype = FST_AR_NONE; break;
                case FST_AT_ENUM:       if((subtype < FST_EV_SV_INTEGER) || (subtype > FST_EV_MAX)) subtype = FST_EV_SV_INTEGER; break;
                case FST_AT_PACK:       if((subtype < FST_PT_NONE) || (subtype > FST_PT_MAX)) subtype = FST_PT_NONE; break;

                case FST_AT_MISC:
                default:                break;
                }

        fputc(subtype, xc->hier_handle);
        fprintf(xc->hier_handle, "%s%c",
                attrname ? attrname : "", 0);

        if(attrname)
                {
                xc->hier_file_len += strlen(attrname);
                }

        xc->hier_file_len += 4; /* FST_ST_GEN_ATTRBEGIN + type + subtype + string terminating zero */
        xc->hier_file_len += fstWriterVarint(xc->hier_handle, arg);
        }
}

// Assembly:
testq %rdi, %rdi
je 0x5ba5
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %rbx
movq %r8, -0x30(%rbp)
movq 0x8(%rdi), %rsi
movl $0xfc, %edi
callq 0x21c0
xorl %r14d, %r14d
cmpl $0x4, %r13d
pushq $0x8
popq %rax
cmovael %eax, %r12d
cmovael %r14d, %r13d
movq 0x8(%rbx), %rsi
movl %r13d, %edi
callq 0x21c0
leaq 0xc610(%rip), %rax      # 0x12130
movslq (%rax,%r13,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpl $0x4, %r12d
jmp 0x5b33
cmpl $0x10, %r12d
cmovael %r14d, %r12d
movq 0x8(%rbx), %rsi
movl %r12d, %edi
callq 0x21c0
movq 0x8(%rbx), %rdi
testq %r15, %r15
leaq 0xcd64(%rip), %rdx      # 0x128b5
cmovneq %r15, %rdx
leaq 0xc847(%rip), %rsi      # 0x123a3
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x2210
testq %r15, %r15
je 0x5b78
movq %r15, %rdi
callq 0x2130
addq 0x38(%rbx), %rax
jmp 0x5b7c
movq 0x38(%rbx), %rax
addq $0x4, %rax
movq %rax, 0x38(%rbx)
movq 0x8(%rbx), %rdi
movq -0x30(%rbp), %rsi
callq 0x5060
cltq
addq %rax, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstUtilityBinToEscConvertedLen
int fstUtilityBinToEscConvertedLen(const unsigned char *s, int len)
{
const unsigned char *src = s;
int dlen = 0;
int i;

for(i=0;i<len;i++)
        {
        switch(src[i])
                {
                case '\a':      /* fallthrough */
                case '\b':	/* fallthrough */
                case '\f':	/* fallthrough */
                case '\n':	/* fallthrough */
                case '\r':	/* fallthrough */
                case '\t':	/* fallthrough */
                case '\v':	/* fallthrough */
                case '\'':	/* fallthrough */
                case '\"':	/* fallthrough */
                case '\\':	/* fallthrough */
                case '\?':      dlen += 2; break;
                default:        if((src[i] > ' ') && (src[i] <= '~')) /* no white spaces in output */
                                        {
					dlen++;
                                        }
                                        else
                                        {
					dlen += 4;
                                        }
                                break;
                }
        }

return(dlen);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
xorl %ecx, %ecx
testl %esi, %esi
cmovlel %ecx, %esi
movl $0x2, %edx
movabsq $0x400000020000021, %r8 # imm = 0x400000020000021
xorl %eax, %eax
cmpq %rcx, %rsi
je 0x5ed1
movb (%rdi,%rcx), %r9b
movzbl %r9b, %r10d
leal -0x7(%r10), %ebx
movl %edx, %r11d
cmpl $0x7, %ebx
jb 0x5eb1
addl $-0x22, %r10d
cmpl $0x3a, %r10d
ja 0x5eb9
btq %r10, %r8
movl %edx, %r11d
jae 0x5eb9
addl %r11d, %eax
incq %rcx
jmp 0x5e85
addb $-0x21, %r9b
xorl %r10d, %r10d
cmpb $0x5e, %r9b
setae %r10b
leal (%r10,%r10,2), %r11d
incl %r11d
jmp 0x5eb1
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterCreateMmaps
static void fstWriterCreateMmaps(struct fstWriterContext *xc)
{
off_t curpos = ftello(xc->handle);

fflush(xc->hier_handle);

/* write out intermediate header */
fstWriterFseeko(xc, xc->handle, FST_HDR_OFFS_START_TIME, SEEK_SET);
fstWriterUint64(xc->handle, xc->firsttime);
fstWriterUint64(xc->handle, xc->curtime);
fstWriterFseeko(xc, xc->handle, FST_HDR_OFFS_NUM_SCOPES, SEEK_SET);
fstWriterUint64(xc->handle, xc->numscopes);
fstWriterUint64(xc->handle, xc->numsigs);
fstWriterUint64(xc->handle, xc->maxhandle);
fstWriterUint64(xc->handle, xc->secnum);
fstWriterFseeko(xc, xc->handle, curpos, SEEK_SET);
fflush(xc->handle);

/* do mappings */
if(!xc->valpos_mem)
        {
        fflush(xc->valpos_handle);
	errno = 0;
	if(xc->maxhandle)
		{
	        fstWriterMmapSanity(xc->valpos_mem = (uint32_t *)fstMmap(NULL, xc->maxhandle * 4 * sizeof(uint32_t), PROT_READ|PROT_WRITE, MAP_SHARED, fileno(xc->valpos_handle), 0), __FILE__, __LINE__, "xc->valpos_mem");
		}
        }
if(!xc->curval_mem)
        {
        fflush(xc->curval_handle);
	errno = 0;
	if(xc->maxvalpos)
		{
	        fstWriterMmapSanity(xc->curval_mem = (unsigned char *)fstMmap(NULL, xc->maxvalpos, PROT_READ|PROT_WRITE, MAP_SHARED, fileno(xc->curval_handle), 0), __FILE__, __LINE__, "xc->curval_handle");
		}
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x20b0
movq %rax, %r14
movq 0x8(%rbx), %rdi
callq 0x2280
movq (%rbx), %rsi
pushq $0x9
popq %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x421c
movq (%rbx), %rdi
movq 0x98(%rbx), %rsi
callq 0x502a
movq (%rbx), %rdi
movq 0x90(%rbx), %rsi
callq 0x502a
movq (%rbx), %rsi
pushq $0x29
popq %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x421c
movq (%rbx), %rdi
movl 0xb8(%rbx), %esi
callq 0x502a
movq (%rbx), %rdi
movl 0x6c(%rbx), %esi
callq 0x502a
movq (%rbx), %rdi
movl 0x68(%rbx), %esi
callq 0x502a
movq (%rbx), %rdi
movl 0xa8(%rbx), %esi
callq 0x502a
movq (%rbx), %rsi
movq %rbx, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x421c
movq (%rbx), %rdi
callq 0x2280
cmpq $0x0, 0x40(%rbx)
jne 0x60f7
movq 0x18(%rbx), %rdi
callq 0x2280
callq 0x2070
andl $0x0, (%rax)
movl 0x68(%rbx), %r14d
testl %r14d, %r14d
je 0x60f7
shll $0x2, %r14d
shlq $0x2, %r14
movq 0x18(%rbx), %rdi
callq 0x2260
pushq $0x3
popq %rdx
pushq $0x1
popq %rcx
xorl %edi, %edi
movq %r14, %rsi
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x2140
movq %rax, 0x40(%rbx)
leaq 0xc7d0(%rip), %rdx      # 0x128ba
movq %rax, %rdi
movl $0x3f5, %esi            # imm = 0x3F5
callq 0x4fcf
cmpq $0x0, 0x48(%rbx)
je 0x6103
popq %rbx
popq %r14
popq %rbp
retq
movq 0x20(%rbx), %rdi
callq 0x2280
callq 0x2070
andl $0x0, (%rax)
movl 0x70(%rbx), %r14d
testq %r14, %r14
je 0x60fe
movq 0x20(%rbx), %rdi
callq 0x2260
pushq $0x3
popq %rdx
pushq $0x1
popq %rcx
xorl %edi, %edi
movq %r14, %rsi
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x2140
movq %rax, 0x48(%rbx)
leaq 0xc782(%rip), %rdx      # 0x128c9
movq %rax, %rdi
movl $0x3fe, %esi            # imm = 0x3FE
popq %rbx
popq %r14
popq %rbp
jmp 0x4fcf
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterEmitValueChange32
void fstWriterEmitValueChange32(void *ctx, fstHandle handle,
                                uint32_t bits, uint32_t val) {
        char buf[32];
        char *s = buf;
        uint32_t i;
        for (i = 0; i < bits; ++i)
        {
                *s++ = '0' + ((val >> (bits - i - 1)) & 1);
        }
        fstWriterEmitValueChange(ctx, handle, buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
decl %edx
leaq -0x20(%rbp), %rax
cmpl $-0x1, %edx
je 0x6180
btl %edx, %ecx
setb %r8b
orb $0x30, %r8b
movb %r8b, (%rax)
incq %rax
decl %edx
jmp 0x6166
leaq -0x20(%rbp), %rdx
callq 0x4363
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterEmitValueChange64
void fstWriterEmitValueChange64(void *ctx, fstHandle handle,
                                uint32_t bits, uint64_t val) {
        char buf[64];
        char *s = buf;
        uint32_t i;
        for (i = 0; i < bits; ++i)
        {
                *s++ = '0' + ((val >> (bits - i - 1)) & 1);
        }
        fstWriterEmitValueChange(ctx, handle, buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edx, %eax
negq %rax
decl %edx
xorl %r8d, %r8d
movq %rax, %r9
addq %r8, %r9
je 0x61c1
btq %rdx, %rcx
setb %r9b
orb $0x30, %r9b
movb %r9b, -0x40(%rbp,%r8)
incq %r8
decl %edx
jmp 0x61a1
leaq -0x40(%rbp), %rdx
callq 0x4363
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterEmitDumpActive
void fstWriterEmitDumpActive(void *ctx, int enable)
{
struct fstWriterContext *xc = (struct fstWriterContext *)ctx;

if(xc)
        {
        struct fstBlackoutChain *b = (struct fstBlackoutChain *)calloc(1, sizeof(struct fstBlackoutChain));

        b->tim = xc->curtime;
        b->active = (enable != 0);

        xc->num_blackouts++;
        if(xc->blackout_curr)
                {
                xc->blackout_curr->next = b;
                xc->blackout_curr = b;
                }
                else
                {
                xc->blackout_head = b;
                xc->blackout_curr = b;
                }
        }
}

// Assembly:
testq %rdi, %rdi
je 0x6775
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
pushq $0x1
popq %rdi
pushq $0x18
popq %rsi
callq 0x21e0
movq 0x90(%rbx), %rcx
movq %rcx, 0x8(%rax)
testl %r14d, %r14d
setne 0x10(%rax)
incl 0xd8(%rbx)
movq 0xd0(%rbx), %rcx
leaq 0xc8(%rbx), %rdx
testq %rcx, %rcx
cmovneq %rcx, %rdx
movq %rax, (%rdx)
movq %rax, 0xd0(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstReaderPopScope
const char *fstReaderPopScope(void *ctx)
{
struct fstReaderContext *xc = (struct fstReaderContext *)ctx;
if(xc && xc->curr_hier)
        {
        struct fstCurrHier *ch = xc->curr_hier;
        if(xc->curr_hier->prev)
                {
                xc->curr_flat_hier_nam[xc->curr_hier->prev->len] = 0;
                }
                else
                {
                *xc->curr_flat_hier_nam = 0;
                }
        xc->curr_hier = xc->curr_hier->prev;
        free(ch);
        return(xc->curr_flat_hier_nam ? xc->curr_flat_hier_nam : "");
        }

return(NULL);
}

// Assembly:
testq %rdi, %rdi
je 0x6840
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x278(%rdi), %rdi
testq %rdi, %rdi
je 0x6843
movq (%rdi), %rcx
movq 0x288(%rbx), %rax
testq %rcx, %rcx
je 0x6810
movslq 0x10(%rcx), %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movq 0x278(%rbx), %rax
movq (%rax), %rax
movq %rax, 0x278(%rbx)
callq 0x2050
movq 0x288(%rbx), %rcx
testq %rcx, %rcx
leaq 0xc07b(%rip), %rax      # 0x128b5
cmovneq %rcx, %rax
jmp 0x6845
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstReaderPushScope
const char *fstReaderPushScope(void *ctx, const char *nam, void *user_info)
{
struct fstReaderContext *xc = (struct fstReaderContext *)ctx;
if(xc)
        {
        struct fstCurrHier *ch = (struct fstCurrHier *)malloc(sizeof(struct fstCurrHier));
        int chl = xc->curr_hier ? xc->curr_hier->len : 0;
        int len = chl + 1 + strlen(nam);
        if(len >= xc->flat_hier_alloc_len)
                {
                xc->curr_flat_hier_nam = xc->curr_flat_hier_nam ? (char *)realloc(xc->curr_flat_hier_nam, len+1) : (char *)malloc(len+1);
                }

        if(chl)
                {
                xc->curr_flat_hier_nam[chl] = '.';
                strcpy(xc->curr_flat_hier_nam + chl + 1, nam);
                }
                else
                {
                strcpy(xc->curr_flat_hier_nam, nam);
                len--;
                }

        ch->len = len;
        ch->prev = xc->curr_hier;
        ch->user_info = user_info;
        xc->curr_hier = ch;
        return(xc->curr_flat_hier_nam);
        }

return(NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorl %r13d, %r13d
testq %rdi, %rdi
je 0x694e
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, -0x38(%rbp)
pushq $0x18
popq %rdi
callq 0x2270
movq %rax, %r12
movq 0x278(%rbx), %rax
testq %rax, %rax
je 0x68b0
movl 0x10(%rax), %r13d
movq %r14, -0x30(%rbp)
movq %r14, %rdi
callq 0x2130
movq %rax, %r15
leal (%rax,%r13), %r14d
incl %r14d
cmpl 0x290(%rbx), %r14d
jl 0x68f8
movq 0x288(%rbx), %rdi
leal 0x1(%r14), %eax
movslq %eax, %rsi
testq %rdi, %rdi
je 0x68e9
callq 0x22c0
jmp 0x68f1
movq %rsi, %rdi
callq 0x2270
movq %rax, 0x288(%rbx)
movq 0x288(%rbx), %rdi
testl %r13d, %r13d
je 0x691b
movslq %r13d, %rax
movb $0x2e, (%rdi,%rax)
movq 0x288(%rbx), %rcx
leaq (%rcx,%rax), %rdi
incq %rdi
jmp 0x691e
movl %r15d, %r14d
movq -0x30(%rbp), %rsi
callq 0x20a0
movl %r14d, 0x10(%r12)
movq 0x278(%rbx), %rax
movq %rax, (%r12)
movq -0x38(%rbp), %rax
movq %rax, 0x8(%r12)
movq %r12, 0x278(%rbx)
movq 0x288(%rbx), %r13
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstReaderGetFacProcessMask
int fstReaderGetFacProcessMask(void *ctx, fstHandle facidx)
{
struct fstReaderContext *xc = (struct fstReaderContext *)ctx;

if(xc)
        {
        facidx--;
        if(facidx<xc->maxhandle)
                {
                int process_idx = facidx/8;
                int process_bit = facidx&7;

                return( (xc->process_mask[process_idx]&(1<<process_bit)) != 0 );
                }
        }
return(0);
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x69c0
decl %esi
cmpl 0x38(%rdi), %esi
jae 0x69c0
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
shrl $0x3, %eax
movq 0x60(%rdi), %rcx
movzbl (%rcx,%rax), %ecx
andl $0x7, %esi
xorl %eax, %eax
btl %esi, %ecx
setb %al
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstReaderSetFacProcessMask
void fstReaderSetFacProcessMask(void *ctx, fstHandle facidx)
{
struct fstReaderContext *xc = (struct fstReaderContext *)ctx;

if(xc)
        {
        facidx--;
        if(facidx<xc->maxhandle)
                {
                int idx = facidx/8;
                int bitpos = facidx&7;

                xc->process_mask[idx] |= (1<<bitpos);
                }
        }
}

// Assembly:
testq %rdi, %rdi
je 0x69eb
decl %esi
cmpl 0x38(%rdi), %esi
jae 0x69eb
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
shrl $0x3, %eax
andb $0x7, %sil
movl $0x1, %edx
movl %esi, %ecx
shll %cl, %edx
movq 0x60(%rdi), %rcx
orb %dl, (%rcx,%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstReaderIterateHierRewind
int fstReaderIterateHierRewind(void *ctx)
{
struct fstReaderContext *xc = (struct fstReaderContext *)ctx;
int pass_status = 0;

if(xc)
        {
        pass_status = 1;
        if(!xc->fh)
                {
                pass_status = fstReaderRecreateHierFile(xc);
                }

        xc->do_rewind = 1;
        }

return(pass_status);
}

// Assembly:
testq %rdi, %rdi
je 0x6c54
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x6c57
pushq $0x1
popq %rax
jmp 0x6c5f
xorl %eax, %eax
retq
movq %rbx, %rdi
callq 0x6c6d
orb $0x1, 0x294(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstReaderVarint64
static uint64_t fstReaderVarint64(FILE *f)
{
unsigned char buf[16];
unsigned char *mem = buf;
uint64_t rc = 0;
int ch;

do
        {
        ch = fgetc(f);
        *(mem++) = ch;
        } while(ch & 0x80);
mem--;

for(;;)
        {
        rc <<= 7;
        rc |= (uint64_t)(*mem & 0x7f);
        if(mem == buf)
                {
                break;
                }
        mem--;
        }

return(rc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x21a0
movb %al, -0x20(%rbp,%r14)
incq %r14
testb %al, %al
js 0x742c
xorl %eax, %eax
movq %rax, %rcx
shlq $0x7, %rcx
movzbl -0x21(%rbp,%r14), %eax
andl $0x7f, %eax
orq %rcx, %rax
decq %r14
jne 0x7442
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstReaderVarint32
static uint32_t fstReaderVarint32(FILE *f)
{
unsigned char buf[5];
unsigned char *mem = buf;
uint32_t rc = 0;
int ch;

do
        {
        ch = fgetc(f);
        *(mem++) = ch;
        } while(ch & 0x80);
mem--;

for(;;)
        {
        rc <<= 7;
        rc |= (uint32_t)(*mem & 0x7f);
        if(mem == buf)
                {
                break;
                }
        mem--;
        }

return(rc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x21a0
movb %al, -0x15(%rbp,%r14)
incq %r14
testb %al, %al
js 0x74a1
xorl %eax, %eax
movl %eax, %ecx
shll $0x7, %ecx
movzbl -0x16(%rbp,%r14), %eax
andl $0x7f, %eax
orl %ecx, %eax
decq %r14
jne 0x74b7
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstVcdID
static void fstVcdID(char *buf, unsigned int value)
{
char *pnt = buf;

/* zero is illegal for a value...it is assumed they start at one */
while (value)
        {
        value--;
        *(pnt++) = (char)('!' + value % 94);
        value = value / 94;
        }

*pnt = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
movl $0x5e, %ecx
testl %eax, %eax
je 0x7bb4
decl %eax
xorl %edx, %edx
divl %ecx
addb $0x21, %dl
movb %dl, (%rdi)
incq %rdi
jmp 0x7ba0
movb $0x0, (%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstReaderUint64
static uint64_t fstReaderUint64(FILE *f)
{
uint64_t val = 0;
unsigned char buf[sizeof(uint64_t)];
unsigned int i;

fstFread(buf, sizeof(uint64_t), 1, f);
for(i=0;i<sizeof(uint64_t);i++)
        {
        val <<= 8;
        val |= buf[i];
        }

return(val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, %rcx
leaq -0x8(%rbp), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
callq 0x20c0
xorl %ecx, %ecx
xorl %eax, %eax
cmpq $0x8, %rcx
je 0x8392
shlq $0x8, %rax
movzbl -0x8(%rbp,%rcx), %edx
orq %rdx, %rax
incq %rcx
jmp 0x837b
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstReaderOpen
void *fstReaderOpen(const char *nam)
{
struct fstReaderContext *xc = (struct fstReaderContext *)calloc(1, sizeof(struct fstReaderContext));

if((!nam)||(!(xc->f=fopen(nam, "rb"))))
        {
        free(xc);
        xc=NULL;
        }
        else
        {
        int flen = strlen(nam);
        char *hf = (char *)calloc(1, flen + 6);
        int rc;

#if defined(__MINGW32__) || defined(FST_MACOSX)
        setvbuf(xc->f, (char *)NULL, _IONBF, 0);   /* keeps gzip from acting weird in tandem with fopen */
#endif

        memcpy(hf, nam, flen);
        strcpy(hf + flen, ".hier");
        xc->fh = fopen(hf, "rb");

        free(hf);
        xc->filename = strdup(nam);
        rc = fstReaderInit(xc);

        if((rc) && (xc->vc_section_count) && (xc->maxhandle) && ((xc->fh)||(xc->contains_hier_section||(xc->contains_hier_section_lz4))))
                {
                /* more init */
                xc->do_rewind = 1;
                }
                else
                {
                fstReaderClose(xc);
                xc = NULL;
                }
        }

return(xc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
pushq $0x1
popq %rdi
movl $0x106b0, %esi          # imm = 0x106B0
callq 0x21e0
movq %rax, %rbx
testq %r14, %r14
je 0x84b3
leaq 0xa1fe(%rip), %rsi      # 0x12607
movq %r14, %rdi
callq 0x2330
movq %rax, (%rbx)
testq %rax, %rax
je 0x84b3
movq %r14, %rdi
callq 0x2130
movq %rax, %r15
addl $0x6, %eax
movslq %eax, %rsi
pushq $0x1
popq %rdi
callq 0x21e0
movq %rax, %r12
movslq %r15d, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2240
movl $0x6569682e, (%r12,%r15) # imm = 0x6569682E
movw $0x72, 0x4(%r12,%r15)
leaq 0xa1a6(%rip), %rsi      # 0x12607
movq %r12, %rdi
callq 0x2330
movq %rax, 0x8(%rbx)
movq %r12, %rdi
callq 0x2050
movq %r14, %rdi
callq 0x23a0
movq %rax, 0x180(%rbx)
movq %rbx, %rdi
callq 0x7bb9
testl %eax, %eax
je 0x84bd
cmpq $0x0, 0x48(%rbx)
je 0x84bd
cmpl $0x0, 0x38(%rbx)
je 0x84bd
cmpq $0x0, 0x8(%rbx)
jne 0x84aa
testb $0x50, 0x7a(%rbx)
je 0x84bd
orb $0x1, 0x294(%rbx)
jmp 0x84c7
movq %rbx, %rdi
callq 0x2050
jmp 0x84c5
movq %rbx, %rdi
callq 0x84d3
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstReaderClose
void fstReaderClose(void *ctx)
{
struct fstReaderContext *xc = (struct fstReaderContext *)ctx;

if(xc)
        {
        fstReaderDeallocateScopeData(xc);
        fstReaderDeallocateRvatData(xc);
        free(xc->rvat_sig_offs); xc->rvat_sig_offs = NULL;

        free(xc->process_mask); xc->process_mask = NULL;
        free(xc->blackout_times); xc->blackout_times = NULL;
        free(xc->blackout_activity); xc->blackout_activity = NULL;
        free(xc->temp_signal_value_buf); xc->temp_signal_value_buf = NULL;
        free(xc->signal_typs); xc->signal_typs = NULL;
        free(xc->signal_lens); xc->signal_lens = NULL;
        free(xc->filename); xc->filename = NULL;

        if(xc->fh)
                {
                tmpfile_close(&xc->fh, &xc->fh_nam);
                }

        if(xc->f)
                {
                tmpfile_close(&xc->f, &xc->f_nam);
                if(xc->filename_unpacked)
                        {
                        unlink(xc->filename_unpacked);
                        free(xc->filename_unpacked);
                        }
                }

        free(xc);
        }
}

// Assembly:
testq %rdi, %rdi
je 0x8600
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x288(%rdi), %rdi
callq 0x2050
andq $0x0, 0x288(%rbx)
movq 0x278(%rbx), %rdi
testq %rdi, %rdi
je 0x851a
movq (%rdi), %r14
callq 0x2050
movq %r14, 0x278(%rbx)
movq %r14, %rdi
jmp 0x8501
movq %rbx, %rdi
callq 0x8601
movq 0x210(%rbx), %rdi
callq 0x2050
andq $0x0, 0x210(%rbx)
movq 0x60(%rbx), %rdi
callq 0x2050
andq $0x0, 0x60(%rbx)
movq 0x1a0(%rbx), %rdi
callq 0x2050
andq $0x0, 0x1a0(%rbx)
movq 0x1a8(%rbx), %rdi
callq 0x2050
andq $0x0, 0x1a8(%rbx)
movq 0x70(%rbx), %rdi
callq 0x2050
andq $0x0, 0x70(%rbx)
movq 0x58(%rbx), %rdi
callq 0x2050
andq $0x0, 0x58(%rbx)
movq 0x50(%rbx), %rdi
callq 0x2050
andq $0x0, 0x50(%rbx)
movq 0x180(%rbx), %rdi
callq 0x2050
andq $0x0, 0x180(%rbx)
xorl %eax, %eax
cmpq %rax, 0x8(%rbx)
je 0x85c2
leaq 0x8(%rbx), %rdi
leaq 0x106a8(%rbx), %rsi
callq 0x3811
cmpq $0x0, (%rbx)
je 0x85f4
leaq 0x106a0(%rbx), %rsi
movq %rbx, %rdi
callq 0x3811
movq 0x188(%rbx), %rdi
testq %rdi, %rdi
je 0x85f4
callq 0x2080
movq 0x188(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstReaderDeallocateRvatData
static void fstReaderDeallocateRvatData(void *ctx)
{
struct fstReaderContext *xc = (struct fstReaderContext *)ctx;
if(xc)
        {
        free(xc->rvat_chain_mem); xc->rvat_chain_mem = NULL;
        free(xc->rvat_frame_data); xc->rvat_frame_data = NULL;
        free(xc->rvat_time_table); xc->rvat_time_table = NULL;
        free(xc->rvat_chain_table); xc->rvat_chain_table = NULL;
        free(xc->rvat_chain_table_lengths); xc->rvat_chain_table_lengths = NULL;

        xc->rvat_data_valid = 0;
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x220(%rdi), %rdi
callq 0x2050
andq $0x0, 0x220(%rbx)
movq 0x1e0(%rbx), %rdi
callq 0x2050
andq $0x0, 0x1e0(%rbx)
movq 0x1c8(%rbx), %rdi
callq 0x2050
andq $0x0, 0x1c8(%rbx)
movq 0x1f0(%rbx), %rdi
callq 0x2050
andq $0x0, 0x1f0(%rbx)
movq 0x1f8(%rbx), %rdi
callq 0x2050
andq $0x0, 0x1f8(%rbx)
andb $-0x2, 0x1c0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWritex
static void fstWritex(struct fstReaderContext *xc, void *v, int len)
{
unsigned char *s = (unsigned char *)v;

if(len)
        {
        if(len < FST_WRITEX_MAX)
                {
                if(xc->writex_pos + len >= FST_WRITEX_MAX)
                        {
                        fstWritex(xc, NULL, 0);
                        }

                memcpy(xc->writex_buf + xc->writex_pos, s, len);
                xc->writex_pos += len;
                }
                else
                {
                fstWritex(xc, NULL, 0);
                if (write(xc->writex_fd, s, len)) { };
                }
        }
        else
        {
        if(xc->writex_pos)
                {
                if(write(xc->writex_fd, xc->writex_buf, xc->writex_pos)) { };
                xc->writex_pos = 0;
                }
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %edx, %edx
je 0xa054
movl %edx, %r14d
movq %rsi, %r15
cmpl $0xffff, %edx           # imm = 0xFFFF
jg 0xa084
movl 0x698(%rbx), %eax
leal (%rax,%r14), %ecx
cmpl $0x10000, %ecx          # imm = 0x10000
jl 0xa033
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x9ff0
movl 0x698(%rbx), %eax
cltq
leaq (%rbx,%rax), %rdi
addq $0x6a0, %rdi            # imm = 0x6A0
movslq %r14d, %rdx
movq %r15, %rsi
callq 0x2240
addl %r14d, 0x698(%rbx)
jmp 0xa079
movslq 0x698(%rbx), %rdx
testq %rdx, %rdx
je 0xa079
movl 0x69c(%rbx), %edi
leaq 0x6a0(%rbx), %rsi
callq 0x20e0
andl $0x0, 0x698(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x9ff0
movl 0x69c(%rbx), %edi
movl %r14d, %edx
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x20e0
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstVcdIDForFwrite
static int fstVcdIDForFwrite(char *buf, unsigned int value)
{
char *pnt = buf;

/* zero is illegal for a value...it is assumed they start at one */
while (value)
        {
        value--;
        *(pnt++) = (char)('!' + value % 94);
        value = value / 94;
        }

return(pnt - buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
xorl %ecx, %ecx
movl $0x5e, %esi
testl %eax, %eax
je 0xa0cd
decl %eax
xorl %edx, %edx
divl %esi
addb $0x21, %dl
movb %dl, (%rdi,%rcx)
incq %rcx
jmp 0xa0b8
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstGetSVarint64
static int64_t fstGetSVarint64(unsigned char *mem, int *skiplen)
{
unsigned char *mem_orig = mem;
int64_t rc = 0;
const int64_t one = 1;
const int siz = sizeof(int64_t) * 8;
int shift = 0;
unsigned char byt;

do      {
        byt = *(mem++);
        rc |= ((int64_t)(byt & 0x7f)) << shift;
        shift += 7;

        } while(byt & 0x80);

if((shift<siz) && (byt & 0x40))
        {
        rc |= -(one << shift); /* sign extend */
        }

*skiplen = mem - mem_orig;

return(rc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movabsq $-0x7, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
addq $0x7, %rdx
movzbl (%rdi,%r8), %r9d
movl %r9d, %r10d
andl $0x7f, %r10d
movl %edx, %ecx
shlq %cl, %r10
orq %r10, %rax
incq %r8
testb %r9b, %r9b
js 0xa0e4
leal 0x7(%rdx), %ecx
movabsq $-0x1, %rdi
shlq %cl, %rdi
xorl %ecx, %ecx
cmpb $0x40, %r9b
cmovbq %rcx, %rdi
cmpq $0x39, %rdx
cmovaeq %rcx, %rdi
orq %rdi, %rax
movl %r8d, (%rsi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstReaderVarint32WithSkip
static uint32_t fstReaderVarint32WithSkip(FILE *f, uint32_t *skiplen)
{
unsigned char buf[5];
unsigned char *mem = buf;
uint32_t rc = 0;
int ch;

do
        {
        ch = fgetc(f);
        *(mem++) = ch;
        } while(ch & 0x80);
*skiplen = mem - buf;
mem--;

for(;;)
        {
        rc <<= 7;
        rc |= (uint32_t)(*mem & 0x7f);
        if(mem == buf)
                {
                break;
                }
        mem--;
        }

return(rc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x21a0
movb %al, -0x1d(%rbp,%r15)
incq %r15
testb %al, %al
js 0xa141
movl %r15d, (%rbx)
xorl %eax, %eax
movl %eax, %ecx
shll $0x7, %ecx
movzbl -0x1e(%rbp,%r15), %eax
andl $0x7f, %eax
orl %ecx, %eax
decq %r15
jne 0xa15a
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
cmpq %r15, 0x1e8(%rdi)
jbe 0xae1c
movq %rdx, %rbx
movq %rdi, %r14
movq 0x50(%rdi), %rax
movl (%rax,%r15,4), %edx
cmpq $0x1, %rdx
jne 0xae2c
movq 0x1e0(%r14), %rax
movq 0x210(%r14), %rcx
movl (%rcx,%r15,4), %ecx
movb (%rax,%rcx), %al
movb %al, (%rbx)
movb $0x0, 0x1(%rbx)
jmp 0xae1e
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x58(%r14), %rax
cmpb $0x3, (%rax,%r15)
jne 0xae73
movq 0x1e0(%r14), %rax
movq 0x210(%r14), %rcx
movl (%rcx,%r15,4), %ecx
testb $0x2, 0x7a(%r14)
jne 0xae9b
addq %rax, %rcx
addq $0x7, %rcx
xorl %edx, %edx
leaq -0x20(%rbp), %rax
cmpq $0x8, %rdx
je 0xae9e
movb (%rcx), %sil
movb %sil, -0x20(%rbp,%rdx)
incq %rdx
decq %rcx
jmp 0xae5d
movq 0x210(%r14), %rax
movl (%rax,%r15,4), %esi
addq 0x1e0(%r14), %rsi
movq %rbx, %rdi
callq 0x2240
movq 0x50(%r14), %rax
movl (%rax,%r15,4), %eax
movb $0x0, (%rbx,%rax)
jmp 0xae1e
addq %rcx, %rax
movsd (%rax), %xmm0
leaq 0x78a7(%rip), %rsi      # 0x12750
movq %rbx, %rdi
movb $0x1, %al
callq 0x2370
jmp 0xae1e
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstUtilityFreeEnumTable
void fstUtilityFreeEnumTable(struct fstETab *etab)
{
if(etab)
	{
	free(etab->literal_arr);
	free(etab->val_arr);
	free(etab->name);
	free(etab);
	}
}

// Assembly:
testq %rdi, %rdi
je 0xb4a3
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x2050
movq 0x18(%rbx), %rdi
callq 0x2050
movq (%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterSVarint
static int fstWriterSVarint(FILE *handle, int64_t v)
{
unsigned char buf[15]; /* ceil(64/7) = 10 + sign byte padded way up */
unsigned char byt;
unsigned char *pnt = buf;
int more = 1;
int len;

do      {
        byt = v | 0x80;
        v >>= 7;

        if (((!v) && (!(byt & 0x40))) || ((v == -1) && (byt & 0x40)))
                {
                more = 0;
                byt &= 0x7f;
                }

        *(pnt++) = byt;
        } while(more);

len = pnt-buf;
fstFwrite(buf, len, 1, handle);
return(len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rsi, %rax
movq %rdi, %rcx
movabsq $0x100000000, %rdi      # imm = 0x100000000
leaq -0xf(%rbp), %rdx
movq %rdi, %rsi
cmpq $0x40, %rax
jb 0xb547
movq %rax, %r8
sarq $0x7, %r8
cmpq $-0x1, %r8
sete %r9b
movl %eax, %r10d
andl $0x40, %r10d
shrl $0x6, %r10d
testb %r10b, %r9b
jne 0xb547
orb $-0x80, %al
movb %al, (%rdx)
incq %rdx
addq %rdi, %rsi
movq %r8, %rax
jmp 0xb513
andb $0x7f, %al
movb %al, (%rdx)
sarq $0x20, %rsi
leaq -0xf(%rbp), %rdi
pushq $0x1
popq %rdx
callq 0x2390
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/lz4.c
// Function: LZ4_compress_destSize
int LZ4_compress_destSize(const char* src, char* dst, int* srcSizePtr, int targetDstSize)
{
#if (HEAPMODE)
    void* ctx = ALLOCATOR(1, sizeof(LZ4_stream_t));   /* malloc-calloc always properly aligned */
#else
    LZ4_stream_t ctxBody;
    void* ctx = &ctxBody;
#endif

    int result = LZ4_compress_destSize_extState(ctx, src, dst, srcSizePtr, targetDstSize);

#if (HEAPMODE)
    FREEMEM(ctx);
#endif
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4028, %rsp           # imm = 0x4028
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
leaq -0x4048(%rbp), %rdi
xorl %r13d, %r13d
movl $0x4020, %edx           # imm = 0x4020
xorl %esi, %esi
callq 0x2190
movl (%r15), %ecx
cmpl $0x7e000000, %ecx       # imm = 0x7E000000
ja 0xc9eb
movl $0xff, %esi
movl %ecx, %eax
xorl %edx, %edx
divl %esi
leal (%rcx,%rax), %r13d
addl $0x10, %r13d
leaq -0x4048(%rbp), %rdi
cmpl %ebx, %r13d
jle 0xca03
cmpl $0x1000a, %ecx          # imm = 0x1000A
jg 0xca17
pushq $0x2
jmp 0xca19
pushq $0x1
popq %r9
movq %r12, %rsi
movq %r14, %rdx
movl %ebx, %r8d
callq 0xb59a
jmp 0xca2c
pushq $0x1
popq %r9
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
movl %ebx, %r8d
callq 0x11296
addq $0x4028, %rsp           # imm = 0x4028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bluecmd[P]fst-example/gtkwave/lz4.c
// Function: LZ4_loadDict
int LZ4_loadDict (LZ4_stream_t* LZ4_dict, const char* dictionary, int dictSize)
{
    LZ4_stream_t_internal* dict = (LZ4_stream_t_internal*) LZ4_dict;
    const BYTE* p = (const BYTE*)dictionary;
    const BYTE* const dictEnd = p + dictSize;
    const BYTE* base;

    if ((dict->initCheck) || (dict->currentOffset > 1 GB))  /* Uninitialized structure, or reuse overflow */
        LZ4_resetStream(LZ4_dict);

    if (dictSize < (int)HASH_UNIT)
    {
        dict->dictionary = NULL;
        dict->dictSize = 0;
        return 0;
    }

    if ((dictEnd - p) > 64 KB) p = dictEnd - 64 KB;
    dict->currentOffset += 64 KB;
    base = p - dict->currentOffset;
    dict->dictionary = p;
    dict->dictSize = (U32)(dictEnd - p);
    dict->currentOffset += dict->dictSize;

    while (p <= dictEnd-HASH_UNIT)
    {
        LZ4_putPosition(p, dict->hashTable, byU32, base);
        p+=3;
    }

    return dict->dictSize;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, 0x4004(%rdi)
jne 0xca91
movl 0x4000(%rbx), %r12d
cmpl $0x40000001, %r12d      # imm = 0x40000001
jb 0xcaa3
xorl %r12d, %r12d
movl $0x4020, %edx           # imm = 0x4020
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2190
cmpl $0x7, %r15d
jg 0xcac3
andq $0x0, 0x4008(%rbx)
andl $0x0, 0x4018(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movslq %r15d, %rcx
addq %r14, %rcx
leaq -0x10000(%rcx), %rdx
cmpl $0x10001, %r15d         # imm = 0x10001
cmovbq %r14, %rdx
movq %rdx, 0x4008(%rbx)
movl %ecx, %eax
subl %edx, %eax
movl %eax, 0x4018(%rbx)
movl %r12d, %esi
addl $0x10000, %esi          # imm = 0x10000
leal (%r12,%rax), %edi
addl $0x10000, %edi          # imm = 0x10000
movl %edi, 0x4000(%rbx)
addq $-0x8, %rcx
movabsq $0xcf1bbcdcbb, %rdi     # imm = 0xCF1BBCDCBB
cmpq %rcx, %rdx
ja 0xcaba
movq (%rdx), %r8
imulq %rdi, %r8
shrq $0x1c, %r8
andl $0xfff, %r8d            # imm = 0xFFF
movl %esi, (%rbx,%r8,4)
addq $0x3, %rdx
addl $0x3, %esi
jmp 0xcb13