LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/./merge128.h
// Function: init_arrays128
static void init_arrays128(g_data *g)
{
  assert(g->numBwt<=128);
  customInt i=0; // position inside Z newZ and B  

  for(int j=0;j<g->sizeOfAlpha;j++) {
    tba_or_m16(g->mergeColor16,i,1);
    g->firstColumn[j] = i;  // symbol j starts at position i
    for(int b=0;b<g->numBwt;b++) {
      for(customInt t=0;t<g->bwtOcc[b][j];t++) {
        if(j==0)   // zero chars are all different, Z are newZ do not change 
          tba_or_m16(g->mergeColor16,i,1);
        g->mergeColor16[i++] |= b*129;      // write b in both cur and next
      } // end for t
    } // end for b 
  } // end for j
  assert(i==g->mergeLen); 
  // extra check on mergeColor, can be commented out
  #ifndef NDEBUG
  customInt cnt[MAX_NUMBER_OF_BWTS] = {0};
  for(i=0;i<g->mergeLen;i++) cnt[g->mergeColor16[i]&0x7F]++;
  bool stop=false;
  for(int i=0; i<g->numBwt; i++)
    if(cnt[i]!=g->bwtLen[i]) {
      printf("INIT %d cnt:"CUSTOM_FORMAT" len:"CUSTOM_FORMAT"\n",i,cnt[i],g->bwtLen[i]);
      stop=true;
    }
  assert(!stop);
  #endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x38(%rdi), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
xorl %edx, %edx
xorl %esi, %esi
cmpq %rax, %rdx
je 0x83e0
movq 0x50f8(%rdi), %r8
orw $0x4000, (%r8,%rsi,2)   # imm = 0x4000
movq 0x5108(%rdi), %r9
movq %rsi, (%r9,%rdx,8)
movl 0x20(%rdi), %r9d
testl %r9d, %r9d
cmovlel %ecx, %r9d
xorl %r10d, %r10d
cmpq %r9, %r10
je 0x83db
movq 0x18(%rdi), %r11
movq (%r11,%r10,8), %r11
movq (%r11,%rdx,8), %r11
imull $0x81, %r10d, %ebx
leaq (%r8,%rsi,2), %r14
addq %r11, %rsi
xorl %r15d, %r15d
cmpq %r15, %r11
je 0x83d6
movzwl (%r14,%r15,2), %ebp
movl %ebp, %r12d
orl $0x4000, %r12d          # imm = 0x4000
testq %rdx, %rdx
cmovnel %ebp, %r12d
orl %ebx, %r12d
movw %r12w, (%r14,%r15,2)
incq %r15
jmp 0x83ae
incq %r10
jmp 0x838c
incq %rdx
jmp 0x8360
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/./merge256.h
// Function: init_arrays256
static void init_arrays256(g_data *g)
{
  assert(g->numBwt<=256);
  customInt i=0; // position inside Z newZ and B  

  for(int j=0;j<g->sizeOfAlpha;j++) {
    set_blockBeginsAt(i,1);   // start of symbol j, correct lcp is 0
    g->firstColumn[j] = i;    // symbol j starts at position i    
    for(int b=0;b<g->numBwt;b++) {
      for(customInt t=0;t<g->bwtOcc[b][j];t++) {
        if(j==0)  // zero chars are all different, Z are newZ do not change 
          set_blockBeginsAt(i,1);  
        g->array32[i++] |= b*257;      // write b in both cur and next
      } // end for t
    } // end for b 
  } // end for j
  assert(i==g->mergeLen);
  // extra check on mergeColor, can be commented out
  #ifndef NDEBUG
  customInt cnt[MAX_NUMBER_OF_BWTS] = {0};
  for(i=0;i<g->mergeLen;i++) cnt[g->array32[i]&0xFF]++;
  bool stop=false;
  for(int i=0; i<g->numBwt; i++)
    if(cnt[i]!=g->bwtLen[i]) {
      printf("INIT %d cnt:"CUSTOM_FORMAT" len:"CUSTOM_FORMAT"\n",i,cnt[i],g->bwtLen[i]);
      stop=true;
    }
  assert(!stop);
  #endif
}

// Assembly:
pushq %rbp
pushq %rbx
xorl %eax, %eax
xorl %ecx, %ecx
movslq 0x38(%rdi), %rdx
cmpq %rdx, %rax
jge 0x9aa2
movq 0x5100(%rdi), %rdx
movw $0x1, 0x2(%rdx,%rcx,4)
movq 0x5108(%rdi), %rsi
movq %rcx, (%rsi,%rax,8)
xorl %esi, %esi
movslq 0x20(%rdi), %r8
cmpq %r8, %rsi
jge 0x9a9d
movq 0x18(%rdi), %r8
movq (%r8,%rsi,8), %r8
movq (%r8,%rax,8), %r8
imull $0x101, %esi, %r9d      # imm = 0x101
leaq (%rdx,%rcx,4), %r10
addq %r8, %rcx
xorl %r11d, %r11d
cmpq %r11, %r8
je 0x9a98
movl (%r10,%r11,4), %ebx
movzwl %bx, %ebp
orl $0x10000, %ebp          # imm = 0x10000
testq %rax, %rax
cmovnel %ebx, %ebp
orl %r9d, %ebp
movl %ebp, (%r10,%r11,4)
incq %r11
jmp 0x9a74
incq %rsi
jmp 0x9a4e
incq %rax
jmp 0x9a2a
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/./blocks.h
// Function: block_inflate
static void block_inflate(solidBlock *b, solidBlockFile *s) {
  assert(b->endsAt - b->beginsAt <= SMALLSOLID_LIMIT);
  customInt *bigOcc = get_occ(s);
  for (int i = 0; i < s->occ_size; ++i) {
    bigOcc[i] = (customInt) b->smallOcc[i];
  }
  free_smallocc(b->smallOcc,s);
  b->occ = bigOcc;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x61de
movslq 0x10(%r14), %rcx
xorl %edx, %edx
movq 0x10(%rbx), %rsi
cmpq %rcx, %rdx
jge 0xae8e
movzwl (%rsi,%rdx,2), %esi
movq %rsi, (%rax,%rdx,8)
incq %rdx
jmp 0xae78
movq 0x28(%r14), %rcx
movq %rcx, (%rsi)
movq %rsi, 0x28(%r14)
movq %rax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/./blocks.h
// Function: readBlock
static solidBlock *readBlock(solidBlockFile *sf) 
{
  if(sf->fin==NULL) return NULL;
  // read size of block
  customInt buffer[SIZE_OF_ALPHABET+MAX_NUMBER_OF_BWTS];
  int e = fread(buffer,sizeof(customInt),2,sf->fin);
  if(e==0) return NULL; // no more blocks
  if(e!=2) die("tmp file read error in readBlock (1)");
  // ----- get solid block from s->solidList or malloc
  solidBlock *newB = get_block(sf);  
  newB->beginsAt = buffer[0];
  newB->endsAt = buffer[1];
  // printf("Reading [%ld %ld]\n",newB->beginsAt,newB->endsAt); //!!!!!!
  // --- get and init occ/smallOcc array
  if (newB->endsAt - newB->beginsAt <= SMALLSOLID_LIMIT) {
    // small solid block
    newB->smallOcc = get_smallocc(sf);
    e = fread(newB->smallOcc,sizeof(smallSolidInt),sf->occ_size,sf->fin);
    if(e!=sf->occ_size) die("tmp file read error in readBlock (2)");
  }
  else { // large solid block 
    newB->occ = get_occ(sf);
    memset(newB->occ,0,sf->occ_size*sizeof(customInt));// zero all values
    uint8_t *byteBuffer = (uint8_t *) buffer; // transform to an uint8_t buffer
    e = fread(byteBuffer,POS_SIZE,sf->occ_size,sf->fin); // read POS_SIZE bytes for customInt
    if(e!=sf->occ_size) die("tmp file read error in readBlock (3)");
    // fill newB->occ using five bytes for entry
    for(int j=0;j<sf->occ_size;j++) {
      for(int i=0;i<POS_SIZE;i++) 
        newB->occ[j] |= ((customInt) byteBuffer[j*POS_SIZE+i]) << (8*i);  
    }
  }
  newB->nextBlock=NULL;
  return newB;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq (%rdi), %rcx
testq %rcx, %rcx
je 0xaf43
movq %rdi, %r14
movq %rsp, %rdi
pushq $0x8
popq %rsi
pushq $0x2
popq %rdx
callq 0x20a0
testl %eax, %eax
je 0xaf43
cmpl $0x2, %eax
je 0xaee5
leaq 0x4182(%rip), %rdi      # 0xf062
callq 0x35b7
movq %r14, %rdi
callq 0x61ad
movq %rax, %rbx
movq (%rsp), %rax
movq %rax, (%rbx)
movq 0x8(%rsp), %rcx
movq %rcx, 0x8(%rbx)
subq %rax, %rcx
movq %r14, %rdi
cmpq $0xffff, %rcx           # imm = 0xFFFF
ja 0xaf57
callq 0x6213
movq %rax, 0x10(%rbx)
movslq 0x10(%r14), %rdx
movq (%r14), %rcx
pushq $0x2
popq %rsi
movq %rax, %rdi
callq 0x20a0
cmpl %eax, 0x10(%r14)
je 0xaf3c
leaq 0x4150(%rip), %rdi      # 0xf087
callq 0x35b7
andq $0x0, 0x18(%rbx)
jmp 0xaf45
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x61de
movq %rax, 0x10(%rbx)
movslq 0x10(%r14), %rdx
shlq $0x3, %rdx
xorl %r12d, %r12d
movq %rax, %rdi
xorl %esi, %esi
callq 0x2150
movslq 0x10(%r14), %rdx
movq (%r14), %rcx
movq %rsp, %r15
pushq $0x5
popq %rsi
movq %r15, %rdi
callq 0x20a0
cmpl %eax, 0x10(%r14)
je 0xafa0
leaq 0x4115(%rip), %rdi      # 0xf0ac
callq 0x35b7
movl 0x10(%r14), %eax
testl %eax, %eax
cmovlel %r12d, %eax
cmpq %rax, %r12
je 0xaf3c
xorl %ecx, %ecx
movq %r15, %rdx
cmpq $0x28, %rcx
je 0xafcd
movzbl (%rdx), %esi
shlq %cl, %rsi
movq 0x10(%rbx), %rdi
orq %rsi, (%rdi,%r12,8)
incq %rdx
addq $0x8, %rcx
jmp 0xafb0
incq %r12
addq $0x5, %r15
jmp 0xafa6
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/./blocks.h
// Function: add_singleton2liquid
static void add_singleton2liquid(protoBlock *proto,liquidBlock *liquid)
{
  assert(liquid->endsAt==proto->beginsAt);
  assert(proto->endsAt==proto->beginsAt+1);
  liquid->endsAt=proto->endsAt;
  // update color occurrences 
  liquid->occ[proto->lastColor] += 1;
  // update alpha occurences 
  liquid->occ[liquid->numBwt + proto->lastChar] +=1;
  liquid->empty = false;
}

// Assembly:
movq 0x8(%rdi), %rax
movq %rax, 0x8(%rsi)
movq 0x20(%rsi), %rax
movslq 0x24(%rdi), %rcx
incq (%rax,%rcx,8)
movslq 0x10(%rsi), %rcx
movslq 0x20(%rdi), %rdx
addq %rcx, %rdx
incq (%rax,%rdx,8)
movb $0x0, 0x2c(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/./blocks.h
// Function: add_proto2liquid
static void add_proto2liquid(protoBlock *proto,liquidBlock *liquid)
{
  assert(liquid->endsAt==proto->beginsAt);
  assert(proto->endsAt>proto->beginsAt+1);
  liquid->endsAt=proto->endsAt;
  // update color occurrences
  assert(proto->color==proto->lastColor); 
  liquid->occ[proto->color] += (proto->endsAt-proto->beginsAt);
  // update alpha occurences 
  for(int i=0;i<proto->endsAt-proto->beginsAt;i++)
    liquid->occ[liquid->numBwt + (proto->start)[i]] +=1;
  liquid->empty = false;
}

// Assembly:
movq 0x8(%rdi), %rcx
movq %rcx, 0x8(%rsi)
subq (%rdi), %rcx
movq 0x20(%rsi), %rax
movslq 0x1c(%rdi), %rdx
addq %rcx, (%rax,%rdx,8)
xorl %ecx, %ecx
movq 0x8(%rdi), %rdx
subq (%rdi), %rdx
cmpq %rcx, %rdx
jbe 0xb03c
movslq 0x10(%rsi), %rdx
movq 0x10(%rdi), %r8
movzbl (%r8,%rcx), %r8d
addq %rdx, %r8
incq (%rax,%r8,8)
incq %rcx
jmp 0xb017
movb $0x0, 0x2c(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/./blocks.h
// Function: tba_block_test_set
static inline bool tba_block_test_set(uint64_t *a,customInt i, int m, bool *recent)
{
  assert(m==1 || m==2);
  customInt q = i/32;
  customInt r = i%32;
  int b2 = (a[q] >> (2*r)) & 3;       // shift and check last 2 bits
  if(b2==3-m) {
    *recent = true;
    a[q] = a[q] | ( (uint64_t) 3 << (2*r)); // make the block not recent 
    return true;
  }
  else if(b2==3) {
    *recent = false;
    return true;
  }
  return false; // do not change recent 
}

// Assembly:
movq %rcx, %rax
movq %rsi, %rcx
shrq $0x5, %rsi
movq (%rdi,%rsi,8), %r8
addl %ecx, %ecx
andl $0x3e, %ecx
movq %r8, %r9
shrq %cl, %r9
andl $0x3, %r9d
pushq $0x3
popq %r10
subl %edx, %r10d
cmpl %r10d, %r9d
jne 0xb388
pushq $0x3
popq %rdx
shlq %cl, %rdx
movb $0x1, (%rax)
orq %rdx, %r8
movq %r8, (%rdi,%rsi,8)
jmp 0xb391
cmpl $0x3, %r9d
jne 0xb394
movb $0x0, (%rax)
movb $0x1, %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/mergegap.c
// Function: open_merge_files
static void open_merge_files(g_data *g) {
  assert(g->extMem);
  // mergeColor file for reading (Z in pseudocode)
  g->fmergeColor = fopen(g->merge_fname,"rb");
  if(!g->fmergeColor) die("merge_open");
  #ifndef NDEBUG
  customInt c[256] = {0}; // init to zero
  for(customInt i = 0; i < g->mergeLen; i++) {
    int col=fread_color(g->fmergeColor);
    col &= 0x7F;
    assert(col>=0 && col<g->numBwt);
    c[col]++;
  }
  for(int i=0;i<g->numBwt;i++) 
    assert(c[i]==g->bwtLen[i]);
  rewind(g->fmergeColor);
  #endif
  // alphaSize-1 newMergeColor cwriters for writing (newZ in pseudocode)
  int fd = open(g->newmerge_fname,O_WRONLY);
  if(fd == -1) die("new_merge_open");
  g->fnewMergeColor = malloc(g->sizeOfAlpha*sizeof(cwriter));
  if(g->fnewMergeColor==NULL) die("new_merge_alloc");
  g->fnewMergeColor[0].fd = -1; // invalid file descriptor
  for(int i=1; i< g->sizeOfAlpha; i++)
    cwriter_init(&g->fnewMergeColor[i],fd,COLOR_WBUFFER_SIZE, g->firstColumn[i]*sizeof(palette));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x50d8(%rdi), %rdi
leaq 0x33d4(%rip), %rsi      # 0xe7db
callq 0x21e0
movq %rax, 0x50c8(%rbx)
testq %rax, %rax
jne 0xb424
leaq 0x3da1(%rip), %rdi      # 0xf1c0
callq 0x35b7
movq 0x50e0(%rbx), %rdi
pushq $0x1
popq %rsi
xorl %eax, %eax
callq 0x22f0
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0xb448
leaq 0x3d79(%rip), %rdi      # 0xf1bc
callq 0x35b7
movslq 0x38(%rbx), %rdi
shlq $0x5, %rdi
callq 0xbce0
movq %rax, 0x50d0(%rbx)
testq %rax, %rax
jne 0xb474
leaq 0x3d63(%rip), %rdi      # 0xf1cb
callq 0x35b7
movq 0x50d0(%rbx), %rax
orl $-0x1, (%rax)
pushq $0x1
popq %r14
pushq $0x20
popq %r15
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jge 0xb4b2
movq 0x50d0(%rbx), %rdi
addq %r15, %rdi
movq 0x5108(%rbx), %rax
movq (%rax,%r14,8), %rcx
movl $0x100000, %edx         # imm = 0x100000
movl %ebp, %esi
callq 0x5ab2
incq %r14
addq $0x20, %r15
jmp 0xb47f
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/mergegap.c
// Function: fread_color
static int fread_color(FILE *f) {
  int b=0;
  int e = fread(&b,sizeof(palette),1,f);
  if(e!=1) die(__func__);
  return b;
}

// Assembly:
pushq %rax
movq %rdi, %rcx
leaq 0x4(%rsp), %rdi
andl $0x0, (%rdi)
pushq $0x1
popq %rdx
movq %rdx, %rsi
callq 0x20a0
cmpl $0x1, %eax
je 0xb4e5
leaq 0x3cfb(%rip), %rdi      # 0xf1db
callq 0x35b7
movl 0x4(%rsp), %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/mergegap.c
// Function: close_merge_files
static void close_merge_files(g_data *g) {
  assert(g->extMem);
  // close new merge files
  for(int i=1; i< g->sizeOfAlpha; i++) 
    cwriter_close(&g->fnewMergeColor[i]);
  close(g->fnewMergeColor[1].fd); // close file   
  free(g->fnewMergeColor);
  // close merge file
  int e = fclose(g->fmergeColor);
  if(e!=0) die("merge_close");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %r14
pushq $0x20
popq %r15
movslq 0x38(%rbx), %rax
movq 0x50d0(%rbx), %rdi
cmpq %rax, %r14
jge 0xb51c
addq %r15, %rdi
callq 0x5a96
incq %r14
addq $0x20, %r15
jmp 0xb4fb
movl 0x20(%rdi), %edi
callq 0x2160
movq 0x50d0(%rbx), %rdi
callq 0xbdb4
movq 0x50c8(%rbx), %rdi
callq 0x20e0
testl %eax, %eax
je 0xb551
leaq 0x3ccb(%rip), %rdi      # 0xf212
popq %rbx
popq %r14
popq %r15
jmp 0x35b7
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/mergehm.c
// Function: init_arrays
static void init_arrays(g_data *g)
{
  customInt i=0; // position inside Z newZ and B 
  for(int j=0;j<g->sizeOfAlpha;j++) {
    if(!g->bwtOnly) g->blockBeginsAt[i]=1;
    g->firstColumn[j] = i;                    // symbol j starts at position i
    for(int b=0;b<g->numBwt;b++)         // scan all occs of symbol j
      for(customInt t=0;t<g->bwtOcc[b][j];t++) {
        if(j==0) { // zero chars are all different, Z are newZ do not change 
          assert(j==0);     // no sqeezing: only zero char is zero
          if(!g->bwtOnly) g->blockBeginsAt[i]=1;
          g->newMergeColor[i]=b;          //for 0-chars write b to both Z and newZ 
        }
        g->mergeColor[i++] = b;
      }
  }
  assert(i==g->mergeLen);
  // extra check on mergeColor, can be commented out
  #ifndef NDEBUG
  customInt cnt[MAX_NUMBER_OF_BWTS] = {0};
  for(i=0;i<g->mergeLen;i++) cnt[g->mergeColor[i]]++;
  bool stop=false;
  for(int i=0; i<g->numBwt; i++)
    if(cnt[i]!=g->bwtLen[i]) {
      printf("INIT %d cnt:"CUSTOM_FORMAT" len:"CUSTOM_FORMAT"\n",i,cnt[i],g->bwtLen[i]);
      stop=true;
    }
  assert(!stop);
  #endif
}

// Assembly:
xorl %eax, %eax
xorl %ecx, %ecx
movslq 0x38(%rdi), %rdx
cmpq %rdx, %rax
jge 0xb8d5
cmpb $0x0, 0x3c(%rdi)
jne 0xb870
movq 0x98(%rdi), %rdx
movb $0x1, (%rdx,%rcx)
movq 0x5108(%rdi), %rdx
movq %rcx, (%rdx,%rax,8)
xorl %edx, %edx
movslq 0x20(%rdi), %rsi
cmpq %rsi, %rdx
jge 0xb8d0
xorl %esi, %esi
movq 0x18(%rdi), %r8
movq (%r8,%rdx,8), %r8
cmpq (%r8,%rax,8), %rsi
jae 0xb8cb
testq %rax, %rax
jne 0xb8b8
cmpb $0x0, 0x3c(%rdi)
jne 0xb8ad
movq 0x98(%rdi), %r8
movb $0x1, (%r8,%rcx)
movq 0x50f0(%rdi), %r8
movb %dl, (%r8,%rcx)
movq 0x50e8(%rdi), %r8
movb %dl, (%r8,%rcx)
incq %rcx
incq %rsi
jmp 0xb888
incq %rdx
jmp 0xb87d
incq %rax
jmp 0xb856
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/alphabet.c
// Function: init_freq
void init_freq(symbol *b, customInt n, customInt *freq)
{
  for(int i=0;i<SIZE_OF_ALPHABET;i++)
    freq[i]=0;
  for(customInt i=0;i<n;i++)
    freq[b[i]]++;
}

// Assembly:
xorl %eax, %eax
cmpq $0x100, %rax            # imm = 0x100
je 0xbabc
andq $0x0, (%rdx,%rax,8)
incq %rax
jmp 0xbaaa
xorl %eax, %eax
cmpq %rax, %rsi
je 0xbad0
movzbl (%rdi,%rax), %ecx
incq (%rdx,%rcx,8)
incq %rax
jmp 0xbabe
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/alphabet.c
// Function: init_alpha_maps
int init_alpha_maps(g_data *g)
{
  
  // init maps with illegal value -1
  for(int i=0;i<SIZE_OF_ALPHABET;i++)
    alphabet_map[i]=restricted_unmap[i] = ILLEGAL_SYMBOL;

  // compute frequencies of the input symbols
  customInt freq[SIZE_OF_ALPHABET];
  customInt n = g->mergeLen;
  init_freq(g->bws[0],n,freq); // complete scan of bws[0][0..n]
  // compute maps
  int j=0;
  for(int i=0;i<SIZE_OF_ALPHABET;i++)
    if(freq[i]!=0) {
      alphabet_map[i] = j;
      restricted_unmap[j++] = i;
    }
  return j;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x808, %rsp            # imm = 0x808
xorl %eax, %eax
leaq 0x7727(%rip), %rbx      # 0x13220
leaq 0x7b20(%rip), %r14      # 0x13620
cmpq $0x400, %rax            # imm = 0x400
je 0xbb17
orl $-0x1, (%rax,%rbx)
orl $-0x1, (%rax,%r14)
addq $0x4, %rax
jmp 0xbb00
movq (%rdi), %rax
movq 0x28(%rdi), %rsi
movq (%rax), %rdi
movq %rsp, %rdx
callq 0xbaa8
xorl %ecx, %ecx
xorl %eax, %eax
cmpq $0x100, %rcx            # imm = 0x100
je 0xbb51
cmpq $0x0, (%rsp,%rcx,8)
je 0xbb48
movl %eax, (%r14)
movslq %eax, %rdx
incl %eax
movl %ecx, (%rbx,%rdx,4)
incq %rcx
addq $0x4, %r14
jmp 0xbb2d
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/alphabet.c
// Function: remap_bwts
void remap_bwts(g_data *g)
{
  int sizeOfAlphabet; // size of alphabet
  
  // remap alphabet, remap bwts and compute occ 
  sizeOfAlphabet = init_alpha_maps(g);
  assert(sizeOfAlphabet>1 && sizeOfAlphabet<= SIZE_OF_ALPHABET);
  if(g->verbose>0) printf("Alphabet size: %d\n", sizeOfAlphabet);
  
  // remap; also compute Occs for each BWT if smallAlpha
  if(g->smallAlpha) {
    g->bwtOcc = malloc(g->numBwt*sizeof(customInt *));
    if(!g->bwtOcc) die(__func__);
    g->bwtOcc[0] = calloc(g->numBwt*sizeOfAlphabet,sizeof(customInt));
   if(!g->bwtOcc[0]) die(__func__);
  }  
  for(int i=0;i<g->numBwt;i++) {
    customInt *bwtOcc = NULL;
    if(g->smallAlpha) { // if the alphabet is small keep bwtOcc[i]
      if(i>0) g->bwtOcc[i] = g->bwtOcc[i-1] + sizeOfAlphabet;
      bwtOcc = g->bwtOcc[i];
    }
    remap_string(g->bws[i],g->bwtLen[i],bwtOcc);
  }
  g->sizeOfAlpha = sizeOfAlphabet;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xbae6
movl %eax, %ebp
cmpl $0x0, 0x94(%rbx)
jle 0xbba2
leaq 0x1d06(%rip), %rdi      # 0xd89f
movl %ebp, %esi
xorl %eax, %eax
callq 0x2100
cmpb $0x1, 0x68(%rbx)
jne 0xbc03
movslq 0x20(%rbx), %r15
leaq (,%r15,8), %rdi
callq 0xbce0
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0xbbc7
movq %rax, %r14
jmp 0xbbdb
leaq 0x3747(%rip), %rdi      # 0xf315
callq 0x35b7
movl 0x20(%rbx), %r15d
movq 0x18(%rbx), %r14
imull %ebp, %r15d
movslq %r15d, %rdi
pushq $0x8
popq %rsi
callq 0xbe60
movq %rax, (%r14)
movq 0x18(%rbx), %rax
cmpq $0x0, (%rax)
jne 0xbc03
leaq 0x3717(%rip), %rdi      # 0xf315
callq 0x35b7
movslq %ebp, %rax
xorl %ecx, %ecx
shlq $0x3, %rax
leaq 0x7a0d(%rip), %rdx      # 0x13620
movslq 0x20(%rbx), %rsi
cmpq %rsi, %rcx
jge 0xbc7e
cmpb $0x1, 0x68(%rbx)
jne 0xbc41
movq 0x18(%rbx), %rsi
testq %rcx, %rcx
je 0xbc3b
movq -0x8(%rsi,%rcx,8), %rdi
addq %rax, %rdi
movq %rdi, (%rsi,%rcx,8)
movq 0x18(%rbx), %rsi
movq (%rsi,%rcx,8), %rsi
jmp 0xbc43
xorl %esi, %esi
movq (%rbx), %rdi
movq 0x8(%rbx), %r8
movq (%rdi,%rcx,8), %rdi
movq (%r8,%rcx,8), %r8
xorl %r9d, %r9d
cmpq %r9, %r8
je 0xbc79
movzbl (%rdi,%r9), %r10d
movl (%rdx,%r10,4), %r10d
movb %r10b, (%rdi,%r9)
testq %rsi, %rsi
je 0xbc74
movzbl %r10b, %r10d
incq (%rsi,%r10,8)
incq %r9
jmp 0xbc55
incq %rcx
jmp 0xbc13
movl %ebp, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/malloc_count/malloc_count.c
// Function: inc_count
static void inc_count(size_t inc)
{
#if THREAD_SAFE_GCC_INTRINSICS
    long long mycurr = __sync_add_and_fetch(&curr, inc);
    if (mycurr > peak) peak = mycurr;
    total += inc;
    if (callback) callback(callback_cookie, mycurr);
#else
    if ((curr += inc) > peak) peak = curr;
    total += inc;
    if (callback) callback(callback_cookie, curr);
#endif
}

// Assembly:
movq %rdi, %rsi
lock
xaddq %rsi, 0x7c9c(%rip)      # 0x13a20
addq %rdi, %rsi
cmpq 0x7c9a(%rip), %rsi      # 0x13a28
jle 0xbd97
movq %rsi, 0x7c91(%rip)      # 0x13a28
addq %rdi, 0x107cc2(%rip)    # 0x113a60
movq 0x7c8b(%rip), %rax      # 0x13a30
testq %rax, %rax
je 0xbdb3
movq 0x7c87(%rip), %rdi      # 0x13a38
jmpq *%rax
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/malloc_count/malloc_count.c
// Function: dec_count
static void dec_count(size_t dec)
{
#if THREAD_SAFE_GCC_INTRINSICS
    long long mycurr = __sync_sub_and_fetch(&curr, dec);
    if (callback) callback(callback_cookie, mycurr);
#else
    curr -= dec;
    if (callback) callback(callback_cookie, curr);
#endif
}

// Assembly:
movq %rdi, %rsi
negq %rsi
lock
xaddq %rsi, 0x7bd9(%rip)      # 0x13a20
movq 0x7be2(%rip), %rax      # 0x13a30
testq %rax, %rax
je 0xbe5f
subq %rdi, %rsi
movq 0x7bdb(%rip), %rdi      # 0x13a38
jmpq *%rax
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/threads.c
// Function: pc_system_init
void pc_system_init(pc_system *pc, int buf_size)
{
  pc->buf_size = buf_size; 
  pc->pindex=0;
  pc->cindex=0;
  pc->free_slots = xsem_create_destroy(NULL,buf_size,__LINE__,__FILE__);
  pc->ready = xsem_create_destroy(NULL,0,__LINE__,__FILE__);
  int e = pthread_mutex_init(&(pc->cmutex),NULL);
  if(e) die(__func__);
  // re condition variable and related mutex
  e = pthread_mutex_init(&(pc->remutex),NULL);
  if(e) die(__func__);
  e = pthread_cond_init(&(pc->recond),NULL);
  if(e) die(__func__);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl %esi, 0x48(%rdi)
andq $0x0, (%rdi)
pushq $0x7f
popq %rdx
xorl %edi, %edi
callq 0xc0c2
movq %rax, 0x30(%rbx)
xorl %edi, %edi
xorl %esi, %esi
movl $0x80, %edx
callq 0xc0c2
movq %rax, 0x38(%rbx)
leaq 0x8(%rbx), %rdi
xorl %esi, %esi
callq 0x23d0
testl %eax, %eax
je 0xc086
leaq 0x33f2(%rip), %rdi      # 0xf473
callq 0x35b7
leaq 0x50(%rbx), %rdi
xorl %esi, %esi
callq 0x23d0
testl %eax, %eax
je 0xc0a1
leaq 0x33d7(%rip), %rdi      # 0xf473
callq 0x35b7
addq $0x78, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2220
testl %eax, %eax
je 0xc0c0
leaq 0x33b9(%rip), %rdi      # 0xf473
popq %rbx
jmp 0x35b7
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/felipelouza[P]egap/threads.c
// Function: pc_system_destroy
void pc_system_destroy(pc_system *pc)
{
  assert(pc->pindex==pc->cindex);  
  int e = pthread_cond_destroy(&(pc->recond));
  if(e) die(__func__);
  e = pthread_mutex_destroy(&(pc->remutex));
  if(e) die(__func__);
  e = pthread_mutex_destroy(&(pc->cmutex));
  if(e) die(__func__);
  xsem_create_destroy(pc->ready,0,__LINE__,__FILE__);
  xsem_create_destroy(pc->free_slots,0,__LINE__,__FILE__);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x78, %rdi
callq 0x2310
testl %eax, %eax
je 0xc186
leaq 0x3301(%rip), %rdi      # 0xf482
callq 0x35b7
leaq 0x50(%rbx), %rdi
callq 0x2130
testl %eax, %eax
je 0xc19f
leaq 0x32e8(%rip), %rdi      # 0xf482
callq 0x35b7
leaq 0x8(%rbx), %rdi
callq 0x2130
testl %eax, %eax
je 0xc1b8
leaq 0x32cf(%rip), %rdi      # 0xf482
callq 0x35b7
movq 0x38(%rbx), %rdi
xorl %esi, %esi
movl $0x94, %edx
callq 0xc0c2
movq 0x30(%rbx), %rdi
xorl %esi, %esi
movl $0x95, %edx
popq %rbx
jmp 0xc0c2
// File: /workspace/github_c_makefile_star2_O2/dropletzhu[P]msuite/mlistener.c
// Function: term_handler
void term_handler(int signum)
{
	unsigned int s_total, i;

	for( i = 0; i < 65535; i++ ) {
		s_total += s_count[i];
	}

	printf("Total received:	%u\n", l_count);
	printf("Total sent:	%u\n", s_total);
	/* the s_count may not be updated when interrupt the
	   process */
	if( l_count <= s_total )
		printf("Total lost:	%u\n", s_total - l_count);
	else
		printf("Total lost: 0\n");

	exit(0);
}

// Assembly:
pushq %rbx
xorl %eax, %eax
leaq 0x2e47(%rip), %rcx      # 0x40d0
cmpq $0x3fffc, %rax          # imm = 0x3FFFC
je 0x129a
addl (%rax,%rcx), %ebx
addq $0x4, %rax
jmp 0x1289
movl 0x2e20(%rip), %esi      # 0x40c0
leaq 0xd8b(%rip), %rdi       # 0x2032
xorl %eax, %eax
callq 0x1070
leaq 0xd91(%rip), %rdi       # 0x2046
movl %ebx, %esi
xorl %eax, %eax
callq 0x1070
subl 0x2dfc(%rip), %ebx      # 0x40c0
jae 0x12d4
leaq 0xecf(%rip), %rdi       # 0x219c
callq 0x1040
jmp 0x12e4
leaq 0xd7b(%rip), %rdi       # 0x2056
movl %ebx, %esi
xorl %eax, %eax
callq 0x1070
xorl %edi, %edi
callq 0x1110
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_clear_errors
void
kmip_clear_errors(KMIP *ctx)
{
    if(ctx == NULL)
    {
        return;
    }
    
    for(size_t i = 0; i < ARRAY_LENGTH(ctx->errors); i++)
    {
        ctx->errors[i] = (ErrorFrame){{0},0};
    }
    ctx->frame_index = ctx->errors;
    
    if(ctx->error_message != NULL)
    {
        ctx->free_func(ctx->state, ctx->error_message);
        ctx->error_message = NULL;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x76d4
pushq %rbx
movq %rdi, %rbx
leaq 0x38(%rdi), %rax
pushq $0x38
popq %rcx
xorps %xmm0, %xmm0
cmpq $0x858, %rcx            # imm = 0x858
je 0x76b1
movups %xmm0, 0x50(%rbx,%rcx)
movups %xmm0, 0x40(%rbx,%rcx)
movups %xmm0, 0x30(%rbx,%rcx)
movups %xmm0, 0x20(%rbx,%rcx)
movups %xmm0, 0x10(%rbx,%rcx)
movups %xmm0, (%rbx,%rcx)
andq $0x0, 0x60(%rbx,%rcx)
addq $0x68, %rcx
jmp 0x767f
movq %rax, 0x860(%rbx)
movq 0x28(%rbx), %rsi
testq %rsi, %rsi
je 0x76d3
movq 0x890(%rbx), %rdi
callq *0x878(%rbx)
andq $0x0, 0x28(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_init
void
kmip_init(KMIP *ctx, void *buffer, size_t buffer_size, enum kmip_version v)
{
    if(ctx == NULL)
    {
        return;
    }
    
    ctx->buffer = (uint8 *)buffer;
    ctx->index = ctx->buffer;
    ctx->size = buffer_size;
    ctx->version = v;
    
    if(ctx->calloc_func == NULL)
    {
        ctx->calloc_func = &kmip_calloc;
    }
    if(ctx->realloc_func == NULL)
    {
        ctx->realloc_func = &kmip_realloc;
    }
    if(ctx->memset_func == NULL)
    {
        ctx->memset_func = &kmip_memset;
    }
    if(ctx->free_func == NULL)
    {
        ctx->free_func = &kmip_free;
    }
    if(ctx->memcpy_func == NULL)
        ctx->memcpy_func = &kmip_memcpy;
    
    ctx->max_message_size = 8192;
    ctx->error_message_size = 200;
    ctx->error_message = NULL;
    
    ctx->error_frame_count = 20;
    
    ctx->credential_list = ctx->calloc_func(ctx->state, 1, sizeof(LinkedList));
    
    kmip_clear_errors(ctx);
}

// Assembly:
testq %rdi, %rdi
je 0x77a5
pushq %rbx
movq %rdi, %rbx
movq %rsi, (%rdi)
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movl %ecx, 0x18(%rdi)
movq 0x868(%rdi), %rax
testq %rax, %rax
jne 0x770a
movq 0x188bd(%rip), %rax     # 0x1ffc0
movq %rax, 0x868(%rbx)
cmpq $0x0, 0x870(%rbx)
jne 0x7722
movq 0x18895(%rip), %rcx     # 0x1ffb0
movq %rcx, 0x870(%rbx)
cmpq $0x0, 0x888(%rbx)
jne 0x773a
movq 0x188ad(%rip), %rcx     # 0x1ffe0
movq %rcx, 0x888(%rbx)
cmpq $0x0, 0x878(%rbx)
jne 0x7752
movq 0x18885(%rip), %rcx     # 0x1ffd0
movq %rcx, 0x878(%rbx)
cmpq $0x0, 0x880(%rbx)
jne 0x776a
movq 0x18875(%rip), %rcx     # 0x1ffd8
movq %rcx, 0x880(%rbx)
movl $0x2000, 0x1c(%rbx)     # imm = 0x2000
movq $0xc8, 0x30(%rbx)
andq $0x0, 0x28(%rbx)
movq $0x14, 0x858(%rbx)
movq 0x890(%rbx), %rdi
pushq $0x1
popq %rsi
pushq $0x18
popq %rdx
callq *%rax
movq %rax, 0x20(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x65c0
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_add_credential
int
kmip_add_credential(KMIP *ctx, Credential *cred)
{
    if(ctx == NULL || cred == NULL)
    {
        return(KMIP_UNSET);
    }
    
    LinkedListItem *item = ctx->calloc_func(ctx->state, 1, sizeof(LinkedListItem));
    if(item != NULL)
    {
        item->data = cred;
        kmip_linked_list_push(ctx->credential_list, item);
        return(KMIP_OK);
    }
    
    return(KMIP_UNSET);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
pushq $-0x1
popq %rbp
jne 0x7817
movq %rsi, %r14
movq %rdi, %rbx
movq 0x890(%rdi), %rdi
pushq $0x1
popq %rsi
pushq $0x18
popq %rdx
callq *0x868(%rbx)
testq %rax, %rax
je 0x7817
movq %r14, 0x10(%rax)
movq 0x20(%rbx), %rdi
movq %rax, %rsi
callq 0x69a0
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_remove_credentials
void
kmip_remove_credentials(KMIP *ctx)
{
    if(ctx == NULL)
    {
        return;
    }
    
    LinkedListItem *item = kmip_linked_list_pop(ctx->credential_list);
    while(item != NULL)
    {
        ctx->memset_func(item, 0, sizeof(LinkedListItem));
        ctx->free_func(ctx->state, item);
        
        item = kmip_linked_list_pop(ctx->credential_list);
    }
}

// Assembly:
testq %rdi, %rdi
je 0x7871
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x65d0
movq %rax, %r15
pushq $0x18
popq %r14
testq %r15, %r15
je 0x786c
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq *0x888(%rbx)
movq 0x890(%rbx), %rdi
movq %r15, %rsi
callq *0x878(%rbx)
movq 0x20(%rbx), %rdi
callq 0x65d0
movq %rax, %r15
jmp 0x783b
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_reset
void
kmip_reset(KMIP *ctx)
{
    if(ctx == NULL)
    {
        return;
    }
    
    if(ctx->buffer != NULL)
    {
        kmip_memset(ctx->buffer, 0, ctx->size);
    }
    ctx->index = ctx->buffer;
    
    kmip_clear_errors(ctx);
}

// Assembly:
testq %rdi, %rdi
je 0x7893
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x7894
movq 0x10(%rbx), %rdx
xorl %esi, %esi
callq 0x6eb0
movq (%rbx), %rax
jmp 0x7896
retq
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x65c0
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_destroy
void
kmip_destroy(KMIP *ctx)
{
    if(ctx == NULL)
    {
        return;
    }
    
    kmip_reset(ctx);
    kmip_set_buffer(ctx, NULL, 0);

    kmip_remove_credentials(ctx);
    ctx->memset_func(ctx->credential_list, 0, sizeof(LinkedList));
    ctx->free_func(ctx->state, ctx->credential_list);
    
    ctx->calloc_func = NULL;
    ctx->realloc_func = NULL;
    ctx->memset_func = NULL;
    ctx->free_func = NULL;
    ctx->memcpy_func = NULL;
    ctx->state = NULL;
}

// Assembly:
testq %rdi, %rdi
je 0x7920
pushq %rbx
movq %rdi, %rbx
callq 0x6260
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq %rbx, %rdi
callq 0x6640
movq 0x20(%rbx), %rdi
pushq $0x18
popq %rdx
xorl %esi, %esi
callq *0x888(%rbx)
movq 0x890(%rbx), %rdi
movq 0x20(%rbx), %rsi
callq *0x878(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x888(%rbx)
movups %xmm0, 0x878(%rbx)
movups %xmm0, 0x868(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_push_error_frame
void
kmip_push_error_frame(KMIP *ctx, const char *function, const int line)
{
    if(ctx == NULL)
    {
        return;
    }
    
    for(size_t i = 0; i < 20; i++)
    {
        ErrorFrame *frame = &ctx->errors[i];
        if(frame->line == 0)
        {
            ctx->frame_index = frame;
            strncpy(frame->function, function, sizeof(frame->function) - 1);
            frame->line = line;
            break;
        }
    }
}

// Assembly:
testq %rdi, %rdi
je 0x7965
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
leaq -0x30(%rdi), %rax
pushq $0x15
popq %rcx
decq %rcx
je 0x795e
leaq 0x68(%rax), %r14
cmpl $0x0, 0xcc(%rax)
movq %r14, %rax
jne 0x7933
movq %r14, 0x860(%rdi)
pushq $0x63
popq %rdx
movq %r14, %rdi
callq 0x60c0
movl %ebx, 0x64(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_set_enum_error_message
void
kmip_set_enum_error_message(KMIP *ctx, enum tag t, int value, int result)
{
    if(ctx == NULL)
    {
        return;
    }
    
    switch(result)
    {
        /* TODO (ph) Update error message for KMIP version 2.0+ */
        case KMIP_INVALID_FOR_VERSION:
        kmip_init_error_message(ctx);
        snprintf(ctx->error_message, ctx->error_message_size, "KMIP 1.%d does not support %s enumeration value (%d)", ctx->version, kmip_attribute_names[kmip_get_enum_string_index(t)], value);
        break;
        
        default: /* KMIP_ENUM_MISMATCH */
        kmip_init_error_message(ctx);
        snprintf(ctx->error_message, ctx->error_message_size, "Invalid %s enumeration value (%d)", kmip_attribute_names[kmip_get_enum_string_index(t)], value);
        break;
    };
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x79d6
movl %ecx, %r13d
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r12
callq 0x69c0
movq 0x28(%r12), %r15
movq 0x30(%r12), %r14
cmpl $-0xb, %r13d
jne 0x79e5
movl 0x18(%r12), %r12d
movl %ebp, %edi
callq 0x62a0
movl %eax, %eax
leaq 0x18366(%rip), %rcx     # 0x1fd10
movq (%rcx,%rax,8), %r8
leaq 0xfb8b(%rip), %rdx      # 0x17540
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %ecx
movl %ebx, %r9d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6420
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %edi
callq 0x62a0
movl %eax, %eax
leaq 0x1831b(%rip), %rcx     # 0x1fd10
movq (%rcx,%rax,8), %rcx
leaq 0xfb75(%rip), %rdx      # 0x17575
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %r8d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6420
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_get_num_items_next
size_t
kmip_get_num_items_next(KMIP *ctx, enum tag t)
{
    if(ctx == NULL)
    {
        return(0);
    }
    
    size_t count = 0;
    
    uint8 *index = ctx->index;
    uint32 length = 0;
    
    while((ctx->size - (uint64)(ctx->index - ctx->buffer)) > 8)
    {
        if(kmip_is_tag_next(ctx, t))
        {
            ctx->index += 4;
            
            length = 0;
            length |= ((int32)*ctx->index++ << 24);
            length |= ((int32)*ctx->index++ << 16);
            length |= ((int32)*ctx->index++ << 8);
            length |= ((int32)*ctx->index++ << 0);
            length += CALCULATE_PADDING(length);
            
            if((ctx->size - (ctx->index - ctx->buffer)) >= length)
            {
                ctx->index += length;
                count++;
            }
            else
            {
                break;
            }
        }
        else
        {
            break;
        }
    }
    
    ctx->index = index;
    return(count);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x7baf
movl %esi, %ebp
movq %rdi, %r14
movq (%rdi), %r12
movq 0x8(%rdi), %r15
movq 0x10(%rdi), %r13
xorl %ebx, %ebx
movq %r15, (%rsp)
movq %r13, %rax
subq %r15, %rax
addq %r12, %rax
cmpq $0x9, %rax
jb 0x7ba5
movq %r14, %rdi
movl %ebp, %esi
callq 0x62d0
testl %eax, %eax
je 0x7ba5
leaq 0x5(%r15), %rax
movq %rax, 0x8(%r14)
movzbl 0x4(%r15), %eax
shll $0x18, %eax
leaq 0x6(%r15), %rcx
movq %rcx, 0x8(%r14)
movzbl 0x5(%r15), %ecx
shll $0x10, %ecx
orl %eax, %ecx
leaq 0x7(%r15), %rax
movq %rax, 0x8(%r14)
movzbl 0x6(%r15), %edx
shll $0x8, %edx
orl %ecx, %edx
leaq 0x8(%r15), %rax
movq %rax, 0x8(%r14)
movzbl 0x7(%r15), %ecx
orl %ecx, %edx
negl %ecx
andl $0x7, %ecx
addl %edx, %ecx
movq %r13, %rdx
subq %rax, %rdx
addq %r12, %rdx
cmpq %rcx, %rdx
jb 0x7ba5
addq %rcx, %rax
movq %rax, 0x8(%r14)
incq %rbx
movq %rax, %r15
jmp 0x7b1e
movq (%rsp), %rax
movq %rax, 0x8(%r14)
jmp 0x7bb1
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_free_text_string
void
kmip_free_text_string(KMIP *ctx, TextString *value)
{
    if(ctx == NULL)
    {
        return;
    }
    
    if(value != NULL)
    {
        if(value->value != NULL)
        {
            ctx->memset_func(value->value, 0, value->size);
            ctx->free_func(ctx->state, value->value);
            
            value->value = NULL;
        }
        
        value->size = 0;
    }
    
    return;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x7d9b
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x7d8f
movq 0x8(%rbx), %rdx
xorl %esi, %esi
callq *0x888(%r14)
movq 0x890(%r14), %rdi
movq (%rbx), %rsi
callq *0x878(%r14)
andq $0x0, (%rbx)
andq $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_free_byte_string
void
kmip_free_byte_string(KMIP *ctx, ByteString *value)
{
    if(value != NULL)
    {
        if(value->value != NULL)
        {
            ctx->memset_func(value->value, 0, value->size);
            ctx->free_func(ctx->state, value->value);
            
            value->value = NULL;
        }
        
        value->size = 0;
    }
    
    return;
}

// Assembly:
testq %rsi, %rsi
je 0x7de1
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x7dd5
movq 0x8(%rbx), %rdx
xorl %esi, %esi
callq *0x888(%r14)
movq 0x890(%r14), %rdi
movq (%rbx), %rsi
callq *0x878(%r14)
andq $0x0, (%rbx)
andq $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_free_name
void
kmip_free_name(KMIP *ctx, Name *value)
{
    if(value != NULL)
    {
        if(value->value != NULL)
        {
            kmip_free_text_string(ctx, value->value);
            ctx->free_func(ctx->state, value->value);
            
            value->value = NULL;
        }
        
        value->type = 0;
    }
    
    return;
}

// Assembly:
testq %rsi, %rsi
je 0x7e1e
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rsi), %rsi
testq %rsi, %rsi
je 0x7e13
movq %rdi, %r14
callq 0x6350
movq 0x890(%r14), %rdi
movq (%rbx), %rsi
callq *0x878(%r14)
andq $0x0, (%rbx)
andl $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_free_protection_storage_masks
void
kmip_free_protection_storage_masks(KMIP *ctx, ProtectionStorageMasks *value)
{
    if(value != NULL)
    {
        if(value->masks != NULL)
        {
            LinkedListItem *curr = kmip_linked_list_pop(value->masks);
            while(curr != NULL)
            {
                ctx->free_func(ctx->state, curr->data);
                curr->data = NULL;
                ctx->free_func(ctx->state, curr);
                curr = kmip_linked_list_pop(value->masks);
            }
            ctx->free_func(ctx->state, value->masks);
            value->masks = NULL;
        }
    }

    return;
}

// Assembly:
testq %rsi, %rsi
je 0x7e81
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rdi
testq %rdi, %rdi
jne 0x7e58
jmp 0x7e7c
movq 0x10(%r15), %rsi
callq *%rax
andq $0x0, 0x10(%r15)
movq 0x890(%r14), %rdi
movq %r15, %rsi
callq *0x878(%r14)
movq (%rbx), %rdi
callq 0x65d0
movq %rax, %r15
movq 0x878(%r14), %rax
movq 0x890(%r14), %rdi
testq %r15, %r15
jne 0x7e39
movq (%rbx), %rsi
callq *%rax
andq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_free_application_specific_information
void
kmip_free_application_specific_information(KMIP *ctx, ApplicationSpecificInformation *value)
{
    if(value != NULL)
    {
        if(value->application_namespace != NULL)
        {
            kmip_free_text_string(ctx, value->application_namespace);

            ctx->free_func(ctx->state, value->application_namespace);
            value->application_namespace = NULL;
        }

        if(value->application_data != NULL)
        {
            kmip_free_text_string(ctx, value->application_data);

            ctx->free_func(ctx->state, value->application_data);
            value->application_data = NULL;
        }
    }

    return;
}

// Assembly:
testq %rsi, %rsi
je 0x7f7b
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rsi
testq %rsi, %rsi
je 0x7f4c
movq %r14, %rdi
callq 0x6350
movq 0x890(%r14), %rdi
movq (%rbx), %rsi
callq *0x878(%r14)
andq $0x0, (%rbx)
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x7f74
movq %r14, %rdi
callq 0x6350
movq 0x890(%r14), %rdi
movq 0x8(%rbx), %rsi
callq *0x878(%r14)
andq $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_free_cryptographic_parameters
void
kmip_free_cryptographic_parameters(KMIP *ctx, CryptographicParameters *value)
{
    if(value != NULL)
    {
        if(value->p_source != NULL)
        {
            kmip_free_byte_string(ctx, value->p_source);
            
            ctx->free_func(ctx->state, value->p_source);
            value->p_source = NULL;
        }
        
        kmip_init_cryptographic_parameters(value);
    }
    
    return;
}

// Assembly:
testq %rsi, %rsi
je 0x7fd3
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x40(%rsi), %rsi
testq %rsi, %rsi
je 0x7fab
movq %rdi, %r14
callq 0x6100
movq 0x890(%r14), %rdi
movq 0x40(%rbx), %rsi
callq *0x878(%r14)
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rbx)
movups %xmm0, (%rbx)
pcmpeqd %xmm1, %xmm1
movdqu %xmm1, 0x18(%rbx)
movdqu %xmm1, 0x28(%rbx)
movups %xmm0, 0x38(%rbx)
orl $-0x1, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_free_attributes
void
kmip_free_attributes(KMIP *ctx, Attributes *value)
{
    if(value != NULL)
    {
        if(value->attribute_list != NULL)
        {
            LinkedListItem *curr = kmip_linked_list_pop(value->attribute_list);
            while(curr != NULL)
            {
                Attribute *attribute = (Attribute *)curr->data;
                kmip_free_attribute(ctx, attribute);
                ctx->free_func(ctx->state, attribute);
                ctx->free_func(ctx->state, curr);
                curr = kmip_linked_list_pop(value->attribute_list);
            }
            ctx->free_func(ctx->state, value->attribute_list);

            value->attribute_list = NULL;
        }
    }

    return;
}

// Assembly:
testq %rsi, %rsi
je 0x8052
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rdi
testq %rdi, %rdi
jne 0x8025
jmp 0x8047
movq 0x10(%r15), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x6610
movq 0x890(%r14), %rdi
movq %r12, %rsi
callq *0x878(%r14)
movq 0x890(%r14), %rdi
movq %r15, %rsi
callq *0x878(%r14)
movq (%rbx), %rdi
callq 0x65d0
movq %rax, %r15
testq %rax, %rax
jne 0x7ff1
movq 0x890(%r14), %rdi
movq (%rbx), %rsi
callq *0x878(%r14)
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_free_template_attribute
void
kmip_free_template_attribute(KMIP *ctx, TemplateAttribute *value)
{
    if(value != NULL)
    {
        if(value->names != NULL)
        {
            for(size_t i = 0; i < value->name_count; i++)
            {
                kmip_free_name(ctx, &value->names[i]);
            }
            ctx->free_func(ctx->state, value->names);
            
            value->names = NULL;
        }
        
        value->name_count = 0;
        
        if(value->attributes != NULL)
        {
            for(size_t i = 0; i < value->attribute_count; i++)
            {
                kmip_free_attribute(ctx, &value->attributes[i]);
            }
            ctx->free_func(ctx->state, value->attributes);
            
            value->attributes = NULL;
        }
        
        value->attribute_count = 0;
    }
    
    return;
}

// Assembly:
testq %rsi, %rsi
je 0x80ff
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, (%rsi)
je 0x80a8
xorl %r15d, %r15d
xorl %r12d, %r12d
cmpq 0x8(%rbx), %r12
jae 0x8093
movq (%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x65e0
incq %r12
addq $0x10, %r15
jmp 0x8076
movq 0x890(%r14), %rdi
movq (%rbx), %rsi
callq *0x878(%r14)
andq $0x0, (%rbx)
andq $0x0, 0x8(%rbx)
cmpq $0x0, 0x10(%rbx)
je 0x80ef
xorl %r15d, %r15d
xorl %r12d, %r12d
cmpq 0x18(%rbx), %r12
jae 0x80d8
movq 0x10(%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x6610
incq %r12
addq $0x10, %r15
jmp 0x80ba
movq 0x890(%r14), %rdi
movq 0x10(%rbx), %rsi
callq *0x878(%r14)
andq $0x0, 0x10(%rbx)
andq $0x0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_free_transparent_symmetric_key
void
kmip_free_transparent_symmetric_key(KMIP *ctx, TransparentSymmetricKey *value)
{
    if(value != NULL)
    {
        if(value->key != NULL)
        {
            kmip_free_byte_string(ctx, value->key);
            
            ctx->free_func(ctx->state, value->key);
            value->key = NULL;
        }
    }
    
    return;
}

// Assembly:
testq %rsi, %rsi
je 0x8138
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rsi), %rsi
testq %rsi, %rsi
je 0x8131
movq %rdi, %r14
callq 0x6100
movq 0x890(%r14), %rdi
movq (%rbx), %rsi
callq *0x878(%r14)
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_free_key_value
void
kmip_free_key_value(KMIP *ctx, enum key_format_type format, KeyValue *value)
{
    if(value != NULL)
    {
        if(value->key_material != NULL)
        {
            kmip_free_key_material(ctx, format, &value->key_material);
            value->key_material = NULL;
        }
        
        if(value->attributes != NULL)
        {
            for(size_t i = 0; i < value->attribute_count; i++)
            {
                kmip_free_attribute(ctx, &value->attributes[i]);
            }
            ctx->free_func(ctx->state, value->attributes);
            
            value->attributes = NULL;
        }
        
        value->attribute_count = 0;
    }
    
    return;
}

// Assembly:
testq %rdx, %rdx
je 0x8208
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
cmpq $0x0, (%rdx)
je 0x81b6
movq %r14, %rdi
movq %rbx, %rdx
callq 0x6710
andq $0x0, (%rbx)
cmpq $0x0, 0x8(%rbx)
je 0x81f8
xorl %r15d, %r15d
xorl %r12d, %r12d
cmpq 0x10(%rbx), %r12
jae 0x81e1
movq 0x8(%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x6610
incq %r12
addq $0x10, %r15
jmp 0x81c3
movq 0x890(%r14), %rdi
movq 0x8(%rbx), %rsi
callq *0x878(%r14)
andq $0x0, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_free_encryption_key_information
void
kmip_free_encryption_key_information(KMIP *ctx, EncryptionKeyInformation *value)
{
    if(value != NULL)
    {
        if(value->unique_identifier != NULL)
        {
            kmip_free_text_string(ctx, value->unique_identifier);
            
            ctx->free_func(ctx->state, value->unique_identifier);
            value->unique_identifier = NULL;
        }
        
        if(value->cryptographic_parameters != NULL)
        {
            kmip_free_cryptographic_parameters(ctx, value->cryptographic_parameters);
            
            ctx->free_func(ctx->state, value->cryptographic_parameters);
            value->cryptographic_parameters = NULL;
        }
    }
    
    return;
}

// Assembly:
testq %rsi, %rsi
je 0x826c
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rsi
testq %rsi, %rsi
je 0x823d
movq %r14, %rdi
callq 0x6350
movq 0x890(%r14), %rdi
movq (%rbx), %rsi
callq *0x878(%r14)
andq $0x0, (%rbx)
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x8265
movq %r14, %rdi
callq 0x6e50
movq 0x890(%r14), %rdi
movq 0x8(%rbx), %rsi
callq *0x878(%r14)
andq $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq