LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/huanghuide[P]SimpleNetworkTunnel/Log.cpp
// Function: Log::Write(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Log::Write(string log)
{
    FILE* fp;

    fp = fopen(LOG_FILE, "a");

    if (fp != NULL)
    {
        time_t t;
        struct tm* local;
        char buf[2048];
        
        t = time(NULL);
        local = localtime(&t);

        sprintf(buf, "(%04d-%02d-%02d %02d:%02d:%02d) %s\n", (local->tm_year + 1900), (local->tm_mon + 1), local->tm_mday, local->tm_hour, local->tm_min, local->tm_sec, log.c_str());
        fputs(buf, fp);  

        printf(buf); // Also print to the screen

        fclose(fp);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x808, %rsp            # imm = 0x808
movq %rsi, %r14
leaq 0x1cf0(%rip), %rdi      # 0x5266
leaq 0x1d01(%rip), %rsi      # 0x527e
callq 0x22f0
testq %rax, %rax
je 0x35fd
movq %rax, %rbx
xorl %edi, %edi
callq 0x2250
leaq -0x20(%rbp), %rdi
movq %rax, (%rdi)
callq 0x21f0
movl $0x76c, %edx            # imm = 0x76C
addl 0x14(%rax), %edx
movl 0x10(%rax), %ecx
incl %ecx
movl 0xc(%rax), %r8d
movl 0x8(%rax), %r9d
movl (%rax), %r10d
movl 0x4(%rax), %r11d
subq $0x8, %rsp
leaq 0x1cbc(%rip), %rsi      # 0x5280
leaq -0x820(%rbp), %r15
movq %r15, %rdi
xorl %eax, %eax
pushq (%r14)
pushq %r10
pushq %r11
callq 0x2080
addq $0x20, %rsp
movq %r15, %rdi
movq %rbx, %rsi
callq 0x22c0
movq %r15, %rdi
xorl %eax, %eax
callq 0x2050
movq %rbx, %rdi
callq 0x2270
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/huanghuide[P]SimpleNetworkTunnel/Log.cpp
// Function: Log::Write(char*, ...)
void Log::Write(char* format, ...)
{
    char buf[2048];
    va_list args;
    
    va_start(args, format);
    vsprintf(buf, format, args);
    va_end(args);

    string bufStr(buf);
    Write(bufStr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x910, %rsp            # imm = 0x910
leaq -0x120(%rbp), %rdi
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x366a
movaps %xmm0, -0xf0(%rbp)
movaps %xmm1, -0xe0(%rbp)
movaps %xmm2, -0xd0(%rbp)
movaps %xmm3, -0xc0(%rbp)
movaps %xmm4, -0xb0(%rbp)
movaps %xmm5, -0xa0(%rbp)
movaps %xmm6, -0x90(%rbp)
movaps %xmm7, -0x80(%rbp)
leaq -0x70(%rbp), %rdx
movq %rdi, 0x10(%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
leaq -0x920(%rbp), %rbx
movq %rbx, %rdi
callq 0x2150
leaq -0x38(%rbp), %r14
leaq -0x11(%rbp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x28e4
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0x2340
leaq -0x58(%rbp), %rbx
movq %rbx, %rsi
callq 0x355c
movq %rbx, %rdi
callq 0x2140
leaq -0x38(%rbp), %rdi
callq 0x2140
addq $0x910, %rsp            # imm = 0x910
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x23a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/huanghuide[P]SimpleNetworkTunnel/Main.cpp
// Function: ParseIpPort(char*)
void ParseIpPort(char* ipPortStr)
{
    gLog.Write("ipPortStr is %s", ipPortStr);

    if (ipPortStr != NULL)
    {
        char* pos = strchr(ipPortStr, ':');
        if (pos != NULL)
        {
            char tmp[200];
            int ipStrLen = pos - ipPortStr;

            memcpy(tmp, ipPortStr, ipStrLen);
            tmp[ipStrLen] = '\0';

            string ipAddr(tmp);            
            int port = atoi(pos + 1);

            if ((ipAddr.length() > 0) && (port > 0))
            {
                gLog.Write("gOuterDstCounter is %d, ipAddr %s, port %d", gOuterDstCounter, ipAddr.c_str(), port);
                gOuterDstIpAddrArray[gOuterDstCounter] = ipAddr;
                gOuterDstPortArray[gOuterDstCounter] = port;
                gOuterDstCounter++;
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xf0, %rsp
movq %rdi, %rbx
leaq 0x6758(%rip), %rdi      # 0x9e68
leaq 0x1b8d(%rip), %rsi      # 0x52a4
movq %rbx, %rdx
xorl %eax, %eax
callq 0x360c
testq %rbx, %rbx
je 0x37f0
pushq $0x3a
popq %rsi
movq %rbx, %rdi
callq 0x2110
testq %rax, %rax
je 0x37f0
movq %rax, %r14
subl %ebx, %eax
movslq %eax, %r15
leaq -0x110(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2210
movb $0x0, -0x110(%rbp,%r15)
leaq -0x48(%rbp), %r15
leaq -0x21(%rbp), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x28e4
incq %r14
movq %r14, %rdi
callq 0x2380
movl %eax, %ebx
cmpq $0x0, 0x8(%r15)
setne %al
testl %ebx, %ebx
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x37e7
leaq 0x66c1(%rip), %r14      # 0x9e60
movl (%r14), %edx
movq -0x48(%rbp), %rcx
leaq 0x66bb(%rip), %rdi      # 0x9e68
leaq 0x1b00(%rip), %rsi      # 0x52b4
movl %ebx, %r8d
xorl %eax, %eax
callq 0x360c
movslq (%r14), %rdi
shlq $0x5, %rdi
addq 0x4804(%rip), %rdi      # 0x7fd0
leaq -0x48(%rbp), %rsi
callq 0x2180
movslq (%r14), %rax
leaq 0x6361(%rip), %rcx      # 0x9b40
movl %ebx, (%rcx,%rax,4)
incl %eax
movl %eax, (%r14)
leaq -0x48(%rbp), %rdi
callq 0x2140
addq $0xf0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O2/huanghuide[P]SimpleNetworkTunnel/Main.cpp
// Function: ParseParamsAndInit(int, char**)
void ParseParamsAndInit(int argc, char *argv[])
{
	int ch;
	opterr = 0;

	// Default setting
	gRoleType = SERVER;
	gInnerListenPort = BB_LISTEN_PORT;

	// Read parameters
	while ((ch = getopt(argc, argv, "r:l:o:")) != EOF)
	{
		switch (ch)
		{
		case 'r': // Role
            gLog.Write("Param (r): %s", optarg);
			if (strcmp(optarg, "client") == 0)
			{
				gRoleType = CLIENT;
			}
            else if (strcmp(optarg, "middle") == 0)
			{
				gRoleType = MIDDLE;
			}
			else
			{
				gRoleType = SERVER;
			}

			break;

		case 'l': // inner listen port
            gLog.Write("Param (l): %s", optarg);
			gInnerListenPort = atoi(optarg);
			break;

		case 'o': // outer dest IP address
            gLog.Write("Param (o): %s", optarg);
            ParseIpPort(optarg);
			break;
		}
	}

	// Init variables
	gInnerInitiator = new InnerInitiator(gInnerListenPort);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movl %edi, %r14d
movq 0x47b1(%rip), %rax      # 0x7fe0
andl $0x0, (%rax)
leaq 0x49cf(%rip), %rax      # 0x8208
movl $0x2, (%rax)
leaq 0x49c6(%rip), %rax      # 0x820c
movl $0x1e61, (%rax)         # imm = 0x1E61
leaq 0x1a8c(%rip), %r15      # 0x52df
leaq 0x660e(%rip), %r13      # 0x9e68
movl %edi, -0x2c(%rbp)
movl %r14d, %edi
movq %r12, %rsi
movq %r15, %rdx
callq 0x20a0
cmpl $0x6c, %eax
je 0x38a9
cmpl $0x6f, %eax
je 0x3884
cmpl $0x72, %eax
je 0x38d7
cmpl $-0x1, %eax
jne 0x385d
jmp 0x395e
movq 0x473d(%rip), %rbx      # 0x7fc8
movq (%rbx), %rdx
movq %r13, %rdi
leaq 0x1a78(%rip), %rsi      # 0x5310
xorl %eax, %eax
callq 0x360c
movq (%rbx), %rdi
callq 0x36f4
jmp 0x385d
movq 0x4718(%rip), %rbx      # 0x7fc8
movq (%rbx), %rdx
movq %r13, %rdi
leaq 0x1a45(%rip), %rsi      # 0x5302
xorl %eax, %eax
callq 0x360c
movq (%rbx), %rdi
callq 0x2380
leaq 0x4939(%rip), %rcx      # 0x820c
movl %eax, (%rcx)
jmp 0x385d
movq %r12, %r14
movq %r15, %r12
movq 0x46e4(%rip), %rbx      # 0x7fc8
movq (%rbx), %rdx
movq %r13, %r15
movq %r13, %rdi
leaq 0x19f2(%rip), %rsi      # 0x52e6
xorl %eax, %eax
callq 0x360c
movq (%rbx), %r13
movq %r13, %rdi
leaq 0x19ec(%rip), %rsi      # 0x52f4
callq 0x2350
testl %eax, %eax
je 0x3933
movq %r13, %rdi
leaq 0x19e0(%rip), %rsi      # 0x52fb
callq 0x2350
testl %eax, %eax
je 0x393f
leaq 0x48dd(%rip), %rax      # 0x8208
movl $0x2, (%rax)
jmp 0x394c
leaq 0x48ce(%rip), %rax      # 0x8208
andl $0x0, (%rax)
jmp 0x394c
leaq 0x48c2(%rip), %rax      # 0x8208
movl $0x1, (%rax)
movq %r15, %r13
movq %r12, %r15
movq %r14, %r12
movl -0x2c(%rbp), %r14d
jmp 0x385d
pushq $0x40
popq %rdi
callq 0x2280
movq %rax, %rbx
leaq 0x489c(%rip), %rax      # 0x820c
movl (%rax), %esi
movq %rbx, %rdi
callq 0x2a5c
leaq 0x6527(%rip), %rax      # 0x9ea8
movq %rbx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
pushq $0x40
popq %rsi
movq %rbx, %rdi
callq 0x22a0
movq %r14, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O2/huanghuide[P]SimpleNetworkTunnel/OuterRunner.cpp
// Function: OuterRunner::OuterRunner(InnerRunner*)
OuterRunner::OuterRunner(InnerRunner* innerRunner) :
    Runner(OUTER_RUNNER),
    mInnerRunner(innerRunner),
    mSendStatus(INIT)
{
    mDstIpAddr = gOuterDstIpAddrArray[gOuterRunnerCounter % gOuterDstCounter];
    mDstPort = gOuterDstPortArray[gOuterRunnerCounter % gOuterDstCounter];

    gOuterRunnerCounter++;
    gOuterRunnerCounter = gOuterRunnerCounter % gOuterDstCounter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x5
popq %rsi
callq 0x44cc
leaq 0x4014(%rip), %rax      # 0x7d28
movq %rax, (%rbx)
movq %r14, 0x28(%rbx)
andl $0x0, 0x30(%rbx)
leaq 0x38(%rbx), %r14
leaq 0x48(%rbx), %rax
movq %rax, 0x38(%rbx)
andq $0x0, 0x40(%rbx)
movb $0x0, 0x48(%rbx)
leaq 0x6129(%rip), %r15      # 0x9e64
movl (%r15), %eax
leaq 0x611b(%rip), %r12      # 0x9e60
cltd
idivl (%r12)
movslq %edx, %rsi
shlq $0x5, %rsi
addq 0x4278(%rip), %rsi      # 0x7fd0
movq %r14, %rdi
callq 0x2180
movl (%r15), %ecx
movl (%r12), %esi
movl %ecx, %eax
cltd
idivl %esi
movslq %edx, %rax
leaq 0x5dca(%rip), %rdx      # 0x9b40
movl (%rdx,%rax,4), %eax
movl %eax, 0x58(%rbx)
incl %ecx
movl %ecx, %eax
cltd
idivl %esi
movl %edx, (%r15)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r14, %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x44ea
movq %r15, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O2/huanghuide[P]SimpleNetworkTunnel/OuterRunner.cpp
// Function: OuterRunner::HandleError()
void OuterRunner::HandleError()
{
    if (mSockFd > 0)
    {
        //printf("OuterRunner Error! sockFd %d, errno %d\n", mSockFd, errno);
        CloseSockFd(mSockFd);
        mSockFd = 0;
    }
    
    if (mInnerRunner != NULL)
    {
        mInnerRunner->HandleError();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0xc(%rdi), %edi
testl %edi, %edi
jle 0x3ed3
callq 0x2785
andl $0x0, 0xc(%rbx)
movq 0x28(%rbx), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0x3ee7
popq %rbx
popq %rbp
jmp 0x329c
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/huanghuide[P]SimpleNetworkTunnel/OuterRunner.cpp
// Function: OuterRunner::ProcessConnectingStatus()
void OuterRunner::ProcessConnectingStatus()
{
    if (mSockFd > 0)
    {
        struct sockaddr_in addr;
        
        bzero(&addr, sizeof(addr));
        addr.sin_family = AF_INET;
        addr.sin_port = htons(mDstPort);
        addr.sin_addr.s_addr = inet_addr(mDstIpAddr.c_str());

        int retConn = connect(mSockFd, (sockaddr*)&addr, sizeof(addr));
        
        if (retConn != 0)
        {
            if ((errno == EINPROGRESS) || (errno == EALREADY))
            {
                mSendStatus = CONNECTING;
            }
            else if (errno == EISCONN)
            {
                ProcessEstablishedStatus();
                mSendStatus = ESTABLISHED;
            }
            else
            {
                gLog.Write("OuterRunner::ProcessConnectingStatus: errno %d\n", errno);
                HandleError();                
            }
        }
        else
        {
            ProcessEstablishedStatus();
            mSendStatus = ESTABLISHED;
        }
    }
}

// Assembly:
cmpl $0x0, 0xc(%rdi)
jle 0x3fa6
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x20(%rbp), %r14
andq $0x0, 0x8(%r14)
movw $0x2, (%r14)
movzwl 0x58(%rdi), %eax
rolw $0x8, %ax
movw %ax, 0x2(%r14)
movq 0x38(%rdi), %rdi
callq 0x2290
movl %eax, 0x4(%r14)
movl 0xc(%rbx), %edi
pushq $0x10
popq %rdx
movq %r14, %rsi
callq 0x2220
testl %eax, %eax
je 0x3f70
callq 0x2040
movl (%rax), %edx
leal -0x72(%rdx), %eax
cmpl $0x2, %eax
jae 0x3f6b
movl $0x1, 0x30(%rbx)
jmp 0x3f9e
cmpl $0x6a, %edx
jne 0x3f81
movq %rbx, %rdi
callq 0x442c
movl $0x2, 0x30(%rbx)
jmp 0x3f9e
leaq 0x5ee0(%rip), %rdi      # 0x9e68
leaq 0x142f(%rip), %rsi      # 0x53be
xorl %eax, %eax
callq 0x360c
movq %rbx, %rdi
callq 0x3eba
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/huanghuide[P]SimpleNetworkTunnel/OuterRunner.cpp
// Function: OuterRunner::SendPendingMsg()
void OuterRunner::SendPendingMsg()
{
    if (mSendStatus == INIT)
    {
        ProcessInitStatus();
    }
    else if (mSendStatus == ESTABLISHED)
    {
        for (int index = 0; index < mSendMsg.size(); index++)
        {
        	char* msgPos = ((char*)(mSendMsg[index].c_str()));
        	int msgLen = mSendMsg[index].length();

        	char* msgBuf = new char[msgLen + 1];

        	memset(msgBuf, 0, msgLen + 1);
        	memcpy(msgBuf, msgPos, msgLen);

            //printf("Sending message to the remote server. SockFd %d, msgLen %d\n", mSockFd, msgLen);
            //PrintBuf(msgBuf, msgLen);

        	if ((gRoleType == MIDDLE) || (gRoleType == CLIENT))
        	{
        		for (int index = 0; index < msgLen; index++)
        		{
        			msgBuf[index] = msgBuf[index] ^ SIMPLE_XOR_VALUE;
        		}
        	}

            int sendBytes = SockSendPacket(mSockFd, msgBuf, msgLen);
                        
            if (sendBytes != mSendMsg[index].length())
            {
            	delete [] msgBuf;
                HandleError();

                return;
            }

            delete [] msgBuf;
        }

        mSendMsg.clear();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r13
movl 0x30(%rdi), %eax
testl %eax, %eax
je 0x4095
cmpl $0x2, %eax
jne 0x40ab
leaq 0x10(%r13), %rax
movq %rax, -0x30(%rbp)
xorl %ebx, %ebx
movq %r13, -0x38(%rbp)
movq 0x10(%r13), %rax
movq 0x18(%r13), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %rbx, %rcx
jbe 0x40ba
movq %rbx, -0x40(%rbp)
shlq $0x5, %rbx
movq (%rax,%rbx), %r13
movq 0x8(%rax,%rbx), %r15
leal 0x1(%r15), %eax
movslq %eax, %r14
movq %r14, %rdi
callq 0x2030
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x2190
movslq %r15d, %rdx
movq %r12, %rdi
movq %r13, %rsi
movq -0x38(%rbp), %r13
callq 0x2210
leaq 0x41c9(%rip), %rax      # 0x8208
cmpl $0x1, (%rax)
ja 0x4061
testl %r15d, %r15d
movl $0x0, %eax
cmovgl %r15d, %eax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x4061
xorb $-0x5b, (%r12,%rcx)
incq %rcx
jmp 0x4052
movl 0xc(%r13), %edi
movq %r12, %rsi
movl %r15d, %edx
callq 0x27b4
movslq %eax, %r14
movq 0x10(%r13), %rax
movq 0x8(%rax,%rbx), %rbx
movq %r12, %rdi
callq 0x2320
cmpq %r14, %rbx
jne 0x40d1
movq -0x40(%rbp), %rbx
incq %rbx
jmp 0x3fde
movq %r13, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x414a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x30(%rbp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x32e2
movq %r13, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3eba
nop
// File: /workspace/github_cpp_makefile_star2_O2/huanghuide[P]SimpleNetworkTunnel/OuterRunner.cpp
// Function: OuterRunner::ProcessEstablishedStatus()
void OuterRunner::ProcessEstablishedStatus()
{
    if (mSockFd > 0)
    {
        // Set as block socket
        int flags = fcntl(mSockFd, F_GETFL, 0);
        int ret = fcntl(mSockFd, F_SETFL, flags & ~O_NONBLOCK);

        if (ret != 0)
        {
            gLog.Write("OuterRunner::ProcessEstablishedStatus: Set socket block failed!\n");
            HandleError();
        }
        else
        {        
            AddSockFdIntoSet(mSockFd);
        }

        SendPendingMsg();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movl 0xc(%rdi), %edi
testl %edi, %edi
jle 0x44ae
pushq $0x3
popq %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x21a0
movl 0xc(%rbx), %edi
andl $0xfffff7ff, %eax       # imm = 0xFFFFF7FF
pushq $0x4
popq %rsi
movl %eax, %edx
xorl %eax, %eax
callq 0x21a0
testl %eax, %eax
je 0x449e
leaq 0xf82(%rip), %rsi       # 0x53ee
leaq -0x38(%rbp), %r14
leaq -0x11(%rbp), %rdx
movq %r14, %rdi
callq 0x28e4
leaq 0x59e5(%rip), %rdi      # 0x9e68
movq %r14, %rsi
callq 0x355c
leaq -0x38(%rbp), %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x3eba
jmp 0x44a6
movl 0xc(%rbx), %edi
callq 0x26c1
movq %rbx, %rdi
callq 0x3fa8
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x23a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/huanghuide[P]SimpleNetworkTunnel/RunnerManager.cpp
// Function: RunnerManager::FindRunnerByFd(int)
Runner* RunnerManager::FindRunnerByFd(int sockFd)
{
    Runner* ret = NULL;
    
    map<int, Runner*>::iterator iter = mSockRunnerMap.find(sockFd);

    if ((iter != mSockRunnerMap.end()) && (iter->second != NULL))
    {
        ret = iter->second;
    }

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0xc(%rbp), %rax
movl %esi, (%rax)
addq $0x8, %rdi
movq %rax, %rsi
callq 0x4782
addq $0x10, %rbx
cmpq %rbx, %rax
je 0x4606
movq 0x28(%rax), %rax
jmp 0x4608
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/huanghuide[P]SimpleNetworkTunnel/RunnerManager.cpp
// Function: RunnerManager::RunnerTimeout()
void RunnerManager::RunnerTimeout()
{
    //printf("RunnerTimeout: current time is %d\n", time(NULL));

    std::set<int> keySet;
    std::set<int>::iterator keySetIter;

    std::map<int, Runner*>::iterator mapIter = mSockRunnerMap.begin();
    while (mapIter != mSockRunnerMap.end())
    {
        keySet.insert(mapIter->first);
        //printf("RunnerTimeout: key is %d\n", mapIter->first);
    
        mapIter++;
    }

    keySetIter = keySet.begin();
    while (keySetIter != keySet.end())
    {
        mapIter = mSockRunnerMap.find(*keySetIter);
        if ((mapIter != mSockRunnerMap.end()) && (mapIter->second != NULL))
        {
            Runner* pRunner = mapIter->second;
            //printf("RunnerTimeout: key is %d, value is %p\n", mapIter->first, mapIter->second);
            
            pRunner->SocketTimeout();
        }
        
        keySetIter++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq -0x50(%rbp), %r13
andl $0x0, (%r13)
andq $0x0, 0x8(%r13)
movq %r13, 0x10(%r13)
movq %r13, 0x18(%r13)
andq $0x0, 0x20(%r13)
leaq 0x8(%rdi), %r14
movq 0x20(%rdi), %r12
addq $0x10, %rbx
leaq -0x58(%rbp), %r15
cmpq %rbx, %r12
je 0x466e
leaq 0x20(%r12), %rsi
movq %r15, %rdi
callq 0x4c06
movq %r12, %rdi
callq 0x21d0
movq %rax, %r12
jmp 0x464f
movq -0x40(%rbp), %r15
cmpq %r13, %r15
je 0x46a4
leaq 0x20(%r15), %rsi
movq %r14, %rdi
callq 0x4782
cmpq %rbx, %rax
je 0x4697
movq 0x28(%rax), %rdi
testq %rdi, %rdi
je 0x4697
movq (%rdi), %rax
callq *0x20(%rax)
movq %r15, %rdi
callq 0x22e0
movq %rax, %r15
jmp 0x4672
leaq -0x58(%rbp), %rdi
callq 0x4726
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x46c0
jmp 0x46c0
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x4726
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O2/onai[P]npio/example3.cc
// Function: main
int main()
{
  auto a = npio::Array("test2.npy");
  for (auto &v : a.values<float>())
    v += 10.0f;
  a.save("example3-out.npy");
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
leaq 0xd85(%rip), %rsi       # 0x2060
leaq 0x8(%rsp), %rbx
pushq $0x20
popq %rdx
movq %rbx, %rdi
callq 0x18c6
movq %rbx, %rdi
callq 0x1bbe
movss 0xd09(%rip), %xmm0      # 0x2004
cmpq %rdx, %rax
je 0x1312
movss (%rax), %xmm1
addss %xmm0, %xmm1
movss %xmm1, (%rax)
addq $0x4, %rax
jmp 0x12fb
leaq 0xd51(%rip), %rsi       # 0x206a
leaq 0x8(%rsp), %rdi
callq 0x1c06
leaq 0x8(%rsp), %rdi
callq 0x1dd2
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
retq
jmp 0x133a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1dd2
movq %rbx, %rdi
callq 0x1190
// File: /workspace/github_cpp_makefile_star2_O2/t0mm4rx[P]piscine_cpp/day00/ex01/nul.cpp
// Function: main
int main()
{
	Contact contacts[8];
	int current_index = 0;
	print_header();
	print_helper();
	listen_user(contacts, &current_index);
	return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xb10, %rsp            # imm = 0xB10
xorl %r14d, %r14d
leaq (%rsp,%r14), %rdi
addq $0x10, %rdi
callq 0x36ec
addq $0x160, %r14            # imm = 0x160
cmpq $0xb00, %r14            # imm = 0xB00
jne 0x237b
andl $0x0, 0xc(%rsp)
callq 0x2437
callq 0x2622
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x2800
movl $0x9a0, %ebx            # imm = 0x9A0
movq $-0x160, %r14           # imm = 0xFEA0
leaq (%rsp,%rbx), %rdi
addq $0x10, %rdi
callq 0x37f2
addq %r14, %rbx
cmpq %r14, %rbx
jne 0x23c2
xorl %eax, %eax
addq $0xb10, %rsp            # imm = 0xB10
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x9a0, %r14d           # imm = 0x9A0
movq $-0x160, %r15           # imm = 0xFEA0
leaq (%rsp,%r14), %rdi
addq $0x10, %rdi
callq 0x37f2
addq %r15, %r14
cmpq %r15, %r14
jne 0x23f6
jmp 0x242f
movq %rax, %rbx
testq %r14, %r14
je 0x242f
leaq -0x150(%rsp), %r15
leaq (%r15,%r14), %rdi
callq 0x37f2
addq $-0x160, %r14           # imm = 0xFEA0
jne 0x241d
movq %rbx, %rdi
callq 0x21b0
// File: /workspace/github_cpp_makefile_star2_O2/t0mm4rx[P]piscine_cpp/day00/ex01/nul.cpp
// Function: print_header()
void print_header()
{
	std::cout << "        ||" << std::endl;
	std::cout << "  ______||" << std::endl;
	std::cout << " / ____ o|" << std::endl;
	std::cout << "| / ;; \\ |" << std::endl;
	std::cout << "| ______ |" << std::endl;
	std::cout << "||______||" << std::endl;
	std::cout << "||      ||        " << BOLD << BLUE << "An incredible phonebook" << RESET << std::endl;
	std::cout << "||______||        by " << BOLD << BLUE << "tmarx" << RESET << std::endl;
	std::cout << "|'\\[--]/'|        42life" << std::endl;
	std::cout << "|  ¨''¨  |" << std::endl;
	std::cout << "|  ''''  |" << std::endl;
	std::cout << "|        |" << std::endl;
	std::cout << "|        |" << std::endl;
	std::cout << "|        |" << std::endl;
	std::cout << "|________|" << std::endl;
	std::cout << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x3b82(%rip), %rbx      # 0x5fc8
leaq 0x1bb7(%rip), %rsi      # 0x4004
movq %rbx, %rdi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
leaq 0x1bab(%rip), %rsi      # 0x400f
movq %rbx, %rdi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
leaq 0x1b9f(%rip), %rsi      # 0x401a
movq %rbx, %rdi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
leaq 0x1b93(%rip), %rsi      # 0x4025
movq %rbx, %rdi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
leaq 0x1b87(%rip), %rsi      # 0x4030
movq %rbx, %rdi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
leaq 0x1b7b(%rip), %rsi      # 0x403b
movq %rbx, %rdi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
leaq 0x1b6f(%rip), %rsi      # 0x4046
movq %rbx, %rdi
callq 0x20e0
leaq 0x1b73(%rip), %r14      # 0x4059
movq %rax, %rdi
movq %r14, %rsi
callq 0x20e0
leaq 0x1b66(%rip), %r15      # 0x405e
movq %rax, %rdi
movq %r15, %rsi
callq 0x20e0
leaq 0x1b5a(%rip), %rsi      # 0x4064
movq %rax, %rdi
callq 0x20e0
leaq 0x1b63(%rip), %r12      # 0x407c
movq %rax, %rdi
movq %r12, %rsi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
leaq 0x1b4e(%rip), %rsi      # 0x4081
movq %rbx, %rdi
callq 0x20e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x20e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x20e0
leaq 0x1b3f(%rip), %rsi      # 0x4097
movq %rax, %rdi
callq 0x20e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
leaq 0x1b23(%rip), %rsi      # 0x409d
movq %rbx, %rdi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
leaq 0x1b25(%rip), %rsi      # 0x40b6
movq %rbx, %rdi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
leaq 0x1b1b(%rip), %rsi      # 0x40c3
movq %rbx, %rdi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
leaq 0x1b0f(%rip), %r14      # 0x40ce
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
leaq 0x1ada(%rip), %rsi      # 0x40d9
movq %rbx, %rdi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2090
// File: /workspace/github_cpp_makefile_star2_O2/t0mm4rx[P]piscine_cpp/day00/ex01/nul.cpp
// Function: print_helper()
void print_helper()
{
	std::cout << "Commands" << std::endl;
	std::cout << BOLD << std::setw(10) << std::left << "ADD" << RESET;
	std::cout << "Add a new contact in the phone book" << std::endl;
	std::cout << BOLD << std::setw(10) << std::left << "SEARCH" << RESET;
	std::cout << "Display phone book and get detail for one contact" << std::endl;
	std::cout << BOLD << std::setw(10) << std::left << "EXIT" << RESET;
	std::cout << "Exit the phone book, and lose all data into the deep void of the computer memory" << std::endl;
	std::cout << std::endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x3997(%rip), %rbx      # 0x5fc8
leaq 0x1aac(%rip), %rsi      # 0x40e4
movq %rbx, %rdi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
leaq 0x1a0a(%rip), %r14      # 0x4059
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20e0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
pushq $0xa
popq %r12
movq %r12, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl $0xffffff4f, %ebp       # imm = 0xFFFFFF4F
movl 0x18(%rax,%rcx), %edx
andl %ebp, %edx
orl $0x20, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x1a66(%rip), %rsi      # 0x40ed
movq %rax, %rdi
callq 0x20e0
leaq 0x19e6(%rip), %r15      # 0x407c
movq %rax, %rdi
movq %r15, %rsi
callq 0x20e0
leaq 0x1a49(%rip), %rsi      # 0x40f1
movq %rbx, %rdi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20e0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq %r12, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl %ebp, %edx
orl $0x20, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x1a2e(%rip), %rsi      # 0x4115
movq %rax, %rdi
callq 0x20e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x20e0
leaq 0x1a1b(%rip), %rsi      # 0x411c
movq %rbx, %rdi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20e0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq %r12, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
andl 0x18(%rax,%rcx), %ebp
orl $0x20, %ebp
movl %ebp, 0x18(%rax,%rcx)
leaq 0x1a10(%rip), %rsi      # 0x414e
movq %rax, %rdi
callq 0x20e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x20e0
leaq 0x19fb(%rip), %rsi      # 0x4153
movq %rbx, %rdi
callq 0x20e0
movq %rax, %rdi
callq 0x2090
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2090
// File: /workspace/github_cpp_makefile_star2_O2/t0mm4rx[P]piscine_cpp/day00/ex01/commands.cpp
// Function: handle_command(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Contact*, int*)
void handle_command(std::string cmd, Contact contacts[8], int *index)
{
	if (to_upper(cmd) == "EXIT")
		exit(0);
	else if (to_upper(cmd) == "ADD")
		add(contacts, index);
	else if (to_upper(cmd) == "SEARCH")
		search(contacts, index);
	else if (cmd != "")
		std::cout << "Not a valid command!" << std::endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x68(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2140
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x29fb
leaq 0x1866(%rip), %rsi      # 0x414e
movq %r13, %rdi
callq 0x3516
movl %eax, %ebp
movq %r13, %rdi
callq 0x2080
movq %r12, %rdi
callq 0x2080
testb %bpl, %bpl
jne 0x29f4
leaq 0x48(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2140
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x29fb
leaq 0x17bb(%rip), %rsi      # 0x40ed
movq %r13, %rdi
callq 0x3516
movl %eax, %ebp
movq %r13, %rdi
callq 0x2080
movq %r12, %rdi
callq 0x2080
testb %bpl, %bpl
je 0x2961
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2a4d
jmp 0x29e2
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2140
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x29fb
leaq 0x178d(%rip), %rsi      # 0x4115
movq %r13, %rdi
callq 0x3516
movl %eax, %ebp
movq %r13, %rdi
callq 0x2080
movq %r12, %rdi
callq 0x2080
testb %bpl, %bpl
je 0x29b4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2fe3
jmp 0x29e2
leaq 0x169d(%rip), %rsi      # 0x4058
movq %r15, %rdi
callq 0x3523
testb %al, %al
je 0x29e2
movq 0x35fa(%rip), %rdi      # 0x5fc8
leaq 0x17d1(%rip), %rsi      # 0x41a6
callq 0x20e0
movq %rax, %rdi
callq 0x2090
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %edi, %edi
callq 0x2100
// File: /workspace/github_cpp_makefile_star2_O2/t0mm4rx[P]piscine_cpp/day00/ex01/commands.cpp
// Function: to_upper(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string to_upper(std::string str)
{
	int str_len = str.length();

	for (int i = 0; i < str_len; i++)
		str[i] = std::toupper(str[i]);
	return str;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x8(%rsi), %r15d
xorl %r12d, %r12d
testl %r15d, %r15d
cmovlel %r12d, %r15d
cmpq %r12, %r15
je 0x2a35
movq (%r14), %r13
movsbl (%r13,%r12), %edi
callq 0x21d0
movb %al, (%r13,%r12)
incq %r12
jmp 0x2a18
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2130
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/t0mm4rx[P]piscine_cpp/day00/ex01/commands.cpp
// Function: search(Contact*, int*)
void search(Contact contacts[8], int *index)
{
	std::string	buffer;
	int					detail;

	print_contacts(contacts, index);
	if (*index == 0)
		return;
	std::cin.ignore();
	std::cout << "Enter the index of the contact: ";
	std::getline(std::cin, buffer);
	try {
		detail = std::stoi(buffer);
		if (detail >= 0 && detail < *index)
		{
			contacts[detail].print();
			std::cout << std::endl;
		}
		else
			std::cout << "No contact with this id!" << std::endl << std::endl;
	}
	catch (std::invalid_argument)
	{
		std::cout << "Invalid index!" << std::endl << std::endl;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
callq 0x3133
cmpl $0x0, (%r14)
je 0x3099
movq 0x2fc7(%rip), %rdi      # 0x5fe0
callq 0x21c0
movq 0x2fa3(%rip), %r15      # 0x5fc8
leaq 0x118f(%rip), %rsi      # 0x41bb
movq %r15, %rdi
callq 0x20e0
movq 0x2fa5(%rip), %rdi      # 0x5fe0
leaq 0x10(%rsp), %rsi
callq 0x2040
leaq 0x10(%rsp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x352d
testl %eax, %eax
js 0x3073
cmpl (%r14), %eax
jge 0x3073
movl %eax, %eax
imulq $0x160, %rax, %rax      # imm = 0x160
addq %rax, %rbx
movq %rbx, %rdi
callq 0x386e
jmp 0x3091
movq 0x2f4e(%rip), %rdi      # 0x5fc8
leaq 0x115b(%rip), %rsi      # 0x41dc
callq 0x20e0
movq %rax, %rdi
callq 0x2090
movq %rax, %r15
movq %r15, %rdi
callq 0x2090
leaq 0x10(%rsp), %rdi
callq 0x2080
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x3121
movq %rbx, %rdi
callq 0x2110
movq %rsp, %rdi
movq %rax, %rsi
callq 0x354a
movq %rbx, %rdi
callq 0x2070
movq 0x2ef1(%rip), %rdi      # 0x5fc8
leaq 0x1117(%rip), %rsi      # 0x41f5
callq 0x20e0
movq %rax, %rdi
callq 0x2090
movq %rax, %rdi
callq 0x2090
movq %rsp, %rdi
callq 0x2180
callq 0x2170
jmp 0x3099
jmp 0x311e
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2180
callq 0x2170
jmp 0x3121
movq %rax, %rdi
callq 0x3563
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x21b0
// File: /workspace/github_cpp_makefile_star2_O2/dustin[P]kvtest/sqlite3-test.cc
// Function: main
int main(int argc, char **args) {
    const char *env_path = getenv("SQLITE_TEST_DB");
    Sqlite3 sq(env_path ? env_path : "/tmp/test.db",
               getenv("KVSTORE_AUDITABLE"));
    TestSuite suite(&sq);
    return suite.run() ? 0 : 1;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
leaq 0x495a(%rip), %rdi      # 0x8004
callq 0x32f0
testq %rax, %rax
leaq 0x495a(%rip), %rbx      # 0x8013
cmovneq %rax, %rbx
leaq 0x495c(%rip), %rdi      # 0x8020
callq 0x32f0
xorl %edx, %edx
testq %rax, %rax
setne %dl
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3738
movq %rsp, %rdi
movq %r14, %rsi
callq 0x53c0
movq %rsp, %rdi
callq 0x54fc
xorb $0x1, %al
movzbl %al, %ebx
movq %rsp, %rdi
callq 0x54b0
leaq 0x20(%rsp), %rdi
callq 0x3f38
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x54b0
jmp 0x3725
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3f38
movq %rbx, %rdi
callq 0x3420
nop
// File: /workspace/github_cpp_makefile_star2_O2/dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::PreparedStatement::PreparedStatement(sqlite3*, char const*)
PreparedStatement::PreparedStatement(sqlite3 *d, const char *query) {
        db = d;
        if(sqlite3_prepare_v2(db, query, (int)strlen(query), &st, NULL)
           != SQLITE_OK) {
            throw std::runtime_error(sqlite3_errmsg(db));
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, (%rdi)
movq %rdx, %rdi
callq 0x30c0
leaq 0x8(%rbx), %rcx
movq %r15, %rdi
movq %r14, %rsi
movl %eax, %edx
xorl %r8d, %r8d
callq 0x3260
testl %eax, %eax
jne 0x37a7
popq %rbx
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x30f0
movq %rax, %r14
movq (%rbx), %rdi
callq 0x3270
movq %r14, %rdi
movq %rax, %rsi
callq 0x30a0
movq 0x9824(%rip), %rsi      # 0xcff0
movq 0x97e5(%rip), %rdx      # 0xcfb8
movq %r14, %rdi
callq 0x33f0
movq %rax, %rbx
movq %r14, %rdi
callq 0x31a0
movq %rbx, %rdi
callq 0x3420
// File: /workspace/github_cpp_makefile_star2_O2/dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::PreparedStatement::execute()
int PreparedStatement::execute() {
        int steps_run = 0, rc = 0;
        while ((rc = sqlite3_step(st)) != SQLITE_DONE) {
            steps_run++;
            assert(steps_run < MAX_STEPS);
            if (rc == SQLITE_ROW) {
                // This is rather normal
            } else if (rc == SQLITE_BUSY) {
                std::cerr << "SQLITE_BUSY (retrying)" << std::endl;
            } else {
                const char *msg = sqlite3_errmsg(db);
                std::cerr << "sqlite error:  " << msg << std::endl;
                assert(false);
            }
        }
        return sqlite3_changes(db);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x270f, %ebp           # imm = 0x270F
movq 0x97a4(%rip), %r14      # 0xcfe8
leaq 0x4835(%rip), %r15      # 0x8080
movq 0x8(%rbx), %rdi
callq 0x3330
cmpl $0x65, %eax
je 0x387f
subl $0x1, %ebp
jb 0x3891
cmpl $0x5, %eax
je 0x386a
cmpl $0x64, %eax
je 0x384b
jmp 0x38aa
movq %r14, %rdi
movq %r15, %rsi
callq 0x3280
movq %rax, %rdi
callq 0x30e0
jmp 0x384b
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x32b0
leaq 0x479a(%rip), %rdi      # 0x8032
leaq 0x47a9(%rip), %rsi      # 0x8048
leaq 0x47b1(%rip), %rcx      # 0x8057
pushq $0x1d
jmp 0x38f2
movq (%rbx), %rdi
callq 0x3270
movq %rax, %rbx
movq 0x972c(%rip), %rdi      # 0xcfe8
leaq 0x47d4(%rip), %rsi      # 0x8097
callq 0x3280
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3280
movq %rax, %rdi
callq 0x30e0
leaq 0x47c5(%rip), %rdi      # 0x80a7
leaq 0x475f(%rip), %rsi      # 0x8048
leaq 0x4767(%rip), %rcx      # 0x8057
pushq $0x25
popq %rdx
callq 0x3140
// File: /workspace/github_cpp_makefile_star2_O2/dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::PreparedStatement::fetch()
bool PreparedStatement::fetch() {
        bool rv = true;
        assert(st);
        switch(sqlite3_step(st)) {
        case SQLITE_BUSY:
            throw std::runtime_error("DB was busy.");
            break;
        case SQLITE_ROW:
            break;
        case SQLITE_DONE:
            rv = false;
            break;
        default:
            throw std::runtime_error("Unhandled case.");
        }
        return rv;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x3922
callq 0x3330
movb $0x1, %cl
cmpl $0x64, %eax
je 0x3918
cmpl $0x65, %eax
jne 0x393f
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x4d58(%rip), %rdi      # 0x8681
leaq 0x4718(%rip), %rsi      # 0x8048
leaq 0x4776(%rip), %rcx      # 0x80ad
pushq $0x2d
popq %rdx
callq 0x3140
pushq $0x10
popq %rdi
cmpl $0x5, %eax
jne 0x3960
callq 0x30f0
movq %rax, %rbx
leaq 0x477f(%rip), %rsi      # 0x80d5
movq %rax, %rdi
callq 0x30a0
jmp 0x3977
callq 0x30f0
movq %rax, %rbx
leaq 0x4773(%rip), %rsi      # 0x80e2
movq %rax, %rdi
callq 0x30a0
movq 0x9672(%rip), %rsi      # 0xcff0
movq 0x9633(%rip), %rdx      # 0xcfb8
movq %rbx, %rdi
callq 0x33f0
jmp 0x398f
movq %rax, %r14
movq %rbx, %rdi
callq 0x31a0
movq %r14, %rdi
callq 0x3420
// File: /workspace/github_cpp_makefile_star2_O2/dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::BaseSqlite3::open()
void BaseSqlite3::open() {
        if(!db) {
            if(sqlite3_open(filename, &db) !=  SQLITE_OK) {
                throw std::runtime_error("Error initializing sqlite3");
            }

            if(sqlite3_extended_result_codes(db, 1) != SQLITE_OK) {
                throw std::runtime_error("Error enabling extended RCs");
            }

            intransaction = false;
            initTables();
            initStatements();
        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x8(%rdi)
je 0x3a33
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq 0x10(%rdi), %rdi
movq %r14, %rsi
callq 0x3410
testl %eax, %eax
jne 0x3a76
movq (%r14), %rdi
pushq $0x1
popq %rsi
callq 0x3160
testl %eax, %eax
jne 0x3a92
movb $0x0, 0x18(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x68(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x58(%rax)
pushq $0x10
popq %rdi
callq 0x30f0
movq %rax, %rbx
leaq 0x4685(%rip), %rsi      # 0x810d
movq %rax, %rdi
callq 0x30a0
jmp 0x3aac
pushq $0x10
popq %rdi
callq 0x30f0
movq %rax, %rbx
leaq 0x4684(%rip), %rsi      # 0x8128
movq %rax, %rdi
callq 0x30a0
movq 0x953d(%rip), %rsi      # 0xcff0
movq 0x94fe(%rip), %rdx      # 0xcfb8
movq %rbx, %rdi
callq 0x33f0
jmp 0x3ac4
movq %rax, %r14
movq %rbx, %rdi
callq 0x31a0
movq %r14, %rdi
callq 0x3420
nop
// File: /workspace/github_cpp_makefile_star2_O2/dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::BaseSqlite3::close()
void BaseSqlite3::close() {
        if(db) {
            intransaction = false;
            destroyStatements();
            sqlite3_close(db);
            db = NULL;
        }
    }

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x3afc
pushq %rbx
movq %rdi, %rbx
movb $0x0, 0x18(%rdi)
movq (%rdi), %rax
callq *0x60(%rax)
movq 0x8(%rbx), %rdi
callq 0x3100
andq $0x0, 0x8(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::BaseSqlite3::reset()
void BaseSqlite3::reset() {
        if(db) {
            rollback();
            close();
            open();
            destroyTables();
            initTables();
            execute("vacuum");
        }
    }

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x3b43
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x50(%rax)
movq %rbx, %rdi
callq 0x3ad8
movq %rbx, %rdi
callq 0x3a20
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x70(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x68(%rax)
leaq 0x460a(%rip), %rsi      # 0x8144
movq %rbx, %rdi
popq %rbx
jmp 0x3b44
retq
// File: /workspace/github_cpp_makefile_star2_O2/dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::Sqlite3::destroyStatements()
void Sqlite3::destroyStatements() {
        delete ins_stmt;
        delete sel_stmt;
        delete del_stmt;
        ins_stmt = sel_stmt = del_stmt = NULL;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %r14
testq %r14, %r14
je 0x3c79
movq %r14, %rdi
callq 0x37ee
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x32a0
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0x3c95
movq %r14, %rdi
callq 0x37ee
leaq 0x20(%rbx), %r15
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x32a0
movq 0x30(%rbx), %rbx
testq %rbx, %rbx
je 0x3cb5
movq %rbx, %rdi
callq 0x37ee
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x32a0
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
andq $0x0, 0x10(%r15)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::Sqlite3::destroyTables()
void Sqlite3::destroyTables() {
        execute("drop table if exists kv");
        execute("drop table if exists history");
        execute("drop trigger if exists on_audit_insert");
        execute("drop trigger if exists on_audit_delete");
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x46ae(%rip), %rsi      # 0x83d1
callq 0x3b44
leaq 0x46ba(%rip), %rsi      # 0x83e9
movq %rbx, %rdi
callq 0x3b44
leaq 0x46c8(%rip), %rsi      # 0x8406
movq %rbx, %rdi
callq 0x3b44
leaq 0x46e0(%rip), %rsi      # 0x842d
movq %rbx, %rdi
popq %rbx
jmp 0x3b44
// File: /workspace/github_cpp_makefile_star2_O2/dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::Sqlite3::set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char const*, kvtest::Callback<bool>&)
void Sqlite3::set(std::string &key, const char *val,
                      kvtest::Callback<bool> &cb) {
        ins_stmt->bind(1, key.c_str());
        ins_stmt->bind(2, val);
        bool rv = ins_stmt->execute() == 1;
        cb.callback(rv);
        ins_stmt->reset();
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movq (%rsi), %rdx
pushq $0x1
popq %rsi
callq 0x3802
movq 0x20(%rbx), %rdi
pushq $0x2
popq %rsi
movq %r15, %rdx
callq 0x3802
movq 0x20(%rbx), %rdi
callq 0x382e
cmpl $0x1, %eax
leaq 0xf(%rsp), %rsi
sete (%rsi)
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq 0x20(%rbx), %rdi
callq 0x39ac
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::Sqlite3::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, kvtest::Callback<kvtest::GetValue>&)
void Sqlite3::get(std::string &key, kvtest::Callback<kvtest::GetValue> &cb) {
        sel_stmt->bind(1, key.c_str());

        if(sel_stmt->fetch()) {
            std::string str(sel_stmt->column(0));
            kvtest::GetValue rv(str, true);
            cb.callback(rv);
        } else {
            std::string str(":(");
            kvtest::GetValue rv(str, false);
            cb.callback(rv);
        }
        sel_stmt->reset();
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
movq (%rsi), %rdx
pushq $0x1
popq %rsi
callq 0x3802
movq 0x28(%rbx), %rdi
callq 0x38f8
testb %al, %al
je 0x3e40
movq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0x39a2
leaq 0x28(%rsp), %rdi
movq %rsp, %rdx
movq %rax, %rsi
callq 0x3f5e
leaq 0x68(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x3320
movq %rsp, %rdi
leaq 0x68(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x3f9a
leaq 0x68(%rsp), %rdi
callq 0x30d0
movq (%r14), %rax
movq %rsp, %rsi
movq %r14, %rdi
callq *0x10(%rax)
jmp 0x3e88
leaq 0x460d(%rip), %rsi      # 0x8454
leaq 0x28(%rsp), %rdi
movq %rsp, %rdx
callq 0x3f5e
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x3320
movq %rsp, %rdi
leaq 0x48(%rsp), %rsi
xorl %edx, %edx
callq 0x3f9a
leaq 0x48(%rsp), %rdi
callq 0x30d0
movq (%r14), %rax
movq %rsp, %rsi
movq %r14, %rdi
callq *0x10(%rax)
movq %rsp, %rdi
callq 0x30d0
leaq 0x28(%rsp), %rdi
callq 0x30d0
movq 0x28(%rbx), %rdi
callq 0x39ac
addq $0x88, %rsp
popq %rbx
popq %r14
retq
jmp 0x3eb0
movq %rax, %rbx
movq %rsp, %rdi
jmp 0x3eca
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x3eca
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x30d0
jmp 0x3ed6
jmp 0x3ed3
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x30d0
jmp 0x3ee7
jmp 0x3ee4
movq %rax, %rbx
movq %rbx, %rdi
callq 0x3420
nop
// File: /workspace/github_cpp_makefile_star2_O2/dustin[P]kvtest/sqlite-base.cc
// Function: kvtest::Sqlite3::del(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, kvtest::Callback<bool>&)
void Sqlite3::del(std::string &key, kvtest::Callback<bool> &cb) {
        del_stmt->bind(1, key.c_str());
        bool rv = del_stmt->execute() == 1;
        cb.callback(rv);
        del_stmt->reset();
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq 0x30(%rdi), %rdi
movq (%rsi), %rdx
pushq $0x1
popq %rsi
callq 0x3802
movq 0x30(%r14), %rdi
callq 0x382e
cmpl $0x1, %eax
leaq 0x7(%rsp), %rsi
sete (%rsi)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0x30(%r14), %rdi
callq 0x39ac
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ghallak[P]regex-to-dfa/src/RegexTree.cpp
// Function: RegexTree::CalcFollowPos(RegexTree::Node*)
void RegexTree::CalcFollowPos(RegexTree::Node* n) {
  if (auto node = dynamic_cast<RegexTree::UnionNode*>(n)) {
    CalcFollowPos(node->left.get());
    CalcFollowPos(node->right.get());
  } else if (auto node = dynamic_cast<RegexTree::ConcatNode*>(n)) {
    for (auto i : node->left->lastpos) {
      leaves[i]->followpos.insert(node->right->firstpos.cbegin(),
                                  node->right->firstpos.cend());
    }
    CalcFollowPos(node->left.get());
    CalcFollowPos(node->right.get());
  } else if (auto node = dynamic_cast<RegexTree::StarNode*>(n)) {
    for (auto i : node->lastpos) {
      leaves[i]->followpos.insert(node->firstpos.cbegin(),
                                  node->firstpos.cend());
    }
    CalcFollowPos(node->child.get());
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x51c5(%rip), %r15      # 0x9cb0
testq %r12, %r12
je 0x4bf2
movq %r12, %rdi
leaq 0x518a(%rip), %r14      # 0x9c88
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x2130
testq %rax, %rax
je 0x4b2e
movq %rax, %r13
movq 0x80(%rax), %rsi
movq %rbx, %rdi
callq 0x4ad0
addq $0x88, %r13
jmp 0x4be9
movq %r12, %rdi
movq %r14, %rsi
leaq 0x515d(%rip), %rdx      # 0x9c98
xorl %ecx, %ecx
callq 0x2130
testq %rax, %rax
je 0x4b9a
movq %rax, %r15
movq 0x80(%rax), %r12
addq $0x50, %r12
movq %rax, %r13
addq $0x88, %r13
movq (%r12), %r12
testq %r12, %r12
je 0x4b89
movq 0x8(%r12), %rax
movq (%rbx), %rcx
movq (%rcx,%rax,8), %rdi
subq $-0x80, %rdi
movq (%r13), %rax
movq 0x18(%rax), %rsi
xorl %edx, %edx
callq 0x369c
jmp 0x4b5f
movq 0x80(%r15), %rsi
movq %rbx, %rdi
callq 0x4ad0
jmp 0x4be2
movq %r12, %rdi
movq %r14, %rsi
leaq 0x5121(%rip), %rdx      # 0x9cc8
xorl %ecx, %ecx
callq 0x2130
testq %rax, %rax
je 0x4bf2
movq %rax, %r13
leaq 0x50(%rax), %r15
movq (%r15), %r15
testq %r15, %r15
je 0x4bde
movq 0x8(%r15), %rax
movq (%rbx), %rcx
movq (%rcx,%rax,8), %rdi
subq $-0x80, %rdi
movq 0x18(%r13), %rsi
xorl %edx, %edx
callq 0x369c
jmp 0x4bba
subq $-0x80, %r13
leaq 0x50c7(%rip), %r15      # 0x9cb0
movq (%r13), %r12
jmp 0x4aeb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop