LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/IlyaSamoylov45[P]MapReduce-Project/main.cpp
// Function: assignJobs(int, int)
std::vector<std::vector<int>> assignJobs(int reduces, int maps){
  std::vector<std::vector<int>> result;
  int amount = maps / reduces;
  int leftOver = maps % reduces;
  int counter = 0;

  for(int i = 0; i < reduces; i++){
    std::vector<int> currentReduce;
    for(int j = 0; j < amount; j++){
      currentReduce.push_back(counter);
      counter++;
    }
    result.push_back(currentReduce);
  }
  for(int i = 0; i < leftOver; i++){
    result[i].push_back(counter);
    counter++;
  }
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %eax
movl %esi, %ebx
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
movq %rdi, -0x38(%rbp)
movups %xmm0, (%rdi)
cltd
idivl %esi
movq %rdx, -0x48(%rbp)
leaq -0x2c(%rbp), %r13
andl $0x0, (%r13)
xorl %r14d, %r14d
testl %eax, %eax
cmovlel %r14d, %eax
movl %eax, -0x3c(%rbp)
testl %esi, %esi
cmovlel %r14d, %ebx
leaq -0x60(%rbp), %r15
cmpl %ebx, %r14d
je 0x4f57
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
andq $0x0, -0x50(%rbp)
movl -0x3c(%rbp), %r12d
subl $0x1, %r12d
jb 0x4f3e
movq %r15, %rdi
movq %r13, %rsi
callq 0x61ae
incl -0x2c(%rbp)
jmp 0x4f28
movq -0x38(%rbp), %rdi
movq %r15, %rsi
callq 0x61d4
movq %r15, %rdi
callq 0x74e8
incl %r14d
jmp 0x4f13
xorl %r15d, %r15d
movq -0x48(%rbp), %rax
testl %eax, %eax
cmovlel %r15d, %eax
imulq $0x18, %rax, %r12
leaq -0x2c(%rbp), %r14
cmpq %r15, %r12
je 0x4f8c
movq -0x38(%rbp), %rax
movq (%rax), %rdi
addq %r15, %rdi
movq %r14, %rsi
callq 0x61ae
incl -0x2c(%rbp)
addq $0x18, %r15
jmp 0x4f6c
movq -0x38(%rbp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4fa6
movq %rax, %r14
jmp 0x4fb2
movq %rax, %r14
leaq -0x60(%rbp), %rdi
callq 0x74e8
movq -0x38(%rbp), %rdi
callq 0x6182
movq %r14, %rdi
callq 0x34e0
// File: /workspace/github_cpp_makefile_star2_O2/IlyaSamoylov45[P]MapReduce-Project/main.cpp
// Function: split_string_by_space(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::vector<std::string> split_string_by_space(std::string input){
  std::string buf;
  std::stringstream ss(input);

  std::vector<std::string> words;
  while(ss >> buf)
    words.push_back(buf);

  return words;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, %rbx
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x1c0(%rbp), %rdi
pushq $0x18
popq %rdx
callq 0x3440
andq $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq -0x1c0(%rbp), %r14
leaq -0x38(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3340
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x51f8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x662a
jmp 0x51d2
leaq -0x1c0(%rbp), %rdi
callq 0x3210
leaq -0x38(%rbp), %rdi
callq 0x3120
movq %rbx, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x523a
movq %rax, %r14
movq %rbx, %rdi
callq 0x5fd4
leaq -0x1c0(%rbp), %rdi
callq 0x3210
leaq -0x38(%rbp), %rdi
callq 0x3120
movq %r14, %rdi
callq 0x34e0
// File: /workspace/github_cpp_makefile_star2_O2/IlyaSamoylov45[P]MapReduce-Project/main.cpp
// Function: count_words(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int count_words(std::string file){
  int count = 0;
  std::string word;
  std::ifstream infile(file.c_str());
  while(infile >> word) {
    std::replace( word.begin(), word.end(), '-', ' ');
    std::replace( word.begin(), word.end(), ';', ' ');
    std::replace( word.begin(), word.end(), '.', ' ');
    std::replace( word.begin(), word.end(), ':', ' ');
    std::replace( word.begin(), word.end(), '!', ' ');
    std::replace( word.begin(), word.end(), ')', ' ');
    std::replace( word.begin(), word.end(), ',', ' ');
    //std::replace( word.begin(), word.end(), ';', ' ');
    //word.erase(std::remove_if(word.begin(), word.end(), remove_char), word.end());
    if(word != ""){
      count++;
    }

    //std::cout << "word is: " << word << " " << count << "\n";
  }
  return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq (%rdi), %rsi
leaq -0x258(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x3510
xorl %ebx, %ebx
leaq -0x50(%rbp), %r15
movb $0x20, %r14b
leaq -0x2a(%rbp), %r12
leaq -0x29(%rbp), %r13
leaq -0x258(%rbp), %rdi
movq %r15, %rsi
callq 0x3340
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x539e
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
addq %rdi, %rsi
movb $0x2d, -0x2a(%rbp)
movb %r14b, -0x29(%rbp)
movq %r12, %rdx
movq %r13, %rcx
callq 0x6349
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
addq %rdi, %rsi
movb $0x3b, -0x2a(%rbp)
movb %r14b, -0x29(%rbp)
movq %r12, %rdx
movq %r13, %rcx
callq 0x6349
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
addq %rdi, %rsi
movb $0x2e, -0x2a(%rbp)
movb %r14b, -0x29(%rbp)
movq %r12, %rdx
movq %r13, %rcx
callq 0x6349
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
addq %rdi, %rsi
movb $0x3a, -0x2a(%rbp)
movb %r14b, -0x29(%rbp)
movq %r12, %rdx
movq %r13, %rcx
callq 0x6349
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
addq %rdi, %rsi
movb $0x21, -0x2a(%rbp)
movb %r14b, -0x29(%rbp)
movq %r12, %rdx
movq %r13, %rcx
callq 0x6349
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
addq %rdi, %rsi
movb $0x29, -0x2a(%rbp)
movb %r14b, -0x29(%rbp)
movq %r12, %rdx
movq %r13, %rcx
callq 0x6349
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
addq %rdi, %rsi
movb $0x2c, -0x2a(%rbp)
movb %r14b, -0x29(%rbp)
movq %r12, %rdx
movq %r13, %rcx
callq 0x6349
movq %r15, %rdi
leaq 0xcc92(%rip), %rsi      # 0x12021
callq 0x6363
movzbl %al, %eax
addl %eax, %ebx
jmp 0x5292
leaq -0x258(%rbp), %rdi
callq 0x3070
leaq -0x50(%rbp), %rdi
callq 0x3120
movl %ebx, %eax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x53db
movq %rax, %rbx
leaq -0x258(%rbp), %rdi
callq 0x3070
leaq -0x50(%rbp), %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x34e0
// File: /workspace/github_cpp_makefile_star2_O2/IlyaSamoylov45[P]MapReduce-Project/main.cpp
// Function: red_proc()
void *red_proc(){
    managed_shared_memory segment(open_or_create, "shared_memory", SHAREDMEMSIZE);
    typedef std::string KeyType;
    typedef int MappedType;
    typedef std::pair<const std::string, int> ValueType;
    typedef allocator<ValueType, managed_shared_memory::segment_manager> ShmemAllocator;
    typedef map<KeyType, MappedType, std::less<KeyType>, ShmemAllocator> MySHMMap;
    ShmemAllocator alloc_inst (segment.get_segment_manager());
    MySHMMap :: iterator iter;
    offset_ptr<MySHMMap> m_pmap = segment.find<MySHMMap>("MySHMMapName").first;
    for(iter=m_pmap->begin(); iter!=m_pmap->end();iter++)
    {
	//std::cout<< iter->second << std::endl;
	//std::cout<< iter->first << std::endl;
    }
 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
leaq -0x40(%rbp), %rbx
movl $0x1a4, (%rbx)          # imm = 0x1A4
leaq 0xc74e(%rip), %rsi      # 0x12190
leaq -0x68(%rbp), %r14
movl $0xa0000, %edx          # imm = 0xA0000
movq %r14, %rdi
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x64a0
movq (%r14), %rax
movq %rax, %rcx
subq %rbx, %rcx
testq %rax, %rax
pushq $0x1
popq %r12
cmoveq %r12, %rcx
movq %rcx, (%rbx)
leaq 0xc755(%rip), %rsi      # 0x121cb
movq %r14, %rdi
callq 0x64f2
leaq -0x30(%rbp), %r15
movq %rax, %rcx
subq %r15, %rcx
testq %rax, %rax
cmoveq %r12, %rcx
movq %rcx, (%r15)
leaq (%rcx,%r15), %rax
xorl %esi, %esi
cmpq $0x1, %rcx
cmovneq %rax, %rsi
leaq -0x28(%rbp), %rdi
callq 0x6508
leaq -0x28(%rbp), %rbx
movq (%rbx), %rax
leaq -0x38(%rbp), %r14
movq %r14, %rcx
negq %rcx
xorl %edx, %edx
cmpq $0x1, %rax
leaq -0x28(%rbp,%rcx), %rcx
cmovneq %rcx, %rdx
addq %rax, %rdx
movq %rdx, (%r14)
movq -0x30(%rbp), %rax
leaq (%rax,%r15), %rcx
cmpq $0x1, %rax
movl $0x0, %esi
cmovneq %rcx, %rsi
movq %rbx, %rdi
callq 0x654a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x653d
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x6580
jmp 0x5acf
jmp 0x5b0a
jmp 0x5b0a
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x6482
movq %rbx, %rdi
callq 0x34e0
// File: /workspace/github_cpp_makefile_star2_O2/IlyaSamoylov45[P]MapReduce-Project/main.cpp
// Function: check_values(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void check_values(std::string value, std::string correct){
  if(value.compare(correct) != 0){
    std::cout << "\n" << "Usage is: --app [wordcount, sort] --impl [procs, threads] --maps num_maps --reduces num_reduces --input infile --output outfile" << std::endl;
    std::cout << "Error was in the argument " << correct << std::endl;
    std::cout << "You wrote: " << value << "\n" << std::endl;
    exit(EXIT_FAILURE);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
callq 0x3030
testl %eax, %eax
jne 0x5b41
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x19480(%rip), %r12     # 0x1efc8
leaq 0xc4d1(%rip), %r14      # 0x12020
movq %r12, %rdi
movq %r14, %rsi
callq 0x32b0
leaq 0xc677(%rip), %rsi      # 0x121d8
movq %rax, %rdi
callq 0x32b0
movq %rax, %rdi
callq 0x3150
leaq 0xc6e0(%rip), %rsi      # 0x12258
movq %r12, %rdi
callq 0x32b0
movq %rax, %rdi
movq %r15, %rsi
callq 0x3260
movq %rax, %rdi
callq 0x3150
leaq 0xc701(%rip), %rsi      # 0x1229b
movq %r12, %rdi
callq 0x32b0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3260
movq %rax, %rdi
movq %r14, %rsi
callq 0x32b0
movq %rax, %rdi
callq 0x3150
pushq $0x1
popq %rdi
callq 0x3310
// File: /workspace/github_cpp_makefile_star2_O2/IlyaSamoylov45[P]MapReduce-Project/main.cpp
// Function: real_int(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void real_int(std::string num, std::string correct){
  try {
    int test = std::stoi(num);
    if(test <= 0){
      std::cout << "\n" << "Usage is: --app [wordcount, sort] --impl [procs, threads] --maps num_maps --reduces num_reduces --input infile --output outfile" << std::endl;
      std::cout << "Error was in the argument " << correct << std::endl;
      std::cout << "Not a nonnegative digit greater than 0! You wrote: " << test << "\n" << std::endl;
      exit(EXIT_FAILURE);
    }
  }
  catch(std::exception const & e){
    std::cout << "\n" << "Usage is: --app [wordcount, sort] --impl [procs, threads] --maps num_maps --reduces num_reduces --input infile --output outfile" << std::endl;
    std::cout << "Error was in the argument " << correct << std::endl;
    std::cout << "Error was: " << e.what() << std::endl;
    std::cout << "Not a nonnegative digit greater than 0! You wrote: " << num << "\n" << std::endl;
    exit(EXIT_FAILURE);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x5efb
movl %eax, %r15d
testl %eax, %eax
jle 0x5bf4
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x193cd(%rip), %rdi     # 0x1efc8
leaq 0xc41e(%rip), %rsi      # 0x12020
callq 0x32b0
leaq 0xc5ca(%rip), %rsi      # 0x121d8
movq %rax, %rdi
callq 0x32b0
movq %rax, %rdi
callq 0x3150
movq 0x193a3(%rip), %rdi     # 0x1efc8
leaq 0xc62c(%rip), %rsi      # 0x12258
callq 0x32b0
movq %rax, %rdi
movq %r14, %rsi
callq 0x3260
movq %rax, %rdi
callq 0x3150
movq 0x1937d(%rip), %rdi     # 0x1efc8
leaq 0xc621(%rip), %rsi      # 0x12273
callq 0x32b0
movq %rax, %rdi
movl %r15d, %esi
callq 0x34d0
leaq 0xc3b7(%rip), %rsi      # 0x12020
movq %rax, %rdi
callq 0x32b0
movq %rax, %rdi
callq 0x3150
pushq $0x1
popq %rdi
callq 0x3310
movq %rax, %r15
cmpl $0x1, %edx
jne 0x5d5c
movq %r15, %rdi
callq 0x30f0
movq %rax, %r15
movq 0x19329(%rip), %rdi     # 0x1efc8
leaq 0xc37a(%rip), %rsi      # 0x12020
callq 0x32b0
leaq 0xc526(%rip), %rsi      # 0x121d8
movq %rax, %rdi
callq 0x32b0
movq %rax, %rdi
callq 0x3150
movq 0x192ff(%rip), %rdi     # 0x1efc8
leaq 0xc588(%rip), %rsi      # 0x12258
callq 0x32b0
movq %rax, %rdi
movq %r14, %rsi
callq 0x3260
movq %rax, %rdi
callq 0x3150
movq 0x192d9(%rip), %rdi     # 0x1efc8
leaq 0xc5b1(%rip), %rsi      # 0x122a7
callq 0x32b0
movq %rax, %r14
movq (%r15), %rax
movq %r15, %rdi
callq *0x10(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x32b0
movq %rax, %rdi
callq 0x3150
movq 0x192a7(%rip), %rdi     # 0x1efc8
leaq 0xc54b(%rip), %rsi      # 0x12273
callq 0x32b0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3260
leaq 0xc2e1(%rip), %rsi      # 0x12020
movq %rax, %rdi
callq 0x32b0
movq %rax, %rdi
callq 0x3150
jmp 0x5c79
movq %rax, %r15
callq 0x3470
movq %r15, %rdi
callq 0x34e0
movq %rax, %rdi
callq 0x661b
// File: /workspace/github_cpp_makefile_star2_O2/IlyaSamoylov45[P]MapReduce-Project/main.cpp
// Function: check_file(char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void check_file(char* filename, std::string correct){
  struct stat test;
  if (stat(filename, &test) != 0) {
    std::cout << "\n" << "Usage is: --app [wordcount, sort] --impl [procs, threads] --maps num_maps --reduces num_reduces --input infile --output outfile" << std::endl;
    std::cout << "Error was in the argument " << correct << std::endl;
    std::cout << "Error was:" << strerror(errno) << std::endl;
    std::cout << "You wrote: " << filename << "\n" << std::endl;
    exit(EXIT_FAILURE);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rsi, %r12
movq %rdi, %rbx
leaq -0xb0(%rbp), %rsi
callq 0x3280
testl %eax, %eax
jne 0x5da4
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x1921d(%rip), %r15     # 0x1efc8
leaq 0xc26e(%rip), %r14      # 0x12020
movq %r15, %rdi
movq %r14, %rsi
callq 0x32b0
leaq 0xc414(%rip), %rsi      # 0x121d8
movq %rax, %rdi
callq 0x32b0
movq %rax, %rdi
callq 0x3150
leaq 0xc47d(%rip), %rsi      # 0x12258
movq %r15, %rdi
callq 0x32b0
movq %rax, %rdi
movq %r12, %rsi
callq 0x3260
movq %rax, %rdi
callq 0x3150
leaq 0xc5a8(%rip), %rsi      # 0x123a5
movq %r15, %rdi
callq 0x32b0
movq %rax, %r12
callq 0x3040
movl (%rax), %edi
callq 0x30c0
movq %r12, %rdi
movq %rax, %rsi
callq 0x32b0
movq %rax, %rdi
callq 0x3150
leaq 0xc46d(%rip), %rsi      # 0x1229b
movq %r15, %rdi
callq 0x32b0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x32b0
movq %rax, %rdi
movq %r14, %rsi
callq 0x32b0
movq %rax, %rdi
callq 0x3150
pushq $0x1
popq %rdi
callq 0x3310
// File: /workspace/github_cpp_makefile_star2_O2/aman-agrawal[P]Terminal-based-file-explorer/cursor_handle.cpp
// Function: cursor_handle(int&, int&)
int cursor_handle(int &x, int &y)
{
	printf("\033[%d;%dH",x,y) ; // going to x row y column
	char c;
	while(1)
{		c=getchar();
	if(c==65 && x>1) {
		//cursorup
		x--;
		mov(x,y);
	}

	else if(c==66) {
		//cursordown
		x++;
		mov(x,y);
	}		
		
	else if(c==68) {
		//cursorbackward
		return 3;
	}
	else if(c==67) {
		//cursorforward
		return 4;
	}
	else if(c==10) {
		//enter key is tapped
		return 1;
	}
	else if(c=='h'|| c=='H') {
		//home key is pressed
		return 2;
	}
	else if(c==127) {
		//backspace key is pressed
		return 5;
	}
	else if(c==':') {
		//colon is pressed
		return 6;
	}

	return -1;
		
}

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %esi
movl (%rbx), %edx
leaq 0x3278(%rip), %rdi      # 0x607b
xorl %eax, %eax
callq 0x2030
callq 0x22d0
movl %eax, %ecx
shll $0x18, %ecx
cmpl $0xa000000, %ecx        # imm = 0xA000000
je 0x2e71
cmpl $0x44000000, %ecx       # imm = 0x44000000
je 0x2e56
cmpl $0x42000000, %ecx       # imm = 0x42000000
je 0x2e5e
cmpl $0x43000000, %ecx       # imm = 0x43000000
je 0x2e5a
cmpl $0x41000000, %ecx       # imm = 0x41000000
jne 0x2e48
movl (%r14), %edi
cmpl $0x2, %edi
jl 0x2e48
decl %edi
jmp 0x2e63
andl $0xdf, %eax
cmpl $0x48, %eax
jne 0x2e7c
pushq $0x2
jmp 0x2e73
pushq $0x3
jmp 0x2e73
pushq $0x4
jmp 0x2e73
movl (%r14), %edi
incl %edi
movl %edi, (%r14)
movl (%rbx), %esi
callq 0x2ddc
pushq $-0x1
jmp 0x2e73
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %edx, %edx
cmpl $0x3a000000, %ecx       # imm = 0x3A000000
setne %dl
negl %edx
orl $0x6, %edx
cmpl $0x7f000000, %ecx       # imm = 0x7F000000
pushq $0x5
popq %rax
cmovnel %edx, %eax
jmp 0x2e74
nop
// File: /workspace/github_cpp_makefile_star2_O2/aman-agrawal[P]Terminal-based-file-explorer/keyboard.cpp
// Function: off_keyboard()
void off_keyboard()
{
tcgetattr(0,&initial_settings);
new_settings = initial_settings;
new_settings.c_lflag &= ~ICANON;
new_settings.c_lflag &= ~ECHO;
tcsetattr(0, TCSANOW, &new_settings);
}

// Assembly:
pushq %rax
leaq 0x638c(%rip), %rsi      # 0x9230
xorl %edi, %edi
callq 0x2250
movups 0x637e(%rip), %xmm0     # 0x9230
movups %xmm0, 0x63b3(%rip)     # 0x926c
movups 0x6380(%rip), %xmm0     # 0x9240
movups %xmm0, 0x63b5(%rip)     # 0x927c
movups 0x6382(%rip), %xmm0     # 0x9250
movups %xmm0, 0x63b7(%rip)     # 0x928c
movups 0x6380(%rip), %xmm0     # 0x925c
movups %xmm0, 0x63b5(%rip)     # 0x9298
andb $-0xb, 0x638e(%rip)     # 0x9278
leaq 0x637b(%rip), %rdx      # 0x926c
xorl %edi, %edi
xorl %esi, %esi
popq %rax
jmp 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/aman-agrawal[P]Terminal-based-file-explorer/aman.cpp
// Function: copyfile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void copyfile(string a,string b){       //copy files

    ifstream f1;
    f1.open(a);

    if(!f1){
        cout<<"error in read file";
        return;
    }
    ofstream f2;
    f2.open(b);


    if(!f2){
        cout<<"error";
        return;
    }

    char line[80];

    while(f1.good()) {
        f1.getline(line, 80);
        f2 << line;
        f2 << endl;
    }
    f1.close();
    f2.close();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x468, %rsp            # imm = 0x468
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x2260
pushq $0x8
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x21b0
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x28(%rsp,%rax)
je 0x2fdd
movq 0x6004(%rip), %rdi      # 0x8fd0
leaq 0x30ed(%rip), %rsi      # 0x60c0
callq 0x2210
jmp 0x3098
leaq 0x210(%rsp), %rdi
callq 0x23a0
leaq 0x210(%rsp), %rdi
pushq $0x10
popq %rdx
movq %rbx, %rsi
callq 0x2120
movq 0x210(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x230(%rsp,%rax)
je 0x3028
movq 0x5fb6(%rip), %rdi      # 0x8fd0
leaq 0x3099(%rip), %rsi      # 0x60ba
callq 0x2210
jmp 0x308b
leaq 0x8(%rsp), %rbx
leaq 0x410(%rsp), %r14
pushq $0x50
popq %r15
leaq 0x210(%rsp), %r12
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x28(%rsp,%rax)
jne 0x3074
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x20b0
movq %r12, %rdi
movq %r14, %rsi
callq 0x2210
movq %r12, %rdi
callq 0x2130
jmp 0x3041
leaq 0x8(%rsp), %rdi
callq 0x2070
leaq 0x210(%rsp), %rdi
callq 0x22e0
leaq 0x210(%rsp), %rdi
callq 0x2300
leaq 0x8(%rsp), %rdi
callq 0x2080
addq $0x468, %rsp            # imm = 0x468
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x30bc
jmp 0x30b7
jmp 0x30bc
movq %rax, %rbx
jmp 0x30cc
movq %rax, %rbx
leaq 0x210(%rsp), %rdi
callq 0x2300
leaq 0x8(%rsp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x23b0
// File: /workspace/github_cpp_makefile_star2_O2/aman-agrawal[P]Terminal-based-file-explorer/aman.cpp
// Function: createfile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void createfile(string a,string b)   //create file
{
    string name;
    string x;
    if(b==".")
        x=sonu+"/"+a;
    else
        x=sonu+"/"+b+"/"+a;

    ofstream f(x);
    f.close();
    cout << "file Created successfully";

}

// Assembly:
pushq %r14
pushq %rbx
subq $0x2a8, %rsp            # imm = 0x2A8
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq 0x2f9e(%rip), %rsi      # 0x60b8
movq %r14, %rdi
callq 0x46a9
testb %al, %al
je 0x317a
leaq 0x618b(%rip), %rsi      # 0x92b8
leaq 0x302c(%rip), %rdx      # 0x6160
leaq 0x8(%rsp), %rdi
callq 0x2a7c
leaq 0xa8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0x2a5d
leaq 0x28(%rsp), %rdi
leaq 0xa8(%rsp), %rbx
movq %rbx, %rsi
callq 0x2290
movq %rbx, %rdi
callq 0x2418
leaq 0x8(%rsp), %rdi
jmp 0x3205
leaq 0x6137(%rip), %rsi      # 0x92b8
leaq 0x2fd8(%rip), %rdx      # 0x6160
leaq 0x48(%rsp), %rdi
callq 0x2a7c
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movq %r14, %rdx
callq 0x2a5d
leaq 0x2fb5(%rip), %rdx      # 0x6160
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x46b6
leaq 0xa8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0x2a5d
leaq 0x28(%rsp), %rdi
leaq 0xa8(%rsp), %rbx
movq %rbx, %rsi
callq 0x2290
movq %rbx, %rdi
callq 0x2418
leaq 0x8(%rsp), %rdi
callq 0x2418
leaq 0x68(%rsp), %rdi
callq 0x2418
leaq 0x48(%rsp), %rdi
callq 0x2418
leaq 0xa8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $0x10
popq %rdx
callq 0x23f0
leaq 0xa8(%rsp), %rdi
callq 0x22e0
movq 0x5d9d(%rip), %rdi      # 0x8fd0
leaq 0x2e99(%rip), %rsi      # 0x60d3
callq 0x2210
leaq 0xa8(%rsp), %rdi
callq 0x2300
leaq 0x28(%rsp), %rdi
callq 0x2418
leaq 0x88(%rsp), %rdi
callq 0x2418
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2418
jmp 0x3280
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x2418
jmp 0x328f
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x329e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2418
jmp 0x32be
jmp 0x32a9
jmp 0x32a9
movq %rax, %rbx
jmp 0x32be
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x2300
leaq 0x28(%rsp), %rdi
callq 0x2418
leaq 0x88(%rsp), %rdi
callq 0x2418
movq %rbx, %rdi
callq 0x23b0
// File: /workspace/github_cpp_makefile_star2_O2/aman-agrawal[P]Terminal-based-file-explorer/aman.cpp
// Function: createdir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void createdir(string a,string b)   //create file
{
    string name;
    string x;
    if(b==".")
        x=sonu+"/"+a;
    else
        x=sonu+"/"+b+"/"+a;
    int y= mkdir(x.c_str(),0777);
    if(y==-1)
        cout<<"error, directory not created";
    else
        cout << "directory Created successfully";
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq 0x2d9f(%rip), %rsi      # 0x60b8
movq %r14, %rdi
callq 0x46a9
testb %al, %al
je 0x3379
leaq 0x5f8c(%rip), %rsi      # 0x92b8
leaq 0x2e2d(%rip), %rdx      # 0x6160
leaq 0x8(%rsp), %rdi
callq 0x2a7c
leaq 0x88(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0x2a5d
leaq 0x28(%rsp), %rdi
leaq 0x88(%rsp), %rbx
movq %rbx, %rsi
callq 0x2290
movq %rbx, %rdi
callq 0x2418
leaq 0x8(%rsp), %rdi
jmp 0x3404
leaq 0x5f38(%rip), %rsi      # 0x92b8
leaq 0x2dd9(%rip), %rdx      # 0x6160
leaq 0x48(%rsp), %rdi
callq 0x2a7c
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movq %r14, %rdx
callq 0x2a5d
leaq 0x2db6(%rip), %rdx      # 0x6160
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x46b6
leaq 0x88(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0x2a5d
leaq 0x28(%rsp), %rdi
leaq 0x88(%rsp), %rbx
movq %rbx, %rsi
callq 0x2290
movq %rbx, %rdi
callq 0x2418
leaq 0x8(%rsp), %rdi
callq 0x2418
leaq 0x68(%rsp), %rdi
callq 0x2418
leaq 0x48(%rsp), %rdi
callq 0x2418
movq 0x28(%rsp), %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x2110
cmpl $-0x1, %eax
leaq 0x2ccb(%rip), %rax      # 0x60ed
leaq 0x2ce1(%rip), %rsi      # 0x610a
cmoveq %rax, %rsi
movq 0x5b9c(%rip), %rdi      # 0x8fd0
callq 0x2210
leaq 0x28(%rsp), %rdi
callq 0x2418
leaq 0xa8(%rsp), %rdi
callq 0x2418
addq $0xc8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2418
jmp 0x346d
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x2418
jmp 0x347c
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x348b
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2418
jmp 0x3499
jmp 0x3496
jmp 0x3496
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x2418
leaq 0xa8(%rsp), %rdi
callq 0x2418
movq %rbx, %rdi
callq 0x23b0
// File: /workspace/github_cpp_makefile_star2_O2/aman-agrawal[P]Terminal-based-file-explorer/aman.cpp
// Function: renamefile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void renamefile(string a,string b)      //rename file
{
    string a1=sonu+"/"+a;
    string b1=sonu+"/"+b;
    int result= (!rename(a1.c_str(),b1.c_str()))  || (!rename(a.c_str(),b.c_str())) ; //converting string into const char*
    if (result == 1)
         cout<<"File successfully renamed";
    else
        cout<<"wrong input";
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x5dea(%rip), %rsi      # 0x92b8
leaq 0x2c8b(%rip), %rdx      # 0x6160
movq %rsp, %r15
movq %r15, %rdi
callq 0x2a7c
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2a5d
movq %rsp, %rdi
callq 0x2418
leaq 0x5db9(%rip), %rsi      # 0x92b8
leaq 0x2c5a(%rip), %rdx      # 0x6160
leaq 0x20(%rsp), %rdi
callq 0x2a7c
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x2a5d
leaq 0x20(%rsp), %rdi
callq 0x2418
movq 0x40(%rsp), %rdi
movq (%rsp), %rsi
callq 0x2160
testl %eax, %eax
je 0x3554
movq (%r14), %rdi
movq (%rbx), %rsi
callq 0x2160
testl %eax, %eax
je 0x3554
leaq 0x2bf1(%rip), %rsi      # 0x6143
jmp 0x355b
leaq 0x2bce(%rip), %rsi      # 0x6129
movq 0x5a6e(%rip), %rdi      # 0x8fd0
callq 0x2210
movq %rsp, %rdi
callq 0x2418
leaq 0x40(%rsp), %rdi
callq 0x2418
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
jmp 0x3593
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2418
jmp 0x359d
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
jmp 0x35aa
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2418
movq %rbx, %rdi
callq 0x23b0
// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/ChiSquareExperiments/./DataGenerator.cpp
// Function: DataGenerator::get_stat_one_sample(int, double*, double*)
double DataGenerator::get_stat_one_sample(int num_buckets, double *upper_intervals, double *lower_intervals)
{
  if (num_buckets <= 0)
    throw ParameterError();
  double expected = (double)stream_size / num_buckets;
  double chi_squared = 0;
  for (int i = 1; i <= num_buckets; i++)
  { 
    double observed = 0;
    for (int j = 0; j < stream_size; j++)
    {
      if (stream[j] <= upper_intervals[i] && stream[j] > lower_intervals[i])
	observed++;
    }
    chi_squared += (observed - expected) * (observed - expected) / expected;
  }
  return chi_squared;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %esi, %esi
jle 0x274e
movl 0x8(%rdi), %eax
cvtsi2sd %eax, %xmm1
cvtsi2sd %esi, %xmm0
divsd %xmm0, %xmm1
movq (%rdi), %rdi
xorl %r8d, %r8d
testl %eax, %eax
cmovlel %r8d, %eax
incl %esi
xorpd %xmm0, %xmm0
pushq $0x1
popq %r8
movsd 0x5905(%rip), %xmm2     # 0x8008
cmpq %rsi, %r8
je 0x274c
xorpd %xmm3, %xmm3
xorl %r9d, %r9d
cmpq %r9, %rax
je 0x2737
movsd (%rdi,%r9,8), %xmm4
movsd (%rdx,%r8,8), %xmm5
ucomisd %xmm4, %xmm5
jb 0x2732
ucomisd (%rcx,%r8,8), %xmm4
jbe 0x2732
addsd %xmm2, %xmm3
incq %r9
jmp 0x270f
subsd %xmm1, %xmm3
mulsd %xmm3, %xmm3
divsd %xmm1, %xmm3
addsd %xmm3, %xmm0
incq %r8
jmp 0x2703
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0x20e0
leaq 0xa523(%rip), %rsi      # 0xcc80
movq %rax, %rdi
xorl %edx, %edx
callq 0x22f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/ChiSquareExperiments/./DataGenerator.cpp
// Function: DataGenerator::get_stat_two_sample(DataGenerator const&, int, double*, double*)
double DataGenerator::get_stat_two_sample(const DataGenerator& other, int num_buckets, double *upper_intervals, double *lower_intervals)
{
  if (num_buckets <= 0)
    throw ParameterError();
  double *stream2 = other.stream;
  int stream2_size = other.stream_size;
  double constant_1 = sqrt((double)stream2_size/stream_size);
  double constant_2 = sqrt((double)stream_size/stream2_size);
  double chi_squared = 0;
  for (int i = 0; i < num_buckets; i++)
  {
    double frequency1 = 0, frequency2 = 0;
    for (int j = 0; j < stream_size; j++)
    {
      if (stream[j] <= upper_intervals[i+1] && stream[j] > lower_intervals[i+1])
	frequency1++;
    }
    for (int j = 0; j < stream2_size; j++)
    {
      if (stream2[j] <= upper_intervals[i+1] && stream2[j] > lower_intervals[i+1])
	frequency2++;
    }
    double lambda = frequency1 * constant_1 - frequency2 * constant_2;
    chi_squared += (lambda * lambda) / (frequency1 + frequency2);
  }
  return chi_squared;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testl %edx, %edx
jle 0x28ba
movq %r8, %rbx
movq %rcx, %r14
movq %rdi, %r12
movl 0x8(%rsi), %r13d
cvtsi2sd %r13d, %xmm2
movq (%rsi), %r15
cvtsi2sdl 0x8(%rdi), %xmm1
movapd %xmm2, %xmm0
divsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movl %edx, -0x34(%rbp)
jb 0x27b6
sqrtsd %xmm0, %xmm7
jmp 0x27cd
movsd %xmm2, -0x30(%rbp)
callq 0x2160
xorpd %xmm1, %xmm1
movsd -0x30(%rbp), %xmm2
movapd %xmm0, %xmm7
cvtsi2sdl 0x8(%r12), %xmm0
divsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jb 0x27e4
sqrtsd %xmm0, %xmm0
jmp 0x27f3
movsd %xmm7, -0x30(%rbp)
callq 0x2160
movsd -0x30(%rbp), %xmm7
movl 0x8(%r12), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
testl %r13d, %r13d
cmovlel %ecx, %r13d
movq (%r12), %rdx
movl -0x34(%rbp), %esi
xorpd %xmm1, %xmm1
movsd 0x57ef(%rip), %xmm2     # 0x8008
cmpq %rsi, %rcx
je 0x28a7
incq %rcx
xorpd %xmm3, %xmm3
xorl %edi, %edi
cmpq %rdi, %rax
je 0x2851
movsd (%rdx,%rdi,8), %xmm4
movsd (%r14,%rcx,8), %xmm5
ucomisd %xmm4, %xmm5
jb 0x284c
ucomisd (%rbx,%rcx,8), %xmm4
jbe 0x284c
addsd %xmm2, %xmm3
incq %rdi
jmp 0x282b
xorpd %xmm4, %xmm4
xorl %edi, %edi
cmpq %rdi, %r13
je 0x287e
movsd (%r15,%rdi,8), %xmm5
movsd (%r14,%rcx,8), %xmm6
ucomisd %xmm5, %xmm6
jb 0x2879
ucomisd (%rbx,%rcx,8), %xmm5
jbe 0x2879
addsd %xmm2, %xmm4
incq %rdi
jmp 0x2857
movapd %xmm0, %xmm5
mulsd %xmm4, %xmm5
movapd %xmm3, %xmm6
mulsd %xmm7, %xmm6
subsd %xmm5, %xmm6
mulsd %xmm6, %xmm6
addsd %xmm4, %xmm3
divsd %xmm3, %xmm6
addsd %xmm6, %xmm1
jmp 0x2819
movapd %xmm1, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0x20e0
leaq 0xa3b7(%rip), %rsi      # 0xcc80
movq %rax, %rdi
xorl %edx, %edx
callq 0x22f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/QuantileSketch.h
// Function: QuantileSketch::reverseQuantile(double, int)
double QuantileSketch::reverseQuantile(double r, int n)
{
  int lo=0, hi= n;
  while (lo < hi)
  {
    int mid = (lo+hi)/2;
    double value = getQuantile(((double)mid)/n);
    if (value < r)
      lo = mid+1;
    else
      hi = mid;
  }
  return lo;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movsd %xmm0, -0x30(%rbp)
movq %rdi, %r14
cvtsi2sd %esi, %xmm0
movsd %xmm0, -0x28(%rbp)
xorl %r15d, %r15d
cmpl %ebx, %r15d
jge 0x2930
leal (%r15,%rbx), %r12d
shrl %r12d
cvtsi2sd %r12d, %xmm0
divsd -0x28(%rbp), %xmm0
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movsd -0x30(%rbp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x2928
movl %r12d, %ebx
jmp 0x28f9
incl %r12d
movl %r12d, %r15d
jmp 0x28f9
cvtsi2sd %r15d, %xmm0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/GK.cpp
// Function: GK::GK(int)
GK::GK(int maxTuples)
{
	num_tuples=0;
	num_observations=0;
	max=maxTuples;
	summary=new Tuple*[maxTuples];
	for (int i = 0; i < max; i++)
		summary[i] = NULL;
	stream_size =0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xa34a(%rip), %rax      # 0xcca0
movq %rax, (%rdi)
andl $0x0, 0x18(%rdi)
andq $0x0, 0x20(%rdi)
movl %esi, %r14d
movl %esi, 0x8(%rdi)
movl %esi, %eax
shlq $0x3, %rax
xorl %r15d, %r15d
testl %esi, %esi
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
cmovlel %r15d, %r14d
callq 0x2030
movq %rax, 0x10(%rbx)
cmpq %r15, %r14
je 0x299a
movq 0x10(%rbx), %rax
andq $0x0, (%rax,%r15,8)
incq %r15
jmp 0x2987
andq $0x0, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/GK.cpp
// Function: GK::insert(double)
void GK::insert(double val)
{ 
	stream_size +=1; 
	int index= find_index(val);
	if(summary[index]==NULL)
	{
		insert_tuple(new Tuple(val),index); 
	}
	else
	{
		double store=summary[index]->g+summary[index]->delta-1; 
		insert_tuple(new Tuple(val,1.0,store),index);
	}
	if(num_tuples==max)
		delete_merge();
	num_observations++;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
incq 0x28(%rdi)
movsd %xmm0, -0x20(%rbp)
callq 0x2a90
movl %eax, %r14d
movq 0x10(%rbx), %rax
movslq %r14d, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0x2a33
movsd 0x8(%rax), %xmm0
addsd 0x10(%rax), %xmm0
addsd 0x55df(%rip), %xmm0     # 0x8010
jmp 0x2a37
xorpd %xmm0, %xmm0
movsd %xmm0, -0x18(%rbp)
pushq $0x18
popq %rdi
callq 0x21d0
movsd -0x20(%rbp), %xmm0
movsd %xmm0, (%rax)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x8(%rax)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, 0x10(%rax)
movq %rbx, %rdi
movq %rax, %rsi
movl %r14d, %edx
callq 0x2ad0
movl 0x18(%rbx), %eax
cmpl 0x8(%rbx), %eax
jne 0x2a83
movq %rbx, %rdi
callq 0x2b1e
incq 0x20(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/GK.cpp
// Function: GK::find_index(double)
int GK::find_index(double val)
{
	int high= num_tuples;int low=-1,mid;
	while(high-low >1)
	{
		mid=(high+low)/2;
		if(summary[mid]->v >val)
			high=mid;
		else
			low=mid;
	}
	return high;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x18(%rdi), %ecx
movq 0x10(%rdi), %rsi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl $0x2, %r8d
movl %ecx, %eax
subl %edi, %eax
cmpl $0x2, %eax
jl 0x2acc
leal (%rcx,%rdi), %eax
cltd
idivl %r8d
cltq
movq (%rsi,%rax,8), %rdx
movsd (%rdx), %xmm1
ucomisd %xmm0, %xmm1
cmovbel %eax, %edi
cmoval %eax, %ecx
jmp 0x2aa6
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/GK.cpp
// Function: GK::delete_merge()
void GK::delete_merge()
{	
	int leastIndex = 0;
	long leastFull= LLONG_MAX;
        for (int i = 1; i <num_tuples - 1; i++) 
        {
            long f = summary[i]->g + summary[i + 1]->g+summary[i + 1]->delta;   
            if ((summary[i]->delta >=summary[i + 1]->delta)
                    && (f < leastFull)) 
            {
                leastFull = f;
                leastIndex = i;
            }
        }
        if (leastIndex > 0) 
            delete_tuple(leastIndex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x18(%rdi), %rax
decq %rax
movq 0x10(%rdi), %rcx
xorl %esi, %esi
movabsq $0x7fffffffffffffff, %rdx # imm = 0x7FFFFFFFFFFFFFFF
movabsq $0x1, %r8
cmpq %rax, %r8
jge 0x2b92
movq (%rcx,%r8,8), %r9
movq 0x8(%rcx,%r8,8), %r10
movsd 0x8(%r9), %xmm0
movsd 0x10(%r9), %xmm1
addsd 0x8(%r10), %xmm0
movsd 0x10(%r10), %xmm2
addsd %xmm2, %xmm0
cvttsd2si %xmm0, %r9
ucomisd %xmm2, %xmm1
setae %r10b
cmpq %r9, %rdx
setg %r11b
testb %r11b, %r10b
cmovnel %r8d, %esi
leaq 0x1(%r8), %r8
cmovneq %r9, %rdx
jmp 0x2b43
testl %esi, %esi
jle 0x2b9c
popq %rbp
jmp 0x2b9e
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/GK.cpp
// Function: GK::delete_tuple(int)
void GK::delete_tuple(int index)
{	
        Tuple *hold  = summary[index];
	summary[index] = new Tuple(summary[index + 1]->v,
                summary[index]->g + summary[index + 1]->g,
                summary[index + 1]->delta);
        delete hold;
	delete summary[index+1];
        int size_of_pointer= sizeof(summary[0]);
        int total_size=size_of_pointer * (num_tuples-index-2);
        memmove(&(summary[index+1]),&(summary[index+2]),total_size);
	summary[num_tuples-1]=NULL;
	num_tuples--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %r12
movslq %esi, %r15
movq (%r12,%r15,8), %r14
pushq $0x18
popq %rdi
callq 0x21d0
movq 0x8(%r12,%r15,8), %rcx
movsd 0x8(%r14), %xmm0
addsd 0x8(%rcx), %xmm0
movsd (%rcx), %xmm1
movsd 0x10(%rcx), %xmm2
movsd %xmm1, (%rax)
movsd %xmm0, 0x8(%rax)
movsd %xmm2, 0x10(%rax)
movq %rax, (%r12,%r15,8)
movq %r14, %rdi
callq 0x21b0
movq 0x10(%rbx), %rax
movq 0x8(%rax,%r15,8), %rdi
callq 0x21b0
movl 0x18(%rbx), %eax
subl %r15d, %eax
leal -0x10(,%rax,8), %eax
movq 0x10(%rbx), %rcx
leaq (%rcx,%r15,8), %rdi
addq $0x8, %rdi
leaq (%rcx,%r15,8), %rsi
addq $0x10, %rsi
movslq %eax, %rdx
callq 0x22a0
movq 0x10(%rbx), %rax
movslq 0x18(%rbx), %rcx
andq $0x0, -0x8(%rax,%rcx,8)
leal -0x1(%rcx), %eax
movl %eax, 0x18(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/GK.cpp
// Function: GK::getQuantile(double)
double GK::getQuantile(double quant)
{
	long rank= (long) ceil(quant* num_observations);
	long current_rank=0;
	for (int i = 0; i < num_tuples - 1; i++)
	{
		current_rank +=summary[i]->g;
		if ((current_rank +summary[i + 1]->g) > rank)
            	    return summary[i]->v;
        }
        return summary[num_tuples - 1]->v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cvtsi2sdq 0x20(%rdi), %xmm1
mulsd %xmm1, %xmm0
callq 0x2070
cvttsd2si %xmm0, %rcx
movslq 0x18(%rbx), %rax
cvtsi2sd %rcx, %xmm0
cmpl $0x2, %eax
pushq $0x1
popq %rcx
cmovgel %eax, %ecx
movq 0x10(%rbx), %rdx
decl %ecx
xorl %esi, %esi
xorl %edi, %edi
cmpq %rsi, %rcx
je 0x2cb3
movq (%rdx,%rsi,8), %r8
cvtsi2sd %rdi, %xmm1
addsd 0x8(%r8), %xmm1
cvttsd2si %xmm1, %rdi
movq 0x8(%rdx,%rsi,8), %r9
cvtsi2sd %rdi, %xmm1
incq %rsi
addsd 0x8(%r9), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x2c7f
jmp 0x2cb8
movq -0x8(%rdx,%rax,8), %r8
movsd (%r8), %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/ReservoirSampling.cpp
// Function: ReservoirSampling::copy(ReservoirSampling const&)
void ReservoirSampling::copy(const ReservoirSampling& other)
{
  sample_size = other.sample_size;
  stream_size = other.stream_size;
  array = new double[sample_size];
  for (int i = 0; i < sample_size; i++)
    array[i] = other.array[i];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movslq 0xc(%rsi), %r15
leaq (,%r15,8), %rax
testq %r15, %r15
movl %r15d, 0xc(%rdi)
movl 0x8(%rsi), %ecx
movl %ecx, 0x8(%rdi)
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x2030
movq %rax, 0x10(%r14)
movq 0x10(%rbx), %rcx
xorl %edx, %edx
testl %r15d, %r15d
movl $0x0, %esi
cmovgl %r15d, %esi
cmpq %rdx, %rsi
je 0x2d71
movsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, (%rax,%rdx,8)
incq %rdx
jmp 0x2d5d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/ReservoirSampling.cpp
// Function: ReservoirSampling::insert(double)
void ReservoirSampling::insert(double value)
{
  stream_size += 1; //incrementing the size of the stream as a new element is inserted
  if (stream_size <= sample_size) //Checking if stream size is less than random sample size
    array[stream_size - 1] = value;
  else if ((rand() % stream_size + 1) <= sample_size)
    array[(rand() % sample_size)] = value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl 0x8(%rdi), %edx
leal 0x1(%rdx), %eax
movl %eax, 0x8(%rdi)
cmpl 0xc(%rdi), %edx
jge 0x2dec
movq 0x10(%rbx), %r14
jmp 0x2e11
movsd %xmm0, -0x18(%rbp)
callq 0x2080
cltd
idivl 0x8(%rbx)
cmpl 0xc(%rbx), %edx
jge 0x2e1a
movq 0x10(%rbx), %r14
callq 0x2080
cltd
idivl 0xc(%rbx)
movsd -0x18(%rbp), %xmm0
movslq %edx, %rax
movsd %xmm0, (%r14,%rax,8)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/ReservoirSampling.cpp
// Function: ReservoirSampling::getQuantile(double)
double ReservoirSampling::getQuantile(double fraction)
{
  sort(array, array + sample_size); // sorting from range s to s+k
  if (fraction >= 1) 
    return array[sample_size - 1];// if f is greater than one
  else if (fraction < 0) 
    return array[0];//if f is less than 1
  else
    return array[(int)(fraction * sample_size)]; //if f is between 0 and 1. 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movsd %xmm0, -0x10(%rbp)
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movslq 0xc(%rbx), %rax
leaq (%rdi,%rax,8), %rsi
callq 0x64f5
movsd -0x10(%rbp), %xmm1
ucomisd 0x51b8(%rip), %xmm1     # 0x8008
jae 0x2e76
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
movq 0x10(%rbx), %rax
ja 0x2e86
cvtsi2sdl 0xc(%rbx), %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movslq %ecx, %rcx
leaq (%rax,%rcx,8), %rax
jmp 0x2e86
movq 0x10(%rbx), %rax
movslq 0xc(%rbx), %rcx
leaq (%rax,%rcx,8), %rax
addq $-0x8, %rax
movsd (%rax), %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/Q-Digest.cpp
// Function: QDigest::QDigest(double)
QDigest::QDigest(double compression)
{
  compression_factor = compression; 
  capacity = 1;
  size = 0;
  stream_size = 0;
  min = MAX_VALUE;
  max = -MAX_VALUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x9e53(%rip), %rax      # 0xccf0
movq %rax, (%rdi)
leaq 0x38(%rdi), %rax
movq %rax, 0x8(%rdi)
movabsq $0x1, %rax
movq %rax, 0x10(%rdi)
xorps %xmm1, %xmm1
movups %xmm1, 0x18(%rdi)
movl $0x3f800000, 0x28(%rdi) # imm = 0x3F800000
movups %xmm1, 0x30(%rdi)
movsd %xmm0, 0x60(%rdi)
movq %rax, 0x48(%rdi)
andq $0x0, 0x40(%rdi)
andq $0x0, 0x68(%rdi)
movq $0x3b9aca00, 0x50(%rdi) # imm = 0x3B9ACA00
movq $-0x3b9aca00, 0x58(%rdi) # imm = 0xC4653600
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/Q-Digest.cpp
// Function: QDigest::copy(QDigest const&)
void QDigest::copy(const QDigest& other)
{
  node2count = other.node2count;
  compression_factor = other.compression_factor;
  capacity = other.capacity;
  size = other.size;
  min = other.min;
  max = other.max;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rsi
addq $0x8, %rdi
callq 0x5e72
movsd 0x60(%rbx), %xmm0
movsd %xmm0, 0x60(%r14)
movq 0x48(%rbx), %rax
movq %rax, 0x48(%r14)
movq 0x40(%rbx), %rax
movq %rax, 0x40(%r14)
movq 0x50(%rbx), %rax
movq %rax, 0x50(%r14)
movq 0x58(%rbx), %rax
movq %rax, 0x58(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/Q-Digest.cpp
// Function: QDigest::insert(double)
void QDigest::insert(double value)
{
  stream_size += 1;
  if (value < min)
    min = value;
  if (value > max)
    max = value;
  offer(value);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
incq 0x68(%rdi)
cvtsi2sdq 0x50(%rdi), %xmm1
ucomisd %xmm0, %xmm1
cvttsd2si %xmm0, %rsi
jbe 0x2fc1
movq %rsi, 0x50(%rdi)
cvtsi2sdq 0x58(%rdi), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x2fd1
movq %rsi, 0x58(%rdi)
popq %rbp
jmp 0x2fd8
nop
// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/Q-Digest.cpp
// Function: QDigest::offer(long)
void QDigest::offer(long value)
{
  if (value < 0 || value == MAX_VALUE)
  {
    try 
    {
      throw value;
    }
    catch (long value)
    {
      cout << "Can only accept values in the range 0.. " <<  MAX_VALUE - 1 << endl;
    }  
  }
	
  // Rebuild if the value is too large for the current tree height
  if (value >= capacity)
    rebuildToCapacity(highestOneBit(value) << 1);   
		
 long leaf = value2leaf(value);
 if (node2count.find(leaf) == node2count.end())
   node2count.insert(std::make_pair (leaf, get(leaf)+1));
 else
   node2count[leaf] += 1;   
 size++;

 //Always compress at the inserted node, and recompress fully
 //if the tree becomes too large.
 compressUpward(leaf);
 if (node2count.size() > 3 * compression_factor) 
   compressFully();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
js 0x30cb
cmpq $0x3b9aca00, %r14       # imm = 0x3B9ACA00
je 0x30cb
movq 0x48(%rbx), %rax
cmpq %r14, %rax
jg 0x3023
movq %r14, %rsi
callq 0x3482
addl %eax, %eax
movslq %eax, %rsi
movq %rbx, %rdi
callq 0x3326
movq 0x48(%rbx), %rax
addq %r14, %rax
leaq -0x20(%rbp), %rsi
movq %rax, (%rsi)
leaq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x6a32
testq %rax, %rax
je 0x304f
leaq -0x20(%rbp), %rsi
movq %r14, %rdi
callq 0x6d42
incq (%rax)
jmp 0x3075
movq -0x20(%rbp), %rsi
movq %rbx, %rdi
callq 0x34a2
incq %rax
movq -0x20(%rbp), %rcx
leaq -0x30(%rbp), %rsi
movq %rcx, (%rsi)
movq %rax, 0x8(%rsi)
movq %r14, %rdi
callq 0x6abc
incq 0x40(%rbx)
movq -0x20(%rbp), %rsi
movq %rbx, %rdi
callq 0x34d0
movsd 0x20(%rbx), %xmm0
unpcklps 0x510f(%rip), %xmm0     # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x5117(%rip), %xmm0     # 0x81b0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd 0x60(%rbx), %xmm0
mulsd 0x4f66(%rip), %xmm0     # 0x8018
ucomisd %xmm0, %xmm1
jbe 0x30c0
movq %rbx, %rdi
callq 0x3626
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x8
popq %rdi
callq 0x20e0
movq %r14, (%rax)
movq 0x9f03(%rip), %rsi      # 0xcfe0
movq %rax, %rdi
xorl %edx, %edx
callq 0x22f0
movq %rax, %r15
cmpl $0x1, %edx
jne 0x3131
movq %r15, %rdi
callq 0x20b0
movq 0x9ed2(%rip), %rdi      # 0xcfd0
leaq 0x5178(%rip), %rsi      # 0x827d
callq 0x21c0
movq %rax, %rdi
movl $0x3b9ac9ff, %esi       # imm = 0x3B9AC9FF
callq 0x2300
movq %rax, %rdi
callq 0x20d0
callq 0x22c0
jmp 0x3001
movq %rax, %r15
callq 0x22c0
movq %r15, %rdi
callq 0x2320
nop