LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: wangyufei95[P]watchdog_linux/watchdog.cpp
// Function: PidTracker::PidTracker()
PidTracker::PidTracker() 
{
	  char path[80];
	  snprintf(path, sizeof(path), "/sys/fs/cgroup/cpu/%d.supervisor", getpid());
	  int rv = mkdir(path, 0777);

	  if (rv < 0) 
	  {
		perror("PidTracker: mkdir");
	  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x3560
leaq -0x60(%rbp), %rax
movq %rax, -0x80(%rbp)
callq 0x35e0
movq -0x80(%rbp), %rdi
movl %eax, %ecx
movl $0x50, %esi
leaq 0x6501(%rip), %rdx      # 0xc15f
movb $0x0, %al
callq 0x3640
leaq -0x60(%rbp), %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x31a0
movl %eax, -0x64(%rbp)
cmpl $0x0, -0x64(%rbp)
jge 0x5ca6
leaq 0x64fd(%rip), %rdi      # 0xc180
callq 0x3340
jmp 0x5c8a
jmp 0x5ca6
movq -0x88(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
callq 0x3260
jmp 0x5caf
addq $0x90, %rsp
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x36e0
nopl (%rax,%rax)
// File: wangyufei95[P]watchdog_linux/watchdog.cpp
// Function: PidTracker::add(int)
void PidTracker::add(int pid) 
{
	  char path[80];
	  snprintf(path, sizeof(path), "/sys/fs/cgroup/cpu/%d.supervisor/tasks",
			   getpid());

	  char buf[64];
	  ssize_t n = snprintf(buf, sizeof(buf), "%d", pid);

	  int fd = open(path, O_WRONLY);
	  write(fd, buf, n);
	  close(fd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0xb8(%rbp)
callq 0x35e0
movq -0xb8(%rbp), %rdi
movl %eax, %ecx
movl $0x50, %esi
leaq 0x643b(%rip), %rdx      # 0xc192
movb $0x0, %al
callq 0x3640
leaq -0xa0(%rbp), %rdi
movl -0xc(%rbp), %ecx
movl $0x40, %esi
leaq 0x6479(%rip), %rdx      # 0xc1ed
movb $0x0, %al
callq 0x3640
cltq
movq %rax, -0xa8(%rbp)
leaq -0x60(%rbp), %rdi
movl $0x1, %esi
movb $0x0, %al
callq 0x3290
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %edi
leaq -0xa0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
callq 0x3110
movl -0xac(%rbp), %edi
callq 0x3780
addq $0xc0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: wangyufei95[P]watchdog_linux/watchdog.cpp
// Function: PidTracker::collectAll()
std::vector<int> PidTracker::collectAll() 
{
	  std::vector<int> result;

	  char path[80];
	  snprintf(path, sizeof(path), "/sys/fs/cgroup/cpu/%d.supervisor/tasks",
			   getpid());

	  std::ifstream tasksFile(path);
	  std::string line;

	  while (std::getline(tasksFile, line)) 
	  {
		result.push_back(stoi(line));
	  }

	  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2e0, %rsp            # imm = 0x2E0
movq %rdi, -0x2c8(%rbp)
movq %rdi, %rax
movq %rax, -0x2c0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x77e0
callq 0x35e0
movl %eax, %ecx
leaq 0x6387(%rip), %rdx      # 0xc192
xorl %eax, %eax
leaq -0x70(%rbp), %rdi
movq %rdi, -0x2b8(%rbp)
movl $0x50, %esi
callq 0x3640
movq -0x2b8(%rbp), %rsi
leaq -0x278(%rbp), %rdi
movl $0x8, %edx
callq 0x3730
jmp 0x5e3c
leaq -0x2a8(%rbp), %rdi
callq 0x3560
leaq -0x278(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
callq 0x3090
movq %rax, -0x2d0(%rbp)
jmp 0x5e64
movq -0x2d0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x34c0
movb %al, -0x2d1(%rbp)
jmp 0x5e82
movb -0x2d1(%rbp), %al
testb $0x1, %al
jne 0x5e91
jmp 0x5f14
xorl %eax, %eax
movl %eax, %esi
leaq -0x2a8(%rbp), %rdi
movl $0xa, %edx
callq 0x7830
movl %eax, -0x2d8(%rbp)
jmp 0x5eae
movq -0x2c8(%rbp), %rdi
movl -0x2d8(%rbp), %eax
movl %eax, -0x2ac(%rbp)
leaq -0x2ac(%rbp), %rsi
callq 0x7800
jmp 0x5ecf
jmp 0x5e48
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
jmp 0x5f52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x280(%rbp)
movl %eax, -0x284(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x3260
leaq -0x278(%rbp), %rdi
callq 0x30b0
jmp 0x5f52
movb $0x1, -0x11(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x3260
leaq -0x278(%rbp), %rdi
callq 0x30b0
testb $0x1, -0x11(%rbp)
jne 0x5f42
movq -0x2c8(%rbp), %rdi
callq 0x7870
movq -0x2c0(%rbp), %rax
addq $0x2e0, %rsp            # imm = 0x2E0
popq %rbp
retq
movq -0x2c8(%rbp), %rdi
callq 0x7870
movq -0x280(%rbp), %rdi
callq 0x36e0
nopw (%rax,%rax)
// File: wangyufei95[P]watchdog_linux/watchdog.cpp
// Function: getppid(int)
static pid_t getppid(pid_t pid) 
{
	  char statfile[64];
	  snprintf(statfile, sizeof(statfile), "/proc/%d/stat", pid);
	  FILE* fp = fopen(statfile, "r");
	  if (!fp) 
		  return 0;

	  int pid0;
	  char comm[16];  // definitely below 16
	  char state;
	  int ppid;

	  fscanf(fp, "%d %s %c %d", &pid0, comm, &state, &ppid);

	  return ppid;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl %edi, -0x8(%rbp)
leaq -0x50(%rbp), %rdi
movl -0x8(%rbp), %ecx
movl $0x40, %esi
leaq 0x6366(%rip), %rdx      # 0xc5f7
movb $0x0, %al
callq 0x3640
leaq -0x50(%rbp), %rdi
leaq 0x5eed(%rip), %rsi      # 0xc190
callq 0x3490
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x62bc
movl $0x0, -0x4(%rbp)
jmp 0x62e4
movq -0x58(%rbp), %rdi
leaq -0x70(%rbp), %rcx
leaq 0x633a(%rip), %rsi      # 0xc605
leaq -0x5c(%rbp), %rdx
leaq -0x71(%rbp), %r8
leaq -0x78(%rbp), %r9
movb $0x0, %al
callq 0x3740
movl -0x78(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
// File: wangyufei95[P]watchdog_linux/watchdog.cpp
// Function: getExe[abi:cxx11](int)
static std::string getExe(pid_t pid) 
{
	  char path[11 + 16];
	  snprintf(path, sizeof(path), "/proc/%d/exe", pid);

	  char buf[4096];
	  ssize_t n = readlink(path, buf, sizeof(buf) - 1);

	  if (n > 0) 
	  {
		return std::string(buf, n);
	  } 
	  else 
	  {
		return std::string();
	  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1070, %rsp           # imm = 0x1070
movq %rdi, -0x1060(%rbp)
movq %rdi, %rax
movq %rax, -0x1058(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq -0x30(%rbp), %rdi
movl -0xc(%rbp), %ecx
movl $0x1b, %esi
leaq 0x62eb(%rip), %rdx      # 0xc611
movb $0x0, %al
callq 0x3640
leaq -0x30(%rbp), %rdi
leaq -0x1030(%rbp), %rsi
movl $0xfff, %edx            # imm = 0xFFF
callq 0x3420
movq %rax, -0x1038(%rbp)
cmpq $0x0, -0x1038(%rbp)
jle 0x63c5
movq -0x1038(%rbp), %rax
movq %rax, -0x1070(%rbp)
leaq -0x1039(%rbp), %rdi
movq %rdi, -0x1068(%rbp)
callq 0x36f0
movq -0x1060(%rbp), %rdi
movq -0x1070(%rbp), %rdx
movq -0x1068(%rbp), %rcx
leaq -0x1030(%rbp), %rsi
callq 0x3450
jmp 0x6397
leaq -0x1039(%rbp), %rdi
callq 0x3430
jmp 0x63d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1048(%rbp)
movl %eax, -0x104c(%rbp)
leaq -0x1039(%rbp), %rdi
callq 0x3430
jmp 0x63e1
movq -0x1060(%rbp), %rdi
callq 0x3560
movq -0x1058(%rbp), %rax
addq $0x1070, %rsp           # imm = 0x1070
popq %rbp
retq
movq -0x1048(%rbp), %rdi
callq 0x36e0
nopl (%rax)
// File: wangyufei95[P]watchdog_linux/watchdog.cpp
// Function: Program::spawn()
bool Program::spawn() 
	{
	  logger_->info("starting program (%s)...", exe_.c_str());

	  pid_t pid = fork();

	  if (pid < 0) 
	  {
		logger_->error("fork failed. %s", strerror(errno));
		return false;
	  } 
	  else if (pid > 0) 
	  {  // parent
		pid_ = pid;
		pidTracker_.add(pid);
		logger_->info("child pid is %d", pid);
		return true;
	  } 
	  else 
	  {  // child
		std::vector<char*> argv;

		for (const std::string& arg : argv_) 
		{
		  argv.push_back(const_cast<char*>(arg.c_str()));
		}
		argv.push_back(nullptr);

		execvp(exe_.c_str(), argv.data());
		logger_->error("execvp failed. %s", strerror(errno));
		abort();
	  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x80(%rbp)
movq (%rdi), %rax
movq %rax, -0x78(%rbp)
addq $0x8, %rdi
callq 0x3150
movq -0x78(%rbp), %rdi
movq %rax, %rdx
leaq 0x5c4b(%rip), %rsi      # 0xc1f0
callq 0x7de0
callq 0x30c0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x65f1
movq -0x80(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x88(%rbp)
callq 0x3040
movl (%rax), %edi
callq 0x3100
movq -0x88(%rbp), %rdi
movq %rax, %rdx
leaq 0x5c26(%rip), %rsi      # 0xc209
callq 0x7f00
movb $0x0, -0x1(%rbp)
jmp 0x6738
cmpl $0x0, -0x14(%rbp)
jle 0x662c
movq -0x80(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, 0x60(%rdi)
addq $0x68, %rdi
movl -0x14(%rbp), %esi
callq 0x5d20
movq -0x80(%rbp), %rax
movq (%rax), %rdi
movl -0x14(%rbp), %edx
leaq 0x5bfb(%rip), %rsi      # 0xc219
callq 0x7ca0
movb $0x1, -0x1(%rbp)
jmp 0x6738
leaq -0x30(%rbp), %rdi
callq 0x8020
movq -0x80(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x8040
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x8070
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x80a0
testb $0x1, %al
jne 0x666e
jmp 0x66be
leaq -0x40(%rbp), %rdi
callq 0x80e0
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x3150
movq %rax, -0x58(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x8100
jmp 0x6697
jmp 0x6699
leaq -0x40(%rbp), %rdi
callq 0x8130
jmp 0x665b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x8170
jmp 0x6746
movq $0x0, -0x70(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x8100
jmp 0x66d5
movq -0x80(%rbp), %rdi
addq $0x8, %rdi
callq 0x3150
movq %rax, -0x98(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x8150
movq -0x98(%rbp), %rdi
movq %rax, %rsi
callq 0x32d0
movq -0x80(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
callq 0x3040
movl (%rax), %edi
callq 0x3100
movq -0x90(%rbp), %rdi
movq %rax, %rdx
leaq 0x5afd(%rip), %rsi      # 0xc229
callq 0x7f00
jmp 0x6733
callq 0x3230
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xa0, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x36e0
nop
// File: wangyufei95[P]watchdog_linux/watchdog.cpp
// Function: Program::resume()
bool Program::resume() 
	{
		  pidTracker_.dump("resume");

		  if (pid_t pid = pidTracker_.findMainPID(mainPidfile_)) 
		  {
			logger_->info("new main pid: %d", pid);
			pid_ = pid;
			return true;
		  }

		  const auto pids = pidTracker_.collectAll();
		  if (!pids.empty()) 
		  {
			pid_ = pids[0];
			return true;
		  }

		  return false;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x40(%rbp)
addq $0x68, %rdi
leaq 0x5a69(%rip), %rsi      # 0xc1d8
callq 0x63f0
movq -0x40(%rbp), %rsi
movq %rsi, %rdi
addq $0x68, %rdi
addq $0x40, %rsi
callq 0x5f70
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x67b7
movq -0x40(%rbp), %rax
movq (%rax), %rdi
movl -0x14(%rbp), %edx
leaq 0x5a3d(%rip), %rsi      # 0xc1df
callq 0x7ca0
movq -0x40(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, 0x60(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x680f
movq -0x40(%rbp), %rsi
addq $0x68, %rsi
leaq -0x30(%rbp), %rdi
callq 0x5dd0
leaq -0x30(%rbp), %rdi
callq 0x7ab0
testb $0x1, %al
jne 0x67fb
leaq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x7dc0
movq %rax, %rcx
movq -0x40(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0x60(%rax)
movb $0x1, -0x1(%rbp)
movl $0x1, -0x34(%rbp)
jmp 0x6806
movb $0x0, -0x1(%rbp)
movl $0x1, -0x34(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x7870
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: wangyufei95[P]watchdog_linux/watchdog.cpp
// Function: Supervisor::sighandler(int)
void Supervisor::sighandler(int signum) 
{
  if (self()->program_->pid()) 
  {
    self()->logger()->info(
        "Signal '%s' (%d) received. Forwarding to child PID %d.",
        strsignal(signum), signum, self()->program_->pid());

    // forward to child process
    self()->program_->signal(signum);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
callq 0x8b00
movq %rax, %rdi
addq $0x28, %rdi
callq 0x86c0
movq %rax, %rdi
callq 0x86e0
cmpl $0x0, %eax
je 0x70cb
callq 0x8b00
movq %rax, %rdi
callq 0x8320
movq %rax, -0x18(%rbp)
movl -0x4(%rbp), %edi
callq 0x3700
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x8(%rbp)
callq 0x8b00
movq %rax, %rdi
addq $0x28, %rdi
callq 0x86c0
movq %rax, %rdi
callq 0x86e0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x8(%rbp), %ecx
movl %eax, %r8d
leaq 0x5511(%rip), %rsi      # 0xc5bb
callq 0x8b10
callq 0x8b00
movq %rax, %rdi
addq $0x28, %rdi
callq 0x86c0
movq %rax, %rdi
movl -0x4(%rbp), %esi
callq 0x6840
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: wangyufei95[P]watchdog_linux/watchdog.cpp
// Function: Supervisor::restart()
bool Supervisor::restart() 
{
  if (restartDelay_) 
  {
    logger()->info("restart is sleeping for %d seconds\n", restartDelay_);
    sleep(restartDelay_);

    // exponential backoff for the next restart
    restartDelay_ = std::min(restartDelay_ << 1, restartDelayLimit_);
  } 
  else 
  {
    restartDelay_ = 1;
	cout<<endl;
  }

  restartCount_++;
  if(restartCount_%3==0)
  {
	  run_mail();
  }
  return program_->restart();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, 0x74(%rax)
je 0x764c
movq -0x18(%rbp), %rdi
callq 0x8320
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x74(%rax), %edx
leaq 0x4f83(%rip), %rsi      # 0xc597
callq 0x7ca0
movq -0x18(%rbp), %rax
movl 0x74(%rax), %edi
callq 0x32b0
movq -0x18(%rbp), %rsi
movl 0x74(%rsi), %eax
shll %eax
movl %eax, -0xc(%rbp)
addq $0x78, %rsi
leaq -0xc(%rbp), %rdi
callq 0x8ac0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0x74(%rax)
jmp 0x766a
movq -0x18(%rbp), %rax
movl $0x1, 0x74(%rax)
movq 0x995a(%rip), %rdi      # 0x10fb8
movq 0x993b(%rip), %rsi      # 0x10fa0
callq 0x3410
movq -0x18(%rbp), %rax
movl 0x70(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x70(%rax)
movl 0x70(%rax), %eax
movl $0x3, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x768c
callq 0x5b40
movq -0x18(%rbp), %rdi
addq $0x28, %rdi
callq 0x86c0
movq %rax, %rdi
callq 0x6820
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: wangyufei95[P]watchdog_linux/watchdog.cpp
// Function: Supervisor::isExitSuccess(int) const
bool Supervisor::isExitSuccess(int value) const 
{
  for (int code: successExitCodes_)
    if (value == code)
      return true;

  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
addq $0x90, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x89e0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x8a10
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x8a40
testb $0x1, %al
jne 0x76fa
jmp 0x7723
leaq -0x28(%rbp), %rdi
callq 0x8a80
movl (%rax), %eax
movl %eax, -0x34(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x34(%rbp), %eax
jne 0x7716
movb $0x1, -0x1(%rbp)
jmp 0x7727
jmp 0x7718
leaq -0x28(%rbp), %rdi
callq 0x8aa0
jmp 0x76e7
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: wangyufei95[P]watchdog_linux/watchdog.cpp
// Function: void Logger::info<int>(char const*, int)
void info(const char* fmt, Args... args) 
	{
		if (logLevel_ >= 2) 
		{
		  std::string fmt2("%s[%d]: ");
		  fmt2 += fmt;
		  fmt2 += "\n";
		  fprintf(stdout, fmt2.c_str(), basename_.c_str(), getpid(), args...);
		  fflush(stdout);
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpl $0x2, 0x20(%rax)
jl 0x7da6
leaq -0x39(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x36f0
movq -0x60(%rbp), %rdx
leaq 0x4958(%rip), %rsi      # 0xc638
leaq -0x38(%rbp), %rdi
callq 0x3540
jmp 0x7ceb
leaq -0x39(%rbp), %rdi
callq 0x3430
movq -0x10(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x33c0
jmp 0x7d03
leaq 0x477f(%rip), %rsi      # 0xc489
leaq -0x38(%rbp), %rdi
callq 0x33c0
jmp 0x7d15
movq 0x9274(%rip), %rax      # 0x10f90
movq %rax, -0x68(%rbp)
movq (%rax), %rax
movq %rax, -0x80(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3150
movq -0x58(%rbp), %rdi
movq %rax, -0x78(%rbp)
callq 0x3150
movq %rax, -0x70(%rbp)
callq 0x35e0
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
movl %eax, %ecx
movl -0x14(%rbp), %r8d
xorl %eax, %eax
callq 0x35b0
movq -0x68(%rbp), %rax
movq (%rax), %rdi
callq 0x3480
jmp 0x7d6d
leaq -0x38(%rbp), %rdi
callq 0x3260
jmp 0x7da6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0x3430
jmp 0x7daf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3260
jmp 0x7daf
addq $0x80, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x36e0
nopl (%rax,%rax)
// File: wangyufei95[P]watchdog_linux/watchdog.cpp
// Function: void Logger::error<char*>(char const*, char*)
void error(const char* fmt, Args... args) 
	{
    	if (logLevel_ >= 1) 
		{
		  std::string fmt2("%s[%d]: ");
		  fmt2 += fmt;
		  fmt2 += "\n";
		  fprintf(stderr, fmt2.c_str(), basename_.c_str(), getpid(), args...);
		  fflush(stderr);
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpl $0x1, 0x20(%rax)
jl 0x8007
leaq -0x39(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x36f0
movq -0x60(%rbp), %rdx
leaq 0x46f7(%rip), %rsi      # 0xc638
leaq -0x38(%rbp), %rdi
callq 0x3540
jmp 0x7f4c
leaq -0x39(%rbp), %rdi
callq 0x3430
movq -0x10(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x33c0
jmp 0x7f64
leaq 0x451e(%rip), %rsi      # 0xc489
leaq -0x38(%rbp), %rdi
callq 0x33c0
jmp 0x7f76
movq 0x9043(%rip), %rax      # 0x10fc0
movq %rax, -0x68(%rbp)
movq (%rax), %rax
movq %rax, -0x80(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3150
movq -0x58(%rbp), %rdi
movq %rax, -0x78(%rbp)
callq 0x3150
movq %rax, -0x70(%rbp)
callq 0x35e0
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
movl %eax, %ecx
movq -0x18(%rbp), %r8
xorl %eax, %eax
callq 0x35b0
movq -0x68(%rbp), %rax
movq (%rax), %rdi
callq 0x3480
jmp 0x7fce
leaq -0x38(%rbp), %rdi
callq 0x3260
jmp 0x8007
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0x3430
jmp 0x8010
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3260
jmp 0x8010
addq $0x80, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x36e0
nopl (%rax)
// File: FreeSlave[P]vhlt/common/blockmem.cpp
// Function: FreeBlock(void*)
bool            FreeBlock(void* pointer)
{
    if (!pointer)
    {
        Warning("Freeing a null pointer");
    }
    free(pointer);
    return true;
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
cmpq $0x0, (%rsp)
jne 0x4a8a
leaq 0x255a0(%rip), %rdi     # 0x2a023
movb $0x0, %al
callq 0xbef0
movq (%rsp), %rdi
callq 0x4470
movb $0x1, %al
andb $0x1, %al
popq %rcx
retq
nopl (%rax)
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: CompressVis(unsigned char const*, unsigned int, unsigned char*, unsigned int)
int             CompressVis(const byte* const src, const unsigned int src_length, byte* dest, unsigned int dest_length)
{
    unsigned int    j;
    byte*           dest_p = dest;
    unsigned int    current_length = 0;

    for (j = 0; j < src_length; j++)
    {
        current_length++;
        hlassume(current_length <= dest_length, assume_COMPRESSVIS_OVERFLOW);

        *dest_p = src[j];
        dest_p++;

        if (src[j])
        {
            continue;
        }

        unsigned char   rep = 1;

        for (j++; j < src_length; j++)
        {
            if (src[j] || rep == 255)
            {
                break;
            }
            else
            {
                rep++;
            }
        }
        current_length++;
        hlassume(current_length <= dest_length, assume_COMPRESSVIS_OVERFLOW);

        *dest_p = rep;
        dest_p++;
        j--;
    }

    return dest_p - dest;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movq %rdx, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x18(%rsp)
movl 0x18(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jae 0x4c13
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x1c(%rsp), %eax
setbe %al
movzbl %al, %edi
andl $0x1, %edi
movl $0x33, %esi
callq 0xc400
movq 0x30(%rsp), %rax
movl 0x18(%rsp), %ecx
movb (%rax,%rcx), %cl
movq 0x10(%rsp), %rax
movb %cl, (%rax)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movl 0x18(%rsp), %ecx
cmpb $0x0, (%rax,%rcx)
je 0x4b69
jmp 0x4c03
movb $0x1, 0xb(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jae 0x4bb9
movq 0x30(%rsp), %rax
movl 0x18(%rsp), %ecx
cmpb $0x0, (%rax,%rcx)
jne 0x4b9e
movzbl 0xb(%rsp), %eax
cmpl $0xff, %eax
jne 0x4ba0
jmp 0x4bb9
movb 0xb(%rsp), %al
addb $0x1, %al
movb %al, 0xb(%rsp)
jmp 0x4bac
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x4b79
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x1c(%rsp), %eax
setbe %al
movzbl %al, %edi
andl $0x1, %edi
movl $0x33, %esi
callq 0xc400
movb 0xb(%rsp), %cl
movq 0x10(%rsp), %rax
movb %cl, (%rax)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
movl 0x18(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x4b00
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
subq %rcx, %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: CopyLump(int, void*, int, dheader_t const*)
static int      CopyLump(int lump, void* dest, int size, const dheader_t* const header)
{
    int             length, ofs;

    length = header->lumps[lump].filelen;
    ofs = header->lumps[lump].fileofs;

    if (length % size)
    {
        Error("LoadBSPFile: odd lump size");
    }
	
	//special handling for tex and lightdata to keep things from exploding - KGP
	if(lump == LUMP_TEXTURES && dest == (void*)g_dtexdata)
	{ hlassume(g_max_map_miptex > length,assume_MAX_MAP_MIPTEX); }
	else if(lump == LUMP_LIGHTING && dest == (void*)g_dlightdata)
	{ hlassume(g_max_map_lightdata > length,assume_MAX_MAP_LIGHTING); }

    memcpy(dest, (byte*) header + ofs, length);

    return length / size;
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x24(%rsp)
movq %rsi, 0x18(%rsp)
movl %edx, 0x14(%rsp)
movq %rcx, 0x8(%rsp)
movq 0x8(%rsp), %rax
movslq 0x24(%rsp), %rcx
movl 0x8(%rax,%rcx,8), %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rax
movslq 0x24(%rsp), %rcx
movl 0x4(%rax,%rcx,8), %eax
movl %eax, (%rsp)
movl 0x4(%rsp), %eax
cltd
idivl 0x14(%rsp)
cmpl $0x0, %edx
je 0x5295
leaq 0x2547c(%rip), %rdi     # 0x2a70a
movb $0x0, %al
callq 0xba80
cmpl $0x2, 0x24(%rsp)
jne 0x52c9
movq 0x18(%rsp), %rax
cmpq 0x83a270(%rip), %rax    # 0x83f518
jne 0x52c9
movl 0x31110(%rip), %eax     # 0x363c0
cmpl 0x4(%rsp), %eax
setg %al
movzbl %al, %edi
andl $0x1, %edi
movl $0x25, %esi
callq 0xc400
jmp 0x52fd
cmpl $0x8, 0x24(%rsp)
jne 0x52fb
movq 0x18(%rsp), %rax
cmpq 0x83a22c(%rip), %rax    # 0x83f508
jne 0x52fb
movl 0x310e0(%rip), %eax     # 0x363c4
cmpl 0x4(%rsp), %eax
setg %al
movzbl %al, %edi
andl $0x1, %edi
movl $0x38, %esi
callq 0xc400
jmp 0x52fd
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
movslq (%rsp), %rax
addq %rax, %rsi
movslq 0x4(%rsp), %rdx
callq 0x4310
movl 0x4(%rsp), %eax
cltd
idivl 0x14(%rsp)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: FastChecksum(void const*, int)
static int      FastChecksum(const void* const buffer, int bytes)
{
    int             checksum = 0;
    char*           buf = (char*)buffer;

    while (bytes--)
    {
        checksum = rotl(checksum, 4) ^ (*buf);
        buf++;
    }

    return checksum;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movl 0xc(%rsp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, 0xc(%rsp)
cmpl $0x0, %eax
je 0x5e59
movl 0x8(%rsp), %edi
movl $0x4, %esi
callq 0x9380
movq (%rsp), %rcx
movsbl (%rcx), %ecx
xorl %ecx, %eax
movl %eax, 0x8(%rsp)
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
jmp 0x5e1e
movl 0x8(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: AddLump(int, void*, int, dheader_t*, _IO_FILE*)
static void     AddLump(int lumpnum, void* data, int len, dheader_t* header, FILE* bspfile)
{
    lump_t* lump =&header->lumps[lumpnum];
    lump->fileofs = LittleLong(ftell(bspfile));
    lump->filelen = LittleLong(len);
    SafeWrite(bspfile, data, (len + 3) & ~3);
}

// Assembly:
subq $0x38, %rsp
movl %edi, 0x34(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movq %rcx, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq 0x18(%rsp), %rax
addq $0x4, %rax
movslq 0x34(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x4030
movl %eax, %edi
callq 0x9980
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, (%rax)
movl 0x24(%rsp), %edi
callq 0x9980
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x4(%rax)
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x24(%rsp), %edx
addl $0x3, %edx
andl $-0x4, %edx
callq 0xb130
addq $0x38, %rsp
retq
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: CalculatePointVecsProduct(float const volatile*, float const volatile*)
float CalculatePointVecsProduct (const volatile float *point, const volatile float *vecs)
{
	volatile double val;
	volatile double tmp;

	val = (double)point[0] * (double)vecs[0]; // always do one operation at a time and save to memory
	tmp = (double)point[1] * (double)vecs[1];
	val = val + tmp;
	tmp = (double)point[2] * (double)vecs[2];
	val = val + tmp;
	val = val + (double)vecs[3];

	return (float)val;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rsp), %rax
movss (%rax), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rsp)
movq -0x8(%rsp), %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rsp), %rax
movss 0x4(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rsp)
movsd -0x18(%rsp), %xmm0
movsd -0x20(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rsp)
movq -0x8(%rsp), %rax
movss 0x8(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rsp), %rax
movss 0x8(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rsp)
movsd -0x18(%rsp), %xmm0
movsd -0x20(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rsp)
movsd -0x18(%rsp), %xmm0
movq -0x10(%rsp), %rax
movss 0xc(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rsp)
movsd -0x18(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
retq
nop
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: CalcFaceExtents_test()
bool CalcFaceExtents_test ()
{
	const int numtestcases = 6;
	volatile float testcases[numtestcases][8] = {
		{1, 1, 1, 1, 0.375 * DBL_EPSILON, 0.375 * DBL_EPSILON, -1, 0},
		{1, 1, 1, 0.375 * DBL_EPSILON, 0.375 * DBL_EPSILON, 1, -1, DBL_EPSILON},
		{DBL_EPSILON, DBL_EPSILON, 1, 0.375, 0.375, 1, -1, DBL_EPSILON},
		{1, 1, 1, 1, 1, 0.375 * FLT_EPSILON, -2, 0.375 * FLT_EPSILON},
		{1, 1, 1, 1, 0.375 * FLT_EPSILON, 1, -2, 0.375 * FLT_EPSILON},
		{1, 1, 1, 0.375 * FLT_EPSILON, 1, 1, -2, 0.375 * FLT_EPSILON}};
	bool ok;

	// If the test failed, please check:
	//   1. whether the calculation is performed on FPU
	//   2. whether the register precision is too low
		
	CorrectFPUPrecision ();

	ok = true;
	for (int i = 0; i < 6; i++)
	{
		float val = CalculatePointVecsProduct (&testcases[i][0], &testcases[i][3]);
		if (val != testcases[i][7])
		{
			Warning ("internal error: CalcFaceExtents_test failed on case %d (%.20f != %.20f).", i, val, testcases[i][7]);
			ok = false;
		}
	}
	return ok;
}

// Assembly:
subq $0xd8, %rsp
movl $0x6, 0xd4(%rsp)
leaq 0x244d7(%rip), %rsi     # 0x2a780
leaq 0x10(%rsp), %rdi
movl $0xc0, %edx
callq 0x4310
callq 0x6390
movb $0x1, 0xf(%rsp)
movl $0x0, 0x8(%rsp)
cmpl $0x6, 0x8(%rsp)
jge 0x6378
movslq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
movslq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rsi
shlq $0x5, %rax
addq %rax, %rsi
addq $0xc, %rsi
callq 0x61c0
movss %xmm0, 0x4(%rsp)
movss 0x4(%rsp), %xmm0
movslq 0x8(%rsp), %rcx
leaq 0x10(%rsp), %rax
shlq $0x5, %rcx
addq %rcx, %rax
movss 0x1c(%rax), %xmm1
ucomiss %xmm1, %xmm0
jne 0x632b
jp 0x632b
jmp 0x6366
movl 0x8(%rsp), %esi
movss 0x4(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq 0x8(%rsp), %rcx
leaq 0x10(%rsp), %rax
shlq $0x5, %rcx
addq %rcx, %rax
movss 0x1c(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
leaq 0x23d50(%rip), %rdi     # 0x2a0aa
movb $0x2, %al
callq 0xbef0
movb $0x0, 0xf(%rsp)
jmp 0x6368
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x62ca
movb 0xf(%rsp), %al
andb $0x1, %al
addq $0xd8, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: ParseTexinfoForFace(dface_t const*)
int ParseTexinfoForFace (const dface_t *f)
{
	int texinfo;
	int miptex;
	int texinfo2;

	texinfo = f->texinfo;
	miptex = g_texinfo[texinfo].miptex;
	if (miptex != -1)
	{
		texinfo2 = ParseImplicitTexinfoFromTexture (miptex);
		if (texinfo2 != -1)
		{
			texinfo = texinfo2;
		}
	}

	return texinfo;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movswl 0xa(%rax), %eax
movl %eax, 0xc(%rsp)
movslq 0xc(%rsp), %rcx
leaq 0x1198e2e(%rip), %rax   # 0x119f470
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
movl %eax, 0x8(%rsp)
cmpl $-0x1, 0x8(%rsp)
je 0x6675
movl 0x8(%rsp), %edi
callq 0x7580
movl %eax, 0x4(%rsp)
cmpl $-0x1, 0x4(%rsp)
je 0x6673
movl 0x4(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0x6675
movl 0xc(%rsp), %eax
addq $0x18, %rsp
retq
nop
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: WriteExtentFile(char const*)
void WriteExtentFile (const char *const filename)
{
	FILE *f;
	f = fopen (filename, "w");
	if (!f)
	{
		Error ("Error opening %s: %s", filename, strerror(errno));
	}
	fprintf (f, "%i\n", g_numfaces);
	for (int i = 0; i < g_numfaces; i++)
	{
		int mins[2];
		int maxs[2];
		GetFaceExtents (i, mins, maxs);
		fprintf (f, "%i %i %i %i\n", mins[0], mins[1], maxs[0], maxs[1]);
	}
	fclose (f);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x2915f(%rip), %rsi     # 0x2f7f4
callq 0x4460
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x66d3
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x4060
movl (%rax), %edi
callq 0x4150
movq 0x8(%rsp), %rsi
movq %rax, %rdx
leaq 0x23a27(%rip), %rdi     # 0x2a0f3
movb $0x0, %al
callq 0xba80
movq 0x28(%rsp), %rdi
movl 0x1b98d96(%rip), %edx   # 0x1b9f474
leaq 0x26a73(%rip), %rsi     # 0x2d158
movb $0x0, %al
callq 0x4550
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x1b98d76(%rip), %eax   # 0x1b9f474
jge 0x6745
movl 0x24(%rsp), %edi
leaq 0x1c(%rsp), %rsi
leaq 0x14(%rsp), %rdx
callq 0x63a0
movq 0x28(%rsp), %rdi
movl 0x1c(%rsp), %edx
movl 0x20(%rsp), %ecx
movl 0x14(%rsp), %r8d
movl 0x18(%rsp), %r9d
leaq 0x239d7(%rip), %rsi     # 0x2a108
movb $0x0, %al
callq 0x4550
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x66f4
movq 0x28(%rsp), %rdi
callq 0x43a0
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: GetTextureByNumber(int)
char*           GetTextureByNumber(int texturenumber)
{
#ifdef HLCSG_HLBSP_VOIDTEXINFO
	if (texturenumber == -1)
		return emptystring;
#endif
    texinfo_t*      info;
    miptex_t*       miptex;
    int             ofs;

    info = &g_texinfo[texturenumber];
    ofs = ((dmiptexlump_t*)g_dtexdata)->dataofs[info->miptex];
    miptex = (miptex_t*)(&g_dtexdata[ofs]);

    return miptex->name;
}

// Assembly:
movl %edi, -0xc(%rsp)
cmpl $-0x1, -0xc(%rsp)
jne 0x6c89
leaq 0x20c682e(%rip), %rax   # 0x20cd4b0
movq %rax, -0x8(%rsp)
jmp 0x6cd7
movslq -0xc(%rsp), %rcx
leaq 0x11987db(%rip), %rax   # 0x119f470
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rsp)
movq 0x838870(%rip), %rax    # 0x83f518
movq -0x18(%rsp), %rcx
movslq 0x20(%rcx), %rcx
movl 0x4(%rax,%rcx,4), %eax
movl %eax, -0x24(%rsp)
movq 0x838858(%rip), %rax    # 0x83f518
movslq -0x24(%rsp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movq -0x20(%rsp), %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopl (%rax)
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: NoWadTextures()
bool NoWadTextures ()
{
	// copied from loadtextures.cpp
	int numtextures = g_texdatasize? ((dmiptexlump_t *)g_dtexdata)->nummiptex: 0;
	for (int i = 0; i < numtextures; i++)
	{
		int offset = ((dmiptexlump_t *)g_dtexdata)->dataofs[i];
		int size = g_texdatasize - offset;
		if (offset < 0 || size < (int)sizeof (miptex_t))
		{
			// missing textures have ofs -1
			continue;
		}
		miptex_t *mt = (miptex_t *)&g_dtexdata[offset];
		if (!mt->offsets[0])
		{
			return false;
		}
	}
	return true;
}

// Assembly:
cmpl $0x0, 0x83882d(%rip)    # 0x83f514
je 0x6cf8
movq 0x838828(%rip), %rax    # 0x83f518
movl (%rax), %eax
movl %eax, -0x24(%rsp)
jmp 0x6d00
xorl %eax, %eax
movl %eax, -0x24(%rsp)
jmp 0x6d00
movl -0x24(%rsp), %eax
movl %eax, -0x8(%rsp)
movl $0x0, -0xc(%rsp)
movl -0xc(%rsp), %eax
cmpl -0x8(%rsp), %eax
jge 0x6d81
movq 0x8387f7(%rip), %rax    # 0x83f518
movslq -0xc(%rsp), %rcx
movl 0x4(%rax,%rcx,4), %eax
movl %eax, -0x10(%rsp)
movl 0x8387e0(%rip), %eax    # 0x83f514
subl -0x10(%rsp), %eax
movl %eax, -0x14(%rsp)
cmpl $0x0, -0x10(%rsp)
jl 0x6d4a
cmpl $0x28, -0x14(%rsp)
jge 0x6d4c
jmp 0x6d74
movq 0x8387c5(%rip), %rax    # 0x83f518
movslq -0x10(%rsp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movq -0x20(%rsp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x6d72
movb $0x0, -0x1(%rsp)
jmp 0x6d86
jmp 0x6d74
movl -0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rsp)
jmp 0x6d10
movb $0x1, -0x1(%rsp)
movb -0x1(%rsp), %al
andb $0x1, %al
retq
nopl (%rax)
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: ArrayUsage(char const*, int, int, int)
static int      ArrayUsage(const char* const szItem, const int items, const int maxitems, const int itemsize)
{
    float           percentage = maxitems ? items * 100.0 / maxitems : 0.0;

#ifdef ZHLT_MAX_MAP_LEAFS
    Log("%-13s %7i/%-7i %8i/%-8i (%4.1f%%)\n", szItem, items, maxitems, items * itemsize, maxitems * itemsize, percentage);
#else
    Log("%-12s  %7i/%-7i  %7i/%-7i  (%4.1f%%)\n", szItem, items, maxitems, items * itemsize, maxitems * itemsize, percentage);
#endif

    return items * itemsize;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl %edx, 0x18(%rsp)
movl %ecx, 0x14(%rsp)
cmpl $0x0, 0x18(%rsp)
je 0x7480
cvtsi2sdl 0x1c(%rsp), %xmm0
movsd 0x22bf6(%rip), %xmm1    # 0x2a060
mulsd %xmm1, %xmm0
cvtsi2sdl 0x18(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x748b
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x748b
movsd 0x8(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rsi
movl 0x1c(%rsp), %edx
movl 0x18(%rsp), %ecx
movl 0x1c(%rsp), %r8d
imull 0x14(%rsp), %r8d
movl 0x18(%rsp), %r9d
imull 0x14(%rsp), %r9d
movss 0x10(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x23256(%rip), %rdi     # 0x2a725
movb $0x1, %al
callq 0xb5d0
movl 0x1c(%rsp), %eax
imull 0x14(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: GlobUsage(char const*, int, int)
static int      GlobUsage(const char* const szItem, const int itemstorage, const int maxstorage)
{
    float           percentage = maxstorage ? itemstorage * 100.0 / maxstorage : 0.0;

#ifdef ZHLT_MAX_MAP_LEAFS
    Log("%-13s    [variable]   %8i/%-8i (%4.1f%%)\n", szItem, itemstorage, maxstorage, percentage);
#else
    Log("%-12s     [variable]    %7i/%-7i  (%4.1f%%)\n", szItem, itemstorage, maxstorage, percentage);
#endif

    return itemstorage;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl %edx, 0x18(%rsp)
cmpl $0x0, 0x18(%rsp)
je 0x752c
cvtsi2sdl 0x1c(%rsp), %xmm0
movsd 0x22b4a(%rip), %xmm1    # 0x2a060
mulsd %xmm1, %xmm0
cvtsi2sdl 0x18(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x7537
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x7537
movsd 0x8(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x14(%rsp)
movq 0x20(%rsp), %rsi
movl 0x1c(%rsp), %edx
movl 0x18(%rsp), %ecx
movss 0x14(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x231e3(%rip), %rdi     # 0x2a748
movb $0x1, %al
callq 0xb5d0
movl 0x1c(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: ParseEpair()
epair_t*        ParseEpair()
{
    epair_t*        e;

    e = (epair_t*)Alloc(sizeof(epair_t));

    if (strlen(g_token) >= MAX_KEY - 1)
        Error("ParseEpair: Key token too long (%i > MAX_KEY)", (int)strlen(g_token));

    e->key = _strdup(g_token);
    GetToken(false);

    if (strlen(g_token) >= MAX_VAL - 1) //MAX_VALUE //vluzacn
        Error("ParseEpar: Value token too long (%i > MAX_VALUE)", (int)strlen(g_token));

    e->value = _strdup(g_token);

    return e;
}

// Assembly:
pushq %rax
movl $0x18, %edi
callq 0x4aa0
movq %rax, (%rsp)
leaq 0x20c991a(%rip), %rdi   # 0x20d1500
callq 0x41c0
cmpq $0x7f, %rax
jb 0x7c0d
leaq 0x20c9908(%rip), %rdi   # 0x20d1500
callq 0x41c0
movl %eax, %esi
leaq 0x2288b(%rip), %rdi     # 0x2a491
movb $0x0, %al
callq 0xba80
leaq 0x20c98ec(%rip), %rdi   # 0x20d1500
callq 0x46b0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rax)
xorl %edi, %edi
callq 0xce10
leaq 0x20c98ce(%rip), %rdi   # 0x20d1500
callq 0x41c0
cmpq $0xfff, %rax            # imm = 0xFFF
jb 0x7c5b
leaq 0x20c98ba(%rip), %rdi   # 0x20d1500
callq 0x41c0
movl %eax, %esi
leaq 0x2286b(%rip), %rdi     # 0x2a4bf
movb $0x0, %al
callq 0xba80
leaq 0x20c989e(%rip), %rdi   # 0x20d1500
callq 0x46b0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
movq (%rsp), %rax
popq %rcx
retq
nopl (%rax,%rax)
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: ValueForKey(entity_t const*, char const*)
const char*     ValueForKey(const entity_t* const ent, const char* const key)
{
    epair_t*        ep;

    for (ep = ent->epairs; ep; ep = ep->next)
    {
        if (!strcmp(ep->key, key))
        {
            return ep->value;
        }
    }
    return "";
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x804d
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x4530
cmpl $0x0, %eax
jne 0x803c
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x8059
jmp 0x803e
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x800c
leaq 0x23ce5(%rip), %rax     # 0x2bd39
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: SetKeyValue(entity_t*, char const*, char const*)
void            SetKeyValue(entity_t* ent, const char* const key, const char* const value)
{
    epair_t*        ep;

#ifdef ZHLT_DELETEKEY
	if (!value[0])
	{
		DeleteKey (ent, key);
		return;
	}
#endif
    for (ep = ent->epairs; ep; ep = ep->next)
    {
        if (!strcmp(ep->key, key))
        {
#ifdef ZHLT_DELETEKEY
			char *value2 = strdup (value);
			Free (ep->value);
			ep->value = value2;
#else
            Free(ep->value);
            ep->value = strdup(value);
#endif
            return;
        }
    }
    ep = (epair_t*)Alloc(sizeof(*ep));
    ep->next = ent->epairs;
    ent->epairs = ep;
    ep->key = strdup(key);
    ep->value = strdup(value);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpb $0x0, (%rax)
jne 0x80a1
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x8170
jmp 0x8165
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x810b
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x4530
cmpl $0x0, %eax
jne 0x80fa
movq 0x10(%rsp), %rdi
callq 0x46b0
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x4ab0
movq (%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x8165
jmp 0x80fc
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x80af
movl $0x18, %edi
callq 0x4aa0
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x18(%rsp), %rdi
callq 0x46b0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rdi
callq 0x46b0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: DeleteKey(entity_t*, char const*)
void			DeleteKey(entity_t* ent, const char* const key)
{
	epair_t **pep;
	for (pep = &ent->epairs; *pep; pep = &(*pep)->next)
	{
		if (!strcmp ((*pep)->key, key))
		{
			epair_t *ep = *pep;
			*pep = ep->next;
			Free(ep->key);
			Free(ep->value);
			Free(ep);
			return;
		}
	}
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
je 0x8208
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x4530
cmpl $0x0, %eax
jne 0x81f7
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x4ab0
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x4ab0
movq 0x8(%rsp), %rdi
callq 0x4ab0
jmp 0x8208
jmp 0x81f9
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x818c
addq $0x28, %rsp
retq
nopl (%rax)
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: FindTargetEntity(char const*)
entity_t *FindTargetEntity(const char* const target)
{
    int             i;
    const char*     n;

    for (i = 0; i < g_numentities; i++)
    {
        n = ValueForKey(&g_entities[i], "targetname");
        if (!strcmp(n, target))
        {
            return &g_entities[i];
        }
    }

    return NULL;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x2024419(%rip), %eax   # 0x202d4a4
jge 0x90ee
movslq 0x14(%rsp), %rax
leaq 0x2024417(%rip), %rdi   # 0x202d4b0
imulq $0x28, %rax, %rax
addq %rax, %rdi
leaq 0x215fd(%rip), %rsi     # 0x2a6a4
callq 0x7ff0
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x4530
cmpl $0x0, %eax
jne 0x90df
movslq 0x14(%rsp), %rcx
leaq 0x20243df(%rip), %rax   # 0x202d4b0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x90f7
jmp 0x90e1
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x9081
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: GetVectorForKey(entity_t const*, char const*, double*)
void            GetVectorForKey(const entity_t* const ent, const char* const key, vec3_t vec)
{
    const char*     k;
    double          v1, v2, v3;

    k = ValueForKey(ent, key);
    // scanf into doubles, then assign, so it is vec_t size independent
    v1 = v2 = v3 = 0;
    sscanf(k, "%lf %lf %lf", &v1, &v2, &v3);
    vec[0] = v1;
    vec[1] = v2;
    vec[2] = v3;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x7ff0
movq %rax, 0x18(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, (%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x2502c(%rip), %rsi     # 0x2e189
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rsp, %r8
movb $0x0, %al
callq 0x4390
movsd 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, (%rax)
movsd 0x8(%rsp), %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, 0x8(%rax)
movsd (%rsp), %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, 0x10(%rax)
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: dtexdata_init()
void            dtexdata_init()
{
    g_dtexdata = (byte*)AllocBlock(g_max_map_miptex);
    hlassume(g_dtexdata != NULL, assume_NoMemory);
	g_dlightdata = (byte*)AllocBlock(g_max_map_lightdata);
	hlassume(g_dlightdata != NULL, assume_NoMemory);
}

// Assembly:
pushq %rax
movslq 0x2d208(%rip), %rdi     # 0x363c0
callq 0x4a40
movq %rax, 0x836354(%rip)    # 0x83f518
cmpq $0x0, 0x83634c(%rip)    # 0x83f518
setne %al
movzbl %al, %edi
andl $0x1, %edi
movl $0x1, %esi
callq 0xc400
movslq 0x2d1de(%rip), %rdi     # 0x363c4
callq 0x4a40
movq %rax, 0x836316(%rip)    # 0x83f508
cmpq $0x0, 0x83630e(%rip)    # 0x83f508
setne %al
movzbl %al, %edi
andl $0x1, %edi
movl $0x1, %esi
callq 0xc400
popq %rax
retq
nop
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: dtexdata_free()
void CDECL      dtexdata_free()
{
    FreeBlock(g_dtexdata);
    g_dtexdata = NULL;
	FreeBlock(g_dlightdata);
	g_dlightdata = NULL;
}

// Assembly:
pushq %rax
movq 0x836300(%rip), %rdi    # 0x83f518
callq 0x4a70
movq $0x0, 0x8362f0(%rip) # 0x83f518
movq 0x8362d9(%rip), %rdi    # 0x83f508
callq 0x4a70
movq $0x0, 0x8362c9(%rip) # 0x83f508
popq %rax
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/bspfile.cpp
// Function: EntityForModel(int)
entity_t*       EntityForModel(const int modnum)
{
    int             i;
    const char*     s;
    char            name[16];

    sprintf(name, "*%i", modnum);
    // search the entities for one using modnum
    for (i = 0; i < g_numentities; i++)
    {
        s = ValueForKey(&g_entities[i], "model");
        if (!strcmp(s, name))
        {
            return &g_entities[i];
        }
    }

    return &g_entities[0];
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x1c(%rsp)
movq %rsp, %rdi
movl 0x1c(%rsp), %edx
leaq 0x214a0(%rip), %rsi     # 0x2a706
movb $0x0, %al
callq 0x40d0
movl $0x0, 0x18(%rsp)
movl 0x18(%rsp), %eax
cmpl 0x2024225(%rip), %eax   # 0x202d4a4
jge 0x92e0
movslq 0x18(%rsp), %rax
leaq 0x2024223(%rip), %rdi   # 0x202d4b0
imulq $0x28, %rax, %rax
addq %rax, %rdi
leaq 0x24dc5(%rip), %rsi     # 0x2e060
callq 0x7ff0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0x4530
cmpl $0x0, %eax
jne 0x92d1
movslq 0x18(%rsp), %rcx
leaq 0x20241ed(%rip), %rax   # 0x202d4b0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x92ec
jmp 0x92d3
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x9275
leaq 0x20241c9(%rip), %rax   # 0x202d4b0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/cmdlib.cpp
// Function: strupr(char*)
char*           strupr(char* string)
{
    int             i;
    int             len = strlen(string);

    for (i = 0; i < len; i++)
    {
        string[i] = toupper(string[i]);
    }
    return string;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x41c0
movl %eax, 0x8(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x8(%rsp), %eax
jge 0x9498
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x46f0
movb %al, %dl
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
movb %dl, (%rax,%rcx)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x945f
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/cmdlib.cpp
// Function: strlwr(char*)
char*           strlwr(char* string)
{
    int             i;
    int             len = strlen(string);

    for (i = 0; i < len; i++)
    {
        string[i] = tolower(string[i]);
    }
    return string;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x41c0
movl %eax, 0x8(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x8(%rsp), %eax
jge 0x9508
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x4570
movb %al, %dl
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
movb %dl, (%rax,%rcx)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x94cf
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)