LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/yuroitaki[P]enigma_machine/config.cpp
// Function: Config::Config(int, char**)
Config::Config(int arg_ct,char**arg_vl){      
  arg_count = arg_ct;
  arg_value = arg_vl;
  rotor_count = 0;
  
  if ((arg_ct < 3)||(arg_ct ==4))
    throw INSUFFICIENT_NUMBER_OF_PARAMETERS;
  
  int last_index = arg_ct-1;
  plugboard_file = arg_vl[1];
  reflector_file = arg_vl[2];
  
  if (arg_ct > 3){
    rotor_pos_file = arg_vl[last_index];
    for (int i=3;i<last_index;i++){
      rotor_files.push_back(arg_value[i]);
      rotor_count++;
    }
  }
  check_pb_file();
  check_rf_file();

  if(arg_ct >3){
    for (int i=0;i<rotor_count;i++){
      check_rot_file(rotor_files[i],i);   
    }
    check_rot_pos_file();
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movq $0x0, 0x38(%rdi)
movl %esi, (%rdi)
movq %rdx, 0x8(%rdi)
movl $0x0, 0x10(%rdi)
cmpl $0x3, %esi
jl 0x2d24
movl %esi, %r15d
cmpl $0x4, %esi
je 0x2d24
movq 0x8(%rdx), %rax
movq %rax, 0x18(%rbx)
movq 0x10(%rdx), %rax
movq %rax, 0x20(%rbx)
jl 0x2cd8
leal -0x1(%r15), %eax
movl %eax, %r12d
movq (%rdx,%r12,8), %rax
movq %rax, 0x40(%rbx)
cmpl $0x4, %r15d
je 0x2cd8
addq $-0x3, %r12
movl $0x18, %r13d
movq 0x8(%rbx), %rdx
addq %r13, %rdx
movq 0x30(%rbx), %rsi
cmpq 0x38(%rbx), %rsi
je 0x2cc4
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, 0x30(%rbx)
jmp 0x2ccc
movq %r14, %rdi
callq 0x3b66
incl 0x10(%rbx)
addq $0x8, %r13
decq %r12
jne 0x2ca6
movq %rbx, %rdi
callq 0x2d6a
movq %rbx, %rdi
callq 0x3090
cmpl $0x4, %r15d
jl 0x2d1a
cmpl $0x0, 0x10(%rbx)
jle 0x2d12
xorl %r15d, %r15d
movq (%r14), %rax
movq (%rax,%r15,8), %rsi
movl %r15d, %edx
callq 0x33ca
incq %r15
movslq 0x10(%rbx), %rax
cmpq %rax, %r15
jl 0x2cf7
movq %rbx, %rdi
callq 0x399c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0x4, %edi
callq 0x2090
movl $0x1, (%rax)
movq 0x5275(%rip), %rsi      # 0x7fb0
movq %rax, %rdi
xorl %edx, %edx
callq 0x21b0
jmp 0x2d4b
jmp 0x2d4b
jmp 0x2d4b
movq %rax, %r15
movq (%r14), %rdi
testq %rdi, %rdi
je 0x2d62
movq 0x38(%rbx), %rsi
subq %rdi, %rsi
callq 0x2120
movq %r15, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O1/yuroitaki[P]enigma_machine/config.cpp
// Function: Config::check_rot_pos_file()
void Config::check_rot_pos_file(){
  ifstream input;
  int buffer;
  int count = 0;
  char charac;
  
  input.open(rotor_pos_file);

  while((count<rotor_count)&&(input>>buffer)){
    input.get(charac);
    if(!isspace(charac)){
      cerr << "Non-numeric character in rotor position file: rotor.pos" <<endl;
      throw NON_NUMERIC_CHARACTER;
    } 
    if((buffer<0)||(buffer>25)){
      cerr << "Invalid index in rotor position file: rotor.pos" <<endl;
      throw INVALID_INDEX;
    }count++;
  }
  if((input.fail())&&(!input.eof())){
    cerr << "Non-numeric character in rotor position file: rotor.pos" <<endl;
    throw NON_NUMERIC_CHARACTER;
  }
  if(count<rotor_count){
    cerr << "No starting position for rotor " << count;
    throw NO_ROTOR_STARTING_POSITION;
  }
  input.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rdi, %r14
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x2130
movq 0x40(%r14), %rsi
movq %rbx, %rdi
movl $0x8, %edx
callq 0x20c0
cmpl $0x0, 0x10(%r14)
jle 0x3a2d
xorl %ebx, %ebx
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
leaq 0xb(%rsp), %r13
movq %r15, %rdi
movq %r12, %rsi
callq 0x20b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3a2f
movq %r15, %rdi
movq %r13, %rsi
callq 0x2170
movsbl 0xb(%rsp), %edi
callq 0x2030
testl %eax, %eax
je 0x3a7a
cmpl $0x1a, 0xc(%rsp)
jae 0x3aa5
incl %ebx
cmpl 0x10(%r14), %ebx
jl 0x39e6
jmp 0x3a2f
xorl %ebx, %ebx
movq 0x10(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x30(%rsp,%rax), %eax
testb $0x5, %al
setne %cl
testb $0x2, %al
sete %al
testb %al, %cl
jne 0x3a7a
cmpl 0x10(%r14), %ebx
jl 0x3aeb
leaq 0x10(%rsp), %rdi
callq 0x2040
leaq 0x10(%rsp), %rdi
callq 0x2050
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x456f(%rip), %rdi      # 0x7ff0
leaq 0x1a17(%rip), %rsi      # 0x549f
movl $0x37, %edx
callq 0x2140
movl $0x4, %ebp
movq 0x4552(%rip), %rdi      # 0x7ff0
callq 0x2080
jmp 0x3ace
movq 0x4544(%rip), %rdi      # 0x7ff0
leaq 0x1a24(%rip), %rsi      # 0x54d7
movl $0x2f, %edx
callq 0x2140
movl $0x3, %ebp
movq 0x4527(%rip), %rdi      # 0x7ff0
callq 0x2080
movl $0x4, %edi
callq 0x2090
movl %ebp, (%rax)
movq 0x44cf(%rip), %rsi      # 0x7fb0
movq %rax, %rdi
xorl %edx, %edx
callq 0x21b0
movq 0x44fe(%rip), %rdi      # 0x7ff0
leaq 0x1a0e(%rip), %rsi      # 0x5507
movl $0x1f, %edx
callq 0x2140
movl $0x8, %ebp
movq 0x44e1(%rip), %rdi      # 0x7ff0
movl %ebx, %esi
callq 0x21c0
jmp 0x3ace
jmp 0x3b1a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x21d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/yuroitaki[P]enigma_machine/config.cpp
// Function: Config::get_file(int)
const char* Config::get_file(int filecode){
  switch(filecode){
  case PB: 
    return plugboard_file;
  case RF:
    return reflector_file;
  case RP:
    return rotor_pos_file; 
  default: return "No files found!";
  }
}

// Assembly:
cmpl $0x12c, %esi            # imm = 0x12C
je 0x3b4f
cmpl $0xc8, %esi
je 0x3b4a
cmpl $0x64, %esi
jne 0x3b54
movq 0x18(%rdi), %rax
retq
movq 0x20(%rdi), %rax
retq
movq 0x40(%rdi), %rax
retq
leaq 0x1670(%rip), %rax      # 0x51cb
retq
// File: /workspace/github_cpp_makefile_star2_O1/yuroitaki[P]enigma_machine/plugboard_reflector.cpp
// Function: Plugboard_Reflector::store_config_pr(int)
void Plugboard_Reflector::store_config_pr(int store_code){
  ifstream in_put;
  in_put.open(config_pr->get_file(store_code));      //to get the file name from the Config class
  
  vector<int>* buffer_vec;
  int buffer;

  if(store_code == PB){
    buffer_vec = &swap_config;
  }
  if(store_code == RF){
    buffer_vec = &ref_config;
  }
  while(in_put>>buffer){
    buffer_vec->push_back(buffer);
  }
  in_put.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movl %esi, %ebp
movq %rdi, %r14
leaq 0x10(%rsp), %rdi
callq 0x2130
movq 0x30(%r14), %rdi
movl %ebp, %esi
callq 0x3b30
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x20c0
leaq 0x18(%r14), %rbx
cmpl $0xc8, %ebp
cmovneq %r14, %rbx
leaq 0x10(%rsp), %r14
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x20b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3ed1
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3ec4
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3e91
movq %rbx, %rdi
movq %r15, %rdx
callq 0x3ca2
jmp 0x3e91
leaq 0x10(%rsp), %rdi
callq 0x2040
leaq 0x10(%rsp), %rdi
callq 0x2050
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3ef7
jmp 0x3ef7
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O1/yuroitaki[P]enigma_machine/rotor.cpp
// Function: Rotor::Rotor(Config*, int)
Rotor::Rotor(Config* config_rotor, int rotor_idt){
  config_rot = config_rotor;
  rotor_id = rotor_idt;
  notch_reached = false;
  store_encrypt(rotor_id);
  create_key();
  shift_ground(SETUP);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
leaq 0x20(%rdi), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x48(%rdi)
movq %rsi, (%rdi)
movl %edx, 0x54(%rdi)
movb $0x0, 0x58(%rdi)
movl %edx, %esi
callq 0x401a
movq %rbx, %rdi
callq 0x422e
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4288
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r12
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x4004
movq 0x48(%rbx), %rsi
subq %rdi, %rsi
callq 0x2120
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x224c
movq %r12, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O1/js850[P]lbfgs_cpp/example.cpp
// Function: func2(double*, double*, unsigned long)
double func2(double * x, double * g, size_t N)
{
  size_t i;
  double dot = 0.;
  for (i=0; i<N; ++i) {
    dot += x[i] * x[i];
    g[i] = 2. * x[i];
  }
  return dot;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorpd %xmm0, %xmm0
testq %rdx, %rdx
je 0x133d
xorl %eax, %eax
movsd (%rdi,%rax,8), %xmm1
movapd %xmm1, %xmm2
mulsd %xmm1, %xmm2
addsd %xmm2, %xmm0
addsd %xmm1, %xmm1
movsd %xmm1, (%rsi,%rax,8)
incq %rax
cmpq %rax, %rdx
jne 0x131b
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/js850[P]lbfgs_cpp/lbfgs.cpp
// Function: vecdot(std::vector<double, std::allocator<double>>, std::vector<double, std::allocator<double>>)
double vecdot(std::vector<double> const v1, std::vector<double> const v2)
{
  assert(v1.size() == v2.size());
  size_t i;
  double dot = 0.;
  for (i=0; i<v1.size(); ++i) {
    dot += v1[i] * v2[i];
  }
  return dot;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq 0x8(%rdi), %rdi
movq %rdi, %rcx
subq %rax, %rcx
movq (%rsi), %rdx
movq 0x8(%rsi), %rsi
subq %rdx, %rsi
cmpq %rsi, %rcx
jne 0x1705
cmpq %rax, %rdi
je 0x16ff
sarq $0x3, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorpd %xmm0, %xmm0
xorl %esi, %esi
movsd (%rax,%rsi,8), %xmm1
mulsd (%rdx,%rsi,8), %xmm1
addsd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rcx
jne 0x16e7
jmp 0x1703
xorpd %xmm0, %xmm0
popq %rbp
retq
leaq 0x1974(%rip), %rdi      # 0x3080
leaq 0x1984(%rip), %rsi      # 0x3097
leaq 0x1987(%rip), %rcx      # 0x30a1
movl $0x1b, %edx
callq 0x1080
// File: /workspace/github_cpp_makefile_star2_O1/js850[P]lbfgs_cpp/lbfgs.cpp
// Function: LBFGS_ns::LBFGS::one_iteration()
void LBFGS::one_iteration()
{
  std::vector<double> x_old = x_;
  std::vector<double> g_old = g_;

  compute_lbfgs_step();

  double stepsize = backtracking_linesearch();

  update_memory(x_old, g_old, x_, g_);
  if ((iprint_ > 0) && (iter_number_ % iprint_ == 0)){
    cout << "lbgs: " << iter_number_ 
      << " f " << f_ 
      << " rms " << rms_
      << " stepsize " << stepsize << "\n";
  }
  iter_number_ += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x38(%rdi), %r14
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x29fe
leaq 0x58(%rbx), %r15
leaq -0x38(%rbp), %rdi
movq %r15, %rsi
callq 0x29fe
movq %rbx, %rdi
callq 0x1e58
movq %rbx, %rdi
callq 0x228e
movsd %xmm0, -0x20(%rbp)
leaq -0x50(%rbp), %rsi
leaq -0x38(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rcx
movq %r15, %r8
callq 0x2734
movl 0x2c(%rbx), %ecx
testl %ecx, %ecx
jle 0x1de3
movl 0x30(%rbx), %eax
cltd
idivl %ecx
testl %edx, %edx
jne 0x1de3
movq 0x3295(%rip), %rdi      # 0x4fd8
leaq 0x139b(%rip), %rsi      # 0x30e5
movl $0x6, %edx
callq 0x10e0
movl 0x30(%rbx), %esi
movq 0x327a(%rip), %rdi      # 0x4fd8
callq 0x1150
movq %rax, %r14
leaq 0x137f(%rip), %rsi      # 0x30ec
movl $0x3, %edx
movq %rax, %rdi
callq 0x10e0
movsd 0x50(%rbx), %xmm0
movq %r14, %rdi
callq 0x1110
movq %rax, %r14
leaq 0x135f(%rip), %rsi      # 0x30f0
movl $0x5, %edx
movq %rax, %rdi
callq 0x10e0
movsd 0x70(%rbx), %xmm0
movq %r14, %rdi
callq 0x1110
movq %rax, %r14
leaq 0x1341(%rip), %rsi      # 0x30f6
movl $0xa, %edx
movq %rax, %rdi
callq 0x10e0
movq %r14, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x1110
leaq 0x1346(%rip), %rsi      # 0x311c
movl $0x1, %edx
movq %rax, %rdi
callq 0x10e0
incl 0x30(%rbx)
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x1dfb
movq -0x28(%rbp), %rsi
subq %rdi, %rsi
callq 0x10d0
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x1e10
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x10d0
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1e22
movq %rax, %rbx
jmp 0x1e3a
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x1e3a
movq -0x28(%rbp), %rsi
subq %rdi, %rsi
callq 0x10d0
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x1e4f
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x10d0
movq %rbx, %rdi
callq 0x1160
nop
// File: /workspace/github_cpp_makefile_star2_O1/js850[P]lbfgs_cpp/lbfgs.cpp
// Function: LBFGS_ns::LBFGS::run()
void LBFGS::run()
{
  // iterate until the stop criterion is satisfied or maximum number of
  // iterations is reached
  while (iter_number_ < maxiter_)
  {
    if (stop_criterion_satisfied()){
      break;
    }
    one_iteration();
  }
}

// Assembly:
movl 0x30(%rdi), %eax
cmpl 0x28(%rdi), %eax
jge 0x29a9
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsd 0x10(%rbx), %xmm0
ucomisd 0x70(%rbx), %xmm0
jae 0x29a3
movq %rbx, %rdi
callq 0x1cc8
movl 0x30(%rbx), %eax
cmpl 0x28(%rbx), %eax
jl 0x2987
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/command.cc
// Function: microshell::core::CdBuiltin::invoke(microshell::core::Shell*)
int CdBuiltin::invoke(Shell *shell) {
  if(argv.size() > 1) {
    string dir = argv[1];
    // TODO(andrei) Centralized code to resolve path.
    // Example: shell->resolve(path)
    // Figures out if path is relative or absolute, resolves ~, .. etc.
    string full_path = util::merge_paths(shell->get_working_directory(), dir);
    if(util::is_directory(full_path)) {
      shell->set_working_directory(full_path);
      return 1;
    }
    else {
      shell->eout("cd: no such directory: " + dir);
      return 0;
    }
  }

  // TODO(andrei) Proper tilde expansion and home folder lookup.
  shell->set_working_directory("~");
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
subq %rax, %rcx
cmpq $0x21, %rcx
jb 0x66c2
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x38(%rbp), %rdi
callq 0x70a0
movq %rbx, %rdi
callq 0xabfc
leaq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rdx
movq %rax, %rsi
callq 0xbefb
leaq -0x58(%rbp), %rdi
callq 0xc32d
testb %al, %al
je 0x6703
movl $0x1, %r14d
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0xac06
jmp 0x6738
leaq -0x28(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x6a36(%rip), %rsi      # 0xd107
leaq 0x6a30(%rip), %rdx      # 0xd108
leaq -0x38(%rbp), %rdi
callq 0x713a
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0xac06
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0x66fb
callq 0x5230
movl $0x1, %r14d
jmp 0x6758
leaq 0x69e5(%rip), %rsi      # 0xd0ef
leaq -0x78(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x67fb
leaq -0x78(%rbp), %rsi
movq %rbx, %rdi
callq 0xa434
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6735
callq 0x5230
xorl %r14d, %r14d
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x674a
callq 0x5230
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x6758
callq 0x5230
movl %r14d, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6795
callq 0x5230
jmp 0x6795
jmp 0x6792
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
jne 0x67b5
jmp 0x67ba
movq %rax, %rbx
jmp 0x67ba
movq %rax, %rbx
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x67ac
callq 0x5230
jmp 0x67ac
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x67ba
callq 0x5230
movq %rbx, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/./shell.h
// Function: microshell::core::Shell::get()
static Shell* get() {
    if (nullptr == Shell::instance) {
      cerr << "Tried to access shell before initialization." << endl;
      ::exit(-1);
    }

    return Shell::instance;
  }

// Assembly:
leaq 0xeaaf(%rip), %rax      # 0x15278
movq (%rax), %rax
testq %rax, %rax
je 0x67d2
retq
pushq %rbp
movq %rsp, %rbp
movq 0xe813(%rip), %rdi      # 0x14ff0
leaq 0x6928(%rip), %rsi      # 0xd10c
callq 0x5250
movq %rax, %rdi
callq 0x5130
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x52e0
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/main.cc
// Function: handler(int)
void handler(int sig) {
  void *array[10];
  size_t size;

  size = backtrace(array, 10);

  fprintf(stderr, "Error: signal %d:\n", sig);
  backtrace_symbols_fd(array, size, STDERR_FILENO);
  exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movl %edi, %ebx
leaq -0x70(%rbp), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x5360
movl %eax, %r15d
movq 0xbb92(%rip), %rax      # 0x14fd0
movq (%rax), %rdi
leaq 0x4cc4(%rip), %rsi      # 0xe10c
movl %ebx, %edx
xorl %eax, %eax
callq 0x5330
movq %r14, %rdi
movl %r15d, %esi
movl $0x2, %edx
callq 0x53c0
movl $0x1, %edi
callq 0x52e0
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/main.cc
// Function: main
int main(int argc, char **argv) {
  // Enable stack traces on crashes.
  signal(SIGSEGV, handler);

  microshell::core::Shell *shell = microshell::core::Shell::initialize(util::argv_to_strvec(argc, argv));
  return shell->interactive();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movl %edi, %r14d
leaq -0x71(%rip), %rsi       # 0x9414
movl $0xb, %edi
callq 0x52d0
leaq -0x30(%rbp), %r15
movq %r15, %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0xbe5c
movq %r15, %rdi
callq 0x94dc
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x6c60
movq %rbx, %rdi
callq 0xa486
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x6c60
movq %rbx, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/shell.cc
// Function: microshell::core::Shell::exit()
void Shell::exit() {
  if(this->exit_requested) {
    this->fatal("Requested exit twice.");
  }

  // This way, the shell gets a chance to shut down in a clean fashion without
  // having to call `exit()'.
  // TODO(andrei) Test that nothing else is ever run after `exit_requested' is
  // set, no matter where.
  this->exit_requested = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpb $0x1, (%rdi)
je 0x9d35
movb $0x1, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x47e8(%rip), %rsi      # 0xe52c
leaq 0x47f6(%rip), %rdx      # 0xe541
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x713a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9ba4
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x9d73
callq 0x5230
movq %rbx, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/shell.cc
// Function: microshell::core::handle_sigtstp(int)
void handle_sigtstp(int signo) {
  Shell *shell = Shell::get();

  if(SIGTSTP != signo) {
    shell->fatal(
      "Signal mismatch.  Expecting SIGTSTP, got " +
      string(strsignal(signo)) +
      "."
    );
  }

  if(shell->get_waiting_for_child()) {
    shell->info("Suspending foreground job.  Use `fg' to continue it in the "
        "foreground, or `bg' to continue it in the background.");
  }

  // Otherwise, we just ignore the signal.
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %edi, %r14d
callq 0x67c2
movq %rax, %rbx
cmpl $0x14, %r14d
jne 0x9de6
cmpb $0x1, 0xe8(%rbx)
jne 0x9ddb
leaq -0x30(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x45f2(%rip), %rsi      # 0xe3a3
leaq 0x465b(%rip), %rdx      # 0xe413
leaq -0x40(%rbp), %rdi
callq 0x713a
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x9c10
movq -0x40(%rbp), %rdi
cmpq %r14, %rdi
je 0x9ddb
callq 0x5230
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %r14d, %edi
callq 0x5410
leaq -0x80(%rbp), %rdi
leaq -0x19(%rbp), %rdx
movq %rax, %rsi
callq 0x50f0
leaq 0x4574(%rip), %rcx      # 0xe379
leaq -0x80(%rbp), %rdi
movl $0x29, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x5290
leaq -0x50(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x9e38
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0x9e43
movq %rdx, -0x60(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x50(%rbp)
movq 0x8(%rax), %rdx
leaq -0x60(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x4611(%rip), %rsi      # 0xe476
callq 0x5450
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x9e8a
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x9e95
movq %rdx, -0x40(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x30(%rbp)
movq 0x8(%rax), %rdx
leaq -0x40(%rbp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0x9ba4
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x9ece
callq 0x5230
jmp 0x9ece
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x9ee1
callq 0x5230
jmp 0x9ee1
movq %rax, %rbx
leaq -0x70(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x9efc
jmp 0x9f08
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r14, %rdi
je 0x9f08
callq 0x5230
jmp 0x9f08
jmp 0x9f05
movq %rax, %rbx
movq %rbx, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/shell.cc
// Function: microshell::core::Shell::load_default_modules()
int Shell::load_default_modules() {
  this->load_module(
    make_shared<sample_module::SampleModule>(sample_module::SampleModule())
  );
  this->load_module(
    make_shared<job_control::JobControl>(job_control::JobControl())
  );
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq -0x38(%rbp), %r14
movq $0x0, (%r14)
movl $0x18, %edi
callq 0x5260
movabsq $0x100000001, %r15      # imm = 0x100000001
movq %r15, 0x8(%rax)
leaq 0xa980(%rip), %rcx      # 0x14cf8
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
leaq 0xa7ba(%rip), %rdx      # 0x14b40
addq $0x10, %rdx
movq %rdx, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %rcx, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb776
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0xa3ae
callq 0x6a96
leaq -0x28(%rbp), %r14
movq $0x0, (%r14)
movl $0x18, %edi
callq 0x5260
movq %r15, 0x8(%rax)
leaq 0xa97a(%rip), %rcx      # 0x14d48
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
leaq 0xa014(%rip), %rdx      # 0x143f0
addq $0x10, %rdx
movq %rdx, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %rcx, (%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb8c0
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0xa404
callq 0x6a96
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x20(%rbp), %rdi
jmp 0xa421
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0xa42b
callq 0x6a96
movq %rbx, %rdi
callq 0x5400
nop
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/shell.cc
// Function: microshell::core::Shell::interactive()
int Shell::interactive() {
  while (!exit_requested) {
    string command_text = read_command();
    if(0 == command_text.length()) {
      cout << endl;
      continue;
    }

    shared_ptr<Command> command;
    string error;
    if(parse_command(command_text, command, &error)) {
      interpret_command(*command);
    }
    else {
      eout(error);
    }
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
cmpb $0x0, (%rdi)
jne 0xa56f
movq %rdi, %rbx
leaq -0x50(%rbp), %r12
leaq -0x80(%rbp), %r14
movq 0xab16(%rip), %r15      # 0x14fc8
leaq -0x60(%rbp), %r13
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa5be
cmpq $0x0, -0x78(%rbp)
je 0xa504
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq %r12, -0x60(%rbp)
movq $0x0, -0x58(%rbp)
movb $0x0, -0x50(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
leaq -0x40(%rbp), %rdx
movq %r13, %rcx
callq 0xa6a0
testb %al, %al
je 0xa52d
movq -0x40(%rbp), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x10(%rax)
jmp 0xa538
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x5240
movsbl %al, %esi
movq %r15, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5180
jmp 0xa554
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa434
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0xa546
callq 0x5230
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xa554
callq 0x6a96
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0xa566
callq 0x5230
cmpb $0x0, (%rbx)
je 0xa4b6
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xa5a4
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0xa596
callq 0x5230
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xa5a4
callq 0x6a96
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0xa5b6
callq 0x5230
movq %rbx, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/shell.cc
// Function: microshell::core::Shell::read_command[abi:cxx11]()
string Shell::read_command() {
  unique_ptr<char> line(readline(get_prompt().c_str()));

  // This happens if e.g. the user enters an EOF character (C-D).
  if(!line) {
    this->exit();
    return "";
  }

  string command(line.get());
  if(command.size() > 0) {
    add_history(line.get());
  }
  return command;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0xaeb2
movq (%rbx), %rdi
callq 0x5220
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa5fa
callq 0x5230
testq %rbx, %rbx
je 0xa61f
leaq -0x38(%rbp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x50f0
cmpq $0x0, 0x8(%r14)
je 0xa640
movq %rbx, %rdi
callq 0x5310
jmp 0xa640
movq %r15, %rdi
callq 0x9d12
leaq 0x10(%r14), %rax
movq %rax, (%r14)
leaq 0x3ae9(%rip), %rdx      # 0xe11e
movq %r14, %rdi
movq %rdx, %rsi
callq 0x713a
testq %rbx, %rbx
je 0xa64d
movq %rbx, %rdi
callq 0x5230
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa675
jmp 0xa675
movq %rax, %r15
movq (%r14), %rdi
addq $0x10, %r14
cmpq %r14, %rdi
je 0xa678
callq 0x5230
jmp 0xa678
movq %rax, %r15
testq %rbx, %rbx
je 0xa697
movq %rbx, %rdi
jmp 0xa692
movq %rax, %r15
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa697
callq 0x5230
movq %r15, %rdi
callq 0x5400
nop
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/shell.cc
// Function: microshell::core::Shell::expand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
string Shell::expand(const string& param) const {
  // TODO(andrei) Variable expansions happen first.

  if(0 == param.find("~")) {
    string rest = param.substr(1);
    return util::merge_paths(home_directory, rest);
  }

  return param;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2600(%rip), %rsi      # 0xd107
movl $0x1, %ecx
movq %rdx, %rdi
xorl %edx, %edx
callq 0x53f0
testq %rax, %rax
je 0xab36
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x70a0
jmp 0xab75
leaq -0x40(%rbp), %r12
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rsi
movq $-0x1, %rcx
callq 0x5270
addq $0x60, %r14
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xbefb
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xab75
callq 0x5230
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xab9a
callq 0x5230
movq %rbx, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/shell.cc
// Function: microshell::core::Shell::resolve_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
string Shell::resolve_path(const string& path) const {
  if(util::is_absolute_path(path)) {
    return path;
  }

  // The VFS can handle the `..' sequences, but we want to handle them
  // ourselves in order to display the path in a clearer way.

  return util::merge_paths(working_directory, path);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %rdi
callq 0xbeb6
testb %al, %al
je 0xabdc
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x70a0
jmp 0xabee
addq $0x40, %r15
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xbefb
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/shell.cc
// Function: microshell::core::Shell::resolve_binary_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*) const
bool Shell::resolve_binary_name(const string& name, string* full_path) const {
  // No lookup needed for absolute paths.
  if(util::is_absolute_path(name)) {
    *full_path = name;
    return true;
  }

  // Search in our current directory.
  {
    string path = util::merge_paths(working_directory, name);
    if(util::is_file(path)) {
      *full_path = path;
      return true;
    }
  }

  // Search the PATH.
  for(const string& p : this->path) {
    string path = util::merge_paths(p, name);
    if(util::is_file(path)) {
      *full_path = path;
      return true;
    }
  }

  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r13
movq %rsi, %rdi
callq 0xbeb6
testb %al, %al
je 0xb073
movq %r12, %rdi
movq %rbx, %rsi
callq 0x5170
movb $0x1, %r12b
jmp 0xb13a
leaq 0x40(%r13), %rsi
leaq -0x48(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rdx
callq 0xbefb
movq %r14, %rdi
callq 0xc2c9
movl %eax, %r15d
testb %al, %al
je 0xb0a1
leaq -0x48(%rbp), %rsi
movq %r12, %rdi
callq 0x5170
movq %r12, -0x50(%rbp)
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb0b7
callq 0x5230
movb $0x1, %r12b
testb %r15b, %r15b
jne 0xb13a
movq 0x28(%r13), %r15
movq 0x30(%r13), %rax
movq %rax, -0x58(%rbp)
cmpq %rax, %r15
setne %r12b
je 0xb13a
leaq -0x48(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xbefb
movq %r13, %rdi
callq 0xc2c9
movl %eax, %r14d
testb %al, %al
je 0xb11a
movq -0x50(%rbp), %rdi
movq %r13, %rsi
callq 0x5170
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xb113
callq 0x5230
testb %r14b, %r14b
je 0xb12c
jmp 0xb13a
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xb12c
callq 0x5230
addq $0x20, %r15
cmpq -0x58(%rbp), %r15
setne %r12b
jne 0xb0d8
andb $0x1, %r12b
movl %r12d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0xb168
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xb172
callq 0x5230
movq %rbx, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/shell.cc
// Function: int microshell::core::Shell::load_module<microshell::modules::sample_module::SampleModule>(std::shared_ptr<microshell::modules::sample_module::SampleModule>)
int Shell::load_module(shared_ptr<MODULE_TYPE> module) {
  module->initialize(*this);
  auto builtins = module->get_builtins();
  for(auto bf = builtins.begin(); bf != builtins.end(); ++bf) {
    // TODO(andrei) Use managed memory in builtin registry.
    // TODO(andrei) Builtin factories should know the builtin's name.
    BuiltinRegistry::instance()->register_factory<MODULE_TYPE>(
      (*bf)->get_name(), *bf
    );
  }
  loaded_modules.push_back(module);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rsi
movq (%r14), %rdi
movq (%rdi), %rax
movq %rsi, -0x50(%rbp)
callq *(%rax)
movq (%r14), %rsi
movq (%rsi), %rax
leaq -0x68(%rbp), %r15
movq %r15, %rdi
callq *0x8(%rax)
movq (%r15), %r13
cmpq 0x8(%r15), %r13
je 0xb82b
leaq -0x30(%rbp), %r15
movq 0x9803(%rip), %rbx      # 0x14fc0
callq 0x6886
movq %rax, %r12
movq (%r13), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq (%r13), %rcx
movq %rcx, -0x38(%rbp)
movq 0x8(%r13), %rcx
movq %rcx, -0x30(%rbp)
testq %rcx, %rcx
je 0xb7f2
cmpb $0x0, (%rbx)
je 0xb7ee
incl 0x8(%rcx)
jmp 0xb7f2
lock
incl 0x8(%rcx)
movq %r12, %rdi
movq %rax, %rsi
callq 0x72f2
movq -0x38(%rbp), %rcx
movq %rcx, (%rax)
addq $0x8, %rax
movq %rax, %rdi
movq %r15, %rsi
callq 0x772a
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0xb821
callq 0x6a96
addq $0x10, %r13
cmpq -0x60(%rbp), %r13
jne 0xb7bd
movq -0x50(%rbp), %rdi
addq $0xd0, %rdi
movq (%r14), %rax
movq %rax, -0x48(%rbp)
movq 0x8(%r14), %rax
movq %rax, -0x40(%rbp)
testq %rax, %rax
je 0xb85f
movq 0x976f(%rip), %rcx      # 0x14fc0
cmpb $0x0, (%rcx)
je 0xb85b
incl 0x8(%rax)
jmp 0xb85f
lock
incl 0x8(%rax)
leaq -0x48(%rbp), %rsi
callq 0xbc1e
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0xb876
callq 0x6a96
leaq -0x68(%rbp), %rdi
callq 0xbbd2
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
jmp 0xb8a0
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0xb8af
callq 0x6a96
jmp 0xb8af
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0xbbd2
movq %rbx, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/util.cc
// Function: util::argv_to_strvec[abi:cxx11](int, char**)
vector<string> argv_to_strvec(int count, char** const argv) {
    vector<string> vargv;
    for(int i = 0; i < count; ++i) {
      vargv.emplace_back(argv[i]);
    }
    return vargv;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
testl %esi, %esi
jle 0xbe95
movq %rdx, %r14
movl %esi, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc404
addq $0x8, %r14
decq %r15
jne 0xbe81
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x6c60
movq %r14, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/util.cc
// Function: util::split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
std::vector<std::string> split(const std::string &s, char delim) {
    std::vector<std::string> elems;
    std::stringstream ss(s);
    std::string item;
    while (std::getline(ss, item, delim)) {
      elems.push_back(item);
    }
    return elems;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movl %edx, %r14d
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq -0x1d0(%rbp), %rdi
movl $0x18, %edx
callq 0x53b0
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movsbl %r14b, %r14d
leaq -0x1d0(%rbp), %r15
leaq -0x48(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x5440
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xc04f
movq %rbx, %rdi
movq %r12, %rsi
callq 0xc446
jmp 0xc026
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0xc05d
callq 0x5230
movq 0x8f44(%rip), %rsi      # 0x14fa8
leaq -0x1d0(%rbp), %rdi
callq 0x51c0
leaq -0x150(%rbp), %rdi
callq 0x50c0
movq %rbx, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0xc0c6
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0xc0a7
callq 0x5230
movq 0x8efa(%rip), %rsi      # 0x14fa8
leaq -0x1d0(%rbp), %rdi
callq 0x51c0
leaq -0x150(%rbp), %rdi
callq 0x50c0
movq %rbx, %rdi
callq 0x6c60
movq %r14, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/util.cc
// Function: util::merge_with(__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&, __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string merge_with(const std::vector<std::string>::iterator& start,
                         const std::vector<std::string>::iterator& end,
                         const std::string delimitator) {
    std::stringstream ss;
    for(auto it = start; it != end; ++it) {
      ss << *it;
      if(it + 1 != end) {
        ss << delimitator;
      }
    }

    return ss.str();
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq -0x1b0(%rbp), %rdi
callq 0x51a0
movq (%r12), %r13
cmpq %r13, (%r15)
je 0xc13f
leaq -0x1a0(%rbp), %r12
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r12, %rdi
callq 0x52a0
addq $0x20, %r13
cmpq (%r15), %r13
je 0xc13a
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r12, %rdi
callq 0x52a0
cmpq (%r15), %r13
jne 0xc112
leaq -0x198(%rbp), %rsi
movq %rbx, %rdi
callq 0x53a0
movq 0x8e53(%rip), %rsi      # 0x14fa8
leaq -0x1b0(%rbp), %rdi
callq 0x51c0
leaq -0x130(%rbp), %rdi
callq 0x50c0
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc184
movq %rax, %rbx
movq 0x8e1a(%rip), %rsi      # 0x14fa8
leaq -0x1b0(%rbp), %rdi
callq 0x51c0
leaq -0x130(%rbp), %rdi
callq 0x50c0
movq %rbx, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/util.cc
// Function: util::get_raw_array(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
char** get_raw_array(const std::vector<std::string>& v) {
    char** ret = new char*[v.size() + 1];
    for(size_t i = 0; i < v.size(); ++i) {
      ret[i] = ::strdup(v[i].c_str());
    }
    ret[v.size()] = nullptr;
    return ret;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r14
movq 0x8(%rdi), %r12
movq %r12, %r15
subq %r14, %r15
sarq $0x5, %r15
leaq 0x1(%r15), %rax
shrq $0x3d, %rax
leaq 0x8(,%r15,8), %rcx
xorl %edi, %edi
negq %rax
sbbq %rdi, %rdi
orq %rcx, %rdi
callq 0x5030
movq %rax, %rbx
cmpq %r14, %r12
je 0xc21b
cmpq $0x1, %r15
movq %r15, %r12
adcq $0x0, %r12
xorl %r13d, %r13d
movq (%r14), %rdi
callq 0x5430
movq %rax, (%rbx,%r13,8)
incq %r13
addq $0x20, %r14
cmpq %r13, %r12
jne 0xc203
movq $0x0, (%rbx,%r15,8)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/util.cc
// Function: util::getcwd(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
bool getcwd(std::string *cwd) {
    // Note: PATH_MAX might not be sufficient.
    // See: insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
    static char dir[PATH_MAX];
    if(::getcwd(dir, sizeof(dir))) {
      *cwd = std::string(dir);
      return true;
    }
    
    return false;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
leaq 0x9040(%rip), %r15      # 0x15290
movl $0x1000, %esi           # imm = 0x1000
movq %r15, %rdi
callq 0x5150
movq %rax, %rbx
testq %rax, %rax
je 0xc2a1
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq %r15, %rdi
callq 0x5110
leaq (%rax,%r15), %rdx
leaq -0x48(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x713a
movq %r14, %rdi
movq %r12, %rsi
callq 0x5300
movq (%r12), %rdi
cmpq %r13, %rdi
je 0xc2a1
callq 0x5230
testq %rbx, %rbx
setne %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/AndreiBarsan[P]uShell/util.cc
// Function: util::get_current_home[abi:cxx11]()
string get_current_home() {
    char* home;
    if(nullptr == (home = ::getenv("HOME"))) {
      home = ::getpwuid(::getuid())->pw_dir;
      return string(home);
    }
    else {
      string ret(home);
      return ret;
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x2439(%rip), %rdi      # 0xe7b7
callq 0x52f0
testq %rax, %rax
je 0xc3ad
movq %rax, %r14
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x5110
movq %r14, %rdx
addq %rax, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x713a
jmp 0xc3c9
callq 0x5140
movl %eax, %edi
callq 0x52c0
movq 0x20(%rax), %rsi
leaq -0x11(%rbp), %rdx
movq %rbx, %rdi
callq 0x50f0
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/szmer[P]brill/./src/corpus.cpp
// Function: Corpus::compare_corpora(Corpus*, Corpus*)
double Corpus::compare_corpora(Corpus * fst, Corpus * sec) {
	if(fst->sentences.size() != sec->sentences.size())
		throw "compare_corpora: unequal number of sentences!";

	int word_count = 0;
	int err_count = 0;

	for(unsigned int si = 0; si < fst->sentences.size(); si++) {
		if(fst->sentences[si].size() != sec->sentences[si].size())
			throw "compare_corpora: unequal size of one of the sentences!";

		word_count += fst->sentences[si].size(); // count each word

		for(unsigned int wi = 0; wi < fst->sentences[si].size(); wi++) // find actual disagreements
			if(fst->sentences[si][wi].tag != sec->sentences[si][wi].tag)
				err_count ++;
	}

	if(word_count == 0)
		throw "compare_corpora: corpora seem to be empty!";

	return ((double)word_count - (double)err_count) / (double)word_count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq (%rdi), %r8
movq 0x8(%rdi), %rcx
movq %rcx, %rax
subq %r8, %rax
movq (%rsi), %rdi
movq 0x8(%rsi), %rdx
movq %rdi, -0x48(%rbp)
subq %rdi, %rdx
cmpq %rdx, %rax
jne 0x2683
cmpq %r8, %rcx
je 0x2635
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rcx
movq %rcx, -0x38(%rbp)
xorl %eax, %eax
xorl %edi, %edi
xorl %r13d, %r13d
xorl %esi, %esi
movq %r8, -0x40(%rbp)
shlq $0x3, %rax
leaq (%rax,%rax,2), %rcx
movq (%r8,%rcx), %r15
movq 0x8(%r8,%rcx), %rax
movq %rax, %r11
subq %r15, %r11
movq -0x48(%rbp), %rdx
movq (%rdx,%rcx), %rbx
movq 0x8(%rdx,%rcx), %rcx
subq %rbx, %rcx
cmpq %rcx, %r11
jne 0x265e
movq %rdi, -0x50(%rbp)
movl %esi, -0x2c(%rbp)
sarq $0x6, %r11
cmpq %r15, %rax
je 0x2611
movl $0x28, %r12d
movl $0x1, %r14d
movq %r11, -0x58(%rbp)
movq (%r15,%r12), %rdx
movl $0x1, %ecx
cmpq (%rbx,%r12), %rdx
jne 0x25ff
testq %rdx, %rdx
je 0x25fd
movq -0x8(%rbx,%r12), %rsi
movq -0x8(%r15,%r12), %rdi
callq 0x21d0
movq -0x58(%rbp), %r11
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
jmp 0x25ff
xorl %ecx, %ecx
addl %ecx, %r13d
movl %r14d, %eax
addq $0x40, %r12
incl %r14d
cmpq %rax, %r11
ja 0x25cd
movl -0x2c(%rbp), %esi
addl %r11d, %esi
movq -0x50(%rbp), %rdi
incl %edi
movq %rdi, %rax
cmpq %rdi, -0x38(%rbp)
movq -0x40(%rbp), %r8
ja 0x257d
cvtsi2sd %r13d, %xmm1
jmp 0x263b
xorpd %xmm1, %xmm1
xorl %esi, %esi
testl %esi, %esi
je 0x2696
cvtsi2sd %esi, %xmm2
movapd %xmm2, %xmm0
subsd %xmm1, %xmm0
divsd %xmm2, %xmm0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x20f0
leaq 0x6a0f(%rip), %rcx      # 0x907e
movq %rcx, (%rax)
movq 0xa94f(%rip), %rsi      # 0xcfc8
movq %rax, %rdi
xorl %edx, %edx
callq 0x22e0
movl $0x8, %edi
callq 0x20f0
leaq 0x69bc(%rip), %rcx      # 0x9050
jmp 0x266f
movl $0x8, %edi
callq 0x20f0
leaq 0x6a0e(%rip), %rcx      # 0x90b5
jmp 0x266f
nop
// File: /workspace/github_cpp_makefile_star2_O1/szmer[P]brill/./src/corpus.cpp
// Function: Corpus::load_tagset[abi:cxx11](char const*)
vector<string> Corpus::load_tagset(const char* fname) {
	vector<string> tagset;
	ifstream ts_file(fname);

	char buff [256];
	while(ts_file.good()) {

		ts_file.getline(buff, 256);
		if(ts_file.gcount() == 256 && buff[255] != '\0')
			throw "load_tagset: tagset file has a line longer than 256 characters!";
		if(string(buff).size() > 0)
			tagset.push_back(string(buff));
	}

	return tagset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x328, %rsp            # imm = 0x328
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq -0x250(%rbp), %rdi
movl $0x8, %edx
callq 0x2340
movq -0x250(%rbp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, -0x230(%rbp,%rax)
jne 0x2cc0
leaq (%rax,%rbp), %rdi
addq $-0x250, %rdi           # imm = 0xFDB0
leaq -0x38(%rbp), %r13
leaq -0x350(%rbp), %r15
leaq -0x48(%rbp), %r12
movl $0xa, %esi
callq 0x2190
movsbl %al, %ecx
movl $0x100, %edx            # imm = 0x100
leaq -0x250(%rbp), %rdi
movq %r15, %rsi
callq 0x2360
cmpq $0x100, -0x248(%rbp) # imm = 0x100
jne 0x2c1e
cmpb $0x0, -0x251(%rbp)
jne 0x2ce1
movq %r13, -0x48(%rbp)
movq %r15, %rdi
callq 0x20d0
leaq (%rax,%rbp), %rdx
addq $-0x350, %rdx           # imm = 0xFCB0
movq %r12, %rdi
movq %r15, %rsi
callq 0x6e0c
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %r14
cmpq %r13, %rdi
je 0x2c59
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
testq %r14, %r14
je 0x2ca0
movq %r13, -0x48(%rbp)
movq %r15, %rdi
callq 0x20d0
leaq (%rax,%rbp), %rdx
addq $-0x350, %rdx           # imm = 0xFCB0
movq %r12, %rdi
movq %r15, %rsi
callq 0x6e0c
movq %rbx, %rdi
movq %r12, %rsi
callq 0x73ae
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x2ca0
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x250(%rbp), %rax
movq -0x18(%rax), %rax
leaq (%rax,%rbp), %rdi
addq $-0x250, %rdi           # imm = 0xFDB0
cmpl $0x0, 0x20(%rdi)
je 0x2be3
leaq -0x250(%rbp), %rdi
callq 0x2070
movq %rbx, %rax
addq $0x328, %rsp            # imm = 0x328
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x20f0
leaq 0x64b4(%rip), %rcx      # 0x91a6
movq %rcx, (%rax)
movq 0xa2cc(%rip), %rsi      # 0xcfc8
movq %rax, %rdi
xorl %edx, %edx
callq 0x22e0
movq %rax, %r14
jmp 0x2d3a
jmp 0x2d2b
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x2d2e
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x2d2e
jmp 0x2d2b
jmp 0x2d2b
movq %rax, %r14
leaq -0x250(%rbp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x61a0
movq %r14, %rdi
callq 0x2320