LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftplib.cc
// Function: ftplib::Size(char const*, int*, ftplib::transfermode)
int ftplib::Size(const char *path, int *size, transfermode mode)
{
   char cmd[256];
   int resp,sz,rv=1;

   if ((strlen(path) + 7) > sizeof(cmd)) 
        return 0;

	sprintf(cmd, "TYPE %c", mode);
   if (!FtpSendCmd(cmd, '2', mp_ftphandle)) 
        return 0;

	sprintf(cmd,"SIZE %s",path);
   if (!FtpSendCmd(cmd,'2',mp_ftphandle)) 
    rv = 0;
   else  {
		if (sscanf(mp_ftphandle->response, "%d %d", &resp, &sz) == 2) 
            *size = sz;
		else 
            rv = 0;
   }
   return rv;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movl %ecx, %r12d
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x4180
addq $-0xfa, %rax
xorl %ebp, %ebp
cmpq $-0x101, %rax           # imm = 0xFEFF
jb 0x102af
leaq 0x3612(%rip), %rsi      # 0x13832
xorl %ebp, %ebp
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0x40a0
movq (%r14), %rcx
movq %r14, %rdi
movq %r13, %rsi
movl $0x32, %edx
callq 0xeb90
testl %eax, %eax
je 0x102af
leaq 0x3782(%rip), %rsi      # 0x139d4
xorl %ebp, %ebp
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x40a0
movq (%r14), %rcx
movq %r14, %rdi
movq %r12, %rsi
movl $0x32, %edx
callq 0xeb90
testl %eax, %eax
je 0x102af
movl $0x88, %edi
addq (%r14), %rdi
leaq 0x3750(%rip), %rsi      # 0x139dc
xorl %ebp, %ebp
leaq 0xc(%rsp), %rdx
leaq 0x8(%rsp), %rcx
xorl %eax, %eax
callq 0x43c0
cmpl $0x2, %eax
jne 0x102af
movl 0x8(%rsp), %eax
movl %eax, (%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftplib.cc
// Function: ftplib::ModDate(char const*, char*, int)
int ftplib::ModDate(const char *path, char *dt, int max)
{
	char buf[256];
	int rv = 1;

	if ((strlen(path) + 7) > sizeof(buf)) 
        return 0;
	sprintf(buf,"MDTM %s",path);
    if (!FtpSendCmd(buf,'2',mp_ftphandle)) 
        rv = 0;
	else 
        strncpy(dt, &mp_ftphandle->response[4], max);
	return rv;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
movq %rsi, %rdi
callq 0x4180
addq $-0xfa, %rax
xorl %r15d, %r15d
cmpq $-0x101, %rax           # imm = 0xFEFF
jb 0x10343
leaq 0x36e2(%rip), %rsi      # 0x139e2
xorl %r15d, %r15d
movq %rsp, %r13
movq %r13, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x40a0
movq (%r14), %rcx
movq %r14, %rdi
movq %r13, %rsi
movl $0x32, %edx
callq 0xeb90
testl %eax, %eax
je 0x10343
movl $0x8c, %esi
addq (%r14), %rsi
movslq %ebp, %rdx
movq %rbx, %rdi
callq 0x41e0
movl $0x1, %r15d
movl %r15d, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftplib.cc
// Function: ftplib::Rename(char const*, char const*)
int ftplib::Rename(const char *src, const char *dst)
{
	char cmd[256];

	if (((strlen(src) + 7) > sizeof(cmd)) || ((strlen(dst) + 7) > sizeof(cmd))) 
        return 0;
	sprintf(cmd,"RNFR %s",src);
	if (!FtpSendCmd(cmd,'3',mp_ftphandle)) 
        return 0;
	sprintf(cmd,"RNTO %s",dst);
	if (!FtpSendCmd(cmd,'2',mp_ftphandle)) 
        return 0;

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x4180
addq $-0xfa, %rax
xorl %ebp, %ebp
cmpq $-0x101, %rax           # imm = 0xFEFF
jb 0x1043e
movq %r14, %rdi
callq 0x4180
addq $-0xfa, %rax
cmpq $-0x101, %rax           # imm = 0xFEFF
jb 0x1043e
leaq 0x3601(%rip), %rsi      # 0x139ea
xorl %ebp, %ebp
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x40a0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movl $0x33, %edx
callq 0xeb90
testl %eax, %eax
je 0x1043e
leaq 0x35d9(%rip), %rsi      # 0x139f2
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x40a0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x32, %edx
callq 0xeb90
movl %eax, %ebp
movl %ebp, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/ftplib.cc
// Function: ftplib::Quit()
int ftplib::Quit()
{
	if (mp_ftphandle->dir != FTPLIB_CONTROL) 
        return 0;
	if (mp_ftphandle->handle == 0)
	{
		strcpy(mp_ftphandle->response, "error: no anwser from server\n");
		return 0;
	}
	if (!FtpSendCmd("QUIT",'2',mp_ftphandle))
	{
		net_close(mp_ftphandle->handle);
		return 0;
	} else	{
		net_close(mp_ftphandle->handle);
		return 1;
	}
}

// Assembly:
movq (%rdi), %rcx
cmpl $0x0, 0x28(%rcx)
je 0x104c2
xorl %eax, %eax
retq
cmpl $0x0, 0x10(%rcx)
je 0x104f5
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x354b(%rip), %rsi      # 0x13a20
movl $0x32, %edx
callq 0xeb90
movl %eax, %ebp
movq (%rbx), %rax
movl 0x10(%rax), %edi
callq 0x4760
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movups 0x3514(%rip), %xmm0     # 0x13a10
movups %xmm0, 0x96(%rcx)
movups 0x34f8(%rip), %xmm0     # 0x13a02
movups %xmm0, 0x88(%rcx)
jmp 0x104bf
nop
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/WjCryptLib_Md5.cc
// Function: Md5Update(Md5Context*, void const*, unsigned int)
void Md5Update (
        Md5Context*         Context,        // [in out]
        void const*         Buffer,         // [in]
        uint32_t            BufferSize      // [in]
) {
    uint32_t    saved_lo;
    uint32_t    used;
    uint32_t    free;

    saved_lo = Context->lo;
    if( (Context->lo = (saved_lo + BufferSize) & 0x1fffffff) < saved_lo )
    {
        Context->hi++;
    }
    Context->hi += (uint32_t)( BufferSize >> 29 );

    used = saved_lo & 0x3f;

    if( used )
    {
        free = 64 - used;

        if( BufferSize < free )
        {
            memcpy( &Context->buffer[used], Buffer, BufferSize );
            return;
        }

        memcpy( &Context->buffer[used], Buffer, free );
        Buffer = (uint8_t*)Buffer + free;
        BufferSize -= free;
        TransformFunction(Context, Context->buffer, 64);
    }

    if( BufferSize >= 64 )
    {
        Buffer = TransformFunction( Context, Buffer, BufferSize & ~(unsigned long)0x3f );
        BufferSize &= 0x3f;
    }

    memcpy( Context->buffer, Buffer, BufferSize );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %eax
leal (%rax,%rdx), %ecx
andl $0x1fffffff, %ecx       # imm = 0x1FFFFFFF
movl %ecx, (%rdi)
movl %edx, %edi
shrl $0x1d, %edi
cmpl %eax, %ecx
adcl %edi, 0x4(%rbx)
movq %rsi, %r14
andl $0x3f, %eax
je 0x10ac0
movl $0x40, %ecx
subl %eax, %ecx
movl %edx, %ebp
leaq (%rbx,%rax), %rdi
addq $0x18, %rdi
subl %ecx, %ebp
jae 0x10ac4
movl %edx, %edx
jmp 0x10b0d
movl %edx, %ebp
jmp 0x10ae9
leaq 0x18(%rbx), %r15
movl %ecx, %r12d
movq %r14, %rsi
movq %r12, %rdx
callq 0x42f0
addq %r12, %r14
movl $0x40, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x10b1d
cmpl $0x40, %ebp
jb 0x10b04
movl %ebp, %edx
andl $-0x40, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10b1d
movq %rax, %r14
andl $0x3f, %ebp
addq $0x18, %rbx
movl %ebp, %edx
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x42f0
// File: /workspace/github_cpp_makefile_star2_O3/lianxings[P]ftp_benchmark/WjCryptLib_Md5.cc
// Function: Md5Calculate(void const*, unsigned int, MD5_HASH*)
void Md5Calculate (
        void  const*        Buffer,         // [in]
        uint32_t            BufferSize,     // [in]
        MD5_HASH*           Digest          // [in]
) {
    Md5Context context;

    Md5Initialise( &context );
    Md5Update( &context, Buffer, BufferSize );
    Md5Finalise( &context, Digest );
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdx, %rbx
movl %esi, %edx
movq %rdi, %rsi
movabsq $0x1032547698badcfe, %rax # imm = 0x1032547698BADCFE
movq %rsp, %r14
movq %rax, 0x10(%r14)
movaps 0x24d6(%rip), %xmm0     # 0x13a50
movaps %xmm0, (%r14)
movq %r14, %rdi
callq 0x10a7d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1143a
addq $0x98, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/KalmanPi.cpp
// Function: main
int main(int argc, char* argv[])
 {
	 i2c.initialize();
	 
	 // Initialize Gyro
	 initializeGyros();
	 
	 // Initialize Accelerometer
	 initializeAccel();
	 
	 // Initialize Magnetometer
	 initializeMag();
	 
	 ThreadManager threadManager;
	 threadManager.create(readGyros);
	 threadManager.create(readAccel);
	 threadManager.create(readMag);
	 threadManager.create(sendFunction);
	 threadManager.create(propagateANDupdate);
	 
	 threadManager.wait();
	 
	 return EXIT_SUCCESS;
 }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x98, %rsp
leaq 0x8e09(%rip), %rdi      # 0xb4a8
callq 0x2f8c
callq 0x2758
callq 0x29fc
callq 0x2ca0
leaq -0xa0(%rbp), %rbx
movq %rbx, %rdi
callq 0x4720
leaq 0x1cbb(%rip), %rsi      # 0x4384
movq %rbx, %rdi
callq 0x47d4
leaq 0x1dac(%rip), %rsi      # 0x4484
leaq -0xa0(%rbp), %rdi
callq 0x47d4
leaq 0x1e91(%rip), %rsi      # 0x457c
leaq -0xa0(%rbp), %rdi
callq 0x47d4
leaq 0x1f72(%rip), %rsi      # 0x4670
leaq -0xa0(%rbp), %rdi
callq 0x47d4
leaq 0x32ef(%rip), %rsi      # 0x5a00
leaq -0xa0(%rbp), %rdi
callq 0x47d4
leaq -0xa0(%rbp), %rdi
callq 0x4bdc
leaq -0xa0(%rbp), %rdi
callq 0x476a
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x476a
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/i2c.cpp
// Function: I2C::initialize()
const char* I2C::initialize()
{
  std::stringstream error;

  // Open the I2C Bus
  m_busFd = open("/dev/i2c-1", O_RDWR);
  if (m_busFd == -1)
  {
    error << "open(): " << std::strerror(errno);
    return error.str().c_str();
  }

  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, %rbx
leaq -0x1b8(%rbp), %rdi
callq 0x2180
leaq 0x51c5(%rip), %rdi      # 0x8175
movl $0x2, %esi
xorl %eax, %eax
callq 0x21b0
movl %eax, (%rbx)
cmpl $-0x1, %eax
je 0x2fca
xorl %ebx, %ebx
jmp 0x305d
leaq -0x1a8(%rbp), %rbx
leaq 0x51a8(%rip), %rsi      # 0x8180
movl $0x8, %edx
movq %rbx, %rdi
callq 0x2280
callq 0x2050
movl (%rax), %edi
callq 0x20d0
testq %rax, %rax
je 0x3011
movq %rax, %r14
movq %rax, %rdi
callq 0x2100
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2280
jmp 0x3031
movq -0x1a8(%rbp), %rax
movq -0x18(%rax), %rax
addq %rax, %rbx
movl -0x188(%rbp,%rax), %esi
orl $0x1, %esi
movq %rbx, %rdi
callq 0x2360
leaq -0x1a0(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x2320
leaq -0x20(%rbp), %rax
movq -0x10(%rax), %rbx
cmpq %rax, %rbx
je 0x305d
movq -0x20(%rbp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x2260
movq 0x7f54(%rip), %rsi      # 0xafb8
leaq -0x1b8(%rbp), %rdi
callq 0x21c0
leaq -0x138(%rbp), %rdi
callq 0x20c0
movq %rbx, %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x308d
movq %rax, %rbx
movq 0x7f21(%rip), %rsi      # 0xafb8
leaq -0x1b8(%rbp), %rdi
callq 0x21c0
leaq -0x138(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x23a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/i2c.cpp
// Function: I2C::writeByte(unsigned char, unsigned char, unsigned char)
const char* I2C::writeByte(uint8_t busAddr, uint8_t dataAddr, uint8_t data)
{
  std::stringstream error;

  union i2c_smbus_data smbus_data;
  smbus_data.byte = data;

  struct i2c_smbus_ioctl_data args;

  args.read_write = 0;
  args.command = dataAddr;
  args.size = 2;
  args.data = &smbus_data;

  m_mutex.lock();
  if (ioctl(m_busFd, I2C_SLAVE, busAddr) == -1)
  {
    m_mutex.unlock();
    error << "ioctl(): " << std::strerror(errno);
    return error.str().c_str();
  }

  if (ioctl(m_busFd,I2C_SMBUS,&args) == -1)
  {
    m_mutex.unlock();
    error << "ioctl(): " << std::strerror(errno);
    return error.str().c_str();
  }
  m_mutex.unlock();

  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1e0, %rsp            # imm = 0x1E0
movl %ecx, %ebx
movl %edx, %r12d
movl %esi, %r15d
movq %rdi, %r14
leaq -0x1d8(%rbp), %rdi
callq 0x2180
leaq -0x1fa(%rbp), %rax
movb %bl, (%rax)
movb $0x0, -0x30(%rbp)
movb %r12b, -0x2f(%rbp)
movl $0x2, -0x2c(%rbp)
movq %rax, -0x28(%rbp)
leaq 0x8(%r14), %rbx
movq %rbx, %rdi
callq 0x3712
movl (%r14), %edi
movzbl %r15b, %edx
movl $0x703, %esi            # imm = 0x703
xorl %eax, %eax
callq 0x22b0
cmpl $-0x1, %eax
je 0x3148
movl (%r14), %edi
leaq -0x30(%rbp), %rdx
movl $0x720, %esi            # imm = 0x720
xorl %eax, %eax
callq 0x22b0
cmpl $-0x1, %eax
je 0x3197
movq %rbx, %rdi
callq 0x3840
xorl %ebx, %ebx
jmp 0x3264
movq %rbx, %rdi
callq 0x3840
leaq -0x1c8(%rbp), %rbx
leaq 0x502b(%rip), %rsi      # 0x8189
movl $0x9, %edx
movq %rbx, %rdi
callq 0x2280
callq 0x2050
movl (%rax), %edi
callq 0x20d0
testq %rax, %rax
je 0x31e6
movq %rax, %r14
movq %rax, %rdi
callq 0x2100
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2280
jmp 0x3206
movq %rbx, %rdi
callq 0x3840
leaq -0x1c8(%rbp), %rbx
leaq 0x4fdc(%rip), %rsi      # 0x8189
movl $0x9, %edx
movq %rbx, %rdi
callq 0x2280
callq 0x2050
movl (%rax), %edi
callq 0x20d0
testq %rax, %rax
je 0x3218
movq %rax, %r14
movq %rax, %rdi
callq 0x2100
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2280
jmp 0x3238
movq -0x1c8(%rbp), %rax
movq -0x18(%rax), %rax
addq %rax, %rbx
movl -0x1a8(%rbp,%rax), %esi
orl $0x1, %esi
movq %rbx, %rdi
callq 0x2360
leaq -0x1c0(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x2320
jmp 0x3248
movq -0x1c8(%rbp), %rax
movq -0x18(%rax), %rax
addq %rax, %rbx
movl -0x1a8(%rbp,%rax), %esi
orl $0x1, %esi
movq %rbx, %rdi
callq 0x2360
leaq -0x1c0(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x2320
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rbx
cmpq %rax, %rbx
je 0x3264
movq -0x40(%rbp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x2260
movq 0x7d4d(%rip), %rsi      # 0xafb8
leaq -0x1d8(%rbp), %rdi
callq 0x21c0
leaq -0x158(%rbp), %rdi
callq 0x20c0
movq %rbx, %rax
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x329a
jmp 0x329a
movq %rax, %rbx
movq 0x7d14(%rip), %rsi      # 0xafb8
leaq -0x1d8(%rbp), %rdi
callq 0x21c0
leaq -0x158(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/i2c.cpp
// Function: I2C::readByte(unsigned char, unsigned char)
uint8_t I2C::readByte(uint8_t busAddr, uint8_t dataAddr)
{
  std::stringstream error;

  union i2c_smbus_data smbus_data;

  struct i2c_smbus_ioctl_data args;

  args.read_write = 1;
  args.command = dataAddr;
  args.size = 2;
  args.data = &smbus_data;

  m_mutex.lock();
  if (ioctl(m_busFd, I2C_SLAVE, busAddr) == -1)
  {
    m_mutex.unlock();
    return -1;
  }

  if (ioctl(m_busFd,I2C_SMBUS,&args) == -1)
  {
    m_mutex.unlock();
    return -1;
  }
  m_mutex.unlock();

  return 0xFF & smbus_data.byte;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
leaq -0x1d8(%rbp), %rdi
callq 0x2180
movb $0x1, -0x28(%rbp)
movb %bl, -0x27(%rbp)
movl $0x2, -0x24(%rbp)
leaq -0x4a(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x8(%r14), %rbx
movq %rbx, %rdi
callq 0x3712
movl (%r14), %edi
movzbl %r15b, %edx
movl $0x703, %esi            # imm = 0x703
xorl %eax, %eax
callq 0x22b0
cmpl $-0x1, %eax
je 0x3348
movl (%r14), %edi
leaq -0x28(%rbp), %rdx
movl $0x720, %esi            # imm = 0x720
xorl %eax, %eax
callq 0x22b0
cmpl $-0x1, %eax
je 0x3348
movq %rbx, %rdi
callq 0x3840
movb -0x4a(%rbp), %r14b
jmp 0x3353
movb $-0x1, %r14b
movq %rbx, %rdi
callq 0x3840
movq 0x7c5e(%rip), %rsi      # 0xafb8
leaq -0x1d8(%rbp), %rdi
callq 0x21c0
leaq -0x158(%rbp), %rdi
callq 0x20c0
movl %r14d, %eax
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x7c2b(%rip), %rsi      # 0xafb8
leaq -0x1d8(%rbp), %rdi
callq 0x21c0
leaq -0x158(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x23a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/mutex.cpp
// Function: Mutex::lock()
const char* Mutex::lock()
{
  std::stringstream error;
  int retVal;

  // Lock the thread Mutex (TLPI pg 636)
  retVal = pthread_mutex_lock(&m_pthread_mutex);
  if (retVal != 0)
  {
    error << "pthread_mutex_lock(): " << std::strerror(retVal);
    return error.str().c_str();
  }
  m_locked = true;

  return error.str().c_str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, %rbx
leaq -0x1b8(%rbp), %rdi
callq 0x2180
leaq 0x8(%rbx), %rdi
callq 0x22e0
testl %eax, %eax
je 0x3782
movl %eax, %r14d
leaq -0x1a8(%rbp), %rbx
leaq 0x4a62(%rip), %rsi      # 0x81af
movl $0x16, %edx
movq %rbx, %rdi
callq 0x2280
movl %r14d, %edi
callq 0x20d0
testq %rax, %rax
je 0x3797
movq %rax, %r14
movq %rax, %rdi
callq 0x2100
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2280
jmp 0x37b7
movb $0x1, (%rbx)
leaq -0x1a0(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x2320
jmp 0x37c7
movq -0x1a8(%rbp), %rax
movq -0x18(%rax), %rax
addq %rax, %rbx
movl -0x188(%rbp,%rax), %esi
orl $0x1, %esi
movq %rbx, %rdi
callq 0x2360
leaq -0x1a0(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x2320
leaq -0x20(%rbp), %rax
movq -0x10(%rax), %rbx
cmpq %rax, %rbx
je 0x37e3
movq -0x20(%rbp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x2260
movq 0x77ce(%rip), %rsi      # 0xafb8
leaq -0x1b8(%rbp), %rdi
callq 0x21c0
leaq -0x138(%rbp), %rdi
callq 0x20c0
movq %rbx, %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x3815
jmp 0x3815
movq %rax, %rbx
movq 0x7799(%rip), %rsi      # 0xafb8
leaq -0x1b8(%rbp), %rdi
callq 0x21c0
leaq -0x138(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x23a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/mutex.cpp
// Function: Mutex::unlock()
const char* Mutex::unlock()
{
  std::stringstream error;
  int retVal;

  // Unlock the thread Mutex (TLPI pg 636)
  retVal = pthread_mutex_unlock(&m_pthread_mutex);
  if (retVal != 0)
  {
    error << "pthread_mutex_unlock(): " << std::strerror(retVal);
    return error.str().c_str();
  }
  m_locked = false;

  return error.str().c_str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, %rbx
leaq -0x1b8(%rbp), %rdi
callq 0x2180
leaq 0x8(%rbx), %rdi
callq 0x21d0
testl %eax, %eax
je 0x38b0
movl %eax, %r14d
leaq -0x1a8(%rbp), %rbx
leaq 0x494b(%rip), %rsi      # 0x81c6
movl $0x18, %edx
movq %rbx, %rdi
callq 0x2280
movl %r14d, %edi
callq 0x20d0
testq %rax, %rax
je 0x38c5
movq %rax, %r14
movq %rax, %rdi
callq 0x2100
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2280
jmp 0x38e5
movb $0x0, (%rbx)
leaq -0x1a0(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x2320
jmp 0x38f5
movq -0x1a8(%rbp), %rax
movq -0x18(%rax), %rax
addq %rax, %rbx
movl -0x188(%rbp,%rax), %esi
orl $0x1, %esi
movq %rbx, %rdi
callq 0x2360
leaq -0x1a0(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x2320
leaq -0x20(%rbp), %rax
movq -0x10(%rax), %rbx
cmpq %rax, %rbx
je 0x3911
movq -0x20(%rbp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x2260
movq 0x76a0(%rip), %rsi      # 0xafb8
leaq -0x1b8(%rbp), %rdi
callq 0x21c0
leaq -0x138(%rbp), %rdi
callq 0x20c0
movq %rbx, %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x3943
jmp 0x3943
movq %rax, %rbx
movq 0x766b(%rip), %rsi      # 0xafb8
leaq -0x1b8(%rbp), %rdi
callq 0x21c0
leaq -0x138(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x23a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/mutex.cpp
// Function: Mutex::wait()
const char* Mutex::wait()
{
  std::stringstream error;
  int retVal;

  // Lock the thread Mutex (TLPI pg 636)
  retVal = pthread_mutex_lock(&m_pthread_mutex);
  if (retVal != 0)
  {
    error << "pthread_mutex_lock(): " << std::strerror(retVal);
    return error.str().c_str();
  }
  m_locked = true;

  // If the cond_wait is successful the mutex will be unlocked
  m_locked = false;

  // Wait for Thread Conditional Variable (TLPI pg 644)
  retVal = pthread_cond_wait(&m_pthread_cond, &m_pthread_mutex);
  if (retVal != 0)
  {
    m_locked = true;
    error << "pthread_cond_wait(): " << std::strerror(retVal);
    return error.str().c_str();
  }

  // The mutex is now relocked
  m_locked = true;

  return error.str().c_str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, %rbx
leaq -0x1c0(%rbp), %rdi
callq 0x2180
leaq 0x8(%rbx), %r15
movq %r15, %rdi
callq 0x22e0
testl %eax, %eax
je 0x39e3
movl %eax, %r14d
leaq -0x1b0(%rbp), %rbx
leaq 0x4801(%rip), %rsi      # 0x81af
movl $0x16, %edx
movq %rbx, %rdi
callq 0x2280
movl %r14d, %edi
callq 0x20d0
testq %rax, %rax
je 0x3a3f
movq %rax, %r14
movq %rax, %rdi
callq 0x2100
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2280
jmp 0x3a5f
movb $0x0, (%rbx)
leaq 0x30(%rbx), %rdi
movq %r15, %rsi
callq 0x22f0
movl %eax, %r14d
movb $0x1, (%rbx)
testl %eax, %eax
je 0x3a71
leaq -0x1b0(%rbp), %rbx
leaq 0x47d5(%rip), %rsi      # 0x81df
movl $0x15, %edx
movq %rbx, %rdi
callq 0x2280
movl %r14d, %edi
callq 0x20d0
testq %rax, %rax
je 0x3a83
movq %rax, %r14
movq %rax, %rdi
callq 0x2100
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2280
jmp 0x3aa3
movq -0x1b0(%rbp), %rax
movq -0x18(%rax), %rax
addq %rax, %rbx
movl -0x190(%rbp,%rax), %esi
orl $0x1, %esi
movq %rbx, %rdi
callq 0x2360
leaq -0x1a8(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x2320
jmp 0x3ab3
leaq -0x1a8(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x2320
jmp 0x3ab3
movq -0x1b0(%rbp), %rax
movq -0x18(%rax), %rax
addq %rax, %rbx
movl -0x190(%rbp,%rax), %esi
orl $0x1, %esi
movq %rbx, %rdi
callq 0x2360
leaq -0x1a8(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x2320
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rbx
cmpq %rax, %rbx
je 0x3acf
movq -0x28(%rbp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x2260
movq 0x74e2(%rip), %rsi      # 0xafb8
leaq -0x1c0(%rbp), %rdi
callq 0x21c0
leaq -0x140(%rbp), %rdi
callq 0x20c0
movq %rbx, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3b05
jmp 0x3b05
jmp 0x3b05
movq %rax, %rbx
movq 0x74a9(%rip), %rsi      # 0xafb8
leaq -0x1c0(%rbp), %rdi
callq 0x21c0
leaq -0x140(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x23a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/mutex.cpp
// Function: Mutex::signal()
const char* Mutex::signal()
{
  std::stringstream error;
  int retVal;

  // Signal the conditional variable (TLPI pg 644)
  retVal = pthread_cond_signal(&m_pthread_cond);
  if (retVal != 0)
  {
    error << "pthread_cond_signal(): " << std::strerror(retVal);
    return error.str().c_str();
  }
  return error.str().c_str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, %rbx
leaq -0x1b8(%rbp), %rdi
callq 0x2180
addq $0x30, %rbx
movq %rbx, %rdi
callq 0x2030
testl %eax, %eax
je 0x3ba3
movl %eax, %r14d
leaq -0x1a8(%rbp), %rbx
leaq 0x4687(%rip), %rsi      # 0x81f5
movl $0x17, %edx
movq %rbx, %rdi
callq 0x2280
movl %r14d, %edi
callq 0x20d0
testq %rax, %rax
je 0x3bb5
movq %rax, %r14
movq %rax, %rdi
callq 0x2100
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2280
jmp 0x3bd5
leaq -0x1a0(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x2320
jmp 0x3be5
movq -0x1a8(%rbp), %rax
movq -0x18(%rax), %rax
addq %rax, %rbx
movl -0x188(%rbp,%rax), %esi
orl $0x1, %esi
movq %rbx, %rdi
callq 0x2360
leaq -0x1a0(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x2320
leaq -0x20(%rbp), %rax
movq -0x10(%rax), %rbx
cmpq %rax, %rbx
je 0x3c01
movq -0x20(%rbp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x2260
movq 0x73b0(%rip), %rsi      # 0xafb8
leaq -0x1b8(%rbp), %rdi
callq 0x21c0
leaq -0x138(%rbp), %rdi
callq 0x20c0
movq %rbx, %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x3c33
jmp 0x3c33
movq %rax, %rbx
movq 0x737b(%rip), %rsi      # 0xafb8
leaq -0x1b8(%rbp), %rdi
callq 0x21c0
leaq -0x138(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x23a0
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/sleepTimer.cpp
// Function: SleepTimer::sleep()
void SleepTimer::sleep()
{
  m_wakeTime.tv_sec += m_durSec;
  m_wakeTime.tv_nsec += m_durNan;

  if (m_wakeTime.tv_nsec >= 1000000000)
  {
    m_wakeTime.tv_sec++;
    m_wakeTime.tv_nsec -= 1000000000;
  }

  clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &m_wakeTime, NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rdx
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
addq 0x10(%rdi), %rcx
movq %rcx, (%rdi)
addq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
cmpq $0x3b9aca00, %rax       # imm = 0x3B9ACA00
jl 0x3d25
incq %rcx
movq %rcx, (%rdx)
addq $-0x3b9aca00, %rax      # imm = 0xC4653600
movq %rax, 0x8(%rdx)
movl $0x1, %edi
movl $0x1, %esi
xorl %ecx, %ecx
popq %rbp
jmp 0x23f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/sendUdp.cpp
// Function: SendUdp::sendDoubles(double const*, int) const
const char* SendUdp::sendDoubles(const double* buffer, const int number) const
{
  if (m_socketFd == -1)
  {
    return "sendUdp class has not been initialized";
  }

  std::stringstream error;
  int size = 8*number;

  // Send datagrams to socket (TLPI PG 1161)
  if (sendto(m_socketFd, buffer, size, 0, (struct sockaddr*)&m_sockaddr_in, m_len) != size)
  {
    error << "sendto(): " << std::strerror(errno);
    return error.str().c_str();
  }

  return error.str().c_str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
cmpl $-0x1, (%rdi)
je 0x4287
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
leaq -0x1c0(%rbp), %rdi
callq 0x2180
shll $0x3, %r14d
movslq %r14d, %r14
leaq 0x4(%r15), %r8
movl (%r15), %edi
movl 0x14(%r15), %r9d
movq %rbx, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x2060
cmpq %r14, %rax
jne 0x4293
leaq -0x1a8(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x2320
jmp 0x430a
leaq 0x3ff4(%rip), %rbx      # 0x8282
jmp 0x4345
leaq -0x1b0(%rbp), %rbx
leaq 0x4008(%rip), %rsi      # 0x82a9
movl $0xa, %edx
movq %rbx, %rdi
callq 0x2280
callq 0x2050
movl (%rax), %edi
callq 0x20d0
testq %rax, %rax
je 0x42da
movq %rax, %r14
movq %rax, %rdi
callq 0x2100
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2280
jmp 0x42fa
movq -0x1b0(%rbp), %rax
movq -0x18(%rax), %rax
addq %rax, %rbx
movl -0x190(%rbp,%rax), %esi
orl $0x1, %esi
movq %rbx, %rdi
callq 0x2360
leaq -0x1a8(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x2320
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rbx
cmpq %rax, %rbx
je 0x4326
movq -0x28(%rbp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x2260
movq 0x6c8b(%rip), %rsi      # 0xafb8
leaq -0x1c0(%rbp), %rdi
callq 0x21c0
leaq -0x140(%rbp), %rdi
callq 0x20c0
movq %rbx, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x435a
jmp 0x435a
movq %rax, %rbx
movq 0x6c54(%rip), %rsi      # 0xafb8
leaq -0x1c0(%rbp), %rdi
callq 0x21c0
leaq -0x140(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/sendFunction.cpp
// Function: sendFunction(void*)
void* sendFunction(void *pArg)
{
  // Push Cleanup Handler to cleanup thread
  pthread_cleanup_push(&Thread::cleanup,pArg);

  // Create a SendUdp Class
  SendUdp sendUdp;
  
  // Initialize the SendUdp Class
  sendUdp.initialize(LOCALIP, REMOTEIP, SNDPORT);

  // Create a buffer to dump the data in  
  double localBuffer[SNDNUM];
  
  // Loop and send data
  while(true)  
	  {
		  sendMutex.wait(); // Wait until gets access to mutex
	  
          std::memcpy(localBuffer, sendBuffer, sizeof(localBuffer)); // (Copy to, Copy from, Copy Number of Bytes)
	  
          sendMutex.unlock(); // Now anyone can access send buffer
	  
          sendUdp.sendDoubles(localBuffer, SNDNUM); // Send the specified number of doubles from the localBuffer to Simulink
	  }

  // Run clean up handler to cleanup thread (TLPI pg 676)
  pthread_cleanup_pop(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq -0x40(%rbp), %rdi
callq 0x3d70
leaq 0x3c20(%rip), %rsi      # 0x82b4
leaq 0x3c24(%rip), %rdx      # 0x82bf
leaq -0x40(%rbp), %rdi
movl $0x303a, %ecx           # imm = 0x303A
callq 0x3d96
leaq 0x6d40(%rip), %r14      # 0xb3f0
leaq 0x6d19(%rip), %r13      # 0xb3d0
leaq -0x40(%rbp), %r15
leaq -0x60(%rbp), %r12
movq %r14, %rdi
callq 0x396e
movaps (%r13), %xmm0
movaps 0x10(%r13), %xmm1
movaps %xmm1, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movq %r14, %rdi
callq 0x3840
movq %r15, %rdi
movq %r12, %rsi
movl $0x4, %edx
callq 0x4224
jmp 0x46bf
jmp 0x46f5
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0x3d7c
jmp 0x4706
movq %rax, %r14
movq %rbx, %rdi
callq 0x59f6
movq %r14, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0x36be
nop
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/threadManager.cpp
// Function: ThreadManager::~ThreadManager()
ThreadManager::~ThreadManager()
{
  // Iterate over map and free memory
  std::map<unsigned int, Thread*>::iterator it = m_threadMap.begin();
  for (it = m_threadMap.begin(); it != m_threadMap.end(); ++it)
  {
    delete it->second;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %r14
leaq 0x10(%rdi), %r12
cmpq %r12, %r14
je 0x47b3
movq 0x28(%r14), %r15
testq %r15, %r15
je 0x4796
movq %r15, %rdi
callq 0x5994
movl $0x20, %esi
movq %r15, %rdi
callq 0x2260
movq %r14, %rdi
callq 0x2170
movq %rax, %r14
cmpq %r12, %rax
jne 0x4785
leaq 0x8(%rbx), %r14
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x36f4
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x530a
nop
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/threadManager.cpp
// Function: ThreadManager::create(void* (*)(void*))
const char* ThreadManager::create(void *(*function)(void *))
{
  // Look for lowest available thread id
  unsigned int id = 0;
  bool found = true;
  while(found)
  {
    if (m_threadMap.count(id))
    {
      id++;
    }
    else
    {
      found = false;
    }
  }

  std::string error = threadCreate(function,id);
  if (!error.empty())
  {
    return error.c_str();
  }

  std::stringstream idStream;
  idStream << id;

  return idStream.str().c_str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
movq 0x18(%rdi), %rax
leaq 0x10(%rdi), %rdx
xorl %ecx, %ecx
testq %rax, %rax
je 0x482a
movq %rax, %r9
movq %rdx, %r8
xorl %r10d, %r10d
cmpl %ecx, 0x20(%r9)
setb %r10b
cmovaeq %r9, %r8
movq 0x10(%r9,%r10,8), %r9
testq %r9, %r9
jne 0x47f7
cmpq %rdx, %r8
je 0x482a
movl 0x20(%r8), %r8d
cmpl %r8d, %ecx
movl %ecx, %ebx
sbbl $-0x1, %ebx
cmpl %r8d, %ecx
movl %ebx, %ecx
jae 0x47ec
jmp 0x482c
movl %ecx, %ebx
movl %ebx, %edx
callq 0x4930
leaq -0x30(%rbp), %r14
leaq -0x1d8(%rbp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x5264
cmpq $0x0, 0x8(%r14)
je 0x4859
movq -0x30(%rbp), %rdi
movq %rdi, %rbx
jmp 0x48c2
leaq -0x1d8(%rbp), %rdi
callq 0x2180
leaq -0x1c8(%rbp), %rdi
movl %ebx, %esi
callq 0x2150
leaq -0x1c0(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x2320
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rbx
cmpq %rax, %rbx
je 0x489f
movq -0x40(%rbp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x2260
movq 0x6712(%rip), %rsi      # 0xafb8
leaq -0x1d8(%rbp), %rdi
callq 0x21c0
leaq -0x158(%rbp), %rdi
callq 0x20c0
movq -0x30(%rbp), %rdi
leaq -0x20(%rbp), %rax
cmpq %rax, %rdi
je 0x48d7
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x2260
movq %rbx, %rax
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x48e8
movq %rax, %rbx
movq 0x66c6(%rip), %rsi      # 0xafb8
leaq -0x1d8(%rbp), %rdi
callq 0x21c0
leaq -0x158(%rbp), %rdi
callq 0x20c0
jmp 0x490f
movq %rax, %rbx
leaq -0x20(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4928
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x2260
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/threadManager.cpp
// Function: ThreadManager::threadCreate(void* (*)(void*), unsigned int)
const char* ThreadManager::threadCreate(void *(*function)(void *), const unsigned int id)
{
  std::stringstream error;

  Thread* pThread;

  try
  {
    pThread = new Thread(function, this, id);
  }
  catch (const char* e)
  {
    error << "Thread(): " << e;
    return error.str().c_str();
  }

  m_threadMap[id] = pThread;

  return error.str().c_str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
movl %edx, -0x24(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x2180
movl $0x20, %edi
callq 0x2250
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movl %r15d, %ecx
callq 0x5890
addq $0x8, %rbx
leaq -0x24(%rbp), %rsi
movq %rbx, %rdi
callq 0x52a2
movq %r14, (%rax)
leaq -0x1b8(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x2320
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rbx
cmpq %rax, %rbx
je 0x49b7
movq -0x38(%rbp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x2260
movq 0x65fa(%rip), %rsi      # 0xafb8
leaq -0x1d0(%rbp), %rdi
callq 0x21c0
leaq -0x150(%rbp), %rdi
callq 0x20c0
movq %rbx, %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x49eb
movq %rax, %rbx
movq 0x65c3(%rip), %rsi      # 0xafb8
leaq -0x1d0(%rbp), %rdi
callq 0x21c0
leaq -0x150(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x23a0
movq %rdx, %r15
movq %rax, %rbx
movl $0x20, %esi
movq %r14, %rdi
callq 0x2260
jmp 0x4a30
movq %rdx, %r15
movq %rax, %rbx
cmpl $0x1, %r15d
jne 0x49ee
movq %rbx, %rdi
callq 0x20f0
movq %rax, %rbx
leaq -0x1c0(%rbp), %r14
leaq 0x38a9(%rip), %rsi      # 0x82f8
movl $0xa, %edx
movq %r14, %rdi
callq 0x2280
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2240
leaq -0x1b8(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x2320
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rbx
cmpq %rax, %rbx
je 0x4a93
movq -0x38(%rbp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x2260
callq 0x2350
jmp 0x49b7
jmp 0x4a9f
movq %rax, %rbx
callq 0x2350
jmp 0x49ee
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/threadManager.cpp
// Function: ThreadManager::create(void* (*)(void*), unsigned int)
const char* ThreadManager::create(void *(*function)(void *), const unsigned int id)
{
  std::stringstream error;

  // Look for existing id
  if (m_threadMap.count(id))
  {
    error << "thread " << id << " already exists";
    return error.str().c_str();
  }

  return threadCreate(function,id);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq -0x1c0(%rbp), %rdi
callq 0x2180
movq 0x18(%r15), %rax
testq %rax, %rax
je 0x4b01
leaq 0x10(%r15), %rdx
movq %rdx, %rcx
xorl %esi, %esi
cmpl %ebx, 0x20(%rax)
setb %sil
cmovaeq %rax, %rcx
movq 0x10(%rax,%rsi,8), %rax
testq %rax, %rax
jne 0x4ae0
cmpq %rdx, %rcx
je 0x4b01
cmpl %ebx, 0x20(%rcx)
jbe 0x4b41
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x4930
movq %rax, %rbx
movq 0x64a0(%rip), %rsi      # 0xafb8
leaq -0x1c0(%rbp), %rdi
callq 0x21c0
leaq -0x140(%rbp), %rdi
callq 0x20c0
movq %rbx, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq -0x1b0(%rbp), %r14
leaq 0x3791(%rip), %rsi      # 0x82e0
movl $0x7, %edx
movq %r14, %rdi
callq 0x2280
movl %ebx, %esi
movq %r14, %rdi
callq 0x2150
leaq 0x377b(%rip), %rsi      # 0x82e8
movl $0xf, %edx
movq %rax, %rdi
callq 0x2280
leaq -0x1a8(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x2320
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rbx
cmpq %rax, %rbx
je 0x4b11
movq -0x28(%rbp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x2260
jmp 0x4b11
jmp 0x4bb1
movq %rax, %rbx
movq 0x63fd(%rip), %rsi      # 0xafb8
leaq -0x1c0(%rbp), %rdi
callq 0x21c0
leaq -0x140(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x23a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/threadManager.cpp
// Function: ThreadManager::cancel(unsigned int)
const char* ThreadManager::cancel(const unsigned int id)
{
  std::stringstream error;
  int retVal;

  if (!m_threadMap.count(id))
  {
    error << "thread id " << id << " does not exist";
    return error.str().c_str();
  }

  // Cancel the thread (TLPI pg 671)
  retVal = pthread_cancel(m_threadMap[id]->getThread());
  if (retVal != 0)
  {
    error << "pthread_cancel(): " << std::strerror(retVal);
    return error.str().c_str();
  }

  return error.str().c_str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movl %esi, %ebx
movq %rdi, %r14
movl %esi, -0x14(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x2180
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x50f4
leaq 0x8(%r14), %rdi
addq $0x10, %r14
movq %r14, %rcx
xorl %edx, %edx
cmpl %ebx, 0x20(%rax)
setb %dl
cmovaeq %rax, %rcx
movq 0x10(%rax,%rdx,8), %rax
testq %rax, %rax
jne 0x50d0
cmpq %r14, %rcx
je 0x50f4
cmpl %ebx, 0x20(%rcx)
jbe 0x5187
leaq -0x1b0(%rbp), %r14
leaq 0x326a(%rip), %rsi      # 0x836c
movl $0xa, %edx
movq %r14, %rdi
callq 0x2280
movl %ebx, %esi
movq %r14, %rdi
callq 0x2150
leaq 0x3257(%rip), %rsi      # 0x8377
movl $0xf, %edx
movq %rax, %rdi
callq 0x2280
leaq -0x1a8(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x2320
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rbx
cmpq %rax, %rbx
je 0x5159
movq -0x28(%rbp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x2260
movq 0x5e58(%rip), %rsi      # 0xafb8
leaq -0x1c0(%rbp), %rdi
callq 0x21c0
leaq -0x140(%rbp), %rdi
callq 0x20c0
movq %rbx, %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x14(%rbp), %rsi
callq 0x52a2
movq (%rax), %rdi
callq 0x59a4
movq %rax, %rdi
callq 0x22a0
movl %eax, %r14d
testl %eax, %eax
je 0x51ea
leaq -0x1b0(%rbp), %rbx
leaq 0x31d2(%rip), %rsi      # 0x8387
movl $0x12, %edx
movq %rbx, %rdi
callq 0x2280
movl %r14d, %edi
callq 0x20d0
testq %rax, %rax
je 0x51ff
movq %rax, %r14
movq %rax, %rdi
callq 0x2100
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2280
jmp 0x521f
leaq -0x1a8(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x2320
jmp 0x513d
movq -0x1b0(%rbp), %rax
movq -0x18(%rax), %rax
addq %rax, %rbx
movl -0x190(%rbp,%rax), %esi
orl $0x1, %esi
movq %rbx, %rdi
callq 0x2360
leaq -0x1a8(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x2320
jmp 0x513d
jmp 0x523a
jmp 0x523a
jmp 0x523a
movq %rax, %rbx
movq 0x5d74(%rip), %rsi      # 0xafb8
leaq -0x1c0(%rbp), %rdi
callq 0x21c0
leaq -0x140(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/thread.cpp
// Function: Thread::Thread(void* (*)(void*), ThreadManager*, unsigned int)
Thread::Thread(void *(*function)(void *),
               ThreadManager* pManager,
               const unsigned int id) :
m_alive(true), m_pManager(pManager), m_id(id)
{
  int retVal;

  // Create pthread (TLPI pg 622)
  retVal = pthread_create(&m_pthread, NULL, function, this);
  if (retVal != 0)
  {
    std::stringstream error;
    error << "pthread_create(): " << std::strerror(retVal);
    throw error.str().c_str();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rsi, %rax
movq %rdi, %r8
movl %ecx, (%rdi)
movb $0x1, 0x10(%rdi)
movq %rdx, 0x18(%rdi)
addq $0x8, %rdi
xorl %esi, %esi
movq %rax, %rdx
movq %r8, %rcx
callq 0x23c0
testl %eax, %eax
jne 0x58cf
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %ebx
leaq -0x1b8(%rbp), %rdi
callq 0x2180
leaq -0x1a8(%rbp), %r14
leaq 0x2af4(%rip), %rsi      # 0x83df
movl $0x12, %edx
movq %r14, %rdi
callq 0x2280
movl %ebx, %edi
callq 0x20d0
movq %r14, %rdi
movq %rax, %rsi
callq 0x2240
movl $0x8, %edi
callq 0x2110
movq %rax, %r14
leaq -0x1a0(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x2320
movq -0x30(%rbp), %rax
movq %rax, (%r14)
movq 0x5693(%rip), %rsi      # 0xafc8
movq %r14, %rdi
xorl %edx, %edx
callq 0x2370
movq %rax, %rbx
leaq -0x20(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x596d
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x2260
jmp 0x596d
movq %rax, %rbx
movq %r14, %rdi
callq 0x21a0
jmp 0x596d
movq %rax, %rbx
movq 0x5644(%rip), %rsi      # 0xafb8
leaq -0x1b8(%rbp), %rdi
callq 0x21c0
leaq -0x138(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/thread.cpp
// Function: Thread::threadCleanup()
void Thread::threadCleanup()
{
  // Get the mutex from the threadManager
  Mutex* pMutex = m_pManager->getMutex();

  // Lock the mutex
  pMutex->lock();

  // Mark this thread as dead
  m_alive = false;

  // Increment the managers join variable
  m_pManager->incrementJoin();

  // Unlock the mutex
  pMutex->unlock();

  // Signal the thread conditional variable
  pMutex->signal();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x5090
movq %rax, %r14
movq %rax, %rdi
callq 0x3712
movb $0x0, 0x10(%rbx)
movq 0x18(%rbx), %rdi
callq 0x5088
movq %r14, %rdi
callq 0x3840
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x3b30
nop
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/propagateANDupdate.cpp
// Function: X(double const (&) [3], double (&) [3][3])
void X(const double (&v)[3], double (&vX)[3][3])
{
  vX[0][0] = 0;
  vX[0][1] = -v[2];
  vX[0][2] = v[1];
  vX[1][0] = v[2];
  vX[1][1] = 0;
  vX[1][2] = -v[0];
  vX[2][0] = -v[1];
  vX[2][1] = v[0];
  vX[2][2] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movq %rax, (%rsi)
movsd 0x10(%rdi), %xmm0
movaps 0x130c(%rip), %xmm1     # 0x8440
xorps %xmm1, %xmm0
movlps %xmm0, 0x8(%rsi)
movsd 0x8(%rdi), %xmm0
movsd %xmm0, 0x10(%rsi)
movsd 0x10(%rdi), %xmm0
movsd %xmm0, 0x18(%rsi)
movq %rax, 0x20(%rsi)
movsd (%rdi), %xmm0
xorps %xmm1, %xmm0
movlps %xmm0, 0x28(%rsi)
movsd 0x8(%rdi), %xmm0
xorps %xmm1, %xmm0
movlps %xmm0, 0x30(%rsi)
movsd (%rdi), %xmm0
movsd %xmm0, 0x38(%rsi)
movq %rax, 0x40(%rsi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/propagateANDupdate.cpp
// Function: mult3x3(double const (&) [3][3], double const (&) [3][3], double (&) [3][3])
void mult3x3(const double (&A)[3][3], const double (&B)[3][3], double (&C)[3][3])
{
  for (int i = 0; i < 3; i++)
  {
    for (int j = 0; j < 3; j++)
    {
      C[i][j] = 0;

      for (int k = 0; k < 3; k++)
      {
        C[i][j] += A[i][k]*B[k][j];
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
xorl %eax, %eax
leaq (%rax,%rax,2), %rcx
leaq (%rdx,%rcx,8), %rcx
movq %rsi, %r8
xorl %r9d, %r9d
leaq (%rcx,%r9,8), %r10
movq $0x0, (%r10)
xorpd %xmm0, %xmm0
movq %r8, %r11
xorl %ebx, %ebx
movsd (%rdi,%rbx,8), %xmm1
mulsd (%r11), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, (%r10)
incq %rbx
addq $0x18, %r11
cmpq $0x3, %rbx
jne 0x71d4
incq %r9
addq $0x8, %r8
cmpq $0x3, %r9
jne 0x71c0
incq %rax
addq $0x18, %rdi
cmpq $0x3, %rax
jne 0x71b2
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/rachit31[P]CubeSatADCS/propagateANDupdate.cpp
// Function: mult6x6(double const (&) [6][6], double const (&) [6][6], double (&) [6][6])
void mult6x6(const double (&A)[6][6], const double (&B)[6][6], double (&C)[6][6])
{
  for (int i = 0; i < 6; i++)
  {
    for (int j = 0; j < 6; j++)
    {
      C[i][j] = 0;

      for (int k = 0; k < 6; k++)
      {
        C[i][j] += A[i][k]*B[k][j];
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
xorl %eax, %eax
leaq (%rax,%rax,2), %rcx
shlq $0x4, %rcx
addq %rdx, %rcx
movq %rsi, %r8
xorl %r9d, %r9d
leaq (%rcx,%r9,8), %r10
movq $0x0, (%r10)
xorpd %xmm0, %xmm0
movq %r8, %r11
xorl %ebx, %ebx
movsd (%rdi,%rbx,8), %xmm1
mulsd (%r11), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, (%r10)
incq %rbx
addq $0x30, %r11
cmpq $0x6, %rbx
jne 0x72a8
incq %r9
addq $0x8, %r8
cmpq $0x6, %r9
jne 0x7294
incq %rax
addq $0x30, %rdi
cmpq $0x6, %rax
jne 0x7283
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/akw0088[P]openssl/rabinkarp.c
// Function: main
int main(int argc, char** argv)
{
	if (argc < 2)
	{
		printf("Usage: rabinkarp file\r\n");
		return -1;
	}

	unsigned int length = 0;
	char *data = get_file(argv[1], &length);
	if (data == NULL)
	{
		printf("Unable to open %s\r\n", argv[1]);
	}
	
	unsigned int hash = 0;
	hash = rk_hash((unsigned char *)data, length);
	printf("%08X\r\n", hash);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0x1, %edi
jg 0x137c
leaq 0xcb2(%rip), %rdi       # 0x2022
callq 0x1040
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x13cd
movq %rsi, %rbx
leaq -0xc(%rbp), %rsi
movl $0x0, (%rsi)
movq 0x8(%rbx), %rdi
callq 0x12ac
testq %rax, %rax
je 0x139f
movl -0xc(%rbp), %esi
movq %rax, %rdi
jmp 0x13b6
movq 0x8(%rbx), %rsi
leaq 0xc5d(%rip), %rdi       # 0x2007
xorl %eax, %eax
callq 0x1070
movl -0xc(%rbp), %esi
xorl %edi, %edi
callq 0x11d2
leaq 0xc59(%rip), %rdi       # 0x201b
xorl %ebx, %ebx
movl %eax, %esi
xorl %eax, %eax
callq 0x1070
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/dannye[P]jed/src/encoder.cpp
// Function: forwardDCT(BMPImage const&)
void forwardDCT(const BMPImage& image) {
    for (uint y = 0; y < image.blockHeight; ++y) {
        for (uint x = 0; x < image.blockWidth; ++x) {
            for (uint i = 0; i < 3; ++i) {
                forwardDCTBlockComponent(image.blocks[y * image.blockWidth + x][i]);
            }
        }
    }
}

// Assembly:
movl 0x10(%rdi), %eax
testl %eax, %eax
je 0x300d
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x14(%rdi), %ecx
xorl %ebp, %ebp
testl %ecx, %ecx
movl $0x0, %ecx
je 0x2ffd
xorl %r14d, %r14d
xorl %r15d, %r15d
movl 0x14(%rbx), %eax
imull %ebp, %eax
addl %r14d, %eax
leaq (%rax,%rax,2), %rdi
shlq $0x8, %rdi
addq 0x8(%rbx), %rdi
testl %r15d, %r15d
je 0x2fd9
cmpl $0x1, %r15d
jne 0x2fe3
addq $0x100, %rdi            # imm = 0x100
callq 0x2aad
incl %r15d
jmp 0x2fb2
addq $0x200, %rdi            # imm = 0x200
callq 0x2aad
incl %r14d
movl 0x14(%rbx), %ecx
cmpl %ecx, %r14d
jb 0x2faf
movl 0x10(%rbx), %eax
incl %ebp
cmpl %eax, %ebp
jb 0x2fa3
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/dannye[P]jed/src/encoder.cpp
// Function: quantize(BMPImage const&)
void quantize(const BMPImage& image) {
    for (uint y = 0; y < image.blockHeight; ++y) {
        for (uint x = 0; x < image.blockWidth; ++x) {
            for (uint i = 0; i < 3; ++i) {
                quantizeBlockComponent(*qTables100[i], image.blocks[y * image.blockWidth + x][i]);
            }
        }
    }
}

// Assembly:
movl 0x10(%rdi), %eax
testl %eax, %eax
je 0x30c5
pushq %r15
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rcx
movl 0x14(%rdi), %edx
xorl %esi, %esi
leaq 0x228c(%rip), %r8       # 0x52d0
testl %edx, %edx
movl $0x0, %edx
je 0x30ba
xorl %r9d, %r9d
xorl %r10d, %r10d
movl 0x14(%rdi), %eax
imull %esi, %eax
addl %r9d, %eax
leaq (%rax,%rax,2), %r11
shlq $0x8, %r11
addq %rcx, %r11
testl %r10d, %r10d
je 0x3082
cmpl $0x2, %r10d
jne 0x307b
addq $0x200, %r11            # imm = 0x200
jmp 0x3082
addq $0x100, %r11            # imm = 0x100
movslq (%r8,%r10,4), %rbx
xorl %r14d, %r14d
leaq (%rbx,%r14,4), %r15
movl (%r11,%r14,4), %eax
cltd
idivl (%r8,%r15)
movl %eax, (%r11,%r14,4)
incq %r14
cmpq $0x40, %r14
jne 0x3089
incq %r10
cmpq $0x3, %r10
jne 0x3053
incl %r9d
movl 0x14(%rdi), %edx
cmpl %edx, %r9d
jb 0x3050
movl 0x10(%rdi), %eax
incl %esi
cmpl %eax, %esi
jb 0x3044
popq %rbx
popq %r14
popq %r15
retq