LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x9ca1
movb $0x1, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x487c(%rip), %rsi      # 0xe52c
leaq 0x488a(%rip), %rdx      # 0xe541
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x7140
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9b10
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x9cdf
callq 0x5230
movq %rbx, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O3/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 0x67ee
movq %rax, %rbx
cmpl $0x14, %r14d
jne 0x9d52
cmpb $0x1, 0xe8(%rbx)
jne 0x9d47
leaq -0x30(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x4686(%rip), %rsi      # 0xe3a3
leaq 0x46ef(%rip), %rdx      # 0xe413
leaq -0x40(%rbp), %rdi
callq 0x7140
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x9b7c
movq -0x40(%rbp), %rdi
cmpq %r14, %rdi
je 0x9d47
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 0x4608(%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 0x9da4
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0x9daf
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 0x46a5(%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 0x9df6
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x9e01
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 0x9b10
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x9e3a
callq 0x5230
jmp 0x9e3a
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x9e4d
callq 0x5230
jmp 0x9e4d
movq %rax, %rbx
leaq -0x70(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x9e68
jmp 0x9e74
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r14, %rdi
je 0x9e74
callq 0x5230
jmp 0x9e74
jmp 0x9e71
movq %rax, %rbx
movq %rbx, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl $0x18, %edi
callq 0x5260
movabsq $0x100000001, %r14      # imm = 0x100000001
movq %r14, 0x8(%rax)
leaq 0xaa37(%rip), %rcx      # 0x14cf8
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
leaq 0xa871(%rip), %rdx      # 0x14b40
addq $0x10, %rdx
movq %rdx, 0x10(%rax)
leaq -0x30(%rbp), %rsi
movq %rax, 0x8(%rsi)
movq %rcx, (%rsi)
movq %rbx, %rdi
callq 0xb6aa
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0xa2f8
callq 0x6abe
movl $0x18, %edi
callq 0x5260
movq %r14, 0x8(%rax)
leaq 0xaa3b(%rip), %rcx      # 0x14d48
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
leaq 0xa0d5(%rip), %rdx      # 0x143f0
addq $0x10, %rdx
movq %rdx, 0x10(%rax)
leaq -0x20(%rbp), %rsi
movq %rax, 0x8(%rsi)
movq %rcx, (%rsi)
movq %rbx, %rdi
callq 0xb7f4
movq -0x18(%rbp), %rdi
testq %rdi, %rdi
je 0xa344
callq 0x6abe
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x18(%rbp), %rdi
jmp 0xa35f
movq %rax, %rbx
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0xa369
callq 0x6abe
movq %rbx, %rdi
callq 0x5400
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xa4ad
movq %rdi, %rbx
leaq -0x50(%rbp), %r12
leaq -0x80(%rbp), %r14
movq 0xabd8(%rip), %r15      # 0x14fc8
leaq -0x60(%rbp), %r13
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa4fc
cmpq $0x0, -0x78(%rbp)
je 0xa442
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 0xa5d0
testb %al, %al
je 0xa46b
movq -0x40(%rbp), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x10(%rax)
jmp 0xa476
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 0xa492
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa372
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0xa484
callq 0x5230
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xa492
callq 0x6abe
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0xa4a4
callq 0x5230
cmpb $0x0, (%rbx)
je 0xa3f4
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xa4e2
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0xa4d4
callq 0x5230
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0xa4e2
callq 0x6abe
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0xa4f4
callq 0x5230
movq %rbx, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O3/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, %rbx
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0xadec
movq (%r14), %rdi
callq 0x5220
movq %rax, %r14
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa538
callq 0x5230
testq %r14, %r14
je 0xa565
leaq -0x38(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x50f0
cmpq $0x0, 0x8(%rbx)
je 0xa55b
movq %r14, %rdi
callq 0x5310
movq %r14, %rdi
callq 0x5230
jmp 0xa586
movq %r15, %rdi
callq 0x9c7e
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x3ba3(%rip), %rdx      # 0xe11e
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x7140
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0xa5ad
callq 0x5230
jmp 0xa5ad
movq %rax, %r15
movq %r14, %rdi
jmp 0xa5c2
movq %rax, %r15
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa5c7
callq 0x5230
movq %r15, %rdi
callq 0x5400
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x26c6(%rip), %rsi      # 0xd107
movl $0x1, %ecx
movq %rdx, %rdi
xorl %edx, %edx
callq 0x53f0
testq %rax, %rax
je 0xaa70
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x70a2
jmp 0xaaaf
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 0xbe1f
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xaaaf
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 0xaad4
callq 0x5230
movq %rbx, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O3/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 0xbdda
testb %al, %al
je 0xab16
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x70a2
jmp 0xab28
addq $0x40, %r15
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xbe1f
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movq %rsi, %rdi
callq 0xbdda
testb %al, %al
je 0xafad
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5170
movb $0x1, %r15b
jmp 0xb066
leaq 0x40(%r12), %rsi
leaq -0x48(%rbp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0xbe1f
movq %r15, %rdi
callq 0xc1ed
movl %eax, %r13d
testb %al, %al
je 0xafdc
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x5170
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xafee
callq 0x5230
movb $0x1, %r15b
testb %r13b, %r13b
jne 0xb066
movq %rbx, -0x50(%rbp)
movq 0x28(%r12), %r13
movq 0x30(%r12), %rbx
cmpq %rbx, %r13
je 0xb042
leaq -0x48(%rbp), %r12
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0xbe1f
movq %r12, %rdi
callq 0xc1ed
testb %al, %al
jne 0xb047
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xb039
callq 0x5230
addq $0x20, %r13
cmpq %rbx, %r13
jne 0xb00d
xorl %r15d, %r15d
jmp 0xb066
leaq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x5170
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xb066
callq 0x5230
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb087
movq %rax, %r14
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0xb092
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xb09c
callq 0x5230
movq %r14, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O3/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 0xb75f
leaq -0x30(%rbp), %r15
movq 0x98cf(%rip), %rbx      # 0x14fc0
callq 0x68b2
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 0xb726
cmpb $0x0, (%rbx)
je 0xb722
incl 0x8(%rcx)
jmp 0xb726
lock
incl 0x8(%rcx)
movq %r12, %rdi
movq %rax, %rsi
callq 0x72f6
movq -0x38(%rbp), %rcx
movq %rcx, (%rax)
addq $0x8, %rax
movq %rax, %rdi
movq %r15, %rsi
callq 0x7724
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0xb755
callq 0x6abe
addq $0x10, %r13
cmpq -0x60(%rbp), %r13
jne 0xb6f1
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 0xb793
movq 0x983b(%rip), %rcx      # 0x14fc0
cmpb $0x0, (%rcx)
je 0xb78f
incl 0x8(%rax)
jmp 0xb793
lock
incl 0x8(%rax)
leaq -0x48(%rbp), %rsi
callq 0xbb50
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0xb7aa
callq 0x6abe
leaq -0x68(%rbp), %rdi
callq 0xbafa
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 0xb7d4
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0xb7e3
callq 0x6abe
jmp 0xb7e3
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0xbafa
movq %rbx, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O3/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 0xbdb9
movq %rdx, %r14
movl %esi, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc328
addq $0x8, %r14
decq %r15
jne 0xbda5
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x6c6c
movq %r14, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O3/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 0xbf73
movq %rbx, %rdi
movq %r12, %rsi
callq 0xc36a
jmp 0xbf4a
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0xbf81
callq 0x5230
movq 0x9020(%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 0xbfea
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0xbfcb
callq 0x5230
movq 0x8fd6(%rip), %rsi      # 0x14fa8
leaq -0x1d0(%rbp), %rdi
callq 0x51c0
leaq -0x150(%rbp), %rdi
callq 0x50c0
movq %rbx, %rdi
callq 0x6c6c
movq %r14, %rdi
callq 0x5400
// File: /workspace/github_cpp_makefile_star2_O3/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 0xc063
leaq -0x1a0(%rbp), %r12
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r12, %rdi
callq 0x52a0
addq $0x20, %r13
cmpq (%r15), %r13
je 0xc063
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r12, %rdi
callq 0x52a0
cmpq (%r15), %r13
jne 0xc036
leaq -0x198(%rbp), %rsi
movq %rbx, %rdi
callq 0x53a0
movq 0x8f2f(%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 0xc0a8
movq %rax, %rbx
movq 0x8ef6(%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_O3/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 0x911c(%rip), %r15      # 0x15290
movl $0x1000, %esi           # imm = 0x1000
movq %r15, %rdi
callq 0x5150
movq %rax, %rbx
testq %rax, %rax
je 0xc1c5
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 0x7140
movq %r14, %rdi
movq %r12, %rsi
callq 0x5300
movq (%r12), %rdi
cmpq %r13, %rdi
je 0xc1c5
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_O3/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 0x2515(%rip), %rdi      # 0xe7b7
callq 0x52f0
testq %rax, %rax
je 0xc2d1
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 0x7140
jmp 0xc2ed
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_O3/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 $0x28, %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 0x2689
cmpq %r8, %rcx
je 0x2676
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rcx
movq %rcx, -0x38(%rbp)
xorl %eax, %eax
xorl %r9d, %r9d
xorl %edi, %edi
xorl %esi, %esi
movq %r8, -0x40(%rbp)
shlq $0x3, %rax
leaq (%rax,%rax,2), %rcx
movq (%r8,%rcx), %r12
movq 0x8(%r8,%rcx), %rax
movq %rax, %r14
subq %r12, %r14
movq -0x48(%rbp), %rdx
movq (%rdx,%rcx), %r11
movq 0x8(%rdx,%rcx), %rcx
subq %r11, %rcx
cmpq %rcx, %r14
jne 0x2651
movq %r9, -0x50(%rbp)
movl %esi, -0x2c(%rbp)
sarq $0x6, %r14
cmpq %r12, %rax
je 0x260c
movl $0x28, %r15d
movl $0x1, %r13d
movq (%r12,%r15), %rdx
cmpq (%r11,%r15), %rdx
jne 0x25fb
testq %rdx, %rdx
je 0x25fd
movq -0x8(%r11,%r15), %rsi
movl %edi, -0x30(%rbp)
movq -0x8(%r12,%r15), %rdi
movq %r11, %rbx
callq 0x21d0
movq %rbx, %r11
movl -0x30(%rbp), %edi
cmpl $0x1, %eax
sbbl $-0x1, %edi
jmp 0x25fd
incl %edi
movl %r13d, %eax
addq $0x40, %r15
incl %r13d
cmpq %rax, %r14
ja 0x25c9
movl -0x2c(%rbp), %esi
addl %r14d, %esi
movq -0x50(%rbp), %r9
incl %r9d
movq %r9, %rax
cmpq %r9, -0x38(%rbp)
movq -0x40(%rbp), %r8
ja 0x257d
testl %esi, %esi
je 0x2676
cvtsi2sd %edi, %xmm1
cvtsi2sd %esi, %xmm2
movapd %xmm2, %xmm0
subsd %xmm1, %xmm0
divsd %xmm2, %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x20f0
leaq 0x6a1c(%rip), %rcx      # 0x907e
movq %rcx, (%rax)
movq 0xa95c(%rip), %rsi      # 0xcfc8
movq %rax, %rdi
xorl %edx, %edx
callq 0x22e0
movl $0x8, %edi
callq 0x20f0
leaq 0x6a2e(%rip), %rcx      # 0x90b5
jmp 0x2662
movl $0x8, %edi
callq 0x20f0
leaq 0x69b6(%rip), %rcx      # 0x9050
jmp 0x2662
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2cae
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 0x2c0c
cmpb $0x0, -0x251(%rbp)
jne 0x2ccf
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 0x6eb4
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %r14
cmpq %r13, %rdi
je 0x2c47
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
testq %r14, %r14
je 0x2c8e
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 0x6eb4
movq %rbx, %rdi
movq %r12, %rsi
callq 0x746a
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x2c8e
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 0x2bd1
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 0x64c6(%rip), %rcx      # 0x91a6
movq %rcx, (%rax)
movq 0xa2de(%rip), %rsi      # 0xcfc8
movq %rax, %rdi
xorl %edx, %edx
callq 0x22e0
movq %rax, %r14
jmp 0x2d28
jmp 0x2d19
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x2d1c
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x2d1c
jmp 0x2d19
jmp 0x2d19
movq %rax, %r14
leaq -0x250(%rbp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x6230
movq %r14, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O3/szmer[P]brill/Brill-test.cpp
// Function: main
int main(int argc, char ** argv) {

	if(argc != 4) {
		cout << "Usage: Brill-test CORPUS_FILE TAGSET_FILE TRANSFORMATIONS_FILE" << endl;
		return 1;
	}

	try {
		Corpus base_corp = Corpus::load_file(argv[1]);
		RulesApplier appl(argv[2], argv[3], & base_corp);

		appl.transform(& base_corp); // discard returned corpus, we need only the scores

		cout << "Unigrams: " << appl.baseline_score << endl;
		cout << "Transformations: " << appl.final_score << endl;
	}

	catch(const char * e) {
		cout << e << endl;
		return 1;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
cmpl $0x4, %edi
jne 0x5f77
movq %rsi, %rbx
movq 0x8(%rsi), %rsi
leaq -0x58(%rbp), %rdi
callq 0x269c
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
leaq -0xd0(%rbp), %rdi
leaq -0x58(%rbp), %rcx
callq 0x505c
leaq -0x118(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x558c
leaq -0x100(%rbp), %rdi
callq 0x6960
leaq -0x118(%rbp), %rdi
callq 0x67cc
movq 0x7149(%rip), %rdi      # 0xcfd8
leaq 0x3541(%rip), %rsi      # 0x93d7
movl $0xa, %edx
callq 0x2200
movsd -0x68(%rbp), %xmm0
movq 0x712c(%rip), %rdi      # 0xcfd8
callq 0x22a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq 0x70f6(%rip), %rdi      # 0xcfd8
leaq 0x34f9(%rip), %rsi      # 0x93e2
movl $0x11, %edx
callq 0x2200
movsd -0x60(%rbp), %xmm0
movq 0x70d9(%rip), %rdi      # 0xcfd8
callq 0x22a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
leaq -0xa0(%rbp), %rbx
movq %rbx, %rdi
callq 0x6960
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x5f55
movq -0xa8(%rbp), %rsi
subq %rdi, %rsi
callq 0x21c0
leaq -0xd0(%rbp), %rdi
callq 0x6230
leaq -0x40(%rbp), %rdi
callq 0x6960
leaq -0x58(%rbp), %rdi
callq 0x67cc
xorl %eax, %eax
jmp 0x5fbe
movq 0x705a(%rip), %rbx      # 0xcfd8
leaq 0x3413(%rip), %rsi      # 0x9398
movl $0x3e, %edx
movq %rbx, %rdi
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movl $0x1, %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r14
popq %rbp
retq
movq %rdx, %r14
movq %rax, %rbx
jmp 0x5fec
movq %rdx, %r14
movq %rax, %rbx
jmp 0x5ffe
movq %rdx, %r14
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
callq 0x6796
leaq -0x40(%rbp), %rdi
callq 0x6960
leaq -0x58(%rbp), %rdi
callq 0x67cc
cmpl $0x1, %r14d
jne 0x6032
movq %rbx, %rdi
callq 0x20c0
movq 0x6fc5(%rip), %rdi      # 0xcfd8
movq %rax, %rsi
callq 0x21a0
movq %rax, %rdi
callq 0x20e0
callq 0x22c0
jmp 0x5fb9
movq %rax, %rbx
callq 0x22c0
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O3/rapirent[P]JPEG/decoder.c
// Function: read_ht(_IO_FILE*)
void read_ht(FILE* fp)
{
    byte huffman_length[16];
    int len = read_word_to_bigendian(fp);
    len = len - 2;
    int ht_node_num;
    byte ht_length;
    byte class_id;
    byte ht_value;
    while (len > 0) {
        fread(&class_id,1,1,fp);
        len--;
        ht_node_num = 0;
        for(int i = 0; i<16; i++) {
            fread(&(ht_length),1,1,fp);
            huffman_length[i] = ht_length;
            len--;
            ht_node_num += huffman_length[i];
        }

        huffman_tables[huffman_table_index(class_id)].ht_node_num = ht_node_num;
        huffman_leaf* ht_leaf = (huffman_leaf*)malloc((ht_node_num)*sizeof(
                                    huffman_leaf));
        word codeword = 0;
        for(int height=0, leaf_index = 0; height<16; height++) {
            for(int j = 0; j<huffman_length[height]; j++) {

                fread(&(ht_value),1,1,fp);
                len--;
                ht_leaf[leaf_index].value = ht_value;
                ht_leaf[leaf_index].codeword = (codeword++);
                ht_leaf[leaf_index].codeword_len = height+1;
                leaf_index++;
            }
            codeword = codeword<<1;
        }
        huffman_tables[huffman_table_index(class_id)].start = ht_leaf;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r13
callq 0x536c
cmpw $0x3, %ax
jb 0x57db
movzwl %ax, %r15d
addl $-0x2, %r15d
leaq 0x5(%rsp), %r12
leaq 0x6(%rsp), %rbx
movq %r13, 0x18(%rsp)
movl $0x1, %esi
movl $0x1, %edx
leaq 0x7(%rsp), %rdi
movq %r13, %rcx
callq 0x51b0
xorl %r14d, %r14d
xorl %ebp, %ebp
movl $0x1, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rcx
callq 0x51b0
movzbl 0x5(%rsp), %eax
movb %al, 0x30(%rsp,%r14)
addl %eax, %ebp
incq %r14
cmpq $0x10, %r14
jne 0x56b5
addl $-0x11, %r15d
movzbl 0x7(%rsp), %edi
movl %edi, 0x8(%rsp)
callq 0x53e4
shll $0x4, %eax
leaq 0x6585(%rip), %rcx      # 0xbc80
movl %ebp, 0x8(%rax,%rcx)
movl %ebp, %eax
shlq $0x2, %rax
leaq (%rax,%rax,2), %rdi
callq 0x5180
movq %rax, 0x20(%rsp)
addq $0x8, %rax
movq %rax, 0x28(%rsp)
xorl %ebp, %ebp
xorl %ecx, %ecx
xorl %eax, %eax
movzbl 0x30(%rsp,%rbp), %edi
incq %rbp
testl %edi, %edi
je 0x57aa
movl %r15d, 0x14(%rsp)
movl %ecx, 0x10(%rsp)
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x28(%rsp), %rdx
leaq (%rdx,%rcx,4), %r15
movl %edi, 0xc(%rsp)
movl %edi, %r13d
negl %r13d
xorl %r14d, %r14d
movl %eax, %r12d
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rdi
movq 0x18(%rsp), %rcx
callq 0x51b0
movb 0x6(%rsp), %al
movb %al, (%r15)
leal 0x1(%r12), %eax
movw %r12w, -0x8(%r15)
movl %ebp, -0x4(%r15)
addq $0xc, %r15
decl %r14d
cmpl %r14d, %r13d
jne 0x5754
movl 0x14(%rsp), %r15d
subl 0xc(%rsp), %r15d
movl 0x10(%rsp), %ecx
subl %r14d, %ecx
leaq 0x5(%rsp), %r12
movq 0x18(%rsp), %r13
addl %eax, %eax
cmpq $0x10, %rbp
jne 0x5722
movl 0x8(%rsp), %edi
callq 0x53e4
shll $0x4, %eax
leaq 0x64b7(%rip), %rcx      # 0xbc80
movq 0x20(%rsp), %rdx
movq %rdx, (%rax,%rcx)
testl %r15d, %r15d
jg 0x5699
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/rapirent[P]JPEG/decoder.c
// Function: read_sos(_IO_FILE*)
void read_sos(FILE* fp)
{
    int len = read_word_to_bigendian(fp);
    byte component_num;
    fread(&component_num,1,1,fp);
    assert(len == 6+2*component_num);
    len = len - 3;
    assert(component_num==3);//JFIF defined
    byte component_id,destination;
    for (int i =0; i<component_num; i++) {

        fread(&component_id,1,1,fp);
        fread(&destination,1,1,fp);
        len = len-2;
        component_mapping_huffman[component_id-1] = destination;
    }
    fread(&destination,1,1,fp);
    fread(&destination,1,1,fp);
    fread(&destination,1,1,fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x536c
movzwl %ax, %ebp
leaq 0x7(%rsp), %r14
movl $0x1, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x51b0
movzbl (%r14), %r12d
leal 0x6(,%r12,2), %eax
cmpl %ebp, %eax
jne 0x58d9
cmpl $0x3, %r12d
jne 0x58f8
leaq 0x6(%rsp), %r14
leaq 0x5(%rsp), %r15
leaq 0x6477(%rip), %r13      # 0xbcc0
movl $0x1, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x51b0
movl $0x1, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x51b0
movb 0x5(%rsp), %al
movzbl 0x6(%rsp), %ecx
movb %al, -0x1(%rcx,%r13)
decl %r12d
jne 0x5849
leaq 0x5(%rsp), %r14
movl $0x1, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x51b0
movl $0x1, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x51b0
movl $0x1, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x51b0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1fef(%rip), %rdi      # 0x78cf
leaq 0x2001(%rip), %rsi      # 0x78e8
leaq 0x2004(%rip), %rcx      # 0x78f2
movl $0xab, %edx
callq 0x5090
leaq 0x2009(%rip), %rdi      # 0x7908
leaq 0x1fe2(%rip), %rsi      # 0x78e8
leaq 0x1fe5(%rip), %rcx      # 0x78f2
movl $0xad, %edx
callq 0x5090
// File: /workspace/github_cpp_makefile_star2_O3/rapirent[P]JPEG/decoder.c
// Function: read_one_bit(_IO_FILE*)
byte read_one_bit(FILE *fp)
{
    static byte buffer;
    static byte count = 0;
    byte check_ff00;
    if (!count) {
        fread(&buffer,1,1,fp);
        if (buffer == 0xff) {
            byte check_ff00;
            fread(&check_ff00,1,1,fp);
            if (check_ff00 != 0x00) {
                printf("missing 0xff00 sequence!");
                exit(1);
            }
        }
    }
    byte bit = (buffer >> (7 - count))&0x01;
    count = (count == 7 ? 0 : count + 1);
    return bit;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, 0x65af(%rip)      # 0xbed1
jne 0x5969
movq %rdi, %rbx
leaq 0x65a2(%rip), %rdi      # 0xbed0
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x51b0
cmpb $-0x1, 0x6589(%rip)     # 0xbed0
jne 0x5969
leaq 0x7(%rsp), %r14
movl $0x1, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x51b0
cmpb $0x0, (%r14)
jne 0x599d
movzbl 0x6560(%rip), %eax      # 0xbed0
movb 0x655b(%rip), %cl       # 0xbed1
leal 0x1(%rcx), %edx
xorl %esi, %esi
subb $0x7, %cl
movzbl %dl, %edx
cmovel %esi, %edx
negb %cl
movzbl %cl, %ecx
btl %ecx, %eax
setb %al
movb %dl, 0x653c(%rip)       # 0xbed1
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1f75(%rip), %rdi      # 0x7919
xorl %eax, %eax
callq 0x5040
movl $0x1, %edi
callq 0x5160
// File: /workspace/github_cpp_makefile_star2_O3/rapirent[P]JPEG/decoder.c
// Function: codeword_decode(_IO_FILE*, unsigned char)
int codeword_decode (FILE *fp, byte need_read_length)
{
    byte leading = read_one_bit(fp);
    int decoding_code = 1;
    byte c;
    for (int i = 1; i < need_read_length; i++) {
        c = read_one_bit(fp);
        decoding_code = decoding_code << 1;
        decoding_code += leading ? c : !c;
    }
    decoding_code = leading ? decoding_code: -decoding_code;
    return decoding_code;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x5917
movl %eax, %ebp
movl $0x1, %r15d
cmpb $0x2, %bl
jb 0x59f3
decl %ebx
movl $0x1, %r15d
movq %r14, %rdi
callq 0x5917
xorb %bpl, %al
xorb $0x1, %al
movzbl %al, %eax
leal (%rax,%r15,2), %r15d
decl %ebx
jne 0x59db
movl %r15d, %eax
negl %eax
testb %bpl, %bpl
cmovnel %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/rapirent[P]JPEG/decoder.c
// Function: decode_huffman(_IO_FILE*, int)
byte decode_huffman(FILE *fp, int huffman_table_id)
{
    huffman_leaf* huffman_table = huffman_tables[huffman_table_id].start;
    int ht_node_num = huffman_tables[huffman_table_id].ht_node_num;
    word codeword = 0x0000;
    for(int i = 0; i<16; i++) {
        codeword =codeword<<1;
        codeword |= (word)read_one_bit(fp);
        for(int j = 0; j<ht_node_num; j++) {
            if(huffman_table[j].codeword==codeword&&huffman_table[j].codeword_len==(i+1)) {
                return huffman_table[j].value;
            }
        }
    }
    printf("do not find\n");
    exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq %esi, %rax
shlq $0x4, %rax
leaq 0x625a(%rip), %rcx      # 0xbc80
movq (%rax,%rcx), %r14
movl 0x8(%rax,%rcx), %r15d
movq %r15, %rax
shlq $0x2, %rax
leaq (%rax,%rax,2), %r12
xorl %r13d, %r13d
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x5917
andl $0x7fff, %ebp           # imm = 0x7FFF
incl %r13d
movzbl %al, %eax
leal (%rax,%rbp,2), %ebp
testl %r15d, %r15d
jle 0x5a76
xorl %eax, %eax
movzwl (%r14,%rax), %ecx
cmpl %ecx, %ebp
jne 0x5a6d
cmpl %r13d, 0x4(%r14,%rax)
je 0x5a92
addq $0xc, %rax
cmpq %rax, %r12
jne 0x5a5d
cmpl $0x10, %r13d
jne 0x5a3f
leaq 0x1fc5(%rip), %rdi      # 0x7a48
callq 0x51d0
movl $0x1, %edi
callq 0x5160
movb 0x8(%r14,%rax), %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/AndreRenaud[P]simple_options/demo_app.c
// Function: main
int main(int argc, const char *argv[])
{
	const char *file = NULL;
	int64_t val = 5;
	struct option_entry entries[] = {
		{"file", 'f', "File to load", OPTION_FLAG_string, .string = &file},
		{"number", 'n', "Number", OPTION_FLAG_int, .integer = &val},
		{"desc", 0, NULL, OPTION_FLAG_required},
		{NULL, 0},
	};
	int extra_args = opt_parse(argc, argv, entries);
	if (extra_args < 0) {
		opt_parse_usage(eprintf, argv[0], entries);
		return -1;
	}
	printf("file: %s (%spresent)\n", file, opt_parse_present('f', entries) ? "" : "not ");
	printf("number: %lld (%spresent)\n", (long long int)val, opt_parse_present('n', entries) ? "" : "not ");
	for (int i = extra_args; i < argc; i++) {
		printf("Extra arg %d: %s\n", i, argv[i]);
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r14
movl %edi, %ebx
leaq 0x8(%rsp), %rax
movq $0x0, (%rax)
movq %rsp, %rcx
movq $0x5, (%rcx)
leaq 0x7df(%rip), %rsi       # 0x20c6
leaq 0x10(%rsp), %rdx
movq %rsi, (%rdx)
movb $0x66, 0x8(%rdx)
leaq 0x7d1(%rip), %rsi       # 0x20cb
movq %rsi, 0x10(%rdx)
movl $0x4, 0x18(%rdx)
movq %rax, 0x20(%rdx)
xorl %ebp, %ebp
movb %bpl, 0x28(%rdx)
leaq 0x7c2(%rip), %rax       # 0x20d8
movq %rax, 0x30(%rdx)
movb $0x6e, 0x38(%rdx)
leaq 0x7ba(%rip), %rax       # 0x20df
movq %rax, 0x40(%rdx)
movl $0x2, 0x48(%rdx)
movq %rcx, 0x50(%rdx)
movb %bpl, 0x58(%rdx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rdx)
movaps %xmm0, 0x70(%rdx)
movaps %xmm0, 0x80(%rdx)
leaq 0x795(%rip), %rax       # 0x20e6
movq %rax, 0x60(%rdx)
movl $0x10, 0x78(%rdx)
movaps %xmm0, 0x90(%rdx)
movaps %xmm0, 0xa0(%rdx)
movaps %xmm0, 0xb0(%rdx)
movq %r14, %rsi
callq 0x13ee
testl %eax, %eax
js 0x1a28
movl %eax, %r15d
movq 0x8(%rsp), %r12
leaq 0x10(%rsp), %rsi
movl $0x66, %edi
callq 0x17a8
leaq 0x6a6(%rip), %rcx       # 0x2045
leaq 0x75b(%rip), %r13       # 0x2101
testb %al, %al
movq %r13, %rdx
cmovneq %rcx, %rdx
leaq 0x735(%rip), %rdi       # 0x20eb
movq %r12, %rsi
xorl %eax, %eax
callq 0x1080
movq (%rsp), %r12
movl $0x6e, %edi
leaq 0x10(%rsp), %rsi
callq 0x17a8
testb %al, %al
leaq 0x669(%rip), %rax       # 0x2045
cmovneq %rax, %r13
leaq 0x71f(%rip), %rdi       # 0x2106
movq %r12, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x1080
cmpl %ebx, %r15d
jge 0x1a41
movl %r15d, %eax
leaq (%r14,%rax,8), %r12
leaq 0x719(%rip), %r14       # 0x2120
xorl %ebp, %ebp
movq (%r12), %rdx
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x1080
addq $0x8, %r12
incl %r15d
cmpl %ebx, %r15d
jl 0x1a09
jmp 0x1a41
movq (%r14), %rsi
leaq -0x962(%rip), %rdi      # 0x10d0
leaq 0x10(%rsp), %rdx
callq 0x125c
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/common.cpp
// Function: NuttallWindow(int, double*)
void NuttallWindow(int y_length, double *y) {
  double tmp;
  for (int i = 0; i < y_length; ++i) {
    tmp  = static_cast<double>(i) / (y_length - 1);
    y[i] = 0.355768 - 0.487396 * cos(2.0 * world::kPi * tmp) +
      0.144232 * cos(4.0 * world::kPi * tmp) -
      0.012604 * cos(6.0 * world::kPi * tmp);
  }
}

// Assembly:
testl %edi, %edi
jle 0x19bf
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
leal -0x1(%rdi), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x18(%rsp)
movl %edi, %r14d
xorl %r15d, %r15d
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
divsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
mulsd 0xd6e7(%rip), %xmm0     # 0xf028
callq 0x11b0
mulsd 0xd6e2(%rip), %xmm0     # 0xf030
addsd 0xd6e2(%rip), %xmm0     # 0xf038
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
mulsd 0xd6d6(%rip), %xmm0     # 0xf040
callq 0x11b0
mulsd 0xd6d1(%rip), %xmm0     # 0xf048
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
mulsd 0xd6bf(%rip), %xmm0     # 0xf050
callq 0x11b0
mulsd 0xd6ba(%rip), %xmm0     # 0xf058
addsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rbx,%r15,8)
incq %r15
cmpq %r15, %r14
jne 0x1925
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/common.cpp
// Function: DestroyMinimumPhaseAnalysis(MinimumPhaseAnalysis*)
void DestroyMinimumPhaseAnalysis(MinimumPhaseAnalysis *minimum_phase) {
  fft_destroy_plan(minimum_phase->forward_fft);
  fft_destroy_plan(minimum_phase->inverse_fft);
  delete[] minimum_phase->cepstrum;
  delete[] minimum_phase->log_spectrum;
  delete[] minimum_phase->minimum_phase_spectrum;
}

// Assembly:
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
leaq 0x68(%rdi), %rsi
movl $0x9, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x8a2a
leaq 0x20(%rbx), %rsi
movl $0x9, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x8a2a
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x1df5
callq 0x1110
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x1e03
callq 0x1110
movq 0x10(%rbx), %rdi
addq $0x50, %rsp
testq %rdi, %rdi
je 0x1e16
popq %rbx
jmp 0x1110
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/dio.cpp
// Function: (anonymous namespace)::SelectBestF0(double, double, double**, int, int, double)
double SelectBestF0(double current_f0, double past_f0, double **f0_candidates,
    int number_of_candidates, int target_index, double allowed_range) {
  double reference_f0 = (current_f0 * 3.0 - past_f0) / 2.0;

  double minimum_error = fabs(reference_f0 - f0_candidates[0][target_index]);
  double best_f0 = f0_candidates[0][target_index];

  double current_error;
  for (int i = 1; i < number_of_candidates; ++i) {
    current_error = fabs(reference_f0 - f0_candidates[i][target_index]);
    if (current_error < minimum_error) {
      minimum_error = current_error;
      best_f0 = f0_candidates[i][target_index];
    }
  }
  if (fabs(1.0 - best_f0 / reference_f0) > allowed_range)
    return 0.0;
  return best_f0;
}

// Assembly:
mulsd 0xba86(%rip), %xmm0     # 0xf138
subsd %xmm1, %xmm0
mulsd 0xba52(%rip), %xmm0     # 0xf110
movq (%rdi), %rcx
movslq %edx, %rax
movsd (%rcx,%rax,8), %xmm1
cmpl $0x2, %esi
jl 0x372d
movapd %xmm0, %xmm5
subsd %xmm1, %xmm5
andpd 0xb9f2(%rip), %xmm5     # 0xf0d0
movl %esi, %ecx
movl $0x1, %edx
movapd 0xb9e3(%rip), %xmm4     # 0xf0d0
movq (%rdi,%rdx,8), %rsi
movsd (%rsi,%rax,8), %xmm6
movapd %xmm0, %xmm3
subsd %xmm6, %xmm3
andpd %xmm4, %xmm3
movapd %xmm3, %xmm7
minsd %xmm5, %xmm7
cmpltsd %xmm5, %xmm3
andpd %xmm3, %xmm6
andnpd %xmm1, %xmm3
orpd %xmm6, %xmm3
incq %rdx
movapd %xmm3, %xmm1
movapd %xmm7, %xmm5
cmpq %rdx, %rcx
jne 0x36ed
jmp 0x3731
movapd %xmm1, %xmm3
movapd %xmm3, %xmm1
divsd %xmm0, %xmm1
movsd 0xb8cf(%rip), %xmm0     # 0xf010
subsd %xmm1, %xmm0
andpd 0xb983(%rip), %xmm0     # 0xf0d0
cmpltsd %xmm0, %xmm2
andnpd %xmm3, %xmm2
movapd %xmm2, %xmm0
retq
nop