LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/fukunagatsu[P]RIblast/seed_search.cpp
// Function: SeedSearch::CalcAccessibility(std::vector<float, std::allocator<float>>&, std::vector<float, std::allocator<float>>&, int, int)
double SeedSearch::CalcAccessibility(vector<float> &accessibility, vector<float> &conditional_accessibility, int sp, int length){
  double temp = accessibility[sp];
  for(int i =_min_accessible_length; i < length; i++){
    temp += conditional_accessibility[sp+i];
  }
  return(temp);
}

// Assembly:
movslq %ecx, %rax
movq (%rsi), %rcx
cvtss2sd (%rcx,%rax,4), %xmm0
movslq 0x24(%rdi), %rcx
cmpl %r8d, %ecx
jge 0x16c46
movslq %r8d, %rsi
shlq $0x2, %rax
addq (%rdx), %rax
xorps %xmm1, %xmm1
cvtss2sd (%rax,%rcx,4), %xmm1
addsd %xmm1, %xmm0
incq %rcx
cmpq %rcx, %rsi
jne 0x16c32
retq
nop
// File: /workspace/github_c_makefile_star2_O3/fukunagatsu[P]RIblast/seed_search.cpp
// Function: SeedSearch::GetSeqIdAndStart(std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, int*, int*, int, int)
void SeedSearch::GetSeqIdAndStart(vector<int> &db_seq_length, vector<int> &db_seq_start_position, int* seq_id, int* start, int sp, int length){
  int s = 0;
  int e = db_seq_start_position.size()-1;
  int m = (s+e)/2;

  while(true){
    if(e-s == 0){
      *seq_id  = s; *start = db_seq_length[s] - (sp - db_seq_start_position[s]) - length;
      break;
    }else if(e-s==1){
      if(sp >= db_seq_start_position[s] && sp < db_seq_start_position[s+1]){
	*seq_id  = s; *start = db_seq_length[s] - (sp - db_seq_start_position[s]) - length;
	break;
      }else{
	*seq_id  = e; *start = db_seq_length[e] - (sp - db_seq_start_position[e]) - length;
	break;
      }
    }else{    
      if(sp >= db_seq_start_position[m] && sp < db_seq_start_position[m+1]){
	*seq_id  = m;
	*start = db_seq_length[m] - (sp - db_seq_start_position[m]) - length;
	break;
      }else{
	if(sp >= db_seq_start_position[m]){
	  s = m;
	  m = (s+e)/2;
	}else{
	  e = m;
	  m = (s+e)/2;
	}
      }
    }
  }
  
  return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movl 0x28(%rsp), %eax
movq (%rdx), %rdi
movq 0x8(%rdx), %r11
subq %rdi, %r11
shrq $0x2, %r11
decl %r11d
je 0x16caf
xorl %edx, %edx
movl %r11d, %r10d
movl %r10d, %ebx
subl %edx, %ebx
cmpl $0x1, %ebx
je 0x16cb8
movl %r11d, %ebp
shrl $0x1f, %ebp
addl %r11d, %ebp
sarl %ebp
movslq %ebp, %r14
movl %ebp, %ebx
movl %edx, %r15d
cmpl %r9d, (%rdi,%r14,4)
jg 0x16c9d
movl %r10d, %edx
movl %r10d, %ebx
movl %ebp, %r15d
cmpl %r9d, 0x4(%rdi,%r14,4)
jg 0x16cfc
addl %ebp, %edx
movl %edx, %r11d
movl %ebx, %r10d
movl %r15d, %edx
cmpl %r15d, %ebx
jne 0x16c6a
jmp 0x16cb1
xorl %ebx, %ebx
movl %ebx, (%rcx)
movslq %ebx, %rcx
jmp 0x16cd9
movslq %edx, %r11
cmpl %r9d, (%rdi,%r11,4)
jg 0x16cd3
leaq (%rdi,%r11,4), %rbx
cmpl %r9d, 0x4(%rbx)
jle 0x16cd3
movl %edx, (%rcx)
shlq $0x2, %r11
jmp 0x16d0b
movl %r10d, (%rcx)
movslq %r10d, %rcx
leaq (,%rcx,4), %r11
addq (%rsi), %r11
leaq (%rdi,%rcx,4), %rbx
movl (%r11), %ecx
addl %r9d, %eax
subl %eax, %ecx
addl (%rbx), %ecx
movl %ecx, (%r8)
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq (%rdi,%r14,4), %rbx
leaq (,%r14,4), %r11
movl %r14d, (%rcx)
addq (%rsi), %r11
jmp 0x16ce8
// File: /workspace/github_c_makefile_star2_O3/fukunagatsu[P]RIblast/gapped_extension.cpp
// Function: GappedExtension::GetChar(std::vector<unsigned char, std::allocator<unsigned char>>&, int)
int GappedExtension::GetChar(vector<unsigned char> &seq, int i){
  if(i<0 || seq[i]<2){
    return(0);
  }else{
    return(seq[i] <=5 ? seq[i]-1 : seq[i]-5);
  }
}

// Assembly:
xorl %eax, %eax
testl %edx, %edx
js 0x189ae
movl %edx, %ecx
movq (%rsi), %rdx
movzbl (%rdx,%rcx), %ecx
cmpl $0x2, %ecx
jb 0x189ae
cmpb $0x5, %cl
ja 0x189a9
decl %ecx
jmp 0x189ac
addl $-0x5, %ecx
movl %ecx, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/fukunagatsu[P]RIblast/gapped_extension.cpp
// Function: GappedExtension::CheckHelixLength(int, std::vector<unsigned char, std::allocator<unsigned char>>&, std::vector<unsigned char, std::allocator<unsigned char>>&, int, int, int, int, std::vector<std::vector<Cell, std::allocator<Cell>>, std::allocator<std::vector<Cell, std::allocator<Cell>>>>&)
int GappedExtension::CheckHelixLength(int flag, vector<unsigned char> &query_seq, vector<unsigned char> &db_seq, int q_start, int db_start,int i, int j, vector<vector<Cell> > &matrix_c){
  int type_zero = GetBPType(flag, query_seq, db_seq, q_start, db_start, i, j, 0);

  if(type_zero !=0){
    if(matrix_c[i-1][j-1].type == 0 || (CheckWobble(type_zero) && CheckWobble(matrix_c[i-1][j-1].type))){
      for(int x = 1; x <= _min_helix_length-1; x++){
        int type = GetBPType(flag, query_seq, db_seq, q_start, db_start, i, j, x);
        if(type == 0 || (x==1 && CheckWobble(type_zero) && CheckWobble(type))){
	  type_zero = 0;
          break;
        }
	
      }
    }
  }
  return(type_zero);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, (%rsp)
movl 0x58(%rsp), %ebx
movl 0x50(%rsp), %r13d
subq $0x8, %rsp
movl %r9d, 0x14(%rsp)
pushq $0x0
pushq %rbx
pushq %r13
callq 0x18e22
addq $0x20, %rsp
movl %eax, %edx
xorl %eax, %eax
testl %edx, %edx
je 0x18a9b
movq 0x60(%rsp), %rax
movq (%rax), %rax
movslq %r13d, %rcx
leaq (%rcx,%rcx,2), %rcx
movq -0x18(%rax,%rcx,8), %rax
movslq %ebx, %rcx
leaq (%rcx,%rcx,2), %rcx
movl -0x8(%rax,%rcx,8), %eax
testl %eax, %eax
je 0x18a2a
leal -0x3(%rdx), %ecx
addl $-0x3, %eax
orl %ecx, %eax
cmpl $0x1, %eax
ja 0x18a95
movq (%rsp), %rax
movl 0x8(%rax), %r13d
cmpl $0x2, %r13d
jl 0x18a95
movq %rdx, 0x10(%rsp)
movl %edx, %eax
addl $-0x3, %eax
movl %eax, (%rsp)
movl $0x1, %ebx
subq $0x8, %rsp
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
movl %ebp, %r8d
movl 0x14(%rsp), %r9d
pushq %rbx
movl 0x68(%rsp), %eax
pushq %rax
movl 0x68(%rsp), %eax
pushq %rax
callq 0x18e22
addq $0x20, %rsp
testl %eax, %eax
je 0x18a99
cmpl $0x1, %ebx
jne 0x18a87
addl $-0x3, %eax
orl (%rsp), %eax
cmpl $0x1, %eax
jbe 0x18a99
incl %ebx
cmpl %ebx, %r13d
jne 0x18a4a
movq 0x10(%rsp), %rax
jmp 0x18a9b
movl %edx, %eax
jmp 0x18a9b
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/fukunagatsu[P]RIblast/gapped_extension.cpp
// Function: GappedExtension::traceback(Hit&, std::vector<std::vector<Cell, std::allocator<Cell>>, std::allocator<std::vector<Cell, std::allocator<Cell>>>>&, int, int, int, int, bool)
void GappedExtension::traceback(Hit &candidate,vector<vector<Cell> > &matrix_c, int i,int i_start, int j, int j_start, bool flag){
  while(i !=0 && j !=0){
    if(flag == 0){
      candidate.AddBasePair(i_start-i,  j_start-j);
    }else{
      candidate.AddBasePair(i_start+i,  j_start+j);
    }
    int temp_i = i; int temp_j = j;
    i =  matrix_c[temp_i][temp_j].first;
    j =  matrix_c[temp_i][temp_j].second;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r12d
testl %ecx, %ecx
sete %al
testl %r9d, %r9d
sete %cl
orb %al, %cl
jne 0x18e12
movl %r9d, %r13d
movl %r8d, %ebx
movq %rdx, %r14
movq %rsi, %r15
addq $0x38, %r15
movq %rsp, %rbp
cmpb $0x0, 0x48(%rsp)
je 0x18dcc
leal (%r12,%rbx), %eax
movl 0x40(%rsp), %ecx
addl %r13d, %ecx
jmp 0x18dd8
movl %ebx, %eax
subl %r12d, %eax
movl 0x40(%rsp), %ecx
subl %r13d, %ecx
movl %eax, (%rsp)
movl %ecx, 0x4(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0x13158
movslq %r12d, %rax
movq (%r14), %rcx
leaq (%rax,%rax,2), %rax
movslq %r13d, %rdx
movq (%rcx,%rax,8), %rax
leaq (%rdx,%rdx,2), %rcx
movl (%rax,%rcx,8), %r12d
testl %r12d, %r12d
je 0x18e12
movl 0x4(%rax,%rcx,8), %r13d
testl %r13d, %r13d
jne 0x18db8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/fukunagatsu[P]RIblast/gapped_extension.cpp
// Function: GappedExtension::GetBPType(int, std::vector<unsigned char, std::allocator<unsigned char>>&, std::vector<unsigned char, std::allocator<unsigned char>>&, int, int, int, int, int)
int GappedExtension::GetBPType(int flag, vector<unsigned char> &query_seq, vector<unsigned char> &db_seq, int q_start, int db_start,int i, int j,int x){
  int q_char,db_char;
  if(flag == 0){
    q_char = GetChar(query_seq,q_start-i-x);
    db_char = GetChar(db_seq,db_start-j-x);
  }else{
    q_char = GetChar(query_seq,q_start+i+x);
    db_char = GetChar(db_seq,db_start+j+x);
  }
  int type = BP_pair[q_char][db_char];
  if(flag == 1){type = rtype[type];}
  return(type);
}

// Assembly:
movl 0x18(%rsp), %eax
movl 0x10(%rsp), %edi
movl 0x8(%rsp), %r11d
addl %eax, %r11d
testl %esi, %esi
je 0x18e63
xorl %r10d, %r10d
addl %r8d, %r11d
movl $0x0, %r8d
js 0x18e8f
movl %r11d, %r8d
movq (%rdx), %rdx
movzbl (%rdx,%r8), %edx
movl $0x0, %r8d
cmpl $0x2, %edx
jb 0x18e8f
cmpb $0x5, %dl
ja 0x18e89
decl %edx
jmp 0x18e8c
xorl %esi, %esi
subl %r11d, %r8d
movl $0x0, %r10d
js 0x18ee4
movl %r8d, %r8d
movq (%rdx), %rdx
movzbl (%rdx,%r8), %edx
cmpl $0x2, %edx
jb 0x18ee4
cmpb $0x5, %dl
ja 0x18ede
decl %edx
jmp 0x18ee1
addl $-0x5, %edx
movl %edx, %r8d
addl %edi, %eax
addl %r9d, %eax
js 0x18eb2
movl %eax, %eax
movq (%rcx), %rcx
movzbl (%rcx,%rax), %eax
cmpl $0x2, %eax
jb 0x18eb2
cmpb $0x5, %al
ja 0x18eac
decl %eax
jmp 0x18eaf
addl $-0x5, %eax
movl %eax, %r10d
movslq %r8d, %rax
movslq %r10d, %rcx
leaq (%rax,%rax,4), %rax
leaq 0x96e5d(%rip), %rdx     # 0xafd20
leaq (%rdx,%rax,4), %rax
movl (%rax,%rcx,4), %eax
cmpl $0x1, %esi
jne 0x18f22
cltq
leaq 0x96eb8(%rip), %rcx     # 0xafd90
leaq (%rcx,%rax,4), %rax
jmp 0x18f20
addl $-0x5, %edx
movl %edx, %r10d
addl %eax, %edi
subl %edi, %r9d
js 0x18f07
movl %r9d, %eax
movq (%rcx), %rcx
movzbl (%rcx,%rax), %eax
cmpl $0x2, %eax
jb 0x18f07
cmpb $0x5, %al
ja 0x18f02
decl %eax
jmp 0x18f05
addl $-0x5, %eax
movl %eax, %esi
movslq %r10d, %rax
movslq %esi, %rcx
leaq (%rax,%rax,4), %rax
leaq 0x96e08(%rip), %rdx     # 0xafd20
leaq (%rdx,%rax,4), %rax
leaq (%rax,%rcx,4), %rax
movl (%rax), %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/fukunagatsu[P]RIblast/sais.c
// Function: sais_bwt
int
sais_bwt(const unsigned char *T, unsigned char *U, int *A, int n) {
  int i, pidx;
  if((T == NULL) || (U == NULL) || (A == NULL) || (n < 0)) { return -1; }
  if(n <= 1) { if(n == 1) { U[0] = T[0]; } return n; }
  pidx = sais_main(T, A, 0, n, UCHAR_SIZE, sizeof(unsigned char), 1);
  if(pidx < 0) { return pidx; }
  U[0] = T[n - 1];
  for(i = 0; i < pidx; ++i) { U[i + 1] = (unsigned char)A[i]; }
  for(i += 1; i < n; ++i) { U[i] = (unsigned char)A[i]; }
  pidx += 1;
  return pidx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testq %rdx, %rdx
sete %al
testl %ebp, %ebp
sets %dl
orb %al, %dl
orb %cl, %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
je 0x1bc1c
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %rbx
movq %rdi, %r15
cmpl $0x1, %ebp
ja 0x1bc3a
xorl %eax, %eax
cmpl $0x1, %ebp
jne 0x1bc11
movb (%r15), %al
movb %al, (%rbx)
movl $0x1, %eax
jmp 0x1bc11
movl $0x1, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl %ebp, %ecx
movl $0x100, %r8d            # imm = 0x100
movl $0x1, %r9d
callq 0x1a1ae
movl %eax, %ecx
testl %eax, %eax
js 0x1bcb2
movl %ebp, %eax
movb -0x1(%r15,%rax), %al
movb %al, (%rbx)
je 0x1bc82
movl %ecx, %eax
xorl %edx, %edx
movb (%r14,%rdx,4), %sil
movb %sil, 0x1(%rbx,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0x1bc71
leal 0x1(%rcx), %eax
cmpl %ebp, %eax
jge 0x1bc11
leal 0x1(%rcx), %edx
addq %rdx, %rbx
leaq (%r14,%rdx,4), %rdx
movslq %ecx, %rcx
incq %rcx
xorl %esi, %esi
movb (%rdx,%rsi,4), %dil
movb %dil, (%rbx,%rsi)
incq %rsi
leal (%rcx,%rsi), %edi
cmpl %ebp, %edi
jl 0x1bc9b
jmp 0x1bc11
movl %ecx, %eax
jmp 0x1bc11
// File: /workspace/github_c_makefile_star2_O3/fukunagatsu[P]RIblast/sais.c
// Function: sais_int_bwt
int
sais_int_bwt(const int *T, int *U, int *A, int n, int k) {
  int i, pidx;
  if((T == NULL) || (U == NULL) || (A == NULL) || (n < 0) || (k <= 0)) { return -1; }
  if(n <= 1) { if(n == 1) { U[0] = T[0]; } return n; }
  pidx = sais_main(T, A, 0, n, k, sizeof(int), 1);
  if(pidx < 0) { return pidx; }
  U[0] = T[n - 1];
  for(i = 0; i < pidx; ++i) { U[i + 1] = A[i]; }
  for(i += 1; i < n; ++i) { U[i] = A[i]; }
  pidx += 1;
  return pidx;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r15
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testq %rdx, %rdx
sete %al
testl %ebx, %ebx
sets %dl
orb %al, %dl
orb %cl, %dl
testl %r8d, %r8d
setle %al
orb %dl, %al
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
je 0x1bcfe
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rsi, %r14
movq %rdi, %r12
cmpl $0x1, %ebx
ja 0x1bd1e
xorl %eax, %eax
cmpl $0x1, %ebx
jne 0x1bcf2
movl (%r12), %eax
movl %eax, (%r14)
movl $0x1, %eax
jmp 0x1bcf2
movl $0x1, (%rsp)
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movl %ebx, %ecx
movl $0x4, %r9d
callq 0x1a1ae
movl %eax, %ecx
testl %eax, %eax
js 0x1bd94
movl %ebx, %eax
movl -0x4(%r12,%rax,4), %eax
movl %eax, (%r14)
je 0x1bd61
movl %ecx, %eax
xorl %edx, %edx
movl (%r15,%rdx,4), %esi
movl %esi, 0x4(%r14,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x1bd50
leal 0x1(%rcx), %eax
cmpl %ebx, %eax
jge 0x1bcf2
leal 0x1(%rcx), %esi
leaq (%r14,%rsi,4), %rdx
leaq (%r15,%rsi,4), %rsi
movslq %ecx, %rcx
incq %rcx
xorl %edi, %edi
movl (%rsi,%rdi,4), %r8d
movl %r8d, (%rdx,%rdi,4)
incq %rdi
leal (%rcx,%rdi), %r8d
cmpl %ebx, %r8d
jl 0x1bd7b
jmp 0x1bcf2
movl %ecx, %eax
jmp 0x1bcf2
// File: /workspace/github_c_makefile_star2_O3/somethingnew2-0[P]CS537-P4/server.c
// Function: getargs
void getargs(int *port, int *threads, int *buffers, int *alg, int argc, char *argv[])
{
    if (argc != 5) {
		if(argc != 6 || strcmp(argv[4], "SFF-BS")) {
			fprintf(stderr, "Usage: %s <port> <threads> <buffers> <schedalg> [N (for SFF-BS only)]\n", argv[0]);
			exit(1);
		}
    }
    *port = atoi(argv[1]);
    *threads = atoi(argv[2]);
    *buffers = atoi(argv[3]);
	if(strcasecmp(argv[4], "FIFO") == 0) {
		*alg = -2;
	}
	else if(strcasecmp(argv[4], "SFF") == 0) {
		*alg = -1;
	}
	else if(strcasecmp(argv[4], "SFF-BS") == 0 && atoi(argv[5]) > 0) {
		*alg = atoi(argv[5]);
	}
	else {
		fprintf(stderr, "Usage: %s <port> <threads> <buffers> <schedalg> [N (for SFF-BS only)]\n", argv[0]);
		exit(1);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
cmpl $0x6, %r8d
je 0x256c
cmpl $0x5, %r8d
jne 0x2618
movq 0x20(%r14), %r15
jmp 0x2587
movq 0x20(%r14), %r15
leaq 0x1abd(%rip), %rsi      # 0x4034
movq %r15, %rdi
callq 0x2190
testl %eax, %eax
jne 0x2618
movq 0x8(%r14), %rdi
callq 0x2290
movl %eax, (%rbp)
movq 0x10(%r14), %rdi
callq 0x2290
movl %eax, (%r13)
movq 0x18(%r14), %rdi
callq 0x2290
movl %eax, (%r12)
leaq 0x1ace(%rip), %rsi      # 0x4082
movq %r15, %rdi
callq 0x2040
testl %eax, %eax
je 0x25fb
leaq 0x1ac0(%rip), %rsi      # 0x4087
movq %r15, %rdi
callq 0x2040
testl %eax, %eax
je 0x2602
leaq 0x1a5a(%rip), %rsi      # 0x4034
movq %r15, %rdi
callq 0x2040
testl %eax, %eax
jne 0x25f3
movq 0x28(%r14), %rdi
callq 0x2290
testl %eax, %eax
jg 0x2607
movq %r14, %rdi
callq 0x2380
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x2607
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x23a7
// File: /workspace/github_c_makefile_star2_O3/somethingnew2-0[P]CS537-P4/request.c
// Function: requestError
void requestError(int fd, char *cause, char *errnum, char *shortmsg, char *longmsg) 
{
   char buf[MAXLINE], body[MAXBUF];

   printf("Request ERROR\n");

   // Create the body of the error message
   sprintf(body, "<html><title>CS537 Error</title>");
   sprintf(body, "%s<body bgcolor=""fffff"">\r\n", body);
   sprintf(body, "%s%s: %s\r\n", body, errnum, shortmsg);
   sprintf(body, "%s<p>%s: %s\r\n", body, longmsg, cause);
   sprintf(body, "%s<hr>CS537 Web Server\r\n", body);

   // Write out the header information for this response
   sprintf(buf, "HTTP/1.0 %s %s\r\n", errnum, shortmsg);
   Rio_writen(fd, buf, strlen(buf));
   printf("%s", buf);

   sprintf(buf, "Content-Type: text/html\r\n");
   Rio_writen(fd, buf, strlen(buf));
   printf("%s", buf);

   sprintf(buf, "Content-Length: %lu\r\n\r\n", strlen(body));
   Rio_writen(fd, buf, strlen(buf));
   printf("%s", buf);

   // Write out the content
   Rio_writen(fd, body, strlen(body));
   printf("%s", body);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4008, %rsp           # imm = 0x4008
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movl %edi, %ebx
leaq 0x1867(%rip), %rdi      # 0x43a9
callq 0x2070
movups 0x153d(%rip), %xmm0     # 0x408b
movq %rsp, %r14
movaps %xmm0, (%r14)
movups 0x153f(%rip), %xmm0     # 0x409b
movaps %xmm0, 0x10(%r14)
movb $0x0, 0x20(%r14)
leaq 0x153f(%rip), %rsi      # 0x40ac
movq %r14, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x22c0
leaq 0x1544(%rip), %rsi      # 0x40c5
movq %r14, %rdi
movq %r14, %rdx
movq %r13, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x22c0
leaq 0x1535(%rip), %rsi      # 0x40d0
movq %r14, %rdi
movq %r14, %rdx
movq %r15, %rcx
movq %rbp, %r8
xorl %eax, %eax
callq 0x22c0
leaq 0x1529(%rip), %rsi      # 0x40de
movq %r14, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x22c0
leaq 0x152e(%rip), %rsi      # 0x40f7
leaq 0x2000(%rsp), %r15
movq %r15, %rdi
movq %r13, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x22c0
movq %r15, %rdi
callq 0x20e0
movl %ebx, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3a07
leaq 0x16c7(%rip), %r12      # 0x42c4
movq %r12, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2110
movups 0x14f7(%rip), %xmm0     # 0x4108
movaps %xmm0, (%r15)
movups 0x14f6(%rip), %xmm0     # 0x4112
movups %xmm0, 0xa(%r15)
movq %r15, %rdi
callq 0x20e0
movl %ebx, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3a07
movq %r12, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2110
movq %r14, %rdi
callq 0x20e0
leaq 0x14d0(%rip), %rsi      # 0x4122
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x22c0
movq %r15, %rdi
callq 0x20e0
movl %ebx, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3a07
movq %r12, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2110
movq %r14, %rdi
callq 0x20e0
movl %ebx, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3a07
movq %r12, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x2110
addq $0x4008, %rsp           # imm = 0x4008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/somethingnew2-0[P]CS537-P4/request.c
// Function: requestReadhdrs
void requestReadhdrs(rio_t *rp)
{
   char buf[MAXLINE];

   Rio_readlineb(rp, buf, MAXLINE);
   while (strcmp(buf, "\r\n")) {
      Rio_readlineb(rp, buf, MAXLINE);
   }
   return;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x2000, %rsp           # imm = 0x2000
movq %rdi, %rbx
movq %rsp, %r14
movl $0x2000, %edx           # imm = 0x2000
movq %r14, %rsi
callq 0x3a4e
movl $0xa0d, %ebp            # imm = 0xA0D
movl (%r14), %eax
xorl %ebp, %eax
movzbl 0x2(%r14), %ecx
orw %ax, %cx
je 0x2d09
movq %rsp, %r14
movl $0x2000, %edx           # imm = 0x2000
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3a4e
movl (%rsp), %eax
xorl %ebp, %eax
movzbl 0x2(%rsp), %ecx
orw %ax, %cx
jne 0x2cea
addq $0x2000, %rsp           # imm = 0x2000
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/somethingnew2-0[P]CS537-P4/request.c
// Function: requestParseURI
int requestParseURI(char *uri, char *filename, char *cgiargs) 
{
   char *ptr;

   if (!strstr(uri, "cgi")) {
      // static
      strcpy(cgiargs, "");
      sprintf(filename, ".%s", uri);
      if (uri[strlen(uri)-1] == '/') {
         strcat(filename, "home.html");
      }
      return 1;
   } else {
      // dynamic
      ptr = index(uri, '?');
      if (ptr) {
         strcpy(cgiargs, ptr+1);
         *ptr = '\0';
      } else {
         strcpy(cgiargs, "");
      }
      sprintf(filename, ".%s", uri);
      return 0;
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x140d(%rip), %rsi      # 0x413a
callq 0x2340
testq %rax, %rax
je 0x2d79
movq %r14, %rdi
movl $0x3f, %esi
callq 0x2140
testq %rax, %rax
je 0x2d5d
movq %rax, %r12
movq %rax, %rsi
incq %rsi
movq %r15, %rdi
callq 0x2060
movq %r12, %r15
movb $0x0, (%r15)
leaq 0x13d6(%rip), %rsi      # 0x413e
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x22c0
jmp 0x2dc3
movb $0x0, (%r15)
leaq 0x13ba(%rip), %rsi      # 0x413e
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x22c0
movq %r14, %rdi
callq 0x20e0
movl $0x1, %ebp
cmpb $0x2f, -0x1(%r14,%rax)
jne 0x2dc3
movq %rbx, %rdi
callq 0x20e0
movabsq $0x6d74682e656d6f68, %rcx # imm = 0x6D74682E656D6F68
movq %rcx, (%rbx,%rax)
movw $0x6c, 0x8(%rbx,%rax)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/somethingnew2-0[P]CS537-P4/request.c
// Function: requestGetFiletype
void requestGetFiletype(char *filename, char *filetype)
{
   if (strstr(filename, ".html")) 
      strcpy(filetype, "text/html");
   else if (strstr(filename, ".gif")) 
      strcpy(filetype, "image/gif");
   else if (strstr(filename, ".jpg")) 
      strcpy(filetype, "image/jpeg");
   else 
      strcpy(filetype, "test/plain");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1367(%rip), %rsi      # 0x4146
callq 0x2340
testq %rax, %rax
je 0x2dfe
movabsq $0x6d74682f74786574, %rax # imm = 0x6D74682F74786574
movq %rax, (%rbx)
movw $0x6c, 0x8(%rbx)
jmp 0x2e65
leaq 0x1351(%rip), %rsi      # 0x4156
movq %r14, %rdi
callq 0x2340
testq %rax, %rax
je 0x2e27
movabsq $0x69672f6567616d69, %rax # imm = 0x69672F6567616D69
movq %rax, (%rbx)
movw $0x66, 0x8(%rbx)
jmp 0x2e65
leaq 0x1337(%rip), %rsi      # 0x4165
movq %r14, %rdi
callq 0x2340
testq %rax, %rax
je 0x2e51
movabsq $0x706a2f6567616d69, %rax # imm = 0x706A2F6567616D69
movq %rax, (%rbx)
movl $0x676570, 0x7(%rbx)    # imm = 0x676570
jmp 0x2e65
movabsq $0x616c702f74736574, %rax # imm = 0x616C702F74736574
movq %rax, (%rbx)
movl $0x6e6961, 0x7(%rbx)    # imm = 0x6E6961
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/somethingnew2-0[P]CS537-P4/request.c
// Function: requestServeDynamic
void requestServeDynamic(int fd, char *filename, char *cgiargs, long arrival, long dispatch, thread *worker)
{
   char buf[MAXLINE], *emptylist[] = {NULL};

   // The server does only a little bit of the header.  
   // The CGI script has to finish writing out the header.
   sprintf(buf, "HTTP/1.0 200 OK\r\n");
   sprintf(buf, "%sServer: CS537 Web Server\r\n", buf);

	 /* CS537: Your statistics go here -- fill in the 0's with something useful! */
	 sprintf(buf, "%s Stat-req-arrival: %ld\r\n", buf, arrival);
	 sprintf(buf, "%s Stat-req-dispatch: %d\r\n", buf, (int)(dispatch - arrival));
	 sprintf(buf, "%s Stat-thread-id: %d\r\n", buf, worker->id);
	 sprintf(buf, "%s Stat-thread-count: %d\r\n", buf, worker->count);
	 sprintf(buf, "%s Stat-thread-static: %d\r\n", buf, worker->statics);
	 sprintf(buf, "%s Stat-thread-dynamic: %d\r\n", buf, worker->dynamics);

   Rio_writen(fd, buf, strlen(buf));

   if (Fork() == 0) {
      /* Child process */
      Setenv("QUERY_STRING", cgiargs, 1);
      /* When the CGI process writes to stdout, it will instead go to the socket */
      Dup2(fd, STDOUT_FILENO);
      Execve(filename, emptylist, environ);
   }
   Wait(NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
movq %r9, %r12
movq %r8, %r13
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, (%rsp)
movl %edi, %ebp
movq $0x0, 0x8(%rsp)
movups 0x12e0(%rip), %xmm0     # 0x4180
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
movw $0xa, 0x10(%r15)
leaq 0x12db(%rip), %rsi      # 0x4192
movq %r15, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x22c0
leaq 0x12e4(%rip), %rsi      # 0x41af
movq %r15, %rdi
movq %r15, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x22c0
subl %ebx, %r13d
leaq 0x12e5(%rip), %rsi      # 0x41ca
movq %r15, %rdi
movq %r15, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0x22c0
movl (%r12), %ecx
leaq 0x12e5(%rip), %rsi      # 0x41e5
movq %r15, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x22c0
movl 0x4(%r12), %ecx
leaq 0x12e4(%rip), %rsi      # 0x41fd
movq %r15, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x22c0
movl 0x8(%r12), %ecx
leaq 0x12e6(%rip), %rsi      # 0x4218
movq %r15, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x22c0
movl 0xc(%r12), %ecx
leaq 0x12e9(%rip), %rsi      # 0x4234
movq %r15, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x22c0
movq %r15, %rdi
callq 0x20e0
movl %ebp, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3a07
callq 0x358d
testl %eax, %eax
jne 0x2fae
leaq 0x12d4(%rip), %rdi      # 0x4251
movq %r14, %rsi
movl $0x1, %edx
callq 0x3575
movl %ebp, %edi
movl $0x1, %esi
callq 0x366a
movq 0x4043(%rip), %rax      # 0x6fe0
movq (%rax), %rdx
leaq 0x8(%rsp), %rsi
movq (%rsp), %rdi
callq 0x35a5
xorl %edi, %edi
callq 0x35bd
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/somethingnew2-0[P]CS537-P4/request.c
// Function: requestFileSize
long requestFileSize(int fd) {
	char buf[MAXLINE], method[MAXLINE], uri[MAXLINE], version[MAXLINE];
    char filename[MAXLINE], cgiargs[MAXLINE];	
	struct stat s;

	recv(fd, buf, sizeof(buf), MSG_PEEK);
	
   	sscanf(buf, "%s %s %s\n", method, uri, version);

	requestParseURI(uri, filename, cgiargs);

	Stat(filename, &s);

	return (long)s.st_size;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xc098, %rsp           # imm = 0xC098
leaq 0xa090(%rsp), %rbx
movl $0x2000, %edx           # imm = 0x2000
movq %rbx, %rsi
movl $0x2, %ecx
callq 0x2030
leaq 0xe8c(%rip), %rsi       # 0x42c7
leaq 0x8090(%rsp), %rdx
leaq 0x6090(%rsp), %r14
leaq 0x4090(%rsp), %r8
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2210
leaq 0x2090(%rsp), %rbx
leaq 0x90(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2d15
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3682
movq 0x30(%r14), %rax
addq $0xc098, %rsp           # imm = 0xC098
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/wjmelements[P]evm/tst/dio.c
// Function: main
int main() {
    dioInit("bin/evm");

    test_applyConfig_code();
    test_applyConfig_storage();
    test_applyConfig_balance();
    test_applyConfig_construct();

    close(2);
    test_applyConfig_tests();
    return 0;
}

// Assembly:
pushq %rax
leaq 0xbb47(%rip), %rdi      # 0x105ee
callq 0x4ad4
callq 0x411c
callq 0x42ff
callq 0x44ee
callq 0x46db
movl $0x2, %edi
callq 0x3120
callq 0x48ba
xorl %eax, %eax
popq %rcx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/giometti[P]mastering_UNIX_programming/chapter_09/limits.c
// Function: res_n2v
int res_n2v(char *n)
{
	int i;
	for (i = 0; i < 7; i++)
		if (strcmp(rlimit_n[i], n) == 0)
			break;
	if (i >= 7)
		return -1;
	return rlimit_v[i];
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x2e45(%rip), %r15      # 0x4090
xorl %r14d, %r14d
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x1050
testl %eax, %eax
je 0x1272
addq $0x4, %r14
addq $0x8, %r15
cmpq $0x1c, %r14
jne 0x124e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x127d
leaq 0x2df7(%rip), %rax      # 0x4070
movl (%r14,%rax), %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/giometti[P]mastering_UNIX_programming/chapter_09/limits.c
// Function: main
int main(int argc, char *argv[])
{
	int resource;
	struct rlimit rlim;
	bool do_set = false;
	int ret;

	/* Check the command line */
	if (!(argc == 2 || argc == 4)) {
		fprintf(stderr,
			"usage: %s <resource> "
				"[<soft-limit> <hard-limit>]\n",
			argv[0]);
		fprintf(stderr,
			"where <resource> can be: ");
		for (resource = 0; resource < 7; resource++)
			fprintf(stderr, "%s ", rlimit_n[resource]);
		fprintf(stderr, "\n");
		return -1;
	}
	resource = res_n2v(argv[1]);
	if (resource < 0) {
		fprintf(stderr, "invallid resource %s", argv[1]);
		return -1;

	}
	if (argc == 4) {
		rlim.rlim_cur = atoi(argv[2]);
		rlim.rlim_max = atoi(argv[3]);
		do_set = true;
	}

	if (do_set) {
		/* Try to set the new resource's values */
		ret = setrlimit(resource, &rlim);
		if (ret) {
			perror("setrlimit");
			return -1;
		}
	}

	/* Read the resource's values in order to print them */	
	ret = getrlimit(resource, &rlim);
	if (ret) {
		perror("getrlimit");
		return -1;
	}
	printf("limits for %s are soft=%lld; hard=%lld\n", argv[1],
		(long long) rlim.rlim_cur, (long long) rlim.rlim_max);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movl %edi, %r14d
cmpl $0x2, %edi
je 0x12a2
cmpl $0x4, %r14d
jne 0x134b
movq 0x8(%rbx), %r15
movq %r15, %rdi
callq 0x123c
testl %eax, %eax
js 0x1325
movl %eax, %ebp
cmpl $0x4, %r14d
jne 0x12ea
movq 0x10(%rbx), %rdi
callq 0x1090
cltq
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
movq 0x18(%rbx), %rdi
callq 0x1090
cltq
movq %rax, 0x8(%r14)
movl %ebp, %edi
movq %r14, %rsi
callq 0x1070
testl %eax, %eax
jne 0x1355
leaq 0x8(%rsp), %rsi
movl %ebp, %edi
callq 0x10b0
testl %eax, %eax
jne 0x1342
movq 0x8(%rbx), %rsi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
leaq 0xdc3(%rip), %rdi       # 0x20d2
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1030
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x2ccc(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xd73(%rip), %rsi       # 0x20a9
movq %r15, %rdx
xorl %eax, %eax
callq 0x1060
jmp 0x1361
leaq 0xd7f(%rip), %rdi       # 0x20c8
jmp 0x135c
movq %rbx, %rdi
callq 0x10d0
jmp 0x1361
leaq 0xd62(%rip), %rdi       # 0x20be
callq 0x1080
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x1318
// File: /workspace/github_c_makefile_star2_O3/unixlab[P]cloudflare-udp-ping/udpserver.c
// Function: thread_loop
static void thread_loop(void *userdata)
{
	struct state *state = userdata;

	while (1) {
		int flags = state->polling ? MSG_DONTWAIT : 0;
		int r = recvmsg(state->fd, &state->msg, flags);
		if (r <= 0 && (errno == EAGAIN || errno == EWOULDBLOCK ||
			       errno == EINTR)) {
			continue;
		}
		if (r == 0 && state->polling) {
			continue;
		}

		if (r <= 0) {
			PFATAL("recvmmsg()");
		}

		struct msghdr *msg = &state->msg;
		msg->msg_iov->iov_len = r;

		int s = sendmsg(state->fd, &state->msg, 0);
		if (s != r) {
			PFATAL("sendmmsg()");
		}
		msg->msg_iov->iov_len = MTU_SIZE;
		msg->msg_controllen = sizeof(state->pktinfo);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
xorl %edx, %edx
cmpl $0x0, 0x4(%rbx)
setne %dl
shll $0x6, %edx
movl (%rbx), %edi
movq %r14, %rsi
callq 0x45f3f0
movq %rax, %r15
testl %r15d, %r15d
jle 0x4025e2
movl %r15d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq 0x38(%rbx), %rcx
movq %rax, 0x8(%rcx)
movl (%rbx), %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x45f4a0
cmpl %r15d, %eax
jne 0x40263e
movq 0x38(%rbx), %rax
movq $0x780, 0x8(%rax)       # imm = 0x780
movq $0x1000, 0x50(%rbx)     # imm = 0x1000
jmp 0x40258d
callq 0x405a20
movl (%rax), %eax
cmpl $0x4, %eax
je 0x40258d
cmpl $0xb, %eax
je 0x40258d
testl %r15d, %r15d
jne 0x4025fe
cmpl $0x0, 0x4(%rbx)
jne 0x40258d
movq $0x4e77c8, %rbx         # imm = 0x4E77C8
movq (%rbx), %rcx
leaq 0xb1b7d(%rip), %rdi     # 0x4b418c
movl $0x1d, %esi
movl $0x1, %edx
callq 0x4142b0
movq (%rbx), %rdi
leaq 0xb1b82(%rip), %rsi     # 0x4b41aa
leaq 0xb1b95(%rip), %rdx     # 0x4b41c4
leaq 0xb1a73(%rip), %rcx     # 0x4b40a9
movl $0x41, %r8d
jmp 0x40267c
movq $0x4e77c8, %rbx         # imm = 0x4E77C8
movq (%rbx), %rcx
leaq 0xb1b93(%rip), %rdi     # 0x4b41e2
movl $0x1d, %esi
movl $0x1, %edx
callq 0x4142b0
movq (%rbx), %rdi
leaq 0xb1b42(%rip), %rsi     # 0x4b41aa
leaq 0xb1b55(%rip), %rdx     # 0x4b41c4
leaq 0xb1a33(%rip), %rcx     # 0x4b40a9
movl $0x49, %r8d
xorl %eax, %eax
callq 0x40d320
leaq 0xb1b46(%rip), %rdi     # 0x4b41d0
callq 0x40d600
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x416510
movl $0x1, %edi
callq 0x40c280
nop
// File: /workspace/github_c_makefile_star2_O3/stevenmherring[P]DNS/mutex-trie.c
// Function: new_leaf
struct trie_node * new_leaf(const char *string, size_t strlen, int32_t ip4_address) {
  struct trie_node *new_node = malloc(sizeof (struct trie_node));
  if (!new_node) {
    printf("WARNING: Node memory allocation failed.  Results may be bogus.\n");
    return NULL;
  }
  assert(strlen < 64);
  assert(strlen > 0);
  new_node->next = NULL;
  new_node->strlen = strlen;
  strncpy(new_node->key, string, strlen);
  new_node->key[strlen] = '\0';
  new_node->ip4_address = ip4_address;
  new_node->children = NULL;

  return new_node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl $0x58, %edi
callq 0x1130
movq %rax, %rbx
testq %rax, %rax
je 0x13a0
cmpq $0x40, %r14
jae 0x13b8
testq %r14, %r14
je 0x13d7
xorl %r12d, %r12d
movq %r12, (%rbx)
movl %r14d, 0x8(%rbx)
movq %rbx, %rdi
addq $0x18, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1050
movb $0x0, 0x18(%rbx,%r14)
movl %ebp, 0xc(%rbx)
movq %r12, 0x10(%rbx)
jmp 0x13ac
leaq 0x2031(%rip), %rdi      # 0x33d8
callq 0x1080
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1ce6(%rip), %rdi      # 0x30a5
leaq 0x1c3e(%rip), %rsi      # 0x3004
leaq 0x1c44(%rip), %rcx      # 0x3011
movl $0x27, %edx
callq 0x10c0
leaq 0x1c6d(%rip), %rdi      # 0x304b
leaq 0x1c1f(%rip), %rsi      # 0x3004
leaq 0x1c25(%rip), %rcx      # 0x3011
movl $0x28, %edx
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O3/stevenmherring[P]DNS/mutex-trie.c
// Function: squat_search
int squat_search(const char *string, size_t strlen, int32_t *ip4_address) {
  struct trie_node *found;
  int result = 0;
  // Skip strings of length 0
  if (strlen == 0)
  return result;
  found = _search(root, string, strlen);
  if (found && ip4_address)
  *ip4_address = found->ip4_address;
  result = (found != NULL);
  return result;
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
movq %rsi, %rdx
testq %rsi, %rsi
je 0x1544
movq %rdi, %rsi
movq 0x4c38(%rip), %rdi      # 0x6158
callq 0x1458
testq %rax, %rax
sete %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
jne 0x153a
movl 0xc(%rax), %ecx
movl %ecx, (%rbx)
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
jmp 0x1546
xorl %ecx, %ecx
movl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/stevenmherring[P]DNS/mutex-trie.c
// Function: search
int search(const char *string, size_t strlen, int32_t *ip4_address) {
  struct trie_node *found;
  //int rv;
  int result;

  // Skip strings of length 0
  if (strlen == 0)
  return 0;
  pthread_cleanup_push(cleanup_handler,&lock);
  // obtain the lock
  //rv =
  pthread_mutex_lock(&lock);
  // assert(rv == 0);
  found = _search(root, string, strlen);

  if (found && ip4_address)
  *ip4_address = found->ip4_address;

  result = (found != NULL);

  // Return the lock
  /**** NEW ***/
  pthread_cleanup_pop(1);
  //rv = pthread_mutex_unlock(&lock);
  //assert(rv == 0);

  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
testq %rsi, %rsi
je 0x15cc
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsp, %rdi
xorl %esi, %esi
callq 0x11d0
movq %rsp, %rdi
testl %eax, %eax
jne 0x15d8
callq 0x11a0
leaq 0x4baa(%rip), %rdi      # 0x6128
callq 0x1200
movq 0x4bce(%rip), %rdi      # 0x6158
movq %r15, %rsi
movq %r14, %rdx
callq 0x1458
testq %rax, %rax
sete %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
jne 0x15aa
movl 0xc(%rax), %ecx
movl %ecx, (%rbx)
xorl %ebx, %ebx
testq %rax, %rax
setne %al
movb %al, %bl
movq %rsp, %rdi
callq 0x10b0
leaq 0x4b65(%rip), %rdi      # 0x6128
callq 0x1120
movl %ebx, %eax
jmp 0x15ce
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x1220
// File: /workspace/github_c_makefile_star2_O3/stevenmherring[P]DNS/mutex-trie.c
// Function: delete
int delete(const char *string, size_t strlen) {
            int result = 0;
            // Skip strings of length 0
            if (strlen != 0) {
              int rv;
              // Obtain the lock
              rv = pthread_mutex_lock(&lock);
              assert(rv == 0);
              // Attempt to delete the node.
              result = (NULL != _delete(root, string, strlen));

              // if squatting is allowed and a key was deleted.
              if (allow_squatting && result) {
                rv = pthread_mutex_unlock(&lock);
                assert(rv == 0);
                printf("Thread: %lu Node deleted, broadcasting %s\n", (long) pthread_self(), string);
                rv = pthread_cond_broadcast(&cv);
                // Check to see if the broadcasr was successful
                assert(rv == 0);
              } else {
                // Unlock
                rv = pthread_mutex_unlock(&lock);
                assert(rv == 0);
              }
            }
            return result;
          }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x1e24
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4399(%rip), %rdi      # 0x6128
callq 0x1200
testl %eax, %eax
jne 0x1e34
movq 0x43b5(%rip), %rdi      # 0x6158
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1bc9
movq %rax, %r14
leaq 0x43e0(%rip), %rax      # 0x6198
movl (%rax), %ebp
leaq 0x4367(%rip), %rdi      # 0x6128
callq 0x1120
testq %r14, %r14
setne %cl
je 0x1e28
testl %ebp, %ebp
je 0x1e28
testl %eax, %eax
jne 0x1e72
callq 0x1160
leaq 0x150e(%rip), %rdi      # 0x32f4
movq %rax, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10a0
leaq 0x436e(%rip), %rdi      # 0x6168
callq 0x1070
movb $0x1, %cl
testl %eax, %eax
je 0x1e2c
leaq 0x13c6(%rip), %rdi      # 0x31d2
leaq 0x11f1(%rip), %rsi      # 0x3004
leaq 0x14b9(%rip), %rcx      # 0x32d3
movl $0x1ac, %edx            # imm = 0x1AC
callq 0x10c0
xorl %ecx, %ecx
jmp 0x1e2c
testl %eax, %eax
jne 0x1e53
movzbl %cl, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1397(%rip), %rdi      # 0x31d2
leaq 0x11c2(%rip), %rsi      # 0x3004
leaq 0x148a(%rip), %rcx      # 0x32d3
movl $0x1a1, %edx            # imm = 0x1A1
callq 0x10c0
leaq 0x1378(%rip), %rdi      # 0x31d2
leaq 0x11a3(%rip), %rsi      # 0x3004
leaq 0x146b(%rip), %rcx      # 0x32d3
movl $0x1b0, %edx            # imm = 0x1B0
callq 0x10c0
leaq 0x1359(%rip), %rdi      # 0x31d2
leaq 0x1184(%rip), %rsi      # 0x3004
leaq 0x144c(%rip), %rcx      # 0x32d3
movl $0x1a8, %edx            # imm = 0x1A8
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O3/stevenmherring[P]DNS/mutex-trie.c
// Function: print
void print() {
            int rv;
            // Obtain the lock
            rv = pthread_mutex_lock(&lock);
            assert(rv == 0);

            printf("Root is at %p\n", root);
            /* Do a simple depth-first search */
            if (root)
            _print(root, 0, 0);

            // Unlock
            rv = pthread_mutex_unlock(&lock);
            assert(rv == 0);
          }

// Assembly:
pushq %rax
leaq 0x4175(%rip), %rdi      # 0x6128
callq 0x1200
testl %eax, %eax
jne 0x1ff8
movq 0x4195(%rip), %rsi      # 0x6158
leaq 0x13ff(%rip), %rdi      # 0x33c9
xorl %eax, %eax
callq 0x10a0
movq 0x4180(%rip), %rdi      # 0x6158
testq %rdi, %rdi
je 0x1fe6
xorl %esi, %esi
xorl %edx, %edx
callq 0x1e91
leaq 0x413b(%rip), %rdi      # 0x6128
callq 0x1120
testl %eax, %eax
jne 0x2017
popq %rax
retq
leaq 0x11d3(%rip), %rdi      # 0x31d2
leaq 0xffe(%rip), %rsi       # 0x3004
leaq 0x13af(%rip), %rcx      # 0x33bc
movl $0x1d5, %edx            # imm = 0x1D5
callq 0x10c0
leaq 0x11b4(%rip), %rdi      # 0x31d2
leaq 0xfdf(%rip), %rsi       # 0x3004
leaq 0x1390(%rip), %rcx      # 0x33bc
movl $0x1de, %edx            # imm = 0x1DE
callq 0x10c0
nop
// File: /workspace/github_c_makefile_star2_O3/MersenneTwister-Lab[P]MTGP/mtgp64-fast.c
// Function: mtgp64_init_state
void mtgp64_init_state(uint64_t array[],
		      const mtgp64_params_fast_t *para, uint64_t seed) {
    int i;
    int size = para->mexp / 64 + 1;
    uint64_t hidden_seed;
    uint64_t tmp;
    hidden_seed = para->tbl[4] ^ (para->tbl[8] << 16);
    tmp = hidden_seed >> 32;
    tmp += tmp >> 16;
    tmp += tmp >> 8;
    memset(array, tmp & 0xff, sizeof(uint64_t) * size);
    array[0] = seed;
    array[1] = hidden_seed;
    for (i = 1; i < size; i++) {
	array[i] ^= UINT64_C(6364136223846793005)
	    * (array[i - 1]
	       ^ (array[i - 1] >> 62)) + i;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movl (%rsi), %r15d
leal 0x3f(%r15), %ebp
testl %r15d, %r15d
cmovnsl %r15d, %ebp
movq %rdi, %rbx
sarl $0x6, %ebp
movq 0x50(%rsi), %r12
shlq $0x10, %r12
xorq 0x30(%rsi), %r12
movq %r12, %rax
shrq $0x20, %rax
movq %r12, %rcx
shrq $0x30, %rcx
addq %rax, %rcx
movq %rcx, %rsi
shrq $0x8, %rsi
addl %ecx, %esi
movslq %ebp, %rax
leaq 0x8(,%rax,8), %rdx
callq 0x1090
movq %r14, (%rbx)
movq %r12, 0x8(%rbx)
cmpl $0x40, %r15d
jl 0x1358
incl %ebp
movl %ebp, %eax
movq (%rbx), %rdi
movl $0x1, %ecx
movabsq $0x5851f42d4c957f2d, %rdx # imm = 0x5851F42D4C957F2D
movq %rdi, %rsi
shrq $0x3e, %rsi
xorq %rdi, %rsi
imulq %rdx, %rsi
addq %rcx, %rsi
xorq (%rbx,%rcx,8), %rsi
movq %rsi, (%rbx,%rcx,8)
incq %rcx
movq %rsi, %rdi
cmpq %rcx, %rax
jne 0x1337
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MersenneTwister-Lab[P]MTGP/mtgp64-fast.c
// Function: mtgp64_print_idstring
void mtgp64_print_idstring(const mtgp64_fast_t *mtgp64, FILE *fp) {
    int i;
    fprintf(fp, "mtgp64:%d:", mtgp64->params.mexp);
    for (i = 0; i < 20; i++) {
	fprintf(fp, "%02x", (unsigned int)mtgp64->params.poly_sha1[i]);
    }
    fprintf(fp, "\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %edx
leaq 0x160e(%rip), %rsi      # 0x3018
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10b0
leaq 0x1608(%rip), %r15      # 0x3023
xorl %r12d, %r12d
movzbl 0x198(%r14,%r12), %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x10b0
incq %r12
cmpq $0x14, %r12
jne 0x1a1e
movl $0xa, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x10a0
// File: /workspace/github_c_makefile_star2_O3/Joy-Division[P]tools-mgs/stage-extract.c
// Function: getInfoFromFlags
char *getInfoFromFlags(unsigned int flags) {
	char *retstring = malloc(16);
	switch(flags) {
		case 'c' : RETPRINT("cache")
		case 'n' : RETPRINT("nocache")
		case 'r' : RETPRINT("resident")
		case 's' : RETPRINT("sound")
		default: {
			sprintf( retstring, "%02x", flags );
			break;
		}
	}
	return retstring;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
movl $0x10, %edi
callq 0x1100
movq %rax, %rbx
cmpl $0x71, %ebp
jg 0x1738
cmpl $0x63, %ebp
je 0x1765
cmpl $0x6e, %ebp
jne 0x1750
movabsq $0x65686361636f6e, %rax # imm = 0x65686361636F6E
movq %rax, (%rbx)
jmp 0x1784
cmpl $0x72, %ebp
je 0x1773
cmpl $0x73, %ebp
jne 0x1750
movw $0x64, 0x4(%rbx)
movl $0x6e756f73, (%rbx)     # imm = 0x6E756F73
jmp 0x1784
leaq 0x9cd(%rip), %rsi       # 0x2124
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1160
jmp 0x1784
movw $0x65, 0x4(%rbx)
movl $0x68636163, (%rbx)     # imm = 0x68636163
jmp 0x1784
movabsq $0x746e656469736572, %rax # imm = 0x746E656469736572
movq %rax, (%rbx)
movb $0x0, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Joy-Division[P]tools-mgs/stage-extract.c
// Function: getNameFromDetails
char *getNameFromDetails(uint16_t hash, uint16_t extension, unsigned int flags, unsigned int texnum) {
	char *retstring = malloc(32);
	unsigned int result;
	if(!hash) {
		switch(flags) {
			case 0x63: RETPRINT("stg_mdl1.dar")
			case 0x6E: {
				sprintf( retstring, "%s%d.dar", "stg_tex", texnum );
				break;
			}
			case 0x72: RETPRINT("res_mdl1.dar")
		}
	}
	else {
		result = matchhash(hash, extension, stagedic, numstagedic);
		if(result != 0xFFFFFFFF) sprintf(retstring, "%s", stagedic[result].name);
		else {
			result = matchhash(hash, extension, commondic, numcommondic);
			if(result != 0xFFFFFFFF) sprintf(retstring, "%s", commondic[result].name);
			else {
				sprintf( retstring, "%04x.%c", hash, extension );
			}
		}
	}
	return retstring;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r15d
movl %edi, %r12d
movl $0x20, %edi
callq 0x1100
movq %rax, %rbx
testl %r12d, %r12d
je 0x1828
movzwl %r12w, %edx
movzwl %r15w, %ecx
movslq 0x292a(%rip), %rax      # 0x40ec
testq %rax, %rax
jle 0x17e8
movq 0x2912(%rip), %rsi      # 0x40e0
addq $0x8, %rsi
cmpl %edx, -0x8(%rsi)
jne 0x17dc
cmpl %ecx, -0x4(%rsi)
je 0x1854
addq $0x108, %rsi            # imm = 0x108
decq %rax
jne 0x17d2
movslq 0x28f9(%rip), %rax      # 0x40e8
testq %rax, %rax
jle 0x1815
movq 0x28dd(%rip), %rsi      # 0x40d8
addq $0x8, %rsi
cmpl %edx, -0x8(%rsi)
jne 0x1809
cmpl %ecx, -0x4(%rsi)
je 0x1854
addq $0x108, %rsi            # imm = 0x108
decq %rax
jne 0x17ff
leaq 0x938(%rip), %rsi       # 0x2154
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1160
jmp 0x189b
cmpl $0x72, %r14d
je 0x1880
cmpl $0x6e, %r14d
je 0x1864
cmpl $0x63, %r14d
jne 0x189b
movabsq $0x7261642e316c64, %rax # imm = 0x7261642E316C64
movq %rax, 0x5(%rbx)
movabsq $0x316c646d5f677473, %rax # imm = 0x316C646D5F677473
jmp 0x1898
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1050
leaq 0x8cb(%rip), %rsi       # 0x2136
leaq 0x8cd(%rip), %rdx       # 0x213f
movq %rbx, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1160
jmp 0x189b
movabsq $0x7261642e316c64, %rax # imm = 0x7261642E316C64
movq %rax, 0x5(%rbx)
movabsq $0x316c646d5f736572, %rax # imm = 0x316C646D5F736572
movq %rax, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/output.c
// Function: initDB
int initDB( char *dbfile )
{

	pthread_mutex_lock(&lock);
	while( db == NULL )
	{
		int ret = sqlite3_open( dbfile , &db );
		char *sql="create table house(id integer primary key,title char(200),city char(100), address char(100),type char(50),price char(8),infourl char(255),source char(50))";
		if ( ret != SQLITE_OK )
		{
			puts( "create database error");
			db = NULL;
			pthread_mutex_unlock(&lock);
			return -1;
		}
		ret = sqlite3_exec(db,sql,0,0,&err);
		if (ret != SQLITE_OK )
		{
			puts(sql);
			puts(err);
			pthread_mutex_unlock(&lock);
			return -1;
		}
	}
	pthread_mutex_unlock(&lock);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x88864(%rip), %rdi     # 0x92f78
callq 0xa610
leaq 0x88880(%rip), %r15     # 0x92fa0
leaq 0x6c8d9(%rip), %r12     # 0x77000
leaq 0x8887a(%rip), %r13     # 0x92fa8
xorl %ebx, %ebx
cmpq $0x0, 0x88868(%rip)     # 0x92fa0
jne 0xa799
movq %r14, %rdi
movq %r15, %rsi
callq 0xa180
testl %eax, %eax
jne 0xa77d
movq 0x88850(%rip), %rdi     # 0x92fa0
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r13, %r8
callq 0xa140
testl %eax, %eax
je 0xa730
leaq 0x6c896(%rip), %rdi     # 0x77000
callq 0xa110
movq 0x88832(%rip), %rdi     # 0x92fa8
callq 0xa110
jmp 0xa794
leaq 0x6c917(%rip), %rdi     # 0x7709b
callq 0xa110
movq $0x0, 0x8880c(%rip) # 0x92fa0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq 0x887d8(%rip), %rdi     # 0x92f78
callq 0xa390
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq