LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_malloc_validate
void stb_malloc_validate(void *p, void *parent)
{
   if (p == NULL) return;

   switch(stb__identify(p)) {
      case STB__chunked:
         return;
      case STB__nochildren: {
         stb__nochildren *n = (stb__nochildren *) p - 1;
         if (n->prevn)
            assert(*n->prevn == p);
         if (n->next) {
            assert(*stb__prevn(n->next) == &n->next);
            stb_malloc_validate(n, parent);
         }
         return;
      }
      case STB__alloc: {
         stb__alloc *s = (stb__alloc *) p - 1;

         if (s->prevn)
            assert(*s->prevn == p);

         if (s->child) {
            assert(*stb__prevn(s->child) == &s->child);
            stb_malloc_validate(s->child, p);
         }

         if (s->next) {
            assert(*stb__prevn(s->next) == &s->next);
            stb_malloc_validate(s->next, parent);
         }
         return;
      }
      default:
         assert(0); /* NOTREACHED */
   }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4fd5
movq %rdi, %rbx
leaq 0xd2d9(%rip), %r14      # 0x121d0
movq -0x8(%rbx), %rax
movl %eax, %ecx
andl $0x3, %ecx
movslq (%r14,%rcx,4), %rcx
addq %r14, %rcx
jmpq *%rcx
testq %rax, %rax
je 0x4f17
cmpq %rbx, (%rax)
jne 0x5059
addq $-0x10, %rbx
movq (%rbx), %rax
testq %rax, %rax
je 0x4fd5
leaq -0x8(%rax), %rcx
movl -0x8(%rax), %edx
andl $0x3, %edx
addq $-0x20, %rax
cmpl $0x2, %edx
cmovneq %rcx, %rax
cmpq %rbx, (%rax)
je 0x4ef7
jmp 0x4ffc
movq -0x20(%rbx), %rax
testq %rax, %rax
je 0x4f58
cmpq %rbx, (%rax)
jne 0x501b
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x4f88
leaq -0x18(%rbx), %rax
leaq -0x8(%rdi), %rcx
movl -0x8(%rdi), %edx
andl $0x3, %edx
leaq -0x20(%rdi), %rsi
cmpl $0x2, %edx
cmovneq %rcx, %rsi
cmpq %rax, (%rsi)
jne 0x503a
callq 0x4ee0
movq -0x10(%rbx), %rax
testq %rax, %rax
je 0x4fd5
addq $-0x10, %rbx
leaq -0x8(%rax), %rcx
movl -0x8(%rax), %edx
andl $0x3, %edx
leaq -0x20(%rax), %rsi
cmpl $0x2, %edx
cmovneq %rcx, %rsi
cmpq %rbx, (%rsi)
movq %rax, %rbx
je 0x4ef7
leaq 0xd6fa(%rip), %rdi      # 0x126b7
leaq 0xd4ed(%rip), %rsi      # 0x124b1
leaq 0xd670(%rip), %rcx      # 0x1263b
movl $0xa48, %edx            # imm = 0xA48
callq 0x2140
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xd7f2(%rip), %rdi      # 0x127d6
leaq 0xd4c6(%rip), %rsi      # 0x124b1
leaq 0xd649(%rip), %rcx      # 0x1263b
movl $0xa4e, %edx            # imm = 0xA4E
callq 0x2140
leaq 0xd661(%rip), %rdi      # 0x12664
leaq 0xd4a7(%rip), %rsi      # 0x124b1
leaq 0xd62a(%rip), %rcx      # 0x1263b
movl $0xa37, %edx            # imm = 0xA37
callq 0x2140
leaq 0xd663(%rip), %rdi      # 0x12685
leaq 0xd488(%rip), %rsi      # 0x124b1
leaq 0xd60b(%rip), %rcx      # 0x1263b
movl $0xa40, %edx            # imm = 0xA40
callq 0x2140
leaq 0xd653(%rip), %rdi      # 0x12694
leaq 0xd469(%rip), %rsi      # 0x124b1
leaq 0xd5ec(%rip), %rcx      # 0x1263b
movl $0xa43, %edx            # imm = 0xA43
callq 0x2140
leaq 0xd5cc(%rip), %rdi      # 0x1262c
leaq 0xd44a(%rip), %rsi      # 0x124b1
leaq 0xd5cd(%rip), %rcx      # 0x1263b
movl $0xa35, %edx            # imm = 0xA35
callq 0x2140
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_realloc
void *stb_realloc(void *ptr, size_t newsize)
{
   stb__alloc_type t;

   if (ptr == NULL) return stb_malloc(NULL, newsize);
   if (newsize == 0) { stb_free(ptr); return NULL; }
   
   t = stb__identify(ptr);
   assert(t == STB__alloc || t == STB__nochildren);

   if (t == STB__alloc) {
      stb__alloc *s = (stb__alloc *) ptr - 1;

      s = (stb__alloc *) realloc(s, newsize + sizeof(*s));
      if (s == NULL) return NULL;

      ptr = s+1;

      // update pointers
      (*s->prevn) = ptr;
      if (s->next)
         *stb__prevn(s->next) = &s->next;

      if (s->child)
         *stb__prevn(s->child) = &s->child;

      return ptr;
   } else {
      stb__nochildren *s = (stb__nochildren *) ptr - 1;

      s = (stb__nochildren *) realloc(ptr, newsize + sizeof(s));
      if (s == NULL) return NULL;

      // update pointers
      (*s->prevn) = s+1;
      if (s->next)
         *stb__prevn(s->next) = &s->next;

      return s+1;
   }
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x5344
testq %rsi, %rsi
je 0x5357
movl -0x8(%rdi), %eax
andl $0x3, %eax
je 0x535e
cmpl $0x2, %eax
jne 0x53a0
addq $-0x20, %rdi
addq $0x20, %rsi
callq 0x22b0
testq %rax, %rax
je 0x539c
movq %rax, %rcx
addq $0x20, %rax
movq (%rcx), %rdx
movq %rax, (%rdx)
movq 0x10(%rcx), %rdx
testq %rdx, %rdx
je 0x5335
leaq 0x10(%rcx), %rsi
leaq -0x8(%rdx), %rdi
movl -0x8(%rdx), %r8d
andl $0x3, %r8d
addq $-0x20, %rdx
cmpl $0x2, %r8d
cmovneq %rdi, %rdx
movq %rsi, (%rdx)
movq 0x8(%rcx), %rdx
testq %rdx, %rdx
je 0x539e
addq $0x8, %rcx
jmp 0x5382
movl 0x14eda(%rip), %ecx     # 0x1a224
xorl %edi, %edi
movl $0x2, %edx
popq %rax
jmp 0x508a
callq 0x4de4
jmp 0x539c
addq $0x8, %rsi
callq 0x22b0
testq %rax, %rax
je 0x539c
movq %rax, %rcx
addq $0x10, %rax
movq 0x8(%rcx), %rdx
movq %rax, (%rdx)
movq (%rcx), %rdx
testq %rdx, %rdx
je 0x539e
leaq -0x8(%rdx), %rsi
movl -0x8(%rdx), %edi
andl $0x3, %edi
addq $-0x20, %rdx
cmpl $0x2, %edi
cmovneq %rsi, %rdx
movq %rcx, (%rdx)
jmp 0x539e
xorl %eax, %eax
popq %rcx
retq
leaq 0xd331(%rip), %rdi      # 0x126d8
leaq 0xd103(%rip), %rsi      # 0x124b1
leaq 0xd34b(%rip), %rcx      # 0x12700
movl $0xb5c, %edx            # imm = 0xB5C
callq 0x2140
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_realloc_c
void *stb_realloc_c(void *context, void *ptr, size_t newsize)
{
   if (ptr == NULL) return stb_malloc(context, newsize);
   if (newsize == 0) { stb_free(ptr); return NULL; }
   // @TODO: verify you haven't changed contexts
   return stb_realloc(ptr, newsize);
}

// Assembly:
testq %rsi, %rsi
je 0x53d4
testq %rdx, %rdx
je 0x53e7
movq %rsi, %rdi
movq %rdx, %rsi
jmp 0x52ce
movl 0x14e4a(%rip), %ecx     # 0x1a224
movq %rdx, %rsi
movl $0x2, %edx
jmp 0x508a
pushq %rax
movq %rsi, %rdi
callq 0x4de4
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_reassign
void stb_reassign(void *new_context, void *ptr)
{
   stb__alloc *src = stb__get_context(new_context);

   stb__alloc_type t = stb__identify(ptr);
   assert(t == STB__alloc || t == STB__nochildren);

   if (t == STB__alloc) {
      stb__alloc *s = (stb__alloc *) ptr - 1;

      // unlink from old
      *(s->prevn) = s->next;
      if (s->next)
         *stb__prevn(s->next) = s->prevn;

      stb__insert_alloc(src, s);
   } else {
      stb__nochildren *s = (stb__nochildren *) ptr - 1;

      // unlink from old
      *(s->prevn) = s->next;
      if (s->next)
         *stb__prevn(s->next) = s->prevn;

      stb__insert_nochild(src, s);
   }
}

// Assembly:
testq %rdi, %rdi
je 0x540c
movq -0x8(%rdi), %rax
movl %eax, %ecx
andl $0x3, %ecx
cmpl $0x1, %ecx
jne 0x5415
decq %rax
jmp 0x541c
leaq 0x14e25(%rip), %rax     # 0x1a238
jmp 0x541c
addq $-0x20, %rdi
movq %rdi, %rax
movq -0x8(%rsi), %rdx
movl %edx, %ecx
andl $0x3, %ecx
je 0x5469
cmpl $0x2, %ecx
jne 0x54ca
movq -0x20(%rsi), %rdx
movq -0x10(%rsi), %rcx
movq %rcx, (%rdx)
testq %rcx, %rcx
je 0x545f
movq -0x20(%rsi), %rdx
leaq -0x8(%rcx), %rdi
movl -0x8(%rcx), %r8d
andl $0x3, %r8d
addq $-0x20, %rcx
cmpl $0x2, %r8d
cmovneq %rdi, %rcx
movq %rdx, (%rcx)
leaq 0x8(%rax), %rcx
movq %rcx, -0x20(%rsi)
jmp 0x549c
movq -0x10(%rsi), %rcx
movq %rcx, (%rdx)
testq %rcx, %rcx
je 0x5494
movq -0x8(%rsi), %rdx
leaq -0x8(%rcx), %rdi
movl -0x8(%rcx), %r8d
andl $0x3, %r8d
addq $-0x20, %rcx
cmpl $0x2, %r8d
cmovneq %rdi, %rcx
movq %rdx, (%rcx)
leaq 0x8(%rax), %rcx
movq %rcx, -0x8(%rsi)
movq 0x8(%rax), %rcx
movq %rcx, -0x10(%rsi)
movq %rsi, 0x8(%rax)
testq %rcx, %rcx
je 0x54c9
addq $-0x10, %rsi
leaq -0x8(%rcx), %rax
movl -0x8(%rcx), %edx
andl $0x3, %edx
addq $-0x20, %rcx
cmpl $0x2, %edx
cmovneq %rax, %rcx
movq %rsi, (%rcx)
retq
pushq %rax
leaq 0xd206(%rip), %rdi      # 0x126d8
leaq 0xcfd8(%rip), %rsi      # 0x124b1
leaq 0xd242(%rip), %rcx      # 0x12722
movl $0xb8b, %edx            # imm = 0xB8B
callq 0x2140
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb__arr_copy_
void * stb__arr_copy_(void *p, int elem_size)
{
   stb__arr *q;
   if (p == NULL) return p;
   q = (stb__arr *) stb__arr_malloc(sizeof(*q) + elem_size * stb_arrhead2(p)->limit);
   stb_arr_check2(p);
   memcpy(q, stb_arrhead2(p), sizeof(*q) + elem_size * stb_arrhead2(p)->len);
   q->stb_malloc = !!stb__arr_context;
   return q+1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x5581
movl %esi, %ebp
movq %rdi, %r14
leaq -0x10(%rdi), %r15
movl -0xc(%rdi), %edi
imull %esi, %edi
addl $0x10, %edi
callq 0x5591
movq %rax, %rbx
movslq -0x10(%r14), %rax
movslq %ebp, %rdx
imulq %rax, %rdx
addq $0x10, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2230
xorl %eax, %eax
cmpq $0x0, 0x189a3(%rip)     # 0x1df18
setne %al
movl %eax, 0x8(%rbx)
addq $0x10, %rbx
jmp 0x5583
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_arr_free_
void stb_arr_free_(void **pp)
{
   void *p = *pp;
   stb_arr_check2(p);
   if (p) {
      stb__arr *q = stb_arrhead2(p);
      if (q->stb_malloc)
         stb_free(q);
      else
         free(q);
   }
   *pp = NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x55dc
leaq -0x10(%rax), %rdi
cmpl $0x0, -0x8(%rax)
je 0x55d7
callq 0x4de4
jmp 0x55dc
callq 0x23c0
movq $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb__arrsize_
static void stb__arrsize_(void **pp, int size, int limit, int len  STB__PARAMS)
{
   void *p = *pp;
   stb__arr *a;
   stb_arr_check2(p);
   if (p == NULL) {
      if (len == 0 && size == 0) return;
      a = (stb__arr *) stb__arr_malloc(sizeof(*a) + size*limit);
      a->limit = limit;
      a->len   = len;
      a->stb_malloc = !!stb__arr_context;
      a->signature = stb_arr_signature;
   } else {
      a = stb_arrhead2(p);
      a->len = len;
      if (a->limit < limit) {
         void *p;
         if (a->limit >= 4 && limit < a->limit * 2)
            limit = a->limit * 2;
         if (a->stb_malloc)
            p = stb_realloc(a, sizeof(*a) + limit*size);
         else
            #ifdef STB_MALLOC_WRAPPER
            p = stb__realloc(a, sizeof(*a) + limit*size, file, line);
            #else
            p = realloc(a, sizeof(*a) + limit*size);
            #endif
         if (p) {
            a = (stb__arr *) p;
            a->limit = limit;
         } else {
            // throw an error!
         }
      }
   }
   a->len   = stb_min(a->len, a->limit);
   *pp = a+1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %ebp
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x5649
leaq -0x10(%rax), %r14
movl %r15d, -0x10(%rax)
movl -0xc(%rax), %ecx
cmpl %ebp, %ecx
jge 0x5695
leal (%rcx,%rcx), %r15d
cmpl %ebp, %r15d
cmovlel %ebp, %r15d
cmpl $0x4, %ecx
cmovll %ebp, %r15d
imull %r15d, %esi
movslq %esi, %rsi
addq $0x10, %rsi
cmpl $0x0, -0x8(%rax)
je 0x5681
movq %r14, %rdi
callq 0x52ce
jmp 0x5689
movl %r15d, %eax
orl %esi, %eax
je 0x56ab
imull %ebp, %esi
addl $0x10, %esi
movl %esi, %edi
callq 0x5591
movq %rax, %r14
movl %ebp, 0x4(%rax)
movl %r15d, (%rax)
xorl %eax, %eax
cmpq $0x0, 0x188a8(%rip)     # 0x1df18
setne %al
movl %eax, 0x8(%r14)
movl $0x51bada7b, 0xc(%r14)  # imm = 0x51BADA7B
jmp 0x5695
movq %r14, %rdi
callq 0x22b0
testq %rax, %rax
je 0x5695
movl %r15d, 0x4(%rax)
movq %rax, %r14
movl (%r14), %eax
movl 0x4(%r14), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
movl %ecx, (%r14)
addq $0x10, %r14
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb__arr_setlen_
void stb__arr_setlen_(void **pp, int size, int newlen  STB__PARAMS)
{
   void *p = *pp;
   stb_arr_check2(p);
   if (stb_arrcurmax2(p) < newlen || p == NULL) {
      stb__arrsize_(pp, size, newlen, newlen  STB__ARGS);
   } else {
      stb_arrhead2(p)->len = newlen;
   }
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x56c3
cmpl %edx, -0xc(%rax)
jge 0x56ca
movl %edx, %ecx
jmp 0x55f6
movl %edx, -0x10(%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb__arr_insertn_
void stb__arr_insertn_(void **pp, int size, int i, int n  STB__PARAMS)
{
   void *p = *pp;
   if (n) {
      int z;

      if (p == NULL) {
         stb__arr_addlen_(pp, size, n  STB__ARGS);
         return;
      }

      z = stb_arr_len2(p);
      stb__arr_addlen_(&p, size, n  STB__ARGS);
      memmove((char *) p + (i+n)*size, (char *) p + i*size, size * (z-i));
   }
   *pp = p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r12
movq %r12, (%rsp)
testl %ecx, %ecx
je 0x574e
movl %ecx, %r15d
movl %esi, %ebp
testq %r12, %r12
je 0x5760
movl %edx, %r14d
movl -0x10(%r12), %r13d
movq %rsp, %r12
movq %r12, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x56ce
movq (%r12), %r12
addl %r14d, %r15d
imull %ebp, %r15d
movslq %r15d, %rdi
addq %r12, %rdi
subl %r14d, %r13d
imull %ebp, %r14d
movslq %r14d, %rsi
addq %r12, %rsi
imull %ebp, %r13d
movslq %r13d, %rdx
callq 0x22d0
movq %r12, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x56ce
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb__arr_deleten_
void stb__arr_deleten_(void **pp, int size, int i, int n  STB__PARAMS)
{
   void *p = *pp;
   if (n) {
      memmove((char *) p + i*size, (char *) p + (i+n)*size, size * (stb_arr_len2(p)-(i+n)));
      stb_arrhead2(p)->len -= n;
   }
   *pp = p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq (%rdi), %r15
testl %ecx, %ecx
je 0x57c3
movl %ecx, %ebx
leal (%rbx,%rdx), %ecx
imull %esi, %edx
movslq %edx, %rdi
addq %r15, %rdi
movl %ecx, %eax
imull %esi, %eax
cltq
addq %r15, %rax
testq %r15, %r15
je 0x57ad
movl -0x10(%r15), %edx
jmp 0x57af
xorl %edx, %edx
subl %ecx, %edx
imull %esi, %edx
movslq %edx, %rdx
movq %rax, %rsi
callq 0x22d0
subl %ebx, -0x10(%r15)
movq %r15, (%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_hash
unsigned int stb_hash(char *str)
{
   unsigned int hash = 0;
   while (*str)
      hash = (hash << 7) + (hash >> 25) + *str++;
   return hash + (hash >> 16);
}

// Assembly:
movb (%rdi), %al
testb %al, %al
je 0x57ea
incq %rdi
xorl %ecx, %ecx
roll $0x7, %ecx
movsbl %al, %eax
addl %eax, %ecx
movb (%rdi), %al
incq %rdi
testb %al, %al
jne 0x57d7
jmp 0x57ec
xorl %ecx, %ecx
movl %ecx, %eax
shrl $0x10, %eax
addl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_hashlen
unsigned int stb_hashlen(char *str, int len)
{
   unsigned int hash = 0;
   while (len-- > 0 && *str)
      hash = (hash << 7) + (hash >> 25) + *str++;
   return hash + (hash >> 16);
}

// Assembly:
testl %esi, %esi
jle 0x5814
incl %esi
xorl %ecx, %ecx
movsbl (%rdi), %eax
testl %eax, %eax
je 0x5816
roll $0x7, %ecx
incq %rdi
addl %eax, %ecx
decl %esi
cmpl $0x1, %esi
jg 0x57fc
jmp 0x5816
xorl %ecx, %ecx
movl %ecx, %eax
shrl $0x10, %eax
addl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_hash2
unsigned int stb_hash2(char *str, unsigned int *hash2_ptr)
{
   unsigned int hash1 = 0x3141592c;
   unsigned int hash2 = 0x77f044ed;
   while (*str) {
      hash1 = (hash1 << 7) + (hash1 >> 25) + *str;
      hash2 = (hash2 << 11) + (hash2 >> 21) + *str;
      ++str;
   }
   *hash2_ptr = hash2 + (hash1 >> 16);
   return       hash1 + (hash2 >> 16);
}

// Assembly:
movb (%rdi), %dl
testb %dl, %dl
je 0x58d9
incq %rdi
movl $0x3141592c, %ecx       # imm = 0x3141592C
movl $0x77f044ed, %eax       # imm = 0x77F044ED
roll $0x7, %ecx
movsbl %dl, %edx
addl %edx, %ecx
roll $0xb, %eax
addl %edx, %eax
movb (%rdi), %dl
incq %rdi
testb %dl, %dl
jne 0x58c1
jmp 0x58e3
movl $0x77f044ed, %eax       # imm = 0x77F044ED
movl $0x3141592c, %ecx       # imm = 0x3141592C
movl %ecx, %edx
shrl $0x10, %edx
addl %eax, %edx
movl %edx, (%rsi)
shrl $0x10, %eax
addl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_hash_fast
unsigned int stb_hash_fast(void *p, int len)
{
   unsigned char *q = (unsigned char *) p;
   unsigned int hash = len;

   if (len <= 0 || q == NULL) return 0;

   /* Main loop */
   if (((int) q & 1) == 0) {
      for (;len > 3; len -= 4) {
         unsigned int val;
         hash +=  stb__get16(q);
         val   = (stb__get16(q+2) << 11);
         hash  = (hash << 16) ^ hash ^ val;
         q    += 4;
         hash += hash >> 11;
      }
   } else {
      for (;len > 3; len -= 4) {
         unsigned int val;
         hash +=  stb__get16_slow(q);
         val   = (stb__get16_slow(q+2) << 11);
         hash  = (hash << 16) ^ hash ^ val;
         q    += 4;
         hash += hash >> 11;
      }
   }

   /* Handle end cases */
   switch (len) {
      case 3: hash += stb__get16_slow(q);
              hash ^= hash << 16;
              hash ^= q[2] << 18;
              hash += hash >> 11;
              break;
      case 2: hash += stb__get16_slow(q);
              hash ^= hash << 11;
              hash += hash >> 17;
              break;
      case 1: hash += q[0];
              hash ^= hash << 10;
              hash += hash >> 1;
              break;
      case 0: break;
   }

   /* Force "avalanching" of final 127 bits */
   hash ^= hash << 3;
   hash += hash >> 5;
   hash ^= hash << 4;
   hash += hash >> 17;
   hash ^= hash << 25;
   hash += hash >> 6;

   return hash;
}

// Assembly:
testl %esi, %esi
setle %cl
testq %rdi, %rdi
sete %dl
xorl %eax, %eax
orb %cl, %dl
jne 0x59ee
testb $0x1, %dil
jne 0x593c
cmpl $0x4, %esi
jb 0x596b
movl %esi, %eax
movzwl (%rdi), %ecx
addl %eax, %ecx
movzwl 0x2(%rdi), %eax
shll $0xb, %eax
xorl %ecx, %eax
shll $0x10, %ecx
xorl %eax, %ecx
addq $0x4, %rdi
movl %ecx, %eax
shrl $0xb, %eax
addl %ecx, %eax
addl $-0x4, %esi
cmpl $0x3, %esi
ja 0x5914
jmp 0x596d
cmpl $0x4, %esi
jb 0x596b
movl %esi, %eax
movzwl (%rdi), %ecx
addl %eax, %ecx
movzwl 0x2(%rdi), %eax
shll $0xb, %eax
xorl %ecx, %eax
shll $0x10, %ecx
xorl %eax, %ecx
addq $0x4, %rdi
movl %ecx, %eax
shrl $0xb, %eax
addl %ecx, %eax
addl $-0x4, %esi
cmpl $0x3, %esi
ja 0x5943
jmp 0x596d
movl %esi, %eax
movl %esi, %ecx
leaq 0xc87e(%rip), %rdx      # 0x121f4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movzbl (%rdi), %ecx
addl %ecx, %eax
movl %eax, %ecx
shll $0xa, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shrl %eax
jmp 0x59a2
movzwl (%rdi), %ecx
addl %ecx, %eax
movl %eax, %ecx
shll $0xb, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shrl $0x11, %eax
addl %ecx, %eax
jmp 0x59c2
movzwl (%rdi), %ecx
addl %ecx, %eax
movzbl 0x2(%rdi), %ecx
shll $0x12, %ecx
xorl %eax, %ecx
shll $0x10, %eax
xorl %ecx, %eax
movl %eax, %ecx
shrl $0xb, %ecx
addl %eax, %ecx
movl %ecx, %eax
leal (,%rax,8), %ecx
xorl %eax, %ecx
movl %ecx, %eax
shrl $0x5, %eax
addl %ecx, %eax
movl %eax, %ecx
shll $0x4, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shrl $0x11, %eax
addl %ecx, %eax
movl %eax, %ecx
shll $0x19, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shrl $0x6, %eax
addl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_perfect_hash
int stb_perfect_hash(stb_perfect *p, unsigned int x)
{
   stb_uint m = x * p->multiplicand;
   stb_uint y = x >> 16;
   stb_uint bv = (m >> 24) + y;
   stb_uint av = (m + y) >> 12;
   if (p->table == NULL) return -1;  // uninitialized table fails
   bv &= p->b_mask;
   av &= p->table_mask;
   if (p->large_bmap)
      av ^= p->large_bmap[bv];
   else
      av ^= p->small_bmap[bv];
   return p->table[av] == x ? av : -1;
}

// Assembly:
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x5a57
movl 0x4(%rdi), %edx
imull %esi, %edx
movl %esi, %r8d
shrl $0x10, %r8d
leal (%rdx,%r8), %ecx
shrl $0xc, %ecx
shrl $0x18, %edx
addl %r8d, %edx
andl 0x8(%rdi), %edx
andl 0x28(%rdi), %ecx
movq 0x20(%rdi), %r8
testq %r8, %r8
je 0x5a5d
movl %edx, %edx
movzwl (%r8,%rdx,2), %edx
jmp 0x5a62
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
movzbl 0xc(%rdi,%rdx), %edx
xorl %ecx, %edx
cmpl %esi, (%rax,%rdx,4)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovel %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_perfect_destroy
void stb_perfect_destroy(stb_perfect *p)
{
   if (p->large_bmap) free(p->large_bmap);
   if (p->table     ) free(p->table);
   p->large_bmap = NULL;
   p->table      = NULL;
   p->b_mask     = 0;
   p->table_mask = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x6360
callq 0x23c0
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x636e
callq 0x23c0
xorl %eax, %eax
movq %rax, 0x20(%rbx)
movq %rax, 0x30(%rbx)
movl %eax, 0x8(%rbx)
movl %eax, 0x28(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_ptrmap_delete
void stb_ptrmap_delete(stb_ptrmap *e, void (*free_func)(void *))
{
   int i;
   if (free_func)
      for (i=0; i < e->limit; ++i)
         if (e->table[i].k != STB_EMPTY && e->table[i].k != STB_EDEL) {
            if (free_func == free)
               free(e->table[i].v); // allow STB_MALLOC_WRAPPER to operate
            else
               free_func(e->table[i].v);
         }
   stb_ptrmap_destroy(e);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0x6d9b
cmpl $0x0, 0x10(%rbx)
jle 0x6d9b
movq %rsi, %r14
movl $0x8, %r15d
xorl %r12d, %r12d
movq 0x1325a(%rip), %r13     # 0x19fc0
movq (%rbx), %rax
movq -0x8(%rax,%r15), %rcx
orq $0x4, %rcx
cmpq $0x6, %rcx
je 0x6d8b
movq (%rax,%r15), %rdi
cmpq %r13, %r14
je 0x6d86
callq *%r14
jmp 0x6d8b
callq 0x23c0
incq %r12
movslq 0x10(%rbx), %rax
addq $0x10, %r15
cmpq %rax, %r12
jl 0x6d66
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x671d
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_idict_init
stb_define_hash_base(STB_noprefix, stb_idict, short type; short gc; STB_nofields, stb_idict_,stb_idict_,0.85f,
              stb_int32,STB_IEMPTY,STB_IDEL,STB_nocopy,STB_nodelete,STB_nosafe,
              STB_equal,STB_equal,
              return stb_rehash_improved(k);,stb_int32,STB_nonullvalue,0)

stb_idict * stb_idict_new_size(int size)
{
   stb_idict *e = (stb_idict *) malloc(sizeof(*e));
   if (e) {
      if (!stb_is_pow2(size))
         size = 1 << stb_log2_ceil(size);
      stb_idict_init(e, size);
      e->alloced = 1;
   }
   return e;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
cmpl $0x5, %esi
movl $0x4, %r15d
cmovgel %esi, %r15d
movl %r15d, 0x18(%rdi)
xorl %ebx, %ebx
movl %ebx, 0x14(%rdi)
leal -0x1(%r15), %eax
movl %eax, 0x10(%rdi)
movl %ebx, 0x1c(%rdi)
cvtsi2ss %r15d, %xmm0
movb $0x0, 0x2e(%rdi)
movw $0x0, 0x2c(%rdi)
cvtsi2sd %r15d, %xmm1
mulsd 0xb238(%rip), %xmm1     # 0x12028
cvttsd2si %xmm1, %eax
cmpl $0x41, %esi
cmovll %ebx, %eax
movss 0xb256(%rip), %xmm1     # 0x12058
mulss %xmm0, %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
mulps 0xb2c0(%rip), %xmm1     # 0x120d0
movl %eax, 0x28(%rdi)
cvttps2dq %xmm1, %xmm0
movq %xmm0, 0x20(%rdi)
leaq (,%r15,8), %rdi
callq 0x2250
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x6f3a
leaq -0x1(%r15), %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq 0x18(,%r15,8), %rcx
andq $-0x20, %rcx
movdqa 0xb248(%rip), %xmm1     # 0x120a0
movdqa 0xb250(%rip), %xmm2     # 0x120b0
xorl %edx, %edx
movdqa 0xb1f6(%rip), %xmm3     # 0x12060
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0xb246(%rip), %xmm5     # 0x120c0
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %esi
notl %esi
testb $0x1, %sil
je 0x6eb6
movl $0x1, (%rax,%rdx)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x6ecd
movl $0x1, 0x8(%rax,%rdx)
movdqa %xmm1, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
pxor %xmm4, %xmm6
pextrw $0x0, %xmm6, %esi
testb $0x1, %sil
je 0x6f0d
movl $0x1, 0x10(%rax,%rdx)
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x6f20
movl $0x1, 0x18(%rax,%rdx)
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
addq $0x20, %rdx
cmpq %rdx, %rcx
jne 0x6e7a
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_idict_remove_all
void stb_idict_remove_all(stb_idict *e)
{
   int n;
   for (n=0; n < e->limit; ++n)
      e->table[n].k = STB_IEMPTY;
   e->has_empty = e->has_del = 0;
}

// Assembly:
movslq 0x18(%rdi), %rdx
testq %rdx, %rdx
jle 0x769b
movq 0x8(%rdi), %rax
leal 0x3(%rdx), %ecx
decq %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shrl $0x2, %ecx
shlq $0x5, %rcx
movdqa 0xaae2(%rip), %xmm1     # 0x120a0
movdqa 0xaaea(%rip), %xmm2     # 0x120b0
xorl %edx, %edx
movdqa 0xaa90(%rip), %xmm3     # 0x12060
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0xaae0(%rip), %xmm5     # 0x120c0
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %esi
notl %esi
testb $0x1, %sil
je 0x761c
movl $0x1, (%rax,%rdx)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x7633
movl $0x1, 0x8(%rax,%rdx)
movdqa %xmm1, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
pxor %xmm4, %xmm6
pextrw $0x0, %xmm6, %esi
testb $0x1, %sil
je 0x7673
movl $0x1, 0x10(%rax,%rdx)
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x7686
movl $0x1, 0x18(%rax,%rdx)
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
addq $0x20, %rdx
cmpq %rdx, %rcx
jne 0x75e0
movw $0x0, 0x2d(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_sparse_ptr_matrix_new
stb_spmatrix *stb_sparse_ptr_matrix_new(int val_size)
{
   stb_spmatrix *m = stb__spmatrix_create();
   if (m) m->val_size = val_size;
   if (m) m->arena = stb_malloc_global(1);
   return m;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
movl $0x48, %edi
callq 0x2250
testq %rax, %rax
je 0x76f5
movq %rax, %rbx
movq %rax, %rdi
movl $0x10, %esi
callq 0x10977
testl %eax, %eax
je 0x76ed
movb $0x1, 0x34(%rbx)
movl %ebp, (%rbx)
movl 0x12b4e(%rip), %ecx     # 0x1a224
movl $0x1, %esi
xorl %edi, %edi
movl $0x2, %edx
callq 0x508a
movq %rax, 0x8(%rbx)
jmp 0x76f7
movq %rbx, %rdi
callq 0x23c0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_sparse_ptr_matrix_get
void *stb_sparse_ptr_matrix_get(stb_spmatrix *z, void *a, void *b, int create)
{
   stb__ptrpair t = { a,b };
   void *data = stb__spmatrix_get(z, t);
   if (!data && create) {
      data = stb_malloc_raw(z->arena, z->val_size);
      if (!data) return NULL;
      memset(data, 0, z->val_size);
      stb__spmatrix_add(z, t, data);
   }
   return data;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x10a23
movq %r14, %rcx
xorq $0x1, %rcx
movq %rbx, %rdx
xorq $0x1, %rdx
orq %rcx, %rdx
jne 0x776f
movl $0x38, %eax
cmpb $0x0, 0x35(%r15)
jne 0x7792
jmp 0x7814
movq %r14, %rcx
xorq $0x2, %rcx
movq %rbx, %rdx
xorq $0x2, %rdx
orq %rcx, %rdx
jne 0x7797
movl $0x40, %eax
cmpb $0x0, 0x36(%r15)
je 0x7814
addq %r15, %rax
jmp 0x780f
movl 0x18(%r15), %edx
movl %edx, %edi
andl %eax, %edi
movq 0x10(%r15), %rcx
movl %edi, %esi
leaq (%rsi,%rsi,2), %r8
leaq (%rcx,%r8,8), %r8
movq (%r8), %r9
cmpq $0x1, %r9
jne 0x77bd
cmpq $0x1, 0x8(%r8)
je 0x7814
cmpq %r14, %r9
jne 0x77c8
cmpq %rbx, 0x8(%r8)
je 0x7803
movl %eax, %esi
shrl $0x6, %esi
addl %eax, %esi
shrl $0x13, %eax
addl %esi, %eax
orl $0x1, %eax
xorl %r12d, %r12d
movl %edi, %esi
addl %eax, %esi
andl %edx, %esi
leaq (%rsi,%rsi,2), %rdi
leaq (%rcx,%rdi,8), %rdi
movq (%rdi), %r8
cmpq $0x1, %r8
jne 0x77f8
cmpq $0x1, 0x8(%rdi)
je 0x7817
cmpq %r14, %r8
jne 0x77dc
cmpq %rbx, 0x8(%rdi)
jne 0x77dc
leaq (%rsi,%rsi,2), %rax
leaq (%rcx,%rax,8), %rax
addq $0x10, %rax
movq (%rax), %r12
jmp 0x7817
xorl %r12d, %r12d
testl %ebp, %ebp
je 0x7865
testq %r12, %r12
jne 0x7865
movq 0x8(%r15), %rdi
movslq (%r15), %rsi
movl 0x129f7(%rip), %ecx     # 0x1a224
movl $0x4, %edx
callq 0x508a
testq %rax, %rax
je 0x7862
movq %rax, %r12
movslq (%r15), %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x2160
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x10adb
jmp 0x7865
xorl %r12d, %r12d
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_sdict_new
stb_sdict * stb_sdict_new(int use_arena)
{
   stb_sdict *d = stb_sdict_create();
   if (d == NULL) return NULL;
   d->arena = use_arena ? stb_malloc_global(1) : NULL;
   return d;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
callq 0x79af
movq %rax, %rbx
testq %rax, %rax
je 0x81f2
testl %ebp, %ebp
je 0x81ed
movl 0x1204a(%rip), %ecx     # 0x1a224
movl $0x1, %esi
xorl %edi, %edi
movl $0x2, %edx
callq 0x508a
jmp 0x81ef
xorl %eax, %eax
movq %rax, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_sdict_copy
stb_sdict* stb_sdict_copy(stb_sdict *old)
{
   stb_sdict *n;
   void *old_arena = old->arena;
   void *new_arena = old_arena ? stb_malloc_global(1) : NULL;
   old->arena = new_arena;
   n = stb_sdictinternal_copy(old);
   old->arena = old_arena;
   if (n)
      n->arena = new_arena;
   else if (new_arena)
      stb_free(new_arena);
   return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r12
testq %r12, %r12
je 0x822b
movl 0x1200f(%rip), %ecx     # 0x1a224
movl $0x1, %esi
xorl %edi, %edi
movl $0x2, %edx
callq 0x508a
movq %rax, %r14
jmp 0x822e
xorl %r14d, %r14d
movq %r14, (%rbx)
movq %rbx, %rdi
callq 0x80b4
movq %rax, %r15
movq %r12, (%rbx)
testq %rax, %rax
je 0x8249
movq %r14, (%r15)
jmp 0x8256
testq %r14, %r14
je 0x8256
movq %r14, %rdi
callq 0x4de4
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_file
void *stb_file(char *filename, size_t *length)
{
   FILE *f = stb__fopen(filename, "rb");
   char *buffer;
   size_t len, len2;
   if (!f) return NULL;
   len = stb_filelen(f);
   buffer = (char *) malloc(len+2); // nul + extra
   len2 = fread(buffer, 1, len, f);
   if (len2 == len) {
      if (length) *length = len;
      buffer[len] = 0;
   } else {
      free(buffer);
      buffer = NULL;
   }
   fclose(f);
   return buffer;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
leaq 0xa473(%rip), %rsi      # 0x127fc
callq 0x22f0
testq %rax, %rax
je 0x83d4
movq %rax, %rbx
movq %rax, %rdi
callq 0x8337
movq %rax, %r12
leaq 0x2(%rax), %rdi
callq 0x2250
movq %rax, %r15
movl $0x1, %esi
movq %rax, %rdi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x20b0
cmpq %r12, %rax
jne 0x83d9
testq %r14, %r14
je 0x83cd
movq %r12, (%r14)
movb $0x0, (%r15,%r12)
jmp 0x83e4
xorl %r15d, %r15d
jmp 0x83ec
movq %r15, %rdi
callq 0x23c0
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x20d0
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_filewrite
int stb_filewrite(char *filename, void *data, size_t length)
{
   FILE *f = stb_fopen(filename, "wb");
   if (f) {
      unsigned char *data_ptr = (unsigned char *) data;
      size_t remaining = length;
      while (remaining > 0) {
         size_t len2 = remaining > 65536 ? 65536 : remaining;
         size_t len3 = fwrite(data_ptr, 1, len2, f);
         if (len2 != len3) {
            fprintf(stderr, "Failed while writing %s\n", filename);
            break;
         }
         remaining -= len2;
         data_ptr += len2;
      }
      stb_fclose(f, stb_keep_if_different);
   }
   return f != NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq 0xa3e9(%rip), %rsi      # 0x127ff
callq 0x849b
movq %rax, %rbx
testq %rax, %rax
je 0x8467
testq %r15, %r15
je 0x845a
movl $0x10000, %ebp          # imm = 0x10000
cmpq %rbp, %r15
movl $0x10000, %r13d         # imm = 0x10000
cmovbq %r15, %r13
movl $0x1, %esi
movq %r12, %rdi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x2370
cmpq %rax, %r13
jne 0x847e
addq %r13, %r12
subq %r13, %r15
jne 0x842d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x865d
xorl %eax, %eax
testq %rbx, %rbx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x11b73(%rip), %rax     # 0x19ff8
movq (%rax), %rdi
leaq 0xa373(%rip), %rsi      # 0x12802
movq %r14, %rdx
xorl %eax, %eax
callq 0x21f0
jmp 0x845a
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_fclose
int     stb_fclose(FILE *f, int keep)
{
   stb__file_data *d;

   int ok = STB_FALSE;
   if (f == NULL) return 0;

   if (ferror(f))
      keep = stb_keep_no;

   fclose(f);

   if (stb__files && stb_ptrmap_remove(stb__files, f, (void **) &d)) {
      if (stb__files->count == 0) {
         stb_ptrmap_destroy(stb__files);
         stb__files = NULL;
      }
   } else
      return STB_TRUE; // not special

   if (keep == stb_keep_if_different) {
      // check if the files are identical
      if (stb_feq(d->name, d->temp_name)) {
         keep = stb_keep_no;
         ok = STB_TRUE;  // report success if no change
      }
   }

   if (keep != stb_keep_no) {
      if (stb_fexists(d->name) && remove(d->name)) {
         // failed to delete old, so don't keep new
         keep = stb_keep_no;
      } else {
         if (!stb_rename(d->temp_name, d->name))
            ok = STB_TRUE;
         else
            keep=stb_keep_no;
      }
   }

   if (keep == stb_keep_no)
      remove(d->temp_name);

   free(d->temp_name);
   free(d->name);
   free(d);

   return ok;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
testq %rdi, %rdi
je 0x872d
movl %esi, %ebp
movq %rdi, %rbx
callq 0x2090
xorl %r14d, %r14d
testl %eax, %eax
cmovel %ebp, %r14d
movq %rbx, %rdi
callq 0x20d0
movq 0x158dd(%rip), %rdi     # 0x1df70
movl $0x1, %ebp
testq %rdi, %rdi
je 0x877b
leaq 0x8(%rsp), %rdx
movq %rbx, %rsi
callq 0x6acc
testl %eax, %eax
je 0x877b
movq 0x158b3(%rip), %rdi     # 0x1df70
cmpl $0x0, 0xc(%rdi)
jne 0x86d3
callq 0x671d
movq $0x0, 0x1589d(%rip) # 0x1df70
testl %r14d, %r14d
je 0x8746
cmpl $0x2, %r14d
jne 0x86f9
movq 0x8(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdi
callq 0x8cef
movl $0x1, %r14d
testl %eax, %eax
jne 0x8746
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2220
testl %eax, %eax
je 0x8731
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x2310
testl %eax, %eax
jne 0x8743
movl $0x1, %r14d
jmp 0x8753
xorl %ebp, %ebp
jmp 0x877b
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x2070
testl %eax, %eax
je 0x8710
xorl %r14d, %r14d
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x2070
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x23c0
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x23c0
movq 0x8(%rsp), %rdi
callq 0x23c0
movl %r14d, %ebp
movl %ebp, %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_file_max
void *  stb_file_max(char *filename, size_t *length)
{
   FILE *f = stb__fopen(filename, "rb");
   char *buffer;
   size_t len, maxlen;
   if (!f) return NULL;
   maxlen = *length;
   buffer = (char *) malloc(maxlen+1);
   len = fread(buffer, 1, maxlen, f);
   buffer[len] = 0;
   fclose(f);
   *length = len;
   return buffer;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0xa03a(%rip), %rsi      # 0x127fc
callq 0x22f0
testq %rax, %rax
je 0x8807
movq %rax, %r14
movq (%rbx), %r12
leaq 0x1(%r12), %rdi
callq 0x2250
movq %rax, %r15
movl $0x1, %esi
movq %rax, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x20b0
movq %rax, %r12
movb $0x0, (%r15,%rax)
movq %r14, %rdi
callq 0x20d0
movq %r12, (%rbx)
jmp 0x880a
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_stringfile
char ** stb_stringfile(char *filename, int *plen)
{
   FILE *f = stb__fopen(filename, "rb");
   char *buffer, **list=NULL, *s;
   size_t len, count, i;

   if (!f) return NULL;
   len = stb_filelen(f);
   buffer = (char *) malloc(len+1);
   len = fread(buffer, 1, len, f);
   buffer[len] = 0;
   fclose(f);

   // two passes through: first time count lines, second time set them
   for (i=0; i < 2; ++i) {
      s = buffer;
      if (i == 1)
         list[0] = s;
      count = 1;
      while (*s) {
         if (*s == '\n' || *s == '\r') {
            // detect if both cr & lf are together
            int crlf = (s[0] + s[1]) == ('\n' + '\r');
            if (i == 1) *s = 0;
            if (crlf) ++s;
            if (s[1]) {  // it's not over yet
               if (i == 1) list[count] = s+1;
               ++count;
            }
         }
         ++s;
      }
      if (i == 0) {
         list = (char **) malloc(sizeof(*list) * (count+1) + len+1);
         if (!list) return NULL;
         list[count] = 0;
         // recopy the file so there's just a single allocation to free
         memcpy(&list[count+1], buffer, len+1);
         free(buffer);
         buffer = (char *) &list[count+1];
         if (plen) *plen = count;
      }
   }
   return list;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x9fce(%rip), %rsi      # 0x127fc
callq 0x22f0
testq %rax, %rax
je 0x894c
movq %rax, %r12
movq %rax, %rdi
callq 0x8337
movq %rax, %r14
leaq 0x1(%rax), %rdi
callq 0x2250
movq %rax, %r15
movl $0x1, %esi
movq %rax, %rdi
movq %r14, %rdx
movq %r12, %rcx
callq 0x20b0
movq %rax, %r14
movb $0x0, (%r15,%rax)
movq %r12, %rdi
callq 0x20d0
incq %r14
movb $0x1, %al
xorl %ecx, %ecx
xorl %r12d, %r12d
testb $0x1, %cl
je 0x888c
movq %r15, (%r12)
movl $0x1, %ebp
movq %r15, %rsi
movzbl (%rsi), %edi
cmpl $0xa, %edi
je 0x88aa
cmpl $0xd, %edi
je 0x88aa
testl %edi, %edi
je 0x88f1
movq %rsi, %rdx
jmp 0x88e9
leaq 0x1(%rsi), %rdx
movsbl 0x1(%rsi), %r8d
addl %edi, %r8d
testb $0x1, %cl
je 0x88d7
movb $0x0, (%rsi)
cmpl $0x17, %r8d
je 0x88c7
movq %rsi, %rdx
cmpb $0x0, 0x1(%rdx)
je 0x88e9
leaq 0x1(%rdx), %rsi
movq %rsi, (%r12,%rbp,8)
jmp 0x88e6
cmpl $0x17, %r8d
je 0x88e0
movq %rsi, %rdx
cmpb $0x0, 0x1(%rdx)
je 0x88e9
incq %rbp
incq %rdx
movq %rdx, %rsi
jmp 0x8894
testb $0x1, %al
je 0x894f
leaq (%r14,%rbp,8), %rdi
addq $0x8, %rdi
callq 0x2250
testq %rax, %rax
je 0x894c
movq %rax, %r12
leaq 0x1(%rbp), %rax
movq $0x0, (%r12,%rbp,8)
leaq (%r12,%rax,8), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2230
movq %r15, %rdi
callq 0x23c0
xorl %eax, %eax
movb $0x1, %cl
movq %r13, %r15
testq %rbx, %rbx
je 0x8883
movl %ebp, (%rbx)
xorl %eax, %eax
movq %r13, %r15
jmp 0x8883
xorl %r12d, %r12d
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_stringfile_trimmed
char ** stb_stringfile_trimmed(char *name, int *len, char comment)
{
   int i,n,o=0;
   char **s = stb_stringfile(name, &n);
   if (s == NULL) return NULL;
   for (i=0; i < n; ++i) {
      char *p = stb_skipwhite(s[i]);
      if (*p && *p != comment)
         s[o++] = p;
   }
   s[o] = NULL;
   if (len) *len = o;
   return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rsi, %rbx
leaq 0xc(%rsp), %rsi
callq 0x8819
movq %rax, %r14
testq %rax, %rax
je 0x89ea
movslq 0xc(%rsp), %r15
testq %r15, %r15
jle 0x89d6
xorl %r12d, %r12d
callq 0x23b0
xorl %ecx, %ecx
movq (%r14,%r12,8), %rdx
movq (%rax), %rsi
decq %rdx
movzbl 0x1(%rdx), %edi
incq %rdx
testb $0x20, 0x1(%rsi,%rdi,2)
jne 0x89a2
testb %dil, %dil
sete %sil
cmpb %bpl, %dil
sete %dil
orb %sil, %dil
jne 0x89cc
movslq %ecx, %rsi
incl %ecx
movq %rdx, (%r14,%rsi,8)
incq %r12
cmpq %r15, %r12
jne 0x8998
jmp 0x89d8
xorl %ecx, %ecx
movslq %ecx, %rax
movq $0x0, (%r14,%rax,8)
testq %rbx, %rbx
je 0x89ea
movl %ecx, (%rbx)
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_fgets
char * stb_fgets(char *buffer, int buflen, FILE *f)
{
   char *p;
   buffer[0] = 0;
   p = fgets(buffer, buflen, f);
   if (p) {
      int n = strlen(p)-1;
      if (n >= 0)
         if (p[n] == '\n')
            p[n] = 0;
   }
   return p;
}

// Assembly:
pushq %rbx
movb $0x0, (%rdi)
callq 0x21d0
movq %rax, %rbx
testq %rax, %rax
je 0x8a23
movq %rbx, %rdi
callq 0x2100
decl %eax
js 0x8a23
movl %eax, %eax
cmpb $0xa, (%rbx,%rax)
jne 0x8a23
movb $0x0, (%rbx,%rax)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_fgets_malloc
char * stb_fgets_malloc(FILE *f)
{
   // avoid reallocing for small strings
   char quick_buffer[800];
   quick_buffer[sizeof(quick_buffer)-2] = 0;
   if (!fgets(quick_buffer, sizeof(quick_buffer), f))
      return NULL;

   if (quick_buffer[sizeof(quick_buffer)-2] == 0) {
      int n = strlen(quick_buffer);
      if (n > 0 && quick_buffer[n-1] == '\n')
         quick_buffer[n-1] = 0;
      return strdup(quick_buffer);
   } else {
      char *p;
      char *a = strdup(quick_buffer);
      int len = sizeof(quick_buffer)-1;

      while (!feof(f)) {
         if (a[len-1] == '\n') break;
         a = (char *) realloc(a, len*2);
         p = &a[len];
         p[len-2] = 0;
         if (!fgets(p, len, f))
            break;
         if (p[len-2] == 0) {
            len += strlen(p);
            break;
         }
         len = len + (len-1);
      }
      if (a[len-1] == '\n')
         a[len-1] = 0;
      return a;
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x320, %rsp            # imm = 0x320
movq %rdi, %r14
movq %rsp, %rdi
movb $0x0, 0x31e(%rdi)
movl $0x320, %esi            # imm = 0x320
movq %r14, %rdx
callq 0x21d0
testq %rax, %rax
je 0x8aee
cmpb $0x0, 0x31e(%rsp)
je 0x8af2
movq %rsp, %rdi
callq 0x2380
movq %rax, %rbx
movq %r14, %rdi
callq 0x2210
movl $0x31f, %r15d           # imm = 0x31F
testl %eax, %eax
jne 0x8b24
movl $0x31f, %ebp            # imm = 0x31F
movslq %ebp, %r15
cmpb $0xa, -0x1(%rbx,%r15)
je 0x8b21
leal (%r15,%r15), %eax
movslq %eax, %rsi
movq %rbx, %rdi
callq 0x22b0
movq %rax, %rbx
movq %rax, %r12
addq %r15, %r12
movb $0x0, -0x2(%r15,%r12)
movq %r12, %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x21d0
testq %rax, %rax
je 0x8b21
cmpb $0x0, -0x2(%r12,%r15)
je 0x8b17
leaq -0x1(%r15), %rax
addl %eax, %r15d
movq %r14, %rdi
callq 0x2210
movl %r15d, %ebp
testl %eax, %eax
je 0x8a8e
jmp 0x8b24
xorl %ebx, %ebx
jmp 0x8b33
movq %rsp, %rdi
callq 0x2100
testl %eax, %eax
jle 0x8b0a
decl %eax
cmpb $0xa, (%rsp,%rax)
jne 0x8b0a
movb $0x0, (%rsp,%rax)
movq %rsp, %rdi
callq 0x2380
movq %rax, %rbx
jmp 0x8b33
movq %r12, %rdi
callq 0x2100
addl %eax, %ebp
movl %ebp, %r15d
movslq %r15d, %rax
cmpb $0xa, -0x1(%rax,%rbx)
jne 0x8b33
movb $0x0, -0x1(%rbx,%rax)
movq %rbx, %rax
addq $0x320, %rsp            # imm = 0x320
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_fullpath
int stb_fullpath(char *abs, int abs_size, char *rel)
{
   #ifdef _MSC_VER
   return _fullpath(abs, rel, abs_size) != NULL;
   #else
   if (rel[0] == '/' || rel[0] == '~') {
      if ((int) strlen(rel) >= abs_size)
         return 0;
      strcpy(abs,rel);
      return STB_TRUE;
   } else {
      int n;
      getcwd(abs, abs_size);
      n = strlen(abs);
      if (n+(int) strlen(rel)+2 <= abs_size) {
         abs[n] = '/';
         strcpy(abs+n+1, rel);
         return STB_TRUE;
      } else {
         return STB_FALSE;
      }
   }
   #endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movzbl (%rdx), %eax
cmpl $0x7e, %eax
je 0x8b62
cmpl $0x2f, %eax
jne 0x8b70
movq %rbx, %rdi
callq 0x2100
cmpl %ebp, %eax
jge 0x8b98
jmp 0x8baa
movslq %ebp, %rsi
movq %r14, %rdi
callq 0x2170
movq %r14, %rdi
callq 0x2100
movq %rax, %r15
movq %rbx, %rdi
callq 0x2100
addl %r15d, %eax
addl $0x2, %eax
cmpl %ebp, %eax
jle 0x8b9c
xorl %eax, %eax
jmp 0x8bba
movslq %r15d, %rax
addq %rax, %r14
incq %r14
movb $0x2f, -0x1(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2080
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_fcmp
int stb_fcmp(char *s1, char *s2)
{
   FILE *f = stb__fopen(s1, "rb");
   FILE *g = stb__fopen(s2, "rb");

   if (f == NULL || g == NULL) {
      if (f) fclose(f);
      if (g) {
         fclose(g);
         return STB_TRUE;
      }
      return f != NULL;
   }

   return stb_fcmp_core(f,g);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
leaq 0x9c28(%rip), %r15      # 0x127fc
movq %r15, %rsi
callq 0x22f0
movq %rax, %rbx
movq %r14, %rdi
movq %r15, %rsi
callq 0x22f0
movq %rax, %r14
testq %rbx, %rbx
setne %al
testq %r14, %r14
setne %cl
testb %cl, %al
jne 0x8c1e
testq %rbx, %rbx
je 0x8c0a
movq %rbx, %rdi
callq 0x20d0
testq %r14, %r14
je 0x8c2b
movq %r14, %rdi
callq 0x20d0
movl $0x1, %eax
jmp 0x8c33
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x8c39
xorl %eax, %eax
testq %rbx, %rbx
setne %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_fcmp_core
static int stb_fcmp_core(FILE *f, FILE *g)
{
   char buf1[1024],buf2[1024];
   int n1,n2, res=0;

   while (1) {
      n1 = fread(buf1, 1, sizeof(buf1), f);
      n2 = fread(buf2, 1, sizeof(buf2), g);
      res = memcmp(buf1,buf2,stb_min(n1,n2));
      if (res)
         break;
      if (n1 != n2) {
         res = n1 < n2 ? -1 : 1;
         break;
      }
      if (n1 == 0)
         break;
   }

   fclose(f);
   fclose(g);
   return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x818, %rsp            # imm = 0x818
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
leaq 0x410(%rsp), %r15
leaq 0x10(%rsp), %r12
movl $0x1, %esi
movl $0x400, %edx            # imm = 0x400
movq %r15, %rdi
movq %r14, %rcx
callq 0x20b0
movq %rax, %r13
movl $0x1, %esi
movl $0x400, %edx            # imm = 0x400
movq %r12, %rdi
movq 0x8(%rsp), %rcx
callq 0x20b0
movq %rax, %rbx
cmpl %ebx, %r13d
cmovll %r13d, %eax
movslq %eax, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x21c0
testl %eax, %eax
jne 0x8cb8
cmpl %ebx, %r13d
jne 0x8cbc
testl %r13d, %r13d
jne 0x8c5f
xorl %ebp, %ebp
jmp 0x8cc9
movl %eax, %ebp
jmp 0x8cc9
setge %al
movzbl %al, %eax
leal -0x1(,%rax,2), %ebp
movq %r14, %rdi
callq 0x20d0
movq 0x8(%rsp), %rdi
callq 0x20d0
movl %ebp, %eax
addq $0x818, %rsp            # imm = 0x818
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq