LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: Jailer::Jailer(ProcessConfig const&, void*)
Jailer(const ProcessConfig& config, void* isolatedProcessStack = nullptr)
          : config(config), isolatedProcessStack(isolatedProcessStack) {
        /// sanity check
        if (config.boxId == -1) {
            Die("Specify box-id.");
        }

        if (config.processId < 0 or config.processId >= maxProcessesPerCG) {
            Die("Process if out of range [0, %d). Id=%d", maxProcessesPerCG, config.processId);
        }

        uid = firstProcessUid + maxProcessesPerCG * config.boxId + config.processId;
        gid = firstProcessGid + maxProcessesPerCG * config.boxId + config.processId;
        cgid = firstCgroupId + maxProcessesPerCG * config.boxId + config.processId;

        boxDir = Base::StrCat(baseBoxDir, "/", config.boxId);
        this->meta_fd = -1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x452b4
movq %r14, 0x168(%rbx)
leaq 0x170(%rbx), %r14
leaq 0x180(%rbx), %r12
movq %r12, 0x170(%rbx)
movq $0x0, 0x178(%rbx)
movb $0x0, 0x180(%rbx)
movl 0x4(%r15), %eax
cmpl $-0x1, %eax
je 0x38a8f
movl 0x8(%r15), %edx
movl 0x31b14(%rip), %esi     # 0x6a4d4
testl %edx, %edx
js 0x38a9d
cmpl %esi, %edx
jge 0x38a9d
imull %eax, %esi
addl %edx, %esi
movl 0x31aed(%rip), %eax     # 0x6a4c8
addl %esi, %eax
movl %eax, 0x190(%rbx)
movl 0x31ae3(%rip), %eax     # 0x6a4cc
addl %esi, %eax
movl %eax, 0x194(%rbx)
addl 0x31ad9(%rip), %esi     # 0x6a4d0
movl %esi, 0x198(%rbx)
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x330eb(%rip), %rsi     # 0x6baf8
movq 0x330ec(%rip), %rdx     # 0x6bb00
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x47420
movl 0x4(%r15), %ecx
leaq 0x1d829(%rip), %rdx     # 0x56253
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x4557d
leaq 0x20(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x275a0
movq (%r15), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x38a61
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x27480
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x38a77
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x27480
movl $0xffffffff, 0x19c(%rbx) # imm = 0xFFFFFFFF
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1db7f(%rip), %rdi     # 0x56615
xorl %eax, %eax
callq 0x2cd4f
leaq 0x1db81(%rip), %rdi     # 0x56625
xorl %eax, %eax
callq 0x2cd4f
movq %rax, %r15
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x38acb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x27480
jmp 0x38acb
jmp 0x38ac8
movq %rax, %r15
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x38adf
movq (%r12), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x38890
movq %r15, %rdi
callq 0x27830
nop
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: Jailer::Start()
void Start() {
        Base::verbose_level = config.verboseLevel;

        BoxInit();
        typedef ProcessConfig::Modes Modes;
        switch (config.mode) {
            case Modes::kUnspecified:
                Die("Specify a mode for isolate");
                break;
            case Modes::kInit:
                Init();
                break;
            case Modes::kRun:
                Run();
                break;
            case Modes::kCleanup:
                Cleanup();
                break;
            default:
                Die("Unknown mode");
                break;
        }
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0xc(%rdi), %eax
movl %eax, 0x31e8b(%rip)     # 0x6a988
callq 0x459ae
movl (%rbx), %eax
cmpq $0x3, %rax
ja 0x38b3e
leaq 0x1c5a7(%rip), %rcx     # 0x550b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
popq %rbx
jmp 0x45a94
movq %rbx, %rdi
popq %rbx
jmp 0x45b6c
movq %rbx, %rdi
popq %rbx
jmp 0x45e96
leaq 0x1db10(%rip), %rdi     # 0x5664c
jmp 0x38b45
leaq 0x1db22(%rip), %rdi     # 0x56667
xorl %eax, %eax
callq 0x2cd4f
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/cgroups.hpp
// Function: CGroups::memoryKB()
size_t memoryKB() {
        // Memory usage statistics
        size_t mem = 0, memsw = 0;
        if (readStat(cgMemory, "memory.max_usage_in_bytes", true)) {
            mem = atoll(buffer);
        } else {
            Base::Msg("Failed to read memory from cgroup");
        }

        if (readStat(cgMemory, "memory.memsw.max_usage_in_bytes", true)) {
            memsw = atoll(buffer);
            if (memsw > mem) {
                mem = memsw;
            }
        } else {
            Base::Msg("Failed to read swap memory from cgroup");
        }

        return mem >> 10;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
leaq 0x60(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x302ce(%rip), %rsi     # 0x6a9b8
movq 0x302cf(%rip), %rdx     # 0x6a9c0
addq %rsi, %rdx
leaq 0x50(%rsp), %r14
movq %r14, %rdi
callq 0x47420
movb 0x302d1(%rip), %al      # 0x6a9d8
movb %al, 0x20(%r14)
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1b8e4(%rip), %rsi     # 0x55fff
leaq 0x1b8f6(%rip), %rdx     # 0x56018
leaq 0x8(%rsp), %rdi
callq 0x42cf8
leaq 0x50(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x39946
movl %eax, %ebp
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x3a75c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x3a773
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x27480
testl %ebp, %ebp
je 0x3a785
leaq 0x28(%rbx), %rdi
callq 0x27380
movq %rax, %r14
jmp 0x3a796
leaq 0x1b88d(%rip), %rdi     # 0x56019
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x2ceee
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x30211(%rip), %rsi     # 0x6a9b8
movq 0x30212(%rip), %rdx     # 0x6a9c0
addq %rsi, %rdx
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x47420
movb 0x30214(%rip), %al      # 0x6a9d8
movb %al, 0x20(%r15)
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x1b864(%rip), %rsi     # 0x5603b
leaq 0x1b87c(%rip), %rdx     # 0x5605a
callq 0x42cf8
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x39946
movl %eax, %ebp
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x3a813
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3a82a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x27480
testl %ebp, %ebp
je 0x3a843
addq $0x28, %rbx
movq %rbx, %rdi
callq 0x27380
cmpq %r14, %rax
cmovaq %rax, %r14
jmp 0x3a851
leaq 0x1b811(%rip), %rdi     # 0x5605b
xorl %eax, %eax
callq 0x2ceee
shrq $0xa, %r14
movq %r14, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x3a886
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
jmp 0x3a886
movq %rax, %rbx
movq 0x28(%rsp), %rdi
jmp 0x3a8b1
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x3a8ac
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
jmp 0x3a8ac
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x3a8c2
movq (%r12), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x27830
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: ProcessKeeper::startStatusCheck(unsigned long long)
void startStatusCheck(unsigned long long checkIntervalMs) {
        /// setup callback for SIGALRM signal
        struct sigaction sa;
        bzero(&sa, sizeof(sa));
        sa.sa_handler = ProcessKeeper::alarmSignalHandler;
        sigaction(SIGALRM, &sa, NULL);

        /// setup initial time and interval time for signal triggering
        itimerval timer;

        timer.it_interval.tv_sec = checkIntervalMs / 1000;
        timer.it_interval.tv_usec = (checkIntervalMs % 1000) * 1000;
        timer.it_value = timer.it_interval;

        if (setitimer(ITIMER_REAL, &timer, NULL) != 0) {
            Die("ERROR: setitimer failed");
            exit(-1);
        }
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %rbx
leaq 0x20(%rsp), %r14
movl $0x98, %esi
movq %r14, %rdi
callq 0x27810
leaq -0xc91e(%rip), %rax     # 0x2e05e
movq %rax, (%r14)
movl $0xe, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x275b0
movq %rbx, %rax
shrq $0x3, %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
mulq %rcx
shrq $0x4, %rdx
movq %rsp, %rsi
movq %rdx, (%rsi)
imulq $0x3e8, %rdx, %rax      # imm = 0x3E8
subq %rax, %rbx
imulq $0x3e8, %rbx, %rax      # imm = 0x3E8
movq %rax, 0x8(%rsi)
movq (%rsi), %rax
movq %rax, 0x10(%rsi)
movq 0x8(%rsi), %rax
movq %rax, 0x18(%rsi)
xorl %edi, %edi
xorl %edx, %edx
callq 0x27720
testl %eax, %eax
jne 0x3a9e8
addq $0xb8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1b693(%rip), %rdi     # 0x56082
xorl %eax, %eax
callq 0x2cd4f
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/cgroups.hpp
// Function: CGroups::getFullTime()
RunStats::TimeStat getFullTime() {
        RunStats::TimeStat timeStat;
        timeStat.wallTimeMs = 0;
        timeStat.cpuTimeMs = cpuTimeMs();

        /// http://stackoverflow.com/questions/3875801/convert-jiffies-to-seconds/6786757#6786757
        /// returns in jiffies. jiffies/sec = 100. num_juffies / 100 * 1000 to ms
        readStat(cgCpuacct, "cpuacct.stat");
        timeStat.userTimeMs = 10 * atoll(strstr(buffer, "user ") + strlen("user "));
        timeStat.systemTimeMs = 10 * atoll(strstr(buffer, "system ") + strlen("system "));

        return timeStat;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq $0x0, (%rdi)
movq %rsi, %rdi
callq 0x39852
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
mulq %rcx
shrq $0x12, %rdx
movq %rdx, 0x8(%rbx)
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x2ffa4(%rip), %rsi     # 0x6a9e0
movq 0x2ffa5(%rip), %rdx     # 0x6a9e8
addq %rsi, %rdx
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x47420
movb 0x2ffa7(%rip), %al      # 0x6aa00
movb %al, 0x20(%r15)
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1b62d(%rip), %rsi     # 0x5609a
leaq 0x1b632(%rip), %rdx     # 0x560a6
movq %rsp, %rdi
callq 0x42cf8
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x39946
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3aaa4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x3aabb
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x27480
addq $0x28, %r14
leaq 0x1b5e1(%rip), %rsi     # 0x560a7
movq %r14, %rdi
callq 0x270d0
leaq 0x5(%rax), %rdi
callq 0x27380
addq %rax, %rax
leaq (%rax,%rax,4), %rax
movq %rax, 0x10(%rbx)
leaq 0x1b5c4(%rip), %rsi     # 0x560ad
movq %r14, %rdi
callq 0x270d0
leaq 0x7(%rax), %rdi
callq 0x27380
addq %rax, %rax
leaq (%rax,%rax,4), %rax
movq %rax, 0x18(%rbx)
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x3ab32
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x27480
jmp 0x3ab32
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x3ab49
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x27830
nop
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: ProcessInitialiser::setupPipes()
void setupPipes() {
        if (config.swapPipeOpenOrder == false) {
            if (config.redirectStdin.size()) {
                close(0);
                if (open(config.redirectStdin.c_str(), O_RDONLY) != 0) {
                    Die("open(\"%s\"): %m", config.redirectStdin.c_str());
                }
            }

            if (config.redirectStdout.size()) {
                close(1);
                if (open(config.redirectStdout.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0666) != 1) {
                    Die("open(\"%s\"): %m", config.redirectStdout.c_str());
                }
            }
        } else {
            if (config.redirectStdout.size()) {
                close(1);
                if (open(config.redirectStdout.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0666) != 1) {
                    Die("open(\"%s\"): %m", config.redirectStdout.c_str());
                }
            }

            if (config.redirectStdin.size()) {
                close(0);
                if (open(config.redirectStdin.c_str(), O_RDONLY) != 0) {
                    Die("open(\"%s\"): %m", config.redirectStdin.c_str());
                }
            }
        }

        if (config.redirectStderr.size()) {
            close(2);
            if (open(config.redirectStderr.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0666) != 2) {
                Die("open(\"%s\"): %m", config.redirectStderr.c_str());
            }
        } else {
            dup2(1, 2);
        }
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0xe4(%rdi)
je 0x3b371
cmpq $0x0, 0x80(%rbx)
je 0x3b34d
movl $0x1, %edi
callq 0x27930
movq 0x78(%rbx), %rdi
movl $0x241, %esi            # imm = 0x241
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x27350
cmpl $0x1, %eax
jne 0x3b401
cmpq $0x0, 0x60(%rbx)
je 0x3b3be
xorl %edi, %edi
callq 0x27930
movq 0x58(%rbx), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x27350
testl %eax, %eax
je 0x3b3be
jmp 0x3b407
cmpq $0x0, 0x60(%rbx)
je 0x3b390
xorl %edi, %edi
callq 0x27930
movq 0x58(%rbx), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x27350
testl %eax, %eax
jne 0x3b407
cmpq $0x0, 0x80(%rbx)
je 0x3b3be
movl $0x1, %edi
callq 0x27930
movq 0x78(%rbx), %rdi
movl $0x241, %esi            # imm = 0x241
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x27350
cmpl $0x1, %eax
jne 0x3b401
cmpq $0x0, 0xa0(%rbx)
je 0x3b3f1
movl $0x2, %edi
callq 0x27930
movq 0x98(%rbx), %rdi
movl $0x241, %esi            # imm = 0x241
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x27350
cmpl $0x2, %eax
jne 0x3b40d
popq %rbx
retq
movl $0x1, %edi
movl $0x2, %esi
popq %rbx
jmp 0x27430
movq 0x78(%rbx), %rsi
jmp 0x3b414
movq 0x58(%rbx), %rsi
jmp 0x3b414
movq 0x98(%rbx), %rsi
leaq 0x1aef6(%rip), %rdi     # 0x56311
xorl %eax, %eax
callq 0x2cd4f
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: ProcessInitialiser::setupRlimits()
void setupRlimits() {
        /// max file limit
        if (config.fileSizeLimitKB) {
            setRlimit(RLIMIT_FSIZE, (rlim_t)config.fileSizeLimitKB * 1024);
        }

        /// stack limit
        if (config.stackLimitKB) {
            setRlimit(RLIMIT_STACK, (rlim_t)config.stackLimitKB * 1024);
        } else {
            setRlimit(RLIMIT_STACK, RLIM_INFINITY);
        }

        /// max opened files at once
        setRlimit(RLIMIT_NOFILE, (rlim_t)64);

        /// prevents the process from locking memory into RAM - preventing
        /// the os to move the memory to swap space
        setRlimit(RLIMIT_MEMLOCK, (rlim_t)0);

        /// max num of processes/threads that can be created
        if (config.maxProcesses) {
            setRlimit(RLIMIT_NPROC, (rlim_t)config.maxProcesses);
        }
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movslq 0xd8(%rdi), %rdx
testq %rdx, %rdx
je 0x3b497
shlq $0xa, %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x3e18c
movslq 0x54(%rbx), %rax
movq %rax, %rcx
shlq $0xa, %rcx
xorl %edx, %edx
cmpq $0x1, %rax
sbbq %rdx, %rdx
orq %rcx, %rdx
movq %rbx, %rdi
movl $0x3, %esi
callq 0x3e18c
movl $0x40, %edx
movq %rbx, %rdi
movl $0x7, %esi
callq 0x3e18c
movq %rbx, %rdi
movl $0x8, %esi
xorl %edx, %edx
callq 0x3e18c
movslq 0xdc(%rbx), %rdx
testq %rdx, %rdx
je 0x3b4f6
movq %rbx, %rdi
movl $0x6, %esi
popq %rbx
jmp 0x3e18c
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: ProcessInitialiser::setupCredentials()
void setupCredentials() {
        if (setresgid(gid, gid, gid) < 0) {
            Die("setresgid: %m");
        }

        if (setgroups(0, NULL) < 0) {
            Die("setgroups: %m");
        }

        if (setresuid(uid, uid, uid) < 0) {
            Die("setresuid: %m");
        }

        setpgrp();
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x16c(%rdi), %edi
movl %edi, %esi
movl %edi, %edx
callq 0x27170
testl %eax, %eax
js 0x3b535
xorl %edi, %edi
xorl %esi, %esi
callq 0x27780
testl %eax, %eax
js 0x3b53e
movl 0x168(%rbx), %edi
movl %edi, %esi
movl %edi, %edx
callq 0x270b0
testl %eax, %eax
js 0x3b547
popq %rbx
jmp 0x27550
leaq 0x1aeea(%rip), %rdi     # 0x56426
jmp 0x3b54e
leaq 0x1aeef(%rip), %rdi     # 0x56434
jmp 0x3b54e
leaq 0x1aef4(%rip), %rdi     # 0x56442
xorl %eax, %eax
callq 0x2cd4f
nop
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/rules.hpp
// Function: Rules::FilePermissions::addRule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void addRule(std::string path, std::string mode) {
            Permission p;
            p.path = path;
            p.mode = modeFromString(mode);
            allPermissions.push_back(p);
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
xorl %eax, %eax
movq %rax, -0x8(%r15)
movb %al, (%r15)
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq 0x8(%rsp), %rdi
callq 0x27260
leaq 0x48(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3d04a
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %r14
movq %r14, %rsi
callq 0x275a0
movq (%r14), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3ce40
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x27480
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3d162
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3ce64
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3ce7b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x3ce89
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3d18c
movq %rbx, %rdi
callq 0x27830
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/rules.hpp
// Function: Rules::FilePermissions::addRule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void addRule(std::string rule) {
            auto colonLocation = rule.find(":");
            if (colonLocation == std::string::npos) {
                addRule(rule, "");
            } else {
                addRule(rule.substr(0, colonLocation), rule.substr(colonLocation + 1, rule.size()));
            }
        }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18541(%rip), %rsi     # 0x553f8
movl $0x1, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x27820
cmpq $-0x1, %rax
je 0x3cf30
movq %rax, %r15
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x274c0
incq %r15
movq 0x8(%r14), %rcx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x274c0
leaq 0x60(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x3cdc4
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3cf25
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x27480
leaq 0x70(%rsp), %r15
movq -0x10(%r15), %rdi
jmp 0x3cf93
leaq 0x50(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0x47420
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1822b(%rip), %rdx     # 0x55188
movq %rsp, %rdi
movq %rdx, %rsi
callq 0x42cf8
leaq 0x40(%rsp), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x3cdc4
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3cf8e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x3cfa3
movq (%r15), %rsi
incq %rsi
callq 0x27480
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3cfce
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x27480
jmp 0x3cfce
movq %rax, %rbx
movq 0x40(%rsp), %rdi
jmp 0x3d001
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3cff8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x27480
jmp 0x3cff8
movq %rax, %rbx
leaq 0x70(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x3d011
movq (%r15), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x27830
nop
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/rules.hpp
// Function: Rules::FilePermissions::modeFromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string modeFromString(const std::string& mode) {
            int bitmask = 0;

            for (char c : mode) {
                if (c == 'x' or c == 'X') {
                    bitmask |= (1 << 0);
                }
                if (c == 'w' or c == 'W') {
                    bitmask |= (1 << 1);
                }
                if (c == 'r' or c == 'R') {
                    bitmask |= (1 << 2);
                }
            }

            std::string result = "";
            std::string modes = "xwr";
            for (int i = 0; i < 3; i += 1) {
                if (bitmask & (1 << i)) {
                    result += modes[i];
                }
            }

            return result;
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x8(%rdx), %rax
testq %rax, %rax
je 0x3d0a4
movq (%rdx), %rcx
xorl %edx, %edx
xorl %ebp, %ebp
movb (%rcx,%rdx), %sil
andb $-0x21, %sil
xorl %edi, %edi
cmpb $0x58, %sil
sete %dil
orl %ebp, %edi
movl %edi, %r8d
orl $0x2, %r8d
cmpb $0x57, %sil
cmovnel %edi, %r8d
movl %r8d, %ebp
orl $0x4, %ebp
cmpb $0x52, %sil
cmovnel %r8d, %ebp
incq %rdx
cmpq %rdx, %rax
jne 0x3d069
jmp 0x3d0a6
xorl %ebp, %ebp
leaq 0x10(%rbx), %r15
movq %r15, (%rbx)
leaq 0x180d4(%rip), %rdx     # 0x55188
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x42cf8
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x19254(%rip), %rsi     # 0x56324
leaq 0x19250(%rip), %rdx     # 0x56327
movq %rsp, %rdi
callq 0x42cf8
xorl %r14d, %r14d
btl %r14d, %ebp
jae 0x3d0f9
movq (%rsp), %rax
movsbl (%rax,%r14), %esi
movq %rbx, %rdi
callq 0x273c0
incq %r14
cmpq $0x3, %r14
jne 0x3d0e2
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x3d118
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x3d146
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x3d146
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x27480
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x3d159
movq (%r15), %rsi
incq %rsi
callq 0x27480
movq %r14, %rdi
callq 0x27830
nop
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: ProcessInitialiser::setRlimit(int, unsigned long)
void setRlimit(int resource, rlim_t limit) {
        struct rlimit rl;
        bzero(&rl, sizeof(rl));
        rl.rlim_cur = limit;
        rl.rlim_max = limit;

        if (setrlimit(resource, &rl) < 0) {
            Die("setrlimit(%s, %jd)", getRlimitName(resource).c_str(), (intmax_t)limit);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x28(%rsp), %r15
movl $0x10, %esi
movq %r15, %rdi
callq 0x27810
movq %rbx, (%r15)
movq %rbx, 0x8(%r15)
movl %ebp, %edi
movq %r15, %rsi
callq 0x27410
testl %eax, %eax
js 0x3e1d0
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x3e220
movq (%r15), %rsi
xorl %edx, %edx
testq %rbx, %rbx
setne %dl
leaq 0x181cc(%rip), %rdi     # 0x563c0
callq 0x2c78f
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3e217
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x27830
nop
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: ProcessInitialiser::getRlimitName[abi:cxx11](int)
string getRlimitName(int resource) {
        static std::map<int, string> resource_name = {
            {RLIMIT_AS, "RMLIMIT_AS"},        {RLIMIT_FSIZE, "RMLIMIT_FSIZE"},     {RLIMIT_STACK, "RMLIMIT_STACK"},
            {RLIMIT_NOFILE, "RLIMIT_NOFILE"}, {RLIMIT_MEMLOCK, "RMLIMIT_MEMLOCK"}, {RLIMIT_NPROC, "RMLIMIT_NPROC"},
        };

        return resource_name[resource];
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rdi, %r15
movl %edx, 0x4(%rsp)
movb 0x2d967(%rip), %al      # 0x6bba0
testb %al, %al
je 0x3e277
leaq 0x2d92c(%rip), %rdi     # 0x6bb70
leaq 0x4(%rsp), %rsi
callq 0x3e560
leaq 0x10(%r15), %rcx
movq %rcx, (%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x47420
movq %r15, %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2d922(%rip), %rdi     # 0x6bba0
callq 0x27860
testl %eax, %eax
je 0x3e23d
leaq 0x1c(%rsp), %rsi
movl $0x9, (%rsi)
leaq 0x1813a(%rip), %rdx     # 0x563d3
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x3e434
leaq 0x48(%rsp), %r14
leaq 0x18(%rsp), %rsi
movl $0x1, (%rsi)
leaq 0x18121(%rip), %rdx     # 0x563de
movq %r14, %rdi
callq 0x3e46a
leaq 0x70(%rsp), %r14
leaq 0x14(%rsp), %rsi
movl $0x3, (%rsi)
leaq 0x18110(%rip), %rdx     # 0x563ec
movq %r14, %rdi
callq 0x3e46a
leaq 0x98(%rsp), %r14
leaq 0x10(%rsp), %rsi
movl $0x7, (%rsi)
leaq 0x180fc(%rip), %rdx     # 0x563fa
movq %r14, %rdi
callq 0x3e46a
leaq 0xc0(%rsp), %r14
leaq 0xc(%rsp), %rsi
movl $0x8, (%rsi)
leaq 0x180e8(%rip), %rdx     # 0x56408
movq %r14, %rdi
callq 0x3e4a0
leaq 0xe8(%rsp), %r14
leaq 0x8(%rsp), %rsi
movl $0x6, (%rsi)
leaq 0x180d6(%rip), %rdx     # 0x56418
movq %r14, %rdi
callq 0x3e46a
leaq 0x2d81f(%rip), %rdi     # 0x6bb70
leaq 0x20(%rsp), %rsi
leaq 0x3(%rsp), %rcx
leaq 0x2(%rsp), %r8
movl $0x6, %edx
callq 0x3e4d6
movq $-0xf0, %rbx
leaq 0x100(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x3e38d
movq (%r14), %rsi
incq %rsi
callq 0x27480
addq $-0x28, %r14
addq $0x28, %rbx
jne 0x3e379
leaq 0x1bc(%rip), %rdi       # 0x3e55a
leaq 0x2d7cb(%rip), %rsi     # 0x6bb70
leaq 0x2c10c(%rip), %rdx     # 0x6a4b8
callq 0x273e0
leaq 0x2d7e8(%rip), %rdi     # 0x6bba0
callq 0x27300
jmp 0x3e23d
movq %rax, %r15
leaq 0x110(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x279f5
movb $0x1, %al
jmp 0x3e3e8
jmp 0x3e3e3
jmp 0x3e3e3
jmp 0x3e3e3
jmp 0x3e3e3
movq %rax, %r15
xorl %eax, %eax
cmpq %r14, %rbx
sete %cl
orb %al, %cl
jne 0x3e41f
addq $-0x10, %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x3e40a
movq (%r14), %rsi
incq %rsi
callq 0x27480
leaq -0x28(%r14), %rax
addq $-0x18, %r14
cmpq %rbx, %r14
movq %rax, %r14
jne 0x3e3f6
jmp 0x3e41f
movq %rax, %r15
leaq 0x2d77a(%rip), %rdi     # 0x6bba0
callq 0x272f0
movq %r15, %rdi
callq 0x27830
nop
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/rules.hpp
// Function: Rules::Environment::getRule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::pair<std::string, std::string> getRule(const std::string& commandLineRule) {
            // search for "="
            std::size_t equalPosition = commandLineRule.find("=");

            if (equalPosition == std::string::npos) {
                // equal not found, inherit from global environment.
                return {commandLineRule, allRules[commandLineRule]};
            } else {
                return {commandLineRule.substr(0, equalPosition),
                                 commandLineRule.substr(equalPosition + 1)};
            }
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x17c10(%rip), %rsi     # 0x56607
movl $0x1, %ecx
movq %rdx, %rdi
xorl %edx, %edx
callq 0x27820
cmpq $-0x1, %rax
je 0x3ea5e
movq %rax, %r15
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x274c0
incq %r15
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq $-0x1, %rcx
callq 0x274c0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x18(%rsp), %rcx
movq -0x10(%rcx), %rdx
cmpq %rcx, %rdx
je 0x3ea7d
movq %rdx, (%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0x3ea83
addq $0x8, %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x3eaf6
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3f098
jmp 0x3eac0
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rbx)
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rbx)
leaq 0x38(%rsp), %rcx
movq -0x10(%rcx), %rdx
cmpq %rcx, %rdx
je 0x3eab1
movq %rdx, 0x20(%rbx)
movq 0x38(%rsp), %rax
movq %rax, 0x30(%rbx)
jmp 0x3eab7
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq 0x30(%rsp), %rax
movq %rax, 0x28(%rbx)
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3eaed
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x27830
nop
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/rules.hpp
// Function: Rules::Environment::addRule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int addRule(const std::string& commandLineRule) {
            std::pair<std::string, std::string> rule = getRule(commandLineRule);
            if (rule.first == "") {
                return 0;
            }

            allRules[rule.first] = rule.second;
            return 1;
        }

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3e9dc
leaq 0x16542(%rip), %rsi     # 0x55188
movq %r14, %rdi
callq 0x27100
testl %eax, %eax
je 0x3ec77
addq $0x8, %rbx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3eaf6
movl $0x1, %ebx
leaq 0x28(%rsp), %rsi
movq %rax, %rdi
callq 0x27260
jmp 0x3ec79
xorl %ebx, %ebx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3ec94
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x27480
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3ecaf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3eb72
movq %rbx, %rdi
callq 0x27830
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: Jailer::BoxInit()
void BoxInit() {
        if (config.metaFile.size()) {
            meta_fd = open(config.metaFile.c_str(), O_WRONLY | O_TRUNC | O_CREAT, 0777);
        }

        umask(0027);  // new files will be created with 0750

        Base::MakeDir(boxDir.c_str());
        if (chdir(boxDir.c_str()) < 0) {
            Die("chdir(%s): %m", boxDir.c_str());
        }

        cg.init(cgid);
        cg.cgMemoryLimitKB = config.memoryLimitKB;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x18(%rdi)
je 0x459da
movq 0x10(%rbx), %rdi
movl $0x241, %esi            # imm = 0x241
movl $0x1ff, %edx            # imm = 0x1FF
xorl %eax, %eax
callq 0x27350
movl %eax, 0x19c(%rbx)
movl $0x17, %edi
callq 0x27840
movq 0x170(%rbx), %rsi
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x35bd4
movq %r14, %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x2d05f
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x45a25
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x170(%rbx), %rdi
callq 0x27700
testl %eax, %eax
js 0x45a58
movl 0x198(%rbx), %esi
leaq 0x25086(%rip), %rdi     # 0x6aac8
callq 0x45f68
movl 0x50(%rbx), %eax
movl %eax, 0x25098(%rip)     # 0x6aae8
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq 0x170(%rbx), %rsi
leaq 0x10c0e(%rip), %rdi     # 0x56674
xorl %eax, %eax
callq 0x2cd4f
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x45a8b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x27830
nop
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: Jailer::Init()
void Init() {
        Msg("Preparing sandbox directory\n");
        Base::RMTree("box");
        Base::MakeDir("box", 0750);

        cg.prepare();

        Rules::DiskQuota diskQuota(config.diskQuota, uid);
        diskQuota.applyQuota();
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x10bf6(%rip), %rdi     # 0x5669f
xorl %eax, %eax
callq 0x2ceee
leaq 0x10780(%rip), %r14     # 0x56237
leaq -0x1888c(%rip), %rsi    # 0x2d232
movq %r14, %rdi
movl $0x20, %edx
movl $0xb, %ecx
callq 0x275e0
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x10759(%rip), %rdx     # 0x5623a
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x42cf8
movq %r15, %rdi
movl $0x1e8, %esi            # imm = 0x1E8
callq 0x2d05f
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x45b15
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
leaq 0x24fac(%rip), %rdi     # 0x6aac8
callq 0x45fc6
movl 0x190(%rbx), %eax
leaq 0x8(%rsp), %rdi
movl %eax, (%rdi)
movq 0x140(%rbx), %rax
movq %rax, 0x4(%rdi)
callq 0x466e4
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x45b64
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x27830
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: Jailer::Cleanup()
void Cleanup() {
        if (!Base::DirExists("box")) {
            Msg("Box directory not found, there isn't anything to clean up");
        } else {
            Msg("Deleting sandbox directory\n");
            Base::RMTree(boxDir.c_str());
        }

        cg.cleanup();
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1037e(%rip), %rsi     # 0x56237
leaq 0x1037a(%rip), %rdx     # 0x5623a
movq %rsp, %r14
movq %r14, %rdi
callq 0x42cf8
movq (%r14), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x273f0
testl %eax, %eax
sets %al
movl 0x18(%r15), %ecx
andl $0xf000, %ecx           # imm = 0xF000
cmpl $0x4000, %ecx           # imm = 0x4000
setne %bpl
orb %al, %bpl
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x45f0c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x27480
testb %bpl, %bpl
je 0x45f21
leaq 0x10b43(%rip), %rdi     # 0x56a5b
xorl %eax, %eax
callq 0x2ceee
jmp 0x45f4c
leaq 0x10b6d(%rip), %rdi     # 0x56a95
xorl %eax, %eax
callq 0x2ceee
movq 0x170(%rbx), %rdi
leaq -0x18d0b(%rip), %rsi    # 0x2d232
movl $0x20, %edx
movl $0xb, %ecx
callq 0x275e0
leaq 0x24b75(%rip), %rdi     # 0x6aac8
callq 0x47006
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/rules.hpp
// Function: Rules::DiskQuota::findDevice(char const*)
static char* findDevice(const char* path) {
            FILE* f = setmntent("/proc/mounts", "r");
            if (!f)
                Die("Cannot open /proc/mounts: %m");

            struct mntent* me;
            int best_len = 0;
            char* best_dev = NULL;
            while ((me = getmntent(f))) {
                if (!Base::PathBeginsWith(me->mnt_fsname, "/dev"))
                    continue;

                if (Base::PathBeginsWith(path, me->mnt_dir)) {
                    int len = strlen(me->mnt_dir);
                    if (len > best_len) {
                        best_len = len;
                        free(best_dev);
                        best_dev = strdup(me->mnt_fsname);
                    }
                }
            }
            endmntent(f);
            return best_dev;
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
leaq 0x10023(%rip), %rdi     # 0x568bd
leaq 0xe8f3(%rip), %rsi      # 0x55194
callq 0x27450
testq %rax, %rax
je 0x46a19
movq %rax, %r14
leaq 0x50(%rsp), %r12
movq $0x0, 0x38(%rsp)
leaq 0x18(%rsp), %r15
leaq 0x40(%rsp), %rbx
movq $0x0, 0x10(%rsp)
movq %r14, %rdi
callq 0x27570
testq %rax, %rax
je 0x469fd
movq %rax, %r13
movq (%rax), %rsi
movq %r15, %rdi
leaq 0xe(%rsp), %rdx
callq 0x35bd4
movq %r12, 0x40(%rsp)
movq %rbx, %rdi
leaq 0xffe1(%rip), %rsi      # 0x568e7
leaq 0xffde(%rip), %rdx      # 0x568eb
callq 0x42cf8
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2cfe5
movl %eax, %ebp
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x46936
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x46952
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x27480
testl %ebp, %ebp
je 0x468d3
movq %r15, %rdi
movq 0x60(%rsp), %rsi
leaq 0xe(%rsp), %rdx
callq 0x35bd4
movq 0x8(%r13), %rsi
movq %rbx, %rdi
leaq 0xf(%rsp), %rdx
callq 0x35bd4
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2cfe5
movl %eax, %ebp
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x469a1
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x469bd
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x27480
testl %ebp, %ebp
je 0x468d3
movq 0x8(%r13), %rdi
callq 0x271e0
movq %rax, %rbp
cmpl %ebp, 0x38(%rsp)
jge 0x468d3
movq 0x10(%rsp), %rdi
callq 0x27560
movq (%r13), %rdi
callq 0x27870
movq %rax, 0x10(%rsp)
movq %rbp, 0x38(%rsp)
jmp 0x468d3
movq %r14, %rdi
callq 0x27060
movq 0x10(%rsp), %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xfeaa(%rip), %rdi      # 0x568ca
xorl %eax, %eax
callq 0x2cd4f
jmp 0x46a37
jmp 0x46a32
jmp 0x46a2d
movq %rax, %rbx
jmp 0x46a6d
movq %rax, %rbx
jmp 0x46a51
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x46a51
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x46a6d
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x27830
nop
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: ProcessInitialiser::ProcessInitialiser(ProcessConfig, int, int, int*)
ProcessInitialiser(ProcessConfig config, int uid, int gid, int errorPipes[2]) {
        this->config = config;
        this->uid = uid;
        this->gid = gid;
        this->errorPipes[0] = errorPipes[0];
        this->errorPipes[1] = errorPipes[1];
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %r14
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
callq 0x362e0
movups (%r12), %xmm0
movups %xmm0, (%rbx)
leaq 0x10(%rbx), %rdi
leaq 0x10(%r12), %rsi
callq 0x27260
movq 0x50(%r12), %rax
movq %rax, 0x50(%rbx)
movups 0x30(%r12), %xmm0
movups 0x40(%r12), %xmm1
movups %xmm1, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
leaq 0x58(%rbx), %rdi
leaq 0x58(%r12), %rsi
callq 0x27260
leaq 0x78(%rbx), %rdi
leaq 0x78(%r12), %rsi
callq 0x27260
movl $0x98, %esi
leaq (%rbx,%rsi), %rdi
addq %r12, %rsi
callq 0x27260
movl $0xb8, %esi
leaq (%rbx,%rsi), %rdi
addq %r12, %rsi
callq 0x27260
movq 0xd8(%r12), %rax
movq 0xdd(%r12), %rcx
movq %rcx, 0xdd(%rbx)
movq %rax, 0xd8(%rbx)
movl $0xe8, %esi
leaq (%rbx,%rsi), %rdi
addq %r12, %rsi
callq 0x27260
movq 0x108(%r12), %rax
movq %rax, 0x108(%rbx)
movl $0x110, %esi            # imm = 0x110
leaq (%rbx,%rsi), %rdi
addq %r12, %rsi
callq 0x39034
movl $0x128, %esi            # imm = 0x128
leaq (%rbx,%rsi), %rdi
addq %r12, %rsi
callq 0x393ae
movq 0x140(%r12), %rax
movq %rax, 0x140(%rbx)
movl $0x148, %esi            # imm = 0x148
leaq (%rbx,%rsi), %rdi
addq %r12, %rsi
callq 0x39034
movl 0x160(%r12), %eax
movl %eax, 0x160(%rbx)
movl %r15d, 0x168(%rbx)
movl %ebp, 0x16c(%rbx)
movl (%r14), %eax
movl %eax, 0x170(%rbx)
movl 0x4(%r14), %eax
movl %eax, 0x174(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x38890
movq %r14, %rdi
callq 0x27830
// File: /workspace/github_cpp_makefile_star2_O3/establishment[P]sandman/src/lib.hpp
// Function: ProcessKeeper::mockSignals()
void mockSignals() {
        struct sigaction sa;
        bzero(&sa, sizeof(sa));
        sa.sa_handler = ProcessKeeper::dummySignalHandler;
        sigaction(SIGHUP, &sa, NULL);
        sigaction(SIGINT, &sa, NULL);
        sigaction(SIGQUIT, &sa, NULL);
        sigaction(SIGILL, &sa, NULL);
        sigaction(SIGABRT, &sa, NULL);
        sigaction(SIGFPE, &sa, NULL);
        sigaction(SIGSEGV, &sa, NULL);
        sigaction(SIGPIPE, &sa, NULL);
        sigaction(SIGTERM, &sa, NULL);
        sigaction(SIGUSR1, &sa, NULL);
        sigaction(SIGUSR2, &sa, NULL);

        /// mock alert sig as well since it can be overwriteSize
        sigaction(SIGALRM, &sa, NULL);
    }

// Assembly:
pushq %rbx
subq $0xa0, %rsp
leaq 0x8(%rsp), %rbx
movl $0x98, %esi
movq %rbx, %rdi
callq 0x27810
leaq -0x18e4f(%rip), %rax    # 0x2e0f6
movq %rax, (%rbx)
movl $0x1, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x275b0
movl $0x2, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x275b0
movl $0x3, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x275b0
movl $0x4, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x275b0
movl $0x6, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x275b0
movl $0x8, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x275b0
movl $0xb, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x275b0
movl $0xd, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x275b0
movl $0xf, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x275b0
movl $0xa, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x275b0
movl $0xc, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x275b0
movl $0xe, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x275b0
addq $0xa0, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/UltiRTS[P]gameLauncher/launcher.cpp
// Function: exec[abi:cxx11](char const*)
string exec(const char* cmd) {
	array<char, 128> buffer;
	string result;
	unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
	if (!pipe) {
		throw std::runtime_error("popen() failed!");
	}
	while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
		result += buffer.data();
	}
	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x2ac7(%rip), %rsi      # 0x5217
movq %rax, %rdi
callq 0x20b0
testq %rax, %rax
je 0x27a4
movq %rax, %r14
leaq -0xa0(%rbp), %r15
movq %r15, %rdi
movl $0x80, %esi
movq %r14, %rdx
callq 0x2310
testq %rax, %rax
je 0x2789
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2390
jmp 0x2767
movq %r14, %rdi
callq 0x22d0
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x2120
movq %rax, %r14
leaq 0x2860(%rip), %rsi      # 0x5018
movq %rax, %rdi
callq 0x20e0
movq 0x4829(%rip), %rsi      # 0x6ff0
movq 0x47fa(%rip), %rdx      # 0x6fc8
movq %r14, %rdi
callq 0x2350
movq %rax, %r15
jmp 0x27f3
movq %rax, %r15
movq %r14, %rdi
callq 0x2180
jmp 0x27f3
movq %rax, %r15
movq %r14, %rdi
callq 0x22d0
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x2807
movq (%r12), %rsi
incq %rsi
callq 0x2240
movq %r15, %rdi
callq 0x2360
// File: /workspace/github_cpp_makefile_star2_O3/porzell[P]PTest/examples/unit_test.cpp
// Function: CanReserveVector22()
P_TEST(CanReserveVector) {
    std::vector<int> vec;
    vec.reserve(10);
    
    P_ASSERT(vec.capacity() >= 10);
    P_ASSERT(vec.size() == 0);
    
    for(int i = 0; i < 11; ++i) {
        vec.push_back(3);
    }
    
    P_ASSERT(vec.capacity() > 10);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x180, %rsp            # imm = 0x180
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0xa, %esi
callq 0x42b8
movq -0x30(%rbp), %r15
subq -0x40(%rbp), %r15
xorl %r14d, %r14d
cmpq $0x25, %r15
setae %r14b
callq 0x2b84
movq %rax, %rbx
leaq 0x2918(%rip), %rdx      # 0x50f3
leaq 0x2a11(%rip), %r8       # 0x51f3
leaq -0x198(%rbp), %rdi
movl %r14d, %esi
movl $0x1a, %ecx
xorl %r9d, %r9d
callq 0x3c2c
leaq -0x198(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3af2
leaq -0x198(%rbp), %rdi
callq 0x389c
cmpq $0x24, %r15
jbe 0x2921
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %r12
xorl %r14d, %r14d
cmpq %r15, %r12
sete %r14b
callq 0x2b84
movq %rax, %rbx
leaq 0x28b2(%rip), %rdx      # 0x50f3
leaq 0x29c0(%rip), %r8       # 0x5208
leaq -0x128(%rbp), %rdi
movl %r14d, %esi
movl $0x1b, %ecx
xorl %r9d, %r9d
callq 0x3c2c
leaq -0x128(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3af2
leaq -0x128(%rbp), %rdi
callq 0x389c
cmpq %r15, %r12
jne 0x2921
movl $0xb, %r15d
leaq -0x40(%rbp), %rbx
leaq -0x44(%rbp), %r14
movl $0x3, -0x44(%rbp)
movq -0x38(%rbp), %rsi
cmpq -0x30(%rbp), %rsi
je 0x28b4
movl $0x3, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x38(%rbp)
jmp 0x28bf
movq %rbx, %rdi
movq %r14, %rdx
callq 0x3cf4
decl %r15d
jne 0x2893
movq -0x30(%rbp), %rax
subq -0x40(%rbp), %rax
xorl %r14d, %r14d
cmpq $0x29, %rax
setae %r14b
callq 0x2b84
movq %rax, %rbx
leaq 0x280d(%rip), %rdx      # 0x50f3
leaq 0x292b(%rip), %r8       # 0x5218
leaq -0xb8(%rbp), %rdi
movl %r14d, %esi
movl $0x21, %ecx
xorl %r9d, %r9d
callq 0x3c2c
leaq -0xb8(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3af2
leaq -0xb8(%rbp), %rdi
callq 0x389c
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x292f
callq 0x2140
addq $0x180, %rsp            # imm = 0x180
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
jmp 0x2965
jmp 0x2970
movq %rax, %rbx
leaq -0x128(%rbp), %rdi
jmp 0x2965
jmp 0x2970
movq %rax, %rbx
leaq -0x198(%rbp), %rdi
callq 0x389c
jmp 0x2973
jmp 0x2970
jmp 0x2970
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x2981
callq 0x2140
movq %rbx, %rdi
callq 0x2200
// File: /workspace/github_cpp_makefile_star2_O3/porzell[P]PTest/examples/unit_test.cpp
// Function: CanInsertVector36()
P_TEST(CanInsertVector) {
    std::vector<int> vec;
    
    for(int i = 0; i < 10; ++i) {
        vec.push_back(i);
    }
    
    for(int i = 0; i < 10; ++i) {
        P_ASSERT(vec[i] == i);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rbx
movaps %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
leaq -0x2c(%rbp), %r14
movl $0x0, (%r14)
xorl %eax, %eax
movq -0x48(%rbp), %rsi
cmpq -0x40(%rbp), %rsi
je 0x29d2
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x48(%rbp)
jmp 0x29dd
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4354
movl -0x2c(%rbp), %ecx
leal 0x1(%rcx), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x9, %ecx
jl 0x29bc
xorl %ebx, %ebx
leaq -0xc0(%rbp), %r15
movq -0x50(%rbp), %rax
movl (%rax,%rbx,4), %r14d
xorl %r13d, %r13d
cmpq %r14, %rbx
sete %r13b
callq 0x2b84
movq %rax, %r12
movq %r15, %rdi
movl %r13d, %esi
leaq 0x26d8(%rip), %rdx      # 0x50f3
movl $0x2c, %ecx
leaq 0x2815(%rip), %r8       # 0x523c
xorl %r9d, %r9d
callq 0x3c2c
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3af2
movq %r15, %rdi
callq 0x389c
cmpq %r14, %rbx
jne 0x2a56
leaq 0x1(%rbx), %rax
cmpq $0x9, %rbx
movq %rax, %rbx
jne 0x29f4
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x2a64
callq 0x2140
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2a78
movq %rax, %rbx
jmp 0x2a8c
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
callq 0x389c
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x2a9a
callq 0x2140
movq %rbx, %rdi
callq 0x2200