LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/richarddurbin[P]hash10x/array.c
// Function: arrayFind
BOOL arrayFind(Array a, void *s, int *ip, ArrayOrder *order)
{
  int ord ;
  int i = 0 , j, k ;

  if (!arrayExists (a)) 
    die ("arrayFind called on bad array %lx", (long unsigned int) a) ;

  j = arrayMax(a) ;
  if (!j || (ord = order(s,uArray(a,0))) < 0)
    { if (ip) *ip = -1 ;
      return FALSE ;
    }   /* not found */

  if (ord == 0)
    { if (ip) *ip = 0 ;
      return TRUE ;
    }

  if ((ord = order(s,uArray(a,--j))) > 0)
    { if (ip) *ip = j ;
      return FALSE ;
    }
  
  if (ord == 0)
    { if (ip) *ip = j ;
      return TRUE ;
    }

  while(TRUE)
    { k = i + ((j-i) >> 1) ; /* midpoint */
      if ((ord = order(s, uArray(a,k))) == 0)
	{ if (ip) *ip = k ;
	  return TRUE ;
	}
      if (ord > 0) i = k ;
      else j = k ;
      if (i == (j-1))
        break ;
    }
  if (ip)
    *ip = i ;
  return FALSE ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
testq %rdi, %rdi
je 0x4e82
cmpl $0x881502, (%r13)       # imm = 0x881502
je 0x4e93
leaq 0x2128(%rip), %rdi      # 0x6fb1
movq %r13, %rsi
xorl %eax, %eax
callq 0x5198
movl 0x18(%r13), %r14d
testl %r14d, %r14d
je 0x4ed4
movq %r13, %rdi
xorl %esi, %esi
callq 0x4cbc
movq %r12, %rdi
movq %rax, %rsi
callq *%r15
testl %eax, %eax
js 0x4ed4
je 0x4ee1
decl %r14d
movq %r13, %rdi
movl %r14d, %esi
callq 0x4cbc
movq %r12, %rdi
movq %rax, %rsi
callq *%r15
testl %eax, %eax
jle 0x4ee8
xorl %eax, %eax
jmp 0x4f37
xorl %eax, %eax
testq %rbx, %rbx
je 0x4f3f
pushq $-0x1
popq %r14
jmp 0x4f3c
xorl %r14d, %r14d
movb $0x1, %al
jmp 0x4f37
je 0x4ee4
movq %rbx, (%rsp)
xorl %ebp, %ebp
movl %r14d, %ebx
movl %ebx, %r14d
subl %ebp, %r14d
sarl %r14d
addl %ebp, %r14d
movq %r13, %rdi
movl %r14d, %esi
callq 0x4cbc
movq %r12, %rdi
movq %rax, %rsi
callq *%r15
testl %eax, %eax
je 0x4f31
jle 0x4f1f
movl %r14d, %ebp
movl %ebx, %r14d
leal -0x1(%r14), %eax
movl %r14d, %ebx
cmpl %eax, %ebp
jne 0x4ef3
xorl %eax, %eax
movl %ebp, %r14d
jmp 0x4f33
movb $0x1, %al
movq (%rsp), %rbx
testq %rbx, %rbx
je 0x4f3f
movl %r14d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/richarddurbin[P]hash10x/array.c
// Function: arrayRemove
BOOL arrayRemove (Array a, void * s, int (* order)(const void*, const void*))
{
  int i;

  if (!arrayExists (a))
    die ("arrayRemove called on bad array %lx", (long unsigned int) a) ;

  if (arrayFind(a, s, &i,order))
    {
      /* memcpy would be faster but regions overlap
       * and memcpy is said to fail with some compilers
       */
      char *cp = uArray(a,i), *cq = cp + a->size ;
      int j = (arrayMax(a) - i)*(a->size) ;
      while (j--)
	*cp++ = *cq++ ;

      arrayMax(a)-- ;
      return TRUE ;
    }
  else

    return FALSE ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
testq %rdi, %rdi
je 0x4f6d
cmpl $0x881502, (%rbx)       # imm = 0x881502
je 0x4f7e
leaq 0x205f(%rip), %rdi      # 0x6fd3
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5198
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x4e5c
testb %al, %al
je 0x4fc7
movl 0xc(%rsp), %esi
movq %rbx, %rdi
callq 0x4cbc
movslq 0x14(%rbx), %rcx
movl 0x18(%rbx), %edx
subl 0xc(%rsp), %edx
imull %ecx, %edx
subl $0x1, %edx
jb 0x4fc0
movb (%rax,%rcx), %sil
movb %sil, (%rax)
incq %rax
jmp 0x4faf
decl 0x18(%rbx)
movb $0x1, %al
jmp 0x4fc9
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/richarddurbin[P]hash10x/array.c
// Function: arrayInsert
BOOL arrayInsert(Array a, void * s, int (*order)(const void*, const void*))
{
  int i, j, arraySize;

  if (!arrayExists (a))
    die ("arrayInsert called on bad array %x", (long unsigned int)a) ;

  if (arrayFind(a, s, &i,order))
    return FALSE ;  /* no doubles */
  
  arraySize = arrayMax(a) ;
  j = arraySize + 1 ;

  uArray(a,j-1) ; /* to create space */

	/* avoid memcpy for same reasons as above */
  {
    char *cp, *cq ;
    int k ;
    
    if (arraySize > 0)
      { cp = uArray(a,j - 1) + a->size - 1 ;
	cq = cp - a->size ;
	k = (j - i - 1)*(a->size) ;
	while (k--)
	  *cp-- = *cq-- ;
      }
    
    cp = uArray(a,i+1) ; 
    cq = (char *) s ; 
    k = a->size ;
    while (k--)
      *cp++ = *cq++ ;
  }
  return TRUE ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
testq %rdi, %rdi
je 0x4ff3
cmpl $0x881502, (%r14)       # imm = 0x881502
je 0x5004
leaq 0x1ffd(%rip), %rdi      # 0x6ff7
movq %r14, %rsi
xorl %eax, %eax
callq 0x5198
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
callq 0x4e5c
testb %al, %al
je 0x501f
xorl %eax, %eax
jmp 0x5091
movl 0x18(%r14), %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x4cbc
testl %r15d, %r15d
jle 0x506a
movq %r14, %rdi
movl %r15d, %esi
callq 0x4cbc
movslq 0x14(%r14), %rdx
subl 0xc(%rsp), %r15d
leaq (%rax,%rdx), %rcx
decq %rcx
imull %edx, %r15d
negl %r15d
xorl %edx, %edx
cmpl %edx, %r15d
je 0x506a
movb -0x1(%rax,%rdx), %sil
movb %sil, (%rcx,%rdx)
decq %rdx
jmp 0x5057
movl 0xc(%rsp), %esi
incl %esi
movq %r14, %rdi
callq 0x4cbc
movl 0x14(%r14), %ecx
xorl %edx, %edx
cmpl %edx, %ecx
je 0x508f
movb (%rbx,%rdx), %sil
movb %sil, (%rax,%rdx)
incq %rdx
jmp 0x507e
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/richarddurbin[P]hash10x/array.c
// Function: arrayCompress
void arrayCompress(Array a)
{
  int i, j, k , as ;
  char *x, *y, *ab ;

  if (!arrayExists (a))
    die ("arrayCompress called on bad array %lx", (long unsigned int) a) ;

  if (arrayMax(a) < 2)
    return ;

  ab = a->base ; 
  as = a->size ;
  for (i = 1, j = 0 ; i < arrayMax(a) ; i++)
    { x = ab + i * as ; y = ab + j * as ;
      for (k = a->size ; k-- ;)		
	if (*x++ != *y++) 
	  goto different ;
      continue ;
      
    different:
      if (i != ++j)
	{ x = ab + i * as ; y = ab + j * as ;
	  for (k = a->size ; k-- ;)	 
	    *y++ = *x++ ;
	}
    }
  arrayMax(a) = j + 1 ;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x50af
cmpl $0x881502, (%rbx)       # imm = 0x881502
je 0x50c0
leaq 0x1f64(%rip), %rdi      # 0x701a
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5198
movl 0x18(%rbx), %r8d
cmpl $0x2, %r8d
jl 0x5147
movq 0x8(%rbx), %rcx
movslq 0x14(%rbx), %rdx
leaq (%rcx,%rdx), %rsi
xorl %eax, %eax
pushq $0x1
popq %rdi
movslq %r8d, %r9
cmpq %r9, %rdi
jge 0x5142
movl %eax, %r9d
imull %edx, %r9d
movslq %r9d, %r10
addq %rcx, %r10
movl 0x14(%rbx), %r9d
xorl %r11d, %r11d
cmpl %r11d, %r9d
je 0x513a
movb (%rsi,%r11), %bpl
leaq 0x1(%r11), %r14
cmpb (%r10,%r11), %bpl
movq %r14, %r11
je 0x50f7
incl %eax
cmpq %rax, %rdi
je 0x513a
movl %eax, %r8d
imull %edx, %r8d
movslq %r8d, %r8
addq %rcx, %r8
xorl %r10d, %r10d
cmpl %r10d, %r9d
je 0x5136
movb (%rsi,%r10), %r11b
movb %r11b, (%r8,%r10)
incq %r10
jmp 0x5124
movl 0x18(%rbx), %r8d
incq %rdi
addq %rdx, %rsi
jmp 0x50db
incl %eax
movl %eax, 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/richarddurbin[P]hash10x/utils.c
// Function: die
void die (char *format, ...)
{
  va_list args ;

  va_start (args, format) ;
  fprintf (stderr, "FATAL ERROR: ") ;
  vfprintf (stderr, format, args) ;
  fprintf (stderr, "\n") ;
  va_end (args) ;

  exit (-1) ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x51fb
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r14
movq %rdi, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
movq 0x4dd6(%rip), %r15      # 0x9ff8
movq (%r15), %rcx
leaq 0x1e4a(%rip), %rdi      # 0x7076
pushq $0xd
popq %rsi
pushq $0x1
popq %rdx
callq 0x1220
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x11e0
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x10e0
pushq $-0x1
popq %rdi
callq 0x1210
// File: /workspace/github_c_makefile_star2_O2/richarddurbin[P]hash10x/utils.c
// Function: myalloc
void *myalloc (size_t size)
{
  void *p = (void*) malloc (size) ;
  if (!p) die ("myalloc failure requesting %d bytes", size) ;
  totalAllocated += size ;
  return p ;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x1170
testq %rax, %rax
je 0x526f
addq %rbx, 0x6123(%rip)      # 0xb390
popq %rbx
retq
leaq 0x1e0e(%rip), %rdi      # 0x7084
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5198
// File: /workspace/github_c_makefile_star2_O2/richarddurbin[P]hash10x/utils.c
// Function: mycalloc
void *mycalloc (size_t number, size_t size)
{
  void *p = (void*) calloc (number, size) ;
  if (!p) die ("mycalloc failure requesting %d objects of size %d", number, size) ;
  totalAllocated += size*number ;
  return p ;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x10f0
testq %rax, %rax
je 0x52a7
imulq %r14, %rbx
addq %rbx, 0x60f1(%rip)      # 0xb390
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1dfa(%rip), %rdi      # 0x70a8
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5198
// File: /workspace/github_c_makefile_star2_O2/richarddurbin[P]hash10x/utils.c
// Function: fgetword
char *fgetword (FILE *f)
{
  int n = 0 ;
  static char *buf = 0 ;
  int bufSize = 64 ;
  char *cp ;
  if (!buf) buf = (char*) myalloc (bufSize) ;
  cp = buf ;
  while (!feof (f) && (*cp = getc (f)))
    if (isgraph(*cp) && !isspace(*cp))
      { ++cp ; ++n ;
	if (n >= bufSize)
	  { bufSize *= 2 ;
	    if (!(buf = (char*) realloc (buf, bufSize)))
	      die ("fgetword realloc failure requesting %d bytes", bufSize) ;
	  }
      }
    else
      { while ((*cp = getc (f)) && (isspace(*cp) || !isgraph(*cp)) && *cp != '\n' && !feof(f)) ;
	ungetc (*cp, f) ;
	break ;
      }
  *cp = 0 ;
  return buf ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x60c8(%rip), %r14      # 0xb398
testq %r14, %r14
jne 0x52e7
pushq $0x40
popq %rdi
callq 0x5258
movq %rax, %r14
movq %rax, 0x60b1(%rip)      # 0xb398
pushq $0x40
popq %rbp
xorl %r13d, %r13d
movq %rbx, %rdi
callq 0x1130
testl %eax, %eax
jne 0x53b7
movq %rbx, %rdi
callq 0x1230
movl %eax, %r12d
movb %r12b, (%r14)
shll $0x18, %r12d
je 0x53b7
sarl $0x18, %r12d
callq 0x1240
movq %rax, %r15
movq (%rax), %rax
movslq %r12d, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0xa000, %eax           # imm = 0xA000
negw %ax
jno 0x5395
incq %r14
incl %r13d
cmpl %ebp, %r13d
jl 0x52ed
addl %ebp, %ebp
movq 0x604f(%rip), %rdi      # 0xb398
movslq %ebp, %rsi
callq 0x1190
movq %rax, 0x6040(%rip)      # 0xb398
testq %rax, %rax
jne 0x52ed
leaq 0x1d76(%rip), %rdi      # 0x70da
movl %ebp, %esi
xorl %eax, %eax
callq 0x5198
cmpb $0xa, %al
je 0x53ac
sarl $0x18, %ecx
movq (%r15), %rdx
movslq %ecx, %rcx
movzwl (%rdx,%rcx,2), %ecx
andl $0xa000, %ecx           # imm = 0xA000
negw %cx
jo 0x53ac
movq %rbx, %rdi
callq 0x1130
testl %eax, %eax
jne 0x53a9
movq %rbx, %rdi
callq 0x1230
movb %al, (%r14)
movl %eax, %ecx
shll $0x18, %ecx
jne 0x536d
jmp 0x53ac
movb (%r14), %al
movsbl %al, %edi
movq %rbx, %rsi
callq 0x1180
movb $0x0, (%r14)
movq 0x5fd6(%rip), %rax      # 0xb398
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/richarddurbin[P]hash10x/utils.c
// Function: fopenTag
FILE *fopenTag (char* root, char* tag, char* mode)
{
  if (strlen (tag) > 30) die ("tag %s in fopenTag too long - should be < 30 chars", tag) ;
  char *fileName = new (strlen (root) + 32, char) ;
  strcpy (fileName, root) ;
  strcat (fileName, ".") ;
  strcat (fileName, tag) ;
  FILE *f = fopen (fileName, mode) ;
  free (fileName) ;
  return f ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
callq 0x10a0
cmpq $0x1f, %rax
jae 0x544e
movq %r15, %rdi
callq 0x10a0
leaq 0x20(%rax), %rdi
callq 0x5258
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x1060
movq %r12, %rdi
callq 0x10a0
movw $0x2e, (%r12,%rax)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1200
movq %r12, %rdi
movq %r14, %rsi
callq 0x11c0
movq %rax, %rbx
movq %r12, %rdi
callq 0x1040
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1cb2(%rip), %rdi      # 0x7107
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5198
// File: /workspace/github_c_makefile_star2_O2/richarddurbin[P]hash10x/utils.c
// Function: timeUpdate
void timeUpdate (FILE *f)
{
  static BOOL isFirst = 1 ;
  struct rusage rNew ;
  int secs, usecs ;

  getrusage (RUSAGE_SELF, &rNew) ;
  if (!isFirst)
    { secs = rNew.ru_utime.tv_sec - rOld.ru_utime.tv_sec ;
      usecs =  rNew.ru_utime.tv_usec - rOld.ru_utime.tv_usec ;
      if (usecs < 0) { usecs += 1000000 ; secs -= 1 ; }
      fprintf (f, "user\t%d.%06d", secs, usecs) ;
      secs = rNew.ru_stime.tv_sec - rOld.ru_stime.tv_sec ;
      usecs =  rNew.ru_stime.tv_usec - rOld.ru_stime.tv_usec ;
      if (usecs < 0) { usecs += 1000000 ; secs -= 1 ; }
      fprintf (f, "\tsystem\t%d.%06d", secs, usecs) ;
      fprintf (f, "\tmax_RSS\t%ld", rNew.ru_maxrss - rOld.ru_maxrss) ;
      fprintf (f, "\tmemory\t%li", totalAllocated) ;   
      fputc ('\n', f) ;
    }
  else
    { rFirst = rNew ;
      isFirst = FALSE ;
    }

  rOld = rNew ;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
xorl %edi, %edi
callq 0x11d0
cmpb $0x1, 0x5f21(%rip)      # 0xb3a0
jne 0x553a
movl 0x8(%rsp), %eax
movl 0x10(%rsp), %esi
subl 0x5f15(%rip), %eax      # 0xb3a8
subl 0x5f17(%rip), %esi      # 0xb3b0
movl $0xf4240, %r14d         # imm = 0xF4240
leal (%rsi,%r14), %ecx
movl %esi, %edx
sarl $0x1f, %edx
addl %eax, %edx
testl %esi, %esi
cmovnsl %esi, %ecx
leaq 0x1c84(%rip), %rsi      # 0x713a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1120
movl 0x18(%rsp), %eax
movl 0x20(%rsp), %ecx
subl 0x5eea(%rip), %eax      # 0xb3b8
subl 0x5eec(%rip), %ecx      # 0xb3c0
addl %ecx, %r14d
movl %ecx, %edx
sarl $0x1f, %edx
addl %eax, %edx
testl %ecx, %ecx
cmovnsl %ecx, %r14d
leaq 0x1c5c(%rip), %rsi      # 0x7147
movq %rbx, %rdi
movl %r14d, %ecx
xorl %eax, %eax
callq 0x1120
movq 0x28(%rsp), %rdx
subq 0x5ec4(%rip), %rdx      # 0xb3c8
leaq 0x1c4c(%rip), %rsi      # 0x7157
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1120
movq 0x5e74(%rip), %rdx      # 0xb390
leaq 0x1c41(%rip), %rsi      # 0x7164
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1120
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x10e0
jmp 0x5557
leaq 0x5ef7(%rip), %rdi      # 0xb438
leaq 0x8(%rsp), %rsi
movl $0x90, %edx
callq 0x1140
movb $0x1, 0x5e49(%rip)      # 0xb3a0
leaq 0x5e4a(%rip), %rdi      # 0xb3a8
leaq 0x8(%rsp), %rsi
movl $0x90, %edx
callq 0x1140
addq $0x98, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/keithnoguchi[P]pearls-in-action/0x2/main.c
// Function: main
int main(void)
{
	int fail = 0;
	int i = 0;

	printf("===============================\n");
	printf("Programming Pearls: Chapter 0x2\n");
	printf("===============================\n");

	if (rotate_test(&i))
		fail++;
	if (sign_test(&i))
		fail++;

	puts("");

	return fail;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x4(%rsp), %rbx
andl $0x0, (%rbx)
leaq 0xe35(%rip), %r14       # 0x2024
movq %r14, %rdi
callq 0x1050
leaq 0xe06(%rip), %rdi       # 0x2004
callq 0x1050
movq %r14, %rdi
callq 0x1050
movq %rbx, %rdi
callq 0x129c
xorl %r14d, %r14d
testl %eax, %eax
setne %r14b
movq %rbx, %rdi
callq 0x1438
leal 0x1(%r14), %ebx
testl %eax, %eax
cmovel %r14d, %ebx
pushq $0xa
popq %rdi
callq 0x1030
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/keithnoguchi[P]pearls-in-action/0x2/rotate.c
// Function: rotate
char *rotate(char *input, int n, int pos)
{
	reverse(input, 0, pos-1);
	reverse(input, pos, n-1);
	reverse(input, 0, n-1);
	return input;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
leal -0x1(%rbx), %edx
xorl %esi, %esi
callq 0x1277
decl %ebp
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x1277
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x1277
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/keithnoguchi[P]pearls-in-action/0x2/rotate.c
// Function: reverse
static void reverse(char *input, int i, int j)
{
	while (i < j) {
		char tmp = input[i];
		input[i] = input[j];
		input[j] = tmp;
		i++;
		j--;
	}
}

// Assembly:
movslq %edx, %rax
movslq %esi, %rcx
cmpq %rax, %rcx
jge 0x1298
movb (%rdi,%rcx), %dl
movb (%rdi,%rax), %sil
movb %sil, (%rdi,%rcx)
movb %dl, (%rdi,%rax)
incq %rcx
decq %rax
jmp 0x127d
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/keithnoguchi[P]pearls-in-action/0x2/sign.c
// Function: quicksort
static void quicksort(char word[], int len)
{
	int last;
	int i;

	if (len < 2)
		return;

	/* Put a pivot in array 0 */
	swap(word, 0, rand()%len);

	last = 0;
	for (i = 1; i < len; i++)
		if (word[i] < word[0])
			swap(word, ++last, i);
	swap(word, 0, last);

	quicksort(word, last);
	quicksort(&word[last+1], len-(last+1));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
pushq $0x1
popq %r12
cmpl $0x2, %ebx
jl 0x142c
callq 0x10d0
cltd
idivl %ebx
movb (%r14), %al
movslq %edx, %rcx
movb (%r14,%rcx), %dl
movb %dl, (%r14)
movb %al, (%r14,%rcx)
movl %ebx, %eax
xorl %edx, %edx
movq %r12, %rcx
movslq %edx, %r15
cmpq %rcx, %rax
je 0x13fe
movb (%r14,%rcx), %sil
cmpb (%r14), %sil
jge 0x13f9
leaq 0x1(%r15), %rdx
movb 0x1(%r14,%r15), %dil
movb %sil, 0x1(%r14,%r15)
movb %dil, (%r14,%rcx)
incq %rcx
jmp 0x13d6
movb (%r14), %al
leaq (%r14,%r15), %r13
incq %r13
movb -0x1(%r13), %cl
movb %cl, (%r14)
movb %al, -0x1(%r13)
movq %r14, %rdi
movl %r15d, %esi
callq 0x139f
notl %r15d
addl %ebx, %r15d
movq %r13, %r14
movl %r15d, %ebx
jmp 0x13b1
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/darwin-on-arm[P]darwin-sdk/developer_cmds/asa/asa.c
// Function: main
int main(int argc, char **argv)
{
	FILE *fp;
	int exit_val = 0;
	/* skip progname */
	argv++;

	if (*argv && !strcmp(*argv, "--")) {
		argv++;
		argc--;
	}

	if (argc == 1) {
		asa(stdin);
		exit(exit_val);
	}

        do {
                if (*argv) {
                        if (!(fp = fopen(*argv, "r"))) {
				warn ("%s", *argv);
				exit_val = 1;
				continue;
                        } else {
				asa(fp);
				(void)fclose(fp);
			}
                }
        } while (*argv++);

	exit (exit_val);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x8(%rsi), %r12
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x120e
cmpb $0x2d, (%rax)
jne 0x120e
cmpb $0x2d, 0x1(%rax)
jne 0x120e
cmpb $0x0, 0x2(%rax)
jne 0x120e
addq $0x10, %rsi
decl %edi
movq %rsi, %r12
cmpl $0x1, %edi
jne 0x1229
movq 0x2dc6(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
callq 0x128c
xorl %edi, %edi
callq 0x10d0
leaq 0xdd4(%rip), %rbx       # 0x2004
leaq 0xdcf(%rip), %r14       # 0x2006
pushq $0x1
popq %r13
xorl %ebp, %ebp
movq (%r12), %rdi
testq %rdi, %rdi
je 0x1285
movq %rbx, %rsi
callq 0x10b0
testq %rax, %rax
je 0x1268
movq %rax, %r15
movq %rax, %rdi
callq 0x128c
movq %r15, %rdi
callq 0x1060
jmp 0x1279
movq (%r12), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1050
movl %r13d, %ebp
cmpq $0x0, (%r12)
leaq 0x8(%r12), %r12
jne 0x123d
movl %ebp, %edi
callq 0x10d0
// File: /workspace/github_c_makefile_star2_O2/darwin-on-arm[P]darwin-sdk/developer_cmds/asa/asa.c
// Function: asa
static void
asa(f)
	FILE *f;
{
	char *buf;
	size_t len;

	if ((buf = fgetln (f, &len)) != NULL) {
		if (buf[len - 1] == '\n')
			buf[--len] = '\0';
		/* special case the first line  */
		switch (buf[0]) {
		case '0':
			putchar ('\n');
			break;
		case '1':
			putchar ('\f');
			break;
		}

		if (len > 1 && buf[0] && buf[1]) {
			printf("%.*s", (int)(len - 1), buf + 1);
		}

		while ((buf = fgetln(f, &len)) != NULL) {
			if (buf[len - 1] == '\n')
				buf[--len] = '\0';
			switch (buf[0]) {
			default:
			case ' ':
				putchar ('\n');
				break;
			case '0':
				putchar ('\n');
				putchar ('\n');
				break;
			case '1':
				putchar ('\n');
				putchar ('\f');
				break;
			case '+':
				putchar ('\r');
				break;
			}

			if (len > 1 && buf[0] && buf[1]) {
				printf("%.*s", (int)(len - 1), buf + 1);
			}
		}

		putchar ('\n');
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %rsi
callq 0x13b0
testq %rax, %rax
je 0x13a0
movq %rax, %r14
movq (%rsp), %rax
cmpb $0xa, -0x1(%r14,%rax)
jne 0x12c8
leaq -0x1(%rax), %rcx
movq %rcx, (%rsp)
movb $0x0, -0x1(%r14,%rax)
movzbl (%r14), %eax
cmpl $0x30, %eax
je 0x12da
cmpl $0x31, %eax
jne 0x12e2
pushq $0xc
jmp 0x12dc
pushq $0xa
popq %rdi
callq 0x1030
movq (%rsp), %rsi
cmpq $0x2, %rsi
jb 0x130f
cmpb $0x0, (%r14)
je 0x130f
cmpb $0x0, 0x1(%r14)
je 0x130f
incq %r14
decl %esi
leaq 0xd04(%rip), %rdi       # 0x2009
movq %r14, %rdx
xorl %eax, %eax
callq 0x1070
movq %rsp, %r15
pushq $0xa
popq %rbp
pushq $0xd
popq %r12
pushq $0xc
popq %r13
movq %rbx, %rdi
movq %r15, %rsi
callq 0x13b0
testq %rax, %rax
je 0x1398
movq %rax, %r14
movq (%rsp), %rax
cmpb $0xa, -0x1(%r14,%rax)
jne 0x134a
leaq -0x1(%rax), %rcx
movq %rcx, (%rsp)
movb $0x0, -0x1(%r14,%rax)
movzbl (%r14), %eax
cmpl $0x2b, %eax
je 0x1374
movl %ebp, %edi
cmpl $0x31, %eax
je 0x136a
cmpl $0x30, %eax
jne 0x1377
movl %ebp, %edi
callq 0x1030
movl %ebp, %edi
jmp 0x1377
callq 0x1030
movl %r13d, %edi
jmp 0x1377
movl %r12d, %edi
callq 0x1030
movq (%rsp), %rsi
cmpq $0x2, %rsi
jb 0x131d
cmpb $0x0, (%r14)
je 0x131d
cmpb $0x0, 0x1(%r14)
je 0x131d
jmp 0x12f9
pushq $0xa
popq %rdi
callq 0x1030
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/darwin-on-arm[P]darwin-sdk/developer_cmds/asa/fgetln.c
// Function: fgetln
char *fgetln(FILE *f, size_t *l)
{
	int fd, h;
	struct entry *p;
	ssize_t cnt;
	char *ret = 0;

	flockfile(f);
	fd = fileno(f);
	h = fd % K;

#ifdef THREAD_SAFE
	pthread_rwlock_rdlock(&lock);
#endif
	for (p=table[h]; p && (p->fd!=fd || (fd<0 && p->f!=f)); p=p->next);
	if (!p) {
		if (!(p = calloc(sizeof *p, 1))) {
#ifdef THREAD_SAFE
			pthread_rwlock_unlock(&lock);
#endif
			funlockfile(f);
			return 0;
		}
		p->fd = fd;
		p->f = f;
#ifdef THREAD_SAFE
		pthread_rwlock_unlock(&lock);
		pthread_rwlock_wrlock(&lock);
#endif
		p->next = table[h];
		table[h] = p;
	}
#ifdef THREAD_SAFE
	pthread_rwlock_unlock(&lock);
#endif
	cnt = getline(&p->buf, (size_t[]){0}, f);
	if (cnt >= 0) {
		*l = cnt;
		ret = p->buf;
	}
	funlockfile(f);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1080
movq %rbx, %rdi
callq 0x10a0
movl %eax, %ebp
andl $0x3f, %eax
leaq 0x2cb5(%rip), %rcx      # 0x4090
leaq (%rcx,%rax,8), %r12
movq %r12, %r15
movq (%r15), %r15
testq %r15, %r15
je 0x13fc
cmpl %ebp, 0x8(%r15)
jne 0x13e2
testl %ebp, %ebp
jns 0x1421
cmpq %rbx, 0x10(%r15)
jne 0x13e2
jmp 0x1421
pushq $0x20
popq %rdi
pushq $0x1
popq %rsi
callq 0x1090
testq %rax, %rax
je 0x1461
movq %rax, %r15
movl %ebp, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq (%r12), %rax
movq %rax, (%r15)
movq %r15, (%r12)
addq $0x18, %r15
leaq 0x8(%rsp), %rsi
andq $0x0, (%rsi)
movq %r15, %rdi
movq %rbx, %rdx
callq 0x10c0
testq %rax, %rax
js 0x1446
movq %rax, (%r14)
movq (%r15), %r14
jmp 0x1449
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x1040
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x1040
xorl %r14d, %r14d
jmp 0x1451
// File: /workspace/github_c_makefile_star2_O2/vanhauser-thc[P]vulntest/fdleak.c
// Function: main
int main(int argc, char *argv[]) {
  int fd;

  if ((fd = open("/var/log/app.log", O_RDWR | O_APPEND | O_CREAT, 0600)) < 0) {
    close(fd);
    return -1;
  }

  if (geteuid() != getuid()) {
    setegid(getgid());
    seteuid(getuid());
  }

  write(1, "Hello\n", 6);

  system("/bin/bash");

  close(fd);
  return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0xe3e(%rip), %rdi       # 0x2004
movl $0x442, %esi            # imm = 0x442
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x1090
movl %eax, %ebx
testl %eax, %eax
js 0x1227
callq 0x1060
movl %eax, %ebp
callq 0x1040
cmpl %eax, %ebp
je 0x1205
callq 0x1080
movl %eax, %edi
callq 0x10a0
callq 0x1040
movl %eax, %edi
callq 0x10b0
leaq 0xe09(%rip), %rsi       # 0x2015
pushq $0x1
popq %rdi
pushq $0x6
popq %rdx
callq 0x1030
leaq 0xdfe(%rip), %rdi       # 0x201c
callq 0x1050
xorl %ebp, %ebp
jmp 0x122a
pushq $-0x1
popq %rbp
movl %ebx, %edi
callq 0x1070
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mesbahamin[P]star-sim/src/platform_sdl.c
// Function: sdl_resize_texture
void sdl_resize_texture(struct SDLOffscreenBuffer *buffer, SDL_Renderer *renderer, int width, int height)
{
    if (buffer->memory)
    {
        free(buffer->memory);
    }

    if (buffer->texture)
    {
        SDL_DestroyTexture(buffer->texture);
    }

    buffer->texture = SDL_CreateTexture(
            renderer,
            SDL_PIXELFORMAT_ARGB8888,
            SDL_TEXTUREACCESS_STREAMING,
            width, height);

    buffer->width = width;
    buffer->height = height;
    buffer->pitch = width * BYTES_PER_PIXEL;

    buffer->memory = malloc(width * height * BYTES_PER_PIXEL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x11b0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1374
callq 0x10d0
pushq $0x1
popq %rdx
movq %r15, %rdi
movl $0x16362004, %esi       # imm = 0x16362004
movl %r14d, %ecx
movl %ebp, %r8d
callq 0x1210
movq %rax, (%rbx)
movl %r14d, 0x10(%rbx)
movl %ebp, 0x14(%rbx)
shll $0x2, %r14d
movl %r14d, 0x18(%rbx)
imull %ebp, %r14d
movslq %r14d, %rdi
callq 0x11c0
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mesbahamin[P]star-sim/src/sim.c
// Function: sim_bounding_box_update
void sim_bounding_box_update(struct SimBounds *bounds, float min_x, float min_y, float max_x, float max_y)
{
    if (!bounds)
    {
        // TODO: handle invalid pointer error
        return;
    }

    float bounding_square_side_length = fmaxf(max_x - min_x, max_y - min_y);
    bounds->side_length_x = bounding_square_side_length;
    bounds->side_length_y = bounding_square_side_length;
    bounds->center_x = (min_x + max_x) / 2;
    bounds->center_y = (min_y + max_y) / 2;
}

// Assembly:
testq %rdi, %rdi
je 0x1ca9
pushq %rbx
subq $0x40, %rsp
movaps %xmm1, %xmm4
movaps %xmm0, %xmm1
movq %rdi, %rbx
movaps %xmm2, %xmm0
subss %xmm1, %xmm0
movaps %xmm1, 0x30(%rsp)
movaps %xmm3, %xmm1
subss %xmm4, %xmm1
movaps %xmm2, 0x10(%rsp)
movaps %xmm3, 0x20(%rsp)
movaps %xmm4, (%rsp)
callq 0x1190
movss %xmm0, 0x8(%rbx)
movss %xmm0, 0xc(%rbx)
movaps 0x30(%rsp), %xmm0
unpcklps (%rsp), %xmm0           # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
movaps 0x10(%rsp), %xmm1
unpcklps 0x20(%rsp), %xmm1       # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
addps %xmm0, %xmm1
mulps 0x13ef(%rip), %xmm1     # 0x3090
movlps %xmm1, (%rbx)
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/mesbahamin[P]star-sim/src/star.c
// Function: vec2d_add
struct Vec2d *vec2d_add(float angle1, float length1, float angle2, float length2)
{
    float x = sinf(angle1) * length1 + sinf(angle2) * length2;
    float y = cosf(angle1) * length1 + cosf(angle2) * length2;

    struct Vec2d *new_vec = (struct Vec2d*)malloc(sizeof(struct Vec2d));
    new_vec->angle = 0.5 * M_PI - atan2f(y, x);
    new_vec->length = hypotf(x, y);
    return new_vec;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movss %xmm3, 0x18(%rsp)
movss %xmm2, 0x14(%rsp)
movss %xmm1, 0x1c(%rsp)
movss %xmm0, 0xc(%rsp)
callq 0x1130
movss %xmm0, 0x10(%rsp)
movss 0x14(%rsp), %xmm0
callq 0x1130
mulss 0x18(%rsp), %xmm0
movss 0x10(%rsp), %xmm1
mulss 0x1c(%rsp), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x10(%rsp)
movss 0xc(%rsp), %xmm0
callq 0x10f0
movss %xmm0, 0xc(%rsp)
movss 0x14(%rsp), %xmm0
callq 0x10f0
movss 0x18(%rsp), %xmm1
mulss %xmm0, %xmm1
movss 0xc(%rsp), %xmm0
mulss 0x1c(%rsp), %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0xc(%rsp)
pushq $0x8
popq %rdi
callq 0x11c0
movq %rax, %rbx
movss 0xc(%rsp), %xmm0
movss 0x10(%rsp), %xmm1
callq 0x11e0
cvtss2sd %xmm0, %xmm0
movsd 0x9e5(%rip), %xmm1      # 0x30c8
subsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm0
movss %xmm0, (%rbx)
movss 0x10(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
callq 0x1080
movss %xmm0, 0x4(%rbx)
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/mesbahamin[P]star-sim/src/star.c
// Function: star_attract
void star_attract(struct Star *s1, struct Star *s2)
{
    float dx = s1->x - s2->x;
    float dy = s1->y - s2->y;
    float distance = hypotf(dx, dy);

    if (distance > s1->size + s2->size)
    {
        float theta = atan2f(dy, dx);
        float force = GRAVITATION * (s1->mass * s2->mass / powf(distance, 2));
        star_accelerate(s1, theta - (0.5 * M_PI), force / s1->mass);
        star_accelerate(s2, theta + (0.5 * M_PI), force / s2->mass);
        //printf("%f\n", force);
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movss 0x10(%rdi), %xmm0
movss 0x14(%rdi), %xmm1
subss 0x10(%rsi), %xmm0
subss 0x14(%rsi), %xmm1
movss %xmm0, 0xc(%rsp)
movss %xmm1, 0x10(%rsp)
callq 0x1080
movaps %xmm0, %xmm1
movss 0xc(%r14), %xmm0
addss 0xc(%rbx), %xmm0
ucomiss %xmm0, %xmm1
jbe 0x282f
movss 0x10(%rsp), %xmm0
movss %xmm1, 0x10(%rsp)
movss 0xc(%rsp), %xmm1
callq 0x11e0
movss 0x8(%r14), %xmm2
movss 0x8(%rbx), %xmm3
mulss %xmm2, %xmm3
movss 0x10(%rsp), %xmm1
mulss %xmm1, %xmm1
divss %xmm1, %xmm3
mulss 0x904(%rip), %xmm3      # 0x30d8
movss %xmm3, 0xc(%rsp)
cvtss2sd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movsd 0x8e4(%rip), %xmm0      # 0x30d0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movaps %xmm3, %xmm1
divss %xmm2, %xmm1
movq %r14, %rdi
callq 0x270e
movsd 0x10(%rsp), %xmm0
addsd 0x8b7(%rip), %xmm0      # 0x30c8
cvtsd2ss %xmm0, %xmm0
movss 0xc(%rsp), %xmm1
divss 0x8(%rbx), %xmm1
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x270e
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/mesbahamin[P]star-sim/src/star.c
// Function: star_attract_to_mass
void star_attract_to_mass(struct Star *star, float mass, float mass_x, float mass_y)
{
    float dx = star->x - mass_x;
    float dy = star->y - mass_y;
    float distance = hypotf(dx, dy);

    float theta = atan2f(dy, dx);
    float force = GRAVITATION * (star->mass * mass / powf(distance, 2));
    star_accelerate(star, theta - (0.5 * M_PI), force / star->mass);
    //printf("%f\n", force);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movss %xmm0, 0xc(%rsp)
movq %rdi, %rbx
movss 0x10(%rdi), %xmm0
movss 0x14(%rdi), %xmm3
subss %xmm1, %xmm0
movss %xmm0, 0x4(%rsp)
subss %xmm2, %xmm3
movss %xmm3, (%rsp)
movaps %xmm3, %xmm1
callq 0x1080
movss %xmm0, 0x8(%rsp)
movss (%rsp), %xmm0
movss 0x4(%rsp), %xmm1
callq 0x11e0
movss 0x8(%rbx), %xmm1
movss 0xc(%rsp), %xmm2
mulss %xmm1, %xmm2
movss 0x8(%rsp), %xmm3
mulss %xmm3, %xmm3
divss %xmm3, %xmm2
mulss 0x833(%rip), %xmm2      # 0x30d8
cvtss2sd %xmm0, %xmm0
addsd 0x81f(%rip), %xmm0      # 0x30d0
cvtsd2ss %xmm0, %xmm0
divss %xmm1, %xmm2
movaps %xmm2, %xmm1
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x270e
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/mesbahamin[P]star-sim/src/barnes_hut.c
// Function: cell_init
struct Cell *cell_init(float center_x, float center_y, float distance_x, float distance_y)
{
    struct Cell *cell = (struct Cell *)malloc(sizeof(struct Cell));
    if (cell)
    {
        cell->center_x = center_x;
        cell->center_y = center_y;
        cell->distance_x = distance_x;
        cell->distance_y = distance_y;
        cell->mass_center_x = center_x;
        cell->mass_center_y = center_x;
        cell->mass_total = 0;
        cell->stars_sum_x = 0;
        cell->stars_sum_y = 0;
        cell->star = NULL;
    }
    return cell;
}

// Assembly:
subq $0x18, %rsp
movss %xmm3, 0x14(%rsp)
movss %xmm2, 0xc(%rsp)
movss %xmm1, 0x8(%rsp)
movss %xmm0, 0x10(%rsp)
pushq $0x30
popq %rdi
callq 0x11c0
testq %rax, %rax
je 0x2938
movss 0x10(%rsp), %xmm1
movss %xmm1, (%rax)
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x4(%rax)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x8(%rax)
movss 0x14(%rsp), %xmm0
movss %xmm0, 0xc(%rax)
movss %xmm1, 0x14(%rax)
movss %xmm1, 0x18(%rax)
andl $0x0, 0x10(%rax)
andq $0x0, 0x1c(%rax)
andq $0x0, 0x28(%rax)
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/mesbahamin[P]star-sim/src/barnes_hut.c
// Function: cell_contains_star
bool cell_contains_star(struct Cell *c, struct Star *s)
{
    return (s->x <= c->center_x + c->distance_x
        && s->x >= c->center_x - c->distance_x
        && s->y <= c->center_y + c->distance_y
        && s->y >= c->center_y - c->distance_y);
}

// Assembly:
movss 0x10(%rsi), %xmm0
movss (%rdi), %xmm1
movss 0x8(%rdi), %xmm2
movaps %xmm1, %xmm3
addss %xmm2, %xmm3
xorl %eax, %eax
ucomiss %xmm0, %xmm3
jb 0x2984
subss %xmm2, %xmm1
ucomiss %xmm1, %xmm0
jb 0x2984
movss 0x14(%rsi), %xmm0
movss 0x4(%rdi), %xmm1
movss 0xc(%rdi), %xmm2
movaps %xmm1, %xmm3
addss %xmm2, %xmm3
ucomiss %xmm0, %xmm3
jae 0x2985
xorl %eax, %eax
retq
subss %xmm2, %xmm1
ucomiss %xmm1, %xmm0
setae %al
retq
// File: /workspace/github_c_makefile_star2_O2/mesbahamin[P]star-sim/src/barnes_hut.c
// Function: quad_tree_node_init
struct QuadTreeNode *quad_tree_node_init(float center_x, float center_y, float distance_x, float distance_y)
{
    struct QuadTreeNode *node = (struct QuadTreeNode *)malloc(sizeof (struct QuadTreeNode));
    if (node)
    {
        node->cell = cell_init(center_x, center_y, distance_x, distance_y);
        node->ne = NULL;
        node->nw = NULL;
        node->sw = NULL;
        node->se = NULL;
    }
    return node;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movss %xmm3, 0xc(%rsp)
movss %xmm2, 0x8(%rsp)
movss %xmm1, 0x4(%rsp)
movss %xmm0, (%rsp)
pushq $0x28
popq %rdi
callq 0x11c0
movq %rax, %rbx
testq %rax, %rax
je 0x29ef
movss (%rsp), %xmm0
movss 0x4(%rsp), %xmm1
movss 0x8(%rsp), %xmm2
movss 0xc(%rsp), %xmm3
callq 0x28cc
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movups %xmm0, 0x18(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/mesbahamin[P]star-sim/src/barnes_hut.c
// Function: quad_tree_node_free
void quad_tree_node_free(struct QuadTreeNode *node)
{
    if (node)
    {
        quad_tree_node_free(node->ne);
        quad_tree_node_free(node->nw);
        quad_tree_node_free(node->sw);
        quad_tree_node_free(node->se);
        free(node->cell);
        free(node);
    }
}

// Assembly:
testq %rdi, %rdi
je 0x2a36
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x29f8
movq 0x10(%rbx), %rdi
callq 0x29f8
movq 0x18(%rbx), %rdi
callq 0x29f8
movq 0x20(%rbx), %rdi
callq 0x29f8
movq (%rbx), %rdi
callq 0x11b0
movq %rbx, %rdi
popq %rbx
jmp 0x11b0
retq
// File: /workspace/github_c_makefile_star2_O2/mesbahamin[P]star-sim/src/barnes_hut.c
// Function: quad_tree_node_subdivide
void quad_tree_node_subdivide(struct QuadTreeNode *node)
{
    if (node && quad_tree_node_is_leaf(node))
    {
        float child_distance_x = node->cell->distance_x / 2;
        float child_distance_y = node->cell->distance_y / 2;

        node->ne = quad_tree_node_init(node->cell->center_x + child_distance_x, node->cell->center_y + child_distance_y, child_distance_x, child_distance_y);
        node->nw = quad_tree_node_init(node->cell->center_x - child_distance_x, node->cell->center_y + child_distance_y, child_distance_x, child_distance_y);
        node->sw = quad_tree_node_init(node->cell->center_x - child_distance_x, node->cell->center_y - child_distance_y, child_distance_x, child_distance_y);
        node->se = quad_tree_node_init(node->cell->center_x + child_distance_x, node->cell->center_y - child_distance_y, child_distance_x, child_distance_y);
    }
}

// Assembly:
testq %rdi, %rdi
je 0x2b3c
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x2a37
testb %al, %al
je 0x2b37
movq (%rbx), %rax
movss 0x62c(%rip), %xmm3      # 0x30b4
movss 0x8(%rax), %xmm2
mulss %xmm3, %xmm2
movss %xmm2, 0x8(%rsp)
mulss 0xc(%rax), %xmm3
movss %xmm3, 0xc(%rsp)
movss (%rax), %xmm0
addss %xmm2, %xmm0
movss 0x4(%rax), %xmm1
addss %xmm3, %xmm1
callq 0x2999
movq %rax, 0x8(%rbx)
movq (%rbx), %rax
movss (%rax), %xmm0
movss 0x8(%rsp), %xmm2
subss %xmm2, %xmm0
movss 0x4(%rax), %xmm1
movss 0xc(%rsp), %xmm3
addss %xmm3, %xmm1
callq 0x2999
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movss (%rax), %xmm0
movss 0x4(%rax), %xmm1
movss 0x8(%rsp), %xmm2
subss %xmm2, %xmm0
movss 0xc(%rsp), %xmm3
subss %xmm3, %xmm1
callq 0x2999
movq %rax, 0x18(%rbx)
movq (%rbx), %rax
movss (%rax), %xmm0
movss 0x8(%rsp), %xmm2
addss %xmm2, %xmm0
movss 0x4(%rax), %xmm1
movss 0xc(%rsp), %xmm3
subss %xmm3, %xmm1
callq 0x2999
movq %rax, 0x20(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/mesbahamin[P]star-sim/src/barnes_hut.c
// Function: quad_tree_init
struct QuadTree *quad_tree_init(void)
{
    struct QuadTree *qt = (struct QuadTree *)malloc(sizeof (struct QuadTree));
    if (qt)
    {
        qt->root = NULL;
    }
    return qt;
}

// Assembly:
pushq %rax
pushq $0x8
popq %rdi
callq 0x11c0
testq %rax, %rax
je 0x2c85
andq $0x0, (%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/mesbahamin[P]star-sim/src/barnes_hut.c
// Function: node_is_sufficiently_far
bool node_is_sufficiently_far(struct QuadTreeNode *node, struct Star *star)
{
    float s = node->cell->distance_x * 2;
    float dx = node->cell->mass_center_x - star->x;
    float dy = node->cell->mass_center_y - star->y;
    float d = hypotf(dx, dy);

    return s / d < THETA;
}

// Assembly:
pushq %rax
movq (%rdi), %rax
movss 0x8(%rax), %xmm1
movss 0x14(%rax), %xmm0
subss 0x10(%rsi), %xmm0
addss %xmm1, %xmm1
movss %xmm1, 0x4(%rsp)
movss 0x18(%rax), %xmm1
subss 0x14(%rsi), %xmm1
callq 0x1080
movss 0x4(%rsp), %xmm1
divss %xmm0, %xmm1
movss 0x3d4(%rip), %xmm0      # 0x30b4
ucomiss %xmm1, %xmm0
seta %al
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/mesbahamin[P]star-sim/src/barnes_hut.c
// Function: quad_tree_calc_force_on_star
void quad_tree_calc_force_on_star(struct QuadTreeNode *node, struct Star *star)
{
    if (!star || !node)
    {
        return;
    }

    if (quad_tree_node_is_leaf(node) && !cell_is_empty(node->cell) && !cell_contains_star(node->cell, star))
    {
        star_attract(node->cell->star, star);
    }
    else if (node_is_sufficiently_far(node, star))
    {
        star_attract_to_mass(star,
                node->cell->mass_total,
                node->cell->mass_center_x,
                node->cell->mass_center_y);
    }
    else
    {
        quad_tree_calc_force_on_star(node->ne, star);
        quad_tree_calc_force_on_star(node->nw, star);
        quad_tree_calc_force_on_star(node->sw, star);
        quad_tree_calc_force_on_star(node->se, star);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x2d5a
movq %rsi, %rbx
movq %rdi, %r14
testq %r14, %r14
je 0x2d5a
movq %r14, %rdi
callq 0x2a37
testb %al, %al
je 0x2d21
movq (%r14), %rdi
movq 0x28(%rdi), %r15
testq %r15, %r15
je 0x2d21
movq %rbx, %rsi
callq 0x2942
testb %al, %al
je 0x2d7f
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2ca2
testb %al, %al
jne 0x2d60
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x2ce8
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x2ce8
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x2ce8
movq 0x20(%r14), %r14
jmp 0x2cf8
popq %rbx
popq %r14
popq %r15
retq
movq (%r14), %rax
movss 0x10(%rax), %xmm0
movss 0x14(%rax), %xmm1
movss 0x18(%rax), %xmm2
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2837
movq %r15, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x274f
// File: /workspace/github_c_makefile_star2_O2/carlitosmarin[P]Sistema-Ficheros-SOII/mi_cat.c
// Function: main
int main (int argc, char **argv) {
	if (argc != 3) {
		printf("Número de parametros incorrectos\n");
		return -1;
	}

	char *camino = argv[2];
    if(camino[strlen(camino)-1] == '/'){
        printf("ERROR: ( %s ) no es un fichero.\n",camino);
        return -1;
    }

	bmount(argv[1]);

 	int leidos = 0;
	unsigned char buf[tamBloque];
	memset(buf,0,tamBloque);
	int x = mi_read(camino,buf,0,tamBloque);
	unsigned int bucle;
	for(bucle = tamBloque; x > 0; bucle += tamBloque){ // Mientras no de error seguimos leyendo
		write(1,buf,x); //Mostrar los resultados por pantalla
		leidos += x;
		memset(buf,0,tamBloque);
		x = mi_read(camino,buf,bucle,tamBloque);
	}

	char string[128];
	sprintf(string, "Bytes Leídos %d\n", leidos); //Hay que mostrar el valor del num de bytes leidos y del tamanyo en bytes logico del inodo
	write(2, string, strlen(string)); //No sumara lo que ocupe esa informacion al fichero externo

	bumount();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x488, %rsp            # imm = 0x488
cmpl $0x3, %edi
jne 0x3bfb
movq %rsi, %r14
movq 0x10(%rsi), %rbx
movq %rbx, %rdi
callq 0x1080
cmpb $0x2f, -0x1(%rbx,%rax)
jne 0x3c0f
leaq 0x939(%rip), %rdi       # 0x4528
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1090
jmp 0x3c07
leaq 0x959(%rip), %rdi       # 0x455b
callq 0x1060
pushq $-0x1
popq %rbx
jmp 0x3cc9
movq 0x8(%r14), %rdi
callq 0x127c
leaq 0x80(%rsp), %r14
xorl %ebp, %ebp
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x10b0
movl $0x400, %r15d           # imm = 0x400
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl $0x400, %ecx            # imm = 0x400
callq 0x395a
movl %eax, %r13d
pushq $0x1
popq %r12
testl %r13d, %r13d
jle 0x3c94
movl %r13d, %edx
movl %r12d, %edi
movq %r14, %rsi
callq 0x1070
addl %r13d, %ebp
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x10b0
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
movl $0x400, %ecx            # imm = 0x400
callq 0x395a
movl %eax, %r13d
addl $0x400, %r15d           # imm = 0x400
jmp 0x3c50
leaq 0x8ae(%rip), %rsi       # 0x4549
xorl %ebx, %ebx
movq %rsp, %r14
movq %r14, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1160
movq %r14, %rdi
callq 0x1080
pushq $0x2
popq %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x1070
xorl %eax, %eax
callq 0x12b8
movl %ebx, %eax
addq $0x488, %rsp            # imm = 0x488
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cyb70289[P]tt/tests/matrix.c
// Function: main
int main(void)
{
	int r;
	struct tt_mtx m, b, b2;
	double vm[6][6] = {
		{ 10, 15, 11, 6, 1, 1 },
		{ 106, 15, 114, 63, 12, 11 },
		{ 1, -82, 83, -4, 5, -86 },
		{ -16, 15, -14, 13, -12, 11 },
		{ 11, 61, 21, 401, 355, 511 },
		{ 50, 30, 40, 20, 60, 10 },
	};
	double vb[6] = { 100, 99, 101, 98, -200, -321 };
	double vm2[6][6];
	memcpy(vm2, vm, sizeof(vm));

	m.cols = m.rows = 6;
	m.v = (double *)vm;

	b.cols = 1;
	b.rows = 6;
	b.v = vb;

	r = tt_mtx_gaussj(&m, &b);
	printf("%f, %f, %f, %f, %f, %f\n",
			vb[0], vb[1], vb[2], vb[3], vb[4], vb[5]);
	printf("%d\n", r);

	int i, j;
	for (i = 0; i < 6; i++) {
		for (j = 0; j < 6; j++)
			printf("%f, ", m.v[i*6+j]);
		printf("\n");
	}

	m.v = (double *)vm2;
	b2.cols = 1;
	b2.rows = 6;
	double vb2[6];
	b2.v = vb2;
	tt_mtx_mul(&b2, &m, &b);
	for (i = 0; i < 6; i++)
		printf("%f, ", b2.v[i]);
	printf("\n");

	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
leaq 0x3dbc(%rip), %rbx      # 0x5040
leaq 0x1b0(%rsp), %r15
movl $0x120, %edx            # imm = 0x120
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1100
movaps 0x3d6d(%rip), %xmm0     # 0x5010
leaq 0x60(%rsp), %r14
movaps %xmm0, (%r14)
movaps 0x3d6d(%rip), %xmm0     # 0x5020
movaps %xmm0, 0x10(%r14)
movaps 0x3d71(%rip), %xmm0     # 0x5030
movaps %xmm0, 0x20(%r14)
leaq 0x90(%rsp), %rdi
movl $0x120, %edx            # imm = 0x120
movq %rbx, %rsi
callq 0x1100
movabsq $0x600000006, %rax      # imm = 0x600000006
movq %rsp, %rdi
movq %rax, (%rdi)
movq %r15, 0x8(%rdi)
movabsq $0x100000006, %rax      # imm = 0x100000006
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
movq %r14, 0x8(%rsi)
callq 0x15a8
movl %eax, %ebx
movsd (%r14), %xmm0
movsd 0x8(%r14), %xmm1
movsd 0x10(%r14), %xmm2
movsd 0x18(%r14), %xmm3
movsd 0x20(%r14), %xmm4
movsd 0x28(%r14), %xmm5
leaq 0x3e2c(%rip), %rdi      # 0x5160
movb $0x6, %al
callq 0x10a0
leaq 0x3e36(%rip), %rdi      # 0x5178
xorl %r13d, %r13d
movl %ebx, %esi
xorl %eax, %eax
callq 0x10a0
pushq $0xa
popq %rbp
leaq 0x3e24(%rip), %r15      # 0x517c
xorl %r14d, %r14d
cmpq $0x6, %r14
je 0x1397
xorl %r12d, %r12d
cmpq $0x6, %r12
je 0x1387
movq 0x8(%rsp), %rax
addq %r13, %rax
movsd (%rax,%r12,8), %xmm0
movq %r15, %rdi
movb $0x1, %al
callq 0x10a0
incq %r12
jmp 0x1364
movl %ebp, %edi
callq 0x1040
incq %r14
addq $0x30, %r13
jmp 0x135b
movq %rsp, %rsi
leaq 0x90(%rsp), %rax
movq %rax, 0x8(%rsi)
leaq 0x10(%rsp), %rdi
movabsq $0x100000006, %rax      # imm = 0x100000006
movq %rax, (%rdi)
leaq 0x30(%rsp), %rax
movq %rax, 0x8(%rdi)
leaq 0x20(%rsp), %rdx
callq 0x1414
xorl %r15d, %r15d
leaq 0x3da7(%rip), %r14      # 0x517c
cmpq $0x6, %r15
je 0x13f5
movq 0x18(%rsp), %rax
movsd (%rax,%r15,8), %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x10a0
incq %r15
jmp 0x13d5
pushq $0xa
popq %rdi
callq 0x1040
movl %ebx, %eax
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/cyb70289[P]tt/src/num/mtx.c
// Function: tt_mtx_mul
int tt_mtx_mul(struct tt_mtx *mo,
		const struct tt_mtx *mi1, const struct tt_mtx *mi2)
{
	tt_assert(mi1->cols == mi2->rows);
	tt_assert(mo->rows == mi1->rows);
	tt_assert(mo->cols == mi2->cols);

	for (int i = 0; i < mi1->rows; i++) {
		double *v1 = _tt_mtx_row(mi1, i);
		for (int j = 0; j < mi2->cols; j++) {
			double o = 0.0f;
			double *v2 = _tt_mtx_el(mi2, 0, j);
			for (int k = 0; k < mi1->cols; k++) {
				o += (*v1) * (*v2);
				v1++;
				v2 += mi2->cols;
			}
			*_tt_mtx_el(mo, i, j) = o;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x4(%rsi), %eax
cmpl (%rdx), %eax
jne 0x14ed
movq %rsi, %r14
movq %rdi, %r15
movl (%rdi), %ecx
cmpl (%rsi), %ecx
jne 0x1506
movq %rdx, %rbx
movl 0x4(%r15), %eax
cmpl 0x4(%rdx), %eax
jne 0x151f
xorl %ebp, %ebp
cmpl %ecx, %ebp
jge 0x14dc
movslq 0x4(%r14), %rcx
movslq %ebp, %r13
imulq %rcx, %r13
shlq $0x3, %r13
addq 0x8(%r14), %r13
xorl %r12d, %r12d
cmpl %eax, %r12d
jge 0x14d2
movq %rbx, %rdi
xorl %esi, %esi
movl %r12d, %edx
callq 0x1546
movl 0x4(%r14), %ecx
testl %ecx, %ecx
movl $0x0, %edx
cmovlel %edx, %ecx
xorpd %xmm1, %xmm1
subl $0x1, %ecx
jb 0x14af
movsd (%r13), %xmm0
mulsd (%rax), %xmm0
addsd %xmm0, %xmm1
addq $0x8, %r13
movslq 0x4(%rbx), %rdx
leaq (%rax,%rdx,8), %rax
jmp 0x148e
movq %r15, %rdi
movl %ebp, %esi
movl %r12d, %edx
movsd %xmm1, (%rsp)
callq 0x1546
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
incl %r12d
movl 0x4(%rbx), %eax
jmp 0x146a
incl %ebp
movl (%r14), %ecx
jmp 0x144c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3c8d(%rip), %rsi      # 0x5181
leaq 0x3c91(%rip), %rdx      # 0x518c
leaq 0x3ca4(%rip), %rcx      # 0x51a6
pushq $0x14
jmp 0x1536
leaq 0x3c74(%rip), %rsi      # 0x5181
leaq 0x3c78(%rip), %rdx      # 0x518c
leaq 0x3c8b(%rip), %rcx      # 0x51a6
pushq $0x15
jmp 0x1536
leaq 0x3c5b(%rip), %rsi      # 0x5181
leaq 0x3c5f(%rip), %rdx      # 0x518c
leaq 0x3c72(%rip), %rcx      # 0x51a6
pushq $0x16
popq %r8
xorl %edi, %edi
xorl %eax, %eax
callq 0x258c
callq 0x1050
// File: /workspace/github_c_makefile_star2_O2/cyb70289[P]tt/src/num/num.h
// Function: tt_vec_div_sca
static inline void _tt_vec_div_sca(double *vec, int n, double sca)
{
	if (_tt_is_zero(sca))
		tt_error("Divide by 0!");

	for (int i = 0; i < n; i++)
		vec[i] /= sca;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x19b4
jp 0x19b4
leaq 0x3856(%rip), %rsi      # 0x51f0
leaq 0x385f(%rip), %rdx      # 0x5200
xorl %edi, %edi
xorl %eax, %eax
movsd %xmm0, (%rsp)
callq 0x258c
movsd (%rsp), %xmm0
xorl %eax, %eax
testl %ebx, %ebx
cmovlel %eax, %ebx
cmpq %rax, %rbx
je 0x19d5
movsd (%r14,%rax,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%r14,%rax,8)
incq %rax
jmp 0x19bb
addq $0x8, %rsp
popq %rbx
popq %r14
retq