LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq -0x98(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rsi), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %rbx
movq %rbx, %rdi
callq 0x48e2
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42b8
movq -0xa8(%rbp), %rdi
cmpq %r12, %rdi
je 0x44bd
callq 0x3270
leaq 0x5884(%rip), %rax      # 0x9d48
movq %rax, (%r14)
leaq 0x20(%r14), %rbx
leaq 0x30(%r14), %r13
movq %r13, 0x20(%r14)
movq $0x0, 0x28(%r14)
movb $0x0, 0x30(%r14)
leaq -0x88(%rbp), %rdi
movl $0x7, %edx
movl $0x5, %ecx
movq %r15, %rsi
callq 0x32c0
movq -0x88(%rbp), %rdi
callq 0x3400
movl %eax, 0x40(%r14)
movq 0x8(%r15), %rcx
addq $-0xc, %rcx
leaq -0x68(%rbp), %rdi
movl $0xc, %edx
movq %r15, %rsi
callq 0x32c0
leaq 0x2b9a(%rip), %rsi      # 0x70c3
leaq -0x68(%rbp), %r12
movl $0x1, %ecx
movq %r12, %rdi
xorl %edx, %edx
callq 0x3480
leaq -0x48(%rbp), %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x32c0
leaq -0x48(%rbp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3340
movq (%r12), %rdi
leaq -0x38(%rbp), %r12
cmpq %r12, %rdi
je 0x456e
callq 0x3270
movq 0x28(%r14), %rdx
addq $0xd, %rdx
leaq -0x48(%rbp), %rdi
movl $0x2, %ecx
movq %r15, %rsi
callq 0x32c0
movq -0x48(%rbp), %rbx
movq %rbx, %rdi
callq 0x3400
movl %eax, 0x18(%r14)
cmpq %r12, %rbx
je 0x45a4
movq %rbx, %rdi
callq 0x3270
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x45b6
callq 0x3270
leaq -0x78(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x45c8
callq 0x3270
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x45dc
movq %rax, %r14
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x45f6
callq 0x3270
jmp 0x45f6
movq %rax, %r14
leaq -0x78(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x460d
callq 0x3270
jmp 0x460d
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x461a
callq 0x3270
movq %r14, %rdi
callq 0x3490
movq %rax, %r14
movq -0xa8(%rbp), %rdi
cmpq %r12, %rdi
jne 0x4615
jmp 0x461a
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2b99(%rip), %rdi      # 0x71e6
xorl %eax, %eax
callq 0x3050
movsbl 0x14(%rbx), %esi
leaq 0x2b9d(%rip), %rdi      # 0x71fc
xorl %eax, %eax
callq 0x3050
movq 0x20(%rbx), %rsi
leaq 0x2b95(%rip), %rdi      # 0x7206
xorl %eax, %eax
callq 0x3050
movl 0x40(%rbx), %esi
leaq 0x2b93(%rip), %rdi      # 0x7215
xorl %eax, %eax
callq 0x3050
movl 0x18(%rbx), %esi
leaq 0x2b8e(%rip), %rdi      # 0x7221
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3050
// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x40(%rbp), %r15
movq %r15, %rdi
callq 0x48e2
movq %rbx, %rdi
movq %r15, %rsi
callq 0x42b8
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x4735
callq 0x3270
leaq 0x5624(%rip), %rax      # 0x9d60
movq %rax, (%rbx)
leaq -0x60(%rbp), %r15
movl $0x7, %edx
movl $0x9, %ecx
movq %r15, %rdi
movq %r14, %rsi
callq 0x32c0
movq (%r15), %r15
movq %r15, %rdi
callq 0x3400
cltq
imulq $0x431bde83, %rax, %rax # imm = 0x431BDE83
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x32, %rax
addl %ecx, %eax
movl %eax, 0x24(%rbx)
movq %r15, %rdi
callq 0x3400
cltq
imulq $0x10624dd3, %rax, %rcx # imm = 0x10624DD3
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x26, %rcx
addl %edx, %ecx
imull $0x3e8, %ecx, %ecx      # imm = 0x3E8
subl %ecx, %eax
movl %eax, 0x20(%rbx)
movq %r15, %rdi
callq 0x3400
cltq
imulq $0x431bde83, %rax, %rcx # imm = 0x431BDE83
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x32, %rcx
addl %edx, %ecx
imull $0xf4240, %ecx, %ecx    # imm = 0xF4240
subl %ecx, %eax
cltq
imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x26, %rax
addl %ecx, %eax
movl %eax, 0x1c(%rbx)
leaq -0x80(%rbp), %rdi
movl $0x11, %edx
movl $0x2, %ecx
movq %r14, %rsi
callq 0x32c0
leaq -0x70(%rbp), %r15
movq -0x10(%r15), %r14
movq %r14, %rdi
callq 0x3400
movl %eax, 0x18(%rbx)
cmpq %r15, %r14
je 0x481a
movq %r14, %rdi
callq 0x3270
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x482c
callq 0x3270
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x4857
jmp 0x485c
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x485c
callq 0x3270
movq %rbx, %rdi
callq 0x3490
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2969(%rip), %rdi      # 0x71e6
xorl %eax, %eax
callq 0x3050
movsbl 0x14(%rbx), %esi
leaq 0x296d(%rip), %rdi      # 0x71fc
xorl %eax, %eax
callq 0x3050
movl 0x24(%rbx), %esi
movl 0x1c(%rbx), %edx
movl 0x20(%rbx), %ecx
leaq 0x2987(%rip), %rdi      # 0x722d
xorl %eax, %eax
callq 0x3050
movl 0x18(%rbx), %esi
leaq 0x296a(%rip), %rdi      # 0x7221
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3050
// File: /workspace/github_cpp_makefile_star2_O3/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 0x49e4
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_O3/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 0x57c9
callq 0x3270
movq $0x0, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x18(%rbx)
movups %xmm0, 0x8(%rbx)
movl $0x0, 0x68(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x47c4(%rip), %r15      # 0x9fd0
leaq 0x1c96(%rip), %rsi      # 0x74a9
movl $0xd, %edx
movq %r15, %rdi
callq 0x3300
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
movq %r14, %rsi
callq 0x3110
movl $0x328, %edi            # imm = 0x328
callq 0x32b0
movq %rax, %r15
movq %rax, %rdi
callq 0x4980
movq %r15, (%rbx)
movq %r15, %rdi
movq %r14, %rsi
callq 0x49ec
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x18(%rbx)
movups %xmm0, 0x8(%rbx)
movl $0x0, 0x68(%rbx)
movq 0x472d(%rip), %rbx      # 0x9fd0
leaq 0x1c0d(%rip), %rsi      # 0x74b7
movl $0xc, %edx
movq %rbx, %rdi
callq 0x3300
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq 0x46fb(%rip), %rdi      # 0x9fd0
callq 0x3030
movq %rax, %rdi
callq 0x31a0
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x58f4
callq 0x3270
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x3270
jmp 0x590f
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5921
callq 0x3270
movq %rbx, %rdi
callq 0x3490
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x5937
jmp 0x4992
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x468c(%rip), %rbx      # 0x9fd0
leaq 0x1b79(%rip), %rsi      # 0x74c4
movl $0x8, %edx
movq %rbx, %rdi
callq 0x3300
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x31a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3450
movq (%r15), %rsi
movq %r12, %rdi
movl $0x1, %edx
callq 0x3060
leaq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x3250
movq %r12, %rdi
callq 0x31d0
movq %rax, %r12
movq 0x4447(%rip), %rdi      # 0x9fd0
leaq 0x1952(%rip), %rsi      # 0x74e2
movl $0x22, %edx
callq 0x3300
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x4428(%rip), %rdi      # 0x9fd0
callq 0x3300
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
leaq -0x1c0(%rbp), %rdi
callq 0x30b0
testb %al, %al
je 0x5c54
movq %r12, %rdi
callq 0x3120
movq (%r14), %r8
leaq 0x190c(%rip), %r13      # 0x7505
leaq -0x620(%rbp), %r15
movq %r15, %rdi
movq %r13, %rsi
movl %ebx, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x3090
movq %r12, %rdi
callq 0x3120
movq (%r14), %rcx
movq %r13, %rdi
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x3050
movq %r15, %rdi
callq 0x3130
leaq -0x230(%rbp), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3300
leaq -0x230(%rbp), %rdi
callq 0x3380
jmp 0x5ca9
movq 0x4375(%rip), %rdi      # 0x9fd0
leaq 0x18b4(%rip), %rsi      # 0x7516
movl $0x22, %edx
callq 0x3300
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x4356(%rip), %rdi      # 0x9fd0
callq 0x3300
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movq 0x4318(%rip), %rax      # 0x9fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x228(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x230(%rbp,%rcx)
callq 0x3220
leaq -0x138(%rbp), %rdi
callq 0x30f0
addq $0x5f8, %rsp            # imm = 0x5F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5cf5
jmp 0x5cf5
movq %rax, %rbx
leaq -0x230(%rbp), %rdi
callq 0x33c0
movq %rbx, %rdi
callq 0x3490
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1785(%rip), %xmm0     # 0x7550
leaq -0x80(%rbp), %r15
movaps %xmm0, 0x10(%r15)
movaps 0x1765(%rip), %xmm1     # 0x7540
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 0x1761(%rip), %rsi      # 0x7561
movq %r15, %rdi
xorl %eax, %eax
callq 0x3090
leaq 0x1770(%rip), %rsi      # 0x7581
movq %r12, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x3090
movq %r15, %rdi
callq 0x3230
testl %eax, %eax
jne 0x5e38
leaq -0x50(%rbp), %rdi
callq 0x3230
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_O3/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 0x171b(%rip), %rdi      # 0x75c4
xorl %ebx, %ebx
movl $0x1, %esi
xorl %eax, %eax
callq 0x31c0
cmpl $-0x1, %eax
je 0x5f01
movl %eax, %r14d
leaq 0x16fb(%rip), %rdx      # 0x75c1
leaq -0x23(%rbp), %r12
movl $0x3, %esi
movq %r12, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x3410
movslq %eax, %rdx
movl %r14d, %edi
movq %r12, %rsi
callq 0x3100
movl %r14d, %edi
callq 0x34e0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x35d5
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x5ef2
// File: /workspace/github_cpp_makefile_star2_O3/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 0x16d9(%rip), %rdi      # 0x75ff
xorl %ebx, %ebx
movl $0x1, %esi
xorl %eax, %eax
callq 0x31c0
cmpl $-0x1, %eax
je 0x5f7e
movl %eax, %r14d
leaq 0x167e(%rip), %rdx      # 0x75c1
leaq -0x23(%rbp), %r12
movl $0x3, %esi
movq %r12, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x3410
movslq %eax, %rdx
movl %r14d, %edi
movq %r12, %rsi
callq 0x3100
movl %r14d, %edi
callq 0x34e0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x3604
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x5f6f
// File: /workspace/github_cpp_makefile_star2_O3/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 0x169d(%rip), %rdx      # 0x763e
leaq -0x40(%rbp), %rbx
movl $0x23, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3410
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x31c0
cmpl $-0x1, %eax
je 0x6008
movl %eax, %ebx
xorl %edx, %edx
xorl %eax, %eax
testl %r14d, %r14d
sete %dl
setne %al
leaq (%rax,%rax,2), %rax
leaq 0x175f(%rip), %rsi      # 0x7741
addq %rax, %rsi
xorq $0x3, %rdx
movl %ebx, %edi
callq 0x3100
cmpq $-0x1, %rax
je 0x600f
movl %ebx, %edi
callq 0x34e0
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x3662
jmp 0x6014
callq 0x3633
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x5fff
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1678(%rip), %rdx      # 0x76a5
leaq -0x30(%rbp), %rbx
movl $0x1e, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3410
movq %rbx, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x31c0
cmpl $-0x1, %eax
je 0x6080
movl %eax, %ebx
leaq -0xb(%rbp), %rsi
movl $0x3, %edx
movl %eax, %edi
callq 0x3390
cmpq $-0x1, %rax
je 0x6087
movl %ebx, %edi
callq 0x34e0
leaq -0xb(%rbp), %rdi
callq 0x3400
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
callq 0x36c0
jmp 0x608c
callq 0x3691
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x6079
// File: /workspace/github_cpp_makefile_star2_O3/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 0x15fc(%rip), %rdx      # 0x76a5
leaq -0x30(%rbp), %r14
movl $0x1e, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x3410
movq %r14, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x31c0
cmpl $-0x1, %eax
je 0x6106
movl %eax, %r14d
leaq 0x166e(%rip), %rsi      # 0x7748
cmpl $0x1, %ebx
sbbq $-0x1, %rsi
movl $0x1, %edx
movl %eax, %edi
callq 0x3100
cmpq $0x1, %rax
jne 0x610d
movl %r14d, %edi
callq 0x34e0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x371e
jmp 0x6112
callq 0x36ef
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x60fd
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3e8b(%rip), %r15      # 0x9fd0
leaq 0x4174(%rip), %r13      # 0xa2c0
leaq 0x135f(%rip), %r12      # 0x74b2
movq 0x426e(%rip), %rdi      # 0xa3c8
movq %r14, %rsi
callq 0x3dc8
movl -0x430(%rbp), %eax
cmpl $0x11, %eax
je 0x61d6
cmpl $0x6, %eax
je 0x61c8
cmpl $0x3, %eax
jne 0x6243
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3300
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movq 0x421f(%rip), %rdi      # 0xa3d8
callq 0x33b0
movq %r13, %rdi
callq 0x57ac
jmp 0x622c
movb -0x42c(%rbp), %al
movb %al, 0x41e0(%rip)       # 0xa3b4
jmp 0x6243
movl $0x2, %edx
movq %r15, %rdi
leaq 0x1566(%rip), %rsi      # 0x774b
callq 0x3300
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movq 0x41c0(%rip), %rdi      # 0xa3d8
callq 0x33b0
movq %r13, %rdi
callq 0x5994
movq %rax, 0x41a4(%rip)      # 0xa3d0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x57f2
movq 0x419a(%rip), %rdi      # 0xa3d8
callq 0x31e0
movl $0x64, %edi
callq 0x3370
jmp 0x6153
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r14
pushq %rbx
movq 0x3d6a(%rip), %rbx      # 0x9fd0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movq %rax, %r14
leaq 0x14b7(%rip), %rsi      # 0x774e
movl $0xe, %edx
movq %rax, %rdi
callq 0x3300
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movq 0x4106(%rip), %rdi      # 0xa3d8
callq 0x33b0
movq 0x40e2(%rip), %rdx      # 0xa3c0
movzbl 0x40cf(%rip), %ecx      # 0xa3b4
leaq 0x3fd4(%rip), %rdi      # 0xa2c0
leaq 0x403d(%rip), %rsi      # 0xa330
callq 0x4ed8
cmpq $0x0, 0x40d0(%rip)      # 0xa3d0
je 0x639e
leaq 0x3fb3(%rip), %rdi      # 0xa2c0
callq 0x5994
testq %rax, %rax
jne 0x639e
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movq %rax, %rbx
leaq 0x1411(%rip), %rsi      # 0x775d
movl $0xb, %edx
movq %rax, %rdi
callq 0x3300
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
movq 0x4049(%rip), %rsi      # 0xa3d0
leaq 0x3f32(%rip), %rdi      # 0xa2c0
callq 0x59b8
movq $0x0, 0x4032(%rip) # 0xa3d0
movq 0x4033(%rip), %rdi      # 0xa3d8
callq 0x31e0
movl $0x7a120, %edi          # imm = 0x7A120
popq %rbx
popq %r14
popq %rbp
jmp 0x3370
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
pushq %rax
leaq -0xa(%rbp), %rbx
movw $0x50, -0xa(%rbp)
movq 0x3fce(%rip), %rdi      # 0xa3b8
movq %rbx, %rsi
movl $0x2, %edx
callq 0x3d86
movl $0x2710, %edi           # imm = 0x2710
callq 0x3370
jmp 0x63dd
// File: /workspace/github_cpp_makefile_star2_O3/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 -0x40(%rbp), %r12
movq %r14, %rdi
callq 0x3118
testq %rax, %rax
je 0x2936
movq %r14, %rdi
callq 0x2f0a
movl %eax, -0x2c(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2d5a
movq $0x0, -0x40(%rbp)
movq $0x2349340, -0x38(%rbp) # imm = 0x2349340
movq %r12, %rdi
movq %r12, %rsi
callq 0x2070
cmpl $-0x1, %eax
jne 0x2931
callq 0x2040
cmpl $0x4, (%rax)
je 0x2917
incl %r13d
jmp 0x28e4
cmpl $0xa, %r13d
jne 0x28e4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
subq $0x18, %rsp
movq %rdi, %rbx
xorl %r15d, %r15d
leaq -0x28(%rbp), %r14
movq %rbx, %rdi
callq 0x3118
testq %rax, %rax
je 0x2a36
movq %rbx, %rdi
callq 0x2f0a
movq $0x0, -0x28(%rbp)
movq $0x112a880, -0x20(%rbp) # imm = 0x112A880
movq %r14, %rdi
movq %r14, %rsi
callq 0x2070
cmpl $-0x1, %eax
jne 0x2a31
callq 0x2040
cmpl $0x4, (%rax)
je 0x2a17
incl %r15d
jmp 0x29f2
cmpl $0xa, %r15d
jne 0x29f2
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %rdi, (%r15)
movb $0x0, 0x8(%r15)
movq %r15, %rdi
callq 0x3c78
movb $0x1, 0x8(%r15)
leaq 0x28(%rbx), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2e70
movq 0xd0(%rbx), %rax
movq %rax, %rcx
subq 0xb0(%rbx), %rcx
shrq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
shlq $0x7, %rcx
movq 0xa8(%rbx), %rdx
movq 0xb8(%rbx), %rax
movq %rax, %rsi
subq 0xc0(%rbx), %rsi
sarq $0x2, %rsi
subq 0x98(%rbx), %rdx
sarq $0x2, %rdx
addq %rsi, %rdx
addq %rcx, %rdx
cmpq 0xd8(%rbx), %rdx
jae 0x2e3d
movq 0xc8(%rbx), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x2e0e
movl (%r14), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0xb8(%rbx)
jmp 0x2e1d
leaq 0x88(%rbx), %rdi
movq %r14, %rsi
callq 0x3cf0
addq $0x58, %rbx
movq %rbx, %rdi
callq 0x21f0
leaq -0x28(%rbp), %rdi
callq 0x2ef0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x22d4(%rip), %rdi      # 0x5118
leaq 0x22e7(%rip), %rsi      # 0x5132
leaq 0x22f3(%rip), %rcx      # 0x5145
movl $0x7, %edx
callq 0x20c0
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x2ef0
movq %rbx, %rdi
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %r14
movq %rdi, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x3c78
movb $0x1, 0x8(%r14)
movq 0x98(%rbx), %rax
movq 0xb8(%rbx), %rcx
cmpq %rax, %rcx
jne 0x3492
leaq 0x58(%rbx), %r14
leaq -0x30(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2060
movq 0x98(%rbx), %rax
movq 0xb8(%rbx), %rcx
cmpq %rax, %rcx
je 0x3474
cmpq %rax, %rcx
je 0x34d1
leaq 0x88(%rbx), %rdi
movss (%rax), %xmm0
movss %xmm0, -0x1c(%rbp)
callq 0x42d6
addq $0x28, %rbx
movq %rbx, %rdi
callq 0x21f0
leaq -0x30(%rbp), %rdi
callq 0x2ef0
movss -0x1c(%rbp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c9f(%rip), %rdi      # 0x5177
leaq 0x1c53(%rip), %rsi      # 0x5132
leaq 0x1d4d(%rip), %rcx      # 0x5233
movl $0x10, %edx
callq 0x20c0
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %r14
movq %rdi, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x3c78
movb $0x1, 0x8(%r14)
movq 0x98(%rbx), %rax
movq 0xb8(%rbx), %rcx
cmpq %rax, %rcx
jne 0x3552
leaq 0x58(%rbx), %r14
leaq -0x30(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2060
movq 0x98(%rbx), %rax
movq 0xb8(%rbx), %rcx
cmpq %rax, %rcx
je 0x3534
cmpq %rax, %rcx
je 0x3579
movss (%rax), %xmm0
movss %xmm0, -0x1c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2ef0
movss -0x1c(%rbp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1bf7(%rip), %rdi      # 0x5177
leaq 0x1bab(%rip), %rsi      # 0x5132
leaq 0x1cd0(%rip), %rcx      # 0x525e
movl $0x21, %edx
callq 0x20c0
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %r14
movq %rdi, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x3c78
movb $0x1, 0x8(%r14)
movq 0x98(%rbx), %rcx
movq 0xb8(%rbx), %rax
cmpq %rcx, %rax
jne 0x35fa
leaq 0x58(%rbx), %r14
leaq -0x30(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2060
movq 0x98(%rbx), %rcx
movq 0xb8(%rbx), %rax
cmpq %rcx, %rax
je 0x35dc
cmpq %rcx, %rax
je 0x363b
cmpq 0xc0(%rbx), %rax
jne 0x3618
movq 0xd0(%rbx), %rcx
movl $0x200, %eax            # imm = 0x200
addq -0x8(%rcx), %rax
movss -0x4(%rax), %xmm0
movss %xmm0, -0x1c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2ef0
movss -0x1c(%rbp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b35(%rip), %rdi      # 0x5177
leaq 0x1ae9(%rip), %rsi      # 0x5132
leaq 0x1c3a(%rip), %rcx      # 0x528a
movl $0x2a, %edx
callq 0x20c0
// File: /workspace/github_cpp_makefile_star2_O3/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
movq 0x8(%rdi), %rdx
leaq 0x58a3(%rip), %rcx      # 0x9006
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x33f0
movl $0x0, 0x20(%rbx)
movq $-0x1, 0x28(%rbx)
movq $0x0, 0x30(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movq %r15, %rdi
movl $0x20, %edx
callq 0x8836
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0x3881
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x3320
movq %rax, %r15
leaq 0x581d(%rip), %rsi      # 0x9005
movl $0x1, %edx
movq %rax, %rdi
callq 0x3320
movl 0x20(%r14), %esi
movq %r15, %rdi
callq 0x3470
movq %rax, %r15
leaq 0x57fa(%rip), %rsi      # 0x9005
movl $0x1, %edx
movq %rax, %rdi
callq 0x3320
movq 0x28(%r14), %rsi
movq %r15, %rdi
callq 0x3120
movq %rax, %r15
leaq 0x57d7(%rip), %rsi      # 0x9005
movl $0x1, %edx
movq %rax, %rdi
callq 0x3320
movl 0x30(%r14), %esi
movq %r15, %rdi
callq 0x3470
movq %rax, %r15
leaq 0x57b4(%rip), %rsi      # 0x9005
movl $0x1, %edx
movq %rax, %rdi
callq 0x3320
movl 0x34(%r14), %esi
movq %r15, %rdi
callq 0x3470
leaq 0x8(%rsp), %rdi
callq 0x51f6
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x593f(%rip), %rdi      # 0x91c7
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x33d0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x51f6
movq %rbx, %rdi
callq 0x3490
// File: /workspace/github_cpp_makefile_star2_O3/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 %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x30(%rsi), %r15
cmpq 0x38(%rsi), %r15
je 0x3f0a
movq %rsi, %r14
movq %rsp, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x5326
movq %r12, %rdi
movq %rax, %rsi
callq 0x52c8
addq $0x20, %r15
cmpq 0x38(%r14), %r15
jne 0x3e89
movq (%rsp), %r14
movq 0x8(%rsp), %r15
cmpq %r15, %r14
je 0x3f45
movq %r15, %rax
subq %r14, %rax
sarq $0x3, %rax
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rax, %rcx
bsrq %rcx, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
leaq -0x9c(%rip), %rcx       # 0x3e4b
movq %r14, %rdi
movq %r15, %rsi
callq 0x610b
leaq -0xae(%rip), %rdx       # 0x3e4b
movq %r14, %rdi
movq %r15, %rsi
callq 0x61fd
movq (%rsp), %r14
jmp 0x3f45
xorl %r14d, %r14d
jmp 0x3f45
movq %rbx, %rdi
movq %r14, %rsi
callq 0x37a1
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31d0
addq $0x38, %r14
cmpq 0x8(%rsp), %r14
jne 0x3f0f
movq %rsp, %rdi
callq 0x53a2
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x3f67
jmp 0x3f67
movq %rax, %rbx
movq %rsp, %rdi
callq 0x53a2
movq %rbx, %rdi
callq 0x3490
// File: /workspace/github_cpp_makefile_star2_O3/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, %r14
movq %rsi, %rbx
movq %rdi, %r15
movl $0x0, (%rdx)
movq $0x0, 0x8(%rsi)
movq (%rsi), %rax
movb $0x0, (%rax)
callq 0x3350
cmpl $-0x1, %eax
je 0x3fc3
incl (%r14)
cmpl $0xd, %eax
je 0x3fbe
cmpl $0xa, %eax
je 0x3fcd
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3240
movq %r15, %rdi
jmp 0x3f9c
cmpq $0x0, 0x8(%rbx)
setne %al
jmp 0x3fcf
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x88(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4be5(%rip), %rsi      # 0x9004
leaq 0x4be0(%rip), %rdx      # 0x9006
leaq 0x78(%rsp), %rdi
callq 0x5620
leaq 0x40(%rsp), %rdi
leaq 0x78(%rsp), %rdx
movq %r14, %rsi
callq 0x895c
movq 0x40(%rsp), %rax
cmpq %rax, 0x48(%rsp)
je 0x45b8
leaq 0x10(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x558a
leaq 0x40(%rsp), %rdi
callq 0x51f6
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x4491
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x32d0
leaq 0x30(%rbx), %rdi
movq %rsp, %rsi
callq 0x5254
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x558a
movl 0x20(%r14), %ebp
movq 0x28(%r14), %r15
movsd 0x30(%r14), %xmm0
movaps %xmm0, 0xd0(%rsp)
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0x558a
leaq 0x40(%rsp), %rdx
movl %ebp, 0x20(%rdx)
movq %r15, 0x28(%rdx)
movaps 0xd0(%rsp), %xmm0
movlps %xmm0, 0x30(%rdx)
leaq 0x78(%rsp), %rdi
movq %rsp, %rsi
callq 0x5516
leaq 0x78(%rsp), %rsi
movq %rbx, %rdi
callq 0x58c2
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4543
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x455d
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x4574
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x458b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32d0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x45a6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32d0
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4c08(%rip), %rdi      # 0x91c7
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x33d0
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x5292
jmp 0x45dc
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x45f8
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x45f8
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x4616
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x4616
jmp 0x4613
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x465c
movq 0x10(%rsp), %rsi
jmp 0x4654
movq %rax, %rbx
jmp 0x4642
movq %rax, %rbx
jmp 0x465c
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x51f6
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x465c
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x32d0
movq %rbx, %rdi
callq 0x3490
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3460
movq (%rbx), %rsi
movq %r15, %rdi
movl $0x10, %edx
callq 0x3060
leaq 0x70(%rsp), %rdi
callq 0x30a0
testb %al, %al
je 0x46e8
movq %rsp, %rdi
movq %r14, %rsi
callq 0x3e57
movq 0x8907(%rip), %rax      # 0xcfb8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x8(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, (%rsp,%rcx)
callq 0x3230
leaq 0xf8(%rsp), %rdi
callq 0x3100
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
retq
movq 0x8901(%rip), %rdi      # 0xcff0
leaq 0x495a(%rip), %rsi      # 0x9050
movl $0x1a, %edx
callq 0x3320
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x88e2(%rip), %rdi      # 0xcff0
callq 0x3320
movq %rax, %rbx
leaq 0x49fd(%rip), %rsi      # 0x911a
movl $0xd, %edx
movq %rax, %rdi
callq 0x3320
movq %rbx, %rdi
callq 0x3150
movl $0x1, %edi
callq 0x3360
movq %rax, %rbx
movq %rsp, %rdi
callq 0x33b0
movq %rbx, %rdi
callq 0x3490
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x7180
addq $0x8, %r12
cmpq %r12, %rax
je 0x47f6
movq %rax, %r15
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x40(%r15), %rsi
movq 0x48(%r15), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x558a
movq 0x70(%r15), %rax
movq %rax, 0x30(%rbx)
movups 0x60(%r15), %xmm0
movups %xmm0, 0x20(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x87f3(%rip), %rdi      # 0xcff0
leaq 0x4924(%rip), %rsi      # 0x9128
callq 0x32a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x3260
leaq 0x4932(%rip), %rsi      # 0x914d
movq %rax, %rdi
callq 0x32a0
movq %rax, %rdi
callq 0x3150
movl $0x1, %edi
callq 0x3360
nop
// File: /workspace/github_cpp_makefile_star2_O3/ekg[P]fastahack/Fasta.cpp
// Function: FastaReference::~FastaReference()
FastaReference::~FastaReference(void) {
    if (file != NULL)
      fclose(file);
    if (index != NULL)
      delete index;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0x4b8d
callq 0x32b0
movq 0x40(%rbx), %r14
testq %r14, %r14
je 0x4bab
movq %r14, %rdi
callq 0x4750
movl $0x280, %esi            # imm = 0x280
movq %r14, %rdi
callq 0x32d0
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x4bca
movq (%rbx), %rsi
incq %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x32d0
addq $0x8, %rsp
popq %rbx
popq %r14
retq