LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/burakbugrul[P]NginxLogParser/NginxParser.cpp
// Function: NginxParser::findIP[abi:cxx11](char*)
inline string NginxParser::findIP(char *line){
	
	int number=0;
	int point_count = 0;
	string result;
	
	for( int i=0 ; line[i] != ' ' && line[i] != '-' && line[i] != '\0' ; i++ ){
		
		if( isdigit(line[i]) )
			number = number*10 + (line[i]-'0');
		else if( number > 255 )
			return "-1";
		else if( line[i] == '.' ){
			number = 0;
			point_count++;
		}
		else
			return "-1";
		
		result += line[i];
	}
	
	if( point_count == 3 )
		return result;
	return "-1";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
movabsq $0x200100000001, %r13   # imm = 0x200100000001
xorl %ebp, %ebp
movzbl (%r14), %eax
cmpq $0x2d, %rax
ja 0x3a9e
btq %rax, %r13
jb 0x3ada
movsbl %al, %esi
leal -0x30(%rsi), %ecx
cmpl $0x9, %ecx
ja 0x3ab3
leal (%r12,%r12,4), %eax
leal (%rcx,%rax,2), %r12d
jmp 0x3acd
cmpl $0x100, %r12d           # imm = 0x100
jge 0x3b45
cmpb $0x2e, %al
jne 0x3b69
incl %ebp
xorl %r12d, %r12d
movq %r15, %rdi
callq 0x2160
incq %r14
jmp 0x3a8e
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
cmpl $0x3, %ebp
jne 0x3b03
movq 0x8(%rsp), %rcx
leaq 0x18(%rsp), %r14
cmpq %r14, %rcx
je 0x3b20
movq %rcx, (%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0x3b27
leaq 0x1586(%rip), %rsi      # 0x5090
leaq 0x1581(%rip), %rdx      # 0x5092
movq %rbx, %rdi
leaq 0x18(%rsp), %r14
callq 0x3be2
jmp 0x3b8b
movups (%r14), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %r14, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
jmp 0x3b8b
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x153d(%rip), %rsi      # 0x5090
leaq 0x1538(%rip), %rdx      # 0x5092
movq %rbx, %rdi
leaq 0x18(%rsp), %r14
callq 0x3be2
jmp 0x3b8b
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x1519(%rip), %rsi      # 0x5090
leaq 0x1514(%rip), %rdx      # 0x5092
movq %rbx, %rdi
leaq 0x18(%rsp), %r14
callq 0x3be2
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3ba2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2190
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3bba
jmp 0x3bba
jmp 0x3bba
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3bd9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2190
movq %rbx, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O3/brianwu02[P]ImageProcessing/sharpen.cpp
// Function: sharpen(imageS*, imageS*, int, imageS*)
void sharpen(imageP I1, imageP I2, int fctr, imageP final_img) {
    /* I2 will be blurred image.
     * I1 will be the un-altered input image.
     * final will be final output image.
     */

    int i, total;
    unsigned char *original, *blurred, *fin_img;

    total = I1->width * I1->height;
    
    final_img->width = I1->width;
    final_img->height = I1->height;

    final_img->image = (unsigned char *) malloc(total);

    fin_img = final_img->image;
    original = I1->image;
    blurred = I2->image;

    if (final_img->image == NULL) {
        cerr << "not enough memory\n" << endl;
    }

    int w = I1->width;
    int h = I1->height;

    unsigned char difference[total];
    
    // subtract blurred image from original image to get difference.
    for (i=0; i<total; i++) {
        difference[i] = clip(fctr * (original[i] - blurred[i]));
    }

    for (i=0; i<total; i++) {
        fin_img[i] = clip(original[i] + difference[i]);
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movl %edx, %r14d
movq %rsi, -0x30(%rbp)
movq %rdi, %r13
movl (%rdi), %eax
movl 0x4(%rdi), %r12d
movl %eax, (%rcx)
movl %r12d, 0x4(%rcx)
imull %eax, %r12d
movslq %r12d, %rdi
callq 0x2150
movq %rax, %rbx
movq %rax, 0x8(%r15)
movq 0x8(%r13), %r13
movq -0x30(%rbp), %rax
movq 0x8(%rax), %r15
testq %rbx, %rbx
jne 0x29ff
movq 0x2634(%rip), %rdi      # 0x4ff0
leaq 0x677(%rip), %rsi       # 0x303a
movl $0x12, %edx
callq 0x2100
movq 0x261c(%rip), %rcx      # 0x4ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x20d0
movsbl %al, %esi
movq 0x25fe(%rip), %rdi      # 0x4ff0
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movl %r12d, %eax
movq %rsp, %rcx
leaq 0xf(%rax), %rdx
andq $-0x10, %rdx
subq %rdx, %rcx
movq %rcx, %rsp
testl %r12d, %r12d
jle 0x2a7c
xorl %edx, %edx
xorl %esi, %esi
movzbl (%r13,%rsi), %edi
movzbl (%r15,%rsi), %r8d
subl %r8d, %edi
imull %r14d, %edi
testl %edi, %edi
cmovlel %edx, %edi
movl $0xff, %r8d
cmpl %r8d, %edi
jl 0x2a43
movl $0xff, %edi
movb %dil, (%rcx,%rsi)
incq %rsi
cmpq %rsi, %rax
jne 0x2a1c
testl %r12d, %r12d
jle 0x2a7c
xorl %edx, %edx
movl $0xff, %esi
movzbl (%r13,%rdx), %edi
movzbl (%rcx,%rdx), %r8d
addl %edi, %r8d
cmpl %esi, %r8d
cmovael %esi, %r8d
movb %r8b, (%rbx,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0x2a5b
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/dekanfrus[P]pThreads/osproj2a.c
// Function: compute_pi(void*)
void *compute_pi( void *s )
{
  unsigned int seed;
  int ii;
  int *hit_pointer;
  int local_hits;
  double rand_no_x;
  double rand_no_y;

  hit_pointer = (int *) s;
  seed = *hit_pointer;
  local_hits = 0;


  for( ii=0; ii < sample_points_per_thread; ii++ )
    {
	  
      rand_no_x = (double) (rand_r( &seed ))/(double)RAND_MAX;
      rand_no_y = (double) (rand_r( &seed ))/(double)RAND_MAX;
      if(((rand_no_x - 0.5) * (rand_no_x - 0.5) +
	  (rand_no_y - 0.5) * (rand_no_y - 0.5)) < 0.25)
	local_hits++;
      seed *= ii;
	  
    }

  *hit_pointer = local_hits;
  pthread_exit(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl (%rdi), %eax
movl %eax, -0x24(%rbp)
xorl %r15d, %r15d
cmpl $0x0, 0x3524(%rip)      # 0x4890
jle 0x1402
xorl %r12d, %r12d
leaq -0x24(%rbp), %r14
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x1070
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd 0xc85(%rip), %xmm0      # 0x2018
divsd %xmm0, %xmm1
movsd %xmm1, -0x30(%rbp)
movq %r14, %rdi
callq 0x1070
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0xc65(%rip), %xmm0      # 0x2018
movsd 0xc65(%rip), %xmm1      # 0x2020
movsd -0x30(%rbp), %xmm2
addsd %xmm1, %xmm2
addsd %xmm1, %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm2, %xmm2
xorl %eax, %eax
addsd %xmm0, %xmm2
movsd 0xc4a(%rip), %xmm0      # 0x2028
ucomisd %xmm2, %xmm0
seta %al
movl -0x24(%rbp), %ecx
imull %r12d, %ecx
addl %eax, %r15d
movl %ecx, -0x24(%rbp)
incl %r12d
cmpl 0x3494(%rip), %r12d     # 0x4890
jl 0x137c
movl %r15d, (%rbx)
xorl %edi, %edi
callq 0x10a0
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: Context::Context(char*, int)
Context::Context(char *cursor, int length) : start(0), strls(false)
{
  this->origin = cursor;
  this->cursor = cursor;
  this->length = length;
  this->currentState = new OpenDTA();
  this->buffer = new char[INITIAL_BUFFER];
  this->buffer_size = INITIAL_BUFFER;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r13d
movq %rsi, %r12
movq %rdi, %r14
leaq 0xcbca(%rip), %rax      # 0x180c8
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0xaedc
leaq 0x68(%r14), %r15
movq %r15, %rdi
callq 0xb2b4
movb $0x0, 0xb0(%r14)
leaq 0xc0(%r14), %rax
movq %rax, -0x30(%rbp)
movq $0x0, 0x108(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0xc0(%r14)
movups %xmm0, 0xd0(%r14)
movups %xmm0, 0xe0(%r14)
movq %r12, 0xb8(%r14)
movq %r12, 0x100(%r14)
movl %r13d, 0x110(%r14)
movl $0x8, %edi
callq 0x7330
leaq 0xcb70(%rip), %rcx      # 0x180e8
movq %rcx, (%rax)
movq %rax, 0xa8(%r14)
movl $0x400, %edi            # imm = 0x400
callq 0x7030
movq %rax, 0xf0(%r14)
movl $0x400, 0xf8(%r14) # imm = 0x400
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0xb5c6
movq %rax, %r14
movq -0x30(%rbp), %rdi
callq 0xd414
movq %r15, %rdi
callq 0xb310
movq %rbx, %rdi
callq 0xaf48
movq %r14, %rdi
callq 0x75b0
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: Context::~Context()
Context::~Context()
{
  if (currentState)
    delete currentState;
  
  if (buffer)
    delete buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xcae2(%rip), %rax      # 0x180c8
movq %rax, (%rdi)
movq 0xa8(%rdi), %rdi
testq %rdi, %rdi
je 0xb5fb
movq (%rdi), %rax
callq *0x20(%rax)
movq 0xf0(%rbx), %rdi
testq %rdi, %rdi
je 0xb611
movl $0x1, %esi
callq 0x7340
movq 0xd8(%rbx), %rdi
testq %rdi, %rdi
je 0xb62c
movq 0xe8(%rbx), %rsi
subq %rdi, %rsi
callq 0x7340
leaq 0xc0(%rbx), %rdi
callq 0xd414
leaq 0x68(%rbx), %rdi
callq 0xb310
addq $0x8, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xaf48
nop
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: Context::exportToDB(DatabaseTypes, void*)
int Context::exportToDB(DatabaseTypes db_type, void * params)
{
  Database * db_obj = NULL;

  switch(db_type) 
  {
    case SQLITE:
        db_obj = (Database *)new SQLite();
        break;
  }


  if (db_obj)
  {
      if (db_obj->connect((char*)params))
      {
        /* start writing the database */
        db_obj->write(*this);

        /* finished */
        db_obj->close();
      }

      delete db_obj;
      db_obj = NULL;
  }
  else
  {
    cout << "Couldn't create a database object to export the database"  << endl;
    return 0;
  }
 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testl %esi, %esi
je 0xb6d3
movq 0xd935(%rip), %rbx      # 0x18fc0
leaq 0x5fae(%rip), %rsi      # 0x11640
movl $0x38, %edx
movq %rbx, %rdi
callq 0x73b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7230
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %rbx
movq %rdi, %r14
movl $0x10, %edi
callq 0x7330
movq %rax, %r15
movq %rax, %rdi
callq 0xef18
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x7687
movq %rax, %rbx
movl $0x10, %esi
movq %r15, %rdi
callq 0x7340
movq %rbx, %rdi
callq 0x75b0
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: Context::advanceData(int)
void Context::advanceData(int c)
{
  int curr_length=0, curr_position = 0;
  char *prev_cursor = cursor;
 
  for (start = cursor; curr_position <= c; cursor++, curr_position++);
 
  curr_length = cursor - prev_cursor;

  if (curr_length > buffer_size)
    resizeBuffer(curr_length);

  memset(buffer, 0, buffer_size);
  strncpy(buffer, start, curr_length);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x100(%rdi), %rax
movq %rax, 0x108(%rdi)
movq %rax, %r14
testl %esi, %esi
js 0xb743
movl %esi, %ecx
leaq (%rcx,%rax), %r14
incq %r14
movq %r14, 0x100(%rbx)
subq %rax, %r14
movl 0xf8(%rbx), %eax
cmpl %r14d, %eax
jge 0xb762
movq %rbx, %rdi
movl %r14d, %esi
callq 0xd46c
movl 0xf8(%rbx), %eax
movq 0xf0(%rbx), %rdi
movslq %eax, %rdx
xorl %esi, %esi
callq 0x71e0
movq 0xf0(%rbx), %rdi
movq 0x108(%rbx), %rsi
movslq %r14d, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x71a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: Context::advanceNoState()
void Context::advanceNoState()
{
  int curr_length=0;
  int i = 0;


  for (start = cursor; cursor && (cursor - origin) < length && *cursor != '>'; cursor++);

  if (cursor && *cursor++ == '>')
  {
    curr_length = cursor - start;
        
    if (curr_length > buffer_size)
      resizeBuffer(curr_length);

    memset(buffer, 0, buffer_size);
    strncpy(buffer, start, curr_length);
  }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x100(%rdi), %rax
movq %rax, 0x108(%rdi)
testq %rax, %rax
je 0xb83c
movq %rdi, %rbx
movslq 0x110(%rdi), %rdx
movq %rax, %rsi
subq 0xb8(%rdi), %rsi
movq %rax, %rcx
cmpq %rdx, %rsi
jge 0xb7e2
movq %rax, %rcx
cmpb $0x3e, (%rcx)
je 0xb7e2
incq %rcx
movq %rcx, 0x100(%rbx)
incq %rsi
cmpq %rdx, %rsi
jl 0xb7cb
leaq 0x1(%rcx), %r14
movq %r14, 0x100(%rbx)
cmpb $0x3e, (%rcx)
jne 0xb83c
subq %rax, %r14
movl 0xf8(%rbx), %eax
cmpl %r14d, %eax
jge 0xb811
movq %rbx, %rdi
movl %r14d, %esi
callq 0xd46c
movl 0xf8(%rbx), %eax
movq 0xf0(%rbx), %rdi
movslq %eax, %rdx
xorl %esi, %esi
callq 0x71e0
movq 0xf0(%rbx), %rdi
movq 0x108(%rbx), %rsi
movslq %r14d, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x71a0
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: Context::advance()
void * Context::advance()
{
  advanceNoState();

  while (currentState && currentState->check(buffer))
  {
      currentState->process(*this);

      if (currentState)
      {
        State * newState = currentState->advanceState();
        delete currentState;
        currentState = newState;
      }
  }
  
  return (void *)(start);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0xb78e
movq 0xa8(%rbx), %r14
testq %r14, %r14
je 0xb8c4
movq 0xf0(%rbx), %rsi
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
testb %al, %al
je 0xb8c4
movq 0xa8(%rbx), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x10(%rax)
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0xb8c4
movq (%rdi), %rax
callq *(%rax)
movq %rax, %r14
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0xb8bb
movq (%rdi), %rax
callq *0x20(%rax)
movq %r14, 0xa8(%rbx)
jmp 0xb86c
movq 0x108(%rbx), %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: OpenRelease::process(Context&)
bool OpenRelease::process(Context &ctx)
{
  string version = ctx.getChars(3);
 
  switch (strtol(version.c_str(), NULL, 10))
  {
  case 119:
  case 118:
    ctx.hdr.fileRelease = R119;
    break;
  case 117:
    ctx.hdr.fileRelease = R117;
    break;

  default:
    ctx.hdr.fileRelease = R117;
    break;
  }

  ctx.advance(); // CONTENT
  ctx.advance(); // </release>
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
leaq -0x30(%rbp), %r14
movq %r14, %rdi
movl $0x3, %edx
callq 0xd4a8
movq (%r14), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x7480
leaq -0x75(%rax), %rdx
movl $0x2, %ecx
cmpq $0x2, %rdx
ja 0xb999
leaq 0x5c86(%rip), %rcx      # 0x11618
movl -0x1d4(%rcx,%rax,4), %ecx
movl %ecx, 0x60(%rbx)
movq %rbx, %rdi
callq 0xb856
movq %rbx, %rdi
callq 0xb856
leaq -0x20(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb9c5
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x7340
movb $0x1, %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x20(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb9ec
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x7340
movq %rbx, %rdi
callq 0x75b0
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: OpenByteOrder::process(Context&)
bool OpenByteOrder::process(Context &ctx)
{
  string byteOrder = ctx.getChars(3);

  if (!strcasecmp(byteOrder.c_str(), XML_LSF))
    ctx.hdr.fileByteorder = LSF;
  else
    ctx.hdr.fileByteorder = MSF;

  ctx.advance(); // ORDER
  ctx.advance(); // </byteorder>
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
leaq -0x30(%rbp), %r14
movq %r14, %rdi
movl $0x3, %edx
callq 0xd4a8
movq (%r14), %rdi
leaq 0x5c42(%rip), %rsi      # 0x11679
callq 0x7380
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, 0x64(%rbx)
movq %rbx, %rdi
callq 0xb856
movq %rbx, %rdi
callq 0xb856
leaq -0x20(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xba6f
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x7340
movb $0x1, %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x20(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xba96
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x7340
movq %rbx, %rdi
callq 0x75b0
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: OpenK::process(Context&)
bool OpenK::process(Context &ctx)
{

  if (ctx.hdr.fileByteorder == LSF)
  {
    char *ctxbuf = (char *)ctx.advance();

   

    switch (ctx.hdr.fileRelease)
    {
    // 4 byte
    case R119:
      if (ctxbuf[2] == '<' && ctxbuf[3] == '/')
        ctx.hdr.variables = GetLSF<uint16_t>(ctxbuf, 2);
      else 
        ctx.hdr.variables = GetLSF<uint32_t>(ctxbuf, 4);
      break;

    // 2 byte
    case R118:
    case R117:
      ctx.hdr.variables = GetLSF<uint16_t>(ctxbuf, 2);
      break;

    default:

      break;
    }
  }
  else
  {
    // MSF not implemented yet
  }

  ctx.advance();

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x0, 0x64(%rsi)
jne 0xbb0a
movq %rbx, %rdi
callq 0xb856
movl 0x60(%rbx), %ecx
leal -0x1(%rcx), %edx
cmpl $0x2, %edx
jae 0xbadf
movzwl (%rax), %edx
jmp 0xbb07
testl %ecx, %ecx
jne 0xbb0a
cmpb $0x3c, 0x2(%rax)
jne 0xbaef
cmpb $0x2f, 0x3(%rax)
je 0xbada
xorl %ecx, %ecx
xorl %edx, %edx
movzbl (%rax), %esi
shll %cl, %esi
orl %esi, %edx
addq $0x8, %rcx
incq %rax
cmpq $0x20, %rcx
jne 0xbaf3
movl %edx, 0x10(%rbx)
movq %rbx, %rdi
callq 0xb856
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: OpenN::process(Context&)
bool OpenN::process(Context &ctx)
{
  char *ctxbuf = (char *)ctx.advance();

  if (ctx.hdr.fileByteorder == LSF)
  {
    switch (ctx.hdr.fileRelease)
    {
    // 8 byte
    case R119:
    case R118:
      ctx.hdr.observations = GetLSF<uint64_t>(ctxbuf, 8);
      break;

    // 4 byte
    case R117:
      ctx.hdr.observations = GetLSF<uint32_t>(ctxbuf, 4);
      break;

    default:
      break;
    }
  }
  else
  {
    // MSF not implemented yet
  }


  ctx.advance();
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rsi, %rdi
callq 0xb856
cmpl $0x0, 0x64(%rbx)
jne 0xbb91
cmpl $0x2, 0x60(%rbx)
jae 0xbb71
xorl %ecx, %ecx
xorl %edx, %edx
movzbl (%rax), %esi
shll %cl, %esi
movslq %esi, %rsi
orq %rsi, %rdx
addq $0x8, %rcx
incq %rax
cmpq $0x40, %rcx
jne 0xbb57
jmp 0xbb8d
jne 0xbb91
xorl %ecx, %ecx
xorl %edx, %edx
movzbl (%rax), %esi
shll %cl, %esi
orl %esi, %edx
addq $0x8, %rcx
incq %rax
cmpq $0x20, %rcx
jne 0xbb77
movl %edx, %edx
movq %rdx, 0x18(%rbx)
movq %rbx, %rdi
callq 0xb856
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: OpenLabel::process(Context&)
bool OpenLabel::process(Context &ctx)
{
  char *ctxbuf = (char *)ctx.advance();
  int label_count = 0;

  if (ctx.hdr.fileByteorder == LSF)
  {
    switch (ctx.hdr.fileRelease)
    {
    case R119:
    case R118:
      label_count = GetLSF<int16_t>(ctxbuf, 2);
      ctx.hdr.datalabel.assign(&ctxbuf[2], label_count);
      break;

    case R117:
      label_count = GetLSF<int8_t>(ctxbuf, 1);
      ctx.hdr.datalabel.assign(&ctxbuf[1], label_count);
      break;

    default:
      break;
    }
  }
  else
  {
    // not implemented yet
  }

  ctx.advance();

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rsi, %rdi
callq 0xb856
cmpl $0x0, 0x64(%rbx)
jne 0xbc0f
cmpl $0x2, 0x60(%rbx)
jae 0xbbf4
movzbl (%rax), %ecx
movzbl 0x1(%rax), %edx
shll $0x8, %edx
movswq %dx, %r8
orq %rcx, %r8
leaq 0x40(%rbx), %rdi
addq $0x2, %rax
jmp 0xbc01
jne 0xbc0f
movsbq (%rax), %r8
leaq 0x40(%rbx), %rdi
incq %rax
movq 0x48(%rbx), %rdx
xorl %esi, %esi
movq %rax, %rcx
callq 0x74e0
movq %rbx, %rdi
callq 0xb856
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: OpenTimeStamp::process(Context&)
bool OpenTimeStamp::process(Context &ctx)
{
  char *ctxbuf = (char *)ctx.advance();
  int label_count = 0;

  switch (ctx.hdr.fileRelease)
  {

  case R119:
  case R118:
  case R117:
    label_count = GetLSF<int8_t>(ctxbuf, 1);
    ctx.hdr.ts.assign(&ctxbuf[1], label_count);
    break;
  case R115:
  case R114:
  case R113:
  case R112:
    break;
  }

  ctx.advance();
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rsi, %rdi
callq 0xb856
cmpl $0x2, 0x60(%rbx)
ja 0xbc6a
movsbq (%rax), %r8
leaq 0x20(%rbx), %rdi
incq %rax
movq 0x28(%rbx), %rdx
xorl %esi, %esi
movq %rax, %rcx
callq 0x74e0
movq %rbx, %rdi
callq 0xb856
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: OpenVarNames::process(Context&)
bool OpenVarNames::process(Context &ctx)
{
  char *ctxbuf = (char *)ctx.advance();
  int sz = 0;
  int curr = 0;

  if (ctx.hdr.fileByteorder == LSF)
  {

    while (*ctxbuf != '<')
    {

      switch (ctx.hdr.fileRelease)
      {
      // UTF-8
      case R119:
      case R118:
        sz = strlen(ctxbuf);
        /*wcslen((wchar_t *)ctxbuf);*/
        (ctx.vList.at(curr))->varname.assign(&ctxbuf[0], sz);
        cout <<  (ctx.vList.at(curr))->varname << endl;
        ctxbuf += 129;
        break;
      // ASCII
      case R117:
        sz = strlen(ctxbuf);
        (ctx.vList.at(curr))->varname.assign(&ctxbuf[0], sz);
        ctxbuf += 33;
        break;

      case R115:
      case R114:
      case R113:
      case R112:
        break;
      }

      curr++;
    }
  }
  else
  {
    // not implemented yet
  }

  ctx.advance();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rsi, %rdi
callq 0xb856
cmpl $0x0, 0x64(%rbx)
jne 0xc65b
movq %rax, %r15
cmpb $0x3c, (%rax)
je 0xc65b
xorl %r12d, %r12d
xorl %r14d, %r14d
cmpl $0x2, 0x60(%rbx)
jae 0xc608
movq %r15, %rdi
callq 0x7160
movq 0xc0(%rbx), %rcx
movq 0xc8(%rbx), %rdx
subq %rcx, %rdx
sarq $0x4, %rdx
cmpq %r14, %rdx
jbe 0xc663
movq (%rcx,%r12), %rdi
testq %rdi, %rdi
je 0xc674
movslq %eax, %r8
movq 0x8(%rdi), %rdx
xorl %esi, %esi
movq %r15, %rcx
callq 0x74e0
movq 0xc0(%rbx), %rax
movq 0xc8(%rbx), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
cmpq %r14, %rdx
jbe 0xc663
movq (%rax,%r12), %rax
testq %rax, %rax
je 0xc674
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq 0xc9f0(%rip), %rdi      # 0x18fc0
callq 0x73b0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r13, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7230
addq $0x81, %r15
jmp 0xc64a
jne 0xc64a
movq %r15, %rdi
callq 0x7160
movq 0xc0(%rbx), %rcx
movq 0xc8(%rbx), %rdx
subq %rcx, %rdx
sarq $0x4, %rdx
cmpq %r14, %rdx
jbe 0xc663
movq (%rcx,%r12), %rdi
testq %rdi, %rdi
je 0xc674
movslq %eax, %r8
movq 0x8(%rdi), %rdx
xorl %esi, %esi
movq %r15, %rcx
callq 0x74e0
addq $0x21, %r15
incq %r14
addq $0x10, %r12
cmpb $0x3c, (%r15)
jne 0xc549
movq %rbx, %rdi
callq 0xb856
leaq 0x5201(%rip), %rdi      # 0x1186b
movq %r14, %rsi
xorl %eax, %eax
callq 0x74c0
leaq 0x523a(%rip), %rdi      # 0x118b5
leaq 0x523b(%rip), %rsi      # 0x118bd
leaq 0x5260(%rip), %rcx      # 0x118e9
movl $0x2d8, %edx            # imm = 0x2D8
callq 0x7210
nop
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: OpenFormats::process(Context&)
bool OpenFormats::process(Context &ctx)
{
  char *ctxbuf = (char *)ctx.advance();
  int curr = 0, sz = 0;

  if (ctx.hdr.fileByteorder == LSF)
  {

    while (*ctxbuf != '<')
    {

      switch (ctx.hdr.fileRelease)
      {
      // UTF-8
      case R119:
      case R118:
        //sz = wcslen((wchar_t *)ctxbuf);
        sz = strlen((char *)ctxbuf);
        (ctx.vList.at(curr))->format.assign(&ctxbuf[0], sz);
        // cout << (ctx.vList.at(curr))->format << endl;
        ctxbuf += 57;
        break;

      // ASCII
      case R117:
        sz = strlen((char *)ctxbuf);
        (ctx.vList.at(curr))->format.assign(&ctxbuf[0], sz);
        //cout << (ctx.vList.at(curr))->format << endl;
        ctxbuf += 49;
        break;

      case R115:
      case R114:
      case R113:
      case R112:
        break;
      }

      curr++;
    }
  }
  else
  {
    // not implemented yet
  }

  ctx.advance();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rsi, %rdi
callq 0xb856
cmpl $0x0, 0x64(%rbx)
jne 0xc7ae
movq %rax, %r14
cmpb $0x3c, (%rax)
je 0xc7ae
xorl %r12d, %r12d
xorl %r15d, %r15d
cmpl $0x2, 0x60(%rbx)
jae 0xc751
movq 0xc0(%rbx), %r13
movq 0xc8(%rbx), %rdx
subq %r13, %rdx
sarq $0x4, %rdx
cmpq %r15, %rdx
jbe 0xc7b6
movq %r14, %rdi
callq 0x7160
movq (%r13,%r12), %rdi
testq %rdi, %rdi
je 0xc7c7
movl $0x39, %r13d
jmp 0xc785
jne 0xc79d
movq 0xc0(%rbx), %r13
movq 0xc8(%rbx), %rdx
subq %r13, %rdx
sarq $0x4, %rdx
cmpq %r15, %rdx
jbe 0xc7b6
movq %r14, %rdi
callq 0x7160
movq (%r13,%r12), %rdi
testq %rdi, %rdi
je 0xc7c7
movl $0x31, %r13d
movslq %eax, %r8
movq 0x30(%rdi), %rdx
addq $0x28, %rdi
xorl %esi, %esi
movq %r14, %rcx
callq 0x74e0
addq %r13, %r14
incq %r15
addq $0x10, %r12
cmpb $0x3c, (%r14)
jne 0xc717
movq %rbx, %rdi
callq 0xb856
leaq 0x50ae(%rip), %rdi      # 0x1186b
movq %r15, %rsi
xorl %eax, %eax
callq 0x74c0
leaq 0x50e7(%rip), %rdi      # 0x118b5
leaq 0x50e8(%rip), %rsi      # 0x118bd
leaq 0x510d(%rip), %rcx      # 0x118e9
movl $0x2d8, %edx            # imm = 0x2D8
callq 0x7210
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: OpenValueLabelNames::process(Context&)
bool OpenValueLabelNames::process(Context &ctx)
{
  char *ctxbuf = (char *)ctx.advance();
  int curr = 0, sz = 0;

  if (ctx.hdr.fileByteorder == LSF)
  {

    while (*ctxbuf != '<')
    {

      switch (ctx.hdr.fileRelease)
      {
      // UTF-8
      case R119:
      case R118:
        //sz = wcslen((wchar_t *)ctxbuf);
        sz = strlen((char *)ctxbuf);
        (ctx.vList.at(curr))->vallbl.assign(&ctxbuf[0], sz);
        ctxbuf += 129;
        break;

      // ASCII
      case R117:
        sz = strlen((char *)ctxbuf);
        (ctx.vList.at(curr))->vallbl.assign(&ctxbuf[0], sz);
        ctxbuf += 33;
        break;

      case R115:
      case R114:
      case R113:
      case R112:
        break;
      }

      curr++;
    }
  }
  else
  {
    // not implemented yet
  }

  ctx.advance();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rsi, %rdi
callq 0xb856
cmpl $0x0, 0x64(%rbx)
jne 0xc8cc
movq %rax, %r14
cmpb $0x3c, (%rax)
je 0xc8cc
xorl %r12d, %r12d
xorl %r15d, %r15d
cmpl $0x2, 0x60(%rbx)
jae 0xc86f
movq 0xc0(%rbx), %r13
movq 0xc8(%rbx), %rdx
subq %r13, %rdx
sarq $0x4, %rdx
cmpq %r15, %rdx
jbe 0xc8d4
movq %r14, %rdi
callq 0x7160
movq (%r13,%r12), %rdi
testq %rdi, %rdi
je 0xc8e5
movl $0x81, %r13d
jmp 0xc8a3
jne 0xc8bb
movq 0xc0(%rbx), %r13
movq 0xc8(%rbx), %rdx
subq %r13, %rdx
sarq $0x4, %rdx
cmpq %r15, %rdx
jbe 0xc8d4
movq %r14, %rdi
callq 0x7160
movq (%r13,%r12), %rdi
testq %rdi, %rdi
je 0xc8e5
movl $0x21, %r13d
movslq %eax, %r8
movq 0x50(%rdi), %rdx
addq $0x48, %rdi
xorl %esi, %esi
movq %r14, %rcx
callq 0x74e0
addq %r13, %r14
incq %r15
addq $0x10, %r12
cmpb $0x3c, (%r14)
jne 0xc835
movq %rbx, %rdi
callq 0xb856
leaq 0x4f90(%rip), %rdi      # 0x1186b
movq %r15, %rsi
xorl %eax, %eax
callq 0x74c0
leaq 0x4fc9(%rip), %rdi      # 0x118b5
leaq 0x4fca(%rip), %rsi      # 0x118bd
leaq 0x4fef(%rip), %rcx      # 0x118e9
movl $0x2d8, %edx            # imm = 0x2D8
callq 0x7210
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: OpenVariableLabels::process(Context&)
bool OpenVariableLabels::process(Context &ctx)
{
  char *ctxbuf = (char *)ctx.advance();
  int curr = 0, sz = 0;

  if (ctx.hdr.fileByteorder == LSF)
  {

    while (*ctxbuf && *ctxbuf != '<')
    {

      switch (ctx.hdr.fileRelease)
      {
      case R119:
      case R118:

        if (ctxbuf[0] != 0)
        {
          //sz = wcslen((wchar_t *)ctxbuf);
          sz = strlen((char *)ctxbuf);
          (ctx.vList.at(curr))->varlbl.assign(&ctxbuf[0], sz);
        }

        ctxbuf += 321;
        break;

      case R117:

        if (ctxbuf[0] != 0)
        {
          sz = strlen((char *)ctxbuf);
          (ctx.vList.at(curr))->varlbl.assign(&ctxbuf[0], sz);
        }

        ctxbuf += 81;
        break;

      default:
        break;
      }

      curr++;
    }
  }
  else
  {
    // not implemented yet
  }

  ctx.advance();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rsi, %rdi
callq 0xb856
cmpl $0x0, 0x64(%rbx)
jne 0xca3b
movq %rax, %r15
xorl %r12d, %r12d
xorl %r14d, %r14d
movzbl (%r15), %eax
testl %eax, %eax
je 0xca3b
cmpl $0x3c, %eax
je 0xca3b
cmpl $0x2, 0x60(%rbx)
jae 0xc9b9
testb %al, %al
je 0xc9b0
movq %r15, %rdi
callq 0x7160
movq 0xc0(%rbx), %rcx
movq 0xc8(%rbx), %rdx
subq %rcx, %rdx
sarq $0x4, %rdx
cmpq %r14, %rdx
jbe 0xca0b
movq (%rcx,%r12), %rdi
testq %rdi, %rdi
je 0xca1c
movslq %eax, %r8
movq 0x70(%rdi), %rdx
addq $0x68, %rdi
xorl %esi, %esi
movq %r15, %rcx
callq 0x74e0
addq $0x141, %r15            # imm = 0x141
jmp 0xc9ff
jne 0xc9ff
movq %r15, %rdi
callq 0x7160
movq 0xc0(%rbx), %rcx
movq 0xc8(%rbx), %rdx
subq %rcx, %rdx
sarq $0x4, %rdx
cmpq %r14, %rdx
jbe 0xca0b
movq (%rcx,%r12), %rdi
testq %rdi, %rdi
je 0xca1c
movslq %eax, %r8
movq 0x70(%rdi), %rdx
addq $0x68, %rdi
xorl %esi, %esi
movq %r15, %rcx
callq 0x74e0
addq $0x51, %r15
incq %r14
addq $0x10, %r12
jmp 0xc94d
leaq 0x4e59(%rip), %rdi      # 0x1186b
movq %r14, %rsi
xorl %eax, %eax
callq 0x74c0
leaq 0x4e92(%rip), %rdi      # 0x118b5
leaq 0x4e93(%rip), %rsi      # 0x118bd
leaq 0x4eb8(%rip), %rcx      # 0x118e9
movl $0x2d8, %edx            # imm = 0x2D8
callq 0x7210
movq %rbx, %rdi
callq 0xb856
nop
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: OpenCharacteristics::process(Context&)
bool OpenCharacteristics::process(Context &ctx)
{
  char *ctxbuf = (char *)ctx.getCursor();

  if (ctxbuf[0] == '<' && ctxbuf[1] == '/')
  {
    setHasCharacteristics(false);
    ctx.advance();
    ctx.advance();
  }
  else
  {
    setHasCharacteristics(true);
    ctx.advanceNoState();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x100(%rsi), %rax
cmpb $0x3c, (%rax)
jne 0xcaa7
cmpb $0x2f, 0x1(%rax)
jne 0xcaa7
movb $0x0, 0x8(%rdi)
movq %rbx, %rdi
callq 0xb856
movq %rbx, %rdi
callq 0xb856
movb $0x1, 0x8(%rdi)
movq %rbx, %rdi
callq 0xb78e
nop
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: CloseCH::process(Context&)
bool CloseCH::process(Context &ctx)
{
  char *ctxbuf = (char *)ctx.advance();

  if (ctxbuf[0] == '<' && ctxbuf[1] == 'c' && ctxbuf[2] == 'h' && ctxbuf[3] == '>')
    setHasCharacteristics(true);
  else
  {
    setHasCharacteristics(false);
    ctx.advance();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0xb856
cmpb $0x3c, (%rax)
jne 0xcb6c
cmpb $0x63, 0x1(%rax)
movb $0x0, 0x8(%r14)
movq %rbx, %rdi
callq 0xb856
nop
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: OpenSTRL::process(Context&)
bool OpenSTRL::process(Context &ctx)
{
  char *ctxbuf = (char *)ctx.advance();

  if (!ctx.strls)
  {
    cout << "no strls, next" << endl;
    return ctx.advance() && true;
  }
  else
  {
    // not implemented
  }

  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rsi, %rdi
callq 0xb856
cmpb $0x0, 0xb0(%rbx)
je 0xcfab
xorl %eax, %eax
jmp 0xcffb
movq 0xc00e(%rip), %r14      # 0x18fc0
leaq 0x4797(%rip), %rsi      # 0x11750
movl $0xe, %edx
movq %r14, %rdi
callq 0x73b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7300
movsbl %al, %esi
movq %r14, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7230
movq %rbx, %rdi
callq 0xb856
testq %rax, %rax
setne %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: OpenValueLabel::advanceState()
State *OpenValueLabel::advanceState()
{
  if (getHasLabels())
    return new OpenInnerValueLabel();
  else
    return new CloseValueLabel();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpb $0x1, 0x8(%rdi)
jne 0xd023
movl $0x10, %edi
callq 0x7330
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
leaq 0xb847(%rip), %rcx      # 0x18868
jmp 0xd034
movl $0x8, %edi
callq 0x7330
leaq 0xb7e4(%rip), %rcx      # 0x18818
movq %rcx, (%rax)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/State.cpp
// Function: OpenInnerValueLabel::advanceState()
State *OpenInnerValueLabel::advanceState()
{
  if (getHasMoreLabels())
    return new OpenInnerValueLabel();
  else
    return new CloseValueLabel();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpb $0x1, 0x8(%rdi)
jne 0xd07d
movl $0x10, %edi
callq 0x7330
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
leaq 0xb7ed(%rip), %rcx      # 0x18868
jmp 0xd08e
movl $0x8, %edi
callq 0x7330
leaq 0xb78a(%rip), %rcx      # 0x18818
movq %rcx, (%rax)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/StateBitops.cpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> GetLSF<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(char*, int)
string GetLSF<string>(char * ctxbuf, int size)
{
    string _st;
    char * c = ctxbuf;
    int inner_size = 0;

    while(c && *c && inner_size < size)
    {
        inner_size++;
        c++;
    }

    if (inner_size < size)
        memset(&ctxbuf[inner_size], 0, size - inner_size);

    _st.assign(ctxbuf, size);
    return _st;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
xorl %eax, %eax
testq %rsi, %rsi
je 0xeeae
cmpb $0x0, (%r14)
sete %cl
testl %r15d, %r15d
setle %dl
orb %cl, %dl
jne 0xeeae
xorl %eax, %eax
cmpb $0x0, 0x1(%r14,%rax)
leaq 0x1(%rax), %rax
je 0xeeae
cmpl %r15d, %eax
jl 0xee9d
movl %r15d, %ecx
subl %eax, %ecx
jle 0xeec4
movl %eax, %edi
addq %r14, %rdi
movslq %ecx, %rdx
xorl %esi, %esi
callq 0x71e0
movslq %r15d, %r8
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %rcx
callq 0x74e0
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0xeef9
movq (%r12), %rsi
incq %rsi
callq 0x7340
movq %r14, %rdi
callq 0x75b0
// File: /workspace/github_cpp_makefile_star2_O3/maplechori[P]stata-reader-writer/SQLite.cpp
// Function: SQLite::connect(void*)
bool SQLite::connect(void * ptr) {

    char *zErrMsg = 0;
    int rc;
    char * filename = (char *)ptr;
  
    rc = sqlite3_open(filename, &db);
    
    if (rc)
    {
      fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
      sqlite3_close(db);
      return false;
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
addq $0x8, %rbx
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x7590
movl %eax, %r14d
testl %eax, %eax
jne 0xfea7
testl %r14d, %r14d
sete %al
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
callq 0x76f7
jmp 0xfe9c
nop
// File: /workspace/github_cpp_makefile_star2_O3/huiwenliuge[P]EmoAnaer/src/RNNet.cpp
// Function: RNNet::FetchDict(char const*)
ChUTF8* RNNet::FetchDict(const char* pathRoot){

    char* path=(char*)calloc(sizeof(char),41);
    strcpy(path,pathRoot);
    strcpy(path+strlen(pathRoot),"DICT");
    
    ChUTF8* ret;
    std::cout<< path<<std::endl;
    FILE* dicfp=fopen(path,"r");
    FILE* dictmp=fopen("dictmp","w");
    ret=fldDic(dicfp,featureNUM);
    prtHash2File(ret,dictmp,featureNUM);
    free(path);
    ccdict=ret;
    return ret;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movl $0x1, %edi
movl $0x29, %esi
callq 0x20c0
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x2140
movq %r15, %rdi
callq 0x2080
movl $0x54434944, (%r14,%rax) # imm = 0x54434944
movb $0x0, 0x4(%r14,%rax)
movq %r14, %rdi
callq 0x2080
movq 0x58ff(%rip), %r15      # 0x7fd8
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x21a0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
leaq 0x395f(%rip), %rsi      # 0x6074
movq %r14, %rdi
callq 0x21c0
movq %rax, %r15
leaq 0x3953(%rip), %rdi      # 0x607a
leaq 0x3936(%rip), %rsi      # 0x6064
callq 0x21c0
movq %rax, %r12
movl 0x30(%rbx), %esi
movq %r15, %rdi
callq 0x4f3f
movq %rax, %r15
movl 0x30(%rbx), %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x5203
movq %r14, %rdi
callq 0x21d0
movq %r15, (%rbx)
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/huiwenliuge[P]EmoAnaer/src/RNNet.cpp
// Function: RNNet::Save2txt(char const*)
void RNNet::Save2txt(const char* pathRoot){
    // char* pdic=(char*)calloc(sizeof(char),41);
    // char* ppar=(char*)calloc(sizeof(char),41);
    // int pathrootlen = strlen(pathRoot);
    // strcpy(pdic,pathRoot);
    // strcpy(ppar,pathRoot);
    // //Dictionary/CROSS
    // strcpy(pdic+pathrootlen,"Dictionary/CROSSDICT");
    // strcpy(ppar+pathrootlen,"Dictionary/CROSSPARA");

    // FILE* fp = fopen(pdic,"w");
    // prtHash2File(ccdict,fp,featureNUM);
    // prtPara(ppar);
    char* path=(char*)calloc(sizeof(char),41);
    int pathrootlen = strlen(pathRoot);
    strcpy(path,pathRoot);
    strcpy(path+pathrootlen,"Dictionary/CROSS");
    _save_var(path);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %edi
movl $0x29, %esi
callq 0x20c0
movq %rax, %r15
movq %rbx, %rdi
callq 0x2080
movq %rax, %r12
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2140
movslq %r12d, %rax
movups 0x3360(%rip), %xmm0     # 0x603f
movups %xmm0, (%r15,%rax)
movb $0x0, 0x10(%r15,%rax)
movq %r14, %rdi
movq %r15, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2bee
nop
// File: /workspace/github_cpp_makefile_star2_O3/huiwenliuge[P]EmoAnaer/src/RNNet.cpp
// Function: RNNet::RNNForward_CROSSENTROPY(char const*)
double RNNet::RNNForward_CROSSENTROPY(const char* pathRoot){

    int pathrootlen=strlen(pathRoot);
    char* psen=(char*)calloc(sizeof(char),41);
    strcpy(psen,pathRoot);
    strcpy(psen+pathrootlen,"Material/");
    FreeSen();
    Sentence sentmp=FetchSent(psen);
    free(psen);
    
    while(sentmp){
        _Forward_CROSSENTROPY(sentmp);
        sentmp=sentmp->next;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2080
movq %rax, %r15
movl $0x1, %edi
movl $0x29, %esi
callq 0x20c0
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
callq 0x2140
movslq %r15d, %rax
movabsq $0x6c6169726574614d, %rcx # imm = 0x6C6169726574614D
movq %rcx, (%r12,%rax)
movw $0x2f, 0x8(%r12,%rax)
movq %rbx, %rdi
callq 0x32ce
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2f0a
movq %rax, %r14
movq %r12, %rdi
callq 0x21d0
testq %r14, %r14
je 0x32c2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x33fa
movq 0x70(%r14), %r14
jmp 0x32ac
xorps %xmm0, %xmm0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/huiwenliuge[P]EmoAnaer/src/RNNet.cpp
// Function: RNNet::FreeSen()
int RNNet::FreeSen(){
    if(sent==NULL) return 0;
    Sentence tmp;
    int i,j;
    while(sent){
        tmp = sent;
        sent=sent->next;
        free(tmp->schar);
        for(i=0;i<tmp->tlen;++i){
            free(tmp->inVec[i]);
            free(tmp->hidLay[i]);
            free(tmp->outLay[i]);
            free(tmp->kLayer[i]);
            free(tmp->energy[i]);
            free(tmp->DLDh[i]);
            free(tmp->DLDo[i]);
            free(tmp->DLDx[i]);
        }
        free(tmp->inVec);
        free(tmp->hidLay);
        free(tmp->kLayer);
        free(tmp->outLay);
        free(tmp->energy);
        free(tmp->eng);
        free(tmp->stdAns);
        free(tmp->DLDh);
        free(tmp->DLDo);
        free(tmp->DLDx);
        free(tmp);
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x78(%rdi), %r14
testq %r14, %r14
je 0x33ed
movq %rdi, %rbx
movq 0x70(%r14), %rax
movq %rax, 0x78(%rbx)
movq 0x8(%r14), %rdi
callq 0x21d0
cmpl $0x0, 0x10(%r14)
jle 0x3377
xorl %r15d, %r15d
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x21d0
movq 0x20(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x21d0
movq 0x30(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x21d0
movq 0x28(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x21d0
movq 0x38(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x21d0
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x21d0
movq 0x58(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x21d0
movq 0x68(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x21d0
incq %r15
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jl 0x3303
movq 0x18(%r14), %rdi
callq 0x21d0
movq 0x20(%r14), %rdi
callq 0x21d0
movq 0x28(%r14), %rdi
callq 0x21d0
movq 0x30(%r14), %rdi
callq 0x21d0
movq 0x38(%r14), %rdi
callq 0x21d0
movq 0x40(%r14), %rdi
callq 0x21d0
movq 0x48(%r14), %rdi
callq 0x21d0
movq 0x60(%r14), %rdi
callq 0x21d0
movq 0x58(%r14), %rdi
callq 0x21d0
movq 0x68(%r14), %rdi
callq 0x21d0
movq %r14, %rdi
callq 0x21d0
movq 0x78(%rbx), %r14
testq %r14, %r14
jne 0x32e8
movl $0x1, %eax
jmp 0x33ef
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/huiwenliuge[P]EmoAnaer/src/RNNet.cpp
// Function: RNNet::RNNForward_CROSSENTROPY_Nthread(char const*, int)
double RNNet::RNNForward_CROSSENTROPY_Nthread(const char* pathRoot,int Nthread){
    
    char* psen=(char*)calloc(sizeof(char),41);
    int pathrootlen=strlen(pathRoot);   
    strcpy(psen,pathRoot);
    strcpy(psen+pathrootlen,"Material/");
    FreeSen();
    Sentence sentmp=FetchSent(psen);
    free(psen);
    flag = totnum-1;
    
    std::thread th[Nthread];
    int n;
   
    for(n=0;n<Nthread;++n){
        th[n]=std::thread(_Forward_CROSSENTROPY_SingleTask,\
            this,&sentmp,n);
    }
    for(n=0;n<Nthread;++n)
        th[n].join();
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x29, %esi
callq 0x20c0
movq %rax, %r12
movq %r14, %rdi
callq 0x2080
movq %rax, %r13
movq %r12, %rdi
movq %r14, %rsi
callq 0x2140
movslq %r13d, %rax
movabsq $0x6c6169726574614d, %rcx # imm = 0x6C6169726574614D
movq %rcx, (%r12,%rax)
movw $0x2f, 0x8(%r12,%rax)
movq %r15, %rdi
callq 0x32ce
movq %r15, %rdi
movq %r12, %rsi
callq 0x2f0a
movq %rax, -0x58(%rbp)
movq %r12, %rdi
callq 0x21d0
movq %rsp, -0x38(%rbp)
movq 0x50(%r15), %rax
decq %rax
movq %rax, 0x48(%r15)
movl %ebx, %r13d
movq %rsp, %r14
leaq 0xf(,%r13,8), %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
testl %ebx, %ebx
je 0x3874
leaq (,%r13,8), %r12
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x20b0
movl $0x0, -0x2c(%rbp)
testl %ebx, %ebx
jle 0x3874
movq %r15, -0x48(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x50(%rbp), %rdi
leaq 0x9f(%rip), %rsi        # 0x38c2
leaq -0x48(%rbp), %rdx
leaq -0x40(%rbp), %rcx
leaq -0x2c(%rbp), %r8
callq 0x4ae0
movslq -0x2c(%rbp), %rax
cmpq $0x0, (%r14,%rax,8)
jne 0x38bc
movq -0x50(%rbp), %rcx
movq %rcx, (%r14,%rax,8)
incl %eax
movl %eax, -0x2c(%rbp)
cmpl %ebx, %eax
jl 0x380c
movl $0x0, -0x2c(%rbp)
testl %ebx, %ebx
jle 0x3874
xorl %eax, %eax
cltq
leaq (%r14,%rax,8), %rdi
callq 0x2250
movl -0x2c(%rbp), %eax
incl %eax
movl %eax, -0x2c(%rbp)
cmpl %ebx, %eax
jl 0x385d
testl %ebx, %ebx
je 0x388a
shlq $0x3, %r13
cmpq $0x0, -0x8(%r14,%r13)
jne 0x38bc
addq $-0x8, %r13
jne 0x387c
movq -0x38(%rbp), %rsp
xorps %xmm0, %xmm0
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x38a2
testl %ebx, %ebx
je 0x38b4
cmpq $0x0, -0x8(%r14,%r12)
jne 0x38bc
addq $-0x8, %r12
jne 0x38a6
movq %rax, %rdi
callq 0x2260
callq 0x2060
nop
// File: /workspace/github_cpp_makefile_star2_O3/huiwenliuge[P]EmoAnaer/src/RNNet.cpp
// Function: RNNet::_Forward_CROSSENTROPY_SingleTask(RNNet*, sentence**, int)
double RNNet::_Forward_CROSSENTROPY_SingleTask(RNNet* rnn,Sentence* sen,int n){
    Sentence tsen = *sen;
    long num = tsen->num;
    std::mutex g_mutex;
    while( rnn->flag > -1){
        g_mutex.lock();
        num = rnn->flag;
        //printf("%ld\n",num);
        rnn->flag--;
        g_mutex.unlock();
        tsen = gonext(tsen,num);
        if(tsen!=NULL){
            //std::cout<<tsen->schar<<std::endl;
            rnn->_Forward_CROSSENTROPY(tsen);
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq (%rsi), %r14
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $0x0, 0x48(%rdi)
js 0x393d
movq %rdi, %rbx
leaq -0x50(%rbp), %r15
movq %r15, %rdi
callq 0x2210
testl %eax, %eax
jne 0x394d
movq 0x48(%rbx), %r12
leaq -0x1(%r12), %rax
movq %rax, 0x48(%rbx)
movq %r15, %rdi
callq 0x20f0
testq %r12, %r12
js 0x3933
cmpq %r12, (%r14)
jle 0x3926
movq 0x70(%r14), %r14
jmp 0x391b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x33fa
jmp 0x3936
xorl %r14d, %r14d
cmpq $0x0, 0x48(%rbx)
jns 0x38f5
xorps %xmm0, %xmm0
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O3/huiwenliuge[P]EmoAnaer/src/RNNet.cpp
// Function: RNNet::_Backward_CROSSENTROPY_SingleTask(RNNet*, sentence**, int)
void RNNet::_Backward_CROSSENTROPY_SingleTask(RNNet* rnn,Sentence* sen,int n){
    Sentence tsen = *sen;
    std::mutex g_mutex;
    long num = tsen->num;
    while(rnn->flag > -1){
        g_mutex.lock();
        num = rnn->flag;
        //printf("%ld\n",num);
        rnn->flag--;
        g_mutex.unlock();
        tsen = gonext(tsen,num);
        if(tsen!=NULL){
            rnn->_Backward_CROSSENTROPY(tsen);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq (%rsi), %r14
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $0x0, 0x48(%rdi)
js 0x4841
movq %rdi, %rbx
leaq -0x50(%rbp), %r15
movq %r15, %rdi
callq 0x2210
testl %eax, %eax
jne 0x484e
movq 0x48(%rbx), %r12
leaq -0x1(%r12), %rax
movq %rax, 0x48(%rbx)
movq %r15, %rdi
callq 0x20f0
testq %r12, %r12
js 0x4837
cmpq %r12, (%r14)
jle 0x482a
movq 0x70(%r14), %r14
jmp 0x481f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3b1c
jmp 0x483a
xorl %r14d, %r14d
cmpq $0x0, 0x48(%rbx)
jns 0x47f9
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x20d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/huiwenliuge[P]EmoAnaer/src/RNNet.cpp
// Function: RNNet::softmax_add(sentence*, double*, int)
void RNNet::softmax_add(Sentence sen,double* src,int t){
    double normal=0.0;
    int i;
    for(i=0;i<EMOTIONNUM;++i)
        normal+=exp(src[i]);
    
    for(i=0;i<EMOTIONNUM;++i){
        sen->energy[t][i]=exp(src[i])/normal;
     //   std::cout<<sen->energy[t][i]<<std::endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %r15d
movq %rdx, %rbx
movq %rsi, %r14
xorpd %xmm1, %xmm1
xorl %r12d, %r12d
movsd %xmm1, -0x28(%rbp)
movsd (%rbx,%r12,8), %xmm0
callq 0x2270
movsd -0x28(%rbp), %xmm1
addsd %xmm0, %xmm1
incq %r12
cmpq $0x7, %r12
jne 0x4875
movslq %r15d, %r15
xorl %r12d, %r12d
movsd %xmm1, -0x28(%rbp)
movsd (%rbx,%r12,8), %xmm0
callq 0x2270
movsd -0x28(%rbp), %xmm1
divsd %xmm1, %xmm0
movq 0x38(%r14), %rax
movq (%rax,%r15,8), %rax
movsd %xmm0, (%rax,%r12,8)
incq %r12
cmpq $0x7, %r12
jne 0x489d
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq