LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/richarddurbin[P]hash10x/dict.c
// Function: dictFind
int dictFind (DICT *dict, char *s, int *ip)
{
  int i, x, d ;

  if (!dict) die ("dictAdd received null dict\n") ;
  if (!s) die ("dictAdd received null string\n") ;

  x = hashString (s, dict->dim, 0) ;
  if (!(i = dict->table[x]))
    { newPos = x ; 
      return 0 ; 
    }
  else if (!strcmp (s, dict->names[i]))
    { if (ip) *ip = i-1 ; 
      return 1 ; 
    }
  else
    { d = hashString (s, dict->dim, 1) ;
      while (1)
	{ x = (x + d) & ((1 << dict->dim) - 1) ;
	  if (!(i = dict->table[x]))
	    { newPos = x ; 
	      return 0 ; 
	    }
	  else if (!strcmp (s, dict->names[i]))
	    { if (ip) *ip = i-1 ; 
	      return 1 ; 
	    }
	}
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %r12
testq %rdi, %rdi
jne 0x4c55
leaq 0x21fa(%rip), %rdi      # 0x6e48
xorl %eax, %eax
callq 0x56d8
testq %r14, %r14
jne 0x4c68
leaq 0x2203(%rip), %rdi      # 0x6e64
xorl %eax, %eax
callq 0x56d8
movl 0x14(%r12), %esi
xorl %ebp, %ebp
movq %r14, %rdi
movl %esi, 0x4(%rsp)
xorl %edx, %edx
callq 0x4d47
movl %eax, %r15d
movq 0x8(%r12), %rbx
cltq
movslq (%rbx,%rax,4), %r13
testq %r13, %r13
je 0x4d0d
movq (%r12), %rax
movq %rax, 0x10(%rsp)
movq (%rax,%r13,8), %rsi
movq %r14, %rdi
callq 0x1100
testl %eax, %eax
je 0x4d16
movq %r14, %r12
movq %r14, %rdi
movl 0x4(%rsp), %r14d
movl %r14d, %esi
movl $0x1, %edx
callq 0x4d47
movl %eax, %ebp
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl %r14d, %ecx
shll %cl, %r13d
notl %r13d
addl %ebp, %r15d
andl %r13d, %r15d
movslq (%rbx,%r15,4), %r14
testq %r14, %r14
je 0x4d2d
movq 0x10(%rsp), %rax
movq (%rax,%r14,8), %rsi
movq %r12, %rdi
callq 0x1100
testl %eax, %eax
jne 0x4cd2
movl $0x1, %ebp
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x4d36
decl %r14d
movl %r14d, (%rax)
jmp 0x4d36
movl %r15d, 0x666c(%rip)     # 0xb380
jmp 0x4d36
movl $0x1, %ebp
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x4d36
decl %r13d
movl %r13d, (%rax)
jmp 0x4d36
movl %r15d, 0x664c(%rip)     # 0xb380
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/richarddurbin[P]hash10x/dict.c
// Function: hashString
static int hashString (char *cp, int n, int isDiff)
{
  int i ;
  unsigned int j, x = 0 ;
  int rotate = isDiff ? 21 : 13 ;
  int leftover = 8 * sizeof(int) - rotate ;

  while (*cp)
    x = (*cp++) ^ ((x >> leftover) | (x << rotate)) ;

  for (j = x, i = n ; i < sizeof(int) ; i += n)
    j ^= (x >> i) ;
  j &= (1 << n) - 1 ;

  if (isDiff)
    j |= 1 ;

  return j ;
}

// Assembly:
xorl %eax, %eax
testl %edx, %edx
setne %cl
movb (%rdi), %r8b
testb %r8b, %r8b
je 0x4d7a
movb %cl, %al
leal 0xd(,%rax,8), %ecx
incq %rdi
xorl %eax, %eax
movsbl %r8b, %r8d
roll %cl, %eax
xorl %r8d, %eax
movb (%rdi), %r8b
incq %rdi
testb %r8b, %r8b
jne 0x4d64
jmp 0x4d7c
xorl %eax, %eax
cmpl $0x3, %esi
ja 0x4d97
movl %esi, %ecx
movl %eax, %edi
movl %eax, %r8d
shrl %cl, %r8d
xorl %r8d, %edi
addl %esi, %ecx
cmpl $0x4, %ecx
jb 0x4d85
jmp 0x4d99
movl %eax, %edi
xorl %eax, %eax
testl %edx, %edx
setne %al
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %esi, %ecx
shll %cl, %edx
notl %edx
andl %edi, %edx
orl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/richarddurbin[P]hash10x/dict.c
// Function: dictAdd
int dictAdd (DICT *dict, char *s, int *ip)
{
  int i, x ;

  if (dictFind (dict, s, ip)) return 0 ;

  i = ++dict->max ;
  dict->table[newPos] = i ;
  dict->names[i] = (char*) myalloc (strlen(s) + 1) ;
  strcpy (dict->names[i], s) ;
  if (ip) *ip = i-1 ;

  if (dict->max > 0.3 * dict->size) /* double table size and remap */
    { int *newTable ;
      ++dict->dim ; dict->size *= 2 ;
      dict->names = (char**) remap (dict->names, (dict->max+1)*sizeof(char*), (dict->size/2)*sizeof(char*)) ;
      newTable = (int*) mycalloc (dict->size, sizeof(int)) ;
      for (i = 1 ; i <= dict->max ; ++i)
	{ s = dict->names[i] ;
	  x = hashString (s, dict->dim, 0) ;
	  if (!newTable[x])
	    newTable[x] = i ;
	  else
	    { int d = hashString (s, dict->dim, 1) ;
	      while (1)
		{ x = (x + d) & ((1 << dict->dim) - 1) ;
		  if (!newTable[x])
		    { newTable[x] = i ; break ; }
		}
	    }
	}
      free (dict->table) ; dict->table = newTable ;
    }

  return 1 ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x4c29
xorl %edx, %edx
testl %eax, %eax
jne 0x4f22
movslq 0x10(%rbx), %r12
leaq 0x1(%r12), %rax
movl %eax, 0x10(%rbx)
movq 0x8(%rbx), %rcx
movslq 0x6596(%rip), %rdx      # 0xb380
movl %eax, (%rcx,%rdx,4)
movq %r15, %rdi
callq 0x10a0
leaq 0x1(%rax), %rdi
callq 0x57a0
movq (%rbx), %rcx
movq %rax, 0x8(%rcx,%r12,8)
movq (%rbx), %rax
movq 0x8(%rax,%r12,8), %rdi
movq %r15, %rsi
callq 0x1060
testq %r14, %r14
je 0x4e1e
movl %r12d, (%r14)
movl 0x10(%rbx), %ecx
movl 0x18(%rbx), %eax
cvtsi2sd %ecx, %xmm0
cvtsi2sd %eax, %xmm1
mulsd 0x200c(%rip), %xmm1     # 0x6e40
movl $0x1, %edx
ucomisd %xmm1, %xmm0
jbe 0x4f22
incl 0x14(%rbx)
leal (%rax,%rax), %edx
movl %edx, 0x18(%rbx)
movq (%rbx), %r14
leal 0x8(,%rcx,8), %r12d
shll $0x3, %eax
movslq %eax, %rdi
movl $0x1, %ebp
movl $0x1, %esi
callq 0x57c8
movq %rax, %r15
movslq %r12d, %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1140
movq %r14, %rdi
callq 0x1040
movq %r15, (%rbx)
movslq 0x18(%rbx), %rdi
movl $0x4, %esi
callq 0x57c8
movq %rax, %r14
cmpl $0x0, 0x10(%rbx)
jle 0x4f10
movq (%rbx), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq (%rax,%rbp,8), %r13
movl 0x14(%rbx), %r12d
movq %r13, %rdi
movl %r12d, %esi
xorl %edx, %edx
callq 0x4d47
movl %eax, %r15d
cltq
cmpl $0x0, (%r14,%rax,4)
je 0x4efa
movq %r13, %rdi
movl %r12d, %esi
movl $0x1, %edx
callq 0x4d47
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %r12d, %ecx
shll %cl, %edx
notl %edx
addl %eax, %r15d
andl %edx, %r15d
cmpl $0x0, (%r14,%r15,4)
jne 0x4ee7
leaq (%r14,%r15,4), %rax
jmp 0x4efe
leaq (%r14,%rax,4), %rax
movl %ebp, (%rax)
leaq 0x1(%rbp), %rax
movslq 0x10(%rbx), %rcx
cmpq %rcx, %rbp
movq %rax, %rbp
jl 0x4ea6
movq 0x8(%rbx), %rdi
callq 0x1040
movq %r14, 0x8(%rbx)
movl $0x1, %edx
movl %edx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/richarddurbin[P]hash10x/array.c
// Function: uArrayCreate
Array uArrayCreate (int n, int size)
{
  Array a = (Array) mycalloc (1, sizeof (struct ArrayStruct)) ;
  static int isFirst ;

  if (isFirst)
    { isFirst = 0 ;
#ifdef ARRAY_REPORT
      if (ARRAY_REPORT_MAX) reportArray = arrayCreate (512, Array) ;
#endif
    }
  if (size <= 0) die ("negative size %d in uArrayCreate", size) ;
  if (n < 1)
    n = 1 ;
  totalAllocatedMemory += n * size ;

  a->magic = ARRAY_MAGIC ;
  a->base = mycalloc (n, size) ;
  a->dim = n ;
  a->max = 0 ;
  a->size = size ;
  ++totalNumberActive ;
#ifdef ARRAY_REPORT
  a->id = ++totalNumberCreated ;
  if (reportArray)
    { if (a->id < ARRAY_REPORT_MAX)
	array (reportArray, a->id, Array) = a ;
      else
	{ arrayDestroy (reportArray) ;
	  reportArray = 0 ;
	}
    }
#endif
  return a ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
movl $0x1, %edi
movl $0x20, %esi
callq 0x57c8
movq %rax, %r14
testl %ebx, %ebx
jg 0x4f71
leaq 0x1f1a(%rip), %rdi      # 0x6e82
movl %ebx, %esi
xorl %eax, %eax
callq 0x56d8
cmpl $0x2, %ebp
movl $0x1, %r15d
cmovgel %ebp, %r15d
movl %r15d, %eax
imull %ebx, %eax
addl %eax, 0x63fa(%rip)      # 0xb384
movl $0x881502, (%r14)       # imm = 0x881502
movslq %ebx, %rsi
movq %r15, %rdi
callq 0x57c8
movq %rax, 0x8(%r14)
movl %r15d, 0x10(%r14)
movl $0x0, 0x18(%r14)
movl %ebx, 0x14(%r14)
incl 0x63d2(%rip)            # 0xb388
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/richarddurbin[P]hash10x/array.c
// Function: uArrayReCreate
Array uArrayReCreate (Array a, int n, int size)
{
  if (!arrayExists(a))
    return  uArrayCreate (n, size) ;

  if (a->size != size)
    die ("type size mismatch in arrayReCreate: size %d != a->size %d", size, a->size) ;

  if (n < 1) n = 1 ;

  if (a->dim < n || (a->dim - n)*size > (1 << 20) ) /* free if save > 1 MB */
    { totalAllocatedMemory -= a->dim * size ;
      free (a->base) ;
      a->dim = n ;
      totalAllocatedMemory += a->dim * size ;
      /* base-mem isn't alloc'd on handle, it's free'd by finalisation */
      a->base = mycalloc (n, size) ;
    }
  else
    memset (a->base, 0, n*size) ;

  a->max = 0 ;
  return a ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
testq %rdi, %rdi
je 0x505e
movq %rdi, %rbx
cmpl $0x881502, (%rdi)       # imm = 0x881502
jne 0x505e
movl 0x14(%rbx), %edx
cmpl %ebp, %edx
je 0x4ffb
leaq 0x1eb1(%rip), %rdi      # 0x6ea3
movl %ebp, %esi
xorl %eax, %eax
callq 0x56d8
cmpl $0x2, %r14d
movl $0x1, %r15d
cmovgel %r14d, %r15d
movl 0x10(%rbx), %eax
movl %eax, %ecx
subl %r15d, %ecx
jl 0x501e
imull %ebp, %ecx
cmpl $0x100001, %ecx         # imm = 0x100001
jl 0x5072
imull %ebp, %eax
movl 0x635c(%rip), %r14d     # 0xb384
subl %eax, %r14d
movl %r14d, 0x6352(%rip)     # 0xb384
movq 0x8(%rbx), %rdi
callq 0x1040
movl %r15d, 0x10(%rbx)
movl %r15d, %edi
imull %ebp, %r15d
addl %r14d, %r15d
movl %r15d, 0x6334(%rip)     # 0xb384
movslq %ebp, %rsi
callq 0x57c8
movq %rax, 0x8(%rbx)
jmp 0x5084
movl %r14d, %edi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4f40
movq 0x8(%rbx), %rdi
imull %ebp, %r15d
movslq %r15d, %rdx
xorl %esi, %esi
callq 0x10d0
movl $0x0, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/richarddurbin[P]hash10x/array.c
// Function: arrayDestroy
void arrayDestroy (Array a)
{
  if (!arrayExists (a))
    die ("arrayDestroy called on bad array %lx", (long unsigned int) a) ;

  totalAllocatedMemory -= a->dim * a->size ;
  totalNumberActive-- ;
#ifdef ARRAY_REPORT
  if (reportArray)
    arr(reportArray, a->id, Array) = 0 ;
#endif
  a->magic = 0 ;
  free (a->base) ;
  free (a) ;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x50aa
cmpl $0x881502, (%rbx)       # imm = 0x881502
je 0x50bb
leaq 0x1e2d(%rip), %rdi      # 0x6ede
movq %rbx, %rsi
xorl %eax, %eax
callq 0x56d8
movl 0x14(%rbx), %eax
imull 0x10(%rbx), %eax
subl %eax, 0x62bc(%rip)      # 0xb384
decl 0x62ba(%rip)            # 0xb388
movl $0x0, (%rbx)
movq 0x8(%rbx), %rdi
callq 0x1040
movq %rbx, %rdi
popq %rbx
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O1/richarddurbin[P]hash10x/array.c
// Function: arrayCopy
Array arrayCopy (Array a) 
{
  Array new ;

  if (!arrayExists (a)) 
    die ("arrayCopy called on bad array %lx", (long unsigned int) a) ;
 
  new = uArrayCreate (a->dim, a->size) ;
  memcpy (new->base, a->base, a->dim * a->size) ;
  new->max = a->max ;
  return new;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x50fa
cmpl $0x881502, (%rbx)       # imm = 0x881502
je 0x510b
leaq 0x1e02(%rip), %rdi      # 0x6f03
movq %rbx, %rsi
xorl %eax, %eax
callq 0x56d8
movl 0x10(%rbx), %edi
movl 0x14(%rbx), %esi
callq 0x4f40
movq %rax, %r14
movq 0x8(%rax), %rdi
movq 0x8(%rbx), %rsi
movslq 0x10(%rbx), %rax
movslq 0x14(%rbx), %rdx
imulq %rax, %rdx
callq 0x1140
movl 0x18(%rbx), %eax
movl %eax, 0x18(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/richarddurbin[P]hash10x/array.c
// Function: arrayExtend
void arrayExtend (Array a, int n) 
{
  char *new ;

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

  if (n < a->dim)
    return ;

  totalAllocatedMemory -= a->dim * a->size ;
  if (a->dim*a->size < 1 << 23)	/* 8MB */
    a->dim *= 2 ;
  else
    a->dim += 1024 + ((1 << 23) / a->size) ;
  if (n >= a->dim)
    a->dim = n + 1 ;

  totalAllocatedMemory += a->dim * a->size ;

  new = mycalloc (a->dim, a->size) ;
  memcpy (new,a->base,a->size*a->max) ;
  free (a->base) ;
  a->base = new ;

  return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
testq %rdi, %rdi
je 0x515b
cmpl $0x881502, (%rbx)       # imm = 0x881502
je 0x516c
leaq 0x1dc3(%rip), %rdi      # 0x6f25
movq %rbx, %rsi
xorl %eax, %eax
callq 0x56d8
movl 0x10(%rbx), %ecx
cmpl %r14d, %ecx
jg 0x51f3
movslq 0x14(%rbx), %rsi
movl %esi, %eax
imull %ecx, %eax
movl 0x6200(%rip), %r8d      # 0xb384
subl %eax, %r8d
movl %r8d, 0x61f6(%rip)      # 0xb384
cmpl $0x7fffff, %eax         # imm = 0x7FFFFF
jg 0x5199
addl %ecx, %ecx
jmp 0x51aa
movl $0x800000, %eax         # imm = 0x800000
xorl %edx, %edx
idivl %esi
addl %eax, %ecx
addl $0x400, %ecx            # imm = 0x400
leal 0x1(%r14), %eax
cmpl %r14d, %ecx
cmovgl %ecx, %eax
movl %eax, 0x10(%rbx)
movslq %eax, %rdi
imull %esi, %eax
addl %r8d, %eax
movl %eax, 0x61be(%rip)      # 0xb384
callq 0x57c8
movq %rax, %r14
movq 0x8(%rbx), %rsi
movslq 0x14(%rbx), %rax
movslq 0x18(%rbx), %rdx
imulq %rax, %rdx
movq %r14, %rdi
callq 0x1140
movq 0x8(%rbx), %rdi
callq 0x1040
movq %r14, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/richarddurbin[P]hash10x/array.c
// Function: uArray
char *uArray (Array a, int i)
{
#ifdef ARRAY_CHECK
  if (!arrayExists (a)) die ("array() called on bad array %lx", (long unsigned int) a) ;
  if (i < 0) die("referencing array element %d < 0", i) ;
#endif
  if (i >= a->max)
    { if (i >= a->dim) arrayExtend (a,i) ;
      a->max = i+1 ;
    }
  return a->base + i*a->size ;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
cmpl %esi, 0x18(%rdi)
jg 0x5222
cmpl %r14d, 0x10(%rbx)
jg 0x521b
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5144
leal 0x1(%r14), %eax
movl %eax, 0x18(%rbx)
movslq 0x14(%rbx), %rcx
movslq %r14d, %rax
imulq %rcx, %rax
addq 0x8(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/richarddurbin[P]hash10x/array.c
// Function: uArrCheck
char *uArrCheck (Array a, int i)
{
  if (!arrayExists (a)) die ("array() called on bad array %lx", (long unsigned int) a) ;
  if (i < 0) die("referencing array element %d < 0", i) ;
  if (i >= a->max) die ("referencing array element %d >= max %d", i, a->max) ;

  return a->base + i*a->size ;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
testq %rdi, %rdi
je 0x524e
cmpl $0x881502, (%rbx)       # imm = 0x881502
je 0x525f
leaq 0x1cf4(%rip), %rdi      # 0x6f49
movq %rbx, %rsi
xorl %eax, %eax
callq 0x56d8
testl %ebp, %ebp
jns 0x5273
leaq 0x1cff(%rip), %rdi      # 0x6f69
movl %ebp, %esi
xorl %eax, %eax
callq 0x56d8
movl 0x18(%rbx), %edx
cmpl %ebp, %edx
jg 0x528a
leaq 0x1d09(%rip), %rdi      # 0x6f8a
movl %ebp, %esi
xorl %eax, %eax
callq 0x56d8
movslq 0x14(%rbx), %rcx
movslq %ebp, %rax
imulq %rcx, %rax
addq 0x8(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/richarddurbin[P]hash10x/array.c
// Function: uArrayBlock
char    *uArrayBlock (Array a, int i, int n)
{
#ifdef ARRAY_CHECK
  if (!arrayExists (a)) die ("arrayBlock() called on bad array %lx", (long unsigned int)a) ;
  if (i < 0) die ("arrayBlock() referencing array element %d < 0", i) ;
#endif
  if (i+n >= a->max)
    { if (i+n >= a->dim) arrayExtend (a,i+n) ;
      a->max = i+n+1 ;
    }
  return a->base + i*a->size ;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
addl %esi, %r14d
cmpl 0x18(%rdi), %r14d
jl 0x52cd
cmpl 0x10(%rbx), %r14d
jl 0x52c6
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5144
incl %r14d
movl %r14d, 0x18(%rbx)
movslq 0x14(%rbx), %rcx
movslq %ebp, %rax
imulq %rcx, %rax
addq 0x8(%rbx), %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/richarddurbin[P]hash10x/array.c
// Function: arrayRead
Array   arrayRead (FILE *f)
{
  Array a = new (1, struct ArrayStruct) ;
  if (fread (a, sizeof(struct ArrayStruct), 1, f) != 1) return 0 ;
  a->base = myalloc (a->size*a->dim) ;
  if (fread (a->base, a->size, a->dim, f) != a->dim) { free(a) ; return 0 ; }
#ifdef ARRAY_REPORT
  a->id = ++totalNumberCreated ;
  if (reportArray)
    { if (a->id < ARRAY_REPORT_MAX)
	array (reportArray, a->id, Array) = a ;
      else
	{ arrayDestroy (reportArray) ;
	  reportArray = 0 ;
	}
    }
#endif
  return a ;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x20, %edi
callq 0x57a0
movq %rax, %rbx
movl $0x20, %esi
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rcx
callq 0x1070
cmpq $0x1, %rax
jne 0x5395
movslq 0x14(%rbx), %rax
movslq 0x10(%rbx), %rdi
imulq %rax, %rdi
callq 0x57a0
movq %rax, 0x8(%rbx)
movslq 0x14(%rbx), %rsi
movslq 0x10(%rbx), %rdx
movq %rax, %rdi
movq %r14, %rcx
callq 0x1070
movslq 0x10(%rbx), %rcx
cmpq %rcx, %rax
je 0x5397
movq %rbx, %rdi
callq 0x1040
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x53c8
cmpl $0x881502, (%r13)       # imm = 0x881502
je 0x53d9
leaq 0x1be2(%rip), %rdi      # 0x6fb1
movq %r13, %rsi
xorl %eax, %eax
callq 0x56d8
movl 0x18(%r13), %r14d
testl %r14d, %r14d
je 0x5479
jg 0x5401
cmpl $0x0, 0x10(%r13)
jg 0x53f9
movq %r13, %rdi
xorl %esi, %esi
callq 0x5144
movl $0x1, 0x18(%r13)
movq 0x8(%r13), %rsi
movq %r12, %rdi
callq *%r15
testl %eax, %eax
js 0x5479
je 0x5498
decl %r14d
movq %r13, %rdi
movl %r14d, %esi
callq 0x51fb
movq %r12, %rdi
movq %rax, %rsi
callq *%r15
testl %eax, %eax
jg 0x547f
je 0x549b
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 0x51fb
movq %r12, %rdi
movq %rax, %rsi
callq *%r15
testl %eax, %eax
je 0x549f
jle 0x5467
movl %r14d, %ebp
movl %ebx, %r14d
leal -0x1(%r14), %eax
movl %r14d, %ebx
cmpl %eax, %ebp
jne 0x543b
xorl %eax, %eax
movl %ebp, %r14d
jmp 0x54a1
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
xorl %eax, %eax
testq %rbx, %rbx
je 0x5489
movl %r14d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
movb $0x1, %al
jmp 0x5481
movb $0x1, %al
movq (%rsp), %rbx
jmp 0x5481
// File: /workspace/github_c_makefile_star2_O1/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 0x54c6
cmpl $0x881502, (%rbx)       # imm = 0x881502
je 0x54d7
leaq 0x1b06(%rip), %rdi      # 0x6fd3
movq %rbx, %rsi
xorl %eax, %eax
callq 0x56d8
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x53a2
testb %al, %al
je 0x5529
movl 0xc(%rsp), %esi
movq %rbx, %rdi
callq 0x51fb
movslq 0x14(%rbx), %rcx
movl 0x18(%rbx), %edx
subl 0xc(%rsp), %edx
imull %ecx, %edx
testl %edx, %edx
je 0x5522
addq %rax, %rcx
movl %edx, %edx
xorl %esi, %esi
movb (%rcx,%rsi), %dil
movb %dil, (%rax,%rsi)
incq %rsi
cmpl %esi, %edx
jne 0x5513
decl 0x18(%rbx)
movb $0x1, %al
jmp 0x552b
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
testq %rdi, %rdi
je 0x5553
cmpl $0x881502, (%r14)       # imm = 0x881502
je 0x5564
leaq 0x1a9d(%rip), %rdi      # 0x6ff7
movq %r14, %rsi
xorl %eax, %eax
callq 0x56d8
leaq 0x4(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
callq 0x53a2
testb %al, %al
je 0x557f
xorl %eax, %eax
jmp 0x55e6
movl 0x18(%r14), %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x51fb
testl %ebp, %ebp
jle 0x55b9
movq %r14, %rdi
movl %ebp, %esi
callq 0x51fb
movslq 0x14(%r14), %rcx
subl 0x4(%rsp), %ebp
imull %ecx, %ebp
testl %ebp, %ebp
je 0x55b9
decq %rax
movb (%rax), %dl
movb %dl, (%rax,%rcx)
decq %rax
decl %ebp
jne 0x55ad
movl 0x4(%rsp), %esi
incl %esi
movq %r14, %rdi
callq 0x51fb
movq %rax, %rcx
movl 0x14(%r14), %edx
movb $0x1, %al
testq %rdx, %rdx
je 0x55e6
xorl %esi, %esi
movb (%rbx,%rsi), %dil
movb %dil, (%rcx,%rsi)
incq %rsi
cmpl %esi, %edx
jne 0x55d7
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x5605
cmpl $0x881502, (%rbx)       # imm = 0x881502
je 0x5616
leaq 0x1a0e(%rip), %rdi      # 0x701a
movq %rbx, %rsi
xorl %eax, %eax
callq 0x56d8
cmpl $0x2, 0x18(%rbx)
jl 0x56b5
movl $0x1, %eax
cmpl $0x2, 0x18(%rbx)
jl 0x56b2
movq 0x8(%rbx), %rcx
movslq 0x14(%rbx), %rdx
leaq (%rcx,%rdx), %rsi
xorl %eax, %eax
movl $0x1, %edi
movl %eax, %r8d
imull %edx, %r8d
movslq %r8d, %r9
addq %rcx, %r9
movl 0x14(%rbx), %r8d
xorl %r10d, %r10d
cmpl %r10d, %r8d
je 0x56a1
movb (%rsi,%r10), %r11b
leaq 0x1(%r10), %r14
cmpb (%r9,%r10), %r11b
movq %r14, %r10
je 0x5656
incl %eax
cmpq %rax, %rdi
sete %r9b
testl %r8d, %r8d
sete %r10b
orb %r9b, %r10b
jne 0x56a1
movl %eax, %r9d
imull %edx, %r9d
movslq %r9d, %r9
addq %rcx, %r9
xorl %r10d, %r10d
movb (%rsi,%r10), %r11b
movb %r11b, (%r9,%r10)
incq %r10
cmpl %r10d, %r8d
jne 0x5691
incq %rdi
movslq 0x18(%rbx), %r8
addq %rdx, %rsi
cmpq %r8, %rdi
jl 0x5642
incl %eax
movl %eax, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x573b
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 0x4896(%rip), %r15      # 0x9ff8
movq (%r15), %rcx
leaq 0x190a(%rip), %rdi      # 0x7076
movl $0xd, %esi
movl $0x1, %edx
callq 0x1220
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x11e0
movq (%r15), %rsi
movl $0xa, %edi
callq 0x10e0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1210
// File: /workspace/github_c_makefile_star2_O1/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 0x57b7
addq %rbx, 0x5bdb(%rip)      # 0xb390
popq %rbx
retq
leaq 0x18c6(%rip), %rdi      # 0x7084
movq %rbx, %rsi
xorl %eax, %eax
callq 0x56d8
// File: /workspace/github_c_makefile_star2_O1/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 0x57ef
imulq %r14, %rbx
addq %rbx, 0x5ba9(%rip)      # 0xb390
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x18b2(%rip), %rdi      # 0x70a8
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x56d8
// File: /workspace/github_c_makefile_star2_O1/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
cmpq $0x0, 0x5b7f(%rip)      # 0xb398
jne 0x582c
movl $0x40, %edi
callq 0x57a0
movq %rax, 0x5b6c(%rip)      # 0xb398
movq 0x5b65(%rip), %r12      # 0xb398
movq %rbx, %rdi
callq 0x1130
testl %eax, %eax
je 0x585a
movb $0x0, (%r12)
movq 0x5b4d(%rip), %rax      # 0xb398
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x40, %ebp
movl $0x1, %r13d
movq %rbx, %rdi
callq 0x1230
movl %eax, %r15d
movb %r15b, (%r12)
shll $0x18, %r15d
je 0x583f
sarl $0x18, %r15d
callq 0x1240
movq %rax, %r14
movq (%rax), %rax
movslq %r15d, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0xa000, %eax           # imm = 0xA000
negw %ax
jno 0x58fa
cmpl %ebp, %r13d
jl 0x58bc
addl %ebp, %ebp
movq 0x5af0(%rip), %rdi      # 0xb398
movslq %ebp, %rsi
callq 0x1190
movq %rax, 0x5ae1(%rip)      # 0xb398
testq %rax, %rax
je 0x591f
incq %r12
movq %rbx, %rdi
callq 0x1130
incl %r13d
testl %eax, %eax
je 0x5865
jmp 0x583f
cmpb $0xa, %al
je 0x590d
sarl $0x18, %ecx
movq (%r14), %rax
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0xa000, %eax           # imm = 0xA000
negw %ax
jo 0x590d
movq %rbx, %rdi
callq 0x1130
testl %eax, %eax
jne 0x590d
movq %rbx, %rdi
callq 0x1230
movb %al, (%r12)
movl %eax, %ecx
shll $0x18, %ecx
jne 0x58d3
movsbl (%r12), %edi
movq %rbx, %rsi
callq 0x1180
jmp 0x583f
leaq 0x17b4(%rip), %rdi      # 0x70da
movl %ebp, %esi
xorl %eax, %eax
callq 0x56d8
// File: /workspace/github_c_makefile_star2_O1/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 0x59ac
movq %r15, %rdi
callq 0x10a0
leaq 0x20(%rax), %rdi
callq 0x57a0
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 0x1754(%rip), %rdi      # 0x7107
movq %rbx, %rsi
xorl %eax, %eax
callq 0x56d8
// File: /workspace/github_c_makefile_star2_O1/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, 0x59c3(%rip)      # 0xb3a0
jne 0x5a9a
movl 0x8(%rsp), %eax
movl 0x10(%rsp), %esi
subl 0x59b7(%rip), %eax      # 0xb3a8
subl 0x59b9(%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 0x1726(%rip), %rsi      # 0x713a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1120
movl 0x18(%rsp), %eax
movl 0x20(%rsp), %ecx
subl 0x598c(%rip), %eax      # 0xb3b8
subl 0x598e(%rip), %ecx      # 0xb3c0
addl %ecx, %r14d
movl %ecx, %edx
sarl $0x1f, %edx
addl %eax, %edx
testl %ecx, %ecx
cmovnsl %ecx, %r14d
leaq 0x16fe(%rip), %rsi      # 0x7147
movq %rbx, %rdi
movl %r14d, %ecx
xorl %eax, %eax
callq 0x1120
movq 0x28(%rsp), %rdx
subq 0x5966(%rip), %rdx      # 0xb3c8
leaq 0x16ee(%rip), %rsi      # 0x7157
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1120
movq 0x5916(%rip), %rdx      # 0xb390
leaq 0x16e3(%rip), %rsi      # 0x7164
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1120
movl $0xa, %edi
movq %rbx, %rsi
callq 0x10e0
jmp 0x5ab7
leaq 0x5997(%rip), %rdi      # 0xb438
leaq 0x8(%rsp), %rsi
movl $0x90, %edx
callq 0x1140
movb $0x1, 0x58e9(%rip)      # 0xb3a0
leaq 0x58ea(%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_O1/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
movl $0x0, (%rbx)
leaq 0xe32(%rip), %r14       # 0x2024
movq %r14, %rdi
callq 0x1050
leaq 0xe03(%rip), %rdi       # 0x2004
callq 0x1050
movq %r14, %rdi
callq 0x1050
movq %rbx, %rdi
callq 0x12dc
xorl %r14d, %r14d
testl %eax, %eax
setne %r14b
movq %rbx, %rdi
callq 0x1484
leal 0x1(%r14), %ebx
testl %eax, %eax
cmovel %r14d, %ebx
movl $0xa, %edi
callq 0x1030
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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:
movq %rdi, %rax
cmpl $0x2, %edx
jl 0x127c
leal -0x1(%rdx), %ecx
movslq %ecx, %rcx
movl $0x1, %edi
movb -0x1(%rax,%rdi), %r8b
movb (%rax,%rcx), %r9b
movb %r9b, -0x1(%rax,%rdi)
movb %r8b, (%rax,%rcx)
decq %rcx
leaq 0x1(%rdi), %r8
cmpq %rcx, %rdi
movq %r8, %rdi
jl 0x125b
leal -0x1(%rsi), %ecx
cmpl %edx, %ecx
jle 0x12ad
movslq %edx, %rdx
movslq %ecx, %rdi
incq %rdx
movb -0x1(%rax,%rdx), %r8b
movb (%rax,%rdi), %r9b
movb %r9b, -0x1(%rax,%rdx)
movb %r8b, (%rax,%rdi)
decq %rdi
leaq 0x1(%rdx), %r8
cmpq %rdi, %rdx
movq %r8, %rdx
jl 0x128c
cmpl $0x2, %esi
jl 0x12db
movslq %ecx, %rcx
movl $0x1, %edx
movb -0x1(%rax,%rdx), %sil
movb (%rax,%rcx), %dil
movb %dil, -0x1(%rax,%rdx)
movb %sil, (%rax,%rcx)
decq %rcx
leaq 0x1(%rdx), %rsi
cmpq %rcx, %rdx
movq %rsi, %rdx
jl 0x12ba
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x2, %ebx
jl 0x1477
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 %ecx, %ecx
movl $0x1, %edx
movb (%r14,%rdx), %sil
cmpb (%r14), %sil
jge 0x1439
movslq %ecx, %rsi
leaq 0x1(%rsi), %rcx
movb 0x1(%r14,%rsi), %dil
movb (%r14,%rdx), %r8b
movb %r8b, 0x1(%r14,%rsi)
movb %dil, (%r14,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0x1417
movb (%r14), %al
movslq %ecx, %r15
leaq (%r14,%r15), %r12
incq %r12
movb -0x1(%r12), %cl
movb %cl, (%r14)
movb %al, -0x1(%r12)
movq %r14, %rdi
movl %r15d, %esi
callq 0x13df
notl %r15d
addl %ebx, %r15d
movq %r12, %r14
movl %r15d, %ebx
jmp 0x13ec
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
movl %edi, %ebx
leaq 0x8(%rsi), %r12
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x121f
movq %rsi, %r14
leaq 0xdf7(%rip), %rsi       # 0x2004
callq 0x10a0
testl %eax, %eax
jne 0x121f
addq $0x10, %r14
decl %ebx
movq %r14, %r12
cmpl $0x1, %ebx
jne 0x123a
movq 0x2db5(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
callq 0x129b
xorl %edi, %edi
callq 0x10e0
leaq 0xdc6(%rip), %rbx       # 0x2007
leaq 0xdc1(%rip), %r14       # 0x2009
xorl %ebp, %ebp
movq (%r12), %rdi
testq %rdi, %rdi
je 0x1288
movq %rbx, %rsi
callq 0x10c0
testq %rax, %rax
je 0x1275
movq %rax, %r15
movq %rax, %rdi
callq 0x129b
movq %r15, %rdi
callq 0x1060
jmp 0x1288
movq (%r12), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1050
movl $0x1, %ebp
cmpq $0x0, (%r12)
leaq 0x8(%r12), %r12
jne 0x124a
movl %ebp, %edi
callq 0x10e0
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
callq 0x1408
testq %rax, %rax
je 0x13f9
movq %rax, %r14
movq 0x8(%rsp), %rax
cmpb $0xa, -0x1(%r14,%rax)
jne 0x12dc
leaq -0x1(%rax), %rcx
movq %rcx, 0x8(%rsp)
movb $0x0, -0x1(%r14,%rax)
movzbl (%r14), %eax
cmpl $0x30, %eax
je 0x12f1
cmpl $0x31, %eax
jne 0x12fb
movl $0xc, %edi
jmp 0x12f6
movl $0xa, %edi
callq 0x1030
movq 0x8(%rsp), %rsi
cmpq $0x2, %rsi
jb 0x1329
cmpb $0x0, (%r14)
je 0x1329
cmpb $0x0, 0x1(%r14)
je 0x1329
incq %r14
decl %esi
leaq 0xced(%rip), %rdi       # 0x200c
movq %r14, %rdx
xorl %eax, %eax
callq 0x1070
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1408
testq %rax, %rax
je 0x13ef
movq %rax, %r12
leaq 0xcc3(%rip), %r14       # 0x200c
leaq 0x8(%rsp), %r15
movq 0x8(%rsp), %rax
cmpb $0xa, -0x1(%r12,%rax)
jne 0x136a
leaq -0x1(%rax), %rcx
movq %rcx, 0x8(%rsp)
movb $0x0, -0x1(%r12,%rax)
movzbl (%r12), %eax
cmpl $0x2b, %eax
je 0x13a0
cmpl $0x31, %eax
je 0x138f
movl $0xa, %ebp
cmpl $0x30, %eax
jne 0x13a5
movl $0xa, %edi
callq 0x1030
jmp 0x13a5
movl $0xa, %edi
callq 0x1030
movl $0xc, %ebp
jmp 0x13a5
movl $0xd, %ebp
movl %ebp, %edi
callq 0x1030
movq 0x8(%rsp), %rsi
cmpq $0x2, %rsi
jb 0x13d8
cmpb $0x0, (%r12)
je 0x13d8
cmpb $0x0, 0x1(%r12)
je 0x13d8
incq %r12
decl %esi
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1408
movq %rax, %r12
testq %rax, %rax
jne 0x134e
movl $0xa, %edi
callq 0x1030
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1080
movq %rbx, %rdi
callq 0x10b0
movl %eax, %ebp
movl %eax, %r12d
andl $0x3f, %r12d
leaq 0x2c6a(%rip), %r13      # 0x40a0
movq (%r13,%r12,8), %r15
testq %r15, %r15
je 0x1455
cmpl %ebp, 0x8(%r15)
jne 0x1450
testl %ebp, %ebp
jns 0x1480
cmpq %rbx, 0x10(%r15)
je 0x1480
movq (%r15), %r15
jmp 0x143b
movl $0x20, %edi
movl $0x1, %esi
callq 0x1090
testq %rax, %rax
je 0x14a6
movq %rax, %r15
movl %ebp, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq (%r13,%r12,8), %rax
movq %rax, (%r15)
movq %r15, (%r13,%r12,8)
addq $0x18, %r15
movq %rsp, %rsi
movq $0x0, (%rsi)
movq %r15, %rdi
movq %rbx, %rdx
callq 0x10d0
testq %rax, %rax
js 0x14a6
movq %rax, (%r14)
movq (%r15), %r14
jmp 0x14a9
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x1040
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x122b
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
movl $0x6, %edx
movl $0x1, %edi
callq 0x1030
leaq 0xdfa(%rip), %rdi       # 0x201c
callq 0x1050
xorl %ebp, %ebp
jmp 0x1230
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebx, %edi
callq 0x1070
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
testq %rdi, %rdi
je 0x135c
callq 0x11a0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1369
callq 0x10d0
movq %r15, %rdi
movl $0x16362004, %esi       # imm = 0x16362004
movl $0x1, %edx
movl %r14d, %ecx
movl %ebp, %r8d
callq 0x1200
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 0x11b0
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1d2d
movaps %xmm2, %xmm4
subss %xmm0, %xmm4
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
subss %xmm1, %xmm3
movaps %xmm4, %xmm5
cmpunordss %xmm4, %xmm5
movaps %xmm5, %xmm6
andps %xmm3, %xmm6
maxss %xmm4, %xmm3
andnps %xmm3, %xmm5
orps %xmm6, %xmm5
movss %xmm5, 0x8(%rdi)
movss %xmm5, 0xc(%rdi)
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
addps %xmm2, %xmm0
mulps 0x2396(%rip), %xmm0     # 0x40c0
movlps %xmm0, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/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)
movl $0x8, %edi
callq 0x11b0
movq %rax, %rbx
movss 0xc(%rsp), %xmm0
movss 0x10(%rsp), %xmm1
callq 0x11d0
cvtss2sd %xmm0, %xmm0
movsd 0x1847(%rip), %xmm1     # 0x40f0
subsd %xmm0, %xmm1
xorps %xmm0, %xmm0
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_O1/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 0x2a2d
movss 0x10(%rsp), %xmm0
movss %xmm1, 0x10(%rsp)
movss 0xc(%rsp), %xmm1
callq 0x11d0
movss 0x8(%r14), %xmm1
movss 0x8(%rbx), %xmm3
mulss %xmm1, %xmm3
movss 0x10(%rsp), %xmm2
mulss %xmm2, %xmm2
divss %xmm2, %xmm3
mulss 0x1763(%rip), %xmm3     # 0x4100
movss %xmm3, 0xc(%rsp)
xorps %xmm2, %xmm2
cvtss2sd %xmm0, %xmm2
movsd %xmm2, 0x10(%rsp)
movsd 0x1740(%rip), %xmm0     # 0x40f8
addsd %xmm2, %xmm0
xorps %xmm2, %xmm2
cvtsd2ss %xmm0, %xmm2
divss %xmm1, %xmm3
movss (%r14), %xmm0
movss 0x4(%r14), %xmm1
callq 0x27f4
movsd (%rax), %xmm0
movsd %xmm0, (%r14)
movq %rax, %rdi
callq 0x11a0
movsd 0x10(%rsp), %xmm0
addsd 0x16fa(%rip), %xmm0     # 0x40f0
xorps %xmm2, %xmm2
cvtsd2ss %xmm0, %xmm2
movss 0xc(%rsp), %xmm3
divss 0x8(%rbx), %xmm3
movss (%rbx), %xmm0
movss 0x4(%rbx), %xmm1
callq 0x27f4
movsd (%rax), %xmm0
movsd %xmm0, (%rbx)
movq %rax, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x11a0
addq $0x18, %rsp
popq %rbx
popq %r14
retq