LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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, %rbp
movq %rsi, %r14
movq %rdi, %r12
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rbx
movaps %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movslq 0x1c(%rdi), %rsi
movq %rbx, %rdi
callq 0x7740
leaq 0x10(%rsp), %r13
xorps %xmm0, %xmm0
movaps %xmm0, (%r13)
movq $0x0, 0x10(%r13)
movslq 0x1c(%r12), %rsi
movq %r13, %rdi
callq 0x7740
movq 0x8(%rbp), %rax
subq (%rbp), %rax
shrq $0x2, %rax
decl %eax
movq 0x8(%r15), %r10
subq (%r15), %r10
shrq $0x2, %r10
decl %r10d
xorl %r11d, %r11d
xorps %xmm0, %xmm0
movq %r12, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq (%rsp), %rcx
movq %r15, %r8
movq 0x8(%rsp), %r9
pushq %r11
pushq %r10
pushq %r11
pushq %rax
pushq %r11
pushq %r13
pushq %rbx
pushq 0xb8(%rsp)
callq 0x14236
addq $0x40, %rsp
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x141d2
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x141e9
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x14217
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x14217
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1422e
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x3230
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_c_makefile_star2_O1/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 0x14da6
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 0x14d92
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x14e0d
xorl %edx, %edx
movl %r11d, %r10d
movl %r10d, %ebx
subl %edx, %ebx
cmpl $0x1, %ebx
je 0x14e16
movl %r11d, %ebp
shrl $0x1f, %ebp
addl %r11d, %ebp
sarl %ebp
movslq %ebp, %r15
movl %ebp, %r14d
movl %edx, %ebx
cmpl %r9d, (%rdi,%r15,4)
jg 0x14dfc
movl %r10d, %edx
movl %r10d, %r14d
movl %ebp, %ebx
cmpl %r9d, 0x4(%rdi,%r15,4)
jg 0x14e5b
addl %ebp, %edx
movl %edx, %r11d
movl %r14d, %r10d
movl %ebx, %edx
cmpl %ebx, %r14d
jne 0x14dca
jmp 0x14e0f
xorl %ebx, %ebx
movl %ebx, (%rcx)
movslq %ebx, %rcx
jmp 0x14e38
movslq %edx, %r11
cmpl %r9d, (%rdi,%r11,4)
jg 0x14e32
cmpl %r9d, 0x4(%rdi,%r11,4)
jle 0x14e32
leaq (%rdi,%r11,4), %rdi
movl %edx, (%rcx)
shlq $0x2, %r11
jmp 0x14e6a
movl %r10d, (%rcx)
movslq %r10d, %rcx
leaq (,%rcx,4), %r11
addq (%rsi), %r11
leaq (%rdi,%rcx,4), %rdi
movl (%r11), %ecx
addl %r9d, %eax
subl %eax, %ecx
addl (%rdi), %ecx
movl %ecx, (%r8)
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq (%rdi,%r15,4), %rdi
leaq (,%r15,4), %r11
movl %r15d, (%rcx)
addq (%rsi), %r11
jmp 0x14e47
nop
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x38(%rdi), %r14
xorps %xmm2, %xmm2
movups %xmm2, 0x38(%rdi)
movq $0x0, 0x48(%rdi)
movq $-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)
movl $0xa, %esi
movq %r14, %rdi
callq 0x150f4
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
movq (%r14), %rdi
testq %rdi, %rdi
je 0x1509b
movq 0x48(%rbx), %rsi
subq %rdi, %rsi
callq 0x3230
movq %r15, %rdi
callq 0x33e0
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x16bc6
movl %edx, %ecx
movq (%rsi), %rdx
movzbl (%rdx,%rcx), %ecx
cmpl $0x2, %ecx
jb 0x16bc6
cmpb $0x5, %cl
ja 0x16bc1
decl %ecx
jmp 0x16bc4
addl $-0x5, %ecx
movl %ecx, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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, 0x10(%rsp)
movl 0x58(%rsp), %ebx
movl 0x50(%rsp), %ebp
subq $0x8, %rsp
movl %r8d, 0x10(%rsp)
movl %r9d, 0x14(%rsp)
pushq $0x0
pushq %rbx
pushq %rbp
callq 0x17078
addq $0x20, %rsp
testl %eax, %eax
je 0x16cc9
movl %eax, %r13d
movq 0x60(%rsp), %rax
movq (%rax), %rax
movslq %ebp, %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 0x16c49
movl %r13d, %ecx
addl $-0x3, %ecx
addl $-0x3, %eax
orl %ecx, %eax
cmpl $0x1, %eax
ja 0x16ccc
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
cmpl $0x2, %eax
jl 0x16ccc
movl $0x2, %ebx
subl %eax, %ebx
movl $0x1, %ebp
subq $0x8, %rsp
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
movl 0x10(%rsp), %r8d
movl 0x14(%rsp), %r9d
pushq %rbp
movl 0x68(%rsp), %eax
pushq %rax
movl 0x68(%rsp), %eax
pushq %rax
callq 0x17078
addq $0x20, %rsp
testl %eax, %eax
je 0x16cb4
cmpl $0x1, %ebp
sete %dl
leal -0x3(%r13), %ecx
addl $-0x3, %eax
orl %ecx, %eax
cmpl $0x2, %eax
setb %al
xorl %ecx, %ecx
andb %dl, %al
jne 0x16caf
movl %r13d, %ecx
movl %ecx, %r13d
jmp 0x16cb9
xorl %r13d, %r13d
movb $0x1, %al
testb %al, %al
jne 0x16ccc
leal (%rbx,%rbp), %eax
incl %ebp
cmpl $0x1, %eax
jne 0x16c62
jmp 0x16ccc
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x17068
movl %r9d, %r13d
movl %r8d, %ebx
movq %rdx, %r14
movq %rsi, %r15
addq $0x38, %r15
movq %rsp, %rbp
cmpb $0x0, 0x48(%rsp)
je 0x17022
leal (%r12,%rbx), %eax
movl 0x40(%rsp), %ecx
addl %r13d, %ecx
jmp 0x1702e
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 0x11a24
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 0x17068
movl 0x4(%rax,%rcx,8), %r13d
testl %r13d, %r13d
jne 0x1700e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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), %edi
movl 0x10(%rsp), %r10d
movl 0x8(%rsp), %r11d
addl %edi, %r11d
xorl %eax, %eax
testl %esi, %esi
je 0x170ad
addl %r8d, %r11d
js 0x170d0
movl %r11d, %r8d
movq (%rdx), %rdx
movzbl (%rdx,%r8), %edx
cmpl $0x2, %edx
jb 0x170d0
cmpb $0x5, %dl
ja 0x170cb
decl %edx
jmp 0x170ce
subl %r11d, %r8d
js 0x170e1
movl %r8d, %r8d
movq (%rdx), %rdx
movzbl (%rdx,%r8), %edx
cmpl $0x2, %edx
jb 0x170e1
cmpb $0x5, %dl
ja 0x170dc
decl %edx
jmp 0x170df
addl $-0x5, %edx
movl %edx, %eax
addl %r10d, %edi
addl %r9d, %edi
js 0x170f9
movl %edi, %edx
jmp 0x170ec
addl $-0x5, %edx
movl %edx, %eax
addl %edi, %r10d
subl %r10d, %r9d
js 0x170f9
movl %r9d, %edx
movq (%rcx), %rcx
movzbl (%rcx,%rdx), %ecx
cmpq $0x2, %rcx
jae 0x17121
xorl %ecx, %ecx
cltq
leaq (%rax,%rax,4), %rax
leaq 0x97a48(%rip), %rdx     # 0xaeb50
leaq (%rdx,%rax,4), %rax
movl (%rax,%rcx,4), %eax
cmpl $0x1, %esi
jne 0x17120
cltq
leaq 0x97aa3(%rip), %rcx     # 0xaebc0
movl (%rcx,%rax,4), %eax
retq
cmpb $0x5, %cl
ja 0x1712b
decq %rcx
jmp 0x170fb
addq $-0x5, %rcx
jmp 0x170fb
nop
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
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
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x1a0b5
movq %rsi, %r14
movq %rdi, %r12
cmpl $0x1, %ebx
jg 0x1a049
jne 0x1a045
movb (%r12), %al
movb %al, (%r14)
movl %ebx, %eax
jmp 0x1a0b5
movl $0x1, (%rsp)
xorl %r13d, %r13d
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movl %ebx, %ecx
movl $0x100, %r8d            # imm = 0x100
movl $0x1, %r9d
callq 0x18402
testl %eax, %eax
js 0x1a0b5
movl %ebx, %ecx
movb -0x1(%r12,%rcx), %cl
movb %cl, (%r14)
je 0x1a094
movl %eax, %ecx
xorl %r13d, %r13d
movb (%r15,%r13,4), %dl
movb %dl, 0x1(%r14,%r13)
incq %r13
cmpq %r13, %rcx
jne 0x1a083
leal 0x1(%r13), %ecx
cmpl %ebx, %ecx
jge 0x1a0b3
movl %r13d, %ecx
movb 0x4(%r15,%rcx,4), %dl
movb %dl, 0x1(%r14,%rcx)
incq %rcx
leal 0x1(%rcx), %edx
cmpl %ebx, %edx
jl 0x1a09f
incl %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
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
jne 0x1a17f
movq %rsi, %r14
movq %rdi, %r12
cmpl $0x1, %ebx
jg 0x1a119
jne 0x1a115
movl (%r12), %eax
movl %eax, (%r14)
movl %ebx, %eax
jmp 0x1a17f
movl $0x1, (%rsp)
xorl %r13d, %r13d
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movl %ebx, %ecx
movl $0x4, %r9d
callq 0x18402
testl %eax, %eax
js 0x1a17f
movl %ebx, %ecx
movl -0x4(%r12,%rcx,4), %ecx
movl %ecx, (%r14)
je 0x1a15e
movl %eax, %ecx
xorl %r13d, %r13d
movl (%r15,%r13,4), %edx
movl %edx, 0x4(%r14,%r13,4)
incq %r13
cmpq %r13, %rcx
jne 0x1a14d
leal 0x1(%r13), %ecx
cmpl %ebx, %ecx
jge 0x1a17d
movl %r13d, %ecx
movl 0x4(%r15,%rcx,4), %edx
movl %edx, 0x4(%r14,%rcx,4)
incq %rcx
leal 0x1(%rcx), %edx
cmpl %ebx, %edx
jl 0x1a169
incl %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %r14
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
cmpl $0x5, %r8d
je 0x257c
cmpl $0x6, %r8d
jne 0x260c
movq 0x20(%r14), %rdi
leaq 0x1ac5(%rip), %rsi      # 0x4034
callq 0x2190
testl %eax, %eax
jne 0x260c
movq 0x8(%r14), %rdi
callq 0x2290
movl %eax, (%r13)
movq 0x10(%r14), %rdi
callq 0x2290
movl %eax, (%r12)
movq 0x18(%r14), %rdi
callq 0x2290
movl %eax, (%r15)
movq 0x20(%r14), %r15
leaq 0x1ad5(%rip), %rsi      # 0x4082
movq %r15, %rdi
callq 0x2040
testl %eax, %eax
je 0x25f4
leaq 0x1ac7(%rip), %rsi      # 0x4087
movq %r15, %rdi
callq 0x2040
testl %eax, %eax
je 0x25fb
leaq 0x1a61(%rip), %rsi      # 0x4034
movq %r15, %rdi
callq 0x2040
testl %eax, %eax
jne 0x25ec
movq 0x28(%r14), %rdi
callq 0x2290
testl %eax, %eax
jg 0x2600
movq %r14, %rdi
callq 0x2380
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x2600
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x23a7
// File: /workspace/github_c_makefile_star2_O1/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 0x1883(%rip), %rdi      # 0x43a9
callq 0x2070
movups 0x1559(%rip), %xmm0     # 0x408b
movq %rsp, %r14
movaps %xmm0, (%r14)
movups 0x155b(%rip), %xmm0     # 0x409b
movaps %xmm0, 0x10(%r14)
movb $0x0, 0x20(%r14)
leaq 0x155b(%rip), %rsi      # 0x40ac
movq %r14, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x22c0
leaq 0x1560(%rip), %rsi      # 0x40c5
movq %r14, %rdi
movq %r14, %rdx
movq %r13, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x22c0
leaq 0x1551(%rip), %rsi      # 0x40d0
movq %r14, %rdi
movq %r14, %rdx
movq %r15, %rcx
movq %rbp, %r8
xorl %eax, %eax
callq 0x22c0
leaq 0x1545(%rip), %rsi      # 0x40de
movq %r14, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x22c0
leaq 0x154a(%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 0x39eb
leaq 0x16e3(%rip), %r12      # 0x42c4
movq %r12, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2110
movups 0x1513(%rip), %xmm0     # 0x4108
movaps %xmm0, (%r15)
movups 0x1512(%rip), %xmm0     # 0x4112
movups %xmm0, 0xa(%r15)
movq %r15, %rdi
callq 0x20e0
movl %ebx, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x39eb
movq %r12, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2110
movq %r14, %rdi
callq 0x20e0
leaq 0x14ec(%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 0x39eb
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 0x39eb
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_O1/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 0x3a32
movl $0xa0d, %ebp            # imm = 0xA0D
movl (%r14), %eax
xorl %ebp, %eax
movzbl 0x2(%r14), %ecx
orw %ax, %cx
je 0x2ced
movq %rsp, %r14
movl $0x2000, %edx           # imm = 0x2000
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3a32
movl (%rsp), %eax
xorl %ebp, %eax
movzbl 0x2(%rsp), %ecx
orw %ax, %cx
jne 0x2cce
addq $0x2000, %rsp           # imm = 0x2000
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1429(%rip), %rsi      # 0x413a
callq 0x2340
testq %rax, %rax
je 0x2d5d
movq %r14, %rdi
movl $0x3f, %esi
callq 0x2140
testq %rax, %rax
je 0x2d41
movq %rax, %r12
movq %rax, %rsi
incq %rsi
movq %r15, %rdi
callq 0x2060
movq %r12, %r15
movb $0x0, (%r15)
leaq 0x13f2(%rip), %rsi      # 0x413e
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x22c0
jmp 0x2da7
movb $0x0, (%r15)
leaq 0x13d6(%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 0x2da7
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_O1/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 0x1383(%rip), %rsi      # 0x4146
callq 0x2340
testq %rax, %rax
je 0x2de2
movabsq $0x6d74682f74786574, %rax # imm = 0x6D74682F74786574
movq %rax, (%rbx)
movw $0x6c, 0x8(%rbx)
jmp 0x2e49
leaq 0x136d(%rip), %rsi      # 0x4156
movq %r14, %rdi
callq 0x2340
testq %rax, %rax
je 0x2e0b
movabsq $0x69672f6567616d69, %rax # imm = 0x69672F6567616D69
movq %rax, (%rbx)
movw $0x66, 0x8(%rbx)
jmp 0x2e49
leaq 0x1353(%rip), %rsi      # 0x4165
movq %r14, %rdi
callq 0x2340
testq %rax, %rax
je 0x2e35
movabsq $0x706a2f6567616d69, %rax # imm = 0x706A2F6567616D69
movq %rax, (%rbx)
movl $0x676570, 0x7(%rbx)    # imm = 0x676570
jmp 0x2e49
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_O1/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 0x12fc(%rip), %xmm0     # 0x4180
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
movw $0xa, 0x10(%r15)
leaq 0x12f7(%rip), %rsi      # 0x4192
movq %r15, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x22c0
leaq 0x1300(%rip), %rsi      # 0x41af
movq %r15, %rdi
movq %r15, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x22c0
subl %ebx, %r13d
leaq 0x1301(%rip), %rsi      # 0x41ca
movq %r15, %rdi
movq %r15, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0x22c0
movl (%r12), %ecx
leaq 0x1301(%rip), %rsi      # 0x41e5
movq %r15, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x22c0
movl 0x4(%r12), %ecx
leaq 0x1300(%rip), %rsi      # 0x41fd
movq %r15, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x22c0
movl 0x8(%r12), %ecx
leaq 0x1302(%rip), %rsi      # 0x4218
movq %r15, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x22c0
movl 0xc(%r12), %ecx
leaq 0x1305(%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 0x39eb
callq 0x3571
testl %eax, %eax
jne 0x2f92
leaq 0x12f0(%rip), %rdi      # 0x4251
movq %r14, %rsi
movl $0x1, %edx
callq 0x3559
movl %ebp, %edi
movl $0x1, %esi
callq 0x364e
movq 0x405f(%rip), %rax      # 0x6fe0
movq (%rax), %rdx
leaq 0x8(%rsp), %rsi
movq (%rsp), %rdi
callq 0x3589
xorl %edi, %edi
callq 0x35a1
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xea8(%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 0x2cf9
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3666
movq 0x30(%r14), %rax
addq $0xc098, %rsp           # imm = 0xC098
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x115d
movq 0x8(%rsi), %rdx
leaq 0xeb3(%rip), %rsi       # 0x2004
movq %rsp, %rdi
xorl %eax, %eax
callq 0x1070
jmp 0x1170
movups 0xeb3(%rip), %xmm0      # 0x2017
movaps %xmm0, (%rsp)
movl $0x746174, 0x10(%rsp)   # imm = 0x746174
movl $0x4d2, %edi            # imm = 0x4D2
callq 0x1080
movq %rsp, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x1110
leaq 0xe9e(%rip), %rdi       # 0x202b
cmpl $0x3, %eax
jl 0x1257
movl %eax, %ebp
pushq $0x1
popq %r13
leaq 0x200(%rsp), %r14
leaq 0xe8a(%rip), %r15       # 0x2035
movq %rsp, %r12
movl $0x1000, %edx           # imm = 0x1000
movl %ebp, %edi
movq %r14, %rsi
callq 0x1060
cmpl $-0x1, %eax
je 0x1250
movl %ebp, %edi
callq 0x1030
movq %r14, %rdi
movq %r15, %rsi
callq 0x10b0
testq %rax, %rax
je 0x1226
xorl %ebx, %ebx
movl %ebx, %ecx
andl $0x7ffffffb, %ecx       # imm = 0x7FFFFFFB
cmpl $0x2, %ecx
jne 0x1204
movq %rax, %rdi
callq 0x1090
movl %eax, %ebp
subl %r13d, %eax
cmpl $0x400, %eax            # imm = 0x400
jg 0x1217
testl %eax, %eax
jg 0x121c
xorl %edi, %edi
movq %r15, %rsi
callq 0x10b0
incl %ebx
testq %rax, %rax
jne 0x11df
jmp 0x1226
pushq $0x1
popq %rdi
jmp 0x121e
xorl %edi, %edi
callq 0x13bc
movl %ebp, %r13d
movl $0x4d2, %edi            # imm = 0x4D2
callq 0x1080
movq %r12, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x1110
movl %eax, %ebp
cmpl $0x2, %eax
jg 0x11ae
leaq 0xddd(%rip), %rdi       # 0x202b
jmp 0x1257
leaq 0xdd9(%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_O1/floriangit[P]hdd_sound/disk.c
// Function: play
static int play(int mode) 
{
    int r = rand() % 2;
    static const pa_sample_spec ss = {
        .format = PA_SAMPLE_S16LE,
        .rate = 48000,
        .channels = 1
    };

    static pa_buffer_attr ba = {
	.maxlength = -1,
	.tlength = -1,
	.prebuf = -1,
	.minreq = -1,
	.fragsize = -1,
    };
 
    pa_simple *s = NULL;
    int ret = 1;
    int error;

    /* Create a new playback stream */
    if (!(s = pa_simple_new(NULL, "unused", PA_STREAM_PLAYBACK, NULL, "playback", &ss, NULL, &ba, &error))) {
        fprintf(stderr, __FILE__": pa_simple_new() failed: %s\n", pa_strerror(error));
        goto finish;
    }
 
    switch(mode) {
        int ret;
        case SHORT:
	    if(r) {
	        ret = pa_simple_write(s, (out_short_clean_wav + WAV_HEADER_LEN), out_short_clean_wav_len - WAV_HEADER_LEN, &error);
	    } else {
	        ret = pa_simple_write(s, (out2_short_clean_wav + WAV_HEADER_LEN), out2_short_clean_wav_len - WAV_HEADER_LEN, &error);
	    }
            break;
        case MEDIUM:
	    if(r) {
	        ret = pa_simple_write(s, (out_clean_wav + WAV_HEADER_LEN), out_clean_wav_len - WAV_HEADER_LEN, &error);
	    } else {
	        ret = pa_simple_write(s, (out_clean2_wav + WAV_HEADER_LEN), out_clean2_wav_len - WAV_HEADER_LEN, &error);
	    }
            break;
        default:
            break;
	if(ret < 0) {
            fprintf(stderr, __FILE__": pa_simple_write() failed: %s\n", pa_strerror(error));
            goto finish;
	}

    }
 
    /* Make sure that every single sample was played */
    if (pa_simple_drain(s, &error) < 0) {
        fprintf(stderr, __FILE__": pa_simple_drain() failed: %s\n", pa_strerror(error));
        goto finish;
    }
 
    ret = 0;
 
finish:
    if (s)
        pa_simple_free(s);
 
    return ret;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebp
callq 0x10f0
movl %eax, %r14d
subq $0x8, %rsp
leaq 0x14(%rsp), %rax
leaq 0x29fd6(%rip), %r10     # 0x2b3b4
leaq 0xc52(%rip), %rsi       # 0x2037
leaq 0xc52(%rip), %r8        # 0x203e
leaq 0xca1(%rip), %r9        # 0x2094
xorl %edi, %edi
movl $0x1, %edx
xorl %ecx, %ecx
pushq %rax
pushq %r10
pushq $0x0
callq 0x1050
addq $0x20, %rsp
movq %rax, %rbx
testq %rax, %rax
je 0x14a6
testb $0x1, %r14b
leaq 0x87bb(%rip), %rax      # 0x9bdc
leaq 0x2ca4(%rip), %rcx      # 0x40cc
cmoveq %rax, %rcx
leaq 0x20d19(%rip), %rax     # 0x2214c
leaq 0xc802(%rip), %rsi      # 0xdc3c
cmoveq %rax, %rsi
leaq 0xc7bb(%rip), %rax      # 0xdc00
leaq 0x8754(%rip), %rdx      # 0x9ba0
cmoveq %rax, %rdx
leaq 0x29f59(%rip), %rax     # 0x2b3b0
leaq 0x20cb2(%rip), %rdi     # 0x22110
cmoveq %rax, %rdi
testl %ebp, %ebp
cmoveq %rcx, %rsi
cmoveq %rdx, %rdi
movl (%rdi), %edx
addl $-0x2c, %edx
leaq 0xc(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rcx
callq 0x10a0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10c0
testl %eax, %eax
js 0x14b2
testq %rbx, %rbx
je 0x149d
movq %rbx, %rdi
callq 0x1040
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xc(%rsp), %rdi
callq 0x1299
jmp 0x1490
leaq 0xc(%rsp), %rdi
callq 0x1271
jmp 0x1490
// File: /workspace/github_c_makefile_star2_O1/openshmem-org[P]openshmem-examples/c/iget.c
// Function: main
int
main()
{
    static short source[10] = {
        1, 2, 3, 4, 5,
        6, 7, 8, 9, 10
    };
    short target[10];
    int i;
    int me;

    for (i = 0; i < 10; i += 1) {
        target[i] = 666;
    }

    shmem_init();
    me = shmem_my_pe();

    if (me == 1) {
        shmem_short_iget(target, source, 2, 1, 4, 0);
    }

    shmem_barrier_all();        /* sync sender and receiver */

    if (me == 1) {
        for (i = 0; i < 10; i += 1) {
            printf("PE %d: target[%d] = %hd, source[%d] = %hd\n",
                   me, i, target[i], i, source[i]);
        }
    }

    shmem_barrier_all();        /* sync before exiting */

    shmem_finalize();

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movdqa 0xe73(%rip), %xmm0      # 0x2010
movl $0x1, %eax
movdqa 0xe76(%rip), %xmm1      # 0x2020
movdqa 0xe7e(%rip), %xmm2      # 0x2030
pshufd $0xf5, %xmm2, %xmm3     # xmm3 = xmm2[1,1,3,3]
movdqa 0xe81(%rip), %xmm4      # 0x2040
movdqa %xmm0, %xmm5
pxor %xmm1, %xmm5
movdqa %xmm2, %xmm6
pcmpgtd %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm5     # xmm5 = xmm5[1,1,3,3]
pcmpeqd %xmm3, %xmm5
pand %xmm6, %xmm5
movd %xmm5, %ecx
testb $0x1, %cl
je 0x11ec
movw $0x29a, -0x2(%rsp,%rax,2) # imm = 0x29A
pextrw $0x4, %xmm5, %ecx
testb $0x1, %cl
je 0x11fc
movw $0x29a, (%rsp,%rax,2)   # imm = 0x29A
paddq %xmm4, %xmm0
addq $0x2, %rax
cmpq $0xb, %rax
jne 0x11bf
callq 0x1070
callq 0x1050
cmpl $0x1, %eax
jne 0x127a
leaq 0x2e40(%rip), %rbx      # 0x4060
movq %rsp, %rdi
movl $0x2, %edx
movl $0x1, %ecx
movl $0x4, %r8d
movq %rbx, %rsi
xorl %r9d, %r9d
callq 0x1080
callq 0x1060
leaq 0xe06(%rip), %r14       # 0x2050
xorl %r15d, %r15d
movswl (%rsp,%r15,2), %ecx
movswl (%rbx), %r9d
movq %r14, %rdi
movl $0x1, %esi
movl %r15d, %edx
movl %r15d, %r8d
xorl %eax, %eax
callq 0x1030
incq %r15
addq $0x2, %rbx
cmpq $0xa, %r15
jne 0x124d
jmp 0x127f
callq 0x1060
callq 0x1060
callq 0x1040
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1291
movq 0x8(%rsi), %rdi
callq 0x10a0
movslq %eax, %r14
movq %r14, %rdi
callq 0x1070
testq %rax, %rax
je 0x1283
movq %rax, %r15
leaq 0xe19(%rip), %rdi       # 0x201d
xorl %ebx, %ebx
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1040
movq %r15, %rdi
callq 0x1030
movl $0x2, %edi
movq %r14, %rsi
callq 0x1050
testq %rax, %rax
je 0x1283
movq %rax, %r15
leaq 0xdff(%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 0xdf5(%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 0xd8c(%rip), %rdi       # 0x2016
callq 0x1090
jmp 0x1299
movq %rsi, %rdi
callq 0x10c0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x1275
// File: /workspace/github_c_makefile_star2_O1/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 0xbba7(%rip), %rdi      # 0x105ee
callq 0x4a74
callq 0x40bc
callq 0x429f
callq 0x448e
callq 0x467b
movl $0x2, %edi
callq 0x3120
callq 0x485a
xorl %eax, %eax
popq %rcx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.6/critical-section.c
// Function: process_transaction
void* process_transaction(void* thread_args){
	struct transaction tr = *((struct transaction*)thread_args);

	int old_cancel_state;

	if(account_balances[tr.from_acct] < tr.dollars)
		return (void*)1;

	/* Begin critical section */

	pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_cancel_state);

	/* Move the money */

	account_balances[tr.to_acct] += tr.dollars;
	account_balances[tr.from_acct] -= tr.dollars;

	/* End critical section */

	pthread_setcancelstate(old_cancel_state, NULL);

	return (void*)0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movslq (%rdi), %r14
movss 0x8(%rdi), %xmm0
leaq 0x2eb6(%rip), %r15      # 0x4060
movl $0x1, %ebx
ucomiss (%r15,%r14,4), %xmm0
ja 0x1200
movslq 0x4(%rdi), %r12
leaq -0x28(%rbp), %rbx
movl $0x1, %edi
movq %rbx, %rsi
movss %xmm0, -0x24(%rbp)
callq 0x1040
movss (%r15,%r12,4), %xmm0
movss -0x24(%rbp), %xmm1
addss %xmm1, %xmm0
movss %xmm0, (%r15,%r12,4)
movss (%r15,%r14,4), %xmm0
subss %xmm1, %xmm0
movss %xmm0, (%r15,%r14,4)
movl (%rbx), %edi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x1040
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.6/critical-section.c
// Function: main
int main(){

	struct transaction transactions[] = {	{0, 1, 250.65},
											{7, 6, 150.25},
											{2, 9, 350.67},
											{5, 3, 150.77},
											{4, 1, 250.00}};

	int i;

	pthread_t threads_id[num_transactions];

	printf("Account balances before transactions\n");

	for(i = 0; i < num_accounts; ++i)
		printf("%d: %.2f\n", i, account_balances[i]);

	for(i = 0; i < num_transactions; ++i)
		pthread_create(&threads_id[i], NULL, &process_transaction, &transactions[i]);

	/* To demonstrate that threads are uncancelable */
	for(i = 0; i < num_transactions; ++i)
		pthread_cancel(threads_id[i]);

	for(i = 0; i < num_transactions; ++i)
		pthread_join(threads_id[i], NULL);

	printf("\nAccount balances before transactions\n");

	for(i = 0; i < num_accounts; ++i)
		printf("%d: %.2f\n", i, account_balances[i]);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rsp, %r15
movups 0xe23(%rip), %xmm0      # 0x204c
movups %xmm0, -0x34(%rbp)
movaps 0xe0c(%rip), %xmm0      # 0x2040
movaps %xmm0, -0x40(%rbp)
movaps 0xdf1(%rip), %xmm0      # 0x2030
movaps %xmm0, -0x50(%rbp)
movaps 0xdd6(%rip), %xmm0      # 0x2020
movaps %xmm0, -0x60(%rbp)
leaq 0xe12(%rip), %rdi       # 0x2067
callq 0x1030
leaq 0x2dff(%rip), %r12      # 0x4060
xorl %ebx, %ebx
leaq 0xdf2(%rip), %r14       # 0x205c
xorps %xmm0, %xmm0
cvtss2sd (%r12), %xmm0
movq %r14, %rdi
movl %ebx, %esi
movb $0x1, %al
callq 0x1050
incq %rbx
addq $0x4, %r12
cmpq $0xa, %rbx
jne 0x126a
leaq -0x90(%rbp), %rbx
xorl %r12d, %r12d
leaq -0x111(%rip), %r14      # 0x118c
leaq (%r12,%rbp), %rcx
addq $-0x60, %rcx
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x1060
addq $0xc, %r12
addq $0x8, %rbx
cmpq $0x3c, %r12
jne 0x129d
xorl %ebx, %ebx
movq -0x90(%rbp,%rbx,8), %rdi
callq 0x1080
incq %rbx
cmpq $0x5, %rbx
jne 0x12c2
xorl %ebx, %ebx
movq -0x90(%rbp,%rbx,8), %rdi
xorl %esi, %esi
callq 0x1070
incq %rbx
cmpq $0x5, %rbx
jne 0x12da
leaq 0xd6d(%rip), %rdi       # 0x2066
callq 0x1030
leaq 0x2d5b(%rip), %r12      # 0x4060
xorl %ebx, %ebx
leaq 0xd4e(%rip), %r14       # 0x205c
xorps %xmm0, %xmm0
cvtss2sd (%r12), %xmm0
movq %r14, %rdi
movl %ebx, %esi
movb $0x1, %al
callq 0x1050
incq %rbx
addq $0x4, %r12
cmpq $0xa, %rbx
jne 0x130e
movq %r15, %rsp
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1270
incq %r14
addq $0x8, %r15
cmpq $0x7, %r14
jne 0x124e
movl $0x7, %r14d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x6, %r14d
ja 0x1288
movl %r14d, %eax
leaq 0x2deb(%rip), %rcx      # 0x4070
movl (%rcx,%rax,4), %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x12ad
cmpl $0x4, %r14d
jne 0x1356
movq 0x8(%rbx), %r15
movq %r15, %rdi
callq 0x123c
testl %eax, %eax
js 0x1330
movl %eax, %ebp
cmpl $0x4, %r14d
jne 0x12f5
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 0x1360
leaq 0x8(%rsp), %rsi
movl %ebp, %edi
callq 0x10b0
testl %eax, %eax
jne 0x134d
movq 0x8(%rbx), %rsi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
leaq 0xdb8(%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 0x2cc1(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xd68(%rip), %rsi       # 0x20a9
movq %r15, %rdx
xorl %eax, %eax
callq 0x1060
jmp 0x136c
leaq 0xd74(%rip), %rdi       # 0x20c8
jmp 0x1367
movq %rbx, %rdi
callq 0x10d0
jmp 0x136c
leaq 0xd57(%rip), %rdi       # 0x20be
callq 0x1080
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x1323
// File: /workspace/github_c_makefile_star2_O1/unixlab[P]cloudflare-udp-ping/udpserver.c
// Function: state_init
struct state *state_init(struct state *s)
{
	struct msghdr *msg = &s->msg;

	msg->msg_name = &s->src_addr;
	msg->msg_namelen = sizeof(s->src_addr);
	msg->msg_iov = &s->iovec;
	msg->msg_iovlen = 1;
	msg->msg_control = &s->pktinfo[0];
	msg->msg_controllen = sizeof(s->pktinfo);

	s->iovec.iov_base = &s->buffer[0];
	s->iovec.iov_len = MTU_SIZE;
	return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
leaq 0x8(%rdi), %rcx
movq %rcx, 0x28(%rdi)
movl $0x1c, 0x30(%rdi)
leaq 0x7e0(%rdi), %rcx
movq %rcx, 0x38(%rdi)
movq $0x1, 0x40(%rdi)
leaq 0x7f0(%rdi), %rcx
movq %rcx, 0x48(%rdi)
movq $0x1000, 0x50(%rdi)     # imm = 0x1000
leaq 0x60(%rdi), %rcx
movq %rcx, 0x7e0(%rdi)
movq $0x780, 0x7e8(%rdi) # imm = 0x780
popq %rbp
retq