LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/luisremis[P]SDFS/connections.cpp
// Function: splitWrite(int, char*, unsigned long)
size_t splitWrite( int connFd, char * data, size_t size ){
    
    int msg_num = size / BUFFER_MAX + 1;
    int rest = size % ((int)BUFFER_MAX);
    
    //store the should-be message sizes
    message *msgs = new message[msg_num];
    for(int i=1; i < msg_num; i++){
        msgs[i].begin = msgs[i-1].begin + BUFFER_MAX;
    }
    msgs[msg_num-1].length = rest;

    char writeSuccess = 0;
    for(int i=0; i < msg_num; i++){
        //write each message, max size is BUFFER_MAX
        robustWrite( connFd, data + msgs[i].begin, msgs[i].length );
        
        //cout<<"Server: sent " << msgs[i].length << endl;
        //usleep(200*1000);
        
        //make sure client do got the data
        robustRead( connFd, &writeSuccess, 1 );
        
        //cout<<"Server: recv "<<(int)writeSuccess<<endl;
        //usleep(200*1000);

        //if package failed, send again
        if(writeSuccess==0) i--;
    }
    return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, -0x40(%rbp)
movl %edi, %r15d
movq %rdx, %rbx
shrq $0x17, %rbx
leal 0x1(%rbx), %r14d
movq %rdx, -0x38(%rbp)
movl %edx, -0x30(%rbp)
movslq %r14d, %r13
leaq (,%r13,8), %rax
testl %r13d, %r13d
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x4030
movq %rax, %r12
movl %ebx, %eax
incl %eax
je 0xe02a
leaq (%r12,%r13,8), %rax
movabsq $0x80000000000000, %rcx # imm = 0x80000000000000
movq %r12, %rdx
movq %rcx, (%rdx)
addq $0x8, %rdx
cmpq %rax, %rdx
jne 0xe01e
movl -0x30(%rbp), %esi
andl $0x7fffff, %esi         # imm = 0x7FFFFF
pushq $0x1
popq %rax
movl $0x800000, %ecx         # imm = 0x800000
cmpq %r13, %rax
jge 0xe050
movl -0x8(%r12,%rax,8), %edx
addl %ecx, %edx
movl %edx, (%r12,%rax,8)
incq %rax
jmp 0xe03b
movslq %ebx, %rax
movl %esi, 0x4(%r12,%rax,8)
leaq -0x29(%rbp), %rax
movb $0x0, (%rax)
xorl %r13d, %r13d
pushq $0x1
popq %rbx
cmpl %r14d, %r13d
jge 0xe09d
movslq %r13d, %rax
movslq (%r12,%rax,8), %rsi
addq -0x40(%rbp), %rsi
movl 0x4(%r12,%rax,8), %edx
movl %r15d, %edi
callq 0xdf5c
movl %r15d, %edi
leaq -0x29(%rbp), %rsi
movl %ebx, %edx
callq 0xdf03
cmpb $0x1, -0x29(%rbp)
sbbl $0x0, %r13d
incl %r13d
jmp 0xe065
movq -0x38(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/luisremis[P]SDFS/connections.cpp
// Function: splitRead(int, char*, unsigned long)
size_t splitRead( int connFd, char * data, size_t size ){
    
    int msg_num = size / BUFFER_MAX + 1;
    int rest = size % ((int)BUFFER_MAX);
    
    //store the should-be message sizes
    message *msgs = new message[msg_num];
    for(int i=1; i < msg_num; i++){
        msgs[i].begin = msgs[i-1].begin + BUFFER_MAX;
    }
    msgs[msg_num-1].length = rest;

    char readSuccess = 0;
    int readSize;

    for(int i=0; i < msg_num; i++){

        //read message from socket. max size BUFFER_MAX
        readSize = robustRead( connFd, data + msgs[i].begin, msgs[i].length );
        
        //cout<<"client recv size :" << readSize << endl;
        //usleep(200*1000);

        //check if reading success or not
        if(readSize == msgs[i].length)  readSuccess = 1;
        else    readSuccess = 0;

        //tell server the data transmission status (good or fail)
        robustWrite( connFd, &readSuccess, 1);
        
        //cout<<"Client: sent "<<endl;
        //usleep(200*1000);
        
        //if reading faile, read again
        if(readSuccess==0) i--;
    }
    return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, -0x40(%rbp)
movl %edi, %r15d
movq %rdx, %r14
shrq $0x17, %r14
leal 0x1(%r14), %eax
movq %rdx, -0x38(%rbp)
movl %edx, %r13d
movl %eax, -0x30(%rbp)
movslq %eax, %rbx
leaq (,%rbx,8), %rax
testl %ebx, %ebx
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x4030
movq %rax, %r12
movl %r14d, %eax
incl %eax
je 0xe11d
leaq (%r12,%rbx,8), %rax
movabsq $0x80000000000000, %rcx # imm = 0x80000000000000
movq %r12, %rdx
movq %rcx, (%rdx)
addq $0x8, %rdx
cmpq %rax, %rdx
jne 0xe111
andl $0x7fffff, %r13d        # imm = 0x7FFFFF
pushq $0x1
popq %rax
movl $0x800000, %ecx         # imm = 0x800000
cmpq %rbx, %rax
jge 0xe141
movl -0x8(%r12,%rax,8), %edx
addl %ecx, %edx
movl %edx, (%r12,%rax,8)
incq %rax
jmp 0xe12c
movslq %r14d, %rax
movl %r13d, 0x4(%r12,%rax,8)
xorl %ebx, %ebx
cmpl -0x30(%rbp), %ebx
jge 0xe191
movslq %ebx, %r14
movslq (%r12,%r14,8), %rsi
addq -0x40(%rbp), %rsi
movl 0x4(%r12,%r14,8), %edx
movl %r15d, %edi
callq 0xdf03
xorl %r13d, %r13d
cmpl 0x4(%r12,%r14,8), %eax
setne %r13b
sete -0x29(%rbp)
movl %r15d, %edi
leaq -0x29(%rbp), %rsi
pushq $0x1
popq %rdx
callq 0xdf5c
negl %r13d
addl %r13d, %ebx
incl %ebx
jmp 0xe14b
movq -0x38(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/luisremis[P]SDFS/ChronoCpu.cpp
// Function: ChronoCpu::doTic()
void ChronoCpu::doTic(void)
{
	lastTicTime = ticTime;

#ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
	clock_serv_t cclock;
	mach_timespec_t mts;
	host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
	clock_get_time(cclock, &mts);
	mach_port_deallocate(mach_task_self(), cclock);
	ticTime.tv_sec = mts.tv_sec;
	ticTime.tv_nsec = mts.tv_nsec;

#else
	if (clock_gettime(CLOCK_REALTIME, &ticTime) != 0){
		++errors;
		cerr << "ChronoCpu::doTic - " << name << ": clock_gettime() failed!" << endl;
		return;
	}
#endif

	++ticCounter;

	if (ticCounter > 1){
		float period_s = (float)(ticTime.tv_sec - lastTicTime.tv_sec);
		float period_ns = (float)(ticTime.tv_nsec - lastTicTime.tv_nsec);
		periodStats.lastTime_ms = period_s * 1e3f + period_ns / 1e6f;
		updateStats(periodStats);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xc0(%rdi), %rsi
movups 0xc0(%rdi), %xmm0
movups %xmm0, 0xb0(%rdi)
xorl %edi, %edi
callq 0x4320
testl %eax, %eax
je 0xe275
incl 0x2c(%rbx)
movq 0x7db3(%rip), %rdi      # 0x15ff0
leaq 0x1bfc(%rip), %rsi      # 0xfe40
callq 0x4370
addq $0x8, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4300
leaq 0x1bf5(%rip), %rsi      # 0xfe54
movq %rax, %rdi
callq 0x4370
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x41d0
movl 0xe0(%rbx), %eax
incl %eax
movl %eax, 0xe0(%rbx)
cmpl $0x2, %eax
jb 0xe2dc
movq 0xc0(%rbx), %rax
subq 0xb0(%rbx), %rax
cvtsi2ss %rax, %xmm0
movq 0xc8(%rbx), %rax
subq 0xb8(%rbx), %rax
cvtsi2ss %rax, %xmm1
divss 0x1b82(%rip), %xmm1     # 0xfe38
mulss 0x1b7e(%rip), %xmm0     # 0xfe3c
addss %xmm1, %xmm0
leaq 0x70(%rbx), %rsi
movss %xmm0, 0xa4(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xe914
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/luisremis[P]SDFS/ChronoCpu.cpp
// Function: ChronoCpu::doTac()
void ChronoCpu::doTac(void)
{
#ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
	clock_serv_t cclock;
	mach_timespec_t mts;
	host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
	clock_get_time(cclock, &mts);
	mach_port_deallocate(mach_task_self(), cclock);
	tacTime.tv_sec = mts.tv_sec;
	tacTime.tv_nsec = mts.tv_nsec;

#else
	if (clock_gettime(CLOCK_REALTIME, &tacTime) != 0){
		++errors;
		cerr << "ChronoCpu::doTac - " << name << ": clock_gettime() failed!" << endl;
		return;
	}
#endif

	float elapsed_s = (float)(tacTime.tv_sec - ticTime.tv_sec);
	float elapsed_ns = (float)(tacTime.tv_nsec - ticTime.tv_nsec);
	elapsedStats.lastTime_ms = elapsed_s * 1e3f + elapsed_ns / 1e6f;
	updateStats(elapsedStats);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xd0(%rdi), %rsi
xorl %edi, %edi
callq 0x4320
testl %eax, %eax
je 0xe341
incl 0x2c(%rbx)
movq 0x7ce7(%rip), %rdi      # 0x15ff0
leaq 0x1b5e(%rip), %rsi      # 0xfe6e
callq 0x4370
addq $0x8, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4300
leaq 0x1b29(%rip), %rsi      # 0xfe54
movq %rax, %rdi
callq 0x4370
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x41d0
movq 0xd0(%rbx), %rax
subq 0xc0(%rbx), %rax
cvtsi2ss %rax, %xmm0
movq 0xd8(%rbx), %rax
subq 0xc8(%rbx), %rax
cvtsi2ss %rax, %xmm1
divss 0x1ac9(%rip), %xmm1     # 0xfe38
mulss 0x1ac5(%rip), %xmm0     # 0xfe3c
addss %xmm1, %xmm0
leaq 0x30(%rbx), %rsi
movss %xmm0, 0x64(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xe914
nop
// File: /workspace/github_cpp_makefile_star2_O2/luisremis[P]SDFS/Chrono.cpp
// Function: Chrono::tic()
void Chrono::tic(void)
{
	if (!enabled){
		return;
	}

	if (ticIdle){
		ticIdle = false;
		doTic();
	} else{
		++errors;
		cerr << "Chrono::tic - " << name << ": Calling Chrono::tic with no matching Chrono::tag!" << endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpb $0x1, 0x28(%rdi)
jne 0xe4ee
movq %rdi, %rbx
cmpb $0x1, 0x29(%rdi)
jne 0xe4f5
movb $0x0, 0x29(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
incl 0x2c(%rbx)
movq 0x7af1(%rip), %rdi      # 0x15ff0
leaq 0x19a7(%rip), %rsi      # 0xfead
callq 0x4370
addq $0x8, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4300
leaq 0x199b(%rip), %rsi      # 0xfebc
movq %rax, %rdi
callq 0x4370
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x41d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/luisremis[P]SDFS/Chrono.cpp
// Function: Chrono::tac()
void Chrono::tac(void)
{
	if (!enabled){
		return;
	}

	if (!ticIdle){
		ticIdle = true;
		doTac();
	} else{
		++errors;
		cerr << "Chrono::tac - " << name << ": Calling Chrono::tac with no matching Chrono::tic!" << endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpb $0x1, 0x28(%rdi)
jne 0xe58f
movq %rdi, %rbx
cmpb $0x0, 0x29(%rdi)
je 0xe596
incl 0x2c(%rbx)
movq 0x7a99(%rip), %rdi      # 0x15ff0
leaq 0x1992(%rip), %rsi      # 0xfef0
callq 0x4370
addq $0x8, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4300
leaq 0x1986(%rip), %rsi      # 0xfeff
movq %rax, %rdi
callq 0x4370
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x41d0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movb $0x1, 0x29(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *0x18(%rax)
nop
// File: /workspace/github_cpp_makefile_star2_O2/luisremis[P]SDFS/Chrono.cpp
// Function: Chrono::printStats(Chrono::ChronoStats const&, std::ostream&) const
std::ostream& Chrono::printStats(const Chrono::ChronoStats& stats, std::ostream& os) const
{
	os.precision(2);
	os << fixed;
	os << name << ": " << stats.name << endl;
	os << "\terrors: " 		<< errors << endl;
	os << "\ttotalTime: "   << stats.totalTime_ms   << " [ms]" << endl;
	os << "\taverageTime: " << stats.averageTime_ms << " [ms]" << endl;
	os << "\tstdDevTime: "  << stats.stdDevTime_ms  << " [ms]" << endl;
	os << "\tlastTime: "    << stats.lastTime_ms    << " [ms]" << endl;
	os << "\tminTime: "     << stats.minTime_ms     << " [ms]" << endl;
	os << "\tmaxTime: "     << stats.maxTime_ms     << " [ms]" << endl;

	return os;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdx), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0x8(%rdx,%rcx)
movq -0x18(%rax), %rax
movl $0xfffffefb, %ecx       # imm = 0xFFFFFEFB
andl 0x18(%rdx,%rax), %ecx
movq %rdi, %r15
orl $0x4, %ecx
movl %ecx, 0x18(%rdx,%rax)
leaq 0x8(%rdi), %rsi
movq %rdx, %rdi
callq 0x4300
leaq 0xdf7(%rip), %rsi       # 0xf41b
movq %rax, %rdi
callq 0x4370
movq %rax, %rdi
movq %r14, %rsi
callq 0x4300
movq %rax, %rdi
callq 0x41d0
leaq 0x18ed(%rip), %rsi      # 0xff33
movq %rbx, %rdi
callq 0x4370
movl 0x2c(%r15), %esi
movq %rax, %rdi
callq 0x4250
movq %rax, %rdi
callq 0x41d0
leaq 0x18d4(%rip), %rsi      # 0xff3d
movq %rbx, %rdi
callq 0x4370
movss 0x24(%r14), %xmm0
movq %rax, %rdi
callq 0x4270
leaq 0x18c4(%rip), %r15      # 0xff4a
movq %rax, %rdi
movq %r15, %rsi
callq 0x4370
movq %rax, %rdi
callq 0x41d0
leaq 0x18b0(%rip), %rsi      # 0xff50
movq %rbx, %rdi
callq 0x4370
movss 0x2c(%r14), %xmm0
movq %rax, %rdi
callq 0x4270
movq %rax, %rdi
movq %r15, %rsi
callq 0x4370
movq %rax, %rdi
callq 0x41d0
leaq 0x188f(%rip), %rsi      # 0xff5f
movq %rbx, %rdi
callq 0x4370
movss 0x30(%r14), %xmm0
movq %rax, %rdi
callq 0x4270
movq %rax, %rdi
movq %r15, %rsi
callq 0x4370
movq %rax, %rdi
callq 0x41d0
leaq 0x186d(%rip), %rsi      # 0xff6d
movq %rbx, %rdi
callq 0x4370
movss 0x34(%r14), %xmm0
movq %rax, %rdi
callq 0x4270
movq %rax, %rdi
movq %r15, %rsi
callq 0x4370
movq %rax, %rdi
callq 0x41d0
leaq 0x1849(%rip), %rsi      # 0xff79
movq %rbx, %rdi
callq 0x4370
movss 0x38(%r14), %xmm0
movq %rax, %rdi
callq 0x4270
movq %rax, %rdi
movq %r15, %rsi
callq 0x4370
movq %rax, %rdi
callq 0x41d0
leaq 0x1824(%rip), %rsi      # 0xff84
movq %rbx, %rdi
callq 0x4370
movss 0x3c(%r14), %xmm0
movq %rax, %rdi
callq 0x4270
movq %rax, %rdi
movq %r15, %rsi
callq 0x4370
movq %rax, %rdi
callq 0x41d0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/luisremis[P]SDFS/Chrono.cpp
// Function: Chrono::printAvgTime(Chrono::ChronoStats const&, std::ostream&) const
std::ostream& Chrono::printAvgTime(const Chrono::ChronoStats& stats, std::ostream& os) const
{
	os.precision(2);
	os << fixed;
	os << name << ": " << stats.name << " -> " << "averageTime: " << stats.averageTime_ms << " [ms]" << endl;

	return os;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdx), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0x8(%rdx,%rcx)
movq -0x18(%rax), %rax
movl $0xfffffefb, %ecx       # imm = 0xFFFFFEFB
andl 0x18(%rdx,%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x18(%rdx,%rax)
leaq 0x8(%rdi), %rsi
movq %rdx, %rdi
callq 0x4300
leaq 0xc3f(%rip), %rsi       # 0xf41b
movq %rax, %rdi
callq 0x4370
movq %rax, %rdi
movq %r14, %rsi
callq 0x4300
leaq 0x1799(%rip), %rsi      # 0xff8f
movq %rax, %rdi
callq 0x4370
leaq 0x174c(%rip), %rsi      # 0xff51
movq %rax, %rdi
callq 0x4370
movss 0x2c(%r14), %xmm0
movq %rax, %rdi
callq 0x4270
leaq 0x1728(%rip), %rsi      # 0xff4a
movq %rax, %rdi
callq 0x4370
movq %rax, %rdi
callq 0x41d0
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/luisremis[P]SDFS/Chrono.cpp
// Function: Chrono::printAvgTime(Chrono::ChronoStats const&, std::ostream&, float) const
std::ostream& Chrono::printAvgTime(const Chrono::ChronoStats& stats, std::ostream& os, const float ref) const
{
	os.precision(2);
	os << fixed;
	os << name << ": " << stats.name << " -> " << "averageTime: " << stats.averageTime_ms << " [ms] (";
	os << (stats.averageTime_ms/ref*100.0f) << "%)" << endl;

	return os;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movss %xmm0, -0x14(%rbp)
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdx), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0x8(%rdx,%rcx)
movq -0x18(%rax), %rax
movl $0xfffffefb, %ecx       # imm = 0xFFFFFEFB
andl 0x18(%rdx,%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x18(%rdx,%rax)
leaq 0x8(%rdi), %rsi
movq %rdx, %rdi
callq 0x4300
leaq 0xb94(%rip), %rsi       # 0xf41b
movq %rax, %rdi
callq 0x4370
movq %rax, %rdi
movq %r14, %rsi
callq 0x4300
leaq 0x16ee(%rip), %rsi      # 0xff8f
movq %rax, %rdi
callq 0x4370
leaq 0x16a1(%rip), %rsi      # 0xff51
movq %rax, %rdi
callq 0x4370
movss 0x2c(%r14), %xmm0
movq %rax, %rdi
callq 0x4270
leaq 0x16c7(%rip), %rsi      # 0xff94
movq %rax, %rdi
callq 0x4370
movss 0x2c(%r14), %xmm0
divss -0x14(%rbp), %xmm0
mulss 0x15a8(%rip), %xmm0     # 0xfe90
movq %rbx, %rdi
callq 0x4270
leaq 0x16a5(%rip), %rsi      # 0xff9c
movq %rax, %rdi
callq 0x4370
movq %rax, %rdi
callq 0x41d0
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/luisremis[P]SDFS/Chrono.cpp
// Function: Chrono::updateStats(Chrono::ChronoStats&)
void Chrono::updateStats(ChronoStats& stats)
{
	++stats.counter;
	stats.totalTime_ms += stats.lastTime_ms;
	stats.totalSquaredTime_ms2 += stats.lastTime_ms * stats.lastTime_ms;
	stats.averageTime_ms = stats.totalTime_ms / (float)stats.counter;
	stats.stdDevTime_ms = sqrtf(stats.totalSquaredTime_ms2 / (float)stats.counter - stats.averageTime_ms * stats.averageTime_ms);
	if (stats.counter > 1){
		stats.maxTime_ms = max(stats.lastTime_ms, stats.maxTime_ms);
		stats.minTime_ms = min(stats.lastTime_ms, stats.minTime_ms);
	} else{
		stats.maxTime_ms = stats.lastTime_ms;
		stats.minTime_ms = stats.lastTime_ms;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl 0x20(%rsi), %eax
incl %eax
movl %eax, 0x20(%rsi)
movss 0x34(%rsi), %xmm0
movss 0x24(%rsi), %xmm1
addss %xmm0, %xmm1
movss %xmm1, 0x24(%rsi)
mulss %xmm0, %xmm0
addss 0x28(%rsi), %xmm0
movss %xmm0, 0x28(%rsi)
cvtsi2ss %rax, %xmm2
divss %xmm2, %xmm1
movss %xmm1, 0x2c(%rsi)
divss %xmm2, %xmm0
mulss %xmm1, %xmm1
subss %xmm1, %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0xe96e
sqrtss %xmm0, %xmm0
jmp 0xe973
callq 0x4600
movss %xmm0, 0x30(%rbx)
cmpl $0x2, 0x20(%rbx)
jb 0xe9a1
movss 0x3c(%rbx), %xmm0
movss 0x34(%rbx), %xmm1
movss 0x38(%rbx), %xmm2
maxss %xmm1, %xmm0
movss %xmm0, 0x3c(%rbx)
minss %xmm1, %xmm2
movss %xmm2, 0x38(%rbx)
jmp 0xe9b0
movss 0x34(%rbx), %xmm0
movss %xmm0, 0x3c(%rbx)
movss %xmm0, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/aaronpuchert[P]throttle/src/main.cpp
// Function: main
int main(int argc, char **argv)
{
	const char *config_fn, *pipe_fn;

	// Read arguments from command line, or take the defaults
	config_fn = (argc > 1) ? argv[1] : "throttle.conf";
	pipe_fn = (argc > 2) ? argv[2] : "pipe";

	// Block SIGINT, SIGQUIT, SIGTERM - we're going to wait for them explicitly.
	sigset_t signals;
	sigemptyset(&signals);
	sigaddset(&signals, SIGINT);
	sigaddset(&signals, SIGQUIT);
	sigaddset(&signals, SIGTERM);
	sigprocmask(SIG_BLOCK, &signals, nullptr);

	constexpr struct timespec wait_time{wait, 0};

	try {
		// create Throttle object
		Throttle throttle = Throttle::createFromConfig(config_fn, pipe_fn);

		// Run the feedback loop
		do
			throttle();
		while (sigtimedwait(&signals, nullptr, &wait_time) == -1);
	}
	catch (const std::runtime_error& ex) {
		std::cerr << "Error: " <<  ex.what() << std::endl;
		return 1;
	}

	DEBUG_PRINT("[Main] Successful shutdown");

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
leaq 0x1c6c(%rip), %rbx      # 0x413b
cmpl $0x2, %edi
jl 0x24e0
movq 0x8(%rsi), %r14
je 0x24e7
movq 0x10(%rsi), %rbx
jmp 0x24e7
leaq 0x1b1d(%rip), %r14      # 0x4004
leaq 0xa0(%rsp), %r15
movq %r15, %rdi
callq 0x2210
pushq $0x2
popq %rsi
movq %r15, %rdi
callq 0x2280
pushq $0x3
popq %rsi
movq %r15, %rdi
callq 0x2280
pushq $0xf
popq %rsi
movq %r15, %rdi
callq 0x2280
xorl %edi, %edi
movq %r15, %rsi
xorl %edx, %edx
callq 0x20e0
movups 0x1af5(%rip), %xmm0     # 0x4020
movaps %xmm0, (%rsp)
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2822
leaq 0x10(%rsp), %rbx
leaq 0xa0(%rsp), %r14
movq %rsp, %r15
movq %rbx, %rdi
callq 0x2a90
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x2120
cmpl $-0x1, %eax
je 0x254f
leaq 0x10(%rsp), %rdi
callq 0x2600
xorl %eax, %eax
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r14
popq %r15
retq
movq %rdx, %r14
movq %rax, %rbx
jmp 0x259a
movq %rdx, %r14
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2600
cmpl $0x1, %r14d
jne 0x25ef
movq %rbx, %rdi
callq 0x20a0
movq %rax, %rbx
movq 0x4a36(%rip), %rdi      # 0x6fe8
leaq 0x1a59(%rip), %rsi      # 0x4012
callq 0x21c0
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x21c0
movq %rax, %rdi
callq 0x20f0
callq 0x22e0
pushq $0x1
popq %rax
jmp 0x2575
movq %rax, %rbx
callq 0x22e0
movq %rbx, %rdi
callq 0x2330
movq %rax, %rdi
callq 0x2628
nop
// File: /workspace/github_cpp_makefile_star2_O2/aaronpuchert[P]throttle/src/throttle.cpp
// Function: Throttle::FreqFilenames::FreqFilenames(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int)
Throttle::FreqFilenames::FreqFilenames(
	const std::string &prefix, const std::string &suffix, unsigned numCores)
	: numCores(numCores), templates(log10(numCores) + 1), prefix_size(prefix.size())
{
	size_t suffix_size = suffix.size();
	for (unsigned i = 0; i != templates.size(); ++i) {
		templates[i].reserve(prefix_size + (i + 1) + suffix_size);
		templates[i] = prefix;
		templates[i].append(i + 1, '#');
		templates[i] += suffix;
		DEBUG_PRINT("[Throttle] Template for length " << i + 1 << ": " << templates[i]);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
movl %ecx, (%rdi)
leaq 0x8(%rdi), %rbx
movl %ecx, %edi
callq 0x27c3
leal 0x1(%rax), %esi
leaq 0x7(%rsp), %rdx
movq %rbx, %rdi
callq 0x2c3a
movq %r14, 0x8(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x20(%r12)
movq %r15, %r14
movq 0x8(%r15), %rax
movq %rax, 0x10(%rsp)
pushq $0x1
popq %r15
leal -0x1(%r15), %r13d
movq 0x8(%r12), %rdi
movq 0x10(%r12), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %r13, %rax
je 0x27a1
shlq $0x5, %r13
addq %r13, %rdi
movl %r15d, %ebp
movq 0x10(%rsp), %rax
leaq (%rax,%rbp), %rsi
addq 0x20(%r12), %rsi
callq 0x22a0
movq (%rbx), %rdi
addq %r13, %rdi
movq 0x8(%rsp), %rsi
callq 0x2130
movq (%rbx), %rdi
addq %r13, %rdi
movq %rbp, %rsi
pushq $0x23
popq %rdx
callq 0x21f0
addq (%rbx), %r13
incl %r15d
movq %r13, %rdi
movq %r14, %rsi
callq 0x2370
jmp 0x2736
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2668
movq %r14, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/aaronpuchert[P]throttle/src/throttle.cpp
// Function: log10(unsigned int)
static unsigned log10(unsigned x)
{
	// Not the fastest implementation, but we don't expect very large numbers.
	unsigned log = 0;
	while ((x /= 10) != 0)
		++log;
	return log;
}

// Assembly:
movl %edi, %eax
xorl %ecx, %ecx
pushq $0xa
popq %rsi
cmpl $0xa, %eax
jb 0x27d7
xorl %edx, %edx
divl %esi
incl %ecx
jmp 0x27ca
movl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/aaronpuchert[P]throttle/src/throttle.cpp
// Function: Throttle::FreqFilenames::operator[](unsigned int) const
const char *Throttle::FreqFilenames::operator[](unsigned core) const
{
	unsigned bucket = log10(core);
	std::string &ret = templates[bucket];
	unsigned print = core;
	do {
		ret[prefix_size + bucket] = '0' + char(print % 10);
		print /= 10;
	} while (bucket--);
	DEBUG_PRINT("[Throttle] Filename for core " << core << ": " << ret);
	return ret.c_str();
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, %edi
callq 0x27c3
movl %eax, %ecx
movq %rcx, %rsi
shlq $0x5, %rsi
addq 0x8(%rbx), %rsi
incq %rcx
pushq $0xa
popq %rdi
movl %ebp, %eax
xorl %edx, %edx
divl %edi
movq (%rsi), %r8
addq 0x20(%rbx), %r8
orb $0x30, %dl
movb %dl, -0x1(%rcx,%r8)
movl %eax, %ebp
decq %rcx
jne 0x27fc
movq (%rsi), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/aaronpuchert[P]throttle/src/throttle.cpp
// Function: Throttle::createFromConfig(char const*, char const*)
Throttle Throttle::createFromConfig(const char *config_fn, const char* pipe_fn)
{
	// open the configuration file
	Conf conf(config_fn);

	// read all variables
	std::string temp_fn = conf.GetAttr("temp_file");
	std::vector<int> freqs = conf.ParseAttr<std::vector<int>>("freq_list");
	std::sort(freqs.begin(), freqs.end());

	Throttle ret(std::move(temp_fn),
	             FreqFilenames(conf.GetAttr("freq_set_prefix"),
	                           conf.GetAttr("freq_set_suffix"),
	                           conf.ParseAttr<unsigned>("cores")),
	             std::move(freqs), pipe_fn, conf.ParseAttr<int>("wait"));
	ret.setMinTemp(conf.ParseAttr<int>("temp_min"));
	ret.setMaxTemp(conf.ParseAttr<int>("temp_max"));
	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq %rsp, %r15
movq %r15, %rdi
callq 0x3548
leaq 0x17eb(%rip), %rsi      # 0x4030
movq %r15, %rdi
callq 0x376a
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x2240
leaq 0x17d9(%rip), %rdx      # 0x403a
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x2c8c
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x3029
leaq 0x17c0(%rip), %rsi      # 0x4044
movq %rsp, %rdi
callq 0x376a
movq %rax, %r15
leaq 0x17be(%rip), %rsi      # 0x4054
movq %rsp, %rdi
callq 0x376a
movq %rax, %r12
leaq 0x17bc(%rip), %rsi      # 0x4064
movq %rsp, %rdi
callq 0x2cac
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
movl %eax, %ecx
callq 0x26e4
leaq 0x17a1(%rip), %rsi      # 0x406a
movq %rsp, %rdi
callq 0x2cbc
leaq 0x30(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %r8
movl %eax, %r9d
callq 0x29a2
leaq 0x58(%rsp), %rdi
callq 0x2668
leaq 0x1770(%rip), %rsi      # 0x406f
movq %rsp, %rdi
callq 0x2cbc
imull $0x3e8, %eax, %eax      # imm = 0x3E8
movl %eax, 0x4c(%rbx)
leaq 0x1761(%rip), %rsi      # 0x4078
movq %rsp, %rdi
callq 0x2cbc
imull $0x3e8, %eax, %eax      # imm = 0x3E8
movl %eax, 0x48(%rbx)
leaq 0x18(%rsp), %rdi
callq 0x2634
leaq 0x30(%rsp), %rdi
callq 0x20c0
movq %rsp, %rdi
callq 0x2cf6
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x297b
movq %rax, %r14
jmp 0x2988
movq %rax, %r14
movq %rbx, %rdi
callq 0x2600
jmp 0x297e
movq %rax, %r14
leaq 0x58(%rsp), %rdi
callq 0x2668
jmp 0x297e
movq %rax, %r14
jmp 0x2992
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x2634
leaq 0x30(%rsp), %rdi
callq 0x20c0
movq %rsp, %rdi
callq 0x2cf6
movq %r14, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/aaronpuchert[P]throttle/src/throttle.cpp
// Function: Throttle::operator()()
void Throttle::operator()()
{
	// Look if there is new input in the pipe
	queue.update();

	if (override_freq) {
		if (freq != override_freq) {
			freq = override_freq;
			writeFreq();
		}
	}
	else
		adjust();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x78, %rdi
callq 0x3a10
movl 0x88(%rbx), %eax
testl %eax, %eax
je 0x2aae
cmpl %eax, 0x68(%rbx)
jne 0x2ab7
popq %rbx
retq
movq %rbx, %rdi
popq %rbx
jmp 0x2b3a
movl %eax, 0x68(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x2ac4
nop
// File: /workspace/github_cpp_makefile_star2_O2/aaronpuchert[P]throttle/src/throttle.cpp
// Function: Throttle::writeFreq() const
void Throttle::writeFreq() const
{
	DEBUG_PRINT("[Throttle] New frequency: " << (float)freq/1000 << " MHz");

	// loop over the files, write the frequency in each
       for (unsigned core = 0; core != freq_fn.size(); ++core) {
		std::ofstream freq_file(freq_fn[core]);
		freq_file << freq;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
xorl %ebp, %ebp
movq %rsp, %r15
pushq $0x10
popq %r12
cmpl (%r14), %ebp
je 0x2b17
movq %r14, %rdi
movl %ebp, %esi
callq 0x27da
movq %r15, %rdi
movq %rax, %rsi
movl %r12d, %edx
callq 0x2200
movl 0x68(%rbx), %esi
movq %r15, %rdi
callq 0x2310
movq %r15, %rdi
callq 0x2270
incl %ebp
jmp 0x2ae3
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2270
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/aaronpuchert[P]throttle/src/throttle.cpp
// Function: Throttle::adjust()
void Throttle::adjust()
{
	int temp = readTemp();
	std::vector<int>::const_iterator new_freq = freqs.end();

	DEBUG_PRINT("[Throttle] Temperature: " << (float)temp/1000 << "°C");

	// slowly reset stabilize counter
	if (stabilize > 0) --stabilize;
	if (stabilize < 0) ++stabilize;

	// If the temperature exceeds a threshold, find the next best frequency.
	if (temp > temp_max && stabilize >= 0) {
		new_freq = std::lower_bound(freqs.begin(), freqs.end(), freq);
		if (new_freq == freqs.begin())
			return;     // There is nothing we can do.
		else
			--new_freq;
		stabilize = -wait_after_adjust;
	}
	if (temp < temp_min && stabilize <= 0) {
		new_freq = std::upper_bound(freqs.begin(), freqs.end(), freq);
		stabilize = wait_after_adjust;
	}

	// Have we found one? Then adjust.
	if (new_freq != freqs.end()) {
		freq = *new_freq;
		writeFreq();
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2be4
movl %eax, %ebp
movl 0x70(%rbx), %eax
testl %eax, %eax
jle 0x2b5a
pushq $-0x1
popq %rcx
addl %ecx, %eax
movl %eax, 0x70(%rbx)
movl %eax, %ecx
jmp 0x2b60
xorl %ecx, %ecx
testl %eax, %eax
js 0x2bdd
movq 0x58(%rbx), %rsi
cmpl 0x48(%rbx), %ebp
setg %al
testl %ecx, %ecx
setns %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x2b9b
movq 0x50(%rbx), %rdi
leaq 0x68(%rbx), %rdx
callq 0x34d6
cmpq 0x50(%rbx), %rax
je 0x2bd6
addq $-0x4, %rax
xorl %ecx, %ecx
subl 0x6c(%rbx), %ecx
movl %ecx, 0x70(%rbx)
movq 0x58(%rbx), %rsi
jmp 0x2b9e
movq %rsi, %rax
cmpl 0x4c(%rbx), %ebp
jge 0x2bbe
testl %ecx, %ecx
jg 0x2bbe
movq 0x50(%rbx), %rdi
leaq 0x68(%rbx), %rdx
callq 0x350f
movl 0x6c(%rbx), %ecx
movl %ecx, 0x70(%rbx)
movq 0x58(%rbx), %rsi
cmpq %rsi, %rax
je 0x2bd6
movl (%rax), %eax
movl %eax, 0x68(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2ac4
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
pushq $0x1
jmp 0x2b50
// File: /workspace/github_cpp_makefile_star2_O2/aaronpuchert[P]throttle/src/throttle.hpp
// Function: Conf::Parser<std::vector<int, std::allocator<int>>>::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::vector<T> Conf::Parser<std::vector<T>>::parse(const std::string &str)
{
	std::istringstream stream(str);

	std::vector<T> ret;
	T cur;
	while (stream >> cur)
		ret.push_back(cur);
	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
pushq $0x8
popq %rdx
movq %r14, %rdi
callq 0x22f0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2140
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2e93
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2eca
jmp 0x2e6d
leaq 0x10(%rsp), %rdi
callq 0x20d0
movq %rbx, %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2634
leaq 0x10(%rsp), %rdi
callq 0x20d0
movq %r14, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/aaronpuchert[P]throttle/src/conf.cpp
// Function: Conf::GetAttr[abi:cxx11](char const*) const
const std::string& Conf::GetAttr(const char *name) const
{
	auto it = std::find_if(attributes.begin(), attributes.end(),
		[name](const std::pair<std::string, std::string>& p)
		{
			return p.first == name;
		});

	if (it != attributes.end())
		return it->second;
	else
		throw std::runtime_error(std::string("No such attribute: ") + name);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r15
movq 0x8(%rdi), %r13
movq %r13, 0x10(%rsp)
subq %r15, %r13
movq %r13, %rbp
sarq $0x8, %rbp
testq %rbp, %rbp
jle 0x3806
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3ce4
testb %al, %al
jne 0x383e
leaq 0x40(%r15), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3ce4
testb %al, %al
jne 0x3864
leaq 0x80(%r15), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3ce4
testb %al, %al
jne 0x3864
leaq 0xc0(%r15), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3ce4
testb %al, %al
jne 0x3864
addq $0x100, %r15            # imm = 0x100
decq %rbp
addq $-0x100, %r13
jmp 0x3794
sarq $0x6, %r13
cmpq $0x1, %r13
je 0x384e
cmpq $0x2, %r13
je 0x382f
cmpq $0x3, %r13
jne 0x3843
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3ce4
testb %al, %al
jne 0x383e
addq $0x40, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3ce4
testb %al, %al
je 0x384a
movq %r15, %r12
jmp 0x3864
movq 0x10(%rsp), %r12
jmp 0x3864
addq $0x40, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3ce4
testb %al, %al
movq 0x10(%rsp), %r12
cmovneq %r15, %r12
cmpq 0x8(%r14), %r12
je 0x3880
addq $0x20, %r12
movq %r12, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x2100
movq %rax, %r14
leaq 0x856(%rip), %rsi       # 0x40e8
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x3c66
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movq %rbx, %rdx
callq 0x3c46
movb $0x1, %bpl
leaq 0x38(%rsp), %rsi
movq %r14, %rdi
callq 0x22c0
xorl %ebp, %ebp
movq 0x3724(%rip), %rsi      # 0x6ff0
movq 0x36f5(%rip), %rdx      # 0x6fc8
movq %r14, %rdi
callq 0x2300
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x20c0
jmp 0x38f0
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x18(%rsp), %rdi
callq 0x20c0
testb %bpl, %bpl
jne 0x3904
jmp 0x390c
movq %rax, %rbx
movq %r14, %rdi
callq 0x2170
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/aaronpuchert[P]throttle/src/conf.cpp
// Function: CommQueue::CommQueue(Throttle*, char const*)
CommQueue::CommQueue(Throttle *parent, const char *pipe_fn) : Throt(parent)
{
	// Open the command pipe
	comm_file = open(pipe_fn, O_RDONLY | O_NONBLOCK);

	if (comm_file < 0)
		throw std::runtime_error(std::string("Couldn't open command pipe '") + pipe_fn + '\'');
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, (%rdi)
movq %rdx, %rdi
movl $0x800, %esi            # imm = 0x800
xorl %eax, %eax
callq 0x2180
movl %eax, 0x8(%rbx)
testl %eax, %eax
js 0x3944
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x2100
movq %rax, %rbx
leaq 0x7a6(%rip), %rsi       # 0x40fc
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x3c66
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %r14, %rdx
callq 0x3c46
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
pushq $0x27
popq %rdx
callq 0x3c24
movb $0x1, %bpl
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x22c0
xorl %ebp, %ebp
movq 0x364e(%rip), %rsi      # 0x6ff0
movq 0x361f(%rip), %rdx      # 0x6fc8
movq %rbx, %rdi
callq 0x2300
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x20c0
jmp 0x39c6
movq %rax, %r14
movb $0x1, %bpl
leaq 0x30(%rsp), %rdi
callq 0x20c0
jmp 0x39d8
movq %rax, %r14
movb $0x1, %bpl
leaq 0x10(%rsp), %rdi
callq 0x20c0
testb %bpl, %bpl
jne 0x39ec
jmp 0x39f4
movq %rax, %r14
movq %rbx, %rdi
callq 0x2170
movq %r14, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/aaronpuchert[P]throttle/src/conf.cpp
// Function: CommQueue::update()
void CommQueue::update()
{
	char buf[LINE_LENGTH];
	ssize_t ret;
	while (true) {
		ret = read(comm_file, buf, LINE_LENGTH-1);
		if (ret <= 0)
			break;
		processCommand(std::string(buf, ret));
	}

	// This should be because there's nothing more to read
	if (ret != 0 && errno != EAGAIN)
		throw std::runtime_error("Read error while checking command pipe");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq %rdi, %rbx
leaq 0x10(%rsp), %r12
leaq 0x20(%rsp), %r14
movq %rsp, %r15
movl 0x8(%rbx), %edi
movl $0x3ff, %edx            # imm = 0x3FF
movq %r14, %rsi
callq 0x2250
testq %rax, %rax
jle 0x3a6f
movq %r12, (%rsp)
leaq (%rsp,%rax), %rdx
addq $0x20, %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x3cf2
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3ae0
movq %r15, %rdi
callq 0x20c0
jmp 0x3a2e
je 0x3a7b
callq 0x2030
cmpl $0xb, (%rax)
jne 0x3a8a
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x2100
movq %rax, %r14
leaq 0x67d(%rip), %rsi       # 0x4119
movq %rax, %rdi
callq 0x2090
movq 0x3545(%rip), %rsi      # 0x6ff0
movq 0x3516(%rip), %rdx      # 0x6fc8
movq %r14, %rdi
callq 0x2300
movq %rax, %rbx
movq %r14, %rdi
callq 0x2170
jmp 0x3ad7
movq %rax, %rbx
jmp 0x3ad7
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O2/aaronpuchert[P]throttle/src/conf.cpp
// Function: CommQueue::processCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void CommQueue::processCommand(const std::string &comm)
{
	std::istringstream stream(comm);

	std::string command;
	stream >> command;

	if (command == "min") {
		int temp;
		stream >> temp;
		Throt->setMinTemp(temp);
		DEBUG_PRINT("[CommQueue] Set minimum temperature to " << temp);
	}
	else if (command == "max") {
		int temp;
		stream >> temp;
		Throt->setMaxTemp(temp);
		DEBUG_PRINT("[CommQueue] Set maximum temperature to " << temp);
	}
	else if (command == "freq") {
		int freq;
		stream >> freq;
		Throt->setOverrideFreq(freq);
		DEBUG_PRINT("[CommQueue] Set frequency to " << freq);
	}
	else if (command == "reset") {
		Throt->setOverrideFreq(0);
		DEBUG_PRINT("[CommQueue] Reset mechanism");
	}
	else {
		DEBUG_PRINT("[CommQueue] Ignored unknown command: " << command);
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, %rbx
leaq 0x28(%rsp), %r14
pushq $0x8
popq %rdx
movq %r14, %rdi
callq 0x22f0
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x2220
leaq 0x552(%rip), %rsi       # 0x4074
leaq 0x8(%rsp), %rdi
callq 0x3ce4
testb %al, %al
je 0x3b52
leaq 0x28(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0x2140
movq (%rbx), %rax
imull $0x3e8, 0x4(%rsp), %ecx # imm = 0x3E8
movl %ecx, 0x4c(%rax)
jmp 0x3be0
leaq 0x524(%rip), %rsi       # 0x407d
leaq 0x8(%rsp), %rdi
callq 0x3ce4
testb %al, %al
je 0x3b86
leaq 0x28(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0x2140
movq (%rbx), %rax
imull $0x3e8, 0x4(%rsp), %ecx # imm = 0x3E8
movl %ecx, 0x48(%rax)
jmp 0x3be0
leaq 0x5b3(%rip), %rsi       # 0x4140
leaq 0x8(%rsp), %rdi
callq 0x3ce4
testb %al, %al
je 0x3bbd
leaq 0x28(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0x2140
movq (%rbx), %rax
imull $0x3e8, 0x4(%rsp), %ecx # imm = 0x3E8
movl %ecx, 0x88(%rax)
jmp 0x3bdc
leaq 0x581(%rip), %rsi       # 0x4145
leaq 0x8(%rsp), %rdi
callq 0x3ce4
testb %al, %al
je 0x3be0
movq (%rbx), %rax
andl $0x0, 0x88(%rax)
andl $0x0, 0x70(%rax)
leaq 0x8(%rsp), %rdi
callq 0x20c0
leaq 0x28(%rsp), %rdi
callq 0x20d0
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
retq
jmp 0x3c05
jmp 0x3c05
jmp 0x3c05
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20c0
leaq 0x28(%rsp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/Gammelkebab[P]GameOfLife/src/actors/actor.cpp
// Function: Actor::create(int, int, int, int, int, double)
Actor *Actor::create(int gridsize_x, int gridsize_y, int proc_amt, int proc_num, int total_rounds, double worker_share)
{
    World *world = new World(gridsize_x, gridsize_y, proc_amt, total_rounds, worker_share);
    if (world->is_worker(proc_num))
    {
        return new Worker(world, proc_num);
    }
    else
    {
        return new Writer(world, proc_num);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movl %r8d, %ebp
movl %ecx, %ebx
movl %edx, %r15d
movl %esi, %r12d
movl %edi, %r13d
pushq $0x38
popq %rdi
callq 0x2170
movq %rax, %r14
movq %rax, %rdi
movl %r13d, %esi
movl %r12d, %edx
movl %r15d, %ecx
movl %ebp, %r8d
movsd (%rsp), %xmm0
callq 0x3728
movq %r14, %rdi
movl %ebx, %esi
callq 0x3926
testb %al, %al
je 0x266c
pushq $0x48
popq %rdi
callq 0x2170
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x26dc
jmp 0x2684
pushq $0x38
popq %rdi
callq 0x2170
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x2ac4
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x38
jmp 0x26a2
movq %rax, %rbx
pushq $0x48
popq %rsi
movq %r15, %rdi
jmp 0x26b1
movq %rax, %rbx
pushq $0x38
popq %rsi
movq %r14, %rdi
callq 0x2180
movq %rbx, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O2/Gammelkebab[P]GameOfLife/src/actors/worker.cpp
// Function: Worker::Worker(World*, int)
Worker::Worker(World *world, int proc_num) : Actor(world, proc_num)
{
    block = new Active_block(world, proc_num);

    /* Borders */
    border_send_buffers = new unsigned char **[world->total_rounds];
    for (int r = 0; r < world->total_rounds; r++)
    {
        border_send_buffers[r] = new unsigned char *[Border_direction_count];
        for (int i = Border_direction_first; i <= Border_direction_last; i++)
        {
            Border_direction dir = (Border_direction)i;
            int buffer_size = block->get_border_size(dir);
            border_send_buffers[r][dir] = new unsigned char[buffer_size];
        }
    }
    border_send_requests = new MPI_Request *[world->total_rounds];
    for (int r = 0; r < world->total_rounds; r++)
    {
        border_send_requests[r] = new MPI_Request[Border_direction_count];
    }

    /* Block sends */
    block_send_buffers = new unsigned char *[world->total_rounds];
    for (int r = 0; r < world->total_rounds; r++)
    {
        block_send_buffers[r] = new unsigned char[block->width_byte * block->height];
    }
    block_send_requests = new MPI_Request[world->total_rounds];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2594
leaq 0x4615(%rip), %rax      # 0x6d10
movq %rax, (%rbx)
pushq $0x40
popq %rdi
callq 0x2170
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2dac
movq %r15, 0x20(%rbx)
movslq 0x28(%r14), %r12
leaq (,%r12,8), %rdi
testq %r12, %r12
pushq $-0x1
popq %r13
cmovsq %r13, %rdi
callq 0x2030
movq %rax, 0x38(%rbx)
xorl %ebp, %ebp
pushq $0x40
popq %r15
movslq %r12d, %r12
cmpq %r12, %rbp
jge 0x278f
movq %r15, %rdi
callq 0x2030
movq 0x38(%rbx), %rcx
movq %rax, (%rcx,%rbp,8)
xorl %r12d, %r12d
cmpq $0x8, %r12
je 0x2786
movq 0x20(%rbx), %rdi
movl %r12d, %esi
callq 0x2eda
movslq %eax, %rdi
callq 0x2030
movq 0x38(%rbx), %rcx
movq (%rcx,%rbp,8), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
jmp 0x275b
incq %rbp
movl 0x28(%r14), %r12d
jmp 0x2740
leaq (,%r12,8), %r14
xorl %ebp, %ebp
testl %r12d, %r12d
cmovsq %r13, %r14
cmovlel %ebp, %r12d
movq %r14, %rdi
callq 0x2030
movq %rax, 0x40(%rbx)
pushq $0x40
popq %r15
cmpq %rbp, %r12
je 0x27ce
movq %r15, %rdi
callq 0x2030
movq 0x40(%rbx), %rcx
movq %rax, (%rcx,%rbp,8)
incq %rbp
jmp 0x27b4
movq %r14, %rdi
callq 0x2030
movq %rax, 0x28(%rbx)
xorl %r15d, %r15d
cmpq %r15, %r12
je 0x2804
movq 0x20(%rbx), %rax
movslq 0x24(%rax), %rcx
movslq 0x20(%rax), %rdi
imulq %rcx, %rdi
callq 0x2030
movq 0x28(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
jmp 0x27dd
movq %r14, %rdi
callq 0x2030
movq %rax, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x40
popq %rsi
movq %r15, %rdi
callq 0x2180
movq %rbx, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O2/Gammelkebab[P]GameOfLife/src/actors/worker.cpp
// Function: Worker::store(int)
void Worker::store(int round)
{
    unsigned char *buffer_compressed = block_send_buffers[round];
    block->compress(buffer_compressed);
    int buffer_size = block->width_byte * block->height;
    int writer_num = world->get_writer_num(round);
    MPI_Isend(buffer_compressed, buffer_size, MPI_UNSIGNED_CHAR, writer_num, round, MPI_COMM_WORLD, &block_send_requests[round]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq 0x20(%rdi), %rdi
movq 0x28(%r14), %rax
movslq %esi, %rbx
leaq (,%rbx,8), %r12
movq (%rax,%rbx,8), %r15
movq %r15, %rsi
callq 0x2e50
movq 0x8(%r14), %rdi
movq 0x20(%r14), %rax
movl 0x20(%rax), %ebp
imull 0x24(%rax), %ebp
movl %ebx, %esi
callq 0x3954
addq 0x30(%r14), %r12
movq %r12, (%rsp)
movq 0x470f(%rip), %rdx      # 0x6fc0
movq 0x46f8(%rip), %r9       # 0x6fb0
movq %r15, %rdi
movl %ebp, %esi
movl %eax, %ecx
movl %ebx, %r8d
callq 0x20a0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Gammelkebab[P]GameOfLife/src/actors/worker.cpp
// Function: Worker::communicate(int)
void Worker::communicate(int round)
{
    for (int i = Border_direction_first; i <= Border_direction_last; i++)
    {
        Border_direction dir = (Border_direction)i;

        unsigned char *border_send_buffer = border_send_buffers[round][dir];
        MPI_Request *send_request = &border_send_requests[round][dir];
        block->wrap_border(dir, border_send_buffer);
        border_send(dir, border_send_buffer, send_request);
    }

    for (int i = Border_direction_first; i <= Border_direction_last; i++)
    {
        Border_direction dir = (Border_direction)i;

        int border_recv_buffer_size = block->get_border_size(dir);
        unsigned char border_recv_buffer[border_recv_buffer_size];

        border_recv(dir, border_recv_buffer);
        block->unwrap_border(dir, border_recv_buffer);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq %esi, %rax
movq %rax, -0x30(%rbp)
xorl %r13d, %r13d
xorl %r14d, %r14d
cmpq $0x8, %r14
je 0x293c
movq 0x20(%rbx), %rdi
movq 0x38(%rbx), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax,%r14,8), %r15
movq 0x40(%rbx), %rax
movq (%rax,%rcx,8), %r12
addq %r13, %r12
movl %r14d, %esi
movq %r15, %rdx
callq 0x3068
movq %rbx, %rdi
movl %r14d, %esi
movq %r15, %rdx
movq %r12, %rcx
callq 0x29dc
incq %r14
addq $0x8, %r13
jmp 0x28f2
xorl %r14d, %r14d
cmpl $0x8, %r14d
je 0x298c
movq 0x20(%rbx), %rdi
movl %r14d, %esi
callq 0x2eda
movq %rsp, %r12
movl %eax, %eax
addq $0xf, %rax
andq $-0x10, %rax
movq %rsp, %r15
subq %rax, %r15
movq %r15, %rsp
movq %rbx, %rdi
movl %r14d, %esi
movq %r15, %rdx
callq 0x2a36
movq 0x20(%rbx), %rdi
movl %r14d, %esi
movq %r15, %rdx
callq 0x313e
movq %r12, %rsp
incl %r14d
jmp 0x293f
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Gammelkebab[P]GameOfLife/src/actors/worker.cpp
// Function: Worker::border_recv(Border_direction, unsigned char*)
void Worker::border_recv(Border_direction source_dir, unsigned char *buffer)
{
    int element_count = block->get_border_size(source_dir);
    int source_block = block->get_neighbor_block_num(source_dir);
    int tag = opposite_direction(source_dir);
    MPI_Recv(buffer, element_count, MPI_UNSIGNED_CHAR, source_block, tag, worker_comm, MPI_STATUS_IGNORE);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movq 0x20(%rdi), %rdi
callq 0x2eda
movl %eax, %r15d
movq 0x20(%r14), %rdi
movl %ebp, %esi
callq 0x2ef4
movl %eax, %r12d
movl %ebp, %edi
callq 0x2aad
movq 0x18(%r14), %r9
andq $0x0, (%rsp)
movq 0x4545(%rip), %rdx      # 0x6fc0
movq %rbx, %rdi
movl %r15d, %esi
movl %r12d, %ecx
movl %eax, %r8d
callq 0x20f0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Gammelkebab[P]GameOfLife/src/actors/writer.cpp
// Function: Writer::Writer(World*, int)
Writer::Writer(World *world, int proc_num) : Actor(world, proc_num)
{
    world->set_blocks();

    /* File write buffers */
    file_write_buffers = new char *[world->total_rounds];
    /* File write buffers are created at runtime,
     * since the header and block size can not yet be determined.
     */
    file_write_requests = new MPI_Request[world->total_rounds];

    file_handles = new MPI_File[world->total_rounds];
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2594
leaq 0x426e(%rip), %rax      # 0x6d48
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x385a
movslq 0x28(%r14), %rax
leaq (,%rax,8), %rcx
testq %rax, %rax
pushq $-0x1
popq %r14
cmovnsq %rcx, %r14
movq %r14, %rdi
callq 0x2030
movq %rax, 0x20(%rbx)
movq %r14, %rdi
callq 0x2030
movq %rax, 0x28(%rbx)
movq %r14, %rdi
callq 0x2030
movq %rax, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq