LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/manikandan5[P]Image-Matching-Stitching-Warping/siftpp/sift.cpp
// Function: VL::Detail::operator>>(std::istream&, VL::Detail::_cmnt&)
std::istream& 
operator>>(std::istream& is, _cmnt& manip)
{
  char c ;
  char b [1024] ; 
  is>>c ;
  if( c != '#' ) 
    return is.putback(c) ;
  is.getline(b,1024) ;
  return is ;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rdi, %rbx
leaq 0xf(%rsp), %r14
movq %r14, %rsi
callq 0x4690
movb (%r14), %al
cmpb $0x23, %al
jne 0x6ceb0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4520
movsbl %al, %ecx
leaq 0x10(%rsp), %rsi
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rdi
callq 0x4a50
jmp 0x6cebe
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4a00
movq %rax, %rbx
movq %rbx, %rax
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/manikandan5[P]Image-Matching-Stitching-Warping/siftpp/sift.cpp
// Function: VL::insertPgm(std::ostream&, float const*, int, int)
std::ostream& 
insertPgm(std::ostream& os, pixel_t const* im, int width, int height)
{
  os<< "P5"   << "\n"
    << width  << " "
    << height << "\n"
    << "255"  << "\n" ;
  for(int y = 0 ; y < height ; ++y) {
    for(int x = 0 ; x < width ; ++x) {
      unsigned char v = 
        (unsigned char)
        (std::max(std::min(*im++, 1.0f),0.f) * 255.0f) ;
      os << v ;
    }
  }
  return os ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x2b200(%rip), %rsi     # 0x980e8
movl $0x2, %edx
callq 0x45a0
leaq 0x26709(%rip), %r12     # 0x93602
movl $0x1, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x45a0
movq %r14, %rdi
movl %ebx, %esi
callq 0x4920
movq %rax, %r13
leaq 0x295f5(%rip), %rsi     # 0x96512
movl $0x1, %edx
movq %rax, %rdi
callq 0x45a0
movq %r13, %rdi
movl %ebp, %esi
callq 0x4920
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x45a0
leaq 0x2b19d(%rip), %rsi     # 0x980eb
movl $0x3, %edx
movq %r13, %rdi
callq 0x45a0
movl $0x1, %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x45a0
movl %ebp, 0x4(%rsp)
testl %ebp, %ebp
jle 0x6cfd3
xorl %r13d, %r13d
movss 0x4346(%rip), %xmm2     # 0x712c4
leaq 0x3(%rsp), %r12
movl %ebx, %ebp
testl %ebx, %ebx
jle 0x6cfc9
movss 0x431f(%rip), %xmm0     # 0x712b0
minss (%r15), %xmm0
addq $0x4, %r15
xorps %xmm1, %xmm1
maxss %xmm0, %xmm1
mulss %xmm2, %xmm1
cvttss2si %xmm1, %eax
movb %al, 0x3(%rsp)
movl $0x1, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x45a0
movss 0x42ff(%rip), %xmm2     # 0x712c4
decl %ebp
jne 0x6cf89
incl %r13d
cmpl 0x4(%rsp), %r13d
jne 0x6cf83
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/manikandan5[P]Image-Matching-Stitching-Warping/siftpp/sift.cpp
// Function: VL::Detail::copyAndUpsampleRows(float*, float const*, int, int)
void 
copyAndUpsampleRows
(pixel_t* dst, pixel_t const* src, int width, int height)
{
  for(int y = 0 ; y < height ; ++y) {
    pixel_t b, a ;
    b = a = *src++ ;
    for(int x = 0 ; x < width-1 ; ++x) {
      b = *src++ ;
      *dst = a ;         dst += height ;
      *dst = 0.5*(a+b) ; dst += height ;
      a = b ;
    }
    *dst = b ; dst += height ;
    *dst = b ; dst += height ;
    dst += 1 - width * 2 * height ;
  }  
}

// Assembly:
testl %ecx, %ecx
jle 0x6d81a
pushq %rbx
movl %edx, %r8d
imull %ecx, %r8d
movl %ecx, %eax
addl %r8d, %r8d
movl $0x1, %r9d
subl %r8d, %r9d
movslq %r9d, %r8
leal -0x1(%rdx), %r9d
leaq (,%rax,8), %r10
xorl %r11d, %r11d
movss 0x3af9(%rip), %xmm0     # 0x712c0
leaq 0x4(%rsi), %rbx
movss (%rsi), %xmm1
movl %r9d, %esi
cmpl $0x2, %edx
jl 0x6d7fa
movss (%rbx), %xmm2
movss %xmm1, (%rdi)
addss %xmm2, %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%rdi,%rax,4)
addq $0x4, %rbx
addq %r10, %rdi
movaps %xmm2, %xmm1
decl %esi
jne 0x6d7d7
movss %xmm1, (%rdi)
leaq (%rdi,%rax,4), %rsi
movss %xmm1, (%rsi)
leaq (%rsi,%rax,4), %rsi
leaq (%rsi,%r8,4), %rdi
incl %r11d
movq %rbx, %rsi
cmpl %ecx, %r11d
jne 0x6d7c7
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/manikandan5[P]Image-Matching-Stitching-Warping/siftpp/sift.cpp
// Function: VL::Detail::copyAndDownsample(float*, float const*, int, int, int)
void 
copyAndDownsample(pixel_t* dst, pixel_t const* src, 
                  int width, int height, int d)
{
  if(width < d || height < d)
    throw std::string("in siftpp: image too small");

  for(int y = 0 ; y < height ; y+=d) {
    pixel_t const * srcrowp = src + y * width ;    
    for(int x = 0 ; x < width - (d-1) ; x+=d) {     
      *dst++ = *srcrowp ;
      srcrowp += d ;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %eax
subl %r8d, %eax
jl 0x6d871
cmpl %r8d, %ecx
jl 0x6d871
testl %ecx, %ecx
jle 0x6d86c
incl %eax
movslq %r8d, %r8
movslq %edx, %rdx
movl %ecx, %ecx
imulq %r8, %rdx
shlq $0x2, %rdx
xorl %r9d, %r9d
testl %eax, %eax
jle 0x6d861
xorl %r10d, %r10d
movss (%rsi,%r10,4), %xmm0
movss %xmm0, (%rdi)
addq $0x4, %rdi
addq %r8, %r10
cmpl %eax, %r10d
jl 0x6d84b
addq %r8, %r9
addq %rdx, %rsi
cmpq %rcx, %r9
jl 0x6d844
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x4210
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
movb $0x1, %bpl
leaq 0x2a901(%rip), %rsi     # 0x98190
leaq 0x2a914(%rip), %rdx     # 0x981aa
movq %rbx, %rdi
callq 0x5d854
xorl %ebp, %ebp
leaq 0x3f339(%rip), %rsi     # 0xacbe0
movq 0x3f6ea(%rip), %rdx     # 0xacf98
movq %rbx, %rdi
callq 0x4900
movq %rax, %r14
testb %bpl, %bpl
je 0x6d8c6
movq %rbx, %rdi
callq 0x43b0
movq %r14, %rdi
callq 0x4950
// File: /workspace/github_cpp_makefile_star2_O1/manikandan5[P]Image-Matching-Stitching-Warping/siftpp/sift.cpp
// Function: VL::Sift::smooth(float*, float*, float const*, int, int, float)
void
Sift::smooth
(pixel_t* dst, pixel_t* temp, 
 pixel_t const* src, int width, int height, 
 VL::float_t s)
{
  // make sure a buffer larege enough has been allocated
  // to hold the filter
  int W = int( ceil( VL::float_t(4.0) * s ) ) ;
  if( ! filter ) {
    filterReserved = 0 ;
  }
  
  if( filterReserved < W ) {
    filterReserved = W ;
    if( filter ) delete [] filter ;
    filter = new pixel_t [ 2* filterReserved + 1 ] ;
  }
  
  // pre-compute filter
  for(int j = 0 ; j < 2*W+1 ; ++j) 
    filter[j] = VL::pixel_t
      (std::exp
       (VL::float_t
        (-0.5 * (j-W) * (j-W) / (s*s) ))) ;
  
  // normalize to one
  normalize(filter, W) ;
  
  // convolve
  econvolve(temp, src, width, height, filter, W) ;
  econvolve(dst, temp, height, width, filter, W) ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movaps %xmm0, %xmm1
movl %r9d, 0x18(%rsp)
movl %r8d, 0x1c(%rsp)
movq %rcx, 0x20(%rsp)
movq %rdx, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdi, %r12
movss 0x39d9(%rip), %xmm0     # 0x712dc
movss %xmm1, 0x10(%rsp)
mulss %xmm1, %xmm0
callq 0x42a0
cvttss2si %xmm0, %ebx
movq 0x50(%r12), %rdi
testq %rdi, %rdi
jne 0x6d929
movl $0x0, 0x58(%r12)
cmpl %ebx, 0x58(%r12)
jge 0x6d964
movl %ebx, 0x58(%r12)
testq %rdi, %rdi
je 0x6d93f
callq 0x4680
movslq 0x58(%r12), %rax
testq %rax, %rax
leaq 0x4(,%rax,8), %rax
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x4040
movq %rax, 0x50(%r12)
leal (%rbx,%rbx), %r15d
movq %rbx, 0x8(%rsp)
testl %ebx, %ebx
js 0x6d9e0
movss 0x10(%rsp), %xmm0
mulss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x50(%r12), %rbx
xorl %ebp, %ebp
testl %r15d, %r15d
movl $0x0, %r14d
cmovgl %r15d, %r14d
orl $0x1, %r14d
movq 0x8(%rsp), %r13
negl %r13d
leal (%r13,%rbp), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movapd %xmm0, %xmm1
mulsd 0x2a64b(%rip), %xmm1    # 0x98008
mulsd %xmm0, %xmm1
divsd 0x10(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
callq 0x48e0
movss %xmm0, (%rbx,%rbp,4)
incq %rbp
cmpq %rbp, %r14
jne 0x6d9a5
movq 0x50(%r12), %r8
movslq %r15d, %rax
leaq (%r8,%rax,4), %rcx
addq $0x4, %rcx
cmpq %r8, %rcx
je 0x6da18
leaq 0x4(,%rax,4), %rdx
xorps %xmm0, %xmm0
xorl %esi, %esi
movq 0x8(%rsp), %r15
addss (%r8,%rsi), %xmm0
addq $0x4, %rsi
cmpq %rsi, %rdx
jne 0x6da07
jmp 0x6da20
xorps %xmm0, %xmm0
movq 0x8(%rsp), %r15
cmpq %r8, %rcx
je 0x6da48
leaq 0x4(,%rax,4), %rax
xorl %ecx, %ecx
movss (%r8,%rcx), %xmm1
divss %xmm0, %xmm1
movss %xmm1, (%r8,%rcx)
addq $0x4, %rcx
cmpq %rcx, %rax
jne 0x6da2f
movq 0x30(%rsp), %r14
movq %r14, %rdi
movq 0x20(%rsp), %rsi
movl 0x1c(%rsp), %ebx
movl %ebx, %edx
movl 0x18(%rsp), %ebp
movl %ebp, %ecx
movl %r15d, %r9d
callq 0x70682
movq 0x50(%r12), %r8
movq 0x28(%rsp), %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %ecx
movl %r15d, %r9d
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x70682
// File: /workspace/github_cpp_makefile_star2_O1/manikandan5[P]Image-Matching-Stitching-Warping/siftpp/sift.cpp
// Function: VL::Detail::normalize_histogram(float*, float*)
void
normalize_histogram(VL::float_t* L_begin, VL::float_t* L_end)
{
  VL::float_t* L_iter ;
  VL::float_t norm = 0.0 ;

  for(L_iter = L_begin; L_iter != L_end ; ++L_iter)
    norm += (*L_iter) * (*L_iter) ;

  norm = fast_sqrt(norm) ;

  for(L_iter = L_begin; L_iter != L_end ; ++L_iter)
    *L_iter /= (norm + std::numeric_limits<VL::float_t>::epsilon() ) ;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm1, %xmm1
xorps %xmm0, %xmm0
cmpq %rsi, %rdi
je 0x6fdef
movq %r14, %rax
movss (%rax), %xmm2
mulss %xmm2, %xmm2
addss %xmm2, %xmm0
addq $0x4, %rax
cmpq %rbx, %rax
jne 0x6fdda
ucomiss %xmm1, %xmm0
jb 0x6fdfa
sqrtss %xmm0, %xmm0
jmp 0x6fdff
callq 0x49c0
cmpq %rbx, %r14
je 0x6fe23
addss 0x281e8(%rip), %xmm0    # 0x97ff4
movss (%r14), %xmm1
divss %xmm0, %xmm1
movss %xmm1, (%r14)
addq $0x4, %r14
cmpq %rbx, %r14
jne 0x6fe0c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/KmerHash.cc
// Function: KmerHash::calculateHash(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int)
unsigned int KmerHash::calculateHash(const string& Kmer, unsigned int KmerSize) {
	assert (KmerSize <= Kmer.size() );
	
	//Clear hashVal
	hashVal = 0;
	//Fill different Lv of the hash
	unsigned long bpVal = 0;
	this->KmerSize = KmerSize;

	unsigned int tempHashVal = 0;

	for (int i = 0; i < this->KmerSize; i++) {

		//cout << Kmer[i];

		switch (Kmer[i]) {
		case 'A':
			bpVal = 0;
			break;
		case 'C':
			bpVal = 1;
			break;
		case 'G':
			bpVal = 2;
			break;
		case 'T':
			bpVal = 3;
			break;
		case 'N':
		default:
			bpVal = 0;
		}

		hashVal = (hashVal << 2) | bpVal;
	}
	return hashVal;
}

// Assembly:
pushq %rax
movl %edx, %eax
cmpq %rax, 0x8(%rsi)
jb 0x15d0
movl $0x0, (%rdi)
movl %edx, 0x4(%rdi)
testl %edx, %edx
je 0x15cc
movl (%rdi), %ecx
movq (%rsi), %rdx
xorl %esi, %esi
movzbl (%rdx,%rsi), %r9d
cmpl $0x54, %r9d
je 0x15b8
cmpl $0x47, %r9d
je 0x15b0
movl $0x0, %r8d
cmpl $0x43, %r9d
jne 0x15be
movl $0x1, %r8d
jmp 0x15be
movl $0x2, %r8d
jmp 0x15be
movl $0x3, %r8d
leal (%r8,%rcx,4), %ecx
movl %ecx, (%rdi)
incq %rsi
cmpq %rsi, %rax
jne 0x158b
movl (%rdi), %eax
popq %rcx
retq
leaq 0xa8f(%rip), %rdi       # 0x2066
leaq 0xaa0(%rip), %rsi       # 0x207e
leaq 0xaa5(%rip), %rcx       # 0x208a
movl $0x40, %edx
callq 0x1050
nop
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/KmerHash.cc
// Function: KmerHash::getKmer[abi:cxx11]() const
string KmerHash::getKmer() const {
	string Kmer(KmerSize, 'N');

	cout << "kmer size: " << KmerSize << endl;

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

		unsigned int bpVal = (hashVal >> (2 * (KmerSize - i) ) ) & 3;
		switch (bpVal) {
		case 0:
			Kmer[i] = 'A';
			break;
		case 1:
			Kmer[i] = 'C';
			break;
		case 2:
			Kmer[i] = 'G';
			break;
		case 3:
			Kmer[i] = 'T';
			break;
		default:
			cerr << "unrecognized character: " << Kmer[i] << endl;
			break;
		}

	}
	return Kmer;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rsi), %esi
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movl $0x4e, %edx
callq 0x10c0
movq 0x29a5(%rip), %rdi      # 0x3fd0
leaq 0xa28(%rip), %rsi       # 0x205a
movl $0xb, %edx
callq 0x10b0
movl 0x4(%r14), %esi
movq 0x2989(%rip), %rdi      # 0x3fd0
callq 0x1060
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x1090
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1070
movl 0x4(%r14), %ecx
testl %ecx, %ecx
je 0x16ae
xorl %edx, %edx
xorl %esi, %esi
movl (%r14), %eax
addl %edx, %ecx
addl %ecx, %ecx
shrl %cl, %eax
movq (%rbx), %rdi
shll $0x3, %eax
movl $0x54474341, %r8d       # imm = 0x54474341
movl %eax, %ecx
shrl %cl, %r8d
movb %r8b, (%rdi,%rsi)
incq %rsi
movl 0x4(%r14), %ecx
decl %edx
cmpq %rcx, %rsi
jb 0x1682
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x16d4
movq (%r12), %rsi
incq %rsi
callq 0x10a0
movq %r14, %rdi
callq 0x1100
// File: /workspace/github_cpp_makefile_star2_O1/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
xorl %ecx, %ecx
movl $0x10, %r9d
callq 0x3070
cmpl $-0x1, %eax
je 0x3da8
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
addq $0x404, %rbx            # imm = 0x404
movq %rbx, %rdi
callq 0x3540
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3ab6
movq %rbx, 0x660(%r14)
movq $0x0, 0x4c8(%r14)
movq %rbx, 0x4d0(%r14)
callq 0x3420
movl %eax, 0x4d8(%r14)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x59da(%rip), %rax      # 0x9d30
movq %rax, (%rdi)
leaq -0x38(%rbp), %r15
movl $0x6, %ecx
movq %r15, %rdi
xorl %edx, %edx
callq 0x32b0
movq (%r15), %r15
movq %r15, %rdi
callq 0x33f0
cltq
imulq $0x68db8bad, %rax, %rax # imm = 0x68DB8BAD
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x2c, %rax
addl %ecx, %eax
movl %eax, 0x8(%rbx)
movq %r15, %rdi
callq 0x33f0
cltq
imulq $0x68db8bad, %rax, %rcx # imm = 0x68DB8BAD
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x2c, %rcx
addl %edx, %ecx
imull $0x2710, %ecx, %ecx     # imm = 0x2710
subl %ecx, %eax
cltq
imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x25, %rax
addl %ecx, %eax
movl %eax, 0xc(%rbx)
movq %r15, %rdi
callq 0x33f0
cltq
imulq $0x51eb851f, %rax, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
imull $0x64, %ecx, %ecx
subl %ecx, %eax
movl %eax, 0x10(%rbx)
leaq -0x58(%rbp), %rdi
movl $0x6, %edx
movl $0x1, %ecx
movq %r14, %rsi
callq 0x32b0
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
movb (%rdi), %cl
movb %cl, 0x14(%rbx)
cmpq %rax, %rdi
je 0x4422
callq 0x3260
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4434
callq 0x3260
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4454
callq 0x3260
movq %rbx, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O1/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 0x496a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x433c
movq -0xa8(%rbp), %rdi
cmpq %r12, %rdi
je 0x4545
callq 0x3260
leaq 0x57fc(%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 0x32b0
movq -0x88(%rbp), %rdi
callq 0x33f0
movl %eax, 0x40(%r14)
movq 0x8(%r15), %rcx
addq $-0xc, %rcx
leaq -0x68(%rbp), %rdi
movl $0xc, %edx
movq %r15, %rsi
callq 0x32b0
leaq 0x2b12(%rip), %rsi      # 0x70c3
leaq -0x68(%rbp), %r12
movl $0x1, %ecx
movq %r12, %rdi
xorl %edx, %edx
callq 0x3470
leaq -0x48(%rbp), %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x32b0
leaq -0x48(%rbp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3330
movq (%r12), %rdi
leaq -0x38(%rbp), %r12
cmpq %r12, %rdi
je 0x45f6
callq 0x3260
movq 0x28(%r14), %rdx
addq $0xd, %rdx
leaq -0x48(%rbp), %rdi
movl $0x2, %ecx
movq %r15, %rsi
callq 0x32b0
movq -0x48(%rbp), %rbx
movq %rbx, %rdi
callq 0x33f0
movl %eax, 0x18(%r14)
cmpq %r12, %rbx
je 0x462c
movq %rbx, %rdi
callq 0x3260
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x463e
callq 0x3260
leaq -0x78(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4650
callq 0x3260
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4664
movq %rax, %r14
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x467e
callq 0x3260
jmp 0x467e
movq %rax, %r14
leaq -0x78(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4695
callq 0x3260
jmp 0x4695
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x46a2
callq 0x3260
movq %r14, %rdi
callq 0x3480
movq %rax, %r14
movq -0xa8(%rbp), %rdi
cmpq %r12, %rdi
jne 0x469d
jmp 0x46a2
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2b11(%rip), %rdi      # 0x71e6
xorl %eax, %eax
callq 0x3050
movsbl 0x14(%rbx), %esi
leaq 0x2b15(%rip), %rdi      # 0x71fc
xorl %eax, %eax
callq 0x3050
movq 0x20(%rbx), %rsi
leaq 0x2b0d(%rip), %rdi      # 0x7206
xorl %eax, %eax
callq 0x3050
movl 0x40(%rbx), %esi
leaq 0x2b0b(%rip), %rdi      # 0x7215
xorl %eax, %eax
callq 0x3050
movl 0x18(%rbx), %esi
leaq 0x2b06(%rip), %rdi      # 0x7221
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3050
// File: /workspace/github_cpp_makefile_star2_O1/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 0x496a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x433c
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x47bd
callq 0x3260
leaq 0x559c(%rip), %rax      # 0x9d60
movq %rax, (%rbx)
leaq -0x60(%rbp), %r15
movl $0x7, %edx
movl $0x9, %ecx
movq %r15, %rdi
movq %r14, %rsi
callq 0x32b0
movq (%r15), %r15
movq %r15, %rdi
callq 0x33f0
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 0x33f0
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 0x33f0
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 0x32b0
leaq -0x70(%rbp), %r15
movq -0x10(%r15), %r14
movq %r14, %rdi
callq 0x33f0
movl %eax, 0x18(%rbx)
cmpq %r15, %r14
je 0x48a2
movq %r14, %rdi
callq 0x3260
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x48b4
callq 0x3260
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 0x48df
jmp 0x48e4
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x48e4
callq 0x3260
movq %rbx, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O1/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 0x28e1(%rip), %rdi      # 0x71e6
xorl %eax, %eax
callq 0x3050
movsbl 0x14(%rbx), %esi
leaq 0x28e5(%rip), %rdi      # 0x71fc
xorl %eax, %eax
callq 0x3050
movl 0x24(%rbx), %esi
movl 0x1c(%rbx), %edx
movl 0x20(%rbx), %ecx
leaq 0x28ff(%rip), %rdi      # 0x722d
xorl %eax, %eax
callq 0x3050
movl 0x18(%rbx), %esi
leaq 0x28e2(%rip), %rdi      # 0x7221
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3050
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4a68
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_O1/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 0x5857
callq 0x3260
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_O1/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 0x4736(%rip), %r15      # 0x9fd0
leaq 0x1c08(%rip), %rsi      # 0x74a9
movl $0xd, %edx
movq %r15, %rdi
callq 0x32f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3190
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
movq %r14, %rsi
callq 0x3110
movl $0x328, %edi            # imm = 0x328
callq 0x32a0
movq %rax, %r15
movq %rax, %rdi
callq 0x4a04
movq %r15, (%rbx)
movq %r15, %rdi
movq %r14, %rsi
callq 0x4a70
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 0x469f(%rip), %rbx      # 0x9fd0
leaq 0x1b7f(%rip), %rsi      # 0x74b7
movl $0xc, %edx
movq %rbx, %rdi
callq 0x32f0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq 0x466d(%rip), %rdi      # 0x9fd0
callq 0x3030
movq %rax, %rdi
callq 0x3190
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5982
callq 0x3260
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x3260
jmp 0x599d
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59af
callq 0x3260
movq %rbx, %rdi
callq 0x3480
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x59c5
jmp 0x4a16
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x45fe(%rip), %rbx      # 0x9fd0
leaq 0x1aeb(%rip), %rsi      # 0x74c4
movl $0x8, %edx
movq %rbx, %rdi
callq 0x32f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3190
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3440
movq (%r15), %rsi
movq %r12, %rdi
movl $0x1, %edx
callq 0x3060
leaq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x3240
movq %r12, %rdi
callq 0x31c0
movq %rax, %r12
movq 0x43b3(%rip), %rdi      # 0x9fd0
leaq 0x18be(%rip), %rsi      # 0x74e2
movl $0x22, %edx
callq 0x32f0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x4394(%rip), %rdi      # 0x9fd0
callq 0x32f0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3190
leaq -0x1c0(%rbp), %rdi
callq 0x30b0
testb %al, %al
je 0x5ce8
movq %r12, %rdi
callq 0x3120
movq (%r14), %r8
leaq 0x1878(%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 0x32f0
leaq -0x230(%rbp), %rdi
callq 0x3370
jmp 0x5d3d
movq 0x42e1(%rip), %rdi      # 0x9fd0
leaq 0x1820(%rip), %rsi      # 0x7516
movl $0x22, %edx
callq 0x32f0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x42c2(%rip), %rdi      # 0x9fd0
callq 0x32f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3190
movq 0x4284(%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 0x3210
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 0x5d89
jmp 0x5d89
movq %rax, %rbx
leaq -0x230(%rbp), %rdi
callq 0x33b0
movq %rbx, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O1/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 0x16f5(%rip), %xmm0     # 0x7550
leaq -0x80(%rbp), %r15
movaps %xmm0, 0x10(%r15)
movaps 0x16d5(%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 0x16d1(%rip), %rsi      # 0x7561
movq %r15, %rdi
xorl %eax, %eax
callq 0x3090
leaq 0x16e0(%rip), %rsi      # 0x7581
movq %r12, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x3090
movq %r15, %rdi
callq 0x3220
testl %eax, %eax
jne 0x5ec8
leaq -0x50(%rbp), %rdi
callq 0x3220
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_O1/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 0x168b(%rip), %rdi      # 0x75c4
xorl %ebx, %ebx
movl $0x1, %esi
xorl %eax, %eax
callq 0x31b0
cmpl $-0x1, %eax
je 0x5f91
movl %eax, %r14d
leaq 0x166b(%rip), %rdx      # 0x75c1
leaq -0x23(%rbp), %r12
movl $0x3, %esi
movq %r12, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x3400
movslq %eax, %rdx
movl %r14d, %edi
movq %r12, %rsi
callq 0x3100
movl %r14d, %edi
callq 0x34d0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x35c5
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x5f82
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1649(%rip), %rdi      # 0x75ff
xorl %ebx, %ebx
movl $0x1, %esi
xorl %eax, %eax
callq 0x31b0
cmpl $-0x1, %eax
je 0x600e
movl %eax, %r14d
leaq 0x15ee(%rip), %rdx      # 0x75c1
leaq -0x23(%rbp), %r12
movl $0x3, %esi
movq %r12, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x3400
movslq %eax, %rdx
movl %r14d, %edi
movq %r12, %rsi
callq 0x3100
movl %r14d, %edi
callq 0x34d0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x35f4
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x5fff
// File: /workspace/github_cpp_makefile_star2_O1/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 0x160d(%rip), %rdx      # 0x763e
leaq -0x40(%rbp), %rbx
movl $0x23, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3400
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x31b0
cmpl $-0x1, %eax
je 0x6098
movl %eax, %ebx
xorl %edx, %edx
xorl %eax, %eax
testl %r14d, %r14d
sete %dl
setne %al
leaq (%rax,%rax,2), %rax
leaq 0x16cf(%rip), %rsi      # 0x7741
addq %rax, %rsi
xorq $0x3, %rdx
movl %ebx, %edi
callq 0x3100
cmpq $-0x1, %rax
je 0x609f
movl %ebx, %edi
callq 0x34d0
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x3652
jmp 0x60a4
callq 0x3623
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x608f
// File: /workspace/github_cpp_makefile_star2_O1/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 0x15e8(%rip), %rdx      # 0x76a5
leaq -0x30(%rbp), %rbx
movl $0x1e, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3400
movq %rbx, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x31b0
cmpl $-0x1, %eax
je 0x6110
movl %eax, %ebx
leaq -0xb(%rbp), %rsi
movl $0x3, %edx
movl %eax, %edi
callq 0x3380
cmpq $-0x1, %rax
je 0x6117
movl %ebx, %edi
callq 0x34d0
leaq -0xb(%rbp), %rdi
callq 0x33f0
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
callq 0x36b0
jmp 0x611c
callq 0x3681
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x6109
// File: /workspace/github_cpp_makefile_star2_O1/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 0x156c(%rip), %rdx      # 0x76a5
leaq -0x30(%rbp), %r14
movl $0x1e, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x3400
movq %r14, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x31b0
cmpl $-0x1, %eax
je 0x6196
movl %eax, %r14d
leaq 0x15de(%rip), %rsi      # 0x7748
cmpl $0x1, %ebx
sbbq $-0x1, %rsi
movl $0x1, %edx
movl %eax, %edi
callq 0x3100
cmpq $0x1, %rax
jne 0x619d
movl %r14d, %edi
callq 0x34d0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x370e
jmp 0x61a2
callq 0x36df
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x618d
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3dfb(%rip), %r15      # 0x9fd0
leaq 0x40e4(%rip), %r13      # 0xa2c0
leaq 0x12cf(%rip), %r12      # 0x74b2
movq 0x41de(%rip), %rdi      # 0xa3c8
movq %r14, %rsi
callq 0x3db8
movl -0x430(%rbp), %eax
cmpl $0x11, %eax
je 0x6266
cmpl $0x6, %eax
je 0x6258
cmpl $0x3, %eax
jne 0x62d3
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x32f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3190
movq 0x418f(%rip), %rdi      # 0xa3d8
callq 0x33a0
movq %r13, %rdi
callq 0x583a
jmp 0x62bc
movb -0x42c(%rbp), %al
movb %al, 0x4150(%rip)       # 0xa3b4
jmp 0x62d3
movl $0x2, %edx
movq %r15, %rdi
leaq 0x14d6(%rip), %rsi      # 0x774b
callq 0x32f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3190
movq 0x4130(%rip), %rdi      # 0xa3d8
callq 0x33a0
movq %r13, %rdi
callq 0x5a22
movq %rax, 0x4114(%rip)      # 0xa3d0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5880
movq 0x410a(%rip), %rdi      # 0xa3d8
callq 0x31d0
movl $0x64, %edi
callq 0x3360
jmp 0x61e3
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3cda(%rip), %rbx      # 0x9fd0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3190
movq %rax, %r14
leaq 0x1427(%rip), %rsi      # 0x774e
movl $0xe, %edx
movq %rax, %rdi
callq 0x32f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3190
movq 0x4076(%rip), %rdi      # 0xa3d8
callq 0x33a0
movq 0x4052(%rip), %rdx      # 0xa3c0
movzbl 0x403f(%rip), %ecx      # 0xa3b4
leaq 0x3f44(%rip), %rdi      # 0xa2c0
leaq 0x3fad(%rip), %rsi      # 0xa330
callq 0x4f62
cmpq $0x0, 0x4040(%rip)      # 0xa3d0
je 0x642e
leaq 0x3f23(%rip), %rdi      # 0xa2c0
callq 0x5a22
testq %rax, %rax
jne 0x642e
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3190
movq %rax, %rbx
leaq 0x1381(%rip), %rsi      # 0x775d
movl $0xb, %edx
movq %rax, %rdi
callq 0x32f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3190
movq 0x3fb9(%rip), %rsi      # 0xa3d0
leaq 0x3ea2(%rip), %rdi      # 0xa2c0
callq 0x5a46
movq $0x0, 0x3fa2(%rip) # 0xa3d0
movq 0x3fa3(%rip), %rdi      # 0xa3d8
callq 0x31d0
movl $0x7a120, %edi          # imm = 0x7A120
popq %rbx
popq %r14
popq %rbp
jmp 0x3360
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3f3e(%rip), %rdi      # 0xa3b8
movq %rbx, %rsi
movl $0x2, %edx
callq 0x3d76
movl $0x2710, %edi           # imm = 0x2710
callq 0x3360
jmp 0x646d
// File: /workspace/github_cpp_makefile_star2_O1/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 0x313e
testq %rax, %rax
je 0x2946
movq %r14, %rdi
callq 0x2f1e
movl %eax, -0x2c(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2d6e
movq $0x0, -0x40(%rbp)
movq $0x2349340, -0x38(%rbp) # imm = 0x2349340
movq %r12, %rdi
movq %r12, %rsi
callq 0x2070
cmpl $-0x1, %eax
jne 0x2941
callq 0x2040
cmpl $0x4, (%rax)
je 0x2927
incl %r13d
jmp 0x28f4
cmpl $0xa, %r13d
jne 0x28f4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x313e
testq %rax, %rax
je 0x2a56
movq %rbx, %rdi
callq 0x2f1e
movq $0x0, -0x28(%rbp)
movq $0x112a880, -0x20(%rbp) # imm = 0x112A880
movq %r14, %rdi
movq %r14, %rsi
callq 0x2070
cmpl $-0x1, %eax
jne 0x2a51
callq 0x2040
cmpl $0x4, (%rax)
je 0x2a37
incl %r15d
jmp 0x2a12
cmpl $0xa, %r15d
jne 0x2a12
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3cc2
movb $0x1, 0x8(%r15)
leaq 0x28(%rbx), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2e84
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 0x2e51
movq 0xc8(%rbx), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x2e22
movl (%r14), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0xb8(%rbx)
jmp 0x2e31
leaq 0x88(%rbx), %rdi
movq %r14, %rsi
callq 0x3d3a
addq $0x58, %rbx
movq %rbx, %rdi
callq 0x21f0
leaq -0x28(%rbp), %rdi
callq 0x2f04
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x22c0(%rip), %rdi      # 0x5118
leaq 0x22d3(%rip), %rsi      # 0x5132
leaq 0x22df(%rip), %rcx      # 0x5145
movl $0x7, %edx
callq 0x20c0
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x2f04
movq %rbx, %rdi
callq 0x2210