LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/fukunagatsu[P]RIblast/./seed_search.h
// Function: SeedSearch::SeedSearch(int, int, int, double)
SeedSearch(int h, int l, int mal, double he){
    _max_seed_length = l;
    _pair_size = 6;
    _hash_size = h;
    _min_accessible_length = mal;
    _hybrid_energy_threshold = he;
    
    _stem_pair.resize(_pair_size);
    _stem_pair[0].push_back(3); _stem_pair[0].push_back(4);
    _stem_pair[1].push_back(4); _stem_pair[1].push_back(3);
    _stem_pair[2].push_back(4); _stem_pair[2].push_back(5);
    _stem_pair[3].push_back(5); _stem_pair[3].push_back(4);
    _stem_pair[4].push_back(2); _stem_pair[4].push_back(5);
    _stem_pair[5].push_back(5); _stem_pair[5].push_back(2);
    _hit_candidate_result.reserve(5000);
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
andq $0x0, 0x10(%rdi)
xorps %xmm1, %xmm1
movups %xmm1, (%rdi)
leaq 0x30(%rdi), %r14
movups %xmm1, 0x30(%rdi)
andq $0x0, 0x40(%rdi)
movl %edx, 0x1c(%rdi)
movl $0x6, 0x18(%rdi)
movl %esi, 0x20(%rdi)
movl %ecx, 0x24(%rdi)
movsd %xmm0, 0x28(%rdi)
pushq $0x6
popq %rsi
callq 0xdc34
movq (%rbx), %rdi
leaq 0xc(%rsp), %rsi
movl $0x3, (%rsi)
callq 0xe63c
movq (%rbx), %rdi
leaq 0xc(%rsp), %rsi
movl $0x4, (%rsi)
callq 0xe63c
movq (%rbx), %rdi
addq $0x18, %rdi
leaq 0xc(%rsp), %rsi
movl $0x4, (%rsi)
callq 0xe63c
movq (%rbx), %rdi
addq $0x18, %rdi
leaq 0xc(%rsp), %rsi
movl $0x3, (%rsi)
callq 0xe63c
movq (%rbx), %rdi
addq $0x30, %rdi
leaq 0xc(%rsp), %rsi
movl $0x4, (%rsi)
callq 0xe63c
movq (%rbx), %rdi
addq $0x30, %rdi
leaq 0xc(%rsp), %rsi
movl $0x5, (%rsi)
callq 0xe63c
movq (%rbx), %rdi
addq $0x48, %rdi
leaq 0xc(%rsp), %rsi
movl $0x5, (%rsi)
callq 0xe63c
movq (%rbx), %rdi
addq $0x48, %rdi
leaq 0xc(%rsp), %rsi
movl $0x4, (%rsi)
callq 0xe63c
movq (%rbx), %rdi
addq $0x60, %rdi
leaq 0xc(%rsp), %rsi
movl $0x2, (%rsi)
callq 0xe63c
movq (%rbx), %rdi
addq $0x60, %rdi
leaq 0xc(%rsp), %rsi
movl $0x5, (%rsi)
callq 0xe63c
movq (%rbx), %rdi
addq $0x78, %rdi
leaq 0xc(%rsp), %rsi
movl $0x5, (%rsi)
callq 0xe63c
movq (%rbx), %rdi
addq $0x78, %rdi
leaq 0xc(%rsp), %rsi
movl $0x2, (%rsi)
callq 0xe63c
movl $0x1388, %esi           # imm = 0x1388
movq %r14, %rdi
callq 0xdc6a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0xdb50
jmp 0xdb50
jmp 0xdb50
jmp 0xdb50
jmp 0xdb50
jmp 0xdb50
jmp 0xdb50
jmp 0xdb50
jmp 0xdb50
jmp 0xdb50
jmp 0xdb50
jmp 0xdb50
movq %rax, %r15
movq %r14, %rdi
callq 0xdeb6
movq %rbx, %rdi
callq 0x4122
movq %r15, %rdi
callq 0x33a0
nop
// File: /workspace/github_c_makefile_star2_O2/fukunagatsu[P]RIblast/./hit.h
// Function: Hit::Hit(int, int, int, double, double)
Hit(int q_sp, int db_sp, int length, double accessiblity_energy, double hybridization_energy){
    _dbseq_id = -1;
    _dbseq_id_start = -1;
    _q_sp = q_sp;
    _db_sp = db_sp;
    _q_length = length;
    _db_length = length;
    _accessibility_energy = accessiblity_energy;
    _hybridization_energy = hybridization_energy;
    _energy = accessiblity_energy + hybridization_energy;
    _flag = false;
    _base_pair.reserve(10);
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x38(%rdi), %rbx
xorps %xmm2, %xmm2
movups %xmm2, 0x38(%rdi)
andq $0x0, 0x48(%rdi)
orq $-0x1, (%rdi)
movl %esi, 0x8(%rdi)
movl %edx, 0xc(%rdi)
movl %ecx, 0x10(%rdi)
movl %ecx, 0x14(%rdi)
movsd %xmm0, 0x18(%rdi)
movsd %xmm1, 0x20(%rdi)
addsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rdi)
movb $0x0, 0x30(%rdi)
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x11240
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xe77e
movq %r14, %rdi
callq 0x33a0
nop
// File: /workspace/github_c_makefile_star2_O2/fukunagatsu[P]RIblast/rna_interaction_search_parameters.cpp
// Function: RnaInteractionSearchParameters::SetParameters(int, char**)
void RnaInteractionSearchParameters::SetParameters(int argc, char* argv[]) {
  int c;
  extern char *optarg;
  while ((c = getopt(argc, argv, "i:o:d:l:e:y:x:f:g:s:m:")) != -1) {
    switch (c) {
    case 'i':
      _input_filename = optarg;
      break;

    case 'o':
      _output_filename = optarg;
      break;
      
    case 'd':
      _db_filename = optarg;
      break;

    case 'l':
      _max_seed_length = atoi(optarg);
      break;

    case 'e':
      _hybrid_energy_threshold = atof(optarg);
      break;
   
    case 'f':
      _interaction_energy_threshold = atof(optarg);
      break;

    case 'g':
      _final_threshold = atof(optarg);
      break;

    case 's':
      _output_style = atoi(optarg);
      break;

    case 'x':
      _drop_out_length_w_gap = atoi(optarg);
      break;

    case 'y':
      _drop_out_length_wo_gap = atoi(optarg);
      break;

    case 'm':
      _min_helix_length = atoi(optarg);
      break;

    default:
      cerr << "Error: The argument is invalid command." << endl;
      exit(1);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x40(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x20(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x693d5(%rip), %r13     # 0x78da8
leaq 0x69376(%rip), %r15     # 0x78d50
movq 0xd35d7(%rip), %r12     # 0xe2fb8
movl %ebp, %edi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x3070
leal -0x64(%rax), %ecx
cmpl $0x15, %ecx
ja 0xfad0
movslq (%r15,%rcx,4), %rax
addq %r15, %rax
jmpq *%rax
movq (%r12), %rsi
movq %r14, %rdi
callq 0x33e0
jmp 0xf9e1
movq (%r12), %rdi
callq 0x3330
movl %eax, 0x94(%r14)
jmp 0xf9e1
movq (%r12), %rdi
callq 0x3330
movl %eax, 0x90(%r14)
jmp 0xf9e1
movq (%r12), %rdi
callq 0x3330
movl %eax, 0x60(%r14)
jmp 0xf9e1
movq (%r12), %rsi
movq 0x8(%rsp), %rdi
callq 0x33e0
jmp 0xf9e1
movq (%r12), %rdi
callq 0x3330
movl %eax, 0x74(%r14)
jmp 0xf9e1
movq (%r12), %rdi
callq 0x3270
movsd %xmm0, 0x78(%r14)
jmp 0xf9e1
movq (%r12), %rsi
movq 0x10(%rsp), %rdi
callq 0x33e0
jmp 0xf9e1
movq (%r12), %rdi
callq 0x3270
movsd %xmm0, 0x88(%r14)
jmp 0xf9e1
movq (%r12), %rdi
callq 0x3270
movsd %xmm0, 0x80(%r14)
jmp 0xf9e1
movq (%r12), %rdi
callq 0x3330
movl %eax, 0x98(%r14)
jmp 0xf9e1
cmpl $-0x1, %eax
jne 0xfae4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xd3505(%rip), %rdi     # 0xe2ff0
leaq 0x692cd(%rip), %rsi     # 0x78dbf
callq 0x31e0
movq %rax, %rdi
callq 0x3110
pushq $0x1
popq %rdi
callq 0x3250
nop
// File: /workspace/github_c_makefile_star2_O2/fukunagatsu[P]RIblast/rna_interaction_search_parameters.cpp
// Function: RnaInteractionSearchParameters::SetDbParameters()
void RnaInteractionSearchParameters::SetDbParameters(){
  ifstream ifs((GetDbFilename()+".bas").c_str(), ios::in | ios::binary);
  if (!ifs){
    cout << "Error: can't open " << GetDbFilename() << ".bas." <<endl;
    exit(1);
  }
  int temp_i = 0;
  ifs.read(reinterpret_cast<char*>(&temp_i), sizeof(int));
  SetHashSize(temp_i);
  ifs.read(reinterpret_cast<char*>(&temp_i), sizeof(int));
  SetRepeatFlag(temp_i);
  ifs.read(reinterpret_cast<char*>(&temp_i), sizeof(int));
  SetMaximalSpan(temp_i);
  ifs.read(reinterpret_cast<char*>(&temp_i), sizeof(int));
  SetMinAccessibleLength(temp_i);
  ifs.close();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32d0
leaq 0x6d46(%rip), %rdx      # 0x16872
movq %rsp, %rdi
movq %r14, %rsi
callq 0x4e73
movq (%rsp), %rsi
leaq 0x40(%rsp), %rdi
pushq $0xc
popq %rdx
callq 0x33c0
movq %rsp, %rdi
callq 0x3100
leaq 0x20(%rsp), %rdi
callq 0x3100
movq 0x40(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x60(%rsp,%rax)
jne 0xfbe1
movq %rsp, %rsi
andl $0x0, (%rsi)
leaq 0x40(%rsp), %rdi
pushq $0x4
popq %rdx
callq 0x3290
movq %rsp, %rsi
movl (%rsi), %eax
movl %eax, 0x64(%rbx)
leaq 0x40(%rsp), %rdi
pushq $0x4
popq %rdx
callq 0x3290
movq %rsp, %rsi
movl (%rsi), %eax
movl %eax, 0x68(%rbx)
leaq 0x40(%rsp), %rdi
pushq $0x4
popq %rdx
callq 0x3290
movq %rsp, %rsi
movl (%rsi), %eax
movl %eax, 0x6c(%rbx)
leaq 0x40(%rsp), %rdi
pushq $0x4
popq %rdx
callq 0x3290
movl (%rsp), %eax
movl %eax, 0x70(%rbx)
leaq 0x40(%rsp), %rdi
callq 0x3060
leaq 0x40(%rsp), %rdi
callq 0x30a0
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r14
retq
movq 0xd33e8(%rip), %rdi     # 0xe2fd0
leaq 0x380a8(%rip), %rsi     # 0x47c97
callq 0x31e0
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x32d0
movq %rsp, %rsi
movq %r14, %rdi
callq 0x31c0
leaq 0x691d3(%rip), %rsi     # 0x78de7
movq %rax, %rdi
callq 0x31e0
movq %rax, %rdi
callq 0x3110
movq %rsp, %rdi
callq 0x3100
pushq $0x1
popq %rdi
callq 0x3250
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3100
jmp 0xfc64
jmp 0xfc61
jmp 0xfc61
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3100
jmp 0xfc55
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3100
jmp 0xfc6e
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x30a0
movq %rbx, %rdi
callq 0x33a0
nop
// File: /workspace/github_c_makefile_star2_O2/fukunagatsu[P]RIblast/seed_search.cpp
// Function: SeedSearch::Run(std::vector<unsigned char, std::allocator<unsigned char>>&, std::vector<int, std::allocator<int>>&, std::vector<unsigned char, std::allocator<unsigned char>>&, std::vector<int, std::allocator<int>>&, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&)
void SeedSearch::Run(vector<unsigned char> &query_seq, vector<int> &query_suffix_array, vector<unsigned char> &db_seq, vector<int> &db_suffix_array,  vector<vector<int> > &start_hash,  vector<vector<int> > &end_hash){
  vector<int> db_seed; db_seed.reserve(_max_seed_length);
  vector<int> q_seed; q_seed.reserve(_max_seed_length);
  
  SeedSearchCore(query_seq, query_suffix_array, db_seq, db_suffix_array, start_hash, end_hash, db_seed, q_seed, 0, query_suffix_array.size()-1, 0, db_suffix_array.size()-1, 0.0, 0);
  return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, 0x8(%rsp)
movq %r8, %r15
movq %rcx, (%rsp)
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r12
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rbx
movaps %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movslq 0x1c(%rdi), %rsi
movq %rbx, %rdi
callq 0x6488
leaq 0x10(%rsp), %rbp
xorps %xmm0, %xmm0
movaps %xmm0, (%rbp)
andq $0x0, 0x10(%rbp)
movslq 0x1c(%r12), %rsi
movq %rbp, %rdi
callq 0x6488
movq 0x8(%r13), %rax
subq (%r13), %rax
shrq $0x2, %rax
decl %eax
movq 0x8(%r15), %r10
subq (%r15), %r10
shrq $0x2, %r10
decl %r10d
xorps %xmm0, %xmm0
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq (%rsp), %rcx
movq %r15, %r8
movq 0x8(%rsp), %r9
pushq $0x0
pushq %r10
pushq $0x0
pushq %rax
pushq $0x0
pushq %rbp
pushq %rbx
pushq 0xb8(%rsp)
callq 0x106bc
addq $0x40, %rsp
leaq 0x10(%rsp), %rdi
callq 0x4632
leaq 0x30(%rsp), %rdi
callq 0x4632
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x106a9
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4632
leaq 0x30(%rsp), %rdi
callq 0x4632
movq %rbx, %rdi
callq 0x33a0
nop
// File: /workspace/github_c_makefile_star2_O2/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
movslq %r8d, %rsi
shlq $0x2, %rax
cmpq %rsi, %rcx
jge 0x10f53
movq (%rdx), %rdi
addq %rax, %rdi
cvtss2sd (%rdi,%rcx,4), %xmm1
addsd %xmm1, %xmm0
incq %rcx
jmp 0x10f3a
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
movl 0x20(%rsp), %edi
movq (%rdx), %r10
movq 0x8(%rdx), %r11
subq %r10, %r11
shrq $0x2, %r11
decl %r11d
xorl %ebx, %ebx
movl $0x2, %ebp
movl %r11d, %edx
movl %edx, %eax
cltd
idivl %ebp
movl %r11d, %edx
subl %ebx, %edx
je 0x10faf
cmpl $0x1, %edx
je 0x10fb6
movslq %eax, %rdx
cmpl %r9d, (%r10,%rdx,4)
jle 0x10f99
movl %eax, %r11d
movl %ebx, %r14d
jmp 0x10fa6
cmpl %r9d, 0x4(%r10,%rdx,4)
jg 0x10fe8
movl %r11d, %ebx
movl %eax, %r14d
movl %ebx, %edx
addl %eax, %edx
movl %r14d, %ebx
jmp 0x10f77
movl %ebx, (%rcx)
movslq %ebx, %rax
jmp 0x10fd7
movslq %ebx, %rdx
cmpl %r9d, (%r10,%rdx,4)
jg 0x10fd1
leaq (%r10,%rdx,4), %r14
cmpl %r9d, 0x4(%r14)
jle 0x10fd1
movl %ebx, (%rcx)
shlq $0x2, %rdx
jmp 0x10ff2
movl %r11d, (%rcx)
movslq %r11d, %rax
leaq (,%rax,4), %rdx
addq (%rsi), %rdx
leaq (%r10,%rax,4), %r14
jmp 0x10ff5
leaq (%r10,%rdx,4), %r14
shlq $0x2, %rdx
movl %eax, (%rcx)
addq (%rsi), %rdx
movl (%rdx), %eax
addl %r9d, %edi
subl %edi, %eax
addl (%r14), %eax
movl %eax, (%r8)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x128ac
movl %edx, %ecx
movq (%rsi), %rdx
movzbl (%rdx,%rcx), %ecx
cmpl $0x2, %ecx
jb 0x128ac
cmpb $0x5, %cl
ja 0x128a7
decl %ecx
jmp 0x128aa
addl $-0x5, %ecx
movl %ecx, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %rbp
movl 0x58(%rsp), %ebx
movl 0x50(%rsp), %r13d
subq $0x8, %rsp
movl %r8d, 0x18(%rsp)
movl %r9d, 0x1c(%rsp)
pushq $0x0
pushq %rbx
pushq %r13
callq 0x12ce8
addq $0x20, %rsp
movl %eax, %edx
xorl %eax, %eax
testl %edx, %edx
je 0x1298e
movq 0x60(%rsp), %rax
movq (%rax), %rax
movslq %r13d, %rcx
imulq $0x18, %rcx, %rcx
movq -0x18(%rax,%rcx), %rax
movslq %ebx, %rcx
imulq $0x18, %rcx, %rcx
movl -0x8(%rax,%rcx), %eax
movl %edx, %r13d
addl $-0x3, %r13d
testl %eax, %eax
je 0x1292e
addl $-0x3, %eax
orl %r13d, %eax
cmpl $0x1, %eax
ja 0x12986
movl %edx, 0xc(%rsp)
movl 0x8(%rbp), %ebx
pushq $0x1
popq %rbp
cmpl %ebx, %ebp
jge 0x1298a
subq $0x8, %rsp
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
movl 0x18(%rsp), %r8d
movl 0x1c(%rsp), %r9d
pushq %rbp
movl 0x68(%rsp), %eax
pushq %rax
movl 0x68(%rsp), %eax
pushq %rax
callq 0x12ce8
addq $0x20, %rsp
testl %eax, %eax
je 0x12982
leal 0x1(%rbp), %ecx
cmpl $0x1, %ebp
movl %ecx, %ebp
jne 0x12938
addl $-0x3, %eax
orl %r13d, %eax
movl %ecx, %ebp
cmpl $0x1, %eax
ja 0x12938
xorl %eax, %eax
jmp 0x1298e
movl %edx, %eax
jmp 0x1298e
movl 0xc(%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 %r9d, %r12d
movl %r8d, %ebx
movl %ecx, %r13d
movq %rdx, %r14
movq %rsi, %r15
movl 0x40(%rsp), %ebp
testl %r13d, %r13d
je 0x12cd9
testl %r12d, %r12d
je 0x12cd9
cmpb $0x0, 0x48(%rsp)
je 0x12ca7
leal (%rbx,%r13), %esi
leal (%r12,%rbp), %edx
jmp 0x12cb1
movl %ebx, %esi
subl %r13d, %esi
movl %ebp, %edx
subl %r12d, %edx
movq %r15, %rdi
callq 0xdbbe
movslq %r13d, %rax
movq (%r14), %rcx
imulq $0x18, %rax, %rax
movslq %r12d, %rdx
movq (%rcx,%rax), %rax
imulq $0x18, %rdx, %rcx
movl (%rax,%rcx), %r13d
movl 0x4(%rax,%rcx), %r12d
jmp 0x12c8c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movq %rcx, %r14
movl %esi, %ebx
movl 0x50(%rsp), %r13d
movl 0x48(%rsp), %r12d
movl 0x40(%rsp), %eax
addl %r13d, %eax
testl %esi, %esi
je 0x12d28
addl %r8d, %eax
movq %rdx, %rsi
movl %eax, %edx
callq 0x1288a
movl %eax, %r15d
addl %r13d, %r12d
addl %r12d, %ebp
jmp 0x12d3f
subl %eax, %r8d
movq %rdx, %rsi
movl %r8d, %edx
callq 0x1288a
movl %eax, %r15d
addl %r13d, %r12d
subl %r12d, %ebp
movq %r14, %rsi
movl %ebp, %edx
callq 0x1288a
movslq %r15d, %rcx
cltq
imulq $0x14, %rcx, %rcx
leaq 0x96e07(%rip), %rdx     # 0xa9b60
addq %rcx, %rdx
movl (%rdx,%rax,4), %eax
cmpl $0x1, %ebx
jne 0x12d70
cltq
leaq 0x96e63(%rip), %rcx     # 0xa9bd0
movl (%rcx,%rax,4), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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
je 0x157fc
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %rbx
movq %rdi, %r15
cmpl $0x1, %ebp
ja 0x15817
xorl %eax, %eax
cmpl $0x1, %ebp
jne 0x157f1
movb (%r15), %al
movb %al, (%rbx)
pushq $0x1
jmp 0x157f0
movl $0x1, (%rsp)
pushq $0x1
popq %r9
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl %ebp, %ecx
movl $0x100, %r8d            # imm = 0x100
callq 0x14021
testl %eax, %eax
js 0x157f1
movl %ebp, %ecx
movb -0x1(%r15,%rcx), %dl
movb %dl, (%rbx)
movl %eax, %edx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x15863
movb (%r14,%rsi,4), %dil
movb %dil, 0x1(%rbx,%rsi)
incq %rsi
jmp 0x15848
movb (%r14,%rdx,4), %sil
movb %sil, (%rbx,%rdx)
incq %rdx
cmpq %rcx, %rdx
jb 0x1585b
incl %eax
jmp 0x157f1
// File: /workspace/github_c_makefile_star2_O2/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 %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
testl %r8d, %r8d
setle %al
orb %dl, %al
je 0x158b0
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %rbx
movq %rdi, %r15
cmpl $0x1, %ebp
ja 0x158cb
xorl %eax, %eax
cmpl $0x1, %ebp
jne 0x158a5
movl (%r15), %eax
movl %eax, (%rbx)
pushq $0x1
jmp 0x158a4
movl $0x1, (%rsp)
pushq $0x4
popq %r9
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x14021
testl %eax, %eax
js 0x158a5
movl %ebp, %ecx
movl -0x4(%r15,%rcx,4), %edx
movl %edx, (%rbx)
movl %eax, %edx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x1590f
movl (%r14,%rsi,4), %edi
movl %edi, 0x4(%rbx,%rsi,4)
incq %rsi
jmp 0x158f6
movl (%r14,%rdx,4), %esi
movl %esi, (%rbx,%rdx,4)
incq %rdx
cmpq %rcx, %rdx
jb 0x15908
incl %eax
jmp 0x158a5
// File: /workspace/github_c_makefile_star2_O2/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 0x24ac
cmpl $0x5, %r8d
jne 0x252f
movq 0x20(%r14), %r15
jmp 0x24c3
movq 0x20(%r14), %r15
leaq 0x1b7d(%rip), %rsi      # 0x4034
movq %r15, %rdi
callq 0x2190
testl %eax, %eax
jne 0x252f
movq 0x8(%r14), %rdi
callq 0x22a0
movl %eax, (%rbp)
movq 0x10(%r14), %rdi
callq 0x22a0
movl %eax, (%r13)
movq 0x18(%r14), %rdi
callq 0x22a0
movl %eax, (%r12)
leaq 0x1b92(%rip), %rsi      # 0x4082
movq %r15, %rdi
callq 0x2040
testl %eax, %eax
je 0x2552
leaq 0x1b84(%rip), %rsi      # 0x4087
movq %r15, %rdi
callq 0x2040
testl %eax, %eax
je 0x2556
leaq 0x1b1e(%rip), %rsi      # 0x4034
movq %r15, %rdi
callq 0x2040
testl %eax, %eax
jne 0x252f
movq 0x28(%r14), %rdi
callq 0x22a0
testl %eax, %eax
jg 0x2559
movq 0x4ac2(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movq (%r14), %rdx
leaq 0x1af8(%rip), %rsi      # 0x403b
xorl %eax, %eax
callq 0x21b0
pushq $0x1
popq %rdi
callq 0x22e0
pushq $-0x2
jmp 0x2558
pushq $-0x1
popq %rax
movl %eax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1917(%rip), %rdi      # 0x43a9
callq 0x2070
movups 0x15ed(%rip), %xmm0     # 0x408b
movq %rsp, %r14
movaps %xmm0, (%r14)
movups 0x15ef(%rip), %xmm0     # 0x409b
movaps %xmm0, 0x10(%r14)
movb $0x0, 0x20(%r14)
leaq 0x15ef(%rip), %rsi      # 0x40ac
movq %r14, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x22d0
leaq 0x15f4(%rip), %rsi      # 0x40c5
movq %r14, %rdi
movq %r14, %rdx
movq %r13, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x22d0
leaq 0x15e5(%rip), %rsi      # 0x40d0
movq %r14, %rdi
movq %r14, %rdx
movq %r15, %rcx
movq %rbp, %r8
xorl %eax, %eax
callq 0x22d0
leaq 0x15d9(%rip), %rsi      # 0x40de
movq %r14, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x22d0
leaq 0x15de(%rip), %rsi      # 0x40f7
leaq 0x2000(%rsp), %r15
movq %r15, %rdi
movq %r13, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x22d0
movq %r15, %rdi
callq 0x20e0
movl %ebx, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3929
leaq 0x1777(%rip), %r12      # 0x42c4
movq %r12, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2110
movups 0x15a7(%rip), %xmm0     # 0x4108
movaps %xmm0, (%r15)
movups 0x15a6(%rip), %xmm0     # 0x4112
movups %xmm0, 0xa(%r15)
movq %r15, %rdi
callq 0x20e0
movl %ebx, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3929
movq %r12, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2110
movq %r14, %rdi
callq 0x20e0
leaq 0x1580(%rip), %rsi      # 0x4122
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x22d0
movq %r15, %rdi
callq 0x20e0
movl %ebx, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3929
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 0x3929
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_O2/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 0x14cd(%rip), %rsi      # 0x413a
callq 0x2350
testq %rax, %rax
je 0x2cb7
pushq $0x3f
popq %rsi
movq %r14, %rdi
callq 0x2140
testq %rax, %rax
je 0x2c9b
movq %rax, %r12
movq %rax, %rsi
incq %rsi
movq %r15, %rdi
callq 0x2060
movq %r12, %r15
movb $0x0, (%r15)
leaq 0x1498(%rip), %rsi      # 0x413e
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x22d0
jmp 0x2cff
movb $0x0, (%r15)
leaq 0x147c(%rip), %rsi      # 0x413e
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x22d0
movq %r14, %rdi
callq 0x20e0
pushq $0x1
popq %rbp
cmpb $0x2f, -0x1(%r14,%rax)
jne 0x2cff
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_O2/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 0x142b(%rip), %rsi      # 0x4146
callq 0x2350
testq %rax, %rax
je 0x2d3a
movabsq $0x6d74682f74786574, %rax # imm = 0x6D74682F74786574
movq %rax, (%rbx)
movw $0x6c, 0x8(%rbx)
jmp 0x2da1
leaq 0x1415(%rip), %rsi      # 0x4156
movq %r14, %rdi
callq 0x2350
testq %rax, %rax
je 0x2d63
movabsq $0x69672f6567616d69, %rax # imm = 0x69672F6567616D69
movq %rax, (%rbx)
movw $0x66, 0x8(%rbx)
jmp 0x2da1
leaq 0x13fb(%rip), %rsi      # 0x4165
movq %r14, %rdi
callq 0x2350
testq %rax, %rax
je 0x2d8d
movabsq $0x706a2f6567616d69, %rax # imm = 0x706A2F6567616D69
movq %rax, (%rbx)
movl $0x676570, 0x7(%rbx)    # imm = 0x676570
jmp 0x2da1
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_O2/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
andq $0x0, 0x8(%rsp)
movups 0x13a7(%rip), %xmm0     # 0x4180
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
movw $0xa, 0x10(%r15)
leaq 0x13a2(%rip), %rsi      # 0x4192
movq %r15, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x22d0
leaq 0x13ab(%rip), %rsi      # 0x41af
movq %r15, %rdi
movq %r15, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x22d0
subl %ebx, %r13d
leaq 0x13ac(%rip), %rsi      # 0x41ca
movq %r15, %rdi
movq %r15, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0x22d0
movl (%r12), %ecx
leaq 0x13ac(%rip), %rsi      # 0x41e5
movq %r15, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x22d0
movl 0x4(%r12), %ecx
leaq 0x13ab(%rip), %rsi      # 0x41fd
movq %r15, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x22d0
movl 0x8(%r12), %ecx
leaq 0x13ad(%rip), %rsi      # 0x4218
movq %r15, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x22d0
movl 0xc(%r12), %ecx
leaq 0x13b0(%rip), %rsi      # 0x4234
movq %r15, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x22d0
movq %r15, %rdi
callq 0x20e0
movl %ebp, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3929
callq 0x34b9
testl %eax, %eax
jne 0x2ee4
leaq 0x139b(%rip), %rdi      # 0x4251
pushq $0x1
popq %rbx
movq %r14, %rsi
movl %ebx, %edx
callq 0x34a1
movl %ebp, %edi
movl %ebx, %esi
callq 0x3596
movq 0x410d(%rip), %rax      # 0x6fe0
movq (%rax), %rdx
leaq 0x8(%rsp), %rsi
movq (%rsp), %rdi
callq 0x34d1
xorl %edi, %edi
callq 0x34e9
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x2
popq %rcx
movl $0x2000, %edx           # imm = 0x2000
movq %rbx, %rsi
callq 0x2030
leaq 0xf62(%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 0x2c55
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x35ae
movq 0x30(%r14), %rax
addq $0xc098, %rsp           # imm = 0xC098
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/floriangit[P]hdd_sound/disk.c
// Function: main
int main(int ac, char **av)
{
	char str[4096];
	char fstat[512];
	int fd;
	int ret;
	int val      = 0;
	int old_val  = 1;
	int diff     = 0;

	if(ac > 1) {
	    sprintf(fstat, "/sys/block/%s/stat", av[1]);
	} else {
	    strcpy(fstat, "/sys/block/sda/stat");
	}

	while(1) {
		usleep(1234);
		fd = open(fstat, O_RDONLY);
	
		if(fd < 3) {
			perror("open");
			return -1;
		}
	
		ret = read(fd, str, sizeof(str));
		if(ret == -1) {
			perror("read");
			return -1;
		}
		close(fd);

		char delim[] = " ";
		char *ptr = strtok(str, delim);
	
		for(int i = 0; ptr != NULL; i++) {
			if(i == 2 || i == 6) { /* 2 = READ, 6 = WRITE */
				val = atoi(ptr);
				diff = val - old_val;
				if(diff > 1024) {
					play(MEDIUM);
					old_val = val;
					break;
				}
				if(diff > 0) {
					play(SHORT);
					old_val = val;
					break;
				}
			}
			ptr = strtok(NULL, delim);
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1208, %rsp           # imm = 0x1208
cmpl $0x2, %edi
jl 0x1249
movq 0x8(%rsi), %rdx
leaq 0xdc7(%rip), %rsi       # 0x2004
movq %rsp, %rdi
xorl %eax, %eax
callq 0x1070
jmp 0x125c
movups 0xdc7(%rip), %xmm0      # 0x2017
movaps %xmm0, (%rsp)
movl $0x746174, 0x10(%rsp)   # imm = 0x746174
pushq $0x1
popq %r13
movq %rsp, %r14
leaq 0x200(%rsp), %r15
leaq 0xdc3(%rip), %r12       # 0x2035
movl $0x4d2, %edi            # imm = 0x4D2
callq 0x1080
movq %r14, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x1110
cmpl $0x3, %eax
jl 0x1303
movl %eax, %ebp
movl $0x1000, %edx           # imm = 0x1000
movl %eax, %edi
movq %r15, %rsi
callq 0x1060
cmpl $-0x1, %eax
je 0x130c
movl %ebp, %edi
callq 0x1030
movq %r15, %rdi
movq %r12, %rsi
callq 0x10b0
xorl %ebx, %ebx
testq %rax, %rax
je 0x1272
movl %ebx, %ecx
andl $0x7ffffffb, %ecx       # imm = 0x7FFFFFFB
cmpl $0x2, %ecx
jne 0x12e1
movq %rax, %rdi
callq 0x1090
movl %eax, %ebp
subl %r13d, %eax
cmpl $0x400, %eax            # imm = 0x400
jg 0x12ef
testl %eax, %eax
jg 0x12f4
xorl %edi, %edi
movq %r12, %rsi
callq 0x10b0
incl %ebx
jmp 0x12b7
pushq $0x1
popq %rdi
jmp 0x12f6
xorl %edi, %edi
callq 0x132d
movl %ebp, %r13d
jmp 0x1272
leaq 0xd21(%rip), %rdi       # 0x202b
jmp 0x1313
leaq 0xd1d(%rip), %rdi       # 0x2030
callq 0x10e0
pushq $-0x1
popq %rax
addq $0x1208, %rsp           # imm = 0x1208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/giometti[P]mastering_UNIX_programming/chapter_08/malloc.c
// Function: main
int main(int argc, char *argv[])
{
	size_t size;
	void *ptr, *nptr;

	/* Parse the command line */
	if (argc < 2) {
		fprintf(stderr,
			"usage: %s <size>\n", argv[0]);
		return -1;
	}
	size = atoi(argv[1]);

	/* Try memory allocation */
	ptr = malloc(size);
	if (ptr == NULL) {
		perror("malloc");
		return -1;
	}
	printf("malloc(%ld) returned %p\n", size, ptr);
	free(ptr);

	/* Try calloc) of doubled space and then realloc()
	 * of doubled-doubed space.
	 */
	ptr = calloc(2, size);
	if (ptr == NULL) {
		perror("malloc");
		return -1;
	}
	printf("calloc(2, %ld) returned %p\n", size, ptr);

	nptr = realloc(ptr, size * 2 * 2);
	if (ptr == NULL) {
		perror("malloc");
		return -1;
	}
	printf("realloc(%p, %ld) returned %p\n", ptr, size * 2 * 2, nptr);
	free(nptr);

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x1, %edi
jle 0x126f
movq 0x8(%rsi), %rdi
callq 0x10a0
movslq %eax, %r14
movq %r14, %rdi
callq 0x1070
testq %rax, %rax
je 0x1261
movq %rax, %r15
leaq 0xe39(%rip), %rdi       # 0x201d
xorl %ebx, %ebx
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1040
movq %r15, %rdi
callq 0x1030
pushq $0x2
popq %rdi
movq %r14, %rsi
callq 0x1050
testq %rax, %rax
je 0x1261
movq %rax, %r15
leaq 0xe21(%rip), %rdi       # 0x2036
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1040
shlq $0x2, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x1080
movq %rax, %r12
leaq 0xe17(%rip), %rdi       # 0x2052
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1040
movq %r12, %rdi
callq 0x1030
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0xdae(%rip), %rdi       # 0x2016
callq 0x1090
jmp 0x128a
movq 0x2d82(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq (%rsi), %rdx
leaq 0xd81(%rip), %rsi       # 0x2004
xorl %eax, %eax
callq 0x1060
pushq $-0x1
popq %rbx
jmp 0x1253
// File: /workspace/github_c_makefile_star2_O2/wjmelements[P]evm/tst/dio.c
// Function: test_applyConfig_code
void test_applyConfig_code() {
    evmInit();
    const char config[] = "["
        "{"
            "\"address\":\"0x80d9b122dc3a16fdc41f96cf010ffe7e38d227c3\","
            "\"code\":\"0x383d3d39383df3\""
        "}"
    "]";
    applyConfig(config);

    uint64_t gas = 21019;
    address_t from;
    val_t val;
    val[0] = 0;
    val[1] = 0;
    val[2] = 0;
    address_t to = AddressFromHex42("0x80d9b122dc3a16fdc41f96cf010ffe7e38d227c3");
    data_t input;
    input.size = 0;

    result_t result = txCall(from, gas, to, val, input, NULL);
    op_t expected[] = {
         CODESIZE, RETURNDATASIZE, RETURNDATASIZE, CODECOPY,
         CODESIZE, RETURNDATASIZE, RETURN
    };
    assert(result.returnData.size == sizeof(expected));
    assert(memcmp(expected, result.returnData.content, result.returnData.size) == 0);
    assert(result.gasRemaining == 0);

    evmFinalize();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
xorl %eax, %eax
callq 0x66f5
leaq 0x9c9c(%rip), %rsi      # 0xd010
pushq $0x55
popq %rcx
leaq 0xb0(%rsp), %rax
movq %rax, %rdi
rep  movsb (%rsi), %es:(%rdi)
movq %rax, %rdi
callq 0x39a8
leaq 0x4c(%rsp), %rbx
andq $0x0, (%rbx)
andl $0x0, 0x8(%rbx)
leaq 0x58(%rsp), %r14
movq %r14, %rdi
callq 0x346c
movl 0x10(%r14), %eax
movl %eax, 0x28(%rsp)
movups (%r14), %xmm0
movups %xmm0, 0x18(%rsp)
movl 0x48(%rsp), %eax
movl %eax, 0x10(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x70(%rsp), %r14
movl $0x521b, %esi           # imm = 0x521B
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x6d9d
cmpq $0x7, (%r14)
jne 0x341d
movq 0x78(%rsp), %rsi
leaq 0xa29c(%rip), %rdi      # 0xd690
pushq $0x7
popq %rdx
callq 0x31c0
testl %eax, %eax
jne 0x3436
cmpq $0x0, 0xa0(%rsp)
jne 0x344f
xorl %eax, %eax
callq 0x6a10
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
retq
leaq 0xa096(%rip), %rdi      # 0xd4ba
leaq 0xa0ba(%rip), %rsi      # 0xd4e5
leaq 0xa0bd(%rip), %rcx      # 0xd4ef
pushq $0x20
jmp 0x3466
leaq 0xa0cf(%rip), %rdi      # 0xd50c
leaq 0xa0a1(%rip), %rsi      # 0xd4e5
leaq 0xa0a4(%rip), %rcx      # 0xd4ef
pushq $0x21
jmp 0x3466
leaq 0xa0ff(%rip), %rdi      # 0xd555
leaq 0xa088(%rip), %rsi      # 0xd4e5
leaq 0xa08b(%rip), %rcx      # 0xd4ef
pushq $0x22
popq %rdx
callq 0x30e0
// File: /workspace/github_c_makefile_star2_O2/wjmelements[P]evm/tst/dio.c
// Function: test_applyConfig_storage
void test_applyConfig_storage() {
    evmInit();

    const char config[] = "["
        "{"
            "\"address\":\"0x80d9b122dc3a16fdc41f96cf010ffe7e38d227c3\","
            "\"code\":\"0x5f545f52595ff3\","
            "\"storage\":{"
                "\"0x00\": \"0x12340000567800009abc0000def0\""
            "}"
        "}"
    "]";
    applyConfig(config);

    uint64_t gas = 23114;
    address_t from;
    val_t val;
    val[0] = 0;
    val[1] = 0;
    val[2] = 0;
    address_t to = AddressFromHex42("0x80d9b122dc3a16fdc41f96cf010ffe7e38d227c3");
    data_t input;
    input.size = 0;

    result_t result = txCall(from, gas, to, val, input, NULL);
    op_t expected[] = {
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x12, 0x34, 0x00, 0x00, 0x56, 0x78,
        0x00, 0x00, 0x9a, 0xbc, 0x00, 0x00, 0xde, 0xf0,
    };
    assert(result.returnData.size == sizeof(expected));
    assert(memcmp(expected, result.returnData.content, result.returnData.size) == 0);
    assert(result.gasRemaining == 0);

    evmFinalize();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
xorl %eax, %eax
callq 0x66f5
leaq 0x9b93(%rip), %rsi      # 0xd070
leaq 0xb0(%rsp), %rbx
movl $0x8a, %edx
movq %rbx, %rdi
callq 0x31a0
movq %rbx, %rdi
callq 0x39a8
leaq 0x4c(%rsp), %rbx
andq $0x0, (%rbx)
andl $0x0, 0x8(%rbx)
leaq 0x58(%rsp), %r14
movq %r14, %rdi
callq 0x346c
movl 0x10(%r14), %eax
movl %eax, 0x28(%rsp)
movups (%r14), %xmm0
movups %xmm0, 0x18(%rsp)
movl 0x48(%rsp), %eax
movl %eax, 0x10(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x70(%rsp), %r14
movl $0x5a4a, %esi           # imm = 0x5A4A
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x6d9d
cmpq $0x20, (%r14)
jne 0x358b
movq 0x78(%rsp), %rsi
leaq 0xa0ce(%rip), %rdi      # 0xd630
pushq $0x20
popq %rdx
callq 0x31c0
testl %eax, %eax
jne 0x35a4
cmpq $0x0, 0xa0(%rsp)
jne 0x35bd
xorl %eax, %eax
callq 0x6a10
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r14
retq
leaq 0x9f28(%rip), %rdi      # 0xd4ba
leaq 0x9f4c(%rip), %rsi      # 0xd4e5
leaq 0x9fce(%rip), %rcx      # 0xd56e
pushq $0x46
jmp 0x35d4
leaq 0x9f61(%rip), %rdi      # 0xd50c
leaq 0x9f33(%rip), %rsi      # 0xd4e5
leaq 0x9fb5(%rip), %rcx      # 0xd56e
pushq $0x47
jmp 0x35d4
leaq 0x9f91(%rip), %rdi      # 0xd555
leaq 0x9f1a(%rip), %rsi      # 0xd4e5
leaq 0x9f9c(%rip), %rcx      # 0xd56e
pushq $0x48
popq %rdx
callq 0x30e0
// File: /workspace/github_c_makefile_star2_O2/wjmelements[P]evm/tst/dio.c
// Function: test_applyConfig_balance
void test_applyConfig_balance() {
    evmInit();

    const char config[] = "["
        "{"
            "\"address\":\"0x80d9b122dc3a16fdc41f96cf010ffe7e38d227c3\","
            "\"code\":\"0x475f52595ff3\","
            "\"balance\":\"0x1234005678009abc00def0\""
        "}"
    "]";
    applyConfig(config);

    uint64_t gas = 21017;
    address_t from;
    val_t val;
    val[0] = 0;
    val[1] = 0;
    val[2] = 0;
    address_t to = AddressFromHex42("0x80d9b122dc3a16fdc41f96cf010ffe7e38d227c3");
    data_t input;
    input.size = 0;

    result_t result = txCall(from, gas, to, val, input, NULL);
    op_t expected[] = {
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x34, 0x00,
        0x56, 0x78, 0x00, 0x9a, 0xbc, 0x00, 0xde, 0xf0,
    };
    assert(result.returnData.size == sizeof(expected));
    assert(memcmp(expected, result.returnData.content, result.returnData.size) == 0);
    assert(result.gasRemaining == 0);

    evmFinalize();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
xorl %eax, %eax
callq 0x66f5
leaq 0x9b0e(%rip), %rsi      # 0xd100
pushq $0xf
popq %rcx
leaq 0xb0(%rsp), %rax
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
callq 0x39a8
leaq 0x4c(%rsp), %rbx
andq $0x0, (%rbx)
andl $0x0, 0x8(%rbx)
leaq 0x58(%rsp), %r14
movq %r14, %rdi
callq 0x346c
movl 0x10(%r14), %eax
movl %eax, 0x28(%rsp)
movups (%r14), %xmm0
movups %xmm0, 0x18(%rsp)
movl 0x48(%rsp), %eax
movl %eax, 0x10(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x70(%rsp), %r14
movl $0x5219, %esi           # imm = 0x5219
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x6d9d
cmpq $0x20, (%r14)
jne 0x369c
movq 0x78(%rsp), %rsi
leaq 0x9fdd(%rip), %rdi      # 0xd650
pushq $0x20
popq %rdx
callq 0x31c0
testl %eax, %eax
jne 0x36b5
cmpq $0x0, 0xa0(%rsp)
jne 0x36ce
xorl %eax, %eax
callq 0x6a10
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r14
retq
leaq 0x9e17(%rip), %rdi      # 0xd4ba
leaq 0x9e3b(%rip), %rsi      # 0xd4e5
leaq 0x9edd(%rip), %rcx      # 0xd58e
pushq $0x6b
jmp 0x36e5
leaq 0x9e50(%rip), %rdi      # 0xd50c
leaq 0x9e22(%rip), %rsi      # 0xd4e5
leaq 0x9ec4(%rip), %rcx      # 0xd58e
pushq $0x6c
jmp 0x36e5
leaq 0x9e80(%rip), %rdi      # 0xd555
leaq 0x9e09(%rip), %rsi      # 0xd4e5
leaq 0x9eab(%rip), %rcx      # 0xd58e
pushq $0x6d
popq %rdx
callq 0x30e0