LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %r15
movl %edx, 0xc(%rsp)
movb 0x2e8c3(%rip), %al      # 0x75ba0
testb %al, %al
je 0x4730f
leaq 0x2e888(%rip), %rdi     # 0x75b70
leaq 0xc(%rsp), %rsi
callq 0x47556
movq %r15, %rdi
movq %rax, %rsi
callq 0x37650
movq %r15, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2e88a(%rip), %rdi     # 0x75ba0
callq 0x37840
testl %eax, %eax
je 0x472e1
leaq 0x24(%rsp), %rsi
movl $0x9, (%rsi)
leaq 0x1506f(%rip), %rdx     # 0x5c3a0
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x474b4
leaq 0x50(%rsp), %r14
leaq 0x20(%rsp), %rsi
movl $0x1, (%rsi)
leaq 0x15056(%rip), %rdx     # 0x5c3ab
movq %r14, %rdi
callq 0x474d0
leaq 0x78(%rsp), %r14
leaq 0x1c(%rsp), %rsi
movl $0x3, (%rsi)
leaq 0x15045(%rip), %rdx     # 0x5c3b9
movq %r14, %rdi
callq 0x474d0
leaq 0xa0(%rsp), %r14
leaq 0x18(%rsp), %rsi
movl $0x7, (%rsi)
leaq 0x15031(%rip), %rdx     # 0x5c3c7
movq %r14, %rdi
callq 0x474d0
leaq 0xc8(%rsp), %r14
leaq 0x14(%rsp), %rsi
movl $0x8, (%rsi)
leaq 0x1501d(%rip), %rdx     # 0x5c3d5
movq %r14, %rdi
callq 0x474ec
leaq 0xf0(%rsp), %r14
leaq 0x10(%rsp), %rsi
movl $0x6, (%rsi)
leaq 0x1500b(%rip), %rdx     # 0x5c3e5
movq %r14, %rdi
callq 0x474d0
leaq 0x2e787(%rip), %rdi     # 0x75b70
leaq 0x28(%rsp), %rsi
pushq $0x6
popq %rdx
leaq 0xb(%rsp), %rcx
leaq 0xa(%rsp), %r8
callq 0x47508
movl $0xd0, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x28, %rdi
callq 0x37958
addq $-0x28, %rbx
cmpq $-0x20, %rbx
jne 0x47405
leaq 0x12d(%rip), %rdi       # 0x47550
leaq 0x2e746(%rip), %rsi     # 0x75b70
leaq 0x2d087(%rip), %rdx     # 0x744b8
callq 0x373c0
leaq 0x2e763(%rip), %rdi     # 0x75ba0
callq 0x372f0
jmp 0x472e1
movq %rax, %r15
movl $0xd0, %r12d
leaq (%rsp,%r12), %rdi
addq $0x28, %rdi
callq 0x37958
addq $-0x28, %r12
cmpq $-0x20, %r12
jne 0x47450
movb $0x1, %al
jmp 0x47478
jmp 0x47473
jmp 0x47473
jmp 0x47473
jmp 0x47473
movq %rax, %r15
xorl %eax, %eax
cmpq %r14, %rbx
sete %cl
orb %al, %cl
jne 0x4749f
leaq -0x28(%r14), %r12
addq $-0x20, %r14
movq %r14, %rdi
callq 0x37958
movq %r12, %r14
cmpq %rbx, %r12
jne 0x47482
jmp 0x4749f
movq %rax, %r15
leaq 0x2e6fa(%rip), %rdi     # 0x75ba0
callq 0x372e0
movq %r15, %rdi
callq 0x377f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x14b87(%rip), %rsi     # 0x5c5d4
movq %rdx, %rdi
xorl %edx, %edx
callq 0x37930
cmpq $-0x1, %rax
je 0x47ab2
movq %rax, %r15
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x374b0
incq %r15
leaq 0x28(%rsp), %rdi
pushq $-0x1
popq %rcx
movq %r14, %rsi
movq %r15, %rdx
callq 0x374b0
leaq 0x8(%rsp), %r14
leaq 0x28(%rsp), %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x48078
movq %r15, %rdi
callq 0x37958
movq %r14, %rdi
callq 0x37958
jmp 0x47acf
addq $0x8, %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x47af4
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x48042
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x37958
movq %rbx, %rdi
callq 0x377f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rdx
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x47a32
leaq 0x1355f(%rip), %rsi     # 0x5b148
movq %r14, %rdi
callq 0x40cd9
xorl %ebp, %ebp
testb %al, %al
jne 0x47c16
addq $0x8, %rbx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x47af4
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x37250
pushq $0x1
popq %rbp
movq %rsp, %rdi
callq 0x47b5a
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x47b5a
movq %rbx, %rdi
callq 0x377f0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4d738
movq 0x10(%rbx), %rdi
movl $0x241, %esi            # imm = 0x241
movl $0x1ff, %edx            # imm = 0x1FF
xorl %eax, %eax
callq 0x37340
movl %eax, 0x19c(%rbx)
pushq $0x17
popq %rdi
callq 0x37810
movq 0x170(%rbx), %rsi
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x40b24
movq %r14, %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x3b57a
leaq 0x8(%rsp), %rdi
callq 0x37958
movq 0x170(%rbx), %rdi
callq 0x376e0
testl %eax, %eax
js 0x4d7a3
movl 0x198(%rbx), %esi
leaq 0x2733b(%rip), %rdi     # 0x74ac8
callq 0x4dba2
movl 0x50(%rbx), %eax
movl %eax, 0x2734d(%rip)     # 0x74ae8
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq 0x170(%rbx), %rsi
leaq 0xee90(%rip), %rdi      # 0x5c641
xorl %eax, %eax
callq 0x3b2a4
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x37958
movq %rbx, %rdi
callq 0x377f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0xee8b(%rip), %rdi      # 0x5c66c
xorl %eax, %eax
callq 0x3b443
leaq 0xea15(%rip), %r14      # 0x5c204
movq %r14, %rdi
callq 0x3b6f6
leaq 0x10(%rsp), %r15
leaq 0xf(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x40b24
movq %r15, %rdi
movl $0x1e8, %esi            # imm = 0x1E8
callq 0x3b57a
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x37958
leaq 0x2729b(%rip), %rdi     # 0x74ac8
callq 0x4dbee
movl 0x190(%rbx), %eax
movl %eax, (%r14)
movq 0x140(%rbx), %rax
movq %rax, 0x4(%r14)
leaq 0x10(%rsp), %rdi
callq 0x4e000
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x37958
movq %rbx, %rdi
callq 0x377f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0xe6ca(%rip), %rsi      # 0x5c204
leaq 0x10(%rsp), %r14
leaq 0xf(%rsp), %rdx
movq %r14, %rdi
callq 0x40b24
movq %r14, %rdi
callq 0x3b4ff
movl %eax, %ebp
movq %r14, %rdi
callq 0x37958
testl %ebp, %ebp
je 0x4db7e
leaq 0xeef9(%rip), %rdi      # 0x5ca62
xorl %eax, %eax
callq 0x3b443
movq 0x170(%rbx), %rdi
callq 0x3b6f6
jmp 0x4db8c
leaq 0xeea3(%rip), %rdi      # 0x5ca28
xorl %eax, %eax
callq 0x3b443
leaq 0x26f35(%rip), %rdi     # 0x74ac8
callq 0x4e70a
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x20(%rsp)
leaq 0xe6dc(%rip), %rdi      # 0x5c88a
leaq 0xcf9f(%rip), %rsi      # 0x5b154
callq 0x37440
testq %rax, %rax
je 0x4e2e0
movq %rax, %r14
movq $0x0, 0x18(%rsp)
leaq 0x48(%rsp), %r15
leaq 0x28(%rsp), %rbp
leaq 0xf(%rsp), %rbx
movq $0x0, 0x10(%rsp)
movq %r14, %rdi
callq 0x37560
testq %rax, %rax
je 0x4e2c4
movq %rax, %r13
movq (%rax), %rsi
movq %r15, %rdi
leaq 0xe(%rsp), %rdx
callq 0x40b24
movq %rbp, %rdi
leaq 0xe69f(%rip), %rsi      # 0x5c8b4
movq %rbx, %rdx
callq 0x40b24
movq %r15, %rdi
movq %rbp, %rsi
callq 0x3b53a
movl %eax, %r12d
movq %rbp, %rdi
callq 0x37958
movq %r15, %rdi
callq 0x37958
testl %r12d, %r12d
je 0x4e1e7
movq %r15, %rdi
movq 0x20(%rsp), %rsi
leaq 0xe(%rsp), %rdx
callq 0x40b24
movq 0x8(%r13), %rsi
movq %rbp, %rdi
movq %rbx, %rdx
callq 0x40b24
movq %r15, %rdi
movq %rbp, %rsi
callq 0x3b53a
movl %eax, %r12d
movq %rbp, %rdi
callq 0x37958
movq %r15, %rdi
callq 0x37958
testl %r12d, %r12d
je 0x4e1e7
movq 0x8(%r13), %rdi
callq 0x371b0
movq %rax, %r12
cmpl %r12d, 0x18(%rsp)
jge 0x4e1e7
movq 0x10(%rsp), %rdi
callq 0x37550
movq (%r13), %rdi
callq 0x37850
movq %rax, 0x10(%rsp)
movl %r12d, %eax
movq %rax, 0x18(%rsp)
jmp 0x4e1e7
movq %r14, %rdi
callq 0x37060
movq 0x10(%rsp), %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe5b0(%rip), %rdi      # 0x5c897
xorl %eax, %eax
callq 0x3b2a4
jmp 0x4e2fe
jmp 0x4e2f9
jmp 0x4e2f4
movq %rax, %rbx
jmp 0x4e315
movq %rax, %rbx
jmp 0x4e30b
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x37958
leaq 0x48(%rsp), %rdi
callq 0x37958
movq %rbx, %rdi
callq 0x377f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x41164
movq %rbx, %rdi
movq %r12, %rsi
callq 0x41668
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 0x42d14
movq %r14, %rdi
callq 0x377f0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x377d0
leaq -0x1238d(%rip), %rax    # 0x3c2b4
movq %rax, (%rbx)
pushq $0x1
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x375a0
pushq $0x2
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x375a0
pushq $0x3
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x375a0
pushq $0x4
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x375a0
pushq $0x6
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x375a0
pushq $0x8
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x375a0
pushq $0xb
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x375a0
pushq $0xd
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x375a0
pushq $0xf
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x375a0
pushq $0xa
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x375a0
pushq $0xc
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x375a0
pushq $0xe
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x375a0
addq $0xa0, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/UltiRTS[P]gameLauncher/launcher.cpp
// Function: getPath[abi:cxx11](int, char**)
string getPath(int argc, char *passedargv[]) {
	// Get the last position of '/'
	string aux(passedargv[0]);
	// get '/' or '\\' depending on unix/mac or windows.
#if defined(_WIN32) || defined(WIN32)
	int pos = aux.rfind('\\');
#else
	int pos = aux.rfind('/');
#endif
	// Get the path and the name
	string path = aux.substr(0,pos+1);
	string name = aux.substr(pos+1);
	// show results
	return (path);
	//cout << "Name: " << name << std::endl;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq (%rdx), %rsi
leaq -0x38(%rbp), %r15
leaq -0x58(%rbp), %rdx
movq %r15, %rdi
callq 0x33cc
pushq $0x2f
popq %rsi
pushq $-0x1
popq %rdx
movq %r15, %rdi
callq 0x23b0
incl %eax
movslq %eax, %r14
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x2260
leaq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rsi
pushq $-0x1
popq %rcx
movq %r14, %rdx
callq 0x2260
leaq -0x58(%rbp), %rdi
callq 0x2100
leaq -0x38(%rbp), %rdi
callq 0x2100
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2100
jmp 0x2665
movq %rax, %r14
leaq -0x38(%rbp), %rdi
callq 0x2100
movq %r14, %rdi
callq 0x2360
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x98, %rsp
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rcx
movq %rcx, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x1b27(%rip), %rsi      # 0x4217
movq %rax, %rdi
callq 0x20b0
movq 0x38d1(%rip), %rcx      # 0x5fd0
movq %rcx, -0x28(%rbp)
movq %rax, -0x20(%rbp)
testq %rax, %rax
je 0x2750
leaq -0xa8(%rbp), %r14
movq -0x20(%rbp), %rdx
movq %r14, %rdi
movl $0x80, %esi
callq 0x2310
testq %rax, %rax
je 0x2736
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2390
jmp 0x2713
leaq -0x28(%rbp), %rdi
callq 0x3408
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x2130
movq %rax, %r15
leaq 0x18b6(%rip), %rsi      # 0x4018
movq %rax, %rdi
callq 0x20d0
movq 0x387f(%rip), %rsi      # 0x5ff0
movq 0x3848(%rip), %rdx      # 0x5fc0
movq %r15, %rdi
callq 0x2350
jmp 0x278f
movq %rax, %r14
movq %r15, %rdi
callq 0x2180
jmp 0x2792
movq %rax, %r14
leaq -0x28(%rbp), %rdi
callq 0x3408
movq %rbx, %rdi
callq 0x2100
movq %r14, %rdi
callq 0x2360
// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/tsl_hopscotch_map/./hopscotch_hash.h
// Function: std::_List_const_iterator<std::pair<unsigned int, unsigned int>> tsl::detail_hopscotch_hash::hopscotch_hash<std::pair<unsigned int, unsigned int>, tsl::hopscotch_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>, 62u, false, tsl::hh::power_of_two_growth_policy<2ul>>::KeySelect, tsl::hopscotch_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>, 62u, false, tsl::hh::power_of_two_growth_policy<2ul>>::ValueSelect, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>, 62u, false, tsl::hh::power_of_two_growth_policy<2ul>, std::__cxx11::list<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>>::find_in_overflow<unsigned int, std::__cxx11::list<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>, (void*)0>(unsigned int const&) const
const_iterator_overflow find_in_overflow(const K& key) const {
        return std::find_if(m_overflow_elements.cbegin(), m_overflow_elements.cend(), 
                            [&](const value_type& value) { 
                                return compare_keys(key, KeySelect()(value)); 
                            });
    }

// Assembly:
movq %rsi, %rdx
movq %rdi, %rcx
leaq 0x20(%rdi), %rsi
movq 0x20(%rdi), %rdi
jmp 0x1d13
// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/tsl_hopscotch_map/./hopscotch_hash.h
// Function: std::_List_iterator<std::pair<unsigned int, unsigned int>> tsl::detail_hopscotch_hash::hopscotch_hash<std::pair<unsigned int, unsigned int>, tsl::hopscotch_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>, 62u, false, tsl::hh::power_of_two_growth_policy<2ul>>::KeySelect, tsl::hopscotch_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>, 62u, false, tsl::hh::power_of_two_growth_policy<2ul>>::ValueSelect, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>, 62u, false, tsl::hh::power_of_two_growth_policy<2ul>, std::__cxx11::list<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>>::insert_in_overflow<std::piecewise_construct_t const&, std::tuple<unsigned int&&>, std::tuple<>, std::__cxx11::list<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>, (void*)0>(unsigned long, std::piecewise_construct_t const&, std::tuple<unsigned int&&>&&, std::tuple<>&&)
iterator_overflow insert_in_overflow(std::size_t ibucket_for_hash, Args&&... value_type_args) {
        auto it = m_overflow_elements.emplace(m_overflow_elements.end(), std::forward<Args>(value_type_args)...);
        
        m_buckets[ibucket_for_hash].set_overflow(true);
        m_nb_elements++;
            
        return it;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x20, %rdi
movq %rdi, %rsi
callq 0x255e
movq 0x38(%r14), %rcx
shlq $0x4, %rbx
orq $0x2, (%rcx,%rbx)
incq 0x40(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/adhipradhana[P]sliding-window-protocol/src/packet.cpp
// Function: create_packet(char*, unsigned int, unsigned long, char*, bool)
size_t create_packet(char* packet, unsigned int seq_num, size_t data_length, char* data, bool eot) {
	// convert data into network type (big endian/little endian)
	unsigned int network_seq_num = htonl(seq_num);
	unsigned int network_data_length = htonl(data_length);

	// copy data into frame
	if (eot) {
		packet[0] = 0x0;
	} else {
		packet[0] = 0x1;
	}

	memcpy(packet+1, &network_seq_num, 4);
	memcpy(packet+5, &network_data_length, 4);
	memcpy(packet+9, data, data_length);

	packet[9 + data_length] = count_checksum(data_length, data);

	return data_length + (size_t)10;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r15
bswapl %esi
movl %ebx, %eax
bswapl %eax
xorb $0x1, %r8b
movb %r8b, (%rdi)
movl %esi, 0x1(%rdi)
movl %eax, 0x5(%rdi)
addq $0x9, %rdi
movq %rcx, %rsi
callq 0x10a0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1330
movb %al, 0x9(%r15,%rbx)
addq $0xa, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/adhipradhana[P]sliding-window-protocol/src/packet.cpp
// Function: count_checksum(unsigned long, char*)
char count_checksum(size_t data_length, char* data) {
	unsigned long sum = 0;
	for (size_t i = 0; i < data_length; i++) {
		sum += *data++;
		if (sum & 0xFF00) {
			sum &= 0xFF;
			sum++;
		}
	}
	return (char)(~(sum & 0xFF));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rcx, %rdi
je 0x1358
movsbq (%rsi,%rcx), %rdx
addq %rdx, %rax
movzbl %al, %edx
incq %rdx
testw $0xff00, %ax            # imm = 0xFF00
cmovneq %rdx, %rax
incq %rcx
jmp 0x1338
notb %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/adhipradhana[P]sliding-window-protocol/src/packet.cpp
// Function: read_packet(char*, unsigned int*, unsigned long*, char*, bool*, bool*)
void read_packet(char* packet, unsigned int* seq_num, size_t* data_length, char* data, bool* is_check_sum_valid, bool* eot) {
	// convert data
	unsigned int network_seq_num;
	unsigned int network_data_length;

	// byte copy
	memcpy(&network_seq_num, packet+1, 4);
	memcpy(&network_data_length, packet+5, 4);

	*seq_num = ntohl(network_seq_num);
	*data_length = ntohl(network_data_length);

	memcpy(data, packet+9, *data_length);

	char sender_check_sum = packet[9 + *data_length];
	char checksum = count_checksum(*data_length, data);

	*is_check_sum_valid = sender_check_sum == checksum;

	*eot = packet[0] == 0x0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %r13
movl 0x1(%rdi), %eax
movl 0x5(%rdi), %edx
bswapl %eax
movl %eax, (%rsi)
bswapl %edx
movq %rdx, (%r12)
leaq 0x9(%rdi), %rsi
movq %rcx, %rdi
callq 0x10a0
movq (%r12), %rdi
movb 0x9(%r13,%rdi), %r12b
movq %r15, %rsi
callq 0x1330
cmpb %al, %r12b
sete (%r14)
cmpb $0x0, (%r13)
sete (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/adhipradhana[P]sliding-window-protocol/src/ack.cpp
// Function: create_ack(char*, unsigned int, bool)
void create_ack(char *ack, unsigned int seq_num, bool is_check_sum_valid){
	
	if(is_check_sum_valid)
		ack[0] = 0x0;
	else
		ack[0] = 0x1;

	uint32_t net_seq_num = htonl(seq_num);
	memcpy(ack + 1, &net_seq_num, 4);
	ack[5] = count_checksum((size_t)4, (char *) &seq_num);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0xc(%rbp), %rax
movl %esi, (%rax)
xorb $0x1, %dl
movb %dl, (%rdi)
bswapl %esi
movl %esi, 0x1(%rdi)
pushq $0x4
popq %rdi
movq %rax, %rsi
callq 0x1330
movb %al, 0x5(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/adhipradhana[P]sliding-window-protocol/src/ack.cpp
// Function: read_ack(char*, bool*, unsigned int*, bool*)
void read_ack(char *ack, bool* is_nak, unsigned int *seq_num, bool *is_check_sum_valid){
	
	if(ack[0] == 0x0)
		*is_nak = false;
	else
		*is_nak = true;

	uint32_t net_seq_num;
	memcpy(&net_seq_num, ack + 1, 4);
	*seq_num = ntohl(net_seq_num);

	*is_check_sum_valid = ack[5] == count_checksum((size_t)4, (char *) seq_num);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rcx, %rbx
cmpb $0x0, (%rdi)
setne (%rsi)
movl 0x1(%rdi), %eax
bswapl %eax
movl %eax, (%rdx)
movb 0x5(%rdi), %r14b
pushq $0x4
popq %rdi
movq %rdx, %rsi
callq 0x1330
cmpb %al, %r14b
sete (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/porzell[P]PTest/examples/unit_test.cpp
// Function: CanAddToVector5()
P_TEST(CanAddToVector) {
    std::vector<int> vec;
    vec.push_back(3);
    P_ASSERT(vec.size() == 1);
    vec.push_back(5);
    P_ASSERT(vec.size() == 2);
    vec.push_back(4);
    P_ASSERT(vec.size() == 3);
    vec.clear();
    // Assertion will fail.
    P_ASSERT(vec.size() != 0);
    // This will not run.
    printf("You shouldn't see me!\n");
    vec.push_back(4);
    P_ASSERT(vec.size() == 3);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
leaq -0x40(%rbp), %rdi
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
leaq -0x1c(%rbp), %rsi
movl $0x3, (%rsi)
callq 0x3990
movq -0x38(%rbp), %r15
subq -0x40(%rbp), %r15
xorl %r14d, %r14d
cmpq $0x4, %r15
sete %r14b
callq 0x29b4
movq %rax, %rbx
leaq 0x2c74(%rip), %rdx      # 0x50c9
leaq 0x2c84(%rip), %r8       # 0x50e0
leaq -0x200(%rbp), %rdi
pushq $0x8
popq %rcx
movl %r14d, %esi
xorl %r9d, %r9d
callq 0x38e6
leaq -0x200(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3836
leaq -0x200(%rbp), %rdi
callq 0x35ec
cmpq $0x4, %r15
jne 0x25d9
leaq -0x1c(%rbp), %rsi
movl $0x5, (%rsi)
leaq -0x40(%rbp), %rdi
callq 0x3990
movq -0x38(%rbp), %r15
subq -0x40(%rbp), %r15
xorl %r14d, %r14d
cmpq $0x8, %r15
sete %r14b
callq 0x29b4
movq %rax, %rbx
leaq 0x2bfc(%rip), %rdx      # 0x50c9
leaq 0x2c1c(%rip), %r8       # 0x50f0
leaq -0x190(%rbp), %rdi
pushq $0xa
popq %rcx
movl %r14d, %esi
xorl %r9d, %r9d
callq 0x38e6
leaq -0x190(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3836
leaq -0x190(%rbp), %rdi
callq 0x35ec
cmpq $0x8, %r15
jne 0x25d9
leaq -0x1c(%rbp), %rsi
movl $0x4, (%rsi)
leaq -0x40(%rbp), %rdi
callq 0x3990
movq -0x38(%rbp), %r15
subq -0x40(%rbp), %r15
xorl %r14d, %r14d
cmpq $0xc, %r15
sete %r14b
callq 0x29b4
movq %rax, %rbx
leaq 0x2b84(%rip), %rdx      # 0x50c9
leaq 0x2bb4(%rip), %r8       # 0x5100
leaq -0x120(%rbp), %rdi
pushq $0xc
popq %rcx
movl %r14d, %esi
xorl %r9d, %r9d
callq 0x38e6
leaq -0x120(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3836
leaq -0x120(%rbp), %rdi
callq 0x35ec
cmpq $0xc, %r15
jne 0x25d9
movq -0x40(%rbp), %rax
cmpq %rax, -0x38(%rbp)
je 0x2592
movq %rax, -0x38(%rbp)
callq 0x29b4
movq %rax, %rbx
leaq 0x2b28(%rip), %rdx      # 0x50c9
leaq 0x2b68(%rip), %r8       # 0x5110
leaq -0xb0(%rbp), %rdi
pushq $0xf
popq %rcx
xorl %esi, %esi
xorl %r9d, %r9d
callq 0x38e6
leaq -0xb0(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3836
leaq -0xb0(%rbp), %rdi
callq 0x35ec
leaq -0x40(%rbp), %rdi
callq 0x3db0
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
jmp 0x2628
jmp 0x2631
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
jmp 0x2628
jmp 0x2631
jmp 0x2631
movq %rax, %rbx
leaq -0x190(%rbp), %rdi
jmp 0x2628
jmp 0x2631
jmp 0x2631
movq %rax, %rbx
leaq -0x200(%rbp), %rdi
callq 0x35ec
jmp 0x2634
jmp 0x2631
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x3db0
movq %rbx, %rdi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x170, %rsp            # imm = 0x170
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
pushq $0xa
popq %rsi
callq 0x3dc4
movq -0x30(%rbp), %r15
subq -0x40(%rbp), %r15
xorl %r14d, %r14d
cmpq $0x25, %r15
setae %r14b
callq 0x29b4
movq %rax, %rbx
leaq 0x2a39(%rip), %rdx      # 0x50c9
leaq 0x2b32(%rip), %r8       # 0x51c9
leaq -0x190(%rbp), %rdi
pushq $0x1a
popq %rcx
movl %r14d, %esi
xorl %r9d, %r9d
callq 0x38e6
leaq -0x190(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3836
leaq -0x190(%rbp), %rdi
callq 0x35ec
cmpq $0x24, %r15
jbe 0x27b7
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %r12
xorl %r14d, %r14d
cmpq %r15, %r12
sete %r14b
callq 0x29b4
movq %rax, %rbx
leaq 0x29d5(%rip), %rdx      # 0x50c9
leaq 0x2ae3(%rip), %r8       # 0x51de
leaq -0x120(%rbp), %rdi
pushq $0x1b
popq %rcx
movl %r14d, %esi
xorl %r9d, %r9d
callq 0x38e6
leaq -0x120(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3836
leaq -0x120(%rbp), %rdi
callq 0x35ec
cmpq %r15, %r12
jne 0x27b7
pushq $0xb
popq %r15
leaq -0x40(%rbp), %rbx
leaq -0x24(%rbp), %r14
subl $0x1, %r15d
jb 0x275c
movl $0x3, -0x24(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3990
jmp 0x2742
movq -0x30(%rbp), %rax
subq -0x40(%rbp), %rax
xorl %r14d, %r14d
cmpq $0x29, %rax
setae %r14b
callq 0x29b4
movq %rax, %rbx
leaq 0x294b(%rip), %rdx      # 0x50c9
leaq 0x2a69(%rip), %r8       # 0x51ee
leaq -0xb0(%rbp), %rdi
pushq $0x21
popq %rcx
movl %r14d, %esi
xorl %r9d, %r9d
callq 0x38e6
leaq -0xb0(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3836
leaq -0xb0(%rbp), %rdi
callq 0x35ec
leaq -0x40(%rbp), %rdi
callq 0x3db0
addq $0x170, %rsp            # imm = 0x170
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
jmp 0x27f6
jmp 0x2801
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
jmp 0x27f6
jmp 0x2801
movq %rax, %rbx
leaq -0x190(%rbp), %rdi
callq 0x35ec
jmp 0x2804
jmp 0x2801
jmp 0x2801
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x3db0
movq %rbx, %rdi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/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
leaq -0x50(%rbp), %rbx
andq $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rbx)
xorl %eax, %eax
leaq -0x2c(%rbp), %r14
movl %eax, -0x2c(%rbp)
cmpl $0xa, %eax
jge 0x2858
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3e5e
movl -0x2c(%rbp), %eax
incl %eax
jmp 0x283e
xorl %r14d, %r14d
leaq -0xc0(%rbp), %r15
cmpq $0xa, %r14
je 0x28bf
movq -0x50(%rbp), %rax
movl (%rax,%r14,4), %r12d
xorl %ebx, %ebx
cmpq %r12, %r14
sete %bl
callq 0x29b4
movq %rax, %r13
movq %r15, %rdi
movl %ebx, %esi
leaq 0x283d(%rip), %rdx      # 0x50c9
pushq $0x2c
popq %rcx
leaq 0x297c(%rip), %r8       # 0x5212
xorl %r9d, %r9d
callq 0x38e6
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3836
movq %r15, %rdi
callq 0x35ec
leaq 0x1(%r14), %rax
cmpq %r12, %r14
movq %rax, %r14
je 0x2862
leaq -0x50(%rbp), %rdi
callq 0x3db0
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
callq 0x35ec
jmp 0x28f0
jmp 0x28ed
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x3db0
movq %rbx, %rdi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/jaxonwang[P]suffixtree/main.cc
// Function: rand_str[abi:cxx11](unsigned long)
string rand_str(size_t length) {
  stringstream ss;
  for (size_t i = 0; i < length; i++) {
    ss << static_cast<char>('a' + rand() % 26);
  }
  return ss.str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x1a8(%rbp), %rdi
callq 0x2100
leaq -0x198(%rbp), %r15
pushq $0x1a
popq %r12
subq $0x1, %r14
jb 0x240a
callq 0x2040
cltd
idivl %r12d
addb $0x61, %dl
movsbl %dl, %esi
movq %r15, %rdi
callq 0x2190
jmp 0x23eb
leaq -0x190(%rbp), %rsi
movq %rbx, %rdi
callq 0x2210
leaq -0x1a8(%rbp), %rdi
callq 0x2120
movq %rbx, %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x243a
movq %rax, %rbx
leaq -0x1a8(%rbp), %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O2/jaxonwang[P]suffixtree/main.cc
// Function: main
int main(int argc, char *argv[]) {

  if (argc != 2) {
    std::cout << "Usage: a.out str" << std::endl;
    return -1;
  }

  std::string s1 = rand_str(stoi(argv[1]));

  auto t_start = steady_clock::now();
  SuffixTreeNaive st2{s1};
  st2.build();

  auto t_end = steady_clock::now();
  auto dur = duration<double>(t_end - t_start).count();
  cout << "Test: naive Execution time: " << dur << endl;

  t_start = steady_clock::now();
  SuffixTreeImpl st1{s1};
  st1.build();
  t_end = steady_clock::now();
  dur = duration<double>(t_end - t_start).count();
  cout << "Test: impl Execution time: " << dur << endl;

  std::cout << (st2 == st1) << std::endl;

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xc0, %rsp
cmpl $0x2, %edi
jne 0x25a0
movq 0x8(%rsi), %rsi
leaq -0x80(%rbp), %rdi
leaq -0xc8(%rbp), %rdx
callq 0x2070
leaq -0x80(%rbp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x260f
movslq %eax, %rsi
leaq -0x30(%rbp), %rdi
callq 0x23bc
leaq -0x80(%rbp), %rdi
callq 0x2090
callq 0x21b0
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2968
leaq -0xc8(%rbp), %rdi
callq 0x2630
callq 0x21b0
movq %rax, %r14
movq 0x4af6(%rip), %rdi      # 0x6fc8
leaq 0x1b48(%rip), %rsi      # 0x4021
callq 0x2160
subq %rbx, %r14
cvtsi2sd %r14, %xmm0
divsd 0x1b1a(%rip), %xmm0     # 0x4008
movq %rax, %rdi
callq 0x2220
movq %rax, %rdi
callq 0x20a0
callq 0x21b0
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2788
leaq -0x80(%rbp), %rdi
callq 0x27a2
callq 0x21b0
movq %rax, %r14
movq 0x4a9d(%rip), %rdi      # 0x6fc8
leaq 0x1b0c(%rip), %rsi      # 0x403e
callq 0x2160
subq %rbx, %r14
cvtsi2sd %r14, %xmm0
divsd 0x1ac1(%rip), %xmm0     # 0x4008
movq %rax, %rdi
callq 0x2220
movq %rax, %rdi
callq 0x20a0
leaq -0xa0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x3d9c
movzbl %al, %esi
movq 0x4a57(%rip), %rdi      # 0x6fc8
callq 0x2240
movq %rax, %rdi
callq 0x20a0
leaq -0x80(%rbp), %rdi
callq 0x2864
leaq -0xc8(%rbp), %rdi
callq 0x2864
leaq -0x30(%rbp), %rdi
callq 0x2090
xorl %eax, %eax
jmp 0x25be
movq 0x4a21(%rip), %rdi      # 0x6fc8
leaq 0x1a62(%rip), %rsi      # 0x4010
callq 0x2160
movq %rax, %rdi
callq 0x20a0
pushq $-0x1
popq %rax
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x25e1
jmp 0x25e1
movq %rax, %rbx
jmp 0x25fe
movq %rax, %rbx
jmp 0x2607
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
jmp 0x2602
movq %rax, %rbx
jmp 0x25f2
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x2864
leaq -0xc8(%rbp), %rdi
callq 0x2864
leaq -0x30(%rbp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O2/jaxonwang[P]suffixtree/main.cc
// Function: SuffixTreeNaive::build()
void build() {
    for (size_t i = 0; i <= textlen; i++) {
      int j = i;
      internal_node_ptr current_node = root;

      while (true) { // will eventually create a leaf
        CharT current_char = text[j];

        auto &nextedge_ptr = current_node->next_edge(current_char);
        if (!nextedge_ptr) {
          new_leaf(current_node, j, textlen);
          goto end_insert_i;
        }

        size_t start = nextedge_ptr->start_position();
        size_t end = nextedge_ptr->end_position();
        for (; start <= end; start++, j++) {
          if (text[start] != text[j]) {
            auto new_node = break_edge(current_node, current_char, start - 1);
            new_leaf(new_node, j, textlen); // include the term symbol
            goto end_insert_i;
          }
        }
        current_node = dynamic_cast<internal_node_ptr>(
            current_node->next_node(current_char));
        if (!current_node)
          throw std::logic_error("Goes to Leaf!");
      }

    end_insert_i:;
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
xorl %r12d, %r12d
movq %r14, -0x38(%rbp)
cmpq (%r14), %r12
ja 0x2731
movq 0x28(%rbx), %rax
movq %rax, -0x30(%rbp)
movq %r12, -0x40(%rbp)
movslq %r12d, %r12
movq (%rbx), %rcx
movsbl (%rcx,%r12), %r13d
movq %rax, %rdi
movl %r13d, %esi
callq 0x2ebe
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2728
movq %rax, %r14
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, %r15
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq (%rbx), %rcx
cmpq %rax, %r15
ja 0x26b5
movb (%rcx,%r15), %dl
cmpb (%rcx,%r12), %dl
jne 0x26ed
incq %r15
incq %r12
jmp 0x269e
movq -0x30(%rbp), %rdi
movl %r13d, %esi
callq 0x31c2
testq %rax, %rax
je 0x2740
movq %rax, %rdi
leaq 0x4570(%rip), %rsi      # 0x6c40
leaq 0x4591(%rip), %rdx      # 0x6c68
xorl %ecx, %ecx
callq 0x2180
movq %rax, -0x30(%rbp)
testq %rax, %rax
jne 0x2664
jmp 0x2745
decq %r15
movq %rbx, %rdi
leaq -0x30(%rbp), %rsi
movl %r13d, %edx
movq %r15, %rcx
callq 0x302c
movq %rax, -0x48(%rbp)
movq %rbx, %rdi
leaq -0x48(%rbp), %rsi
movq %r12, %rdx
movq -0x38(%rbp), %r14
movq %r14, %rcx
callq 0x2f3e
movq -0x40(%rbp), %r12
incq %r12
jmp 0x264f
movq %rbx, %rdi
leaq -0x30(%rbp), %rsi
jmp 0x270d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
andq $0x0, -0x30(%rbp)
pushq $0x10
popq %rdi
callq 0x20b0
movq %rax, %rbx
leaq 0x1922(%rip), %rsi      # 0x4079
movq %rax, %rdi
callq 0x21d0
movq 0x487a(%rip), %rsi      # 0x6fe0
movq 0x4853(%rip), %rdx      # 0x6fc0
movq %rbx, %rdi
callq 0x2250
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O2/jaxonwang[P]suffixtree/main.cc
// Function: SuffixTreeImpl::build()
void build() { // S[j,i)
    internal_node_ptr longest_node = root;
    internal_node_ptr node_to_start = longest_node;

    size_type j_start_with = 0;
    size_type start_depth = 0;

    for (size_type i = 0; i <= textlen; i++) {
      leaf_end_pos = i;
      internal_node_ptr node_to_update_suffix_link = nullptr;

      // find the depth of the longest_node

      for (size_type j = j_start_with; j <= i; j++) {

        internal_node_ptr stop_node;
        internal_node_ptr suffix_link_node;
        size_type travel_depth;
        auto ret =
            travel_down_and_extend(node_to_start, j + start_depth, i, stop_node,
                                   suffix_link_node, travel_depth);

        if (node_to_update_suffix_link) {
          // set suffix link
          node_to_update_suffix_link->set_suffix_link(suffix_link_node);
        }

        if (ret == ExtensionType::newnode) { // need to specify suffix link must
                                             // be updated
          node_to_update_suffix_link = suffix_link_node;
        } else {
          node_to_update_suffix_link = nullptr;
        }

        if (ret != ExtensionType::extendleaf) { // new leaf is created
          j_start_with = j + 1;
          node_to_start = stop_node->get_suffix_link(); // next to start
          start_depth += (stop_node == root) ? 0 : travel_depth - 1;
        } else { // no need for the future extend , since they must be extesion
                 // type 3
          break;
        }
      }
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x28(%rdi), %rax
leaq -0x38(%rbp), %rcx
movq %rax, (%rcx)
xorl %r14d, %r14d
xorl %r13d, %r13d
xorl %r15d, %r15d
cmpq 0x20(%rbx), %r13
ja 0x2855
movq %r13, 0x48(%rbx)
xorl %r12d, %r12d
cmpq %r13, %r15
ja 0x284d
leaq (%r15,%r14), %rdx
leaq -0x40(%rbp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
leaq -0x38(%rbp), %rsi
movq %r13, %rcx
leaq -0x48(%rbp), %r8
leaq -0x30(%rbp), %r9
callq 0x3c0c
testq %r12, %r12
je 0x2811
movq -0x30(%rbp), %rcx
movq %rcx, 0x78(%r12)
cmpl $0x2, %eax
je 0x284d
movl $0x0, %r12d
cmpl $0x1, %eax
jne 0x2825
movq -0x30(%rbp), %r12
incq %r15
movq -0x48(%rbp), %rax
movq 0x78(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq -0x40(%rbp), %rcx
decq %rcx
cmpq 0x28(%rbx), %rax
movl $0x0, %eax
cmoveq %rax, %rcx
addq %rcx, %r14
jmp 0x27db
incq %r13
jmp 0x27ca
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jaxonwang[P]suffixtree/main.cc
// Function: SuffixTreeBase::SuffixTreeBase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
SuffixTreeBase(const StringT &text) : text(text), textlen(text.size()) {
    std::unique_ptr<InternalNode> root_ptr{new InternalNode};
    root = root_ptr.get();
    node_holder.push_back(move(root_ptr));
    root->set_suffix_link(root);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x21c0
movq 0x8(%r14), %rax
movq %rax, 0x20(%rbx)
leaq 0x30(%rbx), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
andq $0x0, 0x40(%rbx)
movl $0x80, %edi
callq 0x2170
movq %rax, %r15
movq %rax, %rdi
callq 0x2a0e
movq %r15, 0x28(%rbx)
leaq -0x20(%rbp), %rsi
movq %r15, (%rsi)
movq %r14, %rdi
callq 0x2cba
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0x29cc
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rbx), %rax
movq %rax, 0x78(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0x29f6
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x29f6
movq %rax, %r15
movq %r14, %rdi
callq 0x2a50
movq %rbx, %rdi
callq 0x2090
movq %r15, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O2/jaxonwang[P]suffixtree/main.cc
// Function: NonLeaf::next_edge(char)
edge_ptr &next_edge(const CharT c) {
    static edge_ptr empty_edge{};
    if (adj_edges.count(c))
      return adj_edges[c];
    return empty_edge;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb %sil, -0x9(%rbp)
movb 0x4297(%rip), %al       # 0x7168
testb %al, %al
je 0x2f06
addq $0x40, %rbx
leaq -0x9(%rbp), %rsi
movq %rbx, %rdi
callq 0x3200
testq %rax, %rax
je 0x2ef8
leaq -0x9(%rbp), %rsi
movq %rbx, %rdi
callq 0x32a4
jmp 0x2eff
leaq 0x4261(%rip), %rax      # 0x7160
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x425b(%rip), %rdi      # 0x7168
callq 0x2270
testl %eax, %eax
je 0x2ed5
leaq -0x327(%rip), %rdi      # 0x2bf6
leaq 0x423c(%rip), %rsi      # 0x7160
leaq 0x421d(%rip), %rdx      # 0x7148
callq 0x2140
leaq 0x4231(%rip), %rdi      # 0x7168
callq 0x20f0
jmp 0x2ed5
// File: /workspace/github_cpp_makefile_star2_O2/jaxonwang[P]suffixtree/main.cc
// Function: SuffixTreeBase::new_leaf(InternalNode*&, unsigned long, unsigned long const&)
void new_leaf(internal_node_ptr &current_node, const size_type start_pos,
                const size_type &end_pos) {
    const CharT c = text[start_pos];
    current_node->adj_edges[c] =
        std::unique_ptr<Edge>{new LeafEdge{start_pos, end_pos}};

    std::unique_ptr<Leaf> newleaf_ptr{new Leaf{}};
    current_node->children[c] = newleaf_ptr.get();
    node_holder.push_back(move(newleaf_ptr));
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movb (%rax,%rdx), %al
leaq -0x29(%rbp), %rcx
movb %al, (%rcx)
pushq $0x18
popq %rdi
callq 0x2170
movq %rax, %r15
leaq 0x3d37(%rip), %rax      # 0x6cb0
movq %rax, (%r15)
movq %r13, 0x8(%r15)
movq %r12, 0x10(%r15)
movq (%r14), %rdi
addq $0x40, %rdi
leaq -0x29(%rbp), %rsi
callq 0x32a4
movq (%rax), %rdi
movq %r15, (%rax)
testq %rdi, %rdi
je 0x2fa5
movq (%rdi), %rax
callq *0x8(%rax)
pushq $0x10
popq %rdi
callq 0x2170
movq %rax, %r15
leaq 0x3db9(%rip), %rax      # 0x6d70
movq %rax, (%r15)
andq $0x0, 0x8(%r15)
movq (%r14), %rdi
addq $0x8, %rdi
leaq -0x29(%rbp), %rsi
callq 0x3820
movq %r15, (%rax)
addq $0x30, %rbx
leaq -0x38(%rbp), %rsi
movq %r15, (%rsi)
movq %rbx, %rdi
callq 0x2cba
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x2ff4
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x3024
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x3024
jmp 0x3019
movq %rax, %rbx
movq %r15, %rdi
callq 0x2150
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O2/jaxonwang[P]suffixtree/main.cc
// Function: SuffixTreeBase::break_edge(InternalNode*&, char, unsigned long)
internal_node_ptr break_edge(internal_node_ptr &edge_owner, const CharT c,
                               const size_type pos) {
    // break edge[start, end] into [start, pos] [post+1, end]
    auto real_node = edge_owner;
    auto &e = real_node->adj_edges[c];
    auto edge_pair = e->break_edge(pos);
    auto first_edge = move(edge_pair.first);
    auto second_edge = move(edge_pair.second);
    std::unique_ptr<InternalNode> new_internal_ptr{new InternalNode()};
    internal_node_ptr new_internal = new_internal_ptr.get();
    node_holder.push_back(move(new_internal_ptr));

    const CharT breakpoint_c = text[pos + 1];
    new_internal->children[breakpoint_c] = real_node->children[c];
    new_internal->adj_edges[breakpoint_c] = move(second_edge);

    real_node->children[c] = new_internal;
    real_node->adj_edges[c] = move(first_edge);
    return new_internal;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %rbx
movq %rdi, %r12
leaq -0x29(%rbp), %rax
movb %dl, (%rax)
movq (%rsi), %r13
leaq 0x40(%r13), %rdi
movq %rdi, -0x48(%rbp)
movq %rax, %rsi
callq 0x32a4
movq (%rax), %rsi
movq (%rsi), %rax
leaq -0x58(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rdx
callq *0x28(%rax)
movq (%r15), %rax
movq %rax, -0x40(%rbp)
movq 0x8(%r15), %r14
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movl $0x80, %edi
callq 0x2170
movq %rax, %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rax)
movaps %xmm0, 0x60(%rax)
movaps %xmm0, 0x50(%rax)
movaps %xmm0, 0x40(%rax)
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movq %rax, %rdi
callq 0x2a0e
leaq 0x30(%r12), %rdi
leaq -0x38(%rbp), %rsi
movq %r15, (%rsi)
callq 0x2cba
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x30d8
movq (%rdi), %rax
callq *0x8(%rax)
movq (%r12), %rax
movb 0x1(%rax,%rbx), %al
movb %al, -0x38(%rbp)
addq $0x8, %r13
leaq -0x29(%rbp), %rsi
movq %r13, %rdi
callq 0x3820
movq (%rax), %rbx
leaq 0x8(%r15), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3820
movq %rbx, (%rax)
movq %r15, %rdi
addq $0x40, %rdi
leaq -0x38(%rbp), %rsi
callq 0x32a4
movq (%rax), %rdi
movq %r14, (%rax)
testq %rdi, %rdi
je 0x3127
movq (%rdi), %rax
callq *0x8(%rax)
xorl %r14d, %r14d
leaq -0x29(%rbp), %rsi
movq %r13, %rdi
callq 0x3820
movq %r15, (%rax)
xorl %r14d, %r14d
leaq -0x29(%rbp), %rsi
movq -0x48(%rbp), %rdi
callq 0x32a4
movq (%rax), %rdi
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
testq %rdi, %rdi
je 0x315e
movq (%rdi), %rax
callq *0x8(%rax)
leaq -0x58(%rbp), %rdi
callq 0x3bb2
movq %r15, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x3192
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x3192
jmp 0x318f
movq %rax, %rbx
testq %r14, %r14
je 0x31a0
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
cmpq $0x0, -0x40(%rbp)
je 0x31b1
movq -0x40(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
leaq -0x58(%rbp), %rdi
callq 0x3bb2
movq %rbx, %rdi
callq 0x2260