LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/daniel5151[P]mips241/src/cpu.cc
// Function: MIPS::CPU::getiRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
uint32_t MIPS::CPU::getiRegister(std::string reg) {
  #define IREG(name_str, var) if (reg == name_str) return var;
    IREG("RA", RA);
    IREG("RB", RB);
    IREG("RZ", RZ);
    IREG("RM", RM);
    IREG("RY", RY);
    IREG("IR", IR);
    IREG("PC", PC);
    IREG("hi", hi);
    IREG("lo", lo);
  #undef IREG

  return 0xBADA5555;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4297(%rip), %rsi      # 0x70e0
movq %r14, %rdi
callq 0x32ea
testb %al, %al
je 0x2e60
movl 0xa4(%rbx), %eax
jmp 0x2f46
leaq 0x427c(%rip), %rsi      # 0x70e3
movq %r14, %rdi
callq 0x32ea
testb %al, %al
je 0x2e7e
movl 0xa8(%rbx), %eax
jmp 0x2f46
leaq 0x4261(%rip), %rsi      # 0x70e6
movq %r14, %rdi
callq 0x32ea
testb %al, %al
je 0x2e9c
movl 0xac(%rbx), %eax
jmp 0x2f46
leaq 0x4246(%rip), %rsi      # 0x70e9
movq %r14, %rdi
callq 0x32ea
testb %al, %al
je 0x2eba
movl 0xb0(%rbx), %eax
jmp 0x2f46
leaq 0x422b(%rip), %rsi      # 0x70ec
movq %r14, %rdi
callq 0x32ea
testb %al, %al
je 0x2ed5
movl 0xb4(%rbx), %eax
jmp 0x2f46
leaq 0x4213(%rip), %rsi      # 0x70ef
movq %r14, %rdi
callq 0x32ea
testb %al, %al
je 0x2ef0
movl 0x88(%rbx), %eax
jmp 0x2f46
leaq 0x41fb(%rip), %rsi      # 0x70f2
movq %r14, %rdi
callq 0x32ea
testb %al, %al
je 0x2f0b
movl 0x8c(%rbx), %eax
jmp 0x2f46
leaq 0x41e3(%rip), %rsi      # 0x70f5
movq %r14, %rdi
callq 0x32ea
testb %al, %al
je 0x2f26
movl 0x90(%rbx), %eax
jmp 0x2f46
leaq 0x41cb(%rip), %rsi      # 0x70f8
movq %r14, %rdi
callq 0x32ea
movl %eax, %ecx
movl $0xbada5555, %eax       # imm = 0xBADA5555
testb %cl, %cl
je 0x2f46
movl 0x94(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/daniel5151[P]mips241/src/cpu.cc
// Function: MIPS::CPU::do_cycle()
void MIPS::CPU::do_cycle() {
  switch (stage) {
    case S_FETCH : fetch (); break;
    case S_DECODE: decode(); break;
    case S_EXEC  : exec  (); break;
    case S_MEMORY: memory(); break;
    case S_WBACK : wback (); break;
  }
  cycles++;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0xa0(%rdi), %eax
cmpq $0x4, %rax
ja 0x2fb2
leaq 0x40e7(%rip), %rcx      # 0x7060
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0x2fb8
jmp 0x2fb2
movq %rbx, %rdi
callq 0x3282
jmp 0x2fb2
movq %rbx, %rdi
callq 0x3028
jmp 0x2fb2
movq %rbx, %rdi
callq 0x320c
jmp 0x2fb2
movq %rbx, %rdi
callq 0x2ff4
incl 0x4(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/daniel5151[P]mips241/src/cpu.cc
// Function: MIPS::CPU::memory()
void MIPS::CPU::memory() {
  switch (decodeOPcode(IR)) {
    case OP_LIS:
    case OP_LW:
      RY = MEM.load(RZ);
      break;
    case OP_SW:
      MEM.store(RZ, RM);
      break;
    default:
      RY = RZ;
      break;
  }

  stage = S_WBACK;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x88(%rdi), %ecx
cmpl $0x4000000, %ecx        # imm = 0x4000000
pushq $0x3f
popq %rdx
movl $0xfc000000, %eax       # imm = 0xFC000000
cmovbl %edx, %eax
andl %ecx, %eax
cmpl $0x14, %eax
je 0x323c
cmpl $0xac000000, %eax       # imm = 0xAC000000
je 0x3250
cmpl $0x8c000000, %eax       # imm = 0x8C000000
jne 0x326a
movq 0x98(%rbx), %rdi
movl 0xac(%rbx), %esi
callq 0x25e0
jmp 0x3270
movq 0x98(%rbx), %rdi
movl 0xac(%rbx), %esi
movl 0xb0(%rbx), %edx
callq 0x26a4
jmp 0x3276
movl 0xac(%rbx), %eax
movl %eax, 0xb4(%rbx)
movl $0x4, 0xa0(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/daniel5151[P]mips241/src/debug.cc
// Function: MIPS::Debugger::Debugger(MIPS::CPU&, MIPS::RAM&, MIPS::BUS&)
Debugger::Debugger(CPU & cpu, RAM & ram, BUS & bus)
: cpu(cpu), ram(ram), bus(bus)
{
  prevInput = "step";

  cycleStep = false;

  step = false;

  // Break at the start of the program
  breakpoints.insert(0x00000000);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
leaq 0x20(%rdi), %rax
andl $0x0, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movq %rax, 0x38(%rdi)
andq $0x0, 0x40(%rdi)
leaq 0x58(%rdi), %rax
andl $0x0, 0x58(%rdi)
andq $0x0, 0x60(%rdi)
movq %rax, 0x68(%rdi)
movq %rax, 0x70(%rdi)
andq $0x0, 0x78(%rdi)
leaq 0x88(%rdi), %rax
andl $0x0, 0x88(%rdi)
andq $0x0, 0x90(%rdi)
movq %rax, 0x98(%rdi)
movq %rax, 0xa0(%rdi)
andq $0x0, 0xa8(%rdi)
leaq 0x50(%rdi), %r14
leaq 0xb0(%rdi), %r15
leaq 0xc0(%rdi), %rax
movq %rax, 0xb0(%rdi)
andq $0x0, 0xb8(%rdi)
movb $0x0, 0xc0(%rdi)
leaq 0x3d68(%rip), %rsi      # 0x710a
movq %r15, %rdi
callq 0x23d0
andw $0x0, 0x48(%rbx)
leaq 0xc(%rsp), %rsi
andl $0x0, (%rsi)
movq %r14, %rdi
callq 0x4912
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x33cf
movq %rax, %r12
leaq 0x80(%rbx), %r13
addq $0x18, %rbx
movq %r15, %rdi
callq 0x23e8
movq %r13, %rdi
callq 0x4862
movq %r14, %rdi
callq 0x4862
movq %rbx, %rdi
callq 0x48ba
movq %r12, %rdi
callq 0x23a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/daniel5151[P]mips241/src/debug.cc
// Function: MIPS::Debugger::printRAMFrom(unsigned int, int)
void Debugger::printRAMFrom(uint32_t addr, int n) {
  cerr
    << "     ADDR    |   HEXVAL   :     MIPS ASM    " << endl
    << "  -----------|------------------------------" << endl;

  while (n > 0) {
    cerr
      << ( (higlight.count(addr) != 0) ? higlight[addr] : ' ') << " "
      << toHex(addr)
      << " | "
      << toHex(ram.load(addr))
      << " : "
      << disasm(ram.load(addr))
      << endl;

    addr += 4;
    n--;
  }

  cerr << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %edx, %ebx
movq %rdi, %r14
leaq 0x8(%rsp), %rax
movl %esi, (%rax)
movq 0x7b97(%rip), %rdi      # 0xaff0
leaq 0x3caf(%rip), %rsi      # 0x710f
callq 0x21e0
movq %rax, %rdi
callq 0x20f0
leaq 0x3cc8(%rip), %rsi      # 0x713c
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x20f0
leaq 0x18(%r14), %r15
leaq 0x38(%rsp), %r13
movq %r15, 0x10(%rsp)
testl %ebx, %ebx
jle 0x35a3
movq %r15, %rdi
leaq 0x8(%rsp), %rbp
movq %rbp, %rsi
callq 0x4726
testq %rax, %rax
je 0x34be
movq %r15, %rdi
movq %rbp, %rsi
callq 0x4740
movb (%rax), %al
jmp 0x34c0
movb $0x20, %al
movsbl %al, %esi
movq 0x7b26(%rip), %rdi      # 0xaff0
callq 0x2260
movq %rax, %rdi
leaq 0x3c61(%rip), %rsi      # 0x713a
callq 0x21e0
movq %rax, %r12
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
callq 0x478e
movq %r12, %rdi
movq %r15, %rsi
callq 0x21d0
movq %rax, %rdi
leaq 0x3c63(%rip), %rsi      # 0x7169
callq 0x21e0
movq %rax, %r12
movq 0x8(%r14), %rdi
movl 0x8(%rsp), %esi
callq 0x6110
leaq 0x58(%rsp), %r15
movl %eax, 0xc(%rsp)
movq %r15, %rdi
leaq 0xc(%rsp), %rsi
callq 0x478e
movq %r12, %rdi
movq %r15, %rsi
callq 0x21d0
movq %rax, %rdi
leaq 0x43c2(%rip), %rsi      # 0x7908
callq 0x21e0
movq %rax, %r12
movq 0x8(%r14), %rdi
movl 0x8(%rsp), %esi
callq 0x6110
movq %r13, %rdi
movl %eax, %esi
callq 0x5269
movq %r12, %rdi
movq %r13, %rsi
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
movq %r13, %rdi
callq 0x23e8
movq %r15, %rdi
callq 0x23e8
leaq 0x18(%rsp), %rdi
callq 0x23e8
addl $0x4, 0x8(%rsp)
decl %ebx
movq 0x10(%rsp), %r15
jmp 0x3492
movq 0x7a46(%rip), %rdi      # 0xaff0
callq 0x20f0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x23e8
jmp 0x35d4
jmp 0x35d1
jmp 0x35e0
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x23e8
jmp 0x35e3
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x23e8
movq %rbx, %rdi
callq 0x23a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/daniel5151[P]mips241/src/debug.cc
// Function: MIPS::Debugger::print_stackRAM()
void Debugger::print_stackRAM() {
  bool oldHiglight_existed;
  char oldHiglight;

  cerr << "  ----------====== Stack RAM ======---------" << endl;
  uint32_t stackPtr = cpu.getRegister(30);

  oldHiglight_existed = (higlight.count(stackPtr) != 0);
  oldHiglight = (oldHiglight_existed) ? higlight[stackPtr] : ' ';

  higlight[stackPtr] = '>';
  printRAMFrom(stackPtr - 0x10, 12);

  if (oldHiglight_existed) higlight[stackPtr] = oldHiglight;
  else higlight.erase(stackPtr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x724c(%rip), %rdi      # 0xaff0
leaq 0x3416(%rip), %rsi      # 0x71c1
callq 0x21e0
movq %rax, %rdi
callq 0x20f0
movq (%rbx), %rdi
pushq $0x1e
popq %rsi
callq 0x2e30
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x18(%rbx), %r14
movq %r14, %rdi
callq 0x4726
movq %rax, %r15
testq %rax, %rax
je 0x3df0
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x4740
movb (%rax), %bpl
jmp 0x3df3
movb $0x20, %bpl
leaq 0xc(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x4740
movb $0x3e, (%rax)
movl (%r12), %esi
addl $-0x10, %esi
pushq $0xc
popq %rdx
movq %rbx, %rdi
callq 0x3438
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
testq %r15, %r15
je 0x3e2f
callq 0x4740
movb %bpl, (%rax)
jmp 0x3e34
callq 0x4d24
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/daniel5151[P]mips241/src/debug.cc
// Function: MIPS::Debugger::print_progRAM()
void Debugger::print_progRAM() {
  bool oldHiglight_existed;
  char oldHiglight;

  cerr << "  ---------====== Program RAM ======--------" << endl;
  uint32_t currentPC = cpu.getPC();

  oldHiglight_existed = (higlight.count(currentPC) != 0);
  oldHiglight = (oldHiglight_existed) ? higlight[currentPC] : ' ';

  higlight[currentPC] = '>';
  uint32_t startAddr = ((int)currentPC - 0x20 >= 0x0)
    ? currentPC - 0x20
    : 0x0;
  printRAMFrom(startAddr, 16);

  if (oldHiglight_existed) higlight[currentPC] = oldHiglight;
  else higlight.erase(currentPC);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x7198(%rip), %rdi      # 0xaff0
leaq 0x338f(%rip), %rsi      # 0x71ee
callq 0x21e0
movq %rax, %rdi
callq 0x20f0
movq (%rbx), %rdi
callq 0x2e28
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x18(%rbx), %r14
movq %r14, %rdi
callq 0x4726
movq %rax, %r15
testq %rax, %rax
je 0x3ea1
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x4740
movb (%rax), %bpl
jmp 0x3ea4
movb $0x20, %bpl
leaq 0xc(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x4740
movb $0x3e, (%rax)
movl (%r12), %eax
leal -0x20(%rax), %ecx
xorl %esi, %esi
cmpl $0x20, %eax
cmovgel %ecx, %esi
pushq $0x10
popq %rdx
movq %rbx, %rdi
callq 0x3438
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
testq %r15, %r15
je 0x3ee8
callq 0x4740
movb %bpl, (%rax)
jmp 0x3eed
callq 0x4d24
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/daniel5151[P]mips241/src/debug.cc
// Function: MIPS::Debugger::debugPrint()
void Debugger::debugPrint() {
  // "clear" screen
  cerr << string(100, '\n');

  print_stackRAM();
  print_progRAM();
  print_CPU();

  if (!watch.empty()) {
    cerr
      << endl
      << "     ADDR    |   HEXVAL   " << endl
      << "  -----------|------------" << endl;
    for (auto addr : watch) {
      cerr
        << "  "
        << toHex(addr)
        << " | "
        << toHex(ram.load(addr))
        << endl
        << endl;

    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x8(%rsp), %rdi
pushq $0x64
popq %rsi
pushq $0xa
popq %rdx
callq 0x2250
movq 0x70a5(%rip), %rdi      # 0xaff0
leaq 0x8(%rsp), %rsi
callq 0x21d0
leaq 0x8(%rsp), %rdi
callq 0x23e8
movq %rbx, %rdi
callq 0x3d8e
movq %rbx, %rdi
callq 0x3e42
movq %rbx, %rdi
callq 0x3efa
cmpq $0x0, 0xa8(%rbx)
je 0x407d
movq 0x7064(%rip), %rdi      # 0xaff0
callq 0x20f0
leaq 0x32cd(%rip), %rsi      # 0x7265
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x20f0
leaq 0x32d1(%rip), %rsi      # 0x7280
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x20f0
movq 0x98(%rbx), %r13
leaq 0x88(%rbx), %rbp
leaq 0x8(%rsp), %r12
leaq 0x28(%rsp), %r15
cmpq %rbp, %r13
je 0x407d
movl 0x20(%r13), %eax
movl %eax, (%rsp)
movq 0x7002(%rip), %rdi      # 0xaff0
leaq 0x3144(%rip), %rsi      # 0x7139
callq 0x21e0
movq %rax, %r14
movq %r12, %rdi
movq %rsp, %rsi
callq 0x478e
movq %r14, %rdi
movq %r12, %rsi
callq 0x21d0
movq %rax, %rdi
leaq 0x314c(%rip), %rsi      # 0x7169
callq 0x21e0
movq %rax, %r14
movq 0x8(%rbx), %rdi
movl (%rsp), %esi
callq 0x6110
movl %eax, 0x4(%rsp)
movq %r15, %rdi
leaq 0x4(%rsp), %rsi
callq 0x478e
movq %r14, %rdi
movq %r15, %rsi
callq 0x21d0
movq %rax, %rdi
callq 0x20f0
movq %rax, %rdi
callq 0x20f0
movq %r15, %rdi
callq 0x23e8
movq %r12, %rdi
callq 0x23e8
movq %r13, %rdi
callq 0x2240
movq %rax, %r13
jmp 0x3fd7
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4095
movq %rax, %rbx
jmp 0x40b1
jmp 0x4095
movq %rax, %rbx
jmp 0x40a7
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x23e8
leaq 0x8(%rsp), %rdi
callq 0x23e8
movq %rbx, %rdi
callq 0x23a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/daniel5151[P]mips241/src/disasm.cc
// Function: opcode2str[abi:cxx11](unsigned int)
std::string opcode2str(uint32_t opcode) {
  switch (opcode) {
    case OP_ADD:   return "add  ";
    case OP_SUB:   return "sub  ";
    case OP_SLT:   return "slt  ";
    case OP_SLTU:  return "sltu ";
    case OP_MFHI:  return "mfhi ";
    case OP_MFLO:  return "mflo ";
    case OP_MULT:  return "mult ";
    case OP_MULTU: return "multu";
    case OP_DIV:   return "div  ";
    case OP_DIVU:  return "divu ";
    case OP_LIS:   return "lis  ";
    case OP_JR:    return "jr   ";
    case OP_JALR:  return "jalr ";
    case OP_BEQ:   return "beq  ";
    case OP_BNE:   return "bne  ";
    case OP_LW:    return "lw   ";
    case OP_SW:    return "sw   ";
  }
  return "INVALID";
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leal -0x8(%rsi), %eax
cmpl $0x1a, %eax
ja 0x5178
leaq 0x2321(%rip), %rcx      # 0x7484
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x242b(%rip), %rsi      # 0x759e
jmp 0x5253
cmpl $0x8c000000, %esi       # imm = 0x8C000000
je 0x524c
cmpl $0xac000000, %esi       # imm = 0xAC000000
je 0x5243
cmpl $0x2a, %esi
je 0x5228
cmpl $0x2b, %esi
je 0x523a
cmpl $0x10000000, %esi       # imm = 0x10000000
je 0x5231
cmpl $0x14000000, %esi       # imm = 0x14000000
jne 0x51c2
leaq 0x23f3(%rip), %rsi      # 0x75b0
jmp 0x5253
leaq 0x23f9(%rip), %rsi      # 0x75c2
jmp 0x5253
leaq 0x23ab(%rip), %rsi      # 0x7580
jmp 0x5253
leaq 0x23b4(%rip), %rsi      # 0x7592
jmp 0x5253
leaq 0x23a5(%rip), %rsi      # 0x758c
jmp 0x5253
leaq 0x238a(%rip), %rsi      # 0x757a
jmp 0x5253
leaq 0x237b(%rip), %rsi      # 0x7574
jmp 0x5253
leaq 0x23a2(%rip), %rsi      # 0x75a4
jmp 0x5253
leaq 0x238d(%rip), %rsi      # 0x7598
jmp 0x5253
leaq 0x2348(%rip), %rsi      # 0x755c
jmp 0x5253
leaq 0x2369(%rip), %rsi      # 0x7586
jmp 0x5253
leaq 0x233c(%rip), %rsi      # 0x7562
jmp 0x5253
leaq 0x2339(%rip), %rsi      # 0x7568
jmp 0x5253
leaq 0x2372(%rip), %rsi      # 0x75aa
jmp 0x5253
leaq 0x232d(%rip), %rsi      # 0x756e
jmp 0x5253
leaq 0x2372(%rip), %rsi      # 0x75bc
jmp 0x5253
leaq 0x2363(%rip), %rsi      # 0x75b6
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x2740
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/daniel5151[P]mips241/src/ram.cc
// Function: MIPS::RAM::store(unsigned int, unsigned int)
void MIPS::RAM::store(uint32_t memaddr, uint32_t word) {
  if (memaddr % 4 != 0) {
    std::stringstream a; a << memaddr;
    error("Unaligned Access - Cannot Store to 0x" + a.str());
  }

  uint16_t page   = (memaddr >> 16) & 0xFFFF;
  uint16_t offset =  memaddr        & 0xFFFF;

  if (mem.count(page) == 0) {
    mem[page] = new uint32_t [(0xFFFF + 1) / 4](); // word addressable
  }

  mem[page][offset / 4] = word;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
testb $0x3, %r14b
je 0x606c
leaq 0x40(%rsp), %rdi
callq 0x2170
leaq 0x50(%rsp), %rdi
movl %r14d, %esi
callq 0x2150
leaq 0x58(%rsp), %rsi
movq %rsp, %rdi
callq 0x2310
leaq 0x18d3(%rip), %rsi      # 0x790c
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x622a
leaq 0x20(%rsp), %rdi
callq 0x575c
leaq 0x20(%rsp), %rdi
callq 0x23e8
movq %rsp, %rdi
callq 0x23e8
leaq 0x40(%rsp), %rdi
callq 0x2190
movl %r14d, %eax
shrl $0x10, %eax
leaq 0x40(%rsp), %rsi
movw %ax, (%rsi)
movq %r15, %rdi
callq 0x624e
testq %rax, %rax
jne 0x60b3
movl $0x10000, %edi          # imm = 0x10000
callq 0x2030
movq %rax, %r12
movl $0x10000, %edx          # imm = 0x10000
movq %rax, %rdi
xorl %esi, %esi
callq 0x2130
leaq 0x40(%rsp), %rsi
movq %r15, %rdi
callq 0x6268
movq %r12, (%rax)
leaq 0x40(%rsp), %rsi
movq %r15, %rdi
callq 0x6268
movq (%rax), %rax
andl $0xfffc, %r14d          # imm = 0xFFFC
movl %ebx, (%rax,%r14)
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x23e8
jmp 0x60ef
movq %rax, %rbx
movq %rsp, %rdi
callq 0x23e8
jmp 0x60fe
jmp 0x60fb
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x2190
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O2/daniel5151[P]mips241/src/ram.cc
// Function: MIPS::RAM::load(unsigned int)
uint32_t MIPS::RAM::load(uint32_t memaddr) {
  if (memaddr % 4 != 0) {
    std::stringstream a; a << memaddr;
    error("Unaligned Access - Cannot Store to 0x" + a.str());
  }

  uint16_t page   = (memaddr >> 16) & 0xFFFF;
  uint16_t offset =  memaddr        & 0xFFFF;

  if (mem.count(page) == 0) {
    mem[page] = new uint32_t [(0xFFFF + 1) / 4](); // word addressable
  }

  return mem[page][offset / 4];
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
movl %esi, %ebx
movq %rdi, %r14
testb $0x3, %bl
je 0x6189
leaq 0x48(%rsp), %rdi
callq 0x2170
leaq 0x58(%rsp), %rdi
movl %ebx, %esi
callq 0x2150
leaq 0x60(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x2310
leaq 0x17ba(%rip), %rsi      # 0x790c
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x622a
leaq 0x28(%rsp), %rdi
callq 0x575c
leaq 0x28(%rsp), %rdi
callq 0x23e8
leaq 0x8(%rsp), %rdi
callq 0x23e8
leaq 0x48(%rsp), %rdi
callq 0x2190
movl %ebx, %eax
shrl $0x10, %eax
leaq 0x48(%rsp), %rsi
movw %ax, (%rsi)
movq %r14, %rdi
callq 0x624e
testq %rax, %rax
jne 0x61cf
movl $0x10000, %edi          # imm = 0x10000
callq 0x2030
movq %rax, %r15
movl $0x10000, %edx          # imm = 0x10000
movq %rax, %rdi
xorl %esi, %esi
callq 0x2130
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
callq 0x6268
movq %r15, (%rax)
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
callq 0x6268
movq (%rax), %rax
andl $0xfffc, %ebx           # imm = 0xFFFC
movl (%rax,%rbx), %eax
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x23e8
jmp 0x6207
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x23e8
jmp 0x6218
jmp 0x6215
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x2190
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O2/nickgammon[P]tinymudserver/tinymudserver.cpp
// Function: PeriodicUpdates()
void PeriodicUpdates ()
  {
    //      The example below just sends a message every MESSAGE_INTERVAL seconds.
    // send new command if it is time
  if (time (NULL) > (tLastMessage + MESSAGE_INTERVAL))
    {
    SendToAll ("You hear creepy noises ...\n");
    tLastMessage = time (NULL);
    }
    
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
xorl %edi, %edi
callq 0x32f0
leaq 0x10593(%rip), %r14     # 0x14808
movq (%r14), %rcx
addq $0x3c, %rcx
cmpq %rcx, %rax
jle 0x42b7
leaq 0x8dde(%rip), %rsi      # 0xd066
leaq -0x38(%rbp), %rbx
leaq -0x11(%rbp), %rdx
movq %rbx, %rdi
callq 0x43b6
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x52eb
leaq -0x38(%rbp), %rdi
callq 0x35c8
xorl %edi, %edi
callq 0x32f0
movq %rax, (%r14)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x35c8
movq %rbx, %rdi
callq 0x3500
// File: /workspace/github_cpp_makefile_star2_O2/nickgammon[P]tinymudserver/tinymudserver.cpp
// Function: main
int main ()
{
  cout << "Tiny MUD server version " << VERSION << endl;

  LoadThings ();    // load stuff
  
  if (InitComms ()) // listen for new connections
    return 1;

  cout << "Accepting connections from port " <<  PORT << endl;
  
  MainLoop ();    // handle player input/output

  // game over - tell them all
  SendToAll ("\n\n** Game shut down. **\n\n");
  
  CloseComms ();  // stop listening

  cout << "Game shut down." << endl;  
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq 0xfcda(%rip), %rdi      # 0x13fc0
leaq 0x8d95(%rip), %rsi      # 0xd082
callq 0x3310
leaq 0x10027(%rip), %rsi     # 0x14320
movq %rax, %rdi
callq 0x32e0
movq %rax, %rdi
callq 0x31a0
callq 0x6682
callq 0xb5bd
testl %eax, %eax
je 0x431c
pushq $0x1
popq %rbx
jmp 0x4397
movq 0xfc9d(%rip), %rdi      # 0x13fc0
leaq 0x8d71(%rip), %rsi      # 0xd09b
callq 0x3310
movq %rax, %rdi
movl $0xfa0, %esi            # imm = 0xFA0
callq 0x34f0
movq %rax, %rdi
callq 0x31a0
callq 0xbc67
leaq 0x8d6c(%rip), %rsi      # 0xd0bc
leaq -0x38(%rbp), %r14
leaq -0x11(%rbp), %rdx
movq %r14, %rdi
callq 0x43b6
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x52eb
leaq -0x38(%rbp), %rdi
callq 0x35c8
callq 0xb837
movq 0xfc3d(%rip), %rdi      # 0x13fc0
leaq 0x8d4c(%rip), %rsi      # 0xd0d6
callq 0x3310
movq %rax, %rdi
callq 0x31a0
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x35c8
movq %rbx, %rdi
callq 0x3500
// File: /workspace/github_cpp_makefile_star2_O2/nickgammon[P]tinymudserver/strings.cpp
// Function: FindAndReplace(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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string FindAndReplace
  (const string& source, const string target, const string replacement)
  {
  string str = source;
  string::size_type pos = 0,   // where we are now
                    found;     // where the found data is
  if (target.size () > 0)   // searching for nothing will cause a loop
    while ((found = str.find (target, pos)) != string::npos)
      {
      str.replace (found, target.size (), replacement);
      pos = found + replacement.size ();
      }
  return str;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
callq 0x3400
cmpq $0x0, 0x8(%r15)
je 0x44e2
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x35b0
cmpq $-0x1, %rax
je 0x44e2
movq %rax, %r12
movq 0x8(%r15), %rdx
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rcx
callq 0x3130
addq 0x8(%r14), %r12
jmp 0x44b3
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x35c8
movq %r14, %rdi
callq 0x3500
// File: /workspace/github_cpp_makefile_star2_O2/nickgammon[P]tinymudserver/strings.cpp
// Function: Trim(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&)
string Trim (const string & s, const string & t)
{
  string d = s; 
  string::size_type i = d.find_last_not_of (t);
  if (i == string::npos)
    return "";
  else
   return d.erase (i + 1).erase (0, s.find_first_not_of (t)) ; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq -0x48(%rbp), %r12
movq %r12, %rdi
callq 0x3400
pushq $-0x1
popq %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x3560
cmpq $-0x1, %rax
je 0x4575
incq %rax
leaq -0x48(%rbp), %rdi
pushq $-0x1
popq %rdx
movq %rax, %rsi
callq 0x30a0
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x32c0
movq %r12, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x30a0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3400
jmp 0x4588
leaq 0x8b59(%rip), %rsi      # 0xd0d5
leaq -0x21(%rbp), %rdx
movq %rbx, %rdi
callq 0x43b6
leaq -0x48(%rbp), %rdi
callq 0x35c8
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x45a3
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x35c8
movq %rbx, %rdi
callq 0x3500
// File: /workspace/github_cpp_makefile_star2_O2/nickgammon[P]tinymudserver/strings.cpp
// Function: GetWord(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
pair<string, string> GetWord (const string & s)
{
  string rest = s;  // make copy so we can modify it
  
 // find delimiter  
  string::size_type i (rest.find (' '));

  // split into before and after delimiter
  string w (rest.substr (0, i));

  if (i == string::npos)
    rest.erase ();          // if no delimiter, remainder is empty
  else   
    rest.erase (0, i + 1);  // erase up to the delimiter

  // return first word in line, rest of line
  return make_pair (Trim (w), Trim (rest));
  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq -0x38(%rbp), %r15
movq %r15, %rdi
callq 0x3400
pushq $0x20
popq %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x33e0
movq %rax, %r14
leaq -0x58(%rbp), %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x3350
incq %r14
pushq $-0x1
popq %rdx
cmovneq %r14, %rdx
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0x30a0
leaq 0xfd30(%rip), %rdx      # 0x143e0
leaq -0x78(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x4501
leaq 0xfd1c(%rip), %rdx      # 0x143e0
leaq -0x98(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4501
leaq -0x78(%rbp), %r14
leaq -0x98(%rbp), %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x4880
movq %r15, %rdi
callq 0x35c8
movq %r14, %rdi
callq 0x35c8
leaq -0x58(%rbp), %rdi
callq 0x35c8
leaq -0x38(%rbp), %rdi
callq 0x35c8
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x35c8
jmp 0x4733
jmp 0x4730
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x35c8
jmp 0x4741
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x35c8
movq %rbx, %rdi
callq 0x3500
// File: /workspace/github_cpp_makefile_star2_O2/nickgammon[P]tinymudserver/./strings.h
// Function: ciEqualTo::operator()(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&) const
bool operator() (const string & s1, const string & s2) const
    {
    pair <string::const_iterator, string::const_iterator> result =
      mismatch (s1.begin (), s1.end (), s2.begin (), compare_equal ()); 

    // match if both at end
    return result.first == s1.end () && result.second == s2.end ();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq (%rsi), %rdi
movq 0x8(%rsi), %rsi
addq %rdi, %rsi
movq (%rdx), %rdx
callq 0x47e6
movq (%r14), %rcx
addq 0x8(%r14), %rcx
xorq %rax, %rcx
movq (%rbx), %rax
addq 0x8(%rbx), %rax
xorq %rdx, %rax
orq %rcx, %rax
sete %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/nickgammon[P]tinymudserver/strings.cpp
// Function: fCapitals::operator()(unsigned char const&)
unsigned char operator() (const unsigned char & c)  
    { 
    unsigned char c1;
    // capitalise depending on previous letter
    if (bUpper)
      c1 = toupper (c);
    else
      c1 = tolower (c);

    // work out whether next letter should be capitals
    bUpper = isalnum (c) == 0 && c < 0x80;
    return c1; 
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl (%rsi), %r14d
cmpb $0x1, (%rdi)
jne 0x48c6
movl %r14d, %edi
callq 0x3550
jmp 0x48ce
movl %r14d, %edi
callq 0x3420
movl %eax, %r15d
movl %r14d, %edi
callq 0x3340
testl %eax, %eax
sete %al
testb %r14b, %r14b
setns %cl
andb %al, %cl
movb %cl, (%rbx)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nickgammon[P]tinymudserver/player.cpp
// Function: FindPlayer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
tPlayer * FindPlayer (const string & name)
{
  tPlayerListIterator i =
    find_if (playerlist.begin (), playerlist.end (), findPlayerName (name));

  if (i == playerlist.end ())
    return NULL;
  else
    return *i;
  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rsi
leaq 0xff01(%rip), %rbx      # 0x14810
movq (%rbx), %r14
leaq -0x38(%rbp), %r15
movq %r15, %rdi
callq 0x3400
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x536f
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x35c8
cmpq 0xf689(%rip), %rbx      # 0x13fc8
je 0x4947
movq 0x10(%rbx), %rax
jmp 0x4949
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x35c8
movq %rbx, %rdi
callq 0x3500
// File: /workspace/github_cpp_makefile_star2_O2/nickgammon[P]tinymudserver/player.cpp
// Function: tPlayer::Load()
void tPlayer::Load ()
{
  ifstream f ((PLAYER_DIR + playername + PLAYER_EXT).c_str (), ios::in);
  if (!f)
    throw runtime_error ("That player does not exist, type 'new' to create a new one.");
  
  // read player details
  f >> password;
  f >> room;
  f.ignore (numeric_limits<int>::max(), '\n'); // skip rest of this line  
  LoadSet (f, flags);   // player flags (eg. can_shutdown) 
  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x250, %rsp            # imm = 0x250
movq %rdi, %rbx
leaq 0x90(%rdi), %rdx
leaq 0xf7f9(%rip), %rsi      # 0x14448
leaq -0x50(%rbp), %r14
movq %r14, %rdi
callq 0x541a
leaq 0xf806(%rip), %rdx      # 0x14468
leaq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x53f1
movq -0x30(%rbp), %rsi
leaq -0x258(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x3540
leaq -0x30(%rbp), %rdi
callq 0x35c8
leaq -0x50(%rbp), %rdi
callq 0x35c8
movq -0x258(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x238(%rbp,%rax)
jne 0x4d10
leaq 0xb0(%rbx), %rsi
leaq -0x258(%rbp), %rdi
callq 0x33c0
leaq 0xd4(%rbx), %rsi
leaq -0x258(%rbp), %rdi
callq 0x3210
leaq -0x258(%rbp), %rdi
pushq $0xa
popq %rdx
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
callq 0x3230
addq $0xe0, %rbx
leaq -0x258(%rbp), %rdi
movq %rbx, %rsi
callq 0x5452
leaq -0x258(%rbp), %rdi
callq 0x30d0
addq $0x250, %rsp            # imm = 0x250
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x31b0
movq %rax, %r14
leaq 0x8443(%rip), %rsi      # 0xd165
movq %rax, %rdi
callq 0x3140
movq 0xf2bf(%rip), %rsi      # 0x13ff0
movq 0xf280(%rip), %rdx      # 0x13fb8
movq %r14, %rdi
callq 0x34e0
movq %rax, %rbx
movq %r14, %rdi
callq 0x3270
jmp 0x4d6c
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x35c8
jmp 0x4d5e
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x35c8
jmp 0x4d78
movq %rax, %rbx
leaq -0x258(%rbp), %rdi
callq 0x30d0
movq %rbx, %rdi
callq 0x3500
// File: /workspace/github_cpp_makefile_star2_O2/nickgammon[P]tinymudserver/player.cpp
// Function: tPlayer::Save()
void tPlayer::Save ()
{
  ofstream f ((PLAYER_DIR + playername + PLAYER_EXT).c_str (), ios::out);
  if (!f)
  {
  cerr << "Could not write to file for player " << playername << endl;
  return;
  }
  
  // write player details
  f << password << endl;
  f << room << endl;
  copy (flags.begin (), flags.end (), ostream_iterator<string> (f, " "));
  f << endl;
  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rdi, %rbx
leaq 0x90(%rdi), %r14
leaq 0xf6a7(%rip), %rsi      # 0x14448
leaq -0x58(%rbp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x541a
leaq 0xf6b1(%rip), %rdx      # 0x14468
leaq -0x38(%rbp), %rdi
movq %r15, %rsi
callq 0x53f1
movq -0x38(%rbp), %rsi
leaq -0x268(%rbp), %rdi
pushq $0x10
popq %rdx
callq 0x3370
leaq -0x38(%rbp), %rdi
callq 0x35c8
leaq -0x58(%rbp), %rdi
callq 0x35c8
movq -0x268(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x248(%rbp,%rax)
je 0x4e20
movq 0xf1e4(%rip), %rdi      # 0x13fe8
leaq 0x8396(%rip), %rsi      # 0xd1a1
callq 0x3310
movq %rax, %rdi
movq %r14, %rsi
callq 0x32e0
movq %rax, %r14
jmp 0x4e84
leaq 0xb0(%rbx), %rsi
leaq -0x268(%rbp), %rdi
callq 0x32e0
movq %rax, %rdi
callq 0x31a0
movl 0xd4(%rbx), %esi
leaq -0x268(%rbp), %r14
movq %r14, %rdi
callq 0x34f0
movq %rax, %rdi
callq 0x31a0
movq 0xf8(%rbx), %rsi
addq $0xe8, %rbx
leaq -0x68(%rbp), %rcx
movq %r14, (%rcx)
leaq 0x8afa(%rip), %rax      # 0xd96e
movq %rax, 0x8(%rcx)
leaq -0x38(%rbp), %rdi
movq %rbx, %rdx
callq 0x5543
movq %r14, %rdi
callq 0x31a0
leaq -0x268(%rbp), %rdi
callq 0x3440
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4ec4
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x35c8
jmp 0x4eb9
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x35c8
jmp 0x4ed3
movq %rax, %rbx
leaq -0x268(%rbp), %rdi
callq 0x3440
movq %rbx, %rdi
callq 0x3500
nop
// File: /workspace/github_cpp_makefile_star2_O2/nickgammon[P]tinymudserver/player.cpp
// Function: tPlayer::ProcessWrite()
void tPlayer::ProcessWrite ()
{
  /* we will loop attempting to write all in buffer, until write blocks */
  while (s != NO_SOCKET && !outbuf.empty ())
    {

    // send a maximum of 512 at a time
    int iLength = min<int> (outbuf.size (), 512);

    // send to player
    int nWrite = write (s, outbuf.c_str (), iLength );

    // check for bad write
    if (nWrite < 0)
      {
      if (errno != EWOULDBLOCK )
        perror ("send to player");  /* some other error? */
      return;
      }

    // remove what we successfully sent from the buffer
    outbuf.erase (0, nWrite);
      
    // if partial write, exit
    if (nWrite < iLength)
       break;

    } /* end of having write loop */

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %edi
cmpl $-0x1, %edi
je 0x52c2
leaq 0x8(%rbx), %r14
movl $0x200, %r12d           # imm = 0x200
movq 0x10(%rbx), %r13
testq %r13, %r13
je 0x52c2
cmpl %r12d, %r13d
cmovgel %r12d, %r13d
movq (%r14), %rsi
movslq %r13d, %rdx
callq 0x3110
movq %rax, %r15
testl %r15d, %r15d
js 0x52b8
movl %r15d, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq %r14, %rdi
xorl %esi, %esi
callq 0x30a0
cmpl %r15d, %r13d
jg 0x52c2
movl (%rbx), %edi
cmpl $-0x1, %edi
jne 0x5274
jmp 0x52c2
callq 0x3040
cmpl $0xb, (%rax)
jne 0x52d1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7f39(%rip), %rdi      # 0xd211
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x32a0
// File: /workspace/github_cpp_makefile_star2_O2/nickgammon[P]tinymudserver/./utils.h
// Function: void LoadSet<std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ciLess, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>(std::istream&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ciLess, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
void LoadSet (istream & f, T & s)
{
  s.clear ();
  string sLine;
  getline (f, sLine);   // get one line
  istringstream is (sLine); // convert back to stream
  string flag;    // each flag name
  while (!is.eof ())    // read that stream
    {
    is >> flag;   // read flag
    s.insert (flag);  // and insert it
    } // end of getting each item  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x5770
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x38(%rbp), %rsi
movq %r14, %rdi
callq 0x3090
leaq -0x1d8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
pushq $0x8
popq %rdx
callq 0x34c0
leaq -0x48(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x1d8(%rbp), %r14
leaq -0x58(%rbp), %r15
movq -0x1d8(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x1b8(%rbp,%rax)
jne 0x54e7
movq %r14, %rdi
movq %r15, %rsi
callq 0x33c0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x580c
jmp 0x54ba
leaq -0x58(%rbp), %rdi
callq 0x35c8
leaq -0x1d8(%rbp), %rdi
callq 0x3190
leaq -0x38(%rbp), %rdi
callq 0x35c8
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5515
movq %rax, %rbx
jmp 0x5532
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x35c8
leaq -0x1d8(%rbp), %rdi
callq 0x3190
leaq -0x38(%rbp), %rdi
callq 0x35c8
movq %rbx, %rdi
callq 0x3500
// File: /workspace/github_cpp_makefile_star2_O2/nickgammon[P]tinymudserver/load.cpp
// Function: LoadControlFile()
void LoadControlFile ()
{
  // load control file
  ifstream fControl (CONTROL_FILE, ios::in);
  if (!fControl)
    {
    cerr << "Could not open control file: " << CONTROL_FILE << endl;
    return;
    }

  LoadSet (fControl, directionset); // possible directions, eg. n, s, e, w
  LoadSet (fControl, badnameset);   // bad names for new players, eg. new, quit, look, admin
  LoadSet (fControl, blockedIP);    // blocked IP addresses
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
leaq 0x7451(%rip), %rsi      # 0xd330
leaq -0x210(%rbp), %rbx
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x3540
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x1f0(%rbp,%rax)
je 0x5f2e
movq 0xe0df(%rip), %rdi      # 0x13fe8
leaq 0x7341(%rip), %rsi      # 0xd251
callq 0x3310
leaq 0x7414(%rip), %rsi      # 0xd330
movq %rax, %rdi
callq 0x3310
movq %rax, %rdi
callq 0x31a0
jmp 0x5f67
leaq 0xe9b3(%rip), %rsi      # 0x148e8
leaq -0x210(%rbp), %rdi
callq 0x5452
leaq 0xe9d0(%rip), %rsi      # 0x14918
leaq -0x210(%rbp), %rdi
callq 0x5452
leaq 0xe9ed(%rip), %rsi      # 0x14948
leaq -0x210(%rbp), %rdi
callq 0x66a0
leaq -0x210(%rbp), %rdi
callq 0x30d0
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x210(%rbp), %rdi
callq 0x30d0
movq %rbx, %rdi
callq 0x3500
// File: /workspace/github_cpp_makefile_star2_O2/nickgammon[P]tinymudserver/load.cpp
// Function: LoadMessages()
void LoadMessages ()
{
  // format is: <code> <message>
  //  eg. motd Hi there!
  // Imbedded %r sequences will becomes new lines.
  ifstream fMessages (MESSAGES_FILE, ios::in);
  if (!fMessages)
    {
    cerr << "Could not open messages file: " << MESSAGES_FILE << endl;
    return;
    }

  while (!(fMessages.eof ()))
    {
    string sMessageCode, sMessageText;
    fMessages >> sMessageCode >> ws;
    getline (fMessages, sMessageText);
    if (!(sMessageCode.empty ()))
      messagemap [tolower (sMessageCode)] =
            FindAndReplace (sMessageText, "%r", "\n");
    } // end of read loop

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
leaq 0x7396(%rip), %rsi      # 0xd345
leaq -0x2f8(%rbp), %rbx
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x3540
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x2d8(%rbp,%rax)
je 0x601a
movq 0xe00f(%rip), %rdi      # 0x13fe8
leaq 0x728f(%rip), %rsi      # 0xd26f
callq 0x3310
leaq 0x7359(%rip), %rsi      # 0xd345
movq %rax, %rdi
callq 0x3310
movq %rax, %rdi
callq 0x31a0
leaq -0x2f8(%rbp), %rdi
callq 0x30d0
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x50(%rbp), %r14
leaq -0x70(%rbp), %r15
leaq -0xf0(%rbp), %r12
testb $0x2, -0x2d8(%rbp,%rax)
jne 0x5ffc
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
andq $0x0, -0x48(%rbp)
xorl %ecx, %ecx
movb %cl, -0x40(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
andq $0x0, -0x68(%rbp)
movb %cl, -0x60(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x33c0
movq %rax, %rdi
callq 0x32b0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3090
cmpq $0x0, -0x48(%rbp)
je 0x611c
leaq -0x90(%rbp), %rdi
leaq 0x7202(%rip), %rsi      # 0xd28e
leaq -0x2a(%rbp), %rdx
callq 0x43b6
leaq -0xb0(%rbp), %r13
movq %r13, %rdi
leaq 0x702e(%rip), %rsi      # 0xd0d4
leaq -0x29(%rbp), %rdx
callq 0x43b6
leaq -0xd0(%rbp), %rdi
movq %r15, %rsi
leaq -0x90(%rbp), %rdx
movq %r13, %rcx
callq 0x4490
movq %r12, %rdi
movq %r14, %rsi
callq 0x45b7
leaq 0xe7de(%rip), %rdi      # 0x148b8
movq %r12, %rsi
callq 0x6792
movq %rax, %rdi
leaq -0xd0(%rbp), %r13
movq %r13, %rsi
callq 0x33b0
movq %r12, %rdi
callq 0x35c8
movq %r13, %rdi
callq 0x35c8
leaq -0xb0(%rbp), %rdi
callq 0x35c8
leaq -0x90(%rbp), %rdi
callq 0x35c8
movq %r15, %rdi
callq 0x35c8
movq %r14, %rdi
callq 0x35c8
movq -0x2f8(%rbp), %rax
movq -0x18(%rax), %rax
jmp 0x6029
movq %rax, %rbx
jmp 0x619c
movq %rax, %rbx
leaq -0xf0(%rbp), %rdi
callq 0x35c8
jmp 0x6155
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
callq 0x35c8
jmp 0x616b
movq %rax, %rbx
jmp 0x6177
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x35c8
leaq -0x90(%rbp), %rdi
callq 0x35c8
jmp 0x618a
jmp 0x6187
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x35c8
leaq -0x50(%rbp), %rdi
callq 0x35c8
leaq -0x2f8(%rbp), %rdi
callq 0x30d0
movq %rbx, %rdi
callq 0x3500
// File: /workspace/github_cpp_makefile_star2_O2/nickgammon[P]tinymudserver/commands.cpp
// Function: NoMore(tPlayer*, std::istream&)
void NoMore (tPlayer * p, istream & sArgs)
  {
  string sLine;
  getline (sArgs, sLine);
  if (!sLine.empty ())
    throw runtime_error ("Unexpected input: " + sLine);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rdi
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x38(%rbp), %rsi
callq 0x3090
cmpq $0x0, -0x30(%rbp)
jne 0x7718
leaq -0x38(%rbp), %rdi
callq 0x35c8
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x31b0
movq %rax, %rbx
leaq 0x5c44(%rip), %rsi      # 0xd36e
leaq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x90f3
movb $0x1, %r15b
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x3490
xorl %r15d, %r15d
movq 0xc8a0(%rip), %rsi      # 0x13ff0
movq 0xc861(%rip), %rdx      # 0x13fb8
movq %rbx, %rdi
callq 0x34e0
movq %rax, %r14
leaq -0x58(%rbp), %rdi
callq 0x35c8
testb %r15b, %r15b
jne 0x7775
jmp 0x7782
movq %rax, %r14
movq %rbx, %rdi
callq 0x3270
jmp 0x7782
movq %rax, %r14
leaq -0x38(%rbp), %rdi
callq 0x35c8
movq %r14, %rdi
callq 0x3500
// File: /workspace/github_cpp_makefile_star2_O2/nickgammon[P]tinymudserver/commands.cpp
// Function: GetMessage(std::istream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string GetMessage (istream & sArgs, const string & noMessageError)
  {
  string message;
  sArgs >> ws;  // skip leading spaces
  getline (sArgs, message); // get rest of line
  if (message.empty ()) // better have something
    throw runtime_error (noMessageError);
  return message;  
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0x32b0
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3090
cmpq $0x0, 0x8(%rbx)
je 0x77de
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x31b0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x3490
movq 0xc7f5(%rip), %rsi      # 0x13ff0
movq 0xc7b6(%rip), %rdx      # 0x13fb8
movq %r15, %rdi
callq 0x34e0
movq %rax, %r14
movq %r15, %rdi
callq 0x3270
jmp 0x781a
movq %rax, %r14
movq %rbx, %rdi
callq 0x35c8
movq %r14, %rdi
callq 0x3500
// File: /workspace/github_cpp_makefile_star2_O2/nickgammon[P]tinymudserver/commands.cpp
// Function: GetFlag(std::istream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string GetFlag (istream & sArgs, const string & noFlagError)
  {
  string flag;
  sArgs >> ws >> flag;
  if (flag.empty ())
    throw runtime_error (noFlagError);
  if (flag.find_first_not_of (valid_player_name) != string::npos)
    throw runtime_error ("Flag name not valid.");
  return flag;      
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0x32b0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x33c0
cmpq $0x0, 0x8(%rbx)
je 0x7889
leaq 0xcdcd(%rip), %rsi      # 0x14638
movq %rbx, %rdi
xorl %edx, %edx
callq 0x32c0
cmpq $-0x1, %rax
jne 0x78a1
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x31b0
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x3490
jmp 0x78bb
pushq $0x10
popq %rdi
callq 0x31b0
movq %rax, %r14
leaq 0x5ace(%rip), %rsi      # 0xd381
movq %rax, %rdi
callq 0x3140
movq 0xc72e(%rip), %rsi      # 0x13ff0
movq 0xc6ef(%rip), %rdx      # 0x13fb8
movq %r14, %rdi
callq 0x34e0
jmp 0x78d3
movq %rax, %r15
movq %r14, %rdi
callq 0x3270
jmp 0x78e3
movq %rax, %r15
movq %rbx, %rdi
callq 0x35c8
movq %r15, %rdi
callq 0x3500
// File: /workspace/github_cpp_makefile_star2_O2/nickgammon[P]tinymudserver/commands.cpp
// Function: PlayerToRoom(tPlayer*, int const&, 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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void PlayerToRoom (tPlayer * p,       // which player
                  const int & vnum,   // which room
                  const string & sPlayerMessage,  // what to tell the player
                  const string & sOthersDepartMessage,  // tell people in original room 
                  const string & sOthersArrriveMessage) // tell people in new room
{
  tRoom * r = FindRoom (vnum); // find the destination room (throws exception if not there)
  SendToAll (sOthersDepartMessage, p, p->room);  // tell others where s/he went
  p->room = vnum;  // move to new room
  *p << sPlayerMessage; // tell player
  p->DoCommand ("look");   // look around new room  
  SendToAll (sOthersArrriveMessage, p, p->room);  // tell others ws/he has arrived  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
movq %rsi, %rdi
callq 0xc574
movl 0xd4(%r14), %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x52eb
movl (%r13), %eax
movl %eax, 0xd4(%r14)
movq %r14, %rdi
movq %r12, %rsi
callq 0x5e24
leaq 0x5a4c(%rip), %rsi      # 0xd396
leaq -0x50(%rbp), %r15
leaq -0x29(%rbp), %rdx
movq %r15, %rdi
callq 0x43b6
movq %r14, %rdi
movq %r15, %rsi
callq 0x4edc
leaq -0x50(%rbp), %rdi
callq 0x35c8
movl 0xd4(%r14), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x52eb
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x35c8
movq %rbx, %rdi
callq 0x3500