LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/dropletzhu[P]msuite/pim_sender.c
// Function: make_pim_null_register
int make_pim_null_register()
{
	struct ip *iph;
	struct _SPimRegHdr *pim_reg_header;
	UINT2 *flags;
	char *header = datagram;

	if( has_local_source ) {
		iph = (struct ip*)(header);
		iph->ip_hl = 5;
		iph->ip_v = 4;
		iph->ip_tos = 0;
		iph->ip_len = htons(length);
		iph->ip_id = htonl(random());
		iph->ip_off = 0;
		iph->ip_ttl = 255;
		iph->ip_p = IPPROTO_PIM;
		iph->ip_sum = 0;
		iph->ip_src.s_addr = inet_addr (local_source);
		iph->ip_dst.s_addr = inet_addr (rp);

		header += sizeof(struct ip);
	}

	pim_reg_header = (struct _SPimRegHdr*)(header); 
	pim_reg_header->msgtpe = PIMSM_REGISTER_MSG;
	pim_reg_header->pimver = 2;
	pim_reg_header->nulbit = 1;
	flags = (UINT2*)(header + 4);
	*flags = htons(*flags);
	pim_reg_header->u2Checksum = csum((unsigned short*)pim_reg_header,sizeof(struct _SPimRegHdr)>>1);

	if( has_local_source ) {
		iph->ip_sum = csum((unsigned short*)iph, length>>1);
	}

	return 0;
}

// Assembly:
pushq %rax
cmpl $0x0, 0x2e6d(%rip)      # 0x40b4
je 0x12b2
movw $0x45, 0x2e6e(%rip)     # 0x40c0
movzwl 0x2e3f(%rip), %eax      # 0x4098
rolw $0x8, %ax
movw %ax, 0x2e5e(%rip)       # 0x40c2
callq 0x10b0
bswapl %eax
movw %ax, 0x2e52(%rip)       # 0x40c4
movl $0x67ff0000, 0x2e4a(%rip) # imm = 0x67FF0000
movw $0x0, 0x2e45(%rip)      # 0x40ca
leaq 0x12e34(%rip), %rdi     # 0x140c0
callq 0x10a0
movl %eax, 0x2e35(%rip)      # 0x40cc
leaq 0x12e32(%rip), %rdi     # 0x140d0
callq 0x10a0
movl %eax, 0x2e27(%rip)      # 0x40d0
leaq 0x2e24(%rip), %rax      # 0x40d4
jmp 0x12b9
leaq 0x2e07(%rip), %rax      # 0x40c0
movb $0x21, (%rax)
movl $0x4000, %ecx           # imm = 0x4000
orl 0x4(%rax), %ecx
rolw $0x8, %cx
movw %cx, 0x4(%rax)
movl $0x5, %edx
xorl %ecx, %ecx
movq %rax, %rsi
movzwl (%rsi), %edi
addq $0x2, %rsi
addq %rdi, %rcx
decl %edx
cmpl $0x1, %edx
ja 0x12d6
movq %rcx, %rdx
shrq $0x10, %rdx
movzwl %cx, %ecx
addl %ecx, %edx
movl %edx, %ecx
shrl $0x10, %ecx
addl %edx, %ecx
notl %ecx
movw %cx, 0x2(%rax)
cmpl $0x0, 0x2dad(%rip)      # 0x40b4
je 0x1351
movl 0x2d89(%rip), %ecx      # 0x4098
sarl %ecx
testl %ecx, %ecx
jle 0x1333
incl %ecx
leaq 0x2da2(%rip), %rdx      # 0x40c0
xorl %eax, %eax
movzwl (%rdx), %esi
addq $0x2, %rdx
addq %rsi, %rax
decl %ecx
cmpl $0x1, %ecx
jg 0x1320
jmp 0x1335
xorl %eax, %eax
movq %rax, %rcx
shrq $0x10, %rcx
movzwl %ax, %eax
addl %eax, %ecx
movl %ecx, %eax
shrl $0x10, %eax
addl %ecx, %eax
notl %eax
movw %ax, 0x2d79(%rip)       # 0x40ca
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/dropletzhu[P]msuite/pim_sender.c
// Function: usage
void usage()
{
	printf("Usage: ./pim_sender -i local_source -r rp -t type -s mcast_source -g mcast_group -p mcast_port -c count -l length\n");
	printf(" -i local_source    local source address\n");
	printf(" -r rp              rp address\n");
	printf(" -t type            1: null register;  2: register;  3: register-stop\n");	
	printf(" -s mcast_source    multicast payload source address\n");
	printf(" -g mcast_group     multicast payload group address\n");
	printf(" -p mcast_port      multicast payload port\n");
	printf(" -c count           the packet count, default count is unlimited\n");
	printf(" -l length          pim packet length, default is 256 bytes\n");
	printf(" Version:           %s\n", version);
}

// Assembly:
pushq %rax
leaq 0xa6e(%rip), %rdi       # 0x215d
callq 0x1040
leaq 0xad4(%rip), %rdi       # 0x21cf
callq 0x1040
leaq 0xaf1(%rip), %rdi       # 0x21f8
callq 0x1040
leaq 0xb04(%rip), %rdi       # 0x2217
callq 0x1040
leaq 0xb3e(%rip), %rdi       # 0x225d
callq 0x1040
leaq 0xb67(%rip), %rdi       # 0x2292
callq 0x1040
leaq 0xb8f(%rip), %rdi       # 0x22c6
callq 0x1040
leaq 0xbae(%rip), %rdi       # 0x22f1
callq 0x1040
leaq 0xbe3(%rip), %rdi       # 0x2332
callq 0x1040
leaq 0x8f1(%rip), %rdi       # 0x204c
leaq 0x902(%rip), %rsi       # 0x2064
xorl %eax, %eax
popq %rcx
jmp 0x1070
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_4/exercise_4_10/calculator.c
// Function: get_line
int get_line(char line[], unsigned int max_line_len)
{
  int c, i;

  for (i = 0; i < max_line_len - 1 && (c = getchar()) != EOF && c != '\n'; ++i)
  {
    line[i] = c;
  }

  if (c == '\n')
  {
    line[i] = c;
    ++i;
  }

  line[i] = '\0';

  return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
decl %ebp
je 0x17f2
movl %ebp, %r15d
xorl %r14d, %r14d
callq 0x1080
cmpl $-0x1, %eax
je 0x17e7
cmpl $0xa, %eax
je 0x17e7
movb %al, (%rbx,%r14)
incq %r14
cmpq %r14, %r15
jne 0x17ca
jmp 0x17ea
movl %r14d, %ebp
cmpl $0xa, %eax
sete %al
jmp 0x17f4
xorl %ebp, %ebp
testb $0x1, %al
je 0x1800
movl %ebp, %eax
movb $0xa, (%rbx,%rax)
incl %ebp
movslq %ebp, %rax
movb $0x0, (%rbx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_4/exercise_4_10/calculator.c
// Function: getop
int getop(char s[])
{
  int i = 0, c;

  while ((s[0] = c = line[line_i++]) == ' ' || c == '\t')
    ;

  s[1] = '\0';

  if (isalpha(c))
  {
    var = c;
    return VARGET;
  }

  if (!isdigit(c) && c != '.' && c != '-')
  {
    return c;
  }

  if (c == '-')
  {
    int next = line[line_i++];
    if (next == '\n' || next == ' ' || next == '\t' || next == '\0')
    {
      --line_i;
      return '-';
    }
    else if (!isdigit(next) && next != '.') // not a number
    {
      return next;
    }
    else
    {
      s[++i] = c = next;
    }
  }
  else
  {
    c = line[line_i++];
  }

  if (isdigit(c))
  {
    while (isdigit(s[++i] = c = line[line_i++]))
      ;
  }

  if (c == '.')
  {
    while (isdigit(s[++i] = c = line[line_i++]))
      ;
  }

  --line_i;

  return NUMBER;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x287c(%rip), %r14      # 0x40a0
movslq 0x2865(%rip), %rax      # 0x4090
leal 0x1(%rax), %ecx
movl %ecx, 0x285c(%rip)      # 0x4090
movzbl (%rax,%r14), %r15d
movb %r15b, (%rbx)
cmpl $0x9, %r15d
je 0x1824
cmpl $0x20, %r15d
je 0x1824
movsbq %r15b, %r12
movb $0x0, 0x1(%rbx)
callq 0x10b0
movq (%rax), %rcx
movzwl (%rcx,%r12,2), %edx
btl $0xa, %edx
jb 0x187e
leal -0x2f(%r15), %esi
cmpb $-0x3, %sil
ja 0x188f
andl $0x800, %edx            # imm = 0x800
jne 0x188f
movsbl %r15b, %ecx
jmp 0x1965
movb %r15b, 0x27eb(%rip)     # 0x4070
movl $0x61, %ecx
jmp 0x1965
movslq 0x27fa(%rip), %r8       # 0x4090
leal 0x1(%r8), %esi
xorl %edx, %edx
movl %esi, 0x27ee(%rip)      # 0x4090
movb (%r8,%r14), %dil
movsbl %dil, %esi
cmpb $0x2d, %r15b
jne 0x18f2
movzbl %dil, %edx
cmpl $0x20, %edx
ja 0x1973
movl %edx, %edx
movabsq $0x100000601, %r9       # imm = 0x100000601
btq %rdx, %r9
jae 0x1973
movl %r8d, 0x27b6(%rip)      # 0x4090
movl $0x2d, %edi
xorl %edx, %edx
xorl %r8d, %r8d
movl $0x2d, %esi
movl %esi, %ecx
movl %edi, %esi
testb %r8b, %r8b
je 0x1965
movq (%rax), %rcx
movslq %esi, %rdi
testb $0x8, 0x1(%rcx,%rdi,2)
je 0x1928
movl %edx, %edx
movq (%rax), %rcx
movslq 0x2785(%rip), %rsi      # 0x4090
leal 0x1(%rsi), %edi
movl %edi, 0x277c(%rip)      # 0x4090
movsbq (%rsi,%r14), %rsi
movb %sil, 0x1(%rbx,%rdx)
incq %rdx
testb $0x8, 0x1(%rcx,%rsi,2)
jne 0x1901
cmpl $0x2e, %esi
jne 0x195a
movl %edx, %ecx
addq %rbx, %rcx
incq %rcx
movq (%rax), %rdx
movslq 0x2751(%rip), %rsi      # 0x4090
leal 0x1(%rsi), %edi
movl %edi, 0x2748(%rip)      # 0x4090
movsbq (%rsi,%r14), %rsi
movb %sil, (%rcx)
incq %rcx
testb $0x8, 0x1(%rdx,%rsi,2)
jne 0x1935
decl 0x2730(%rip)            # 0x4090
movl $0x30, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
cmpb $0x2e, %dil
je 0x1998
movsbq %dil, %rdx
movzwl (%rcx,%rdx,2), %ecx
andl $0x800, %ecx            # imm = 0x800
jne 0x1998
xorl %edx, %edx
movl $0x2d, %edi
xorl %r8d, %r8d
jmp 0x18e9
movb %dil, 0x1(%rbx)
movb $0x1, %r8b
movl $0x1, %edx
movl %esi, %edi
jmp 0x18e9
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aegis128l/aesnic/encrypt.c
// Function: aegis128L_enc_aut_step
void aegis128L_enc_aut_step(const unsigned char *plaintextblk, unsigned char *ciphertextblk, __m128i *state)
{
        __m128i ct0,ct1;
        __m128i tmp;
        __m128i msg0 = _mm_load_si128((__m128i*)plaintextblk);
        __m128i msg1 = _mm_load_si128((__m128i*)(plaintextblk+16));

        //encryption
        ct0 = _mm_xor_si128(msg0, state[6]);
        ct0 = _mm_xor_si128(ct0,  state[1]);
        ct1 = _mm_xor_si128(msg1, state[2]);
        ct1 = _mm_xor_si128(ct1,  state[5]);
        ct0 = _mm_xor_si128(ct0,  _mm_and_si128(state[2], state[3]));
        ct1 = _mm_xor_si128(ct1,  _mm_and_si128(state[6], state[7]));
    	_mm_store_si128((__m128i*)ciphertextblk, ct0);
    	_mm_store_si128((__m128i*)(ciphertextblk+16), ct1);

        //state update function
        tmp = state[7];
        state[7] = _mm_aesenc_si128(state[6],state[7]);
        state[6] = _mm_aesenc_si128(state[5],state[6]);
        state[5] = _mm_aesenc_si128(state[4],state[5]);
        state[4] = _mm_aesenc_si128(state[3],state[4]);
        state[3] = _mm_aesenc_si128(state[2],state[3]);
        state[2] = _mm_aesenc_si128(state[1],state[2]);
        state[1] = _mm_aesenc_si128(state[0],state[1]);
        state[0] = _mm_aesenc_si128(tmp,state[0]);

        //message is used to update the state.
        state[0] = _mm_xor_si128(state[0],msg0);
        state[4] = _mm_xor_si128(state[4],msg1);
}

// Assembly:
vmovdqa (%rdi), %xmm0
vmovdqa 0x10(%rdi), %xmm1
vmovdqa 0x20(%rdx), %xmm2
vmovdqa 0x30(%rdx), %xmm3
vmovdqa 0x60(%rdx), %xmm4
vmovdqa 0x70(%rdx), %xmm5
vpternlogq $0x6a, 0x10(%rdx), %xmm2, %xmm3
vpternlogq $0x96, %xmm0, %xmm4, %xmm3
vpternlogq $0x6a, 0x50(%rdx), %xmm4, %xmm5
vpternlogq $0x96, %xmm1, %xmm2, %xmm5
vmovdqa %xmm3, (%rsi)
vmovdqa %xmm5, 0x10(%rsi)
vmovdqa 0x70(%rdx), %xmm2
vmovdqa 0x60(%rdx), %xmm3
vaesenc %xmm2, %xmm3, %xmm4
vmovdqa %xmm4, 0x70(%rdx)
vmovdqa 0x50(%rdx), %xmm4
vaesenc %xmm3, %xmm4, %xmm3
vmovdqa %xmm3, 0x60(%rdx)
vmovdqa 0x40(%rdx), %xmm3
vaesenc %xmm4, %xmm3, %xmm4
vmovdqa %xmm4, 0x50(%rdx)
vmovdqa (%rdx), %xmm4
vmovdqa 0x10(%rdx), %xmm5
vmovdqa 0x20(%rdx), %xmm6
vmovdqa 0x30(%rdx), %xmm7
vaesenc %xmm3, %xmm7, %xmm3
vaesenc %xmm7, %xmm6, %xmm7
vmovdqa %xmm7, 0x30(%rdx)
vaesenc %xmm6, %xmm5, %xmm6
vmovdqa %xmm6, 0x20(%rdx)
vaesenc %xmm5, %xmm4, %xmm5
vmovdqa %xmm5, 0x10(%rdx)
vaesenc %xmm4, %xmm2, %xmm2
vpxor %xmm0, %xmm2, %xmm0
vmovdqa %xmm0, (%rdx)
vpxor %xmm1, %xmm3, %xmm0
vmovdqa %xmm0, 0x40(%rdx)
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aegis128l/aesnic/encrypt.c
// Function: aegis128L_dec_aut_step
void aegis128L_dec_aut_step(unsigned char *plaintextblk,
       const unsigned char *ciphertextblk, __m128i *state)
{
        __m128i msg0 = _mm_load_si128((__m128i*)ciphertextblk);
        __m128i msg1 = _mm_load_si128((__m128i*)(ciphertextblk+16));
        __m128i tmp;

        //decryption
        msg0 = _mm_xor_si128(msg0, state[6]);
        msg0 = _mm_xor_si128(msg0, state[1]);
        msg1 = _mm_xor_si128(msg1, state[2]);
        msg1 = _mm_xor_si128(msg1, state[5]);
        msg0 = _mm_xor_si128(msg0, _mm_and_si128(state[2], state[3]));
        msg1 = _mm_xor_si128(msg1, _mm_and_si128(state[6], state[7]));
        _mm_store_si128((__m128i*)plaintextblk, msg0);
        _mm_store_si128((__m128i*)(plaintextblk+16), msg1);

        //state update function
        tmp = state[7];
        state[7] = _mm_aesenc_si128(state[6],state[7]);
        state[6] = _mm_aesenc_si128(state[5],state[6]);
        state[5] = _mm_aesenc_si128(state[4],state[5]);
        state[4] = _mm_aesenc_si128(state[3],state[4]);
        state[3] = _mm_aesenc_si128(state[2],state[3]);
        state[2] = _mm_aesenc_si128(state[1],state[2]);
        state[1] = _mm_aesenc_si128(state[0],state[1]);
        state[0] = _mm_aesenc_si128(tmp,state[0]);

        //message is used to update the state.
        state[0] = _mm_xor_si128(state[0],msg0);
        state[4] = _mm_xor_si128(state[4],msg1);
}

// Assembly:
vmovdqa (%rsi), %xmm0
vmovdqa 0x10(%rsi), %xmm1
vmovdqa 0x20(%rdx), %xmm2
vmovdqa 0x60(%rdx), %xmm3
vpand 0x30(%rdx), %xmm2, %xmm4
vpxor 0x10(%rdx), %xmm0, %xmm0
vpand 0x70(%rdx), %xmm3, %xmm5
vpternlogq $0x96, %xmm4, %xmm3, %xmm0
vpxor 0x50(%rdx), %xmm1, %xmm1
vpternlogq $0x96, %xmm5, %xmm2, %xmm1
vmovdqa %xmm0, (%rdi)
vmovdqa %xmm1, 0x10(%rdi)
vmovdqa 0x70(%rdx), %xmm2
vmovdqa 0x60(%rdx), %xmm3
vaesenc %xmm2, %xmm3, %xmm4
vmovdqa %xmm4, 0x70(%rdx)
vmovdqa 0x50(%rdx), %xmm4
vaesenc %xmm3, %xmm4, %xmm3
vmovdqa %xmm3, 0x60(%rdx)
vmovdqa 0x40(%rdx), %xmm3
vaesenc %xmm4, %xmm3, %xmm4
vmovdqa %xmm4, 0x50(%rdx)
vmovdqa (%rdx), %xmm4
vmovdqa 0x10(%rdx), %xmm5
vmovdqa 0x20(%rdx), %xmm6
vmovdqa 0x30(%rdx), %xmm7
vaesenc %xmm3, %xmm7, %xmm3
vaesenc %xmm7, %xmm6, %xmm7
vmovdqa %xmm7, 0x30(%rdx)
vaesenc %xmm6, %xmm5, %xmm6
vmovdqa %xmm6, 0x20(%rdx)
vaesenc %xmm5, %xmm4, %xmm5
vmovdqa %xmm5, 0x10(%rdx)
vaesenc %xmm4, %xmm2, %xmm2
vpxor %xmm0, %xmm2, %xmm0
vmovdqa %xmm0, (%rdx)
vpxor %xmm1, %xmm3, %xmm0
vmovdqa %xmm0, 0x40(%rdx)
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aegis128l/aesnic/encrypt.c
// Function: aegis128L_ad_partial
void aegis128L_ad_partial(__m128i *state, const unsigned char *ad, unsigned long long adlen)  
{
    unsigned char plaintextblock[32], ciphertextblock[32]; 
    unsigned long long i;  
     
    for (i = 0; (i+32) <= adlen; i += 32) aegis128L_enc_aut_step(ad+i, ciphertextblock, state);  

    if ( (adlen & 0x1f) != 0 )  { 
         memset(plaintextblock, 0, 32);  
         memcpy(plaintextblock, ad+i, adlen & 0x1f);  
         aegis128L_enc_aut_step(plaintextblock, ciphertextblock, state);  
    }  
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpq $0x20, %rdx
jae 0x14e2
xorl %eax, %eax
jmp 0x1507
xorl %r13d, %r13d
movq %rsp, %r12
leaq (%r15,%r13), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1060
leaq 0x20(%r13), %rax
addq $0x40, %r13
cmpq %r14, %r13
movq %rax, %r13
jbe 0x14e8
andq $0x1f, %r14
je 0x1548
addq %rax, %r15
movl $0x20, %edx
subq %r14, %rdx
leaq (%rsp,%r14), %rdi
addq $0x20, %rdi
xorl %esi, %esi
callq 0x1030
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x10c0
movq %rsp, %rsi
movq %r12, %rdi
movq %rbx, %rdx
callq 0x1060
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aegis128l/aesnic/encrypt.c
// Function: aegis128L_enc_partial
void aegis128L_enc_partial(__m128i *state, const unsigned char *m, unsigned long long mlen, unsigned char* c)  
{
    unsigned char plaintextblock[32], ciphertextblock[32];  
    unsigned long long i;  
     
    for (i = 0; (i+32) <= mlen; i += 32) aegis128L_enc_aut_step(m+i, c+i, state);  

    if ( (mlen & 0x1f) != 0 )  {
         memset(plaintextblock, 0, 32);    
         memcpy(plaintextblock, m + i, mlen & 0x1f);    
         aegis128L_enc_aut_step(plaintextblock, ciphertextblock, state);
         memcpy(c+i,ciphertextblock,mlen & 0x1f); 
    }  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
cmpq $0x20, %rdx
jae 0x157a
xorl %ebp, %ebp
jmp 0x159d
xorl %r13d, %r13d
leaq (%r12,%r13), %rdi
leaq (%r14,%r13), %rsi
movq %r15, %rdx
callq 0x1060
leaq 0x20(%r13), %rbp
addq $0x40, %r13
cmpq %rbx, %r13
movq %rbp, %r13
jbe 0x157d
andq $0x1f, %rbx
je 0x15ee
addq %rbp, %r12
movl $0x20, %edx
subq %rbx, %rdx
leaq (%rsp,%rbx), %rdi
xorl %esi, %esi
callq 0x1030
movq %rsp, %r13
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x10c0
leaq 0x20(%rsp), %r12
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1060
addq %rbp, %r14
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x10c0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aegis128l/aesnic/encrypt.c
// Function: aegis128L_dec_partial
void aegis128L_dec_partial(__m128i *state, unsigned char *m, unsigned long long mlen, const unsigned char *c)  
{
    unsigned char plaintextblock[32], ciphertextblock[32];  
    unsigned long long i;  
     
    for (i = 0; (i+32) <= mlen; i += 32) aegis128L_dec_aut_step(m+i, c+i, state);  

    if (  (mlen & 0x1f) != 0 )  {
        memset(ciphertextblock, 0, 32);
        memcpy(ciphertextblock, c+i, mlen & 0x1f);
        aegis128L_dec_aut_step(plaintextblock, ciphertextblock, state);
        memcpy(m+i, plaintextblock, mlen & 0x1f);

        //need to modify the state here (because in the last block, keystream is wrongly used to update the state)
        memset(plaintextblock, 0, mlen & 0x1f);
        state[0] = _mm_xor_si128( state[0], _mm_load_si128((__m128i*)plaintextblock)  ) ;
        state[4] = _mm_xor_si128( state[4], _mm_load_si128((__m128i*)(plaintextblock+16) )  ) ;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpq $0x20, %rdx
jae 0x1621
xorl %ebp, %ebp
jmp 0x1644
xorl %r13d, %r13d
leaq (%r15,%r13), %rdi
leaq (%r12,%r13), %rsi
movq %rbx, %rdx
callq 0x10a0
leaq 0x20(%r13), %rbp
addq $0x40, %r13
cmpq %r14, %r13
movq %rbp, %r13
jbe 0x1624
andq $0x1f, %r14
je 0x16c1
addq %rbp, %r12
movl $0x20, %edx
subq %r14, %rdx
leaq (%rsp,%r14), %rdi
xorl %esi, %esi
callq 0x1030
movq %rsp, %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x10c0
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x10a0
addq %rbp, %r15
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x10c0
movq %r12, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x1030
vmovaps (%r12), %xmm0
vxorps (%rbx), %xmm0, %xmm0
vmovaps %xmm0, (%rbx)
vmovaps 0x10(%r12), %xmm0
vxorps 0x40(%rbx), %xmm0, %xmm0
vmovaps %xmm0, 0x40(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: tmpfile_close
static void tmpfile_close(FILE **f, char **nam)
{
if(f)
        {
        if(*f) { fclose(*f); *f = NULL; }
        }

if(nam)
        {
        if(*nam)
                {
                unlink(*nam);
                free(*nam);
                *nam = NULL;
                }
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
testq %rdi, %rdi
je 0x3f06
movq %rdi, %r14
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3f06
callq 0x2110
movq $0x0, (%r14)
testq %rbx, %rbx
je 0x3f27
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3f27
callq 0x2080
movq (%rbx), %rdi
callq 0x2050
movq $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterVarint
static int fstWriterVarint(FILE *handle, uint64_t v)
{
uint64_t nxt;
unsigned char buf[10]; /* ceil(64/7) = 10 */
unsigned char *pnt = buf;
int len;

while((nxt = v>>7))
        {
        *(pnt++) = ((unsigned char)v) | 0x80;
        v = nxt;
        }
*(pnt++) = (unsigned char)v;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rcx
leaq -0x12(%rbp), %rdi
cmpq $0x80, %rsi
jae 0x5d5c
movq %rdi, %rax
movq %rsi, %rdx
jmp 0x5d80
leaq -0x12(%rbp), %rax
movq %rsi, %rdx
shrq $0x7, %rdx
movl %esi, %r8d
orb $-0x80, %r8b
movb %r8b, (%rax)
incq %rax
cmpq $0x3fff, %rsi           # imm = 0x3FFF
movq %rdx, %rsi
ja 0x5d63
movb %dl, (%rax)
subq %rdi, %rax
incq %rax
movslq %eax, %rbx
movl $0x1, %edx
movq %rbx, %rsi
callq 0x2390
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: JenkinsFree
void JenkinsFree(void *base_i, uint32_t hashmask)
{
struct collchain_t ***base = (struct collchain_t ***)base_i;
uint32_t h;
struct collchain_t **ar;
struct collchain_t *chain, *chain_next;

if(base && *base)
        {
        ar = *base;
        for(h=0;h<=hashmask;h++)
                {
                chain = ar[h];
                while(chain)
                        {
                        chain_next = chain->next;
                        free(chain);
                        chain = chain_next;
                        }
                }

        free(*base);
        *base = NULL;
        }
}

// Assembly:
testq %rdi, %rdi
je 0x5e06
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r15
testq %r15, %r15
je 0x5df8
movl %esi, %r14d
xorl %r12d, %r12d
movl %r12d, %eax
movq (%r15,%rax,8), %rdi
testq %rdi, %rdi
je 0x5de1
movq (%rdi), %r13
callq 0x2050
movq %r13, %rdi
testq %r13, %r13
jne 0x5dd1
incl %r12d
cmpl %r14d, %r12d
jbe 0x5dc5
movq (%rbx), %rdi
callq 0x2050
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterSetDate
void fstWriterSetDate(void *ctx, const char *dat)
{
struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
if(xc)
        {
        char s[FST_HDR_DATE_SIZE];
        off_t fpos = ftello(xc->handle);
        int len = strlen(dat);

        fstWriterFseeko(xc, xc->handle, FST_HDR_OFFS_DATE, SEEK_SET);
        memset(s, 0, FST_HDR_DATE_SIZE);
        memcpy(s, dat, (len < FST_HDR_DATE_SIZE) ? len : FST_HDR_DATE_SIZE);
        fstFwrite(s, FST_HDR_DATE_SIZE, 1, xc->handle);
        fflush(xc->handle);
        fstWriterFseeko(xc, xc->handle, fpos, SEEK_SET);
        }
}

// Assembly:
testq %rdi, %rdi
je 0x5eea
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x20b0
movq %rax, %r14
movq %r15, %rdi
callq 0x2130
movq %rax, %r12
movq (%rbx), %rdi
movl $0xca, %esi
xorl %edx, %edx
callq 0x2320
testl %eax, %eax
jns 0x5e57
orb $0x1, 0x12c(%rbx)
xorps %xmm0, %xmm0
leaq -0xa0(%rbp), %r13
movaps %xmm0, 0x60(%r13)
movaps %xmm0, 0x50(%r13)
movaps %xmm0, 0x40(%r13)
movaps %xmm0, 0x30(%r13)
movaps %xmm0, 0x20(%r13)
movaps %xmm0, 0x10(%r13)
movaps %xmm0, (%r13)
movq $0x0, 0x6f(%r13)
cmpl $0x77, %r12d
movl $0x77, %eax
cmovll %r12d, %eax
movslq %eax, %rdx
movq %r13, %rdi
movq %r15, %rsi
callq 0x2240
movq (%rbx), %rcx
movl $0x77, %esi
movl $0x1, %edx
movq %r13, %rdi
callq 0x2390
movq (%rbx), %rdi
callq 0x2280
movq (%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2320
testl %eax, %eax
jns 0x5edc
orb $0x1, 0x12c(%rbx)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterSetVersion
void fstWriterSetVersion(void *ctx, const char *vers)
{
struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
if(xc && vers)
        {
        char s[FST_HDR_SIM_VERSION_SIZE];
        off_t fpos = ftello(xc->handle);
        int len = strlen(vers);

        fstWriterFseeko(xc, xc->handle, FST_HDR_OFFS_SIM_VERSION, SEEK_SET);
        memset(s, 0, FST_HDR_SIM_VERSION_SIZE);
        memcpy(s, vers, (len < FST_HDR_SIM_VERSION_SIZE) ? len : FST_HDR_SIM_VERSION_SIZE);
        fstFwrite(s, FST_HDR_SIM_VERSION_SIZE, 1, xc->handle);
        fflush(xc->handle);
        fstWriterFseeko(xc, xc->handle, fpos, SEEK_SET);
        }
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x5fdb
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x20b0
movq %rax, %r14
movq %r15, %rdi
callq 0x2130
movq %rax, %r12
movq (%rbx), %rdi
movl $0x4a, %esi
xorl %edx, %edx
callq 0x2320
testl %eax, %eax
jns 0x5f49
orb $0x1, 0x12c(%rbx)
xorps %xmm0, %xmm0
leaq -0xb0(%rbp), %r13
movaps %xmm0, 0x70(%r13)
movaps %xmm0, 0x60(%r13)
movaps %xmm0, 0x50(%r13)
movaps %xmm0, 0x40(%r13)
movaps %xmm0, 0x30(%r13)
movaps %xmm0, 0x20(%r13)
movaps %xmm0, 0x10(%r13)
movaps %xmm0, (%r13)
movl $0x80, %eax
cmpl %eax, %r12d
cmovll %r12d, %eax
movslq %eax, %rdx
movq %r13, %rdi
movq %r15, %rsi
callq 0x2240
movq (%rbx), %rcx
movl $0x80, %esi
movl $0x1, %edx
movq %r13, %rdi
callq 0x2390
movq (%rbx), %rdi
callq 0x2280
movq (%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2320
testl %eax, %eax
jns 0x5fca
orb $0x1, 0x12c(%rbx)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterSetFileType
void fstWriterSetFileType(void *ctx, enum fstFileType filetype)
{
struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
if(xc)
        {
        if(/*(filetype >= FST_FT_MIN) &&*/ (filetype <= FST_FT_MAX))
                {
                off_t fpos = ftello(xc->handle);

                xc->filetype = filetype;

                fstWriterFseeko(xc, xc->handle, FST_HDR_OFFS_FILETYPE, SEEK_SET);
                fputc(xc->filetype, xc->handle);
                fflush(xc->handle);
                fstWriterFseeko(xc, xc->handle, fpos, SEEK_SET);
                }
        }
}

// Assembly:
testq %rdi, %rdi
sete %al
cmpl $0x3, %esi
setae %cl
orb %al, %cl
jne 0x6061
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x20b0
movq %rax, %r14
movb %r15b, 0xe8(%rbx)
movq (%rbx), %rdi
movl $0x141, %esi            # imm = 0x141
xorl %edx, %edx
callq 0x2320
testl %eax, %eax
jns 0x6028
orb $0x1, 0x12c(%rbx)
movzbl 0xe8(%rbx), %edi
movq (%rbx), %rsi
callq 0x21c0
movq (%rbx), %rdi
callq 0x2280
movq (%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2320
testl %eax, %eax
jns 0x6057
orb $0x1, 0x12c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x6146
movq %rsi, %r13
cmpb $0x0, (%rsi)
je 0x6146
movl %edx, %r12d
movq %rdi, %r14
movq %r13, %rdi
callq 0x2130
leaq 0x120(%r14), %rdi
movq %r13, %rsi
movl %eax, %edx
movl $0xffff, %ecx           # imm = 0xFFFF
callq 0xc674
movq (%rax), %r15
testq %r15, %r15
jne 0x60f4
movl 0x128(%r14), %r15d
incl %r15d
movl %r15d, 0x128(%r14)
movq %r15, (%rax)
movq %r14, %rdi
movq %r13, %rsi
movl $0x3, %edx
movq %r15, %rcx
callq 0x616f
movl %r12d, %r8d
leaq -0x33(%rbp), %rax
cmpq $0x80, %r15
jae 0x6109
movq %r15, %rcx
jmp 0x612b
movq %r15, %rdx
movq %r15, %rcx
shrq $0x7, %rcx
movl %edx, %esi
orb $-0x80, %sil
movb %sil, (%rax)
incq %rax
cmpq $0x3fff, %rdx           # imm = 0x3FFF
movq %rcx, %rdx
ja 0x610f
movb %cl, (%rax)
testq %r15, %r15
je 0x6136
movb $0x0, 0x1(%rax)
leaq -0x33(%rbp), %rcx
movq %r14, %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0x6856
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x61b9
movl %edx, %r14d
movq %rdi, %r15
movq %rsi, %rdi
callq 0x23a0
movq %rax, %r12
movzbl (%rax), %ecx
cmpl $0xa, %ecx
je 0x61b1
cmpl $0xd, %ecx
je 0x61b1
testl %ecx, %ecx
jne 0x61b4
jmp 0x61c2
movb $0x20, (%rax)
incq %rax
jmp 0x619e
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 0x6856
movq %r12, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O1/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 0x6277
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x20b0
movq %rax, %r14
movq (%rbx), %rdi
movl $0x49, %esi
xorl %edx, %edx
callq 0x2320
testl %eax, %eax
jns 0x6241
orb $0x1, 0x12c(%rbx)
movzbl %r15b, %edi
movq (%rbx), %rsi
callq 0x21c0
movq (%rbx), %rdi
callq 0x2280
movq (%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2320
testl %eax, %eax
jns 0x626d
orb $0x1, 0x12c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x6323
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2360
movl $0xfffffff7, %esi       # imm = 0xFFFFFFF7
leaq 0xee4b(%rip), %rcx      # 0x150f8
movzbl (%r14), %edi
movb $0x1, %dl
cmpl $0x6c, %edi
jle 0x62d0
addl $-0x6d, %edi
cmpl $0xd, %edi
ja 0x6308
movslq (%rcx,%rdi,4), %rdi
addq %rcx, %rdi
jmpq *%rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
jmp 0x6306
cmpl $0x61, %edi
je 0x6301
cmpl $0x66, %edi
jne 0x6311
movl $0xfffffff1, %esi       # imm = 0xFFFFFFF1
jmp 0x6306
xorl %esi, %esi
jmp 0x6306
movl $0xfffffff7, %esi       # imm = 0xFFFFFFF7
jmp 0x6306
movl $0xfffffff4, %esi       # imm = 0xFFFFFFF4
jmp 0x6306
movl $0xfffffffa, %esi       # imm = 0xFFFFFFFA
jmp 0x6306
movl $0xffffffeb, %esi       # imm = 0xFFFFFFEB
jmp 0x6306
movl $0xffffffee, %esi       # imm = 0xFFFFFFEE
xorl %edx, %edx
incq %r14
testb %dl, %dl
jne 0x62ad
jmp 0x6315
testl %edi, %edi
jne 0x6308
cmpl $0x64, %eax
je 0x6328
cmpl $0xa, %eax
jne 0x632b
incl %esi
jmp 0x632b
popq %rbx
popq %r14
popq %rbp
retq
addl $0x2, %esi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x6207
// File: /workspace/github_c_makefile_star2_O1/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 0x63cc
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x20b0
movq %rax, %r14
movq (%rbx), %rdi
movl $0x142, %esi            # imm = 0x142
xorl %edx, %edx
callq 0x2320
testl %eax, %eax
jns 0x6375
orb $0x1, 0x12c(%rbx)
movq (%rbx), %rcx
movq %r15, 0x78(%rbx)
movl $0x8, %eax
movb %r15b, -0x21(%rbp,%rax)
shrq $0x8, %r15
decq %rax
jne 0x6381
leaq -0x20(%rbp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x2390
movq (%rbx), %rdi
callq 0x2280
movq (%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2320
testl %eax, %eax
jns 0x63c2
orb $0x1, 0x12c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstWriterSetPackType
void fstWriterSetPackType(void *ctx, enum fstWriterPackType typ)
{
struct fstWriterContext *xc = (struct fstWriterContext *)ctx;
if(xc)
        {
        xc->fastpack     = (typ != FST_WR_PT_ZLIB);
        xc->fourpack     = (typ == FST_WR_PT_LZ4);
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x63f4
testl %esi, %esi
setne %al
movb 0x74(%rdi), %cl
shlb $0x3, %al
andb $-0xd, %cl
cmpl $0x2, %esi
sete %dl
shlb $0x2, %dl
orb %al, %dl
orb %cl, %dl
movb %dl, 0x74(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x6442
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 0x6443
retq
pushq %rbp
movq %rsp, %rbp
callq 0x256a
// File: /workspace/github_c_makefile_star2_O1/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 0x682e
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 0xf0e1(%rip), %r8       # 0x158b5
movq %r15, %rdx
cmoveq %r8, %rdx
movq 0x8(%rbx), %rdi
testq %r14, %r14
cmovneq %r14, %r8
leaq 0xebb2(%rip), %rsi      # 0x1539f
xorl %ecx, %ecx
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x2210
testq %r15, %r15
je 0x680a
movq %r15, %rdi
callq 0x2130
addq %rax, 0x38(%rbx)
testq %r14, %r14
je 0x681b
movq %r14, %rdi
callq 0x2130
addq %rax, 0x38(%rbx)
addq $0x4, 0x38(%rbx)
incl 0xb8(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x692e
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
movl $0x8, %eax
cmovael %eax, %r12d
cmovael %r14d, %r13d
movq 0x8(%rbx), %rsi
movl %r13d, %edi
callq 0x21c0
leaq 0xe87e(%rip), %rax      # 0x15130
movslq (%rax,%r13,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpl $0x4, %r12d
jmp 0x68c5
cmpl $0x10, %r12d
cmovael %r14d, %r12d
movq 0x8(%rbx), %rsi
movl %r12d, %edi
callq 0x21c0
movq 0x8(%rbx), %rdi
testq %r15, %r15
leaq 0xefd2(%rip), %rdx      # 0x158b5
cmovneq %r15, %rdx
leaq 0xeab5(%rip), %rsi      # 0x153a3
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x2210
testq %r15, %r15
je 0x6908
movq %r15, %rdi
callq 0x2130
addq %rax, 0x38(%rbx)
addq $0x4, 0x38(%rbx)
movq 0x8(%rbx), %rdi
movq -0x30(%rbp), %rsi
callq 0x5d3b
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_O1/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
testl %esi, %esi
jle 0x6c45
movl %esi, %ecx
xorl %edx, %edx
movabsq $0x400000020000021, %rsi # imm = 0x400000020000021
xorl %eax, %eax
movb (%rdi,%rdx), %r9b
movzbl %r9b, %r10d
movl $0x2, %r8d
leal -0x7(%r10), %r11d
cmpl $0x7, %r11d
jb 0x6c20
addl $-0x22, %r10d
cmpl $0x3a, %r10d
ja 0x6c2d
btq %r10, %rsi
jae 0x6c2d
addl %r8d, %eax
incq %rdx
cmpq %rdx, %rcx
jne 0x6bf8
jmp 0x6c47
addb $-0x21, %r9b
xorl %r8d, %r8d
cmpb $0x5e, %r9b
setae %r8b
leal (%r8,%r8,2), %r8d
incl %r8d
jmp 0x6c20
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
testl %edx, %edx
je 0x700d
decl %edx
leaq -0x20(%rbp), %rax
btl %edx, %ecx
setb %r8b
orb $0x30, %r8b
movb %r8b, (%rax)
incq %rax
addl $-0x1, %edx
jb 0x6ff7
leaq -0x20(%rbp), %rdx
callq 0x4cb2
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
testl %edx, %edx
je 0x704a
movl %edx, %eax
decl %edx
xorl %r8d, %r8d
btq %rdx, %rcx
setb %r9b
orb $0x30, %r9b
movb %r9b, -0x40(%rbp,%r8)
incq %r8
decl %edx
cmpq %r8, %rax
jne 0x702f
leaq -0x40(%rbp), %rdx
callq 0x4cb2
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x7649
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x21e0
movq 0x90(%rbx), %rcx
movq %rcx, 0x8(%rax)
testl %r14d, %r14d
setne %cl
movb 0x10(%rax), %dl
andb $-0x2, %dl
orb %cl, %dl
movb %dl, 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_O1/bluecmd[P]fst-example/gtkwave/fstapi.c
// Function: fstReaderFseeko
int fstReaderFseeko(struct fstReaderContext *xc, FILE *stream, off_t offset, int whence)
{
int rc = fseeko(stream, offset, whence);

if(rc<0)
        {
        xc->fseek_failed = 1;
#ifdef FST_DEBUG
        fprintf(stderr, FST_APIMESS "Seek to #%" PRId64 " (whence = %d) failed!\n", offset, whence);
        perror("Why");
#endif
        }

return(rc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
movl %ecx, %edx
callq 0x2320
testl %eax, %eax
jns 0x766b
orb $0x1, 0x697(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x7714
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x278(%rdi), %rdi
testq %rdi, %rdi
je 0x7717
movq (%rdi), %rcx
movq 0x288(%rbx), %rax
testq %rcx, %rcx
je 0x76e4
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 0xe1a7(%rip), %rax      # 0x158b5
cmovneq %rcx, %rax
jmp 0x7719
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq