LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/ARINC/ARINC_Com.cpp
// Function: QueuingPort::SendQueuingMsg(char*, int)
int QueuingPort::SendQueuingMsg (char* s_t, int ls_t) {

                int nbeff;
                if ((nbeff = sendto(s_d,s_t,ls_t,0,(struct sockaddr *)&s_a, sizeof(s_a)))== SOCK_ERR) {
                        perror("C-> sendto");
                        bye(s_d);
                        }
//                else
//                        cout << "C-> Number of char sent = " << nbeff << endl;
                return(nbeff); // returns the number of char effectively sent
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x404(%rdi), %edi
movslq %edx, %rdx
leaq 0x408(%rbx), %r8
pushq $0x10
popq %r9
xorl %ecx, %ecx
callq 0x2060
cmpl $-0x1, %eax
je 0x29e2
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x26fb(%rip), %rdi      # 0x50e4
callq 0x21c0
movl 0x404(%rbx), %edi
callq 0x275c
nop
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/ARINC/ARINC_Com.cpp
// Function: QueuingPort::RecvQueuingMsg(char*)
int QueuingPort::RecvQueuingMsg (char* e_t){;

                int lc_a = sizeof(c_a);
                int le_t;

                cout << "Waiting for input message..." << endl;
                if ((le_t = recvfrom(s_d,e_t,MAXLGMSG,0,(struct sockaddr *)&c_a,(socklen_t *)&lc_a)) == SOCK_ERR) {
                        perror("S-> recvfrom");
                        bye(s_d);
                        }       
                else {
                        h_emetteur = gethostbyaddr(&c_a.sin_addr,sizeof(&c_a.sin_addr),c_a.sin_family); 
                        cout << "S-> client port : " << c_a.sin_port << endl;;
                        cout << "S-> client host : " << h_emetteur->h_name << endl;
                        *(e_t+le_t)='\0';
                        cout << "S-> Buffer(" << le_t << ") : " << e_t << endl;
                }
                return(le_t); // returns the number of char effectively received 
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq -0x24(%rbp), %r14
movl $0x10, (%r14)
movq 0x55af(%rip), %rdi      # 0x7fd0
leaq 0x26c7(%rip), %rsi      # 0x50ef
callq 0x2240
movq %rax, %rdi
callq 0x2150
movl 0x404(%r15), %edi
leaq 0x418(%r15), %r8
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rsi
xorl %ecx, %ecx
movq %r14, %r9
callq 0x21b0
movq %rax, %r14
cmpl $-0x1, %r14d
je 0x2b2a
leaq 0x41c(%r15), %rdi
movzwl 0x418(%r15), %edx
pushq $0x8
popq %rsi
callq 0x22f0
movq %rax, 0x4b8(%r15)
movq 0x5549(%rip), %r12      # 0x7fd0
leaq 0x268b(%rip), %rsi      # 0x5119
movq %r12, %rdi
callq 0x2240
movzwl 0x41a(%r15), %esi
movq %rax, %rdi
callq 0x23e0
movq %rax, %rdi
callq 0x2150
leaq 0x2677(%rip), %rsi      # 0x512c
movq %r12, %rdi
callq 0x2240
movq 0x4b8(%r15), %rcx
movq (%rcx), %rsi
movq %rax, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x2150
movslq %r14d, %rax
movb $0x0, (%rbx,%rax)
leaq 0x265a(%rip), %rsi      # 0x513f
movq %r12, %rdi
callq 0x2240
movq %rax, %rdi
movl %r14d, %esi
callq 0x2400
leaq 0x264c(%rip), %rsi      # 0x514b
movq %rax, %rdi
callq 0x2240
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2240
movq %rax, %rdi
callq 0x2150
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x25db(%rip), %rdi      # 0x510c
callq 0x21c0
movl 0x404(%r15), %edi
callq 0x275c
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/ARINC/ARINC_Com.cpp
// Function: SamplingPort::SamplingPort(long, int, int, char*)
SamplingPort::SamplingPort(long d, int m, int p, char* S):QueuingPort(m, p, S){
us_delay=d;
timeout.tv_sec = 0;
timeout.tv_usec = d;
nds = getdtablesize();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %esi
movl %ecx, %edx
movq %r8, %rcx
callq 0x27de
movq %rbx, 0x660(%r14)
andq $0x0, 0x4c8(%r14)
movq %rbx, 0x4d0(%r14)
callq 0x23d0
movl %eax, 0x4d8(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/planManager/genericInstruction.cpp
// Function: GenericInstruction::GenericInstruction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
GenericInstruction::GenericInstruction(string base) 
{
	string time = base.substr(0,6);
	
	hour =  atoi(time.c_str())/10000;
	min =  (atoi(time.c_str())%10000)/100;
	sec =  atoi(time.c_str())%100;
	
	type = base.substr(6,1).c_str()[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4f4e(%rip), %rax      # 0x7d38
movq %rax, (%rdi)
leaq -0x48(%rbp), %r12
pushq $0x6
popq %r15
movq %r12, %rdi
xorl %edx, %edx
movq %r15, %rcx
callq 0x2260
movq (%r12), %r12
movq %r12, %rdi
callq 0x23a0
movl $0x2710, %r13d          # imm = 0x2710
cltd
idivl %r13d
movl %eax, 0x8(%rbx)
movq %r12, %rdi
callq 0x23a0
cltd
idivl %r13d
movl %edx, %eax
movw $0x64, %cx
cwtd
idivw %cx
cwtl
movl %eax, 0xc(%rbx)
movq %r12, %rdi
callq 0x23a0
pushq $0x64
popq %rcx
cltd
idivl %ecx
movl %edx, 0x10(%rbx)
leaq -0x68(%rbp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
movq %r15, %rdx
callq 0x2260
leaq -0x68(%rbp), %rdi
movq (%rdi), %rax
movb (%rax), %al
movb %al, 0x14(%rbx)
callq 0x2140
leaq -0x48(%rbp), %rdi
callq 0x2140
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x2420
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/planManager/genericInstruction.cpp
// Function: PhotoInstruction::PhotoInstruction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
PhotoInstruction::PhotoInstruction(string base):GenericInstruction(base)
{
/*  	For a photo shoot :    string instruction = "HHMMSSpEXPOUNomImage In"	*/

	string exposure = base.substr(7,5);
	this->exposure = atoi(exposure.c_str());

	string cut = base.substr(12,base.length()-12);
	this->photoName = cut.substr(0, cut.find(" "));

	string leftover = base.substr(13+this->photoName.length(), 2);
	this->index = atoi( leftover.c_str()  );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq -0xa0(%rbp), %rbx
movq %rbx, %rdi
callq 0x2300
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2dcc
leaq -0xa0(%rbp), %rdi
callq 0x2140
leaq 0x4de9(%rip), %rax      # 0x7d50
movq %rax, (%r14)
leaq 0x20(%r14), %rbx
leaq 0x30(%r14), %rax
movq %rax, 0x20(%r14)
andq $0x0, 0x28(%r14)
movb $0x0, 0x30(%r14)
leaq -0x80(%rbp), %rdi
pushq $0x7
popq %rdx
pushq $0x5
popq %rcx
movq %r15, %rsi
callq 0x2260
movq -0x80(%rbp), %rdi
callq 0x23a0
movl %eax, 0x40(%r14)
movq 0x8(%r15), %rcx
addq $-0xc, %rcx
leaq -0x60(%rbp), %rdi
pushq $0xc
popq %rdx
movq %r15, %rsi
callq 0x2260
leaq 0x2106(%rip), %rsi      # 0x50c3
leaq -0x60(%rbp), %r12
movq %r12, %rdi
xorl %edx, %edx
callq 0x2460
leaq -0x40(%rbp), %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x2260
leaq -0x40(%rbp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x22c0
movq %r12, %rdi
callq 0x2140
movq 0x28(%r14), %rdx
addq $0xd, %rdx
leaq -0x40(%rbp), %rdi
pushq $0x2
popq %rcx
movq %r15, %rsi
callq 0x2260
leaq -0x40(%rbp), %rbx
movq (%rbx), %rdi
callq 0x23a0
movl %eax, 0x18(%r14)
movq %rbx, %rdi
callq 0x2140
leaq -0x60(%rbp), %rdi
callq 0x2140
leaq -0x80(%rbp), %rdi
callq 0x2140
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3046
movq %rax, %r14
leaq -0x60(%rbp), %rdi
callq 0x2140
jmp 0x3057
movq %rax, %r14
leaq -0x80(%rbp), %rdi
callq 0x2140
jmp 0x3067
jmp 0x3064
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x2420
nop
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/planManager/genericInstruction.cpp
// Function: PhotoInstruction::printInstruction()
void PhotoInstruction::printInstruction ()
{
	printf("Time: %02d:%02d:%02d ", this->hour, this->min, this->sec);
	printf("Type: %c ", this->type );
	printf("Ph. Name: %s \t", this->photoName.c_str()); 
	printf("Expo.: %d \t", this->exposure); 
	printf("Index: %d \n", this->index);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %esi
movl 0xc(%rdi), %edx
movl 0x10(%rdi), %ecx
leaq 0x2155(%rip), %rdi      # 0x51e6
xorl %eax, %eax
callq 0x2040
movsbl 0x14(%rbx), %esi
leaq 0x2159(%rip), %rdi      # 0x51fc
xorl %eax, %eax
callq 0x2040
movq 0x20(%rbx), %rsi
leaq 0x2151(%rip), %rdi      # 0x5206
xorl %eax, %eax
callq 0x2040
movl 0x40(%rbx), %esi
leaq 0x214f(%rip), %rdi      # 0x5215
xorl %eax, %eax
callq 0x2040
movl 0x18(%rbx), %esi
leaq 0x214a(%rip), %rdi      # 0x5221
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2040
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/planManager/genericInstruction.cpp
// Function: AttitudeInstruction::AttitudeInstruction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
AttitudeInstruction::AttitudeInstruction(string base):GenericInstruction(base)
{
/*      For a attitude change: string instruction[ ]="HHMMSSaAAABBBCCC In"	*/
	string att = base.substr(7,9);
	
	this->roll =  atoi(att.c_str())/1000000;
	this->yaw =  atoi(att.c_str())%1000;
	this->pitch =  (atoi(att.c_str())%1000000)/1000;

	string leftover = base.substr(17,2);
	this->index = atoi( leftover.c_str());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x68(%rbp), %r15
movq %r15, %rdi
callq 0x2300
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2dcc
leaq -0x68(%rbp), %rdi
callq 0x2140
leaq 0x4c10(%rip), %rax      # 0x7d68
movq %rax, (%rbx)
leaq -0x48(%rbp), %r15
pushq $0x7
popq %rdx
pushq $0x9
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2260
movq (%r15), %r15
movq %r15, %rdi
callq 0x23a0
movl $0xf4240, %r12d         # imm = 0xF4240
cltd
idivl %r12d
movl %eax, 0x24(%rbx)
movq %r15, %rdi
callq 0x23a0
movl $0x3e8, %r13d           # imm = 0x3E8
cltd
idivl %r13d
movl %edx, 0x20(%rbx)
movq %r15, %rdi
callq 0x23a0
cltd
idivl %r12d
movl %edx, %eax
cltd
idivl %r13d
movl %eax, 0x1c(%rbx)
leaq -0x88(%rbp), %rdi
pushq $0x11
popq %rdx
pushq $0x2
popq %rcx
movq %r14, %rsi
callq 0x2260
leaq -0x88(%rbp), %r14
movq (%r14), %rdi
callq 0x23a0
movl %eax, 0x18(%rbx)
movq %r14, %rdi
callq 0x2140
leaq -0x48(%rbp), %rdi
callq 0x2140
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
jmp 0x3209
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x2420
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/planManager/genericInstruction.cpp
// Function: AttitudeInstruction::printInstruction()
void AttitudeInstruction::printInstruction ()
{
	printf("Time: %02d:%02d:%02d ", this->hour, this->min, this->sec);
	printf("Type: %c ", this->type );
	printf("Attitude: %03d:%03d:%03d \t\t\t", this->roll, this->pitch, this->yaw );	
	printf("Index: %d \n", this->index);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %esi
movl 0xc(%rdi), %edx
movl 0x10(%rdi), %ecx
leaq 0x1fb7(%rip), %rdi      # 0x51e6
xorl %eax, %eax
callq 0x2040
movsbl 0x14(%rbx), %esi
leaq 0x1fbb(%rip), %rdi      # 0x51fc
xorl %eax, %eax
callq 0x2040
movl 0x24(%rbx), %esi
movl 0x1c(%rbx), %edx
movl 0x20(%rbx), %ecx
leaq 0x1fd5(%rip), %rdi      # 0x522d
xorl %eax, %eax
callq 0x2040
movl 0x18(%rbx), %esi
leaq 0x1fb8(%rip), %rdi      # 0x5221
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2040
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/planManager/plan.cpp
// Function: Plan::stockInstruction(GenericInstruction*)
bool Plan::stockInstruction(GenericInstruction * newInstruction)
{
	if (nInstructions == maxInstructions)
	{
		return false;
	}
	else
	{
		ActivityList[nInstructions] = newInstruction;
		nInstructions++;
		return true;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x320(%rdi), %rax
cmpq $0x64, %rax
je 0x32ec
movq %rsi, (%rdi,%rax,8)
leal 0x1(%rax), %ecx
movl %ecx, 0x320(%rdi)
cmpl $0x64, %eax
setne %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/planManager/planManager.cpp
// Function: PlanManager::destructPlan()
void PlanManager::destructPlan()
{
	if(plan!=NULL)
	{
		delete plan;
		plan=NULL;
	}
	for (int k=0; k< 100; k++) bannedInstructions[k] = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3c6c
callq 0x2220
andq $0x0, (%rbx)
pushq $0x8
popq %rax
cmpq $0x6c, %rax
je 0x3c7e
movb $0x0, (%rbx,%rax)
incq %rax
jmp 0x3c6f
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/planManager/planManager.cpp
// Function: PlanManager::generatePlan(char const*)
void PlanManager::generatePlan(const char* filepath)
{
	cout << "GENERATE PLAN" << endl;

	string s = filepath;
	plan = new Plan();
	plan->loadPlan(filepath);

	for (int k=0; k< 100; k++) bannedInstructions[k] = false;

	cout<<"Plan ajouté"<<endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x4330(%rip), %rdi      # 0x7fd0
leaq 0x17d8(%rip), %rsi      # 0x547f
callq 0x2240
movq %rax, %rdi
callq 0x2150
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
movq %r14, %rsi
callq 0x2110
movl $0x328, %edi            # imm = 0x328
callq 0x2250
movq %rax, %r15
movq %rax, %rdi
callq 0x3294
movq %r15, (%rbx)
movq %r15, %rdi
movq %r14, %rsi
callq 0x32f4
pushq $0x8
popq %rax
cmpq $0x6c, %rax
je 0x3cf9
movb $0x0, (%rbx,%rax)
incq %rax
jmp 0x3cea
movq 0x42d0(%rip), %rdi      # 0x7fd0
leaq 0x1786(%rip), %rsi      # 0x548d
callq 0x2240
movq %rax, %rdi
callq 0x2150
leaq -0x40(%rbp), %rdi
callq 0x2140
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x2220
jmp 0x3d38
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x2420
nop
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/planManager/planManager.cpp
// Function: PlanManager::printPlan()
void PlanManager::printPlan()
{
	if(plan!=NULL)
		plan->printPlan();
	else
		cout << "No plan!" << endl;
}

// Assembly:
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3d57
jmp 0x32a2
pushq %rbp
movq %rsp, %rbp
movq 0x426e(%rip), %rdi      # 0x7fd0
leaq 0x1731(%rip), %rsi      # 0x549a
callq 0x2240
movq %rax, %rdi
popq %rbp
jmp 0x2150
nop
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/communication/statusManager.cpp
// Function: StatusManager::newNotification(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void StatusManager::newNotification(int errorID, string description)
{
	ofstream writeFile;
	writeFile.open(this->pathLogFile.c_str(), ofstream::app);
	
	time_t rawtime;

	struct tm * timeinfo;
	time (&rawtime);
	timeinfo = localtime (&rawtime);	
	
	cout << "Adding notification in file log : "<< this->pathLogFile << endl;

	if(writeFile.is_open())
	{
		char logLine[1000];
		sprintf(logLine, "Error %d:\t%s%s\n\n",errorID, asctime(timeinfo),description.c_str());
		printf("Error %d:\t%s%s\n\n", errorID,asctime(timeinfo), description.c_str());
		writeFile << logLine;
		writeFile.close();
	}

	else
	{
		cout << "Could not open the log error file " << this->pathLogFile << endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5f8, %rsp            # imm = 0x5F8
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r15
leaq -0x230(%rbp), %r12
movq %r12, %rdi
callq 0x23f0
movq (%r15), %rsi
pushq $0x1
popq %rdx
movq %r12, %rdi
callq 0x2050
leaq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x2200
movq %r12, %rdi
callq 0x2190
movq %rax, %r12
movq 0x40eb(%rip), %rdi      # 0x7fd0
leaq 0x15cc(%rip), %rsi      # 0x54b8
callq 0x2240
movq %rax, %rdi
movq %r15, %rsi
callq 0x21f0
movq %rax, %rdi
callq 0x2150
leaq -0x1c0(%rbp), %rdi
callq 0x20b0
testb %al, %al
je 0x3f76
movq %r12, %rdi
callq 0x2120
movq (%r14), %r8
leaq 0x15b5(%rip), %r15      # 0x54db
leaq -0x620(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
movl %ebx, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x2080
movq %r12, %rdi
callq 0x2120
movq (%r14), %rcx
movq %r15, %rdi
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2040
leaq -0x230(%rbp), %rdi
movq %r13, %rsi
callq 0x2240
leaq -0x230(%rbp), %rdi
callq 0x2320
jmp 0x3f9c
movq 0x4053(%rip), %rdi      # 0x7fd0
leaq 0x1568(%rip), %rsi      # 0x54ec
callq 0x2240
movq %rax, %rdi
movq %r15, %rsi
callq 0x21f0
movq %rax, %rdi
callq 0x2150
leaq -0x230(%rbp), %rdi
callq 0x2360
addq $0x5f8, %rsp            # imm = 0x5F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3fbe
jmp 0x3fbe
movq %rax, %rbx
leaq -0x230(%rbp), %rdi
callq 0x2360
movq %rbx, %rdi
callq 0x2420
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/planManager/attitudeController.cpp
// Function: AttitudeController::attitudeChange(int, int, int)
bool AttitudeController::attitudeChange(int roll, int pitch, int yaw) 
{
	char cmde_pitch[] = {"                                "};
	char cmde_yaw[]   = {"                                "};

	sprintf(cmde_pitch, "echo \"5=%d\" > /dev/servoblaster", pitch);
	sprintf(cmde_yaw, "echo \"2=%d\" > /dev/servoblaster", yaw);

	//cout << cmde_pitch<< endl;
	//cout << cmde_yaw  << endl;

	if (system(cmde_pitch) != 0)
	{
		//cout << "Error in the pitch mouvement \n\n";
		return false;
	}

	if (system(cmde_yaw) != 0 )
	{
		//cout << "Error in the yaw mouvement \n\n";
		return false;
	}

	/*
	try
	{
		cout << system(cmde_pitch)<< endl;
		cout << system(cmde_yaw)<< endl;
	}
	catch (exception& e)
	{
		cout << "exception caught:" << e.what()<<endl;
	}
	*/

	return true; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %ecx, %r14d
movaps 0x1529(%rip), %xmm0     # 0x5520
leaq -0x80(%rbp), %r15
movaps %xmm0, 0x10(%r15)
movaps 0x1509(%rip), %xmm1     # 0x5510
movaps %xmm1, (%r15)
xorl %ebx, %ebx
movb %bl, 0x20(%r15)
leaq -0x50(%rbp), %r12
movaps %xmm0, 0x10(%r12)
movaps %xmm1, (%r12)
movb %bl, 0x20(%r12)
leaq 0x1505(%rip), %rsi      # 0x5531
movq %r15, %rdi
xorl %eax, %eax
callq 0x2080
leaq 0x1514(%rip), %rsi      # 0x5551
movq %r12, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x2080
movq %r15, %rdi
callq 0x21d0
testl %eax, %eax
jne 0x4064
leaq -0x50(%rbp), %rdi
callq 0x21d0
testl %eax, %eax
sete %bl
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/GPIO.cpp
// Function: GPIOExport(int)
int GPIOExport(int pin)
{
#define BUFFER_MAX 3
	char buffer[BUFFER_MAX];
	ssize_t bytes_written;
	int fd;
 
	fd = open("/sys/class/gpio/export", O_WRONLY);
	if (-1 == fd) {
		fprintf(stderr, "Failed to open export for writing!\n");
		return(-1);
	}
 
	bytes_written = snprintf(buffer, BUFFER_MAX, "%d", pin);
	write(fd, buffer, bytes_written);
	close(fd);
	return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edi, %r15d
leaq 0x14bf(%rip), %rdi      # 0x5594
xorl %ebx, %ebx
pushq $0x1
popq %rsi
xorl %eax, %eax
callq 0x2180
cmpl $-0x1, %eax
je 0x4129
movl %eax, %r14d
leaq 0x14a1(%rip), %rdx      # 0x5591
leaq -0x23(%rbp), %r12
pushq $0x3
popq %rsi
movq %r12, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x23b0
movslq %eax, %rdx
movl %r14d, %edi
movq %r12, %rsi
callq 0x2100
movl %r14d, %edi
callq 0x2450
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x3ea8(%rip), %rax      # 0x7fd8
movq (%rax), %rcx
leaq 0x1471(%rip), %rdi      # 0x55ab
pushq $0x23
popq %rsi
pushq $0x1
popq %rdx
callq 0x2440
pushq $-0x1
popq %rbx
jmp 0x411a
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/GPIO.cpp
// Function: GPIOUnexport(int)
int GPIOUnexport(int pin)
{
	char buffer[BUFFER_MAX];
	ssize_t bytes_written;
	int fd;
 
	fd = open("/sys/class/gpio/unexport", O_WRONLY);
	if (-1 == fd) {
		fprintf(stderr, "Failed to open unexport for writing!\n");
		return(-1);
	}
 
	bytes_written = snprintf(buffer, BUFFER_MAX, "%d", pin);
	write(fd, buffer, bytes_written);
	close(fd);
	return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edi, %r15d
leaq 0x146c(%rip), %rdi      # 0x55cf
xorl %ebx, %ebx
pushq $0x1
popq %rsi
xorl %eax, %eax
callq 0x2180
cmpl $-0x1, %eax
je 0x41b7
movl %eax, %r14d
leaq 0x1413(%rip), %rdx      # 0x5591
leaq -0x23(%rbp), %r12
pushq $0x3
popq %rsi
movq %r12, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x23b0
movslq %eax, %rdx
movl %r14d, %edi
movq %r12, %rsi
callq 0x2100
movl %r14d, %edi
callq 0x2450
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x3e1a(%rip), %rax      # 0x7fd8
movq (%rax), %rcx
leaq 0x1420(%rip), %rdi      # 0x55e8
pushq $0x25
popq %rsi
pushq $0x1
popq %rdx
callq 0x2440
pushq $-0x1
popq %rbx
jmp 0x41a8
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/GPIO.cpp
// Function: GPIODirection(int, int)
int GPIODirection(int pin, int dir)
{
	static const char s_directions_str[]  = "in\0out";
 
#define DIRECTION_MAX 35
	char path[DIRECTION_MAX];
	int fd;
 
	snprintf(path, DIRECTION_MAX, "/sys/class/gpio/gpio%d/direction", pin);
	fd = open(path, O_WRONLY);
	if (-1 == fd) {
		fprintf(stderr, "Failed to open gpio direction for writing!\n");
		return(-1);
	}
 
	if (-1 == write(fd, &s_directions_str[IN == dir ? 0 : 3], IN == dir ? 2 : 3)) {
		fprintf(stderr, "Failed to set direction!\n");
		return(-1);
	}
 
	close(fd);
	return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, %r14d
movl %edi, %ecx
leaq 0x141f(%rip), %rdx      # 0x560e
leaq -0x40(%rbp), %rbx
pushq $0x23
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x23b0
pushq $0x1
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2180
cmpl $-0x1, %eax
je 0x4252
movl %eax, %ebx
xorl %edx, %edx
xorl %eax, %eax
testl %r14d, %r14d
sete %dl
setne %al
leaq (%rax,%rax,2), %rax
leaq 0x14e5(%rip), %rsi      # 0x5711
addq %rax, %rsi
xorq $0x3, %rdx
movl %ebx, %edi
callq 0x2100
cmpq $-0x1, %rax
je 0x4267
movl %ebx, %edi
callq 0x2450
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x3d7f(%rip), %rax      # 0x7fd8
movq (%rax), %rcx
leaq 0x13cc(%rip), %rdi      # 0x562f
pushq $0x2b
jmp 0x427a
movq 0x3d6a(%rip), %rax      # 0x7fd8
movq (%rax), %rcx
leaq 0x13e3(%rip), %rdi      # 0x565b
pushq $0x19
popq %rsi
pushq $0x1
popq %rdx
callq 0x2440
pushq $-0x1
popq %rax
jmp 0x4249
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/GPIO.cpp
// Function: GPIORead(int)
int GPIORead(int pin)
{
#define VALUE_MAX 30
	char path[VALUE_MAX];
	char value_str[3];
	int fd;
 
	snprintf(path, VALUE_MAX, "/sys/class/gpio/gpio%d/value", pin);
	fd = open(path, O_RDONLY);
	if (-1 == fd) {
		fprintf(stderr, "Failed to open gpio value for reading!\n");
		return(-1);
	}
 
	if (-1 == read(fd, value_str, 3)) {
		fprintf(stderr, "Failed to read value!\n");
		return(-1);
	}
 
	close(fd);
 
	return(atoi(value_str));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
movl %edi, %ecx
leaq 0x13db(%rip), %rdx      # 0x5675
leaq -0x30(%rbp), %rbx
pushq $0x1e
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x23b0
movq %rbx, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x2180
cmpl $-0x1, %eax
je 0x42e9
movl %eax, %ebx
leaq -0xb(%rbp), %rsi
pushq $0x3
popq %rdx
movl %eax, %edi
callq 0x2330
cmpq $-0x1, %rax
je 0x42fe
movl %ebx, %edi
callq 0x2450
leaq -0xb(%rbp), %rdi
callq 0x23a0
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
movq 0x3ce8(%rip), %rax      # 0x7fd8
movq (%rax), %rcx
leaq 0x1398(%rip), %rdi      # 0x5692
pushq $0x27
jmp 0x4311
movq 0x3cd3(%rip), %rax      # 0x7fd8
movq (%rax), %rcx
leaq 0x13ab(%rip), %rdi      # 0x56ba
pushq $0x16
popq %rsi
pushq $0x1
popq %rdx
callq 0x2440
pushq $-0x1
popq %rax
jmp 0x42e2
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/GPIO.cpp
// Function: GPIOWrite(int, int)
int GPIOWrite(int pin, int value)
{
	static const char s_values_str[] = "01";
 
	char path[VALUE_MAX];
	int fd;
 
	snprintf(path, VALUE_MAX, "/sys/class/gpio/gpio%d/value", pin);
	fd = open(path, O_WRONLY);
	if (-1 == fd) {
		fprintf(stderr, "Failed to open gpio value for writing!\n");
		return(-1);
	}
 
	if (1 != write(fd, &s_values_str[LOW == value ? 0 : 1], 1)) {
		fprintf(stderr, "Failed to write value!\n");
		return(-1);
	}
 
	close(fd);
	return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebx
movl %edi, %ecx
leaq 0x1340(%rip), %rdx      # 0x5675
leaq -0x30(%rbp), %r14
pushq $0x1e
popq %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x23b0
pushq $0x1
popq %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x2180
cmpl $-0x1, %eax
je 0x438c
movl %eax, %r14d
leaq 0x13b6(%rip), %rsi      # 0x5718
cmpl $0x1, %ebx
sbbq $-0x1, %rsi
pushq $0x1
popq %rdx
movl %eax, %edi
callq 0x2100
cmpq $0x1, %rax
jne 0x43a1
movl %r14d, %edi
callq 0x2450
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x3c45(%rip), %rax      # 0x7fd8
movq (%rax), %rcx
leaq 0x1334(%rip), %rdi      # 0x56d1
pushq $0x27
jmp 0x43b4
movq 0x3c30(%rip), %rax      # 0x7fd8
movq (%rax), %rcx
leaq 0x1347(%rip), %rdi      # 0x56f9
pushq $0x17
popq %rsi
pushq $0x1
popq %rdx
callq 0x2440
pushq $-0x1
popq %rax
jmp 0x4383
nop
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/planManager/main_PM.cpp
// Function: Server_PM(void*)
void * Server_PM(void *args)
{
	PlanFilePath* f;
	Status* s;
	ModeStruct* m;

	char buffer[1024];
	int i; for(i=0; i>1024; i++) buffer[i] = '\0';

	while(1)
	{
		channelReceptionPM->RecvQueuingMsg(buffer);
		s = (Status*)buffer;

		if(s->code == 3) // nouveau plan
		{
			// ARRIVE de COM PLAN
			f=(PlanFilePath*)buffer;
			cout << "PLAN" << endl;

			pthread_mutex_lock(mu);              // verrouiller la ressource partagé
			PM.destructPlan();
			PM.generatePlan(f->filepath);
			pthread_mutex_unlock(mu);            // deverrouiller la ressource partagé
		}

		else if(s->code == 6) // Changement de mode
		{
			// ARRIVE de FDIR
			m = (ModeStruct*)buffer;
			mode = m->rpiMode;
		}

	        else if (s->code == 17) // telecommande
                {
			// ARRIVE de COM TM
			f=(PlanFilePath*)buffer;
			cout << "TM" << endl;

			// Comment cancel une TM !!? 
			pthread_mutex_lock(mu);              // verrouiller la ressource partagé
			planBack = PM.backup(); // on save ancien plan
			PM.generatePlan(f->filepath); 
			pthread_mutex_unlock(mu);            // deverrouiller la ressource partagé
                }

		usleep(100);
	}

	cout << "Terminaison du Thread " << tid_FD << endl;
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
leaq -0x42c(%rbp), %rbx
leaq -0x430(%rbp), %r14
movq 0x3be3(%rip), %r15      # 0x7fd0
leaq 0x3e8c(%rip), %r13      # 0x8280
pushq $0x64
popq %r12
movq 0x3f89(%rip), %rdi      # 0x8388
movq %r14, %rsi
callq 0x29fa
movl -0x430(%rbp), %eax
cmpl $0x11, %eax
je 0x445b
cmpl $0x6, %eax
je 0x444d
cmpl $0x3, %eax
jne 0x44a4
movq %r15, %rdi
leaq 0x105e(%rip), %rsi      # 0x5488
callq 0x2240
movq %rax, %rdi
callq 0x2150
movq 0x3f5a(%rip), %rdi      # 0x8398
callq 0x2350
movq %r13, %rdi
callq 0x3c52
jmp 0x448d
movb -0x42c(%rbp), %al
movb %al, 0x3f1b(%rip)       # 0x8374
jmp 0x44a4
movq %r15, %rdi
leaq 0x12b6(%rip), %rsi      # 0x571b
callq 0x2240
movq %rax, %rdi
callq 0x2150
movq 0x3f1f(%rip), %rdi      # 0x8398
callq 0x2350
movq %r13, %rdi
callq 0x3d86
movq %rax, 0x3f03(%rip)      # 0x8390
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3c86
movq 0x3ef9(%rip), %rdi      # 0x8398
callq 0x21a0
movl %r12d, %edi
callq 0x2310
jmp 0x43f8
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/planManager/main_PM.cpp
// Function: proceed()
void proceed()
{
	// Fonctionnement normal
	cout << endl << "Fonctionnement" << endl;
	pthread_mutex_lock(mu);              // verrouiller la ressource partagé
	PM.executePlan(&control, channelSM, mode);
	if(planBack!=NULL && PM.backup()==NULL)	// S'il existe
	{
		cout << endl << "TM Executee" << endl;
		PM.recover(planBack);
		planBack=NULL;
	}
	pthread_mutex_unlock(mu);            // deverrouiller la ressource partagé
	usleep(500000);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x3b0e(%rip), %rdi      # 0x7fd0
callq 0x2150
leaq 0x1250(%rip), %rsi      # 0x571e
movq %rax, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x2150
movq 0x3eb3(%rip), %rdi      # 0x8398
callq 0x2350
movq 0x3e8f(%rip), %rdx      # 0x8380
movzbl 0x3e7c(%rip), %ecx      # 0x8374
leaq 0x3d81(%rip), %rdi      # 0x8280
leaq 0x3dea(%rip), %rsi      # 0x82f0
callq 0x3640
cmpq $0x0, 0x3e7d(%rip)      # 0x8390
je 0x4564
leaq 0x3d64(%rip), %rdi      # 0x8280
callq 0x3d86
testq %rax, %rax
jne 0x4564
movq 0x3aa3(%rip), %rdi      # 0x7fd0
callq 0x2150
leaq 0x11f4(%rip), %rsi      # 0x572d
movq %rax, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x2150
movq 0x3e40(%rip), %rsi      # 0x8390
leaq 0x3d29(%rip), %rdi      # 0x8280
callq 0x3daa
andq $0x0, 0x3e2c(%rip)      # 0x8390
movq 0x3e2d(%rip), %rdi      # 0x8398
callq 0x21a0
movl $0x7a120, %edi          # imm = 0x7A120
popq %rbp
jmp 0x2310
// File: /workspace/github_cpp_makefile_star2_O2/CDISC2020[P]Projet_satellite_agile/src/planManager/main_PM.cpp
// Function: Alive(void*)
void* Alive(void* args)
{
	while(1)
	{	
		//str[100]='C' si vous êtes sur la Com, ='P' si vous êtes sur le plan
		char str[2]="P";
		channelFDIR->SendQueuingMsg(str, sizeof(str));

		usleep(10*1000); //10 ms
	}

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq -0x12(%rbp), %rbx
pushq $0x2
popq %r14
movw $0x50, -0x12(%rbp)
movq 0x3dc2(%rip), %rdi      # 0x8378
movq %rbx, %rsi
movl %r14d, %edx
callq 0x29b2
movl $0x2710, %edi           # imm = 0x2710
callq 0x2310
jmp 0x45a9
// File: /workspace/github_cpp_makefile_star2_O2/renbozqin[P]blocking_queue/test.cpp
// Function: main
int main(int argc, char* argv[]){

	BlockingQueue<int> queue;
	BlockingQueue<int> queue2;

	double st = getMS();
	std::thread t1(thread1<int>,std::ref(queue));
	std::thread t2(thread2<int>,std::ref(queue),std::ref(queue2));
	std::thread t3(thread3<int>,std::ref(queue2));

	t1.join();
	t2.join();
	t3.join();
	double et = getMS();
	std::cout << "Muil threads use time: " << et-st << "ms" << std::endl;

	st = getMS();
	thread1(queue);
	thread2(queue,queue2);
	thread3(queue2);
	et = getMS();
	std::cout << "Single thread use time: " << et-st << "ms" << std::endl;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1f0, %rsp            # imm = 0x1F0
leaq -0x200(%rbp), %r14
movq %r14, %rdi
callq 0x25ac
leaq -0x120(%rbp), %rbx
movq %rbx, %rdi
callq 0x25ac
callq 0x256f
movsd %xmm0, -0x30(%rbp)
leaq -0x20(%rbp), %rdx
movq %r14, (%rdx)
leaq 0x25d(%rip), %rsi       # 0x261d
leaq -0x38(%rbp), %rdi
callq 0x266c
leaq -0x18(%rbp), %rdx
movq %r14, (%rdx)
leaq -0x40(%rbp), %rcx
movq %rbx, (%rcx)
leaq 0x307(%rip), %rsi       # 0x26e5
leaq -0x20(%rbp), %rdi
callq 0x2756
leaq -0x40(%rbp), %rdx
movq %rbx, (%rdx)
leaq 0x3eb(%rip), %rsi       # 0x27e0
leaq -0x18(%rbp), %rdi
callq 0x266c
leaq -0x38(%rbp), %rdi
callq 0x21e0
leaq -0x20(%rbp), %rdi
callq 0x21e0
leaq -0x18(%rbp), %rdi
callq 0x21e0
callq 0x256f
movsd %xmm0, -0x28(%rbp)
movq 0x5bae(%rip), %rdi      # 0x7fd8
leaq 0x2bdf(%rip), %rsi      # 0x5010
callq 0x2130
movsd -0x28(%rbp), %xmm0
subsd -0x30(%rbp), %xmm0
movq %rax, %rdi
callq 0x2190
leaq 0x2bd9(%rip), %rsi      # 0x5028
movq %rax, %rdi
callq 0x2130
movq %rax, %rdi
callq 0x20a0
callq 0x256f
movsd %xmm0, -0x30(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x261d
leaq -0x200(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x26e5
leaq -0x120(%rbp), %rdi
callq 0x27e0
callq 0x256f
movsd %xmm0, -0x28(%rbp)
movq 0x5b33(%rip), %rdi      # 0x7fd8
leaq 0x2b7f(%rip), %rsi      # 0x502b
callq 0x2130
movsd -0x28(%rbp), %xmm0
subsd -0x30(%rbp), %xmm0
movq %rax, %rdi
callq 0x2190
leaq 0x2b5e(%rip), %rsi      # 0x5028
movq %rax, %rdi
callq 0x2130
movq %rax, %rdi
callq 0x20a0
leaq -0x18(%rbp), %rdi
callq 0x2832
leaq -0x20(%rbp), %rdi
callq 0x2832
leaq -0x38(%rbp), %rdi
callq 0x2832
leaq -0x120(%rbp), %rdi
callq 0x2842
leaq -0x200(%rbp), %rdi
callq 0x2842
xorl %eax, %eax
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
jmp 0x253d
movq %rax, %rbx
jmp 0x2546
movq %rax, %rbx
jmp 0x254f
movq %rax, %rbx
jmp 0x255b
jmp 0x2531
movq %rax, %rbx
leaq -0x18(%rbp), %rdi
callq 0x2832
leaq -0x20(%rbp), %rdi
callq 0x2832
leaq -0x38(%rbp), %rdi
callq 0x2832
leaq -0x120(%rbp), %rdi
callq 0x2842
leaq -0x200(%rbp), %rdi
callq 0x2842
movq %rbx, %rdi
callq 0x21f0
// File: /workspace/github_cpp_makefile_star2_O2/renbozqin[P]blocking_queue/test.cpp
// Function: void thread2<int>(BlockingQueue<int>&, BlockingQueue<int>&)
void thread2(BlockingQueue<T> &queue, BlockingQueue<T>& queue2){
	int k = 0;
	while(1){
	while(queue.Size()){
		T front = queue.Take();
		queue2.Put(front);
		std::this_thread::sleep_for(std::chrono::milliseconds(37));
		k++;
	}
	if(k==queueSize) break;}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %r13d, %r13d
leaq -0x2c(%rbp), %r15
leaq -0x38(%rbp), %r12
movq %r14, %rdi
callq 0x2faa
testq %rax, %rax
jne 0x271c
cmpl $0xa, %r13d
jne 0x2707
jmp 0x2747
movq %r14, %rdi
callq 0x2d36
movl %eax, -0x2c(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2c1a
movq $0x25, -0x38(%rbp)
movq %r12, %rdi
callq 0x2aee
incl %r13d
jmp 0x2707
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/renbozqin[P]blocking_queue/test.cpp
// Function: void thread3<int>(BlockingQueue<int>&)
void thread3(BlockingQueue<T>& queue){
	int k = 0;
	while(1){
	while(queue.Size()){
		queue.Take();
		std::this_thread::sleep_for(std::chrono::milliseconds(18));
		k++;
	}
	if(k==queueSize)break;}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
leaq -0x20(%rbp), %r14
movq %rbx, %rdi
callq 0x2faa
testq %rax, %rax
jne 0x2809
cmpl $0xa, %r15d
jne 0x27f4
jmp 0x2826
movq %rbx, %rdi
callq 0x2d36
movq $0x12, -0x20(%rbp)
movq %r14, %rdi
callq 0x2aee
incl %r15d
jmp 0x27f4
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/renbozqin[P]blocking_queue/blocking_queue.cpp
// Function: BlockingQueue<int>::Put(int const&)
void BlockingQueue<T>::Put(const T& task){
	std::unique_lock<std::mutex> lock(mtx);
	full_.wait(lock, [this]{return (queue_.size() < capacity_);} );
	assert(queue_.size() < capacity_);
	queue_.push(task);
	empty_.notify_all(); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x28(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2cc0
leaq 0x28(%rbx), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2ce0
leaq 0x88(%rbx), %r15
movq %r15, %rdi
callq 0x39d6
cmpq 0xd8(%rbx), %rax
jae 0x2c8e
movq %r15, %rdi
movq %r14, %rsi
callq 0x3a4e
addq $0x58, %rbx
movq %rbx, %rdi
callq 0x21d0
leaq -0x28(%rbp), %rdi
callq 0x2d1c
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2483(%rip), %rdi      # 0x5118
leaq 0x2496(%rip), %rsi      # 0x5132
leaq 0x24a2(%rip), %rcx      # 0x5145
pushq $0x7
popq %rdx
callq 0x20c0
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x2d1c
movq %rbx, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/renbozqin[P]blocking_queue/blocking_queue.cpp
// Function: BlockingQueue<float>::Take()
T BlockingQueue<T>::Take(){
	std::unique_lock<std::mutex> lock(mtx);
	empty_.wait(lock, [this]{return !queue_.empty();} );
	assert(!queue_.empty());
	T front(queue_.front());
	queue_.pop();
	full_.notify_all();
	return front;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq -0x28(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2cc0
leaq 0x58(%rbx), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3252
movq 0x98(%rbx), %rax
cmpq %rax, 0xb8(%rbx)
je 0x3220
leaq 0x88(%rbx), %rdi
movss (%rax), %xmm0
movss %xmm0, -0x14(%rbp)
callq 0x4146
addq $0x28, %rbx
movq %rbx, %rdi
callq 0x21d0
leaq -0x28(%rbp), %rdi
callq 0x2d1c
movss -0x14(%rbp), %xmm0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1f50(%rip), %rdi      # 0x5177
leaq 0x1f04(%rip), %rsi      # 0x5132
leaq 0x1ffe(%rip), %rcx      # 0x5233
pushq $0x10
popq %rdx
callq 0x20c0
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x2d1c
movq %rbx, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/renbozqin[P]blocking_queue/blocking_queue.cpp
// Function: BlockingQueue<float>::Front()
T BlockingQueue<T>::Front(){
	std::unique_lock<std::mutex> lock(mtx);
	empty_.wait(lock, [this]{return !queue_.empty();} );
	assert(!queue_.empty());
	T front(queue_.front());
	return front;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq -0x28(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2cc0
leaq 0x58(%rbx), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x331c
movq 0x98(%rbx), %rax
cmpq %rax, 0xb8(%rbx)
je 0x32ea
movss (%rax), %xmm0
movss %xmm0, -0x14(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x2d1c
movss -0x14(%rbp), %xmm0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1e86(%rip), %rdi      # 0x5177
leaq 0x1e3a(%rip), %rsi      # 0x5132
leaq 0x1f5f(%rip), %rcx      # 0x525e
pushq $0x21
popq %rdx
callq 0x20c0
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x2d1c
movq %rbx, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/renbozqin[P]blocking_queue/blocking_queue.cpp
// Function: BlockingQueue<float>::Back()
T BlockingQueue<T>::Back(){
	std::unique_lock<std::mutex> lock(mtx);
	empty_.wait(lock, [this]{return !queue_.empty();} );
	assert(!queue_.empty());
	T back(queue_.back());
	return back;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq -0x28(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2cc0
leaq 0x58(%rbx), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3400
movq 0xb8(%rbx), %rax
cmpq 0x98(%rbx), %rax
je 0x33ce
cmpq 0xc0(%rbx), %rax
jne 0x33ad
movq 0xd0(%rbx), %rcx
movl $0x200, %eax            # imm = 0x200
addq -0x8(%rcx), %rax
movss -0x4(%rax), %xmm0
movss %xmm0, -0x14(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x2d1c
movss -0x14(%rbp), %xmm0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1da2(%rip), %rdi      # 0x5177
leaq 0x1d56(%rip), %rsi      # 0x5132
leaq 0x1ea7(%rip), %rcx      # 0x528a
pushq $0x2a
popq %rdx
callq 0x20c0
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x2d1c
movq %rbx, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/ekg[P]fastahack/Fasta.cpp
// Function: FastaIndexEntry::clear()
void FastaIndexEntry::clear(void)
{
    name = "";
    length = 0;
    offset = -1;  // no real offset will ever be below 0, so this allows us to
                  // check if we have already recorded a real offset
    line_blen = 0;
    line_len = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x499d(%rip), %rsi      # 0x8006
callq 0x3470
andl $0x0, 0x20(%rbx)
orq $-0x1, 0x28(%rbx)
andq $0x0, 0x30(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/ekg[P]fastahack/Fasta.cpp
// Function: operator<<(std::ostream&, FastaIndexEntry const&)
ostream& operator<<(ostream& output, const FastaIndexEntry& e) {
    // just write the first component of the name, for compliance with other tools
    output << split(e.name, ' ').at(0) << "\t" << e.length << "\t" << e.offset << "\t" <<
        e.line_blen << "\t" << e.line_len;
    return output;  // for multiple << operators.
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
pushq $0x20
popq %rdx
movq %r15, %rdi
callq 0x6ccd
movq %r15, %rdi
xorl %esi, %esi
callq 0x48ea
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3220
leaq 0x4947(%rip), %rsi      # 0x8005
movq %rax, %rdi
callq 0x3250
movl 0x20(%r14), %esi
movq %rax, %rdi
callq 0x3420
leaq 0x492c(%rip), %rsi      # 0x8005
movq %rax, %rdi
callq 0x3250
movq 0x28(%r14), %rsi
movq %rax, %rdi
callq 0x30f0
leaq 0x4911(%rip), %rsi      # 0x8005
movq %rax, %rdi
callq 0x3250
movl 0x30(%r14), %esi
movq %rax, %rdi
callq 0x3420
leaq 0x48f6(%rip), %rsi      # 0x8005
movq %rax, %rdi
callq 0x3250
movl 0x34(%r14), %esi
movq %rax, %rdi
callq 0x3420
leaq 0x8(%rsp), %rdi
callq 0x490c
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x490c
movq %rbx, %rdi
callq 0x3430
nop
// File: /workspace/github_cpp_makefile_star2_O2/ekg[P]fastahack/Fasta.cpp
// Function: operator<<(std::ostream&, FastaIndex&)
ostream& operator<<(ostream& output, FastaIndex& fastaIndex) {
    vector<FastaIndexEntry> sortedIndex;
    for(vector<string>::const_iterator it = fastaIndex.sequenceNames.begin(); it != fastaIndex.sequenceNames.end(); ++it)
    {
        sortedIndex.push_back(fastaIndex[*it]);
    }
    sort(sortedIndex.begin(), sortedIndex.end(), fastaIndexEntryCompare);
    for( vector<FastaIndexEntry>::iterator fit = sortedIndex.begin(); fit != sortedIndex.end(); ++fit) {
        output << *fit << endl;
    }
    return output;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, (%r15)
andq $0x0, 0x10(%r15)
movq 0x30(%rsi), %r12
cmpq 0x38(%r14), %r12
je 0x3b70
movq %r14, %rdi
movq %r12, %rsi
callq 0x49d8
movq %r15, %rdi
movq %rax, %rsi
callq 0x49ac
addq $0x20, %r12
jmp 0x3b4e
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
leaq -0x62(%rip), %rdx       # 0x3b1e
callq 0x5649
movq (%rsp), %r14
cmpq 0x8(%rsp), %r14
je 0x3ba9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3683
movq %rbx, %rdi
callq 0x3130
addq $0x38, %r14
jmp 0x3b89
movq %rsp, %rdi
callq 0x4a3e
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x3bc4
jmp 0x3bc4
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4a3e
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O2/ekg[P]fastahack/Fasta.cpp
// Function: getlineCounting(std::istream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int&)
bool getlineCounting(istream& in, string& line, int& bytes) {
    bytes = 0;
    line.clear();
    for(int got = in.get(); got != EOF; got = in.get()) {
        bytes++;
        if (got == '\n') {
            // Line is over, but we read something (the '\n')
            return true;
        } else if (got != '\r') {
            // Anything other than a '\r' is real data.
            line.push_back((char)got);
        }
        // '\r' is skipped, but still counted in bytes
    }
    return !line.empty();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
andl $0x0, (%rdx)
movq %rsi, %r14
andq $0x0, 0x8(%rsi)
movq %rdi, %r15
movq (%rsi), %rax
movb $0x0, (%rax)
movq %r15, %rdi
callq 0x32e0
cmpl $-0x1, %eax
je 0x3c19
incl (%rbx)
cmpl $0xd, %eax
je 0x3bf3
cmpl $0xa, %eax
je 0x3c23
movsbl %al, %esi
movq %r14, %rdi
callq 0x3200
jmp 0x3bf3
cmpq $0x0, 0x8(%r14)
setne %al
jmp 0x3c25
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ekg[P]fastahack/Fasta.cpp
// Function: FastaIndex::flushEntryToIndex(FastaIndexEntry&)
void FastaIndex::flushEntryToIndex(FastaIndexEntry& entry) {
    string name = split(entry.name, " \t").at(0);  // key by first token of name
    sequenceNames.push_back(name);
    this->insert(make_pair(name, FastaIndexEntry(entry.name, entry.length,
                        entry.offset, entry.line_blen,
                        entry.line_len)));

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x40cc(%rip), %rsi      # 0x8004
leaq 0x90(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x492e
leaq 0x28(%rsp), %rdi
leaq 0x90(%rsp), %rdx
movq %r14, %rsi
callq 0x6dbd
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x48ea
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x3330
leaq 0x28(%rsp), %rdi
callq 0x490c
leaq 0x90(%rsp), %rdi
callq 0x3120
leaq 0x30(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x496a
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
callq 0x3330
movl 0x20(%r14), %ebp
movq 0x28(%r14), %r15
movsd 0x30(%r14), %xmm0
movaps %xmm0, 0x60(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x3330
leaq 0x28(%rsp), %rdx
movl %ebp, 0x20(%rdx)
movq %r15, 0x28(%rdx)
movaps 0x60(%rsp), %xmm0
movlps %xmm0, 0x30(%rdx)
leaq 0x90(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x4b9e
leaq 0x90(%rsp), %rsi
movq %rbx, %rdi
callq 0x4ebe
leaq 0x90(%rsp), %rdi
callq 0x4996
leaq 0x28(%rsp), %rdi
callq 0x3120
leaq 0x70(%rsp), %rdi
callq 0x3120
leaq 0x8(%rsp), %rdi
callq 0x3120
addq $0xe8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x4996
jmp 0x4051
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3120
jmp 0x4060
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x3120
jmp 0x4071
jmp 0x406e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x4097
movq %rax, %rbx
jmp 0x408f
movq %rax, %rbx
jmp 0x409c
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x490c
leaq 0x90(%rsp), %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O2/ekg[P]fastahack/Fasta.cpp
// Function: FastaIndex::writeIndexFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void FastaIndex::writeIndexFile(string fname) {
    //cerr << "writing fasta index file " << fname << endl;
    ofstream file;
    file.open(fname.c_str()); 
    if (file.is_open()) {
        file << *this;
    } else { 
        cerr << "could not open index file " << fname << " for writing!" << endl;
        exit(1);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rdi
callq 0x3410
movq (%rbx), %rsi
pushq $0x10
popq %rdx
movq %r15, %rdi
callq 0x3050
leaq 0x70(%rsp), %rdi
callq 0x30a0
testb %al, %al
je 0x40fd
movq %rsp, %rdi
movq %r14, %rsi
callq 0x3b2a
movq %rsp, %rdi
callq 0x3370
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
retq
movq 0x7eec(%rip), %rdi      # 0xbff0
leaq 0x3f45(%rip), %rsi      # 0x8050
callq 0x3250
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3220
leaq 0x3ff8(%rip), %rsi      # 0x811a
movq %rax, %rdi
callq 0x3250
movq %rax, %rdi
callq 0x3130
pushq $0x1
popq %rdi
callq 0x32f0
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3370
movq %rbx, %rdi
callq 0x3430
nop
// File: /workspace/github_cpp_makefile_star2_O2/ekg[P]fastahack/Fasta.cpp
// Function: FastaIndex::entry(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
FastaIndexEntry FastaIndex::entry(string name) {
    FastaIndex::iterator e = this->find(name);
    if (e == this->end()) {
        cerr << "unable to find FASTA index entry for '" << name << "'" << endl;
        exit(1);
    } else {
        return e->second;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x6018
addq $0x8, %r15
cmpq %r15, %rax
je 0x41cc
addq $0x40, %rax
movq %r14, %rdi
movq %rax, %rsi
callq 0x4a74
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0x7e1d(%rip), %rdi      # 0xbff0
leaq 0x3f4e(%rip), %rsi      # 0x8128
callq 0x3250
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3220
leaq 0x3f5c(%rip), %rsi      # 0x814d
movq %rax, %rdi
callq 0x3250
movq %rax, %rdi
callq 0x3130
pushq $0x1
popq %rdi
callq 0x32f0
nop